slice-machine-ui 2.8.1-beta.1 → 2.8.1-beta.2

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 (55) hide show
  1. package/out/404.html +1 -1
  2. package/out/_next/static/9odHTDRwqbGU-9wLdN7o7/_buildManifest.js +1 -0
  3. package/out/_next/static/chunks/150-e3d2b02540447045.js +1 -0
  4. package/out/_next/static/chunks/{183-1298bf7953a6f2a0.js → 183-b1a9f55f45cb8d8e.js} +1 -1
  5. package/out/_next/static/chunks/{18539003-9b393c900c89e552.js → 18539003-c65c99f4e1d8f6a8.js} +3 -3
  6. package/out/_next/static/chunks/{372-cfee53700e416e09.js → 372-295e09136ef6fd8c.js} +1 -1
  7. package/out/_next/static/chunks/{441-76bd8e7cf8cc22da.js → 441-29739f872f8d0039.js} +6 -6
  8. package/out/_next/static/chunks/{627-092c9e4c99442c08.js → 479-6205c85aa978fc0b.js} +2 -2
  9. package/out/_next/static/chunks/50-586dc7ab5e584e76.js +1 -0
  10. package/out/_next/static/chunks/764-e040bcebe6027fea.js +1 -0
  11. package/out/_next/static/chunks/{772-db5f72095641ec1d.js → 772-58d0c8f8ae1c6791.js} +1 -1
  12. package/out/_next/static/chunks/{882-32959ffa63fa455c.js → 882-0286cc56ae67376e.js} +1 -1
  13. package/out/_next/static/chunks/{591-a272f15a4bf9830a.js → 918-38ab72e6ee071fec.js} +2 -2
  14. package/out/_next/static/chunks/pages/{_app-be6b83d484e3ae6f.js → _app-23712efc496c1618.js} +157 -157
  15. package/out/_next/static/chunks/pages/{changelog-86f30b15d852e710.js → changelog-f9055af0d38a0c24.js} +1 -1
  16. package/out/_next/static/chunks/pages/{changes-6c05ef623617785e.js → changes-5f02b3fe08918de1.js} +1 -1
  17. package/out/_next/static/chunks/pages/custom-types/{[customTypeId]-fd2416081ef2ffca.js → [customTypeId]-2eb64c9ea82fcd0a.js} +1 -1
  18. package/out/_next/static/chunks/pages/{custom-types-5de2dd7b9b93236e.js → custom-types-ddc20cfdd8049c04.js} +1 -1
  19. package/out/_next/static/chunks/pages/{index-2d7f95201a656c12.js → index-17f953c11b46cb20.js} +1 -1
  20. package/out/_next/static/chunks/pages/{labs-81cf5c5f09fa0bda.js → labs-867606e5aff179cd.js} +1 -1
  21. package/out/_next/static/chunks/pages/page-types/{[pageTypeId]-59e143620505f73f.js → [pageTypeId]-e5a5e6b345081e0a.js} +1 -1
  22. package/out/_next/static/chunks/pages/settings-80b9910a0643abb5.js +1 -0
  23. package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]/{simulator-908e779f6d24760d.js → simulator-783b6577bd4e3728.js} +1 -1
  24. package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/{[variation]-0b6162eb591ee324.js → [variation]-743fc5c3feab52f8.js} +1 -1
  25. package/out/_next/static/chunks/pages/{slices-317ec2bd3451566e.js → slices-0f6e50acfb5957ed.js} +1 -1
  26. package/out/_next/static/css/{4840a6c8541a6625.css → aeaa4dcbac2fb8d0.css} +1 -1
  27. package/out/_next/static/css/cc25c43805d5a292.css +1 -0
  28. package/out/changelog.html +1 -1
  29. package/out/changes.html +1 -1
  30. package/out/custom-types/[customTypeId].html +1 -1
  31. package/out/custom-types.html +1 -1
  32. package/out/index.html +1 -1
  33. package/out/labs.html +1 -1
  34. package/out/page-types/[pageTypeId].html +1 -1
  35. package/out/settings.html +1 -1
  36. package/out/slices/[lib]/[sliceName]/[variation]/simulator.html +1 -1
  37. package/out/slices/[lib]/[sliceName]/[variation].html +1 -1
  38. package/out/slices.html +1 -1
  39. package/package.json +4 -4
  40. package/src/features/settings/git/GitRepositoryConnectDialog.tsx +2 -0
  41. package/src/features/slices/convertLegacySlice/ConvertLegacySliceAsNewSliceDialog.tsx +111 -114
  42. package/src/features/slices/convertLegacySlice/ConvertLegacySliceAsNewVariationDialog.tsx +134 -140
  43. package/src/features/slices/convertLegacySlice/ConvertLegacySliceMergeWithIdenticalDialog.tsx +75 -72
  44. package/src/legacy/components/Forms/RenameVariationModal/RenameVariationModal.tsx +91 -71
  45. package/src/legacy/components/Forms/formsValidator.ts +1 -1
  46. package/src/theme.ts +0 -4
  47. package/out/_next/static/3qbqGvjPz_LCGtwI1SVmH/_buildManifest.js +0 -1
  48. package/out/_next/static/chunks/150-96a0c443c430ec4b.js +0 -1
  49. package/out/_next/static/chunks/588-d017e0fe2a651a87.js +0 -1
  50. package/out/_next/static/chunks/750-aa35f21031ee1f96.js +0 -1
  51. package/out/_next/static/chunks/pages/settings-80e0d6f1c79282d3.js +0 -1
  52. package/out/_next/static/css/e5c7f63f02ff4d0f.css +0 -1
  53. package/src/legacy/components/Forms/RenameVariationModal/RenameVariationModal.module.css +0 -5
  54. package/src/legacy/components/Forms/RenameVariationModal/RenameVariationModal.module.css.d.ts +0 -5
  55. /package/out/_next/static/{3qbqGvjPz_LCGtwI1SVmH → 9odHTDRwqbGU-9wLdN7o7}/_ssgManifest.js +0 -0
@@ -1,10 +1,10 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[851],{71463:function(e,t,n){let r,i,o,a;n.d(t,{kS:function(){return enT}});var u,s,l,c,d,f,p,A,h,m,g,y,v,x,b,C=n(2784),S=n(38392),w=n(4727),I=n(34736),_=n(32001),T=n(11232),k=n(97867),O=n(47304),R=n(65662),E=n(80832),j=n(19245),F=n(91493),M=n(87248),U=n(34234),L=n(28316),K=n(59131),B=Object.defineProperty,P=(e,t,n)=>t in e?B(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,W=(e,t,n)=>(P(e,"symbol"!=typeof t?t+"":t,n),n),D="u">typeof globalThis?globalThis:"u">typeof window?window:"u">typeof n.g?n.g:"u">typeof self?self:{};function N(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}var q={exports:{}},Q={};q.exports=function(){if(BS)return Q;BS=1;var e=Symbol.for("react.element"),t=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,r=C.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function o(t,o,a){var u,s={},l=null,c=null;for(u in void 0!==a&&(l=""+a),void 0!==o.key&&(l=""+o.key),void 0!==o.ref&&(c=o.ref),o)n.call(o,u)&&!i.hasOwnProperty(u)&&(s[u]=o[u]);if(t&&t.defaultProps)for(u in o=t.defaultProps)void 0===s[u]&&(s[u]=o[u]);return{$$typeof:e,type:t,key:l,ref:c,props:s,_owner:r.current}}return Q.Fragment=t,Q.jsx=o,Q.jsxs=o,Q}();var V=q.exports,z={},Y=function(e,t){return(Y=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},H=function(){return(H=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},G=Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]};function Z(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function J(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function $(e){return this instanceof $?(this.v=e,this):new $(e)}var X=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};let ee=N(Object.freeze(Object.defineProperty({__proto__:null,get __assign(){return H},__asyncDelegator:function(e){var t,n;return t={},r("next"),r("throw",function(e){throw e}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:$(e[r](t)),done:!1}:i?i(t):t}:i}},__asyncGenerator:function(e,t,n){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),o=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){i[e]&&(r[e]=function(t){return new Promise(function(n,r){o.push([e,t,n,r])>1||u(e,t)})})}function u(e,t){try{var n;(n=i[e](t)).value instanceof $?Promise.resolve(n.value.v).then(s,l):c(o[0][2],n)}catch(e){c(o[0][3],e)}}function s(e){u("next",e)}function l(e){u("throw",e)}function c(e,t){e(t),o.shift(),o.length&&u(o[0][0],o[0][1])}},__asyncValues:function(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=Z(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,i){!function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}(r,i,(t=e[n](t)).done,t.value)})}}},__await:$,__awaiter:function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{s(r.next(e))}catch(e){o(e)}}function u(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,u)}s((r=r.apply(e,t||[])).next())})},__classPrivateFieldGet:function(e,t,n,r){if("a"===n&&!r)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},__classPrivateFieldIn:function(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)},__classPrivateFieldSet:function(e,t,n,r,i){if("m"===r)throw TypeError("Private method is not writable");if("a"===r&&!i)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n},__createBinding:G,__decorate:function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var u=e.length-1;u>=0;u--)(i=e[u])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},__esDecorate:function(e,t,n,r,i,o){function a(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var u,s=r.kind,l="getter"===s?"get":"setter"===s?"set":"value",c=!t&&e?r.static?e:e.prototype:null,d=t||(c?Object.getOwnPropertyDescriptor(c,r.name):{}),f=!1,p=n.length-1;p>=0;p--){var A={};for(var h in r)A[h]="access"===h?{}:r[h];for(var h in r.access)A.access[h]=r.access[h];A.addInitializer=function(e){if(f)throw TypeError("Cannot add initializers after decoration has completed");o.push(a(e||null))};var m=(0,n[p])("accessor"===s?{get:d.get,set:d.set}:d[l],A);if("accessor"===s){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw TypeError("Object expected");(u=a(m.get))&&(d.get=u),(u=a(m.set))&&(d.set=u),(u=a(m.init))&&i.push(u)}else(u=a(m))&&("field"===s?i.push(u):d[l]=u)}c&&Object.defineProperty(c,r.name,d),f=!0},__exportStar:function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||G(t,e,n)},__extends:function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Y(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},__generator:function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(u){return function(s){return function(u){if(n)throw TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&u[0]?r.return:u[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,u[1])).done)return i;switch(r=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){a.label=u[1];break}if(6===u[0]&&a.label<i[1]){a.label=i[1],i=u;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(u);break}i[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],r=0}finally{n=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}},__importDefault:function(e){return e&&e.__esModule?e:{default:e}},__importStar:function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&G(t,e,n);return X(t,e),t},__makeTemplateObject:function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},__metadata:function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},__param:function(e,t){return function(n,r){t(n,r,e)}},__propKey:function(e){return"symbol"==typeof e?e:"".concat(e)},__read:J,__rest:function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)0>t.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},__runInitializers:function(e,t,n){for(var r=arguments.length>2,i=0;i<t.length;i++)n=r?t[i].call(e,n):t[i].call(e);return r?n:void 0},__setFunctionName:function(e,t,n){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})},__spread:function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(J(arguments[t]));return e},__spreadArray:function(e,t,n){if(n||2==arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},__spreadArrays:function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),i=0,t=0;t<n;t++)for(var o=arguments[t],a=0,u=o.length;a<u;a++,i++)r[i]=o[a];return r},__values:Z},Symbol.toStringTag,{value:"Module"})));var et={};function en(e){return function(t){return function(n){return n.reduce(function(t,n){return e.alt(t,function(){return n})},t)}}}let er=Object.freeze(Object.defineProperty({__proto__:null,altAll:en},Symbol.toStringTag,{value:"Module"})),ei=Object.freeze(Object.defineProperty({__proto__:null,altAll:function(e){return en(e)(e.zero())}},Symbol.toStringTag,{value:"Module"}));var eo=function(e){return function(){return{meet:function(t,n){return function(r){return e.meet(t(r),n(r))}},join:function(t,n){return function(r){return e.join(t(r),n(r))}},zero:function(){return e.zero},one:function(){return e.one},implies:function(t,n){return function(r){return e.implies(t(r),n(r))}},not:function(t){return function(n){return e.not(t(n))}}}}},ea=function(e){return function(){return{concat:function(t,n){return function(r){return e.concat(t(r),n(r))}}}}},eu=function(e){var t=ea(e);return function(){return{concat:t().concat,empty:function(){return e.empty}}}},es=function(e){return{add:function(t,n){return function(r){return e.add(t(r),n(r))}},zero:function(){return e.zero},mul:function(t,n){return function(r){return e.mul(t(r),n(r))}},one:function(){return e.one}}},el=function(e){var t=es(e);return{add:t.add,mul:t.mul,one:t.one,zero:t.zero,sub:function(t,n){return function(r){return e.sub(t(r),n(r))}}}};function ec(e){return e}function ed(e){return function(){return e}}var ef=ed(!0),ep=ed(!1),eA=ed(null),eh=ed(void 0);function em(e,t,n,r,i,o,a,u,s){switch(arguments.length){case 1:return e;case 2:return function(){return t(e.apply(this,arguments))};case 3:return function(){return n(t(e.apply(this,arguments)))};case 4:return function(){return r(n(t(e.apply(this,arguments))))};case 5:return function(){return i(r(n(t(e.apply(this,arguments)))))};case 6:return function(){return o(i(r(n(t(e.apply(this,arguments))))))};case 7:return function(){return a(o(i(r(n(t(e.apply(this,arguments)))))))};case 8:return function(){return u(a(o(i(r(n(t(e.apply(this,arguments))))))))};case 9:return function(){return s(u(a(o(i(r(n(t(e.apply(this,arguments)))))))))}}}function eg(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e}function ey(e){throw Error("Called `absurd` function which should be uncallable")}function ev(e,t,n,r,i,o,a,u,s){switch(arguments.length){case 1:return e;case 2:return t(e);case 3:return n(t(e));case 4:return r(n(t(e)));case 5:return i(r(n(t(e))));case 6:return o(i(r(n(t(e)))));case 7:return a(o(i(r(n(t(e))))));case 8:return u(a(o(i(r(n(t(e)))))));case 9:return s(u(a(o(i(r(n(t(e))))))));default:for(var l=arguments[0],c=1;c<arguments.length;c++)l=arguments[c](l);return l}}var ex=function(e,t){return t};let eb=Object.freeze(Object.defineProperty({__proto__:null,SK:ex,absurd:ey,apply:function(e){return function(t){return t(e)}},constFalse:ep,constNull:eA,constTrue:ef,constUndefined:eh,constVoid:eh,constant:ed,decrement:function(e){return e-1},flip:function(e){return function(t,n){return e(n,t)}},flow:em,getBooleanAlgebra:eo,getEndomorphismMonoid:function(){return{concat:function(e,t){return em(e,t)},empty:ec}},getMonoid:eu,getRing:el,getSemigroup:ea,getSemiring:es,hole:ey,identity:ec,increment:function(e){return e+1},not:function(e){return function(t){return!e(t)}},pipe:ev,tuple:eg,tupled:function(e){return function(t){return e.apply(void 0,t)}},unsafeCoerce:ec,untupled:function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e(t)}}},Symbol.toStringTag,{value:"Module"}));var eC=function(e,t,n){if(n||2==arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},eS=function(e){return"None"===e._tag},ew=function(e){return"Some"===e._tag},eI={_tag:"None"},e_=function(e){return{_tag:"Some",value:e}},eT=function(e){return"Left"===e._tag},ek=function(e){return"Right"===e._tag},eO=function(e){return{_tag:"Left",left:e}},eR=function(e){return{_tag:"Right",right:e}},eE=function(e){return[e]},ej=function(e){return e.length>0},eF=function(e){return e[0]},eM=function(e){return e.slice(1)},eU=[],eL={},eK=Object.prototype.hasOwnProperty,eB=function(e){return eC([e[0]],e.slice(1),!0)};function eP(e,t){return function(n){return function(r){return e.ap(e.map(r,function(e){return function(n){return t.ap(e,n)}}),n)}}}function eW(e){return function(t){return function(n){return e.ap(e.map(n,function(e){return function(){return e}}),t)}}}function eD(e){return function(t){return function(n){return e.ap(e.map(n,function(){return function(e){return e}}),t)}}}function eN(e){return function(t,n){return function(r){return e.ap(e.map(r,function(e){return function(n){var r;return Object.assign({},e,((r={})[t]=n,r))}}),n)}}}function eq(e){return function(t){return{concat:function(n,r){return e.ap(e.map(n,function(e){return function(n){return t.concat(e,n)}}),r)}}}}function eQ(e,t,n){return function(r){for(var i=Array(n.length+1),o=0;o<n.length;o++)i[o]=n[o];return i[n.length]=r,0===t?e.apply(null,i):eQ(e,t-1,i)}}var eV={1:function(e){return[e]},2:function(e){return function(t){return[e,t]}},3:function(e){return function(t){return function(n){return[e,t,n]}}},4:function(e){return function(t){return function(n){return function(r){return[e,t,n,r]}}}},5:function(e){return function(t){return function(n){return function(r){return function(i){return[e,t,n,r,i]}}}}}};let ez=Object.freeze(Object.defineProperty({__proto__:null,ap:eP,apFirst:eW,apS:eN,apSecond:eD,getApplySemigroup:eq,sequenceS:function(e){return function(t){for(var n=Object.keys(t),r=n.length,i=function(e){var t=e.length;switch(t){case 1:return function(t){var n;return(n={})[e[0]]=t,n};case 2:return function(t){return function(n){var r;return(r={})[e[0]]=t,r[e[1]]=n,r}};case 3:return function(t){return function(n){return function(r){var i;return(i={})[e[0]]=t,i[e[1]]=n,i[e[2]]=r,i}}};case 4:return function(t){return function(n){return function(r){return function(i){var o;return(o={})[e[0]]=t,o[e[1]]=n,o[e[2]]=r,o[e[3]]=i,o}}}};case 5:return function(t){return function(n){return function(r){return function(i){return function(o){var a;return(a={})[e[0]]=t,a[e[1]]=n,a[e[2]]=r,a[e[3]]=i,a[e[4]]=o,a}}}}};default:return eQ(function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];for(var i={},o=0;o<t;o++)i[e[o]]=n[o];return i},t-1,[])}}(n),o=e.map(t[n[0]],i),a=1;a<r;a++)o=e.ap(o,t[n[a]]);return o}},sequenceT:function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r=t.length,i=(eK.call(eV,r)||(eV[r]=eQ(eg,r-1,[])),eV[r]),o=e.map(t[0],i),a=1;a<r;a++)o=e.ap(o,t[a]);return o}}},Symbol.toStringTag,{value:"Module"}));function eY(e,t){return function(n){return function(r){return e.map(r,function(e){return t.map(e,n)})}}}function eH(e){return function(t){return function(n){return e.map(n,function(e){return e(t)})}}}function eG(e){return function(t){return function(n){return e.map(n,function(e){var n;return(n={})[t]=e,n})}}}function eZ(e,t){var n=eY(e,t);return{map:function(e,t){return ev(e,n(t))}}}let eJ=Object.freeze(Object.defineProperty({__proto__:null,bindTo:eG,flap:eH,getFunctorComposition:eZ,map:eY},Symbol.toStringTag,{value:"Module"}));function e$(e){var t=eq(e);return function(n){return{concat:t(n).concat,empty:e.of(n.empty)}}}function eX(e,t){var n=eZ(e,t).map,r=eP(e,t);return{map:n,of:function(n){return e.of(t.of(n))},ap:function(e,t){return ev(e,r(t))}}}let e0=Object.freeze(Object.defineProperty({__proto__:null,getApplicativeComposition:eX,getApplicativeMonoid:e$},Symbol.toStringTag,{value:"Module"}));function e1(e){return function(t){return function(n){return e.chain(n,function(n){return e.map(t(n),function(){return n})})}}}function e2(e){return function(t,n){return function(r){return e.chain(r,function(r){return e.map(n(r),function(e){var n;return Object.assign({},r,((n={})[t]=e,n))})})}}}let e6=Object.freeze(Object.defineProperty({__proto__:null,bind:e2,chainFirst:e1},Symbol.toStringTag,{value:"Module"}));function e5(e){return function(t){return function(n){return e.fromEither(eS(n)?eO(t()):eR(n.value))}}}function e3(e){return function(t,n){return function(r){return e.fromEither(t(r)?eR(r):eO(n(r)))}}}function e9(e){var t=e5(e);return function(e){var n=t(e);return function(e){return em(e,n)}}}function e4(e,t){var n=e9(e);return function(e){var r=n(e);return function(e){return function(n){return t.chain(n,r(e))}}}}function e8(e){return function(t){return em(t,e.fromEither)}}function e7(e,t){var n=e8(e);return function(e){return function(r){return t.chain(r,n(e))}}}function te(e,t){return em(e8(e),e1(t))}function tt(e,t){return function(n,r){return function(i){return t.chain(i,function(t){return e.fromEither(n(t)?eR(t):eO(r(t)))})}}}let tn=Object.freeze(Object.defineProperty({__proto__:null,chainEitherK:e7,chainFirstEitherK:te,chainOptionK:e4,filterOrElse:tt,fromEitherK:e8,fromOption:e5,fromOptionK:e9,fromPredicate:e3},Symbol.toStringTag,{value:"Module"}));var tr=function(e){return{equals:function(t,n){return t===n||e(t,n)}}},ti=function(e){return tr(function(t,n){for(var r in e)if(!e[r].equals(t[r],n[r]))return!1;return!0})},to=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return tr(function(t,n){return e.every(function(e,r){return e.equals(t[r],n[r])})})},ta=function(e){return function(t){return tr(function(n,r){return t.equals(e(n),e(r))})}},tu={equals:function(e,t){return e===t}},ts={equals:function(){return!0}},tl=function(){return{concat:function(e,t){return tr(function(n,r){return e.equals(n,r)&&t.equals(n,r)})}}},tc={URI:"Eq",contramap:function(e,t){return ev(e,ta(t))}},td=tu.equals;let tf=Object.freeze(Object.defineProperty({__proto__:null,Contravariant:tc,URI:"Eq",contramap:ta,eq:tc,eqBoolean:tu,eqDate:{equals:function(e,t){return e.valueOf()===t.valueOf()}},eqNumber:tu,eqStrict:tu,eqString:tu,fromEquals:tr,getMonoid:function(){return{concat:tl().concat,empty:ts}},getSemigroup:tl,getStructEq:ti,getTupleEq:to,strictEqual:td,struct:ti,tuple:to},Symbol.toStringTag,{value:"Module"}));var tp=function(e){return function(t,n){return t===n||0===e(t,n)}},tA=function(e){return{equals:tp(e),compare:function(t,n){return t===n?0:e(t,n)}}},th=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return tA(function(t,n){for(var r=0;r<e.length-1;r++){var i=e[r].compare(t[r],n[r]);if(0!==i)return i}return e[r].compare(t[r],n[r])})},tm=function(e){return tA(function(t,n){return e.compare(n,t)})},tg=function(e){return function(t){return tA(function(n,r){return t.compare(e(n),e(r))})}},ty=function(){return{concat:function(e,t){return tA(function(n,r){var i=e.compare(n,r);return 0!==i?i:t.compare(n,r)})}}},tv=function(){return{concat:ty().concat,empty:tA(function(){return 0})}},tx={URI:"Ord",contramap:function(e,t){return ev(e,tg(t))}},tb={equals:ef,compare:ed(0)},tC=function(e){return function(t,n){return -1===e.compare(t,n)}},tS=function(e){return function(t,n){return 1===e.compare(t,n)}},tw=function(e){return function(t,n){return t===n||1>e.compare(t,n)?t:n}},tI=function(e){return function(t,n){return t===n||e.compare(t,n)>-1?t:n}},t_=function(e){var t=tw(e),n=tI(e);return function(e,r){return function(i){return n(t(i,r),e)}}},tT={equals:tu.equals,compare:function(e,t){return e<t?-1:e>t?1:0}},tk=ev(tT,tg(function(e){return e.valueOf()}));let tO=Object.freeze(Object.defineProperty({__proto__:null,Contravariant:tx,URI:"Ord",between:function(e){var t=tC(e),n=tS(e);return function(e,r){return function(i){return!(t(i,e)||n(i,r))}}},clamp:t_,contramap:tg,equals:function(e){return function(t){return function(n){return n===t||0===e.compare(n,t)}}},equalsDefault:tp,fromCompare:tA,geq:function(e){return function(t,n){return -1!==e.compare(t,n)}},getDualOrd:tm,getMonoid:tv,getSemigroup:ty,getTupleOrd:th,gt:tS,leq:function(e){return function(t,n){return 1!==e.compare(t,n)}},lt:tC,max:tI,min:tw,ord:tx,ordBoolean:tT,ordDate:tk,ordNumber:tT,ordString:tT,reverse:tm,trivial:tb,tuple:th},Symbol.toStringTag,{value:"Module"}));var tR=function(e){return{concat:function(t,n){return e.concat(n,t)}}},tE=function(e){return function(t){return function(n){return n.reduce(function(t,n){return e.concat(t,n)},t)}}};let tj=Object.freeze(Object.defineProperty({__proto__:null,concatAll:tE,endo:function(e){return function(t){return{concat:function(n,r){return t.concat(e(n),e(r))}}}},filterFirst:function(e){return function(t){return{concat:function(n,r){return e(n)?t.concat(n,r):r}}}},filterSecond:function(e){return function(t){return{concat:function(n,r){return e(r)?t.concat(n,r):n}}}},reverse:tR},Symbol.toStringTag,{value:"Module"}));var tF=function(e){return{concat:tw(e)}},tM=function(e){return{concat:tI(e)}},tU=function(e){return{concat:function(){return e}}},tL=function(e){return{concat:function(t,n){var r={};for(var i in e)eK.call(e,i)&&(r[i]=e[i].concat(t[i],n[i]));return r}}},tK=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return{concat:function(t,n){return e.map(function(e,r){return e.concat(t[r],n[r])})}}},tB=function(e){return function(t){return{concat:function(n,r){return t.concat(n,t.concat(e,r))}}}},tP=function(){return{concat:ec}},tW=function(){return{concat:function(e,t){return t}}},tD=tU(void 0),tN={concat:function(e,t){return e&&t}},tq={concat:function(e,t){return e||t}},tQ={concat:function(e,t){return e+t}},tV={concat:function(e,t){return e+t}},tz={concat:function(e,t){return e*t}};let tY=Object.freeze(Object.defineProperty({__proto__:null,concatAll:tE,constant:tU,first:tP,fold:function(e){var t=tE(e);return function(e,n){return void 0===n?t(e):t(e)(n)}},getDualSemigroup:tR,getFirstSemigroup:tP,getFunctionSemigroup:ea,getIntercalateSemigroup:tB,getJoinSemigroup:tM,getLastSemigroup:tW,getMeetSemigroup:tF,getObjectSemigroup:function(){return{concat:function(e,t){return Object.assign({},e,t)}}},getStructSemigroup:tL,getTupleSemigroup:tK,intercalate:tB,last:tW,max:tM,min:tF,reverse:tR,semigroupAll:tN,semigroupAny:tq,semigroupProduct:tz,semigroupString:tQ,semigroupSum:tV,semigroupVoid:tD,struct:tL,tuple:tK},Symbol.toStringTag,{value:"Module"}));var tH=function(e,t,n){if(n||2==arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},tG=function(e,t){return e<0||e>=t.length},tZ=function(e){return function(t){return tH([e],t,!0)}},tJ=function(e){return function(t){return tH(tH([],t,!0),[e],!1)}},t$=function(e,t,n){if(ej(n)){var r=eB(n);return r.splice(e,0,t),r}return[t]},tX=function(e,t,n){if(n[e]===t)return n;var r=eB(n);return r[e]=t,r},t0=function(e){return function(t){if(1===t.length)return t;for(var n=[n6(t)],r=n5(t),i=function(t){n.every(function(n){return!e.equals(n,t)})&&n.push(t)},o=0;o<r.length;o++)i(r[o]);return n}},t1=function(e){if(ej(e)){var t=tv();return nn(e.reduce(t.concat,t.empty))}return ec},t2=function(e){var t=t0(e);return function(e){return function(n){return t(ev(n,ne(e)))}}},t6=function(e){return function(t){var n=t.length,r=Math.round(e)%n;if(tG(Math.abs(r),t)||0===r)return t;if(!(r<0))return t6(r-n)(t);var i=nl(-r)(t),o=i[0];return ev(i[1],ne(o))}},t5=function(e){return ej(e)?e_(e):eI},t3=function(e){return function(t){for(var n=Math.max(0,Math.floor(t)),r=[e(0)],i=1;i<n;i++)r.push(e(i));return r}},t9=function(e,t){return e<=t?t3(function(t){return e+t})(t-e+1):[e]},t4=function(e){return[n6(e),n5(e)]},t8=function(e){return[n9(e),n3(e)]};function t7(e){return function(t){return t.concat(e)}}function ne(e,t){return t?e.concat(t):function(t){return t.concat(e)}}function nt(e){return function(t){var n=t.length;if(0===n)return eU;for(var r=[],i=t[0],o=[i],a=1;a<n;a++){var u=t[a];e.equals(u,i)?o.push(u):(r.push(o),o=[i=u])}return r.push(o),r}}var nn=function(e){return function(t){return 1===t.length?t:t.slice().sort(e.compare)}},nr=function(e,t){return function(n){return tG(e,n)?eI:e_(tX(e,t(n[e]),n))}},ni=function(e,t,n){for(var r=[n(e[0],t[0])],i=Math.min(e.length,t.length),o=1;o<i;o++)r[o]=n(e[o],t[o]);return r},no=function(e){return function(t){for(var n=[e,t[0]],r=1;r<t.length;r++)n.push(e,t[r]);return n}},na=function(e){return function(t){var n=n5(t);return ej(n)?ev(n,no(e),tZ(n6(t))):t}},nu=function(e){return function(t){for(var n=eB(e(0,n6(t))),r=1;r<t.length;r++)n.push.apply(n,e(r,t[r]));return n}},ns=function(e){return function(t){for(var n=e(t),r=n[0],i=n[1],o=[r],a=i;ej(a);){var u=e(a),s=u[0],l=u[1];o.push(s),a=l}return o}},nl=function(e){return function(t){var n=Math.max(1,e);return n>=t.length?[t,eU]:[ev(t.slice(1,n),tZ(n6(t))),t.slice(n)]}},nc=function(e){return ns(nl(e))},nd=function(e,t){return ev(e,nj(t))},nf=function(e,t){return ev(e,nF(t))},np=function(e,t){return ev(e,nT(t))},nA=function(e,t){return ev(e,nk(t))},nh=function(e,t){return ev(e,nO(t))},nm=function(e,t,n){return ev(e,nM(t,n))},ng=function(e){var t=nU(e);return function(e,n){return ev(e,t(n))}},ny=function(e,t,n){return ev(e,nL(t,n))},nv=function(e){var t=nW(e);return function(e,n){return ev(e,t(n))}},nx=function(e,t){return ev(e,n_(t))},nb=function(e,t,n){return ev(e,nK(t,n))},nC=function(e){var t=nB(e);return function(e,n){return ev(e,t(n))}},nS=function(e,t,n){return ev(e,nP(t,n))},nw=function(e){var t=nN(e);return function(e,n){return ev(e,t(n))}},nI=function(e){return function(t){return ev(t,t7(e()))}},n_=nI,nT=function(e){return nk(function(t){return ev(e,nj(t))})},nk=function(e){return nu(function(t,n){return e(n)})},nO=function(e){return function(t){for(var n=n5(t),r=[e(t)];ej(n);)r.push(e(n)),n=n5(n);return r}},nR=nO(ec),nE=nk(ec),nj=function(e){return nF(function(t,n){return e(n)})},nF=function(e){return function(t){for(var n=[e(0,n6(t))],r=1;r<t.length;r++)n.push(e(r,t[r]));return n}},nM=function(e,t){return nK(e,function(e,n,r){return t(n,r)})},nU=function(e){return function(t){return function(n){return n.slice(1).reduce(function(n,r){return e.concat(n,t(r))},t(n[0]))}}},nL=function(e,t){return nP(e,function(e,n,r){return t(n,r)})},nK=function(e,t){return function(n){return n.reduce(function(e,n,r){return t(r,e,n)},e)}},nB=function(e){return function(t){return function(n){return n.slice(1).reduce(function(n,r,i){return e.concat(n,t(i+1,r))},t(0,n[0]))}}},nP=function(e,t){return function(n){return n.reduceRight(function(e,n,r){return t(r,n,e)},e)}},nW=function(e){var t=nN(e);return function(e){return t(function(t,n){return e(n)})}},nD=function(e){return nN(e)(ex)},nN=function(e){return function(t){return function(n){for(var r=e.map(t(0,n6(n)),eE),i=1;i<n.length;i++)r=e.ap(e.map(r,function(e){return function(t){return ev(e,tJ(t))}}),t(i,n[i]));return r}}},nq="ReadonlyNonEmptyArray",nQ=function(e){return{show:function(t){return"[".concat(t.map(e.show).join(", "),"]")}}},nV=function(e){return tr(function(t,n){return t.length===n.length&&t.every(function(t,r){return e.equals(t,n[r])})})},nz={URI:nq,map:nd},nY=eH(nz),nH={URI:nq,map:nd,ap:np},nG=eW(nH),nZ=eD(nH),nJ={URI:nq,map:nd,ap:np,chain:nA},n$=e1(nJ),nX=eE(eL),n0=eG(nz),n1=e2(nJ),n2=eN(nH),n6=eF,n5=eM,n3=function(e){return e[e.length-1]},n9=function(e){return e.slice(0,-1)},n4=function(e){var t=tF(e);return function(e){return e.reduce(t.concat)}},n8=function(e){var t=tM(e);return function(e){return e.reduce(t.concat)}},n7=function(e){return function(t){return t.reduce(e.concat)}},re=function(e){return function(t){return tH([e(n6(t))],n5(t),!0)}},rt=function(e){return function(t){return ev(n9(t),tJ(e(n3(t))))}},rn=function(e){var t=n7(e);return function(e){return em(na(e),t)}},rr=function(e){return function(t){return t5(t.filter(function(t,n){return e(n,t)}))}};function ri(e,t){return void 0===t?tZ(e):ev(t,tZ(e))}var ro=function(e,t){return ev(e,ne([t]))};let ra=Object.freeze(Object.defineProperty({__proto__:null,Alt:{URI:nq,map:nd,alt:nx},Applicative:{URI:nq,map:nd,ap:np,of:eE},Apply:nH,Chain:nJ,Comonad:{URI:nq,map:nd,extend:nh,extract:eF},Do:nX,Foldable:{URI:nq,reduce:nm,foldMap:ng,reduceRight:ny},FoldableWithIndex:{URI:nq,reduce:nm,foldMap:ng,reduceRight:ny,reduceWithIndex:nb,foldMapWithIndex:nC,reduceRightWithIndex:nS},Functor:nz,FunctorWithIndex:{URI:nq,map:nd,mapWithIndex:nf},Monad:{URI:nq,map:nd,ap:np,of:eE,chain:nA},Pointed:{URI:nq,of:eE},Traversable:{URI:nq,map:nd,reduce:nm,foldMap:ng,reduceRight:ny,traverse:nv,sequence:nD},TraversableWithIndex:{URI:nq,map:nd,mapWithIndex:nf,reduce:nm,foldMap:ng,reduceRight:ny,traverse:nv,sequence:nD,reduceWithIndex:nb,foldMapWithIndex:nC,reduceRightWithIndex:nS,traverseWithIndex:nw},URI:nq,alt:n_,altW:nI,ap:nT,apFirst:nG,apS:n2,apSecond:nZ,append:tJ,appendW:tJ,bind:n1,bindTo:n0,chain:nk,chainFirst:n$,chainWithIndex:nu,chop:ns,chunksOf:nc,concat:ne,concatAll:n7,concatW:t7,cons:ri,duplicate:nR,empty:eU,extend:nO,extract:eF,filter:function(e){return rr(function(t,n){return e(n)})},filterWithIndex:rr,flap:nY,flatten:nE,fold:n7,foldMap:nU,foldMapWithIndex:nB,fromArray:function(e){return t5(e.slice())},fromReadonlyArray:t5,getEq:nV,getSemigroup:function(){return{concat:ne}},getShow:nQ,getUnionSemigroup:function(e){var t=t2(e);return{concat:function(e,n){return t(n)(e)}}},group:nt,groupBy:function(e){return function(t){for(var n={},r=0;r<t.length;r++){var i=t[r],o=e(i);eK.call(n,o)?n[o].push(i):n[o]=[i]}return n}},groupSort:function(e){var t=nn(e),n=nt(e);return function(e){return ej(e)?n(t(e)):eU}},head:n6,init:n9,insertAt:function(e,t){return function(n){return e<0||e>n.length?eI:e_(t$(e,t,n))}},intercalate:rn,intersperse:na,isNonEmpty:ej,isOutOfBound:tG,last:n3,makeBy:t3,map:nj,mapWithIndex:nF,matchLeft:function(e){return function(t){return e(n6(t),n5(t))}},matchRight:function(e){return function(t){return e(n9(t),n3(t))}},max:n8,min:n4,modifyAt:nr,modifyHead:re,modifyLast:rt,of:eE,prepend:tZ,prependAll:no,prependToAll:no,prependW:tZ,range:t9,readonlyNonEmptyArray:{URI:nq,of:eE,map:nd,mapWithIndex:nf,ap:np,chain:nA,extend:nh,extract:eF,reduce:nm,foldMap:ng,reduceRight:ny,traverse:nv,sequence:nD,reduceWithIndex:nb,foldMapWithIndex:nC,reduceRightWithIndex:nS,traverseWithIndex:nw,alt:nx},reduce:nM,reduceRight:nL,reduceRightWithIndex:nP,reduceWithIndex:nK,replicate:function(e){return t3(function(){return e})},reverse:function(e){return 1===e.length?e:tH([n3(e)],e.slice(0,-1).reverse(),!0)},rotate:t6,sequence:nD,snoc:ro,sort:nn,sortBy:t1,splitAt:nl,tail:n5,traverse:nW,traverseWithIndex:nN,unappend:t8,uncons:t4,union:t2,uniq:t0,unprepend:t4,unsafeInsertAt:t$,unsafeUpdateAt:tX,unsnoc:t8,unzip:function(e){for(var t=[e[0][0]],n=[e[0][1]],r=1;r<e.length;r++)t[r]=e[r][0],n[r]=e[r][1];return[t,n]},updateAt:function(e,t){return nr(e,function(){return t})},updateHead:function(e){return re(function(){return e})},updateLast:function(e){return rt(function(){return e})},zip:function e(t,n){return void 0===n?function(n){return e(n,t)}:ni(t,n,function(e,t){return[e,t]})},zipWith:ni},Symbol.toStringTag,{value:"Module"}));var ru=function(e,t,n){if(n||2==arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},rs=function(e){return e.length>0},rl=function(e,t){return e<0||e>=t.length},rc=function(e){return function(t){return ru([e],t,!0)}},rd=function(e){return function(t){return ru(ru([],t,!0),[e],!1)}},rf=function(e,t,n){if(rs(n)){var r=ry(n);return r.splice(e,0,t),r}return[t]},rp=function(e,t,n){var r=ry(n);return r[e]=t,r},rA=function(e){return function(t){if(1===t.length)return rO(t);for(var n=[iy(t)],r=iv(t),i=function(t){n.every(function(n){return!e.equals(n,t)})&&n.push(t)},o=0;o<r.length;o++)i(r[o]);return n}},rh=function(e){if(rs(e)){var t=tv();return rT(e.reduce(t.concat,t.empty))}return rO},rm=function(e){var t=rA(e);return function(e){return function(n){return t(ev(n,rI(e)))}}},rg=function(e){return function(t){var n=t.length,r=Math.round(e)%n;if(rl(Math.abs(r),t)||0===r)return rO(t);if(!(r<0))return rg(r-n)(t);var i=rL(-r)(t),o=i[0];return ev(i[1],rI(o))}},ry=eB,rv=function(e){return rs(e)?e_(e):eI},rx=function(e){return function(t){for(var n=Math.max(0,Math.floor(t)),r=[e(0)],i=1;i<n;i++)r.push(e(i));return r}},rb=function(e,t){return e<=t?rx(function(t){return e+t})(t-e+1):[e]},rC=function(e){return[iy(e),iv(e)]},rS=function(e){return[ib(e),ix(e)]};function rw(e){return function(t){return t.concat(e)}}function rI(e,t){return t?e.concat(t):function(t){return t.concat(e)}}function r_(e){return function(t){var n=t.length;if(0===n)return[];for(var r=[],i=t[0],o=[i],a=1;a<n;a++){var u=t[a];e.equals(u,i)?o.push(u):(r.push(o),o=[i=u])}return r.push(o),r}}var rT=function(e){return function(t){return t.slice().sort(e.compare)}},rk=function(e,t){return function(n){return rl(e,n)?eI:e_(rp(e,t(n[e]),n))}},rO=ry,rR=function(e){return[e]},rE=function(e,t,n){for(var r=[n(e[0],t[0])],i=Math.min(e.length,t.length),o=1;o<i;o++)r[o]=n(e[o],t[o]);return r},rj=function(e){return function(t){for(var n=[e,t[0]],r=1;r<t.length;r++)n.push(e,t[r]);return n}},rF=function(e){return function(t){var n=iv(t);return rs(n)?ev(n,rj(e),rc(iy(t))):rO(t)}},rM=function(e){return function(t){for(var n=ry(e(0,iy(t))),r=1;r<t.length;r++)n.push.apply(n,e(r,t[r]));return n}},rU=function(e){return function(t){for(var n=e(t),r=n[0],i=n[1],o=[r],a=i;rs(a);){var u=e(a),s=u[0],l=u[1];o.push(s),a=l}return o}},rL=function(e){return function(t){var n=Math.max(1,e);return n>=t.length?[rO(t),[]]:[ev(t.slice(1,n),rc(iy(t))),t.slice(n)]}},rK=function(e){return rU(rL(e))},rB=function(e,t){return ev(e,r3(t))},rP=function(e,t){return ev(e,r9(t))},rW=function(e,t){return ev(e,r0(t))},rD=function(e,t){return ev(e,r1(t))},rN=function(e,t){return ev(e,r2(t))},rq=function(e,t,n){return ev(e,r4(t,n))},rQ=function(e){var t=nU(e);return function(e,n){return ev(e,t(n))}},rV=function(e,t,n){return ev(e,r7(t,n))},rz=function(e){var t=it(e);return function(e,n){return ev(e,t(n))}},rY=function(e,t){return ev(e,rX(t))},rH=function(e,t,n){return ev(e,r8(t,n))},rG=function(e){var t=nB(e);return function(e,n){return ev(e,t(n))}},rZ=function(e,t,n){return ev(e,ie(t,n))},rJ=function(e){var t=ii(e);return function(e,n){return ev(e,t(n))}},r$=function(e){return function(t){return ev(t,rw(e()))}},rX=r$,r0=function(e){return r1(function(t){return ev(e,r3(t))})},r1=function(e){return rM(function(t,n){return e(n)})},r2=function(e){return function(t){for(var n=iv(t),r=[e(t)];rs(n);)r.push(e(n)),n=iv(n);return r}},r6=r2(ec),r5=r1(ec),r3=function(e){return r9(function(t,n){return e(n)})},r9=function(e){return function(t){for(var n=[e(0,iy(t))],r=1;r<t.length;r++)n.push(e(r,t[r]));return n}},r4=nM,r8=nK,r7=nL,ie=nP,it=function(e){var t=ii(e);return function(e){return t(function(t,n){return e(n)})}},ir=function(e){return ii(e)(function(e,t){return t})},ii=function(e){return function(t){return function(n){for(var r=e.map(t(0,iy(n)),rR),i=1;i<n.length;i++)r=e.ap(e.map(r,function(e){return function(t){return ev(e,rd(t))}}),t(i,n[i]));return r}}},io="NonEmptyArray",ia={URI:io,map:rB},iu=eH(ia),is={URI:io,map:rB,ap:rW},il=eW(is),ic=eD(is),id={URI:io,map:rB,ap:rW,chain:rD},ip=e1(id),iA=rR(eL),ih=eG(ia),im=e2(id),ig=eN(is),iy=n6,iv=function(e){return e.slice(1)},ix=n3,ib=function(e){return e.slice(0,-1)},iC=function(e){return function(t){return ru([e(iy(t))],iv(t),!0)}},iS=function(e){return function(t){return ev(ib(t),rd(e(ix(t))))}},iw=function(e){return function(t){return rv(t.filter(function(t,n){return e(n,t)}))}};function iI(e,t){return void 0===t?rc(e):ev(t,rc(e))}var i_=function(e,t){return ev(e,rd(t))};let iT=Object.freeze(Object.defineProperty({__proto__:null,Alt:{URI:io,map:rB,alt:rY},Applicative:{URI:io,map:rB,ap:rW,of:rR},Apply:is,Chain:id,Comonad:{URI:io,map:rB,extend:rN,extract:n6},Do:iA,Foldable:{URI:io,reduce:rq,foldMap:rQ,reduceRight:rV},FoldableWithIndex:{URI:io,reduce:rq,foldMap:rQ,reduceRight:rV,reduceWithIndex:rH,foldMapWithIndex:rG,reduceRightWithIndex:rZ},Functor:ia,FunctorWithIndex:{URI:io,map:rB,mapWithIndex:rP},Monad:{URI:io,map:rB,ap:rW,of:rR,chain:rD},Pointed:{URI:io,of:rR},Traversable:{URI:io,map:rB,reduce:rq,foldMap:rQ,reduceRight:rV,traverse:rz,sequence:ir},TraversableWithIndex:{URI:io,map:rB,mapWithIndex:rP,reduce:rq,foldMap:rQ,reduceRight:rV,traverse:rz,sequence:ir,reduceWithIndex:rH,foldMapWithIndex:rG,reduceRightWithIndex:rZ,traverseWithIndex:rJ},URI:io,alt:rX,altW:r$,ap:r0,apFirst:il,apS:ig,apSecond:ic,append:rd,appendW:rd,bind:im,bindTo:ih,chain:r1,chainFirst:ip,chainWithIndex:rM,chop:rU,chunksOf:rK,concat:rI,concatAll:function(e){return function(t){return t.reduce(e.concat)}},concatW:rw,cons:iI,copy:rO,duplicate:r6,extend:r2,extract:n6,filter:function(e){return iw(function(t,n){return e(n)})},filterWithIndex:iw,flap:iu,flatten:r5,fold:n7,foldMap:nU,foldMapWithIndex:nB,fromArray:rv,fromReadonlyNonEmptyArray:ry,getEq:nV,getSemigroup:function(){return{concat:rI}},getShow:nQ,getUnionSemigroup:function(e){var t=rm(e);return{concat:function(e,n){return t(n)(e)}}},group:r_,groupBy:function(e){return function(t){for(var n={},r=0;r<t.length;r++){var i=t[r],o=e(i);eK.call(n,o)?n[o].push(i):n[o]=[i]}return n}},groupSort:function(e){var t=rT(e),n=r_(e);return function(e){return rs(e)?n(t(e)):[]}},head:iy,init:ib,insertAt:function(e,t){return function(n){return e<0||e>n.length?eI:e_(rf(e,t,n))}},intercalate:rn,intersperse:rF,isNonEmpty:rs,isOutOfBound:rl,last:ix,makeBy:rx,map:r3,mapWithIndex:r9,matchLeft:function(e){return function(t){return e(iy(t),iv(t))}},matchRight:function(e){return function(t){return e(ib(t),ix(t))}},max:n8,min:n4,modifyAt:rk,modifyHead:iC,modifyLast:iS,nonEmptyArray:{URI:io,of:rR,map:rB,mapWithIndex:rP,ap:rW,chain:rD,extend:rN,extract:n6,reduce:rq,foldMap:rQ,reduceRight:rV,traverse:rz,sequence:ir,reduceWithIndex:rH,foldMapWithIndex:rG,reduceRightWithIndex:rZ,traverseWithIndex:rJ,alt:rY},of:rR,prepend:rc,prependAll:rj,prependToAll:rj,prependW:rc,range:rb,reduce:r4,reduceRight:r7,reduceRightWithIndex:ie,reduceWithIndex:r8,replicate:function(e){return rx(function(){return e})},reverse:function(e){return ru([ix(e)],e.slice(0,-1).reverse(),!0)},rotate:rg,sequence:ir,snoc:i_,sort:rT,sortBy:rh,splitAt:rL,tail:iv,traverse:it,traverseWithIndex:ii,unappend:rS,uncons:rC,union:rm,uniq:rA,unprepend:rC,unsafeInsertAt:rf,unsafeUpdateAt:rp,unsnoc:rS,unzip:function(e){for(var t=[e[0][0]],n=[e[0][1]],r=1;r<e.length;r++)t[r]=e[r][0],n[r]=e[r][1];return[t,n]},updateAt:function(e,t){return rk(e,function(){return t})},updateHead:function(e){return iC(function(){return e})},updateLast:function(e){return iS(function(){return e})},zip:function e(t,n){return void 0===n?function(n){return e(n,t)}:rE(t,n,function(e,t){return[e,t]})},zipWith:rE},Symbol.toStringTag,{value:"Module"}));var ik={equals:function(e,t){return e===t}},iO={equals:ik.equals,compare:function(e,t){return e<t?-1:e>t?1:0}},iR={equals:ik.equals,compare:iO.compare,top:1/0,bottom:-1/0},iE={concat:function(e,t){return e-t}},ij={concat:function(e,t){return e+t}},iF={concat:function(e,t){return e*t}},iM={concat:ij.concat,empty:0},iU={concat:iF.concat,empty:1};let iL=Object.freeze(Object.defineProperty({__proto__:null,Bounded:iR,Eq:ik,Field:{add:ij.concat,zero:0,mul:iF.concat,one:1,sub:iE.concat,degree:function(e){return 1},div:function(e,t){return e/t},mod:function(e,t){return e%t}},MagmaSub:iE,MonoidProduct:iU,MonoidSum:iM,Ord:iO,SemigroupProduct:iF,SemigroupSum:ij,Show:{show:function(e){return JSON.stringify(e)}},isNumber:function(e){return"number"==typeof e}},Symbol.toStringTag,{value:"Module"}));var iK=function(e,t){return{left:e,right:t}},iB=function(e){return function(t){return iK(iQ(t),e(iV(t)))}},iP=function(e){return function(t){return iK(e(iQ(t)),iV(t))}},iW=function(e,t){return function(n){return iK(e(iQ(n)),t(iV(n)))}},iD="Separated",iN={URI:iD,map:function(e,t){return ev(e,iB(t))}},iq=eH(iN),iQ=function(e){return e.left},iV=function(e){return e.right};let iz=Object.freeze(Object.defineProperty({__proto__:null,Bifunctor:{URI:iD,mapLeft:function(e,t){return ev(e,iP(t))},bimap:function(e,t,n){return ev(e,iW(t,n))}},Functor:iN,URI:iD,bimap:iW,flap:iq,left:iQ,map:iB,mapLeft:iP,right:iV,separated:iK},Symbol.toStringTag,{value:"Module"}));function iY(e,t){return function(n){var r=e.traverse(n);return function(e,i){return n.map(r(e,i),t.separate)}}}function iH(e,t){return function(n){var r=e.traverse(n);return function(e,i){return n.map(r(e,i),t.compact)}}}function iG(e){return function(t){var n=e.wither(t);return function(e){return function(r){return n(r,function(n){return t.map(e(n),function(e){return e?e_(n):eI})})}}}}let iZ=Object.freeze(Object.defineProperty({__proto__:null,filterE:iG,wiltDefault:iY,witherDefault:iH},Symbol.toStringTag,{value:"Module"}));function iJ(e,t){return function(n){return n?t.of(void 0):e.zero()}}let i$=Object.freeze(Object.defineProperty({__proto__:null,guard:iJ},Symbol.toStringTag,{value:"Module"}));var iX=function(e,t,n){if(n||2==arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},i0=function(e){return 0===e.length},i1=function(e,t){return e<=0?aL:t3(t)(e)},i2=function(e){return eS(e)?aL:[e.value]},i6=function(e){return eT(e)?aL:[e.right]},i5=function(e,t){return function(n){return ej(n)?t(n):e()}},i3=function(e,t){return function(n){return ej(n)?t(n6(n),n5(n)):e()}},i9=function(e,t){return function(n){return ej(n)?t(n9(n),n3(n)):e()}},i4=function(e){return function(t){if(i0(t))return aL;for(var n=[],r=0;r<t.length;r++)n.push.apply(n,e(r,t[r]));return n}};function i8(e,t){return void 0===t?function(t){return i8(e,t)}:tG(e,t)?eI:e_(t[e])}var i7=function(e){return ej(e)?e_(n6(e)):eI},oe=function(e){return ej(e)?e_(n3(e)):eI},ot=function(e,t){for(var n=e.length,r=0;r<n&&t(e[r]);r++);return r},on=function(e){return function(t){for(var n=0;n<t.length;n++)if(e(t[n]))return e_(n);return eI}};function or(e){return function(t){for(var n=0;n<t.length;n++)if(e(t[n]))return e_(t[n]);return eI}}var oi=function(e){return function(t){for(var n=0;n<t.length;n++){var r=e(t[n]);if(ew(r))return r}return eI}};function oo(e){return function(t){for(var n=t.length-1;n>=0;n--)if(e(t[n]))return e_(t[n]);return eI}}var oa=function(e){return function(t){for(var n=t.length-1;n>=0;n--){var r=e(t[n]);if(ew(r))return r}return eI}},ou=function(e){return function(t){for(var n=t.length-1;n>=0;n--)if(e(t[n]))return e_(n);return eI}},ol=function(e,t){return function(n){return tG(e,n)?eI:e_(aM(e,t(n[e]),n))}},oc=function(e,t,n){for(var r=[],i=Math.min(e.length,t.length),o=0;o<i;o++)r[o]=n(e[o],t[o]);return r},od=function(e){var t=no(e);return function(e){return ej(e)?t(e):e}};function of(e){return function(t,n){if(void 0===n){var r,i=of(e);return function(e){return i(t,e)}}for(var o=0;o<n.length;o++)if(r=n[o],e.equals(r,t))return!0;return!1}}var op=function(e){return function(t){return e>=1&&ej(t)?nl(e)(t):i0(t)?[t,aL]:[aL,t]}},oA=function(e){return function(t){return i0(t)?e:i0(e)?t:t.concat(e)}};function oh(e){var t=t2(e);return function(n,r){if(void 0===r){var i=oh(e);return function(e){return i(e,n)}}return ej(n)&&ej(r)?t(r)(n):ej(n)?n:r}}function om(e){var t=of(e);return function(n,r){if(void 0===r){var i=om(e);return function(e){return i(e,n)}}return n.filter(function(e){return t(e,r)})}}function og(e){var t=of(e);return function(n,r){if(void 0===r){var i=og(e);return function(e){return i(e,n)}}return n.filter(function(e){return!t(e,r)})}}var oy=function(e,t){return ev(e,oH(t))},ov=function(e,t){return ev(e,oG(t))},ox=function(e,t){return ev(e,oV(t))},ob=function(e,t){return ev(e,oz(t))},oC=function(e,t){return ev(e,oJ(t))},oS=function(e,t){return ev(e,oX(t))},ow=function(e,t){return ev(e,o1(t))},oI=function(e,t){return ev(e,o6(t))},o_=function(e,t){return ev(e,o2(t))},oT=function(e,t){return ev(e,o5(t))},ok=function(e,t){return ev(e,oQ(t))},oO=function(e,t,n){return ev(e,o7(t,n))},oR=function(e){var t=ae(e);return function(e,n){return ev(e,t(n))}},oE=function(e,t,n){return ev(e,an(t,n))},oj=function(e,t,n){return ev(e,at(t,n))},oF=function(e){var t=o8(e);return function(e,n){return ev(e,t(n))}},oM=function(e,t,n){return ev(e,ar(t,n))},oU=function(e,t){return ev(e,o$(t))},oL=function(e,t){return ev(e,o3(t))},oK=function(e,t){return ev(e,o9(t))},oB=function(e){var t=ai(e);return function(e,n){return ev(e,t(n))}},oP=function(e){var t=aa(e);return function(e,n){return ev(e,t(n))}},oW=function(e,t){return ev(e,a_(t))},oD=function(e,t){return ev(e,aT(t))},oN=function(){return aL},oq=function(e){return function(t){return t.concat(e())}},oQ=oq,oV=function(e){return oz(function(t){return ev(e,oH(t))})},oz=function(e){return function(t){return ev(t,i4(function(t,n){return e(n)}))}},oY=oz(ec),oH=function(e){return function(t){return t.map(function(t){return e(t)})}},oG=function(e){return function(t){return t.map(function(t,n){return e(n,t)})}},oZ=function(e){for(var t=[],n=[],r=0;r<e.length;r++){var i=e[r];"Left"===i._tag?t.push(i.left):n.push(i.right)}return iK(t,n)},oJ=function(e){return function(t){return t.filter(e)}},o$=function(e){return function(t){for(var n=[],r=0;r<t.length;r++){var i=e(r,t[r]);ew(i)&&n.push(i.value)}return n}},oX=function(e){return o$(function(t,n){return e(n)})},o0=oX(ec),o1=function(e){return o2(function(t,n){return e(n)})},o2=function(e){return function(t){for(var n=[],r=[],i=0;i<t.length;i++){var o=t[i];e(i,o)?r.push(o):n.push(o)}return iK(n,r)}},o6=function(e){return o5(function(t,n){return e(n)})},o5=function(e){return function(t){for(var n=[],r=[],i=0;i<t.length;i++){var o=e(i,t[i]);"Left"===o._tag?n.push(o.left):r.push(o.right)}return iK(n,r)}},o3=function(e){return function(t){return t.filter(function(t,n){return e(n,t)})}},o9=function(e){return function(t){return t.map(function(n,r){return e(t.slice(r))})}},o4=o9(ec),o8=function(e){return function(t){return function(n){return n.reduce(function(n,r,i){return e.concat(n,t(i,r))},e.empty)}}},o7=function(e,t){return at(e,function(e,n,r){return t(n,r)})},ae=function(e){var t=o8(e);return function(e){return t(function(t,n){return e(n)})}},at=function(e,t){return function(n){for(var r=n.length,i=e,o=0;o<r;o++)i=t(o,i,n[o]);return i}},an=function(e,t){return ar(e,function(e,n,r){return t(n,r)})},ar=function(e,t){return function(n){return n.reduceRight(function(e,n,r){return t(r,n,e)},e)}},ai=function(e){var t=aa(e);return function(e){return t(function(t,n){return e(n)})}},ao=function(e){return function(t){return oO(t,e.of(oN()),function(t,n){return e.ap(e.map(t,function(e){return function(t){return ev(e,tJ(t))}}),n)})}},aa=function(e){return function(t){return at(e.of(oN()),function(n,r,i){return e.ap(e.map(r,function(e){return function(t){return ev(e,tJ(t))}}),t(n,i))})}},au=function(e,t){for(var n=[],r=e;;){var i=t(r);if(ew(i)){var o=i.value,a=o[0],u=o[1];n.push(a),r=u}else break}return n},as="ReadonlyArray",al=function(e){return{show:function(t){return"[".concat(t.map(e.show).join(", "),"]")}}},ac=function(){return{concat:function(e,t){return i0(e)?t:i0(t)?e:e.concat(t)}}},ad=function(e){return tr(function(t,n){return t.length===n.length&&t.every(function(t,r){return e.equals(t,n[r])})})},af=function(e){return tA(function(t,n){for(var r=t.length,i=n.length,o=Math.min(r,i),a=0;a<o;a++){var u=e.compare(t[a],n[a]);if(0!==u)return u}return iO.compare(r,i)})},ap=function(e){var t=oh(e);return{concat:function(e,n){return t(n)(e)}}},aA={URI:as,map:oy},ah=eH(aA),am={URI:as,of:eE},ag={URI:as,map:oy,ap:ox},ay=eW(ag),av=eD(ag),ax={URI:as,map:oy,ap:ox,chain:ob},ab=e1(ax),aC={URI:as,zero:oN},aS=iJ(aC,am),aw={URI:as,compact:o0,separate:oZ},aI={URI:as,map:oy,reduce:oO,foldMap:oR,reduceRight:oE,traverse:oB,sequence:ao},a_=function(e){return function(t){for(var n=iX([],e(t),!0),r=[];n.length>0;){var i=n.shift();eT(i)?n.unshift.apply(n,e(i.left)):r.push(i.right)}return r}},aT=function(e){return function(t){var n=e(t),r=[],i=[];function o(t){eT(t)?e(t.left).forEach(function(e){return r.push(e)}):i.push(t.right)}for(var a=0;a<n.length;a++)o(n[a]);for(;r.length>0;)o(r.shift());return i}},ak=iH(aI,aw),aO=iY(aI,aw),aR={URI:as,map:oy,compact:o0,separate:oZ,filter:oC,filterMap:oS,partition:ow,partitionMap:oI,reduce:oO,foldMap:oR,reduceRight:oE,traverse:oB,sequence:ao,wither:ak,wilt:aO},aE=iG(aR),aj={URI:as,fromEither:i6},aF=e8(aj),aM=function(e,t,n){return ej(n)?tX(e,t,n):n},aU=function(e,t){var n=t.slice();return n.splice(e,1),n},aL=eU;function aK(e){return function(t){return t.every(e)}}var aB=function(e){return function(t){return t.some(e)}},aP=function(e){var t=rn(e);return function(n){return i5(function(){return e.empty},t(n))}},aW=eE(eL),aD=eG(aA),aN=e2(ax),aq=eN(ag);let aQ=Object.freeze(Object.defineProperty({__proto__:null,Alt:{URI:as,map:oy,alt:ok},Alternative:{URI:as,map:oy,ap:ox,of:eE,alt:ok,zero:oN},Applicative:{URI:as,map:oy,ap:ox,of:eE},Apply:ag,Chain:ax,ChainRecBreadthFirst:{URI:as,map:oy,ap:ox,chain:ob,chainRec:oD},ChainRecDepthFirst:{URI:as,map:oy,ap:ox,chain:ob,chainRec:oW},Compactable:aw,Do:aW,Extend:{URI:as,map:oy,extend:oK},Filterable:{URI:as,map:oy,compact:o0,separate:oZ,filter:oC,filterMap:oS,partition:ow,partitionMap:oI},FilterableWithIndex:{URI:as,map:oy,mapWithIndex:ov,compact:o0,separate:oZ,filter:oC,filterMap:oS,partition:ow,partitionMap:oI,partitionMapWithIndex:oT,partitionWithIndex:o_,filterMapWithIndex:oU,filterWithIndex:oL},Foldable:{URI:as,reduce:oO,foldMap:oR,reduceRight:oE},FoldableWithIndex:{URI:as,reduce:oO,foldMap:oR,reduceRight:oE,reduceWithIndex:oj,foldMapWithIndex:oF,reduceRightWithIndex:oM},FromEither:aj,Functor:aA,FunctorWithIndex:{URI:as,map:oy,mapWithIndex:ov},Monad:{URI:as,map:oy,ap:ox,of:eE,chain:ob},Pointed:am,Traversable:aI,TraversableWithIndex:{URI:as,map:oy,mapWithIndex:ov,reduce:oO,foldMap:oR,reduceRight:oE,reduceWithIndex:oj,foldMapWithIndex:oF,reduceRightWithIndex:oM,traverse:oB,sequence:ao,traverseWithIndex:oP},URI:as,Unfoldable:{URI:as,unfold:au},Witherable:aR,Zero:aC,_chainRecBreadthFirst:oD,_chainRecDepthFirst:oW,alt:oQ,altW:oq,ap:oV,apFirst:ay,apS:aq,apSecond:av,append:tJ,appendW:tJ,bind:aN,bindTo:aD,chain:oz,chainFirst:ab,chainRecBreadthFirst:aT,chainRecDepthFirst:a_,chainWithIndex:i4,chop:function(e){var t=ns(e);return function(e){return ej(e)?t(e):aL}},chunksOf:function(e){var t=nc(e);return function(e){return ej(e)?t(e):aL}},compact:o0,comprehension:function(e,t,n){void 0===n&&(n=function(){return!0});var r=function(e,i){return ej(i)?ev(n6(i),oz(function(t){return r(ev(e,tJ(t)),n5(i))})):n.apply(void 0,e)?[t.apply(void 0,e)]:aL};return r(aL,e)},concat:oA,concatW:oA,cons:ri,deleteAt:function(e){return function(t){return tG(e,t)?eI:e_(aU(e,t))}},difference:og,dropLeft:function(e){return function(t){return e<=0||i0(t)?t:e>=t.length?aL:t.slice(e,t.length)}},dropLeftWhile:function(e){return function(t){var n=ot(t,e);return 0===n?t:n===t.length?aL:t.slice(n)}},dropRight:function(e){return function(t){return e<=0||i0(t)?t:e>=t.length?aL:t.slice(0,t.length-e)}},duplicate:o4,elem:of,empty:aL,every:aK,exists:aB,extend:o9,filter:oJ,filterE:aE,filterMap:oX,filterMapWithIndex:o$,filterWithIndex:o3,findFirst:or,findFirstMap:oi,findIndex:on,findLast:oo,findLastIndex:ou,findLastMap:oa,flap:ah,flatten:oY,foldLeft:i3,foldMap:ae,foldMapWithIndex:o8,foldRight:i9,fromArray:function(e){return i0(e)?aL:e.slice()},fromEither:i6,fromEitherK:aF,fromOption:i2,fromOptionK:function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return i2(e.apply(void 0,t))}},fromPredicate:function(e){return function(t){return e(t)?[t]:aL}},getDifferenceMagma:function(e){var t=og(e);return{concat:function(e,n){return t(n)(e)}}},getEq:ad,getIntersectionSemigroup:function(e){var t=om(e);return{concat:function(e,n){return t(n)(e)}}},getMonoid:function(){return{concat:ac().concat,empty:aL}},getOrd:af,getSemigroup:ac,getShow:al,getUnionMonoid:function(e){return{concat:ap(e).concat,empty:aL}},getUnionSemigroup:ap,guard:aS,head:i7,init:function(e){return ej(e)?e_(n9(e)):eI},insertAt:function(e,t){return function(n){return e<0||e>n.length?eI:e_(t$(e,t,n))}},intercalate:aP,intersection:om,intersperse:function(e){var t=na(e);return function(e){return ej(e)?t(e):e}},isEmpty:i0,isNonEmpty:ej,isOutOfBound:tG,last:oe,lefts:function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];"Left"===r._tag&&t.push(r.left)}return t},lookup:i8,makeBy:i1,map:oH,mapWithIndex:oG,match:i5,matchLeft:i3,matchLeftW:i3,matchRight:i9,matchRightW:i9,matchW:i5,modifyAt:ol,of:eE,partition:o1,partitionMap:o6,partitionMapWithIndex:o5,partitionWithIndex:o2,prepend:tZ,prependAll:od,prependToAll:od,prependW:tZ,range:t9,readonlyArray:{URI:as,compact:o0,separate:oZ,map:oy,ap:ox,of:eE,chain:ob,filter:oC,filterMap:oS,partition:ow,partitionMap:oI,mapWithIndex:ov,partitionMapWithIndex:oT,partitionWithIndex:o_,filterMapWithIndex:oU,filterWithIndex:oL,alt:ok,zero:oN,unfold:au,reduce:oO,foldMap:oR,reduceRight:oE,traverse:oB,sequence:ao,reduceWithIndex:oj,foldMapWithIndex:oF,reduceRightWithIndex:oM,traverseWithIndex:oP,extend:oK,wither:ak,wilt:aO},reduce:o7,reduceRight:an,reduceRightWithIndex:ar,reduceWithIndex:at,replicate:function(e,t){return i1(e,function(){return t})},reverse:function(e){return e.length<=1?e:e.slice().reverse()},rights:function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];"Right"===r._tag&&t.push(r.right)}return t},rotate:function(e){var t=t6(e);return function(e){return ej(e)?t(e):e}},scanLeft:function(e,t){return function(n){var r=n.length,i=Array(r+1);i[0]=e;for(var o=0;o<r;o++)i[o+1]=t(i[o],n[o]);return i}},scanRight:function(e,t){return function(n){var r=n.length,i=Array(r+1);i[r]=e;for(var o=r-1;o>=0;o--)i[o]=t(n[o],i[o+1]);return i}},separate:oZ,sequence:ao,size:function(e){return e.length},snoc:ro,some:aB,sort:function(e){return function(t){return t.length<=1?t:t.slice().sort(e.compare)}},sortBy:function(e){var t=t1(e);return function(e){return ej(e)?t(e):e}},spanLeft:function(e){return function(t){var n=op(ot(t,e))(t);return{init:n[0],rest:n[1]}}},splitAt:op,tail:function(e){return ej(e)?e_(n5(e)):eI},takeLeft:function(e){return function(t){return tG(e,t)?t:0===e?aL:t.slice(0,e)}},takeLeftWhile:function(e){return function(t){for(var n=[],r=0;r<t.length;r++){var i=t[r];if(!e(i))break;n.push(i)}var o=n.length;return o===t.length?t:0===o?aL:n}},takeRight:function(e){return function(t){return tG(e,t)?t:0===e?aL:t.slice(-e)}},toArray:function(e){return e.slice()},traverse:ai,traverseWithIndex:aa,unfold:au,union:oh,uniq:function(e){var t=t0(e);return function(e){return ej(e)?t(e):e}},unsafeDeleteAt:aU,unsafeInsertAt:t$,unsafeUpdateAt:aM,unzip:function(e){for(var t=[],n=[],r=0;r<e.length;r++)t[r]=e[r][0],n[r]=e[r][1];return[t,n]},updateAt:function(e,t){return ol(e,function(){return t})},wilt:function(e){var t=aO(e);return function(e){return function(n){return t(n,e)}}},wither:function(e){var t=ak(e);return function(e){return function(n){return t(n,e)}}},zero:oN,zip:function e(t,n){return void 0===n?function(n){return e(n,t)}:oc(t,n,function(e,t){return[e,t]})},zipWith:oc},Symbol.toStringTag,{value:"Module"}));var aV=function(e){return 0===e.length},az=function(e,t){return e<=0?[]:rx(t)(e)},aY=function(e){return eS(e)?[]:[e.value]},aH=function(e){return eT(e)?[]:[e.right]},aG=function(e,t){return function(n){return rs(n)?t(n):e()}},aZ=function(e,t){return function(n){return rs(n)?t(iy(n),iv(n)):e()}},aJ=function(e,t){return function(n){return rs(n)?t(ib(n),ix(n)):e()}},a$=function(e){return function(t){for(var n=[],r=0;r<t.length;r++)n.push.apply(n,e(r,t[r]));return n}},aX=function(e,t){for(var n=e.length,r=0;r<n&&t(e[r]);r++);return r},a0=function(e){return e.slice()},a1=function(e,t){return function(n){return rl(e,n)?eI:e_(sc(e,t(n[e]),n))}},a2=function(e,t,n){for(var r=[],i=Math.min(e.length,t.length),o=0;o<i;o++)r[o]=n(e[o],t[o]);return r},a6=function(e){var t=rj(e);return function(e){return rs(e)?t(e):[]}},a5=function(e){return function(t){return e>=1&&rs(t)?rL(e)(t):aV(t)?[a0(t),[]]:[[],a0(t)]}},a3=function(e){return function(t){return aV(t)?a0(e):aV(e)?a0(t):t.concat(e)}};function a9(e){var t=rm(e);return function(n,r){if(void 0===r){var i=a9(e);return function(e){return i(e,n)}}return rs(n)&&rs(r)?t(r)(n):rs(n)?a0(n):a0(r)}}function a4(e){var t=of(e);return function(n,r){if(void 0===r){var i=a4(e);return function(e){return i(e,n)}}return n.filter(function(e){return t(e,r)})}}function a8(e){var t=of(e);return function(n,r){if(void 0===r){var i=a8(e);return function(e){return i(e,n)}}return n.filter(function(e){return!t(e,r)})}}var a7=function(e,t){return ev(e,uC(t))},ue=function(e,t){return ev(e,u_(t))},ut=function(e,t){return ev(e,uS(t))},un=function(e,t){return ev(e,uw(t))},ur=function(e,t){return ev(e,uE(t))},ui=function(e,t){return ev(e,uk(t))},uo=function(e,t){return ev(e,uj(t))},ua=function(e,t){return ev(e,uM(t))},uu=function(e,t){return ev(e,uF(t))},us=function(e,t){return ev(e,uU(t))},ul=function(e,t){return ev(e,uK(t))},uc=function(e,t,n){return ev(e,uq(t,n))},ud=function(e){var t=uD(e);return function(e,n){return ev(e,t(n))}},uf=function(e,t,n){return ev(e,uV(t,n))},up=function(e,t,n){return ev(e,uQ(t,n))},uA=function(e){var t=uN(e);return function(e,n){return ev(e,t(n))}},uh=function(e,t,n){return ev(e,uz(t,n))},um=function(e,t){return ev(e,uT(t))},ug=function(e,t){return ev(e,uB(t))},uy=function(e,t){return ev(e,uP(t))},uv=function(e){var t=uY(e);return function(e,n){return ev(e,t(n))}},ux=function(e){var t=uG(e);return function(e,n){return ev(e,t(n))}},ub=function(){return[]},uC=function(e){return function(t){return t.map(function(t){return e(t)})}},uS=function(e){return uw(function(t){return ev(e,uC(t))})},uw=function(e){return function(t){return ev(t,a$(function(t,n){return e(n)}))}},uI=uw(ec),u_=function(e){return function(t){return t.map(function(t,n){return e(n,t)})}},uT=function(e){return function(t){for(var n=[],r=0;r<t.length;r++){var i=e(r,t[r]);ew(i)&&n.push(i.value)}return n}},uk=function(e){return uT(function(t,n){return e(n)})},uO=uk(ec),uR=function(e){for(var t=[],n=[],r=0;r<e.length;r++){var i=e[r];"Left"===i._tag?t.push(i.left):n.push(i.right)}return iK(t,n)},uE=function(e){return function(t){return t.filter(e)}},uj=function(e){return uF(function(t,n){return e(n)})},uF=function(e){return function(t){for(var n=[],r=[],i=0;i<t.length;i++){var o=t[i];e(i,o)?r.push(o):n.push(o)}return iK(n,r)}},uM=function(e){return uU(function(t,n){return e(n)})},uU=function(e){return function(t){for(var n=[],r=[],i=0;i<t.length;i++){var o=e(i,t[i]);"Left"===o._tag?n.push(o.left):r.push(o.right)}return iK(n,r)}},uL=function(e){return function(t){return t.concat(e())}},uK=uL,uB=function(e){return function(t){return t.filter(function(t,n){return e(n,t)})}},uP=function(e){return function(t){return t.map(function(n,r){return e(t.slice(r))})}},uW=uP(ec),uD=ae,uN=o8,uq=o7,uQ=at,uV=an,uz=ar,uY=function(e){var t=uG(e);return function(e){return t(function(t,n){return e(n)})}},uH=function(e){return function(t){return uc(t,e.of(ub()),function(t,n){return e.ap(e.map(t,function(e){return function(t){return ev(e,rd(t))}}),n)})}},uG=function(e){return function(t){return uQ(e.of(ub()),function(n,r,i){return e.ap(e.map(r,function(e){return function(t){return ev(e,rd(t))}}),t(n,i))})}},uZ=function(e,t){for(var n=[],r=e;;){var i=t(r);if(ew(i)){var o=i.value,a=o[0],u=o[1];n.push(a),r=u}else break}return n},uJ="Array",u$=function(){return{concat:function(e,t){return e.concat(t)}}},uX=function(){return{concat:u$().concat,empty:[]}},u0=function(e){var t=a9(e);return{concat:function(e,n){return t(n)(e)}}},u1={URI:uJ,map:a7},u2=eH(u1),u6={URI:uJ,of:rR},u5={URI:uJ,map:a7,ap:ut},u3=eW(u5),u9=eD(u5),u4={URI:uJ,map:a7,ap:ut,chain:un},u8=e1(u4),u7={URI:uJ,zero:ub},se=iJ(u7,u6),st={URI:uJ,compact:uO,separate:uR},sn={URI:uJ,reduce:uc,foldMap:ud,reduceRight:uf},sr={URI:uJ,map:a7,reduce:uc,foldMap:ud,reduceRight:uf,traverse:uv,sequence:uH},si=iH(sr,st),so=iY(sr,st),sa={URI:uJ,map:a7,compact:uO,separate:uR,filter:ur,filterMap:ui,partition:uo,partitionMap:ua,reduce:uc,foldMap:ud,reduceRight:uf,traverse:uv,sequence:uH,wither:si,wilt:so},su=iG(sa),ss={URI:uJ,fromEither:aH},sl=e8(ss),sc=function(e,t,n){return rs(n)?rp(e,t,n):[]},sd=function(e,t){var n=t.slice();return n.splice(e,1),n},sf=function(e){return function(t){return t.some(e)}},sp=rR(eL),sA=eG(u1),sh=e2(u4),sm=eN(u5);let sg=Object.freeze(Object.defineProperty({__proto__:null,Alt:{URI:uJ,map:a7,alt:ul},Alternative:{URI:uJ,map:a7,ap:ut,of:rR,alt:ul,zero:ub},Applicative:{URI:uJ,map:a7,ap:ut,of:rR},Apply:u5,Chain:u4,ChainRecBreadthFirst:{URI:uJ,map:a7,ap:ut,chain:un,chainRec:oD},ChainRecDepthFirst:{URI:uJ,map:a7,ap:ut,chain:un,chainRec:oW},Compactable:st,Do:sp,Extend:{URI:uJ,map:a7,extend:uy},Filterable:{URI:uJ,map:a7,compact:uO,separate:uR,filter:ur,filterMap:ui,partition:uo,partitionMap:ua},FilterableWithIndex:{URI:uJ,map:a7,mapWithIndex:ue,compact:uO,separate:uR,filter:ur,filterMap:ui,partition:uo,partitionMap:ua,partitionMapWithIndex:us,partitionWithIndex:uu,filterMapWithIndex:um,filterWithIndex:ug},Foldable:sn,FoldableWithIndex:{URI:uJ,reduce:uc,foldMap:ud,reduceRight:uf,reduceWithIndex:up,foldMapWithIndex:uA,reduceRightWithIndex:uh},FromEither:ss,Functor:u1,FunctorWithIndex:{URI:uJ,map:a7,mapWithIndex:ue},Monad:{URI:uJ,map:a7,ap:ut,of:rR,chain:un},Pointed:u6,Traversable:sr,TraversableWithIndex:{URI:uJ,map:a7,mapWithIndex:ue,reduce:uc,foldMap:ud,reduceRight:uf,reduceWithIndex:up,foldMapWithIndex:uA,reduceRightWithIndex:uh,traverse:uv,sequence:uH,traverseWithIndex:ux},URI:uJ,Unfoldable:{URI:uJ,unfold:uZ},Witherable:sa,Zero:u7,alt:uK,altW:uL,ap:uS,apFirst:u3,apS:sm,apSecond:u9,append:rd,appendW:rd,array:{URI:uJ,compact:uO,separate:uR,map:a7,ap:ut,of:rR,chain:un,filter:ur,filterMap:ui,partition:uo,partitionMap:ua,mapWithIndex:ue,partitionMapWithIndex:us,partitionWithIndex:uu,filterMapWithIndex:um,filterWithIndex:ug,alt:ul,zero:ub,unfold:uZ,reduce:uc,foldMap:ud,reduceRight:uf,traverse:uv,sequence:uH,reduceWithIndex:up,foldMapWithIndex:uA,reduceRightWithIndex:uh,traverseWithIndex:ux,extend:uy,wither:si,wilt:so},bind:sh,bindTo:sA,chain:uw,chainFirst:u8,chainRecBreadthFirst:aT,chainRecDepthFirst:a_,chainWithIndex:a$,chop:function(e){var t=rU(e);return function(e){return rs(e)?t(e):[]}},chunksOf:function(e){var t=rK(e);return function(e){return rs(e)?t(e):[]}},compact:uO,comprehension:function(e,t,n){void 0===n&&(n=function(){return!0});var r=function(e,i){return rs(i)?ev(iy(i),uw(function(t){return r(ev(e,rd(t)),iv(i))})):n.apply(void 0,e)?[t.apply(void 0,e)]:[]};return r([],e)},concat:a3,concatW:a3,cons:iI,copy:a0,deleteAt:function(e){return function(t){return rl(e,t)?eI:e_(sd(e,t))}},difference:a8,dropLeft:function(e){return function(t){return e<=0||aV(t)?a0(t):e>=t.length?[]:t.slice(e,t.length)}},dropLeftWhile:function(e){return function(t){return t.slice(aX(t,e))}},dropRight:function(e){return function(t){return e<=0||aV(t)?a0(t):e>=t.length?[]:t.slice(0,t.length-e)}},duplicate:uW,elem:of,empty:[],every:aK,exists:sf,extend:uP,filter:uE,filterE:su,filterMap:uk,filterMapWithIndex:uT,filterWithIndex:uB,findFirst:function(e){return or(e)},findFirstMap:oi,findIndex:on,findLast:function(e){return oo(e)},findLastIndex:ou,findLastMap:oa,flap:u2,flatten:uI,foldLeft:aZ,foldMap:uD,foldMapWithIndex:uN,foldRight:aJ,fromEither:aH,fromEitherK:sl,fromOption:aY,fromOptionK:function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return aY(e.apply(void 0,t))}},fromPredicate:function(e){return function(t){return e(t)?[t]:[]}},getDifferenceMagma:function(e){var t=a8(e);return{concat:function(e,n){return t(n)(e)}}},getEq:ad,getIntersectionSemigroup:function(e){var t=a4(e);return{concat:function(e,n){return t(n)(e)}}},getMonoid:uX,getOrd:af,getSemigroup:u$,getShow:al,getUnionMonoid:function(e){return{concat:u0(e).concat,empty:[]}},getUnionSemigroup:u0,guard:se,head:i7,init:function(e){return rs(e)?e_(ib(e)):eI},insertAt:function(e,t){return function(n){return e<0||e>n.length?eI:e_(rf(e,t,n))}},intercalate:aP,intersection:a4,intersperse:function(e){var t=rF(e);return function(e){return rs(e)?t(e):a0(e)}},isEmpty:aV,isNonEmpty:rs,isOutOfBound:rl,last:oe,lefts:function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];"Left"===r._tag&&t.push(r.left)}return t},lookup:i8,makeBy:az,map:uC,mapWithIndex:u_,match:aG,matchLeft:aZ,matchLeftW:aZ,matchRight:aJ,matchRightW:aJ,matchW:aG,modifyAt:a1,of:rR,partition:uj,partitionMap:uM,partitionMapWithIndex:uU,partitionWithIndex:uF,prepend:rc,prependAll:a6,prependToAll:a6,prependW:rc,range:rb,reduce:uq,reduceRight:uV,reduceRightWithIndex:uz,reduceWithIndex:uQ,replicate:function(e,t){return az(e,function(){return t})},reverse:function(e){return aV(e)?[]:e.slice().reverse()},rights:function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];"Right"===r._tag&&t.push(r.right)}return t},rotate:function(e){var t=rg(e);return function(e){return rs(e)?t(e):a0(e)}},scanLeft:function(e,t){return function(n){var r=n.length,i=Array(r+1);i[0]=e;for(var o=0;o<r;o++)i[o+1]=t(i[o],n[o]);return i}},scanRight:function(e,t){return function(n){var r=n.length,i=Array(r+1);i[r]=e;for(var o=r-1;o>=0;o--)i[o]=t(n[o],i[o+1]);return i}},separate:uR,sequence:uH,size:function(e){return e.length},snoc:i_,some:sf,sort:function(e){return function(t){return t.length<=1?a0(t):t.slice().sort(e.compare)}},sortBy:function(e){var t=rh(e);return function(e){return rs(e)?t(e):a0(e)}},spanLeft:function(e){return function(t){var n=a5(aX(t,e))(t);return{init:n[0],rest:n[1]}}},splitAt:a5,tail:function(e){return rs(e)?e_(iv(e)):eI},takeLeft:function(e){return function(t){return rl(e,t)?a0(t):t.slice(0,e)}},takeLeftWhile:function(e){return function(t){for(var n=[],r=0;r<t.length;r++){var i=t[r];if(!e(i))break;n.push(i)}return n}},takeRight:function(e){return function(t){return rl(e,t)?a0(t):0===e?[]:t.slice(-e)}},traverse:uY,traverseWithIndex:uG,unfold:uZ,union:a9,uniq:function(e){var t=rA(e);return function(e){return rs(e)?t(e):a0(e)}},unsafeDeleteAt:sd,unsafeInsertAt:rf,unsafeUpdateAt:sc,unzip:function(e){for(var t=[],n=[],r=0;r<e.length;r++)t[r]=e[r][0],n[r]=e[r][1];return[t,n]},updateAt:function(e,t){return a1(e,function(){return t})},wilt:function(e){var t=so(e);return function(e){return function(n){return t(n,e)}}},wither:function(e){var t=si(e);return function(e){return function(n){return t(n,e)}}},zero:ub,zip:function e(t,n){return void 0===n?function(n){return e(n,t)}:a2(t,n,function(e,t){return[e,t]})},zipWith:a2},Symbol.toStringTag,{value:"Module"})),sy=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var sv=function(e,t){return function(n){return n?t():e()}},sx={equals:function(e,t){return e===t}},sb={concat:function(e,t){return e&&t}},sC={concat:function(e,t){return e||t}},sS={concat:sb.concat,empty:!0},sw={concat:sC.concat,empty:!1},sI={equals:sx.equals,compare:function(e,t){return e<t?-1:e>t?1:0}};let s_=Object.freeze(Object.defineProperty({__proto__:null,BooleanAlgebra:{meet:function(e,t){return e&&t},join:function(e,t){return e||t},zero:!1,one:!0,implies:function(e,t){return!e||t},not:function(e){return!e}},Eq:sx,MonoidAll:sS,MonoidAny:sw,Ord:sI,SemigroupAll:sb,SemigroupAny:sC,Show:{show:function(e){return JSON.stringify(e)}},fold:sv,foldW:sv,isBoolean:function(e){return"boolean"==typeof e},match:sv,matchW:sv},Symbol.toStringTag,{value:"Module"}));var sT=function(e){return{meet:function(t,n){return e.join(t,n)},join:function(t,n){return e.meet(t,n)},zero:e.one,one:e.zero,implies:function(t,n){return e.join(e.not(t),n)},not:e.not}};let sk=Object.freeze(Object.defineProperty({__proto__:null,booleanAlgebraBoolean:{meet:function(e,t){return e&&t},join:function(e,t){return e||t},zero:!1,one:!0,implies:function(e,t){return!e||t},not:function(e){return!e}},booleanAlgebraVoid:{meet:function(){},join:function(){},zero:void 0,one:void 0,implies:function(){},not:function(){}},getDualBooleanAlgebra:sT,getFunctionBooleanAlgebra:eo,reverse:sT},Symbol.toStringTag,{value:"Module"})),sO=Object.freeze(Object.defineProperty({__proto__:null,boundedNumber:{equals:tT.equals,compare:tT.compare,top:1/0,bottom:-1/0},clamp:function(e){return t_(e)(e.bottom,e.top)},reverse:function(e){var t=tm(e);return{equals:t.equals,compare:t.compare,top:e.bottom,bottom:e.top}}},Symbol.toStringTag,{value:"Module"}));function sR(e){return{meet:tw(e),join:tI(e)}}let sE=Object.freeze(Object.defineProperty({__proto__:null,getMinMaxDistributiveLattice:sR},Symbol.toStringTag,{value:"Module"})),sj=Object.freeze(Object.defineProperty({__proto__:null,getMinMaxBoundedDistributiveLattice:function(e){var t=sR(e);return function(e,n){return{join:t.join,meet:t.meet,zero:e,one:n}}}},Symbol.toStringTag,{value:"Module"})),sF=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),sM=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),sU=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),sL=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var sK=function(e,t){for(var n=t(e);"Left"===n._tag;)n=t(n.left);return n.right};let sB=Object.freeze(Object.defineProperty({__proto__:null,tailRec:sK},Symbol.toStringTag,{value:"Module"}));function sP(e,t){return function(n,r){return t.compose(e.right(r),e.left(n))}}function sW(e,t){var n=sP(e,t);return function(r,i){return t.compose(e.promap(t.id(),function(e){return"Left"===e._tag?e.left:e.right},ec),n(r,i))}}let sD=Object.freeze(Object.defineProperty({__proto__:null,fanIn:sW,fanin:function(e){return sW(e,e)},split:sP,splitChoice:function(e){return sP(e,e)}},Symbol.toStringTag,{value:"Module"})),sN=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var sq=function(e){return function(t){return em(e,t)}},sQ="Predicate",sV=function(){return{concat:function(e,t){return ev(e,sH(t))}}},sz=function(){return{concat:function(e,t){return ev(e,sG(t))}}},sY=function(e){return function(t){return!e(t)}},sH=function(e){return function(t){return function(n){return t(n)||e(n)}}},sG=function(e){return function(t){return function(n){return t(n)&&e(n)}}};let sZ=Object.freeze(Object.defineProperty({__proto__:null,Contravariant:{URI:sQ,contramap:function(e,t){return ev(e,sq(t))}},URI:sQ,and:sG,contramap:sq,getMonoidAll:function(){return{concat:sz().concat,empty:ef}},getMonoidAny:function(){return{concat:sV().concat,empty:ep}},getSemigroupAll:sz,getSemigroupAny:sV,not:sY,or:sH},Symbol.toStringTag,{value:"Module"}));function sJ(e){return function(t){return e(t)?e_(t):eI}}var s$=function(e){return"Right"===e._tag?eI:e_(e.left)},sX=function(e){return"Left"===e._tag?eI:e_(e.right)},s0=function(e,t){return ev(e,la(t))},s1=function(e,t){return ev(e,ll(t))},s2=function(e,t){return ev(e,lf(t))},s6=function(e,t,n){return ev(e,lA(t,n))},s5=function(e){var t=lh(e);return function(e,n){return ev(e,t(n))}},s3=function(e,t,n){return ev(e,lm(t,n))},s9=function(e){var t=lj(e);return function(e,n){return ev(e,t(n))}},s4=function(e,t){return ev(e,ly(t))},s8=function(e,t){return ev(e,lT(t))},s7=function(e,t){return ev(e,lk(t))},le=function(e,t){return ev(e,lC(t))},lt=function(e,t){return ev(e,lO(t))},ln=function(e,t){return ev(e,lR(t))},lr="Option",li=function(e){return{equals:function(t,n){return t===n||(lP(t)?lP(n):!lP(n)&&e.equals(t.value,n.value))}}},lo=function(e){return{concat:function(t,n){return lP(t)?n:lP(n)?t:e_(e.concat(t.value,n.value))},empty:eI}},la=function(e){return function(t){return lP(t)?eI:e_(e(t.value))}},lu={URI:lr,map:s0},ls={URI:lr,of:e_},ll=function(e){return function(t){return lP(t)||lP(e)?eI:e_(t.value(e.value))}},lc={URI:lr,map:s0,ap:s1},ld={URI:lr,map:s0,ap:s1,of:e_},lf=function(e){return function(t){return lP(t)?eI:e(t.value)}},lp={URI:lr,map:s0,ap:s1,chain:s2},lA=function(e,t){return function(n){return lP(n)?e:t(e,n.value)}},lh=function(e){return function(t){return function(n){return lP(n)?e.empty:t(n.value)}}},lm=function(e,t){return function(n){return lP(n)?e:t(n.value,e)}},lg=function(e){return function(t){return lP(t)?e():t}},ly=lg,lv=function(){return eI},lx={URI:lr,zero:lv},lb=iJ(lx,ls),lC=function(e){return function(t){return lP(t)?eI:e_(e(t))}},lS=lf(ec),lw=iK(eI,eI),lI=function(e){return lP(e)?lw:iK(s$(e.value),sX(e.value))},l_={URI:lr,compact:lS,separate:lI},lT=function(e){return function(t){return lP(t)?eI:e(t.value)?t:eI}},lk=function(e){return function(t){return lP(t)?eI:e(t.value)}},lO=function(e){return function(t){return iK(s8(t,sY(e)),s8(t,e))}},lR=function(e){return em(la(e),lI)},lE={URI:lr,map:s0,compact:lS,separate:lI,filter:s8,filterMap:s7,partition:lt,partitionMap:ln},lj=function(e){return function(t){return function(n){return lP(n)?e.of(eI):e.map(t(n.value),e_)}}},lF=function(e){return function(t){return lP(t)?e.of(eI):e.map(t.value,e_)}},lM={URI:lr,map:s0,reduce:s6,foldMap:s5,reduceRight:s3,traverse:s9,sequence:lF},lU=iH(lM,l_),lL=iY(lM,l_),lK=function(){return eI},lB={URI:lr,fromEither:sX},lP=function(e){return"None"===e._tag},lW=function(e,t){return function(n){return lP(n)?e():t(n.value)}},lD=function(e){return function(t){return lP(t)?e():t.value}},lN=eH(lu),lq=eW(lc),lQ=eD(lc),lV=e1(lp),lz=lC(ec),lY=e8(lB),lH=e7(lB,lp),lG=te(lB,lp),lZ=function(e){return null==e?eI:e_(e)},lJ=function(e){try{return e_(e())}catch{return eI}},l$=function(e){return function(t){return lP(t)?eI:lZ(e(t.value))}},lX=lW(eA,ec),l0=lW(eh,ec),l1=e_(eL),l2=eG(lu),l6=e2(lp),l5=eN(lc),l3=e_(eU),l9=function(e){return function(t){var n=e(0,eF(t));if(lP(n))return eI;for(var r=[n.value],i=1;i<t.length;i++){var o=e(i,t[i]);if(lP(o))return eI;r.push(o.value)}return e_(r)}},l4=function(e){var t=l9(e);return function(e){return ej(e)?t(e):l3}},l8=function(e){return l4(function(t,n){return e(n)})},l7=l8(ec),ce={URI:lr,map:s0,of:e_,ap:s1,chain:s2,reduce:s6,foldMap:s5,reduceRight:s3,traverse:s9,sequence:lF,zero:lv,alt:s4,extend:le,compact:lS,separate:lI,filter:s8,filterMap:s7,partition:lt,partitionMap:ln,wither:lU,wilt:lL,throwError:lK},ct=eq(lc),cn=e$(ld),cr=function(){return lo(tP())};let ci=Object.freeze(Object.defineProperty({__proto__:null,Alt:{URI:lr,map:s0,alt:s4},Alternative:{URI:lr,map:s0,ap:s1,of:e_,alt:s4,zero:lv},ApT:l3,Applicative:ld,Apply:lc,Chain:lp,Compactable:l_,Do:l1,Extend:{URI:lr,map:s0,extend:le},Filterable:lE,Foldable:{URI:lr,reduce:s6,foldMap:s5,reduceRight:s3},FromEither:lB,Functor:lu,Monad:{URI:lr,map:s0,ap:s1,of:e_,chain:s2},MonadThrow:{URI:lr,map:s0,ap:s1,of:e_,chain:s2,throwError:lK},Pointed:ls,Traversable:lM,URI:lr,Witherable:{URI:lr,map:s0,reduce:s6,foldMap:s5,reduceRight:s3,traverse:s9,sequence:lF,compact:lS,separate:lI,filter:s8,filterMap:s7,partition:lt,partitionMap:ln,wither:lU,wilt:lL},Zero:lx,alt:ly,altW:lg,ap:ll,apFirst:lq,apS:l5,apSecond:lQ,bind:l6,bindTo:l2,chain:lf,chainEitherK:lH,chainFirst:lV,chainFirstEitherK:lG,chainNullableK:l$,compact:lS,duplicate:lz,elem:function e(t){return function(n,r){if(void 0===r){var i=e(t);return function(e){return i(n,e)}}return!lP(r)&&t.equals(n,r.value)}},exists:function(e){return function(t){return!lP(t)&&e(t.value)}},extend:lC,filter:lT,filterMap:lk,flap:lN,flatten:lS,fold:lW,foldMap:lh,foldW:lW,fromEither:sX,fromEitherK:lY,fromNullable:lZ,fromNullableK:function(e){return em(e,lZ)},fromPredicate:sJ,getApplyMonoid:cn,getApplySemigroup:ct,getEq:li,getFirstMonoid:cr,getLastMonoid:function(){return lo(tW())},getLeft:s$,getMonoid:lo,getOrElse:lD,getOrElseW:lD,getOrd:function(e){return{equals:li(e).equals,compare:function(t,n){return t===n?0:ew(t)?ew(n)?e.compare(t.value,n.value):1:-1}}},getRefinement:function(e){return function(t){return ew(e(t))}},getRight:sX,getShow:function(e){return{show:function(t){return lP(t)?"none":"some(".concat(e.show(t.value),")")}}},guard:lb,isNone:lP,isSome:ew,map:la,mapNullable:l$,match:lW,matchW:lW,none:eI,of:e_,option:ce,partition:lO,partitionMap:lR,reduce:lA,reduceRight:lm,separate:lI,sequence:lF,sequenceArray:l7,some:e_,throwError:lK,toNullable:lX,toUndefined:l0,traverse:lj,traverseArray:l8,traverseArrayWithIndex:l4,traverseReadonlyArrayWithIndex:l4,traverseReadonlyNonEmptyArrayWithIndex:l9,tryCatch:lJ,tryCatchK:function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return lJ(function(){return e.apply(void 0,t)})}},wilt:function(e){var t=lL(e);return function(e){return function(n){return t(n,e)}}},wither:function(e){var t=lU(e);return function(e){return function(n){return t(n,e)}}},zero:lv},Symbol.toStringTag,{value:"Module"}));function co(e,t){return function(n){return e.map(n,t.compact)}}function ca(e,t,n){var r=co(e,t),i=eY(e,n);return function(e){return iK(r(ev(e,i(s$))),r(ev(e,i(sX))))}}let cu=Object.freeze(Object.defineProperty({__proto__:null,compact:co,getCompactableComposition:function(e,t){return{map:eZ(e,t).map,compact:co(e,t),separate:ca(e,t,t)}},separate:ca},Symbol.toStringTag,{value:"Module"})),cs=Object.freeze(Object.defineProperty({__proto__:null,error:function(e){return function(){return console.error(e)}},info:function(e){return function(){return console.info(e)}},log:function(e){return function(){return console.log(e)}},warn:function(e){return function(){return console.warn(e)}}},Symbol.toStringTag,{value:"Module"}));function cl(e){return{URI:cv,_E:void 0,map:cf,ap:function(t,n){return ec(e.concat(t,n))}}}function cc(e){var t=cl(e);return{URI:cv,_E:void 0,map:t.map,ap:t.ap,of:function(){return ec(e.empty)}}}var cd=function(e,t){return ev(e,ch())},cf=function(e,t){return ev(e,cm())},cp=function(e,t,n){return ev(e,cg(t))},cA=function(e,t){return ev(e,cy(t))},ch=function(){return ec},cm=function(){return ec},cg=function(e){return function(t){return ec(e(t))}},cy=function(e){return function(t){return ec(e(t))}},cv="Const",cx={URI:cv,map:cf},cb=eH(cx);let cC=Object.freeze(Object.defineProperty({__proto__:null,Bifunctor:{URI:cv,bimap:cp,mapLeft:cA},Contravariant:{URI:cv,contramap:cd},Functor:cx,URI:cv,bimap:cg,const_:{URI:cv,map:cf,contramap:cd,bimap:cp,mapLeft:cA},contramap:ch,flap:cb,getApplicative:cc,getApply:cl,getBooleanAlgebra:ec,getBounded:ec,getEq:ec,getHeytingAlgebra:ec,getMonoid:ec,getOrd:ec,getRing:ec,getSemigroup:ec,getSemiring:ec,getShow:function(e){return{show:function(t){return"make(".concat(e.show(t),")")}}},make:ec,map:cm,mapLeft:cy},Symbol.toStringTag,{value:"Module"})),cS=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),cw=Object.freeze(Object.defineProperty({__proto__:null,Eq:{equals:function(e,t){return e.valueOf()===t.valueOf()}},Ord:ev(iO,tg(function(e){return e.valueOf()})),create:function(){return new Date},eqDate:{equals:function(e,t){return e.getDate()===t.getDate()}},eqMonth:{equals:function(e,t){return e.getMonth()===t.getMonth()}},eqYear:{equals:function(e,t){return e.getFullYear()===t.getFullYear()}},now:function(){return new Date().getTime()}},Symbol.toStringTag,{value:"Module"}));var cI=function(e,t){return ev(e,cq(t))},c_=function(e,t){return ev(e,cY(t))},cT=function(e,t){return ev(e,cJ(t))},ck=function(e,t,n){return ev(e,cX(t,n))},cO=function(e){return function(t,n){return ev(t,c0(e)(n))}},cR=function(e,t,n){return ev(e,c1(t,n))},cE=function(e){var t=c2(e);return function(e,n){return ev(e,t(n))}},cj=function(e,t,n){return ev(e,c3(t,n))},cF=function(e,t){return ev(e,c9(t))},cM=function(e,t){return ev(e,c8(t))},cU=function(e,t){return ev(e,c7(t))},cL=function(e,t){return sK(t(e),function(e){return dr(e)?eR(eO(e.left)):dr(e.right)?eO(t(e.right.left)):eR(eR(e.right.right))})},cK="Either",cB=function(e){return{concat:function(t,n){return dr(n)?t:dr(t)?n:eR(e.concat(t.right,n.right))}}},cP=function(e){var t=eO(e.empty);return{URI:cK,_E:void 0,compact:function(e){return dr(e)?e:"None"===e.right._tag?t:eR(e.right.value)},separate:function(e){return dr(e)?iK(e,e):dr(e.right)?iK(eR(e.right.left),t):iK(t,eR(e.right.right))}}},cW=function(e){var t=eO(e.empty),n=cP(e);return{URI:cK,_E:void 0,map:cI,compact:n.compact,separate:n.separate,filter:function(e,n){return dr(e)||n(e.right)?e:t},filterMap:function(e,n){if(dr(e))return e;var r=n(e.right);return"None"===r._tag?t:eR(r.value)},partition:function(e,n){return dr(e)?iK(e,e):n(e.right)?iK(t,eR(e.right)):iK(eR(e.right),t)},partitionMap:function(e,n){if(dr(e))return iK(e,e);var r=n(e.right);return dr(r)?iK(eR(r.left),t):iK(t,eR(r.right))}}},cD=function(e){return{URI:cK,_E:void 0,map:cI,ap:function(t,n){return dr(t)?dr(n)?eO(e.concat(t.left,n.left)):t:dr(n)?n:eR(t.right(n.right))},of:cV}},cN=function(e){return{URI:cK,_E:void 0,map:cI,alt:function(t,n){if(di(t))return t;var r=n();return dr(r)?eO(e.concat(t.left,r.left)):r}}},cq=function(e){return function(t){return dr(t)?t:eR(e(t.right))}},cQ={URI:cK,map:cI},cV=eR,cz=function(e){return function(t){return dr(t)?t:dr(e)?e:eR(t.right(e.right))}},cY=cz,cH={URI:cK,map:cI,ap:c_},cG={URI:cK,map:cI,ap:c_,of:cV},cZ=function(e){return function(t){return dr(t)?t:e(t.right)}},cJ=cZ,c$={URI:cK,map:cI,ap:c_,chain:cT},cX=function(e,t){return function(n){return dr(n)?e:t(e,n.right)}},c0=function(e){return function(t){return function(n){return dr(n)?e.empty:t(n.right)}}},c1=function(e,t){return function(n){return dr(n)?e:t(n.right,e)}},c2=function(e){return function(t){return function(n){return dr(n)?e.of(eO(n.left)):e.map(t(n.right),eR)}}},c6=function(e){return function(t){return dr(t)?e.of(eO(t.left)):e.map(t.right,eR)}},c5={URI:cK,map:cI,reduce:ck,foldMap:cO,reduceRight:cR,traverse:cE,sequence:c6},c3=function(e,t){return function(n){return dr(n)?eO(e(n.left)):eR(t(n.right))}},c9=function(e){return function(t){return dr(t)?eO(e(t.left)):t}},c4=function(e){return function(t){return dr(t)?e():t}},c8=c4,c7=function(e){return function(t){return dr(t)?t:eR(e(t))}},de={URI:cK,fromEither:ec},dt=e3(de),dn=e5(de),dr=eT,di=ek,da=function(e,t){return function(n){return dr(n)?e(n.left):t(n.right)}},du=function(e){return function(t){return dr(t)?e(t.left):t.right}},ds=eH(cQ),dl=eW(cH),dc=eD(cH),dd=e1(c$),df=cZ(ec),dp=c7(ec),dA=e9(de),dh=e4(de,c$),dm=tt(de,c$),dg=function(e){return dr(e)?eR(e.left):eO(e.right)},dy=function(e){return function(t){return dr(t)?e(t.left):t}},dv=function(e){return function(t){return null==t?eO(e):eR(t)}},dx=function(e,t){try{return eR(e())}catch(e){return eO(t(e))}},db=function(e){var t=dv(e);return function(e){return em(e,t)}},dC=da(ec,ec),dS=cV(eL),dw=eG(cQ),dI=e2(c$),d_=eN(cH),dT=cV(eU),dk=function(e){return function(t){var n=e(0,eF(t));if(dr(n))return n;for(var r=[n.right],i=1;i<t.length;i++){var o=e(i,t[i]);if(dr(o))return o;r.push(o.right)}return eR(r)}},dO=function(e){var t=dk(e);return function(e){return ej(e)?t(e):dT}},dR=function(e){return dO(function(t,n){return e(n)})},dE=dR(ec),dj=eq(cH),dF=e$(cG);let dM=Object.freeze(Object.defineProperty({__proto__:null,Alt:{URI:cK,map:cI,alt:cM},ApT:dT,Applicative:cG,Apply:cH,Bifunctor:{URI:cK,bimap:cj,mapLeft:cF},Chain:c$,ChainRec:{URI:cK,map:cI,ap:c_,chain:cT,chainRec:cL},Do:dS,Extend:{URI:cK,map:cI,extend:cU},Foldable:{URI:cK,reduce:ck,foldMap:cO,reduceRight:cR},FromEither:de,Functor:cQ,Monad:{URI:cK,map:cI,ap:c_,of:cV,chain:cT},MonadThrow:{URI:cK,map:cI,ap:c_,of:cV,chain:cT,throwError:eO},Pointed:{URI:cK,of:cV},Traversable:c5,URI:cK,alt:c8,altW:c4,ap:cY,apFirst:dl,apFirstW:dl,apS:d_,apSW:d_,apSecond:dc,apSecondW:dc,apW:cz,bimap:c3,bind:dI,bindTo:dw,bindW:dI,chain:cJ,chainFirst:dd,chainFirstW:dd,chainNullableK:function(e){var t=db(e);return function(e){return cJ(t(e))}},chainOptionK:dh,chainW:cZ,duplicate:dp,either:{URI:cK,map:cI,of:cV,ap:c_,chain:cT,reduce:ck,foldMap:cO,reduceRight:cR,traverse:cE,sequence:c6,bimap:cj,mapLeft:cF,alt:cM,extend:cU,chainRec:cL,throwError:eO},elem:function e(t){return function(n,r){if(void 0===r){var i=e(t);return function(e){return i(n,e)}}return!dr(r)&&t.equals(n,r.right)}},exists:function(e){return function(t){return!dr(t)&&e(t.right)}},extend:c7,filterOrElse:dm,filterOrElseW:dm,flap:ds,flatten:df,flattenW:df,fold:da,foldMap:c0,foldW:da,fromNullable:dv,fromNullableK:db,fromOption:dn,fromOptionK:dA,fromPredicate:dt,getAltValidation:cN,getApplicativeValidation:cD,getApplyMonoid:dF,getApplySemigroup:dj,getCompactable:cP,getEq:function(e,t){return{equals:function(n,r){return n===r||(dr(n)?dr(r)&&e.equals(n.left,r.left):di(r)&&t.equals(n.right,r.right))}}},getFilterable:cW,getOrElse:du,getOrElseW:du,getSemigroup:cB,getShow:function(e,t){return{show:function(n){return dr(n)?"left(".concat(e.show(n.left),")"):"right(".concat(t.show(n.right),")")}}},getValidation:function(e){return{URI:cK,_E:void 0,map:cI,of:cV,chain:cT,bimap:cj,mapLeft:cF,reduce:ck,foldMap:cO,reduceRight:cR,extend:cU,traverse:cE,sequence:c6,chainRec:cL,throwError:eO,ap:cD(e).ap,alt:cN(e).alt}},getValidationMonoid:function(e,t){return e$(cD(e))(t)},getValidationSemigroup:function(e,t){return eq(cD(e))(t)},getWitherable:function(e){var t=cW(e),n=cP(e);return{URI:cK,_E:void 0,map:cI,compact:t.compact,separate:t.separate,filter:t.filter,filterMap:t.filterMap,partition:t.partition,partitionMap:t.partitionMap,traverse:cE,sequence:c6,reduce:ck,foldMap:cO,reduceRight:cR,wither:iH(c5,n),wilt:iY(c5,n)}},isLeft:dr,isRight:di,left:eO,map:cq,mapLeft:c9,match:da,matchW:da,of:cV,orElse:dy,orElseW:dy,parseJSON:function(e,t){return dx(function(){return JSON.parse(e)},t)},reduce:cX,reduceRight:c1,right:eR,sequence:c6,sequenceArray:dE,stringifyJSON:function(e,t){return dx(function(){var t=JSON.stringify(e);if("string"!=typeof t)throw Error("Converting unsupported structure to JSON");return t},t)},swap:dg,throwError:eO,toError:function(e){return e instanceof Error?e:Error(String(e))},toUnion:dC,traverse:c2,traverseArray:dR,traverseArrayWithIndex:dO,traverseReadonlyArrayWithIndex:dO,traverseReadonlyNonEmptyArrayWithIndex:dk,tryCatch:dx,tryCatchK:function(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return dx(function(){return e.apply(void 0,n)},t)}}},Symbol.toStringTag,{value:"Module"}));function dU(e){return em(eR,e.of)}function dL(e){return em(eO,e.of)}function dK(e){return function(t){return e.map(t,eR)}}function dB(e){return function(t){return e.map(t,eO)}}function dP(e){return function(t){return em(dv(t),e.of)}}function dW(e){var t=dP(e);return function(e){var n=t(e);return function(e){return em(e,n)}}}function dD(e){var t=dQ(e),n=dW(e);return function(e){var r=n(e);return function(e){return t(r(e))}}}function dN(e){return eY(e,cQ)}function dq(e){return eP(e,cH)}function dQ(e){return function(t){return function(n){return e.chain(n,function(n){return dr(n)?e.of(n):t(n.right)})}}}function dV(e){return function(t){return function(n){return e.chain(n,function(n){return dr(n)?t():e.of(n)})}}}function dz(e){return function(t,n){return function(r){return e.map(r,c3(t,n))}}}function dY(e){return function(t){return function(n){return e.map(n,c9(t))}}}function dH(e,t){return function(n){return function(r){return e.chain(r,da(function(r){return e.map(n(),c9(function(e){return t.concat(r,e)}))},dU(e)))}}}function dG(e){return function(t,n){return function(r){return e.map(r,da(t,n))}}}function dZ(e){return function(t,n){return function(r){return e.chain(r,da(t,n))}}}function dJ(e){return function(t){return function(n){return e.chain(n,da(t,e.of))}}}function d$(e){return function(t){return function(n){return e.chain(n,function(n){return dr(n)?t(n.left):e.of(n)})}}}function dX(e){var t=d$(e);return function(n){return t(function(t){return e.map(n(t),function(e){return dr(e)?e:eO(t)})})}}function d0(e){return function(t){return function(n){return e.chain(n,da(function(n){return e.map(t(n),eO)},function(t){return e.of(eR(t))}))}}}function d1(e){return function(t){return e.map(t,dg)}}function d2(e){return function(t){return e.map(t,dC)}}let d6=Object.freeze(Object.defineProperty({__proto__:null,alt:dV,altValidation:dH,ap:dq,bimap:dz,chain:dQ,chainNullableK:dD,fromNullable:dP,fromNullableK:dW,getEitherM:function(e){var t=dq(e),n=dN(e),r=dQ(e),i=dV(e),o=dz(e),a=dY(e),u=dZ(e),s=dJ(e),l=d$(e);return{map:function(e,t){return ev(e,n(t))},ap:function(e,n){return ev(e,t(n))},of:dU(e),chain:function(e,t){return ev(e,r(t))},alt:function(e,t){return ev(e,i(t))},bimap:function(e,t,n){return ev(e,o(t,n))},mapLeft:function(e,t){return ev(e,a(t))},fold:function(e,t,n){return ev(e,u(t,n))},getOrElse:function(e,t){return ev(e,s(t))},orElse:function(e,t){return ev(e,l(t))},swap:d1(e),rightM:dK(e),leftM:dB(e),left:dL(e)}},getOrElse:dJ,left:dL,leftF:dB,map:dN,mapLeft:dY,match:dG,matchE:dZ,orElse:d$,orElseFirst:dX,orLeft:d0,right:dU,rightF:dK,swap:d1,toUnion:d2},Symbol.toStringTag,{value:"Module"}));var d5=function(){return{concat:function(e,t){return em(e,t)}}},d3=function(){return{concat:d5().concat,empty:ec}};let d9=Object.freeze(Object.defineProperty({__proto__:null,URI:"Endomorphism",getMonoid:d3,getSemigroup:d5},Symbol.toStringTag,{value:"Module"})),d4=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function d8(e,t){var n=t.zero,r=function(i,o){return e.equals(o,n)?i:r(o,t.mod(i,o))};return r}let d7=Object.freeze(Object.defineProperty({__proto__:null,fieldNumber:{add:function(e,t){return e+t},zero:0,mul:function(e,t){return e*t},one:1,sub:function(e,t){return e-t},degree:function(e){return 1},div:function(e,t){return e/t},mod:function(e,t){return e%t}},gcd:d8,lcm:function(e,t){var n=t.zero,r=d8(e,t);return function(i,o){return e.equals(i,n)||e.equals(o,n)?n:t.div(t.mul(i,o),r(i,o))}}},Symbol.toStringTag,{value:"Module"}));function fe(e,t){return function(n){return function(r){return e.map(r,function(e){return t.filter(e,n)})}}}function ft(e,t){return function(n){return function(r){return e.map(r,function(e){return t.filterMap(e,n)})}}}function fn(e,t){var n=fe(e,t);return function(e){var t=n(sY(e)),r=n(e);return function(e){return iK(t(e),r(e))}}}function fr(e,t){var n=ft(e,t);return function(e){return function(t){return iK(ev(t,n(function(t){return s$(e(t))})),ev(t,n(function(t){return sX(e(t))})))}}}let fi=Object.freeze(Object.defineProperty({__proto__:null,filter:fe,filterMap:ft,getFilterableComposition:function(e,t){var n=eZ(e,t).map,r=co(e,t),i=ca(e,t,t),o=fe(e,t),a=ft(e,t),u=fn(e,t),s=fr(e,t);return{map:n,compact:r,separate:i,filter:function(e,t){return ev(e,o(t))},filterMap:function(e,t){return ev(e,a(t))},partition:function(e,t){return ev(e,u(t))},partitionMap:function(e,t){return ev(e,s(t))}}},partition:fn,partitionMap:fr},Symbol.toStringTag,{value:"Module"})),fo=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function fa(e,t){return function(n,r){return function(i){return e.reduce(i,n,function(e,n){return t.reduce(n,e,r)})}}}function fu(e,t){return function(n){var r=e.foldMap(n),i=t.foldMap(n);return function(e){return function(t){return r(t,function(t){return i(t,e)})}}}}function fs(e,t){return function(n,r){return function(i){return e.reduceRight(i,n,function(e,n){return t.reduceRight(e,n,r)})}}}function fl(e){return function(t){return e.reduce(t,[],function(e,t){return e.push(t),e})}}function fc(e,t){var n=fa(e,t),r=fu(e,t),i=fs(e,t);return{reduce:function(e,t,r){return ev(e,n(t,r))},foldMap:function(e){var t=r(e);return function(e,n){return ev(e,t(n))}},reduceRight:function(e,t,n){return ev(e,i(t,n))}}}let fd=Object.freeze(Object.defineProperty({__proto__:null,foldM:function(e,t){return function(n,r,i){return t.reduce(n,e.of(r),function(t,n){return e.chain(t,function(e){return i(e,n)})})}},foldMap:fu,getFoldableComposition:fc,intercalate:function(e,t){return function(n,r){return t.reduce(r,{init:!0,acc:e.empty},function(t,r){var i=t.init,o=t.acc;return i?{init:!1,acc:r}:{init:!1,acc:e.concat(e.concat(o,n),r)}}).acc}},reduce:fa,reduceM:function(e,t){return function(n,r){return function(i){return t.reduce(i,e.of(n),function(t,n){return e.chain(t,function(e){return r(e,n)})})}}},reduceRight:fs,toArray:fl,toReadonlyArray:fl,traverse_:function(e,t){var n=e.of(void 0);return function(r,i){return t.reduce(r,n,function(t,n){var r;return r=i(n),e.ap(e.map(t,ed),r)})}}},Symbol.toStringTag,{value:"Module"}));function ff(e,t){return function(n,r){return function(i){return e.reduceWithIndex(i,n,function(e,n,i){return t.reduceWithIndex(i,n,function(t,n,i){return r([e,t],n,i)})})}}}function fp(e,t){return function(n){var r=e.foldMapWithIndex(n),i=t.foldMapWithIndex(n);return function(e){return function(t){return r(t,function(t,n){return i(n,function(n,r){return e([t,n],r)})})}}}}function fA(e,t){return function(n,r){return function(i){return e.reduceRightWithIndex(i,n,function(e,n,i){return t.reduceRightWithIndex(n,i,function(t,n,i){return r([e,t],n,i)})})}}}let fh=Object.freeze(Object.defineProperty({__proto__:null,foldMapWithIndex:fp,getFoldableWithIndexComposition:function(e,t){var n=fc(e,t),r=ff(e,t),i=fp(e,t),o=fA(e,t);return{reduce:n.reduce,foldMap:n.foldMap,reduceRight:n.reduceRight,reduceWithIndex:function(e,t,n){return ev(e,r(t,n))},foldMapWithIndex:function(e){var t=i(e);return function(e,n){return ev(e,t(n))}},reduceRightWithIndex:function(e,t,n){return ev(e,o(t,n))}}},reduceRightWithIndex:fA,reduceWithIndex:ff},Symbol.toStringTag,{value:"Module"}));function fm(e){return function(t){return em(t,e.fromIO)}}function fg(e,t){return function(n){var r=em(n,e.fromIO);return function(e){return t.chain(e,r)}}}function fy(e,t){var n=e1(t);return function(t){return n(em(t,e.fromIO))}}let fv=Object.freeze(Object.defineProperty({__proto__:null,chainFirstIOK:fy,chainIOK:fg,fromIOK:fm},Symbol.toStringTag,{value:"Module"}));var fx=function(){return ec},fb=function(e){return function(t){return function(n){return t(e(n))}}},fC=function(e){return function(t){return e(t)(t)}},fS=function(e,t){return ev(e,fk(t))},fw=function(e,t){return ev(e,fR(t))},fI=function(e,t){return ev(e,fj(t))},f_=function(e,t){return ev(e,fM(t))},fT=function(e,t,n){return ev(e,fU(t,n))},fk=function(e){return function(t){return function(n){return e(t(n))}}},fO=function(e){return function(t){return function(n){return t(n)(e(n))}}},fR=fO,fE=function(e){return function(t){return function(n){return e(t(n))(n)}}},fj=fE,fF=fE(ec),fM=function(e){return function(t){return em(e,t)}},fU=function(e,t){return function(n){return function(r){return t(n(e(r)))}}},fL=function(){return ec},fK=function(e){return function(t){var n=t[0],r=t[1];return[e(n),r]}},fB=function(e){return function(t){return[t[0],e(t[1])]}},fP=function(e){return da(function(t){return eO(e(t))},eR)},fW=function(e){return da(eO,function(t){return eR(e(t))})},fD="Reader",fN={URI:fD,map:fS},fq=eH(fN),fQ={URI:fD,of:ed},fV={URI:fD,map:fS,ap:fw},fz=eW(fV),fY=eD(fV),fH={URI:fD,map:fS,ap:fw,of:ed},fG={URI:fD,map:fS,ap:fw,chain:fI},fZ={URI:fD,map:fS,of:ed,ap:fw,chain:fI},fJ=e1(fG),f$=eG(fN),fX=e2(fG),f0=ed(eL),f1=eN(fV),f2=ed(eU),f6=function(e){return function(t){return function(n){for(var r=[e(0,eF(t))(n)],i=1;i<t.length;i++)r.push(e(i,t[i])(n));return r}}},f5=function(e){var t=f6(e);return function(e){return ej(e)?t(e):f2}},f3=function(e){return f5(function(t,n){return e(n)})},f9=f3(ec),f4=eq(fV),f8=e$(fH);let f7=Object.freeze(Object.defineProperty({__proto__:null,ApT:f2,Applicative:fH,Apply:fV,Category:{URI:fD,compose:f_,id:fL},Chain:fG,Choice:{URI:fD,map:fS,promap:fT,left:fP,right:fW},Do:f0,Functor:fN,Monad:fZ,Pointed:fQ,Profunctor:{URI:fD,map:fS,promap:fT},Strong:{URI:fD,map:fS,promap:fT,first:fK,second:fB},URI:fD,ap:fR,apFirst:fz,apFirstW:fz,apS:f1,apSW:f1,apSecond:fY,apSecondW:fY,apW:fO,ask:fx,asks:ec,asksReader:fC,asksReaderW:fC,bind:fX,bindTo:f$,bindW:fX,chain:fj,chainFirst:fJ,chainFirstW:fJ,chainW:fE,compose:fM,first:fK,flap:fq,flatten:fF,flattenW:fF,getMonoid:f8,getSemigroup:f4,id:fL,left:fP,local:fb,map:fk,of:ed,promap:fU,reader:{URI:fD,map:fS,of:ed,ap:fw,chain:fI,promap:fT,compose:f_,id:fL,first:fK,second:fB,left:fP,right:fW},right:fW,second:fB,sequenceArray:f9,traverseArray:f3,traverseArrayWithIndex:f5,traverseReadonlyArrayWithIndex:f5,traverseReadonlyNonEmptyArrayWithIndex:f6},Symbol.toStringTag,{value:"Module"}));function pe(e){return function(){return e.fromReader(fx())}}function pt(e){return e.fromReader}function pn(e){return function(t){return em(t,e.fromReader)}}function pr(e,t){var n=pn(e);return function(e){return function(r){return t.chain(r,n(e))}}}function pi(e,t){return em(pn(e),e1(t))}let po=Object.freeze(Object.defineProperty({__proto__:null,ask:pe,asks:pt,chainFirstReaderK:pi,chainReaderK:pr,fromReaderK:pn},Symbol.toStringTag,{value:"Module"}));var pa=function(){return function(e){return[e,e]}},pu=function(e){return function(){return[void 0,e]}},ps=function(e){return function(t){return[void 0,e(t)]}},pl=function(e){return function(t){return[e(t),t]}},pc=function(e,t){return ev(e,pp(t))},pd=function(e,t){return ev(e,pA(t))},pf=function(e,t){return ev(e,pm(t))},pp=function(e){return function(t){return function(n){var r=t(n),i=r[0],o=r[1];return[e(i),o]}}},pA=function(e){return function(t){return function(n){var r=t(n),i=r[0],o=e(r[1]),a=o[0],u=o[1];return[i(a),u]}}},ph=function(e){return function(t){return[e,t]}},pm=function(e){return function(t){return function(n){var r=t(n),i=r[0],o=r[1];return e(i)(o)}}},pg=pm(ec),py="State",pv={URI:py,map:pc},px=eH(pv),pb={URI:py,map:pc,ap:pd},pC=eW(pb),pS=eD(pb),pw={URI:py,map:pc,ap:pd,chain:pf},pI={URI:py,map:pc,ap:pd,of:ph,chain:pf},p_=e1(pw),pT=eG(pv),pk=e2(pw),pO=eN(pb),pR=function(e){return function(t){return function(n){for(var r=e(0,eF(t))(n),i=r[0],o=r[1],a=[i],u=o,s=1;s<t.length;s++){var l=e(s,t[s])(u),c=l[0],d=l[1];a.push(c),u=d}return[a,u]}}},pE=function(e){var t=pR(e);return function(e){return ej(e)?t(e):ph(eU)}},pj=function(e){return pE(function(t,n){return e(n)})},pF=pj(ec);let pM=Object.freeze(Object.defineProperty({__proto__:null,Applicative:{URI:py,map:pc,ap:pd,of:ph},Apply:pb,Chain:pw,FromState:{URI:py,fromState:ec},Functor:pv,Monad:pI,Pointed:{URI:py,of:ph},URI:py,ap:pA,apFirst:pC,apS:pO,apSecond:pS,bind:pk,bindTo:pT,chain:pm,chainFirst:p_,evalState:function(e,t){return e(t)[0]},evaluate:function(e){return function(t){return t(e)[0]}},execState:function(e,t){return e(t)[1]},execute:function(e){return function(t){return t(e)[1]}},flap:px,flatten:pg,get:pa,gets:pl,map:pp,modify:ps,of:ph,put:pu,sequenceArray:pF,state:pI,traverseArray:pj,traverseArrayWithIndex:pE,traverseReadonlyArrayWithIndex:pE,traverseReadonlyNonEmptyArrayWithIndex:pR},Symbol.toStringTag,{value:"Module"}));function pU(e){return function(){return e.fromState(pa())}}function pL(e){return function(t){return e.fromState(pu(t))}}function pK(e){return em(ps,e.fromState)}function pB(e){return em(pl,e.fromState)}function pP(e){return function(t){return em(t,e.fromState)}}function pW(e,t){var n=pP(e);return function(e){return function(r){return t.chain(r,n(e))}}}let pD=Object.freeze(Object.defineProperty({__proto__:null,chainStateK:pW,fromStateK:pP,get:pU,gets:pB,modify:pK,put:pL},Symbol.toStringTag,{value:"Module"}));function pN(e){return function(t){return em(t,e.fromTask)}}function pq(e,t){return function(n){var r=em(n,e.fromTask);return function(e){return t.chain(e,r)}}}function pQ(e,t){var n=e1(t);return function(t){return n(em(t,e.fromTask))}}let pV=Object.freeze(Object.defineProperty({__proto__:null,chainFirstTaskK:pQ,chainTaskK:pq,fromTaskK:pN},Symbol.toStringTag,{value:"Module"}));function pz(e){return function(t){return em(t,e.fromThese)}}let pY=Object.freeze(Object.defineProperty({__proto__:null,fromTheseK:pz},Symbol.toStringTag,{value:"Module"}));function pH(e,t){return function(n){return function(r){return e.mapWithIndex(r,function(e,r){return t.mapWithIndex(r,function(t,r){return n([e,t],r)})})}}}let pG=Object.freeze(Object.defineProperty({__proto__:null,getFunctorWithIndexComposition:function(e,t){var n=eZ(e,t).map,r=pH(e,t);return{map:n,mapWithIndex:function(e,t){return ev(e,r(t))}}},mapWithIndex:pH},Symbol.toStringTag,{value:"Module"})),pZ=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),pJ=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),p$=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var pX=function(e,t){return ev(e,p8(t))},p0=function(e,t){return ev(e,p7(t))},p1=function(e,t){return ev(e,Ae(t))},p2=function(e,t,n){return ev(e,Ai(t,n))},p6=function(e){return function(e,t){return ev(e,Ao()(t))}},p5=function(e,t,n){return ev(e,Aa(t,n))},p3=function(e,t){return ev(e,Ac())},p9=function(e,t){return ev(e,At(t))},p4=function(e){var t=Au(e);return function(e,n){return ev(e,t(n))}},p8=function(e){return function(t){return e(t)}},p7=function(e){return function(t){return t(e)}},Ae=function(e){return function(t){return e(t)}},At=function(e){return function(t){return e(t)}},An=At(ec),Ar=Ae(ec),Ai=function(e,t){return function(n){return t(e,n)}},Ao=function(){return function(e){return function(t){return e(t)}}},Aa=function(e,t){return function(n){return t(n,e)}},Au=function(e){return function(t){return function(n){return e.map(t(n),ec)}}},As=function(e){return function(t){return e.map(t,ec)}},Al=function(){return ec},Ac=Al,Ad="Identity",Af={URI:Ad,map:pX},Ap=eH(Af),AA={URI:Ad,map:pX,ap:p0},Ah=eW(AA),Am=eD(AA),Ag={URI:Ad,map:pX,ap:p0,chain:p1},Ay=e1(Ag),Av=ec(eL),Ax=eG(Af),Ab=e2(Ag),AC=eN(AA);let AS=Object.freeze(Object.defineProperty({__proto__:null,Alt:{URI:Ad,map:pX,alt:p3},Applicative:{URI:Ad,map:pX,ap:p0,of:ec},Apply:AA,Chain:Ag,ChainRec:{URI:Ad,map:pX,ap:p0,chain:p1,chainRec:sK},Comonad:{URI:Ad,map:pX,extend:p9,extract:ec},Do:Av,Foldable:{URI:Ad,reduce:p2,foldMap:p6,reduceRight:p5},Functor:Af,Monad:{URI:Ad,map:pX,ap:p0,of:ec,chain:p1},Pointed:{URI:Ad,of:ec},Traversable:{URI:Ad,map:pX,reduce:p2,foldMap:p6,reduceRight:p5,traverse:p4,sequence:As},URI:Ad,alt:Ac,altW:Al,ap:p7,apFirst:Ah,apS:AC,apSecond:Am,bind:Ab,bindTo:Ax,chain:Ae,chainFirst:Ay,duplicate:An,extend:At,extract:ec,flap:Ap,flatten:Ar,foldMap:Ao,getEq:ec,getShow:ec,identity:{URI:Ad,map:pX,ap:p0,of:ec,chain:p1,reduce:p2,foldMap:p6,reduceRight:p5,traverse:p4,sequence:As,alt:p3,extract:ec,extend:p9,chainRec:sK},map:p8,of:ec,reduce:Ai,reduceRight:Aa,sequence:As,traverse:Au},Symbol.toStringTag,{value:"Module"})),Aw=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var AI=function(e,t){return function(){return t(e())}},A_=function(e,t){return function(){return e()(t())}},AT=function(e,t){return function(){return t(e())()}},Ak=function(e,t){return function(){for(var n=t(e)();"Left"===n._tag;)n=t(n.left)();return n.right}},AO=function(e){return function(t){return AI(t,e)}},AR=function(e){return function(t){return AT(t,e)}},AE=AR(ec),Aj={URI:"IO",map:AI},AF=eH(Aj),AM={URI:"IO",of:ed},AU={URI:"IO",map:AI,ap:A_},AL=eW(AU),AK=eD(AU),AB={URI:"IO",map:AI,ap:A_,of:ed},AP={URI:"IO",map:AI,ap:A_,chain:AT},AW={URI:"IO",map:AI,ap:A_,of:ed,chain:AT},AD=e1(AP),AN=ed(eL),Aq=eG(Aj),AQ=e2(AP),AV=eN(AU),Az=ed(eU),AY=function(e){return function(t){return function(){for(var n=[e(0,eF(t))()],r=1;r<t.length;r++)n.push(e(r,t[r])());return n}}},AH=function(e){var t=AY(e);return function(e){return ej(e)?t(e):Az}},AG=function(e){return AH(function(t,n){return e(n)})},AZ=AG(ec),AJ=eq(AU),A$=e$(AB);let AX=Object.freeze(Object.defineProperty({__proto__:null,ApT:Az,Applicative:AB,Apply:AU,Chain:AP,ChainRec:{URI:"IO",map:AI,ap:A_,chain:AT,chainRec:Ak},Do:AN,FromIO:{URI:"IO",fromIO:ec},Functor:Aj,Monad:AW,MonadIO:{URI:"IO",map:AI,ap:A_,of:ed,chain:AT,fromIO:ec},Pointed:AM,URI:"IO",ap:function(e){return function(t){return A_(t,e)}},apFirst:AL,apS:AV,apSecond:AK,bind:AQ,bindTo:Aq,chain:AR,chainFirst:AD,flap:AF,flatten:AE,fromIO:ec,getMonoid:A$,getSemigroup:AJ,io:{URI:"IO",map:AI,of:ed,ap:A_,chain:AT,fromIO:ec,chainRec:Ak},map:AO,of:ed,sequenceArray:AZ,traverseArray:AG,traverseArrayWithIndex:AH,traverseReadonlyArrayWithIndex:AH,traverseReadonlyNonEmptyArrayWithIndex:AY},Symbol.toStringTag,{value:"Module"}));var A0=dL(AM),A1=dU(AM),A2=dK(Aj),A6=dB(Aj),A5=dG(Aj),A3=dZ(AW),A9=dJ(AW),A4=function(e,t){return function(){return dx(e,t)}},A8=d2(Aj),A7=d$(AW),he=dX(AW),ht=d0(AW),hn=d1(Aj),hr=function(e,t){return ev(e,hl(t))},hi=function(e,t){return ev(e,hf(t))},ho=function(e,t){return ev(e,hp(t))},ha=function(e,t,n){return ev(e,hc(t,n))},hu=function(e,t){return ev(e,hd(t))},hs=function(e,t){return ev(e,hh(t))},hl=dN(Aj),hc=dz(Aj),hd=dY(Aj),hf=dq(AU),hp=dQ(AW),hA=hp(ec),hh=dV(AW),hm="IOEither";function hg(e){var t=eP(AU,cD(e));return{URI:hm,_E:void 0,map:hr,ap:function(e,n){return ev(e,t(n))},of:A1}}function hy(e){var t=dH(AW,e);return{URI:hm,_E:void 0,map:hr,alt:function(e,n){return ev(e,t(n))}}}var hv=function(e){var t=cP(e);return{URI:hm,_E:void 0,compact:co(Aj,t),separate:ca(Aj,t,cQ)}},hx={URI:hm,map:hr},hb=eH(hx),hC={URI:hm,map:hr,ap:hi},hS=eW(hC),hw=eD(hC),hI={URI:hm,map:hr,ap:hi,of:A1},h_={URI:hm,map:hr,ap:hi,chain:ho},hT=e1(h_),hk={URI:hm,fromIO:A2},hO=fm(hk),hR=fg(hk,h_),hE=fy(hk,h_),hj={URI:hm,fromEither:ed},hF=e5(hj),hM=e9(hj),hU=e4(hj,h_),hL=e7(hj,h_),hK=te(hj,h_),hB=e3(hj),hP=tt(hj,h_),hW=e8(hj),hD=function(e,t,n){return ev(e,hp(function(e){return ev(t(e),AR(function(t){return ev(n(e,t),hp(function(){return ed(t)}))}))}))},hN=A1(eL),hq=eG(hx),hQ=e2(h_),hV=eN(hC),hz=A1(eU),hY=function(e){return em(AY(e),AO(dk(ex)))},hH=function(e){var t=hY(e);return function(e){return ej(e)?t(e):hz}},hG=function(e){return function(t){return function(){var n=e(0,eF(t))();if(eT(n))return n;for(var r=[n.right],i=1;i<t.length;i++){var o=e(i,t[i])();if(eT(o))return o;r.push(o.right)}return eR(r)}}},hZ=function(e){var t=hG(e);return function(e){return ej(e)?t(e):hz}},hJ=function(e){return hH(function(t,n){return e(n)})},h$=hJ(ec),hX=function(e){return hZ(function(t,n){return e(n)})},h0=hX(ec),h1=eq(hC),h2=e$(hI);let h6=Object.freeze(Object.defineProperty({__proto__:null,Alt:{URI:hm,map:hr,alt:hs},ApT:hz,Applicative:hI,ApplicativePar:hI,ApplicativeSeq:{URI:hm,map:hr,ap:function(e,t){return ev(e,hp(function(e){return ev(t,hl(e))}))},of:A1},ApplyPar:hC,Bifunctor:{URI:hm,bimap:ha,mapLeft:hu},Chain:h_,Do:hN,FromEither:hj,FromIO:hk,Functor:hx,Monad:{URI:hm,map:hr,ap:hi,of:A1,chain:ho},MonadIO:{URI:hm,map:hr,ap:hi,of:A1,chain:ho,fromIO:A2},MonadThrow:{URI:hm,map:hr,ap:hi,of:A1,chain:ho,throwError:A0},Pointed:{URI:hm,of:A1},URI:hm,alt:hh,altW:hh,ap:hf,apFirst:hS,apFirstW:hS,apS:hV,apSW:hV,apSecond:hw,apSecondW:hw,apW:hf,bimap:hc,bind:hQ,bindTo:hq,bindW:hQ,bracket:function(e,t,n){return hD(e,t,n)},bracketW:hD,chain:hp,chainEitherK:hL,chainEitherKW:hL,chainFirst:hT,chainFirstEitherK:hK,chainFirstEitherKW:hK,chainFirstIOK:hE,chainFirstW:hT,chainIOK:hR,chainOptionK:hU,chainW:hp,filterOrElse:hP,filterOrElseW:hP,flap:hb,flatten:hA,flattenW:hA,fold:A3,foldW:A3,fromEither:ed,fromEitherK:hW,fromIO:A2,fromIOK:hO,fromOption:hF,fromOptionK:hM,fromPredicate:hB,getAltIOValidation:hy,getApplicativeIOValidation:hg,getApplyMonoid:h2,getApplySemigroup:h1,getCompactable:hv,getFilterable:function(e){var t=cW(e),n=hv(e),r=fe(Aj,t),i=ft(Aj,t),o=fn(Aj,t),a=fr(Aj,t);return{URI:hm,_E:void 0,map:hr,compact:n.compact,separate:n.separate,filter:function(e,t){return ev(e,r(t))},filterMap:function(e,t){return ev(e,i(t))},partition:function(e,t){return ev(e,o(t))},partitionMap:function(e,t){return ev(e,a(t))}}},getIOValidation:function(e){var t=hg(e),n=hy(e);return{URI:hm,_E:void 0,map:hr,ap:t.ap,of:A1,chain:ho,bimap:ha,mapLeft:hu,alt:n.alt,fromIO:A2,throwError:A0}},getOrElse:A9,getOrElseW:A9,getSemigroup:function(e){return eq(AU)(cB(e))},ioEither:{URI:hm,bimap:ha,mapLeft:hu,map:hr,of:A1,ap:hi,chain:ho,alt:hs,fromIO:A2,throwError:A0},left:A0,leftIO:A6,map:hl,mapLeft:hd,match:A5,matchE:A3,matchEW:A3,matchW:A5,of:A1,orElse:A7,orElseFirst:he,orElseFirstIOK:function(e){return he(hO(e))},orElseFirstW:he,orElseW:A7,orLeft:ht,right:A1,rightIO:A2,sequenceArray:h$,sequenceSeqArray:h0,swap:hn,throwError:A0,toUnion:A8,traverseArray:hJ,traverseArrayWithIndex:hH,traverseReadonlyArrayWithIndex:hH,traverseReadonlyArrayWithIndexSeq:hZ,traverseReadonlyNonEmptyArrayWithIndex:hY,traverseReadonlyNonEmptyArrayWithIndexSeq:hG,traverseSeqArray:hX,traverseSeqArrayWithIndex:hZ,tryCatch:A4,tryCatchK:function(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return A4(function(){return e.apply(void 0,n)},t)}}},Symbol.toStringTag,{value:"Module"}));function h5(e){return em(e_,e.of)}function h3(e){return ed(e.of(eI))}function h9(e){return function(t){return e.map(t,e_)}}function h4(e){return em(lZ,e.of)}function h8(e){var t=h4(e);return function(e){return em(e,t)}}function h7(e){var t=ml(e),n=h8(e);return function(e){return t(n(e))}}function me(e){return function(t){return em(t,e.of)}}function mt(e){var t=ml(e),n=me(e);return function(e){return t(n(e))}}function mn(e){return function(t){return function(n){return e.of(sJ(t)(n))}}}function mr(e){return em(sX,e.of)}function mi(e){return function(t,n){return function(r){return e.map(r,lW(t,n))}}}function mo(e){return function(t,n){return function(r){return e.chain(r,lW(t,n))}}}function ma(e){return function(t){return function(n){return e.chain(n,lW(t,e.of))}}}function mu(e){return eY(e,lu)}function ms(e){return eP(e,lc)}function ml(e){var t=h3(e);return function(n){return function(r){return e.chain(r,lW(function(){return t()},n))}}}function mc(e){var t=h5(e);return function(n){return function(r){return e.chain(r,lW(n,t))}}}let md=Object.freeze(Object.defineProperty({__proto__:null,alt:mc,ap:ms,chain:ml,chainNullableK:h7,chainOptionK:mt,fromEither:mr,fromF:h9,fromNullable:h4,fromNullableK:h8,fromOptionK:me,fromPredicate:mn,getOptionM:function(e){var t=ms(e),n=mu(e),r=ml(e),i=mc(e),o=mo(e),a=ma(e),u=h3(e);return{map:function(e,t){return ev(e,n(t))},ap:function(e,n){return ev(e,t(n))},of:h5(e),chain:function(e,t){return ev(e,r(t))},alt:function(e,t){return ev(e,i(t))},fold:function(e,t,n){return ev(e,o(t,n))},getOrElse:function(e,t){return ev(e,a(t))},fromM:h9(e),none:function(){return u()}}},getOrElse:ma,map:mu,match:mi,matchE:mo,some:h5,zero:h3},Symbol.toStringTag,{value:"Module"}));var mf=h5(AM),mp=mn(AM),mA=mr(AM),mh=h9(Aj),mm=AO(sX),mg=mi(Aj),my=mo(AP),mv=ma(AW),mx=AO(l0),mb=AO(lX),mC=h4(AM),mS=h8(AM),mw=h7(AW),mI=me(AM),m_=mt(AW),mT=mu(Aj),mk=ms(AU),mO=ml(AW),mR=mO(ec),mE=mc(AW),mj=h3(AM),mF=mj(),mM=co(Aj,l_),mU=ca(Aj,l_,lu),mL=fe(Aj,lE),mK=ft(Aj,lE),mB=fn(Aj,lE),mP=fr(Aj,lE),mW=function(e,t){return ev(e,mT(t))},mD=function(e,t){return ev(e,mk(t))},mN=function(e,t){return ev(e,mO(t))},mq=function(e,t){return ev(e,mE(t))},mQ="IOOption",mV={URI:mQ,map:mW},mz=eH(mV),mY={URI:mQ,of:mf},mH={URI:mQ,map:mW,ap:mD},mG=eW(mH),mZ=eD(mH),mJ={URI:mQ,map:mW,ap:mD,chain:mN},m$=e1(mJ),mX={URI:mQ,zero:mj},m0=iJ(mX,mY),m1={URI:mQ,fromIO:mh},m2=fm(m1),m6=fg(m1,mJ),m5=fy(m1,mJ),m3={URI:mQ,fromEither:mA},m9=e8(m3),m4=e7(m3,mJ),m8=te(m3,mJ),m7=mf(eL),ge=eG(mV),gt=e2(mJ),gn=eN(mH),gr=mf(eU),gi=function(e){return em(AY(e),AO(l9(ex)))};let go=Object.freeze(Object.defineProperty({__proto__:null,Alt:{URI:mQ,map:mW,alt:mq},Alternative:{URI:mQ,map:mW,ap:mD,of:mf,alt:mq,zero:mj},ApT:gr,Applicative:{URI:mQ,map:mW,ap:mD,of:mf},Apply:mH,Chain:mJ,Compactable:{URI:mQ,compact:mM,separate:mU},Do:m7,Filterable:{URI:mQ,map:mW,compact:mM,separate:mU,filter:function(e,t){return ev(e,mL(t))},filterMap:function(e,t){return ev(e,mK(t))},partition:function(e,t){return ev(e,mB(t))},partitionMap:function(e,t){return ev(e,mP(t))}},FromEither:m3,FromIO:m1,Functor:mV,Monad:{URI:mQ,map:mW,ap:mD,of:mf,chain:mN},MonadIO:{URI:mQ,map:mW,ap:mD,of:mf,chain:mN,fromIO:mh},Pointed:mY,Zero:mX,alt:mE,altW:mE,ap:mk,apFirst:mG,apS:gn,apSecond:mZ,bind:gt,bindTo:ge,chain:mO,chainEitherK:m4,chainFirst:m$,chainFirstEitherK:m8,chainFirstIOK:m5,chainIOK:m6,chainNullableK:mw,chainOptionK:m_,compact:mM,filter:mL,filterMap:mK,flap:mz,flatten:mR,fold:my,fromEither:mA,fromEitherK:m9,fromIO:mh,fromIOEither:mm,fromIOK:m2,fromNullable:mC,fromNullableK:mS,fromOption:ed,fromOptionK:mI,fromPredicate:mp,getOrElse:mv,getOrElseW:mv,guard:m0,map:mT,match:mg,matchE:my,matchEW:my,matchW:mg,none:mF,of:mf,partition:mB,partitionMap:mP,separate:mU,some:mf,toNullable:mb,toUndefined:mx,traverseReadonlyArrayWithIndex:function(e){var t=gi(e);return function(e){return ej(e)?t(e):gr}},traverseReadonlyNonEmptyArrayWithIndex:gi,zero:mj},Symbol.toStringTag,{value:"Module"}));var ga=function(){function e(e){var t=this;this.value=e,this.read=function(){return t.value},this.write=this.write.bind(this),this.modify=this.modify.bind(this)}return e.prototype.write=function(e){var t=this;return function(){t.value=e}},e.prototype.modify=function(e){var t=this;return function(){t.value=e(t.value)}},e}();let gu=Object.freeze(Object.defineProperty({__proto__:null,IORef:ga,newIORef:function(e){return function(){return new ga(e)}}},Symbol.toStringTag,{value:"Module"})),gs=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),gl=Object.freeze(Object.defineProperty({__proto__:null,parse:function(e){return dx(function(){return JSON.parse(e)},ec)},stringify:function(e){return dx(function(){var t=JSON.stringify(e);if("string"!=typeof t)throw Error("Converting unsupported structure to JSON");return t},ec)}},Symbol.toStringTag,{value:"Module"})),gc=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function gd(e,t){return{show:function(n){var r=[];return n.forEach(function(n,i){r.push("[".concat(e.show(i),", ").concat(t.show(n),"]"))}),"new Map([".concat(r.sort().join(", "),"])")}}}var gf=function(e){return e.size},gp=function(e){return 0===e.size};function gA(e){var t=gS(e);return function(n,r){if(void 0===r){var i=gA(e);return function(e){return i(n,e)}}return ew(t(n,r))}}function gh(e){return function(t,n){if(void 0===n){var r=gh(e);return function(e){return r(t,e)}}for(var i,o=n.values();!(i=o.next()).done;){var a=i.value;if(e.equals(t,a))return!0}return!1}}var gm=function(e){return function(t){return Array.from(t.keys()).sort(e.compare)}};function gg(e){var t=gm(e);return function(e){return function(n){for(var r=[],i=t(n),o=0;o<i.length;o++){var a=i[o];r.push(e(a,n.get(a)))}return r}}}var gy=function(e){return gg(e)(function(e,t){return[e,t]})},gv=function(e){var t=gC(e);return function(e,n){var r=t(e);return function(t){var i=r(t);if(eS(i)){var o=new Map(t);return o.set(e,n),o}if(i.value[1]!==n){var o=new Map(t);return o.set(i.value[0],n),o}return t}}},gx=function(e){var t=gC(e);return function(e){return function(n){var r=t(e,n);if(ew(r)){var i=new Map(n);return i.delete(r.value[0]),i}return n}}},gb=function(e){var t=gC(e);return function(e,n){return function(r){var i=t(e,r);if(eS(i))return eI;var o=i.value,a=o[0],u=o[1],s=n(u);if(s===u)return e_(r);var l=new Map(r);return l.set(a,s),e_(l)}}};function gC(e){return function(t,n){if(void 0===n){var r=gC(e);return function(e){return r(t,e)}}for(var i,o=n.entries();!(i=o.next()).done;){var a=i.value,u=a[0],s=a[1];if(e.equals(u,t))return e_([u,s])}return eI}}function gS(e){var t=gC(e);return function(n,r){if(void 0===r){var i=gS(e);return function(e){return i(n,e)}}return ev(t(n,r),la(function(e){return e[0],e[1]}))}}function gw(e,t){var n=gC(e);return function(r,i){if(void 0===i){var o=gw(e,t);return function(e){return o(e,r)}}for(var a,u=r.entries();!(a=u.next()).done;){var s=a.value,l=s[0],c=s[1],d=n(l,i);if(eS(d)||!e.equals(l,d.value[0])||!t.equals(c,d.value[1]))return!1}return!0}}var gI=new Map;function g_(e,t){var n=gw(e,t);return tr(function(e,t){return n(e,t)&&n(t,e)})}var gT=function(e,t){for(var n,r=new Map,i=e.entries();!(n=i.next()).done;){var o=n.value,a=o[0],u=o[1];r.set(a,t(a,u))}return r},gk=function(e){return function(t){for(var n,r=new Map,i=new Map,o=t.entries();!(n=o.next()).done;){var a=n.value,u=a[0],s=e(u,a[1]);eT(s)?r.set(u,s.left):i.set(u,s.right)}return iK(r,i)}};function gO(e){return function(t){for(var n,r=new Map,i=new Map,o=t.entries();!(n=o.next()).done;){var a=n.value,u=a[0],s=a[1];e(u,s)?i.set(u,s):r.set(u,s)}return iK(r,i)}}var gR=function(e){return function(t){for(var n,r=new Map,i=t.entries();!(n=i.next()).done;){var o=n.value,a=o[0],u=e(a,o[1]);ew(u)&&r.set(a,u.value)}return r}};function gE(e){return function(t){for(var n,r=new Map,i=t.entries();!(n=i.next()).done;){var o=n.value,a=o[0],u=o[1];e(a,u)&&r.set(a,u)}return r}}var gj=function(e,t){return gT(e,function(e,n){return t(n)})},gF=function(e,t){return gK(e,function(e,n){return t(n)})},gM=function(e,t){return gB(e,function(e,n){return t(n)})},gU=function(e,t){return gP(e,function(e,n){return t(n)})},gL=function(e,t){return gW(e,function(e,n){return t(n)})},gK=function(e,t){return ev(e,gE(t))},gB=function(e,t){return ev(e,gR(t))},gP=function(e,t){return ev(e,gO(t))},gW=function(e,t){return ev(e,gk(t))},gD=function(e){for(var t,n=new Map,r=e.entries();!(t=r.next()).done;){var i=t.value,o=i[0],a=i[1];ew(a)&&n.set(o,a.value)}return n},gN=function(e){for(var t,n=new Map,r=new Map,i=e.entries();!(t=i.next()).done;){var o=t.value,a=o[0],u=o[1];eT(u)?n.set(a,u.left):r.set(a,u.right)}return iK(n,r)},gq="ReadonlyMap",gQ=function(e,t){var n=g6(e,t);return{concat:function(e,t){return n(t)(e)}}},gV={URI:gq,map:gj},gz=eH(gV),gY={URI:gq,compact:gD,separate:gN},gH=function(e){var t=g$(e);return function(e,n){return t(e,function(e,t,r){return n(t,r)})}},gG=function(e){var t=gX(e);return function(e){var n=t(e);return function(e){return n(function(t,n){return e(n)})}}},gZ=function(e){var t=g0(e);return function(e,n){return t(e,function(e,t,r){return n(t,r)})}},gJ=function(e){var t=gH(e),n=gG(e),r=gZ(e);return{URI:gq,_E:void 0,reduce:function(e,n,r){return ev(e,t(n,r))},foldMap:function(e){var t=n(e);return function(e,n){return ev(e,t(n))}},reduceRight:function(e,t,n){return ev(e,r(t,n))}}},g$=function(e){var t=gm(e);return function(e,n){return function(r){for(var i=e,o=0,a=t(r);o<a.length;o++){var u=a[o];i=n(u,i,r.get(u))}return i}}},gX=function(e){var t=gm(e);return function(e){return function(n){return function(r){for(var i=e.empty,o=0,a=t(r);o<a.length;o++){var u=a[o];i=e.concat(i,n(u,r.get(u)))}return i}}}},g0=function(e){var t=gm(e);return function(e,n){return function(r){for(var i=e,o=t(r),a=o.length,u=a-1;u>=0;u--){var s=o[u];i=n(s,r.get(s),i)}return i}}},g1=function(e){var t=gJ(e),n=g$(e),r=gX(e),i=g0(e);return{URI:gq,_E:void 0,reduce:t.reduce,foldMap:t.foldMap,reduceRight:t.reduceRight,reduceWithIndex:function(e,t,r){return ev(e,n(t,r))},foldMapWithIndex:function(e){var t=r(e);return function(e,n){return ev(e,t(n))}},reduceRightWithIndex:function(e,t,n){return ev(e,i(t,n))}}},g2=function(e){var t=g1(e),n=gm(e),r=function(e){return function(t,r){for(var i=e.of(new Map),o=n(t),a=o.length,u=0;u<a;u++)!function(n){var a=o[n],u=t.get(a);i=e.ap(e.map(i,function(e){return function(t){return e.set(a,t)}}),r(a,u))}(u);return i}};return{URI:gq,_E:void 0,map:gj,mapWithIndex:gT,reduce:t.reduce,foldMap:t.foldMap,reduceRight:t.reduceRight,reduceWithIndex:t.reduceWithIndex,foldMapWithIndex:t.foldMapWithIndex,reduceRightWithIndex:t.reduceRightWithIndex,traverse:function(e){var t=r(e);return function(e,n){return t(e,function(e,t){return n(t)})}},sequence:function(e){var t=r(e);return function(e){return t(e,ex)}},traverseWithIndex:r}},g6=function(e,t){var n=gS(e);return function(e){return function(r){if(gp(r))return e;if(gp(e))return r;for(var i,o=new Map,a=r.entries();!(i=a.next()).done;){var u=i.value,s=u[0],l=u[1],c=n(s)(e);ew(c)?o.set(s,t.concat(l,c.value)):o.set(s,l)}for(var d=e.entries();!(i=d.next()).done;){var f=i.value,s=f[0],l=f[1],c=n(s)(o);eS(c)&&o.set(s,l)}return o}}},g5=function(e,t){var n=gS(e);return function(e){return function(r){if(gp(r)||gp(e))return gI;for(var i,o=new Map,a=r.entries();!(i=a.next()).done;){var u=i.value,s=u[0],l=u[1],c=n(s)(e);ew(c)&&o.set(s,t.concat(l,c.value))}return o}}},g3=function(e){var t=gA(e);return function(e){return function(n){if(gp(n))return e;if(gp(e))return n;for(var r,i=new Map,o=n.entries();!(r=o.next()).done;){var a=r.value,u=a[0],s=a[1];t(u)(e)||i.set(u,s)}for(var l=e.entries();!(r=l.next()).done;){var c=r.value,u=c[0],s=c[1];t(u)(n)||i.set(u,s)}return i}}};let g9=Object.freeze(Object.defineProperty({__proto__:null,Compactable:gY,Filterable:{URI:gq,map:gj,compact:gD,separate:gN,filter:gF,filterMap:gM,partition:gU,partitionMap:gL},Functor:gV,URI:gq,collect:gg,compact:gD,deleteAt:gx,difference:g3,elem:gh,empty:gI,filter:function(e){return function(t){return gF(t,e)}},filterMap:function(e){return function(t){return gM(t,e)}},filterMapWithIndex:gR,filterWithIndex:gE,flap:gz,foldMap:gG,foldMapWithIndex:gX,fromFoldable:function(e,t,n){return function(r){var i=gC(e);return n.reduce(r,new Map,function(e,n){var r=n[0],o=n[1],a=i(r,e);return ew(a)?e.set(a.value[0],t.concat(a.value[1],o)):e.set(r,o),e})}},fromMap:function(e){return new Map(e)},getDifferenceMagma:function(e){return function(){var t=g3(e);return{concat:function(e,n){return t(n)(e)}}}},getEq:g_,getFilterableWithIndex:function(){return{URI:gq,_E:void 0,map:gj,mapWithIndex:gT,compact:gD,separate:gN,filter:gF,filterMap:gM,partition:gU,partitionMap:gL,partitionMapWithIndex:gW,partitionWithIndex:gP,filterMapWithIndex:gB,filterWithIndex:gK}},getFoldable:gJ,getFoldableWithIndex:g1,getFunctorWithIndex:function(){return{URI:gq,_E:void 0,map:gj,mapWithIndex:gT}},getIntersectionSemigroup:function(e,t){var n=g5(e,t);return{concat:function(e,t){return n(t)(e)}}},getMonoid:function(e,t){var n=gC(e);return{concat:function(e,r){if(gp(e))return r;if(gp(r))return e;for(var i,o=new Map(e),a=r.entries();!(i=a.next()).done;){var u=i.value,s=u[0],l=u[1],c=n(s,e);ew(c)?o.set(c.value[0],t.concat(c.value[1],l)):o.set(s,l)}return o},empty:gI}},getShow:gd,getTraversable:function(e){var t=g2(e),n=gJ(e);return{URI:gq,_E:void 0,map:gj,reduce:n.reduce,foldMap:n.foldMap,reduceRight:n.reduceRight,traverse:t.traverse,sequence:t.sequence}},getTraversableWithIndex:g2,getUnionMonoid:function(e,t){return{concat:gQ(e,t).concat,empty:gI}},getUnionSemigroup:gQ,getWitherable:function(e){var t=g2(e);return{URI:gq,_E:void 0,map:gj,compact:gD,separate:gN,filter:gF,filterMap:gM,partition:gU,partitionMap:gL,reduce:t.reduce,foldMap:t.foldMap,reduceRight:t.reduceRight,traverse:t.traverse,sequence:t.sequence,mapWithIndex:gT,reduceWithIndex:t.reduceWithIndex,foldMapWithIndex:t.foldMapWithIndex,reduceRightWithIndex:t.reduceRightWithIndex,traverseWithIndex:t.traverseWithIndex,wilt:iY(t,gY),wither:iH(t,gY)}},insertAt:gv,intersection:g5,isEmpty:gp,isSubmap:gw,keys:gm,lookup:gS,lookupWithKey:gC,map:function(e){return function(t){return gj(t,e)}},mapWithIndex:function(e){return function(t){return gT(t,e)}},member:gA,modifyAt:gb,partition:function(e){return function(t){return gU(t,e)}},partitionMap:function(e){return function(t){return gL(t,e)}},partitionMapWithIndex:gk,partitionWithIndex:gO,pop:function(e){var t=gS(e),n=gx(e);return function(e){var r=n(e);return function(n){return ev(t(e,n),la(function(e){return[e,r(n)]}))}}},readonlyMap:{URI:gq,map:gj,compact:gD,separate:gN,filter:gF,filterMap:gM,partition:gU,partitionMap:gL},reduce:gH,reduceRight:gZ,reduceRightWithIndex:g0,reduceWithIndex:g$,separate:gN,singleton:function(e,t){return new Map([[e,t]])},size:gf,toMap:function(e){return new Map(e)},toReadonlyArray:gy,toUnfoldable:function(e,t){var n=gy(e);return function(e){var r=n(e),i=r.length;return t.unfold(0,function(e){return e<i?e_([r[e],e+1]):eI})}},union:g6,updateAt:function(e){var t=gb(e);return function(e,n){return t(e,function(){return n})}},upsertAt:gv,values:function(e){return function(t){return Array.from(t.values()).sort(e.compare)}}},Symbol.toStringTag,{value:"Module"}));var g4=function(){return(g4=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},g8=function(e){return function(t){return Array.from(t.keys()).sort(e.compare)}};function g7(e){var t=g8(e);return function(e){return function(n){for(var r=[],i=t(n),o=0;o<i.length;o++){var a=i[o];r.push(e(a,n.get(a)))}return r}}}function ye(e){return g7(e)(function(e,t){return[e,t]})}var yt=function(e){var t=yi(e);return function(e,n){var r=t(e);return function(t){var i=r(t);if(eS(i)){var o=new Map(t);return o.set(e,n),o}if(i.value[1]!==n){var o=new Map(t);return o.set(i.value[0],n),o}return t}}},yn=function(e){var t=yi(e);return function(e){return function(n){var r=t(e,n);if(ew(r)){var i=new Map(n);return i.delete(r.value[0]),i}return n}}},yr=function(e){var t=yi(e);return function(e,n){return function(r){var i=t(e,r);if(eS(i))return eI;var o=new Map(r);return o.set(i.value[0],n(i.value[1])),e_(o)}}};function yi(e){return function(t,n){if(void 0===n){var r=yi(e);return function(e){return r(t,e)}}for(var i,o=n.entries();!(i=o.next()).done;){var a=i.value,u=a[0],s=a[1];if(e.equals(u,t))return e_([u,s])}return eI}}var yo=gS,ya=function(e,t){for(var n,r=new Map,i=e.entries();!(n=i.next()).done;){var o=n.value,a=o[0],u=o[1];r.set(a,t(a,u))}return r},yu=function(e){return function(t){for(var n,r=new Map,i=new Map,o=t.entries();!(n=o.next()).done;){var a=n.value,u=a[0],s=e(u,a[1]);eT(s)?r.set(u,s.left):i.set(u,s.right)}return iK(r,i)}};function ys(e){return function(t){for(var n,r=new Map,i=new Map,o=t.entries();!(n=o.next()).done;){var a=n.value,u=a[0],s=a[1];e(u,s)?i.set(u,s):r.set(u,s)}return iK(r,i)}}var yl=function(e){return function(t){for(var n,r=new Map,i=t.entries();!(n=i.next()).done;){var o=n.value,a=o[0],u=e(a,o[1]);ew(u)&&r.set(a,u.value)}return r}};function yc(e){return function(t){for(var n,r=new Map,i=t.entries();!(n=i.next()).done;){var o=n.value,a=o[0],u=o[1];e(a,u)&&r.set(a,u)}return r}}var yd=function(e,t){return ya(e,function(e,n){return t(n)})},yf=function(e,t){return ym(e,function(e,n){return t(n)})},yp=function(e,t){return yg(e,function(e,n){return t(n)})},yA=function(e,t){return yy(e,function(e,n){return t(n)})},yh=function(e,t){return yv(e,function(e,n){return t(n)})},ym=function(e,t){return ev(e,yc(t))},yg=function(e,t){return ev(e,yl(t))},yy=function(e,t){return ev(e,ys(t))},yv=function(e,t){return ev(e,yu(t))},yx=function(e){for(var t,n=new Map,r=e.entries();!(t=r.next()).done;){var i=t.value,o=i[0],a=i[1];ew(a)&&n.set(o,a.value)}return n},yb=function(e){for(var t,n=new Map,r=new Map,i=e.entries();!(t=i.next()).done;){var o=t.value,a=o[0],u=o[1];eT(u)?n.set(a,u.left):r.set(a,u.right)}return iK(n,r)},yC=function(e,t){var n=yR(e,t);return{concat:function(e,t){return n(t)(e)}}},yS=function(e){return g4(g4({},g1(e)),{URI:"Map"})},yw=function(e){var t=yS(e),n=g8(e),r=function(e){return function(t,r){for(var i=e.of(new Map),o=n(t),a=o.length,u=0;u<a;u++)!function(n){var a=o[n],u=t.get(a);i=e.ap(e.map(i,function(e){return function(t){return e.set(a,t)}}),r(a,u))}(u);return i}};return{URI:"Map",_E:void 0,map:yd,mapWithIndex:ya,reduce:t.reduce,foldMap:t.foldMap,reduceRight:t.reduceRight,reduceWithIndex:t.reduceWithIndex,foldMapWithIndex:t.foldMapWithIndex,reduceRightWithIndex:t.reduceRightWithIndex,traverse:function(e){var t=r(e);return function(e,n){return t(e,function(e,t){return n(t)})}},sequence:function(e){var t=r(e);return function(e){return t(e,function(e,t){return t})}},traverseWithIndex:r}},yI={URI:"Map",map:yd},y_=eH(yI),yT={URI:"Map",compact:yx,separate:yb},yk={URI:"Map",map:yd,compact:yx,separate:yb,filter:yf,filterMap:yp,partition:yA,partitionMap:yh},yO=function(e){return new Map(e)},yR=function(e,t){var n=g6(e,t);return function(e){return function(t){return gp(t)?yO(e):gp(e)?yO(t):n(e)(t)}}},yE=function(e,t){var n=g5(e,t);return function(e){return function(t){return gp(t)||gp(e)?new Map:n(e)(t)}}},yj=function(e){var t=g3(e);return function(e){return function(n){return gp(n)?yO(e):gp(e)?yO(n):t(e)(n)}}};let yF=Object.freeze(Object.defineProperty({__proto__:null,Compactable:yT,Filterable:yk,Functor:yI,URI:"Map",collect:g7,compact:yx,deleteAt:yn,difference:yj,elem:gh,empty:new Map,filter:function(e){return function(t){return yf(t,e)}},filterMap:function(e){return function(t){return yp(t,e)}},filterMapWithIndex:yl,filterWithIndex:yc,flap:y_,foldMap:gG,foldMapWithIndex:gX,fromFoldable:function(e,t,n){return function(r){var i=yi(e);return n.reduce(r,new Map,function(e,n){var r=n[0],o=n[1],a=i(r,e);return ew(a)?e.set(a.value[0],t.concat(a.value[1],o)):e.set(r,o),e})}},getDifferenceMagma:function(e){return function(){var t=yj(e);return{concat:function(e,n){return t(n)(e)}}}},getEq:g_,getFilterableWithIndex:function(){return{URI:"Map",_E:void 0,map:yd,mapWithIndex:ya,compact:yx,separate:yb,filter:yf,filterMap:yp,partition:yA,partitionMap:yh,partitionMapWithIndex:yv,partitionWithIndex:yy,filterMapWithIndex:yg,filterWithIndex:ym}},getFoldable:function(e){return g4(g4({},gJ(e)),{URI:"Map"})},getFoldableWithIndex:yS,getIntersectionSemigroup:function(e,t){var n=yE(e,t);return{concat:function(e,t){return n(t)(e)}}},getMonoid:function(e,t){var n=yi(e);return{concat:function(e,r){if(gp(e))return r;if(gp(r))return e;for(var i,o=new Map(e),a=r.entries();!(i=a.next()).done;){var u=i.value,s=u[0],l=u[1],c=n(s,e);ew(c)?o.set(c.value[0],t.concat(c.value[1],l)):o.set(s,l)}return o},empty:new Map}},getShow:gd,getTraversableWithIndex:yw,getUnionMonoid:function(e,t){return{concat:yC(e,t).concat,empty:new Map}},getUnionSemigroup:yC,getWitherable:function(e){var t=yw(e);return{URI:"Map",_E:void 0,map:yd,compact:yx,separate:yb,filter:yf,filterMap:yp,partition:yA,partitionMap:yh,reduce:t.reduce,foldMap:t.foldMap,reduceRight:t.reduceRight,traverse:t.traverse,sequence:t.sequence,mapWithIndex:ya,reduceWithIndex:t.reduceWithIndex,foldMapWithIndex:t.foldMapWithIndex,reduceRightWithIndex:t.reduceRightWithIndex,traverseWithIndex:t.traverseWithIndex,wilt:iY(t,yT),wither:iH(t,yT)}},insertAt:yt,intersection:yE,isEmpty:gp,isSubmap:gw,keys:g8,lookup:yo,lookupWithKey:yi,map:function(e){return function(t){return yd(t,e)}},mapWithIndex:function(e){return function(t){return ya(t,e)}},map_:yk,member:gA,modifyAt:yr,partition:function(e){return function(t){return yA(t,e)}},partitionMap:function(e){return function(t){return yh(t,e)}},partitionMapWithIndex:yu,partitionWithIndex:ys,pop:function(e){var t=yo(e),n=yn(e);return function(e){var r=n(e);return function(n){return ev(t(e,n),la(function(e){return[e,r(n)]}))}}},reduce:gH,reduceRight:gZ,reduceRightWithIndex:g0,reduceWithIndex:g$,separate:yb,singleton:function(e,t){return new Map([[e,t]])},size:gf,toArray:ye,toUnfoldable:function(e,t){var n=ye(e);return function(e){var r=n(e),i=r.length;return t.unfold(0,function(e){return e<i?e_([r[e],e+1]):eI})}},union:yR,updateAt:function(e){var t=yr(e);return function(e,n){return t(e,function(){return n})}},upsertAt:yt,values:function(e){return function(t){return Array.from(t.values()).sort(e.compare)}}},Symbol.toStringTag,{value:"Module"})),yM=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),yU=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),yL=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),yK=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),yB=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var yP=function(e){return{concat:tF(e).concat,empty:e.top}},yW=function(e){return{concat:tM(e).concat,empty:e.bottom}},yD=function(e){return{concat:tR(e).concat,empty:e.empty}},yN=function(e){var t={};for(var n in e)eK.call(e,n)&&(t[n]=e[n].empty);return{concat:tL(e).concat,empty:t}},yq=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return{concat:tK.apply(tY,e).concat,empty:e.map(function(e){return e.empty})}},yQ=function(e){return tE(e)(e.empty)},yV={concat:tD.concat,empty:void 0},yz={concat:tN.concat,empty:!0},yY={concat:tq.concat,empty:!1},yH={concat:tQ.concat,empty:""},yG={concat:tV.concat,empty:0};let yZ=Object.freeze(Object.defineProperty({__proto__:null,concatAll:yQ,fold:yQ,getDualMonoid:yD,getEndomorphismMonoid:function(){return yD(d3())},getFunctionMonoid:eu,getJoinMonoid:yW,getMeetMonoid:yP,getStructMonoid:yN,getTupleMonoid:yq,max:yW,min:yP,monoidAll:yz,monoidAny:yY,monoidProduct:{concat:tz.concat,empty:1},monoidString:yH,monoidSum:yG,monoidVoid:yV,reverse:yD,struct:yN,tuple:yq},Symbol.toStringTag,{value:"Module"})),yJ=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var y$=function(e,t,n){return function(r){return -1===r?e():0===r?t():n()}},yX=function(e){return -1===e?1:1===e?-1:0},y0={equals:function(e,t){return e===t}},y1={concat:function(e,t){return 0!==e?e:t}},y2={concat:y1.concat,empty:0};let y6=Object.freeze(Object.defineProperty({__proto__:null,Eq:y0,Monoid:y2,Semigroup:y1,eqOrdering:y0,invert:yX,match:y$,matchW:y$,monoidOrdering:y2,reverse:yX,semigroupOrdering:y1,sign:function(e){return e<=-1?-1:e>=1?1:0}},Symbol.toStringTag,{value:"Module"})),y5=Object.freeze(Object.defineProperty({__proto__:null,pipe:ev,pipeable:function(e){var t={};return"function"==typeof e.map&&(t.map=function(t){return function(n){return e.map(n,t)}}),"function"==typeof e.contramap&&(t.contramap=function(t){return function(n){return e.contramap(n,t)}}),"function"==typeof e.mapWithIndex&&(t.mapWithIndex=function(t){return function(n){return e.mapWithIndex(n,t)}}),"function"==typeof e.ap&&(t.ap=function(t){return function(n){return e.ap(n,t)}},t.apFirst=function(t){return function(n){return e.ap(e.map(n,function(e){return function(){return e}}),t)}},t.apSecond=function(t){return function(n){return e.ap(e.map(n,function(){return function(e){return e}}),t)}}),"function"==typeof e.chain&&(t.chain=function(t){return function(n){return e.chain(n,t)}},t.chainFirst=function(t){return function(n){return e.chain(n,function(n){return e.map(t(n),function(){return n})})}},t.flatten=function(t){return e.chain(t,ec)}),"function"==typeof e.bimap&&(t.bimap=function(t,n){return function(r){return e.bimap(r,t,n)}},t.mapLeft=function(t){return function(n){return e.mapLeft(n,t)}}),"function"==typeof e.extend&&(t.extend=function(t){return function(n){return e.extend(n,t)}},t.duplicate=function(t){return e.extend(t,ec)}),"function"==typeof e.reduce&&(t.reduce=function(t,n){return function(r){return e.reduce(r,t,n)}},t.foldMap=function(t){var n=e.foldMap(t);return function(e){return function(t){return n(t,e)}}},t.reduceRight=function(t,n){return function(r){return e.reduceRight(r,t,n)}}),"function"==typeof e.reduceWithIndex&&(t.reduceWithIndex=function(t,n){return function(r){return e.reduceWithIndex(r,t,n)}},t.foldMapWithIndex=function(t){var n=e.foldMapWithIndex(t);return function(e){return function(t){return n(t,e)}}},t.reduceRightWithIndex=function(t,n){return function(r){return e.reduceRightWithIndex(r,t,n)}}),"function"==typeof e.alt&&(t.alt=function(t){return function(n){return e.alt(n,t)}}),"function"==typeof e.compact&&(t.compact=e.compact,t.separate=e.separate),"function"==typeof e.filter&&(t.filter=function(t){return function(n){return e.filter(n,t)}},t.filterMap=function(t){return function(n){return e.filterMap(n,t)}},t.partition=function(t){return function(n){return e.partition(n,t)}},t.partitionMap=function(t){return function(n){return e.partitionMap(n,t)}}),"function"==typeof e.filterWithIndex&&(t.filterWithIndex=function(t){return function(n){return e.filterWithIndex(n,t)}},t.filterMapWithIndex=function(t){return function(n){return e.filterMapWithIndex(n,t)}},t.partitionWithIndex=function(t){return function(n){return e.partitionWithIndex(n,t)}},t.partitionMapWithIndex=function(t){return function(n){return e.partitionMapWithIndex(n,t)}}),"function"==typeof e.promap&&(t.promap=function(t,n){return function(r){return e.promap(r,t,n)}}),"function"==typeof e.compose&&(t.compose=function(t){return function(n){return e.compose(n,t)}}),"function"==typeof e.throwError&&(t.fromOption=function(t){return function(n){return"None"===n._tag?e.throwError(t()):e.of(n.value)}},t.fromEither=function(t){return"Left"===t._tag?e.throwError(t.left):e.of(t.right)},t.fromPredicate=function(t,n){return function(r){return t(r)?e.of(r):e.throwError(n(r))}},t.filterOrElse=function(t,n){return function(r){return e.chain(r,function(r){return t(r)?e.of(r):e.throwError(n(r))})}}),t}},Symbol.toStringTag,{value:"Module"})),y3=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),y9=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var y4=function(){return Math.random()};function y8(e,t){return ev(y4,AO(function(n){return Math.floor((t-e+1)*n+e)}))}var y7=ev(y4,AO(function(e){return e<.5}));let ve=Object.freeze(Object.defineProperty({__proto__:null,random:y4,randomBool:y7,randomElem:function(e){return ev(y8(0,e.length-1),AO(function(t){return e[t]}))},randomInt:y8,randomRange:function(e,t){return ev(y4,AO(function(n){return(t-e)*n+e}))}},Symbol.toStringTag,{value:"Module"}));var vt=dL(fQ),vn=dU(fQ),vr=dK(fN),vi=dB(fN),vo=dG(fN),va=dZ(fZ),vu=dJ(fZ),vs=d2(fN),vl=d$(fZ),vc=dX(fZ),vd=d0(fZ),vf=d1(fN),vp=function(e,t){return ev(e,vv(t))},vA=function(e,t,n){return ev(e,vx(t,n))},vh=function(e,t){return ev(e,vb(t))},vm=function(e,t){return ev(e,vC(t))},vg=function(e,t){return ev(e,vS(t))},vy=function(e,t){return ev(e,vI(t))},vv=dN(fN),vx=dz(fN),vb=dY(fN),vC=dq(fV),vS=dQ(fZ),vw=vS(ec),vI=dV(fZ),v_="ReaderEither",vT=function(e){var t=cP(e);return{URI:v_,_E:void 0,compact:co(fN,t),separate:ca(fN,t,cQ)}};function vk(e){var t=eP(fV,cD(e));return{URI:v_,_E:void 0,map:vp,ap:function(e,n){return ev(e,t(n))},of:vn}}function vO(e){var t=dH(fZ,e);return{URI:v_,_E:void 0,map:vp,alt:function(e,n){return ev(e,t(n))}}}var vR={URI:v_,map:vp},vE=eH(vR),vj={URI:v_,map:vp,ap:vm},vF=eW(vj),vM=eD(vj),vU={URI:v_,map:vp,ap:vm,of:vn},vL={URI:v_,map:vp,ap:vm,chain:vg},vK=e1(vL),vB={URI:v_,fromReader:vr},vP=pe(vB),vW=pt(vB),vD=pn(vB),vN=pr(vB,vL),vq=pi(vB,vL),vQ={URI:v_,fromEither:ed},vV=e5(vQ),vz=e9(vQ),vY=e4(vQ,vL),vH=e7(vQ,vL),vG=te(vQ,vL),vZ=e3(vQ),vJ=tt(vQ,vL),v$=e8(vQ),vX=vn(eL),v0=eG(vR),v1=e2(vL),v2=eN(vj),v6=vn(eU),v5=function(e){return em(f6(e),fk(dk(ex)))},v3=function(e){var t=v5(e);return function(e){return ej(e)?t(e):v6}},v9=function(e){return v3(function(t,n){return e(n)})},v4=v9(ec),v8=eq(vj),v7=e$(vU);let xe=Object.freeze(Object.defineProperty({__proto__:null,Alt:{URI:v_,map:vp,alt:vy},ApT:v6,Applicative:vU,Apply:vj,Bifunctor:{URI:v_,bimap:vA,mapLeft:vh},Chain:vL,Do:vX,FromEither:vQ,FromReader:vB,Functor:vR,Monad:{URI:v_,map:vp,ap:vm,of:vn,chain:vg},MonadThrow:{URI:v_,map:vp,ap:vm,of:vn,chain:vg,throwError:vt},Pointed:{URI:v_,of:vn},URI:v_,alt:vI,altW:vI,ap:vC,apFirst:vF,apFirstW:vF,apS:v2,apSW:v2,apSecond:vM,apSecondW:vM,apW:vC,ask:vP,asks:vW,asksReaderEither:fC,asksReaderEitherW:fC,bimap:vx,bind:v1,bindTo:v0,bindW:v1,chain:vS,chainEitherK:vH,chainEitherKW:vH,chainFirst:vK,chainFirstEitherK:vG,chainFirstEitherKW:vG,chainFirstReaderK:vq,chainFirstReaderKW:vq,chainFirstW:vK,chainOptionK:vY,chainReaderK:vN,chainReaderKW:vN,chainW:vS,filterOrElse:vJ,filterOrElseW:vJ,flap:vE,flatten:vw,flattenW:vw,fold:va,foldW:va,fromEither:ed,fromEitherK:v$,fromOption:vV,fromOptionK:vz,fromPredicate:vZ,fromReader:vr,fromReaderK:vD,getAltReaderValidation:vO,getApplicativeReaderValidation:vk,getApplyMonoid:v7,getApplySemigroup:v8,getCompactable:vT,getFilterable:function(e){var t=cW(e),n=vT(e),r=fe(fN,t),i=ft(fN,t),o=fn(fN,t),a=fr(fN,t);return{URI:v_,_E:void 0,map:vp,compact:n.compact,separate:n.separate,filter:function(e,t){return ev(e,r(t))},filterMap:function(e,t){return ev(e,i(t))},partition:function(e,t){return ev(e,o(t))},partitionMap:function(e,t){return ev(e,a(t))}}},getOrElse:vu,getOrElseW:vu,getReaderValidation:function(e){var t=vk(e),n=vO(e);return{URI:v_,_E:void 0,map:vp,ap:t.ap,of:vn,chain:vg,bimap:vA,mapLeft:vh,alt:n.alt,throwError:vt}},getSemigroup:function(e){return eq(fV)(cB(e))},left:vt,leftReader:vi,local:fb,map:vv,mapLeft:vb,match:vo,matchE:va,matchEW:va,matchW:vo,of:vn,orElse:vl,orElseFirst:vc,orElseFirstW:vc,orElseW:vl,orLeft:vd,readerEither:{URI:v_,bimap:vA,mapLeft:vh,map:vp,of:vn,ap:vm,chain:vg,alt:vy,throwError:vt},right:vn,rightReader:vr,sequenceArray:v4,swap:vf,throwError:vt,toUnion:vs,traverseArray:v9,traverseArrayWithIndex:v3,traverseReadonlyArrayWithIndex:v3,traverseReadonlyNonEmptyArrayWithIndex:v5},Symbol.toStringTag,{value:"Module"}));function xt(e){return function(t){return function(){return e.of(t)}}}function xn(e){return function(t){return function(n){return function(r){return e.map(n(r),t)}}}}function xr(e){return function(t){return function(n){return function(r){return e.ap(n(r),t(r))}}}}function xi(e){return function(t){return function(n){return function(r){return e.chain(n(r),function(e){return t(e)(r)})}}}}function xo(e){return function(t){return em(t,e.of)}}let xa=Object.freeze(Object.defineProperty({__proto__:null,ap:xr,chain:xi,fromNaturalTransformation:function(e){return function(t){return em(t,e)}},fromReader:xo,getReaderM:function(e){var t=xr(e),n=xn(e),r=xi(e);return{map:function(e,t){return ev(e,n(t))},ap:function(e,n){return ev(e,t(n))},of:xt(e),chain:function(e,t){return ev(e,r(t))},ask:function(){return e.of},asks:function(t){return em(t,e.of)},local:function(e,t){return function(n){return e(t(n))}},fromReader:xo(e),fromM:function(e){return function(){return e}}}},map:xn,of:xt},Symbol.toStringTag,{value:"Module"}));var xu=function(e){return function(){return Promise.resolve().then(e)}},xs=function(e,t){return ev(e,xf(t))},xl=function(e,t){return ev(e,xp(t))},xc=function(e,t){return ev(e,xh(function(e){return ev(t,xf(e))}))},xd=function(e,t){return ev(e,xh(t))},xf=function(e){return function(t){return function(){return Promise.resolve().then(t).then(e)}}},xp=function(e){return function(t){return function(){return Promise.all([Promise.resolve().then(t),Promise.resolve().then(e)]).then(function(e){return(0,e[0])(e[1])})}}},xA=function(e){return function(){return Promise.resolve(e)}},xh=function(e){return function(t){return function(){return Promise.resolve().then(t).then(function(t){return e(t)()})}}},xm=xh(ec),xg="Task",xy={URI:xg,map:xs},xv=eH(xy),xx={URI:xg,of:xA},xb={URI:xg,map:xs,ap:xl},xC=eW(xb),xS=eD(xb),xw={URI:xg,map:xs,ap:xl,of:xA},xI={URI:xg,map:xs,ap:xc},x_={URI:xg,map:xs,ap:xc,of:xA},xT={URI:xg,map:xs,ap:xl,chain:xd},xk={URI:xg,map:xs,of:xA,ap:xl,chain:xd},xO=e1(xT),xR={URI:xg,fromIO:xu},xE=fm(xR),xj=fg(xR,xT),xF=fy(xR,xT),xM=function(){return new Promise(function(e){})},xU=xA(eL),xL=eG(xy),xK=e2(xT),xB=eN(xb),xP=xA(eU),xW=function(e){return function(t){return function(){return Promise.all(t.map(function(t,n){return Promise.resolve().then(function(){return e(n,t)()})}))}}},xD=function(e){var t=xW(e);return function(e){return ej(e)?t(e):xP}},xN=function(e){return function(t){return function(){return eM(t).reduce(function(t,n,r){return t.then(function(t){return Promise.resolve().then(e(r+1,n)).then(function(e){return t.push(e),t})})},Promise.resolve().then(e(0,eF(t))).then(eE))}}},xq=function(e){var t=xN(e);return function(e){return ej(e)?t(e):xP}},xQ=function(e){return xD(function(t,n){return e(n)})},xV=xQ(ec),xz=function(e){return xq(function(t,n){return e(n)})},xY=xz(ec),xH=eq(xI),xG=e$(x_);let xZ=Object.freeze(Object.defineProperty({__proto__:null,ApT:xP,ApplicativePar:xw,ApplicativeSeq:x_,ApplyPar:xb,ApplySeq:xI,Chain:xT,Do:xU,FromIO:xR,FromTask:{URI:xg,fromIO:xu,fromTask:ec},Functor:xy,Monad:xk,MonadIO:{URI:xg,map:xs,of:xA,ap:xl,chain:xd,fromIO:xu},MonadTask:{URI:xg,map:xs,of:xA,ap:xl,chain:xd,fromIO:xu,fromTask:ec},Pointed:xx,URI:xg,ap:xp,apFirst:xC,apS:xB,apSecond:xS,bind:xK,bindTo:xL,chain:xh,chainFirst:xO,chainFirstIOK:xF,chainIOK:xj,delay:function(e){return function(t){return function(){return new Promise(function(n){setTimeout(function(){Promise.resolve().then(t).then(n)},e)})}}},flap:xv,flatten:xm,fromIO:xu,fromIOK:xE,fromTask:ec,getMonoid:xG,getRaceMonoid:function(){return{concat:function(e,t){return function(){return Promise.race([Promise.resolve().then(e),Promise.resolve().then(t)])}},empty:xM}},getSemigroup:xH,map:xf,never:xM,of:xA,sequenceArray:xV,sequenceSeqArray:xY,task:{URI:xg,map:xs,of:xA,ap:xl,chain:xd,fromIO:xu,fromTask:ec},taskSeq:{URI:xg,map:xs,of:xA,ap:xc,chain:xd,fromIO:xu,fromTask:ec},traverseArray:xQ,traverseArrayWithIndex:xD,traverseReadonlyArrayWithIndex:xD,traverseReadonlyArrayWithIndexSeq:xq,traverseReadonlyNonEmptyArrayWithIndex:xW,traverseReadonlyNonEmptyArrayWithIndexSeq:xN,traverseSeqArray:xz,traverseSeqArrayWithIndex:xq},Symbol.toStringTag,{value:"Module"}));var xJ=xo(xx),x$=em(xu,ed),xX=function(e,t){return ev(e,x6(t))},x0=function(e,t){return ev(e,x5(t))},x1=function(e,t){return ev(e,x9(function(e){return ev(t,x6(e))}))},x2=function(e,t){return ev(e,x9(t))},x6=xn(xy),x5=xr(xb),x3=xt(xx),x9=xi(xk),x4=x9(ec),x8="ReaderTask",x7={URI:x8,map:xX},be=eH(x7),bt={URI:x8,of:x3},bn={URI:x8,map:xX,ap:x0},br=eW(bn),bi=eD(bn),bo={URI:x8,map:xX,ap:x1},ba={URI:x8,map:xX,ap:x1,of:x3},bu={URI:x8,map:xX,ap:x0,chain:x2},bs={URI:x8,map:xX,of:x3,ap:x0,chain:x2},bl=e1(bu),bc={URI:x8,fromIO:x$},bd=fm(bc),bf=fg(bc,bu),bp=fy(bc,bu),bA={URI:x8,fromReader:xJ},bh=pe(bA),bm=pt(bA),bg=pn(bA),by=pr(bA,bu),bv=pi(bA,bu),bx={URI:x8,fromIO:x$,fromTask:ed},bb=pN(bx),bC=pq(bx,bu),bS=pQ(bx,bu),bw=x3(eL),bI=eG(x7),b_=e2(bu),bT=eN(bn),bk=x3(eU),bO=function(e){return em(f6(e),fk(xW(ex)))},bR=function(e){var t=bO(e);return function(e){return ej(e)?t(e):bk}},bE=function(e){return em(f6(e),fk(xN(ex)))},bj=function(e){var t=bE(e);return function(e){return ej(e)?t(e):bk}},bF=function(e){return bR(function(t,n){return e(n)})},bM=bF(ec),bU=function(e){return bj(function(t,n){return e(n)})},bL=bU(ec),bK=eq(bo),bB=e$(ba);let bP=Object.freeze(Object.defineProperty({__proto__:null,ApT:bk,ApplicativePar:{URI:x8,map:xX,ap:x0,of:x3},ApplicativeSeq:ba,ApplyPar:bn,ApplySeq:bo,Chain:bu,Do:bw,FromIO:bc,FromReader:bA,FromTask:bx,Functor:x7,Monad:bs,MonadIO:{URI:x8,map:xX,of:x3,ap:x0,chain:x2,fromIO:x$},MonadTask:{URI:x8,map:xX,of:x3,ap:x0,chain:x2,fromIO:x$,fromTask:ed},Pointed:bt,URI:x8,ap:x5,apFirst:br,apS:bT,apSW:bT,apSecond:bi,apW:x5,ask:bh,asks:bm,asksReaderTask:fC,asksReaderTaskW:fC,bind:b_,bindTo:bI,bindW:b_,chain:x9,chainFirst:bl,chainFirstIOK:bp,chainFirstReaderK:bv,chainFirstReaderKW:bv,chainFirstTaskK:bS,chainFirstW:bl,chainIOK:bf,chainReaderK:by,chainReaderKW:by,chainTaskK:bC,chainW:x9,flap:be,flatten:x4,flattenW:x4,fromIO:x$,fromIOK:bd,fromReader:xJ,fromReaderK:bg,fromTask:ed,fromTaskK:bb,getMonoid:bB,getSemigroup:bK,local:fb,map:x6,of:x3,readerTask:{URI:x8,map:xX,of:x3,ap:x0,chain:x2,fromIO:x$,fromTask:ed},readerTaskSeq:{URI:x8,map:xX,of:x3,ap:x1,chain:x2,fromIO:x$,fromTask:ed},run:function(e,t){return e(t)()},sequenceArray:bM,sequenceSeqArray:bL,traverseArray:bF,traverseArrayWithIndex:bR,traverseReadonlyArrayWithIndex:bR,traverseReadonlyArrayWithIndexSeq:bj,traverseReadonlyNonEmptyArrayWithIndex:bO,traverseReadonlyNonEmptyArrayWithIndexSeq:bE,traverseSeqArray:bU,traverseSeqArrayWithIndex:bj},Symbol.toStringTag,{value:"Module"}));var bW=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},bD=dL(xx),bN=dU(xx),bq=dK(xy),bQ=dB(xy),bV=em(xu,bq),bz=em(xu,bQ),bY=function(e){return xf(dn(e))},bH=dG(xy),bG=dZ(xk),bZ=dJ(xk),bJ=function(e,t){return function(){var n,r,i,o;return n=void 0,r=void 0,i=void 0,o=function(){return bW(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,e().then(eR)];case 1:return[2,n.sent()];case 2:return[2,eO(t(n.sent()))];case 3:return[2]}})},new(i||(i=Promise))(function(e,t){function a(e){try{s(o.next(e))}catch(e){t(e)}}function u(e){try{s(o.throw(e))}catch(e){t(e)}}function s(t){var n;t.done?e(t.value):((n=t.value)instanceof i?n:new i(function(e){e(n)})).then(a,u)}s((o=o.apply(n,r||[])).next())})}},b$=d2(xy),bX=dP(xx),b0=dW(xx),b1=dD(xk),b2=d$(xk),b6=dX(xk),b5=d0(xk),b3=d1(xy),b9=function(e){var t=bY(e);return function(e){return em(e,t)}},b4=function(e){return function(t){return function(n){return ev(n,Cd(b9(e)(t)))}}},b8=function(e){return em(e,xu)},b7=function(e){return Cf(b8(e))},Ce=function(e,t){return ev(e,Cu(t))},Ct=function(e,t){return ev(e,Cc(t))},Cn=function(e,t){return ev(e,Cd(function(e){return ev(t,Cu(e))}))},Cr=function(e,t){return ev(e,Cd(t))},Ci=function(e,t,n){return ev(e,Cs(t,n))},Co=function(e,t){return ev(e,Cl(t))},Ca=function(e,t){return ev(e,CA(t))},Cu=dN(xy),Cs=dz(xy),Cl=dY(xy),Cc=dq(xb),Cd=dQ(xk),Cf=Cd,Cp=Cf(ec),CA=dV(xk),Ch="TaskEither";function Cm(e,t){var n=eP(e,cD(t));return{URI:Ch,_E:void 0,map:Ce,ap:function(e,t){return ev(e,n(t))},of:bN}}function Cg(e){var t=dH(xk,e);return{URI:Ch,_E:void 0,map:Ce,alt:function(e,n){return ev(e,t(n))}}}var Cy=function(e){var t=cP(e);return{URI:Ch,_E:void 0,compact:co(xy,t),separate:ca(xy,t,cQ)}},Cv={URI:Ch,map:Ce},Cx=eH(Cv),Cb={URI:Ch,map:Ce,ap:Ct},CC=eW(Cb),CS=eD(Cb),Cw={URI:Ch,map:Ce,ap:Cn},CI={URI:Ch,map:Ce,ap:Cn,of:bN},C_={URI:Ch,map:Ce,ap:Ct,chain:Cr},CT=e1(C_),Ck={URI:Ch,fromEither:xA},CO=e5(Ck),CR=e9(Ck),CE=e4(Ck,C_),Cj=e7(Ck,C_),CF=te(Ck,C_),CM=e3(Ck),CU=tt(Ck,C_),CL=e8(Ck),CK={URI:Ch,fromIO:bV},CB=fm(CK),CP=fg(CK,C_),CW=fy(CK,C_),CD={URI:Ch,fromIO:bV,fromTask:bq},CN=pN(CD),Cq=pq(CD,C_),CQ=pQ(CD,C_),CV=function(e,t,n){return ev(e,Cf(function(e){return ev(t(e),xh(function(t){return ev(n(e,t),Cf(function(){return xA(t)}))}))}))},Cz=bN(eL),CY=eG(Cv),CH=e2(C_),CG=eN(Cb),CZ=bN(eU),CJ=function(e){return em(xW(e),xf(dk(ex)))},C$=function(e){var t=CJ(e);return function(e){return ej(e)?t(e):CZ}},CX=function(e){return function(t){return function(){return eM(t).reduce(function(t,n,r){return t.then(function(i){return eT(i)?t:e(r+1,n)().then(function(e){return eT(e)?e:(i.right.push(e.right),i)})})},e(0,eF(t))().then(cq(eE)))}}},C0=function(e){var t=CX(e);return function(e){return ej(e)?t(e):CZ}},C1=function(e){return C$(function(t,n){return e(n)})},C2=C1(ec),C6=function(e){return C0(function(t,n){return e(n)})},C5=C6(ec),C3=eq(Cw),C9=e$(CI);let C4=Object.freeze(Object.defineProperty({__proto__:null,Alt:{URI:Ch,map:Ce,alt:Ca},ApT:CZ,ApplicativePar:{URI:Ch,map:Ce,ap:Ct,of:bN},ApplicativeSeq:CI,ApplyPar:Cb,ApplySeq:Cw,Bifunctor:{URI:Ch,bimap:Ci,mapLeft:Co},Chain:C_,Do:Cz,FromEither:Ck,FromIO:CK,FromTask:CD,Functor:Cv,Monad:{URI:Ch,map:Ce,ap:Ct,chain:Cr,of:bN},MonadIO:{URI:Ch,map:Ce,ap:Ct,chain:Cr,of:bN,fromIO:bV},MonadTask:{URI:Ch,map:Ce,ap:Ct,chain:Cr,of:bN,fromIO:bV,fromTask:bq},MonadThrow:{URI:Ch,map:Ce,ap:Ct,chain:Cr,of:bN,throwError:bD},Pointed:{URI:Ch,of:bN},URI:Ch,alt:CA,altW:CA,ap:Cc,apFirst:CC,apFirstW:CC,apS:CG,apSW:CG,apSecond:CS,apSecondW:CS,apW:Cc,bimap:Cs,bind:CH,bindTo:CY,bindW:CH,bracket:function(e,t,n){return CV(e,t,n)},bracketW:CV,chain:Cd,chainEitherK:Cj,chainEitherKW:Cj,chainFirst:CT,chainFirstEitherK:CF,chainFirstEitherKW:CF,chainFirstIOK:CW,chainFirstTaskK:CQ,chainFirstW:CT,chainIOEitherK:b7,chainIOEitherKW:b7,chainIOK:CP,chainNullableK:b1,chainOptionK:CE,chainTaskK:Cq,chainTaskOptionK:b4,chainTaskOptionKW:b4,chainW:Cf,filterOrElse:CU,filterOrElseW:CU,flap:Cx,flatten:Cp,flattenW:Cp,fold:bG,foldW:bG,fromEither:xA,fromEitherK:CL,fromIO:bV,fromIOEither:xu,fromIOEitherK:b8,fromIOK:CB,fromNullable:bX,fromNullableK:b0,fromOption:CO,fromOptionK:CR,fromPredicate:CM,fromTask:bq,fromTaskK:CN,fromTaskOption:bY,fromTaskOptionK:b9,getAltTaskValidation:Cg,getApplicativeTaskValidation:Cm,getApplyMonoid:C9,getApplySemigroup:C3,getCompactable:Cy,getFilterable:function(e){var t=cW(e),n=Cy(e),r=fe(xy,t),i=ft(xy,t),o=fn(xy,t),a=fr(xy,t);return{URI:Ch,_E:void 0,map:Ce,compact:n.compact,separate:n.separate,filter:function(e,t){return ev(e,r(t))},filterMap:function(e,t){return ev(e,i(t))},partition:function(e,t){return ev(e,o(t))},partitionMap:function(e,t){return ev(e,a(t))}}},getOrElse:bZ,getOrElseW:bZ,getSemigroup:function(e){return eq(xI)(cB(e))},getTaskValidation:function(e){var t=Cm(xw,e),n=Cg(e);return{URI:Ch,_E:void 0,map:Ce,ap:t.ap,of:bN,chain:Cr,bimap:Ci,mapLeft:Co,alt:n.alt,fromIO:bV,fromTask:bq,throwError:bD}},left:bD,leftIO:bz,leftTask:bQ,map:Cu,mapLeft:Cl,match:bH,matchE:bG,matchEW:bG,matchW:bH,of:bN,orElse:b2,orElseFirst:b6,orElseFirstIOK:function(e){return b6(CB(e))},orElseFirstTaskK:function(e){return b6(CN(e))},orElseFirstW:b6,orElseW:b2,orLeft:b5,right:bN,rightIO:bV,rightTask:bq,sequenceArray:C2,sequenceSeqArray:C5,swap:b3,taskEither:{URI:Ch,bimap:Ci,mapLeft:Co,map:Ce,of:bN,ap:Ct,chain:Cr,alt:Ca,fromIO:bV,fromTask:bq,throwError:bD},taskEitherSeq:{URI:Ch,bimap:Ci,mapLeft:Co,map:Ce,of:bN,ap:Cn,chain:Cr,alt:Ca,fromIO:bV,fromTask:bq,throwError:bD},taskify:function(e){return function(){var t=Array.prototype.slice.call(arguments);return function(){return new Promise(function(n){e.apply(null,t.concat(function(e,t){return null!=e?n(eO(e)):n(eR(t))}))})}}},throwError:bD,toUnion:b$,traverseArray:C1,traverseArrayWithIndex:C$,traverseReadonlyArrayWithIndex:C$,traverseReadonlyArrayWithIndexSeq:C0,traverseReadonlyNonEmptyArrayWithIndex:CJ,traverseReadonlyNonEmptyArrayWithIndexSeq:CX,traverseSeqArray:C6,traverseSeqArrayWithIndex:C0,tryCatch:bJ,tryCatchK:function(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return bJ(function(){return e.apply(void 0,n)},t)}}},Symbol.toStringTag,{value:"Module"}));var C8=dL(bt),C7=dU(bt),Se=em(bq,ed),St=em(bQ,ed),Sn=function(e){return em(e,bN)},Sr=function(e){return em(e,bD)},Si=dK(x7),So=dB(x7),Sa=em(bV,ed),Su=em(bz,ed),Ss=em(xu,ed),Sl=function(e){return em(e,xA)},Sc=dG(x7),Sd=dZ(bu),Sf=dJ(bs),Sp=d2(x7),SA=dP(bt),Sh=dW(bt),Sm=dD(bs),Sg=d$(bs),Sy=dX(bs),Sv=d0(bs),Sx=d1(x7),Sb=function(e){return em(e,Ss)},SC=function(e){return SD(Sb(e))},SS=function(e){return em(e,ed)},Sw=function(e){return SD(SS(e))},SI=function(e){return S5(SS(e))},S_=function(e){return em(e,Sl)},ST=function(e){return SD(S_(e))},Sk=function(e){return S5(S_(e))},SO=function(e,t){return ev(e,SL(t))},SR=function(e,t){return ev(e,SP(t))},SE=function(e,t){return ev(e,SW(function(e){return ev(t,SL(e))}))},Sj=function(e,t){return ev(e,SW(t))},SF=function(e,t){return ev(e,Sq(t))},SM=function(e,t,n){return ev(e,SK(t,n))},SU=function(e,t){return ev(e,SB(t))},SL=dN(x7),SK=dz(x7),SB=dY(x7),SP=dq(bn),SW=dQ(bs),SD=SW,SN=SD(ec),Sq=dV(bs),SQ="ReaderTaskEither",SV=function(e){var t=cP(e);return{URI:SQ,_E:void 0,compact:co(x7,t),separate:ca(x7,t,cQ)}};function Sz(e,t){var n=eP(fV,Cm(e,t));return{URI:SQ,_E:void 0,map:SO,ap:function(e,t){return ev(e,n(t))},of:C7}}function SY(e){var t=dH(bs,e);return{URI:SQ,_E:void 0,map:SO,alt:function(e,n){return ev(e,t(n))}}}var SH={URI:SQ,map:SO},SG=eH(SH),SZ={URI:SQ,of:C7},SJ={URI:SQ,map:SO,ap:SR},S$=eW(SJ),SX=eD(SJ),S0={URI:SQ,map:SO,ap:SE},S1={URI:SQ,map:SO,ap:SE,of:C7},S2={URI:SQ,map:SO,ap:SR,chain:Sj},S6=e1(S2),S5=S6,S3={URI:SQ,fromReader:Sn},S9=pe(S3),S4=pt(S3),S8=pn(S3),S7=pr(S3,S2),we=pi(S3,S2),wt=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return Si(e.apply(void 0,t))}},wn=function(e){return SD(wt(e))},wr=function(e){return S5(wt(e))},wi={URI:SQ,fromEither:x3},wo=e5(wi),wa=e9(wi),wu=e4(wi,S2),ws=e7(wi,S2),wl=te(wi,S2),wc=e3(wi),wd=tt(wi,S2),wf=e8(wi),wp={URI:SQ,fromIO:Sa},wA=fm(wp),wh=fg(wp,S2),wm=fy(wp,S2),wg={URI:SQ,fromIO:Sa,fromTask:Se},wy=pN(wg),wv=pq(wg,S2),wx=pQ(wg,S2);function wb(e,t,n){return function(r){return CV(e(r),function(e){return t(e)(r)},function(e,t){return n(e,t)(r)})}}var wC=C7(eL),wS=eG(SH),ww=e2(S2),wI=eN(SJ),w_=C7(eU),wT=function(e){return em(f6(e),fk(CJ(ex)))},wk=function(e){var t=wT(e);return function(e){return ej(e)?t(e):w_}},wO=function(e){return em(f6(e),fk(CX(ex)))},wR=function(e){var t=wO(e);return function(e){return ej(e)?t(e):w_}},wE=function(e){return wk(function(t,n){return e(n)})},wj=wE(ec),wF=function(e){return wR(function(t,n){return e(n)})},wM=wF(ec),wU=eq(S0),wL=e$(S1);let wK=Object.freeze(Object.defineProperty({__proto__:null,Alt:{URI:SQ,map:SO,alt:SF},ApT:w_,ApplicativePar:{URI:SQ,map:SO,ap:SR,of:C7},ApplicativeSeq:S1,ApplyPar:SJ,ApplySeq:S0,Bifunctor:{URI:SQ,bimap:SM,mapLeft:SU},Chain:S2,Do:wC,FromEither:wi,FromIO:wp,FromReader:S3,FromTask:wg,Functor:SH,Monad:{URI:SQ,map:SO,ap:SR,chain:Sj,of:C7},MonadIO:{URI:SQ,map:SO,ap:SR,chain:Sj,of:C7,fromIO:Sa},MonadTask:{URI:SQ,map:SO,ap:SR,chain:Sj,of:C7,fromIO:Sa,fromTask:Se},MonadThrow:{URI:SQ,map:SO,ap:SR,chain:Sj,of:C7,throwError:C8},Pointed:SZ,URI:SQ,alt:Sq,altW:Sq,ap:SP,apFirst:S$,apFirstW:S$,apS:wI,apSW:wI,apSecond:SX,apSecondW:SX,apW:SP,ask:S9,asks:S4,asksReaderTaskEither:fC,asksReaderTaskEitherW:fC,bimap:SK,bind:ww,bindTo:wS,bindW:ww,bracket:function(e,t,n){return wb(e,t,n)},bracketW:wb,chain:SW,chainEitherK:ws,chainEitherKW:ws,chainFirst:S6,chainFirstEitherK:wl,chainFirstEitherKW:wl,chainFirstIOK:wm,chainFirstReaderEitherK:Sk,chainFirstReaderEitherKW:Sk,chainFirstReaderK:we,chainFirstReaderKW:we,chainFirstReaderTaskK:wr,chainFirstReaderTaskKW:wr,chainFirstTaskEitherK:SI,chainFirstTaskEitherKW:SI,chainFirstTaskK:wx,chainFirstW:S5,chainIOEitherK:SC,chainIOEitherKW:SC,chainIOK:wh,chainNullableK:Sm,chainOptionK:wu,chainReaderEitherK:ST,chainReaderEitherKW:ST,chainReaderK:S7,chainReaderKW:S7,chainReaderTaskK:wn,chainReaderTaskKW:wn,chainTaskEitherK:Sw,chainTaskEitherKW:Sw,chainTaskK:wv,chainW:SD,filterOrElse:wd,filterOrElseW:wd,flap:SG,flatten:SN,flattenW:SN,fold:Sd,foldW:Sd,fromEither:x3,fromEitherK:wf,fromIO:Sa,fromIOEither:Ss,fromIOEitherK:Sb,fromIOK:wA,fromNullable:SA,fromNullableK:Sh,fromOption:wo,fromOptionK:wa,fromPredicate:wc,fromReader:Sn,fromReaderEither:Sl,fromReaderEitherK:S_,fromReaderK:S8,fromReaderTaskK:wt,fromTask:Se,fromTaskEither:ed,fromTaskEitherK:SS,fromTaskK:wy,getAltReaderTaskValidation:SY,getApplicativeReaderTaskValidation:Sz,getApplyMonoid:wL,getApplySemigroup:wU,getCompactable:SV,getFilterable:function(e){var t=cW(e),n=SV(e),r=fe(x7,t),i=ft(x7,t),o=fn(x7,t),a=fr(x7,t);return{URI:SQ,_E:void 0,map:SO,compact:n.compact,separate:n.separate,filter:function(e,t){return ev(e,r(t))},filterMap:function(e,t){return ev(e,i(t))},partition:function(e,t){return ev(e,o(t))},partitionMap:function(e,t){return ev(e,a(t))}}},getOrElse:Sf,getOrElseW:Sf,getReaderTaskValidation:function(e){var t=Sz(xw,e),n=SY(e);return{URI:SQ,_E:void 0,map:SO,of:C7,chain:Sj,bimap:SM,mapLeft:SU,ap:t.ap,alt:n.alt,fromIO:Sa,fromTask:Se,throwError:C8}},getSemigroup:function(e){return eq(bo)(cB(e))},left:C8,leftIO:Su,leftReader:Sr,leftReaderTask:So,leftTask:St,local:fb,map:SL,mapLeft:SB,match:Sc,matchE:Sd,matchEW:Sd,matchW:Sc,of:C7,orElse:Sg,orElseFirst:Sy,orElseFirstW:Sy,orElseW:Sg,orLeft:Sv,readerTaskEither:{URI:SQ,map:SO,of:C7,ap:SR,chain:Sj,alt:SF,bimap:SM,mapLeft:SU,fromIO:Sa,fromTask:Se,throwError:C8},readerTaskEitherSeq:{URI:SQ,map:SO,of:C7,ap:SE,chain:Sj,alt:SF,bimap:SM,mapLeft:SU,fromIO:Sa,fromTask:Se,throwError:C8},right:C7,rightIO:Sa,rightReader:Sn,rightReaderTask:Si,rightTask:Se,run:function(e,t){return e(t)()},sequenceArray:wj,sequenceSeqArray:wM,swap:Sx,throwError:C8,toUnion:Sp,traverseArray:wE,traverseArrayWithIndex:wk,traverseReadonlyArrayWithIndex:wk,traverseReadonlyArrayWithIndexSeq:wR,traverseReadonlyNonEmptyArrayWithIndex:wT,traverseReadonlyNonEmptyArrayWithIndexSeq:wO,traverseSeqArray:wF,traverseSeqArrayWithIndex:wR},Symbol.toStringTag,{value:"Module"}));var wB={equals:function(e,t){return e===t}},wP={concat:function(e,t){return e+t}},wW={concat:wP.concat,empty:""},wD={equals:wB.equals,compare:function(e,t){return e<t?-1:e>t?1:0}};let wN=Object.freeze(Object.defineProperty({__proto__:null,Eq:wB,Monoid:wW,Ord:wD,Semigroup:wP,Show:{show:function(e){return JSON.stringify(e)}},empty:"",endsWith:function(e,t){return function(n){return n.endsWith(e,t)}},includes:function(e,t){return function(n){return n.includes(e,t)}},isEmpty:function(e){return 0===e.length},isString:function(e){return"string"==typeof e},replace:function(e,t){return function(n){return n.replace(e,t)}},size:function(e){return e.length},slice:function(e,t){return function(n){return n.slice(e,t)}},split:function(e){return function(t){var n=t.split(e);return ej(n)?n:[t]}},startsWith:function(e,t){return function(n){return n.startsWith(e,t)}},toLowerCase:function(e){return e.toLowerCase()},toUpperCase:function(e){return e.toUpperCase()},trim:function(e){return e.trim()},trimLeft:function(e){return e.trimLeft()},trimRight:function(e){return e.trimRight()}},Symbol.toStringTag,{value:"Module"}));var wq=function(e){return Object.keys(e).length},wQ=function(e){for(var t in e)if(eK.call(e,t))return!1;return!0},wV=function(e){return function(t){return Object.keys(t).sort(e.compare)}},wz=wV(wD);function wY(e){if("function"==typeof e)return wY(wD)(e);var t=wV(e);return function(e){return function(n){for(var r=[],i=0,o=t(n);i<o.length;i++){var a=o[i];r.push(e(a,n[a]))}return r}}}var wH=wY(wD)(function(e,t){return[e,t]}),wG=function(e,t){return function(n){if(eK.call(n,e)&&n[e]===t)return n;var r=Object.assign({},n);return r[e]=t,r}},wZ=function(e,t){return eK.call(t,e)};function wJ(e){return function(t){if(!eK.call(t,e))return t;var n=Object.assign({},t);return delete n[e],n}}function w$(e){return function(t,n){if(void 0===n){var r=w$(e);return function(e){return r(e,t)}}for(var i in t)if(!eK.call(n,i)||!e.equals(t[i],n[i]))return!1;return!0}}function wX(e,t){return void 0===t?function(t){return wX(e,t)}:eK.call(t,e)?e_(t[e]):eI}var w0={};function w1(e){return function(t){var n={};for(var r in t)eK.call(t,r)&&(n[r]=e(r,t[r]));return n}}function w2(e){return w1(function(t,n){return e(n)})}function w6(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(2===e.length)return w6(wD).apply(void 0,e);var n=wV(e[0]);return function(e,t){return function(r){for(var i=e,o=n(r),a=o.length,u=0;u<a;u++){var s=o[u];i=t(s,i,r[s])}return i}}}function w5(e){if("compare"in e){var t=wV(e);return function(e){return function(n){return function(r){for(var i=e.empty,o=t(r),a=o.length,u=0;u<a;u++){var s=o[u];i=e.concat(i,n(s,r[s]))}return i}}}}return w5(wD)(e)}function w3(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(2===e.length)return w3(wD).apply(void 0,e);var n=wV(e[0]);return function(e,t){return function(r){for(var i=e,o=n(r),a=o.length,u=a-1;u>=0;u--){var s=o[u];i=t(s,r[s],i)}return i}}}var w9=function(e,t){var n;return(n={})[e]=t,n};function w4(e){var t=IR(wD)(e);return function(e){return function(n){return t(n,e)}}}function w8(e){var t=Ik(wD)(e);return function(e){return function(n){return t(n,e)}}}function w7(e){return IO(wD)(e)}function Ie(e){return function(t){var n={},r={};for(var i in t)if(eK.call(t,i)){var o=e(i,t[i]);switch(o._tag){case"Left":n[i]=o.left;break;case"Right":r[i]=o.right}}return iK(n,r)}}function It(e){return function(t){var n={},r={};for(var i in t)if(eK.call(t,i)){var o=t[i];e(i,o)?r[i]=o:n[i]=o}return iK(n,r)}}function In(e){return function(t){var n={};for(var r in t)if(eK.call(t,r)){var i=e(r,t[r]);ew(i)&&(n[r]=i.value)}return n}}function Ir(e){return function(t){var n={},r=!1;for(var i in t)if(eK.call(t,i)){var o=t[i];e(i,o)?n[i]=o:r=!0}return r?n:t}}function Ii(e,t){var n=Io(e,t);return function(e){return n(e,ec)}}function Io(e,t){return function(n,r){return t.reduce(n,{},function(t,n){var i=r(n),o=i[0],a=i[1];return t[o]=eK.call(t,o)?e.concat(t[o],a):a,t})}}function Ia(e){return function(t){for(var n in t)if(!e(t[n]))return!1;return!0}}function Iu(e){return function(t){for(var n in t)if(e(t[n]))return!0;return!1}}function Is(e){return function(t,n){if(void 0===n){var r=Is(e);return function(e){return r(t,e)}}for(var i in n)if(e.equals(n[i],t))return!0;return!1}}var Il=function(e){return function(t){return function(n){if(wQ(n))return t;if(wQ(t))return n;var r={};for(var i in n)wZ(i,t)?r[i]=e.concat(n[i],t[i]):r[i]=n[i];for(var i in t)wZ(i,r)||(r[i]=t[i]);return r}}},Ic=function(e){return function(t){return function(n){if(wQ(n)||wQ(t))return w0;var r={};for(var i in n)wZ(i,t)&&(r[i]=e.concat(n[i],t[i]));return r}}},Id=function(e){return function(t){if(wQ(t))return e;if(wQ(e))return t;var n={};for(var r in t)wZ(r,e)||(n[r]=t[r]);for(var r in e)wZ(r,t)||(n[r]=e[r]);return n}},If=function(e,t){return ev(e,w2(t))},Ip=function(e,t){return ev(e,w1(t))},IA=function(e){var t=IU(e);return function(e,n,r){return ev(e,t(n,r))}},Ih=function(e){return function(t){var n=IL(e)(t);return function(e,t){return ev(e,n(t))}}},Im=function(e){var t=IK(e);return function(e,n,r){return ev(e,t(n,r))}},Ig=function(e,t){return ev(e,IE(t))},Iy=function(e,t){return ev(e,Ij(t))},Iv=function(e,t){return ev(e,IF(t))},Ix=function(e,t){return ev(e,IM(t))},Ib=function(e){var t=w6(e);return function(e,n,r){return ev(e,t(n,r))}},IC=function(e){var t=w5(e);return function(e){var n=t(e);return function(e,t){return ev(e,n(t))}}},IS=function(e){var t=w3(e);return function(e,n,r){return ev(e,t(n,r))}},Iw=function(e,t){return ev(e,Ie(t))},II=function(e,t){return ev(e,It(t))},I_=function(e,t){return ev(e,In(t))},IT=function(e,t){return ev(e,Ir(t))},Ik=function(e){var t=IR(e);return function(e){var n=t(e);return function(e,t){return n(e,em(ex,t))}}},IO=function(e){var t=Ik(e);return function(e){var n=t(e);return function(e){return n(e,ec)}}},IR=function(e){return function(t){var n=wV(e);return function(e,r){var i=n(e);if(0===i.length)return t.of(w0);for(var o=t.of({}),a=function(n){o=t.ap(t.map(o,function(e){return function(t){var r;return Object.assign({},e,((r={})[n]=t,r))}}),r(n,e[n]))},u=0;u<i.length;u++)a(i[u]);return o}}},IE=function(e){return Ir(function(t,n){return e(n)})},Ij=function(e){return In(function(t,n){return e(n)})},IF=function(e){return It(function(t,n){return e(n)})},IM=function(e){return Ie(function(t,n){return e(n)})};function IU(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(1===e.length){var n=w6(e[0]);return function(e,t){return n(e,function(e,n,r){return t(n,r)})}}return IU(wD).apply(void 0,e)}function IL(e){if("compare"in e){var t=w5(e);return function(e){var n=t(e);return function(e){return n(function(t,n){return e(n)})}}}return IL(wD)(e)}function IK(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(1===e.length){var n=w3(e[0]);return function(e,t){return n(e,function(e,n,r){return t(n,r)})}}return IK(wD).apply(void 0,e)}var IB=function(e){var t={};for(var n in e)if(eK.call(e,n)){var r=e[n];ew(r)&&(t[n]=r.value)}return t},IP=function(e){var t={},n={};for(var r in e)if(eK.call(e,r)){var i=e[r];eT(i)?t[r]=i.left:n[r]=i.right}return iK(t,n)},IW="ReadonlyRecord";function ID(e){return"compare"in e?function(t){return{show:function(n){var r=wY(e)(function(e,n){return"".concat(JSON.stringify(e),": ").concat(t.show(n))})(n).join(", ");return""===r?"{}":"{ ".concat(r," }")}}}:ID(wD)(e)}function IN(e){var t=w$(e);return tr(function(e,n){return t(e)(n)&&t(n)(e)})}function Iq(e){return{concat:function(t,n){if(wQ(t))return n;if(wQ(n))return t;var r=Object.assign({},t);for(var i in n)eK.call(n,i)&&(r[i]=eK.call(t,i)?e.concat(t[i],n[i]):n[i]);return r},empty:w0}}var IQ={URI:IW,map:If},IV=eH(IQ),Iz={URI:IW,compact:IB,separate:IP},IY=function(e){return{URI:IW,map:If,reduce:IA(e),foldMap:Ih(e),reduceRight:Im(e),traverse:Ik(e),sequence:IO(e)}},IH=function(e){var t=Il(e);return{concat:function(e,n){return t(n)(e)}}},IG={URI:IW,reduce:IA(wD),foldMap:Ih(wD),reduceRight:Im(wD)},IZ={URI:IW,reduce:IA(wD),foldMap:Ih(wD),reduceRight:Im(wD),reduceWithIndex:Ib(wD),foldMapWithIndex:IC(wD),reduceRightWithIndex:IS(wD)},IJ={URI:IW,map:If,reduce:IA(wD),foldMap:Ih(wD),reduceRight:Im(wD),traverse:Ik(wD),sequence:w7},I$={URI:IW,map:If,mapWithIndex:Ip,reduce:IA(wD),foldMap:Ih(wD),reduceRight:Im(wD),reduceWithIndex:Ib(wD),foldMapWithIndex:IC(wD),reduceRightWithIndex:IS(wD),traverse:Ik(wD),sequence:w7,traverseWithIndex:IR(wD)},IX=iH(IJ,Iz),I0=iY(IJ,Iz),I1={URI:IW,map:If,reduce:IA(wD),foldMap:Ih(wD),reduceRight:Im(wD),traverse:Ik(wD),sequence:w7,compact:IB,separate:IP,filter:Ig,filterMap:Iy,partition:Iv,partitionMap:Ix,wither:IX,wilt:I0};function I2(e,t){return eK.call(void 0===t?this:t,e)}var I6={URI:IW,map:If,reduce:IA(wD),foldMap:Ih(wD),reduceRight:Im(wD),traverse:Ik(wD),sequence:w7,compact:IB,separate:IP,filter:Ig,filterMap:Iy,partition:Iv,partitionMap:Ix,mapWithIndex:Ip,reduceWithIndex:Ib(wD),foldMapWithIndex:IC(wD),reduceRightWithIndex:IS(wD),filterMapWithIndex:I_,filterWithIndex:IT,partitionMapWithIndex:Iw,partitionWithIndex:II,traverseWithIndex:IR(wD),wither:IX,wilt:I0};let I5=Object.freeze(Object.defineProperty({__proto__:null,Compactable:Iz,Filterable:{URI:IW,map:If,compact:IB,separate:IP,filter:Ig,filterMap:Iy,partition:Iv,partitionMap:Ix},FilterableWithIndex:{URI:IW,map:If,mapWithIndex:Ip,compact:IB,separate:IP,filter:Ig,filterMap:Iy,partition:Iv,partitionMap:Ix,filterMapWithIndex:I_,filterWithIndex:IT,partitionMapWithIndex:Iw,partitionWithIndex:II},Foldable:IG,FoldableWithIndex:IZ,Functor:IQ,FunctorWithIndex:{URI:IW,map:If,mapWithIndex:Ip},Traversable:IJ,TraversableWithIndex:I$,URI:IW,Witherable:I1,_filter:Ig,_filterMap:Iy,_filterMapWithIndex:I_,_filterWithIndex:IT,_foldMap:Ih,_foldMapWithIndex:IC,_map:If,_mapWithIndex:Ip,_partition:Iv,_partitionMap:Ix,_partitionMapWithIndex:Iw,_partitionWithIndex:II,_reduce:IA,_reduceRight:Im,_reduceRightWithIndex:IS,_reduceWithIndex:Ib,_sequence:IO,_traverse:Ik,collect:wY,compact:IB,deleteAt:wJ,difference:Id,elem:Is,empty:w0,every:Ia,filter:IE,filterMap:Ij,filterMapWithIndex:In,filterWithIndex:Ir,flap:IV,foldMap:IL,foldMapWithIndex:w5,fromEntries:function(e){for(var t={},n=0;n<e.length;n++){var r=e[n];t[r[0]]=r[1]}return t},fromFoldable:Ii,fromFoldableMap:Io,fromRecord:function(e){return Object.assign({},e)},getDifferenceMagma:function(){return{concat:function(e,t){return Id(t)(e)}}},getEq:IN,getFoldable:function(e){return{URI:IW,reduce:IA(e),foldMap:Ih(e),reduceRight:Im(e)}},getFoldableWithIndex:function(e){return{URI:IW,reduce:IA(e),foldMap:Ih(e),reduceRight:Im(e),reduceWithIndex:Ib(e),foldMapWithIndex:IC(e),reduceRightWithIndex:IS(e)}},getIntersectionSemigroup:function(e){var t=Ic(e);return{concat:function(e,n){return t(n)(e)}}},getMonoid:Iq,getShow:ID,getTraversable:IY,getTraversableWithIndex:function(e){return{URI:IW,map:If,mapWithIndex:Ip,reduce:IA(e),foldMap:Ih(e),reduceRight:Im(e),reduceWithIndex:Ib(e),foldMapWithIndex:IC(e),reduceRightWithIndex:IS(e),traverse:Ik(e),sequence:IO(e),traverseWithIndex:IR(e)}},getUnionMonoid:function(e){return{concat:IH(e).concat,empty:w0}},getUnionSemigroup:IH,getWitherable:function(e){var t=IY(e);return{URI:IW,map:If,reduce:IA(e),foldMap:Ih(e),reduceRight:Im(e),traverse:t.traverse,sequence:t.sequence,compact:IB,separate:IP,filter:Ig,filterMap:Iy,partition:Iv,partitionMap:Ix,wither:iH(t,Iz),wilt:iY(t,Iz)}},has:wZ,hasOwnProperty:I2,insertAt:wG,intersection:Ic,isEmpty:wQ,isSubrecord:w$,keys:wz,lookup:wX,map:w2,mapWithIndex:w1,modifyAt:function(e,t){return function(n){if(!wZ(e,n))return eI;var r=t(n[e]);if(r===n[e])return e_(n);var i=Object.assign({},n);return i[e]=r,e_(i)}},partition:IF,partitionMap:IM,partitionMapWithIndex:Ie,partitionWithIndex:It,pop:function(e){var t=wJ(e);return function(n){var r=wX(e,n);return eS(r)?eI:e_([r.value,t(n)])}},readonlyRecord:I6,reduce:IU,reduceRight:IK,reduceRightWithIndex:w3,reduceWithIndex:w6,separate:IP,sequence:w7,singleton:w9,size:wq,some:Iu,toEntries:wH,toReadonlyArray:wH,toRecord:function(e){return Object.assign({},e)},toUnfoldable:function(e){return function(t){var n=wH(t),r=n.length;return e.unfold(0,function(e){return e<r?e_([n[e],e+1]):eI})}},traverse:w8,traverseWithIndex:w4,union:Il,updateAt:function(e,t){return function(n){if(!wZ(e,n))return eI;if(n[e]===t)return e_(n);var r=Object.assign({},n);return r[e]=t,e_(r)}},upsertAt:wG,wilt:function(e){var t=w8(e);return function(n){return function(r){return e.map(ev(r,t(n)),IP)}}},wither:function(e){var t=w8(e);return function(n){return function(r){return e.map(ev(r,t(n)),IB)}}}},Symbol.toStringTag,{value:"Module"}));var I3=function(e){return function(t){for(var n=t.length,r=new Set,i=_d(e),o=0;o<n;o++){var a=t[o];i(a,r)||r.add(a)}return r}};function I9(e){return function(t){for(var n,r=t.values(),i=new Set;!(n=r.next()).done;){var o=n.value;e(o)&&i.add(o)}return i}}function I4(e){var t=_d(e);return function(n,r){if(void 0===r){var i=I4(e);return function(e){return i(n,e)}}if(_u(n))return r;if(_u(r))return n;var o=new Set(n);return r.forEach(function(e){t(e,o)||o.add(e)}),o}}function I8(e){var t=_d(e);return function(n,r){if(void 0===r){var i=I8(e);return function(e){return i(e,n)}}if(_u(n)||_u(r))return _a;var o=new Set;return n.forEach(function(e){t(e,r)&&o.add(e)}),o}}function I7(e){var t=_d(e);return function(n,r){if(void 0===r){var i=I7(e);return function(e){return i(e,n)}}return I9(function(e){return!t(e,r)})(n)}}function _e(e){var t=_f(e);return function(e,n){return function(r){return t(r).reduce(n,e)}}}function _t(e,t){var n=_f(e);return function(e){return function(r){return n(r).reduce(function(n,r){return t.concat(n,e(r))},t.empty)}}}var _n=function(e){var t=_f(e);return function(e,n){return function(r){return t(r).reduceRight(function(e,t){return n(t,e)},e)}}};function _r(e){var t=_d(e);return function(e){return function(n){if(t(e)(n))return n;var r=new Set(n);return r.add(e),r}}}var _i=function(e){return function(t){return function(n){return I9(function(n){return!e.equals(t,n)})(n)}}};function _o(e){var t=_d(e);return function(e){return function(n){var r=new Set;return n.forEach(function(n){var i=e(n);"Some"!==i._tag||t(i.value,r)||r.add(i.value)}),r}}}var _a=new Set,_u=function(e){return 0===e.size},_s=function(e){return function(t){for(var n,r=t.values(),i=!1;!i&&!(n=r.next()).done;)i=e(n.value);return i}};function _l(e){return sY(_s(sY(e)))}function _c(e){var t=_d(e);return function(n,r){if(void 0===r){var i=_c(e);return function(e){return i(e,n)}}return _l(function(e){return t(e,r)})(n)}}function _d(e){return function(t,n){if(void 0===n){var r=_d(e);return function(e){return r(t,e)}}for(var i,o=n.values(),a=!1;!a&&!(i=o.next()).done;)a=e.equals(t,i.value);return a}}var _f=function(e){return function(t){var n=[];return t.forEach(function(e){return n.push(e)}),n.sort(e.compare)}};function _p(e){return{show:function(t){var n=[];return t.forEach(function(t){n.push(e.show(t))}),"new Set([".concat(n.sort().join(", "),"])")}}}function _A(e){var t=_c(e);return tr(function(e,n){return t(e,n)&&t(n,e)})}var _h=function(e){return{concat:I4(e)}};let _m=Object.freeze(Object.defineProperty({__proto__:null,URI:"ReadonlySet",chain:function(e){var t=_d(e);return function(e){return function(n){var r=new Set;return n.forEach(function(n){e(n).forEach(function(e){t(e,r)||r.add(e)})}),r}}},compact:function(e){return _o(e)(ec)},difference:I7,elem:_d,empty:_a,every:_l,filter:I9,filterMap:_o,foldMap:_t,fromArray:I3,fromReadonlyArray:I3,fromSet:function(e){return new Set(e)},getDifferenceMagma:function(e){return{concat:I7(e)}},getEq:_A,getIntersectionSemigroup:function(e){return{concat:I8(e)}},getShow:_p,getUnionMonoid:function(e){return{concat:_h(e).concat,empty:_a}},getUnionSemigroup:_h,insert:_r,intersection:I8,isEmpty:_u,isSubset:_c,map:function(e){var t=_d(e);return function(e){return function(n){var r=new Set;return n.forEach(function(n){var i=e(n);t(i,r)||r.add(i)}),r}}},partition:function(e){return function(t){for(var n,r=t.values(),i=new Set,o=new Set;!(n=r.next()).done;){var a=n.value;e(a)?i.add(a):o.add(a)}return iK(o,i)}},partitionMap:function(e,t){return function(n){return function(r){for(var i,o=r.values(),a=new Set,u=new Set,s=_d(e),l=_d(t);!(i=o.next()).done;){var c=n(i.value);switch(c._tag){case"Left":s(c.left,a)||a.add(c.left);break;case"Right":l(c.right,u)||u.add(c.right)}}return iK(a,u)}}},reduce:_e,reduceRight:_n,remove:_i,separate:function(e,t){return function(n){var r=_d(e),i=_d(t),o=new Set,a=new Set;return n.forEach(function(e){switch(e._tag){case"Left":r(e.left,o)||o.add(e.left);break;case"Right":i(e.right,a)||a.add(e.right)}}),iK(o,a)}},singleton:function(e){return new Set([e])},size:function(e){return e.size},some:_s,toReadonlyArray:_f,toSet:function(e){return new Set(e)},toggle:function(e){var t=_d(e),n=_i(e),r=_r(e);return function(e){return function(i){return(t(e,i)?n:r)(e)(i)}}},union:I4},Symbol.toStringTag,{value:"Module"}));function _g(e){return e[0]}function _y(e){return e[1]}function _v(e){return{URI:_N,_E:void 0,map:_S,ap:function(t,n){return[_g(t)(_g(n)),e.concat(_y(t),_y(n))]}}}var _x=function(e){return function(t){return[t,e.empty]}};function _b(e){var t=_v(e);return{URI:_N,_E:void 0,map:t.map,ap:t.ap,chain:function(t,n){var r=n(_g(t)),i=r[0],o=r[1];return[i,e.concat(_y(t),o)]}}}var _C=function(e,t){return ev(e,_M(t))},_S=function(e,t){return ev(e,_j(t))},_w=function(e,t,n){return ev(e,_E(t,n))},_I=function(e,t){return ev(e,_F(t))},__=function(e,t){return ev(e,_U(t))},_T=function(e,t,n){return ev(e,_K(t,n))},_k=function(e){var t=_B();return function(e,n){return ev(e,t(n))}},_O=function(e,t,n){return ev(e,_P(t,n))},_R=function(e){var t=_W(e);return function(e,n){return ev(e,t(n))}},_E=function(e,t){return function(n){return[t(_g(n)),e(_y(n))]}},_j=function(e){return function(t){return[e(_g(t)),_y(t)]}},_F=function(e){return function(t){return[_g(t),e(_y(t))]}},_M=function(e){return function(t){return[_g(t),_y(e)]}},_U=function(e){return function(t){return[e(t),_y(t)]}},_L=_U(ec),_K=function(e,t){return function(n){return t(e,_g(n))}},_B=function(){return function(e){return function(t){return e(_g(t))}}},_P=function(e,t){return function(n){return t(_g(n),e)}},_W=function(e){return function(t){return function(n){return e.map(t(_g(n)),function(e){return[e,_y(n)]})}}},_D=function(e){return function(t){return e.map(_g(t),function(e){return[e,_y(t)]})}},_N="ReadonlyTuple",_q={URI:_N,map:_S},_Q=eH(_q);let _V=Object.freeze(Object.defineProperty({__proto__:null,Bifunctor:{URI:_N,bimap:_w,mapLeft:_I},Comonad:{URI:_N,map:_S,extend:__,extract:_g},Foldable:{URI:_N,reduce:_T,foldMap:_k,reduceRight:_O},Functor:_q,Semigroupoid:{URI:_N,compose:_C},Traversable:{URI:_N,map:_S,reduce:_T,foldMap:_k,reduceRight:_O,traverse:_R,sequence:_D},URI:_N,bimap:_E,compose:_M,duplicate:_L,extend:_U,extract:_g,flap:_Q,foldMap:_B,fst:_g,getApplicative:function(e){var t=_v(e);return{URI:_N,_E:void 0,map:t.map,ap:t.ap,of:_x(e)}},getApply:_v,getChain:_b,getChainRec:function(e){var t=_b(e);return{URI:_N,_E:void 0,map:t.map,ap:t.ap,chain:t.chain,chainRec:function(t,n){for(var r=n(t),i=e.empty,o=_g(r);"Left"===o._tag;)i=e.concat(i,_y(r)),o=_g(r=n(o.left));return[o.right,e.concat(i,_y(r))]}}},getMonad:function(e){var t=_b(e);return{URI:_N,_E:void 0,map:t.map,ap:t.ap,chain:t.chain,of:_x(e)}},map:_j,mapFst:_j,mapLeft:_F,mapSnd:_F,readonlyTuple:{URI:_N,compose:_C,map:_S,bimap:_w,mapLeft:_I,extract:_g,extend:__,reduce:_T,foldMap:_k,reduceRight:_O,traverse:_R,sequence:_D},reduce:_K,reduceRight:_P,sequence:_D,snd:_y,swap:function(e){return[_y(e),_g(e)]},traverse:_W},Symbol.toStringTag,{value:"Module"}));var _z=function(){return(_z=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},_Y=function(e){return function(t){return Object.keys(t).sort(e.compare)}},_H=_Y(wD);function _G(e){if("function"==typeof e)return _G(wD)(e);var t=_Y(e);return function(e){return function(n){for(var r=[],i=0,o=t(n);i<o.length;i++){var a=o[i];r.push(e(a,n[a]))}return r}}}var _Z=_G(wD)(function(e,t){return[e,t]});function _J(e){return function(t){if(!eK.call(t,e))return t;var n=Object.assign({},t);return delete n[e],n}}var _$=function(e,t){return function(n){if(!wZ(e,n))return eI;var r=Object.assign({},n);return r[e]=t(n[e]),e_(r)}};function _X(e){return w8(e)}function _0(e){return w7(e)}function _1(e,t){return Ii(e,t)}var _2=function(e){var t=Il(e);return function(e){return function(n){return wQ(n)?_z({},e):wQ(e)?_z({},n):t(e)(n)}}},_6=function(e){return function(t){return function(n){return wQ(n)||wQ(t)?{}:Ic(e)(t)(n)}}},_5=function(e){return function(t){return wQ(t)?_z({},e):wQ(e)?_z({},t):Id(e)(t)}},_3=function(e){return function(t){var n=_Y(e);return function(e,r){var i=n(e);if(0===i.length)return t.of({});for(var o=t.of({}),a=function(n){o=t.ap(t.map(o,function(e){return function(t){return e[n]=t,e}}),r(n,e[n]))},u=0;u<i.length;u++)a(i[u]);return o}}},_9="Record",_4={URI:_9,map:If},_8=eH(_4),_7={URI:_9,compact:IB,separate:IP},Te=function(e){return{URI:_9,map:If,reduce:IA(e),foldMap:Ih(e),reduceRight:Im(e),traverse:Ik(e),sequence:IO(e)}},Tt=function(e){var t=_2(e);return{concat:function(e,n){return t(n)(e)}}},Tn={URI:_9,reduce:IA(wD),foldMap:Ih(wD),reduceRight:Im(wD)},Tr={URI:_9,reduce:IA(wD),foldMap:Ih(wD),reduceRight:Im(wD),reduceWithIndex:Ib(wD),foldMapWithIndex:IC(wD),reduceRightWithIndex:IS(wD)},Ti={URI:_9,map:If,reduce:IA(wD),foldMap:Ih(wD),reduceRight:Im(wD),traverse:Ik(wD),sequence:_0},To={URI:_9,map:If,mapWithIndex:Ip,reduce:IA(wD),foldMap:Ih(wD),reduceRight:Im(wD),reduceWithIndex:Ib(wD),foldMapWithIndex:IC(wD),reduceRightWithIndex:IS(wD),traverse:Ik(wD),sequence:_0,traverseWithIndex:_3(wD)},Ta=iH(Ti,_7),Tu=iY(Ti,_7),Ts={URI:_9,map:If,reduce:IA(wD),foldMap:Ih(wD),reduceRight:Im(wD),traverse:Ik(wD),sequence:_0,compact:IB,separate:IP,filter:Ig,filterMap:Iy,partition:Iv,partitionMap:Ix,wither:Ta,wilt:Tu},Tl={URI:_9,map:If,reduce:IA(wD),foldMap:Ih(wD),reduceRight:Im(wD),traverse:Ik(wD),sequence:_0,compact:IB,separate:IP,filter:Ig,filterMap:Iy,partition:Iv,partitionMap:Ix,mapWithIndex:Ip,reduceWithIndex:Ib(wD),foldMapWithIndex:IC(wD),reduceRightWithIndex:IS(wD),filterMapWithIndex:I_,filterWithIndex:IT,partitionMapWithIndex:Iw,partitionWithIndex:II,traverseWithIndex:_3(wD),wither:Ta,wilt:Tu};let Tc=Object.freeze(Object.defineProperty({__proto__:null,Compactable:_7,Filterable:{URI:_9,map:If,compact:IB,separate:IP,filter:Ig,filterMap:Iy,partition:Iv,partitionMap:Ix},FilterableWithIndex:{URI:_9,map:If,mapWithIndex:Ip,compact:IB,separate:IP,filter:Ig,filterMap:Iy,partition:Iv,partitionMap:Ix,filterMapWithIndex:I_,filterWithIndex:IT,partitionMapWithIndex:Iw,partitionWithIndex:II},Foldable:Tn,FoldableWithIndex:Tr,Functor:_4,FunctorWithIndex:{URI:_9,map:If,mapWithIndex:Ip},Traversable:Ti,TraversableWithIndex:To,URI:_9,Witherable:Ts,collect:_G,compact:IB,deleteAt:_J,difference:_5,elem:Is,empty:{},every:Ia,filter:IE,filterMap:Ij,filterMapWithIndex:In,filterWithIndex:function(e){return Ir(e)},flap:_8,foldMap:function(e){return"compare"in e?IL(e):IL(wD)(e)},foldMapWithIndex:function(e){return"compare"in e?w5(e):w5(wD)(e)},fromEntries:function(e){return _1(tW(),sn)(e)},fromFoldable:_1,fromFoldableMap:function(e,t){return Io(e,t)},getDifferenceMagma:function(){return{concat:function(e,t){return _5(t)(e)}}},getEq:IN,getFoldable:function(e){return{URI:_9,reduce:IA(e),foldMap:Ih(e),reduceRight:Im(e)}},getFoldableWithIndex:function(e){return{URI:_9,reduce:IA(e),foldMap:Ih(e),reduceRight:Im(e),reduceWithIndex:Ib(e),foldMapWithIndex:IC(e),reduceRightWithIndex:IS(e)}},getIntersectionSemigroup:function(e){var t=_6(e);return{concat:function(e,n){return t(n)(e)}}},getMonoid:Iq,getShow:function(e){return"compare"in e?ID(e):ID(wD)(e)},getTraversable:Te,getTraversableWithIndex:function(e){return{URI:_9,map:If,mapWithIndex:Ip,reduce:IA(e),foldMap:Ih(e),reduceRight:Im(e),reduceWithIndex:Ib(e),foldMapWithIndex:IC(e),reduceRightWithIndex:IS(e),traverse:Ik(e),sequence:IO(e),traverseWithIndex:_3(e)}},getUnionMonoid:function(e){return{concat:Tt(e).concat,empty:{}}},getUnionSemigroup:Tt,getWitherable:function(e){var t=Te(e);return{URI:_9,map:If,reduce:IA(e),foldMap:Ih(e),reduceRight:Im(e),traverse:t.traverse,sequence:t.sequence,compact:IB,separate:IP,filter:Ig,filterMap:Iy,partition:Iv,partitionMap:Ix,wither:iH(t,_7),wilt:iY(t,_7)}},has:wZ,hasOwnProperty:I2,insertAt:wG,intersection:_6,isEmpty:wQ,isSubrecord:w$,keys:_H,lookup:wX,map:w2,mapWithIndex:w1,modifyAt:_$,partition:IF,partitionMap:IM,partitionMapWithIndex:Ie,partitionWithIndex:function(e){return It(e)},pop:function(e){var t=_J(e);return function(n){var r=wX(e,n);return eS(r)?eI:e_([r.value,t(n)])}},record:Tl,reduce:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===e.length?IU(e[0]):IU(wD).apply(void 0,e)},reduceRight:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===e.length?IK(e[0]):IK(wD).apply(void 0,e)},reduceRightWithIndex:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===e.length?w3(e[0]):w3(wD).apply(void 0,e)},reduceWithIndex:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===e.length?w6(e[0]):w6(wD).apply(void 0,e)},separate:IP,sequence:_0,singleton:w9,size:wq,some:Iu,toArray:_Z,toEntries:_Z,toUnfoldable:function(e){return function(t){var n=_Z(t),r=n.length;return e.unfold(0,function(e){return e<r?e_([n[e],e+1]):eI})}},traverse:_X,traverseWithIndex:function(e){return w4(e)},union:_2,updateAt:function(e,t){return _$(e,function(){return t})},upsertAt:wG,wilt:function(e){var t=_X(e);return function(n){return function(r){return e.map(ev(r,t(n)),IP)}}},wither:function(e){var t=_X(e);return function(n){return function(r){return e.map(ev(r,t(n)),IB)}}}},Symbol.toStringTag,{value:"Module"})),Td=Object.freeze(Object.defineProperty({__proto__:null,and:function(e){return function(t){return function(n){return t(n)&&e(n)}}},compose:function(e){return function(t){return function(n){return t(n)&&e(n)}}},fromEitherK:function(e){return function(t){return ek(e(t))}},fromOptionK:function(e){return function(t){return ew(e(t))}},id:function(){return function(e){return!0}},not:function(e){return function(t){return!e(t)}},or:function(e){return function(t){return function(n){return t(n)||e(n)}}},zero:function(){return function(e){return!1}}},Symbol.toStringTag,{value:"Module"}));var Tf=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return{add:function(t,n){return e.map(function(e,r){return e.add(t[r],n[r])})},zero:e.map(function(e){return e.zero}),mul:function(t,n){return e.map(function(e,r){return e.mul(t[r],n[r])})},one:e.map(function(e){return e.one}),sub:function(t,n){return e.map(function(e,r){return e.sub(t[r],n[r])})}}};let Tp=Object.freeze(Object.defineProperty({__proto__:null,getFunctionRing:el,getTupleRing:Tf,negate:function(e){return function(t){return e.sub(e.zero,t)}},tuple:Tf},Symbol.toStringTag,{value:"Module"})),TA=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),Th=Object.freeze(Object.defineProperty({__proto__:null,getFunctionSemiring:es},Symbol.toStringTag,{value:"Module"}));function Tm(e){return function(t){for(var n,r=t.values(),i=new Set;!(n=r.next()).done;){var o=n.value;e(o)&&i.add(o)}return i}}function Tg(e){var t=TT(e);return function(n,r){if(void 0===r){var i=Tg(e);return function(e){return i(n,e)}}if(T_(n))return r;if(T_(r))return n;var o=new Set(n);return r.forEach(function(e){t(e,o)||o.add(e)}),o}}function Ty(e){var t=TT(e);return function(n,r){if(void 0===r){var i=Ty(e);return function(e){return i(e,n)}}if(T_(n)||T_(r))return new Set;var o=new Set;return n.forEach(function(e){t(e,r)&&o.add(e)}),o}}function Tv(e){var t=TT(e);return function(n,r){if(void 0===r){var i=Tv(e);return function(e){return i(e,n)}}return Tm(function(e){return!t(e,r)})(n)}}var Tx=function(e){return{concat:Tg(e)}};function Tb(e){var t=TT(e);return function(e){return function(n){if(t(e)(n))return n;var r=new Set(n);return r.add(e),r}}}var TC=function(e){return function(t){return function(n){return Tm(function(n){return!e.equals(t,n)})(n)}}},TS=function(e){return function(t){for(var n=t.length,r=new Set,i=TT(e),o=0;o<n;o++){var a=t[o];i(a,r)||r.add(a)}return r}};function Tw(e){var t=TT(e);return function(e){return function(n){var r=new Set;return n.forEach(function(n){var i=e(n);"Some"!==i._tag||t(i.value,r)||r.add(i.value)}),r}}}var TI=new Set,T_=function(e){return 0===e.size},TT=_d,Tk=function(e){return function(t){var n=[];return t.forEach(function(e){return n.push(e)}),n.sort(e.compare)}};let TO=Object.freeze(Object.defineProperty({__proto__:null,chain:function(e){var t=TT(e);return function(e){return function(n){var r=new Set;return n.forEach(function(n){e(n).forEach(function(e){t(e,r)||r.add(e)})}),r}}},compact:function(e){return Tw(e)(ec)},difference:Tv,elem:TT,empty:TI,every:_l,filter:Tm,filterMap:Tw,foldMap:_t,fromArray:TS,getDifferenceMagma:function(e){return{concat:Tv(e)}},getEq:_A,getIntersectionSemigroup:function(e){return{concat:Ty(e)}},getShow:_p,getUnionMonoid:function(e){return{concat:Tx(e).concat,empty:new Set}},getUnionSemigroup:Tx,insert:Tb,intersection:Ty,isEmpty:T_,isSubset:_c,map:function(e){var t=TT(e);return function(e){return function(n){var r=new Set;return n.forEach(function(n){var i=e(n);t(i,r)||r.add(i)}),r}}},partition:function(e){return function(t){for(var n,r=t.values(),i=new Set,o=new Set;!(n=r.next()).done;){var a=n.value;e(a)?i.add(a):o.add(a)}return iK(o,i)}},partitionMap:function(e,t){return function(n){return function(r){for(var i,o=r.values(),a=new Set,u=new Set,s=TT(e),l=TT(t);!(i=o.next()).done;){var c=n(i.value);switch(c._tag){case"Left":s(c.left,a)||a.add(c.left);break;case"Right":l(c.right,u)||u.add(c.right)}}return iK(a,u)}}},reduce:_e,reduceRight:_n,remove:TC,separate:function(e,t){return function(n){var r=TT(e),i=TT(t),o=new Set,a=new Set;return n.forEach(function(e){switch(e._tag){case"Left":r(e.left,o)||o.add(e.left);break;case"Right":i(e.right,a)||a.add(e.right)}}),iK(o,a)}},singleton:function(e){return new Set([e])},size:function(e){return e.size},some:_s,subset:_c,toArray:Tk,toggle:function(e){var t=TT(e),n=TC(e),r=Tb(e);return function(e){return function(i){return(t(e,i)?n:r)(e)(i)}}},union:Tg},Symbol.toStringTag,{value:"Module"}));var TR=function(e){return{show:function(t){var n="{";for(var r in e)eK.call(e,r)&&(n+=" ".concat(r,": ").concat(e[r].show(t[r]),","));return n.length>1&&(n=n.slice(0,-1)+" "),n+="}"}}},TE=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return{show:function(t){return"[".concat(t.map(function(t,n){return e[n].show(t)}).join(", "),"]")}}};let Tj=Object.freeze(Object.defineProperty({__proto__:null,getStructShow:TR,getTupleShow:TE,showBoolean:{show:function(e){return JSON.stringify(e)}},showNumber:{show:function(e){return JSON.stringify(e)}},showString:{show:function(e){return JSON.stringify(e)}},struct:TR,tuple:TE},Symbol.toStringTag,{value:"Module"}));function TF(e){return function(t){return function(n){return e.of([t,n])}}}function TM(e){return function(t){return function(n){return function(r){return e.map(n(r),function(e){var n=e[0],r=e[1];return[t(n),r]})}}}}function TU(e){return function(t){return function(n){return function(r){return e.chain(n(r),function(n){var r=n[0],i=n[1];return e.map(t(i),function(e){var t=e[0],n=e[1];return[r(t),n]})})}}}}function TL(e){return function(t){return function(n){return function(r){return e.chain(n(r),function(e){var n=e[0],r=e[1];return t(n)(r)})}}}}function TK(e){return function(t){return function(n){return e.of(t(n))}}}function TB(e){return function(t){return function(n){return e.map(t,function(e){return[e,n]})}}}function TP(e){return function(t){return function(n){return e.map(n(t),function(e){return e[0]})}}}function TW(e){return function(t){return function(n){return e.map(n(t),_y)}}}let TD=Object.freeze(Object.defineProperty({__proto__:null,ap:TU,chain:TL,evaluate:TP,execute:TW,fromF:TB,fromState:TK,getStateM:function(e){var t=TU(e),n=TM(e),r=TL(e),i=TP(e),o=TW(e);return{map:function(e,t){return ev(e,n(t))},ap:function(e,n){return ev(e,t(n))},of:TF(e),chain:function(e,t){return ev(e,r(t))},get:function(){return function(t){return e.of([t,t])}},put:function(t){return function(){return e.of([void 0,t])}},modify:function(t){return function(n){return e.of([void 0,t(n)])}},gets:function(t){return function(n){return e.of([t(n),n])}},fromState:TK(e),fromM:TB(e),evalState:function(e,t){return ev(e,i(t))},execState:function(e,t){return ev(e,o(t))}}},map:TM,of:TF},Symbol.toStringTag,{value:"Module"}));var TN=function(e){return function(){return C8(e)}},Tq=TF(SZ);function TQ(e){return TJ(Se(e))}function TV(e){return TJ(Sn(e))}function Tz(e){return TJ(Sa(e))}var TY=da(function(e){return TN(e)},Tq),TH=TK(SZ),TG=function(e){return TJ(ed(e))},TZ=function(e){return TJ(Ss(e))},TJ=TB(SH),T$=function(e){return function(t){return function(n){return e(n)(t)(n)}}},TX=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return TZ(e.apply(void 0,t))}},T0=function(e){return function(t){return ev(t,ki(TX(e)))}},T1=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return TG(e.apply(void 0,t))}},T2=function(e){return function(t){return ev(t,ki(T1(e)))}},T6=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return TJ(e.apply(void 0,t))}},T5=function(e){return function(t){return ev(t,ki(T6(e)))}},T3=function(e,t){return ev(e,kt(t))},T9=function(e,t){return ev(e,kn(t))},T4=function(e,t){return ev(e,kr(t))},T8=function(e,t){return function(n){return ev(e(n),Sq(function(){return t()(n)}))}},T7=function(e,t,n){return function(r){return ev(e(r),SK(t,function(e){var t=e[0],r=e[1];return[n(t),r]}))}},ke=function(e,t){return function(n){return ev(e(n),SB(t))}},kt=TM(SH),kn=TU(S2),kr=TL(S2),ki=kr,ko=ki(ec),ka=function(e){return function(t){return function(n){return ev(t(n),Sq(function(){return e()(n)}))}}},ku="StateReaderTaskEither",ks={URI:ku,map:T3},kl=eH(ks),kc={URI:ku,map:T3,ap:T9},kd=eW(kc),kf=eD(kc),kp={URI:ku,map:T3,ap:T9,chain:T4},kA={URI:ku,fromState:TH},kh=pU(kA),km=pL(kA),kg=pK(kA),ky=pB(kA),kv=pP(kA),kx=pW(kA,kp),kb=e1(kp),kC={URI:ku,fromReader:TV},kS=pe(kC),kw=pt(kC),kI=pn(kC),k_=pr(kC,kp),kT=pi(kC,kp),kk={URI:ku,fromEither:TY},kO=e5(kk),kR=e9(kk),kE=e4(kk,kp),kj=e7(kk,kp),kF=te(kk,kp),kM=e3(kk),kU=tt(kk,kp),kL=e8(kk),kK={URI:ku,fromIO:Tz},kB=fm(kK),kP=fg(kK,kp),kW=fy(kK,kp),kD={URI:ku,fromIO:Tz,fromTask:TQ},kN=pN(kD),kq=pq(kD,kp),kQ=pQ(kD,kp),kV=TP(SH),kz=TW(SH),kY=eG(ks),kH=e2(kp),kG=eN(kc),kZ=function(e){return function(t){return function(n){return function(r){return function(){return eM(t).reduce(function(t,n,i){return t.then(function(o){return eT(o)?t:e(i+1,n)(o.right[1])(r)().then(function(e){if(eT(e))return e;var t=e.right,n=t[0],r=t[1];return o.right[0].push(n),o.right[1]=r,o})})},e(0,eF(t))(n)(r)().then(cq(function(e){return[[e[0]],e[1]]})))}}}}},kJ=function(e){var t=kZ(e);return function(e){return ej(e)?t(e):Tq(eU)}},k$=function(e){return kJ(function(t,n){return e(n)})};let kX=Object.freeze(Object.defineProperty({__proto__:null,Alt:{URI:ku,map:T3,alt:T8},Applicative:{URI:ku,map:T3,ap:T9,of:Tq},Apply:kc,Bifunctor:{URI:ku,bimap:T7,mapLeft:ke},Chain:kp,FromEither:kk,FromIO:kK,FromReader:kC,FromState:kA,FromTask:kD,Functor:ks,Monad:{URI:ku,map:T3,ap:T9,of:Tq,chain:T4},MonadIO:{URI:ku,map:T3,ap:T9,of:Tq,chain:T4,fromIO:Tz},MonadTask:{URI:ku,map:T3,ap:T9,of:Tq,chain:T4,fromIO:Tz,fromTask:TQ},MonadThrow:{URI:ku,map:T3,ap:T9,of:Tq,chain:T4,throwError:TN},Pointed:{URI:ku,of:Tq},URI:ku,alt:ka,altW:ka,ap:kn,apFirst:kd,apFirstW:kd,apS:kG,apSW:kG,apSecond:kf,apSecondW:kf,apW:kn,ask:kS,asks:kw,asksStateReaderTaskEither:T$,asksStateReaderTaskEitherW:T$,bimap:function(e,t){return function(n){return T7(n,e,t)}},bind:kH,bindTo:kY,bindW:kH,chain:kr,chainEitherK:kj,chainEitherKW:kj,chainFirst:kb,chainFirstEitherK:kF,chainFirstEitherKW:kF,chainFirstIOK:kW,chainFirstReaderK:kT,chainFirstReaderKW:kT,chainFirstTaskK:kQ,chainFirstW:kb,chainIOEitherK:T0,chainIOEitherKW:T0,chainIOK:kP,chainOptionK:kE,chainReaderK:k_,chainReaderKW:k_,chainReaderTaskEitherK:T5,chainReaderTaskEitherKW:T5,chainStateK:kx,chainTaskEitherK:T2,chainTaskEitherKW:T2,chainTaskK:kq,chainW:ki,evalState:function(e,t){return ev(e(t),SL(function(e){return e[0]}))},evaluate:kV,execState:function(e,t){return ev(e(t),SL(function(e){return e[0],e[1]}))},execute:kz,filterOrElse:kU,filterOrElseW:kU,flap:kl,flatten:ko,flattenW:ko,fromEither:TY,fromEitherK:kL,fromIO:Tz,fromIOEither:TZ,fromIOEitherK:TX,fromIOK:kB,fromOption:kO,fromOptionK:kR,fromPredicate:kM,fromReader:TV,fromReaderEither:function(e){return TJ(Sl(e))},fromReaderK:kI,fromReaderTaskEither:TJ,fromReaderTaskEitherK:T6,fromState:TH,fromStateK:kv,fromTask:TQ,fromTaskEither:TG,fromTaskEitherK:T1,fromTaskK:kN,get:kh,gets:ky,left:TN,leftIO:function(e){return TJ(Su(e))},leftReader:function(e){return TJ(Sr(e))},leftState:function(e){return function(t){return C8(e(t)[0])}},leftTask:function(e){return TJ(St(e))},local:function(e){return function(t){return em(t,fb(e))}},map:kt,mapLeft:function(e){return function(t){return ke(t,e)}},modify:kg,of:Tq,put:km,right:Tq,rightIO:Tz,rightReader:TV,rightState:function(e){return em(e,C7)},rightTask:TQ,run:function(e,t,n){return e(t)(n)()},sequenceArray:k$(ec),stateReaderTaskEither:{URI:ku,map:T3,of:Tq,ap:T9,chain:T4,bimap:T7,mapLeft:ke,alt:T8,fromIO:Tz,fromTask:TQ,throwError:TN},stateReaderTaskEitherSeq:{URI:ku,map:T3,of:Tq,ap:T9,chain:T4,bimap:T7,mapLeft:ke,alt:T8,fromIO:Tz,fromTask:TQ,throwError:TN},throwError:TN,traverseArray:k$,traverseArrayWithIndex:kJ,traverseReadonlyArrayWithIndex:kJ,traverseReadonlyNonEmptyArrayWithIndex:kZ},Symbol.toStringTag,{value:"Module"}));var k0=function(e,t){return ev(e,k5(t))},k1=function(e){return function(t){return{peek:function(n){return e({peek:t.peek,pos:n})},pos:t.pos}}},k2=function(e){return e.peek(e.pos)},k6=k1(ec),k5=function(e){return function(t){return{peek:function(n){return e(t.peek(n))},pos:t.pos}}},k3="Store",k9={URI:k3,map:k0},k4=eH(k9),k8={URI:k3,map:k0,extend:function(e,t){return ev(e,k1(t))},extract:k2};let k7=Object.freeze(Object.defineProperty({__proto__:null,Comonad:k8,Functor:k9,URI:k3,duplicate:k6,experiment:function(e){return function(t){return function(n){return e.map(t(n.pos),function(e){return n.peek(e)})}}},extend:k1,extract:k2,flap:k4,map:k5,peeks:function(e){return function(t){return t.peek(e(t.pos))}},seek:function(e){return function(t){return{peek:t.peek,pos:e}}},seeks:function(e){return function(t){return{peek:t.peek,pos:e(t.pos)}}},store:k8},Symbol.toStringTag,{value:"Module"}));function Oe(e,t){return function(n,r){return t.compose(e.second(r),e.first(n))}}function Ot(e,t){var n=Oe(e,t);return function(r,i){return t.compose(n(r,i),e.promap(t.id(),ec,function(e){return[e,e]}))}}let On=Object.freeze(Object.defineProperty({__proto__:null,fanOut:Ot,fanout:function(e){return Ot(e,e)},split:Oe,splitStrong:function(e){return Oe(e,e)}},Symbol.toStringTag,{value:"Module"})),Or=Object.freeze(Object.defineProperty({__proto__:null,evolve:function(e){return function(t){var n={};for(var r in t)eK.call(t,r)&&(n[r]=e[r](t[r]));return n}},getAssignSemigroup:function(){return{concat:function(e,t){return Object.assign({},e,t)}}}},Symbol.toStringTag,{value:"Module"}));var Oi=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},Oo=h5(xx),Oa=mn(xx),Ou=mr(xx),Os=function(e){return Ol(xu(e))},Ol=h9(xy),Oc=xf(sX),Od=mi(xy),Of=mo(xT),Op=ma(xk),OA=h4(xx),Oh=function(e){return function(){var t,n,r,i;return t=void 0,n=void 0,r=void 0,i=function(){return Oi(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,e().then(e_)];case 1:return[2,t.sent()];case 2:return t.sent(),[2,eI];case 3:return[2]}})},new(r||(r=Promise))(function(e,o){function a(e){try{s(i.next(e))}catch(e){o(e)}}function u(e){try{s(i.throw(e))}catch(e){o(e)}}function s(t){var n;t.done?e(t.value):((n=t.value)instanceof r?n:new r(function(e){e(n)})).then(a,u)}s((i=i.apply(t,n||[])).next())})}},Om=h8(xx),Og=h7(xk),Oy=me(xx),Ov=mt(xk),Ox=mu(xy),Ob=ms(xb),OC=ml(xk),OS=OC(ec),Ow=mc(xk),OI=h3(xx),O_=OI(),OT=co(xy,l_),Ok=ca(xy,l_,lu),OO=fe(xy,lE),OR=ft(xy,lE),OE=fn(xy,lE),Oj=fr(xy,lE),OF=function(e,t){return ev(e,Ox(t))},OM=function(e,t){return ev(e,Ob(t))},OU=function(e,t){return ev(e,OC(t))},OL=function(e,t){return ev(e,Ow(t))},OK="TaskOption",OB={URI:OK,map:OF},OP=eH(OB),OW={URI:OK,of:Oo},OD={URI:OK,map:OF,ap:OM},ON=eW(OD),Oq=eD(OD),OQ=function(e,t){return ev(e,OC(function(e){return ev(t,Ox(e))}))},OV={URI:OK,map:OF,ap:OM,chain:OU},Oz=e1(OV),OY={URI:OK,zero:OI},OH=iJ(OY,OW),OG={URI:OK,fromIO:Os},OZ=fm(OG),OJ=fg(OG,OV),O$=fy(OG,OV),OX={URI:OK,fromEither:Ou},O0=e8(OX),O1=e7(OX,OV),O2=te(OX,OV),O6={URI:OK,fromIO:Os,fromTask:Ol},O5=pN(O6),O3=pq(O6,OV),O9=pQ(O6,OV),O4=Oo(eL),O8=eG(OB),O7=e2(OV),Re=eN(OD),Rt=Oo(eU),Rn=function(e){return em(xW(e),xf(l9(ex)))},Rr=function(e){var t=Rn(e);return function(e){return ej(e)?t(e):Rt}},Ri=function(e){return function(t){return function(){return eM(t).reduce(function(t,n,r){return t.then(function(i){return eS(i)?t:e(r+1,n)().then(function(e){return eS(e)?e:(i.value.push(e.value),i)})})},e(0,eF(t))().then(la(eE)))}}},Ro=function(e){var t=Ri(e);return function(e){return ej(e)?t(e):Rt}},Ra=function(e){return Rr(function(t,n){return e(n)})},Ru=Ra(ec),Rs=function(e){return Ro(function(t,n){return e(n)})};let Rl=Object.freeze(Object.defineProperty({__proto__:null,Alt:{URI:OK,map:OF,alt:OL},Alternative:{URI:OK,map:OF,ap:OM,of:Oo,alt:OL,zero:OI},ApT:Rt,ApplicativePar:{URI:OK,map:OF,ap:OM,of:Oo},ApplicativeSeq:{URI:OK,map:OF,ap:OQ,of:Oo},ApplyPar:OD,ApplySeq:{URI:OK,map:OF,ap:OQ},Chain:OV,Compactable:{URI:OK,compact:OT,separate:Ok},Do:O4,Filterable:{URI:OK,map:OF,compact:OT,separate:Ok,filter:function(e,t){return ev(e,OO(t))},filterMap:function(e,t){return ev(e,OR(t))},partition:function(e,t){return ev(e,OE(t))},partitionMap:function(e,t){return ev(e,Oj(t))}},FromEither:OX,FromIO:OG,FromTask:O6,Functor:OB,Monad:{URI:OK,map:OF,ap:OM,of:Oo,chain:OU},MonadIO:{URI:OK,map:OF,ap:OM,of:Oo,chain:OU,fromIO:Os},MonadTask:{URI:OK,map:OF,ap:OM,of:Oo,chain:OU,fromIO:Os,fromTask:Ol},Pointed:OW,Zero:OY,alt:Ow,altW:Ow,ap:Ob,apFirst:ON,apS:Re,apSecond:Oq,bind:O7,bindTo:O8,chain:OC,chainEitherK:O1,chainFirst:Oz,chainFirstEitherK:O2,chainFirstIOK:O$,chainFirstTaskK:O9,chainIOK:OJ,chainNullableK:Og,chainOptionK:Ov,chainTaskK:O3,compact:OT,filter:OO,filterMap:OR,flap:OP,flatten:OS,fold:Of,foldW:Of,fromEither:Ou,fromEitherK:O0,fromIO:Os,fromIOK:OZ,fromNullable:OA,fromNullableK:Om,fromOption:xA,fromOptionK:Oy,fromPredicate:Oa,fromTask:Ol,fromTaskEither:Oc,fromTaskK:O5,getOrElse:Op,getOrElseW:Op,guard:OH,map:Ox,match:Od,matchE:Of,matchEW:Of,matchW:Od,none:O_,of:Oo,partition:OE,partitionMap:Oj,separate:Ok,sequenceArray:Ru,sequenceSeqArray:Rs(ec),some:Oo,traverseArray:Ra,traverseArrayWithIndex:Rr,traverseReadonlyArrayWithIndex:Rr,traverseReadonlyArrayWithIndexSeq:Ro,traverseReadonlyNonEmptyArrayWithIndex:Rn,traverseReadonlyNonEmptyArrayWithIndexSeq:Ri,traverseSeqArray:Rs,traverseSeqArrayWithIndex:Ro,tryCatch:Oh,tryCatchK:function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return Oh(function(){return e.apply(void 0,t)})}},zero:OI},Symbol.toStringTag,{value:"Module"}));var Rc=function(e){return"Left"===e._tag},Rd=function(e){return"Right"===e._tag};function Rf(e){return"Both"===e._tag}function Rp(e){return{_tag:"Left",left:e}}function RA(e){return{_tag:"Right",right:e}}function Rh(e,t){return{_tag:"Both",left:e,right:t}}var Rm=function(e,t,n){return function(r){switch(r._tag){case"Left":return e(r.left);case"Right":return t(r.right);case"Both":return n(r.left,r.right)}}},Rg=Rm(RA,Rp,function(e,t){return Rh(t,e)});function Ry(e,t){return{concat:function(n,r){return Rc(n)?Rc(r)?Rp(e.concat(n.left,r.left)):Rd(r)?Rh(n.left,r.right):Rh(e.concat(n.left,r.left),r.right):Rd(n)?Rc(r)?Rh(r.left,n.right):Rd(r)?RA(t.concat(n.right,r.right)):Rh(r.left,t.concat(n.right,r.right)):Rc(r)?Rh(e.concat(n.left,r.left),n.right):Rd(r)?Rh(n.left,t.concat(n.right,r.right)):Rh(e.concat(n.left,r.left),t.concat(n.right,r.right))}}}var Rv=function(e){return{URI:RL,_E:void 0,map:Rb,ap:function(t,n){return Rc(t)?Rc(n)?Rp(e.concat(t.left,n.left)):Rd(n)?Rp(t.left):Rp(e.concat(t.left,n.left)):Rd(t)?Rc(n)?Rp(n.left):Rd(n)?RA(t.right(n.right)):Rh(n.left,t.right(n.right)):Rc(n)?Rp(e.concat(t.left,n.left)):Rd(n)?Rh(t.left,t.right(n.right)):Rh(e.concat(t.left,n.left),t.right(n.right))}}};function Rx(e){return{URI:RL,_E:void 0,map:Rb,ap:Rv(e).ap,chain:function(t,n){if(Rc(t))return t;if(Rd(t))return n(t.right);var r=n(t.right);return Rc(r)?Rp(e.concat(t.left,r.left)):Rd(r)?Rh(t.left,r.right):Rh(e.concat(t.left,r.left),r.right)}}}var Rb=function(e,t){return ev(e,RR(t))},RC=function(e,t,n){return ev(e,Rk(t,n))},RS=function(e,t){return ev(e,RO(t))},Rw=function(e,t,n){return ev(e,RE(t,n))},RI=function(e){var t=Rj(e);return function(e,n){return ev(e,t(n))}},R_=function(e,t,n){return ev(e,RF(t,n))},RT=function(e){var t=RM(e);return function(e,n){return ev(e,t(n))}},Rk=function(e,t){return function(n){return Rc(n)?Rp(e(n.left)):Rd(n)?RA(t(n.right)):Rh(e(n.left),t(n.right))}},RO=function(e){return function(t){return Rc(t)?Rp(e(t.left)):Rf(t)?Rh(e(t.left),t.right):t}},RR=function(e){return function(t){return Rc(t)?t:Rd(t)?RA(e(t.right)):Rh(t.left,e(t.right))}},RE=function(e,t){return function(n){return Rc(n)?e:t(e,n.right)}},Rj=function(e){return function(t){return function(n){return Rc(n)?e.empty:t(n.right)}}},RF=function(e,t){return function(n){return Rc(n)?e:t(n.right,e)}},RM=function(e){return function(t){return function(n){return Rc(n)?e.of(n):Rd(n)?e.map(t(n.right),RA):e.map(t(n.right),function(e){return Rh(n.left,e)})}}},RU=function(e){return function(t){return Rc(t)?e.of(t):Rd(t)?e.map(t.right,RA):e.map(t.right,function(e){return Rh(t.left,e)})}},RL="These",RK={URI:RL,map:Rb},RB=eH(RK),RP={URI:RL,fromEither:ec},RW=e5(RP),RD=e9(RP),RN=function(e,t){return function(n){return Rc(n)?[n.left,t()]:Rd(n)?[e(),n.right]:[n.left,n.right]}},Rq=RA(eU),RQ=function(e){return function(t){return function(n){var r=eI,i=t(0,eF(n));if(Rc(i))return i;Rf(i)&&(r=e_(i.left));for(var o=[i.right],a=1;a<n.length;a++){var u=t(a,n[a]);if(Rc(u))return u;Rf(u)&&(r=eS(r)?e_(u.left):e_(e.concat(r.value,u.left))),o.push(u.right)}return eS(r)?RA(o):Rh(r.value,o)}}};let RV=Object.freeze(Object.defineProperty({__proto__:null,ApT:Rq,Bifunctor:{URI:RL,bimap:RC,mapLeft:RS},Foldable:{URI:RL,reduce:Rw,foldMap:RI,reduceRight:R_},FromEither:RP,FromThese:{URI:RL,fromThese:ec},Functor:RK,Pointed:{URI:RL,of:RA},Traversable:{URI:RL,map:Rb,reduce:Rw,foldMap:RI,reduceRight:R_,traverse:RT,sequence:RU},URI:RL,bimap:Rk,both:Rh,elem:function(e){return function(t){return function(n){return!Rc(n)&&e.equals(t,n.right)}}},exists:function(e){return function(t){return!Rc(t)&&e(t.right)}},flap:RB,fold:Rm,foldMap:Rj,foldW:Rm,fromOption:RW,fromOptionK:RD,fromOptions:function(e,t){return eS(e)?eS(t)?eI:e_(RA(t.value)):eS(t)?e_(Rp(e.value)):e_(Rh(e.value,t.value))},getApplicative:function(e){return{URI:RL,_E:void 0,map:Rb,ap:Rv(e).ap,of:RA}},getApply:Rv,getChain:Rx,getEq:function(e,t){return tr(function(n,r){return Rc(n)?Rc(r)&&e.equals(n.left,r.left):Rd(n)?Rd(r)&&t.equals(n.right,r.right):Rf(r)&&e.equals(n.left,r.left)&&t.equals(n.right,r.right)})},getLeft:function(e){return Rc(e)?e_(e.left):Rd(e)?eI:e_(e.left)},getLeftOnly:function(e){return Rc(e)?e_(e.left):eI},getMonad:function(e){var t=Rx(e);return{URI:RL,_E:void 0,map:Rb,of:RA,ap:t.ap,chain:t.chain,throwError:Rp}},getRight:function(e){return Rc(e)?eI:(Rd(e),e_(e.right))},getRightOnly:function(e){return Rd(e)?e_(e.right):eI},getSemigroup:Ry,getShow:function(e,t){return{show:Rm(function(t){return"left(".concat(e.show(t),")")},function(e){return"right(".concat(t.show(e),")")},function(n,r){return"both(".concat(e.show(n),", ").concat(t.show(r),")")})}},isBoth:Rf,isLeft:Rc,isRight:Rd,left:Rp,leftOrBoth:function(e){return function(t){return eS(t)?Rp(e):Rh(e,t.value)}},map:RR,mapLeft:RO,match:Rm,matchW:Rm,of:RA,reduce:RE,reduceRight:RF,right:RA,rightOrBoth:function(e){return function(t){return eS(t)?RA(e):Rh(t.value,e)}},sequence:RU,swap:Rg,these:{URI:RL,map:Rb,bimap:RC,mapLeft:RS,reduce:Rw,foldMap:RI,reduceRight:R_,traverse:RT,sequence:RU},toTuple:function(e,t){return RN(function(){return e},function(){return t})},toTuple2:RN,traverse:RM,traverseReadonlyArrayWithIndex:function(e){return function(t){var n=RQ(e)(t);return function(e){return ej(e)?n(e):Rq}}},traverseReadonlyNonEmptyArrayWithIndex:RQ},Symbol.toStringTag,{value:"Module"}));function Rz(e){return em(RA,e.of)}function RY(e){return em(Rp,e.of)}function RH(e){return em(Rh,e.of)}function RG(e){return function(t){return e.map(t,RA)}}function RZ(e){return function(t){return e.map(t,Rp)}}function RJ(e){return eY(e,RK)}function R$(e,t){return eP(e,Rv(t))}function RX(e,t){var n=RY(e);return function(r){return function(i){return e.chain(i,Rm(n,r,function(n,i){return e.map(r(i),Rm(function(e){return Rp(t.concat(n,e))},function(e){return Rh(n,e)},function(e,r){return Rh(t.concat(n,e),r)}))}))}}}function R0(e){return function(t,n){return function(r){return e.map(r,Rk(t,n))}}}function R1(e){return function(t){return function(n){return e.map(n,RO(t))}}}function R2(e){return function(t,n,r){return function(i){return e.map(i,Rm(t,n,r))}}}function R6(e){return function(t,n,r){return function(i){return e.chain(i,Rm(t,n,r))}}}function R5(e){return function(t){return e.map(t,Rg)}}function R3(e){return function(t,n){return function(r){return e.map(r,RN(t,n))}}}let R9=Object.freeze(Object.defineProperty({__proto__:null,ap:R$,bimap:R0,both:RH,chain:RX,getTheseM:function(e){var t=RJ(e),n=R0(e),r=R1(e),i=R6(e),o=R3(e),a=Rz(e),u=function(e,n){return ev(e,t(n))};return{map:u,bimap:function(e,t,r){return ev(e,n(t,r))},mapLeft:function(e,t){return ev(e,r(t))},fold:function(e,t,n,r){return ev(e,i(t,n,r))},swap:R5(e),rightM:RG(e),leftM:RZ(e),left:RY(e),right:Rz(e),both:RH(e),toTuple:function(e,t,n){return ev(e,o(function(){return t},function(){return n}))},getMonad:function(t){var n=R$(e,t),r=RX(e,t);return{_E:void 0,map:u,of:a,ap:function(e,t){return ev(e,n(t))},chain:function(e,t){return ev(e,r(t))}}}}},left:RY,leftF:RZ,map:RJ,mapLeft:R1,match:R2,matchE:R6,right:Rz,rightF:RG,swap:R5,toTuple2:R3},Symbol.toStringTag,{value:"Module"}));var R4=RY(xx),R8=Rz(xx),R7=RH(xx),Ee=RG(xy),Et=RZ(xy),En=em(xu,Ee),Er=em(xu,Et),Ei=R2(xy),Eo=R6(xk),Ea=R5(xy),Eu=function(e,t){return ev(e,Ec(t))},Es=function(e,t,n){return ev(e,Ed(t,n))},El=function(e,t){return ev(e,Ef(t))},Ec=RJ(xy),Ed=R0(xy),Ef=R1(xy),Ep="TaskThese",EA=function(e,t){var n=R$(e,t);return{URI:Ep,_E:void 0,map:Eu,ap:function(e,t){return ev(e,n(t))}}};function Eh(e,t){return{URI:Ep,_E:void 0,map:Eu,ap:EA(e,t).ap,of:R8}}function Em(e){var t=EA(xw,e),n=RX(xk,e);return{URI:Ep,_E:void 0,map:Eu,ap:t.ap,chain:function(e,t){return ev(e,n(t))}}}var Eg={URI:Ep,map:Eu},Ey=eH(Eg),Ev={URI:Ep,fromEither:xA},Ex=e5(Ev),Eb=e9(Ev),EC=e3(Ev),ES={URI:Ep,fromThese:xA},Ew=pz(ES),EI={URI:Ep,fromIO:En},E_=fm(EI),ET={URI:Ep,fromIO:En,fromTask:Ee},Ek=pN(ET),EO=R3(xy),ER=R8(eU),EE=function(e){var t=RQ(e);return function(e){return em(xW(e),xf(t(ex)))}},Ej=function(e){return function(t){return function(n){return function(){return eM(n).reduce(function(n,r,i){return n.then(function(o){return Rc(o)?n:t(i+1,r)().then(function(t){if(Rc(t))return t;if(Rf(t)){var n=o.right;return n.push(t.right),Rf(o)?Rh(e.concat(o.left,t.left),n):Rh(t.left,n)}return o.right.push(t.right),o})})},t(0,eF(n))().then(RR(eE)))}}}};let EF=Object.freeze(Object.defineProperty({__proto__:null,ApT:ER,Bifunctor:{URI:Ep,bimap:Es,mapLeft:El},FromEither:Ev,FromIO:EI,FromTask:ET,FromThese:ES,Functor:Eg,Pointed:{URI:Ep,of:R8},URI:Ep,bifunctorTaskThese:{URI:Ep,bimap:Es,mapLeft:El},bimap:Ed,both:R7,flap:Ey,fold:Eo,foldW:Eo,fromEither:xA,fromIO:En,fromIOEither:xu,fromIOK:E_,fromOption:Ex,fromOptionK:Eb,fromPredicate:EC,fromTask:Ee,fromTaskK:Ek,fromThese:xA,fromTheseK:Ew,functorTaskThese:{URI:Ep,map:Eu},getApplicative:Eh,getApply:EA,getChain:Em,getMonad:function(e){var t=Eh(xw,e),n=Em(e);return{URI:Ep,_E:void 0,map:Eu,ap:t.ap,of:R8,chain:n.chain,fromIO:En,fromTask:Ee}},getSemigroup:function(e,t){return eq(xI)(Ry(e,t))},left:R4,leftIO:Er,leftTask:Et,map:Ec,mapLeft:Ef,match:Ei,matchE:Eo,matchEW:Eo,matchW:Ei,of:R8,right:R8,rightIO:En,rightTask:Ee,swap:Ea,taskThese:{URI:Ep,map:Eu,bimap:Es,mapLeft:El},toTuple:function(e,t){return EO(function(){return e},function(){return t})},toTuple2:EO,traverseReadonlyArrayWithIndex:function(e){return function(t){var n=EE(e)(t);return function(e){return ej(e)?n(e):ER}}},traverseReadonlyArrayWithIndexSeq:function(e){return function(t){var n=Ej(e)(t);return function(e){return ej(e)?n(e):ER}}},traverseReadonlyNonEmptyArrayWithIndex:EE,traverseReadonlyNonEmptyArrayWithIndexSeq:Ej},Symbol.toStringTag,{value:"Module"}));var EM=function(e,t){return ev(e,EU(t))},EU=function(e){return function(t){return function(n){return e(t(n))}}},EL="Traced",EK={URI:EL,map:EM},EB=eH(EK);let EP=Object.freeze(Object.defineProperty({__proto__:null,Functor:EK,URI:EL,censor:function(e){return function(t){return function(n){return t(e(n))}}},flap:EB,getComonad:function(e){return{URI:EL,_E:void 0,map:EM,extend:function(t,n){return function(r){return n(function(n){return t(e.concat(r,n))})}},extract:function(t){return t(e.empty)}}},listen:function(e){return function(t){return[e(t),t]}},listens:function(e){return function(t){return function(n){return[t(n),e(n)]}}},map:EU,traced:EK,tracks:function(e,t){return function(n){return n(t(n(e.empty)))}}},Symbol.toStringTag,{value:"Module"}));function EW(e,t){return function(n){var r=e.traverse(n),i=t.traverse(n);return function(e){return function(t){return r(t,function(t){return i(t,e)})}}}}function ED(e,t){return function(n){var r=e.sequence(n),i=t.sequence(n);return function(t){return r(e.map(t,i))}}}let EN=Object.freeze(Object.defineProperty({__proto__:null,getTraversableComposition:function(e,t){var n=eZ(e,t).map,r=fc(e,t),i=EW(e,t),o=ED(e,t);return{map:n,reduce:r.reduce,foldMap:r.foldMap,reduceRight:r.reduceRight,traverse:function(e){var t=i(e);return function(e,n){return ev(e,t(n))}},sequence:function(e){var t=o(e);return function(e){return ev(e,t)}}}},sequence:ED,traverse:EW},Symbol.toStringTag,{value:"Module"})),Eq=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function EQ(e,t){return void 0===t&&(t=[]),{value:e,forest:t}}var EV=function(e,t){for(var n,r="",i=t.length,o=0;o<i;o++){n=t[o];var a=o===i-1;r+=e+(a?"└":"├")+"─ "+n.value+EV(e+(i>1&&!a?"│ ":" "),n.forest)}return r};function Ez(e){return EV(`
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[851],{71463:function(e,t,n){let r,i,o,a;n.d(t,{kS:function(){return enT}});var u,s,l,c,d,f,p,A,h,m,g,y,v,x,b,C=n(2784),S=n(33760),w=n(4727),I=n(34736),_=n(32001),T=n(11232),k=n(97867),O=n(47304),R=n(65662),E=n(80832),j=n(19245),F=n(91493),M=n(87248),U=n(34234),L=n(28316),K=n(59131),B=Object.defineProperty,P=(e,t,n)=>t in e?B(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,W=(e,t,n)=>(P(e,"symbol"!=typeof t?t+"":t,n),n),D="u">typeof globalThis?globalThis:"u">typeof window?window:"u">typeof n.g?n.g:"u">typeof self?self:{};function N(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}var q={exports:{}},Q={};q.exports=function(){if(BS)return Q;BS=1;var e=Symbol.for("react.element"),t=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,r=C.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function o(t,o,a){var u,s={},l=null,c=null;for(u in void 0!==a&&(l=""+a),void 0!==o.key&&(l=""+o.key),void 0!==o.ref&&(c=o.ref),o)n.call(o,u)&&!i.hasOwnProperty(u)&&(s[u]=o[u]);if(t&&t.defaultProps)for(u in o=t.defaultProps)void 0===s[u]&&(s[u]=o[u]);return{$$typeof:e,type:t,key:l,ref:c,props:s,_owner:r.current}}return Q.Fragment=t,Q.jsx=o,Q.jsxs=o,Q}();var V=q.exports,z={},Y=function(e,t){return(Y=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},H=function(){return(H=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},G=Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]};function Z(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function J(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function $(e){return this instanceof $?(this.v=e,this):new $(e)}var X=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};let ee=N(Object.freeze(Object.defineProperty({__proto__:null,get __assign(){return H},__asyncDelegator:function(e){var t,n;return t={},r("next"),r("throw",function(e){throw e}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:$(e[r](t)),done:!1}:i?i(t):t}:i}},__asyncGenerator:function(e,t,n){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),o=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){i[e]&&(r[e]=function(t){return new Promise(function(n,r){o.push([e,t,n,r])>1||u(e,t)})})}function u(e,t){try{var n;(n=i[e](t)).value instanceof $?Promise.resolve(n.value.v).then(s,l):c(o[0][2],n)}catch(e){c(o[0][3],e)}}function s(e){u("next",e)}function l(e){u("throw",e)}function c(e,t){e(t),o.shift(),o.length&&u(o[0][0],o[0][1])}},__asyncValues:function(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=Z(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,i){!function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}(r,i,(t=e[n](t)).done,t.value)})}}},__await:$,__awaiter:function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{s(r.next(e))}catch(e){o(e)}}function u(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,u)}s((r=r.apply(e,t||[])).next())})},__classPrivateFieldGet:function(e,t,n,r){if("a"===n&&!r)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},__classPrivateFieldIn:function(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)},__classPrivateFieldSet:function(e,t,n,r,i){if("m"===r)throw TypeError("Private method is not writable");if("a"===r&&!i)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n},__createBinding:G,__decorate:function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var u=e.length-1;u>=0;u--)(i=e[u])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},__esDecorate:function(e,t,n,r,i,o){function a(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var u,s=r.kind,l="getter"===s?"get":"setter"===s?"set":"value",c=!t&&e?r.static?e:e.prototype:null,d=t||(c?Object.getOwnPropertyDescriptor(c,r.name):{}),f=!1,p=n.length-1;p>=0;p--){var A={};for(var h in r)A[h]="access"===h?{}:r[h];for(var h in r.access)A.access[h]=r.access[h];A.addInitializer=function(e){if(f)throw TypeError("Cannot add initializers after decoration has completed");o.push(a(e||null))};var m=(0,n[p])("accessor"===s?{get:d.get,set:d.set}:d[l],A);if("accessor"===s){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw TypeError("Object expected");(u=a(m.get))&&(d.get=u),(u=a(m.set))&&(d.set=u),(u=a(m.init))&&i.push(u)}else(u=a(m))&&("field"===s?i.push(u):d[l]=u)}c&&Object.defineProperty(c,r.name,d),f=!0},__exportStar:function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||G(t,e,n)},__extends:function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Y(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},__generator:function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(u){return function(s){return function(u){if(n)throw TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&u[0]?r.return:u[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,u[1])).done)return i;switch(r=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){a.label=u[1];break}if(6===u[0]&&a.label<i[1]){a.label=i[1],i=u;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(u);break}i[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],r=0}finally{n=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}},__importDefault:function(e){return e&&e.__esModule?e:{default:e}},__importStar:function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&G(t,e,n);return X(t,e),t},__makeTemplateObject:function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},__metadata:function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},__param:function(e,t){return function(n,r){t(n,r,e)}},__propKey:function(e){return"symbol"==typeof e?e:"".concat(e)},__read:J,__rest:function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)0>t.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},__runInitializers:function(e,t,n){for(var r=arguments.length>2,i=0;i<t.length;i++)n=r?t[i].call(e,n):t[i].call(e);return r?n:void 0},__setFunctionName:function(e,t,n){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})},__spread:function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(J(arguments[t]));return e},__spreadArray:function(e,t,n){if(n||2==arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},__spreadArrays:function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),i=0,t=0;t<n;t++)for(var o=arguments[t],a=0,u=o.length;a<u;a++,i++)r[i]=o[a];return r},__values:Z},Symbol.toStringTag,{value:"Module"})));var et={};function en(e){return function(t){return function(n){return n.reduce(function(t,n){return e.alt(t,function(){return n})},t)}}}let er=Object.freeze(Object.defineProperty({__proto__:null,altAll:en},Symbol.toStringTag,{value:"Module"})),ei=Object.freeze(Object.defineProperty({__proto__:null,altAll:function(e){return en(e)(e.zero())}},Symbol.toStringTag,{value:"Module"}));var eo=function(e){return function(){return{meet:function(t,n){return function(r){return e.meet(t(r),n(r))}},join:function(t,n){return function(r){return e.join(t(r),n(r))}},zero:function(){return e.zero},one:function(){return e.one},implies:function(t,n){return function(r){return e.implies(t(r),n(r))}},not:function(t){return function(n){return e.not(t(n))}}}}},ea=function(e){return function(){return{concat:function(t,n){return function(r){return e.concat(t(r),n(r))}}}}},eu=function(e){var t=ea(e);return function(){return{concat:t().concat,empty:function(){return e.empty}}}},es=function(e){return{add:function(t,n){return function(r){return e.add(t(r),n(r))}},zero:function(){return e.zero},mul:function(t,n){return function(r){return e.mul(t(r),n(r))}},one:function(){return e.one}}},el=function(e){var t=es(e);return{add:t.add,mul:t.mul,one:t.one,zero:t.zero,sub:function(t,n){return function(r){return e.sub(t(r),n(r))}}}};function ec(e){return e}function ed(e){return function(){return e}}var ef=ed(!0),ep=ed(!1),eA=ed(null),eh=ed(void 0);function em(e,t,n,r,i,o,a,u,s){switch(arguments.length){case 1:return e;case 2:return function(){return t(e.apply(this,arguments))};case 3:return function(){return n(t(e.apply(this,arguments)))};case 4:return function(){return r(n(t(e.apply(this,arguments))))};case 5:return function(){return i(r(n(t(e.apply(this,arguments)))))};case 6:return function(){return o(i(r(n(t(e.apply(this,arguments))))))};case 7:return function(){return a(o(i(r(n(t(e.apply(this,arguments)))))))};case 8:return function(){return u(a(o(i(r(n(t(e.apply(this,arguments))))))))};case 9:return function(){return s(u(a(o(i(r(n(t(e.apply(this,arguments)))))))))}}}function eg(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e}function ey(e){throw Error("Called `absurd` function which should be uncallable")}function ev(e,t,n,r,i,o,a,u,s){switch(arguments.length){case 1:return e;case 2:return t(e);case 3:return n(t(e));case 4:return r(n(t(e)));case 5:return i(r(n(t(e))));case 6:return o(i(r(n(t(e)))));case 7:return a(o(i(r(n(t(e))))));case 8:return u(a(o(i(r(n(t(e)))))));case 9:return s(u(a(o(i(r(n(t(e))))))));default:for(var l=arguments[0],c=1;c<arguments.length;c++)l=arguments[c](l);return l}}var ex=function(e,t){return t};let eb=Object.freeze(Object.defineProperty({__proto__:null,SK:ex,absurd:ey,apply:function(e){return function(t){return t(e)}},constFalse:ep,constNull:eA,constTrue:ef,constUndefined:eh,constVoid:eh,constant:ed,decrement:function(e){return e-1},flip:function(e){return function(t,n){return e(n,t)}},flow:em,getBooleanAlgebra:eo,getEndomorphismMonoid:function(){return{concat:function(e,t){return em(e,t)},empty:ec}},getMonoid:eu,getRing:el,getSemigroup:ea,getSemiring:es,hole:ey,identity:ec,increment:function(e){return e+1},not:function(e){return function(t){return!e(t)}},pipe:ev,tuple:eg,tupled:function(e){return function(t){return e.apply(void 0,t)}},unsafeCoerce:ec,untupled:function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e(t)}}},Symbol.toStringTag,{value:"Module"}));var eC=function(e,t,n){if(n||2==arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},eS=function(e){return"None"===e._tag},ew=function(e){return"Some"===e._tag},eI={_tag:"None"},e_=function(e){return{_tag:"Some",value:e}},eT=function(e){return"Left"===e._tag},ek=function(e){return"Right"===e._tag},eO=function(e){return{_tag:"Left",left:e}},eR=function(e){return{_tag:"Right",right:e}},eE=function(e){return[e]},ej=function(e){return e.length>0},eF=function(e){return e[0]},eM=function(e){return e.slice(1)},eU=[],eL={},eK=Object.prototype.hasOwnProperty,eB=function(e){return eC([e[0]],e.slice(1),!0)};function eP(e,t){return function(n){return function(r){return e.ap(e.map(r,function(e){return function(n){return t.ap(e,n)}}),n)}}}function eW(e){return function(t){return function(n){return e.ap(e.map(n,function(e){return function(){return e}}),t)}}}function eD(e){return function(t){return function(n){return e.ap(e.map(n,function(){return function(e){return e}}),t)}}}function eN(e){return function(t,n){return function(r){return e.ap(e.map(r,function(e){return function(n){var r;return Object.assign({},e,((r={})[t]=n,r))}}),n)}}}function eq(e){return function(t){return{concat:function(n,r){return e.ap(e.map(n,function(e){return function(n){return t.concat(e,n)}}),r)}}}}function eQ(e,t,n){return function(r){for(var i=Array(n.length+1),o=0;o<n.length;o++)i[o]=n[o];return i[n.length]=r,0===t?e.apply(null,i):eQ(e,t-1,i)}}var eV={1:function(e){return[e]},2:function(e){return function(t){return[e,t]}},3:function(e){return function(t){return function(n){return[e,t,n]}}},4:function(e){return function(t){return function(n){return function(r){return[e,t,n,r]}}}},5:function(e){return function(t){return function(n){return function(r){return function(i){return[e,t,n,r,i]}}}}}};let ez=Object.freeze(Object.defineProperty({__proto__:null,ap:eP,apFirst:eW,apS:eN,apSecond:eD,getApplySemigroup:eq,sequenceS:function(e){return function(t){for(var n=Object.keys(t),r=n.length,i=function(e){var t=e.length;switch(t){case 1:return function(t){var n;return(n={})[e[0]]=t,n};case 2:return function(t){return function(n){var r;return(r={})[e[0]]=t,r[e[1]]=n,r}};case 3:return function(t){return function(n){return function(r){var i;return(i={})[e[0]]=t,i[e[1]]=n,i[e[2]]=r,i}}};case 4:return function(t){return function(n){return function(r){return function(i){var o;return(o={})[e[0]]=t,o[e[1]]=n,o[e[2]]=r,o[e[3]]=i,o}}}};case 5:return function(t){return function(n){return function(r){return function(i){return function(o){var a;return(a={})[e[0]]=t,a[e[1]]=n,a[e[2]]=r,a[e[3]]=i,a[e[4]]=o,a}}}}};default:return eQ(function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];for(var i={},o=0;o<t;o++)i[e[o]]=n[o];return i},t-1,[])}}(n),o=e.map(t[n[0]],i),a=1;a<r;a++)o=e.ap(o,t[n[a]]);return o}},sequenceT:function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r=t.length,i=(eK.call(eV,r)||(eV[r]=eQ(eg,r-1,[])),eV[r]),o=e.map(t[0],i),a=1;a<r;a++)o=e.ap(o,t[a]);return o}}},Symbol.toStringTag,{value:"Module"}));function eY(e,t){return function(n){return function(r){return e.map(r,function(e){return t.map(e,n)})}}}function eH(e){return function(t){return function(n){return e.map(n,function(e){return e(t)})}}}function eG(e){return function(t){return function(n){return e.map(n,function(e){var n;return(n={})[t]=e,n})}}}function eZ(e,t){var n=eY(e,t);return{map:function(e,t){return ev(e,n(t))}}}let eJ=Object.freeze(Object.defineProperty({__proto__:null,bindTo:eG,flap:eH,getFunctorComposition:eZ,map:eY},Symbol.toStringTag,{value:"Module"}));function e$(e){var t=eq(e);return function(n){return{concat:t(n).concat,empty:e.of(n.empty)}}}function eX(e,t){var n=eZ(e,t).map,r=eP(e,t);return{map:n,of:function(n){return e.of(t.of(n))},ap:function(e,t){return ev(e,r(t))}}}let e0=Object.freeze(Object.defineProperty({__proto__:null,getApplicativeComposition:eX,getApplicativeMonoid:e$},Symbol.toStringTag,{value:"Module"}));function e1(e){return function(t){return function(n){return e.chain(n,function(n){return e.map(t(n),function(){return n})})}}}function e2(e){return function(t,n){return function(r){return e.chain(r,function(r){return e.map(n(r),function(e){var n;return Object.assign({},r,((n={})[t]=e,n))})})}}}let e6=Object.freeze(Object.defineProperty({__proto__:null,bind:e2,chainFirst:e1},Symbol.toStringTag,{value:"Module"}));function e5(e){return function(t){return function(n){return e.fromEither(eS(n)?eO(t()):eR(n.value))}}}function e3(e){return function(t,n){return function(r){return e.fromEither(t(r)?eR(r):eO(n(r)))}}}function e9(e){var t=e5(e);return function(e){var n=t(e);return function(e){return em(e,n)}}}function e4(e,t){var n=e9(e);return function(e){var r=n(e);return function(e){return function(n){return t.chain(n,r(e))}}}}function e8(e){return function(t){return em(t,e.fromEither)}}function e7(e,t){var n=e8(e);return function(e){return function(r){return t.chain(r,n(e))}}}function te(e,t){return em(e8(e),e1(t))}function tt(e,t){return function(n,r){return function(i){return t.chain(i,function(t){return e.fromEither(n(t)?eR(t):eO(r(t)))})}}}let tn=Object.freeze(Object.defineProperty({__proto__:null,chainEitherK:e7,chainFirstEitherK:te,chainOptionK:e4,filterOrElse:tt,fromEitherK:e8,fromOption:e5,fromOptionK:e9,fromPredicate:e3},Symbol.toStringTag,{value:"Module"}));var tr=function(e){return{equals:function(t,n){return t===n||e(t,n)}}},ti=function(e){return tr(function(t,n){for(var r in e)if(!e[r].equals(t[r],n[r]))return!1;return!0})},to=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return tr(function(t,n){return e.every(function(e,r){return e.equals(t[r],n[r])})})},ta=function(e){return function(t){return tr(function(n,r){return t.equals(e(n),e(r))})}},tu={equals:function(e,t){return e===t}},ts={equals:function(){return!0}},tl=function(){return{concat:function(e,t){return tr(function(n,r){return e.equals(n,r)&&t.equals(n,r)})}}},tc={URI:"Eq",contramap:function(e,t){return ev(e,ta(t))}},td=tu.equals;let tf=Object.freeze(Object.defineProperty({__proto__:null,Contravariant:tc,URI:"Eq",contramap:ta,eq:tc,eqBoolean:tu,eqDate:{equals:function(e,t){return e.valueOf()===t.valueOf()}},eqNumber:tu,eqStrict:tu,eqString:tu,fromEquals:tr,getMonoid:function(){return{concat:tl().concat,empty:ts}},getSemigroup:tl,getStructEq:ti,getTupleEq:to,strictEqual:td,struct:ti,tuple:to},Symbol.toStringTag,{value:"Module"}));var tp=function(e){return function(t,n){return t===n||0===e(t,n)}},tA=function(e){return{equals:tp(e),compare:function(t,n){return t===n?0:e(t,n)}}},th=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return tA(function(t,n){for(var r=0;r<e.length-1;r++){var i=e[r].compare(t[r],n[r]);if(0!==i)return i}return e[r].compare(t[r],n[r])})},tm=function(e){return tA(function(t,n){return e.compare(n,t)})},tg=function(e){return function(t){return tA(function(n,r){return t.compare(e(n),e(r))})}},ty=function(){return{concat:function(e,t){return tA(function(n,r){var i=e.compare(n,r);return 0!==i?i:t.compare(n,r)})}}},tv=function(){return{concat:ty().concat,empty:tA(function(){return 0})}},tx={URI:"Ord",contramap:function(e,t){return ev(e,tg(t))}},tb={equals:ef,compare:ed(0)},tC=function(e){return function(t,n){return -1===e.compare(t,n)}},tS=function(e){return function(t,n){return 1===e.compare(t,n)}},tw=function(e){return function(t,n){return t===n||1>e.compare(t,n)?t:n}},tI=function(e){return function(t,n){return t===n||e.compare(t,n)>-1?t:n}},t_=function(e){var t=tw(e),n=tI(e);return function(e,r){return function(i){return n(t(i,r),e)}}},tT={equals:tu.equals,compare:function(e,t){return e<t?-1:e>t?1:0}},tk=ev(tT,tg(function(e){return e.valueOf()}));let tO=Object.freeze(Object.defineProperty({__proto__:null,Contravariant:tx,URI:"Ord",between:function(e){var t=tC(e),n=tS(e);return function(e,r){return function(i){return!(t(i,e)||n(i,r))}}},clamp:t_,contramap:tg,equals:function(e){return function(t){return function(n){return n===t||0===e.compare(n,t)}}},equalsDefault:tp,fromCompare:tA,geq:function(e){return function(t,n){return -1!==e.compare(t,n)}},getDualOrd:tm,getMonoid:tv,getSemigroup:ty,getTupleOrd:th,gt:tS,leq:function(e){return function(t,n){return 1!==e.compare(t,n)}},lt:tC,max:tI,min:tw,ord:tx,ordBoolean:tT,ordDate:tk,ordNumber:tT,ordString:tT,reverse:tm,trivial:tb,tuple:th},Symbol.toStringTag,{value:"Module"}));var tR=function(e){return{concat:function(t,n){return e.concat(n,t)}}},tE=function(e){return function(t){return function(n){return n.reduce(function(t,n){return e.concat(t,n)},t)}}};let tj=Object.freeze(Object.defineProperty({__proto__:null,concatAll:tE,endo:function(e){return function(t){return{concat:function(n,r){return t.concat(e(n),e(r))}}}},filterFirst:function(e){return function(t){return{concat:function(n,r){return e(n)?t.concat(n,r):r}}}},filterSecond:function(e){return function(t){return{concat:function(n,r){return e(r)?t.concat(n,r):n}}}},reverse:tR},Symbol.toStringTag,{value:"Module"}));var tF=function(e){return{concat:tw(e)}},tM=function(e){return{concat:tI(e)}},tU=function(e){return{concat:function(){return e}}},tL=function(e){return{concat:function(t,n){var r={};for(var i in e)eK.call(e,i)&&(r[i]=e[i].concat(t[i],n[i]));return r}}},tK=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return{concat:function(t,n){return e.map(function(e,r){return e.concat(t[r],n[r])})}}},tB=function(e){return function(t){return{concat:function(n,r){return t.concat(n,t.concat(e,r))}}}},tP=function(){return{concat:ec}},tW=function(){return{concat:function(e,t){return t}}},tD=tU(void 0),tN={concat:function(e,t){return e&&t}},tq={concat:function(e,t){return e||t}},tQ={concat:function(e,t){return e+t}},tV={concat:function(e,t){return e+t}},tz={concat:function(e,t){return e*t}};let tY=Object.freeze(Object.defineProperty({__proto__:null,concatAll:tE,constant:tU,first:tP,fold:function(e){var t=tE(e);return function(e,n){return void 0===n?t(e):t(e)(n)}},getDualSemigroup:tR,getFirstSemigroup:tP,getFunctionSemigroup:ea,getIntercalateSemigroup:tB,getJoinSemigroup:tM,getLastSemigroup:tW,getMeetSemigroup:tF,getObjectSemigroup:function(){return{concat:function(e,t){return Object.assign({},e,t)}}},getStructSemigroup:tL,getTupleSemigroup:tK,intercalate:tB,last:tW,max:tM,min:tF,reverse:tR,semigroupAll:tN,semigroupAny:tq,semigroupProduct:tz,semigroupString:tQ,semigroupSum:tV,semigroupVoid:tD,struct:tL,tuple:tK},Symbol.toStringTag,{value:"Module"}));var tH=function(e,t,n){if(n||2==arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},tG=function(e,t){return e<0||e>=t.length},tZ=function(e){return function(t){return tH([e],t,!0)}},tJ=function(e){return function(t){return tH(tH([],t,!0),[e],!1)}},t$=function(e,t,n){if(ej(n)){var r=eB(n);return r.splice(e,0,t),r}return[t]},tX=function(e,t,n){if(n[e]===t)return n;var r=eB(n);return r[e]=t,r},t0=function(e){return function(t){if(1===t.length)return t;for(var n=[n6(t)],r=n5(t),i=function(t){n.every(function(n){return!e.equals(n,t)})&&n.push(t)},o=0;o<r.length;o++)i(r[o]);return n}},t1=function(e){if(ej(e)){var t=tv();return nn(e.reduce(t.concat,t.empty))}return ec},t2=function(e){var t=t0(e);return function(e){return function(n){return t(ev(n,ne(e)))}}},t6=function(e){return function(t){var n=t.length,r=Math.round(e)%n;if(tG(Math.abs(r),t)||0===r)return t;if(!(r<0))return t6(r-n)(t);var i=nl(-r)(t),o=i[0];return ev(i[1],ne(o))}},t5=function(e){return ej(e)?e_(e):eI},t3=function(e){return function(t){for(var n=Math.max(0,Math.floor(t)),r=[e(0)],i=1;i<n;i++)r.push(e(i));return r}},t9=function(e,t){return e<=t?t3(function(t){return e+t})(t-e+1):[e]},t4=function(e){return[n6(e),n5(e)]},t8=function(e){return[n9(e),n3(e)]};function t7(e){return function(t){return t.concat(e)}}function ne(e,t){return t?e.concat(t):function(t){return t.concat(e)}}function nt(e){return function(t){var n=t.length;if(0===n)return eU;for(var r=[],i=t[0],o=[i],a=1;a<n;a++){var u=t[a];e.equals(u,i)?o.push(u):(r.push(o),o=[i=u])}return r.push(o),r}}var nn=function(e){return function(t){return 1===t.length?t:t.slice().sort(e.compare)}},nr=function(e,t){return function(n){return tG(e,n)?eI:e_(tX(e,t(n[e]),n))}},ni=function(e,t,n){for(var r=[n(e[0],t[0])],i=Math.min(e.length,t.length),o=1;o<i;o++)r[o]=n(e[o],t[o]);return r},no=function(e){return function(t){for(var n=[e,t[0]],r=1;r<t.length;r++)n.push(e,t[r]);return n}},na=function(e){return function(t){var n=n5(t);return ej(n)?ev(n,no(e),tZ(n6(t))):t}},nu=function(e){return function(t){for(var n=eB(e(0,n6(t))),r=1;r<t.length;r++)n.push.apply(n,e(r,t[r]));return n}},ns=function(e){return function(t){for(var n=e(t),r=n[0],i=n[1],o=[r],a=i;ej(a);){var u=e(a),s=u[0],l=u[1];o.push(s),a=l}return o}},nl=function(e){return function(t){var n=Math.max(1,e);return n>=t.length?[t,eU]:[ev(t.slice(1,n),tZ(n6(t))),t.slice(n)]}},nc=function(e){return ns(nl(e))},nd=function(e,t){return ev(e,nj(t))},nf=function(e,t){return ev(e,nF(t))},np=function(e,t){return ev(e,nT(t))},nA=function(e,t){return ev(e,nk(t))},nh=function(e,t){return ev(e,nO(t))},nm=function(e,t,n){return ev(e,nM(t,n))},ng=function(e){var t=nU(e);return function(e,n){return ev(e,t(n))}},ny=function(e,t,n){return ev(e,nL(t,n))},nv=function(e){var t=nW(e);return function(e,n){return ev(e,t(n))}},nx=function(e,t){return ev(e,n_(t))},nb=function(e,t,n){return ev(e,nK(t,n))},nC=function(e){var t=nB(e);return function(e,n){return ev(e,t(n))}},nS=function(e,t,n){return ev(e,nP(t,n))},nw=function(e){var t=nN(e);return function(e,n){return ev(e,t(n))}},nI=function(e){return function(t){return ev(t,t7(e()))}},n_=nI,nT=function(e){return nk(function(t){return ev(e,nj(t))})},nk=function(e){return nu(function(t,n){return e(n)})},nO=function(e){return function(t){for(var n=n5(t),r=[e(t)];ej(n);)r.push(e(n)),n=n5(n);return r}},nR=nO(ec),nE=nk(ec),nj=function(e){return nF(function(t,n){return e(n)})},nF=function(e){return function(t){for(var n=[e(0,n6(t))],r=1;r<t.length;r++)n.push(e(r,t[r]));return n}},nM=function(e,t){return nK(e,function(e,n,r){return t(n,r)})},nU=function(e){return function(t){return function(n){return n.slice(1).reduce(function(n,r){return e.concat(n,t(r))},t(n[0]))}}},nL=function(e,t){return nP(e,function(e,n,r){return t(n,r)})},nK=function(e,t){return function(n){return n.reduce(function(e,n,r){return t(r,e,n)},e)}},nB=function(e){return function(t){return function(n){return n.slice(1).reduce(function(n,r,i){return e.concat(n,t(i+1,r))},t(0,n[0]))}}},nP=function(e,t){return function(n){return n.reduceRight(function(e,n,r){return t(r,n,e)},e)}},nW=function(e){var t=nN(e);return function(e){return t(function(t,n){return e(n)})}},nD=function(e){return nN(e)(ex)},nN=function(e){return function(t){return function(n){for(var r=e.map(t(0,n6(n)),eE),i=1;i<n.length;i++)r=e.ap(e.map(r,function(e){return function(t){return ev(e,tJ(t))}}),t(i,n[i]));return r}}},nq="ReadonlyNonEmptyArray",nQ=function(e){return{show:function(t){return"[".concat(t.map(e.show).join(", "),"]")}}},nV=function(e){return tr(function(t,n){return t.length===n.length&&t.every(function(t,r){return e.equals(t,n[r])})})},nz={URI:nq,map:nd},nY=eH(nz),nH={URI:nq,map:nd,ap:np},nG=eW(nH),nZ=eD(nH),nJ={URI:nq,map:nd,ap:np,chain:nA},n$=e1(nJ),nX=eE(eL),n0=eG(nz),n1=e2(nJ),n2=eN(nH),n6=eF,n5=eM,n3=function(e){return e[e.length-1]},n9=function(e){return e.slice(0,-1)},n4=function(e){var t=tF(e);return function(e){return e.reduce(t.concat)}},n8=function(e){var t=tM(e);return function(e){return e.reduce(t.concat)}},n7=function(e){return function(t){return t.reduce(e.concat)}},re=function(e){return function(t){return tH([e(n6(t))],n5(t),!0)}},rt=function(e){return function(t){return ev(n9(t),tJ(e(n3(t))))}},rn=function(e){var t=n7(e);return function(e){return em(na(e),t)}},rr=function(e){return function(t){return t5(t.filter(function(t,n){return e(n,t)}))}};function ri(e,t){return void 0===t?tZ(e):ev(t,tZ(e))}var ro=function(e,t){return ev(e,ne([t]))};let ra=Object.freeze(Object.defineProperty({__proto__:null,Alt:{URI:nq,map:nd,alt:nx},Applicative:{URI:nq,map:nd,ap:np,of:eE},Apply:nH,Chain:nJ,Comonad:{URI:nq,map:nd,extend:nh,extract:eF},Do:nX,Foldable:{URI:nq,reduce:nm,foldMap:ng,reduceRight:ny},FoldableWithIndex:{URI:nq,reduce:nm,foldMap:ng,reduceRight:ny,reduceWithIndex:nb,foldMapWithIndex:nC,reduceRightWithIndex:nS},Functor:nz,FunctorWithIndex:{URI:nq,map:nd,mapWithIndex:nf},Monad:{URI:nq,map:nd,ap:np,of:eE,chain:nA},Pointed:{URI:nq,of:eE},Traversable:{URI:nq,map:nd,reduce:nm,foldMap:ng,reduceRight:ny,traverse:nv,sequence:nD},TraversableWithIndex:{URI:nq,map:nd,mapWithIndex:nf,reduce:nm,foldMap:ng,reduceRight:ny,traverse:nv,sequence:nD,reduceWithIndex:nb,foldMapWithIndex:nC,reduceRightWithIndex:nS,traverseWithIndex:nw},URI:nq,alt:n_,altW:nI,ap:nT,apFirst:nG,apS:n2,apSecond:nZ,append:tJ,appendW:tJ,bind:n1,bindTo:n0,chain:nk,chainFirst:n$,chainWithIndex:nu,chop:ns,chunksOf:nc,concat:ne,concatAll:n7,concatW:t7,cons:ri,duplicate:nR,empty:eU,extend:nO,extract:eF,filter:function(e){return rr(function(t,n){return e(n)})},filterWithIndex:rr,flap:nY,flatten:nE,fold:n7,foldMap:nU,foldMapWithIndex:nB,fromArray:function(e){return t5(e.slice())},fromReadonlyArray:t5,getEq:nV,getSemigroup:function(){return{concat:ne}},getShow:nQ,getUnionSemigroup:function(e){var t=t2(e);return{concat:function(e,n){return t(n)(e)}}},group:nt,groupBy:function(e){return function(t){for(var n={},r=0;r<t.length;r++){var i=t[r],o=e(i);eK.call(n,o)?n[o].push(i):n[o]=[i]}return n}},groupSort:function(e){var t=nn(e),n=nt(e);return function(e){return ej(e)?n(t(e)):eU}},head:n6,init:n9,insertAt:function(e,t){return function(n){return e<0||e>n.length?eI:e_(t$(e,t,n))}},intercalate:rn,intersperse:na,isNonEmpty:ej,isOutOfBound:tG,last:n3,makeBy:t3,map:nj,mapWithIndex:nF,matchLeft:function(e){return function(t){return e(n6(t),n5(t))}},matchRight:function(e){return function(t){return e(n9(t),n3(t))}},max:n8,min:n4,modifyAt:nr,modifyHead:re,modifyLast:rt,of:eE,prepend:tZ,prependAll:no,prependToAll:no,prependW:tZ,range:t9,readonlyNonEmptyArray:{URI:nq,of:eE,map:nd,mapWithIndex:nf,ap:np,chain:nA,extend:nh,extract:eF,reduce:nm,foldMap:ng,reduceRight:ny,traverse:nv,sequence:nD,reduceWithIndex:nb,foldMapWithIndex:nC,reduceRightWithIndex:nS,traverseWithIndex:nw,alt:nx},reduce:nM,reduceRight:nL,reduceRightWithIndex:nP,reduceWithIndex:nK,replicate:function(e){return t3(function(){return e})},reverse:function(e){return 1===e.length?e:tH([n3(e)],e.slice(0,-1).reverse(),!0)},rotate:t6,sequence:nD,snoc:ro,sort:nn,sortBy:t1,splitAt:nl,tail:n5,traverse:nW,traverseWithIndex:nN,unappend:t8,uncons:t4,union:t2,uniq:t0,unprepend:t4,unsafeInsertAt:t$,unsafeUpdateAt:tX,unsnoc:t8,unzip:function(e){for(var t=[e[0][0]],n=[e[0][1]],r=1;r<e.length;r++)t[r]=e[r][0],n[r]=e[r][1];return[t,n]},updateAt:function(e,t){return nr(e,function(){return t})},updateHead:function(e){return re(function(){return e})},updateLast:function(e){return rt(function(){return e})},zip:function e(t,n){return void 0===n?function(n){return e(n,t)}:ni(t,n,function(e,t){return[e,t]})},zipWith:ni},Symbol.toStringTag,{value:"Module"}));var ru=function(e,t,n){if(n||2==arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},rs=function(e){return e.length>0},rl=function(e,t){return e<0||e>=t.length},rc=function(e){return function(t){return ru([e],t,!0)}},rd=function(e){return function(t){return ru(ru([],t,!0),[e],!1)}},rf=function(e,t,n){if(rs(n)){var r=ry(n);return r.splice(e,0,t),r}return[t]},rp=function(e,t,n){var r=ry(n);return r[e]=t,r},rA=function(e){return function(t){if(1===t.length)return rO(t);for(var n=[iy(t)],r=iv(t),i=function(t){n.every(function(n){return!e.equals(n,t)})&&n.push(t)},o=0;o<r.length;o++)i(r[o]);return n}},rh=function(e){if(rs(e)){var t=tv();return rT(e.reduce(t.concat,t.empty))}return rO},rm=function(e){var t=rA(e);return function(e){return function(n){return t(ev(n,rI(e)))}}},rg=function(e){return function(t){var n=t.length,r=Math.round(e)%n;if(rl(Math.abs(r),t)||0===r)return rO(t);if(!(r<0))return rg(r-n)(t);var i=rL(-r)(t),o=i[0];return ev(i[1],rI(o))}},ry=eB,rv=function(e){return rs(e)?e_(e):eI},rx=function(e){return function(t){for(var n=Math.max(0,Math.floor(t)),r=[e(0)],i=1;i<n;i++)r.push(e(i));return r}},rb=function(e,t){return e<=t?rx(function(t){return e+t})(t-e+1):[e]},rC=function(e){return[iy(e),iv(e)]},rS=function(e){return[ib(e),ix(e)]};function rw(e){return function(t){return t.concat(e)}}function rI(e,t){return t?e.concat(t):function(t){return t.concat(e)}}function r_(e){return function(t){var n=t.length;if(0===n)return[];for(var r=[],i=t[0],o=[i],a=1;a<n;a++){var u=t[a];e.equals(u,i)?o.push(u):(r.push(o),o=[i=u])}return r.push(o),r}}var rT=function(e){return function(t){return t.slice().sort(e.compare)}},rk=function(e,t){return function(n){return rl(e,n)?eI:e_(rp(e,t(n[e]),n))}},rO=ry,rR=function(e){return[e]},rE=function(e,t,n){for(var r=[n(e[0],t[0])],i=Math.min(e.length,t.length),o=1;o<i;o++)r[o]=n(e[o],t[o]);return r},rj=function(e){return function(t){for(var n=[e,t[0]],r=1;r<t.length;r++)n.push(e,t[r]);return n}},rF=function(e){return function(t){var n=iv(t);return rs(n)?ev(n,rj(e),rc(iy(t))):rO(t)}},rM=function(e){return function(t){for(var n=ry(e(0,iy(t))),r=1;r<t.length;r++)n.push.apply(n,e(r,t[r]));return n}},rU=function(e){return function(t){for(var n=e(t),r=n[0],i=n[1],o=[r],a=i;rs(a);){var u=e(a),s=u[0],l=u[1];o.push(s),a=l}return o}},rL=function(e){return function(t){var n=Math.max(1,e);return n>=t.length?[rO(t),[]]:[ev(t.slice(1,n),rc(iy(t))),t.slice(n)]}},rK=function(e){return rU(rL(e))},rB=function(e,t){return ev(e,r3(t))},rP=function(e,t){return ev(e,r9(t))},rW=function(e,t){return ev(e,r0(t))},rD=function(e,t){return ev(e,r1(t))},rN=function(e,t){return ev(e,r2(t))},rq=function(e,t,n){return ev(e,r4(t,n))},rQ=function(e){var t=nU(e);return function(e,n){return ev(e,t(n))}},rV=function(e,t,n){return ev(e,r7(t,n))},rz=function(e){var t=it(e);return function(e,n){return ev(e,t(n))}},rY=function(e,t){return ev(e,rX(t))},rH=function(e,t,n){return ev(e,r8(t,n))},rG=function(e){var t=nB(e);return function(e,n){return ev(e,t(n))}},rZ=function(e,t,n){return ev(e,ie(t,n))},rJ=function(e){var t=ii(e);return function(e,n){return ev(e,t(n))}},r$=function(e){return function(t){return ev(t,rw(e()))}},rX=r$,r0=function(e){return r1(function(t){return ev(e,r3(t))})},r1=function(e){return rM(function(t,n){return e(n)})},r2=function(e){return function(t){for(var n=iv(t),r=[e(t)];rs(n);)r.push(e(n)),n=iv(n);return r}},r6=r2(ec),r5=r1(ec),r3=function(e){return r9(function(t,n){return e(n)})},r9=function(e){return function(t){for(var n=[e(0,iy(t))],r=1;r<t.length;r++)n.push(e(r,t[r]));return n}},r4=nM,r8=nK,r7=nL,ie=nP,it=function(e){var t=ii(e);return function(e){return t(function(t,n){return e(n)})}},ir=function(e){return ii(e)(function(e,t){return t})},ii=function(e){return function(t){return function(n){for(var r=e.map(t(0,iy(n)),rR),i=1;i<n.length;i++)r=e.ap(e.map(r,function(e){return function(t){return ev(e,rd(t))}}),t(i,n[i]));return r}}},io="NonEmptyArray",ia={URI:io,map:rB},iu=eH(ia),is={URI:io,map:rB,ap:rW},il=eW(is),ic=eD(is),id={URI:io,map:rB,ap:rW,chain:rD},ip=e1(id),iA=rR(eL),ih=eG(ia),im=e2(id),ig=eN(is),iy=n6,iv=function(e){return e.slice(1)},ix=n3,ib=function(e){return e.slice(0,-1)},iC=function(e){return function(t){return ru([e(iy(t))],iv(t),!0)}},iS=function(e){return function(t){return ev(ib(t),rd(e(ix(t))))}},iw=function(e){return function(t){return rv(t.filter(function(t,n){return e(n,t)}))}};function iI(e,t){return void 0===t?rc(e):ev(t,rc(e))}var i_=function(e,t){return ev(e,rd(t))};let iT=Object.freeze(Object.defineProperty({__proto__:null,Alt:{URI:io,map:rB,alt:rY},Applicative:{URI:io,map:rB,ap:rW,of:rR},Apply:is,Chain:id,Comonad:{URI:io,map:rB,extend:rN,extract:n6},Do:iA,Foldable:{URI:io,reduce:rq,foldMap:rQ,reduceRight:rV},FoldableWithIndex:{URI:io,reduce:rq,foldMap:rQ,reduceRight:rV,reduceWithIndex:rH,foldMapWithIndex:rG,reduceRightWithIndex:rZ},Functor:ia,FunctorWithIndex:{URI:io,map:rB,mapWithIndex:rP},Monad:{URI:io,map:rB,ap:rW,of:rR,chain:rD},Pointed:{URI:io,of:rR},Traversable:{URI:io,map:rB,reduce:rq,foldMap:rQ,reduceRight:rV,traverse:rz,sequence:ir},TraversableWithIndex:{URI:io,map:rB,mapWithIndex:rP,reduce:rq,foldMap:rQ,reduceRight:rV,traverse:rz,sequence:ir,reduceWithIndex:rH,foldMapWithIndex:rG,reduceRightWithIndex:rZ,traverseWithIndex:rJ},URI:io,alt:rX,altW:r$,ap:r0,apFirst:il,apS:ig,apSecond:ic,append:rd,appendW:rd,bind:im,bindTo:ih,chain:r1,chainFirst:ip,chainWithIndex:rM,chop:rU,chunksOf:rK,concat:rI,concatAll:function(e){return function(t){return t.reduce(e.concat)}},concatW:rw,cons:iI,copy:rO,duplicate:r6,extend:r2,extract:n6,filter:function(e){return iw(function(t,n){return e(n)})},filterWithIndex:iw,flap:iu,flatten:r5,fold:n7,foldMap:nU,foldMapWithIndex:nB,fromArray:rv,fromReadonlyNonEmptyArray:ry,getEq:nV,getSemigroup:function(){return{concat:rI}},getShow:nQ,getUnionSemigroup:function(e){var t=rm(e);return{concat:function(e,n){return t(n)(e)}}},group:r_,groupBy:function(e){return function(t){for(var n={},r=0;r<t.length;r++){var i=t[r],o=e(i);eK.call(n,o)?n[o].push(i):n[o]=[i]}return n}},groupSort:function(e){var t=rT(e),n=r_(e);return function(e){return rs(e)?n(t(e)):[]}},head:iy,init:ib,insertAt:function(e,t){return function(n){return e<0||e>n.length?eI:e_(rf(e,t,n))}},intercalate:rn,intersperse:rF,isNonEmpty:rs,isOutOfBound:rl,last:ix,makeBy:rx,map:r3,mapWithIndex:r9,matchLeft:function(e){return function(t){return e(iy(t),iv(t))}},matchRight:function(e){return function(t){return e(ib(t),ix(t))}},max:n8,min:n4,modifyAt:rk,modifyHead:iC,modifyLast:iS,nonEmptyArray:{URI:io,of:rR,map:rB,mapWithIndex:rP,ap:rW,chain:rD,extend:rN,extract:n6,reduce:rq,foldMap:rQ,reduceRight:rV,traverse:rz,sequence:ir,reduceWithIndex:rH,foldMapWithIndex:rG,reduceRightWithIndex:rZ,traverseWithIndex:rJ,alt:rY},of:rR,prepend:rc,prependAll:rj,prependToAll:rj,prependW:rc,range:rb,reduce:r4,reduceRight:r7,reduceRightWithIndex:ie,reduceWithIndex:r8,replicate:function(e){return rx(function(){return e})},reverse:function(e){return ru([ix(e)],e.slice(0,-1).reverse(),!0)},rotate:rg,sequence:ir,snoc:i_,sort:rT,sortBy:rh,splitAt:rL,tail:iv,traverse:it,traverseWithIndex:ii,unappend:rS,uncons:rC,union:rm,uniq:rA,unprepend:rC,unsafeInsertAt:rf,unsafeUpdateAt:rp,unsnoc:rS,unzip:function(e){for(var t=[e[0][0]],n=[e[0][1]],r=1;r<e.length;r++)t[r]=e[r][0],n[r]=e[r][1];return[t,n]},updateAt:function(e,t){return rk(e,function(){return t})},updateHead:function(e){return iC(function(){return e})},updateLast:function(e){return iS(function(){return e})},zip:function e(t,n){return void 0===n?function(n){return e(n,t)}:rE(t,n,function(e,t){return[e,t]})},zipWith:rE},Symbol.toStringTag,{value:"Module"}));var ik={equals:function(e,t){return e===t}},iO={equals:ik.equals,compare:function(e,t){return e<t?-1:e>t?1:0}},iR={equals:ik.equals,compare:iO.compare,top:1/0,bottom:-1/0},iE={concat:function(e,t){return e-t}},ij={concat:function(e,t){return e+t}},iF={concat:function(e,t){return e*t}},iM={concat:ij.concat,empty:0},iU={concat:iF.concat,empty:1};let iL=Object.freeze(Object.defineProperty({__proto__:null,Bounded:iR,Eq:ik,Field:{add:ij.concat,zero:0,mul:iF.concat,one:1,sub:iE.concat,degree:function(e){return 1},div:function(e,t){return e/t},mod:function(e,t){return e%t}},MagmaSub:iE,MonoidProduct:iU,MonoidSum:iM,Ord:iO,SemigroupProduct:iF,SemigroupSum:ij,Show:{show:function(e){return JSON.stringify(e)}},isNumber:function(e){return"number"==typeof e}},Symbol.toStringTag,{value:"Module"}));var iK=function(e,t){return{left:e,right:t}},iB=function(e){return function(t){return iK(iQ(t),e(iV(t)))}},iP=function(e){return function(t){return iK(e(iQ(t)),iV(t))}},iW=function(e,t){return function(n){return iK(e(iQ(n)),t(iV(n)))}},iD="Separated",iN={URI:iD,map:function(e,t){return ev(e,iB(t))}},iq=eH(iN),iQ=function(e){return e.left},iV=function(e){return e.right};let iz=Object.freeze(Object.defineProperty({__proto__:null,Bifunctor:{URI:iD,mapLeft:function(e,t){return ev(e,iP(t))},bimap:function(e,t,n){return ev(e,iW(t,n))}},Functor:iN,URI:iD,bimap:iW,flap:iq,left:iQ,map:iB,mapLeft:iP,right:iV,separated:iK},Symbol.toStringTag,{value:"Module"}));function iY(e,t){return function(n){var r=e.traverse(n);return function(e,i){return n.map(r(e,i),t.separate)}}}function iH(e,t){return function(n){var r=e.traverse(n);return function(e,i){return n.map(r(e,i),t.compact)}}}function iG(e){return function(t){var n=e.wither(t);return function(e){return function(r){return n(r,function(n){return t.map(e(n),function(e){return e?e_(n):eI})})}}}}let iZ=Object.freeze(Object.defineProperty({__proto__:null,filterE:iG,wiltDefault:iY,witherDefault:iH},Symbol.toStringTag,{value:"Module"}));function iJ(e,t){return function(n){return n?t.of(void 0):e.zero()}}let i$=Object.freeze(Object.defineProperty({__proto__:null,guard:iJ},Symbol.toStringTag,{value:"Module"}));var iX=function(e,t,n){if(n||2==arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},i0=function(e){return 0===e.length},i1=function(e,t){return e<=0?aL:t3(t)(e)},i2=function(e){return eS(e)?aL:[e.value]},i6=function(e){return eT(e)?aL:[e.right]},i5=function(e,t){return function(n){return ej(n)?t(n):e()}},i3=function(e,t){return function(n){return ej(n)?t(n6(n),n5(n)):e()}},i9=function(e,t){return function(n){return ej(n)?t(n9(n),n3(n)):e()}},i4=function(e){return function(t){if(i0(t))return aL;for(var n=[],r=0;r<t.length;r++)n.push.apply(n,e(r,t[r]));return n}};function i8(e,t){return void 0===t?function(t){return i8(e,t)}:tG(e,t)?eI:e_(t[e])}var i7=function(e){return ej(e)?e_(n6(e)):eI},oe=function(e){return ej(e)?e_(n3(e)):eI},ot=function(e,t){for(var n=e.length,r=0;r<n&&t(e[r]);r++);return r},on=function(e){return function(t){for(var n=0;n<t.length;n++)if(e(t[n]))return e_(n);return eI}};function or(e){return function(t){for(var n=0;n<t.length;n++)if(e(t[n]))return e_(t[n]);return eI}}var oi=function(e){return function(t){for(var n=0;n<t.length;n++){var r=e(t[n]);if(ew(r))return r}return eI}};function oo(e){return function(t){for(var n=t.length-1;n>=0;n--)if(e(t[n]))return e_(t[n]);return eI}}var oa=function(e){return function(t){for(var n=t.length-1;n>=0;n--){var r=e(t[n]);if(ew(r))return r}return eI}},ou=function(e){return function(t){for(var n=t.length-1;n>=0;n--)if(e(t[n]))return e_(n);return eI}},ol=function(e,t){return function(n){return tG(e,n)?eI:e_(aM(e,t(n[e]),n))}},oc=function(e,t,n){for(var r=[],i=Math.min(e.length,t.length),o=0;o<i;o++)r[o]=n(e[o],t[o]);return r},od=function(e){var t=no(e);return function(e){return ej(e)?t(e):e}};function of(e){return function(t,n){if(void 0===n){var r,i=of(e);return function(e){return i(t,e)}}for(var o=0;o<n.length;o++)if(r=n[o],e.equals(r,t))return!0;return!1}}var op=function(e){return function(t){return e>=1&&ej(t)?nl(e)(t):i0(t)?[t,aL]:[aL,t]}},oA=function(e){return function(t){return i0(t)?e:i0(e)?t:t.concat(e)}};function oh(e){var t=t2(e);return function(n,r){if(void 0===r){var i=oh(e);return function(e){return i(e,n)}}return ej(n)&&ej(r)?t(r)(n):ej(n)?n:r}}function om(e){var t=of(e);return function(n,r){if(void 0===r){var i=om(e);return function(e){return i(e,n)}}return n.filter(function(e){return t(e,r)})}}function og(e){var t=of(e);return function(n,r){if(void 0===r){var i=og(e);return function(e){return i(e,n)}}return n.filter(function(e){return!t(e,r)})}}var oy=function(e,t){return ev(e,oH(t))},ov=function(e,t){return ev(e,oG(t))},ox=function(e,t){return ev(e,oV(t))},ob=function(e,t){return ev(e,oz(t))},oC=function(e,t){return ev(e,oJ(t))},oS=function(e,t){return ev(e,oX(t))},ow=function(e,t){return ev(e,o1(t))},oI=function(e,t){return ev(e,o6(t))},o_=function(e,t){return ev(e,o2(t))},oT=function(e,t){return ev(e,o5(t))},ok=function(e,t){return ev(e,oQ(t))},oO=function(e,t,n){return ev(e,o7(t,n))},oR=function(e){var t=ae(e);return function(e,n){return ev(e,t(n))}},oE=function(e,t,n){return ev(e,an(t,n))},oj=function(e,t,n){return ev(e,at(t,n))},oF=function(e){var t=o8(e);return function(e,n){return ev(e,t(n))}},oM=function(e,t,n){return ev(e,ar(t,n))},oU=function(e,t){return ev(e,o$(t))},oL=function(e,t){return ev(e,o3(t))},oK=function(e,t){return ev(e,o9(t))},oB=function(e){var t=ai(e);return function(e,n){return ev(e,t(n))}},oP=function(e){var t=aa(e);return function(e,n){return ev(e,t(n))}},oW=function(e,t){return ev(e,a_(t))},oD=function(e,t){return ev(e,aT(t))},oN=function(){return aL},oq=function(e){return function(t){return t.concat(e())}},oQ=oq,oV=function(e){return oz(function(t){return ev(e,oH(t))})},oz=function(e){return function(t){return ev(t,i4(function(t,n){return e(n)}))}},oY=oz(ec),oH=function(e){return function(t){return t.map(function(t){return e(t)})}},oG=function(e){return function(t){return t.map(function(t,n){return e(n,t)})}},oZ=function(e){for(var t=[],n=[],r=0;r<e.length;r++){var i=e[r];"Left"===i._tag?t.push(i.left):n.push(i.right)}return iK(t,n)},oJ=function(e){return function(t){return t.filter(e)}},o$=function(e){return function(t){for(var n=[],r=0;r<t.length;r++){var i=e(r,t[r]);ew(i)&&n.push(i.value)}return n}},oX=function(e){return o$(function(t,n){return e(n)})},o0=oX(ec),o1=function(e){return o2(function(t,n){return e(n)})},o2=function(e){return function(t){for(var n=[],r=[],i=0;i<t.length;i++){var o=t[i];e(i,o)?r.push(o):n.push(o)}return iK(n,r)}},o6=function(e){return o5(function(t,n){return e(n)})},o5=function(e){return function(t){for(var n=[],r=[],i=0;i<t.length;i++){var o=e(i,t[i]);"Left"===o._tag?n.push(o.left):r.push(o.right)}return iK(n,r)}},o3=function(e){return function(t){return t.filter(function(t,n){return e(n,t)})}},o9=function(e){return function(t){return t.map(function(n,r){return e(t.slice(r))})}},o4=o9(ec),o8=function(e){return function(t){return function(n){return n.reduce(function(n,r,i){return e.concat(n,t(i,r))},e.empty)}}},o7=function(e,t){return at(e,function(e,n,r){return t(n,r)})},ae=function(e){var t=o8(e);return function(e){return t(function(t,n){return e(n)})}},at=function(e,t){return function(n){for(var r=n.length,i=e,o=0;o<r;o++)i=t(o,i,n[o]);return i}},an=function(e,t){return ar(e,function(e,n,r){return t(n,r)})},ar=function(e,t){return function(n){return n.reduceRight(function(e,n,r){return t(r,n,e)},e)}},ai=function(e){var t=aa(e);return function(e){return t(function(t,n){return e(n)})}},ao=function(e){return function(t){return oO(t,e.of(oN()),function(t,n){return e.ap(e.map(t,function(e){return function(t){return ev(e,tJ(t))}}),n)})}},aa=function(e){return function(t){return at(e.of(oN()),function(n,r,i){return e.ap(e.map(r,function(e){return function(t){return ev(e,tJ(t))}}),t(n,i))})}},au=function(e,t){for(var n=[],r=e;;){var i=t(r);if(ew(i)){var o=i.value,a=o[0],u=o[1];n.push(a),r=u}else break}return n},as="ReadonlyArray",al=function(e){return{show:function(t){return"[".concat(t.map(e.show).join(", "),"]")}}},ac=function(){return{concat:function(e,t){return i0(e)?t:i0(t)?e:e.concat(t)}}},ad=function(e){return tr(function(t,n){return t.length===n.length&&t.every(function(t,r){return e.equals(t,n[r])})})},af=function(e){return tA(function(t,n){for(var r=t.length,i=n.length,o=Math.min(r,i),a=0;a<o;a++){var u=e.compare(t[a],n[a]);if(0!==u)return u}return iO.compare(r,i)})},ap=function(e){var t=oh(e);return{concat:function(e,n){return t(n)(e)}}},aA={URI:as,map:oy},ah=eH(aA),am={URI:as,of:eE},ag={URI:as,map:oy,ap:ox},ay=eW(ag),av=eD(ag),ax={URI:as,map:oy,ap:ox,chain:ob},ab=e1(ax),aC={URI:as,zero:oN},aS=iJ(aC,am),aw={URI:as,compact:o0,separate:oZ},aI={URI:as,map:oy,reduce:oO,foldMap:oR,reduceRight:oE,traverse:oB,sequence:ao},a_=function(e){return function(t){for(var n=iX([],e(t),!0),r=[];n.length>0;){var i=n.shift();eT(i)?n.unshift.apply(n,e(i.left)):r.push(i.right)}return r}},aT=function(e){return function(t){var n=e(t),r=[],i=[];function o(t){eT(t)?e(t.left).forEach(function(e){return r.push(e)}):i.push(t.right)}for(var a=0;a<n.length;a++)o(n[a]);for(;r.length>0;)o(r.shift());return i}},ak=iH(aI,aw),aO=iY(aI,aw),aR={URI:as,map:oy,compact:o0,separate:oZ,filter:oC,filterMap:oS,partition:ow,partitionMap:oI,reduce:oO,foldMap:oR,reduceRight:oE,traverse:oB,sequence:ao,wither:ak,wilt:aO},aE=iG(aR),aj={URI:as,fromEither:i6},aF=e8(aj),aM=function(e,t,n){return ej(n)?tX(e,t,n):n},aU=function(e,t){var n=t.slice();return n.splice(e,1),n},aL=eU;function aK(e){return function(t){return t.every(e)}}var aB=function(e){return function(t){return t.some(e)}},aP=function(e){var t=rn(e);return function(n){return i5(function(){return e.empty},t(n))}},aW=eE(eL),aD=eG(aA),aN=e2(ax),aq=eN(ag);let aQ=Object.freeze(Object.defineProperty({__proto__:null,Alt:{URI:as,map:oy,alt:ok},Alternative:{URI:as,map:oy,ap:ox,of:eE,alt:ok,zero:oN},Applicative:{URI:as,map:oy,ap:ox,of:eE},Apply:ag,Chain:ax,ChainRecBreadthFirst:{URI:as,map:oy,ap:ox,chain:ob,chainRec:oD},ChainRecDepthFirst:{URI:as,map:oy,ap:ox,chain:ob,chainRec:oW},Compactable:aw,Do:aW,Extend:{URI:as,map:oy,extend:oK},Filterable:{URI:as,map:oy,compact:o0,separate:oZ,filter:oC,filterMap:oS,partition:ow,partitionMap:oI},FilterableWithIndex:{URI:as,map:oy,mapWithIndex:ov,compact:o0,separate:oZ,filter:oC,filterMap:oS,partition:ow,partitionMap:oI,partitionMapWithIndex:oT,partitionWithIndex:o_,filterMapWithIndex:oU,filterWithIndex:oL},Foldable:{URI:as,reduce:oO,foldMap:oR,reduceRight:oE},FoldableWithIndex:{URI:as,reduce:oO,foldMap:oR,reduceRight:oE,reduceWithIndex:oj,foldMapWithIndex:oF,reduceRightWithIndex:oM},FromEither:aj,Functor:aA,FunctorWithIndex:{URI:as,map:oy,mapWithIndex:ov},Monad:{URI:as,map:oy,ap:ox,of:eE,chain:ob},Pointed:am,Traversable:aI,TraversableWithIndex:{URI:as,map:oy,mapWithIndex:ov,reduce:oO,foldMap:oR,reduceRight:oE,reduceWithIndex:oj,foldMapWithIndex:oF,reduceRightWithIndex:oM,traverse:oB,sequence:ao,traverseWithIndex:oP},URI:as,Unfoldable:{URI:as,unfold:au},Witherable:aR,Zero:aC,_chainRecBreadthFirst:oD,_chainRecDepthFirst:oW,alt:oQ,altW:oq,ap:oV,apFirst:ay,apS:aq,apSecond:av,append:tJ,appendW:tJ,bind:aN,bindTo:aD,chain:oz,chainFirst:ab,chainRecBreadthFirst:aT,chainRecDepthFirst:a_,chainWithIndex:i4,chop:function(e){var t=ns(e);return function(e){return ej(e)?t(e):aL}},chunksOf:function(e){var t=nc(e);return function(e){return ej(e)?t(e):aL}},compact:o0,comprehension:function(e,t,n){void 0===n&&(n=function(){return!0});var r=function(e,i){return ej(i)?ev(n6(i),oz(function(t){return r(ev(e,tJ(t)),n5(i))})):n.apply(void 0,e)?[t.apply(void 0,e)]:aL};return r(aL,e)},concat:oA,concatW:oA,cons:ri,deleteAt:function(e){return function(t){return tG(e,t)?eI:e_(aU(e,t))}},difference:og,dropLeft:function(e){return function(t){return e<=0||i0(t)?t:e>=t.length?aL:t.slice(e,t.length)}},dropLeftWhile:function(e){return function(t){var n=ot(t,e);return 0===n?t:n===t.length?aL:t.slice(n)}},dropRight:function(e){return function(t){return e<=0||i0(t)?t:e>=t.length?aL:t.slice(0,t.length-e)}},duplicate:o4,elem:of,empty:aL,every:aK,exists:aB,extend:o9,filter:oJ,filterE:aE,filterMap:oX,filterMapWithIndex:o$,filterWithIndex:o3,findFirst:or,findFirstMap:oi,findIndex:on,findLast:oo,findLastIndex:ou,findLastMap:oa,flap:ah,flatten:oY,foldLeft:i3,foldMap:ae,foldMapWithIndex:o8,foldRight:i9,fromArray:function(e){return i0(e)?aL:e.slice()},fromEither:i6,fromEitherK:aF,fromOption:i2,fromOptionK:function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return i2(e.apply(void 0,t))}},fromPredicate:function(e){return function(t){return e(t)?[t]:aL}},getDifferenceMagma:function(e){var t=og(e);return{concat:function(e,n){return t(n)(e)}}},getEq:ad,getIntersectionSemigroup:function(e){var t=om(e);return{concat:function(e,n){return t(n)(e)}}},getMonoid:function(){return{concat:ac().concat,empty:aL}},getOrd:af,getSemigroup:ac,getShow:al,getUnionMonoid:function(e){return{concat:ap(e).concat,empty:aL}},getUnionSemigroup:ap,guard:aS,head:i7,init:function(e){return ej(e)?e_(n9(e)):eI},insertAt:function(e,t){return function(n){return e<0||e>n.length?eI:e_(t$(e,t,n))}},intercalate:aP,intersection:om,intersperse:function(e){var t=na(e);return function(e){return ej(e)?t(e):e}},isEmpty:i0,isNonEmpty:ej,isOutOfBound:tG,last:oe,lefts:function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];"Left"===r._tag&&t.push(r.left)}return t},lookup:i8,makeBy:i1,map:oH,mapWithIndex:oG,match:i5,matchLeft:i3,matchLeftW:i3,matchRight:i9,matchRightW:i9,matchW:i5,modifyAt:ol,of:eE,partition:o1,partitionMap:o6,partitionMapWithIndex:o5,partitionWithIndex:o2,prepend:tZ,prependAll:od,prependToAll:od,prependW:tZ,range:t9,readonlyArray:{URI:as,compact:o0,separate:oZ,map:oy,ap:ox,of:eE,chain:ob,filter:oC,filterMap:oS,partition:ow,partitionMap:oI,mapWithIndex:ov,partitionMapWithIndex:oT,partitionWithIndex:o_,filterMapWithIndex:oU,filterWithIndex:oL,alt:ok,zero:oN,unfold:au,reduce:oO,foldMap:oR,reduceRight:oE,traverse:oB,sequence:ao,reduceWithIndex:oj,foldMapWithIndex:oF,reduceRightWithIndex:oM,traverseWithIndex:oP,extend:oK,wither:ak,wilt:aO},reduce:o7,reduceRight:an,reduceRightWithIndex:ar,reduceWithIndex:at,replicate:function(e,t){return i1(e,function(){return t})},reverse:function(e){return e.length<=1?e:e.slice().reverse()},rights:function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];"Right"===r._tag&&t.push(r.right)}return t},rotate:function(e){var t=t6(e);return function(e){return ej(e)?t(e):e}},scanLeft:function(e,t){return function(n){var r=n.length,i=Array(r+1);i[0]=e;for(var o=0;o<r;o++)i[o+1]=t(i[o],n[o]);return i}},scanRight:function(e,t){return function(n){var r=n.length,i=Array(r+1);i[r]=e;for(var o=r-1;o>=0;o--)i[o]=t(n[o],i[o+1]);return i}},separate:oZ,sequence:ao,size:function(e){return e.length},snoc:ro,some:aB,sort:function(e){return function(t){return t.length<=1?t:t.slice().sort(e.compare)}},sortBy:function(e){var t=t1(e);return function(e){return ej(e)?t(e):e}},spanLeft:function(e){return function(t){var n=op(ot(t,e))(t);return{init:n[0],rest:n[1]}}},splitAt:op,tail:function(e){return ej(e)?e_(n5(e)):eI},takeLeft:function(e){return function(t){return tG(e,t)?t:0===e?aL:t.slice(0,e)}},takeLeftWhile:function(e){return function(t){for(var n=[],r=0;r<t.length;r++){var i=t[r];if(!e(i))break;n.push(i)}var o=n.length;return o===t.length?t:0===o?aL:n}},takeRight:function(e){return function(t){return tG(e,t)?t:0===e?aL:t.slice(-e)}},toArray:function(e){return e.slice()},traverse:ai,traverseWithIndex:aa,unfold:au,union:oh,uniq:function(e){var t=t0(e);return function(e){return ej(e)?t(e):e}},unsafeDeleteAt:aU,unsafeInsertAt:t$,unsafeUpdateAt:aM,unzip:function(e){for(var t=[],n=[],r=0;r<e.length;r++)t[r]=e[r][0],n[r]=e[r][1];return[t,n]},updateAt:function(e,t){return ol(e,function(){return t})},wilt:function(e){var t=aO(e);return function(e){return function(n){return t(n,e)}}},wither:function(e){var t=ak(e);return function(e){return function(n){return t(n,e)}}},zero:oN,zip:function e(t,n){return void 0===n?function(n){return e(n,t)}:oc(t,n,function(e,t){return[e,t]})},zipWith:oc},Symbol.toStringTag,{value:"Module"}));var aV=function(e){return 0===e.length},az=function(e,t){return e<=0?[]:rx(t)(e)},aY=function(e){return eS(e)?[]:[e.value]},aH=function(e){return eT(e)?[]:[e.right]},aG=function(e,t){return function(n){return rs(n)?t(n):e()}},aZ=function(e,t){return function(n){return rs(n)?t(iy(n),iv(n)):e()}},aJ=function(e,t){return function(n){return rs(n)?t(ib(n),ix(n)):e()}},a$=function(e){return function(t){for(var n=[],r=0;r<t.length;r++)n.push.apply(n,e(r,t[r]));return n}},aX=function(e,t){for(var n=e.length,r=0;r<n&&t(e[r]);r++);return r},a0=function(e){return e.slice()},a1=function(e,t){return function(n){return rl(e,n)?eI:e_(sc(e,t(n[e]),n))}},a2=function(e,t,n){for(var r=[],i=Math.min(e.length,t.length),o=0;o<i;o++)r[o]=n(e[o],t[o]);return r},a6=function(e){var t=rj(e);return function(e){return rs(e)?t(e):[]}},a5=function(e){return function(t){return e>=1&&rs(t)?rL(e)(t):aV(t)?[a0(t),[]]:[[],a0(t)]}},a3=function(e){return function(t){return aV(t)?a0(e):aV(e)?a0(t):t.concat(e)}};function a9(e){var t=rm(e);return function(n,r){if(void 0===r){var i=a9(e);return function(e){return i(e,n)}}return rs(n)&&rs(r)?t(r)(n):rs(n)?a0(n):a0(r)}}function a4(e){var t=of(e);return function(n,r){if(void 0===r){var i=a4(e);return function(e){return i(e,n)}}return n.filter(function(e){return t(e,r)})}}function a8(e){var t=of(e);return function(n,r){if(void 0===r){var i=a8(e);return function(e){return i(e,n)}}return n.filter(function(e){return!t(e,r)})}}var a7=function(e,t){return ev(e,uC(t))},ue=function(e,t){return ev(e,u_(t))},ut=function(e,t){return ev(e,uS(t))},un=function(e,t){return ev(e,uw(t))},ur=function(e,t){return ev(e,uE(t))},ui=function(e,t){return ev(e,uk(t))},uo=function(e,t){return ev(e,uj(t))},ua=function(e,t){return ev(e,uM(t))},uu=function(e,t){return ev(e,uF(t))},us=function(e,t){return ev(e,uU(t))},ul=function(e,t){return ev(e,uK(t))},uc=function(e,t,n){return ev(e,uq(t,n))},ud=function(e){var t=uD(e);return function(e,n){return ev(e,t(n))}},uf=function(e,t,n){return ev(e,uV(t,n))},up=function(e,t,n){return ev(e,uQ(t,n))},uA=function(e){var t=uN(e);return function(e,n){return ev(e,t(n))}},uh=function(e,t,n){return ev(e,uz(t,n))},um=function(e,t){return ev(e,uT(t))},ug=function(e,t){return ev(e,uB(t))},uy=function(e,t){return ev(e,uP(t))},uv=function(e){var t=uY(e);return function(e,n){return ev(e,t(n))}},ux=function(e){var t=uG(e);return function(e,n){return ev(e,t(n))}},ub=function(){return[]},uC=function(e){return function(t){return t.map(function(t){return e(t)})}},uS=function(e){return uw(function(t){return ev(e,uC(t))})},uw=function(e){return function(t){return ev(t,a$(function(t,n){return e(n)}))}},uI=uw(ec),u_=function(e){return function(t){return t.map(function(t,n){return e(n,t)})}},uT=function(e){return function(t){for(var n=[],r=0;r<t.length;r++){var i=e(r,t[r]);ew(i)&&n.push(i.value)}return n}},uk=function(e){return uT(function(t,n){return e(n)})},uO=uk(ec),uR=function(e){for(var t=[],n=[],r=0;r<e.length;r++){var i=e[r];"Left"===i._tag?t.push(i.left):n.push(i.right)}return iK(t,n)},uE=function(e){return function(t){return t.filter(e)}},uj=function(e){return uF(function(t,n){return e(n)})},uF=function(e){return function(t){for(var n=[],r=[],i=0;i<t.length;i++){var o=t[i];e(i,o)?r.push(o):n.push(o)}return iK(n,r)}},uM=function(e){return uU(function(t,n){return e(n)})},uU=function(e){return function(t){for(var n=[],r=[],i=0;i<t.length;i++){var o=e(i,t[i]);"Left"===o._tag?n.push(o.left):r.push(o.right)}return iK(n,r)}},uL=function(e){return function(t){return t.concat(e())}},uK=uL,uB=function(e){return function(t){return t.filter(function(t,n){return e(n,t)})}},uP=function(e){return function(t){return t.map(function(n,r){return e(t.slice(r))})}},uW=uP(ec),uD=ae,uN=o8,uq=o7,uQ=at,uV=an,uz=ar,uY=function(e){var t=uG(e);return function(e){return t(function(t,n){return e(n)})}},uH=function(e){return function(t){return uc(t,e.of(ub()),function(t,n){return e.ap(e.map(t,function(e){return function(t){return ev(e,rd(t))}}),n)})}},uG=function(e){return function(t){return uQ(e.of(ub()),function(n,r,i){return e.ap(e.map(r,function(e){return function(t){return ev(e,rd(t))}}),t(n,i))})}},uZ=function(e,t){for(var n=[],r=e;;){var i=t(r);if(ew(i)){var o=i.value,a=o[0],u=o[1];n.push(a),r=u}else break}return n},uJ="Array",u$=function(){return{concat:function(e,t){return e.concat(t)}}},uX=function(){return{concat:u$().concat,empty:[]}},u0=function(e){var t=a9(e);return{concat:function(e,n){return t(n)(e)}}},u1={URI:uJ,map:a7},u2=eH(u1),u6={URI:uJ,of:rR},u5={URI:uJ,map:a7,ap:ut},u3=eW(u5),u9=eD(u5),u4={URI:uJ,map:a7,ap:ut,chain:un},u8=e1(u4),u7={URI:uJ,zero:ub},se=iJ(u7,u6),st={URI:uJ,compact:uO,separate:uR},sn={URI:uJ,reduce:uc,foldMap:ud,reduceRight:uf},sr={URI:uJ,map:a7,reduce:uc,foldMap:ud,reduceRight:uf,traverse:uv,sequence:uH},si=iH(sr,st),so=iY(sr,st),sa={URI:uJ,map:a7,compact:uO,separate:uR,filter:ur,filterMap:ui,partition:uo,partitionMap:ua,reduce:uc,foldMap:ud,reduceRight:uf,traverse:uv,sequence:uH,wither:si,wilt:so},su=iG(sa),ss={URI:uJ,fromEither:aH},sl=e8(ss),sc=function(e,t,n){return rs(n)?rp(e,t,n):[]},sd=function(e,t){var n=t.slice();return n.splice(e,1),n},sf=function(e){return function(t){return t.some(e)}},sp=rR(eL),sA=eG(u1),sh=e2(u4),sm=eN(u5);let sg=Object.freeze(Object.defineProperty({__proto__:null,Alt:{URI:uJ,map:a7,alt:ul},Alternative:{URI:uJ,map:a7,ap:ut,of:rR,alt:ul,zero:ub},Applicative:{URI:uJ,map:a7,ap:ut,of:rR},Apply:u5,Chain:u4,ChainRecBreadthFirst:{URI:uJ,map:a7,ap:ut,chain:un,chainRec:oD},ChainRecDepthFirst:{URI:uJ,map:a7,ap:ut,chain:un,chainRec:oW},Compactable:st,Do:sp,Extend:{URI:uJ,map:a7,extend:uy},Filterable:{URI:uJ,map:a7,compact:uO,separate:uR,filter:ur,filterMap:ui,partition:uo,partitionMap:ua},FilterableWithIndex:{URI:uJ,map:a7,mapWithIndex:ue,compact:uO,separate:uR,filter:ur,filterMap:ui,partition:uo,partitionMap:ua,partitionMapWithIndex:us,partitionWithIndex:uu,filterMapWithIndex:um,filterWithIndex:ug},Foldable:sn,FoldableWithIndex:{URI:uJ,reduce:uc,foldMap:ud,reduceRight:uf,reduceWithIndex:up,foldMapWithIndex:uA,reduceRightWithIndex:uh},FromEither:ss,Functor:u1,FunctorWithIndex:{URI:uJ,map:a7,mapWithIndex:ue},Monad:{URI:uJ,map:a7,ap:ut,of:rR,chain:un},Pointed:u6,Traversable:sr,TraversableWithIndex:{URI:uJ,map:a7,mapWithIndex:ue,reduce:uc,foldMap:ud,reduceRight:uf,reduceWithIndex:up,foldMapWithIndex:uA,reduceRightWithIndex:uh,traverse:uv,sequence:uH,traverseWithIndex:ux},URI:uJ,Unfoldable:{URI:uJ,unfold:uZ},Witherable:sa,Zero:u7,alt:uK,altW:uL,ap:uS,apFirst:u3,apS:sm,apSecond:u9,append:rd,appendW:rd,array:{URI:uJ,compact:uO,separate:uR,map:a7,ap:ut,of:rR,chain:un,filter:ur,filterMap:ui,partition:uo,partitionMap:ua,mapWithIndex:ue,partitionMapWithIndex:us,partitionWithIndex:uu,filterMapWithIndex:um,filterWithIndex:ug,alt:ul,zero:ub,unfold:uZ,reduce:uc,foldMap:ud,reduceRight:uf,traverse:uv,sequence:uH,reduceWithIndex:up,foldMapWithIndex:uA,reduceRightWithIndex:uh,traverseWithIndex:ux,extend:uy,wither:si,wilt:so},bind:sh,bindTo:sA,chain:uw,chainFirst:u8,chainRecBreadthFirst:aT,chainRecDepthFirst:a_,chainWithIndex:a$,chop:function(e){var t=rU(e);return function(e){return rs(e)?t(e):[]}},chunksOf:function(e){var t=rK(e);return function(e){return rs(e)?t(e):[]}},compact:uO,comprehension:function(e,t,n){void 0===n&&(n=function(){return!0});var r=function(e,i){return rs(i)?ev(iy(i),uw(function(t){return r(ev(e,rd(t)),iv(i))})):n.apply(void 0,e)?[t.apply(void 0,e)]:[]};return r([],e)},concat:a3,concatW:a3,cons:iI,copy:a0,deleteAt:function(e){return function(t){return rl(e,t)?eI:e_(sd(e,t))}},difference:a8,dropLeft:function(e){return function(t){return e<=0||aV(t)?a0(t):e>=t.length?[]:t.slice(e,t.length)}},dropLeftWhile:function(e){return function(t){return t.slice(aX(t,e))}},dropRight:function(e){return function(t){return e<=0||aV(t)?a0(t):e>=t.length?[]:t.slice(0,t.length-e)}},duplicate:uW,elem:of,empty:[],every:aK,exists:sf,extend:uP,filter:uE,filterE:su,filterMap:uk,filterMapWithIndex:uT,filterWithIndex:uB,findFirst:function(e){return or(e)},findFirstMap:oi,findIndex:on,findLast:function(e){return oo(e)},findLastIndex:ou,findLastMap:oa,flap:u2,flatten:uI,foldLeft:aZ,foldMap:uD,foldMapWithIndex:uN,foldRight:aJ,fromEither:aH,fromEitherK:sl,fromOption:aY,fromOptionK:function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return aY(e.apply(void 0,t))}},fromPredicate:function(e){return function(t){return e(t)?[t]:[]}},getDifferenceMagma:function(e){var t=a8(e);return{concat:function(e,n){return t(n)(e)}}},getEq:ad,getIntersectionSemigroup:function(e){var t=a4(e);return{concat:function(e,n){return t(n)(e)}}},getMonoid:uX,getOrd:af,getSemigroup:u$,getShow:al,getUnionMonoid:function(e){return{concat:u0(e).concat,empty:[]}},getUnionSemigroup:u0,guard:se,head:i7,init:function(e){return rs(e)?e_(ib(e)):eI},insertAt:function(e,t){return function(n){return e<0||e>n.length?eI:e_(rf(e,t,n))}},intercalate:aP,intersection:a4,intersperse:function(e){var t=rF(e);return function(e){return rs(e)?t(e):a0(e)}},isEmpty:aV,isNonEmpty:rs,isOutOfBound:rl,last:oe,lefts:function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];"Left"===r._tag&&t.push(r.left)}return t},lookup:i8,makeBy:az,map:uC,mapWithIndex:u_,match:aG,matchLeft:aZ,matchLeftW:aZ,matchRight:aJ,matchRightW:aJ,matchW:aG,modifyAt:a1,of:rR,partition:uj,partitionMap:uM,partitionMapWithIndex:uU,partitionWithIndex:uF,prepend:rc,prependAll:a6,prependToAll:a6,prependW:rc,range:rb,reduce:uq,reduceRight:uV,reduceRightWithIndex:uz,reduceWithIndex:uQ,replicate:function(e,t){return az(e,function(){return t})},reverse:function(e){return aV(e)?[]:e.slice().reverse()},rights:function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];"Right"===r._tag&&t.push(r.right)}return t},rotate:function(e){var t=rg(e);return function(e){return rs(e)?t(e):a0(e)}},scanLeft:function(e,t){return function(n){var r=n.length,i=Array(r+1);i[0]=e;for(var o=0;o<r;o++)i[o+1]=t(i[o],n[o]);return i}},scanRight:function(e,t){return function(n){var r=n.length,i=Array(r+1);i[r]=e;for(var o=r-1;o>=0;o--)i[o]=t(n[o],i[o+1]);return i}},separate:uR,sequence:uH,size:function(e){return e.length},snoc:i_,some:sf,sort:function(e){return function(t){return t.length<=1?a0(t):t.slice().sort(e.compare)}},sortBy:function(e){var t=rh(e);return function(e){return rs(e)?t(e):a0(e)}},spanLeft:function(e){return function(t){var n=a5(aX(t,e))(t);return{init:n[0],rest:n[1]}}},splitAt:a5,tail:function(e){return rs(e)?e_(iv(e)):eI},takeLeft:function(e){return function(t){return rl(e,t)?a0(t):t.slice(0,e)}},takeLeftWhile:function(e){return function(t){for(var n=[],r=0;r<t.length;r++){var i=t[r];if(!e(i))break;n.push(i)}return n}},takeRight:function(e){return function(t){return rl(e,t)?a0(t):0===e?[]:t.slice(-e)}},traverse:uY,traverseWithIndex:uG,unfold:uZ,union:a9,uniq:function(e){var t=rA(e);return function(e){return rs(e)?t(e):a0(e)}},unsafeDeleteAt:sd,unsafeInsertAt:rf,unsafeUpdateAt:sc,unzip:function(e){for(var t=[],n=[],r=0;r<e.length;r++)t[r]=e[r][0],n[r]=e[r][1];return[t,n]},updateAt:function(e,t){return a1(e,function(){return t})},wilt:function(e){var t=so(e);return function(e){return function(n){return t(n,e)}}},wither:function(e){var t=si(e);return function(e){return function(n){return t(n,e)}}},zero:ub,zip:function e(t,n){return void 0===n?function(n){return e(n,t)}:a2(t,n,function(e,t){return[e,t]})},zipWith:a2},Symbol.toStringTag,{value:"Module"})),sy=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var sv=function(e,t){return function(n){return n?t():e()}},sx={equals:function(e,t){return e===t}},sb={concat:function(e,t){return e&&t}},sC={concat:function(e,t){return e||t}},sS={concat:sb.concat,empty:!0},sw={concat:sC.concat,empty:!1},sI={equals:sx.equals,compare:function(e,t){return e<t?-1:e>t?1:0}};let s_=Object.freeze(Object.defineProperty({__proto__:null,BooleanAlgebra:{meet:function(e,t){return e&&t},join:function(e,t){return e||t},zero:!1,one:!0,implies:function(e,t){return!e||t},not:function(e){return!e}},Eq:sx,MonoidAll:sS,MonoidAny:sw,Ord:sI,SemigroupAll:sb,SemigroupAny:sC,Show:{show:function(e){return JSON.stringify(e)}},fold:sv,foldW:sv,isBoolean:function(e){return"boolean"==typeof e},match:sv,matchW:sv},Symbol.toStringTag,{value:"Module"}));var sT=function(e){return{meet:function(t,n){return e.join(t,n)},join:function(t,n){return e.meet(t,n)},zero:e.one,one:e.zero,implies:function(t,n){return e.join(e.not(t),n)},not:e.not}};let sk=Object.freeze(Object.defineProperty({__proto__:null,booleanAlgebraBoolean:{meet:function(e,t){return e&&t},join:function(e,t){return e||t},zero:!1,one:!0,implies:function(e,t){return!e||t},not:function(e){return!e}},booleanAlgebraVoid:{meet:function(){},join:function(){},zero:void 0,one:void 0,implies:function(){},not:function(){}},getDualBooleanAlgebra:sT,getFunctionBooleanAlgebra:eo,reverse:sT},Symbol.toStringTag,{value:"Module"})),sO=Object.freeze(Object.defineProperty({__proto__:null,boundedNumber:{equals:tT.equals,compare:tT.compare,top:1/0,bottom:-1/0},clamp:function(e){return t_(e)(e.bottom,e.top)},reverse:function(e){var t=tm(e);return{equals:t.equals,compare:t.compare,top:e.bottom,bottom:e.top}}},Symbol.toStringTag,{value:"Module"}));function sR(e){return{meet:tw(e),join:tI(e)}}let sE=Object.freeze(Object.defineProperty({__proto__:null,getMinMaxDistributiveLattice:sR},Symbol.toStringTag,{value:"Module"})),sj=Object.freeze(Object.defineProperty({__proto__:null,getMinMaxBoundedDistributiveLattice:function(e){var t=sR(e);return function(e,n){return{join:t.join,meet:t.meet,zero:e,one:n}}}},Symbol.toStringTag,{value:"Module"})),sF=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),sM=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),sU=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),sL=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var sK=function(e,t){for(var n=t(e);"Left"===n._tag;)n=t(n.left);return n.right};let sB=Object.freeze(Object.defineProperty({__proto__:null,tailRec:sK},Symbol.toStringTag,{value:"Module"}));function sP(e,t){return function(n,r){return t.compose(e.right(r),e.left(n))}}function sW(e,t){var n=sP(e,t);return function(r,i){return t.compose(e.promap(t.id(),function(e){return"Left"===e._tag?e.left:e.right},ec),n(r,i))}}let sD=Object.freeze(Object.defineProperty({__proto__:null,fanIn:sW,fanin:function(e){return sW(e,e)},split:sP,splitChoice:function(e){return sP(e,e)}},Symbol.toStringTag,{value:"Module"})),sN=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var sq=function(e){return function(t){return em(e,t)}},sQ="Predicate",sV=function(){return{concat:function(e,t){return ev(e,sH(t))}}},sz=function(){return{concat:function(e,t){return ev(e,sG(t))}}},sY=function(e){return function(t){return!e(t)}},sH=function(e){return function(t){return function(n){return t(n)||e(n)}}},sG=function(e){return function(t){return function(n){return t(n)&&e(n)}}};let sZ=Object.freeze(Object.defineProperty({__proto__:null,Contravariant:{URI:sQ,contramap:function(e,t){return ev(e,sq(t))}},URI:sQ,and:sG,contramap:sq,getMonoidAll:function(){return{concat:sz().concat,empty:ef}},getMonoidAny:function(){return{concat:sV().concat,empty:ep}},getSemigroupAll:sz,getSemigroupAny:sV,not:sY,or:sH},Symbol.toStringTag,{value:"Module"}));function sJ(e){return function(t){return e(t)?e_(t):eI}}var s$=function(e){return"Right"===e._tag?eI:e_(e.left)},sX=function(e){return"Left"===e._tag?eI:e_(e.right)},s0=function(e,t){return ev(e,la(t))},s1=function(e,t){return ev(e,ll(t))},s2=function(e,t){return ev(e,lf(t))},s6=function(e,t,n){return ev(e,lA(t,n))},s5=function(e){var t=lh(e);return function(e,n){return ev(e,t(n))}},s3=function(e,t,n){return ev(e,lm(t,n))},s9=function(e){var t=lj(e);return function(e,n){return ev(e,t(n))}},s4=function(e,t){return ev(e,ly(t))},s8=function(e,t){return ev(e,lT(t))},s7=function(e,t){return ev(e,lk(t))},le=function(e,t){return ev(e,lC(t))},lt=function(e,t){return ev(e,lO(t))},ln=function(e,t){return ev(e,lR(t))},lr="Option",li=function(e){return{equals:function(t,n){return t===n||(lP(t)?lP(n):!lP(n)&&e.equals(t.value,n.value))}}},lo=function(e){return{concat:function(t,n){return lP(t)?n:lP(n)?t:e_(e.concat(t.value,n.value))},empty:eI}},la=function(e){return function(t){return lP(t)?eI:e_(e(t.value))}},lu={URI:lr,map:s0},ls={URI:lr,of:e_},ll=function(e){return function(t){return lP(t)||lP(e)?eI:e_(t.value(e.value))}},lc={URI:lr,map:s0,ap:s1},ld={URI:lr,map:s0,ap:s1,of:e_},lf=function(e){return function(t){return lP(t)?eI:e(t.value)}},lp={URI:lr,map:s0,ap:s1,chain:s2},lA=function(e,t){return function(n){return lP(n)?e:t(e,n.value)}},lh=function(e){return function(t){return function(n){return lP(n)?e.empty:t(n.value)}}},lm=function(e,t){return function(n){return lP(n)?e:t(n.value,e)}},lg=function(e){return function(t){return lP(t)?e():t}},ly=lg,lv=function(){return eI},lx={URI:lr,zero:lv},lb=iJ(lx,ls),lC=function(e){return function(t){return lP(t)?eI:e_(e(t))}},lS=lf(ec),lw=iK(eI,eI),lI=function(e){return lP(e)?lw:iK(s$(e.value),sX(e.value))},l_={URI:lr,compact:lS,separate:lI},lT=function(e){return function(t){return lP(t)?eI:e(t.value)?t:eI}},lk=function(e){return function(t){return lP(t)?eI:e(t.value)}},lO=function(e){return function(t){return iK(s8(t,sY(e)),s8(t,e))}},lR=function(e){return em(la(e),lI)},lE={URI:lr,map:s0,compact:lS,separate:lI,filter:s8,filterMap:s7,partition:lt,partitionMap:ln},lj=function(e){return function(t){return function(n){return lP(n)?e.of(eI):e.map(t(n.value),e_)}}},lF=function(e){return function(t){return lP(t)?e.of(eI):e.map(t.value,e_)}},lM={URI:lr,map:s0,reduce:s6,foldMap:s5,reduceRight:s3,traverse:s9,sequence:lF},lU=iH(lM,l_),lL=iY(lM,l_),lK=function(){return eI},lB={URI:lr,fromEither:sX},lP=function(e){return"None"===e._tag},lW=function(e,t){return function(n){return lP(n)?e():t(n.value)}},lD=function(e){return function(t){return lP(t)?e():t.value}},lN=eH(lu),lq=eW(lc),lQ=eD(lc),lV=e1(lp),lz=lC(ec),lY=e8(lB),lH=e7(lB,lp),lG=te(lB,lp),lZ=function(e){return null==e?eI:e_(e)},lJ=function(e){try{return e_(e())}catch{return eI}},l$=function(e){return function(t){return lP(t)?eI:lZ(e(t.value))}},lX=lW(eA,ec),l0=lW(eh,ec),l1=e_(eL),l2=eG(lu),l6=e2(lp),l5=eN(lc),l3=e_(eU),l9=function(e){return function(t){var n=e(0,eF(t));if(lP(n))return eI;for(var r=[n.value],i=1;i<t.length;i++){var o=e(i,t[i]);if(lP(o))return eI;r.push(o.value)}return e_(r)}},l4=function(e){var t=l9(e);return function(e){return ej(e)?t(e):l3}},l8=function(e){return l4(function(t,n){return e(n)})},l7=l8(ec),ce={URI:lr,map:s0,of:e_,ap:s1,chain:s2,reduce:s6,foldMap:s5,reduceRight:s3,traverse:s9,sequence:lF,zero:lv,alt:s4,extend:le,compact:lS,separate:lI,filter:s8,filterMap:s7,partition:lt,partitionMap:ln,wither:lU,wilt:lL,throwError:lK},ct=eq(lc),cn=e$(ld),cr=function(){return lo(tP())};let ci=Object.freeze(Object.defineProperty({__proto__:null,Alt:{URI:lr,map:s0,alt:s4},Alternative:{URI:lr,map:s0,ap:s1,of:e_,alt:s4,zero:lv},ApT:l3,Applicative:ld,Apply:lc,Chain:lp,Compactable:l_,Do:l1,Extend:{URI:lr,map:s0,extend:le},Filterable:lE,Foldable:{URI:lr,reduce:s6,foldMap:s5,reduceRight:s3},FromEither:lB,Functor:lu,Monad:{URI:lr,map:s0,ap:s1,of:e_,chain:s2},MonadThrow:{URI:lr,map:s0,ap:s1,of:e_,chain:s2,throwError:lK},Pointed:ls,Traversable:lM,URI:lr,Witherable:{URI:lr,map:s0,reduce:s6,foldMap:s5,reduceRight:s3,traverse:s9,sequence:lF,compact:lS,separate:lI,filter:s8,filterMap:s7,partition:lt,partitionMap:ln,wither:lU,wilt:lL},Zero:lx,alt:ly,altW:lg,ap:ll,apFirst:lq,apS:l5,apSecond:lQ,bind:l6,bindTo:l2,chain:lf,chainEitherK:lH,chainFirst:lV,chainFirstEitherK:lG,chainNullableK:l$,compact:lS,duplicate:lz,elem:function e(t){return function(n,r){if(void 0===r){var i=e(t);return function(e){return i(n,e)}}return!lP(r)&&t.equals(n,r.value)}},exists:function(e){return function(t){return!lP(t)&&e(t.value)}},extend:lC,filter:lT,filterMap:lk,flap:lN,flatten:lS,fold:lW,foldMap:lh,foldW:lW,fromEither:sX,fromEitherK:lY,fromNullable:lZ,fromNullableK:function(e){return em(e,lZ)},fromPredicate:sJ,getApplyMonoid:cn,getApplySemigroup:ct,getEq:li,getFirstMonoid:cr,getLastMonoid:function(){return lo(tW())},getLeft:s$,getMonoid:lo,getOrElse:lD,getOrElseW:lD,getOrd:function(e){return{equals:li(e).equals,compare:function(t,n){return t===n?0:ew(t)?ew(n)?e.compare(t.value,n.value):1:-1}}},getRefinement:function(e){return function(t){return ew(e(t))}},getRight:sX,getShow:function(e){return{show:function(t){return lP(t)?"none":"some(".concat(e.show(t.value),")")}}},guard:lb,isNone:lP,isSome:ew,map:la,mapNullable:l$,match:lW,matchW:lW,none:eI,of:e_,option:ce,partition:lO,partitionMap:lR,reduce:lA,reduceRight:lm,separate:lI,sequence:lF,sequenceArray:l7,some:e_,throwError:lK,toNullable:lX,toUndefined:l0,traverse:lj,traverseArray:l8,traverseArrayWithIndex:l4,traverseReadonlyArrayWithIndex:l4,traverseReadonlyNonEmptyArrayWithIndex:l9,tryCatch:lJ,tryCatchK:function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return lJ(function(){return e.apply(void 0,t)})}},wilt:function(e){var t=lL(e);return function(e){return function(n){return t(n,e)}}},wither:function(e){var t=lU(e);return function(e){return function(n){return t(n,e)}}},zero:lv},Symbol.toStringTag,{value:"Module"}));function co(e,t){return function(n){return e.map(n,t.compact)}}function ca(e,t,n){var r=co(e,t),i=eY(e,n);return function(e){return iK(r(ev(e,i(s$))),r(ev(e,i(sX))))}}let cu=Object.freeze(Object.defineProperty({__proto__:null,compact:co,getCompactableComposition:function(e,t){return{map:eZ(e,t).map,compact:co(e,t),separate:ca(e,t,t)}},separate:ca},Symbol.toStringTag,{value:"Module"})),cs=Object.freeze(Object.defineProperty({__proto__:null,error:function(e){return function(){return console.error(e)}},info:function(e){return function(){return console.info(e)}},log:function(e){return function(){return console.log(e)}},warn:function(e){return function(){return console.warn(e)}}},Symbol.toStringTag,{value:"Module"}));function cl(e){return{URI:cv,_E:void 0,map:cf,ap:function(t,n){return ec(e.concat(t,n))}}}function cc(e){var t=cl(e);return{URI:cv,_E:void 0,map:t.map,ap:t.ap,of:function(){return ec(e.empty)}}}var cd=function(e,t){return ev(e,ch())},cf=function(e,t){return ev(e,cm())},cp=function(e,t,n){return ev(e,cg(t))},cA=function(e,t){return ev(e,cy(t))},ch=function(){return ec},cm=function(){return ec},cg=function(e){return function(t){return ec(e(t))}},cy=function(e){return function(t){return ec(e(t))}},cv="Const",cx={URI:cv,map:cf},cb=eH(cx);let cC=Object.freeze(Object.defineProperty({__proto__:null,Bifunctor:{URI:cv,bimap:cp,mapLeft:cA},Contravariant:{URI:cv,contramap:cd},Functor:cx,URI:cv,bimap:cg,const_:{URI:cv,map:cf,contramap:cd,bimap:cp,mapLeft:cA},contramap:ch,flap:cb,getApplicative:cc,getApply:cl,getBooleanAlgebra:ec,getBounded:ec,getEq:ec,getHeytingAlgebra:ec,getMonoid:ec,getOrd:ec,getRing:ec,getSemigroup:ec,getSemiring:ec,getShow:function(e){return{show:function(t){return"make(".concat(e.show(t),")")}}},make:ec,map:cm,mapLeft:cy},Symbol.toStringTag,{value:"Module"})),cS=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),cw=Object.freeze(Object.defineProperty({__proto__:null,Eq:{equals:function(e,t){return e.valueOf()===t.valueOf()}},Ord:ev(iO,tg(function(e){return e.valueOf()})),create:function(){return new Date},eqDate:{equals:function(e,t){return e.getDate()===t.getDate()}},eqMonth:{equals:function(e,t){return e.getMonth()===t.getMonth()}},eqYear:{equals:function(e,t){return e.getFullYear()===t.getFullYear()}},now:function(){return new Date().getTime()}},Symbol.toStringTag,{value:"Module"}));var cI=function(e,t){return ev(e,cq(t))},c_=function(e,t){return ev(e,cY(t))},cT=function(e,t){return ev(e,cJ(t))},ck=function(e,t,n){return ev(e,cX(t,n))},cO=function(e){return function(t,n){return ev(t,c0(e)(n))}},cR=function(e,t,n){return ev(e,c1(t,n))},cE=function(e){var t=c2(e);return function(e,n){return ev(e,t(n))}},cj=function(e,t,n){return ev(e,c3(t,n))},cF=function(e,t){return ev(e,c9(t))},cM=function(e,t){return ev(e,c8(t))},cU=function(e,t){return ev(e,c7(t))},cL=function(e,t){return sK(t(e),function(e){return dr(e)?eR(eO(e.left)):dr(e.right)?eO(t(e.right.left)):eR(eR(e.right.right))})},cK="Either",cB=function(e){return{concat:function(t,n){return dr(n)?t:dr(t)?n:eR(e.concat(t.right,n.right))}}},cP=function(e){var t=eO(e.empty);return{URI:cK,_E:void 0,compact:function(e){return dr(e)?e:"None"===e.right._tag?t:eR(e.right.value)},separate:function(e){return dr(e)?iK(e,e):dr(e.right)?iK(eR(e.right.left),t):iK(t,eR(e.right.right))}}},cW=function(e){var t=eO(e.empty),n=cP(e);return{URI:cK,_E:void 0,map:cI,compact:n.compact,separate:n.separate,filter:function(e,n){return dr(e)||n(e.right)?e:t},filterMap:function(e,n){if(dr(e))return e;var r=n(e.right);return"None"===r._tag?t:eR(r.value)},partition:function(e,n){return dr(e)?iK(e,e):n(e.right)?iK(t,eR(e.right)):iK(eR(e.right),t)},partitionMap:function(e,n){if(dr(e))return iK(e,e);var r=n(e.right);return dr(r)?iK(eR(r.left),t):iK(t,eR(r.right))}}},cD=function(e){return{URI:cK,_E:void 0,map:cI,ap:function(t,n){return dr(t)?dr(n)?eO(e.concat(t.left,n.left)):t:dr(n)?n:eR(t.right(n.right))},of:cV}},cN=function(e){return{URI:cK,_E:void 0,map:cI,alt:function(t,n){if(di(t))return t;var r=n();return dr(r)?eO(e.concat(t.left,r.left)):r}}},cq=function(e){return function(t){return dr(t)?t:eR(e(t.right))}},cQ={URI:cK,map:cI},cV=eR,cz=function(e){return function(t){return dr(t)?t:dr(e)?e:eR(t.right(e.right))}},cY=cz,cH={URI:cK,map:cI,ap:c_},cG={URI:cK,map:cI,ap:c_,of:cV},cZ=function(e){return function(t){return dr(t)?t:e(t.right)}},cJ=cZ,c$={URI:cK,map:cI,ap:c_,chain:cT},cX=function(e,t){return function(n){return dr(n)?e:t(e,n.right)}},c0=function(e){return function(t){return function(n){return dr(n)?e.empty:t(n.right)}}},c1=function(e,t){return function(n){return dr(n)?e:t(n.right,e)}},c2=function(e){return function(t){return function(n){return dr(n)?e.of(eO(n.left)):e.map(t(n.right),eR)}}},c6=function(e){return function(t){return dr(t)?e.of(eO(t.left)):e.map(t.right,eR)}},c5={URI:cK,map:cI,reduce:ck,foldMap:cO,reduceRight:cR,traverse:cE,sequence:c6},c3=function(e,t){return function(n){return dr(n)?eO(e(n.left)):eR(t(n.right))}},c9=function(e){return function(t){return dr(t)?eO(e(t.left)):t}},c4=function(e){return function(t){return dr(t)?e():t}},c8=c4,c7=function(e){return function(t){return dr(t)?t:eR(e(t))}},de={URI:cK,fromEither:ec},dt=e3(de),dn=e5(de),dr=eT,di=ek,da=function(e,t){return function(n){return dr(n)?e(n.left):t(n.right)}},du=function(e){return function(t){return dr(t)?e(t.left):t.right}},ds=eH(cQ),dl=eW(cH),dc=eD(cH),dd=e1(c$),df=cZ(ec),dp=c7(ec),dA=e9(de),dh=e4(de,c$),dm=tt(de,c$),dg=function(e){return dr(e)?eR(e.left):eO(e.right)},dy=function(e){return function(t){return dr(t)?e(t.left):t}},dv=function(e){return function(t){return null==t?eO(e):eR(t)}},dx=function(e,t){try{return eR(e())}catch(e){return eO(t(e))}},db=function(e){var t=dv(e);return function(e){return em(e,t)}},dC=da(ec,ec),dS=cV(eL),dw=eG(cQ),dI=e2(c$),d_=eN(cH),dT=cV(eU),dk=function(e){return function(t){var n=e(0,eF(t));if(dr(n))return n;for(var r=[n.right],i=1;i<t.length;i++){var o=e(i,t[i]);if(dr(o))return o;r.push(o.right)}return eR(r)}},dO=function(e){var t=dk(e);return function(e){return ej(e)?t(e):dT}},dR=function(e){return dO(function(t,n){return e(n)})},dE=dR(ec),dj=eq(cH),dF=e$(cG);let dM=Object.freeze(Object.defineProperty({__proto__:null,Alt:{URI:cK,map:cI,alt:cM},ApT:dT,Applicative:cG,Apply:cH,Bifunctor:{URI:cK,bimap:cj,mapLeft:cF},Chain:c$,ChainRec:{URI:cK,map:cI,ap:c_,chain:cT,chainRec:cL},Do:dS,Extend:{URI:cK,map:cI,extend:cU},Foldable:{URI:cK,reduce:ck,foldMap:cO,reduceRight:cR},FromEither:de,Functor:cQ,Monad:{URI:cK,map:cI,ap:c_,of:cV,chain:cT},MonadThrow:{URI:cK,map:cI,ap:c_,of:cV,chain:cT,throwError:eO},Pointed:{URI:cK,of:cV},Traversable:c5,URI:cK,alt:c8,altW:c4,ap:cY,apFirst:dl,apFirstW:dl,apS:d_,apSW:d_,apSecond:dc,apSecondW:dc,apW:cz,bimap:c3,bind:dI,bindTo:dw,bindW:dI,chain:cJ,chainFirst:dd,chainFirstW:dd,chainNullableK:function(e){var t=db(e);return function(e){return cJ(t(e))}},chainOptionK:dh,chainW:cZ,duplicate:dp,either:{URI:cK,map:cI,of:cV,ap:c_,chain:cT,reduce:ck,foldMap:cO,reduceRight:cR,traverse:cE,sequence:c6,bimap:cj,mapLeft:cF,alt:cM,extend:cU,chainRec:cL,throwError:eO},elem:function e(t){return function(n,r){if(void 0===r){var i=e(t);return function(e){return i(n,e)}}return!dr(r)&&t.equals(n,r.right)}},exists:function(e){return function(t){return!dr(t)&&e(t.right)}},extend:c7,filterOrElse:dm,filterOrElseW:dm,flap:ds,flatten:df,flattenW:df,fold:da,foldMap:c0,foldW:da,fromNullable:dv,fromNullableK:db,fromOption:dn,fromOptionK:dA,fromPredicate:dt,getAltValidation:cN,getApplicativeValidation:cD,getApplyMonoid:dF,getApplySemigroup:dj,getCompactable:cP,getEq:function(e,t){return{equals:function(n,r){return n===r||(dr(n)?dr(r)&&e.equals(n.left,r.left):di(r)&&t.equals(n.right,r.right))}}},getFilterable:cW,getOrElse:du,getOrElseW:du,getSemigroup:cB,getShow:function(e,t){return{show:function(n){return dr(n)?"left(".concat(e.show(n.left),")"):"right(".concat(t.show(n.right),")")}}},getValidation:function(e){return{URI:cK,_E:void 0,map:cI,of:cV,chain:cT,bimap:cj,mapLeft:cF,reduce:ck,foldMap:cO,reduceRight:cR,extend:cU,traverse:cE,sequence:c6,chainRec:cL,throwError:eO,ap:cD(e).ap,alt:cN(e).alt}},getValidationMonoid:function(e,t){return e$(cD(e))(t)},getValidationSemigroup:function(e,t){return eq(cD(e))(t)},getWitherable:function(e){var t=cW(e),n=cP(e);return{URI:cK,_E:void 0,map:cI,compact:t.compact,separate:t.separate,filter:t.filter,filterMap:t.filterMap,partition:t.partition,partitionMap:t.partitionMap,traverse:cE,sequence:c6,reduce:ck,foldMap:cO,reduceRight:cR,wither:iH(c5,n),wilt:iY(c5,n)}},isLeft:dr,isRight:di,left:eO,map:cq,mapLeft:c9,match:da,matchW:da,of:cV,orElse:dy,orElseW:dy,parseJSON:function(e,t){return dx(function(){return JSON.parse(e)},t)},reduce:cX,reduceRight:c1,right:eR,sequence:c6,sequenceArray:dE,stringifyJSON:function(e,t){return dx(function(){var t=JSON.stringify(e);if("string"!=typeof t)throw Error("Converting unsupported structure to JSON");return t},t)},swap:dg,throwError:eO,toError:function(e){return e instanceof Error?e:Error(String(e))},toUnion:dC,traverse:c2,traverseArray:dR,traverseArrayWithIndex:dO,traverseReadonlyArrayWithIndex:dO,traverseReadonlyNonEmptyArrayWithIndex:dk,tryCatch:dx,tryCatchK:function(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return dx(function(){return e.apply(void 0,n)},t)}}},Symbol.toStringTag,{value:"Module"}));function dU(e){return em(eR,e.of)}function dL(e){return em(eO,e.of)}function dK(e){return function(t){return e.map(t,eR)}}function dB(e){return function(t){return e.map(t,eO)}}function dP(e){return function(t){return em(dv(t),e.of)}}function dW(e){var t=dP(e);return function(e){var n=t(e);return function(e){return em(e,n)}}}function dD(e){var t=dQ(e),n=dW(e);return function(e){var r=n(e);return function(e){return t(r(e))}}}function dN(e){return eY(e,cQ)}function dq(e){return eP(e,cH)}function dQ(e){return function(t){return function(n){return e.chain(n,function(n){return dr(n)?e.of(n):t(n.right)})}}}function dV(e){return function(t){return function(n){return e.chain(n,function(n){return dr(n)?t():e.of(n)})}}}function dz(e){return function(t,n){return function(r){return e.map(r,c3(t,n))}}}function dY(e){return function(t){return function(n){return e.map(n,c9(t))}}}function dH(e,t){return function(n){return function(r){return e.chain(r,da(function(r){return e.map(n(),c9(function(e){return t.concat(r,e)}))},dU(e)))}}}function dG(e){return function(t,n){return function(r){return e.map(r,da(t,n))}}}function dZ(e){return function(t,n){return function(r){return e.chain(r,da(t,n))}}}function dJ(e){return function(t){return function(n){return e.chain(n,da(t,e.of))}}}function d$(e){return function(t){return function(n){return e.chain(n,function(n){return dr(n)?t(n.left):e.of(n)})}}}function dX(e){var t=d$(e);return function(n){return t(function(t){return e.map(n(t),function(e){return dr(e)?e:eO(t)})})}}function d0(e){return function(t){return function(n){return e.chain(n,da(function(n){return e.map(t(n),eO)},function(t){return e.of(eR(t))}))}}}function d1(e){return function(t){return e.map(t,dg)}}function d2(e){return function(t){return e.map(t,dC)}}let d6=Object.freeze(Object.defineProperty({__proto__:null,alt:dV,altValidation:dH,ap:dq,bimap:dz,chain:dQ,chainNullableK:dD,fromNullable:dP,fromNullableK:dW,getEitherM:function(e){var t=dq(e),n=dN(e),r=dQ(e),i=dV(e),o=dz(e),a=dY(e),u=dZ(e),s=dJ(e),l=d$(e);return{map:function(e,t){return ev(e,n(t))},ap:function(e,n){return ev(e,t(n))},of:dU(e),chain:function(e,t){return ev(e,r(t))},alt:function(e,t){return ev(e,i(t))},bimap:function(e,t,n){return ev(e,o(t,n))},mapLeft:function(e,t){return ev(e,a(t))},fold:function(e,t,n){return ev(e,u(t,n))},getOrElse:function(e,t){return ev(e,s(t))},orElse:function(e,t){return ev(e,l(t))},swap:d1(e),rightM:dK(e),leftM:dB(e),left:dL(e)}},getOrElse:dJ,left:dL,leftF:dB,map:dN,mapLeft:dY,match:dG,matchE:dZ,orElse:d$,orElseFirst:dX,orLeft:d0,right:dU,rightF:dK,swap:d1,toUnion:d2},Symbol.toStringTag,{value:"Module"}));var d5=function(){return{concat:function(e,t){return em(e,t)}}},d3=function(){return{concat:d5().concat,empty:ec}};let d9=Object.freeze(Object.defineProperty({__proto__:null,URI:"Endomorphism",getMonoid:d3,getSemigroup:d5},Symbol.toStringTag,{value:"Module"})),d4=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function d8(e,t){var n=t.zero,r=function(i,o){return e.equals(o,n)?i:r(o,t.mod(i,o))};return r}let d7=Object.freeze(Object.defineProperty({__proto__:null,fieldNumber:{add:function(e,t){return e+t},zero:0,mul:function(e,t){return e*t},one:1,sub:function(e,t){return e-t},degree:function(e){return 1},div:function(e,t){return e/t},mod:function(e,t){return e%t}},gcd:d8,lcm:function(e,t){var n=t.zero,r=d8(e,t);return function(i,o){return e.equals(i,n)||e.equals(o,n)?n:t.div(t.mul(i,o),r(i,o))}}},Symbol.toStringTag,{value:"Module"}));function fe(e,t){return function(n){return function(r){return e.map(r,function(e){return t.filter(e,n)})}}}function ft(e,t){return function(n){return function(r){return e.map(r,function(e){return t.filterMap(e,n)})}}}function fn(e,t){var n=fe(e,t);return function(e){var t=n(sY(e)),r=n(e);return function(e){return iK(t(e),r(e))}}}function fr(e,t){var n=ft(e,t);return function(e){return function(t){return iK(ev(t,n(function(t){return s$(e(t))})),ev(t,n(function(t){return sX(e(t))})))}}}let fi=Object.freeze(Object.defineProperty({__proto__:null,filter:fe,filterMap:ft,getFilterableComposition:function(e,t){var n=eZ(e,t).map,r=co(e,t),i=ca(e,t,t),o=fe(e,t),a=ft(e,t),u=fn(e,t),s=fr(e,t);return{map:n,compact:r,separate:i,filter:function(e,t){return ev(e,o(t))},filterMap:function(e,t){return ev(e,a(t))},partition:function(e,t){return ev(e,u(t))},partitionMap:function(e,t){return ev(e,s(t))}}},partition:fn,partitionMap:fr},Symbol.toStringTag,{value:"Module"})),fo=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function fa(e,t){return function(n,r){return function(i){return e.reduce(i,n,function(e,n){return t.reduce(n,e,r)})}}}function fu(e,t){return function(n){var r=e.foldMap(n),i=t.foldMap(n);return function(e){return function(t){return r(t,function(t){return i(t,e)})}}}}function fs(e,t){return function(n,r){return function(i){return e.reduceRight(i,n,function(e,n){return t.reduceRight(e,n,r)})}}}function fl(e){return function(t){return e.reduce(t,[],function(e,t){return e.push(t),e})}}function fc(e,t){var n=fa(e,t),r=fu(e,t),i=fs(e,t);return{reduce:function(e,t,r){return ev(e,n(t,r))},foldMap:function(e){var t=r(e);return function(e,n){return ev(e,t(n))}},reduceRight:function(e,t,n){return ev(e,i(t,n))}}}let fd=Object.freeze(Object.defineProperty({__proto__:null,foldM:function(e,t){return function(n,r,i){return t.reduce(n,e.of(r),function(t,n){return e.chain(t,function(e){return i(e,n)})})}},foldMap:fu,getFoldableComposition:fc,intercalate:function(e,t){return function(n,r){return t.reduce(r,{init:!0,acc:e.empty},function(t,r){var i=t.init,o=t.acc;return i?{init:!1,acc:r}:{init:!1,acc:e.concat(e.concat(o,n),r)}}).acc}},reduce:fa,reduceM:function(e,t){return function(n,r){return function(i){return t.reduce(i,e.of(n),function(t,n){return e.chain(t,function(e){return r(e,n)})})}}},reduceRight:fs,toArray:fl,toReadonlyArray:fl,traverse_:function(e,t){var n=e.of(void 0);return function(r,i){return t.reduce(r,n,function(t,n){var r;return r=i(n),e.ap(e.map(t,ed),r)})}}},Symbol.toStringTag,{value:"Module"}));function ff(e,t){return function(n,r){return function(i){return e.reduceWithIndex(i,n,function(e,n,i){return t.reduceWithIndex(i,n,function(t,n,i){return r([e,t],n,i)})})}}}function fp(e,t){return function(n){var r=e.foldMapWithIndex(n),i=t.foldMapWithIndex(n);return function(e){return function(t){return r(t,function(t,n){return i(n,function(n,r){return e([t,n],r)})})}}}}function fA(e,t){return function(n,r){return function(i){return e.reduceRightWithIndex(i,n,function(e,n,i){return t.reduceRightWithIndex(n,i,function(t,n,i){return r([e,t],n,i)})})}}}let fh=Object.freeze(Object.defineProperty({__proto__:null,foldMapWithIndex:fp,getFoldableWithIndexComposition:function(e,t){var n=fc(e,t),r=ff(e,t),i=fp(e,t),o=fA(e,t);return{reduce:n.reduce,foldMap:n.foldMap,reduceRight:n.reduceRight,reduceWithIndex:function(e,t,n){return ev(e,r(t,n))},foldMapWithIndex:function(e){var t=i(e);return function(e,n){return ev(e,t(n))}},reduceRightWithIndex:function(e,t,n){return ev(e,o(t,n))}}},reduceRightWithIndex:fA,reduceWithIndex:ff},Symbol.toStringTag,{value:"Module"}));function fm(e){return function(t){return em(t,e.fromIO)}}function fg(e,t){return function(n){var r=em(n,e.fromIO);return function(e){return t.chain(e,r)}}}function fy(e,t){var n=e1(t);return function(t){return n(em(t,e.fromIO))}}let fv=Object.freeze(Object.defineProperty({__proto__:null,chainFirstIOK:fy,chainIOK:fg,fromIOK:fm},Symbol.toStringTag,{value:"Module"}));var fx=function(){return ec},fb=function(e){return function(t){return function(n){return t(e(n))}}},fC=function(e){return function(t){return e(t)(t)}},fS=function(e,t){return ev(e,fk(t))},fw=function(e,t){return ev(e,fR(t))},fI=function(e,t){return ev(e,fj(t))},f_=function(e,t){return ev(e,fM(t))},fT=function(e,t,n){return ev(e,fU(t,n))},fk=function(e){return function(t){return function(n){return e(t(n))}}},fO=function(e){return function(t){return function(n){return t(n)(e(n))}}},fR=fO,fE=function(e){return function(t){return function(n){return e(t(n))(n)}}},fj=fE,fF=fE(ec),fM=function(e){return function(t){return em(e,t)}},fU=function(e,t){return function(n){return function(r){return t(n(e(r)))}}},fL=function(){return ec},fK=function(e){return function(t){var n=t[0],r=t[1];return[e(n),r]}},fB=function(e){return function(t){return[t[0],e(t[1])]}},fP=function(e){return da(function(t){return eO(e(t))},eR)},fW=function(e){return da(eO,function(t){return eR(e(t))})},fD="Reader",fN={URI:fD,map:fS},fq=eH(fN),fQ={URI:fD,of:ed},fV={URI:fD,map:fS,ap:fw},fz=eW(fV),fY=eD(fV),fH={URI:fD,map:fS,ap:fw,of:ed},fG={URI:fD,map:fS,ap:fw,chain:fI},fZ={URI:fD,map:fS,of:ed,ap:fw,chain:fI},fJ=e1(fG),f$=eG(fN),fX=e2(fG),f0=ed(eL),f1=eN(fV),f2=ed(eU),f6=function(e){return function(t){return function(n){for(var r=[e(0,eF(t))(n)],i=1;i<t.length;i++)r.push(e(i,t[i])(n));return r}}},f5=function(e){var t=f6(e);return function(e){return ej(e)?t(e):f2}},f3=function(e){return f5(function(t,n){return e(n)})},f9=f3(ec),f4=eq(fV),f8=e$(fH);let f7=Object.freeze(Object.defineProperty({__proto__:null,ApT:f2,Applicative:fH,Apply:fV,Category:{URI:fD,compose:f_,id:fL},Chain:fG,Choice:{URI:fD,map:fS,promap:fT,left:fP,right:fW},Do:f0,Functor:fN,Monad:fZ,Pointed:fQ,Profunctor:{URI:fD,map:fS,promap:fT},Strong:{URI:fD,map:fS,promap:fT,first:fK,second:fB},URI:fD,ap:fR,apFirst:fz,apFirstW:fz,apS:f1,apSW:f1,apSecond:fY,apSecondW:fY,apW:fO,ask:fx,asks:ec,asksReader:fC,asksReaderW:fC,bind:fX,bindTo:f$,bindW:fX,chain:fj,chainFirst:fJ,chainFirstW:fJ,chainW:fE,compose:fM,first:fK,flap:fq,flatten:fF,flattenW:fF,getMonoid:f8,getSemigroup:f4,id:fL,left:fP,local:fb,map:fk,of:ed,promap:fU,reader:{URI:fD,map:fS,of:ed,ap:fw,chain:fI,promap:fT,compose:f_,id:fL,first:fK,second:fB,left:fP,right:fW},right:fW,second:fB,sequenceArray:f9,traverseArray:f3,traverseArrayWithIndex:f5,traverseReadonlyArrayWithIndex:f5,traverseReadonlyNonEmptyArrayWithIndex:f6},Symbol.toStringTag,{value:"Module"}));function pe(e){return function(){return e.fromReader(fx())}}function pt(e){return e.fromReader}function pn(e){return function(t){return em(t,e.fromReader)}}function pr(e,t){var n=pn(e);return function(e){return function(r){return t.chain(r,n(e))}}}function pi(e,t){return em(pn(e),e1(t))}let po=Object.freeze(Object.defineProperty({__proto__:null,ask:pe,asks:pt,chainFirstReaderK:pi,chainReaderK:pr,fromReaderK:pn},Symbol.toStringTag,{value:"Module"}));var pa=function(){return function(e){return[e,e]}},pu=function(e){return function(){return[void 0,e]}},ps=function(e){return function(t){return[void 0,e(t)]}},pl=function(e){return function(t){return[e(t),t]}},pc=function(e,t){return ev(e,pp(t))},pd=function(e,t){return ev(e,pA(t))},pf=function(e,t){return ev(e,pm(t))},pp=function(e){return function(t){return function(n){var r=t(n),i=r[0],o=r[1];return[e(i),o]}}},pA=function(e){return function(t){return function(n){var r=t(n),i=r[0],o=e(r[1]),a=o[0],u=o[1];return[i(a),u]}}},ph=function(e){return function(t){return[e,t]}},pm=function(e){return function(t){return function(n){var r=t(n),i=r[0],o=r[1];return e(i)(o)}}},pg=pm(ec),py="State",pv={URI:py,map:pc},px=eH(pv),pb={URI:py,map:pc,ap:pd},pC=eW(pb),pS=eD(pb),pw={URI:py,map:pc,ap:pd,chain:pf},pI={URI:py,map:pc,ap:pd,of:ph,chain:pf},p_=e1(pw),pT=eG(pv),pk=e2(pw),pO=eN(pb),pR=function(e){return function(t){return function(n){for(var r=e(0,eF(t))(n),i=r[0],o=r[1],a=[i],u=o,s=1;s<t.length;s++){var l=e(s,t[s])(u),c=l[0],d=l[1];a.push(c),u=d}return[a,u]}}},pE=function(e){var t=pR(e);return function(e){return ej(e)?t(e):ph(eU)}},pj=function(e){return pE(function(t,n){return e(n)})},pF=pj(ec);let pM=Object.freeze(Object.defineProperty({__proto__:null,Applicative:{URI:py,map:pc,ap:pd,of:ph},Apply:pb,Chain:pw,FromState:{URI:py,fromState:ec},Functor:pv,Monad:pI,Pointed:{URI:py,of:ph},URI:py,ap:pA,apFirst:pC,apS:pO,apSecond:pS,bind:pk,bindTo:pT,chain:pm,chainFirst:p_,evalState:function(e,t){return e(t)[0]},evaluate:function(e){return function(t){return t(e)[0]}},execState:function(e,t){return e(t)[1]},execute:function(e){return function(t){return t(e)[1]}},flap:px,flatten:pg,get:pa,gets:pl,map:pp,modify:ps,of:ph,put:pu,sequenceArray:pF,state:pI,traverseArray:pj,traverseArrayWithIndex:pE,traverseReadonlyArrayWithIndex:pE,traverseReadonlyNonEmptyArrayWithIndex:pR},Symbol.toStringTag,{value:"Module"}));function pU(e){return function(){return e.fromState(pa())}}function pL(e){return function(t){return e.fromState(pu(t))}}function pK(e){return em(ps,e.fromState)}function pB(e){return em(pl,e.fromState)}function pP(e){return function(t){return em(t,e.fromState)}}function pW(e,t){var n=pP(e);return function(e){return function(r){return t.chain(r,n(e))}}}let pD=Object.freeze(Object.defineProperty({__proto__:null,chainStateK:pW,fromStateK:pP,get:pU,gets:pB,modify:pK,put:pL},Symbol.toStringTag,{value:"Module"}));function pN(e){return function(t){return em(t,e.fromTask)}}function pq(e,t){return function(n){var r=em(n,e.fromTask);return function(e){return t.chain(e,r)}}}function pQ(e,t){var n=e1(t);return function(t){return n(em(t,e.fromTask))}}let pV=Object.freeze(Object.defineProperty({__proto__:null,chainFirstTaskK:pQ,chainTaskK:pq,fromTaskK:pN},Symbol.toStringTag,{value:"Module"}));function pz(e){return function(t){return em(t,e.fromThese)}}let pY=Object.freeze(Object.defineProperty({__proto__:null,fromTheseK:pz},Symbol.toStringTag,{value:"Module"}));function pH(e,t){return function(n){return function(r){return e.mapWithIndex(r,function(e,r){return t.mapWithIndex(r,function(t,r){return n([e,t],r)})})}}}let pG=Object.freeze(Object.defineProperty({__proto__:null,getFunctorWithIndexComposition:function(e,t){var n=eZ(e,t).map,r=pH(e,t);return{map:n,mapWithIndex:function(e,t){return ev(e,r(t))}}},mapWithIndex:pH},Symbol.toStringTag,{value:"Module"})),pZ=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),pJ=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),p$=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var pX=function(e,t){return ev(e,p8(t))},p0=function(e,t){return ev(e,p7(t))},p1=function(e,t){return ev(e,Ae(t))},p2=function(e,t,n){return ev(e,Ai(t,n))},p6=function(e){return function(e,t){return ev(e,Ao()(t))}},p5=function(e,t,n){return ev(e,Aa(t,n))},p3=function(e,t){return ev(e,Ac())},p9=function(e,t){return ev(e,At(t))},p4=function(e){var t=Au(e);return function(e,n){return ev(e,t(n))}},p8=function(e){return function(t){return e(t)}},p7=function(e){return function(t){return t(e)}},Ae=function(e){return function(t){return e(t)}},At=function(e){return function(t){return e(t)}},An=At(ec),Ar=Ae(ec),Ai=function(e,t){return function(n){return t(e,n)}},Ao=function(){return function(e){return function(t){return e(t)}}},Aa=function(e,t){return function(n){return t(n,e)}},Au=function(e){return function(t){return function(n){return e.map(t(n),ec)}}},As=function(e){return function(t){return e.map(t,ec)}},Al=function(){return ec},Ac=Al,Ad="Identity",Af={URI:Ad,map:pX},Ap=eH(Af),AA={URI:Ad,map:pX,ap:p0},Ah=eW(AA),Am=eD(AA),Ag={URI:Ad,map:pX,ap:p0,chain:p1},Ay=e1(Ag),Av=ec(eL),Ax=eG(Af),Ab=e2(Ag),AC=eN(AA);let AS=Object.freeze(Object.defineProperty({__proto__:null,Alt:{URI:Ad,map:pX,alt:p3},Applicative:{URI:Ad,map:pX,ap:p0,of:ec},Apply:AA,Chain:Ag,ChainRec:{URI:Ad,map:pX,ap:p0,chain:p1,chainRec:sK},Comonad:{URI:Ad,map:pX,extend:p9,extract:ec},Do:Av,Foldable:{URI:Ad,reduce:p2,foldMap:p6,reduceRight:p5},Functor:Af,Monad:{URI:Ad,map:pX,ap:p0,of:ec,chain:p1},Pointed:{URI:Ad,of:ec},Traversable:{URI:Ad,map:pX,reduce:p2,foldMap:p6,reduceRight:p5,traverse:p4,sequence:As},URI:Ad,alt:Ac,altW:Al,ap:p7,apFirst:Ah,apS:AC,apSecond:Am,bind:Ab,bindTo:Ax,chain:Ae,chainFirst:Ay,duplicate:An,extend:At,extract:ec,flap:Ap,flatten:Ar,foldMap:Ao,getEq:ec,getShow:ec,identity:{URI:Ad,map:pX,ap:p0,of:ec,chain:p1,reduce:p2,foldMap:p6,reduceRight:p5,traverse:p4,sequence:As,alt:p3,extract:ec,extend:p9,chainRec:sK},map:p8,of:ec,reduce:Ai,reduceRight:Aa,sequence:As,traverse:Au},Symbol.toStringTag,{value:"Module"})),Aw=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var AI=function(e,t){return function(){return t(e())}},A_=function(e,t){return function(){return e()(t())}},AT=function(e,t){return function(){return t(e())()}},Ak=function(e,t){return function(){for(var n=t(e)();"Left"===n._tag;)n=t(n.left)();return n.right}},AO=function(e){return function(t){return AI(t,e)}},AR=function(e){return function(t){return AT(t,e)}},AE=AR(ec),Aj={URI:"IO",map:AI},AF=eH(Aj),AM={URI:"IO",of:ed},AU={URI:"IO",map:AI,ap:A_},AL=eW(AU),AK=eD(AU),AB={URI:"IO",map:AI,ap:A_,of:ed},AP={URI:"IO",map:AI,ap:A_,chain:AT},AW={URI:"IO",map:AI,ap:A_,of:ed,chain:AT},AD=e1(AP),AN=ed(eL),Aq=eG(Aj),AQ=e2(AP),AV=eN(AU),Az=ed(eU),AY=function(e){return function(t){return function(){for(var n=[e(0,eF(t))()],r=1;r<t.length;r++)n.push(e(r,t[r])());return n}}},AH=function(e){var t=AY(e);return function(e){return ej(e)?t(e):Az}},AG=function(e){return AH(function(t,n){return e(n)})},AZ=AG(ec),AJ=eq(AU),A$=e$(AB);let AX=Object.freeze(Object.defineProperty({__proto__:null,ApT:Az,Applicative:AB,Apply:AU,Chain:AP,ChainRec:{URI:"IO",map:AI,ap:A_,chain:AT,chainRec:Ak},Do:AN,FromIO:{URI:"IO",fromIO:ec},Functor:Aj,Monad:AW,MonadIO:{URI:"IO",map:AI,ap:A_,of:ed,chain:AT,fromIO:ec},Pointed:AM,URI:"IO",ap:function(e){return function(t){return A_(t,e)}},apFirst:AL,apS:AV,apSecond:AK,bind:AQ,bindTo:Aq,chain:AR,chainFirst:AD,flap:AF,flatten:AE,fromIO:ec,getMonoid:A$,getSemigroup:AJ,io:{URI:"IO",map:AI,of:ed,ap:A_,chain:AT,fromIO:ec,chainRec:Ak},map:AO,of:ed,sequenceArray:AZ,traverseArray:AG,traverseArrayWithIndex:AH,traverseReadonlyArrayWithIndex:AH,traverseReadonlyNonEmptyArrayWithIndex:AY},Symbol.toStringTag,{value:"Module"}));var A0=dL(AM),A1=dU(AM),A2=dK(Aj),A6=dB(Aj),A5=dG(Aj),A3=dZ(AW),A9=dJ(AW),A4=function(e,t){return function(){return dx(e,t)}},A8=d2(Aj),A7=d$(AW),he=dX(AW),ht=d0(AW),hn=d1(Aj),hr=function(e,t){return ev(e,hl(t))},hi=function(e,t){return ev(e,hf(t))},ho=function(e,t){return ev(e,hp(t))},ha=function(e,t,n){return ev(e,hc(t,n))},hu=function(e,t){return ev(e,hd(t))},hs=function(e,t){return ev(e,hh(t))},hl=dN(Aj),hc=dz(Aj),hd=dY(Aj),hf=dq(AU),hp=dQ(AW),hA=hp(ec),hh=dV(AW),hm="IOEither";function hg(e){var t=eP(AU,cD(e));return{URI:hm,_E:void 0,map:hr,ap:function(e,n){return ev(e,t(n))},of:A1}}function hy(e){var t=dH(AW,e);return{URI:hm,_E:void 0,map:hr,alt:function(e,n){return ev(e,t(n))}}}var hv=function(e){var t=cP(e);return{URI:hm,_E:void 0,compact:co(Aj,t),separate:ca(Aj,t,cQ)}},hx={URI:hm,map:hr},hb=eH(hx),hC={URI:hm,map:hr,ap:hi},hS=eW(hC),hw=eD(hC),hI={URI:hm,map:hr,ap:hi,of:A1},h_={URI:hm,map:hr,ap:hi,chain:ho},hT=e1(h_),hk={URI:hm,fromIO:A2},hO=fm(hk),hR=fg(hk,h_),hE=fy(hk,h_),hj={URI:hm,fromEither:ed},hF=e5(hj),hM=e9(hj),hU=e4(hj,h_),hL=e7(hj,h_),hK=te(hj,h_),hB=e3(hj),hP=tt(hj,h_),hW=e8(hj),hD=function(e,t,n){return ev(e,hp(function(e){return ev(t(e),AR(function(t){return ev(n(e,t),hp(function(){return ed(t)}))}))}))},hN=A1(eL),hq=eG(hx),hQ=e2(h_),hV=eN(hC),hz=A1(eU),hY=function(e){return em(AY(e),AO(dk(ex)))},hH=function(e){var t=hY(e);return function(e){return ej(e)?t(e):hz}},hG=function(e){return function(t){return function(){var n=e(0,eF(t))();if(eT(n))return n;for(var r=[n.right],i=1;i<t.length;i++){var o=e(i,t[i])();if(eT(o))return o;r.push(o.right)}return eR(r)}}},hZ=function(e){var t=hG(e);return function(e){return ej(e)?t(e):hz}},hJ=function(e){return hH(function(t,n){return e(n)})},h$=hJ(ec),hX=function(e){return hZ(function(t,n){return e(n)})},h0=hX(ec),h1=eq(hC),h2=e$(hI);let h6=Object.freeze(Object.defineProperty({__proto__:null,Alt:{URI:hm,map:hr,alt:hs},ApT:hz,Applicative:hI,ApplicativePar:hI,ApplicativeSeq:{URI:hm,map:hr,ap:function(e,t){return ev(e,hp(function(e){return ev(t,hl(e))}))},of:A1},ApplyPar:hC,Bifunctor:{URI:hm,bimap:ha,mapLeft:hu},Chain:h_,Do:hN,FromEither:hj,FromIO:hk,Functor:hx,Monad:{URI:hm,map:hr,ap:hi,of:A1,chain:ho},MonadIO:{URI:hm,map:hr,ap:hi,of:A1,chain:ho,fromIO:A2},MonadThrow:{URI:hm,map:hr,ap:hi,of:A1,chain:ho,throwError:A0},Pointed:{URI:hm,of:A1},URI:hm,alt:hh,altW:hh,ap:hf,apFirst:hS,apFirstW:hS,apS:hV,apSW:hV,apSecond:hw,apSecondW:hw,apW:hf,bimap:hc,bind:hQ,bindTo:hq,bindW:hQ,bracket:function(e,t,n){return hD(e,t,n)},bracketW:hD,chain:hp,chainEitherK:hL,chainEitherKW:hL,chainFirst:hT,chainFirstEitherK:hK,chainFirstEitherKW:hK,chainFirstIOK:hE,chainFirstW:hT,chainIOK:hR,chainOptionK:hU,chainW:hp,filterOrElse:hP,filterOrElseW:hP,flap:hb,flatten:hA,flattenW:hA,fold:A3,foldW:A3,fromEither:ed,fromEitherK:hW,fromIO:A2,fromIOK:hO,fromOption:hF,fromOptionK:hM,fromPredicate:hB,getAltIOValidation:hy,getApplicativeIOValidation:hg,getApplyMonoid:h2,getApplySemigroup:h1,getCompactable:hv,getFilterable:function(e){var t=cW(e),n=hv(e),r=fe(Aj,t),i=ft(Aj,t),o=fn(Aj,t),a=fr(Aj,t);return{URI:hm,_E:void 0,map:hr,compact:n.compact,separate:n.separate,filter:function(e,t){return ev(e,r(t))},filterMap:function(e,t){return ev(e,i(t))},partition:function(e,t){return ev(e,o(t))},partitionMap:function(e,t){return ev(e,a(t))}}},getIOValidation:function(e){var t=hg(e),n=hy(e);return{URI:hm,_E:void 0,map:hr,ap:t.ap,of:A1,chain:ho,bimap:ha,mapLeft:hu,alt:n.alt,fromIO:A2,throwError:A0}},getOrElse:A9,getOrElseW:A9,getSemigroup:function(e){return eq(AU)(cB(e))},ioEither:{URI:hm,bimap:ha,mapLeft:hu,map:hr,of:A1,ap:hi,chain:ho,alt:hs,fromIO:A2,throwError:A0},left:A0,leftIO:A6,map:hl,mapLeft:hd,match:A5,matchE:A3,matchEW:A3,matchW:A5,of:A1,orElse:A7,orElseFirst:he,orElseFirstIOK:function(e){return he(hO(e))},orElseFirstW:he,orElseW:A7,orLeft:ht,right:A1,rightIO:A2,sequenceArray:h$,sequenceSeqArray:h0,swap:hn,throwError:A0,toUnion:A8,traverseArray:hJ,traverseArrayWithIndex:hH,traverseReadonlyArrayWithIndex:hH,traverseReadonlyArrayWithIndexSeq:hZ,traverseReadonlyNonEmptyArrayWithIndex:hY,traverseReadonlyNonEmptyArrayWithIndexSeq:hG,traverseSeqArray:hX,traverseSeqArrayWithIndex:hZ,tryCatch:A4,tryCatchK:function(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return A4(function(){return e.apply(void 0,n)},t)}}},Symbol.toStringTag,{value:"Module"}));function h5(e){return em(e_,e.of)}function h3(e){return ed(e.of(eI))}function h9(e){return function(t){return e.map(t,e_)}}function h4(e){return em(lZ,e.of)}function h8(e){var t=h4(e);return function(e){return em(e,t)}}function h7(e){var t=ml(e),n=h8(e);return function(e){return t(n(e))}}function me(e){return function(t){return em(t,e.of)}}function mt(e){var t=ml(e),n=me(e);return function(e){return t(n(e))}}function mn(e){return function(t){return function(n){return e.of(sJ(t)(n))}}}function mr(e){return em(sX,e.of)}function mi(e){return function(t,n){return function(r){return e.map(r,lW(t,n))}}}function mo(e){return function(t,n){return function(r){return e.chain(r,lW(t,n))}}}function ma(e){return function(t){return function(n){return e.chain(n,lW(t,e.of))}}}function mu(e){return eY(e,lu)}function ms(e){return eP(e,lc)}function ml(e){var t=h3(e);return function(n){return function(r){return e.chain(r,lW(function(){return t()},n))}}}function mc(e){var t=h5(e);return function(n){return function(r){return e.chain(r,lW(n,t))}}}let md=Object.freeze(Object.defineProperty({__proto__:null,alt:mc,ap:ms,chain:ml,chainNullableK:h7,chainOptionK:mt,fromEither:mr,fromF:h9,fromNullable:h4,fromNullableK:h8,fromOptionK:me,fromPredicate:mn,getOptionM:function(e){var t=ms(e),n=mu(e),r=ml(e),i=mc(e),o=mo(e),a=ma(e),u=h3(e);return{map:function(e,t){return ev(e,n(t))},ap:function(e,n){return ev(e,t(n))},of:h5(e),chain:function(e,t){return ev(e,r(t))},alt:function(e,t){return ev(e,i(t))},fold:function(e,t,n){return ev(e,o(t,n))},getOrElse:function(e,t){return ev(e,a(t))},fromM:h9(e),none:function(){return u()}}},getOrElse:ma,map:mu,match:mi,matchE:mo,some:h5,zero:h3},Symbol.toStringTag,{value:"Module"}));var mf=h5(AM),mp=mn(AM),mA=mr(AM),mh=h9(Aj),mm=AO(sX),mg=mi(Aj),my=mo(AP),mv=ma(AW),mx=AO(l0),mb=AO(lX),mC=h4(AM),mS=h8(AM),mw=h7(AW),mI=me(AM),m_=mt(AW),mT=mu(Aj),mk=ms(AU),mO=ml(AW),mR=mO(ec),mE=mc(AW),mj=h3(AM),mF=mj(),mM=co(Aj,l_),mU=ca(Aj,l_,lu),mL=fe(Aj,lE),mK=ft(Aj,lE),mB=fn(Aj,lE),mP=fr(Aj,lE),mW=function(e,t){return ev(e,mT(t))},mD=function(e,t){return ev(e,mk(t))},mN=function(e,t){return ev(e,mO(t))},mq=function(e,t){return ev(e,mE(t))},mQ="IOOption",mV={URI:mQ,map:mW},mz=eH(mV),mY={URI:mQ,of:mf},mH={URI:mQ,map:mW,ap:mD},mG=eW(mH),mZ=eD(mH),mJ={URI:mQ,map:mW,ap:mD,chain:mN},m$=e1(mJ),mX={URI:mQ,zero:mj},m0=iJ(mX,mY),m1={URI:mQ,fromIO:mh},m2=fm(m1),m6=fg(m1,mJ),m5=fy(m1,mJ),m3={URI:mQ,fromEither:mA},m9=e8(m3),m4=e7(m3,mJ),m8=te(m3,mJ),m7=mf(eL),ge=eG(mV),gt=e2(mJ),gn=eN(mH),gr=mf(eU),gi=function(e){return em(AY(e),AO(l9(ex)))};let go=Object.freeze(Object.defineProperty({__proto__:null,Alt:{URI:mQ,map:mW,alt:mq},Alternative:{URI:mQ,map:mW,ap:mD,of:mf,alt:mq,zero:mj},ApT:gr,Applicative:{URI:mQ,map:mW,ap:mD,of:mf},Apply:mH,Chain:mJ,Compactable:{URI:mQ,compact:mM,separate:mU},Do:m7,Filterable:{URI:mQ,map:mW,compact:mM,separate:mU,filter:function(e,t){return ev(e,mL(t))},filterMap:function(e,t){return ev(e,mK(t))},partition:function(e,t){return ev(e,mB(t))},partitionMap:function(e,t){return ev(e,mP(t))}},FromEither:m3,FromIO:m1,Functor:mV,Monad:{URI:mQ,map:mW,ap:mD,of:mf,chain:mN},MonadIO:{URI:mQ,map:mW,ap:mD,of:mf,chain:mN,fromIO:mh},Pointed:mY,Zero:mX,alt:mE,altW:mE,ap:mk,apFirst:mG,apS:gn,apSecond:mZ,bind:gt,bindTo:ge,chain:mO,chainEitherK:m4,chainFirst:m$,chainFirstEitherK:m8,chainFirstIOK:m5,chainIOK:m6,chainNullableK:mw,chainOptionK:m_,compact:mM,filter:mL,filterMap:mK,flap:mz,flatten:mR,fold:my,fromEither:mA,fromEitherK:m9,fromIO:mh,fromIOEither:mm,fromIOK:m2,fromNullable:mC,fromNullableK:mS,fromOption:ed,fromOptionK:mI,fromPredicate:mp,getOrElse:mv,getOrElseW:mv,guard:m0,map:mT,match:mg,matchE:my,matchEW:my,matchW:mg,none:mF,of:mf,partition:mB,partitionMap:mP,separate:mU,some:mf,toNullable:mb,toUndefined:mx,traverseReadonlyArrayWithIndex:function(e){var t=gi(e);return function(e){return ej(e)?t(e):gr}},traverseReadonlyNonEmptyArrayWithIndex:gi,zero:mj},Symbol.toStringTag,{value:"Module"}));var ga=function(){function e(e){var t=this;this.value=e,this.read=function(){return t.value},this.write=this.write.bind(this),this.modify=this.modify.bind(this)}return e.prototype.write=function(e){var t=this;return function(){t.value=e}},e.prototype.modify=function(e){var t=this;return function(){t.value=e(t.value)}},e}();let gu=Object.freeze(Object.defineProperty({__proto__:null,IORef:ga,newIORef:function(e){return function(){return new ga(e)}}},Symbol.toStringTag,{value:"Module"})),gs=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),gl=Object.freeze(Object.defineProperty({__proto__:null,parse:function(e){return dx(function(){return JSON.parse(e)},ec)},stringify:function(e){return dx(function(){var t=JSON.stringify(e);if("string"!=typeof t)throw Error("Converting unsupported structure to JSON");return t},ec)}},Symbol.toStringTag,{value:"Module"})),gc=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function gd(e,t){return{show:function(n){var r=[];return n.forEach(function(n,i){r.push("[".concat(e.show(i),", ").concat(t.show(n),"]"))}),"new Map([".concat(r.sort().join(", "),"])")}}}var gf=function(e){return e.size},gp=function(e){return 0===e.size};function gA(e){var t=gS(e);return function(n,r){if(void 0===r){var i=gA(e);return function(e){return i(n,e)}}return ew(t(n,r))}}function gh(e){return function(t,n){if(void 0===n){var r=gh(e);return function(e){return r(t,e)}}for(var i,o=n.values();!(i=o.next()).done;){var a=i.value;if(e.equals(t,a))return!0}return!1}}var gm=function(e){return function(t){return Array.from(t.keys()).sort(e.compare)}};function gg(e){var t=gm(e);return function(e){return function(n){for(var r=[],i=t(n),o=0;o<i.length;o++){var a=i[o];r.push(e(a,n.get(a)))}return r}}}var gy=function(e){return gg(e)(function(e,t){return[e,t]})},gv=function(e){var t=gC(e);return function(e,n){var r=t(e);return function(t){var i=r(t);if(eS(i)){var o=new Map(t);return o.set(e,n),o}if(i.value[1]!==n){var o=new Map(t);return o.set(i.value[0],n),o}return t}}},gx=function(e){var t=gC(e);return function(e){return function(n){var r=t(e,n);if(ew(r)){var i=new Map(n);return i.delete(r.value[0]),i}return n}}},gb=function(e){var t=gC(e);return function(e,n){return function(r){var i=t(e,r);if(eS(i))return eI;var o=i.value,a=o[0],u=o[1],s=n(u);if(s===u)return e_(r);var l=new Map(r);return l.set(a,s),e_(l)}}};function gC(e){return function(t,n){if(void 0===n){var r=gC(e);return function(e){return r(t,e)}}for(var i,o=n.entries();!(i=o.next()).done;){var a=i.value,u=a[0],s=a[1];if(e.equals(u,t))return e_([u,s])}return eI}}function gS(e){var t=gC(e);return function(n,r){if(void 0===r){var i=gS(e);return function(e){return i(n,e)}}return ev(t(n,r),la(function(e){return e[0],e[1]}))}}function gw(e,t){var n=gC(e);return function(r,i){if(void 0===i){var o=gw(e,t);return function(e){return o(e,r)}}for(var a,u=r.entries();!(a=u.next()).done;){var s=a.value,l=s[0],c=s[1],d=n(l,i);if(eS(d)||!e.equals(l,d.value[0])||!t.equals(c,d.value[1]))return!1}return!0}}var gI=new Map;function g_(e,t){var n=gw(e,t);return tr(function(e,t){return n(e,t)&&n(t,e)})}var gT=function(e,t){for(var n,r=new Map,i=e.entries();!(n=i.next()).done;){var o=n.value,a=o[0],u=o[1];r.set(a,t(a,u))}return r},gk=function(e){return function(t){for(var n,r=new Map,i=new Map,o=t.entries();!(n=o.next()).done;){var a=n.value,u=a[0],s=e(u,a[1]);eT(s)?r.set(u,s.left):i.set(u,s.right)}return iK(r,i)}};function gO(e){return function(t){for(var n,r=new Map,i=new Map,o=t.entries();!(n=o.next()).done;){var a=n.value,u=a[0],s=a[1];e(u,s)?i.set(u,s):r.set(u,s)}return iK(r,i)}}var gR=function(e){return function(t){for(var n,r=new Map,i=t.entries();!(n=i.next()).done;){var o=n.value,a=o[0],u=e(a,o[1]);ew(u)&&r.set(a,u.value)}return r}};function gE(e){return function(t){for(var n,r=new Map,i=t.entries();!(n=i.next()).done;){var o=n.value,a=o[0],u=o[1];e(a,u)&&r.set(a,u)}return r}}var gj=function(e,t){return gT(e,function(e,n){return t(n)})},gF=function(e,t){return gK(e,function(e,n){return t(n)})},gM=function(e,t){return gB(e,function(e,n){return t(n)})},gU=function(e,t){return gP(e,function(e,n){return t(n)})},gL=function(e,t){return gW(e,function(e,n){return t(n)})},gK=function(e,t){return ev(e,gE(t))},gB=function(e,t){return ev(e,gR(t))},gP=function(e,t){return ev(e,gO(t))},gW=function(e,t){return ev(e,gk(t))},gD=function(e){for(var t,n=new Map,r=e.entries();!(t=r.next()).done;){var i=t.value,o=i[0],a=i[1];ew(a)&&n.set(o,a.value)}return n},gN=function(e){for(var t,n=new Map,r=new Map,i=e.entries();!(t=i.next()).done;){var o=t.value,a=o[0],u=o[1];eT(u)?n.set(a,u.left):r.set(a,u.right)}return iK(n,r)},gq="ReadonlyMap",gQ=function(e,t){var n=g6(e,t);return{concat:function(e,t){return n(t)(e)}}},gV={URI:gq,map:gj},gz=eH(gV),gY={URI:gq,compact:gD,separate:gN},gH=function(e){var t=g$(e);return function(e,n){return t(e,function(e,t,r){return n(t,r)})}},gG=function(e){var t=gX(e);return function(e){var n=t(e);return function(e){return n(function(t,n){return e(n)})}}},gZ=function(e){var t=g0(e);return function(e,n){return t(e,function(e,t,r){return n(t,r)})}},gJ=function(e){var t=gH(e),n=gG(e),r=gZ(e);return{URI:gq,_E:void 0,reduce:function(e,n,r){return ev(e,t(n,r))},foldMap:function(e){var t=n(e);return function(e,n){return ev(e,t(n))}},reduceRight:function(e,t,n){return ev(e,r(t,n))}}},g$=function(e){var t=gm(e);return function(e,n){return function(r){for(var i=e,o=0,a=t(r);o<a.length;o++){var u=a[o];i=n(u,i,r.get(u))}return i}}},gX=function(e){var t=gm(e);return function(e){return function(n){return function(r){for(var i=e.empty,o=0,a=t(r);o<a.length;o++){var u=a[o];i=e.concat(i,n(u,r.get(u)))}return i}}}},g0=function(e){var t=gm(e);return function(e,n){return function(r){for(var i=e,o=t(r),a=o.length,u=a-1;u>=0;u--){var s=o[u];i=n(s,r.get(s),i)}return i}}},g1=function(e){var t=gJ(e),n=g$(e),r=gX(e),i=g0(e);return{URI:gq,_E:void 0,reduce:t.reduce,foldMap:t.foldMap,reduceRight:t.reduceRight,reduceWithIndex:function(e,t,r){return ev(e,n(t,r))},foldMapWithIndex:function(e){var t=r(e);return function(e,n){return ev(e,t(n))}},reduceRightWithIndex:function(e,t,n){return ev(e,i(t,n))}}},g2=function(e){var t=g1(e),n=gm(e),r=function(e){return function(t,r){for(var i=e.of(new Map),o=n(t),a=o.length,u=0;u<a;u++)!function(n){var a=o[n],u=t.get(a);i=e.ap(e.map(i,function(e){return function(t){return e.set(a,t)}}),r(a,u))}(u);return i}};return{URI:gq,_E:void 0,map:gj,mapWithIndex:gT,reduce:t.reduce,foldMap:t.foldMap,reduceRight:t.reduceRight,reduceWithIndex:t.reduceWithIndex,foldMapWithIndex:t.foldMapWithIndex,reduceRightWithIndex:t.reduceRightWithIndex,traverse:function(e){var t=r(e);return function(e,n){return t(e,function(e,t){return n(t)})}},sequence:function(e){var t=r(e);return function(e){return t(e,ex)}},traverseWithIndex:r}},g6=function(e,t){var n=gS(e);return function(e){return function(r){if(gp(r))return e;if(gp(e))return r;for(var i,o=new Map,a=r.entries();!(i=a.next()).done;){var u=i.value,s=u[0],l=u[1],c=n(s)(e);ew(c)?o.set(s,t.concat(l,c.value)):o.set(s,l)}for(var d=e.entries();!(i=d.next()).done;){var f=i.value,s=f[0],l=f[1],c=n(s)(o);eS(c)&&o.set(s,l)}return o}}},g5=function(e,t){var n=gS(e);return function(e){return function(r){if(gp(r)||gp(e))return gI;for(var i,o=new Map,a=r.entries();!(i=a.next()).done;){var u=i.value,s=u[0],l=u[1],c=n(s)(e);ew(c)&&o.set(s,t.concat(l,c.value))}return o}}},g3=function(e){var t=gA(e);return function(e){return function(n){if(gp(n))return e;if(gp(e))return n;for(var r,i=new Map,o=n.entries();!(r=o.next()).done;){var a=r.value,u=a[0],s=a[1];t(u)(e)||i.set(u,s)}for(var l=e.entries();!(r=l.next()).done;){var c=r.value,u=c[0],s=c[1];t(u)(n)||i.set(u,s)}return i}}};let g9=Object.freeze(Object.defineProperty({__proto__:null,Compactable:gY,Filterable:{URI:gq,map:gj,compact:gD,separate:gN,filter:gF,filterMap:gM,partition:gU,partitionMap:gL},Functor:gV,URI:gq,collect:gg,compact:gD,deleteAt:gx,difference:g3,elem:gh,empty:gI,filter:function(e){return function(t){return gF(t,e)}},filterMap:function(e){return function(t){return gM(t,e)}},filterMapWithIndex:gR,filterWithIndex:gE,flap:gz,foldMap:gG,foldMapWithIndex:gX,fromFoldable:function(e,t,n){return function(r){var i=gC(e);return n.reduce(r,new Map,function(e,n){var r=n[0],o=n[1],a=i(r,e);return ew(a)?e.set(a.value[0],t.concat(a.value[1],o)):e.set(r,o),e})}},fromMap:function(e){return new Map(e)},getDifferenceMagma:function(e){return function(){var t=g3(e);return{concat:function(e,n){return t(n)(e)}}}},getEq:g_,getFilterableWithIndex:function(){return{URI:gq,_E:void 0,map:gj,mapWithIndex:gT,compact:gD,separate:gN,filter:gF,filterMap:gM,partition:gU,partitionMap:gL,partitionMapWithIndex:gW,partitionWithIndex:gP,filterMapWithIndex:gB,filterWithIndex:gK}},getFoldable:gJ,getFoldableWithIndex:g1,getFunctorWithIndex:function(){return{URI:gq,_E:void 0,map:gj,mapWithIndex:gT}},getIntersectionSemigroup:function(e,t){var n=g5(e,t);return{concat:function(e,t){return n(t)(e)}}},getMonoid:function(e,t){var n=gC(e);return{concat:function(e,r){if(gp(e))return r;if(gp(r))return e;for(var i,o=new Map(e),a=r.entries();!(i=a.next()).done;){var u=i.value,s=u[0],l=u[1],c=n(s,e);ew(c)?o.set(c.value[0],t.concat(c.value[1],l)):o.set(s,l)}return o},empty:gI}},getShow:gd,getTraversable:function(e){var t=g2(e),n=gJ(e);return{URI:gq,_E:void 0,map:gj,reduce:n.reduce,foldMap:n.foldMap,reduceRight:n.reduceRight,traverse:t.traverse,sequence:t.sequence}},getTraversableWithIndex:g2,getUnionMonoid:function(e,t){return{concat:gQ(e,t).concat,empty:gI}},getUnionSemigroup:gQ,getWitherable:function(e){var t=g2(e);return{URI:gq,_E:void 0,map:gj,compact:gD,separate:gN,filter:gF,filterMap:gM,partition:gU,partitionMap:gL,reduce:t.reduce,foldMap:t.foldMap,reduceRight:t.reduceRight,traverse:t.traverse,sequence:t.sequence,mapWithIndex:gT,reduceWithIndex:t.reduceWithIndex,foldMapWithIndex:t.foldMapWithIndex,reduceRightWithIndex:t.reduceRightWithIndex,traverseWithIndex:t.traverseWithIndex,wilt:iY(t,gY),wither:iH(t,gY)}},insertAt:gv,intersection:g5,isEmpty:gp,isSubmap:gw,keys:gm,lookup:gS,lookupWithKey:gC,map:function(e){return function(t){return gj(t,e)}},mapWithIndex:function(e){return function(t){return gT(t,e)}},member:gA,modifyAt:gb,partition:function(e){return function(t){return gU(t,e)}},partitionMap:function(e){return function(t){return gL(t,e)}},partitionMapWithIndex:gk,partitionWithIndex:gO,pop:function(e){var t=gS(e),n=gx(e);return function(e){var r=n(e);return function(n){return ev(t(e,n),la(function(e){return[e,r(n)]}))}}},readonlyMap:{URI:gq,map:gj,compact:gD,separate:gN,filter:gF,filterMap:gM,partition:gU,partitionMap:gL},reduce:gH,reduceRight:gZ,reduceRightWithIndex:g0,reduceWithIndex:g$,separate:gN,singleton:function(e,t){return new Map([[e,t]])},size:gf,toMap:function(e){return new Map(e)},toReadonlyArray:gy,toUnfoldable:function(e,t){var n=gy(e);return function(e){var r=n(e),i=r.length;return t.unfold(0,function(e){return e<i?e_([r[e],e+1]):eI})}},union:g6,updateAt:function(e){var t=gb(e);return function(e,n){return t(e,function(){return n})}},upsertAt:gv,values:function(e){return function(t){return Array.from(t.values()).sort(e.compare)}}},Symbol.toStringTag,{value:"Module"}));var g4=function(){return(g4=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},g8=function(e){return function(t){return Array.from(t.keys()).sort(e.compare)}};function g7(e){var t=g8(e);return function(e){return function(n){for(var r=[],i=t(n),o=0;o<i.length;o++){var a=i[o];r.push(e(a,n.get(a)))}return r}}}function ye(e){return g7(e)(function(e,t){return[e,t]})}var yt=function(e){var t=yi(e);return function(e,n){var r=t(e);return function(t){var i=r(t);if(eS(i)){var o=new Map(t);return o.set(e,n),o}if(i.value[1]!==n){var o=new Map(t);return o.set(i.value[0],n),o}return t}}},yn=function(e){var t=yi(e);return function(e){return function(n){var r=t(e,n);if(ew(r)){var i=new Map(n);return i.delete(r.value[0]),i}return n}}},yr=function(e){var t=yi(e);return function(e,n){return function(r){var i=t(e,r);if(eS(i))return eI;var o=new Map(r);return o.set(i.value[0],n(i.value[1])),e_(o)}}};function yi(e){return function(t,n){if(void 0===n){var r=yi(e);return function(e){return r(t,e)}}for(var i,o=n.entries();!(i=o.next()).done;){var a=i.value,u=a[0],s=a[1];if(e.equals(u,t))return e_([u,s])}return eI}}var yo=gS,ya=function(e,t){for(var n,r=new Map,i=e.entries();!(n=i.next()).done;){var o=n.value,a=o[0],u=o[1];r.set(a,t(a,u))}return r},yu=function(e){return function(t){for(var n,r=new Map,i=new Map,o=t.entries();!(n=o.next()).done;){var a=n.value,u=a[0],s=e(u,a[1]);eT(s)?r.set(u,s.left):i.set(u,s.right)}return iK(r,i)}};function ys(e){return function(t){for(var n,r=new Map,i=new Map,o=t.entries();!(n=o.next()).done;){var a=n.value,u=a[0],s=a[1];e(u,s)?i.set(u,s):r.set(u,s)}return iK(r,i)}}var yl=function(e){return function(t){for(var n,r=new Map,i=t.entries();!(n=i.next()).done;){var o=n.value,a=o[0],u=e(a,o[1]);ew(u)&&r.set(a,u.value)}return r}};function yc(e){return function(t){for(var n,r=new Map,i=t.entries();!(n=i.next()).done;){var o=n.value,a=o[0],u=o[1];e(a,u)&&r.set(a,u)}return r}}var yd=function(e,t){return ya(e,function(e,n){return t(n)})},yf=function(e,t){return ym(e,function(e,n){return t(n)})},yp=function(e,t){return yg(e,function(e,n){return t(n)})},yA=function(e,t){return yy(e,function(e,n){return t(n)})},yh=function(e,t){return yv(e,function(e,n){return t(n)})},ym=function(e,t){return ev(e,yc(t))},yg=function(e,t){return ev(e,yl(t))},yy=function(e,t){return ev(e,ys(t))},yv=function(e,t){return ev(e,yu(t))},yx=function(e){for(var t,n=new Map,r=e.entries();!(t=r.next()).done;){var i=t.value,o=i[0],a=i[1];ew(a)&&n.set(o,a.value)}return n},yb=function(e){for(var t,n=new Map,r=new Map,i=e.entries();!(t=i.next()).done;){var o=t.value,a=o[0],u=o[1];eT(u)?n.set(a,u.left):r.set(a,u.right)}return iK(n,r)},yC=function(e,t){var n=yR(e,t);return{concat:function(e,t){return n(t)(e)}}},yS=function(e){return g4(g4({},g1(e)),{URI:"Map"})},yw=function(e){var t=yS(e),n=g8(e),r=function(e){return function(t,r){for(var i=e.of(new Map),o=n(t),a=o.length,u=0;u<a;u++)!function(n){var a=o[n],u=t.get(a);i=e.ap(e.map(i,function(e){return function(t){return e.set(a,t)}}),r(a,u))}(u);return i}};return{URI:"Map",_E:void 0,map:yd,mapWithIndex:ya,reduce:t.reduce,foldMap:t.foldMap,reduceRight:t.reduceRight,reduceWithIndex:t.reduceWithIndex,foldMapWithIndex:t.foldMapWithIndex,reduceRightWithIndex:t.reduceRightWithIndex,traverse:function(e){var t=r(e);return function(e,n){return t(e,function(e,t){return n(t)})}},sequence:function(e){var t=r(e);return function(e){return t(e,function(e,t){return t})}},traverseWithIndex:r}},yI={URI:"Map",map:yd},y_=eH(yI),yT={URI:"Map",compact:yx,separate:yb},yk={URI:"Map",map:yd,compact:yx,separate:yb,filter:yf,filterMap:yp,partition:yA,partitionMap:yh},yO=function(e){return new Map(e)},yR=function(e,t){var n=g6(e,t);return function(e){return function(t){return gp(t)?yO(e):gp(e)?yO(t):n(e)(t)}}},yE=function(e,t){var n=g5(e,t);return function(e){return function(t){return gp(t)||gp(e)?new Map:n(e)(t)}}},yj=function(e){var t=g3(e);return function(e){return function(n){return gp(n)?yO(e):gp(e)?yO(n):t(e)(n)}}};let yF=Object.freeze(Object.defineProperty({__proto__:null,Compactable:yT,Filterable:yk,Functor:yI,URI:"Map",collect:g7,compact:yx,deleteAt:yn,difference:yj,elem:gh,empty:new Map,filter:function(e){return function(t){return yf(t,e)}},filterMap:function(e){return function(t){return yp(t,e)}},filterMapWithIndex:yl,filterWithIndex:yc,flap:y_,foldMap:gG,foldMapWithIndex:gX,fromFoldable:function(e,t,n){return function(r){var i=yi(e);return n.reduce(r,new Map,function(e,n){var r=n[0],o=n[1],a=i(r,e);return ew(a)?e.set(a.value[0],t.concat(a.value[1],o)):e.set(r,o),e})}},getDifferenceMagma:function(e){return function(){var t=yj(e);return{concat:function(e,n){return t(n)(e)}}}},getEq:g_,getFilterableWithIndex:function(){return{URI:"Map",_E:void 0,map:yd,mapWithIndex:ya,compact:yx,separate:yb,filter:yf,filterMap:yp,partition:yA,partitionMap:yh,partitionMapWithIndex:yv,partitionWithIndex:yy,filterMapWithIndex:yg,filterWithIndex:ym}},getFoldable:function(e){return g4(g4({},gJ(e)),{URI:"Map"})},getFoldableWithIndex:yS,getIntersectionSemigroup:function(e,t){var n=yE(e,t);return{concat:function(e,t){return n(t)(e)}}},getMonoid:function(e,t){var n=yi(e);return{concat:function(e,r){if(gp(e))return r;if(gp(r))return e;for(var i,o=new Map(e),a=r.entries();!(i=a.next()).done;){var u=i.value,s=u[0],l=u[1],c=n(s,e);ew(c)?o.set(c.value[0],t.concat(c.value[1],l)):o.set(s,l)}return o},empty:new Map}},getShow:gd,getTraversableWithIndex:yw,getUnionMonoid:function(e,t){return{concat:yC(e,t).concat,empty:new Map}},getUnionSemigroup:yC,getWitherable:function(e){var t=yw(e);return{URI:"Map",_E:void 0,map:yd,compact:yx,separate:yb,filter:yf,filterMap:yp,partition:yA,partitionMap:yh,reduce:t.reduce,foldMap:t.foldMap,reduceRight:t.reduceRight,traverse:t.traverse,sequence:t.sequence,mapWithIndex:ya,reduceWithIndex:t.reduceWithIndex,foldMapWithIndex:t.foldMapWithIndex,reduceRightWithIndex:t.reduceRightWithIndex,traverseWithIndex:t.traverseWithIndex,wilt:iY(t,yT),wither:iH(t,yT)}},insertAt:yt,intersection:yE,isEmpty:gp,isSubmap:gw,keys:g8,lookup:yo,lookupWithKey:yi,map:function(e){return function(t){return yd(t,e)}},mapWithIndex:function(e){return function(t){return ya(t,e)}},map_:yk,member:gA,modifyAt:yr,partition:function(e){return function(t){return yA(t,e)}},partitionMap:function(e){return function(t){return yh(t,e)}},partitionMapWithIndex:yu,partitionWithIndex:ys,pop:function(e){var t=yo(e),n=yn(e);return function(e){var r=n(e);return function(n){return ev(t(e,n),la(function(e){return[e,r(n)]}))}}},reduce:gH,reduceRight:gZ,reduceRightWithIndex:g0,reduceWithIndex:g$,separate:yb,singleton:function(e,t){return new Map([[e,t]])},size:gf,toArray:ye,toUnfoldable:function(e,t){var n=ye(e);return function(e){var r=n(e),i=r.length;return t.unfold(0,function(e){return e<i?e_([r[e],e+1]):eI})}},union:yR,updateAt:function(e){var t=yr(e);return function(e,n){return t(e,function(){return n})}},upsertAt:yt,values:function(e){return function(t){return Array.from(t.values()).sort(e.compare)}}},Symbol.toStringTag,{value:"Module"})),yM=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),yU=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),yL=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),yK=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),yB=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var yP=function(e){return{concat:tF(e).concat,empty:e.top}},yW=function(e){return{concat:tM(e).concat,empty:e.bottom}},yD=function(e){return{concat:tR(e).concat,empty:e.empty}},yN=function(e){var t={};for(var n in e)eK.call(e,n)&&(t[n]=e[n].empty);return{concat:tL(e).concat,empty:t}},yq=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return{concat:tK.apply(tY,e).concat,empty:e.map(function(e){return e.empty})}},yQ=function(e){return tE(e)(e.empty)},yV={concat:tD.concat,empty:void 0},yz={concat:tN.concat,empty:!0},yY={concat:tq.concat,empty:!1},yH={concat:tQ.concat,empty:""},yG={concat:tV.concat,empty:0};let yZ=Object.freeze(Object.defineProperty({__proto__:null,concatAll:yQ,fold:yQ,getDualMonoid:yD,getEndomorphismMonoid:function(){return yD(d3())},getFunctionMonoid:eu,getJoinMonoid:yW,getMeetMonoid:yP,getStructMonoid:yN,getTupleMonoid:yq,max:yW,min:yP,monoidAll:yz,monoidAny:yY,monoidProduct:{concat:tz.concat,empty:1},monoidString:yH,monoidSum:yG,monoidVoid:yV,reverse:yD,struct:yN,tuple:yq},Symbol.toStringTag,{value:"Module"})),yJ=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var y$=function(e,t,n){return function(r){return -1===r?e():0===r?t():n()}},yX=function(e){return -1===e?1:1===e?-1:0},y0={equals:function(e,t){return e===t}},y1={concat:function(e,t){return 0!==e?e:t}},y2={concat:y1.concat,empty:0};let y6=Object.freeze(Object.defineProperty({__proto__:null,Eq:y0,Monoid:y2,Semigroup:y1,eqOrdering:y0,invert:yX,match:y$,matchW:y$,monoidOrdering:y2,reverse:yX,semigroupOrdering:y1,sign:function(e){return e<=-1?-1:e>=1?1:0}},Symbol.toStringTag,{value:"Module"})),y5=Object.freeze(Object.defineProperty({__proto__:null,pipe:ev,pipeable:function(e){var t={};return"function"==typeof e.map&&(t.map=function(t){return function(n){return e.map(n,t)}}),"function"==typeof e.contramap&&(t.contramap=function(t){return function(n){return e.contramap(n,t)}}),"function"==typeof e.mapWithIndex&&(t.mapWithIndex=function(t){return function(n){return e.mapWithIndex(n,t)}}),"function"==typeof e.ap&&(t.ap=function(t){return function(n){return e.ap(n,t)}},t.apFirst=function(t){return function(n){return e.ap(e.map(n,function(e){return function(){return e}}),t)}},t.apSecond=function(t){return function(n){return e.ap(e.map(n,function(){return function(e){return e}}),t)}}),"function"==typeof e.chain&&(t.chain=function(t){return function(n){return e.chain(n,t)}},t.chainFirst=function(t){return function(n){return e.chain(n,function(n){return e.map(t(n),function(){return n})})}},t.flatten=function(t){return e.chain(t,ec)}),"function"==typeof e.bimap&&(t.bimap=function(t,n){return function(r){return e.bimap(r,t,n)}},t.mapLeft=function(t){return function(n){return e.mapLeft(n,t)}}),"function"==typeof e.extend&&(t.extend=function(t){return function(n){return e.extend(n,t)}},t.duplicate=function(t){return e.extend(t,ec)}),"function"==typeof e.reduce&&(t.reduce=function(t,n){return function(r){return e.reduce(r,t,n)}},t.foldMap=function(t){var n=e.foldMap(t);return function(e){return function(t){return n(t,e)}}},t.reduceRight=function(t,n){return function(r){return e.reduceRight(r,t,n)}}),"function"==typeof e.reduceWithIndex&&(t.reduceWithIndex=function(t,n){return function(r){return e.reduceWithIndex(r,t,n)}},t.foldMapWithIndex=function(t){var n=e.foldMapWithIndex(t);return function(e){return function(t){return n(t,e)}}},t.reduceRightWithIndex=function(t,n){return function(r){return e.reduceRightWithIndex(r,t,n)}}),"function"==typeof e.alt&&(t.alt=function(t){return function(n){return e.alt(n,t)}}),"function"==typeof e.compact&&(t.compact=e.compact,t.separate=e.separate),"function"==typeof e.filter&&(t.filter=function(t){return function(n){return e.filter(n,t)}},t.filterMap=function(t){return function(n){return e.filterMap(n,t)}},t.partition=function(t){return function(n){return e.partition(n,t)}},t.partitionMap=function(t){return function(n){return e.partitionMap(n,t)}}),"function"==typeof e.filterWithIndex&&(t.filterWithIndex=function(t){return function(n){return e.filterWithIndex(n,t)}},t.filterMapWithIndex=function(t){return function(n){return e.filterMapWithIndex(n,t)}},t.partitionWithIndex=function(t){return function(n){return e.partitionWithIndex(n,t)}},t.partitionMapWithIndex=function(t){return function(n){return e.partitionMapWithIndex(n,t)}}),"function"==typeof e.promap&&(t.promap=function(t,n){return function(r){return e.promap(r,t,n)}}),"function"==typeof e.compose&&(t.compose=function(t){return function(n){return e.compose(n,t)}}),"function"==typeof e.throwError&&(t.fromOption=function(t){return function(n){return"None"===n._tag?e.throwError(t()):e.of(n.value)}},t.fromEither=function(t){return"Left"===t._tag?e.throwError(t.left):e.of(t.right)},t.fromPredicate=function(t,n){return function(r){return t(r)?e.of(r):e.throwError(n(r))}},t.filterOrElse=function(t,n){return function(r){return e.chain(r,function(r){return t(r)?e.of(r):e.throwError(n(r))})}}),t}},Symbol.toStringTag,{value:"Module"})),y3=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),y9=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var y4=function(){return Math.random()};function y8(e,t){return ev(y4,AO(function(n){return Math.floor((t-e+1)*n+e)}))}var y7=ev(y4,AO(function(e){return e<.5}));let ve=Object.freeze(Object.defineProperty({__proto__:null,random:y4,randomBool:y7,randomElem:function(e){return ev(y8(0,e.length-1),AO(function(t){return e[t]}))},randomInt:y8,randomRange:function(e,t){return ev(y4,AO(function(n){return(t-e)*n+e}))}},Symbol.toStringTag,{value:"Module"}));var vt=dL(fQ),vn=dU(fQ),vr=dK(fN),vi=dB(fN),vo=dG(fN),va=dZ(fZ),vu=dJ(fZ),vs=d2(fN),vl=d$(fZ),vc=dX(fZ),vd=d0(fZ),vf=d1(fN),vp=function(e,t){return ev(e,vv(t))},vA=function(e,t,n){return ev(e,vx(t,n))},vh=function(e,t){return ev(e,vb(t))},vm=function(e,t){return ev(e,vC(t))},vg=function(e,t){return ev(e,vS(t))},vy=function(e,t){return ev(e,vI(t))},vv=dN(fN),vx=dz(fN),vb=dY(fN),vC=dq(fV),vS=dQ(fZ),vw=vS(ec),vI=dV(fZ),v_="ReaderEither",vT=function(e){var t=cP(e);return{URI:v_,_E:void 0,compact:co(fN,t),separate:ca(fN,t,cQ)}};function vk(e){var t=eP(fV,cD(e));return{URI:v_,_E:void 0,map:vp,ap:function(e,n){return ev(e,t(n))},of:vn}}function vO(e){var t=dH(fZ,e);return{URI:v_,_E:void 0,map:vp,alt:function(e,n){return ev(e,t(n))}}}var vR={URI:v_,map:vp},vE=eH(vR),vj={URI:v_,map:vp,ap:vm},vF=eW(vj),vM=eD(vj),vU={URI:v_,map:vp,ap:vm,of:vn},vL={URI:v_,map:vp,ap:vm,chain:vg},vK=e1(vL),vB={URI:v_,fromReader:vr},vP=pe(vB),vW=pt(vB),vD=pn(vB),vN=pr(vB,vL),vq=pi(vB,vL),vQ={URI:v_,fromEither:ed},vV=e5(vQ),vz=e9(vQ),vY=e4(vQ,vL),vH=e7(vQ,vL),vG=te(vQ,vL),vZ=e3(vQ),vJ=tt(vQ,vL),v$=e8(vQ),vX=vn(eL),v0=eG(vR),v1=e2(vL),v2=eN(vj),v6=vn(eU),v5=function(e){return em(f6(e),fk(dk(ex)))},v3=function(e){var t=v5(e);return function(e){return ej(e)?t(e):v6}},v9=function(e){return v3(function(t,n){return e(n)})},v4=v9(ec),v8=eq(vj),v7=e$(vU);let xe=Object.freeze(Object.defineProperty({__proto__:null,Alt:{URI:v_,map:vp,alt:vy},ApT:v6,Applicative:vU,Apply:vj,Bifunctor:{URI:v_,bimap:vA,mapLeft:vh},Chain:vL,Do:vX,FromEither:vQ,FromReader:vB,Functor:vR,Monad:{URI:v_,map:vp,ap:vm,of:vn,chain:vg},MonadThrow:{URI:v_,map:vp,ap:vm,of:vn,chain:vg,throwError:vt},Pointed:{URI:v_,of:vn},URI:v_,alt:vI,altW:vI,ap:vC,apFirst:vF,apFirstW:vF,apS:v2,apSW:v2,apSecond:vM,apSecondW:vM,apW:vC,ask:vP,asks:vW,asksReaderEither:fC,asksReaderEitherW:fC,bimap:vx,bind:v1,bindTo:v0,bindW:v1,chain:vS,chainEitherK:vH,chainEitherKW:vH,chainFirst:vK,chainFirstEitherK:vG,chainFirstEitherKW:vG,chainFirstReaderK:vq,chainFirstReaderKW:vq,chainFirstW:vK,chainOptionK:vY,chainReaderK:vN,chainReaderKW:vN,chainW:vS,filterOrElse:vJ,filterOrElseW:vJ,flap:vE,flatten:vw,flattenW:vw,fold:va,foldW:va,fromEither:ed,fromEitherK:v$,fromOption:vV,fromOptionK:vz,fromPredicate:vZ,fromReader:vr,fromReaderK:vD,getAltReaderValidation:vO,getApplicativeReaderValidation:vk,getApplyMonoid:v7,getApplySemigroup:v8,getCompactable:vT,getFilterable:function(e){var t=cW(e),n=vT(e),r=fe(fN,t),i=ft(fN,t),o=fn(fN,t),a=fr(fN,t);return{URI:v_,_E:void 0,map:vp,compact:n.compact,separate:n.separate,filter:function(e,t){return ev(e,r(t))},filterMap:function(e,t){return ev(e,i(t))},partition:function(e,t){return ev(e,o(t))},partitionMap:function(e,t){return ev(e,a(t))}}},getOrElse:vu,getOrElseW:vu,getReaderValidation:function(e){var t=vk(e),n=vO(e);return{URI:v_,_E:void 0,map:vp,ap:t.ap,of:vn,chain:vg,bimap:vA,mapLeft:vh,alt:n.alt,throwError:vt}},getSemigroup:function(e){return eq(fV)(cB(e))},left:vt,leftReader:vi,local:fb,map:vv,mapLeft:vb,match:vo,matchE:va,matchEW:va,matchW:vo,of:vn,orElse:vl,orElseFirst:vc,orElseFirstW:vc,orElseW:vl,orLeft:vd,readerEither:{URI:v_,bimap:vA,mapLeft:vh,map:vp,of:vn,ap:vm,chain:vg,alt:vy,throwError:vt},right:vn,rightReader:vr,sequenceArray:v4,swap:vf,throwError:vt,toUnion:vs,traverseArray:v9,traverseArrayWithIndex:v3,traverseReadonlyArrayWithIndex:v3,traverseReadonlyNonEmptyArrayWithIndex:v5},Symbol.toStringTag,{value:"Module"}));function xt(e){return function(t){return function(){return e.of(t)}}}function xn(e){return function(t){return function(n){return function(r){return e.map(n(r),t)}}}}function xr(e){return function(t){return function(n){return function(r){return e.ap(n(r),t(r))}}}}function xi(e){return function(t){return function(n){return function(r){return e.chain(n(r),function(e){return t(e)(r)})}}}}function xo(e){return function(t){return em(t,e.of)}}let xa=Object.freeze(Object.defineProperty({__proto__:null,ap:xr,chain:xi,fromNaturalTransformation:function(e){return function(t){return em(t,e)}},fromReader:xo,getReaderM:function(e){var t=xr(e),n=xn(e),r=xi(e);return{map:function(e,t){return ev(e,n(t))},ap:function(e,n){return ev(e,t(n))},of:xt(e),chain:function(e,t){return ev(e,r(t))},ask:function(){return e.of},asks:function(t){return em(t,e.of)},local:function(e,t){return function(n){return e(t(n))}},fromReader:xo(e),fromM:function(e){return function(){return e}}}},map:xn,of:xt},Symbol.toStringTag,{value:"Module"}));var xu=function(e){return function(){return Promise.resolve().then(e)}},xs=function(e,t){return ev(e,xf(t))},xl=function(e,t){return ev(e,xp(t))},xc=function(e,t){return ev(e,xh(function(e){return ev(t,xf(e))}))},xd=function(e,t){return ev(e,xh(t))},xf=function(e){return function(t){return function(){return Promise.resolve().then(t).then(e)}}},xp=function(e){return function(t){return function(){return Promise.all([Promise.resolve().then(t),Promise.resolve().then(e)]).then(function(e){return(0,e[0])(e[1])})}}},xA=function(e){return function(){return Promise.resolve(e)}},xh=function(e){return function(t){return function(){return Promise.resolve().then(t).then(function(t){return e(t)()})}}},xm=xh(ec),xg="Task",xy={URI:xg,map:xs},xv=eH(xy),xx={URI:xg,of:xA},xb={URI:xg,map:xs,ap:xl},xC=eW(xb),xS=eD(xb),xw={URI:xg,map:xs,ap:xl,of:xA},xI={URI:xg,map:xs,ap:xc},x_={URI:xg,map:xs,ap:xc,of:xA},xT={URI:xg,map:xs,ap:xl,chain:xd},xk={URI:xg,map:xs,of:xA,ap:xl,chain:xd},xO=e1(xT),xR={URI:xg,fromIO:xu},xE=fm(xR),xj=fg(xR,xT),xF=fy(xR,xT),xM=function(){return new Promise(function(e){})},xU=xA(eL),xL=eG(xy),xK=e2(xT),xB=eN(xb),xP=xA(eU),xW=function(e){return function(t){return function(){return Promise.all(t.map(function(t,n){return Promise.resolve().then(function(){return e(n,t)()})}))}}},xD=function(e){var t=xW(e);return function(e){return ej(e)?t(e):xP}},xN=function(e){return function(t){return function(){return eM(t).reduce(function(t,n,r){return t.then(function(t){return Promise.resolve().then(e(r+1,n)).then(function(e){return t.push(e),t})})},Promise.resolve().then(e(0,eF(t))).then(eE))}}},xq=function(e){var t=xN(e);return function(e){return ej(e)?t(e):xP}},xQ=function(e){return xD(function(t,n){return e(n)})},xV=xQ(ec),xz=function(e){return xq(function(t,n){return e(n)})},xY=xz(ec),xH=eq(xI),xG=e$(x_);let xZ=Object.freeze(Object.defineProperty({__proto__:null,ApT:xP,ApplicativePar:xw,ApplicativeSeq:x_,ApplyPar:xb,ApplySeq:xI,Chain:xT,Do:xU,FromIO:xR,FromTask:{URI:xg,fromIO:xu,fromTask:ec},Functor:xy,Monad:xk,MonadIO:{URI:xg,map:xs,of:xA,ap:xl,chain:xd,fromIO:xu},MonadTask:{URI:xg,map:xs,of:xA,ap:xl,chain:xd,fromIO:xu,fromTask:ec},Pointed:xx,URI:xg,ap:xp,apFirst:xC,apS:xB,apSecond:xS,bind:xK,bindTo:xL,chain:xh,chainFirst:xO,chainFirstIOK:xF,chainIOK:xj,delay:function(e){return function(t){return function(){return new Promise(function(n){setTimeout(function(){Promise.resolve().then(t).then(n)},e)})}}},flap:xv,flatten:xm,fromIO:xu,fromIOK:xE,fromTask:ec,getMonoid:xG,getRaceMonoid:function(){return{concat:function(e,t){return function(){return Promise.race([Promise.resolve().then(e),Promise.resolve().then(t)])}},empty:xM}},getSemigroup:xH,map:xf,never:xM,of:xA,sequenceArray:xV,sequenceSeqArray:xY,task:{URI:xg,map:xs,of:xA,ap:xl,chain:xd,fromIO:xu,fromTask:ec},taskSeq:{URI:xg,map:xs,of:xA,ap:xc,chain:xd,fromIO:xu,fromTask:ec},traverseArray:xQ,traverseArrayWithIndex:xD,traverseReadonlyArrayWithIndex:xD,traverseReadonlyArrayWithIndexSeq:xq,traverseReadonlyNonEmptyArrayWithIndex:xW,traverseReadonlyNonEmptyArrayWithIndexSeq:xN,traverseSeqArray:xz,traverseSeqArrayWithIndex:xq},Symbol.toStringTag,{value:"Module"}));var xJ=xo(xx),x$=em(xu,ed),xX=function(e,t){return ev(e,x6(t))},x0=function(e,t){return ev(e,x5(t))},x1=function(e,t){return ev(e,x9(function(e){return ev(t,x6(e))}))},x2=function(e,t){return ev(e,x9(t))},x6=xn(xy),x5=xr(xb),x3=xt(xx),x9=xi(xk),x4=x9(ec),x8="ReaderTask",x7={URI:x8,map:xX},be=eH(x7),bt={URI:x8,of:x3},bn={URI:x8,map:xX,ap:x0},br=eW(bn),bi=eD(bn),bo={URI:x8,map:xX,ap:x1},ba={URI:x8,map:xX,ap:x1,of:x3},bu={URI:x8,map:xX,ap:x0,chain:x2},bs={URI:x8,map:xX,of:x3,ap:x0,chain:x2},bl=e1(bu),bc={URI:x8,fromIO:x$},bd=fm(bc),bf=fg(bc,bu),bp=fy(bc,bu),bA={URI:x8,fromReader:xJ},bh=pe(bA),bm=pt(bA),bg=pn(bA),by=pr(bA,bu),bv=pi(bA,bu),bx={URI:x8,fromIO:x$,fromTask:ed},bb=pN(bx),bC=pq(bx,bu),bS=pQ(bx,bu),bw=x3(eL),bI=eG(x7),b_=e2(bu),bT=eN(bn),bk=x3(eU),bO=function(e){return em(f6(e),fk(xW(ex)))},bR=function(e){var t=bO(e);return function(e){return ej(e)?t(e):bk}},bE=function(e){return em(f6(e),fk(xN(ex)))},bj=function(e){var t=bE(e);return function(e){return ej(e)?t(e):bk}},bF=function(e){return bR(function(t,n){return e(n)})},bM=bF(ec),bU=function(e){return bj(function(t,n){return e(n)})},bL=bU(ec),bK=eq(bo),bB=e$(ba);let bP=Object.freeze(Object.defineProperty({__proto__:null,ApT:bk,ApplicativePar:{URI:x8,map:xX,ap:x0,of:x3},ApplicativeSeq:ba,ApplyPar:bn,ApplySeq:bo,Chain:bu,Do:bw,FromIO:bc,FromReader:bA,FromTask:bx,Functor:x7,Monad:bs,MonadIO:{URI:x8,map:xX,of:x3,ap:x0,chain:x2,fromIO:x$},MonadTask:{URI:x8,map:xX,of:x3,ap:x0,chain:x2,fromIO:x$,fromTask:ed},Pointed:bt,URI:x8,ap:x5,apFirst:br,apS:bT,apSW:bT,apSecond:bi,apW:x5,ask:bh,asks:bm,asksReaderTask:fC,asksReaderTaskW:fC,bind:b_,bindTo:bI,bindW:b_,chain:x9,chainFirst:bl,chainFirstIOK:bp,chainFirstReaderK:bv,chainFirstReaderKW:bv,chainFirstTaskK:bS,chainFirstW:bl,chainIOK:bf,chainReaderK:by,chainReaderKW:by,chainTaskK:bC,chainW:x9,flap:be,flatten:x4,flattenW:x4,fromIO:x$,fromIOK:bd,fromReader:xJ,fromReaderK:bg,fromTask:ed,fromTaskK:bb,getMonoid:bB,getSemigroup:bK,local:fb,map:x6,of:x3,readerTask:{URI:x8,map:xX,of:x3,ap:x0,chain:x2,fromIO:x$,fromTask:ed},readerTaskSeq:{URI:x8,map:xX,of:x3,ap:x1,chain:x2,fromIO:x$,fromTask:ed},run:function(e,t){return e(t)()},sequenceArray:bM,sequenceSeqArray:bL,traverseArray:bF,traverseArrayWithIndex:bR,traverseReadonlyArrayWithIndex:bR,traverseReadonlyArrayWithIndexSeq:bj,traverseReadonlyNonEmptyArrayWithIndex:bO,traverseReadonlyNonEmptyArrayWithIndexSeq:bE,traverseSeqArray:bU,traverseSeqArrayWithIndex:bj},Symbol.toStringTag,{value:"Module"}));var bW=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},bD=dL(xx),bN=dU(xx),bq=dK(xy),bQ=dB(xy),bV=em(xu,bq),bz=em(xu,bQ),bY=function(e){return xf(dn(e))},bH=dG(xy),bG=dZ(xk),bZ=dJ(xk),bJ=function(e,t){return function(){var n,r,i,o;return n=void 0,r=void 0,i=void 0,o=function(){return bW(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,e().then(eR)];case 1:return[2,n.sent()];case 2:return[2,eO(t(n.sent()))];case 3:return[2]}})},new(i||(i=Promise))(function(e,t){function a(e){try{s(o.next(e))}catch(e){t(e)}}function u(e){try{s(o.throw(e))}catch(e){t(e)}}function s(t){var n;t.done?e(t.value):((n=t.value)instanceof i?n:new i(function(e){e(n)})).then(a,u)}s((o=o.apply(n,r||[])).next())})}},b$=d2(xy),bX=dP(xx),b0=dW(xx),b1=dD(xk),b2=d$(xk),b6=dX(xk),b5=d0(xk),b3=d1(xy),b9=function(e){var t=bY(e);return function(e){return em(e,t)}},b4=function(e){return function(t){return function(n){return ev(n,Cd(b9(e)(t)))}}},b8=function(e){return em(e,xu)},b7=function(e){return Cf(b8(e))},Ce=function(e,t){return ev(e,Cu(t))},Ct=function(e,t){return ev(e,Cc(t))},Cn=function(e,t){return ev(e,Cd(function(e){return ev(t,Cu(e))}))},Cr=function(e,t){return ev(e,Cd(t))},Ci=function(e,t,n){return ev(e,Cs(t,n))},Co=function(e,t){return ev(e,Cl(t))},Ca=function(e,t){return ev(e,CA(t))},Cu=dN(xy),Cs=dz(xy),Cl=dY(xy),Cc=dq(xb),Cd=dQ(xk),Cf=Cd,Cp=Cf(ec),CA=dV(xk),Ch="TaskEither";function Cm(e,t){var n=eP(e,cD(t));return{URI:Ch,_E:void 0,map:Ce,ap:function(e,t){return ev(e,n(t))},of:bN}}function Cg(e){var t=dH(xk,e);return{URI:Ch,_E:void 0,map:Ce,alt:function(e,n){return ev(e,t(n))}}}var Cy=function(e){var t=cP(e);return{URI:Ch,_E:void 0,compact:co(xy,t),separate:ca(xy,t,cQ)}},Cv={URI:Ch,map:Ce},Cx=eH(Cv),Cb={URI:Ch,map:Ce,ap:Ct},CC=eW(Cb),CS=eD(Cb),Cw={URI:Ch,map:Ce,ap:Cn},CI={URI:Ch,map:Ce,ap:Cn,of:bN},C_={URI:Ch,map:Ce,ap:Ct,chain:Cr},CT=e1(C_),Ck={URI:Ch,fromEither:xA},CO=e5(Ck),CR=e9(Ck),CE=e4(Ck,C_),Cj=e7(Ck,C_),CF=te(Ck,C_),CM=e3(Ck),CU=tt(Ck,C_),CL=e8(Ck),CK={URI:Ch,fromIO:bV},CB=fm(CK),CP=fg(CK,C_),CW=fy(CK,C_),CD={URI:Ch,fromIO:bV,fromTask:bq},CN=pN(CD),Cq=pq(CD,C_),CQ=pQ(CD,C_),CV=function(e,t,n){return ev(e,Cf(function(e){return ev(t(e),xh(function(t){return ev(n(e,t),Cf(function(){return xA(t)}))}))}))},Cz=bN(eL),CY=eG(Cv),CH=e2(C_),CG=eN(Cb),CZ=bN(eU),CJ=function(e){return em(xW(e),xf(dk(ex)))},C$=function(e){var t=CJ(e);return function(e){return ej(e)?t(e):CZ}},CX=function(e){return function(t){return function(){return eM(t).reduce(function(t,n,r){return t.then(function(i){return eT(i)?t:e(r+1,n)().then(function(e){return eT(e)?e:(i.right.push(e.right),i)})})},e(0,eF(t))().then(cq(eE)))}}},C0=function(e){var t=CX(e);return function(e){return ej(e)?t(e):CZ}},C1=function(e){return C$(function(t,n){return e(n)})},C2=C1(ec),C6=function(e){return C0(function(t,n){return e(n)})},C5=C6(ec),C3=eq(Cw),C9=e$(CI);let C4=Object.freeze(Object.defineProperty({__proto__:null,Alt:{URI:Ch,map:Ce,alt:Ca},ApT:CZ,ApplicativePar:{URI:Ch,map:Ce,ap:Ct,of:bN},ApplicativeSeq:CI,ApplyPar:Cb,ApplySeq:Cw,Bifunctor:{URI:Ch,bimap:Ci,mapLeft:Co},Chain:C_,Do:Cz,FromEither:Ck,FromIO:CK,FromTask:CD,Functor:Cv,Monad:{URI:Ch,map:Ce,ap:Ct,chain:Cr,of:bN},MonadIO:{URI:Ch,map:Ce,ap:Ct,chain:Cr,of:bN,fromIO:bV},MonadTask:{URI:Ch,map:Ce,ap:Ct,chain:Cr,of:bN,fromIO:bV,fromTask:bq},MonadThrow:{URI:Ch,map:Ce,ap:Ct,chain:Cr,of:bN,throwError:bD},Pointed:{URI:Ch,of:bN},URI:Ch,alt:CA,altW:CA,ap:Cc,apFirst:CC,apFirstW:CC,apS:CG,apSW:CG,apSecond:CS,apSecondW:CS,apW:Cc,bimap:Cs,bind:CH,bindTo:CY,bindW:CH,bracket:function(e,t,n){return CV(e,t,n)},bracketW:CV,chain:Cd,chainEitherK:Cj,chainEitherKW:Cj,chainFirst:CT,chainFirstEitherK:CF,chainFirstEitherKW:CF,chainFirstIOK:CW,chainFirstTaskK:CQ,chainFirstW:CT,chainIOEitherK:b7,chainIOEitherKW:b7,chainIOK:CP,chainNullableK:b1,chainOptionK:CE,chainTaskK:Cq,chainTaskOptionK:b4,chainTaskOptionKW:b4,chainW:Cf,filterOrElse:CU,filterOrElseW:CU,flap:Cx,flatten:Cp,flattenW:Cp,fold:bG,foldW:bG,fromEither:xA,fromEitherK:CL,fromIO:bV,fromIOEither:xu,fromIOEitherK:b8,fromIOK:CB,fromNullable:bX,fromNullableK:b0,fromOption:CO,fromOptionK:CR,fromPredicate:CM,fromTask:bq,fromTaskK:CN,fromTaskOption:bY,fromTaskOptionK:b9,getAltTaskValidation:Cg,getApplicativeTaskValidation:Cm,getApplyMonoid:C9,getApplySemigroup:C3,getCompactable:Cy,getFilterable:function(e){var t=cW(e),n=Cy(e),r=fe(xy,t),i=ft(xy,t),o=fn(xy,t),a=fr(xy,t);return{URI:Ch,_E:void 0,map:Ce,compact:n.compact,separate:n.separate,filter:function(e,t){return ev(e,r(t))},filterMap:function(e,t){return ev(e,i(t))},partition:function(e,t){return ev(e,o(t))},partitionMap:function(e,t){return ev(e,a(t))}}},getOrElse:bZ,getOrElseW:bZ,getSemigroup:function(e){return eq(xI)(cB(e))},getTaskValidation:function(e){var t=Cm(xw,e),n=Cg(e);return{URI:Ch,_E:void 0,map:Ce,ap:t.ap,of:bN,chain:Cr,bimap:Ci,mapLeft:Co,alt:n.alt,fromIO:bV,fromTask:bq,throwError:bD}},left:bD,leftIO:bz,leftTask:bQ,map:Cu,mapLeft:Cl,match:bH,matchE:bG,matchEW:bG,matchW:bH,of:bN,orElse:b2,orElseFirst:b6,orElseFirstIOK:function(e){return b6(CB(e))},orElseFirstTaskK:function(e){return b6(CN(e))},orElseFirstW:b6,orElseW:b2,orLeft:b5,right:bN,rightIO:bV,rightTask:bq,sequenceArray:C2,sequenceSeqArray:C5,swap:b3,taskEither:{URI:Ch,bimap:Ci,mapLeft:Co,map:Ce,of:bN,ap:Ct,chain:Cr,alt:Ca,fromIO:bV,fromTask:bq,throwError:bD},taskEitherSeq:{URI:Ch,bimap:Ci,mapLeft:Co,map:Ce,of:bN,ap:Cn,chain:Cr,alt:Ca,fromIO:bV,fromTask:bq,throwError:bD},taskify:function(e){return function(){var t=Array.prototype.slice.call(arguments);return function(){return new Promise(function(n){e.apply(null,t.concat(function(e,t){return null!=e?n(eO(e)):n(eR(t))}))})}}},throwError:bD,toUnion:b$,traverseArray:C1,traverseArrayWithIndex:C$,traverseReadonlyArrayWithIndex:C$,traverseReadonlyArrayWithIndexSeq:C0,traverseReadonlyNonEmptyArrayWithIndex:CJ,traverseReadonlyNonEmptyArrayWithIndexSeq:CX,traverseSeqArray:C6,traverseSeqArrayWithIndex:C0,tryCatch:bJ,tryCatchK:function(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return bJ(function(){return e.apply(void 0,n)},t)}}},Symbol.toStringTag,{value:"Module"}));var C8=dL(bt),C7=dU(bt),Se=em(bq,ed),St=em(bQ,ed),Sn=function(e){return em(e,bN)},Sr=function(e){return em(e,bD)},Si=dK(x7),So=dB(x7),Sa=em(bV,ed),Su=em(bz,ed),Ss=em(xu,ed),Sl=function(e){return em(e,xA)},Sc=dG(x7),Sd=dZ(bu),Sf=dJ(bs),Sp=d2(x7),SA=dP(bt),Sh=dW(bt),Sm=dD(bs),Sg=d$(bs),Sy=dX(bs),Sv=d0(bs),Sx=d1(x7),Sb=function(e){return em(e,Ss)},SC=function(e){return SD(Sb(e))},SS=function(e){return em(e,ed)},Sw=function(e){return SD(SS(e))},SI=function(e){return S5(SS(e))},S_=function(e){return em(e,Sl)},ST=function(e){return SD(S_(e))},Sk=function(e){return S5(S_(e))},SO=function(e,t){return ev(e,SL(t))},SR=function(e,t){return ev(e,SP(t))},SE=function(e,t){return ev(e,SW(function(e){return ev(t,SL(e))}))},Sj=function(e,t){return ev(e,SW(t))},SF=function(e,t){return ev(e,Sq(t))},SM=function(e,t,n){return ev(e,SK(t,n))},SU=function(e,t){return ev(e,SB(t))},SL=dN(x7),SK=dz(x7),SB=dY(x7),SP=dq(bn),SW=dQ(bs),SD=SW,SN=SD(ec),Sq=dV(bs),SQ="ReaderTaskEither",SV=function(e){var t=cP(e);return{URI:SQ,_E:void 0,compact:co(x7,t),separate:ca(x7,t,cQ)}};function Sz(e,t){var n=eP(fV,Cm(e,t));return{URI:SQ,_E:void 0,map:SO,ap:function(e,t){return ev(e,n(t))},of:C7}}function SY(e){var t=dH(bs,e);return{URI:SQ,_E:void 0,map:SO,alt:function(e,n){return ev(e,t(n))}}}var SH={URI:SQ,map:SO},SG=eH(SH),SZ={URI:SQ,of:C7},SJ={URI:SQ,map:SO,ap:SR},S$=eW(SJ),SX=eD(SJ),S0={URI:SQ,map:SO,ap:SE},S1={URI:SQ,map:SO,ap:SE,of:C7},S2={URI:SQ,map:SO,ap:SR,chain:Sj},S6=e1(S2),S5=S6,S3={URI:SQ,fromReader:Sn},S9=pe(S3),S4=pt(S3),S8=pn(S3),S7=pr(S3,S2),we=pi(S3,S2),wt=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return Si(e.apply(void 0,t))}},wn=function(e){return SD(wt(e))},wr=function(e){return S5(wt(e))},wi={URI:SQ,fromEither:x3},wo=e5(wi),wa=e9(wi),wu=e4(wi,S2),ws=e7(wi,S2),wl=te(wi,S2),wc=e3(wi),wd=tt(wi,S2),wf=e8(wi),wp={URI:SQ,fromIO:Sa},wA=fm(wp),wh=fg(wp,S2),wm=fy(wp,S2),wg={URI:SQ,fromIO:Sa,fromTask:Se},wy=pN(wg),wv=pq(wg,S2),wx=pQ(wg,S2);function wb(e,t,n){return function(r){return CV(e(r),function(e){return t(e)(r)},function(e,t){return n(e,t)(r)})}}var wC=C7(eL),wS=eG(SH),ww=e2(S2),wI=eN(SJ),w_=C7(eU),wT=function(e){return em(f6(e),fk(CJ(ex)))},wk=function(e){var t=wT(e);return function(e){return ej(e)?t(e):w_}},wO=function(e){return em(f6(e),fk(CX(ex)))},wR=function(e){var t=wO(e);return function(e){return ej(e)?t(e):w_}},wE=function(e){return wk(function(t,n){return e(n)})},wj=wE(ec),wF=function(e){return wR(function(t,n){return e(n)})},wM=wF(ec),wU=eq(S0),wL=e$(S1);let wK=Object.freeze(Object.defineProperty({__proto__:null,Alt:{URI:SQ,map:SO,alt:SF},ApT:w_,ApplicativePar:{URI:SQ,map:SO,ap:SR,of:C7},ApplicativeSeq:S1,ApplyPar:SJ,ApplySeq:S0,Bifunctor:{URI:SQ,bimap:SM,mapLeft:SU},Chain:S2,Do:wC,FromEither:wi,FromIO:wp,FromReader:S3,FromTask:wg,Functor:SH,Monad:{URI:SQ,map:SO,ap:SR,chain:Sj,of:C7},MonadIO:{URI:SQ,map:SO,ap:SR,chain:Sj,of:C7,fromIO:Sa},MonadTask:{URI:SQ,map:SO,ap:SR,chain:Sj,of:C7,fromIO:Sa,fromTask:Se},MonadThrow:{URI:SQ,map:SO,ap:SR,chain:Sj,of:C7,throwError:C8},Pointed:SZ,URI:SQ,alt:Sq,altW:Sq,ap:SP,apFirst:S$,apFirstW:S$,apS:wI,apSW:wI,apSecond:SX,apSecondW:SX,apW:SP,ask:S9,asks:S4,asksReaderTaskEither:fC,asksReaderTaskEitherW:fC,bimap:SK,bind:ww,bindTo:wS,bindW:ww,bracket:function(e,t,n){return wb(e,t,n)},bracketW:wb,chain:SW,chainEitherK:ws,chainEitherKW:ws,chainFirst:S6,chainFirstEitherK:wl,chainFirstEitherKW:wl,chainFirstIOK:wm,chainFirstReaderEitherK:Sk,chainFirstReaderEitherKW:Sk,chainFirstReaderK:we,chainFirstReaderKW:we,chainFirstReaderTaskK:wr,chainFirstReaderTaskKW:wr,chainFirstTaskEitherK:SI,chainFirstTaskEitherKW:SI,chainFirstTaskK:wx,chainFirstW:S5,chainIOEitherK:SC,chainIOEitherKW:SC,chainIOK:wh,chainNullableK:Sm,chainOptionK:wu,chainReaderEitherK:ST,chainReaderEitherKW:ST,chainReaderK:S7,chainReaderKW:S7,chainReaderTaskK:wn,chainReaderTaskKW:wn,chainTaskEitherK:Sw,chainTaskEitherKW:Sw,chainTaskK:wv,chainW:SD,filterOrElse:wd,filterOrElseW:wd,flap:SG,flatten:SN,flattenW:SN,fold:Sd,foldW:Sd,fromEither:x3,fromEitherK:wf,fromIO:Sa,fromIOEither:Ss,fromIOEitherK:Sb,fromIOK:wA,fromNullable:SA,fromNullableK:Sh,fromOption:wo,fromOptionK:wa,fromPredicate:wc,fromReader:Sn,fromReaderEither:Sl,fromReaderEitherK:S_,fromReaderK:S8,fromReaderTaskK:wt,fromTask:Se,fromTaskEither:ed,fromTaskEitherK:SS,fromTaskK:wy,getAltReaderTaskValidation:SY,getApplicativeReaderTaskValidation:Sz,getApplyMonoid:wL,getApplySemigroup:wU,getCompactable:SV,getFilterable:function(e){var t=cW(e),n=SV(e),r=fe(x7,t),i=ft(x7,t),o=fn(x7,t),a=fr(x7,t);return{URI:SQ,_E:void 0,map:SO,compact:n.compact,separate:n.separate,filter:function(e,t){return ev(e,r(t))},filterMap:function(e,t){return ev(e,i(t))},partition:function(e,t){return ev(e,o(t))},partitionMap:function(e,t){return ev(e,a(t))}}},getOrElse:Sf,getOrElseW:Sf,getReaderTaskValidation:function(e){var t=Sz(xw,e),n=SY(e);return{URI:SQ,_E:void 0,map:SO,of:C7,chain:Sj,bimap:SM,mapLeft:SU,ap:t.ap,alt:n.alt,fromIO:Sa,fromTask:Se,throwError:C8}},getSemigroup:function(e){return eq(bo)(cB(e))},left:C8,leftIO:Su,leftReader:Sr,leftReaderTask:So,leftTask:St,local:fb,map:SL,mapLeft:SB,match:Sc,matchE:Sd,matchEW:Sd,matchW:Sc,of:C7,orElse:Sg,orElseFirst:Sy,orElseFirstW:Sy,orElseW:Sg,orLeft:Sv,readerTaskEither:{URI:SQ,map:SO,of:C7,ap:SR,chain:Sj,alt:SF,bimap:SM,mapLeft:SU,fromIO:Sa,fromTask:Se,throwError:C8},readerTaskEitherSeq:{URI:SQ,map:SO,of:C7,ap:SE,chain:Sj,alt:SF,bimap:SM,mapLeft:SU,fromIO:Sa,fromTask:Se,throwError:C8},right:C7,rightIO:Sa,rightReader:Sn,rightReaderTask:Si,rightTask:Se,run:function(e,t){return e(t)()},sequenceArray:wj,sequenceSeqArray:wM,swap:Sx,throwError:C8,toUnion:Sp,traverseArray:wE,traverseArrayWithIndex:wk,traverseReadonlyArrayWithIndex:wk,traverseReadonlyArrayWithIndexSeq:wR,traverseReadonlyNonEmptyArrayWithIndex:wT,traverseReadonlyNonEmptyArrayWithIndexSeq:wO,traverseSeqArray:wF,traverseSeqArrayWithIndex:wR},Symbol.toStringTag,{value:"Module"}));var wB={equals:function(e,t){return e===t}},wP={concat:function(e,t){return e+t}},wW={concat:wP.concat,empty:""},wD={equals:wB.equals,compare:function(e,t){return e<t?-1:e>t?1:0}};let wN=Object.freeze(Object.defineProperty({__proto__:null,Eq:wB,Monoid:wW,Ord:wD,Semigroup:wP,Show:{show:function(e){return JSON.stringify(e)}},empty:"",endsWith:function(e,t){return function(n){return n.endsWith(e,t)}},includes:function(e,t){return function(n){return n.includes(e,t)}},isEmpty:function(e){return 0===e.length},isString:function(e){return"string"==typeof e},replace:function(e,t){return function(n){return n.replace(e,t)}},size:function(e){return e.length},slice:function(e,t){return function(n){return n.slice(e,t)}},split:function(e){return function(t){var n=t.split(e);return ej(n)?n:[t]}},startsWith:function(e,t){return function(n){return n.startsWith(e,t)}},toLowerCase:function(e){return e.toLowerCase()},toUpperCase:function(e){return e.toUpperCase()},trim:function(e){return e.trim()},trimLeft:function(e){return e.trimLeft()},trimRight:function(e){return e.trimRight()}},Symbol.toStringTag,{value:"Module"}));var wq=function(e){return Object.keys(e).length},wQ=function(e){for(var t in e)if(eK.call(e,t))return!1;return!0},wV=function(e){return function(t){return Object.keys(t).sort(e.compare)}},wz=wV(wD);function wY(e){if("function"==typeof e)return wY(wD)(e);var t=wV(e);return function(e){return function(n){for(var r=[],i=0,o=t(n);i<o.length;i++){var a=o[i];r.push(e(a,n[a]))}return r}}}var wH=wY(wD)(function(e,t){return[e,t]}),wG=function(e,t){return function(n){if(eK.call(n,e)&&n[e]===t)return n;var r=Object.assign({},n);return r[e]=t,r}},wZ=function(e,t){return eK.call(t,e)};function wJ(e){return function(t){if(!eK.call(t,e))return t;var n=Object.assign({},t);return delete n[e],n}}function w$(e){return function(t,n){if(void 0===n){var r=w$(e);return function(e){return r(e,t)}}for(var i in t)if(!eK.call(n,i)||!e.equals(t[i],n[i]))return!1;return!0}}function wX(e,t){return void 0===t?function(t){return wX(e,t)}:eK.call(t,e)?e_(t[e]):eI}var w0={};function w1(e){return function(t){var n={};for(var r in t)eK.call(t,r)&&(n[r]=e(r,t[r]));return n}}function w2(e){return w1(function(t,n){return e(n)})}function w6(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(2===e.length)return w6(wD).apply(void 0,e);var n=wV(e[0]);return function(e,t){return function(r){for(var i=e,o=n(r),a=o.length,u=0;u<a;u++){var s=o[u];i=t(s,i,r[s])}return i}}}function w5(e){if("compare"in e){var t=wV(e);return function(e){return function(n){return function(r){for(var i=e.empty,o=t(r),a=o.length,u=0;u<a;u++){var s=o[u];i=e.concat(i,n(s,r[s]))}return i}}}}return w5(wD)(e)}function w3(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(2===e.length)return w3(wD).apply(void 0,e);var n=wV(e[0]);return function(e,t){return function(r){for(var i=e,o=n(r),a=o.length,u=a-1;u>=0;u--){var s=o[u];i=t(s,r[s],i)}return i}}}var w9=function(e,t){var n;return(n={})[e]=t,n};function w4(e){var t=IR(wD)(e);return function(e){return function(n){return t(n,e)}}}function w8(e){var t=Ik(wD)(e);return function(e){return function(n){return t(n,e)}}}function w7(e){return IO(wD)(e)}function Ie(e){return function(t){var n={},r={};for(var i in t)if(eK.call(t,i)){var o=e(i,t[i]);switch(o._tag){case"Left":n[i]=o.left;break;case"Right":r[i]=o.right}}return iK(n,r)}}function It(e){return function(t){var n={},r={};for(var i in t)if(eK.call(t,i)){var o=t[i];e(i,o)?r[i]=o:n[i]=o}return iK(n,r)}}function In(e){return function(t){var n={};for(var r in t)if(eK.call(t,r)){var i=e(r,t[r]);ew(i)&&(n[r]=i.value)}return n}}function Ir(e){return function(t){var n={},r=!1;for(var i in t)if(eK.call(t,i)){var o=t[i];e(i,o)?n[i]=o:r=!0}return r?n:t}}function Ii(e,t){var n=Io(e,t);return function(e){return n(e,ec)}}function Io(e,t){return function(n,r){return t.reduce(n,{},function(t,n){var i=r(n),o=i[0],a=i[1];return t[o]=eK.call(t,o)?e.concat(t[o],a):a,t})}}function Ia(e){return function(t){for(var n in t)if(!e(t[n]))return!1;return!0}}function Iu(e){return function(t){for(var n in t)if(e(t[n]))return!0;return!1}}function Is(e){return function(t,n){if(void 0===n){var r=Is(e);return function(e){return r(t,e)}}for(var i in n)if(e.equals(n[i],t))return!0;return!1}}var Il=function(e){return function(t){return function(n){if(wQ(n))return t;if(wQ(t))return n;var r={};for(var i in n)wZ(i,t)?r[i]=e.concat(n[i],t[i]):r[i]=n[i];for(var i in t)wZ(i,r)||(r[i]=t[i]);return r}}},Ic=function(e){return function(t){return function(n){if(wQ(n)||wQ(t))return w0;var r={};for(var i in n)wZ(i,t)&&(r[i]=e.concat(n[i],t[i]));return r}}},Id=function(e){return function(t){if(wQ(t))return e;if(wQ(e))return t;var n={};for(var r in t)wZ(r,e)||(n[r]=t[r]);for(var r in e)wZ(r,t)||(n[r]=e[r]);return n}},If=function(e,t){return ev(e,w2(t))},Ip=function(e,t){return ev(e,w1(t))},IA=function(e){var t=IU(e);return function(e,n,r){return ev(e,t(n,r))}},Ih=function(e){return function(t){var n=IL(e)(t);return function(e,t){return ev(e,n(t))}}},Im=function(e){var t=IK(e);return function(e,n,r){return ev(e,t(n,r))}},Ig=function(e,t){return ev(e,IE(t))},Iy=function(e,t){return ev(e,Ij(t))},Iv=function(e,t){return ev(e,IF(t))},Ix=function(e,t){return ev(e,IM(t))},Ib=function(e){var t=w6(e);return function(e,n,r){return ev(e,t(n,r))}},IC=function(e){var t=w5(e);return function(e){var n=t(e);return function(e,t){return ev(e,n(t))}}},IS=function(e){var t=w3(e);return function(e,n,r){return ev(e,t(n,r))}},Iw=function(e,t){return ev(e,Ie(t))},II=function(e,t){return ev(e,It(t))},I_=function(e,t){return ev(e,In(t))},IT=function(e,t){return ev(e,Ir(t))},Ik=function(e){var t=IR(e);return function(e){var n=t(e);return function(e,t){return n(e,em(ex,t))}}},IO=function(e){var t=Ik(e);return function(e){var n=t(e);return function(e){return n(e,ec)}}},IR=function(e){return function(t){var n=wV(e);return function(e,r){var i=n(e);if(0===i.length)return t.of(w0);for(var o=t.of({}),a=function(n){o=t.ap(t.map(o,function(e){return function(t){var r;return Object.assign({},e,((r={})[n]=t,r))}}),r(n,e[n]))},u=0;u<i.length;u++)a(i[u]);return o}}},IE=function(e){return Ir(function(t,n){return e(n)})},Ij=function(e){return In(function(t,n){return e(n)})},IF=function(e){return It(function(t,n){return e(n)})},IM=function(e){return Ie(function(t,n){return e(n)})};function IU(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(1===e.length){var n=w6(e[0]);return function(e,t){return n(e,function(e,n,r){return t(n,r)})}}return IU(wD).apply(void 0,e)}function IL(e){if("compare"in e){var t=w5(e);return function(e){var n=t(e);return function(e){return n(function(t,n){return e(n)})}}}return IL(wD)(e)}function IK(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(1===e.length){var n=w3(e[0]);return function(e,t){return n(e,function(e,n,r){return t(n,r)})}}return IK(wD).apply(void 0,e)}var IB=function(e){var t={};for(var n in e)if(eK.call(e,n)){var r=e[n];ew(r)&&(t[n]=r.value)}return t},IP=function(e){var t={},n={};for(var r in e)if(eK.call(e,r)){var i=e[r];eT(i)?t[r]=i.left:n[r]=i.right}return iK(t,n)},IW="ReadonlyRecord";function ID(e){return"compare"in e?function(t){return{show:function(n){var r=wY(e)(function(e,n){return"".concat(JSON.stringify(e),": ").concat(t.show(n))})(n).join(", ");return""===r?"{}":"{ ".concat(r," }")}}}:ID(wD)(e)}function IN(e){var t=w$(e);return tr(function(e,n){return t(e)(n)&&t(n)(e)})}function Iq(e){return{concat:function(t,n){if(wQ(t))return n;if(wQ(n))return t;var r=Object.assign({},t);for(var i in n)eK.call(n,i)&&(r[i]=eK.call(t,i)?e.concat(t[i],n[i]):n[i]);return r},empty:w0}}var IQ={URI:IW,map:If},IV=eH(IQ),Iz={URI:IW,compact:IB,separate:IP},IY=function(e){return{URI:IW,map:If,reduce:IA(e),foldMap:Ih(e),reduceRight:Im(e),traverse:Ik(e),sequence:IO(e)}},IH=function(e){var t=Il(e);return{concat:function(e,n){return t(n)(e)}}},IG={URI:IW,reduce:IA(wD),foldMap:Ih(wD),reduceRight:Im(wD)},IZ={URI:IW,reduce:IA(wD),foldMap:Ih(wD),reduceRight:Im(wD),reduceWithIndex:Ib(wD),foldMapWithIndex:IC(wD),reduceRightWithIndex:IS(wD)},IJ={URI:IW,map:If,reduce:IA(wD),foldMap:Ih(wD),reduceRight:Im(wD),traverse:Ik(wD),sequence:w7},I$={URI:IW,map:If,mapWithIndex:Ip,reduce:IA(wD),foldMap:Ih(wD),reduceRight:Im(wD),reduceWithIndex:Ib(wD),foldMapWithIndex:IC(wD),reduceRightWithIndex:IS(wD),traverse:Ik(wD),sequence:w7,traverseWithIndex:IR(wD)},IX=iH(IJ,Iz),I0=iY(IJ,Iz),I1={URI:IW,map:If,reduce:IA(wD),foldMap:Ih(wD),reduceRight:Im(wD),traverse:Ik(wD),sequence:w7,compact:IB,separate:IP,filter:Ig,filterMap:Iy,partition:Iv,partitionMap:Ix,wither:IX,wilt:I0};function I2(e,t){return eK.call(void 0===t?this:t,e)}var I6={URI:IW,map:If,reduce:IA(wD),foldMap:Ih(wD),reduceRight:Im(wD),traverse:Ik(wD),sequence:w7,compact:IB,separate:IP,filter:Ig,filterMap:Iy,partition:Iv,partitionMap:Ix,mapWithIndex:Ip,reduceWithIndex:Ib(wD),foldMapWithIndex:IC(wD),reduceRightWithIndex:IS(wD),filterMapWithIndex:I_,filterWithIndex:IT,partitionMapWithIndex:Iw,partitionWithIndex:II,traverseWithIndex:IR(wD),wither:IX,wilt:I0};let I5=Object.freeze(Object.defineProperty({__proto__:null,Compactable:Iz,Filterable:{URI:IW,map:If,compact:IB,separate:IP,filter:Ig,filterMap:Iy,partition:Iv,partitionMap:Ix},FilterableWithIndex:{URI:IW,map:If,mapWithIndex:Ip,compact:IB,separate:IP,filter:Ig,filterMap:Iy,partition:Iv,partitionMap:Ix,filterMapWithIndex:I_,filterWithIndex:IT,partitionMapWithIndex:Iw,partitionWithIndex:II},Foldable:IG,FoldableWithIndex:IZ,Functor:IQ,FunctorWithIndex:{URI:IW,map:If,mapWithIndex:Ip},Traversable:IJ,TraversableWithIndex:I$,URI:IW,Witherable:I1,_filter:Ig,_filterMap:Iy,_filterMapWithIndex:I_,_filterWithIndex:IT,_foldMap:Ih,_foldMapWithIndex:IC,_map:If,_mapWithIndex:Ip,_partition:Iv,_partitionMap:Ix,_partitionMapWithIndex:Iw,_partitionWithIndex:II,_reduce:IA,_reduceRight:Im,_reduceRightWithIndex:IS,_reduceWithIndex:Ib,_sequence:IO,_traverse:Ik,collect:wY,compact:IB,deleteAt:wJ,difference:Id,elem:Is,empty:w0,every:Ia,filter:IE,filterMap:Ij,filterMapWithIndex:In,filterWithIndex:Ir,flap:IV,foldMap:IL,foldMapWithIndex:w5,fromEntries:function(e){for(var t={},n=0;n<e.length;n++){var r=e[n];t[r[0]]=r[1]}return t},fromFoldable:Ii,fromFoldableMap:Io,fromRecord:function(e){return Object.assign({},e)},getDifferenceMagma:function(){return{concat:function(e,t){return Id(t)(e)}}},getEq:IN,getFoldable:function(e){return{URI:IW,reduce:IA(e),foldMap:Ih(e),reduceRight:Im(e)}},getFoldableWithIndex:function(e){return{URI:IW,reduce:IA(e),foldMap:Ih(e),reduceRight:Im(e),reduceWithIndex:Ib(e),foldMapWithIndex:IC(e),reduceRightWithIndex:IS(e)}},getIntersectionSemigroup:function(e){var t=Ic(e);return{concat:function(e,n){return t(n)(e)}}},getMonoid:Iq,getShow:ID,getTraversable:IY,getTraversableWithIndex:function(e){return{URI:IW,map:If,mapWithIndex:Ip,reduce:IA(e),foldMap:Ih(e),reduceRight:Im(e),reduceWithIndex:Ib(e),foldMapWithIndex:IC(e),reduceRightWithIndex:IS(e),traverse:Ik(e),sequence:IO(e),traverseWithIndex:IR(e)}},getUnionMonoid:function(e){return{concat:IH(e).concat,empty:w0}},getUnionSemigroup:IH,getWitherable:function(e){var t=IY(e);return{URI:IW,map:If,reduce:IA(e),foldMap:Ih(e),reduceRight:Im(e),traverse:t.traverse,sequence:t.sequence,compact:IB,separate:IP,filter:Ig,filterMap:Iy,partition:Iv,partitionMap:Ix,wither:iH(t,Iz),wilt:iY(t,Iz)}},has:wZ,hasOwnProperty:I2,insertAt:wG,intersection:Ic,isEmpty:wQ,isSubrecord:w$,keys:wz,lookup:wX,map:w2,mapWithIndex:w1,modifyAt:function(e,t){return function(n){if(!wZ(e,n))return eI;var r=t(n[e]);if(r===n[e])return e_(n);var i=Object.assign({},n);return i[e]=r,e_(i)}},partition:IF,partitionMap:IM,partitionMapWithIndex:Ie,partitionWithIndex:It,pop:function(e){var t=wJ(e);return function(n){var r=wX(e,n);return eS(r)?eI:e_([r.value,t(n)])}},readonlyRecord:I6,reduce:IU,reduceRight:IK,reduceRightWithIndex:w3,reduceWithIndex:w6,separate:IP,sequence:w7,singleton:w9,size:wq,some:Iu,toEntries:wH,toReadonlyArray:wH,toRecord:function(e){return Object.assign({},e)},toUnfoldable:function(e){return function(t){var n=wH(t),r=n.length;return e.unfold(0,function(e){return e<r?e_([n[e],e+1]):eI})}},traverse:w8,traverseWithIndex:w4,union:Il,updateAt:function(e,t){return function(n){if(!wZ(e,n))return eI;if(n[e]===t)return e_(n);var r=Object.assign({},n);return r[e]=t,e_(r)}},upsertAt:wG,wilt:function(e){var t=w8(e);return function(n){return function(r){return e.map(ev(r,t(n)),IP)}}},wither:function(e){var t=w8(e);return function(n){return function(r){return e.map(ev(r,t(n)),IB)}}}},Symbol.toStringTag,{value:"Module"}));var I3=function(e){return function(t){for(var n=t.length,r=new Set,i=_d(e),o=0;o<n;o++){var a=t[o];i(a,r)||r.add(a)}return r}};function I9(e){return function(t){for(var n,r=t.values(),i=new Set;!(n=r.next()).done;){var o=n.value;e(o)&&i.add(o)}return i}}function I4(e){var t=_d(e);return function(n,r){if(void 0===r){var i=I4(e);return function(e){return i(n,e)}}if(_u(n))return r;if(_u(r))return n;var o=new Set(n);return r.forEach(function(e){t(e,o)||o.add(e)}),o}}function I8(e){var t=_d(e);return function(n,r){if(void 0===r){var i=I8(e);return function(e){return i(e,n)}}if(_u(n)||_u(r))return _a;var o=new Set;return n.forEach(function(e){t(e,r)&&o.add(e)}),o}}function I7(e){var t=_d(e);return function(n,r){if(void 0===r){var i=I7(e);return function(e){return i(e,n)}}return I9(function(e){return!t(e,r)})(n)}}function _e(e){var t=_f(e);return function(e,n){return function(r){return t(r).reduce(n,e)}}}function _t(e,t){var n=_f(e);return function(e){return function(r){return n(r).reduce(function(n,r){return t.concat(n,e(r))},t.empty)}}}var _n=function(e){var t=_f(e);return function(e,n){return function(r){return t(r).reduceRight(function(e,t){return n(t,e)},e)}}};function _r(e){var t=_d(e);return function(e){return function(n){if(t(e)(n))return n;var r=new Set(n);return r.add(e),r}}}var _i=function(e){return function(t){return function(n){return I9(function(n){return!e.equals(t,n)})(n)}}};function _o(e){var t=_d(e);return function(e){return function(n){var r=new Set;return n.forEach(function(n){var i=e(n);"Some"!==i._tag||t(i.value,r)||r.add(i.value)}),r}}}var _a=new Set,_u=function(e){return 0===e.size},_s=function(e){return function(t){for(var n,r=t.values(),i=!1;!i&&!(n=r.next()).done;)i=e(n.value);return i}};function _l(e){return sY(_s(sY(e)))}function _c(e){var t=_d(e);return function(n,r){if(void 0===r){var i=_c(e);return function(e){return i(e,n)}}return _l(function(e){return t(e,r)})(n)}}function _d(e){return function(t,n){if(void 0===n){var r=_d(e);return function(e){return r(t,e)}}for(var i,o=n.values(),a=!1;!a&&!(i=o.next()).done;)a=e.equals(t,i.value);return a}}var _f=function(e){return function(t){var n=[];return t.forEach(function(e){return n.push(e)}),n.sort(e.compare)}};function _p(e){return{show:function(t){var n=[];return t.forEach(function(t){n.push(e.show(t))}),"new Set([".concat(n.sort().join(", "),"])")}}}function _A(e){var t=_c(e);return tr(function(e,n){return t(e,n)&&t(n,e)})}var _h=function(e){return{concat:I4(e)}};let _m=Object.freeze(Object.defineProperty({__proto__:null,URI:"ReadonlySet",chain:function(e){var t=_d(e);return function(e){return function(n){var r=new Set;return n.forEach(function(n){e(n).forEach(function(e){t(e,r)||r.add(e)})}),r}}},compact:function(e){return _o(e)(ec)},difference:I7,elem:_d,empty:_a,every:_l,filter:I9,filterMap:_o,foldMap:_t,fromArray:I3,fromReadonlyArray:I3,fromSet:function(e){return new Set(e)},getDifferenceMagma:function(e){return{concat:I7(e)}},getEq:_A,getIntersectionSemigroup:function(e){return{concat:I8(e)}},getShow:_p,getUnionMonoid:function(e){return{concat:_h(e).concat,empty:_a}},getUnionSemigroup:_h,insert:_r,intersection:I8,isEmpty:_u,isSubset:_c,map:function(e){var t=_d(e);return function(e){return function(n){var r=new Set;return n.forEach(function(n){var i=e(n);t(i,r)||r.add(i)}),r}}},partition:function(e){return function(t){for(var n,r=t.values(),i=new Set,o=new Set;!(n=r.next()).done;){var a=n.value;e(a)?i.add(a):o.add(a)}return iK(o,i)}},partitionMap:function(e,t){return function(n){return function(r){for(var i,o=r.values(),a=new Set,u=new Set,s=_d(e),l=_d(t);!(i=o.next()).done;){var c=n(i.value);switch(c._tag){case"Left":s(c.left,a)||a.add(c.left);break;case"Right":l(c.right,u)||u.add(c.right)}}return iK(a,u)}}},reduce:_e,reduceRight:_n,remove:_i,separate:function(e,t){return function(n){var r=_d(e),i=_d(t),o=new Set,a=new Set;return n.forEach(function(e){switch(e._tag){case"Left":r(e.left,o)||o.add(e.left);break;case"Right":i(e.right,a)||a.add(e.right)}}),iK(o,a)}},singleton:function(e){return new Set([e])},size:function(e){return e.size},some:_s,toReadonlyArray:_f,toSet:function(e){return new Set(e)},toggle:function(e){var t=_d(e),n=_i(e),r=_r(e);return function(e){return function(i){return(t(e,i)?n:r)(e)(i)}}},union:I4},Symbol.toStringTag,{value:"Module"}));function _g(e){return e[0]}function _y(e){return e[1]}function _v(e){return{URI:_N,_E:void 0,map:_S,ap:function(t,n){return[_g(t)(_g(n)),e.concat(_y(t),_y(n))]}}}var _x=function(e){return function(t){return[t,e.empty]}};function _b(e){var t=_v(e);return{URI:_N,_E:void 0,map:t.map,ap:t.ap,chain:function(t,n){var r=n(_g(t)),i=r[0],o=r[1];return[i,e.concat(_y(t),o)]}}}var _C=function(e,t){return ev(e,_M(t))},_S=function(e,t){return ev(e,_j(t))},_w=function(e,t,n){return ev(e,_E(t,n))},_I=function(e,t){return ev(e,_F(t))},__=function(e,t){return ev(e,_U(t))},_T=function(e,t,n){return ev(e,_K(t,n))},_k=function(e){var t=_B();return function(e,n){return ev(e,t(n))}},_O=function(e,t,n){return ev(e,_P(t,n))},_R=function(e){var t=_W(e);return function(e,n){return ev(e,t(n))}},_E=function(e,t){return function(n){return[t(_g(n)),e(_y(n))]}},_j=function(e){return function(t){return[e(_g(t)),_y(t)]}},_F=function(e){return function(t){return[_g(t),e(_y(t))]}},_M=function(e){return function(t){return[_g(t),_y(e)]}},_U=function(e){return function(t){return[e(t),_y(t)]}},_L=_U(ec),_K=function(e,t){return function(n){return t(e,_g(n))}},_B=function(){return function(e){return function(t){return e(_g(t))}}},_P=function(e,t){return function(n){return t(_g(n),e)}},_W=function(e){return function(t){return function(n){return e.map(t(_g(n)),function(e){return[e,_y(n)]})}}},_D=function(e){return function(t){return e.map(_g(t),function(e){return[e,_y(t)]})}},_N="ReadonlyTuple",_q={URI:_N,map:_S},_Q=eH(_q);let _V=Object.freeze(Object.defineProperty({__proto__:null,Bifunctor:{URI:_N,bimap:_w,mapLeft:_I},Comonad:{URI:_N,map:_S,extend:__,extract:_g},Foldable:{URI:_N,reduce:_T,foldMap:_k,reduceRight:_O},Functor:_q,Semigroupoid:{URI:_N,compose:_C},Traversable:{URI:_N,map:_S,reduce:_T,foldMap:_k,reduceRight:_O,traverse:_R,sequence:_D},URI:_N,bimap:_E,compose:_M,duplicate:_L,extend:_U,extract:_g,flap:_Q,foldMap:_B,fst:_g,getApplicative:function(e){var t=_v(e);return{URI:_N,_E:void 0,map:t.map,ap:t.ap,of:_x(e)}},getApply:_v,getChain:_b,getChainRec:function(e){var t=_b(e);return{URI:_N,_E:void 0,map:t.map,ap:t.ap,chain:t.chain,chainRec:function(t,n){for(var r=n(t),i=e.empty,o=_g(r);"Left"===o._tag;)i=e.concat(i,_y(r)),o=_g(r=n(o.left));return[o.right,e.concat(i,_y(r))]}}},getMonad:function(e){var t=_b(e);return{URI:_N,_E:void 0,map:t.map,ap:t.ap,chain:t.chain,of:_x(e)}},map:_j,mapFst:_j,mapLeft:_F,mapSnd:_F,readonlyTuple:{URI:_N,compose:_C,map:_S,bimap:_w,mapLeft:_I,extract:_g,extend:__,reduce:_T,foldMap:_k,reduceRight:_O,traverse:_R,sequence:_D},reduce:_K,reduceRight:_P,sequence:_D,snd:_y,swap:function(e){return[_y(e),_g(e)]},traverse:_W},Symbol.toStringTag,{value:"Module"}));var _z=function(){return(_z=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},_Y=function(e){return function(t){return Object.keys(t).sort(e.compare)}},_H=_Y(wD);function _G(e){if("function"==typeof e)return _G(wD)(e);var t=_Y(e);return function(e){return function(n){for(var r=[],i=0,o=t(n);i<o.length;i++){var a=o[i];r.push(e(a,n[a]))}return r}}}var _Z=_G(wD)(function(e,t){return[e,t]});function _J(e){return function(t){if(!eK.call(t,e))return t;var n=Object.assign({},t);return delete n[e],n}}var _$=function(e,t){return function(n){if(!wZ(e,n))return eI;var r=Object.assign({},n);return r[e]=t(n[e]),e_(r)}};function _X(e){return w8(e)}function _0(e){return w7(e)}function _1(e,t){return Ii(e,t)}var _2=function(e){var t=Il(e);return function(e){return function(n){return wQ(n)?_z({},e):wQ(e)?_z({},n):t(e)(n)}}},_6=function(e){return function(t){return function(n){return wQ(n)||wQ(t)?{}:Ic(e)(t)(n)}}},_5=function(e){return function(t){return wQ(t)?_z({},e):wQ(e)?_z({},t):Id(e)(t)}},_3=function(e){return function(t){var n=_Y(e);return function(e,r){var i=n(e);if(0===i.length)return t.of({});for(var o=t.of({}),a=function(n){o=t.ap(t.map(o,function(e){return function(t){return e[n]=t,e}}),r(n,e[n]))},u=0;u<i.length;u++)a(i[u]);return o}}},_9="Record",_4={URI:_9,map:If},_8=eH(_4),_7={URI:_9,compact:IB,separate:IP},Te=function(e){return{URI:_9,map:If,reduce:IA(e),foldMap:Ih(e),reduceRight:Im(e),traverse:Ik(e),sequence:IO(e)}},Tt=function(e){var t=_2(e);return{concat:function(e,n){return t(n)(e)}}},Tn={URI:_9,reduce:IA(wD),foldMap:Ih(wD),reduceRight:Im(wD)},Tr={URI:_9,reduce:IA(wD),foldMap:Ih(wD),reduceRight:Im(wD),reduceWithIndex:Ib(wD),foldMapWithIndex:IC(wD),reduceRightWithIndex:IS(wD)},Ti={URI:_9,map:If,reduce:IA(wD),foldMap:Ih(wD),reduceRight:Im(wD),traverse:Ik(wD),sequence:_0},To={URI:_9,map:If,mapWithIndex:Ip,reduce:IA(wD),foldMap:Ih(wD),reduceRight:Im(wD),reduceWithIndex:Ib(wD),foldMapWithIndex:IC(wD),reduceRightWithIndex:IS(wD),traverse:Ik(wD),sequence:_0,traverseWithIndex:_3(wD)},Ta=iH(Ti,_7),Tu=iY(Ti,_7),Ts={URI:_9,map:If,reduce:IA(wD),foldMap:Ih(wD),reduceRight:Im(wD),traverse:Ik(wD),sequence:_0,compact:IB,separate:IP,filter:Ig,filterMap:Iy,partition:Iv,partitionMap:Ix,wither:Ta,wilt:Tu},Tl={URI:_9,map:If,reduce:IA(wD),foldMap:Ih(wD),reduceRight:Im(wD),traverse:Ik(wD),sequence:_0,compact:IB,separate:IP,filter:Ig,filterMap:Iy,partition:Iv,partitionMap:Ix,mapWithIndex:Ip,reduceWithIndex:Ib(wD),foldMapWithIndex:IC(wD),reduceRightWithIndex:IS(wD),filterMapWithIndex:I_,filterWithIndex:IT,partitionMapWithIndex:Iw,partitionWithIndex:II,traverseWithIndex:_3(wD),wither:Ta,wilt:Tu};let Tc=Object.freeze(Object.defineProperty({__proto__:null,Compactable:_7,Filterable:{URI:_9,map:If,compact:IB,separate:IP,filter:Ig,filterMap:Iy,partition:Iv,partitionMap:Ix},FilterableWithIndex:{URI:_9,map:If,mapWithIndex:Ip,compact:IB,separate:IP,filter:Ig,filterMap:Iy,partition:Iv,partitionMap:Ix,filterMapWithIndex:I_,filterWithIndex:IT,partitionMapWithIndex:Iw,partitionWithIndex:II},Foldable:Tn,FoldableWithIndex:Tr,Functor:_4,FunctorWithIndex:{URI:_9,map:If,mapWithIndex:Ip},Traversable:Ti,TraversableWithIndex:To,URI:_9,Witherable:Ts,collect:_G,compact:IB,deleteAt:_J,difference:_5,elem:Is,empty:{},every:Ia,filter:IE,filterMap:Ij,filterMapWithIndex:In,filterWithIndex:function(e){return Ir(e)},flap:_8,foldMap:function(e){return"compare"in e?IL(e):IL(wD)(e)},foldMapWithIndex:function(e){return"compare"in e?w5(e):w5(wD)(e)},fromEntries:function(e){return _1(tW(),sn)(e)},fromFoldable:_1,fromFoldableMap:function(e,t){return Io(e,t)},getDifferenceMagma:function(){return{concat:function(e,t){return _5(t)(e)}}},getEq:IN,getFoldable:function(e){return{URI:_9,reduce:IA(e),foldMap:Ih(e),reduceRight:Im(e)}},getFoldableWithIndex:function(e){return{URI:_9,reduce:IA(e),foldMap:Ih(e),reduceRight:Im(e),reduceWithIndex:Ib(e),foldMapWithIndex:IC(e),reduceRightWithIndex:IS(e)}},getIntersectionSemigroup:function(e){var t=_6(e);return{concat:function(e,n){return t(n)(e)}}},getMonoid:Iq,getShow:function(e){return"compare"in e?ID(e):ID(wD)(e)},getTraversable:Te,getTraversableWithIndex:function(e){return{URI:_9,map:If,mapWithIndex:Ip,reduce:IA(e),foldMap:Ih(e),reduceRight:Im(e),reduceWithIndex:Ib(e),foldMapWithIndex:IC(e),reduceRightWithIndex:IS(e),traverse:Ik(e),sequence:IO(e),traverseWithIndex:_3(e)}},getUnionMonoid:function(e){return{concat:Tt(e).concat,empty:{}}},getUnionSemigroup:Tt,getWitherable:function(e){var t=Te(e);return{URI:_9,map:If,reduce:IA(e),foldMap:Ih(e),reduceRight:Im(e),traverse:t.traverse,sequence:t.sequence,compact:IB,separate:IP,filter:Ig,filterMap:Iy,partition:Iv,partitionMap:Ix,wither:iH(t,_7),wilt:iY(t,_7)}},has:wZ,hasOwnProperty:I2,insertAt:wG,intersection:_6,isEmpty:wQ,isSubrecord:w$,keys:_H,lookup:wX,map:w2,mapWithIndex:w1,modifyAt:_$,partition:IF,partitionMap:IM,partitionMapWithIndex:Ie,partitionWithIndex:function(e){return It(e)},pop:function(e){var t=_J(e);return function(n){var r=wX(e,n);return eS(r)?eI:e_([r.value,t(n)])}},record:Tl,reduce:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===e.length?IU(e[0]):IU(wD).apply(void 0,e)},reduceRight:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===e.length?IK(e[0]):IK(wD).apply(void 0,e)},reduceRightWithIndex:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===e.length?w3(e[0]):w3(wD).apply(void 0,e)},reduceWithIndex:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===e.length?w6(e[0]):w6(wD).apply(void 0,e)},separate:IP,sequence:_0,singleton:w9,size:wq,some:Iu,toArray:_Z,toEntries:_Z,toUnfoldable:function(e){return function(t){var n=_Z(t),r=n.length;return e.unfold(0,function(e){return e<r?e_([n[e],e+1]):eI})}},traverse:_X,traverseWithIndex:function(e){return w4(e)},union:_2,updateAt:function(e,t){return _$(e,function(){return t})},upsertAt:wG,wilt:function(e){var t=_X(e);return function(n){return function(r){return e.map(ev(r,t(n)),IP)}}},wither:function(e){var t=_X(e);return function(n){return function(r){return e.map(ev(r,t(n)),IB)}}}},Symbol.toStringTag,{value:"Module"})),Td=Object.freeze(Object.defineProperty({__proto__:null,and:function(e){return function(t){return function(n){return t(n)&&e(n)}}},compose:function(e){return function(t){return function(n){return t(n)&&e(n)}}},fromEitherK:function(e){return function(t){return ek(e(t))}},fromOptionK:function(e){return function(t){return ew(e(t))}},id:function(){return function(e){return!0}},not:function(e){return function(t){return!e(t)}},or:function(e){return function(t){return function(n){return t(n)||e(n)}}},zero:function(){return function(e){return!1}}},Symbol.toStringTag,{value:"Module"}));var Tf=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return{add:function(t,n){return e.map(function(e,r){return e.add(t[r],n[r])})},zero:e.map(function(e){return e.zero}),mul:function(t,n){return e.map(function(e,r){return e.mul(t[r],n[r])})},one:e.map(function(e){return e.one}),sub:function(t,n){return e.map(function(e,r){return e.sub(t[r],n[r])})}}};let Tp=Object.freeze(Object.defineProperty({__proto__:null,getFunctionRing:el,getTupleRing:Tf,negate:function(e){return function(t){return e.sub(e.zero,t)}},tuple:Tf},Symbol.toStringTag,{value:"Module"})),TA=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),Th=Object.freeze(Object.defineProperty({__proto__:null,getFunctionSemiring:es},Symbol.toStringTag,{value:"Module"}));function Tm(e){return function(t){for(var n,r=t.values(),i=new Set;!(n=r.next()).done;){var o=n.value;e(o)&&i.add(o)}return i}}function Tg(e){var t=TT(e);return function(n,r){if(void 0===r){var i=Tg(e);return function(e){return i(n,e)}}if(T_(n))return r;if(T_(r))return n;var o=new Set(n);return r.forEach(function(e){t(e,o)||o.add(e)}),o}}function Ty(e){var t=TT(e);return function(n,r){if(void 0===r){var i=Ty(e);return function(e){return i(e,n)}}if(T_(n)||T_(r))return new Set;var o=new Set;return n.forEach(function(e){t(e,r)&&o.add(e)}),o}}function Tv(e){var t=TT(e);return function(n,r){if(void 0===r){var i=Tv(e);return function(e){return i(e,n)}}return Tm(function(e){return!t(e,r)})(n)}}var Tx=function(e){return{concat:Tg(e)}};function Tb(e){var t=TT(e);return function(e){return function(n){if(t(e)(n))return n;var r=new Set(n);return r.add(e),r}}}var TC=function(e){return function(t){return function(n){return Tm(function(n){return!e.equals(t,n)})(n)}}},TS=function(e){return function(t){for(var n=t.length,r=new Set,i=TT(e),o=0;o<n;o++){var a=t[o];i(a,r)||r.add(a)}return r}};function Tw(e){var t=TT(e);return function(e){return function(n){var r=new Set;return n.forEach(function(n){var i=e(n);"Some"!==i._tag||t(i.value,r)||r.add(i.value)}),r}}}var TI=new Set,T_=function(e){return 0===e.size},TT=_d,Tk=function(e){return function(t){var n=[];return t.forEach(function(e){return n.push(e)}),n.sort(e.compare)}};let TO=Object.freeze(Object.defineProperty({__proto__:null,chain:function(e){var t=TT(e);return function(e){return function(n){var r=new Set;return n.forEach(function(n){e(n).forEach(function(e){t(e,r)||r.add(e)})}),r}}},compact:function(e){return Tw(e)(ec)},difference:Tv,elem:TT,empty:TI,every:_l,filter:Tm,filterMap:Tw,foldMap:_t,fromArray:TS,getDifferenceMagma:function(e){return{concat:Tv(e)}},getEq:_A,getIntersectionSemigroup:function(e){return{concat:Ty(e)}},getShow:_p,getUnionMonoid:function(e){return{concat:Tx(e).concat,empty:new Set}},getUnionSemigroup:Tx,insert:Tb,intersection:Ty,isEmpty:T_,isSubset:_c,map:function(e){var t=TT(e);return function(e){return function(n){var r=new Set;return n.forEach(function(n){var i=e(n);t(i,r)||r.add(i)}),r}}},partition:function(e){return function(t){for(var n,r=t.values(),i=new Set,o=new Set;!(n=r.next()).done;){var a=n.value;e(a)?i.add(a):o.add(a)}return iK(o,i)}},partitionMap:function(e,t){return function(n){return function(r){for(var i,o=r.values(),a=new Set,u=new Set,s=TT(e),l=TT(t);!(i=o.next()).done;){var c=n(i.value);switch(c._tag){case"Left":s(c.left,a)||a.add(c.left);break;case"Right":l(c.right,u)||u.add(c.right)}}return iK(a,u)}}},reduce:_e,reduceRight:_n,remove:TC,separate:function(e,t){return function(n){var r=TT(e),i=TT(t),o=new Set,a=new Set;return n.forEach(function(e){switch(e._tag){case"Left":r(e.left,o)||o.add(e.left);break;case"Right":i(e.right,a)||a.add(e.right)}}),iK(o,a)}},singleton:function(e){return new Set([e])},size:function(e){return e.size},some:_s,subset:_c,toArray:Tk,toggle:function(e){var t=TT(e),n=TC(e),r=Tb(e);return function(e){return function(i){return(t(e,i)?n:r)(e)(i)}}},union:Tg},Symbol.toStringTag,{value:"Module"}));var TR=function(e){return{show:function(t){var n="{";for(var r in e)eK.call(e,r)&&(n+=" ".concat(r,": ").concat(e[r].show(t[r]),","));return n.length>1&&(n=n.slice(0,-1)+" "),n+="}"}}},TE=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return{show:function(t){return"[".concat(t.map(function(t,n){return e[n].show(t)}).join(", "),"]")}}};let Tj=Object.freeze(Object.defineProperty({__proto__:null,getStructShow:TR,getTupleShow:TE,showBoolean:{show:function(e){return JSON.stringify(e)}},showNumber:{show:function(e){return JSON.stringify(e)}},showString:{show:function(e){return JSON.stringify(e)}},struct:TR,tuple:TE},Symbol.toStringTag,{value:"Module"}));function TF(e){return function(t){return function(n){return e.of([t,n])}}}function TM(e){return function(t){return function(n){return function(r){return e.map(n(r),function(e){var n=e[0],r=e[1];return[t(n),r]})}}}}function TU(e){return function(t){return function(n){return function(r){return e.chain(n(r),function(n){var r=n[0],i=n[1];return e.map(t(i),function(e){var t=e[0],n=e[1];return[r(t),n]})})}}}}function TL(e){return function(t){return function(n){return function(r){return e.chain(n(r),function(e){var n=e[0],r=e[1];return t(n)(r)})}}}}function TK(e){return function(t){return function(n){return e.of(t(n))}}}function TB(e){return function(t){return function(n){return e.map(t,function(e){return[e,n]})}}}function TP(e){return function(t){return function(n){return e.map(n(t),function(e){return e[0]})}}}function TW(e){return function(t){return function(n){return e.map(n(t),_y)}}}let TD=Object.freeze(Object.defineProperty({__proto__:null,ap:TU,chain:TL,evaluate:TP,execute:TW,fromF:TB,fromState:TK,getStateM:function(e){var t=TU(e),n=TM(e),r=TL(e),i=TP(e),o=TW(e);return{map:function(e,t){return ev(e,n(t))},ap:function(e,n){return ev(e,t(n))},of:TF(e),chain:function(e,t){return ev(e,r(t))},get:function(){return function(t){return e.of([t,t])}},put:function(t){return function(){return e.of([void 0,t])}},modify:function(t){return function(n){return e.of([void 0,t(n)])}},gets:function(t){return function(n){return e.of([t(n),n])}},fromState:TK(e),fromM:TB(e),evalState:function(e,t){return ev(e,i(t))},execState:function(e,t){return ev(e,o(t))}}},map:TM,of:TF},Symbol.toStringTag,{value:"Module"}));var TN=function(e){return function(){return C8(e)}},Tq=TF(SZ);function TQ(e){return TJ(Se(e))}function TV(e){return TJ(Sn(e))}function Tz(e){return TJ(Sa(e))}var TY=da(function(e){return TN(e)},Tq),TH=TK(SZ),TG=function(e){return TJ(ed(e))},TZ=function(e){return TJ(Ss(e))},TJ=TB(SH),T$=function(e){return function(t){return function(n){return e(n)(t)(n)}}},TX=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return TZ(e.apply(void 0,t))}},T0=function(e){return function(t){return ev(t,ki(TX(e)))}},T1=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return TG(e.apply(void 0,t))}},T2=function(e){return function(t){return ev(t,ki(T1(e)))}},T6=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return TJ(e.apply(void 0,t))}},T5=function(e){return function(t){return ev(t,ki(T6(e)))}},T3=function(e,t){return ev(e,kt(t))},T9=function(e,t){return ev(e,kn(t))},T4=function(e,t){return ev(e,kr(t))},T8=function(e,t){return function(n){return ev(e(n),Sq(function(){return t()(n)}))}},T7=function(e,t,n){return function(r){return ev(e(r),SK(t,function(e){var t=e[0],r=e[1];return[n(t),r]}))}},ke=function(e,t){return function(n){return ev(e(n),SB(t))}},kt=TM(SH),kn=TU(S2),kr=TL(S2),ki=kr,ko=ki(ec),ka=function(e){return function(t){return function(n){return ev(t(n),Sq(function(){return e()(n)}))}}},ku="StateReaderTaskEither",ks={URI:ku,map:T3},kl=eH(ks),kc={URI:ku,map:T3,ap:T9},kd=eW(kc),kf=eD(kc),kp={URI:ku,map:T3,ap:T9,chain:T4},kA={URI:ku,fromState:TH},kh=pU(kA),km=pL(kA),kg=pK(kA),ky=pB(kA),kv=pP(kA),kx=pW(kA,kp),kb=e1(kp),kC={URI:ku,fromReader:TV},kS=pe(kC),kw=pt(kC),kI=pn(kC),k_=pr(kC,kp),kT=pi(kC,kp),kk={URI:ku,fromEither:TY},kO=e5(kk),kR=e9(kk),kE=e4(kk,kp),kj=e7(kk,kp),kF=te(kk,kp),kM=e3(kk),kU=tt(kk,kp),kL=e8(kk),kK={URI:ku,fromIO:Tz},kB=fm(kK),kP=fg(kK,kp),kW=fy(kK,kp),kD={URI:ku,fromIO:Tz,fromTask:TQ},kN=pN(kD),kq=pq(kD,kp),kQ=pQ(kD,kp),kV=TP(SH),kz=TW(SH),kY=eG(ks),kH=e2(kp),kG=eN(kc),kZ=function(e){return function(t){return function(n){return function(r){return function(){return eM(t).reduce(function(t,n,i){return t.then(function(o){return eT(o)?t:e(i+1,n)(o.right[1])(r)().then(function(e){if(eT(e))return e;var t=e.right,n=t[0],r=t[1];return o.right[0].push(n),o.right[1]=r,o})})},e(0,eF(t))(n)(r)().then(cq(function(e){return[[e[0]],e[1]]})))}}}}},kJ=function(e){var t=kZ(e);return function(e){return ej(e)?t(e):Tq(eU)}},k$=function(e){return kJ(function(t,n){return e(n)})};let kX=Object.freeze(Object.defineProperty({__proto__:null,Alt:{URI:ku,map:T3,alt:T8},Applicative:{URI:ku,map:T3,ap:T9,of:Tq},Apply:kc,Bifunctor:{URI:ku,bimap:T7,mapLeft:ke},Chain:kp,FromEither:kk,FromIO:kK,FromReader:kC,FromState:kA,FromTask:kD,Functor:ks,Monad:{URI:ku,map:T3,ap:T9,of:Tq,chain:T4},MonadIO:{URI:ku,map:T3,ap:T9,of:Tq,chain:T4,fromIO:Tz},MonadTask:{URI:ku,map:T3,ap:T9,of:Tq,chain:T4,fromIO:Tz,fromTask:TQ},MonadThrow:{URI:ku,map:T3,ap:T9,of:Tq,chain:T4,throwError:TN},Pointed:{URI:ku,of:Tq},URI:ku,alt:ka,altW:ka,ap:kn,apFirst:kd,apFirstW:kd,apS:kG,apSW:kG,apSecond:kf,apSecondW:kf,apW:kn,ask:kS,asks:kw,asksStateReaderTaskEither:T$,asksStateReaderTaskEitherW:T$,bimap:function(e,t){return function(n){return T7(n,e,t)}},bind:kH,bindTo:kY,bindW:kH,chain:kr,chainEitherK:kj,chainEitherKW:kj,chainFirst:kb,chainFirstEitherK:kF,chainFirstEitherKW:kF,chainFirstIOK:kW,chainFirstReaderK:kT,chainFirstReaderKW:kT,chainFirstTaskK:kQ,chainFirstW:kb,chainIOEitherK:T0,chainIOEitherKW:T0,chainIOK:kP,chainOptionK:kE,chainReaderK:k_,chainReaderKW:k_,chainReaderTaskEitherK:T5,chainReaderTaskEitherKW:T5,chainStateK:kx,chainTaskEitherK:T2,chainTaskEitherKW:T2,chainTaskK:kq,chainW:ki,evalState:function(e,t){return ev(e(t),SL(function(e){return e[0]}))},evaluate:kV,execState:function(e,t){return ev(e(t),SL(function(e){return e[0],e[1]}))},execute:kz,filterOrElse:kU,filterOrElseW:kU,flap:kl,flatten:ko,flattenW:ko,fromEither:TY,fromEitherK:kL,fromIO:Tz,fromIOEither:TZ,fromIOEitherK:TX,fromIOK:kB,fromOption:kO,fromOptionK:kR,fromPredicate:kM,fromReader:TV,fromReaderEither:function(e){return TJ(Sl(e))},fromReaderK:kI,fromReaderTaskEither:TJ,fromReaderTaskEitherK:T6,fromState:TH,fromStateK:kv,fromTask:TQ,fromTaskEither:TG,fromTaskEitherK:T1,fromTaskK:kN,get:kh,gets:ky,left:TN,leftIO:function(e){return TJ(Su(e))},leftReader:function(e){return TJ(Sr(e))},leftState:function(e){return function(t){return C8(e(t)[0])}},leftTask:function(e){return TJ(St(e))},local:function(e){return function(t){return em(t,fb(e))}},map:kt,mapLeft:function(e){return function(t){return ke(t,e)}},modify:kg,of:Tq,put:km,right:Tq,rightIO:Tz,rightReader:TV,rightState:function(e){return em(e,C7)},rightTask:TQ,run:function(e,t,n){return e(t)(n)()},sequenceArray:k$(ec),stateReaderTaskEither:{URI:ku,map:T3,of:Tq,ap:T9,chain:T4,bimap:T7,mapLeft:ke,alt:T8,fromIO:Tz,fromTask:TQ,throwError:TN},stateReaderTaskEitherSeq:{URI:ku,map:T3,of:Tq,ap:T9,chain:T4,bimap:T7,mapLeft:ke,alt:T8,fromIO:Tz,fromTask:TQ,throwError:TN},throwError:TN,traverseArray:k$,traverseArrayWithIndex:kJ,traverseReadonlyArrayWithIndex:kJ,traverseReadonlyNonEmptyArrayWithIndex:kZ},Symbol.toStringTag,{value:"Module"}));var k0=function(e,t){return ev(e,k5(t))},k1=function(e){return function(t){return{peek:function(n){return e({peek:t.peek,pos:n})},pos:t.pos}}},k2=function(e){return e.peek(e.pos)},k6=k1(ec),k5=function(e){return function(t){return{peek:function(n){return e(t.peek(n))},pos:t.pos}}},k3="Store",k9={URI:k3,map:k0},k4=eH(k9),k8={URI:k3,map:k0,extend:function(e,t){return ev(e,k1(t))},extract:k2};let k7=Object.freeze(Object.defineProperty({__proto__:null,Comonad:k8,Functor:k9,URI:k3,duplicate:k6,experiment:function(e){return function(t){return function(n){return e.map(t(n.pos),function(e){return n.peek(e)})}}},extend:k1,extract:k2,flap:k4,map:k5,peeks:function(e){return function(t){return t.peek(e(t.pos))}},seek:function(e){return function(t){return{peek:t.peek,pos:e}}},seeks:function(e){return function(t){return{peek:t.peek,pos:e(t.pos)}}},store:k8},Symbol.toStringTag,{value:"Module"}));function Oe(e,t){return function(n,r){return t.compose(e.second(r),e.first(n))}}function Ot(e,t){var n=Oe(e,t);return function(r,i){return t.compose(n(r,i),e.promap(t.id(),ec,function(e){return[e,e]}))}}let On=Object.freeze(Object.defineProperty({__proto__:null,fanOut:Ot,fanout:function(e){return Ot(e,e)},split:Oe,splitStrong:function(e){return Oe(e,e)}},Symbol.toStringTag,{value:"Module"})),Or=Object.freeze(Object.defineProperty({__proto__:null,evolve:function(e){return function(t){var n={};for(var r in t)eK.call(t,r)&&(n[r]=e[r](t[r]));return n}},getAssignSemigroup:function(){return{concat:function(e,t){return Object.assign({},e,t)}}}},Symbol.toStringTag,{value:"Module"}));var Oi=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},Oo=h5(xx),Oa=mn(xx),Ou=mr(xx),Os=function(e){return Ol(xu(e))},Ol=h9(xy),Oc=xf(sX),Od=mi(xy),Of=mo(xT),Op=ma(xk),OA=h4(xx),Oh=function(e){return function(){var t,n,r,i;return t=void 0,n=void 0,r=void 0,i=function(){return Oi(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,e().then(e_)];case 1:return[2,t.sent()];case 2:return t.sent(),[2,eI];case 3:return[2]}})},new(r||(r=Promise))(function(e,o){function a(e){try{s(i.next(e))}catch(e){o(e)}}function u(e){try{s(i.throw(e))}catch(e){o(e)}}function s(t){var n;t.done?e(t.value):((n=t.value)instanceof r?n:new r(function(e){e(n)})).then(a,u)}s((i=i.apply(t,n||[])).next())})}},Om=h8(xx),Og=h7(xk),Oy=me(xx),Ov=mt(xk),Ox=mu(xy),Ob=ms(xb),OC=ml(xk),OS=OC(ec),Ow=mc(xk),OI=h3(xx),O_=OI(),OT=co(xy,l_),Ok=ca(xy,l_,lu),OO=fe(xy,lE),OR=ft(xy,lE),OE=fn(xy,lE),Oj=fr(xy,lE),OF=function(e,t){return ev(e,Ox(t))},OM=function(e,t){return ev(e,Ob(t))},OU=function(e,t){return ev(e,OC(t))},OL=function(e,t){return ev(e,Ow(t))},OK="TaskOption",OB={URI:OK,map:OF},OP=eH(OB),OW={URI:OK,of:Oo},OD={URI:OK,map:OF,ap:OM},ON=eW(OD),Oq=eD(OD),OQ=function(e,t){return ev(e,OC(function(e){return ev(t,Ox(e))}))},OV={URI:OK,map:OF,ap:OM,chain:OU},Oz=e1(OV),OY={URI:OK,zero:OI},OH=iJ(OY,OW),OG={URI:OK,fromIO:Os},OZ=fm(OG),OJ=fg(OG,OV),O$=fy(OG,OV),OX={URI:OK,fromEither:Ou},O0=e8(OX),O1=e7(OX,OV),O2=te(OX,OV),O6={URI:OK,fromIO:Os,fromTask:Ol},O5=pN(O6),O3=pq(O6,OV),O9=pQ(O6,OV),O4=Oo(eL),O8=eG(OB),O7=e2(OV),Re=eN(OD),Rt=Oo(eU),Rn=function(e){return em(xW(e),xf(l9(ex)))},Rr=function(e){var t=Rn(e);return function(e){return ej(e)?t(e):Rt}},Ri=function(e){return function(t){return function(){return eM(t).reduce(function(t,n,r){return t.then(function(i){return eS(i)?t:e(r+1,n)().then(function(e){return eS(e)?e:(i.value.push(e.value),i)})})},e(0,eF(t))().then(la(eE)))}}},Ro=function(e){var t=Ri(e);return function(e){return ej(e)?t(e):Rt}},Ra=function(e){return Rr(function(t,n){return e(n)})},Ru=Ra(ec),Rs=function(e){return Ro(function(t,n){return e(n)})};let Rl=Object.freeze(Object.defineProperty({__proto__:null,Alt:{URI:OK,map:OF,alt:OL},Alternative:{URI:OK,map:OF,ap:OM,of:Oo,alt:OL,zero:OI},ApT:Rt,ApplicativePar:{URI:OK,map:OF,ap:OM,of:Oo},ApplicativeSeq:{URI:OK,map:OF,ap:OQ,of:Oo},ApplyPar:OD,ApplySeq:{URI:OK,map:OF,ap:OQ},Chain:OV,Compactable:{URI:OK,compact:OT,separate:Ok},Do:O4,Filterable:{URI:OK,map:OF,compact:OT,separate:Ok,filter:function(e,t){return ev(e,OO(t))},filterMap:function(e,t){return ev(e,OR(t))},partition:function(e,t){return ev(e,OE(t))},partitionMap:function(e,t){return ev(e,Oj(t))}},FromEither:OX,FromIO:OG,FromTask:O6,Functor:OB,Monad:{URI:OK,map:OF,ap:OM,of:Oo,chain:OU},MonadIO:{URI:OK,map:OF,ap:OM,of:Oo,chain:OU,fromIO:Os},MonadTask:{URI:OK,map:OF,ap:OM,of:Oo,chain:OU,fromIO:Os,fromTask:Ol},Pointed:OW,Zero:OY,alt:Ow,altW:Ow,ap:Ob,apFirst:ON,apS:Re,apSecond:Oq,bind:O7,bindTo:O8,chain:OC,chainEitherK:O1,chainFirst:Oz,chainFirstEitherK:O2,chainFirstIOK:O$,chainFirstTaskK:O9,chainIOK:OJ,chainNullableK:Og,chainOptionK:Ov,chainTaskK:O3,compact:OT,filter:OO,filterMap:OR,flap:OP,flatten:OS,fold:Of,foldW:Of,fromEither:Ou,fromEitherK:O0,fromIO:Os,fromIOK:OZ,fromNullable:OA,fromNullableK:Om,fromOption:xA,fromOptionK:Oy,fromPredicate:Oa,fromTask:Ol,fromTaskEither:Oc,fromTaskK:O5,getOrElse:Op,getOrElseW:Op,guard:OH,map:Ox,match:Od,matchE:Of,matchEW:Of,matchW:Od,none:O_,of:Oo,partition:OE,partitionMap:Oj,separate:Ok,sequenceArray:Ru,sequenceSeqArray:Rs(ec),some:Oo,traverseArray:Ra,traverseArrayWithIndex:Rr,traverseReadonlyArrayWithIndex:Rr,traverseReadonlyArrayWithIndexSeq:Ro,traverseReadonlyNonEmptyArrayWithIndex:Rn,traverseReadonlyNonEmptyArrayWithIndexSeq:Ri,traverseSeqArray:Rs,traverseSeqArrayWithIndex:Ro,tryCatch:Oh,tryCatchK:function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return Oh(function(){return e.apply(void 0,t)})}},zero:OI},Symbol.toStringTag,{value:"Module"}));var Rc=function(e){return"Left"===e._tag},Rd=function(e){return"Right"===e._tag};function Rf(e){return"Both"===e._tag}function Rp(e){return{_tag:"Left",left:e}}function RA(e){return{_tag:"Right",right:e}}function Rh(e,t){return{_tag:"Both",left:e,right:t}}var Rm=function(e,t,n){return function(r){switch(r._tag){case"Left":return e(r.left);case"Right":return t(r.right);case"Both":return n(r.left,r.right)}}},Rg=Rm(RA,Rp,function(e,t){return Rh(t,e)});function Ry(e,t){return{concat:function(n,r){return Rc(n)?Rc(r)?Rp(e.concat(n.left,r.left)):Rd(r)?Rh(n.left,r.right):Rh(e.concat(n.left,r.left),r.right):Rd(n)?Rc(r)?Rh(r.left,n.right):Rd(r)?RA(t.concat(n.right,r.right)):Rh(r.left,t.concat(n.right,r.right)):Rc(r)?Rh(e.concat(n.left,r.left),n.right):Rd(r)?Rh(n.left,t.concat(n.right,r.right)):Rh(e.concat(n.left,r.left),t.concat(n.right,r.right))}}}var Rv=function(e){return{URI:RL,_E:void 0,map:Rb,ap:function(t,n){return Rc(t)?Rc(n)?Rp(e.concat(t.left,n.left)):Rd(n)?Rp(t.left):Rp(e.concat(t.left,n.left)):Rd(t)?Rc(n)?Rp(n.left):Rd(n)?RA(t.right(n.right)):Rh(n.left,t.right(n.right)):Rc(n)?Rp(e.concat(t.left,n.left)):Rd(n)?Rh(t.left,t.right(n.right)):Rh(e.concat(t.left,n.left),t.right(n.right))}}};function Rx(e){return{URI:RL,_E:void 0,map:Rb,ap:Rv(e).ap,chain:function(t,n){if(Rc(t))return t;if(Rd(t))return n(t.right);var r=n(t.right);return Rc(r)?Rp(e.concat(t.left,r.left)):Rd(r)?Rh(t.left,r.right):Rh(e.concat(t.left,r.left),r.right)}}}var Rb=function(e,t){return ev(e,RR(t))},RC=function(e,t,n){return ev(e,Rk(t,n))},RS=function(e,t){return ev(e,RO(t))},Rw=function(e,t,n){return ev(e,RE(t,n))},RI=function(e){var t=Rj(e);return function(e,n){return ev(e,t(n))}},R_=function(e,t,n){return ev(e,RF(t,n))},RT=function(e){var t=RM(e);return function(e,n){return ev(e,t(n))}},Rk=function(e,t){return function(n){return Rc(n)?Rp(e(n.left)):Rd(n)?RA(t(n.right)):Rh(e(n.left),t(n.right))}},RO=function(e){return function(t){return Rc(t)?Rp(e(t.left)):Rf(t)?Rh(e(t.left),t.right):t}},RR=function(e){return function(t){return Rc(t)?t:Rd(t)?RA(e(t.right)):Rh(t.left,e(t.right))}},RE=function(e,t){return function(n){return Rc(n)?e:t(e,n.right)}},Rj=function(e){return function(t){return function(n){return Rc(n)?e.empty:t(n.right)}}},RF=function(e,t){return function(n){return Rc(n)?e:t(n.right,e)}},RM=function(e){return function(t){return function(n){return Rc(n)?e.of(n):Rd(n)?e.map(t(n.right),RA):e.map(t(n.right),function(e){return Rh(n.left,e)})}}},RU=function(e){return function(t){return Rc(t)?e.of(t):Rd(t)?e.map(t.right,RA):e.map(t.right,function(e){return Rh(t.left,e)})}},RL="These",RK={URI:RL,map:Rb},RB=eH(RK),RP={URI:RL,fromEither:ec},RW=e5(RP),RD=e9(RP),RN=function(e,t){return function(n){return Rc(n)?[n.left,t()]:Rd(n)?[e(),n.right]:[n.left,n.right]}},Rq=RA(eU),RQ=function(e){return function(t){return function(n){var r=eI,i=t(0,eF(n));if(Rc(i))return i;Rf(i)&&(r=e_(i.left));for(var o=[i.right],a=1;a<n.length;a++){var u=t(a,n[a]);if(Rc(u))return u;Rf(u)&&(r=eS(r)?e_(u.left):e_(e.concat(r.value,u.left))),o.push(u.right)}return eS(r)?RA(o):Rh(r.value,o)}}};let RV=Object.freeze(Object.defineProperty({__proto__:null,ApT:Rq,Bifunctor:{URI:RL,bimap:RC,mapLeft:RS},Foldable:{URI:RL,reduce:Rw,foldMap:RI,reduceRight:R_},FromEither:RP,FromThese:{URI:RL,fromThese:ec},Functor:RK,Pointed:{URI:RL,of:RA},Traversable:{URI:RL,map:Rb,reduce:Rw,foldMap:RI,reduceRight:R_,traverse:RT,sequence:RU},URI:RL,bimap:Rk,both:Rh,elem:function(e){return function(t){return function(n){return!Rc(n)&&e.equals(t,n.right)}}},exists:function(e){return function(t){return!Rc(t)&&e(t.right)}},flap:RB,fold:Rm,foldMap:Rj,foldW:Rm,fromOption:RW,fromOptionK:RD,fromOptions:function(e,t){return eS(e)?eS(t)?eI:e_(RA(t.value)):eS(t)?e_(Rp(e.value)):e_(Rh(e.value,t.value))},getApplicative:function(e){return{URI:RL,_E:void 0,map:Rb,ap:Rv(e).ap,of:RA}},getApply:Rv,getChain:Rx,getEq:function(e,t){return tr(function(n,r){return Rc(n)?Rc(r)&&e.equals(n.left,r.left):Rd(n)?Rd(r)&&t.equals(n.right,r.right):Rf(r)&&e.equals(n.left,r.left)&&t.equals(n.right,r.right)})},getLeft:function(e){return Rc(e)?e_(e.left):Rd(e)?eI:e_(e.left)},getLeftOnly:function(e){return Rc(e)?e_(e.left):eI},getMonad:function(e){var t=Rx(e);return{URI:RL,_E:void 0,map:Rb,of:RA,ap:t.ap,chain:t.chain,throwError:Rp}},getRight:function(e){return Rc(e)?eI:(Rd(e),e_(e.right))},getRightOnly:function(e){return Rd(e)?e_(e.right):eI},getSemigroup:Ry,getShow:function(e,t){return{show:Rm(function(t){return"left(".concat(e.show(t),")")},function(e){return"right(".concat(t.show(e),")")},function(n,r){return"both(".concat(e.show(n),", ").concat(t.show(r),")")})}},isBoth:Rf,isLeft:Rc,isRight:Rd,left:Rp,leftOrBoth:function(e){return function(t){return eS(t)?Rp(e):Rh(e,t.value)}},map:RR,mapLeft:RO,match:Rm,matchW:Rm,of:RA,reduce:RE,reduceRight:RF,right:RA,rightOrBoth:function(e){return function(t){return eS(t)?RA(e):Rh(t.value,e)}},sequence:RU,swap:Rg,these:{URI:RL,map:Rb,bimap:RC,mapLeft:RS,reduce:Rw,foldMap:RI,reduceRight:R_,traverse:RT,sequence:RU},toTuple:function(e,t){return RN(function(){return e},function(){return t})},toTuple2:RN,traverse:RM,traverseReadonlyArrayWithIndex:function(e){return function(t){var n=RQ(e)(t);return function(e){return ej(e)?n(e):Rq}}},traverseReadonlyNonEmptyArrayWithIndex:RQ},Symbol.toStringTag,{value:"Module"}));function Rz(e){return em(RA,e.of)}function RY(e){return em(Rp,e.of)}function RH(e){return em(Rh,e.of)}function RG(e){return function(t){return e.map(t,RA)}}function RZ(e){return function(t){return e.map(t,Rp)}}function RJ(e){return eY(e,RK)}function R$(e,t){return eP(e,Rv(t))}function RX(e,t){var n=RY(e);return function(r){return function(i){return e.chain(i,Rm(n,r,function(n,i){return e.map(r(i),Rm(function(e){return Rp(t.concat(n,e))},function(e){return Rh(n,e)},function(e,r){return Rh(t.concat(n,e),r)}))}))}}}function R0(e){return function(t,n){return function(r){return e.map(r,Rk(t,n))}}}function R1(e){return function(t){return function(n){return e.map(n,RO(t))}}}function R2(e){return function(t,n,r){return function(i){return e.map(i,Rm(t,n,r))}}}function R6(e){return function(t,n,r){return function(i){return e.chain(i,Rm(t,n,r))}}}function R5(e){return function(t){return e.map(t,Rg)}}function R3(e){return function(t,n){return function(r){return e.map(r,RN(t,n))}}}let R9=Object.freeze(Object.defineProperty({__proto__:null,ap:R$,bimap:R0,both:RH,chain:RX,getTheseM:function(e){var t=RJ(e),n=R0(e),r=R1(e),i=R6(e),o=R3(e),a=Rz(e),u=function(e,n){return ev(e,t(n))};return{map:u,bimap:function(e,t,r){return ev(e,n(t,r))},mapLeft:function(e,t){return ev(e,r(t))},fold:function(e,t,n,r){return ev(e,i(t,n,r))},swap:R5(e),rightM:RG(e),leftM:RZ(e),left:RY(e),right:Rz(e),both:RH(e),toTuple:function(e,t,n){return ev(e,o(function(){return t},function(){return n}))},getMonad:function(t){var n=R$(e,t),r=RX(e,t);return{_E:void 0,map:u,of:a,ap:function(e,t){return ev(e,n(t))},chain:function(e,t){return ev(e,r(t))}}}}},left:RY,leftF:RZ,map:RJ,mapLeft:R1,match:R2,matchE:R6,right:Rz,rightF:RG,swap:R5,toTuple2:R3},Symbol.toStringTag,{value:"Module"}));var R4=RY(xx),R8=Rz(xx),R7=RH(xx),Ee=RG(xy),Et=RZ(xy),En=em(xu,Ee),Er=em(xu,Et),Ei=R2(xy),Eo=R6(xk),Ea=R5(xy),Eu=function(e,t){return ev(e,Ec(t))},Es=function(e,t,n){return ev(e,Ed(t,n))},El=function(e,t){return ev(e,Ef(t))},Ec=RJ(xy),Ed=R0(xy),Ef=R1(xy),Ep="TaskThese",EA=function(e,t){var n=R$(e,t);return{URI:Ep,_E:void 0,map:Eu,ap:function(e,t){return ev(e,n(t))}}};function Eh(e,t){return{URI:Ep,_E:void 0,map:Eu,ap:EA(e,t).ap,of:R8}}function Em(e){var t=EA(xw,e),n=RX(xk,e);return{URI:Ep,_E:void 0,map:Eu,ap:t.ap,chain:function(e,t){return ev(e,n(t))}}}var Eg={URI:Ep,map:Eu},Ey=eH(Eg),Ev={URI:Ep,fromEither:xA},Ex=e5(Ev),Eb=e9(Ev),EC=e3(Ev),ES={URI:Ep,fromThese:xA},Ew=pz(ES),EI={URI:Ep,fromIO:En},E_=fm(EI),ET={URI:Ep,fromIO:En,fromTask:Ee},Ek=pN(ET),EO=R3(xy),ER=R8(eU),EE=function(e){var t=RQ(e);return function(e){return em(xW(e),xf(t(ex)))}},Ej=function(e){return function(t){return function(n){return function(){return eM(n).reduce(function(n,r,i){return n.then(function(o){return Rc(o)?n:t(i+1,r)().then(function(t){if(Rc(t))return t;if(Rf(t)){var n=o.right;return n.push(t.right),Rf(o)?Rh(e.concat(o.left,t.left),n):Rh(t.left,n)}return o.right.push(t.right),o})})},t(0,eF(n))().then(RR(eE)))}}}};let EF=Object.freeze(Object.defineProperty({__proto__:null,ApT:ER,Bifunctor:{URI:Ep,bimap:Es,mapLeft:El},FromEither:Ev,FromIO:EI,FromTask:ET,FromThese:ES,Functor:Eg,Pointed:{URI:Ep,of:R8},URI:Ep,bifunctorTaskThese:{URI:Ep,bimap:Es,mapLeft:El},bimap:Ed,both:R7,flap:Ey,fold:Eo,foldW:Eo,fromEither:xA,fromIO:En,fromIOEither:xu,fromIOK:E_,fromOption:Ex,fromOptionK:Eb,fromPredicate:EC,fromTask:Ee,fromTaskK:Ek,fromThese:xA,fromTheseK:Ew,functorTaskThese:{URI:Ep,map:Eu},getApplicative:Eh,getApply:EA,getChain:Em,getMonad:function(e){var t=Eh(xw,e),n=Em(e);return{URI:Ep,_E:void 0,map:Eu,ap:t.ap,of:R8,chain:n.chain,fromIO:En,fromTask:Ee}},getSemigroup:function(e,t){return eq(xI)(Ry(e,t))},left:R4,leftIO:Er,leftTask:Et,map:Ec,mapLeft:Ef,match:Ei,matchE:Eo,matchEW:Eo,matchW:Ei,of:R8,right:R8,rightIO:En,rightTask:Ee,swap:Ea,taskThese:{URI:Ep,map:Eu,bimap:Es,mapLeft:El},toTuple:function(e,t){return EO(function(){return e},function(){return t})},toTuple2:EO,traverseReadonlyArrayWithIndex:function(e){return function(t){var n=EE(e)(t);return function(e){return ej(e)?n(e):ER}}},traverseReadonlyArrayWithIndexSeq:function(e){return function(t){var n=Ej(e)(t);return function(e){return ej(e)?n(e):ER}}},traverseReadonlyNonEmptyArrayWithIndex:EE,traverseReadonlyNonEmptyArrayWithIndexSeq:Ej},Symbol.toStringTag,{value:"Module"}));var EM=function(e,t){return ev(e,EU(t))},EU=function(e){return function(t){return function(n){return e(t(n))}}},EL="Traced",EK={URI:EL,map:EM},EB=eH(EK);let EP=Object.freeze(Object.defineProperty({__proto__:null,Functor:EK,URI:EL,censor:function(e){return function(t){return function(n){return t(e(n))}}},flap:EB,getComonad:function(e){return{URI:EL,_E:void 0,map:EM,extend:function(t,n){return function(r){return n(function(n){return t(e.concat(r,n))})}},extract:function(t){return t(e.empty)}}},listen:function(e){return function(t){return[e(t),t]}},listens:function(e){return function(t){return function(n){return[t(n),e(n)]}}},map:EU,traced:EK,tracks:function(e,t){return function(n){return n(t(n(e.empty)))}}},Symbol.toStringTag,{value:"Module"}));function EW(e,t){return function(n){var r=e.traverse(n),i=t.traverse(n);return function(e){return function(t){return r(t,function(t){return i(t,e)})}}}}function ED(e,t){return function(n){var r=e.sequence(n),i=t.sequence(n);return function(t){return r(e.map(t,i))}}}let EN=Object.freeze(Object.defineProperty({__proto__:null,getTraversableComposition:function(e,t){var n=eZ(e,t).map,r=fc(e,t),i=EW(e,t),o=ED(e,t);return{map:n,reduce:r.reduce,foldMap:r.foldMap,reduceRight:r.reduceRight,traverse:function(e){var t=i(e);return function(e,n){return ev(e,t(n))}},sequence:function(e){var t=o(e);return function(e){return ev(e,t)}}}},sequence:ED,traverse:EW},Symbol.toStringTag,{value:"Module"})),Eq=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function EQ(e,t){return void 0===t&&(t=[]),{value:e,forest:t}}var EV=function(e,t){for(var n,r="",i=t.length,o=0;o<i;o++){n=t[o];var a=o===i-1;r+=e+(a?"└":"├")+"─ "+n.value+EV(e+(i>1&&!a?"│ ":" "),n.forest)}return r};function Ez(e){return EV(`
2
2
  `,e)}function EY(e,t){var n=t(e);return{value:n[0],forest:EH(n[1],t)}}function EH(e,t){return e.map(function(e){return EY(e,t)})}function EG(e){var t=EZ(e);return function(n,r){return e.chain(r(n),function(n){var i=n[0],o=n[1];return e.map(t(o,r),function(e){return{value:i,forest:e}})})}}function EZ(e){var t=uY(e);return function(n,r){return ev(n,t(function(t){return EG(e)(t,r)}))}}var EJ=function(e,t){return ev(e,E7(t))},E$=function(e,t){return ev(e,E3(function(e){return ev(t,E7(e))}))},EX=function(e,t){return ev(e,E3(t))},E0=function(e,t,n){return ev(e,je(t,n))},E1=function(e){var t=jt(e);return function(e,n){return ev(e,t(n))}},E2=function(e,t,n){return ev(e,jn(t,n))},E6=function(e,t){return ev(e,E9(t))},E5=function(e){var t=ji(e);return function(e,n){return ev(e,t(n))}},E3=function(e){return function(t){var n=e(t.value),r=n.value,i=n.forest;return{value:r,forest:(0,uX().concat)(i,t.forest.map(E3(e)))}}},E9=function(e){return function(t){return{value:e(t),forest:t.forest.map(E9(e))}}},E4=E9(ec),E8=E3(ec),E7=function(e){return function(t){return{value:e(t.value),forest:t.forest.map(E7(e))}}},je=function(e,t){return function(n){for(var r=t(e,n.value),i=n.forest.length,o=0;o<i;o++)r=ev(n.forest[o],je(r,t));return r}},jt=function(e){return function(t){return je(e.empty,function(n,r){return e.concat(n,t(r))})}},jn=function(e,t){return function(n){for(var r=e,i=n.forest.length,o=i-1;o>=0;o--)r=ev(n.forest[o],jn(r,t));return t(n.value,r)}},jr=function(e){return e.value},ji=function(e){var t=uY(e),n=function(r){return function(i){return e.ap(e.map(r(i.value),function(e){return function(t){return{value:e,forest:t}}}),ev(i.forest,t(n(r))))}};return n},jo=function(e){return ji(e)(ec)},ja=function(e){return EQ(e)},ju="Tree",js={URI:ju,map:EJ},jl=eH(js),jc={URI:ju,map:EJ,ap:E$},jd=eW(jc),jf=eD(jc),jp={URI:ju,map:EJ,ap:E$,chain:EX},jA=e1(jp),jh=ja(eL),jm=eG(js),jg=e2(jp),jy=eN(jc),jv=function(e){return function(t){return e(t.value)||t.forest.some(jv(e))}};let jx=Object.freeze(Object.defineProperty({__proto__:null,Applicative:{URI:ju,map:EJ,ap:E$,of:ja},Apply:jc,Chain:jp,Comonad:{URI:ju,map:EJ,extend:E6,extract:jr},Do:jh,Foldable:{URI:ju,reduce:E0,foldMap:E1,reduceRight:E2},Functor:js,Monad:{URI:ju,map:EJ,ap:E$,of:ja,chain:EX},Pointed:{URI:ju,of:ja},Traversable:{URI:ju,map:EJ,reduce:E0,foldMap:E1,reduceRight:E2,traverse:E5,sequence:jo},URI:ju,ap:function(e){return function(t){return E$(t,e)}},apFirst:jd,apS:jy,apSecond:jf,bind:jg,bindTo:jm,chain:E3,chainFirst:jA,drawForest:Ez,drawTree:function(e){return e.value+Ez(e.forest)},duplicate:E4,elem:function(e){var t=function(n,r){return e.equals(n,r.value)||r.forest.some(function(e){return t(n,e)})};return t},exists:jv,extend:E9,extract:jr,flap:jl,flatten:E8,fold:function(e){var t=function(n){return e(n.value,n.forest.map(t))};return t},foldMap:jt,getEq:function(e){var t,n=tr(function(n,r){return e.equals(n.value,r.value)&&t.equals(n.forest,r.forest)});return t=ad(n),n},getShow:function(e){var t=function(n){return aV(n.forest)?"make(".concat(e.show(n.value),")"):"make(".concat(e.show(n.value),", [").concat(n.forest.map(t).join(", "),"])")};return{show:t}},make:EQ,map:E7,of:ja,reduce:je,reduceRight:jn,sequence:jo,traverse:ji,tree:{URI:ju,map:EJ,of:ja,ap:E$,chain:EX,reduce:E0,foldMap:E1,reduceRight:E2,traverse:E5,sequence:jo,extract:jr,extend:E6},unfoldForest:EH,unfoldForestM:EZ,unfoldTree:EY,unfoldTreeM:EG},Symbol.toStringTag,{value:"Module"}));function jb(e){return{URI:jQ,_E:void 0,map:jI,ap:function(t,n){return[_g(t)(_g(n)),e.concat(_y(t),_y(n))]}}}var jC=function(e){return function(t){return[t,e.empty]}};function jS(e){var t=jb(e);return{URI:jQ,_E:void 0,map:t.map,ap:t.ap,chain:function(t,n){var r=n(_g(t)),i=r[0],o=r[1];return[i,e.concat(_y(t),o)]}}}var jw=function(e,t){return ev(e,jL(t))},jI=function(e,t){return ev(e,jM(t))},j_=function(e,t,n){return ev(e,jF(t,n))},jT=function(e,t){return ev(e,jU(t))},jk=function(e,t){return ev(e,jK(t))},jO=function(e,t,n){return ev(e,jW(t,n))},jR=function(e){var t=jP();return function(e,n){return ev(e,t(n))}},jE=function(e,t,n){return ev(e,jD(t,n))};function jj(e){var t=jN(e);return function(e,n){return ev(e,t(n))}}var jF=function(e,t){return function(n){return[t(_g(n)),e(_y(n))]}},jM=function(e){return function(t){return[e(_g(t)),_y(t)]}},jU=function(e){return function(t){return[_g(t),e(_y(t))]}},jL=function(e){return function(t){return[_g(t),_y(e)]}},jK=function(e){return function(t){return[e(t),_y(t)]}},jB=jK(ec),jP=_B,jW=_K,jD=_P,jN=function(e){return function(t){return function(n){return e.map(t(_g(n)),function(e){return[e,_y(n)]})}}},jq=function(e){return function(t){return e.map(_g(t),function(e){return[e,_y(t)]})}},jQ="Tuple",jV={URI:jQ,map:jI},jz=eH(jV);let jY=Object.freeze(Object.defineProperty({__proto__:null,Bifunctor:{URI:jQ,bimap:j_,mapLeft:jT},Comonad:{URI:jQ,map:jI,extend:jk,extract:_g},Foldable:{URI:jQ,reduce:jO,foldMap:jR,reduceRight:jE},Functor:jV,Semigroupoid:{URI:jQ,compose:jw},Traversable:{URI:jQ,map:jI,reduce:jO,foldMap:jR,reduceRight:jE,traverse:jj,sequence:jq},URI:jQ,bimap:jF,compose:jL,duplicate:jB,extend:jK,extract:_g,flap:jz,foldMap:jP,fst:_g,getApplicative:function(e){var t=jb(e);return{URI:jQ,_E:void 0,map:t.map,ap:t.ap,of:jC(e)}},getApply:jb,getChain:jS,getChainRec:function(e){var t=jS(e);return{URI:jQ,_E:void 0,map:t.map,ap:t.ap,chain:t.chain,chainRec:function(t,n){for(var r=n(t),i=e.empty,o=_g(r);"Left"===o._tag;)i=e.concat(i,_y(r)),o=_g(r=n(o.left));return[o.right,e.concat(i,_y(r))]}}},getMonad:function(e){var t=jS(e);return{URI:jQ,_E:void 0,map:t.map,ap:t.ap,chain:t.chain,of:jC(e)}},map:jM,mapFst:jM,mapLeft:jU,mapSnd:jU,reduce:jW,reduceRight:jD,sequence:jq,snd:_y,swap:function(e){return[_y(e),_g(e)]},traverse:jN,tuple:{URI:jQ,compose:jw,map:jI,bimap:j_,mapLeft:jT,extract:_g,extend:jk,reduce:jO,foldMap:jR,reduceRight:jE,traverse:jj,sequence:jq}},Symbol.toStringTag,{value:"Module"})),jH=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),jG=Object.freeze(Object.defineProperty({__proto__:null,getValidationM:function(e,t){var n=eX(t,cD(e));return{map:n.map,ap:n.ap,of:n.of,chain:function(e,n){return t.chain(e,function(e){return eT(e)?t.of(eO(e.left)):n(e.right)})},alt:function(n,r){return t.chain(n,function(n){return ek(n)?t.of(n):t.map(r(),function(t){return eT(t)?eO(e.concat(n.left,t.left)):t})})}}}},Symbol.toStringTag,{value:"Module"}));var jZ=tU(void 0);let jJ=Object.freeze(Object.defineProperty({__proto__:null,Monoid:{concat:jZ.concat,empty:void 0},Semigroup:jZ},Symbol.toStringTag,{value:"Module"}));var j$=function(e,t){return ev(e,jX(t))},jX=function(e){return function(t){return function(){var n=t(),r=n[0],i=n[1];return[e(r),i]}}},j0="Writer",j1=function(e){return{URI:j0,_E:void 0,of:function(t){return function(){return[t,e.empty]}}}},j2=function(e){return{URI:j0,_E:void 0,map:j$,ap:function(t,n){return function(){var r=t(),i=r[0],o=r[1],a=n(),u=a[0],s=a[1];return[i(u),e.concat(o,s)]}}}},j6=function(e){var t=j2(e),n=j1(e);return{URI:j0,_E:void 0,map:j$,ap:t.ap,of:n.of}};function j5(e){return{URI:j0,_E:void 0,map:j$,ap:j2(e).ap,chain:function(t,n){return function(){var r=t(),i=r[0],o=r[1],a=n(i)(),u=a[0],s=a[1];return[u,e.concat(o,s)]}}}}var j3={URI:j0,map:j$},j9=eH(j3);let j4=N(Object.freeze(Object.defineProperty({__proto__:null,alt:er,alternative:ei,applicative:e0,apply:ez,array:sg,bifunctor:sy,boolean:s_,booleanAlgebra:sk,bounded:sO,boundedDistributiveLattice:sj,boundedJoinSemilattice:sF,boundedLattice:sM,boundedMeetSemilattice:sU,category:sL,chain:e6,chainRec:sB,choice:sD,comonad:sN,compactable:cu,console:cs,const:cC,contravariant:cS,date:cw,distributiveLattice:sE,either:dM,eitherT:d6,endomorphism:d9,eq:tf,extend:d4,field:d7,filterable:fi,filterableWithIndex:fo,foldable:fd,foldableWithIndex:fh,fromEither:tn,fromIO:fv,fromReader:po,fromState:pD,fromTask:pV,fromThese:pY,function:eb,functor:eJ,functorWithIndex:pG,group:pZ,heytingAlgebra:pJ,hkt:p$,identity:AS,invariant:Aw,io:AX,ioEither:h6,ioOption:go,ioRef:gu,joinSemilattice:gs,json:gl,lattice:gc,magma:tj,map:yF,meetSemilattice:yM,monad:yU,monadIO:yL,monadTask:yK,monadThrow:yB,monoid:yZ,naturalTransformation:yJ,nonEmptyArray:iT,number:iL,option:ci,optionT:md,ord:tO,ordering:y6,pipeable:y5,pointed:y3,predicate:sZ,profunctor:y9,random:ve,reader:f7,readerEither:xe,readerT:xa,readerTask:bP,readerTaskEither:wK,readonlyArray:aQ,readonlyMap:g9,readonlyNonEmptyArray:ra,readonlyRecord:I5,readonlySet:_m,readonlyTuple:_V,record:Tc,refinement:Td,ring:Tp,semigroup:tY,semigroupoid:TA,semiring:Th,separated:iz,set:TO,show:Tj,state:pM,stateReaderTaskEither:kX,stateT:TD,store:k7,string:wN,strong:On,struct:Or,task:xZ,taskEither:C4,taskOption:Rl,taskThese:EF,these:RV,theseT:R9,traced:EP,traversable:EN,traversableWithIndex:Eq,tree:jx,tuple:jY,unfoldable:jH,validationT:jG,void:jJ,witherable:iZ,writer:Object.freeze(Object.defineProperty({__proto__:null,Functor:j3,URI:j0,censor:function(e){return function(t){return function(){var n=t();return[n[0],e(n[1])]}}},evalWriter:function(e){return e()[0]},evaluate:function(e){return e()[0]},execWriter:function(e){return e()[1]},execute:function(e){return e()[1]},flap:j9,getApplicative:j6,getApply:j2,getChain:j5,getMonad:function(e){var t=j6(e),n=j5(e);return{URI:j0,_E:void 0,map:j$,ap:t.ap,of:t.of,chain:n.chain}},getPointed:j1,listen:function(e){return function(){var t=e(),n=t[0],r=t[1];return[[n,r],r]}},listens:function(e){return function(t){return function(){var n=t(),r=n[0],i=n[1];return[[r,e(i)],i]}}},map:jX,pass:function(e){return function(){var t=e(),n=t[0];return[n[0],(0,n[1])(t[1])]}},tell:function(e){return function(){return[void 0,e]}},writer:j3},Symbol.toStringTag,{value:"Module"})),writerT:Object.freeze(Object.defineProperty({__proto__:null,getWriterM:function(e){var t=function(t,n){return function(){return e.map(t(),function(e){var t=e[0],r=e[1];return[n(t),r]})}};return{map:t,evalWriter:function(t){return e.map(t(),function(e){return e[0]})},execWriter:function(t){return e.map(t(),function(e){return e[0],e[1]})},tell:function(t){return function(){return e.of([void 0,t])}},listen:function(t){return function(){return e.map(t(),function(e){var t=e[0],n=e[1];return[[t,n],n]})}},pass:function(t){return function(){return e.map(t(),function(e){var t=e[0];return[t[0],(0,t[1])(e[1])]})}},listens:function(t,n){return function(){return e.map(t(),function(e){var t=e[0],r=e[1];return[[t,n(r)],r]})}},censor:function(t,n){return function(){return e.map(t(),function(e){return[e[0],n(e[1])]})}},getMonad:function(n){return{_E:void 0,map:t,of:function(t){return function(){return e.of([t,n.empty])}},ap:function(t,r){return function(){return e.chain(t(),function(t){var i=t[0],o=t[1];return e.map(r(),function(e){var t=e[0],r=e[1];return[i(t),n.concat(o,r)]})})}},chain:function(t,r){return function(){return e.chain(t(),function(t){var i=t[0],o=t[1];return e.map(r(i)(),function(e){var t=e[0],r=e[1];return[t,n.concat(o,r)]})})}}}}}}},Symbol.toStringTag,{value:"Module"})),zero:i$},Symbol.toStringTag,{value:"Module"})));var j8={},j7={},Fe={},Ft={};!function(e){function t(e){return e}function n(e){return function(){return e}}function r(e,t,n,r,i,o,a,u,s){switch(arguments.length){case 1:return e;case 2:return function(){return t(e.apply(this,arguments))};case 3:return function(){return n(t(e.apply(this,arguments)))};case 4:return function(){return r(n(t(e.apply(this,arguments))))};case 5:return function(){return i(r(n(t(e.apply(this,arguments)))))};case 6:return function(){return o(i(r(n(t(e.apply(this,arguments))))))};case 7:return function(){return a(o(i(r(n(t(e.apply(this,arguments)))))))};case 8:return function(){return u(a(o(i(r(n(t(e.apply(this,arguments))))))))};case 9:return function(){return s(u(a(o(i(r(n(t(e.apply(this,arguments)))))))))}}}function i(e){throw Error("Called `absurd` function which should be uncallable")}Object.defineProperty(e,"__esModule",{value:!0}),e.getEndomorphismMonoid=e.not=e.SK=e.hole=e.pipe=e.untupled=e.tupled=e.absurd=e.decrement=e.increment=e.tuple=e.flow=e.flip=e.constVoid=e.constUndefined=e.constNull=e.constFalse=e.constTrue=e.constant=e.unsafeCoerce=e.identity=e.apply=e.getRing=e.getSemiring=e.getMonoid=e.getSemigroup=e.getBooleanAlgebra=void 0,e.getBooleanAlgebra=function(e){return function(){return{meet:function(t,n){return function(r){return e.meet(t(r),n(r))}},join:function(t,n){return function(r){return e.join(t(r),n(r))}},zero:function(){return e.zero},one:function(){return e.one},implies:function(t,n){return function(r){return e.implies(t(r),n(r))}},not:function(t){return function(n){return e.not(t(n))}}}}},e.getSemigroup=function(e){return function(){return{concat:function(t,n){return function(r){return e.concat(t(r),n(r))}}}}},e.getMonoid=function(t){var n=(0,e.getSemigroup)(t);return function(){return{concat:n().concat,empty:function(){return t.empty}}}},e.getSemiring=function(e){return{add:function(t,n){return function(r){return e.add(t(r),n(r))}},zero:function(){return e.zero},mul:function(t,n){return function(r){return e.mul(t(r),n(r))}},one:function(){return e.one}}},e.getRing=function(t){var n=(0,e.getSemiring)(t);return{add:n.add,mul:n.mul,one:n.one,zero:n.zero,sub:function(e,n){return function(r){return t.sub(e(r),n(r))}}}},e.apply=function(e){return function(t){return t(e)}},e.identity=t,e.unsafeCoerce=t,e.constant=n,e.constTrue=n(!0),e.constFalse=n(!1),e.constNull=n(null),e.constUndefined=n(void 0),e.constVoid=e.constUndefined,e.flip=function(e){return function(t,n){return e(n,t)}},e.flow=r,e.tuple=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e},e.increment=function(e){return e+1},e.decrement=function(e){return e-1},e.absurd=i,e.tupled=function(e){return function(t){return e.apply(void 0,t)}},e.untupled=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e(t)}},e.pipe=function(e,t,n,r,i,o,a,u,s){switch(arguments.length){case 1:return e;case 2:return t(e);case 3:return n(t(e));case 4:return r(n(t(e)));case 5:return i(r(n(t(e))));case 6:return o(i(r(n(t(e)))));case 7:return a(o(i(r(n(t(e))))));case 8:return u(a(o(i(r(n(t(e)))))));case 9:return s(u(a(o(i(r(n(t(e))))))));default:for(var l=arguments[0],c=1;c<arguments.length;c++)l=arguments[c](l);return l}},e.hole=i,e.SK=function(e,t){return t},e.not=function(e){return function(t){return!e(t)}},e.getEndomorphismMonoid=function(){return{concat:function(e,t){return r(e,t)},empty:t}}}(Ft);var Fn={},Fr=D&&D.__spreadArray||function(e,t,n){if(n||2==arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(Fn,"__esModule",{value:!0}),Fn.fromReadonlyNonEmptyArray=Fn.has=Fn.emptyRecord=Fn.emptyReadonlyArray=Fn.tail=Fn.head=Fn.isNonEmpty=Fn.singleton=Fn.right=Fn.left=Fn.isRight=Fn.isLeft=Fn.some=Fn.none=Fn.isSome=Fn.isNone=void 0,Fn.isNone=function(e){return"None"===e._tag},Fn.isSome=function(e){return"Some"===e._tag},Fn.none={_tag:"None"},Fn.some=function(e){return{_tag:"Some",value:e}},Fn.isLeft=function(e){return"Left"===e._tag},Fn.isRight=function(e){return"Right"===e._tag},Fn.left=function(e){return{_tag:"Left",left:e}},Fn.right=function(e){return{_tag:"Right",right:e}},Fn.singleton=function(e){return[e]},Fn.isNonEmpty=function(e){return e.length>0},Fn.head=function(e){return e[0]},Fn.tail=function(e){return e.slice(1)},Fn.emptyReadonlyArray=[],Fn.emptyRecord={},Fn.has=Object.prototype.hasOwnProperty,Fn.fromReadonlyNonEmptyArray=function(e){return Fr([e[0]],e.slice(1),!0)};var Fi=D&&D.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),Fo=D&&D.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Fa=D&&D.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&Fi(t,e,n);return Fo(t,e),t};Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.sequenceS=Fe.sequenceT=Fe.getApplySemigroup=Fe.apS=Fe.apSecond=Fe.apFirst=Fe.ap=void 0;var Fu=Fa(Fn);function Fs(e,t,n){return function(r){for(var i=Array(n.length+1),o=0;o<n.length;o++)i[o]=n[o];return i[n.length]=r,0===t?e.apply(null,i):Fs(e,t-1,i)}}Fe.ap=function(e,t){return function(n){return function(r){return e.ap(e.map(r,function(e){return function(n){return t.ap(e,n)}}),n)}}},Fe.apFirst=function(e){return function(t){return function(n){return e.ap(e.map(n,function(e){return function(){return e}}),t)}}},Fe.apSecond=function(e){return function(t){return function(n){return e.ap(e.map(n,function(){return function(e){return e}}),t)}}},Fe.apS=function(e){return function(t,n){return function(r){return e.ap(e.map(r,function(e){return function(n){var r;return Object.assign({},e,((r={})[t]=n,r))}}),n)}}},Fe.getApplySemigroup=function(e){return function(t){return{concat:function(n,r){return e.ap(e.map(n,function(e){return function(n){return t.concat(e,n)}}),r)}}}};var Fl={1:function(e){return[e]},2:function(e){return function(t){return[e,t]}},3:function(e){return function(t){return function(n){return[e,t,n]}}},4:function(e){return function(t){return function(n){return function(r){return[e,t,n,r]}}}},5:function(e){return function(t){return function(n){return function(r){return function(i){return[e,t,n,r,i]}}}}}};Fe.sequenceT=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r=t.length,i=(Fu.has.call(Fl,r)||(Fl[r]=Fs(Ft.tuple,r-1,[])),Fl[r]),o=e.map(t[0],i),a=1;a<r;a++)o=e.ap(o,t[a]);return o}},Fe.sequenceS=function(e){return function(t){for(var n=Object.keys(t),r=n.length,i=function(e){var t=e.length;switch(t){case 1:return function(t){var n;return(n={})[e[0]]=t,n};case 2:return function(t){return function(n){var r;return(r={})[e[0]]=t,r[e[1]]=n,r}};case 3:return function(t){return function(n){return function(r){var i;return(i={})[e[0]]=t,i[e[1]]=n,i[e[2]]=r,i}}};case 4:return function(t){return function(n){return function(r){return function(i){var o;return(o={})[e[0]]=t,o[e[1]]=n,o[e[2]]=r,o[e[3]]=i,o}}}};case 5:return function(t){return function(n){return function(r){return function(i){return function(o){var a;return(a={})[e[0]]=t,a[e[1]]=n,a[e[2]]=r,a[e[3]]=i,a[e[4]]=o,a}}}}};default:return Fs(function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];for(var i={},o=0;o<t;o++)i[e[o]]=n[o];return i},t-1,[])}}(n),o=e.map(t[n[0]],i),a=1;a<r;a++)o=e.ap(o,t[n[a]]);return o}};var Fc={};function Fd(e,t){return function(n){return function(r){return e.map(r,function(e){return t.map(e,n)})}}}Object.defineProperty(Fc,"__esModule",{value:!0}),Fc.getFunctorComposition=Fc.bindTo=Fc.flap=Fc.map=void 0,Fc.map=Fd,Fc.flap=function(e){return function(t){return function(n){return e.map(n,function(e){return e(t)})}}},Fc.bindTo=function(e){return function(t){return function(n){return e.map(n,function(e){var n;return(n={})[t]=e,n})}}},Fc.getFunctorComposition=function(e,t){var n=Fd(e,t);return{map:function(e,t){return(0,Ft.pipe)(e,n(t))}}},Object.defineProperty(j7,"__esModule",{value:!0}),j7.getApplicativeComposition=j7.getApplicativeMonoid=void 0,j7.getApplicativeMonoid=function(e){var t=(0,Fe.getApplySemigroup)(e);return function(n){return{concat:t(n).concat,empty:e.of(n.empty)}}},j7.getApplicativeComposition=function(e,t){var n=(0,Fc.getFunctorComposition)(e,t).map,r=(0,Fe.ap)(e,t);return{map:n,of:function(n){return e.of(t.of(n))},ap:function(e,t){return(0,Ft.pipe)(e,r(t))}}};var Ff={};Object.defineProperty(Ff,"__esModule",{value:!0}),Ff.bind=Ff.chainFirst=void 0,Ff.chainFirst=function(e){return function(t){return function(n){return e.chain(n,function(n){return e.map(t(n),function(){return n})})}}},Ff.bind=function(e){return function(t,n){return function(r){return e.chain(r,function(r){return e.map(n(r),function(e){var n;return Object.assign({},r,((n={})[t]=e,n))})})}}};var Fp={};Object.defineProperty(Fp,"__esModule",{value:!0}),Fp.tailRec=void 0,Fp.tailRec=function(e,t){for(var n=t(e);"Left"===n._tag;)n=t(n.left);return n.right};var FA={},Fh=D&&D.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),Fm=D&&D.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Fg=D&&D.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&Fh(t,e,n);return Fm(t,e),t};Object.defineProperty(FA,"__esModule",{value:!0}),FA.filterOrElse=FA.chainFirstEitherK=FA.chainEitherK=FA.fromEitherK=FA.chainOptionK=FA.fromOptionK=FA.fromPredicate=FA.fromOption=void 0;var Fy=Fg(Fn);function Fv(e){return function(t){return function(n){return e.fromEither(Fy.isNone(n)?Fy.left(t()):Fy.right(n.value))}}}function Fx(e){var t=Fv(e);return function(e){var n=t(e);return function(e){return(0,Ft.flow)(e,n)}}}function Fb(e){return function(t){return(0,Ft.flow)(t,e.fromEither)}}FA.fromOption=Fv,FA.fromPredicate=function(e){return function(t,n){return function(r){return e.fromEither(t(r)?Fy.right(r):Fy.left(n(r)))}}},FA.fromOptionK=Fx,FA.chainOptionK=function(e,t){var n=Fx(e);return function(e){var r=n(e);return function(e){return function(n){return t.chain(n,r(e))}}}},FA.fromEitherK=Fb,FA.chainEitherK=function(e,t){var n=Fb(e);return function(e){return function(r){return t.chain(r,n(e))}}},FA.chainFirstEitherK=function(e,t){return(0,Ft.flow)(Fb(e),(0,Ff.chainFirst)(t))},FA.filterOrElse=function(e,t){return function(n,r){return function(i){return t.chain(i,function(t){return e.fromEither(n(t)?Fy.right(t):Fy.left(r(t)))})}}};var FC={};Object.defineProperty(FC,"__esModule",{value:!0}),FC.right=FC.left=FC.flap=FC.Functor=FC.Bifunctor=FC.URI=FC.bimap=FC.mapLeft=FC.map=FC.separated=void 0,FC.separated=function(e,t){return{left:e,right:t}},FC.map=function(e){return function(t){return(0,FC.separated)((0,FC.left)(t),e((0,FC.right)(t)))}},FC.mapLeft=function(e){return function(t){return(0,FC.separated)(e((0,FC.left)(t)),(0,FC.right)(t))}},FC.bimap=function(e,t){return function(n){return(0,FC.separated)(e((0,FC.left)(n)),t((0,FC.right)(n)))}},FC.URI="Separated",FC.Bifunctor={URI:FC.URI,mapLeft:function(e,t){return(0,Ft.pipe)(e,(0,FC.mapLeft)(t))},bimap:function(e,t,n){return(0,Ft.pipe)(e,(0,FC.bimap)(t,n))}},FC.Functor={URI:FC.URI,map:function(e,t){return(0,Ft.pipe)(e,(0,FC.map)(t))}},FC.flap=(0,Fc.flap)(FC.Functor),FC.left=function(e){return e.left},FC.right=function(e){return e.right};var FS={},Fw=D&&D.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),FI=D&&D.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),F_=D&&D.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&Fw(t,e,n);return FI(t,e),t};Object.defineProperty(FS,"__esModule",{value:!0}),FS.filterE=FS.witherDefault=FS.wiltDefault=void 0;var FT=F_(Fn);FS.wiltDefault=function(e,t){return function(n){var r=e.traverse(n);return function(e,i){return n.map(r(e,i),t.separate)}}},FS.witherDefault=function(e,t){return function(n){var r=e.traverse(n);return function(e,i){return n.map(r(e,i),t.compact)}}},FS.filterE=function(e){return function(t){var n=e.wither(t);return function(e){return function(r){return n(r,function(n){return t.map(e(n),function(e){return e?FT.some(n):FT.none})})}}}},Br=D&&D.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),Bi=D&&D.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Bo=D&&D.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&Br(t,e,n);return Bi(t,e),t},Object.defineProperty(j8,"__esModule",{value:!0}),j8.fold=j8.match=j8.foldW=j8.matchW=j8.isRight=j8.isLeft=j8.fromOption=j8.fromPredicate=j8.FromEither=j8.MonadThrow=j8.throwError=j8.ChainRec=j8.Extend=j8.extend=j8.Alt=j8.alt=j8.altW=j8.Bifunctor=j8.mapLeft=j8.bimap=j8.Traversable=j8.sequence=j8.traverse=j8.Foldable=j8.reduceRight=j8.foldMap=j8.reduce=j8.Monad=j8.Chain=j8.chain=j8.chainW=j8.Applicative=j8.Apply=j8.ap=j8.apW=j8.Pointed=j8.of=j8.Functor=j8.map=j8.getAltValidation=j8.getApplicativeValidation=j8.getWitherable=j8.getFilterable=j8.getCompactable=j8.getSemigroup=j8.getEq=j8.getShow=j8.URI=j8.right=j8.left=void 0,j8.getValidation=j8.getValidationMonoid=j8.getValidationSemigroup=j8.getApplyMonoid=j8.getApplySemigroup=j8.either=j8.stringifyJSON=j8.parseJSON=j8.sequenceArray=j8.traverseArray=j8.traverseArrayWithIndex=j8.traverseReadonlyArrayWithIndex=j8.traverseReadonlyNonEmptyArrayWithIndex=j8.ApT=j8.apSW=j8.apS=j8.bindW=j8.bind=j8.bindTo=j8.Do=j8.exists=j8.elem=j8.toError=j8.toUnion=j8.chainNullableK=j8.fromNullableK=j8.tryCatchK=j8.tryCatch=j8.fromNullable=j8.orElse=j8.orElseW=j8.swap=j8.filterOrElseW=j8.filterOrElse=j8.chainOptionK=j8.fromOptionK=j8.duplicate=j8.flatten=j8.flattenW=j8.chainFirstW=j8.chainFirst=j8.apSecondW=j8.apSecond=j8.apFirstW=j8.apFirst=j8.flap=j8.getOrElse=j8.getOrElseW=void 0,Ba=Bo(Fn),j8.left=Ba.left,j8.right=Ba.right,Bu=function(e,t){return(0,Ft.pipe)(e,(0,j8.map)(t))},Bs=function(e,t){return(0,Ft.pipe)(e,(0,j8.ap)(t))},Bl=function(e,t){return(0,Ft.pipe)(e,(0,j8.chain)(t))},Bc=function(e,t,n){return(0,Ft.pipe)(e,(0,j8.reduce)(t,n))},Bd=function(e){return function(t,n){var r=(0,j8.foldMap)(e);return(0,Ft.pipe)(t,r(n))}},Bf=function(e,t,n){return(0,Ft.pipe)(e,(0,j8.reduceRight)(t,n))},Bp=function(e){var t=(0,j8.traverse)(e);return function(e,n){return(0,Ft.pipe)(e,t(n))}},BA=function(e,t,n){return(0,Ft.pipe)(e,(0,j8.bimap)(t,n))},Bh=function(e,t){return(0,Ft.pipe)(e,(0,j8.mapLeft)(t))},Bm=function(e,t){return(0,Ft.pipe)(e,(0,j8.alt)(t))},Bg=function(e,t){return(0,Ft.pipe)(e,(0,j8.extend)(t))},By=function(e,t){return(0,Fp.tailRec)(t(e),function(e){return(0,j8.isLeft)(e)?(0,j8.right)((0,j8.left)(e.left)):(0,j8.isLeft)(e.right)?(0,j8.left)(t(e.right.left)):(0,j8.right)((0,j8.right)(e.right.right))})},j8.URI="Either",j8.getShow=function(e,t){return{show:function(n){return(0,j8.isLeft)(n)?"left(".concat(e.show(n.left),")"):"right(".concat(t.show(n.right),")")}}},j8.getEq=function(e,t){return{equals:function(n,r){return n===r||((0,j8.isLeft)(n)?(0,j8.isLeft)(r)&&e.equals(n.left,r.left):(0,j8.isRight)(r)&&t.equals(n.right,r.right))}}},j8.getSemigroup=function(e){return{concat:function(t,n){return(0,j8.isLeft)(n)?t:(0,j8.isLeft)(t)?n:(0,j8.right)(e.concat(t.right,n.right))}}},j8.getCompactable=function(e){var t=(0,j8.left)(e.empty);return{URI:j8.URI,_E:void 0,compact:function(e){return(0,j8.isLeft)(e)?e:"None"===e.right._tag?t:(0,j8.right)(e.right.value)},separate:function(e){return(0,j8.isLeft)(e)?(0,FC.separated)(e,e):(0,j8.isLeft)(e.right)?(0,FC.separated)((0,j8.right)(e.right.left),t):(0,FC.separated)(t,(0,j8.right)(e.right.right))}}},j8.getFilterable=function(e){var t=(0,j8.left)(e.empty),n=(0,j8.getCompactable)(e),r=n.compact,i=n.separate;return{URI:j8.URI,_E:void 0,map:Bu,compact:r,separate:i,filter:function(e,n){return(0,j8.isLeft)(e)||n(e.right)?e:t},filterMap:function(e,n){if((0,j8.isLeft)(e))return e;var r=n(e.right);return"None"===r._tag?t:(0,j8.right)(r.value)},partition:function(e,n){return(0,j8.isLeft)(e)?(0,FC.separated)(e,e):n(e.right)?(0,FC.separated)(t,(0,j8.right)(e.right)):(0,FC.separated)((0,j8.right)(e.right),t)},partitionMap:function(e,n){if((0,j8.isLeft)(e))return(0,FC.separated)(e,e);var r=n(e.right);return(0,j8.isLeft)(r)?(0,FC.separated)((0,j8.right)(r.left),t):(0,FC.separated)(t,(0,j8.right)(r.right))}}},j8.getWitherable=function(e){var t=(0,j8.getFilterable)(e),n=(0,j8.getCompactable)(e);return{URI:j8.URI,_E:void 0,map:Bu,compact:t.compact,separate:t.separate,filter:t.filter,filterMap:t.filterMap,partition:t.partition,partitionMap:t.partitionMap,traverse:Bp,sequence:j8.sequence,reduce:Bc,foldMap:Bd,reduceRight:Bf,wither:(0,FS.witherDefault)(j8.Traversable,n),wilt:(0,FS.wiltDefault)(j8.Traversable,n)}},j8.getApplicativeValidation=function(e){return{URI:j8.URI,_E:void 0,map:Bu,ap:function(t,n){return(0,j8.isLeft)(t)?(0,j8.isLeft)(n)?(0,j8.left)(e.concat(t.left,n.left)):t:(0,j8.isLeft)(n)?n:(0,j8.right)(t.right(n.right))},of:j8.of}},j8.getAltValidation=function(e){return{URI:j8.URI,_E:void 0,map:Bu,alt:function(t,n){if((0,j8.isRight)(t))return t;var r=n();return(0,j8.isLeft)(r)?(0,j8.left)(e.concat(t.left,r.left)):r}}},j8.map=function(e){return function(t){return(0,j8.isLeft)(t)?t:(0,j8.right)(e(t.right))}},j8.Functor={URI:j8.URI,map:Bu},j8.of=j8.right,j8.Pointed={URI:j8.URI,of:j8.of},j8.apW=function(e){return function(t){return(0,j8.isLeft)(t)?t:(0,j8.isLeft)(e)?e:(0,j8.right)(t.right(e.right))}},j8.ap=j8.apW,j8.Apply={URI:j8.URI,map:Bu,ap:Bs},j8.Applicative={URI:j8.URI,map:Bu,ap:Bs,of:j8.of},j8.chainW=function(e){return function(t){return(0,j8.isLeft)(t)?t:e(t.right)}},j8.chain=j8.chainW,j8.Chain={URI:j8.URI,map:Bu,ap:Bs,chain:Bl},j8.Monad={URI:j8.URI,map:Bu,ap:Bs,of:j8.of,chain:Bl},j8.reduce=function(e,t){return function(n){return(0,j8.isLeft)(n)?e:t(e,n.right)}},j8.foldMap=function(e){return function(t){return function(n){return(0,j8.isLeft)(n)?e.empty:t(n.right)}}},j8.reduceRight=function(e,t){return function(n){return(0,j8.isLeft)(n)?e:t(n.right,e)}},j8.Foldable={URI:j8.URI,reduce:Bc,foldMap:Bd,reduceRight:Bf},j8.traverse=function(e){return function(t){return function(n){return(0,j8.isLeft)(n)?e.of((0,j8.left)(n.left)):e.map(t(n.right),j8.right)}}},j8.sequence=function(e){return function(t){return(0,j8.isLeft)(t)?e.of((0,j8.left)(t.left)):e.map(t.right,j8.right)}},j8.Traversable={URI:j8.URI,map:Bu,reduce:Bc,foldMap:Bd,reduceRight:Bf,traverse:Bp,sequence:j8.sequence},j8.bimap=function(e,t){return function(n){return(0,j8.isLeft)(n)?(0,j8.left)(e(n.left)):(0,j8.right)(t(n.right))}},j8.mapLeft=function(e){return function(t){return(0,j8.isLeft)(t)?(0,j8.left)(e(t.left)):t}},j8.Bifunctor={URI:j8.URI,bimap:BA,mapLeft:Bh},j8.altW=function(e){return function(t){return(0,j8.isLeft)(t)?e():t}},j8.alt=j8.altW,j8.Alt={URI:j8.URI,map:Bu,alt:Bm},j8.extend=function(e){return function(t){return(0,j8.isLeft)(t)?t:(0,j8.right)(e(t))}},j8.Extend={URI:j8.URI,map:Bu,extend:Bg},j8.ChainRec={URI:j8.URI,map:Bu,ap:Bs,chain:Bl,chainRec:By},j8.throwError=j8.left,j8.MonadThrow={URI:j8.URI,map:Bu,ap:Bs,of:j8.of,chain:Bl,throwError:j8.throwError},j8.FromEither={URI:j8.URI,fromEither:Ft.identity},j8.fromPredicate=(0,FA.fromPredicate)(j8.FromEither),j8.fromOption=(0,FA.fromOption)(j8.FromEither),j8.isLeft=Ba.isLeft,j8.isRight=Ba.isRight,j8.matchW=function(e,t){return function(n){return(0,j8.isLeft)(n)?e(n.left):t(n.right)}},j8.foldW=j8.matchW,j8.match=j8.matchW,j8.fold=j8.match,j8.getOrElseW=function(e){return function(t){return(0,j8.isLeft)(t)?e(t.left):t.right}},j8.getOrElse=j8.getOrElseW,j8.flap=(0,Fc.flap)(j8.Functor),j8.apFirst=(0,Fe.apFirst)(j8.Apply),j8.apFirstW=j8.apFirst,j8.apSecond=(0,Fe.apSecond)(j8.Apply),j8.apSecondW=j8.apSecond,j8.chainFirst=(0,Ff.chainFirst)(j8.Chain),j8.chainFirstW=j8.chainFirst,j8.flattenW=(0,j8.chainW)(Ft.identity),j8.flatten=j8.flattenW,j8.duplicate=(0,j8.extend)(Ft.identity),j8.fromOptionK=(0,FA.fromOptionK)(j8.FromEither),j8.chainOptionK=(0,FA.chainOptionK)(j8.FromEither,j8.Chain),j8.filterOrElse=(0,FA.filterOrElse)(j8.FromEither,j8.Chain),j8.filterOrElseW=j8.filterOrElse,j8.swap=function(e){return(0,j8.isLeft)(e)?(0,j8.right)(e.left):(0,j8.left)(e.right)},j8.orElseW=function(e){return function(t){return(0,j8.isLeft)(t)?e(t.left):t}},j8.orElse=j8.orElseW,j8.fromNullable=function(e){return function(t){return null==t?(0,j8.left)(e):(0,j8.right)(t)}},j8.tryCatch=function(e,t){try{return(0,j8.right)(e())}catch(e){return(0,j8.left)(t(e))}},j8.tryCatchK=function(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return(0,j8.tryCatch)(function(){return e.apply(void 0,n)},t)}},j8.fromNullableK=function(e){var t=(0,j8.fromNullable)(e);return function(e){return(0,Ft.flow)(e,t)}},j8.chainNullableK=function(e){var t=(0,j8.fromNullableK)(e);return function(e){return(0,j8.chain)(t(e))}},j8.toUnion=(0,j8.foldW)(Ft.identity,Ft.identity),j8.toError=function(e){return e instanceof Error?e:Error(String(e))},j8.elem=function e(t){return function(n,r){if(void 0===r){var i=e(t);return function(e){return i(n,e)}}return!(0,j8.isLeft)(r)&&t.equals(n,r.right)}},j8.exists=function(e){return function(t){return!(0,j8.isLeft)(t)&&e(t.right)}},j8.Do=(0,j8.of)(Ba.emptyRecord),j8.bindTo=(0,Fc.bindTo)(j8.Functor),j8.bind=(0,Ff.bind)(j8.Chain),j8.bindW=j8.bind,j8.apS=(0,Fe.apS)(j8.Apply),j8.apSW=j8.apS,j8.ApT=(0,j8.of)(Ba.emptyReadonlyArray),j8.traverseReadonlyNonEmptyArrayWithIndex=function(e){return function(t){var n=e(0,Ba.head(t));if((0,j8.isLeft)(n))return n;for(var r=[n.right],i=1;i<t.length;i++){var o=e(i,t[i]);if((0,j8.isLeft)(o))return o;r.push(o.right)}return(0,j8.right)(r)}},j8.traverseReadonlyArrayWithIndex=function(e){var t=(0,j8.traverseReadonlyNonEmptyArrayWithIndex)(e);return function(e){return Ba.isNonEmpty(e)?t(e):j8.ApT}},j8.traverseArrayWithIndex=j8.traverseReadonlyArrayWithIndex,j8.traverseArray=function(e){return(0,j8.traverseReadonlyArrayWithIndex)(function(t,n){return e(n)})},j8.sequenceArray=(0,j8.traverseArray)(Ft.identity),j8.parseJSON=function(e,t){return(0,j8.tryCatch)(function(){return JSON.parse(e)},t)},j8.stringifyJSON=function(e,t){return(0,j8.tryCatch)(function(){var t=JSON.stringify(e);if("string"!=typeof t)throw Error("Converting unsupported structure to JSON");return t},t)},j8.either={URI:j8.URI,map:Bu,of:j8.of,ap:Bs,chain:Bl,reduce:Bc,foldMap:Bd,reduceRight:Bf,traverse:Bp,sequence:j8.sequence,bimap:BA,mapLeft:Bh,alt:Bm,extend:Bg,chainRec:By,throwError:j8.throwError},j8.getApplySemigroup=(0,Fe.getApplySemigroup)(j8.Apply),j8.getApplyMonoid=(0,j7.getApplicativeMonoid)(j8.Applicative),j8.getValidationSemigroup=function(e,t){return(0,Fe.getApplySemigroup)((0,j8.getApplicativeValidation)(e))(t)},j8.getValidationMonoid=function(e,t){return(0,j7.getApplicativeMonoid)((0,j8.getApplicativeValidation)(e))(t)},j8.getValidation=function(e){var t=(0,j8.getApplicativeValidation)(e).ap,n=(0,j8.getAltValidation)(e).alt;return{URI:j8.URI,_E:void 0,map:Bu,of:j8.of,chain:Bl,bimap:BA,mapLeft:Bh,reduce:Bc,foldMap:Bd,reduceRight:Bf,extend:Bg,traverse:Bp,sequence:j8.sequence,chainRec:By,throwError:j8.throwError,ap:t,alt:n}};var Fk=(Bv=function(e,t){return(Bv=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Bv(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),FO=function(){return(FO=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},FR=function(e,t,n){if(n||2==arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},FE=function(e,t,n){return eO([{value:e,context:t,message:n}])},Fj=function(){function e(e,t,n,r){this.name=e,this.is=t,this.validate=n,this.encode=r,this.decode=this.decode.bind(this)}return e.prototype.pipe=function(t,n){var r=this;return void 0===n&&(n="pipe(".concat(this.name,", ").concat(t.name,")")),new e(n,t.is,function(e,n){var i=r.validate(e,n);return dr(i)?i:t.validate(i.right,n)},this.encode===FF&&t.encode===FF?FF:function(e){return r.encode(t.encode(e))})},e.prototype.asDecoder=function(){return this},e.prototype.asEncoder=function(){return this},e.prototype.decode=function(e){return this.validate(e,[{key:"",type:this,actual:e}])},e}(),FF=function(e){return e};function FM(e){return e.displayName||e.name||"<function".concat(e.length,">")}function FU(e,t,n,r){for(var i=e.length,o=Array(i+1),a=0;a<i;a++)o[a]=e[a];return o[i]={key:t,type:n,actual:r},o}function FL(e,t){for(var n=t.length,r=0;r<n;r++)e.push(t[r])}var FK=Object.prototype.hasOwnProperty;function FB(e){return Object.keys(e).map(function(t){return"".concat(t,": ").concat(e[t].name)}).join(", ")}function FP(e){for(var t=0;t<e.length;t++)if(e[t].encode!==FF)return!1;return!0}function FW(e){return"{ ".concat(FB(e)," }")}function FD(e){return"Partial<".concat(e,">")}function FN(e){var t;if(FG(e)){var n=e.value;if(Me.is(n))return(t={})[n]=null,t}else{if("KeyofType"===e._tag)return e.keys;if(FJ(e)){var r=e.types.map(function(e){return FN(e)});return r.some(F5.is)?void 0:Object.assign.apply(Object,FR([{}],r,!1))}}}function Fq(e){return"("+e.map(function(e){return e.name}).join(" | ")+")"}function FQ(e,t){for(var n=!0,r=!0,i=!Mc.is(e),o=0;o<t.length;o++){var a=t[o];a!==e&&(n=!1),Mc.is(a)&&(r=!1)}if(n)return e;if(r)return t[t.length-1];for(var u={},s=0;s<t.length;s++){var a=t[s];for(var l in a)(!FK.call(u,l)||i||a[l]!==e[l])&&(u[l]=a[l])}return u}function FV(e,t){for(var n=Object.getOwnPropertyNames(e),r=!1,i={},o=0;o<n.length;o++){var a=n[o];FK.call(t,a)?i[a]=e[a]:r=!0}return r?i:e}var Fz={};function FY(e,t){for(var n=[],r=0;r<e.length;r++){var i=e[r];-1!==t.indexOf(i)&&n.push(i)}return n}function FH(e){return"AnyType"===e._tag}function FG(e){return"LiteralType"===e._tag}function FZ(e){return"InterfaceType"===e._tag}function FJ(e){return"UnionType"===e._tag}var F$=[];function FX(e){if(-1!==F$.indexOf(e))return Fz;if(FZ(e)||"StrictType"===e._tag){var t=Fz;for(var n in e.props){var r=e.props[n];FG(r)&&(t===Fz&&(t={}),t[n]=[r.value])}return t}if("ExactType"===e._tag||"RefinementType"===e._tag)return FX(e.type);if("IntersectionType"===e._tag)return e.types.reduce(function(e,t){return function(e,t){if(e===Fz)return t;if(t===Fz)return e;var n=Object.assign({},e);for(var r in t)if(FK.call(e,r)){var i=FY(e[r],t[r]);if(i.length>0)n[r]=i;else{n=Fz;break}}else n[r]=t[r];return n}(e,FX(t))},Fz);if(FJ(e))return e.types.slice(1).reduce(function(e,t){return function(e,t){if(e===Fz||t===Fz)return Fz;var n=Fz;for(var r in e)FK.call(t,r)&&0===FY(e[r],t[r]).length&&(n===Fz&&(n={}),n[r]=e[r].concat(t[r]));return n}(e,FX(t))},FX(e.types[0]));if("RecursiveType"===e._tag){F$.push(e);var i=FX(e.type);return F$.pop(),i}return Fz}function F0(e){for(var t=FX(e[0]),n=Object.keys(t),r=e.length,i=0;i<n.length;i++){var o=function(n){for(var i=t[n].slice(),o=[t[n]],a=1;a<r;a++){var u=FX(e[a])[n];if(void 0===u||u.some(function(e){return -1!==i.indexOf(e)}))return"continue-keys";i.push.apply(i,u),o.push(u)}return{value:[n,o]}}(n[i]);if("object"==typeof o)return o.value;if("continue-keys"===o)continue}}var F1=function(e){function t(){var t=e.call(this,"null",function(e){return null===e},function(e,n){return t.is(e)?eR(e):FE(e,n)},FF)||this;return t._tag="NullType",t}return Fk(t,e),t}(Fj),F2=new F1,F6=function(e){function t(){var t=e.call(this,"undefined",function(e){return void 0===e},function(e,n){return t.is(e)?eR(e):FE(e,n)},FF)||this;return t._tag="UndefinedType",t}return Fk(t,e),t}(Fj),F5=new F6,F3=function(e){function t(){var t=e.call(this,"void",F5.is,F5.validate,FF)||this;return t._tag="VoidType",t}return Fk(t,e),t}(Fj),F9=new F3,F4=function(e){function t(){var t=e.call(this,"unknown",function(e){return!0},eR,FF)||this;return t._tag="UnknownType",t}return Fk(t,e),t}(Fj),F8=new F4,F7=function(e){function t(){var t=e.call(this,"string",function(e){return"string"==typeof e},function(e,n){return t.is(e)?eR(e):FE(e,n)},FF)||this;return t._tag="StringType",t}return Fk(t,e),t}(Fj),Me=new F7,Mt=function(e){function t(){var t=e.call(this,"number",function(e){return"number"==typeof e},function(e,n){return t.is(e)?eR(e):FE(e,n)},FF)||this;return t._tag="NumberType",t}return Fk(t,e),t}(Fj),Mn=new Mt,Mr=function(e){function t(){var t=e.call(this,"bigint",function(e){return"bigint"==typeof e},function(e,n){return t.is(e)?eR(e):FE(e,n)},FF)||this;return t._tag="BigIntType",t}return Fk(t,e),t}(Fj),Mi=new Mr,Mo=function(e){function t(){var t=e.call(this,"boolean",function(e){return"boolean"==typeof e},function(e,n){return t.is(e)?eR(e):FE(e,n)},FF)||this;return t._tag="BooleanType",t}return Fk(t,e),t}(Fj),Ma=new Mo,Mu=function(e){function t(){var t=e.call(this,"UnknownArray",Array.isArray,function(e,n){return t.is(e)?eR(e):FE(e,n)},FF)||this;return t._tag="AnyArrayType",t}return Fk(t,e),t}(Fj),Ms=new Mu,Ml=function(e){function t(){var t=e.call(this,"UnknownRecord",function(e){var t=Object.prototype.toString.call(e);return"[object Object]"===t||"[object Window]"===t},function(e,n){return t.is(e)?eR(e):FE(e,n)},FF)||this;return t._tag="AnyDictionaryType",t}return Fk(t,e),t}(Fj),Mc=new Ml,Md=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r,i)||this;return a.value=o,a._tag="LiteralType",a}return Fk(t,e),t}(Fj);function Mf(e,t){void 0===t&&(t=JSON.stringify(e));var n=function(t){return t===e};return new Md(t,n,function(t,r){return n(t)?eR(e):FE(t,r)},FF,e)}var Mp=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r,i)||this;return a.keys=o,a._tag="KeyofType",a}return Fk(t,e),t}(Fj),MA=function(e){function t(t,n,r,i,o,a){var u=e.call(this,t,n,r,i)||this;return u.type=o,u.predicate=a,u._tag="RefinementType",u}return Fk(t,e),t}(Fj);function Mh(e,t,n){return Mz(e,t,n)}var Mm=Mh(Mn,function(e){return Number.isInteger(e)},"Int"),Mg=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r,i)||this;return a.runDefinition=o,a._tag="RecursiveType",a}return Fk(t,e),t}(Fj);function My(e,t){var n,r=function(){return n||((n=t(i)).name=e),n},i=new Mg(e,function(e){return r().is(e)},function(e,t){return r().validate(e,t)},function(e){return r().encode(e)},r);return i}Object.defineProperty(Mg.prototype,"type",{get:function(){return this.runDefinition()},enumerable:!0,configurable:!0});var Mv=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r,i)||this;return a.type=o,a._tag="ArrayType",a}return Fk(t,e),t}(Fj);function Mx(e,t){return void 0===t&&(t="Array<".concat(e.name,">")),new Mv(t,function(t){return Ms.is(t)&&t.every(e.is)},function(t,n){var r=Ms.validate(t,n);if(dr(r))return r;for(var i=r.right,o=i.length,a=i,u=[],s=0;s<o;s++){var l=i[s],c=e.validate(l,FU(n,String(s),e,l));if(dr(c))FL(u,c.left);else{var d=c.right;d!==l&&(a===i&&(a=i.slice()),a[s]=d)}}return u.length>0?eO(u):eR(a)},e.encode===FF?FF:function(t){return t.map(e.encode)},e)}var Mb=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r,i)||this;return a.props=o,a._tag="InterfaceType",a}return Fk(t,e),t}(Fj);function MC(e,t){void 0===t&&(t=FW(e));var n=Object.keys(e),r=n.map(function(t){return e[t]}),i=n.length;return new Mb(t,function(e){if(Mc.is(e)){for(var t=0;t<i;t++){var o=n[t],a=e[o];if(void 0===a&&!FK.call(e,o)||!r[t].is(a))return!1}return!0}return!1},function(e,t){var o=Mc.validate(e,t);if(dr(o))return o;for(var a=o.right,u=a,s=[],l=0;l<i;l++){var c=n[l],d=u[c],f=r[l],p=f.validate(d,FU(t,c,f,d));if(dr(p))FL(s,p.left);else{var A=p.right;A===d&&(void 0!==A||FK.call(u,c))||(u===a&&(u=FO({},a)),u[c]=A)}}return s.length>0?eO(s):eR(u)},FP(r)?FF:function(e){for(var t=FO({},e),o=0;o<i;o++){var a=n[o],u=r[o].encode;u!==FF&&(t[a]=u(e[a]))}return t},e)}var MS=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r,i)||this;return a.props=o,a._tag="PartialType",a}return Fk(t,e),t}(Fj),Mw=function(e){function t(t,n,r,i,o,a){var u=e.call(this,t,n,r,i)||this;return u.domain=o,u.codomain=a,u._tag="DictionaryType",u}return Fk(t,e),t}(Fj);function MI(e,t,n){var r,i,o,a,u=FN(e);return u?(r=Object.keys(u),void 0===(i=n)&&(i="{ [K in ".concat(e.name,"]: ").concat(t.name," }")),o=r.length,new Mw(i,function(e){return Mc.is(e)&&r.every(function(n){return t.is(e[n])})},function(e,n){var i=Mc.validate(e,n);if(dr(i))return i;for(var a=i.right,u={},s=[],l=!1,c=0;c<o;c++){var d=r[c],f=a[d],p=t.validate(f,FU(n,d,t,f));if(dr(p))FL(s,p.left);else{var A=p.right;l=l||A!==f,u[d]=A}}return s.length>0?eO(s):eR(l||Object.keys(a).length!==o?u:a)},t.encode===FF?FF:function(e){for(var n={},i=0;i<o;i++){var a=r[i];n[a]=t.encode(e[a])}return n},e,t)):(void 0===(a=n)&&(a="{ [K in ".concat(e.name,"]: ").concat(t.name," }")),new Mw(a,function(n){return Mc.is(n)?Object.keys(n).every(function(r){return e.is(r)&&t.is(n[r])}):FH(t)&&Array.isArray(n)},function(n,r){if(Mc.is(n)){for(var i={},o=[],a=Object.keys(n),u=a.length,s=!1,l=0;l<u;l++){var c=a[l],d=n[c],f=e.validate(c,FU(r,c,e,c));if(dr(f))FL(o,f.left);else{var p=f.right;s=s||p!==c,c=p;var A=t.validate(d,FU(r,c,t,d));if(dr(A))FL(o,A.left);else{var h=A.right;s=s||h!==d,i[c]=h}}}return o.length>0?eO(o):eR(s?i:n)}return FH(t)&&Array.isArray(n)?eR(n):FE(n,r)},e.encode===FF&&t.encode===FF?FF:function(n){for(var r={},i=Object.keys(n),o=i.length,a=0;a<o;a++){var u=i[a];r[String(e.encode(u))]=t.encode(n[u])}return r},e,t))}var M_=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r,i)||this;return a.types=o,a._tag="UnionType",a}return Fk(t,e),t}(Fj);function MT(e,t){void 0===t&&(t=Fq(e));var n=F0(e);if(void 0===n||!(e.length>0))return new M_(t,function(t){return e.some(function(e){return e.is(t)})},function(t,n){for(var r=[],i=0;i<e.length;i++){var o=e[i],a=o.validate(t,FU(n,String(i),o,t));if(!dr(a))return eR(a.right);FL(r,a.left)}return eO(r)},FP(e)?FF:function(n){for(var r=0;r<e.length;r++){var i=e[r];if(i.is(n))return i.encode(n)}throw Error("no codec found to encode value in union type ".concat(t))},e);var r=n[0],i=n[1],o=i.length,a=function(e){for(var t=0;t<o;t++)if(-1!==i[t].indexOf(e))return t};return new MB(t,function(t){if(Mc.is(t)){var n=a(t[r]);return void 0!==n&&e[n].is(t)}return!1},function(t,n){var i=Mc.validate(t,n);if(dr(i))return i;var o=i.right,u=a(o[r]);if(void 0===u)return FE(t,n);var s=e[u];return s.validate(o,FU(n,String(u),s,o))},FP(e)?FF:function(n){var i=a(n[r]);if(void 0===i)throw Error("no codec found to encode value in union codec ".concat(t));return e[i].encode(n)},e,r)}var Mk=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r,i)||this;return a.types=o,a._tag="IntersectionType",a}return Fk(t,e),t}(Fj),MO=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r,i)||this;return a.types=o,a._tag="TupleType",a}return Fk(t,e),t}(Fj),MR=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r,i)||this;return a.type=o,a._tag="ReadonlyType",a}return Fk(t,e),t}(Fj),ME=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r,i)||this;return a.type=o,a._tag="ReadonlyArrayType",a}return Fk(t,e),t}(Fj);function Mj(e,t){void 0===t&&(t="ReadonlyArray<".concat(e.name,">"));var n=Mx(e);return new ME(t,n.is,n.validate,n.encode,e)}var MF=function(e,t){return MU(MC(e),t)},MM=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r,i)||this;return a.type=o,a._tag="ExactType",a}return Fk(t,e),t}(Fj);function MU(e,t){void 0===t&&(t=FZ(e)?"{| ".concat(FB(e.props)," |}"):"PartialType"===e._tag?FD("{| ".concat(FB(e.props)," |}")):"Exact<".concat(e.name,">"));var n=function e(t){switch(t._tag){case"RefinementType":case"ReadonlyType":return e(t.type);case"InterfaceType":case"StrictType":case"PartialType":return t.props;case"IntersectionType":return t.types.reduce(function(t,n){return Object.assign(t,e(n))},{})}}(e);return new MM(t,e.is,function(t,r){var i=Mc.validate(t,r);if(dr(i))return i;var o=e.validate(t,r);return dr(o)?o:eR(FV(o.right,n))},function(t){return e.encode(FV(t,n))},e)}var ML=function(e){function t(){var t=e.call(this,"Function",function(e){return"function"==typeof e},function(e,n){return t.is(e)?eR(e):FE(e,n)},FF)||this;return t._tag="FunctionType",t}return Fk(t,e),t}(Fj),MK=new ML,MB=function(e){function t(t,n,r,i,o,a){var u=e.call(this,t,n,r,i,o)||this;return u.tag=a,u}return Fk(t,e),t}(M_),MP=function(e){return[{key:"",type:e}]},MW=function(e){function t(){var t=e.call(this,"never",function(e){return!1},function(e,t){return FE(e,t)},function(){throw Error("cannot encode never")})||this;return t._tag="NeverType",t}return Fk(t,e),t}(Fj),MD=new MW,MN=function(e){function t(){var t=e.call(this,"any",function(e){return!0},eR,FF)||this;return t._tag="AnyType",t}return Fk(t,e),t}(Fj),Mq=new MN,MQ=function(e){function t(){var t=e.call(this,"object",function(e){return null!==e&&"object"==typeof e},function(e,n){return t.is(e)?eR(e):FE(e,n)},FF)||this;return t._tag="ObjectType",t}return Fk(t,e),t}(Fj),MV=new MQ;function Mz(e,t,n){return void 0===n&&(n="(".concat(e.name," | ").concat(FM(t),")")),new MA(n,function(n){return e.is(n)&&t(n)},function(n,r){var i=e.validate(n,r);if(dr(i))return i;var o=i.right;return t(o)?eR(o):FE(o,r)},e.encode,e,t)}let MY=N(Object.freeze(Object.defineProperty({__proto__:null,AnyArrayType:Mu,AnyDictionaryType:Ml,AnyType:MN,Array:Ms,ArrayType:Mv,BigIntType:Mr,BooleanType:Mo,Dictionary:Mc,DictionaryType:Mw,ExactType:MM,Function:MK,FunctionType:ML,Int:Mm,Integer:Mz(Mn,Number.isInteger,"Integer"),InterfaceType:Mb,IntersectionType:Mk,KeyofType:Mp,LiteralType:Md,NeverType:MW,NullType:F1,NumberType:Mt,ObjectType:MQ,PartialType:MS,ReadonlyArrayType:ME,ReadonlyType:MR,RecursiveType:Mg,RefinementType:MA,StrictType:function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r,i)||this;return a.props=o,a._tag="StrictType",a}return Fk(t,e),t}(Fj),StringType:F7,TaggedUnionType:MB,TupleType:MO,Type:Fj,UndefinedType:F6,UnionType:M_,UnknownArray:Ms,UnknownRecord:Mc,UnknownType:F4,VoidType:F3,alias:function(e){return function(){return e}},any:Mq,appendContext:FU,array:Mx,bigint:Mi,boolean:Ma,brand:Mh,clean:function(e){return e},dictionary:MI,emptyTags:Fz,exact:MU,failure:FE,failures:eO,getContextEntry:function(e,t){return{key:e,type:t}},getDefaultContext:MP,getDomainKeys:FN,getFunctionName:FM,getIndex:F0,getTags:FX,getValidationError:function(e,t){return{value:e,context:t}},identity:FF,interface:MC,intersection:function(e,t){void 0===t&&(t="(".concat(e.map(function(e){return e.name}).join(" & "),")"));var n=e.length;return new Mk(t,function(t){return e.every(function(e){return e.is(t)})},0===e.length?eR:function(t,r){for(var i=[],o=[],a=0;a<n;a++){var u=e[a],s=u.validate(t,FU(r,String(a),u,t));dr(s)?FL(o,s.left):i.push(s.right)}return o.length>0?eO(o):eR(FQ(t,i))},0===e.length?FF:function(t){return FQ(t,e.map(function(e){return e.encode(t)}))},e)},keyof:function(e,t){void 0===t&&(t=Object.keys(e).map(function(e){return JSON.stringify(e)}).join(" | "));var n=function(t){return Me.is(t)&&FK.call(e,t)};return new Mp(t,n,function(e,t){return n(e)?eR(e):FE(e,t)},FF,e)},literal:Mf,mergeAll:FQ,never:MD,null:F2,nullType:F2,number:Mn,object:MV,partial:function(e,t){void 0===t&&(t=FD(FW(e)));var n=Object.keys(e),r=n.map(function(t){return e[t]}),i=n.length;return new MS(t,function(t){if(Mc.is(t)){for(var r=0;r<i;r++){var o=n[r],a=t[o];if(void 0!==a&&!e[o].is(a))return!1}return!0}return!1},function(t,r){var o=Mc.validate(t,r);if(dr(o))return o;for(var a=o.right,u=a,s=[],l=0;l<i;l++){var c=n[l],d=u[c],f=e[c],p=f.validate(d,FU(r,c,f,d));if(dr(p))void 0!==d&&FL(s,p.left);else{var A=p.right;A!==d&&(u===a&&(u=FO({},a)),u[c]=A)}}return s.length>0?eO(s):eR(u)},FP(r)?FF:function(e){for(var t=FO({},e),o=0;o<i;o++){var a=n[o],u=e[a];void 0!==u&&(t[a]=r[o].encode(u))}return t},e)},readonly:function(e,t){return void 0===t&&(t="Readonly<".concat(e.name,">")),new MR(t,e.is,e.validate,e.encode,e)},readonlyArray:Mj,record:MI,recursion:My,refinement:Mz,strict:MF,string:Me,success:eR,taggedUnion:function(e,t,n){void 0===n&&(n=Fq(t));var r=MT(t,n);return r instanceof MB?r:(console.warn("[io-ts] Cannot build a tagged union for ".concat(n,", returning a de-optimized union")),new MB(n,r.is,r.validate,r.encode,t,e))},tuple:function(e,t){void 0===t&&(t="[".concat(e.map(function(e){return e.name}).join(", "),"]"));var n=e.length;return new MO(t,function(t){return Ms.is(t)&&t.length===n&&e.every(function(e,n){return e.is(t[n])})},function(t,r){var i=Ms.validate(t,r);if(dr(i))return i;for(var o=i.right,a=o.length>n?o.slice(0,n):o,u=[],s=0;s<n;s++){var l=o[s],c=e[s],d=c.validate(l,FU(r,String(s),c,l));if(dr(d))FL(u,d.left);else{var f=d.right;f!==l&&(a===o&&(a=o.slice()),a[s]=f)}}return u.length>0?eO(u):eR(a)},FP(e)?FF:function(t){return e.map(function(e,n){return e.encode(t[n])})},e)},type:MC,undefined:F5,union:MT,unknown:F8,void:F9,voidType:F9},Symbol.toStringTag,{value:"Module"})));var MH={};Object.defineProperty(MH,"__esModule",{value:!0}),MH.ContentPath=void 0,MH.ContentPath={serialize:e=>e.map(e=>e.key).join("::"),current:e=>e[e.length-1],append:(e,t)=>e+"::"+t,make:e=>e.reduce((e,{key:t,type:n})=>t?e.concat({key:t,type:n}):e,[])};var MG={},MZ={};Object.defineProperty(MZ,"__esModule",{value:!0}),MZ.getAssetOrThrow=void 0,MZ.getAssetOrThrow=e=>t=>{let n=e[t];if(!n)throw Error(`Missing asset with id '${t}'!`);return n};var MJ={};Object.defineProperty(MJ,"__esModule",{value:!0}),MJ.getEmbedOrThrow=void 0,MJ.getEmbedOrThrow=e=>t=>{let n=e[t];if(!n)throw Error(`Missing embed with url '${t}'`);return n};var M$={},MX={};let M0=N(eb);function M1(e,t,n){return void 0===n&&(n=e.name),new Fj(n,e.is,e.validate,function(n){return t(e.encode(n))})}let M2=Object.freeze(Object.defineProperty({__proto__:null,mapOutput:M1},Symbol.toStringTag,{value:"Module"}));var M6=Mh(Me,function(e){return e.length>0},"NonEmptyString");function M5(e,t){void 0===t&&(t="NonEmptyArray<"+e.name+">");var n=Mx(e);return new Fj(t,function(e){return n.is(e)&&rs(e)},function(e,t){return ev(n.validate(e,t),cJ(function(n){var r=rv(n);return lP(r)?FE(e,t):eR(r.value)}))},function(e){return n.encode(e)})}function M3(e,t,n){void 0===n&&(n="Set<"+e.name+">");var r=Mx(e),i=Tk(t),o=TS(t);return new Fj(n,function(t){return t instanceof Set&&_l(e.is)(t)},function(e,t){return ev(r.validate(e,t),cJ(function(n){var r=o(n);return r.size!==n.length?FE(e,t):eR(r)}))},function(e){return r.encode(i(e))})}function M9(e,t){return new Fj(e,t,function(e,n){return t(e)?eR(e):FE(e,n)},FF)}var M4=M9("Date",function(e){return e instanceof Date}),M8=function(e,t,n){if(n||2==arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},M7=function(e){return Ue(e.get,em(e.reverseGet,ed))},Ue=function(e,t){return{get:e,set:t}},Ut=function(e){return Us(em(e.get,e_),e.set)},Un=function(e){return function(t){return Ue(function(n){return e.get(t.get(n))},function(n){return function(r){return t.set(e.set(n)(t.get(r)))(r)}})}},Ur=function(e,t){return{getOption:e,reverseGet:t}},Ui=function(e){return Us(e.getOption,function(t){return Ua(t)(e)})},Uo=function(e){return Up(function(t){return function(n){return function(r){return ev(e.getOption(r),lW(function(){return t.of(r)},function(i){return t.map(n(i),function(t){return Ua(t)(e)(r)})}))}}})},Ua=function(e){var t;return t=function(){return e},function(e){return function(n){var r;return ev((r=n,ev(e.getOption(r),la(function(n){var i=t(n);return i===n?r:e.reverseGet(i)}))),lD(function(){return n}))}}},Uu=function(e){return Ur(sJ(e),ec)},Us=function(e,t){return{getOption:e,set:t}},Ul=function(e){return function(t){return function(n){return ev(t.getOption(n),la(function(r){var i=e(r);return i===r?n:t.set(i)(n)}))}}},Uc=function(e){return function(t){var n=Ul(e)(t);return function(e){return ev(n(e),lD(function(){return e}))}}},Ud=function(e){return function(t){return Us(em(t.getOption,lf(e.getOption)),function(n){return Uc(e.set(n))(t)})}},Uf=function(e,t,n){if(n[e]===t)return n;var r=M8([n[0]],n.slice(1),!0);return r[e]=t,r},Up=function(e){return{modifyF:e}};function UA(e){return function(t){return Up(function(n){return function(r){return t.modifyF(n)(e.modifyF(n)(r))}})}}var Uh={URI:"Identity",map:function(e,t){return t(e)},of:ec,ap:function(e,t){return e(t)}},Um=function(e){return{index:e}},Ug=function(e,t){return{get:e,reverseGet:t}},Uy=function(e){return Ur(em(e.get,e_),e.reverseGet)},Uv=function(e){return Us(em(e.get,e_),em(e.reverseGet,ed))},Ux=function(e){return Up(function(t){return function(n){return function(r){return t.map(n(e.get(r)),function(t){return e.reverseGet(t)})}}})},Ub=function(){return Ue(ec,ed)},UC=function(e){return Up(function(t){return function(n){return function(r){return t.map(n(e.get(r)),function(t){return e.set(t)(r)})}}})},US=em(M7,Un),Uw=function(e){return function(t){return Ud(Ui(e))(Ut(t))}},UI=function(e){return em(Ut,Ud(e))},U_=function(e){return function(t){return function(n){var r=t.get(n),i=e(r);return r===i?n:t.set(i)(n)}}},UT=function(e){return function(t){return Ue(function(n){return t.get(n)[e]},function(n){return function(r){var i,o=t.get(r);return n===o[e]?r:t.set(Object.assign({},o,((i={})[e]=n,i)))(r)}})}},Uk=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return Ue(function(n){for(var r=t.get(n),i={},o=0;o<e.length;o++){var a=e[o];i[a]=r[a]}return i},function(n){return function(r){for(var i=t.get(r),o=0;o<e.length;o++){var a=e[o];if(n[a]!==i[a])return t.set(Object.assign({},i,n))(r)}return r}})}},UO=Uw(Ur(ec,e_)),UR=Uw(Ur(sX,eR)),UE=Uw(Ur(function(e){return dr(e)?e_(e.left):eI},eO)),Uj=function(e,t,n){return Ue(em(e.get,t),em(n,e.set))},UF="monocle-ts/Lens",UM={URI:UF,compose:function(e,t){return Un(e)(t)}};let UU=Object.freeze(Object.defineProperty({__proto__:null,Category:{URI:UF,compose:UM.compose,id:Ub},Invariant:{URI:UF,imap:Uj},Semigroupoid:UM,URI:UF,asOptional:Ut,asTraversal:UC,atKey:function(e){return function(t){return ev(t,Un(({at:function(e){return Ue(function(t){return wX(e,t)},lW(function(){return wJ(e)},function(t){return wG(e,t)}))}}).at(e)))}},component:function(e){return function(t){return Ue(function(n){return t.get(n)[e]},function(n){return function(r){var i=t.get(r);if(n===i[e])return r;var o=i.slice();return o[e]=n,t.set(o)(r)}})}},compose:Un,composeIso:US,composeLens:Un,composeOptional:UI,composePrism:Uw,composeTraversal:function(e){return em(UC,UA(e))},filter:function(e){return Uw(Uu(e))},findFirst:function(e){return UI(Us(or(e),function(t){return function(n){return ev(on(e)(n),lW(function(){return n},function(e){return aM(e,t,n)}))}}))},findFirstNonEmpty:function(e){return UI(Us(or(e),function(t){return function(n){return ev(on(e)(n),lW(function(){return n},function(e){return Uf(e,t,n)}))}}))},fromNullable:function(e){return Uw(Ur(lZ,ec))(e)},id:Ub,imap:function(e,t){return function(n){return Uj(n,e,t)}},index:function(e){return em(Ut,function(t){return ev(t,Ud(Um(function(e){return Us(function(t){return i8(e,t)},function(t){return function(n){return ev(i8(e,n),lW(function(){return n},function(){return aM(e,t,n)}))}})}).index(e)))})},indexNonEmpty:function(e){return em(Ut,function(t){return ev(t,Ud(Um(function(e){return Us(function(t){return i8(e,t)},function(t){return function(n){return ev(i8(e,n),lW(function(){return n},function(){return Uf(e,t,n)}))}})}).index(e)))})},key:function(e){return em(Ut,function(t){return ev(t,Ud(Um(function(e){return Us(function(t){return wX(e,t)},function(t){return function(n){return n[e]===t||lP(wX(e,n))?n:wG(e,t)(n)}})}).index(e)))})},left:UE,lens:Ue,modify:U_,modifyF:function(e){return function(t){return function(n){return function(r){return ev(n.get(r),t,function(t){return e.map(t,function(e){return n.set(e)(r)})})}}}},prop:UT,props:Uk,right:UR,some:UO,traverse:function(e){return em(UC,UA(Up(function(t){var n="Identity"===t.URI?e.map:e.traverse(t);return function(e){return function(t){return n(t,e)}}})))}},Symbol.toStringTag,{value:"Module"}));var UL=function(e){return Up(function(t){return function(n){return function(r){return ev(e.getOption(r),lW(function(){return t.of(r)},function(i){return t.map(n(i),function(t){return e.set(t)(r)})}))}}})},UK=function(e){return function(t){return Ur(em(t.getOption,lf(e.getOption)),em(e.reverseGet,t.reverseGet))}},UB=function(e){return function(t){return t.modifyF(Uh)(e)}},UP=function(e){return new UV(e.get,e.reverseGet)},UW=function(e){return new Uz(e.get,e.set)},UD=function(e){return new UY(e.getOption,e.reverseGet)},UN=function(e){return new UG(e.getOption,e.set)},Uq=function(e){return new UZ(e.modifyF)},UQ=function(e,t,n){var r;return n===e[t]?e:Object.assign({},e,((r={})[t]=n,r))},UV=function(){function e(e,t){this.get=e,this.reverseGet=t,this._tag="Iso",this.unwrap=this.get,this.to=this.get,this.wrap=this.reverseGet,this.from=this.reverseGet}return e.prototype.reverse=function(){return UP(Ug(this.reverseGet,this.get))},e.prototype.modify=function(e){var t;return t=this,function(n){return t.reverseGet(e(t.get(n)))}},e.prototype.asLens=function(){return UW(M7(this))},e.prototype.asPrism=function(){return UD(Uy(this))},e.prototype.asOptional=function(){return UN(Uv(this))},e.prototype.asTraversal=function(){return Uq(Ux(this))},e.prototype.asFold=function(){var e=this;return new U$(function(){return function(t){return function(n){return t(e.get(n))}}})},e.prototype.asGetter=function(){var e=this;return new UJ(function(t){return e.get(t)})},e.prototype.asSetter=function(){var e=this;return new UX(function(t){return e.modify(t)})},e.prototype.compose=function(e){return UP(Ug(em(this.get,e.get),em(e.reverseGet,this.reverseGet)))},e.prototype.composeIso=function(e){return this.compose(e)},e.prototype.composeLens=function(e){return UW(ev(this,M7,Un(e)))},e.prototype.composePrism=function(e){return UD(ev(this,Uy,UK(e)))},e.prototype.composeOptional=function(e){return UN(ev(this,Uv,Ud(e)))},e.prototype.composeTraversal=function(e){return Uq(ev(this,Ux,UA(e)))},e.prototype.composeFold=function(e){return this.asFold().compose(e)},e.prototype.composeGetter=function(e){return this.asGetter().compose(e)},e.prototype.composeSetter=function(e){return this.asSetter().compose(e)},e}(),Uz=function(){function e(e,t){this.get=e,this.set=t,this._tag="Lens"}return e.fromPath=function(){var t=e.fromProp();return function(e){var n=t(e[0]);return e.slice(1).reduce(function(e,n){return e.compose(t(n))},n)}},e.fromProp=function(){return function(e){return UW(ev(Ub(),UT(e)))}},e.fromProps=function(){return function(e){return UW(ev(Ub(),Uk.apply(UU,e)))}},e.fromNullableProp=function(){return function(t,n){return new e(function(e){var r=lZ(e[t]);return lP(r)?n:r.value},function(e){return function(n){return UQ(n,t,e)}})}},e.prototype.modify=function(e){return U_(e)(this)},e.prototype.asOptional=function(){return UN(Ut(this))},e.prototype.asTraversal=function(){return Uq(UC(this))},e.prototype.asSetter=function(){var e=this;return new UX(function(t){return e.modify(t)})},e.prototype.asGetter=function(){var e=this;return new UJ(function(t){return e.get(t)})},e.prototype.asFold=function(){var e=this;return new U$(function(){return function(t){return function(n){return t(e.get(n))}}})},e.prototype.compose=function(e){return UW(Un(e)(this))},e.prototype.composeLens=function(e){return this.compose(e)},e.prototype.composeGetter=function(e){return this.asGetter().compose(e)},e.prototype.composeFold=function(e){return this.asFold().compose(e)},e.prototype.composeOptional=function(e){return UN(ev(this,Ut,Ud(e)))},e.prototype.composeTraversal=function(e){return Uq(ev(this,UC,UA(e)))},e.prototype.composeSetter=function(e){return this.asSetter().compose(e)},e.prototype.composeIso=function(e){return UW(ev(this,Un(ev(e,M7))))},e.prototype.composePrism=function(e){return UN(Uw(e)(this))},e}(),UY=function(){function e(e,t){this.getOption=e,this.reverseGet=t,this._tag="Prism"}return e.fromPredicate=function(e){return UD(Uu(e))},e.some=function(){return UH},e.prototype.modify=function(e){var t=this;return function(n){var r=t.modifyOption(e)(n);return lP(r)?n:r.value}},e.prototype.modifyOption=function(e){var t=this;return function(n){return ce.map(t.getOption(n),function(r){var i=e(r);return i===r?n:t.reverseGet(i)})}},e.prototype.set=function(e){return this.modify(function(){return e})},e.prototype.asOptional=function(){return UN(Ui(this))},e.prototype.asTraversal=function(){return Uq(Uo(this))},e.prototype.asSetter=function(){var e=this;return new UX(function(t){return e.modify(t)})},e.prototype.asFold=function(){var e=this;return new U$(function(t){return function(n){return function(r){var i=e.getOption(r);return lP(i)?t.empty:n(i.value)}}})},e.prototype.compose=function(e){return UD(UK(e)(this))},e.prototype.composePrism=function(e){return this.compose(e)},e.prototype.composeOptional=function(e){return UN(ev(this,Ui,Ud(e)))},e.prototype.composeTraversal=function(e){return Uq(ev(this,Uo,UA(e)))},e.prototype.composeFold=function(e){return this.asFold().compose(e)},e.prototype.composeSetter=function(e){return this.asSetter().compose(e)},e.prototype.composeIso=function(e){return UD(ev(this,UK(ev(e,Uy))))},e.prototype.composeLens=function(e){return UN(Ud(Ut(e))(Ui(this)))},e.prototype.composeGetter=function(e){return this.asFold().compose(e.asFold())},e}(),UH=new UY(ec,e_),UG=function(){function e(e,t){this.getOption=e,this.set=t,this._tag="Optional"}return e.fromPath=function(){var t=e.fromNullableProp();return function(e){var n=t(e[0]);return e.slice(1).reduce(function(e,n){return e.compose(t(n))},n)}},e.fromNullableProp=function(){return function(t){return new e(function(e){return lZ(e[t])},function(e){return function(n){return null==n[t]?n:UQ(n,t,e)}})}},e.fromOptionProp=function(){var e=Uz.fromProp();return function(t){return e(t).composePrism(UH)}},e.prototype.modify=function(e){return Uc(e)(this)},e.prototype.modifyOption=function(e){return Ul(e)(this)},e.prototype.asTraversal=function(){return Uq(UL(this))},e.prototype.asFold=function(){var e=this;return new U$(function(t){return function(n){return function(r){var i=e.getOption(r);return lP(i)?t.empty:n(i.value)}}})},e.prototype.asSetter=function(){var e=this;return new UX(function(t){return e.modify(t)})},e.prototype.compose=function(e){return UN(Ud(e)(this))},e.prototype.composeOptional=function(e){return this.compose(e)},e.prototype.composeTraversal=function(e){return Uq(ev(this,UL,UA(e)))},e.prototype.composeFold=function(e){return this.asFold().compose(e)},e.prototype.composeSetter=function(e){return this.asSetter().compose(e)},e.prototype.composeLens=function(e){return UN(ev(this,Ud(ev(e,Ut))))},e.prototype.composePrism=function(e){return UN(ev(this,Ud(ev(e,Ui))))},e.prototype.composeIso=function(e){return UN(ev(this,Ud(ev(e,Uv))))},e.prototype.composeGetter=function(e){return this.asFold().compose(e.asFold())},e}(),UZ=function(){function e(e){this.modifyF=e,this._tag="Traversal"}return e.prototype.modify=function(e){return UB(e)(this)},e.prototype.set=function(e){return UB(function(){return e})(this)},e.prototype.filter=function(e){return Uq(UA(Uo(Uu(e)))(this))},e.prototype.asFold=function(){var e=this;return new U$(function(t){return function(n){return e.modifyF(cc(t))(function(e){return ec(n(e))})}})},e.prototype.asSetter=function(){var e=this;return new UX(function(t){return e.modify(t)})},e.prototype.compose=function(e){return Uq(UA(e)(this))},e.prototype.composeTraversal=function(e){return this.compose(e)},e.prototype.composeFold=function(e){return this.asFold().compose(e)},e.prototype.composeSetter=function(e){return this.asSetter().compose(e)},e.prototype.composeOptional=function(e){return this.compose(e.asTraversal())},e.prototype.composeLens=function(e){return Uq(ev(this,UA(ev(e,UC))))},e.prototype.composePrism=function(e){return Uq(ev(this,UA(ev(e,Uo))))},e.prototype.composeIso=function(e){return Uq(ev(this,UA(ev(e,Ux))))},e.prototype.composeGetter=function(e){return this.asFold().compose(e.asFold())},e}(),UJ=function(){function e(e){this.get=e,this._tag="Getter"}return e.prototype.asFold=function(){var e=this;return new U$(function(){return function(t){return function(n){return t(e.get(n))}}})},e.prototype.compose=function(t){var n=this;return new e(function(e){return t.get(n.get(e))})},e.prototype.composeGetter=function(e){return this.compose(e)},e.prototype.composeFold=function(e){return this.asFold().compose(e)},e.prototype.composeLens=function(e){return this.compose(e.asGetter())},e.prototype.composeIso=function(e){return this.compose(e.asGetter())},e.prototype.composeTraversal=function(e){return this.asFold().compose(e.asFold())},e.prototype.composeOptional=function(e){return this.asFold().compose(e.asFold())},e.prototype.composePrism=function(e){return this.asFold().compose(e.asFold())},e}(),U$=function(){function e(e){this.foldMap=e,this._tag="Fold",this.getAll=e(uX())(rR),this.exist=e(yY),this.all=e(yz),this.foldMapFirst=e(cr())}return e.prototype.compose=function(t){var n=this;return new e(function(e){return function(r){return n.foldMap(e)(t.foldMap(e)(r))}})},e.prototype.composeFold=function(e){return this.compose(e)},e.prototype.composeGetter=function(e){return this.compose(e.asFold())},e.prototype.composeTraversal=function(e){return this.compose(e.asFold())},e.prototype.composeOptional=function(e){return this.compose(e.asFold())},e.prototype.composeLens=function(e){return this.compose(e.asFold())},e.prototype.composePrism=function(e){return this.compose(e.asFold())},e.prototype.composeIso=function(e){return this.compose(e.asFold())},e.prototype.find=function(e){return this.foldMapFirst(sJ(e))},e.prototype.headOption=function(e){return this.find(function(){return!0})(e)},e}(),UX=function(){function e(e){this.modify=e,this._tag="Setter"}return e.prototype.set=function(e){return this.modify(ed(e))},e.prototype.compose=function(t){var n=this;return new e(function(e){return n.modify(t.modify(e))})},e.prototype.composeSetter=function(e){return this.compose(e)},e.prototype.composeTraversal=function(e){return this.compose(e.asSetter())},e.prototype.composeOptional=function(e){return this.compose(e.asSetter())},e.prototype.composeLens=function(e){return this.compose(e.asSetter())},e.prototype.composePrism=function(e){return this.compose(e.asSetter())},e.prototype.composeIso=function(e){return this.compose(e.asSetter())},e}(),U0=new UV(ec,ec),U1=MF({_tag:Mf("None")}),U2=Mf("Some");function U6(e,t){return void 0===t&&(t="Option<"+e.name+">"),MT([U1,MF({_tag:U2,value:e},"Some<"+e.name+">")],t)}var U5=new Fj("DateFromISOString",function(e){return e instanceof Date},function(e,t){return ev(Me.validate(e,t),cJ(function(n){var r=new Date(n);return isNaN(r.getTime())?FE(e,t):eR(r)}))},function(e){return e.toISOString()});function U3(e){var t=Object.create(Object.getPrototypeOf(e));return Object.assign(t,e),t}var U9=new Fj("DateFromNumber",function(e){return e instanceof Date},function(e,t){return ev(Mn.validate(e,t),cJ(function(n){var r=new Date(n);return isNaN(r.getTime())?FE(e,t):eR(r)}))},function(e){return e.getTime()});function U4(e,t,n){void 0===n&&(n=e.name);var r=U3(e);return r.validate=t,r.decode=function(e){return t(e,MP(r))},r.name=n,r}var U8=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,U7=Mh(Me,function(e){return U8.test(e)},"UUID"),Le=new Fj("BooleanFromString",Ma.is,function(e,t){return ev(Me.validate(e,t),cJ(function(n){return"true"===n?eR(!0):"false"===n?eR(!1):FE(e,t)}))},String);function Lt(e){switch(e._tag){case"InterfaceType":return e.props;case"ExactType":return Lt(e.type)}}var Ln=Uz.fromProp(),Lr=M9("RegExp",function(e){return"[object RegExp]"===Object.prototype.toString.call(e)}),Li=new Fj("DateFromUnixTime",function(e){return e instanceof Date},function(e,t){return ev(Mm.validate(e,t),cJ(function(n){var r=new Date(1e3*n);return isNaN(r.getTime())?FE(e,t):eR(r)}))},function(e){return Math.floor(e.getTime()/1e3)}),Lo=new Fj("NumberFromString",Mn.is,function(e,t){return ev(Me.validate(e,t),cJ(function(n){var r=+n;return isNaN(r)||""===n.trim()?FE(e,t):eR(r)}))},String),La=new Fj("IntFromString",Mm.is,function(e,t){return ev(Lo.validate(e,t),cJ(function(n){return Mm.is(n)?eR(n):FE(e,t)}))},Lo.encode),Lu=My("JsonArray",function(){return Mj(Ll)}),Ls=My("JsonRecord",function(){return MI(Me,Ll)}),Ll=MT([Ma,Mn,Me,F2,Lu,Ls],"Json"),Lc=new Fj("JsonFromString",Ll.is,function(e,t){try{return eR(JSON.parse(e))}catch{return FE(e,t)}},function(e){return JSON.stringify(e)}),Ld=Mf("Left"),Lf=Mf("Right");let Lp=N(Object.freeze(Object.defineProperty({__proto__:null,BigIntFromString:new Fj("BigIntFromString",function(e){return"bigint"==typeof e},function(e,t){return ev(Me.validate(e,t),cJ(function(n){if(!M6.is(n.trim()))return FE(e,t);try{return eR(BigInt(n))}catch{return FE(e,t)}}))},String),BooleanFromNumber:new Fj("BooleanFromNumber",Ma.is,function(e,t){return ev(Mn.validate(e,t),cq(function(e){return 0!==e}))},Number),BooleanFromString:Le,DateFromISOString:U5,DateFromNumber:U9,DateFromUnixTime:Li,IntFromString:La,Json:Ll,JsonArray:Lu,JsonFromString:Lc,JsonRecord:Ls,NonEmptyString:M6,NumberFromString:Lo,UUID:U7,clone:U3,date:M4,either:function(e,t,n){return void 0===n&&(n="Either<"+e.name+", "+t.name+">"),MT([MF({_tag:Ld,left:e},"Left<"+e.name+">"),MF({_tag:Lf,right:t},"Right<"+e.name+">")],n)},fromNewtype:function(e,t){return void 0===t&&(t="fromNewtype("+e.name+")"),new Fj(t,function(t){return e.is(t)},function(t,n){return ev(e.validate(t,n),cq(U0.wrap))},function(t){return e.encode(U0.unwrap(t))})},fromNullable:function(e,t,n){return void 0===n&&(n="fromNullable("+e.name+")"),U4(e,function(n,r){return null==n?eR(t):e.validate(n,r)},n)},fromRefinement:M9,getLenses:function(e){var t={};for(var n in Lt(e))t[n]=Ln(n);return t},mapOutput:M1,nonEmptyArray:M5,option:U6,optionFromNullable:function(e,t){return void 0===t&&(t="Option<"+e.name+">"),new Fj(t,U6(e).is,function(t,n){return null==t?eR(eI):ev(e.validate(t,n),cq(e_))},function(t){return lX(ev(t,la(e.encode)))})},readonlyNonEmptyArray:function(e,t){return void 0===t&&(t="ReadonlyNonEmptyArray<"+e.name+">"),M5(e,t)},readonlySetFromArray:function(e,t,n){return void 0===n&&(n="ReadonlySet<"+e.name+">"),M3(e,t,n)},regexp:Lr,setFromArray:M3,withEncode:function(e,t,n){return void 0===n&&(n=e.name),new Fj(n,e.is,e.validate,t)},withFallback:function(e,t,n){return void 0===n&&(n="withFallback("+e.name+")"),U4(e,function(n,r){return dy(function(){return eR(t)})(e.validate(n,r))},n)},withMessage:function(e,t){return U4(e,function(n,r){return c9(function(){return[{value:n,context:r,message:t(n,r),actual:n}]})(e.validate(n,r))})},withValidate:U4},Symbol.toStringTag,{value:"Module"}))),LA=N(M2);Object.defineProperty(MX,"__esModule",{value:!0}),MX.withCustomError=MX.addType=MX.isEmpty=MX.objectToMap=MX.grouped=MX.formatDate=MX.formatDateTime=MX.filterDouble=MX.refineType=MX.nullable=void 0;let Lh=(0,ee.__importStar)(MY);MX.nullable=function(e){return Lh.union([e,Lh.null,Lh.undefined])},MX.refineType=function(e,t,n){return new Lh.Type(t,e.is,(t,r)=>(0,M0.pipe)(e.validate(t,r),j4.either.chain(e=>n(e)?Lh.success(e):Lh.failure(t,r))),e.encode)},MX.filterDouble=function(e){if(""===e)return null;let t=Number(e);return Number.isNaN(t)?null:t},MX.formatDateTime=function(e){return e.toISOString().replace(/\.\d{3}Z$/,"+0000")},MX.formatDate=function(e){return e.toISOString().replace(/T.*/,"")},MX.grouped=function(e,t){return e.reduce((e,n,r)=>(r%t==0?e.push([n]):e[Math.floor(r/t)].push(n),e),[])},MX.objectToMap=function(e){return new Map(Object.entries(e))},MX.isEmpty=function(e){for(let t in e)return!1;return!0},MX.addType=function(e,t){return(0,LA.mapOutput)(e,e=>({...e,__TYPE__:t}))},MX.withCustomError=function(e,t){return(0,Lp.withValidate)(e,(n,r)=>j4.either.mapLeft(e=>e.find(e=>e.message)?e:[{value:n,context:r,message:t(n,r),actual:n}])(e.validate(n,r)))},Object.defineProperty(M$,"__esModule",{value:!0}),M$.WidgetKey=void 0;let Lm=(0,ee.__importStar)(MY),Lg=RegExp("^[^<>]+$");M$.WidgetKey=(0,MX.refineType)(Lm.string,"WidgetKey",e=>0===e.length||Lg.test(e)),Object.defineProperty(MG,"__esModule",{value:!0}),(0,ee.__exportStar)(MZ,MG),(0,ee.__exportStar)(MJ,MG),(0,ee.__exportStar)(M$,MG);var Ly={},Lv={},Lx={},Lb={},LC={};Object.defineProperty(LC,"__esModule",{value:!0}),LC.clone=void 0,LC.clone=function(e){var t=Object.create(Object.getPrototypeOf(e));return Object.assign(t,e),t};var LS=D&&D.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),Lw=D&&D.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),LI=D&&D.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&LS(t,e,n);return Lw(t,e),t};Object.defineProperty(Lb,"__esModule",{value:!0}),Lb.withValidate=void 0;var L_=LI(MY);Lb.withValidate=function(e,t,n){void 0===n&&(n=e.name);var r=LC.clone(e);return r.validate=t,r.decode=function(e){return t(e,L_.getDefaultContext(r))},r.name=n,r};var LT=D&&D.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),Lk=D&&D.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),LO=D&&D.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&LT(t,e,n);return Lk(t,e),t};Object.defineProperty(Lx,"__esModule",{value:!0}),Lx.withFallback=void 0;var LR=LO(MY);Lx.withFallback=function(e,t,n){return void 0===n&&(n="withFallback("+e.name+")"),Lb.withValidate(e,function(n,r){return j8.orElse(function(){return LR.success(t)})(e.validate(n,r))},n)};var LE={},Lj={};Object.defineProperty(Lj,"__esModule",{value:!0}),Lj.EmptyArray=Lj.EmptyObject=Lj.Boolean=Lj.NumberOrNull=Lj.Number=Lj.StringOrNull=Lj.String=void 0;let LF=(0,ee.__importStar)(MY);Lj.String=(0,MX.withCustomError)(LF.string,()=>"The value must be a string"),Lj.StringOrNull=(0,MX.withCustomError)(LF.union([LF.string,LF.null]),()=>"The value must be a string or null"),Lj.Number=(0,MX.withCustomError)(LF.number,()=>"The value must be a number"),Lj.NumberOrNull=(0,MX.withCustomError)(LF.union([LF.number,LF.null]),()=>"The value must be a number or null"),Lj.Boolean=(0,MX.withCustomError)(LF.boolean,()=>"The value must be a boolean"),Lj.EmptyObject=LF.UnknownRecord.pipe(new LF.Type("emptyObject",e=>LF.UnknownRecord.is(e),(e,t)=>Object.keys(e).length>0?LF.failure(e,t,"The object is not empty."):LF.success({}),LF.identity)),Lj.EmptyArray=new LF.Type("emptyArray",e=>LF.UnknownArray.is(e)&&0===e.length,(e,t)=>(0,Ft.pipe)(LF.UnknownArray.decode(e),j4.either.chain(n=>n.length>0?LF.failure(e,t,"The array is not empty."):LF.success([]))),()=>[]);var LM={};let LU=N(dM);var LL={};Object.defineProperty(LL,"__esModule",{value:!0});let LK=(0,ee.__importStar)(MY);LL.default=new LK.Type("dateFromStringOrNumber",e=>e instanceof Date,(e,t)=>(0,M0.pipe)(LK.union([LK.number,LK.string]).validate(e,t),(0,LU.chain)(n=>{let r=new Date(n);return isNaN(r.getTime())?LK.failure(e,t):LK.success(r)})),e=>e);var LB={};Object.defineProperty(LB,"__esModule",{value:!0});let LP=(0,ee.__importStar)(MY);LB.default=new LP.Type("dateFromTsMs",e=>e instanceof Date,(e,t)=>(0,M0.pipe)(LP.number.validate(e,t),(0,LU.chain)(n=>{let r=new Date(n);return isNaN(r.getTime())?LP.failure(e,t):LP.success(r)})),e=>e.getTime());var LW={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmptyArrayOrElse=e.EmptyObjectOrElse=e.NullOrElse=e.DefaultOrElse=void 0;let t=(0,ee.__importStar)(MY);e.DefaultOrElse=e=>n=>new t.Type(`DefaultOrElse<${e.name}, ${n.name}>`,e=>null===e||n.is(e),(r,i)=>(0,j8.isRight)(e.validate(r,i))?t.success(null):n.validate(r,i),e=>e?n.encode(e):void 0),e.NullOrElse=n=>(0,e.DefaultOrElse)(t.null)(n),e.EmptyObjectOrElse=t=>(0,e.DefaultOrElse)(Lj.EmptyObject)(t),e.EmptyArrayOrElse=t=>(0,e.DefaultOrElse)(Lj.EmptyArray)(t)}(LW);var LD={};Object.defineProperty(LD,"__esModule",{value:!0});let LN=(0,ee.__importStar)(MY);LD.default=new LN.Type("IntFromNumber",LN.Int.is,(e,t)=>(0,M0.pipe)(LN.number.validate(e,t),(0,LU.chain)(e=>LN.Int.is(e)?LN.success(e):LN.success(Math.round(e)))),LN.Int.encode);var Lq={};Object.defineProperty(Lq,"__esModule",{value:!0});let LQ=(0,ee.__importStar)(MY),LV=/^([0-9]+)px$/;Lq.default=new LQ.Type("IntFromPixels",LQ.Int.is,(e,t)=>(0,M0.pipe)(LQ.string.validate(e,t),(0,LU.chain)(n=>{try{let r=n.match(LV);if(!r)return LQ.failure(e,t);let i=parseInt(r[1]);return LQ.success(i)}catch{return LQ.failure(e,t)}})),String);var Lz={};Object.defineProperty(Lz,"__esModule",{value:!0});let LY=(0,ee.__importStar)(MY);Lz.default=(0,MX.withCustomError)((0,MX.refineType)(LY.string,"nonEmptyString",e=>e.trim().length>0),()=>"The value must be a non-empty string");var LH={},LG={};Object.defineProperty(LG,"__esModule",{value:!0});let LZ=(0,ee.__importStar)(MY);LG.default=(0,MX.nullable)(LZ.string),Object.defineProperty(LH,"__esModule",{value:!0});let LJ=(0,ee.__importDefault)(LG);LH.default=new MY.Type("nonEmptyStringOrNull",e=>"string"==typeof e||null===e,(e,t)=>(0,M0.pipe)(LJ.default.validate(e,t),(0,LU.chain)(e=>"string"==typeof e&&e.length>0?(0,MY.success)(e):(0,MY.success)(null))),e=>e);var L$={};Object.defineProperty(L$,"__esModule",{value:!0});let LX=(0,ee.__importStar)(MY);L$.default=(0,MX.nullable)(LX.number);var L0={};Object.defineProperty(L0,"__esModule",{value:!0});let L1=(0,ee.__importStar)(MY);L0.default=(e,t,n)=>Lj.Number.pipe(new L1.Type("numberInRange",e=>Lj.Number.is(e),(r,i)=>r>t||r<e?L1.failure(r,i,`${n} must be a number between ${e} and ${t}`):L1.success(r),L1.identity));var L2={};Object.defineProperty(L2,"__esModule",{value:!0});let L6=(0,ee.__importStar)(MY);L2.default=new L6.Type("StringFromInt",L6.string.is,(e,t)=>(0,M0.pipe)(L6.boolean.validate(e,t),(0,LU.chain)(e=>L6.success(e.toString()))),e=>e);var L5={};Object.defineProperty(L5,"__esModule",{value:!0});let L3=(0,ee.__importStar)(MY);function L9(){var e;return BI||(BI=1,Object.defineProperty(LE,"__esModule",{value:!0}),LE.StringOrNull=LE.StringFromNumber=LE.StringFromBoolean=LE.NumberRange=LE.NumberOrNull=LE.NonEmptyStringOrNull=LE.NonEmptyString=LE.IntFromPixels=LE.IntFromNumber=LE.Function=LE.DateFromTsMs=LE.DateFromStringOrNumber=LE.DateFromString=void 0,(0,ee.__exportStar)(Lj,LE),e=function(){if(Bw)return LM;Bw=1,Object.defineProperty(LM,"__esModule",{value:!0});let e=(0,ee.__importStar)(MY),t=L9();return LM.default=new e.Type("dateFromString",e=>e instanceof Date,(n,r)=>(0,M0.pipe)(t.String.validate(n,r),(0,LU.chain)(t=>{let i=new Date(t);return isNaN(i.getTime())?e.failure(n,r):e.success(i)})),e=>e.toISOString()),LM}(),Object.defineProperty(LE,"DateFromString",{enumerable:!0,get:function(){return(0,ee.__importDefault)(e).default}}),Object.defineProperty(LE,"DateFromStringOrNumber",{enumerable:!0,get:function(){return(0,ee.__importDefault)(LL).default}}),Object.defineProperty(LE,"DateFromTsMs",{enumerable:!0,get:function(){return(0,ee.__importDefault)(LB).default}}),(0,ee.__exportStar)(LW,LE),LE.Function=(0,ee.__importStar)(MX),Object.defineProperty(LE,"IntFromNumber",{enumerable:!0,get:function(){return(0,ee.__importDefault)(LD).default}}),Object.defineProperty(LE,"IntFromPixels",{enumerable:!0,get:function(){return(0,ee.__importDefault)(Lq).default}}),Object.defineProperty(LE,"NonEmptyString",{enumerable:!0,get:function(){return(0,ee.__importDefault)(Lz).default}}),Object.defineProperty(LE,"NonEmptyStringOrNull",{enumerable:!0,get:function(){return(0,ee.__importDefault)(LH).default}}),Object.defineProperty(LE,"NumberOrNull",{enumerable:!0,get:function(){return(0,ee.__importDefault)(L$).default}}),Object.defineProperty(LE,"NumberRange",{enumerable:!0,get:function(){return(0,ee.__importDefault)(L0).default}}),Object.defineProperty(LE,"StringFromBoolean",{enumerable:!0,get:function(){return(0,ee.__importDefault)(L2).default}}),Object.defineProperty(LE,"StringFromNumber",{enumerable:!0,get:function(){return(0,ee.__importDefault)(L5).default}}),Object.defineProperty(LE,"StringOrNull",{enumerable:!0,get:function(){return(0,ee.__importDefault)(LG).default}})),LE}L5.default=new L3.Type("StringFromInt",L3.string.is,(e,t)=>(0,M0.pipe)(L3.number.validate(e,t),(0,LU.chain)(e=>L3.success(e.toString()))),e=>e);var L4={},L8={},L7={},Ke={},Kt={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BooleanField=e.BooleanConfig=e.BooleanFieldType=void 0;let t=(0,ee.__importStar)(MY),n=L9();e.BooleanFieldType="Boolean",e.BooleanConfig=t.exact(t.partial({label:n.StringOrNull,default_value:t.boolean,placeholder_true:t.string,placeholder_false:t.string})),e.BooleanField=t.exact(t.intersection([t.type({type:t.literal(e.BooleanFieldType)}),t.partial({config:e.BooleanConfig})]))}(Kt);var Kn={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Color=e.ColorConfig=e.ColorFieldType=void 0;let t=(0,ee.__importStar)(MY),n=L9();e.ColorFieldType="Color",e.ColorConfig=t.exact(t.partial({label:n.StringOrNull,placeholder:t.string})),e.Color=t.exact(t.intersection([t.type({type:t.literal(e.ColorFieldType)}),t.partial({fieldset:n.StringOrNull,config:e.ColorConfig})]))}(Kn);var Kr={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Date=e.DateConfig=e.DateFieldType=void 0;let t=(0,ee.__importStar)(MY),n=L9();e.DateFieldType="Date",e.DateConfig=t.exact(t.partial({label:n.StringOrNull,placeholder:t.string,default:t.string})),e.Date=t.exact(t.intersection([t.type({type:t.literal(e.DateFieldType)}),t.partial({fieldset:n.StringOrNull,config:e.DateConfig})]))}(Kr);var Ki={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Embed=e.EmbedConfig=e.EmbedFieldType=void 0;let t=(0,ee.__importStar)(MY),n=L9();e.EmbedFieldType="Embed",e.EmbedConfig=t.exact(t.partial({label:n.StringOrNull,placeholder:t.string,useAsTitle:t.boolean})),e.Embed=t.exact(t.intersection([t.type({type:t.literal(e.EmbedFieldType)}),t.partial({fieldset:n.StringOrNull,config:e.EmbedConfig})]))}(Ki);var Ko={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.GeoPoint=e.GeoPointConfig=e.GeoPointFieldType=void 0;let t=(0,ee.__importStar)(MY),n=L9();e.GeoPointFieldType="GeoPoint",e.GeoPointConfig=t.exact(t.partial({label:n.StringOrNull})),e.GeoPoint=t.exact(t.intersection([t.type({type:t.literal(e.GeoPointFieldType)}),t.partial({fieldset:n.StringOrNull,config:e.GeoPointConfig})]))}(Ko);var Ka={},Ku={},Ks={},Kl={},Kc={};Object.defineProperty(Kc,"__esModule",{value:!0}),Kc.pipe=Kc.pipeable=void 0,Kc.pipeable=function(e){var t={};return"function"==typeof e.map&&(t.map=function(t){return function(n){return e.map(n,t)}}),"function"==typeof e.contramap&&(t.contramap=function(t){return function(n){return e.contramap(n,t)}}),"function"==typeof e.mapWithIndex&&(t.mapWithIndex=function(t){return function(n){return e.mapWithIndex(n,t)}}),"function"==typeof e.ap&&(t.ap=function(t){return function(n){return e.ap(n,t)}},t.apFirst=function(t){return function(n){return e.ap(e.map(n,function(e){return function(){return e}}),t)}},t.apSecond=function(t){return function(n){return e.ap(e.map(n,function(){return function(e){return e}}),t)}}),"function"==typeof e.chain&&(t.chain=function(t){return function(n){return e.chain(n,t)}},t.chainFirst=function(t){return function(n){return e.chain(n,function(n){return e.map(t(n),function(){return n})})}},t.flatten=function(t){return e.chain(t,Ft.identity)}),"function"==typeof e.bimap&&(t.bimap=function(t,n){return function(r){return e.bimap(r,t,n)}},t.mapLeft=function(t){return function(n){return e.mapLeft(n,t)}}),"function"==typeof e.extend&&(t.extend=function(t){return function(n){return e.extend(n,t)}},t.duplicate=function(t){return e.extend(t,Ft.identity)}),"function"==typeof e.reduce&&(t.reduce=function(t,n){return function(r){return e.reduce(r,t,n)}},t.foldMap=function(t){var n=e.foldMap(t);return function(e){return function(t){return n(t,e)}}},t.reduceRight=function(t,n){return function(r){return e.reduceRight(r,t,n)}}),"function"==typeof e.reduceWithIndex&&(t.reduceWithIndex=function(t,n){return function(r){return e.reduceWithIndex(r,t,n)}},t.foldMapWithIndex=function(t){var n=e.foldMapWithIndex(t);return function(e){return function(t){return n(t,e)}}},t.reduceRightWithIndex=function(t,n){return function(r){return e.reduceRightWithIndex(r,t,n)}}),"function"==typeof e.alt&&(t.alt=function(t){return function(n){return e.alt(n,t)}}),"function"==typeof e.compact&&(t.compact=e.compact,t.separate=e.separate),"function"==typeof e.filter&&(t.filter=function(t){return function(n){return e.filter(n,t)}},t.filterMap=function(t){return function(n){return e.filterMap(n,t)}},t.partition=function(t){return function(n){return e.partition(n,t)}},t.partitionMap=function(t){return function(n){return e.partitionMap(n,t)}}),"function"==typeof e.filterWithIndex&&(t.filterWithIndex=function(t){return function(n){return e.filterWithIndex(n,t)}},t.filterMapWithIndex=function(t){return function(n){return e.filterMapWithIndex(n,t)}},t.partitionWithIndex=function(t){return function(n){return e.partitionWithIndex(n,t)}},t.partitionMapWithIndex=function(t){return function(n){return e.partitionMapWithIndex(n,t)}}),"function"==typeof e.promap&&(t.promap=function(t,n){return function(r){return e.promap(r,t,n)}}),"function"==typeof e.compose&&(t.compose=function(t){return function(n){return e.compose(n,t)}}),"function"==typeof e.throwError&&(t.fromOption=function(t){return function(n){return"None"===n._tag?e.throwError(t()):e.of(n.value)}},t.fromEither=function(t){return"Left"===t._tag?e.throwError(t.left):e.of(t.right)},t.fromPredicate=function(t,n){return function(r){return t(r)?e.of(r):e.throwError(n(r))}},t.filterOrElse=function(t,n){return function(r){return e.chain(r,function(r){return t(r)?e.of(r):e.throwError(n(r))})}}),t},Kc.pipe=Ft.pipe;var Kd=D&&D.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),Kf=D&&D.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Kp=D&&D.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&Kd(t,e,n);return Kf(t,e),t};Object.defineProperty(Kl,"__esModule",{value:!0}),Kl.NumberFromString=void 0;var KA=Kp(MY);Kl.NumberFromString=new KA.Type("NumberFromString",KA.number.is,function(e,t){return Kc.pipe(KA.string.validate(e,t),j8.chain(function(n){var r=+n;return isNaN(r)||""===n.trim()?KA.failure(e,t):KA.success(r)}))},String);var Kh=D&&D.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),Km=D&&D.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Kg=D&&D.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&Kh(t,e,n);return Km(t,e),t};Object.defineProperty(Ks,"__esModule",{value:!0}),Ks.IntFromString=void 0;var Ky=Kg(MY);Ks.IntFromString=new Ky.Type("IntFromString",Ky.Int.is,function(e,t){return Kc.pipe(Kl.NumberFromString.validate(e,t),j8.chain(function(n){return Ky.Int.is(n)?Ky.success(n):Ky.failure(e,t)}))},Kl.NumberFromString.encode),Object.defineProperty(Ku,"__esModule",{value:!0});let Kv=(0,ee.__importStar)(MY),Kx=L9(),Kb=new Kv.Type("SideConstraints",e=>!e||"number"==typeof e,(e,t)=>j8.either.chain(Kv.union([Kv.literal("auto"),Kv.literal(""),Kv.Int,Ks.IntFromString,Kx.IntFromNumber,Kx.IntFromPixels,Kv.null]).validate(e,t),e=>"auto"===e||""===e?Kv.success(null):Kv.success(e)),e=>e),KC=Kv.partial({width:Kb,height:Kb});Ku.default=KC,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Image=e.ImageConfig=e.Thumbnail=e.ImageFieldType=void 0;let t=(0,ee.__importStar)(MY),n=L9(),r=(0,ee.__importDefault)(Ku);e.ImageFieldType="Image",e.Thumbnail=t.exact(t.intersection([t.type({name:t.string}),r.default])),e.ImageConfig=t.exact(t.partial({label:n.StringOrNull,placeholder:t.string,constraint:r.default,thumbnails:t.readonlyArray(e.Thumbnail)})),e.Image=t.exact(t.intersection([t.type({type:t.literal(e.ImageFieldType)}),t.partial({fieldset:n.StringOrNull,config:e.ImageConfig})]))}(Ka);var KS={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.IntegrationField=e.IntegrationFieldConfig=e.IntegrationFieldType=void 0;let t=(0,ee.__importStar)(MY),n=L9();e.IntegrationFieldType="IntegrationFields",e.IntegrationFieldConfig=t.exact(t.partial({label:n.StringOrNull,placeholder:t.string,catalog:t.string})),e.IntegrationField=t.exact(t.intersection([t.type({type:t.literal(e.IntegrationFieldType)}),t.partial({fieldset:n.StringOrNull,config:e.IntegrationFieldConfig})]))}(KS);var Kw={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Link=e.LinkConfig=e.LinkFieldType=void 0;let t=(0,ee.__importStar)(MY),n=L9(),r=e=>{if(e instanceof Array&&e.reduce((e,t)=>e&&"string"==typeof t,!0))return t.success(e)},i=e=>{if("string"==typeof e)return t.success([e])},o=new t.Type("MasksArrayString",e=>e instanceof Array,(e,n)=>j8.either.chain(t.union([t.array(t.string),t.string]).validate(e,n),o=>r(o)||i(o)||t.failure(e,n)),e=>e);e.LinkFieldType="Link",e.LinkConfig=t.exact(t.partial({label:n.StringOrNull,useAsTitle:t.boolean,placeholder:t.string,select:(0,Lx.withFallback)(t.union([t.literal("media"),t.literal("document"),t.literal("web"),t.null]),null),customtypes:t.readonlyArray(t.string),masks:o,tags:o,allowTargetBlank:t.boolean,allowText:t.boolean})),e.Link=t.exact(t.intersection([t.type({type:t.literal(e.LinkFieldType)}),t.partial({fieldset:n.StringOrNull,config:e.LinkConfig})]))}(Kw);var KI={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Number=e.NumberConfig=e.NumberFieldType=void 0;let t=(0,ee.__importStar)(MY),n=L9();e.NumberFieldType="Number",e.NumberConfig=t.exact(t.partial({label:n.StringOrNull,placeholder:t.string,min:t.union([t.number,Kl.NumberFromString]),max:t.union([t.number,Kl.NumberFromString]),step:t.union([t.number,Kl.NumberFromString])})),e.Number=t.exact(t.intersection([t.type({type:t.literal(e.NumberFieldType)}),t.partial({fieldset:n.StringOrNull,config:e.NumberConfig})]))}(KI);var K_={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Range=e.RangeConfig=e.RangeFieldType=void 0;let t=(0,ee.__importStar)(MY),n=L9();e.RangeFieldType="Range",e.RangeConfig=t.exact(t.partial({label:n.StringOrNull,placeholder:t.string,min:t.union([t.number,Kl.NumberFromString]),max:t.union([t.number,Kl.NumberFromString]),step:t.union([t.number,Kl.NumberFromString])})),e.Range=t.exact(t.intersection([t.type({type:t.literal(e.RangeFieldType)}),t.partial({fieldset:n.StringOrNull,config:e.RangeConfig})]))}(K_);var KT={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RichText=e.RichTextConfig=e.RichTextNodeTypeCodec=e.RichTextNodeType=e.DEFAULT_OPTION=e.RichTextFieldType=void 0;let t=(0,ee.__importStar)(MY),n=L9(),r=(0,ee.__importDefault)(Ku);e.RichTextFieldType="StructuredText",e.DEFAULT_OPTION="paragraph",e.RichTextNodeType={heading1:"heading1",heading2:"heading2",heading3:"heading3",heading4:"heading4",heading5:"heading5",heading6:"heading6",paragraph:"paragraph",strong:"strong",em:"em",preformatted:"preformatted",hyperlink:"hyperlink",image:"image",embed:"embed",list:"list-item",orderedList:"o-list-item",rtl:"rtl"},e.RichTextNodeTypeCodec=t.keyof({[e.RichTextNodeType.heading1]:null,[e.RichTextNodeType.heading2]:null,[e.RichTextNodeType.heading3]:null,[e.RichTextNodeType.heading4]:null,[e.RichTextNodeType.heading5]:null,[e.RichTextNodeType.heading6]:null,[e.RichTextNodeType.paragraph]:null,[e.RichTextNodeType.strong]:null,[e.RichTextNodeType.em]:null,[e.RichTextNodeType.preformatted]:null,[e.RichTextNodeType.hyperlink]:null,[e.RichTextNodeType.image]:null,[e.RichTextNodeType.embed]:null,[e.RichTextNodeType.list]:null,[e.RichTextNodeType.orderedList]:null,[e.RichTextNodeType.rtl]:null});let i=new t.Type("RichTextOptions",e=>"string"==typeof e,n=>(0,Ft.pipe)(t.union([t.string,t.null]).decode(n),j4.either.map(t=>{if(!t)return e.DEFAULT_OPTION;let n=t.split(",").map(e=>e.trim()).filter(t=>(0,j8.getOrElseW)(()=>{})(e.RichTextNodeTypeCodec.decode(t)));return n.length?n.join(","):e.DEFAULT_OPTION})),e=>e),o=e=>{if(!e)return t.success([])},a=e=>{if(e instanceof Object){if(!Object.entries(e).length)return t.success([]);if(e[""])return t.success(e[""].map(e=>e.name));let n=Object.entries(e).reduce((e,[,t])=>e.concat(t.map(e=>e.name)),[]).filter(Boolean);return t.success(n)}},u=e=>{if(e instanceof Array&&e.reduce((e,t)=>e&&"string"==typeof t,!0))return t.success(e)},s=e=>{if("string"==typeof e)return t.success([e])},l=new t.Type("RichTextLabels",e=>e instanceof Array,(e,n)=>{let r=t.record(t.string,t.readonlyArray(t.record(t.literal("name"),t.string))),i=t.readonlyArray(t.string);return(0,Ft.pipe)(t.union([r,i,t.string,t.null]).decode(e),j4.either.chain(r=>o(r)||u(r)||a(r)||s(r)||t.failure(e,n)))},e=>e);e.RichTextConfig=t.exact(t.partial({label:n.StringOrNull,placeholder:t.string,useAsTitle:t.boolean,single:i,multi:i,imageConstraint:r.default,labels:l,allowTargetBlank:t.boolean})),e.RichText=t.exact(t.intersection([t.type({type:t.literal(e.RichTextFieldType)}),t.partial({fieldset:n.StringOrNull,config:e.RichTextConfig})]))}(KT);var Kk={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Select=e.SelectConfig=e.SelectFieldType=void 0;let t=(0,ee.__importStar)(MY),n=L9();e.SelectFieldType="Select",e.SelectConfig=t.exact(t.partial({label:n.StringOrNull,placeholder:t.string,default_value:t.string,options:t.readonlyArray(t.union([t.string,n.StringFromNumber,n.StringFromBoolean]))})),e.Select=t.exact(t.intersection([t.type({type:t.literal(e.SelectFieldType)}),t.partial({fieldset:n.StringOrNull,config:e.SelectConfig})]))}(Kk);var KO={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Separator=e.SeparatorConfig=e.SeparatorFieldType=void 0;let t=(0,ee.__importStar)(MY),n=L9();e.SeparatorFieldType="Separator",e.SeparatorConfig=t.exact(t.partial({label:n.StringOrNull})),e.Separator=t.exact(t.intersection([t.type({type:t.literal(e.SeparatorFieldType)}),t.partial({config:e.SeparatorConfig})]))}(KO);var KR={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Text=e.TextConfig=e.TextFieldType=void 0;let t=(0,ee.__importStar)(MY),n=L9();e.TextFieldType="Text",e.TextConfig=t.exact(t.partial({label:n.StringOrNull,useAsTitle:t.boolean,placeholder:t.string})),e.Text=t.exact(t.intersection([t.type({type:t.literal(e.TextFieldType)}),t.partial({fieldset:n.StringOrNull,config:e.TextConfig})]))}(KR);var KE={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Timestamp=e.TimestampConfig=e.TimestampFieldType=void 0;let t=(0,ee.__importStar)(MY),n=L9();e.TimestampFieldType="Timestamp",e.TimestampConfig=t.exact(t.partial({label:n.StringOrNull,placeholder:t.string,default:t.string})),e.Timestamp=t.exact(t.intersection([t.type({type:t.literal(e.TimestampFieldType)}),t.partial({fieldset:n.StringOrNull,config:e.TimestampConfig})]))}(KE),Object.defineProperty(Ke,"__esModule",{value:!0}),Ke.NestableWidget=void 0;let Kj=(0,ee.__importStar)(MY);Ke.NestableWidget=Kj.union([Kn.Color,Kt.BooleanField,Ki.Embed,Ko.GeoPoint,Kr.Date,KI.Number,K_.Range,KT.RichText,Kk.Select,KO.Separator,KR.Text,KE.Timestamp,Kw.Link,Ka.Image,KS.IntegrationField]),function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Group=e.GroupConfig=e.NestedGroup=e.NestedGroupConfig=e.GroupFieldType=void 0;let t=(0,ee.__importStar)(MY),n=L9();e.GroupFieldType="Group";let r=e=>t.exact(t.partial({label:n.StringOrNull,repeat:t.boolean,fields:t.record(MG.WidgetKey,e)})),i=i=>t.exact(t.intersection([t.type({type:t.literal(e.GroupFieldType)}),t.partial({fieldset:n.StringOrNull,icon:t.string,description:t.string,config:r(i)})]));e.NestedGroupConfig=r(Ke.NestableWidget),e.NestedGroup=i(Ke.NestableWidget),e.GroupConfig=r(t.union([Ke.NestableWidget,e.NestedGroup])),e.Group=i(t.union([Ke.NestableWidget,e.NestedGroup]))}(L7);var KF={};Object.defineProperty(KF,"__esModule",{value:!0}),(0,ee.__exportStar)(Kt,KF),(0,ee.__exportStar)(Kn,KF),(0,ee.__exportStar)(Kr,KF),(0,ee.__exportStar)(Ki,KF),(0,ee.__exportStar)(Ko,KF),(0,ee.__exportStar)(Ka,KF),(0,ee.__exportStar)(KS,KF),(0,ee.__exportStar)(Kw,KF),(0,ee.__exportStar)(Ke,KF),(0,ee.__exportStar)(KI,KF),(0,ee.__exportStar)(K_,KF),(0,ee.__exportStar)(KT,KF),(0,ee.__exportStar)(Kk,KF),(0,ee.__exportStar)(KO,KF),(0,ee.__exportStar)(KR,KF),(0,ee.__exportStar)(KE,KF);var KM={},KU={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isCompositeSlice=e.CompositeSlice=e.CompositeSliceConfig=e.CompositeSliceType=void 0;let t=(0,ee.__importStar)(MY),n=L9();e.CompositeSliceType="Slice",e.CompositeSliceConfig=t.exact(t.partial({label:n.StringOrNull})),e.CompositeSlice=t.exact(t.intersection([t.type({type:t.literal(e.CompositeSliceType)}),t.partial({fieldset:n.StringOrNull,description:t.string,icon:t.string,display:t.string,"non-repeat":t.record(MG.WidgetKey,Ke.NestableWidget),repeat:t.record(MG.WidgetKey,Ke.NestableWidget),config:e.CompositeSliceConfig})])),e.isCompositeSlice=function(e){return"Slice"===e.type}}(KU);var KL={};Object.defineProperty(KL,"__esModule",{value:!0}),KL.isLegacySlice=KL.LegacySlice=void 0;let KK=(0,ee.__importStar)(MY);KL.LegacySlice=KK.union([Ke.NestableWidget,L7.NestedGroup]),KL.isLegacySlice=function(e){return"Slice"!==e.type&&"SharedSlice"!==e.type};var KB={},KP={};Object.defineProperty(KP,"__esModule",{value:!0}),KP.isSlicePrimaryWidget=KP.SlicePrimaryWidget=void 0;let KW=(0,ee.__importStar)(MY);KP.SlicePrimaryWidget=KW.union([KF.NestableWidget,L7.Group]),KP.isSlicePrimaryWidget=e=>KF.NestableWidget.is(e)||L7.Group.is(e),function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isDynamicSharedSlice=e.isStaticSharedSlice=e.SharedSlice=e.SharedSliceType=e.Variation=void 0;let t=(0,ee.__importStar)(MY);e.Variation=t.exact(t.intersection([t.type({id:t.string,name:t.string,description:t.string,imageUrl:(0,Lx.withFallback)(t.string,"https://images.prismic.io/slice-machine/621a5ec4-0387-4bc5-9860-2dd46cbc07cd_default_ss.png?auto=compress,format"),docURL:t.string,version:t.string}),t.partial({display:t.string,primary:t.record(MG.WidgetKey,KP.SlicePrimaryWidget),items:t.record(MG.WidgetKey,Ke.NestableWidget)})])),e.SharedSliceType="SharedSlice";let n=t.string,r=t.string;e.SharedSlice=t.exact(t.intersection([t.type({id:t.string,type:t.literal(e.SharedSliceType),name:t.string,variations:t.readonlyArray(e.Variation)}),t.partial({description:t.string,legacyPaths:t.record(n,r)})])),e.isStaticSharedSlice=function(e){return"SharedSlice"===e.type},e.isDynamicSharedSlice=function(e){return"SharedSlice"===e.type}}(KB);var KD={};Object.defineProperty(KD,"__esModule",{value:!0}),KD.SharedSliceRef=void 0;let KN=(0,ee.__importStar)(MY);KD.SharedSliceRef=KN.exact(KN.type({type:KN.literal(KB.SharedSliceType)})),function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Slices=e.DynamicSlices=e.StaticSlices=e.slicesReader=e.DynamicSlicesConfig=e.StaticSlicesConfig=e.slicesConfigReader=e.SlicesLabels=e.SlicesFieldType=e.LegacySlicesFieldType=void 0;let t=(0,ee.__importStar)(MY),n=L9();function r(r){return t.exact(t.partial({label:n.StringOrNull,labels:e.SlicesLabels,choices:t.record(MG.WidgetKey,t.union([KL.LegacySlice,KU.CompositeSlice,r]))}))}e.LegacySlicesFieldType="Choice",e.SlicesFieldType="Slices",e.SlicesLabels=t.union([t.record(t.string,t.readonlyArray(t.exact(t.intersection([t.type({name:t.string}),t.partial({display:t.string})])))),t.null]),e.slicesConfigReader=r,e.StaticSlicesConfig=r(KB.SharedSlice),e.DynamicSlicesConfig=r(KD.SharedSliceRef);let i={toStatic(e,t){let n=Object.entries(e.choices||{}).reduce((e,[n,r])=>{if("SharedSlice"!==r.type)return{...e,[n]:r};{let r=t.get(n);return r?{...e,[n]:r}:e}},{});return{...e,choices:n}}};function o(r){return t.exact(t.intersection([t.type({type:t.keyof({[e.SlicesFieldType]:null,[e.LegacySlicesFieldType]:null})}),t.partial({fieldset:n.StringOrNull,config:r})]))}e.slicesReader=o,e.StaticSlices=o(e.StaticSlicesConfig),e.DynamicSlices=o(e.DynamicSlicesConfig),e.Slices={toStatic:(e,t)=>e.config?{...e,config:i.toStatic(e.config,t)}:e}}(KM);var Kq={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.UID=e.UIDConfig=e.UIDFieldType=void 0;let t=(0,ee.__importStar)(MY),n=L9();e.UIDFieldType="UID",e.UIDConfig=t.exact(t.partial({label:n.StringOrNull,useAsTitle:t.boolean,placeholder:t.string})),e.UID=t.exact(t.intersection([t.type({type:t.literal(e.UIDFieldType)}),t.partial({fieldset:n.StringOrNull,config:e.UIDConfig})]))}(Kq),Object.defineProperty(L8,"__esModule",{value:!0}),L8.Widgets=L8.FieldType=L8.DynamicWidget=L8.StaticWidget=L8.widgetReader=void 0;let KQ=(0,ee.__importStar)(MY);function KV(e){return KQ.union([Kq.UID,Ke.NestableWidget,L7.Group,e])}L8.widgetReader=KV,L8.StaticWidget=KV(KM.StaticSlices),L8.DynamicWidget=KV(KM.DynamicSlices),L8.FieldType=KQ.keyof({[KF.ColorFieldType]:null,[KF.BooleanFieldType]:null,[KF.NumberFieldType]:null,[KF.EmbedFieldType]:null,[KF.GeoPointFieldType]:null,[KF.DateFieldType]:null,[KF.RangeFieldType]:null,[KF.RichTextFieldType]:null,[KF.SelectFieldType]:null,[KF.SeparatorFieldType]:null,[KF.TextFieldType]:null,[KF.TimestampFieldType]:null,[KF.LinkFieldType]:null,[KF.ImageFieldType]:null,[KF.IntegrationFieldType]:null,[Kq.UIDFieldType]:null,[L7.GroupFieldType]:null,[KM.SlicesFieldType]:null,[KM.LegacySlicesFieldType]:null}),L8.Widgets={toStatic(e,t){switch(e.type){case"Choice":case"Slices":return KM.Slices.toStatic(e,t);default:return e}}},Object.defineProperty(L4,"__esModule",{value:!0}),L4.Sections=L4.DynamicSection=L4.StaticSection=L4.sectionReader=void 0;let Kz=(0,ee.__importStar)(MY);function KY(e){return Kz.record(MG.WidgetKey,e)}L4.sectionReader=KY,L4.StaticSection=KY(L8.StaticWidget),L4.DynamicSection=KY(L8.DynamicWidget),L4.Sections={toStatic:(e,t)=>Object.entries(e).reduce((e,[n,r])=>({...e,[n]:L8.Widgets.toStatic(r,t)}),{})},function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.collectSharedSlices=e.flattenCustomTypeFields=e.filterMissingSharedSlices=e.collectWidgets=e.validateSlices=e.toStatic=e.flattenSections=e.flattenWidgets=e.CustomType=e.StaticCustomType=e.CustomTypeFormat=void 0;let t=(0,ee.__importStar)(MY),n=L9();e.CustomTypeFormat={page:"page",custom:"custom"};class r extends Error{constructor(e){super(),Object.defineProperty(this,"slices",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"message",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.slices=e,this.message=this._formatError(e)}_formatError(e){return`The following slices doesn't exists in your Prismic repository:
3
3
  ${e.map(e=>` - ${e}`).join(`
4
4
  `)}
5
- `}}function i(r){return t.exact(t.intersection([t.type({id:t.string,label:n.StringOrNull,repeatable:(0,Lx.withFallback)(t.boolean,!0),json:t.record(t.string,r),status:(0,Lx.withFallback)(t.boolean,!0)}),t.partial({format:(0,Lx.withFallback)(t.keyof(e.CustomTypeFormat),"custom")})]))}function o(e){return Object.entries(e.json).reduce((e,[,t])=>{let n=Object.entries(t);return e.concat(n)},[])}function a(e,t){let n=Object.entries(e.json).reduce((e,[n,r])=>{let i=Object.entries(r).reduce((e,[n,r])=>{let i=t(n,r);return i?{...e,[n]:i}:e},{});return{...e,[n]:i}},{});return{...e,json:n}}e.StaticCustomType=i(L4.StaticSection),e.CustomType=i(L4.DynamicSection),e.flattenWidgets=o,e.flattenSections=function(e){return Object.entries(e.json).reduce((e,[,t])=>{let n=Object.entries(t);return e.concat(n)},[])},e.toStatic=function(e,t){let n=Object.entries(e.json).reduce((e,[n,r])=>({...e,[n]:L4.Sections.toStatic(r,t)}),{});return{...e,json:n}},e.validateSlices=function(e,t){let n=(function(e){let t=o(e).filter(([,e])=>"Slices"===e.type).reduce((e,[,t])=>{let n=Object.entries(t.config&&t.config.choices?t.config.choices:{}).filter(([,e])=>"SharedSlice"===e.type).map(([e])=>e);return e.concat(n)},[]);return function(e){return t.map(e)}})(e)(e=>{if(!t.get(e))return e}).filter(Boolean);return n.length>0?(0,j8.left)(new r(n)):(0,j8.right)(e)},e.collectWidgets=a,e.filterMissingSharedSlices=function(e,t){return a(e,(e,n)=>{if("Slices"===n.type){if(!n.config||!n.config.choices)return n;let e=Object.entries(n.config.choices).reduce((e,[n,r])=>"SharedSlice"!==r.type||t.get(n)?{...e,[n]:r}:e,{}),r={...n.config,choices:e};return{...n,config:r}}return n})},e.flattenCustomTypeFields=function(e){return Object.values(e.json).reduce((e,t)=>({...e,...t}),{})},e.collectSharedSlices=function(e){return Object.entries(e.fields).reduce((e,[,t])=>{var n;return"Slices"===t.type||"Choice"===t.type?{...e,...Object.entries((null===(n=t.config)||void 0===n?void 0:n.choices)||{}).reduce((e,[t,n])=>"SharedSlice"===n.type?{...e,[t]:n}:e,{})}:e},{})}}(Lv);var KH={},KG={};Object.defineProperty(KG,"__esModule",{value:!0}),KG.DiffOperation=void 0,(Bx=KG.DiffOperation||(KG.DiffOperation={})).Added="added",Bx.Removed="removed",Bx.Updated="updated";var KZ={},KJ={},K$={};Object.defineProperty(K$,"__esModule",{value:!0}),K$.HexaColor=void 0;let KX=/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/;K$.HexaColor={is:e=>KX.test(e)};var K0={};Object.defineProperty(K0,"__esModule",{value:!0}),K0.toRecord=void 0,K0.toRecord=function(e,t){return e.reduce((e,n)=>{let r=t(n);return{...e,[r]:n}},{})};var K1={};Object.defineProperty(K1,"__esModule",{value:!0}),K1.mapValues=K1.isObject=K1.withOptionals=K1.isNotEmpty=K1.zipObjects=void 0;let K2=(0,ee.__importStar)(MY);K1.zipObjects=function(e,t){return[...new Set(Object.keys(e||{}).concat(Object.keys(t||{})))].reduce((n,r)=>{let i=null==e?void 0:e[r],o=null==t?void 0:t[r];return{...n,[r]:{left:i,right:o}}},{})},K1.isNotEmpty=function(e){return!!Object.keys(e).length},K1.withOptionals=function(e,t){return{...e,...t.reduce((e,[t,n])=>n?{...e,[t]:n}:e,{})}};let K6=K2.record(K2.string,K2.unknown);K1.isObject=function(e){return(0,j8.isRight)(K6.decode(e))},K1.mapValues=function(e,t){return Object.entries(e).reduce((e,[n,r])=>({...e,[n]:t(r,n)}),{})},Object.defineProperty(KJ,"__esModule",{value:!0}),KJ.Objects=KJ.Arrays=KJ.HexaColorCode=void 0,KJ.HexaColorCode=(0,ee.__importStar)(K$),KJ.Arrays=(0,ee.__importStar)(K0),KJ.Objects=(0,ee.__importStar)(K1);var K5={};function K3(e,t){let n=Object.entries(KJ.Objects.zipObjects(e,t)).reduce((e,[t,n])=>{if(JSON.stringify(null==n?void 0:n.left)===JSON.stringify(null==n?void 0:n.right))return e;let r=(()=>{var e,t,r,i,o,a,u;if(!(!(null!=n&&n.left)&&!(null!=n&&n.right))){if(null!=n&&n.left&&!n.right)return{op:KG.DiffOperation.Removed};if(!(null!=n&&n.left)&&null!=n&&n.right){if((null===(e=n.right)||void 0===e?void 0:e.type)===L7.GroupFieldType){let e={...n.right,config:{...n.right.config,fields:{}}};return e.config.fields=K3(void 0,null===(t=n.right.config)||void 0===t?void 0:t.fields)||{},{op:KG.DiffOperation.Added,value:e}}return{op:KG.DiffOperation.Added,value:n.right}}if((null===(r=n.right)||void 0===r?void 0:r.type)===L7.GroupFieldType){let e={...n.right,config:{...n.right.config,fields:{}}};return e.config.fields=K3((null===(i=n.left)||void 0===i?void 0:i.type)===L7.GroupFieldType?null===(a=null===(o=n.left)||void 0===o?void 0:o.config)||void 0===a?void 0:a.fields:void 0,null===(u=n.right.config)||void 0===u?void 0:u.fields)||{},{op:KG.DiffOperation.Updated,value:e}}return{op:KG.DiffOperation.Updated,value:n.right}}})();return r?{...e,[t]:r}:e},{});return KJ.Objects.isNotEmpty(n)?n:void 0}Object.defineProperty(K5,"__esModule",{value:!0}),K5.VariationComparator=void 0,K5.VariationComparator={compare(e,t){if(e&&!t)return{op:KG.DiffOperation.Removed};if(!e&&t)return{op:KG.DiffOperation.Added,value:t};let n=Object.entries(KJ.Objects.zipObjects(e,t)).reduce((e,[t,n])=>"primary"===t||"items"===t||(null==n?void 0:n.left)===(null==n?void 0:n.right)?e:{...e,[t]:null==n?void 0:n.right},{}),r=K3(null==e?void 0:e.primary,null==t?void 0:t.primary),i=K3(null==e?void 0:e.items,null==t?void 0:t.items),o={...n,...r?{primary:r}:{},...i?{items:i}:{}};if(KJ.Objects.isNotEmpty(o))return{op:KG.DiffOperation.Updated,value:o}}},Object.defineProperty(KZ,"__esModule",{value:!0}),KZ.SliceComparator=void 0,KZ.SliceComparator={compare(e,t){if(!e&&t)return{op:KG.DiffOperation.Added,value:t};if(e&&!t)return{op:KG.DiffOperation.Removed};let n=Object.entries(KJ.Objects.zipObjects(e,t)).reduce((e,[t,n])=>"variations"===t||(null==n?void 0:n.left)===(null==n?void 0:n.right)?e:{...e,[t]:null==n?void 0:n.right},{}),r=Object.entries(KJ.Objects.zipObjects(e&&KJ.Arrays.toRecord(e.variations,e=>e.id),t&&KJ.Arrays.toRecord(t.variations,e=>e.id))).reduce((e,[t,n])=>{if(!n)return e;let r=K5.VariationComparator.compare(n.left,n.right);return r?{...e,[t]:r}:e},{}),i={...n,...KJ.Objects.isNotEmpty(r)?{variations:r}:{}};if(KJ.Objects.isNotEmpty(i))return{op:KG.DiffOperation.Updated,value:i}}};var K9={};Object.defineProperty(K9,"__esModule",{value:!0}),Object.defineProperty(KH,"__esModule",{value:!0}),(0,ee.__exportStar)(KG,KH),(0,ee.__exportStar)(KZ,KH),(0,ee.__exportStar)(K5,KH),(0,ee.__exportStar)(K9,KH);var K4={},K8={};Bb=D&&D.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(K8,"__esModule",{value:!0}),K8.ImageConstraint=void 0,Object.defineProperty(K8,"ImageConstraint",{enumerable:!0,get:function(){return Bb(Ku).default}});var K7={},Be={};Object.defineProperty(Be,"__esModule",{value:!0});var Bt={};Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.SlicesTypes=void 0;let Bn=(0,ee.__importStar)(MY);Bt.SlicesTypes=Bn.keyof({[KU.CompositeSliceType]:null,[KB.SharedSliceType]:null}),Object.defineProperty(K7,"__esModule",{value:!0}),(0,ee.__exportStar)(KU,K7),(0,ee.__exportStar)(KL,K7),(0,ee.__exportStar)(KB,K7),(0,ee.__exportStar)(KD,K7),(0,ee.__exportStar)(Be,K7),(0,ee.__exportStar)(KP,K7),(0,ee.__exportStar)(KM,K7),(0,ee.__exportStar)(Bt,K7),Object.defineProperty(K4,"__esModule",{value:!0}),(0,ee.__exportStar)(L7,K4),(0,ee.__exportStar)(KF,K4),(0,ee.__exportStar)(K8,K4),(0,ee.__exportStar)(K7,K4),(0,ee.__exportStar)(Kq,K4),(0,ee.__exportStar)(L8,K4),Object.defineProperty(Ly,"__esModule",{value:!0}),(0,ee.__exportStar)(Lv,Ly),(0,ee.__exportStar)(KH,Ly),(0,ee.__exportStar)(L4,Ly),(0,ee.__exportStar)(K4,Ly);var Br,Bi,Bo,Ba,Bu,Bs,Bl,Bc,Bd,Bf,Bp,BA,Bh,Bm,Bg,By,Bv,Bx,Bb,BC,BS,Bw,BI,B_,BT={},Bk={},BO={};function BR(){if(B_)return BO;B_=1,Object.defineProperty(BO,"__esModule",{value:!0}),BO.hasContentType=BO.hasFieldContentType=void 0;let e=Wi();function t(e){return"object"==typeof e&&null!==e&&"__TYPE__"in e}return BO.hasFieldContentType=function(n){return t(n)&&n.__TYPE__===e.FieldContentType&&(null==n?void 0:n.type)!==void 0&&"string"==typeof n.type&&(0,j8.isRight)(e.FieldType.decode(n.type))},BO.hasContentType=t,BO}function BE(){return BL||(BL=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmptyContent=e.EmptyLegacy=e.isEmptyContent=e.EmptyContentType=void 0;let t=(0,ee.__importStar)(MY),n=BR();e.EmptyContentType="EmptyContent",e.isEmptyContent=t=>(0,n.hasContentType)(t)&&t.__TYPE__===e.EmptyContentType;let r=t.union([t.null,t.type({value:t.null})]);e.EmptyLegacy=n=>new t.Type("EmptyLegacy",e.isEmptyContent,t=>(0,Ft.pipe)(r.decode(t),j4.either.map(()=>({type:n,__TYPE__:e.EmptyContentType}))),()=>null),e.EmptyContent=t.strict({type:t.string,__TYPE__:t.literal(e.EmptyContentType)})}(Bk)),Bk}var Bj={},BF={};Object.defineProperty(BF,"__esModule",{value:!0}),BF.defaultCtx=BF.getFieldCtx=BF.LegacyContentCtx=BF.FieldOrSliceType=void 0;let BM=(0,ee.__importStar)(MY);BF.FieldOrSliceType=BM.union([K4.FieldType,K4.SlicesTypes]);class BU{constructor(e,t,n){Object.defineProperty(this,"fieldKey",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"prefixedKey",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"keyOfType",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"fieldPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"fieldType",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"allTypes",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.fieldKey=e,this.fieldPath=t||[],this.allTypes=n||new Map;let r=Array.of(this.fieldPath,[this.fieldKey]).flat().join(".");this.prefixedKey=r,this.keyOfType=`${r}_TYPE`,this.fieldType=this.allTypes.get(this.prefixedKey)}}BF.LegacyContentCtx=BU,BF.getFieldCtx=function(e,t,n){return new BU(e,[...t.fieldPath,t.fieldKey,...n||[]],t.allTypes)},BF.defaultCtx=function(e,t=new Map){return new BU(e,[],t)};var BL,BK,BB={},BP={};function BW(){return BK||(BK=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BooleanContentDefaultValue=e.BooleanContent=e.BooleanLegacy=e.isBooleanContent=e.BooleanContentType=void 0;let t=(0,ee.__importStar)(MY),n=BR();e.BooleanContentType="BooleanContent",e.isBooleanContent=t=>(0,n.hasContentType)(t)&&t.__TYPE__===e.BooleanContentType,e.BooleanLegacy=n=>new t.Type("BooleanLegacy",e.isBooleanContent,n=>(0,Ft.pipe)(t.boolean.decode(n),j4.either.map(t=>e.BooleanContent.encode({value:t,__TYPE__:e.BooleanContentType}))),e=>({content:e.value,types:{[n.keyOfType]:"Boolean"}})),e.BooleanContent=t.strict({__TYPE__:t.literal(e.BooleanContentType),value:t.boolean}),e.BooleanContentDefaultValue=t=>{var n;return(null===(n=t.config)||void 0===n?void 0:n.default_value)!==void 0?{__TYPE__:e.BooleanContentType,value:t.config.default_value||!1}:void 0}}(BP)),BP}var BD,BN={};function Bq(){return BD||(BD=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmbedContent=e.EmbedLegacy=e.EmbedContentLegacy=e.isEmbedContent=e.EmbedContentType=void 0;let t=(0,ee.__importStar)(MY),n=L9(),r=BR();e.EmbedContentType="EmbedContent",e.isEmbedContent=t=>(0,r.hasContentType)(t)&&t.__TYPE__===e.EmbedContentType,e.EmbedContentLegacy=t.exact(t.intersection([t.type({embed_url:t.string,type:t.string}),t.partial({version:t.union([t.string,t.number,t.null]),title:n.StringOrNull,author_name:n.StringOrNull,author_url:n.StringOrNull,provider_name:n.StringOrNull,provider_url:n.StringOrNull,cache_age:t.union([t.string,t.number,t.null]),thumbnail_url:n.StringOrNull,thumbnail_width:n.NumberOrNull,thumbnail_height:n.NumberOrNull,html:n.StringOrNull})])),e.EmbedLegacy=n=>new t.Type("EmbedLegacy",e.isEmbedContent,t=>(0,Ft.pipe)(e.EmbedContentLegacy.decode(t),j4.either.map(n=>({...n,all:t,__TYPE__:e.EmbedContentType}))),e=>({content:e.all,types:{[n.keyOfType]:"Embed"}})),e.EmbedContent=t.intersection([e.EmbedContentLegacy,t.strict({__TYPE__:t.literal(e.EmbedContentType),all:t.unknown})])}(BN)),BN}var BQ={},BV={},Bz={};Object.defineProperty(Bz,"__esModule",{value:!0});let BY=(0,ee.__importStar)(MY);Bz.default=new BY.Type("TrimmedString",BY.string.is,(e,t)=>(0,M0.pipe)(BY.string.validate(e,t),(0,LU.chain)(e=>BY.success(function(e){let t=0;for(;t<e.length&&e[t]<=" ";)t++;let n=e.length;for(;t<n&&e[n-1]<=" ";)n--;return e.substring(t,n)}(e)))),e=>e);var BH={};function BG(){return BZ||(BZ=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ColorContent=e.ColorLegacy=e.isColorContent=void 0;let t=(0,ee.__importStar)(MY),n=(0,ee.__importDefault)(Bz),r=BR();e.isColorContent=e=>(0,r.hasContentType)(e)&&e.__TYPE__===BH.FieldContentType&&(0,r.hasFieldContentType)(e)&&"Color"===e.type,e.ColorLegacy=r=>new t.Type("ColorLegacy",e.isColorContent,t=>(0,Ft.pipe)(n.default.decode(t),j4.either.map(t=>e.ColorContent.encode({value:t,type:K4.ColorFieldType,__TYPE__:BH.FieldContentType}))),e=>({content:e.value,types:{[r.keyOfType]:K4.ColorFieldType}})),e.ColorContent=t.strict({type:t.literal(K4.ColorFieldType),value:n.default,__TYPE__:t.literal(BH.FieldContentType)})}(BV)),BV}Object.defineProperty(BH,"__esModule",{value:!0}),BH.FieldContentType=void 0,BH.FieldContentType="FieldContent";var BZ,BJ,B$={};function BX(){return BJ||(BJ=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DateContent=e.DateLegacy=e.isDateContent=void 0;let t=(0,ee.__importStar)(MY),n=(0,ee.__importDefault)(Bz),r=BR();e.isDateContent=e=>(0,r.hasContentType)(e)&&e.__TYPE__===BH.FieldContentType&&(0,r.hasFieldContentType)(e)&&"Date"===e.type,e.DateLegacy=r=>new t.Type("DateLegacy",e.isDateContent,t=>(0,Ft.pipe)(n.default.decode(t),j4.either.map(t=>e.DateContent.encode({value:t,type:K4.DateFieldType,__TYPE__:BH.FieldContentType}))),e=>({content:e.value,types:{[r.keyOfType]:K4.DateFieldType}})),e.DateContent=t.strict({type:t.literal(K4.DateFieldType),value:n.default,__TYPE__:t.literal(BH.FieldContentType)})}(B$)),B$}var B0,B1={};function B2(){return B0||(B0=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NumberContent=e.NumberLegacy=e.isNumberContent=void 0;let t=(0,ee.__importStar)(MY),n=(0,ee.__importDefault)(Bz),r=BR();e.isNumberContent=e=>(0,r.hasContentType)(e)&&e.__TYPE__===BH.FieldContentType&&(0,r.hasFieldContentType)(e)&&"Number"===e.type,e.NumberLegacy=r=>new t.Type("NumberLegacy",e.isNumberContent,t=>(0,Ft.pipe)(n.default.decode(t),j4.either.map(t=>e.NumberContent.encode({value:t,type:K4.NumberFieldType,__TYPE__:BH.FieldContentType}))),e=>({content:e.value,types:{[r.keyOfType]:K4.NumberFieldType}})),e.NumberContent=t.strict({type:t.literal(K4.NumberFieldType),value:n.default,__TYPE__:t.literal(BH.FieldContentType)})}(B1)),B1}var B6,B5={};function B3(){return B6||(B6=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RangeContent=e.RangeLegacy=e.isRangeContent=void 0;let t=(0,ee.__importStar)(MY),n=(0,ee.__importDefault)(Bz),r=BR();e.isRangeContent=e=>(0,r.hasContentType)(e)&&e.__TYPE__===BH.FieldContentType&&(0,r.hasFieldContentType)(e)&&"Range"===e.type,e.RangeLegacy=r=>new t.Type("RangeLegacy",e.isRangeContent,t=>(0,Ft.pipe)(n.default.decode(t),j4.either.map(t=>e.RangeContent.encode({value:t,type:K4.RangeFieldType,__TYPE__:BH.FieldContentType}))),e=>({content:e.value,types:{[r.keyOfType]:K4.RangeFieldType}})),e.RangeContent=t.strict({type:t.literal(K4.RangeFieldType),value:n.default,__TYPE__:t.literal(BH.FieldContentType)})}(B5)),B5}var B9,B4={};function B8(){return B9||(B9=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SelectContentDefaultValue=e.SelectContent=e.SelectLegacy=e.isSelectContent=void 0;let t=(0,ee.__importStar)(MY),n=(0,ee.__importDefault)(Bz),r=BR();e.isSelectContent=e=>(0,r.hasContentType)(e)&&e.__TYPE__===BH.FieldContentType&&(0,r.hasFieldContentType)(e)&&"Select"===e.type,e.SelectLegacy=r=>new t.Type("SelectLegacy",e.isSelectContent,t=>(0,Ft.pipe)(n.default.decode(t),j4.either.map(t=>e.SelectContent.encode({value:t,type:K4.SelectFieldType,__TYPE__:BH.FieldContentType}))),e=>({content:e.value,types:{[r.keyOfType]:K4.SelectFieldType}})),e.SelectContent=t.strict({type:t.literal(K4.SelectFieldType),value:n.default,__TYPE__:t.literal(BH.FieldContentType)}),e.SelectContentDefaultValue=e=>{var t;return!(null===(t=e.config)||void 0===t)&&t.default_value?{__TYPE__:BH.FieldContentType,type:K4.SelectFieldType,value:e.config.default_value||""}:void 0}}(B4)),B4}var B7,Pe={};function Pt(){return B7||(B7=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TextContent=e.TextLegacy=e.isTextContent=void 0;let t=(0,ee.__importStar)(MY),n=(0,ee.__importDefault)(Bz),r=BR();e.isTextContent=e=>(0,r.hasContentType)(e)&&e.__TYPE__===BH.FieldContentType&&(0,r.hasFieldContentType)(e)&&"Text"===e.type,e.TextLegacy=r=>new t.Type("TextLegacy",e.isTextContent,t=>(0,Ft.pipe)(n.default.decode(t),j4.either.map(t=>e.TextContent.encode({value:t,type:K4.TextFieldType,__TYPE__:BH.FieldContentType}))),e=>({content:e.value,types:{[r.keyOfType]:K4.TextFieldType}})),e.TextContent=t.strict({type:t.literal(K4.TextFieldType),value:n.default,__TYPE__:t.literal(BH.FieldContentType)})}(Pe)),Pe}var Pn,Pr={};function Pi(){return Pn||(Pn=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TimestampContent=e.TimestampLegacy=e.isTimestampContent=void 0;let t=(0,ee.__importStar)(MY),n=(0,ee.__importDefault)(Bz),r=BR();e.isTimestampContent=e=>(0,r.hasContentType)(e)&&e.__TYPE__===BH.FieldContentType&&(0,r.hasFieldContentType)(e)&&"Timestamp"===e.type,e.TimestampLegacy=r=>new t.Type("TimestampLegacy",e.isTimestampContent,t=>(0,Ft.pipe)(n.default.decode(t),j4.either.map(t=>e.TimestampContent.encode({value:t,type:K4.TimestampFieldType,__TYPE__:BH.FieldContentType}))),e=>({content:e.value,types:{[r.keyOfType]:K4.TimestampFieldType}})),e.TimestampContent=t.strict({type:t.literal(K4.TimestampFieldType),value:n.default,__TYPE__:t.literal(BH.FieldContentType)})}(Pr)),Pr}function Po(){return Pa||(Pa=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FieldContent=e.FieldType=void 0;let t=(0,ee.__importStar)(MY),n=BG(),r=BX(),i=B2(),o=B3(),a=B8(),u=Pt(),s=Pi();e.FieldType=t.keyof({Text:null,Date:null,Timestamp:null,Color:null,Number:null,Range:null,Select:null}),e.FieldContent=t.union([r.DateContent,n.ColorContent,i.NumberContent,o.RangeContent,a.SelectContent,u.TextContent,s.TimestampContent]),(0,ee.__exportStar)(BG(),e),(0,ee.__exportStar)(BH,e),(0,ee.__exportStar)(BX(),e),(0,ee.__exportStar)(B2(),e),(0,ee.__exportStar)(B3(),e),(0,ee.__exportStar)(B8(),e),(0,ee.__exportStar)(Pt(),e),(0,ee.__exportStar)(Pi(),e)}(BQ)),BQ}var Pa,Pu,Ps={};function Pl(){return Pu||(Pu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.GeoPointContent=e.GeoPointLegacy=e.isGeoPointContent=e.GeoPointContentType=void 0;let t=(0,ee.__importStar)(MY),n=BR();e.GeoPointContentType="GeoPointContent",e.isGeoPointContent=t=>(0,n.hasContentType)(t)&&t.__TYPE__===e.GeoPointContentType;let r=t.strict({position:t.strict({lat:t.number,lng:t.number})});e.GeoPointLegacy=n=>new t.Type("GeoPointLegacy",e.isGeoPointContent,t=>(0,M0.pipe)(r.decode(t),j4.either.map(t=>e.GeoPointContent.encode({...t,__TYPE__:e.GeoPointContentType}))),e=>({content:{position:e.position},types:{[n.keyOfType]:"GeoPoint"}})),e.GeoPointContent=t.intersection([r,t.strict({__TYPE__:t.literal(e.GeoPointContentType)})])}(Ps)),Ps}var Pc,Pd={};function Pf(){return Pc||(Pc=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ImageContent=e.ImageLegacy=e.ImageContentView=e.isImageContent=e.ImageContentType=void 0;let t=(0,ee.__importStar)(MY),n=L9(),r=BR();e.ImageContentType="ImageContent",e.isImageContent=t=>(0,r.hasContentType)(t)&&t.__TYPE__===e.ImageContentType;let i=t.exact(t.type({id:t.string,url:t.string,width:t.number,height:t.number}));e.ImageContentView=t.exact(t.intersection([t.type({origin:i,width:t.number,height:t.number,edit:t.type({zoom:t.number,crop:t.type({x:t.number,y:t.number}),background:t.string})}),t.partial({url:t.string,credits:n.NonEmptyStringOrNull,alt:n.NonEmptyStringOrNull,provider:n.StringOrNull})]));let o=t.intersection([e.ImageContentView,t.partial({thumbnails:t.record(t.string,e.ImageContentView)})]);e.ImageLegacy=n=>new t.Type("ImageLegacy",e.isImageContent,t=>(0,Ft.pipe)(o.decode(t),j4.either.map(t=>e.ImageContent.encode({...t,__TYPE__:e.ImageContentType}))),e=>({content:(0,K1.withOptionals)({edit:e.edit,height:e.height,origin:e.origin,width:e.width},[["alt",e.alt],["credits",e.credits],["provider",e.provider],["thumbnails",e.thumbnails],["url",e.url]]),types:{[n.keyOfType]:"Image"}})),e.ImageContent=t.intersection([o,t.strict({__TYPE__:t.literal(e.ImageContentType)})])}(Pd)),Pd}var Pp,PA={};function Ph(){return Pp||(Pp=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.IntegrationFieldContent=e.IntegrationFieldLegacy=e.isIntegrationFieldContent=e.IntegrationFieldContentType=void 0;let t=(0,ee.__importStar)(MY),n=BR();e.IntegrationFieldContentType="IntegrationFieldsContent",e.isIntegrationFieldContent=t=>(0,n.hasContentType)(t)&&t.__TYPE__===e.IntegrationFieldContentType,e.IntegrationFieldLegacy=n=>new t.Type("IntegrationFieldLegacy",e.isIntegrationFieldContent,n=>(0,Ft.pipe)(t.string.decode(n),j4.either.map(t=>e.IntegrationFieldContent.encode({value:t,__TYPE__:e.IntegrationFieldContentType}))),e=>({content:e.value,types:{[n.keyOfType]:"IntegrationFields"}})),e.IntegrationFieldContent=t.strict({__TYPE__:t.literal(e.IntegrationFieldContentType),value:t.string})}(PA)),PA}var Pm,Pg={};function Py(){return Pm||(Pm=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FilledLinkContent=e.FilledLink=e.FilledLinkContentLegacy=e.FilledLinkLegacy=e.isFilledLinkContent=e.LinkContent=e.Link=e.LinkContentLegacy=e.LinkLegacy=e.isLinkContent=e.LinkContentType=e.AnyLinkContent=e.AnyLinkType=e.ExternalLinkContent=e.FilledExternalLinkContent=e.ExternalLinkType=e.DocumentLinkContent=e.FilledDocumentLinkContent=e.DocumentLinkType=e.MediaLinkContent=e.MediaLinkType=e.FileLinkContent=e.FilledFileLinkContent=e.FileLinkType=e.ImageLinkContent=e.FilledImageLinkContent=e.ImageLinkType=void 0;let t=(0,ee.__importStar)(MY),n=L9(),r=BR();e.ImageLinkType="ImageLink";let i=t.intersection([t.strict({kind:t.string,id:t.string,url:t.string,height:t.string,width:t.string,size:t.string,name:t.string}),t.exact(t.partial({date:n.StringOrNull}))]),o=new t.Type("FilledImageLink",t=>(0,r.hasContentType)(t)&&t.__TYPE__===e.ImageLinkType,t=>(0,Ft.pipe)(i.decode(t),j4.either.map(t=>e.FilledImageLinkContent.encode({...t,__TYPE__:e.ImageLinkType}))),e=>i.encode(e));e.FilledImageLinkContent=t.intersection([t.strict({__TYPE__:t.literal(e.ImageLinkType)}),i]);let a=t.union([t.intersection([i,t.exact(t.partial({text:t.string}))]),t.strict({kind:t.literal("image"),text:t.string})]),u=new t.Type("ImageLink",t=>(0,r.hasContentType)(t)&&t.__TYPE__===e.ImageLinkType,t=>(0,Ft.pipe)(a.decode(t),j4.either.map(t=>e.ImageLinkContent.encode({...t,__TYPE__:e.ImageLinkType}))),e=>a.encode(e));e.ImageLinkContent=t.intersection([t.strict({__TYPE__:t.literal(e.ImageLinkType)}),a]),e.FileLinkType="FileLink";let s=t.exact(t.intersection([t.type({kind:t.string,id:t.string,url:t.string,name:t.string,size:(0,Lp.withFallback)(t.string,"0")}),t.partial({date:n.StringOrNull})])),l=new t.Type("FilledFileLink",t=>(0,r.hasContentType)(t)&&t.__TYPE__===e.FileLinkType,t=>(0,Ft.pipe)(s.decode(t),j4.either.map(t=>e.FilledFileLinkContent.encode({...t,__TYPE__:e.FileLinkType}))),e=>s.encode(e));e.FilledFileLinkContent=t.intersection([t.strict({__TYPE__:t.literal(e.FileLinkType)}),s]);let c=t.union([t.intersection([s,t.exact(t.partial({text:t.string}))]),t.strict({kind:t.literal("file"),text:t.string})]),d=new t.Type("FileLink",t=>(0,r.hasContentType)(t)&&t.__TYPE__===e.FileLinkType,t=>(0,Ft.pipe)(c.decode(t),j4.either.map(t=>e.FileLinkContent.encode({...t,__TYPE__:e.FileLinkType}))),e=>c.encode(e));e.FileLinkContent=t.intersection([t.strict({__TYPE__:t.literal(e.FileLinkType)}),c]),e.MediaLinkType="MediaLink";let f=t.strict({kind:t.literal("media"),text:t.string}),p=new t.Type("MediaLink",t=>(0,r.hasContentType)(t)&&t.__TYPE__===e.MediaLinkType,t=>(0,Ft.pipe)(f.decode(t),j4.either.map(t=>e.MediaLinkContent.encode({...t,__TYPE__:e.MediaLinkType}))),e=>f.encode(e));e.MediaLinkContent=t.intersection([t.strict({__TYPE__:t.literal(e.MediaLinkType)}),f]),e.DocumentLinkType="DocumentLink";let A=t.strict({id:n.NonEmptyString}),h=new t.Type("FilledDocumentLink",t=>(0,r.hasContentType)(t)&&t.__TYPE__===e.DocumentLinkType,t=>(0,Ft.pipe)(A.decode(t),j4.either.map(t=>e.FilledDocumentLinkContent.encode({...t,__TYPE__:e.DocumentLinkType}))),e=>A.encode(e));e.FilledDocumentLinkContent=t.intersection([t.strict({__TYPE__:t.literal(e.DocumentLinkType)}),A]);let m=t.union([t.intersection([A,t.exact(t.partial({text:t.string}))]),t.strict({kind:t.literal("document"),text:t.string})]),g=new t.Type("DocumentLink",t=>(0,r.hasContentType)(t)&&t.__TYPE__===e.DocumentLinkType,t=>(0,Ft.pipe)(m.decode(t),j4.either.map(t=>e.DocumentLinkContent.encode({...t,__TYPE__:e.DocumentLinkType}))),e=>m.encode(e));e.DocumentLinkContent=t.intersection([t.strict({__TYPE__:t.literal(e.DocumentLinkType)}),m]),e.ExternalLinkType="ExternalLink";let y=t.exact(t.intersection([t.type({url:t.string}),t.partial({kind:t.literal("web"),target:n.StringOrNull,preview:(0,MX.nullable)(t.partial({title:t.string}))})])),v=new t.Type("FilledExternalLink",t=>(0,r.hasContentType)(t)&&t.__TYPE__===e.ExternalLinkType,t=>(0,Ft.pipe)(y.decode(t),j4.either.map(t=>e.FilledExternalLinkContent.encode({...t,__TYPE__:e.ExternalLinkType}))),e=>y.encode(e));e.FilledExternalLinkContent=t.intersection([t.strict({__TYPE__:t.literal(e.ExternalLinkType)}),y]);let x=t.union([t.intersection([y,t.exact(t.partial({text:t.string}))]),t.strict({kind:t.literal("web"),text:t.string})]),b=new t.Type("ExternalLink",t=>(0,r.hasContentType)(t)&&t.__TYPE__===e.ExternalLinkType,t=>(0,Ft.pipe)(x.decode(t),j4.either.map(t=>e.ExternalLinkContent.encode({...t,__TYPE__:e.ExternalLinkType}))),e=>x.encode(e));e.ExternalLinkContent=t.intersection([t.strict({__TYPE__:t.literal(e.ExternalLinkType)}),x]),e.AnyLinkType="AnyLink";let C=t.strict({text:t.string}),S=new t.Type("AnyLink",t=>(0,r.hasContentType)(t)&&t.__TYPE__===e.AnyLinkType,t=>(0,Ft.pipe)(C.decode(t),j4.either.map(t=>e.AnyLinkContent.encode({...t,__TYPE__:e.AnyLinkType}))),e=>C.encode(e));e.AnyLinkContent=t.intersection([t.strict({__TYPE__:t.literal(e.AnyLinkType)}),C]),e.LinkContentType="LinkContent",e.isLinkContent=t=>(0,r.hasContentType)(t)&&t.__TYPE__===e.LinkContentType,e.LinkLegacy=t.union([u,d,g,b,p,S]),e.LinkContentLegacy=n=>new t.Type("LinkLegacy",e.isLinkContent,t=>(0,Ft.pipe)(e.LinkLegacy.decode(t),j4.either.map(t=>e.LinkContent.encode({value:t,__TYPE__:e.LinkContentType}))),t=>({content:e.LinkLegacy.encode(t.value),types:{[n.keyOfType]:"Link"}})),e.Link=t.union([e.ImageLinkContent,e.FileLinkContent,e.DocumentLinkContent,e.ExternalLinkContent,e.MediaLinkContent,e.AnyLinkContent]),e.LinkContent=t.strict({__TYPE__:t.literal(e.LinkContentType),value:e.Link}),e.isFilledLinkContent=t=>(0,r.hasContentType)(t)&&t.__TYPE__===e.LinkContentType,e.FilledLinkLegacy=t.union([o,l,h,v]),e.FilledLinkContentLegacy=n=>new t.Type("FilledLinkLegacy",e.isFilledLinkContent,t=>(0,Ft.pipe)(e.FilledLinkLegacy.decode(t),j4.either.map(t=>e.FilledLinkContent.encode({value:t,__TYPE__:e.LinkContentType}))),t=>({content:e.FilledLinkLegacy.encode(t.value),types:{[n.keyOfType]:"Link"}})),e.FilledLink=t.union([e.FilledImageLinkContent,e.FilledFileLinkContent,e.FilledDocumentLinkContent,e.FilledExternalLinkContent]),e.FilledLinkContent=t.strict({__TYPE__:t.literal(e.LinkContentType),value:e.FilledLink})}(Pg)),Pg}var Pv,Px={},Pb={},PC={};function PS(){return Pv||(Pv=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Block=e.BlockLegacy=e.TextBlock=e.checkEmbedBlock=e.EmbedBlock=e.checkImageBlock=e.ImageBlock=e.ValidatedSpans=e.SpanLegacy=e.Span=void 0;let t=(0,ee.__importStar)(MY),n=L9(),r=Bq(),i=Pf(),o=Py(),a=e=>t.strict({data:e,start:t.number,end:t.number,type:t.literal(KF.RichTextNodeType.hyperlink)}),u=t.strict({data:(0,Lp.withFallback)(t.string,""),start:t.number,end:t.number,type:t.literal("label")}),s=t.strict({start:t.number,end:t.number,type:t.keyof({[KF.RichTextNodeType.strong]:null,[KF.RichTextNodeType.em]:null,"list-item":null})});e.Span=t.union([a(o.FilledLink),u,s]),e.SpanLegacy=t.union([a(o.FilledLinkLegacy),u,s]),e.ValidatedSpans=e=>new t.Type("ValidatedSpans",t=>Array.isArray(t)&&t.every(e.is),(n,r)=>{if(!Array.isArray(n))return t.failure(n,r);{let r=n.reduce((t,n)=>{let r=e.decode(n);return(0,j8.isLeft)(r)?t:[...t,r.right]},[]).sort((e,t)=>e.start-t.start);return t.success(r)}},t=>t.reduce((t,n)=>[...t,e.encode(n)],[]));let l=e=>t.exact(t.intersection([t.type({type:t.literal(KF.RichTextNodeType.image),data:t.intersection([i.ImageContentView,t.partial({linkTo:(0,MX.nullable)(e)})])}),t.partial({label:n.StringOrNull,direction:n.StringOrNull})]));e.ImageBlock=l(o.FilledLink);let c=l(o.FilledLinkLegacy);e.checkImageBlock=function(e){return e.type===KF.RichTextNodeType.image};let d=t.exact(t.intersection([t.type({type:t.literal(KF.RichTextNodeType.embed),data:t.unknown}),t.partial({label:n.StringOrNull,direction:n.StringOrNull})])),f=new t.Type("EmbedBlockLegacy",e=>"embed"===e.type,t=>(0,Ft.pipe)(d.decode(t),j4.either.chain(e=>j4.either.map(t=>[e,t])(r.EmbedContentLegacy.decode(e.data))),j4.either.map(([t,n])=>e.EmbedBlock.encode({...t,data:{...n,__TYPE__:r.EmbedContentType,all:t.data}}))),e=>({...d.encode(e),data:r.EmbedContentLegacy.encode(e.data)}));e.EmbedBlock=t.exact(t.intersection([t.type({type:t.literal(KF.RichTextNodeType.embed),data:r.EmbedContent}),t.partial({label:n.StringOrNull,direction:n.StringOrNull})])),e.checkEmbedBlock=function(e){return e.type===KF.RichTextNodeType.embed};let p=n=>t.exact(t.intersection([t.type({type:(0,MX.refineType)(KF.RichTextNodeTypeCodec,`string which isn't ${KF.RichTextNodeType.image} ${KF.RichTextNodeType.embed}`,e=>e!==KF.RichTextNodeType.image&&e!==KF.RichTextNodeType.embed),content:t.intersection([t.type({text:t.string}),t.partial({spans:(0,e.ValidatedSpans)(n)})])}),t.partial({label:t.string,direction:t.string})]));e.TextBlock=p(e.Span);let A=p(e.SpanLegacy),h=t.union([f,c,A]);e.BlockLegacy=new t.Type("BlockLegacy",e=>f.is(e)||c.is(e)||A.is(e),e=>h.decode(e),t=>e.ImageBlock.is(t)?c.encode(t):e.EmbedBlock.is(t)?f.encode(t):A.encode(t)),e.Block=t.union([e.ImageBlock,e.EmbedBlock,e.TextBlock])}(PC)),PC}function Pw(){return PI||(PI=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RichTextLegacy=e.RichTextContent=e.isRichTextContent=e.RichTextContentType=void 0;let t=(0,ee.__importStar)(MY),n=BR(),r=PS();e.RichTextContentType="StructuredTextContent",e.isRichTextContent=t=>(0,n.hasContentType)(t)&&t.__TYPE__===e.RichTextContentType;let i=t.array(r.BlockLegacy);e.RichTextContent=t.strict({__TYPE__:t.literal(e.RichTextContentType),value:t.array(r.Block)}),(0,ee.__exportStar)(PS(),e),e.RichTextLegacy=n=>new t.Type("RichTextLegacy",e.isRichTextContent,t=>(0,Ft.pipe)(i.decode(t),j4.either.map(t=>({value:t,__TYPE__:e.RichTextContentType}))),e=>({content:i.encode(e.value),types:{[n.keyOfType]:"StructuredText"}}))}(Pb)),Pb}var PI,P_,PT={};function Pk(){return P_||(P_=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SeparatorContent=e.SeparatorLegacy=e.isSeparatorContent=e.SeparatorContentType=void 0;let t=(0,ee.__importStar)(MY),n=BR();e.SeparatorContentType="SeparatorContent",e.isSeparatorContent=t=>(0,n.hasContentType)(t)&&t.__TYPE__===e.SeparatorContentType,e.SeparatorLegacy=n=>new t.Type("SeparatorLegacy",e.isSeparatorContent,()=>t.success(e.SeparatorContent.encode({__TYPE__:e.SeparatorContentType})),()=>({content:{},types:{[n.keyOfType]:"Separator"}})),e.SeparatorContent=t.strict({__TYPE__:t.literal(e.SeparatorContentType)})}(PT)),PT}function PO(){return PE||(PE=1,Object.defineProperty(BB,"__esModule",{value:!0}),(0,ee.__exportStar)(BW(),BB),(0,ee.__exportStar)(Bq(),BB),(0,ee.__exportStar)(Po(),BB),(0,ee.__exportStar)(Pl(),BB),(0,ee.__exportStar)(Pf(),BB),(0,ee.__exportStar)(Ph(),BB),(0,ee.__exportStar)(Py(),BB),(0,ee.__exportStar)(function(){if(PR)return Px;PR=1,Object.defineProperty(Px,"__esModule",{value:!0}),Px.NestableLegacy=Px.isNestableContent=Px.NestableContentDefaultValue=Px.NestableContent=void 0;let e=(0,ee.__importStar)(MY),t=BE(),n=BW(),r=Bq(),i=Po(),o=Pl(),a=Pf(),u=Ph(),s=Py(),l=Pw(),c=Pk();return Px.NestableContent=e.union([t.EmptyContent,n.BooleanContent,r.EmbedContent,i.TextContent,i.TimestampContent,i.SelectContent,i.RangeContent,i.NumberContent,i.DateContent,i.ColorContent,o.GeoPointContent,a.ImageContent,u.IntegrationFieldContent,s.LinkContent,l.RichTextContent,c.SeparatorContent]),Px.NestableContentDefaultValue=e=>{switch(e.type){case"Boolean":return(0,n.BooleanContentDefaultValue)(e);case"Select":return(0,i.SelectContentDefaultValue)(e);default:return}},Px.isNestableContent=e=>(0,i.isTextContent)(e)||(0,i.isColorContent)(e)||(0,i.isDateContent)(e)||(0,i.isTimestampContent)(e)||(0,i.isNumberContent)(e)||(0,i.isRangeContent)(e)||(0,i.isSelectContent)(e)||(0,o.isGeoPointContent)(e)||(0,l.isRichTextContent)(e)||(0,n.isBooleanContent)(e)||(0,r.isEmbedContent)(e)||(0,a.isImageContent)(e)||(0,u.isIntegrationFieldContent)(e)||(0,s.isLinkContent)(e)||(0,c.isSeparatorContent)(e)||(0,t.isEmptyContent)(e),Px.NestableLegacy=e=>({decode(d){if(!e.fieldType)return;let f=(0,t.EmptyLegacy)(e.fieldType).decode(d);if((0,j8.isRight)(f))return f;let p=(()=>{switch(e.fieldType){case"Text":return(0,i.TextLegacy)(e);case"Color":return(0,i.ColorLegacy)(e);case"Date":return(0,i.DateLegacy)(e);case"Timestamp":return(0,i.TimestampLegacy)(e);case"Number":return(0,i.NumberLegacy)(e);case"Range":return(0,i.RangeLegacy)(e);case"Select":return(0,i.SelectLegacy)(e);case"GeoPoint":return(0,o.GeoPointLegacy)(e);case"StructuredText":return(0,l.RichTextLegacy)(e);case"Boolean":return(0,n.BooleanLegacy)(e);case"Embed":return(0,r.EmbedLegacy)(e);case"Image":return(0,a.ImageLegacy)(e);case"IntegrationFields":return(0,u.IntegrationFieldLegacy)(e);case"Link":return(0,s.LinkContentLegacy)(e);case"Separator":return(0,c.SeparatorLegacy)(e);default:return}})();if(p)return p.decode(d)},encode(t){switch(t.__TYPE__){case BH.FieldContentType:return"Text"===t.type?(0,i.TextLegacy)(e).encode(t):"Color"===t.type?(0,i.ColorLegacy)(e).encode(t):"Range"===t.type?(0,i.RangeLegacy)(e).encode(t):"Date"===t.type?(0,i.DateLegacy)(e).encode(t):"Number"===t.type?(0,i.NumberLegacy)(e).encode(t):"Timestamp"===t.type?(0,i.TimestampLegacy)(e).encode(t):"Select"===t.type?(0,i.SelectLegacy)(e).encode(t):void 0;case o.GeoPointContentType:return(0,o.GeoPointLegacy)(e).encode(t);case l.RichTextContentType:return(0,l.RichTextLegacy)(e).encode(t);case r.EmbedContentType:return(0,r.EmbedLegacy)(e).encode(t);case n.BooleanContentType:return(0,n.BooleanLegacy)(e).encode(t);case a.ImageContentType:return(0,a.ImageLegacy)(e).encode(t);case u.IntegrationFieldContentType:return(0,u.IntegrationFieldLegacy)(e).encode(t);case s.LinkContentType:return(0,s.LinkContentLegacy)(e).encode(t);case c.SeparatorContentType:return(0,c.SeparatorLegacy)(e).encode(t);default:return}}}),Px}(),BB),(0,ee.__exportStar)(Pw(),BB),(0,ee.__exportStar)(Pk(),BB)),BB}var PR,PE,Pj,PF={};function PM(){if(Pj)return PF;Pj=1,Object.defineProperty(PF,"__esModule",{value:!0}),PF.repeatableContentWithDefaultNestableContentValues=PF.withDefaultNestableContentValues=PF.withDefaultSlicePrimaryContentValues=void 0;let e=PU(),t=PO();return PF.withDefaultSlicePrimaryContentValues=function(n,r){for(let[i,o]of Object.entries(n)){let n=r[i];if(void 0===n){if(o.type===Ly.GroupFieldType)r[i]=(0,e.groupContentWithDefaultValues)(o,e.GroupContentDefaultValue);else{let e=(0,t.NestableContentDefaultValue)(o);e&&(r[i]=e)}continue}o.type===Ly.GroupFieldType&&(0,e.isGroupContent)(n)&&(r[i]=(0,e.groupContentWithDefaultValues)(o,n))}return r},PF.withDefaultNestableContentValues=function(e,n){return Object.entries(e).reduce((e,[r,i])=>{if(void 0===n[r]){let n=(0,t.NestableContentDefaultValue)(i);return void 0!==n?{...e,[r]:n}:e}return e},n)},PF.repeatableContentWithDefaultNestableContentValues=function(n,r){let i=Object.entries(n);return r.map(n=>i.reduce((r,[i,o])=>{var a;let u=n.value.find(([e])=>e===i);if("Group"===o.type){let t=(0,e.groupContentWithDefaultValues)(o,null!==(a=null==u?void 0:u[1])&&void 0!==a?a:{__TYPE__:e.GroupContentType,value:[]});return{...r,value:[...r.value.filter(([e])=>e!==i),...t?[[i,t]]:[]]}}if(!u){let e=(0,t.NestableContentDefaultValue)(o);return{...r,value:[...r.value,...e?[[i,e]]:[]]}}return r},n))},PF}function PU(){return PL||(PL=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.traverseGroupItemsContent=e.traverseGroupContent=e.groupContentWithDefaultValues=e.GroupLegacy=e.GroupItemLegacy=e.GroupContentDefaultValue=e.isGroupContent=e.GroupContent=e.GroupItemContent=e.GroupContentType=e.GroupItemContentType=void 0;let t=(0,ee.__importStar)(MY),n=BR(),r=PO(),i=PM();e.GroupItemContentType="GroupItemContent",e.GroupContentType="GroupContentType",e.GroupItemContent=t.recursion("GroupItemContent",()=>t.strict({__TYPE__:t.literal(e.GroupItemContentType),value:t.array(t.tuple([t.string,t.union([r.NestableContent,e.GroupContent])]))})),e.GroupContent=t.recursion("GroupContent",()=>t.strict({__TYPE__:t.literal(e.GroupContentType),value:t.array(e.GroupItemContent)})),e.isGroupContent=e.GroupContent.is,e.GroupContentDefaultValue={__TYPE__:e.GroupContentType,value:[]};let o=t.record(t.string,t.unknown);function a({path:e,key:t,apiId:n,model:r,content:i}){return o=>{var a;let s=u({path:e,model:null===(a=null==r?void 0:r.config)||void 0===a?void 0:a.fields,content:i.value})(o);return o({path:e,key:t,apiId:n,model:r,content:{__TYPE__:i.__TYPE__,value:s}})}}function u({path:t,model:n,content:i}){return o=>i.map((i,u)=>{let s=t.concat([{key:u.toString(),type:"GroupItem"}]),l=i.value.reduce((t,[i,u])=>{let l;let c=null==n?void 0:n[i];return(l=c&&(null==c?void 0:c.type)!==Ly.GroupFieldType||u.__TYPE__!==e.GroupContentType?o({path:s.concat([{key:i,type:"Widget"}]),key:i,apiId:i,model:c,content:u}):a({path:s.concat([{key:i,type:"Widget"}]),key:i,apiId:i,model:c,content:u})(o))&&((0,r.isNestableContent)(l)||(0,e.isGroupContent)(l))?t.concat([[i,l]]):t},[]);return{__TYPE__:i.__TYPE__,value:l}})}e.GroupItemLegacy=i=>new t.Type("GroupItemLegacy",t=>(0,n.hasContentType)(t)&&t.__TYPE__===e.GroupItemContentType,t=>(0,Ft.pipe)(o.decode(t),j4.either.map(t=>({value:Object.entries(t).reduce((t,[n,o])=>{let a=(0,BF.getFieldCtx)(n,i),u=a.fieldType===Ly.GroupFieldType?(0,e.GroupLegacy)(a).decode(o):(0,r.NestableLegacy)(a).decode(o);return!u||(0,j8.isLeft)(u)?t:[...t,[n,u.right]]},[]),__TYPE__:e.GroupItemContentType}))),t=>t.value.reduce((t,[n,o])=>{let a=(0,BF.getFieldCtx)(n,i),u=(0,e.isGroupContent)(o)?(0,e.GroupLegacy)(a).encode(o):(0,r.NestableLegacy)(a).encode(o);return u?{content:{...t.content,[n]:u.content},types:{...t.types,...u.types}}:t},{content:{},types:{}})),e.GroupLegacy=n=>{let r=t.array(t.union([t.null,(0,e.GroupItemLegacy)(n)])),i=t.array((0,e.GroupItemLegacy)(n));return new t.Type("GroupLegacy",e.isGroupContent,t=>(0,Ft.pipe)(r.decode(t),j4.either.map(t=>({value:t.map(t=>null===t?{__TYPE__:e.GroupItemContentType,value:[]}:t),__TYPE__:e.GroupContentType}))),e=>{let t=i.encode(e.value);return{content:t.map(e=>e.content),types:t.reduce((e,t)=>({...e,...t.types}),{[n.keyOfType]:Ly.GroupFieldType})}})},e.groupContentWithDefaultValues=function(e,t){var n;let r=null===(n=e.config)||void 0===n?void 0:n.fields;return r?{...t,value:(0,i.repeatableContentWithDefaultNestableContentValues)(r,t.value)}:t},e.traverseGroupContent=a,e.traverseGroupItemsContent=u}(Bj)),Bj}var PL,PK,PB={},PP={},PW={},PD={};function PN(){if(PK)return PD;PK=1,Object.defineProperty(PD,"__esModule",{value:!0}),PD.RepeatableWidgets=PD.RepeatableWidgetsLegacy=void 0;let e=(0,ee.__importStar)(MY),t=PU(),n=PO();PD.RepeatableWidgetsLegacy=n=>e.array((0,t.GroupItemLegacy)(n));let r=e.tuple([e.string,e.union([n.NestableContent,t.GroupContent])]),i=e.strict({__TYPE__:e.literal(t.GroupItemContentType),value:e.array(r)});return PD.RepeatableWidgets=e.array(i),PD}function Pq(){return PQ||(PQ=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.migrateCompositeSlice=e.traverseCompositeSliceContent=e.compositeSliceContentWithDefaultValues=e.CompositeSliceContent=e.CompositeSliceLegacy=e.isCompositeSliceContent=e.CompositeSliceContentType=void 0;let t=(0,ee.__importStar)(MY),n=BR(),r=PU(),i=PO(),o=PM(),a=PN();e.CompositeSliceContentType="CompositeSliceContent",e.isCompositeSliceContent=t=>(0,n.hasContentType)(t)&&t.__TYPE__===e.CompositeSliceContentType;let u=t.exact(t.partial({repeat:t.array(t.unknown),"non-repeat":t.UnknownRecord}));e.CompositeSliceLegacy=n=>new t.Type("CompositeSliceLegacy",e.isCompositeSliceContent,t=>(0,Ft.pipe)(u.decode(t),j4.either.map(t=>{let r=(()=>{let e=(0,BF.getFieldCtx)("repeat",n),r=(0,a.RepeatableWidgetsLegacy)(e).decode(t.repeat);if(!(!r||(0,j8.isLeft)(r)))return r.right})()||[];return{nonRepeat:Object.entries(t["non-repeat"]||{}).reduce((e,[t,r])=>{let o=(0,BF.getFieldCtx)(t,n,["non-repeat"]);if(!o)return e;let a=(0,i.NestableLegacy)(o).decode(r);return!a||(0,j8.isLeft)(a)?e:{...e,[t]:a.right}},{}),repeat:r,__TYPE__:e.CompositeSliceContentType}})),e=>{let t=Object.entries(e.nonRepeat).reduce((e,[t,r])=>{let o=(0,BF.getFieldCtx)(t,n,["non-repeat"]),a=(0,i.NestableLegacy)(o).encode(r);return a?{content:{...e.content,[t]:a.content},types:{...e.types,...a.types}}:e},{content:{},types:{}}),r=(()=>{let t=(0,BF.getFieldCtx)("repeat",n);return(0,a.RepeatableWidgetsLegacy)(t).encode(e.repeat)})()||[];return{content:{"non-repeat":t.content,repeat:r.map(e=>e.content)},types:{[n.keyOfType]:"Slice",...t.types,...r.reduce((e,t)=>({...e,...t.types}),{})}}}),e.CompositeSliceContent=t.strict({__TYPE__:t.literal(e.CompositeSliceContentType),nonRepeat:t.record(t.string,i.NestableContent),repeat:a.RepeatableWidgets}),e.compositeSliceContentWithDefaultValues=function(e,t){var n,r;let i=(0,o.withDefaultNestableContentValues)(null!==(n=e["non-repeat"])&&void 0!==n?n:{},t.nonRepeat),a=(0,o.repeatableContentWithDefaultNestableContentValues)(null!==(r=e.repeat)&&void 0!==r?r:{},t.repeat);return{...t,nonRepeat:i,repeat:a}},e.traverseCompositeSliceContent=function({path:e,sliceKey:t,sliceName:n,model:o,content:a}){return(u,s)=>{let l=Object.entries(a.widget.nonRepeat).reduce((r,[a,s])=>{var l,c,d;let f=(null==o?void 0:o.type)==="SharedSlice"?null===(c=null===(l=null==o?void 0:o.fields)||void 0===l?void 0:l.primary)||void 0===c?void 0:c[a]:null===(d=null==o?void 0:o["non-repeat"])||void 0===d?void 0:d[a],p=u({path:e.concat([{key:"non-repeat",type:"primary"},{key:a,type:"Widget"}]),key:a,apiId:n,model:f,content:s});return p?(0,i.isNestableContent)(p)?{...r,[a]:p}:(console.warn(`Warn: Non nestable content with key [${a}] detected in a composite slice [${n}] with key [${t}]`),r):r},{}),c=(0,r.traverseGroupItemsContent)({path:e.concat([{key:"repeat",type:"items"}]),model:(null==o?void 0:o.type)==="SharedSlice"?null==o?void 0:o.fields.items:null==o?void 0:o.repeat,content:a.widget.repeat})(u);return s({key:t,apiId:n,path:e,model:o,content:{...a,widget:{__TYPE__:"CompositeSliceContent",repeat:c,nonRepeat:l}}})}},e.migrateCompositeSlice=function(e,t){let[,n]=t.key.split("$");return{key:`${e.sliceName}$${n}`,name:e.sliceName,maybeLabel:t.maybeLabel,widget:{__TYPE__:"SharedSliceContent",variation:e.variationId,primary:Object.entries(t.widget.nonRepeat).reduce((n,[r,i])=>{var o;return!(null===(o=e.fields.primary)||void 0===o)&&o[r]?{...n,[r]:i}:(console.warn(`The widget ${r} in the non-repeat zone of the composite slice [${e.sliceName}] with key [${t.key}] doesn't exist in the model.`),n)},{}),items:t.widget.repeat.map(n=>({__TYPE__:"GroupItemContent",value:n.value.reduce((n,[r,i])=>{var o;return!(null===(o=e.fields.items)||void 0===o)&&o[r]?n.concat([[r,i]]):(console.warn(`The widget ${r} in the repeat zone of the composite slice [${e.sliceName}] with key [${t.key}] doesn't exist in the model.`),n)},[])}),[])}}}}(PW)),PW}var PQ,PV,Pz={},PY={};function PH(){if(PV)return PY;PV=1,Object.defineProperty(PY,"__esModule",{value:!0}),PY.isSlicePrimaryContent=PY.SlicePrimaryLegacy=PY.SlicePrimaryContent=void 0;let e=(0,ee.__importStar)(MY),t=PU(),n=PO();return PY.SlicePrimaryContent=e.union([n.NestableContent,t.GroupContent]),PY.SlicePrimaryLegacy=e=>{let r=(0,t.GroupLegacy)(e),i=(0,n.NestableLegacy)(e);return{decode:t=>e.fieldType===Ly.GroupFieldType?r.decode(t):i.decode(t),encode:e=>(0,t.isGroupContent)(e)?r.encode(e):i.encode(e)}},PY.isSlicePrimaryContent=e=>(0,n.isNestableContent)(e)||(0,t.isGroupContent)(e),PY}function PG(){return PZ||(PZ=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.traverseSharedSliceContent=e.sharedSliceContentWithDefaultValues=e.SharedSliceContent=e.SharedSliceLegacy=e.isSharedSliceContent=e.SharedSliceContentType=void 0;let t=(0,ee.__importStar)(MY),n=BR(),r=PU(),i=PO(),o=PM(),a=PN(),u=PH();e.SharedSliceContentType="SharedSliceContent",e.isSharedSliceContent=t=>(0,n.hasContentType)(t)&&t.__TYPE__===e.SharedSliceContentType;let s=t.exact(t.type({variation:t.string,items:(0,Lp.withFallback)(t.array(t.unknown),[]),primary:(0,Lp.withFallback)(t.UnknownRecord,{})}));e.SharedSliceLegacy=n=>new t.Type("SharedSliceLegacy",e.isSharedSliceContent,t=>(0,Ft.pipe)(s.decode(t),j4.either.map(t=>{let r=(()=>{let e=(0,BF.getFieldCtx)("items",n,["variations",t.variation]),r=(0,a.RepeatableWidgetsLegacy)(e).decode(t.items);if(!(!r||(0,j8.isLeft)(r)))return r.right})()||[],i=Object.entries(t.primary).reduce((e,[r,i])=>{let o=(0,BF.getFieldCtx)(r,n,["variations",t.variation,"primary"]),a=(0,u.SlicePrimaryLegacy)(o).decode(i);return!a||(0,j8.isLeft)(a)?e:{...e,[r]:a.right}},{});return{variation:t.variation,primary:i,items:r,__TYPE__:e.SharedSliceContentType}})),e=>{let t=Object.entries(e.primary).reduce((t,[r,i])=>{let o=(0,BF.getFieldCtx)(r,n,["variations",e.variation,"primary"]),a=(0,u.SlicePrimaryLegacy)(o).encode(i);return a?{content:{...t.content,[r]:a.content},types:{...t.types,...a.types}}:t},{content:{},types:{}}),r=(()=>{let t=(0,BF.getFieldCtx)("items",n,["variations",e.variation]);return(0,a.RepeatableWidgetsLegacy)(t).encode(e.items)})()||[];return{content:{primary:t.content,items:r.map(e=>e.content),variation:e.variation},types:{[n.keyOfType]:"SharedSlice",...t.types,...r.reduce((e,t)=>({...e,...t.types}),{})}}}),e.SharedSliceContent=t.strict({__TYPE__:t.literal(e.SharedSliceContentType),variation:t.string,primary:t.record(t.string,u.SlicePrimaryContent),items:a.RepeatableWidgets}),e.sharedSliceContentWithDefaultValues=function(e,t){var n,r;let i=e.variations.find(e=>e.id===t.variation),a=null!==(n=null==i?void 0:i.primary)&&void 0!==n?n:{},u=null!==(r=null==i?void 0:i.items)&&void 0!==r?r:{},s=(0,o.withDefaultSlicePrimaryContentValues)(a,t.primary),l=(0,o.repeatableContentWithDefaultNestableContentValues)(u,t.items);return{...t,primary:s,items:l}},e.traverseSharedSliceContent=function({path:e,sliceKey:t,sliceName:n,model:o,content:a}){return(s,l)=>{let c=Object.entries(a.widget.primary).reduce((a,[l,c])=>{var d,f;let p=null===(f=null===(d=null==o?void 0:o.fields)||void 0===d?void 0:d.primary)||void 0===f?void 0:f[l],A=(0,r.isGroupContent)(c)?(0,r.traverseGroupContent)({path:e.concat([{key:"primary",type:"primary"},{key:l,type:"Widget"}]),key:l,apiId:l,content:c,model:(null==p?void 0:p.type)===Ly.GroupFieldType?p:void 0})(s):(0,i.isNestableContent)(c)?s({path:e.concat([{key:"primary",type:"primary"},{key:l,type:"Widget"}]),key:l,apiId:l,model:p,content:c}):void 0;return A?((0,u.isSlicePrimaryContent)(A)||console.warn(`Warn: Non nestable or group content with key [${l}] detected in a shared slice [${n}] with key [${t}]`),{...a,[l]:A}):a},{}),d=(0,r.traverseGroupItemsContent)({path:e.concat([{key:"items",type:"items"}]),model:null==o?void 0:o.fields.items,content:a.widget.items})(s);return l({key:t,apiId:n,path:e,model:o,content:{...a,widget:{__TYPE__:"SharedSliceContent",variation:a.widget.variation,primary:c,items:d}}})}}}(Pz)),Pz}var PZ,PJ,P$={};function PX(){if(PJ)return P$;PJ=1,Object.defineProperty(P$,"__esModule",{value:!0}),P$.migrateSimpleSlice=P$.traverseSimpleSliceContent=P$.SimpleSliceLegacy=P$.isSimpleSliceContent=P$.SimpleSliceContent=void 0;let e=(0,ee.__importStar)(MY),t=PU(),n=PO();return P$.SimpleSliceContent=e.union([n.NestableContent,t.GroupContent]),P$.isSimpleSliceContent=e=>(0,n.isNestableContent)(e)||(0,t.isGroupContent)(e),P$.SimpleSliceLegacy=e=>({decode:"Group"===e.fieldType?(0,t.GroupLegacy)(e).decode.bind(null):(0,n.NestableLegacy)(e).decode.bind(null),encode:r=>"GroupContentType"===r.__TYPE__?(0,t.GroupLegacy)(e).encode(r):(0,n.NestableLegacy)(e).encode(r)}),P$.traverseSimpleSliceContent=function({path:e,sliceKey:n,sliceName:r,model:i,content:o}){return(a,u)=>{var s;if((0,t.isGroupContent)(o.widget)){let n=(0,t.traverseGroupContent)({path:e,key:o.key,apiId:o.name,model:(null==i?void 0:i.type)==="Group"?i:(null==i?void 0:i.type)==="SharedSlice"?{type:"Group",config:{fields:i.fields.items||{}}}:void 0,content:o.widget})(a);return n&&u({key:o.key,apiId:o.name,path:e,model:i,content:{...o,widget:n}})}let l=a({key:o.key,apiId:o.name,path:e,model:(null==i?void 0:i.type)==="SharedSlice"?null===(s=i.fields.primary)||void 0===s?void 0:s[o.name]:(null==i?void 0:i.type)!=="Group"?i:void 0,content:o.widget});return l&&u({key:n,apiId:r,path:e,model:i,content:{...o,widget:l}})}},P$.migrateSimpleSlice=function(e,t){var n;let[,r]=t.key.split("$"),i=`${e.sliceName}$${r}`;return"GroupContentType"===t.widget.__TYPE__?{key:i,name:e.sliceName,maybeLabel:t.maybeLabel,widget:{__TYPE__:"SharedSliceContent",variation:e.variationId,primary:{},items:t.widget.value.map(t=>({__TYPE__:"GroupItemContent",value:t.value.reduce((t,[n,r])=>{var i;return!(null===(i=e.fields.items)||void 0===i)&&i[n]?t.concat([[n,r]]):t},[])}),[])}}:{key:i,name:e.sliceName,maybeLabel:t.maybeLabel,widget:{__TYPE__:"SharedSliceContent",variation:e.variationId,primary:!(null===(n=e.fields.primary)||void 0===n)&&n[t.name]?{[t.name]:t.widget}:{},items:[]}}},P$}function P0(){return P1||(P1=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SliceContent=e.SliceLegacy=void 0;let t=(0,ee.__importStar)(MY),n=Pq(),r=PG(),i=PX();e.SliceLegacy=e=>({decode:t=>(()=>{switch(e.fieldType){case"Slice":return(0,n.CompositeSliceLegacy)(e);case"SharedSlice":return(0,r.SharedSliceLegacy)(e);default:return(0,i.SimpleSliceLegacy)(e)}})().decode(t),encode:t=>{switch(t.__TYPE__){case"SharedSliceContent":return(0,r.SharedSliceLegacy)(e).encode(t);case"CompositeSliceContent":return(0,n.CompositeSliceLegacy)(e).encode(t);default:return(0,i.SimpleSliceLegacy)(e).encode(t)}}}),e.SliceContent=t.union([n.CompositeSliceContent,r.SharedSliceContent,i.SimpleSliceContent]),(0,ee.__exportStar)(Pq(),e),(0,ee.__exportStar)(PG(),e),(0,ee.__exportStar)(PX(),e),(0,ee.__exportStar)(PH(),e)}(PP)),PP}var P1,P2,P6={};function P5(){if(P2)return P6;P2=1,Object.defineProperty(P6,"__esModule",{value:!0}),P6.migrateSliceItem=P6.SlicesItemLegacy=P6.sliceItemContentWithDefaultValues=P6.isSimpleSliceItemContent=P6.isCompositeSliceItemContent=P6.isSharedSliceItemContent=P6.SliceItemContent=void 0;let e=(0,ee.__importStar)(MY),t=PU(),n=PO(),r=PM(),i=P0(),o=Pq(),a=PG(),u=PX();function s(e){return(0,o.isCompositeSliceContent)(e.widget)}function l(e){return(0,t.isGroupContent)(e.widget)||(0,n.isNestableContent)(e.widget)}P6.SliceItemContent=e.type({key:e.string,name:e.string,maybeLabel:e.union([e.string,e.undefined]),widget:i.SliceContent}),P6.isSharedSliceItemContent=function(e){return(0,a.isSharedSliceContent)(e.widget)},P6.isCompositeSliceItemContent=s,P6.isSimpleSliceItemContent=l,P6.sliceItemContentWithDefaultValues=function(e,n){var u;if("SharedSlice"===e.type&&(0,a.isSharedSliceContent)(n))return(0,i.sharedSliceContentWithDefaultValues)(e,n);if("Slice"===e.type&&(0,o.isCompositeSliceContent)(n))return(0,i.compositeSliceContentWithDefaultValues)(e,n);if("Group"===e.type&&(0,t.isGroupContent)(n)&&!(null===(u=e.config)||void 0===u)&&u.fields){let t=(0,r.repeatableContentWithDefaultNestableContentValues)(e.config.fields,n.value);return{...n,value:t}}return n};let c=e.exact(e.intersection([e.type({key:e.string,value:e.unknown}),e.partial({label:(0,MX.nullable)(e.string)})]));return P6.SlicesItemLegacy=t=>new e.Type("SlicesItemLegacy",e=>((0,a.isSharedSliceContent)(e.widget),(0,o.isCompositeSliceContent)(e.widget),(0,u.isSimpleSliceContent)(e.widget)),(n,r)=>(0,Ft.pipe)(c.decode(n),j4.either.chain(o=>{var a;let u=o.key.indexOf("$"),s=o.key.substring(0,u>0?u:void 0),l=(0,BF.getFieldCtx)(s,t),c=(0,i.SliceLegacy)(l).decode(o.value);return!c||(0,j8.isLeft)(c)?e.failure(n,r):e.success({key:o.key,name:s,maybeLabel:null!==(a=o.label)&&void 0!==a?a:void 0,widget:c.right})})),e=>{let n=(0,BF.getFieldCtx)(e.name,t),r=(0,i.SliceLegacy)(n).encode(e.widget);return{content:{key:e.key,label:e.maybeLabel,value:(null==r?void 0:r.content)||{}},types:(null==r?void 0:r.types)||{}}}),P6.migrateSliceItem=({model:e,content:t})=>s(t)&&(null==e?void 0:e.type)==="SharedSlice"?(0,o.migrateCompositeSlice)(e,t):l(t)&&(null==e?void 0:e.type)==="SharedSlice"?(0,u.migrateSimpleSlice)(e,t):t,P6}var P3,P9={};function P4(){return P8||(P8=1,Object.defineProperty(PB,"__esModule",{value:!0}),(0,ee.__exportStar)(P0(),PB),(0,ee.__exportStar)(P5(),PB),(0,ee.__exportStar)((P3||(P3=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.traverseSlices=e.slicesContentWithDefaultValues=e.SlicesContent=e.SlicesLegacy=e.isSlicesContent=e.SlicesContentType=void 0;let t=(0,ee.__importStar)(MY),n=BR(),r=Pq(),i=PG(),o=PX(),a=P5();e.SlicesContentType="SliceContentType",e.isSlicesContent=t=>(0,n.hasContentType)(t)&&t.__TYPE__===e.SlicesContentType,e.SlicesLegacy=n=>{let r=t.array((0,a.SlicesItemLegacy)(n));return new t.Type("SlicesLegacy",e.isSlicesContent,t=>(0,Ft.pipe)(r.decode(t),j4.either.map(t=>({__TYPE__:e.SlicesContentType,value:t}))),e=>{let t=r.encode(e.value);return{content:t.map(e=>e.content),types:t.reduce((e,t)=>({...e,...t.types}),{[n.keyOfType]:"Slices"})}})},e.SlicesContent=t.type({__TYPE__:t.literal(e.SlicesContentType),value:t.array(a.SliceItemContent)}),e.slicesContentWithDefaultValues=function(e,t){var n;let r=null===(n=null==e?void 0:e.config)||void 0===n?void 0:n.choices;if(void 0===r)return t;let i=t.value.map(e=>{let t=r[e.name];if(t){let n=(0,a.sliceItemContentWithDefaultValues)(t,e.widget);return{...e,widget:n}}return e});return{...t,value:i}},e.traverseSlices=function({path:e,key:t,model:n,content:u}){return({transformWidget:s=({content:e})=>e,transformSlice:l=({content:e})=>e})=>{let c=u.value.reduce((t,u)=>{let c=n&&function(e,t,n){var r,i;let o=null===(i=null===(r=null==t?void 0:t.config)||void 0===r?void 0:r.choices)||void 0===i?void 0:i[n.name];return(()=>{if((0,a.isSharedSliceItemContent)(n)&&o&&(0,Ly.isStaticSharedSlice)(o)){let e=o.variations.find(e=>e.id===n.widget.variation);return e?{type:"SharedSlice",sliceName:o.id,variationId:e.id,fields:{primary:e.primary||{},items:e.items||{}}}:void 0}})()||(()=>{var r;let i=MH.ContentPath.append(MH.ContentPath.serialize(e),n.name),o=Object.values((null===(r=null==t?void 0:t.config)||void 0===r?void 0:r.choices)||{}).find(e=>{var t;return!!(0,Ly.isStaticSharedSlice)(e)&&!!(!(null===(t=e.legacyPaths)||void 0===t)&&t[i])});if(!o)return;let a=null==o?void 0:o.variations.find(e=>{var t;return e.id===(null===(t=o.legacyPaths)||void 0===t?void 0:t[i])});if(a)return{type:"SharedSlice",sliceName:o.id,variationId:a.id,fields:{primary:a.primary||{},items:a.items||{}}}})()||(()=>{if(o){if((0,Ly.isCompositeSlice)(o))return{type:"Slice","non-repeat":o["non-repeat"]||{},repeat:o.repeat||{}};if((0,Ly.isLegacySlice)(o))return o}})()}(e,n,u),d=(0,a.isSharedSliceItemContent)(u)?(0,i.traverseSharedSliceContent)({path:e.concat({key:u.key,type:"SharedSlice"}),sliceKey:u.key,sliceName:u.name,model:(null==c?void 0:c.type)==="SharedSlice"?c:void 0,content:u})(s,l):(0,a.isCompositeSliceItemContent)(u)?(0,r.traverseCompositeSliceContent)({path:e.concat({key:u.key,type:"Slice"}),sliceKey:u.key,sliceName:u.name,model:(null==c?void 0:c.type)==="Slice"||(null==c?void 0:c.type)==="SharedSlice"?c:void 0,content:u})(s,l):(0,a.isSimpleSliceItemContent)(u)?(0,o.traverseSimpleSliceContent)({path:e.concat({key:u.key,type:"LegacySlice"}),sliceKey:u.key,sliceName:u.name,model:c&&(null==c?void 0:c.type)!=="Slice"?c:void 0,content:u})(s,l):void 0;return d?t.concat(d):t},[]);return s({path:e,key:t,apiId:t,model:n,content:{__TYPE__:u.__TYPE__,value:c}})}}}(P9)),P9),PB)),PB}var P8,P7,We={};function Wt(){return P7||(P7=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.UIDContent=e.UIDLegacy=e.isUIDContent=e.UIDContentType=void 0;let t=(0,ee.__importStar)(MY),n=BR();e.UIDContentType="UIDContent",e.isUIDContent=t=>(0,n.hasContentType)(t)&&t.__TYPE__===e.UIDContentType,e.UIDLegacy=n=>new t.Type("UIDLegacy",e.isUIDContent,n=>(0,Ft.pipe)(t.string.decode(n),j4.either.map(t=>e.UIDContent.encode({value:t,__TYPE__:e.UIDContentType}))),e=>({content:e.value,types:{[n.keyOfType]:"UID"}})),e.UIDContent=t.type({__TYPE__:t.literal(e.UIDContentType),value:t.string})}(We)),We}var Wn,Wr={};function Wi(){return h||(h=1,Object.defineProperty(BT,"__esModule",{value:!0}),(0,ee.__exportStar)(BE(),BT),(0,ee.__exportStar)(PU(),BT),(0,ee.__exportStar)(PO(),BT),(0,ee.__exportStar)(P4(),BT),(0,ee.__exportStar)(Wt(),BT),(0,ee.__exportStar)(function(){if(Wn)return Wr;Wn=1,Object.defineProperty(Wr,"__esModule",{value:!0}),Wr.WidgetLegacy=Wr.isWidgetContent=Wr.WidgetContent=void 0;let e=(0,ee.__importStar)(MY),t=PU(),n=PO(),r=P4(),i=Wt();return Wr.WidgetContent=e.union([t.GroupContent,n.NestableContent,i.UIDContent,r.SlicesContent]),Wr.isWidgetContent=e=>(0,t.isGroupContent)(e)||(0,n.isNestableContent)(e)||(0,i.isUIDContent)(e)||(0,r.isSlicesContent)(e),Wr.WidgetLegacy=e=>({decode(o){if(!e.fieldType)return;let a=(()=>{switch(e.fieldType){case"UID":return(0,i.UIDLegacy)(e);case"Group":return(0,t.GroupLegacy)(e);case"Choice":case"Slices":return(0,r.SlicesLegacy)(e);default:return(0,n.NestableLegacy)(e)}})();if(a)return a.decode(o)},encode(o){switch(o.__TYPE__){case i.UIDContentType:return(0,i.UIDLegacy)(e).encode(o);case t.GroupContentType:return(0,t.GroupLegacy)(e).encode(o);case r.SlicesContentType:return(0,r.SlicesLegacy)(e).encode(o);default:return(0,n.NestableLegacy)(e).encode(o)}}}),Wr}(),BT)),BT}Object.defineProperty(et,"__esModule",{value:!0}),et.migrateDocument=et.collectWidgets=et.traverseDocument=et.fillDocumentWithDefaultValues=et.DocumentLegacy=et.Document=void 0;let Wo=(0,ee.__importStar)(MY),Wa=Wi();et.Document=Wo.record(MG.WidgetKey,Wa.WidgetContent);let Wu=Wo.record(MG.WidgetKey,Wo.unknown),Ws=e=>new Wo.Type("Document",e=>!!e&&"object"==typeof e,t=>(0,Ft.pipe)(Wu.decode(t),j4.either.map(t=>Object.entries(t).reduce((t,[n,r])=>{let i=(0,BF.defaultCtx)(n,e),o=(0,Wa.WidgetLegacy)(i).decode(r);return!o||(0,j8.isLeft)(o)?t:{...t,[n]:o.right}},{}))),t=>Object.entries(t).reduce((t,[n,r])=>{let i=(0,BF.defaultCtx)(n,e),o=(0,Wa.WidgetLegacy)(i).encode(r);return o?{content:{...t.content,[n]:o.content},types:{...t.types,...o.types}}:t},{content:{},types:{}}));function Wl(e){let{types:t,widgets:n}=Object.entries(e).reduce((e,[t,n])=>{if(t.endsWith("_TYPE")){let r=BF.FieldOrSliceType.decode(n);if((0,j8.isRight)(r))return{...e,types:e.types.set(t.substring(0,t.length-5),r.right)}}return t.endsWith("_POSITION")||t.endsWith("_TYPE")?e:{...e,widgets:{...e.widgets,[t]:n}}},{types:new Map,widgets:{}}),r=e.slugs_INTERNAL||[];return{widgets:n,types:t,uid:e.uid,slugs:r}}function Wc(e){return{customTypeId:null==e?void 0:e.id,fields:Object.fromEntries((0,Ly.flattenSections)(e))}}function Wd({document:e,customType:t}){let n=t&&Ly.StaticCustomType.is(t)?Wc(t):t;return({transformWidget:t=({content:e})=>e,transformSlice:r=({content:e})=>e})=>{let i=n&&Object.entries(n.fields).reduce((e,[t,n])=>({...e,[t]:n}),{});return Object.entries(e).reduce((e,[o,a])=>{let u=i&&i[o],s=MH.ContentPath.make([{key:null==n?void 0:n.customTypeId,type:"CustomType"},{key:o,type:"Widget"}]),l=(()=>{switch(a.__TYPE__){case"SliceContentType":return(0,Wa.traverseSlices)({path:s,key:o,model:(null==u?void 0:u.type)==="Slices"||(null==u?void 0:u.type)==="Choice"?u:void 0,content:a})({transformWidget:t,transformSlice:r});case"GroupContentType":return(0,Wa.traverseGroupContent)({path:s,key:o,apiId:o,model:(null==u?void 0:u.type)==="Group"?u:void 0,content:a})(t);default:return t({path:s,key:o,apiId:o,model:(null==u?void 0:u.type)!=="Group"&&(null==u?void 0:u.type)!=="Slices"&&(null==u?void 0:u.type)!=="Choice"?u:void 0,content:a})}})();return{...e,...l?{[o]:l}:{}}},{})}}function Wf(e,t){let n=Ly.StaticCustomType.is(t)?Wc(t):t;return Object.values((0,Ly.collectSharedSlices)(n)).some(e=>!!e.legacyPaths)?Wd({document:e,customType:t})({transformSlice:Wa.migrateSliceItem}):e}et.DocumentLegacy={_codec:Ws,extractMetadata:Wl,parse:function(e,t){let n=(0,Ft.pipe)(Wo.record(MG.WidgetKey,Wo.unknown).decode(e),j4.either.chain(e=>{let{types:t,widgets:n}=Wl(e);return Ws(t).decode(n)}));return(0,j8.isLeft)(n)?void 0:Wf(n.right,t)},encode:function(e){let t=Ws().encode(e);return{...t.content,...t.types}}},et.fillDocumentWithDefaultValues=function(e,t){let{fields:n}=e&&Ly.StaticCustomType.is(e)?Wc(e):e;return Object.entries(n).reduce((e,[n,r])=>{let i=t[n],o=(()=>{switch(r.type){case"Group":return(0,Wa.isGroupContent)(i)?(0,Wa.groupContentWithDefaultValues)(r,i):i;case"Choice":case"Slices":return(0,Wa.isSlicesContent)(i)?(0,Wa.slicesContentWithDefaultValues)(r,i):i;default:return void 0===i&&Ly.NestableWidget.is(r)?(0,Wa.NestableContentDefaultValue)(r):i}})();return o?{...e,[n]:o}:e},t)},et.traverseDocument=Wd,et.collectWidgets=function(e,t){let n={};return Wd({document:e})({transformWidget:({content:e,path:r})=>{let i=MH.ContentPath.serialize(r);return t(e,r)&&(n[i]=e),e}}),n},et.migrateDocument=Wf,Object.defineProperty(z,"__esModule",{value:!0}),(0,ee.__exportStar)(et,z),(0,ee.__exportStar)(Wi(),z),(0,ee.__exportStar)(BF,z);let Wp={unclassified:{title:"Draft",color:"amber"},published:{title:"Live",color:"green"},release:{title:"Planned",color:"purple"},archived:{title:"Archived",color:"grey"}},WA={unclassified:["unclassified","published"],archived:["unclassified","published"],release:["release","published"],published:["published"]};function Wh(e){let{documentId:t,versionId:n,baseUrl:r,status:i,releaseId:o}=e,a=new URLSearchParams((0,w.aO)({params:{s:i,v:n,r:o}})).toString();return new URL(`pages/${t}?${a}`,r)}C.createContext((i=!1,{clearReset:()=>{i=!1},reset:()=>{i=!0},isReset:()=>i}));let Wm="media-library-newMediaLibraryFeaturesBannerClosed";function Wg(e){let{maxWidth:t}=e,[n,r]=(0,C.useState)(()=>!(F.Xb.isAvailable()&&F.Xb.read(Wm)));return n?V.jsx(S.xu,{justifyContent:"center",padding:{inline:16,block:12},backgroundColor:"purple9",children:V.jsxs(S.xu,{maxWidth:t,width:"100%",alignItems:"center",gap:8,children:[V.jsx(S.CircleIcon,{color:"purple",name:"autoFixHigh",size:"extraSmall",variant:"solid"}),V.jsxs("div",{children:[V.jsx(S.xv,{color:"white",variant:"bold",children:"New features on the Media Library now available!"}),V.jsxs(S.xu,{gap:4,flexWrap:"wrap",children:[V.jsx(S.xv,{color:"white",children:"Media Tagging, Filtering, Improved Search & Bulk Deletion"}),V.jsx(S.xv,{color:"white",variant:"bold",href:"https://prismic.io/lp/new-media-library",target:"_blank",rel:"noopener noreferrer",underline:!0,children:"Find out More →"})]})]}),V.jsx(S.zx,{invisible:!0,color:"white",sx:{marginLeft:"auto",marginBottom:"auto",flexShrink:0},underline:!0,onClick:function(){r(!1),F.Xb.isAvailable()&&F.Xb.write(Wm,String(Date.now()))},children:"Close"})]})}):null}let Wy=(0,C.createContext)(void 0),Wv={selectedIds:new Set,excludedIds:new Set,isAllSelected:!1};function Wx(e){let{children:t,initialState:n,initialTotalItemCount:r,isSelectAllEnabled:i=!1}=e,o=(0,C.useRef)(),a=(0,C.useRef)(r||0),[u,s]=(0,C.useState)(function(){if(n&&n.selectedIds){let e=[...n.selectedIds].pop();e&&(o.current=e)}return{...Wv,...n}}),l=(0,C.useMemo)(()=>{let{selectedIds:e,excludedIds:t,isAllSelected:n}=u;return n?a.current-t.size:e.size},[u]),c=(0,C.useCallback)(e=>{let{isAllSelected:t,selectedIds:n,excludedIds:r}=u;return t?!r.has(e):n.has(e)},[u]),d=(0,C.useCallback)(()=>{let{isAllSelected:e,selectedIds:t,excludedIds:n}=u;return{selectedIds:[...t],excludedIds:[...n],isAllSelected:e,selectedCount:l}},[u,l]),f=(0,_.R9)(()=>{i&&s({isAllSelected:!0,selectedIds:new Set,excludedIds:new Set})}),p=(0,_.R9)(()=>{s({isAllSelected:!1,selectedIds:new Set,excludedIds:new Set})});(0,C.useEffect)(()=>{let{isAllSelected:e,selectedIds:t,excludedIds:n}=u,r=a.current;if(!(0===r||!i)){if(e&&n.size===r){p();return}if(!e&&t.size===r){f();return}}},[u,i,f,p]);let A=(0,_.R9)(e=>{let{id:t,isSingleSelection:n,metaKey:r,shiftKey:i,ids:a}=e;return i&&a&&a.length>0&&o.current?function(e,t,n){let r=function(e,t,n){let r=e.indexOf(t),i=e.indexOf(n);if(-1===r||-1===i)throw Error("Both startValue and endValue must be in the array");return r<=i?e.slice(r,i+1):e.slice(i,r+1)}(t,n,e),i=c(e);return i?g(r):m(r),i}(t,a,o.current):n&&!r?c(t)&&1===l?s(e=>({...e,selectedIds:new Set})):s({isAllSelected:!1,selectedIds:new Set([t]),excludedIds:new Set}):c(t)?g([t]):m([t]),o.current=t,c(t)}),h=(0,_.R9)(()=>{l>0?p():f()});function m(e){let{isAllSelected:t}=u;if(t){s(t=>({...t,excludedIds:WC(t.excludedIds,e)}));return}s(t=>({...t,selectedIds:WS(t.selectedIds,e)}))}function g(e){let{isAllSelected:t}=u;if(t){s(t=>({...t,excludedIds:WS(t.excludedIds,e)}));return}s(t=>({...t,selectedIds:WC(t.selectedIds,e)}))}function y(e){a.current=e}let v=(0,C.useMemo)(()=>({selectedCount:l,state:u,totalItemCount:a.current,isSelected:c,isSelectAllEnabled:i,getSelectionState:d,toggleSelection:A,toggleSelectAll:h,clearSelection:p,setTotalItemCount:y}),[u,p,d,i,c,l,h,A]);return V.jsx(Wy.Provider,{value:v,children:t})}function Wb(e){let t=(0,C.useContext)(Wy);if(void 0===t)throw Error("useSelectionManagerContext must be used within a SelectionManagerProvider");let{totalItemCount:n,onChangeSelection:r}=e||{},{setTotalItemCount:i,totalItemCount:o,state:a,getSelectionState:u,...s}=t;void 0!==n&&n!==o&&i(n);let l=(0,_.R9)(r);return(0,C.useEffect)(()=>{null==l||l(u())},[u,l,a]),{...s,getSelectionState:u,isAllSelected:a.isAllSelected}}function WC(e,t){let n=new Set(e);return t.forEach(e=>n.delete(e)),n}function WS(e,t){return new Set([...e,...t])}let Ww=(0,C.createContext)(void 0);function WI(){let e=(0,C.useContext)(Ww);if(!e)throw Error("Missing EditorConfigContext.Provider");return e}class W_ extends Error{}function WT(e){throw new W_(`Missing EditorConfig.${e}`)}(u=m||(m={})).assertEqual=e=>e,u.assertIs=function(e){},u.assertNever=function(e){throw Error()},u.arrayToEnum=e=>{let t={};for(let n of e)t[n]=n;return t},u.getValidEnumValues=e=>{let t=u.objectKeys(e).filter(t=>"number"!=typeof e[e[t]]),n={};for(let r of t)n[r]=e[r];return u.objectValues(n)},u.objectValues=e=>u.objectKeys(e).map(function(t){return e[t]}),u.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{let t=[];for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},u.find=(e,t)=>{for(let n of e)if(t(n))return n},u.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e,u.joinValues=function(e,t=" | "){return e.map(e=>"string"==typeof e?`'${e}'`:e).join(t)},u.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t,(g||(g={})).mergeShapes=(e,t)=>({...e,...t});let Wk=m.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),WO=e=>{switch(typeof e){case"undefined":return Wk.undefined;case"string":return Wk.string;case"number":return isNaN(e)?Wk.nan:Wk.number;case"boolean":return Wk.boolean;case"function":return Wk.function;case"bigint":return Wk.bigint;case"symbol":return Wk.symbol;case"object":return Array.isArray(e)?Wk.array:null===e?Wk.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?Wk.promise:"u">typeof Map&&e instanceof Map?Wk.map:"u">typeof Set&&e instanceof Set?Wk.set:"u">typeof Date&&e instanceof Date?Wk.date:Wk.object;default:return Wk.unknown}},WR=m.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class WE extends Error{constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){let t=e||function(e){return e.message},n={_errors:[]},r=e=>{for(let i of e.issues)if("invalid_union"===i.code)i.unionErrors.map(r);else if("invalid_return_type"===i.code)r(i.returnTypeError);else if("invalid_arguments"===i.code)r(i.argumentsError);else if(0===i.path.length)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(this),n}toString(){return this.message}get message(){return JSON.stringify(this.issues,m.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){let t={},n=[];for(let r of this.issues)r.path.length>0?(t[r.path[0]]=t[r.path[0]]||[],t[r.path[0]].push(e(r))):n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}}WE.create=e=>new WE(e);let Wj=(e,t)=>{let n;switch(e.code){case WR.invalid_type:n=e.received===Wk.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case WR.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,m.jsonStringifyReplacer)}`;break;case WR.unrecognized_keys:n=`Unrecognized key(s) in object: ${m.joinValues(e.keys,", ")}`;break;case WR.invalid_union:n="Invalid input";break;case WR.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${m.joinValues(e.options)}`;break;case WR.invalid_enum_value:n=`Invalid enum value. Expected ${m.joinValues(e.options)}, received '${e.received}'`;break;case WR.invalid_arguments:n="Invalid function arguments";break;case WR.invalid_return_type:n="Invalid function return type";break;case WR.invalid_date:n="Invalid date";break;case WR.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:m.assertNever(e.validation):n="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case WR.too_small:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case WR.too_big:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case WR.custom:n="Invalid input";break;case WR.invalid_intersection_types:n="Intersection results could not be merged";break;case WR.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case WR.not_finite:n="Number must be finite";break;default:n=t.defaultError,m.assertNever(e)}return{message:n}},WF=Wj;function WM(){return WF}let WU=e=>{let{data:t,path:n,errorMaps:r,issueData:i}=e,o=[...n,...i.path||[]],a={...i,path:o},u="";for(let e of r.filter(e=>!!e).slice().reverse())u=e(a,{data:t,defaultError:u}).message;return{...i,path:o,message:i.message||u}};function WL(e,t){let n=WU({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,WM(),Wj].filter(e=>!!e)});e.common.issues.push(n)}class WK{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){let n=[];for(let r of t){if("aborted"===r.status)return WB;"dirty"===r.status&&e.dirty(),n.push(r.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,t){let n=[];for(let e of t)n.push({key:await e.key,value:await e.value});return WK.mergeObjectSync(e,n)}static mergeObjectSync(e,t){let n={};for(let r of t){let{key:t,value:i}=r;if("aborted"===t.status||"aborted"===i.status)return WB;"dirty"===t.status&&e.dirty(),"dirty"===i.status&&e.dirty(),("u">typeof i.value||r.alwaysSet)&&(n[t.value]=i.value)}return{status:e.value,value:n}}}let WB=Object.freeze({status:"aborted"}),WP=e=>({status:"dirty",value:e}),WW=e=>({status:"valid",value:e}),WD=e=>"aborted"===e.status,WN=e=>"dirty"===e.status,Wq=e=>"valid"===e.status,WQ=e=>"u">typeof Promise&&e instanceof Promise;(s=y||(y={})).errToObj=e=>"string"==typeof e?{message:e}:e||{},s.toString=e=>"string"==typeof e?e:null==e?void 0:e.message;class WV{constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}let Wz=(e,t)=>{if(Wq(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let t=new WE(e.common.issues);return this._error=t,this._error}}};function WY(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:i}:{errorMap:(e,t)=>"invalid_type"!==e.code?{message:t.defaultError}:typeof t.data>"u"?{message:r??t.defaultError}:{message:n??t.defaultError},description:i}}class WH{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return WO(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:WO(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new WK,ctx:{common:e.parent.common,data:e.data,parsedType:WO(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(WQ(t))throw Error("Synchronous parse encountered promise.");return t}_parseAsync(e){return Promise.resolve(this._parse(e))}parse(e,t){let n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){var n;let r={common:{issues:[],async:null!==(n=null==t?void 0:t.async)&&void 0!==n&&n,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:WO(e)},i=this._parseSync({data:e,path:r.path,parent:r});return Wz(r,i)}async parseAsync(e,t){let n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){let n={common:{issues:[],contextualErrorMap:null==t?void 0:t.errorMap,async:!0},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:WO(e)},r=this._parse({data:e,path:n.path,parent:n});return Wz(n,await (WQ(r)?r:Promise.resolve(r)))}refine(e,t){let n=e=>"string"==typeof t||typeof t>"u"?{message:t}:"function"==typeof t?t(e):t;return this._refinement((t,r)=>{let i=e(t),o=()=>r.addIssue({code:WR.custom,...n(t)});return"u">typeof Promise&&i instanceof Promise?i.then(e=>!!e||(o(),!1)):!!i||(o(),!1)})}refinement(e,t){return this._refinement((n,r)=>!!e(n)||(r.addIssue("function"==typeof t?t(n,r):t),!1))}_refinement(e){return new DS({schema:this,typeName:v.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Dw.create(this,this._def)}nullable(){return DI.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Da.create(this,this._def)}promise(){return DC.create(this,this._def)}or(e){return Ds.create([this,e],this._def)}and(e){return Dd.create(this,e,this._def)}transform(e){return new DS({...WY(this._def),schema:this,typeName:v.ZodEffects,effect:{type:"transform",transform:e}})}default(e){return new D_({...WY(this._def),innerType:this,defaultValue:"function"==typeof e?e:()=>e,typeName:v.ZodDefault})}brand(){return new DR({typeName:v.ZodBranded,type:this,...WY(this._def)})}catch(e){return new DT({...WY(this._def),innerType:this,catchValue:"function"==typeof e?e:()=>e,typeName:v.ZodCatch})}describe(e){return new this.constructor({...this._def,description:e})}pipe(e){return DE.create(this,e)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}let WG=/^c[^\s-]{8,}$/i,WZ=/^[a-z][a-z0-9]*$/,WJ=/[0-9A-HJKMNP-TV-Z]{26}/,W$=/^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i,WX=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\])|(\[IPv6:(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))\])|([A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])*(\.[A-Za-z]{2,})+))$/,W0=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u"),W1=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,W2=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,W6=e=>e.precision?e.offset?RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`):0===e.precision?e.offset?RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):e.offset?RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");class W5 extends WH{constructor(){super(...arguments),this._regex=(e,t,n)=>this.refinement(t=>e.test(t),{validation:t,code:WR.invalid_string,...y.errToObj(n)}),this.nonempty=e=>this.min(1,y.errToObj(e)),this.trim=()=>new W5({...this._def,checks:[...this._def.checks,{kind:"trim"}]}),this.toLowerCase=()=>new W5({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]}),this.toUpperCase=()=>new W5({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}_parse(e){let t;if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==Wk.string){let t=this._getOrReturnCtx(e);return WL(t,{code:WR.invalid_type,expected:Wk.string,received:t.parsedType}),WB}let n=new WK;for(let o of this._def.checks)if("min"===o.kind)e.data.length<o.value&&(WL(t=this._getOrReturnCtx(e,t),{code:WR.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if("max"===o.kind)e.data.length>o.value&&(WL(t=this._getOrReturnCtx(e,t),{code:WR.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if("length"===o.kind){let r=e.data.length>o.value,i=e.data.length<o.value;(r||i)&&(t=this._getOrReturnCtx(e,t),r?WL(t,{code:WR.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):i&&WL(t,{code:WR.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),n.dirty())}else if("email"===o.kind)WX.test(e.data)||(WL(t=this._getOrReturnCtx(e,t),{validation:"email",code:WR.invalid_string,message:o.message}),n.dirty());else if("emoji"===o.kind)W0.test(e.data)||(WL(t=this._getOrReturnCtx(e,t),{validation:"emoji",code:WR.invalid_string,message:o.message}),n.dirty());else if("uuid"===o.kind)W$.test(e.data)||(WL(t=this._getOrReturnCtx(e,t),{validation:"uuid",code:WR.invalid_string,message:o.message}),n.dirty());else if("cuid"===o.kind)WG.test(e.data)||(WL(t=this._getOrReturnCtx(e,t),{validation:"cuid",code:WR.invalid_string,message:o.message}),n.dirty());else if("cuid2"===o.kind)WZ.test(e.data)||(WL(t=this._getOrReturnCtx(e,t),{validation:"cuid2",code:WR.invalid_string,message:o.message}),n.dirty());else if("ulid"===o.kind)WJ.test(e.data)||(WL(t=this._getOrReturnCtx(e,t),{validation:"ulid",code:WR.invalid_string,message:o.message}),n.dirty());else if("url"===o.kind)try{new URL(e.data)}catch{WL(t=this._getOrReturnCtx(e,t),{validation:"url",code:WR.invalid_string,message:o.message}),n.dirty()}else{var r,i;"regex"===o.kind?(o.regex.lastIndex=0,o.regex.test(e.data)||(WL(t=this._getOrReturnCtx(e,t),{validation:"regex",code:WR.invalid_string,message:o.message}),n.dirty())):"trim"===o.kind?e.data=e.data.trim():"includes"===o.kind?e.data.includes(o.value,o.position)||(WL(t=this._getOrReturnCtx(e,t),{code:WR.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),n.dirty()):"toLowerCase"===o.kind?e.data=e.data.toLowerCase():"toUpperCase"===o.kind?e.data=e.data.toUpperCase():"startsWith"===o.kind?e.data.startsWith(o.value)||(WL(t=this._getOrReturnCtx(e,t),{code:WR.invalid_string,validation:{startsWith:o.value},message:o.message}),n.dirty()):"endsWith"===o.kind?e.data.endsWith(o.value)||(WL(t=this._getOrReturnCtx(e,t),{code:WR.invalid_string,validation:{endsWith:o.value},message:o.message}),n.dirty()):"datetime"===o.kind?W6(o).test(e.data)||(WL(t=this._getOrReturnCtx(e,t),{code:WR.invalid_string,validation:"datetime",message:o.message}),n.dirty()):"ip"===o.kind?(r=e.data,("v4"===(i=o.version)||!i)&&W1.test(r)||("v6"===i||!i)&&W2.test(r)||(WL(t=this._getOrReturnCtx(e,t),{validation:"ip",code:WR.invalid_string,message:o.message}),n.dirty())):m.assertNever(o)}return{status:n.value,value:e.data}}_addCheck(e){return new W5({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...y.errToObj(e)})}url(e){return this._addCheck({kind:"url",...y.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...y.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...y.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...y.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...y.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...y.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...y.errToObj(e)})}datetime(e){var t;return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(null==e?void 0:e.precision)>"u"?null:null==e?void 0:e.precision,offset:null!==(t=null==e?void 0:e.offset)&&void 0!==t&&t,...y.errToObj(null==e?void 0:e.message)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...y.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null==t?void 0:t.position,...y.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...y.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...y.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...y.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...y.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...y.errToObj(t)})}get isDatetime(){return!!this._def.checks.find(e=>"datetime"===e.kind)}get isEmail(){return!!this._def.checks.find(e=>"email"===e.kind)}get isURL(){return!!this._def.checks.find(e=>"url"===e.kind)}get isEmoji(){return!!this._def.checks.find(e=>"emoji"===e.kind)}get isUUID(){return!!this._def.checks.find(e=>"uuid"===e.kind)}get isCUID(){return!!this._def.checks.find(e=>"cuid"===e.kind)}get isCUID2(){return!!this._def.checks.find(e=>"cuid2"===e.kind)}get isULID(){return!!this._def.checks.find(e=>"ulid"===e.kind)}get isIP(){return!!this._def.checks.find(e=>"ip"===e.kind)}get minLength(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}W5.create=e=>{var t;return new W5({checks:[],typeName:v.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...WY(e)})};class W3 extends WH{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){let t;if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==Wk.number){let t=this._getOrReturnCtx(e);return WL(t,{code:WR.invalid_type,expected:Wk.number,received:t.parsedType}),WB}let n=new WK;for(let r of this._def.checks)"int"===r.kind?m.isInteger(e.data)||(WL(t=this._getOrReturnCtx(e,t),{code:WR.invalid_type,expected:"integer",received:"float",message:r.message}),n.dirty()):"min"===r.kind?(r.inclusive?e.data<r.value:e.data<=r.value)&&(WL(t=this._getOrReturnCtx(e,t),{code:WR.too_small,minimum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):"max"===r.kind?(r.inclusive?e.data>r.value:e.data>=r.value)&&(WL(t=this._getOrReturnCtx(e,t),{code:WR.too_big,maximum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):"multipleOf"===r.kind?0!==function(e,t){let n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r;return parseInt(e.toFixed(i).replace(".",""))%parseInt(t.toFixed(i).replace(".",""))/Math.pow(10,i)}(e.data,r.value)&&(WL(t=this._getOrReturnCtx(e,t),{code:WR.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):"finite"===r.kind?Number.isFinite(e.data)||(WL(t=this._getOrReturnCtx(e,t),{code:WR.not_finite,message:r.message}),n.dirty()):m.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,y.toString(t))}gt(e,t){return this.setLimit("min",e,!1,y.toString(t))}lte(e,t){return this.setLimit("max",e,!0,y.toString(t))}lt(e,t){return this.setLimit("max",e,!1,y.toString(t))}setLimit(e,t,n,r){return new W3({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:y.toString(r)}]})}_addCheck(e){return new W3({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:y.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:y.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:y.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:y.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:y.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:y.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:y.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:y.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:y.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>"int"===e.kind||"multipleOf"===e.kind&&m.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let n of this._def.checks){if("finite"===n.kind||"int"===n.kind||"multipleOf"===n.kind)return!0;"min"===n.kind?(null===t||n.value>t)&&(t=n.value):"max"===n.kind&&(null===e||n.value<e)&&(e=n.value)}return Number.isFinite(t)&&Number.isFinite(e)}}W3.create=e=>new W3({checks:[],typeName:v.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...WY(e)});class W9 extends WH{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){let t;if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==Wk.bigint){let t=this._getOrReturnCtx(e);return WL(t,{code:WR.invalid_type,expected:Wk.bigint,received:t.parsedType}),WB}let n=new WK;for(let r of this._def.checks)"min"===r.kind?(r.inclusive?e.data<r.value:e.data<=r.value)&&(WL(t=this._getOrReturnCtx(e,t),{code:WR.too_small,type:"bigint",minimum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):"max"===r.kind?(r.inclusive?e.data>r.value:e.data>=r.value)&&(WL(t=this._getOrReturnCtx(e,t),{code:WR.too_big,type:"bigint",maximum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):"multipleOf"===r.kind?e.data%r.value!==BigInt(0)&&(WL(t=this._getOrReturnCtx(e,t),{code:WR.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):m.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,y.toString(t))}gt(e,t){return this.setLimit("min",e,!1,y.toString(t))}lte(e,t){return this.setLimit("max",e,!0,y.toString(t))}lt(e,t){return this.setLimit("max",e,!1,y.toString(t))}setLimit(e,t,n,r){return new W9({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:y.toString(r)}]})}_addCheck(e){return new W9({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:y.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:y.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:y.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:y.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:y.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}W9.create=e=>{var t;return new W9({checks:[],typeName:v.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...WY(e)})};class W4 extends WH{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==Wk.boolean){let t=this._getOrReturnCtx(e);return WL(t,{code:WR.invalid_type,expected:Wk.boolean,received:t.parsedType}),WB}return WW(e.data)}}W4.create=e=>new W4({typeName:v.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...WY(e)});class W8 extends WH{_parse(e){let t;if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==Wk.date){let t=this._getOrReturnCtx(e);return WL(t,{code:WR.invalid_type,expected:Wk.date,received:t.parsedType}),WB}if(isNaN(e.data.getTime()))return WL(this._getOrReturnCtx(e),{code:WR.invalid_date}),WB;let n=new WK;for(let r of this._def.checks)"min"===r.kind?e.data.getTime()<r.value&&(WL(t=this._getOrReturnCtx(e,t),{code:WR.too_small,message:r.message,inclusive:!0,exact:!1,minimum:r.value,type:"date"}),n.dirty()):"max"===r.kind?e.data.getTime()>r.value&&(WL(t=this._getOrReturnCtx(e,t),{code:WR.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:"date"}),n.dirty()):m.assertNever(r);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new W8({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:y.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:y.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}W8.create=e=>new W8({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:v.ZodDate,...WY(e)});class W7 extends WH{_parse(e){if(this._getType(e)!==Wk.symbol){let t=this._getOrReturnCtx(e);return WL(t,{code:WR.invalid_type,expected:Wk.symbol,received:t.parsedType}),WB}return WW(e.data)}}W7.create=e=>new W7({typeName:v.ZodSymbol,...WY(e)});class De extends WH{_parse(e){if(this._getType(e)!==Wk.undefined){let t=this._getOrReturnCtx(e);return WL(t,{code:WR.invalid_type,expected:Wk.undefined,received:t.parsedType}),WB}return WW(e.data)}}De.create=e=>new De({typeName:v.ZodUndefined,...WY(e)});class Dt extends WH{_parse(e){if(this._getType(e)!==Wk.null){let t=this._getOrReturnCtx(e);return WL(t,{code:WR.invalid_type,expected:Wk.null,received:t.parsedType}),WB}return WW(e.data)}}Dt.create=e=>new Dt({typeName:v.ZodNull,...WY(e)});class Dn extends WH{constructor(){super(...arguments),this._any=!0}_parse(e){return WW(e.data)}}Dn.create=e=>new Dn({typeName:v.ZodAny,...WY(e)});class Dr extends WH{constructor(){super(...arguments),this._unknown=!0}_parse(e){return WW(e.data)}}Dr.create=e=>new Dr({typeName:v.ZodUnknown,...WY(e)});class Di extends WH{_parse(e){let t=this._getOrReturnCtx(e);return WL(t,{code:WR.invalid_type,expected:Wk.never,received:t.parsedType}),WB}}Di.create=e=>new Di({typeName:v.ZodNever,...WY(e)});class Do extends WH{_parse(e){if(this._getType(e)!==Wk.undefined){let t=this._getOrReturnCtx(e);return WL(t,{code:WR.invalid_type,expected:Wk.void,received:t.parsedType}),WB}return WW(e.data)}}Do.create=e=>new Do({typeName:v.ZodVoid,...WY(e)});class Da extends WH{_parse(e){let{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==Wk.array)return WL(t,{code:WR.invalid_type,expected:Wk.array,received:t.parsedType}),WB;if(null!==r.exactLength){let e=t.data.length>r.exactLength.value,i=t.data.length<r.exactLength.value;(e||i)&&(WL(t,{code:e?WR.too_big:WR.too_small,minimum:i?r.exactLength.value:void 0,maximum:e?r.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:r.exactLength.message}),n.dirty())}if(null!==r.minLength&&t.data.length<r.minLength.value&&(WL(t,{code:WR.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),n.dirty()),null!==r.maxLength&&t.data.length>r.maxLength.value&&(WL(t,{code:WR.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((e,n)=>r.type._parseAsync(new WV(t,e,t.path,n)))).then(e=>WK.mergeArray(n,e));let i=[...t.data].map((e,n)=>r.type._parseSync(new WV(t,e,t.path,n)));return WK.mergeArray(n,i)}get element(){return this._def.type}min(e,t){return new Da({...this._def,minLength:{value:e,message:y.toString(t)}})}max(e,t){return new Da({...this._def,maxLength:{value:e,message:y.toString(t)}})}length(e,t){return new Da({...this._def,exactLength:{value:e,message:y.toString(t)}})}nonempty(e){return this.min(1,e)}}Da.create=(e,t)=>new Da({type:e,minLength:null,maxLength:null,exactLength:null,typeName:v.ZodArray,...WY(t)});class Du extends WH{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;let e=this._def.shape(),t=m.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==Wk.object){let t=this._getOrReturnCtx(e);return WL(t,{code:WR.invalid_type,expected:Wk.object,received:t.parsedType}),WB}let{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof Di&&"strip"===this._def.unknownKeys))for(let e in n.data)i.includes(e)||o.push(e);let a=[];for(let e of i){let t=r[e],i=n.data[e];a.push({key:{status:"valid",value:e},value:t._parse(new WV(n,i,n.path,e)),alwaysSet:e in n.data})}if(this._def.catchall instanceof Di){let e=this._def.unknownKeys;if("passthrough"===e)for(let e of o)a.push({key:{status:"valid",value:e},value:{status:"valid",value:n.data[e]}});else if("strict"===e)o.length>0&&(WL(n,{code:WR.unrecognized_keys,keys:o}),t.dirty());else if("strip"!==e)throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let e=this._def.catchall;for(let t of o){let r=n.data[t];a.push({key:{status:"valid",value:t},value:e._parse(new WV(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of a){let n=await t.key;e.push({key:n,value:await t.value,alwaysSet:t.alwaysSet})}return e}).then(e=>WK.mergeObjectSync(t,e)):WK.mergeObjectSync(t,a)}get shape(){return this._def.shape()}strict(e){return y.errToObj,new Du({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,n)=>{var r,i,o,a;let u=null!==(o=null===(i=(r=this._def).errorMap)||void 0===i?void 0:i.call(r,t,n).message)&&void 0!==o?o:n.defaultError;return"unrecognized_keys"===t.code?{message:null!==(a=y.errToObj(e).message)&&void 0!==a?a:u}:{message:u}}}:{}})}strip(){return new Du({...this._def,unknownKeys:"strip"})}passthrough(){return new Du({...this._def,unknownKeys:"passthrough"})}extend(e){return new Du({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Du({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:v.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new Du({...this._def,catchall:e})}pick(e){let t={};return m.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(t[n]=this.shape[n])}),new Du({...this._def,shape:()=>t})}omit(e){let t={};return m.objectKeys(this.shape).forEach(n=>{e[n]||(t[n]=this.shape[n])}),new Du({...this._def,shape:()=>t})}deepPartial(){return function e(t){if(!(t instanceof Du))return t instanceof Da?new Da({...t._def,type:e(t.element)}):t instanceof Dw?Dw.create(e(t.unwrap())):t instanceof DI?DI.create(e(t.unwrap())):t instanceof Df?Df.create(t.items.map(t=>e(t))):t;{let n={};for(let r in t.shape){let i=t.shape[r];n[r]=Dw.create(e(i))}return new Du({...t._def,shape:()=>n})}}(this)}partial(e){let t={};return m.objectKeys(this.shape).forEach(n=>{let r=this.shape[n];e&&!e[n]?t[n]=r:t[n]=r.optional()}),new Du({...this._def,shape:()=>t})}required(e){let t={};return m.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])t[n]=this.shape[n];else{let e=this.shape[n];for(;e instanceof Dw;)e=e._def.innerType;t[n]=e}}),new Du({...this._def,shape:()=>t})}keyof(){return Dv(m.objectKeys(this.shape))}}Du.create=(e,t)=>new Du({shape:()=>e,unknownKeys:"strip",catchall:Di.create(),typeName:v.ZodObject,...WY(t)}),Du.strictCreate=(e,t)=>new Du({shape:()=>e,unknownKeys:"strict",catchall:Di.create(),typeName:v.ZodObject,...WY(t)}),Du.lazycreate=(e,t)=>new Du({shape:e,unknownKeys:"strip",catchall:Di.create(),typeName:v.ZodObject,...WY(t)});class Ds extends WH{_parse(e){let{ctx:t}=this._processInputParams(e),n=this._def.options;if(t.common.async)return Promise.all(n.map(async e=>{let n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}})).then(function(e){for(let t of e)if("valid"===t.result.status)return t.result;for(let n of e)if("dirty"===n.result.status)return t.common.issues.push(...n.ctx.common.issues),n.result;let n=e.map(e=>new WE(e.ctx.common.issues));return WL(t,{code:WR.invalid_union,unionErrors:n}),WB});{let e;let r=[];for(let i of n){let n={...t,common:{...t.common,issues:[]},parent:null},o=i._parseSync({data:t.data,path:t.path,parent:n});if("valid"===o.status)return o;"dirty"!==o.status||e||(e={result:o,ctx:n}),n.common.issues.length&&r.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let i=r.map(e=>new WE(e));return WL(t,{code:WR.invalid_union,unionErrors:i}),WB}}get options(){return this._def.options}}Ds.create=(e,t)=>new Ds({options:e,typeName:v.ZodUnion,...WY(t)});let Dl=e=>e instanceof Dg?Dl(e.schema):e instanceof DS?Dl(e.innerType()):e instanceof Dy?[e.value]:e instanceof Dx?e.options:e instanceof Db?Object.keys(e.enum):e instanceof D_?Dl(e._def.innerType):e instanceof De?[void 0]:e instanceof Dt?[null]:null;class Dc extends WH{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==Wk.object)return WL(t,{code:WR.invalid_type,expected:Wk.object,received:t.parsedType}),WB;let n=this.discriminator,r=t.data[n],i=this.optionsMap.get(r);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(WL(t,{code:WR.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),WB)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,n){let r=new Map;for(let n of t){let t=Dl(n.shape[e]);if(!t)throw Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let i of t){if(r.has(i))throw Error(`Discriminator property ${String(e)} has duplicate value ${String(i)}`);r.set(i,n)}}return new Dc({typeName:v.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:r,...WY(n)})}}class Dd extends WH{_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=(e,r)=>{if(WD(e)||WD(r))return WB;let i=function e(t,n){let r=WO(t),i=WO(n);if(t===n)return{valid:!0,data:t};if(r===Wk.object&&i===Wk.object){let r=m.objectKeys(n),i=m.objectKeys(t).filter(e=>-1!==r.indexOf(e)),o={...t,...n};for(let r of i){let i=e(t[r],n[r]);if(!i.valid)return{valid:!1};o[r]=i.data}return{valid:!0,data:o}}if(r!==Wk.array||i!==Wk.array)return r===Wk.date&&i===Wk.date&&+t==+n?{valid:!0,data:t}:{valid:!1};{if(t.length!==n.length)return{valid:!1};let r=[];for(let i=0;i<t.length;i++){let o=e(t[i],n[i]);if(!o.valid)return{valid:!1};r.push(o.data)}return{valid:!0,data:r}}}(e.value,r.value);return i.valid?((WN(e)||WN(r))&&t.dirty(),{status:t.value,value:i.data}):(WL(n,{code:WR.invalid_intersection_types}),WB)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([e,t])=>r(e,t)):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}Dd.create=(e,t,n)=>new Dd({left:e,right:t,typeName:v.ZodIntersection,...WY(n)});class Df extends WH{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==Wk.array)return WL(n,{code:WR.invalid_type,expected:Wk.array,received:n.parsedType}),WB;if(n.data.length<this._def.items.length)return WL(n,{code:WR.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),WB;!this._def.rest&&n.data.length>this._def.items.length&&(WL(n,{code:WR.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());let r=[...n.data].map((e,t)=>{let r=this._def.items[t]||this._def.rest;return r?r._parse(new WV(n,e,n.path,t)):null}).filter(e=>!!e);return n.common.async?Promise.all(r).then(e=>WK.mergeArray(t,e)):WK.mergeArray(t,r)}get items(){return this._def.items}rest(e){return new Df({...this._def,rest:e})}}Df.create=(e,t)=>{if(!Array.isArray(e))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new Df({items:e,typeName:v.ZodTuple,rest:null,...WY(t)})};class Dp extends WH{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==Wk.object)return WL(n,{code:WR.invalid_type,expected:Wk.object,received:n.parsedType}),WB;let r=[],i=this._def.keyType,o=this._def.valueType;for(let e in n.data)r.push({key:i._parse(new WV(n,e,n.path,e)),value:o._parse(new WV(n,n.data[e],n.path,e))});return n.common.async?WK.mergeObjectAsync(t,r):WK.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(e,t,n){return new Dp(t instanceof WH?{keyType:e,valueType:t,typeName:v.ZodRecord,...WY(n)}:{keyType:W5.create(),valueType:e,typeName:v.ZodRecord,...WY(t)})}}class DA extends WH{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==Wk.map)return WL(n,{code:WR.invalid_type,expected:Wk.map,received:n.parsedType}),WB;let r=this._def.keyType,i=this._def.valueType,o=[...n.data.entries()].map(([e,t],o)=>({key:r._parse(new WV(n,e,n.path,[o,"key"])),value:i._parse(new WV(n,t,n.path,[o,"value"]))}));if(n.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let n of o){let r=await n.key,i=await n.value;if("aborted"===r.status||"aborted"===i.status)return WB;("dirty"===r.status||"dirty"===i.status)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}})}{let e=new Map;for(let n of o){let r=n.key,i=n.value;if("aborted"===r.status||"aborted"===i.status)return WB;("dirty"===r.status||"dirty"===i.status)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}}}}DA.create=(e,t,n)=>new DA({valueType:t,keyType:e,typeName:v.ZodMap,...WY(n)});class Dh extends WH{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==Wk.set)return WL(n,{code:WR.invalid_type,expected:Wk.set,received:n.parsedType}),WB;let r=this._def;null!==r.minSize&&n.data.size<r.minSize.value&&(WL(n,{code:WR.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),t.dirty()),null!==r.maxSize&&n.data.size>r.maxSize.value&&(WL(n,{code:WR.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());let i=this._def.valueType;function o(e){let n=new Set;for(let r of e){if("aborted"===r.status)return WB;"dirty"===r.status&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}let a=[...n.data.values()].map((e,t)=>i._parse(new WV(n,e,n.path,t)));return n.common.async?Promise.all(a).then(e=>o(e)):o(a)}min(e,t){return new Dh({...this._def,minSize:{value:e,message:y.toString(t)}})}max(e,t){return new Dh({...this._def,maxSize:{value:e,message:y.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}Dh.create=(e,t)=>new Dh({valueType:e,minSize:null,maxSize:null,typeName:v.ZodSet,...WY(t)});class Dm extends WH{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==Wk.function)return WL(t,{code:WR.invalid_type,expected:Wk.function,received:t.parsedType}),WB;function n(e,n){return WU({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,WM(),Wj].filter(e=>!!e),issueData:{code:WR.invalid_arguments,argumentsError:n}})}function r(e,n){return WU({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,WM(),Wj].filter(e=>!!e),issueData:{code:WR.invalid_return_type,returnTypeError:n}})}let i={errorMap:t.common.contextualErrorMap},o=t.data;return this._def.returns instanceof DC?WW(async(...e)=>{let t=new WE([]),a=await this._def.args.parseAsync(e,i).catch(r=>{throw t.addIssue(n(e,r)),t}),u=await o(...a);return await this._def.returns._def.type.parseAsync(u,i).catch(e=>{throw t.addIssue(r(u,e)),t})}):WW((...e)=>{let t=this._def.args.safeParse(e,i);if(!t.success)throw new WE([n(e,t.error)]);let a=o(...t.data),u=this._def.returns.safeParse(a,i);if(!u.success)throw new WE([r(a,u.error)]);return u.data})}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Dm({...this._def,args:Df.create(e).rest(Dr.create())})}returns(e){return new Dm({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,n){return new Dm({args:e||Df.create([]).rest(Dr.create()),returns:t||Dr.create(),typeName:v.ZodFunction,...WY(n)})}}class Dg extends WH{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}Dg.create=(e,t)=>new Dg({getter:e,typeName:v.ZodLazy,...WY(t)});class Dy extends WH{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return WL(t,{received:t.data,code:WR.invalid_literal,expected:this._def.value}),WB}return{status:"valid",value:e.data}}get value(){return this._def.value}}function Dv(e,t){return new Dx({values:e,typeName:v.ZodEnum,...WY(t)})}Dy.create=(e,t)=>new Dy({value:e,typeName:v.ZodLiteral,...WY(t)});class Dx extends WH{_parse(e){if("string"!=typeof e.data){let t=this._getOrReturnCtx(e),n=this._def.values;return WL(t,{expected:m.joinValues(n),received:t.parsedType,code:WR.invalid_type}),WB}if(-1===this._def.values.indexOf(e.data)){let t=this._getOrReturnCtx(e),n=this._def.values;return WL(t,{received:t.data,code:WR.invalid_enum_value,options:n}),WB}return WW(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(e){return Dx.create(e)}exclude(e){return Dx.create(this.options.filter(t=>!e.includes(t)))}}Dx.create=Dv;class Db extends WH{_parse(e){let t=m.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==Wk.string&&n.parsedType!==Wk.number){let e=m.objectValues(t);return WL(n,{expected:m.joinValues(e),received:n.parsedType,code:WR.invalid_type}),WB}if(-1===t.indexOf(e.data)){let e=m.objectValues(t);return WL(n,{received:n.data,code:WR.invalid_enum_value,options:e}),WB}return WW(e.data)}get enum(){return this._def.values}}Db.create=(e,t)=>new Db({values:e,typeName:v.ZodNativeEnum,...WY(t)});class DC extends WH{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==Wk.promise&&!1===t.common.async?(WL(t,{code:WR.invalid_type,expected:Wk.promise,received:t.parsedType}),WB):WW((t.parsedType===Wk.promise?t.data:Promise.resolve(t.data)).then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}}DC.create=(e,t)=>new DC({type:e,typeName:v.ZodPromise,...WY(t)});class DS extends WH{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===v.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=this._def.effect||null;if("preprocess"===r.type){let e=r.transform(n.data);return n.common.async?Promise.resolve(e).then(e=>this._def.schema._parseAsync({data:e,path:n.path,parent:n})):this._def.schema._parseSync({data:e,path:n.path,parent:n})}let i={addIssue:e=>{WL(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),"refinement"===r.type){let e=e=>{let t=r.refinement(e,i);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1!==n.common.async)return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(n=>"aborted"===n.status?WB:("dirty"===n.status&&t.dirty(),e(n.value).then(()=>({status:t.value,value:n.value}))));{let r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===r.status?WB:("dirty"===r.status&&t.dirty(),e(r.value),{status:t.value,value:r.value})}}if("transform"===r.type){if(!1!==n.common.async)return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(e=>Wq(e)?Promise.resolve(r.transform(e.value,i)).then(e=>({status:t.value,value:e})):e);{let e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Wq(e))return e;let o=r.transform(e.value,i);if(o instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}}m.assertNever(r)}}DS.create=(e,t,n)=>new DS({schema:e,typeName:v.ZodEffects,effect:t,...WY(n)}),DS.createWithPreprocess=(e,t,n)=>new DS({schema:t,effect:{type:"preprocess",transform:e},typeName:v.ZodEffects,...WY(n)});class Dw extends WH{_parse(e){return this._getType(e)===Wk.undefined?WW(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Dw.create=(e,t)=>new Dw({innerType:e,typeName:v.ZodOptional,...WY(t)});class DI extends WH{_parse(e){return this._getType(e)===Wk.null?WW(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}DI.create=(e,t)=>new DI({innerType:e,typeName:v.ZodNullable,...WY(t)});class D_ extends WH{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return t.parsedType===Wk.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}D_.create=(e,t)=>new D_({innerType:e,typeName:v.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...WY(t)});class DT extends WH{_parse(e){let{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return WQ(r)?r.then(e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new WE(n.common.issues)},input:n.data})})):{status:"valid",value:"valid"===r.status?r.value:this._def.catchValue({get error(){return new WE(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}DT.create=(e,t)=>new DT({innerType:e,typeName:v.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...WY(t)});class Dk extends WH{_parse(e){if(this._getType(e)!==Wk.nan){let t=this._getOrReturnCtx(e);return WL(t,{code:WR.invalid_type,expected:Wk.nan,received:t.parsedType}),WB}return{status:"valid",value:e.data}}}Dk.create=e=>new Dk({typeName:v.ZodNaN,...WY(e)});let DO=Symbol("zod_brand");class DR extends WH{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}}class DE extends WH{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?WB:"dirty"===e.status?(t.dirty(),WP(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})();{let e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?WB:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(e,t){return new DE({in:e,out:t,typeName:v.ZodPipeline})}}let Dj=(e,t={},n)=>e?Dn.create().superRefine((r,i)=>{var o,a;if(!e(r)){let e="function"==typeof t?t(r):"string"==typeof t?{message:t}:t,u=null===(a=null!==(o=e.fatal)&&void 0!==o?o:n)||void 0===a||a;i.addIssue({code:"custom",..."string"==typeof e?{message:e}:e,fatal:u})}}):Dn.create(),DF={object:Du.lazycreate};(l=v||(v={})).ZodString="ZodString",l.ZodNumber="ZodNumber",l.ZodNaN="ZodNaN",l.ZodBigInt="ZodBigInt",l.ZodBoolean="ZodBoolean",l.ZodDate="ZodDate",l.ZodSymbol="ZodSymbol",l.ZodUndefined="ZodUndefined",l.ZodNull="ZodNull",l.ZodAny="ZodAny",l.ZodUnknown="ZodUnknown",l.ZodNever="ZodNever",l.ZodVoid="ZodVoid",l.ZodArray="ZodArray",l.ZodObject="ZodObject",l.ZodUnion="ZodUnion",l.ZodDiscriminatedUnion="ZodDiscriminatedUnion",l.ZodIntersection="ZodIntersection",l.ZodTuple="ZodTuple",l.ZodRecord="ZodRecord",l.ZodMap="ZodMap",l.ZodSet="ZodSet",l.ZodFunction="ZodFunction",l.ZodLazy="ZodLazy",l.ZodLiteral="ZodLiteral",l.ZodEnum="ZodEnum",l.ZodEffects="ZodEffects",l.ZodNativeEnum="ZodNativeEnum",l.ZodOptional="ZodOptional",l.ZodNullable="ZodNullable",l.ZodDefault="ZodDefault",l.ZodCatch="ZodCatch",l.ZodPromise="ZodPromise",l.ZodBranded="ZodBranded",l.ZodPipeline="ZodPipeline";let DM=W5.create,DU=W3.create,DL=Dk.create,DK=W9.create,DB=W4.create,DP=W8.create,DW=W7.create,DD=De.create,DN=Dt.create,Dq=Dn.create,DQ=Dr.create,DV=Di.create,Dz=Do.create,DY=Da.create,DH=Du.create,DG=Du.strictCreate,DZ=Ds.create,DJ=Dc.create,D$=Dd.create,DX=Df.create,D0=Dp.create,D1=DA.create,D2=Dh.create,D6=Dm.create,D5=Dg.create,D3=Dy.create,D9=Dx.create,D4=Db.create,D8=DC.create,D7=DS.create,Ne=Dw.create,Nt=DI.create,Nn=DS.createWithPreprocess,Nr=DE.create;var Ni=Object.freeze({__proto__:null,defaultErrorMap:Wj,setErrorMap:function(e){WF=e},getErrorMap:WM,makeIssue:WU,EMPTY_PATH:[],addIssueToContext:WL,ParseStatus:WK,INVALID:WB,DIRTY:WP,OK:WW,isAborted:WD,isDirty:WN,isValid:Wq,isAsync:WQ,get util(){return m},get objectUtil(){return g},ZodParsedType:Wk,getParsedType:WO,ZodType:WH,ZodString:W5,ZodNumber:W3,ZodBigInt:W9,ZodBoolean:W4,ZodDate:W8,ZodSymbol:W7,ZodUndefined:De,ZodNull:Dt,ZodAny:Dn,ZodUnknown:Dr,ZodNever:Di,ZodVoid:Do,ZodArray:Da,ZodObject:Du,ZodUnion:Ds,ZodDiscriminatedUnion:Dc,ZodIntersection:Dd,ZodTuple:Df,ZodRecord:Dp,ZodMap:DA,ZodSet:Dh,ZodFunction:Dm,ZodLazy:Dg,ZodLiteral:Dy,ZodEnum:Dx,ZodNativeEnum:Db,ZodPromise:DC,ZodEffects:DS,ZodTransformer:DS,ZodOptional:Dw,ZodNullable:DI,ZodDefault:D_,ZodCatch:DT,ZodNaN:Dk,BRAND:DO,ZodBranded:DR,ZodPipeline:DE,custom:Dj,Schema:WH,ZodSchema:WH,late:DF,get ZodFirstPartyTypeKind(){return v},coerce:{string:e=>W5.create({...e,coerce:!0}),number:e=>W3.create({...e,coerce:!0}),boolean:e=>W4.create({...e,coerce:!0}),bigint:e=>W9.create({...e,coerce:!0}),date:e=>W8.create({...e,coerce:!0})},any:Dq,array:DY,bigint:DK,boolean:DB,date:DP,discriminatedUnion:DJ,effect:D7,enum:D9,function:D6,instanceof:(e,t={message:`Input not instance of ${e.name}`})=>Dj(t=>t instanceof e,t),intersection:D$,lazy:D5,literal:D3,map:D1,nan:DL,nativeEnum:D4,never:DV,null:DN,nullable:Nt,number:DU,object:DH,oboolean:()=>DB().optional(),onumber:()=>DU().optional(),optional:Ne,ostring:()=>DM().optional(),pipeline:Nr,preprocess:Nn,promise:D8,record:D0,set:D2,strictObject:DG,string:DM,symbol:DW,transformer:D7,tuple:DX,undefined:DD,union:DZ,unknown:DQ,void:Dz,NEVER:WB,ZodIssueCode:WR,quotelessJson:e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),ZodError:WE});let No=Ni.object({id:Ni.string(),label:Ni.string(),repeatable:Ni.boolean(),status:Ni.boolean()}),Na=Ni.array(No);function Nu(e,t,n){return(0,j.WY)(new URL("customtypes",e),{headers:{repository:t},credentials:(0,j.xb)(n),okType:Na})}let Ns=Ni.object({first_name:Ni.string().optional(),last_name:Ni.string().optional(),email:Ni.string().optional(),uploadedAvatar:Ni.string().optional()}),Nl=Ni.object({id:Ni.string(),name:Ni.string(),is_master:Ni.boolean().optional()}),Nc=Ni.discriminatedUnion("status",[Ni.object({status:Ni.literal("unclassified")}),Ni.object({status:Ni.literal("published")}),Ni.object({status:Ni.literal("release"),release_id:Ni.string()}),Ni.object({status:Ni.literal("archived")})]).and(Ni.object({version_id:Ni.string(),tags:Ni.array(Ni.string()),custom_type_label:Ni.string(),preview_summary:Ni.string().optional(),preview_image:Ni.string().optional(),last_modified_date:Ni.coerce.date(),author:Ns,uid:Ni.string().optional()})),Nd=Ni.object({id:Ni.string(),title:Ni.string().nullish().transform(e=>e??"Untitled"),custom_type_id:Ni.string(),group_lang_id:Ni.string(),language:Nl,versions:Ni.array(Nc)}),Nf=Ni.object({total:Ni.number(),cursor:Ni.string().optional(),results:Ni.array(Nd)}),Np=Ni.object({id:Ni.string(),title:Ni.string(),repository_id:Ni.string(),tags:Ni.array(Ni.string()).optional()}).passthrough(),NA=Ni.object({results:Ni.array(Np)});function Nh(e){return e.reduce((e,t)=>{if(t.values.every(e=>""===e||void 0===e))return e;let n=t.values.map(e=>[t.name,e??""]);return e.concat(n)},[])}function Nm(e,t,n){return(0,j.WY)(new URL(`documents/${n}`,e),{credentials:(0,j.xb)(t),okType:Nd})}async function Ng(e,t,n){if(0===n.length)return[];let r=n.slice(0,50).map(({id:e})=>e),i=await function(e){let{baseUrl:t,authStrategy:n,limit:r,cursor:i,status:o,authors:a,language:u,group_lang_id:s,document_id:l,customTypes:c,tags:d,term:f,signal:p}=e,A=new URL("documents",t),h=[];return r&&h.push({name:"limit",values:[r.toString()]}),i&&h.push({name:"cursor",values:[i]}),null!=o&&o.length&&h.push({name:"status",values:o}),null!=a&&a.length&&h.push({name:"authors",values:a}),u&&h.push({name:"language",values:[u]}),s&&h.push({name:"group_lang_id",values:[s]}),null!=l&&l.length&&h.push({name:"document_id",values:l}),null!=c&&c.length&&h.push({name:"customTypes",values:c}),null!=d&&d.length&&h.push({name:"tags",values:d}),f&&h.push({name:"term",values:[f]}),A.search=new URLSearchParams(Nh(h)).toString(),(0,j.WY)(A,{credentials:(0,j.xb)(n),okType:Nf,signal:p})}({baseUrl:e,authStrategy:t,document_id:r}),o=new Map(r.map((e,t)=>[e,t]));return i.results.sort((e,t)=>(o.get(e.id)??1/0)-(o.get(t.id)??1/0))}Ni.custom().transform((e,t)=>{let n=z.Document.decode(e);return"Left"===n._tag?(t.addIssue({code:Ni.ZodIssueCode.custom,message:"Invalid document."}),Ni.NEVER):n.right}),Ni.unknown().transform((e,t)=>{let n=z.SliceItemContent.decode(e);return"Right"===n._tag?n.right:(t.addIssue({code:Ni.ZodIssueCode.custom,message:"Invalid slice content."}),Ni.NEVER)});let Ny=Ni.object({id:Ni.string(),firstname:Ni.string().optional(),lastname:Ni.string().optional(),email:Ni.string(),uploadedAvatar:Ni.string().optional()}),Nv=Ni.array(Ny),Nx=Ni.object({slicemachineEnabled:Ni.boolean()}),Nb=["next","nuxt","sveltekit"],NC=Ni.preprocess(e=>"string"==typeof e&&Nb.includes(e)?e:"other",Ni.enum([...Nb,"other"])),NS=Ni.object({simulator_url:Ni.string().url().nullish(),languages:Ni.array(Nl).transform(e=>(0,E.DY)(e,e=>e.name)),authors:Nv.optional().default([]),quotas:Nx.optional().default({slicemachineEnabled:!1}),framework:NC.optional().default("other"),starterId:Ni.string().optional(),storageVersion:Ni.object({major:Ni.number().int(),minor:Ni.number().int()})}).transform(({simulator_url:e,framework:t,...n})=>{let r=e&&function(e){let t=(0,w.ju)(e);return!!t&&t.pathname.endsWith("/slice-simulator")}(e)?e:void 0;return{...n,framework:t,simulatorUrl:r,isSupportedFramework:"other"!==t}});function Nw(e,t){return(0,j.WY)(new URL("repository",e),{credentials:(0,j.xb)(t),okType:NS})}let NI=Ni.object({results:Ni.array(Ni.string())});function N_(e,t){return(0,j.WY)(new URL("repository/tags",e),{credentials:(0,j.xb)(t),okType:NI})}let NT=Ni.enum(["Owner","Administrator","Writer","Manager","Readonly"]),Nk=Ni.record(NT.optional()),NO=NT.or(Nk),NR=Ni.object({shortId:Ni.string(),intercomHash:Ni.string(),email:Ni.string(),firstName:Ni.string(),lastName:Ni.string(),superPower:Ni.boolean(),repositories:Ni.array(Ni.object({domain:Ni.string(),role:NO}))});function NE(e,t){let n=new URL("profile",e);return(0,j.WY)(n,{credentials:(0,j.xb)(t),okType:NR})}function Nj(){let e=WI();e.userServiceBaseUrl||WT("userServiceBaseUrl");let{authStrategy:t,userServiceBaseUrl:n}=e;return(0,R.QT)(NE,[n,t])}function NF(){let e=WI();e.mediaLibrary||WT("mediaLibrary");let{assetsApiBaseUrl:t,authStrategy:n,repository:r}=e,{items:i}=(0,R.QT)(NM,[t,r,n]);return{tags:i}}function NM(e,t,n){return(0,j.WY)(new URL("tags",e),{credentials:(0,j.xb)(n),okType:NK,headers:{repository:t}})}let NU=Ni.string().min(1).max(20),NL=Ni.object({id:Ni.string(),name:NU,uploader_id:Ni.string().optional(),created_at:Ni.number(),last_modified:Ni.number(),count:Ni.number().optional().default(0)}),NK=Ni.object({items:Ni.array(NL)});function NB(e){(0,R.YC)(NM,t=>{let{items:n}=t,r=e(n);if(r)return{items:r}})}let NP=Ni.array(Ni.string()).optional().transform(e=>null==e?void 0:e[0]),NW=Ni.object({id:Ni.string(),kind:Ni.string(),extension:Ni.string().optional(),filename:Ni.string(),width:Ni.number().optional(),height:Ni.number().optional(),last_modified:Ni.number(),url:Ni.string(),alt:Ni.string().optional(),uploader_id:Ni.string().optional(),size:Ni.number(),notes:Ni.string().optional(),credits:Ni.string().optional(),search_highlight:Ni.object({filename:NP,alt:NP,notes:NP,credits:NP}).optional(),tags:Ni.array(NL)}),ND={"X-Prismic-Source":"Wroom"},NN=Ni.object({total:Ni.number(),cursor:Ni.string().optional(),items:Ni.array(NW)});function Nq(e,t,n,r,i,o,a,u,s){let l=e?new URL("assets",e):void 0,c=new URLSearchParams(Nh([{name:"limit",values:["30"]},{name:"cursor",values:[s]},{name:"keyword",values:[r]},{name:"assetType",values:[i]},{name:"uploaderId",values:[o]},{name:"tags",values:a.split(",")}])).toString(),d=NN.transform(e=>({...e,keyword:r,assetType:i,uploaderId:o,tags:a,page:u})),f=performance.now();return(0,j.WY)(`${(null==l?void 0:l.href)??""}?${c}`,{headers:{repository:t,...ND},credentials:(0,j.xb)(n),okType:d}).then(e=>({...e,time:(performance.now()-f).toFixed(0)}))}R.Fs.registerFetcherConfig(Nq,{revalidationStrategy:{type:"never"}});let NQ={keyword:"",assetType:"all",uploaderId:void 0,tagIds:[]};function NV(e){NG(t=>t.flatMap(t=>{let n=e.find(e=>e.id===t.id);return n?void 0===n.response?[]:{...t,...n.response}:t}))}function Nz(e){NG(t=>t.filter(t=>!e.includes(t.id)))}function NY(e){let{keyword:t,assetType:n,uploaderId:r,tagIds:i}=e,o=null==i?void 0:i.join(",");(0,R.YC)(Nq,e=>{if(!(e.keyword===t&&e.assetType===n&&e.uploaderId===r&&e.tags===o))return e})}function NH(e,t,n,r,i){let o=e.filter(e=>e.keyword===t&&e.assetType===n&&e.uploaderId===r&&e.tags===i),a=(0,E.DY)(o,e=>e.page).flatMap(e=>e.items);return t?(0,E.mN)(a,e=>e.id):a}function NG(e){(0,R.YC)(Nq,t=>{let{items:n,total:r}=t,i=e(n,t);if(i)return{...t,total:r+(i.length-n.length),items:i}})}function NZ(e){let{config:t,keyword:n=NQ.keyword,assetType:r=NQ.assetType,tagIds:i=NQ.tagIds}=e;if(!t.mediaLibrary)throw Error("media library is not configured");let{assetsApiBaseUrl:o,authStrategy:a,repository:u}=t;(0,R.gw)(Nq,N$({assetsApiBaseUrl:o,repository:u,authStrategy:a,keyword:n,assetType:r,tagIds:i,page:0}))}function NJ(e){let{config:t,keyword:n=NQ.keyword,assetType:r=NQ.assetType,tagIds:i=NQ.tagIds}=e;if(!t.mediaLibrary)throw Error("media library is not configured");(0,R.YC)(Nq,e=>0===e.page?e:void 0),NZ({config:t,keyword:n,assetType:r,tagIds:i})}function N$(e){return[e.assetsApiBaseUrl,e.repository,e.authStrategy,e.keyword,e.assetType,e.uploaderId,e.tagIds.join(","),e.page,e.cursor]}function NX(){let e=WI();e.mediaLibrary||WT("mediaLibrary");let{assetsApiBaseUrl:t,coreApiBaseUrl:n,authStrategy:r,repository:i}=e,{authors:o}=(0,R.QT)(Nw,[n,r]),{items:a}=(0,R.QT)(N0,[t,i,r]),{shortId:u}=Nj(),s=new Map(o.map(e=>[e.id,e])),l=[];for(let e of a){let t;if("ghost"===e.id){l.push({id:e.id,name:"Ghost",uploadedAvatar:"https://images.prismic.io/page-builder-assets/ZuAXWBoQrfVKl5sD_ghost_user.png?auto=format,compress&w=64"});continue}let n=s.get(e.id);if(n){if(n.uploadedAvatar){let e=new URL(n.uploadedAvatar);e.searchParams.set("w","64"),t=e.toString()}l.push({id:e.id,name:[n.firstname,n.lastname].filter(Boolean).join(" "),firstName:n.firstname,lastName:n.lastname,email:n.email,uploadedAvatar:t})}}let c=new Map(l.map(e=>[e.id,e]));return{uploaders:(0,E.DY)(l,e=>e.id===u?0:1,e=>e.name),uploadersById:c}}function N0(e,t,n){return(0,j.WY)(new URL("uploaders",e),{credentials:(0,j.xb)(n),okType:N2,headers:{repository:t}})}let N1=Ni.object({id:Ni.string()}),N2=Ni.object({items:Ni.array(N1)});function N6(){let e=WI();e.mediaLibrary||WT("mediaLibrary");let{assetsApiBaseUrl:t,authStrategy:n,repository:r}=e;return()=>{(0,R.gw)(N0,[t,r,n])}}let N5=(0,C.createContext)(void 0);function N3(e){let{children:t,assetType:n=NQ.assetType,onSelectedChange:r,actionContainerRef:i}=e,[o,a]=(0,C.useTransition)(),[u,s]=(0,C.useTransition)(),l=WI(),{showAlert:c}=(0,S.VY)(),d=Nj(),f=N6(),{keyword:p,assetType:A,uploaderId:h,tagIds:m,setFilters:g,resetFilters:y,media:v,fetchNextPage:x,hasNextPage:b,updateMedia:w,unshiftMedia:I,deleteMedia:_,mediaTotal:T,deleteSearchData:k,revalidateFirstPage:E}=function(e){let{initialAssetType:t=NQ.assetType,mode:n}=e,r=WI(),[i,o]=(0,C.useState)({...NQ,assetType:t,page:0});r.mediaLibrary||WT("mediaLibrary");let{assetsApiBaseUrl:a,authStrategy:u,repository:s}=r,{page:l,cursor:c,keyword:d,assetType:f,uploaderId:p,tagIds:A}=i,h=(0,R.QT)(Nq,N$({assetsApiBaseUrl:a,authStrategy:u,repository:s,keyword:d,assetType:f,uploaderId:p,tagIds:A,page:l,cursor:c}));!function(e){let{assetType:t,keyword:n,mode:r,tagIds:i}=e,o=WI();o.mediaLibrary||WT("mediaLibrary");let{onAnalyticsEvent:a}=o,u=(0,R.q_)(Nq),s=u[u.length-1],l=(0,C.useRef)(s);l.current=s,(0,C.useEffect)(()=>{if(!a||!n||!l.current||l.current.keyword!==n)return;let e=String(n.split(" ").length),o=String(l.current.total),u=i.join(",");a("Media Library Search",{searchQuery:n,numberOfWords:e,numberOfResults:o,timeToGetResults:l.current.time,assetType:t,mode:r,tags:u})},[n,t,r,a,i])}({assetType:f,keyword:d,tagIds:A,mode:n});let m=NH((0,R.q_)(Nq),d,f,p,A.join(",")),g=h.total!==m.length;return{keyword:d,assetType:f,uploaderId:p,tagIds:A,setFilters:function(e){o(t=>({...t,...e,page:0,cursor:void 0}))},resetFilters:function(){o(e=>({...e,...NQ,assetType:"all"===t?NQ.assetType:e.assetType,page:0,cursor:void 0}))},media:m,mediaTotal:h.total,limit:30,hasNextPage:g,fetchNextPage:function(){void 0!==h.cursor&&o(e=>({...e,page:e.page+1,cursor:h.cursor}))},updateMedia:NV,unshiftMedia:function(e){o(e=>({...e,page:0,cursor:void 0})),NG((t,n)=>{if(0===n.page)return[...e,...t]})},deleteMedia:Nz,deleteSearchData:NY,revalidateFirstPage:NZ}}({initialAssetType:n,mode:r?"select":"browse"}),[F,M]=(0,C.useState)(),{isMediaRevalidationInProgress:U,isMediaCacheInvalid:L,revalidateMedia:K,revalidateWithParams:B}=function(e){let{revalidate:t,config:n,keyword:r,assetType:i,uploaderId:o,tagIds:a}=e,{assetsApiBaseUrl:u,repository:s="",authStrategy:l="token"}=n.mediaLibrary?n:{},[c,d]=(0,C.useState)(!1),[f,p]=(0,C.useState)(!1),A={assetsApiBaseUrl:u,repository:s,authStrategy:l,keyword:r,assetType:i,uploaderId:o,tagIds:a,page:0},{revalidateData:h}=(0,R.NN)({fetcher:Nq,requestParams:N$(A),validator:(e,t)=>{var n,r;return((null==(n=e.items[0])?void 0:n.id)??"")!==((null==(r=t.items[0])?void 0:r.id)??"")||e.total!==(null==t?void 0:t.total)},onCacheInvalidated:()=>p(!0),every:6e4});return(0,C.useEffect)(()=>{c&&(p(!1),d(!1))},[c]),{isMediaRevalidationInProgress:c,isMediaCacheInvalid:f,revalidateMedia:function(){d(!0),t()},revalidateWithParams:e=>{h(N$({...A,...e}))}}}({config:l,revalidate:function(){NJ({config:l,keyword:p,assetType:A,uploaderId:h,tagIds:m})},keyword:p,assetType:A,uploaderId:h,tagIds:m}),{isUploading:P,onFilesSelected:W,uploadingFiles:D,onRetry:N}=function(e){let{onBeforeUpload:t,onComplete:n}=e,[r,i]=(0,C.useState)([]),o=r.some(e=>"idle"===e.status||"uploading"===e.status),a=WI(),u=(0,C.useCallback)(e=>{let n=[{...e,status:"idle"},...r.filter(t=>t.id!==e.id)];i(n),t(n)},[t,r]);return(0,C.useEffect)(function(){if(!r.length||r.some(e=>"uploading"===e.status)||r.every(e=>"error"===e.status))return;let e=r.find(e=>"idle"===e.status);if(!e)return;let t=r;function o(e){i(t=e(t)),t.every(e=>"success"===e.status||"error"===e.status)&&setTimeout(()=>{i([]),null==n||n(t)},1500)}o(t=>t.map(t=>t.id===e.id?{...t,status:"uploading"}:t)),(function(e){let{file:t,config:n}=e;if(!n.mediaLibrary)throw Error("Media Library not configured.");let{assetsApiBaseUrl:r,repository:i,authStrategy:o}=n,a=new FormData;return a.append(t.name,t),(0,j.WY)(new URL("assets",r),{headers:{repository:i,"Content-Type":"multipart/form-data",...ND},method:"POST",body:a,credentials:(0,j.xb)(o),okType:NW})})({file:e.file,config:a}).then(t=>{o(n=>n.map(n=>n.id===e.id?{...n,status:"success",response:t}:n))}).catch(()=>{o(t=>t.map(t=>t.id===e.id?{...t,status:"error"}:t))})},[a,r,n]),{isUploading:o,uploadingFiles:r,onFilesSelected:function(e){let n=e.map(e=>({id:`temp-${crypto.randomUUID()}`,file:e,status:"idle"}));i(n),t(n)},onRetry:u}}({onBeforeUpload:e=>{y();let t=e.filter(e=>"idle"===e.status).map(e=>({id:e.id,url:URL.createObjectURL(e.file),filename:e.file.name,size:e.file.size,extension:e.file.type,kind:e.file.type,last_modified:e.file.lastModified,tags:[],uploader_id:d.shortId}));I(t);let[n]=t??[];n&&q.toggleSelection({id:n.id,isSingleSelection:!0})},onComplete:e=>{let t=e.flatMap(e=>"success"===e.status?e:(function(e){let t=(0,O.tx)(e.file.name,30);c({id:e.id,title:`The specified file "${t}" could not be uploaded.`,subtitle:V.jsxs(S.xv,{color:"inherit",children:["Read more about our"," ",V.jsx(S.xv,{color:"tomato11",href:"https://prismic.io/docs/guides/manage-images#supported-media",underline:!0,children:"supported media"}),"."]}),buttons:{action:{text:"Retry upload",icon:"cloudUpload",onClick:()=>N(e)}}})}(e),{id:e.id,response:void 0}));w(t),E({config:l,assetType:A,tagIds:m}),f();let n=t[0];n&&n.response&&q.isSelected(n.id)&&q.toggleSelection({id:n.response.id,isSingleSelection:!0})}}),q=Wb({totalItemCount:T,onChangeSelection:({selectedIds:e,selectedCount:t})=>{if(z(!1),r){if(1===t){let[t]=[...e];if(D.some(e=>e.id===t&&"success"!==e.status)){r(new Set);return}}r(new Set(e))}}}),[Q,z]=(0,C.useState)(!1);return V.jsx(N5.Provider,{value:{isFetchingMedia:o,media:v,mediaTotal:T,onScrollToBottom:function(){b&&a(x)},actionContainerRef:i,onFilesUpload:function(e){P||W(e)},isUploading:P,uploadingFiles:D,isMediaRevalidationInProgress:U,isMediaCacheInvalid:L,revalidateMedia:K,deleteMedia:_,updateMedia:function(e,t){w([{id:e,response:t}])},keyword:p,isSearchingMedia:u,assetType:A,initialAssetType:n,uploaderId:h,tagManagerOpen:Q,setTagManagerOpen:z,tagIds:m,onFilterChange:function(e){let t={keyword:p,assetType:A,tagIds:m,uploaderId:h,...e};!function(e){let t=e.keyword===NQ.keyword,r=e.assetType===n,i=e.uploaderId===NQ.uploaderId,o=e.tagIds.length===NQ.tagIds.length&&e.tagIds.every((e,t)=>e===NQ.tagIds[t]);return t&&r&&i&&o}(t)?k(t):B(e),s(()=>{g(e),q.clearSelection()})},openMediaSection:F,setOpenMediaSection:M},children:t})}function N9(){let e=(0,C.useContext)(N5);if(!e)throw Error("useMediaLibrary must be used within a MediaLibraryProvider");return e}function N4(){return 0===function(){let e=WI(),{initialAssetType:t}=N9(),{assetsApiBaseUrl:n,repository:r="",authStrategy:i="token"}=e.mediaLibrary?e:{},{total:o}=(0,R.QT)(Nq,N$({assetsApiBaseUrl:n,authStrategy:i,repository:r,assetType:t,keyword:"",tagIds:[],page:0}));return o}()}function N8(){return N4()?V.jsx(qt,{}):V.jsx(qe,{})}function N7(e){let{children:t}=e;return V.jsx(S.xu,{justifyContent:"center",flexDirection:"column",height:"100%",children:t})}function qe(){return V.jsx(N7,{children:V.jsxs(S.R$,{children:[V.jsx(S.av,{name:"close",lineColor:"purple10",backgroundColor:"purple3",borderColor:"purple6",borderStyle:"dashed",size:"xlarge"}),V.jsx(S._T,{size:"big",children:"Oops!"}),V.jsx(S.nf,{width:360,children:"No items found matching your search"})]})})}function qt(){let{onFilesUpload:e}=N9();return V.jsx(N7,{children:V.jsxs(S.xu,{gap:20,flexDirection:"column",alignItems:"center",children:[V.jsx(S.xu,{maxWidth:375,children:V.jsx(S._T,{size:"big",children:"Start by uploading your files!"})}),V.jsx(S.xu,{border:!0,borderStyle:"dashed",borderRadius:4,justifyContent:"center",children:V.jsxs(S.R$,{sx:{marginBlock:80,marginInline:48},children:[V.jsx(S.av,{name:"cloudUpload",lineColor:"purple11",backgroundColor:"purple5",size:"large"}),V.jsx(S._T,{children:"Drop your files anywhere to upload or ..."}),V.jsx(S.KH,{onFilesSelected:e,renderButton:e=>V.jsx(S.xu,{display:"inline-flex",as:"span",children:V.jsx(S.zx,{onClick:e,color:"grey",children:"Upload media"})})}),V.jsx(S.nf,{children:"Maximum upload size file: 128 MB"})]})})]})})}let qn={warning:{uploadWhileUploading:{title:"Hang tight!",description:"Your current images are still being uploaded. Once they're all set, you'll be free to upload more."}}};function qr(){let{actionContainerRef:e,isUploading:t,onFilesUpload:n,assetType:r}=N9(),i=(null==e?void 0:e.current)!==void 0;return V.jsx(qo,{actionContainerRef:e,children:V.jsxs(S.xu,{width:"100%",gap:16,children:[V.jsx(qi,{}),V.jsx(S.u,{title:qn.warning.uploadWhileUploading.title,content:qn.warning.uploadWhileUploading.description,visible:t,stableMount:!0,children:V.jsx(S.KH,{disabled:t,onFilesSelected:n,startIcon:"cloudUpload",color:i?"purple":"grey",size:"large",assetType:r,children:"Upload media"})})]})})}function qi(){let{keyword:e,onFilterChange:t,isFetchingMedia:n}=N9(),[r,i]=(0,C.useState)(e);return(0,_.pQ)(e,()=>{""===e&&i("")}),(0,_.Nr)(r,300,(0,_.R9)(e=>t({keyword:e}))),V.jsx(S.xu,{width:"100%",flexDirection:"column",children:V.jsx(S.CR,{value:r,placeholder:"Search",onValueChange:i,maxLength:200,isLoading:n&&e!==r})})}function qo(e){let{children:t,actionContainerRef:n}=e,r=(null==n?void 0:n.current)!==void 0,i=r?S.Uv:C.Fragment,o=r?{container:n.current,asChild:!0}:{},a=(0,_.NW)();return(0,C.useLayoutEffect)(()=>{a()},[a]),V.jsx(i,{...o,children:t})}function qa(e){let{children:t}=e,{onFilesUpload:n,assetType:r}=N9();return V.jsx(S.Zz,{overlay:V.jsx(qu,{}),onFilesSelected:n,assetType:r,children:t})}function qu(){let{isUploading:e}=N9(),t=e?qn.warning.uploadWhileUploading.title:"Drop files here",n=e?qn.warning.uploadWhileUploading.description:"Drop your files to upload them instantly to the media library.";return V.jsx(S.xu,{justifyContent:"center",flexDirection:"column",height:"100%",children:V.jsxs(S.R$,{children:[V.jsx(S.av,{name:e?"block":"cloudUpload",lineColor:e?"tomato11":"purple10",backgroundColor:e?"tomato2":"purple3",borderColor:e?"tomato6":"purple6",borderStyle:"dashed",size:"xlarge"}),V.jsx(S._T,{size:"big",children:t}),V.jsx(S.nf,{width:360,children:n})]})})}function qs(){return V.jsx(S.Iq,{title:"Oops! Something went wrong",description:"An error occurred while searching for your image.",errorImageSrc:S.Os,sx:{marginBlock:"auto",marginInline:"auto"}})}function ql(e){let{mediaList:t,mediaActions:n,mediaToolbar:r,sidePane:i}=e,o=(0,S.ac)({min:"medium"}),a=i&&o;return V.jsxs(S.xu,{display:"grid",gridTemplateRows:"auto auto 1fr",gridTemplateColumns:a?"1fr 380px":"1fr",width:"100%",height:"100%",children:[V.jsxs(S.xu,{position:"relative",display:"grid",gap:16,gridColumn:"1",gridRow:"1",padding:{right:16,bottom:16},children:[n,r]}),V.jsx(S.xu,{position:"relative",display:"grid",gridColumn:"1",gridRow:"2 / -1",children:t}),a&&i]})}function qc(){var e;let{onScrollToBottom:t,media:n,isUploading:r,uploadingFiles:i,isSearchingMedia:o,isMediaRevalidationInProgress:a,setOpenMediaSection:u,isFetchingMedia:s}=N9(),l=Wb(),c=(0,C.useRef)(null);function d(e,t,r){let i=t.shiftKey?n.map(({id:e})=>e):void 0;l.toggleSelection({id:e,isSingleSelection:"single"===r,metaKey:t.metaKey,shiftKey:t.shiftKey,ids:i})}return(r||o||a)&&(null==(e=c.current)||e.scrollTo({top:0,behavior:"instant"})),V.jsxs(qd,{onScrollToBottom:t,scrollAreaRef:c,children:[n.map(e=>{var t,n;return V.jsx(S.PB,{"aria-label":"media item",...e,filenameHighlight:null==(t=e.search_highlight)?void 0:t.filename,loading:o,status:null==(n=i.find(t=>t.id===e.id))?void 0:n.status,selected:l.isSelected(e.id),onCardClick:t=>d(e.id,t,"single"),onCheckedChange:(t,n)=>d(e.id,n,"multi"),onAddTagClick:()=>{var t;return t=e.id,void(l.toggleSelection({id:t,isSingleSelection:!0}),u("tags"))}},e.id)}),V.jsx(S.xu,{gridColumn:"1 / -1",justifyContent:"center",children:V.jsx(S.Fp,{animation:{name:"fade"},children:s&&V.jsx(S.xv,{align:"center",color:"grey11",sx:{marginBlock:8},children:"Loading more items ..."})})})]})}function qd(e){let{children:t,scrollAreaRef:n,onScrollToBottom:r}=e;return V.jsx(S.xr,{"aria-label":"Media list",ref:n,style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(max(250px, calc((100% - 48px) / 4)), 1fr))",gridTemplateRows:"1fr 1fr 1fr ",gap:16,padding:2,paddingBottom:16,position:"relative"},onScrollToBottom:r,threshold:500,children:t})}function qf(e){let{children:t,hasSelectedMedia:n}=e;return V.jsx(S.xu,{overflow:"hidden",gridColumn:"2 / -1",gridRow:"1 / -1",children:V.jsx(S.xr,{style:{display:"grid",height:"100%"},children:V.jsx(S.xu,{flexGrow:1,borderRadius:{topRight:8,topLeft:8},borderStyle:n?"solid":"dashed",border:{top:!0,right:!0,left:!0,bottom:!1},minWidth:0,children:t})})})}function qp(e){let{onFilesUpload:t,isUploading:n,isInitialLoad:r=!1}=e,i=r||n;return V.jsxs(S.xu,{flexDirection:"column",justifyContent:"center",alignItems:"center",padding:16,gap:16,width:"100%",children:[V.jsx(S.av,{name:"cloudUpload",lineColor:"purple11",backgroundColor:"purple5",size:"large"}),V.jsx(S.xu,{flexDirection:"column",gap:4,children:V.jsxs(S.xv,{align:"center",children:["Select or"," ",V.jsx(S.KH,{disabled:i,onFilesSelected:t,renderButton:e=>V.jsx(S.u,{title:qn.warning.uploadWhileUploading.title,content:qn.warning.uploadWhileUploading.description,visible:n,children:V.jsx(S.xu,{display:"inline-flex",as:"span",children:V.jsx(S.zx,{disabled:i,onClick:e,invisible:!0,children:"upload"})})})})," ","media."]})}),V.jsx(S.KH,{disabled:i,onFilesSelected:t,color:"grey",children:"Upload media"})]})}function qA(e){let{count:t}=e;return V.jsxs(S.xv,{variant:"bold",children:[t," item",1==t?"":"s"]})}function qh(e){let{actionContainerRef:t}=e;return V.jsx(ql,{sidePane:V.jsx(qy,{}),mediaActions:V.jsx(qg,{actionContainerRef:t}),mediaToolbar:V.jsx(S.Od,{color:"grey5",borderRadius:12,children:V.jsx(qA,{count:888})}),mediaList:V.jsx(qm,{})})}function qm(){return V.jsx(qd,{children:(0,E.w6)(1,24).map(e=>V.jsx(qv,{},e))})}function qg(e){let{actionContainerRef:t}=e,n=(0,_.NW)();return(0,C.useLayoutEffect)(()=>{n()},[n]),V.jsx(qo,{actionContainerRef:t,children:V.jsxs(S.xu,{width:"100%",gap:16,children:[V.jsx(S.xu,{width:"100%",flexDirection:"column",children:V.jsx(S.CR,{placeholder:"Search",maxLength:200,value:"",disabled:!0,onValueChange:()=>{}})}),V.jsx(S.KH,{disabled:!0,onFilesSelected:()=>{},startIcon:"cloudUpload",color:t?"purple":"grey",size:"large",children:"Upload media"})]})})}function qy(){return V.jsx(qf,{hasSelectedMedia:!1,children:V.jsx(qp,{onFilesUpload:()=>{},isUploading:!1,isInitialLoad:!0})})}function qv(){return V.jsxs(S.xu,{height:302,width:"100%",flexDirection:"column",padding:16,backgroundColor:"grey1",border:!0,borderStyle:"solid",borderRadius:6,children:[V.jsx(S.Od,{height:164,width:"100%"}),V.jsx(S.Od,{height:16,width:"100%",sx:{marginTop:12}}),V.jsx(S.Od,{height:10,width:100,sx:{marginTop:8}}),V.jsx(S.Od,{height:1,width:"100%",sx:{marginTop:20,marginBottom:16}}),V.jsxs(S.xu,{flexDirection:"row",gap:8,children:[V.jsx(S.Od,{height:24,width:54}),V.jsx(S.Od,{height:24,width:45}),V.jsx(S.Od,{height:24,width:62})]})]})}let qx=(0,C.createContext)({showToast:()=>{}});function qb(e){let{children:t}=e,[n,r]=(0,C.useState)({title:"",seconds:5}),[i,o]=(0,C.useState)(!1),{title:a,action:u,seconds:s=1,icon:l="check"}=n,c=(0,C.useMemo)(()=>({showToast:e=>{r({seconds:s,...e}),o(!0)}}),[s]);return V.jsxs(V.Fragment,{children:[V.jsx(qS,{}),V.jsx(S.FN,{anchor:V.jsx(S.xu,{position:"absolute",justifyContent:"center",width:"100%",bottom:72}),open:i,onOpenChange:o,title:a,action:u,seconds:s,icon:l}),V.jsx(qx.Provider,{value:c,children:t})]})}function qC(){return(0,C.useContext)(qx)}function qS(){let{revalidateMedia:e,isMediaCacheInvalid:t}=N9(),[n,r]=(0,C.useState)(t);return(0,_.pQ)(t,r),V.jsx(S.FN,{anchor:V.jsx(S.xu,{position:"absolute",justifyContent:"center",width:"100%",bottom:72}),open:n,title:"There have been changes to your media library",action:{title:"Update",onClick:e},cancel:{onClick:()=>r(!1)}})}function qw(){let{media:e}=N9(),t=Wb();return e.filter(({id:e})=>t.isSelected(e))}function qI(){let[e,t]=(0,C.useState)(!1),n=qw(),r=Wb(),i=(0,C.useMemo)(()=>n.some(({id:e})=>e.startsWith("temp")),[n]),[o]=n;return o?r.selectedCount>1?V.jsxs(S.xu,{gap:8,alignItems:"center",children:[V.jsxs(S.xv,{variant:"emphasized",noWrap:!0,sx:{flexGrow:1},children:[r.selectedCount," media selected"]}),V.jsx(S.u,{content:"Open all selected media in new tabs",children:V.jsx(S.hU,{icon:"openInFull",variant:"solid",size:"small",onClick:()=>n.forEach(e=>window.open(e.url,"_blank"))})}),V.jsx(S.u,{content:"Remove selected media",children:V.jsx(S.hU,{icon:"delete",variant:"solid",color:"tomato",size:"small",hiddenLabel:"Remove media",onClick:()=>t(!0),disabled:i})}),V.jsx(q_,{open:e,onOpenChange:t,media:n})]}):V.jsxs(S.xu,{gap:8,alignItems:"center",children:[V.jsx(S.xv,{variant:"emphasized",noWrap:!0,sx:{flexGrow:1},children:o.filename}),V.jsxs(S.xu,{gap:8,children:[V.jsx(S.u,{content:"Open media in new tab",children:V.jsx(S.hU,{icon:"openInFull",variant:"solid",size:"small",hiddenLabel:"Open media in new tab",onClick:()=>window.open(o.url,"_blank"),disabled:i})}),V.jsx(S.u,{content:"Copy media URL",children:V.jsx(S.hU,{icon:"link",variant:"solid",size:"small",hiddenLabel:"Copy media URL",onClick:()=>navigator.clipboard.writeText(o.url),disabled:i})}),V.jsx(S.u,{content:"Remove media",children:V.jsx(S.hU,{icon:"delete",variant:"solid",color:"tomato",size:"small",hiddenLabel:"Remove media",onClick:()=>t(!0),disabled:i})}),V.jsx(q_,{open:e,onOpenChange:t,media:o})]})]}):null}function q_(e){let{open:t,onOpenChange:n,media:r}=e,i=WI(),{showAlert:o}=(0,S.VY)(),{deleteMedia:a}=N9(),u=Wb(),s=N6(),[l,c]=(0,C.useState)(!1),d=Array.isArray(r),f=d?"these items":"this item";return V.jsxs(S.Vq,{onOpenChange:n,open:t,size:"small",children:[V.jsx(S.fK,{icon:"alert",title:`Remove ${f} from your media library?`}),V.jsx(S.cZ,{children:V.jsxs(S.xu,{padding:16,flexDirection:"column",children:[V.jsxs(S.xv,{children:["You are about to delete ",f,": \xa0",!d&&V.jsx("b",{children:r.filename})]}),d&&V.jsx(qT,{media:r})]})}),V.jsxs(S.kX,{children:[V.jsx(S.PO,{}),V.jsxs(S._d,{onClick:function(){c(!0);let e=u.getSelectionState().selectedIds;(function(e){let{ids:t,config:n}=e;if(!n.mediaLibrary)throw Error("Media Library not configured.");if(0===t.length)throw Error("No ids provided during media deletion");let{assetsApiBaseUrl:r,repository:i,authStrategy:o}=n;if(1===t.length){let[e]=t;return(0,j.WY)(new URL(`assets/${e}`,r),{headers:{repository:i},method:"DELETE",credentials:(0,j.xb)(o),okType:Ni.unknown()})}return(0,j.WY)(new URL("assets/bulk-delete",r),{headers:{repository:i},method:"POST",credentials:(0,j.xb)(o),okType:Ni.unknown(),body:{ids:t}})})({ids:e,config:i}).then(()=>{n(!1),a(e),u.clearSelection(),s()}).catch(()=>{n(!1),o({title:"Error",subtitle:`Something went wrong when removing ${f}.`})}).finally(()=>{c(!1)})},color:"tomato",loading:l,children:["Yes, I want to remove ",f]})]})]})}function qT(e){let{media:t}=e,n=t.slice(0,15),r=t.length>15,i=r?t.length-15:0;return V.jsxs(S.QI,{density:"compact",sx:{marginTop:8},children:[n.map((e,t)=>V.jsx(S.HC,{children:V.jsx("b",{children:e.filename})},t)),r&&V.jsxs(S.HC,{children:["And ",V.jsx("b",{children:i})," more ",1===i?"item":"items","..."]})]})}function qk(){var e;let t=qw(),{uploadingFiles:n}=N9(),[r]=t;if(!r)return null;if(2===t.length)return V.jsx(qO,{children:t.map((e,t)=>V.jsx("div",{style:{position:"absolute",transform:0===t?"translateX(25%) rotate(15deg) ":"translateX(-25%) rotate(-15deg) "},children:V.jsx(qE,{media:e})},e.id))});if(t.length>2)return V.jsx(qO,{children:t.slice(-4).map((e,t)=>V.jsx("div",{style:{position:"absolute",paddingRight:16*t},children:V.jsx(qE,{media:e})},e.id))});let i=null==(e=n.find(e=>e.id===r.id))?void 0:e.status,o=r.kind.startsWith("image");return V.jsx(S.xu,{flexDirection:"column",children:V.jsx(S.hM,{children:V.jsx(qO,{uploadStatus:i,hasImage:o,children:o?V.jsx(S.Ee,{src:r.url,alt:r.alt,sizing:"contain"}):V.jsx(S.Sp,{kind:r.kind,filename:r.filename})})})})}function qO(e){let{children:t,uploadStatus:n,hasImage:r}=e;return V.jsxs(S.xu,{flexDirection:"column",alignItems:"center",justifyContent:"center",position:"relative",height:200,width:"100%",backgroundColor:r?"transparent":"purple2",children:[t,n&&V.jsx(qR,{uploadStatus:n})]})}function qR(e){let{uploadStatus:t}=e,{value:n,color:r,height:i,transition:o}=function(e){switch(e){case"idle":return{value:0,height:"collapsed",color:"grey4"};case"uploading":return{value:90,transition:"slow",color:"purple9"};case"success":return{value:100,height:"collapsed",color:"purple9"};case"error":return{value:100,color:"tomato11"}}}(t);return V.jsx(S.xu,{position:"absolute",backgroundColor:"greyAlpha1",width:"100%",height:"100%",padding:{inline:16},justifyContent:"end",flexDirection:"column",children:V.jsx(S.ko,{value:n,color:r,height:i,transition:o})})}function qE(e){let{media:t}=e;return V.jsx(S.xu,{width:111,height:152,children:"image"===t.kind?V.jsx(S.Ee,{borderRadius:8,src:t.url,alt:t.alt,sizing:"cover"}):V.jsx(S.Sp,{kind:t.kind,filename:t.filename})})}let qj="__MAIN_THUMBNAIL__";function qF(e,t,n){let r;return[e.name===qj?void 0:e.name,(r=t?(0,k.$)(n)?[n.width,n.height]:(0,k.$)(e.width)||(0,k.$)(e.height)?[e.width??void 0,e.height??void 0]:[t.origin.width,t.origin.height]:void 0)?`${r[0]??"auto"}\xd7${r[1]??"auto"}px`:void 0]}function qM(e){let t=new URL(e);return t.searchParams.delete("q"),t.searchParams.set("w","800"),t.searchParams.set("h","800"),t.searchParams.set("auto","compress,format"),t.searchParams.set("fit","max"),t.toString()}function qU(e){return null!=e&&e.url?qM(e.url):void 0}function qL(e,t){let{width:n,height:r,rect:i}=function(e,t){let[n,r]=function(e,t){let{width:n,height:r}=t??{};return n&&r?[n,r]:n?[n,Math.round(e.height*(n/e.width))]:r?[Math.round(e.width*(r/e.height)),r]:[e.width,e.height]}(e,t),i=Math.max(n/e.width,r/e.height),o=Math.round((e.width-n/i)/2),a=Math.round((e.height-r/i)/2);return{width:n,height:r,rect:{x:o,y:a,width:Math.round(n/i),height:Math.round(r/i)}}}({...e,width:(null==e?void 0:e.width)??2e3,height:(null==e?void 0:e.height)??2e3},t),o=!!(null!=t&&t.width||null!=t&&t.height);return{provider:"imgix",url:function(e,t,n,r,i){if("svg"===function(e){let{pathname:t}=new URL(e),n=t.lastIndexOf(".");if(-1!==n)return t.substring(n).slice(1).toLowerCase()}(e))return e;let o=new URL(e);if(i){let{x:e,y:i,width:a,height:u}=t,s=[...o.searchParams.entries(),["rect",[e,i,a,u].join(",")],["w",n],["h",r]];o.search=s.map(e=>e.join("=")).join("&")}return o.toString()}(e.url,i,n,r,o),alt:e.alt,..."kind"in e&&"extension"in e?{credits:e.credits}:{},origin:{id:e.id,url:e.url,width:e.width??2e3,height:e.height??2e3},width:n,height:r,edit:{background:"transparent",zoom:1,crop:{x:i.x,y:i.y}}}}function qK(e){if(!e)return"";let{filename:t,extension:n}=e;if(!n)return t;let r=RegExp(`\\.${n}$`);return t.replace(r,"")}function qB(e){let{tags:t,toggleAssetTag:n,getTagsLabel:r}=e,{setTagManagerOpen:i}=N9(),{showToast:o}=qC(),{showAlert:a}=(0,S.VY)(),[u,s]=(0,C.useState)("");async function l(e,t){s("");try{await n(e,t),o({title:"Media tags were updated",seconds:3})}catch{a({title:"Error",subtitle:"Something went wrong when updating media tags"})}}return V.jsxs(S.xu,{flexDirection:"column",children:[V.jsxs(S.xu,{justifyContent:"space-between",children:[V.jsx(S.xv,{color:"grey12",variant:"bold",children:r()}),V.jsx(S.zx,{startIcon:"edit",invisible:!0,color:"dark",onClick:()=>i(!0),children:"Manage tags"})]}),V.jsxs(S.BC,{sx:{marginTop:4,marginBottom:8},children:[V.jsx(qP,{searchTerm:u,setSearchTerm:s}),V.jsx(S.KV,{children:V.jsx(S.SV,{renderError:()=>V.jsx(S.xv,{color:"grey9",variant:"small",sx:{marginBlock:8,marginInline:8},children:"Error getting tags"}),children:V.jsx(C.Suspense,{fallback:V.jsx(S.xu,{padding:8,flexDirection:"column",gap:8,children:(0,E.w6)(1,6).map(e=>V.jsx(S.Od,{height:24,width:85},e))}),children:V.jsx(qW,{searchTerm:u,assignedTags:t,onToggleAssetTag:l})})})})]}),V.jsx(S.xu,{flexDirection:"column",alignItems:"flex-start",gap:8,children:t.map(e=>V.jsx(S.Ct,{title:e.name,size:"medium",color:"purple",selected:!0,onClose:()=>l(e,"remove")},e.id))})]})}function qP(e){let{searchTerm:t,setSearchTerm:n}=e,r=(0,C.useRef)(null),{openMediaSection:i,setOpenMediaSection:o}=N9();return(0,C.useEffect)(()=>{var e;"tags"===i&&(null==(e=r.current)||e.focus(),o(void 0))},[i,o]),V.jsx(S.Ie,{value:t,onValueChange:n,placeholder:"Add or create a new tag",ref:r})}function qW(e){let{searchTerm:t,assignedTags:n,onToggleAssetTag:r}=e,[i]=qw(),o=WI(),{showAlert:a}=(0,S.VY)(),{tags:u}=NF(),s=(0,C.useMemo)(()=>{let e=t.toLowerCase();return u.filter(t=>t.name.toLowerCase().includes(e))},[u,t]),l=NU.safeParse(t).success&&u.every(e=>e.name!==t);async function c(){let e;if(t&&i){try{e=await function(e){let{name:t,config:n}=e;n.mediaLibrary||WT("mediaLibrary");let{assetsApiBaseUrl:r,repository:i,authStrategy:o}=n;return(0,j.WY)(new URL("tags",r),{headers:{repository:i},body:{name:t},method:"POST",credentials:(0,j.xb)(o),okType:NL})}({name:t,config:o}),NB(t=>[e,...t])}catch{a({title:"Error",subtitle:`Something went wrong when creating the tag ${t}`});return}await r(e,"add")}}return i?V.jsxs(V.Fragment,{children:[!s.length&&V.jsx(S.xv,{color:"grey9",variant:"small",sx:{marginBlock:8,marginInline:8},children:"No tags found"}),s.map((e,t)=>V.jsx(S.c8,{value:e.id,onCheckedChange:t=>r(e,t?"add":"remove"),checked:n.some(t=>t.id===e.id),children:V.jsx(S.Ct,{title:e.name,color:"purple",size:"medium",sx:{marginInline:8,marginBottom:t===s.length-1?8:4,marginTop:0===t?8:4}})},e.id)),l&&V.jsx(S.c8,{value:"new",onCheckedChange:c,children:V.jsxs(S.xu,{padding:8,flexDirection:"row",alignItems:"center",gap:4,children:[V.jsx(S.I5,{name:"add",size:"small",color:"grey11"}),V.jsxs(S.xv,{color:"grey12",children:['Create tag "',t,'"']})]})})]}):null}function qD(e){let{selectedMedia:t}=e,n=WI(),r=(0,C.useMemo)(()=>(function(e){let t=e.length,n={},r=[];return e.forEach(e=>{e.tags.forEach(e=>{n[e.id]||(n[e.id]=0,r.push(e)),n[e.id]++})}),r.filter(e=>n[e.id]===t)})(t),[t]);async function i(e,r){let i="remove"===r,o=t.map(e=>e.id),a=[];NG(t=>(a=t,t.map(t=>o.includes(t.id)?i?function(e,t){let n=e.tags.filter(e=>e.id!==t.id);return{...e,tags:n}}(t,e):t.tags.some(({id:t})=>t===e.id)?t:{...t,tags:[...t.tags,e]}:t)));try{await function(e){let{tagId:t,assetIds:n,config:r,operation:i}=e;if(!r.mediaLibrary)throw Error("Media Library not configured.");let{assetsApiBaseUrl:o,repository:a,authStrategy:u}=r;return(0,j.WY)(new URL(`tags/${t}/assets`,o),{headers:{repository:a},body:{assetIds:n},method:"add"===i?"POST":"DELETE",credentials:(0,j.xb)(u),okType:Ni.unknown()})}({tagId:e.id,assetIds:o,operation:i?"remove":"add",config:n});let r=t.length*(i?-1:1);NB(t=>t.map(t=>t.id===e.id?{...t,count:t.count+r}:t))}catch(e){throw NG(()=>a),e}}return V.jsx(qB,{tags:r,getTagsLabel:function(){let e=r.length;return e>1?`${e} tags in common`:1===e?"1 tag in common":"Common tags"},toggleAssetTag:i})}function qN(e){let{selectedMedia:t}=e,n=t.tags,r=WI(),{updateMedia:i}=N9();async function o(e,n){let o=t.tags,a="remove"===n,u=a?o.filter(t=>t.id!==e.id):[...o,e];i(t.id,{tags:u});try{await function(e){let{mediaId:t,config:n,tags:r}=e;if(!n.mediaLibrary)throw Error("Media Library not configured.");let{assetsApiBaseUrl:i,repository:o,authStrategy:a}=n;return(0,j.WY)(new URL(`assets/${t}`,i),{headers:{repository:o},body:{tags:r},method:"PATCH",credentials:(0,j.xb)(a),okType:NW})}({mediaId:t.id,config:r,tags:u.map(e=>e.id)}),NB(t=>t.map(t=>t.id===e.id?{...t,count:t.count+(a?-1:1)}:t))}catch(e){throw i(t.id,{tags:o}),e}}return V.jsx(qB,{tags:n,getTagsLabel:function(){let e=n.length;return e>1?`${e} tags`:1===e?"1 tag":"Tags"},toggleAssetTag:o})}function qq(){let[e,t]=(0,C.useState)("description");if(1!==qw().length)return V.jsx(qG,{});let n="description"===e,r="more-info"===e;return V.jsxs(V.Fragment,{children:[V.jsxs(S.xu,{display:"grid",gridTemplateColumns:"1fr 1fr",backgroundColor:"grey2",border:!0,borderStyle:"solid",borderRadius:8,children:[V.jsx(S.OK,{selected:n,outline:n,transparent:!0,onClick:()=>t("description"),children:"Description"}),V.jsx(S.OK,{selected:r,outline:r,transparent:!0,onClick:()=>t("more-info"),children:"More info"})]}),V.jsx(qQ,{tab:e})]})}function qQ(e){let{tab:t}=e;switch(t){case"description":return V.jsx(qV,{});case"more-info":return V.jsx(qz,{})}}function qV(){let{title:e,alt:t,onBlur:n,isUploading:r,selectedMedia:i}=qZ();if(!i)return null;let{extension:o}=i;return V.jsxs(S.xu,{flexDirection:"column",gap:16,children:[V.jsx(S.yt,{value:e.value,onValueChange:e.set,label:"Media title",placeholder:"Media title",onBlur:n,disabled:r,suffix:o?`.${o}`:void 0}),V.jsx(S.Cz,{label:"Alternative text",children:V.jsx(S.f$,{content:t.displayValue,contentVersion:t.version,readOnly:r,placeholder:"A short description of the media for accessibility",multiline:!0,decorations:{em:"highlight"},onChange:t.onChange,onBlur:n})}),!r&&V.jsx(qN,{selectedMedia:i})]})}function qz(){let{credits:e,notes:t,onBlur:n,isUploading:r,selectedMedia:i}=qZ();if(!i)return null;let{uploader_id:o}=i,a=function(e){let{width:t,height:n,last_modified:r,size:i,extension:o}=e,a=t&&n,u={label:"Date",value:(0,T._L)(new Date(r))};return[u,{label:"File size",value:(0,O.td)(i)},a?{label:"Dimensions",value:`${t}\xd7${n}`}:void 0,a?{label:"Ratio",value:((t??0)/(n??0)).toFixed(1)}:void 0,o?{label:"Extension",value:o.toUpperCase()}:void 0].filter(k.$)}(i);return V.jsxs(S.xu,{gap:8,flexDirection:"column",children:[a.map(e=>V.jsxs(S.xu,{gap:8,children:[V.jsxs(S.xv,{color:"grey11",children:[e.label,":"]}),V.jsx(S.xv,{children:e.value})]},e.label)),V.jsxs(S.xu,{gap:8,children:[V.jsx(S.xv,{color:"grey11",children:"Uploaded by:"}),V.jsx(S.SV,{renderError:()=>V.jsx(S.xv,{color:"grey11",children:"Error getting uploader"}),children:V.jsx(C.Suspense,{fallback:V.jsx(qH,{}),children:V.jsx(qY,{uploaderId:o})})})]}),V.jsx(S.Cz,{label:"Copyright",children:V.jsx(S.f$,{content:e.displayValue,contentVersion:e.version,readOnly:r,placeholder:"Media copyrights or credits",multiline:!0,decorations:{em:"highlight"},onChange:e.onChange,onBlur:n})}),V.jsx(S.Cz,{label:"Private notes",children:V.jsx(S.f$,{content:t.displayValue,contentVersion:t.version,readOnly:r,placeholder:"Private notes are never shared publicly",multiline:!0,decorations:{em:"highlight"},onChange:t.onChange,onBlur:n})})]})}function qY(e){let{uploaderId:t}=e,{uploadersById:n}=NX(),r=n.get(t??"ghost");return t&&!r?V.jsx(qH,{}):r?V.jsxs(V.Fragment,{children:[V.jsx(S.qE,{size:24,firstName:r.firstName,lastName:r.lastName,imageUrl:r.uploadedAvatar,hasBorder:!1}),V.jsx(S.xv,{children:r.name})]}):null}function qH(){return V.jsx(S.Od,{width:128})}function qG(){let e=qw(),{uploadingFiles:t}=N9(),n=(0,C.useMemo)(()=>t.some(t=>e.some(e=>t.id===e.id)&&"success"!==t.status),[e,t]);return V.jsx(V.Fragment,{children:!n&&V.jsx(qD,{selectedMedia:e})})}function qZ(){let[e]=qw(),{updateMedia:t,uploadingFiles:n}=N9(),r=WI(),{showToast:i}=qC(),o=(null==e?void 0:e.id)??"",a=qJ(e,"alt"),u=qJ(e,"notes"),s=qJ(e,"credits"),l=qJ(e,"filename",qK),c=n.some(t=>t.id===(null==e?void 0:e.id)&&"success"!==t.status);return{selectedMedia:e,onBlur:function(){if(!e||!l.changed&&!a.changed&&!s.changed&&!u.changed)return;let{extension:n,search_highlight:c}=e,d=n?`${l.value}.${n}`:l.value;t(o,{filename:d,alt:a.value,credits:s.value,notes:u.value,search_highlight:{alt:a.changed||null==c?void 0:c.alt,credits:s.changed||null==c?void 0:c.credits,filename:l.changed||null==c?void 0:c.filename,notes:u.changed||null==c?void 0:c.notes}}),(function(e){let{id:t,config:n,metadata:r}=e;if(!n.mediaLibrary)throw Error("Media Library not configured.");let{assetsApiBaseUrl:i,repository:o,authStrategy:a}=n;return(0,j.WY)(new URL(`assets/${t}`,i),{headers:{repository:o},body:{...r},method:"PATCH",credentials:(0,j.xb)(a),okType:NW})})({id:o,config:r,metadata:{filename:d,alt:a.value,credits:s.value,notes:u.value}}).then(()=>{i({title:"Media metadata has been saved.",seconds:3})}).catch(e=>{console.error(e)})},isUploading:c,title:l,alt:a,credits:s,notes:u,extension:null==e?void 0:e.extension}}function qJ(e,t,n=e=>null==e?void 0:e[t]){var r,i;let o=n(e)??"",[a,u]=(0,C.useState)(o);(0,_.pQ)(null==e?void 0:e.id,()=>u(o));let s=null==(r=null==e?void 0:e.search_highlight)?void 0:r[t];return{value:a,set:u,displayValue:(null==(i=s??a)?void 0:i.replace(/\n/g,"<br>"))??"",onChange:function(e){let{from:t,to:n}=e.state.selection;e.commands.selectAll(),e.commands.unsetAllMarks(),e.commands.setTextSelection({from:t,to:n}),u(e.getText())},version:`${(null==e?void 0:e.id)??""}_${!!s}`,changed:a!==o}}function q$(){let{setTagManagerOpen:e}=N9(),[t,n]=(0,C.useState)("");return V.jsxs(S.xu,{gap:20,flexDirection:"column",height:"100%",children:[V.jsxs(S.xu,{alignItems:"center",gap:4,children:[V.jsx(S.hU,{icon:"close",size:"small",hasPadding:!1,onClick:()=>e(!1)}),V.jsx(S.xv,{variant:"bold",children:"Tags management"})]}),V.jsxs(S.xu,{gap:16,flexDirection:"column",height:"100%",children:[V.jsx(S.CR,{value:t,onValueChange:n,placeholder:"Search for tags",endAdornment:!1,autoFocus:!0}),V.jsx(S.SV,{renderError:()=>V.jsx(q2,{}),children:V.jsx(C.Suspense,{fallback:V.jsx(q6,{}),children:V.jsx(qX,{searchTerm:t})})})]})]})}function qX(e){let{searchTerm:t}=e,{tags:n}=NF(),r=n.filter(e=>e.name.toLowerCase().includes(t.toLowerCase()));return 0===r.length?V.jsx(S.xv,{color:"grey9",variant:"small",children:"No tags found"}):V.jsx(S._M,{ariaLabel:"Tags list",getItemKey:e=>e.id,gap:16,items:r,children:e=>V.jsx(q0,{tag:e})})}function q0(e){let{tag:t}=e,[n,r]=(0,C.useState)(!1),i=WI(),{showAlert:o}=(0,S.VY)(),{showToast:a}=(0,S.pm)(),{tags:u}=NF();async function s(e){if(!NU.safeParse(e).success){o({title:"Error",subtitle:`Failed to rename tag "${t.name}" to "${e}". Tag name must be at least 1 and at maximum 20 characters long.`});return}if(u.some(t=>t.name===e)){o({title:"Error",subtitle:`Failed to rename tag "${t.name}" to "${e}". Tag with name "${e}" already exists.`});return}try{await function(e){let{id:t,name:n,config:r}=e;r.mediaLibrary||WT("mediaLibrary");let{assetsApiBaseUrl:i,repository:o,authStrategy:a}=r;return(0,j.WY)(new URL(`tags/${t}`,i),{headers:{repository:o},method:"PATCH",credentials:(0,j.xb)(a),body:{name:n},okType:Ni.unknown()})}({id:t.id,name:e,config:i}),NB(n=>n.map(n=>n.id===t.id?{...n,name:e}:n)),NG(n=>n.map(n=>{if(-1!==n.tags.findIndex(e=>e.id===t.id)){let r=n.tags.map(n=>n.id===t.id?{...n,name:e}:n);return{...n,tags:r}}return n})),a({title:`Tag "${t.name}" renamed to "${e}"`,seconds:3})}catch{o({title:"Error",subtitle:"Something went wrong when renaming the tag."})}}return V.jsxs(V.Fragment,{children:[V.jsxs(S.xu,{justifyContent:"space-between",children:[V.jsx(S.Ct,{title:t.name,color:"purple",size:"medium",onEdit:s}),V.jsx(S.zx,{invisible:!0,color:"tomato",textWeight:"normal",onClick:()=>r(!0),children:"Delete"})]}),V.jsx(q1,{open:n,onOpenChange:r,tag:t})]})}function q1(e){let{open:t,onOpenChange:n,tag:r}=e,{id:i,name:o,count:a}=r,u=WI(),{showAlert:s}=(0,S.VY)(),[l,c]=(0,C.useState)(!1);async function d(){c(!0);try{await function(e){let{id:t,config:n}=e;n.mediaLibrary||WT("mediaLibrary");let{assetsApiBaseUrl:r,repository:i,authStrategy:o}=n;return(0,j.WY)(new URL(`tags/${t}`,r),{headers:{repository:i},method:"DELETE",credentials:(0,j.xb)(o),okType:Ni.unknown()})}({id:i,config:u}),NB(e=>e.filter(e=>e.id!==i)),NG(e=>e.map(e=>{if(-1!==e.tags.findIndex(e=>e.id===i)){let t=e.tags.filter(e=>e.id!==i);return{...e,tags:t}}return e}))}catch{s({title:"Error",subtitle:"Something went wrong when removing the tag."})}finally{c(!1),n(!1)}}return V.jsxs(S.Vq,{onOpenChange:n,open:t,size:"small",children:[V.jsx(S.fK,{title:`This tag is being used on ${a} media item${1===a?"":"s"}`}),V.jsx(S.cZ,{padding:16,children:V.jsxs(S.xv,{children:["You are about to delete the tag name ",V.jsx("b",{children:o}),"."," ",a>0&&`This tag is being
5
+ `}}function i(r){return t.exact(t.intersection([t.type({id:t.string,label:n.StringOrNull,repeatable:(0,Lx.withFallback)(t.boolean,!0),json:t.record(t.string,r),status:(0,Lx.withFallback)(t.boolean,!0)}),t.partial({format:(0,Lx.withFallback)(t.keyof(e.CustomTypeFormat),"custom")})]))}function o(e){return Object.entries(e.json).reduce((e,[,t])=>{let n=Object.entries(t);return e.concat(n)},[])}function a(e,t){let n=Object.entries(e.json).reduce((e,[n,r])=>{let i=Object.entries(r).reduce((e,[n,r])=>{let i=t(n,r);return i?{...e,[n]:i}:e},{});return{...e,[n]:i}},{});return{...e,json:n}}e.StaticCustomType=i(L4.StaticSection),e.CustomType=i(L4.DynamicSection),e.flattenWidgets=o,e.flattenSections=function(e){return Object.entries(e.json).reduce((e,[,t])=>{let n=Object.entries(t);return e.concat(n)},[])},e.toStatic=function(e,t){let n=Object.entries(e.json).reduce((e,[n,r])=>({...e,[n]:L4.Sections.toStatic(r,t)}),{});return{...e,json:n}},e.validateSlices=function(e,t){let n=(function(e){let t=o(e).filter(([,e])=>"Slices"===e.type).reduce((e,[,t])=>{let n=Object.entries(t.config&&t.config.choices?t.config.choices:{}).filter(([,e])=>"SharedSlice"===e.type).map(([e])=>e);return e.concat(n)},[]);return function(e){return t.map(e)}})(e)(e=>{if(!t.get(e))return e}).filter(Boolean);return n.length>0?(0,j8.left)(new r(n)):(0,j8.right)(e)},e.collectWidgets=a,e.filterMissingSharedSlices=function(e,t){return a(e,(e,n)=>{if("Slices"===n.type){if(!n.config||!n.config.choices)return n;let e=Object.entries(n.config.choices).reduce((e,[n,r])=>"SharedSlice"!==r.type||t.get(n)?{...e,[n]:r}:e,{}),r={...n.config,choices:e};return{...n,config:r}}return n})},e.flattenCustomTypeFields=function(e){return Object.values(e.json).reduce((e,t)=>({...e,...t}),{})},e.collectSharedSlices=function(e){return Object.entries(e.fields).reduce((e,[,t])=>{var n;return"Slices"===t.type||"Choice"===t.type?{...e,...Object.entries((null===(n=t.config)||void 0===n?void 0:n.choices)||{}).reduce((e,[t,n])=>"SharedSlice"===n.type?{...e,[t]:n}:e,{})}:e},{})}}(Lv);var KH={},KG={};Object.defineProperty(KG,"__esModule",{value:!0}),KG.DiffOperation=void 0,(Bx=KG.DiffOperation||(KG.DiffOperation={})).Added="added",Bx.Removed="removed",Bx.Updated="updated";var KZ={},KJ={},K$={};Object.defineProperty(K$,"__esModule",{value:!0}),K$.HexaColor=void 0;let KX=/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/;K$.HexaColor={is:e=>KX.test(e)};var K0={};Object.defineProperty(K0,"__esModule",{value:!0}),K0.toRecord=void 0,K0.toRecord=function(e,t){return e.reduce((e,n)=>{let r=t(n);return{...e,[r]:n}},{})};var K1={};Object.defineProperty(K1,"__esModule",{value:!0}),K1.mapValues=K1.isObject=K1.withOptionals=K1.isNotEmpty=K1.zipObjects=void 0;let K2=(0,ee.__importStar)(MY);K1.zipObjects=function(e,t){return[...new Set(Object.keys(e||{}).concat(Object.keys(t||{})))].reduce((n,r)=>{let i=null==e?void 0:e[r],o=null==t?void 0:t[r];return{...n,[r]:{left:i,right:o}}},{})},K1.isNotEmpty=function(e){return!!Object.keys(e).length},K1.withOptionals=function(e,t){return{...e,...t.reduce((e,[t,n])=>n?{...e,[t]:n}:e,{})}};let K6=K2.record(K2.string,K2.unknown);K1.isObject=function(e){return(0,j8.isRight)(K6.decode(e))},K1.mapValues=function(e,t){return Object.entries(e).reduce((e,[n,r])=>({...e,[n]:t(r,n)}),{})},Object.defineProperty(KJ,"__esModule",{value:!0}),KJ.Objects=KJ.Arrays=KJ.HexaColorCode=void 0,KJ.HexaColorCode=(0,ee.__importStar)(K$),KJ.Arrays=(0,ee.__importStar)(K0),KJ.Objects=(0,ee.__importStar)(K1);var K5={};function K3(e,t){let n=Object.entries(KJ.Objects.zipObjects(e,t)).reduce((e,[t,n])=>{if(JSON.stringify(null==n?void 0:n.left)===JSON.stringify(null==n?void 0:n.right))return e;let r=(()=>{var e,t,r,i,o,a,u;if(!(!(null!=n&&n.left)&&!(null!=n&&n.right))){if(null!=n&&n.left&&!n.right)return{op:KG.DiffOperation.Removed};if(!(null!=n&&n.left)&&null!=n&&n.right){if((null===(e=n.right)||void 0===e?void 0:e.type)===L7.GroupFieldType){let e={...n.right,config:{...n.right.config,fields:{}}};return e.config.fields=K3(void 0,null===(t=n.right.config)||void 0===t?void 0:t.fields)||{},{op:KG.DiffOperation.Added,value:e}}return{op:KG.DiffOperation.Added,value:n.right}}if((null===(r=n.right)||void 0===r?void 0:r.type)===L7.GroupFieldType){let e={...n.right,config:{...n.right.config,fields:{}}};return e.config.fields=K3((null===(i=n.left)||void 0===i?void 0:i.type)===L7.GroupFieldType?null===(a=null===(o=n.left)||void 0===o?void 0:o.config)||void 0===a?void 0:a.fields:void 0,null===(u=n.right.config)||void 0===u?void 0:u.fields)||{},{op:KG.DiffOperation.Updated,value:e}}return{op:KG.DiffOperation.Updated,value:n.right}}})();return r?{...e,[t]:r}:e},{});return KJ.Objects.isNotEmpty(n)?n:void 0}Object.defineProperty(K5,"__esModule",{value:!0}),K5.VariationComparator=void 0,K5.VariationComparator={compare(e,t){if(e&&!t)return{op:KG.DiffOperation.Removed};if(!e&&t)return{op:KG.DiffOperation.Added,value:t};let n=Object.entries(KJ.Objects.zipObjects(e,t)).reduce((e,[t,n])=>"primary"===t||"items"===t||(null==n?void 0:n.left)===(null==n?void 0:n.right)?e:{...e,[t]:null==n?void 0:n.right},{}),r=K3(null==e?void 0:e.primary,null==t?void 0:t.primary),i=K3(null==e?void 0:e.items,null==t?void 0:t.items),o={...n,...r?{primary:r}:{},...i?{items:i}:{}};if(KJ.Objects.isNotEmpty(o))return{op:KG.DiffOperation.Updated,value:o}}},Object.defineProperty(KZ,"__esModule",{value:!0}),KZ.SliceComparator=void 0,KZ.SliceComparator={compare(e,t){if(!e&&t)return{op:KG.DiffOperation.Added,value:t};if(e&&!t)return{op:KG.DiffOperation.Removed};let n=Object.entries(KJ.Objects.zipObjects(e,t)).reduce((e,[t,n])=>"variations"===t||(null==n?void 0:n.left)===(null==n?void 0:n.right)?e:{...e,[t]:null==n?void 0:n.right},{}),r=Object.entries(KJ.Objects.zipObjects(e&&KJ.Arrays.toRecord(e.variations,e=>e.id),t&&KJ.Arrays.toRecord(t.variations,e=>e.id))).reduce((e,[t,n])=>{if(!n)return e;let r=K5.VariationComparator.compare(n.left,n.right);return r?{...e,[t]:r}:e},{}),i={...n,...KJ.Objects.isNotEmpty(r)?{variations:r}:{}};if(KJ.Objects.isNotEmpty(i))return{op:KG.DiffOperation.Updated,value:i}}};var K9={};Object.defineProperty(K9,"__esModule",{value:!0}),Object.defineProperty(KH,"__esModule",{value:!0}),(0,ee.__exportStar)(KG,KH),(0,ee.__exportStar)(KZ,KH),(0,ee.__exportStar)(K5,KH),(0,ee.__exportStar)(K9,KH);var K4={},K8={};Bb=D&&D.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(K8,"__esModule",{value:!0}),K8.ImageConstraint=void 0,Object.defineProperty(K8,"ImageConstraint",{enumerable:!0,get:function(){return Bb(Ku).default}});var K7={},Be={};Object.defineProperty(Be,"__esModule",{value:!0});var Bt={};Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.SlicesTypes=void 0;let Bn=(0,ee.__importStar)(MY);Bt.SlicesTypes=Bn.keyof({[KU.CompositeSliceType]:null,[KB.SharedSliceType]:null}),Object.defineProperty(K7,"__esModule",{value:!0}),(0,ee.__exportStar)(KU,K7),(0,ee.__exportStar)(KL,K7),(0,ee.__exportStar)(KB,K7),(0,ee.__exportStar)(KD,K7),(0,ee.__exportStar)(Be,K7),(0,ee.__exportStar)(KP,K7),(0,ee.__exportStar)(KM,K7),(0,ee.__exportStar)(Bt,K7),Object.defineProperty(K4,"__esModule",{value:!0}),(0,ee.__exportStar)(L7,K4),(0,ee.__exportStar)(KF,K4),(0,ee.__exportStar)(K8,K4),(0,ee.__exportStar)(K7,K4),(0,ee.__exportStar)(Kq,K4),(0,ee.__exportStar)(L8,K4),Object.defineProperty(Ly,"__esModule",{value:!0}),(0,ee.__exportStar)(Lv,Ly),(0,ee.__exportStar)(KH,Ly),(0,ee.__exportStar)(L4,Ly),(0,ee.__exportStar)(K4,Ly);var Br,Bi,Bo,Ba,Bu,Bs,Bl,Bc,Bd,Bf,Bp,BA,Bh,Bm,Bg,By,Bv,Bx,Bb,BC,BS,Bw,BI,B_,BT={},Bk={},BO={};function BR(){if(B_)return BO;B_=1,Object.defineProperty(BO,"__esModule",{value:!0}),BO.hasContentType=BO.hasFieldContentType=void 0;let e=Wi();function t(e){return"object"==typeof e&&null!==e&&"__TYPE__"in e}return BO.hasFieldContentType=function(n){return t(n)&&n.__TYPE__===e.FieldContentType&&(null==n?void 0:n.type)!==void 0&&"string"==typeof n.type&&(0,j8.isRight)(e.FieldType.decode(n.type))},BO.hasContentType=t,BO}function BE(){return BL||(BL=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmptyContent=e.EmptyLegacy=e.isEmptyContent=e.EmptyContentType=void 0;let t=(0,ee.__importStar)(MY),n=BR();e.EmptyContentType="EmptyContent",e.isEmptyContent=t=>(0,n.hasContentType)(t)&&t.__TYPE__===e.EmptyContentType;let r=t.union([t.null,t.type({value:t.null})]);e.EmptyLegacy=n=>new t.Type("EmptyLegacy",e.isEmptyContent,t=>(0,Ft.pipe)(r.decode(t),j4.either.map(()=>({type:n,__TYPE__:e.EmptyContentType}))),()=>null),e.EmptyContent=t.strict({type:t.string,__TYPE__:t.literal(e.EmptyContentType)})}(Bk)),Bk}var Bj={},BF={};Object.defineProperty(BF,"__esModule",{value:!0}),BF.defaultCtx=BF.getFieldCtx=BF.LegacyContentCtx=BF.FieldOrSliceType=void 0;let BM=(0,ee.__importStar)(MY);BF.FieldOrSliceType=BM.union([K4.FieldType,K4.SlicesTypes]);class BU{constructor(e,t,n){Object.defineProperty(this,"fieldKey",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"prefixedKey",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"keyOfType",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"fieldPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"fieldType",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"allTypes",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.fieldKey=e,this.fieldPath=t||[],this.allTypes=n||new Map;let r=Array.of(this.fieldPath,[this.fieldKey]).flat().join(".");this.prefixedKey=r,this.keyOfType=`${r}_TYPE`,this.fieldType=this.allTypes.get(this.prefixedKey)}}BF.LegacyContentCtx=BU,BF.getFieldCtx=function(e,t,n){return new BU(e,[...t.fieldPath,t.fieldKey,...n||[]],t.allTypes)},BF.defaultCtx=function(e,t=new Map){return new BU(e,[],t)};var BL,BK,BB={},BP={};function BW(){return BK||(BK=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BooleanContentDefaultValue=e.BooleanContent=e.BooleanLegacy=e.isBooleanContent=e.BooleanContentType=void 0;let t=(0,ee.__importStar)(MY),n=BR();e.BooleanContentType="BooleanContent",e.isBooleanContent=t=>(0,n.hasContentType)(t)&&t.__TYPE__===e.BooleanContentType,e.BooleanLegacy=n=>new t.Type("BooleanLegacy",e.isBooleanContent,n=>(0,Ft.pipe)(t.boolean.decode(n),j4.either.map(t=>e.BooleanContent.encode({value:t,__TYPE__:e.BooleanContentType}))),e=>({content:e.value,types:{[n.keyOfType]:"Boolean"}})),e.BooleanContent=t.strict({__TYPE__:t.literal(e.BooleanContentType),value:t.boolean}),e.BooleanContentDefaultValue=t=>{var n;return(null===(n=t.config)||void 0===n?void 0:n.default_value)!==void 0?{__TYPE__:e.BooleanContentType,value:t.config.default_value||!1}:void 0}}(BP)),BP}var BD,BN={};function Bq(){return BD||(BD=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmbedContent=e.EmbedLegacy=e.EmbedContentLegacy=e.isEmbedContent=e.EmbedContentType=void 0;let t=(0,ee.__importStar)(MY),n=L9(),r=BR();e.EmbedContentType="EmbedContent",e.isEmbedContent=t=>(0,r.hasContentType)(t)&&t.__TYPE__===e.EmbedContentType,e.EmbedContentLegacy=t.exact(t.intersection([t.type({embed_url:t.string,type:t.string}),t.partial({version:t.union([t.string,t.number,t.null]),title:n.StringOrNull,author_name:n.StringOrNull,author_url:n.StringOrNull,provider_name:n.StringOrNull,provider_url:n.StringOrNull,cache_age:t.union([t.string,t.number,t.null]),thumbnail_url:n.StringOrNull,thumbnail_width:n.NumberOrNull,thumbnail_height:n.NumberOrNull,html:n.StringOrNull})])),e.EmbedLegacy=n=>new t.Type("EmbedLegacy",e.isEmbedContent,t=>(0,Ft.pipe)(e.EmbedContentLegacy.decode(t),j4.either.map(n=>({...n,all:t,__TYPE__:e.EmbedContentType}))),e=>({content:e.all,types:{[n.keyOfType]:"Embed"}})),e.EmbedContent=t.intersection([e.EmbedContentLegacy,t.strict({__TYPE__:t.literal(e.EmbedContentType),all:t.unknown})])}(BN)),BN}var BQ={},BV={},Bz={};Object.defineProperty(Bz,"__esModule",{value:!0});let BY=(0,ee.__importStar)(MY);Bz.default=new BY.Type("TrimmedString",BY.string.is,(e,t)=>(0,M0.pipe)(BY.string.validate(e,t),(0,LU.chain)(e=>BY.success(function(e){let t=0;for(;t<e.length&&e[t]<=" ";)t++;let n=e.length;for(;t<n&&e[n-1]<=" ";)n--;return e.substring(t,n)}(e)))),e=>e);var BH={};function BG(){return BZ||(BZ=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ColorContent=e.ColorLegacy=e.isColorContent=void 0;let t=(0,ee.__importStar)(MY),n=(0,ee.__importDefault)(Bz),r=BR();e.isColorContent=e=>(0,r.hasContentType)(e)&&e.__TYPE__===BH.FieldContentType&&(0,r.hasFieldContentType)(e)&&"Color"===e.type,e.ColorLegacy=r=>new t.Type("ColorLegacy",e.isColorContent,t=>(0,Ft.pipe)(n.default.decode(t),j4.either.map(t=>e.ColorContent.encode({value:t,type:K4.ColorFieldType,__TYPE__:BH.FieldContentType}))),e=>({content:e.value,types:{[r.keyOfType]:K4.ColorFieldType}})),e.ColorContent=t.strict({type:t.literal(K4.ColorFieldType),value:n.default,__TYPE__:t.literal(BH.FieldContentType)})}(BV)),BV}Object.defineProperty(BH,"__esModule",{value:!0}),BH.FieldContentType=void 0,BH.FieldContentType="FieldContent";var BZ,BJ,B$={};function BX(){return BJ||(BJ=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DateContent=e.DateLegacy=e.isDateContent=void 0;let t=(0,ee.__importStar)(MY),n=(0,ee.__importDefault)(Bz),r=BR();e.isDateContent=e=>(0,r.hasContentType)(e)&&e.__TYPE__===BH.FieldContentType&&(0,r.hasFieldContentType)(e)&&"Date"===e.type,e.DateLegacy=r=>new t.Type("DateLegacy",e.isDateContent,t=>(0,Ft.pipe)(n.default.decode(t),j4.either.map(t=>e.DateContent.encode({value:t,type:K4.DateFieldType,__TYPE__:BH.FieldContentType}))),e=>({content:e.value,types:{[r.keyOfType]:K4.DateFieldType}})),e.DateContent=t.strict({type:t.literal(K4.DateFieldType),value:n.default,__TYPE__:t.literal(BH.FieldContentType)})}(B$)),B$}var B0,B1={};function B2(){return B0||(B0=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NumberContent=e.NumberLegacy=e.isNumberContent=void 0;let t=(0,ee.__importStar)(MY),n=(0,ee.__importDefault)(Bz),r=BR();e.isNumberContent=e=>(0,r.hasContentType)(e)&&e.__TYPE__===BH.FieldContentType&&(0,r.hasFieldContentType)(e)&&"Number"===e.type,e.NumberLegacy=r=>new t.Type("NumberLegacy",e.isNumberContent,t=>(0,Ft.pipe)(n.default.decode(t),j4.either.map(t=>e.NumberContent.encode({value:t,type:K4.NumberFieldType,__TYPE__:BH.FieldContentType}))),e=>({content:e.value,types:{[r.keyOfType]:K4.NumberFieldType}})),e.NumberContent=t.strict({type:t.literal(K4.NumberFieldType),value:n.default,__TYPE__:t.literal(BH.FieldContentType)})}(B1)),B1}var B6,B5={};function B3(){return B6||(B6=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RangeContent=e.RangeLegacy=e.isRangeContent=void 0;let t=(0,ee.__importStar)(MY),n=(0,ee.__importDefault)(Bz),r=BR();e.isRangeContent=e=>(0,r.hasContentType)(e)&&e.__TYPE__===BH.FieldContentType&&(0,r.hasFieldContentType)(e)&&"Range"===e.type,e.RangeLegacy=r=>new t.Type("RangeLegacy",e.isRangeContent,t=>(0,Ft.pipe)(n.default.decode(t),j4.either.map(t=>e.RangeContent.encode({value:t,type:K4.RangeFieldType,__TYPE__:BH.FieldContentType}))),e=>({content:e.value,types:{[r.keyOfType]:K4.RangeFieldType}})),e.RangeContent=t.strict({type:t.literal(K4.RangeFieldType),value:n.default,__TYPE__:t.literal(BH.FieldContentType)})}(B5)),B5}var B9,B4={};function B8(){return B9||(B9=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SelectContentDefaultValue=e.SelectContent=e.SelectLegacy=e.isSelectContent=void 0;let t=(0,ee.__importStar)(MY),n=(0,ee.__importDefault)(Bz),r=BR();e.isSelectContent=e=>(0,r.hasContentType)(e)&&e.__TYPE__===BH.FieldContentType&&(0,r.hasFieldContentType)(e)&&"Select"===e.type,e.SelectLegacy=r=>new t.Type("SelectLegacy",e.isSelectContent,t=>(0,Ft.pipe)(n.default.decode(t),j4.either.map(t=>e.SelectContent.encode({value:t,type:K4.SelectFieldType,__TYPE__:BH.FieldContentType}))),e=>({content:e.value,types:{[r.keyOfType]:K4.SelectFieldType}})),e.SelectContent=t.strict({type:t.literal(K4.SelectFieldType),value:n.default,__TYPE__:t.literal(BH.FieldContentType)}),e.SelectContentDefaultValue=e=>{var t;return!(null===(t=e.config)||void 0===t)&&t.default_value?{__TYPE__:BH.FieldContentType,type:K4.SelectFieldType,value:e.config.default_value||""}:void 0}}(B4)),B4}var B7,Pe={};function Pt(){return B7||(B7=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TextContent=e.TextLegacy=e.isTextContent=void 0;let t=(0,ee.__importStar)(MY),n=(0,ee.__importDefault)(Bz),r=BR();e.isTextContent=e=>(0,r.hasContentType)(e)&&e.__TYPE__===BH.FieldContentType&&(0,r.hasFieldContentType)(e)&&"Text"===e.type,e.TextLegacy=r=>new t.Type("TextLegacy",e.isTextContent,t=>(0,Ft.pipe)(n.default.decode(t),j4.either.map(t=>e.TextContent.encode({value:t,type:K4.TextFieldType,__TYPE__:BH.FieldContentType}))),e=>({content:e.value,types:{[r.keyOfType]:K4.TextFieldType}})),e.TextContent=t.strict({type:t.literal(K4.TextFieldType),value:n.default,__TYPE__:t.literal(BH.FieldContentType)})}(Pe)),Pe}var Pn,Pr={};function Pi(){return Pn||(Pn=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TimestampContent=e.TimestampLegacy=e.isTimestampContent=void 0;let t=(0,ee.__importStar)(MY),n=(0,ee.__importDefault)(Bz),r=BR();e.isTimestampContent=e=>(0,r.hasContentType)(e)&&e.__TYPE__===BH.FieldContentType&&(0,r.hasFieldContentType)(e)&&"Timestamp"===e.type,e.TimestampLegacy=r=>new t.Type("TimestampLegacy",e.isTimestampContent,t=>(0,Ft.pipe)(n.default.decode(t),j4.either.map(t=>e.TimestampContent.encode({value:t,type:K4.TimestampFieldType,__TYPE__:BH.FieldContentType}))),e=>({content:e.value,types:{[r.keyOfType]:K4.TimestampFieldType}})),e.TimestampContent=t.strict({type:t.literal(K4.TimestampFieldType),value:n.default,__TYPE__:t.literal(BH.FieldContentType)})}(Pr)),Pr}function Po(){return Pa||(Pa=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FieldContent=e.FieldType=void 0;let t=(0,ee.__importStar)(MY),n=BG(),r=BX(),i=B2(),o=B3(),a=B8(),u=Pt(),s=Pi();e.FieldType=t.keyof({Text:null,Date:null,Timestamp:null,Color:null,Number:null,Range:null,Select:null}),e.FieldContent=t.union([r.DateContent,n.ColorContent,i.NumberContent,o.RangeContent,a.SelectContent,u.TextContent,s.TimestampContent]),(0,ee.__exportStar)(BG(),e),(0,ee.__exportStar)(BH,e),(0,ee.__exportStar)(BX(),e),(0,ee.__exportStar)(B2(),e),(0,ee.__exportStar)(B3(),e),(0,ee.__exportStar)(B8(),e),(0,ee.__exportStar)(Pt(),e),(0,ee.__exportStar)(Pi(),e)}(BQ)),BQ}var Pa,Pu,Ps={};function Pl(){return Pu||(Pu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.GeoPointContent=e.GeoPointLegacy=e.isGeoPointContent=e.GeoPointContentType=void 0;let t=(0,ee.__importStar)(MY),n=BR();e.GeoPointContentType="GeoPointContent",e.isGeoPointContent=t=>(0,n.hasContentType)(t)&&t.__TYPE__===e.GeoPointContentType;let r=t.strict({position:t.strict({lat:t.number,lng:t.number})});e.GeoPointLegacy=n=>new t.Type("GeoPointLegacy",e.isGeoPointContent,t=>(0,M0.pipe)(r.decode(t),j4.either.map(t=>e.GeoPointContent.encode({...t,__TYPE__:e.GeoPointContentType}))),e=>({content:{position:e.position},types:{[n.keyOfType]:"GeoPoint"}})),e.GeoPointContent=t.intersection([r,t.strict({__TYPE__:t.literal(e.GeoPointContentType)})])}(Ps)),Ps}var Pc,Pd={};function Pf(){return Pc||(Pc=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ImageContent=e.ImageLegacy=e.ImageContentView=e.isImageContent=e.ImageContentType=void 0;let t=(0,ee.__importStar)(MY),n=L9(),r=BR();e.ImageContentType="ImageContent",e.isImageContent=t=>(0,r.hasContentType)(t)&&t.__TYPE__===e.ImageContentType;let i=t.exact(t.type({id:t.string,url:t.string,width:t.number,height:t.number}));e.ImageContentView=t.exact(t.intersection([t.type({origin:i,width:t.number,height:t.number,edit:t.type({zoom:t.number,crop:t.type({x:t.number,y:t.number}),background:t.string})}),t.partial({url:t.string,credits:n.NonEmptyStringOrNull,alt:n.NonEmptyStringOrNull,provider:n.StringOrNull})]));let o=t.intersection([e.ImageContentView,t.partial({thumbnails:t.record(t.string,e.ImageContentView)})]);e.ImageLegacy=n=>new t.Type("ImageLegacy",e.isImageContent,t=>(0,Ft.pipe)(o.decode(t),j4.either.map(t=>e.ImageContent.encode({...t,__TYPE__:e.ImageContentType}))),e=>({content:(0,K1.withOptionals)({edit:e.edit,height:e.height,origin:e.origin,width:e.width},[["alt",e.alt],["credits",e.credits],["provider",e.provider],["thumbnails",e.thumbnails],["url",e.url]]),types:{[n.keyOfType]:"Image"}})),e.ImageContent=t.intersection([o,t.strict({__TYPE__:t.literal(e.ImageContentType)})])}(Pd)),Pd}var Pp,PA={};function Ph(){return Pp||(Pp=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.IntegrationFieldContent=e.IntegrationFieldLegacy=e.isIntegrationFieldContent=e.IntegrationFieldContentType=void 0;let t=(0,ee.__importStar)(MY),n=BR();e.IntegrationFieldContentType="IntegrationFieldsContent",e.isIntegrationFieldContent=t=>(0,n.hasContentType)(t)&&t.__TYPE__===e.IntegrationFieldContentType,e.IntegrationFieldLegacy=n=>new t.Type("IntegrationFieldLegacy",e.isIntegrationFieldContent,n=>(0,Ft.pipe)(t.string.decode(n),j4.either.map(t=>e.IntegrationFieldContent.encode({value:t,__TYPE__:e.IntegrationFieldContentType}))),e=>({content:e.value,types:{[n.keyOfType]:"IntegrationFields"}})),e.IntegrationFieldContent=t.strict({__TYPE__:t.literal(e.IntegrationFieldContentType),value:t.string})}(PA)),PA}var Pm,Pg={};function Py(){return Pm||(Pm=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FilledLinkContent=e.FilledLink=e.FilledLinkContentLegacy=e.FilledLinkLegacy=e.isFilledLinkContent=e.LinkContent=e.Link=e.LinkContentLegacy=e.LinkLegacy=e.isLinkContent=e.LinkContentType=e.AnyLinkContent=e.AnyLinkType=e.ExternalLinkContent=e.FilledExternalLinkContent=e.ExternalLinkType=e.DocumentLinkContent=e.FilledDocumentLinkContent=e.DocumentLinkType=e.MediaLinkContent=e.MediaLinkType=e.FileLinkContent=e.FilledFileLinkContent=e.FileLinkType=e.ImageLinkContent=e.FilledImageLinkContent=e.ImageLinkType=void 0;let t=(0,ee.__importStar)(MY),n=L9(),r=BR();e.ImageLinkType="ImageLink";let i=t.intersection([t.strict({kind:t.string,id:t.string,url:t.string,height:t.string,width:t.string,size:t.string,name:t.string}),t.exact(t.partial({date:n.StringOrNull}))]),o=new t.Type("FilledImageLink",t=>(0,r.hasContentType)(t)&&t.__TYPE__===e.ImageLinkType,t=>(0,Ft.pipe)(i.decode(t),j4.either.map(t=>e.FilledImageLinkContent.encode({...t,__TYPE__:e.ImageLinkType}))),e=>i.encode(e));e.FilledImageLinkContent=t.intersection([t.strict({__TYPE__:t.literal(e.ImageLinkType)}),i]);let a=t.union([t.intersection([i,t.exact(t.partial({text:t.string}))]),t.strict({kind:t.literal("image"),text:t.string})]),u=new t.Type("ImageLink",t=>(0,r.hasContentType)(t)&&t.__TYPE__===e.ImageLinkType,t=>(0,Ft.pipe)(a.decode(t),j4.either.map(t=>e.ImageLinkContent.encode({...t,__TYPE__:e.ImageLinkType}))),e=>a.encode(e));e.ImageLinkContent=t.intersection([t.strict({__TYPE__:t.literal(e.ImageLinkType)}),a]),e.FileLinkType="FileLink";let s=t.exact(t.intersection([t.type({kind:t.string,id:t.string,url:t.string,name:t.string,size:(0,Lp.withFallback)(t.string,"0")}),t.partial({date:n.StringOrNull})])),l=new t.Type("FilledFileLink",t=>(0,r.hasContentType)(t)&&t.__TYPE__===e.FileLinkType,t=>(0,Ft.pipe)(s.decode(t),j4.either.map(t=>e.FilledFileLinkContent.encode({...t,__TYPE__:e.FileLinkType}))),e=>s.encode(e));e.FilledFileLinkContent=t.intersection([t.strict({__TYPE__:t.literal(e.FileLinkType)}),s]);let c=t.union([t.intersection([s,t.exact(t.partial({text:t.string}))]),t.strict({kind:t.literal("file"),text:t.string})]),d=new t.Type("FileLink",t=>(0,r.hasContentType)(t)&&t.__TYPE__===e.FileLinkType,t=>(0,Ft.pipe)(c.decode(t),j4.either.map(t=>e.FileLinkContent.encode({...t,__TYPE__:e.FileLinkType}))),e=>c.encode(e));e.FileLinkContent=t.intersection([t.strict({__TYPE__:t.literal(e.FileLinkType)}),c]),e.MediaLinkType="MediaLink";let f=t.strict({kind:t.literal("media"),text:t.string}),p=new t.Type("MediaLink",t=>(0,r.hasContentType)(t)&&t.__TYPE__===e.MediaLinkType,t=>(0,Ft.pipe)(f.decode(t),j4.either.map(t=>e.MediaLinkContent.encode({...t,__TYPE__:e.MediaLinkType}))),e=>f.encode(e));e.MediaLinkContent=t.intersection([t.strict({__TYPE__:t.literal(e.MediaLinkType)}),f]),e.DocumentLinkType="DocumentLink";let A=t.strict({id:n.NonEmptyString}),h=new t.Type("FilledDocumentLink",t=>(0,r.hasContentType)(t)&&t.__TYPE__===e.DocumentLinkType,t=>(0,Ft.pipe)(A.decode(t),j4.either.map(t=>e.FilledDocumentLinkContent.encode({...t,__TYPE__:e.DocumentLinkType}))),e=>A.encode(e));e.FilledDocumentLinkContent=t.intersection([t.strict({__TYPE__:t.literal(e.DocumentLinkType)}),A]);let m=t.union([t.intersection([A,t.exact(t.partial({text:t.string}))]),t.strict({kind:t.literal("document"),text:t.string})]),g=new t.Type("DocumentLink",t=>(0,r.hasContentType)(t)&&t.__TYPE__===e.DocumentLinkType,t=>(0,Ft.pipe)(m.decode(t),j4.either.map(t=>e.DocumentLinkContent.encode({...t,__TYPE__:e.DocumentLinkType}))),e=>m.encode(e));e.DocumentLinkContent=t.intersection([t.strict({__TYPE__:t.literal(e.DocumentLinkType)}),m]),e.ExternalLinkType="ExternalLink";let y=t.exact(t.intersection([t.type({url:t.string}),t.partial({kind:t.literal("web"),target:n.StringOrNull,preview:(0,MX.nullable)(t.partial({title:t.string}))})])),v=new t.Type("FilledExternalLink",t=>(0,r.hasContentType)(t)&&t.__TYPE__===e.ExternalLinkType,t=>(0,Ft.pipe)(y.decode(t),j4.either.map(t=>e.FilledExternalLinkContent.encode({...t,__TYPE__:e.ExternalLinkType}))),e=>y.encode(e));e.FilledExternalLinkContent=t.intersection([t.strict({__TYPE__:t.literal(e.ExternalLinkType)}),y]);let x=t.union([t.intersection([y,t.exact(t.partial({text:t.string}))]),t.strict({kind:t.literal("web"),text:t.string})]),b=new t.Type("ExternalLink",t=>(0,r.hasContentType)(t)&&t.__TYPE__===e.ExternalLinkType,t=>(0,Ft.pipe)(x.decode(t),j4.either.map(t=>e.ExternalLinkContent.encode({...t,__TYPE__:e.ExternalLinkType}))),e=>x.encode(e));e.ExternalLinkContent=t.intersection([t.strict({__TYPE__:t.literal(e.ExternalLinkType)}),x]),e.AnyLinkType="AnyLink";let C=t.strict({text:t.string}),S=new t.Type("AnyLink",t=>(0,r.hasContentType)(t)&&t.__TYPE__===e.AnyLinkType,t=>(0,Ft.pipe)(C.decode(t),j4.either.map(t=>e.AnyLinkContent.encode({...t,__TYPE__:e.AnyLinkType}))),e=>C.encode(e));e.AnyLinkContent=t.intersection([t.strict({__TYPE__:t.literal(e.AnyLinkType)}),C]),e.LinkContentType="LinkContent",e.isLinkContent=t=>(0,r.hasContentType)(t)&&t.__TYPE__===e.LinkContentType,e.LinkLegacy=t.union([u,d,g,b,p,S]),e.LinkContentLegacy=n=>new t.Type("LinkLegacy",e.isLinkContent,t=>(0,Ft.pipe)(e.LinkLegacy.decode(t),j4.either.map(t=>e.LinkContent.encode({value:t,__TYPE__:e.LinkContentType}))),t=>({content:e.LinkLegacy.encode(t.value),types:{[n.keyOfType]:"Link"}})),e.Link=t.union([e.ImageLinkContent,e.FileLinkContent,e.DocumentLinkContent,e.ExternalLinkContent,e.MediaLinkContent,e.AnyLinkContent]),e.LinkContent=t.strict({__TYPE__:t.literal(e.LinkContentType),value:e.Link}),e.isFilledLinkContent=t=>(0,r.hasContentType)(t)&&t.__TYPE__===e.LinkContentType,e.FilledLinkLegacy=t.union([o,l,h,v]),e.FilledLinkContentLegacy=n=>new t.Type("FilledLinkLegacy",e.isFilledLinkContent,t=>(0,Ft.pipe)(e.FilledLinkLegacy.decode(t),j4.either.map(t=>e.FilledLinkContent.encode({value:t,__TYPE__:e.LinkContentType}))),t=>({content:e.FilledLinkLegacy.encode(t.value),types:{[n.keyOfType]:"Link"}})),e.FilledLink=t.union([e.FilledImageLinkContent,e.FilledFileLinkContent,e.FilledDocumentLinkContent,e.FilledExternalLinkContent]),e.FilledLinkContent=t.strict({__TYPE__:t.literal(e.LinkContentType),value:e.FilledLink})}(Pg)),Pg}var Pv,Px={},Pb={},PC={};function PS(){return Pv||(Pv=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Block=e.BlockLegacy=e.TextBlock=e.checkEmbedBlock=e.EmbedBlock=e.checkImageBlock=e.ImageBlock=e.ValidatedSpans=e.SpanLegacy=e.Span=void 0;let t=(0,ee.__importStar)(MY),n=L9(),r=Bq(),i=Pf(),o=Py(),a=e=>t.strict({data:e,start:t.number,end:t.number,type:t.literal(KF.RichTextNodeType.hyperlink)}),u=t.strict({data:(0,Lp.withFallback)(t.string,""),start:t.number,end:t.number,type:t.literal("label")}),s=t.strict({start:t.number,end:t.number,type:t.keyof({[KF.RichTextNodeType.strong]:null,[KF.RichTextNodeType.em]:null,"list-item":null})});e.Span=t.union([a(o.FilledLink),u,s]),e.SpanLegacy=t.union([a(o.FilledLinkLegacy),u,s]),e.ValidatedSpans=e=>new t.Type("ValidatedSpans",t=>Array.isArray(t)&&t.every(e.is),(n,r)=>{if(!Array.isArray(n))return t.failure(n,r);{let r=n.reduce((t,n)=>{let r=e.decode(n);return(0,j8.isLeft)(r)?t:[...t,r.right]},[]).sort((e,t)=>e.start-t.start);return t.success(r)}},t=>t.reduce((t,n)=>[...t,e.encode(n)],[]));let l=e=>t.exact(t.intersection([t.type({type:t.literal(KF.RichTextNodeType.image),data:t.intersection([i.ImageContentView,t.partial({linkTo:(0,MX.nullable)(e)})])}),t.partial({label:n.StringOrNull,direction:n.StringOrNull})]));e.ImageBlock=l(o.FilledLink);let c=l(o.FilledLinkLegacy);e.checkImageBlock=function(e){return e.type===KF.RichTextNodeType.image};let d=t.exact(t.intersection([t.type({type:t.literal(KF.RichTextNodeType.embed),data:t.unknown}),t.partial({label:n.StringOrNull,direction:n.StringOrNull})])),f=new t.Type("EmbedBlockLegacy",e=>"embed"===e.type,t=>(0,Ft.pipe)(d.decode(t),j4.either.chain(e=>j4.either.map(t=>[e,t])(r.EmbedContentLegacy.decode(e.data))),j4.either.map(([t,n])=>e.EmbedBlock.encode({...t,data:{...n,__TYPE__:r.EmbedContentType,all:t.data}}))),e=>({...d.encode(e),data:r.EmbedContentLegacy.encode(e.data)}));e.EmbedBlock=t.exact(t.intersection([t.type({type:t.literal(KF.RichTextNodeType.embed),data:r.EmbedContent}),t.partial({label:n.StringOrNull,direction:n.StringOrNull})])),e.checkEmbedBlock=function(e){return e.type===KF.RichTextNodeType.embed};let p=n=>t.exact(t.intersection([t.type({type:(0,MX.refineType)(KF.RichTextNodeTypeCodec,`string which isn't ${KF.RichTextNodeType.image} ${KF.RichTextNodeType.embed}`,e=>e!==KF.RichTextNodeType.image&&e!==KF.RichTextNodeType.embed),content:t.intersection([t.type({text:t.string}),t.partial({spans:(0,e.ValidatedSpans)(n)})])}),t.partial({label:t.string,direction:t.string})]));e.TextBlock=p(e.Span);let A=p(e.SpanLegacy),h=t.union([f,c,A]);e.BlockLegacy=new t.Type("BlockLegacy",e=>f.is(e)||c.is(e)||A.is(e),e=>h.decode(e),t=>e.ImageBlock.is(t)?c.encode(t):e.EmbedBlock.is(t)?f.encode(t):A.encode(t)),e.Block=t.union([e.ImageBlock,e.EmbedBlock,e.TextBlock])}(PC)),PC}function Pw(){return PI||(PI=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RichTextLegacy=e.RichTextContent=e.isRichTextContent=e.RichTextContentType=void 0;let t=(0,ee.__importStar)(MY),n=BR(),r=PS();e.RichTextContentType="StructuredTextContent",e.isRichTextContent=t=>(0,n.hasContentType)(t)&&t.__TYPE__===e.RichTextContentType;let i=t.array(r.BlockLegacy);e.RichTextContent=t.strict({__TYPE__:t.literal(e.RichTextContentType),value:t.array(r.Block)}),(0,ee.__exportStar)(PS(),e),e.RichTextLegacy=n=>new t.Type("RichTextLegacy",e.isRichTextContent,t=>(0,Ft.pipe)(i.decode(t),j4.either.map(t=>({value:t,__TYPE__:e.RichTextContentType}))),e=>({content:i.encode(e.value),types:{[n.keyOfType]:"StructuredText"}}))}(Pb)),Pb}var PI,P_,PT={};function Pk(){return P_||(P_=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SeparatorContent=e.SeparatorLegacy=e.isSeparatorContent=e.SeparatorContentType=void 0;let t=(0,ee.__importStar)(MY),n=BR();e.SeparatorContentType="SeparatorContent",e.isSeparatorContent=t=>(0,n.hasContentType)(t)&&t.__TYPE__===e.SeparatorContentType,e.SeparatorLegacy=n=>new t.Type("SeparatorLegacy",e.isSeparatorContent,()=>t.success(e.SeparatorContent.encode({__TYPE__:e.SeparatorContentType})),()=>({content:{},types:{[n.keyOfType]:"Separator"}})),e.SeparatorContent=t.strict({__TYPE__:t.literal(e.SeparatorContentType)})}(PT)),PT}function PO(){return PE||(PE=1,Object.defineProperty(BB,"__esModule",{value:!0}),(0,ee.__exportStar)(BW(),BB),(0,ee.__exportStar)(Bq(),BB),(0,ee.__exportStar)(Po(),BB),(0,ee.__exportStar)(Pl(),BB),(0,ee.__exportStar)(Pf(),BB),(0,ee.__exportStar)(Ph(),BB),(0,ee.__exportStar)(Py(),BB),(0,ee.__exportStar)(function(){if(PR)return Px;PR=1,Object.defineProperty(Px,"__esModule",{value:!0}),Px.NestableLegacy=Px.isNestableContent=Px.NestableContentDefaultValue=Px.NestableContent=void 0;let e=(0,ee.__importStar)(MY),t=BE(),n=BW(),r=Bq(),i=Po(),o=Pl(),a=Pf(),u=Ph(),s=Py(),l=Pw(),c=Pk();return Px.NestableContent=e.union([t.EmptyContent,n.BooleanContent,r.EmbedContent,i.TextContent,i.TimestampContent,i.SelectContent,i.RangeContent,i.NumberContent,i.DateContent,i.ColorContent,o.GeoPointContent,a.ImageContent,u.IntegrationFieldContent,s.LinkContent,l.RichTextContent,c.SeparatorContent]),Px.NestableContentDefaultValue=e=>{switch(e.type){case"Boolean":return(0,n.BooleanContentDefaultValue)(e);case"Select":return(0,i.SelectContentDefaultValue)(e);default:return}},Px.isNestableContent=e=>(0,i.isTextContent)(e)||(0,i.isColorContent)(e)||(0,i.isDateContent)(e)||(0,i.isTimestampContent)(e)||(0,i.isNumberContent)(e)||(0,i.isRangeContent)(e)||(0,i.isSelectContent)(e)||(0,o.isGeoPointContent)(e)||(0,l.isRichTextContent)(e)||(0,n.isBooleanContent)(e)||(0,r.isEmbedContent)(e)||(0,a.isImageContent)(e)||(0,u.isIntegrationFieldContent)(e)||(0,s.isLinkContent)(e)||(0,c.isSeparatorContent)(e)||(0,t.isEmptyContent)(e),Px.NestableLegacy=e=>({decode(d){if(!e.fieldType)return;let f=(0,t.EmptyLegacy)(e.fieldType).decode(d);if((0,j8.isRight)(f))return f;let p=(()=>{switch(e.fieldType){case"Text":return(0,i.TextLegacy)(e);case"Color":return(0,i.ColorLegacy)(e);case"Date":return(0,i.DateLegacy)(e);case"Timestamp":return(0,i.TimestampLegacy)(e);case"Number":return(0,i.NumberLegacy)(e);case"Range":return(0,i.RangeLegacy)(e);case"Select":return(0,i.SelectLegacy)(e);case"GeoPoint":return(0,o.GeoPointLegacy)(e);case"StructuredText":return(0,l.RichTextLegacy)(e);case"Boolean":return(0,n.BooleanLegacy)(e);case"Embed":return(0,r.EmbedLegacy)(e);case"Image":return(0,a.ImageLegacy)(e);case"IntegrationFields":return(0,u.IntegrationFieldLegacy)(e);case"Link":return(0,s.LinkContentLegacy)(e);case"Separator":return(0,c.SeparatorLegacy)(e);default:return}})();if(p)return p.decode(d)},encode(t){switch(t.__TYPE__){case BH.FieldContentType:return"Text"===t.type?(0,i.TextLegacy)(e).encode(t):"Color"===t.type?(0,i.ColorLegacy)(e).encode(t):"Range"===t.type?(0,i.RangeLegacy)(e).encode(t):"Date"===t.type?(0,i.DateLegacy)(e).encode(t):"Number"===t.type?(0,i.NumberLegacy)(e).encode(t):"Timestamp"===t.type?(0,i.TimestampLegacy)(e).encode(t):"Select"===t.type?(0,i.SelectLegacy)(e).encode(t):void 0;case o.GeoPointContentType:return(0,o.GeoPointLegacy)(e).encode(t);case l.RichTextContentType:return(0,l.RichTextLegacy)(e).encode(t);case r.EmbedContentType:return(0,r.EmbedLegacy)(e).encode(t);case n.BooleanContentType:return(0,n.BooleanLegacy)(e).encode(t);case a.ImageContentType:return(0,a.ImageLegacy)(e).encode(t);case u.IntegrationFieldContentType:return(0,u.IntegrationFieldLegacy)(e).encode(t);case s.LinkContentType:return(0,s.LinkContentLegacy)(e).encode(t);case c.SeparatorContentType:return(0,c.SeparatorLegacy)(e).encode(t);default:return}}}),Px}(),BB),(0,ee.__exportStar)(Pw(),BB),(0,ee.__exportStar)(Pk(),BB)),BB}var PR,PE,Pj,PF={};function PM(){if(Pj)return PF;Pj=1,Object.defineProperty(PF,"__esModule",{value:!0}),PF.repeatableContentWithDefaultNestableContentValues=PF.withDefaultNestableContentValues=PF.withDefaultSlicePrimaryContentValues=void 0;let e=PU(),t=PO();return PF.withDefaultSlicePrimaryContentValues=function(n,r){for(let[i,o]of Object.entries(n)){let n=r[i];if(void 0===n){if(o.type===Ly.GroupFieldType)r[i]=(0,e.groupContentWithDefaultValues)(o,e.GroupContentDefaultValue);else{let e=(0,t.NestableContentDefaultValue)(o);e&&(r[i]=e)}continue}o.type===Ly.GroupFieldType&&(0,e.isGroupContent)(n)&&(r[i]=(0,e.groupContentWithDefaultValues)(o,n))}return r},PF.withDefaultNestableContentValues=function(e,n){return Object.entries(e).reduce((e,[r,i])=>{if(void 0===n[r]){let n=(0,t.NestableContentDefaultValue)(i);return void 0!==n?{...e,[r]:n}:e}return e},n)},PF.repeatableContentWithDefaultNestableContentValues=function(n,r){let i=Object.entries(n);return r.map(n=>i.reduce((r,[i,o])=>{var a;let u=n.value.find(([e])=>e===i);if("Group"===o.type){let t=(0,e.groupContentWithDefaultValues)(o,null!==(a=null==u?void 0:u[1])&&void 0!==a?a:{__TYPE__:e.GroupContentType,value:[]});return{...r,value:[...r.value.filter(([e])=>e!==i),...t?[[i,t]]:[]]}}if(!u){let e=(0,t.NestableContentDefaultValue)(o);return{...r,value:[...r.value,...e?[[i,e]]:[]]}}return r},n))},PF}function PU(){return PL||(PL=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.traverseGroupItemsContent=e.traverseGroupContent=e.groupContentWithDefaultValues=e.GroupLegacy=e.GroupItemLegacy=e.GroupContentDefaultValue=e.isGroupContent=e.GroupContent=e.GroupItemContent=e.GroupContentType=e.GroupItemContentType=void 0;let t=(0,ee.__importStar)(MY),n=BR(),r=PO(),i=PM();e.GroupItemContentType="GroupItemContent",e.GroupContentType="GroupContentType",e.GroupItemContent=t.recursion("GroupItemContent",()=>t.strict({__TYPE__:t.literal(e.GroupItemContentType),value:t.array(t.tuple([t.string,t.union([r.NestableContent,e.GroupContent])]))})),e.GroupContent=t.recursion("GroupContent",()=>t.strict({__TYPE__:t.literal(e.GroupContentType),value:t.array(e.GroupItemContent)})),e.isGroupContent=e.GroupContent.is,e.GroupContentDefaultValue={__TYPE__:e.GroupContentType,value:[]};let o=t.record(t.string,t.unknown);function a({path:e,key:t,apiId:n,model:r,content:i}){return o=>{var a;let s=u({path:e,model:null===(a=null==r?void 0:r.config)||void 0===a?void 0:a.fields,content:i.value})(o);return o({path:e,key:t,apiId:n,model:r,content:{__TYPE__:i.__TYPE__,value:s}})}}function u({path:t,model:n,content:i}){return o=>i.map((i,u)=>{let s=t.concat([{key:u.toString(),type:"GroupItem"}]),l=i.value.reduce((t,[i,u])=>{let l;let c=null==n?void 0:n[i];return(l=c&&(null==c?void 0:c.type)!==Ly.GroupFieldType||u.__TYPE__!==e.GroupContentType?o({path:s.concat([{key:i,type:"Widget"}]),key:i,apiId:i,model:c,content:u}):a({path:s.concat([{key:i,type:"Widget"}]),key:i,apiId:i,model:c,content:u})(o))&&((0,r.isNestableContent)(l)||(0,e.isGroupContent)(l))?t.concat([[i,l]]):t},[]);return{__TYPE__:i.__TYPE__,value:l}})}e.GroupItemLegacy=i=>new t.Type("GroupItemLegacy",t=>(0,n.hasContentType)(t)&&t.__TYPE__===e.GroupItemContentType,t=>(0,Ft.pipe)(o.decode(t),j4.either.map(t=>({value:Object.entries(t).reduce((t,[n,o])=>{let a=(0,BF.getFieldCtx)(n,i),u=a.fieldType===Ly.GroupFieldType?(0,e.GroupLegacy)(a).decode(o):(0,r.NestableLegacy)(a).decode(o);return!u||(0,j8.isLeft)(u)?t:[...t,[n,u.right]]},[]),__TYPE__:e.GroupItemContentType}))),t=>t.value.reduce((t,[n,o])=>{let a=(0,BF.getFieldCtx)(n,i),u=(0,e.isGroupContent)(o)?(0,e.GroupLegacy)(a).encode(o):(0,r.NestableLegacy)(a).encode(o);return u?{content:{...t.content,[n]:u.content},types:{...t.types,...u.types}}:t},{content:{},types:{}})),e.GroupLegacy=n=>{let r=t.array(t.union([t.null,(0,e.GroupItemLegacy)(n)])),i=t.array((0,e.GroupItemLegacy)(n));return new t.Type("GroupLegacy",e.isGroupContent,t=>(0,Ft.pipe)(r.decode(t),j4.either.map(t=>({value:t.map(t=>null===t?{__TYPE__:e.GroupItemContentType,value:[]}:t),__TYPE__:e.GroupContentType}))),e=>{let t=i.encode(e.value);return{content:t.map(e=>e.content),types:t.reduce((e,t)=>({...e,...t.types}),{[n.keyOfType]:Ly.GroupFieldType})}})},e.groupContentWithDefaultValues=function(e,t){var n;let r=null===(n=e.config)||void 0===n?void 0:n.fields;return r?{...t,value:(0,i.repeatableContentWithDefaultNestableContentValues)(r,t.value)}:t},e.traverseGroupContent=a,e.traverseGroupItemsContent=u}(Bj)),Bj}var PL,PK,PB={},PP={},PW={},PD={};function PN(){if(PK)return PD;PK=1,Object.defineProperty(PD,"__esModule",{value:!0}),PD.RepeatableWidgets=PD.RepeatableWidgetsLegacy=void 0;let e=(0,ee.__importStar)(MY),t=PU(),n=PO();PD.RepeatableWidgetsLegacy=n=>e.array((0,t.GroupItemLegacy)(n));let r=e.tuple([e.string,e.union([n.NestableContent,t.GroupContent])]),i=e.strict({__TYPE__:e.literal(t.GroupItemContentType),value:e.array(r)});return PD.RepeatableWidgets=e.array(i),PD}function Pq(){return PQ||(PQ=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.migrateCompositeSlice=e.traverseCompositeSliceContent=e.compositeSliceContentWithDefaultValues=e.CompositeSliceContent=e.CompositeSliceLegacy=e.isCompositeSliceContent=e.CompositeSliceContentType=void 0;let t=(0,ee.__importStar)(MY),n=BR(),r=PU(),i=PO(),o=PM(),a=PN();e.CompositeSliceContentType="CompositeSliceContent",e.isCompositeSliceContent=t=>(0,n.hasContentType)(t)&&t.__TYPE__===e.CompositeSliceContentType;let u=t.exact(t.partial({repeat:t.array(t.unknown),"non-repeat":t.UnknownRecord}));e.CompositeSliceLegacy=n=>new t.Type("CompositeSliceLegacy",e.isCompositeSliceContent,t=>(0,Ft.pipe)(u.decode(t),j4.either.map(t=>{let r=(()=>{let e=(0,BF.getFieldCtx)("repeat",n),r=(0,a.RepeatableWidgetsLegacy)(e).decode(t.repeat);if(!(!r||(0,j8.isLeft)(r)))return r.right})()||[];return{nonRepeat:Object.entries(t["non-repeat"]||{}).reduce((e,[t,r])=>{let o=(0,BF.getFieldCtx)(t,n,["non-repeat"]);if(!o)return e;let a=(0,i.NestableLegacy)(o).decode(r);return!a||(0,j8.isLeft)(a)?e:{...e,[t]:a.right}},{}),repeat:r,__TYPE__:e.CompositeSliceContentType}})),e=>{let t=Object.entries(e.nonRepeat).reduce((e,[t,r])=>{let o=(0,BF.getFieldCtx)(t,n,["non-repeat"]),a=(0,i.NestableLegacy)(o).encode(r);return a?{content:{...e.content,[t]:a.content},types:{...e.types,...a.types}}:e},{content:{},types:{}}),r=(()=>{let t=(0,BF.getFieldCtx)("repeat",n);return(0,a.RepeatableWidgetsLegacy)(t).encode(e.repeat)})()||[];return{content:{"non-repeat":t.content,repeat:r.map(e=>e.content)},types:{[n.keyOfType]:"Slice",...t.types,...r.reduce((e,t)=>({...e,...t.types}),{})}}}),e.CompositeSliceContent=t.strict({__TYPE__:t.literal(e.CompositeSliceContentType),nonRepeat:t.record(t.string,i.NestableContent),repeat:a.RepeatableWidgets}),e.compositeSliceContentWithDefaultValues=function(e,t){var n,r;let i=(0,o.withDefaultNestableContentValues)(null!==(n=e["non-repeat"])&&void 0!==n?n:{},t.nonRepeat),a=(0,o.repeatableContentWithDefaultNestableContentValues)(null!==(r=e.repeat)&&void 0!==r?r:{},t.repeat);return{...t,nonRepeat:i,repeat:a}},e.traverseCompositeSliceContent=function({path:e,sliceKey:t,sliceName:n,model:o,content:a}){return(u,s)=>{let l=Object.entries(a.widget.nonRepeat).reduce((r,[a,s])=>{var l,c,d;let f=(null==o?void 0:o.type)==="SharedSlice"?null===(c=null===(l=null==o?void 0:o.fields)||void 0===l?void 0:l.primary)||void 0===c?void 0:c[a]:null===(d=null==o?void 0:o["non-repeat"])||void 0===d?void 0:d[a],p=u({path:e.concat([{key:"non-repeat",type:"primary"},{key:a,type:"Widget"}]),key:a,apiId:n,model:f,content:s});return p?(0,i.isNestableContent)(p)?{...r,[a]:p}:(console.warn(`Warn: Non nestable content with key [${a}] detected in a composite slice [${n}] with key [${t}]`),r):r},{}),c=(0,r.traverseGroupItemsContent)({path:e.concat([{key:"repeat",type:"items"}]),model:(null==o?void 0:o.type)==="SharedSlice"?null==o?void 0:o.fields.items:null==o?void 0:o.repeat,content:a.widget.repeat})(u);return s({key:t,apiId:n,path:e,model:o,content:{...a,widget:{__TYPE__:"CompositeSliceContent",repeat:c,nonRepeat:l}}})}},e.migrateCompositeSlice=function(e,t){let[,n]=t.key.split("$");return{key:`${e.sliceName}$${n}`,name:e.sliceName,maybeLabel:t.maybeLabel,widget:{__TYPE__:"SharedSliceContent",variation:e.variationId,primary:Object.entries(t.widget.nonRepeat).reduce((n,[r,i])=>{var o;return!(null===(o=e.fields.primary)||void 0===o)&&o[r]?{...n,[r]:i}:(console.warn(`The widget ${r} in the non-repeat zone of the composite slice [${e.sliceName}] with key [${t.key}] doesn't exist in the model.`),n)},{}),items:t.widget.repeat.map(n=>({__TYPE__:"GroupItemContent",value:n.value.reduce((n,[r,i])=>{var o;return!(null===(o=e.fields.items)||void 0===o)&&o[r]?n.concat([[r,i]]):(console.warn(`The widget ${r} in the repeat zone of the composite slice [${e.sliceName}] with key [${t.key}] doesn't exist in the model.`),n)},[])}),[])}}}}(PW)),PW}var PQ,PV,Pz={},PY={};function PH(){if(PV)return PY;PV=1,Object.defineProperty(PY,"__esModule",{value:!0}),PY.isSlicePrimaryContent=PY.SlicePrimaryLegacy=PY.SlicePrimaryContent=void 0;let e=(0,ee.__importStar)(MY),t=PU(),n=PO();return PY.SlicePrimaryContent=e.union([n.NestableContent,t.GroupContent]),PY.SlicePrimaryLegacy=e=>{let r=(0,t.GroupLegacy)(e),i=(0,n.NestableLegacy)(e);return{decode:t=>e.fieldType===Ly.GroupFieldType?r.decode(t):i.decode(t),encode:e=>(0,t.isGroupContent)(e)?r.encode(e):i.encode(e)}},PY.isSlicePrimaryContent=e=>(0,n.isNestableContent)(e)||(0,t.isGroupContent)(e),PY}function PG(){return PZ||(PZ=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.traverseSharedSliceContent=e.sharedSliceContentWithDefaultValues=e.SharedSliceContent=e.SharedSliceLegacy=e.isSharedSliceContent=e.SharedSliceContentType=void 0;let t=(0,ee.__importStar)(MY),n=BR(),r=PU(),i=PO(),o=PM(),a=PN(),u=PH();e.SharedSliceContentType="SharedSliceContent",e.isSharedSliceContent=t=>(0,n.hasContentType)(t)&&t.__TYPE__===e.SharedSliceContentType;let s=t.exact(t.type({variation:t.string,items:(0,Lp.withFallback)(t.array(t.unknown),[]),primary:(0,Lp.withFallback)(t.UnknownRecord,{})}));e.SharedSliceLegacy=n=>new t.Type("SharedSliceLegacy",e.isSharedSliceContent,t=>(0,Ft.pipe)(s.decode(t),j4.either.map(t=>{let r=(()=>{let e=(0,BF.getFieldCtx)("items",n,["variations",t.variation]),r=(0,a.RepeatableWidgetsLegacy)(e).decode(t.items);if(!(!r||(0,j8.isLeft)(r)))return r.right})()||[],i=Object.entries(t.primary).reduce((e,[r,i])=>{let o=(0,BF.getFieldCtx)(r,n,["variations",t.variation,"primary"]),a=(0,u.SlicePrimaryLegacy)(o).decode(i);return!a||(0,j8.isLeft)(a)?e:{...e,[r]:a.right}},{});return{variation:t.variation,primary:i,items:r,__TYPE__:e.SharedSliceContentType}})),e=>{let t=Object.entries(e.primary).reduce((t,[r,i])=>{let o=(0,BF.getFieldCtx)(r,n,["variations",e.variation,"primary"]),a=(0,u.SlicePrimaryLegacy)(o).encode(i);return a?{content:{...t.content,[r]:a.content},types:{...t.types,...a.types}}:t},{content:{},types:{}}),r=(()=>{let t=(0,BF.getFieldCtx)("items",n,["variations",e.variation]);return(0,a.RepeatableWidgetsLegacy)(t).encode(e.items)})()||[];return{content:{primary:t.content,items:r.map(e=>e.content),variation:e.variation},types:{[n.keyOfType]:"SharedSlice",...t.types,...r.reduce((e,t)=>({...e,...t.types}),{})}}}),e.SharedSliceContent=t.strict({__TYPE__:t.literal(e.SharedSliceContentType),variation:t.string,primary:t.record(t.string,u.SlicePrimaryContent),items:a.RepeatableWidgets}),e.sharedSliceContentWithDefaultValues=function(e,t){var n,r;let i=e.variations.find(e=>e.id===t.variation),a=null!==(n=null==i?void 0:i.primary)&&void 0!==n?n:{},u=null!==(r=null==i?void 0:i.items)&&void 0!==r?r:{},s=(0,o.withDefaultSlicePrimaryContentValues)(a,t.primary),l=(0,o.repeatableContentWithDefaultNestableContentValues)(u,t.items);return{...t,primary:s,items:l}},e.traverseSharedSliceContent=function({path:e,sliceKey:t,sliceName:n,model:o,content:a}){return(s,l)=>{let c=Object.entries(a.widget.primary).reduce((a,[l,c])=>{var d,f;let p=null===(f=null===(d=null==o?void 0:o.fields)||void 0===d?void 0:d.primary)||void 0===f?void 0:f[l],A=(0,r.isGroupContent)(c)?(0,r.traverseGroupContent)({path:e.concat([{key:"primary",type:"primary"},{key:l,type:"Widget"}]),key:l,apiId:l,content:c,model:(null==p?void 0:p.type)===Ly.GroupFieldType?p:void 0})(s):(0,i.isNestableContent)(c)?s({path:e.concat([{key:"primary",type:"primary"},{key:l,type:"Widget"}]),key:l,apiId:l,model:p,content:c}):void 0;return A?((0,u.isSlicePrimaryContent)(A)||console.warn(`Warn: Non nestable or group content with key [${l}] detected in a shared slice [${n}] with key [${t}]`),{...a,[l]:A}):a},{}),d=(0,r.traverseGroupItemsContent)({path:e.concat([{key:"items",type:"items"}]),model:null==o?void 0:o.fields.items,content:a.widget.items})(s);return l({key:t,apiId:n,path:e,model:o,content:{...a,widget:{__TYPE__:"SharedSliceContent",variation:a.widget.variation,primary:c,items:d}}})}}}(Pz)),Pz}var PZ,PJ,P$={};function PX(){if(PJ)return P$;PJ=1,Object.defineProperty(P$,"__esModule",{value:!0}),P$.migrateSimpleSlice=P$.traverseSimpleSliceContent=P$.SimpleSliceLegacy=P$.isSimpleSliceContent=P$.SimpleSliceContent=void 0;let e=(0,ee.__importStar)(MY),t=PU(),n=PO();return P$.SimpleSliceContent=e.union([n.NestableContent,t.GroupContent]),P$.isSimpleSliceContent=e=>(0,n.isNestableContent)(e)||(0,t.isGroupContent)(e),P$.SimpleSliceLegacy=e=>({decode:"Group"===e.fieldType?(0,t.GroupLegacy)(e).decode.bind(null):(0,n.NestableLegacy)(e).decode.bind(null),encode:r=>"GroupContentType"===r.__TYPE__?(0,t.GroupLegacy)(e).encode(r):(0,n.NestableLegacy)(e).encode(r)}),P$.traverseSimpleSliceContent=function({path:e,sliceKey:n,sliceName:r,model:i,content:o}){return(a,u)=>{var s;if((0,t.isGroupContent)(o.widget)){let n=(0,t.traverseGroupContent)({path:e,key:o.key,apiId:o.name,model:(null==i?void 0:i.type)==="Group"?i:(null==i?void 0:i.type)==="SharedSlice"?{type:"Group",config:{fields:i.fields.items||{}}}:void 0,content:o.widget})(a);return n&&u({key:o.key,apiId:o.name,path:e,model:i,content:{...o,widget:n}})}let l=a({key:o.key,apiId:o.name,path:e,model:(null==i?void 0:i.type)==="SharedSlice"?null===(s=i.fields.primary)||void 0===s?void 0:s[o.name]:(null==i?void 0:i.type)!=="Group"?i:void 0,content:o.widget});return l&&u({key:n,apiId:r,path:e,model:i,content:{...o,widget:l}})}},P$.migrateSimpleSlice=function(e,t){var n;let[,r]=t.key.split("$"),i=`${e.sliceName}$${r}`;return"GroupContentType"===t.widget.__TYPE__?{key:i,name:e.sliceName,maybeLabel:t.maybeLabel,widget:{__TYPE__:"SharedSliceContent",variation:e.variationId,primary:{},items:t.widget.value.map(t=>({__TYPE__:"GroupItemContent",value:t.value.reduce((t,[n,r])=>{var i;return!(null===(i=e.fields.items)||void 0===i)&&i[n]?t.concat([[n,r]]):t},[])}),[])}}:{key:i,name:e.sliceName,maybeLabel:t.maybeLabel,widget:{__TYPE__:"SharedSliceContent",variation:e.variationId,primary:!(null===(n=e.fields.primary)||void 0===n)&&n[t.name]?{[t.name]:t.widget}:{},items:[]}}},P$}function P0(){return P1||(P1=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SliceContent=e.SliceLegacy=void 0;let t=(0,ee.__importStar)(MY),n=Pq(),r=PG(),i=PX();e.SliceLegacy=e=>({decode:t=>(()=>{switch(e.fieldType){case"Slice":return(0,n.CompositeSliceLegacy)(e);case"SharedSlice":return(0,r.SharedSliceLegacy)(e);default:return(0,i.SimpleSliceLegacy)(e)}})().decode(t),encode:t=>{switch(t.__TYPE__){case"SharedSliceContent":return(0,r.SharedSliceLegacy)(e).encode(t);case"CompositeSliceContent":return(0,n.CompositeSliceLegacy)(e).encode(t);default:return(0,i.SimpleSliceLegacy)(e).encode(t)}}}),e.SliceContent=t.union([n.CompositeSliceContent,r.SharedSliceContent,i.SimpleSliceContent]),(0,ee.__exportStar)(Pq(),e),(0,ee.__exportStar)(PG(),e),(0,ee.__exportStar)(PX(),e),(0,ee.__exportStar)(PH(),e)}(PP)),PP}var P1,P2,P6={};function P5(){if(P2)return P6;P2=1,Object.defineProperty(P6,"__esModule",{value:!0}),P6.migrateSliceItem=P6.SlicesItemLegacy=P6.sliceItemContentWithDefaultValues=P6.isSimpleSliceItemContent=P6.isCompositeSliceItemContent=P6.isSharedSliceItemContent=P6.SliceItemContent=void 0;let e=(0,ee.__importStar)(MY),t=PU(),n=PO(),r=PM(),i=P0(),o=Pq(),a=PG(),u=PX();function s(e){return(0,o.isCompositeSliceContent)(e.widget)}function l(e){return(0,t.isGroupContent)(e.widget)||(0,n.isNestableContent)(e.widget)}P6.SliceItemContent=e.type({key:e.string,name:e.string,maybeLabel:e.union([e.string,e.undefined]),widget:i.SliceContent}),P6.isSharedSliceItemContent=function(e){return(0,a.isSharedSliceContent)(e.widget)},P6.isCompositeSliceItemContent=s,P6.isSimpleSliceItemContent=l,P6.sliceItemContentWithDefaultValues=function(e,n){var u;if("SharedSlice"===e.type&&(0,a.isSharedSliceContent)(n))return(0,i.sharedSliceContentWithDefaultValues)(e,n);if("Slice"===e.type&&(0,o.isCompositeSliceContent)(n))return(0,i.compositeSliceContentWithDefaultValues)(e,n);if("Group"===e.type&&(0,t.isGroupContent)(n)&&!(null===(u=e.config)||void 0===u)&&u.fields){let t=(0,r.repeatableContentWithDefaultNestableContentValues)(e.config.fields,n.value);return{...n,value:t}}return n};let c=e.exact(e.intersection([e.type({key:e.string,value:e.unknown}),e.partial({label:(0,MX.nullable)(e.string)})]));return P6.SlicesItemLegacy=t=>new e.Type("SlicesItemLegacy",e=>((0,a.isSharedSliceContent)(e.widget),(0,o.isCompositeSliceContent)(e.widget),(0,u.isSimpleSliceContent)(e.widget)),(n,r)=>(0,Ft.pipe)(c.decode(n),j4.either.chain(o=>{var a;let u=o.key.indexOf("$"),s=o.key.substring(0,u>0?u:void 0),l=(0,BF.getFieldCtx)(s,t),c=(0,i.SliceLegacy)(l).decode(o.value);return!c||(0,j8.isLeft)(c)?e.failure(n,r):e.success({key:o.key,name:s,maybeLabel:null!==(a=o.label)&&void 0!==a?a:void 0,widget:c.right})})),e=>{let n=(0,BF.getFieldCtx)(e.name,t),r=(0,i.SliceLegacy)(n).encode(e.widget);return{content:{key:e.key,label:e.maybeLabel,value:(null==r?void 0:r.content)||{}},types:(null==r?void 0:r.types)||{}}}),P6.migrateSliceItem=({model:e,content:t})=>s(t)&&(null==e?void 0:e.type)==="SharedSlice"?(0,o.migrateCompositeSlice)(e,t):l(t)&&(null==e?void 0:e.type)==="SharedSlice"?(0,u.migrateSimpleSlice)(e,t):t,P6}var P3,P9={};function P4(){return P8||(P8=1,Object.defineProperty(PB,"__esModule",{value:!0}),(0,ee.__exportStar)(P0(),PB),(0,ee.__exportStar)(P5(),PB),(0,ee.__exportStar)((P3||(P3=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.traverseSlices=e.slicesContentWithDefaultValues=e.SlicesContent=e.SlicesLegacy=e.isSlicesContent=e.SlicesContentType=void 0;let t=(0,ee.__importStar)(MY),n=BR(),r=Pq(),i=PG(),o=PX(),a=P5();e.SlicesContentType="SliceContentType",e.isSlicesContent=t=>(0,n.hasContentType)(t)&&t.__TYPE__===e.SlicesContentType,e.SlicesLegacy=n=>{let r=t.array((0,a.SlicesItemLegacy)(n));return new t.Type("SlicesLegacy",e.isSlicesContent,t=>(0,Ft.pipe)(r.decode(t),j4.either.map(t=>({__TYPE__:e.SlicesContentType,value:t}))),e=>{let t=r.encode(e.value);return{content:t.map(e=>e.content),types:t.reduce((e,t)=>({...e,...t.types}),{[n.keyOfType]:"Slices"})}})},e.SlicesContent=t.type({__TYPE__:t.literal(e.SlicesContentType),value:t.array(a.SliceItemContent)}),e.slicesContentWithDefaultValues=function(e,t){var n;let r=null===(n=null==e?void 0:e.config)||void 0===n?void 0:n.choices;if(void 0===r)return t;let i=t.value.map(e=>{let t=r[e.name];if(t){let n=(0,a.sliceItemContentWithDefaultValues)(t,e.widget);return{...e,widget:n}}return e});return{...t,value:i}},e.traverseSlices=function({path:e,key:t,model:n,content:u}){return({transformWidget:s=({content:e})=>e,transformSlice:l=({content:e})=>e})=>{let c=u.value.reduce((t,u)=>{let c=n&&function(e,t,n){var r,i;let o=null===(i=null===(r=null==t?void 0:t.config)||void 0===r?void 0:r.choices)||void 0===i?void 0:i[n.name];return(()=>{if((0,a.isSharedSliceItemContent)(n)&&o&&(0,Ly.isStaticSharedSlice)(o)){let e=o.variations.find(e=>e.id===n.widget.variation);return e?{type:"SharedSlice",sliceName:o.id,variationId:e.id,fields:{primary:e.primary||{},items:e.items||{}}}:void 0}})()||(()=>{var r;let i=MH.ContentPath.append(MH.ContentPath.serialize(e),n.name),o=Object.values((null===(r=null==t?void 0:t.config)||void 0===r?void 0:r.choices)||{}).find(e=>{var t;return!!(0,Ly.isStaticSharedSlice)(e)&&!!(!(null===(t=e.legacyPaths)||void 0===t)&&t[i])});if(!o)return;let a=null==o?void 0:o.variations.find(e=>{var t;return e.id===(null===(t=o.legacyPaths)||void 0===t?void 0:t[i])});if(a)return{type:"SharedSlice",sliceName:o.id,variationId:a.id,fields:{primary:a.primary||{},items:a.items||{}}}})()||(()=>{if(o){if((0,Ly.isCompositeSlice)(o))return{type:"Slice","non-repeat":o["non-repeat"]||{},repeat:o.repeat||{}};if((0,Ly.isLegacySlice)(o))return o}})()}(e,n,u),d=(0,a.isSharedSliceItemContent)(u)?(0,i.traverseSharedSliceContent)({path:e.concat({key:u.key,type:"SharedSlice"}),sliceKey:u.key,sliceName:u.name,model:(null==c?void 0:c.type)==="SharedSlice"?c:void 0,content:u})(s,l):(0,a.isCompositeSliceItemContent)(u)?(0,r.traverseCompositeSliceContent)({path:e.concat({key:u.key,type:"Slice"}),sliceKey:u.key,sliceName:u.name,model:(null==c?void 0:c.type)==="Slice"||(null==c?void 0:c.type)==="SharedSlice"?c:void 0,content:u})(s,l):(0,a.isSimpleSliceItemContent)(u)?(0,o.traverseSimpleSliceContent)({path:e.concat({key:u.key,type:"LegacySlice"}),sliceKey:u.key,sliceName:u.name,model:c&&(null==c?void 0:c.type)!=="Slice"?c:void 0,content:u})(s,l):void 0;return d?t.concat(d):t},[]);return s({path:e,key:t,apiId:t,model:n,content:{__TYPE__:u.__TYPE__,value:c}})}}}(P9)),P9),PB)),PB}var P8,P7,We={};function Wt(){return P7||(P7=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.UIDContent=e.UIDLegacy=e.isUIDContent=e.UIDContentType=void 0;let t=(0,ee.__importStar)(MY),n=BR();e.UIDContentType="UIDContent",e.isUIDContent=t=>(0,n.hasContentType)(t)&&t.__TYPE__===e.UIDContentType,e.UIDLegacy=n=>new t.Type("UIDLegacy",e.isUIDContent,n=>(0,Ft.pipe)(t.string.decode(n),j4.either.map(t=>e.UIDContent.encode({value:t,__TYPE__:e.UIDContentType}))),e=>({content:e.value,types:{[n.keyOfType]:"UID"}})),e.UIDContent=t.type({__TYPE__:t.literal(e.UIDContentType),value:t.string})}(We)),We}var Wn,Wr={};function Wi(){return h||(h=1,Object.defineProperty(BT,"__esModule",{value:!0}),(0,ee.__exportStar)(BE(),BT),(0,ee.__exportStar)(PU(),BT),(0,ee.__exportStar)(PO(),BT),(0,ee.__exportStar)(P4(),BT),(0,ee.__exportStar)(Wt(),BT),(0,ee.__exportStar)(function(){if(Wn)return Wr;Wn=1,Object.defineProperty(Wr,"__esModule",{value:!0}),Wr.WidgetLegacy=Wr.isWidgetContent=Wr.WidgetContent=void 0;let e=(0,ee.__importStar)(MY),t=PU(),n=PO(),r=P4(),i=Wt();return Wr.WidgetContent=e.union([t.GroupContent,n.NestableContent,i.UIDContent,r.SlicesContent]),Wr.isWidgetContent=e=>(0,t.isGroupContent)(e)||(0,n.isNestableContent)(e)||(0,i.isUIDContent)(e)||(0,r.isSlicesContent)(e),Wr.WidgetLegacy=e=>({decode(o){if(!e.fieldType)return;let a=(()=>{switch(e.fieldType){case"UID":return(0,i.UIDLegacy)(e);case"Group":return(0,t.GroupLegacy)(e);case"Choice":case"Slices":return(0,r.SlicesLegacy)(e);default:return(0,n.NestableLegacy)(e)}})();if(a)return a.decode(o)},encode(o){switch(o.__TYPE__){case i.UIDContentType:return(0,i.UIDLegacy)(e).encode(o);case t.GroupContentType:return(0,t.GroupLegacy)(e).encode(o);case r.SlicesContentType:return(0,r.SlicesLegacy)(e).encode(o);default:return(0,n.NestableLegacy)(e).encode(o)}}}),Wr}(),BT)),BT}Object.defineProperty(et,"__esModule",{value:!0}),et.migrateDocument=et.collectWidgets=et.traverseDocument=et.fillDocumentWithDefaultValues=et.DocumentLegacy=et.Document=void 0;let Wo=(0,ee.__importStar)(MY),Wa=Wi();et.Document=Wo.record(MG.WidgetKey,Wa.WidgetContent);let Wu=Wo.record(MG.WidgetKey,Wo.unknown),Ws=e=>new Wo.Type("Document",e=>!!e&&"object"==typeof e,t=>(0,Ft.pipe)(Wu.decode(t),j4.either.map(t=>Object.entries(t).reduce((t,[n,r])=>{let i=(0,BF.defaultCtx)(n,e),o=(0,Wa.WidgetLegacy)(i).decode(r);return!o||(0,j8.isLeft)(o)?t:{...t,[n]:o.right}},{}))),t=>Object.entries(t).reduce((t,[n,r])=>{let i=(0,BF.defaultCtx)(n,e),o=(0,Wa.WidgetLegacy)(i).encode(r);return o?{content:{...t.content,[n]:o.content},types:{...t.types,...o.types}}:t},{content:{},types:{}}));function Wl(e){let{types:t,widgets:n}=Object.entries(e).reduce((e,[t,n])=>{if(t.endsWith("_TYPE")){let r=BF.FieldOrSliceType.decode(n);if((0,j8.isRight)(r))return{...e,types:e.types.set(t.substring(0,t.length-5),r.right)}}return t.endsWith("_POSITION")||t.endsWith("_TYPE")?e:{...e,widgets:{...e.widgets,[t]:n}}},{types:new Map,widgets:{}}),r=e.slugs_INTERNAL||[];return{widgets:n,types:t,uid:e.uid,slugs:r}}function Wc(e){return{customTypeId:null==e?void 0:e.id,fields:Object.fromEntries((0,Ly.flattenSections)(e))}}function Wd({document:e,customType:t}){let n=t&&Ly.StaticCustomType.is(t)?Wc(t):t;return({transformWidget:t=({content:e})=>e,transformSlice:r=({content:e})=>e})=>{let i=n&&Object.entries(n.fields).reduce((e,[t,n])=>({...e,[t]:n}),{});return Object.entries(e).reduce((e,[o,a])=>{let u=i&&i[o],s=MH.ContentPath.make([{key:null==n?void 0:n.customTypeId,type:"CustomType"},{key:o,type:"Widget"}]),l=(()=>{switch(a.__TYPE__){case"SliceContentType":return(0,Wa.traverseSlices)({path:s,key:o,model:(null==u?void 0:u.type)==="Slices"||(null==u?void 0:u.type)==="Choice"?u:void 0,content:a})({transformWidget:t,transformSlice:r});case"GroupContentType":return(0,Wa.traverseGroupContent)({path:s,key:o,apiId:o,model:(null==u?void 0:u.type)==="Group"?u:void 0,content:a})(t);default:return t({path:s,key:o,apiId:o,model:(null==u?void 0:u.type)!=="Group"&&(null==u?void 0:u.type)!=="Slices"&&(null==u?void 0:u.type)!=="Choice"?u:void 0,content:a})}})();return{...e,...l?{[o]:l}:{}}},{})}}function Wf(e,t){let n=Ly.StaticCustomType.is(t)?Wc(t):t;return Object.values((0,Ly.collectSharedSlices)(n)).some(e=>!!e.legacyPaths)?Wd({document:e,customType:t})({transformSlice:Wa.migrateSliceItem}):e}et.DocumentLegacy={_codec:Ws,extractMetadata:Wl,parse:function(e,t){let n=(0,Ft.pipe)(Wo.record(MG.WidgetKey,Wo.unknown).decode(e),j4.either.chain(e=>{let{types:t,widgets:n}=Wl(e);return Ws(t).decode(n)}));return(0,j8.isLeft)(n)?void 0:Wf(n.right,t)},encode:function(e){let t=Ws().encode(e);return{...t.content,...t.types}}},et.fillDocumentWithDefaultValues=function(e,t){let{fields:n}=e&&Ly.StaticCustomType.is(e)?Wc(e):e;return Object.entries(n).reduce((e,[n,r])=>{let i=t[n],o=(()=>{switch(r.type){case"Group":return(0,Wa.isGroupContent)(i)?(0,Wa.groupContentWithDefaultValues)(r,i):i;case"Choice":case"Slices":return(0,Wa.isSlicesContent)(i)?(0,Wa.slicesContentWithDefaultValues)(r,i):i;default:return void 0===i&&Ly.NestableWidget.is(r)?(0,Wa.NestableContentDefaultValue)(r):i}})();return o?{...e,[n]:o}:e},t)},et.traverseDocument=Wd,et.collectWidgets=function(e,t){let n={};return Wd({document:e})({transformWidget:({content:e,path:r})=>{let i=MH.ContentPath.serialize(r);return t(e,r)&&(n[i]=e),e}}),n},et.migrateDocument=Wf,Object.defineProperty(z,"__esModule",{value:!0}),(0,ee.__exportStar)(et,z),(0,ee.__exportStar)(Wi(),z),(0,ee.__exportStar)(BF,z);let Wp={unclassified:{title:"Draft",color:"amber"},published:{title:"Live",color:"green"},release:{title:"Planned",color:"purple"},archived:{title:"Archived",color:"grey"}},WA={unclassified:["unclassified","published"],archived:["unclassified","published"],release:["release","published"],published:["published"]};function Wh(e){let{documentId:t,versionId:n,baseUrl:r,status:i,releaseId:o}=e,a=new URLSearchParams((0,w.aO)({params:{s:i,v:n,r:o}})).toString();return new URL(`pages/${t}?${a}`,r)}C.createContext((i=!1,{clearReset:()=>{i=!1},reset:()=>{i=!0},isReset:()=>i}));let Wm="media-library-newMediaLibraryFeaturesBannerClosed";function Wg(e){let{maxWidth:t}=e,[n,r]=(0,C.useState)(()=>!(F.Xb.isAvailable()&&F.Xb.read(Wm)));return n?V.jsx(S.xu,{justifyContent:"center",padding:{inline:16,block:12},backgroundColor:"purple9",children:V.jsxs(S.xu,{maxWidth:t,width:"100%",alignItems:"center",gap:8,children:[V.jsx(S.J$,{color:"purple",name:"autoFixHigh",size:"extraSmall",variant:"solid"}),V.jsxs("div",{children:[V.jsx(S.xv,{color:"white",variant:"bold",children:"New features on the Media Library now available!"}),V.jsxs(S.xu,{gap:4,flexWrap:"wrap",children:[V.jsx(S.xv,{color:"white",children:"Media Tagging, Filtering, Improved Search & Bulk Deletion"}),V.jsx(S.xv,{color:"white",variant:"bold",href:"https://prismic.io/lp/new-media-library",target:"_blank",rel:"noopener noreferrer",underline:!0,children:"Find out More →"})]})]}),V.jsx(S.zx,{invisible:!0,color:"white",sx:{marginLeft:"auto",marginBottom:"auto",flexShrink:0},underline:!0,onClick:function(){r(!1),F.Xb.isAvailable()&&F.Xb.write(Wm,String(Date.now()))},children:"Close"})]})}):null}let Wy=(0,C.createContext)(void 0),Wv={selectedIds:new Set,excludedIds:new Set,isAllSelected:!1};function Wx(e){let{children:t,initialState:n,initialTotalItemCount:r,isSelectAllEnabled:i=!1}=e,o=(0,C.useRef)(),a=(0,C.useRef)(r||0),[u,s]=(0,C.useState)(function(){if(n&&n.selectedIds){let e=[...n.selectedIds].pop();e&&(o.current=e)}return{...Wv,...n}}),l=(0,C.useMemo)(()=>{let{selectedIds:e,excludedIds:t,isAllSelected:n}=u;return n?a.current-t.size:e.size},[u]),c=(0,C.useCallback)(e=>{let{isAllSelected:t,selectedIds:n,excludedIds:r}=u;return t?!r.has(e):n.has(e)},[u]),d=(0,C.useCallback)(()=>{let{isAllSelected:e,selectedIds:t,excludedIds:n}=u;return{selectedIds:[...t],excludedIds:[...n],isAllSelected:e,selectedCount:l}},[u,l]),f=(0,_.R9)(()=>{i&&s({isAllSelected:!0,selectedIds:new Set,excludedIds:new Set})}),p=(0,_.R9)(()=>{s({isAllSelected:!1,selectedIds:new Set,excludedIds:new Set})});(0,C.useEffect)(()=>{let{isAllSelected:e,selectedIds:t,excludedIds:n}=u,r=a.current;if(!(0===r||!i)){if(e&&n.size===r){p();return}if(!e&&t.size===r){f();return}}},[u,i,f,p]);let A=(0,_.R9)(e=>{let{id:t,isSingleSelection:n,metaKey:r,shiftKey:i,ids:a}=e;return i&&a&&a.length>0&&o.current?function(e,t,n){let r=function(e,t,n){let r=e.indexOf(t),i=e.indexOf(n);if(-1===r||-1===i)throw Error("Both startValue and endValue must be in the array");return r<=i?e.slice(r,i+1):e.slice(i,r+1)}(t,n,e),i=c(e);return i?g(r):m(r),i}(t,a,o.current):n&&!r?c(t)&&1===l?s(e=>({...e,selectedIds:new Set})):s({isAllSelected:!1,selectedIds:new Set([t]),excludedIds:new Set}):c(t)?g([t]):m([t]),o.current=t,c(t)}),h=(0,_.R9)(()=>{l>0?p():f()});function m(e){let{isAllSelected:t}=u;if(t){s(t=>({...t,excludedIds:WC(t.excludedIds,e)}));return}s(t=>({...t,selectedIds:WS(t.selectedIds,e)}))}function g(e){let{isAllSelected:t}=u;if(t){s(t=>({...t,excludedIds:WS(t.excludedIds,e)}));return}s(t=>({...t,selectedIds:WC(t.selectedIds,e)}))}function y(e){a.current=e}let v=(0,C.useMemo)(()=>({selectedCount:l,state:u,totalItemCount:a.current,isSelected:c,isSelectAllEnabled:i,getSelectionState:d,toggleSelection:A,toggleSelectAll:h,clearSelection:p,setTotalItemCount:y}),[u,p,d,i,c,l,h,A]);return V.jsx(Wy.Provider,{value:v,children:t})}function Wb(e){let t=(0,C.useContext)(Wy);if(void 0===t)throw Error("useSelectionManagerContext must be used within a SelectionManagerProvider");let{totalItemCount:n,onChangeSelection:r}=e||{},{setTotalItemCount:i,totalItemCount:o,state:a,getSelectionState:u,...s}=t;void 0!==n&&n!==o&&i(n);let l=(0,_.R9)(r);return(0,C.useEffect)(()=>{null==l||l(u())},[u,l,a]),{...s,getSelectionState:u,isAllSelected:a.isAllSelected}}function WC(e,t){let n=new Set(e);return t.forEach(e=>n.delete(e)),n}function WS(e,t){return new Set([...e,...t])}let Ww=(0,C.createContext)(void 0);function WI(){let e=(0,C.useContext)(Ww);if(!e)throw Error("Missing EditorConfigContext.Provider");return e}class W_ extends Error{}function WT(e){throw new W_(`Missing EditorConfig.${e}`)}(u=m||(m={})).assertEqual=e=>e,u.assertIs=function(e){},u.assertNever=function(e){throw Error()},u.arrayToEnum=e=>{let t={};for(let n of e)t[n]=n;return t},u.getValidEnumValues=e=>{let t=u.objectKeys(e).filter(t=>"number"!=typeof e[e[t]]),n={};for(let r of t)n[r]=e[r];return u.objectValues(n)},u.objectValues=e=>u.objectKeys(e).map(function(t){return e[t]}),u.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{let t=[];for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},u.find=(e,t)=>{for(let n of e)if(t(n))return n},u.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e,u.joinValues=function(e,t=" | "){return e.map(e=>"string"==typeof e?`'${e}'`:e).join(t)},u.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t,(g||(g={})).mergeShapes=(e,t)=>({...e,...t});let Wk=m.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),WO=e=>{switch(typeof e){case"undefined":return Wk.undefined;case"string":return Wk.string;case"number":return isNaN(e)?Wk.nan:Wk.number;case"boolean":return Wk.boolean;case"function":return Wk.function;case"bigint":return Wk.bigint;case"symbol":return Wk.symbol;case"object":return Array.isArray(e)?Wk.array:null===e?Wk.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?Wk.promise:"u">typeof Map&&e instanceof Map?Wk.map:"u">typeof Set&&e instanceof Set?Wk.set:"u">typeof Date&&e instanceof Date?Wk.date:Wk.object;default:return Wk.unknown}},WR=m.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class WE extends Error{constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){let t=e||function(e){return e.message},n={_errors:[]},r=e=>{for(let i of e.issues)if("invalid_union"===i.code)i.unionErrors.map(r);else if("invalid_return_type"===i.code)r(i.returnTypeError);else if("invalid_arguments"===i.code)r(i.argumentsError);else if(0===i.path.length)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(this),n}toString(){return this.message}get message(){return JSON.stringify(this.issues,m.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){let t={},n=[];for(let r of this.issues)r.path.length>0?(t[r.path[0]]=t[r.path[0]]||[],t[r.path[0]].push(e(r))):n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}}WE.create=e=>new WE(e);let Wj=(e,t)=>{let n;switch(e.code){case WR.invalid_type:n=e.received===Wk.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case WR.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,m.jsonStringifyReplacer)}`;break;case WR.unrecognized_keys:n=`Unrecognized key(s) in object: ${m.joinValues(e.keys,", ")}`;break;case WR.invalid_union:n="Invalid input";break;case WR.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${m.joinValues(e.options)}`;break;case WR.invalid_enum_value:n=`Invalid enum value. Expected ${m.joinValues(e.options)}, received '${e.received}'`;break;case WR.invalid_arguments:n="Invalid function arguments";break;case WR.invalid_return_type:n="Invalid function return type";break;case WR.invalid_date:n="Invalid date";break;case WR.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:m.assertNever(e.validation):n="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case WR.too_small:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case WR.too_big:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case WR.custom:n="Invalid input";break;case WR.invalid_intersection_types:n="Intersection results could not be merged";break;case WR.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case WR.not_finite:n="Number must be finite";break;default:n=t.defaultError,m.assertNever(e)}return{message:n}},WF=Wj;function WM(){return WF}let WU=e=>{let{data:t,path:n,errorMaps:r,issueData:i}=e,o=[...n,...i.path||[]],a={...i,path:o},u="";for(let e of r.filter(e=>!!e).slice().reverse())u=e(a,{data:t,defaultError:u}).message;return{...i,path:o,message:i.message||u}};function WL(e,t){let n=WU({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,WM(),Wj].filter(e=>!!e)});e.common.issues.push(n)}class WK{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){let n=[];for(let r of t){if("aborted"===r.status)return WB;"dirty"===r.status&&e.dirty(),n.push(r.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,t){let n=[];for(let e of t)n.push({key:await e.key,value:await e.value});return WK.mergeObjectSync(e,n)}static mergeObjectSync(e,t){let n={};for(let r of t){let{key:t,value:i}=r;if("aborted"===t.status||"aborted"===i.status)return WB;"dirty"===t.status&&e.dirty(),"dirty"===i.status&&e.dirty(),("u">typeof i.value||r.alwaysSet)&&(n[t.value]=i.value)}return{status:e.value,value:n}}}let WB=Object.freeze({status:"aborted"}),WP=e=>({status:"dirty",value:e}),WW=e=>({status:"valid",value:e}),WD=e=>"aborted"===e.status,WN=e=>"dirty"===e.status,Wq=e=>"valid"===e.status,WQ=e=>"u">typeof Promise&&e instanceof Promise;(s=y||(y={})).errToObj=e=>"string"==typeof e?{message:e}:e||{},s.toString=e=>"string"==typeof e?e:null==e?void 0:e.message;class WV{constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}let Wz=(e,t)=>{if(Wq(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let t=new WE(e.common.issues);return this._error=t,this._error}}};function WY(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:i}:{errorMap:(e,t)=>"invalid_type"!==e.code?{message:t.defaultError}:typeof t.data>"u"?{message:r??t.defaultError}:{message:n??t.defaultError},description:i}}class WH{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return WO(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:WO(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new WK,ctx:{common:e.parent.common,data:e.data,parsedType:WO(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(WQ(t))throw Error("Synchronous parse encountered promise.");return t}_parseAsync(e){return Promise.resolve(this._parse(e))}parse(e,t){let n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){var n;let r={common:{issues:[],async:null!==(n=null==t?void 0:t.async)&&void 0!==n&&n,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:WO(e)},i=this._parseSync({data:e,path:r.path,parent:r});return Wz(r,i)}async parseAsync(e,t){let n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){let n={common:{issues:[],contextualErrorMap:null==t?void 0:t.errorMap,async:!0},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:WO(e)},r=this._parse({data:e,path:n.path,parent:n});return Wz(n,await (WQ(r)?r:Promise.resolve(r)))}refine(e,t){let n=e=>"string"==typeof t||typeof t>"u"?{message:t}:"function"==typeof t?t(e):t;return this._refinement((t,r)=>{let i=e(t),o=()=>r.addIssue({code:WR.custom,...n(t)});return"u">typeof Promise&&i instanceof Promise?i.then(e=>!!e||(o(),!1)):!!i||(o(),!1)})}refinement(e,t){return this._refinement((n,r)=>!!e(n)||(r.addIssue("function"==typeof t?t(n,r):t),!1))}_refinement(e){return new DS({schema:this,typeName:v.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Dw.create(this,this._def)}nullable(){return DI.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Da.create(this,this._def)}promise(){return DC.create(this,this._def)}or(e){return Ds.create([this,e],this._def)}and(e){return Dd.create(this,e,this._def)}transform(e){return new DS({...WY(this._def),schema:this,typeName:v.ZodEffects,effect:{type:"transform",transform:e}})}default(e){return new D_({...WY(this._def),innerType:this,defaultValue:"function"==typeof e?e:()=>e,typeName:v.ZodDefault})}brand(){return new DR({typeName:v.ZodBranded,type:this,...WY(this._def)})}catch(e){return new DT({...WY(this._def),innerType:this,catchValue:"function"==typeof e?e:()=>e,typeName:v.ZodCatch})}describe(e){return new this.constructor({...this._def,description:e})}pipe(e){return DE.create(this,e)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}let WG=/^c[^\s-]{8,}$/i,WZ=/^[a-z][a-z0-9]*$/,WJ=/[0-9A-HJKMNP-TV-Z]{26}/,W$=/^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i,WX=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\])|(\[IPv6:(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))\])|([A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])*(\.[A-Za-z]{2,})+))$/,W0=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u"),W1=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,W2=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,W6=e=>e.precision?e.offset?RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`):0===e.precision?e.offset?RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):e.offset?RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");class W5 extends WH{constructor(){super(...arguments),this._regex=(e,t,n)=>this.refinement(t=>e.test(t),{validation:t,code:WR.invalid_string,...y.errToObj(n)}),this.nonempty=e=>this.min(1,y.errToObj(e)),this.trim=()=>new W5({...this._def,checks:[...this._def.checks,{kind:"trim"}]}),this.toLowerCase=()=>new W5({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]}),this.toUpperCase=()=>new W5({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}_parse(e){let t;if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==Wk.string){let t=this._getOrReturnCtx(e);return WL(t,{code:WR.invalid_type,expected:Wk.string,received:t.parsedType}),WB}let n=new WK;for(let o of this._def.checks)if("min"===o.kind)e.data.length<o.value&&(WL(t=this._getOrReturnCtx(e,t),{code:WR.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if("max"===o.kind)e.data.length>o.value&&(WL(t=this._getOrReturnCtx(e,t),{code:WR.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if("length"===o.kind){let r=e.data.length>o.value,i=e.data.length<o.value;(r||i)&&(t=this._getOrReturnCtx(e,t),r?WL(t,{code:WR.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):i&&WL(t,{code:WR.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),n.dirty())}else if("email"===o.kind)WX.test(e.data)||(WL(t=this._getOrReturnCtx(e,t),{validation:"email",code:WR.invalid_string,message:o.message}),n.dirty());else if("emoji"===o.kind)W0.test(e.data)||(WL(t=this._getOrReturnCtx(e,t),{validation:"emoji",code:WR.invalid_string,message:o.message}),n.dirty());else if("uuid"===o.kind)W$.test(e.data)||(WL(t=this._getOrReturnCtx(e,t),{validation:"uuid",code:WR.invalid_string,message:o.message}),n.dirty());else if("cuid"===o.kind)WG.test(e.data)||(WL(t=this._getOrReturnCtx(e,t),{validation:"cuid",code:WR.invalid_string,message:o.message}),n.dirty());else if("cuid2"===o.kind)WZ.test(e.data)||(WL(t=this._getOrReturnCtx(e,t),{validation:"cuid2",code:WR.invalid_string,message:o.message}),n.dirty());else if("ulid"===o.kind)WJ.test(e.data)||(WL(t=this._getOrReturnCtx(e,t),{validation:"ulid",code:WR.invalid_string,message:o.message}),n.dirty());else if("url"===o.kind)try{new URL(e.data)}catch{WL(t=this._getOrReturnCtx(e,t),{validation:"url",code:WR.invalid_string,message:o.message}),n.dirty()}else{var r,i;"regex"===o.kind?(o.regex.lastIndex=0,o.regex.test(e.data)||(WL(t=this._getOrReturnCtx(e,t),{validation:"regex",code:WR.invalid_string,message:o.message}),n.dirty())):"trim"===o.kind?e.data=e.data.trim():"includes"===o.kind?e.data.includes(o.value,o.position)||(WL(t=this._getOrReturnCtx(e,t),{code:WR.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),n.dirty()):"toLowerCase"===o.kind?e.data=e.data.toLowerCase():"toUpperCase"===o.kind?e.data=e.data.toUpperCase():"startsWith"===o.kind?e.data.startsWith(o.value)||(WL(t=this._getOrReturnCtx(e,t),{code:WR.invalid_string,validation:{startsWith:o.value},message:o.message}),n.dirty()):"endsWith"===o.kind?e.data.endsWith(o.value)||(WL(t=this._getOrReturnCtx(e,t),{code:WR.invalid_string,validation:{endsWith:o.value},message:o.message}),n.dirty()):"datetime"===o.kind?W6(o).test(e.data)||(WL(t=this._getOrReturnCtx(e,t),{code:WR.invalid_string,validation:"datetime",message:o.message}),n.dirty()):"ip"===o.kind?(r=e.data,("v4"===(i=o.version)||!i)&&W1.test(r)||("v6"===i||!i)&&W2.test(r)||(WL(t=this._getOrReturnCtx(e,t),{validation:"ip",code:WR.invalid_string,message:o.message}),n.dirty())):m.assertNever(o)}return{status:n.value,value:e.data}}_addCheck(e){return new W5({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...y.errToObj(e)})}url(e){return this._addCheck({kind:"url",...y.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...y.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...y.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...y.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...y.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...y.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...y.errToObj(e)})}datetime(e){var t;return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(null==e?void 0:e.precision)>"u"?null:null==e?void 0:e.precision,offset:null!==(t=null==e?void 0:e.offset)&&void 0!==t&&t,...y.errToObj(null==e?void 0:e.message)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...y.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null==t?void 0:t.position,...y.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...y.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...y.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...y.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...y.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...y.errToObj(t)})}get isDatetime(){return!!this._def.checks.find(e=>"datetime"===e.kind)}get isEmail(){return!!this._def.checks.find(e=>"email"===e.kind)}get isURL(){return!!this._def.checks.find(e=>"url"===e.kind)}get isEmoji(){return!!this._def.checks.find(e=>"emoji"===e.kind)}get isUUID(){return!!this._def.checks.find(e=>"uuid"===e.kind)}get isCUID(){return!!this._def.checks.find(e=>"cuid"===e.kind)}get isCUID2(){return!!this._def.checks.find(e=>"cuid2"===e.kind)}get isULID(){return!!this._def.checks.find(e=>"ulid"===e.kind)}get isIP(){return!!this._def.checks.find(e=>"ip"===e.kind)}get minLength(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}W5.create=e=>{var t;return new W5({checks:[],typeName:v.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...WY(e)})};class W3 extends WH{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){let t;if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==Wk.number){let t=this._getOrReturnCtx(e);return WL(t,{code:WR.invalid_type,expected:Wk.number,received:t.parsedType}),WB}let n=new WK;for(let r of this._def.checks)"int"===r.kind?m.isInteger(e.data)||(WL(t=this._getOrReturnCtx(e,t),{code:WR.invalid_type,expected:"integer",received:"float",message:r.message}),n.dirty()):"min"===r.kind?(r.inclusive?e.data<r.value:e.data<=r.value)&&(WL(t=this._getOrReturnCtx(e,t),{code:WR.too_small,minimum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):"max"===r.kind?(r.inclusive?e.data>r.value:e.data>=r.value)&&(WL(t=this._getOrReturnCtx(e,t),{code:WR.too_big,maximum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):"multipleOf"===r.kind?0!==function(e,t){let n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r;return parseInt(e.toFixed(i).replace(".",""))%parseInt(t.toFixed(i).replace(".",""))/Math.pow(10,i)}(e.data,r.value)&&(WL(t=this._getOrReturnCtx(e,t),{code:WR.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):"finite"===r.kind?Number.isFinite(e.data)||(WL(t=this._getOrReturnCtx(e,t),{code:WR.not_finite,message:r.message}),n.dirty()):m.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,y.toString(t))}gt(e,t){return this.setLimit("min",e,!1,y.toString(t))}lte(e,t){return this.setLimit("max",e,!0,y.toString(t))}lt(e,t){return this.setLimit("max",e,!1,y.toString(t))}setLimit(e,t,n,r){return new W3({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:y.toString(r)}]})}_addCheck(e){return new W3({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:y.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:y.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:y.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:y.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:y.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:y.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:y.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:y.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:y.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>"int"===e.kind||"multipleOf"===e.kind&&m.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let n of this._def.checks){if("finite"===n.kind||"int"===n.kind||"multipleOf"===n.kind)return!0;"min"===n.kind?(null===t||n.value>t)&&(t=n.value):"max"===n.kind&&(null===e||n.value<e)&&(e=n.value)}return Number.isFinite(t)&&Number.isFinite(e)}}W3.create=e=>new W3({checks:[],typeName:v.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...WY(e)});class W9 extends WH{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){let t;if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==Wk.bigint){let t=this._getOrReturnCtx(e);return WL(t,{code:WR.invalid_type,expected:Wk.bigint,received:t.parsedType}),WB}let n=new WK;for(let r of this._def.checks)"min"===r.kind?(r.inclusive?e.data<r.value:e.data<=r.value)&&(WL(t=this._getOrReturnCtx(e,t),{code:WR.too_small,type:"bigint",minimum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):"max"===r.kind?(r.inclusive?e.data>r.value:e.data>=r.value)&&(WL(t=this._getOrReturnCtx(e,t),{code:WR.too_big,type:"bigint",maximum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):"multipleOf"===r.kind?e.data%r.value!==BigInt(0)&&(WL(t=this._getOrReturnCtx(e,t),{code:WR.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):m.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,y.toString(t))}gt(e,t){return this.setLimit("min",e,!1,y.toString(t))}lte(e,t){return this.setLimit("max",e,!0,y.toString(t))}lt(e,t){return this.setLimit("max",e,!1,y.toString(t))}setLimit(e,t,n,r){return new W9({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:y.toString(r)}]})}_addCheck(e){return new W9({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:y.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:y.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:y.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:y.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:y.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}W9.create=e=>{var t;return new W9({checks:[],typeName:v.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...WY(e)})};class W4 extends WH{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==Wk.boolean){let t=this._getOrReturnCtx(e);return WL(t,{code:WR.invalid_type,expected:Wk.boolean,received:t.parsedType}),WB}return WW(e.data)}}W4.create=e=>new W4({typeName:v.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...WY(e)});class W8 extends WH{_parse(e){let t;if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==Wk.date){let t=this._getOrReturnCtx(e);return WL(t,{code:WR.invalid_type,expected:Wk.date,received:t.parsedType}),WB}if(isNaN(e.data.getTime()))return WL(this._getOrReturnCtx(e),{code:WR.invalid_date}),WB;let n=new WK;for(let r of this._def.checks)"min"===r.kind?e.data.getTime()<r.value&&(WL(t=this._getOrReturnCtx(e,t),{code:WR.too_small,message:r.message,inclusive:!0,exact:!1,minimum:r.value,type:"date"}),n.dirty()):"max"===r.kind?e.data.getTime()>r.value&&(WL(t=this._getOrReturnCtx(e,t),{code:WR.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:"date"}),n.dirty()):m.assertNever(r);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new W8({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:y.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:y.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}W8.create=e=>new W8({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:v.ZodDate,...WY(e)});class W7 extends WH{_parse(e){if(this._getType(e)!==Wk.symbol){let t=this._getOrReturnCtx(e);return WL(t,{code:WR.invalid_type,expected:Wk.symbol,received:t.parsedType}),WB}return WW(e.data)}}W7.create=e=>new W7({typeName:v.ZodSymbol,...WY(e)});class De extends WH{_parse(e){if(this._getType(e)!==Wk.undefined){let t=this._getOrReturnCtx(e);return WL(t,{code:WR.invalid_type,expected:Wk.undefined,received:t.parsedType}),WB}return WW(e.data)}}De.create=e=>new De({typeName:v.ZodUndefined,...WY(e)});class Dt extends WH{_parse(e){if(this._getType(e)!==Wk.null){let t=this._getOrReturnCtx(e);return WL(t,{code:WR.invalid_type,expected:Wk.null,received:t.parsedType}),WB}return WW(e.data)}}Dt.create=e=>new Dt({typeName:v.ZodNull,...WY(e)});class Dn extends WH{constructor(){super(...arguments),this._any=!0}_parse(e){return WW(e.data)}}Dn.create=e=>new Dn({typeName:v.ZodAny,...WY(e)});class Dr extends WH{constructor(){super(...arguments),this._unknown=!0}_parse(e){return WW(e.data)}}Dr.create=e=>new Dr({typeName:v.ZodUnknown,...WY(e)});class Di extends WH{_parse(e){let t=this._getOrReturnCtx(e);return WL(t,{code:WR.invalid_type,expected:Wk.never,received:t.parsedType}),WB}}Di.create=e=>new Di({typeName:v.ZodNever,...WY(e)});class Do extends WH{_parse(e){if(this._getType(e)!==Wk.undefined){let t=this._getOrReturnCtx(e);return WL(t,{code:WR.invalid_type,expected:Wk.void,received:t.parsedType}),WB}return WW(e.data)}}Do.create=e=>new Do({typeName:v.ZodVoid,...WY(e)});class Da extends WH{_parse(e){let{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==Wk.array)return WL(t,{code:WR.invalid_type,expected:Wk.array,received:t.parsedType}),WB;if(null!==r.exactLength){let e=t.data.length>r.exactLength.value,i=t.data.length<r.exactLength.value;(e||i)&&(WL(t,{code:e?WR.too_big:WR.too_small,minimum:i?r.exactLength.value:void 0,maximum:e?r.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:r.exactLength.message}),n.dirty())}if(null!==r.minLength&&t.data.length<r.minLength.value&&(WL(t,{code:WR.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),n.dirty()),null!==r.maxLength&&t.data.length>r.maxLength.value&&(WL(t,{code:WR.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((e,n)=>r.type._parseAsync(new WV(t,e,t.path,n)))).then(e=>WK.mergeArray(n,e));let i=[...t.data].map((e,n)=>r.type._parseSync(new WV(t,e,t.path,n)));return WK.mergeArray(n,i)}get element(){return this._def.type}min(e,t){return new Da({...this._def,minLength:{value:e,message:y.toString(t)}})}max(e,t){return new Da({...this._def,maxLength:{value:e,message:y.toString(t)}})}length(e,t){return new Da({...this._def,exactLength:{value:e,message:y.toString(t)}})}nonempty(e){return this.min(1,e)}}Da.create=(e,t)=>new Da({type:e,minLength:null,maxLength:null,exactLength:null,typeName:v.ZodArray,...WY(t)});class Du extends WH{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;let e=this._def.shape(),t=m.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==Wk.object){let t=this._getOrReturnCtx(e);return WL(t,{code:WR.invalid_type,expected:Wk.object,received:t.parsedType}),WB}let{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof Di&&"strip"===this._def.unknownKeys))for(let e in n.data)i.includes(e)||o.push(e);let a=[];for(let e of i){let t=r[e],i=n.data[e];a.push({key:{status:"valid",value:e},value:t._parse(new WV(n,i,n.path,e)),alwaysSet:e in n.data})}if(this._def.catchall instanceof Di){let e=this._def.unknownKeys;if("passthrough"===e)for(let e of o)a.push({key:{status:"valid",value:e},value:{status:"valid",value:n.data[e]}});else if("strict"===e)o.length>0&&(WL(n,{code:WR.unrecognized_keys,keys:o}),t.dirty());else if("strip"!==e)throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let e=this._def.catchall;for(let t of o){let r=n.data[t];a.push({key:{status:"valid",value:t},value:e._parse(new WV(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of a){let n=await t.key;e.push({key:n,value:await t.value,alwaysSet:t.alwaysSet})}return e}).then(e=>WK.mergeObjectSync(t,e)):WK.mergeObjectSync(t,a)}get shape(){return this._def.shape()}strict(e){return y.errToObj,new Du({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,n)=>{var r,i,o,a;let u=null!==(o=null===(i=(r=this._def).errorMap)||void 0===i?void 0:i.call(r,t,n).message)&&void 0!==o?o:n.defaultError;return"unrecognized_keys"===t.code?{message:null!==(a=y.errToObj(e).message)&&void 0!==a?a:u}:{message:u}}}:{}})}strip(){return new Du({...this._def,unknownKeys:"strip"})}passthrough(){return new Du({...this._def,unknownKeys:"passthrough"})}extend(e){return new Du({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Du({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:v.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new Du({...this._def,catchall:e})}pick(e){let t={};return m.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(t[n]=this.shape[n])}),new Du({...this._def,shape:()=>t})}omit(e){let t={};return m.objectKeys(this.shape).forEach(n=>{e[n]||(t[n]=this.shape[n])}),new Du({...this._def,shape:()=>t})}deepPartial(){return function e(t){if(!(t instanceof Du))return t instanceof Da?new Da({...t._def,type:e(t.element)}):t instanceof Dw?Dw.create(e(t.unwrap())):t instanceof DI?DI.create(e(t.unwrap())):t instanceof Df?Df.create(t.items.map(t=>e(t))):t;{let n={};for(let r in t.shape){let i=t.shape[r];n[r]=Dw.create(e(i))}return new Du({...t._def,shape:()=>n})}}(this)}partial(e){let t={};return m.objectKeys(this.shape).forEach(n=>{let r=this.shape[n];e&&!e[n]?t[n]=r:t[n]=r.optional()}),new Du({...this._def,shape:()=>t})}required(e){let t={};return m.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])t[n]=this.shape[n];else{let e=this.shape[n];for(;e instanceof Dw;)e=e._def.innerType;t[n]=e}}),new Du({...this._def,shape:()=>t})}keyof(){return Dv(m.objectKeys(this.shape))}}Du.create=(e,t)=>new Du({shape:()=>e,unknownKeys:"strip",catchall:Di.create(),typeName:v.ZodObject,...WY(t)}),Du.strictCreate=(e,t)=>new Du({shape:()=>e,unknownKeys:"strict",catchall:Di.create(),typeName:v.ZodObject,...WY(t)}),Du.lazycreate=(e,t)=>new Du({shape:e,unknownKeys:"strip",catchall:Di.create(),typeName:v.ZodObject,...WY(t)});class Ds extends WH{_parse(e){let{ctx:t}=this._processInputParams(e),n=this._def.options;if(t.common.async)return Promise.all(n.map(async e=>{let n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}})).then(function(e){for(let t of e)if("valid"===t.result.status)return t.result;for(let n of e)if("dirty"===n.result.status)return t.common.issues.push(...n.ctx.common.issues),n.result;let n=e.map(e=>new WE(e.ctx.common.issues));return WL(t,{code:WR.invalid_union,unionErrors:n}),WB});{let e;let r=[];for(let i of n){let n={...t,common:{...t.common,issues:[]},parent:null},o=i._parseSync({data:t.data,path:t.path,parent:n});if("valid"===o.status)return o;"dirty"!==o.status||e||(e={result:o,ctx:n}),n.common.issues.length&&r.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let i=r.map(e=>new WE(e));return WL(t,{code:WR.invalid_union,unionErrors:i}),WB}}get options(){return this._def.options}}Ds.create=(e,t)=>new Ds({options:e,typeName:v.ZodUnion,...WY(t)});let Dl=e=>e instanceof Dg?Dl(e.schema):e instanceof DS?Dl(e.innerType()):e instanceof Dy?[e.value]:e instanceof Dx?e.options:e instanceof Db?Object.keys(e.enum):e instanceof D_?Dl(e._def.innerType):e instanceof De?[void 0]:e instanceof Dt?[null]:null;class Dc extends WH{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==Wk.object)return WL(t,{code:WR.invalid_type,expected:Wk.object,received:t.parsedType}),WB;let n=this.discriminator,r=t.data[n],i=this.optionsMap.get(r);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(WL(t,{code:WR.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),WB)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,n){let r=new Map;for(let n of t){let t=Dl(n.shape[e]);if(!t)throw Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let i of t){if(r.has(i))throw Error(`Discriminator property ${String(e)} has duplicate value ${String(i)}`);r.set(i,n)}}return new Dc({typeName:v.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:r,...WY(n)})}}class Dd extends WH{_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=(e,r)=>{if(WD(e)||WD(r))return WB;let i=function e(t,n){let r=WO(t),i=WO(n);if(t===n)return{valid:!0,data:t};if(r===Wk.object&&i===Wk.object){let r=m.objectKeys(n),i=m.objectKeys(t).filter(e=>-1!==r.indexOf(e)),o={...t,...n};for(let r of i){let i=e(t[r],n[r]);if(!i.valid)return{valid:!1};o[r]=i.data}return{valid:!0,data:o}}if(r!==Wk.array||i!==Wk.array)return r===Wk.date&&i===Wk.date&&+t==+n?{valid:!0,data:t}:{valid:!1};{if(t.length!==n.length)return{valid:!1};let r=[];for(let i=0;i<t.length;i++){let o=e(t[i],n[i]);if(!o.valid)return{valid:!1};r.push(o.data)}return{valid:!0,data:r}}}(e.value,r.value);return i.valid?((WN(e)||WN(r))&&t.dirty(),{status:t.value,value:i.data}):(WL(n,{code:WR.invalid_intersection_types}),WB)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([e,t])=>r(e,t)):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}Dd.create=(e,t,n)=>new Dd({left:e,right:t,typeName:v.ZodIntersection,...WY(n)});class Df extends WH{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==Wk.array)return WL(n,{code:WR.invalid_type,expected:Wk.array,received:n.parsedType}),WB;if(n.data.length<this._def.items.length)return WL(n,{code:WR.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),WB;!this._def.rest&&n.data.length>this._def.items.length&&(WL(n,{code:WR.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());let r=[...n.data].map((e,t)=>{let r=this._def.items[t]||this._def.rest;return r?r._parse(new WV(n,e,n.path,t)):null}).filter(e=>!!e);return n.common.async?Promise.all(r).then(e=>WK.mergeArray(t,e)):WK.mergeArray(t,r)}get items(){return this._def.items}rest(e){return new Df({...this._def,rest:e})}}Df.create=(e,t)=>{if(!Array.isArray(e))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new Df({items:e,typeName:v.ZodTuple,rest:null,...WY(t)})};class Dp extends WH{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==Wk.object)return WL(n,{code:WR.invalid_type,expected:Wk.object,received:n.parsedType}),WB;let r=[],i=this._def.keyType,o=this._def.valueType;for(let e in n.data)r.push({key:i._parse(new WV(n,e,n.path,e)),value:o._parse(new WV(n,n.data[e],n.path,e))});return n.common.async?WK.mergeObjectAsync(t,r):WK.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(e,t,n){return new Dp(t instanceof WH?{keyType:e,valueType:t,typeName:v.ZodRecord,...WY(n)}:{keyType:W5.create(),valueType:e,typeName:v.ZodRecord,...WY(t)})}}class DA extends WH{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==Wk.map)return WL(n,{code:WR.invalid_type,expected:Wk.map,received:n.parsedType}),WB;let r=this._def.keyType,i=this._def.valueType,o=[...n.data.entries()].map(([e,t],o)=>({key:r._parse(new WV(n,e,n.path,[o,"key"])),value:i._parse(new WV(n,t,n.path,[o,"value"]))}));if(n.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let n of o){let r=await n.key,i=await n.value;if("aborted"===r.status||"aborted"===i.status)return WB;("dirty"===r.status||"dirty"===i.status)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}})}{let e=new Map;for(let n of o){let r=n.key,i=n.value;if("aborted"===r.status||"aborted"===i.status)return WB;("dirty"===r.status||"dirty"===i.status)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}}}}DA.create=(e,t,n)=>new DA({valueType:t,keyType:e,typeName:v.ZodMap,...WY(n)});class Dh extends WH{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==Wk.set)return WL(n,{code:WR.invalid_type,expected:Wk.set,received:n.parsedType}),WB;let r=this._def;null!==r.minSize&&n.data.size<r.minSize.value&&(WL(n,{code:WR.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),t.dirty()),null!==r.maxSize&&n.data.size>r.maxSize.value&&(WL(n,{code:WR.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());let i=this._def.valueType;function o(e){let n=new Set;for(let r of e){if("aborted"===r.status)return WB;"dirty"===r.status&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}let a=[...n.data.values()].map((e,t)=>i._parse(new WV(n,e,n.path,t)));return n.common.async?Promise.all(a).then(e=>o(e)):o(a)}min(e,t){return new Dh({...this._def,minSize:{value:e,message:y.toString(t)}})}max(e,t){return new Dh({...this._def,maxSize:{value:e,message:y.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}Dh.create=(e,t)=>new Dh({valueType:e,minSize:null,maxSize:null,typeName:v.ZodSet,...WY(t)});class Dm extends WH{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==Wk.function)return WL(t,{code:WR.invalid_type,expected:Wk.function,received:t.parsedType}),WB;function n(e,n){return WU({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,WM(),Wj].filter(e=>!!e),issueData:{code:WR.invalid_arguments,argumentsError:n}})}function r(e,n){return WU({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,WM(),Wj].filter(e=>!!e),issueData:{code:WR.invalid_return_type,returnTypeError:n}})}let i={errorMap:t.common.contextualErrorMap},o=t.data;return this._def.returns instanceof DC?WW(async(...e)=>{let t=new WE([]),a=await this._def.args.parseAsync(e,i).catch(r=>{throw t.addIssue(n(e,r)),t}),u=await o(...a);return await this._def.returns._def.type.parseAsync(u,i).catch(e=>{throw t.addIssue(r(u,e)),t})}):WW((...e)=>{let t=this._def.args.safeParse(e,i);if(!t.success)throw new WE([n(e,t.error)]);let a=o(...t.data),u=this._def.returns.safeParse(a,i);if(!u.success)throw new WE([r(a,u.error)]);return u.data})}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Dm({...this._def,args:Df.create(e).rest(Dr.create())})}returns(e){return new Dm({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,n){return new Dm({args:e||Df.create([]).rest(Dr.create()),returns:t||Dr.create(),typeName:v.ZodFunction,...WY(n)})}}class Dg extends WH{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}Dg.create=(e,t)=>new Dg({getter:e,typeName:v.ZodLazy,...WY(t)});class Dy extends WH{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return WL(t,{received:t.data,code:WR.invalid_literal,expected:this._def.value}),WB}return{status:"valid",value:e.data}}get value(){return this._def.value}}function Dv(e,t){return new Dx({values:e,typeName:v.ZodEnum,...WY(t)})}Dy.create=(e,t)=>new Dy({value:e,typeName:v.ZodLiteral,...WY(t)});class Dx extends WH{_parse(e){if("string"!=typeof e.data){let t=this._getOrReturnCtx(e),n=this._def.values;return WL(t,{expected:m.joinValues(n),received:t.parsedType,code:WR.invalid_type}),WB}if(-1===this._def.values.indexOf(e.data)){let t=this._getOrReturnCtx(e),n=this._def.values;return WL(t,{received:t.data,code:WR.invalid_enum_value,options:n}),WB}return WW(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(e){return Dx.create(e)}exclude(e){return Dx.create(this.options.filter(t=>!e.includes(t)))}}Dx.create=Dv;class Db extends WH{_parse(e){let t=m.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==Wk.string&&n.parsedType!==Wk.number){let e=m.objectValues(t);return WL(n,{expected:m.joinValues(e),received:n.parsedType,code:WR.invalid_type}),WB}if(-1===t.indexOf(e.data)){let e=m.objectValues(t);return WL(n,{received:n.data,code:WR.invalid_enum_value,options:e}),WB}return WW(e.data)}get enum(){return this._def.values}}Db.create=(e,t)=>new Db({values:e,typeName:v.ZodNativeEnum,...WY(t)});class DC extends WH{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==Wk.promise&&!1===t.common.async?(WL(t,{code:WR.invalid_type,expected:Wk.promise,received:t.parsedType}),WB):WW((t.parsedType===Wk.promise?t.data:Promise.resolve(t.data)).then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}}DC.create=(e,t)=>new DC({type:e,typeName:v.ZodPromise,...WY(t)});class DS extends WH{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===v.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=this._def.effect||null;if("preprocess"===r.type){let e=r.transform(n.data);return n.common.async?Promise.resolve(e).then(e=>this._def.schema._parseAsync({data:e,path:n.path,parent:n})):this._def.schema._parseSync({data:e,path:n.path,parent:n})}let i={addIssue:e=>{WL(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),"refinement"===r.type){let e=e=>{let t=r.refinement(e,i);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1!==n.common.async)return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(n=>"aborted"===n.status?WB:("dirty"===n.status&&t.dirty(),e(n.value).then(()=>({status:t.value,value:n.value}))));{let r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===r.status?WB:("dirty"===r.status&&t.dirty(),e(r.value),{status:t.value,value:r.value})}}if("transform"===r.type){if(!1!==n.common.async)return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(e=>Wq(e)?Promise.resolve(r.transform(e.value,i)).then(e=>({status:t.value,value:e})):e);{let e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Wq(e))return e;let o=r.transform(e.value,i);if(o instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}}m.assertNever(r)}}DS.create=(e,t,n)=>new DS({schema:e,typeName:v.ZodEffects,effect:t,...WY(n)}),DS.createWithPreprocess=(e,t,n)=>new DS({schema:t,effect:{type:"preprocess",transform:e},typeName:v.ZodEffects,...WY(n)});class Dw extends WH{_parse(e){return this._getType(e)===Wk.undefined?WW(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Dw.create=(e,t)=>new Dw({innerType:e,typeName:v.ZodOptional,...WY(t)});class DI extends WH{_parse(e){return this._getType(e)===Wk.null?WW(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}DI.create=(e,t)=>new DI({innerType:e,typeName:v.ZodNullable,...WY(t)});class D_ extends WH{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return t.parsedType===Wk.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}D_.create=(e,t)=>new D_({innerType:e,typeName:v.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...WY(t)});class DT extends WH{_parse(e){let{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return WQ(r)?r.then(e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new WE(n.common.issues)},input:n.data})})):{status:"valid",value:"valid"===r.status?r.value:this._def.catchValue({get error(){return new WE(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}DT.create=(e,t)=>new DT({innerType:e,typeName:v.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...WY(t)});class Dk extends WH{_parse(e){if(this._getType(e)!==Wk.nan){let t=this._getOrReturnCtx(e);return WL(t,{code:WR.invalid_type,expected:Wk.nan,received:t.parsedType}),WB}return{status:"valid",value:e.data}}}Dk.create=e=>new Dk({typeName:v.ZodNaN,...WY(e)});let DO=Symbol("zod_brand");class DR extends WH{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}}class DE extends WH{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?WB:"dirty"===e.status?(t.dirty(),WP(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})();{let e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?WB:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(e,t){return new DE({in:e,out:t,typeName:v.ZodPipeline})}}let Dj=(e,t={},n)=>e?Dn.create().superRefine((r,i)=>{var o,a;if(!e(r)){let e="function"==typeof t?t(r):"string"==typeof t?{message:t}:t,u=null===(a=null!==(o=e.fatal)&&void 0!==o?o:n)||void 0===a||a;i.addIssue({code:"custom",..."string"==typeof e?{message:e}:e,fatal:u})}}):Dn.create(),DF={object:Du.lazycreate};(l=v||(v={})).ZodString="ZodString",l.ZodNumber="ZodNumber",l.ZodNaN="ZodNaN",l.ZodBigInt="ZodBigInt",l.ZodBoolean="ZodBoolean",l.ZodDate="ZodDate",l.ZodSymbol="ZodSymbol",l.ZodUndefined="ZodUndefined",l.ZodNull="ZodNull",l.ZodAny="ZodAny",l.ZodUnknown="ZodUnknown",l.ZodNever="ZodNever",l.ZodVoid="ZodVoid",l.ZodArray="ZodArray",l.ZodObject="ZodObject",l.ZodUnion="ZodUnion",l.ZodDiscriminatedUnion="ZodDiscriminatedUnion",l.ZodIntersection="ZodIntersection",l.ZodTuple="ZodTuple",l.ZodRecord="ZodRecord",l.ZodMap="ZodMap",l.ZodSet="ZodSet",l.ZodFunction="ZodFunction",l.ZodLazy="ZodLazy",l.ZodLiteral="ZodLiteral",l.ZodEnum="ZodEnum",l.ZodEffects="ZodEffects",l.ZodNativeEnum="ZodNativeEnum",l.ZodOptional="ZodOptional",l.ZodNullable="ZodNullable",l.ZodDefault="ZodDefault",l.ZodCatch="ZodCatch",l.ZodPromise="ZodPromise",l.ZodBranded="ZodBranded",l.ZodPipeline="ZodPipeline";let DM=W5.create,DU=W3.create,DL=Dk.create,DK=W9.create,DB=W4.create,DP=W8.create,DW=W7.create,DD=De.create,DN=Dt.create,Dq=Dn.create,DQ=Dr.create,DV=Di.create,Dz=Do.create,DY=Da.create,DH=Du.create,DG=Du.strictCreate,DZ=Ds.create,DJ=Dc.create,D$=Dd.create,DX=Df.create,D0=Dp.create,D1=DA.create,D2=Dh.create,D6=Dm.create,D5=Dg.create,D3=Dy.create,D9=Dx.create,D4=Db.create,D8=DC.create,D7=DS.create,Ne=Dw.create,Nt=DI.create,Nn=DS.createWithPreprocess,Nr=DE.create;var Ni=Object.freeze({__proto__:null,defaultErrorMap:Wj,setErrorMap:function(e){WF=e},getErrorMap:WM,makeIssue:WU,EMPTY_PATH:[],addIssueToContext:WL,ParseStatus:WK,INVALID:WB,DIRTY:WP,OK:WW,isAborted:WD,isDirty:WN,isValid:Wq,isAsync:WQ,get util(){return m},get objectUtil(){return g},ZodParsedType:Wk,getParsedType:WO,ZodType:WH,ZodString:W5,ZodNumber:W3,ZodBigInt:W9,ZodBoolean:W4,ZodDate:W8,ZodSymbol:W7,ZodUndefined:De,ZodNull:Dt,ZodAny:Dn,ZodUnknown:Dr,ZodNever:Di,ZodVoid:Do,ZodArray:Da,ZodObject:Du,ZodUnion:Ds,ZodDiscriminatedUnion:Dc,ZodIntersection:Dd,ZodTuple:Df,ZodRecord:Dp,ZodMap:DA,ZodSet:Dh,ZodFunction:Dm,ZodLazy:Dg,ZodLiteral:Dy,ZodEnum:Dx,ZodNativeEnum:Db,ZodPromise:DC,ZodEffects:DS,ZodTransformer:DS,ZodOptional:Dw,ZodNullable:DI,ZodDefault:D_,ZodCatch:DT,ZodNaN:Dk,BRAND:DO,ZodBranded:DR,ZodPipeline:DE,custom:Dj,Schema:WH,ZodSchema:WH,late:DF,get ZodFirstPartyTypeKind(){return v},coerce:{string:e=>W5.create({...e,coerce:!0}),number:e=>W3.create({...e,coerce:!0}),boolean:e=>W4.create({...e,coerce:!0}),bigint:e=>W9.create({...e,coerce:!0}),date:e=>W8.create({...e,coerce:!0})},any:Dq,array:DY,bigint:DK,boolean:DB,date:DP,discriminatedUnion:DJ,effect:D7,enum:D9,function:D6,instanceof:(e,t={message:`Input not instance of ${e.name}`})=>Dj(t=>t instanceof e,t),intersection:D$,lazy:D5,literal:D3,map:D1,nan:DL,nativeEnum:D4,never:DV,null:DN,nullable:Nt,number:DU,object:DH,oboolean:()=>DB().optional(),onumber:()=>DU().optional(),optional:Ne,ostring:()=>DM().optional(),pipeline:Nr,preprocess:Nn,promise:D8,record:D0,set:D2,strictObject:DG,string:DM,symbol:DW,transformer:D7,tuple:DX,undefined:DD,union:DZ,unknown:DQ,void:Dz,NEVER:WB,ZodIssueCode:WR,quotelessJson:e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),ZodError:WE});let No=Ni.object({id:Ni.string(),label:Ni.string(),repeatable:Ni.boolean(),status:Ni.boolean()}),Na=Ni.array(No);function Nu(e,t,n){return(0,j.WY)(new URL("customtypes",e),{headers:{repository:t},credentials:(0,j.xb)(n),okType:Na})}let Ns=Ni.object({first_name:Ni.string().optional(),last_name:Ni.string().optional(),email:Ni.string().optional(),uploadedAvatar:Ni.string().optional()}),Nl=Ni.object({id:Ni.string(),name:Ni.string(),is_master:Ni.boolean().optional()}),Nc=Ni.discriminatedUnion("status",[Ni.object({status:Ni.literal("unclassified")}),Ni.object({status:Ni.literal("published")}),Ni.object({status:Ni.literal("release"),release_id:Ni.string()}),Ni.object({status:Ni.literal("archived")})]).and(Ni.object({version_id:Ni.string(),tags:Ni.array(Ni.string()),custom_type_label:Ni.string(),preview_summary:Ni.string().optional(),preview_image:Ni.string().optional(),last_modified_date:Ni.coerce.date(),author:Ns,uid:Ni.string().optional()})),Nd=Ni.object({id:Ni.string(),title:Ni.string().nullish().transform(e=>e??"Untitled"),custom_type_id:Ni.string(),group_lang_id:Ni.string(),language:Nl,versions:Ni.array(Nc)}),Nf=Ni.object({total:Ni.number(),cursor:Ni.string().optional(),results:Ni.array(Nd)}),Np=Ni.object({id:Ni.string(),title:Ni.string(),repository_id:Ni.string(),tags:Ni.array(Ni.string()).optional()}).passthrough(),NA=Ni.object({results:Ni.array(Np)});function Nh(e){return e.reduce((e,t)=>{if(t.values.every(e=>""===e||void 0===e))return e;let n=t.values.map(e=>[t.name,e??""]);return e.concat(n)},[])}function Nm(e,t,n){return(0,j.WY)(new URL(`documents/${n}`,e),{credentials:(0,j.xb)(t),okType:Nd})}async function Ng(e,t,n){if(0===n.length)return[];let r=n.slice(0,50).map(({id:e})=>e),i=await function(e){let{baseUrl:t,authStrategy:n,limit:r,cursor:i,status:o,authors:a,language:u,group_lang_id:s,document_id:l,customTypes:c,tags:d,term:f,signal:p}=e,A=new URL("documents",t),h=[];return r&&h.push({name:"limit",values:[r.toString()]}),i&&h.push({name:"cursor",values:[i]}),null!=o&&o.length&&h.push({name:"status",values:o}),null!=a&&a.length&&h.push({name:"authors",values:a}),u&&h.push({name:"language",values:[u]}),s&&h.push({name:"group_lang_id",values:[s]}),null!=l&&l.length&&h.push({name:"document_id",values:l}),null!=c&&c.length&&h.push({name:"customTypes",values:c}),null!=d&&d.length&&h.push({name:"tags",values:d}),f&&h.push({name:"term",values:[f]}),A.search=new URLSearchParams(Nh(h)).toString(),(0,j.WY)(A,{credentials:(0,j.xb)(n),okType:Nf,signal:p})}({baseUrl:e,authStrategy:t,document_id:r}),o=new Map(r.map((e,t)=>[e,t]));return i.results.sort((e,t)=>(o.get(e.id)??1/0)-(o.get(t.id)??1/0))}Ni.custom().transform((e,t)=>{let n=z.Document.decode(e);return"Left"===n._tag?(t.addIssue({code:Ni.ZodIssueCode.custom,message:"Invalid document."}),Ni.NEVER):n.right}),Ni.unknown().transform((e,t)=>{let n=z.SliceItemContent.decode(e);return"Right"===n._tag?n.right:(t.addIssue({code:Ni.ZodIssueCode.custom,message:"Invalid slice content."}),Ni.NEVER)});let Ny=Ni.object({id:Ni.string(),firstname:Ni.string().optional(),lastname:Ni.string().optional(),email:Ni.string(),uploadedAvatar:Ni.string().optional()}),Nv=Ni.array(Ny),Nx=Ni.object({slicemachineEnabled:Ni.boolean()}),Nb=["next","nuxt","sveltekit"],NC=Ni.preprocess(e=>"string"==typeof e&&Nb.includes(e)?e:"other",Ni.enum([...Nb,"other"])),NS=Ni.object({simulator_url:Ni.string().url().nullish(),languages:Ni.array(Nl).transform(e=>(0,E.DY)(e,e=>e.name)),authors:Nv.optional().default([]),quotas:Nx.optional().default({slicemachineEnabled:!1}),framework:NC.optional().default("other"),starterId:Ni.string().optional(),storageVersion:Ni.object({major:Ni.number().int(),minor:Ni.number().int()})}).transform(({simulator_url:e,framework:t,...n})=>{let r=e&&function(e){let t=(0,w.ju)(e);return!!t&&t.pathname.endsWith("/slice-simulator")}(e)?e:void 0;return{...n,framework:t,simulatorUrl:r,isSupportedFramework:"other"!==t}});function Nw(e,t){return(0,j.WY)(new URL("repository",e),{credentials:(0,j.xb)(t),okType:NS})}let NI=Ni.object({results:Ni.array(Ni.string())});function N_(e,t){return(0,j.WY)(new URL("repository/tags",e),{credentials:(0,j.xb)(t),okType:NI})}let NT=Ni.enum(["Owner","Administrator","Writer","Manager","Readonly"]),Nk=Ni.record(NT.optional()),NO=NT.or(Nk),NR=Ni.object({shortId:Ni.string(),intercomHash:Ni.string(),email:Ni.string(),firstName:Ni.string(),lastName:Ni.string(),superPower:Ni.boolean(),repositories:Ni.array(Ni.object({domain:Ni.string(),role:NO}))});function NE(e,t){let n=new URL("profile",e);return(0,j.WY)(n,{credentials:(0,j.xb)(t),okType:NR})}function Nj(){let e=WI();e.userServiceBaseUrl||WT("userServiceBaseUrl");let{authStrategy:t,userServiceBaseUrl:n}=e;return(0,R.QT)(NE,[n,t])}function NF(){let e=WI();e.mediaLibrary||WT("mediaLibrary");let{assetsApiBaseUrl:t,authStrategy:n,repository:r}=e,{items:i}=(0,R.QT)(NM,[t,r,n]);return{tags:i}}function NM(e,t,n){return(0,j.WY)(new URL("tags",e),{credentials:(0,j.xb)(n),okType:NK,headers:{repository:t}})}let NU=Ni.string().min(1).max(20),NL=Ni.object({id:Ni.string(),name:NU,uploader_id:Ni.string().optional(),created_at:Ni.number(),last_modified:Ni.number(),count:Ni.number().optional().default(0)}),NK=Ni.object({items:Ni.array(NL)});function NB(e){(0,R.YC)(NM,t=>{let{items:n}=t,r=e(n);if(r)return{items:r}})}let NP=Ni.array(Ni.string()).optional().transform(e=>null==e?void 0:e[0]),NW=Ni.object({id:Ni.string(),kind:Ni.string(),extension:Ni.string().optional(),filename:Ni.string(),width:Ni.number().optional(),height:Ni.number().optional(),last_modified:Ni.number(),url:Ni.string(),alt:Ni.string().optional(),uploader_id:Ni.string().optional(),size:Ni.number(),notes:Ni.string().optional(),credits:Ni.string().optional(),search_highlight:Ni.object({filename:NP,alt:NP,notes:NP,credits:NP}).optional(),tags:Ni.array(NL)}),ND={"X-Prismic-Source":"Wroom"},NN=Ni.object({total:Ni.number(),cursor:Ni.string().optional(),items:Ni.array(NW)});function Nq(e,t,n,r,i,o,a,u,s){let l=e?new URL("assets",e):void 0,c=new URLSearchParams(Nh([{name:"limit",values:["30"]},{name:"cursor",values:[s]},{name:"keyword",values:[r]},{name:"assetType",values:[i]},{name:"uploaderId",values:[o]},{name:"tags",values:a.split(",")}])).toString(),d=NN.transform(e=>({...e,keyword:r,assetType:i,uploaderId:o,tags:a,page:u})),f=performance.now();return(0,j.WY)(`${(null==l?void 0:l.href)??""}?${c}`,{headers:{repository:t,...ND},credentials:(0,j.xb)(n),okType:d}).then(e=>({...e,time:(performance.now()-f).toFixed(0)}))}R.Fs.registerFetcherConfig(Nq,{revalidationStrategy:{type:"never"}});let NQ={keyword:"",assetType:"all",uploaderId:void 0,tagIds:[]};function NV(e){NG(t=>t.flatMap(t=>{let n=e.find(e=>e.id===t.id);return n?void 0===n.response?[]:{...t,...n.response}:t}))}function Nz(e){NG(t=>t.filter(t=>!e.includes(t.id)))}function NY(e){let{keyword:t,assetType:n,uploaderId:r,tagIds:i}=e,o=null==i?void 0:i.join(",");(0,R.YC)(Nq,e=>{if(!(e.keyword===t&&e.assetType===n&&e.uploaderId===r&&e.tags===o))return e})}function NH(e,t,n,r,i){let o=e.filter(e=>e.keyword===t&&e.assetType===n&&e.uploaderId===r&&e.tags===i),a=(0,E.DY)(o,e=>e.page).flatMap(e=>e.items);return t?(0,E.mN)(a,e=>e.id):a}function NG(e){(0,R.YC)(Nq,t=>{let{items:n,total:r}=t,i=e(n,t);if(i)return{...t,total:r+(i.length-n.length),items:i}})}function NZ(e){let{config:t,keyword:n=NQ.keyword,assetType:r=NQ.assetType,tagIds:i=NQ.tagIds}=e;if(!t.mediaLibrary)throw Error("media library is not configured");let{assetsApiBaseUrl:o,authStrategy:a,repository:u}=t;(0,R.gw)(Nq,N$({assetsApiBaseUrl:o,repository:u,authStrategy:a,keyword:n,assetType:r,tagIds:i,page:0}))}function NJ(e){let{config:t,keyword:n=NQ.keyword,assetType:r=NQ.assetType,tagIds:i=NQ.tagIds}=e;if(!t.mediaLibrary)throw Error("media library is not configured");(0,R.YC)(Nq,e=>0===e.page?e:void 0),NZ({config:t,keyword:n,assetType:r,tagIds:i})}function N$(e){return[e.assetsApiBaseUrl,e.repository,e.authStrategy,e.keyword,e.assetType,e.uploaderId,e.tagIds.join(","),e.page,e.cursor]}function NX(){let e=WI();e.mediaLibrary||WT("mediaLibrary");let{assetsApiBaseUrl:t,coreApiBaseUrl:n,authStrategy:r,repository:i}=e,{authors:o}=(0,R.QT)(Nw,[n,r]),{items:a}=(0,R.QT)(N0,[t,i,r]),{shortId:u}=Nj(),s=new Map(o.map(e=>[e.id,e])),l=[];for(let e of a){let t;if("ghost"===e.id){l.push({id:e.id,name:"Ghost",uploadedAvatar:"https://images.prismic.io/page-builder-assets/ZuAXWBoQrfVKl5sD_ghost_user.png?auto=format,compress&w=64"});continue}let n=s.get(e.id);if(n){if(n.uploadedAvatar){let e=new URL(n.uploadedAvatar);e.searchParams.set("w","64"),t=e.toString()}l.push({id:e.id,name:[n.firstname,n.lastname].filter(Boolean).join(" "),firstName:n.firstname,lastName:n.lastname,email:n.email,uploadedAvatar:t})}}let c=new Map(l.map(e=>[e.id,e]));return{uploaders:(0,E.DY)(l,e=>e.id===u?0:1,e=>e.name),uploadersById:c}}function N0(e,t,n){return(0,j.WY)(new URL("uploaders",e),{credentials:(0,j.xb)(n),okType:N2,headers:{repository:t}})}let N1=Ni.object({id:Ni.string()}),N2=Ni.object({items:Ni.array(N1)});function N6(){let e=WI();e.mediaLibrary||WT("mediaLibrary");let{assetsApiBaseUrl:t,authStrategy:n,repository:r}=e;return()=>{(0,R.gw)(N0,[t,r,n])}}let N5=(0,C.createContext)(void 0);function N3(e){let{children:t,assetType:n=NQ.assetType,onSelectedChange:r,actionContainerRef:i}=e,[o,a]=(0,C.useTransition)(),[u,s]=(0,C.useTransition)(),l=WI(),{showAlert:c}=(0,S.VY)(),d=Nj(),f=N6(),{keyword:p,assetType:A,uploaderId:h,tagIds:m,setFilters:g,resetFilters:y,media:v,fetchNextPage:x,hasNextPage:b,updateMedia:w,unshiftMedia:I,deleteMedia:_,mediaTotal:T,deleteSearchData:k,revalidateFirstPage:E}=function(e){let{initialAssetType:t=NQ.assetType,mode:n}=e,r=WI(),[i,o]=(0,C.useState)({...NQ,assetType:t,page:0});r.mediaLibrary||WT("mediaLibrary");let{assetsApiBaseUrl:a,authStrategy:u,repository:s}=r,{page:l,cursor:c,keyword:d,assetType:f,uploaderId:p,tagIds:A}=i,h=(0,R.QT)(Nq,N$({assetsApiBaseUrl:a,authStrategy:u,repository:s,keyword:d,assetType:f,uploaderId:p,tagIds:A,page:l,cursor:c}));!function(e){let{assetType:t,keyword:n,mode:r,tagIds:i}=e,o=WI();o.mediaLibrary||WT("mediaLibrary");let{onAnalyticsEvent:a}=o,u=(0,R.q_)(Nq),s=u[u.length-1],l=(0,C.useRef)(s);l.current=s,(0,C.useEffect)(()=>{if(!a||!n||!l.current||l.current.keyword!==n)return;let e=String(n.split(" ").length),o=String(l.current.total),u=i.join(",");a("Media Library Search",{searchQuery:n,numberOfWords:e,numberOfResults:o,timeToGetResults:l.current.time,assetType:t,mode:r,tags:u})},[n,t,r,a,i])}({assetType:f,keyword:d,tagIds:A,mode:n});let m=NH((0,R.q_)(Nq),d,f,p,A.join(",")),g=h.total!==m.length;return{keyword:d,assetType:f,uploaderId:p,tagIds:A,setFilters:function(e){o(t=>({...t,...e,page:0,cursor:void 0}))},resetFilters:function(){o(e=>({...e,...NQ,assetType:"all"===t?NQ.assetType:e.assetType,page:0,cursor:void 0}))},media:m,mediaTotal:h.total,limit:30,hasNextPage:g,fetchNextPage:function(){void 0!==h.cursor&&o(e=>({...e,page:e.page+1,cursor:h.cursor}))},updateMedia:NV,unshiftMedia:function(e){o(e=>({...e,page:0,cursor:void 0})),NG((t,n)=>{if(0===n.page)return[...e,...t]})},deleteMedia:Nz,deleteSearchData:NY,revalidateFirstPage:NZ}}({initialAssetType:n,mode:r?"select":"browse"}),[F,M]=(0,C.useState)(),{isMediaRevalidationInProgress:U,isMediaCacheInvalid:L,revalidateMedia:K,revalidateWithParams:B}=function(e){let{revalidate:t,config:n,keyword:r,assetType:i,uploaderId:o,tagIds:a}=e,{assetsApiBaseUrl:u,repository:s="",authStrategy:l="token"}=n.mediaLibrary?n:{},[c,d]=(0,C.useState)(!1),[f,p]=(0,C.useState)(!1),A={assetsApiBaseUrl:u,repository:s,authStrategy:l,keyword:r,assetType:i,uploaderId:o,tagIds:a,page:0},{revalidateData:h}=(0,R.NN)({fetcher:Nq,requestParams:N$(A),validator:(e,t)=>{var n,r;return((null==(n=e.items[0])?void 0:n.id)??"")!==((null==(r=t.items[0])?void 0:r.id)??"")||e.total!==(null==t?void 0:t.total)},onCacheInvalidated:()=>p(!0),every:6e4});return(0,C.useEffect)(()=>{c&&(p(!1),d(!1))},[c]),{isMediaRevalidationInProgress:c,isMediaCacheInvalid:f,revalidateMedia:function(){d(!0),t()},revalidateWithParams:e=>{h(N$({...A,...e}))}}}({config:l,revalidate:function(){NJ({config:l,keyword:p,assetType:A,uploaderId:h,tagIds:m})},keyword:p,assetType:A,uploaderId:h,tagIds:m}),{isUploading:P,onFilesSelected:W,uploadingFiles:D,onRetry:N}=function(e){let{onBeforeUpload:t,onComplete:n}=e,[r,i]=(0,C.useState)([]),o=r.some(e=>"idle"===e.status||"uploading"===e.status),a=WI(),u=(0,C.useCallback)(e=>{let n=[{...e,status:"idle"},...r.filter(t=>t.id!==e.id)];i(n),t(n)},[t,r]);return(0,C.useEffect)(function(){if(!r.length||r.some(e=>"uploading"===e.status)||r.every(e=>"error"===e.status))return;let e=r.find(e=>"idle"===e.status);if(!e)return;let t=r;function o(e){i(t=e(t)),t.every(e=>"success"===e.status||"error"===e.status)&&setTimeout(()=>{i([]),null==n||n(t)},1500)}o(t=>t.map(t=>t.id===e.id?{...t,status:"uploading"}:t)),(function(e){let{file:t,config:n}=e;if(!n.mediaLibrary)throw Error("Media Library not configured.");let{assetsApiBaseUrl:r,repository:i,authStrategy:o}=n,a=new FormData;return a.append(t.name,t),(0,j.WY)(new URL("assets",r),{headers:{repository:i,"Content-Type":"multipart/form-data",...ND},method:"POST",body:a,credentials:(0,j.xb)(o),okType:NW})})({file:e.file,config:a}).then(t=>{o(n=>n.map(n=>n.id===e.id?{...n,status:"success",response:t}:n))}).catch(()=>{o(t=>t.map(t=>t.id===e.id?{...t,status:"error"}:t))})},[a,r,n]),{isUploading:o,uploadingFiles:r,onFilesSelected:function(e){let n=e.map(e=>({id:`temp-${crypto.randomUUID()}`,file:e,status:"idle"}));i(n),t(n)},onRetry:u}}({onBeforeUpload:e=>{y();let t=e.filter(e=>"idle"===e.status).map(e=>({id:e.id,url:URL.createObjectURL(e.file),filename:e.file.name,size:e.file.size,extension:e.file.type,kind:e.file.type,last_modified:e.file.lastModified,tags:[],uploader_id:d.shortId}));I(t);let[n]=t??[];n&&q.toggleSelection({id:n.id,isSingleSelection:!0})},onComplete:e=>{let t=e.flatMap(e=>"success"===e.status?e:(function(e){let t=(0,O.tx)(e.file.name,30);c({id:e.id,title:`The specified file "${t}" could not be uploaded.`,subtitle:V.jsxs(S.xv,{color:"inherit",children:["Read more about our"," ",V.jsx(S.xv,{color:"tomato11",href:"https://prismic.io/docs/guides/manage-images#supported-media",underline:!0,children:"supported media"}),"."]}),buttons:{action:{text:"Retry upload",icon:"cloudUpload",onClick:()=>N(e)}}})}(e),{id:e.id,response:void 0}));w(t),E({config:l,assetType:A,tagIds:m}),f();let n=t[0];n&&n.response&&q.isSelected(n.id)&&q.toggleSelection({id:n.response.id,isSingleSelection:!0})}}),q=Wb({totalItemCount:T,onChangeSelection:({selectedIds:e,selectedCount:t})=>{if(z(!1),r){if(1===t){let[t]=[...e];if(D.some(e=>e.id===t&&"success"!==e.status)){r(new Set);return}}r(new Set(e))}}}),[Q,z]=(0,C.useState)(!1);return V.jsx(N5.Provider,{value:{isFetchingMedia:o,media:v,mediaTotal:T,onScrollToBottom:function(){b&&a(x)},actionContainerRef:i,onFilesUpload:function(e){P||W(e)},isUploading:P,uploadingFiles:D,isMediaRevalidationInProgress:U,isMediaCacheInvalid:L,revalidateMedia:K,deleteMedia:_,updateMedia:function(e,t){w([{id:e,response:t}])},keyword:p,isSearchingMedia:u,assetType:A,initialAssetType:n,uploaderId:h,tagManagerOpen:Q,setTagManagerOpen:z,tagIds:m,onFilterChange:function(e){let t={keyword:p,assetType:A,tagIds:m,uploaderId:h,...e};!function(e){let t=e.keyword===NQ.keyword,r=e.assetType===n,i=e.uploaderId===NQ.uploaderId,o=e.tagIds.length===NQ.tagIds.length&&e.tagIds.every((e,t)=>e===NQ.tagIds[t]);return t&&r&&i&&o}(t)?k(t):B(e),s(()=>{g(e),q.clearSelection()})},openMediaSection:F,setOpenMediaSection:M},children:t})}function N9(){let e=(0,C.useContext)(N5);if(!e)throw Error("useMediaLibrary must be used within a MediaLibraryProvider");return e}function N4(){return 0===function(){let e=WI(),{initialAssetType:t}=N9(),{assetsApiBaseUrl:n,repository:r="",authStrategy:i="token"}=e.mediaLibrary?e:{},{total:o}=(0,R.QT)(Nq,N$({assetsApiBaseUrl:n,authStrategy:i,repository:r,assetType:t,keyword:"",tagIds:[],page:0}));return o}()}function N8(){return N4()?V.jsx(qt,{}):V.jsx(qe,{})}function N7(e){let{children:t}=e;return V.jsx(S.xu,{justifyContent:"center",flexDirection:"column",height:"100%",children:t})}function qe(){return V.jsx(N7,{children:V.jsxs(S.R$,{children:[V.jsx(S.av,{name:"close",lineColor:"purple10",backgroundColor:"purple3",borderColor:"purple6",borderStyle:"dashed",size:"xlarge"}),V.jsx(S._T,{size:"big",children:"Oops!"}),V.jsx(S.nf,{width:360,children:"No items found matching your search"})]})})}function qt(){let{onFilesUpload:e}=N9();return V.jsx(N7,{children:V.jsxs(S.xu,{gap:20,flexDirection:"column",alignItems:"center",children:[V.jsx(S.xu,{maxWidth:375,children:V.jsx(S._T,{size:"big",children:"Start by uploading your files!"})}),V.jsx(S.xu,{border:!0,borderStyle:"dashed",borderRadius:4,justifyContent:"center",children:V.jsxs(S.R$,{sx:{marginBlock:80,marginInline:48},children:[V.jsx(S.av,{name:"cloudUpload",lineColor:"purple11",backgroundColor:"purple5",size:"large"}),V.jsx(S._T,{children:"Drop your files anywhere to upload or ..."}),V.jsx(S.KH,{onFilesSelected:e,renderButton:e=>V.jsx(S.xu,{display:"inline-flex",as:"span",children:V.jsx(S.zx,{onClick:e,color:"grey",children:"Upload media"})})}),V.jsx(S.nf,{children:"Maximum upload size file: 128 MB"})]})})]})})}let qn={warning:{uploadWhileUploading:{title:"Hang tight!",description:"Your current images are still being uploaded. Once they're all set, you'll be free to upload more."}}};function qr(){let{actionContainerRef:e,isUploading:t,onFilesUpload:n,assetType:r}=N9(),i=(null==e?void 0:e.current)!==void 0;return V.jsx(qo,{actionContainerRef:e,children:V.jsxs(S.xu,{width:"100%",gap:16,children:[V.jsx(qi,{}),V.jsx(S.u,{title:qn.warning.uploadWhileUploading.title,content:qn.warning.uploadWhileUploading.description,visible:t,stableMount:!0,children:V.jsx(S.KH,{disabled:t,onFilesSelected:n,startIcon:"cloudUpload",color:i?"purple":"grey",size:"large",assetType:r,children:"Upload media"})})]})})}function qi(){let{keyword:e,onFilterChange:t,isFetchingMedia:n}=N9(),[r,i]=(0,C.useState)(e);return(0,_.pQ)(e,()=>{""===e&&i("")}),(0,_.Nr)(r,300,(0,_.R9)(e=>t({keyword:e}))),V.jsx(S.xu,{width:"100%",flexDirection:"column",children:V.jsx(S.CR,{value:r,placeholder:"Search",onValueChange:i,maxLength:200,isLoading:n&&e!==r})})}function qo(e){let{children:t,actionContainerRef:n}=e,r=(null==n?void 0:n.current)!==void 0,i=r?S.Uv:C.Fragment,o=r?{container:n.current,asChild:!0}:{},a=(0,_.NW)();return(0,C.useLayoutEffect)(()=>{a()},[a]),V.jsx(i,{...o,children:t})}function qa(e){let{children:t}=e,{onFilesUpload:n,assetType:r}=N9();return V.jsx(S.Zz,{overlay:V.jsx(qu,{}),onFilesSelected:n,assetType:r,children:t})}function qu(){let{isUploading:e}=N9(),t=e?qn.warning.uploadWhileUploading.title:"Drop files here",n=e?qn.warning.uploadWhileUploading.description:"Drop your files to upload them instantly to the media library.";return V.jsx(S.xu,{justifyContent:"center",flexDirection:"column",height:"100%",children:V.jsxs(S.R$,{children:[V.jsx(S.av,{name:e?"block":"cloudUpload",lineColor:e?"tomato11":"purple10",backgroundColor:e?"tomato2":"purple3",borderColor:e?"tomato6":"purple6",borderStyle:"dashed",size:"xlarge"}),V.jsx(S._T,{size:"big",children:t}),V.jsx(S.nf,{width:360,children:n})]})})}function qs(){return V.jsx(S.Iq,{title:"Oops! Something went wrong",description:"An error occurred while searching for your image.",errorImageSrc:S.Os,sx:{marginBlock:"auto",marginInline:"auto"}})}function ql(e){let{mediaList:t,mediaActions:n,mediaToolbar:r,sidePane:i}=e,o=(0,S.ac)({min:"medium"}),a=i&&o;return V.jsxs(S.xu,{display:"grid",gridTemplateRows:"auto auto 1fr",gridTemplateColumns:a?"1fr 380px":"1fr",width:"100%",height:"100%",children:[V.jsxs(S.xu,{position:"relative",display:"grid",gap:16,gridColumn:"1",gridRow:"1",padding:{right:16,bottom:16},children:[n,r]}),V.jsx(S.xu,{position:"relative",display:"grid",gridColumn:"1",gridRow:"2 / -1",children:t}),a&&i]})}function qc(){var e;let{onScrollToBottom:t,media:n,isUploading:r,uploadingFiles:i,isSearchingMedia:o,isMediaRevalidationInProgress:a,setOpenMediaSection:u,isFetchingMedia:s}=N9(),l=Wb(),c=(0,C.useRef)(null);function d(e,t,r){let i=t.shiftKey?n.map(({id:e})=>e):void 0;l.toggleSelection({id:e,isSingleSelection:"single"===r,metaKey:t.metaKey,shiftKey:t.shiftKey,ids:i})}return(r||o||a)&&(null==(e=c.current)||e.scrollTo({top:0,behavior:"instant"})),V.jsxs(qd,{onScrollToBottom:t,scrollAreaRef:c,children:[n.map(e=>{var t,n;return V.jsx(S.PB,{"aria-label":"media item",...e,filenameHighlight:null==(t=e.search_highlight)?void 0:t.filename,loading:o,status:null==(n=i.find(t=>t.id===e.id))?void 0:n.status,selected:l.isSelected(e.id),onCardClick:t=>d(e.id,t,"single"),onCheckedChange:(t,n)=>d(e.id,n,"multi"),onAddTagClick:()=>{var t;return t=e.id,void(l.toggleSelection({id:t,isSingleSelection:!0}),u("tags"))}},e.id)}),V.jsx(S.xu,{gridColumn:"1 / -1",justifyContent:"center",children:V.jsx(S.Fp,{animation:{name:"fade"},children:s&&V.jsx(S.xv,{align:"center",color:"grey11",sx:{marginBlock:8},children:"Loading more items ..."})})})]})}function qd(e){let{children:t,scrollAreaRef:n,onScrollToBottom:r}=e;return V.jsx(S.xr,{"aria-label":"Media list",ref:n,style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(max(250px, calc((100% - 48px) / 4)), 1fr))",gridTemplateRows:"1fr 1fr 1fr ",gap:16,padding:2,paddingBottom:16,position:"relative"},onScrollToBottom:r,threshold:500,children:t})}function qf(e){let{children:t,hasSelectedMedia:n}=e;return V.jsx(S.xu,{overflow:"hidden",gridColumn:"2 / -1",gridRow:"1 / -1",children:V.jsx(S.xr,{style:{display:"grid",height:"100%"},children:V.jsx(S.xu,{flexGrow:1,borderRadius:{topRight:8,topLeft:8},borderStyle:n?"solid":"dashed",border:{top:!0,right:!0,left:!0,bottom:!1},minWidth:0,children:t})})})}function qp(e){let{onFilesUpload:t,isUploading:n,isInitialLoad:r=!1}=e,i=r||n;return V.jsxs(S.xu,{flexDirection:"column",justifyContent:"center",alignItems:"center",padding:16,gap:16,width:"100%",children:[V.jsx(S.av,{name:"cloudUpload",lineColor:"purple11",backgroundColor:"purple5",size:"large"}),V.jsx(S.xu,{flexDirection:"column",gap:4,children:V.jsxs(S.xv,{align:"center",children:["Select or"," ",V.jsx(S.KH,{disabled:i,onFilesSelected:t,renderButton:e=>V.jsx(S.u,{title:qn.warning.uploadWhileUploading.title,content:qn.warning.uploadWhileUploading.description,visible:n,children:V.jsx(S.xu,{display:"inline-flex",as:"span",children:V.jsx(S.zx,{disabled:i,onClick:e,invisible:!0,children:"upload"})})})})," ","media."]})}),V.jsx(S.KH,{disabled:i,onFilesSelected:t,color:"grey",children:"Upload media"})]})}function qA(e){let{count:t}=e;return V.jsxs(S.xv,{variant:"bold",children:[t," item",1==t?"":"s"]})}function qh(e){let{actionContainerRef:t}=e;return V.jsx(ql,{sidePane:V.jsx(qy,{}),mediaActions:V.jsx(qg,{actionContainerRef:t}),mediaToolbar:V.jsx(S.Od,{color:"grey5",borderRadius:12,children:V.jsx(qA,{count:888})}),mediaList:V.jsx(qm,{})})}function qm(){return V.jsx(qd,{children:(0,E.w6)(1,24).map(e=>V.jsx(qv,{},e))})}function qg(e){let{actionContainerRef:t}=e,n=(0,_.NW)();return(0,C.useLayoutEffect)(()=>{n()},[n]),V.jsx(qo,{actionContainerRef:t,children:V.jsxs(S.xu,{width:"100%",gap:16,children:[V.jsx(S.xu,{width:"100%",flexDirection:"column",children:V.jsx(S.CR,{placeholder:"Search",maxLength:200,value:"",disabled:!0,onValueChange:()=>{}})}),V.jsx(S.KH,{disabled:!0,onFilesSelected:()=>{},startIcon:"cloudUpload",color:t?"purple":"grey",size:"large",children:"Upload media"})]})})}function qy(){return V.jsx(qf,{hasSelectedMedia:!1,children:V.jsx(qp,{onFilesUpload:()=>{},isUploading:!1,isInitialLoad:!0})})}function qv(){return V.jsxs(S.xu,{height:302,width:"100%",flexDirection:"column",padding:16,backgroundColor:"grey1",border:!0,borderStyle:"solid",borderRadius:6,children:[V.jsx(S.Od,{height:164,width:"100%"}),V.jsx(S.Od,{height:16,width:"100%",sx:{marginTop:12}}),V.jsx(S.Od,{height:10,width:100,sx:{marginTop:8}}),V.jsx(S.Od,{height:1,width:"100%",sx:{marginTop:20,marginBottom:16}}),V.jsxs(S.xu,{flexDirection:"row",gap:8,children:[V.jsx(S.Od,{height:24,width:54}),V.jsx(S.Od,{height:24,width:45}),V.jsx(S.Od,{height:24,width:62})]})]})}let qx=(0,C.createContext)({showToast:()=>{}});function qb(e){let{children:t}=e,[n,r]=(0,C.useState)({title:"",seconds:5}),[i,o]=(0,C.useState)(!1),{title:a,action:u,seconds:s=1,icon:l="check"}=n,c=(0,C.useMemo)(()=>({showToast:e=>{r({seconds:s,...e}),o(!0)}}),[s]);return V.jsxs(V.Fragment,{children:[V.jsx(qS,{}),V.jsx(S.FN,{anchor:V.jsx(S.xu,{position:"absolute",justifyContent:"center",width:"100%",bottom:72}),open:i,onOpenChange:o,title:a,action:u,seconds:s,icon:l}),V.jsx(qx.Provider,{value:c,children:t})]})}function qC(){return(0,C.useContext)(qx)}function qS(){let{revalidateMedia:e,isMediaCacheInvalid:t}=N9(),[n,r]=(0,C.useState)(t);return(0,_.pQ)(t,r),V.jsx(S.FN,{anchor:V.jsx(S.xu,{position:"absolute",justifyContent:"center",width:"100%",bottom:72}),open:n,title:"There have been changes to your media library",action:{title:"Update",onClick:e},cancel:{onClick:()=>r(!1)}})}function qw(){let{media:e}=N9(),t=Wb();return e.filter(({id:e})=>t.isSelected(e))}function qI(){let[e,t]=(0,C.useState)(!1),n=qw(),r=Wb(),i=(0,C.useMemo)(()=>n.some(({id:e})=>e.startsWith("temp")),[n]),[o]=n;return o?r.selectedCount>1?V.jsxs(S.xu,{gap:8,alignItems:"center",children:[V.jsxs(S.xv,{variant:"emphasized",noWrap:!0,sx:{flexGrow:1},children:[r.selectedCount," media selected"]}),V.jsx(S.u,{content:"Open all selected media in new tabs",children:V.jsx(S.hU,{icon:"openInFull",variant:"solid",size:"small",onClick:()=>n.forEach(e=>window.open(e.url,"_blank"))})}),V.jsx(S.u,{content:"Remove selected media",children:V.jsx(S.hU,{icon:"delete",variant:"solid",color:"tomato",size:"small",hiddenLabel:"Remove media",onClick:()=>t(!0),disabled:i})}),V.jsx(q_,{open:e,onOpenChange:t,media:n})]}):V.jsxs(S.xu,{gap:8,alignItems:"center",children:[V.jsx(S.xv,{variant:"emphasized",noWrap:!0,sx:{flexGrow:1},children:o.filename}),V.jsxs(S.xu,{gap:8,children:[V.jsx(S.u,{content:"Open media in new tab",children:V.jsx(S.hU,{icon:"openInFull",variant:"solid",size:"small",hiddenLabel:"Open media in new tab",onClick:()=>window.open(o.url,"_blank"),disabled:i})}),V.jsx(S.u,{content:"Copy media URL",children:V.jsx(S.hU,{icon:"link",variant:"solid",size:"small",hiddenLabel:"Copy media URL",onClick:()=>navigator.clipboard.writeText(o.url),disabled:i})}),V.jsx(S.u,{content:"Remove media",children:V.jsx(S.hU,{icon:"delete",variant:"solid",color:"tomato",size:"small",hiddenLabel:"Remove media",onClick:()=>t(!0),disabled:i})}),V.jsx(q_,{open:e,onOpenChange:t,media:o})]})]}):null}function q_(e){let{open:t,onOpenChange:n,media:r}=e,i=WI(),{showAlert:o}=(0,S.VY)(),{deleteMedia:a}=N9(),u=Wb(),s=N6(),[l,c]=(0,C.useState)(!1),d=Array.isArray(r),f=d?"these items":"this item";return V.jsxs(S.Vq,{onOpenChange:n,open:t,size:"small",children:[V.jsx(S.fK,{icon:"alert",title:`Remove ${f} from your media library?`}),V.jsx(S.cZ,{children:V.jsxs(S.xu,{padding:16,flexDirection:"column",children:[V.jsxs(S.xv,{children:["You are about to delete ",f,": \xa0",!d&&V.jsx("b",{children:r.filename})]}),d&&V.jsx(qT,{media:r})]})}),V.jsxs(S.kX,{children:[V.jsx(S.PO,{}),V.jsxs(S._d,{onClick:function(){c(!0);let e=u.getSelectionState().selectedIds;(function(e){let{ids:t,config:n}=e;if(!n.mediaLibrary)throw Error("Media Library not configured.");if(0===t.length)throw Error("No ids provided during media deletion");let{assetsApiBaseUrl:r,repository:i,authStrategy:o}=n;if(1===t.length){let[e]=t;return(0,j.WY)(new URL(`assets/${e}`,r),{headers:{repository:i},method:"DELETE",credentials:(0,j.xb)(o),okType:Ni.unknown()})}return(0,j.WY)(new URL("assets/bulk-delete",r),{headers:{repository:i},method:"POST",credentials:(0,j.xb)(o),okType:Ni.unknown(),body:{ids:t}})})({ids:e,config:i}).then(()=>{n(!1),a(e),u.clearSelection(),s()}).catch(()=>{n(!1),o({title:"Error",subtitle:`Something went wrong when removing ${f}.`})}).finally(()=>{c(!1)})},color:"tomato",loading:l,children:["Yes, I want to remove ",f]})]})]})}function qT(e){let{media:t}=e,n=t.slice(0,15),r=t.length>15,i=r?t.length-15:0;return V.jsxs(S.QI,{density:"compact",sx:{marginTop:8},children:[n.map((e,t)=>V.jsx(S.HC,{children:V.jsx("b",{children:e.filename})},t)),r&&V.jsxs(S.HC,{children:["And ",V.jsx("b",{children:i})," more ",1===i?"item":"items","..."]})]})}function qk(){var e;let t=qw(),{uploadingFiles:n}=N9(),[r]=t;if(!r)return null;if(2===t.length)return V.jsx(qO,{children:t.map((e,t)=>V.jsx("div",{style:{position:"absolute",transform:0===t?"translateX(25%) rotate(15deg) ":"translateX(-25%) rotate(-15deg) "},children:V.jsx(qE,{media:e})},e.id))});if(t.length>2)return V.jsx(qO,{children:t.slice(-4).map((e,t)=>V.jsx("div",{style:{position:"absolute",paddingRight:16*t},children:V.jsx(qE,{media:e})},e.id))});let i=null==(e=n.find(e=>e.id===r.id))?void 0:e.status,o=r.kind.startsWith("image");return V.jsx(S.xu,{flexDirection:"column",children:V.jsx(S.hM,{children:V.jsx(qO,{uploadStatus:i,hasImage:o,children:o?V.jsx(S.Ee,{src:r.url,alt:r.alt,sizing:"contain"}):V.jsx(S.Sp,{kind:r.kind,filename:r.filename})})})})}function qO(e){let{children:t,uploadStatus:n,hasImage:r}=e;return V.jsxs(S.xu,{flexDirection:"column",alignItems:"center",justifyContent:"center",position:"relative",height:200,width:"100%",backgroundColor:r?"transparent":"purple2",children:[t,n&&V.jsx(qR,{uploadStatus:n})]})}function qR(e){let{uploadStatus:t}=e,{value:n,color:r,height:i,transition:o}=function(e){switch(e){case"idle":return{value:0,height:"collapsed",color:"grey4"};case"uploading":return{value:90,transition:"slow",color:"purple9"};case"success":return{value:100,height:"collapsed",color:"purple9"};case"error":return{value:100,color:"tomato11"}}}(t);return V.jsx(S.xu,{position:"absolute",backgroundColor:"greyAlpha1",width:"100%",height:"100%",padding:{inline:16},justifyContent:"end",flexDirection:"column",children:V.jsx(S.ko,{value:n,color:r,height:i,transition:o})})}function qE(e){let{media:t}=e;return V.jsx(S.xu,{width:111,height:152,children:"image"===t.kind?V.jsx(S.Ee,{borderRadius:8,src:t.url,alt:t.alt,sizing:"cover"}):V.jsx(S.Sp,{kind:t.kind,filename:t.filename})})}let qj="__MAIN_THUMBNAIL__";function qF(e,t,n){let r;return[e.name===qj?void 0:e.name,(r=t?(0,k.$)(n)?[n.width,n.height]:(0,k.$)(e.width)||(0,k.$)(e.height)?[e.width??void 0,e.height??void 0]:[t.origin.width,t.origin.height]:void 0)?`${r[0]??"auto"}\xd7${r[1]??"auto"}px`:void 0]}function qM(e){let t=new URL(e);return t.searchParams.delete("q"),t.searchParams.set("w","800"),t.searchParams.set("h","800"),t.searchParams.set("auto","compress,format"),t.searchParams.set("fit","max"),t.toString()}function qU(e){return null!=e&&e.url?qM(e.url):void 0}function qL(e,t){let{width:n,height:r,rect:i}=function(e,t){let[n,r]=function(e,t){let{width:n,height:r}=t??{};return n&&r?[n,r]:n?[n,Math.round(e.height*(n/e.width))]:r?[Math.round(e.width*(r/e.height)),r]:[e.width,e.height]}(e,t),i=Math.max(n/e.width,r/e.height),o=Math.round((e.width-n/i)/2),a=Math.round((e.height-r/i)/2);return{width:n,height:r,rect:{x:o,y:a,width:Math.round(n/i),height:Math.round(r/i)}}}({...e,width:(null==e?void 0:e.width)??2e3,height:(null==e?void 0:e.height)??2e3},t),o=!!(null!=t&&t.width||null!=t&&t.height);return{provider:"imgix",url:function(e,t,n,r,i){if("svg"===function(e){let{pathname:t}=new URL(e),n=t.lastIndexOf(".");if(-1!==n)return t.substring(n).slice(1).toLowerCase()}(e))return e;let o=new URL(e);if(i){let{x:e,y:i,width:a,height:u}=t,s=[...o.searchParams.entries(),["rect",[e,i,a,u].join(",")],["w",n],["h",r]];o.search=s.map(e=>e.join("=")).join("&")}return o.toString()}(e.url,i,n,r,o),alt:e.alt,..."kind"in e&&"extension"in e?{credits:e.credits}:{},origin:{id:e.id,url:e.url,width:e.width??2e3,height:e.height??2e3},width:n,height:r,edit:{background:"transparent",zoom:1,crop:{x:i.x,y:i.y}}}}function qK(e){if(!e)return"";let{filename:t,extension:n}=e;if(!n)return t;let r=RegExp(`\\.${n}$`);return t.replace(r,"")}function qB(e){let{tags:t,toggleAssetTag:n,getTagsLabel:r}=e,{setTagManagerOpen:i}=N9(),{showToast:o}=qC(),{showAlert:a}=(0,S.VY)(),[u,s]=(0,C.useState)("");async function l(e,t){s("");try{await n(e,t),o({title:"Media tags were updated",seconds:3})}catch{a({title:"Error",subtitle:"Something went wrong when updating media tags"})}}return V.jsxs(S.xu,{flexDirection:"column",children:[V.jsxs(S.xu,{justifyContent:"space-between",children:[V.jsx(S.xv,{color:"grey12",variant:"bold",children:r()}),V.jsx(S.zx,{startIcon:"edit",invisible:!0,color:"dark",onClick:()=>i(!0),children:"Manage tags"})]}),V.jsxs(S.BC,{sx:{marginTop:4,marginBottom:8},children:[V.jsx(qP,{searchTerm:u,setSearchTerm:s}),V.jsx(S.KV,{children:V.jsx(S.SV,{renderError:()=>V.jsx(S.xv,{color:"grey9",variant:"small",sx:{marginBlock:8,marginInline:8},children:"Error getting tags"}),children:V.jsx(C.Suspense,{fallback:V.jsx(S.xu,{padding:8,flexDirection:"column",gap:8,children:(0,E.w6)(1,6).map(e=>V.jsx(S.Od,{height:24,width:85},e))}),children:V.jsx(qW,{searchTerm:u,assignedTags:t,onToggleAssetTag:l})})})})]}),V.jsx(S.xu,{flexDirection:"column",alignItems:"flex-start",gap:8,children:t.map(e=>V.jsx(S.Ct,{title:e.name,size:"medium",color:"purple",selected:!0,onClose:()=>l(e,"remove")},e.id))})]})}function qP(e){let{searchTerm:t,setSearchTerm:n}=e,r=(0,C.useRef)(null),{openMediaSection:i,setOpenMediaSection:o}=N9();return(0,C.useEffect)(()=>{var e;"tags"===i&&(null==(e=r.current)||e.focus(),o(void 0))},[i,o]),V.jsx(S.Ie,{value:t,onValueChange:n,placeholder:"Add or create a new tag",ref:r})}function qW(e){let{searchTerm:t,assignedTags:n,onToggleAssetTag:r}=e,[i]=qw(),o=WI(),{showAlert:a}=(0,S.VY)(),{tags:u}=NF(),s=(0,C.useMemo)(()=>{let e=t.toLowerCase();return u.filter(t=>t.name.toLowerCase().includes(e))},[u,t]),l=NU.safeParse(t).success&&u.every(e=>e.name!==t);async function c(){let e;if(t&&i){try{e=await function(e){let{name:t,config:n}=e;n.mediaLibrary||WT("mediaLibrary");let{assetsApiBaseUrl:r,repository:i,authStrategy:o}=n;return(0,j.WY)(new URL("tags",r),{headers:{repository:i},body:{name:t},method:"POST",credentials:(0,j.xb)(o),okType:NL})}({name:t,config:o}),NB(t=>[e,...t])}catch{a({title:"Error",subtitle:`Something went wrong when creating the tag ${t}`});return}await r(e,"add")}}return i?V.jsxs(V.Fragment,{children:[!s.length&&V.jsx(S.xv,{color:"grey9",variant:"small",sx:{marginBlock:8,marginInline:8},children:"No tags found"}),s.map((e,t)=>V.jsx(S.c8,{value:e.id,onCheckedChange:t=>r(e,t?"add":"remove"),checked:n.some(t=>t.id===e.id),children:V.jsx(S.Ct,{title:e.name,color:"purple",size:"medium",sx:{marginInline:8,marginBottom:t===s.length-1?8:4,marginTop:0===t?8:4}})},e.id)),l&&V.jsx(S.c8,{value:"new",onCheckedChange:c,children:V.jsxs(S.xu,{padding:8,flexDirection:"row",alignItems:"center",gap:4,children:[V.jsx(S.I5,{name:"add",size:"small",color:"grey11"}),V.jsxs(S.xv,{color:"grey12",children:['Create tag "',t,'"']})]})})]}):null}function qD(e){let{selectedMedia:t}=e,n=WI(),r=(0,C.useMemo)(()=>(function(e){let t=e.length,n={},r=[];return e.forEach(e=>{e.tags.forEach(e=>{n[e.id]||(n[e.id]=0,r.push(e)),n[e.id]++})}),r.filter(e=>n[e.id]===t)})(t),[t]);async function i(e,r){let i="remove"===r,o=t.map(e=>e.id),a=[];NG(t=>(a=t,t.map(t=>o.includes(t.id)?i?function(e,t){let n=e.tags.filter(e=>e.id!==t.id);return{...e,tags:n}}(t,e):t.tags.some(({id:t})=>t===e.id)?t:{...t,tags:[...t.tags,e]}:t)));try{await function(e){let{tagId:t,assetIds:n,config:r,operation:i}=e;if(!r.mediaLibrary)throw Error("Media Library not configured.");let{assetsApiBaseUrl:o,repository:a,authStrategy:u}=r;return(0,j.WY)(new URL(`tags/${t}/assets`,o),{headers:{repository:a},body:{assetIds:n},method:"add"===i?"POST":"DELETE",credentials:(0,j.xb)(u),okType:Ni.unknown()})}({tagId:e.id,assetIds:o,operation:i?"remove":"add",config:n});let r=t.length*(i?-1:1);NB(t=>t.map(t=>t.id===e.id?{...t,count:t.count+r}:t))}catch(e){throw NG(()=>a),e}}return V.jsx(qB,{tags:r,getTagsLabel:function(){let e=r.length;return e>1?`${e} tags in common`:1===e?"1 tag in common":"Common tags"},toggleAssetTag:i})}function qN(e){let{selectedMedia:t}=e,n=t.tags,r=WI(),{updateMedia:i}=N9();async function o(e,n){let o=t.tags,a="remove"===n,u=a?o.filter(t=>t.id!==e.id):[...o,e];i(t.id,{tags:u});try{await function(e){let{mediaId:t,config:n,tags:r}=e;if(!n.mediaLibrary)throw Error("Media Library not configured.");let{assetsApiBaseUrl:i,repository:o,authStrategy:a}=n;return(0,j.WY)(new URL(`assets/${t}`,i),{headers:{repository:o},body:{tags:r},method:"PATCH",credentials:(0,j.xb)(a),okType:NW})}({mediaId:t.id,config:r,tags:u.map(e=>e.id)}),NB(t=>t.map(t=>t.id===e.id?{...t,count:t.count+(a?-1:1)}:t))}catch(e){throw i(t.id,{tags:o}),e}}return V.jsx(qB,{tags:n,getTagsLabel:function(){let e=n.length;return e>1?`${e} tags`:1===e?"1 tag":"Tags"},toggleAssetTag:o})}function qq(){let[e,t]=(0,C.useState)("description");if(1!==qw().length)return V.jsx(qG,{});let n="description"===e,r="more-info"===e;return V.jsxs(V.Fragment,{children:[V.jsxs(S.xu,{display:"grid",gridTemplateColumns:"1fr 1fr",backgroundColor:"grey2",border:!0,borderStyle:"solid",borderRadius:8,children:[V.jsx(S.OK,{selected:n,outline:n,transparent:!0,onClick:()=>t("description"),children:"Description"}),V.jsx(S.OK,{selected:r,outline:r,transparent:!0,onClick:()=>t("more-info"),children:"More info"})]}),V.jsx(qQ,{tab:e})]})}function qQ(e){let{tab:t}=e;switch(t){case"description":return V.jsx(qV,{});case"more-info":return V.jsx(qz,{})}}function qV(){let{title:e,alt:t,onBlur:n,isUploading:r,selectedMedia:i}=qZ();if(!i)return null;let{extension:o}=i;return V.jsxs(S.xu,{flexDirection:"column",gap:16,children:[V.jsx(S.yt,{value:e.value,onValueChange:e.set,label:"Media title",placeholder:"Media title",onBlur:n,disabled:r,suffix:o?`.${o}`:void 0}),V.jsx(S.Cz,{label:"Alternative text",children:V.jsx(S.f$,{content:t.displayValue,contentVersion:t.version,readOnly:r,placeholder:"A short description of the media for accessibility",multiline:!0,decorations:{em:"highlight"},onChange:t.onChange,onBlur:n})}),!r&&V.jsx(qN,{selectedMedia:i})]})}function qz(){let{credits:e,notes:t,onBlur:n,isUploading:r,selectedMedia:i}=qZ();if(!i)return null;let{uploader_id:o}=i,a=function(e){let{width:t,height:n,last_modified:r,size:i,extension:o}=e,a=t&&n,u={label:"Date",value:(0,T._L)(new Date(r))};return[u,{label:"File size",value:(0,O.td)(i)},a?{label:"Dimensions",value:`${t}\xd7${n}`}:void 0,a?{label:"Ratio",value:((t??0)/(n??0)).toFixed(1)}:void 0,o?{label:"Extension",value:o.toUpperCase()}:void 0].filter(k.$)}(i);return V.jsxs(S.xu,{gap:8,flexDirection:"column",children:[a.map(e=>V.jsxs(S.xu,{gap:8,children:[V.jsxs(S.xv,{color:"grey11",children:[e.label,":"]}),V.jsx(S.xv,{children:e.value})]},e.label)),V.jsxs(S.xu,{gap:8,children:[V.jsx(S.xv,{color:"grey11",children:"Uploaded by:"}),V.jsx(S.SV,{renderError:()=>V.jsx(S.xv,{color:"grey11",children:"Error getting uploader"}),children:V.jsx(C.Suspense,{fallback:V.jsx(qH,{}),children:V.jsx(qY,{uploaderId:o})})})]}),V.jsx(S.Cz,{label:"Copyright",children:V.jsx(S.f$,{content:e.displayValue,contentVersion:e.version,readOnly:r,placeholder:"Media copyrights or credits",multiline:!0,decorations:{em:"highlight"},onChange:e.onChange,onBlur:n})}),V.jsx(S.Cz,{label:"Private notes",children:V.jsx(S.f$,{content:t.displayValue,contentVersion:t.version,readOnly:r,placeholder:"Private notes are never shared publicly",multiline:!0,decorations:{em:"highlight"},onChange:t.onChange,onBlur:n})})]})}function qY(e){let{uploaderId:t}=e,{uploadersById:n}=NX(),r=n.get(t??"ghost");return t&&!r?V.jsx(qH,{}):r?V.jsxs(V.Fragment,{children:[V.jsx(S.qE,{size:24,firstName:r.firstName,lastName:r.lastName,imageUrl:r.uploadedAvatar,hasBorder:!1}),V.jsx(S.xv,{children:r.name})]}):null}function qH(){return V.jsx(S.Od,{width:128})}function qG(){let e=qw(),{uploadingFiles:t}=N9(),n=(0,C.useMemo)(()=>t.some(t=>e.some(e=>t.id===e.id)&&"success"!==t.status),[e,t]);return V.jsx(V.Fragment,{children:!n&&V.jsx(qD,{selectedMedia:e})})}function qZ(){let[e]=qw(),{updateMedia:t,uploadingFiles:n}=N9(),r=WI(),{showToast:i}=qC(),o=(null==e?void 0:e.id)??"",a=qJ(e,"alt"),u=qJ(e,"notes"),s=qJ(e,"credits"),l=qJ(e,"filename",qK),c=n.some(t=>t.id===(null==e?void 0:e.id)&&"success"!==t.status);return{selectedMedia:e,onBlur:function(){if(!e||!l.changed&&!a.changed&&!s.changed&&!u.changed)return;let{extension:n,search_highlight:c}=e,d=n?`${l.value}.${n}`:l.value;t(o,{filename:d,alt:a.value,credits:s.value,notes:u.value,search_highlight:{alt:a.changed||null==c?void 0:c.alt,credits:s.changed||null==c?void 0:c.credits,filename:l.changed||null==c?void 0:c.filename,notes:u.changed||null==c?void 0:c.notes}}),(function(e){let{id:t,config:n,metadata:r}=e;if(!n.mediaLibrary)throw Error("Media Library not configured.");let{assetsApiBaseUrl:i,repository:o,authStrategy:a}=n;return(0,j.WY)(new URL(`assets/${t}`,i),{headers:{repository:o},body:{...r},method:"PATCH",credentials:(0,j.xb)(a),okType:NW})})({id:o,config:r,metadata:{filename:d,alt:a.value,credits:s.value,notes:u.value}}).then(()=>{i({title:"Media metadata has been saved.",seconds:3})}).catch(e=>{console.error(e)})},isUploading:c,title:l,alt:a,credits:s,notes:u,extension:null==e?void 0:e.extension}}function qJ(e,t,n=e=>null==e?void 0:e[t]){var r,i;let o=n(e)??"",[a,u]=(0,C.useState)(o);(0,_.pQ)(null==e?void 0:e.id,()=>u(o));let s=null==(r=null==e?void 0:e.search_highlight)?void 0:r[t];return{value:a,set:u,displayValue:(null==(i=s??a)?void 0:i.replace(/\n/g,"<br>"))??"",onChange:function(e){let{from:t,to:n}=e.state.selection;e.commands.selectAll(),e.commands.unsetAllMarks(),e.commands.setTextSelection({from:t,to:n}),u(e.getText())},version:`${(null==e?void 0:e.id)??""}_${!!s}`,changed:a!==o}}function q$(){let{setTagManagerOpen:e}=N9(),[t,n]=(0,C.useState)("");return V.jsxs(S.xu,{gap:20,flexDirection:"column",height:"100%",children:[V.jsxs(S.xu,{alignItems:"center",gap:4,children:[V.jsx(S.hU,{icon:"close",size:"small",hasPadding:!1,onClick:()=>e(!1)}),V.jsx(S.xv,{variant:"bold",children:"Tags management"})]}),V.jsxs(S.xu,{gap:16,flexDirection:"column",height:"100%",children:[V.jsx(S.CR,{value:t,onValueChange:n,placeholder:"Search for tags",endAdornment:!1,autoFocus:!0}),V.jsx(S.SV,{renderError:()=>V.jsx(q2,{}),children:V.jsx(C.Suspense,{fallback:V.jsx(q6,{}),children:V.jsx(qX,{searchTerm:t})})})]})]})}function qX(e){let{searchTerm:t}=e,{tags:n}=NF(),r=n.filter(e=>e.name.toLowerCase().includes(t.toLowerCase()));return 0===r.length?V.jsx(S.xv,{color:"grey9",variant:"small",children:"No tags found"}):V.jsx(S._M,{ariaLabel:"Tags list",getItemKey:e=>e.id,gap:16,items:r,children:e=>V.jsx(q0,{tag:e})})}function q0(e){let{tag:t}=e,[n,r]=(0,C.useState)(!1),i=WI(),{showAlert:o}=(0,S.VY)(),{showToast:a}=(0,S.pm)(),{tags:u}=NF();async function s(e){if(!NU.safeParse(e).success){o({title:"Error",subtitle:`Failed to rename tag "${t.name}" to "${e}". Tag name must be at least 1 and at maximum 20 characters long.`});return}if(u.some(t=>t.name===e)){o({title:"Error",subtitle:`Failed to rename tag "${t.name}" to "${e}". Tag with name "${e}" already exists.`});return}try{await function(e){let{id:t,name:n,config:r}=e;r.mediaLibrary||WT("mediaLibrary");let{assetsApiBaseUrl:i,repository:o,authStrategy:a}=r;return(0,j.WY)(new URL(`tags/${t}`,i),{headers:{repository:o},method:"PATCH",credentials:(0,j.xb)(a),body:{name:n},okType:Ni.unknown()})}({id:t.id,name:e,config:i}),NB(n=>n.map(n=>n.id===t.id?{...n,name:e}:n)),NG(n=>n.map(n=>{if(-1!==n.tags.findIndex(e=>e.id===t.id)){let r=n.tags.map(n=>n.id===t.id?{...n,name:e}:n);return{...n,tags:r}}return n})),a({title:`Tag "${t.name}" renamed to "${e}"`,seconds:3})}catch{o({title:"Error",subtitle:"Something went wrong when renaming the tag."})}}return V.jsxs(V.Fragment,{children:[V.jsxs(S.xu,{justifyContent:"space-between",children:[V.jsx(S.Ct,{title:t.name,color:"purple",size:"medium",onEdit:s}),V.jsx(S.zx,{invisible:!0,color:"tomato",textWeight:"normal",onClick:()=>r(!0),children:"Delete"})]}),V.jsx(q1,{open:n,onOpenChange:r,tag:t})]})}function q1(e){let{open:t,onOpenChange:n,tag:r}=e,{id:i,name:o,count:a}=r,u=WI(),{showAlert:s}=(0,S.VY)(),[l,c]=(0,C.useState)(!1);async function d(){c(!0);try{await function(e){let{id:t,config:n}=e;n.mediaLibrary||WT("mediaLibrary");let{assetsApiBaseUrl:r,repository:i,authStrategy:o}=n;return(0,j.WY)(new URL(`tags/${t}`,r),{headers:{repository:i},method:"DELETE",credentials:(0,j.xb)(o),okType:Ni.unknown()})}({id:i,config:u}),NB(e=>e.filter(e=>e.id!==i)),NG(e=>e.map(e=>{if(-1!==e.tags.findIndex(e=>e.id===i)){let t=e.tags.filter(e=>e.id!==i);return{...e,tags:t}}return e}))}catch{s({title:"Error",subtitle:"Something went wrong when removing the tag."})}finally{c(!1),n(!1)}}return V.jsxs(S.Vq,{onOpenChange:n,open:t,size:"small",children:[V.jsx(S.fK,{title:`This tag is being used on ${a} media item${1===a?"":"s"}`}),V.jsx(S.cZ,{padding:16,children:V.jsxs(S.xv,{children:["You are about to delete the tag name ",V.jsx("b",{children:o}),"."," ",a>0&&`This tag is being
6
6
  used on ${a} media item${1===a?"":"s"} and will be deleted
7
- from ${1===a?"it":"them"}.`]})}),V.jsxs(S.kX,{children:[V.jsx(S.PO,{}),V.jsx(S._d,{onClick:d,color:"tomato",loading:l,children:"Yes, I want to delete"})]})]})}function q2(){let e=(0,C.useContext)(R.Nk);return V.jsx(S.xu,{flexDirection:"column",children:V.jsxs(S.R$,{children:[V.jsx(S.av,{name:"close",lineColor:"purple10",backgroundColor:"purple3",borderColor:"purple6",borderStyle:"dashed"}),V.jsx(S._T,{size:"big",children:"Oops!"}),V.jsx(S.nf,{width:360,children:"We couldn't load your media tags."}),V.jsx(S.Qj,{children:V.jsx(S.zx,{onClick:null==e?void 0:e.reset,size:"medium",children:"Try again"})})]})})}function q6(){return V.jsx(S.xu,{flexDirection:"column",gap:16,children:(0,E.w6)(1,6).map(e=>V.jsxs(S.xu,{justifyContent:"space-between",children:[V.jsx(S.Od,{height:24,width:85}),V.jsx(S.Od,{height:24,width:45})]},e))})}function q5(){let e=qw(),{onFilesUpload:t,isUploading:n,tagManagerOpen:r}=N9();return 0===e.length&&!1===r?V.jsx(qp,{onFilesUpload:t,isUploading:n}):V.jsx(S.xu,{flexDirection:"column",backgroundColor:"grey1",width:"100%",padding:16,gap:16,borderRadius:{topLeft:8,topRight:8},children:r?V.jsx(q$,{}):V.jsxs(V.Fragment,{children:[V.jsx(qI,{}),V.jsx(qk,{}),V.jsx(qq,{})]})})}function q3(){let e=Wb();return V.jsx(qf,{hasSelectedMedia:0!==e.selectedCount,children:V.jsx(q5,{})})}let q9={all:{name:"All media",icon:"public"},image:{name:"Images",icon:"image"},video:{name:"Videos",icon:"videocam"},document:{name:"Documents",icon:"insertDriveFile"},audio:{name:"Audio files",icon:"musicNote"}},q4=Object.entries(q9);function q8(){let{assetType:e,initialAssetType:t,onFilterChange:n}=N9(),[r,i]=(0,C.useState)(e);(0,_.pQ)(e,()=>{i(e)});let[o,a]=(0,C.useState)(!1),{icon:u,name:s}=q9[r],l=q9[t].name,c="all"!==t;return V.jsxs(S.h_,{open:o,onOpenChange:a,children:[V.jsx(S.$F,{disabled:c,children:V.jsx(q7,{icon:u,isDropdownDisabled:c,buttonName:s,tooltipAssetTypeName:l})}),V.jsx(S.AW,{minWidth:256,align:"start",childrenFocusScope:!0,children:V.jsx(V.Fragment,{children:q4.filter(([e])=>e!==r).map(([e,{icon:t,name:r}])=>V.jsx(S.Xi,{startIcon:V.jsx(S.I5,{name:t}),onSelect:()=>{a(!1),i(e),n({assetType:e})},children:r},e))})})]})}let q7=(0,C.forwardRef)(function(e,t){let{icon:n,isDropdownDisabled:r,buttonName:i,tooltipAssetTypeName:o,...a}=e;return V.jsx(S.u,{content:`You can only pick ${(null==o?void 0:o.toLocaleLowerCase())??"this type of media"}`,visible:r,children:V.jsx(S.zx,{startIcon:n,endIcon:"arrowDropDown",size:"small",color:"grey",disabled:r,ref:t,...a,children:i})})});function Qe(e){let{optimisticTagIds:t,setOptimisticTagIds:n}=e,{onFilterChange:r}=N9(),{tags:i}=NF(),o=(0,C.useMemo)(()=>(0,M.vM)(i,e=>e.id),[i]);return V.jsx(V.Fragment,{children:t.map(e=>{var i;let a=null==(i=o.get(e))?void 0:i[0];return a?V.jsx(S.Ct,{title:a.name,size:"medium",color:"purple",onClose:()=>(function(e){let i=t.filter(t=>t!==e.id);n(i),r({tagIds:i})})(a),selected:!0},a.id):null})})}function Qt(){let{setTagManagerOpen:e,tagIds:t,onFilterChange:n}=N9(),[r,i]=(0,C.useState)(""),[o,a]=(0,C.useState)(!1),[u,s]=(0,C.useState)(t);return(0,_.pQ)(JSON.stringify(t),()=>{s(t)}),V.jsxs(V.Fragment,{children:[V.jsxs(S.h_,{open:o,onOpenChange:function(e){a(e),e||i("")},children:[V.jsx(S.$F,{children:V.jsx(S.zx,{startIcon:"label",endIcon:"arrowDropDown",size:"small",color:"grey",children:"Tags"})}),V.jsx(S.AW,{minWidth:256,align:"start",border:!1,childrenFocusScope:!0,children:V.jsxs(S.BC,{variant:"attached",children:[V.jsx(S.Ie,{value:r,onValueChange:i,placeholder:"Search for a tag",autoFocus:!0}),V.jsx(S.KV,{paddingBlock:4,children:V.jsx(S.SV,{renderError:()=>V.jsx(S.xv,{color:"grey9",variant:"small",sx:{marginBlock:8,marginInline:8},children:"Error getting tags"}),children:V.jsx(C.Suspense,{fallback:V.jsx(S.xu,{padding:8,flexDirection:"column",gap:8,children:(0,E.w6)(1,6).map(e=>V.jsx(S.Od,{height:24,width:85},e))}),children:V.jsx(Qn,{searchTerm:r,setSearchTerm:i,onTagToggle:function(e){let r=u.includes(e.id)?t.filter(t=>t!==e.id):[...t,e.id];s(r),n({tagIds:r}),a(!1)},optimisticTagIds:u})})})}),V.jsx(S.De,{children:V.jsx(S.zx,{invisible:!0,startIcon:"edit",textWeight:"normal",color:"dark",onClick:function(){a(!1),e(!0)},children:"Manage tags"})})]})})]}),u.length>0&&V.jsx(S.SV,{children:V.jsx(C.Suspense,{children:V.jsx(Qe,{optimisticTagIds:u,setOptimisticTagIds:s})})})]})}function Qn(e){let{onTagToggle:t,searchTerm:n,optimisticTagIds:r}=e,{tags:i}=NF(),o=(0,C.useMemo)(()=>{let e=n.toLowerCase();return i.filter(t=>t.name.toLowerCase().includes(e))},[i,n]);return V.jsxs(V.Fragment,{children:[!o.length&&V.jsx(S.xv,{color:"grey9",variant:"small",sx:{marginBlock:8,marginInline:8},children:"No tags found"}),o.map(e=>{let n=r.includes(e.id);return V.jsx(S.c8,{value:e.id,onCheckedChange:()=>t(e),checked:n,children:V.jsx(S.Ct,{title:e.name,color:"purple",sx:{marginLeft:8,marginBottom:4,marginTop:4},size:"medium"})},e.id)})]})}function Qr(){let{uploaderId:e,onFilterChange:t}=N9(),[n,r]=(0,C.useState)(""),[i,o]=(0,C.useState)(!1),[a,u]=(0,C.useState)();return(0,_.pQ)(e,()=>{e||u(void 0)}),V.jsxs(S.h_,{open:i,onOpenChange:function(e){o(e),e||r("")},children:[V.jsx(S.$F,{children:V.jsx(S.zx,{startIcon:"people",renderStartIcon:e=>a?V.jsx(S.qE,{imageUrl:null==a?void 0:a.uploadedAvatar,firstName:a.firstName,lastName:a.lastName,size:16,hasBorder:!1}):e,endIcon:"arrowDropDown",size:"small",color:"grey",children:(null==a?void 0:a.name)??"All uploaders"})}),V.jsx(S.AW,{minWidth:256,align:"start",border:!1,childrenFocusScope:!0,children:V.jsxs(S.BC,{variant:"attached",children:[V.jsx(S.Ie,{value:n,onValueChange:r,placeholder:"Search for uploaders",autoFocus:!0}),V.jsx(S.KV,{paddingBlock:4,children:V.jsx(S.SV,{renderError:()=>V.jsx(S.xv,{color:"grey9",variant:"small",sx:{marginBlock:8,marginInline:8},children:"Error getting uploaders"}),children:V.jsx(C.Suspense,{fallback:V.jsx(Qo,{}),children:V.jsx(Qi,{searchTerm:n,setSearchTerm:r,onUploaderToggle:function(e){u(e),t({uploaderId:null==e?void 0:e.id}),o(!1)},optimisticUploader:a})})})})]})})]})}function Qi(e){let{searchTerm:t,optimisticUploader:n,onUploaderToggle:r}=e,{uploaders:i}=NX(),o=(0,C.useMemo)(()=>{let e=t.toLowerCase();return(0,E.DY)(i.filter(t=>{var n;return t.name.toLowerCase().includes(e)||(null==(n=t.email)?void 0:n.toLowerCase().includes(e))}),e=>(null==n?void 0:n.id)===(null==e?void 0:e.id)?0:1)},[i,n,t]);return o.length?V.jsx(V.Fragment,{children:o.map(e=>{let t=e.id===(null==n?void 0:n.id);return V.jsx(S.c8,{value:e.id,onCheckedChange:()=>t?r():r(e),checked:t,children:V.jsxs(S.xu,{alignItems:"center",padding:{top:8,bottom:8,left:16,right:16},gap:8,children:[V.jsx(S.qE,{firstName:e.firstName,lastName:e.lastName,imageUrl:e.uploadedAvatar,hasBorder:!1}),V.jsxs(S.xu,{display:"flex",flexDirection:"column",children:[V.jsx(S.xv,{color:"grey12",variant:"normal",children:e.name}),e.email&&V.jsx(S.xv,{color:"grey10",variant:"small",children:e.email})]})]})},e.id)})}):V.jsx(S.xv,{color:"grey9",variant:"small",sx:{marginBlock:8,marginInline:8},children:"No uploaders found"})}function Qo(){return V.jsx(S.xu,{padding:8,flexDirection:"column",gap:8,children:(0,E.w6)(1,4).map(e=>V.jsx(S.Od,{height:48,width:"full"},e))})}function Qa(){let{media:e,mediaTotal:t}=N9(),n=Wb();return V.jsxs(S.xu,{alignItems:"center",gap:16,children:[n.isSelectAllEnabled&&V.jsx(S.XZ,{onCheckedChange:n.toggleSelectAll,checked:n.selectedCount>0,indeterminate:n.selectedCount!==t,onClick:e=>e.stopPropagation(),disabled:0===e.length}),0!==e.length&&V.jsx(qA,{count:t}),V.jsxs(S.xu,{gap:8,alignItems:"center",children:[V.jsx(S.xv,{children:"Filter:"}),V.jsx(q8,{}),V.jsx(Qr,{}),V.jsx(Qt,{})]})]})}function Qu(e){let{assetType:t,onSelectedChange:n,actionContainerRef:r}=e;return V.jsx(S.SV,{renderError:()=>V.jsx(qs,{}),children:V.jsx(C.Suspense,{fallback:V.jsx(qh,{actionContainerRef:r}),children:V.jsx(Wx,{children:V.jsx(N3,{assetType:t,actionContainerRef:r,onSelectedChange:n,children:V.jsx(qa,{children:V.jsx(Qs,{})})})})})})}function Qs(){let{media:e}=N9(),t=N4();return V.jsx(qb,{children:V.jsx(ql,{sidePane:t?void 0:V.jsx(q3,{}),mediaActions:V.jsx(qr,{}),mediaToolbar:V.jsx(Qa,{}),mediaList:0===e.length?V.jsx(N8,{}):V.jsx(qc,{})})})}var Ql={};Object.defineProperty(Ql,"__esModule",{value:!0}),Ql.confetti=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Object.assign({},Qc,(!n.stagger&&n.delay&&(n.stagger=n.delay),n)),i=r.elementCount,o=r.colors,a=r.width,u=r.height,s=r.perspective,l=r.angle,c=r.spread,d=r.startVelocity,f=r.decay,p=r.dragFriction,A=r.duration,h=r.stagger,m=r.random;e.style.perspective=s;var g=Array.from({length:i}).map(function(t,n){var r=document.createElement("div"),i=o[n%o.length];return r.style["background-color"]=i,r.style.width=a,r.style.height=u,r.style.position="absolute",r.style.willChange="transform, opacity",r.style.visibility="hidden",e.appendChild(r),r}).map(function(e){var t;return{element:e,physics:(t=Math.PI/180*c,{x:0,y:0,z:0,wobble:10*m(),wobbleSpeed:.1+.1*m(),velocity:.5*d+m()*d,angle2D:-(Math.PI/180*l)+(.5*t-m()*t),angle3D:-(Math.PI/4)+m()*(Math.PI/2),tiltAngle:m()*Math.PI,tiltAngleSpeed:.1+.3*m()})}});return t=void 0,new Promise(function(n){requestAnimationFrame(function r(i){t||(t=i);var o=i-t,a=t===i?0:(i-t)/A;g.slice(0,Math.ceil(o/h)).forEach(function(e){var t,n,r,i,o,u;e.physics.x+=Math.cos(e.physics.angle2D)*e.physics.velocity,e.physics.y+=Math.sin(e.physics.angle2D)*e.physics.velocity,e.physics.z+=Math.sin(e.physics.angle3D)*e.physics.velocity,e.physics.wobble+=e.physics.wobbleSpeed,f?e.physics.velocity*=f:e.physics.velocity-=e.physics.velocity*p,e.physics.y+=3,e.physics.tiltAngle+=e.physics.tiltAngleSpeed,n=(t=e.physics).x,r=t.y,i=t.z,o=t.tiltAngle,u=t.wobble,e.element.style.visibility="visible",e.element.style.transform="translate3d("+(n+10*Math.cos(u))+"px, "+(r+10*Math.sin(u))+"px, "+i+"px) rotate3d(1, 1, 1, "+o+"rad)",e.element.style.opacity=1-a}),i-t<A?requestAnimationFrame(r):(g.forEach(function(t){if(t.element.parentNode===e)return e.removeChild(t.element)}),n())})})};var Qc={angle:90,spread:45,startVelocity:45,elementCount:50,width:"10px",height:"10px",perspective:"",colors:["#a864fd","#29cdff","#78ff44","#ff718d","#fdff6a"],duration:3e3,stagger:0,dragFriction:.1,random:Math.random};S.xv,S.xv,S.xv,S.xv,S.xv,S.xv,S.xv,S.xv,S.xv,S.xv,S.xv,S.xv,S.xv,S.xv,(0,C.createContext)(void 0);let Qd={duration:3e3};Qd.duration&&Qd.duration,(0,C.createContext)({editedUID:{current:!1},onEditUID:()=>{}});let Qf=(0,C.createContext)({ids:[],isSelected:()=>!1,update:()=>{}});function Qp(e){var t;return(null==(t=e.config)?void 0:t.label)??("Boolean"===e.type||"Separator"===e.type?void 0:e.fieldset)??e.type}function QA(e,t="..."){var n;return(null==(n=e.config)?void 0:n.placeholder)||t}function Qh(e){var t;let{content:n,field:r,id:i,readOnly:o,onContentChange:a}=e,u=(null==n?void 0:n.value)??(null==(t=r.config)?void 0:t.default_value)??!1;return V.jsxs(S.gN,{children:[V.jsx(S.fw,{name:"biToggle"}),V.jsx(S.Qy,{htmlFor:i,children:Qp(r)}),V.jsxs(S.JO,{children:[V.jsx(S.xu,{padding:4,alignItems:"center",children:V.jsx(S.xv,{children:function(e,t,n="..."){var r,i;return(t?null==(r=e.config)?void 0:r.placeholder_true:null==(i=e.config)?void 0:i.placeholder_false)||n}(r,u)})}),V.jsx(S.rs,{id:i,sx:{alignSelf:"center",marginLeft:"auto",marginRight:12},checked:u,onCheckedChange:e=>{o||a({__TYPE__:"BooleanContent",value:e})}})]})]})}function Qm(e){let{id:t,field:n,content:r,onContentChange:i}=e;return V.jsxs(S.gN,{children:[V.jsx(S.fw,{name:"colorLens"}),V.jsx(S.Qy,{id:t,children:Qp(n)}),V.jsx(S.JO,{children:V.jsx(S.xu,{padding:{left:4},alignItems:"center",children:V.jsx(S.TC,{onValueChange:e=>i(void 0===e?void 0:{__TYPE__:"FieldContent",type:"Color",value:e}),value:null==r?void 0:r.value,"aria-labelledby":t,placeholder:QA(n)})})})]})}function Qg(e){let{id:t,readOnly:n,field:r,content:i,onContentChange:o}=e,a=null!=i&&i.value?(0,T._O)(i.value):void 0;return V.jsxs(S.gN,{children:[V.jsx(S.fw,{name:"dateRange"}),V.jsx(S.Qy,{id:t,children:Qp(r)}),V.jsx(S.JO,{children:V.jsx(S.xu,{padding:{left:4,right:12},width:"100%",flexDirection:"column",justifyContent:"center",children:V.jsx(S.Wr,{mode:"date","aria-labelledby":t,disabled:n,value:a,onValueChange:e=>o(function(e){if(e)return{__TYPE__:"FieldContent",type:"Date",value:function(e){let t=`${e.getFullYear()}`.padStart(4,"0"),n=`${e.getMonth()+1}`.padStart(2,"0"),r=`${e.getDate()}`.padStart(2,"0");return`${t}-${n}-${r}`}(e)}}(e))})})})]})}let Qy=(0,C.forwardRef)(function(e,t){return V.jsx(S.oi,{padding:Qv,...e,ref:t,sx:{...e.sx,alignSelf:"stretch"}})}),Qv={input:{inline:4},adornment:{inline:12}},Qx=({provider:e})=>Qb[e.toLowerCase()]??V.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[V.jsx("g",{clipPath:"url(#clip0_6524_22412)",children:V.jsx("path",{d:"M7.99992 1.33333C4.31992 1.33333 1.33325 4.32 1.33325 8C1.33325 11.68 4.31992 14.6667 7.99992 14.6667C11.6799 14.6667 14.6666 11.68 14.6666 8C14.6666 4.32 11.6799 1.33333 7.99992 1.33333ZM2.66659 8C2.66659 7.59333 2.71992 7.19333 2.80659 6.81333L5.99325 10V10.6667C5.99325 11.4 6.59325 12 7.32658 12V13.2867C4.70658 12.9533 2.66659 10.7133 2.66659 8ZM11.9266 11.6C11.7533 11.06 11.2599 10.6667 10.6599 10.6667H9.99325V8.66667C9.99325 8.3 9.69325 8 9.32658 8H5.32658V6.66667H6.65992C7.02658 6.66667 7.32658 6.36667 7.32658 6V4.66667H8.65992C9.39325 4.66667 9.99325 4.06667 9.99325 3.33333V3.06C11.9466 3.84667 13.3333 5.76667 13.3333 8C13.3333 9.38667 12.7933 10.6533 11.9266 11.6Z",fill:"#6F6E77"})}),V.jsx("defs",{children:V.jsx("clipPath",{id:"clip0_6524_22412",children:V.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),Qb={codepen:V.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[V.jsx("g",{clipPath:"url(#clip0_6523_22409)",children:V.jsx("path",{d:"M15.9879 5.44292C15.9843 5.42352 15.981 5.40413 15.9759 5.38517C15.9726 5.37375 15.9688 5.36298 15.9651 5.35177C15.9597 5.33497 15.9541 5.31816 15.9474 5.30179C15.9427 5.29037 15.9373 5.27938 15.9321 5.26839C15.9248 5.25288 15.9173 5.23758 15.9086 5.22271C15.9026 5.21172 15.8957 5.20138 15.889 5.19082C15.8798 5.1766 15.8703 5.1626 15.8599 5.14902C15.8524 5.13889 15.8446 5.1292 15.8365 5.1195C15.8257 5.10657 15.8141 5.09429 15.8024 5.08223C15.7934 5.07318 15.7843 5.06413 15.7748 5.05529C15.7623 5.04387 15.7494 5.0331 15.7358 5.02276C15.7255 5.01479 15.7154 5.0066 15.7046 4.99927C15.7007 4.99647 15.6973 4.99324 15.6932 4.99065L8.38116 0.115543C8.15039 -0.0385144 7.84939 -0.0385144 7.61863 0.115543L0.306176 4.99044C0.302082 4.99302 0.29885 4.99626 0.294756 4.99906C0.283983 5.0066 0.273856 5.01457 0.263514 5.02254C0.250155 5.0331 0.237011 5.04387 0.224515 5.05486C0.215034 5.06348 0.205985 5.07253 0.19715 5.0818C0.185084 5.09386 0.17388 5.10614 0.162892 5.11907C0.154704 5.12877 0.146947 5.13846 0.139406 5.14924C0.129064 5.16281 0.119583 5.1766 0.110318 5.19104C0.103639 5.20159 0.0969593 5.21194 0.0907108 5.22293C0.0820922 5.23779 0.0745509 5.25309 0.0674405 5.26817C0.0622694 5.27916 0.0566673 5.29037 0.0521425 5.30157C0.0454631 5.31795 0.0396456 5.33475 0.0342589 5.35156C0.030596 5.36276 0.0267177 5.37375 0.0237011 5.38388C0.0187455 5.40284 0.0150825 5.42201 0.0116351 5.44162C0.00969592 5.45153 0.00732581 5.46123 0.00603302 5.47136C0.00215465 5.50109 0 5.53082 0 5.56121V10.4372C0 10.4673 0.00215465 10.4975 0.00646395 10.527C0.00797221 10.5378 0.0107733 10.5464 0.0129279 10.5568C0.0163753 10.5762 0.0193919 10.5955 0.0258558 10.6149C0.0288723 10.6257 0.0323198 10.6365 0.0366291 10.6483C0.0420157 10.6656 0.0474023 10.6828 0.0538662 10.6985C0.058391 10.7093 0.0646395 10.7201 0.0689488 10.7309C0.0760591 10.7459 0.0840314 10.761 0.09265 10.7768C0.098683 10.7875 0.105578 10.7983 0.112042 10.8082C0.121307 10.8233 0.131434 10.8362 0.142207 10.8491C0.149748 10.8599 0.157289 10.8685 0.165908 10.8789C0.176897 10.8918 0.187455 10.9047 0.200382 10.9162C0.209217 10.9248 0.21762 10.9355 0.228393 10.942C0.24089 10.9528 0.254249 10.9636 0.267177 10.9748C0.277519 10.9834 0.288723 10.9898 0.297342 10.9982C0.301436 11.0004 0.303806 11.0047 0.308115 11.0067L7.61863 15.8841C7.73412 15.9617 7.86641 16.0005 8 15.9998C8.13359 15.9992 8.26588 15.9611 8.38137 15.8841L15.6938 11.0092C15.6979 11.0067 15.7014 11.0036 15.7052 11.0008C15.716 10.9933 15.7261 10.9853 15.7365 10.9773C15.7498 10.9668 15.763 10.9558 15.7755 10.9446C15.785 10.9362 15.794 10.9269 15.8031 10.9179C15.8149 10.9058 15.8263 10.8935 15.8371 10.8806C15.8453 10.8709 15.8531 10.8612 15.8606 10.8509C15.8709 10.8373 15.8804 10.8233 15.8897 10.8091C15.8964 10.7987 15.903 10.7882 15.9093 10.7776C15.9179 10.7625 15.9254 10.7472 15.9328 10.7317C15.9379 10.7207 15.9433 10.7097 15.9481 10.6985C15.9548 10.6819 15.9604 10.6651 15.9657 10.6483C15.9694 10.6371 15.9733 10.6261 15.9765 10.6149C15.9815 10.596 15.9849 10.5766 15.9886 10.5572C15.9903 10.5473 15.9929 10.5376 15.994 10.5275C15.9978 10.4977 16 10.468 16 10.4376V5.5625C16 5.53212 15.9976 5.50238 15.994 5.47265C15.9922 5.46209 15.989 5.45347 15.9869 5.44292H15.9879ZM7.99978 9.62638L5.56826 8.00005L7.99978 6.37351L10.4315 8.00005L7.99978 9.62638ZM7.31245 5.17919L4.33171 7.17288L1.92561 5.56336L7.31245 1.97221V5.17919ZM3.09515 7.99984L1.37531 9.15021V6.84947L3.09515 7.99984ZM4.33171 8.82765L7.31245 10.8211V14.0281L1.92561 10.4365L4.33171 8.82722V8.82765ZM8.68733 10.8207L11.6681 8.82722L14.0744 10.4365L8.68733 14.0277V10.8207ZM12.9046 8.00027L14.6247 6.84969V9.15064L12.9046 7.99984V8.00027ZM11.6681 7.17288L8.68733 5.1794V1.97221L14.0744 5.56336L11.6681 7.17288Z",fill:"black"})}),V.jsx("defs",{children:V.jsx("clipPath",{id:"clip0_6523_22409",children:V.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),codesandbox:V.jsxs("svg",{width:"14",height:"16",viewBox:"0 0 14 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[V.jsx("g",{clipPath:"url(#clip0_6523_22406)",children:V.jsx("path",{d:"M6.24312 14.1129V8.35021L1.28724 5.49888V8.78388L3.55732 10.0999V12.5702L6.24312 14.1129ZM7.53036 14.1468L10.2658 12.571V10.0422L12.5506 8.71812V5.47426L7.53036 8.3727V14.1468ZM11.8904 4.36906L9.25164 2.83995L6.93472 4.18436L4.60022 2.8386L1.93795 4.38817L6.90626 7.24665L11.8904 4.36906ZM0 12.0115V4.02675L6.91821 0L13.8378 4.00984V11.9988L6.91805 15.985L0 12.0115Z",fill:"black"})}),V.jsx("defs",{children:V.jsx("clipPath",{id:"clip0_6523_22406",children:V.jsx("rect",{width:"13.8378",height:"16",fill:"white"})})})]}),dailymotion:V.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[V.jsxs("g",{clipPath:"url(#clip0_6523_22345)",children:[V.jsx("path",{d:"M16 0H0V16H16V0Z",fill:"white"}),V.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.73038 10.3003C8.40789 10.6268 8.00377 10.7901 7.51804 10.7901C7.04025 10.7901 6.64411 10.6308 6.32956 10.3122C6.01503 9.99367 5.85776 9.58351 5.85776 9.08176C5.85776 8.60389 6.01901 8.20766 6.3415 7.89306C6.66401 7.57847 7.06016 7.42118 7.52998 7.42118C7.84849 7.42118 8.13715 7.49484 8.39594 7.64219C8.65474 7.78953 8.8558 7.99063 8.99913 8.2455C9.14246 8.50034 9.21412 8.77908 9.21412 9.08176C9.21412 9.56757 9.05287 9.97376 8.73038 10.3003ZM9.10662 3.58632V6.35792C8.82791 6.07918 8.53131 5.87808 8.21678 5.75463C7.90223 5.63118 7.54988 5.56946 7.1597 5.56946C6.53062 5.56946 5.96527 5.72476 5.4636 6.03538C4.96193 6.34597 4.57176 6.77007 4.29305 7.30768C4.01435 7.84528 3.875 8.44062 3.875 9.09369C3.875 9.76269 4.01236 10.366 4.28708 10.9036C4.5618 11.4412 4.95197 11.8653 5.45763 12.1759C5.96328 12.4865 6.54258 12.6418 7.19553 12.6418C8.14312 12.6418 8.80403 12.3312 9.17831 11.71H9.20218V12.5595H11.0894V3.15625L9.10662 3.58632Z",fill:"#232323"})]}),V.jsx("defs",{children:V.jsx("clipPath",{id:"clip0_6523_22345",children:V.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),flickr:V.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[V.jsx("rect",{width:"16",height:"16",fill:"white"}),V.jsxs("g",{clipPath:"url(#clip0_6523_22379)",children:[V.jsx("path",{d:"M8.43286 7.78387C8.43286 9.321 9.67925 10.5674 11.2166 10.5674C12.7538 10.5674 13.9999 9.321 13.9999 7.78387C13.9999 6.24675 12.7538 5.00061 11.2166 5.00061C9.67925 5.00061 8.43286 6.24675 8.43286 7.78387Z",fill:"#FF0084"}),V.jsx("path",{d:"M2 7.78408C2 9.32121 3.24614 10.5676 4.78352 10.5676C6.32089 10.5676 7.56703 9.32121 7.56703 7.78408C7.56703 6.24695 6.32089 5.00081 4.78352 5.00081C3.24614 5.00081 2 6.24695 2 7.78408Z",fill:"#0063DC"})]}),V.jsx("defs",{children:V.jsx("clipPath",{id:"clip0_6523_22379",children:V.jsx("rect",{width:"12",height:"5.568",fill:"white",transform:"translate(2 5)"})})})]}),giphy:V.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[V.jsx("rect",{width:"16",height:"16",fill:"#121212"}),V.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4 3.38889V12.2778H5.11111V3.38889H4Z",fill:"#00FF99"}),V.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.6663 5.61111V12.2778H11.7774V5.61111H10.6663Z",fill:"#9933FF"}),V.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.75 3H4V4.11111H8.83333V3H7.75Z",fill:"#FFF35C"}),V.jsx("path",{d:"M9.00041 4.11111H7.33374H8.83374V3.77778L9.00041 4.11111Z",fill:"#999999"}),V.jsx("path",{d:"M8.83374 4.11111H7.33374L8.44485 3L8.83374 3.77778V4.11111Z",fill:"#999237"}),V.jsx("path",{d:"M10.6663 7.44444V5.77778L11.7774 6.33333L10.6663 7.44444Z",fill:"#5C1F99"}),V.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.6667 11.8889H4V13H11.7778V11.8889H10.6667Z",fill:"#00CCFF"}),V.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.6668 5.22222V4.11111H9.55569V3H8.44458V3.90739V5.0185V6.33333H9.55569H10.6668H11.7779V5.22222H10.6668Z",fill:"#FF6666"})]}),instagram:V.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:[V.jsxs("g",{clipPath:"url(#clip0_6523_22356)",children:[V.jsx("mask",{id:"mask0_6523_22356",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"16",height:"16",children:V.jsx("path",{d:"M4.70325 0.0949238C3.85627 0.1349 3.27778 0.270564 2.77227 0.468642C2.24897 0.672648 1.80537 0.946046 1.36408 1.38914C0.922279 1.83249 0.650958 2.27688 0.448504 2.8007C0.252489 3.3075 0.119662 3.88627 0.0822604 4.73377C0.045126 5.58283 0.0366102 5.85363 0.0407495 8.01522C0.0448729 10.1765 0.0544124 10.4479 0.0949012 11.2972C0.135388 12.1439 0.270546 12.7222 0.468623 13.2279C0.672886 13.7512 0.946004 14.1946 1.38935 14.6361C1.83245 15.0777 2.27708 15.3487 2.80115 15.5515C3.30744 15.7472 3.88644 15.8806 4.73369 15.9177C5.58273 15.9551 5.85379 15.9634 8.01483 15.9592C10.1769 15.9551 10.448 15.9456 11.297 15.9053C12.144 15.8648 12.722 15.7292 13.228 15.5316C13.7513 15.3268 14.1949 15.0542 14.6362 14.6109C15.0775 14.1678 15.3488 13.7231 15.5512 13.199C15.7473 12.6927 15.8806 12.1137 15.9175 11.267C15.9546 10.4174 15.9634 10.1461 15.9593 7.98478C15.9551 5.8232 15.9453 5.55239 15.9051 4.7036C15.8649 3.85609 15.7292 3.27811 15.5314 2.77208C15.3269 2.24877 15.054 1.80567 14.6109 1.36387C14.1678 0.922574 13.7232 0.650729 13.1991 0.448785C12.6926 0.252768 12.1138 0.119166 11.2666 0.0825425C10.4175 0.0448876 10.1465 0.0366393 7.98465 0.0407642C5.82336 0.0448892 5.5523 0.0541772 4.70325 0.0949238ZM4.79611 14.485C4.02004 14.4512 3.59863 14.3222 3.31776 14.2142C2.94585 14.0703 2.68046 13.8977 2.40114 13.6205C2.12234 13.3422 1.94928 13.0776 1.80408 12.7064C1.69497 12.4255 1.5637 12.0046 1.52734 11.2286C1.48788 10.3896 1.47886 10.1378 1.47498 8.01237C1.47086 5.88742 1.47859 5.63569 1.51522 4.79593C1.54848 4.02038 1.67822 3.59843 1.78602 3.31782C1.92993 2.94539 2.10196 2.68051 2.37973 2.4012C2.65801 2.12187 2.92263 1.94933 3.29402 1.80412C3.57463 1.69451 3.99555 1.56426 4.77134 1.52738C5.61084 1.48766 5.8623 1.47915 7.98723 1.47502C10.1127 1.47089 10.3644 1.47838 11.2042 1.51526C11.9797 1.54904 12.4016 1.67749 12.682 1.78607C13.0541 1.92998 13.3195 2.1015 13.5986 2.37979C13.8777 2.65808 14.0507 2.92218 14.1959 3.29435C14.3055 3.57418 14.4358 3.99562 14.4724 4.77117C14.5124 5.61068 14.5214 5.8624 14.5253 7.98736C14.5294 10.1128 14.5217 10.3646 14.4848 11.2038C14.451 11.9799 14.3223 12.4016 14.214 12.6827C14.0701 13.0543 13.898 13.3197 13.62 13.5991C13.342 13.8773 13.0774 14.0509 12.7057 14.1961C12.4256 14.3055 12.0042 14.436 11.2289 14.4729C10.3894 14.5123 10.1379 14.5214 8.01225 14.5252C5.88732 14.5294 5.63586 14.5214 4.79611 14.485ZM11.2854 3.74493C11.2864 4.27211 11.7151 4.69896 12.2422 4.69792C12.7697 4.69689 13.1965 4.2685 13.1957 3.74132C13.1947 3.21414 12.7661 2.78704 12.2386 2.78807C11.7112 2.7891 11.2844 3.21775 11.2854 3.74493ZM3.91277 8.00773C3.91714 10.2653 5.75063 12.0913 8.0076 12.0869C10.2648 12.0825 12.0919 10.2495 12.0875 7.99201C12.0831 5.73526 10.2494 3.90819 7.99188 3.91257C5.73489 3.91696 3.90837 5.75073 3.91277 8.00773ZM5.34648 8.0049C5.3439 6.53969 6.52978 5.34942 7.99471 5.34683C9.45991 5.344 10.6504 6.52937 10.6533 7.99484C10.6561 9.46031 9.47022 10.6503 8.00477 10.6532C6.53984 10.656 5.34932 9.47037 5.34648 8.0049Z",fill:"white"})}),V.jsxs("g",{mask:"url(#mask0_6523_22356)",children:[V.jsx("mask",{id:"mask1_6523_22356",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"-1",y:"-1",width:"18",height:"18",children:V.jsx("path",{d:"M16.5905 -0.583628H-0.603516V16.6106H16.5905V-0.583628Z",fill:"white"})}),V.jsxs("g",{mask:"url(#mask1_6523_22356)",children:[V.jsx("mask",{id:"mask2_6523_22356",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"-1",y:"-1",width:"18",height:"18",children:V.jsx("path",{d:"M16.6701 -0.663237H-0.683105V16.6902H16.6701V-0.663237Z",fill:"white"})}),V.jsxs("g",{mask:"url(#mask2_6523_22356)",children:[V.jsx("mask",{id:"mask3_6523_22356",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"-1",y:"-1",width:"18",height:"18",children:V.jsx("path",{d:"M16.6701 -0.663237H-0.683105V16.6902H16.6701V-0.663237Z",fill:"white"})}),V.jsx("g",{mask:"url(#mask3_6523_22356)",children:V.jsx("rect",{x:"-0.688721",y:"-0.665792",width:"17.3622",height:"17.3622",fill:"url(#pattern0)"})})]})]})]})]}),V.jsxs("defs",{children:[V.jsx("pattern",{id:"pattern0",patternContentUnits:"objectBoundingBox",width:"1",height:"1",children:V.jsx("use",{xlinkHref:"#image0_6523_22356",transform:"scale(0.000439947)"})}),V.jsx("clipPath",{id:"clip0_6523_22356",children:V.jsx("rect",{width:"16",height:"16",fill:"white"})}),V.jsx("image",{id:"image0_6523_22356",width:"2273",height:"2275",xlinkHref:"data:image/jpeg;base64,/9j/4AAQSkZJRgABAgEAlgCWAAD/7AARRHVja3kAAQAEAAAAHgAA/+4AIUFkb2JlAGTAAAAAAQMAEAMCAwYAAFokAABijgAAd23/2wCEABALCwsMCxAMDBAXDw0PFxsUEBAUGx8XFxcXFx8eFxoaGhoXHh4jJSclIx4vLzMzLy9AQEBAQEBAQEBAQEBAQEABEQ8PERMRFRISFRQRFBEUGhQWFhQaJhoaHBoaJjAjHh4eHiMwKy4nJycuKzU1MDA1NUBAP0BAQEBAQEBAQEBAQP/CABEICOMI4QMBIgACEQEDEQH/xADDAAEBAQEBAQEBAAAAAAAAAAAAAQUEBgMHAgEBAQADAQEAAAAAAAAAAAAAAAECAwUEBhAAAQIEBAcBAQEBAQAAAAAAAAMFcIA1FiIjMxQBEQIyEwQ0MRIGFZARAAADCAICAgEABwUJAQAAAAADo4ABcqLSBDREsXNDRcECESExQVGREjIQYdETM3GB8VJiksLiFBUSAAECBgEEAwABAwIHAAAAAAABAnCxcpIDM0QxMkNFcZFzERBBEmGCoCFRgUKDNP/aAAwDAQACEQMRAAAA9X5n5Z3e26jLei6jLRqMsajLGoyxqMsajLGoyxqMsajLJqMsajLGoyxqMsajLGoyxqMsalyqajLGoyxqMsajLJqMsajLGoyxqMsajLRqMsajLGoyxqMsajLGoyxqMsajLppswabMGmyxqMwumzIajLppsyGoyy6jLGoyx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AEgCgAAAogQAAKSgAACAFAAACURRFEWACUsWACVUCxYBbFglECpZQLBSWALBSWKBBalgCwVFipVQLAJZalgFsAlipZQLBUCpYJZaBBbAqWUlipVQWwEFsWUllqWKFQUlihUFqWAWwUlihUFqWAUlihSWAWgRZQAWwAACVUACgAABQAHrvh9/hxeEGvMAAAEAAAKgAAAAAABZUAAACFAAAEAUAAgUBABQAJAFAAABRAgABQABAABSUAgAAAAAAKiwABYsAIstAgEq2ASxQqASxQqBUsAtgEsUKgEstSwBYLYsEstAgWCksUKgWASy1LALYCC2ASy1KILYFiykstSykpYKgtSwC2CoLUsAtiykpYKgoFgpKWCgIKBUsoACLLQAAEqoAFAAAAA9d8Pv8ONwg15gAgAAACkAAAAAAAAKIAAEKAAAIAKAABFCAAKAASAUAACiBAACygAIAKSgEAAAAAAAAAJVQACWKAllAsWAWwCUQWxYAsFJYoEFRYqUQWwCWWpRAsFJYqVUCwCWWgQLFlJYqWUlLBbAQWxYJZaBBbAJZallqUQWwVBalgFsFJYoVBalgFQWpYBbABbABUAFqWAUAlloAAAUlgCgAAAAeu+H3+HG4Qa8wQAAABSAAAAAAAABQEAACKAAEAAUAAhZUAAFAAAkWUAAWVAAgAUABABQAIAAAAAAAAAACosAAWASqgVLALYsAIFSygWASygWCksUCC1LBLFCoFiyksUCC1LBKtgIFSyksUKgWC2Aiy1LBLLQILYBLLUstAgtgpLFSygtgpLFCoLUsAqC1LALUALYAKgAtSwCgEpYKAAASygUAAAAD13w+/w43CDXkAAAALAAAAAAAAACiAAALLAAAIAoAABFCAALKABIAoAAKIAEAUAAIBQABAAABRFJFEURSwAACWUACwAVAqWACWWgQKlVARYqVUCxYJVsBBalgCwVAqWUCwEWWpYBbAJYqWUCwVAsFJYqWKllAsFQWpYJZallAsFsWUlipVQWwCWWhUCpZQVAqWUFqWAVAoUlgFqUQUACwUAAAllAoAAAAHrvh38HJ4IaMwAABYAAAAAAAAAAoQAABZYAABFlAAAhZUAAAoAAkAoAAKECAFlAAQB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XQMpMugZSZdAyky6BlJl0DKTLoGUmXQMpMugZSZdAyky6BlJl0DKTLoGUmXQMpMugZSZdAyky6BlJl0DKTLoGUmXQMpMugZSZdAyky6BlJl0DKTLoGUmXQMpMugZSZdAyky6BlJl0DKTLoGUmXQMpMugZSZdAyky6BlJl0DKTLoGUmXQMpMugZSZdAyky6BlJl0DKTLoDnvufy537Hll/h/wDD6D6Wt/8AX6/X7GP/AJSzvp+h35f+p32+v9/73fw/b/ZdP+37Ps76u/2fX6u+rDn6vt/3/wDqLvsfww7ddj+GHbrsfww7d9j+GHbrsfww7ddj+GHbrsfww7ddj+GHbrsfww7ddj+GHbrsfww7ddj+GHbrsfww7ddj+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfw5h277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3XY/hh26jfww7dRv4Yduo38MO3Ub+GHbqN/DDt1G/hh26jfww7dRv4Yduo38MO3Ub+GHbqN/DDt1G/hh26jf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MPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMNeYa8w15hrzDXnGvONeca8415xrzjXnGvONeca041pxrTjWnGtONaca041pxrTjWnGtONacas41ZxqzjVnGrONWcas41ZxqzjVnGrONScak41JxqTjUUGooNRQaig1FBqKDTUGmoNNQaag01BpqDTUGmoNNQaag0lBpKDSUGkoNJQaSg0lBpKDSUGioNFQaKg0VBoqDRVGiqNFUaKo0FRoKjQVGgqNBUaCo0FRoKjQVGgqPXqj16o9eqPXqj16o9eqPXqj16o9eqPXqj1yo9cqPXKj1yo9cqPXLD1yw9csPXLD1yw9csPWrD1qw9asPWrD1qw9asPWrD1qw9asPWrD1qw9YsPWLD1iw9YsPWLD1iw9YsPWLD1iw9YsPWLD1iw9YsPWLD1iw9YsPWLD1iw9YsPWLD1iw9YsPWLD1aw9WsPVrD1aw9WsPVrD1aw9WsPVrD1aw9WsPVrB34/8Ay/z/AH/53yHY/wDU/E/0v+P7/wCz/9k="})]})]}),pinterest:V.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[V.jsxs("g",{clipPath:"url(#clip0_6570_25513)",children:[V.jsx("rect",{width:"15.996",height:"16",rx:"2",fill:"#CC2127"}),V.jsx("path",{d:"M7.999 2C4.68555 2 2 4.68555 2 7.999C2 10.5406 3.58174 12.7102 5.81336 13.5861C5.76137 13.1121 5.71338 12.3843 5.83336 11.8644C5.94134 11.3964 6.53724 8.88285 6.53724 8.88285C6.53724 8.88285 6.35727 8.52291 6.35727 7.993C6.35727 7.15914 6.84119 6.53524 7.44309 6.53524C7.95501 6.53524 8.20297 6.91918 8.20297 7.3811C8.20297 7.89502 7.87502 8.66489 7.70705 9.37877C7.56507 9.97667 8.007 10.4626 8.5949 10.4626C9.66072 10.4626 10.4806 9.33878 10.4806 7.71505C10.4806 6.27929 9.44876 5.27345 7.975 5.27345C6.26729 5.27345 5.26546 6.55324 5.26546 7.87702C5.26546 8.39293 5.46342 8.94484 5.71138 9.24679C5.75937 9.30678 5.76737 9.35877 5.75337 9.41876C5.70738 9.60873 5.6074 10.0167 5.5874 10.0987C5.56141 10.2086 5.50142 10.2326 5.38743 10.1786C4.63756 9.83069 4.16964 8.73488 4.16964 7.85502C4.16964 5.96334 5.54541 4.22563 8.13298 4.22563C10.2146 4.22563 11.8304 5.70938 11.8304 7.69105C11.8304 9.75871 10.5266 11.4224 8.71688 11.4224C8.10898 11.4224 7.53708 11.1065 7.34111 10.7345C7.34111 10.7345 7.04116 11.8804 6.96717 12.1603C6.83119 12.6822 6.46526 13.3341 6.2213 13.732C6.7832 13.906 7.3791 14 7.997 14C11.3104 14 13.996 11.3144 13.996 8.001C13.998 4.68555 11.3124 2 7.999 2Z",fill:"white"})]}),V.jsx("defs",{children:V.jsx("clipPath",{id:"clip0_6570_25513",children:V.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),spotify:V.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[V.jsx("g",{clipPath:"url(#clip0_6523_22402)",children:V.jsx("path",{d:"M12.6609 7.10585C10.121 5.59751 5.93158 5.45882 3.50697 6.1947C3.11759 6.31287 2.70584 6.09298 2.5879 5.70373C2.46988 5.31411 2.68945 4.90265 3.07911 4.78429C5.86241 3.93945 10.4892 4.1026 13.4132 5.83828C13.7634 6.04622 13.8782 6.49851 13.6707 6.84813C13.4629 7.19833 13.0103 7.31376 12.6609 7.10585ZM12.5777 9.33993C12.3995 9.62908 12.0215 9.71979 11.7327 9.54223C9.61522 8.24063 6.38637 7.86357 3.88123 8.624C3.55636 8.72218 3.21323 8.53899 3.11455 8.21475C3.01666 7.88989 3.19992 7.54738 3.5242 7.44859C6.38597 6.58018 9.9436 7.00081 12.3756 8.49536C12.6644 8.67322 12.7553 9.05146 12.5777 9.33993ZM11.6136 11.4855C11.472 11.7177 11.1697 11.7904 10.9383 11.6489C9.08801 10.518 6.75909 10.2627 4.01637 10.8891C3.75207 10.9497 3.48866 10.7841 3.42838 10.5198C3.36785 10.2556 3.53284 9.99217 3.79772 9.93186C6.79916 9.2457 9.37381 9.54101 11.4506 10.8101C11.6822 10.9515 11.7551 11.254 11.6136 11.4855ZM8.00002 0.120623C3.64839 0.120623 0.120605 3.64834 0.120605 7.99989C0.120605 12.352 3.64839 15.8794 8.00002 15.8794C12.3517 15.8794 15.8794 12.352 15.8794 7.99989C15.8794 3.64834 12.3517 0.120623 8.00002 0.120623Z",fill:"#1ED760"})}),V.jsx("defs",{children:V.jsx("clipPath",{id:"clip0_6523_22402",children:V.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),twitter:V.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:V.jsx("path",{d:"M14.3193 4.31285C14.329 4.45301 14.329 4.59317 14.329 4.73462C14.329 9.04475 11.0516 14.0156 5.05865 14.0156V14.0131C3.28832 14.0156 1.55478 13.508 0.0644531 12.5507C0.321873 12.5817 0.580582 12.5972 0.839937 12.5979C2.30703 12.5992 3.7322 12.1063 4.88639 11.1988C3.4922 11.1724 2.26961 10.2623 1.84252 8.93366C2.3309 9.02796 2.83413 9.00858 3.31349 8.87746C1.79349 8.57001 0.699937 7.23299 0.699937 5.68023C0.699937 5.66602 0.699937 5.65246 0.699937 5.63889C1.15284 5.89144 1.65994 6.0316 2.17865 6.0471C0.747034 5.08923 0.305743 3.18251 1.17026 1.69176C2.82445 3.7296 5.2651 4.96844 7.8851 5.09956C7.62252 3.96664 7.98123 2.77947 8.82768 1.98307C10.1399 0.748096 12.2038 0.811395 13.4374 2.12452C14.167 1.98048 14.8664 1.71243 15.5064 1.33264C15.2632 2.0877 14.7541 2.72909 14.0741 3.13665C14.7199 3.06044 15.3509 2.88734 15.9451 2.62316C15.5077 3.2794 14.9567 3.85103 14.3193 4.31285Z",fill:"#1D9BF0"})}),vimeo:V.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[V.jsxs("g",{clipPath:"url(#clip0_6523_22340)",children:[V.jsx("path",{d:"M16 14.4C16 15.28 15.28 16 14.4 16H1.6C0.72 16 0 15.28 0 14.4V1.6C0 0.72 0.72 0 1.6 0H14.4C15.28 0 16 0.72 16 1.6V14.4Z",fill:"#1AB7EA"}),V.jsx("path",{d:"M13.9945 5.3084C13.9391 6.42815 13.1229 7.97447 11.5458 9.93402C9.91331 11.9736 8.52987 13 7.40928 13C6.70372 13 6.12267 12.3735 5.63846 11.1338C5.32027 9.98735 4.98824 8.85427 4.67005 7.70786C4.31036 6.46814 3.92299 5.84161 3.50796 5.84161C3.42495 5.84161 3.10676 6.02824 2.56721 6.38816L2 5.68165C2.59488 5.1751 3.17593 4.68187 3.75698 4.17532C4.54554 3.52214 5.14042 3.17555 5.54162 3.13556C6.46853 3.05557 7.04958 3.66877 7.27093 4.97514C7.50612 6.40149 7.67213 7.28129 7.75514 7.62788C8.01799 8.80095 8.32235 9.40081 8.64054 9.40081C8.88956 9.40081 9.26309 9.01423 9.77497 8.2544C10.273 7.49457 10.5497 6.90804 10.5774 6.50813C10.6465 5.85494 10.3837 5.52169 9.77497 5.52169C9.48444 5.52169 9.19392 5.58834 8.88956 5.70831C9.48444 3.84206 10.605 2.94893 12.2652 3.00225C13.4826 3.02891 14.0637 3.80207 13.9945 5.3084Z",fill:"white"})]}),V.jsx("defs",{children:V.jsx("clipPath",{id:"clip0_6523_22340",children:V.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),youtube:V.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[V.jsx("path",{d:"M15.6656 3.75817C15.4816 3.06609 14.9395 2.5211 14.2511 2.33614C13.0034 2 8 2 8 2C8 2 2.99666 2 1.7489 2.33614C1.06051 2.5211 0.518324 3.06609 0.334339 3.75817C0 5.01251 0 7.62963 0 7.62963C0 7.62963 0 10.2467 0.334339 11.5012C0.518324 12.1932 1.06051 12.7381 1.7489 12.9232C2.99666 13.2593 8 13.2593 8 13.2593C8 13.2593 13.0034 13.2593 14.2511 12.9232C14.9395 12.7381 15.4816 12.1932 15.6656 11.5012C16 10.2467 16 7.62963 16 7.62963C16 7.62963 16 5.01251 15.6656 3.75817Z",fill:"#ED1D24"}),V.jsx("path",{d:"M6.36353 10.0058L10.5453 7.62974L6.36353 5.25349V10.0058Z",fill:"white"})]})};function QC(e){let{debouncedUrl:t,content:n,onContentChange:r,selected:i}=e,o=(0,C.useRef)(null),[a,u]=(0,C.useState)(!1);return(0,_.pQ)(t,()=>{var e;a&&(u(!1),null==(e=o.current)||e.reset())}),(0,w.ju)(t)?t===(null==n?void 0:n.embed_url)?V.jsx(Qw,{content:n,selected:i}):V.jsx(S.SV,{ref:o,renderError:QS,onError:function(){u(!0),r(void 0)},children:V.jsx(C.Suspense,{fallback:n&&V.jsx(Qw,{content:n,selected:i}),children:V.jsx(QI,{url:t,selected:i,onContentChange:r})})}):null}function QS(){return V.jsxs(S.xu,{backgroundColor:"grey2",borderRadius:6,padding:16,gap:4,children:[V.jsx(S.I5,{name:"alert",size:"small",color:"grey11"}),V.jsx(S.xv,{variant:"smallBold",color:"grey11",children:"There is no embed data available."})]})}function Qw(e){let{content:t,selected:n}=e,{thumbnail:r,provider:i,author:o,url:a,subtitle:u}=function(e){let t="";switch(e.type){case"video":t=e.title??"";break;case"photo":t=`View this post${e.provider_name?` on ${e.provider_name}`:""}`;break;default:t=`Open${e.provider_name?` on ${e.provider_name}`:""}`}return{url:e.embed_url,thumbnail:{url:e.thumbnail_url??"",aspectRatio:"video"===e.type?"16:9":"1:1"},provider:e.provider_name??"",author:e.author_name??"",subtitle:t}}(t);return V.jsxs(S.oU,{selected:n,children:[V.jsx(S.Sy,{src:r.url,aspectRatio:r.aspectRatio}),V.jsxs(S.Tw,{children:[V.jsxs(S.xu,{display:"flex",alignItems:"center",gap:4,children:[V.jsx(Qx,{provider:i}),V.jsx(S.xv,{variant:"smallBold",color:"grey12",noWrap:!0,children:i}),o&&V.jsx(S.xv,{variant:"small",color:"grey11",noWrap:!0,children:o})]}),V.jsx(S.xv,{variant:"smallBold",href:a,children:u})]})]})}function QI(e){let{url:t,onContentChange:n,selected:r}=e,i=function(e){let{url:t,onContentChange:n}=e,{embedApiEndpoint:r}=WI(),i=(0,R.QT)(Q_,[t,r]),o=(0,_.R9)(n);return(0,C.useEffect)(()=>{let e=(0,S.rI)(()=>o(i));return()=>{clearTimeout(e)}},[i,o]),i}({url:t,onContentChange:n});return V.jsx(Qw,{content:i,selected:r})}function Q_(e,t){let n=new URL(t);return n.searchParams.set("url",e),(0,j.WY)(n,{okType:Ni.object({type:Ni.string(),version:Ni.string().or(Ni.number()).nullish(),title:Ni.string().nullish(),author_name:Ni.string().nullish(),author_url:Ni.string().nullish(),provider_name:Ni.string().nullish(),provider_url:Ni.string().nullish(),cache_age:Ni.string().or(Ni.number()).nullish(),thumbnail_url:Ni.string().nullish(),thumbnail_width:Ni.number().nullish(),thumbnail_height:Ni.number().nullish(),html:Ni.string().nullish()}).passthrough().transform(t=>{let n={embed_url:e};return{...n,__TYPE__:"EmbedContent",type:t.type,version:t.version,title:t.title,author_name:t.author_name,author_url:t.author_url,provider_name:t.provider_name,provider_url:t.provider_url,cache_age:t.cache_age,thumbnail_url:t.thumbnail_url,thumbnail_width:t.thumbnail_width,thumbnail_height:t.thumbnail_height,html:t.html,all:{...n,...t}}})})}function QT(e){let{id:t,readOnly:n,field:r,content:i,onContentChange:o}=e,a=(0,_.$P)({initialState:(null==i?void 0:i.embed_url)??"",startTransition:C.startTransition});function u(e){a.set(e),(0,w.ju)(e)||o(void 0)}return V.jsxs(S.gN,{footer:(0,w.ju)(a.value)&&V.jsx(S.mS,{children:V.jsx(QC,{debouncedUrl:a.debouncedValue,content:i,onContentChange:o})}),children:[V.jsx(S.fw,{name:"cloud"}),V.jsx(S.Qy,{htmlFor:t,children:Qp(r)}),V.jsx(S.JO,{children:V.jsx(Qy,{id:t,readOnly:n,placeholder:QA(r),value:a.value,onValueChange:u,variant:(0,w.ju)(a.value)?"link":"normal",endAdornment:V.jsx(S.zx,{startIcon:"close",color:"grey",size:"small",disabled:!a,onClick:()=>u("")})})})]})}function Qk(e){return!(e.lat>85||e.lat<-85||e.lng>180||e.lng<-180)}function QO(e){let t=e.match(/^.*@(-?\d+.\d+),(-?\d+.\d+).*$/);if(!t)return;let n=parseFloat(t[1]??""),r=parseFloat(t[2]??"");if(isNaN(n)||isNaN(r))return;let i={lat:n,lng:r};if(Qk(i))return i}function QR(e){return e?`${e.lat}, ${e.lng}`:""}function QE(e){let t=e.match(/\(?([\d|.|-]*)[\s+]*,[\s]*([\d|.|-]*)\)?/);if(!t)return QO(e);let n=parseFloat(t[1]??""),r=parseFloat(t[2]??"");if(isNaN(n)||isNaN(r))return QO(e);let i={lat:n,lng:r};return Qk(i)?i:QO(e)}function Qj(e){let{field:t,id:n,readOnly:r,...i}=e,{onValueChange:o,displayedValue:a,onBlur:u,clearValue:s,isValidCoordinates:l}=function(e){let{content:t,onContentChange:n}=e,r=QR(null==t?void 0:t.position),[i,o]=(0,C.useState)(r),a=!!QE(i);return{displayedValue:i,isValidCoordinates:a,onValueChange:o,onBlur:function(){let e=QE(i);if(!e)return o(""),n(void 0);let{lat:t,lng:r}=e;o(QR({lat:t,lng:r})),n({__TYPE__:"GeoPointContent",position:{lat:t,lng:r}})},clearValue:function(){o(""),n(void 0)}}}(i);return V.jsxs(S.gN,{children:[V.jsx(S.fw,{name:"place"}),V.jsx(S.Qy,{htmlFor:n,children:Qp(t)}),V.jsx(S.JO,{children:V.jsx(Qy,{id:n,onValueChange:o,placeholder:"...",readOnly:r,value:a,onBlur:u,variant:l?"link":"normal",endAdornment:V.jsx(S.zx,{startIcon:"close",color:"grey",size:"small",disabled:!a,onClick:s})})})]})}function QF(e){let{fieldLabel:t,imageLabel:n=[]}=e;return V.jsxs(S.wP,{children:[V.jsx(S.xv,{variant:"bold",noWrap:!0,children:(0,O.tx)(t,30)}),0!==n.length&&V.jsx(S.xv,{color:"grey11",noSelect:!0,children:` • ${n.join(" • ")}`})]})}function QM(e){let{fieldLabel:t,isUpdating:n,readOnly:r,onMediaDialogOpenChange:i}=e;return V.jsxs(V.Fragment,{children:[V.jsx(S.Ol,{sx:{flexWrap:"wrap"},children:V.jsx(QF,{fieldLabel:t})}),V.jsx(S.aY,{children:V.jsx(S.Zb,{color:"grey2",variant:"dashed",paddingBlock:12,radius:4,sx:{width:"100%"},children:V.jsx(S.aY,{children:V.jsxs(S.R$,{variant:"horizontal",children:[V.jsx(S.av,{name:"cloudUpload",lineColor:"purple9",backgroundColor:"purple4",size:"small"}),V.jsx(S._T,{children:n?"Preparing your image...":"You haven't selected an image"}),!r&&V.jsx(S.Qj,{children:V.jsx(S.zx,{disabled:n,onClick:()=>i(!0),size:"medium",children:"Select image"})})]})})})})]})}let QU=DH({id:DM(),width:DU(),height:DU(),urls:DH({full:DM(),small:DM().transform(function(e){let t=new URL(e);return t.searchParams.delete("q"),t.searchParams.delete("fm"),t.searchParams.set("w","300"),t.searchParams.set("auto","compress,format"),t.toString()})}),alt_description:DM().optional(),description:DM().nullable()}),QL=DH({results:DY(QU)}).transform(e=>e.results);function QK(e,t){let n=new URL("search/photos",e);return n.searchParams.set("page","1"),n.searchParams.set("per_page","28"),n.searchParams.set("query",t),(0,j.WY)(n,{okType:QL})}function QB(e){let{onSelectedChange:t}=e,[n,r]=(0,C.useTransition)(),i=(0,_.$P)({initialState:"",ms:300,startTransition:r});return V.jsxs(S.xu,{flexDirection:"column",gap:16,width:"100%",position:"relative",children:[V.jsx(S.CR,{value:i.value,placeholder:"Search on Unsplash.com",onValueChange:i.set}),V.jsx(S.SV,{renderError:()=>V.jsx(qs,{}),children:V.jsx(C.Suspense,{fallback:V.jsx(QD,{}),children:V.jsx(QP,{term:i.debouncedValue,loading:n,onSelectedChange:t})})})]})}function QP(e){let{term:t,onSelectedChange:n,loading:r}=e,{media:i,toggleSelected:o,selectedImageId:a}=function(e){var t;let{term:n,onSelectedChange:r}=e,{unsplashApiBaseUrl:i}=WI(),o=function(e,t){let n=(0,C.useRef)(),r=WI(),i=(0,R.QT)(QK,[e,t]);return(0,_.Nr)(t,1e3,()=>{var e;n.current&&t!==n.current&&(null==(e=r.onAnalyticsEvent)||e.call(r,"Unsplash Image Searched")),n.current=t}),i}(i,n||"citrus fruit"),a=null==(t=null==o?void 0:o[0])?void 0:t.id,[u,s]=(0,C.useState)();return(0,C.useEffect)(()=>{null==r||r([]),s(void 0)},[a,r]),{media:o,toggleSelected:function(e){if(e.id===u)return s(void 0),null==r?void 0:r([]);s(e.id),null==r||r([{...e,url:e.urls.full,alt:e.alt_description}])},selectedImageId:u}}({term:t,onSelectedChange:n});return V.jsxs(V.Fragment,{children:[i.length>0&&V.jsx(QW,{children:null==i?void 0:i.map(e=>{let t=new URL(e.urls.full).searchParams.get("fm")??"jpg";return V.jsx(S.PB,{url:e.urls.small,filename:e.description??"Unsplash Image",selected:a===e.id,onCardClick:()=>o(e),onCheckedChange:()=>o(e),extension:t,kind:"image",width:e.width,height:e.height,loading:r},e.id)})}),0===i.length&&V.jsx(qe,{})]})}function QW(e){let{children:t}=e;return V.jsx(S.xr,{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(min(100%, 250px), 1fr))",gap:16,padding:2,paddingBottom:16,position:"relative",width:"100%"},children:t})}function QD(){return V.jsx(QW,{children:(0,E.w6)(1,24).map(e=>V.jsx(qv,{},e))})}function QN(e){let{open:t,onOpenChange:n,onMediaSelected:r,assetType:i}=e,o=WI(),a=o.mediaLibrary,[u,s]=(0,C.useState)(()=>a?"media":"unsplash"),[l,c]=(0,C.useState)(new Set),[d,f]=(0,C.useState)([]),p=l.size+d.length,A=(0,R.q_)(Nq);function h(e){e||c(new Set),n(e)}(0,C.useEffect)(()=>{t&&a&&NJ({config:o,assetType:i})},[t,o,i,a]);let m=function(e){let{assetType:t,mediaDialogOpen:n}=e,r=WI(),i=(0,R.q_)(Nq),o=(0,C.useRef)(0);return(0,C.useEffect)(()=>{n&&(o.current=performance.now())},[n]),function(e){if(!r.onAnalyticsEvent||!r.mediaLibrary)return;let n=i[i.length-1];if(!n)return;let{keyword:a,uploaderId:u,tags:s}=n,l=NH(i,a,t,u,s),c=String(a.split(" ").length),d=String(n.total),f=String(l.findIndex(t=>t.id===e)+1),p=[e].join(","),A=(performance.now()-o.current).toFixed(0);r.onAnalyticsEvent("Media Added To Page",{assetType:t,searchQuery:a,numberOfWords:c,numberOfResults:d,searchPosition:f,mediaIds:p,timeToAddMediaToPage:A,tags:s})}}({assetType:i,mediaDialogOpen:t}),{containerRef:g}=(0,S.VY)();return V.jsxs(S.Vq,{open:t,onOpenChange:h,size:{width:"min(calc(100% - 48px), 2000px)",height:"calc(100% - 30px)"},position:"center",onPointerDownOutside:e=>{g&&(0,_.DX)(g,e.target)&&e.preventDefault()},children:[V.jsx(S.fK,{icon:"image",title:"Media library"}),V.jsxs(S.Zp,{value:u,onValueChange:function(e){if("media"!==e&&"unsplash"!==e)throw Error(`Invalid option ${e}.`);s(e)},padding:"small",width:"auto",children:[a&&V.jsx(S.T9,{value:"media",icon:"photo"}),V.jsx(S.T9,{value:"unsplash",icon:"unsplash"})]}),V.jsx(S.cZ,{children:V.jsxs(S.xu,{flexDirection:"column",flexGrow:1,overflow:"hidden",children:[V.jsx(Wg,{}),V.jsxs(S.xu,{overflow:"hidden",backgroundColor:"grey2",padding:{top:16,inline:16},flexGrow:1,children:["media"===u&&V.jsx(Qu,{assetType:i,onSelectedChange:c}),"unsplash"===u&&V.jsx(QB,{onSelectedChange:f})]})]})}),V.jsxs(S.kX,{children:[V.jsx(S.PO,{}),V.jsx(S._d,{onClick:function(){var e;if("unsplash"===u){let t=d[0];if(!t)return;r(t),null==(e=o.onAnalyticsEvent)||e.call(o,"Unsplash Image Added")}else if("media"===u){let e=A.flatMap(e=>e.items).filter(e=>l.has(e.id))[0];if(!e)return;r(e),m(e.id)}h(!1)},disabled:1!==p,tooltipLabel:0===p?"Select a media item to add to the page":p>1?"Only one media item can be added to the page":void 0,children:"Add to page"})]})]})}R.Fs.registerFetcherConfig(QK,{cacheCapacity:5,revalidationStrategy:{type:"never"}});let Qq=(0,C.forwardRef)(function(e,t){let{isMediaDialogOpen:n,selected:r,children:i,onMediaSelected:o,onMediaDialogOpenChange:a}=e;return V.jsxs(S.Zb,{ref:t,color:r?"indigo2":"grey2",variant:r?"selected":"dashed",paddingBlock:12,radius:4,children:[i,V.jsx(QN,{open:n,onOpenChange:a,onMediaSelected:o,assetType:"image"})]})});function QQ(e){let{contentView:t,croppedImage:n}=e,{width:r,height:i,x:o,y:a,zoom:u}=n,s=function(e){let{origin:t,croppedImage:n}=e,{x:r,y:i,width:o,height:a,cropHeight:u,cropWidth:s}=n,l=new URL(t.url),c=t.height!==a||t.width!==o;if(0!==r||0!==i||u!==t.height||s!==t.width){let e=[r,i,s,u].map(Math.round).join(",");l.searchParams.set("rect",e),l.searchParams.set("w",o.toString()),l.searchParams.set("h",a.toString())}return c&&(l.searchParams.set("w",o.toString()),l.searchParams.set("h",a.toString())),l.toString()}({origin:t.origin,croppedImage:n});return{...t,width:r,height:i,url:s,edit:{...t.edit,zoom:u,crop:{x:o,y:a}}}}function QV(e){let{content:t,croppedImage:n}=e,r=QQ({contentView:t,croppedImage:n});return r.url===t.url?t:{...t,...r}}function Qz(e){let{selectedImage:t,imageCrop:n,setImageCrop:r}=e,{width:i,height:o,zoom:a,cropHeight:u,cropWidth:s}=n,l=t.contentView,c={x:n.x,y:n.y,width:s,height:u},[d,f]=(0,C.useState)(),p=(null==l?void 0:l.origin.url)??"",A=!(null!=t&&t.thumbnail.height&&null!=t&&t.thumbnail.width);function h(e,t){let i=parseInt(t);isNaN(i)||i<=0||!A||r({...n,[e]:i})}function m(e){r({...n,zoom:e})}return V.jsxs(S.xu,{padding:{inline:24,block:16},flexDirection:"column",gap:16,height:"100%",overflowY:"auto",alignItems:"center",children:[V.jsxs(S.xu,{gap:8,height:32,alignItems:"flex-start",width:"100%",children:[V.jsx(S.u,{content:"Center",children:V.jsx(S.zx,{color:"grey",size:"medium",startIcon:"centerFocusWeak",onClick:function(){f(QY),r({...n,...QY})}})}),V.jsx(S.u,{content:"Cover",children:V.jsx(S.zx,{color:"grey",size:"medium",startIcon:"zoomOutMap",onClick:function(){l&&(f(QY),r({...n,...QY,zoom:1,cropWidth:l.width,cropHeight:l.height}))}})}),V.jsx(S.Z0,{orientation:"vertical"}),V.jsx(S.yt,{prefix:"W",prefixTooltip:"Width",placeholder:"width",type:"number",size:"medium",value:String(i),onValueChange:e=>h("width",e),sx:{width:100},disabled:!A}),V.jsx(S.yt,{prefix:"H",prefixTooltip:"Height",placeholder:"height",type:"number",size:"medium",value:String(o),onValueChange:e=>h("height",e),sx:{width:100},disabled:!A})]}),V.jsx(S.fl,{image:p,aspect:i/o,crop:d??{x:0,y:0},onCropChange:f,zoom:a,onZoomChange:m,onCropAreaChange:(e,t)=>{r({...n,cropWidth:t.width,cropHeight:t.height,x:t.x,y:t.y})},initialCroppedAreaPixels:c}),V.jsx(S.xu,{width:"100%",maxWidth:320,children:V.jsx(S.iR,{min:1,max:3,step:.01,value:[a],onValueChange:([e])=>m(e??1)})})]})}let QY={x:0,y:0};function QH(e){let{trigger:t,initialImages:n,renderTooltip:r}=e,{open:i,onOpenChange:o,ready:a,option:u,selectedImage:s,croppedImage:l,setCroppedImage:c,setReady:d,setOption:f}=function(e){let{initialImages:t,initialOption:n,onClose:r}=e,[i,o]=(0,C.useState)(A),[a,u]=(0,C.useState)(!1),[s,l]=(0,C.useState)(!1),[c,d]=(0,C.useState)(n),f=t[c],p=i[(null==f?void 0:f.thumbnail.name)??""];function A(){return t.reduce((e,t)=>(t.contentView&&(e[t.thumbnail.name]=function(e){let t,n;let{edit:{crop:{x:r,y:i},zoom:o},width:a,height:u,origin:{width:s,height:l}}=e,c=a/u;return c>=s/l?n=(t=s/o)/c:t=(n=l/o)*c,{x:r,y:i,width:a,height:u,zoom:o,cropWidth:t,cropHeight:n}}(t.contentView)),e),{})}return{open:a,ready:s,option:c,selectedImage:f,croppedImage:p,setCroppedImage:function(e){if(!f)return;let t=f.thumbnail.name;o({...i,[t]:e})},setReady:l,setOption:d,onClose:r,onOpenChange:function(e){e?(d(n),o(A())):(l(!1),r({option:c,croppedImages:i})),u(e)}}}(e);return V.jsxs(S.Vq,{trigger:t,onAnimationEnd:()=>d(!0),open:i,onOpenChange:o,renderTooltip:r,children:[V.jsx(S.fK,{icon:"photo",title:"Image editor"}),V.jsx(S.Zp,{value:String(u),onValueChange:e=>f(Number(e)),children:n.map((e,t)=>V.jsx(S.T9,{value:String(t),icon:"photo",title:e.labels[0]??"Main",subtitle:e.labels[1]??""},e.thumbnail.name))}),s&&V.jsx(S.cZ,{children:a&&l&&V.jsx(Qz,{selectedImage:s,imageCrop:l,setImageCrop:c},s.thumbnail.name)})]})}function QG(e){let{readOnly:t,altText:n,selected:r,onValueChange:i}=e,o=(0,C.useId)();return V.jsxs(S.gN,{selected:r,children:[V.jsx(S.Qy,{htmlFor:o,children:"Alt text"}),V.jsx(S.JO,{children:V.jsx(S.xu,{flexGrow:1,height:40,children:V.jsx(Qy,{id:o,placeholder:"Short description for the visually impaired",readOnly:t,value:n,padding:{input:{inline:12}},onValueChange:i})})})]})}function QZ(e){let{fieldLabel:t,imageLabel:n,initialImages:r,page:i,displaySeparator:o=!0,isSVGContentView:a,visibility:u,onClear:s,onCropperDialogClose:l,onMediaDialogOpenChange:c}=e;return V.jsxs(S.xu,{display:"flex",flexDirection:"column",gap:12,children:[V.jsxs(S.xu,{display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:4,children:[V.jsx(QF,{fieldLabel:t,imageLabel:n}),V.jsxs(S.Pf,{sx:{visibility:u},children:[V.jsx(QH,{trigger:V.jsx(S.zx,{startIcon:"crop",disabled:a,hiddenLabel:"Crop & Resize"}),renderTooltip:e=>V.jsx(S.u,{content:"Crop & Resize",children:e}),initialImages:r,initialOption:i,onClose:l}),V.jsx(S.u,{content:"Replace",children:V.jsx(S.zx,{startIcon:"imageSearch",hiddenLabel:"Replace",onClick:()=>c(!0)})}),V.jsx(S.u,{content:"Clear",children:V.jsx(S.zx,{onClick:s,startIcon:"delete",hiddenLabel:"Clear"})})]})]}),o&&V.jsx(S.Z0,{style:"dashed",decorative:!0})]})}function QJ(e){let{description:t,largeIconName:n="public",loading:r,error:i,onEdit:o,onUnlink:a}=e,u=i?V.jsx(Q2,{}):V.jsx(Q1,{...e,largeIconName:n,loading:r});return V.jsx(S.Zb,{sx:{width:420},children:V.jsxs(S.aY,{gap:12,children:[V.jsxs(S.xu,{display:"grid",gridTemplateColumns:"max-content 1fr min-content",gridTemplateRows:"1fr",gap:8,children:[u,V.jsxs(S.hE,{size:"medium",color:"grey",sx:{justifySelf:"end"},children:[o&&V.jsx(S.zx,{startIcon:"edit",onClick:o}),a&&V.jsx(S.zx,{startIcon:"linkOff",onClick:a})]})]}),!i&&V.jsx(Q0,{description:t,loading:r})]})})}function Q$(e){let{url:t,title:n,loading:r}=e;return r?V.jsx(Q6,{height:16,width:80}):n?V.jsx(S.xv,{variant:"smallBold",href:null==t?void 0:t.toString(),children:n}):null}function QX(e){let{subTitle:t,loading:n}=e;return n?V.jsx(S.xu,{padding:{block:2},children:V.jsx(Q6,{height:12,width:60})}):t?V.jsx(S.xv,{variant:"small",color:"grey11",noWrap:!0,children:t}):null}function Q0(e){let{description:t,loading:n}=e;return!t||n?null:V.jsx(S.xv,{variant:"small",color:"grey11",children:t})}function Q1(e){let{largeIconName:t,title:n,url:r,loading:i,subTitle:o}=e;return V.jsxs(V.Fragment,{children:[V.jsx(S.pI,{largeIconName:t,smallIconName:"link"}),V.jsxs(S.xu,{flexDirection:"column",minWidth:0,children:[V.jsx(Q$,{title:n,url:r,loading:i}),V.jsx(QX,{subTitle:o,loading:i})]})]})}function Q2(){return V.jsxs(S.xu,{alignItems:"center",gap:8,children:[V.jsx(S.CircleIcon,{name:"alert",color:"tomato",size:"small"}),V.jsx(S.xv,{color:"tomato11",children:"Failed to load linked document data"})]})}function Q6(e){let{width:t,height:n}=e;return V.jsx(S.Od,{color:"grey5",borderRadius:6,width:t,height:n})}function Q5(e){let{documentType:t,documentUrl:n,title:r,statusColor:i,description:o,tags:a,tagsFilter:u,previewImageUrl:s,onSelect:l}=e;return V.jsxs(S.Zb,{paddingBlock:16,onSelect:function(e){return e.nativeEvent instanceof MouseEvent&&(e.metaKey||e.ctrlKey)?window.open(n,"_blank"):l()},children:[V.jsx(S.aY,{children:V.jsxs(S.xu,{justifyContent:"space-between",children:[V.jsxs(S.xu,{flexDirection:"column",gap:4,alignItems:"flex-start",flexGrow:1,children:[V.jsx(Q3,{documentType:t}),V.jsx(Q9,{title:r,statusColor:i}),V.jsx(Q4,{description:o})]}),V.jsx(Q8,{previewImageUrl:s})]})}),a.length>0&&V.jsx(Q7,{tags:a,tagsFilter:u})]})}function Q3(e){let{documentType:t}=e;return V.jsx(S.Ct,{maxWidth:150,size:"medium",title:`Type: ${t}`,icon:"description"})}function Q9(e){let{title:t,statusColor:n}=e;return V.jsxs(S.xu,{gap:8,alignItems:"center",children:[V.jsx(S.oT,{color:n}),V.jsx(S.xv,{variant:"bold",children:t})]})}function Q4(e){let{description:t}=e,n=null==t?void 0:t.substring(0,150);return n?V.jsx(S.xv,{variant:"small",color:"grey11",children:`${n}${n!==t?"...":""}`}):V.jsx(S.xv,{variant:"smallItalic",color:"grey11",children:"No description available"})}function Q8(e){let{previewImageUrl:t}=e;return V.jsx(S.xu,{width:142,height:90,backgroundColor:"grey2",border:!0,borderRadius:6,flexDirection:"column",alignItems:"center",justifyContent:"center",gap:4,flexShrink:0,padding:8,children:t?V.jsx(S.Ee,{src:t,sizing:"cover"}):V.jsxs(V.Fragment,{children:[V.jsx(S.I5,{name:"hideImage",size:"large",color:"grey11"}),V.jsx(S.xv,{color:"grey11",variant:"small",children:"No preview available"})]})})}function Q7(e){let{tags:t}=e;return V.jsxs(S.eW,{children:[V.jsxs(S.xu,{gap:4,alignItems:"center",children:[V.jsx(S.I5,{name:"label",size:"small",color:"grey11"}),V.jsx(S.xv,{variant:"small",color:"grey11",children:"Tags:"})]}),V.jsx(S.lG,{children:t.map(e=>V.jsx(S.Ct,{size:"medium",title:e,sx:{marginRight:8}},e))})]})}async function Ve(e,t,n,r,i,o){let a=WA[i];if(!o)return Vt((await function(e,t,n,r,i){let o=new URL("documents",e);return o.searchParams.set("limit","200"),o.search+=`&${n}`,(0,j.WY)(o,{credentials:(0,j.xb)(t),okType:Nf})}(e,n,r,0)).results,a);let u=await function(e,t,n,r){let i=new URL(e);return i.search=n,(0,j.WY)(i,{credentials:(0,j.xb)(t),okType:NA})}(t,n,r);return Vt(await Ng(e,n,u.results),a)}function Vt(e,t){return{results:e.flatMap(e=>{let n=e.versions.filter(e=>t.includes(e.status));return 0===n.length?[]:{...e,versions:n}})}}function Vn(){let e=WI();e.searchDocuments||WT("searchDocuments");let{coreApiBaseUrl:t,authStrategy:n}=e;return new Set((0,R.QT)(Nw,[t,n]).languages.map(e=>({id:e.id,label:e.name})))}function Vr(){let e=WI();e.searchDocuments||WT("searchDocuments");let{coreApiBaseUrl:t,authStrategy:n}=e;return new Set((0,R.QT)(N_,[t,n]).results.map(e=>({id:e,label:e})))}function Vi(){let e=WI();e.searchDocuments||WT("searchDocuments");let{customTypesApiBaseUrl:t,repository:n,authStrategy:r}=e;return new Set((0,R.QT)(Nu,[t,n,r]))}function Vo(e){return e?(0,U.UI)(e,e=>({id:e,label:e})):new Set}function Va(e){let{filteredLocales:t,setFilteredLocales:n,filteredTags:r,setFilteredTags:i,filteredCustomTypes:o,setFilteredCustomTypes:a,fixedTags:u,fixedCustomTypes:s}=e;return V.jsxs(V.Fragment,{children:[V.jsx(Vl,{selectedValues:t,onSelectedValuesChange:n}),V.jsx(Vu,{selectedValues:r,fixedSelectedValues:Vo(u),onSelectedValuesChange:i,label:"Tags",icon:"label",fetchFilters:Vr}),V.jsx(Vu,{selectedValues:o,fixedSelectedValues:Vo(s),onSelectedValuesChange:a,label:"Type",icon:"description",fetchFilters:Vi})]})}function Vu(e){let[t,n]=(0,C.useState)(!1),r=(0,C.useRef)(null);return V.jsx(S.SV,{ref:r,renderError:()=>{var i;return V.jsx(S.R0,{mode:"error",onErrorRetry:null==(i=r.current)?void 0:i.reset,open:t,setOpen:n,values:new Set,...e})},children:V.jsx(C.Suspense,{fallback:V.jsx(S.R0,{mode:"loading",open:t,setOpen:n,values:new Set,...e}),children:V.jsx(Vs,{open:t,setOpen:n,...e})})})}function Vs(e){let{open:t,setOpen:n,onSelectedValuesChange:r,fixedSelectedValues:i,selectedValues:o,label:a,icon:u,fetchFilters:s,multiple:l}=e,c=s();return V.jsx(S.R0,{open:t,setOpen:n,label:a,icon:u,selectedValues:o,values:new Set(c),fixedSelectedValues:i,onSelectedValuesChange:r,multiple:l})}function Vl(e){let{selectedValues:t,onSelectedValuesChange:n}=e,[r,i]=(0,C.useState)((0,U.Ps)(t)),o=(0,U.sE)(Vn(),e=>{var n;return e.id===(null==(n=(0,U.Ps)(t))?void 0:n.id)});return(null==o?void 0:o.label)!==(null==r?void 0:r.label)&&i(o),V.jsx(Vu,{selectedValues:new Set(r?[r]:[]),onSelectedValuesChange:function(e){n(e),i((0,U.Ps)(e))},label:"Locale",icon:"public",fetchFilters:Vn,multiple:!1})}function Vc(e){let{onSelectDocument:t,fixedCustomTypes:n,fixedTags:r,...i}=e,o=WI(),{searchTerm:a,filteredTags:u,setFilteredTags:s,filteredCustomTypes:l,setFilteredCustomTypes:c,filteredLocales:d,setFilteredLocales:f,typesFilter:p,tagsFilter:A}=function(e,t){let n=WI(),r=(0,_.$P)({initialState:""}),[i,o]=(0,C.useState)(new Set),[a,u]=(0,C.useState)(new Set),[s,l]=(0,C.useState)(function(){return n.searchDocuments&&n.localeId?new Set([{id:n.localeId,label:n.localeId}]):new Set}),c=(0,U.G0)(a,Vo(e)),d=(0,U.G0)(i,Vo(t));return{searchTerm:r,filteredTags:i,setFilteredTags:o,filteredCustomTypes:a,setFilteredCustomTypes:u,filteredLocales:s,setFilteredLocales:l,typesFilter:c,tagsFilter:d}}(n,r),[h,m]=(0,C.useTransition)();return V.jsx(S.Vq,{size:{height:727,width:656},hasClose:!1,...i,children:V.jsx(S.cZ,{children:V.jsxs(S.xu,{flexDirection:"column",height:"100%",children:[V.jsxs(S.xu,{padding:{top:16,inline:16,bottom:8},flexDirection:"column",gap:12,children:[V.jsx(S.yt,{value:a.value,onValueChange:a.set,placeholder:"Search a page",icon:"search"}),o.searchDocuments&&V.jsx(Va,{filteredTags:u,setFilteredTags:s,filteredCustomTypes:l,setFilteredCustomTypes:c,filteredLocales:d,setFilteredLocales:f,fixedTags:r,fixedCustomTypes:n}),V.jsx(S.xv,{variant:"smallBold",color:"grey11",children:"Link to a document"})]}),o.searchDocuments?V.jsx(S.SV,{renderError:Vd,children:V.jsx(C.Suspense,{fallback:V.jsx(VA,{}),children:V.jsx(Vf,{searchTerm:a.debouncedValue,tagsFilter:A,typesFilter:p,localesFilter:d,startTransition:m,isLoadingDocuments:h,onSelectDocument:t})})}):V.jsx(Vp,{message:"Slice Machine does not yet support mock data for linked documents in the simulator."})]})})})}function Vd(){return V.jsx(S.xu,{height:"100%",flexDirection:"column",alignItems:"center",justifyContent:"center",children:V.jsx(S.Iq,{title:"Request failed",description:"An error occurred while fetching documents.",errorImageSrc:S.Os})})}function Vf(e){let{searchTerm:t,tagsFilter:n,typesFilter:r,localesFilter:i,isLoadingDocuments:o,onSelectDocument:a}=e,{documents:u}=function(e){var t,n,r;let{searchTerm:i,tagsFilter:o,typesFilter:a,localesFilter:u}=e,s=WI();s.searchDocuments||WT("searchDocuments");let{coreApiBaseUrl:l,documentSearchBaseUrl:c,authStrategy:d,status:f,repository:p}=s,{storageVersion:A}=(0,R.QT)(Nw,[l,d]),h=A.major>=7,[m,g]=(0,C.useState)([]),[y,v]=(0,C.useState)(""),x=h?function(e){let{repository:t,searchTerm:n,tags:r,localeId:i,customTypesIds:o}=e,a=new URLSearchParams;return a.append("repository",t),n&&a.append("searchTerm",n),null!=r&&r.length&&a.append("tags",r.toString()),i&&a.append("localeId",i),null!=o&&o.length&&a.append("customTypesIds",o.toString()),a.toString()}({repository:p,searchTerm:i,customTypesIds:[...(0,U.UI)(a,e=>e.id)],tags:[...(0,U.UI)(o,e=>e.id)],localeId:[...(0,U.UI)(u,e=>e.id)][0]}):(r={tags:[...(0,U.UI)(o,e=>e.id)],customTypes:[...(0,U.UI)(a,e=>e.id)],language:[...(0,U.UI)(u,e=>e.id)],term:[i]},new URLSearchParams(Nh((0,I.XP)(r).flatMap(e=>{let t=r[e];return t?{name:e,values:t}:[]}))).toString()),b=(0,R.QT)(Ve,[l,c,d,x,f,h]);return x!==y?(v(x),g(b.results)):b.results.length>0&&(null==(t=(0,E.Z$)(m))?void 0:t.id)!==(null==(n=(0,E.Z$)(b.results))?void 0:n.id)&&g(e=>e.concat(b.results)),{documents:m,response:b}}({searchTerm:t,tagsFilter:n,localesFilter:i,typesFilter:r}),s=WI();return V.jsxs(S.xr,{style:{flexGrow:1,paddingTop:S.rS.space[10],paddingBottom:S.rS.space[16],paddingInline:S.rS.space[16],display:"flex",flexDirection:"column",gap:S.rS.space[12]},children:[0===u.length&&V.jsx(Vp,{}),u.map(e=>{let t=e.versions[0];if(!t)return null;let r=Wh({documentId:e.id,versionId:"archived"===t.status?t.version_id:void 0,releaseId:"release"===t.status?t.release_id:void 0,status:t.status,baseUrl:s.baseUrl}),i=function(e){let{tags:t,tagsFilter:n}=e,r=[...n].map(e=>e.label).reverse();return(0,E.DY)(t,e=>-r.indexOf(e))}({tags:t.tags,tagsFilter:n});return V.jsx(Q5,{documentType:t.custom_type_label,documentUrl:r,description:t.preview_summary,tags:i,title:e.title,previewImageUrl:t.preview_image,onSelect:()=>a(e.id),statusColor:Wp[t.status].color},`${e.id}-${t.status}`)}),V.jsx(S.Fp,{animation:{name:"fade"},children:o&&V.jsx(S.xv,{color:"grey11",align:"center",sx:{marginBlock:8},children:"Loading more results ..."})})]})}function Vp(e){let{message:t="We can't find any versions matching this request"}=e;return V.jsx(S.xu,{justifyContent:"center",flexDirection:"column",height:"100%",children:V.jsxs(S.R$,{children:[V.jsx(S.av,{name:"close",lineColor:"purple10",backgroundColor:"purple3",borderColor:"purple6",borderStyle:"dashed",size:"xlarge"}),V.jsx(S._T,{size:"big",children:"Oops!"}),V.jsx(S.nf,{width:360,children:t})]})})}function VA(){return V.jsx(S.xu,{flexDirection:"column",gap:12,padding:{top:10,inline:16,bottom:16},children:(0,E.w6)(1,5).map(e=>V.jsx(S.Od,{height:150},e))})}function Vh(e){let{hasLink:t,onUnlink:n,selectEnabled:r,selectedType:i,value:o,onOpenLinkModal:a,onValueChange:u,openInNewTab:s=!0,condensedButtons:l=!1,showNewTabButton:c=!1,displayTextEnabled:d}=e;return V.jsxs(V.Fragment,{children:[!d&&c&&s&&V.jsx(S.Ct,{title:"Open in a new tab",color:"indigo",size:"small",icon:"openInNew",onClick:a}),!t&&r&&V.jsxs(S.Ph,{value:"any"===i?void 0:i,color:"grey",size:"small",boldTriggerText:!0,position:"popper",sideOffset:4,startIcon:Vj({selectType:i}),disabled:!r,onValueChange:u,placeholder:l?"":Vm("any"),onlyStartIcon:l&&void 0!==i,renderTrigger:({button:e})=>V.jsx(S.u,{content:Vm(i),visible:l,children:e}),children:[V.jsx(S.Ql,{value:"web",icon:"public",children:Vm("web")}),V.jsx(S.Ql,{value:"document",icon:"description",children:Vm("document")}),V.jsx(S.Ql,{value:"media",icon:"image",children:Vm("media")})]},void 0===i?"unlinked":"linked"),!t&&!r&&V.jsx(S.zx,{startIcon:Vj({selectType:i}),color:"grey",textColor:"link",textWeight:"normal",size:"small",onClick:a,children:Vm(i)}),t&&!d&&V.jsx(S.zx,{startIcon:"close",color:"grey",size:"small",onClick:n,"aria-label":"Close"}),t&&d&&V.jsxs(S.hE,{density:"compact",children:[V.jsx(S.zx,{startIcon:Vj({selectType:i}),renderEndIcon:()=>s&&"web"===i?V.jsx(S.I5,{name:"openInNew",size:"extraSmall",color:"indigo11"}):null,color:"grey",textColor:"link",textWeight:"normal",size:"small",disabled:!t,onClick:a,children:o.length>30?`${o.slice(0,30)}...`:o}),V.jsx(S.zx,{startIcon:"close",color:"grey",size:"small",onClick:n})]})]})}function Vm(e){if(!e||"any"===e)return"Choose link type";switch(e){case"document":return"Link to Prismic page";case"web":return"Link to web page";case"media":return"Link to media"}}function Vg(e){let{onEdit:t,onUnlink:n,url:r,title:i,subTitle:o}=e;return V.jsx(S.Zb,{paddingBlock:16,children:V.jsxs(S.aY,{sx:{width:433},children:[V.jsx(Vv,{url:r,title:i,subTitle:o,onEdit:t,onUnlink:n}),r&&V.jsx(S.hM,{children:V.jsx(Vy,{children:V.jsx(S.Ee,{src:r,alt:i,sizing:"contain"})})})]})})}function Vy(e){let{children:t}=e;return V.jsx(S.xu,{flexDirection:"column",alignItems:"center",justifyContent:"center",position:"relative",height:327,children:t})}function Vv(e){let{url:t,title:n,subTitle:r,onEdit:i,onUnlink:o}=e;return V.jsxs(S.xu,{flexDirection:"row",justifyContent:"space-between",gap:8,children:[V.jsxs(S.xu,{gap:8,minWidth:0,children:[V.jsx(S.pI,{largeIconName:"image",smallIconName:"link"}),V.jsxs(S.xu,{flexDirection:"column",minWidth:0,children:[V.jsx(S.xv,{noWrap:!0,variant:"smallBold",href:t,inline:!0,children:n}),V.jsx(S.xv,{variant:"small",color:"grey11",children:r})]})]}),V.jsxs(S.hE,{size:"medium",color:"grey",children:[i&&V.jsx(Vx,{onEdit:i}),o&&V.jsx(Vb,{onUnlink:o})]})]})}function Vx(e){let{onEdit:t}=e;return V.jsx(S.u,{content:"Edit link",side:"top",stableMount:!0,zIndexHack:!0,children:V.jsx(S.zx,{startIcon:"edit",onClick:t})})}function Vb(e){let{onUnlink:t}=e;return V.jsx(S.u,{content:"Remove link",side:"top",stableMount:!0,zIndexHack:!0,children:V.jsx(S.zx,{startIcon:"linkOff",onClick:t})})}R.Fs.registerFetcherConfig(Ve,{cacheCapacity:500,revalidationStrategy:{type:"never"}});let VC={AnyLink:"any",DocumentLink:"document",ExternalLink:"web",FileLink:"media",ImageLink:"media",MediaLink:"media"},VS={any:"AnyLink",document:"DocumentLink",web:"ExternalLink",media:"FileLink"},Vw=DH({id:DM(),title:DM()});function VI(e,t,n){return(0,j.WY)(new URL(`documents/${n}`,e),{credentials:(0,j.xb)(t),okType:Vw})}function V_(e){var t,n,r,i,o,a;let{media:u}=e,s="kind"in u;return s&&"image"===u.kind?{__TYPE__:"LinkContent",value:{__TYPE__:"ImageLink",id:u.id,name:u.filename,url:u.url,kind:u.kind,size:u.size.toString(),height:(null==(t=u.height)?void 0:t.toString())??"2000",width:(null==(n=u.width)?void 0:n.toString())??"2000",date:(null==(r=u.last_modified)?void 0:r.toString())??""}}:s?{__TYPE__:"LinkContent",value:{__TYPE__:"FileLink",id:u.id,name:u.filename,kind:u.kind,url:u.url,size:u.size.toString(),date:(null==(i=u.last_modified)?void 0:i.toString())??""}}:{__TYPE__:"LinkContent",value:{__TYPE__:"ImageLink",id:u.id,name:(null==u?void 0:u.alt)??u.url,kind:"image",url:u.url,size:"0",height:(null==(o=u.height)?void 0:o.toString())??"2000",width:(null==(a=u.width)?void 0:a.toString())??"2000"}}}function VT(e){let{open:t,setOpen:n,showNewTabButton:r}=e,{url:i,setUrl:o,openInNewTab:a,setOpenInNewTab:u,disabled:s,onUpdate:l}=function(e){let{url:t,openInNewTab:n,onUpdate:r,open:i,setOpen:o}=e,[a,u]=(0,C.useState)(t),[s,l]=(0,C.useState)(n);(0,_.pQ)(i,()=>{i&&(u(t),l(n))});let c=!a||a===t&&s===n;return{url:a,setUrl:u,openInNewTab:s,disabled:c,setOpenInNewTab:l,onUpdate:function(){r(a,s),o(!1)}}}(e);return V.jsxs(S.Vq,{open:t,onOpenChange:n,size:"small",children:[V.jsx(S.fK,{title:"Set Link URL"}),V.jsxs(S.cZ,{padding:16,children:[V.jsx(S.yt,{value:i,onValueChange:o,placeholder:"Paste URL",icon:"public"}),r&&V.jsx(S.W4,{value:"Open in a new tab",children:V.jsx(S.XZ,{checked:a,onCheckedChange:u})})]}),V.jsxs(S.kX,{children:[V.jsx(S.PO,{}),V.jsx(S._d,{onClick:l,disabled:s,children:"Update"})]})]})}function Vk(e){var t,n,r,i;let{content:o,field:a,id:u,onContentChange:s,condensedButtons:l=!1}=e,[c,d]=(0,C.useState)(!1),[f,p]=(0,C.useState)(!1),[A,h]=(0,C.useState)(),{contentType:m,fieldValue:g,errorBoundaryRef:y,onDocumentSelected:v,onError:x,onMediaSelected:b,onValueChange:I,selectType:T,onTypeChange:k,isTypeSelectEnabled:O,displayTextEnabled:R,...E}=function(e){var t,n;let{field:r,content:i,onContentChange:o}=e,a=i?z.FilledDocumentLinkContent.is(i.value)?i.value.id:z.FilledExternalLinkContent.is(i.value)?i.value.url:z.FilledFileLinkContent.is(i.value)||z.FilledImageLinkContent.is(i.value)?i.value.name:"":"",u=(null==(t=r.config)?void 0:t.allowText)??!1,s=u&&(null==i?void 0:i.value.text)||void 0,[l,c]=(0,C.useState)(function(){var e,t;return!(null!=(e=r.config)&&e.select)||null!=i&&i.value.__TYPE__?null==i?void 0:i.value.__TYPE__:VS[null==(t=r.config)?void 0:t.select]}),d=z.FilledExternalLinkContent.is(null==i?void 0:i.value)&&(null==i?void 0:i.value.target)||void 0,[f,p]=(0,C.useState)(!1),A=(0,C.useRef)(null);(0,_.pQ)(a,function(){var e;f&&(p(!1),null==(e=A.current)||e.reset())});let h=l?VC[l]:void 0;function m(e){var t;if(!e)return o(void 0);switch(null==(t=r.config)?void 0:t.select){case"web":return o({__TYPE__:"LinkContent",value:{__TYPE__:"ExternalLink",kind:"web",text:e}});case"document":return o({__TYPE__:"LinkContent",value:{__TYPE__:"DocumentLink",kind:"document",text:e}});case"media":return o({__TYPE__:"LinkContent",value:{__TYPE__:"MediaLink",kind:"media",text:e}});default:return o({__TYPE__:"LinkContent",value:{__TYPE__:"AnyLink",text:e}})}}function g(e,t){if(!e)return m(s);switch(l){case"ExternalLink":return o({__TYPE__:"LinkContent",value:{__TYPE__:"ExternalLink",url:e,target:t?"_blank":void 0,text:s}});case"DocumentLink":return o({__TYPE__:"LinkContent",value:{__TYPE__:"DocumentLink",id:e,text:s}});default:return o(void 0)}}return{contentType:l,selectType:h,fieldValue:a,onDisplayTextChange:function(e){return i?o({__TYPE__:i.__TYPE__,value:{...i.value,text:e}}):m(e)},onValueChange:g,onTypeChange:function(e){c(e?VS[e]:void 0),g("")},placeholder:QA(r),isTypeSelectEnabled:!(null!=(n=r.config)&&n.select),onDocumentSelected:function(e){g(e)},onError:function(){p(!0)},errorBoundaryRef:A,isTargetNewTab:"_blank"===d,onMediaSelected:function(e){let t=V_({media:e});switch(t.value.__TYPE__){case"ImageLink":case"FileLink":return o({__TYPE__:t.__TYPE__,value:{...t.value,text:s}})}},displayTextEnabled:u,displayText:s??""}}({content:o,field:a,onContentChange:s});(0,_.pQ)(A,()=>{void 0===T||A||g||!O||k(void 0)});let j="DocumentLink"===m&&""!==g,F="ExternalLink"===m&&(0,w.ju)(g),M=!!(null!=(t=a.config)&&t.allowTargetBlank),U={...E,id:u,onBlur:()=>d(!1),onFocus:()=>{d(!0)},onOpenLinkModal:()=>{switch(d(!0),m){case"DocumentLink":return h("document");case"ExternalLink":return h("web");case"FileLink":case"ImageLink":case"MediaLink":return h("media");default:return h(void 0)}},onUnlink:()=>{O?k(void 0):I("")},onSelectValueChange:e=>{k(e),h(e)},value:g,condensedButtons:l,allowTargetBlank:M,selectType:T,onValueChange:I,isTypeSelectEnabled:O,displayTextEnabled:R},{searchDocuments:L}=WI();return V.jsxs(V.Fragment,{children:[V.jsxs(S.J2,{onMouseOverChange:p,open:c||f,align:"start",sideOffset:-3,openDelay:100,closeDelay:200,focusOnEnter:!1,anchor:V.jsxs(S.gN,{onMouseOverChange:d,children:[V.jsx(S.fw,{name:Vj({selectType:T,displayTextEnabled:R})}),V.jsx(S.Qy,{htmlFor:u,children:Qp(a)}),V.jsx(S.JO,{children:j&&L?V.jsx(VE,{errorBoundaryRef:y,onError:x,fallback:V.jsx(VO,{...U,value:"..."}),renderError:()=>V.jsx(VO,{...U}),children:V.jsx(VR,{...U,documentId:g})}):V.jsx(VO,{...U})})]}),children:[F&&V.jsx(QJ,{url:F,title:(0,w.S$)(F)??"",subTitle:F.toString()}),o&&z.FilledImageLinkContent.is(o.value)&&V.jsx(Vg,{url:o.value.url,title:o.value.name,subTitle:`${o.value.width} x ${o.value.height} pixels`})]}),V.jsx(VT,{open:"web"===A,setOpen:e=>h(e?"web":void 0),url:g,openInNewTab:E.isTargetNewTab,showNewTabButton:!!(null!=(n=a.config)&&n.allowTargetBlank),onUpdate:(e,t)=>I(e,t)}),V.jsx(QN,{open:"media"===A,onOpenChange:e=>h(e?"media":void 0),onMediaSelected:b,assetType:"all"}),V.jsx(Vc,{open:"document"===A,onOpenChange:e=>h(e?"document":void 0),onSelectDocument:e=>{h(void 0),v(e)},fixedCustomTypes:new Set(null==(r=a.config)?void 0:r.customtypes),fixedTags:new Set(null==(i=a.config)?void 0:i.tags)})]})}function VO(e){let{id:t,value:n,onOpenLinkModal:r,onBlur:i,isTypeSelectEnabled:o,selectType:a,onSelectValueChange:u,onUnlink:s,isTargetNewTab:l,condensedButtons:c,allowTargetBlank:d,displayTextEnabled:f}=e,p={onValueChange:e.displayTextEnabled?e.onDisplayTextChange:e.onValueChange,placeholder:e.displayTextEnabled?"Add your display text":e.placeholder,readOnly:!e.displayTextEnabled,value:e.displayTextEnabled?e.displayText:e.value,variant:e.displayTextEnabled?"normal":"link",onFocus:e.displayTextEnabled?e.onFocus:e.onOpenLinkModal,cursor:VF({displayTextEnabled:e.displayTextEnabled,isTypeSelectEnabled:e.isTypeSelectEnabled,value:e.value})};return V.jsx(Qy,{id:t,...p,onBlur:i,textOverflow:"ellipsis",endAdornment:V.jsx(Vh,{hasLink:!!(n&&a),onUnlink:s,selectEnabled:o,selectedType:a,value:n,onOpenLinkModal:r,onValueChange:u,openInNewTab:l,condensedButtons:c,showNewTabButton:d&&"web"===a,displayTextEnabled:f})})}function VR(e){let{id:t,documentId:n,onOpenLinkModal:r,isTypeSelectEnabled:i,selectType:o,displayTextEnabled:a,condensedButtons:u,onSelectValueChange:s,onUnlink:l}=e,c=function(e){let t=WI();t.searchDocuments||WT("searchDocuments");let{coreApiBaseUrl:n,authStrategy:r}=t;return(0,R.QT)(VI,[n,r,e]).title}(n),d={onValueChange:e.displayTextEnabled?e.onDisplayTextChange:void 0,placeholder:e.displayTextEnabled?"Add your display text":void 0,readOnly:!e.displayTextEnabled,value:e.displayTextEnabled?e.displayText:c,variant:e.displayTextEnabled?"normal":"link",onFocus:e.displayTextEnabled?e.onFocus:e.onOpenLinkModal,cursor:VF({displayTextEnabled:e.displayTextEnabled,isTypeSelectEnabled:e.isTypeSelectEnabled,value:c})};return V.jsx(Qy,{id:t,...d,textOverflow:"ellipsis",endAdornment:V.jsx(Vh,{hasLink:!0,onUnlink:l,selectEnabled:i,selectedType:o,value:c,onOpenLinkModal:r,condensedButtons:u,onValueChange:s,displayTextEnabled:a})})}function VE(e){let{errorBoundaryRef:t,onError:n,children:r,fallback:i,renderError:o}=e;return V.jsx(S.SV,{ref:t,onError:n,renderError:o,children:V.jsx(C.Suspense,{fallback:i,children:r})})}function Vj(e){let{selectType:t,displayTextEnabled:n}=e;if(n)return"notes";switch(t){case"document":return"description";case"web":return"public";case"media":return"image";default:return"link"}}function VF(e){let{displayTextEnabled:t,isTypeSelectEnabled:n,value:r}=e;return t?"text":n&&!r?"default":"pointer"}function VM(e){let{onContentChange:t,...n}=e;return V.jsx(Vk,{...n,onContentChange:function(e){t(z.FilledLinkContent.is(e)?e:void 0)}})}function VU(e){let{linkTo:t,onLinkToChange:n}=e;return V.jsx(VM,{content:t?{__TYPE__:"LinkContent",value:t}:void 0,onContentChange:e=>n(null==e?void 0:e.value),field:{type:"Link",config:{label:"Link",allowTargetBlank:!0,allowText:!1}},condensedButtons:!0})}function VL(e){var t,n;let{allContentViews:r,content:i,contentView:o,fieldLabel:a,imageLabel:u,initialImages:s,isUpdating:l,page:c=0,readOnly:d,thumbnailName:f,onClear:p,onContentChange:A,onCropperDialogClose:h,onPageChange:m,onMediaDialogOpenChange:g}=e,y=(null==(n=null==(t=null==i?void 0:i.url)?void 0:t.split("?")[0])?void 0:n.slice(-4))===".svg",v=null!=i&&i.url&&!d?"visible":"hidden",x=!z.isImageContent(i);return V.jsxs(S.xu,{display:"flex",gap:12,padding:{inline:12},children:[V.jsx(S.xu,{children:V.jsx(S.lr,{getItemSource:qU,items:r,onPageChange:m,page:c,buttonSize:"small",renderPrevTooltip:e=>V.jsx(S.u,{content:"Previous",children:e}),renderNextTooltip:e=>V.jsx(S.u,{content:"Next",children:e}),style:x?{width:181,height:142}:{width:123,height:93},children:e=>(null==e?void 0:e.url)&&V.jsx(S.d$,{"aria-label":"Image Field Item",src:qM(e.url),alt:e.alt??void 0,isUpdating:l,disableAnimation:x},`${f}_${e.url}`)})}),V.jsxs(S.xu,{width:"100%",display:"flex",flexDirection:"column",gap:x?16:12,children:[V.jsx(QZ,{fieldLabel:a,imageLabel:u,initialImages:s,page:c,displaySeparator:!x,isSVGContentView:y,visibility:v,onClear:p,onCropperDialogClose:h,onMediaDialogOpenChange:g}),V.jsx(QG,{readOnly:d||!o,altText:(null==o?void 0:o.alt)??"",onValueChange:e=>{o&&A(function(e,t,n,r){let i=0===r.length?void 0:r;return e!==qj&&z.isImageContent(t)?{...t,thumbnails:{...t.thumbnails,[e]:{...n,alt:i}}}:{...t,alt:i}}(f,i,o,e))}}),x&&V.jsx(VU,{linkTo:i.linkTo,onLinkToChange:e=>{A({...i,linkTo:e})}})]})]})}function VK(e){let{content:t,field:n,readOnly:r,onContentChange:i}=e,o=t&&t.origin.url.length>0,{onCropperDialogClose:a,onPageChange:u,onMediaSelected:s,isUpdating:l,page:c,thumbnail:d,allThumbnails:f,allContentViews:p,contentView:A,onClear:h}=function(e){var t,n;let{content:r,onContentChange:i,field:o}=e,[a,u]=(0,C.useState)(0),[s,l]=(0,C.useTransition)(),c=[{...null==(t=o.config)?void 0:t.constraint,name:qj}].concat((null==(n=o.config)?void 0:n.thumbnails)??[]),d=c[a],f=r?function(e,t){var n,r;let{__TYPE__:i,thumbnails:o,...a}=t;return[a,...(null==(r=null==(n=e.config)?void 0:n.thumbnails)?void 0:r.map(({name:e})=>null==o?void 0:o[e]))??[]]}(o,r):void 0,p=null==f?void 0:f[a];return{onCropperDialogClose:function({option:e,croppedImages:t}){if(u(e),!r)return;let n=Object.entries(t).reduce((e,[t,n])=>(function(e){var t,n,r;let{field:i,content:o,thumbnail:a,croppedImage:u}=e;if(a===qj)return QV({content:o,croppedImage:u});let s=z.isImageContent(o),l=null==(n=null==(t=null==i?void 0:i.config)?void 0:t.thumbnails)?void 0:n.find(e=>e.name===a),c=s?null==(r=o.thumbnails)?void 0:r[a]:void 0;if(!l||!c)return o;let d=QQ({contentView:c,croppedImage:u});return d.url===c.url?o:{...o,thumbnails:s?{...o.thumbnails,[a]:d}:void 0}})({field:o,content:e,thumbnail:t,croppedImage:n}),r);n!==r&&l(()=>i(n))},onPageChange:function(e){l(()=>u(e))},onMediaSelected:function(e){if(!d)return;let t=function(e,t,n,r){var i,o,a,u,s;if(!n||e===qj){let e=null==(i=t.config)?void 0:i.thumbnails,n=e&&Object.fromEntries(e.map(e=>[e.name,qL(r,e)]));return{__TYPE__:"ImageContent",...qL(r,null==(o=t.config)?void 0:o.constraint),thumbnails:n}}let l=null==(u=null==(a=t.config)?void 0:a.thumbnails)?void 0:u.find(t=>t.name===e);if(!l)return n;let c=null==(s=n.thumbnails)?void 0:s[e],d=qL(r,l);return d.url===(null==c?void 0:c.url)?n:{...n,thumbnails:(0,I.Q8)(n.thumbnails??{},(t,n)=>n===e?d:t)}}(d.name,o,r,e);t!==r&&l(()=>i(t))},isUpdating:s,page:a,thumbnail:d,allThumbnails:c,allContentViews:f,contentView:p,onClear:function(){null==u||u(0),i(void 0)}}}({field:n,content:t,onContentChange:i}),[m,g]=(0,C.useState)(!1),y=Qp(n),v=f.map((e,n)=>{let r=null==p?void 0:p[n];return{thumbnail:e,contentView:r,labels:qF(e,t,r)}}),x=d&&o?qF(d,t,A).filter(k.$):[],b=d&&t&&o&&p;return V.jsx(Qq,{isMediaDialogOpen:m,onMediaSelected:s,onMediaDialogOpenChange:g,children:V.jsx(C.Suspense,{fallback:V.jsx("div",{style:{height:95}}),children:b?V.jsx(VL,{allContentViews:p,content:t,contentView:A,fieldLabel:y,imageLabel:x,initialImages:v,isUpdating:l,page:c,readOnly:r,thumbnailName:d.name,onClear:h,onContentChange:i,onCropperDialogClose:a,onMediaDialogOpenChange:g,onPageChange:u}):V.jsx(QM,{fieldLabel:y,isUpdating:l,readOnly:r,onMediaDialogOpenChange:g})})})}function VB(e,t,n,r,i,o=1,a=30){let u=new URL(`if/search/${r}`,e);return u.searchParams.set("searchTerm",i),u.searchParams.set("limit",a.toString()),u.searchParams.set("page",o.toString()),(0,j.WY)(u,{headers:{repository:n},credentials:(0,j.xb)(t),okType:VW})}R.Fs.registerFetcherConfig(VI,{concurrency:50});let VP=Ni.object({id:Ni.string(),title:Ni.string(),imageURL:Ni.string().optional(),description:Ni.string().optional()}),VW=Ni.object({items:Ni.array(VP),totalPages:Ni.number(),page:Ni.number()});function VD(e){let{itemId:t,catalogId:n}=e,r=WI();r.integrationFields||WT("integrationFields");let{integrationFieldsApiBaseUrl:i,repository:o,authStrategy:a}=r,u=(0,R.QT)(VN,[i,a,o,n,t]).items[0];if(!u)throw Error("Item not found");return{item:u}}function VN(e,t,n,r,i){let o=new URL(`if/read/${r}`,e);return o.searchParams.set("ids",[i].toString()),(0,j.WY)(o,{headers:{repository:n},credentials:(0,j.xb)(t),okType:Vq})}let Vq=Ni.object({items:Ni.array(VP)});function VQ(e){let{item:t,onClick:n,catalogId:r}=e;return V.jsxs(S.oU,{variant:"large",onClick:n,children:[V.jsx(VV,{src:t.imageURL??"",alt:t.title}),V.jsxs(S.Tw,{children:[V.jsx(S.Ct,{title:`Catalog: ${r}`,icon:"multipleStop",size:"medium"}),V.jsx(S.xv,{variant:"bold",color:"grey12",sx:{marginTop:4},children:t.title}),V.jsx(S.xv,{variant:"small",color:"grey11",children:t.description??t.id})]})]})}function VV(e){let{src:t,alt:n}=e;return t?V.jsx(S.Sy,{src:t,alt:n,width:76,height:76,framed:!0}):V.jsxs(S.xu,{borderRadius:6,backgroundColor:"grey2",height:76,width:76,flexDirection:"column",alignItems:"center",justifyContent:"center",border:!0,padding:{inline:4,block:8},children:[V.jsx(S.I5,{name:"hideImage",size:"large",color:"grey11"}),V.jsx(S.xv,{color:"grey11",variant:"small",noSelect:!0,align:"center",children:"No preview image"})]})}function Vz(){return V.jsxs(S.oU,{variant:"large",children:[V.jsx(S.Od,{height:76,width:76}),V.jsxs(S.Tw,{children:[V.jsx(S.Od,{height:24,width:168}),V.jsx(S.Od,{height:24,width:240,sx:{marginTop:4}}),V.jsx(S.Od,{height:16,width:144})]})]})}function VY(e){let{open:t,onOpenChange:n,catalogId:r,onSelectItem:i}=e,o=(0,_.$P)({initialState:""}),a=WI();return V.jsx(S.Vq,{open:t,onOpenChange:n,hasClose:!1,size:{width:612,height:724},children:V.jsx(S.cZ,{children:V.jsxs(S.xu,{flexDirection:"column",height:"100%",children:[V.jsxs(S.xu,{padding:{top:16,inline:16},flexDirection:"column",gap:8,children:[V.jsx(S.CR,{value:o.value,onValueChange:o.set,placeholder:"Search in your catalog"}),V.jsx(S.xv,{variant:"smallBold",color:"grey11",children:"Select an item"})]}),a.integrationFields?V.jsx(S.SV,{renderError:()=>V.jsx(VG,{message:"There was an error while fetching your catalog items."}),children:V.jsx(C.Suspense,{fallback:V.jsxs(S.xu,{flexDirection:"column",gap:12,padding:{top:10,inline:16,bottom:16},children:[V.jsx(Vz,{}),V.jsx(Vz,{}),V.jsx(Vz,{}),V.jsx(Vz,{}),V.jsx(Vz,{})]}),children:V.jsx(VH,{searchTerm:o.debouncedValue,catalogId:r,onItemClick:i})})}):V.jsx(VG,{message:"Slice Machine does not yet support mock data for integration field in the simulator."})]})})})}function VH(e){let{catalogId:t,searchTerm:n,onItemClick:r}=e,[i,o]=(0,C.useTransition)(),{items:a,hasNextPage:u,fetchNextPage:s}=function(e){var t,n;let{searchTerm:r,catalogId:i}=e,o=WI();o.integrationFields||WT("integrationFields");let{integrationFieldsApiBaseUrl:a,repository:u,authStrategy:s}=o,[l,c]=(0,C.useState)(1),[d,f]=(0,C.useState)([]),[p,A]=(0,C.useState)(""),h=(0,R.QT)(VB,[a,s,u,i,r,r===p?l:1]);r!==p?(A(r),c(1),f(h.items)):h.items.length>0&&(null==(t=(0,E.Z$)(d))?void 0:t.id)!==(null==(n=(0,E.Z$)(h.items))?void 0:n.id)&&f(e=>e.concat(h.items));let m=l<h.totalPages;return{items:d,response:h,fetchNextPage:function(){m&&c(e=>e+1)},hasNextPage:m}}({catalogId:t,searchTerm:n});return V.jsx(V.Fragment,{children:V.jsxs(S.xr,{onScrollToBottom:()=>u&&o(s),style:{flexGrow:1,paddingTop:S.rS.space[10],paddingBottom:S.rS.space[16],paddingInline:S.rS.space[16],display:"flex",flexDirection:"column",gap:S.rS.space[12]},threshold:252,children:[0===a.length?V.jsx(VG,{}):a.map(e=>V.jsx(VQ,{item:e,catalogId:t,onClick:()=>r(e)},e.id)),V.jsx(S.Fp,{animation:{name:"fade"},children:i&&V.jsx(S.xv,{color:"grey11",align:"center",sx:{marginBlock:8},children:"Loading more results ..."})})]})})}function VG(e){let{message:t="We can't find any items matching your search"}=e;return V.jsx(S.xu,{justifyContent:"center",flexDirection:"column",height:"100%",children:V.jsxs(S.R$,{children:[V.jsx(S.av,{name:"close",lineColor:"purple10",backgroundColor:"purple3",borderColor:"purple6",borderStyle:"dashed",size:"xlarge"}),V.jsx(S._T,{size:"big",children:"Oops!"}),V.jsx(S.nf,{width:360,children:t})]})})}function VZ(e){let{itemId:t,item:n}=e,r=WI();return t&&n&&n.id===t?V.jsx(VX,{...e,value:n.title}):t&&r.integrationFields?V.jsx(S.SV,{renderError:()=>V.jsx(VX,{...e,value:t}),children:V.jsx(C.Suspense,{fallback:V.jsx(VX,{...e,value:t}),children:V.jsx(V0,{...e,itemId:t})},t)},t):t&&!r.integrationFields?V.jsx(VX,{...e,value:t}):V.jsx(VX,{...e,value:""})}function VJ(e){let{catalogId:t,itemId:n,item:r}=e,i=WI();return n&&r&&r.id===n?V.jsx(S.mS,{children:V.jsx(VQ,{catalogId:t,item:r})}):n&&i.integrationFields?V.jsx(S.SV,{renderError:()=>null,children:V.jsx(S.mS,{children:V.jsx(C.Suspense,{fallback:V.jsx(Vz,{}),children:V.jsx(V$,{catalogId:t,itemId:n})},n)})},n):null}function V$(e){let{itemId:t,catalogId:n}=e,{item:r}=VD({catalogId:n,itemId:t});return V.jsx(VQ,{catalogId:n,item:r})}function VX(e){let{id:t,field:n,readOnly:r,value:i,onFocus:o,onClearItem:a}=e;return V.jsx(Qy,{id:t,placeholder:QA(n),readOnly:!0,variant:"link",value:i,...!r&&{cursor:"pointer",onFocus:o},endAdornment:V.jsx(S.zx,{startIcon:"close",color:"grey",size:"small",disabled:!i,onClick:a})})}function V0(e){let{itemId:t,catalogId:n}=e,{item:r}=VD({catalogId:n,itemId:t});return V.jsx(VX,{...e,value:r.title})}function V1(e){var t;let{id:n,field:r,content:i,readOnly:o,onContentChange:a}=e,[u,s]=(0,C.useState)(!1),[l,c]=(0,C.useState)(),d=null==(t=r.config)?void 0:t.catalog;return d?V.jsxs(V.Fragment,{children:[V.jsxs(S.gN,{footer:V.jsx(VJ,{catalogId:d,item:l,itemId:null==i?void 0:i.value}),children:[V.jsx(S.fw,{name:"multipleStop"}),V.jsx(S.Qy,{htmlFor:n,children:Qp(r)}),V.jsx(S.JO,{children:V.jsx(VZ,{id:n,field:r,readOnly:o,catalogId:d,item:l,itemId:null==i?void 0:i.value,onFocus:()=>s(!0),onClearItem:function(){a(void 0),c(void 0)}})})]}),V.jsx(VY,{open:u,onOpenChange:s,catalogId:d,onSelectItem:function(e){a({value:e.id,__TYPE__:"IntegrationFieldsContent"}),c(e),s(!1)}})]}):null}function V2(e){let{content:t,field:n,id:r,onContentChange:i,readOnly:o}=e;return V.jsxs(S.gN,{children:[V.jsx(S.fw,{name:"notes"}),V.jsx(S.Qy,{htmlFor:r,children:Qp(n)}),V.jsx(S.JO,{children:V.jsx(S.Kx,{id:r,placeholder:QA(n),readOnly:o,paddingLeft:4,paddingRight:12,sx:{flexGrow:1},value:(null==t?void 0:t.value)??"",onChange:e=>{i(0===e.length?void 0:{__TYPE__:"FieldContent",type:"Text",value:e})}})})]})}let V6=({content:e,field:t,id:n,onContentChange:r,readOnly:i})=>{var o,a;let u=Number(null==e?void 0:e.value),s=Number.isFinite(u)?u:void 0;return V.jsxs(S.gN,{children:[V.jsx(S.fw,{name:"pin"}),V.jsx(S.Qy,{htmlFor:n,children:Qp(t)}),V.jsx(S.JO,{children:V.jsx(S.Y2,{id:n,value:s,min:null==(o=t.config)?void 0:o.min,max:null==(a=t.config)?void 0:a.max,padding:Qv,placeholder:QA(t),readOnly:i,onValueChange:e=>r(void 0===e?void 0:{__TYPE__:"FieldContent",type:"Number",value:String(e)})})})]})};function V5(e){this.content=e}V5.prototype={constructor:V5,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return -1},get:function(e){var t=this.find(e);return -1==t?void 0:this.content[t+1]},update:function(e,t,n){var r=n&&n!=e?this.remove(n):this,i=r.find(e),o=r.content.slice();return -1==i?o.push(n||e,t):(o[i+1]=t,n&&(o[i]=n)),new V5(o)},remove:function(e){var t=this.find(e);if(-1==t)return this;var n=this.content.slice();return n.splice(t,2),new V5(n)},addToStart:function(e,t){return new V5([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new V5(n)},addBefore:function(e,t,n){var r=this.remove(t),i=r.content.slice(),o=r.find(e);return i.splice(-1==o?i.length:o,0,t,n),new V5(i)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return(e=V5.from(e)).size?new V5(e.content.concat(this.subtract(e).content)):this},append:function(e){return(e=V5.from(e)).size?new V5(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=V5.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}},V5.from=function(e){if(e instanceof V5)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new V5(t)};class V3{constructor(e,t){if(this.content=e,this.size=t||0,null==t)for(let t=0;t<e.length;t++)this.size+=e[t].nodeSize}nodesBetween(e,t,n,r=0,i){for(let o=0,a=0;a<t;o++){let u=this.content[o],s=a+u.nodeSize;if(s>e&&!1!==n(u,r+a,i||null,o)&&u.content.size){let i=a+1;u.nodesBetween(Math.max(0,e-i),Math.min(u.content.size,t-i),n,r+i)}a=s}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,r){let i="",o=!0;return this.nodesBetween(e,t,(a,u)=>{a.isText?(i+=a.text.slice(Math.max(e,u)-u,t-u),o=!n):a.isLeaf?(r?i+="function"==typeof r?r(a):r:a.type.spec.leafText&&(i+=a.type.spec.leafText(a)),o=!n):!o&&a.isBlock&&(i+=n,o=!0)},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,n=e.firstChild,r=this.content.slice(),i=0;for(t.isText&&t.sameMarkup(n)&&(r[r.length-1]=t.withText(t.text+n.text),i=1);i<e.content.length;i++)r.push(e.content[i]);return new V3(r,this.size+e.size)}cut(e,t=this.size){if(0==e&&t==this.size)return this;let n=[],r=0;if(t>e)for(let i=0,o=0;o<t;i++){let a=this.content[i],u=o+a.nodeSize;u>e&&((o<e||u>t)&&(a=a.isText?a.cut(Math.max(0,e-o),Math.min(a.text.length,t-o)):a.cut(Math.max(0,e-o-1),Math.min(a.content.size,t-o-1))),n.push(a),r+=a.nodeSize),o=u}return new V3(n,r)}cutByIndex(e,t){return e==t?V3.empty:0==e&&t==this.content.length?this:new V3(this.content.slice(e,t))}replaceChild(e,t){let n=this.content[e];if(n==t)return this;let r=this.content.slice(),i=this.size+t.nodeSize-n.nodeSize;return r[e]=t,new V3(r,i)}addToStart(e){return new V3([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new V3(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,n=0;t<this.content.length;t++){let r=this.content[t];e(r,n,t),n+=r.nodeSize}}findDiffStart(e,t=0){return function e(t,n,r){for(let i=0;;i++){if(i==t.childCount||i==n.childCount)return t.childCount==n.childCount?null:r;let o=t.child(i),a=n.child(i);if(o==a){r+=o.nodeSize;continue}if(!o.sameMarkup(a))return r;if(o.isText&&o.text!=a.text){for(let e=0;o.text[e]==a.text[e];e++)r++;return r}if(o.content.size||a.content.size){let t=e(o.content,a.content,r+1);if(null!=t)return t}r+=o.nodeSize}}(this,e,t)}findDiffEnd(e,t=this.size,n=e.size){return function e(t,n,r,i){for(let o=t.childCount,a=n.childCount;;){if(0==o||0==a)return o==a?null:{a:r,b:i};let u=t.child(--o),s=n.child(--a),l=u.nodeSize;if(u==s){r-=l,i-=l;continue}if(!u.sameMarkup(s))return{a:r,b:i};if(u.isText&&u.text!=s.text){let e=0,t=Math.min(u.text.length,s.text.length);for(;e<t&&u.text[u.text.length-e-1]==s.text[s.text.length-e-1];)e++,r--,i--;return{a:r,b:i}}if(u.content.size||s.content.size){let t=e(u.content,s.content,r-1,i-1);if(t)return t}r-=l,i-=l}}(this,e,t,n)}findIndex(e,t=-1){if(0==e)return V4(0,e);if(e==this.size)return V4(this.content.length,e);if(e>this.size||e<0)throw RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let i=r+this.child(n).nodeSize;if(i>=e)return i==e||t>0?V4(n+1,i):V4(n,r);r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return V3.empty;if(!Array.isArray(t))throw RangeError("Invalid input for Fragment.fromJSON");return new V3(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return V3.empty;let t,n=0;for(let r=0;r<e.length;r++){let i=e[r];n+=i.nodeSize,r&&i.isText&&e[r-1].sameMarkup(i)?(t||(t=e.slice(0,r)),t[t.length-1]=i.withText(t[t.length-1].text+i.text)):t&&t.push(i)}return new V3(t||e,n)}static from(e){if(!e)return V3.empty;if(e instanceof V3)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new V3([e],e.nodeSize);throw RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}V3.empty=new V3([],0);let V9={index:0,offset:0};function V4(e,t){return V9.index=e,V9.offset=t,V9}function V8(e,t){if(e===t)return!0;if(!(e&&"object"==typeof e)||!(t&&"object"==typeof t))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!V8(e[n],t[n]))return!1}else{for(let n in e)if(!(n in t)||!V8(e[n],t[n]))return!1;for(let n in t)if(!(n in e))return!1}return!0}let V7=class e{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,n=!1;for(let r=0;r<e.length;r++){let i=e[r];if(this.eq(i))return e;if(this.type.excludes(i.type))t||(t=e.slice(0,r));else{if(i.type.excludes(this.type))return e;!n&&i.type.rank>this.type.rank&&(t||(t=e.slice(0,r)),t.push(this),n=!0),t&&t.push(i)}}return t||(t=e.slice()),n||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&V8(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw RangeError("Invalid input for Mark.fromJSON");let n=e.marks[t.type];if(!n)throw RangeError(`There is no mark type ${t.type} in this schema`);return n.create(t.attrs)}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&0==t.length)return e.none;if(t instanceof e)return[t];let n=t.slice();return n.sort((e,t)=>e.type.rank-t.type.rank),n}};V7.none=[];class ze extends Error{}class zt{constructor(e,t,n){this.content=e,this.openStart=t,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let n=function e(t,n,r,i){let{index:o,offset:a}=t.findIndex(n),u=t.maybeChild(o);if(a==n||u.isText)return i&&!i.canReplace(o,o,r)?null:t.cut(0,n).append(r).append(t.cut(n));let s=e(u.content,n-a-1,r);return s&&t.replaceChild(o,u.copy(s))}(this.content,e+this.openStart,t);return n&&new zt(n,this.openStart,this.openEnd)}removeBetween(e,t){return new zt(function e(t,n,r){let{index:i,offset:o}=t.findIndex(n),a=t.maybeChild(i),{index:u,offset:s}=t.findIndex(r);if(o==n||a.isText){if(s!=r&&!t.child(u).isText)throw RangeError("Removing non-flat range");return t.cut(0,n).append(t.cut(r))}if(i!=u)throw RangeError("Removing non-flat range");return t.replaceChild(i,a.copy(e(a.content,n-o-1,r-o-1)))}(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return zt.empty;let n=t.openStart||0,r=t.openEnd||0;if("number"!=typeof n||"number"!=typeof r)throw RangeError("Invalid input for Slice.fromJSON");return new zt(V3.fromJSON(e,t.content),n,r)}static maxOpen(e,t=!0){let n=0,r=0;for(let r=e.firstChild;r&&!r.isLeaf&&(t||!r.type.spec.isolating);r=r.firstChild)n++;for(let n=e.lastChild;n&&!n.isLeaf&&(t||!n.type.spec.isolating);n=n.lastChild)r++;return new zt(e,n,r)}}function zn(e,t){if(!t.type.compatibleContent(e.type))throw new ze("Cannot join "+t.type.name+" onto "+e.type.name)}function zr(e,t,n){let r=e.node(n);return zn(r,t.node(n)),r}function zi(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function zo(e,t,n,r){let i=(t||e).node(n),o=0,a=t?t.index(n):i.childCount;e&&(o=e.index(n),e.depth>n?o++:e.textOffset&&(zi(e.nodeAfter,r),o++));for(let e=o;e<a;e++)zi(i.child(e),r);t&&t.depth==n&&t.textOffset&&zi(t.nodeBefore,r)}function za(e,t){return e.type.checkContent(t),e.copy(t)}function zu(e,t,n){let r=[];return zo(null,e,n,r),e.depth>n&&zi(za(zr(e,t,n+1),zu(e,t,n+1)),r),zo(t,null,n,r),new V3(r)}zt.empty=new zt(V3.empty,0,0);class zs{constructor(e,t,n){this.pos=e,this.path=t,this.parentOffset=n,this.depth=t.length/3-1}resolveDepth(e){return null==e?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[3*this.resolveDepth(e)]}index(e){return this.path[3*this.resolveDepth(e)+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e!=this.depth||this.textOffset?1:0)}start(e){return 0==(e=this.resolveDepth(e))?0:this.path[3*e-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(!(e=this.resolveDepth(e)))throw RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]}after(e){if(!(e=this.resolveDepth(e)))throw RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]+this.path[3*e].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):0==e?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let n=this.path[3*t],r=0==t?0:this.path[3*t-1]+1;for(let t=0;t<e;t++)r+=n.child(t).nodeSize;return r}marks(){let e=this.parent,t=this.index();if(0==e.content.size)return V7.none;if(this.textOffset)return e.child(t).marks;let n=e.maybeChild(t-1),r=e.maybeChild(t);if(!n){let e=n;n=r,r=e}let i=n.marks;for(var o=0;o<i.length;o++)!1!==i[o].type.spec.inclusive||r&&i[o].isInSet(r.marks)||(i=i[o--].removeFromSet(i));return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let n=t.marks,r=e.parent.maybeChild(e.index());for(var i=0;i<n.length;i++)!1!==n[i].type.spec.inclusive||r&&n[i].isInSet(r.marks)||(n=n[i--].removeFromSet(n));return n}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new zf(this,e,n);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw RangeError("Position "+t+" out of range");let n=[],r=0,i=t;for(let t=e;;){let{index:e,offset:o}=t.content.findIndex(i),a=i-o;if(n.push(t,e,r+o),!a||(t=t.child(e)).isText)break;i=a-1,r+=o+1}return new zs(t,n,i)}static resolveCached(e,t){for(let n=0;n<zl.length;n++){let r=zl[n];if(r.pos==t&&r.doc==e)return r}let n=zl[zc]=zs.resolve(e,t);return zc=(zc+1)%zd,n}}let zl=[],zc=0,zd=12;class zf{constructor(e,t,n){this.$from=e,this.$to=t,this.depth=n}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}let zp=Object.create(null),zA=class e{constructor(e,t,n,r=V7.none){this.type=e,this.attrs=t,this.marks=r,this.content=n||V3.empty}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,n,r=0){this.content.nodesBetween(e,t,n,r,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,n,r){return this.content.textBetween(e,t,n,r)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,n){return this.type==e&&V8(this.attrs,t||e.defaultAttrs||zp)&&V7.sameSet(this.marks,n||V7.none)}copy(t=null){return t==this.content?this:new e(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new e(this.type,this.attrs,this.content,t)}cut(e,t=this.content.size){return 0==e&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,n=!1){if(e==t)return zt.empty;let r=this.resolve(e),i=this.resolve(t),o=n?0:r.sharedDepth(t),a=r.start(o);return new zt(r.node(o).content.cut(r.pos-a,i.pos-a),r.depth-o,i.depth-o)}replace(e,t,n){return function(e,t,n){if(n.openStart>e.depth)throw new ze("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new ze("Inconsistent open depths");return function e(t,n,r,i){let o=t.index(i),a=t.node(i);if(o==n.index(i)&&i<t.depth-r.openStart){let u=e(t,n,r,i+1);return a.copy(a.content.replaceChild(o,u))}if(!r.content.size)return za(a,zu(t,n,i));if(r.openStart||r.openEnd||t.depth!=i||n.depth!=i){let{start:e,end:o}=function(e,t){let n=t.depth-e.openStart,r=t.node(n).copy(e.content);for(let e=n-1;e>=0;e--)r=t.node(e).copy(V3.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}(r,t);return za(a,function e(t,n,r,i,o){let a=t.depth>o&&zr(t,n,o+1),u=i.depth>o&&zr(r,i,o+1),s=[];return zo(null,t,o,s),a&&u&&n.index(o)==r.index(o)?(zn(a,u),zi(za(a,e(t,n,r,i,o+1)),s)):(a&&zi(za(a,zu(t,n,o+1)),s),zo(n,r,o,s),u&&zi(za(u,zu(r,i,o+1)),s)),zo(i,null,o,s),new V3(s)}(t,e,o,n,i))}{let e=t.parent,i=e.content;return za(e,i.cut(0,t.parentOffset).append(r.content).append(i.cut(n.parentOffset)))}}(e,t,n,0)}(this.resolve(e),this.resolve(t),n)}nodeAt(e){for(let t=this;;){let{index:n,offset:r}=t.content.findIndex(e);if(!(t=t.maybeChild(n)))return null;if(r==e||t.isText)return t;e-=r+1}}childAfter(e){let{index:t,offset:n}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:n}}childBefore(e){if(0==e)return{node:null,index:0,offset:0};let{index:t,offset:n}=this.content.findIndex(e);if(n<e)return{node:this.content.child(t),index:t,offset:n};let r=this.content.child(t-1);return{node:r,index:t-1,offset:n-r.nodeSize}}resolve(e){return zs.resolveCached(this,e)}resolveNoCache(e){return zs.resolve(this,e)}rangeHasMark(e,t,n){let r=!1;return t>e&&this.nodesBetween(e,t,e=>(n.isInSet(e.marks)&&(r=!0),!r)),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),zm(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,n=V3.empty,r=0,i=n.childCount){let o=this.contentMatchAt(e).matchFragment(n,r,i),a=o&&o.matchFragment(this.content,t);if(!a||!a.validEnd)return!1;for(let e=r;e<i;e++)if(!this.type.allowsMarks(n.child(e).marks))return!1;return!0}canReplaceWith(e,t,n,r){if(r&&!this.type.allowsMarks(r))return!1;let i=this.contentMatchAt(e).matchType(n),o=i&&i.matchFragment(this.content,t);return!!o&&o.validEnd}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content);let e=V7.none;for(let t=0;t<this.marks.length;t++)e=this.marks[t].addToSet(e);if(!V7.sameSet(e,this.marks))throw RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(e=>e.type.name)}`);this.content.forEach(e=>e.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(e=>e.toJSON())),e}static fromJSON(e,t){if(!t)throw RangeError("Invalid input for Node.fromJSON");let n=null;if(t.marks){if(!Array.isArray(t.marks))throw RangeError("Invalid mark data for Node.fromJSON");n=t.marks.map(e.markFromJSON)}if("text"==t.type){if("string"!=typeof t.text)throw RangeError("Invalid text node in JSON");return e.text(t.text,n)}let r=V3.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,r,n)}};zA.prototype.text=void 0;class zh extends zA{constructor(e,t,n,r){if(super(e,t,null,r),!n)throw RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):zm(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new zh(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new zh(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return 0==e&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function zm(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class zg{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){var n;let r,i=new zy(e,t);if(null==i.next)return zg.empty;let o=function e(t){let n=[];do n.push(function(t){let n=[];do n.push(function(t){let n=function(t){if(t.eat("(")){let n=e(t);return t.eat(")")||t.err("Missing closing paren"),n}if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=(function(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let i=[];for(let e in n){let r=n[e];r.groups.indexOf(t)>-1&&i.push(r)}return 0==i.length&&e.err("No node type or group '"+t+"' found"),i})(t,t.next).map(e=>(null==t.inline?t.inline=e.isInline:t.inline!=e.isInline&&t.err("Mixing inline and block content"),{type:"name",value:e}));return t.pos++,1==e.length?e[0]:{type:"choice",exprs:e}}}(t);for(;;)if(t.eat("+"))n={type:"plus",expr:n};else if(t.eat("*"))n={type:"star",expr:n};else if(t.eat("?"))n={type:"opt",expr:n};else if(t.eat("{"))n=function(e,t){let n=zv(e),r=n;return e.eat(",")&&(r="}"!=e.next?zv(e):-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}(t,n);else break;return n}(t));while(t.next&&")"!=t.next&&"|"!=t.next);return 1==n.length?n[0]:{type:"seq",exprs:n}}(t));while(t.eat("|"));return 1==n.length?n[0]:{type:"choice",exprs:n}}(i);i.next&&i.err("Unexpected trailing text");let a=(n=function(e){let t=[[]];return i(function e(t,o){if("choice"==t.type)return t.exprs.reduce((t,n)=>t.concat(e(n,o)),[]);if("seq"==t.type)for(let r=0;;r++){let a=e(t.exprs[r],o);if(r==t.exprs.length-1)return a;i(a,o=n())}else if("star"==t.type){let a=n();return r(o,a),i(e(t.expr,a),a),[r(a)]}else if("plus"==t.type){let a=n();return i(e(t.expr,o),a),i(e(t.expr,a),a),[r(a)]}else{if("opt"==t.type)return[r(o)].concat(e(t.expr,o));if("range"==t.type){let a=o;for(let r=0;r<t.min;r++){let r=n();i(e(t.expr,a),r),a=r}if(-1==t.max)i(e(t.expr,a),a);else for(let o=t.min;o<t.max;o++){let o=n();r(a,o),i(e(t.expr,a),o),a=o}return[r(a)]}if("name"==t.type)return[r(o,void 0,t.value)];throw Error("Unknown expr type")}}(e,0),n()),t;function n(){return t.push([])-1}function r(e,n,r){let i={term:r,to:n};return t[e].push(i),i}function i(e,t){e.forEach(e=>e.to=t)}}(o),r=Object.create(null),function e(t){let i=[];t.forEach(e=>{n[e].forEach(({term:e,to:t})=>{let r;if(e){for(let t=0;t<i.length;t++)i[t][0]==e&&(r=i[t][1]);zb(n,t).forEach(t=>{r||i.push([e,r=[]]),-1==r.indexOf(t)&&r.push(t)})}})});let o=r[t.join(",")]=new zg(t.indexOf(n.length-1)>-1);for(let t=0;t<i.length;t++){let n=i[t][1].sort(zx);o.next.push({type:i[t][0],next:r[n.join(",")]||e(n)})}return o}(zb(n,0)));return function(e,t){for(let n=0,r=[e];n<r.length;n++){let e=r[n],i=!e.validEnd,o=[];for(let t=0;t<e.next.length;t++){let{type:n,next:a}=e.next[t];o.push(n.name),i&&!(n.isText||n.hasRequiredAttrs())&&(i=!1),-1==r.indexOf(a)&&r.push(a)}i&&t.err("Only non-generatable nodes ("+o.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(a,i),a}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,n=e.childCount){let r=this;for(let i=t;r&&i<n;i++)r=r.matchType(e.child(i).type);return r}get inlineContent(){return 0!=this.next.length&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let n=0;n<e.next.length;n++)if(this.next[t].type==e.next[n].type)return!0;return!1}fillBefore(e,t=!1,n=0){let r=[this];return function i(o,a){let u=o.matchFragment(e,n);if(u&&(!t||u.validEnd))return V3.from(a.map(e=>e.createAndFill()));for(let e=0;e<o.next.length;e++){let{type:t,next:n}=o.next[e];if(!(t.isText||t.hasRequiredAttrs())&&-1==r.indexOf(n)){r.push(n);let e=i(n,a.concat(t));if(e)return e}}return null}(this,[])}findWrapping(e){for(let t=0;t<this.wrapCache.length;t+=2)if(this.wrapCache[t]==e)return this.wrapCache[t+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let r=n.shift(),i=r.match;if(i.matchType(e)){let e=[];for(let t=r;t.type;t=t.via)e.push(t.type);return e.reverse()}for(let e=0;e<i.next.length;e++){let{type:o,next:a}=i.next[e];o.isLeaf||o.hasRequiredAttrs()||o.name in t||r.type&&!a.validEnd||(n.push({match:o.contentMatch,type:o,via:r}),t[o.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];return function t(n){e.push(n);for(let r=0;r<n.next.length;r++)-1==e.indexOf(n.next[r].next)&&t(n.next[r].next)}(this),e.map((t,n)=>{let r=n+(t.validEnd?"*":" ")+" ";for(let n=0;n<t.next.length;n++)r+=(n?", ":"")+t.next[n].type.name+"->"+e.indexOf(t.next[n].next);return r}).join(`
7
+ from ${1===a?"it":"them"}.`]})}),V.jsxs(S.kX,{children:[V.jsx(S.PO,{}),V.jsx(S._d,{onClick:d,color:"tomato",loading:l,children:"Yes, I want to delete"})]})]})}function q2(){let e=(0,C.useContext)(R.Nk);return V.jsx(S.xu,{flexDirection:"column",children:V.jsxs(S.R$,{children:[V.jsx(S.av,{name:"close",lineColor:"purple10",backgroundColor:"purple3",borderColor:"purple6",borderStyle:"dashed"}),V.jsx(S._T,{size:"big",children:"Oops!"}),V.jsx(S.nf,{width:360,children:"We couldn't load your media tags."}),V.jsx(S.Qj,{children:V.jsx(S.zx,{onClick:null==e?void 0:e.reset,size:"medium",children:"Try again"})})]})})}function q6(){return V.jsx(S.xu,{flexDirection:"column",gap:16,children:(0,E.w6)(1,6).map(e=>V.jsxs(S.xu,{justifyContent:"space-between",children:[V.jsx(S.Od,{height:24,width:85}),V.jsx(S.Od,{height:24,width:45})]},e))})}function q5(){let e=qw(),{onFilesUpload:t,isUploading:n,tagManagerOpen:r}=N9();return 0===e.length&&!1===r?V.jsx(qp,{onFilesUpload:t,isUploading:n}):V.jsx(S.xu,{flexDirection:"column",backgroundColor:"grey1",width:"100%",padding:16,gap:16,borderRadius:{topLeft:8,topRight:8},children:r?V.jsx(q$,{}):V.jsxs(V.Fragment,{children:[V.jsx(qI,{}),V.jsx(qk,{}),V.jsx(qq,{})]})})}function q3(){let e=Wb();return V.jsx(qf,{hasSelectedMedia:0!==e.selectedCount,children:V.jsx(q5,{})})}let q9={all:{name:"All media",icon:"public"},image:{name:"Images",icon:"image"},video:{name:"Videos",icon:"videocam"},document:{name:"Documents",icon:"insertDriveFile"},audio:{name:"Audio files",icon:"musicNote"}},q4=Object.entries(q9);function q8(){let{assetType:e,initialAssetType:t,onFilterChange:n}=N9(),[r,i]=(0,C.useState)(e);(0,_.pQ)(e,()=>{i(e)});let[o,a]=(0,C.useState)(!1),{icon:u,name:s}=q9[r],l=q9[t].name,c="all"!==t;return V.jsxs(S.h_,{open:o,onOpenChange:a,children:[V.jsx(S.$F,{disabled:c,children:V.jsx(q7,{icon:u,isDropdownDisabled:c,buttonName:s,tooltipAssetTypeName:l})}),V.jsx(S.AW,{minWidth:256,align:"start",childrenFocusScope:!0,children:V.jsx(V.Fragment,{children:q4.filter(([e])=>e!==r).map(([e,{icon:t,name:r}])=>V.jsx(S.Xi,{startIcon:V.jsx(S.I5,{name:t}),onSelect:()=>{a(!1),i(e),n({assetType:e})},children:r},e))})})]})}let q7=(0,C.forwardRef)(function(e,t){let{icon:n,isDropdownDisabled:r,buttonName:i,tooltipAssetTypeName:o,...a}=e;return V.jsx(S.u,{content:`You can only pick ${(null==o?void 0:o.toLocaleLowerCase())??"this type of media"}`,visible:r,children:V.jsx(S.zx,{startIcon:n,endIcon:"arrowDropDown",size:"small",color:"grey",disabled:r,ref:t,...a,children:i})})});function Qe(e){let{optimisticTagIds:t,setOptimisticTagIds:n}=e,{onFilterChange:r}=N9(),{tags:i}=NF(),o=(0,C.useMemo)(()=>(0,M.vM)(i,e=>e.id),[i]);return V.jsx(V.Fragment,{children:t.map(e=>{var i;let a=null==(i=o.get(e))?void 0:i[0];return a?V.jsx(S.Ct,{title:a.name,size:"medium",color:"purple",onClose:()=>(function(e){let i=t.filter(t=>t!==e.id);n(i),r({tagIds:i})})(a),selected:!0},a.id):null})})}function Qt(){let{setTagManagerOpen:e,tagIds:t,onFilterChange:n}=N9(),[r,i]=(0,C.useState)(""),[o,a]=(0,C.useState)(!1),[u,s]=(0,C.useState)(t);return(0,_.pQ)(JSON.stringify(t),()=>{s(t)}),V.jsxs(V.Fragment,{children:[V.jsxs(S.h_,{open:o,onOpenChange:function(e){a(e),e||i("")},children:[V.jsx(S.$F,{children:V.jsx(S.zx,{startIcon:"label",endIcon:"arrowDropDown",size:"small",color:"grey",children:"Tags"})}),V.jsx(S.AW,{minWidth:256,align:"start",border:!1,childrenFocusScope:!0,children:V.jsxs(S.BC,{variant:"attached",children:[V.jsx(S.Ie,{value:r,onValueChange:i,placeholder:"Search for a tag",autoFocus:!0}),V.jsx(S.KV,{paddingBlock:4,children:V.jsx(S.SV,{renderError:()=>V.jsx(S.xv,{color:"grey9",variant:"small",sx:{marginBlock:8,marginInline:8},children:"Error getting tags"}),children:V.jsx(C.Suspense,{fallback:V.jsx(S.xu,{padding:8,flexDirection:"column",gap:8,children:(0,E.w6)(1,6).map(e=>V.jsx(S.Od,{height:24,width:85},e))}),children:V.jsx(Qn,{searchTerm:r,setSearchTerm:i,onTagToggle:function(e){let r=u.includes(e.id)?t.filter(t=>t!==e.id):[...t,e.id];s(r),n({tagIds:r}),a(!1)},optimisticTagIds:u})})})}),V.jsx(S.De,{children:V.jsx(S.zx,{invisible:!0,startIcon:"edit",textWeight:"normal",color:"dark",onClick:function(){a(!1),e(!0)},children:"Manage tags"})})]})})]}),u.length>0&&V.jsx(S.SV,{children:V.jsx(C.Suspense,{children:V.jsx(Qe,{optimisticTagIds:u,setOptimisticTagIds:s})})})]})}function Qn(e){let{onTagToggle:t,searchTerm:n,optimisticTagIds:r}=e,{tags:i}=NF(),o=(0,C.useMemo)(()=>{let e=n.toLowerCase();return i.filter(t=>t.name.toLowerCase().includes(e))},[i,n]);return V.jsxs(V.Fragment,{children:[!o.length&&V.jsx(S.xv,{color:"grey9",variant:"small",sx:{marginBlock:8,marginInline:8},children:"No tags found"}),o.map(e=>{let n=r.includes(e.id);return V.jsx(S.c8,{value:e.id,onCheckedChange:()=>t(e),checked:n,children:V.jsx(S.Ct,{title:e.name,color:"purple",sx:{marginLeft:8,marginBottom:4,marginTop:4},size:"medium"})},e.id)})]})}function Qr(){let{uploaderId:e,onFilterChange:t}=N9(),[n,r]=(0,C.useState)(""),[i,o]=(0,C.useState)(!1),[a,u]=(0,C.useState)();return(0,_.pQ)(e,()=>{e||u(void 0)}),V.jsxs(S.h_,{open:i,onOpenChange:function(e){o(e),e||r("")},children:[V.jsx(S.$F,{children:V.jsx(S.zx,{startIcon:"people",renderStartIcon:e=>a?V.jsx(S.qE,{imageUrl:null==a?void 0:a.uploadedAvatar,firstName:a.firstName,lastName:a.lastName,size:16,hasBorder:!1}):e,endIcon:"arrowDropDown",size:"small",color:"grey",children:(null==a?void 0:a.name)??"All uploaders"})}),V.jsx(S.AW,{minWidth:256,align:"start",border:!1,childrenFocusScope:!0,children:V.jsxs(S.BC,{variant:"attached",children:[V.jsx(S.Ie,{value:n,onValueChange:r,placeholder:"Search for uploaders",autoFocus:!0}),V.jsx(S.KV,{paddingBlock:4,children:V.jsx(S.SV,{renderError:()=>V.jsx(S.xv,{color:"grey9",variant:"small",sx:{marginBlock:8,marginInline:8},children:"Error getting uploaders"}),children:V.jsx(C.Suspense,{fallback:V.jsx(Qo,{}),children:V.jsx(Qi,{searchTerm:n,setSearchTerm:r,onUploaderToggle:function(e){u(e),t({uploaderId:null==e?void 0:e.id}),o(!1)},optimisticUploader:a})})})})]})})]})}function Qi(e){let{searchTerm:t,optimisticUploader:n,onUploaderToggle:r}=e,{uploaders:i}=NX(),o=(0,C.useMemo)(()=>{let e=t.toLowerCase();return(0,E.DY)(i.filter(t=>{var n;return t.name.toLowerCase().includes(e)||(null==(n=t.email)?void 0:n.toLowerCase().includes(e))}),e=>(null==n?void 0:n.id)===(null==e?void 0:e.id)?0:1)},[i,n,t]);return o.length?V.jsx(V.Fragment,{children:o.map(e=>{let t=e.id===(null==n?void 0:n.id);return V.jsx(S.c8,{value:e.id,onCheckedChange:()=>t?r():r(e),checked:t,children:V.jsxs(S.xu,{alignItems:"center",padding:{top:8,bottom:8,left:16,right:16},gap:8,children:[V.jsx(S.qE,{firstName:e.firstName,lastName:e.lastName,imageUrl:e.uploadedAvatar,hasBorder:!1}),V.jsxs(S.xu,{display:"flex",flexDirection:"column",children:[V.jsx(S.xv,{color:"grey12",variant:"normal",children:e.name}),e.email&&V.jsx(S.xv,{color:"grey10",variant:"small",children:e.email})]})]})},e.id)})}):V.jsx(S.xv,{color:"grey9",variant:"small",sx:{marginBlock:8,marginInline:8},children:"No uploaders found"})}function Qo(){return V.jsx(S.xu,{padding:8,flexDirection:"column",gap:8,children:(0,E.w6)(1,4).map(e=>V.jsx(S.Od,{height:48,width:"full"},e))})}function Qa(){let{media:e,mediaTotal:t}=N9(),n=Wb();return V.jsxs(S.xu,{alignItems:"center",gap:16,children:[n.isSelectAllEnabled&&V.jsx(S.XZ,{onCheckedChange:n.toggleSelectAll,checked:n.selectedCount>0,indeterminate:n.selectedCount!==t,onClick:e=>e.stopPropagation(),disabled:0===e.length}),0!==e.length&&V.jsx(qA,{count:t}),V.jsxs(S.xu,{gap:8,alignItems:"center",children:[V.jsx(S.xv,{children:"Filter:"}),V.jsx(q8,{}),V.jsx(Qr,{}),V.jsx(Qt,{})]})]})}function Qu(e){let{assetType:t,onSelectedChange:n,actionContainerRef:r}=e;return V.jsx(S.SV,{renderError:()=>V.jsx(qs,{}),children:V.jsx(C.Suspense,{fallback:V.jsx(qh,{actionContainerRef:r}),children:V.jsx(Wx,{children:V.jsx(N3,{assetType:t,actionContainerRef:r,onSelectedChange:n,children:V.jsx(qa,{children:V.jsx(Qs,{})})})})})})}function Qs(){let{media:e}=N9(),t=N4();return V.jsx(qb,{children:V.jsx(ql,{sidePane:t?void 0:V.jsx(q3,{}),mediaActions:V.jsx(qr,{}),mediaToolbar:V.jsx(Qa,{}),mediaList:0===e.length?V.jsx(N8,{}):V.jsx(qc,{})})})}var Ql={};Object.defineProperty(Ql,"__esModule",{value:!0}),Ql.confetti=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Object.assign({},Qc,(!n.stagger&&n.delay&&(n.stagger=n.delay),n)),i=r.elementCount,o=r.colors,a=r.width,u=r.height,s=r.perspective,l=r.angle,c=r.spread,d=r.startVelocity,f=r.decay,p=r.dragFriction,A=r.duration,h=r.stagger,m=r.random;e.style.perspective=s;var g=Array.from({length:i}).map(function(t,n){var r=document.createElement("div"),i=o[n%o.length];return r.style["background-color"]=i,r.style.width=a,r.style.height=u,r.style.position="absolute",r.style.willChange="transform, opacity",r.style.visibility="hidden",e.appendChild(r),r}).map(function(e){var t;return{element:e,physics:(t=Math.PI/180*c,{x:0,y:0,z:0,wobble:10*m(),wobbleSpeed:.1+.1*m(),velocity:.5*d+m()*d,angle2D:-(Math.PI/180*l)+(.5*t-m()*t),angle3D:-(Math.PI/4)+m()*(Math.PI/2),tiltAngle:m()*Math.PI,tiltAngleSpeed:.1+.3*m()})}});return t=void 0,new Promise(function(n){requestAnimationFrame(function r(i){t||(t=i);var o=i-t,a=t===i?0:(i-t)/A;g.slice(0,Math.ceil(o/h)).forEach(function(e){var t,n,r,i,o,u;e.physics.x+=Math.cos(e.physics.angle2D)*e.physics.velocity,e.physics.y+=Math.sin(e.physics.angle2D)*e.physics.velocity,e.physics.z+=Math.sin(e.physics.angle3D)*e.physics.velocity,e.physics.wobble+=e.physics.wobbleSpeed,f?e.physics.velocity*=f:e.physics.velocity-=e.physics.velocity*p,e.physics.y+=3,e.physics.tiltAngle+=e.physics.tiltAngleSpeed,n=(t=e.physics).x,r=t.y,i=t.z,o=t.tiltAngle,u=t.wobble,e.element.style.visibility="visible",e.element.style.transform="translate3d("+(n+10*Math.cos(u))+"px, "+(r+10*Math.sin(u))+"px, "+i+"px) rotate3d(1, 1, 1, "+o+"rad)",e.element.style.opacity=1-a}),i-t<A?requestAnimationFrame(r):(g.forEach(function(t){if(t.element.parentNode===e)return e.removeChild(t.element)}),n())})})};var Qc={angle:90,spread:45,startVelocity:45,elementCount:50,width:"10px",height:"10px",perspective:"",colors:["#a864fd","#29cdff","#78ff44","#ff718d","#fdff6a"],duration:3e3,stagger:0,dragFriction:.1,random:Math.random};S.xv,S.xv,S.xv,S.xv,S.xv,S.xv,S.xv,S.xv,S.xv,S.xv,S.xv,S.xv,S.xv,S.xv,(0,C.createContext)(void 0);let Qd={duration:3e3};Qd.duration&&Qd.duration,(0,C.createContext)({editedUID:{current:!1},onEditUID:()=>{}});let Qf=(0,C.createContext)({ids:[],isSelected:()=>!1,update:()=>{}});function Qp(e){var t;return(null==(t=e.config)?void 0:t.label)??("Boolean"===e.type||"Separator"===e.type?void 0:e.fieldset)??e.type}function QA(e,t="..."){var n;return(null==(n=e.config)?void 0:n.placeholder)||t}function Qh(e){var t;let{content:n,field:r,id:i,readOnly:o,onContentChange:a}=e,u=(null==n?void 0:n.value)??(null==(t=r.config)?void 0:t.default_value)??!1;return V.jsxs(S.gN,{children:[V.jsx(S.fw,{name:"biToggle"}),V.jsx(S.Qy,{htmlFor:i,children:Qp(r)}),V.jsxs(S.JO,{children:[V.jsx(S.xu,{padding:4,alignItems:"center",children:V.jsx(S.xv,{children:function(e,t,n="..."){var r,i;return(t?null==(r=e.config)?void 0:r.placeholder_true:null==(i=e.config)?void 0:i.placeholder_false)||n}(r,u)})}),V.jsx(S.rs,{id:i,sx:{alignSelf:"center",marginLeft:"auto",marginRight:12},checked:u,onCheckedChange:e=>{o||a({__TYPE__:"BooleanContent",value:e})}})]})]})}function Qm(e){let{id:t,field:n,content:r,onContentChange:i}=e;return V.jsxs(S.gN,{children:[V.jsx(S.fw,{name:"colorLens"}),V.jsx(S.Qy,{id:t,children:Qp(n)}),V.jsx(S.JO,{children:V.jsx(S.xu,{padding:{left:4},alignItems:"center",children:V.jsx(S.TC,{onValueChange:e=>i(void 0===e?void 0:{__TYPE__:"FieldContent",type:"Color",value:e}),value:null==r?void 0:r.value,"aria-labelledby":t,placeholder:QA(n)})})})]})}function Qg(e){let{id:t,readOnly:n,field:r,content:i,onContentChange:o}=e,a=null!=i&&i.value?(0,T._O)(i.value):void 0;return V.jsxs(S.gN,{children:[V.jsx(S.fw,{name:"dateRange"}),V.jsx(S.Qy,{id:t,children:Qp(r)}),V.jsx(S.JO,{children:V.jsx(S.xu,{padding:{left:4,right:12},width:"100%",flexDirection:"column",justifyContent:"center",children:V.jsx(S.Wr,{mode:"date","aria-labelledby":t,disabled:n,value:a,onValueChange:e=>o(function(e){if(e)return{__TYPE__:"FieldContent",type:"Date",value:function(e){let t=`${e.getFullYear()}`.padStart(4,"0"),n=`${e.getMonth()+1}`.padStart(2,"0"),r=`${e.getDate()}`.padStart(2,"0");return`${t}-${n}-${r}`}(e)}}(e))})})})]})}let Qy=(0,C.forwardRef)(function(e,t){return V.jsx(S.oi,{padding:Qv,...e,ref:t,sx:{...e.sx,alignSelf:"stretch"}})}),Qv={input:{inline:4},adornment:{inline:12}},Qx=({provider:e})=>Qb[e.toLowerCase()]??V.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[V.jsx("g",{clipPath:"url(#clip0_6524_22412)",children:V.jsx("path",{d:"M7.99992 1.33333C4.31992 1.33333 1.33325 4.32 1.33325 8C1.33325 11.68 4.31992 14.6667 7.99992 14.6667C11.6799 14.6667 14.6666 11.68 14.6666 8C14.6666 4.32 11.6799 1.33333 7.99992 1.33333ZM2.66659 8C2.66659 7.59333 2.71992 7.19333 2.80659 6.81333L5.99325 10V10.6667C5.99325 11.4 6.59325 12 7.32658 12V13.2867C4.70658 12.9533 2.66659 10.7133 2.66659 8ZM11.9266 11.6C11.7533 11.06 11.2599 10.6667 10.6599 10.6667H9.99325V8.66667C9.99325 8.3 9.69325 8 9.32658 8H5.32658V6.66667H6.65992C7.02658 6.66667 7.32658 6.36667 7.32658 6V4.66667H8.65992C9.39325 4.66667 9.99325 4.06667 9.99325 3.33333V3.06C11.9466 3.84667 13.3333 5.76667 13.3333 8C13.3333 9.38667 12.7933 10.6533 11.9266 11.6Z",fill:"#6F6E77"})}),V.jsx("defs",{children:V.jsx("clipPath",{id:"clip0_6524_22412",children:V.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),Qb={codepen:V.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[V.jsx("g",{clipPath:"url(#clip0_6523_22409)",children:V.jsx("path",{d:"M15.9879 5.44292C15.9843 5.42352 15.981 5.40413 15.9759 5.38517C15.9726 5.37375 15.9688 5.36298 15.9651 5.35177C15.9597 5.33497 15.9541 5.31816 15.9474 5.30179C15.9427 5.29037 15.9373 5.27938 15.9321 5.26839C15.9248 5.25288 15.9173 5.23758 15.9086 5.22271C15.9026 5.21172 15.8957 5.20138 15.889 5.19082C15.8798 5.1766 15.8703 5.1626 15.8599 5.14902C15.8524 5.13889 15.8446 5.1292 15.8365 5.1195C15.8257 5.10657 15.8141 5.09429 15.8024 5.08223C15.7934 5.07318 15.7843 5.06413 15.7748 5.05529C15.7623 5.04387 15.7494 5.0331 15.7358 5.02276C15.7255 5.01479 15.7154 5.0066 15.7046 4.99927C15.7007 4.99647 15.6973 4.99324 15.6932 4.99065L8.38116 0.115543C8.15039 -0.0385144 7.84939 -0.0385144 7.61863 0.115543L0.306176 4.99044C0.302082 4.99302 0.29885 4.99626 0.294756 4.99906C0.283983 5.0066 0.273856 5.01457 0.263514 5.02254C0.250155 5.0331 0.237011 5.04387 0.224515 5.05486C0.215034 5.06348 0.205985 5.07253 0.19715 5.0818C0.185084 5.09386 0.17388 5.10614 0.162892 5.11907C0.154704 5.12877 0.146947 5.13846 0.139406 5.14924C0.129064 5.16281 0.119583 5.1766 0.110318 5.19104C0.103639 5.20159 0.0969593 5.21194 0.0907108 5.22293C0.0820922 5.23779 0.0745509 5.25309 0.0674405 5.26817C0.0622694 5.27916 0.0566673 5.29037 0.0521425 5.30157C0.0454631 5.31795 0.0396456 5.33475 0.0342589 5.35156C0.030596 5.36276 0.0267177 5.37375 0.0237011 5.38388C0.0187455 5.40284 0.0150825 5.42201 0.0116351 5.44162C0.00969592 5.45153 0.00732581 5.46123 0.00603302 5.47136C0.00215465 5.50109 0 5.53082 0 5.56121V10.4372C0 10.4673 0.00215465 10.4975 0.00646395 10.527C0.00797221 10.5378 0.0107733 10.5464 0.0129279 10.5568C0.0163753 10.5762 0.0193919 10.5955 0.0258558 10.6149C0.0288723 10.6257 0.0323198 10.6365 0.0366291 10.6483C0.0420157 10.6656 0.0474023 10.6828 0.0538662 10.6985C0.058391 10.7093 0.0646395 10.7201 0.0689488 10.7309C0.0760591 10.7459 0.0840314 10.761 0.09265 10.7768C0.098683 10.7875 0.105578 10.7983 0.112042 10.8082C0.121307 10.8233 0.131434 10.8362 0.142207 10.8491C0.149748 10.8599 0.157289 10.8685 0.165908 10.8789C0.176897 10.8918 0.187455 10.9047 0.200382 10.9162C0.209217 10.9248 0.21762 10.9355 0.228393 10.942C0.24089 10.9528 0.254249 10.9636 0.267177 10.9748C0.277519 10.9834 0.288723 10.9898 0.297342 10.9982C0.301436 11.0004 0.303806 11.0047 0.308115 11.0067L7.61863 15.8841C7.73412 15.9617 7.86641 16.0005 8 15.9998C8.13359 15.9992 8.26588 15.9611 8.38137 15.8841L15.6938 11.0092C15.6979 11.0067 15.7014 11.0036 15.7052 11.0008C15.716 10.9933 15.7261 10.9853 15.7365 10.9773C15.7498 10.9668 15.763 10.9558 15.7755 10.9446C15.785 10.9362 15.794 10.9269 15.8031 10.9179C15.8149 10.9058 15.8263 10.8935 15.8371 10.8806C15.8453 10.8709 15.8531 10.8612 15.8606 10.8509C15.8709 10.8373 15.8804 10.8233 15.8897 10.8091C15.8964 10.7987 15.903 10.7882 15.9093 10.7776C15.9179 10.7625 15.9254 10.7472 15.9328 10.7317C15.9379 10.7207 15.9433 10.7097 15.9481 10.6985C15.9548 10.6819 15.9604 10.6651 15.9657 10.6483C15.9694 10.6371 15.9733 10.6261 15.9765 10.6149C15.9815 10.596 15.9849 10.5766 15.9886 10.5572C15.9903 10.5473 15.9929 10.5376 15.994 10.5275C15.9978 10.4977 16 10.468 16 10.4376V5.5625C16 5.53212 15.9976 5.50238 15.994 5.47265C15.9922 5.46209 15.989 5.45347 15.9869 5.44292H15.9879ZM7.99978 9.62638L5.56826 8.00005L7.99978 6.37351L10.4315 8.00005L7.99978 9.62638ZM7.31245 5.17919L4.33171 7.17288L1.92561 5.56336L7.31245 1.97221V5.17919ZM3.09515 7.99984L1.37531 9.15021V6.84947L3.09515 7.99984ZM4.33171 8.82765L7.31245 10.8211V14.0281L1.92561 10.4365L4.33171 8.82722V8.82765ZM8.68733 10.8207L11.6681 8.82722L14.0744 10.4365L8.68733 14.0277V10.8207ZM12.9046 8.00027L14.6247 6.84969V9.15064L12.9046 7.99984V8.00027ZM11.6681 7.17288L8.68733 5.1794V1.97221L14.0744 5.56336L11.6681 7.17288Z",fill:"black"})}),V.jsx("defs",{children:V.jsx("clipPath",{id:"clip0_6523_22409",children:V.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),codesandbox:V.jsxs("svg",{width:"14",height:"16",viewBox:"0 0 14 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[V.jsx("g",{clipPath:"url(#clip0_6523_22406)",children:V.jsx("path",{d:"M6.24312 14.1129V8.35021L1.28724 5.49888V8.78388L3.55732 10.0999V12.5702L6.24312 14.1129ZM7.53036 14.1468L10.2658 12.571V10.0422L12.5506 8.71812V5.47426L7.53036 8.3727V14.1468ZM11.8904 4.36906L9.25164 2.83995L6.93472 4.18436L4.60022 2.8386L1.93795 4.38817L6.90626 7.24665L11.8904 4.36906ZM0 12.0115V4.02675L6.91821 0L13.8378 4.00984V11.9988L6.91805 15.985L0 12.0115Z",fill:"black"})}),V.jsx("defs",{children:V.jsx("clipPath",{id:"clip0_6523_22406",children:V.jsx("rect",{width:"13.8378",height:"16",fill:"white"})})})]}),dailymotion:V.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[V.jsxs("g",{clipPath:"url(#clip0_6523_22345)",children:[V.jsx("path",{d:"M16 0H0V16H16V0Z",fill:"white"}),V.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.73038 10.3003C8.40789 10.6268 8.00377 10.7901 7.51804 10.7901C7.04025 10.7901 6.64411 10.6308 6.32956 10.3122C6.01503 9.99367 5.85776 9.58351 5.85776 9.08176C5.85776 8.60389 6.01901 8.20766 6.3415 7.89306C6.66401 7.57847 7.06016 7.42118 7.52998 7.42118C7.84849 7.42118 8.13715 7.49484 8.39594 7.64219C8.65474 7.78953 8.8558 7.99063 8.99913 8.2455C9.14246 8.50034 9.21412 8.77908 9.21412 9.08176C9.21412 9.56757 9.05287 9.97376 8.73038 10.3003ZM9.10662 3.58632V6.35792C8.82791 6.07918 8.53131 5.87808 8.21678 5.75463C7.90223 5.63118 7.54988 5.56946 7.1597 5.56946C6.53062 5.56946 5.96527 5.72476 5.4636 6.03538C4.96193 6.34597 4.57176 6.77007 4.29305 7.30768C4.01435 7.84528 3.875 8.44062 3.875 9.09369C3.875 9.76269 4.01236 10.366 4.28708 10.9036C4.5618 11.4412 4.95197 11.8653 5.45763 12.1759C5.96328 12.4865 6.54258 12.6418 7.19553 12.6418C8.14312 12.6418 8.80403 12.3312 9.17831 11.71H9.20218V12.5595H11.0894V3.15625L9.10662 3.58632Z",fill:"#232323"})]}),V.jsx("defs",{children:V.jsx("clipPath",{id:"clip0_6523_22345",children:V.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),flickr:V.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[V.jsx("rect",{width:"16",height:"16",fill:"white"}),V.jsxs("g",{clipPath:"url(#clip0_6523_22379)",children:[V.jsx("path",{d:"M8.43286 7.78387C8.43286 9.321 9.67925 10.5674 11.2166 10.5674C12.7538 10.5674 13.9999 9.321 13.9999 7.78387C13.9999 6.24675 12.7538 5.00061 11.2166 5.00061C9.67925 5.00061 8.43286 6.24675 8.43286 7.78387Z",fill:"#FF0084"}),V.jsx("path",{d:"M2 7.78408C2 9.32121 3.24614 10.5676 4.78352 10.5676C6.32089 10.5676 7.56703 9.32121 7.56703 7.78408C7.56703 6.24695 6.32089 5.00081 4.78352 5.00081C3.24614 5.00081 2 6.24695 2 7.78408Z",fill:"#0063DC"})]}),V.jsx("defs",{children:V.jsx("clipPath",{id:"clip0_6523_22379",children:V.jsx("rect",{width:"12",height:"5.568",fill:"white",transform:"translate(2 5)"})})})]}),giphy:V.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[V.jsx("rect",{width:"16",height:"16",fill:"#121212"}),V.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4 3.38889V12.2778H5.11111V3.38889H4Z",fill:"#00FF99"}),V.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.6663 5.61111V12.2778H11.7774V5.61111H10.6663Z",fill:"#9933FF"}),V.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.75 3H4V4.11111H8.83333V3H7.75Z",fill:"#FFF35C"}),V.jsx("path",{d:"M9.00041 4.11111H7.33374H8.83374V3.77778L9.00041 4.11111Z",fill:"#999999"}),V.jsx("path",{d:"M8.83374 4.11111H7.33374L8.44485 3L8.83374 3.77778V4.11111Z",fill:"#999237"}),V.jsx("path",{d:"M10.6663 7.44444V5.77778L11.7774 6.33333L10.6663 7.44444Z",fill:"#5C1F99"}),V.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.6667 11.8889H4V13H11.7778V11.8889H10.6667Z",fill:"#00CCFF"}),V.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.6668 5.22222V4.11111H9.55569V3H8.44458V3.90739V5.0185V6.33333H9.55569H10.6668H11.7779V5.22222H10.6668Z",fill:"#FF6666"})]}),instagram:V.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:[V.jsxs("g",{clipPath:"url(#clip0_6523_22356)",children:[V.jsx("mask",{id:"mask0_6523_22356",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"16",height:"16",children:V.jsx("path",{d:"M4.70325 0.0949238C3.85627 0.1349 3.27778 0.270564 2.77227 0.468642C2.24897 0.672648 1.80537 0.946046 1.36408 1.38914C0.922279 1.83249 0.650958 2.27688 0.448504 2.8007C0.252489 3.3075 0.119662 3.88627 0.0822604 4.73377C0.045126 5.58283 0.0366102 5.85363 0.0407495 8.01522C0.0448729 10.1765 0.0544124 10.4479 0.0949012 11.2972C0.135388 12.1439 0.270546 12.7222 0.468623 13.2279C0.672886 13.7512 0.946004 14.1946 1.38935 14.6361C1.83245 15.0777 2.27708 15.3487 2.80115 15.5515C3.30744 15.7472 3.88644 15.8806 4.73369 15.9177C5.58273 15.9551 5.85379 15.9634 8.01483 15.9592C10.1769 15.9551 10.448 15.9456 11.297 15.9053C12.144 15.8648 12.722 15.7292 13.228 15.5316C13.7513 15.3268 14.1949 15.0542 14.6362 14.6109C15.0775 14.1678 15.3488 13.7231 15.5512 13.199C15.7473 12.6927 15.8806 12.1137 15.9175 11.267C15.9546 10.4174 15.9634 10.1461 15.9593 7.98478C15.9551 5.8232 15.9453 5.55239 15.9051 4.7036C15.8649 3.85609 15.7292 3.27811 15.5314 2.77208C15.3269 2.24877 15.054 1.80567 14.6109 1.36387C14.1678 0.922574 13.7232 0.650729 13.1991 0.448785C12.6926 0.252768 12.1138 0.119166 11.2666 0.0825425C10.4175 0.0448876 10.1465 0.0366393 7.98465 0.0407642C5.82336 0.0448892 5.5523 0.0541772 4.70325 0.0949238ZM4.79611 14.485C4.02004 14.4512 3.59863 14.3222 3.31776 14.2142C2.94585 14.0703 2.68046 13.8977 2.40114 13.6205C2.12234 13.3422 1.94928 13.0776 1.80408 12.7064C1.69497 12.4255 1.5637 12.0046 1.52734 11.2286C1.48788 10.3896 1.47886 10.1378 1.47498 8.01237C1.47086 5.88742 1.47859 5.63569 1.51522 4.79593C1.54848 4.02038 1.67822 3.59843 1.78602 3.31782C1.92993 2.94539 2.10196 2.68051 2.37973 2.4012C2.65801 2.12187 2.92263 1.94933 3.29402 1.80412C3.57463 1.69451 3.99555 1.56426 4.77134 1.52738C5.61084 1.48766 5.8623 1.47915 7.98723 1.47502C10.1127 1.47089 10.3644 1.47838 11.2042 1.51526C11.9797 1.54904 12.4016 1.67749 12.682 1.78607C13.0541 1.92998 13.3195 2.1015 13.5986 2.37979C13.8777 2.65808 14.0507 2.92218 14.1959 3.29435C14.3055 3.57418 14.4358 3.99562 14.4724 4.77117C14.5124 5.61068 14.5214 5.8624 14.5253 7.98736C14.5294 10.1128 14.5217 10.3646 14.4848 11.2038C14.451 11.9799 14.3223 12.4016 14.214 12.6827C14.0701 13.0543 13.898 13.3197 13.62 13.5991C13.342 13.8773 13.0774 14.0509 12.7057 14.1961C12.4256 14.3055 12.0042 14.436 11.2289 14.4729C10.3894 14.5123 10.1379 14.5214 8.01225 14.5252C5.88732 14.5294 5.63586 14.5214 4.79611 14.485ZM11.2854 3.74493C11.2864 4.27211 11.7151 4.69896 12.2422 4.69792C12.7697 4.69689 13.1965 4.2685 13.1957 3.74132C13.1947 3.21414 12.7661 2.78704 12.2386 2.78807C11.7112 2.7891 11.2844 3.21775 11.2854 3.74493ZM3.91277 8.00773C3.91714 10.2653 5.75063 12.0913 8.0076 12.0869C10.2648 12.0825 12.0919 10.2495 12.0875 7.99201C12.0831 5.73526 10.2494 3.90819 7.99188 3.91257C5.73489 3.91696 3.90837 5.75073 3.91277 8.00773ZM5.34648 8.0049C5.3439 6.53969 6.52978 5.34942 7.99471 5.34683C9.45991 5.344 10.6504 6.52937 10.6533 7.99484C10.6561 9.46031 9.47022 10.6503 8.00477 10.6532C6.53984 10.656 5.34932 9.47037 5.34648 8.0049Z",fill:"white"})}),V.jsxs("g",{mask:"url(#mask0_6523_22356)",children:[V.jsx("mask",{id:"mask1_6523_22356",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"-1",y:"-1",width:"18",height:"18",children:V.jsx("path",{d:"M16.5905 -0.583628H-0.603516V16.6106H16.5905V-0.583628Z",fill:"white"})}),V.jsxs("g",{mask:"url(#mask1_6523_22356)",children:[V.jsx("mask",{id:"mask2_6523_22356",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"-1",y:"-1",width:"18",height:"18",children:V.jsx("path",{d:"M16.6701 -0.663237H-0.683105V16.6902H16.6701V-0.663237Z",fill:"white"})}),V.jsxs("g",{mask:"url(#mask2_6523_22356)",children:[V.jsx("mask",{id:"mask3_6523_22356",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"-1",y:"-1",width:"18",height:"18",children:V.jsx("path",{d:"M16.6701 -0.663237H-0.683105V16.6902H16.6701V-0.663237Z",fill:"white"})}),V.jsx("g",{mask:"url(#mask3_6523_22356)",children:V.jsx("rect",{x:"-0.688721",y:"-0.665792",width:"17.3622",height:"17.3622",fill:"url(#pattern0)"})})]})]})]})]}),V.jsxs("defs",{children:[V.jsx("pattern",{id:"pattern0",patternContentUnits:"objectBoundingBox",width:"1",height:"1",children:V.jsx("use",{xlinkHref:"#image0_6523_22356",transform:"scale(0.000439947)"})}),V.jsx("clipPath",{id:"clip0_6523_22356",children:V.jsx("rect",{width:"16",height:"16",fill:"white"})}),V.jsx("image",{id:"image0_6523_22356",width:"2273",height:"2275",xlinkHref:"data:image/jpeg;base64,/9j/4AAQSkZJRgABAgEAlgCWAAD/7AARRHVja3kAAQAEAAAAHgAA/+4AIUFkb2JlAGTAAAAAAQMAEAMCAwYAAFokAABijgAAd23/2wCEABALCwsMCxAMDBAXDw0PFxsUEBAUGx8XFxcXFx8eFxoaGhoXHh4jJSclIx4vLzMzLy9AQEBAQEBAQEBAQEBAQEABEQ8PERMRFRISFRQRFBEUGhQWFhQaJhoaHBoaJjAjHh4eHiM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h02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jhz+j7fweHn/AFd+fp9v6v8Ape79DDf1JLc930/LnmGfj9H0+v7/APAf6c32/wAQ/wCR+n/5f9383/iNaca041pxrTjWnGtONaca041pxrTjWnGtONaca041pxrTjWnGtONaca041pxrTjWnGtONaca041pxrTjWnGtONaca041pxrTjWnGtONaca041pxrTjWnGtONaca041pxrTjWnGtONaca0415xrzjXnGvONeca8415xrzjXnGvONeca8415xrzjXnGvONeca8415xrzjXnGvONeYa8w15hrzDXmGvMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMNeYa8w15hrzDXnGvONeca8415xrzjXnGvONeca041pxrTjWnGtONaca041pxrTjWnGtONacas41ZxqzjVnGrONWcas41ZxqzjVnGrONScak41JxqTjUUGooNRQaig1FBqKDTUGmoNNQaag01BpqDTUGmoNNQaag0lBpKDSUGkoNJQaSg0lBpKDSUGioNFQaKg0VBoqDRVGiqNFUaKo0FRoKjQVGgqNBUaCo0FRoKjQVGgqPXqj16o9eqPXqj16o9eqPXqj16o9eqPXqj1yo9cqPXKj1yo9cqPXLD1yw9csPXLD1yw9csPWrD1qw9asPWrD1qw9asPWrD1qw9asPWrD1qw9YsPWLD1iw9YsPWLD1iw9YsPWLD1iw9YsPWLD1iw9YsPWLD1iw9YsPWLD1iw9YsPWLD1iw9YsPWLD1aw9WsPVrD1aw9WsPVrD1aw9WsPVrD1aw9WsPVrB34/8Ay/z/AH/53yHY/wDU/E/0v+P7/wCz/9k="})]})]}),pinterest:V.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[V.jsxs("g",{clipPath:"url(#clip0_6570_25513)",children:[V.jsx("rect",{width:"15.996",height:"16",rx:"2",fill:"#CC2127"}),V.jsx("path",{d:"M7.999 2C4.68555 2 2 4.68555 2 7.999C2 10.5406 3.58174 12.7102 5.81336 13.5861C5.76137 13.1121 5.71338 12.3843 5.83336 11.8644C5.94134 11.3964 6.53724 8.88285 6.53724 8.88285C6.53724 8.88285 6.35727 8.52291 6.35727 7.993C6.35727 7.15914 6.84119 6.53524 7.44309 6.53524C7.95501 6.53524 8.20297 6.91918 8.20297 7.3811C8.20297 7.89502 7.87502 8.66489 7.70705 9.37877C7.56507 9.97667 8.007 10.4626 8.5949 10.4626C9.66072 10.4626 10.4806 9.33878 10.4806 7.71505C10.4806 6.27929 9.44876 5.27345 7.975 5.27345C6.26729 5.27345 5.26546 6.55324 5.26546 7.87702C5.26546 8.39293 5.46342 8.94484 5.71138 9.24679C5.75937 9.30678 5.76737 9.35877 5.75337 9.41876C5.70738 9.60873 5.6074 10.0167 5.5874 10.0987C5.56141 10.2086 5.50142 10.2326 5.38743 10.1786C4.63756 9.83069 4.16964 8.73488 4.16964 7.85502C4.16964 5.96334 5.54541 4.22563 8.13298 4.22563C10.2146 4.22563 11.8304 5.70938 11.8304 7.69105C11.8304 9.75871 10.5266 11.4224 8.71688 11.4224C8.10898 11.4224 7.53708 11.1065 7.34111 10.7345C7.34111 10.7345 7.04116 11.8804 6.96717 12.1603C6.83119 12.6822 6.46526 13.3341 6.2213 13.732C6.7832 13.906 7.3791 14 7.997 14C11.3104 14 13.996 11.3144 13.996 8.001C13.998 4.68555 11.3124 2 7.999 2Z",fill:"white"})]}),V.jsx("defs",{children:V.jsx("clipPath",{id:"clip0_6570_25513",children:V.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),spotify:V.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[V.jsx("g",{clipPath:"url(#clip0_6523_22402)",children:V.jsx("path",{d:"M12.6609 7.10585C10.121 5.59751 5.93158 5.45882 3.50697 6.1947C3.11759 6.31287 2.70584 6.09298 2.5879 5.70373C2.46988 5.31411 2.68945 4.90265 3.07911 4.78429C5.86241 3.93945 10.4892 4.1026 13.4132 5.83828C13.7634 6.04622 13.8782 6.49851 13.6707 6.84813C13.4629 7.19833 13.0103 7.31376 12.6609 7.10585ZM12.5777 9.33993C12.3995 9.62908 12.0215 9.71979 11.7327 9.54223C9.61522 8.24063 6.38637 7.86357 3.88123 8.624C3.55636 8.72218 3.21323 8.53899 3.11455 8.21475C3.01666 7.88989 3.19992 7.54738 3.5242 7.44859C6.38597 6.58018 9.9436 7.00081 12.3756 8.49536C12.6644 8.67322 12.7553 9.05146 12.5777 9.33993ZM11.6136 11.4855C11.472 11.7177 11.1697 11.7904 10.9383 11.6489C9.08801 10.518 6.75909 10.2627 4.01637 10.8891C3.75207 10.9497 3.48866 10.7841 3.42838 10.5198C3.36785 10.2556 3.53284 9.99217 3.79772 9.93186C6.79916 9.2457 9.37381 9.54101 11.4506 10.8101C11.6822 10.9515 11.7551 11.254 11.6136 11.4855ZM8.00002 0.120623C3.64839 0.120623 0.120605 3.64834 0.120605 7.99989C0.120605 12.352 3.64839 15.8794 8.00002 15.8794C12.3517 15.8794 15.8794 12.352 15.8794 7.99989C15.8794 3.64834 12.3517 0.120623 8.00002 0.120623Z",fill:"#1ED760"})}),V.jsx("defs",{children:V.jsx("clipPath",{id:"clip0_6523_22402",children:V.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),twitter:V.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:V.jsx("path",{d:"M14.3193 4.31285C14.329 4.45301 14.329 4.59317 14.329 4.73462C14.329 9.04475 11.0516 14.0156 5.05865 14.0156V14.0131C3.28832 14.0156 1.55478 13.508 0.0644531 12.5507C0.321873 12.5817 0.580582 12.5972 0.839937 12.5979C2.30703 12.5992 3.7322 12.1063 4.88639 11.1988C3.4922 11.1724 2.26961 10.2623 1.84252 8.93366C2.3309 9.02796 2.83413 9.00858 3.31349 8.87746C1.79349 8.57001 0.699937 7.23299 0.699937 5.68023C0.699937 5.66602 0.699937 5.65246 0.699937 5.63889C1.15284 5.89144 1.65994 6.0316 2.17865 6.0471C0.747034 5.08923 0.305743 3.18251 1.17026 1.69176C2.82445 3.7296 5.2651 4.96844 7.8851 5.09956C7.62252 3.96664 7.98123 2.77947 8.82768 1.98307C10.1399 0.748096 12.2038 0.811395 13.4374 2.12452C14.167 1.98048 14.8664 1.71243 15.5064 1.33264C15.2632 2.0877 14.7541 2.72909 14.0741 3.13665C14.7199 3.06044 15.3509 2.88734 15.9451 2.62316C15.5077 3.2794 14.9567 3.85103 14.3193 4.31285Z",fill:"#1D9BF0"})}),vimeo:V.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[V.jsxs("g",{clipPath:"url(#clip0_6523_22340)",children:[V.jsx("path",{d:"M16 14.4C16 15.28 15.28 16 14.4 16H1.6C0.72 16 0 15.28 0 14.4V1.6C0 0.72 0.72 0 1.6 0H14.4C15.28 0 16 0.72 16 1.6V14.4Z",fill:"#1AB7EA"}),V.jsx("path",{d:"M13.9945 5.3084C13.9391 6.42815 13.1229 7.97447 11.5458 9.93402C9.91331 11.9736 8.52987 13 7.40928 13C6.70372 13 6.12267 12.3735 5.63846 11.1338C5.32027 9.98735 4.98824 8.85427 4.67005 7.70786C4.31036 6.46814 3.92299 5.84161 3.50796 5.84161C3.42495 5.84161 3.10676 6.02824 2.56721 6.38816L2 5.68165C2.59488 5.1751 3.17593 4.68187 3.75698 4.17532C4.54554 3.52214 5.14042 3.17555 5.54162 3.13556C6.46853 3.05557 7.04958 3.66877 7.27093 4.97514C7.50612 6.40149 7.67213 7.28129 7.75514 7.62788C8.01799 8.80095 8.32235 9.40081 8.64054 9.40081C8.88956 9.40081 9.26309 9.01423 9.77497 8.2544C10.273 7.49457 10.5497 6.90804 10.5774 6.50813C10.6465 5.85494 10.3837 5.52169 9.77497 5.52169C9.48444 5.52169 9.19392 5.58834 8.88956 5.70831C9.48444 3.84206 10.605 2.94893 12.2652 3.00225C13.4826 3.02891 14.0637 3.80207 13.9945 5.3084Z",fill:"white"})]}),V.jsx("defs",{children:V.jsx("clipPath",{id:"clip0_6523_22340",children:V.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),youtube:V.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[V.jsx("path",{d:"M15.6656 3.75817C15.4816 3.06609 14.9395 2.5211 14.2511 2.33614C13.0034 2 8 2 8 2C8 2 2.99666 2 1.7489 2.33614C1.06051 2.5211 0.518324 3.06609 0.334339 3.75817C0 5.01251 0 7.62963 0 7.62963C0 7.62963 0 10.2467 0.334339 11.5012C0.518324 12.1932 1.06051 12.7381 1.7489 12.9232C2.99666 13.2593 8 13.2593 8 13.2593C8 13.2593 13.0034 13.2593 14.2511 12.9232C14.9395 12.7381 15.4816 12.1932 15.6656 11.5012C16 10.2467 16 7.62963 16 7.62963C16 7.62963 16 5.01251 15.6656 3.75817Z",fill:"#ED1D24"}),V.jsx("path",{d:"M6.36353 10.0058L10.5453 7.62974L6.36353 5.25349V10.0058Z",fill:"white"})]})};function QC(e){let{debouncedUrl:t,content:n,onContentChange:r,selected:i}=e,o=(0,C.useRef)(null),[a,u]=(0,C.useState)(!1);return(0,_.pQ)(t,()=>{var e;a&&(u(!1),null==(e=o.current)||e.reset())}),(0,w.ju)(t)?t===(null==n?void 0:n.embed_url)?V.jsx(Qw,{content:n,selected:i}):V.jsx(S.SV,{ref:o,renderError:QS,onError:function(){u(!0),r(void 0)},children:V.jsx(C.Suspense,{fallback:n&&V.jsx(Qw,{content:n,selected:i}),children:V.jsx(QI,{url:t,selected:i,onContentChange:r})})}):null}function QS(){return V.jsxs(S.xu,{backgroundColor:"grey2",borderRadius:6,padding:16,gap:4,children:[V.jsx(S.I5,{name:"alert",size:"small",color:"grey11"}),V.jsx(S.xv,{variant:"smallBold",color:"grey11",children:"There is no embed data available."})]})}function Qw(e){let{content:t,selected:n}=e,{thumbnail:r,provider:i,author:o,url:a,subtitle:u}=function(e){let t="";switch(e.type){case"video":t=e.title??"";break;case"photo":t=`View this post${e.provider_name?` on ${e.provider_name}`:""}`;break;default:t=`Open${e.provider_name?` on ${e.provider_name}`:""}`}return{url:e.embed_url,thumbnail:{url:e.thumbnail_url??"",aspectRatio:"video"===e.type?"16:9":"1:1"},provider:e.provider_name??"",author:e.author_name??"",subtitle:t}}(t);return V.jsxs(S.oU,{selected:n,children:[V.jsx(S.Sy,{src:r.url,aspectRatio:r.aspectRatio}),V.jsxs(S.Tw,{children:[V.jsxs(S.xu,{display:"flex",alignItems:"center",gap:4,children:[V.jsx(Qx,{provider:i}),V.jsx(S.xv,{variant:"smallBold",color:"grey12",noWrap:!0,children:i}),o&&V.jsx(S.xv,{variant:"small",color:"grey11",noWrap:!0,children:o})]}),V.jsx(S.xv,{variant:"smallBold",href:a,children:u})]})]})}function QI(e){let{url:t,onContentChange:n,selected:r}=e,i=function(e){let{url:t,onContentChange:n}=e,{embedApiEndpoint:r}=WI(),i=(0,R.QT)(Q_,[t,r]),o=(0,_.R9)(n);return(0,C.useEffect)(()=>{let e=(0,S.rI)(()=>o(i));return()=>{clearTimeout(e)}},[i,o]),i}({url:t,onContentChange:n});return V.jsx(Qw,{content:i,selected:r})}function Q_(e,t){let n=new URL(t);return n.searchParams.set("url",e),(0,j.WY)(n,{okType:Ni.object({type:Ni.string(),version:Ni.string().or(Ni.number()).nullish(),title:Ni.string().nullish(),author_name:Ni.string().nullish(),author_url:Ni.string().nullish(),provider_name:Ni.string().nullish(),provider_url:Ni.string().nullish(),cache_age:Ni.string().or(Ni.number()).nullish(),thumbnail_url:Ni.string().nullish(),thumbnail_width:Ni.number().nullish(),thumbnail_height:Ni.number().nullish(),html:Ni.string().nullish()}).passthrough().transform(t=>{let n={embed_url:e};return{...n,__TYPE__:"EmbedContent",type:t.type,version:t.version,title:t.title,author_name:t.author_name,author_url:t.author_url,provider_name:t.provider_name,provider_url:t.provider_url,cache_age:t.cache_age,thumbnail_url:t.thumbnail_url,thumbnail_width:t.thumbnail_width,thumbnail_height:t.thumbnail_height,html:t.html,all:{...n,...t}}})})}function QT(e){let{id:t,readOnly:n,field:r,content:i,onContentChange:o}=e,a=(0,_.$P)({initialState:(null==i?void 0:i.embed_url)??"",startTransition:C.startTransition});function u(e){a.set(e),(0,w.ju)(e)||o(void 0)}return V.jsxs(S.gN,{footer:(0,w.ju)(a.value)&&V.jsx(S.mS,{children:V.jsx(QC,{debouncedUrl:a.debouncedValue,content:i,onContentChange:o})}),children:[V.jsx(S.fw,{name:"cloud"}),V.jsx(S.Qy,{htmlFor:t,children:Qp(r)}),V.jsx(S.JO,{children:V.jsx(Qy,{id:t,readOnly:n,placeholder:QA(r),value:a.value,onValueChange:u,variant:(0,w.ju)(a.value)?"link":"normal",endAdornment:V.jsx(S.zx,{startIcon:"close",color:"grey",size:"small",disabled:!a,onClick:()=>u("")})})})]})}function Qk(e){return!(e.lat>85||e.lat<-85||e.lng>180||e.lng<-180)}function QO(e){let t=e.match(/^.*@(-?\d+.\d+),(-?\d+.\d+).*$/);if(!t)return;let n=parseFloat(t[1]??""),r=parseFloat(t[2]??"");if(isNaN(n)||isNaN(r))return;let i={lat:n,lng:r};if(Qk(i))return i}function QR(e){return e?`${e.lat}, ${e.lng}`:""}function QE(e){let t=e.match(/\(?([\d|.|-]*)[\s+]*,[\s]*([\d|.|-]*)\)?/);if(!t)return QO(e);let n=parseFloat(t[1]??""),r=parseFloat(t[2]??"");if(isNaN(n)||isNaN(r))return QO(e);let i={lat:n,lng:r};return Qk(i)?i:QO(e)}function Qj(e){let{field:t,id:n,readOnly:r,...i}=e,{onValueChange:o,displayedValue:a,onBlur:u,clearValue:s,isValidCoordinates:l}=function(e){let{content:t,onContentChange:n}=e,r=QR(null==t?void 0:t.position),[i,o]=(0,C.useState)(r),a=!!QE(i);return{displayedValue:i,isValidCoordinates:a,onValueChange:o,onBlur:function(){let e=QE(i);if(!e)return o(""),n(void 0);let{lat:t,lng:r}=e;o(QR({lat:t,lng:r})),n({__TYPE__:"GeoPointContent",position:{lat:t,lng:r}})},clearValue:function(){o(""),n(void 0)}}}(i);return V.jsxs(S.gN,{children:[V.jsx(S.fw,{name:"place"}),V.jsx(S.Qy,{htmlFor:n,children:Qp(t)}),V.jsx(S.JO,{children:V.jsx(Qy,{id:n,onValueChange:o,placeholder:"...",readOnly:r,value:a,onBlur:u,variant:l?"link":"normal",endAdornment:V.jsx(S.zx,{startIcon:"close",color:"grey",size:"small",disabled:!a,onClick:s})})})]})}function QF(e){let{fieldLabel:t,imageLabel:n=[]}=e;return V.jsxs(S.wP,{children:[V.jsx(S.xv,{variant:"bold",noWrap:!0,children:(0,O.tx)(t,30)}),0!==n.length&&V.jsx(S.xv,{color:"grey11",noSelect:!0,children:` • ${n.join(" • ")}`})]})}function QM(e){let{fieldLabel:t,isUpdating:n,readOnly:r,onMediaDialogOpenChange:i}=e;return V.jsxs(V.Fragment,{children:[V.jsx(S.Ol,{sx:{flexWrap:"wrap"},children:V.jsx(QF,{fieldLabel:t})}),V.jsx(S.aY,{children:V.jsx(S.Zb,{color:"grey2",variant:"dashed",paddingBlock:12,radius:4,sx:{width:"100%"},children:V.jsx(S.aY,{children:V.jsxs(S.R$,{variant:"horizontal",children:[V.jsx(S.av,{name:"cloudUpload",lineColor:"purple9",backgroundColor:"purple4",size:"small"}),V.jsx(S._T,{children:n?"Preparing your image...":"You haven't selected an image"}),!r&&V.jsx(S.Qj,{children:V.jsx(S.zx,{disabled:n,onClick:()=>i(!0),size:"medium",children:"Select image"})})]})})})})]})}let QU=DH({id:DM(),width:DU(),height:DU(),urls:DH({full:DM(),small:DM().transform(function(e){let t=new URL(e);return t.searchParams.delete("q"),t.searchParams.delete("fm"),t.searchParams.set("w","300"),t.searchParams.set("auto","compress,format"),t.toString()})}),alt_description:DM().optional(),description:DM().nullable()}),QL=DH({results:DY(QU)}).transform(e=>e.results);function QK(e,t){let n=new URL("search/photos",e);return n.searchParams.set("page","1"),n.searchParams.set("per_page","28"),n.searchParams.set("query",t),(0,j.WY)(n,{okType:QL})}function QB(e){let{onSelectedChange:t}=e,[n,r]=(0,C.useTransition)(),i=(0,_.$P)({initialState:"",ms:300,startTransition:r});return V.jsxs(S.xu,{flexDirection:"column",gap:16,width:"100%",position:"relative",children:[V.jsx(S.CR,{value:i.value,placeholder:"Search on Unsplash.com",onValueChange:i.set}),V.jsx(S.SV,{renderError:()=>V.jsx(qs,{}),children:V.jsx(C.Suspense,{fallback:V.jsx(QD,{}),children:V.jsx(QP,{term:i.debouncedValue,loading:n,onSelectedChange:t})})})]})}function QP(e){let{term:t,onSelectedChange:n,loading:r}=e,{media:i,toggleSelected:o,selectedImageId:a}=function(e){var t;let{term:n,onSelectedChange:r}=e,{unsplashApiBaseUrl:i}=WI(),o=function(e,t){let n=(0,C.useRef)(),r=WI(),i=(0,R.QT)(QK,[e,t]);return(0,_.Nr)(t,1e3,()=>{var e;n.current&&t!==n.current&&(null==(e=r.onAnalyticsEvent)||e.call(r,"Unsplash Image Searched")),n.current=t}),i}(i,n||"citrus fruit"),a=null==(t=null==o?void 0:o[0])?void 0:t.id,[u,s]=(0,C.useState)();return(0,C.useEffect)(()=>{null==r||r([]),s(void 0)},[a,r]),{media:o,toggleSelected:function(e){if(e.id===u)return s(void 0),null==r?void 0:r([]);s(e.id),null==r||r([{...e,url:e.urls.full,alt:e.alt_description}])},selectedImageId:u}}({term:t,onSelectedChange:n});return V.jsxs(V.Fragment,{children:[i.length>0&&V.jsx(QW,{children:null==i?void 0:i.map(e=>{let t=new URL(e.urls.full).searchParams.get("fm")??"jpg";return V.jsx(S.PB,{url:e.urls.small,filename:e.description??"Unsplash Image",selected:a===e.id,onCardClick:()=>o(e),onCheckedChange:()=>o(e),extension:t,kind:"image",width:e.width,height:e.height,loading:r},e.id)})}),0===i.length&&V.jsx(qe,{})]})}function QW(e){let{children:t}=e;return V.jsx(S.xr,{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(min(100%, 250px), 1fr))",gap:16,padding:2,paddingBottom:16,position:"relative",width:"100%"},children:t})}function QD(){return V.jsx(QW,{children:(0,E.w6)(1,24).map(e=>V.jsx(qv,{},e))})}function QN(e){let{open:t,onOpenChange:n,onMediaSelected:r,assetType:i}=e,o=WI(),a=o.mediaLibrary,[u,s]=(0,C.useState)(()=>a?"media":"unsplash"),[l,c]=(0,C.useState)(new Set),[d,f]=(0,C.useState)([]),p=l.size+d.length,A=(0,R.q_)(Nq);function h(e){e||c(new Set),n(e)}(0,C.useEffect)(()=>{t&&a&&NJ({config:o,assetType:i})},[t,o,i,a]);let m=function(e){let{assetType:t,mediaDialogOpen:n}=e,r=WI(),i=(0,R.q_)(Nq),o=(0,C.useRef)(0);return(0,C.useEffect)(()=>{n&&(o.current=performance.now())},[n]),function(e){if(!r.onAnalyticsEvent||!r.mediaLibrary)return;let n=i[i.length-1];if(!n)return;let{keyword:a,uploaderId:u,tags:s}=n,l=NH(i,a,t,u,s),c=String(a.split(" ").length),d=String(n.total),f=String(l.findIndex(t=>t.id===e)+1),p=[e].join(","),A=(performance.now()-o.current).toFixed(0);r.onAnalyticsEvent("Media Added To Page",{assetType:t,searchQuery:a,numberOfWords:c,numberOfResults:d,searchPosition:f,mediaIds:p,timeToAddMediaToPage:A,tags:s})}}({assetType:i,mediaDialogOpen:t}),{containerRef:g}=(0,S.VY)();return V.jsxs(S.Vq,{open:t,onOpenChange:h,size:{width:"min(calc(100% - 48px), 2000px)",height:"calc(100% - 30px)"},position:"center",onPointerDownOutside:e=>{g&&(0,_.DX)(g,e.target)&&e.preventDefault()},children:[V.jsx(S.fK,{icon:"image",title:"Media library"}),V.jsxs(S.Zp,{value:u,onValueChange:function(e){if("media"!==e&&"unsplash"!==e)throw Error(`Invalid option ${e}.`);s(e)},padding:"small",width:"auto",children:[a&&V.jsx(S.T9,{value:"media",icon:"photo"}),V.jsx(S.T9,{value:"unsplash",icon:"unsplash"})]}),V.jsx(S.cZ,{children:V.jsxs(S.xu,{flexDirection:"column",flexGrow:1,overflow:"hidden",children:[V.jsx(Wg,{}),V.jsxs(S.xu,{overflow:"hidden",backgroundColor:"grey2",padding:{top:16,inline:16},flexGrow:1,children:["media"===u&&V.jsx(Qu,{assetType:i,onSelectedChange:c}),"unsplash"===u&&V.jsx(QB,{onSelectedChange:f})]})]})}),V.jsxs(S.kX,{children:[V.jsx(S.PO,{}),V.jsx(S._d,{onClick:function(){var e;if("unsplash"===u){let t=d[0];if(!t)return;r(t),null==(e=o.onAnalyticsEvent)||e.call(o,"Unsplash Image Added")}else if("media"===u){let e=A.flatMap(e=>e.items).filter(e=>l.has(e.id))[0];if(!e)return;r(e),m(e.id)}h(!1)},disabled:1!==p,tooltipLabel:0===p?"Select a media item to add to the page":p>1?"Only one media item can be added to the page":void 0,children:"Add to page"})]})]})}R.Fs.registerFetcherConfig(QK,{cacheCapacity:5,revalidationStrategy:{type:"never"}});let Qq=(0,C.forwardRef)(function(e,t){let{isMediaDialogOpen:n,selected:r,children:i,onMediaSelected:o,onMediaDialogOpenChange:a}=e;return V.jsxs(S.Zb,{ref:t,color:r?"indigo2":"grey2",variant:r?"selected":"dashed",paddingBlock:12,radius:4,children:[i,V.jsx(QN,{open:n,onOpenChange:a,onMediaSelected:o,assetType:"image"})]})});function QQ(e){let{contentView:t,croppedImage:n}=e,{width:r,height:i,x:o,y:a,zoom:u}=n,s=function(e){let{origin:t,croppedImage:n}=e,{x:r,y:i,width:o,height:a,cropHeight:u,cropWidth:s}=n,l=new URL(t.url),c=t.height!==a||t.width!==o;if(0!==r||0!==i||u!==t.height||s!==t.width){let e=[r,i,s,u].map(Math.round).join(",");l.searchParams.set("rect",e),l.searchParams.set("w",o.toString()),l.searchParams.set("h",a.toString())}return c&&(l.searchParams.set("w",o.toString()),l.searchParams.set("h",a.toString())),l.toString()}({origin:t.origin,croppedImage:n});return{...t,width:r,height:i,url:s,edit:{...t.edit,zoom:u,crop:{x:o,y:a}}}}function QV(e){let{content:t,croppedImage:n}=e,r=QQ({contentView:t,croppedImage:n});return r.url===t.url?t:{...t,...r}}function Qz(e){let{selectedImage:t,imageCrop:n,setImageCrop:r}=e,{width:i,height:o,zoom:a,cropHeight:u,cropWidth:s}=n,l=t.contentView,c={x:n.x,y:n.y,width:s,height:u},[d,f]=(0,C.useState)(),p=(null==l?void 0:l.origin.url)??"",A=!(null!=t&&t.thumbnail.height&&null!=t&&t.thumbnail.width);function h(e,t){let i=parseInt(t);isNaN(i)||i<=0||!A||r({...n,[e]:i})}function m(e){r({...n,zoom:e})}return V.jsxs(S.xu,{padding:{inline:24,block:16},flexDirection:"column",gap:16,height:"100%",overflowY:"auto",alignItems:"center",children:[V.jsxs(S.xu,{gap:8,height:32,alignItems:"flex-start",width:"100%",children:[V.jsx(S.u,{content:"Center",children:V.jsx(S.zx,{color:"grey",size:"medium",startIcon:"centerFocusWeak",onClick:function(){f(QY),r({...n,...QY})}})}),V.jsx(S.u,{content:"Cover",children:V.jsx(S.zx,{color:"grey",size:"medium",startIcon:"zoomOutMap",onClick:function(){l&&(f(QY),r({...n,...QY,zoom:1,cropWidth:l.width,cropHeight:l.height}))}})}),V.jsx(S.Z0,{orientation:"vertical"}),V.jsx(S.yt,{prefix:"W",prefixTooltip:"Width",placeholder:"width",type:"number",size:"medium",value:String(i),onValueChange:e=>h("width",e),sx:{width:100},disabled:!A}),V.jsx(S.yt,{prefix:"H",prefixTooltip:"Height",placeholder:"height",type:"number",size:"medium",value:String(o),onValueChange:e=>h("height",e),sx:{width:100},disabled:!A})]}),V.jsx(S.fl,{image:p,aspect:i/o,crop:d??{x:0,y:0},onCropChange:f,zoom:a,onZoomChange:m,onCropAreaChange:(e,t)=>{r({...n,cropWidth:t.width,cropHeight:t.height,x:t.x,y:t.y})},initialCroppedAreaPixels:c}),V.jsx(S.xu,{width:"100%",maxWidth:320,children:V.jsx(S.iR,{min:1,max:3,step:.01,value:[a],onValueChange:([e])=>m(e??1)})})]})}let QY={x:0,y:0};function QH(e){let{trigger:t,initialImages:n,renderTooltip:r}=e,{open:i,onOpenChange:o,ready:a,option:u,selectedImage:s,croppedImage:l,setCroppedImage:c,setReady:d,setOption:f}=function(e){let{initialImages:t,initialOption:n,onClose:r}=e,[i,o]=(0,C.useState)(A),[a,u]=(0,C.useState)(!1),[s,l]=(0,C.useState)(!1),[c,d]=(0,C.useState)(n),f=t[c],p=i[(null==f?void 0:f.thumbnail.name)??""];function A(){return t.reduce((e,t)=>(t.contentView&&(e[t.thumbnail.name]=function(e){let t,n;let{edit:{crop:{x:r,y:i},zoom:o},width:a,height:u,origin:{width:s,height:l}}=e,c=a/u;return c>=s/l?n=(t=s/o)/c:t=(n=l/o)*c,{x:r,y:i,width:a,height:u,zoom:o,cropWidth:t,cropHeight:n}}(t.contentView)),e),{})}return{open:a,ready:s,option:c,selectedImage:f,croppedImage:p,setCroppedImage:function(e){if(!f)return;let t=f.thumbnail.name;o({...i,[t]:e})},setReady:l,setOption:d,onClose:r,onOpenChange:function(e){e?(d(n),o(A())):(l(!1),r({option:c,croppedImages:i})),u(e)}}}(e);return V.jsxs(S.Vq,{trigger:t,onAnimationEnd:()=>d(!0),open:i,onOpenChange:o,renderTooltip:r,children:[V.jsx(S.fK,{icon:"photo",title:"Image editor"}),V.jsx(S.Zp,{value:String(u),onValueChange:e=>f(Number(e)),children:n.map((e,t)=>V.jsx(S.T9,{value:String(t),icon:"photo",title:e.labels[0]??"Main",subtitle:e.labels[1]??""},e.thumbnail.name))}),s&&V.jsx(S.cZ,{children:a&&l&&V.jsx(Qz,{selectedImage:s,imageCrop:l,setImageCrop:c},s.thumbnail.name)})]})}function QG(e){let{readOnly:t,altText:n,selected:r,onValueChange:i}=e,o=(0,C.useId)();return V.jsxs(S.gN,{selected:r,children:[V.jsx(S.Qy,{htmlFor:o,children:"Alt text"}),V.jsx(S.JO,{children:V.jsx(S.xu,{flexGrow:1,height:40,children:V.jsx(Qy,{id:o,placeholder:"Short description for the visually impaired",readOnly:t,value:n,padding:{input:{inline:12}},onValueChange:i})})})]})}function QZ(e){let{fieldLabel:t,imageLabel:n,initialImages:r,page:i,displaySeparator:o=!0,isSVGContentView:a,visibility:u,onClear:s,onCropperDialogClose:l,onMediaDialogOpenChange:c}=e;return V.jsxs(S.xu,{display:"flex",flexDirection:"column",gap:12,children:[V.jsxs(S.xu,{display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:4,children:[V.jsx(QF,{fieldLabel:t,imageLabel:n}),V.jsxs(S.Pf,{sx:{visibility:u},children:[V.jsx(QH,{trigger:V.jsx(S.zx,{startIcon:"crop",disabled:a,hiddenLabel:"Crop & Resize"}),renderTooltip:e=>V.jsx(S.u,{content:"Crop & Resize",children:e}),initialImages:r,initialOption:i,onClose:l}),V.jsx(S.u,{content:"Replace",children:V.jsx(S.zx,{startIcon:"imageSearch",hiddenLabel:"Replace",onClick:()=>c(!0)})}),V.jsx(S.u,{content:"Clear",children:V.jsx(S.zx,{onClick:s,startIcon:"delete",hiddenLabel:"Clear"})})]})]}),o&&V.jsx(S.Z0,{style:"dashed",decorative:!0})]})}function QJ(e){let{description:t,largeIconName:n="public",loading:r,error:i,onEdit:o,onUnlink:a}=e,u=i?V.jsx(Q2,{}):V.jsx(Q1,{...e,largeIconName:n,loading:r});return V.jsx(S.Zb,{sx:{width:420},children:V.jsxs(S.aY,{gap:12,children:[V.jsxs(S.xu,{display:"grid",gridTemplateColumns:"max-content 1fr min-content",gridTemplateRows:"1fr",gap:8,children:[u,V.jsxs(S.hE,{size:"medium",color:"grey",sx:{justifySelf:"end"},children:[o&&V.jsx(S.zx,{startIcon:"edit",onClick:o}),a&&V.jsx(S.zx,{startIcon:"linkOff",onClick:a})]})]}),!i&&V.jsx(Q0,{description:t,loading:r})]})})}function Q$(e){let{url:t,title:n,loading:r}=e;return r?V.jsx(Q6,{height:16,width:80}):n?V.jsx(S.xv,{variant:"smallBold",href:null==t?void 0:t.toString(),children:n}):null}function QX(e){let{subTitle:t,loading:n}=e;return n?V.jsx(S.xu,{padding:{block:2},children:V.jsx(Q6,{height:12,width:60})}):t?V.jsx(S.xv,{variant:"small",color:"grey11",noWrap:!0,children:t}):null}function Q0(e){let{description:t,loading:n}=e;return!t||n?null:V.jsx(S.xv,{variant:"small",color:"grey11",children:t})}function Q1(e){let{largeIconName:t,title:n,url:r,loading:i,subTitle:o}=e;return V.jsxs(V.Fragment,{children:[V.jsx(S.pI,{largeIconName:t,smallIconName:"link"}),V.jsxs(S.xu,{flexDirection:"column",minWidth:0,children:[V.jsx(Q$,{title:n,url:r,loading:i}),V.jsx(QX,{subTitle:o,loading:i})]})]})}function Q2(){return V.jsxs(S.xu,{alignItems:"center",gap:8,children:[V.jsx(S.J$,{name:"alert",color:"tomato",size:"small"}),V.jsx(S.xv,{color:"tomato11",children:"Failed to load linked document data"})]})}function Q6(e){let{width:t,height:n}=e;return V.jsx(S.Od,{color:"grey5",borderRadius:6,width:t,height:n})}function Q5(e){let{documentType:t,documentUrl:n,title:r,statusColor:i,description:o,tags:a,tagsFilter:u,previewImageUrl:s,onSelect:l}=e;return V.jsxs(S.Zb,{paddingBlock:16,onSelect:function(e){return e.nativeEvent instanceof MouseEvent&&(e.metaKey||e.ctrlKey)?window.open(n,"_blank"):l()},children:[V.jsx(S.aY,{children:V.jsxs(S.xu,{justifyContent:"space-between",children:[V.jsxs(S.xu,{flexDirection:"column",gap:4,alignItems:"flex-start",flexGrow:1,children:[V.jsx(Q3,{documentType:t}),V.jsx(Q9,{title:r,statusColor:i}),V.jsx(Q4,{description:o})]}),V.jsx(Q8,{previewImageUrl:s})]})}),a.length>0&&V.jsx(Q7,{tags:a,tagsFilter:u})]})}function Q3(e){let{documentType:t}=e;return V.jsx(S.Ct,{maxWidth:150,size:"medium",title:`Type: ${t}`,icon:"description"})}function Q9(e){let{title:t,statusColor:n}=e;return V.jsxs(S.xu,{gap:8,alignItems:"center",children:[V.jsx(S.oT,{color:n}),V.jsx(S.xv,{variant:"bold",children:t})]})}function Q4(e){let{description:t}=e,n=null==t?void 0:t.substring(0,150);return n?V.jsx(S.xv,{variant:"small",color:"grey11",children:`${n}${n!==t?"...":""}`}):V.jsx(S.xv,{variant:"smallItalic",color:"grey11",children:"No description available"})}function Q8(e){let{previewImageUrl:t}=e;return V.jsx(S.xu,{width:142,height:90,backgroundColor:"grey2",border:!0,borderRadius:6,flexDirection:"column",alignItems:"center",justifyContent:"center",gap:4,flexShrink:0,padding:8,children:t?V.jsx(S.Ee,{src:t,sizing:"cover"}):V.jsxs(V.Fragment,{children:[V.jsx(S.I5,{name:"hideImage",size:"large",color:"grey11"}),V.jsx(S.xv,{color:"grey11",variant:"small",children:"No preview available"})]})})}function Q7(e){let{tags:t}=e;return V.jsxs(S.eW,{children:[V.jsxs(S.xu,{gap:4,alignItems:"center",children:[V.jsx(S.I5,{name:"label",size:"small",color:"grey11"}),V.jsx(S.xv,{variant:"small",color:"grey11",children:"Tags:"})]}),V.jsx(S.lG,{children:t.map(e=>V.jsx(S.Ct,{size:"medium",title:e,sx:{marginRight:8}},e))})]})}async function Ve(e,t,n,r,i,o){let a=WA[i];if(!o)return Vt((await function(e,t,n,r,i){let o=new URL("documents",e);return o.searchParams.set("limit","200"),o.search+=`&${n}`,(0,j.WY)(o,{credentials:(0,j.xb)(t),okType:Nf})}(e,n,r,0)).results,a);let u=await function(e,t,n,r){let i=new URL(e);return i.search=n,(0,j.WY)(i,{credentials:(0,j.xb)(t),okType:NA})}(t,n,r);return Vt(await Ng(e,n,u.results),a)}function Vt(e,t){return{results:e.flatMap(e=>{let n=e.versions.filter(e=>t.includes(e.status));return 0===n.length?[]:{...e,versions:n}})}}function Vn(){let e=WI();e.searchDocuments||WT("searchDocuments");let{coreApiBaseUrl:t,authStrategy:n}=e;return new Set((0,R.QT)(Nw,[t,n]).languages.map(e=>({id:e.id,label:e.name})))}function Vr(){let e=WI();e.searchDocuments||WT("searchDocuments");let{coreApiBaseUrl:t,authStrategy:n}=e;return new Set((0,R.QT)(N_,[t,n]).results.map(e=>({id:e,label:e})))}function Vi(){let e=WI();e.searchDocuments||WT("searchDocuments");let{customTypesApiBaseUrl:t,repository:n,authStrategy:r}=e;return new Set((0,R.QT)(Nu,[t,n,r]))}function Vo(e){return e?(0,U.UI)(e,e=>({id:e,label:e})):new Set}function Va(e){let{filteredLocales:t,setFilteredLocales:n,filteredTags:r,setFilteredTags:i,filteredCustomTypes:o,setFilteredCustomTypes:a,fixedTags:u,fixedCustomTypes:s}=e;return V.jsxs(V.Fragment,{children:[V.jsx(Vl,{selectedValues:t,onSelectedValuesChange:n}),V.jsx(Vu,{selectedValues:r,fixedSelectedValues:Vo(u),onSelectedValuesChange:i,label:"Tags",icon:"label",fetchFilters:Vr}),V.jsx(Vu,{selectedValues:o,fixedSelectedValues:Vo(s),onSelectedValuesChange:a,label:"Type",icon:"description",fetchFilters:Vi})]})}function Vu(e){let[t,n]=(0,C.useState)(!1),r=(0,C.useRef)(null);return V.jsx(S.SV,{ref:r,renderError:()=>{var i;return V.jsx(S.R0,{mode:"error",onErrorRetry:null==(i=r.current)?void 0:i.reset,open:t,setOpen:n,values:new Set,...e})},children:V.jsx(C.Suspense,{fallback:V.jsx(S.R0,{mode:"loading",open:t,setOpen:n,values:new Set,...e}),children:V.jsx(Vs,{open:t,setOpen:n,...e})})})}function Vs(e){let{open:t,setOpen:n,onSelectedValuesChange:r,fixedSelectedValues:i,selectedValues:o,label:a,icon:u,fetchFilters:s,multiple:l}=e,c=s();return V.jsx(S.R0,{open:t,setOpen:n,label:a,icon:u,selectedValues:o,values:new Set(c),fixedSelectedValues:i,onSelectedValuesChange:r,multiple:l})}function Vl(e){let{selectedValues:t,onSelectedValuesChange:n}=e,[r,i]=(0,C.useState)((0,U.Ps)(t)),o=(0,U.sE)(Vn(),e=>{var n;return e.id===(null==(n=(0,U.Ps)(t))?void 0:n.id)});return(null==o?void 0:o.label)!==(null==r?void 0:r.label)&&i(o),V.jsx(Vu,{selectedValues:new Set(r?[r]:[]),onSelectedValuesChange:function(e){n(e),i((0,U.Ps)(e))},label:"Locale",icon:"public",fetchFilters:Vn,multiple:!1})}function Vc(e){let{onSelectDocument:t,fixedCustomTypes:n,fixedTags:r,...i}=e,o=WI(),{searchTerm:a,filteredTags:u,setFilteredTags:s,filteredCustomTypes:l,setFilteredCustomTypes:c,filteredLocales:d,setFilteredLocales:f,typesFilter:p,tagsFilter:A}=function(e,t){let n=WI(),r=(0,_.$P)({initialState:""}),[i,o]=(0,C.useState)(new Set),[a,u]=(0,C.useState)(new Set),[s,l]=(0,C.useState)(function(){return n.searchDocuments&&n.localeId?new Set([{id:n.localeId,label:n.localeId}]):new Set}),c=(0,U.G0)(a,Vo(e)),d=(0,U.G0)(i,Vo(t));return{searchTerm:r,filteredTags:i,setFilteredTags:o,filteredCustomTypes:a,setFilteredCustomTypes:u,filteredLocales:s,setFilteredLocales:l,typesFilter:c,tagsFilter:d}}(n,r),[h,m]=(0,C.useTransition)();return V.jsx(S.Vq,{size:{height:727,width:656},hasClose:!1,...i,children:V.jsx(S.cZ,{children:V.jsxs(S.xu,{flexDirection:"column",height:"100%",children:[V.jsxs(S.xu,{padding:{top:16,inline:16,bottom:8},flexDirection:"column",gap:12,children:[V.jsx(S.yt,{value:a.value,onValueChange:a.set,placeholder:"Search a page",icon:"search"}),o.searchDocuments&&V.jsx(Va,{filteredTags:u,setFilteredTags:s,filteredCustomTypes:l,setFilteredCustomTypes:c,filteredLocales:d,setFilteredLocales:f,fixedTags:r,fixedCustomTypes:n}),V.jsx(S.xv,{variant:"smallBold",color:"grey11",children:"Link to a document"})]}),o.searchDocuments?V.jsx(S.SV,{renderError:Vd,children:V.jsx(C.Suspense,{fallback:V.jsx(VA,{}),children:V.jsx(Vf,{searchTerm:a.debouncedValue,tagsFilter:A,typesFilter:p,localesFilter:d,startTransition:m,isLoadingDocuments:h,onSelectDocument:t})})}):V.jsx(Vp,{message:"Slice Machine does not yet support mock data for linked documents in the simulator."})]})})})}function Vd(){return V.jsx(S.xu,{height:"100%",flexDirection:"column",alignItems:"center",justifyContent:"center",children:V.jsx(S.Iq,{title:"Request failed",description:"An error occurred while fetching documents.",errorImageSrc:S.Os})})}function Vf(e){let{searchTerm:t,tagsFilter:n,typesFilter:r,localesFilter:i,isLoadingDocuments:o,onSelectDocument:a}=e,{documents:u}=function(e){var t,n,r;let{searchTerm:i,tagsFilter:o,typesFilter:a,localesFilter:u}=e,s=WI();s.searchDocuments||WT("searchDocuments");let{coreApiBaseUrl:l,documentSearchBaseUrl:c,authStrategy:d,status:f,repository:p}=s,{storageVersion:A}=(0,R.QT)(Nw,[l,d]),h=A.major>=7,[m,g]=(0,C.useState)([]),[y,v]=(0,C.useState)(""),x=h?function(e){let{repository:t,searchTerm:n,tags:r,localeId:i,customTypesIds:o}=e,a=new URLSearchParams;return a.append("repository",t),n&&a.append("searchTerm",n),null!=r&&r.length&&a.append("tags",r.toString()),i&&a.append("localeId",i),null!=o&&o.length&&a.append("customTypesIds",o.toString()),a.toString()}({repository:p,searchTerm:i,customTypesIds:[...(0,U.UI)(a,e=>e.id)],tags:[...(0,U.UI)(o,e=>e.id)],localeId:[...(0,U.UI)(u,e=>e.id)][0]}):(r={tags:[...(0,U.UI)(o,e=>e.id)],customTypes:[...(0,U.UI)(a,e=>e.id)],language:[...(0,U.UI)(u,e=>e.id)],term:[i]},new URLSearchParams(Nh((0,I.XP)(r).flatMap(e=>{let t=r[e];return t?{name:e,values:t}:[]}))).toString()),b=(0,R.QT)(Ve,[l,c,d,x,f,h]);return x!==y?(v(x),g(b.results)):b.results.length>0&&(null==(t=(0,E.Z$)(m))?void 0:t.id)!==(null==(n=(0,E.Z$)(b.results))?void 0:n.id)&&g(e=>e.concat(b.results)),{documents:m,response:b}}({searchTerm:t,tagsFilter:n,localesFilter:i,typesFilter:r}),s=WI();return V.jsxs(S.xr,{style:{flexGrow:1,paddingTop:S.rS.space[10],paddingBottom:S.rS.space[16],paddingInline:S.rS.space[16],display:"flex",flexDirection:"column",gap:S.rS.space[12]},children:[0===u.length&&V.jsx(Vp,{}),u.map(e=>{let t=e.versions[0];if(!t)return null;let r=Wh({documentId:e.id,versionId:"archived"===t.status?t.version_id:void 0,releaseId:"release"===t.status?t.release_id:void 0,status:t.status,baseUrl:s.baseUrl}),i=function(e){let{tags:t,tagsFilter:n}=e,r=[...n].map(e=>e.label).reverse();return(0,E.DY)(t,e=>-r.indexOf(e))}({tags:t.tags,tagsFilter:n});return V.jsx(Q5,{documentType:t.custom_type_label,documentUrl:r,description:t.preview_summary,tags:i,title:e.title,previewImageUrl:t.preview_image,onSelect:()=>a(e.id),statusColor:Wp[t.status].color},`${e.id}-${t.status}`)}),V.jsx(S.Fp,{animation:{name:"fade"},children:o&&V.jsx(S.xv,{color:"grey11",align:"center",sx:{marginBlock:8},children:"Loading more results ..."})})]})}function Vp(e){let{message:t="We can't find any versions matching this request"}=e;return V.jsx(S.xu,{justifyContent:"center",flexDirection:"column",height:"100%",children:V.jsxs(S.R$,{children:[V.jsx(S.av,{name:"close",lineColor:"purple10",backgroundColor:"purple3",borderColor:"purple6",borderStyle:"dashed",size:"xlarge"}),V.jsx(S._T,{size:"big",children:"Oops!"}),V.jsx(S.nf,{width:360,children:t})]})})}function VA(){return V.jsx(S.xu,{flexDirection:"column",gap:12,padding:{top:10,inline:16,bottom:16},children:(0,E.w6)(1,5).map(e=>V.jsx(S.Od,{height:150},e))})}function Vh(e){let{hasLink:t,onUnlink:n,selectEnabled:r,selectedType:i,value:o,onOpenLinkModal:a,onValueChange:u,openInNewTab:s=!0,condensedButtons:l=!1,showNewTabButton:c=!1,displayTextEnabled:d}=e;return V.jsxs(V.Fragment,{children:[!d&&c&&s&&V.jsx(S.Ct,{title:"Open in a new tab",color:"indigo",size:"small",icon:"openInNew",onClick:a}),!t&&r&&V.jsxs(S.Ph,{value:"any"===i?void 0:i,color:"grey",size:"small",boldTriggerText:!0,position:"popper",sideOffset:4,startIcon:Vj({selectType:i}),disabled:!r,onValueChange:u,placeholder:l?"":Vm("any"),onlyStartIcon:l&&void 0!==i,renderTrigger:({button:e})=>V.jsx(S.u,{content:Vm(i),visible:l,children:e}),children:[V.jsx(S.Ql,{value:"web",icon:"public",children:Vm("web")}),V.jsx(S.Ql,{value:"document",icon:"description",children:Vm("document")}),V.jsx(S.Ql,{value:"media",icon:"image",children:Vm("media")})]},void 0===i?"unlinked":"linked"),!t&&!r&&V.jsx(S.zx,{startIcon:Vj({selectType:i}),color:"grey",textColor:"link",textWeight:"normal",size:"small",onClick:a,children:Vm(i)}),t&&!d&&V.jsx(S.zx,{startIcon:"close",color:"grey",size:"small",onClick:n,"aria-label":"Close"}),t&&d&&V.jsxs(S.hE,{density:"compact",children:[V.jsx(S.zx,{startIcon:Vj({selectType:i}),renderEndIcon:()=>s&&"web"===i?V.jsx(S.I5,{name:"openInNew",size:"extraSmall",color:"indigo11"}):null,color:"grey",textColor:"link",textWeight:"normal",size:"small",disabled:!t,onClick:a,children:o.length>30?`${o.slice(0,30)}...`:o}),V.jsx(S.zx,{startIcon:"close",color:"grey",size:"small",onClick:n})]})]})}function Vm(e){if(!e||"any"===e)return"Choose link type";switch(e){case"document":return"Link to Prismic page";case"web":return"Link to web page";case"media":return"Link to media"}}function Vg(e){let{onEdit:t,onUnlink:n,url:r,title:i,subTitle:o}=e;return V.jsx(S.Zb,{paddingBlock:16,children:V.jsxs(S.aY,{sx:{width:433},children:[V.jsx(Vv,{url:r,title:i,subTitle:o,onEdit:t,onUnlink:n}),r&&V.jsx(S.hM,{children:V.jsx(Vy,{children:V.jsx(S.Ee,{src:r,alt:i,sizing:"contain"})})})]})})}function Vy(e){let{children:t}=e;return V.jsx(S.xu,{flexDirection:"column",alignItems:"center",justifyContent:"center",position:"relative",height:327,children:t})}function Vv(e){let{url:t,title:n,subTitle:r,onEdit:i,onUnlink:o}=e;return V.jsxs(S.xu,{flexDirection:"row",justifyContent:"space-between",gap:8,children:[V.jsxs(S.xu,{gap:8,minWidth:0,children:[V.jsx(S.pI,{largeIconName:"image",smallIconName:"link"}),V.jsxs(S.xu,{flexDirection:"column",minWidth:0,children:[V.jsx(S.xv,{noWrap:!0,variant:"smallBold",href:t,inline:!0,children:n}),V.jsx(S.xv,{variant:"small",color:"grey11",children:r})]})]}),V.jsxs(S.hE,{size:"medium",color:"grey",children:[i&&V.jsx(Vx,{onEdit:i}),o&&V.jsx(Vb,{onUnlink:o})]})]})}function Vx(e){let{onEdit:t}=e;return V.jsx(S.u,{content:"Edit link",side:"top",stableMount:!0,zIndexHack:!0,children:V.jsx(S.zx,{startIcon:"edit",onClick:t})})}function Vb(e){let{onUnlink:t}=e;return V.jsx(S.u,{content:"Remove link",side:"top",stableMount:!0,zIndexHack:!0,children:V.jsx(S.zx,{startIcon:"linkOff",onClick:t})})}R.Fs.registerFetcherConfig(Ve,{cacheCapacity:500,revalidationStrategy:{type:"never"}});let VC={AnyLink:"any",DocumentLink:"document",ExternalLink:"web",FileLink:"media",ImageLink:"media",MediaLink:"media"},VS={any:"AnyLink",document:"DocumentLink",web:"ExternalLink",media:"FileLink"},Vw=DH({id:DM(),title:DM()});function VI(e,t,n){return(0,j.WY)(new URL(`documents/${n}`,e),{credentials:(0,j.xb)(t),okType:Vw})}function V_(e){var t,n,r,i,o,a;let{media:u}=e,s="kind"in u;return s&&"image"===u.kind?{__TYPE__:"LinkContent",value:{__TYPE__:"ImageLink",id:u.id,name:u.filename,url:u.url,kind:u.kind,size:u.size.toString(),height:(null==(t=u.height)?void 0:t.toString())??"2000",width:(null==(n=u.width)?void 0:n.toString())??"2000",date:(null==(r=u.last_modified)?void 0:r.toString())??""}}:s?{__TYPE__:"LinkContent",value:{__TYPE__:"FileLink",id:u.id,name:u.filename,kind:u.kind,url:u.url,size:u.size.toString(),date:(null==(i=u.last_modified)?void 0:i.toString())??""}}:{__TYPE__:"LinkContent",value:{__TYPE__:"ImageLink",id:u.id,name:(null==u?void 0:u.alt)??u.url,kind:"image",url:u.url,size:"0",height:(null==(o=u.height)?void 0:o.toString())??"2000",width:(null==(a=u.width)?void 0:a.toString())??"2000"}}}function VT(e){let{open:t,setOpen:n,showNewTabButton:r}=e,{url:i,setUrl:o,openInNewTab:a,setOpenInNewTab:u,disabled:s,onUpdate:l}=function(e){let{url:t,openInNewTab:n,onUpdate:r,open:i,setOpen:o}=e,[a,u]=(0,C.useState)(t),[s,l]=(0,C.useState)(n);(0,_.pQ)(i,()=>{i&&(u(t),l(n))});let c=!a||a===t&&s===n;return{url:a,setUrl:u,openInNewTab:s,disabled:c,setOpenInNewTab:l,onUpdate:function(){r(a,s),o(!1)}}}(e);return V.jsxs(S.Vq,{open:t,onOpenChange:n,size:"small",children:[V.jsx(S.fK,{title:"Set Link URL"}),V.jsxs(S.cZ,{padding:16,children:[V.jsx(S.yt,{value:i,onValueChange:o,placeholder:"Paste URL",icon:"public"}),r&&V.jsx(S.W4,{value:"Open in a new tab",children:V.jsx(S.XZ,{checked:a,onCheckedChange:u})})]}),V.jsxs(S.kX,{children:[V.jsx(S.PO,{}),V.jsx(S._d,{onClick:l,disabled:s,children:"Update"})]})]})}function Vk(e){var t,n,r,i;let{content:o,field:a,id:u,onContentChange:s,condensedButtons:l=!1}=e,[c,d]=(0,C.useState)(!1),[f,p]=(0,C.useState)(!1),[A,h]=(0,C.useState)(),{contentType:m,fieldValue:g,errorBoundaryRef:y,onDocumentSelected:v,onError:x,onMediaSelected:b,onValueChange:I,selectType:T,onTypeChange:k,isTypeSelectEnabled:O,displayTextEnabled:R,...E}=function(e){var t,n;let{field:r,content:i,onContentChange:o}=e,a=i?z.FilledDocumentLinkContent.is(i.value)?i.value.id:z.FilledExternalLinkContent.is(i.value)?i.value.url:z.FilledFileLinkContent.is(i.value)||z.FilledImageLinkContent.is(i.value)?i.value.name:"":"",u=(null==(t=r.config)?void 0:t.allowText)??!1,s=u&&(null==i?void 0:i.value.text)||void 0,[l,c]=(0,C.useState)(function(){var e,t;return!(null!=(e=r.config)&&e.select)||null!=i&&i.value.__TYPE__?null==i?void 0:i.value.__TYPE__:VS[null==(t=r.config)?void 0:t.select]}),d=z.FilledExternalLinkContent.is(null==i?void 0:i.value)&&(null==i?void 0:i.value.target)||void 0,[f,p]=(0,C.useState)(!1),A=(0,C.useRef)(null);(0,_.pQ)(a,function(){var e;f&&(p(!1),null==(e=A.current)||e.reset())});let h=l?VC[l]:void 0;function m(e){var t;if(!e)return o(void 0);switch(null==(t=r.config)?void 0:t.select){case"web":return o({__TYPE__:"LinkContent",value:{__TYPE__:"ExternalLink",kind:"web",text:e}});case"document":return o({__TYPE__:"LinkContent",value:{__TYPE__:"DocumentLink",kind:"document",text:e}});case"media":return o({__TYPE__:"LinkContent",value:{__TYPE__:"MediaLink",kind:"media",text:e}});default:return o({__TYPE__:"LinkContent",value:{__TYPE__:"AnyLink",text:e}})}}function g(e,t){if(!e)return m(s);switch(l){case"ExternalLink":return o({__TYPE__:"LinkContent",value:{__TYPE__:"ExternalLink",url:e,target:t?"_blank":void 0,text:s}});case"DocumentLink":return o({__TYPE__:"LinkContent",value:{__TYPE__:"DocumentLink",id:e,text:s}});default:return o(void 0)}}return{contentType:l,selectType:h,fieldValue:a,onDisplayTextChange:function(e){return i?o({__TYPE__:i.__TYPE__,value:{...i.value,text:e}}):m(e)},onValueChange:g,onTypeChange:function(e){c(e?VS[e]:void 0),g("")},placeholder:QA(r),isTypeSelectEnabled:!(null!=(n=r.config)&&n.select),onDocumentSelected:function(e){g(e)},onError:function(){p(!0)},errorBoundaryRef:A,isTargetNewTab:"_blank"===d,onMediaSelected:function(e){let t=V_({media:e});switch(t.value.__TYPE__){case"ImageLink":case"FileLink":return o({__TYPE__:t.__TYPE__,value:{...t.value,text:s}})}},displayTextEnabled:u,displayText:s??""}}({content:o,field:a,onContentChange:s});(0,_.pQ)(A,()=>{void 0===T||A||g||!O||k(void 0)});let j="DocumentLink"===m&&""!==g,F="ExternalLink"===m&&(0,w.ju)(g),M=!!(null!=(t=a.config)&&t.allowTargetBlank),U={...E,id:u,onBlur:()=>d(!1),onFocus:()=>{d(!0)},onOpenLinkModal:()=>{switch(d(!0),m){case"DocumentLink":return h("document");case"ExternalLink":return h("web");case"FileLink":case"ImageLink":case"MediaLink":return h("media");default:return h(void 0)}},onUnlink:()=>{O?k(void 0):I("")},onSelectValueChange:e=>{k(e),h(e)},value:g,condensedButtons:l,allowTargetBlank:M,selectType:T,onValueChange:I,isTypeSelectEnabled:O,displayTextEnabled:R},{searchDocuments:L}=WI();return V.jsxs(V.Fragment,{children:[V.jsxs(S.J2,{onMouseOverChange:p,open:c||f,align:"start",sideOffset:-3,openDelay:100,closeDelay:200,focusOnEnter:!1,anchor:V.jsxs(S.gN,{onMouseOverChange:d,children:[V.jsx(S.fw,{name:Vj({selectType:T,displayTextEnabled:R})}),V.jsx(S.Qy,{htmlFor:u,children:Qp(a)}),V.jsx(S.JO,{children:j&&L?V.jsx(VE,{errorBoundaryRef:y,onError:x,fallback:V.jsx(VO,{...U,value:"..."}),renderError:()=>V.jsx(VO,{...U}),children:V.jsx(VR,{...U,documentId:g})}):V.jsx(VO,{...U})})]}),children:[F&&V.jsx(QJ,{url:F,title:(0,w.S$)(F)??"",subTitle:F.toString()}),o&&z.FilledImageLinkContent.is(o.value)&&V.jsx(Vg,{url:o.value.url,title:o.value.name,subTitle:`${o.value.width} x ${o.value.height} pixels`})]}),V.jsx(VT,{open:"web"===A,setOpen:e=>h(e?"web":void 0),url:g,openInNewTab:E.isTargetNewTab,showNewTabButton:!!(null!=(n=a.config)&&n.allowTargetBlank),onUpdate:(e,t)=>I(e,t)}),V.jsx(QN,{open:"media"===A,onOpenChange:e=>h(e?"media":void 0),onMediaSelected:b,assetType:"all"}),V.jsx(Vc,{open:"document"===A,onOpenChange:e=>h(e?"document":void 0),onSelectDocument:e=>{h(void 0),v(e)},fixedCustomTypes:new Set(null==(r=a.config)?void 0:r.customtypes),fixedTags:new Set(null==(i=a.config)?void 0:i.tags)})]})}function VO(e){let{id:t,value:n,onOpenLinkModal:r,onBlur:i,isTypeSelectEnabled:o,selectType:a,onSelectValueChange:u,onUnlink:s,isTargetNewTab:l,condensedButtons:c,allowTargetBlank:d,displayTextEnabled:f}=e,p={onValueChange:e.displayTextEnabled?e.onDisplayTextChange:e.onValueChange,placeholder:e.displayTextEnabled?"Add your display text":e.placeholder,readOnly:!e.displayTextEnabled,value:e.displayTextEnabled?e.displayText:e.value,variant:e.displayTextEnabled?"normal":"link",onFocus:e.displayTextEnabled?e.onFocus:e.onOpenLinkModal,cursor:VF({displayTextEnabled:e.displayTextEnabled,isTypeSelectEnabled:e.isTypeSelectEnabled,value:e.value})};return V.jsx(Qy,{id:t,...p,onBlur:i,textOverflow:"ellipsis",endAdornment:V.jsx(Vh,{hasLink:!!(n&&a),onUnlink:s,selectEnabled:o,selectedType:a,value:n,onOpenLinkModal:r,onValueChange:u,openInNewTab:l,condensedButtons:c,showNewTabButton:d&&"web"===a,displayTextEnabled:f})})}function VR(e){let{id:t,documentId:n,onOpenLinkModal:r,isTypeSelectEnabled:i,selectType:o,displayTextEnabled:a,condensedButtons:u,onSelectValueChange:s,onUnlink:l}=e,c=function(e){let t=WI();t.searchDocuments||WT("searchDocuments");let{coreApiBaseUrl:n,authStrategy:r}=t;return(0,R.QT)(VI,[n,r,e]).title}(n),d={onValueChange:e.displayTextEnabled?e.onDisplayTextChange:void 0,placeholder:e.displayTextEnabled?"Add your display text":void 0,readOnly:!e.displayTextEnabled,value:e.displayTextEnabled?e.displayText:c,variant:e.displayTextEnabled?"normal":"link",onFocus:e.displayTextEnabled?e.onFocus:e.onOpenLinkModal,cursor:VF({displayTextEnabled:e.displayTextEnabled,isTypeSelectEnabled:e.isTypeSelectEnabled,value:c})};return V.jsx(Qy,{id:t,...d,textOverflow:"ellipsis",endAdornment:V.jsx(Vh,{hasLink:!0,onUnlink:l,selectEnabled:i,selectedType:o,value:c,onOpenLinkModal:r,condensedButtons:u,onValueChange:s,displayTextEnabled:a})})}function VE(e){let{errorBoundaryRef:t,onError:n,children:r,fallback:i,renderError:o}=e;return V.jsx(S.SV,{ref:t,onError:n,renderError:o,children:V.jsx(C.Suspense,{fallback:i,children:r})})}function Vj(e){let{selectType:t,displayTextEnabled:n}=e;if(n)return"notes";switch(t){case"document":return"description";case"web":return"public";case"media":return"image";default:return"link"}}function VF(e){let{displayTextEnabled:t,isTypeSelectEnabled:n,value:r}=e;return t?"text":n&&!r?"default":"pointer"}function VM(e){let{onContentChange:t,...n}=e;return V.jsx(Vk,{...n,onContentChange:function(e){t(z.FilledLinkContent.is(e)?e:void 0)}})}function VU(e){let{linkTo:t,onLinkToChange:n}=e;return V.jsx(VM,{content:t?{__TYPE__:"LinkContent",value:t}:void 0,onContentChange:e=>n(null==e?void 0:e.value),field:{type:"Link",config:{label:"Link",allowTargetBlank:!0,allowText:!1}},condensedButtons:!0})}function VL(e){var t,n;let{allContentViews:r,content:i,contentView:o,fieldLabel:a,imageLabel:u,initialImages:s,isUpdating:l,page:c=0,readOnly:d,thumbnailName:f,onClear:p,onContentChange:A,onCropperDialogClose:h,onPageChange:m,onMediaDialogOpenChange:g}=e,y=(null==(n=null==(t=null==i?void 0:i.url)?void 0:t.split("?")[0])?void 0:n.slice(-4))===".svg",v=null!=i&&i.url&&!d?"visible":"hidden",x=!z.isImageContent(i);return V.jsxs(S.xu,{display:"flex",gap:12,padding:{inline:12},children:[V.jsx(S.xu,{children:V.jsx(S.lr,{getItemSource:qU,items:r,onPageChange:m,page:c,buttonSize:"small",renderPrevTooltip:e=>V.jsx(S.u,{content:"Previous",children:e}),renderNextTooltip:e=>V.jsx(S.u,{content:"Next",children:e}),style:x?{width:181,height:142}:{width:123,height:93},children:e=>(null==e?void 0:e.url)&&V.jsx(S.d$,{"aria-label":"Image Field Item",src:qM(e.url),alt:e.alt??void 0,isUpdating:l,disableAnimation:x},`${f}_${e.url}`)})}),V.jsxs(S.xu,{width:"100%",display:"flex",flexDirection:"column",gap:x?16:12,children:[V.jsx(QZ,{fieldLabel:a,imageLabel:u,initialImages:s,page:c,displaySeparator:!x,isSVGContentView:y,visibility:v,onClear:p,onCropperDialogClose:h,onMediaDialogOpenChange:g}),V.jsx(QG,{readOnly:d||!o,altText:(null==o?void 0:o.alt)??"",onValueChange:e=>{o&&A(function(e,t,n,r){let i=0===r.length?void 0:r;return e!==qj&&z.isImageContent(t)?{...t,thumbnails:{...t.thumbnails,[e]:{...n,alt:i}}}:{...t,alt:i}}(f,i,o,e))}}),x&&V.jsx(VU,{linkTo:i.linkTo,onLinkToChange:e=>{A({...i,linkTo:e})}})]})]})}function VK(e){let{content:t,field:n,readOnly:r,onContentChange:i}=e,o=t&&t.origin.url.length>0,{onCropperDialogClose:a,onPageChange:u,onMediaSelected:s,isUpdating:l,page:c,thumbnail:d,allThumbnails:f,allContentViews:p,contentView:A,onClear:h}=function(e){var t,n;let{content:r,onContentChange:i,field:o}=e,[a,u]=(0,C.useState)(0),[s,l]=(0,C.useTransition)(),c=[{...null==(t=o.config)?void 0:t.constraint,name:qj}].concat((null==(n=o.config)?void 0:n.thumbnails)??[]),d=c[a],f=r?function(e,t){var n,r;let{__TYPE__:i,thumbnails:o,...a}=t;return[a,...(null==(r=null==(n=e.config)?void 0:n.thumbnails)?void 0:r.map(({name:e})=>null==o?void 0:o[e]))??[]]}(o,r):void 0,p=null==f?void 0:f[a];return{onCropperDialogClose:function({option:e,croppedImages:t}){if(u(e),!r)return;let n=Object.entries(t).reduce((e,[t,n])=>(function(e){var t,n,r;let{field:i,content:o,thumbnail:a,croppedImage:u}=e;if(a===qj)return QV({content:o,croppedImage:u});let s=z.isImageContent(o),l=null==(n=null==(t=null==i?void 0:i.config)?void 0:t.thumbnails)?void 0:n.find(e=>e.name===a),c=s?null==(r=o.thumbnails)?void 0:r[a]:void 0;if(!l||!c)return o;let d=QQ({contentView:c,croppedImage:u});return d.url===c.url?o:{...o,thumbnails:s?{...o.thumbnails,[a]:d}:void 0}})({field:o,content:e,thumbnail:t,croppedImage:n}),r);n!==r&&l(()=>i(n))},onPageChange:function(e){l(()=>u(e))},onMediaSelected:function(e){if(!d)return;let t=function(e,t,n,r){var i,o,a,u,s;if(!n||e===qj){let e=null==(i=t.config)?void 0:i.thumbnails,n=e&&Object.fromEntries(e.map(e=>[e.name,qL(r,e)]));return{__TYPE__:"ImageContent",...qL(r,null==(o=t.config)?void 0:o.constraint),thumbnails:n}}let l=null==(u=null==(a=t.config)?void 0:a.thumbnails)?void 0:u.find(t=>t.name===e);if(!l)return n;let c=null==(s=n.thumbnails)?void 0:s[e],d=qL(r,l);return d.url===(null==c?void 0:c.url)?n:{...n,thumbnails:(0,I.Q8)(n.thumbnails??{},(t,n)=>n===e?d:t)}}(d.name,o,r,e);t!==r&&l(()=>i(t))},isUpdating:s,page:a,thumbnail:d,allThumbnails:c,allContentViews:f,contentView:p,onClear:function(){null==u||u(0),i(void 0)}}}({field:n,content:t,onContentChange:i}),[m,g]=(0,C.useState)(!1),y=Qp(n),v=f.map((e,n)=>{let r=null==p?void 0:p[n];return{thumbnail:e,contentView:r,labels:qF(e,t,r)}}),x=d&&o?qF(d,t,A).filter(k.$):[],b=d&&t&&o&&p;return V.jsx(Qq,{isMediaDialogOpen:m,onMediaSelected:s,onMediaDialogOpenChange:g,children:V.jsx(C.Suspense,{fallback:V.jsx("div",{style:{height:95}}),children:b?V.jsx(VL,{allContentViews:p,content:t,contentView:A,fieldLabel:y,imageLabel:x,initialImages:v,isUpdating:l,page:c,readOnly:r,thumbnailName:d.name,onClear:h,onContentChange:i,onCropperDialogClose:a,onMediaDialogOpenChange:g,onPageChange:u}):V.jsx(QM,{fieldLabel:y,isUpdating:l,readOnly:r,onMediaDialogOpenChange:g})})})}function VB(e,t,n,r,i,o=1,a=30){let u=new URL(`if/search/${r}`,e);return u.searchParams.set("searchTerm",i),u.searchParams.set("limit",a.toString()),u.searchParams.set("page",o.toString()),(0,j.WY)(u,{headers:{repository:n},credentials:(0,j.xb)(t),okType:VW})}R.Fs.registerFetcherConfig(VI,{concurrency:50});let VP=Ni.object({id:Ni.string(),title:Ni.string(),imageURL:Ni.string().optional(),description:Ni.string().optional()}),VW=Ni.object({items:Ni.array(VP),totalPages:Ni.number(),page:Ni.number()});function VD(e){let{itemId:t,catalogId:n}=e,r=WI();r.integrationFields||WT("integrationFields");let{integrationFieldsApiBaseUrl:i,repository:o,authStrategy:a}=r,u=(0,R.QT)(VN,[i,a,o,n,t]).items[0];if(!u)throw Error("Item not found");return{item:u}}function VN(e,t,n,r,i){let o=new URL(`if/read/${r}`,e);return o.searchParams.set("ids",[i].toString()),(0,j.WY)(o,{headers:{repository:n},credentials:(0,j.xb)(t),okType:Vq})}let Vq=Ni.object({items:Ni.array(VP)});function VQ(e){let{item:t,onClick:n,catalogId:r}=e;return V.jsxs(S.oU,{variant:"large",onClick:n,children:[V.jsx(VV,{src:t.imageURL??"",alt:t.title}),V.jsxs(S.Tw,{children:[V.jsx(S.Ct,{title:`Catalog: ${r}`,icon:"multipleStop",size:"medium"}),V.jsx(S.xv,{variant:"bold",color:"grey12",sx:{marginTop:4},children:t.title}),V.jsx(S.xv,{variant:"small",color:"grey11",children:t.description??t.id})]})]})}function VV(e){let{src:t,alt:n}=e;return t?V.jsx(S.Sy,{src:t,alt:n,width:76,height:76,framed:!0}):V.jsxs(S.xu,{borderRadius:6,backgroundColor:"grey2",height:76,width:76,flexDirection:"column",alignItems:"center",justifyContent:"center",border:!0,padding:{inline:4,block:8},children:[V.jsx(S.I5,{name:"hideImage",size:"large",color:"grey11"}),V.jsx(S.xv,{color:"grey11",variant:"small",noSelect:!0,align:"center",children:"No preview image"})]})}function Vz(){return V.jsxs(S.oU,{variant:"large",children:[V.jsx(S.Od,{height:76,width:76}),V.jsxs(S.Tw,{children:[V.jsx(S.Od,{height:24,width:168}),V.jsx(S.Od,{height:24,width:240,sx:{marginTop:4}}),V.jsx(S.Od,{height:16,width:144})]})]})}function VY(e){let{open:t,onOpenChange:n,catalogId:r,onSelectItem:i}=e,o=(0,_.$P)({initialState:""}),a=WI();return V.jsx(S.Vq,{open:t,onOpenChange:n,hasClose:!1,size:{width:612,height:724},children:V.jsx(S.cZ,{children:V.jsxs(S.xu,{flexDirection:"column",height:"100%",children:[V.jsxs(S.xu,{padding:{top:16,inline:16},flexDirection:"column",gap:8,children:[V.jsx(S.CR,{value:o.value,onValueChange:o.set,placeholder:"Search in your catalog"}),V.jsx(S.xv,{variant:"smallBold",color:"grey11",children:"Select an item"})]}),a.integrationFields?V.jsx(S.SV,{renderError:()=>V.jsx(VG,{message:"There was an error while fetching your catalog items."}),children:V.jsx(C.Suspense,{fallback:V.jsxs(S.xu,{flexDirection:"column",gap:12,padding:{top:10,inline:16,bottom:16},children:[V.jsx(Vz,{}),V.jsx(Vz,{}),V.jsx(Vz,{}),V.jsx(Vz,{}),V.jsx(Vz,{})]}),children:V.jsx(VH,{searchTerm:o.debouncedValue,catalogId:r,onItemClick:i})})}):V.jsx(VG,{message:"Slice Machine does not yet support mock data for integration field in the simulator."})]})})})}function VH(e){let{catalogId:t,searchTerm:n,onItemClick:r}=e,[i,o]=(0,C.useTransition)(),{items:a,hasNextPage:u,fetchNextPage:s}=function(e){var t,n;let{searchTerm:r,catalogId:i}=e,o=WI();o.integrationFields||WT("integrationFields");let{integrationFieldsApiBaseUrl:a,repository:u,authStrategy:s}=o,[l,c]=(0,C.useState)(1),[d,f]=(0,C.useState)([]),[p,A]=(0,C.useState)(""),h=(0,R.QT)(VB,[a,s,u,i,r,r===p?l:1]);r!==p?(A(r),c(1),f(h.items)):h.items.length>0&&(null==(t=(0,E.Z$)(d))?void 0:t.id)!==(null==(n=(0,E.Z$)(h.items))?void 0:n.id)&&f(e=>e.concat(h.items));let m=l<h.totalPages;return{items:d,response:h,fetchNextPage:function(){m&&c(e=>e+1)},hasNextPage:m}}({catalogId:t,searchTerm:n});return V.jsx(V.Fragment,{children:V.jsxs(S.xr,{onScrollToBottom:()=>u&&o(s),style:{flexGrow:1,paddingTop:S.rS.space[10],paddingBottom:S.rS.space[16],paddingInline:S.rS.space[16],display:"flex",flexDirection:"column",gap:S.rS.space[12]},threshold:252,children:[0===a.length?V.jsx(VG,{}):a.map(e=>V.jsx(VQ,{item:e,catalogId:t,onClick:()=>r(e)},e.id)),V.jsx(S.Fp,{animation:{name:"fade"},children:i&&V.jsx(S.xv,{color:"grey11",align:"center",sx:{marginBlock:8},children:"Loading more results ..."})})]})})}function VG(e){let{message:t="We can't find any items matching your search"}=e;return V.jsx(S.xu,{justifyContent:"center",flexDirection:"column",height:"100%",children:V.jsxs(S.R$,{children:[V.jsx(S.av,{name:"close",lineColor:"purple10",backgroundColor:"purple3",borderColor:"purple6",borderStyle:"dashed",size:"xlarge"}),V.jsx(S._T,{size:"big",children:"Oops!"}),V.jsx(S.nf,{width:360,children:t})]})})}function VZ(e){let{itemId:t,item:n}=e,r=WI();return t&&n&&n.id===t?V.jsx(VX,{...e,value:n.title}):t&&r.integrationFields?V.jsx(S.SV,{renderError:()=>V.jsx(VX,{...e,value:t}),children:V.jsx(C.Suspense,{fallback:V.jsx(VX,{...e,value:t}),children:V.jsx(V0,{...e,itemId:t})},t)},t):t&&!r.integrationFields?V.jsx(VX,{...e,value:t}):V.jsx(VX,{...e,value:""})}function VJ(e){let{catalogId:t,itemId:n,item:r}=e,i=WI();return n&&r&&r.id===n?V.jsx(S.mS,{children:V.jsx(VQ,{catalogId:t,item:r})}):n&&i.integrationFields?V.jsx(S.SV,{renderError:()=>null,children:V.jsx(S.mS,{children:V.jsx(C.Suspense,{fallback:V.jsx(Vz,{}),children:V.jsx(V$,{catalogId:t,itemId:n})},n)})},n):null}function V$(e){let{itemId:t,catalogId:n}=e,{item:r}=VD({catalogId:n,itemId:t});return V.jsx(VQ,{catalogId:n,item:r})}function VX(e){let{id:t,field:n,readOnly:r,value:i,onFocus:o,onClearItem:a}=e;return V.jsx(Qy,{id:t,placeholder:QA(n),readOnly:!0,variant:"link",value:i,...!r&&{cursor:"pointer",onFocus:o},endAdornment:V.jsx(S.zx,{startIcon:"close",color:"grey",size:"small",disabled:!i,onClick:a})})}function V0(e){let{itemId:t,catalogId:n}=e,{item:r}=VD({catalogId:n,itemId:t});return V.jsx(VX,{...e,value:r.title})}function V1(e){var t;let{id:n,field:r,content:i,readOnly:o,onContentChange:a}=e,[u,s]=(0,C.useState)(!1),[l,c]=(0,C.useState)(),d=null==(t=r.config)?void 0:t.catalog;return d?V.jsxs(V.Fragment,{children:[V.jsxs(S.gN,{footer:V.jsx(VJ,{catalogId:d,item:l,itemId:null==i?void 0:i.value}),children:[V.jsx(S.fw,{name:"multipleStop"}),V.jsx(S.Qy,{htmlFor:n,children:Qp(r)}),V.jsx(S.JO,{children:V.jsx(VZ,{id:n,field:r,readOnly:o,catalogId:d,item:l,itemId:null==i?void 0:i.value,onFocus:()=>s(!0),onClearItem:function(){a(void 0),c(void 0)}})})]}),V.jsx(VY,{open:u,onOpenChange:s,catalogId:d,onSelectItem:function(e){a({value:e.id,__TYPE__:"IntegrationFieldsContent"}),c(e),s(!1)}})]}):null}function V2(e){let{content:t,field:n,id:r,onContentChange:i,readOnly:o}=e;return V.jsxs(S.gN,{children:[V.jsx(S.fw,{name:"notes"}),V.jsx(S.Qy,{htmlFor:r,children:Qp(n)}),V.jsx(S.JO,{children:V.jsx(S.Kx,{id:r,placeholder:QA(n),readOnly:o,paddingLeft:4,paddingRight:12,sx:{flexGrow:1},value:(null==t?void 0:t.value)??"",onChange:e=>{i(0===e.length?void 0:{__TYPE__:"FieldContent",type:"Text",value:e})}})})]})}let V6=({content:e,field:t,id:n,onContentChange:r,readOnly:i})=>{var o,a;let u=Number(null==e?void 0:e.value),s=Number.isFinite(u)?u:void 0;return V.jsxs(S.gN,{children:[V.jsx(S.fw,{name:"pin"}),V.jsx(S.Qy,{htmlFor:n,children:Qp(t)}),V.jsx(S.JO,{children:V.jsx(S.Y2,{id:n,value:s,min:null==(o=t.config)?void 0:o.min,max:null==(a=t.config)?void 0:a.max,padding:Qv,placeholder:QA(t),readOnly:i,onValueChange:e=>r(void 0===e?void 0:{__TYPE__:"FieldContent",type:"Number",value:String(e)})})})]})};function V5(e){this.content=e}V5.prototype={constructor:V5,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return -1},get:function(e){var t=this.find(e);return -1==t?void 0:this.content[t+1]},update:function(e,t,n){var r=n&&n!=e?this.remove(n):this,i=r.find(e),o=r.content.slice();return -1==i?o.push(n||e,t):(o[i+1]=t,n&&(o[i]=n)),new V5(o)},remove:function(e){var t=this.find(e);if(-1==t)return this;var n=this.content.slice();return n.splice(t,2),new V5(n)},addToStart:function(e,t){return new V5([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new V5(n)},addBefore:function(e,t,n){var r=this.remove(t),i=r.content.slice(),o=r.find(e);return i.splice(-1==o?i.length:o,0,t,n),new V5(i)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return(e=V5.from(e)).size?new V5(e.content.concat(this.subtract(e).content)):this},append:function(e){return(e=V5.from(e)).size?new V5(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=V5.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}},V5.from=function(e){if(e instanceof V5)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new V5(t)};class V3{constructor(e,t){if(this.content=e,this.size=t||0,null==t)for(let t=0;t<e.length;t++)this.size+=e[t].nodeSize}nodesBetween(e,t,n,r=0,i){for(let o=0,a=0;a<t;o++){let u=this.content[o],s=a+u.nodeSize;if(s>e&&!1!==n(u,r+a,i||null,o)&&u.content.size){let i=a+1;u.nodesBetween(Math.max(0,e-i),Math.min(u.content.size,t-i),n,r+i)}a=s}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,r){let i="",o=!0;return this.nodesBetween(e,t,(a,u)=>{a.isText?(i+=a.text.slice(Math.max(e,u)-u,t-u),o=!n):a.isLeaf?(r?i+="function"==typeof r?r(a):r:a.type.spec.leafText&&(i+=a.type.spec.leafText(a)),o=!n):!o&&a.isBlock&&(i+=n,o=!0)},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,n=e.firstChild,r=this.content.slice(),i=0;for(t.isText&&t.sameMarkup(n)&&(r[r.length-1]=t.withText(t.text+n.text),i=1);i<e.content.length;i++)r.push(e.content[i]);return new V3(r,this.size+e.size)}cut(e,t=this.size){if(0==e&&t==this.size)return this;let n=[],r=0;if(t>e)for(let i=0,o=0;o<t;i++){let a=this.content[i],u=o+a.nodeSize;u>e&&((o<e||u>t)&&(a=a.isText?a.cut(Math.max(0,e-o),Math.min(a.text.length,t-o)):a.cut(Math.max(0,e-o-1),Math.min(a.content.size,t-o-1))),n.push(a),r+=a.nodeSize),o=u}return new V3(n,r)}cutByIndex(e,t){return e==t?V3.empty:0==e&&t==this.content.length?this:new V3(this.content.slice(e,t))}replaceChild(e,t){let n=this.content[e];if(n==t)return this;let r=this.content.slice(),i=this.size+t.nodeSize-n.nodeSize;return r[e]=t,new V3(r,i)}addToStart(e){return new V3([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new V3(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,n=0;t<this.content.length;t++){let r=this.content[t];e(r,n,t),n+=r.nodeSize}}findDiffStart(e,t=0){return function e(t,n,r){for(let i=0;;i++){if(i==t.childCount||i==n.childCount)return t.childCount==n.childCount?null:r;let o=t.child(i),a=n.child(i);if(o==a){r+=o.nodeSize;continue}if(!o.sameMarkup(a))return r;if(o.isText&&o.text!=a.text){for(let e=0;o.text[e]==a.text[e];e++)r++;return r}if(o.content.size||a.content.size){let t=e(o.content,a.content,r+1);if(null!=t)return t}r+=o.nodeSize}}(this,e,t)}findDiffEnd(e,t=this.size,n=e.size){return function e(t,n,r,i){for(let o=t.childCount,a=n.childCount;;){if(0==o||0==a)return o==a?null:{a:r,b:i};let u=t.child(--o),s=n.child(--a),l=u.nodeSize;if(u==s){r-=l,i-=l;continue}if(!u.sameMarkup(s))return{a:r,b:i};if(u.isText&&u.text!=s.text){let e=0,t=Math.min(u.text.length,s.text.length);for(;e<t&&u.text[u.text.length-e-1]==s.text[s.text.length-e-1];)e++,r--,i--;return{a:r,b:i}}if(u.content.size||s.content.size){let t=e(u.content,s.content,r-1,i-1);if(t)return t}r-=l,i-=l}}(this,e,t,n)}findIndex(e,t=-1){if(0==e)return V4(0,e);if(e==this.size)return V4(this.content.length,e);if(e>this.size||e<0)throw RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let i=r+this.child(n).nodeSize;if(i>=e)return i==e||t>0?V4(n+1,i):V4(n,r);r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return V3.empty;if(!Array.isArray(t))throw RangeError("Invalid input for Fragment.fromJSON");return new V3(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return V3.empty;let t,n=0;for(let r=0;r<e.length;r++){let i=e[r];n+=i.nodeSize,r&&i.isText&&e[r-1].sameMarkup(i)?(t||(t=e.slice(0,r)),t[t.length-1]=i.withText(t[t.length-1].text+i.text)):t&&t.push(i)}return new V3(t||e,n)}static from(e){if(!e)return V3.empty;if(e instanceof V3)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new V3([e],e.nodeSize);throw RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}V3.empty=new V3([],0);let V9={index:0,offset:0};function V4(e,t){return V9.index=e,V9.offset=t,V9}function V8(e,t){if(e===t)return!0;if(!(e&&"object"==typeof e)||!(t&&"object"==typeof t))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!V8(e[n],t[n]))return!1}else{for(let n in e)if(!(n in t)||!V8(e[n],t[n]))return!1;for(let n in t)if(!(n in e))return!1}return!0}let V7=class e{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,n=!1;for(let r=0;r<e.length;r++){let i=e[r];if(this.eq(i))return e;if(this.type.excludes(i.type))t||(t=e.slice(0,r));else{if(i.type.excludes(this.type))return e;!n&&i.type.rank>this.type.rank&&(t||(t=e.slice(0,r)),t.push(this),n=!0),t&&t.push(i)}}return t||(t=e.slice()),n||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&V8(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw RangeError("Invalid input for Mark.fromJSON");let n=e.marks[t.type];if(!n)throw RangeError(`There is no mark type ${t.type} in this schema`);return n.create(t.attrs)}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&0==t.length)return e.none;if(t instanceof e)return[t];let n=t.slice();return n.sort((e,t)=>e.type.rank-t.type.rank),n}};V7.none=[];class ze extends Error{}class zt{constructor(e,t,n){this.content=e,this.openStart=t,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let n=function e(t,n,r,i){let{index:o,offset:a}=t.findIndex(n),u=t.maybeChild(o);if(a==n||u.isText)return i&&!i.canReplace(o,o,r)?null:t.cut(0,n).append(r).append(t.cut(n));let s=e(u.content,n-a-1,r);return s&&t.replaceChild(o,u.copy(s))}(this.content,e+this.openStart,t);return n&&new zt(n,this.openStart,this.openEnd)}removeBetween(e,t){return new zt(function e(t,n,r){let{index:i,offset:o}=t.findIndex(n),a=t.maybeChild(i),{index:u,offset:s}=t.findIndex(r);if(o==n||a.isText){if(s!=r&&!t.child(u).isText)throw RangeError("Removing non-flat range");return t.cut(0,n).append(t.cut(r))}if(i!=u)throw RangeError("Removing non-flat range");return t.replaceChild(i,a.copy(e(a.content,n-o-1,r-o-1)))}(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return zt.empty;let n=t.openStart||0,r=t.openEnd||0;if("number"!=typeof n||"number"!=typeof r)throw RangeError("Invalid input for Slice.fromJSON");return new zt(V3.fromJSON(e,t.content),n,r)}static maxOpen(e,t=!0){let n=0,r=0;for(let r=e.firstChild;r&&!r.isLeaf&&(t||!r.type.spec.isolating);r=r.firstChild)n++;for(let n=e.lastChild;n&&!n.isLeaf&&(t||!n.type.spec.isolating);n=n.lastChild)r++;return new zt(e,n,r)}}function zn(e,t){if(!t.type.compatibleContent(e.type))throw new ze("Cannot join "+t.type.name+" onto "+e.type.name)}function zr(e,t,n){let r=e.node(n);return zn(r,t.node(n)),r}function zi(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function zo(e,t,n,r){let i=(t||e).node(n),o=0,a=t?t.index(n):i.childCount;e&&(o=e.index(n),e.depth>n?o++:e.textOffset&&(zi(e.nodeAfter,r),o++));for(let e=o;e<a;e++)zi(i.child(e),r);t&&t.depth==n&&t.textOffset&&zi(t.nodeBefore,r)}function za(e,t){return e.type.checkContent(t),e.copy(t)}function zu(e,t,n){let r=[];return zo(null,e,n,r),e.depth>n&&zi(za(zr(e,t,n+1),zu(e,t,n+1)),r),zo(t,null,n,r),new V3(r)}zt.empty=new zt(V3.empty,0,0);class zs{constructor(e,t,n){this.pos=e,this.path=t,this.parentOffset=n,this.depth=t.length/3-1}resolveDepth(e){return null==e?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[3*this.resolveDepth(e)]}index(e){return this.path[3*this.resolveDepth(e)+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e!=this.depth||this.textOffset?1:0)}start(e){return 0==(e=this.resolveDepth(e))?0:this.path[3*e-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(!(e=this.resolveDepth(e)))throw RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]}after(e){if(!(e=this.resolveDepth(e)))throw RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]+this.path[3*e].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):0==e?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let n=this.path[3*t],r=0==t?0:this.path[3*t-1]+1;for(let t=0;t<e;t++)r+=n.child(t).nodeSize;return r}marks(){let e=this.parent,t=this.index();if(0==e.content.size)return V7.none;if(this.textOffset)return e.child(t).marks;let n=e.maybeChild(t-1),r=e.maybeChild(t);if(!n){let e=n;n=r,r=e}let i=n.marks;for(var o=0;o<i.length;o++)!1!==i[o].type.spec.inclusive||r&&i[o].isInSet(r.marks)||(i=i[o--].removeFromSet(i));return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let n=t.marks,r=e.parent.maybeChild(e.index());for(var i=0;i<n.length;i++)!1!==n[i].type.spec.inclusive||r&&n[i].isInSet(r.marks)||(n=n[i--].removeFromSet(n));return n}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new zf(this,e,n);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw RangeError("Position "+t+" out of range");let n=[],r=0,i=t;for(let t=e;;){let{index:e,offset:o}=t.content.findIndex(i),a=i-o;if(n.push(t,e,r+o),!a||(t=t.child(e)).isText)break;i=a-1,r+=o+1}return new zs(t,n,i)}static resolveCached(e,t){for(let n=0;n<zl.length;n++){let r=zl[n];if(r.pos==t&&r.doc==e)return r}let n=zl[zc]=zs.resolve(e,t);return zc=(zc+1)%zd,n}}let zl=[],zc=0,zd=12;class zf{constructor(e,t,n){this.$from=e,this.$to=t,this.depth=n}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}let zp=Object.create(null),zA=class e{constructor(e,t,n,r=V7.none){this.type=e,this.attrs=t,this.marks=r,this.content=n||V3.empty}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,n,r=0){this.content.nodesBetween(e,t,n,r,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,n,r){return this.content.textBetween(e,t,n,r)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,n){return this.type==e&&V8(this.attrs,t||e.defaultAttrs||zp)&&V7.sameSet(this.marks,n||V7.none)}copy(t=null){return t==this.content?this:new e(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new e(this.type,this.attrs,this.content,t)}cut(e,t=this.content.size){return 0==e&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,n=!1){if(e==t)return zt.empty;let r=this.resolve(e),i=this.resolve(t),o=n?0:r.sharedDepth(t),a=r.start(o);return new zt(r.node(o).content.cut(r.pos-a,i.pos-a),r.depth-o,i.depth-o)}replace(e,t,n){return function(e,t,n){if(n.openStart>e.depth)throw new ze("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new ze("Inconsistent open depths");return function e(t,n,r,i){let o=t.index(i),a=t.node(i);if(o==n.index(i)&&i<t.depth-r.openStart){let u=e(t,n,r,i+1);return a.copy(a.content.replaceChild(o,u))}if(!r.content.size)return za(a,zu(t,n,i));if(r.openStart||r.openEnd||t.depth!=i||n.depth!=i){let{start:e,end:o}=function(e,t){let n=t.depth-e.openStart,r=t.node(n).copy(e.content);for(let e=n-1;e>=0;e--)r=t.node(e).copy(V3.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}(r,t);return za(a,function e(t,n,r,i,o){let a=t.depth>o&&zr(t,n,o+1),u=i.depth>o&&zr(r,i,o+1),s=[];return zo(null,t,o,s),a&&u&&n.index(o)==r.index(o)?(zn(a,u),zi(za(a,e(t,n,r,i,o+1)),s)):(a&&zi(za(a,zu(t,n,o+1)),s),zo(n,r,o,s),u&&zi(za(u,zu(r,i,o+1)),s)),zo(i,null,o,s),new V3(s)}(t,e,o,n,i))}{let e=t.parent,i=e.content;return za(e,i.cut(0,t.parentOffset).append(r.content).append(i.cut(n.parentOffset)))}}(e,t,n,0)}(this.resolve(e),this.resolve(t),n)}nodeAt(e){for(let t=this;;){let{index:n,offset:r}=t.content.findIndex(e);if(!(t=t.maybeChild(n)))return null;if(r==e||t.isText)return t;e-=r+1}}childAfter(e){let{index:t,offset:n}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:n}}childBefore(e){if(0==e)return{node:null,index:0,offset:0};let{index:t,offset:n}=this.content.findIndex(e);if(n<e)return{node:this.content.child(t),index:t,offset:n};let r=this.content.child(t-1);return{node:r,index:t-1,offset:n-r.nodeSize}}resolve(e){return zs.resolveCached(this,e)}resolveNoCache(e){return zs.resolve(this,e)}rangeHasMark(e,t,n){let r=!1;return t>e&&this.nodesBetween(e,t,e=>(n.isInSet(e.marks)&&(r=!0),!r)),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),zm(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,n=V3.empty,r=0,i=n.childCount){let o=this.contentMatchAt(e).matchFragment(n,r,i),a=o&&o.matchFragment(this.content,t);if(!a||!a.validEnd)return!1;for(let e=r;e<i;e++)if(!this.type.allowsMarks(n.child(e).marks))return!1;return!0}canReplaceWith(e,t,n,r){if(r&&!this.type.allowsMarks(r))return!1;let i=this.contentMatchAt(e).matchType(n),o=i&&i.matchFragment(this.content,t);return!!o&&o.validEnd}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content);let e=V7.none;for(let t=0;t<this.marks.length;t++)e=this.marks[t].addToSet(e);if(!V7.sameSet(e,this.marks))throw RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(e=>e.type.name)}`);this.content.forEach(e=>e.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(e=>e.toJSON())),e}static fromJSON(e,t){if(!t)throw RangeError("Invalid input for Node.fromJSON");let n=null;if(t.marks){if(!Array.isArray(t.marks))throw RangeError("Invalid mark data for Node.fromJSON");n=t.marks.map(e.markFromJSON)}if("text"==t.type){if("string"!=typeof t.text)throw RangeError("Invalid text node in JSON");return e.text(t.text,n)}let r=V3.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,r,n)}};zA.prototype.text=void 0;class zh extends zA{constructor(e,t,n,r){if(super(e,t,null,r),!n)throw RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):zm(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new zh(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new zh(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return 0==e&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function zm(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class zg{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){var n;let r,i=new zy(e,t);if(null==i.next)return zg.empty;let o=function e(t){let n=[];do n.push(function(t){let n=[];do n.push(function(t){let n=function(t){if(t.eat("(")){let n=e(t);return t.eat(")")||t.err("Missing closing paren"),n}if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=(function(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let i=[];for(let e in n){let r=n[e];r.groups.indexOf(t)>-1&&i.push(r)}return 0==i.length&&e.err("No node type or group '"+t+"' found"),i})(t,t.next).map(e=>(null==t.inline?t.inline=e.isInline:t.inline!=e.isInline&&t.err("Mixing inline and block content"),{type:"name",value:e}));return t.pos++,1==e.length?e[0]:{type:"choice",exprs:e}}}(t);for(;;)if(t.eat("+"))n={type:"plus",expr:n};else if(t.eat("*"))n={type:"star",expr:n};else if(t.eat("?"))n={type:"opt",expr:n};else if(t.eat("{"))n=function(e,t){let n=zv(e),r=n;return e.eat(",")&&(r="}"!=e.next?zv(e):-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}(t,n);else break;return n}(t));while(t.next&&")"!=t.next&&"|"!=t.next);return 1==n.length?n[0]:{type:"seq",exprs:n}}(t));while(t.eat("|"));return 1==n.length?n[0]:{type:"choice",exprs:n}}(i);i.next&&i.err("Unexpected trailing text");let a=(n=function(e){let t=[[]];return i(function e(t,o){if("choice"==t.type)return t.exprs.reduce((t,n)=>t.concat(e(n,o)),[]);if("seq"==t.type)for(let r=0;;r++){let a=e(t.exprs[r],o);if(r==t.exprs.length-1)return a;i(a,o=n())}else if("star"==t.type){let a=n();return r(o,a),i(e(t.expr,a),a),[r(a)]}else if("plus"==t.type){let a=n();return i(e(t.expr,o),a),i(e(t.expr,a),a),[r(a)]}else{if("opt"==t.type)return[r(o)].concat(e(t.expr,o));if("range"==t.type){let a=o;for(let r=0;r<t.min;r++){let r=n();i(e(t.expr,a),r),a=r}if(-1==t.max)i(e(t.expr,a),a);else for(let o=t.min;o<t.max;o++){let o=n();r(a,o),i(e(t.expr,a),o),a=o}return[r(a)]}if("name"==t.type)return[r(o,void 0,t.value)];throw Error("Unknown expr type")}}(e,0),n()),t;function n(){return t.push([])-1}function r(e,n,r){let i={term:r,to:n};return t[e].push(i),i}function i(e,t){e.forEach(e=>e.to=t)}}(o),r=Object.create(null),function e(t){let i=[];t.forEach(e=>{n[e].forEach(({term:e,to:t})=>{let r;if(e){for(let t=0;t<i.length;t++)i[t][0]==e&&(r=i[t][1]);zb(n,t).forEach(t=>{r||i.push([e,r=[]]),-1==r.indexOf(t)&&r.push(t)})}})});let o=r[t.join(",")]=new zg(t.indexOf(n.length-1)>-1);for(let t=0;t<i.length;t++){let n=i[t][1].sort(zx);o.next.push({type:i[t][0],next:r[n.join(",")]||e(n)})}return o}(zb(n,0)));return function(e,t){for(let n=0,r=[e];n<r.length;n++){let e=r[n],i=!e.validEnd,o=[];for(let t=0;t<e.next.length;t++){let{type:n,next:a}=e.next[t];o.push(n.name),i&&!(n.isText||n.hasRequiredAttrs())&&(i=!1),-1==r.indexOf(a)&&r.push(a)}i&&t.err("Only non-generatable nodes ("+o.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(a,i),a}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,n=e.childCount){let r=this;for(let i=t;r&&i<n;i++)r=r.matchType(e.child(i).type);return r}get inlineContent(){return 0!=this.next.length&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let n=0;n<e.next.length;n++)if(this.next[t].type==e.next[n].type)return!0;return!1}fillBefore(e,t=!1,n=0){let r=[this];return function i(o,a){let u=o.matchFragment(e,n);if(u&&(!t||u.validEnd))return V3.from(a.map(e=>e.createAndFill()));for(let e=0;e<o.next.length;e++){let{type:t,next:n}=o.next[e];if(!(t.isText||t.hasRequiredAttrs())&&-1==r.indexOf(n)){r.push(n);let e=i(n,a.concat(t));if(e)return e}}return null}(this,[])}findWrapping(e){for(let t=0;t<this.wrapCache.length;t+=2)if(this.wrapCache[t]==e)return this.wrapCache[t+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let r=n.shift(),i=r.match;if(i.matchType(e)){let e=[];for(let t=r;t.type;t=t.via)e.push(t.type);return e.reverse()}for(let e=0;e<i.next.length;e++){let{type:o,next:a}=i.next[e];o.isLeaf||o.hasRequiredAttrs()||o.name in t||r.type&&!a.validEnd||(n.push({match:o.contentMatch,type:o,via:r}),t[o.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];return function t(n){e.push(n);for(let r=0;r<n.next.length;r++)-1==e.indexOf(n.next[r].next)&&t(n.next[r].next)}(this),e.map((t,n)=>{let r=n+(t.validEnd?"*":" ")+" ";for(let n=0;n<t.next.length;n++)r+=(n?", ":"")+t.next[n].type.name+"->"+e.indexOf(t.next[n].next);return r}).join(`
8
8
  `)}}zg.empty=new zg(!0);class zy{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw SyntaxError(e+" (in content expression '"+this.string+"')")}}function zv(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function zx(e,t){return t-e}function zb(e,t){let n=[];return function t(r){let i=e[r];if(1==i.length&&!i[0].term)return t(i[0].to);n.push(r);for(let e=0;e<i.length;e++){let{term:r,to:o}=i[e];r||-1!=n.indexOf(o)||t(o)}}(t),n.sort(zx)}function zC(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function zS(e,t){let n=Object.create(null);for(let r in e){let i=t&&t[r];if(void 0===i){let t=e[r];if(t.hasDefault)i=t.default;else throw RangeError("No value supplied for attribute "+r)}n[r]=i}return n}function zw(e){let t=Object.create(null);if(e)for(let n in e)t[n]=new z_(e[n]);return t}let zI=class e{constructor(e,t,n){this.name=e,this.schema=t,this.spec=n,this.markSet=null,this.groups=n.group?n.group.split(" "):[],this.attrs=zw(n.attrs),this.defaultAttrs=zC(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(n.inline||"text"==e),this.isText="text"==e}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==zg.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:zS(this.attrs,e)}create(e=null,t,n){if(this.isText)throw Error("NodeType.create can't construct text nodes");return new zA(this,this.computeAttrs(e),V3.from(t),V7.setFrom(n))}createChecked(e=null,t,n){return t=V3.from(t),this.checkContent(t),new zA(this,this.computeAttrs(e),t,V7.setFrom(n))}createAndFill(e=null,t,n){if(e=this.computeAttrs(e),(t=V3.from(t)).size){let e=this.contentMatch.fillBefore(t);if(!e)return null;t=e.append(t)}let r=this.contentMatch.matchFragment(t),i=r&&r.fillBefore(V3.empty,!0);return i?new zA(this,e,t.append(i),V7.setFrom(n)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let t=0;t<e.childCount;t++)if(!this.allowsMarks(e.child(t).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}allowsMarkType(e){return null==this.markSet||this.markSet.indexOf(e)>-1}allowsMarks(e){if(null==this.markSet)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){let t;if(null==this.markSet)return e;for(let n=0;n<e.length;n++)this.allowsMarkType(e[n].type)?t&&t.push(e[n]):t||(t=e.slice(0,n));return t?t.length?t:V7.none:e}static compile(t,n){let r=Object.create(null);t.forEach((t,i)=>r[t]=new e(t,n,i));let i=n.spec.topNode||"doc";if(!r[i])throw RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw RangeError("Every schema needs a 'text' type");for(let e in r.text.attrs)throw RangeError("The text node type should not have attributes");return r}};class z_{constructor(e){this.hasDefault=Object.prototype.hasOwnProperty.call(e,"default"),this.default=e.default}get isRequired(){return!this.hasDefault}}class zT{constructor(e,t,n,r){this.name=e,this.rank=t,this.schema=n,this.spec=r,this.attrs=zw(r.attrs),this.excluded=null;let i=zC(this.attrs);this.instance=i?new V7(this,i):null}create(e=null){return!e&&this.instance?this.instance:new V7(this,zS(this.attrs,e))}static compile(e,t){let n=Object.create(null),r=0;return e.forEach((e,i)=>n[e]=new zT(e,r++,t,i)),n}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}excludes(e){return this.excluded.indexOf(e)>-1}}class zk{constructor(e){this.cached=Object.create(null);let t=this.spec={};for(let n in e)t[n]=e[n];t.nodes=V5.from(e.nodes),t.marks=V5.from(e.marks||{}),this.nodes=zI.compile(this.spec.nodes,this),this.marks=zT.compile(this.spec.marks,this);let n=Object.create(null);for(let e in this.nodes){if(e in this.marks)throw RangeError(e+" can not be both a node and a mark");let t=this.nodes[e],r=t.spec.content||"",i=t.spec.marks;t.contentMatch=n[r]||(n[r]=zg.parse(r,this.nodes)),t.inlineContent=t.contentMatch.inlineContent,t.markSet="_"==i?null:i?zO(this,i.split(" ")):""!=i&&t.inlineContent?null:[]}for(let e in this.marks){let t=this.marks[e],n=t.spec.excludes;t.excluded=null==n?[t]:""==n?[]:zO(this,n.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,n,r){if("string"==typeof e)e=this.nodeType(e);else if(e instanceof zI){if(e.schema!=this)throw RangeError("Node type from different schema used ("+e.name+")")}else throw RangeError("Invalid node type: "+e);return e.createChecked(t,n,r)}text(e,t){let n=this.nodes.text;return new zh(n,n.defaultAttrs,e,V7.setFrom(t))}mark(e,t){return"string"==typeof e&&(e=this.marks[e]),e.create(t)}nodeFromJSON(e){return zA.fromJSON(this,e)}markFromJSON(e){return V7.fromJSON(this,e)}nodeType(e){let t=this.nodes[e];if(!t)throw RangeError("Unknown node type: "+e);return t}}function zO(e,t){let n=[];for(let r=0;r<t.length;r++){let i=t[r],o=e.marks[i],a=o;if(o)n.push(o);else for(let t in e.marks){let r=e.marks[t];("_"==i||r.spec.group&&r.spec.group.split(" ").indexOf(i)>-1)&&n.push(a=r)}if(!a)throw SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}class zR{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[],t.forEach(e=>{e.tag?this.tags.push(e):e.style&&this.styles.push(e)}),this.normalizeLists=!this.tags.some(t=>{if(!/^(ul|ol)\b/.test(t.tag)||!t.node)return!1;let n=e.nodes[t.node];return n.contentMatch.matchType(n)})}parse(e,t={}){let n=new zL(this,t,!1);return n.addAll(e,t.from,t.to),n.finish()}parseSlice(e,t={}){let n=new zL(this,t,!0);return n.addAll(e,t.from,t.to),zt.maxOpen(n.finish())}matchTag(e,t,n){for(let i=n?this.tags.indexOf(n)+1:0;i<this.tags.length;i++){var r;let n=this.tags[i];if(r=n.tag,(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,r)&&(void 0===n.namespace||e.namespaceURI==n.namespace)&&(!n.context||t.matchesContext(n.context))){if(n.getAttrs){let t=n.getAttrs(e);if(!1===t)continue;n.attrs=t||void 0}return n}}}matchStyle(e,t,n,r){for(let i=r?this.styles.indexOf(r)+1:0;i<this.styles.length;i++){let r=this.styles[i],o=r.style;if(!(0!=o.indexOf(e)||r.context&&!n.matchesContext(r.context)||o.length>e.length&&(61!=o.charCodeAt(e.length)||o.slice(e.length+1)!=t))){if(r.getAttrs){let e=r.getAttrs(t);if(!1===e)continue;r.attrs=e||void 0}return r}}}static schemaRules(e){let t=[];function n(e){let n=null==e.priority?50:e.priority,r=0;for(;r<t.length;r++){let e=t[r];if((null==e.priority?50:e.priority)<n)break}t.splice(r,0,e)}for(let t in e.marks){let r=e.marks[t].spec.parseDOM;r&&r.forEach(e=>{n(e=zK(e)),e.mark||e.ignore||e.clearMark||(e.mark=t)})}for(let t in e.nodes){let r=e.nodes[t].spec.parseDOM;r&&r.forEach(e=>{n(e=zK(e)),e.node||e.ignore||e.mark||(e.node=t)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new zR(e,zR.schemaRules(e)))}}let zE={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},zj={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},zF={ol:!0,ul:!0};function zM(e,t,n){return null!=t?(t?1:0)|("full"===t?2:0):e&&"pre"==e.whitespace?3:-5&n}class zU{constructor(e,t,n,r,i,o,a){this.type=e,this.attrs=t,this.marks=n,this.pendingMarks=r,this.solid=i,this.options=a,this.content=[],this.activeMarks=V7.none,this.stashMarks=[],this.match=o||(4&a?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(V3.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let t=this.type.contentMatch,n;return(n=t.findWrapping(e.type))?(this.match=t,n):null}}return this.match.findWrapping(e.type)}finish(e){if(!(1&this.options)){let e=this.content[this.content.length-1],t;e&&e.isText&&(t=/[ \t\r\n\u000c]+$/.exec(e.text))&&(e.text.length==t[0].length?this.content.pop():this.content[this.content.length-1]=e.withText(e.text.slice(0,e.text.length-t[0].length)))}let t=V3.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(V3.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}popFromStashMark(e){for(let t=this.stashMarks.length-1;t>=0;t--)if(e.eq(this.stashMarks[t]))return this.stashMarks.splice(t,1)[0]}applyPending(e){for(let t=0,n=this.pendingMarks;t<n.length;t++){let r=n[t];(this.type?this.type.allowsMarkType(r.type):function(e,t){let n=t.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(e))continue;let o=[],a=e=>{o.push(e);for(let n=0;n<e.edgeCount;n++){let{type:r,next:i}=e.edge(n);if(r==t||0>o.indexOf(i)&&a(i))return!0}};if(a(i.contentMatch))return!0}}(r.type,e))&&!r.isInSet(this.activeMarks)&&(this.activeMarks=r.addToSet(this.activeMarks),this.pendingMarks=r.removeFromSet(this.pendingMarks))}}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!zE.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class zL{constructor(e,t,n){this.parser=e,this.options=t,this.isOpen=n,this.open=0;let r=t.topNode,i,o=zM(null,t.preserveWhitespace,0)|(n?4:0);i=r?new zU(r.type,r.attrs,V7.none,V7.none,!0,t.topMatch||r.type.contentMatch,o):n?new zU(null,null,V7.none,V7.none,!0,null,o):new zU(e.schema.topNodeType,null,V7.none,V7.none,!0,null,o),this.nodes=[i],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e){if(3==e.nodeType)this.addTextNode(e);else if(1==e.nodeType){let t=e.getAttribute("style");if(t){let n=this.readStyles(function(e){let t=/\s*([\w-]+)\s*:\s*([^;]+)/g,n,r=[];for(;n=t.exec(e);)r.push(n[1],n[2].trim());return r}(t));if(!n)return;let[r,i]=n,o=this.top;for(let e=0;e<i.length;e++)this.removePendingMark(i[e],o);for(let e=0;e<r.length;e++)this.addPendingMark(r[e]);this.addElement(e);for(let e=0;e<r.length;e++)this.removePendingMark(r[e],o);for(let e=0;e<i.length;e++)this.addPendingMark(i[e])}else this.addElement(e)}}addTextNode(e){let t=e.nodeValue,n=this.top;if(2&n.options||n.inlineContext(e)||/[^ \t\r\n\u000c]/.test(t)){if(1&n.options)t=2&n.options?t.replace(/\r\n?/g,`
9
9
  `):t.replace(/\r?\n|\r/g," ");else if(t=t.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(t)&&this.open==this.nodes.length-1){let r=n.content[n.content.length-1],i=e.previousSibling;(!r||i&&"BR"==i.nodeName||r.isText&&/[ \t\r\n\u000c]$/.test(r.text))&&(t=t.slice(1))}t&&this.insertNode(this.parser.schema.text(t)),this.findInText(e)}else this.findInside(e)}addElement(e,t){let n=e.nodeName.toLowerCase(),r;zF.hasOwnProperty(n)&&this.parser.normalizeLists&&function(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let e=1==t.nodeType?t.nodeName.toLowerCase():null;e&&zF.hasOwnProperty(e)&&n?(n.appendChild(t),t=n):"li"==e?n=t:e&&(n=null)}}(e);let i=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(r=this.parser.matchTag(e,this,t));if(i?i.ignore:zj.hasOwnProperty(n))this.findInside(e),this.ignoreFallback(e);else if(!i||i.skip||i.closeParent){i&&i.closeParent?this.open=Math.max(0,this.open-1):i&&i.skip.nodeType&&(e=i.skip);let t,r=this.top,o=this.needsBlock;if(zE.hasOwnProperty(n))r.content.length&&r.content[0].isInline&&this.open&&(this.open--,r=this.top),t=!0,r.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e);return}this.addAll(e),t&&this.sync(r),this.needsBlock=o}else this.addElementByRule(e,i,!1===i.consuming?r:void 0)}leafFallback(e){"BR"==e.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
10
10
  `))}ignoreFallback(e){"BR"!=e.nodeName||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"))}readStyles(e){let t=V7.none,n=V7.none;e:for(let r=0;r<e.length;r+=2)for(let i;;){let o=this.parser.matchStyle(e[r],e[r+1],this,i);if(!o)continue e;if(o.ignore)return null;if(o.clearMark?this.top.pendingMarks.forEach(e=>{o.clearMark(e)&&(n=e.addToSet(n))}):t=this.parser.schema.marks[o.mark].create(o.attrs).addToSet(t),!1===o.consuming)i=o;else break}return[t,n]}addElementByRule(e,t,n){let r,i,o;t.node?(i=this.parser.schema.nodes[t.node]).isLeaf?this.insertNode(i.create(t.attrs))||this.leafFallback(e):r=this.enter(i,t.attrs||null,t.preserveWhitespace):(o=this.parser.schema.marks[t.mark].create(t.attrs),this.addPendingMark(o));let a=this.top;if(i&&i.isLeaf)this.findInside(e);else if(n)this.addElement(e,n);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(e=>this.insertNode(e));else{let n=e;"string"==typeof t.contentElement?n=e.querySelector(t.contentElement):"function"==typeof t.contentElement?n=t.contentElement(e):t.contentElement&&(n=t.contentElement),this.findAround(e,n,!0),this.addAll(n)}r&&this.sync(a)&&this.open--,o&&this.removePendingMark(o,a)}addAll(e,t,n){let r=t||0;for(let i=t?e.childNodes[t]:e.firstChild,o=null==n?null:e.childNodes[n];i!=o;i=i.nextSibling,++r)this.findAtPoint(e,r),this.addDOM(i);this.findAtPoint(e,r)}findPlace(e){let t,n;for(let r=this.open;r>=0;r--){let i=this.nodes[r],o=i.findWrapping(e);if(o&&(!t||t.length>o.length)&&(t=o,n=i,!o.length)||i.solid)break}if(!t)return!1;this.sync(n);for(let e=0;e<t.length;e++)this.enterInner(t[e],null,!1);return!0}insertNode(e){if(e.isInline&&this.needsBlock&&!this.top.type){let e=this.textblockFromContext();e&&this.enterInner(e)}if(this.findPlace(e)){this.closeExtra();let t=this.top;t.applyPending(e.type),t.match&&(t.match=t.match.matchType(e.type));let n=t.activeMarks;for(let r=0;r<e.marks.length;r++)(!t.type||t.type.allowsMarkType(e.marks[r].type))&&(n=e.marks[r].addToSet(n));return t.content.push(e.mark(n)),!0}return!1}enter(e,t,n){let r=this.findPlace(e.create(t));return r&&this.enterInner(e,t,!0,n),r}enterInner(e,t=null,n=!1,r){this.closeExtra();let i=this.top;i.applyPending(e),i.match=i.match&&i.match.matchType(e);let o=zM(e,r,i.options);4&i.options&&0==i.content.length&&(o|=4),this.nodes.push(new zU(e,t,i.activeMarks,i.pendingMarks,n,null,o)),this.open++}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(e){for(let t=this.open;t>=0;t--)if(this.nodes[t]==e)return this.open=t,!0;return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let n=this.nodes[t].content;for(let t=n.length-1;t>=0;t--)e+=n[t].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&this.find[n].offset==t&&(this.find[n].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)null==this.find[t].pos&&1==e.nodeType&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,n){if(e!=t&&this.find)for(let r=0;r<this.find.length;r++)null==this.find[r].pos&&1==e.nodeType&&e.contains(this.find[r].node)&&t.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),n=this.options.context,r=!this.isOpen&&(!n||n.parent.type==this.nodes[0].type),i=-(n?n.depth+1:0)+(r?0:1),o=(e,a)=>{for(;e>=0;e--){let u=t[e];if(""==u){if(e==t.length-1||0==e)continue;for(;a>=i;a--)if(o(e-1,a))return!0;return!1}{let e=a>0||0==a&&r?this.nodes[a].type:n&&a>=i?n.node(a-i).type:null;if(!e||e.name!=u&&-1==e.groups.indexOf(u))return!1;a--}}return!0};return o(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let e in this.parser.schema.nodes){let t=this.parser.schema.nodes[e];if(t.isTextblock&&t.defaultAttrs)return t}}addPendingMark(e){let t=function(e,t){for(let n=0;n<t.length;n++)if(e.eq(t[n]))return t[n]}(e,this.top.pendingMarks);t&&this.top.stashMarks.push(t),this.top.pendingMarks=e.addToSet(this.top.pendingMarks)}removePendingMark(e,t){for(let n=this.open;n>=0;n--){let r=this.nodes[n];if(r.pendingMarks.lastIndexOf(e)>-1)r.pendingMarks=e.removeFromSet(r.pendingMarks);else{r.activeMarks=e.removeFromSet(r.activeMarks);let t=r.popFromStashMark(e);t&&r.type&&r.type.allowsMarkType(t.type)&&(r.activeMarks=t.addToSet(r.activeMarks))}if(r==t)break}}}function zK(e){let t={};for(let n in e)t[n]=e[n];return t}class zB{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},n){n||(n=zW(t).createDocumentFragment());let r=n,i=[];return e.forEach(e=>{if(i.length||e.marks.length){let n=0,o=0;for(;n<i.length&&o<e.marks.length;){let t=e.marks[o];if(!this.marks[t.type.name]){o++;continue}if(!t.eq(i[n][0])||!1===t.type.spec.spanning)break;n++,o++}for(;n<i.length;)r=i.pop()[1];for(;o<e.marks.length;){let n=e.marks[o++],a=this.serializeMark(n,e.isInline,t);a&&(i.push([n,r]),r.appendChild(a.dom),r=a.contentDOM||a.dom)}}r.appendChild(this.serializeNodeInner(e,t))}),n}serializeNodeInner(e,t){let{dom:n,contentDOM:r}=zB.renderSpec(zW(t),this.nodes[e.type.name](e));if(r){if(e.isLeaf)throw RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,r)}return n}serializeNode(e,t={}){let n=this.serializeNodeInner(e,t);for(let r=e.marks.length-1;r>=0;r--){let i=this.serializeMark(e.marks[r],e.isInline,t);i&&((i.contentDOM||i.dom).appendChild(n),n=i.dom)}return n}serializeMark(e,t,n={}){let r=this.marks[e.type.name];return r&&zB.renderSpec(zW(n),r(e,t))}static renderSpec(e,t,n=null){if("string"==typeof t)return{dom:e.createTextNode(t)};if(null!=t.nodeType)return{dom:t};if(t.dom&&null!=t.dom.nodeType)return t;let r=t[0],i=r.indexOf(" ");i>0&&(n=r.slice(0,i),r=r.slice(i+1));let o,a=n?e.createElementNS(n,r):e.createElement(r),u=t[1],s=1;if(u&&"object"==typeof u&&null==u.nodeType&&!Array.isArray(u)){for(let e in s=2,u)if(null!=u[e]){let t=e.indexOf(" ");t>0?a.setAttributeNS(e.slice(0,t),e.slice(t+1),u[e]):a.setAttribute(e,u[e])}}for(let r=s;r<t.length;r++){let i=t[r];if(0===i){if(r<t.length-1||r>s)throw RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}{let{dom:t,contentDOM:r}=zB.renderSpec(e,i,n);if(a.appendChild(t),r){if(o)throw RangeError("Multiple content holes");o=r}}}return{dom:a,contentDOM:o}}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new zB(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=zP(e.nodes);return t.text||(t.text=e=>e.text),t}static marksFromSchema(e){return zP(e.marks)}}function zP(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function zW(e){return e.document||window.document}let zD=class{constructor(e,t,n){this.pos=e,this.delInfo=t,this.recover=n}get deleted(){return(8&this.delInfo)>0}get deletedBefore(){return(5&this.delInfo)>0}get deletedAfter(){return(6&this.delInfo)>0}get deletedAcross(){return(4&this.delInfo)>0}},zN=class e{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&e.empty)return e.empty}recover(e){let t=0,n=65535&e;if(!this.inverted)for(let e=0;e<n;e++)t+=this.ranges[3*e+2]-this.ranges[3*e+1];return this.ranges[3*n]+t+(e-(65535&e))/65536}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,n){let r=0,i=this.inverted?2:1,o=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let u=this.ranges[a]-(this.inverted?r:0);if(u>e)break;let s=this.ranges[a+i],l=this.ranges[a+o],c=u+s;if(e<=c){let i=s?e==u?-1:e==c?1:t:t,o=u+r+(i<0?0:l);if(n)return o;let d=e==(t<0?u:c)?null:a/3+(e-u)*65536,f=e==u?2:e==c?1:4;return(t<0?e!=u:e!=c)&&(f|=8),new zD(o,f,d)}r+=l-s}return n?e+r:new zD(e+r,0,null)}touches(e,t){let n=0,r=65535&t,i=this.inverted?2:1,o=this.inverted?1:2;for(let t=0;t<this.ranges.length;t+=3){let a=this.ranges[t]-(this.inverted?n:0);if(a>e)break;let u=this.ranges[t+i];if(e<=a+u&&t==3*r)return!0;n+=this.ranges[t+o]-u}return!1}forEach(e){let t=this.inverted?2:1,n=this.inverted?1:2;for(let r=0,i=0;r<this.ranges.length;r+=3){let o=this.ranges[r],a=o-(this.inverted?i:0),u=o+(this.inverted?0:i),s=this.ranges[r+t],l=this.ranges[r+n];e(a,a+s,u,u+l),i+=l-s}}invert(){return new e(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(t){return 0==t?e.empty:new e(t<0?[0,-t,0]:[0,0,t])}};zN.empty=new zN([]);class zq{constructor(e=[],t,n=0,r=e.length){this.maps=e,this.mirror=t,this.from=n,this.to=r}slice(e=0,t=this.maps.length){return new zq(this.maps,this.mirror,e,t)}copy(){return new zq(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}appendMap(e,t){this.to=this.maps.push(e),null!=t&&this.setMirror(this.maps.length-1,t)}appendMapping(e){for(let t=0,n=this.maps.length;t<e.maps.length;t++){let r=e.getMirror(t);this.appendMap(e.maps[t],null!=r&&r<t?n+r:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,n=this.maps.length+e.maps.length;t>=0;t--){let r=e.getMirror(t);this.appendMap(e.maps[t].invert(),null!=r&&r>t?n-r-1:void 0)}}invert(){let e=new zq;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let n=this.from;n<this.to;n++)e=this.maps[n].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,n){let r=0;for(let n=this.from;n<this.to;n++){let i=this.maps[n].mapResult(e,t);if(null!=i.recover){let t=this.getMirror(n);if(null!=t&&t>n&&t<this.to){n=t,e=this.maps[t].recover(i.recover);continue}}r|=i.delInfo,e=i.pos}return n?e:new zD(e,r,null)}}let zQ=Object.create(null),zV=class{getMap(){return zN.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw RangeError("Invalid input for Step.fromJSON");let n=zQ[t.stepType];if(!n)throw RangeError(`No step type ${t.stepType} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in zQ)throw RangeError("Duplicate use of step JSON ID "+e);return zQ[e]=t,t.prototype.jsonID=e,t}},zz=class e{constructor(e,t){this.doc=e,this.failed=t}static ok(t){return new e(t,null)}static fail(t){return new e(null,t)}static fromReplace(t,n,r,i){try{return e.ok(t.replace(n,r,i))}catch(t){if(t instanceof ze)return e.fail(t.message);throw t}}};function zY(e,t,n){let r=[];for(let i=0;i<e.childCount;i++){let o=e.child(i);o.content.size&&(o=o.copy(zY(o.content,t,o))),o.isInline&&(o=t(o,n,i)),r.push(o)}return V3.fromArray(r)}let zH=class e extends zV{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=e.resolve(this.from),r=n.node(n.sharedDepth(this.to)),i=new zt(zY(t.content,(e,t)=>e.isAtom&&t.type.allowsMarkType(this.mark.type)?e.mark(this.mark.addToSet(e.marks)):e,r),t.openStart,t.openEnd);return zz.fromReplace(e,this.from,this.to,i)}invert(){return new zG(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new e(n.pos,r.pos,this.mark)}merge(t){return t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw RangeError("Invalid input for AddMarkStep.fromJSON");return new e(n.from,n.to,t.markFromJSON(n.mark))}};zV.jsonID("addMark",zH);let zG=class e extends zV{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=new zt(zY(t.content,e=>e.mark(this.mark.removeFromSet(e.marks)),e),t.openStart,t.openEnd);return zz.fromReplace(e,this.from,this.to,n)}invert(){return new zH(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new e(n.pos,r.pos,this.mark)}merge(t){return t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw RangeError("Invalid input for RemoveMarkStep.fromJSON");return new e(n.from,n.to,t.markFromJSON(n.mark))}};zV.jsonID("removeMark",zG);let zZ=class e extends zV{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return zz.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return zz.fromReplace(e,this.pos,this.pos+1,new zt(V3.from(n),0,t.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);if(n){let t=this.mark.addToSet(n.marks);if(t.length==n.marks.length){for(let r=0;r<n.marks.length;r++)if(!n.marks[r].isInSet(t))return new e(this.pos,n.marks[r]);return new e(this.pos,this.mark)}}return new zJ(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new e(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if("number"!=typeof n.pos)throw RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new e(n.pos,t.markFromJSON(n.mark))}};zV.jsonID("addNodeMark",zZ);let zJ=class e extends zV{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return zz.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return zz.fromReplace(e,this.pos,this.pos+1,new zt(V3.from(n),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return t&&this.mark.isInSet(t.marks)?new zZ(this.pos,this.mark):this}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new e(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if("number"!=typeof n.pos)throw RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new e(n.pos,t.markFromJSON(n.mark))}};zV.jsonID("removeNodeMark",zJ);let z$=class e extends zV{constructor(e,t,n,r=!1){super(),this.from=e,this.to=t,this.slice=n,this.structure=r}apply(e){return this.structure&&z0(e,this.from,this.to)?zz.fail("Structure replace would overwrite content"):zz.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new zN([this.from,this.to-this.from,this.slice.size])}invert(t){return new e(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deletedAcross&&r.deletedAcross?null:new e(n.pos,Math.max(n.pos,r.pos),this.slice)}merge(t){if(!(t instanceof e)||t.structure||this.structure)return null;if(this.from+this.slice.size!=t.from||this.slice.openEnd||t.slice.openStart){if(t.to!=this.from||this.slice.openStart||t.slice.openEnd)return null;{let n=this.slice.size+t.slice.size==0?zt.empty:new zt(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new e(t.from,this.to,n,this.structure)}}{let n=this.slice.size+t.slice.size==0?zt.empty:new zt(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new e(this.from,this.to+(t.to-t.from),n,this.structure)}}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(t,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw RangeError("Invalid input for ReplaceStep.fromJSON");return new e(n.from,n.to,zt.fromJSON(t,n.slice),!!n.structure)}};zV.jsonID("replace",z$);let zX=class e extends zV{constructor(e,t,n,r,i,o,a=!1){super(),this.from=e,this.to=t,this.gapFrom=n,this.gapTo=r,this.slice=i,this.insert=o,this.structure=a}apply(e){if(this.structure&&(z0(e,this.from,this.gapFrom)||z0(e,this.gapTo,this.to)))return zz.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return zz.fail("Gap is not a flat range");let n=this.slice.insertAt(this.insert,t.content);return n?zz.fromReplace(e,this.from,this.to,n):zz.fail("Content does not fit in gap")}getMap(){return new zN([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(t){let n=this.gapTo-this.gapFrom;return new e(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1),i=t.map(this.gapFrom,-1),o=t.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||i<n.pos||o>r.pos?null:new e(n.pos,r.pos,i,o,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(t,n){if("number"!=typeof n.from||"number"!=typeof n.to||"number"!=typeof n.gapFrom||"number"!=typeof n.gapTo||"number"!=typeof n.insert)throw RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new e(n.from,n.to,n.gapFrom,n.gapTo,zt.fromJSON(t,n.slice),n.insert,!!n.structure)}};function z0(e,t,n){let r=e.resolve(t),i=n-t,o=r.depth;for(;i>0&&o>0&&r.indexAfter(o)==r.node(o).childCount;)o--,i--;if(i>0){let e=r.node(o).maybeChild(r.indexAfter(o));for(;i>0;){if(!e||e.isLeaf)return!0;e=e.firstChild,i--}}return!1}function z1(e){let t=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let n=e.depth;;--n){let r=e.$from.node(n),i=e.$from.index(n),o=e.$to.indexAfter(n);if(n<e.depth&&r.canReplace(i,o,t))return n;if(0==n||r.type.spec.isolating||!((0==i||r.canReplace(i,r.childCount))&&(o==r.childCount||r.canReplace(0,o))))break}return null}function z2(e,t,n=null,r=e){let i=function(e,t){let{parent:n,startIndex:r,endIndex:i}=e,o=n.contentMatchAt(r).findWrapping(t);if(!o)return null;let a=o.length?o[0]:t;return n.canReplaceWith(r,i,a)?o:null}(e,t),o=i&&function(e,t){let{parent:n,startIndex:r,endIndex:i}=e,o=n.child(r),a=t.contentMatch.findWrapping(o.type);if(!a)return null;let u=(a.length?a[a.length-1]:t).contentMatch;for(let e=r;u&&e<i;e++)u=u.matchType(n.child(e).type);return u&&u.validEnd?a:null}(r,t);return o?i.map(z6).concat({type:t,attrs:n}).concat(o.map(z6)):null}function z6(e){return{type:e,attrs:null}}function z5(e,t,n=1,r){let i=e.resolve(t),o=i.depth-n,a=r&&r[r.length-1]||i.parent;if(o<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!a.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let e=i.depth-1,t=n-2;e>o;e--,t--){let n=i.node(e),o=i.index(e);if(n.type.spec.isolating)return!1;let a=n.content.cutByIndex(o,n.childCount),u=r&&r[t+1];u&&(a=a.replaceChild(0,u.type.create(u.attrs)));let s=r&&r[t]||n;if(!n.canReplace(o+1,n.childCount)||!s.type.validContent(a))return!1}let u=i.indexAfter(o),s=r&&r[0];return i.node(o).canReplaceWith(u,u,s?s.type:i.node(o+1).type)}function z3(e,t){let n=e.resolve(t),r=n.index();return z9(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function z9(e,t){return!!(e&&t&&!e.isLeaf&&e.canAppend(t))}function z4(e,t,n=-1){let r=e.resolve(t);for(let e=r.depth;;e--){let i,o,a=r.index(e);if(e==r.depth?(i=r.nodeBefore,o=r.nodeAfter):n>0?(i=r.node(e+1),a++,o=r.node(e).maybeChild(a)):(i=r.node(e).maybeChild(a-1),o=r.node(e+1)),i&&!i.isTextblock&&z9(i,o)&&r.node(e).canReplace(a,a+1))return t;if(0==e)break;t=n<0?r.before(e):r.after(e)}}function z8(e,t,n=t,r=zt.empty){if(t==n&&!r.size)return null;let i=e.resolve(t),o=e.resolve(n);return!r.openStart&&!r.openEnd&&i.start()==o.start()&&i.parent.canReplace(i.index(),o.index(),r.content)?new z$(t,n,r):new z7(i,o,r).fit()}zV.jsonID("replaceAround",zX);class z7{constructor(e,t,n){this.$from=e,this.$to=t,this.unplaced=n,this.frontier=[],this.placed=V3.empty;for(let t=0;t<=e.depth;t++){let n=e.node(t);this.frontier.push({type:n.type,match:n.contentMatchAt(e.indexAfter(t))})}for(let t=e.depth;t>0;t--)this.placed=V3.from(e.node(t).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let e=this.findFittable();e?this.placeNodes(e):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,n=this.$from,r=this.close(e<0?this.$to:n.doc.resolve(e));if(!r)return null;let i=this.placed,o=n.depth,a=r.depth;for(;o&&a&&1==i.childCount;)i=i.firstChild.content,o--,a--;let u=new zt(i,o,a);return e>-1?new zX(n.pos,e,this.$to.pos,this.$to.end(),u,t):u.size||n.pos!=this.$to.pos?new z$(n.pos,r.pos,u):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,n=0,r=this.unplaced.openEnd;n<e;n++){let i=t.firstChild;if(t.childCount>1&&(r=0),i.type.spec.isolating&&r<=n){e=n;break}t=i.content}for(let t=1;t<=2;t++)for(let n=1==t?e:this.unplaced.openStart;n>=0;n--){let e=null,r=(n?(e=Yn(this.unplaced.content,n-1).firstChild).content:this.unplaced.content).firstChild;for(let i=this.depth;i>=0;i--){let{type:o,match:a}=this.frontier[i],u,s=null;if(1==t&&(r?a.matchType(r.type)||(s=a.fillBefore(V3.from(r),!1)):e&&o.compatibleContent(e.type)))return{sliceDepth:n,frontierDepth:i,parent:e,inject:s};if(2==t&&r&&(u=a.findWrapping(r.type)))return{sliceDepth:n,frontierDepth:i,parent:e,wrap:u};if(e&&a.matchType(e.type))break}}}openMore(){let{content:e,openStart:t,openEnd:n}=this.unplaced,r=Yn(e,t);return!!r.childCount&&!r.firstChild.isLeaf&&(this.unplaced=new zt(e,t+1,Math.max(n,r.size+t>=e.size-n?t+1:0)),!0)}dropNode(){let{content:e,openStart:t,openEnd:n}=this.unplaced,r=Yn(e,t);if(r.childCount<=1&&t>0){let i=e.size-t<=t+r.size;this.unplaced=new zt(Ye(e,t-1,1),t-1,i?t-1:n)}else this.unplaced=new zt(Ye(e,t,1),t,n)}placeNodes({sliceDepth:e,frontierDepth:t,parent:n,inject:r,wrap:i}){for(;this.depth>t;)this.closeFrontierNode();if(i)for(let e=0;e<i.length;e++)this.openFrontierNode(i[e]);let o=this.unplaced,a=n?n.content:o.content,u=o.openStart-e,s=0,l=[],{match:c,type:d}=this.frontier[t];if(r){for(let e=0;e<r.childCount;e++)l.push(r.child(e));c=c.matchFragment(r)}let f=a.size+e-(o.content.size-o.openEnd);for(;s<a.childCount;){let e=a.child(s),t=c.matchType(e.type);if(!t)break;(++s>1||0==u||e.content.size)&&(c=t,l.push(function e(t,n,r){if(n<=0)return t;let i=t.content;return n>1&&(i=i.replaceChild(0,e(i.firstChild,n-1,1==i.childCount?r-1:0))),n>0&&(i=t.type.contentMatch.fillBefore(i).append(i),r<=0&&(i=i.append(t.type.contentMatch.matchFragment(i).fillBefore(V3.empty,!0)))),t.copy(i)}(e.mark(d.allowedMarks(e.marks)),1==s?u:0,s==a.childCount?f:-1)))}let p=s==a.childCount;p||(f=-1),this.placed=Yt(this.placed,t,V3.from(l)),this.frontier[t].match=c,p&&f<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let e=0,t=a;e<f;e++){let e=t.lastChild;this.frontier.push({type:e.type,match:e.contentMatchAt(e.childCount)}),t=e.content}this.unplaced=p?0==e?zt.empty:new zt(Ye(o.content,e-1,1),e-1,f<0?o.openEnd:e-1):new zt(Ye(o.content,e,s),o.openStart,o.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return -1;let e=this.frontier[this.depth],t;if(!e.type.isTextblock||!Yr(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.depth==this.depth)return -1;let{depth:n}=this.$to,r=this.$to.after(n);for(;n>1&&r==this.$to.end(--n);)++r;return r}findCloseLevel(e){e:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:n,type:r}=this.frontier[t],i=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),o=Yr(e,t,r,n,i);if(o){for(let n=t-1;n>=0;n--){let{match:t,type:r}=this.frontier[n],i=Yr(e,n,r,t,!0);if(!i||i.childCount)continue e}return{depth:t,fit:o,move:i?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=Yt(this.placed,t.depth,t.fit)),e=t.move;for(let n=t.depth+1;n<=e.depth;n++){let t=e.node(n),r=t.type.contentMatch.fillBefore(t.content,!0,e.index(n));this.openFrontierNode(t.type,t.attrs,r)}return e}openFrontierNode(e,t=null,n){let r=this.frontier[this.depth];r.match=r.match.matchType(e),this.placed=Yt(this.placed,this.depth,V3.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let e=this.frontier.pop().match.fillBefore(V3.empty,!0);e.childCount&&(this.placed=Yt(this.placed,this.frontier.length,e))}}function Ye(e,t,n){return 0==t?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(Ye(e.firstChild.content,t-1,n)))}function Yt(e,t,n){return 0==t?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(Yt(e.lastChild.content,t-1,n)))}function Yn(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function Yr(e,t,n,r,i){let o=e.node(t),a=i?e.indexAfter(t):e.index(t);if(a==o.childCount&&!n.compatibleContent(o.type))return null;let u=r.fillBefore(o.content,!0,a);return u&&!function(e,t,n){for(let r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}(n,o.content,a)?u:null}let Yi=class e extends zV{constructor(e,t,n){super(),this.pos=e,this.attr=t,this.value=n}apply(e){let t=e.nodeAt(this.pos);if(!t)return zz.fail("No node at attribute step's position");let n=Object.create(null);for(let e in t.attrs)n[e]=t.attrs[e];n[this.attr]=this.value;let r=t.type.create(n,null,t.marks);return zz.fromReplace(e,this.pos,this.pos+1,new zt(V3.from(r),0,t.isLeaf?0:1))}getMap(){return zN.empty}invert(t){return new e(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new e(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,n){if("number"!=typeof n.pos||"string"!=typeof n.attr)throw RangeError("Invalid input for AttrStep.fromJSON");return new e(n.pos,n.attr,n.value)}};zV.jsonID("attr",Yi);let Yo=class extends Error{};(Yo=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n}).prototype=Object.create(Error.prototype),Yo.prototype.constructor=Yo,Yo.prototype.name="TransformError";let Ya=Object.create(null);class Yu{constructor(e,t,n){this.$anchor=e,this.$head=t,this.ranges=n||[new Ys(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,t=zt.empty){let n=t.content.lastChild,r=null;for(let e=0;e<t.openEnd;e++)r=n,n=n.lastChild;let i=e.steps.length,o=this.ranges;for(let a=0;a<o.length;a++){let{$from:u,$to:s}=o[a],l=e.mapping.slice(i);e.replaceRange(l.map(u.pos),l.map(s.pos),a?zt.empty:t),0==a&&Yy(e,i,(n?n.isInline:r&&r.isTextblock)?-1:1)}}replaceWith(e,t){let n=e.steps.length,r=this.ranges;for(let i=0;i<r.length;i++){let{$from:o,$to:a}=r[i],u=e.mapping.slice(n),s=u.map(o.pos),l=u.map(a.pos);i?e.deleteRange(s,l):(e.replaceRangeWith(s,l,t),Yy(e,n,t.isInline?-1:1))}}static findFrom(e,t,n=!1){let r=e.parent.inlineContent?new Yd(e):Yg(e.node(0),e.parent,e.pos,e.index(),t,n);if(r)return r;for(let r=e.depth-1;r>=0;r--){let i=t<0?Yg(e.node(0),e.node(r),e.before(r+1),e.index(r),t,n):Yg(e.node(0),e.node(r),e.after(r+1),e.index(r)+1,t,n);if(i)return i}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new Yh(e.node(0))}static atStart(e){return Yg(e,e,0,0,1)||new Yh(e)}static atEnd(e){return Yg(e,e,e.content.size,e.childCount,-1)||new Yh(e)}static fromJSON(e,t){if(!t||!t.type)throw RangeError("Invalid input for Selection.fromJSON");let n=Ya[t.type];if(!n)throw RangeError(`No selection type ${t.type} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in Ya)throw RangeError("Duplicate use of selection JSON ID "+e);return Ya[e]=t,t.prototype.jsonID=e,t}getBookmark(){return Yd.between(this.$anchor,this.$head).getBookmark()}}Yu.prototype.visible=!0;class Ys{constructor(e,t){this.$from=e,this.$to=t}}let Yl=!1;function Yc(e){Yl||e.parent.inlineContent||(Yl=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class Yd extends Yu{constructor(e,t=e){Yc(e),Yc(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let n=e.resolve(t.map(this.head));if(!n.parent.inlineContent)return Yu.near(n);let r=e.resolve(t.map(this.anchor));return new Yd(r.parent.inlineContent?r:n,n)}replace(e,t=zt.empty){if(super.replace(e,t),t==zt.empty){let t=this.$from.marksAcross(this.$to);t&&e.ensureMarks(t)}}eq(e){return e instanceof Yd&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new Yf(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if("number"!=typeof t.anchor||"number"!=typeof t.head)throw RangeError("Invalid input for TextSelection.fromJSON");return new Yd(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,n=t){let r=e.resolve(t);return new this(r,n==t?r:e.resolve(n))}static between(e,t,n){let r=e.pos-t.pos;if((!n||r)&&(n=r>=0?1:-1),!t.parent.inlineContent){let e=Yu.findFrom(t,n,!0)||Yu.findFrom(t,-n,!0);if(!e)return Yu.near(t,n);t=e.$head}return e.parent.inlineContent||(0==r?e=t:(e=(Yu.findFrom(e,-n,!0)||Yu.findFrom(e,n,!0)).$anchor).pos<t.pos!=r<0&&(e=t)),new Yd(e,t)}}Yu.jsonID("text",Yd);class Yf{constructor(e,t){this.anchor=e,this.head=t}map(e){return new Yf(e.map(this.anchor),e.map(this.head))}resolve(e){return Yd.between(e.resolve(this.anchor),e.resolve(this.head))}}class Yp extends Yu{constructor(e){let t=e.nodeAfter;super(e,e.node(0).resolve(e.pos+t.nodeSize)),this.node=t}map(e,t){let{deleted:n,pos:r}=t.mapResult(this.anchor),i=e.resolve(r);return n?Yu.near(i):new Yp(i)}content(){return new zt(V3.from(this.node),0,0)}eq(e){return e instanceof Yp&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new YA(this.anchor)}static fromJSON(e,t){if("number"!=typeof t.anchor)throw RangeError("Invalid input for NodeSelection.fromJSON");return new Yp(e.resolve(t.anchor))}static create(e,t){return new Yp(e.resolve(t))}static isSelectable(e){return!e.isText&&!1!==e.type.spec.selectable}}Yp.prototype.visible=!1,Yu.jsonID("node",Yp);class YA{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:n}=e.mapResult(this.anchor);return t?new Yf(n,n):new YA(n)}resolve(e){let t=e.resolve(this.anchor),n=t.nodeAfter;return n&&Yp.isSelectable(n)?new Yp(t):Yu.near(t)}}class Yh extends Yu{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=zt.empty){if(t==zt.empty){e.delete(0,e.doc.content.size);let t=Yu.atStart(e.doc);t.eq(e.selection)||e.setSelection(t)}else super.replace(e,t)}toJSON(){return{type:"all"}}static fromJSON(e){return new Yh(e)}map(e){return new Yh(e)}eq(e){return e instanceof Yh}getBookmark(){return Ym}}Yu.jsonID("all",Yh);let Ym={map(){return this},resolve:e=>new Yh(e)};function Yg(e,t,n,r,i,o=!1){if(t.inlineContent)return Yd.create(e,n);for(let a=r-(i>0?0:1);i>0?a<t.childCount:a>=0;a+=i){let r=t.child(a);if(r.isAtom){if(!o&&Yp.isSelectable(r))return Yp.create(e,n-(i<0?r.nodeSize:0))}else{let t=Yg(e,r,n+i,i<0?r.childCount:0,i,o);if(t)return t}n+=r.nodeSize*i}return null}function Yy(e,t,n){let r,i=e.steps.length-1;if(i<t)return;let o=e.steps[i];(o instanceof z$||o instanceof zX)&&(e.mapping.maps[i].forEach((e,t,n,i)=>{null==r&&(r=i)}),e.setSelection(Yu.near(e.doc.resolve(r),n)))}function Yv(e,t){return t&&e?e.bind(t):e}class Yx{constructor(e,t,n){this.name=e,this.init=Yv(t.init,n),this.apply=Yv(t.apply,n)}}new Yx("doc",{init:e=>e.doc||e.schema.topNodeType.createAndFill(),apply:e=>e.doc}),new Yx("selection",{init:(e,t)=>e.selection||Yu.atStart(t.doc),apply:e=>e.selection}),new Yx("storedMarks",{init:e=>e.storedMarks||null,apply:(e,t,n,r)=>r.selection.$cursor?e.storedMarks:null}),new Yx("scrollToSelection",{init:()=>0,apply:(e,t)=>e.scrolledIntoView?t+1:t});class Yb{constructor(e){this.spec=e,this.props={},e.props&&function e(t,n,r){for(let i in t){let o=t[i];o instanceof Function?o=o.bind(n):"handleDOMEvents"==i&&(o=e(o,n,{})),r[i]=o}return r}(e.props,this,this.props),this.key=e.key?e.key.key:YS("plugin")}getState(e){return e[this.key]}}let YC=Object.create(null);function YS(e){return e in YC?e+"$"+ ++YC[e]:(YC[e]=0,e+"$")}class Yw{constructor(e="key"){this.key=YS(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}let YI=function(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t},Y_=function(e,t,n,r){return n&&(Yk(e,t,n,r,-1)||Yk(e,t,n,r,1))},YT=/^(img|br|input|textarea|hr)$/i;function Yk(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:YO(e))){let n=e.parentNode;if(!n||1!=n.nodeType||YR(e)||YT.test(e.nodeName)||"false"==e.contentEditable)return!1;t=YI(e)+(i<0?0:1),e=n}else{if(1!=e.nodeType||"false"==(e=e.childNodes[t+(i<0?-1:0)]).contentEditable)return!1;t=i<0?YO(e):0}}}function YO(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function YR(e){let t;for(let n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}let YE=function(e){return e.focusNode&&Y_(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function Yj(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}let YF="u">typeof navigator?navigator:null,YM="u">typeof document?document:null,YU=YF&&YF.userAgent||"",YL=/Edge\/(\d+)/.exec(YU),YK=/MSIE \d/.exec(YU),YB=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(YU),YP=!!(YK||YB||YL),YW=YK?document.documentMode:YB?+YB[1]:YL?+YL[1]:0,YD=!YP&&/gecko\/(\d+)/i.test(YU);YD&&(/Firefox\/(\d+)/.exec(YU)||[0,0])[1];let YN=!YP&&/Chrome\/(\d+)/.exec(YU),Yq=!!YN,YQ=YN?+YN[1]:0,YV=!YP&&!!YF&&/Apple Computer/.test(YF.vendor),Yz=YV&&(/Mobile\/\w+/.test(YU)||!!YF&&YF.maxTouchPoints>2),YY=Yz||!!YF&&/Mac/.test(YF.platform),YH=!!YF&&/Win/.test(YF.platform),YG=/Android \d/.test(YU),YZ=!!YM&&"webkitFontSmoothing"in YM.documentElement.style,YJ=YZ?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function Y$(e){return e.editable?e.hasFocus():function(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(3==t.anchorNode.nodeType?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(3==t.focusNode.nodeType?t.focusNode.parentNode:t.focusNode))}catch{return!1}}(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function YX(e,t=!1){let n=e.state.selection;if(function(e,t){if(t instanceof Yp){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(Y5(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else Y5(e)}(e,n),Y$(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&Yq){let t=e.domSelectionRange(),n=e.domObserver.currentSelection;if(t.anchorNode&&n.anchorNode&&Y_(t.anchorNode,t.anchorOffset,n.anchorNode,n.anchorOffset)){e.input.mouseDown.delayedSelectionSync=!0,e.domObserver.setCurSelection();return}}if(e.domObserver.disconnectSelection(),e.cursorWrapper)!function(e){let t=e.domSelection(),n=document.createRange();if(!t)return;let r=e.cursorWrapper.dom,i="IMG"==r.nodeName;i?n.setStart(r.parentNode,YI(r)+1):n.setStart(r,0),n.collapse(!0),t.removeAllRanges(),t.addRange(n),!i&&!e.state.selection.visible&&YP&&YW<=11&&(r.disabled=!0,r.disabled=!1)}(e);else{let r,i,o,a,{anchor:u,head:s}=n,l,c;!Y0||n instanceof Yd||(n.$from.parent.inlineContent||(l=Y1(e,n.from)),n.empty||n.$from.parent.inlineContent||(c=Y1(e,n.to))),e.docView.setSelection(u,s,e.root,t),Y0&&(l&&Y6(l),c&&Y6(c)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&((r=e.dom.ownerDocument).removeEventListener("selectionchange",e.input.hideSelectionGuard),o=(i=e.domSelectionRange()).anchorNode,a=i.anchorOffset,r.addEventListener("selectionchange",e.input.hideSelectionGuard=()=>{(i.anchorNode!=o||i.anchorOffset!=a)&&(r.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout(()=>{(!Y$(e)||e.state.selection.visible)&&e.dom.classList.remove("ProseMirror-hideselection")},20))})))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}let Y0=YV||Yq&&YQ<63;function Y1(e,t){let{node:n,offset:r}=e.docView.domFromPos(t,0),i=r<n.childNodes.length?n.childNodes[r]:null,o=r?n.childNodes[r-1]:null;if(YV&&i&&"false"==i.contentEditable)return Y2(i);if((!i||"false"==i.contentEditable)&&(!o||"false"==o.contentEditable)){if(i)return Y2(i);if(o)return Y2(o)}}function Y2(e){return e.contentEditable="true",YV&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function Y6(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function Y5(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function Y3(e,t,n,r){return e.someProp("createSelectionBetween",r=>r(e,t,n))||Yd.between(t,n,r)}function Y9(e,t){let{$anchor:n,$head:r}=e.selection,i=t>0?n.max(r):n.min(r),o=i.parent.inlineContent?i.depth?e.doc.resolve(t>0?i.after():i.before()):null:i;return o&&Yu.findFrom(o,t)}function Y4(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function Y8(e,t,n){let r=e.state.selection;if(r instanceof Yd){if(n.indexOf("s")>-1){let{$head:n}=r,i=n.textOffset?null:t<0?n.nodeBefore:n.nodeAfter;if(!i||i.isText||!i.isLeaf)return!1;let o=e.state.doc.resolve(n.pos+i.nodeSize*(t<0?-1:1));return Y4(e,new Yd(r.$anchor,o))}if(!r.empty)return!1;if(e.endOfTextblock(t>0?"forward":"backward")){let n=Y9(e.state,t);return!!n&&n instanceof Yp&&Y4(e,n)}if(!(YY&&n.indexOf("m")>-1)){let n=r.$head,i=n.textOffset?null:t<0?n.nodeBefore:n.nodeAfter,o;if(!i||i.isText)return!1;let a=t<0?n.pos-i.nodeSize:n.pos;return!!(i.isAtom||(o=e.docView.descAt(a))&&!o.contentDOM)&&(Yp.isSelectable(i)?Y4(e,new Yp(t<0?e.state.doc.resolve(n.pos-i.nodeSize):n)):!!YZ&&Y4(e,new Yd(e.state.doc.resolve(t<0?a:a+i.nodeSize))))}}else{if(r instanceof Yp&&r.node.isInline)return Y4(e,new Yd(t>0?r.$to:r.$from));{let n=Y9(e.state,t);return!!n&&Y4(e,n)}}}function Y7(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function He(e,t){let n=e.pmViewDesc;return n&&0==n.size&&(t<0||e.nextSibling||"BR"!=e.nodeName)}function Ht(e,t){return t<0?function(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i,o,a=!1;for(YD&&1==n.nodeType&&r<Y7(n)&&He(n.childNodes[r],-1)&&(a=!0);;)if(r>0){if(1!=n.nodeType)break;{let e=n.childNodes[r-1];if(He(e,-1))i=n,o=--r;else if(3==e.nodeType)r=(n=e).nodeValue.length;else break}}else{if(Hn(n))break;{let t=n.previousSibling;for(;t&&He(t,-1);)i=n.parentNode,o=YI(t),t=t.previousSibling;if(t)r=Y7(n=t);else{if((n=n.parentNode)==e.dom)break;r=0}}}a?Hr(e,n,r):i&&Hr(e,i,o)}(e):function(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i=Y7(n),o,a;for(;;)if(r<i){if(1!=n.nodeType)break;if(He(n.childNodes[r],1))o=n,a=++r;else break}else{if(Hn(n))break;{let t=n.nextSibling;for(;t&&He(t,1);)o=t.parentNode,a=YI(t)+1,t=t.nextSibling;if(t)r=0,i=Y7(n=t);else{if((n=n.parentNode)==e.dom)break;r=i=0}}}o&&Hr(e,o,a)}(e)}function Hn(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function Hr(e,t,n){if(3!=t.nodeType){let e,r;(r=function(e,t){for(;e&&t==e.childNodes.length&&!YR(e);)t=YI(e)+1,e=e.parentNode;for(;e&&t<e.childNodes.length;){let n=e.childNodes[t];if(3==n.nodeType)return n;if(1==n.nodeType&&"false"==n.contentEditable)break;e=n,t=0}}(t,n))?(t=r,n=0):(e=function(e,t){for(;e&&!t&&!YR(e);)t=YI(e),e=e.parentNode;for(;e&&t;){let n=e.childNodes[t-1];if(3==n.nodeType)return n;if(1==n.nodeType&&"false"==n.contentEditable)break;t=(e=n).childNodes.length}}(t,n))&&(t=e,n=e.nodeValue.length)}let r=e.domSelection();if(!r)return;if(YE(r)){let e=document.createRange();e.setEnd(t,n),e.setStart(t,n),r.removeAllRanges(),r.addRange(e)}else r.extend&&r.extend(t,n);e.domObserver.setCurSelection();let{state:i}=e;setTimeout(()=>{e.state==i&&YX(e)},50)}function Hi(e,t){let n=e.state.doc.resolve(t);if(!(Yq||YH)&&n.parent.inlineContent){let r=e.coordsAtPos(t);if(t>n.start()){let n=e.coordsAtPos(t-1),i=(n.top+n.bottom)/2;if(i>r.top&&i<r.bottom&&Math.abs(n.left-r.left)>1)return n.left<r.left?"ltr":"rtl"}if(t<n.end()){let n=e.coordsAtPos(t+1),i=(n.top+n.bottom)/2;if(i>r.top&&i<r.bottom&&Math.abs(n.left-r.left)>1)return n.left>r.left?"ltr":"rtl"}}return"rtl"==getComputedStyle(e.dom).direction?"rtl":"ltr"}function Ho(e,t,n){let r=e.state.selection;if(r instanceof Yd&&!r.empty||n.indexOf("s")>-1||YY&&n.indexOf("m")>-1)return!1;let{$from:i,$to:o}=r;if(!i.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let n=Y9(e.state,t);if(n&&n instanceof Yp)return Y4(e,n)}if(!i.parent.inlineContent){let n=t<0?i:o,a=r instanceof Yh?Yu.near(n,t):Yu.findFrom(n,t);return!!a&&Y4(e,a)}return!1}function Ha(e,t){if(!(e.state.selection instanceof Yd))return!0;let{$head:n,$anchor:r,empty:i}=e.state.selection;if(!n.sameParent(r))return!0;if(!i)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let o=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(o&&!o.isText){let r=e.state.tr;return t<0?r.delete(n.pos-o.nodeSize,n.pos):r.delete(n.pos,n.pos+o.nodeSize),e.dispatch(r),!0}return!1}function Hu(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function Hs(e,t){e.someProp("transformCopied",n=>{t=n(t,e)});let n=[],{content:r,openStart:i,openEnd:o}=t;for(;i>1&&o>1&&1==r.childCount&&1==r.firstChild.childCount;){i--,o--;let e=r.firstChild;n.push(e.type.name,e.attrs!=e.type.defaultAttrs?e.attrs:null),r=e.content}let a=e.someProp("clipboardSerializer")||zB.fromSchema(e.state.schema),u=Hm(),s=u.createElement("div");s.appendChild(a.serializeFragment(r,{document:u}));let l=s.firstChild,c,d=0;for(;l&&1==l.nodeType&&(c=HA[l.nodeName.toLowerCase()]);){for(let e=c.length-1;e>=0;e--){let t=u.createElement(c[e]);for(;s.firstChild;)t.appendChild(s.firstChild);s.appendChild(t),d++}l=s.firstChild}return l&&1==l.nodeType&&l.setAttribute("data-pm-slice",`${i} ${o}${d?` -${d}`:""} ${JSON.stringify(n)}`),{dom:s,text:e.someProp("clipboardTextSerializer",n=>n(t,e))||t.content.textBetween(0,t.content.size,`