@prismicio/editor-fields 0.4.52 → 0.4.53

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/dist/GroupEditor.d.ts +2 -2
  2. package/dist/SliceSelection.d.ts +4 -4
  3. package/dist/core/MediaLibrary/components/MediaLibraryContext.d.ts +4 -4
  4. package/dist/core/MediaLibrary/components/MediaLibraryToast.d.ts +7 -7
  5. package/dist/core/MediaLibrary/components/MediaList.d.ts +2 -2
  6. package/dist/core/MediaLibrary/components/NewMediaLibraryFeaturesBanner.d.ts +2 -2
  7. package/dist/core/MediaLibrary/components/Sidepane/components/SidepaneContainer.d.ts +2 -2
  8. package/dist/core/MediaLibrary/components/Sidepane/components/SidepaneMetadataTags/SingleMediaMetadataTags.d.ts +2 -2
  9. package/dist/core/MediaLibrary/hooks/mediaLibraryData.d.ts +18 -18
  10. package/dist/core/MediaLibrary/hooks/uploadersData.d.ts +2 -2
  11. package/dist/core/MediaLibrary/hooks/useMediaLibraryAnalytics.d.ts +4 -4
  12. package/dist/core/MediaLibrary/hooks/useMediaLibraryCacheInvalidation.d.ts +2 -2
  13. package/dist/core/MediaLibrary/hooks/useMediaLibraryUpload.d.ts +6 -6
  14. package/dist/core/MediaLibrary/hooks/useSelectedMedia.d.ts +2 -2
  15. package/dist/core/SelectionManager/SelectionManagerTypes.d.ts +8 -8
  16. package/dist/core/UID.d.ts +6 -6
  17. package/dist/core/UnsplashLibrary/UnsplashLibrary.d.ts +2 -2
  18. package/dist/core/document.d.ts +2 -2
  19. package/dist/core/imageUtils.d.ts +4 -4
  20. package/dist/core/service/customType.d.ts +3 -3
  21. package/dist/core/service/document.d.ts +12 -12
  22. package/dist/core/service/onboarding.d.ts +5 -5
  23. package/dist/fields/ImageField/Components/ImageAltControl.d.ts +2 -2
  24. package/dist/fields/ImageField/Components/ImageFieldTitle.d.ts +2 -2
  25. package/dist/fields/ImageField/CropperDialog/CropperDialog.d.ts +3 -3
  26. package/dist/fields/ImageField/CropperDialog/croppedImage.d.ts +10 -10
  27. package/dist/fields/ImageField/MediaDialog/MediaDialog.d.ts +2 -2
  28. package/dist/fields/ImageField/useImageField.d.ts +2 -2
  29. package/dist/fields/IntegrationField/IntegrationInput.d.ts +6 -6
  30. package/dist/fields/LinkField/Documents/Filters.d.ts +6 -6
  31. package/dist/fields/LinkField/Documents/documentsData.d.ts +2 -2
  32. package/dist/fields/LinkField/LinkDescriptionCard.d.ts +2 -2
  33. package/dist/fields/LinkField/LinkField.d.ts +7 -7
  34. package/dist/fields/LinkField/LinkImageCard.d.ts +2 -2
  35. package/dist/fields/RichTextField/BubbleMenu/Label/LabelItems.d.ts +2 -2
  36. package/dist/fields/RichTextField/BubbleMenu/Link/DocumentDescriptionCard.d.ts +2 -2
  37. package/dist/fields/RichTextField/BubbleMenu/Link/LinkItems.d.ts +2 -2
  38. package/dist/fields/RichTextField/BubbleMenu/Link/LinkPopover.d.ts +4 -4
  39. package/dist/fields/RichTextField/BubbleMenu/Link/SetMediaLinkModal.d.ts +2 -2
  40. package/dist/fields/RichTextField/BubbleMenu/Link/SetWebLinkModal.d.ts +2 -2
  41. package/dist/fields/RichTextField/BubbleMenu/MarkItems.d.ts +2 -2
  42. package/dist/fields/RichTextField/BubbleMenu/NodeItems.d.ts +2 -2
  43. package/dist/fields/RichTextField/extensions/Label/Label.d.ts +4 -4
  44. package/dist/fields/RichTextField/extensions/Label/LabelModel.d.ts +2 -2
  45. package/dist/fields/RichTextField/extensions/Link/LinkModel.d.ts +11 -11
  46. package/dist/fields/RichTextField/globalExtensions/TextDirection.d.ts +2 -2
  47. package/dist/fields/RichTextField/models/RichTextConfig.d.ts +2 -2
  48. package/dist/index.cjs.js +12 -12
  49. package/dist/index.es.js +3436 -3418
  50. package/dist/slices/LegacySliceEditor.d.ts +2 -2
  51. package/dist/slices/utils.d.ts +1 -1
  52. package/dist/zones/Components/LegacyCustomLabelSelect.d.ts +2 -2
  53. package/dist/zones/NonRepeatableZoneEditor.d.ts +2 -2
  54. package/dist/zones/SliceZoneEditor.d.ts +2 -2
  55. package/package.json +4 -4
package/dist/index.cjs.js CHANGED
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var WO;function fz(){return WO||(WO=1,process.env.NODE_ENV!=="production"&&function(){var e=E,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),A=Symbol.for("react.offscreen"),m=Symbol.iterator,g="@@iterator";function _(R){if(R===null||typeof R!="object")return null;var V=m&&R[m]||R[g];return typeof V=="function"?V:null}var b=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function I(R){{for(var V=arguments.length,te=new Array(V>1?V-1:0),Se=1;Se<V;Se++)te[Se-1]=arguments[Se];x("error",R,te)}}function x(R,V,te){{var Se=b.ReactDebugCurrentFrame,Je=Se.getStackAddendum();Je!==""&&(V+="%s",te=te.concat([Je]));var it=te.map(function(qe){return String(qe)});it.unshift("Warning: "+V),Function.prototype.apply.call(console[R],console,it)}}var v=!1,S=!1,y=!1,T=!1,w=!1,O;O=Symbol.for("react.module.reference");function F(R){return!!(typeof R=="string"||typeof R=="function"||R===r||R===o||w||R===i||R===c||R===l||T||R===A||v||S||y||typeof R=="object"&&R!==null&&(R.$$typeof===p||R.$$typeof===d||R.$$typeof===a||R.$$typeof===s||R.$$typeof===u||R.$$typeof===O||R.getModuleId!==void 0))}function $(R,V,te){var Se=R.displayName;if(Se)return Se;var Je=V.displayName||V.name||"";return Je!==""?te+"("+Je+")":te}function P(R){return R.displayName||"Context"}function K(R){if(R==null)return null;if(typeof R.tag=="number"&&I("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof R=="function")return R.displayName||R.name||null;if(typeof R=="string")return R;switch(R){case r:return"Fragment";case n:return"Portal";case o:return"Profiler";case i:return"StrictMode";case c:return"Suspense";case l:return"SuspenseList"}if(typeof R=="object")switch(R.$$typeof){case s:var V=R;return P(V)+".Consumer";case a:var te=R;return P(te._context)+".Provider";case u:return $(R,R.render,"ForwardRef");case d:var Se=R.displayName||null;return Se!==null?Se:K(R.type)||"Memo";case p:{var Je=R,it=Je._payload,qe=Je._init;try{return K(qe(it))}catch{return null}}}return null}var J=Object.assign,ee=0,re,D,Y,M,k,q,ue;function ke(){}ke.__reactDisabledLog=!0;function Ie(){{if(ee===0){re=console.log,D=console.info,Y=console.warn,M=console.error,k=console.group,q=console.groupCollapsed,ue=console.groupEnd;var R={configurable:!0,enumerable:!0,value:ke,writable:!0};Object.defineProperties(console,{info:R,log:R,warn:R,error:R,group:R,groupCollapsed:R,groupEnd:R})}ee++}}function rt(){{if(ee--,ee===0){var R={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:J({},R,{value:re}),info:J({},R,{value:D}),warn:J({},R,{value:Y}),error:J({},R,{value:M}),group:J({},R,{value:k}),groupCollapsed:J({},R,{value:q}),groupEnd:J({},R,{value:ue})})}ee<0&&I("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var at=b.ReactCurrentDispatcher,fn;function Zt(R,V,te){{if(fn===void 0)try{throw Error()}catch(Je){var Se=Je.stack.trim().match(/\n( *(at )?)/);fn=Se&&Se[1]||""}return`
9
+ */var WO;function fz(){return WO||(WO=1,process.env.NODE_ENV!=="production"&&function(){var e=E,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),A=Symbol.for("react.offscreen"),m=Symbol.iterator,g="@@iterator";function _(R){if(R===null||typeof R!="object")return null;var V=m&&R[m]||R[g];return typeof V=="function"?V:null}var b=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function I(R){{for(var V=arguments.length,te=new Array(V>1?V-1:0),Se=1;Se<V;Se++)te[Se-1]=arguments[Se];x("error",R,te)}}function x(R,V,te){{var Se=b.ReactDebugCurrentFrame,Je=Se.getStackAddendum();Je!==""&&(V+="%s",te=te.concat([Je]));var it=te.map(function(qe){return String(qe)});it.unshift("Warning: "+V),Function.prototype.apply.call(console[R],console,it)}}var v=!1,S=!1,y=!1,T=!1,w=!1,F;F=Symbol.for("react.module.reference");function k(R){return!!(typeof R=="string"||typeof R=="function"||R===r||R===o||w||R===i||R===c||R===l||T||R===A||v||S||y||typeof R=="object"&&R!==null&&(R.$$typeof===p||R.$$typeof===d||R.$$typeof===a||R.$$typeof===s||R.$$typeof===u||R.$$typeof===F||R.getModuleId!==void 0))}function $(R,V,te){var Se=R.displayName;if(Se)return Se;var Je=V.displayName||V.name||"";return Je!==""?te+"("+Je+")":te}function P(R){return R.displayName||"Context"}function K(R){if(R==null)return null;if(typeof R.tag=="number"&&I("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof R=="function")return R.displayName||R.name||null;if(typeof R=="string")return R;switch(R){case r:return"Fragment";case n:return"Portal";case o:return"Profiler";case i:return"StrictMode";case c:return"Suspense";case l:return"SuspenseList"}if(typeof R=="object")switch(R.$$typeof){case s:var V=R;return P(V)+".Consumer";case a:var te=R;return P(te._context)+".Provider";case u:return $(R,R.render,"ForwardRef");case d:var Se=R.displayName||null;return Se!==null?Se:K(R.type)||"Memo";case p:{var Je=R,it=Je._payload,qe=Je._init;try{return K(qe(it))}catch{return null}}}return null}var Y=Object.assign,ee=0,re,D,G,M,O,q,ue;function ke(){}ke.__reactDisabledLog=!0;function Ie(){{if(ee===0){re=console.log,D=console.info,G=console.warn,M=console.error,O=console.group,q=console.groupCollapsed,ue=console.groupEnd;var R={configurable:!0,enumerable:!0,value:ke,writable:!0};Object.defineProperties(console,{info:R,log:R,warn:R,error:R,group:R,groupCollapsed:R,groupEnd:R})}ee++}}function rt(){{if(ee--,ee===0){var R={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Y({},R,{value:re}),info:Y({},R,{value:D}),warn:Y({},R,{value:G}),error:Y({},R,{value:M}),group:Y({},R,{value:O}),groupCollapsed:Y({},R,{value:q}),groupEnd:Y({},R,{value:ue})})}ee<0&&I("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var at=b.ReactCurrentDispatcher,fn;function Zt(R,V,te){{if(fn===void 0)try{throw Error()}catch(Je){var Se=Je.stack.trim().match(/\n( *(at )?)/);fn=Se&&Se[1]||""}return`
10
10
  `+fn+R}}var rr=!1,dn;{var Hr=typeof WeakMap=="function"?WeakMap:Map;dn=new Hr}function Yr(R,V){if(!R||rr)return"";{var te=dn.get(R);if(te!==void 0)return te}var Se;rr=!0;var Je=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var it;it=at.current,at.current=null,Ie();try{if(V){var qe=function(){throw Error()};if(Object.defineProperty(qe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(qe,[])}catch(Do){Se=Do}Reflect.construct(R,[],qe)}else{try{qe.call()}catch(Do){Se=Do}R.call(qe.prototype)}}else{try{throw Error()}catch(Do){Se=Do}R()}}catch(Do){if(Do&&Se&&typeof Do.stack=="string"){for(var je=Do.stack.split(`
11
11
  `),Kn=Se.stack.split(`
12
12
  `),Rt=je.length-1,Kt=Kn.length-1;Rt>=1&&Kt>=0&&je[Rt]!==Kn[Kt];)Kt--;for(;Rt>=1&&Kt>=0;Rt--,Kt--)if(je[Rt]!==Kn[Kt]){if(Rt!==1||Kt!==1)do if(Rt--,Kt--,Kt<0||je[Rt]!==Kn[Kt]){var Zr=`
@@ -16,7 +16,7 @@ Check the render method of \``+R+"`."}return""}}function Hc(R){{if(R!==void 0){v
16
16
 
17
17
  Check your code at `+V+":"+te+"."}return""}}var Po={};function db(R){{var V=zc();if(!V){var te=typeof R=="string"?R:R.displayName||R.name;te&&(V=`
18
18
 
19
- Check the top-level render call using <`+te+">.")}return V}}function Yc(R,V){{if(!R._store||R._store.validated||R.key!=null)return;R._store.validated=!0;var te=db(V);if(Po[te])return;Po[te]=!0;var Se="";R&&R._owner&&R._owner!==ut.current&&(Se=" It was passed a child from "+K(R._owner.type)+"."),Ir(R),I('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',te,Se),Ir(null)}}function Gs(R,V){{if(typeof R!="object")return;if(vi(R))for(var te=0;te<R.length;te++){var Se=R[te];bi(Se)&&Yc(Se,V)}else if(bi(R))R._store&&(R._store.validated=!0);else if(R){var Je=_(R);if(typeof Je=="function"&&Je!==R.entries)for(var it=Je.call(R),qe;!(qe=it.next()).done;)bi(qe.value)&&Yc(qe.value,V)}}}function XQ(R){{var V=R.type;if(V==null||typeof V=="string")return;var te;if(typeof V=="function")te=V.propTypes;else if(typeof V=="object"&&(V.$$typeof===u||V.$$typeof===d))te=V.propTypes;else return;if(te){var Se=K(V);ir(te,R.props,"prop",Se,R)}else if(V.PropTypes!==void 0&&!Qc){Qc=!0;var Je=K(V);I("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Je||"Unknown")}typeof V.getDefaultProps=="function"&&!V.getDefaultProps.isReactClassApproved&&I("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ez(R){{for(var V=Object.keys(R.props),te=0;te<V.length;te++){var Se=V[te];if(Se!=="children"&&Se!=="key"){Ir(R),I("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Se),Ir(null);break}}R.ref!==null&&(Ir(R),I("Invalid attribute `ref` supplied to `React.Fragment`."),Ir(null))}}function PO(R,V,te,Se,Je,it){{var qe=F(R);if(!qe){var je="";(R===void 0||typeof R=="object"&&R!==null&&Object.keys(R).length===0)&&(je+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Kn=Hc(Je);Kn?je+=Kn:je+=zc();var Rt;R===null?Rt="null":vi(R)?Rt="array":R!==void 0&&R.$$typeof===t?(Rt="<"+(K(R.type)||"Unknown")+" />",je=" Did you accidentally export a JSX literal instead of a component?"):Rt=typeof R,I("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Rt,je)}var Kt=Ee(R,V,te,Je,it);if(Kt==null)return Kt;if(qe){var Zr=V.children;if(Zr!==void 0)if(Se)if(vi(Zr)){for(var Gc=0;Gc<Zr.length;Gc++)Gs(Zr[Gc],R);Object.freeze&&Object.freeze(Zr)}else I("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Gs(Zr,R)}return R===r?ez(Kt):XQ(Kt),Kt}}function tz(R,V,te){return PO(R,V,te,!0)}function nz(R,V,te){return PO(R,V,te,!1)}var rz=nz,iz=tz;vd.Fragment=r,vd.jsx=rz,vd.jsxs=iz}()),vd}var yd={};/**
19
+ Check the top-level render call using <`+te+">.")}return V}}function Yc(R,V){{if(!R._store||R._store.validated||R.key!=null)return;R._store.validated=!0;var te=db(V);if(Po[te])return;Po[te]=!0;var Se="";R&&R._owner&&R._owner!==ut.current&&(Se=" It was passed a child from "+K(R._owner.type)+"."),Ir(R),I('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',te,Se),Ir(null)}}function Gs(R,V){{if(typeof R!="object")return;if(vi(R))for(var te=0;te<R.length;te++){var Se=R[te];bi(Se)&&Yc(Se,V)}else if(bi(R))R._store&&(R._store.validated=!0);else if(R){var Je=_(R);if(typeof Je=="function"&&Je!==R.entries)for(var it=Je.call(R),qe;!(qe=it.next()).done;)bi(qe.value)&&Yc(qe.value,V)}}}function XQ(R){{var V=R.type;if(V==null||typeof V=="string")return;var te;if(typeof V=="function")te=V.propTypes;else if(typeof V=="object"&&(V.$$typeof===u||V.$$typeof===d))te=V.propTypes;else return;if(te){var Se=K(V);ir(te,R.props,"prop",Se,R)}else if(V.PropTypes!==void 0&&!Qc){Qc=!0;var Je=K(V);I("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Je||"Unknown")}typeof V.getDefaultProps=="function"&&!V.getDefaultProps.isReactClassApproved&&I("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ez(R){{for(var V=Object.keys(R.props),te=0;te<V.length;te++){var Se=V[te];if(Se!=="children"&&Se!=="key"){Ir(R),I("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Se),Ir(null);break}}R.ref!==null&&(Ir(R),I("Invalid attribute `ref` supplied to `React.Fragment`."),Ir(null))}}function PO(R,V,te,Se,Je,it){{var qe=k(R);if(!qe){var je="";(R===void 0||typeof R=="object"&&R!==null&&Object.keys(R).length===0)&&(je+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Kn=Hc(Je);Kn?je+=Kn:je+=zc();var Rt;R===null?Rt="null":vi(R)?Rt="array":R!==void 0&&R.$$typeof===t?(Rt="<"+(K(R.type)||"Unknown")+" />",je=" Did you accidentally export a JSX literal instead of a component?"):Rt=typeof R,I("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Rt,je)}var Kt=Ee(R,V,te,Je,it);if(Kt==null)return Kt;if(qe){var Zr=V.children;if(Zr!==void 0)if(Se)if(vi(Zr)){for(var Gc=0;Gc<Zr.length;Gc++)Gs(Zr[Gc],R);Object.freeze&&Object.freeze(Zr)}else I("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Gs(Zr,R)}return R===r?ez(Kt):XQ(Kt),Kt}}function tz(R,V,te){return PO(R,V,te,!0)}function nz(R,V,te){return PO(R,V,te,!1)}var rz=nz,iz=tz;vd.Fragment=r,vd.jsx=rz,vd.jsxs=iz}()),vd}var yd={};/**
20
20
  * @license React
21
21
  * react-jsx-runtime.production.min.js
22
22
  *
@@ -25,15 +25,15 @@ Check the top-level render call using <`+te+">.")}return V}}function Yc(R,V){{if
25
25
  * This source code is licensed under the MIT license found in the
26
26
  * LICENSE file in the root directory of this source tree.
27
27
  */var KO;function dz(){if(KO)return yd;KO=1;var e=E,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function a(s,u,c){var l,d={},p=null,A=null;c!==void 0&&(p=""+c),u.key!==void 0&&(p=""+u.key),u.ref!==void 0&&(A=u.ref);for(l in u)r.call(u,l)&&!o.hasOwnProperty(l)&&(d[l]=u[l]);if(s&&s.defaultProps)for(l in u=s.defaultProps,u)d[l]===void 0&&(d[l]=u[l]);return{$$typeof:t,type:s,key:p,ref:A,props:d,_owner:i.current}}return yd.Fragment=n,yd.jsx=a,yd.jsxs=a,yd}process.env.NODE_ENV==="production"?j1.exports=dz():j1.exports=fz();var f=j1.exports;const pz=18,Az=41,hz=24;function U1(e){const t=e.code.split(`
28
- `).length;return f.jsx(h.ErrorBoundary,{renderError:()=>f.jsx(h.Alert,{title:"Oops! We couldn't load the Code Block",color:"error",noShadow:!0,footerButtons:{action:{onClick:()=>window.location.reload(),text:"Refresh page"}}}),children:f.jsx(E.Suspense,{fallback:f.jsx(h.Skeleton,{height:Az+hz+t*pz,borderRadius:6}),children:f.jsx(h.LazyCodeBlock,{...e})})})}var ye={},B1=function(e,t){return B1=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},B1(e,t)};function mz(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");B1(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var P1=function(){return P1=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},P1.apply(this,arguments)};function gz(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function vz(e,t,n,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(o=(i<3?a(o):i>3?a(t,n,o):a(t,n))||o);return i>3&&o&&Object.defineProperty(t,n,o),o}function yz(e,t){return function(n,r){t(n,r,e)}}function bz(e,t,n,r,i,o){function a(b){if(b!==void 0&&typeof b!="function")throw new TypeError("Function expected");return b}for(var s=r.kind,u=s==="getter"?"get":s==="setter"?"set":"value",c=!t&&e?r.static?e:e.prototype:null,l=t||(c?Object.getOwnPropertyDescriptor(c,r.name):{}),d,p=!1,A=n.length-1;A>=0;A--){var m={};for(var g in r)m[g]=g==="access"?{}:r[g];for(var g in r.access)m.access[g]=r.access[g];m.addInitializer=function(b){if(p)throw new TypeError("Cannot add initializers after decoration has completed");o.push(a(b||null))};var _=(0,n[A])(s==="accessor"?{get:l.get,set:l.set}:l[u],m);if(s==="accessor"){if(_===void 0)continue;if(_===null||typeof _!="object")throw new TypeError("Object expected");(d=a(_.get))&&(l.get=d),(d=a(_.set))&&(l.set=d),(d=a(_.init))&&i.push(d)}else(d=a(_))&&(s==="field"?i.push(d):l[u]=d)}c&&Object.defineProperty(c,r.name,l),p=!0}function Cz(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}function Sz(e){return typeof e=="symbol"?e:"".concat(e)}function _z(e,t,n){return typeof t=="symbol"&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})}function Iz(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function Tz(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(l){try{c(r.next(l))}catch(d){a(d)}}function u(l){try{c(r.throw(l))}catch(d){a(d)}}function c(l){l.done?o(l.value):i(l.value).then(s,u)}c((r=r.apply(e,t||[])).next())})}function xz(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(c){return function(l){return u([c,l])}}function u(c){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(n=0)),n;)try{if(r=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(l){c=[6,l],i=0}finally{r=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}var rS=Object.create?function(e,t,n,r){r===void 0&&(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){r===void 0&&(r=n),e[r]=t[n]};function wz(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&rS(t,e,n)}function D1(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function HM(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function Ez(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(HM(arguments[t]));return e}function $z(){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,s=o.length;a<s;a++,i++)r[i]=o[a];return r}function Rz(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}function Kd(e){return this instanceof Kd?(this.v=e,this):new Kd(e)}function Oz(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),i,o=[];return i={},a("next"),a("throw"),a("return"),i[Symbol.asyncIterator]=function(){return this},i;function a(p){r[p]&&(i[p]=function(A){return new Promise(function(m,g){o.push([p,A,m,g])>1||s(p,A)})})}function s(p,A){try{u(r[p](A))}catch(m){d(o[0][3],m)}}function u(p){p.value instanceof Kd?Promise.resolve(p.value.v).then(c,l):d(o[0][2],p)}function c(p){s("next",p)}function l(p){s("throw",p)}function d(p,A){p(A),o.shift(),o.length&&s(o[0][0],o[0][1])}}function Fz(e){var t,n;return t={},r("next"),r("throw",function(i){throw i}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(i,o){t[i]=e[i]?function(a){return(n=!n)?{value:Kd(e[i](a)),done:!1}:o?o(a):a}:o}}function kz(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof D1=="function"?D1(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[o]=e[o]&&function(a){return new Promise(function(s,u){a=e[o](a),i(s,u,a.done,a.value)})}}function i(o,a,s,u){Promise.resolve(u).then(function(c){o({value:c,done:s})},a)}}function Mz(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var Lz=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function jz(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&rS(t,e,n);return Lz(t,e),t}function Uz(e){return e&&e.__esModule?e:{default:e}}function Bz(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)}function Pz(e,t,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(e,n):i?i.value=n:t.set(e,n),n}function Dz(e,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?t===e:e.has(t)}const Wz=Object.freeze(Object.defineProperty({__proto__:null,get __assign(){return P1},__asyncDelegator:Fz,__asyncGenerator:Oz,__asyncValues:kz,__await:Kd,__awaiter:Tz,__classPrivateFieldGet:Bz,__classPrivateFieldIn:Dz,__classPrivateFieldSet:Pz,__createBinding:rS,__decorate:vz,__esDecorate:bz,__exportStar:wz,__extends:mz,__generator:xz,__importDefault:Uz,__importStar:jz,__makeTemplateObject:Mz,__metadata:Iz,__param:yz,__propKey:Sz,__read:HM,__rest:gz,__runInitializers:Cz,__setFunctionName:_z,__spread:Ez,__spreadArray:Rz,__spreadArrays:$z,__values:D1},Symbol.toStringTag,{value:"Module"})),Q=Ku(Wz);var or={};function YM(e){return function(t){return function(n){return n.reduce(function(r,i){return e.alt(r,function(){return i})},t)}}}const Kz=Object.freeze(Object.defineProperty({__proto__:null,altAll:YM},Symbol.toStringTag,{value:"Module"}));function Nz(e){return YM(e)(e.zero())}const qz=Object.freeze(Object.defineProperty({__proto__:null,altAll:Nz},Symbol.toStringTag,{value:"Module"}));var GM=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))}}}}},iS=function(e){return function(){return{concat:function(t,n){return function(r){return e.concat(t(r),n(r))}}}}},JM=function(e){var t=iS(e);return function(){return{concat:t().concat,empty:function(){return e.empty}}}},oS=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}}},ZM=function(e){var t=oS(e);return{add:t.add,mul:t.mul,one:t.one,zero:t.zero,sub:function(n,r){return function(i){return e.sub(n(i),r(i))}}}},Vz=function(e){return function(t){return t(e)}};function N(e){return e}var bl=N;function pr(e){return function(){return e}}var aS=pr(!0),XM=pr(!1),eL=pr(null),sS=pr(void 0),Qz=sS;function zz(e){return function(t,n){return e(n,t)}}function H(e,t,n,r,i,o,a,s,u){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 s(a(o(i(r(n(t(e.apply(this,arguments))))))))};case 9:return function(){return u(s(a(o(i(r(n(t(e.apply(this,arguments)))))))))}}}function tL(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e}function Hz(e){return e+1}function Yz(e){return e-1}function nL(e){throw new Error("Called `absurd` function which should be uncallable")}function Gz(e){return function(t){return e.apply(void 0,t)}}function Jz(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e(t)}}function C(e,t,n,r,i,o,a,s,u){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 s(a(o(i(r(n(t(e)))))));case 9:return u(s(a(o(i(r(n(t(e))))))));default:{for(var c=arguments[0],l=1;l<arguments.length;l++)c=arguments[l](c);return c}}}var Zz=nL,Ar=function(e,t){return t};function Xz(e){return function(t){return!e(t)}}var eH=function(){return{concat:function(e,t){return H(e,t)},empty:N}};const rL=Object.freeze(Object.defineProperty({__proto__:null,SK:Ar,absurd:nL,apply:Vz,constFalse:XM,constNull:eL,constTrue:aS,constUndefined:sS,constVoid:Qz,constant:pr,decrement:Yz,flip:zz,flow:H,getBooleanAlgebra:GM,getEndomorphismMonoid:eH,getMonoid:JM,getRing:ZM,getSemigroup:iS,getSemiring:oS,hole:Zz,identity:N,increment:Hz,not:Xz,pipe:C,tuple:tL,tupled:Gz,unsafeCoerce:bl,untupled:Jz},Symbol.toStringTag,{value:"Module"}));var tH=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},Vt=function(e){return e._tag==="None"},It=function(e){return e._tag==="Some"},Ce={_tag:"None"},de=function(e){return{_tag:"Some",value:e}},nn=function(e){return e._tag==="Left"},uS=function(e){return e._tag==="Right"},ea=function(e){return{_tag:"Left",left:e}},hs=function(e){return{_tag:"Right",right:e}},$p=function(e){return[e]},yt=function(e){return e.length>0},jr=function(e){return e[0]},zl=function(e){return e.slice(1)},Sn=[],on={},pt=Object.prototype.hasOwnProperty,Sg=function(e){return tH([e[0]],e.slice(1),!0)};function ua(e,t){return function(n){return function(r){return e.ap(e.map(r,function(i){return function(o){return t.ap(i,o)}}),n)}}}function Lt(e){return function(t){return function(n){return e.ap(e.map(n,function(r){return function(){return r}}),t)}}}function jt(e){return function(t){return function(n){return e.ap(e.map(n,function(){return function(r){return r}}),t)}}}function Ut(e){return function(t,n){return function(r){return e.ap(e.map(r,function(i){return function(o){var a;return Object.assign({},i,(a={},a[t]=o,a))}}),n)}}}function an(e){return function(t){return{concat:function(n,r){return e.ap(e.map(n,function(i){return function(o){return t.concat(i,o)}}),r)}}}}function cS(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,t===0?e.apply(null,i):cS(e,t-1,i)}}var pb={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]}}}}}};function nH(e){return pt.call(pb,e)||(pb[e]=cS(tL,e-1,[])),pb[e]}function rH(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r=t.length,i=nH(r),o=e.map(t[0],i),a=1;a<r;a++)o=e.ap(o,t[a]);return o}}function iH(e){var t=e.length;switch(t){case 1:return function(n){var r;return r={},r[e[0]]=n,r};case 2:return function(n){return function(r){var i;return i={},i[e[0]]=n,i[e[1]]=r,i}};case 3:return function(n){return function(r){return function(i){var o;return o={},o[e[0]]=n,o[e[1]]=r,o[e[2]]=i,o}}};case 4:return function(n){return function(r){return function(i){return function(o){var a;return a={},a[e[0]]=n,a[e[1]]=r,a[e[2]]=i,a[e[3]]=o,a}}}};case 5:return function(n){return function(r){return function(i){return function(o){return function(a){var s;return s={},s[e[0]]=n,s[e[1]]=r,s[e[2]]=i,s[e[3]]=o,s[e[4]]=a,s}}}}};default:return cS(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,[])}}function oH(e){return function(t){for(var n=Object.keys(t),r=n.length,i=iH(n),o=e.map(t[n[0]],i),a=1;a<r;a++)o=e.ap(o,t[n[a]]);return o}}const aH=Object.freeze(Object.defineProperty({__proto__:null,ap:ua,apFirst:Lt,apS:Ut,apSecond:jt,getApplySemigroup:an,sequenceS:oH,sequenceT:rH},Symbol.toStringTag,{value:"Module"}));function Hl(e,t){return function(n){return function(r){return e.map(r,function(i){return t.map(i,n)})}}}function Qe(e){return function(t){return function(n){return e.map(n,function(r){return r(t)})}}}function Bt(e){return function(t){return function(n){return e.map(n,function(r){var i;return i={},i[t]=r,i})}}}function Yl(e,t){var n=Hl(e,t);return{map:function(r,i){return C(r,n(i))}}}const sH=Object.freeze(Object.defineProperty({__proto__:null,bindTo:Bt,flap:Qe,getFunctorComposition:Yl,map:Hl},Symbol.toStringTag,{value:"Module"}));function oi(e){var t=an(e);return function(n){return{concat:t(n).concat,empty:e.of(n.empty)}}}function iL(e,t){var n=Yl(e,t).map,r=ua(e,t);return{map:n,of:function(i){return e.of(t.of(i))},ap:function(i,o){return C(i,r(o))}}}const uH=Object.freeze(Object.defineProperty({__proto__:null,getApplicativeComposition:iL,getApplicativeMonoid:oi},Symbol.toStringTag,{value:"Module"}));function At(e){return function(t){return function(n){return e.chain(n,function(r){return e.map(t(r),function(){return r})})}}}function Pt(e){return function(t,n){return function(r){return e.chain(r,function(i){return e.map(n(i),function(o){var a;return Object.assign({},i,(a={},a[t]=o,a))})})}}}const cH=Object.freeze(Object.defineProperty({__proto__:null,bind:Pt,chainFirst:At},Symbol.toStringTag,{value:"Module"}));function go(e){return function(t){return function(n){return e.fromEither(Vt(n)?ea(t()):hs(n.value))}}}function ms(e){return function(t,n){return function(r){return e.fromEither(t(r)?hs(r):ea(n(r)))}}}function vo(e){var t=go(e);return function(n){var r=t(n);return function(i){return H(i,r)}}}function Nu(e,t){var n=vo(e);return function(r){var i=n(r);return function(o){return function(a){return t.chain(a,i(o))}}}}function Ur(e){return function(t){return H(t,e.fromEither)}}function ca(e,t){var n=Ur(e);return function(r){return function(i){return t.chain(i,n(r))}}}function la(e,t){return H(Ur(e),At(t))}function qu(e,t){return function(n,r){return function(i){return t.chain(i,function(o){return e.fromEither(n(o)?hs(o):ea(r(o)))})}}}const lH=Object.freeze(Object.defineProperty({__proto__:null,chainEitherK:ca,chainFirstEitherK:la,chainOptionK:Nu,filterOrElse:qu,fromEitherK:Ur,fromOption:go,fromOptionK:vo,fromPredicate:ms},Symbol.toStringTag,{value:"Module"}));var ai=function(e){return{equals:function(t,n){return t===n||e(t,n)}}},oL=function(e){return ai(function(t,n){for(var r in e)if(!e[r].equals(t[r],n[r]))return!1;return!0})},aL=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return ai(function(n,r){return e.every(function(i,o){return i.equals(n[o],r[o])})})},fH=function(e,t){return C(e,sL(t))},sL=function(e){return function(t){return ai(function(n,r){return t.equals(e(n),e(r))})}},uL="Eq",Gl={equals:function(e,t){return e===t}},dH={equals:function(){return!0}},cL=function(){return{concat:function(e,t){return ai(function(n,r){return e.equals(n,r)&&t.equals(n,r)})}}},pH=function(){return{concat:cL().concat,empty:dH}},lL={URI:uL,contramap:fH},AH=aL,hH=oL,mH=Gl.equals,gH=lL,vH=Gl,yH=Gl,bH=Gl,CH={equals:function(e,t){return e.valueOf()===t.valueOf()}};const SH=Object.freeze(Object.defineProperty({__proto__:null,Contravariant:lL,URI:uL,contramap:sL,eq:gH,eqBoolean:vH,eqDate:CH,eqNumber:bH,eqStrict:Gl,eqString:yH,fromEquals:ai,getMonoid:pH,getSemigroup:cL,getStructEq:hH,getTupleEq:AH,strictEqual:mH,struct:oL,tuple:aL},Symbol.toStringTag,{value:"Module"}));var fL=function(e){return function(t,n){return t===n||e(t,n)===0}},Vu=function(e){return{equals:fL(e),compare:function(t,n){return t===n?0:e(t,n)}}},dL=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Vu(function(n,r){for(var i=0;i<e.length-1;i++){var o=e[i].compare(n[i],r[i]);if(o!==0)return o}return e[i].compare(n[i],r[i])})},lS=function(e){return Vu(function(t,n){return e.compare(n,t)})},_H=function(e,t){return C(e,_g(t))},_g=function(e){return function(t){return Vu(function(n,r){return t.compare(e(n),e(r))})}},pL="Ord",AL=function(){return{concat:function(e,t){return Vu(function(n,r){var i=e.compare(n,r);return i!==0?i:t.compare(n,r)})}}},fS=function(){return{concat:AL().concat,empty:Vu(function(){return 0})}},hL={URI:pL,contramap:_H},IH={equals:aS,compare:pr(0)},TH=function(e){return function(t){return function(n){return n===t||e.compare(n,t)===0}}},mL=function(e){return function(t,n){return e.compare(t,n)===-1}},gL=function(e){return function(t,n){return e.compare(t,n)===1}},xH=function(e){return function(t,n){return e.compare(t,n)!==1}},wH=function(e){return function(t,n){return e.compare(t,n)!==-1}},Ig=function(e){return function(t,n){return t===n||e.compare(t,n)<1?t:n}},Tg=function(e){return function(t,n){return t===n||e.compare(t,n)>-1?t:n}},vL=function(e){var t=Ig(e),n=Tg(e);return function(r,i){return function(o){return n(t(o,i),r)}}},EH=function(e){var t=mL(e),n=gL(e);return function(r,i){return function(o){return!(t(o,r)||n(o,i))}}},$H=dL,RH=lS,OH=hL;function FH(e,t){return e<t?-1:e>t?1:0}var dS={equals:Gl.equals,compare:FH},kH=dS,MH=dS,vm=dS,LH=C(vm,_g(function(e){return e.valueOf()}));const jH=Object.freeze(Object.defineProperty({__proto__:null,Contravariant:hL,URI:pL,between:EH,clamp:vL,contramap:_g,equals:TH,equalsDefault:fL,fromCompare:Vu,geq:wH,getDualOrd:RH,getMonoid:fS,getSemigroup:AL,getTupleOrd:$H,gt:gL,leq:xH,lt:mL,max:Tg,min:Ig,ord:OH,ordBoolean:kH,ordDate:LH,ordNumber:vm,ordString:MH,reverse:lS,trivial:IH,tuple:dL},Symbol.toStringTag,{value:"Module"}));var yL=function(e){return{concat:function(t,n){return e.concat(n,t)}}},UH=function(e){return function(t){return{concat:function(n,r){return e(n)?t.concat(n,r):r}}}},BH=function(e){return function(t){return{concat:function(n,r){return e(r)?t.concat(n,r):n}}}},PH=function(e){return function(t){return{concat:function(n,r){return t.concat(e(n),e(r))}}}},bL=function(e){return function(t){return function(n){return n.reduce(function(r,i){return e.concat(r,i)},t)}}};const DH=Object.freeze(Object.defineProperty({__proto__:null,concatAll:bL,endo:PH,filterFirst:UH,filterSecond:BH,reverse:yL},Symbol.toStringTag,{value:"Module"}));var xg=function(e){return{concat:Ig(e)}},wg=function(e){return{concat:Tg(e)}},pS=function(e){return{concat:function(){return e}}},AS=yL,hS=function(e){return{concat:function(t,n){var r={};for(var i in e)pt.call(e,i)&&(r[i]=e[i].concat(t[i],n[i]));return r}}},mS=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return{concat:function(n,r){return e.map(function(i,o){return i.concat(n[o],r[o])})}}},CL=function(e){return function(t){return{concat:function(n,r){return t.concat(n,t.concat(e,r))}}}},gS=function(){return{concat:N}},Eg=function(){return{concat:function(e,t){return t}}},vS=bL,SL=pS(void 0),WH=function(){return{concat:function(e,t){return Object.assign({},e,t)}}},KH=Eg,NH=gS,qH=mS,VH=hS,QH=AS,zH=wg,HH=xg,YH=CL;function GH(e){var t=vS(e);return function(n,r){return r===void 0?t(n):t(n)(r)}}var _L={concat:function(e,t){return e&&t}},IL={concat:function(e,t){return e||t}},JH=iS,TL={concat:function(e,t){return e+t}},xL={concat:function(e,t){return e+t}},wL={concat:function(e,t){return e*t}};const EL=Object.freeze(Object.defineProperty({__proto__:null,concatAll:vS,constant:pS,first:gS,fold:GH,getDualSemigroup:QH,getFirstSemigroup:NH,getFunctionSemigroup:JH,getIntercalateSemigroup:YH,getJoinSemigroup:zH,getLastSemigroup:KH,getMeetSemigroup:HH,getObjectSemigroup:WH,getStructSemigroup:VH,getTupleSemigroup:qH,intercalate:CL,last:Eg,max:wg,min:xg,reverse:AS,semigroupAll:_L,semigroupAny:IL,semigroupProduct:wL,semigroupString:TL,semigroupSum:xL,semigroupVoid:SL,struct:hS,tuple:mS},Symbol.toStringTag,{value:"Module"}));var Nd=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},Rp=Sn,yo=yt,$g=function(e,t){return e<0||e>=t.length},yS=function(e){return function(t){return Nd([e],t,!0)}},Cl=yS,bS=function(e){return function(t){return Nd(Nd([],t,!0),[e],!1)}},Rg=bS,Og=function(e,t,n){if(yo(n)){var r=Sg(n);return r.splice(e,0,t),r}return[t]},CS=function(e,t,n){if(n[e]===t)return n;var r=Sg(n);return r[e]=t,r},SS=function(e){return function(t){if(t.length===1)return t;for(var n=[Gn(t)],r=Fi(t),i=function(u){n.every(function(c){return!e.equals(c,u)})&&n.push(u)},o=0,a=r;o<a.length;o++){var s=a[o];i(s)}return n}},$L=function(e){if(yo(e)){var t=fS();return xS(e.reduce(t.concat,t.empty))}return N},_S=function(e){var t=SS(e);return function(n){return function(r){return t(C(r,Op(n)))}}},IS=function(e){return function(t){var n=t.length,r=Math.round(e)%n;if($g(Math.abs(r),t)||r===0)return t;if(r<0){var i=Mg(-r)(t),o=i[0],a=i[1];return C(a,Op(o))}else return IS(r-n)(t)}},TS=function(e){return yo(e)?de(e):Ce},Fg=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}},ZH=function(e){return Fg(function(){return e})},RL=function(e,t){return e<=t?Fg(function(n){return e+n})(t-e+1):[e]},OL=function(e){return[Gn(e),Fi(e)]},FL=function(e){return[Jl(e),vs(e)]},XH=function(e){return TS(e.slice())};function kL(e){return function(t){return t.concat(e)}}function Op(e,t){return t?e.concat(t):function(n){return n.concat(e)}}var eY=function(e){return e.length===1?e:Nd([vs(e)],e.slice(0,-1).reverse(),!0)};function ML(e){return function(t){var n=t.length;if(n===0)return Rp;for(var r=[],i=t[0],o=[i],a=1;a<n;a++){var s=t[a];e.equals(s,i)?o.push(s):(r.push(o),i=s,o=[i])}return r.push(o),r}}var tY=function(e){return function(t){for(var n={},r=0,i=t;r<i.length;r++){var o=i[r],a=e(o);pt.call(n,a)?n[a].push(o):n[a]=[o]}return n}},xS=function(e){return function(t){return t.length===1?t:t.slice().sort(e.compare)}},nY=function(e,t){return LL(e,function(){return t})},LL=function(e,t){return function(n){return $g(e,n)?Ce:de(CS(e,t(n[e]),n))}},jL=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};function UL(e,t){return t===void 0?function(n){return UL(n,e)}:jL(e,t,function(n,r){return[n,r]})}var rY=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]},kg=function(e){return function(t){for(var n=[e,t[0]],r=1;r<t.length;r++)n.push(e,t[r]);return n}},wS=function(e){return function(t){var n=Fi(t);return yo(n)?C(n,kg(e),Cl(Gn(t))):t}},BL=function(e){return function(t){for(var n=Sg(e(0,Gn(t))),r=1;r<t.length;r++)n.push.apply(n,e(r,t[r]));return n}},ES=function(e){return function(t){for(var n=e(t),r=n[0],i=n[1],o=[r],a=i;yo(a);){var s=e(a),u=s[0],c=s[1];o.push(u),a=c}return o}},Mg=function(e){return function(t){var n=Math.max(1,e);return n>=t.length?[t,Rp]:[C(t.slice(1,n),Cl(Gn(t))),t.slice(n)]}},PL=function(e){return ES(Mg(e))},ji=function(e,t){return C(e,jS(t))},$S=function(e,t){return C(e,US(t))},Fp=function(e,t){return C(e,VL(t))},RS=function(e,t){return C(e,Lg(t))},DL=function(e,t){return C(e,LS(t))},kp=function(e,t,n){return C(e,BS(t,n))},Mp=function(e){var t=PS(e);return function(n,r){return C(n,t(r))}},Lp=function(e,t,n){return C(e,DS(t,n))},OS=function(e){var t=QL(e);return function(n,r){return C(n,t(r))}},WL=function(e,t){return C(e,qL(t))},FS=function(e,t,n){return C(e,jg(t,n))},kS=function(e){var t=WS(e);return function(n,r){return C(n,t(r))}},MS=function(e,t,n){return C(e,Ug(t,n))},KL=function(e){var t=Pg(e);return function(n,r){return C(n,t(r))}},gs=$p,NL=function(e){return function(t){return C(t,kL(e()))}},qL=NL,VL=function(e){return Lg(function(t){return C(e,jS(t))})},Lg=function(e){return BL(function(t,n){return e(n)})},LS=function(e){return function(t){for(var n=Fi(t),r=[e(t)];yo(n);)r.push(e(n)),n=Fi(n);return r}},iY=LS(N),oY=Lg(N),jS=function(e){return US(function(t,n){return e(n)})},US=function(e){return function(t){for(var n=[e(0,Gn(t))],r=1;r<t.length;r++)n.push(e(r,t[r]));return n}},BS=function(e,t){return jg(e,function(n,r,i){return t(r,i)})},PS=function(e){return function(t){return function(n){return n.slice(1).reduce(function(r,i){return e.concat(r,t(i))},t(n[0]))}}},DS=function(e,t){return Ug(e,function(n,r,i){return t(r,i)})},jg=function(e,t){return function(n){return n.reduce(function(r,i,o){return t(o,r,i)},e)}},WS=function(e){return function(t){return function(n){return n.slice(1).reduce(function(r,i,o){return e.concat(r,t(o+1,i))},t(0,n[0]))}}},Ug=function(e,t){return function(n){return n.reduceRight(function(r,i,o){return t(o,i,r)},e)}},QL=function(e){var t=Pg(e);return function(n){return t(function(r,i){return n(i)})}},Bg=function(e){return Pg(e)(Ar)},Pg=function(e){return function(t){return function(n){for(var r=e.map(t(0,Gn(n)),gs),i=1;i<n.length;i++)r=e.ap(e.map(r,function(o){return function(a){return C(o,Rg(a))}}),t(i,n[i]));return r}}},Dg=jr,Yn="ReadonlyNonEmptyArray",zL=function(e){return{show:function(t){return"[".concat(t.map(e.show).join(", "),"]")}}},aY=function(){return{concat:Op}},HL=function(e){return ai(function(t,n){return t.length===n.length&&t.every(function(r,i){return e.equals(r,n[i])})})},sY=function(e){var t=_S(e);return{concat:function(n,r){return t(r)(n)}}},KS={URI:Yn,map:ji},uY=Qe(KS),cY={URI:Yn,of:gs},lY={URI:Yn,map:ji,mapWithIndex:$S},Wg={URI:Yn,map:ji,ap:Fp},fY=Lt(Wg),dY=jt(Wg),pY={URI:Yn,map:ji,ap:Fp,of:gs},NS={URI:Yn,map:ji,ap:Fp,chain:RS},AY=At(NS),hY={URI:Yn,map:ji,ap:Fp,of:gs,chain:RS},mY={URI:Yn,reduce:kp,foldMap:Mp,reduceRight:Lp},gY={URI:Yn,reduce:kp,foldMap:Mp,reduceRight:Lp,reduceWithIndex:FS,foldMapWithIndex:kS,reduceRightWithIndex:MS},vY={URI:Yn,map:ji,reduce:kp,foldMap:Mp,reduceRight:Lp,traverse:OS,sequence:Bg},yY={URI:Yn,map:ji,mapWithIndex:$S,reduce:kp,foldMap:Mp,reduceRight:Lp,traverse:OS,sequence:Bg,reduceWithIndex:FS,foldMapWithIndex:kS,reduceRightWithIndex:MS,traverseWithIndex:KL},bY={URI:Yn,map:ji,alt:WL},CY={URI:Yn,map:ji,extend:DL,extract:Dg},SY=gs(on),_Y=Bt(KS),IY=Pt(NS),TY=Ut(Wg),Gn=Dg,Fi=zl,vs=function(e){return e[e.length-1]},Jl=function(e){return e.slice(0,-1)},YL=function(e){var t=xg(e);return function(n){return n.reduce(t.concat)}},GL=function(e){var t=wg(e);return function(n){return n.reduce(t.concat)}},Kg=function(e){return function(t){return t.reduce(e.concat)}},xY=function(e){return function(t){return e(Gn(t),Fi(t))}},wY=function(e){return function(t){return e(Jl(t),vs(t))}},JL=function(e){return function(t){return Nd([e(Gn(t))],Fi(t),!0)}},EY=function(e){return JL(function(){return e})},ZL=function(e){return function(t){return C(Jl(t),Rg(e(vs(t))))}},$Y=function(e){return ZL(function(){return e})},qS=function(e){var t=Kg(e);return function(n){return H(wS(n),t)}};function RY(e){var t=xS(e),n=ML(e);return function(r){return yo(r)?n(t(r)):Rp}}function OY(e){return XL(function(t,n){return e(n)})}var XL=function(e){return function(t){return TS(t.filter(function(n,r){return e(r,n)}))}},FY=OL,kY=FL;function ej(e,t){return t===void 0?Cl(e):C(t,Cl(e))}var tj=function(e,t){return C(e,Op([t]))},MY=function(e,t){return function(n){return e<0||e>n.length?Ce:de(Og(e,t,n))}},LY=kg,jY=Kg,UY={URI:Yn,of:gs,map:ji,mapWithIndex:$S,ap:Fp,chain:RS,extend:DL,extract:Dg,reduce:kp,foldMap:Mp,reduceRight:Lp,traverse:OS,sequence:Bg,reduceWithIndex:FS,foldMapWithIndex:kS,reduceRightWithIndex:MS,traverseWithIndex:KL,alt:WL};const BY=Object.freeze(Object.defineProperty({__proto__:null,Alt:bY,Applicative:pY,Apply:Wg,Chain:NS,Comonad:CY,Do:SY,Foldable:mY,FoldableWithIndex:gY,Functor:KS,FunctorWithIndex:lY,Monad:hY,Pointed:cY,Traversable:vY,TraversableWithIndex:yY,URI:Yn,alt:qL,altW:NL,ap:VL,apFirst:fY,apS:TY,apSecond:dY,append:Rg,appendW:bS,bind:IY,bindTo:_Y,chain:Lg,chainFirst:AY,chainWithIndex:BL,chop:ES,chunksOf:PL,concat:Op,concatAll:Kg,concatW:kL,cons:ej,duplicate:iY,empty:Rp,extend:LS,extract:Dg,filter:OY,filterWithIndex:XL,flap:uY,flatten:oY,fold:jY,foldMap:PS,foldMapWithIndex:WS,fromArray:XH,fromReadonlyArray:TS,getEq:HL,getSemigroup:aY,getShow:zL,getUnionSemigroup:sY,group:ML,groupBy:tY,groupSort:RY,head:Gn,init:Jl,insertAt:MY,intercalate:qS,intersperse:wS,isNonEmpty:yo,isOutOfBound:$g,last:vs,makeBy:Fg,map:jS,mapWithIndex:US,matchLeft:xY,matchRight:wY,max:GL,min:YL,modifyAt:LL,modifyHead:JL,modifyLast:ZL,of:gs,prepend:Cl,prependAll:kg,prependToAll:LY,prependW:yS,range:RL,readonlyNonEmptyArray:UY,reduce:BS,reduceRight:DS,reduceRightWithIndex:Ug,reduceWithIndex:jg,replicate:ZH,reverse:eY,rotate:IS,sequence:Bg,snoc:tj,sort:xS,sortBy:$L,splitAt:Mg,tail:Fi,traverse:QL,traverseWithIndex:Pg,unappend:FL,uncons:FY,union:_S,uniq:SS,unprepend:OL,unsafeInsertAt:Og,unsafeUpdateAt:CS,unsnoc:kY,unzip:rY,updateAt:nY,updateHead:EY,updateLast:$Y,zip:UL,zipWith:jL},Symbol.toStringTag,{value:"Module"}));var qd=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},fa=function(e){return e.length>0},Ng=function(e,t){return e<0||e>=t.length},VS=function(e){return function(t){return qd([e],t,!0)}},Sl=VS,QS=function(e){return function(t){return qd(qd([],t,!0),[e],!1)}},jp=QS,zS=function(e,t,n){if(fa(n)){var r=Up(n);return r.splice(e,0,t),r}return[t]},HS=function(e,t,n){var r=Up(n);return r[e]=t,r},YS=function(e){return function(t){if(t.length===1)return Zl(t);for(var n=[si(t)],r=ki(t),i=function(u){n.every(function(c){return!e.equals(c,u)})&&n.push(u)},o=0,a=r;o<a.length;o++){var s=a[o];i(s)}return n}},nj=function(e){if(fa(e)){var t=fS();return XS(e.reduce(t.concat,t.empty))}return Zl},GS=function(e){var t=YS(e);return function(n){return function(r){return t(C(r,Vg(n)))}}},JS=function(e){return function(t){var n=t.length,r=Math.round(e)%n;if(Ng(Math.abs(r),t)||r===0)return Zl(t);if(r<0){var i=zg(-r)(t),o=i[0],a=i[1];return C(a,Vg(o))}else return JS(r-n)(t)}},Up=Sg,ZS=function(e){return fa(e)?de(e):Ce},qg=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}},PY=function(e){return qg(function(){return e})},rj=function(e,t){return e<=t?qg(function(n){return e+n})(t-e+1):[e]},ij=function(e){return[si(e),ki(e)]},oj=function(e){return[ef(e),Xl(e)]};function aj(e){return function(t){return t.concat(e)}}function Vg(e,t){return t?e.concat(t):function(n){return n.concat(e)}}var DY=function(e){return qd([Xl(e)],e.slice(0,-1).reverse(),!0)};function sj(e){return function(t){var n=t.length;if(n===0)return[];for(var r=[],i=t[0],o=[i],a=1;a<n;a++){var s=t[a];e.equals(s,i)?o.push(s):(r.push(o),i=s,o=[i])}return r.push(o),r}}var WY=function(e){return function(t){for(var n={},r=0,i=t;r<i.length;r++){var o=i[r],a=e(o);pt.call(n,a)?n[a].push(o):n[a]=[o]}return n}},XS=function(e){return function(t){return t.slice().sort(e.compare)}},KY=function(e,t){return function(n){return e<0||e>n.length?Ce:de(zS(e,t,n))}},NY=function(e,t){return uj(e,function(){return t})},uj=function(e,t){return function(n){return Ng(e,n)?Ce:de(HS(e,t(n[e]),n))}},Zl=Up,ys=function(e){return[e]},cj=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};function lj(e,t){return t===void 0?function(n){return lj(n,e)}:cj(e,t,function(n,r){return[n,r]})}var qY=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]},Qg=function(e){return function(t){for(var n=[e,t[0]],r=1;r<t.length;r++)n.push(e,t[r]);return n}},fj=function(e){return function(t){var n=ki(t);return fa(n)?C(n,Qg(e),Sl(si(t))):Zl(t)}},dj=WS,pj=PS,Aj=function(e){return function(t){for(var n=Up(e(0,si(t))),r=1;r<t.length;r++)n.push.apply(n,e(r,t[r]));return n}},e_=function(e){return function(t){for(var n=e(t),r=n[0],i=n[1],o=[r],a=i;fa(a);){var s=e(a),u=s[0],c=s[1];o.push(u),a=c}return o}},zg=function(e){return function(t){var n=Math.max(1,e);return n>=t.length?[Zl(t),[]]:[C(t.slice(1,n),Sl(si(t))),t.slice(n)]}},hj=function(e){return e_(zg(e))},Ui=function(e,t){return C(e,u_(t))},t_=function(e,t){return C(e,c_(t))},Bp=function(e,t){return C(e,Cj(t))},n_=function(e,t){return C(e,Hg(t))},mj=function(e,t){return C(e,s_(t))},Pp=function(e,t,n){return C(e,Sj(t,n))},Dp=function(e){var t=pj(e);return function(n,r){return C(n,t(r))}},Wp=function(e,t,n){return C(e,Ij(t,n))},r_=function(e){var t=xj(e);return function(n,r){return C(n,t(r))}},gj=function(e,t){return C(e,bj(t))},i_=function(e,t,n){return C(e,_j(t,n))},o_=function(e){var t=dj(e);return function(n,r){return C(n,t(r))}},a_=function(e,t,n){return C(e,Tj(t,n))},vj=function(e){var t=Gg(e);return function(n,r){return C(n,t(r))}},yj=function(e){return function(t){return C(t,aj(e()))}},bj=yj,Cj=function(e){return Hg(function(t){return C(e,u_(t))})},Hg=function(e){return Aj(function(t,n){return e(n)})},s_=function(e){return function(t){for(var n=ki(t),r=[e(t)];fa(n);)r.push(e(n)),n=ki(n);return r}},VY=s_(N),QY=Hg(N),u_=function(e){return c_(function(t,n){return e(n)})},c_=function(e){return function(t){for(var n=[e(0,si(t))],r=1;r<t.length;r++)n.push(e(r,t[r]));return n}},Sj=BS,_j=jg,Ij=DS,Tj=Ug,xj=function(e){var t=Gg(e);return function(n){return t(function(r,i){return n(i)})}},Yg=function(e){return Gg(e)(function(t,n){return n})},Gg=function(e){return function(t){return function(n){for(var r=e.map(t(0,si(n)),ys),i=1;i<n.length;i++)r=e.ap(e.map(r,function(o){return function(a){return C(o,jp(a))}}),t(i,n[i]));return r}}},l_=Gn,Jn="NonEmptyArray",zY=zL,HY=function(){return{concat:Vg}},YY=HL,GY=function(e){var t=GS(e);return{concat:function(n,r){return t(r)(n)}}},f_={URI:Jn,map:Ui},JY=Qe(f_),ZY={URI:Jn,of:ys},XY={URI:Jn,map:Ui,mapWithIndex:t_},Jg={URI:Jn,map:Ui,ap:Bp},eG=Lt(Jg),tG=jt(Jg),nG={URI:Jn,map:Ui,ap:Bp,of:ys},d_={URI:Jn,map:Ui,ap:Bp,chain:n_},rG=At(d_),iG={URI:Jn,map:Ui,ap:Bp,of:ys,chain:n_},oG={URI:Jn,reduce:Pp,foldMap:Dp,reduceRight:Wp},aG={URI:Jn,reduce:Pp,foldMap:Dp,reduceRight:Wp,reduceWithIndex:i_,foldMapWithIndex:o_,reduceRightWithIndex:a_},sG={URI:Jn,map:Ui,reduce:Pp,foldMap:Dp,reduceRight:Wp,traverse:r_,sequence:Yg},uG={URI:Jn,map:Ui,mapWithIndex:t_,reduce:Pp,foldMap:Dp,reduceRight:Wp,traverse:r_,sequence:Yg,reduceWithIndex:i_,foldMapWithIndex:o_,reduceRightWithIndex:a_,traverseWithIndex:vj},cG={URI:Jn,map:Ui,alt:gj},lG={URI:Jn,map:Ui,extend:mj,extract:l_},fG=ys(on),dG=Bt(f_),pG=Pt(d_),AG=Ut(Jg),si=Gn,ki=function(e){return e.slice(1)},Xl=vs,ef=function(e){return e.slice(0,-1)},hG=YL,mG=GL,gG=function(e){return function(t){return t.reduce(e.concat)}},vG=function(e){return function(t){return e(si(t),ki(t))}},yG=function(e){return function(t){return e(ef(t),Xl(t))}},wj=function(e){return function(t){return qd([e(si(t))],ki(t),!0)}},bG=function(e){return wj(function(){return e})},Ej=function(e){return function(t){return C(ef(t),jp(e(Xl(t))))}},CG=function(e){return Ej(function(){return e})},SG=qS;function _G(e){var t=XS(e),n=sj(e);return function(r){return fa(r)?n(t(r)):[]}}function IG(e){return $j(function(t,n){return e(n)})}var $j=function(e){return function(t){return ZS(t.filter(function(n,r){return e(r,n)}))}},TG=ij,xG=oj;function Rj(e,t){return t===void 0?Sl(e):C(t,Sl(e))}var Oj=function(e,t){return C(e,jp(t))},wG=Qg,EG=Kg,$G={URI:Jn,of:ys,map:Ui,mapWithIndex:t_,ap:Bp,chain:n_,extend:mj,extract:l_,reduce:Pp,foldMap:Dp,reduceRight:Wp,traverse:r_,sequence:Yg,reduceWithIndex:i_,foldMapWithIndex:o_,reduceRightWithIndex:a_,traverseWithIndex:vj,alt:gj};const RG=Object.freeze(Object.defineProperty({__proto__:null,Alt:cG,Applicative:nG,Apply:Jg,Chain:d_,Comonad:lG,Do:fG,Foldable:oG,FoldableWithIndex:aG,Functor:f_,FunctorWithIndex:XY,Monad:iG,Pointed:ZY,Traversable:sG,TraversableWithIndex:uG,URI:Jn,alt:bj,altW:yj,ap:Cj,apFirst:eG,apS:AG,apSecond:tG,append:jp,appendW:QS,bind:pG,bindTo:dG,chain:Hg,chainFirst:rG,chainWithIndex:Aj,chop:e_,chunksOf:hj,concat:Vg,concatAll:gG,concatW:aj,cons:Rj,copy:Zl,duplicate:VY,extend:s_,extract:l_,filter:IG,filterWithIndex:$j,flap:JY,flatten:QY,fold:EG,foldMap:pj,foldMapWithIndex:dj,fromArray:ZS,fromReadonlyNonEmptyArray:Up,getEq:YY,getSemigroup:HY,getShow:zY,getUnionSemigroup:GY,group:sj,groupBy:WY,groupSort:_G,head:si,init:ef,insertAt:KY,intercalate:SG,intersperse:fj,isNonEmpty:fa,isOutOfBound:Ng,last:Xl,makeBy:qg,map:u_,mapWithIndex:c_,matchLeft:vG,matchRight:yG,max:mG,min:hG,modifyAt:uj,modifyHead:wj,modifyLast:Ej,nonEmptyArray:$G,of:ys,prepend:Sl,prependAll:Qg,prependToAll:wG,prependW:VS,range:rj,reduce:Sj,reduceRight:Ij,reduceRightWithIndex:Tj,reduceWithIndex:_j,replicate:PY,reverse:DY,rotate:JS,sequence:Yg,snoc:Oj,sort:XS,sortBy:nj,splitAt:zg,tail:ki,traverse:xj,traverseWithIndex:Gg,unappend:oj,uncons:TG,union:GS,uniq:YS,unprepend:ij,unsafeInsertAt:zS,unsafeUpdateAt:HS,unsnoc:xG,unzip:qY,updateAt:NY,updateHead:bG,updateLast:CG,zip:lj,zipWith:cj},Symbol.toStringTag,{value:"Module"}));var OG=function(e){return typeof e=="number"},p_={equals:function(e,t){return e===t}},Zg={equals:p_.equals,compare:function(e,t){return e<t?-1:e>t?1:0}},FG={equals:p_.equals,compare:Zg.compare,top:1/0,bottom:-1/0},kG={show:function(e){return JSON.stringify(e)}},Fj={concat:function(e,t){return e-t}},A_={concat:function(e,t){return e+t}},h_={concat:function(e,t){return e*t}},MG={concat:A_.concat,empty:0},LG={concat:h_.concat,empty:1},jG={add:A_.concat,zero:0,mul:h_.concat,one:1,sub:Fj.concat,degree:function(e){return 1},div:function(e,t){return e/t},mod:function(e,t){return e%t}};const UG=Object.freeze(Object.defineProperty({__proto__:null,Bounded:FG,Eq:p_,Field:jG,MagmaSub:Fj,MonoidProduct:LG,MonoidSum:MG,Ord:Zg,SemigroupProduct:h_,SemigroupSum:A_,Show:kG,isNumber:OG},Symbol.toStringTag,{value:"Module"}));var Oe=function(e,t){return{left:e,right:t}},BG=function(e,t){return C(e,kj(t))},PG=function(e,t){return C(e,Mj(t))},DG=function(e,t,n){return C(e,Lj(t,n))},kj=function(e){return function(t){return Oe(Xg(t),e(ev(t)))}},Mj=function(e){return function(t){return Oe(e(Xg(t)),ev(t))}},Lj=function(e,t){return function(n){return Oe(e(Xg(n)),t(ev(n)))}},m_="Separated",WG={URI:m_,mapLeft:PG,bimap:DG},jj={URI:m_,map:BG},KG=Qe(jj),Xg=function(e){return e.left},ev=function(e){return e.right};const NG=Object.freeze(Object.defineProperty({__proto__:null,Bifunctor:WG,Functor:jj,URI:m_,bimap:Lj,flap:KG,left:Xg,map:kj,mapLeft:Mj,right:ev,separated:Oe},Symbol.toStringTag,{value:"Module"}));function Bi(e,t){return function(n){var r=e.traverse(n);return function(i,o){return n.map(r(i,o),t.separate)}}}function Pi(e,t){return function(n){var r=e.traverse(n);return function(i,o){return n.map(r(i,o),t.compact)}}}function g_(e){return function(t){var n=e.wither(t);return function(r){return function(i){return n(i,function(o){return t.map(r(o),function(a){return a?de(o):Ce})})}}}}const qG=Object.freeze(Object.defineProperty({__proto__:null,filterE:g_,wiltDefault:Bi,witherDefault:Pi},Symbol.toStringTag,{value:"Module"}));function tf(e,t){return function(n){return n?t.of(void 0):e.zero()}}const VG=Object.freeze(Object.defineProperty({__proto__:null,guard:tf},Symbol.toStringTag,{value:"Module"}));var QG=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},co=function(e){return e.length===0},Mt=yo,zG=Cl,HG=yS,tv=Rg,YG=bS,Uj=function(e,t){return e<=0?xt:Fg(t)(e)},GG=function(e,t){return Uj(e,function(){return t})};function JG(e){return function(t){return e(t)?[t]:xt}}var Bj=function(e){return Vt(e)?xt:[e.value]},Pj=function(e){return nn(e)?xt:[e.right]},Dj=function(e,t){return function(n){return Mt(n)?t(n):e()}},Wj=Dj,Kj=function(e,t){return function(n){return Mt(n)?t(Gn(n),Fi(n)):e()}},Nj=Kj,ZG=Nj,qj=function(e,t){return function(n){return Mt(n)?t(Jl(n),vs(n)):e()}},Vj=qj,XG=Vj,Qj=function(e){return function(t){if(co(t))return xt;for(var n=[],r=0;r<t.length;r++)n.push.apply(n,e(r,t[r]));return n}},eJ=function(e,t){return function(n){var r=n.length,i=new Array(r+1);i[0]=e;for(var o=0;o<r;o++)i[o+1]=t(i[o],n[o]);return i}},tJ=function(e,t){return function(n){var r=n.length,i=new Array(r+1);i[r]=e;for(var o=r-1;o>=0;o--)i[o]=t(n[o],i[o+1]);return i}},nJ=function(e){return e.length},nf=$g;function Su(e,t){return t===void 0?function(n){return Su(e,n)}:nf(e,t)?Ce:de(t[e])}var zj=function(e){return Mt(e)?de(Gn(e)):Ce},Hj=function(e){return Mt(e)?de(vs(e)):Ce},rJ=function(e){return Mt(e)?de(Fi(e)):Ce},iJ=function(e){return Mt(e)?de(Jl(e)):Ce},oJ=function(e){return function(t){return nf(e,t)?t:e===0?xt:t.slice(0,e)}},aJ=function(e){return function(t){return nf(e,t)?t:e===0?xt:t.slice(-e)}};function sJ(e){return function(t){for(var n=[],r=0,i=t;r<i.length;r++){var o=i[r];if(!e(o))break;n.push(o)}var a=n.length;return a===t.length?t:a===0?xt:n}}var Yj=function(e,t){for(var n=e.length,r=0;r<n&&t(e[r]);r++);return r};function uJ(e){return function(t){var n=iU(Yj(t,e))(t),r=n[0],i=n[1];return{init:r,rest:i}}}var cJ=function(e){return function(t){return e<=0||co(t)?t:e>=t.length?xt:t.slice(e,t.length)}},lJ=function(e){return function(t){return e<=0||co(t)?t:e>=t.length?xt:t.slice(0,t.length-e)}};function fJ(e){return function(t){var n=Yj(t,e);return n===0?t:n===t.length?xt:t.slice(n)}}var nv=function(e){return function(t){for(var n=0;n<t.length;n++)if(e(t[n]))return de(n);return Ce}};function rv(e){return function(t){for(var n=0;n<t.length;n++)if(e(t[n]))return de(t[n]);return Ce}}var Gj=function(e){return function(t){for(var n=0;n<t.length;n++){var r=e(t[n]);if(It(r))return r}return Ce}};function Jj(e){return function(t){for(var n=t.length-1;n>=0;n--)if(e(t[n]))return de(t[n]);return Ce}}var Zj=function(e){return function(t){for(var n=t.length-1;n>=0;n--){var r=e(t[n]);if(It(r))return r}return Ce}},Xj=function(e){return function(t){for(var n=t.length-1;n>=0;n--)if(e(t[n]))return de(n);return Ce}},dJ=function(e,t){return function(n){return e<0||e>n.length?Ce:de(Og(e,t,n))}},pJ=function(e,t){return eU(e,function(){return t})},AJ=function(e){return function(t){return nf(e,t)?Ce:de(RU(e,t))}},eU=function(e,t){return function(n){return nf(e,n)?Ce:de(pv(e,t(n[e]),n))}},hJ=function(e){return e.length<=1?e:e.slice().reverse()},mJ=function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];r._tag==="Right"&&t.push(r.right)}return t},gJ=function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];r._tag==="Left"&&t.push(r.left)}return t},vJ=function(e){return function(t){return t.length<=1?t:t.slice().sort(e.compare)}},tU=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};function nU(e,t){return t===void 0?function(n){return nU(n,e)}:tU(e,t,function(n,r){return[n,r]})}var yJ=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]},rU=function(e){var t=kg(e);return function(n){return Mt(n)?t(n):n}},bJ=function(e){var t=wS(e);return function(n){return Mt(n)?t(n):n}},CJ=function(e){var t=IS(e);return function(n){return Mt(n)?t(n):n}};function Kp(e){return function(t,n){if(n===void 0){var r=Kp(e);return function(a){return r(t,a)}}for(var i=function(a){return e.equals(a,t)},o=0;o<n.length;o++)if(i(n[o]))return!0;return!1}}var SJ=function(e){var t=SS(e);return function(n){return Mt(n)?t(n):n}},_J=function(e){var t=$L(e);return function(n){return Mt(n)?t(n):n}},IJ=function(e){var t=ES(e);return function(n){return Mt(n)?t(n):xt}},iU=function(e){return function(t){return e>=1&&Mt(t)?Mg(e)(t):co(t)?[t,xt]:[xt,t]}},TJ=function(e){var t=PL(e);return function(n){return Mt(n)?t(n):xt}},xJ=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return Bj(e.apply(void 0,t))}};function wJ(e,t,n){n===void 0&&(n=function(){return!0});var r=function(i,o){return Mt(o)?C(Gn(o),qp(function(a){return r(C(i,tv(a)),Fi(o))})):n.apply(void 0,i)?[t.apply(void 0,i)]:xt};return r(xt,e)}var oU=function(e){return function(t){return co(t)?e:co(e)?t:t.concat(e)}},EJ=oU;function v_(e){var t=_S(e);return function(n,r){if(r===void 0){var i=v_(e);return function(o){return i(o,n)}}return Mt(n)&&Mt(r)?t(r)(n):Mt(n)?n:r}}function y_(e){var t=Kp(e);return function(n,r){if(r===void 0){var i=y_(e);return function(o){return i(o,n)}}return n.filter(function(o){return t(o,r)})}}function b_(e){var t=Kp(e);return function(n,r){if(r===void 0){var i=b_(e);return function(o){return i(o,n)}}return n.filter(function(o){return!t(o,r)})}}var _n=function(e,t){return C(e,w_(t))},iv=function(e,t){return C(e,hU(t))},bs=function(e,t){return C(e,AU(t))},Np=function(e,t){return C(e,qp(t))},ov=function(e,t){return C(e,mU(t))},av=function(e,t){return C(e,$_(t))},sv=function(e,t){return C(e,gU(t))},uv=function(e,t){return C(e,vU(t))},aU=function(e,t){return C(e,R_(t))},sU=function(e,t){return C(e,O_(t))},C_=function(e,t){return C(e,pU(t))},Qu=function(e,t,n){return C(e,k_(t,n))},rf=function(e){var t=M_(e);return function(n,r){return C(n,t(r))}},of=function(e,t,n){return C(e,L_(t,n))},S_=function(e,t,n){return C(e,Vp(t,n))},__=function(e){var t=lv(e);return function(n,r){return C(n,t(r))}},I_=function(e,t,n){return C(e,fv(t,n))},uU=function(e,t){return C(e,E_(t))},cU=function(e,t){return C(e,yU(t))},lU=function(e,t){return C(e,F_(t))},cv=function(e){var t=bU(e);return function(n,r){return C(n,t(r))}},fU=function(e){var t=j_(e);return function(n,r){return C(n,t(r))}},T_=function(e,t){return C(e,K_(t))},x_=function(e,t){return C(e,N_(t))},zu=gs,af=function(){return xt},dU=function(e){return function(t){return t.concat(e())}},pU=dU,AU=function(e){return qp(function(t){return C(e,w_(t))})},qp=function(e){return function(t){return C(t,Qj(function(n,r){return e(r)}))}},$J=qp(N),w_=function(e){return function(t){return t.map(function(n){return e(n)})}},hU=function(e){return function(t){return t.map(function(n,r){return e(r,n)})}},sf=function(e){for(var t=[],n=[],r=0,i=e;r<i.length;r++){var o=i[r];o._tag==="Left"?t.push(o.left):n.push(o.right)}return Oe(t,n)},mU=function(e){return function(t){return t.filter(e)}},E_=function(e){return function(t){for(var n=[],r=0;r<t.length;r++){var i=e(r,t[r]);It(i)&&n.push(i.value)}return n}},$_=function(e){return E_(function(t,n){return e(n)})},uf=$_(N),gU=function(e){return R_(function(t,n){return e(n)})},R_=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 Oe(n,r)}},vU=function(e){return O_(function(t,n){return e(n)})},O_=function(e){return function(t){for(var n=[],r=[],i=0;i<t.length;i++){var o=e(i,t[i]);o._tag==="Left"?n.push(o.left):r.push(o.right)}return Oe(n,r)}},yU=function(e){return function(t){return t.filter(function(n,r){return e(r,n)})}},F_=function(e){return function(t){return t.map(function(n,r){return e(t.slice(r))})}},RJ=F_(N),lv=function(e){return function(t){return function(n){return n.reduce(function(r,i,o){return e.concat(r,t(o,i))},e.empty)}}},k_=function(e,t){return Vp(e,function(n,r,i){return t(r,i)})},M_=function(e){var t=lv(e);return function(n){return t(function(r,i){return n(i)})}},Vp=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}},L_=function(e,t){return fv(e,function(n,r,i){return t(r,i)})},fv=function(e,t){return function(n){return n.reduceRight(function(r,i,o){return t(o,i,r)},e)}},bU=function(e){var t=j_(e);return function(n){return t(function(r,i){return n(i)})}},Qp=function(e){return function(t){return Qu(t,e.of(af()),function(n,r){return e.ap(e.map(n,function(i){return function(o){return C(i,tv(o))}}),r)})}},j_=function(e){return function(t){return Vp(e.of(af()),function(n,r,i){return e.ap(e.map(r,function(o){return function(a){return C(o,tv(a))}}),t(n,i))})}},OJ=function(e){var t=q_(e);return function(n){return function(r){return t(r,n)}}},FJ=function(e){var t=V_(e);return function(n){return function(r){return t(r,n)}}},U_=function(e,t){for(var n=[],r=e;;){var i=t(r);if(It(i)){var o=i.value,a=o[0],s=o[1];n.push(a),r=s}else break}return n},ht="ReadonlyArray",CU=function(e){return{show:function(t){return"[".concat(t.map(e.show).join(", "),"]")}}},SU=function(){return{concat:function(e,t){return co(e)?t:co(t)?e:e.concat(t)}}},kJ=function(){return{concat:SU().concat,empty:xt}},_U=function(e){return ai(function(t,n){return t.length===n.length&&t.every(function(r,i){return e.equals(r,n[i])})})},IU=function(e){return Vu(function(t,n){for(var r=t.length,i=n.length,o=Math.min(r,i),a=0;a<o;a++){var s=e.compare(t[a],n[a]);if(s!==0)return s}return Zg.compare(r,i)})},TU=function(e){var t=v_(e);return{concat:function(n,r){return t(r)(n)}}},MJ=function(e){return{concat:TU(e).concat,empty:xt}},LJ=function(e){var t=y_(e);return{concat:function(n,r){return t(r)(n)}}},jJ=function(e){var t=b_(e);return{concat:function(n,r){return t(r)(n)}}},B_={URI:ht,map:_n},UJ=Qe(B_),xU={URI:ht,of:zu},BJ={URI:ht,map:_n,mapWithIndex:iv},dv={URI:ht,map:_n,ap:bs},PJ=Lt(dv),DJ=jt(dv),WJ={URI:ht,map:_n,ap:bs,of:zu},P_={URI:ht,map:_n,ap:bs,chain:Np},KJ={URI:ht,map:_n,ap:bs,of:zu,chain:Np},NJ=At(P_),qJ={URI:ht,unfold:U_},VJ={URI:ht,map:_n,alt:C_},wU={URI:ht,zero:af},QJ=tf(wU,xU),zJ={URI:ht,map:_n,ap:bs,of:zu,alt:C_,zero:af},HJ={URI:ht,map:_n,extend:lU},D_={URI:ht,compact:uf,separate:sf},YJ={URI:ht,map:_n,compact:uf,separate:sf,filter:ov,filterMap:av,partition:sv,partitionMap:uv},GJ={URI:ht,map:_n,mapWithIndex:iv,compact:uf,separate:sf,filter:ov,filterMap:av,partition:sv,partitionMap:uv,partitionMapWithIndex:sU,partitionWithIndex:aU,filterMapWithIndex:uU,filterWithIndex:cU},JJ={URI:ht,reduce:Qu,foldMap:rf,reduceRight:of},ZJ={URI:ht,reduce:Qu,foldMap:rf,reduceRight:of,reduceWithIndex:S_,foldMapWithIndex:__,reduceRightWithIndex:I_},W_={URI:ht,map:_n,reduce:Qu,foldMap:rf,reduceRight:of,traverse:cv,sequence:Qp},XJ={URI:ht,map:_n,mapWithIndex:iv,reduce:Qu,foldMap:rf,reduceRight:of,reduceWithIndex:S_,foldMapWithIndex:__,reduceRightWithIndex:I_,traverse:cv,sequence:Qp,traverseWithIndex:fU},K_=function(e){return function(t){for(var n=QG([],e(t),!0),r=[];n.length>0;){var i=n.shift();nn(i)?n.unshift.apply(n,e(i.left)):r.push(i.right)}return r}},eZ={URI:ht,map:_n,ap:bs,chain:Np,chainRec:T_},N_=function(e){return function(t){var n=e(t),r=[],i=[];function o(c){nn(c)?e(c.left).forEach(function(l){return r.push(l)}):i.push(c.right)}for(var a=0,s=n;a<s.length;a++){var u=s[a];o(u)}for(;r.length>0;)o(r.shift());return i}},tZ={URI:ht,map:_n,ap:bs,chain:Np,chainRec:x_},q_=Pi(W_,D_),V_=Bi(W_,D_),EU={URI:ht,map:_n,compact:uf,separate:sf,filter:ov,filterMap:av,partition:sv,partitionMap:uv,reduce:Qu,foldMap:rf,reduceRight:of,traverse:cv,sequence:Qp,wither:q_,wilt:V_},nZ=g_(EU),$U={URI:ht,fromEither:Pj},rZ=Ur($U),iZ=Og,pv=function(e,t,n){return Mt(n)?CS(e,t,n):n},RU=function(e,t){var n=t.slice();return n.splice(e,1),n},oZ=function(e){return e.slice()},aZ=function(e){return co(e)?xt:e.slice()},xt=Rp;function OU(e){return function(t){return t.every(e)}}var FU=function(e){return function(t){return t.some(e)}},sZ=FU,kU=function(e){var t=qS(e);return function(n){return Wj(function(){return e.empty},t(n))}},uZ=zu(on),cZ=Bt(B_),lZ=Pt(P_),fZ=Ut(dv),dZ=RL,pZ=ej,AZ=tj,hZ=rU,mZ={URI:ht,compact:uf,separate:sf,map:_n,ap:bs,of:zu,chain:Np,filter:ov,filterMap:av,partition:sv,partitionMap:uv,mapWithIndex:iv,partitionMapWithIndex:sU,partitionWithIndex:aU,filterMapWithIndex:uU,filterWithIndex:cU,alt:C_,zero:af,unfold:U_,reduce:Qu,foldMap:rf,reduceRight:of,traverse:cv,sequence:Qp,reduceWithIndex:S_,foldMapWithIndex:__,reduceRightWithIndex:I_,traverseWithIndex:fU,extend:lU,wither:q_,wilt:V_};const gZ=Object.freeze(Object.defineProperty({__proto__:null,Alt:VJ,Alternative:zJ,Applicative:WJ,Apply:dv,Chain:P_,ChainRecBreadthFirst:tZ,ChainRecDepthFirst:eZ,Compactable:D_,Do:uZ,Extend:HJ,Filterable:YJ,FilterableWithIndex:GJ,Foldable:JJ,FoldableWithIndex:ZJ,FromEither:$U,Functor:B_,FunctorWithIndex:BJ,Monad:KJ,Pointed:xU,Traversable:W_,TraversableWithIndex:XJ,URI:ht,Unfoldable:qJ,Witherable:EU,Zero:wU,_chainRecBreadthFirst:x_,_chainRecDepthFirst:T_,alt:pU,altW:dU,ap:AU,apFirst:PJ,apS:fZ,apSecond:DJ,append:tv,appendW:YG,bind:lZ,bindTo:cZ,chain:qp,chainFirst:NJ,chainRecBreadthFirst:N_,chainRecDepthFirst:K_,chainWithIndex:Qj,chop:IJ,chunksOf:TJ,compact:uf,comprehension:wJ,concat:EJ,concatW:oU,cons:pZ,deleteAt:AJ,difference:b_,dropLeft:cJ,dropLeftWhile:fJ,dropRight:lJ,duplicate:RJ,elem:Kp,empty:xt,every:OU,exists:sZ,extend:F_,filter:mU,filterE:nZ,filterMap:$_,filterMapWithIndex:E_,filterWithIndex:yU,findFirst:rv,findFirstMap:Gj,findIndex:nv,findLast:Jj,findLastIndex:Xj,findLastMap:Zj,flap:UJ,flatten:$J,foldLeft:ZG,foldMap:M_,foldMapWithIndex:lv,foldRight:XG,fromArray:aZ,fromEither:Pj,fromEitherK:rZ,fromOption:Bj,fromOptionK:xJ,fromPredicate:JG,getDifferenceMagma:jJ,getEq:_U,getIntersectionSemigroup:LJ,getMonoid:kJ,getOrd:IU,getSemigroup:SU,getShow:CU,getUnionMonoid:MJ,getUnionSemigroup:TU,guard:QJ,head:zj,init:iJ,insertAt:dJ,intercalate:kU,intersection:y_,intersperse:bJ,isEmpty:co,isNonEmpty:Mt,isOutOfBound:nf,last:Hj,lefts:gJ,lookup:Su,makeBy:Uj,map:w_,mapWithIndex:hU,match:Wj,matchLeft:Nj,matchLeftW:Kj,matchRight:Vj,matchRightW:qj,matchW:Dj,modifyAt:eU,of:zu,partition:gU,partitionMap:vU,partitionMapWithIndex:O_,partitionWithIndex:R_,prepend:zG,prependAll:rU,prependToAll:hZ,prependW:HG,range:dZ,readonlyArray:mZ,reduce:k_,reduceRight:L_,reduceRightWithIndex:fv,reduceWithIndex:Vp,replicate:GG,reverse:hJ,rights:mJ,rotate:CJ,scanLeft:eJ,scanRight:tJ,separate:sf,sequence:Qp,size:nJ,snoc:AZ,some:FU,sort:vJ,sortBy:_J,spanLeft:uJ,splitAt:iU,tail:rJ,takeLeft:oJ,takeLeftWhile:sJ,takeRight:aJ,toArray:oZ,traverse:bU,traverseWithIndex:j_,unfold:U_,union:v_,uniq:SJ,unsafeDeleteAt:RU,unsafeInsertAt:iZ,unsafeUpdateAt:pv,unzip:yJ,updateAt:pJ,wilt:FJ,wither:OJ,zero:af,zip:nU,zipWith:tU},Symbol.toStringTag,{value:"Module"}));var ss=function(e){return e.length===0},Qt=fa,vZ=Sl,yZ=VS,Av=jp,bZ=QS,MU=function(e,t){return e<=0?[]:qg(t)(e)},CZ=function(e,t){return MU(e,function(){return t})};function SZ(e){return function(t){return e(t)?[t]:[]}}var LU=function(e){return Vt(e)?[]:[e.value]},jU=function(e){return nn(e)?[]:[e.right]},UU=function(e,t){return function(n){return Qt(n)?t(n):e()}},_Z=UU,BU=function(e,t){return function(n){return Qt(n)?t(si(n),ki(n)):e()}},PU=BU,IZ=PU,DU=function(e,t){return function(n){return Qt(n)?t(ef(n),Xl(n)):e()}},WU=DU,TZ=WU,KU=function(e){return function(t){for(var n=[],r=0;r<t.length;r++)n.push.apply(n,e(r,t[r]));return n}},xZ=function(e,t){return function(n){var r=n.length,i=new Array(r+1);i[0]=e;for(var o=0;o<r;o++)i[o+1]=t(i[o],n[o]);return i}},wZ=function(e,t){return function(n){var r=n.length,i=new Array(r+1);i[r]=e;for(var o=r-1;o>=0;o--)i[o]=t(n[o],i[o+1]);return i}},EZ=function(e){return e.length},zp=Ng,$Z=Su,RZ=zj,OZ=Hj,FZ=function(e){return Qt(e)?de(ki(e)):Ce},kZ=function(e){return Qt(e)?de(ef(e)):Ce},MZ=function(e){return function(t){return zp(e,t)?kn(t):t.slice(0,e)}},LZ=function(e){return function(t){return zp(e,t)?kn(t):e===0?[]:t.slice(-e)}};function jZ(e){return function(t){for(var n=[],r=0,i=t;r<i.length;r++){var o=i[r];if(!e(o))break;n.push(o)}return n}}var NU=function(e,t){for(var n=e.length,r=0;r<n&&t(e[r]);r++);return r};function UZ(e){return function(t){var n=HU(NU(t,e))(t),r=n[0],i=n[1];return{init:r,rest:i}}}var BZ=function(e){return function(t){return e<=0||ss(t)?kn(t):e>=t.length?[]:t.slice(e,t.length)}},PZ=function(e){return function(t){return e<=0||ss(t)?kn(t):e>=t.length?[]:t.slice(0,t.length-e)}};function DZ(e){return function(t){return t.slice(NU(t,e))}}var WZ=nv;function KZ(e){return rv(e)}var NZ=Gj;function qZ(e){return Jj(e)}var VZ=Zj,QZ=Xj,kn=function(e){return e.slice()},zZ=function(e,t){return function(n){return e<0||e>n.length?Ce:de(_2(e,t,n))}},HZ=function(e,t){return qU(e,function(){return t})},YZ=function(e){return function(t){return zp(e,t)?Ce:de(T2(e,t))}},qU=function(e,t){return function(n){return zp(e,n)?Ce:de(I2(e,t(n[e]),n))}},GZ=function(e){return ss(e)?[]:e.slice().reverse()},JZ=function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];r._tag==="Right"&&t.push(r.right)}return t},ZZ=function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];r._tag==="Left"&&t.push(r.left)}return t},XZ=function(e){return function(t){return t.length<=1?kn(t):t.slice().sort(e.compare)}},VU=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};function QU(e,t){return t===void 0?function(n){return QU(n,e)}:VU(e,t,function(n,r){return[n,r]})}var eX=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]},zU=function(e){var t=Qg(e);return function(n){return Qt(n)?t(n):[]}},tX=function(e){var t=fj(e);return function(n){return Qt(n)?t(n):kn(n)}},nX=function(e){var t=JS(e);return function(n){return Qt(n)?t(n):kn(n)}},Q_=Kp,rX=function(e){var t=YS(e);return function(n){return Qt(n)?t(n):kn(n)}},iX=function(e){var t=nj(e);return function(n){return Qt(n)?t(n):kn(n)}},oX=function(e){var t=e_(e);return function(n){return Qt(n)?t(n):[]}},HU=function(e){return function(t){return e>=1&&Qt(t)?zg(e)(t):ss(t)?[kn(t),[]]:[[],kn(t)]}},aX=function(e){var t=hj(e);return function(n){return Qt(n)?t(n):[]}},sX=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return LU(e.apply(void 0,t))}};function uX(e,t,n){n===void 0&&(n=function(){return!0});var r=function(i,o){return Qt(o)?C(si(o),Yp(function(a){return r(C(i,Av(a)),ki(o))})):n.apply(void 0,i)?[t.apply(void 0,i)]:[]};return r([],e)}var YU=function(e){return function(t){return ss(t)?kn(e):ss(e)?kn(t):t.concat(e)}},cX=YU;function z_(e){var t=GS(e);return function(n,r){if(r===void 0){var i=z_(e);return function(o){return i(o,n)}}return Qt(n)&&Qt(r)?t(r)(n):Qt(n)?kn(n):kn(r)}}function H_(e){var t=Q_(e);return function(n,r){if(r===void 0){var i=H_(e);return function(o){return i(o,n)}}return n.filter(function(o){return t(o,r)})}}function Y_(e){var t=Q_(e);return function(n,r){if(r===void 0){var i=Y_(e);return function(o){return i(o,n)}}return n.filter(function(o){return!t(o,r)})}}var In=function(e,t){return C(e,eI(t))},hv=function(e,t){return C(e,r2(t))},Cs=function(e,t){return C(e,n2(t))},Hp=function(e,t){return C(e,Yp(t))},mv=function(e,t){return C(e,i2(t))},gv=function(e,t){return C(e,nI(t))},vv=function(e,t){return C(e,o2(t))},yv=function(e,t){return C(e,a2(t))},GU=function(e,t){return C(e,rI(t))},JU=function(e,t){return C(e,iI(t))},G_=function(e,t){return C(e,u2(t))},Hu=function(e,t,n){return C(e,d2(t,n))},cf=function(e){var t=l2(e);return function(n,r){return C(n,t(r))}},lf=function(e,t,n){return C(e,p2(t,n))},J_=function(e,t,n){return C(e,aI(t,n))},Z_=function(e){var t=f2(e);return function(n,r){return C(n,t(r))}},X_=function(e,t,n){return C(e,A2(t,n))},ZU=function(e,t){return C(e,tI(t))},XU=function(e,t){return C(e,c2(t))},e2=function(e,t){return C(e,oI(t))},bv=function(e){var t=Cv(e);return function(n,r){return C(n,t(r))}},t2=function(e){var t=sI(e);return function(n,r){return C(n,t(r))}},lX=T_,fX=x_,Ss=ys,ff=function(){return[]},eI=function(e){return function(t){return t.map(function(n){return e(n)})}},n2=function(e){return Yp(function(t){return C(e,eI(t))})},Yp=function(e){return function(t){return C(t,KU(function(n,r){return e(r)}))}},dX=Yp(N),r2=function(e){return function(t){return t.map(function(n,r){return e(r,n)})}},tI=function(e){return function(t){for(var n=[],r=0;r<t.length;r++){var i=e(r,t[r]);It(i)&&n.push(i.value)}return n}},nI=function(e){return tI(function(t,n){return e(n)})},df=nI(N),pf=function(e){for(var t=[],n=[],r=0,i=e;r<i.length;r++){var o=i[r];o._tag==="Left"?t.push(o.left):n.push(o.right)}return Oe(t,n)},i2=function(e){return function(t){return t.filter(e)}},o2=function(e){return rI(function(t,n){return e(n)})},rI=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 Oe(n,r)}},a2=function(e){return iI(function(t,n){return e(n)})},iI=function(e){return function(t){for(var n=[],r=[],i=0;i<t.length;i++){var o=e(i,t[i]);o._tag==="Left"?n.push(o.left):r.push(o.right)}return Oe(n,r)}},s2=function(e){return function(t){return t.concat(e())}},u2=s2,c2=function(e){return function(t){return t.filter(function(n,r){return e(r,n)})}},oI=function(e){return function(t){return t.map(function(n,r){return e(t.slice(r))})}},pX=oI(N),l2=M_,f2=lv,d2=k_,aI=Vp,p2=L_,A2=fv,Cv=function(e){var t=sI(e);return function(n){return t(function(r,i){return n(i)})}},Gp=function(e){return function(t){return Hu(t,e.of(ff()),function(n,r){return e.ap(e.map(n,function(i){return function(o){return C(i,Av(o))}}),r)})}},sI=function(e){return function(t){return aI(e.of(ff()),function(n,r,i){return e.ap(e.map(r,function(o){return function(a){return C(o,Av(a))}}),t(n,i))})}},AX=function(e){var t=AI(e);return function(n){return function(r){return t(r,n)}}},hX=function(e){var t=hI(e);return function(n){return function(r){return t(r,n)}}},uI=function(e,t){for(var n=[],r=e;;){var i=t(r);if(It(i)){var o=i.value,a=o[0],s=o[1];n.push(a),r=s}else break}return n},mt="Array",mX=CU,h2=function(){return{concat:function(e,t){return e.concat(t)}}},cI=function(){return{concat:h2().concat,empty:[]}},m2=_U,gX=IU,g2=function(e){var t=z_(e);return{concat:function(n,r){return t(r)(n)}}},vX=function(e){return{concat:g2(e).concat,empty:[]}},yX=function(e){var t=H_(e);return{concat:function(n,r){return t(r)(n)}}},bX=function(e){var t=Y_(e);return{concat:function(n,r){return t(r)(n)}}},lI={URI:mt,map:In},CX=Qe(lI),v2={URI:mt,of:Ss},SX={URI:mt,map:In,mapWithIndex:hv},Sv={URI:mt,map:In,ap:Cs},_X=Lt(Sv),IX=jt(Sv),TX={URI:mt,map:In,ap:Cs,of:Ss},fI={URI:mt,map:In,ap:Cs,chain:Hp},xX=At(fI),wX={URI:mt,map:In,ap:Cs,of:Ss,chain:Hp},EX={URI:mt,unfold:uI},$X={URI:mt,map:In,alt:G_},y2={URI:mt,zero:ff},RX=tf(y2,v2),OX={URI:mt,map:In,ap:Cs,of:Ss,alt:G_,zero:ff},FX={URI:mt,map:In,extend:e2},dI={URI:mt,compact:df,separate:pf},kX={URI:mt,map:In,compact:df,separate:pf,filter:mv,filterMap:gv,partition:vv,partitionMap:yv},MX={URI:mt,map:In,mapWithIndex:hv,compact:df,separate:pf,filter:mv,filterMap:gv,partition:vv,partitionMap:yv,partitionMapWithIndex:JU,partitionWithIndex:GU,filterMapWithIndex:ZU,filterWithIndex:XU},b2={URI:mt,reduce:Hu,foldMap:cf,reduceRight:lf},LX={URI:mt,reduce:Hu,foldMap:cf,reduceRight:lf,reduceWithIndex:J_,foldMapWithIndex:Z_,reduceRightWithIndex:X_},pI={URI:mt,map:In,reduce:Hu,foldMap:cf,reduceRight:lf,traverse:bv,sequence:Gp},jX={URI:mt,map:In,mapWithIndex:hv,reduce:Hu,foldMap:cf,reduceRight:lf,reduceWithIndex:J_,foldMapWithIndex:Z_,reduceRightWithIndex:X_,traverse:bv,sequence:Gp,traverseWithIndex:t2},AI=Pi(pI,dI),hI=Bi(pI,dI),C2={URI:mt,map:In,compact:df,separate:pf,filter:mv,filterMap:gv,partition:vv,partitionMap:yv,reduce:Hu,foldMap:cf,reduceRight:lf,traverse:bv,sequence:Gp,wither:AI,wilt:hI},UX=K_,BX={URI:mt,map:In,ap:Cs,chain:Hp,chainRec:lX},PX=N_,DX={URI:mt,map:In,ap:Cs,chain:Hp,chainRec:fX},WX=g_(C2),S2={URI:mt,fromEither:jU},KX=Ur(S2),_2=zS,I2=function(e,t,n){return Qt(n)?HS(e,t,n):[]},T2=function(e,t){var n=t.slice();return n.splice(e,1),n},NX=OU,x2=function(e){return function(t){return t.some(e)}},qX=x2,VX=kU,QX=Ss(on),zX=Bt(lI),HX=Pt(fI),YX=Ut(Sv),GX=rj,JX=[],ZX=Rj,XX=Oj,eee=zU,tee={URI:mt,compact:df,separate:pf,map:In,ap:Cs,of:Ss,chain:Hp,filter:mv,filterMap:gv,partition:vv,partitionMap:yv,mapWithIndex:hv,partitionMapWithIndex:JU,partitionWithIndex:GU,filterMapWithIndex:ZU,filterWithIndex:XU,alt:G_,zero:ff,unfold:uI,reduce:Hu,foldMap:cf,reduceRight:lf,traverse:bv,sequence:Gp,reduceWithIndex:J_,foldMapWithIndex:Z_,reduceRightWithIndex:X_,traverseWithIndex:t2,extend:e2,wither:AI,wilt:hI};const nee=Object.freeze(Object.defineProperty({__proto__:null,Alt:$X,Alternative:OX,Applicative:TX,Apply:Sv,Chain:fI,ChainRecBreadthFirst:DX,ChainRecDepthFirst:BX,Compactable:dI,Do:QX,Extend:FX,Filterable:kX,FilterableWithIndex:MX,Foldable:b2,FoldableWithIndex:LX,FromEither:S2,Functor:lI,FunctorWithIndex:SX,Monad:wX,Pointed:v2,Traversable:pI,TraversableWithIndex:jX,URI:mt,Unfoldable:EX,Witherable:C2,Zero:y2,alt:u2,altW:s2,ap:n2,apFirst:_X,apS:YX,apSecond:IX,append:Av,appendW:bZ,array:tee,bind:HX,bindTo:zX,chain:Yp,chainFirst:xX,chainRecBreadthFirst:PX,chainRecDepthFirst:UX,chainWithIndex:KU,chop:oX,chunksOf:aX,compact:df,comprehension:uX,concat:cX,concatW:YU,cons:ZX,copy:kn,deleteAt:YZ,difference:Y_,dropLeft:BZ,dropLeftWhile:DZ,dropRight:PZ,duplicate:pX,elem:Q_,empty:JX,every:NX,exists:qX,extend:oI,filter:i2,filterE:WX,filterMap:nI,filterMapWithIndex:tI,filterWithIndex:c2,findFirst:KZ,findFirstMap:NZ,findIndex:WZ,findLast:qZ,findLastIndex:QZ,findLastMap:VZ,flap:CX,flatten:dX,foldLeft:IZ,foldMap:l2,foldMapWithIndex:f2,foldRight:TZ,fromEither:jU,fromEitherK:KX,fromOption:LU,fromOptionK:sX,fromPredicate:SZ,getDifferenceMagma:bX,getEq:m2,getIntersectionSemigroup:yX,getMonoid:cI,getOrd:gX,getSemigroup:h2,getShow:mX,getUnionMonoid:vX,getUnionSemigroup:g2,guard:RX,head:RZ,init:kZ,insertAt:zZ,intercalate:VX,intersection:H_,intersperse:tX,isEmpty:ss,isNonEmpty:Qt,isOutOfBound:zp,last:OZ,lefts:ZZ,lookup:$Z,makeBy:MU,map:eI,mapWithIndex:r2,match:_Z,matchLeft:PU,matchLeftW:BU,matchRight:WU,matchRightW:DU,matchW:UU,modifyAt:qU,of:Ss,partition:o2,partitionMap:a2,partitionMapWithIndex:iI,partitionWithIndex:rI,prepend:vZ,prependAll:zU,prependToAll:eee,prependW:yZ,range:GX,reduce:d2,reduceRight:p2,reduceRightWithIndex:A2,reduceWithIndex:aI,replicate:CZ,reverse:GZ,rights:JZ,rotate:nX,scanLeft:xZ,scanRight:wZ,separate:pf,sequence:Gp,size:EZ,snoc:XX,some:x2,sort:XZ,sortBy:iX,spanLeft:UZ,splitAt:HU,tail:FZ,takeLeft:MZ,takeLeftWhile:jZ,takeRight:LZ,traverse:Cv,traverseWithIndex:sI,unfold:uI,union:z_,uniq:rX,unsafeDeleteAt:T2,unsafeInsertAt:_2,unsafeUpdateAt:I2,unzip:eX,updateAt:HZ,wilt:hX,wither:AX,zero:ff,zip:QU,zipWith:VU},Symbol.toStringTag,{value:"Module"})),ree=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var iee=function(e){return typeof e=="boolean"},w2=function(e,t){return function(n){return n?t():e()}},E2=w2,$2=E2,oee=$2,R2={equals:function(e,t){return e===t}},aee={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}},O2={concat:function(e,t){return e&&t}},F2={concat:function(e,t){return e||t}},see={concat:O2.concat,empty:!0},uee={concat:F2.concat,empty:!1},cee={equals:R2.equals,compare:function(e,t){return e<t?-1:e>t?1:0}},lee={show:function(e){return JSON.stringify(e)}};const fee=Object.freeze(Object.defineProperty({__proto__:null,BooleanAlgebra:aee,Eq:R2,MonoidAll:see,MonoidAny:uee,Ord:cee,SemigroupAll:O2,SemigroupAny:F2,Show:lee,fold:oee,foldW:E2,isBoolean:iee,match:$2,matchW:w2},Symbol.toStringTag,{value:"Module"}));var k2=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}},dee={meet:function(){},join:function(){},zero:void 0,one:void 0,implies:function(){},not:function(){}},pee=k2,Aee={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}},hee=GM;const mee=Object.freeze(Object.defineProperty({__proto__:null,booleanAlgebraBoolean:Aee,booleanAlgebraVoid:dee,getDualBooleanAlgebra:pee,getFunctionBooleanAlgebra:hee,reverse:k2},Symbol.toStringTag,{value:"Module"}));var gee=function(e){return vL(e)(e.bottom,e.top)},vee=function(e){var t=lS(e);return{equals:t.equals,compare:t.compare,top:e.bottom,bottom:e.top}},yee={equals:vm.equals,compare:vm.compare,top:1/0,bottom:-1/0};const bee=Object.freeze(Object.defineProperty({__proto__:null,boundedNumber:yee,clamp:gee,reverse:vee},Symbol.toStringTag,{value:"Module"}));function M2(e){return{meet:Ig(e),join:Tg(e)}}const Cee=Object.freeze(Object.defineProperty({__proto__:null,getMinMaxDistributiveLattice:M2},Symbol.toStringTag,{value:"Module"}));function See(e){var t=M2(e);return function(n,r){return{join:t.join,meet:t.meet,zero:n,one:r}}}const _ee=Object.freeze(Object.defineProperty({__proto__:null,getMinMaxBoundedDistributiveLattice:See},Symbol.toStringTag,{value:"Module"})),Iee=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),Tee=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),xee=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),wee=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var mI=function(e,t){for(var n=t(e);n._tag==="Left";)n=t(n.left);return n.right};const Eee=Object.freeze(Object.defineProperty({__proto__:null,tailRec:mI},Symbol.toStringTag,{value:"Module"}));function gI(e,t){return function(n,r){return t.compose(e.right(r),e.left(n))}}function L2(e,t){var n=gI(e,t);return function(r,i){return t.compose(e.promap(t.id(),function(o){return o._tag==="Left"?o.left:o.right},N),n(r,i))}}function $ee(e){return gI(e,e)}function Ree(e){return L2(e,e)}const Oee=Object.freeze(Object.defineProperty({__proto__:null,fanIn:L2,fanin:Ree,split:gI,splitChoice:$ee},Symbol.toStringTag,{value:"Module"})),Fee=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var kee=function(e,t){return C(e,j2(t))},j2=function(e){return function(t){return H(e,t)}},U2="Predicate",B2=function(){return{concat:function(e,t){return C(e,D2(t))}}},Mee=function(){return{concat:B2().concat,empty:XM}},P2=function(){return{concat:function(e,t){return C(e,W2(t))}}},Lee=function(){return{concat:P2().concat,empty:aS}},jee={URI:U2,contramap:kee},Vd=function(e){return function(t){return!e(t)}},D2=function(e){return function(t){return function(n){return t(n)||e(n)}}},W2=function(e){return function(t){return function(n){return t(n)&&e(n)}}};const Uee=Object.freeze(Object.defineProperty({__proto__:null,Contravariant:jee,URI:U2,and:W2,contramap:j2,getMonoidAll:Lee,getMonoidAny:Mee,getSemigroupAll:P2,getSemigroupAny:B2,not:Vd,or:D2},Symbol.toStringTag,{value:"Module"}));var ot=Ce,Tt=de;function _v(e){return function(t){return e(t)?Tt(t):ot}}var Iv=function(e){return e._tag==="Right"?ot:Tt(e.left)},Jp=function(e){return e._tag==="Left"?ot:Tt(e.right)},Br=function(e,t){return C(e,bo(t))},Yu=function(e,t){return C(e,V2(t))},Tv=function(e,t){return C(e,Zp(t))},xv=function(e,t,n){return C(e,z2(t,n))},wv=function(e){var t=H2(e);return function(n,r){return C(n,t(r))}},Ev=function(e,t,n){return C(e,Y2(t,n))},vI=function(e){var t=rB(e);return function(n,r){return C(n,t(r))}},yI=function(e,t){return C(e,J2(t))},Qd=function(e,t){return C(e,X2(t))},bI=function(e,t){return C(e,eB(t))},K2=function(e,t){return C(e,II(t))},CI=function(e,t){return C(e,tB(t))},SI=function(e,t){return C(e,nB(t))},Gt="Option",Bee=function(e){return{show:function(t){return Ve(t)?"none":"some(".concat(e.show(t.value),")")}}},N2=function(e){return{equals:function(t,n){return t===n||(Ve(t)?Ve(n):Ve(n)?!1:e.equals(t.value,n.value))}}},Pee=function(e){return{equals:N2(e).equals,compare:function(t,n){return t===n?0:ym(t)?ym(n)?e.compare(t.value,n.value):1:-1}}},_I=function(e){return{concat:function(t,n){return Ve(t)?n:Ve(n)?t:Tt(e.concat(t.value,n.value))},empty:ot}},bo=function(e){return function(t){return Ve(t)?ot:Tt(e(t.value))}},Af={URI:Gt,map:Br},da=Tt,q2={URI:Gt,of:da},V2=function(e){return function(t){return Ve(t)||Ve(e)?ot:Tt(t.value(e.value))}},hf={URI:Gt,map:Br,ap:Yu},Q2={URI:Gt,map:Br,ap:Yu,of:da},Zp=function(e){return function(t){return Ve(t)?ot:e(t.value)}},Xp={URI:Gt,map:Br,ap:Yu,chain:Tv},Dee={URI:Gt,map:Br,ap:Yu,of:da,chain:Tv},z2=function(e,t){return function(n){return Ve(n)?e:t(e,n.value)}},H2=function(e){return function(t){return function(n){return Ve(n)?e.empty:t(n.value)}}},Y2=function(e,t){return function(n){return Ve(n)?e:t(n.value,e)}},Wee={URI:Gt,reduce:xv,foldMap:wv,reduceRight:Ev},G2=function(e){return function(t){return Ve(t)?e():t}},J2=G2,Kee={URI:Gt,map:Br,alt:yI},$v=function(){return ot},Z2={URI:Gt,zero:$v},Nee=tf(Z2,q2),qee={URI:Gt,map:Br,ap:Yu,of:da,alt:yI,zero:$v},II=function(e){return function(t){return Ve(t)?ot:Tt(e(t))}},Vee={URI:Gt,map:Br,extend:K2},mf=Zp(N),Qee=Oe(ot,ot),gf=function(e){return Ve(e)?Qee:Oe(Iv(e.value),Jp(e.value))},Gu={URI:Gt,compact:mf,separate:gf},X2=function(e){return function(t){return Ve(t)?ot:e(t.value)?t:ot}},eB=function(e){return function(t){return Ve(t)?ot:e(t.value)}},tB=function(e){return function(t){return Oe(Qd(t,Vd(e)),Qd(t,e))}},nB=function(e){return H(bo(e),gf)},pa={URI:Gt,map:Br,compact:mf,separate:gf,filter:Qd,filterMap:bI,partition:CI,partitionMap:SI},rB=function(e){return function(t){return function(n){return Ve(n)?e.of(ot):e.map(t(n.value),Tt)}}},Rv=function(e){return function(t){return Ve(t)?e.of(ot):e.map(t.value,Tt)}},TI={URI:Gt,map:Br,reduce:xv,foldMap:wv,reduceRight:Ev,traverse:vI,sequence:Rv},xI=Pi(TI,Gu),wI=Bi(TI,Gu),zee=function(e){var t=xI(e);return function(n){return function(r){return t(r,n)}}},Hee=function(e){var t=wI(e);return function(n){return function(r){return t(r,n)}}},Yee={URI:Gt,map:Br,reduce:xv,foldMap:wv,reduceRight:Ev,traverse:vI,sequence:Rv,compact:mf,separate:gf,filter:Qd,filterMap:bI,partition:CI,partitionMap:SI,wither:xI,wilt:wI},EI=function(){return ot},Gee={URI:Gt,map:Br,ap:Yu,of:da,chain:Tv,throwError:EI},vf=Jp,Ov={URI:Gt,fromEither:vf},ym=It,Ve=function(e){return e._tag==="None"},$I=function(e,t){return function(n){return Ve(n)?e():t(n.value)}},Jee=$I,Aa=$I,_s=Aa,iB=function(e){return function(t){return Ve(t)?e():t.value}},RI=iB,Zee=Qe(Af),Xee=Lt(hf),ete=jt(hf),tte=mf,nte=At(Xp),rte=II(N),ite=Ur(Ov),ote=ca(Ov,Xp),ate=la(Ov,Xp),Ju=function(e){return e==null?ot:Tt(e)},oB=function(e){try{return Tt(e())}catch{return ot}},ste=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return oB(function(){return e.apply(void 0,t)})}},ute=function(e){return H(e,Ju)},aB=function(e){return function(t){return Ve(t)?ot:Ju(e(t.value))}},OI=Aa(eL,N),sB=Aa(sS,N);function uB(e){return function(t,n){if(n===void 0){var r=uB(e);return function(i){return r(t,i)}}return Ve(n)?!1:e.equals(t,n.value)}}var cte=function(e){return function(t){return Ve(t)?!1:e(t.value)}},lte=da(on),fte=Bt(Af),dte=Pt(Xp),pte=Ut(hf),cB=da(Sn),Fv=function(e){return function(t){var n=e(0,jr(t));if(Ve(n))return ot;for(var r=[n.value],i=1;i<t.length;i++){var o=e(i,t[i]);if(Ve(o))return ot;r.push(o.value)}return Tt(r)}},FI=function(e){var t=Fv(e);return function(n){return yt(n)?t(n):cB}},Ate=FI,lB=function(e){return FI(function(t,n){return e(n)})},hte=lB(N);function mte(e){return function(t){return ym(e(t))}}var gte=aB,fB={URI:Gt,map:Br,of:da,ap:Yu,chain:Tv,reduce:xv,foldMap:wv,reduceRight:Ev,traverse:vI,sequence:Rv,zero:$v,alt:yI,extend:K2,compact:mf,separate:gf,filter:Qd,filterMap:bI,partition:CI,partitionMap:SI,wither:xI,wilt:wI,throwError:EI},vte=an(hf),yte=oi(Q2),dB=function(){return _I(gS())},bte=function(){return _I(Eg())};const Cte=Object.freeze(Object.defineProperty({__proto__:null,Alt:Kee,Alternative:qee,ApT:cB,Applicative:Q2,Apply:hf,Chain:Xp,Compactable:Gu,Do:lte,Extend:Vee,Filterable:pa,Foldable:Wee,FromEither:Ov,Functor:Af,Monad:Dee,MonadThrow:Gee,Pointed:q2,Traversable:TI,URI:Gt,Witherable:Yee,Zero:Z2,alt:J2,altW:G2,ap:V2,apFirst:Xee,apS:pte,apSecond:ete,bind:dte,bindTo:fte,chain:Zp,chainEitherK:ote,chainFirst:nte,chainFirstEitherK:ate,chainNullableK:aB,compact:mf,duplicate:rte,elem:uB,exists:cte,extend:II,filter:X2,filterMap:eB,flap:Zee,flatten:tte,fold:_s,foldMap:H2,foldW:Jee,fromEither:vf,fromEitherK:ite,fromNullable:Ju,fromNullableK:ute,fromPredicate:_v,getApplyMonoid:yte,getApplySemigroup:vte,getEq:N2,getFirstMonoid:dB,getLastMonoid:bte,getLeft:Iv,getMonoid:_I,getOrElse:RI,getOrElseW:iB,getOrd:Pee,getRefinement:mte,getRight:Jp,getShow:Bee,guard:Nee,isNone:Ve,isSome:ym,map:bo,mapNullable:gte,match:Aa,matchW:$I,none:ot,of:da,option:fB,partition:tB,partitionMap:nB,reduce:z2,reduceRight:Y2,separate:gf,sequence:Rv,sequenceArray:hte,some:Tt,throwError:EI,toNullable:OI,toUndefined:sB,traverse:rB,traverseArray:lB,traverseArrayWithIndex:Ate,traverseReadonlyArrayWithIndex:FI,traverseReadonlyNonEmptyArrayWithIndex:Fv,tryCatch:oB,tryCatchK:ste,wilt:Hee,wither:zee,zero:$v},Symbol.toStringTag,{value:"Module"}));function Co(e,t){return function(n){return e.map(n,t.compact)}}function ha(e,t,n){var r=Co(e,t),i=Hl(e,n);return function(o){return Oe(r(C(o,i(Iv))),r(C(o,i(Jp))))}}function Ste(e,t){var n=Yl(e,t).map;return{map:n,compact:Co(e,t),separate:ha(e,t,t)}}const _te=Object.freeze(Object.defineProperty({__proto__:null,compact:Co,getCompactableComposition:Ste,separate:ha},Symbol.toStringTag,{value:"Module"}));var Ite=function(e){return function(){return console.log(e)}},Tte=function(e){return function(){return console.warn(e)}},xte=function(e){return function(){return console.error(e)}},wte=function(e){return function(){return console.info(e)}};const Ete=Object.freeze(Object.defineProperty({__proto__:null,error:xte,info:wte,log:Ite,warn:Tte},Symbol.toStringTag,{value:"Module"}));var yf=bl;function $te(e){return{show:function(t){return"make(".concat(e.show(t),")")}}}var Rte=N,Ote=N,Fte=N,kte=N,Mte=N,Lte=N,jte=N,Ute=N,Bte=N;function pB(e){return{URI:Zu,_E:void 0,map:kI,ap:function(t,n){return yf(e.concat(t,n))}}}function AB(e){var t=pB(e);return{URI:Zu,_E:void 0,map:t.map,ap:t.ap,of:function(){return yf(e.empty)}}}var hB=function(e,t){return C(e,vB())},kI=function(e,t){return C(e,yB())},mB=function(e,t,n){return C(e,bB(t))},gB=function(e,t){return C(e,CB(t))},vB=function(){return bl},yB=function(){return bl},bB=function(e){return function(t){return yf(e(t))}},CB=function(e){return function(t){return yf(e(t))}},Zu="Const",SB={URI:Zu,map:kI},Pte=Qe(SB),Dte={URI:Zu,contramap:hB},Wte={URI:Zu,bimap:mB,mapLeft:gB},Kte={URI:Zu,map:kI,contramap:hB,bimap:mB,mapLeft:gB};const Nte=Object.freeze(Object.defineProperty({__proto__:null,Bifunctor:Wte,Contravariant:Dte,Functor:SB,URI:Zu,bimap:bB,const_:Kte,contramap:vB,flap:Pte,getApplicative:AB,getApply:pB,getBooleanAlgebra:Bte,getBounded:Fte,getEq:Rte,getHeytingAlgebra:Ute,getMonoid:Mte,getOrd:Ote,getRing:jte,getSemigroup:kte,getSemiring:Lte,getShow:$te,make:yf,map:yB,mapLeft:CB},Symbol.toStringTag,{value:"Module"})),qte=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var Vte={equals:function(e,t){return e.valueOf()===t.valueOf()}},Qte={equals:function(e,t){return e.getDate()===t.getDate()}},zte={equals:function(e,t){return e.getMonth()===t.getMonth()}},Hte={equals:function(e,t){return e.getFullYear()===t.getFullYear()}},Yte=C(Zg,_g(function(e){return e.valueOf()})),Gte=function(){return new Date},Jte=function(){return new Date().getTime()};const Zte=Object.freeze(Object.defineProperty({__proto__:null,Eq:Vte,Ord:Yte,create:Gte,eqDate:Qte,eqMonth:zte,eqYear:Hte,now:Jte},Symbol.toStringTag,{value:"Module"}));var wt=ea,Ye=hs,Un=function(e,t){return C(e,tc(t))},Xu=function(e,t){return C(e,xB(t))},bf=function(e,t){return C(e,ui(t))},eA=function(e,t,n){return C(e,EB(t,n))},tA=function(e){return function(t,n){var r=$B(e);return C(t,r(n))}},nA=function(e,t,n){return C(e,RB(t,n))},kv=function(e){var t=OB(e);return function(n,r){return C(n,t(r))}},MI=function(e,t,n){return C(e,PI(t,n))},LI=function(e,t){return C(e,aA(t))},_B=function(e,t){return C(e,kB(t))},jI=function(e,t){return C(e,DI(t))},UI=function(e,t){return mI(t(e),function(n){return se(n)?Ye(wt(n.left)):se(n.right)?wt(t(n.right.left)):Ye(Ye(n.right.right))})},$t="Either",Xte=function(e,t){return{show:function(n){return se(n)?"left(".concat(e.show(n.left),")"):"right(".concat(t.show(n.right),")")}}},ene=function(e,t){return{equals:function(n,r){return n===r||(se(n)?se(r)&&e.equals(n.left,r.left):WI(r)&&t.equals(n.right,r.right))}}},rA=function(e){return{concat:function(t,n){return se(n)?t:se(t)?n:Ye(e.concat(t.right,n.right))}}},ec=function(e){var t=wt(e.empty);return{URI:$t,_E:void 0,compact:function(n){return se(n)?n:n.right._tag==="None"?t:Ye(n.right.value)},separate:function(n){return se(n)?Oe(n,n):se(n.right)?Oe(Ye(n.right.left),t):Oe(t,Ye(n.right.right))}}},Cf=function(e){var t=wt(e.empty),n=ec(e),r=n.compact,i=n.separate,o=function(s,u){return se(s)||u(s.right)?s:t},a=function(s,u){return se(s)?Oe(s,s):u(s.right)?Oe(t,Ye(s.right)):Oe(Ye(s.right),t)};return{URI:$t,_E:void 0,map:Un,compact:r,separate:i,filter:o,filterMap:function(s,u){if(se(s))return s;var c=u(s.right);return c._tag==="None"?t:Ye(c.value)},partition:a,partitionMap:function(s,u){if(se(s))return Oe(s,s);var c=u(s.right);return se(c)?Oe(Ye(c.left),t):Oe(t,Ye(c.right))}}},tne=function(e){var t=Cf(e),n=ec(e);return{URI:$t,_E:void 0,map:Un,compact:t.compact,separate:t.separate,filter:t.filter,filterMap:t.filterMap,partition:t.partition,partitionMap:t.partitionMap,traverse:kv,sequence:oA,reduce:eA,foldMap:tA,reduceRight:nA,wither:Pi(W1,n),wilt:Bi(W1,n)}},Is=function(e){return{URI:$t,_E:void 0,map:Un,ap:function(t,n){return se(t)?se(n)?wt(e.concat(t.left,n.left)):t:se(n)?n:Ye(t.right(n.right))},of:So}},IB=function(e){return{URI:$t,_E:void 0,map:Un,alt:function(t,n){if(WI(t))return t;var r=n();return se(r)?wt(e.concat(t.left,r.left)):r}}},tc=function(e){return function(t){return se(t)?t:Ye(e(t.right))}},Ts={URI:$t,map:Un},So=Ye,nne={URI:$t,of:So},TB=function(e){return function(t){return se(t)?t:se(e)?e:Ye(t.right(e.right))}},xB=TB,Sf={URI:$t,map:Un,ap:Xu},wB={URI:$t,map:Un,ap:Xu,of:So},BI=function(e){return function(t){return se(t)?t:e(t.right)}},ui=BI,iA={URI:$t,map:Un,ap:Xu,chain:bf},rne={URI:$t,map:Un,ap:Xu,of:So,chain:bf},EB=function(e,t){return function(n){return se(n)?e:t(e,n.right)}},$B=function(e){return function(t){return function(n){return se(n)?e.empty:t(n.right)}}},RB=function(e,t){return function(n){return se(n)?e:t(n.right,e)}},ine={URI:$t,reduce:eA,foldMap:tA,reduceRight:nA},OB=function(e){return function(t){return function(n){return se(n)?e.of(wt(n.left)):e.map(t(n.right),Ye)}}},oA=function(e){return function(t){return se(t)?e.of(wt(t.left)):e.map(t.right,Ye)}},W1={URI:$t,map:Un,reduce:eA,foldMap:tA,reduceRight:nA,traverse:kv,sequence:oA},PI=function(e,t){return function(n){return se(n)?wt(e(n.left)):Ye(t(n.right))}},aA=function(e){return function(t){return se(t)?wt(e(t.left)):t}},one={URI:$t,bimap:MI,mapLeft:LI},FB=function(e){return function(t){return se(t)?e():t}},kB=FB,ane={URI:$t,map:Un,alt:_B},DI=function(e){return function(t){return se(t)?t:Ye(e(t))}},sne={URI:$t,map:Un,extend:jI},une={URI:$t,map:Un,ap:Xu,chain:bf,chainRec:UI},Mv=wt,cne={URI:$t,map:Un,ap:Xu,of:So,chain:bf,throwError:Mv},_f={URI:$t,fromEither:N},lne=ms(_f),MB=go(_f),se=nn,WI=uS,KI=function(e,t){return function(n){return se(n)?e(n.left):t(n.right)}},LB=KI,xs=KI,NI=xs,jB=function(e){return function(t){return se(t)?e(t.left):t.right}},fne=jB,dne=Qe(Ts),UB=Lt(Sf),pne=UB,BB=jt(Sf),Ane=BB,PB=At(iA),hne=PB,DB=BI(N),mne=DB,gne=DI(N),vne=vo(_f),yne=Nu(_f,iA),WB=qu(_f,iA),bne=WB,KB=function(e){return se(e)?Ye(e.left):wt(e.right)},NB=function(e){return function(t){return se(t)?e(t.left):t}},qB=NB,qI=function(e){return function(t){return t==null?wt(e):Ye(t)}},nc=function(e,t){try{return Ye(e())}catch(n){return wt(t(n))}},Cne=function(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return nc(function(){return e.apply(void 0,n)},t)}},VB=function(e){var t=qI(e);return function(n){return H(n,t)}},Sne=function(e){var t=VB(e);return function(n){return ui(t(n))}},QB=LB(N,N);function _ne(e){return e instanceof Error?e:new Error(String(e))}function zB(e){return function(t,n){if(n===void 0){var r=zB(e);return function(i){return r(t,i)}}return se(n)?!1:e.equals(t,n.right)}}var Ine=function(e){return function(t){return se(t)?!1:e(t.right)}},Tne=So(on),xne=Bt(Ts),HB=Pt(iA),wne=HB,YB=Ut(Sf),Ene=YB,GB=So(Sn),sA=function(e){return function(t){var n=e(0,jr(t));if(se(n))return n;for(var r=[n.right],i=1;i<t.length;i++){var o=e(i,t[i]);if(se(o))return o;r.push(o.right)}return Ye(r)}},VI=function(e){var t=sA(e);return function(n){return yt(n)?t(n):GB}},$ne=VI,JB=function(e){return VI(function(t,n){return e(n)})},Rne=JB(N);function One(e,t){return nc(function(){return JSON.parse(e)},t)}var Fne=function(e,t){return nc(function(){var n=JSON.stringify(e);if(typeof n!="string")throw new Error("Converting unsupported structure to JSON");return n},t)},kne={URI:$t,map:Un,of:So,ap:Xu,chain:bf,reduce:eA,foldMap:tA,reduceRight:nA,traverse:kv,sequence:oA,bimap:MI,mapLeft:LI,alt:_B,extend:jI,chainRec:UI,throwError:Mv},Mne=an(Sf),Lne=oi(wB),jne=function(e,t){return an(Is(e))(t)},Une=function(e,t){return oi(Is(e))(t)};function Bne(e){var t=Is(e).ap,n=IB(e).alt;return{URI:$t,_E:void 0,map:Un,of:So,chain:bf,bimap:MI,mapLeft:LI,reduce:eA,foldMap:tA,reduceRight:nA,extend:jI,traverse:kv,sequence:oA,chainRec:UI,throwError:Mv,ap:t,alt:n}}const ZB=Object.freeze(Object.defineProperty({__proto__:null,Alt:ane,ApT:GB,Applicative:wB,Apply:Sf,Bifunctor:one,Chain:iA,ChainRec:une,Do:Tne,Extend:sne,Foldable:ine,FromEither:_f,Functor:Ts,Monad:rne,MonadThrow:cne,Pointed:nne,Traversable:W1,URI:$t,alt:kB,altW:FB,ap:xB,apFirst:UB,apFirstW:pne,apS:YB,apSW:Ene,apSecond:BB,apSecondW:Ane,apW:TB,bimap:PI,bind:HB,bindTo:xne,bindW:wne,chain:ui,chainFirst:PB,chainFirstW:hne,chainNullableK:Sne,chainOptionK:yne,chainW:BI,duplicate:gne,either:kne,elem:zB,exists:Ine,extend:DI,filterOrElse:WB,filterOrElseW:bne,flap:dne,flatten:mne,flattenW:DB,fold:NI,foldMap:$B,foldW:LB,fromNullable:qI,fromNullableK:VB,fromOption:MB,fromOptionK:vne,fromPredicate:lne,getAltValidation:IB,getApplicativeValidation:Is,getApplyMonoid:Lne,getApplySemigroup:Mne,getCompactable:ec,getEq:ene,getFilterable:Cf,getOrElse:fne,getOrElseW:jB,getSemigroup:rA,getShow:Xte,getValidation:Bne,getValidationMonoid:Une,getValidationSemigroup:jne,getWitherable:tne,isLeft:se,isRight:WI,left:wt,map:tc,mapLeft:aA,match:xs,matchW:KI,of:So,orElse:qB,orElseW:NB,parseJSON:One,reduce:EB,reduceRight:RB,right:Ye,sequence:oA,sequenceArray:Rne,stringifyJSON:Fne,swap:KB,throwError:Mv,toError:_ne,toUnion:QB,traverse:OB,traverseArray:JB,traverseArrayWithIndex:$ne,traverseReadonlyArrayWithIndex:VI,traverseReadonlyNonEmptyArrayWithIndex:sA,tryCatch:nc,tryCatchK:Cne},Symbol.toStringTag,{value:"Module"}));function rc(e){return H(Ye,e.of)}function If(e){return H(wt,e.of)}function Tf(e){return function(t){return e.map(t,Ye)}}function xf(e){return function(t){return e.map(t,wt)}}function Lv(e){return function(t){return H(qI(t),e.of)}}function jv(e){var t=Lv(e);return function(n){var r=t(n);return function(i){return H(i,r)}}}function QI(e){var t=ic(e),n=jv(e);return function(r){var i=n(r);return function(o){return t(i(o))}}}function wf(e){return Hl(e,Ts)}function Ef(e){return ua(e,Sf)}function ic(e){return function(t){return function(n){return e.chain(n,function(r){return se(r)?e.of(r):t(r.right)})}}}function $f(e){return function(t){return function(n){return e.chain(n,function(r){return se(r)?t():e.of(r)})}}}function Rf(e){return function(t,n){return function(r){return e.map(r,PI(t,n))}}}function Of(e){return function(t){return function(n){return e.map(n,aA(t))}}}function uA(e,t){return function(n){return function(r){return e.chain(r,xs(function(i){return e.map(n(),aA(function(o){return t.concat(i,o)}))},rc(e)))}}}function cA(e){return function(t,n){return function(r){return e.map(r,xs(t,n))}}}function Ff(e){return function(t,n){return function(r){return e.chain(r,xs(t,n))}}}function kf(e){return function(t){return function(n){return e.chain(n,xs(t,e.of))}}}function oc(e){return function(t){return function(n){return e.chain(n,function(r){return se(r)?t(r.left):e.of(r)})}}}function lA(e){var t=oc(e);return function(n){return t(function(r){return e.map(n(r),function(i){return se(i)?i:wt(r)})})}}function fA(e){return function(t){return function(n){return e.chain(n,xs(function(r){return e.map(t(r),wt)},function(r){return e.of(Ye(r))}))}}}function Mf(e){return function(t){return e.map(t,KB)}}function dA(e){return function(t){return e.map(t,QB)}}function Pne(e){var t=Ef(e),n=wf(e),r=ic(e),i=$f(e),o=Rf(e),a=Of(e),s=Ff(e),u=kf(e),c=oc(e);return{map:function(l,d){return C(l,n(d))},ap:function(l,d){return C(l,t(d))},of:rc(e),chain:function(l,d){return C(l,r(d))},alt:function(l,d){return C(l,i(d))},bimap:function(l,d,p){return C(l,o(d,p))},mapLeft:function(l,d){return C(l,a(d))},fold:function(l,d,p){return C(l,s(d,p))},getOrElse:function(l,d){return C(l,u(d))},orElse:function(l,d){return C(l,c(d))},swap:Mf(e),rightM:Tf(e),leftM:xf(e),left:If(e)}}const Dne=Object.freeze(Object.defineProperty({__proto__:null,alt:$f,altValidation:uA,ap:Ef,bimap:Rf,chain:ic,chainNullableK:QI,fromNullable:Lv,fromNullableK:jv,getEitherM:Pne,getOrElse:kf,left:If,leftF:xf,map:wf,mapLeft:Of,match:cA,matchE:Ff,orElse:oc,orElseFirst:lA,orLeft:fA,right:rc,rightF:Tf,swap:Mf,toUnion:dA},Symbol.toStringTag,{value:"Module"}));var Wne="Endomorphism",XB=function(){return{concat:function(e,t){return H(e,t)}}},eP=function(){return{concat:XB().concat,empty:N}};const Kne=Object.freeze(Object.defineProperty({__proto__:null,URI:Wne,getMonoid:eP,getSemigroup:XB},Symbol.toStringTag,{value:"Module"})),Nne=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function tP(e,t){var n=t.zero,r=function(i,o){return e.equals(o,n)?i:r(o,t.mod(i,o))};return r}function qne(e,t){var n=t.zero,r=tP(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))}}var Vne={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}};const Qne=Object.freeze(Object.defineProperty({__proto__:null,fieldNumber:Vne,gcd:tP,lcm:qne},Symbol.toStringTag,{value:"Module"}));function ma(e,t){return function(n){return function(r){return e.map(r,function(i){return t.filter(i,n)})}}}function ga(e,t){return function(n){return function(r){return e.map(r,function(i){return t.filterMap(i,n)})}}}function ws(e,t){var n=ma(e,t);return function(r){var i=n(Vd(r)),o=n(r);return function(a){return Oe(i(a),o(a))}}}function Es(e,t){var n=ga(e,t);return function(r){return function(i){return Oe(C(i,n(function(o){return Iv(r(o))})),C(i,n(function(o){return Jp(r(o))})))}}}function zne(e,t){var n=Yl(e,t).map,r=Co(e,t),i=ha(e,t,t),o=ma(e,t),a=ga(e,t),s=ws(e,t),u=Es(e,t);return{map:n,compact:r,separate:i,filter:function(c,l){return C(c,o(l))},filterMap:function(c,l){return C(c,a(l))},partition:function(c,l){return C(c,s(l))},partitionMap:function(c,l){return C(c,u(l))}}}const Hne=Object.freeze(Object.defineProperty({__proto__:null,filter:ma,filterMap:ga,getFilterableComposition:zne,partition:ws,partitionMap:Es},Symbol.toStringTag,{value:"Module"})),Yne=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function nP(e,t){return function(n,r){return function(i){return e.reduce(i,n,function(o,a){return t.reduce(a,o,r)})}}}function rP(e,t){return function(n){var r=e.foldMap(n),i=t.foldMap(n);return function(o){return function(a){return r(a,function(s){return i(s,o)})}}}}function iP(e,t){return function(n,r){return function(i){return e.reduceRight(i,n,function(o,a){return t.reduceRight(o,a,r)})}}}function Gne(e,t){return function(n,r){return function(i){return t.reduce(i,e.of(n),function(o,a){return e.chain(o,function(s){return r(s,a)})})}}}function Jne(e,t){return function(n,r){var i=function(o,a){var s=o.init,u=o.acc;return s?{init:!1,acc:a}:{init:!1,acc:e.concat(e.concat(u,n),a)}};return t.reduce(r,{init:!0,acc:e.empty},i).acc}}function oP(e){return function(t){return e.reduce(t,[],function(n,r){return n.push(r),n})}}function Zne(e,t){var n=function(i,o){return e.ap(e.map(i,pr),o)},r=e.of(void 0);return function(i,o){return t.reduce(i,r,function(a,s){return n(a,o(s))})}}function Xne(e,t){return function(n,r,i){return t.reduce(n,e.of(r),function(o,a){return e.chain(o,function(s){return i(s,a)})})}}var ere=oP;function zI(e,t){var n=nP(e,t),r=rP(e,t),i=iP(e,t);return{reduce:function(o,a,s){return C(o,n(a,s))},foldMap:function(o){var a=r(o);return function(s,u){return C(s,a(u))}},reduceRight:function(o,a,s){return C(o,i(a,s))}}}const tre=Object.freeze(Object.defineProperty({__proto__:null,foldM:Xne,foldMap:rP,getFoldableComposition:zI,intercalate:Jne,reduce:nP,reduceM:Gne,reduceRight:iP,toArray:ere,toReadonlyArray:oP,traverse_:Zne},Symbol.toStringTag,{value:"Module"}));function aP(e,t){return function(n,r){return function(i){return e.reduceWithIndex(i,n,function(o,a,s){return t.reduceWithIndex(s,a,function(u,c,l){return r([o,u],c,l)})})}}}function sP(e,t){return function(n){var r=e.foldMapWithIndex(n),i=t.foldMapWithIndex(n);return function(o){return function(a){return r(a,function(s,u){return i(u,function(c,l){return o([s,c],l)})})}}}}function uP(e,t){return function(n,r){return function(i){return e.reduceRightWithIndex(i,n,function(o,a,s){return t.reduceRightWithIndex(a,s,function(u,c,l){return r([o,u],c,l)})})}}}function nre(e,t){var n=zI(e,t),r=aP(e,t),i=sP(e,t),o=uP(e,t);return{reduce:n.reduce,foldMap:n.foldMap,reduceRight:n.reduceRight,reduceWithIndex:function(a,s,u){return C(a,r(s,u))},foldMapWithIndex:function(a){var s=i(a);return function(u,c){return C(u,s(c))}},reduceRightWithIndex:function(a,s,u){return C(a,o(s,u))}}}const rre=Object.freeze(Object.defineProperty({__proto__:null,foldMapWithIndex:sP,getFoldableWithIndexComposition:nre,reduceRightWithIndex:uP,reduceWithIndex:aP},Symbol.toStringTag,{value:"Module"}));function _o(e){return function(t){return H(t,e.fromIO)}}function va(e,t){return function(n){var r=H(n,e.fromIO);return function(i){return t.chain(i,r)}}}function ya(e,t){var n=At(t);return function(r){return n(H(r,e.fromIO))}}const ire=Object.freeze(Object.defineProperty({__proto__:null,chainFirstIOK:ya,chainIOK:va,fromIOK:_o},Symbol.toStringTag,{value:"Module"}));var cP=function(){return N},ore=N,pA=function(e){return function(t){return function(n){return t(e(n))}}},AA=function(e){return function(t){return e(t)(t)}},are=AA,ba=function(e,t){return C(e,ac(t))},hA=function(e,t){return C(e,dP(t))},HI=function(e,t){return C(e,pP(t))},lP=function(e,t){return C(e,hP(t))},Uv=function(e,t,n){return C(e,mP(t,n))},ac=function(e){return function(t){return function(n){return e(t(n))}}},fP=function(e){return function(t){return function(n){return t(n)(e(n))}}},dP=fP,Io=pr,YI=function(e){return function(t){return function(n){return e(t(n))(n)}}},pP=YI,AP=YI(N),sre=AP,hP=function(e){return function(t){return H(e,t)}},mP=function(e,t){return function(n){return function(r){return t(n(e(r)))}}},GI=function(){return N},JI=function(e){return function(t){var n=t[0],r=t[1];return[e(n),r]}},ZI=function(e){return function(t){var n=t[0],r=t[1];return[n,e(r)]}},XI=function(e){return NI(function(t){return ea(e(t))},Ye)},eT=function(e){return NI(wt,function(t){return hs(e(t))})},ci="Reader",vn={URI:ci,map:ba},ure=Qe(vn),tT={URI:ci,of:Io},Ca={URI:ci,map:ba,ap:hA},gP=Lt(Ca),cre=gP,vP=jt(Ca),lre=vP,yP={URI:ci,map:ba,ap:hA,of:Io},nT={URI:ci,map:ba,ap:hA,chain:HI},Sa={URI:ci,map:ba,of:Io,ap:hA,chain:HI},bP=At(nT),fre=bP,dre={URI:ci,map:ba,promap:Uv},pre={URI:ci,compose:lP,id:GI},Are={URI:ci,map:ba,promap:Uv,first:JI,second:ZI},hre={URI:ci,map:ba,promap:Uv,left:XI,right:eT},mre=Bt(vn),CP=Pt(nT),gre=CP,vre=Io(on),SP=Ut(Ca),yre=SP,_P=Io(Sn),sc=function(e){return function(t){return function(n){for(var r=[e(0,jr(t))(n)],i=1;i<t.length;i++)r.push(e(i,t[i])(n));return r}}},rT=function(e){var t=sc(e);return function(n){return yt(n)?t(n):_P}},bre=rT,IP=function(e){return rT(function(t,n){return e(n)})},Cre=IP(N),Sre={URI:ci,map:ba,of:Io,ap:hA,chain:HI,promap:Uv,compose:lP,id:GI,first:JI,second:ZI,left:XI,right:eT},_re=an(Ca),Ire=oi(yP);const Tre=Object.freeze(Object.defineProperty({__proto__:null,ApT:_P,Applicative:yP,Apply:Ca,Category:pre,Chain:nT,Choice:hre,Do:vre,Functor:vn,Monad:Sa,Pointed:tT,Profunctor:dre,Strong:Are,URI:ci,ap:dP,apFirst:gP,apFirstW:cre,apS:SP,apSW:yre,apSecond:vP,apSecondW:lre,apW:fP,ask:cP,asks:ore,asksReader:are,asksReaderW:AA,bind:CP,bindTo:mre,bindW:gre,chain:pP,chainFirst:bP,chainFirstW:fre,chainW:YI,compose:hP,first:JI,flap:ure,flatten:sre,flattenW:AP,getMonoid:Ire,getSemigroup:_re,id:GI,left:XI,local:pA,map:ac,of:Io,promap:mP,reader:Sre,right:eT,second:ZI,sequenceArray:Cre,traverseArray:IP,traverseArrayWithIndex:bre,traverseReadonlyArrayWithIndex:rT,traverseReadonlyNonEmptyArrayWithIndex:sc},Symbol.toStringTag,{value:"Module"}));function mA(e){return function(){return e.fromReader(cP())}}function gA(e){return e.fromReader}function uc(e){return function(t){return H(t,e.fromReader)}}function vA(e,t){var n=uc(e);return function(r){return function(i){return t.chain(i,n(r))}}}function yA(e,t){return H(uc(e),At(t))}const xre=Object.freeze(Object.defineProperty({__proto__:null,ask:mA,asks:gA,chainFirstReaderK:yA,chainReaderK:vA,fromReaderK:uc},Symbol.toStringTag,{value:"Module"}));var TP=function(){return function(e){return[e,e]}},xP=function(e){return function(){return[void 0,e]}},wP=function(e){return function(t){return[void 0,e(t)]}},EP=function(e){return function(t){return[e(t),t]}},bA=function(e,t){return C(e,RP(t))},Bv=function(e,t){return C(e,OP(t))},$P=function(e,t){return C(e,iT(t))},RP=function(e){return function(t){return function(n){var r=t(n),i=r[0],o=r[1];return[e(i),o]}}},OP=function(e){return function(t){return function(n){var r=t(n),i=r[0],o=r[1],a=e(o),s=a[0],u=a[1];return[i(s),u]}}},CA=function(e){return function(t){return[e,t]}},iT=function(e){return function(t){return function(n){var r=t(n),i=r[0],o=r[1];return e(i)(o)}}},wre=iT(N),$s="State",oT={URI:$s,map:bA},Ere=Qe(oT),$re={URI:$s,of:CA},Pv={URI:$s,map:bA,ap:Bv},Rre=Lt(Pv),Ore=jt(Pv),Fre={URI:$s,map:bA,ap:Bv,of:CA},aT={URI:$s,map:bA,ap:Bv,chain:$P},FP={URI:$s,map:bA,ap:Bv,of:CA,chain:$P},kre=At(aT),Mre={URI:$s,fromState:N},Lre=function(e){return function(t){return t(e)[0]}},jre=function(e){return function(t){return t(e)[1]}},Ure=Bt(oT),Bre=Pt(aT),Pre=Ut(Pv),kP=function(e){return function(t){return function(n){for(var r=e(0,jr(t))(n),i=r[0],o=r[1],a=[i],s=o,u=1;u<t.length;u++){var c=e(u,t[u])(s),l=c[0],d=c[1];a.push(l),s=d}return[a,s]}}},sT=function(e){var t=kP(e);return function(n){return yt(n)?t(n):CA(Sn)}},Dre=sT,MP=function(e){return sT(function(t,n){return e(n)})},Wre=MP(N),Kre=function(e,t){return e(t)[0]},Nre=function(e,t){return e(t)[1]},qre=FP;const Vre=Object.freeze(Object.defineProperty({__proto__:null,Applicative:Fre,Apply:Pv,Chain:aT,FromState:Mre,Functor:oT,Monad:FP,Pointed:$re,URI:$s,ap:OP,apFirst:Rre,apS:Pre,apSecond:Ore,bind:Bre,bindTo:Ure,chain:iT,chainFirst:kre,evalState:Kre,evaluate:Lre,execState:Nre,execute:jre,flap:Ere,flatten:wre,get:TP,gets:EP,map:RP,modify:wP,of:CA,put:xP,sequenceArray:Wre,state:qre,traverseArray:MP,traverseArrayWithIndex:Dre,traverseReadonlyArrayWithIndex:sT,traverseReadonlyNonEmptyArrayWithIndex:kP},Symbol.toStringTag,{value:"Module"}));function LP(e){return function(){return e.fromState(TP())}}function jP(e){return function(t){return e.fromState(xP(t))}}function UP(e){return H(wP,e.fromState)}function BP(e){return H(EP,e.fromState)}function uT(e){return function(t){return H(t,e.fromState)}}function PP(e,t){var n=uT(e);return function(r){return function(i){return t.chain(i,n(r))}}}const Qre=Object.freeze(Object.defineProperty({__proto__:null,chainStateK:PP,fromStateK:uT,get:LP,gets:BP,modify:UP,put:jP},Symbol.toStringTag,{value:"Module"}));function cc(e){return function(t){return H(t,e.fromTask)}}function Lf(e,t){return function(n){var r=H(n,e.fromTask);return function(i){return t.chain(i,r)}}}function jf(e,t){var n=At(t);return function(r){return n(H(r,e.fromTask))}}const zre=Object.freeze(Object.defineProperty({__proto__:null,chainFirstTaskK:jf,chainTaskK:Lf,fromTaskK:cc},Symbol.toStringTag,{value:"Module"}));function DP(e){return function(t){return H(t,e.fromThese)}}const Hre=Object.freeze(Object.defineProperty({__proto__:null,fromTheseK:DP},Symbol.toStringTag,{value:"Module"}));function WP(e,t){return function(n){return function(r){return e.mapWithIndex(r,function(i,o){return t.mapWithIndex(o,function(a,s){return n([i,a],s)})})}}}function Yre(e,t){var n=Yl(e,t).map,r=WP(e,t);return{map:n,mapWithIndex:function(i,o){return C(i,r(o))}}}const Gre=Object.freeze(Object.defineProperty({__proto__:null,getFunctorWithIndexComposition:Yre,mapWithIndex:WP},Symbol.toStringTag,{value:"Module"})),Jre=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),Zre=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),Xre=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var To=function(e,t){return C(e,QP(t))},Uf=function(e,t){return C(e,zP(t))},Dv=function(e,t){return C(e,dT(t))},cT=function(e,t,n){return C(e,HP(t,n))},lT=function(e){return function(t,n){return C(t,YP()(n))}},fT=function(e,t,n){return C(e,GP(t,n))},KP=function(e,t){return C(e,XP())},NP=function(e,t){return C(e,pT(t))},qP=function(e){var t=JP(e);return function(n,r){return C(n,t(r))}},VP=mI,QP=function(e){return function(t){return e(t)}},zP=function(e){return function(t){return t(e)}},Bf=N,dT=function(e){return function(t){return e(t)}},pT=function(e){return function(t){return e(t)}},AT=N,eie=pT(N),tie=dT(N),HP=function(e,t){return function(n){return t(e,n)}},YP=function(){return function(e){return function(t){return e(t)}}},GP=function(e,t){return function(n){return t(n,e)}},JP=function(e){return function(t){return function(n){return e.map(t(n),N)}}},hT=function(e){return function(t){return e.map(t,N)}},ZP=function(){return N},XP=ZP,Pr="Identity",nie=N,rie=N,mT={URI:Pr,map:To},iie=Qe(mT),oie={URI:Pr,of:Bf},Wv={URI:Pr,map:To,ap:Uf},aie=Lt(Wv),sie=jt(Wv),uie={URI:Pr,map:To,ap:Uf,of:Bf},gT={URI:Pr,map:To,ap:Uf,chain:Dv},cie={URI:Pr,map:To,ap:Uf,of:Bf,chain:Dv},lie=At(gT),fie={URI:Pr,reduce:cT,foldMap:lT,reduceRight:fT},die={URI:Pr,map:To,reduce:cT,foldMap:lT,reduceRight:fT,traverse:qP,sequence:hT},pie={URI:Pr,map:To,alt:KP},Aie={URI:Pr,map:To,extend:NP,extract:AT},hie={URI:Pr,map:To,ap:Uf,chain:Dv,chainRec:VP},mie=Bf(on),gie=Bt(mT),vie=Pt(gT),yie=Ut(Wv),bie={URI:Pr,map:To,ap:Uf,of:Bf,chain:Dv,reduce:cT,foldMap:lT,reduceRight:fT,traverse:qP,sequence:hT,alt:KP,extract:AT,extend:NP,chainRec:VP};const Cie=Object.freeze(Object.defineProperty({__proto__:null,Alt:pie,Applicative:uie,Apply:Wv,Chain:gT,ChainRec:hie,Comonad:Aie,Do:mie,Foldable:fie,Functor:mT,Monad:cie,Pointed:oie,Traversable:die,URI:Pr,alt:XP,altW:ZP,ap:zP,apFirst:aie,apS:yie,apSecond:sie,bind:vie,bindTo:gie,chain:dT,chainFirst:lie,duplicate:eie,extend:pT,extract:AT,flap:iie,flatten:tie,foldMap:YP,getEq:rie,getShow:nie,identity:bie,map:QP,of:Bf,reduce:HP,reduceRight:GP,sequence:hT,traverse:JP},Symbol.toStringTag,{value:"Module"})),Sie=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var _a=function(e,t){return function(){return t(e())}},Rs=function(e,t){return function(){return e()(t())}},Pf=function(e,t){return function(){return t(e())()}},eD=function(e,t){return function(){for(var n=t(e)();n._tag==="Left";)n=t(n.left)();return n.right}},xo=function(e){return function(t){return _a(t,e)}},_ie=function(e){return function(t){return Rs(t,e)}},Di=pr,vT=function(e){return function(t){return Pf(t,e)}},Iie=vT(N),Wi="IO",ct={URI:Wi,map:_a},Tie=Qe(ct),wo={URI:Wi,of:Di},Ia={URI:Wi,map:_a,ap:Rs},xie=Lt(Ia),wie=jt(Ia),tD={URI:Wi,map:_a,ap:Rs,of:Di},Kv={URI:Wi,map:_a,ap:Rs,chain:Pf},hr={URI:Wi,map:_a,ap:Rs,of:Di,chain:Pf},Eie=At(Kv),yT=N,$ie={URI:Wi,map:_a,ap:Rs,of:Di,chain:Pf,fromIO:yT},Rie={URI:Wi,map:_a,ap:Rs,chain:Pf,chainRec:eD},Oie={URI:Wi,fromIO:N},Fie=Di(on),kie=Bt(ct),Mie=Pt(Kv),Lie=Ut(Ia),nD=Di(Sn),Nv=function(e){return function(t){return function(){for(var n=[e(0,jr(t))()],r=1;r<t.length;r++)n.push(e(r,t[r])());return n}}},bT=function(e){var t=Nv(e);return function(n){return yt(n)?t(n):nD}},jie=bT,rD=function(e){return bT(function(t,n){return e(n)})},Uie=rD(N),Bie={URI:Wi,map:_a,of:Di,ap:Rs,chain:Pf,fromIO:yT,chainRec:eD},Pie=an(Ia),Die=oi(tD);const Wie=Object.freeze(Object.defineProperty({__proto__:null,ApT:nD,Applicative:tD,Apply:Ia,Chain:Kv,ChainRec:Rie,Do:Fie,FromIO:Oie,Functor:ct,Monad:hr,MonadIO:$ie,Pointed:wo,URI:Wi,ap:_ie,apFirst:xie,apS:Lie,apSecond:wie,bind:Mie,bindTo:kie,chain:vT,chainFirst:Eie,flap:Tie,flatten:Iie,fromIO:yT,getMonoid:Die,getSemigroup:Pie,io:Bie,map:xo,of:Di,sequenceArray:Uie,traverseArray:rD,traverseArrayWithIndex:jie,traverseReadonlyArrayWithIndex:bT,traverseReadonlyNonEmptyArrayWithIndex:Nv},Symbol.toStringTag,{value:"Module"}));var iD=If(wo),oD=rc(wo),aD=Tf(ct),Kie=xf(ct),sD=Di,SA=aD,uD=cA(ct),Nie=uD,CT=Ff(hr),qie=CT,cD=CT,Vie=cD,lD=kf(hr),Qie=lD,fD=function(e,t){return function(){return nc(e,t)}},zie=function(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return fD(function(){return e.apply(void 0,n)},t)}},Hie=dA(ct),dD=oc(hr),Yie=dD,ST=lA(hr),Gie=ST,Jie=function(e){return ST(_D(e))},Zie=fA(hr),Xie=Mf(ct),mr=function(e,t){return C(e,TT(t))},lc=function(e,t){return C(e,xT(t))},eoe=function(e,t){return C(e,qv(function(n){return C(t,TT(n))}))},Df=function(e,t){return C(e,qv(t))},_T=function(e,t,n){return C(e,AD(t,n))},IT=function(e,t){return C(e,hD(t))},pD=function(e,t){return C(e,wT(t))},TT=wf(ct),AD=Rf(ct),hD=Of(ct),xT=Ef(Ia),toe=xT,li=oD,qv=ic(hr),bm=qv,mD=bm(N),noe=mD,wT=$f(hr),roe=wT,Vv=iD,zt="IOEither";function gD(e){var t=ua(Ia,Is(e));return{URI:zt,_E:void 0,map:mr,ap:function(n,r){return C(n,t(r))},of:li}}function vD(e){var t=uA(hr,e);return{URI:zt,_E:void 0,map:mr,alt:function(n,r){return C(n,t(r))}}}var yD=function(e){var t=ec(e);return{URI:zt,_E:void 0,compact:Co(ct,t),separate:ha(ct,t,Ts)}};function ioe(e){var t=Cf(e),n=yD(e),r=ma(ct,t),i=ga(ct,t),o=ws(ct,t),a=Es(ct,t);return{URI:zt,_E:void 0,map:mr,compact:n.compact,separate:n.separate,filter:function(s,u){return C(s,r(u))},filterMap:function(s,u){return C(s,i(u))},partition:function(s,u){return C(s,o(u))},partitionMap:function(s,u){return C(s,a(u))}}}var ET={URI:zt,map:mr},ooe=Qe(ET),aoe={URI:zt,of:li},soe={URI:zt,bimap:_T,mapLeft:IT},_A={URI:zt,map:mr,ap:lc},bD=Lt(_A),uoe=bD,CD=jt(_A),coe=CD,$T={URI:zt,map:mr,ap:lc,of:li},loe={URI:zt,map:mr,ap:eoe,of:li},Ta={URI:zt,map:mr,ap:lc,chain:Df},foe={URI:zt,map:mr,ap:lc,of:li,chain:Df},SD=At(Ta),doe=SD,poe={URI:zt,map:mr,alt:pD},Aoe={URI:zt,map:mr,ap:lc,of:li,chain:Df,fromIO:SA},hoe={URI:zt,map:mr,ap:lc,of:li,chain:Df,throwError:Vv},Qv={URI:zt,fromIO:SA},_D=_o(Qv),moe=va(Qv,Ta),goe=ya(Qv,Ta),xa={URI:zt,fromEither:sD},voe=go(xa),yoe=vo(xa),boe=Nu(xa,Ta),ID=ca(xa,Ta),Coe=ID,TD=la(xa,Ta),Soe=TD,_oe=ms(xa),xD=qu(xa,Ta),Ioe=xD,Toe=Ur(xa),xoe=function(e,t,n){return wD(e,t,n)},wD=function(e,t,n){return C(e,bm(function(r){return C(t(r),vT(function(i){return C(n(r,i),bm(function(){return Di(i)}))}))}))},woe=li(on),Eoe=Bt(ET),ED=Pt(Ta),$oe=ED,$D=Ut(_A),Roe=$D,RT=li(Sn),RD=function(e){return H(Nv(e),xo(sA(Ar)))},OT=function(e){var t=RD(e);return function(n){return yt(n)?t(n):RT}},OD=function(e){return function(t){return function(){var n=e(0,jr(t))();if(nn(n))return n;for(var r=[n.right],i=1;i<t.length;i++){var o=e(i,t[i])();if(nn(o))return o;r.push(o.right)}return hs(r)}}},FT=function(e){var t=OD(e);return function(n){return yt(n)?t(n):RT}},Ooe=OT,FD=function(e){return OT(function(t,n){return e(n)})},Foe=FD(N),koe=FT,kD=function(e){return FT(function(t,n){return e(n)})},Moe=kD(N),Loe=$T,joe={URI:zt,bimap:_T,mapLeft:IT,map:mr,of:li,ap:lc,chain:Df,alt:pD,fromIO:SA,throwError:Vv},Uoe=an(_A),Boe=oi($T),Poe=function(e){return an(Ia)(rA(e))};function Doe(e){var t=gD(e),n=vD(e);return{URI:zt,_E:void 0,map:mr,ap:t.ap,of:li,chain:Df,bimap:_T,mapLeft:IT,alt:n.alt,fromIO:SA,throwError:Vv}}const Woe=Object.freeze(Object.defineProperty({__proto__:null,Alt:poe,ApT:RT,Applicative:Loe,ApplicativePar:$T,ApplicativeSeq:loe,ApplyPar:_A,Bifunctor:soe,Chain:Ta,Do:woe,FromEither:xa,FromIO:Qv,Functor:ET,Monad:foe,MonadIO:Aoe,MonadThrow:hoe,Pointed:aoe,URI:zt,alt:wT,altW:roe,ap:xT,apFirst:bD,apFirstW:uoe,apS:$D,apSW:Roe,apSecond:CD,apSecondW:coe,apW:toe,bimap:AD,bind:ED,bindTo:Eoe,bindW:$oe,bracket:xoe,bracketW:wD,chain:qv,chainEitherK:ID,chainEitherKW:Coe,chainFirst:SD,chainFirstEitherK:TD,chainFirstEitherKW:Soe,chainFirstIOK:goe,chainFirstW:doe,chainIOK:moe,chainOptionK:boe,chainW:bm,filterOrElse:xD,filterOrElseW:Ioe,flap:ooe,flatten:noe,flattenW:mD,fold:qie,foldW:Vie,fromEither:sD,fromEitherK:Toe,fromIO:SA,fromIOK:_D,fromOption:voe,fromOptionK:yoe,fromPredicate:_oe,getAltIOValidation:vD,getApplicativeIOValidation:gD,getApplyMonoid:Boe,getApplySemigroup:Uoe,getCompactable:yD,getFilterable:ioe,getIOValidation:Doe,getOrElse:lD,getOrElseW:Qie,getSemigroup:Poe,ioEither:joe,left:iD,leftIO:Kie,map:TT,mapLeft:hD,match:uD,matchE:CT,matchEW:cD,matchW:Nie,of:li,orElse:dD,orElseFirst:ST,orElseFirstIOK:Jie,orElseFirstW:Gie,orElseW:Yie,orLeft:Zie,right:oD,rightIO:aD,sequenceArray:Foe,sequenceSeqArray:Moe,swap:Xie,throwError:Vv,toUnion:Hie,traverseArray:FD,traverseArrayWithIndex:Ooe,traverseReadonlyArrayWithIndex:OT,traverseReadonlyArrayWithIndexSeq:FT,traverseReadonlyNonEmptyArrayWithIndex:RD,traverseReadonlyNonEmptyArrayWithIndexSeq:OD,traverseSeqArray:kD,traverseSeqArrayWithIndex:koe,tryCatch:fD,tryCatchK:zie},Symbol.toStringTag,{value:"Module"}));function IA(e){return H(Tt,e.of)}function TA(e){return pr(e.of(ot))}function zv(e){return function(t){return e.map(t,Tt)}}function Hv(e){return H(Ju,e.of)}function Yv(e){var t=Hv(e);return function(n){return H(n,t)}}function kT(e){var t=Wf(e),n=Yv(e);return function(r){return t(n(r))}}function Gv(e){return function(t){return H(t,e.of)}}function MT(e){var t=Wf(e),n=Gv(e);return function(r){return t(n(r))}}function LT(e){return function(t){return function(n){return e.of(_v(t)(n))}}}function jT(e){return H(vf,e.of)}function UT(e){return function(t,n){return function(r){return e.map(r,Aa(t,n))}}}function Jv(e){return function(t,n){return function(r){return e.chain(r,Aa(t,n))}}}function Zv(e){return function(t){return function(n){return e.chain(n,Aa(t,e.of))}}}function Xv(e){return Hl(e,Af)}function ey(e){return ua(e,hf)}function Wf(e){var t=TA(e);return function(n){return function(r){return e.chain(r,Aa(function(){return t()},n))}}}function ty(e){var t=IA(e);return function(n){return function(r){return e.chain(r,Aa(n,t))}}}function Koe(e){var t=ey(e),n=Xv(e),r=Wf(e),i=ty(e),o=Jv(e),a=Zv(e),s=TA(e);return{map:function(u,c){return C(u,n(c))},ap:function(u,c){return C(u,t(c))},of:IA(e),chain:function(u,c){return C(u,r(c))},alt:function(u,c){return C(u,i(c))},fold:function(u,c,l){return C(u,o(c,l))},getOrElse:function(u,c){return C(u,a(c))},fromM:zv(e),none:function(){return s()}}}const Noe=Object.freeze(Object.defineProperty({__proto__:null,alt:ty,ap:ey,chain:Wf,chainNullableK:kT,chainOptionK:MT,fromEither:jT,fromF:zv,fromNullable:Hv,fromNullableK:Yv,fromOptionK:Gv,fromPredicate:LT,getOptionM:Koe,getOrElse:Zv,map:Xv,match:UT,matchE:Jv,some:IA,zero:TA},Symbol.toStringTag,{value:"Module"}));var MD=IA(wo),qoe=LT(wo),Voe=Di,LD=jT(wo),BT=zv(ct),Qoe=xo(vf),jD=UT(ct),zoe=jD,PT=Jv(Kv),Hoe=PT,Yoe=PT,UD=Zv(hr),Goe=UD,Joe=xo(sB),Zoe=xo(OI),Xoe=Hv(wo),eae=Yv(wo),tae=kT(hr),nae=Gv(wo),rae=MT(hr),BD=Xv(ct),PD=ey(Ia),Os=MD,DT=Wf(hr),iae=DT(N),WT=ty(hr),oae=WT,ny=TA(wo),aae=ny(),KT=Co(ct,Gu),NT=ha(ct,Gu,Af),DD=ma(ct,pa),WD=ga(ct,pa),KD=ws(ct,pa),ND=Es(ct,pa),wa=function(e,t){return C(e,BD(t))},Kf=function(e,t){return C(e,PD(t))},qT=function(e,t){return C(e,DT(t))},qD=function(e,t){return C(e,WT(t))},sae=function(e,t){return C(e,DD(t))},uae=function(e,t){return C(e,WD(t))},cae=function(e,t){return C(e,KD(t))},lae=function(e,t){return C(e,ND(t))},gr="IOOption",VT={URI:gr,map:wa},fae=Qe(VT),VD={URI:gr,of:Os},ry={URI:gr,map:wa,ap:Kf},dae=Lt(ry),pae=jt(ry),Aae={URI:gr,map:wa,ap:Kf,of:Os},fc={URI:gr,map:wa,ap:Kf,chain:qT},hae=At(fc),mae={URI:gr,map:wa,alt:qD},QD={URI:gr,zero:ny},gae=tf(QD,VD),vae={URI:gr,map:wa,ap:Kf,of:Os,alt:qD,zero:ny},yae={URI:gr,map:wa,ap:Kf,of:Os,chain:qT},bae={URI:gr,map:wa,ap:Kf,of:Os,chain:qT,fromIO:BT},Cae={URI:gr,compact:KT,separate:NT},Sae={URI:gr,map:wa,compact:KT,separate:NT,filter:sae,filterMap:uae,partition:cae,partitionMap:lae},iy={URI:gr,fromIO:BT},_ae=_o(iy),Iae=va(iy,fc),Tae=ya(iy,fc),oy={URI:gr,fromEither:LD},xae=Ur(oy),wae=ca(oy,fc),Eae=la(oy,fc),$ae=Os(on),Rae=Bt(VT),Oae=Pt(fc),Fae=Ut(ry),zD=Os(Sn),HD=function(e){return H(Nv(e),xo(Fv(Ar)))},kae=function(e){var t=HD(e);return function(n){return yt(n)?t(n):zD}};const Mae=Object.freeze(Object.defineProperty({__proto__:null,Alt:mae,Alternative:vae,ApT:zD,Applicative:Aae,Apply:ry,Chain:fc,Compactable:Cae,Do:$ae,Filterable:Sae,FromEither:oy,FromIO:iy,Functor:VT,Monad:yae,MonadIO:bae,Pointed:VD,Zero:QD,alt:WT,altW:oae,ap:PD,apFirst:dae,apS:Fae,apSecond:pae,bind:Oae,bindTo:Rae,chain:DT,chainEitherK:wae,chainFirst:hae,chainFirstEitherK:Eae,chainFirstIOK:Tae,chainIOK:Iae,chainNullableK:tae,chainOptionK:rae,compact:KT,filter:DD,filterMap:WD,flap:fae,flatten:iae,fold:Hoe,fromEither:LD,fromEitherK:xae,fromIO:BT,fromIOEither:Qoe,fromIOK:_ae,fromNullable:Xoe,fromNullableK:eae,fromOption:Voe,fromOptionK:nae,fromPredicate:qoe,getOrElse:UD,getOrElseW:Goe,guard:gae,map:BD,match:jD,matchE:PT,matchEW:Yoe,matchW:zoe,none:aae,of:Os,partition:KD,partitionMap:ND,separate:NT,some:MD,toNullable:Zoe,toUndefined:Joe,traverseReadonlyArrayWithIndex:kae,traverseReadonlyNonEmptyArrayWithIndex:HD,zero:ny},Symbol.toStringTag,{value:"Module"}));var YD=function(){function e(t){var n=this;this.value=t,this.read=function(){return n.value},this.write=this.write.bind(this),this.modify=this.modify.bind(this)}return e.prototype.write=function(t){var n=this;return function(){n.value=t}},e.prototype.modify=function(t){var n=this;return function(){n.value=t(n.value)}},e}();function Lae(e){return function(){return new YD(e)}}const jae=Object.freeze(Object.defineProperty({__proto__:null,IORef:YD,newIORef:Lae},Symbol.toStringTag,{value:"Module"})),Uae=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var Bae=function(e){return nc(function(){return JSON.parse(e)},N)},Pae=function(e){return nc(function(){var t=JSON.stringify(e);if(typeof t!="string")throw new Error("Converting unsupported structure to JSON");return t},N)};const Dae=Object.freeze(Object.defineProperty({__proto__:null,parse:Bae,stringify:Pae},Symbol.toStringTag,{value:"Module"})),Wae=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var Kae=function(e){return new Map(e)};function Nae(e){return new Map(e)}function GD(e,t){return{show:function(n){var r=[];return n.forEach(function(i,o){r.push("[".concat(e.show(o),", ").concat(t.show(i),"]"))}),"new Map([".concat(r.sort().join(", "),"])")}}}var JD=function(e){return e.size},lo=function(e){return e.size===0};function ay(e){var t=dc(e);return function(n,r){if(r===void 0){var i=ay(e);return function(o){return i(n,o)}}return It(t(n,r))}}function QT(e){return function(t,n){if(n===void 0){var r=QT(e);return function(s){return r(t,s)}}for(var i=n.values(),o;!(o=i.next()).done;){var a=o.value;if(e.equals(t,a))return!0}return!1}}var Nf=function(e){return function(t){return Array.from(t.keys()).sort(e.compare)}},qae=function(e){return function(t){return Array.from(t.values()).sort(e.compare)}};function ZD(e){var t=Nf(e);return function(n){return function(r){for(var i=[],o=t(r),a=0,s=o;a<s.length;a++){var u=s[a];i.push(n(u,r.get(u)))}return i}}}var XD=function(e){return ZD(e)(function(t,n){return[t,n]})};function Vae(e,t){var n=XD(e);return function(r){var i=n(r),o=i.length;return t.unfold(0,function(a){return a<o?de([i[a],a+1]):Ce})}}var eW=function(e){var t=Ea(e);return function(n,r){var i=t(n);return function(o){var a=i(o);if(Vt(a)){var s=new Map(o);return s.set(n,r),s}else if(a.value[1]!==r){var s=new Map(o);return s.set(a.value[0],r),s}return o}}},tW=function(e){var t=Ea(e);return function(n){return function(r){var i=t(n,r);if(It(i)){var o=new Map(r);return o.delete(i.value[0]),o}return r}}},Qae=function(e){var t=nW(e);return function(n,r){return t(n,function(){return r})}},nW=function(e){var t=Ea(e);return function(n,r){return function(i){var o=t(n,i);if(Vt(o))return Ce;var a=o.value,s=a[0],u=a[1],c=r(u);if(c===u)return de(i);var l=new Map(i);return l.set(s,c),de(l)}}};function zae(e){var t=dc(e),n=tW(e);return function(r){var i=n(r);return function(o){return C(t(r,o),bo(function(a){return[a,i(o)]}))}}}function Ea(e){return function(t,n){if(n===void 0){var r=Ea(e);return function(c){return r(t,c)}}for(var i=n.entries(),o;!(o=i.next()).done;){var a=o.value,s=a[0],u=a[1];if(e.equals(s,t))return de([s,u])}return Ce}}function dc(e){var t=Ea(e);return function(n,r){if(r===void 0){var i=dc(e);return function(o){return i(n,o)}}return C(t(n,r),bo(function(o){o[0];var a=o[1];return a}))}}function sy(e,t){var n=Ea(e);return function(r,i){if(i===void 0){var o=sy(e,t);return function(p){return o(p,r)}}for(var a=r.entries(),s;!(s=a.next()).done;){var u=s.value,c=u[0],l=u[1],d=n(c,i);if(Vt(d)||!e.equals(c,d.value[0])||!t.equals(l,d.value[1]))return!1}return!0}}var uy=new Map;function rW(e,t){var n=sy(e,t);return ai(function(r,i){return n(r,i)&&n(i,r)})}function Hae(e,t){var n=Ea(e);return{concat:function(r,i){if(lo(r))return i;if(lo(i))return r;for(var o=new Map(r),a=i.entries(),s;!(s=a.next()).done;){var u=s.value,c=u[0],l=u[1],d=n(c,r);It(d)?o.set(d.value[0],t.concat(d.value[1],l)):o.set(c,l)}return o},empty:uy}}var Yae=function(e,t){return new Map([[e,t]])};function Gae(e,t,n){return function(r){var i=Ea(e);return n.reduce(r,new Map,function(o,a){var s=a[0],u=a[1],c=i(s,o);return It(c)?o.set(c.value[0],t.concat(c.value[1],u)):o.set(s,u),o})}}var qf=function(e,t){for(var n=new Map,r=e.entries(),i;!(i=r.next()).done;){var o=i.value,a=o[0],s=o[1];n.set(a,t(a,s))}return n},iW=function(e){return function(t){for(var n=new Map,r=new Map,i=t.entries(),o;!(o=i.next()).done;){var a=o.value,s=a[0],u=a[1],c=e(s,u);nn(c)?n.set(s,c.left):r.set(s,c.right)}return Oe(n,r)}};function oW(e){return function(t){for(var n=new Map,r=new Map,i=t.entries(),o;!(o=i.next()).done;){var a=o.value,s=a[0],u=a[1];e(s,u)?r.set(s,u):n.set(s,u)}return Oe(n,r)}}var aW=function(e){return function(t){for(var n=new Map,r=t.entries(),i;!(i=r.next()).done;){var o=i.value,a=o[0],s=o[1],u=e(a,s);It(u)&&n.set(a,u.value)}return n}};function sW(e){return function(t){for(var n=new Map,r=t.entries(),i;!(i=r.next()).done;){var o=i.value,a=o[0],s=o[1];e(a,s)&&n.set(a,s)}return n}}var $a=function(e,t){return qf(e,function(n,r){return t(r)})},xA=function(e,t){return uW(e,function(n,r){return t(r)})},wA=function(e,t){return cW(e,function(n,r){return t(r)})},EA=function(e,t){return lW(e,function(n,r){return t(r)})},$A=function(e,t){return fW(e,function(n,r){return t(r)})},uW=function(e,t){return C(e,sW(t))},cW=function(e,t){return C(e,aW(t))},lW=function(e,t){return C(e,oW(t))},fW=function(e,t){return C(e,iW(t))},Vf=function(e){for(var t=new Map,n=e.entries(),r;!(r=n.next()).done;){var i=r.value,o=i[0],a=i[1];It(a)&&t.set(o,a.value)}return t},Jae=function(e){return function(t){return xA(t,e)}},Zae=function(e){return function(t){return wA(t,e)}},Xae=function(e){return function(t){return $a(t,e)}},ese=function(e){return function(t){return qf(t,e)}},tse=function(e){return function(t){return EA(t,e)}},nse=function(e){return function(t){return $A(t,e)}},Qf=function(e){for(var t=new Map,n=new Map,r=e.entries(),i;!(i=r.next()).done;){var o=i.value,a=o[0],s=o[1];nn(s)?t.set(a,s.left):n.set(a,s.right)}return Oe(t,n)},fi="ReadonlyMap",dW=function(e,t){var n=ZT(e,t);return{concat:function(r,i){return n(i)(r)}}},rse=function(e,t){return{concat:dW(e,t).concat,empty:uy}},ise=function(e,t){var n=XT(e,t);return{concat:function(r,i){return n(i)(r)}}},ose=function(e){return function(){var t=ex(e);return{concat:function(n,r){return t(r)(n)}}}};function ase(){return{URI:fi,_E:void 0,map:$a,mapWithIndex:qf,compact:Vf,separate:Qf,filter:xA,filterMap:wA,partition:EA,partitionMap:$A,partitionMapWithIndex:fW,partitionWithIndex:lW,filterMapWithIndex:cW,filterWithIndex:uW}}var pW={URI:fi,map:$a},sse=Qe(pW),use=function(){return{URI:fi,_E:void 0,map:$a,mapWithIndex:qf}},K1={URI:fi,compact:Vf,separate:Qf},cse={URI:fi,map:$a,compact:Vf,separate:Qf,filter:xA,filterMap:wA,partition:EA,partitionMap:$A},zT=function(e){var t=ly(e);return function(n,r){return t(n,function(i,o,a){return r(o,a)})}},HT=function(e){var t=fy(e);return function(n){var r=t(n);return function(i){return r(function(o,a){return i(a)})}}},YT=function(e){var t=dy(e);return function(n,r){return t(n,function(i,o,a){return r(o,a)})}},cy=function(e){var t=zT(e),n=HT(e),r=YT(e);return{URI:fi,_E:void 0,reduce:function(i,o,a){return C(i,t(o,a))},foldMap:function(i){var o=n(i);return function(a,s){return C(a,o(s))}},reduceRight:function(i,o,a){return C(i,r(o,a))}}},ly=function(e){var t=Nf(e);return function(n,r){return function(i){for(var o=n,a=0,s=t(i);a<s.length;a++){var u=s[a];o=r(u,o,i.get(u))}return o}}},fy=function(e){var t=Nf(e);return function(n){return function(r){return function(i){for(var o=n.empty,a=0,s=t(i);a<s.length;a++){var u=s[a];o=n.concat(o,r(u,i.get(u)))}return o}}}},dy=function(e){var t=Nf(e);return function(n,r){return function(i){for(var o=n,a=t(i),s=a.length,u=s-1;u>=0;u--){var c=a[u];o=r(c,i.get(c),o)}return o}}},GT=function(e){var t=cy(e),n=ly(e),r=fy(e),i=dy(e);return{URI:fi,_E:void 0,reduce:t.reduce,foldMap:t.foldMap,reduceRight:t.reduceRight,reduceWithIndex:function(o,a,s){return C(o,n(a,s))},foldMapWithIndex:function(o){var a=r(o);return function(s,u){return C(s,a(u))}},reduceRightWithIndex:function(o,a,s){return C(o,i(a,s))}}},lse=function(e){var t=JT(e),n=cy(e);return{URI:fi,_E:void 0,map:$a,reduce:n.reduce,foldMap:n.foldMap,reduceRight:n.reduceRight,traverse:t.traverse,sequence:t.sequence}},JT=function(e){var t=GT(e),n=Nf(e),r=function(a){return function(s,u){for(var c=a.of(new Map),l=n(s),d=l.length,p=function(m){var g=l[m],_=s.get(g);c=a.ap(a.map(c,function(b){return function(I){return b.set(g,I)}}),u(g,_))},A=0;A<d;A++)p(A);return c}},i=function(a){var s=r(a);return function(u,c){return s(u,function(l,d){return c(d)})}},o=function(a){var s=r(a);return function(u){return s(u,Ar)}};return{URI:fi,_E:void 0,map:$a,mapWithIndex:qf,reduce:t.reduce,foldMap:t.foldMap,reduceRight:t.reduceRight,reduceWithIndex:t.reduceWithIndex,foldMapWithIndex:t.foldMapWithIndex,reduceRightWithIndex:t.reduceRightWithIndex,traverse:i,sequence:o,traverseWithIndex:r}};function fse(e){var t=JT(e);return{URI:fi,_E:void 0,map:$a,compact:Vf,separate:Qf,filter:xA,filterMap:wA,partition:EA,partitionMap:$A,reduce:t.reduce,foldMap:t.foldMap,reduceRight:t.reduceRight,traverse:t.traverse,sequence:t.sequence,mapWithIndex:qf,reduceWithIndex:t.reduceWithIndex,foldMapWithIndex:t.foldMapWithIndex,reduceRightWithIndex:t.reduceRightWithIndex,traverseWithIndex:t.traverseWithIndex,wilt:Bi(t,K1),wither:Pi(t,K1)}}var ZT=function(e,t){var n=dc(e);return function(r){return function(i){if(lo(i))return r;if(lo(r))return i;for(var o=new Map,a=i.entries(),s;!(s=a.next()).done;){var u=s.value,c=u[0],l=u[1],d=n(c)(r);It(d)?o.set(c,t.concat(l,d.value)):o.set(c,l)}for(var p=r.entries();!(s=p.next()).done;){var A=s.value,c=A[0],l=A[1],d=n(c)(o);Vt(d)&&o.set(c,l)}return o}}},XT=function(e,t){var n=dc(e);return function(r){return function(i){if(lo(i)||lo(r))return uy;for(var o=new Map,a=i.entries(),s;!(s=a.next()).done;){var u=s.value,c=u[0],l=u[1],d=n(c)(r);It(d)&&o.set(c,t.concat(l,d.value))}return o}}},ex=function(e){var t=ay(e);return function(n){return function(r){if(lo(r))return n;if(lo(n))return r;for(var i=new Map,o=r.entries(),a;!(a=o.next()).done;){var s=a.value,u=s[0],c=s[1];t(u)(n)||i.set(u,c)}for(var l=n.entries();!(a=l.next()).done;){var d=a.value,u=d[0],c=d[1];t(u)(r)||i.set(u,c)}return i}}},dse=eW,pse={URI:fi,map:$a,compact:Vf,separate:Qf,filter:xA,filterMap:wA,partition:EA,partitionMap:$A};const Ase=Object.freeze(Object.defineProperty({__proto__:null,Compactable:K1,Filterable:cse,Functor:pW,URI:fi,collect:ZD,compact:Vf,deleteAt:tW,difference:ex,elem:QT,empty:uy,filter:Jae,filterMap:Zae,filterMapWithIndex:aW,filterWithIndex:sW,flap:sse,foldMap:HT,foldMapWithIndex:fy,fromFoldable:Gae,fromMap:Kae,getDifferenceMagma:ose,getEq:rW,getFilterableWithIndex:ase,getFoldable:cy,getFoldableWithIndex:GT,getFunctorWithIndex:use,getIntersectionSemigroup:ise,getMonoid:Hae,getShow:GD,getTraversable:lse,getTraversableWithIndex:JT,getUnionMonoid:rse,getUnionSemigroup:dW,getWitherable:fse,insertAt:dse,intersection:XT,isEmpty:lo,isSubmap:sy,keys:Nf,lookup:dc,lookupWithKey:Ea,map:Xae,mapWithIndex:ese,member:ay,modifyAt:nW,partition:tse,partitionMap:nse,partitionMapWithIndex:iW,partitionWithIndex:oW,pop:zae,readonlyMap:pse,reduce:zT,reduceRight:YT,reduceRightWithIndex:dy,reduceWithIndex:ly,separate:Qf,singleton:Yae,size:JD,toMap:Nae,toReadonlyArray:XD,toUnfoldable:Vae,union:ZT,updateAt:Qae,upsertAt:eW,values:qae},Symbol.toStringTag,{value:"Module"}));var _l=function(){return _l=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},_l.apply(this,arguments)},hse=GD,mse=JD,ta=lo,gse=ay,vse=QT,tx=function(e){return function(t){return Array.from(t.keys()).sort(e.compare)}},yse=function(e){return function(t){return Array.from(t.values()).sort(e.compare)}};function AW(e){var t=tx(e);return function(n){return function(r){for(var i=[],o=t(r),a=0,s=o;a<s.length;a++){var u=s[a];i.push(n(u,r.get(u)))}return i}}}function hW(e){return AW(e)(function(t,n){return[t,n]})}function bse(e,t){var n=hW(e);return function(r){var i=n(r),o=i.length;return t.unfold(0,function(a){return a<o?de([i[a],a+1]):Ce})}}var mW=function(e){var t=pc(e);return function(n,r){var i=t(n);return function(o){var a=i(o);if(Vt(a)){var s=new Map(o);return s.set(n,r),s}else if(a.value[1]!==r){var s=new Map(o);return s.set(a.value[0],r),s}return o}}},gW=function(e){var t=pc(e);return function(n){return function(r){var i=t(n,r);if(It(i)){var o=new Map(r);return o.delete(i.value[0]),o}return r}}},Cse=function(e){var t=vW(e);return function(n,r){return t(n,function(){return r})}},vW=function(e){var t=pc(e);return function(n,r){return function(i){var o=t(n,i);if(Vt(o))return Ce;var a=new Map(i);return a.set(o.value[0],r(o.value[1])),de(a)}}};function Sse(e){var t=yW(e),n=gW(e);return function(r){var i=n(r);return function(o){return C(t(r,o),bo(function(a){return[a,i(o)]}))}}}function pc(e){return function(t,n){if(n===void 0){var r=pc(e);return function(c){return r(t,c)}}for(var i=n.entries(),o;!(o=i.next()).done;){var a=o.value,s=a[0],u=a[1];if(e.equals(s,t))return de([s,u])}return Ce}}var yW=dc,_se=sy,Ise=rW;function Tse(e,t){var n=pc(e);return{concat:function(r,i){if(ta(r))return i;if(ta(i))return r;for(var o=new Map(r),a=i.entries(),s;!(s=a.next()).done;){var u=s.value,c=u[0],l=u[1],d=n(c,r);It(d)?o.set(d.value[0],t.concat(d.value[1],l)):o.set(c,l)}return o},empty:new Map}}var xse=function(e,t){return new Map([[e,t]])};function wse(e,t,n){return function(r){var i=pc(e);return n.reduce(r,new Map,function(o,a){var s=a[0],u=a[1],c=i(s,o);return It(c)?o.set(c.value[0],t.concat(c.value[1],u)):o.set(s,u),o})}}var RA=function(e,t){for(var n=new Map,r=e.entries(),i;!(i=r.next()).done;){var o=i.value,a=o[0],s=o[1];n.set(a,t(a,s))}return n},bW=function(e){return function(t){for(var n=new Map,r=new Map,i=t.entries(),o;!(o=i.next()).done;){var a=o.value,s=a[0],u=a[1],c=e(s,u);nn(c)?n.set(s,c.left):r.set(s,c.right)}return Oe(n,r)}};function CW(e){return function(t){for(var n=new Map,r=new Map,i=t.entries(),o;!(o=i.next()).done;){var a=o.value,s=a[0],u=a[1];e(s,u)?r.set(s,u):n.set(s,u)}return Oe(n,r)}}var SW=function(e){return function(t){for(var n=new Map,r=t.entries(),i;!(i=r.next()).done;){var o=i.value,a=o[0],s=o[1],u=e(a,s);It(u)&&n.set(a,u.value)}return n}};function _W(e){return function(t){for(var n=new Map,r=t.entries(),i;!(i=r.next()).done;){var o=i.value,a=o[0],s=o[1];e(a,s)&&n.set(a,s)}return n}}var zf=function(e,t){return RA(e,function(n,r){return t(r)})},py=function(e,t){return IW(e,function(n,r){return t(r)})},Ay=function(e,t){return TW(e,function(n,r){return t(r)})},hy=function(e,t){return xW(e,function(n,r){return t(r)})},my=function(e,t){return wW(e,function(n,r){return t(r)})},IW=function(e,t){return C(e,_W(t))},TW=function(e,t){return C(e,SW(t))},xW=function(e,t){return C(e,CW(t))},wW=function(e,t){return C(e,bW(t))},OA=function(e){for(var t=new Map,n=e.entries(),r;!(r=n.next()).done;){var i=r.value,o=i[0],a=i[1];It(a)&&t.set(o,a.value)}return t},Ese=function(e){return function(t){return py(t,e)}},$se=function(e){return function(t){return Ay(t,e)}},Rse=function(e){return function(t){return zf(t,e)}},Ose=function(e){return function(t){return RA(t,e)}},Fse=function(e){return function(t){return hy(t,e)}},kse=function(e){return function(t){return my(t,e)}},FA=function(e){for(var t=new Map,n=new Map,r=e.entries(),i;!(i=r.next()).done;){var o=i.value,a=o[0],s=o[1];nn(s)?t.set(a,s.left):n.set(a,s.right)}return Oe(t,n)},Ra="Map",EW=function(e,t){var n=kW(e,t);return{concat:function(r,i){return n(i)(r)}}},Mse=function(e,t){return{concat:EW(e,t).concat,empty:new Map}},Lse=function(e,t){var n=MW(e,t);return{concat:function(r,i){return n(i)(r)}}},jse=function(e){return function(){var t=LW(e);return{concat:function(n,r){return t(r)(n)}}}};function Use(){return{URI:Ra,_E:void 0,map:zf,mapWithIndex:RA,compact:OA,separate:FA,filter:py,filterMap:Ay,partition:hy,partitionMap:my,partitionMapWithIndex:wW,partitionWithIndex:xW,filterMapWithIndex:TW,filterWithIndex:IW}}function Bse(e){var t=RW(e);return{URI:Ra,_E:void 0,map:zf,compact:OA,separate:FA,filter:py,filterMap:Ay,partition:hy,partitionMap:my,reduce:t.reduce,foldMap:t.foldMap,reduceRight:t.reduceRight,traverse:t.traverse,sequence:t.sequence,mapWithIndex:RA,reduceWithIndex:t.reduceWithIndex,foldMapWithIndex:t.foldMapWithIndex,reduceRightWithIndex:t.reduceRightWithIndex,traverseWithIndex:t.traverseWithIndex,wilt:Bi(t,N1),wither:Pi(t,N1)}}var Pse=zT,Dse=HT,Wse=YT,Kse=function(e){return _l(_l({},cy(e)),{URI:Ra})},Nse=ly,qse=fy,Vse=dy,$W=function(e){return _l(_l({},GT(e)),{URI:Ra})},RW=function(e){var t=$W(e),n=tx(e),r=function(a){return function(s,u){for(var c=a.of(new Map),l=n(s),d=l.length,p=function(m){var g=l[m],_=s.get(g);c=a.ap(a.map(c,function(b){return function(I){return b.set(g,I)}}),u(g,_))},A=0;A<d;A++)p(A);return c}},i=function(a){var s=r(a);return function(u,c){return s(u,function(l,d){return c(d)})}},o=function(a){var s=r(a);return function(u){return s(u,function(c,l){return l})}};return{URI:Ra,_E:void 0,map:zf,mapWithIndex:RA,reduce:t.reduce,foldMap:t.foldMap,reduceRight:t.reduceRight,reduceWithIndex:t.reduceWithIndex,foldMapWithIndex:t.foldMapWithIndex,reduceRightWithIndex:t.reduceRightWithIndex,traverse:i,sequence:o,traverseWithIndex:r}},OW={URI:Ra,map:zf},Qse=Qe(OW),N1={URI:Ra,compact:OA,separate:FA},FW={URI:Ra,map:zf,compact:OA,separate:FA,filter:py,filterMap:Ay,partition:hy,partitionMap:my},Cm=function(e){return new Map(e)},kW=function(e,t){var n=ZT(e,t);return function(r){return function(i){return ta(i)?Cm(r):ta(r)?Cm(i):n(r)(i)}}},MW=function(e,t){var n=XT(e,t);return function(r){return function(i){return ta(i)||ta(r)?new Map:n(r)(i)}}},LW=function(e){var t=ex(e);return function(n){return function(r){return ta(r)?Cm(n):ta(n)?Cm(r):t(n)(r)}}},zse=new Map,Hse=mW,Yse=FW;const Gse=Object.freeze(Object.defineProperty({__proto__:null,Compactable:N1,Filterable:FW,Functor:OW,URI:Ra,collect:AW,compact:OA,deleteAt:gW,difference:LW,elem:vse,empty:zse,filter:Ese,filterMap:$se,filterMapWithIndex:SW,filterWithIndex:_W,flap:Qse,foldMap:Dse,foldMapWithIndex:qse,fromFoldable:wse,getDifferenceMagma:jse,getEq:Ise,getFilterableWithIndex:Use,getFoldable:Kse,getFoldableWithIndex:$W,getIntersectionSemigroup:Lse,getMonoid:Tse,getShow:hse,getTraversableWithIndex:RW,getUnionMonoid:Mse,getUnionSemigroup:EW,getWitherable:Bse,insertAt:Hse,intersection:MW,isEmpty:ta,isSubmap:_se,keys:tx,lookup:yW,lookupWithKey:pc,map:Rse,mapWithIndex:Ose,map_:Yse,member:gse,modifyAt:vW,partition:Fse,partitionMap:kse,partitionMapWithIndex:bW,partitionWithIndex:CW,pop:Sse,reduce:Pse,reduceRight:Wse,reduceRightWithIndex:Vse,reduceWithIndex:Nse,separate:FA,singleton:xse,size:mse,toArray:hW,toUnfoldable:bse,union:kW,updateAt:Cse,upsertAt:mW,values:yse},Symbol.toStringTag,{value:"Module"})),Jse=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),Zse=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),Xse=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),eue=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),tue=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var jW=function(e){return{concat:xg(e).concat,empty:e.top}},UW=function(e){return{concat:wg(e).concat,empty:e.bottom}},nx=function(e){return{concat:AS(e).concat,empty:e.empty}},BW=function(e){var t={};for(var n in e)pt.call(e,n)&&(t[n]=e[n].empty);return{concat:hS(e).concat,empty:t}},PW=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return{concat:mS.apply(EL,e).concat,empty:e.map(function(n){return n.empty})}},DW=function(e){return vS(e)(e.empty)},nue={concat:SL.concat,empty:void 0},rue=PW,iue=BW,oue=nx,aue=UW,sue=jW,uue=DW,WW={concat:_L.concat,empty:!0},KW={concat:IL.concat,empty:!1},cue=JM,lue=function(){return nx(eP())},fue={concat:TL.concat,empty:""},due={concat:xL.concat,empty:0},pue={concat:wL.concat,empty:1};const Aue=Object.freeze(Object.defineProperty({__proto__:null,concatAll:DW,fold:uue,getDualMonoid:oue,getEndomorphismMonoid:lue,getFunctionMonoid:cue,getJoinMonoid:aue,getMeetMonoid:sue,getStructMonoid:iue,getTupleMonoid:rue,max:UW,min:jW,monoidAll:WW,monoidAny:KW,monoidProduct:pue,monoidString:fue,monoidSum:due,monoidVoid:nue,reverse:nx,struct:BW,tuple:PW},Symbol.toStringTag,{value:"Module"})),hue=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var NW=function(e,t,n){return function(r){return r===-1?e():r===0?t():n()}},mue=NW,qW=function(e){return e===-1?1:e===1?-1:0},VW={equals:function(e,t){return e===t}},rx={concat:function(e,t){return e!==0?e:t}},QW={concat:rx.concat,empty:0},gue=function(e){return e<=-1?-1:e>=1?1:0},vue=qW,yue=rx,bue=VW,Cue=QW;const Sue=Object.freeze(Object.defineProperty({__proto__:null,Eq:VW,Monoid:QW,Semigroup:rx,eqOrdering:bue,invert:vue,match:mue,matchW:NW,monoidOrdering:Cue,reverse:qW,semigroupOrdering:yue,sign:gue},Symbol.toStringTag,{value:"Module"}));var _ue=function(e){return typeof e.map=="function"},Iue=function(e){return typeof e.contramap=="function"},Tue=function(e){return typeof e.mapWithIndex=="function"},xue=function(e){return typeof e.ap=="function"},wue=function(e){return typeof e.chain=="function"},Eue=function(e){return typeof e.bimap=="function"},$ue=function(e){return typeof e.extend=="function"},Rue=function(e){return typeof e.reduce=="function"},Oue=function(e){return typeof e.reduceWithIndex=="function"},Fue=function(e){return typeof e.alt=="function"},kue=function(e){return typeof e.compact=="function"},Mue=function(e){return typeof e.filter=="function"},Lue=function(e){return typeof e.filterWithIndex=="function"},jue=function(e){return typeof e.promap=="function"},Uue=function(e){return typeof e.compose=="function"},Bue=function(e){return typeof e.throwError=="function"};function Pue(e){var t={};if(_ue(e)){var n=function(M){return function(k){return e.map(k,M)}};t.map=n}if(Iue(e)){var r=function(M){return function(k){return e.contramap(k,M)}};t.contramap=r}if(Tue(e)){var i=function(M){return function(k){return e.mapWithIndex(k,M)}};t.mapWithIndex=i}if(xue(e)){var o=function(M){return function(k){return e.ap(k,M)}},a=function(M){return function(k){return e.ap(e.map(k,function(q){return function(){return q}}),M)}};t.ap=o,t.apFirst=a,t.apSecond=function(M){return function(k){return e.ap(e.map(k,function(){return function(q){return q}}),M)}}}if(wue(e)){var s=function(M){return function(k){return e.chain(k,M)}},u=function(M){return function(k){return e.chain(k,function(q){return e.map(M(q),function(){return q})})}},c=function(M){return e.chain(M,N)};t.chain=s,t.chainFirst=u,t.flatten=c}if(Eue(e)){var l=function(M,k){return function(q){return e.bimap(q,M,k)}},d=function(M){return function(k){return e.mapLeft(k,M)}};t.bimap=l,t.mapLeft=d}if($ue(e)){var p=function(M){return function(k){return e.extend(k,M)}},A=function(M){return e.extend(M,N)};t.extend=p,t.duplicate=A}if(Rue(e)){var m=function(M,k){return function(q){return e.reduce(q,M,k)}},g=function(M){var k=e.foldMap(M);return function(q){return function(ue){return k(ue,q)}}},_=function(M,k){return function(q){return e.reduceRight(q,M,k)}};t.reduce=m,t.foldMap=g,t.reduceRight=_}if(Oue(e)){var b=function(M,k){return function(q){return e.reduceWithIndex(q,M,k)}},I=function(M){var k=e.foldMapWithIndex(M);return function(q){return function(ue){return k(ue,q)}}},x=function(M,k){return function(q){return e.reduceRightWithIndex(q,M,k)}};t.reduceWithIndex=b,t.foldMapWithIndex=I,t.reduceRightWithIndex=x}if(Fue(e)){var v=function(M){return function(k){return e.alt(k,M)}};t.alt=v}if(kue(e)&&(t.compact=e.compact,t.separate=e.separate),Mue(e)){var S=function(M){return function(k){return e.filter(k,M)}},y=function(M){return function(k){return e.filterMap(k,M)}},T=function(M){return function(k){return e.partition(k,M)}},w=function(M){return function(k){return e.partitionMap(k,M)}};t.filter=S,t.filterMap=y,t.partition=T,t.partitionMap=w}if(Lue(e)){var O=function(M){return function(k){return e.filterWithIndex(k,M)}},F=function(M){return function(k){return e.filterMapWithIndex(k,M)}},$=function(M){return function(k){return e.partitionWithIndex(k,M)}},P=function(M){return function(k){return e.partitionMapWithIndex(k,M)}};t.filterWithIndex=O,t.filterMapWithIndex=F,t.partitionWithIndex=$,t.partitionMapWithIndex=P}if(jue(e)){var K=function(M,k){return function(q){return e.promap(q,M,k)}};t.promap=K}if(Uue(e)){var J=function(M){return function(k){return e.compose(k,M)}};t.compose=J}if(Bue(e)){var ee=function(M){return function(k){return k._tag==="None"?e.throwError(M()):e.of(k.value)}},re=function(M){return M._tag==="Left"?e.throwError(M.left):e.of(M.right)},D=function(M,k){return function(q){return M(q)?e.of(q):e.throwError(k(q))}},Y=function(M,k){return function(q){return e.chain(q,function(ue){return M(ue)?e.of(ue):e.throwError(k(ue))})}};t.fromOption=ee,t.fromEither=re,t.fromPredicate=D,t.filterOrElse=Y}return t}var le=C;const Due=Object.freeze(Object.defineProperty({__proto__:null,pipe:le,pipeable:Pue},Symbol.toStringTag,{value:"Module"})),Wue=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),Kue=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var gy=function(){return Math.random()};function zW(e,t){return C(gy,xo(function(n){return Math.floor((t-e+1)*n+e)}))}function Nue(e,t){return C(gy,xo(function(n){return(t-e)*n+e}))}var que=C(gy,xo(function(e){return e<.5})),Vue=function(e){return C(zW(0,e.length-1),xo(function(t){return e[t]}))};const Que=Object.freeze(Object.defineProperty({__proto__:null,random:gy,randomBool:que,randomElem:Vue,randomInt:zW,randomRange:Nue},Symbol.toStringTag,{value:"Module"}));var ix=If(tT),HW=rc(tT),YW=Tf(vn),zue=xf(vn),GW=Io,JW=YW,ZW=cA(vn),Hue=ZW,ox=Ff(Sa),Yue=ox,XW=ox,Gue=XW,eK=kf(Sa),Jue=eK,Zue=dA(vn),Xue=pA,tK=AA,ece=tK,nK=oc(Sa),tce=nK,rK=lA(Sa),nce=rK,rce=fA(Sa),ice=Mf(vn),di=function(e,t){return C(e,oK(t))},ax=function(e,t,n){return C(e,aK(t,n))},sx=function(e,t){return C(e,sK(t))},Hf=function(e,t){return C(e,ux(t))},kA=function(e,t){return C(e,cx(t))},iK=function(e,t){return C(e,lx(t))},oK=wf(vn),aK=Rf(vn),sK=Of(vn),ux=Ef(Ca),oce=ux,Eo=HW,cx=ic(Sa),uK=cx,cK=uK(N),ace=cK,lx=$f(Sa),sce=lx,fx=ix,sn="ReaderEither",lK=function(e){var t=ec(e);return{URI:sn,_E:void 0,compact:Co(vn,t),separate:ha(vn,t,Ts)}};function uce(e){var t=Cf(e),n=lK(e),r=ma(vn,t),i=ga(vn,t),o=ws(vn,t),a=Es(vn,t);return{URI:sn,_E:void 0,map:di,compact:n.compact,separate:n.separate,filter:function(s,u){return C(s,r(u))},filterMap:function(s,u){return C(s,i(u))},partition:function(s,u){return C(s,o(u))},partitionMap:function(s,u){return C(s,a(u))}}}function fK(e){var t=ua(Ca,Is(e));return{URI:sn,_E:void 0,map:di,ap:function(n,r){return C(n,t(r))},of:Eo}}function dK(e){var t=uA(Sa,e);return{URI:sn,_E:void 0,map:di,alt:function(n,r){return C(n,t(r))}}}var dx={URI:sn,map:di},cce=Qe(dx),lce={URI:sn,of:Eo},MA={URI:sn,map:di,ap:Hf},pK=Lt(MA),fce=pK,AK=jt(MA),dce=AK,hK={URI:sn,map:di,ap:Hf,of:Eo},Oa={URI:sn,map:di,ap:Hf,chain:kA},pce={URI:sn,map:di,ap:Hf,of:Eo,chain:kA},mK=At(Oa),Ace=mK,hce={URI:sn,bimap:ax,mapLeft:sx},mce={URI:sn,map:di,alt:iK},Yf={URI:sn,fromReader:JW},gce=mA(Yf),vce=gA(Yf),yce=uc(Yf),gK=vA(Yf,Oa),bce=gK,vK=yA(Yf,Oa),Cce=vK,Sce={URI:sn,map:di,ap:Hf,of:Eo,chain:kA,throwError:fx},Fa={URI:sn,fromEither:GW},_ce=go(Fa),Ice=vo(Fa),Tce=Nu(Fa,Oa),yK=ca(Fa,Oa),xce=yK,bK=la(Fa,Oa),wce=bK,Ece=ms(Fa),CK=qu(Fa,Oa),$ce=CK,Rce=Ur(Fa),Oce=Eo(on),Fce=Bt(dx),SK=Pt(Oa),kce=SK,_K=Ut(MA),Mce=_K,IK=Eo(Sn),TK=function(e){return H(sc(e),ac(sA(Ar)))},px=function(e){var t=TK(e);return function(n){return yt(n)?t(n):IK}},Lce=px,xK=function(e){return px(function(t,n){return e(n)})},jce=xK(N),Uce={URI:sn,bimap:ax,mapLeft:sx,map:di,of:Eo,ap:Hf,chain:kA,alt:iK,throwError:ix},Bce=an(MA),Pce=oi(hK),Dce=function(e){return an(Ca)(rA(e))};function Wce(e){var t=fK(e),n=dK(e);return{URI:sn,_E:void 0,map:di,ap:t.ap,of:Eo,chain:kA,bimap:ax,mapLeft:sx,alt:n.alt,throwError:fx}}const Kce=Object.freeze(Object.defineProperty({__proto__:null,Alt:mce,ApT:IK,Applicative:hK,Apply:MA,Bifunctor:hce,Chain:Oa,Do:Oce,FromEither:Fa,FromReader:Yf,Functor:dx,Monad:pce,MonadThrow:Sce,Pointed:lce,URI:sn,alt:lx,altW:sce,ap:ux,apFirst:pK,apFirstW:fce,apS:_K,apSW:Mce,apSecond:AK,apSecondW:dce,apW:oce,ask:gce,asks:vce,asksReaderEither:ece,asksReaderEitherW:tK,bimap:aK,bind:SK,bindTo:Fce,bindW:kce,chain:cx,chainEitherK:yK,chainEitherKW:xce,chainFirst:mK,chainFirstEitherK:bK,chainFirstEitherKW:wce,chainFirstReaderK:vK,chainFirstReaderKW:Cce,chainFirstW:Ace,chainOptionK:Tce,chainReaderK:gK,chainReaderKW:bce,chainW:uK,filterOrElse:CK,filterOrElseW:$ce,flap:cce,flatten:ace,flattenW:cK,fold:Yue,foldW:Gue,fromEither:GW,fromEitherK:Rce,fromOption:_ce,fromOptionK:Ice,fromPredicate:Ece,fromReader:JW,fromReaderK:yce,getAltReaderValidation:dK,getApplicativeReaderValidation:fK,getApplyMonoid:Pce,getApplySemigroup:Bce,getCompactable:lK,getFilterable:uce,getOrElse:eK,getOrElseW:Jue,getReaderValidation:Wce,getSemigroup:Dce,left:ix,leftReader:zue,local:Xue,map:oK,mapLeft:sK,match:ZW,matchE:ox,matchEW:XW,matchW:Hue,of:Eo,orElse:nK,orElseFirst:rK,orElseFirstW:nce,orElseW:tce,orLeft:rce,readerEither:Uce,right:HW,rightReader:YW,sequenceArray:jce,swap:ice,throwError:fx,toUnion:Zue,traverseArray:xK,traverseArrayWithIndex:Lce,traverseReadonlyArrayWithIndex:px,traverseReadonlyNonEmptyArrayWithIndex:TK},Symbol.toStringTag,{value:"Module"}));function Ax(e){return function(t){return function(){return e.of(t)}}}function hx(e){return function(t){return function(n){return function(r){return e.map(n(r),t)}}}}function mx(e){return function(t){return function(n){return function(r){return e.ap(n(r),t(r))}}}}function gx(e){return function(t){return function(n){return function(r){return e.chain(n(r),function(i){return t(i)(r)})}}}}function vx(e){return function(t){return H(t,e.of)}}function Nce(e){return function(t){return H(t,e)}}function qce(e){var t=mx(e),n=hx(e),r=gx(e);return{map:function(i,o){return C(i,n(o))},ap:function(i,o){return C(i,t(o))},of:Ax(e),chain:function(i,o){return C(i,r(o))},ask:function(){return e.of},asks:function(i){return H(i,e.of)},local:function(i,o){return function(a){return i(o(a))}},fromReader:vx(e),fromM:function(i){return function(){return i}}}}const Vce=Object.freeze(Object.defineProperty({__proto__:null,ap:mx,chain:gx,fromNaturalTransformation:Nce,fromReader:vx,getReaderM:qce,map:hx,of:Ax},Symbol.toStringTag,{value:"Module"}));var Zn=function(e){return function(){return Promise.resolve().then(e)}};function Qce(e){return function(t){return function(){return new Promise(function(n){setTimeout(function(){Promise.resolve().then(t).then(n)},e)})}}}var Ki=function(e,t){return C(e,Fs(t))},Ac=function(e,t){return C(e,wK(t))},yx=function(e,t){return C(e,LA(function(n){return C(t,Fs(n))}))},Gf=function(e,t){return C(e,LA(t))},Fs=function(e){return function(t){return function(){return Promise.resolve().then(t).then(e)}}},wK=function(e){return function(t){return function(){return Promise.all([Promise.resolve().then(t),Promise.resolve().then(e)]).then(function(n){var r=n[0],i=n[1];return r(i)})}}},Bn=function(e){return function(){return Promise.resolve(e)}},LA=function(e){return function(t){return function(){return Promise.resolve().then(t).then(function(n){return e(n)()})}}},zce=LA(N),Xn="Task";function Hce(){return{concat:function(e,t){return function(){return Promise.race([Promise.resolve().then(e),Promise.resolve().then(t)])}},empty:$K}}var De={URI:Xn,map:Ki},Yce=Qe(De),Tn={URI:Xn,of:Bn},hc={URI:Xn,map:Ki,ap:Ac},Gce=Lt(hc),Jce=jt(hc),jA={URI:Xn,map:Ki,ap:Ac,of:Bn},vy={URI:Xn,map:Ki,ap:yx},EK={URI:Xn,map:Ki,ap:yx,of:Bn},Jf={URI:Xn,map:Ki,ap:Ac,chain:Gf},un={URI:Xn,map:Ki,of:Bn,ap:Ac,chain:Gf},Zce={URI:Xn,map:Ki,of:Bn,ap:Ac,chain:Gf,fromIO:Zn},UA=N,Xce={URI:Xn,map:Ki,of:Bn,ap:Ac,chain:Gf,fromIO:Zn,fromTask:UA},ele=At(Jf),yy={URI:Xn,fromIO:Zn},tle=_o(yy),nle=va(yy,Jf),rle=ya(yy,Jf),ile={URI:Xn,fromIO:Zn,fromTask:UA},$K=function(){return new Promise(function(e){})},ole=Bn(on),ale=Bt(De),sle=Pt(Jf),ule=Ut(hc),bx=Bn(Sn),Zf=function(e){return function(t){return function(){return Promise.all(t.map(function(n,r){return Promise.resolve().then(function(){return e(r,n)()})}))}}},Cx=function(e){var t=Zf(e);return function(n){return yt(n)?t(n):bx}},Sx=function(e){return function(t){return function(){return zl(t).reduce(function(n,r,i){return n.then(function(o){return Promise.resolve().then(e(i+1,r)).then(function(a){return o.push(a),o})})},Promise.resolve().then(e(0,jr(t))).then($p))}}},_x=function(e){var t=Sx(e);return function(n){return yt(n)?t(n):bx}},cle=Cx,RK=function(e){return Cx(function(t,n){return e(n)})},lle=RK(N),fle=_x,OK=function(e){return _x(function(t,n){return e(n)})},dle=OK(N),ple={URI:Xn,map:Ki,of:Bn,ap:Ac,chain:Gf,fromIO:Zn,fromTask:UA},Ale={URI:Xn,map:Ki,of:Bn,ap:yx,chain:Gf,fromIO:Zn,fromTask:UA},hle=an(vy),mle=oi(EK);const gle=Object.freeze(Object.defineProperty({__proto__:null,ApT:bx,ApplicativePar:jA,ApplicativeSeq:EK,ApplyPar:hc,ApplySeq:vy,Chain:Jf,Do:ole,FromIO:yy,FromTask:ile,Functor:De,Monad:un,MonadIO:Zce,MonadTask:Xce,Pointed:Tn,URI:Xn,ap:wK,apFirst:Gce,apS:ule,apSecond:Jce,bind:sle,bindTo:ale,chain:LA,chainFirst:ele,chainFirstIOK:rle,chainIOK:nle,delay:Qce,flap:Yce,flatten:zce,fromIO:Zn,fromIOK:tle,fromTask:UA,getMonoid:mle,getRaceMonoid:Hce,getSemigroup:hle,map:Fs,never:$K,of:Bn,sequenceArray:lle,sequenceSeqArray:dle,task:ple,taskSeq:Ale,traverseArray:RK,traverseArrayWithIndex:cle,traverseReadonlyArrayWithIndex:Cx,traverseReadonlyArrayWithIndexSeq:_x,traverseReadonlyNonEmptyArrayWithIndex:Zf,traverseReadonlyNonEmptyArrayWithIndexSeq:Sx,traverseSeqArray:OK,traverseSeqArrayWithIndex:fle},Symbol.toStringTag,{value:"Module"}));var FK=vx(Tn),Xf=Io,mc=H(Zn,Xf),vle=pA,kK=AA,yle=kK,Ni=function(e,t){return C(e,Tx(t))},gc=function(e,t){return C(e,xx(t))},Ix=function(e,t){return C(e,by(function(n){return C(t,Tx(n))}))},ed=function(e,t){return C(e,by(t))},Tx=hx(De),xx=mx(hc),ble=xx,pi=Ax(Tn),by=gx(un),MK=by,LK=MK(N),Cle=LK,Pn="ReaderTask",yn={URI:Pn,map:Ni},Sle=Qe(yn),BA={URI:Pn,of:pi},PA={URI:Pn,map:Ni,ap:gc},_le=Lt(PA),Ile=jt(PA),Tle={URI:Pn,map:Ni,ap:gc,of:pi},wx={URI:Pn,map:Ni,ap:Ix},jK={URI:Pn,map:Ni,ap:Ix,of:pi},$o={URI:Pn,map:Ni,ap:gc,chain:ed},ka={URI:Pn,map:Ni,of:pi,ap:gc,chain:ed},xle={URI:Pn,map:Ni,of:pi,ap:gc,chain:ed,fromIO:mc},wle={URI:Pn,map:Ni,of:pi,ap:gc,chain:ed,fromIO:mc,fromTask:Xf},UK=At($o),Ele=UK,Cy={URI:Pn,fromIO:mc},$le=_o(Cy),Rle=va(Cy,$o),Ole=ya(Cy,$o),td={URI:Pn,fromReader:FK},Fle=mA(td),kle=gA(td),Mle=uc(td),BK=vA(td,$o),Lle=BK,PK=yA(td,$o),jle=PK,Sy={URI:Pn,fromIO:mc,fromTask:Xf},Ule=cc(Sy),Ble=Lf(Sy,$o),Ple=jf(Sy,$o),Dle=pi(on),Wle=Bt(yn),DK=Pt($o),Kle=DK,WK=Ut(PA),Nle=WK,Ex=pi(Sn),KK=function(e){return H(sc(e),ac(Zf(Ar)))},$x=function(e){var t=KK(e);return function(n){return yt(n)?t(n):Ex}},NK=function(e){return H(sc(e),ac(Sx(Ar)))},Rx=function(e){var t=NK(e);return function(n){return yt(n)?t(n):Ex}},qle=$x,qK=function(e){return $x(function(t,n){return e(n)})},Vle=qK(N),Qle=Rx,VK=function(e){return Rx(function(t,n){return e(n)})},zle=VK(N),Hle={URI:Pn,map:Ni,of:pi,ap:gc,chain:ed,fromIO:mc,fromTask:Xf},Yle={URI:Pn,map:Ni,of:pi,ap:Ix,chain:ed,fromIO:mc,fromTask:Xf},Gle=an(wx),Jle=oi(jK);function Zle(e,t){return e(t)()}const Xle=Object.freeze(Object.defineProperty({__proto__:null,ApT:Ex,ApplicativePar:Tle,ApplicativeSeq:jK,ApplyPar:PA,ApplySeq:wx,Chain:$o,Do:Dle,FromIO:Cy,FromReader:td,FromTask:Sy,Functor:yn,Monad:ka,MonadIO:xle,MonadTask:wle,Pointed:BA,URI:Pn,ap:xx,apFirst:_le,apS:WK,apSW:Nle,apSecond:Ile,apW:ble,ask:Fle,asks:kle,asksReaderTask:yle,asksReaderTaskW:kK,bind:DK,bindTo:Wle,bindW:Kle,chain:by,chainFirst:UK,chainFirstIOK:Ole,chainFirstReaderK:PK,chainFirstReaderKW:jle,chainFirstTaskK:Ple,chainFirstW:Ele,chainIOK:Rle,chainReaderK:BK,chainReaderKW:Lle,chainTaskK:Ble,chainW:MK,flap:Sle,flatten:Cle,flattenW:LK,fromIO:mc,fromIOK:$le,fromReader:FK,fromReaderK:Mle,fromTask:Xf,fromTaskK:Ule,getMonoid:Jle,getSemigroup:Gle,local:vle,map:Tx,of:pi,readerTask:Hle,readerTaskSeq:Yle,run:Zle,sequenceArray:Vle,sequenceSeqArray:zle,traverseArray:qK,traverseArrayWithIndex:qle,traverseReadonlyArrayWithIndex:$x,traverseReadonlyArrayWithIndexSeq:Rx,traverseReadonlyNonEmptyArrayWithIndex:KK,traverseReadonlyNonEmptyArrayWithIndexSeq:NK,traverseSeqArray:VK,traverseSeqArrayWithIndex:Qle},Symbol.toStringTag,{value:"Module"}));var efe=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(l){try{c(r.next(l))}catch(d){a(d)}}function u(l){try{c(r.throw(l))}catch(d){a(d)}}function c(l){l.done?o(l.value):i(l.value).then(s,u)}c((r=r.apply(e,t||[])).next())})},tfe=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(c){return function(l){return u([c,l])}}function u(c){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(l){c=[6,l],i=0}finally{r=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},Ox=If(Tn),Fx=rc(Tn),_y=Tf(De),kx=xf(De),Mx=H(Zn,_y),QK=H(Zn,kx),ks=Mx,nd=_y,Lx=Bn,jx=Zn,zK=function(e){return Fs(MB(e))},HK=cA(De),nfe=HK,Ux=Ff(un),rfe=Ux,YK=Ux,ife=YK,GK=kf(un),ofe=GK,JK=function(e,t){return function(){return efe(void 0,void 0,void 0,function(){var n;return tfe(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,e().then(hs)];case 1:return[2,r.sent()];case 2:return n=r.sent(),[2,ea(t(n))];case 3:return[2]}})})}},afe=function(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return JK(function(){return e.apply(void 0,n)},t)}},sfe=dA(De),ufe=Lv(Tn),cfe=jv(Tn),lfe=QI(un),ZK=oc(un),ffe=ZK,Iy=lA(un),dfe=Iy,pfe=function(e){return Iy(m3(e))},Afe=function(e){return Iy(g3(e))},hfe=fA(un),mfe=Mf(De),XK=function(e){var t=zK(e);return function(n){return H(n,t)}},e3=function(e){return function(t){return function(n){return C(n,DA(XK(e)(t)))}}},gfe=e3,t3=function(e){return H(e,jx)},n3=function(e){return zd(t3(e))},vfe=n3,xn=function(e,t){return C(e,Dx(t))},Ms=function(e,t){return C(e,Wx(t))},Bx=function(e,t){return C(e,DA(function(n){return C(t,Dx(n))}))},Ls=function(e,t){return C(e,DA(t))},Ty=function(e,t,n){return C(e,r3(t,n))},xy=function(e,t){return C(e,i3(t))},Px=function(e,t){return C(e,Kx(t))},Dx=wf(De),r3=Rf(De),i3=Of(De),Wx=Ef(hc),yfe=Wx,DA=ic(un),zd=DA,o3=zd(N),bfe=o3,Kx=$f(un),Cfe=Kx,vr=Fx,WA=Ox,bt="TaskEither";function Nx(e,t){var n=ua(e,Is(t));return{URI:bt,_E:void 0,map:xn,ap:function(r,i){return C(r,n(i))},of:vr}}function a3(e){var t=uA(un,e);return{URI:bt,_E:void 0,map:xn,alt:function(n,r){return C(n,t(r))}}}var s3=function(e){var t=ec(e);return{URI:bt,_E:void 0,compact:Co(De,t),separate:ha(De,t,Ts)}};function Sfe(e){var t=Cf(e),n=s3(e),r=ma(De,t),i=ga(De,t),o=ws(De,t),a=Es(De,t);return{URI:bt,_E:void 0,map:xn,compact:n.compact,separate:n.separate,filter:function(s,u){return C(s,r(u))},filterMap:function(s,u){return C(s,i(u))},partition:function(s,u){return C(s,o(u))},partitionMap:function(s,u){return C(s,a(u))}}}var qx={URI:bt,map:xn},_fe=Qe(qx),Ife={URI:bt,of:vr},wy={URI:bt,map:xn,ap:Ms},u3=Lt(wy),Tfe=u3,c3=jt(wy),xfe=c3,wfe={URI:bt,map:xn,ap:Ms,of:vr},l3={URI:bt,map:xn,ap:Bx},f3={URI:bt,map:xn,ap:Bx,of:vr},qi={URI:bt,map:xn,ap:Ms,chain:Ls},Efe={URI:bt,map:xn,ap:Ms,chain:Ls,of:vr},$fe={URI:bt,map:xn,ap:Ms,chain:Ls,of:vr,fromIO:ks},Rfe={URI:bt,map:xn,ap:Ms,chain:Ls,of:vr,fromIO:ks,fromTask:nd},Ofe={URI:bt,map:xn,ap:Ms,chain:Ls,of:vr,throwError:WA},d3=At(qi),Ffe=d3,kfe={URI:bt,bimap:Ty,mapLeft:xy},Mfe={URI:bt,map:xn,alt:Px},Ma={URI:bt,fromEither:Lx},Lfe=go(Ma),jfe=vo(Ma),Ufe=Nu(Ma,qi),p3=ca(Ma,qi),Bfe=p3,A3=la(Ma,qi),Pfe=A3,Dfe=ms(Ma),h3=qu(Ma,qi),Wfe=h3,Kfe=Ur(Ma),Ey={URI:bt,fromIO:ks},m3=_o(Ey),Nfe=va(Ey,qi),qfe=ya(Ey,qi),$y={URI:bt,fromIO:ks,fromTask:nd},g3=cc($y),Vfe=Lf($y,qi),Qfe=jf($y,qi);function zfe(e){return function(){var t=Array.prototype.slice.call(arguments);return function(){return new Promise(function(n){var r=function(i,o){return i!=null?n(ea(i)):n(hs(o))};e.apply(null,t.concat(r))})}}}var Hfe=function(e,t,n){return Vx(e,t,n)},Vx=function(e,t,n){return C(e,zd(function(r){return C(t(r),LA(function(i){return C(n(r,i),zd(function(){return Bn(i)}))}))}))},Yfe=vr(on),Gfe=Bt(qx),v3=Pt(qi),Jfe=v3,y3=Ut(wy),Zfe=y3,Qx=vr(Sn),zx=function(e){return H(Zf(e),Fs(sA(Ar)))},Hx=function(e){var t=zx(e);return function(n){return yt(n)?t(n):Qx}},Yx=function(e){return function(t){return function(){return zl(t).reduce(function(n,r,i){return n.then(function(o){return nn(o)?n:e(i+1,r)().then(function(a){return nn(a)?a:(o.right.push(a.right),o)})})},e(0,jr(t))().then(tc($p)))}}},Gx=function(e){var t=Yx(e);return function(n){return yt(n)?t(n):Qx}},Xfe=Hx,b3=function(e){return Hx(function(t,n){return e(n)})},ede=b3(N),tde=Gx,C3=function(e){return Gx(function(t,n){return e(n)})},nde=C3(N),rde={URI:bt,bimap:Ty,mapLeft:xy,map:xn,of:vr,ap:Ms,chain:Ls,alt:Px,fromIO:ks,fromTask:nd,throwError:WA},ide={URI:bt,bimap:Ty,mapLeft:xy,map:xn,of:vr,ap:Bx,chain:Ls,alt:Px,fromIO:ks,fromTask:nd,throwError:WA},ode=an(l3),ade=oi(f3),sde=function(e){return an(vy)(rA(e))};function ude(e){var t=Nx(jA,e),n=a3(e);return{URI:bt,_E:void 0,map:xn,ap:t.ap,of:vr,chain:Ls,bimap:Ty,mapLeft:xy,alt:n.alt,fromIO:ks,fromTask:nd,throwError:WA}}const cde=Object.freeze(Object.defineProperty({__proto__:null,Alt:Mfe,ApT:Qx,ApplicativePar:wfe,ApplicativeSeq:f3,ApplyPar:wy,ApplySeq:l3,Bifunctor:kfe,Chain:qi,Do:Yfe,FromEither:Ma,FromIO:Ey,FromTask:$y,Functor:qx,Monad:Efe,MonadIO:$fe,MonadTask:Rfe,MonadThrow:Ofe,Pointed:Ife,URI:bt,alt:Kx,altW:Cfe,ap:Wx,apFirst:u3,apFirstW:Tfe,apS:y3,apSW:Zfe,apSecond:c3,apSecondW:xfe,apW:yfe,bimap:r3,bind:v3,bindTo:Gfe,bindW:Jfe,bracket:Hfe,bracketW:Vx,chain:DA,chainEitherK:p3,chainEitherKW:Bfe,chainFirst:d3,chainFirstEitherK:A3,chainFirstEitherKW:Pfe,chainFirstIOK:qfe,chainFirstTaskK:Qfe,chainFirstW:Ffe,chainIOEitherK:vfe,chainIOEitherKW:n3,chainIOK:Nfe,chainNullableK:lfe,chainOptionK:Ufe,chainTaskK:Vfe,chainTaskOptionK:gfe,chainTaskOptionKW:e3,chainW:zd,filterOrElse:h3,filterOrElseW:Wfe,flap:_fe,flatten:bfe,flattenW:o3,fold:rfe,foldW:ife,fromEither:Lx,fromEitherK:Kfe,fromIO:ks,fromIOEither:jx,fromIOEitherK:t3,fromIOK:m3,fromNullable:ufe,fromNullableK:cfe,fromOption:Lfe,fromOptionK:jfe,fromPredicate:Dfe,fromTask:nd,fromTaskK:g3,fromTaskOption:zK,fromTaskOptionK:XK,getAltTaskValidation:a3,getApplicativeTaskValidation:Nx,getApplyMonoid:ade,getApplySemigroup:ode,getCompactable:s3,getFilterable:Sfe,getOrElse:GK,getOrElseW:ofe,getSemigroup:sde,getTaskValidation:ude,left:Ox,leftIO:QK,leftTask:kx,map:Dx,mapLeft:i3,match:HK,matchE:Ux,matchEW:YK,matchW:nfe,of:vr,orElse:ZK,orElseFirst:Iy,orElseFirstIOK:pfe,orElseFirstTaskK:Afe,orElseFirstW:dfe,orElseW:ffe,orLeft:hfe,right:Fx,rightIO:Mx,rightTask:_y,sequenceArray:ede,sequenceSeqArray:nde,swap:mfe,taskEither:rde,taskEitherSeq:ide,taskify:zfe,throwError:WA,toUnion:sfe,traverseArray:b3,traverseArrayWithIndex:Xfe,traverseReadonlyArrayWithIndex:Hx,traverseReadonlyArrayWithIndexSeq:Gx,traverseReadonlyNonEmptyArrayWithIndex:zx,traverseReadonlyNonEmptyArrayWithIndexSeq:Yx,traverseSeqArray:C3,traverseSeqArrayWithIndex:tde,tryCatch:JK,tryCatchK:afe},Symbol.toStringTag,{value:"Module"}));var js=Io,Ry=If(BA),Jx=rc(BA),Zx=H(_y,js),S3=H(kx,js),Xx=function(e){return H(e,Fx)},_3=function(e){return H(e,Ox)},I3=Tf(yn),lde=xf(yn),ew=H(Mx,js),T3=H(QK,js),x3=pi,w3=Xx,Us=ew,rd=Zx,tw=H(jx,js),nw=function(e){return H(e,Lx)},E3=cA(yn),fde=E3,rw=Ff($o),dde=rw,$3=rw,pde=$3,R3=kf(ka),Ade=R3,hde=dA(yn),mde=Lv(BA),gde=jv(BA),vde=QI(ka),yde=pA,O3=AA,bde=O3,F3=oc(ka),Cde=F3,k3=lA(ka),Sde=k3,_de=fA(ka),Ide=Mf(yn),M3=function(e){return H(e,tw)},L3=function(e){return id(M3(e))},Tde=L3,iw=function(e){return H(e,js)},j3=function(e){return id(iw(e))},xde=j3,U3=function(e){return jy(iw(e))},wde=U3,ow=function(e){return H(e,nw)},B3=function(e){return id(ow(e))},Ede=B3,P3=function(e){return jy(ow(e))},$de=P3,wn=function(e,t){return C(e,KA(t))},Bs=function(e,t){return C(e,lw(t))},aw=function(e,t){return C(e,ky(function(n){return C(t,KA(n))}))},Ps=function(e,t){return C(e,ky(t))},sw=function(e,t){return C(e,My(t))},Oy=function(e,t,n){return C(e,uw(t,n))},Fy=function(e,t){return C(e,cw(t))},KA=wf(yn),uw=Rf(yn),cw=Of(yn),lw=Ef(PA),Rde=lw,yr=Jx,ky=ic(ka),id=ky,D3=id(N),Ode=D3,My=$f(ka),W3=My,NA=Ry,gt="ReaderTaskEither",K3=function(e){var t=ec(e);return{URI:gt,_E:void 0,compact:Co(yn,t),separate:ha(yn,t,Ts)}};function Fde(e){var t=Cf(e),n=K3(e),r=ma(yn,t),i=ga(yn,t),o=ws(yn,t),a=Es(yn,t);return{URI:gt,_E:void 0,map:wn,compact:n.compact,separate:n.separate,filter:function(s,u){return C(s,r(u))},filterMap:function(s,u){return C(s,i(u))},partition:function(s,u){return C(s,o(u))},partitionMap:function(s,u){return C(s,a(u))}}}function N3(e,t){var n=ua(Ca,Nx(e,t));return{URI:gt,_E:void 0,map:wn,ap:function(r,i){return C(r,n(i))},of:yr}}function q3(e){var t=uA(ka,e);return{URI:gt,_E:void 0,map:wn,alt:function(n,r){return C(n,t(r))}}}var vc={URI:gt,map:wn},kde=Qe(vc),fw={URI:gt,of:yr},Ly={URI:gt,map:wn,ap:Bs},V3=Lt(Ly),Mde=V3,Q3=jt(Ly),Lde=Q3,jde={URI:gt,map:wn,ap:Bs,of:yr},z3={URI:gt,map:wn,ap:aw},H3={URI:gt,map:wn,ap:aw,of:yr},er={URI:gt,map:wn,ap:Bs,chain:Ps},Ude={URI:gt,map:wn,ap:Bs,chain:Ps,of:yr},Bde={URI:gt,map:wn,ap:Bs,chain:Ps,of:yr,fromIO:Us},Pde={URI:gt,map:wn,ap:Bs,chain:Ps,of:yr,fromIO:Us,fromTask:rd},Dde={URI:gt,map:wn,ap:Bs,chain:Ps,of:yr,throwError:NA},Y3=At(er),jy=Y3,Wde={URI:gt,bimap:Oy,mapLeft:Fy},Kde={URI:gt,map:wn,alt:sw},od={URI:gt,fromReader:w3},Nde=mA(od),qde=gA(od),Vde=uc(od),G3=vA(od,er),Qde=G3,J3=yA(od,er),zde=J3,dw=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return I3(e.apply(void 0,t))}},Z3=function(e){return id(dw(e))},Hde=Z3,X3=function(e){return jy(dw(e))},Yde=X3,La={URI:gt,fromEither:x3},Gde=go(La),Jde=vo(La),Zde=Nu(La,er),eN=ca(La,er),Xde=eN,tN=la(La,er),epe=tN,tpe=ms(La),nN=qu(La,er),npe=nN,rpe=Ur(La),Uy={URI:gt,fromIO:Us},ipe=_o(Uy),ope=va(Uy,er),ape=ya(Uy,er),By={URI:gt,fromIO:Us,fromTask:rd},spe=cc(By),upe=Lf(By,er),cpe=jf(By,er);function lpe(e,t,n){return rN(e,t,n)}function rN(e,t,n){return function(r){return Vx(e(r),function(i){return t(i)(r)},function(i,o){return n(i,o)(r)})}}var fpe=yr(on),dpe=Bt(vc),iN=Pt(er),ppe=iN,oN=Ut(Ly),Ape=oN,pw=yr(Sn),aN=function(e){return H(sc(e),ac(zx(Ar)))},Aw=function(e){var t=aN(e);return function(n){return yt(n)?t(n):pw}},sN=function(e){return H(sc(e),ac(Yx(Ar)))},hw=function(e){var t=sN(e);return function(n){return yt(n)?t(n):pw}},hpe=Aw,uN=function(e){return Aw(function(t,n){return e(n)})},mpe=uN(N),gpe=hw,cN=function(e){return hw(function(t,n){return e(n)})},vpe=cN(N),ype={URI:gt,map:wn,of:yr,ap:Bs,chain:Ps,alt:sw,bimap:Oy,mapLeft:Fy,fromIO:Us,fromTask:rd,throwError:NA},bpe={URI:gt,map:wn,of:yr,ap:aw,chain:Ps,alt:sw,bimap:Oy,mapLeft:Fy,fromIO:Us,fromTask:rd,throwError:NA},Cpe=an(z3),Spe=oi(H3),_pe=function(e){return an(wx)(rA(e))};function Ipe(e){var t=N3(jA,e),n=q3(e);return{URI:gt,_E:void 0,map:wn,of:yr,chain:Ps,bimap:Oy,mapLeft:Fy,ap:t.ap,alt:n.alt,fromIO:Us,fromTask:rd,throwError:NA}}function Tpe(e,t){return e(t)()}const xpe=Object.freeze(Object.defineProperty({__proto__:null,Alt:Kde,ApT:pw,ApplicativePar:jde,ApplicativeSeq:H3,ApplyPar:Ly,ApplySeq:z3,Bifunctor:Wde,Chain:er,Do:fpe,FromEither:La,FromIO:Uy,FromReader:od,FromTask:By,Functor:vc,Monad:Ude,MonadIO:Bde,MonadTask:Pde,MonadThrow:Dde,Pointed:fw,URI:gt,alt:My,altW:W3,ap:lw,apFirst:V3,apFirstW:Mde,apS:oN,apSW:Ape,apSecond:Q3,apSecondW:Lde,apW:Rde,ask:Nde,asks:qde,asksReaderTaskEither:bde,asksReaderTaskEitherW:O3,bimap:uw,bind:iN,bindTo:dpe,bindW:ppe,bracket:lpe,bracketW:rN,chain:ky,chainEitherK:eN,chainEitherKW:Xde,chainFirst:Y3,chainFirstEitherK:tN,chainFirstEitherKW:epe,chainFirstIOK:ape,chainFirstReaderEitherK:$de,chainFirstReaderEitherKW:P3,chainFirstReaderK:J3,chainFirstReaderKW:zde,chainFirstReaderTaskK:Yde,chainFirstReaderTaskKW:X3,chainFirstTaskEitherK:wde,chainFirstTaskEitherKW:U3,chainFirstTaskK:cpe,chainFirstW:jy,chainIOEitherK:Tde,chainIOEitherKW:L3,chainIOK:ope,chainNullableK:vde,chainOptionK:Zde,chainReaderEitherK:Ede,chainReaderEitherKW:B3,chainReaderK:G3,chainReaderKW:Qde,chainReaderTaskK:Hde,chainReaderTaskKW:Z3,chainTaskEitherK:xde,chainTaskEitherKW:j3,chainTaskK:upe,chainW:id,filterOrElse:nN,filterOrElseW:npe,flap:kde,flatten:Ode,flattenW:D3,fold:dde,foldW:pde,fromEither:x3,fromEitherK:rpe,fromIO:Us,fromIOEither:tw,fromIOEitherK:M3,fromIOK:ipe,fromNullable:mde,fromNullableK:gde,fromOption:Gde,fromOptionK:Jde,fromPredicate:tpe,fromReader:w3,fromReaderEither:nw,fromReaderEitherK:ow,fromReaderK:Vde,fromReaderTaskK:dw,fromTask:rd,fromTaskEither:js,fromTaskEitherK:iw,fromTaskK:spe,getAltReaderTaskValidation:q3,getApplicativeReaderTaskValidation:N3,getApplyMonoid:Spe,getApplySemigroup:Cpe,getCompactable:K3,getFilterable:Fde,getOrElse:R3,getOrElseW:Ade,getReaderTaskValidation:Ipe,getSemigroup:_pe,left:Ry,leftIO:T3,leftReader:_3,leftReaderTask:lde,leftTask:S3,local:yde,map:KA,mapLeft:cw,match:E3,matchE:rw,matchEW:$3,matchW:fde,of:yr,orElse:F3,orElseFirst:k3,orElseFirstW:Sde,orElseW:Cde,orLeft:_de,readerTaskEither:ype,readerTaskEitherSeq:bpe,right:Jx,rightIO:ew,rightReader:Xx,rightReaderTask:I3,rightTask:Zx,run:Tpe,sequenceArray:mpe,sequenceSeqArray:vpe,swap:Ide,throwError:NA,toUnion:hde,traverseArray:uN,traverseArrayWithIndex:hpe,traverseReadonlyArrayWithIndex:Aw,traverseReadonlyArrayWithIndexSeq:hw,traverseReadonlyNonEmptyArrayWithIndex:aN,traverseReadonlyNonEmptyArrayWithIndexSeq:sN,traverseSeqArray:cN,traverseSeqArrayWithIndex:gpe},Symbol.toStringTag,{value:"Module"}));var lN={equals:function(e,t){return e===t}},fN={concat:function(e,t){return e+t}},dN="",wpe={concat:fN.concat,empty:dN},z={equals:lN.equals,compare:function(e,t){return e<t?-1:e>t?1:0}},Epe={show:function(e){return JSON.stringify(e)}},$pe=function(e){return typeof e=="string"},Rpe=function(e){return e.toUpperCase()},Ope=function(e){return e.toLowerCase()},Fpe=function(e,t){return function(n){return n.replace(e,t)}},kpe=function(e){return e.trim()},Mpe=function(e){return e.trimLeft()},Lpe=function(e){return e.trimRight()},jpe=function(e,t){return function(n){return n.slice(e,t)}},Upe=function(e){return e.length===0},Bpe=function(e){return e.length},Ppe=function(e){return function(t){var n=t.split(e);return yo(n)?n:[t]}},Dpe=function(e,t){return function(n){return n.includes(e,t)}},Wpe=function(e,t){return function(n){return n.startsWith(e,t)}},Kpe=function(e,t){return function(n){return n.endsWith(e,t)}};const Npe=Object.freeze(Object.defineProperty({__proto__:null,Eq:lN,Monoid:wpe,Ord:z,Semigroup:fN,Show:Epe,empty:dN,endsWith:Kpe,includes:Dpe,isEmpty:Upe,isString:$pe,replace:Fpe,size:Bpe,slice:jpe,split:Ppe,startsWith:Wpe,toLowerCase:Ope,toUpperCase:Rpe,trim:kpe,trimLeft:Mpe,trimRight:Lpe},Symbol.toStringTag,{value:"Module"}));var qpe=function(e){return Object.assign({},e)},Vpe=function(e){return Object.assign({},e)},pN=function(e){return Object.keys(e).length},fo=function(e){for(var t in e)if(pt.call(e,t))return!1;return!0},ad=function(e){return function(t){return Object.keys(t).sort(e.compare)}},Qpe=ad(z);function Py(e){if(typeof e=="function")return Py(z)(e);var t=ad(e);return function(n){return function(r){for(var i=[],o=0,a=t(r);o<a.length;o++){var s=a[o];i.push(n(s,r[s]))}return i}}}var mw=Py(z)(function(e,t){return[e,t]});function zpe(e){return function(t){var n=mw(t),r=n.length;return e.unfold(0,function(i){return i<r?de([n[i],i+1]):Ce})}}var gw=function(e,t){return function(n){if(pt.call(n,e)&&n[e]===t)return n;var r=Object.assign({},n);return r[e]=t,r}},na=function(e,t){return pt.call(t,e)};function vw(e){return function(t){if(!pt.call(t,e))return t;var n=Object.assign({},t);return delete n[e],n}}var Hpe=function(e,t){return function(n){if(!na(e,n))return Ce;if(n[e]===t)return de(n);var r=Object.assign({},n);return r[e]=t,de(r)}},Ype=function(e,t){return function(n){if(!na(e,n))return Ce;var r=t(n[e]);if(r===n[e])return de(n);var i=Object.assign({},n);return i[e]=r,de(i)}};function Gpe(e){var t=vw(e);return function(n){var r=_u(e,n);return Vt(r)?Ce:de([r.value,t(n)])}}function Dy(e){return function(t,n){if(n===void 0){var r=Dy(e);return function(o){return r(o,t)}}for(var i in t)if(!pt.call(n,i)||!e.equals(t[i],n[i]))return!1;return!0}}function _u(e,t){return t===void 0?function(n){return _u(e,n)}:pt.call(t,e)?de(t[e]):Ce}var qA={};function Wy(e){return function(t){var n={};for(var r in t)pt.call(t,r)&&(n[r]=e(r,t[r]));return n}}function yw(e){return Wy(function(t,n){return e(n)})}function Il(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(e.length===2)return Il(z).apply(void 0,e);var n=ad(e[0]);return function(r,i){return function(o){for(var a=r,s=n(o),u=s.length,c=0;c<u;c++){var l=s[c];a=i(l,a,o[l])}return a}}}function Tl(e){if("compare"in e){var t=ad(e);return function(n){return function(r){return function(i){for(var o=n.empty,a=t(i),s=a.length,u=0;u<s;u++){var c=a[u];o=n.concat(o,r(c,i[c]))}return o}}}}return Tl(z)(e)}function xl(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(e.length===2)return xl(z).apply(void 0,e);var n=ad(e[0]);return function(r,i){return function(o){for(var a=r,s=n(o),u=s.length,c=u-1;c>=0;c--){var l=s[c];a=i(l,o[l],a)}return a}}}var AN=function(e,t){var n;return n={},n[e]=t,n};function hN(e){var t=QA(z)(e);return function(n){return function(r){return t(r,n)}}}function Ky(e){var t=Ro(z)(e);return function(n){return function(r){return t(r,n)}}}function sd(e){return VA(z)(e)}var Jpe=function(e){var t=Ky(e);return function(n){return function(r){return e.map(C(r,t(n)),ja)}}},Zpe=function(e){var t=Ky(e);return function(n){return function(r){return e.map(C(r,t(n)),Ua)}}};function Ny(e){return function(t){var n={},r={};for(var i in t)if(pt.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;break}}return Oe(n,r)}}function qy(e){return function(t){var n={},r={};for(var i in t)if(pt.call(t,i)){var o=t[i];e(i,o)?r[i]=o:n[i]=o}return Oe(n,r)}}function Vy(e){return function(t){var n={};for(var r in t)if(pt.call(t,r)){var i=e(r,t[r]);It(i)&&(n[r]=i.value)}return n}}function Qy(e){return function(t){var n={},r=!1;for(var i in t)if(pt.call(t,i)){var o=t[i];e(i,o)?n[i]=o:r=!0}return r?n:t}}function mN(e,t){var n=bw(e,t);return function(r){return n(r,N)}}function bw(e,t){return function(n,r){return t.reduce(n,{},function(i,o){var a=r(o),s=a[0],u=a[1];return i[s]=pt.call(i,s)?e.concat(i[s],u):u,i})}}var Xpe=mw,eAe=function(e){for(var t={},n=0,r=e;n<r.length;n++){var i=r[n];t[i[0]]=i[1]}return t};function gN(e){return function(t){for(var n in t)if(!e(t[n]))return!1;return!0}}function vN(e){return function(t){for(var n in t)if(e(t[n]))return!0;return!1}}function Cw(e){return function(t,n){if(n===void 0){var r=Cw(e);return function(o){return r(t,o)}}for(var i in n)if(e.equals(n[i],t))return!0;return!1}}var Sw=function(e){return function(t){return function(n){if(fo(n))return t;if(fo(t))return n;var r={};for(var i in n)na(i,t)?r[i]=e.concat(n[i],t[i]):r[i]=n[i];for(var i in t)na(i,r)||(r[i]=t[i]);return r}}},_w=function(e){return function(t){return function(n){if(fo(n)||fo(t))return qA;var r={};for(var i in n)na(i,t)&&(r[i]=e.concat(n[i],t[i]));return r}}},Iw=function(e){return function(t){if(fo(t))return e;if(fo(e))return t;var n={};for(var r in t)na(r,e)||(n[r]=t[r]);for(var r in e)na(r,t)||(n[r]=e[r]);return n}},Dr=function(e,t){return C(e,yw(t))},yc=function(e,t){return C(e,Wy(t))},Wr=function(e){var t=Hd(e);return function(n,r,i){return C(n,t(r,i))}},Kr=function(e){return function(t){var n=Yd(e)(t);return function(r,i){return C(r,n(i))}}},Nr=function(e){var t=Gd(e);return function(n,r,i){return C(n,t(r,i))}},bc=function(e,t){return C(e,Tw(t))},Cc=function(e,t){return C(e,xw(t))},Sc=function(e,t){return C(e,ww(t))},_c=function(e,t){return C(e,Ew(t))},Ic=function(e){var t=Il(e);return function(n,r,i){return C(n,t(r,i))}},Tc=function(e){var t=Tl(e);return function(n){var r=t(n);return function(i,o){return C(i,r(o))}}},xc=function(e){var t=xl(e);return function(n,r,i){return C(n,t(r,i))}},zy=function(e,t){return C(e,Ny(t))},Hy=function(e,t){return C(e,qy(t))},Yy=function(e,t){return C(e,Vy(t))},Gy=function(e,t){return C(e,Qy(t))},Ro=function(e){var t=QA(e);return function(n){var r=t(n);return function(i,o){return r(i,H(Ar,o))}}},VA=function(e){var t=Ro(e);return function(n){var r=t(n);return function(i){return r(i,N)}}},QA=function(e){return function(t){var n=ad(e);return function(r,i){var o=n(r);if(o.length===0)return t.of(qA);for(var a=t.of({}),s=function(d){a=t.ap(t.map(a,function(p){return function(A){var m;return Object.assign({},p,(m={},m[d]=A,m))}}),i(d,r[d]))},u=0,c=o;u<c.length;u++){var l=c[u];s(l)}return a}}},Tw=function(e){return Qy(function(t,n){return e(n)})},xw=function(e){return Vy(function(t,n){return e(n)})},ww=function(e){return qy(function(t,n){return e(n)})},Ew=function(e){return Ny(function(t,n){return e(n)})};function Hd(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(e.length===1){var n=Il(e[0]);return function(r,i){return n(r,function(o,a,s){return i(a,s)})}}return Hd(z).apply(void 0,e)}function Yd(e){if("compare"in e){var t=Tl(e);return function(n){var r=t(n);return function(i){return r(function(o,a){return i(a)})}}}return Yd(z)(e)}function Gd(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(e.length===1){var n=xl(e[0]);return function(r,i){return n(r,function(o,a,s){return i(a,s)})}}return Gd(z).apply(void 0,e)}var ja=function(e){var t={};for(var n in e)if(pt.call(e,n)){var r=e[n];It(r)&&(t[n]=r.value)}return t},Ua=function(e){var t={},n={};for(var r in e)if(pt.call(e,r)){var i=e[r];nn(i)?t[r]=i.left:n[r]=i.right}return Oe(t,n)},En="ReadonlyRecord";function Sm(e){return"compare"in e?function(t){return{show:function(n){var r=Py(e)(function(i,o){return"".concat(JSON.stringify(i),": ").concat(t.show(o))})(n).join(", ");return r===""?"{}":"{ ".concat(r," }")}}}:Sm(z)(e)}function yN(e){var t=Dy(e);return ai(function(n,r){return t(n)(r)&&t(r)(n)})}function bN(e){return{concat:function(t,n){if(fo(t))return n;if(fo(n))return t;var r=Object.assign({},t);for(var i in n)pt.call(n,i)&&(r[i]=pt.call(t,i)?e.concat(t[i],n[i]):n[i]);return r},empty:qA}}var CN={URI:En,map:Dr},tAe=Qe(CN),nAe={URI:En,map:Dr,mapWithIndex:yc},rAe=function(e){return{URI:En,reduce:Wr(e),foldMap:Kr(e),reduceRight:Nr(e)}},iAe=function(e){return{URI:En,reduce:Wr(e),foldMap:Kr(e),reduceRight:Nr(e),reduceWithIndex:Ic(e),foldMapWithIndex:Tc(e),reduceRightWithIndex:xc(e)}},Jd={URI:En,compact:ja,separate:Ua},oAe={URI:En,map:Dr,compact:ja,separate:Ua,filter:bc,filterMap:Cc,partition:Sc,partitionMap:_c},aAe={URI:En,map:Dr,mapWithIndex:yc,compact:ja,separate:Ua,filter:bc,filterMap:Cc,partition:Sc,partitionMap:_c,filterMapWithIndex:Yy,filterWithIndex:Gy,partitionMapWithIndex:zy,partitionWithIndex:Hy},SN=function(e){return{URI:En,map:Dr,reduce:Wr(e),foldMap:Kr(e),reduceRight:Nr(e),traverse:Ro(e),sequence:VA(e)}},sAe=function(e){return{URI:En,map:Dr,mapWithIndex:yc,reduce:Wr(e),foldMap:Kr(e),reduceRight:Nr(e),reduceWithIndex:Ic(e),foldMapWithIndex:Tc(e),reduceRightWithIndex:xc(e),traverse:Ro(e),sequence:VA(e),traverseWithIndex:QA(e)}},uAe=function(e){var t=SN(e);return{URI:En,map:Dr,reduce:Wr(e),foldMap:Kr(e),reduceRight:Nr(e),traverse:t.traverse,sequence:t.sequence,compact:ja,separate:Ua,filter:bc,filterMap:Cc,partition:Sc,partitionMap:_c,wither:Pi(t,Jd),wilt:Bi(t,Jd)}},_N=function(e){var t=Sw(e);return{concat:function(n,r){return t(r)(n)}}},cAe=function(e){return{concat:_N(e).concat,empty:qA}},lAe=function(e){var t=_w(e);return{concat:function(n,r){return t(r)(n)}}},fAe=function(){return{concat:function(e,t){return Iw(t)(e)}}},dAe={URI:En,reduce:Wr(z),foldMap:Kr(z),reduceRight:Nr(z)},pAe={URI:En,reduce:Wr(z),foldMap:Kr(z),reduceRight:Nr(z),reduceWithIndex:Ic(z),foldMapWithIndex:Tc(z),reduceRightWithIndex:xc(z)},$w={URI:En,map:Dr,reduce:Wr(z),foldMap:Kr(z),reduceRight:Nr(z),traverse:Ro(z),sequence:sd},AAe={URI:En,map:Dr,mapWithIndex:yc,reduce:Wr(z),foldMap:Kr(z),reduceRight:Nr(z),reduceWithIndex:Ic(z),foldMapWithIndex:Tc(z),reduceRightWithIndex:xc(z),traverse:Ro(z),sequence:sd,traverseWithIndex:QA(z)},IN=Pi($w,Jd),TN=Bi($w,Jd),hAe={URI:En,map:Dr,reduce:Wr(z),foldMap:Kr(z),reduceRight:Nr(z),traverse:Ro(z),sequence:sd,compact:ja,separate:Ua,filter:bc,filterMap:Cc,partition:Sc,partitionMap:_c,wither:IN,wilt:TN},Rw=gw;function xN(e,t){return pt.call(t===void 0?this:t,e)}var mAe={URI:En,map:Dr,reduce:Wr(z),foldMap:Kr(z),reduceRight:Nr(z),traverse:Ro(z),sequence:sd,compact:ja,separate:Ua,filter:bc,filterMap:Cc,partition:Sc,partitionMap:_c,mapWithIndex:yc,reduceWithIndex:Ic(z),foldMapWithIndex:Tc(z),reduceRightWithIndex:xc(z),filterMapWithIndex:Yy,filterWithIndex:Gy,partitionMapWithIndex:zy,partitionWithIndex:Hy,traverseWithIndex:QA(z),wither:IN,wilt:TN};const gAe=Object.freeze(Object.defineProperty({__proto__:null,Compactable:Jd,Filterable:oAe,FilterableWithIndex:aAe,Foldable:dAe,FoldableWithIndex:pAe,Functor:CN,FunctorWithIndex:nAe,Traversable:$w,TraversableWithIndex:AAe,URI:En,Witherable:hAe,_filter:bc,_filterMap:Cc,_filterMapWithIndex:Yy,_filterWithIndex:Gy,_foldMap:Kr,_foldMapWithIndex:Tc,_map:Dr,_mapWithIndex:yc,_partition:Sc,_partitionMap:_c,_partitionMapWithIndex:zy,_partitionWithIndex:Hy,_reduce:Wr,_reduceRight:Nr,_reduceRightWithIndex:xc,_reduceWithIndex:Ic,_sequence:VA,_traverse:Ro,collect:Py,compact:ja,deleteAt:vw,difference:Iw,elem:Cw,empty:qA,every:gN,filter:Tw,filterMap:xw,filterMapWithIndex:Vy,filterWithIndex:Qy,flap:tAe,foldMap:Yd,foldMapWithIndex:Tl,fromEntries:eAe,fromFoldable:mN,fromFoldableMap:bw,fromRecord:qpe,getDifferenceMagma:fAe,getEq:yN,getFoldable:rAe,getFoldableWithIndex:iAe,getIntersectionSemigroup:lAe,getMonoid:bN,getShow:Sm,getTraversable:SN,getTraversableWithIndex:sAe,getUnionMonoid:cAe,getUnionSemigroup:_N,getWitherable:uAe,has:na,hasOwnProperty:xN,insertAt:Rw,intersection:_w,isEmpty:fo,isSubrecord:Dy,keys:Qpe,lookup:_u,map:yw,mapWithIndex:Wy,modifyAt:Ype,partition:ww,partitionMap:Ew,partitionMapWithIndex:Ny,partitionWithIndex:qy,pop:Gpe,readonlyRecord:mAe,reduce:Hd,reduceRight:Gd,reduceRightWithIndex:xl,reduceWithIndex:Il,separate:Ua,sequence:sd,singleton:AN,size:pN,some:vN,toEntries:Xpe,toReadonlyArray:mw,toRecord:Vpe,toUnfoldable:zpe,traverse:Ky,traverseWithIndex:hN,union:Sw,updateAt:Hpe,upsertAt:gw,wilt:Zpe,wither:Jpe},Symbol.toStringTag,{value:"Module"}));var vAe=function(e){return new Set(e)},yAe=function(e){return new Set([e])},wN=function(e){return function(t){for(var n=t.length,r=new Set,i=bn(e),o=0;o<n;o++){var a=t[o];i(a,r)||r.add(a)}return r}};function bAe(e){return new Set(e)}function CAe(e){var t=bn(e);return function(n){return function(r){var i=new Set;return r.forEach(function(o){var a=n(o);t(a,i)||i.add(a)}),i}}}function SAe(e){var t=bn(e);return function(n){return function(r){var i=new Set;return r.forEach(function(o){n(o).forEach(function(a){t(a,i)||i.add(a)})}),i}}}function Ow(e){return function(t){for(var n=t.values(),r,i=new Set;!(r=n.next()).done;){var o=r.value;e(o)&&i.add(o)}return i}}function _Ae(e){return function(t){for(var n=t.values(),r,i=new Set,o=new Set;!(r=n.next()).done;){var a=r.value;e(a)?i.add(a):o.add(a)}return Oe(o,i)}}function Fw(e){var t=bn(e);return function(n,r){if(r===void 0){var i=Fw(e);return function(a){return i(n,a)}}if(Zd(n))return r;if(Zd(r))return n;var o=new Set(n);return r.forEach(function(a){t(a,o)||o.add(a)}),o}}function kw(e){var t=bn(e);return function(n,r){if(r===void 0){var i=kw(e);return function(a){return i(a,n)}}if(Zd(n)||Zd(r))return Lw;var o=new Set;return n.forEach(function(a){t(a,r)&&o.add(a)}),o}}function IAe(e,t){return function(n){return function(r){for(var i=r.values(),o,a=new Set,s=new Set,u=bn(e),c=bn(t);!(o=i.next()).done;){var l=n(o.value);switch(l._tag){case"Left":u(l.left,a)||a.add(l.left);break;case"Right":c(l.right,s)||s.add(l.right);break}}return Oe(a,s)}}}function Mw(e){var t=bn(e);return function(n,r){if(r===void 0){var i=Mw(e);return function(o){return i(o,n)}}return Ow(function(o){return!t(o,r)})(n)}}function EN(e){var t=Jy(e);return function(n,r){return function(i){return t(i).reduce(r,n)}}}function $N(e,t){var n=Jy(e);return function(r){return function(i){return n(i).reduce(function(o,a){return t.concat(o,r(a))},t.empty)}}}var RN=function(e){var t=Jy(e);return function(n,r){return function(i){return t(i).reduceRight(function(o,a){return r(a,o)},n)}}};function ON(e){var t=bn(e);return function(n){return function(r){if(t(n)(r))return r;var i=new Set(r);return i.add(n),i}}}var FN=function(e){return function(t){return function(n){return Ow(function(r){return!e.equals(t,r)})(n)}}},TAe=function(e){var t=bn(e),n=FN(e),r=ON(e);return function(i){return function(o){return(t(i,o)?n:r)(i)(o)}}},xAe=function(e){return kN(e)(N)};function wAe(e,t){return function(n){var r=bn(e),i=bn(t),o=new Set,a=new Set;return n.forEach(function(s){switch(s._tag){case"Left":r(s.left,o)||o.add(s.left);break;case"Right":i(s.right,a)||a.add(s.right);break}}),Oe(o,a)}}function kN(e){var t=bn(e);return function(n){return function(r){var i=new Set;return r.forEach(function(o){var a=n(o);a._tag==="Some"&&!t(a.value,i)&&i.add(a.value)}),i}}}var Lw=new Set,Zd=function(e){return e.size===0},EAe=function(e){return e.size},jw=function(e){return function(t){for(var n=t.values(),r,i=!1;!i&&!(r=n.next()).done;)i=e(r.value);return i}};function Uw(e){return Vd(jw(Vd(e)))}function zA(e){var t=bn(e);return function(n,r){if(r===void 0){var i=zA(e);return function(o){return i(o,n)}}return Uw(function(o){return t(o,r)})(n)}}function bn(e){return function(t,n){if(n===void 0){var r=bn(e);return function(s){return r(t,s)}}for(var i=n.values(),o,a=!1;!a&&!(o=i.next()).done;)a=e.equals(t,o.value);return a}}var Jy=function(e){return function(t){var n=[];return t.forEach(function(r){return n.push(r)}),n.sort(e.compare)}},$Ae="ReadonlySet";function MN(e){return{show:function(t){var n=[];return t.forEach(function(r){n.push(e.show(r))}),"new Set([".concat(n.sort().join(", "),"])")}}}function LN(e){var t=zA(e);return ai(function(n,r){return t(n,r)&&t(r,n)})}var jN=function(e){return{concat:Fw(e)}},RAe=function(e){return{concat:jN(e).concat,empty:Lw}},OAe=function(e){return{concat:kw(e)}},FAe=function(e){return{concat:Mw(e)}},kAe=wN;const MAe=Object.freeze(Object.defineProperty({__proto__:null,URI:$Ae,chain:SAe,compact:xAe,difference:Mw,elem:bn,empty:Lw,every:Uw,filter:Ow,filterMap:kN,foldMap:$N,fromArray:kAe,fromReadonlyArray:wN,fromSet:vAe,getDifferenceMagma:FAe,getEq:LN,getIntersectionSemigroup:OAe,getShow:MN,getUnionMonoid:RAe,getUnionSemigroup:jN,insert:ON,intersection:kw,isEmpty:Zd,isSubset:zA,map:CAe,partition:_Ae,partitionMap:IAe,reduce:EN,reduceRight:RN,remove:FN,separate:wAe,singleton:yAe,size:EAe,some:jw,toReadonlyArray:Jy,toSet:bAe,toggle:TAe,union:Fw},Symbol.toStringTag,{value:"Module"}));function rn(e){return e[0]}function Mn(e){return e[1]}var LAe=function(e){return[Mn(e),rn(e)]};function Bw(e){return{URI:qr,_E:void 0,map:HA,ap:function(t,n){return[rn(t)(rn(n)),e.concat(Mn(t),Mn(n))]}}}var UN=function(e){return function(t){return[t,e.empty]}};function jAe(e){var t=Bw(e);return{URI:qr,_E:void 0,map:t.map,ap:t.ap,of:UN(e)}}function Pw(e){var t=Bw(e);return{URI:qr,_E:void 0,map:t.map,ap:t.ap,chain:function(n,r){var i=r(rn(n)),o=i[0],a=i[1];return[o,e.concat(Mn(n),a)]}}}function UAe(e){var t=Pw(e);return{URI:qr,_E:void 0,map:t.map,ap:t.ap,chain:t.chain,of:UN(e)}}function BAe(e){var t=function(r,i){for(var o=i(r),a=e.empty,s=rn(o);s._tag==="Left";)a=e.concat(a,Mn(o)),o=i(s.left),s=rn(o);return[s.right,e.concat(a,Mn(o))]},n=Pw(e);return{URI:qr,_E:void 0,map:n.map,ap:n.ap,chain:n.chain,chainRec:t}}var BN=function(e,t){return C(e,qN(t))},HA=function(e,t){return C(e,Nw(t))},PN=function(e,t,n){return C(e,NN(t,n))},DN=function(e,t){return C(e,qw(t))},WN=function(e,t){return C(e,Vw(t))},Dw=function(e,t,n){return C(e,Qw(t,n))},Ww=function(e){var t=zw();return function(n,r){return C(n,t(r))}},Kw=function(e,t,n){return C(e,Hw(t,n))},KN=function(e){var t=VN(e);return function(n,r){return C(n,t(r))}},NN=function(e,t){return function(n){return[t(rn(n)),e(Mn(n))]}},Nw=function(e){return function(t){return[e(rn(t)),Mn(t)]}},qw=function(e){return function(t){return[rn(t),e(Mn(t))]}},qN=function(e){return function(t){return[rn(t),Mn(e)]}},Vw=function(e){return function(t){return[e(t),Mn(t)]}},Zy=rn,PAe=Vw(N),Qw=function(e,t){return function(n){return t(e,rn(n))}},zw=function(){return function(e){return function(t){return e(rn(t))}}},Hw=function(e,t){return function(n){return t(rn(n),e)}},VN=function(e){return function(t){return function(n){return e.map(t(rn(n)),function(r){return[r,Mn(n)]})}}},Yw=function(e){return function(t){return e.map(rn(t),function(n){return[n,Mn(t)]})}},qr="ReadonlyTuple",QN={URI:qr,map:HA},DAe=Qe(QN),WAe={URI:qr,bimap:PN,mapLeft:DN},KAe={URI:qr,compose:BN},NAe={URI:qr,map:HA,extend:WN,extract:Zy},qAe={URI:qr,reduce:Dw,foldMap:Ww,reduceRight:Kw},VAe={URI:qr,map:HA,reduce:Dw,foldMap:Ww,reduceRight:Kw,traverse:KN,sequence:Yw},QAe=Nw,zAe=qw,HAe={URI:qr,compose:BN,map:HA,bimap:PN,mapLeft:DN,extract:Zy,extend:WN,reduce:Dw,foldMap:Ww,reduceRight:Kw,traverse:KN,sequence:Yw};const YAe=Object.freeze(Object.defineProperty({__proto__:null,Bifunctor:WAe,Comonad:NAe,Foldable:qAe,Functor:QN,Semigroupoid:KAe,Traversable:VAe,URI:qr,bimap:NN,compose:qN,duplicate:PAe,extend:Vw,extract:Zy,flap:DAe,foldMap:zw,fst:rn,getApplicative:jAe,getApply:Bw,getChain:Pw,getChainRec:BAe,getMonad:UAe,map:QAe,mapFst:Nw,mapLeft:zAe,mapSnd:qw,readonlyTuple:HAe,reduce:Qw,reduceRight:Hw,sequence:Yw,snd:Mn,swap:LAe,traverse:VN},Symbol.toStringTag,{value:"Module"}));var wl=function(){return wl=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},wl.apply(this,arguments)},GAe=pN,Iu=fo,Gw=function(e){return function(t){return Object.keys(t).sort(e.compare)}},JAe=Gw(z);function Jw(e){if(typeof e=="function")return Jw(z)(e);var t=Gw(e);return function(n){return function(r){for(var i=[],o=0,a=t(r);o<a.length;o++){var s=a[o];i.push(n(s,r[s]))}return i}}}var Zw=Jw(z)(function(e,t){return[e,t]});function ZAe(e){return function(t){var n=Zw(t),r=n.length;return e.unfold(0,function(i){return i<r?de([n[i],i+1]):Ce})}}var zN=gw,HN=na;function YN(e){return function(t){if(!pt.call(t,e))return t;var n=Object.assign({},t);return delete n[e],n}}var XAe=function(e,t){return GN(e,function(){return t})},GN=function(e,t){return function(n){if(!HN(e,n))return Ce;var r=Object.assign({},n);return r[e]=t(n[e]),de(r)}};function ehe(e){var t=YN(e);return function(n){var r=JN(e,n);return Vt(r)?Ce:de([r.value,t(n)])}}var the=Dy,JN=_u,nhe=Wy,rhe=yw;function ihe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.length===1?Il(e[0]):Il(z).apply(void 0,e)}function ohe(e){return"compare"in e?Tl(e):Tl(z)(e)}function ahe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.length===1?xl(e[0]):xl(z).apply(void 0,e)}var she=AN;function uhe(e){return hN(e)}function Xw(e){return Ky(e)}function YA(e){return sd(e)}var che=function(e){var t=Xw(e);return function(n){return function(r){return e.map(C(r,t(n)),Ds)}}},lhe=function(e){var t=Xw(e);return function(n){return function(r){return e.map(C(r,t(n)),Ws)}}},fhe=Ny;function dhe(e){return qy(e)}var phe=Vy;function Ahe(e){return Qy(e)}function ZN(e,t){return mN(e,t)}var hhe=Zw,mhe=function(e){return ZN(Eg(),b2)(e)};function ghe(e,t){return bw(e,t)}var vhe=gN,yhe=vN,bhe=Cw,XN=function(e){var t=Sw(e);return function(n){return function(r){return Iu(r)?wl({},n):Iu(n)?wl({},r):t(n)(r)}}},e6=function(e){return function(t){return function(n){return Iu(n)||Iu(t)?{}:_w(e)(t)(n)}}},t6=function(e){return function(t){return Iu(t)?wl({},e):Iu(e)?wl({},t):Iw(e)(t)}},Vi=Dr,GA=yc,Qi=Wr,zi=Kr,Hi=Nr,JA=bc,ZA=Cc,XA=Sc,eh=_c,th=Ic,nh=Tc,rh=xc,n6=zy,r6=Hy,i6=Yy,o6=Gy,ud=Ro,a6=VA,eE=function(e){return function(t){var n=Gw(e);return function(r,i){var o=n(r);if(o.length===0)return t.of({});for(var a=t.of({}),s=function(d){a=t.ap(t.map(a,function(p){return function(A){return p[d]=A,p}}),i(d,r[d]))},u=0,c=o;u<c.length;u++){var l=c[u];s(l)}return a}}},Che=Tw,She=xw,_he=ww,Ihe=Ew;function The(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.length===1?Hd(e[0]):Hd(z).apply(void 0,e)}function xhe(e){return"compare"in e?Yd(e):Yd(z)(e)}function whe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.length===1?Gd(e[0]):Gd(z).apply(void 0,e)}var Ds=ja,Ws=Ua,$n="Record";function Ehe(e){return"compare"in e?Sm(e):Sm(z)(e)}var $he=yN,Rhe=bN,s6={URI:$n,map:Vi},Ohe=Qe(s6),Fhe={URI:$n,map:Vi,mapWithIndex:GA},khe=function(e){return{URI:$n,reduce:Qi(e),foldMap:zi(e),reduceRight:Hi(e)}},Mhe=function(e){return{URI:$n,reduce:Qi(e),foldMap:zi(e),reduceRight:Hi(e),reduceWithIndex:th(e),foldMapWithIndex:nh(e),reduceRightWithIndex:rh(e)}},Xd={URI:$n,compact:Ds,separate:Ws},Lhe={URI:$n,map:Vi,compact:Ds,separate:Ws,filter:JA,filterMap:ZA,partition:XA,partitionMap:eh},jhe={URI:$n,map:Vi,mapWithIndex:GA,compact:Ds,separate:Ws,filter:JA,filterMap:ZA,partition:XA,partitionMap:eh,filterMapWithIndex:i6,filterWithIndex:o6,partitionMapWithIndex:n6,partitionWithIndex:r6},u6=function(e){return{URI:$n,map:Vi,reduce:Qi(e),foldMap:zi(e),reduceRight:Hi(e),traverse:ud(e),sequence:a6(e)}},Uhe=function(e){return{URI:$n,map:Vi,mapWithIndex:GA,reduce:Qi(e),foldMap:zi(e),reduceRight:Hi(e),reduceWithIndex:th(e),foldMapWithIndex:nh(e),reduceRightWithIndex:rh(e),traverse:ud(e),sequence:a6(e),traverseWithIndex:eE(e)}},Bhe=function(e){var t=u6(e);return{URI:$n,map:Vi,reduce:Qi(e),foldMap:zi(e),reduceRight:Hi(e),traverse:t.traverse,sequence:t.sequence,compact:Ds,separate:Ws,filter:JA,filterMap:ZA,partition:XA,partitionMap:eh,wither:Pi(t,Xd),wilt:Bi(t,Xd)}},c6=function(e){var t=XN(e);return{concat:function(n,r){return t(r)(n)}}},Phe=function(e){return{concat:c6(e).concat,empty:{}}},Dhe=function(e){var t=e6(e);return{concat:function(n,r){return t(r)(n)}}},Whe=function(){return{concat:function(e,t){return t6(t)(e)}}},Khe={URI:$n,reduce:Qi(z),foldMap:zi(z),reduceRight:Hi(z)},Nhe={URI:$n,reduce:Qi(z),foldMap:zi(z),reduceRight:Hi(z),reduceWithIndex:th(z),foldMapWithIndex:nh(z),reduceRightWithIndex:rh(z)},tE={URI:$n,map:Vi,reduce:Qi(z),foldMap:zi(z),reduceRight:Hi(z),traverse:ud(z),sequence:YA},qhe={URI:$n,map:Vi,mapWithIndex:GA,reduce:Qi(z),foldMap:zi(z),reduceRight:Hi(z),reduceWithIndex:th(z),foldMapWithIndex:nh(z),reduceRightWithIndex:rh(z),traverse:ud(z),sequence:YA,traverseWithIndex:eE(z)},l6=Pi(tE,Xd),f6=Bi(tE,Xd),Vhe={URI:$n,map:Vi,reduce:Qi(z),foldMap:zi(z),reduceRight:Hi(z),traverse:ud(z),sequence:YA,compact:Ds,separate:Ws,filter:JA,filterMap:ZA,partition:XA,partitionMap:eh,wither:l6,wilt:f6},Qhe={},zhe=zN,Hhe=xN,Yhe={URI:$n,map:Vi,reduce:Qi(z),foldMap:zi(z),reduceRight:Hi(z),traverse:ud(z),sequence:YA,compact:Ds,separate:Ws,filter:JA,filterMap:ZA,partition:XA,partitionMap:eh,mapWithIndex:GA,reduceWithIndex:th(z),foldMapWithIndex:nh(z),reduceRightWithIndex:rh(z),filterMapWithIndex:i6,filterWithIndex:o6,partitionMapWithIndex:n6,partitionWithIndex:r6,traverseWithIndex:eE(z),wither:l6,wilt:f6};const Ghe=Object.freeze(Object.defineProperty({__proto__:null,Compactable:Xd,Filterable:Lhe,FilterableWithIndex:jhe,Foldable:Khe,FoldableWithIndex:Nhe,Functor:s6,FunctorWithIndex:Fhe,Traversable:tE,TraversableWithIndex:qhe,URI:$n,Witherable:Vhe,collect:Jw,compact:Ds,deleteAt:YN,difference:t6,elem:bhe,empty:Qhe,every:vhe,filter:Che,filterMap:She,filterMapWithIndex:phe,filterWithIndex:Ahe,flap:Ohe,foldMap:xhe,foldMapWithIndex:ohe,fromEntries:mhe,fromFoldable:ZN,fromFoldableMap:ghe,getDifferenceMagma:Whe,getEq:$he,getFoldable:khe,getFoldableWithIndex:Mhe,getIntersectionSemigroup:Dhe,getMonoid:Rhe,getShow:Ehe,getTraversable:u6,getTraversableWithIndex:Uhe,getUnionMonoid:Phe,getUnionSemigroup:c6,getWitherable:Bhe,has:HN,hasOwnProperty:Hhe,insertAt:zhe,intersection:e6,isEmpty:Iu,isSubrecord:the,keys:JAe,lookup:JN,map:rhe,mapWithIndex:nhe,modifyAt:GN,partition:_he,partitionMap:Ihe,partitionMapWithIndex:fhe,partitionWithIndex:dhe,pop:ehe,record:Yhe,reduce:The,reduceRight:whe,reduceRightWithIndex:ahe,reduceWithIndex:ihe,separate:Ws,sequence:YA,singleton:she,size:GAe,some:yhe,toArray:Zw,toEntries:hhe,toUnfoldable:ZAe,traverse:Xw,traverseWithIndex:uhe,union:XN,updateAt:XAe,upsertAt:zN,wilt:lhe,wither:che},Symbol.toStringTag,{value:"Module"}));var Jhe=function(e){return function(t){return It(e(t))}},Zhe=function(e){return function(t){return uS(e(t))}},Xhe=function(){return function(e){return!0}},eme=function(e){return function(t){return!e(t)}},tme=function(e){return function(t){return function(n){return t(n)||e(n)}}},nme=function(e){return function(t){return function(n){return t(n)&&e(n)}}},rme=function(){return function(e){return!1}},ime=function(e){return function(t){return function(n){return t(n)&&e(n)}}};const ome=Object.freeze(Object.defineProperty({__proto__:null,and:nme,compose:ime,fromEitherK:Zhe,fromOptionK:Jhe,id:Xhe,not:eme,or:tme,zero:rme},Symbol.toStringTag,{value:"Module"}));var d6=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return{add:function(n,r){return e.map(function(i,o){return i.add(n[o],r[o])})},zero:e.map(function(n){return n.zero}),mul:function(n,r){return e.map(function(i,o){return i.mul(n[o],r[o])})},one:e.map(function(n){return n.one}),sub:function(n,r){return e.map(function(i,o){return i.sub(n[o],r[o])})}}},ame=function(e){return function(t){return e.sub(e.zero,t)}},sme=d6,ume=ZM;const cme=Object.freeze(Object.defineProperty({__proto__:null,getFunctionRing:ume,getTupleRing:sme,negate:ame,tuple:d6},Symbol.toStringTag,{value:"Module"})),lme=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var fme=oS;const dme=Object.freeze(Object.defineProperty({__proto__:null,getFunctionSemiring:fme},Symbol.toStringTag,{value:"Module"}));var pme=MN,Ame=LN;function hme(e){var t=lr(e);return function(n){return function(r){var i=new Set;return r.forEach(function(o){var a=n(o);t(a,i)||i.add(a)}),i}}}function mme(e){var t=lr(e);return function(n){return function(r){var i=new Set;return r.forEach(function(o){n(o).forEach(function(a){t(a,i)||i.add(a)})}),i}}}function nE(e){return function(t){for(var n=t.values(),r,i=new Set;!(r=n.next()).done;){var o=r.value;e(o)&&i.add(o)}return i}}function gme(e){return function(t){for(var n=t.values(),r,i=new Set,o=new Set;!(r=n.next()).done;){var a=r.value;e(a)?i.add(a):o.add(a)}return Oe(o,i)}}function rE(e){var t=lr(e);return function(n,r){if(r===void 0){var i=rE(e);return function(a){return i(n,a)}}if(ep(n))return r;if(ep(r))return n;var o=new Set(n);return r.forEach(function(a){t(a,o)||o.add(a)}),o}}function iE(e){var t=lr(e);return function(n,r){if(r===void 0){var i=iE(e);return function(a){return i(a,n)}}if(ep(n)||ep(r))return new Set;var o=new Set;return n.forEach(function(a){t(a,r)&&o.add(a)}),o}}function vme(e,t){return function(n){return function(r){for(var i=r.values(),o,a=new Set,s=new Set,u=lr(e),c=lr(t);!(o=i.next()).done;){var l=n(o.value);switch(l._tag){case"Left":u(l.left,a)||a.add(l.left);break;case"Right":c(l.right,s)||s.add(l.right);break}}return Oe(a,s)}}}function oE(e){var t=lr(e);return function(n,r){if(r===void 0){var i=oE(e);return function(o){return i(o,n)}}return nE(function(o){return!t(o,r)})(n)}}var p6=function(e){return{concat:rE(e)}},yme=function(e){return{concat:p6(e).concat,empty:new Set}},bme=function(e){return{concat:iE(e)}},Cme=function(e){return{concat:oE(e)}},Sme=EN,_me=$N,Ime=RN,Tme=function(e){return new Set([e])};function A6(e){var t=lr(e);return function(n){return function(r){if(t(n)(r))return r;var i=new Set(r);return i.add(n),i}}}var h6=function(e){return function(t){return function(n){return nE(function(r){return!e.equals(t,r)})(n)}}},xme=function(e){var t=lr(e),n=h6(e),r=A6(e);return function(i){return function(o){return(t(i,o)?n:r)(i)(o)}}},m6=function(e){return function(t){for(var n=t.length,r=new Set,i=lr(e),o=0;o<n;o++){var a=t[o];i(a,r)||r.add(a)}return r}},wme=function(e){return g6(e)(N)};function Eme(e,t){return function(n){var r=lr(e),i=lr(t),o=new Set,a=new Set;return n.forEach(function(s){switch(s._tag){case"Left":r(s.left,o)||o.add(s.left);break;case"Right":i(s.right,a)||a.add(s.right);break}}),Oe(o,a)}}function g6(e){var t=lr(e);return function(n){return function(r){var i=new Set;return r.forEach(function(o){var a=n(o);a._tag==="Some"&&!t(a.value,i)&&i.add(a.value)}),i}}}var $me=new Set,ep=function(e){return e.size===0},Rme=function(e){return e.size},Ome=jw,v6=Uw,Fme=zA,lr=bn,y6=function(e){return function(t){var n=[];return t.forEach(function(r){return n.push(r)}),n.sort(e.compare)}},kme=zA;const Mme=Object.freeze(Object.defineProperty({__proto__:null,chain:mme,compact:wme,difference:oE,elem:lr,empty:$me,every:v6,filter:nE,filterMap:g6,foldMap:_me,fromArray:m6,getDifferenceMagma:Cme,getEq:Ame,getIntersectionSemigroup:bme,getShow:pme,getUnionMonoid:yme,getUnionSemigroup:p6,insert:A6,intersection:iE,isEmpty:ep,isSubset:Fme,map:hme,partition:gme,partitionMap:vme,reduce:Sme,reduceRight:Ime,remove:h6,separate:Eme,singleton:Tme,size:Rme,some:Ome,subset:kme,toArray:y6,toggle:xme,union:rE},Symbol.toStringTag,{value:"Module"}));var b6=function(e){return{show:function(t){var n="{";for(var r in e)pt.call(e,r)&&(n+=" ".concat(r,": ").concat(e[r].show(t[r]),","));return n.length>1&&(n=n.slice(0,-1)+" "),n+="}",n}}},C6=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return{show:function(n){return"[".concat(n.map(function(r,i){return e[i].show(r)}).join(", "),"]")}}},Lme=C6,jme=b6,Ume={show:function(e){return JSON.stringify(e)}},Bme={show:function(e){return JSON.stringify(e)}},Pme={show:function(e){return JSON.stringify(e)}};const Dme=Object.freeze(Object.defineProperty({__proto__:null,getStructShow:jme,getTupleShow:Lme,showBoolean:Ume,showNumber:Pme,showString:Bme,struct:b6,tuple:C6},Symbol.toStringTag,{value:"Module"}));function aE(e){return function(t){return function(n){return e.of([t,n])}}}function sE(e){return function(t){return function(n){return function(r){return e.map(n(r),function(i){var o=i[0],a=i[1];return[t(o),a]})}}}}function uE(e){return function(t){return function(n){return function(r){return e.chain(n(r),function(i){var o=i[0],a=i[1];return e.map(t(a),function(s){var u=s[0],c=s[1];return[o(u),c]})})}}}}function cE(e){return function(t){return function(n){return function(r){return e.chain(n(r),function(i){var o=i[0],a=i[1];return t(o)(a)})}}}}function lE(e){return function(t){return function(n){return e.of(t(n))}}}function fE(e){return function(t){return function(n){return e.map(t,function(r){return[r,n]})}}}function dE(e){return function(t){return function(n){return e.map(n(t),function(r){var i=r[0];return i})}}}function pE(e){return function(t){return function(n){return e.map(n(t),Mn)}}}function Wme(e){var t=uE(e),n=sE(e),r=cE(e),i=dE(e),o=pE(e);return{map:function(a,s){return C(a,n(s))},ap:function(a,s){return C(a,t(s))},of:aE(e),chain:function(a,s){return C(a,r(s))},get:function(){return function(a){return e.of([a,a])}},put:function(a){return function(){return e.of([void 0,a])}},modify:function(a){return function(s){return e.of([void 0,a(s)])}},gets:function(a){return function(s){return e.of([a(s),s])}},fromState:lE(e),fromM:fE(e),evalState:function(a,s){return C(a,i(s))},execState:function(a,s){return C(a,o(s))}}}const Kme=Object.freeze(Object.defineProperty({__proto__:null,ap:uE,chain:cE,evaluate:dE,execute:pE,fromF:fE,fromState:lE,getStateM:Wme,map:sE,of:aE},Symbol.toStringTag,{value:"Module"}));var AE=function(e){return function(){return Ry(e)}},hE=aE(fw);function S6(e){return Yi(Zx(e))}function Nme(e){return Yi(S3(e))}function _6(e){return Yi(Xx(e))}function qme(e){return Yi(_3(e))}function I6(e){return Yi(ew(e))}function Vme(e){return Yi(T3(e))}var Qme=function(e){return H(e,Jx)},zme=function(e){return function(t){return Ry(e(t)[0])}},T6=xs(function(e){return AE(e)},hE),x6=_6,wc=I6,ih=S6,w6=lE(fw),E6=function(e){return Yi(js(e))},$6=function(e){return Yi(tw(e))},Hme=function(e){return Yi(nw(e))},Yi=fE(vc),Yme=function(e){return function(t){return H(t,pA(e))}},R6=function(e){return function(t){return function(n){return e(n)(t)(n)}}},Gme=R6,O6=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return $6(e.apply(void 0,t))}},F6=function(e){return function(t){return C(t,oh(O6(e)))}},Jme=F6,k6=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return E6(e.apply(void 0,t))}},M6=function(e){return function(t){return C(t,oh(k6(e)))}},Zme=M6,L6=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return Yi(e.apply(void 0,t))}},j6=function(e){return function(t){return C(t,oh(L6(e)))}},Xme=j6,Gi=function(e,t){return C(e,U6(t))},Ba=function(e,t){return C(e,gE(t))},Ec=function(e,t){return C(e,vE(t))},mE=function(e,t){return function(n){return C(e(n),My(function(){return t()(n)}))}},Xy=function(e,t,n){return function(r){return C(e(r),uw(t,function(i){var o=i[0],a=i[1];return[n(o),a]}))}},e0=function(e,t){return function(n){return C(e(n),cw(t))}},U6=sE(vc),ege=function(e,t){return function(n){return Xy(n,e,t)}},tge=function(e){return function(t){return e0(t,e)}},gE=uE(er),nge=gE,Oo=hE,vE=cE(er),oh=vE,B6=oh(N),rge=B6,P6=function(e){return function(t){return function(n){return C(t(n),W3(function(){return e()(n)}))}}},ige=P6,t0=AE,Jt="StateReaderTaskEither",yE={URI:Jt,map:Gi},oge=Qe(yE),age={URI:Jt,of:Oo},n0={URI:Jt,map:Gi,ap:Ba},D6=Lt(n0),sge=D6,W6=jt(n0),uge=W6,cge={URI:Jt,map:Gi,ap:Ba,of:Oo},br={URI:Jt,map:Gi,ap:Ba,chain:Ec},$c={URI:Jt,fromState:w6},lge=LP($c),fge=jP($c),dge=UP($c),pge=BP($c),Age=uT($c),hge=PP($c,br),mge={URI:Jt,map:Gi,ap:Ba,of:Oo,chain:Ec},gge={URI:Jt,map:Gi,ap:Ba,of:Oo,chain:Ec,fromIO:wc},vge={URI:Jt,map:Gi,ap:Ba,of:Oo,chain:Ec,fromIO:wc,fromTask:ih},yge={URI:Jt,map:Gi,ap:Ba,of:Oo,chain:Ec,throwError:t0},K6=At(br),bge=K6,Cge={URI:Jt,bimap:Xy,mapLeft:e0},Sge={URI:Jt,map:Gi,alt:mE},cd={URI:Jt,fromReader:x6},_ge=mA(cd),Ige=gA(cd),Tge=uc(cd),N6=vA(cd,br),xge=N6,q6=yA(cd,br),wge=q6,Pa={URI:Jt,fromEither:T6},Ege=go(Pa),$ge=vo(Pa),Rge=Nu(Pa,br),V6=ca(Pa,br),Oge=V6,Q6=la(Pa,br),Fge=Q6,kge=ms(Pa),z6=qu(Pa,br),Mge=z6,Lge=Ur(Pa),r0={URI:Jt,fromIO:wc},jge=_o(r0),Uge=va(r0,br),Bge=ya(r0,br),i0={URI:Jt,fromIO:wc,fromTask:ih},Pge=cc(i0),Dge=Lf(i0,br),Wge=jf(i0,br),Kge=dE(vc),Nge=pE(vc),qge=Bt(yE),H6=Pt(br),Vge=H6,Y6=Ut(n0),Qge=Y6,G6=function(e){return function(t){return function(n){return function(r){return function(){return zl(t).reduce(function(i,o,a){return i.then(function(s){return nn(s)?i:e(a+1,o)(s.right[1])(r)().then(function(u){if(nn(u))return u;var c=u.right,l=c[0],d=c[1];return s.right[0].push(l),s.right[1]=d,s})})},e(0,jr(t))(n)(r)().then(tc(function(i){var o=i[0],a=i[1];return[[o],a]})))}}}}},bE=function(e){var t=G6(e);return function(n){return yt(n)?t(n):Oo(Sn)}},zge=bE,J6=function(e){return bE(function(t,n){return e(n)})},Hge=J6(N),Yge={URI:Jt,map:Gi,of:Oo,ap:Ba,chain:Ec,bimap:Xy,mapLeft:e0,alt:mE,fromIO:wc,fromTask:ih,throwError:t0},Gge={URI:Jt,map:Gi,of:Oo,ap:Ba,chain:Ec,bimap:Xy,mapLeft:e0,alt:mE,fromIO:wc,fromTask:ih,throwError:t0},Jge=function(e,t){return C(e(t),KA(function(n){var r=n[0];return r}))},Zge=function(e,t){return C(e(t),KA(function(n){n[0];var r=n[1];return r}))};function Xge(e,t,n){return e(t)(n)()}const eve=Object.freeze(Object.defineProperty({__proto__:null,Alt:Sge,Applicative:cge,Apply:n0,Bifunctor:Cge,Chain:br,FromEither:Pa,FromIO:r0,FromReader:cd,FromState:$c,FromTask:i0,Functor:yE,Monad:mge,MonadIO:gge,MonadTask:vge,MonadThrow:yge,Pointed:age,URI:Jt,alt:ige,altW:P6,ap:gE,apFirst:D6,apFirstW:sge,apS:Y6,apSW:Qge,apSecond:W6,apSecondW:uge,apW:nge,ask:_ge,asks:Ige,asksStateReaderTaskEither:Gme,asksStateReaderTaskEitherW:R6,bimap:ege,bind:H6,bindTo:qge,bindW:Vge,chain:vE,chainEitherK:V6,chainEitherKW:Oge,chainFirst:K6,chainFirstEitherK:Q6,chainFirstEitherKW:Fge,chainFirstIOK:Bge,chainFirstReaderK:q6,chainFirstReaderKW:wge,chainFirstTaskK:Wge,chainFirstW:bge,chainIOEitherK:Jme,chainIOEitherKW:F6,chainIOK:Uge,chainOptionK:Rge,chainReaderK:N6,chainReaderKW:xge,chainReaderTaskEitherK:Xme,chainReaderTaskEitherKW:j6,chainStateK:hge,chainTaskEitherK:Zme,chainTaskEitherKW:M6,chainTaskK:Dge,chainW:oh,evalState:Jge,evaluate:Kge,execState:Zge,execute:Nge,filterOrElse:z6,filterOrElseW:Mge,flap:oge,flatten:rge,flattenW:B6,fromEither:T6,fromEitherK:Lge,fromIO:wc,fromIOEither:$6,fromIOEitherK:O6,fromIOK:jge,fromOption:Ege,fromOptionK:$ge,fromPredicate:kge,fromReader:x6,fromReaderEither:Hme,fromReaderK:Tge,fromReaderTaskEither:Yi,fromReaderTaskEitherK:L6,fromState:w6,fromStateK:Age,fromTask:ih,fromTaskEither:E6,fromTaskEitherK:k6,fromTaskK:Pge,get:lge,gets:pge,left:AE,leftIO:Vme,leftReader:qme,leftState:zme,leftTask:Nme,local:Yme,map:U6,mapLeft:tge,modify:dge,of:Oo,put:fge,right:hE,rightIO:I6,rightReader:_6,rightState:Qme,rightTask:S6,run:Xge,sequenceArray:Hge,stateReaderTaskEither:Yge,stateReaderTaskEitherSeq:Gge,throwError:t0,traverseArray:J6,traverseArrayWithIndex:zge,traverseReadonlyArrayWithIndex:bE,traverseReadonlyNonEmptyArrayWithIndex:G6},Symbol.toStringTag,{value:"Module"}));function tve(e){return function(t){return{peek:t.peek,pos:e}}}function nve(e){return function(t){return{peek:t.peek,pos:e(t.pos)}}}function rve(e){return function(t){return t.peek(e(t.pos))}}function ive(e){return function(t){return function(n){return e.map(t(n.pos),function(r){return n.peek(r)})}}}var Z6=function(e,t){return C(e,e5(t))},ove=function(e,t){return C(e,CE(t))},CE=function(e){return function(t){return{peek:function(n){return e({peek:t.peek,pos:n})},pos:t.pos}}},X6=function(e){return e.peek(e.pos)},ave=CE(N),e5=function(e){return function(t){return{peek:function(n){return e(t.peek(n))},pos:t.pos}}},SE="Store",t5={URI:SE,map:Z6},sve=Qe(t5),n5={URI:SE,map:Z6,extend:ove,extract:X6},uve=n5;const cve=Object.freeze(Object.defineProperty({__proto__:null,Comonad:n5,Functor:t5,URI:SE,duplicate:ave,experiment:ive,extend:CE,extract:X6,flap:sve,map:e5,peeks:rve,seek:tve,seeks:nve,store:uve},Symbol.toStringTag,{value:"Module"}));function _E(e,t){return function(n,r){return t.compose(e.second(r),e.first(n))}}function r5(e,t){var n=_E(e,t);return function(r,i){return t.compose(n(r,i),e.promap(t.id(),N,function(o){return[o,o]}))}}function lve(e){return _E(e,e)}function fve(e){return r5(e,e)}const dve=Object.freeze(Object.defineProperty({__proto__:null,fanOut:r5,fanout:fve,split:_E,splitStrong:lve},Symbol.toStringTag,{value:"Module"}));var pve=function(){return{concat:function(e,t){return Object.assign({},e,t)}}},Ave=function(e){return function(t){var n={};for(var r in t)pt.call(t,r)&&(n[r]=e[r](t[r]));return n}};const hve=Object.freeze(Object.defineProperty({__proto__:null,evolve:Ave,getAssignSemigroup:pve},Symbol.toStringTag,{value:"Module"}));var mve=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(l){try{c(r.next(l))}catch(d){a(d)}}function u(l){try{c(r.throw(l))}catch(d){a(d)}}function c(l){l.done?o(l.value):i(l.value).then(s,u)}c((r=r.apply(e,t||[])).next())})},gve=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(c){return function(l){return u([c,l])}}function u(c){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(l){c=[6,l],i=0}finally{r=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},i5=IA(Tn),vve=LT(Tn),yve=Bn,o5=jT(Tn),ah=function(e){return o0(Zn(e))},o0=zv(De),bve=Fs(vf),a5=UT(De),Cve=a5,IE=Jv(Jf),Sve=IE,s5=IE,_ve=s5,u5=Zv(un),Ive=u5,Tve=Hv(Tn),c5=function(e){return function(){return mve(void 0,void 0,void 0,function(){return gve(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,e().then(de)];case 1:return[2,t.sent()];case 2:return t.sent(),[2,Ce];case 3:return[2]}})})}},xve=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return c5(function(){return e.apply(void 0,t)})}},wve=Yv(Tn),Eve=kT(un),$ve=Gv(Tn),Rve=MT(un),TE=Xv(De),l5=ey(hc),Fo=i5,a0=Wf(un),Ove=a0(N),xE=ty(un),Fve=xE,s0=TA(Tn),kve=s0(),wE=Co(De,Gu),EE=ha(De,Gu,Af),f5=ma(De,pa),d5=ga(De,pa),p5=ws(De,pa),A5=Es(De,pa),Ai=function(e,t){return C(e,TE(t))},Rc=function(e,t){return C(e,l5(t))},u0=function(e,t){return C(e,a0(t))},h5=function(e,t){return C(e,xE(t))},Mve=function(e,t){return C(e,f5(t))},Lve=function(e,t){return C(e,d5(t))},jve=function(e,t){return C(e,p5(t))},Uve=function(e,t){return C(e,A5(t))},cn="TaskOption",$E={URI:cn,map:Ai},Bve=Qe($E),m5={URI:cn,of:Fo},c0={URI:cn,map:Ai,ap:Rc},Pve=Lt(c0),Dve=jt(c0),Wve={URI:cn,map:Ai,ap:Rc,of:Fo},g5=function(e,t){return C(e,a0(function(n){return C(t,TE(n))}))},Kve={URI:cn,map:Ai,ap:g5},Nve={URI:cn,map:Ai,ap:g5,of:Fo},Da={URI:cn,map:Ai,ap:Rc,chain:u0},qve=At(Da),Vve={URI:cn,map:Ai,alt:h5},v5={URI:cn,zero:s0},Qve=tf(v5,m5),zve={URI:cn,map:Ai,ap:Rc,of:Fo,alt:h5,zero:s0},Hve={URI:cn,map:Ai,ap:Rc,of:Fo,chain:u0},Yve={URI:cn,map:Ai,ap:Rc,of:Fo,chain:u0,fromIO:ah},Gve={URI:cn,map:Ai,ap:Rc,of:Fo,chain:u0,fromIO:ah,fromTask:o0},Jve={URI:cn,compact:wE,separate:EE},Zve={URI:cn,map:Ai,compact:wE,separate:EE,filter:Mve,filterMap:Lve,partition:jve,partitionMap:Uve},l0={URI:cn,fromIO:ah},Xve=_o(l0),eye=va(l0,Da),tye=ya(l0,Da),f0={URI:cn,fromEither:o5},nye=Ur(f0),rye=ca(f0,Da),iye=la(f0,Da),d0={URI:cn,fromIO:ah,fromTask:o0},oye=cc(d0),aye=Lf(d0,Da),sye=jf(d0,Da),uye=Fo(on),cye=Bt($E),lye=Pt(Da),fye=Ut(c0),RE=Fo(Sn),y5=function(e){return H(Zf(e),Fs(Fv(Ar)))},OE=function(e){var t=y5(e);return function(n){return yt(n)?t(n):RE}},b5=function(e){return function(t){return function(){return zl(t).reduce(function(n,r,i){return n.then(function(o){return Vt(o)?n:e(i+1,r)().then(function(a){return Vt(a)?a:(o.value.push(a.value),o)})})},e(0,jr(t))().then(bo($p)))}}},FE=function(e){var t=b5(e);return function(n){return yt(n)?t(n):RE}},dye=OE,C5=function(e){return OE(function(t,n){return e(n)})},pye=C5(N),Aye=FE,S5=function(e){return FE(function(t,n){return e(n)})},hye=S5(N);const mye=Object.freeze(Object.defineProperty({__proto__:null,Alt:Vve,Alternative:zve,ApT:RE,ApplicativePar:Wve,ApplicativeSeq:Nve,ApplyPar:c0,ApplySeq:Kve,Chain:Da,Compactable:Jve,Do:uye,Filterable:Zve,FromEither:f0,FromIO:l0,FromTask:d0,Functor:$E,Monad:Hve,MonadIO:Yve,MonadTask:Gve,Pointed:m5,Zero:v5,alt:xE,altW:Fve,ap:l5,apFirst:Pve,apS:fye,apSecond:Dve,bind:lye,bindTo:cye,chain:a0,chainEitherK:rye,chainFirst:qve,chainFirstEitherK:iye,chainFirstIOK:tye,chainFirstTaskK:sye,chainIOK:eye,chainNullableK:Eve,chainOptionK:Rve,chainTaskK:aye,compact:wE,filter:f5,filterMap:d5,flap:Bve,flatten:Ove,fold:Sve,foldW:_ve,fromEither:o5,fromEitherK:nye,fromIO:ah,fromIOK:Xve,fromNullable:Tve,fromNullableK:wve,fromOption:yve,fromOptionK:$ve,fromPredicate:vve,fromTask:o0,fromTaskEither:bve,fromTaskK:oye,getOrElse:u5,getOrElseW:Ive,guard:Qve,map:TE,match:a5,matchE:IE,matchEW:s5,matchW:Cve,none:kve,of:Fo,partition:p5,partitionMap:A5,separate:EE,sequenceArray:pye,sequenceSeqArray:hye,some:i5,traverseArray:C5,traverseArrayWithIndex:dye,traverseReadonlyArrayWithIndex:OE,traverseReadonlyArrayWithIndexSeq:FE,traverseReadonlyNonEmptyArrayWithIndex:y5,traverseReadonlyNonEmptyArrayWithIndexSeq:b5,traverseSeqArray:S5,traverseSeqArrayWithIndex:Aye,tryCatch:c5,tryCatchK:xve,zero:s0},Symbol.toStringTag,{value:"Module"}));var Ze=function(e){return e._tag==="Left"},Ft=function(e){return e._tag==="Right"};function Tu(e){return e._tag==="Both"}function gn(e){return{_tag:"Left",left:e}}function Cr(e){return{_tag:"Right",right:e}}function nt(e,t){return{_tag:"Both",left:e,right:t}}var kE=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)}}},gye=kE,us=kE,vye=us,_5=us(Cr,gn,function(e,t){return nt(t,e)});function yye(e,t){return{show:us(function(n){return"left(".concat(e.show(n),")")},function(n){return"right(".concat(t.show(n),")")},function(n,r){return"both(".concat(e.show(n),", ").concat(t.show(r),")")})}}function bye(e,t){return ai(function(n,r){return Ze(n)?Ze(r)&&e.equals(n.left,r.left):Ft(n)?Ft(r)&&t.equals(n.right,r.right):Tu(r)&&e.equals(n.left,r.left)&&t.equals(n.right,r.right)})}function I5(e,t){return{concat:function(n,r){return Ze(n)?Ze(r)?gn(e.concat(n.left,r.left)):Ft(r)?nt(n.left,r.right):nt(e.concat(n.left,r.left),r.right):Ft(n)?Ze(r)?nt(r.left,n.right):Ft(r)?Cr(t.concat(n.right,r.right)):nt(r.left,t.concat(n.right,r.right)):Ze(r)?nt(e.concat(n.left,r.left),n.right):Ft(r)?nt(n.left,t.concat(n.right,r.right)):nt(e.concat(n.left,r.left),t.concat(n.right,r.right))}}}var p0=function(e){return{URI:Vr,_E:void 0,map:Oc,ap:function(t,n){return Ze(t)?Ze(n)?gn(e.concat(t.left,n.left)):Ft(n)?gn(t.left):gn(e.concat(t.left,n.left)):Ft(t)?Ze(n)?gn(n.left):Ft(n)?Cr(t.right(n.right)):nt(n.left,t.right(n.right)):Ze(n)?gn(e.concat(t.left,n.left)):Ft(n)?nt(t.left,t.right(n.right)):nt(e.concat(t.left,n.left),t.right(n.right))}}};function Cye(e){var t=p0(e);return{URI:Vr,_E:void 0,map:Oc,ap:t.ap,of:sh}}function T5(e){var t=p0(e),n=function(r,i){if(Ze(r))return r;if(Ft(r))return i(r.right);var o=i(r.right);return Ze(o)?gn(e.concat(r.left,o.left)):Ft(o)?nt(r.left,o.right):nt(e.concat(r.left,o.left),o.right)};return{URI:Vr,_E:void 0,map:Oc,ap:t.ap,chain:n}}function Sye(e){var t=T5(e);return{URI:Vr,_E:void 0,map:Oc,of:sh,ap:t.ap,chain:t.chain,throwError:gn}}function _ye(e){return Ze(e)?de(e.left):Ft(e)?Ce:de(e.left)}function Iye(e){return Ze(e)?Ce:(Ft(e),de(e.right))}function Tye(e){return function(t){return Vt(t)?gn(e):nt(e,t.value)}}function xye(e){return function(t){return Vt(t)?Cr(e):nt(t.value,e)}}function wye(e){return Ze(e)?de(e.left):Ce}function Eye(e){return Ft(e)?de(e.right):Ce}var $ye=function(e,t){return Vt(e)?Vt(t)?Ce:de(Cr(t.value)):Vt(t)?de(gn(e.value)):de(nt(e.value,t.value))},Oc=function(e,t){return C(e,PE(t))},x5=function(e,t,n){return C(e,UE(t,n))},w5=function(e,t){return C(e,BE(t))},ME=function(e,t,n){return C(e,$5(t,n))},LE=function(e){var t=R5(e);return function(n,r){return C(n,t(r))}},jE=function(e,t,n){return C(e,O5(t,n))},E5=function(e){var t=F5(e);return function(n,r){return C(n,t(r))}},UE=function(e,t){return function(n){return Ze(n)?gn(e(n.left)):Ft(n)?Cr(t(n.right)):nt(e(n.left),t(n.right))}},BE=function(e){return function(t){return Ze(t)?gn(e(t.left)):Tu(t)?nt(e(t.left),t.right):t}},PE=function(e){return function(t){return Ze(t)?t:Ft(t)?Cr(e(t.right)):nt(t.left,e(t.right))}},$5=function(e,t){return function(n){return Ze(n)?e:t(e,n.right)}},R5=function(e){return function(t){return function(n){return Ze(n)?e.empty:t(n.right)}}},O5=function(e,t){return function(n){return Ze(n)?e:t(n.right,e)}},F5=function(e){return function(t){return function(n){return Ze(n)?e.of(n):Ft(n)?e.map(t(n.right),Cr):e.map(t(n.right),function(r){return nt(n.left,r)})}}},DE=function(e){return function(t){return Ze(t)?e.of(t):Ft(t)?e.map(t.right,Cr):e.map(t.right,function(n){return nt(t.left,n)})}},sh=Cr,Vr="These",WE={URI:Vr,map:Oc},Rye=Qe(WE),Oye={URI:Vr,of:sh},Fye={URI:Vr,bimap:x5,mapLeft:w5},kye={URI:Vr,fromThese:N},Mye={URI:Vr,reduce:ME,foldMap:LE,reduceRight:jE},Lye={URI:Vr,map:Oc,reduce:ME,foldMap:LE,reduceRight:jE,traverse:E5,sequence:DE},KE={URI:Vr,fromEither:N},jye=go(KE),Uye=vo(KE),Bye=function(e){return function(t){return function(n){return Ze(n)?!1:e.equals(t,n.right)}}},Pye=function(e){return function(t){return Ze(t)?!1:e(t.right)}},NE=function(e,t){return function(n){return Ze(n)?[n.left,t()]:Ft(n)?[e(),n.right]:[n.left,n.right]}},Dye=function(e,t){return NE(function(){return e},function(){return t})},k5=sh(Sn),qE=function(e){return function(t){return function(n){var r=Ce,i=t(0,jr(n));if(Ze(i))return i;Tu(i)&&(r=de(i.left));for(var o=[i.right],a=1;a<n.length;a++){var s=t(a,n[a]);if(Ze(s))return s;Tu(s)&&(r=Vt(r)?de(s.left):de(e.concat(r.value,s.left))),o.push(s.right)}return Vt(r)?Cr(o):nt(r.value,o)}}},Wye=function(e){return function(t){var n=qE(e)(t);return function(r){return yt(r)?n(r):k5}}},Kye={URI:Vr,map:Oc,bimap:x5,mapLeft:w5,reduce:ME,foldMap:LE,reduceRight:jE,traverse:E5,sequence:DE};const Nye=Object.freeze(Object.defineProperty({__proto__:null,ApT:k5,Bifunctor:Fye,Foldable:Mye,FromEither:KE,FromThese:kye,Functor:WE,Pointed:Oye,Traversable:Lye,URI:Vr,bimap:UE,both:nt,elem:Bye,exists:Pye,flap:Rye,fold:vye,foldMap:R5,foldW:gye,fromOption:jye,fromOptionK:Uye,fromOptions:$ye,getApplicative:Cye,getApply:p0,getChain:T5,getEq:bye,getLeft:_ye,getLeftOnly:wye,getMonad:Sye,getRight:Iye,getRightOnly:Eye,getSemigroup:I5,getShow:yye,isBoth:Tu,isLeft:Ze,isRight:Ft,left:gn,leftOrBoth:Tye,map:PE,mapLeft:BE,match:us,matchW:kE,of:sh,reduce:$5,reduceRight:O5,right:Cr,rightOrBoth:xye,sequence:DE,swap:_5,these:Kye,toTuple:Dye,toTuple2:NE,traverse:F5,traverseReadonlyArrayWithIndex:Wye,traverseReadonlyNonEmptyArrayWithIndex:qE},Symbol.toStringTag,{value:"Module"}));function _m(e){return H(Cr,e.of)}function A0(e){return H(gn,e.of)}function VE(e){return H(nt,e.of)}function QE(e){return function(t){return e.map(t,Cr)}}function zE(e){return function(t){return e.map(t,gn)}}function HE(e){return Hl(e,WE)}function YE(e,t){return ua(e,p0(t))}function GE(e,t){var n=A0(e);return function(r){return function(i){return e.chain(i,us(n,r,function(o,a){return e.map(r(a),us(function(s){return gn(t.concat(o,s))},function(s){return nt(o,s)},function(s,u){return nt(t.concat(o,s),u)}))}))}}}function JE(e){return function(t,n){return function(r){return e.map(r,UE(t,n))}}}function ZE(e){return function(t){return function(n){return e.map(n,BE(t))}}}function M5(e){return function(t,n,r){return function(i){return e.map(i,us(t,n,r))}}}function XE(e){return function(t,n,r){return function(i){return e.chain(i,us(t,n,r))}}}function e$(e){return function(t){return e.map(t,_5)}}function t$(e){return function(t,n){return function(r){return e.map(r,NE(t,n))}}}function qye(e){var t=HE(e),n=JE(e),r=ZE(e),i=XE(e),o=t$(e),a=_m(e),s=function(u,c){return C(u,t(c))};return{map:s,bimap:function(u,c,l){return C(u,n(c,l))},mapLeft:function(u,c){return C(u,r(c))},fold:function(u,c,l,d){return C(u,i(c,l,d))},swap:e$(e),rightM:QE(e),leftM:zE(e),left:A0(e),right:_m(e),both:VE(e),toTuple:function(u,c,l){return C(u,o(function(){return c},function(){return l}))},getMonad:function(u){var c=YE(e,u),l=GE(e,u);return{_E:void 0,map:s,of:a,ap:function(d,p){return C(d,c(p))},chain:function(d,p){return C(d,l(p))}}}}}const Vye=Object.freeze(Object.defineProperty({__proto__:null,ap:YE,bimap:JE,both:VE,chain:GE,getTheseM:qye,left:A0,leftF:zE,map:HE,mapLeft:ZE,match:M5,matchE:XE,right:_m,rightF:QE,swap:e$,toTuple2:t$},Symbol.toStringTag,{value:"Module"}));var Qye=A0(Tn),L5=_m(Tn),zye=VE(Tn),n$=QE(De),j5=zE(De),U5=H(Zn,n$),Hye=H(Zn,j5),B5=Bn,P5=Bn,h0=U5,Yye=Zn,r$=n$,D5=M5(De),Gye=D5,W5=XE(un),K5=W5,N5=K5,Jye=N5,Zye=e$(De),Fc=function(e,t){return C(e,q5(t))},i$=function(e,t,n){return C(e,V5(t,n))},o$=function(e,t){return C(e,Q5(t))},q5=HE(De),V5=JE(De),Q5=ZE(De),uh=L5,tr="TaskThese",a$=function(e,t){var n=YE(e,t);return{URI:tr,_E:void 0,map:Fc,ap:function(r,i){return C(r,n(i))}}};function z5(e,t){var n=a$(e,t).ap;return{URI:tr,_E:void 0,map:Fc,ap:n,of:uh}}function H5(e){var t=a$(jA,e),n=GE(un,e);return{URI:tr,_E:void 0,map:Fc,ap:t.ap,chain:function(r,i){return C(r,n(i))}}}function Xye(e){var t=z5(jA,e),n=H5(e);return{URI:tr,_E:void 0,map:Fc,ap:t.ap,of:uh,chain:n.chain,fromIO:h0,fromTask:r$}}var Y5={URI:tr,map:Fc},e0e=Qe(Y5),t0e={URI:tr,of:uh},n0e={URI:tr,bimap:i$,mapLeft:o$},m0={URI:tr,fromEither:B5},r0e=go(m0),i0e=vo(m0),o0e=ms(m0),G5={URI:tr,fromThese:P5},a0e=DP(G5),J5={URI:tr,fromIO:h0},s0e=_o(J5),Z5={URI:tr,fromIO:h0,fromTask:r$},u0e=cc(Z5),X5=t$(De),s$=uh(Sn),e4=function(e){var t=qE(e);return function(n){return H(Zf(n),Fs(t(Ar)))}},c0e=function(e){return function(t){var n=e4(e)(t);return function(r){return yt(r)?n(r):s$}}},t4=function(e){return function(t){return function(n){return function(){return zl(n).reduce(function(r,i,o){return r.then(function(a){return Ze(a)?r:t(o+1,i)().then(function(s){if(Ze(s))return s;if(Tu(s)){var u=a.right;return u.push(s.right),Tu(a)?nt(e.concat(a.left,s.left),u):nt(s.left,u)}return a.right.push(s.right),a})})},t(0,jr(n))().then(PE($p)))}}}},l0e=function(e){return function(t){var n=t4(e)(t);return function(r){return yt(r)?n(r):s$}}},f0e={URI:tr,map:Fc},d0e={URI:tr,bimap:i$,mapLeft:o$},p0e=function(e,t){return X5(function(){return e},function(){return t})},A0e={URI:tr,map:Fc,bimap:i$,mapLeft:o$},h0e=function(e,t){return an(vy)(I5(e,t))};const m0e=Object.freeze(Object.defineProperty({__proto__:null,ApT:s$,Bifunctor:n0e,FromEither:m0,FromIO:J5,FromTask:Z5,FromThese:G5,Functor:Y5,Pointed:t0e,URI:tr,bifunctorTaskThese:d0e,bimap:V5,both:zye,flap:e0e,fold:K5,foldW:Jye,fromEither:B5,fromIO:h0,fromIOEither:Yye,fromIOK:s0e,fromOption:r0e,fromOptionK:i0e,fromPredicate:o0e,fromTask:r$,fromTaskK:u0e,fromThese:P5,fromTheseK:a0e,functorTaskThese:f0e,getApplicative:z5,getApply:a$,getChain:H5,getMonad:Xye,getSemigroup:h0e,left:Qye,leftIO:Hye,leftTask:j5,map:q5,mapLeft:Q5,match:D5,matchE:W5,matchEW:N5,matchW:Gye,of:uh,right:L5,rightIO:U5,rightTask:n$,swap:Zye,taskThese:A0e,toTuple:p0e,toTuple2:X5,traverseReadonlyArrayWithIndex:c0e,traverseReadonlyArrayWithIndexSeq:l0e,traverseReadonlyNonEmptyArrayWithIndex:e4,traverseReadonlyNonEmptyArrayWithIndexSeq:t4},Symbol.toStringTag,{value:"Module"}));function g0e(e,t){return function(n){return n(t(n(e.empty)))}}function v0e(e){return function(t){return[e(t),t]}}function y0e(e){return function(t){return function(n){return[t(n),e(n)]}}}function b0e(e){return function(t){return function(n){return t(e(n))}}}function C0e(e){function t(r,i){return function(o){return i(function(a){return r(e.concat(o,a))})}}function n(r){return r(e.empty)}return{URI:u$,_E:void 0,map:n4,extend:t,extract:n}}var n4=function(e,t){return C(e,r4(t))},r4=function(e){return function(t){return function(n){return e(t(n))}}},u$="Traced",c$={URI:u$,map:n4},S0e=Qe(c$),_0e=c$;const I0e=Object.freeze(Object.defineProperty({__proto__:null,Functor:c$,URI:u$,censor:b0e,flap:S0e,getComonad:C0e,listen:v0e,listens:y0e,map:r4,traced:_0e,tracks:g0e},Symbol.toStringTag,{value:"Module"}));function i4(e,t){return function(n){var r=e.traverse(n),i=t.traverse(n);return function(o){return function(a){return r(a,function(s){return i(s,o)})}}}}function o4(e,t){return function(n){var r=e.sequence(n),i=t.sequence(n);return function(o){return r(e.map(o,i))}}}function T0e(e,t){var n=Yl(e,t).map,r=zI(e,t),i=i4(e,t),o=o4(e,t);return{map:n,reduce:r.reduce,foldMap:r.foldMap,reduceRight:r.reduceRight,traverse:function(a){var s=i(a);return function(u,c){return C(u,s(c))}},sequence:function(a){var s=o(a);return function(u){return C(u,s)}}}}const x0e=Object.freeze(Object.defineProperty({__proto__:null,getTraversableComposition:T0e,sequence:o4,traverse:i4},Symbol.toStringTag,{value:"Module"})),w0e=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function a4(e,t){return t===void 0&&(t=[]),{value:e,forest:t}}function E0e(e){var t=function(n){return ss(n.forest)?"make(".concat(e.show(n.value),")"):"make(".concat(e.show(n.value),", [").concat(n.forest.map(t).join(", "),"])")};return{show:t}}function $0e(e){var t,n=ai(function(r,i){return e.equals(r.value,i.value)&&t.equals(r.forest,i.forest)});return t=m2(n),n}var s4=function(e,t){for(var n="",r=t.length,i,o=0;o<r;o++){i=t[o];var a=o===r-1;n+=e+(a?"└":"├")+"─ "+i.value,n+=s4(e+(r>1&&!a?"│ ":" "),i.forest)}return n};function u4(e){return s4(`
29
- `,e)}function R0e(e){return e.value+u4(e.forest)}function c4(e,t){var n=t(e),r=n[0],i=n[1];return{value:r,forest:l4(i,t)}}function l4(e,t){return e.map(function(n){return c4(n,t)})}function f4(e){var t=d4(e);return function(n,r){return e.chain(r(n),function(i){var o=i[0],a=i[1];return e.map(t(a,r),function(s){return{value:o,forest:s}})})}}function d4(e){var t=Cv(e);return function(n,r){return C(n,t(function(i){return f4(e)(i,r)}))}}function O0e(e){var t=function(n){return e(n.value,n.forest.map(t))};return t}var Ks=function(e,t){return C(e,v0(t))},ld=function(e,t){return C(e,ch(function(n){return C(t,v0(n))}))},l$=function(e,t){return C(e,ch(t))},f$=function(e,t,n){return C(e,y0(t,n))},d$=function(e){var t=h4(e);return function(n,r){return C(n,t(r))}},p$=function(e,t,n){return C(e,A$(t,n))},p4=function(e,t){return C(e,g0(t))},A4=function(e){var t=m$(e);return function(n,r){return C(n,t(r))}},F0e=function(e){return function(t){return ld(t,e)}},ch=function(e){return function(t){var n=e(t.value),r=n.value,i=n.forest,o=cI().concat;return{value:r,forest:o(i,t.forest.map(ch(e)))}}},g0=function(e){return function(t){return{value:e(t),forest:t.forest.map(g0(e))}}},k0e=g0(N),M0e=ch(N),v0=function(e){return function(t){return{value:e(t.value),forest:t.forest.map(v0(e))}}},y0=function(e,t){return function(n){for(var r=t(e,n.value),i=n.forest.length,o=0;o<i;o++)r=C(n.forest[o],y0(r,t));return r}},h4=function(e){return function(t){return y0(e.empty,function(n,r){return e.concat(n,t(r))})}},A$=function(e,t){return function(n){for(var r=e,i=n.forest.length,o=i-1;o>=0;o--)r=C(n.forest[o],A$(r,t));return t(n.value,r)}},h$=function(e){return e.value},m$=function(e){var t=Cv(e),n=function(r){return function(i){return e.ap(e.map(r(i.value),function(o){return function(a){return{value:o,forest:a}}}),C(i.forest,t(n(r))))}};return n},g$=function(e){return m$(e)(N)},fd=function(e){return a4(e)},Ji="Tree",v$={URI:Ji,map:Ks},L0e=Qe(v$),j0e={URI:Ji,of:fd},b0={URI:Ji,map:Ks,ap:ld},U0e=Lt(b0),B0e=jt(b0),P0e={URI:Ji,map:Ks,ap:ld,of:fd},y$={URI:Ji,map:Ks,ap:ld,chain:l$},D0e={URI:Ji,map:Ks,ap:ld,of:fd,chain:l$},W0e=At(y$),K0e={URI:Ji,reduce:f$,foldMap:d$,reduceRight:p$},N0e={URI:Ji,map:Ks,reduce:f$,foldMap:d$,reduceRight:p$,traverse:A4,sequence:g$},q0e={URI:Ji,map:Ks,extend:p4,extract:h$},V0e=fd(on),Q0e=Bt(v$),z0e=Pt(y$),H0e=Ut(b0);function Y0e(e){var t=function(n,r){return e.equals(n,r.value)||r.forest.some(function(i){return t(n,i)})};return t}var m4=function(e){return function(t){return e(t.value)||t.forest.some(m4(e))}},G0e={URI:Ji,map:Ks,of:fd,ap:ld,chain:l$,reduce:f$,foldMap:d$,reduceRight:p$,traverse:A4,sequence:g$,extract:h$,extend:p4};const J0e=Object.freeze(Object.defineProperty({__proto__:null,Applicative:P0e,Apply:b0,Chain:y$,Comonad:q0e,Do:V0e,Foldable:K0e,Functor:v$,Monad:D0e,Pointed:j0e,Traversable:N0e,URI:Ji,ap:F0e,apFirst:U0e,apS:H0e,apSecond:B0e,bind:z0e,bindTo:Q0e,chain:ch,chainFirst:W0e,drawForest:u4,drawTree:R0e,duplicate:k0e,elem:Y0e,exists:m4,extend:g0,extract:h$,flap:L0e,flatten:M0e,fold:O0e,foldMap:h4,getEq:$0e,getShow:E0e,make:a4,map:v0,of:fd,reduce:y0,reduceRight:A$,sequence:g$,traverse:m$,tree:G0e,unfoldForest:l4,unfoldForestM:d4,unfoldTree:c4,unfoldTreeM:f4},Symbol.toStringTag,{value:"Module"}));var kr=rn,fr=Mn,Z0e=function(e){return[fr(e),kr(e)]};function b$(e){return{URI:Qr,_E:void 0,map:lh,ap:function(t,n){return[kr(t)(kr(n)),e.concat(fr(t),fr(n))]}}}var g4=function(e){return function(t){return[t,e.empty]}};function X0e(e){var t=b$(e);return{URI:Qr,_E:void 0,map:t.map,ap:t.ap,of:g4(e)}}function C$(e){var t=b$(e);return{URI:Qr,_E:void 0,map:t.map,ap:t.ap,chain:function(n,r){var i=r(kr(n)),o=i[0],a=i[1];return[o,e.concat(fr(n),a)]}}}function ebe(e){var t=C$(e);return{URI:Qr,_E:void 0,map:t.map,ap:t.ap,chain:t.chain,of:g4(e)}}function tbe(e){var t=function(r,i){for(var o=i(r),a=e.empty,s=kr(o);s._tag==="Left";)a=e.concat(a,fr(o)),o=i(s.left),s=kr(o);return[s.right,e.concat(a,fr(o))]},n=C$(e);return{URI:Qr,_E:void 0,map:n.map,ap:n.ap,chain:n.chain,chainRec:t}}var v4=function(e,t){return C(e,I4(t))},lh=function(e,t){return C(e,T$(t))},y4=function(e,t,n){return C(e,_4(t,n))},b4=function(e,t){return C(e,x$(t))},C4=function(e,t){return C(e,w$(t))},S$=function(e,t,n){return C(e,x4(t,n))},_$=function(e){var t=T4();return function(n,r){return C(n,t(r))}},I$=function(e,t,n){return C(e,w4(t,n))};function S4(e){var t=E4(e);return function(n,r){return C(n,t(r))}}var _4=function(e,t){return function(n){return[t(kr(n)),e(fr(n))]}},T$=function(e){return function(t){return[e(kr(t)),fr(t)]}},x$=function(e){return function(t){return[kr(t),e(fr(t))]}},I4=function(e){return function(t){return[kr(t),fr(e)]}},w$=function(e){return function(t){return[e(t),fr(t)]}},nbe=w$(N),E$=Zy,T4=zw,x4=Qw,w4=Hw,E4=function(e){return function(t){return function(n){return e.map(t(kr(n)),function(r){return[r,fr(n)]})}}},$$=function(e){return function(t){return e.map(kr(t),function(n){return[n,fr(t)]})}},Qr="Tuple",$4={URI:Qr,map:lh},rbe=Qe($4),ibe={URI:Qr,bimap:y4,mapLeft:b4},obe={URI:Qr,compose:v4},abe={URI:Qr,map:lh,extend:C4,extract:E$},sbe={URI:Qr,reduce:S$,foldMap:_$,reduceRight:I$},ube={URI:Qr,map:lh,reduce:S$,foldMap:_$,reduceRight:I$,traverse:S4,sequence:$$},cbe=T$,lbe=x$,fbe={URI:Qr,compose:v4,map:lh,bimap:y4,mapLeft:b4,extract:E$,extend:C4,reduce:S$,foldMap:_$,reduceRight:I$,traverse:S4,sequence:$$};const dbe=Object.freeze(Object.defineProperty({__proto__:null,Bifunctor:ibe,Comonad:abe,Foldable:sbe,Functor:$4,Semigroupoid:obe,Traversable:ube,URI:Qr,bimap:_4,compose:I4,duplicate:nbe,extend:w$,extract:E$,flap:rbe,foldMap:T4,fst:kr,getApplicative:X0e,getApply:b$,getChain:C$,getChainRec:tbe,getMonad:ebe,map:cbe,mapFst:T$,mapLeft:lbe,mapSnd:x$,reduce:x4,reduceRight:w4,sequence:$$,snd:fr,swap:Z0e,traverse:E4,tuple:fbe},Symbol.toStringTag,{value:"Module"})),pbe=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function Abe(e,t){var n=iL(t,Is(e));return{map:n.map,ap:n.ap,of:n.of,chain:function(r,i){return t.chain(r,function(o){return nn(o)?t.of(ea(o.left)):i(o.right)})},alt:function(r,i){return t.chain(r,function(o){return uS(o)?t.of(o):t.map(i(),function(a){return nn(a)?ea(e.concat(o.left,a.left)):a})})}}}const hbe=Object.freeze(Object.defineProperty({__proto__:null,getValidationM:Abe},Symbol.toStringTag,{value:"Module"}));var R4=pS(void 0),mbe={concat:R4.concat,empty:void 0};const gbe=Object.freeze(Object.defineProperty({__proto__:null,Monoid:mbe,Semigroup:R4},Symbol.toStringTag,{value:"Module"}));var vbe=function(e){return function(){return[void 0,e]}},ybe=function(e){return function(){var t=e(),n=t[0],r=t[1];return[[n,r],r]}},bbe=function(e){return function(){var t=e(),n=t[0],r=n[0],i=n[1],o=t[1];return[r,i(o)]}},Cbe=function(e){return function(t){return function(){var n=t(),r=n[0],i=n[1];return[[r,e(i)],i]}}},Sbe=function(e){return function(t){return function(){var n=t(),r=n[0],i=n[1];return[r,e(i)]}}},fh=function(e,t){return C(e,O4(t))},O4=function(e){return function(t){return function(){var n=t(),r=n[0],i=n[1];return[e(r),i]}}},kc="Writer",F4=function(e){return{URI:kc,_E:void 0,of:function(t){return function(){return[t,e.empty]}}}},R$=function(e){return{URI:kc,_E:void 0,map:fh,ap:function(t,n){return function(){var r=t(),i=r[0],o=r[1],a=n(),s=a[0],u=a[1];return[i(s),e.concat(o,u)]}}}},k4=function(e){var t=R$(e),n=F4(e);return{URI:kc,_E:void 0,map:fh,ap:t.ap,of:n.of}};function M4(e){var t=R$(e);return{URI:kc,_E:void 0,map:fh,ap:t.ap,chain:function(n,r){return function(){var i=n(),o=i[0],a=i[1],s=r(o)(),u=s[0],c=s[1];return[u,e.concat(a,c)]}}}}function _be(e){var t=k4(e),n=M4(e);return{URI:kc,_E:void 0,map:fh,ap:t.ap,of:t.of,chain:n.chain}}var O$={URI:kc,map:fh},Ibe=Qe(O$),Tbe=function(e){return e()[0]},xbe=function(e){return e()[1]},wbe=function(e){return e()[0]},Ebe=function(e){return e()[1]},$be=O$;const Rbe=Object.freeze(Object.defineProperty({__proto__:null,Functor:O$,URI:kc,censor:Sbe,evalWriter:wbe,evaluate:Tbe,execWriter:Ebe,execute:xbe,flap:Ibe,getApplicative:k4,getApply:R$,getChain:M4,getMonad:_be,getPointed:F4,listen:ybe,listens:Cbe,map:O4,pass:bbe,tell:vbe,writer:$be},Symbol.toStringTag,{value:"Module"}));function Obe(e){var t=function(n,r){return function(){return e.map(n(),function(i){var o=i[0],a=i[1];return[r(o),a]})}};return{map:t,evalWriter:function(n){return e.map(n(),function(r){var i=r[0];return i})},execWriter:function(n){return e.map(n(),function(r){r[0];var i=r[1];return i})},tell:function(n){return function(){return e.of([void 0,n])}},listen:function(n){return function(){return e.map(n(),function(r){var i=r[0],o=r[1];return[[i,o],o]})}},pass:function(n){return function(){return e.map(n(),function(r){var i=r[0],o=i[0],a=i[1],s=r[1];return[o,a(s)]})}},listens:function(n,r){return function(){return e.map(n(),function(i){var o=i[0],a=i[1];return[[o,r(a)],a]})}},censor:function(n,r){return function(){return e.map(n(),function(i){var o=i[0],a=i[1];return[o,r(a)]})}},getMonad:function(n){return{_E:void 0,map:t,of:function(r){return function(){return e.of([r,n.empty])}},ap:function(r,i){return function(){return e.chain(r(),function(o){var a=o[0],s=o[1];return e.map(i(),function(u){var c=u[0],l=u[1];return[a(c),n.concat(s,l)]})})}},chain:function(r,i){return function(){return e.chain(r(),function(o){var a=o[0],s=o[1];return e.map(i(a)(),function(u){var c=u[0],l=u[1];return[c,n.concat(s,l)]})})}}}}}}const Fbe=Object.freeze(Object.defineProperty({__proto__:null,getWriterM:Obe},Symbol.toStringTag,{value:"Module"})),kbe=Object.freeze(Object.defineProperty({__proto__:null,alt:Kz,alternative:qz,applicative:uH,apply:aH,array:nee,bifunctor:ree,boolean:fee,booleanAlgebra:mee,bounded:bee,boundedDistributiveLattice:_ee,boundedJoinSemilattice:Iee,boundedLattice:Tee,boundedMeetSemilattice:xee,category:wee,chain:cH,chainRec:Eee,choice:Oee,comonad:Fee,compactable:_te,console:Ete,const:Nte,contravariant:qte,date:Zte,distributiveLattice:Cee,either:ZB,eitherT:Dne,endomorphism:Kne,eq:SH,extend:Nne,field:Qne,filterable:Hne,filterableWithIndex:Yne,foldable:tre,foldableWithIndex:rre,fromEither:lH,fromIO:ire,fromReader:xre,fromState:Qre,fromTask:zre,fromThese:Hre,function:rL,functor:sH,functorWithIndex:Gre,group:Jre,heytingAlgebra:Zre,hkt:Xre,identity:Cie,invariant:Sie,io:Wie,ioEither:Woe,ioOption:Mae,ioRef:jae,joinSemilattice:Uae,json:Dae,lattice:Wae,magma:DH,map:Gse,meetSemilattice:Jse,monad:Zse,monadIO:Xse,monadTask:eue,monadThrow:tue,monoid:Aue,naturalTransformation:hue,nonEmptyArray:RG,number:UG,option:Cte,optionT:Noe,ord:jH,ordering:Sue,pipeable:Due,pointed:Wue,predicate:Uee,profunctor:Kue,random:Que,reader:Tre,readerEither:Kce,readerT:Vce,readerTask:Xle,readerTaskEither:xpe,readonlyArray:gZ,readonlyMap:Ase,readonlyNonEmptyArray:BY,readonlyRecord:gAe,readonlySet:MAe,readonlyTuple:YAe,record:Ghe,refinement:ome,ring:cme,semigroup:EL,semigroupoid:lme,semiring:dme,separated:NG,set:Mme,show:Dme,state:Vre,stateReaderTaskEither:eve,stateT:Kme,store:cve,string:Npe,strong:dve,struct:hve,task:gle,taskEither:cde,taskOption:mye,taskThese:m0e,these:Nye,theseT:Vye,traced:I0e,traversable:x0e,traversableWithIndex:w0e,tree:J0e,tuple:dbe,unfoldable:pbe,validationT:hbe,void:gbe,witherable:qG,writer:Rbe,writerT:Fbe,zero:VG},Symbol.toStringTag,{value:"Module"})),lt=Ku(kbe);var ln={},El={},hn={},Ge={};(function(e){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;var t=function(S){return function(){return{meet:function(y,T){return function(w){return S.meet(y(w),T(w))}},join:function(y,T){return function(w){return S.join(y(w),T(w))}},zero:function(){return S.zero},one:function(){return S.one},implies:function(y,T){return function(w){return S.implies(y(w),T(w))}},not:function(y){return function(T){return S.not(y(T))}}}}};e.getBooleanAlgebra=t;var n=function(S){return function(){return{concat:function(y,T){return function(w){return S.concat(y(w),T(w))}}}}};e.getSemigroup=n;var r=function(S){var y=(0,e.getSemigroup)(S);return function(){return{concat:y().concat,empty:function(){return S.empty}}}};e.getMonoid=r;var i=function(S){return{add:function(y,T){return function(w){return S.add(y(w),T(w))}},zero:function(){return S.zero},mul:function(y,T){return function(w){return S.mul(y(w),T(w))}},one:function(){return S.one}}};e.getSemiring=i;var o=function(S){var y=(0,e.getSemiring)(S);return{add:y.add,mul:y.mul,one:y.one,zero:y.zero,sub:function(T,w){return function(O){return S.sub(T(O),w(O))}}}};e.getRing=o;var a=function(S){return function(y){return y(S)}};e.apply=a;function s(S){return S}e.identity=s,e.unsafeCoerce=s;function u(S){return function(){return S}}e.constant=u,e.constTrue=u(!0),e.constFalse=u(!1),e.constNull=u(null),e.constUndefined=u(void 0),e.constVoid=e.constUndefined;function c(S){return function(y,T){return S(T,y)}}e.flip=c;function l(S,y,T,w,O,F,$,P,K){switch(arguments.length){case 1:return S;case 2:return function(){return y(S.apply(this,arguments))};case 3:return function(){return T(y(S.apply(this,arguments)))};case 4:return function(){return w(T(y(S.apply(this,arguments))))};case 5:return function(){return O(w(T(y(S.apply(this,arguments)))))};case 6:return function(){return F(O(w(T(y(S.apply(this,arguments))))))};case 7:return function(){return $(F(O(w(T(y(S.apply(this,arguments)))))))};case 8:return function(){return P($(F(O(w(T(y(S.apply(this,arguments))))))))};case 9:return function(){return K(P($(F(O(w(T(y(S.apply(this,arguments)))))))))}}}e.flow=l;function d(){for(var S=[],y=0;y<arguments.length;y++)S[y]=arguments[y];return S}e.tuple=d;function p(S){return S+1}e.increment=p;function A(S){return S-1}e.decrement=A;function m(S){throw new Error("Called `absurd` function which should be uncallable")}e.absurd=m;function g(S){return function(y){return S.apply(void 0,y)}}e.tupled=g;function _(S){return function(){for(var y=[],T=0;T<arguments.length;T++)y[T]=arguments[T];return S(y)}}e.untupled=_;function b(S,y,T,w,O,F,$,P,K){switch(arguments.length){case 1:return S;case 2:return y(S);case 3:return T(y(S));case 4:return w(T(y(S)));case 5:return O(w(T(y(S))));case 6:return F(O(w(T(y(S)))));case 7:return $(F(O(w(T(y(S))))));case 8:return P($(F(O(w(T(y(S)))))));case 9:return K(P($(F(O(w(T(y(S))))))));default:{for(var J=arguments[0],ee=1;ee<arguments.length;ee++)J=arguments[ee](J);return J}}}e.pipe=b,e.hole=m;var I=function(S,y){return y};e.SK=I;function x(S){return function(y){return!S(y)}}e.not=x;var v=function(){return{concat:function(S,y){return l(S,y)},empty:s}};e.getEndomorphismMonoid=v})(Ge);var Le={},Mbe=he&&he.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))};Object.defineProperty(Le,"__esModule",{value:!0});Le.fromReadonlyNonEmptyArray=Le.has=Le.emptyRecord=Le.emptyReadonlyArray=Le.tail=Le.head=Le.isNonEmpty=Le.singleton=Le.right=Le.left=Le.isRight=Le.isLeft=Le.some=Le.none=Le.isSome=Le.isNone=void 0;var Lbe=function(e){return e._tag==="None"};Le.isNone=Lbe;var jbe=function(e){return e._tag==="Some"};Le.isSome=jbe;Le.none={_tag:"None"};var Ube=function(e){return{_tag:"Some",value:e}};Le.some=Ube;var Bbe=function(e){return e._tag==="Left"};Le.isLeft=Bbe;var Pbe=function(e){return e._tag==="Right"};Le.isRight=Pbe;var Dbe=function(e){return{_tag:"Left",left:e}};Le.left=Dbe;var Wbe=function(e){return{_tag:"Right",right:e}};Le.right=Wbe;var Kbe=function(e){return[e]};Le.singleton=Kbe;var Nbe=function(e){return e.length>0};Le.isNonEmpty=Nbe;var qbe=function(e){return e[0]};Le.head=qbe;var Vbe=function(e){return e.slice(1)};Le.tail=Vbe;Le.emptyReadonlyArray=[];Le.emptyRecord={};Le.has=Object.prototype.hasOwnProperty;var Qbe=function(e){return Mbe([e[0]],e.slice(1),!0)};Le.fromReadonlyNonEmptyArray=Qbe;var zbe=he&&he.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(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){r===void 0&&(r=n),e[r]=t[n]}),Hbe=he&&he.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Ybe=he&&he.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&zbe(t,e,n);return Hbe(t,e),t};Object.defineProperty(hn,"__esModule",{value:!0});hn.sequenceS=hn.sequenceT=hn.getApplySemigroup=hn.apS=hn.apSecond=hn.apFirst=hn.ap=void 0;var Gbe=Ge,Jbe=Ybe(Le);function Zbe(e,t){return function(n){return function(r){return e.ap(e.map(r,function(i){return function(o){return t.ap(i,o)}}),n)}}}hn.ap=Zbe;function Xbe(e){return function(t){return function(n){return e.ap(e.map(n,function(r){return function(){return r}}),t)}}}hn.apFirst=Xbe;function e1e(e){return function(t){return function(n){return e.ap(e.map(n,function(){return function(r){return r}}),t)}}}hn.apSecond=e1e;function t1e(e){return function(t,n){return function(r){return e.ap(e.map(r,function(i){return function(o){var a;return Object.assign({},i,(a={},a[t]=o,a))}}),n)}}}hn.apS=t1e;function n1e(e){return function(t){return{concat:function(n,r){return e.ap(e.map(n,function(i){return function(o){return t.concat(i,o)}}),r)}}}}hn.getApplySemigroup=n1e;function F$(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,t===0?e.apply(null,i):F$(e,t-1,i)}}var Ab={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]}}}}}};function r1e(e){return Jbe.has.call(Ab,e)||(Ab[e]=F$(Gbe.tuple,e-1,[])),Ab[e]}function i1e(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r=t.length,i=r1e(r),o=e.map(t[0],i),a=1;a<r;a++)o=e.ap(o,t[a]);return o}}hn.sequenceT=i1e;function o1e(e){var t=e.length;switch(t){case 1:return function(n){var r;return r={},r[e[0]]=n,r};case 2:return function(n){return function(r){var i;return i={},i[e[0]]=n,i[e[1]]=r,i}};case 3:return function(n){return function(r){return function(i){var o;return o={},o[e[0]]=n,o[e[1]]=r,o[e[2]]=i,o}}};case 4:return function(n){return function(r){return function(i){return function(o){var a;return a={},a[e[0]]=n,a[e[1]]=r,a[e[2]]=i,a[e[3]]=o,a}}}};case 5:return function(n){return function(r){return function(i){return function(o){return function(a){var s;return s={},s[e[0]]=n,s[e[1]]=r,s[e[2]]=i,s[e[3]]=o,s[e[4]]=a,s}}}}};default:return F$(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,[])}}function a1e(e){return function(t){for(var n=Object.keys(t),r=n.length,i=o1e(n),o=e.map(t[n[0]],i),a=1;a<r;a++)o=e.ap(o,t[n[a]]);return o}}hn.sequenceS=a1e;var ei={};Object.defineProperty(ei,"__esModule",{value:!0});ei.getFunctorComposition=ei.bindTo=ei.flap=ei.map=void 0;var s1e=Ge;function L4(e,t){return function(n){return function(r){return e.map(r,function(i){return t.map(i,n)})}}}ei.map=L4;function u1e(e){return function(t){return function(n){return e.map(n,function(r){return r(t)})}}}ei.flap=u1e;function c1e(e){return function(t){return function(n){return e.map(n,function(r){var i;return i={},i[t]=r,i})}}}ei.bindTo=c1e;function l1e(e,t){var n=L4(e,t);return{map:function(r,i){return(0,s1e.pipe)(r,n(i))}}}ei.getFunctorComposition=l1e;Object.defineProperty(El,"__esModule",{value:!0});El.getApplicativeComposition=El.getApplicativeMonoid=void 0;var j4=hn,f1e=Ge,d1e=ei;function p1e(e){var t=(0,j4.getApplySemigroup)(e);return function(n){return{concat:t(n).concat,empty:e.of(n.empty)}}}El.getApplicativeMonoid=p1e;function A1e(e,t){var n=(0,d1e.getFunctorComposition)(e,t).map,r=(0,j4.ap)(e,t);return{map:n,of:function(i){return e.of(t.of(i))},ap:function(i,o){return(0,f1e.pipe)(i,r(o))}}}El.getApplicativeComposition=A1e;var xu={};Object.defineProperty(xu,"__esModule",{value:!0});xu.bind=xu.chainFirst=void 0;function h1e(e){return function(t){return function(n){return e.chain(n,function(r){return e.map(t(r),function(){return r})})}}}xu.chainFirst=h1e;function m1e(e){return function(t,n){return function(r){return e.chain(r,function(i){return e.map(n(i),function(o){var a;return Object.assign({},i,(a={},a[t]=o,a))})})}}}xu.bind=m1e;var C0={};Object.defineProperty(C0,"__esModule",{value:!0});C0.tailRec=void 0;var g1e=function(e,t){for(var n=t(e);n._tag==="Left";)n=t(n.left);return n.right};C0.tailRec=g1e;var Xt={},v1e=he&&he.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(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){r===void 0&&(r=n),e[r]=t[n]}),y1e=he&&he.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),b1e=he&&he.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&v1e(t,e,n);return y1e(t,e),t};Object.defineProperty(Xt,"__esModule",{value:!0});Xt.filterOrElse=Xt.chainFirstEitherK=Xt.chainEitherK=Xt.fromEitherK=Xt.chainOptionK=Xt.fromOptionK=Xt.fromPredicate=Xt.fromOption=void 0;var C1e=xu,k$=Ge,fu=b1e(Le);function U4(e){return function(t){return function(n){return e.fromEither(fu.isNone(n)?fu.left(t()):fu.right(n.value))}}}Xt.fromOption=U4;function S1e(e){return function(t,n){return function(r){return e.fromEither(t(r)?fu.right(r):fu.left(n(r)))}}}Xt.fromPredicate=S1e;function B4(e){var t=U4(e);return function(n){var r=t(n);return function(i){return(0,k$.flow)(i,r)}}}Xt.fromOptionK=B4;function _1e(e,t){var n=B4(e);return function(r){var i=n(r);return function(o){return function(a){return t.chain(a,i(o))}}}}Xt.chainOptionK=_1e;function M$(e){return function(t){return(0,k$.flow)(t,e.fromEither)}}Xt.fromEitherK=M$;function I1e(e,t){var n=M$(e);return function(r){return function(i){return t.chain(i,n(r))}}}Xt.chainEitherK=I1e;function T1e(e,t){return(0,k$.flow)(M$(e),(0,C1e.chainFirst)(t))}Xt.chainFirstEitherK=T1e;function x1e(e,t){return function(n,r){return function(i){return t.chain(i,function(o){return e.fromEither(n(o)?fu.right(o):fu.left(r(o)))})}}}Xt.filterOrElse=x1e;var P4={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.right=e.left=e.flap=e.Functor=e.Bifunctor=e.URI=e.bimap=e.mapLeft=e.map=e.separated=void 0;var t=Ge,n=ei,r=function(p,A){return{left:p,right:A}};e.separated=r;var i=function(p,A){return(0,t.pipe)(p,(0,e.map)(A))},o=function(p,A){return(0,t.pipe)(p,(0,e.mapLeft)(A))},a=function(p,A,m){return(0,t.pipe)(p,(0,e.bimap)(A,m))},s=function(p){return function(A){return(0,e.separated)((0,e.left)(A),p((0,e.right)(A)))}};e.map=s;var u=function(p){return function(A){return(0,e.separated)(p((0,e.left)(A)),(0,e.right)(A))}};e.mapLeft=u;var c=function(p,A){return function(m){return(0,e.separated)(p((0,e.left)(m)),A((0,e.right)(m)))}};e.bimap=c,e.URI="Separated",e.Bifunctor={URI:e.URI,mapLeft:o,bimap:a},e.Functor={URI:e.URI,map:i},e.flap=(0,n.flap)(e.Functor);var l=function(p){return p.left};e.left=l;var d=function(p){return p.right};e.right=d})(P4);var ns={},w1e=he&&he.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(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){r===void 0&&(r=n),e[r]=t[n]}),E1e=he&&he.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),$1e=he&&he.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&w1e(t,e,n);return E1e(t,e),t};Object.defineProperty(ns,"__esModule",{value:!0});ns.filterE=ns.witherDefault=ns.wiltDefault=void 0;var NO=$1e(Le);function R1e(e,t){return function(n){var r=e.traverse(n);return function(i,o){return n.map(r(i,o),t.separate)}}}ns.wiltDefault=R1e;function O1e(e,t){return function(n){var r=e.traverse(n);return function(i,o){return n.map(r(i,o),t.compact)}}}ns.witherDefault=O1e;function F1e(e){return function(t){var n=e.wither(t);return function(r){return function(i){return n(i,function(o){return t.map(r(o),function(a){return a?NO.some(o):NO.none})})}}}}ns.filterE=F1e;(function(e){var t=he&&he.__createBinding||(Object.create?function(U,j,W,Me){Me===void 0&&(Me=W);var B=Object.getOwnPropertyDescriptor(j,W);(!B||("get"in B?!j.__esModule:B.writable||B.configurable))&&(B={enumerable:!0,get:function(){return j[W]}}),Object.defineProperty(U,Me,B)}:function(U,j,W,Me){Me===void 0&&(Me=W),U[Me]=j[W]}),n=he&&he.__setModuleDefault||(Object.create?function(U,j){Object.defineProperty(U,"default",{enumerable:!0,value:j})}:function(U,j){U.default=j}),r=he&&he.__importStar||function(U){if(U&&U.__esModule)return U;var j={};if(U!=null)for(var W in U)W!=="default"&&Object.prototype.hasOwnProperty.call(U,W)&&t(j,U,W);return n(j,U),j};Object.defineProperty(e,"__esModule",{value:!0}),e.fold=e.match=e.foldW=e.matchW=e.isRight=e.isLeft=e.fromOption=e.fromPredicate=e.FromEither=e.MonadThrow=e.throwError=e.ChainRec=e.Extend=e.extend=e.Alt=e.alt=e.altW=e.Bifunctor=e.mapLeft=e.bimap=e.Traversable=e.sequence=e.traverse=e.Foldable=e.reduceRight=e.foldMap=e.reduce=e.Monad=e.Chain=e.chain=e.chainW=e.Applicative=e.Apply=e.ap=e.apW=e.Pointed=e.of=e.Functor=e.map=e.getAltValidation=e.getApplicativeValidation=e.getWitherable=e.getFilterable=e.getCompactable=e.getSemigroup=e.getEq=e.getShow=e.URI=e.right=e.left=void 0,e.getValidation=e.getValidationMonoid=e.getValidationSemigroup=e.getApplyMonoid=e.getApplySemigroup=e.either=e.stringifyJSON=e.parseJSON=e.sequenceArray=e.traverseArray=e.traverseArrayWithIndex=e.traverseReadonlyArrayWithIndex=e.traverseReadonlyNonEmptyArrayWithIndex=e.ApT=e.apSW=e.apS=e.bindW=e.bind=e.bindTo=e.Do=e.exists=e.elem=e.toError=e.toUnion=e.chainNullableK=e.fromNullableK=e.tryCatchK=e.tryCatch=e.fromNullable=e.orElse=e.orElseW=e.swap=e.filterOrElseW=e.filterOrElse=e.chainOptionK=e.fromOptionK=e.duplicate=e.flatten=e.flattenW=e.chainFirstW=e.chainFirst=e.apSecondW=e.apSecond=e.apFirstW=e.apFirst=e.flap=e.getOrElse=e.getOrElseW=void 0;var i=El,o=hn,a=xu,s=C0,u=Xt,c=Ge,l=ei,d=r(Le),p=P4,A=ns;e.left=d.left,e.right=d.right;var m=function(U,j){return(0,c.pipe)(U,(0,e.map)(j))},g=function(U,j){return(0,c.pipe)(U,(0,e.ap)(j))},_=function(U,j){return(0,c.pipe)(U,(0,e.chain)(j))},b=function(U,j,W){return(0,c.pipe)(U,(0,e.reduce)(j,W))},I=function(U){return function(j,W){var Me=(0,e.foldMap)(U);return(0,c.pipe)(j,Me(W))}},x=function(U,j,W){return(0,c.pipe)(U,(0,e.reduceRight)(j,W))},v=function(U){var j=(0,e.traverse)(U);return function(W,Me){return(0,c.pipe)(W,j(Me))}},S=function(U,j,W){return(0,c.pipe)(U,(0,e.bimap)(j,W))},y=function(U,j){return(0,c.pipe)(U,(0,e.mapLeft)(j))},T=function(U,j){return(0,c.pipe)(U,(0,e.alt)(j))},w=function(U,j){return(0,c.pipe)(U,(0,e.extend)(j))},O=function(U,j){return(0,s.tailRec)(j(U),function(W){return(0,e.isLeft)(W)?(0,e.right)((0,e.left)(W.left)):(0,e.isLeft)(W.right)?(0,e.left)(j(W.right.left)):(0,e.right)((0,e.right)(W.right.right))})};e.URI="Either";var F=function(U,j){return{show:function(W){return(0,e.isLeft)(W)?"left(".concat(U.show(W.left),")"):"right(".concat(j.show(W.right),")")}}};e.getShow=F;var $=function(U,j){return{equals:function(W,Me){return W===Me||((0,e.isLeft)(W)?(0,e.isLeft)(Me)&&U.equals(W.left,Me.left):(0,e.isRight)(Me)&&j.equals(W.right,Me.right))}}};e.getEq=$;var P=function(U){return{concat:function(j,W){return(0,e.isLeft)(W)?j:(0,e.isLeft)(j)?W:(0,e.right)(U.concat(j.right,W.right))}}};e.getSemigroup=P;var K=function(U){var j=(0,e.left)(U.empty);return{URI:e.URI,_E:void 0,compact:function(W){return(0,e.isLeft)(W)?W:W.right._tag==="None"?j:(0,e.right)(W.right.value)},separate:function(W){return(0,e.isLeft)(W)?(0,p.separated)(W,W):(0,e.isLeft)(W.right)?(0,p.separated)((0,e.right)(W.right.left),j):(0,p.separated)(j,(0,e.right)(W.right.right))}}};e.getCompactable=K;var J=function(U){var j=(0,e.left)(U.empty),W=(0,e.getCompactable)(U),Me=W.compact,B=W.separate,ie=function(Ae,Ee){return(0,e.isLeft)(Ae)||Ee(Ae.right)?Ae:j},ge=function(Ae,Ee){return(0,e.isLeft)(Ae)?(0,p.separated)(Ae,Ae):Ee(Ae.right)?(0,p.separated)(j,(0,e.right)(Ae.right)):(0,p.separated)((0,e.right)(Ae.right),j)};return{URI:e.URI,_E:void 0,map:m,compact:Me,separate:B,filter:ie,filterMap:function(Ae,Ee){if((0,e.isLeft)(Ae))return Ae;var ut=Ee(Ae.right);return ut._tag==="None"?j:(0,e.right)(ut.value)},partition:ge,partitionMap:function(Ae,Ee){if((0,e.isLeft)(Ae))return(0,p.separated)(Ae,Ae);var ut=Ee(Ae.right);return(0,e.isLeft)(ut)?(0,p.separated)((0,e.right)(ut.left),j):(0,p.separated)(j,(0,e.right)(ut.right))}}};e.getFilterable=J;var ee=function(U){var j=(0,e.getFilterable)(U),W=(0,e.getCompactable)(U);return{URI:e.URI,_E:void 0,map:m,compact:j.compact,separate:j.separate,filter:j.filter,filterMap:j.filterMap,partition:j.partition,partitionMap:j.partitionMap,traverse:v,sequence:e.sequence,reduce:b,foldMap:I,reduceRight:x,wither:(0,A.witherDefault)(e.Traversable,W),wilt:(0,A.wiltDefault)(e.Traversable,W)}};e.getWitherable=ee;var re=function(U){return{URI:e.URI,_E:void 0,map:m,ap:function(j,W){return(0,e.isLeft)(j)?(0,e.isLeft)(W)?(0,e.left)(U.concat(j.left,W.left)):j:(0,e.isLeft)(W)?W:(0,e.right)(j.right(W.right))},of:e.of}};e.getApplicativeValidation=re;var D=function(U){return{URI:e.URI,_E:void 0,map:m,alt:function(j,W){if((0,e.isRight)(j))return j;var Me=W();return(0,e.isLeft)(Me)?(0,e.left)(U.concat(j.left,Me.left)):Me}}};e.getAltValidation=D;var Y=function(U){return function(j){return(0,e.isLeft)(j)?j:(0,e.right)(U(j.right))}};e.map=Y,e.Functor={URI:e.URI,map:m},e.of=e.right,e.Pointed={URI:e.URI,of:e.of};var M=function(U){return function(j){return(0,e.isLeft)(j)?j:(0,e.isLeft)(U)?U:(0,e.right)(j.right(U.right))}};e.apW=M,e.ap=e.apW,e.Apply={URI:e.URI,map:m,ap:g},e.Applicative={URI:e.URI,map:m,ap:g,of:e.of};var k=function(U){return function(j){return(0,e.isLeft)(j)?j:U(j.right)}};e.chainW=k,e.chain=e.chainW,e.Chain={URI:e.URI,map:m,ap:g,chain:_},e.Monad={URI:e.URI,map:m,ap:g,of:e.of,chain:_};var q=function(U,j){return function(W){return(0,e.isLeft)(W)?U:j(U,W.right)}};e.reduce=q;var ue=function(U){return function(j){return function(W){return(0,e.isLeft)(W)?U.empty:j(W.right)}}};e.foldMap=ue;var ke=function(U,j){return function(W){return(0,e.isLeft)(W)?U:j(W.right,U)}};e.reduceRight=ke,e.Foldable={URI:e.URI,reduce:b,foldMap:I,reduceRight:x};var Ie=function(U){return function(j){return function(W){return(0,e.isLeft)(W)?U.of((0,e.left)(W.left)):U.map(j(W.right),e.right)}}};e.traverse=Ie;var rt=function(U){return function(j){return(0,e.isLeft)(j)?U.of((0,e.left)(j.left)):U.map(j.right,e.right)}};e.sequence=rt,e.Traversable={URI:e.URI,map:m,reduce:b,foldMap:I,reduceRight:x,traverse:v,sequence:e.sequence};var at=function(U,j){return function(W){return(0,e.isLeft)(W)?(0,e.left)(U(W.left)):(0,e.right)(j(W.right))}};e.bimap=at;var fn=function(U){return function(j){return(0,e.isLeft)(j)?(0,e.left)(U(j.left)):j}};e.mapLeft=fn,e.Bifunctor={URI:e.URI,bimap:S,mapLeft:y};var Zt=function(U){return function(j){return(0,e.isLeft)(j)?U():j}};e.altW=Zt,e.alt=e.altW,e.Alt={URI:e.URI,map:m,alt:T};var rr=function(U){return function(j){return(0,e.isLeft)(j)?j:(0,e.right)(U(j))}};e.extend=rr,e.Extend={URI:e.URI,map:m,extend:w},e.ChainRec={URI:e.URI,map:m,ap:g,chain:_,chainRec:O},e.throwError=e.left,e.MonadThrow={URI:e.URI,map:m,ap:g,of:e.of,chain:_,throwError:e.throwError},e.FromEither={URI:e.URI,fromEither:c.identity},e.fromPredicate=(0,u.fromPredicate)(e.FromEither),e.fromOption=(0,u.fromOption)(e.FromEither),e.isLeft=d.isLeft,e.isRight=d.isRight;var dn=function(U,j){return function(W){return(0,e.isLeft)(W)?U(W.left):j(W.right)}};e.matchW=dn,e.foldW=e.matchW,e.match=e.matchW,e.fold=e.match;var Hr=function(U){return function(j){return(0,e.isLeft)(j)?U(j.left):j.right}};e.getOrElseW=Hr,e.getOrElse=e.getOrElseW,e.flap=(0,l.flap)(e.Functor),e.apFirst=(0,o.apFirst)(e.Apply),e.apFirstW=e.apFirst,e.apSecond=(0,o.apSecond)(e.Apply),e.apSecondW=e.apSecond,e.chainFirst=(0,a.chainFirst)(e.Chain),e.chainFirstW=e.chainFirst,e.flattenW=(0,e.chainW)(c.identity),e.flatten=e.flattenW,e.duplicate=(0,e.extend)(c.identity),e.fromOptionK=(0,u.fromOptionK)(e.FromEither),e.chainOptionK=(0,u.chainOptionK)(e.FromEither,e.Chain),e.filterOrElse=(0,u.filterOrElse)(e.FromEither,e.Chain),e.filterOrElseW=e.filterOrElse;var Yr=function(U){return(0,e.isLeft)(U)?(0,e.right)(U.left):(0,e.left)(U.right)};e.swap=Yr;var Ne=function(U){return function(j){return(0,e.isLeft)(j)?U(j.left):j}};e.orElseW=Ne,e.orElse=e.orElseW;var dt=function(U){return function(j){return j==null?(0,e.left)(U):(0,e.right)(j)}};e.fromNullable=dt;var St=function(U,j){try{return(0,e.right)(U())}catch(W){return(0,e.left)(j(W))}};e.tryCatch=St;var st=function(U,j){return function(){for(var W=[],Me=0;Me<arguments.length;Me++)W[Me]=arguments[Me];return(0,e.tryCatch)(function(){return U.apply(void 0,W)},j)}};e.tryCatchK=st;var Wt=function(U){var j=(0,e.fromNullable)(U);return function(W){return(0,c.flow)(W,j)}};e.fromNullableK=Wt;var gi=function(U){var j=(0,e.fromNullableK)(U);return function(W){return(0,e.chain)(j(W))}};e.chainNullableK=gi,e.toUnion=(0,e.foldW)(c.identity,c.identity);function _r(U){return U instanceof Error?U:new Error(String(U))}e.toError=_r;function ir(U){return function(j,W){if(W===void 0){var Me=ir(U);return function(B){return Me(j,B)}}return(0,e.isLeft)(W)?!1:U.equals(j,W.right)}}e.elem=ir;var Gr=function(U){return function(j){return(0,e.isLeft)(j)?!1:U(j.right)}};e.exists=Gr,e.Do=(0,e.of)(d.emptyRecord),e.bindTo=(0,l.bindTo)(e.Functor),e.bind=(0,a.bind)(e.Chain),e.bindW=e.bind,e.apS=(0,o.apS)(e.Apply),e.apSW=e.apS,e.ApT=(0,e.of)(d.emptyReadonlyArray);var vi=function(U){return function(j){var W=U(0,d.head(j));if((0,e.isLeft)(W))return W;for(var Me=[W.right],B=1;B<j.length;B++){var ie=U(B,j[B]);if((0,e.isLeft)(ie))return ie;Me.push(ie.right)}return(0,e.right)(Me)}};e.traverseReadonlyNonEmptyArrayWithIndex=vi;var yi=function(U){var j=(0,e.traverseReadonlyNonEmptyArrayWithIndex)(U);return function(W){return d.isNonEmpty(W)?j(W):e.ApT}};e.traverseReadonlyArrayWithIndex=yi,e.traverseArrayWithIndex=e.traverseReadonlyArrayWithIndex;var jo=function(U){return(0,e.traverseReadonlyArrayWithIndex)(function(j,W){return U(W)})};e.traverseArray=jo,e.sequenceArray=(0,e.traverseArray)(c.identity);function Uo(U,j){return(0,e.tryCatch)(function(){return JSON.parse(U)},j)}e.parseJSON=Uo;var Bo=function(U,j){return(0,e.tryCatch)(function(){var W=JSON.stringify(U);if(typeof W!="string")throw new Error("Converting unsupported structure to JSON");return W},j)};e.stringifyJSON=Bo,e.either={URI:e.URI,map:m,of:e.of,ap:g,chain:_,reduce:b,foldMap:I,reduceRight:x,traverse:v,sequence:e.sequence,bimap:S,mapLeft:y,alt:T,extend:w,chainRec:O,throwError:e.throwError},e.getApplySemigroup=(0,o.getApplySemigroup)(e.Apply),e.getApplyMonoid=(0,i.getApplicativeMonoid)(e.Applicative);var Jr=function(U,j){return(0,o.getApplySemigroup)((0,e.getApplicativeValidation)(U))(j)};e.getValidationSemigroup=Jr;var Qa=function(U,j){return(0,i.getApplicativeMonoid)((0,e.getApplicativeValidation)(U))(j)};e.getValidationMonoid=Qa;function Vc(U){var j=(0,e.getApplicativeValidation)(U).ap,W=(0,e.getAltValidation)(U).alt;return{URI:e.URI,_E:void 0,map:m,of:e.of,chain:_,bimap:S,mapLeft:y,reduce:b,foldMap:I,reduceRight:x,extend:w,traverse:v,sequence:e.sequence,chainRec:O,throwError:e.throwError,ap:j,alt:W}}e.getValidation=Vc})(ln);var et=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),$l=function(){return $l=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},$l.apply(this,arguments)},k1e=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},ko=wt,tt=function(e,t,n){return ko([{value:e,context:t,message:n}])},Re=Ye,_e=function(){function e(t,n,r,i){this.name=t,this.is=n,this.validate=r,this.encode=i,this.decode=this.decode.bind(this)}return e.prototype.pipe=function(t,n){var r=this;return n===void 0&&(n="pipe(".concat(this.name,", ").concat(t.name,")")),new e(n,t.is,function(i,o){var a=r.validate(i,o);return se(a)?a:t.validate(a.right,o)},this.encode===We&&t.encode===We?We:function(i){return r.encode(t.encode(i))})},e.prototype.asDecoder=function(){return this},e.prototype.asEncoder=function(){return this},e.prototype.decode=function(t){return this.validate(t,[{key:"",type:this,actual:t}])},e}(),We=function(e){return e};function D4(e){return e.displayName||e.name||"<function".concat(e.length,">")}function M1e(e,t){return{key:e,type:t}}function Mi(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 ra(e,t){for(var n=t.length,r=0;r<n;r++)e.push(t[r])}var wu=Object.prototype.hasOwnProperty;function q1(e){return Object.keys(e).map(function(t){return"".concat(t,": ").concat(e[t].name)}).join(", ")}function tp(e){for(var t=0;t<e.length;t++)if(e[t].encode!==We)return!1;return!0}function W4(e){return"{ ".concat(q1(e)," }")}function K4(e){return"Partial<".concat(e,">")}function L1e(e,t,n,r){r===void 0&&(r="{ [K in ".concat(t.name,"]: ").concat(n.name," }"));var i=e.length;return new B$(r,function(o){return zn.is(o)&&e.every(function(a){return n.is(o[a])})},function(o,a){var s=zn.validate(o,a);if(se(s))return s;for(var u=s.right,c={},l=[],d=!1,p=0;p<i;p++){var A=e[p],m=u[A],g=n.validate(m,Mi(a,A,n,m));if(se(g))ra(l,g.left);else{var _=g.right;d=d||_!==m,c[A]=_}}return l.length>0?ko(l):Re(d||Object.keys(u).length!==i?c:u)},n.encode===We?We:function(o){for(var a={},s=0;s<i;s++){var u=e[s];a[u]=n.encode(o[u])}return a},t,n)}function L$(e){var t;if(V4(e)){var n=e.value;if(Zi.is(n))return t={},t[n]=null,t}else{if(W1e(e))return e.keys;if(z4(e)){var r=e.types.map(function(i){return L$(i)});return r.some(Im.is)?void 0:Object.assign.apply(Object,k1e([{}],r,!1))}}}function j1e(e,t,n){return n===void 0&&(n="{ [K in ".concat(e.name,"]: ").concat(t.name," }")),new B$(n,function(r){return zn.is(r)?Object.keys(r).every(function(i){return e.is(i)&&t.is(r[i])}):VO(t)&&Array.isArray(r)},function(r,i){if(zn.is(r)){for(var o={},a=[],s=Object.keys(r),u=s.length,c=!1,l=0;l<u;l++){var d=s[l],p=r[d],A=e.validate(d,Mi(i,d,e,d));if(se(A))ra(a,A.left);else{var m=A.right;c=c||m!==d,d=m;var g=t.validate(p,Mi(i,d,t,p));if(se(g))ra(a,g.left);else{var _=g.right;c=c||_!==p,o[d]=_}}}return a.length>0?ko(a):Re(c?o:r)}return VO(t)&&Array.isArray(r)?Re(r):tt(r,i)},e.encode===We&&t.encode===We?We:function(r){for(var i={},o=Object.keys(r),a=o.length,s=0;s<a;s++){var u=o[s];i[String(e.encode(u))]=t.encode(r[u])}return i},e,t)}function N4(e){return"("+e.map(function(t){return t.name}).join(" | ")+")"}function V1(e,t){for(var n=!0,r=!0,i=!zn.is(e),o=0,a=t;o<a.length;o++){var s=a[o];s!==e&&(n=!1),zn.is(s)&&(r=!1)}if(n)return e;if(r)return t[t.length-1];for(var u={},c=0,l=t;c<l.length;c++){var s=l[c];for(var d in s)(!wu.call(u,d)||i||s[d]!==e[d])&&(u[d]=s[d])}return u}function Q1(e){switch(e._tag){case"RefinementType":case"ReadonlyType":return Q1(e.type);case"InterfaceType":case"StrictType":case"PartialType":return e.props;case"IntersectionType":return e.types.reduce(function(t,n){return Object.assign(t,Q1(n))},{})}}function qO(e,t){for(var n=Object.getOwnPropertyNames(e),r=!1,i={},o=0;o<n.length;o++){var a=n[o];wu.call(t,a)?i[a]=e[a]:r=!0}return r?i:e}function U1e(e){return Q4(e)?"{| ".concat(q1(e.props)," |}"):K1e(e)?K4("{| ".concat(q1(e.props)," |}")):"Exact<".concat(e.name,">")}function B1e(e){return e.length>0}var ar={};function q4(e,t){for(var n=[],r=0,i=e;r<i.length;r++){var o=i[r];t.indexOf(o)!==-1&&n.push(o)}return n}function P1e(e,t){if(e===ar)return t;if(t===ar)return e;var n=Object.assign({},e);for(var r in t)if(wu.call(e,r)){var i=q4(e[r],t[r]);if(B1e(i))n[r]=i;else{n=ar;break}}else n[r]=t[r];return n}function D1e(e,t){if(e===ar||t===ar)return ar;var n=ar;for(var r in e)if(wu.call(t,r)){var i=q4(e[r],t[r]);i.length===0&&(n===ar&&(n={}),n[r]=e[r].concat(t[r]))}return n}function VO(e){return e._tag==="AnyType"}function V4(e){return e._tag==="LiteralType"}function W1e(e){return e._tag==="KeyofType"}function Q4(e){return e._tag==="InterfaceType"}function K1e(e){return e._tag==="PartialType"}function N1e(e){return e._tag==="StrictType"}function q1e(e){return e._tag==="ExactType"}function V1e(e){return e._tag==="RefinementType"}function Q1e(e){return e._tag==="IntersectionType"}function z4(e){return e._tag==="UnionType"}function z1e(e){return e._tag==="RecursiveType"}var hb=[];function Ga(e){if(hb.indexOf(e)!==-1)return ar;if(Q4(e)||N1e(e)){var t=ar;for(var n in e.props){var r=e.props[n];V4(r)&&(t===ar&&(t={}),t[n]=[r.value])}return t}else{if(q1e(e)||V1e(e))return Ga(e.type);if(Q1e(e))return e.types.reduce(function(o,a){return P1e(o,Ga(a))},ar);if(z4(e))return e.types.slice(1).reduce(function(o,a){return D1e(o,Ga(a))},Ga(e.types[0]));if(z1e(e)){hb.push(e);var i=Ga(e.type);return hb.pop(),i}}return ar}function H4(e){var t=Ga(e[0]),n=Object.keys(t),r=e.length,i=function(c){for(var l=t[c].slice(),d=[t[c]],p=1;p<r;p++){var A=e[p],m=Ga(A),g=m[c];if(g===void 0)return"continue-keys";if(g.some(function(_){return l.indexOf(_)!==-1}))return"continue-keys";l.push.apply(l,g),d.push(g)}return{value:[c,d]}};e:for(var o=0,a=n;o<a.length;o++){var s=a[o],u=i(s);if(typeof u=="object")return u.value;switch(u){case"continue-keys":continue e}}}var Y4=function(e){et(t,e);function t(){var n=e.call(this,"null",function(r){return r===null},function(r,i){return n.is(r)?Re(r):tt(r,i)},We)||this;return n._tag="NullType",n}return t}(_e),z1=new Y4,G4=function(e){et(t,e);function t(){var n=e.call(this,"undefined",function(r){return r===void 0},function(r,i){return n.is(r)?Re(r):tt(r,i)},We)||this;return n._tag="UndefinedType",n}return t}(_e),Im=new G4,J4=function(e){et(t,e);function t(){var n=e.call(this,"void",Im.is,Im.validate,We)||this;return n._tag="VoidType",n}return t}(_e),QO=new J4,Z4=function(e){et(t,e);function t(){var n=e.call(this,"unknown",function(r){return!0},Re,We)||this;return n._tag="UnknownType",n}return t}(_e),H1e=new Z4,X4=function(e){et(t,e);function t(){var n=e.call(this,"string",function(r){return typeof r=="string"},function(r,i){return n.is(r)?Re(r):tt(r,i)},We)||this;return n._tag="StringType",n}return t}(_e),Zi=new X4,e9=function(e){et(t,e);function t(){var n=e.call(this,"number",function(r){return typeof r=="number"},function(r,i){return n.is(r)?Re(r):tt(r,i)},We)||this;return n._tag="NumberType",n}return t}(_e),Mc=new e9,t9=function(e){et(t,e);function t(){var n=e.call(this,"bigint",function(r){return typeof r=="bigint"},function(r,i){return n.is(r)?Re(r):tt(r,i)},We)||this;return n._tag="BigIntType",n}return t}(_e),Y1e=new t9,n9=function(e){et(t,e);function t(){var n=e.call(this,"boolean",function(r){return typeof r=="boolean"},function(r,i){return n.is(r)?Re(r):tt(r,i)},We)||this;return n._tag="BooleanType",n}return t}(_e),S0=new n9,r9=function(e){et(t,e);function t(){var n=e.call(this,"UnknownArray",Array.isArray,function(r,i){return n.is(r)?Re(r):tt(r,i)},We)||this;return n._tag="AnyArrayType",n}return t}(_e),Rl=new r9,i9=function(e){et(t,e);function t(){var n=e.call(this,"UnknownRecord",function(r){var i=Object.prototype.toString.call(r);return i==="[object Object]"||i==="[object Window]"},function(r,i){return n.is(r)?Re(r):tt(r,i)},We)||this;return n._tag="AnyDictionaryType",n}return t}(_e),zn=new i9,o9=function(e){et(t,e);function t(n,r,i,o,a){var s=e.call(this,n,r,i,o)||this;return s.value=a,s._tag="LiteralType",s}return t}(_e);function dh(e,t){t===void 0&&(t=JSON.stringify(e));var n=function(r){return r===e};return new o9(t,n,function(r,i){return n(r)?Re(e):tt(r,i)},We,e)}var a9=function(e){et(t,e);function t(n,r,i,o,a){var s=e.call(this,n,r,i,o)||this;return s.keys=a,s._tag="KeyofType",s}return t}(_e);function G1e(e,t){t===void 0&&(t=Object.keys(e).map(function(r){return JSON.stringify(r)}).join(" | "));var n=function(r){return Zi.is(r)&&wu.call(e,r)};return new a9(t,n,function(r,i){return n(r)?Re(r):tt(r,i)},We,e)}var s9=function(e){et(t,e);function t(n,r,i,o,a,s){var u=e.call(this,n,r,i,o)||this;return u.type=a,u.predicate=s,u._tag="RefinementType",u}return t}(_e);function _0(e,t,n){return W$(e,t,n)}var Tm=_0(Mc,function(e){return Number.isInteger(e)},"Int"),j$=function(e){et(t,e);function t(n,r,i,o,a){var s=e.call(this,n,r,i,o)||this;return s.runDefinition=a,s._tag="RecursiveType",s}return t}(_e);Object.defineProperty(j$.prototype,"type",{get:function(){return this.runDefinition()},enumerable:!0,configurable:!0});function U$(e,t){var n,r=function(){return n||(n=t(i),n.name=e),n},i=new j$(e,function(o){return r().is(o)},function(o,a){return r().validate(o,a)},function(o){return r().encode(o)},r);return i}var u9=function(e){et(t,e);function t(n,r,i,o,a){var s=e.call(this,n,r,i,o)||this;return s.type=a,s._tag="ArrayType",s}return t}(_e);function I0(e,t){return t===void 0&&(t="Array<".concat(e.name,">")),new u9(t,function(n){return Rl.is(n)&&n.every(e.is)},function(n,r){var i=Rl.validate(n,r);if(se(i))return i;for(var o=i.right,a=o.length,s=o,u=[],c=0;c<a;c++){var l=o[c],d=e.validate(l,Mi(r,String(c),e,l));if(se(d))ra(u,d.left);else{var p=d.right;p!==l&&(s===o&&(s=o.slice()),s[c]=p)}}return u.length>0?ko(u):Re(s)},e.encode===We?We:function(n){return n.map(e.encode)},e)}var c9=function(e){et(t,e);function t(n,r,i,o,a){var s=e.call(this,n,r,i,o)||this;return s.props=a,s._tag="InterfaceType",s}return t}(_e);function H1(e,t){t===void 0&&(t=W4(e));var n=Object.keys(e),r=n.map(function(o){return e[o]}),i=n.length;return new c9(t,function(o){if(zn.is(o)){for(var a=0;a<i;a++){var s=n[a],u=o[s];if(u===void 0&&!wu.call(o,s)||!r[a].is(u))return!1}return!0}return!1},function(o,a){var s=zn.validate(o,a);if(se(s))return s;for(var u=s.right,c=u,l=[],d=0;d<i;d++){var p=n[d],A=c[p],m=r[d],g=m.validate(A,Mi(a,p,m,A));if(se(g))ra(l,g.left);else{var _=g.right;(_!==A||_===void 0&&!wu.call(c,p))&&(c===u&&(c=$l({},u)),c[p]=_)}}return l.length>0?ko(l):Re(c)},tp(r)?We:function(o){for(var a=$l({},o),s=0;s<i;s++){var u=n[s],c=r[s].encode;c!==We&&(a[u]=c(o[u]))}return a},e)}var l9=function(e){et(t,e);function t(n,r,i,o,a){var s=e.call(this,n,r,i,o)||this;return s.props=a,s._tag="PartialType",s}return t}(_e);function J1e(e,t){t===void 0&&(t=K4(W4(e)));var n=Object.keys(e),r=n.map(function(o){return e[o]}),i=n.length;return new l9(t,function(o){if(zn.is(o)){for(var a=0;a<i;a++){var s=n[a],u=o[s];if(u!==void 0&&!e[s].is(u))return!1}return!0}return!1},function(o,a){var s=zn.validate(o,a);if(se(s))return s;for(var u=s.right,c=u,l=[],d=0;d<i;d++){var p=n[d],A=c[p],m=e[p],g=m.validate(A,Mi(a,p,m,A));if(se(g))A!==void 0&&ra(l,g.left);else{var _=g.right;_!==A&&(c===u&&(c=$l({},u)),c[p]=_)}}return l.length>0?ko(l):Re(c)},tp(r)?We:function(o){for(var a=$l({},o),s=0;s<i;s++){var u=n[s],c=o[u];c!==void 0&&(a[u]=r[s].encode(c))}return a},e)}var B$=function(e){et(t,e);function t(n,r,i,o,a,s){var u=e.call(this,n,r,i,o)||this;return u.domain=a,u.codomain=s,u._tag="DictionaryType",u}return t}(_e);function P$(e,t,n){var r=L$(e);return r?L1e(Object.keys(r),e,t,n):j1e(e,t,n)}var D$=function(e){et(t,e);function t(n,r,i,o,a){var s=e.call(this,n,r,i,o)||this;return s.types=a,s._tag="UnionType",s}return t}(_e);function ph(e,t){t===void 0&&(t=N4(e));var n=H4(e);if(n!==void 0&&e.length>0){var r=n[0],i=n[1],o=i.length,a=function(s){for(var u=0;u<o;u++)if(i[u].indexOf(s)!==-1)return u};return new xm(t,function(s){if(zn.is(s)){var u=a(s[r]);return u!==void 0?e[u].is(s):!1}return!1},function(s,u){var c=zn.validate(s,u);if(se(c))return c;var l=c.right,d=a(l[r]);if(d===void 0)return tt(s,u);var p=e[d];return p.validate(l,Mi(u,String(d),p,l))},tp(e)?We:function(s){var u=a(s[r]);if(u===void 0)throw new Error("no codec found to encode value in union codec ".concat(t));return e[u].encode(s)},e,r)}else return new D$(t,function(s){return e.some(function(u){return u.is(s)})},function(s,u){for(var c=[],l=0;l<e.length;l++){var d=e[l],p=d.validate(s,Mi(u,String(l),d,s));if(se(p))ra(c,p.left);else return Re(p.right)}return ko(c)},tp(e)?We:function(s){for(var u=0,c=e;u<c.length;u++){var l=c[u];if(l.is(s))return l.encode(s)}throw new Error("no codec found to encode value in union type ".concat(t))},e)}var f9=function(e){et(t,e);function t(n,r,i,o,a){var s=e.call(this,n,r,i,o)||this;return s.types=a,s._tag="IntersectionType",s}return t}(_e);function Z1e(e,t){t===void 0&&(t="(".concat(e.map(function(r){return r.name}).join(" & "),")"));var n=e.length;return new f9(t,function(r){return e.every(function(i){return i.is(r)})},e.length===0?Re:function(r,i){for(var o=[],a=[],s=0;s<n;s++){var u=e[s],c=u.validate(r,Mi(i,String(s),u,r));se(c)?ra(a,c.left):o.push(c.right)}return a.length>0?ko(a):Re(V1(r,o))},e.length===0?We:function(r){return V1(r,e.map(function(i){return i.encode(r)}))},e)}var d9=function(e){et(t,e);function t(n,r,i,o,a){var s=e.call(this,n,r,i,o)||this;return s.types=a,s._tag="TupleType",s}return t}(_e);function X1e(e,t){t===void 0&&(t="[".concat(e.map(function(r){return r.name}).join(", "),"]"));var n=e.length;return new d9(t,function(r){return Rl.is(r)&&r.length===n&&e.every(function(i,o){return i.is(r[o])})},function(r,i){var o=Rl.validate(r,i);if(se(o))return o;for(var a=o.right,s=a.length>n?a.slice(0,n):a,u=[],c=0;c<n;c++){var l=a[c],d=e[c],p=d.validate(l,Mi(i,String(c),d,l));if(se(p))ra(u,p.left);else{var A=p.right;A!==l&&(s===a&&(s=a.slice()),s[c]=A)}}return u.length>0?ko(u):Re(s)},tp(e)?We:function(r){return e.map(function(i,o){return i.encode(r[o])})},e)}var p9=function(e){et(t,e);function t(n,r,i,o,a){var s=e.call(this,n,r,i,o)||this;return s.type=a,s._tag="ReadonlyType",s}return t}(_e);function eCe(e,t){return t===void 0&&(t="Readonly<".concat(e.name,">")),new p9(t,e.is,e.validate,e.encode,e)}var A9=function(e){et(t,e);function t(n,r,i,o,a){var s=e.call(this,n,r,i,o)||this;return s.type=a,s._tag="ReadonlyArrayType",s}return t}(_e);function h9(e,t){t===void 0&&(t="ReadonlyArray<".concat(e.name,">"));var n=I0(e);return new A9(t,n.is,n.validate,n.encode,e)}var np=function(e,t){return g9(H1(e),t)},m9=function(e){et(t,e);function t(n,r,i,o,a){var s=e.call(this,n,r,i,o)||this;return s.type=a,s._tag="ExactType",s}return t}(_e);function g9(e,t){t===void 0&&(t=U1e(e));var n=Q1(e);return new m9(t,e.is,function(r,i){var o=zn.validate(r,i);if(se(o))return o;var a=e.validate(r,i);return se(a)?a:Ye(qO(a.right,n))},function(r){return e.encode(qO(r,n))},e)}var v9=function(e){et(t,e);function t(){var n=e.call(this,"Function",function(r){return typeof r=="function"},function(r,i){return n.is(r)?Re(r):tt(r,i)},We)||this;return n._tag="FunctionType",n}return t}(_e),tCe=new v9,xm=function(e){et(t,e);function t(n,r,i,o,a,s){var u=e.call(this,n,r,i,o,a)||this;return u.tag=s,u}return t}(D$),nCe=function(e,t,n){n===void 0&&(n=N4(t));var r=ph(t,n);return r instanceof xm?r:(console.warn("[io-ts] Cannot build a tagged union for ".concat(n,", returning a de-optimized union")),new xm(n,r.is,r.validate,r.encode,t,e))},rCe=function(e,t){return{value:e,context:t}},y9=function(e){return[{key:"",type:e}]},b9=function(e){et(t,e);function t(){var n=e.call(this,"never",function(r){return!1},function(r,i){return tt(r,i)},function(){throw new Error("cannot encode never")})||this;return n._tag="NeverType",n}return t}(_e),iCe=new b9,C9=function(e){et(t,e);function t(){var n=e.call(this,"any",function(r){return!0},Re,We)||this;return n._tag="AnyType",n}return t}(_e),oCe=new C9,aCe=zn,S9=function(e){et(t,e);function t(){var n=e.call(this,"object",function(r){return r!==null&&typeof r=="object"},function(r,i){return n.is(r)?Re(r):tt(r,i)},We)||this;return n._tag="ObjectType",n}return t}(_e),sCe=new S9;function W$(e,t,n){return n===void 0&&(n="(".concat(e.name," | ").concat(D4(t),")")),new s9(n,function(r){return e.is(r)&&t(r)},function(r,i){var o=e.validate(r,i);if(se(o))return o;var a=o.right;return t(a)?Re(a):tt(a,i)},e.encode,e,t)}var uCe=W$(Mc,Number.isInteger,"Integer"),cCe=P$,lCe=function(e){et(t,e);function t(n,r,i,o,a){var s=e.call(this,n,r,i,o)||this;return s.props=a,s._tag="StrictType",s}return t}(_e);function fCe(e){return e}function dCe(e){return function(){return e}}const pCe=Object.freeze(Object.defineProperty({__proto__:null,AnyArrayType:r9,AnyDictionaryType:i9,AnyType:C9,Array:Rl,ArrayType:u9,BigIntType:t9,BooleanType:n9,Dictionary:aCe,DictionaryType:B$,ExactType:m9,Function:tCe,FunctionType:v9,Int:Tm,Integer:uCe,InterfaceType:c9,IntersectionType:f9,KeyofType:a9,LiteralType:o9,NeverType:b9,NullType:Y4,NumberType:e9,ObjectType:S9,PartialType:l9,ReadonlyArrayType:A9,ReadonlyType:p9,RecursiveType:j$,RefinementType:s9,StrictType:lCe,StringType:X4,TaggedUnionType:xm,TupleType:d9,Type:_e,UndefinedType:G4,UnionType:D$,UnknownArray:Rl,UnknownRecord:zn,UnknownType:Z4,VoidType:J4,alias:dCe,any:oCe,appendContext:Mi,array:I0,bigint:Y1e,boolean:S0,brand:_0,clean:fCe,dictionary:cCe,emptyTags:ar,exact:g9,failure:tt,failures:ko,getContextEntry:M1e,getDefaultContext:y9,getDomainKeys:L$,getFunctionName:D4,getIndex:H4,getTags:Ga,getValidationError:rCe,identity:We,interface:H1,intersection:Z1e,keyof:G1e,literal:dh,mergeAll:V1,never:iCe,null:z1,nullType:z1,number:Mc,object:sCe,partial:J1e,readonly:eCe,readonlyArray:h9,record:P$,recursion:U$,refinement:W$,strict:np,string:Zi,success:Re,taggedUnion:nCe,tuple:X1e,type:H1,undefined:Im,union:ph,unknown:H1e,void:QO,voidType:QO},Symbol.toStringTag,{value:"Module"})),Z=Ku(pCe);var Ah={};Object.defineProperty(Ah,"__esModule",{value:!0});Ah.ContentPath=void 0;const zO="::";Ah.ContentPath={serialize(e){return e.map(t=>t.key).join(zO)},current(e){return e[e.length-1]},append(e,t){return e+zO+t},make(e){return e.reduce((t,{key:n,type:r})=>n?t.concat({key:n,type:r}):t,[])}};var Lc={},T0={};Object.defineProperty(T0,"__esModule",{value:!0});T0.getAssetOrThrow=void 0;const ACe=e=>t=>{const n=e[t];if(!n)throw new Error(`Missing asset with id '${t}'!`);return n};T0.getAssetOrThrow=ACe;var x0={};Object.defineProperty(x0,"__esModule",{value:!0});x0.getEmbedOrThrow=void 0;const hCe=e=>t=>{const n=e[t];if(!n)throw new Error(`Missing embed with url '${t}'`);return n};x0.getEmbedOrThrow=hCe;var w0={},Xe={};const Xi=Ku(rL);function _9(e,t,n){return n===void 0&&(n=e.name),new _e(n,e.is,e.validate,function(r){return t(e.encode(r))})}const mCe=Object.freeze(Object.defineProperty({__proto__:null,mapOutput:_9},Symbol.toStringTag,{value:"Module"}));var I9=_0(Zi,function(e){return e.length>0},"NonEmptyString");function T9(e,t){t===void 0&&(t="NonEmptyArray<"+e.name+">");var n=I0(e);return new _e(t,function(r){return n.is(r)&&Qt(r)},function(r,i){return le(n.validate(r,i),ui(function(o){var a=ZS(o);return Ve(a)?tt(r,i):Re(a.value)}))},function(r){return n.encode(r)})}function x9(e,t,n){n===void 0&&(n="Set<"+e.name+">");var r=I0(e),i=y6(t),o=m6(t);return new _e(n,function(a){return a instanceof Set&&v6(e.is)(a)},function(a,s){return le(r.validate(a,s),ui(function(u){var c=o(u);return c.size!==u.length?tt(a,s):Re(c)}))},function(a){return r.encode(i(a))})}function gCe(e,t,n){return n===void 0&&(n="ReadonlySet<"+e.name+">"),x9(e,t,n)}function K$(e,t){return new _e(e,t,function(n,r){return t(n)?Re(n):tt(n,r)},We)}var vCe=function(e){return e instanceof Date},yCe=K$("Date",vCe),bCe=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},CCe=function(e,t){return{get:e,reverseGet:t}},w9=function(e){return Ns(e.get,H(e.reverseGet,pr))},SCe=function(e){return jc(H(e.get,Tt),e.reverseGet)},_Ce=function(e){return Wa(H(e.get,Tt),H(e.reverseGet,pr))},ICe=function(e){return dd(function(t){return function(n){return function(r){return t.map(n(e.get(r)),function(i){return e.reverseGet(i)})}}})},Ns=function(e,t){return{get:e,set:t}},N$=function(e){return Wa(H(e.get,Tt),e.set)},TCe=function(e){return dd(function(t){return function(n){return function(r){return t.map(n(e.get(r)),function(i){return e.set(i)(r)})}}})},E9=function(e){return function(t){return Ns(function(n){return e.get(t.get(n))},function(n){return function(r){return t.set(e.set(n)(t.get(r)))(r)}})}},xCe=function(e){return function(t){return jc(H(t.getOption,Zp(e.getOption)),H(e.reverseGet,t.reverseGet))}},wCe=function(e){return function(t){return Uc(q$(e))(N$(t))}},ECe=function(){return Ns(N,pr)},$Ce=function(e){return function(t){return Ns(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={},i[e]=n,i)))(r)}})}},RCe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(n){return Ns(function(r){for(var i=n.get(r),o={},a=0,s=e;a<s.length;a++){var u=s[a];o[u]=i[u]}return o},function(r){return function(i){for(var o=n.get(i),a=0,s=e;a<s.length;a++){var u=s[a];if(r[u]!==o[u])return n.set(Object.assign({},o,r))(i)}return i}})}},OCe=function(e){return function(t){return Ns(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)}})}},FCe=function(e){return function(t){return le(t,E9(eSe().at(e)))}},jc=function(e,t){return{getOption:e,reverseGet:t}},q$=function(e){return Wa(e.getOption,function(t){return R9(t)(e)})},$9=function(e){return dd(function(t){return function(n){return function(r){return le(e.getOption(r),_s(function(){return t.of(r)},function(i){return t.map(n(i),function(o){return R9(o)(e)(r)})}))}}})},kCe=function(e){return function(t){return function(n){return le(t.getOption(n),bo(function(r){var i=e(r);return i===r?n:t.reverseGet(i)}))}}},MCe=function(e){return function(t){var n=kCe(e)(t);return function(r){return le(n(r),RI(function(){return r}))}}},R9=function(e){return MCe(function(){return e})},LCe=function(e){return function(t){return Uc(N$(e))(q$(t))}},jCe=function(){return jc(Ju,N)},V$=function(e){return jc(_v(e),N)},UCe=function(){return jc(N,Tt)},BCe=function(){return jc(vf,Ye)},PCe=function(){return jc(function(e){return se(e)?Tt(e.left):ot},wt)},Wa=function(e,t){return{getOption:e,set:t}},DCe=function(e){return dd(function(t){return function(n){return function(r){return le(e.getOption(r),_s(function(){return t.of(r)},function(i){return t.map(n(i),function(o){return e.set(o)(r)})}))}}})},O9=function(e){return function(t){return function(n){return le(t.getOption(n),bo(function(r){var i=e(r);return i===r?n:t.set(i)(n)}))}}},F9=function(e){return function(t){var n=O9(e)(t);return function(r){return le(n(r),RI(function(){return r}))}}},Uc=function(e){return function(t){return Wa(H(t.getOption,Zp(e.getOption)),function(n){return F9(e.set(n))(t)})}},WCe=function(e){return function(t){return le(t,Uc(GCe().index(e)))}},KCe=function(e){return function(t){return le(t,Uc(JCe().index(e)))}},NCe=function(e){return function(t){return le(t,Uc(ZCe().index(e)))}},qCe=function(e){return Wa(rv(e),function(t){return function(n){return le(nv(e)(n),_s(function(){return n},function(r){return pv(r,t,n)}))}})},k9=function(e,t,n){if(n[e]===t)return n;var r=bCe([n[0]],n.slice(1),!0);return r[e]=t,r},VCe=function(e){return Wa(rv(e),function(t){return function(n){return le(nv(e)(n),_s(function(){return n},function(r){return k9(r,t,n)}))}})},dd=function(e){return{modifyF:e}};function Q$(e){return function(t){return dd(function(n){return function(r){return t.modifyF(n)(e.modifyF(n)(r))}})}}var QCe={URI:"Identity",map:function(e,t){return t(e)},of:N,ap:function(e,t){return e(t)}},zCe=function(e){return e.URI==="Identity"};function HCe(e){return function(){return dd(function(t){var n=zCe(t)?e.map:e.traverse(t);return function(r){return function(i){return n(i,r)}}})}}function YCe(e){return Q$(HCe(e)())}var z$=function(e){return{index:e}},GCe=function(){return z$(function(e){return Wa(function(t){return Su(e,t)},function(t){return function(n){return le(Su(e,n),_s(function(){return n},function(){return pv(e,t,n)}))}})})},JCe=function(){return z$(function(e){return Wa(function(t){return Su(e,t)},function(t){return function(n){return le(Su(e,n),_s(function(){return n},function(){return k9(e,t,n)}))}})})},ZCe=function(){return z$(function(e){return Wa(function(t){return _u(e,t)},function(t){return function(n){return n[e]===t||Ve(_u(e,n))?n:Rw(e,t)(n)}})})},XCe=function(e){return{at:e}};function eSe(){return XCe(function(e){return Ns(function(t){return _u(e,t)},_s(function(){return vw(e)},function(t){return Rw(e,t)}))})}var M9=CCe,Y1=w9,G1=SCe,J1=_Ce,Z1=ICe,tSe=function(e){return function(t){return M9(H(t.get,e.get),H(e.reverseGet,t.reverseGet))}},nSe=function(e){return M9(e.reverseGet,e.get)},rSe=function(e){return function(t){return function(n){return t.reverseGet(e(t.get(n)))}}},L9=Ns,wm=ECe,cs=N$,Ol=TCe,Eu=E9,iSe=Eu,oSe=H(w9,Eu),Bc=wCe,H$=function(e){return H(cs,Uc(e))},aSe=function(e){return H(Ol,Q$(e))},j9=function(e){return function(t){return function(n){var r=t.get(n),i=e(r);return r===i?n:t.set(i)(n)}}};function sSe(e){return function(t){return function(n){return function(r){return le(n.get(r),t,function(i){return e.map(i,function(o){return n.set(o)(r)})})}}}}var uSe=function(e){return Bc(jCe())(e)};function cSe(e){return Bc(V$(e))}var U9=$Ce,B9=RCe,lSe=OCe,fSe=function(e){return H(cs,WCe(e))},dSe=function(e){return H(cs,KCe(e))},pSe=function(e){return H(cs,NCe(e))},ASe=FCe,hSe=Bc(UCe()),mSe=Bc(BCe()),gSe=Bc(PCe());function vSe(e){return H(Ol,YCe(e))}function ySe(e){return H$(qCe(e))}function bSe(e){return H$(VCe(e))}var CSe=function(e,t){return function(n){return P9(n,e,t)}},P9=function(e,t,n){return L9(H(e.get,t),H(n,e.set))},E0="monocle-ts/Lens",SSe={URI:E0,imap:P9},D9={URI:E0,compose:function(e,t){return Eu(e)(t)}},_Se={URI:E0,compose:D9.compose,id:wm};const ISe=Object.freeze(Object.defineProperty({__proto__:null,Category:_Se,Invariant:SSe,Semigroupoid:D9,URI:E0,asOptional:cs,asTraversal:Ol,atKey:ASe,component:lSe,compose:Eu,composeIso:oSe,composeLens:iSe,composeOptional:H$,composePrism:Bc,composeTraversal:aSe,filter:cSe,findFirst:ySe,findFirstNonEmpty:bSe,fromNullable:uSe,id:wm,imap:CSe,index:fSe,indexNonEmpty:dSe,key:pSe,left:gSe,lens:L9,modify:j9,modifyF:sSe,prop:U9,props:B9,right:mSe,some:hSe,traverse:vSe},Symbol.toStringTag,{value:"Module"}));var HO=DCe,ou=Uc,TSe=O9,xSe=F9,wSe=V$,X1=q$,eC=$9,tC=xCe,ESe=LCe,Yo=Q$,W9=function(e){return function(t){return t.modifyF(QCe)(e)}},$Se=function(e){return W9(function(){return e})};function RSe(e){return Yo($9(V$(e)))}var YO=function(e){return new N9(e.get,e.reverseGet)},fl=function(e){return new Y$(e.get,e.set)},Od=function(e){return new q9(e.getOption,e.reverseGet)},ti=function(e){return new OSe(e.getOption,e.set)},xr=function(e){return new FSe(e.modifyF)},K9=function(e,t,n){var r;return n===e[t]?e:Object.assign({},e,(r={},r[t]=n,r))},N9=function(){function e(t,n){this.get=t,this.reverseGet=n,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 YO(nSe(this))},e.prototype.modify=function(t){return rSe(t)(this)},e.prototype.asLens=function(){return fl(Y1(this))},e.prototype.asPrism=function(){return Od(G1(this))},e.prototype.asOptional=function(){return ti(J1(this))},e.prototype.asTraversal=function(){return xr(Z1(this))},e.prototype.asFold=function(){var t=this;return new pd(function(){return function(n){return function(r){return n(t.get(r))}}})},e.prototype.asGetter=function(){var t=this;return new Q9(function(n){return t.get(n)})},e.prototype.asSetter=function(){var t=this;return new hh(function(n){return t.modify(n)})},e.prototype.compose=function(t){return YO(tSe(t)(this))},e.prototype.composeIso=function(t){return this.compose(t)},e.prototype.composeLens=function(t){return fl(le(this,Y1,Eu(t)))},e.prototype.composePrism=function(t){return Od(le(this,G1,tC(t)))},e.prototype.composeOptional=function(t){return ti(le(this,J1,ou(t)))},e.prototype.composeTraversal=function(t){return xr(le(this,Z1,Yo(t)))},e.prototype.composeFold=function(t){return this.asFold().compose(t)},e.prototype.composeGetter=function(t){return this.asGetter().compose(t)},e.prototype.composeSetter=function(t){return this.asSetter().compose(t)},e}(),Y$=function(){function e(t,n){this.get=t,this.set=n,this._tag="Lens"}return e.fromPath=function(){var t=e.fromProp();return function(n){var r=t(n[0]);return n.slice(1).reduce(function(i,o){return i.compose(t(o))},r)}},e.fromProp=function(){return function(t){return fl(le(wm(),U9(t)))}},e.fromProps=function(){return function(t){return fl(le(wm(),B9.apply(ISe,t)))}},e.fromNullableProp=function(){return function(t,n){return new e(function(r){var i=Ju(r[t]);return Ve(i)?n:i.value},function(r){return function(i){return K9(i,t,r)}})}},e.prototype.modify=function(t){return j9(t)(this)},e.prototype.asOptional=function(){return ti(cs(this))},e.prototype.asTraversal=function(){return xr(Ol(this))},e.prototype.asSetter=function(){var t=this;return new hh(function(n){return t.modify(n)})},e.prototype.asGetter=function(){var t=this;return new Q9(function(n){return t.get(n)})},e.prototype.asFold=function(){var t=this;return new pd(function(){return function(n){return function(r){return n(t.get(r))}}})},e.prototype.compose=function(t){return fl(Eu(t)(this))},e.prototype.composeLens=function(t){return this.compose(t)},e.prototype.composeGetter=function(t){return this.asGetter().compose(t)},e.prototype.composeFold=function(t){return this.asFold().compose(t)},e.prototype.composeOptional=function(t){return ti(le(this,cs,ou(t)))},e.prototype.composeTraversal=function(t){return xr(le(this,Ol,Yo(t)))},e.prototype.composeSetter=function(t){return this.asSetter().compose(t)},e.prototype.composeIso=function(t){return fl(le(this,Eu(le(t,Y1))))},e.prototype.composePrism=function(t){return ti(Bc(t)(this))},e}(),q9=function(){function e(t,n){this.getOption=t,this.reverseGet=n,this._tag="Prism"}return e.fromPredicate=function(t){return Od(wSe(t))},e.some=function(){return V9},e.prototype.modify=function(t){var n=this;return function(r){var i=n.modifyOption(t)(r);return Ve(i)?r:i.value}},e.prototype.modifyOption=function(t){var n=this;return function(r){return fB.map(n.getOption(r),function(i){var o=t(i);return o===i?r:n.reverseGet(o)})}},e.prototype.set=function(t){return this.modify(function(){return t})},e.prototype.asOptional=function(){return ti(X1(this))},e.prototype.asTraversal=function(){return xr(eC(this))},e.prototype.asSetter=function(){var t=this;return new hh(function(n){return t.modify(n)})},e.prototype.asFold=function(){var t=this;return new pd(function(n){return function(r){return function(i){var o=t.getOption(i);return Ve(o)?n.empty:r(o.value)}}})},e.prototype.compose=function(t){return Od(tC(t)(this))},e.prototype.composePrism=function(t){return this.compose(t)},e.prototype.composeOptional=function(t){return ti(le(this,X1,ou(t)))},e.prototype.composeTraversal=function(t){return xr(le(this,eC,Yo(t)))},e.prototype.composeFold=function(t){return this.asFold().compose(t)},e.prototype.composeSetter=function(t){return this.asSetter().compose(t)},e.prototype.composeIso=function(t){return Od(le(this,tC(le(t,G1))))},e.prototype.composeLens=function(t){return ti(ESe(t)(this))},e.prototype.composeGetter=function(t){return this.asFold().compose(t.asFold())},e}(),V9=new q9(N,Tt),OSe=function(){function e(t,n){this.getOption=t,this.set=n,this._tag="Optional"}return e.fromPath=function(){var t=e.fromNullableProp();return function(n){var r=t(n[0]);return n.slice(1).reduce(function(i,o){return i.compose(t(o))},r)}},e.fromNullableProp=function(){return function(t){return new e(function(n){return Ju(n[t])},function(n){return function(r){return r[t]==null?r:K9(r,t,n)}})}},e.fromOptionProp=function(){var t=Y$.fromProp();return function(n){return t(n).composePrism(V9)}},e.prototype.modify=function(t){return xSe(t)(this)},e.prototype.modifyOption=function(t){return TSe(t)(this)},e.prototype.asTraversal=function(){return xr(HO(this))},e.prototype.asFold=function(){var t=this;return new pd(function(n){return function(r){return function(i){var o=t.getOption(i);return Ve(o)?n.empty:r(o.value)}}})},e.prototype.asSetter=function(){var t=this;return new hh(function(n){return t.modify(n)})},e.prototype.compose=function(t){return ti(ou(t)(this))},e.prototype.composeOptional=function(t){return this.compose(t)},e.prototype.composeTraversal=function(t){return xr(le(this,HO,Yo(t)))},e.prototype.composeFold=function(t){return this.asFold().compose(t)},e.prototype.composeSetter=function(t){return this.asSetter().compose(t)},e.prototype.composeLens=function(t){return ti(le(this,ou(le(t,cs))))},e.prototype.composePrism=function(t){return ti(le(this,ou(le(t,X1))))},e.prototype.composeIso=function(t){return ti(le(this,ou(le(t,J1))))},e.prototype.composeGetter=function(t){return this.asFold().compose(t.asFold())},e}(),FSe=function(){function e(t){this.modifyF=t,this._tag="Traversal"}return e.prototype.modify=function(t){return W9(t)(this)},e.prototype.set=function(t){return $Se(t)(this)},e.prototype.filter=function(t){return xr(RSe(t)(this))},e.prototype.asFold=function(){var t=this;return new pd(function(n){return function(r){return t.modifyF(AB(n))(function(i){return yf(r(i))})}})},e.prototype.asSetter=function(){var t=this;return new hh(function(n){return t.modify(n)})},e.prototype.compose=function(t){return xr(Yo(t)(this))},e.prototype.composeTraversal=function(t){return this.compose(t)},e.prototype.composeFold=function(t){return this.asFold().compose(t)},e.prototype.composeSetter=function(t){return this.asSetter().compose(t)},e.prototype.composeOptional=function(t){return this.compose(t.asTraversal())},e.prototype.composeLens=function(t){return xr(le(this,Yo(le(t,Ol))))},e.prototype.composePrism=function(t){return xr(le(this,Yo(le(t,eC))))},e.prototype.composeIso=function(t){return xr(le(this,Yo(le(t,Z1))))},e.prototype.composeGetter=function(t){return this.asFold().compose(t.asFold())},e}(),Q9=function(){function e(t){this.get=t,this._tag="Getter"}return e.prototype.asFold=function(){var t=this;return new pd(function(){return function(n){return function(r){return n(t.get(r))}}})},e.prototype.compose=function(t){var n=this;return new e(function(r){return t.get(n.get(r))})},e.prototype.composeGetter=function(t){return this.compose(t)},e.prototype.composeFold=function(t){return this.asFold().compose(t)},e.prototype.composeLens=function(t){return this.compose(t.asGetter())},e.prototype.composeIso=function(t){return this.compose(t.asGetter())},e.prototype.composeTraversal=function(t){return this.asFold().compose(t.asFold())},e.prototype.composeOptional=function(t){return this.asFold().compose(t.asFold())},e.prototype.composePrism=function(t){return this.asFold().compose(t.asFold())},e}(),pd=function(){function e(t){this.foldMap=t,this._tag="Fold",this.getAll=t(cI())(Ss),this.exist=t(KW),this.all=t(WW),this.foldMapFirst=t(dB())}return e.prototype.compose=function(t){var n=this;return new e(function(r){return function(i){return n.foldMap(r)(t.foldMap(r)(i))}})},e.prototype.composeFold=function(t){return this.compose(t)},e.prototype.composeGetter=function(t){return this.compose(t.asFold())},e.prototype.composeTraversal=function(t){return this.compose(t.asFold())},e.prototype.composeOptional=function(t){return this.compose(t.asFold())},e.prototype.composeLens=function(t){return this.compose(t.asFold())},e.prototype.composePrism=function(t){return this.compose(t.asFold())},e.prototype.composeIso=function(t){return this.compose(t.asFold())},e.prototype.find=function(t){return this.foldMapFirst(_v(t))},e.prototype.headOption=function(t){return this.find(function(){return!0})(t)},e}(),hh=function(){function e(t){this.modify=t,this._tag="Setter"}return e.prototype.set=function(t){return this.modify(pr(t))},e.prototype.compose=function(t){var n=this;return new e(function(r){return n.modify(t.modify(r))})},e.prototype.composeSetter=function(t){return this.compose(t)},e.prototype.composeTraversal=function(t){return this.compose(t.asSetter())},e.prototype.composeOptional=function(t){return this.compose(t.asSetter())},e.prototype.composeLens=function(t){return this.compose(t.asSetter())},e.prototype.composePrism=function(t){return this.compose(t.asSetter())},e.prototype.composeIso=function(t){return this.compose(t.asSetter())},e}(),kSe=new N9(bl,bl);function MSe(){return kSe}function LSe(e,t){t===void 0&&(t="fromNewtype("+e.name+")");var n=MSe();return new _e(t,function(r){return e.is(r)},function(r,i){return le(e.validate(r,i),tc(n.wrap))},function(r){return e.encode(n.unwrap(r))})}var jSe=np({_tag:dh("None")}),USe=dh("Some");function z9(e,t){return t===void 0&&(t="Option<"+e.name+">"),ph([jSe,np({_tag:USe,value:e},"Some<"+e.name+">")],t)}function BSe(e,t){return t===void 0&&(t="Option<"+e.name+">"),new _e(t,z9(e).is,function(n,r){return n==null?Re(ot):le(e.validate(n,r),tc(Tt))},function(n){return OI(le(n,bo(e.encode)))})}var PSe=new _e("DateFromISOString",function(e){return e instanceof Date},function(e,t){return le(Zi.validate(e,t),ui(function(n){var r=new Date(n);return isNaN(r.getTime())?tt(e,t):Re(r)}))},function(e){return e.toISOString()});function DSe(e,t){return t===void 0&&(t="ReadonlyNonEmptyArray<"+e.name+">"),T9(e,t)}function H9(e){var t=Object.create(Object.getPrototypeOf(e));return Object.assign(t,e),t}var WSe=new _e("DateFromNumber",function(e){return e instanceof Date},function(e,t){return le(Mc.validate(e,t),ui(function(n){var r=new Date(n);return isNaN(r.getTime())?tt(e,t):Re(r)}))},function(e){return e.getTime()});function $0(e,t,n){n===void 0&&(n=e.name);var r=H9(e);return r.validate=t,r.decode=function(i){return t(i,y9(r))},r.name=n,r}function KSe(e,t,n){return n===void 0&&(n="withFallback("+e.name+")"),$0(e,function(r,i){return qB(function(){return Re(t)})(e.validate(r,i))},n)}var NSe=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,qSe=_0(Zi,function(e){return NSe.test(e)},"UUID");function VSe(e,t,n){return n===void 0&&(n="fromNullable("+e.name+")"),$0(e,function(r,i){return r==null?Re(t):e.validate(r,i)},n)}var QSe=new _e("BooleanFromString",S0.is,function(e,t){return le(Zi.validate(e,t),ui(function(n){return n==="true"?Re(!0):n==="false"?Re(!1):tt(e,t)}))},String);function zSe(e,t){return $0(e,function(n,r){return aA(function(){return[{value:n,context:r,message:t(n,r),actual:n}]})(e.validate(n,r))})}function Y9(e){switch(e._tag){case"InterfaceType":return e.props;case"ExactType":return Y9(e.type)}}var HSe=Y$.fromProp();function YSe(e){var t={};for(var n in Y9(e))t[n]=HSe(n);return t}var GSe=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},JSe=K$("RegExp",GSe),ZSe=new _e("DateFromUnixTime",function(e){return e instanceof Date},function(e,t){return le(Tm.validate(e,t),ui(function(n){var r=new Date(n*1e3);return isNaN(r.getTime())?tt(e,t):Re(r)}))},function(e){return Math.floor(e.getTime()/1e3)}),nC=new _e("NumberFromString",Mc.is,function(e,t){return le(Zi.validate(e,t),ui(function(n){var r=+n;return isNaN(r)||n.trim()===""?tt(e,t):Re(r)}))},String),XSe=new _e("IntFromString",Tm.is,function(e,t){return le(nC.validate(e,t),ui(function(n){return Tm.is(n)?Re(n):tt(e,t)}))},nC.encode),G9=U$("JsonArray",function(){return h9(R0)}),J9=U$("JsonRecord",function(){return P$(Zi,R0)}),R0=ph([S0,Mc,Zi,z1,G9,J9],"Json"),e_e=new _e("JsonFromString",R0.is,function(e,t){try{return Re(JSON.parse(e))}catch{return tt(e,t)}},function(e){return JSON.stringify(e)}),t_e=dh("Left"),n_e=dh("Right");function r_e(e,t,n){return n===void 0&&(n="Either<"+e.name+", "+t.name+">"),ph([np({_tag:t_e,left:e},"Left<"+e.name+">"),np({_tag:n_e,right:t},"Right<"+e.name+">")],n)}var i_e=new _e("BigIntFromString",function(e){return typeof e=="bigint"},function(e,t){return le(Zi.validate(e,t),ui(function(n){if(!I9.is(n.trim()))return tt(e,t);try{return Re(BigInt(n))}catch{return tt(e,t)}}))},String);function o_e(e,t,n){return n===void 0&&(n=e.name),new _e(n,e.is,e.validate,t)}var a_e=new _e("BooleanFromNumber",S0.is,function(e,t){return le(Mc.validate(e,t),tc(function(n){return n!==0}))},Number);const s_e=Object.freeze(Object.defineProperty({__proto__:null,BigIntFromString:i_e,BooleanFromNumber:a_e,BooleanFromString:QSe,DateFromISOString:PSe,DateFromNumber:WSe,DateFromUnixTime:ZSe,IntFromString:XSe,Json:R0,JsonArray:G9,JsonFromString:e_e,JsonRecord:J9,NonEmptyString:I9,NumberFromString:nC,UUID:qSe,clone:H9,date:yCe,either:r_e,fromNewtype:LSe,fromNullable:VSe,fromRefinement:K$,getLenses:YSe,mapOutput:_9,nonEmptyArray:T9,option:z9,optionFromNullable:BSe,readonlyNonEmptyArray:DSe,readonlySetFromArray:gCe,regexp:JSe,setFromArray:x9,withEncode:o_e,withFallback:KSe,withMessage:zSe,withValidate:$0},Symbol.toStringTag,{value:"Module"})),O0=Ku(s_e),u_e=Ku(mCe);Object.defineProperty(Xe,"__esModule",{value:!0});Xe.withCustomError=Xe.addType=Xe.isEmpty=Xe.objectToMap=Xe.grouped=Xe.formatDate=Xe.formatDateTime=Xe.filterDouble=Xe.refineType=Xe.nullable=void 0;const c_e=Q,Z9=lt,l_e=Xi,pl=(0,c_e.__importStar)(Z),f_e=O0,d_e=u_e;function p_e(e){return pl.union([e,pl.null,pl.undefined])}Xe.nullable=p_e;function A_e(e,t,n){return new pl.Type(t,e.is,(r,i)=>(0,l_e.pipe)(e.validate(r,i),Z9.either.chain(o=>n(o)?pl.success(o):pl.failure(r,i))),e.encode)}Xe.refineType=A_e;function h_e(e){if(e==="")return null;const t=Number(e);return Number.isNaN(t)?null:t}Xe.filterDouble=h_e;function m_e(e){return e.toISOString().replace(/\.\d{3}Z$/,"+0000")}Xe.formatDateTime=m_e;function g_e(e){return e.toISOString().replace(/T.*/,"")}Xe.formatDate=g_e;function v_e(e,t){return e.reduce((n,r,i)=>(i%t===0?n.push([r]):n[Math.floor(i/t)].push(r),n),new Array)}Xe.grouped=v_e;function y_e(e){return new Map(Object.entries(e))}Xe.objectToMap=y_e;function b_e(e){for(const t in e)return!1;return!0}Xe.isEmpty=b_e;function C_e(e,t){return(0,d_e.mapOutput)(e,n=>({...n,__TYPE__:t}))}Xe.addType=C_e;function S_e(e,t){return(0,f_e.withValidate)(e,(n,r)=>Z9.either.mapLeft(i=>i.find(o=>o.message)?i:[{value:n,context:r,message:t(n,r),actual:n}])(e.validate(n,r)))}Xe.withCustomError=S_e;Object.defineProperty(w0,"__esModule",{value:!0});w0.WidgetKey=void 0;const __e=Q,I_e=(0,__e.__importStar)(Z),T_e=Xe,x_e=new RegExp("^[^<>]+$");w0.WidgetKey=(0,T_e.refineType)(I_e.string,"WidgetKey",e=>e.length===0||x_e.test(e));(function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Q;(0,t.__exportStar)(T0,e),(0,t.__exportStar)(x0,e),(0,t.__exportStar)(w0,e)})(Lc);var fe={},X9={},Ad={},F0={},k0={};Object.defineProperty(k0,"__esModule",{value:!0});k0.clone=void 0;function w_e(e){var t=Object.create(Object.getPrototypeOf(e));return Object.assign(t,e),t}k0.clone=w_e;var E_e=he&&he.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),$_e=he&&he.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),R_e=he&&he.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)Object.hasOwnProperty.call(e,n)&&E_e(t,e,n);return $_e(t,e),t};Object.defineProperty(F0,"__esModule",{value:!0});F0.withValidate=void 0;var O_e=R_e(Z),F_e=k0;function k_e(e,t,n){n===void 0&&(n=e.name);var r=F_e.clone(e);return r.validate=t,r.decode=function(i){return t(i,O_e.getDefaultContext(r))},r.name=n,r}F0.withValidate=k_e;var M_e=he&&he.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),L_e=he&&he.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),j_e=he&&he.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)Object.hasOwnProperty.call(e,n)&&M_e(t,e,n);return L_e(t,e),t};Object.defineProperty(Ad,"__esModule",{value:!0});Ad.withFallback=void 0;var U_e=j_e(Z),B_e=F0,P_e=ln;function D_e(e,t,n){return n===void 0&&(n="withFallback("+e.name+")"),B_e.withValidate(e,function(r,i){return P_e.orElse(function(){return U_e.success(t)})(e.validate(r,i))},n)}Ad.withFallback=D_e;var mb={},en={};Object.defineProperty(en,"__esModule",{value:!0});en.EmptyArray=en.EmptyObject=en.Boolean=en.NumberOrNull=en.Number=en.StringOrNull=en.String=void 0;const W_e=Q,K_e=lt,N_e=Ge,Nt=(0,W_e.__importStar)(Z),mh=Xe;en.String=(0,mh.withCustomError)(Nt.string,()=>"The value must be a string");en.StringOrNull=(0,mh.withCustomError)(Nt.union([Nt.string,Nt.null]),()=>"The value must be a string or null");en.Number=(0,mh.withCustomError)(Nt.number,()=>"The value must be a number");en.NumberOrNull=(0,mh.withCustomError)(Nt.union([Nt.number,Nt.null]),()=>"The value must be a number or null");en.Boolean=(0,mh.withCustomError)(Nt.boolean,()=>"The value must be a boolean");en.EmptyObject=Nt.UnknownRecord.pipe(new Nt.Type("emptyObject",e=>Nt.UnknownRecord.is(e),(e,t)=>Object.keys(e).length>0?Nt.failure(e,t,"The object is not empty."):Nt.success({}),Nt.identity));en.EmptyArray=new Nt.Type("emptyArray",e=>Nt.UnknownArray.is(e)&&e.length===0,(e,t)=>(0,N_e.pipe)(Nt.UnknownArray.decode(e),K_e.either.chain(n=>n.length>0?Nt.failure(e,t,"The array is not empty."):Nt.success(new Array))),()=>[]);var Uh={};const Ka=Ku(ZB);var GO;function q_e(){if(GO)return Uh;GO=1,Object.defineProperty(Uh,"__esModule",{value:!0});const e=Q,t=Ka,n=Xi,r=(0,e.__importStar)(Z),i=ft();return Uh.default=new r.Type("dateFromString",o=>o instanceof Date,(o,a)=>(0,n.pipe)(i.String.validate(o,a),(0,t.chain)(s=>{const u=new Date(s);return isNaN(u.getTime())?r.failure(o,a):r.success(u)})),o=>o.toISOString()),Uh}var G$={};Object.defineProperty(G$,"__esModule",{value:!0});const V_e=Q,Q_e=Ka,z_e=Xi,Jc=(0,V_e.__importStar)(Z);G$.default=new Jc.Type("dateFromStringOrNumber",e=>e instanceof Date,(e,t)=>(0,z_e.pipe)(Jc.union([Jc.number,Jc.string]).validate(e,t),(0,Q_e.chain)(n=>{const r=new Date(n);return isNaN(r.getTime())?Jc.failure(e,t):Jc.success(r)})),e=>e);var J$={};Object.defineProperty(J$,"__esModule",{value:!0});const H_e=Q,Y_e=Ka,G_e=Xi,Bh=(0,H_e.__importStar)(Z);J$.default=new Bh.Type("dateFromTsMs",e=>e instanceof Date,(e,t)=>(0,G_e.pipe)(Bh.number.validate(e,t),(0,Y_e.chain)(n=>{const r=new Date(n);return isNaN(r.getTime())?Bh.failure(e,t):Bh.success(r)})),e=>e.getTime());var eq={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmptyArrayOrElse=e.EmptyObjectOrElse=e.NullOrElse=e.DefaultOrElse=void 0;const t=Q,n=ln,r=(0,t.__importStar)(Z),i=en,o=c=>l=>new r.Type(`DefaultOrElse<${c.name}, ${l.name}>`,d=>d===null||l.is(d),(d,p)=>(0,n.isRight)(c.validate(d,p))?r.success(null):l.validate(d,p),d=>d?l.encode(d):void 0);e.DefaultOrElse=o;const a=c=>(0,e.DefaultOrElse)(r.null)(c);e.NullOrElse=a;const s=c=>(0,e.DefaultOrElse)(i.EmptyObject)(c);e.EmptyObjectOrElse=s;const u=c=>(0,e.DefaultOrElse)(i.EmptyArray)(c);e.EmptyArrayOrElse=u})(eq);var Z$={};Object.defineProperty(Z$,"__esModule",{value:!0});const J_e=Q,Z_e=Ka,X_e=Xi,Js=(0,J_e.__importStar)(Z);Z$.default=new Js.Type("IntFromNumber",Js.Int.is,(e,t)=>(0,X_e.pipe)(Js.number.validate(e,t),(0,Z_e.chain)(n=>Js.Int.is(n)?Js.success(n):Js.success(Math.round(n)))),Js.Int.encode);var X$={};Object.defineProperty(X$,"__esModule",{value:!0});const eIe=Q,tIe=Ka,nIe=Xi,Zc=(0,eIe.__importStar)(Z),rIe=/^([0-9]+)px$/;X$.default=new Zc.Type("IntFromPixels",Zc.Int.is,(e,t)=>(0,nIe.pipe)(Zc.string.validate(e,t),(0,tIe.chain)(n=>{try{const r=n.match(rIe);if(!r)return Zc.failure(e,t);const i=parseInt(r[1]);return Zc.success(i)}catch{return Zc.failure(e,t)}})),String);var eR={};Object.defineProperty(eR,"__esModule",{value:!0});const iIe=Q,oIe=(0,iIe.__importStar)(Z),JO=Xe;eR.default=(0,JO.withCustomError)((0,JO.refineType)(oIe.string,"nonEmptyString",e=>e.trim().length>0),()=>"The value must be a non-empty string");var tR={},M0={};Object.defineProperty(M0,"__esModule",{value:!0});const aIe=Q,sIe=(0,aIe.__importStar)(Z),uIe=Xe;M0.default=(0,uIe.nullable)(sIe.string);Object.defineProperty(tR,"__esModule",{value:!0});const cIe=Q,lIe=Ka,fIe=Xi,gb=Z,dIe=(0,cIe.__importDefault)(M0);tR.default=new gb.Type("nonEmptyStringOrNull",e=>typeof e=="string"||e===null,(e,t)=>(0,fIe.pipe)(dIe.default.validate(e,t),(0,lIe.chain)(n=>typeof n=="string"&&n.length>0?(0,gb.success)(n):(0,gb.success)(null))),e=>e);var nR={};Object.defineProperty(nR,"__esModule",{value:!0});const pIe=Q,AIe=(0,pIe.__importStar)(Z),hIe=Xe;nR.default=(0,hIe.nullable)(AIe.number);var rR={};Object.defineProperty(rR,"__esModule",{value:!0});const mIe=Q,Ph=(0,mIe.__importStar)(Z),ZO=en;rR.default=(e,t,n)=>ZO.Number.pipe(new Ph.Type("numberInRange",r=>ZO.Number.is(r),(r,i)=>r>t||r<e?Ph.failure(r,i,`${n} must be a number between ${e} and ${t}`):Ph.success(r),Ph.identity));var iR={};Object.defineProperty(iR,"__esModule",{value:!0});const gIe=Q,vIe=Ka,yIe=Xi,Dh=(0,gIe.__importStar)(Z);iR.default=new Dh.Type("StringFromInt",Dh.string.is,(e,t)=>(0,yIe.pipe)(Dh.boolean.validate(e,t),(0,vIe.chain)(n=>Dh.success(n.toString()))),e=>e);var oR={};Object.defineProperty(oR,"__esModule",{value:!0});const bIe=Q,CIe=Ka,SIe=Xi,Wh=(0,bIe.__importStar)(Z);oR.default=new Wh.Type("StringFromInt",Wh.string.is,(e,t)=>(0,SIe.pipe)(Wh.number.validate(e,t),(0,CIe.chain)(n=>Wh.success(n.toString()))),e=>e);var XO;function ft(){return XO||(XO=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.StringOrNull=e.StringFromNumber=e.StringFromBoolean=e.NumberRange=e.NumberOrNull=e.NonEmptyStringOrNull=e.NonEmptyString=e.IntFromPixels=e.IntFromNumber=e.Function=e.DateFromTsMs=e.DateFromStringOrNumber=e.DateFromString=void 0;const t=Q;(0,t.__exportStar)(en,e);var n=q_e();Object.defineProperty(e,"DateFromString",{enumerable:!0,get:function(){return(0,t.__importDefault)(n).default}});var r=G$;Object.defineProperty(e,"DateFromStringOrNumber",{enumerable:!0,get:function(){return(0,t.__importDefault)(r).default}});var i=J$;Object.defineProperty(e,"DateFromTsMs",{enumerable:!0,get:function(){return(0,t.__importDefault)(i).default}}),(0,t.__exportStar)(eq,e),e.Function=(0,t.__importStar)(Xe);var o=Z$;Object.defineProperty(e,"IntFromNumber",{enumerable:!0,get:function(){return(0,t.__importDefault)(o).default}});var a=X$;Object.defineProperty(e,"IntFromPixels",{enumerable:!0,get:function(){return(0,t.__importDefault)(a).default}});var s=eR;Object.defineProperty(e,"NonEmptyString",{enumerable:!0,get:function(){return(0,t.__importDefault)(s).default}});var u=tR;Object.defineProperty(e,"NonEmptyStringOrNull",{enumerable:!0,get:function(){return(0,t.__importDefault)(u).default}});var c=nR;Object.defineProperty(e,"NumberOrNull",{enumerable:!0,get:function(){return(0,t.__importDefault)(c).default}});var l=rR;Object.defineProperty(e,"NumberRange",{enumerable:!0,get:function(){return(0,t.__importDefault)(l).default}});var d=iR;Object.defineProperty(e,"StringFromBoolean",{enumerable:!0,get:function(){return(0,t.__importDefault)(d).default}});var p=oR;Object.defineProperty(e,"StringFromNumber",{enumerable:!0,get:function(){return(0,t.__importDefault)(p).default}});var A=M0;Object.defineProperty(e,"StringOrNull",{enumerable:!0,get:function(){return(0,t.__importDefault)(A).default}})}(mb)),mb}var Ti={},wr={},hd={},Na={},aR={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BooleanField=e.BooleanConfig=e.BooleanFieldType=void 0;const n=(0,Q.__importStar)(Z),r=ft();e.BooleanFieldType="Boolean",e.BooleanConfig=n.exact(n.partial({label:r.StringOrNull,default_value:n.boolean,placeholder_true:n.string,placeholder_false:n.string})),e.BooleanField=n.exact(n.intersection([n.type({type:n.literal(e.BooleanFieldType)}),n.partial({config:e.BooleanConfig})]))})(aR);var sR={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Color=e.ColorConfig=e.ColorFieldType=void 0;const n=(0,Q.__importStar)(Z),r=ft();e.ColorFieldType="Color",e.ColorConfig=n.exact(n.partial({label:r.StringOrNull,placeholder:n.string})),e.Color=n.exact(n.intersection([n.type({type:n.literal(e.ColorFieldType)}),n.partial({fieldset:r.StringOrNull,config:e.ColorConfig})]))})(sR);var uR={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Date=e.DateConfig=e.DateFieldType=void 0;const n=(0,Q.__importStar)(Z),r=ft();e.DateFieldType="Date",e.DateConfig=n.exact(n.partial({label:r.StringOrNull,placeholder:n.string,default:n.string})),e.Date=n.exact(n.intersection([n.type({type:n.literal(e.DateFieldType)}),n.partial({fieldset:r.StringOrNull,config:e.DateConfig})]))})(uR);var cR={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Embed=e.EmbedConfig=e.EmbedFieldType=void 0;const n=(0,Q.__importStar)(Z),r=ft();e.EmbedFieldType="Embed",e.EmbedConfig=n.exact(n.partial({label:r.StringOrNull,placeholder:n.string,useAsTitle:n.boolean})),e.Embed=n.exact(n.intersection([n.type({type:n.literal(e.EmbedFieldType)}),n.partial({fieldset:r.StringOrNull,config:e.EmbedConfig})]))})(cR);var lR={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.GeoPoint=e.GeoPointConfig=e.GeoPointFieldType=void 0;const n=(0,Q.__importStar)(Z),r=ft();e.GeoPointFieldType="GeoPoint",e.GeoPointConfig=n.exact(n.partial({label:r.StringOrNull})),e.GeoPoint=n.exact(n.intersection([n.type({type:n.literal(e.GeoPointFieldType)}),n.partial({fieldset:r.StringOrNull,config:e.GeoPointConfig})]))})(lR);var fR={},gh={},L0={},md={},$u={};Object.defineProperty($u,"__esModule",{value:!0});$u.pipe=$u.pipeable=void 0;var rC=Ge,_Ie=function(e){return typeof e.map=="function"},IIe=function(e){return typeof e.contramap=="function"},TIe=function(e){return typeof e.mapWithIndex=="function"},xIe=function(e){return typeof e.ap=="function"},wIe=function(e){return typeof e.chain=="function"},EIe=function(e){return typeof e.bimap=="function"},$Ie=function(e){return typeof e.extend=="function"},RIe=function(e){return typeof e.reduce=="function"},OIe=function(e){return typeof e.reduceWithIndex=="function"},FIe=function(e){return typeof e.alt=="function"},kIe=function(e){return typeof e.compact=="function"},MIe=function(e){return typeof e.filter=="function"},LIe=function(e){return typeof e.filterWithIndex=="function"},jIe=function(e){return typeof e.promap=="function"},UIe=function(e){return typeof e.compose=="function"},BIe=function(e){return typeof e.throwError=="function"};function PIe(e){var t={};if(_Ie(e)){var n=function(M){return function(k){return e.map(k,M)}};t.map=n}if(IIe(e)){var r=function(M){return function(k){return e.contramap(k,M)}};t.contramap=r}if(TIe(e)){var i=function(M){return function(k){return e.mapWithIndex(k,M)}};t.mapWithIndex=i}if(xIe(e)){var o=function(M){return function(k){return e.ap(k,M)}},a=function(M){return function(k){return e.ap(e.map(k,function(q){return function(){return q}}),M)}};t.ap=o,t.apFirst=a,t.apSecond=function(M){return function(k){return e.ap(e.map(k,function(){return function(q){return q}}),M)}}}if(wIe(e)){var s=function(M){return function(k){return e.chain(k,M)}},u=function(M){return function(k){return e.chain(k,function(q){return e.map(M(q),function(){return q})})}},c=function(M){return e.chain(M,rC.identity)};t.chain=s,t.chainFirst=u,t.flatten=c}if(EIe(e)){var l=function(M,k){return function(q){return e.bimap(q,M,k)}},d=function(M){return function(k){return e.mapLeft(k,M)}};t.bimap=l,t.mapLeft=d}if($Ie(e)){var p=function(M){return function(k){return e.extend(k,M)}},A=function(M){return e.extend(M,rC.identity)};t.extend=p,t.duplicate=A}if(RIe(e)){var m=function(M,k){return function(q){return e.reduce(q,M,k)}},g=function(M){var k=e.foldMap(M);return function(q){return function(ue){return k(ue,q)}}},_=function(M,k){return function(q){return e.reduceRight(q,M,k)}};t.reduce=m,t.foldMap=g,t.reduceRight=_}if(OIe(e)){var b=function(M,k){return function(q){return e.reduceWithIndex(q,M,k)}},I=function(M){var k=e.foldMapWithIndex(M);return function(q){return function(ue){return k(ue,q)}}},x=function(M,k){return function(q){return e.reduceRightWithIndex(q,M,k)}};t.reduceWithIndex=b,t.foldMapWithIndex=I,t.reduceRightWithIndex=x}if(FIe(e)){var v=function(M){return function(k){return e.alt(k,M)}};t.alt=v}if(kIe(e)&&(t.compact=e.compact,t.separate=e.separate),MIe(e)){var S=function(M){return function(k){return e.filter(k,M)}},y=function(M){return function(k){return e.filterMap(k,M)}},T=function(M){return function(k){return e.partition(k,M)}},w=function(M){return function(k){return e.partitionMap(k,M)}};t.filter=S,t.filterMap=y,t.partition=T,t.partitionMap=w}if(LIe(e)){var O=function(M){return function(k){return e.filterWithIndex(k,M)}},F=function(M){return function(k){return e.filterMapWithIndex(k,M)}},$=function(M){return function(k){return e.partitionWithIndex(k,M)}},P=function(M){return function(k){return e.partitionMapWithIndex(k,M)}};t.filterWithIndex=O,t.filterMapWithIndex=F,t.partitionWithIndex=$,t.partitionMapWithIndex=P}if(jIe(e)){var K=function(M,k){return function(q){return e.promap(q,M,k)}};t.promap=K}if(UIe(e)){var J=function(M){return function(k){return e.compose(k,M)}};t.compose=J}if(BIe(e)){var ee=function(M){return function(k){return k._tag==="None"?e.throwError(M()):e.of(k.value)}},re=function(M){return M._tag==="Left"?e.throwError(M.left):e.of(M.right)},D=function(M,k){return function(q){return M(q)?e.of(q):e.throwError(k(q))}},Y=function(M,k){return function(q){return e.chain(q,function(ue){return M(ue)?e.of(ue):e.throwError(k(ue))})}};t.fromOption=ee,t.fromEither=re,t.fromPredicate=D,t.filterOrElse=Y}return t}$u.pipeable=PIe;$u.pipe=rC.pipe;var DIe=he&&he.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),WIe=he&&he.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),KIe=he&&he.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)Object.hasOwnProperty.call(e,n)&&DIe(t,e,n);return WIe(t,e),t};Object.defineProperty(md,"__esModule",{value:!0});md.NumberFromString=void 0;var bd=KIe(Z),NIe=$u,qIe=ln;md.NumberFromString=new bd.Type("NumberFromString",bd.number.is,function(e,t){return NIe.pipe(bd.string.validate(e,t),qIe.chain(function(n){var r=+n;return isNaN(r)||n.trim()===""?bd.failure(e,t):bd.success(r)}))},String);var VIe=he&&he.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),QIe=he&&he.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),zIe=he&&he.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)Object.hasOwnProperty.call(e,n)&&VIe(t,e,n);return QIe(t,e),t};Object.defineProperty(L0,"__esModule",{value:!0});L0.IntFromString=void 0;var Cd=zIe(Z),eF=md,HIe=$u,YIe=ln;L0.IntFromString=new Cd.Type("IntFromString",Cd.Int.is,function(e,t){return HIe.pipe(eF.NumberFromString.validate(e,t),YIe.chain(function(n){return Cd.Int.is(n)?Cd.success(n):Cd.failure(e,t)}))},eF.NumberFromString.encode);Object.defineProperty(gh,"__esModule",{value:!0});const GIe=Q,JIe=ln,qo=(0,GIe.__importStar)(Z),ZIe=L0,tF=ft(),nF=new qo.Type("SideConstraints",e=>!e||typeof e=="number",(e,t)=>JIe.either.chain(qo.union([qo.literal("auto"),qo.literal(""),qo.Int,ZIe.IntFromString,tF.IntFromNumber,tF.IntFromPixels,qo.null]).validate(e,t),n=>n==="auto"||n===""?qo.success(null):qo.success(n)),e=>e),XIe=qo.partial({width:nF,height:nF});gh.default=XIe;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Image=e.ImageConfig=e.Thumbnail=e.ImageFieldType=void 0;const t=Q,n=(0,t.__importStar)(Z),r=ft(),i=(0,t.__importDefault)(gh);e.ImageFieldType="Image",e.Thumbnail=n.exact(n.intersection([n.type({name:n.string}),i.default])),e.ImageConfig=n.exact(n.partial({label:r.StringOrNull,placeholder:n.string,constraint:i.default,thumbnails:n.readonlyArray(e.Thumbnail)})),e.Image=n.exact(n.intersection([n.type({type:n.literal(e.ImageFieldType)}),n.partial({fieldset:r.StringOrNull,config:e.ImageConfig})]))})(fR);var dR={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.IntegrationField=e.IntegrationFieldConfig=e.IntegrationFieldType=void 0;const n=(0,Q.__importStar)(Z),r=ft();e.IntegrationFieldType="IntegrationFields",e.IntegrationFieldConfig=n.exact(n.partial({label:r.StringOrNull,placeholder:n.string,catalog:n.string})),e.IntegrationField=n.exact(n.intersection([n.type({type:n.literal(e.IntegrationFieldType)}),n.partial({fieldset:r.StringOrNull,config:e.IntegrationFieldConfig})]))})(dR);var pR={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Link=e.LinkConfig=e.LinkFieldType=void 0;const t=Q,n=ln,r=(0,t.__importStar)(Z),i=Ad,o=ft(),a=c=>{if(c instanceof Array&&c.reduce((d,p)=>d&&typeof p=="string",!0))return r.success(c)},s=c=>{if(typeof c=="string")return r.success([c])},u=new r.Type("MasksArrayString",c=>c instanceof Array,(c,l)=>n.either.chain(r.union([r.array(r.string),r.string]).validate(c,l),d=>a(d)||s(d)||r.failure(c,l)),c=>c);e.LinkFieldType="Link",e.LinkConfig=r.exact(r.partial({label:o.StringOrNull,useAsTitle:r.boolean,placeholder:r.string,select:(0,i.withFallback)(r.union([r.literal("media"),r.literal("document"),r.literal("web"),r.null]),null),customtypes:r.readonlyArray(r.string),masks:u,tags:u,allowTargetBlank:r.boolean,allowText:r.boolean})),e.Link=r.exact(r.intersection([r.type({type:r.literal(e.LinkFieldType)}),r.partial({fieldset:o.StringOrNull,config:e.LinkConfig})]))})(pR);var AR={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Number=e.NumberConfig=e.NumberFieldType=void 0;const n=(0,Q.__importStar)(Z),r=md,i=ft();e.NumberFieldType="Number",e.NumberConfig=n.exact(n.partial({label:i.StringOrNull,placeholder:n.string,min:n.union([n.number,r.NumberFromString]),max:n.union([n.number,r.NumberFromString]),step:n.union([n.number,r.NumberFromString])})),e.Number=n.exact(n.intersection([n.type({type:n.literal(e.NumberFieldType)}),n.partial({fieldset:i.StringOrNull,config:e.NumberConfig})]))})(AR);var hR={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Range=e.RangeConfig=e.RangeFieldType=void 0;const n=(0,Q.__importStar)(Z),r=md,i=ft();e.RangeFieldType="Range",e.RangeConfig=n.exact(n.partial({label:i.StringOrNull,placeholder:n.string,min:n.union([n.number,r.NumberFromString]),max:n.union([n.number,r.NumberFromString]),step:n.union([n.number,r.NumberFromString])})),e.Range=n.exact(n.intersection([n.type({type:n.literal(e.RangeFieldType)}),n.partial({fieldset:i.StringOrNull,config:e.RangeConfig})]))})(hR);var mR={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RichText=e.RichTextConfig=e.RichTextNodeTypeCodec=e.RichTextNodeType=e.DEFAULT_OPTION=e.RichTextFieldType=void 0;const t=Q,n=lt,r=ln,i=Ge,o=(0,t.__importStar)(Z),a=ft(),s=(0,t.__importDefault)(gh);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=o.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});const u=new o.Type("RichTextOptions",m=>typeof m=="string",m=>(0,i.pipe)(o.union([o.string,o.null]).decode(m),n.either.map(g=>{if(!g)return e.DEFAULT_OPTION;const b=g.split(",").map(I=>I.trim()).filter(I=>(0,r.getOrElseW)(()=>{})(e.RichTextNodeTypeCodec.decode(I)));return b.length?b.join(","):e.DEFAULT_OPTION})),m=>m),c=m=>{if(!m)return o.success([])},l=m=>{if(m instanceof Object){const g=m;if(!Object.entries(g).length)return o.success([]);if(g[""])return o.success(g[""].map(b=>b.name));const _=Object.entries(g).reduce((b,[,I])=>b.concat(I.map(x=>x.name)),[]).filter(Boolean);return o.success(_)}},d=m=>{if(m instanceof Array&&m.reduce((_,b)=>_&&typeof b=="string",!0))return o.success(m)},p=m=>{if(typeof m=="string")return o.success([m])},A=new o.Type("RichTextLabels",m=>m instanceof Array,(m,g)=>{const _=o.record(o.string,o.readonlyArray(o.record(o.literal("name"),o.string))),b=o.readonlyArray(o.string);return(0,i.pipe)(o.union([_,b,o.string,o.null]).decode(m),n.either.chain(I=>c(I)||d(I)||l(I)||p(I)||o.failure(m,g)))},m=>m);e.RichTextConfig=o.exact(o.partial({label:a.StringOrNull,placeholder:o.string,useAsTitle:o.boolean,single:u,multi:u,imageConstraint:s.default,labels:A,allowTargetBlank:o.boolean})),e.RichText=o.exact(o.intersection([o.type({type:o.literal(e.RichTextFieldType)}),o.partial({fieldset:a.StringOrNull,config:e.RichTextConfig})]))})(mR);var gR={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Select=e.SelectConfig=e.SelectFieldType=void 0;const n=(0,Q.__importStar)(Z),r=ft();e.SelectFieldType="Select",e.SelectConfig=n.exact(n.partial({label:r.StringOrNull,placeholder:n.string,default_value:n.string,options:n.readonlyArray(n.union([n.string,r.StringFromNumber,r.StringFromBoolean]))})),e.Select=n.exact(n.intersection([n.type({type:n.literal(e.SelectFieldType)}),n.partial({fieldset:r.StringOrNull,config:e.SelectConfig})]))})(gR);var vR={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Separator=e.SeparatorConfig=e.SeparatorFieldType=void 0;const n=(0,Q.__importStar)(Z),r=ft();e.SeparatorFieldType="Separator",e.SeparatorConfig=n.exact(n.partial({label:r.StringOrNull})),e.Separator=n.exact(n.intersection([n.type({type:n.literal(e.SeparatorFieldType)}),n.partial({config:e.SeparatorConfig})]))})(vR);var yR={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Text=e.TextConfig=e.TextFieldType=void 0;const n=(0,Q.__importStar)(Z),r=ft();e.TextFieldType="Text",e.TextConfig=n.exact(n.partial({label:r.StringOrNull,useAsTitle:n.boolean,placeholder:n.string})),e.Text=n.exact(n.intersection([n.type({type:n.literal(e.TextFieldType)}),n.partial({fieldset:r.StringOrNull,config:e.TextConfig})]))})(yR);var bR={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Timestamp=e.TimestampConfig=e.TimestampFieldType=void 0;const n=(0,Q.__importStar)(Z),r=ft();e.TimestampFieldType="Timestamp",e.TimestampConfig=n.exact(n.partial({label:r.StringOrNull,placeholder:n.string,default:n.string})),e.Timestamp=n.exact(n.intersection([n.type({type:n.literal(e.TimestampFieldType)}),n.partial({fieldset:r.StringOrNull,config:e.TimestampConfig})]))})(bR);Object.defineProperty(Na,"__esModule",{value:!0});Na.NestableWidget=void 0;const eTe=Q,tTe=(0,eTe.__importStar)(Z),nTe=aR,rTe=sR,iTe=uR,oTe=cR,aTe=lR,sTe=fR,uTe=dR,cTe=pR,lTe=AR,fTe=hR,dTe=mR,pTe=gR,ATe=vR,hTe=yR,mTe=bR;Na.NestableWidget=tTe.union([rTe.Color,nTe.BooleanField,oTe.Embed,aTe.GeoPoint,iTe.Date,lTe.Number,fTe.Range,dTe.RichText,pTe.Select,ATe.Separator,hTe.Text,mTe.Timestamp,cTe.Link,sTe.Image,uTe.IntegrationField]);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Group=e.GroupConfig=e.NestedGroup=e.NestedGroupConfig=e.GroupFieldType=void 0;const n=(0,Q.__importStar)(Z),r=Lc,i=ft(),o=Na;e.GroupFieldType="Group";const a=u=>n.exact(n.partial({label:i.StringOrNull,repeat:n.boolean,fields:n.record(r.WidgetKey,u)})),s=u=>n.exact(n.intersection([n.type({type:n.literal(e.GroupFieldType)}),n.partial({fieldset:i.StringOrNull,icon:n.string,description:n.string,config:a(u)})]));e.NestedGroupConfig=a(o.NestableWidget),e.NestedGroup=s(o.NestableWidget),e.GroupConfig=a(n.union([o.NestableWidget,e.NestedGroup])),e.Group=s(n.union([o.NestableWidget,e.NestedGroup]))})(hd);var vh={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Q;(0,t.__exportStar)(aR,e),(0,t.__exportStar)(sR,e),(0,t.__exportStar)(uR,e),(0,t.__exportStar)(cR,e),(0,t.__exportStar)(lR,e),(0,t.__exportStar)(fR,e),(0,t.__exportStar)(dR,e),(0,t.__exportStar)(pR,e),(0,t.__exportStar)(Na,e),(0,t.__exportStar)(AR,e),(0,t.__exportStar)(hR,e),(0,t.__exportStar)(mR,e),(0,t.__exportStar)(gR,e),(0,t.__exportStar)(vR,e),(0,t.__exportStar)(yR,e),(0,t.__exportStar)(bR,e)})(vh);var CR={},j0={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isCompositeSlice=e.CompositeSlice=e.CompositeSliceConfig=e.CompositeSliceType=void 0;const n=(0,Q.__importStar)(Z),r=Lc,i=ft(),o=Na;e.CompositeSliceType="Slice",e.CompositeSliceConfig=n.exact(n.partial({label:i.StringOrNull})),e.CompositeSlice=n.exact(n.intersection([n.type({type:n.literal(e.CompositeSliceType)}),n.partial({fieldset:i.StringOrNull,description:n.string,icon:n.string,display:n.string,"non-repeat":n.record(r.WidgetKey,o.NestableWidget),repeat:n.record(r.WidgetKey,o.NestableWidget),config:e.CompositeSliceConfig})]));function a(s){return s.type==="Slice"}e.isCompositeSlice=a})(j0);var Ru={};Object.defineProperty(Ru,"__esModule",{value:!0});Ru.isLegacySlice=Ru.LegacySlice=void 0;const gTe=Q,vTe=(0,gTe.__importStar)(Z),yTe=hd,bTe=Na;Ru.LegacySlice=vTe.union([bTe.NestableWidget,yTe.NestedGroup]);function CTe(e){return e.type!=="Slice"&&e.type!=="SharedSlice"}Ru.isLegacySlice=CTe;var yh={},Ou={};Object.defineProperty(Ou,"__esModule",{value:!0});Ou.isSlicePrimaryWidget=Ou.SlicePrimaryWidget=void 0;const STe=Q,_Te=(0,STe.__importStar)(Z),tq=hd,nq=vh;Ou.SlicePrimaryWidget=_Te.union([nq.NestableWidget,tq.Group]);const ITe=e=>nq.NestableWidget.is(e)||tq.Group.is(e);Ou.isSlicePrimaryWidget=ITe;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isDynamicSharedSlice=e.isStaticSharedSlice=e.SharedSlice=e.SharedSliceType=e.Variation=void 0;const n=(0,Q.__importStar)(Z),r=Ad,i=Lc,o=Na,a=Ou,s="https://images.prismic.io/slice-machine/621a5ec4-0387-4bc5-9860-2dd46cbc07cd_default_ss.png?auto=compress,format";e.Variation=n.exact(n.intersection([n.type({id:n.string,name:n.string,description:n.string,imageUrl:(0,r.withFallback)(n.string,s),docURL:n.string,version:n.string}),n.partial({display:n.string,primary:n.record(i.WidgetKey,a.SlicePrimaryWidget),items:n.record(i.WidgetKey,o.NestableWidget)})])),e.SharedSliceType="SharedSlice";const u=n.string,c=n.string;e.SharedSlice=n.exact(n.intersection([n.type({id:n.string,type:n.literal(e.SharedSliceType),name:n.string,variations:n.readonlyArray(e.Variation)}),n.partial({description:n.string,legacyPaths:n.record(u,c)})]));function l(p){return p.type==="SharedSlice"}e.isStaticSharedSlice=l;function d(p){return p.type==="SharedSlice"}e.isDynamicSharedSlice=d})(yh);var bh={};Object.defineProperty(bh,"__esModule",{value:!0});bh.SharedSliceRef=void 0;const TTe=Q,vb=(0,TTe.__importStar)(Z),xTe=yh;bh.SharedSliceRef=vb.exact(vb.type({type:vb.literal(xTe.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;const n=(0,Q.__importStar)(Z),r=Lc,i=ft(),o=j0,a=Ru,s=yh,u=bh;e.LegacySlicesFieldType="Choice",e.SlicesFieldType="Slices",e.SlicesLabels=n.union([n.record(n.string,n.readonlyArray(n.exact(n.intersection([n.type({name:n.string}),n.partial({display:n.string})])))),n.null]);function c(p){return n.exact(n.partial({label:i.StringOrNull,labels:e.SlicesLabels,choices:n.record(r.WidgetKey,n.union([a.LegacySlice,o.CompositeSlice,p]))}))}e.slicesConfigReader=c,e.StaticSlicesConfig=c(s.SharedSlice),e.DynamicSlicesConfig=c(u.SharedSliceRef);const l={toStatic(p,A){const m=Object.entries(p.choices||{}).reduce((g,[_,b])=>{if(b.type==="SharedSlice"){const I=A.get(_);return I?{...g,[_]:I}:g}else return{...g,[_]:b}},{});return{...p,choices:m}}};function d(p){return n.exact(n.intersection([n.type({type:n.keyof({[e.SlicesFieldType]:null,[e.LegacySlicesFieldType]:null})}),n.partial({fieldset:i.StringOrNull,config:p})]))}e.slicesReader=d,e.StaticSlices=d(e.StaticSlicesConfig),e.DynamicSlices=d(e.DynamicSlicesConfig),e.Slices={toStatic(p,A){return p.config?{...p,config:l.toStatic(p.config,A)}:p}}})(CR);var SR={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.UID=e.UIDConfig=e.UIDFieldType=void 0;const n=(0,Q.__importStar)(Z),r=ft();e.UIDFieldType="UID",e.UIDConfig=n.exact(n.partial({label:r.StringOrNull,useAsTitle:n.boolean,placeholder:n.string})),e.UID=n.exact(n.intersection([n.type({type:n.literal(e.UIDFieldType)}),n.partial({fieldset:r.StringOrNull,config:e.UIDConfig})]))})(SR);Object.defineProperty(wr,"__esModule",{value:!0});wr.Widgets=wr.FieldType=wr.DynamicWidget=wr.StaticWidget=wr.widgetReader=void 0;const wTe=Q,rq=(0,wTe.__importStar)(Z),iq=hd,Nn=vh,ETe=Na,rp=CR,oq=SR;function _R(e){return rq.union([oq.UID,ETe.NestableWidget,iq.Group,e])}wr.widgetReader=_R;wr.StaticWidget=_R(rp.StaticSlices);wr.DynamicWidget=_R(rp.DynamicSlices);wr.FieldType=rq.keyof({[Nn.ColorFieldType]:null,[Nn.BooleanFieldType]:null,[Nn.NumberFieldType]:null,[Nn.EmbedFieldType]:null,[Nn.GeoPointFieldType]:null,[Nn.DateFieldType]:null,[Nn.RangeFieldType]:null,[Nn.RichTextFieldType]:null,[Nn.SelectFieldType]:null,[Nn.SeparatorFieldType]:null,[Nn.TextFieldType]:null,[Nn.TimestampFieldType]:null,[Nn.LinkFieldType]:null,[Nn.ImageFieldType]:null,[Nn.IntegrationFieldType]:null,[oq.UIDFieldType]:null,[iq.GroupFieldType]:null,[rp.SlicesFieldType]:null,[rp.LegacySlicesFieldType]:null});wr.Widgets={toStatic(e,t){switch(e.type){case"Choice":case"Slices":return rp.Slices.toStatic(e,t);default:return e}}};Object.defineProperty(Ti,"__esModule",{value:!0});Ti.Sections=Ti.DynamicSection=Ti.StaticSection=Ti.sectionReader=void 0;const $Te=Q,RTe=(0,$Te.__importStar)(Z),OTe=Lc,IR=wr;function TR(e){return RTe.record(OTe.WidgetKey,e)}Ti.sectionReader=TR;Ti.StaticSection=TR(IR.StaticWidget);Ti.DynamicSection=TR(IR.DynamicWidget);Ti.Sections={toStatic(e,t){return Object.entries(e).reduce((r,[i,o])=>({...r,[i]:IR.Widgets.toStatic(o,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;const t=Q,n=ln,r=(0,t.__importStar)(Z),i=Ad,o=ft(),a=Ti;e.CustomTypeFormat={page:"page",custom:"custom"};class s extends Error{constructor(v){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=v,this.message=this._formatError(v)}_formatError(v){return`The following slices doesn't exists in your Prismic repository:
28
+ `).length;return f.jsx(h.ErrorBoundary,{renderError:()=>f.jsx(h.Alert,{title:"Oops! We couldn't load the Code Block",color:"error",noShadow:!0,footerButtons:{action:{onClick:()=>window.location.reload(),text:"Refresh page"}}}),children:f.jsx(E.Suspense,{fallback:f.jsx(h.Skeleton,{height:Az+hz+t*pz,borderRadius:6}),children:f.jsx(h.LazyCodeBlock,{...e})})})}var ye={},B1=function(e,t){return B1=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},B1(e,t)};function mz(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");B1(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var P1=function(){return P1=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},P1.apply(this,arguments)};function gz(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function vz(e,t,n,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(o=(i<3?a(o):i>3?a(t,n,o):a(t,n))||o);return i>3&&o&&Object.defineProperty(t,n,o),o}function yz(e,t){return function(n,r){t(n,r,e)}}function bz(e,t,n,r,i,o){function a(b){if(b!==void 0&&typeof b!="function")throw new TypeError("Function expected");return b}for(var s=r.kind,u=s==="getter"?"get":s==="setter"?"set":"value",c=!t&&e?r.static?e:e.prototype:null,l=t||(c?Object.getOwnPropertyDescriptor(c,r.name):{}),d,p=!1,A=n.length-1;A>=0;A--){var m={};for(var g in r)m[g]=g==="access"?{}:r[g];for(var g in r.access)m.access[g]=r.access[g];m.addInitializer=function(b){if(p)throw new TypeError("Cannot add initializers after decoration has completed");o.push(a(b||null))};var _=(0,n[A])(s==="accessor"?{get:l.get,set:l.set}:l[u],m);if(s==="accessor"){if(_===void 0)continue;if(_===null||typeof _!="object")throw new TypeError("Object expected");(d=a(_.get))&&(l.get=d),(d=a(_.set))&&(l.set=d),(d=a(_.init))&&i.push(d)}else(d=a(_))&&(s==="field"?i.push(d):l[u]=d)}c&&Object.defineProperty(c,r.name,l),p=!0}function Cz(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}function Sz(e){return typeof e=="symbol"?e:"".concat(e)}function _z(e,t,n){return typeof t=="symbol"&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})}function Iz(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function Tz(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(l){try{c(r.next(l))}catch(d){a(d)}}function u(l){try{c(r.throw(l))}catch(d){a(d)}}function c(l){l.done?o(l.value):i(l.value).then(s,u)}c((r=r.apply(e,t||[])).next())})}function xz(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(c){return function(l){return u([c,l])}}function u(c){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(n=0)),n;)try{if(r=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(l){c=[6,l],i=0}finally{r=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}var rS=Object.create?function(e,t,n,r){r===void 0&&(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){r===void 0&&(r=n),e[r]=t[n]};function wz(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&rS(t,e,n)}function D1(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function HM(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function Ez(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(HM(arguments[t]));return e}function $z(){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,s=o.length;a<s;a++,i++)r[i]=o[a];return r}function Rz(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}function Kd(e){return this instanceof Kd?(this.v=e,this):new Kd(e)}function Oz(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),i,o=[];return i={},a("next"),a("throw"),a("return"),i[Symbol.asyncIterator]=function(){return this},i;function a(p){r[p]&&(i[p]=function(A){return new Promise(function(m,g){o.push([p,A,m,g])>1||s(p,A)})})}function s(p,A){try{u(r[p](A))}catch(m){d(o[0][3],m)}}function u(p){p.value instanceof Kd?Promise.resolve(p.value.v).then(c,l):d(o[0][2],p)}function c(p){s("next",p)}function l(p){s("throw",p)}function d(p,A){p(A),o.shift(),o.length&&s(o[0][0],o[0][1])}}function Fz(e){var t,n;return t={},r("next"),r("throw",function(i){throw i}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(i,o){t[i]=e[i]?function(a){return(n=!n)?{value:Kd(e[i](a)),done:!1}:o?o(a):a}:o}}function kz(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof D1=="function"?D1(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[o]=e[o]&&function(a){return new Promise(function(s,u){a=e[o](a),i(s,u,a.done,a.value)})}}function i(o,a,s,u){Promise.resolve(u).then(function(c){o({value:c,done:s})},a)}}function Mz(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var Lz=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function jz(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&rS(t,e,n);return Lz(t,e),t}function Uz(e){return e&&e.__esModule?e:{default:e}}function Bz(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)}function Pz(e,t,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(e,n):i?i.value=n:t.set(e,n),n}function Dz(e,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?t===e:e.has(t)}const Wz=Object.freeze(Object.defineProperty({__proto__:null,get __assign(){return P1},__asyncDelegator:Fz,__asyncGenerator:Oz,__asyncValues:kz,__await:Kd,__awaiter:Tz,__classPrivateFieldGet:Bz,__classPrivateFieldIn:Dz,__classPrivateFieldSet:Pz,__createBinding:rS,__decorate:vz,__esDecorate:bz,__exportStar:wz,__extends:mz,__generator:xz,__importDefault:Uz,__importStar:jz,__makeTemplateObject:Mz,__metadata:Iz,__param:yz,__propKey:Sz,__read:HM,__rest:gz,__runInitializers:Cz,__setFunctionName:_z,__spread:Ez,__spreadArray:Rz,__spreadArrays:$z,__values:D1},Symbol.toStringTag,{value:"Module"})),Q=Ku(Wz);var or={};function YM(e){return function(t){return function(n){return n.reduce(function(r,i){return e.alt(r,function(){return i})},t)}}}const Kz=Object.freeze(Object.defineProperty({__proto__:null,altAll:YM},Symbol.toStringTag,{value:"Module"}));function Nz(e){return YM(e)(e.zero())}const qz=Object.freeze(Object.defineProperty({__proto__:null,altAll:Nz},Symbol.toStringTag,{value:"Module"}));var GM=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))}}}}},iS=function(e){return function(){return{concat:function(t,n){return function(r){return e.concat(t(r),n(r))}}}}},JM=function(e){var t=iS(e);return function(){return{concat:t().concat,empty:function(){return e.empty}}}},oS=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}}},ZM=function(e){var t=oS(e);return{add:t.add,mul:t.mul,one:t.one,zero:t.zero,sub:function(n,r){return function(i){return e.sub(n(i),r(i))}}}},Vz=function(e){return function(t){return t(e)}};function N(e){return e}var bl=N;function pr(e){return function(){return e}}var aS=pr(!0),XM=pr(!1),eL=pr(null),sS=pr(void 0),Qz=sS;function zz(e){return function(t,n){return e(n,t)}}function H(e,t,n,r,i,o,a,s,u){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 s(a(o(i(r(n(t(e.apply(this,arguments))))))))};case 9:return function(){return u(s(a(o(i(r(n(t(e.apply(this,arguments)))))))))}}}function tL(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e}function Hz(e){return e+1}function Yz(e){return e-1}function nL(e){throw new Error("Called `absurd` function which should be uncallable")}function Gz(e){return function(t){return e.apply(void 0,t)}}function Jz(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e(t)}}function C(e,t,n,r,i,o,a,s,u){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 s(a(o(i(r(n(t(e)))))));case 9:return u(s(a(o(i(r(n(t(e))))))));default:{for(var c=arguments[0],l=1;l<arguments.length;l++)c=arguments[l](c);return c}}}var Zz=nL,Ar=function(e,t){return t};function Xz(e){return function(t){return!e(t)}}var eH=function(){return{concat:function(e,t){return H(e,t)},empty:N}};const rL=Object.freeze(Object.defineProperty({__proto__:null,SK:Ar,absurd:nL,apply:Vz,constFalse:XM,constNull:eL,constTrue:aS,constUndefined:sS,constVoid:Qz,constant:pr,decrement:Yz,flip:zz,flow:H,getBooleanAlgebra:GM,getEndomorphismMonoid:eH,getMonoid:JM,getRing:ZM,getSemigroup:iS,getSemiring:oS,hole:Zz,identity:N,increment:Hz,not:Xz,pipe:C,tuple:tL,tupled:Gz,unsafeCoerce:bl,untupled:Jz},Symbol.toStringTag,{value:"Module"}));var tH=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},Vt=function(e){return e._tag==="None"},It=function(e){return e._tag==="Some"},Ce={_tag:"None"},de=function(e){return{_tag:"Some",value:e}},nn=function(e){return e._tag==="Left"},uS=function(e){return e._tag==="Right"},ea=function(e){return{_tag:"Left",left:e}},hs=function(e){return{_tag:"Right",right:e}},$p=function(e){return[e]},yt=function(e){return e.length>0},jr=function(e){return e[0]},zl=function(e){return e.slice(1)},Sn=[],on={},pt=Object.prototype.hasOwnProperty,Sg=function(e){return tH([e[0]],e.slice(1),!0)};function ua(e,t){return function(n){return function(r){return e.ap(e.map(r,function(i){return function(o){return t.ap(i,o)}}),n)}}}function Lt(e){return function(t){return function(n){return e.ap(e.map(n,function(r){return function(){return r}}),t)}}}function jt(e){return function(t){return function(n){return e.ap(e.map(n,function(){return function(r){return r}}),t)}}}function Ut(e){return function(t,n){return function(r){return e.ap(e.map(r,function(i){return function(o){var a;return Object.assign({},i,(a={},a[t]=o,a))}}),n)}}}function an(e){return function(t){return{concat:function(n,r){return e.ap(e.map(n,function(i){return function(o){return t.concat(i,o)}}),r)}}}}function cS(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,t===0?e.apply(null,i):cS(e,t-1,i)}}var pb={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]}}}}}};function nH(e){return pt.call(pb,e)||(pb[e]=cS(tL,e-1,[])),pb[e]}function rH(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r=t.length,i=nH(r),o=e.map(t[0],i),a=1;a<r;a++)o=e.ap(o,t[a]);return o}}function iH(e){var t=e.length;switch(t){case 1:return function(n){var r;return r={},r[e[0]]=n,r};case 2:return function(n){return function(r){var i;return i={},i[e[0]]=n,i[e[1]]=r,i}};case 3:return function(n){return function(r){return function(i){var o;return o={},o[e[0]]=n,o[e[1]]=r,o[e[2]]=i,o}}};case 4:return function(n){return function(r){return function(i){return function(o){var a;return a={},a[e[0]]=n,a[e[1]]=r,a[e[2]]=i,a[e[3]]=o,a}}}};case 5:return function(n){return function(r){return function(i){return function(o){return function(a){var s;return s={},s[e[0]]=n,s[e[1]]=r,s[e[2]]=i,s[e[3]]=o,s[e[4]]=a,s}}}}};default:return cS(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,[])}}function oH(e){return function(t){for(var n=Object.keys(t),r=n.length,i=iH(n),o=e.map(t[n[0]],i),a=1;a<r;a++)o=e.ap(o,t[n[a]]);return o}}const aH=Object.freeze(Object.defineProperty({__proto__:null,ap:ua,apFirst:Lt,apS:Ut,apSecond:jt,getApplySemigroup:an,sequenceS:oH,sequenceT:rH},Symbol.toStringTag,{value:"Module"}));function Hl(e,t){return function(n){return function(r){return e.map(r,function(i){return t.map(i,n)})}}}function Qe(e){return function(t){return function(n){return e.map(n,function(r){return r(t)})}}}function Bt(e){return function(t){return function(n){return e.map(n,function(r){var i;return i={},i[t]=r,i})}}}function Yl(e,t){var n=Hl(e,t);return{map:function(r,i){return C(r,n(i))}}}const sH=Object.freeze(Object.defineProperty({__proto__:null,bindTo:Bt,flap:Qe,getFunctorComposition:Yl,map:Hl},Symbol.toStringTag,{value:"Module"}));function oi(e){var t=an(e);return function(n){return{concat:t(n).concat,empty:e.of(n.empty)}}}function iL(e,t){var n=Yl(e,t).map,r=ua(e,t);return{map:n,of:function(i){return e.of(t.of(i))},ap:function(i,o){return C(i,r(o))}}}const uH=Object.freeze(Object.defineProperty({__proto__:null,getApplicativeComposition:iL,getApplicativeMonoid:oi},Symbol.toStringTag,{value:"Module"}));function At(e){return function(t){return function(n){return e.chain(n,function(r){return e.map(t(r),function(){return r})})}}}function Pt(e){return function(t,n){return function(r){return e.chain(r,function(i){return e.map(n(i),function(o){var a;return Object.assign({},i,(a={},a[t]=o,a))})})}}}const cH=Object.freeze(Object.defineProperty({__proto__:null,bind:Pt,chainFirst:At},Symbol.toStringTag,{value:"Module"}));function go(e){return function(t){return function(n){return e.fromEither(Vt(n)?ea(t()):hs(n.value))}}}function ms(e){return function(t,n){return function(r){return e.fromEither(t(r)?hs(r):ea(n(r)))}}}function vo(e){var t=go(e);return function(n){var r=t(n);return function(i){return H(i,r)}}}function Nu(e,t){var n=vo(e);return function(r){var i=n(r);return function(o){return function(a){return t.chain(a,i(o))}}}}function Ur(e){return function(t){return H(t,e.fromEither)}}function ca(e,t){var n=Ur(e);return function(r){return function(i){return t.chain(i,n(r))}}}function la(e,t){return H(Ur(e),At(t))}function qu(e,t){return function(n,r){return function(i){return t.chain(i,function(o){return e.fromEither(n(o)?hs(o):ea(r(o)))})}}}const lH=Object.freeze(Object.defineProperty({__proto__:null,chainEitherK:ca,chainFirstEitherK:la,chainOptionK:Nu,filterOrElse:qu,fromEitherK:Ur,fromOption:go,fromOptionK:vo,fromPredicate:ms},Symbol.toStringTag,{value:"Module"}));var ai=function(e){return{equals:function(t,n){return t===n||e(t,n)}}},oL=function(e){return ai(function(t,n){for(var r in e)if(!e[r].equals(t[r],n[r]))return!1;return!0})},aL=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return ai(function(n,r){return e.every(function(i,o){return i.equals(n[o],r[o])})})},fH=function(e,t){return C(e,sL(t))},sL=function(e){return function(t){return ai(function(n,r){return t.equals(e(n),e(r))})}},uL="Eq",Gl={equals:function(e,t){return e===t}},dH={equals:function(){return!0}},cL=function(){return{concat:function(e,t){return ai(function(n,r){return e.equals(n,r)&&t.equals(n,r)})}}},pH=function(){return{concat:cL().concat,empty:dH}},lL={URI:uL,contramap:fH},AH=aL,hH=oL,mH=Gl.equals,gH=lL,vH=Gl,yH=Gl,bH=Gl,CH={equals:function(e,t){return e.valueOf()===t.valueOf()}};const SH=Object.freeze(Object.defineProperty({__proto__:null,Contravariant:lL,URI:uL,contramap:sL,eq:gH,eqBoolean:vH,eqDate:CH,eqNumber:bH,eqStrict:Gl,eqString:yH,fromEquals:ai,getMonoid:pH,getSemigroup:cL,getStructEq:hH,getTupleEq:AH,strictEqual:mH,struct:oL,tuple:aL},Symbol.toStringTag,{value:"Module"}));var fL=function(e){return function(t,n){return t===n||e(t,n)===0}},Vu=function(e){return{equals:fL(e),compare:function(t,n){return t===n?0:e(t,n)}}},dL=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Vu(function(n,r){for(var i=0;i<e.length-1;i++){var o=e[i].compare(n[i],r[i]);if(o!==0)return o}return e[i].compare(n[i],r[i])})},lS=function(e){return Vu(function(t,n){return e.compare(n,t)})},_H=function(e,t){return C(e,_g(t))},_g=function(e){return function(t){return Vu(function(n,r){return t.compare(e(n),e(r))})}},pL="Ord",AL=function(){return{concat:function(e,t){return Vu(function(n,r){var i=e.compare(n,r);return i!==0?i:t.compare(n,r)})}}},fS=function(){return{concat:AL().concat,empty:Vu(function(){return 0})}},hL={URI:pL,contramap:_H},IH={equals:aS,compare:pr(0)},TH=function(e){return function(t){return function(n){return n===t||e.compare(n,t)===0}}},mL=function(e){return function(t,n){return e.compare(t,n)===-1}},gL=function(e){return function(t,n){return e.compare(t,n)===1}},xH=function(e){return function(t,n){return e.compare(t,n)!==1}},wH=function(e){return function(t,n){return e.compare(t,n)!==-1}},Ig=function(e){return function(t,n){return t===n||e.compare(t,n)<1?t:n}},Tg=function(e){return function(t,n){return t===n||e.compare(t,n)>-1?t:n}},vL=function(e){var t=Ig(e),n=Tg(e);return function(r,i){return function(o){return n(t(o,i),r)}}},EH=function(e){var t=mL(e),n=gL(e);return function(r,i){return function(o){return!(t(o,r)||n(o,i))}}},$H=dL,RH=lS,OH=hL;function FH(e,t){return e<t?-1:e>t?1:0}var dS={equals:Gl.equals,compare:FH},kH=dS,MH=dS,vm=dS,LH=C(vm,_g(function(e){return e.valueOf()}));const jH=Object.freeze(Object.defineProperty({__proto__:null,Contravariant:hL,URI:pL,between:EH,clamp:vL,contramap:_g,equals:TH,equalsDefault:fL,fromCompare:Vu,geq:wH,getDualOrd:RH,getMonoid:fS,getSemigroup:AL,getTupleOrd:$H,gt:gL,leq:xH,lt:mL,max:Tg,min:Ig,ord:OH,ordBoolean:kH,ordDate:LH,ordNumber:vm,ordString:MH,reverse:lS,trivial:IH,tuple:dL},Symbol.toStringTag,{value:"Module"}));var yL=function(e){return{concat:function(t,n){return e.concat(n,t)}}},UH=function(e){return function(t){return{concat:function(n,r){return e(n)?t.concat(n,r):r}}}},BH=function(e){return function(t){return{concat:function(n,r){return e(r)?t.concat(n,r):n}}}},PH=function(e){return function(t){return{concat:function(n,r){return t.concat(e(n),e(r))}}}},bL=function(e){return function(t){return function(n){return n.reduce(function(r,i){return e.concat(r,i)},t)}}};const DH=Object.freeze(Object.defineProperty({__proto__:null,concatAll:bL,endo:PH,filterFirst:UH,filterSecond:BH,reverse:yL},Symbol.toStringTag,{value:"Module"}));var xg=function(e){return{concat:Ig(e)}},wg=function(e){return{concat:Tg(e)}},pS=function(e){return{concat:function(){return e}}},AS=yL,hS=function(e){return{concat:function(t,n){var r={};for(var i in e)pt.call(e,i)&&(r[i]=e[i].concat(t[i],n[i]));return r}}},mS=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return{concat:function(n,r){return e.map(function(i,o){return i.concat(n[o],r[o])})}}},CL=function(e){return function(t){return{concat:function(n,r){return t.concat(n,t.concat(e,r))}}}},gS=function(){return{concat:N}},Eg=function(){return{concat:function(e,t){return t}}},vS=bL,SL=pS(void 0),WH=function(){return{concat:function(e,t){return Object.assign({},e,t)}}},KH=Eg,NH=gS,qH=mS,VH=hS,QH=AS,zH=wg,HH=xg,YH=CL;function GH(e){var t=vS(e);return function(n,r){return r===void 0?t(n):t(n)(r)}}var _L={concat:function(e,t){return e&&t}},IL={concat:function(e,t){return e||t}},JH=iS,TL={concat:function(e,t){return e+t}},xL={concat:function(e,t){return e+t}},wL={concat:function(e,t){return e*t}};const EL=Object.freeze(Object.defineProperty({__proto__:null,concatAll:vS,constant:pS,first:gS,fold:GH,getDualSemigroup:QH,getFirstSemigroup:NH,getFunctionSemigroup:JH,getIntercalateSemigroup:YH,getJoinSemigroup:zH,getLastSemigroup:KH,getMeetSemigroup:HH,getObjectSemigroup:WH,getStructSemigroup:VH,getTupleSemigroup:qH,intercalate:CL,last:Eg,max:wg,min:xg,reverse:AS,semigroupAll:_L,semigroupAny:IL,semigroupProduct:wL,semigroupString:TL,semigroupSum:xL,semigroupVoid:SL,struct:hS,tuple:mS},Symbol.toStringTag,{value:"Module"}));var Nd=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},Rp=Sn,yo=yt,$g=function(e,t){return e<0||e>=t.length},yS=function(e){return function(t){return Nd([e],t,!0)}},Cl=yS,bS=function(e){return function(t){return Nd(Nd([],t,!0),[e],!1)}},Rg=bS,Og=function(e,t,n){if(yo(n)){var r=Sg(n);return r.splice(e,0,t),r}return[t]},CS=function(e,t,n){if(n[e]===t)return n;var r=Sg(n);return r[e]=t,r},SS=function(e){return function(t){if(t.length===1)return t;for(var n=[Gn(t)],r=Fi(t),i=function(u){n.every(function(c){return!e.equals(c,u)})&&n.push(u)},o=0,a=r;o<a.length;o++){var s=a[o];i(s)}return n}},$L=function(e){if(yo(e)){var t=fS();return xS(e.reduce(t.concat,t.empty))}return N},_S=function(e){var t=SS(e);return function(n){return function(r){return t(C(r,Op(n)))}}},IS=function(e){return function(t){var n=t.length,r=Math.round(e)%n;if($g(Math.abs(r),t)||r===0)return t;if(r<0){var i=Mg(-r)(t),o=i[0],a=i[1];return C(a,Op(o))}else return IS(r-n)(t)}},TS=function(e){return yo(e)?de(e):Ce},Fg=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}},ZH=function(e){return Fg(function(){return e})},RL=function(e,t){return e<=t?Fg(function(n){return e+n})(t-e+1):[e]},OL=function(e){return[Gn(e),Fi(e)]},FL=function(e){return[Jl(e),vs(e)]},XH=function(e){return TS(e.slice())};function kL(e){return function(t){return t.concat(e)}}function Op(e,t){return t?e.concat(t):function(n){return n.concat(e)}}var eY=function(e){return e.length===1?e:Nd([vs(e)],e.slice(0,-1).reverse(),!0)};function ML(e){return function(t){var n=t.length;if(n===0)return Rp;for(var r=[],i=t[0],o=[i],a=1;a<n;a++){var s=t[a];e.equals(s,i)?o.push(s):(r.push(o),i=s,o=[i])}return r.push(o),r}}var tY=function(e){return function(t){for(var n={},r=0,i=t;r<i.length;r++){var o=i[r],a=e(o);pt.call(n,a)?n[a].push(o):n[a]=[o]}return n}},xS=function(e){return function(t){return t.length===1?t:t.slice().sort(e.compare)}},nY=function(e,t){return LL(e,function(){return t})},LL=function(e,t){return function(n){return $g(e,n)?Ce:de(CS(e,t(n[e]),n))}},jL=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};function UL(e,t){return t===void 0?function(n){return UL(n,e)}:jL(e,t,function(n,r){return[n,r]})}var rY=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]},kg=function(e){return function(t){for(var n=[e,t[0]],r=1;r<t.length;r++)n.push(e,t[r]);return n}},wS=function(e){return function(t){var n=Fi(t);return yo(n)?C(n,kg(e),Cl(Gn(t))):t}},BL=function(e){return function(t){for(var n=Sg(e(0,Gn(t))),r=1;r<t.length;r++)n.push.apply(n,e(r,t[r]));return n}},ES=function(e){return function(t){for(var n=e(t),r=n[0],i=n[1],o=[r],a=i;yo(a);){var s=e(a),u=s[0],c=s[1];o.push(u),a=c}return o}},Mg=function(e){return function(t){var n=Math.max(1,e);return n>=t.length?[t,Rp]:[C(t.slice(1,n),Cl(Gn(t))),t.slice(n)]}},PL=function(e){return ES(Mg(e))},ji=function(e,t){return C(e,jS(t))},$S=function(e,t){return C(e,US(t))},Fp=function(e,t){return C(e,VL(t))},RS=function(e,t){return C(e,Lg(t))},DL=function(e,t){return C(e,LS(t))},kp=function(e,t,n){return C(e,BS(t,n))},Mp=function(e){var t=PS(e);return function(n,r){return C(n,t(r))}},Lp=function(e,t,n){return C(e,DS(t,n))},OS=function(e){var t=QL(e);return function(n,r){return C(n,t(r))}},WL=function(e,t){return C(e,qL(t))},FS=function(e,t,n){return C(e,jg(t,n))},kS=function(e){var t=WS(e);return function(n,r){return C(n,t(r))}},MS=function(e,t,n){return C(e,Ug(t,n))},KL=function(e){var t=Pg(e);return function(n,r){return C(n,t(r))}},gs=$p,NL=function(e){return function(t){return C(t,kL(e()))}},qL=NL,VL=function(e){return Lg(function(t){return C(e,jS(t))})},Lg=function(e){return BL(function(t,n){return e(n)})},LS=function(e){return function(t){for(var n=Fi(t),r=[e(t)];yo(n);)r.push(e(n)),n=Fi(n);return r}},iY=LS(N),oY=Lg(N),jS=function(e){return US(function(t,n){return e(n)})},US=function(e){return function(t){for(var n=[e(0,Gn(t))],r=1;r<t.length;r++)n.push(e(r,t[r]));return n}},BS=function(e,t){return jg(e,function(n,r,i){return t(r,i)})},PS=function(e){return function(t){return function(n){return n.slice(1).reduce(function(r,i){return e.concat(r,t(i))},t(n[0]))}}},DS=function(e,t){return Ug(e,function(n,r,i){return t(r,i)})},jg=function(e,t){return function(n){return n.reduce(function(r,i,o){return t(o,r,i)},e)}},WS=function(e){return function(t){return function(n){return n.slice(1).reduce(function(r,i,o){return e.concat(r,t(o+1,i))},t(0,n[0]))}}},Ug=function(e,t){return function(n){return n.reduceRight(function(r,i,o){return t(o,i,r)},e)}},QL=function(e){var t=Pg(e);return function(n){return t(function(r,i){return n(i)})}},Bg=function(e){return Pg(e)(Ar)},Pg=function(e){return function(t){return function(n){for(var r=e.map(t(0,Gn(n)),gs),i=1;i<n.length;i++)r=e.ap(e.map(r,function(o){return function(a){return C(o,Rg(a))}}),t(i,n[i]));return r}}},Dg=jr,Yn="ReadonlyNonEmptyArray",zL=function(e){return{show:function(t){return"[".concat(t.map(e.show).join(", "),"]")}}},aY=function(){return{concat:Op}},HL=function(e){return ai(function(t,n){return t.length===n.length&&t.every(function(r,i){return e.equals(r,n[i])})})},sY=function(e){var t=_S(e);return{concat:function(n,r){return t(r)(n)}}},KS={URI:Yn,map:ji},uY=Qe(KS),cY={URI:Yn,of:gs},lY={URI:Yn,map:ji,mapWithIndex:$S},Wg={URI:Yn,map:ji,ap:Fp},fY=Lt(Wg),dY=jt(Wg),pY={URI:Yn,map:ji,ap:Fp,of:gs},NS={URI:Yn,map:ji,ap:Fp,chain:RS},AY=At(NS),hY={URI:Yn,map:ji,ap:Fp,of:gs,chain:RS},mY={URI:Yn,reduce:kp,foldMap:Mp,reduceRight:Lp},gY={URI:Yn,reduce:kp,foldMap:Mp,reduceRight:Lp,reduceWithIndex:FS,foldMapWithIndex:kS,reduceRightWithIndex:MS},vY={URI:Yn,map:ji,reduce:kp,foldMap:Mp,reduceRight:Lp,traverse:OS,sequence:Bg},yY={URI:Yn,map:ji,mapWithIndex:$S,reduce:kp,foldMap:Mp,reduceRight:Lp,traverse:OS,sequence:Bg,reduceWithIndex:FS,foldMapWithIndex:kS,reduceRightWithIndex:MS,traverseWithIndex:KL},bY={URI:Yn,map:ji,alt:WL},CY={URI:Yn,map:ji,extend:DL,extract:Dg},SY=gs(on),_Y=Bt(KS),IY=Pt(NS),TY=Ut(Wg),Gn=Dg,Fi=zl,vs=function(e){return e[e.length-1]},Jl=function(e){return e.slice(0,-1)},YL=function(e){var t=xg(e);return function(n){return n.reduce(t.concat)}},GL=function(e){var t=wg(e);return function(n){return n.reduce(t.concat)}},Kg=function(e){return function(t){return t.reduce(e.concat)}},xY=function(e){return function(t){return e(Gn(t),Fi(t))}},wY=function(e){return function(t){return e(Jl(t),vs(t))}},JL=function(e){return function(t){return Nd([e(Gn(t))],Fi(t),!0)}},EY=function(e){return JL(function(){return e})},ZL=function(e){return function(t){return C(Jl(t),Rg(e(vs(t))))}},$Y=function(e){return ZL(function(){return e})},qS=function(e){var t=Kg(e);return function(n){return H(wS(n),t)}};function RY(e){var t=xS(e),n=ML(e);return function(r){return yo(r)?n(t(r)):Rp}}function OY(e){return XL(function(t,n){return e(n)})}var XL=function(e){return function(t){return TS(t.filter(function(n,r){return e(r,n)}))}},FY=OL,kY=FL;function ej(e,t){return t===void 0?Cl(e):C(t,Cl(e))}var tj=function(e,t){return C(e,Op([t]))},MY=function(e,t){return function(n){return e<0||e>n.length?Ce:de(Og(e,t,n))}},LY=kg,jY=Kg,UY={URI:Yn,of:gs,map:ji,mapWithIndex:$S,ap:Fp,chain:RS,extend:DL,extract:Dg,reduce:kp,foldMap:Mp,reduceRight:Lp,traverse:OS,sequence:Bg,reduceWithIndex:FS,foldMapWithIndex:kS,reduceRightWithIndex:MS,traverseWithIndex:KL,alt:WL};const BY=Object.freeze(Object.defineProperty({__proto__:null,Alt:bY,Applicative:pY,Apply:Wg,Chain:NS,Comonad:CY,Do:SY,Foldable:mY,FoldableWithIndex:gY,Functor:KS,FunctorWithIndex:lY,Monad:hY,Pointed:cY,Traversable:vY,TraversableWithIndex:yY,URI:Yn,alt:qL,altW:NL,ap:VL,apFirst:fY,apS:TY,apSecond:dY,append:Rg,appendW:bS,bind:IY,bindTo:_Y,chain:Lg,chainFirst:AY,chainWithIndex:BL,chop:ES,chunksOf:PL,concat:Op,concatAll:Kg,concatW:kL,cons:ej,duplicate:iY,empty:Rp,extend:LS,extract:Dg,filter:OY,filterWithIndex:XL,flap:uY,flatten:oY,fold:jY,foldMap:PS,foldMapWithIndex:WS,fromArray:XH,fromReadonlyArray:TS,getEq:HL,getSemigroup:aY,getShow:zL,getUnionSemigroup:sY,group:ML,groupBy:tY,groupSort:RY,head:Gn,init:Jl,insertAt:MY,intercalate:qS,intersperse:wS,isNonEmpty:yo,isOutOfBound:$g,last:vs,makeBy:Fg,map:jS,mapWithIndex:US,matchLeft:xY,matchRight:wY,max:GL,min:YL,modifyAt:LL,modifyHead:JL,modifyLast:ZL,of:gs,prepend:Cl,prependAll:kg,prependToAll:LY,prependW:yS,range:RL,readonlyNonEmptyArray:UY,reduce:BS,reduceRight:DS,reduceRightWithIndex:Ug,reduceWithIndex:jg,replicate:ZH,reverse:eY,rotate:IS,sequence:Bg,snoc:tj,sort:xS,sortBy:$L,splitAt:Mg,tail:Fi,traverse:QL,traverseWithIndex:Pg,unappend:FL,uncons:FY,union:_S,uniq:SS,unprepend:OL,unsafeInsertAt:Og,unsafeUpdateAt:CS,unsnoc:kY,unzip:rY,updateAt:nY,updateHead:EY,updateLast:$Y,zip:UL,zipWith:jL},Symbol.toStringTag,{value:"Module"}));var qd=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},fa=function(e){return e.length>0},Ng=function(e,t){return e<0||e>=t.length},VS=function(e){return function(t){return qd([e],t,!0)}},Sl=VS,QS=function(e){return function(t){return qd(qd([],t,!0),[e],!1)}},jp=QS,zS=function(e,t,n){if(fa(n)){var r=Up(n);return r.splice(e,0,t),r}return[t]},HS=function(e,t,n){var r=Up(n);return r[e]=t,r},YS=function(e){return function(t){if(t.length===1)return Zl(t);for(var n=[si(t)],r=ki(t),i=function(u){n.every(function(c){return!e.equals(c,u)})&&n.push(u)},o=0,a=r;o<a.length;o++){var s=a[o];i(s)}return n}},nj=function(e){if(fa(e)){var t=fS();return XS(e.reduce(t.concat,t.empty))}return Zl},GS=function(e){var t=YS(e);return function(n){return function(r){return t(C(r,Vg(n)))}}},JS=function(e){return function(t){var n=t.length,r=Math.round(e)%n;if(Ng(Math.abs(r),t)||r===0)return Zl(t);if(r<0){var i=zg(-r)(t),o=i[0],a=i[1];return C(a,Vg(o))}else return JS(r-n)(t)}},Up=Sg,ZS=function(e){return fa(e)?de(e):Ce},qg=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}},PY=function(e){return qg(function(){return e})},rj=function(e,t){return e<=t?qg(function(n){return e+n})(t-e+1):[e]},ij=function(e){return[si(e),ki(e)]},oj=function(e){return[ef(e),Xl(e)]};function aj(e){return function(t){return t.concat(e)}}function Vg(e,t){return t?e.concat(t):function(n){return n.concat(e)}}var DY=function(e){return qd([Xl(e)],e.slice(0,-1).reverse(),!0)};function sj(e){return function(t){var n=t.length;if(n===0)return[];for(var r=[],i=t[0],o=[i],a=1;a<n;a++){var s=t[a];e.equals(s,i)?o.push(s):(r.push(o),i=s,o=[i])}return r.push(o),r}}var WY=function(e){return function(t){for(var n={},r=0,i=t;r<i.length;r++){var o=i[r],a=e(o);pt.call(n,a)?n[a].push(o):n[a]=[o]}return n}},XS=function(e){return function(t){return t.slice().sort(e.compare)}},KY=function(e,t){return function(n){return e<0||e>n.length?Ce:de(zS(e,t,n))}},NY=function(e,t){return uj(e,function(){return t})},uj=function(e,t){return function(n){return Ng(e,n)?Ce:de(HS(e,t(n[e]),n))}},Zl=Up,ys=function(e){return[e]},cj=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};function lj(e,t){return t===void 0?function(n){return lj(n,e)}:cj(e,t,function(n,r){return[n,r]})}var qY=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]},Qg=function(e){return function(t){for(var n=[e,t[0]],r=1;r<t.length;r++)n.push(e,t[r]);return n}},fj=function(e){return function(t){var n=ki(t);return fa(n)?C(n,Qg(e),Sl(si(t))):Zl(t)}},dj=WS,pj=PS,Aj=function(e){return function(t){for(var n=Up(e(0,si(t))),r=1;r<t.length;r++)n.push.apply(n,e(r,t[r]));return n}},e_=function(e){return function(t){for(var n=e(t),r=n[0],i=n[1],o=[r],a=i;fa(a);){var s=e(a),u=s[0],c=s[1];o.push(u),a=c}return o}},zg=function(e){return function(t){var n=Math.max(1,e);return n>=t.length?[Zl(t),[]]:[C(t.slice(1,n),Sl(si(t))),t.slice(n)]}},hj=function(e){return e_(zg(e))},Ui=function(e,t){return C(e,u_(t))},t_=function(e,t){return C(e,c_(t))},Bp=function(e,t){return C(e,Cj(t))},n_=function(e,t){return C(e,Hg(t))},mj=function(e,t){return C(e,s_(t))},Pp=function(e,t,n){return C(e,Sj(t,n))},Dp=function(e){var t=pj(e);return function(n,r){return C(n,t(r))}},Wp=function(e,t,n){return C(e,Ij(t,n))},r_=function(e){var t=xj(e);return function(n,r){return C(n,t(r))}},gj=function(e,t){return C(e,bj(t))},i_=function(e,t,n){return C(e,_j(t,n))},o_=function(e){var t=dj(e);return function(n,r){return C(n,t(r))}},a_=function(e,t,n){return C(e,Tj(t,n))},vj=function(e){var t=Gg(e);return function(n,r){return C(n,t(r))}},yj=function(e){return function(t){return C(t,aj(e()))}},bj=yj,Cj=function(e){return Hg(function(t){return C(e,u_(t))})},Hg=function(e){return Aj(function(t,n){return e(n)})},s_=function(e){return function(t){for(var n=ki(t),r=[e(t)];fa(n);)r.push(e(n)),n=ki(n);return r}},VY=s_(N),QY=Hg(N),u_=function(e){return c_(function(t,n){return e(n)})},c_=function(e){return function(t){for(var n=[e(0,si(t))],r=1;r<t.length;r++)n.push(e(r,t[r]));return n}},Sj=BS,_j=jg,Ij=DS,Tj=Ug,xj=function(e){var t=Gg(e);return function(n){return t(function(r,i){return n(i)})}},Yg=function(e){return Gg(e)(function(t,n){return n})},Gg=function(e){return function(t){return function(n){for(var r=e.map(t(0,si(n)),ys),i=1;i<n.length;i++)r=e.ap(e.map(r,function(o){return function(a){return C(o,jp(a))}}),t(i,n[i]));return r}}},l_=Gn,Jn="NonEmptyArray",zY=zL,HY=function(){return{concat:Vg}},YY=HL,GY=function(e){var t=GS(e);return{concat:function(n,r){return t(r)(n)}}},f_={URI:Jn,map:Ui},JY=Qe(f_),ZY={URI:Jn,of:ys},XY={URI:Jn,map:Ui,mapWithIndex:t_},Jg={URI:Jn,map:Ui,ap:Bp},eG=Lt(Jg),tG=jt(Jg),nG={URI:Jn,map:Ui,ap:Bp,of:ys},d_={URI:Jn,map:Ui,ap:Bp,chain:n_},rG=At(d_),iG={URI:Jn,map:Ui,ap:Bp,of:ys,chain:n_},oG={URI:Jn,reduce:Pp,foldMap:Dp,reduceRight:Wp},aG={URI:Jn,reduce:Pp,foldMap:Dp,reduceRight:Wp,reduceWithIndex:i_,foldMapWithIndex:o_,reduceRightWithIndex:a_},sG={URI:Jn,map:Ui,reduce:Pp,foldMap:Dp,reduceRight:Wp,traverse:r_,sequence:Yg},uG={URI:Jn,map:Ui,mapWithIndex:t_,reduce:Pp,foldMap:Dp,reduceRight:Wp,traverse:r_,sequence:Yg,reduceWithIndex:i_,foldMapWithIndex:o_,reduceRightWithIndex:a_,traverseWithIndex:vj},cG={URI:Jn,map:Ui,alt:gj},lG={URI:Jn,map:Ui,extend:mj,extract:l_},fG=ys(on),dG=Bt(f_),pG=Pt(d_),AG=Ut(Jg),si=Gn,ki=function(e){return e.slice(1)},Xl=vs,ef=function(e){return e.slice(0,-1)},hG=YL,mG=GL,gG=function(e){return function(t){return t.reduce(e.concat)}},vG=function(e){return function(t){return e(si(t),ki(t))}},yG=function(e){return function(t){return e(ef(t),Xl(t))}},wj=function(e){return function(t){return qd([e(si(t))],ki(t),!0)}},bG=function(e){return wj(function(){return e})},Ej=function(e){return function(t){return C(ef(t),jp(e(Xl(t))))}},CG=function(e){return Ej(function(){return e})},SG=qS;function _G(e){var t=XS(e),n=sj(e);return function(r){return fa(r)?n(t(r)):[]}}function IG(e){return $j(function(t,n){return e(n)})}var $j=function(e){return function(t){return ZS(t.filter(function(n,r){return e(r,n)}))}},TG=ij,xG=oj;function Rj(e,t){return t===void 0?Sl(e):C(t,Sl(e))}var Oj=function(e,t){return C(e,jp(t))},wG=Qg,EG=Kg,$G={URI:Jn,of:ys,map:Ui,mapWithIndex:t_,ap:Bp,chain:n_,extend:mj,extract:l_,reduce:Pp,foldMap:Dp,reduceRight:Wp,traverse:r_,sequence:Yg,reduceWithIndex:i_,foldMapWithIndex:o_,reduceRightWithIndex:a_,traverseWithIndex:vj,alt:gj};const RG=Object.freeze(Object.defineProperty({__proto__:null,Alt:cG,Applicative:nG,Apply:Jg,Chain:d_,Comonad:lG,Do:fG,Foldable:oG,FoldableWithIndex:aG,Functor:f_,FunctorWithIndex:XY,Monad:iG,Pointed:ZY,Traversable:sG,TraversableWithIndex:uG,URI:Jn,alt:bj,altW:yj,ap:Cj,apFirst:eG,apS:AG,apSecond:tG,append:jp,appendW:QS,bind:pG,bindTo:dG,chain:Hg,chainFirst:rG,chainWithIndex:Aj,chop:e_,chunksOf:hj,concat:Vg,concatAll:gG,concatW:aj,cons:Rj,copy:Zl,duplicate:VY,extend:s_,extract:l_,filter:IG,filterWithIndex:$j,flap:JY,flatten:QY,fold:EG,foldMap:pj,foldMapWithIndex:dj,fromArray:ZS,fromReadonlyNonEmptyArray:Up,getEq:YY,getSemigroup:HY,getShow:zY,getUnionSemigroup:GY,group:sj,groupBy:WY,groupSort:_G,head:si,init:ef,insertAt:KY,intercalate:SG,intersperse:fj,isNonEmpty:fa,isOutOfBound:Ng,last:Xl,makeBy:qg,map:u_,mapWithIndex:c_,matchLeft:vG,matchRight:yG,max:mG,min:hG,modifyAt:uj,modifyHead:wj,modifyLast:Ej,nonEmptyArray:$G,of:ys,prepend:Sl,prependAll:Qg,prependToAll:wG,prependW:VS,range:rj,reduce:Sj,reduceRight:Ij,reduceRightWithIndex:Tj,reduceWithIndex:_j,replicate:PY,reverse:DY,rotate:JS,sequence:Yg,snoc:Oj,sort:XS,sortBy:nj,splitAt:zg,tail:ki,traverse:xj,traverseWithIndex:Gg,unappend:oj,uncons:TG,union:GS,uniq:YS,unprepend:ij,unsafeInsertAt:zS,unsafeUpdateAt:HS,unsnoc:xG,unzip:qY,updateAt:NY,updateHead:bG,updateLast:CG,zip:lj,zipWith:cj},Symbol.toStringTag,{value:"Module"}));var OG=function(e){return typeof e=="number"},p_={equals:function(e,t){return e===t}},Zg={equals:p_.equals,compare:function(e,t){return e<t?-1:e>t?1:0}},FG={equals:p_.equals,compare:Zg.compare,top:1/0,bottom:-1/0},kG={show:function(e){return JSON.stringify(e)}},Fj={concat:function(e,t){return e-t}},A_={concat:function(e,t){return e+t}},h_={concat:function(e,t){return e*t}},MG={concat:A_.concat,empty:0},LG={concat:h_.concat,empty:1},jG={add:A_.concat,zero:0,mul:h_.concat,one:1,sub:Fj.concat,degree:function(e){return 1},div:function(e,t){return e/t},mod:function(e,t){return e%t}};const UG=Object.freeze(Object.defineProperty({__proto__:null,Bounded:FG,Eq:p_,Field:jG,MagmaSub:Fj,MonoidProduct:LG,MonoidSum:MG,Ord:Zg,SemigroupProduct:h_,SemigroupSum:A_,Show:kG,isNumber:OG},Symbol.toStringTag,{value:"Module"}));var Oe=function(e,t){return{left:e,right:t}},BG=function(e,t){return C(e,kj(t))},PG=function(e,t){return C(e,Mj(t))},DG=function(e,t,n){return C(e,Lj(t,n))},kj=function(e){return function(t){return Oe(Xg(t),e(ev(t)))}},Mj=function(e){return function(t){return Oe(e(Xg(t)),ev(t))}},Lj=function(e,t){return function(n){return Oe(e(Xg(n)),t(ev(n)))}},m_="Separated",WG={URI:m_,mapLeft:PG,bimap:DG},jj={URI:m_,map:BG},KG=Qe(jj),Xg=function(e){return e.left},ev=function(e){return e.right};const NG=Object.freeze(Object.defineProperty({__proto__:null,Bifunctor:WG,Functor:jj,URI:m_,bimap:Lj,flap:KG,left:Xg,map:kj,mapLeft:Mj,right:ev,separated:Oe},Symbol.toStringTag,{value:"Module"}));function Bi(e,t){return function(n){var r=e.traverse(n);return function(i,o){return n.map(r(i,o),t.separate)}}}function Pi(e,t){return function(n){var r=e.traverse(n);return function(i,o){return n.map(r(i,o),t.compact)}}}function g_(e){return function(t){var n=e.wither(t);return function(r){return function(i){return n(i,function(o){return t.map(r(o),function(a){return a?de(o):Ce})})}}}}const qG=Object.freeze(Object.defineProperty({__proto__:null,filterE:g_,wiltDefault:Bi,witherDefault:Pi},Symbol.toStringTag,{value:"Module"}));function tf(e,t){return function(n){return n?t.of(void 0):e.zero()}}const VG=Object.freeze(Object.defineProperty({__proto__:null,guard:tf},Symbol.toStringTag,{value:"Module"}));var QG=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},co=function(e){return e.length===0},Mt=yo,zG=Cl,HG=yS,tv=Rg,YG=bS,Uj=function(e,t){return e<=0?xt:Fg(t)(e)},GG=function(e,t){return Uj(e,function(){return t})};function JG(e){return function(t){return e(t)?[t]:xt}}var Bj=function(e){return Vt(e)?xt:[e.value]},Pj=function(e){return nn(e)?xt:[e.right]},Dj=function(e,t){return function(n){return Mt(n)?t(n):e()}},Wj=Dj,Kj=function(e,t){return function(n){return Mt(n)?t(Gn(n),Fi(n)):e()}},Nj=Kj,ZG=Nj,qj=function(e,t){return function(n){return Mt(n)?t(Jl(n),vs(n)):e()}},Vj=qj,XG=Vj,Qj=function(e){return function(t){if(co(t))return xt;for(var n=[],r=0;r<t.length;r++)n.push.apply(n,e(r,t[r]));return n}},eJ=function(e,t){return function(n){var r=n.length,i=new Array(r+1);i[0]=e;for(var o=0;o<r;o++)i[o+1]=t(i[o],n[o]);return i}},tJ=function(e,t){return function(n){var r=n.length,i=new Array(r+1);i[r]=e;for(var o=r-1;o>=0;o--)i[o]=t(n[o],i[o+1]);return i}},nJ=function(e){return e.length},nf=$g;function Su(e,t){return t===void 0?function(n){return Su(e,n)}:nf(e,t)?Ce:de(t[e])}var zj=function(e){return Mt(e)?de(Gn(e)):Ce},Hj=function(e){return Mt(e)?de(vs(e)):Ce},rJ=function(e){return Mt(e)?de(Fi(e)):Ce},iJ=function(e){return Mt(e)?de(Jl(e)):Ce},oJ=function(e){return function(t){return nf(e,t)?t:e===0?xt:t.slice(0,e)}},aJ=function(e){return function(t){return nf(e,t)?t:e===0?xt:t.slice(-e)}};function sJ(e){return function(t){for(var n=[],r=0,i=t;r<i.length;r++){var o=i[r];if(!e(o))break;n.push(o)}var a=n.length;return a===t.length?t:a===0?xt:n}}var Yj=function(e,t){for(var n=e.length,r=0;r<n&&t(e[r]);r++);return r};function uJ(e){return function(t){var n=iU(Yj(t,e))(t),r=n[0],i=n[1];return{init:r,rest:i}}}var cJ=function(e){return function(t){return e<=0||co(t)?t:e>=t.length?xt:t.slice(e,t.length)}},lJ=function(e){return function(t){return e<=0||co(t)?t:e>=t.length?xt:t.slice(0,t.length-e)}};function fJ(e){return function(t){var n=Yj(t,e);return n===0?t:n===t.length?xt:t.slice(n)}}var nv=function(e){return function(t){for(var n=0;n<t.length;n++)if(e(t[n]))return de(n);return Ce}};function rv(e){return function(t){for(var n=0;n<t.length;n++)if(e(t[n]))return de(t[n]);return Ce}}var Gj=function(e){return function(t){for(var n=0;n<t.length;n++){var r=e(t[n]);if(It(r))return r}return Ce}};function Jj(e){return function(t){for(var n=t.length-1;n>=0;n--)if(e(t[n]))return de(t[n]);return Ce}}var Zj=function(e){return function(t){for(var n=t.length-1;n>=0;n--){var r=e(t[n]);if(It(r))return r}return Ce}},Xj=function(e){return function(t){for(var n=t.length-1;n>=0;n--)if(e(t[n]))return de(n);return Ce}},dJ=function(e,t){return function(n){return e<0||e>n.length?Ce:de(Og(e,t,n))}},pJ=function(e,t){return eU(e,function(){return t})},AJ=function(e){return function(t){return nf(e,t)?Ce:de(RU(e,t))}},eU=function(e,t){return function(n){return nf(e,n)?Ce:de(pv(e,t(n[e]),n))}},hJ=function(e){return e.length<=1?e:e.slice().reverse()},mJ=function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];r._tag==="Right"&&t.push(r.right)}return t},gJ=function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];r._tag==="Left"&&t.push(r.left)}return t},vJ=function(e){return function(t){return t.length<=1?t:t.slice().sort(e.compare)}},tU=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};function nU(e,t){return t===void 0?function(n){return nU(n,e)}:tU(e,t,function(n,r){return[n,r]})}var yJ=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]},rU=function(e){var t=kg(e);return function(n){return Mt(n)?t(n):n}},bJ=function(e){var t=wS(e);return function(n){return Mt(n)?t(n):n}},CJ=function(e){var t=IS(e);return function(n){return Mt(n)?t(n):n}};function Kp(e){return function(t,n){if(n===void 0){var r=Kp(e);return function(a){return r(t,a)}}for(var i=function(a){return e.equals(a,t)},o=0;o<n.length;o++)if(i(n[o]))return!0;return!1}}var SJ=function(e){var t=SS(e);return function(n){return Mt(n)?t(n):n}},_J=function(e){var t=$L(e);return function(n){return Mt(n)?t(n):n}},IJ=function(e){var t=ES(e);return function(n){return Mt(n)?t(n):xt}},iU=function(e){return function(t){return e>=1&&Mt(t)?Mg(e)(t):co(t)?[t,xt]:[xt,t]}},TJ=function(e){var t=PL(e);return function(n){return Mt(n)?t(n):xt}},xJ=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return Bj(e.apply(void 0,t))}};function wJ(e,t,n){n===void 0&&(n=function(){return!0});var r=function(i,o){return Mt(o)?C(Gn(o),qp(function(a){return r(C(i,tv(a)),Fi(o))})):n.apply(void 0,i)?[t.apply(void 0,i)]:xt};return r(xt,e)}var oU=function(e){return function(t){return co(t)?e:co(e)?t:t.concat(e)}},EJ=oU;function v_(e){var t=_S(e);return function(n,r){if(r===void 0){var i=v_(e);return function(o){return i(o,n)}}return Mt(n)&&Mt(r)?t(r)(n):Mt(n)?n:r}}function y_(e){var t=Kp(e);return function(n,r){if(r===void 0){var i=y_(e);return function(o){return i(o,n)}}return n.filter(function(o){return t(o,r)})}}function b_(e){var t=Kp(e);return function(n,r){if(r===void 0){var i=b_(e);return function(o){return i(o,n)}}return n.filter(function(o){return!t(o,r)})}}var _n=function(e,t){return C(e,w_(t))},iv=function(e,t){return C(e,hU(t))},bs=function(e,t){return C(e,AU(t))},Np=function(e,t){return C(e,qp(t))},ov=function(e,t){return C(e,mU(t))},av=function(e,t){return C(e,$_(t))},sv=function(e,t){return C(e,gU(t))},uv=function(e,t){return C(e,vU(t))},aU=function(e,t){return C(e,R_(t))},sU=function(e,t){return C(e,O_(t))},C_=function(e,t){return C(e,pU(t))},Qu=function(e,t,n){return C(e,k_(t,n))},rf=function(e){var t=M_(e);return function(n,r){return C(n,t(r))}},of=function(e,t,n){return C(e,L_(t,n))},S_=function(e,t,n){return C(e,Vp(t,n))},__=function(e){var t=lv(e);return function(n,r){return C(n,t(r))}},I_=function(e,t,n){return C(e,fv(t,n))},uU=function(e,t){return C(e,E_(t))},cU=function(e,t){return C(e,yU(t))},lU=function(e,t){return C(e,F_(t))},cv=function(e){var t=bU(e);return function(n,r){return C(n,t(r))}},fU=function(e){var t=j_(e);return function(n,r){return C(n,t(r))}},T_=function(e,t){return C(e,K_(t))},x_=function(e,t){return C(e,N_(t))},zu=gs,af=function(){return xt},dU=function(e){return function(t){return t.concat(e())}},pU=dU,AU=function(e){return qp(function(t){return C(e,w_(t))})},qp=function(e){return function(t){return C(t,Qj(function(n,r){return e(r)}))}},$J=qp(N),w_=function(e){return function(t){return t.map(function(n){return e(n)})}},hU=function(e){return function(t){return t.map(function(n,r){return e(r,n)})}},sf=function(e){for(var t=[],n=[],r=0,i=e;r<i.length;r++){var o=i[r];o._tag==="Left"?t.push(o.left):n.push(o.right)}return Oe(t,n)},mU=function(e){return function(t){return t.filter(e)}},E_=function(e){return function(t){for(var n=[],r=0;r<t.length;r++){var i=e(r,t[r]);It(i)&&n.push(i.value)}return n}},$_=function(e){return E_(function(t,n){return e(n)})},uf=$_(N),gU=function(e){return R_(function(t,n){return e(n)})},R_=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 Oe(n,r)}},vU=function(e){return O_(function(t,n){return e(n)})},O_=function(e){return function(t){for(var n=[],r=[],i=0;i<t.length;i++){var o=e(i,t[i]);o._tag==="Left"?n.push(o.left):r.push(o.right)}return Oe(n,r)}},yU=function(e){return function(t){return t.filter(function(n,r){return e(r,n)})}},F_=function(e){return function(t){return t.map(function(n,r){return e(t.slice(r))})}},RJ=F_(N),lv=function(e){return function(t){return function(n){return n.reduce(function(r,i,o){return e.concat(r,t(o,i))},e.empty)}}},k_=function(e,t){return Vp(e,function(n,r,i){return t(r,i)})},M_=function(e){var t=lv(e);return function(n){return t(function(r,i){return n(i)})}},Vp=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}},L_=function(e,t){return fv(e,function(n,r,i){return t(r,i)})},fv=function(e,t){return function(n){return n.reduceRight(function(r,i,o){return t(o,i,r)},e)}},bU=function(e){var t=j_(e);return function(n){return t(function(r,i){return n(i)})}},Qp=function(e){return function(t){return Qu(t,e.of(af()),function(n,r){return e.ap(e.map(n,function(i){return function(o){return C(i,tv(o))}}),r)})}},j_=function(e){return function(t){return Vp(e.of(af()),function(n,r,i){return e.ap(e.map(r,function(o){return function(a){return C(o,tv(a))}}),t(n,i))})}},OJ=function(e){var t=q_(e);return function(n){return function(r){return t(r,n)}}},FJ=function(e){var t=V_(e);return function(n){return function(r){return t(r,n)}}},U_=function(e,t){for(var n=[],r=e;;){var i=t(r);if(It(i)){var o=i.value,a=o[0],s=o[1];n.push(a),r=s}else break}return n},ht="ReadonlyArray",CU=function(e){return{show:function(t){return"[".concat(t.map(e.show).join(", "),"]")}}},SU=function(){return{concat:function(e,t){return co(e)?t:co(t)?e:e.concat(t)}}},kJ=function(){return{concat:SU().concat,empty:xt}},_U=function(e){return ai(function(t,n){return t.length===n.length&&t.every(function(r,i){return e.equals(r,n[i])})})},IU=function(e){return Vu(function(t,n){for(var r=t.length,i=n.length,o=Math.min(r,i),a=0;a<o;a++){var s=e.compare(t[a],n[a]);if(s!==0)return s}return Zg.compare(r,i)})},TU=function(e){var t=v_(e);return{concat:function(n,r){return t(r)(n)}}},MJ=function(e){return{concat:TU(e).concat,empty:xt}},LJ=function(e){var t=y_(e);return{concat:function(n,r){return t(r)(n)}}},jJ=function(e){var t=b_(e);return{concat:function(n,r){return t(r)(n)}}},B_={URI:ht,map:_n},UJ=Qe(B_),xU={URI:ht,of:zu},BJ={URI:ht,map:_n,mapWithIndex:iv},dv={URI:ht,map:_n,ap:bs},PJ=Lt(dv),DJ=jt(dv),WJ={URI:ht,map:_n,ap:bs,of:zu},P_={URI:ht,map:_n,ap:bs,chain:Np},KJ={URI:ht,map:_n,ap:bs,of:zu,chain:Np},NJ=At(P_),qJ={URI:ht,unfold:U_},VJ={URI:ht,map:_n,alt:C_},wU={URI:ht,zero:af},QJ=tf(wU,xU),zJ={URI:ht,map:_n,ap:bs,of:zu,alt:C_,zero:af},HJ={URI:ht,map:_n,extend:lU},D_={URI:ht,compact:uf,separate:sf},YJ={URI:ht,map:_n,compact:uf,separate:sf,filter:ov,filterMap:av,partition:sv,partitionMap:uv},GJ={URI:ht,map:_n,mapWithIndex:iv,compact:uf,separate:sf,filter:ov,filterMap:av,partition:sv,partitionMap:uv,partitionMapWithIndex:sU,partitionWithIndex:aU,filterMapWithIndex:uU,filterWithIndex:cU},JJ={URI:ht,reduce:Qu,foldMap:rf,reduceRight:of},ZJ={URI:ht,reduce:Qu,foldMap:rf,reduceRight:of,reduceWithIndex:S_,foldMapWithIndex:__,reduceRightWithIndex:I_},W_={URI:ht,map:_n,reduce:Qu,foldMap:rf,reduceRight:of,traverse:cv,sequence:Qp},XJ={URI:ht,map:_n,mapWithIndex:iv,reduce:Qu,foldMap:rf,reduceRight:of,reduceWithIndex:S_,foldMapWithIndex:__,reduceRightWithIndex:I_,traverse:cv,sequence:Qp,traverseWithIndex:fU},K_=function(e){return function(t){for(var n=QG([],e(t),!0),r=[];n.length>0;){var i=n.shift();nn(i)?n.unshift.apply(n,e(i.left)):r.push(i.right)}return r}},eZ={URI:ht,map:_n,ap:bs,chain:Np,chainRec:T_},N_=function(e){return function(t){var n=e(t),r=[],i=[];function o(c){nn(c)?e(c.left).forEach(function(l){return r.push(l)}):i.push(c.right)}for(var a=0,s=n;a<s.length;a++){var u=s[a];o(u)}for(;r.length>0;)o(r.shift());return i}},tZ={URI:ht,map:_n,ap:bs,chain:Np,chainRec:x_},q_=Pi(W_,D_),V_=Bi(W_,D_),EU={URI:ht,map:_n,compact:uf,separate:sf,filter:ov,filterMap:av,partition:sv,partitionMap:uv,reduce:Qu,foldMap:rf,reduceRight:of,traverse:cv,sequence:Qp,wither:q_,wilt:V_},nZ=g_(EU),$U={URI:ht,fromEither:Pj},rZ=Ur($U),iZ=Og,pv=function(e,t,n){return Mt(n)?CS(e,t,n):n},RU=function(e,t){var n=t.slice();return n.splice(e,1),n},oZ=function(e){return e.slice()},aZ=function(e){return co(e)?xt:e.slice()},xt=Rp;function OU(e){return function(t){return t.every(e)}}var FU=function(e){return function(t){return t.some(e)}},sZ=FU,kU=function(e){var t=qS(e);return function(n){return Wj(function(){return e.empty},t(n))}},uZ=zu(on),cZ=Bt(B_),lZ=Pt(P_),fZ=Ut(dv),dZ=RL,pZ=ej,AZ=tj,hZ=rU,mZ={URI:ht,compact:uf,separate:sf,map:_n,ap:bs,of:zu,chain:Np,filter:ov,filterMap:av,partition:sv,partitionMap:uv,mapWithIndex:iv,partitionMapWithIndex:sU,partitionWithIndex:aU,filterMapWithIndex:uU,filterWithIndex:cU,alt:C_,zero:af,unfold:U_,reduce:Qu,foldMap:rf,reduceRight:of,traverse:cv,sequence:Qp,reduceWithIndex:S_,foldMapWithIndex:__,reduceRightWithIndex:I_,traverseWithIndex:fU,extend:lU,wither:q_,wilt:V_};const gZ=Object.freeze(Object.defineProperty({__proto__:null,Alt:VJ,Alternative:zJ,Applicative:WJ,Apply:dv,Chain:P_,ChainRecBreadthFirst:tZ,ChainRecDepthFirst:eZ,Compactable:D_,Do:uZ,Extend:HJ,Filterable:YJ,FilterableWithIndex:GJ,Foldable:JJ,FoldableWithIndex:ZJ,FromEither:$U,Functor:B_,FunctorWithIndex:BJ,Monad:KJ,Pointed:xU,Traversable:W_,TraversableWithIndex:XJ,URI:ht,Unfoldable:qJ,Witherable:EU,Zero:wU,_chainRecBreadthFirst:x_,_chainRecDepthFirst:T_,alt:pU,altW:dU,ap:AU,apFirst:PJ,apS:fZ,apSecond:DJ,append:tv,appendW:YG,bind:lZ,bindTo:cZ,chain:qp,chainFirst:NJ,chainRecBreadthFirst:N_,chainRecDepthFirst:K_,chainWithIndex:Qj,chop:IJ,chunksOf:TJ,compact:uf,comprehension:wJ,concat:EJ,concatW:oU,cons:pZ,deleteAt:AJ,difference:b_,dropLeft:cJ,dropLeftWhile:fJ,dropRight:lJ,duplicate:RJ,elem:Kp,empty:xt,every:OU,exists:sZ,extend:F_,filter:mU,filterE:nZ,filterMap:$_,filterMapWithIndex:E_,filterWithIndex:yU,findFirst:rv,findFirstMap:Gj,findIndex:nv,findLast:Jj,findLastIndex:Xj,findLastMap:Zj,flap:UJ,flatten:$J,foldLeft:ZG,foldMap:M_,foldMapWithIndex:lv,foldRight:XG,fromArray:aZ,fromEither:Pj,fromEitherK:rZ,fromOption:Bj,fromOptionK:xJ,fromPredicate:JG,getDifferenceMagma:jJ,getEq:_U,getIntersectionSemigroup:LJ,getMonoid:kJ,getOrd:IU,getSemigroup:SU,getShow:CU,getUnionMonoid:MJ,getUnionSemigroup:TU,guard:QJ,head:zj,init:iJ,insertAt:dJ,intercalate:kU,intersection:y_,intersperse:bJ,isEmpty:co,isNonEmpty:Mt,isOutOfBound:nf,last:Hj,lefts:gJ,lookup:Su,makeBy:Uj,map:w_,mapWithIndex:hU,match:Wj,matchLeft:Nj,matchLeftW:Kj,matchRight:Vj,matchRightW:qj,matchW:Dj,modifyAt:eU,of:zu,partition:gU,partitionMap:vU,partitionMapWithIndex:O_,partitionWithIndex:R_,prepend:zG,prependAll:rU,prependToAll:hZ,prependW:HG,range:dZ,readonlyArray:mZ,reduce:k_,reduceRight:L_,reduceRightWithIndex:fv,reduceWithIndex:Vp,replicate:GG,reverse:hJ,rights:mJ,rotate:CJ,scanLeft:eJ,scanRight:tJ,separate:sf,sequence:Qp,size:nJ,snoc:AZ,some:FU,sort:vJ,sortBy:_J,spanLeft:uJ,splitAt:iU,tail:rJ,takeLeft:oJ,takeLeftWhile:sJ,takeRight:aJ,toArray:oZ,traverse:bU,traverseWithIndex:j_,unfold:U_,union:v_,uniq:SJ,unsafeDeleteAt:RU,unsafeInsertAt:iZ,unsafeUpdateAt:pv,unzip:yJ,updateAt:pJ,wilt:FJ,wither:OJ,zero:af,zip:nU,zipWith:tU},Symbol.toStringTag,{value:"Module"}));var ss=function(e){return e.length===0},Qt=fa,vZ=Sl,yZ=VS,Av=jp,bZ=QS,MU=function(e,t){return e<=0?[]:qg(t)(e)},CZ=function(e,t){return MU(e,function(){return t})};function SZ(e){return function(t){return e(t)?[t]:[]}}var LU=function(e){return Vt(e)?[]:[e.value]},jU=function(e){return nn(e)?[]:[e.right]},UU=function(e,t){return function(n){return Qt(n)?t(n):e()}},_Z=UU,BU=function(e,t){return function(n){return Qt(n)?t(si(n),ki(n)):e()}},PU=BU,IZ=PU,DU=function(e,t){return function(n){return Qt(n)?t(ef(n),Xl(n)):e()}},WU=DU,TZ=WU,KU=function(e){return function(t){for(var n=[],r=0;r<t.length;r++)n.push.apply(n,e(r,t[r]));return n}},xZ=function(e,t){return function(n){var r=n.length,i=new Array(r+1);i[0]=e;for(var o=0;o<r;o++)i[o+1]=t(i[o],n[o]);return i}},wZ=function(e,t){return function(n){var r=n.length,i=new Array(r+1);i[r]=e;for(var o=r-1;o>=0;o--)i[o]=t(n[o],i[o+1]);return i}},EZ=function(e){return e.length},zp=Ng,$Z=Su,RZ=zj,OZ=Hj,FZ=function(e){return Qt(e)?de(ki(e)):Ce},kZ=function(e){return Qt(e)?de(ef(e)):Ce},MZ=function(e){return function(t){return zp(e,t)?kn(t):t.slice(0,e)}},LZ=function(e){return function(t){return zp(e,t)?kn(t):e===0?[]:t.slice(-e)}};function jZ(e){return function(t){for(var n=[],r=0,i=t;r<i.length;r++){var o=i[r];if(!e(o))break;n.push(o)}return n}}var NU=function(e,t){for(var n=e.length,r=0;r<n&&t(e[r]);r++);return r};function UZ(e){return function(t){var n=HU(NU(t,e))(t),r=n[0],i=n[1];return{init:r,rest:i}}}var BZ=function(e){return function(t){return e<=0||ss(t)?kn(t):e>=t.length?[]:t.slice(e,t.length)}},PZ=function(e){return function(t){return e<=0||ss(t)?kn(t):e>=t.length?[]:t.slice(0,t.length-e)}};function DZ(e){return function(t){return t.slice(NU(t,e))}}var WZ=nv;function KZ(e){return rv(e)}var NZ=Gj;function qZ(e){return Jj(e)}var VZ=Zj,QZ=Xj,kn=function(e){return e.slice()},zZ=function(e,t){return function(n){return e<0||e>n.length?Ce:de(_2(e,t,n))}},HZ=function(e,t){return qU(e,function(){return t})},YZ=function(e){return function(t){return zp(e,t)?Ce:de(T2(e,t))}},qU=function(e,t){return function(n){return zp(e,n)?Ce:de(I2(e,t(n[e]),n))}},GZ=function(e){return ss(e)?[]:e.slice().reverse()},JZ=function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];r._tag==="Right"&&t.push(r.right)}return t},ZZ=function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];r._tag==="Left"&&t.push(r.left)}return t},XZ=function(e){return function(t){return t.length<=1?kn(t):t.slice().sort(e.compare)}},VU=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};function QU(e,t){return t===void 0?function(n){return QU(n,e)}:VU(e,t,function(n,r){return[n,r]})}var eX=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]},zU=function(e){var t=Qg(e);return function(n){return Qt(n)?t(n):[]}},tX=function(e){var t=fj(e);return function(n){return Qt(n)?t(n):kn(n)}},nX=function(e){var t=JS(e);return function(n){return Qt(n)?t(n):kn(n)}},Q_=Kp,rX=function(e){var t=YS(e);return function(n){return Qt(n)?t(n):kn(n)}},iX=function(e){var t=nj(e);return function(n){return Qt(n)?t(n):kn(n)}},oX=function(e){var t=e_(e);return function(n){return Qt(n)?t(n):[]}},HU=function(e){return function(t){return e>=1&&Qt(t)?zg(e)(t):ss(t)?[kn(t),[]]:[[],kn(t)]}},aX=function(e){var t=hj(e);return function(n){return Qt(n)?t(n):[]}},sX=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return LU(e.apply(void 0,t))}};function uX(e,t,n){n===void 0&&(n=function(){return!0});var r=function(i,o){return Qt(o)?C(si(o),Yp(function(a){return r(C(i,Av(a)),ki(o))})):n.apply(void 0,i)?[t.apply(void 0,i)]:[]};return r([],e)}var YU=function(e){return function(t){return ss(t)?kn(e):ss(e)?kn(t):t.concat(e)}},cX=YU;function z_(e){var t=GS(e);return function(n,r){if(r===void 0){var i=z_(e);return function(o){return i(o,n)}}return Qt(n)&&Qt(r)?t(r)(n):Qt(n)?kn(n):kn(r)}}function H_(e){var t=Q_(e);return function(n,r){if(r===void 0){var i=H_(e);return function(o){return i(o,n)}}return n.filter(function(o){return t(o,r)})}}function Y_(e){var t=Q_(e);return function(n,r){if(r===void 0){var i=Y_(e);return function(o){return i(o,n)}}return n.filter(function(o){return!t(o,r)})}}var In=function(e,t){return C(e,eI(t))},hv=function(e,t){return C(e,r2(t))},Cs=function(e,t){return C(e,n2(t))},Hp=function(e,t){return C(e,Yp(t))},mv=function(e,t){return C(e,i2(t))},gv=function(e,t){return C(e,nI(t))},vv=function(e,t){return C(e,o2(t))},yv=function(e,t){return C(e,a2(t))},GU=function(e,t){return C(e,rI(t))},JU=function(e,t){return C(e,iI(t))},G_=function(e,t){return C(e,u2(t))},Hu=function(e,t,n){return C(e,d2(t,n))},cf=function(e){var t=l2(e);return function(n,r){return C(n,t(r))}},lf=function(e,t,n){return C(e,p2(t,n))},J_=function(e,t,n){return C(e,aI(t,n))},Z_=function(e){var t=f2(e);return function(n,r){return C(n,t(r))}},X_=function(e,t,n){return C(e,A2(t,n))},ZU=function(e,t){return C(e,tI(t))},XU=function(e,t){return C(e,c2(t))},e2=function(e,t){return C(e,oI(t))},bv=function(e){var t=Cv(e);return function(n,r){return C(n,t(r))}},t2=function(e){var t=sI(e);return function(n,r){return C(n,t(r))}},lX=T_,fX=x_,Ss=ys,ff=function(){return[]},eI=function(e){return function(t){return t.map(function(n){return e(n)})}},n2=function(e){return Yp(function(t){return C(e,eI(t))})},Yp=function(e){return function(t){return C(t,KU(function(n,r){return e(r)}))}},dX=Yp(N),r2=function(e){return function(t){return t.map(function(n,r){return e(r,n)})}},tI=function(e){return function(t){for(var n=[],r=0;r<t.length;r++){var i=e(r,t[r]);It(i)&&n.push(i.value)}return n}},nI=function(e){return tI(function(t,n){return e(n)})},df=nI(N),pf=function(e){for(var t=[],n=[],r=0,i=e;r<i.length;r++){var o=i[r];o._tag==="Left"?t.push(o.left):n.push(o.right)}return Oe(t,n)},i2=function(e){return function(t){return t.filter(e)}},o2=function(e){return rI(function(t,n){return e(n)})},rI=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 Oe(n,r)}},a2=function(e){return iI(function(t,n){return e(n)})},iI=function(e){return function(t){for(var n=[],r=[],i=0;i<t.length;i++){var o=e(i,t[i]);o._tag==="Left"?n.push(o.left):r.push(o.right)}return Oe(n,r)}},s2=function(e){return function(t){return t.concat(e())}},u2=s2,c2=function(e){return function(t){return t.filter(function(n,r){return e(r,n)})}},oI=function(e){return function(t){return t.map(function(n,r){return e(t.slice(r))})}},pX=oI(N),l2=M_,f2=lv,d2=k_,aI=Vp,p2=L_,A2=fv,Cv=function(e){var t=sI(e);return function(n){return t(function(r,i){return n(i)})}},Gp=function(e){return function(t){return Hu(t,e.of(ff()),function(n,r){return e.ap(e.map(n,function(i){return function(o){return C(i,Av(o))}}),r)})}},sI=function(e){return function(t){return aI(e.of(ff()),function(n,r,i){return e.ap(e.map(r,function(o){return function(a){return C(o,Av(a))}}),t(n,i))})}},AX=function(e){var t=AI(e);return function(n){return function(r){return t(r,n)}}},hX=function(e){var t=hI(e);return function(n){return function(r){return t(r,n)}}},uI=function(e,t){for(var n=[],r=e;;){var i=t(r);if(It(i)){var o=i.value,a=o[0],s=o[1];n.push(a),r=s}else break}return n},mt="Array",mX=CU,h2=function(){return{concat:function(e,t){return e.concat(t)}}},cI=function(){return{concat:h2().concat,empty:[]}},m2=_U,gX=IU,g2=function(e){var t=z_(e);return{concat:function(n,r){return t(r)(n)}}},vX=function(e){return{concat:g2(e).concat,empty:[]}},yX=function(e){var t=H_(e);return{concat:function(n,r){return t(r)(n)}}},bX=function(e){var t=Y_(e);return{concat:function(n,r){return t(r)(n)}}},lI={URI:mt,map:In},CX=Qe(lI),v2={URI:mt,of:Ss},SX={URI:mt,map:In,mapWithIndex:hv},Sv={URI:mt,map:In,ap:Cs},_X=Lt(Sv),IX=jt(Sv),TX={URI:mt,map:In,ap:Cs,of:Ss},fI={URI:mt,map:In,ap:Cs,chain:Hp},xX=At(fI),wX={URI:mt,map:In,ap:Cs,of:Ss,chain:Hp},EX={URI:mt,unfold:uI},$X={URI:mt,map:In,alt:G_},y2={URI:mt,zero:ff},RX=tf(y2,v2),OX={URI:mt,map:In,ap:Cs,of:Ss,alt:G_,zero:ff},FX={URI:mt,map:In,extend:e2},dI={URI:mt,compact:df,separate:pf},kX={URI:mt,map:In,compact:df,separate:pf,filter:mv,filterMap:gv,partition:vv,partitionMap:yv},MX={URI:mt,map:In,mapWithIndex:hv,compact:df,separate:pf,filter:mv,filterMap:gv,partition:vv,partitionMap:yv,partitionMapWithIndex:JU,partitionWithIndex:GU,filterMapWithIndex:ZU,filterWithIndex:XU},b2={URI:mt,reduce:Hu,foldMap:cf,reduceRight:lf},LX={URI:mt,reduce:Hu,foldMap:cf,reduceRight:lf,reduceWithIndex:J_,foldMapWithIndex:Z_,reduceRightWithIndex:X_},pI={URI:mt,map:In,reduce:Hu,foldMap:cf,reduceRight:lf,traverse:bv,sequence:Gp},jX={URI:mt,map:In,mapWithIndex:hv,reduce:Hu,foldMap:cf,reduceRight:lf,reduceWithIndex:J_,foldMapWithIndex:Z_,reduceRightWithIndex:X_,traverse:bv,sequence:Gp,traverseWithIndex:t2},AI=Pi(pI,dI),hI=Bi(pI,dI),C2={URI:mt,map:In,compact:df,separate:pf,filter:mv,filterMap:gv,partition:vv,partitionMap:yv,reduce:Hu,foldMap:cf,reduceRight:lf,traverse:bv,sequence:Gp,wither:AI,wilt:hI},UX=K_,BX={URI:mt,map:In,ap:Cs,chain:Hp,chainRec:lX},PX=N_,DX={URI:mt,map:In,ap:Cs,chain:Hp,chainRec:fX},WX=g_(C2),S2={URI:mt,fromEither:jU},KX=Ur(S2),_2=zS,I2=function(e,t,n){return Qt(n)?HS(e,t,n):[]},T2=function(e,t){var n=t.slice();return n.splice(e,1),n},NX=OU,x2=function(e){return function(t){return t.some(e)}},qX=x2,VX=kU,QX=Ss(on),zX=Bt(lI),HX=Pt(fI),YX=Ut(Sv),GX=rj,JX=[],ZX=Rj,XX=Oj,eee=zU,tee={URI:mt,compact:df,separate:pf,map:In,ap:Cs,of:Ss,chain:Hp,filter:mv,filterMap:gv,partition:vv,partitionMap:yv,mapWithIndex:hv,partitionMapWithIndex:JU,partitionWithIndex:GU,filterMapWithIndex:ZU,filterWithIndex:XU,alt:G_,zero:ff,unfold:uI,reduce:Hu,foldMap:cf,reduceRight:lf,traverse:bv,sequence:Gp,reduceWithIndex:J_,foldMapWithIndex:Z_,reduceRightWithIndex:X_,traverseWithIndex:t2,extend:e2,wither:AI,wilt:hI};const nee=Object.freeze(Object.defineProperty({__proto__:null,Alt:$X,Alternative:OX,Applicative:TX,Apply:Sv,Chain:fI,ChainRecBreadthFirst:DX,ChainRecDepthFirst:BX,Compactable:dI,Do:QX,Extend:FX,Filterable:kX,FilterableWithIndex:MX,Foldable:b2,FoldableWithIndex:LX,FromEither:S2,Functor:lI,FunctorWithIndex:SX,Monad:wX,Pointed:v2,Traversable:pI,TraversableWithIndex:jX,URI:mt,Unfoldable:EX,Witherable:C2,Zero:y2,alt:u2,altW:s2,ap:n2,apFirst:_X,apS:YX,apSecond:IX,append:Av,appendW:bZ,array:tee,bind:HX,bindTo:zX,chain:Yp,chainFirst:xX,chainRecBreadthFirst:PX,chainRecDepthFirst:UX,chainWithIndex:KU,chop:oX,chunksOf:aX,compact:df,comprehension:uX,concat:cX,concatW:YU,cons:ZX,copy:kn,deleteAt:YZ,difference:Y_,dropLeft:BZ,dropLeftWhile:DZ,dropRight:PZ,duplicate:pX,elem:Q_,empty:JX,every:NX,exists:qX,extend:oI,filter:i2,filterE:WX,filterMap:nI,filterMapWithIndex:tI,filterWithIndex:c2,findFirst:KZ,findFirstMap:NZ,findIndex:WZ,findLast:qZ,findLastIndex:QZ,findLastMap:VZ,flap:CX,flatten:dX,foldLeft:IZ,foldMap:l2,foldMapWithIndex:f2,foldRight:TZ,fromEither:jU,fromEitherK:KX,fromOption:LU,fromOptionK:sX,fromPredicate:SZ,getDifferenceMagma:bX,getEq:m2,getIntersectionSemigroup:yX,getMonoid:cI,getOrd:gX,getSemigroup:h2,getShow:mX,getUnionMonoid:vX,getUnionSemigroup:g2,guard:RX,head:RZ,init:kZ,insertAt:zZ,intercalate:VX,intersection:H_,intersperse:tX,isEmpty:ss,isNonEmpty:Qt,isOutOfBound:zp,last:OZ,lefts:ZZ,lookup:$Z,makeBy:MU,map:eI,mapWithIndex:r2,match:_Z,matchLeft:PU,matchLeftW:BU,matchRight:WU,matchRightW:DU,matchW:UU,modifyAt:qU,of:Ss,partition:o2,partitionMap:a2,partitionMapWithIndex:iI,partitionWithIndex:rI,prepend:vZ,prependAll:zU,prependToAll:eee,prependW:yZ,range:GX,reduce:d2,reduceRight:p2,reduceRightWithIndex:A2,reduceWithIndex:aI,replicate:CZ,reverse:GZ,rights:JZ,rotate:nX,scanLeft:xZ,scanRight:wZ,separate:pf,sequence:Gp,size:EZ,snoc:XX,some:x2,sort:XZ,sortBy:iX,spanLeft:UZ,splitAt:HU,tail:FZ,takeLeft:MZ,takeLeftWhile:jZ,takeRight:LZ,traverse:Cv,traverseWithIndex:sI,unfold:uI,union:z_,uniq:rX,unsafeDeleteAt:T2,unsafeInsertAt:_2,unsafeUpdateAt:I2,unzip:eX,updateAt:HZ,wilt:hX,wither:AX,zero:ff,zip:QU,zipWith:VU},Symbol.toStringTag,{value:"Module"})),ree=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var iee=function(e){return typeof e=="boolean"},w2=function(e,t){return function(n){return n?t():e()}},E2=w2,$2=E2,oee=$2,R2={equals:function(e,t){return e===t}},aee={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}},O2={concat:function(e,t){return e&&t}},F2={concat:function(e,t){return e||t}},see={concat:O2.concat,empty:!0},uee={concat:F2.concat,empty:!1},cee={equals:R2.equals,compare:function(e,t){return e<t?-1:e>t?1:0}},lee={show:function(e){return JSON.stringify(e)}};const fee=Object.freeze(Object.defineProperty({__proto__:null,BooleanAlgebra:aee,Eq:R2,MonoidAll:see,MonoidAny:uee,Ord:cee,SemigroupAll:O2,SemigroupAny:F2,Show:lee,fold:oee,foldW:E2,isBoolean:iee,match:$2,matchW:w2},Symbol.toStringTag,{value:"Module"}));var k2=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}},dee={meet:function(){},join:function(){},zero:void 0,one:void 0,implies:function(){},not:function(){}},pee=k2,Aee={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}},hee=GM;const mee=Object.freeze(Object.defineProperty({__proto__:null,booleanAlgebraBoolean:Aee,booleanAlgebraVoid:dee,getDualBooleanAlgebra:pee,getFunctionBooleanAlgebra:hee,reverse:k2},Symbol.toStringTag,{value:"Module"}));var gee=function(e){return vL(e)(e.bottom,e.top)},vee=function(e){var t=lS(e);return{equals:t.equals,compare:t.compare,top:e.bottom,bottom:e.top}},yee={equals:vm.equals,compare:vm.compare,top:1/0,bottom:-1/0};const bee=Object.freeze(Object.defineProperty({__proto__:null,boundedNumber:yee,clamp:gee,reverse:vee},Symbol.toStringTag,{value:"Module"}));function M2(e){return{meet:Ig(e),join:Tg(e)}}const Cee=Object.freeze(Object.defineProperty({__proto__:null,getMinMaxDistributiveLattice:M2},Symbol.toStringTag,{value:"Module"}));function See(e){var t=M2(e);return function(n,r){return{join:t.join,meet:t.meet,zero:n,one:r}}}const _ee=Object.freeze(Object.defineProperty({__proto__:null,getMinMaxBoundedDistributiveLattice:See},Symbol.toStringTag,{value:"Module"})),Iee=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),Tee=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),xee=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),wee=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var mI=function(e,t){for(var n=t(e);n._tag==="Left";)n=t(n.left);return n.right};const Eee=Object.freeze(Object.defineProperty({__proto__:null,tailRec:mI},Symbol.toStringTag,{value:"Module"}));function gI(e,t){return function(n,r){return t.compose(e.right(r),e.left(n))}}function L2(e,t){var n=gI(e,t);return function(r,i){return t.compose(e.promap(t.id(),function(o){return o._tag==="Left"?o.left:o.right},N),n(r,i))}}function $ee(e){return gI(e,e)}function Ree(e){return L2(e,e)}const Oee=Object.freeze(Object.defineProperty({__proto__:null,fanIn:L2,fanin:Ree,split:gI,splitChoice:$ee},Symbol.toStringTag,{value:"Module"})),Fee=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var kee=function(e,t){return C(e,j2(t))},j2=function(e){return function(t){return H(e,t)}},U2="Predicate",B2=function(){return{concat:function(e,t){return C(e,D2(t))}}},Mee=function(){return{concat:B2().concat,empty:XM}},P2=function(){return{concat:function(e,t){return C(e,W2(t))}}},Lee=function(){return{concat:P2().concat,empty:aS}},jee={URI:U2,contramap:kee},Vd=function(e){return function(t){return!e(t)}},D2=function(e){return function(t){return function(n){return t(n)||e(n)}}},W2=function(e){return function(t){return function(n){return t(n)&&e(n)}}};const Uee=Object.freeze(Object.defineProperty({__proto__:null,Contravariant:jee,URI:U2,and:W2,contramap:j2,getMonoidAll:Lee,getMonoidAny:Mee,getSemigroupAll:P2,getSemigroupAny:B2,not:Vd,or:D2},Symbol.toStringTag,{value:"Module"}));var ot=Ce,Tt=de;function _v(e){return function(t){return e(t)?Tt(t):ot}}var Iv=function(e){return e._tag==="Right"?ot:Tt(e.left)},Jp=function(e){return e._tag==="Left"?ot:Tt(e.right)},Br=function(e,t){return C(e,bo(t))},Yu=function(e,t){return C(e,V2(t))},Tv=function(e,t){return C(e,Zp(t))},xv=function(e,t,n){return C(e,z2(t,n))},wv=function(e){var t=H2(e);return function(n,r){return C(n,t(r))}},Ev=function(e,t,n){return C(e,Y2(t,n))},vI=function(e){var t=rB(e);return function(n,r){return C(n,t(r))}},yI=function(e,t){return C(e,J2(t))},Qd=function(e,t){return C(e,X2(t))},bI=function(e,t){return C(e,eB(t))},K2=function(e,t){return C(e,II(t))},CI=function(e,t){return C(e,tB(t))},SI=function(e,t){return C(e,nB(t))},Gt="Option",Bee=function(e){return{show:function(t){return Ve(t)?"none":"some(".concat(e.show(t.value),")")}}},N2=function(e){return{equals:function(t,n){return t===n||(Ve(t)?Ve(n):Ve(n)?!1:e.equals(t.value,n.value))}}},Pee=function(e){return{equals:N2(e).equals,compare:function(t,n){return t===n?0:ym(t)?ym(n)?e.compare(t.value,n.value):1:-1}}},_I=function(e){return{concat:function(t,n){return Ve(t)?n:Ve(n)?t:Tt(e.concat(t.value,n.value))},empty:ot}},bo=function(e){return function(t){return Ve(t)?ot:Tt(e(t.value))}},Af={URI:Gt,map:Br},da=Tt,q2={URI:Gt,of:da},V2=function(e){return function(t){return Ve(t)||Ve(e)?ot:Tt(t.value(e.value))}},hf={URI:Gt,map:Br,ap:Yu},Q2={URI:Gt,map:Br,ap:Yu,of:da},Zp=function(e){return function(t){return Ve(t)?ot:e(t.value)}},Xp={URI:Gt,map:Br,ap:Yu,chain:Tv},Dee={URI:Gt,map:Br,ap:Yu,of:da,chain:Tv},z2=function(e,t){return function(n){return Ve(n)?e:t(e,n.value)}},H2=function(e){return function(t){return function(n){return Ve(n)?e.empty:t(n.value)}}},Y2=function(e,t){return function(n){return Ve(n)?e:t(n.value,e)}},Wee={URI:Gt,reduce:xv,foldMap:wv,reduceRight:Ev},G2=function(e){return function(t){return Ve(t)?e():t}},J2=G2,Kee={URI:Gt,map:Br,alt:yI},$v=function(){return ot},Z2={URI:Gt,zero:$v},Nee=tf(Z2,q2),qee={URI:Gt,map:Br,ap:Yu,of:da,alt:yI,zero:$v},II=function(e){return function(t){return Ve(t)?ot:Tt(e(t))}},Vee={URI:Gt,map:Br,extend:K2},mf=Zp(N),Qee=Oe(ot,ot),gf=function(e){return Ve(e)?Qee:Oe(Iv(e.value),Jp(e.value))},Gu={URI:Gt,compact:mf,separate:gf},X2=function(e){return function(t){return Ve(t)?ot:e(t.value)?t:ot}},eB=function(e){return function(t){return Ve(t)?ot:e(t.value)}},tB=function(e){return function(t){return Oe(Qd(t,Vd(e)),Qd(t,e))}},nB=function(e){return H(bo(e),gf)},pa={URI:Gt,map:Br,compact:mf,separate:gf,filter:Qd,filterMap:bI,partition:CI,partitionMap:SI},rB=function(e){return function(t){return function(n){return Ve(n)?e.of(ot):e.map(t(n.value),Tt)}}},Rv=function(e){return function(t){return Ve(t)?e.of(ot):e.map(t.value,Tt)}},TI={URI:Gt,map:Br,reduce:xv,foldMap:wv,reduceRight:Ev,traverse:vI,sequence:Rv},xI=Pi(TI,Gu),wI=Bi(TI,Gu),zee=function(e){var t=xI(e);return function(n){return function(r){return t(r,n)}}},Hee=function(e){var t=wI(e);return function(n){return function(r){return t(r,n)}}},Yee={URI:Gt,map:Br,reduce:xv,foldMap:wv,reduceRight:Ev,traverse:vI,sequence:Rv,compact:mf,separate:gf,filter:Qd,filterMap:bI,partition:CI,partitionMap:SI,wither:xI,wilt:wI},EI=function(){return ot},Gee={URI:Gt,map:Br,ap:Yu,of:da,chain:Tv,throwError:EI},vf=Jp,Ov={URI:Gt,fromEither:vf},ym=It,Ve=function(e){return e._tag==="None"},$I=function(e,t){return function(n){return Ve(n)?e():t(n.value)}},Jee=$I,Aa=$I,_s=Aa,iB=function(e){return function(t){return Ve(t)?e():t.value}},RI=iB,Zee=Qe(Af),Xee=Lt(hf),ete=jt(hf),tte=mf,nte=At(Xp),rte=II(N),ite=Ur(Ov),ote=ca(Ov,Xp),ate=la(Ov,Xp),Ju=function(e){return e==null?ot:Tt(e)},oB=function(e){try{return Tt(e())}catch{return ot}},ste=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return oB(function(){return e.apply(void 0,t)})}},ute=function(e){return H(e,Ju)},aB=function(e){return function(t){return Ve(t)?ot:Ju(e(t.value))}},OI=Aa(eL,N),sB=Aa(sS,N);function uB(e){return function(t,n){if(n===void 0){var r=uB(e);return function(i){return r(t,i)}}return Ve(n)?!1:e.equals(t,n.value)}}var cte=function(e){return function(t){return Ve(t)?!1:e(t.value)}},lte=da(on),fte=Bt(Af),dte=Pt(Xp),pte=Ut(hf),cB=da(Sn),Fv=function(e){return function(t){var n=e(0,jr(t));if(Ve(n))return ot;for(var r=[n.value],i=1;i<t.length;i++){var o=e(i,t[i]);if(Ve(o))return ot;r.push(o.value)}return Tt(r)}},FI=function(e){var t=Fv(e);return function(n){return yt(n)?t(n):cB}},Ate=FI,lB=function(e){return FI(function(t,n){return e(n)})},hte=lB(N);function mte(e){return function(t){return ym(e(t))}}var gte=aB,fB={URI:Gt,map:Br,of:da,ap:Yu,chain:Tv,reduce:xv,foldMap:wv,reduceRight:Ev,traverse:vI,sequence:Rv,zero:$v,alt:yI,extend:K2,compact:mf,separate:gf,filter:Qd,filterMap:bI,partition:CI,partitionMap:SI,wither:xI,wilt:wI,throwError:EI},vte=an(hf),yte=oi(Q2),dB=function(){return _I(gS())},bte=function(){return _I(Eg())};const Cte=Object.freeze(Object.defineProperty({__proto__:null,Alt:Kee,Alternative:qee,ApT:cB,Applicative:Q2,Apply:hf,Chain:Xp,Compactable:Gu,Do:lte,Extend:Vee,Filterable:pa,Foldable:Wee,FromEither:Ov,Functor:Af,Monad:Dee,MonadThrow:Gee,Pointed:q2,Traversable:TI,URI:Gt,Witherable:Yee,Zero:Z2,alt:J2,altW:G2,ap:V2,apFirst:Xee,apS:pte,apSecond:ete,bind:dte,bindTo:fte,chain:Zp,chainEitherK:ote,chainFirst:nte,chainFirstEitherK:ate,chainNullableK:aB,compact:mf,duplicate:rte,elem:uB,exists:cte,extend:II,filter:X2,filterMap:eB,flap:Zee,flatten:tte,fold:_s,foldMap:H2,foldW:Jee,fromEither:vf,fromEitherK:ite,fromNullable:Ju,fromNullableK:ute,fromPredicate:_v,getApplyMonoid:yte,getApplySemigroup:vte,getEq:N2,getFirstMonoid:dB,getLastMonoid:bte,getLeft:Iv,getMonoid:_I,getOrElse:RI,getOrElseW:iB,getOrd:Pee,getRefinement:mte,getRight:Jp,getShow:Bee,guard:Nee,isNone:Ve,isSome:ym,map:bo,mapNullable:gte,match:Aa,matchW:$I,none:ot,of:da,option:fB,partition:tB,partitionMap:nB,reduce:z2,reduceRight:Y2,separate:gf,sequence:Rv,sequenceArray:hte,some:Tt,throwError:EI,toNullable:OI,toUndefined:sB,traverse:rB,traverseArray:lB,traverseArrayWithIndex:Ate,traverseReadonlyArrayWithIndex:FI,traverseReadonlyNonEmptyArrayWithIndex:Fv,tryCatch:oB,tryCatchK:ste,wilt:Hee,wither:zee,zero:$v},Symbol.toStringTag,{value:"Module"}));function Co(e,t){return function(n){return e.map(n,t.compact)}}function ha(e,t,n){var r=Co(e,t),i=Hl(e,n);return function(o){return Oe(r(C(o,i(Iv))),r(C(o,i(Jp))))}}function Ste(e,t){var n=Yl(e,t).map;return{map:n,compact:Co(e,t),separate:ha(e,t,t)}}const _te=Object.freeze(Object.defineProperty({__proto__:null,compact:Co,getCompactableComposition:Ste,separate:ha},Symbol.toStringTag,{value:"Module"}));var Ite=function(e){return function(){return console.log(e)}},Tte=function(e){return function(){return console.warn(e)}},xte=function(e){return function(){return console.error(e)}},wte=function(e){return function(){return console.info(e)}};const Ete=Object.freeze(Object.defineProperty({__proto__:null,error:xte,info:wte,log:Ite,warn:Tte},Symbol.toStringTag,{value:"Module"}));var yf=bl;function $te(e){return{show:function(t){return"make(".concat(e.show(t),")")}}}var Rte=N,Ote=N,Fte=N,kte=N,Mte=N,Lte=N,jte=N,Ute=N,Bte=N;function pB(e){return{URI:Zu,_E:void 0,map:kI,ap:function(t,n){return yf(e.concat(t,n))}}}function AB(e){var t=pB(e);return{URI:Zu,_E:void 0,map:t.map,ap:t.ap,of:function(){return yf(e.empty)}}}var hB=function(e,t){return C(e,vB())},kI=function(e,t){return C(e,yB())},mB=function(e,t,n){return C(e,bB(t))},gB=function(e,t){return C(e,CB(t))},vB=function(){return bl},yB=function(){return bl},bB=function(e){return function(t){return yf(e(t))}},CB=function(e){return function(t){return yf(e(t))}},Zu="Const",SB={URI:Zu,map:kI},Pte=Qe(SB),Dte={URI:Zu,contramap:hB},Wte={URI:Zu,bimap:mB,mapLeft:gB},Kte={URI:Zu,map:kI,contramap:hB,bimap:mB,mapLeft:gB};const Nte=Object.freeze(Object.defineProperty({__proto__:null,Bifunctor:Wte,Contravariant:Dte,Functor:SB,URI:Zu,bimap:bB,const_:Kte,contramap:vB,flap:Pte,getApplicative:AB,getApply:pB,getBooleanAlgebra:Bte,getBounded:Fte,getEq:Rte,getHeytingAlgebra:Ute,getMonoid:Mte,getOrd:Ote,getRing:jte,getSemigroup:kte,getSemiring:Lte,getShow:$te,make:yf,map:yB,mapLeft:CB},Symbol.toStringTag,{value:"Module"})),qte=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var Vte={equals:function(e,t){return e.valueOf()===t.valueOf()}},Qte={equals:function(e,t){return e.getDate()===t.getDate()}},zte={equals:function(e,t){return e.getMonth()===t.getMonth()}},Hte={equals:function(e,t){return e.getFullYear()===t.getFullYear()}},Yte=C(Zg,_g(function(e){return e.valueOf()})),Gte=function(){return new Date},Jte=function(){return new Date().getTime()};const Zte=Object.freeze(Object.defineProperty({__proto__:null,Eq:Vte,Ord:Yte,create:Gte,eqDate:Qte,eqMonth:zte,eqYear:Hte,now:Jte},Symbol.toStringTag,{value:"Module"}));var wt=ea,Ye=hs,Un=function(e,t){return C(e,tc(t))},Xu=function(e,t){return C(e,xB(t))},bf=function(e,t){return C(e,ui(t))},eA=function(e,t,n){return C(e,EB(t,n))},tA=function(e){return function(t,n){var r=$B(e);return C(t,r(n))}},nA=function(e,t,n){return C(e,RB(t,n))},kv=function(e){var t=OB(e);return function(n,r){return C(n,t(r))}},MI=function(e,t,n){return C(e,PI(t,n))},LI=function(e,t){return C(e,aA(t))},_B=function(e,t){return C(e,kB(t))},jI=function(e,t){return C(e,DI(t))},UI=function(e,t){return mI(t(e),function(n){return se(n)?Ye(wt(n.left)):se(n.right)?wt(t(n.right.left)):Ye(Ye(n.right.right))})},$t="Either",Xte=function(e,t){return{show:function(n){return se(n)?"left(".concat(e.show(n.left),")"):"right(".concat(t.show(n.right),")")}}},ene=function(e,t){return{equals:function(n,r){return n===r||(se(n)?se(r)&&e.equals(n.left,r.left):WI(r)&&t.equals(n.right,r.right))}}},rA=function(e){return{concat:function(t,n){return se(n)?t:se(t)?n:Ye(e.concat(t.right,n.right))}}},ec=function(e){var t=wt(e.empty);return{URI:$t,_E:void 0,compact:function(n){return se(n)?n:n.right._tag==="None"?t:Ye(n.right.value)},separate:function(n){return se(n)?Oe(n,n):se(n.right)?Oe(Ye(n.right.left),t):Oe(t,Ye(n.right.right))}}},Cf=function(e){var t=wt(e.empty),n=ec(e),r=n.compact,i=n.separate,o=function(s,u){return se(s)||u(s.right)?s:t},a=function(s,u){return se(s)?Oe(s,s):u(s.right)?Oe(t,Ye(s.right)):Oe(Ye(s.right),t)};return{URI:$t,_E:void 0,map:Un,compact:r,separate:i,filter:o,filterMap:function(s,u){if(se(s))return s;var c=u(s.right);return c._tag==="None"?t:Ye(c.value)},partition:a,partitionMap:function(s,u){if(se(s))return Oe(s,s);var c=u(s.right);return se(c)?Oe(Ye(c.left),t):Oe(t,Ye(c.right))}}},tne=function(e){var t=Cf(e),n=ec(e);return{URI:$t,_E:void 0,map:Un,compact:t.compact,separate:t.separate,filter:t.filter,filterMap:t.filterMap,partition:t.partition,partitionMap:t.partitionMap,traverse:kv,sequence:oA,reduce:eA,foldMap:tA,reduceRight:nA,wither:Pi(W1,n),wilt:Bi(W1,n)}},Is=function(e){return{URI:$t,_E:void 0,map:Un,ap:function(t,n){return se(t)?se(n)?wt(e.concat(t.left,n.left)):t:se(n)?n:Ye(t.right(n.right))},of:So}},IB=function(e){return{URI:$t,_E:void 0,map:Un,alt:function(t,n){if(WI(t))return t;var r=n();return se(r)?wt(e.concat(t.left,r.left)):r}}},tc=function(e){return function(t){return se(t)?t:Ye(e(t.right))}},Ts={URI:$t,map:Un},So=Ye,nne={URI:$t,of:So},TB=function(e){return function(t){return se(t)?t:se(e)?e:Ye(t.right(e.right))}},xB=TB,Sf={URI:$t,map:Un,ap:Xu},wB={URI:$t,map:Un,ap:Xu,of:So},BI=function(e){return function(t){return se(t)?t:e(t.right)}},ui=BI,iA={URI:$t,map:Un,ap:Xu,chain:bf},rne={URI:$t,map:Un,ap:Xu,of:So,chain:bf},EB=function(e,t){return function(n){return se(n)?e:t(e,n.right)}},$B=function(e){return function(t){return function(n){return se(n)?e.empty:t(n.right)}}},RB=function(e,t){return function(n){return se(n)?e:t(n.right,e)}},ine={URI:$t,reduce:eA,foldMap:tA,reduceRight:nA},OB=function(e){return function(t){return function(n){return se(n)?e.of(wt(n.left)):e.map(t(n.right),Ye)}}},oA=function(e){return function(t){return se(t)?e.of(wt(t.left)):e.map(t.right,Ye)}},W1={URI:$t,map:Un,reduce:eA,foldMap:tA,reduceRight:nA,traverse:kv,sequence:oA},PI=function(e,t){return function(n){return se(n)?wt(e(n.left)):Ye(t(n.right))}},aA=function(e){return function(t){return se(t)?wt(e(t.left)):t}},one={URI:$t,bimap:MI,mapLeft:LI},FB=function(e){return function(t){return se(t)?e():t}},kB=FB,ane={URI:$t,map:Un,alt:_B},DI=function(e){return function(t){return se(t)?t:Ye(e(t))}},sne={URI:$t,map:Un,extend:jI},une={URI:$t,map:Un,ap:Xu,chain:bf,chainRec:UI},Mv=wt,cne={URI:$t,map:Un,ap:Xu,of:So,chain:bf,throwError:Mv},_f={URI:$t,fromEither:N},lne=ms(_f),MB=go(_f),se=nn,WI=uS,KI=function(e,t){return function(n){return se(n)?e(n.left):t(n.right)}},LB=KI,xs=KI,NI=xs,jB=function(e){return function(t){return se(t)?e(t.left):t.right}},fne=jB,dne=Qe(Ts),UB=Lt(Sf),pne=UB,BB=jt(Sf),Ane=BB,PB=At(iA),hne=PB,DB=BI(N),mne=DB,gne=DI(N),vne=vo(_f),yne=Nu(_f,iA),WB=qu(_f,iA),bne=WB,KB=function(e){return se(e)?Ye(e.left):wt(e.right)},NB=function(e){return function(t){return se(t)?e(t.left):t}},qB=NB,qI=function(e){return function(t){return t==null?wt(e):Ye(t)}},nc=function(e,t){try{return Ye(e())}catch(n){return wt(t(n))}},Cne=function(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return nc(function(){return e.apply(void 0,n)},t)}},VB=function(e){var t=qI(e);return function(n){return H(n,t)}},Sne=function(e){var t=VB(e);return function(n){return ui(t(n))}},QB=LB(N,N);function _ne(e){return e instanceof Error?e:new Error(String(e))}function zB(e){return function(t,n){if(n===void 0){var r=zB(e);return function(i){return r(t,i)}}return se(n)?!1:e.equals(t,n.right)}}var Ine=function(e){return function(t){return se(t)?!1:e(t.right)}},Tne=So(on),xne=Bt(Ts),HB=Pt(iA),wne=HB,YB=Ut(Sf),Ene=YB,GB=So(Sn),sA=function(e){return function(t){var n=e(0,jr(t));if(se(n))return n;for(var r=[n.right],i=1;i<t.length;i++){var o=e(i,t[i]);if(se(o))return o;r.push(o.right)}return Ye(r)}},VI=function(e){var t=sA(e);return function(n){return yt(n)?t(n):GB}},$ne=VI,JB=function(e){return VI(function(t,n){return e(n)})},Rne=JB(N);function One(e,t){return nc(function(){return JSON.parse(e)},t)}var Fne=function(e,t){return nc(function(){var n=JSON.stringify(e);if(typeof n!="string")throw new Error("Converting unsupported structure to JSON");return n},t)},kne={URI:$t,map:Un,of:So,ap:Xu,chain:bf,reduce:eA,foldMap:tA,reduceRight:nA,traverse:kv,sequence:oA,bimap:MI,mapLeft:LI,alt:_B,extend:jI,chainRec:UI,throwError:Mv},Mne=an(Sf),Lne=oi(wB),jne=function(e,t){return an(Is(e))(t)},Une=function(e,t){return oi(Is(e))(t)};function Bne(e){var t=Is(e).ap,n=IB(e).alt;return{URI:$t,_E:void 0,map:Un,of:So,chain:bf,bimap:MI,mapLeft:LI,reduce:eA,foldMap:tA,reduceRight:nA,extend:jI,traverse:kv,sequence:oA,chainRec:UI,throwError:Mv,ap:t,alt:n}}const ZB=Object.freeze(Object.defineProperty({__proto__:null,Alt:ane,ApT:GB,Applicative:wB,Apply:Sf,Bifunctor:one,Chain:iA,ChainRec:une,Do:Tne,Extend:sne,Foldable:ine,FromEither:_f,Functor:Ts,Monad:rne,MonadThrow:cne,Pointed:nne,Traversable:W1,URI:$t,alt:kB,altW:FB,ap:xB,apFirst:UB,apFirstW:pne,apS:YB,apSW:Ene,apSecond:BB,apSecondW:Ane,apW:TB,bimap:PI,bind:HB,bindTo:xne,bindW:wne,chain:ui,chainFirst:PB,chainFirstW:hne,chainNullableK:Sne,chainOptionK:yne,chainW:BI,duplicate:gne,either:kne,elem:zB,exists:Ine,extend:DI,filterOrElse:WB,filterOrElseW:bne,flap:dne,flatten:mne,flattenW:DB,fold:NI,foldMap:$B,foldW:LB,fromNullable:qI,fromNullableK:VB,fromOption:MB,fromOptionK:vne,fromPredicate:lne,getAltValidation:IB,getApplicativeValidation:Is,getApplyMonoid:Lne,getApplySemigroup:Mne,getCompactable:ec,getEq:ene,getFilterable:Cf,getOrElse:fne,getOrElseW:jB,getSemigroup:rA,getShow:Xte,getValidation:Bne,getValidationMonoid:Une,getValidationSemigroup:jne,getWitherable:tne,isLeft:se,isRight:WI,left:wt,map:tc,mapLeft:aA,match:xs,matchW:KI,of:So,orElse:qB,orElseW:NB,parseJSON:One,reduce:EB,reduceRight:RB,right:Ye,sequence:oA,sequenceArray:Rne,stringifyJSON:Fne,swap:KB,throwError:Mv,toError:_ne,toUnion:QB,traverse:OB,traverseArray:JB,traverseArrayWithIndex:$ne,traverseReadonlyArrayWithIndex:VI,traverseReadonlyNonEmptyArrayWithIndex:sA,tryCatch:nc,tryCatchK:Cne},Symbol.toStringTag,{value:"Module"}));function rc(e){return H(Ye,e.of)}function If(e){return H(wt,e.of)}function Tf(e){return function(t){return e.map(t,Ye)}}function xf(e){return function(t){return e.map(t,wt)}}function Lv(e){return function(t){return H(qI(t),e.of)}}function jv(e){var t=Lv(e);return function(n){var r=t(n);return function(i){return H(i,r)}}}function QI(e){var t=ic(e),n=jv(e);return function(r){var i=n(r);return function(o){return t(i(o))}}}function wf(e){return Hl(e,Ts)}function Ef(e){return ua(e,Sf)}function ic(e){return function(t){return function(n){return e.chain(n,function(r){return se(r)?e.of(r):t(r.right)})}}}function $f(e){return function(t){return function(n){return e.chain(n,function(r){return se(r)?t():e.of(r)})}}}function Rf(e){return function(t,n){return function(r){return e.map(r,PI(t,n))}}}function Of(e){return function(t){return function(n){return e.map(n,aA(t))}}}function uA(e,t){return function(n){return function(r){return e.chain(r,xs(function(i){return e.map(n(),aA(function(o){return t.concat(i,o)}))},rc(e)))}}}function cA(e){return function(t,n){return function(r){return e.map(r,xs(t,n))}}}function Ff(e){return function(t,n){return function(r){return e.chain(r,xs(t,n))}}}function kf(e){return function(t){return function(n){return e.chain(n,xs(t,e.of))}}}function oc(e){return function(t){return function(n){return e.chain(n,function(r){return se(r)?t(r.left):e.of(r)})}}}function lA(e){var t=oc(e);return function(n){return t(function(r){return e.map(n(r),function(i){return se(i)?i:wt(r)})})}}function fA(e){return function(t){return function(n){return e.chain(n,xs(function(r){return e.map(t(r),wt)},function(r){return e.of(Ye(r))}))}}}function Mf(e){return function(t){return e.map(t,KB)}}function dA(e){return function(t){return e.map(t,QB)}}function Pne(e){var t=Ef(e),n=wf(e),r=ic(e),i=$f(e),o=Rf(e),a=Of(e),s=Ff(e),u=kf(e),c=oc(e);return{map:function(l,d){return C(l,n(d))},ap:function(l,d){return C(l,t(d))},of:rc(e),chain:function(l,d){return C(l,r(d))},alt:function(l,d){return C(l,i(d))},bimap:function(l,d,p){return C(l,o(d,p))},mapLeft:function(l,d){return C(l,a(d))},fold:function(l,d,p){return C(l,s(d,p))},getOrElse:function(l,d){return C(l,u(d))},orElse:function(l,d){return C(l,c(d))},swap:Mf(e),rightM:Tf(e),leftM:xf(e),left:If(e)}}const Dne=Object.freeze(Object.defineProperty({__proto__:null,alt:$f,altValidation:uA,ap:Ef,bimap:Rf,chain:ic,chainNullableK:QI,fromNullable:Lv,fromNullableK:jv,getEitherM:Pne,getOrElse:kf,left:If,leftF:xf,map:wf,mapLeft:Of,match:cA,matchE:Ff,orElse:oc,orElseFirst:lA,orLeft:fA,right:rc,rightF:Tf,swap:Mf,toUnion:dA},Symbol.toStringTag,{value:"Module"}));var Wne="Endomorphism",XB=function(){return{concat:function(e,t){return H(e,t)}}},eP=function(){return{concat:XB().concat,empty:N}};const Kne=Object.freeze(Object.defineProperty({__proto__:null,URI:Wne,getMonoid:eP,getSemigroup:XB},Symbol.toStringTag,{value:"Module"})),Nne=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function tP(e,t){var n=t.zero,r=function(i,o){return e.equals(o,n)?i:r(o,t.mod(i,o))};return r}function qne(e,t){var n=t.zero,r=tP(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))}}var Vne={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}};const Qne=Object.freeze(Object.defineProperty({__proto__:null,fieldNumber:Vne,gcd:tP,lcm:qne},Symbol.toStringTag,{value:"Module"}));function ma(e,t){return function(n){return function(r){return e.map(r,function(i){return t.filter(i,n)})}}}function ga(e,t){return function(n){return function(r){return e.map(r,function(i){return t.filterMap(i,n)})}}}function ws(e,t){var n=ma(e,t);return function(r){var i=n(Vd(r)),o=n(r);return function(a){return Oe(i(a),o(a))}}}function Es(e,t){var n=ga(e,t);return function(r){return function(i){return Oe(C(i,n(function(o){return Iv(r(o))})),C(i,n(function(o){return Jp(r(o))})))}}}function zne(e,t){var n=Yl(e,t).map,r=Co(e,t),i=ha(e,t,t),o=ma(e,t),a=ga(e,t),s=ws(e,t),u=Es(e,t);return{map:n,compact:r,separate:i,filter:function(c,l){return C(c,o(l))},filterMap:function(c,l){return C(c,a(l))},partition:function(c,l){return C(c,s(l))},partitionMap:function(c,l){return C(c,u(l))}}}const Hne=Object.freeze(Object.defineProperty({__proto__:null,filter:ma,filterMap:ga,getFilterableComposition:zne,partition:ws,partitionMap:Es},Symbol.toStringTag,{value:"Module"})),Yne=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function nP(e,t){return function(n,r){return function(i){return e.reduce(i,n,function(o,a){return t.reduce(a,o,r)})}}}function rP(e,t){return function(n){var r=e.foldMap(n),i=t.foldMap(n);return function(o){return function(a){return r(a,function(s){return i(s,o)})}}}}function iP(e,t){return function(n,r){return function(i){return e.reduceRight(i,n,function(o,a){return t.reduceRight(o,a,r)})}}}function Gne(e,t){return function(n,r){return function(i){return t.reduce(i,e.of(n),function(o,a){return e.chain(o,function(s){return r(s,a)})})}}}function Jne(e,t){return function(n,r){var i=function(o,a){var s=o.init,u=o.acc;return s?{init:!1,acc:a}:{init:!1,acc:e.concat(e.concat(u,n),a)}};return t.reduce(r,{init:!0,acc:e.empty},i).acc}}function oP(e){return function(t){return e.reduce(t,[],function(n,r){return n.push(r),n})}}function Zne(e,t){var n=function(i,o){return e.ap(e.map(i,pr),o)},r=e.of(void 0);return function(i,o){return t.reduce(i,r,function(a,s){return n(a,o(s))})}}function Xne(e,t){return function(n,r,i){return t.reduce(n,e.of(r),function(o,a){return e.chain(o,function(s){return i(s,a)})})}}var ere=oP;function zI(e,t){var n=nP(e,t),r=rP(e,t),i=iP(e,t);return{reduce:function(o,a,s){return C(o,n(a,s))},foldMap:function(o){var a=r(o);return function(s,u){return C(s,a(u))}},reduceRight:function(o,a,s){return C(o,i(a,s))}}}const tre=Object.freeze(Object.defineProperty({__proto__:null,foldM:Xne,foldMap:rP,getFoldableComposition:zI,intercalate:Jne,reduce:nP,reduceM:Gne,reduceRight:iP,toArray:ere,toReadonlyArray:oP,traverse_:Zne},Symbol.toStringTag,{value:"Module"}));function aP(e,t){return function(n,r){return function(i){return e.reduceWithIndex(i,n,function(o,a,s){return t.reduceWithIndex(s,a,function(u,c,l){return r([o,u],c,l)})})}}}function sP(e,t){return function(n){var r=e.foldMapWithIndex(n),i=t.foldMapWithIndex(n);return function(o){return function(a){return r(a,function(s,u){return i(u,function(c,l){return o([s,c],l)})})}}}}function uP(e,t){return function(n,r){return function(i){return e.reduceRightWithIndex(i,n,function(o,a,s){return t.reduceRightWithIndex(a,s,function(u,c,l){return r([o,u],c,l)})})}}}function nre(e,t){var n=zI(e,t),r=aP(e,t),i=sP(e,t),o=uP(e,t);return{reduce:n.reduce,foldMap:n.foldMap,reduceRight:n.reduceRight,reduceWithIndex:function(a,s,u){return C(a,r(s,u))},foldMapWithIndex:function(a){var s=i(a);return function(u,c){return C(u,s(c))}},reduceRightWithIndex:function(a,s,u){return C(a,o(s,u))}}}const rre=Object.freeze(Object.defineProperty({__proto__:null,foldMapWithIndex:sP,getFoldableWithIndexComposition:nre,reduceRightWithIndex:uP,reduceWithIndex:aP},Symbol.toStringTag,{value:"Module"}));function _o(e){return function(t){return H(t,e.fromIO)}}function va(e,t){return function(n){var r=H(n,e.fromIO);return function(i){return t.chain(i,r)}}}function ya(e,t){var n=At(t);return function(r){return n(H(r,e.fromIO))}}const ire=Object.freeze(Object.defineProperty({__proto__:null,chainFirstIOK:ya,chainIOK:va,fromIOK:_o},Symbol.toStringTag,{value:"Module"}));var cP=function(){return N},ore=N,pA=function(e){return function(t){return function(n){return t(e(n))}}},AA=function(e){return function(t){return e(t)(t)}},are=AA,ba=function(e,t){return C(e,ac(t))},hA=function(e,t){return C(e,dP(t))},HI=function(e,t){return C(e,pP(t))},lP=function(e,t){return C(e,hP(t))},Uv=function(e,t,n){return C(e,mP(t,n))},ac=function(e){return function(t){return function(n){return e(t(n))}}},fP=function(e){return function(t){return function(n){return t(n)(e(n))}}},dP=fP,Io=pr,YI=function(e){return function(t){return function(n){return e(t(n))(n)}}},pP=YI,AP=YI(N),sre=AP,hP=function(e){return function(t){return H(e,t)}},mP=function(e,t){return function(n){return function(r){return t(n(e(r)))}}},GI=function(){return N},JI=function(e){return function(t){var n=t[0],r=t[1];return[e(n),r]}},ZI=function(e){return function(t){var n=t[0],r=t[1];return[n,e(r)]}},XI=function(e){return NI(function(t){return ea(e(t))},Ye)},eT=function(e){return NI(wt,function(t){return hs(e(t))})},ci="Reader",vn={URI:ci,map:ba},ure=Qe(vn),tT={URI:ci,of:Io},Ca={URI:ci,map:ba,ap:hA},gP=Lt(Ca),cre=gP,vP=jt(Ca),lre=vP,yP={URI:ci,map:ba,ap:hA,of:Io},nT={URI:ci,map:ba,ap:hA,chain:HI},Sa={URI:ci,map:ba,of:Io,ap:hA,chain:HI},bP=At(nT),fre=bP,dre={URI:ci,map:ba,promap:Uv},pre={URI:ci,compose:lP,id:GI},Are={URI:ci,map:ba,promap:Uv,first:JI,second:ZI},hre={URI:ci,map:ba,promap:Uv,left:XI,right:eT},mre=Bt(vn),CP=Pt(nT),gre=CP,vre=Io(on),SP=Ut(Ca),yre=SP,_P=Io(Sn),sc=function(e){return function(t){return function(n){for(var r=[e(0,jr(t))(n)],i=1;i<t.length;i++)r.push(e(i,t[i])(n));return r}}},rT=function(e){var t=sc(e);return function(n){return yt(n)?t(n):_P}},bre=rT,IP=function(e){return rT(function(t,n){return e(n)})},Cre=IP(N),Sre={URI:ci,map:ba,of:Io,ap:hA,chain:HI,promap:Uv,compose:lP,id:GI,first:JI,second:ZI,left:XI,right:eT},_re=an(Ca),Ire=oi(yP);const Tre=Object.freeze(Object.defineProperty({__proto__:null,ApT:_P,Applicative:yP,Apply:Ca,Category:pre,Chain:nT,Choice:hre,Do:vre,Functor:vn,Monad:Sa,Pointed:tT,Profunctor:dre,Strong:Are,URI:ci,ap:dP,apFirst:gP,apFirstW:cre,apS:SP,apSW:yre,apSecond:vP,apSecondW:lre,apW:fP,ask:cP,asks:ore,asksReader:are,asksReaderW:AA,bind:CP,bindTo:mre,bindW:gre,chain:pP,chainFirst:bP,chainFirstW:fre,chainW:YI,compose:hP,first:JI,flap:ure,flatten:sre,flattenW:AP,getMonoid:Ire,getSemigroup:_re,id:GI,left:XI,local:pA,map:ac,of:Io,promap:mP,reader:Sre,right:eT,second:ZI,sequenceArray:Cre,traverseArray:IP,traverseArrayWithIndex:bre,traverseReadonlyArrayWithIndex:rT,traverseReadonlyNonEmptyArrayWithIndex:sc},Symbol.toStringTag,{value:"Module"}));function mA(e){return function(){return e.fromReader(cP())}}function gA(e){return e.fromReader}function uc(e){return function(t){return H(t,e.fromReader)}}function vA(e,t){var n=uc(e);return function(r){return function(i){return t.chain(i,n(r))}}}function yA(e,t){return H(uc(e),At(t))}const xre=Object.freeze(Object.defineProperty({__proto__:null,ask:mA,asks:gA,chainFirstReaderK:yA,chainReaderK:vA,fromReaderK:uc},Symbol.toStringTag,{value:"Module"}));var TP=function(){return function(e){return[e,e]}},xP=function(e){return function(){return[void 0,e]}},wP=function(e){return function(t){return[void 0,e(t)]}},EP=function(e){return function(t){return[e(t),t]}},bA=function(e,t){return C(e,RP(t))},Bv=function(e,t){return C(e,OP(t))},$P=function(e,t){return C(e,iT(t))},RP=function(e){return function(t){return function(n){var r=t(n),i=r[0],o=r[1];return[e(i),o]}}},OP=function(e){return function(t){return function(n){var r=t(n),i=r[0],o=r[1],a=e(o),s=a[0],u=a[1];return[i(s),u]}}},CA=function(e){return function(t){return[e,t]}},iT=function(e){return function(t){return function(n){var r=t(n),i=r[0],o=r[1];return e(i)(o)}}},wre=iT(N),$s="State",oT={URI:$s,map:bA},Ere=Qe(oT),$re={URI:$s,of:CA},Pv={URI:$s,map:bA,ap:Bv},Rre=Lt(Pv),Ore=jt(Pv),Fre={URI:$s,map:bA,ap:Bv,of:CA},aT={URI:$s,map:bA,ap:Bv,chain:$P},FP={URI:$s,map:bA,ap:Bv,of:CA,chain:$P},kre=At(aT),Mre={URI:$s,fromState:N},Lre=function(e){return function(t){return t(e)[0]}},jre=function(e){return function(t){return t(e)[1]}},Ure=Bt(oT),Bre=Pt(aT),Pre=Ut(Pv),kP=function(e){return function(t){return function(n){for(var r=e(0,jr(t))(n),i=r[0],o=r[1],a=[i],s=o,u=1;u<t.length;u++){var c=e(u,t[u])(s),l=c[0],d=c[1];a.push(l),s=d}return[a,s]}}},sT=function(e){var t=kP(e);return function(n){return yt(n)?t(n):CA(Sn)}},Dre=sT,MP=function(e){return sT(function(t,n){return e(n)})},Wre=MP(N),Kre=function(e,t){return e(t)[0]},Nre=function(e,t){return e(t)[1]},qre=FP;const Vre=Object.freeze(Object.defineProperty({__proto__:null,Applicative:Fre,Apply:Pv,Chain:aT,FromState:Mre,Functor:oT,Monad:FP,Pointed:$re,URI:$s,ap:OP,apFirst:Rre,apS:Pre,apSecond:Ore,bind:Bre,bindTo:Ure,chain:iT,chainFirst:kre,evalState:Kre,evaluate:Lre,execState:Nre,execute:jre,flap:Ere,flatten:wre,get:TP,gets:EP,map:RP,modify:wP,of:CA,put:xP,sequenceArray:Wre,state:qre,traverseArray:MP,traverseArrayWithIndex:Dre,traverseReadonlyArrayWithIndex:sT,traverseReadonlyNonEmptyArrayWithIndex:kP},Symbol.toStringTag,{value:"Module"}));function LP(e){return function(){return e.fromState(TP())}}function jP(e){return function(t){return e.fromState(xP(t))}}function UP(e){return H(wP,e.fromState)}function BP(e){return H(EP,e.fromState)}function uT(e){return function(t){return H(t,e.fromState)}}function PP(e,t){var n=uT(e);return function(r){return function(i){return t.chain(i,n(r))}}}const Qre=Object.freeze(Object.defineProperty({__proto__:null,chainStateK:PP,fromStateK:uT,get:LP,gets:BP,modify:UP,put:jP},Symbol.toStringTag,{value:"Module"}));function cc(e){return function(t){return H(t,e.fromTask)}}function Lf(e,t){return function(n){var r=H(n,e.fromTask);return function(i){return t.chain(i,r)}}}function jf(e,t){var n=At(t);return function(r){return n(H(r,e.fromTask))}}const zre=Object.freeze(Object.defineProperty({__proto__:null,chainFirstTaskK:jf,chainTaskK:Lf,fromTaskK:cc},Symbol.toStringTag,{value:"Module"}));function DP(e){return function(t){return H(t,e.fromThese)}}const Hre=Object.freeze(Object.defineProperty({__proto__:null,fromTheseK:DP},Symbol.toStringTag,{value:"Module"}));function WP(e,t){return function(n){return function(r){return e.mapWithIndex(r,function(i,o){return t.mapWithIndex(o,function(a,s){return n([i,a],s)})})}}}function Yre(e,t){var n=Yl(e,t).map,r=WP(e,t);return{map:n,mapWithIndex:function(i,o){return C(i,r(o))}}}const Gre=Object.freeze(Object.defineProperty({__proto__:null,getFunctorWithIndexComposition:Yre,mapWithIndex:WP},Symbol.toStringTag,{value:"Module"})),Jre=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),Zre=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),Xre=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var To=function(e,t){return C(e,QP(t))},Uf=function(e,t){return C(e,zP(t))},Dv=function(e,t){return C(e,dT(t))},cT=function(e,t,n){return C(e,HP(t,n))},lT=function(e){return function(t,n){return C(t,YP()(n))}},fT=function(e,t,n){return C(e,GP(t,n))},KP=function(e,t){return C(e,XP())},NP=function(e,t){return C(e,pT(t))},qP=function(e){var t=JP(e);return function(n,r){return C(n,t(r))}},VP=mI,QP=function(e){return function(t){return e(t)}},zP=function(e){return function(t){return t(e)}},Bf=N,dT=function(e){return function(t){return e(t)}},pT=function(e){return function(t){return e(t)}},AT=N,eie=pT(N),tie=dT(N),HP=function(e,t){return function(n){return t(e,n)}},YP=function(){return function(e){return function(t){return e(t)}}},GP=function(e,t){return function(n){return t(n,e)}},JP=function(e){return function(t){return function(n){return e.map(t(n),N)}}},hT=function(e){return function(t){return e.map(t,N)}},ZP=function(){return N},XP=ZP,Pr="Identity",nie=N,rie=N,mT={URI:Pr,map:To},iie=Qe(mT),oie={URI:Pr,of:Bf},Wv={URI:Pr,map:To,ap:Uf},aie=Lt(Wv),sie=jt(Wv),uie={URI:Pr,map:To,ap:Uf,of:Bf},gT={URI:Pr,map:To,ap:Uf,chain:Dv},cie={URI:Pr,map:To,ap:Uf,of:Bf,chain:Dv},lie=At(gT),fie={URI:Pr,reduce:cT,foldMap:lT,reduceRight:fT},die={URI:Pr,map:To,reduce:cT,foldMap:lT,reduceRight:fT,traverse:qP,sequence:hT},pie={URI:Pr,map:To,alt:KP},Aie={URI:Pr,map:To,extend:NP,extract:AT},hie={URI:Pr,map:To,ap:Uf,chain:Dv,chainRec:VP},mie=Bf(on),gie=Bt(mT),vie=Pt(gT),yie=Ut(Wv),bie={URI:Pr,map:To,ap:Uf,of:Bf,chain:Dv,reduce:cT,foldMap:lT,reduceRight:fT,traverse:qP,sequence:hT,alt:KP,extract:AT,extend:NP,chainRec:VP};const Cie=Object.freeze(Object.defineProperty({__proto__:null,Alt:pie,Applicative:uie,Apply:Wv,Chain:gT,ChainRec:hie,Comonad:Aie,Do:mie,Foldable:fie,Functor:mT,Monad:cie,Pointed:oie,Traversable:die,URI:Pr,alt:XP,altW:ZP,ap:zP,apFirst:aie,apS:yie,apSecond:sie,bind:vie,bindTo:gie,chain:dT,chainFirst:lie,duplicate:eie,extend:pT,extract:AT,flap:iie,flatten:tie,foldMap:YP,getEq:rie,getShow:nie,identity:bie,map:QP,of:Bf,reduce:HP,reduceRight:GP,sequence:hT,traverse:JP},Symbol.toStringTag,{value:"Module"})),Sie=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var _a=function(e,t){return function(){return t(e())}},Rs=function(e,t){return function(){return e()(t())}},Pf=function(e,t){return function(){return t(e())()}},eD=function(e,t){return function(){for(var n=t(e)();n._tag==="Left";)n=t(n.left)();return n.right}},xo=function(e){return function(t){return _a(t,e)}},_ie=function(e){return function(t){return Rs(t,e)}},Di=pr,vT=function(e){return function(t){return Pf(t,e)}},Iie=vT(N),Wi="IO",ct={URI:Wi,map:_a},Tie=Qe(ct),wo={URI:Wi,of:Di},Ia={URI:Wi,map:_a,ap:Rs},xie=Lt(Ia),wie=jt(Ia),tD={URI:Wi,map:_a,ap:Rs,of:Di},Kv={URI:Wi,map:_a,ap:Rs,chain:Pf},hr={URI:Wi,map:_a,ap:Rs,of:Di,chain:Pf},Eie=At(Kv),yT=N,$ie={URI:Wi,map:_a,ap:Rs,of:Di,chain:Pf,fromIO:yT},Rie={URI:Wi,map:_a,ap:Rs,chain:Pf,chainRec:eD},Oie={URI:Wi,fromIO:N},Fie=Di(on),kie=Bt(ct),Mie=Pt(Kv),Lie=Ut(Ia),nD=Di(Sn),Nv=function(e){return function(t){return function(){for(var n=[e(0,jr(t))()],r=1;r<t.length;r++)n.push(e(r,t[r])());return n}}},bT=function(e){var t=Nv(e);return function(n){return yt(n)?t(n):nD}},jie=bT,rD=function(e){return bT(function(t,n){return e(n)})},Uie=rD(N),Bie={URI:Wi,map:_a,of:Di,ap:Rs,chain:Pf,fromIO:yT,chainRec:eD},Pie=an(Ia),Die=oi(tD);const Wie=Object.freeze(Object.defineProperty({__proto__:null,ApT:nD,Applicative:tD,Apply:Ia,Chain:Kv,ChainRec:Rie,Do:Fie,FromIO:Oie,Functor:ct,Monad:hr,MonadIO:$ie,Pointed:wo,URI:Wi,ap:_ie,apFirst:xie,apS:Lie,apSecond:wie,bind:Mie,bindTo:kie,chain:vT,chainFirst:Eie,flap:Tie,flatten:Iie,fromIO:yT,getMonoid:Die,getSemigroup:Pie,io:Bie,map:xo,of:Di,sequenceArray:Uie,traverseArray:rD,traverseArrayWithIndex:jie,traverseReadonlyArrayWithIndex:bT,traverseReadonlyNonEmptyArrayWithIndex:Nv},Symbol.toStringTag,{value:"Module"}));var iD=If(wo),oD=rc(wo),aD=Tf(ct),Kie=xf(ct),sD=Di,SA=aD,uD=cA(ct),Nie=uD,CT=Ff(hr),qie=CT,cD=CT,Vie=cD,lD=kf(hr),Qie=lD,fD=function(e,t){return function(){return nc(e,t)}},zie=function(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return fD(function(){return e.apply(void 0,n)},t)}},Hie=dA(ct),dD=oc(hr),Yie=dD,ST=lA(hr),Gie=ST,Jie=function(e){return ST(_D(e))},Zie=fA(hr),Xie=Mf(ct),mr=function(e,t){return C(e,TT(t))},lc=function(e,t){return C(e,xT(t))},eoe=function(e,t){return C(e,qv(function(n){return C(t,TT(n))}))},Df=function(e,t){return C(e,qv(t))},_T=function(e,t,n){return C(e,AD(t,n))},IT=function(e,t){return C(e,hD(t))},pD=function(e,t){return C(e,wT(t))},TT=wf(ct),AD=Rf(ct),hD=Of(ct),xT=Ef(Ia),toe=xT,li=oD,qv=ic(hr),bm=qv,mD=bm(N),noe=mD,wT=$f(hr),roe=wT,Vv=iD,zt="IOEither";function gD(e){var t=ua(Ia,Is(e));return{URI:zt,_E:void 0,map:mr,ap:function(n,r){return C(n,t(r))},of:li}}function vD(e){var t=uA(hr,e);return{URI:zt,_E:void 0,map:mr,alt:function(n,r){return C(n,t(r))}}}var yD=function(e){var t=ec(e);return{URI:zt,_E:void 0,compact:Co(ct,t),separate:ha(ct,t,Ts)}};function ioe(e){var t=Cf(e),n=yD(e),r=ma(ct,t),i=ga(ct,t),o=ws(ct,t),a=Es(ct,t);return{URI:zt,_E:void 0,map:mr,compact:n.compact,separate:n.separate,filter:function(s,u){return C(s,r(u))},filterMap:function(s,u){return C(s,i(u))},partition:function(s,u){return C(s,o(u))},partitionMap:function(s,u){return C(s,a(u))}}}var ET={URI:zt,map:mr},ooe=Qe(ET),aoe={URI:zt,of:li},soe={URI:zt,bimap:_T,mapLeft:IT},_A={URI:zt,map:mr,ap:lc},bD=Lt(_A),uoe=bD,CD=jt(_A),coe=CD,$T={URI:zt,map:mr,ap:lc,of:li},loe={URI:zt,map:mr,ap:eoe,of:li},Ta={URI:zt,map:mr,ap:lc,chain:Df},foe={URI:zt,map:mr,ap:lc,of:li,chain:Df},SD=At(Ta),doe=SD,poe={URI:zt,map:mr,alt:pD},Aoe={URI:zt,map:mr,ap:lc,of:li,chain:Df,fromIO:SA},hoe={URI:zt,map:mr,ap:lc,of:li,chain:Df,throwError:Vv},Qv={URI:zt,fromIO:SA},_D=_o(Qv),moe=va(Qv,Ta),goe=ya(Qv,Ta),xa={URI:zt,fromEither:sD},voe=go(xa),yoe=vo(xa),boe=Nu(xa,Ta),ID=ca(xa,Ta),Coe=ID,TD=la(xa,Ta),Soe=TD,_oe=ms(xa),xD=qu(xa,Ta),Ioe=xD,Toe=Ur(xa),xoe=function(e,t,n){return wD(e,t,n)},wD=function(e,t,n){return C(e,bm(function(r){return C(t(r),vT(function(i){return C(n(r,i),bm(function(){return Di(i)}))}))}))},woe=li(on),Eoe=Bt(ET),ED=Pt(Ta),$oe=ED,$D=Ut(_A),Roe=$D,RT=li(Sn),RD=function(e){return H(Nv(e),xo(sA(Ar)))},OT=function(e){var t=RD(e);return function(n){return yt(n)?t(n):RT}},OD=function(e){return function(t){return function(){var n=e(0,jr(t))();if(nn(n))return n;for(var r=[n.right],i=1;i<t.length;i++){var o=e(i,t[i])();if(nn(o))return o;r.push(o.right)}return hs(r)}}},FT=function(e){var t=OD(e);return function(n){return yt(n)?t(n):RT}},Ooe=OT,FD=function(e){return OT(function(t,n){return e(n)})},Foe=FD(N),koe=FT,kD=function(e){return FT(function(t,n){return e(n)})},Moe=kD(N),Loe=$T,joe={URI:zt,bimap:_T,mapLeft:IT,map:mr,of:li,ap:lc,chain:Df,alt:pD,fromIO:SA,throwError:Vv},Uoe=an(_A),Boe=oi($T),Poe=function(e){return an(Ia)(rA(e))};function Doe(e){var t=gD(e),n=vD(e);return{URI:zt,_E:void 0,map:mr,ap:t.ap,of:li,chain:Df,bimap:_T,mapLeft:IT,alt:n.alt,fromIO:SA,throwError:Vv}}const Woe=Object.freeze(Object.defineProperty({__proto__:null,Alt:poe,ApT:RT,Applicative:Loe,ApplicativePar:$T,ApplicativeSeq:loe,ApplyPar:_A,Bifunctor:soe,Chain:Ta,Do:woe,FromEither:xa,FromIO:Qv,Functor:ET,Monad:foe,MonadIO:Aoe,MonadThrow:hoe,Pointed:aoe,URI:zt,alt:wT,altW:roe,ap:xT,apFirst:bD,apFirstW:uoe,apS:$D,apSW:Roe,apSecond:CD,apSecondW:coe,apW:toe,bimap:AD,bind:ED,bindTo:Eoe,bindW:$oe,bracket:xoe,bracketW:wD,chain:qv,chainEitherK:ID,chainEitherKW:Coe,chainFirst:SD,chainFirstEitherK:TD,chainFirstEitherKW:Soe,chainFirstIOK:goe,chainFirstW:doe,chainIOK:moe,chainOptionK:boe,chainW:bm,filterOrElse:xD,filterOrElseW:Ioe,flap:ooe,flatten:noe,flattenW:mD,fold:qie,foldW:Vie,fromEither:sD,fromEitherK:Toe,fromIO:SA,fromIOK:_D,fromOption:voe,fromOptionK:yoe,fromPredicate:_oe,getAltIOValidation:vD,getApplicativeIOValidation:gD,getApplyMonoid:Boe,getApplySemigroup:Uoe,getCompactable:yD,getFilterable:ioe,getIOValidation:Doe,getOrElse:lD,getOrElseW:Qie,getSemigroup:Poe,ioEither:joe,left:iD,leftIO:Kie,map:TT,mapLeft:hD,match:uD,matchE:CT,matchEW:cD,matchW:Nie,of:li,orElse:dD,orElseFirst:ST,orElseFirstIOK:Jie,orElseFirstW:Gie,orElseW:Yie,orLeft:Zie,right:oD,rightIO:aD,sequenceArray:Foe,sequenceSeqArray:Moe,swap:Xie,throwError:Vv,toUnion:Hie,traverseArray:FD,traverseArrayWithIndex:Ooe,traverseReadonlyArrayWithIndex:OT,traverseReadonlyArrayWithIndexSeq:FT,traverseReadonlyNonEmptyArrayWithIndex:RD,traverseReadonlyNonEmptyArrayWithIndexSeq:OD,traverseSeqArray:kD,traverseSeqArrayWithIndex:koe,tryCatch:fD,tryCatchK:zie},Symbol.toStringTag,{value:"Module"}));function IA(e){return H(Tt,e.of)}function TA(e){return pr(e.of(ot))}function zv(e){return function(t){return e.map(t,Tt)}}function Hv(e){return H(Ju,e.of)}function Yv(e){var t=Hv(e);return function(n){return H(n,t)}}function kT(e){var t=Wf(e),n=Yv(e);return function(r){return t(n(r))}}function Gv(e){return function(t){return H(t,e.of)}}function MT(e){var t=Wf(e),n=Gv(e);return function(r){return t(n(r))}}function LT(e){return function(t){return function(n){return e.of(_v(t)(n))}}}function jT(e){return H(vf,e.of)}function UT(e){return function(t,n){return function(r){return e.map(r,Aa(t,n))}}}function Jv(e){return function(t,n){return function(r){return e.chain(r,Aa(t,n))}}}function Zv(e){return function(t){return function(n){return e.chain(n,Aa(t,e.of))}}}function Xv(e){return Hl(e,Af)}function ey(e){return ua(e,hf)}function Wf(e){var t=TA(e);return function(n){return function(r){return e.chain(r,Aa(function(){return t()},n))}}}function ty(e){var t=IA(e);return function(n){return function(r){return e.chain(r,Aa(n,t))}}}function Koe(e){var t=ey(e),n=Xv(e),r=Wf(e),i=ty(e),o=Jv(e),a=Zv(e),s=TA(e);return{map:function(u,c){return C(u,n(c))},ap:function(u,c){return C(u,t(c))},of:IA(e),chain:function(u,c){return C(u,r(c))},alt:function(u,c){return C(u,i(c))},fold:function(u,c,l){return C(u,o(c,l))},getOrElse:function(u,c){return C(u,a(c))},fromM:zv(e),none:function(){return s()}}}const Noe=Object.freeze(Object.defineProperty({__proto__:null,alt:ty,ap:ey,chain:Wf,chainNullableK:kT,chainOptionK:MT,fromEither:jT,fromF:zv,fromNullable:Hv,fromNullableK:Yv,fromOptionK:Gv,fromPredicate:LT,getOptionM:Koe,getOrElse:Zv,map:Xv,match:UT,matchE:Jv,some:IA,zero:TA},Symbol.toStringTag,{value:"Module"}));var MD=IA(wo),qoe=LT(wo),Voe=Di,LD=jT(wo),BT=zv(ct),Qoe=xo(vf),jD=UT(ct),zoe=jD,PT=Jv(Kv),Hoe=PT,Yoe=PT,UD=Zv(hr),Goe=UD,Joe=xo(sB),Zoe=xo(OI),Xoe=Hv(wo),eae=Yv(wo),tae=kT(hr),nae=Gv(wo),rae=MT(hr),BD=Xv(ct),PD=ey(Ia),Os=MD,DT=Wf(hr),iae=DT(N),WT=ty(hr),oae=WT,ny=TA(wo),aae=ny(),KT=Co(ct,Gu),NT=ha(ct,Gu,Af),DD=ma(ct,pa),WD=ga(ct,pa),KD=ws(ct,pa),ND=Es(ct,pa),wa=function(e,t){return C(e,BD(t))},Kf=function(e,t){return C(e,PD(t))},qT=function(e,t){return C(e,DT(t))},qD=function(e,t){return C(e,WT(t))},sae=function(e,t){return C(e,DD(t))},uae=function(e,t){return C(e,WD(t))},cae=function(e,t){return C(e,KD(t))},lae=function(e,t){return C(e,ND(t))},gr="IOOption",VT={URI:gr,map:wa},fae=Qe(VT),VD={URI:gr,of:Os},ry={URI:gr,map:wa,ap:Kf},dae=Lt(ry),pae=jt(ry),Aae={URI:gr,map:wa,ap:Kf,of:Os},fc={URI:gr,map:wa,ap:Kf,chain:qT},hae=At(fc),mae={URI:gr,map:wa,alt:qD},QD={URI:gr,zero:ny},gae=tf(QD,VD),vae={URI:gr,map:wa,ap:Kf,of:Os,alt:qD,zero:ny},yae={URI:gr,map:wa,ap:Kf,of:Os,chain:qT},bae={URI:gr,map:wa,ap:Kf,of:Os,chain:qT,fromIO:BT},Cae={URI:gr,compact:KT,separate:NT},Sae={URI:gr,map:wa,compact:KT,separate:NT,filter:sae,filterMap:uae,partition:cae,partitionMap:lae},iy={URI:gr,fromIO:BT},_ae=_o(iy),Iae=va(iy,fc),Tae=ya(iy,fc),oy={URI:gr,fromEither:LD},xae=Ur(oy),wae=ca(oy,fc),Eae=la(oy,fc),$ae=Os(on),Rae=Bt(VT),Oae=Pt(fc),Fae=Ut(ry),zD=Os(Sn),HD=function(e){return H(Nv(e),xo(Fv(Ar)))},kae=function(e){var t=HD(e);return function(n){return yt(n)?t(n):zD}};const Mae=Object.freeze(Object.defineProperty({__proto__:null,Alt:mae,Alternative:vae,ApT:zD,Applicative:Aae,Apply:ry,Chain:fc,Compactable:Cae,Do:$ae,Filterable:Sae,FromEither:oy,FromIO:iy,Functor:VT,Monad:yae,MonadIO:bae,Pointed:VD,Zero:QD,alt:WT,altW:oae,ap:PD,apFirst:dae,apS:Fae,apSecond:pae,bind:Oae,bindTo:Rae,chain:DT,chainEitherK:wae,chainFirst:hae,chainFirstEitherK:Eae,chainFirstIOK:Tae,chainIOK:Iae,chainNullableK:tae,chainOptionK:rae,compact:KT,filter:DD,filterMap:WD,flap:fae,flatten:iae,fold:Hoe,fromEither:LD,fromEitherK:xae,fromIO:BT,fromIOEither:Qoe,fromIOK:_ae,fromNullable:Xoe,fromNullableK:eae,fromOption:Voe,fromOptionK:nae,fromPredicate:qoe,getOrElse:UD,getOrElseW:Goe,guard:gae,map:BD,match:jD,matchE:PT,matchEW:Yoe,matchW:zoe,none:aae,of:Os,partition:KD,partitionMap:ND,separate:NT,some:MD,toNullable:Zoe,toUndefined:Joe,traverseReadonlyArrayWithIndex:kae,traverseReadonlyNonEmptyArrayWithIndex:HD,zero:ny},Symbol.toStringTag,{value:"Module"}));var YD=function(){function e(t){var n=this;this.value=t,this.read=function(){return n.value},this.write=this.write.bind(this),this.modify=this.modify.bind(this)}return e.prototype.write=function(t){var n=this;return function(){n.value=t}},e.prototype.modify=function(t){var n=this;return function(){n.value=t(n.value)}},e}();function Lae(e){return function(){return new YD(e)}}const jae=Object.freeze(Object.defineProperty({__proto__:null,IORef:YD,newIORef:Lae},Symbol.toStringTag,{value:"Module"})),Uae=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var Bae=function(e){return nc(function(){return JSON.parse(e)},N)},Pae=function(e){return nc(function(){var t=JSON.stringify(e);if(typeof t!="string")throw new Error("Converting unsupported structure to JSON");return t},N)};const Dae=Object.freeze(Object.defineProperty({__proto__:null,parse:Bae,stringify:Pae},Symbol.toStringTag,{value:"Module"})),Wae=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var Kae=function(e){return new Map(e)};function Nae(e){return new Map(e)}function GD(e,t){return{show:function(n){var r=[];return n.forEach(function(i,o){r.push("[".concat(e.show(o),", ").concat(t.show(i),"]"))}),"new Map([".concat(r.sort().join(", "),"])")}}}var JD=function(e){return e.size},lo=function(e){return e.size===0};function ay(e){var t=dc(e);return function(n,r){if(r===void 0){var i=ay(e);return function(o){return i(n,o)}}return It(t(n,r))}}function QT(e){return function(t,n){if(n===void 0){var r=QT(e);return function(s){return r(t,s)}}for(var i=n.values(),o;!(o=i.next()).done;){var a=o.value;if(e.equals(t,a))return!0}return!1}}var Nf=function(e){return function(t){return Array.from(t.keys()).sort(e.compare)}},qae=function(e){return function(t){return Array.from(t.values()).sort(e.compare)}};function ZD(e){var t=Nf(e);return function(n){return function(r){for(var i=[],o=t(r),a=0,s=o;a<s.length;a++){var u=s[a];i.push(n(u,r.get(u)))}return i}}}var XD=function(e){return ZD(e)(function(t,n){return[t,n]})};function Vae(e,t){var n=XD(e);return function(r){var i=n(r),o=i.length;return t.unfold(0,function(a){return a<o?de([i[a],a+1]):Ce})}}var eW=function(e){var t=Ea(e);return function(n,r){var i=t(n);return function(o){var a=i(o);if(Vt(a)){var s=new Map(o);return s.set(n,r),s}else if(a.value[1]!==r){var s=new Map(o);return s.set(a.value[0],r),s}return o}}},tW=function(e){var t=Ea(e);return function(n){return function(r){var i=t(n,r);if(It(i)){var o=new Map(r);return o.delete(i.value[0]),o}return r}}},Qae=function(e){var t=nW(e);return function(n,r){return t(n,function(){return r})}},nW=function(e){var t=Ea(e);return function(n,r){return function(i){var o=t(n,i);if(Vt(o))return Ce;var a=o.value,s=a[0],u=a[1],c=r(u);if(c===u)return de(i);var l=new Map(i);return l.set(s,c),de(l)}}};function zae(e){var t=dc(e),n=tW(e);return function(r){var i=n(r);return function(o){return C(t(r,o),bo(function(a){return[a,i(o)]}))}}}function Ea(e){return function(t,n){if(n===void 0){var r=Ea(e);return function(c){return r(t,c)}}for(var i=n.entries(),o;!(o=i.next()).done;){var a=o.value,s=a[0],u=a[1];if(e.equals(s,t))return de([s,u])}return Ce}}function dc(e){var t=Ea(e);return function(n,r){if(r===void 0){var i=dc(e);return function(o){return i(n,o)}}return C(t(n,r),bo(function(o){o[0];var a=o[1];return a}))}}function sy(e,t){var n=Ea(e);return function(r,i){if(i===void 0){var o=sy(e,t);return function(p){return o(p,r)}}for(var a=r.entries(),s;!(s=a.next()).done;){var u=s.value,c=u[0],l=u[1],d=n(c,i);if(Vt(d)||!e.equals(c,d.value[0])||!t.equals(l,d.value[1]))return!1}return!0}}var uy=new Map;function rW(e,t){var n=sy(e,t);return ai(function(r,i){return n(r,i)&&n(i,r)})}function Hae(e,t){var n=Ea(e);return{concat:function(r,i){if(lo(r))return i;if(lo(i))return r;for(var o=new Map(r),a=i.entries(),s;!(s=a.next()).done;){var u=s.value,c=u[0],l=u[1],d=n(c,r);It(d)?o.set(d.value[0],t.concat(d.value[1],l)):o.set(c,l)}return o},empty:uy}}var Yae=function(e,t){return new Map([[e,t]])};function Gae(e,t,n){return function(r){var i=Ea(e);return n.reduce(r,new Map,function(o,a){var s=a[0],u=a[1],c=i(s,o);return It(c)?o.set(c.value[0],t.concat(c.value[1],u)):o.set(s,u),o})}}var qf=function(e,t){for(var n=new Map,r=e.entries(),i;!(i=r.next()).done;){var o=i.value,a=o[0],s=o[1];n.set(a,t(a,s))}return n},iW=function(e){return function(t){for(var n=new Map,r=new Map,i=t.entries(),o;!(o=i.next()).done;){var a=o.value,s=a[0],u=a[1],c=e(s,u);nn(c)?n.set(s,c.left):r.set(s,c.right)}return Oe(n,r)}};function oW(e){return function(t){for(var n=new Map,r=new Map,i=t.entries(),o;!(o=i.next()).done;){var a=o.value,s=a[0],u=a[1];e(s,u)?r.set(s,u):n.set(s,u)}return Oe(n,r)}}var aW=function(e){return function(t){for(var n=new Map,r=t.entries(),i;!(i=r.next()).done;){var o=i.value,a=o[0],s=o[1],u=e(a,s);It(u)&&n.set(a,u.value)}return n}};function sW(e){return function(t){for(var n=new Map,r=t.entries(),i;!(i=r.next()).done;){var o=i.value,a=o[0],s=o[1];e(a,s)&&n.set(a,s)}return n}}var $a=function(e,t){return qf(e,function(n,r){return t(r)})},xA=function(e,t){return uW(e,function(n,r){return t(r)})},wA=function(e,t){return cW(e,function(n,r){return t(r)})},EA=function(e,t){return lW(e,function(n,r){return t(r)})},$A=function(e,t){return fW(e,function(n,r){return t(r)})},uW=function(e,t){return C(e,sW(t))},cW=function(e,t){return C(e,aW(t))},lW=function(e,t){return C(e,oW(t))},fW=function(e,t){return C(e,iW(t))},Vf=function(e){for(var t=new Map,n=e.entries(),r;!(r=n.next()).done;){var i=r.value,o=i[0],a=i[1];It(a)&&t.set(o,a.value)}return t},Jae=function(e){return function(t){return xA(t,e)}},Zae=function(e){return function(t){return wA(t,e)}},Xae=function(e){return function(t){return $a(t,e)}},ese=function(e){return function(t){return qf(t,e)}},tse=function(e){return function(t){return EA(t,e)}},nse=function(e){return function(t){return $A(t,e)}},Qf=function(e){for(var t=new Map,n=new Map,r=e.entries(),i;!(i=r.next()).done;){var o=i.value,a=o[0],s=o[1];nn(s)?t.set(a,s.left):n.set(a,s.right)}return Oe(t,n)},fi="ReadonlyMap",dW=function(e,t){var n=ZT(e,t);return{concat:function(r,i){return n(i)(r)}}},rse=function(e,t){return{concat:dW(e,t).concat,empty:uy}},ise=function(e,t){var n=XT(e,t);return{concat:function(r,i){return n(i)(r)}}},ose=function(e){return function(){var t=ex(e);return{concat:function(n,r){return t(r)(n)}}}};function ase(){return{URI:fi,_E:void 0,map:$a,mapWithIndex:qf,compact:Vf,separate:Qf,filter:xA,filterMap:wA,partition:EA,partitionMap:$A,partitionMapWithIndex:fW,partitionWithIndex:lW,filterMapWithIndex:cW,filterWithIndex:uW}}var pW={URI:fi,map:$a},sse=Qe(pW),use=function(){return{URI:fi,_E:void 0,map:$a,mapWithIndex:qf}},K1={URI:fi,compact:Vf,separate:Qf},cse={URI:fi,map:$a,compact:Vf,separate:Qf,filter:xA,filterMap:wA,partition:EA,partitionMap:$A},zT=function(e){var t=ly(e);return function(n,r){return t(n,function(i,o,a){return r(o,a)})}},HT=function(e){var t=fy(e);return function(n){var r=t(n);return function(i){return r(function(o,a){return i(a)})}}},YT=function(e){var t=dy(e);return function(n,r){return t(n,function(i,o,a){return r(o,a)})}},cy=function(e){var t=zT(e),n=HT(e),r=YT(e);return{URI:fi,_E:void 0,reduce:function(i,o,a){return C(i,t(o,a))},foldMap:function(i){var o=n(i);return function(a,s){return C(a,o(s))}},reduceRight:function(i,o,a){return C(i,r(o,a))}}},ly=function(e){var t=Nf(e);return function(n,r){return function(i){for(var o=n,a=0,s=t(i);a<s.length;a++){var u=s[a];o=r(u,o,i.get(u))}return o}}},fy=function(e){var t=Nf(e);return function(n){return function(r){return function(i){for(var o=n.empty,a=0,s=t(i);a<s.length;a++){var u=s[a];o=n.concat(o,r(u,i.get(u)))}return o}}}},dy=function(e){var t=Nf(e);return function(n,r){return function(i){for(var o=n,a=t(i),s=a.length,u=s-1;u>=0;u--){var c=a[u];o=r(c,i.get(c),o)}return o}}},GT=function(e){var t=cy(e),n=ly(e),r=fy(e),i=dy(e);return{URI:fi,_E:void 0,reduce:t.reduce,foldMap:t.foldMap,reduceRight:t.reduceRight,reduceWithIndex:function(o,a,s){return C(o,n(a,s))},foldMapWithIndex:function(o){var a=r(o);return function(s,u){return C(s,a(u))}},reduceRightWithIndex:function(o,a,s){return C(o,i(a,s))}}},lse=function(e){var t=JT(e),n=cy(e);return{URI:fi,_E:void 0,map:$a,reduce:n.reduce,foldMap:n.foldMap,reduceRight:n.reduceRight,traverse:t.traverse,sequence:t.sequence}},JT=function(e){var t=GT(e),n=Nf(e),r=function(a){return function(s,u){for(var c=a.of(new Map),l=n(s),d=l.length,p=function(m){var g=l[m],_=s.get(g);c=a.ap(a.map(c,function(b){return function(I){return b.set(g,I)}}),u(g,_))},A=0;A<d;A++)p(A);return c}},i=function(a){var s=r(a);return function(u,c){return s(u,function(l,d){return c(d)})}},o=function(a){var s=r(a);return function(u){return s(u,Ar)}};return{URI:fi,_E:void 0,map:$a,mapWithIndex:qf,reduce:t.reduce,foldMap:t.foldMap,reduceRight:t.reduceRight,reduceWithIndex:t.reduceWithIndex,foldMapWithIndex:t.foldMapWithIndex,reduceRightWithIndex:t.reduceRightWithIndex,traverse:i,sequence:o,traverseWithIndex:r}};function fse(e){var t=JT(e);return{URI:fi,_E:void 0,map:$a,compact:Vf,separate:Qf,filter:xA,filterMap:wA,partition:EA,partitionMap:$A,reduce:t.reduce,foldMap:t.foldMap,reduceRight:t.reduceRight,traverse:t.traverse,sequence:t.sequence,mapWithIndex:qf,reduceWithIndex:t.reduceWithIndex,foldMapWithIndex:t.foldMapWithIndex,reduceRightWithIndex:t.reduceRightWithIndex,traverseWithIndex:t.traverseWithIndex,wilt:Bi(t,K1),wither:Pi(t,K1)}}var ZT=function(e,t){var n=dc(e);return function(r){return function(i){if(lo(i))return r;if(lo(r))return i;for(var o=new Map,a=i.entries(),s;!(s=a.next()).done;){var u=s.value,c=u[0],l=u[1],d=n(c)(r);It(d)?o.set(c,t.concat(l,d.value)):o.set(c,l)}for(var p=r.entries();!(s=p.next()).done;){var A=s.value,c=A[0],l=A[1],d=n(c)(o);Vt(d)&&o.set(c,l)}return o}}},XT=function(e,t){var n=dc(e);return function(r){return function(i){if(lo(i)||lo(r))return uy;for(var o=new Map,a=i.entries(),s;!(s=a.next()).done;){var u=s.value,c=u[0],l=u[1],d=n(c)(r);It(d)&&o.set(c,t.concat(l,d.value))}return o}}},ex=function(e){var t=ay(e);return function(n){return function(r){if(lo(r))return n;if(lo(n))return r;for(var i=new Map,o=r.entries(),a;!(a=o.next()).done;){var s=a.value,u=s[0],c=s[1];t(u)(n)||i.set(u,c)}for(var l=n.entries();!(a=l.next()).done;){var d=a.value,u=d[0],c=d[1];t(u)(r)||i.set(u,c)}return i}}},dse=eW,pse={URI:fi,map:$a,compact:Vf,separate:Qf,filter:xA,filterMap:wA,partition:EA,partitionMap:$A};const Ase=Object.freeze(Object.defineProperty({__proto__:null,Compactable:K1,Filterable:cse,Functor:pW,URI:fi,collect:ZD,compact:Vf,deleteAt:tW,difference:ex,elem:QT,empty:uy,filter:Jae,filterMap:Zae,filterMapWithIndex:aW,filterWithIndex:sW,flap:sse,foldMap:HT,foldMapWithIndex:fy,fromFoldable:Gae,fromMap:Kae,getDifferenceMagma:ose,getEq:rW,getFilterableWithIndex:ase,getFoldable:cy,getFoldableWithIndex:GT,getFunctorWithIndex:use,getIntersectionSemigroup:ise,getMonoid:Hae,getShow:GD,getTraversable:lse,getTraversableWithIndex:JT,getUnionMonoid:rse,getUnionSemigroup:dW,getWitherable:fse,insertAt:dse,intersection:XT,isEmpty:lo,isSubmap:sy,keys:Nf,lookup:dc,lookupWithKey:Ea,map:Xae,mapWithIndex:ese,member:ay,modifyAt:nW,partition:tse,partitionMap:nse,partitionMapWithIndex:iW,partitionWithIndex:oW,pop:zae,readonlyMap:pse,reduce:zT,reduceRight:YT,reduceRightWithIndex:dy,reduceWithIndex:ly,separate:Qf,singleton:Yae,size:JD,toMap:Nae,toReadonlyArray:XD,toUnfoldable:Vae,union:ZT,updateAt:Qae,upsertAt:eW,values:qae},Symbol.toStringTag,{value:"Module"}));var _l=function(){return _l=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},_l.apply(this,arguments)},hse=GD,mse=JD,ta=lo,gse=ay,vse=QT,tx=function(e){return function(t){return Array.from(t.keys()).sort(e.compare)}},yse=function(e){return function(t){return Array.from(t.values()).sort(e.compare)}};function AW(e){var t=tx(e);return function(n){return function(r){for(var i=[],o=t(r),a=0,s=o;a<s.length;a++){var u=s[a];i.push(n(u,r.get(u)))}return i}}}function hW(e){return AW(e)(function(t,n){return[t,n]})}function bse(e,t){var n=hW(e);return function(r){var i=n(r),o=i.length;return t.unfold(0,function(a){return a<o?de([i[a],a+1]):Ce})}}var mW=function(e){var t=pc(e);return function(n,r){var i=t(n);return function(o){var a=i(o);if(Vt(a)){var s=new Map(o);return s.set(n,r),s}else if(a.value[1]!==r){var s=new Map(o);return s.set(a.value[0],r),s}return o}}},gW=function(e){var t=pc(e);return function(n){return function(r){var i=t(n,r);if(It(i)){var o=new Map(r);return o.delete(i.value[0]),o}return r}}},Cse=function(e){var t=vW(e);return function(n,r){return t(n,function(){return r})}},vW=function(e){var t=pc(e);return function(n,r){return function(i){var o=t(n,i);if(Vt(o))return Ce;var a=new Map(i);return a.set(o.value[0],r(o.value[1])),de(a)}}};function Sse(e){var t=yW(e),n=gW(e);return function(r){var i=n(r);return function(o){return C(t(r,o),bo(function(a){return[a,i(o)]}))}}}function pc(e){return function(t,n){if(n===void 0){var r=pc(e);return function(c){return r(t,c)}}for(var i=n.entries(),o;!(o=i.next()).done;){var a=o.value,s=a[0],u=a[1];if(e.equals(s,t))return de([s,u])}return Ce}}var yW=dc,_se=sy,Ise=rW;function Tse(e,t){var n=pc(e);return{concat:function(r,i){if(ta(r))return i;if(ta(i))return r;for(var o=new Map(r),a=i.entries(),s;!(s=a.next()).done;){var u=s.value,c=u[0],l=u[1],d=n(c,r);It(d)?o.set(d.value[0],t.concat(d.value[1],l)):o.set(c,l)}return o},empty:new Map}}var xse=function(e,t){return new Map([[e,t]])};function wse(e,t,n){return function(r){var i=pc(e);return n.reduce(r,new Map,function(o,a){var s=a[0],u=a[1],c=i(s,o);return It(c)?o.set(c.value[0],t.concat(c.value[1],u)):o.set(s,u),o})}}var RA=function(e,t){for(var n=new Map,r=e.entries(),i;!(i=r.next()).done;){var o=i.value,a=o[0],s=o[1];n.set(a,t(a,s))}return n},bW=function(e){return function(t){for(var n=new Map,r=new Map,i=t.entries(),o;!(o=i.next()).done;){var a=o.value,s=a[0],u=a[1],c=e(s,u);nn(c)?n.set(s,c.left):r.set(s,c.right)}return Oe(n,r)}};function CW(e){return function(t){for(var n=new Map,r=new Map,i=t.entries(),o;!(o=i.next()).done;){var a=o.value,s=a[0],u=a[1];e(s,u)?r.set(s,u):n.set(s,u)}return Oe(n,r)}}var SW=function(e){return function(t){for(var n=new Map,r=t.entries(),i;!(i=r.next()).done;){var o=i.value,a=o[0],s=o[1],u=e(a,s);It(u)&&n.set(a,u.value)}return n}};function _W(e){return function(t){for(var n=new Map,r=t.entries(),i;!(i=r.next()).done;){var o=i.value,a=o[0],s=o[1];e(a,s)&&n.set(a,s)}return n}}var zf=function(e,t){return RA(e,function(n,r){return t(r)})},py=function(e,t){return IW(e,function(n,r){return t(r)})},Ay=function(e,t){return TW(e,function(n,r){return t(r)})},hy=function(e,t){return xW(e,function(n,r){return t(r)})},my=function(e,t){return wW(e,function(n,r){return t(r)})},IW=function(e,t){return C(e,_W(t))},TW=function(e,t){return C(e,SW(t))},xW=function(e,t){return C(e,CW(t))},wW=function(e,t){return C(e,bW(t))},OA=function(e){for(var t=new Map,n=e.entries(),r;!(r=n.next()).done;){var i=r.value,o=i[0],a=i[1];It(a)&&t.set(o,a.value)}return t},Ese=function(e){return function(t){return py(t,e)}},$se=function(e){return function(t){return Ay(t,e)}},Rse=function(e){return function(t){return zf(t,e)}},Ose=function(e){return function(t){return RA(t,e)}},Fse=function(e){return function(t){return hy(t,e)}},kse=function(e){return function(t){return my(t,e)}},FA=function(e){for(var t=new Map,n=new Map,r=e.entries(),i;!(i=r.next()).done;){var o=i.value,a=o[0],s=o[1];nn(s)?t.set(a,s.left):n.set(a,s.right)}return Oe(t,n)},Ra="Map",EW=function(e,t){var n=kW(e,t);return{concat:function(r,i){return n(i)(r)}}},Mse=function(e,t){return{concat:EW(e,t).concat,empty:new Map}},Lse=function(e,t){var n=MW(e,t);return{concat:function(r,i){return n(i)(r)}}},jse=function(e){return function(){var t=LW(e);return{concat:function(n,r){return t(r)(n)}}}};function Use(){return{URI:Ra,_E:void 0,map:zf,mapWithIndex:RA,compact:OA,separate:FA,filter:py,filterMap:Ay,partition:hy,partitionMap:my,partitionMapWithIndex:wW,partitionWithIndex:xW,filterMapWithIndex:TW,filterWithIndex:IW}}function Bse(e){var t=RW(e);return{URI:Ra,_E:void 0,map:zf,compact:OA,separate:FA,filter:py,filterMap:Ay,partition:hy,partitionMap:my,reduce:t.reduce,foldMap:t.foldMap,reduceRight:t.reduceRight,traverse:t.traverse,sequence:t.sequence,mapWithIndex:RA,reduceWithIndex:t.reduceWithIndex,foldMapWithIndex:t.foldMapWithIndex,reduceRightWithIndex:t.reduceRightWithIndex,traverseWithIndex:t.traverseWithIndex,wilt:Bi(t,N1),wither:Pi(t,N1)}}var Pse=zT,Dse=HT,Wse=YT,Kse=function(e){return _l(_l({},cy(e)),{URI:Ra})},Nse=ly,qse=fy,Vse=dy,$W=function(e){return _l(_l({},GT(e)),{URI:Ra})},RW=function(e){var t=$W(e),n=tx(e),r=function(a){return function(s,u){for(var c=a.of(new Map),l=n(s),d=l.length,p=function(m){var g=l[m],_=s.get(g);c=a.ap(a.map(c,function(b){return function(I){return b.set(g,I)}}),u(g,_))},A=0;A<d;A++)p(A);return c}},i=function(a){var s=r(a);return function(u,c){return s(u,function(l,d){return c(d)})}},o=function(a){var s=r(a);return function(u){return s(u,function(c,l){return l})}};return{URI:Ra,_E:void 0,map:zf,mapWithIndex:RA,reduce:t.reduce,foldMap:t.foldMap,reduceRight:t.reduceRight,reduceWithIndex:t.reduceWithIndex,foldMapWithIndex:t.foldMapWithIndex,reduceRightWithIndex:t.reduceRightWithIndex,traverse:i,sequence:o,traverseWithIndex:r}},OW={URI:Ra,map:zf},Qse=Qe(OW),N1={URI:Ra,compact:OA,separate:FA},FW={URI:Ra,map:zf,compact:OA,separate:FA,filter:py,filterMap:Ay,partition:hy,partitionMap:my},Cm=function(e){return new Map(e)},kW=function(e,t){var n=ZT(e,t);return function(r){return function(i){return ta(i)?Cm(r):ta(r)?Cm(i):n(r)(i)}}},MW=function(e,t){var n=XT(e,t);return function(r){return function(i){return ta(i)||ta(r)?new Map:n(r)(i)}}},LW=function(e){var t=ex(e);return function(n){return function(r){return ta(r)?Cm(n):ta(n)?Cm(r):t(n)(r)}}},zse=new Map,Hse=mW,Yse=FW;const Gse=Object.freeze(Object.defineProperty({__proto__:null,Compactable:N1,Filterable:FW,Functor:OW,URI:Ra,collect:AW,compact:OA,deleteAt:gW,difference:LW,elem:vse,empty:zse,filter:Ese,filterMap:$se,filterMapWithIndex:SW,filterWithIndex:_W,flap:Qse,foldMap:Dse,foldMapWithIndex:qse,fromFoldable:wse,getDifferenceMagma:jse,getEq:Ise,getFilterableWithIndex:Use,getFoldable:Kse,getFoldableWithIndex:$W,getIntersectionSemigroup:Lse,getMonoid:Tse,getShow:hse,getTraversableWithIndex:RW,getUnionMonoid:Mse,getUnionSemigroup:EW,getWitherable:Bse,insertAt:Hse,intersection:MW,isEmpty:ta,isSubmap:_se,keys:tx,lookup:yW,lookupWithKey:pc,map:Rse,mapWithIndex:Ose,map_:Yse,member:gse,modifyAt:vW,partition:Fse,partitionMap:kse,partitionMapWithIndex:bW,partitionWithIndex:CW,pop:Sse,reduce:Pse,reduceRight:Wse,reduceRightWithIndex:Vse,reduceWithIndex:Nse,separate:FA,singleton:xse,size:mse,toArray:hW,toUnfoldable:bse,union:kW,updateAt:Cse,upsertAt:mW,values:yse},Symbol.toStringTag,{value:"Module"})),Jse=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),Zse=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),Xse=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),eue=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),tue=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var jW=function(e){return{concat:xg(e).concat,empty:e.top}},UW=function(e){return{concat:wg(e).concat,empty:e.bottom}},nx=function(e){return{concat:AS(e).concat,empty:e.empty}},BW=function(e){var t={};for(var n in e)pt.call(e,n)&&(t[n]=e[n].empty);return{concat:hS(e).concat,empty:t}},PW=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return{concat:mS.apply(EL,e).concat,empty:e.map(function(n){return n.empty})}},DW=function(e){return vS(e)(e.empty)},nue={concat:SL.concat,empty:void 0},rue=PW,iue=BW,oue=nx,aue=UW,sue=jW,uue=DW,WW={concat:_L.concat,empty:!0},KW={concat:IL.concat,empty:!1},cue=JM,lue=function(){return nx(eP())},fue={concat:TL.concat,empty:""},due={concat:xL.concat,empty:0},pue={concat:wL.concat,empty:1};const Aue=Object.freeze(Object.defineProperty({__proto__:null,concatAll:DW,fold:uue,getDualMonoid:oue,getEndomorphismMonoid:lue,getFunctionMonoid:cue,getJoinMonoid:aue,getMeetMonoid:sue,getStructMonoid:iue,getTupleMonoid:rue,max:UW,min:jW,monoidAll:WW,monoidAny:KW,monoidProduct:pue,monoidString:fue,monoidSum:due,monoidVoid:nue,reverse:nx,struct:BW,tuple:PW},Symbol.toStringTag,{value:"Module"})),hue=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var NW=function(e,t,n){return function(r){return r===-1?e():r===0?t():n()}},mue=NW,qW=function(e){return e===-1?1:e===1?-1:0},VW={equals:function(e,t){return e===t}},rx={concat:function(e,t){return e!==0?e:t}},QW={concat:rx.concat,empty:0},gue=function(e){return e<=-1?-1:e>=1?1:0},vue=qW,yue=rx,bue=VW,Cue=QW;const Sue=Object.freeze(Object.defineProperty({__proto__:null,Eq:VW,Monoid:QW,Semigroup:rx,eqOrdering:bue,invert:vue,match:mue,matchW:NW,monoidOrdering:Cue,reverse:qW,semigroupOrdering:yue,sign:gue},Symbol.toStringTag,{value:"Module"}));var _ue=function(e){return typeof e.map=="function"},Iue=function(e){return typeof e.contramap=="function"},Tue=function(e){return typeof e.mapWithIndex=="function"},xue=function(e){return typeof e.ap=="function"},wue=function(e){return typeof e.chain=="function"},Eue=function(e){return typeof e.bimap=="function"},$ue=function(e){return typeof e.extend=="function"},Rue=function(e){return typeof e.reduce=="function"},Oue=function(e){return typeof e.reduceWithIndex=="function"},Fue=function(e){return typeof e.alt=="function"},kue=function(e){return typeof e.compact=="function"},Mue=function(e){return typeof e.filter=="function"},Lue=function(e){return typeof e.filterWithIndex=="function"},jue=function(e){return typeof e.promap=="function"},Uue=function(e){return typeof e.compose=="function"},Bue=function(e){return typeof e.throwError=="function"};function Pue(e){var t={};if(_ue(e)){var n=function(M){return function(O){return e.map(O,M)}};t.map=n}if(Iue(e)){var r=function(M){return function(O){return e.contramap(O,M)}};t.contramap=r}if(Tue(e)){var i=function(M){return function(O){return e.mapWithIndex(O,M)}};t.mapWithIndex=i}if(xue(e)){var o=function(M){return function(O){return e.ap(O,M)}},a=function(M){return function(O){return e.ap(e.map(O,function(q){return function(){return q}}),M)}};t.ap=o,t.apFirst=a,t.apSecond=function(M){return function(O){return e.ap(e.map(O,function(){return function(q){return q}}),M)}}}if(wue(e)){var s=function(M){return function(O){return e.chain(O,M)}},u=function(M){return function(O){return e.chain(O,function(q){return e.map(M(q),function(){return q})})}},c=function(M){return e.chain(M,N)};t.chain=s,t.chainFirst=u,t.flatten=c}if(Eue(e)){var l=function(M,O){return function(q){return e.bimap(q,M,O)}},d=function(M){return function(O){return e.mapLeft(O,M)}};t.bimap=l,t.mapLeft=d}if($ue(e)){var p=function(M){return function(O){return e.extend(O,M)}},A=function(M){return e.extend(M,N)};t.extend=p,t.duplicate=A}if(Rue(e)){var m=function(M,O){return function(q){return e.reduce(q,M,O)}},g=function(M){var O=e.foldMap(M);return function(q){return function(ue){return O(ue,q)}}},_=function(M,O){return function(q){return e.reduceRight(q,M,O)}};t.reduce=m,t.foldMap=g,t.reduceRight=_}if(Oue(e)){var b=function(M,O){return function(q){return e.reduceWithIndex(q,M,O)}},I=function(M){var O=e.foldMapWithIndex(M);return function(q){return function(ue){return O(ue,q)}}},x=function(M,O){return function(q){return e.reduceRightWithIndex(q,M,O)}};t.reduceWithIndex=b,t.foldMapWithIndex=I,t.reduceRightWithIndex=x}if(Fue(e)){var v=function(M){return function(O){return e.alt(O,M)}};t.alt=v}if(kue(e)&&(t.compact=e.compact,t.separate=e.separate),Mue(e)){var S=function(M){return function(O){return e.filter(O,M)}},y=function(M){return function(O){return e.filterMap(O,M)}},T=function(M){return function(O){return e.partition(O,M)}},w=function(M){return function(O){return e.partitionMap(O,M)}};t.filter=S,t.filterMap=y,t.partition=T,t.partitionMap=w}if(Lue(e)){var F=function(M){return function(O){return e.filterWithIndex(O,M)}},k=function(M){return function(O){return e.filterMapWithIndex(O,M)}},$=function(M){return function(O){return e.partitionWithIndex(O,M)}},P=function(M){return function(O){return e.partitionMapWithIndex(O,M)}};t.filterWithIndex=F,t.filterMapWithIndex=k,t.partitionWithIndex=$,t.partitionMapWithIndex=P}if(jue(e)){var K=function(M,O){return function(q){return e.promap(q,M,O)}};t.promap=K}if(Uue(e)){var Y=function(M){return function(O){return e.compose(O,M)}};t.compose=Y}if(Bue(e)){var ee=function(M){return function(O){return O._tag==="None"?e.throwError(M()):e.of(O.value)}},re=function(M){return M._tag==="Left"?e.throwError(M.left):e.of(M.right)},D=function(M,O){return function(q){return M(q)?e.of(q):e.throwError(O(q))}},G=function(M,O){return function(q){return e.chain(q,function(ue){return M(ue)?e.of(ue):e.throwError(O(ue))})}};t.fromOption=ee,t.fromEither=re,t.fromPredicate=D,t.filterOrElse=G}return t}var le=C;const Due=Object.freeze(Object.defineProperty({__proto__:null,pipe:le,pipeable:Pue},Symbol.toStringTag,{value:"Module"})),Wue=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),Kue=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var gy=function(){return Math.random()};function zW(e,t){return C(gy,xo(function(n){return Math.floor((t-e+1)*n+e)}))}function Nue(e,t){return C(gy,xo(function(n){return(t-e)*n+e}))}var que=C(gy,xo(function(e){return e<.5})),Vue=function(e){return C(zW(0,e.length-1),xo(function(t){return e[t]}))};const Que=Object.freeze(Object.defineProperty({__proto__:null,random:gy,randomBool:que,randomElem:Vue,randomInt:zW,randomRange:Nue},Symbol.toStringTag,{value:"Module"}));var ix=If(tT),HW=rc(tT),YW=Tf(vn),zue=xf(vn),GW=Io,JW=YW,ZW=cA(vn),Hue=ZW,ox=Ff(Sa),Yue=ox,XW=ox,Gue=XW,eK=kf(Sa),Jue=eK,Zue=dA(vn),Xue=pA,tK=AA,ece=tK,nK=oc(Sa),tce=nK,rK=lA(Sa),nce=rK,rce=fA(Sa),ice=Mf(vn),di=function(e,t){return C(e,oK(t))},ax=function(e,t,n){return C(e,aK(t,n))},sx=function(e,t){return C(e,sK(t))},Hf=function(e,t){return C(e,ux(t))},kA=function(e,t){return C(e,cx(t))},iK=function(e,t){return C(e,lx(t))},oK=wf(vn),aK=Rf(vn),sK=Of(vn),ux=Ef(Ca),oce=ux,Eo=HW,cx=ic(Sa),uK=cx,cK=uK(N),ace=cK,lx=$f(Sa),sce=lx,fx=ix,sn="ReaderEither",lK=function(e){var t=ec(e);return{URI:sn,_E:void 0,compact:Co(vn,t),separate:ha(vn,t,Ts)}};function uce(e){var t=Cf(e),n=lK(e),r=ma(vn,t),i=ga(vn,t),o=ws(vn,t),a=Es(vn,t);return{URI:sn,_E:void 0,map:di,compact:n.compact,separate:n.separate,filter:function(s,u){return C(s,r(u))},filterMap:function(s,u){return C(s,i(u))},partition:function(s,u){return C(s,o(u))},partitionMap:function(s,u){return C(s,a(u))}}}function fK(e){var t=ua(Ca,Is(e));return{URI:sn,_E:void 0,map:di,ap:function(n,r){return C(n,t(r))},of:Eo}}function dK(e){var t=uA(Sa,e);return{URI:sn,_E:void 0,map:di,alt:function(n,r){return C(n,t(r))}}}var dx={URI:sn,map:di},cce=Qe(dx),lce={URI:sn,of:Eo},MA={URI:sn,map:di,ap:Hf},pK=Lt(MA),fce=pK,AK=jt(MA),dce=AK,hK={URI:sn,map:di,ap:Hf,of:Eo},Oa={URI:sn,map:di,ap:Hf,chain:kA},pce={URI:sn,map:di,ap:Hf,of:Eo,chain:kA},mK=At(Oa),Ace=mK,hce={URI:sn,bimap:ax,mapLeft:sx},mce={URI:sn,map:di,alt:iK},Yf={URI:sn,fromReader:JW},gce=mA(Yf),vce=gA(Yf),yce=uc(Yf),gK=vA(Yf,Oa),bce=gK,vK=yA(Yf,Oa),Cce=vK,Sce={URI:sn,map:di,ap:Hf,of:Eo,chain:kA,throwError:fx},Fa={URI:sn,fromEither:GW},_ce=go(Fa),Ice=vo(Fa),Tce=Nu(Fa,Oa),yK=ca(Fa,Oa),xce=yK,bK=la(Fa,Oa),wce=bK,Ece=ms(Fa),CK=qu(Fa,Oa),$ce=CK,Rce=Ur(Fa),Oce=Eo(on),Fce=Bt(dx),SK=Pt(Oa),kce=SK,_K=Ut(MA),Mce=_K,IK=Eo(Sn),TK=function(e){return H(sc(e),ac(sA(Ar)))},px=function(e){var t=TK(e);return function(n){return yt(n)?t(n):IK}},Lce=px,xK=function(e){return px(function(t,n){return e(n)})},jce=xK(N),Uce={URI:sn,bimap:ax,mapLeft:sx,map:di,of:Eo,ap:Hf,chain:kA,alt:iK,throwError:ix},Bce=an(MA),Pce=oi(hK),Dce=function(e){return an(Ca)(rA(e))};function Wce(e){var t=fK(e),n=dK(e);return{URI:sn,_E:void 0,map:di,ap:t.ap,of:Eo,chain:kA,bimap:ax,mapLeft:sx,alt:n.alt,throwError:fx}}const Kce=Object.freeze(Object.defineProperty({__proto__:null,Alt:mce,ApT:IK,Applicative:hK,Apply:MA,Bifunctor:hce,Chain:Oa,Do:Oce,FromEither:Fa,FromReader:Yf,Functor:dx,Monad:pce,MonadThrow:Sce,Pointed:lce,URI:sn,alt:lx,altW:sce,ap:ux,apFirst:pK,apFirstW:fce,apS:_K,apSW:Mce,apSecond:AK,apSecondW:dce,apW:oce,ask:gce,asks:vce,asksReaderEither:ece,asksReaderEitherW:tK,bimap:aK,bind:SK,bindTo:Fce,bindW:kce,chain:cx,chainEitherK:yK,chainEitherKW:xce,chainFirst:mK,chainFirstEitherK:bK,chainFirstEitherKW:wce,chainFirstReaderK:vK,chainFirstReaderKW:Cce,chainFirstW:Ace,chainOptionK:Tce,chainReaderK:gK,chainReaderKW:bce,chainW:uK,filterOrElse:CK,filterOrElseW:$ce,flap:cce,flatten:ace,flattenW:cK,fold:Yue,foldW:Gue,fromEither:GW,fromEitherK:Rce,fromOption:_ce,fromOptionK:Ice,fromPredicate:Ece,fromReader:JW,fromReaderK:yce,getAltReaderValidation:dK,getApplicativeReaderValidation:fK,getApplyMonoid:Pce,getApplySemigroup:Bce,getCompactable:lK,getFilterable:uce,getOrElse:eK,getOrElseW:Jue,getReaderValidation:Wce,getSemigroup:Dce,left:ix,leftReader:zue,local:Xue,map:oK,mapLeft:sK,match:ZW,matchE:ox,matchEW:XW,matchW:Hue,of:Eo,orElse:nK,orElseFirst:rK,orElseFirstW:nce,orElseW:tce,orLeft:rce,readerEither:Uce,right:HW,rightReader:YW,sequenceArray:jce,swap:ice,throwError:fx,toUnion:Zue,traverseArray:xK,traverseArrayWithIndex:Lce,traverseReadonlyArrayWithIndex:px,traverseReadonlyNonEmptyArrayWithIndex:TK},Symbol.toStringTag,{value:"Module"}));function Ax(e){return function(t){return function(){return e.of(t)}}}function hx(e){return function(t){return function(n){return function(r){return e.map(n(r),t)}}}}function mx(e){return function(t){return function(n){return function(r){return e.ap(n(r),t(r))}}}}function gx(e){return function(t){return function(n){return function(r){return e.chain(n(r),function(i){return t(i)(r)})}}}}function vx(e){return function(t){return H(t,e.of)}}function Nce(e){return function(t){return H(t,e)}}function qce(e){var t=mx(e),n=hx(e),r=gx(e);return{map:function(i,o){return C(i,n(o))},ap:function(i,o){return C(i,t(o))},of:Ax(e),chain:function(i,o){return C(i,r(o))},ask:function(){return e.of},asks:function(i){return H(i,e.of)},local:function(i,o){return function(a){return i(o(a))}},fromReader:vx(e),fromM:function(i){return function(){return i}}}}const Vce=Object.freeze(Object.defineProperty({__proto__:null,ap:mx,chain:gx,fromNaturalTransformation:Nce,fromReader:vx,getReaderM:qce,map:hx,of:Ax},Symbol.toStringTag,{value:"Module"}));var Zn=function(e){return function(){return Promise.resolve().then(e)}};function Qce(e){return function(t){return function(){return new Promise(function(n){setTimeout(function(){Promise.resolve().then(t).then(n)},e)})}}}var Ki=function(e,t){return C(e,Fs(t))},Ac=function(e,t){return C(e,wK(t))},yx=function(e,t){return C(e,LA(function(n){return C(t,Fs(n))}))},Gf=function(e,t){return C(e,LA(t))},Fs=function(e){return function(t){return function(){return Promise.resolve().then(t).then(e)}}},wK=function(e){return function(t){return function(){return Promise.all([Promise.resolve().then(t),Promise.resolve().then(e)]).then(function(n){var r=n[0],i=n[1];return r(i)})}}},Bn=function(e){return function(){return Promise.resolve(e)}},LA=function(e){return function(t){return function(){return Promise.resolve().then(t).then(function(n){return e(n)()})}}},zce=LA(N),Xn="Task";function Hce(){return{concat:function(e,t){return function(){return Promise.race([Promise.resolve().then(e),Promise.resolve().then(t)])}},empty:$K}}var De={URI:Xn,map:Ki},Yce=Qe(De),Tn={URI:Xn,of:Bn},hc={URI:Xn,map:Ki,ap:Ac},Gce=Lt(hc),Jce=jt(hc),jA={URI:Xn,map:Ki,ap:Ac,of:Bn},vy={URI:Xn,map:Ki,ap:yx},EK={URI:Xn,map:Ki,ap:yx,of:Bn},Jf={URI:Xn,map:Ki,ap:Ac,chain:Gf},un={URI:Xn,map:Ki,of:Bn,ap:Ac,chain:Gf},Zce={URI:Xn,map:Ki,of:Bn,ap:Ac,chain:Gf,fromIO:Zn},UA=N,Xce={URI:Xn,map:Ki,of:Bn,ap:Ac,chain:Gf,fromIO:Zn,fromTask:UA},ele=At(Jf),yy={URI:Xn,fromIO:Zn},tle=_o(yy),nle=va(yy,Jf),rle=ya(yy,Jf),ile={URI:Xn,fromIO:Zn,fromTask:UA},$K=function(){return new Promise(function(e){})},ole=Bn(on),ale=Bt(De),sle=Pt(Jf),ule=Ut(hc),bx=Bn(Sn),Zf=function(e){return function(t){return function(){return Promise.all(t.map(function(n,r){return Promise.resolve().then(function(){return e(r,n)()})}))}}},Cx=function(e){var t=Zf(e);return function(n){return yt(n)?t(n):bx}},Sx=function(e){return function(t){return function(){return zl(t).reduce(function(n,r,i){return n.then(function(o){return Promise.resolve().then(e(i+1,r)).then(function(a){return o.push(a),o})})},Promise.resolve().then(e(0,jr(t))).then($p))}}},_x=function(e){var t=Sx(e);return function(n){return yt(n)?t(n):bx}},cle=Cx,RK=function(e){return Cx(function(t,n){return e(n)})},lle=RK(N),fle=_x,OK=function(e){return _x(function(t,n){return e(n)})},dle=OK(N),ple={URI:Xn,map:Ki,of:Bn,ap:Ac,chain:Gf,fromIO:Zn,fromTask:UA},Ale={URI:Xn,map:Ki,of:Bn,ap:yx,chain:Gf,fromIO:Zn,fromTask:UA},hle=an(vy),mle=oi(EK);const gle=Object.freeze(Object.defineProperty({__proto__:null,ApT:bx,ApplicativePar:jA,ApplicativeSeq:EK,ApplyPar:hc,ApplySeq:vy,Chain:Jf,Do:ole,FromIO:yy,FromTask:ile,Functor:De,Monad:un,MonadIO:Zce,MonadTask:Xce,Pointed:Tn,URI:Xn,ap:wK,apFirst:Gce,apS:ule,apSecond:Jce,bind:sle,bindTo:ale,chain:LA,chainFirst:ele,chainFirstIOK:rle,chainIOK:nle,delay:Qce,flap:Yce,flatten:zce,fromIO:Zn,fromIOK:tle,fromTask:UA,getMonoid:mle,getRaceMonoid:Hce,getSemigroup:hle,map:Fs,never:$K,of:Bn,sequenceArray:lle,sequenceSeqArray:dle,task:ple,taskSeq:Ale,traverseArray:RK,traverseArrayWithIndex:cle,traverseReadonlyArrayWithIndex:Cx,traverseReadonlyArrayWithIndexSeq:_x,traverseReadonlyNonEmptyArrayWithIndex:Zf,traverseReadonlyNonEmptyArrayWithIndexSeq:Sx,traverseSeqArray:OK,traverseSeqArrayWithIndex:fle},Symbol.toStringTag,{value:"Module"}));var FK=vx(Tn),Xf=Io,mc=H(Zn,Xf),vle=pA,kK=AA,yle=kK,Ni=function(e,t){return C(e,Tx(t))},gc=function(e,t){return C(e,xx(t))},Ix=function(e,t){return C(e,by(function(n){return C(t,Tx(n))}))},ed=function(e,t){return C(e,by(t))},Tx=hx(De),xx=mx(hc),ble=xx,pi=Ax(Tn),by=gx(un),MK=by,LK=MK(N),Cle=LK,Pn="ReaderTask",yn={URI:Pn,map:Ni},Sle=Qe(yn),BA={URI:Pn,of:pi},PA={URI:Pn,map:Ni,ap:gc},_le=Lt(PA),Ile=jt(PA),Tle={URI:Pn,map:Ni,ap:gc,of:pi},wx={URI:Pn,map:Ni,ap:Ix},jK={URI:Pn,map:Ni,ap:Ix,of:pi},$o={URI:Pn,map:Ni,ap:gc,chain:ed},ka={URI:Pn,map:Ni,of:pi,ap:gc,chain:ed},xle={URI:Pn,map:Ni,of:pi,ap:gc,chain:ed,fromIO:mc},wle={URI:Pn,map:Ni,of:pi,ap:gc,chain:ed,fromIO:mc,fromTask:Xf},UK=At($o),Ele=UK,Cy={URI:Pn,fromIO:mc},$le=_o(Cy),Rle=va(Cy,$o),Ole=ya(Cy,$o),td={URI:Pn,fromReader:FK},Fle=mA(td),kle=gA(td),Mle=uc(td),BK=vA(td,$o),Lle=BK,PK=yA(td,$o),jle=PK,Sy={URI:Pn,fromIO:mc,fromTask:Xf},Ule=cc(Sy),Ble=Lf(Sy,$o),Ple=jf(Sy,$o),Dle=pi(on),Wle=Bt(yn),DK=Pt($o),Kle=DK,WK=Ut(PA),Nle=WK,Ex=pi(Sn),KK=function(e){return H(sc(e),ac(Zf(Ar)))},$x=function(e){var t=KK(e);return function(n){return yt(n)?t(n):Ex}},NK=function(e){return H(sc(e),ac(Sx(Ar)))},Rx=function(e){var t=NK(e);return function(n){return yt(n)?t(n):Ex}},qle=$x,qK=function(e){return $x(function(t,n){return e(n)})},Vle=qK(N),Qle=Rx,VK=function(e){return Rx(function(t,n){return e(n)})},zle=VK(N),Hle={URI:Pn,map:Ni,of:pi,ap:gc,chain:ed,fromIO:mc,fromTask:Xf},Yle={URI:Pn,map:Ni,of:pi,ap:Ix,chain:ed,fromIO:mc,fromTask:Xf},Gle=an(wx),Jle=oi(jK);function Zle(e,t){return e(t)()}const Xle=Object.freeze(Object.defineProperty({__proto__:null,ApT:Ex,ApplicativePar:Tle,ApplicativeSeq:jK,ApplyPar:PA,ApplySeq:wx,Chain:$o,Do:Dle,FromIO:Cy,FromReader:td,FromTask:Sy,Functor:yn,Monad:ka,MonadIO:xle,MonadTask:wle,Pointed:BA,URI:Pn,ap:xx,apFirst:_le,apS:WK,apSW:Nle,apSecond:Ile,apW:ble,ask:Fle,asks:kle,asksReaderTask:yle,asksReaderTaskW:kK,bind:DK,bindTo:Wle,bindW:Kle,chain:by,chainFirst:UK,chainFirstIOK:Ole,chainFirstReaderK:PK,chainFirstReaderKW:jle,chainFirstTaskK:Ple,chainFirstW:Ele,chainIOK:Rle,chainReaderK:BK,chainReaderKW:Lle,chainTaskK:Ble,chainW:MK,flap:Sle,flatten:Cle,flattenW:LK,fromIO:mc,fromIOK:$le,fromReader:FK,fromReaderK:Mle,fromTask:Xf,fromTaskK:Ule,getMonoid:Jle,getSemigroup:Gle,local:vle,map:Tx,of:pi,readerTask:Hle,readerTaskSeq:Yle,run:Zle,sequenceArray:Vle,sequenceSeqArray:zle,traverseArray:qK,traverseArrayWithIndex:qle,traverseReadonlyArrayWithIndex:$x,traverseReadonlyArrayWithIndexSeq:Rx,traverseReadonlyNonEmptyArrayWithIndex:KK,traverseReadonlyNonEmptyArrayWithIndexSeq:NK,traverseSeqArray:VK,traverseSeqArrayWithIndex:Qle},Symbol.toStringTag,{value:"Module"}));var efe=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(l){try{c(r.next(l))}catch(d){a(d)}}function u(l){try{c(r.throw(l))}catch(d){a(d)}}function c(l){l.done?o(l.value):i(l.value).then(s,u)}c((r=r.apply(e,t||[])).next())})},tfe=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(c){return function(l){return u([c,l])}}function u(c){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(l){c=[6,l],i=0}finally{r=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},Ox=If(Tn),Fx=rc(Tn),_y=Tf(De),kx=xf(De),Mx=H(Zn,_y),QK=H(Zn,kx),ks=Mx,nd=_y,Lx=Bn,jx=Zn,zK=function(e){return Fs(MB(e))},HK=cA(De),nfe=HK,Ux=Ff(un),rfe=Ux,YK=Ux,ife=YK,GK=kf(un),ofe=GK,JK=function(e,t){return function(){return efe(void 0,void 0,void 0,function(){var n;return tfe(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,e().then(hs)];case 1:return[2,r.sent()];case 2:return n=r.sent(),[2,ea(t(n))];case 3:return[2]}})})}},afe=function(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return JK(function(){return e.apply(void 0,n)},t)}},sfe=dA(De),ufe=Lv(Tn),cfe=jv(Tn),lfe=QI(un),ZK=oc(un),ffe=ZK,Iy=lA(un),dfe=Iy,pfe=function(e){return Iy(m3(e))},Afe=function(e){return Iy(g3(e))},hfe=fA(un),mfe=Mf(De),XK=function(e){var t=zK(e);return function(n){return H(n,t)}},e3=function(e){return function(t){return function(n){return C(n,DA(XK(e)(t)))}}},gfe=e3,t3=function(e){return H(e,jx)},n3=function(e){return zd(t3(e))},vfe=n3,xn=function(e,t){return C(e,Dx(t))},Ms=function(e,t){return C(e,Wx(t))},Bx=function(e,t){return C(e,DA(function(n){return C(t,Dx(n))}))},Ls=function(e,t){return C(e,DA(t))},Ty=function(e,t,n){return C(e,r3(t,n))},xy=function(e,t){return C(e,i3(t))},Px=function(e,t){return C(e,Kx(t))},Dx=wf(De),r3=Rf(De),i3=Of(De),Wx=Ef(hc),yfe=Wx,DA=ic(un),zd=DA,o3=zd(N),bfe=o3,Kx=$f(un),Cfe=Kx,vr=Fx,WA=Ox,bt="TaskEither";function Nx(e,t){var n=ua(e,Is(t));return{URI:bt,_E:void 0,map:xn,ap:function(r,i){return C(r,n(i))},of:vr}}function a3(e){var t=uA(un,e);return{URI:bt,_E:void 0,map:xn,alt:function(n,r){return C(n,t(r))}}}var s3=function(e){var t=ec(e);return{URI:bt,_E:void 0,compact:Co(De,t),separate:ha(De,t,Ts)}};function Sfe(e){var t=Cf(e),n=s3(e),r=ma(De,t),i=ga(De,t),o=ws(De,t),a=Es(De,t);return{URI:bt,_E:void 0,map:xn,compact:n.compact,separate:n.separate,filter:function(s,u){return C(s,r(u))},filterMap:function(s,u){return C(s,i(u))},partition:function(s,u){return C(s,o(u))},partitionMap:function(s,u){return C(s,a(u))}}}var qx={URI:bt,map:xn},_fe=Qe(qx),Ife={URI:bt,of:vr},wy={URI:bt,map:xn,ap:Ms},u3=Lt(wy),Tfe=u3,c3=jt(wy),xfe=c3,wfe={URI:bt,map:xn,ap:Ms,of:vr},l3={URI:bt,map:xn,ap:Bx},f3={URI:bt,map:xn,ap:Bx,of:vr},qi={URI:bt,map:xn,ap:Ms,chain:Ls},Efe={URI:bt,map:xn,ap:Ms,chain:Ls,of:vr},$fe={URI:bt,map:xn,ap:Ms,chain:Ls,of:vr,fromIO:ks},Rfe={URI:bt,map:xn,ap:Ms,chain:Ls,of:vr,fromIO:ks,fromTask:nd},Ofe={URI:bt,map:xn,ap:Ms,chain:Ls,of:vr,throwError:WA},d3=At(qi),Ffe=d3,kfe={URI:bt,bimap:Ty,mapLeft:xy},Mfe={URI:bt,map:xn,alt:Px},Ma={URI:bt,fromEither:Lx},Lfe=go(Ma),jfe=vo(Ma),Ufe=Nu(Ma,qi),p3=ca(Ma,qi),Bfe=p3,A3=la(Ma,qi),Pfe=A3,Dfe=ms(Ma),h3=qu(Ma,qi),Wfe=h3,Kfe=Ur(Ma),Ey={URI:bt,fromIO:ks},m3=_o(Ey),Nfe=va(Ey,qi),qfe=ya(Ey,qi),$y={URI:bt,fromIO:ks,fromTask:nd},g3=cc($y),Vfe=Lf($y,qi),Qfe=jf($y,qi);function zfe(e){return function(){var t=Array.prototype.slice.call(arguments);return function(){return new Promise(function(n){var r=function(i,o){return i!=null?n(ea(i)):n(hs(o))};e.apply(null,t.concat(r))})}}}var Hfe=function(e,t,n){return Vx(e,t,n)},Vx=function(e,t,n){return C(e,zd(function(r){return C(t(r),LA(function(i){return C(n(r,i),zd(function(){return Bn(i)}))}))}))},Yfe=vr(on),Gfe=Bt(qx),v3=Pt(qi),Jfe=v3,y3=Ut(wy),Zfe=y3,Qx=vr(Sn),zx=function(e){return H(Zf(e),Fs(sA(Ar)))},Hx=function(e){var t=zx(e);return function(n){return yt(n)?t(n):Qx}},Yx=function(e){return function(t){return function(){return zl(t).reduce(function(n,r,i){return n.then(function(o){return nn(o)?n:e(i+1,r)().then(function(a){return nn(a)?a:(o.right.push(a.right),o)})})},e(0,jr(t))().then(tc($p)))}}},Gx=function(e){var t=Yx(e);return function(n){return yt(n)?t(n):Qx}},Xfe=Hx,b3=function(e){return Hx(function(t,n){return e(n)})},ede=b3(N),tde=Gx,C3=function(e){return Gx(function(t,n){return e(n)})},nde=C3(N),rde={URI:bt,bimap:Ty,mapLeft:xy,map:xn,of:vr,ap:Ms,chain:Ls,alt:Px,fromIO:ks,fromTask:nd,throwError:WA},ide={URI:bt,bimap:Ty,mapLeft:xy,map:xn,of:vr,ap:Bx,chain:Ls,alt:Px,fromIO:ks,fromTask:nd,throwError:WA},ode=an(l3),ade=oi(f3),sde=function(e){return an(vy)(rA(e))};function ude(e){var t=Nx(jA,e),n=a3(e);return{URI:bt,_E:void 0,map:xn,ap:t.ap,of:vr,chain:Ls,bimap:Ty,mapLeft:xy,alt:n.alt,fromIO:ks,fromTask:nd,throwError:WA}}const cde=Object.freeze(Object.defineProperty({__proto__:null,Alt:Mfe,ApT:Qx,ApplicativePar:wfe,ApplicativeSeq:f3,ApplyPar:wy,ApplySeq:l3,Bifunctor:kfe,Chain:qi,Do:Yfe,FromEither:Ma,FromIO:Ey,FromTask:$y,Functor:qx,Monad:Efe,MonadIO:$fe,MonadTask:Rfe,MonadThrow:Ofe,Pointed:Ife,URI:bt,alt:Kx,altW:Cfe,ap:Wx,apFirst:u3,apFirstW:Tfe,apS:y3,apSW:Zfe,apSecond:c3,apSecondW:xfe,apW:yfe,bimap:r3,bind:v3,bindTo:Gfe,bindW:Jfe,bracket:Hfe,bracketW:Vx,chain:DA,chainEitherK:p3,chainEitherKW:Bfe,chainFirst:d3,chainFirstEitherK:A3,chainFirstEitherKW:Pfe,chainFirstIOK:qfe,chainFirstTaskK:Qfe,chainFirstW:Ffe,chainIOEitherK:vfe,chainIOEitherKW:n3,chainIOK:Nfe,chainNullableK:lfe,chainOptionK:Ufe,chainTaskK:Vfe,chainTaskOptionK:gfe,chainTaskOptionKW:e3,chainW:zd,filterOrElse:h3,filterOrElseW:Wfe,flap:_fe,flatten:bfe,flattenW:o3,fold:rfe,foldW:ife,fromEither:Lx,fromEitherK:Kfe,fromIO:ks,fromIOEither:jx,fromIOEitherK:t3,fromIOK:m3,fromNullable:ufe,fromNullableK:cfe,fromOption:Lfe,fromOptionK:jfe,fromPredicate:Dfe,fromTask:nd,fromTaskK:g3,fromTaskOption:zK,fromTaskOptionK:XK,getAltTaskValidation:a3,getApplicativeTaskValidation:Nx,getApplyMonoid:ade,getApplySemigroup:ode,getCompactable:s3,getFilterable:Sfe,getOrElse:GK,getOrElseW:ofe,getSemigroup:sde,getTaskValidation:ude,left:Ox,leftIO:QK,leftTask:kx,map:Dx,mapLeft:i3,match:HK,matchE:Ux,matchEW:YK,matchW:nfe,of:vr,orElse:ZK,orElseFirst:Iy,orElseFirstIOK:pfe,orElseFirstTaskK:Afe,orElseFirstW:dfe,orElseW:ffe,orLeft:hfe,right:Fx,rightIO:Mx,rightTask:_y,sequenceArray:ede,sequenceSeqArray:nde,swap:mfe,taskEither:rde,taskEitherSeq:ide,taskify:zfe,throwError:WA,toUnion:sfe,traverseArray:b3,traverseArrayWithIndex:Xfe,traverseReadonlyArrayWithIndex:Hx,traverseReadonlyArrayWithIndexSeq:Gx,traverseReadonlyNonEmptyArrayWithIndex:zx,traverseReadonlyNonEmptyArrayWithIndexSeq:Yx,traverseSeqArray:C3,traverseSeqArrayWithIndex:tde,tryCatch:JK,tryCatchK:afe},Symbol.toStringTag,{value:"Module"}));var js=Io,Ry=If(BA),Jx=rc(BA),Zx=H(_y,js),S3=H(kx,js),Xx=function(e){return H(e,Fx)},_3=function(e){return H(e,Ox)},I3=Tf(yn),lde=xf(yn),ew=H(Mx,js),T3=H(QK,js),x3=pi,w3=Xx,Us=ew,rd=Zx,tw=H(jx,js),nw=function(e){return H(e,Lx)},E3=cA(yn),fde=E3,rw=Ff($o),dde=rw,$3=rw,pde=$3,R3=kf(ka),Ade=R3,hde=dA(yn),mde=Lv(BA),gde=jv(BA),vde=QI(ka),yde=pA,O3=AA,bde=O3,F3=oc(ka),Cde=F3,k3=lA(ka),Sde=k3,_de=fA(ka),Ide=Mf(yn),M3=function(e){return H(e,tw)},L3=function(e){return id(M3(e))},Tde=L3,iw=function(e){return H(e,js)},j3=function(e){return id(iw(e))},xde=j3,U3=function(e){return jy(iw(e))},wde=U3,ow=function(e){return H(e,nw)},B3=function(e){return id(ow(e))},Ede=B3,P3=function(e){return jy(ow(e))},$de=P3,wn=function(e,t){return C(e,KA(t))},Bs=function(e,t){return C(e,lw(t))},aw=function(e,t){return C(e,ky(function(n){return C(t,KA(n))}))},Ps=function(e,t){return C(e,ky(t))},sw=function(e,t){return C(e,My(t))},Oy=function(e,t,n){return C(e,uw(t,n))},Fy=function(e,t){return C(e,cw(t))},KA=wf(yn),uw=Rf(yn),cw=Of(yn),lw=Ef(PA),Rde=lw,yr=Jx,ky=ic(ka),id=ky,D3=id(N),Ode=D3,My=$f(ka),W3=My,NA=Ry,gt="ReaderTaskEither",K3=function(e){var t=ec(e);return{URI:gt,_E:void 0,compact:Co(yn,t),separate:ha(yn,t,Ts)}};function Fde(e){var t=Cf(e),n=K3(e),r=ma(yn,t),i=ga(yn,t),o=ws(yn,t),a=Es(yn,t);return{URI:gt,_E:void 0,map:wn,compact:n.compact,separate:n.separate,filter:function(s,u){return C(s,r(u))},filterMap:function(s,u){return C(s,i(u))},partition:function(s,u){return C(s,o(u))},partitionMap:function(s,u){return C(s,a(u))}}}function N3(e,t){var n=ua(Ca,Nx(e,t));return{URI:gt,_E:void 0,map:wn,ap:function(r,i){return C(r,n(i))},of:yr}}function q3(e){var t=uA(ka,e);return{URI:gt,_E:void 0,map:wn,alt:function(n,r){return C(n,t(r))}}}var vc={URI:gt,map:wn},kde=Qe(vc),fw={URI:gt,of:yr},Ly={URI:gt,map:wn,ap:Bs},V3=Lt(Ly),Mde=V3,Q3=jt(Ly),Lde=Q3,jde={URI:gt,map:wn,ap:Bs,of:yr},z3={URI:gt,map:wn,ap:aw},H3={URI:gt,map:wn,ap:aw,of:yr},er={URI:gt,map:wn,ap:Bs,chain:Ps},Ude={URI:gt,map:wn,ap:Bs,chain:Ps,of:yr},Bde={URI:gt,map:wn,ap:Bs,chain:Ps,of:yr,fromIO:Us},Pde={URI:gt,map:wn,ap:Bs,chain:Ps,of:yr,fromIO:Us,fromTask:rd},Dde={URI:gt,map:wn,ap:Bs,chain:Ps,of:yr,throwError:NA},Y3=At(er),jy=Y3,Wde={URI:gt,bimap:Oy,mapLeft:Fy},Kde={URI:gt,map:wn,alt:sw},od={URI:gt,fromReader:w3},Nde=mA(od),qde=gA(od),Vde=uc(od),G3=vA(od,er),Qde=G3,J3=yA(od,er),zde=J3,dw=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return I3(e.apply(void 0,t))}},Z3=function(e){return id(dw(e))},Hde=Z3,X3=function(e){return jy(dw(e))},Yde=X3,La={URI:gt,fromEither:x3},Gde=go(La),Jde=vo(La),Zde=Nu(La,er),eN=ca(La,er),Xde=eN,tN=la(La,er),epe=tN,tpe=ms(La),nN=qu(La,er),npe=nN,rpe=Ur(La),Uy={URI:gt,fromIO:Us},ipe=_o(Uy),ope=va(Uy,er),ape=ya(Uy,er),By={URI:gt,fromIO:Us,fromTask:rd},spe=cc(By),upe=Lf(By,er),cpe=jf(By,er);function lpe(e,t,n){return rN(e,t,n)}function rN(e,t,n){return function(r){return Vx(e(r),function(i){return t(i)(r)},function(i,o){return n(i,o)(r)})}}var fpe=yr(on),dpe=Bt(vc),iN=Pt(er),ppe=iN,oN=Ut(Ly),Ape=oN,pw=yr(Sn),aN=function(e){return H(sc(e),ac(zx(Ar)))},Aw=function(e){var t=aN(e);return function(n){return yt(n)?t(n):pw}},sN=function(e){return H(sc(e),ac(Yx(Ar)))},hw=function(e){var t=sN(e);return function(n){return yt(n)?t(n):pw}},hpe=Aw,uN=function(e){return Aw(function(t,n){return e(n)})},mpe=uN(N),gpe=hw,cN=function(e){return hw(function(t,n){return e(n)})},vpe=cN(N),ype={URI:gt,map:wn,of:yr,ap:Bs,chain:Ps,alt:sw,bimap:Oy,mapLeft:Fy,fromIO:Us,fromTask:rd,throwError:NA},bpe={URI:gt,map:wn,of:yr,ap:aw,chain:Ps,alt:sw,bimap:Oy,mapLeft:Fy,fromIO:Us,fromTask:rd,throwError:NA},Cpe=an(z3),Spe=oi(H3),_pe=function(e){return an(wx)(rA(e))};function Ipe(e){var t=N3(jA,e),n=q3(e);return{URI:gt,_E:void 0,map:wn,of:yr,chain:Ps,bimap:Oy,mapLeft:Fy,ap:t.ap,alt:n.alt,fromIO:Us,fromTask:rd,throwError:NA}}function Tpe(e,t){return e(t)()}const xpe=Object.freeze(Object.defineProperty({__proto__:null,Alt:Kde,ApT:pw,ApplicativePar:jde,ApplicativeSeq:H3,ApplyPar:Ly,ApplySeq:z3,Bifunctor:Wde,Chain:er,Do:fpe,FromEither:La,FromIO:Uy,FromReader:od,FromTask:By,Functor:vc,Monad:Ude,MonadIO:Bde,MonadTask:Pde,MonadThrow:Dde,Pointed:fw,URI:gt,alt:My,altW:W3,ap:lw,apFirst:V3,apFirstW:Mde,apS:oN,apSW:Ape,apSecond:Q3,apSecondW:Lde,apW:Rde,ask:Nde,asks:qde,asksReaderTaskEither:bde,asksReaderTaskEitherW:O3,bimap:uw,bind:iN,bindTo:dpe,bindW:ppe,bracket:lpe,bracketW:rN,chain:ky,chainEitherK:eN,chainEitherKW:Xde,chainFirst:Y3,chainFirstEitherK:tN,chainFirstEitherKW:epe,chainFirstIOK:ape,chainFirstReaderEitherK:$de,chainFirstReaderEitherKW:P3,chainFirstReaderK:J3,chainFirstReaderKW:zde,chainFirstReaderTaskK:Yde,chainFirstReaderTaskKW:X3,chainFirstTaskEitherK:wde,chainFirstTaskEitherKW:U3,chainFirstTaskK:cpe,chainFirstW:jy,chainIOEitherK:Tde,chainIOEitherKW:L3,chainIOK:ope,chainNullableK:vde,chainOptionK:Zde,chainReaderEitherK:Ede,chainReaderEitherKW:B3,chainReaderK:G3,chainReaderKW:Qde,chainReaderTaskK:Hde,chainReaderTaskKW:Z3,chainTaskEitherK:xde,chainTaskEitherKW:j3,chainTaskK:upe,chainW:id,filterOrElse:nN,filterOrElseW:npe,flap:kde,flatten:Ode,flattenW:D3,fold:dde,foldW:pde,fromEither:x3,fromEitherK:rpe,fromIO:Us,fromIOEither:tw,fromIOEitherK:M3,fromIOK:ipe,fromNullable:mde,fromNullableK:gde,fromOption:Gde,fromOptionK:Jde,fromPredicate:tpe,fromReader:w3,fromReaderEither:nw,fromReaderEitherK:ow,fromReaderK:Vde,fromReaderTaskK:dw,fromTask:rd,fromTaskEither:js,fromTaskEitherK:iw,fromTaskK:spe,getAltReaderTaskValidation:q3,getApplicativeReaderTaskValidation:N3,getApplyMonoid:Spe,getApplySemigroup:Cpe,getCompactable:K3,getFilterable:Fde,getOrElse:R3,getOrElseW:Ade,getReaderTaskValidation:Ipe,getSemigroup:_pe,left:Ry,leftIO:T3,leftReader:_3,leftReaderTask:lde,leftTask:S3,local:yde,map:KA,mapLeft:cw,match:E3,matchE:rw,matchEW:$3,matchW:fde,of:yr,orElse:F3,orElseFirst:k3,orElseFirstW:Sde,orElseW:Cde,orLeft:_de,readerTaskEither:ype,readerTaskEitherSeq:bpe,right:Jx,rightIO:ew,rightReader:Xx,rightReaderTask:I3,rightTask:Zx,run:Tpe,sequenceArray:mpe,sequenceSeqArray:vpe,swap:Ide,throwError:NA,toUnion:hde,traverseArray:uN,traverseArrayWithIndex:hpe,traverseReadonlyArrayWithIndex:Aw,traverseReadonlyArrayWithIndexSeq:hw,traverseReadonlyNonEmptyArrayWithIndex:aN,traverseReadonlyNonEmptyArrayWithIndexSeq:sN,traverseSeqArray:cN,traverseSeqArrayWithIndex:gpe},Symbol.toStringTag,{value:"Module"}));var lN={equals:function(e,t){return e===t}},fN={concat:function(e,t){return e+t}},dN="",wpe={concat:fN.concat,empty:dN},z={equals:lN.equals,compare:function(e,t){return e<t?-1:e>t?1:0}},Epe={show:function(e){return JSON.stringify(e)}},$pe=function(e){return typeof e=="string"},Rpe=function(e){return e.toUpperCase()},Ope=function(e){return e.toLowerCase()},Fpe=function(e,t){return function(n){return n.replace(e,t)}},kpe=function(e){return e.trim()},Mpe=function(e){return e.trimLeft()},Lpe=function(e){return e.trimRight()},jpe=function(e,t){return function(n){return n.slice(e,t)}},Upe=function(e){return e.length===0},Bpe=function(e){return e.length},Ppe=function(e){return function(t){var n=t.split(e);return yo(n)?n:[t]}},Dpe=function(e,t){return function(n){return n.includes(e,t)}},Wpe=function(e,t){return function(n){return n.startsWith(e,t)}},Kpe=function(e,t){return function(n){return n.endsWith(e,t)}};const Npe=Object.freeze(Object.defineProperty({__proto__:null,Eq:lN,Monoid:wpe,Ord:z,Semigroup:fN,Show:Epe,empty:dN,endsWith:Kpe,includes:Dpe,isEmpty:Upe,isString:$pe,replace:Fpe,size:Bpe,slice:jpe,split:Ppe,startsWith:Wpe,toLowerCase:Ope,toUpperCase:Rpe,trim:kpe,trimLeft:Mpe,trimRight:Lpe},Symbol.toStringTag,{value:"Module"}));var qpe=function(e){return Object.assign({},e)},Vpe=function(e){return Object.assign({},e)},pN=function(e){return Object.keys(e).length},fo=function(e){for(var t in e)if(pt.call(e,t))return!1;return!0},ad=function(e){return function(t){return Object.keys(t).sort(e.compare)}},Qpe=ad(z);function Py(e){if(typeof e=="function")return Py(z)(e);var t=ad(e);return function(n){return function(r){for(var i=[],o=0,a=t(r);o<a.length;o++){var s=a[o];i.push(n(s,r[s]))}return i}}}var mw=Py(z)(function(e,t){return[e,t]});function zpe(e){return function(t){var n=mw(t),r=n.length;return e.unfold(0,function(i){return i<r?de([n[i],i+1]):Ce})}}var gw=function(e,t){return function(n){if(pt.call(n,e)&&n[e]===t)return n;var r=Object.assign({},n);return r[e]=t,r}},na=function(e,t){return pt.call(t,e)};function vw(e){return function(t){if(!pt.call(t,e))return t;var n=Object.assign({},t);return delete n[e],n}}var Hpe=function(e,t){return function(n){if(!na(e,n))return Ce;if(n[e]===t)return de(n);var r=Object.assign({},n);return r[e]=t,de(r)}},Ype=function(e,t){return function(n){if(!na(e,n))return Ce;var r=t(n[e]);if(r===n[e])return de(n);var i=Object.assign({},n);return i[e]=r,de(i)}};function Gpe(e){var t=vw(e);return function(n){var r=_u(e,n);return Vt(r)?Ce:de([r.value,t(n)])}}function Dy(e){return function(t,n){if(n===void 0){var r=Dy(e);return function(o){return r(o,t)}}for(var i in t)if(!pt.call(n,i)||!e.equals(t[i],n[i]))return!1;return!0}}function _u(e,t){return t===void 0?function(n){return _u(e,n)}:pt.call(t,e)?de(t[e]):Ce}var qA={};function Wy(e){return function(t){var n={};for(var r in t)pt.call(t,r)&&(n[r]=e(r,t[r]));return n}}function yw(e){return Wy(function(t,n){return e(n)})}function Il(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(e.length===2)return Il(z).apply(void 0,e);var n=ad(e[0]);return function(r,i){return function(o){for(var a=r,s=n(o),u=s.length,c=0;c<u;c++){var l=s[c];a=i(l,a,o[l])}return a}}}function Tl(e){if("compare"in e){var t=ad(e);return function(n){return function(r){return function(i){for(var o=n.empty,a=t(i),s=a.length,u=0;u<s;u++){var c=a[u];o=n.concat(o,r(c,i[c]))}return o}}}}return Tl(z)(e)}function xl(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(e.length===2)return xl(z).apply(void 0,e);var n=ad(e[0]);return function(r,i){return function(o){for(var a=r,s=n(o),u=s.length,c=u-1;c>=0;c--){var l=s[c];a=i(l,o[l],a)}return a}}}var AN=function(e,t){var n;return n={},n[e]=t,n};function hN(e){var t=QA(z)(e);return function(n){return function(r){return t(r,n)}}}function Ky(e){var t=Ro(z)(e);return function(n){return function(r){return t(r,n)}}}function sd(e){return VA(z)(e)}var Jpe=function(e){var t=Ky(e);return function(n){return function(r){return e.map(C(r,t(n)),ja)}}},Zpe=function(e){var t=Ky(e);return function(n){return function(r){return e.map(C(r,t(n)),Ua)}}};function Ny(e){return function(t){var n={},r={};for(var i in t)if(pt.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;break}}return Oe(n,r)}}function qy(e){return function(t){var n={},r={};for(var i in t)if(pt.call(t,i)){var o=t[i];e(i,o)?r[i]=o:n[i]=o}return Oe(n,r)}}function Vy(e){return function(t){var n={};for(var r in t)if(pt.call(t,r)){var i=e(r,t[r]);It(i)&&(n[r]=i.value)}return n}}function Qy(e){return function(t){var n={},r=!1;for(var i in t)if(pt.call(t,i)){var o=t[i];e(i,o)?n[i]=o:r=!0}return r?n:t}}function mN(e,t){var n=bw(e,t);return function(r){return n(r,N)}}function bw(e,t){return function(n,r){return t.reduce(n,{},function(i,o){var a=r(o),s=a[0],u=a[1];return i[s]=pt.call(i,s)?e.concat(i[s],u):u,i})}}var Xpe=mw,eAe=function(e){for(var t={},n=0,r=e;n<r.length;n++){var i=r[n];t[i[0]]=i[1]}return t};function gN(e){return function(t){for(var n in t)if(!e(t[n]))return!1;return!0}}function vN(e){return function(t){for(var n in t)if(e(t[n]))return!0;return!1}}function Cw(e){return function(t,n){if(n===void 0){var r=Cw(e);return function(o){return r(t,o)}}for(var i in n)if(e.equals(n[i],t))return!0;return!1}}var Sw=function(e){return function(t){return function(n){if(fo(n))return t;if(fo(t))return n;var r={};for(var i in n)na(i,t)?r[i]=e.concat(n[i],t[i]):r[i]=n[i];for(var i in t)na(i,r)||(r[i]=t[i]);return r}}},_w=function(e){return function(t){return function(n){if(fo(n)||fo(t))return qA;var r={};for(var i in n)na(i,t)&&(r[i]=e.concat(n[i],t[i]));return r}}},Iw=function(e){return function(t){if(fo(t))return e;if(fo(e))return t;var n={};for(var r in t)na(r,e)||(n[r]=t[r]);for(var r in e)na(r,t)||(n[r]=e[r]);return n}},Dr=function(e,t){return C(e,yw(t))},yc=function(e,t){return C(e,Wy(t))},Wr=function(e){var t=Hd(e);return function(n,r,i){return C(n,t(r,i))}},Kr=function(e){return function(t){var n=Yd(e)(t);return function(r,i){return C(r,n(i))}}},Nr=function(e){var t=Gd(e);return function(n,r,i){return C(n,t(r,i))}},bc=function(e,t){return C(e,Tw(t))},Cc=function(e,t){return C(e,xw(t))},Sc=function(e,t){return C(e,ww(t))},_c=function(e,t){return C(e,Ew(t))},Ic=function(e){var t=Il(e);return function(n,r,i){return C(n,t(r,i))}},Tc=function(e){var t=Tl(e);return function(n){var r=t(n);return function(i,o){return C(i,r(o))}}},xc=function(e){var t=xl(e);return function(n,r,i){return C(n,t(r,i))}},zy=function(e,t){return C(e,Ny(t))},Hy=function(e,t){return C(e,qy(t))},Yy=function(e,t){return C(e,Vy(t))},Gy=function(e,t){return C(e,Qy(t))},Ro=function(e){var t=QA(e);return function(n){var r=t(n);return function(i,o){return r(i,H(Ar,o))}}},VA=function(e){var t=Ro(e);return function(n){var r=t(n);return function(i){return r(i,N)}}},QA=function(e){return function(t){var n=ad(e);return function(r,i){var o=n(r);if(o.length===0)return t.of(qA);for(var a=t.of({}),s=function(d){a=t.ap(t.map(a,function(p){return function(A){var m;return Object.assign({},p,(m={},m[d]=A,m))}}),i(d,r[d]))},u=0,c=o;u<c.length;u++){var l=c[u];s(l)}return a}}},Tw=function(e){return Qy(function(t,n){return e(n)})},xw=function(e){return Vy(function(t,n){return e(n)})},ww=function(e){return qy(function(t,n){return e(n)})},Ew=function(e){return Ny(function(t,n){return e(n)})};function Hd(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(e.length===1){var n=Il(e[0]);return function(r,i){return n(r,function(o,a,s){return i(a,s)})}}return Hd(z).apply(void 0,e)}function Yd(e){if("compare"in e){var t=Tl(e);return function(n){var r=t(n);return function(i){return r(function(o,a){return i(a)})}}}return Yd(z)(e)}function Gd(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(e.length===1){var n=xl(e[0]);return function(r,i){return n(r,function(o,a,s){return i(a,s)})}}return Gd(z).apply(void 0,e)}var ja=function(e){var t={};for(var n in e)if(pt.call(e,n)){var r=e[n];It(r)&&(t[n]=r.value)}return t},Ua=function(e){var t={},n={};for(var r in e)if(pt.call(e,r)){var i=e[r];nn(i)?t[r]=i.left:n[r]=i.right}return Oe(t,n)},En="ReadonlyRecord";function Sm(e){return"compare"in e?function(t){return{show:function(n){var r=Py(e)(function(i,o){return"".concat(JSON.stringify(i),": ").concat(t.show(o))})(n).join(", ");return r===""?"{}":"{ ".concat(r," }")}}}:Sm(z)(e)}function yN(e){var t=Dy(e);return ai(function(n,r){return t(n)(r)&&t(r)(n)})}function bN(e){return{concat:function(t,n){if(fo(t))return n;if(fo(n))return t;var r=Object.assign({},t);for(var i in n)pt.call(n,i)&&(r[i]=pt.call(t,i)?e.concat(t[i],n[i]):n[i]);return r},empty:qA}}var CN={URI:En,map:Dr},tAe=Qe(CN),nAe={URI:En,map:Dr,mapWithIndex:yc},rAe=function(e){return{URI:En,reduce:Wr(e),foldMap:Kr(e),reduceRight:Nr(e)}},iAe=function(e){return{URI:En,reduce:Wr(e),foldMap:Kr(e),reduceRight:Nr(e),reduceWithIndex:Ic(e),foldMapWithIndex:Tc(e),reduceRightWithIndex:xc(e)}},Jd={URI:En,compact:ja,separate:Ua},oAe={URI:En,map:Dr,compact:ja,separate:Ua,filter:bc,filterMap:Cc,partition:Sc,partitionMap:_c},aAe={URI:En,map:Dr,mapWithIndex:yc,compact:ja,separate:Ua,filter:bc,filterMap:Cc,partition:Sc,partitionMap:_c,filterMapWithIndex:Yy,filterWithIndex:Gy,partitionMapWithIndex:zy,partitionWithIndex:Hy},SN=function(e){return{URI:En,map:Dr,reduce:Wr(e),foldMap:Kr(e),reduceRight:Nr(e),traverse:Ro(e),sequence:VA(e)}},sAe=function(e){return{URI:En,map:Dr,mapWithIndex:yc,reduce:Wr(e),foldMap:Kr(e),reduceRight:Nr(e),reduceWithIndex:Ic(e),foldMapWithIndex:Tc(e),reduceRightWithIndex:xc(e),traverse:Ro(e),sequence:VA(e),traverseWithIndex:QA(e)}},uAe=function(e){var t=SN(e);return{URI:En,map:Dr,reduce:Wr(e),foldMap:Kr(e),reduceRight:Nr(e),traverse:t.traverse,sequence:t.sequence,compact:ja,separate:Ua,filter:bc,filterMap:Cc,partition:Sc,partitionMap:_c,wither:Pi(t,Jd),wilt:Bi(t,Jd)}},_N=function(e){var t=Sw(e);return{concat:function(n,r){return t(r)(n)}}},cAe=function(e){return{concat:_N(e).concat,empty:qA}},lAe=function(e){var t=_w(e);return{concat:function(n,r){return t(r)(n)}}},fAe=function(){return{concat:function(e,t){return Iw(t)(e)}}},dAe={URI:En,reduce:Wr(z),foldMap:Kr(z),reduceRight:Nr(z)},pAe={URI:En,reduce:Wr(z),foldMap:Kr(z),reduceRight:Nr(z),reduceWithIndex:Ic(z),foldMapWithIndex:Tc(z),reduceRightWithIndex:xc(z)},$w={URI:En,map:Dr,reduce:Wr(z),foldMap:Kr(z),reduceRight:Nr(z),traverse:Ro(z),sequence:sd},AAe={URI:En,map:Dr,mapWithIndex:yc,reduce:Wr(z),foldMap:Kr(z),reduceRight:Nr(z),reduceWithIndex:Ic(z),foldMapWithIndex:Tc(z),reduceRightWithIndex:xc(z),traverse:Ro(z),sequence:sd,traverseWithIndex:QA(z)},IN=Pi($w,Jd),TN=Bi($w,Jd),hAe={URI:En,map:Dr,reduce:Wr(z),foldMap:Kr(z),reduceRight:Nr(z),traverse:Ro(z),sequence:sd,compact:ja,separate:Ua,filter:bc,filterMap:Cc,partition:Sc,partitionMap:_c,wither:IN,wilt:TN},Rw=gw;function xN(e,t){return pt.call(t===void 0?this:t,e)}var mAe={URI:En,map:Dr,reduce:Wr(z),foldMap:Kr(z),reduceRight:Nr(z),traverse:Ro(z),sequence:sd,compact:ja,separate:Ua,filter:bc,filterMap:Cc,partition:Sc,partitionMap:_c,mapWithIndex:yc,reduceWithIndex:Ic(z),foldMapWithIndex:Tc(z),reduceRightWithIndex:xc(z),filterMapWithIndex:Yy,filterWithIndex:Gy,partitionMapWithIndex:zy,partitionWithIndex:Hy,traverseWithIndex:QA(z),wither:IN,wilt:TN};const gAe=Object.freeze(Object.defineProperty({__proto__:null,Compactable:Jd,Filterable:oAe,FilterableWithIndex:aAe,Foldable:dAe,FoldableWithIndex:pAe,Functor:CN,FunctorWithIndex:nAe,Traversable:$w,TraversableWithIndex:AAe,URI:En,Witherable:hAe,_filter:bc,_filterMap:Cc,_filterMapWithIndex:Yy,_filterWithIndex:Gy,_foldMap:Kr,_foldMapWithIndex:Tc,_map:Dr,_mapWithIndex:yc,_partition:Sc,_partitionMap:_c,_partitionMapWithIndex:zy,_partitionWithIndex:Hy,_reduce:Wr,_reduceRight:Nr,_reduceRightWithIndex:xc,_reduceWithIndex:Ic,_sequence:VA,_traverse:Ro,collect:Py,compact:ja,deleteAt:vw,difference:Iw,elem:Cw,empty:qA,every:gN,filter:Tw,filterMap:xw,filterMapWithIndex:Vy,filterWithIndex:Qy,flap:tAe,foldMap:Yd,foldMapWithIndex:Tl,fromEntries:eAe,fromFoldable:mN,fromFoldableMap:bw,fromRecord:qpe,getDifferenceMagma:fAe,getEq:yN,getFoldable:rAe,getFoldableWithIndex:iAe,getIntersectionSemigroup:lAe,getMonoid:bN,getShow:Sm,getTraversable:SN,getTraversableWithIndex:sAe,getUnionMonoid:cAe,getUnionSemigroup:_N,getWitherable:uAe,has:na,hasOwnProperty:xN,insertAt:Rw,intersection:_w,isEmpty:fo,isSubrecord:Dy,keys:Qpe,lookup:_u,map:yw,mapWithIndex:Wy,modifyAt:Ype,partition:ww,partitionMap:Ew,partitionMapWithIndex:Ny,partitionWithIndex:qy,pop:Gpe,readonlyRecord:mAe,reduce:Hd,reduceRight:Gd,reduceRightWithIndex:xl,reduceWithIndex:Il,separate:Ua,sequence:sd,singleton:AN,size:pN,some:vN,toEntries:Xpe,toReadonlyArray:mw,toRecord:Vpe,toUnfoldable:zpe,traverse:Ky,traverseWithIndex:hN,union:Sw,updateAt:Hpe,upsertAt:gw,wilt:Zpe,wither:Jpe},Symbol.toStringTag,{value:"Module"}));var vAe=function(e){return new Set(e)},yAe=function(e){return new Set([e])},wN=function(e){return function(t){for(var n=t.length,r=new Set,i=bn(e),o=0;o<n;o++){var a=t[o];i(a,r)||r.add(a)}return r}};function bAe(e){return new Set(e)}function CAe(e){var t=bn(e);return function(n){return function(r){var i=new Set;return r.forEach(function(o){var a=n(o);t(a,i)||i.add(a)}),i}}}function SAe(e){var t=bn(e);return function(n){return function(r){var i=new Set;return r.forEach(function(o){n(o).forEach(function(a){t(a,i)||i.add(a)})}),i}}}function Ow(e){return function(t){for(var n=t.values(),r,i=new Set;!(r=n.next()).done;){var o=r.value;e(o)&&i.add(o)}return i}}function _Ae(e){return function(t){for(var n=t.values(),r,i=new Set,o=new Set;!(r=n.next()).done;){var a=r.value;e(a)?i.add(a):o.add(a)}return Oe(o,i)}}function Fw(e){var t=bn(e);return function(n,r){if(r===void 0){var i=Fw(e);return function(a){return i(n,a)}}if(Zd(n))return r;if(Zd(r))return n;var o=new Set(n);return r.forEach(function(a){t(a,o)||o.add(a)}),o}}function kw(e){var t=bn(e);return function(n,r){if(r===void 0){var i=kw(e);return function(a){return i(a,n)}}if(Zd(n)||Zd(r))return Lw;var o=new Set;return n.forEach(function(a){t(a,r)&&o.add(a)}),o}}function IAe(e,t){return function(n){return function(r){for(var i=r.values(),o,a=new Set,s=new Set,u=bn(e),c=bn(t);!(o=i.next()).done;){var l=n(o.value);switch(l._tag){case"Left":u(l.left,a)||a.add(l.left);break;case"Right":c(l.right,s)||s.add(l.right);break}}return Oe(a,s)}}}function Mw(e){var t=bn(e);return function(n,r){if(r===void 0){var i=Mw(e);return function(o){return i(o,n)}}return Ow(function(o){return!t(o,r)})(n)}}function EN(e){var t=Jy(e);return function(n,r){return function(i){return t(i).reduce(r,n)}}}function $N(e,t){var n=Jy(e);return function(r){return function(i){return n(i).reduce(function(o,a){return t.concat(o,r(a))},t.empty)}}}var RN=function(e){var t=Jy(e);return function(n,r){return function(i){return t(i).reduceRight(function(o,a){return r(a,o)},n)}}};function ON(e){var t=bn(e);return function(n){return function(r){if(t(n)(r))return r;var i=new Set(r);return i.add(n),i}}}var FN=function(e){return function(t){return function(n){return Ow(function(r){return!e.equals(t,r)})(n)}}},TAe=function(e){var t=bn(e),n=FN(e),r=ON(e);return function(i){return function(o){return(t(i,o)?n:r)(i)(o)}}},xAe=function(e){return kN(e)(N)};function wAe(e,t){return function(n){var r=bn(e),i=bn(t),o=new Set,a=new Set;return n.forEach(function(s){switch(s._tag){case"Left":r(s.left,o)||o.add(s.left);break;case"Right":i(s.right,a)||a.add(s.right);break}}),Oe(o,a)}}function kN(e){var t=bn(e);return function(n){return function(r){var i=new Set;return r.forEach(function(o){var a=n(o);a._tag==="Some"&&!t(a.value,i)&&i.add(a.value)}),i}}}var Lw=new Set,Zd=function(e){return e.size===0},EAe=function(e){return e.size},jw=function(e){return function(t){for(var n=t.values(),r,i=!1;!i&&!(r=n.next()).done;)i=e(r.value);return i}};function Uw(e){return Vd(jw(Vd(e)))}function zA(e){var t=bn(e);return function(n,r){if(r===void 0){var i=zA(e);return function(o){return i(o,n)}}return Uw(function(o){return t(o,r)})(n)}}function bn(e){return function(t,n){if(n===void 0){var r=bn(e);return function(s){return r(t,s)}}for(var i=n.values(),o,a=!1;!a&&!(o=i.next()).done;)a=e.equals(t,o.value);return a}}var Jy=function(e){return function(t){var n=[];return t.forEach(function(r){return n.push(r)}),n.sort(e.compare)}},$Ae="ReadonlySet";function MN(e){return{show:function(t){var n=[];return t.forEach(function(r){n.push(e.show(r))}),"new Set([".concat(n.sort().join(", "),"])")}}}function LN(e){var t=zA(e);return ai(function(n,r){return t(n,r)&&t(r,n)})}var jN=function(e){return{concat:Fw(e)}},RAe=function(e){return{concat:jN(e).concat,empty:Lw}},OAe=function(e){return{concat:kw(e)}},FAe=function(e){return{concat:Mw(e)}},kAe=wN;const MAe=Object.freeze(Object.defineProperty({__proto__:null,URI:$Ae,chain:SAe,compact:xAe,difference:Mw,elem:bn,empty:Lw,every:Uw,filter:Ow,filterMap:kN,foldMap:$N,fromArray:kAe,fromReadonlyArray:wN,fromSet:vAe,getDifferenceMagma:FAe,getEq:LN,getIntersectionSemigroup:OAe,getShow:MN,getUnionMonoid:RAe,getUnionSemigroup:jN,insert:ON,intersection:kw,isEmpty:Zd,isSubset:zA,map:CAe,partition:_Ae,partitionMap:IAe,reduce:EN,reduceRight:RN,remove:FN,separate:wAe,singleton:yAe,size:EAe,some:jw,toReadonlyArray:Jy,toSet:bAe,toggle:TAe,union:Fw},Symbol.toStringTag,{value:"Module"}));function rn(e){return e[0]}function Mn(e){return e[1]}var LAe=function(e){return[Mn(e),rn(e)]};function Bw(e){return{URI:qr,_E:void 0,map:HA,ap:function(t,n){return[rn(t)(rn(n)),e.concat(Mn(t),Mn(n))]}}}var UN=function(e){return function(t){return[t,e.empty]}};function jAe(e){var t=Bw(e);return{URI:qr,_E:void 0,map:t.map,ap:t.ap,of:UN(e)}}function Pw(e){var t=Bw(e);return{URI:qr,_E:void 0,map:t.map,ap:t.ap,chain:function(n,r){var i=r(rn(n)),o=i[0],a=i[1];return[o,e.concat(Mn(n),a)]}}}function UAe(e){var t=Pw(e);return{URI:qr,_E:void 0,map:t.map,ap:t.ap,chain:t.chain,of:UN(e)}}function BAe(e){var t=function(r,i){for(var o=i(r),a=e.empty,s=rn(o);s._tag==="Left";)a=e.concat(a,Mn(o)),o=i(s.left),s=rn(o);return[s.right,e.concat(a,Mn(o))]},n=Pw(e);return{URI:qr,_E:void 0,map:n.map,ap:n.ap,chain:n.chain,chainRec:t}}var BN=function(e,t){return C(e,qN(t))},HA=function(e,t){return C(e,Nw(t))},PN=function(e,t,n){return C(e,NN(t,n))},DN=function(e,t){return C(e,qw(t))},WN=function(e,t){return C(e,Vw(t))},Dw=function(e,t,n){return C(e,Qw(t,n))},Ww=function(e){var t=zw();return function(n,r){return C(n,t(r))}},Kw=function(e,t,n){return C(e,Hw(t,n))},KN=function(e){var t=VN(e);return function(n,r){return C(n,t(r))}},NN=function(e,t){return function(n){return[t(rn(n)),e(Mn(n))]}},Nw=function(e){return function(t){return[e(rn(t)),Mn(t)]}},qw=function(e){return function(t){return[rn(t),e(Mn(t))]}},qN=function(e){return function(t){return[rn(t),Mn(e)]}},Vw=function(e){return function(t){return[e(t),Mn(t)]}},Zy=rn,PAe=Vw(N),Qw=function(e,t){return function(n){return t(e,rn(n))}},zw=function(){return function(e){return function(t){return e(rn(t))}}},Hw=function(e,t){return function(n){return t(rn(n),e)}},VN=function(e){return function(t){return function(n){return e.map(t(rn(n)),function(r){return[r,Mn(n)]})}}},Yw=function(e){return function(t){return e.map(rn(t),function(n){return[n,Mn(t)]})}},qr="ReadonlyTuple",QN={URI:qr,map:HA},DAe=Qe(QN),WAe={URI:qr,bimap:PN,mapLeft:DN},KAe={URI:qr,compose:BN},NAe={URI:qr,map:HA,extend:WN,extract:Zy},qAe={URI:qr,reduce:Dw,foldMap:Ww,reduceRight:Kw},VAe={URI:qr,map:HA,reduce:Dw,foldMap:Ww,reduceRight:Kw,traverse:KN,sequence:Yw},QAe=Nw,zAe=qw,HAe={URI:qr,compose:BN,map:HA,bimap:PN,mapLeft:DN,extract:Zy,extend:WN,reduce:Dw,foldMap:Ww,reduceRight:Kw,traverse:KN,sequence:Yw};const YAe=Object.freeze(Object.defineProperty({__proto__:null,Bifunctor:WAe,Comonad:NAe,Foldable:qAe,Functor:QN,Semigroupoid:KAe,Traversable:VAe,URI:qr,bimap:NN,compose:qN,duplicate:PAe,extend:Vw,extract:Zy,flap:DAe,foldMap:zw,fst:rn,getApplicative:jAe,getApply:Bw,getChain:Pw,getChainRec:BAe,getMonad:UAe,map:QAe,mapFst:Nw,mapLeft:zAe,mapSnd:qw,readonlyTuple:HAe,reduce:Qw,reduceRight:Hw,sequence:Yw,snd:Mn,swap:LAe,traverse:VN},Symbol.toStringTag,{value:"Module"}));var wl=function(){return wl=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},wl.apply(this,arguments)},GAe=pN,Iu=fo,Gw=function(e){return function(t){return Object.keys(t).sort(e.compare)}},JAe=Gw(z);function Jw(e){if(typeof e=="function")return Jw(z)(e);var t=Gw(e);return function(n){return function(r){for(var i=[],o=0,a=t(r);o<a.length;o++){var s=a[o];i.push(n(s,r[s]))}return i}}}var Zw=Jw(z)(function(e,t){return[e,t]});function ZAe(e){return function(t){var n=Zw(t),r=n.length;return e.unfold(0,function(i){return i<r?de([n[i],i+1]):Ce})}}var zN=gw,HN=na;function YN(e){return function(t){if(!pt.call(t,e))return t;var n=Object.assign({},t);return delete n[e],n}}var XAe=function(e,t){return GN(e,function(){return t})},GN=function(e,t){return function(n){if(!HN(e,n))return Ce;var r=Object.assign({},n);return r[e]=t(n[e]),de(r)}};function ehe(e){var t=YN(e);return function(n){var r=JN(e,n);return Vt(r)?Ce:de([r.value,t(n)])}}var the=Dy,JN=_u,nhe=Wy,rhe=yw;function ihe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.length===1?Il(e[0]):Il(z).apply(void 0,e)}function ohe(e){return"compare"in e?Tl(e):Tl(z)(e)}function ahe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.length===1?xl(e[0]):xl(z).apply(void 0,e)}var she=AN;function uhe(e){return hN(e)}function Xw(e){return Ky(e)}function YA(e){return sd(e)}var che=function(e){var t=Xw(e);return function(n){return function(r){return e.map(C(r,t(n)),Ds)}}},lhe=function(e){var t=Xw(e);return function(n){return function(r){return e.map(C(r,t(n)),Ws)}}},fhe=Ny;function dhe(e){return qy(e)}var phe=Vy;function Ahe(e){return Qy(e)}function ZN(e,t){return mN(e,t)}var hhe=Zw,mhe=function(e){return ZN(Eg(),b2)(e)};function ghe(e,t){return bw(e,t)}var vhe=gN,yhe=vN,bhe=Cw,XN=function(e){var t=Sw(e);return function(n){return function(r){return Iu(r)?wl({},n):Iu(n)?wl({},r):t(n)(r)}}},e6=function(e){return function(t){return function(n){return Iu(n)||Iu(t)?{}:_w(e)(t)(n)}}},t6=function(e){return function(t){return Iu(t)?wl({},e):Iu(e)?wl({},t):Iw(e)(t)}},Vi=Dr,GA=yc,Qi=Wr,zi=Kr,Hi=Nr,JA=bc,ZA=Cc,XA=Sc,eh=_c,th=Ic,nh=Tc,rh=xc,n6=zy,r6=Hy,i6=Yy,o6=Gy,ud=Ro,a6=VA,eE=function(e){return function(t){var n=Gw(e);return function(r,i){var o=n(r);if(o.length===0)return t.of({});for(var a=t.of({}),s=function(d){a=t.ap(t.map(a,function(p){return function(A){return p[d]=A,p}}),i(d,r[d]))},u=0,c=o;u<c.length;u++){var l=c[u];s(l)}return a}}},Che=Tw,She=xw,_he=ww,Ihe=Ew;function The(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.length===1?Hd(e[0]):Hd(z).apply(void 0,e)}function xhe(e){return"compare"in e?Yd(e):Yd(z)(e)}function whe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.length===1?Gd(e[0]):Gd(z).apply(void 0,e)}var Ds=ja,Ws=Ua,$n="Record";function Ehe(e){return"compare"in e?Sm(e):Sm(z)(e)}var $he=yN,Rhe=bN,s6={URI:$n,map:Vi},Ohe=Qe(s6),Fhe={URI:$n,map:Vi,mapWithIndex:GA},khe=function(e){return{URI:$n,reduce:Qi(e),foldMap:zi(e),reduceRight:Hi(e)}},Mhe=function(e){return{URI:$n,reduce:Qi(e),foldMap:zi(e),reduceRight:Hi(e),reduceWithIndex:th(e),foldMapWithIndex:nh(e),reduceRightWithIndex:rh(e)}},Xd={URI:$n,compact:Ds,separate:Ws},Lhe={URI:$n,map:Vi,compact:Ds,separate:Ws,filter:JA,filterMap:ZA,partition:XA,partitionMap:eh},jhe={URI:$n,map:Vi,mapWithIndex:GA,compact:Ds,separate:Ws,filter:JA,filterMap:ZA,partition:XA,partitionMap:eh,filterMapWithIndex:i6,filterWithIndex:o6,partitionMapWithIndex:n6,partitionWithIndex:r6},u6=function(e){return{URI:$n,map:Vi,reduce:Qi(e),foldMap:zi(e),reduceRight:Hi(e),traverse:ud(e),sequence:a6(e)}},Uhe=function(e){return{URI:$n,map:Vi,mapWithIndex:GA,reduce:Qi(e),foldMap:zi(e),reduceRight:Hi(e),reduceWithIndex:th(e),foldMapWithIndex:nh(e),reduceRightWithIndex:rh(e),traverse:ud(e),sequence:a6(e),traverseWithIndex:eE(e)}},Bhe=function(e){var t=u6(e);return{URI:$n,map:Vi,reduce:Qi(e),foldMap:zi(e),reduceRight:Hi(e),traverse:t.traverse,sequence:t.sequence,compact:Ds,separate:Ws,filter:JA,filterMap:ZA,partition:XA,partitionMap:eh,wither:Pi(t,Xd),wilt:Bi(t,Xd)}},c6=function(e){var t=XN(e);return{concat:function(n,r){return t(r)(n)}}},Phe=function(e){return{concat:c6(e).concat,empty:{}}},Dhe=function(e){var t=e6(e);return{concat:function(n,r){return t(r)(n)}}},Whe=function(){return{concat:function(e,t){return t6(t)(e)}}},Khe={URI:$n,reduce:Qi(z),foldMap:zi(z),reduceRight:Hi(z)},Nhe={URI:$n,reduce:Qi(z),foldMap:zi(z),reduceRight:Hi(z),reduceWithIndex:th(z),foldMapWithIndex:nh(z),reduceRightWithIndex:rh(z)},tE={URI:$n,map:Vi,reduce:Qi(z),foldMap:zi(z),reduceRight:Hi(z),traverse:ud(z),sequence:YA},qhe={URI:$n,map:Vi,mapWithIndex:GA,reduce:Qi(z),foldMap:zi(z),reduceRight:Hi(z),reduceWithIndex:th(z),foldMapWithIndex:nh(z),reduceRightWithIndex:rh(z),traverse:ud(z),sequence:YA,traverseWithIndex:eE(z)},l6=Pi(tE,Xd),f6=Bi(tE,Xd),Vhe={URI:$n,map:Vi,reduce:Qi(z),foldMap:zi(z),reduceRight:Hi(z),traverse:ud(z),sequence:YA,compact:Ds,separate:Ws,filter:JA,filterMap:ZA,partition:XA,partitionMap:eh,wither:l6,wilt:f6},Qhe={},zhe=zN,Hhe=xN,Yhe={URI:$n,map:Vi,reduce:Qi(z),foldMap:zi(z),reduceRight:Hi(z),traverse:ud(z),sequence:YA,compact:Ds,separate:Ws,filter:JA,filterMap:ZA,partition:XA,partitionMap:eh,mapWithIndex:GA,reduceWithIndex:th(z),foldMapWithIndex:nh(z),reduceRightWithIndex:rh(z),filterMapWithIndex:i6,filterWithIndex:o6,partitionMapWithIndex:n6,partitionWithIndex:r6,traverseWithIndex:eE(z),wither:l6,wilt:f6};const Ghe=Object.freeze(Object.defineProperty({__proto__:null,Compactable:Xd,Filterable:Lhe,FilterableWithIndex:jhe,Foldable:Khe,FoldableWithIndex:Nhe,Functor:s6,FunctorWithIndex:Fhe,Traversable:tE,TraversableWithIndex:qhe,URI:$n,Witherable:Vhe,collect:Jw,compact:Ds,deleteAt:YN,difference:t6,elem:bhe,empty:Qhe,every:vhe,filter:Che,filterMap:She,filterMapWithIndex:phe,filterWithIndex:Ahe,flap:Ohe,foldMap:xhe,foldMapWithIndex:ohe,fromEntries:mhe,fromFoldable:ZN,fromFoldableMap:ghe,getDifferenceMagma:Whe,getEq:$he,getFoldable:khe,getFoldableWithIndex:Mhe,getIntersectionSemigroup:Dhe,getMonoid:Rhe,getShow:Ehe,getTraversable:u6,getTraversableWithIndex:Uhe,getUnionMonoid:Phe,getUnionSemigroup:c6,getWitherable:Bhe,has:HN,hasOwnProperty:Hhe,insertAt:zhe,intersection:e6,isEmpty:Iu,isSubrecord:the,keys:JAe,lookup:JN,map:rhe,mapWithIndex:nhe,modifyAt:GN,partition:_he,partitionMap:Ihe,partitionMapWithIndex:fhe,partitionWithIndex:dhe,pop:ehe,record:Yhe,reduce:The,reduceRight:whe,reduceRightWithIndex:ahe,reduceWithIndex:ihe,separate:Ws,sequence:YA,singleton:she,size:GAe,some:yhe,toArray:Zw,toEntries:hhe,toUnfoldable:ZAe,traverse:Xw,traverseWithIndex:uhe,union:XN,updateAt:XAe,upsertAt:zN,wilt:lhe,wither:che},Symbol.toStringTag,{value:"Module"}));var Jhe=function(e){return function(t){return It(e(t))}},Zhe=function(e){return function(t){return uS(e(t))}},Xhe=function(){return function(e){return!0}},eme=function(e){return function(t){return!e(t)}},tme=function(e){return function(t){return function(n){return t(n)||e(n)}}},nme=function(e){return function(t){return function(n){return t(n)&&e(n)}}},rme=function(){return function(e){return!1}},ime=function(e){return function(t){return function(n){return t(n)&&e(n)}}};const ome=Object.freeze(Object.defineProperty({__proto__:null,and:nme,compose:ime,fromEitherK:Zhe,fromOptionK:Jhe,id:Xhe,not:eme,or:tme,zero:rme},Symbol.toStringTag,{value:"Module"}));var d6=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return{add:function(n,r){return e.map(function(i,o){return i.add(n[o],r[o])})},zero:e.map(function(n){return n.zero}),mul:function(n,r){return e.map(function(i,o){return i.mul(n[o],r[o])})},one:e.map(function(n){return n.one}),sub:function(n,r){return e.map(function(i,o){return i.sub(n[o],r[o])})}}},ame=function(e){return function(t){return e.sub(e.zero,t)}},sme=d6,ume=ZM;const cme=Object.freeze(Object.defineProperty({__proto__:null,getFunctionRing:ume,getTupleRing:sme,negate:ame,tuple:d6},Symbol.toStringTag,{value:"Module"})),lme=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var fme=oS;const dme=Object.freeze(Object.defineProperty({__proto__:null,getFunctionSemiring:fme},Symbol.toStringTag,{value:"Module"}));var pme=MN,Ame=LN;function hme(e){var t=lr(e);return function(n){return function(r){var i=new Set;return r.forEach(function(o){var a=n(o);t(a,i)||i.add(a)}),i}}}function mme(e){var t=lr(e);return function(n){return function(r){var i=new Set;return r.forEach(function(o){n(o).forEach(function(a){t(a,i)||i.add(a)})}),i}}}function nE(e){return function(t){for(var n=t.values(),r,i=new Set;!(r=n.next()).done;){var o=r.value;e(o)&&i.add(o)}return i}}function gme(e){return function(t){for(var n=t.values(),r,i=new Set,o=new Set;!(r=n.next()).done;){var a=r.value;e(a)?i.add(a):o.add(a)}return Oe(o,i)}}function rE(e){var t=lr(e);return function(n,r){if(r===void 0){var i=rE(e);return function(a){return i(n,a)}}if(ep(n))return r;if(ep(r))return n;var o=new Set(n);return r.forEach(function(a){t(a,o)||o.add(a)}),o}}function iE(e){var t=lr(e);return function(n,r){if(r===void 0){var i=iE(e);return function(a){return i(a,n)}}if(ep(n)||ep(r))return new Set;var o=new Set;return n.forEach(function(a){t(a,r)&&o.add(a)}),o}}function vme(e,t){return function(n){return function(r){for(var i=r.values(),o,a=new Set,s=new Set,u=lr(e),c=lr(t);!(o=i.next()).done;){var l=n(o.value);switch(l._tag){case"Left":u(l.left,a)||a.add(l.left);break;case"Right":c(l.right,s)||s.add(l.right);break}}return Oe(a,s)}}}function oE(e){var t=lr(e);return function(n,r){if(r===void 0){var i=oE(e);return function(o){return i(o,n)}}return nE(function(o){return!t(o,r)})(n)}}var p6=function(e){return{concat:rE(e)}},yme=function(e){return{concat:p6(e).concat,empty:new Set}},bme=function(e){return{concat:iE(e)}},Cme=function(e){return{concat:oE(e)}},Sme=EN,_me=$N,Ime=RN,Tme=function(e){return new Set([e])};function A6(e){var t=lr(e);return function(n){return function(r){if(t(n)(r))return r;var i=new Set(r);return i.add(n),i}}}var h6=function(e){return function(t){return function(n){return nE(function(r){return!e.equals(t,r)})(n)}}},xme=function(e){var t=lr(e),n=h6(e),r=A6(e);return function(i){return function(o){return(t(i,o)?n:r)(i)(o)}}},m6=function(e){return function(t){for(var n=t.length,r=new Set,i=lr(e),o=0;o<n;o++){var a=t[o];i(a,r)||r.add(a)}return r}},wme=function(e){return g6(e)(N)};function Eme(e,t){return function(n){var r=lr(e),i=lr(t),o=new Set,a=new Set;return n.forEach(function(s){switch(s._tag){case"Left":r(s.left,o)||o.add(s.left);break;case"Right":i(s.right,a)||a.add(s.right);break}}),Oe(o,a)}}function g6(e){var t=lr(e);return function(n){return function(r){var i=new Set;return r.forEach(function(o){var a=n(o);a._tag==="Some"&&!t(a.value,i)&&i.add(a.value)}),i}}}var $me=new Set,ep=function(e){return e.size===0},Rme=function(e){return e.size},Ome=jw,v6=Uw,Fme=zA,lr=bn,y6=function(e){return function(t){var n=[];return t.forEach(function(r){return n.push(r)}),n.sort(e.compare)}},kme=zA;const Mme=Object.freeze(Object.defineProperty({__proto__:null,chain:mme,compact:wme,difference:oE,elem:lr,empty:$me,every:v6,filter:nE,filterMap:g6,foldMap:_me,fromArray:m6,getDifferenceMagma:Cme,getEq:Ame,getIntersectionSemigroup:bme,getShow:pme,getUnionMonoid:yme,getUnionSemigroup:p6,insert:A6,intersection:iE,isEmpty:ep,isSubset:Fme,map:hme,partition:gme,partitionMap:vme,reduce:Sme,reduceRight:Ime,remove:h6,separate:Eme,singleton:Tme,size:Rme,some:Ome,subset:kme,toArray:y6,toggle:xme,union:rE},Symbol.toStringTag,{value:"Module"}));var b6=function(e){return{show:function(t){var n="{";for(var r in e)pt.call(e,r)&&(n+=" ".concat(r,": ").concat(e[r].show(t[r]),","));return n.length>1&&(n=n.slice(0,-1)+" "),n+="}",n}}},C6=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return{show:function(n){return"[".concat(n.map(function(r,i){return e[i].show(r)}).join(", "),"]")}}},Lme=C6,jme=b6,Ume={show:function(e){return JSON.stringify(e)}},Bme={show:function(e){return JSON.stringify(e)}},Pme={show:function(e){return JSON.stringify(e)}};const Dme=Object.freeze(Object.defineProperty({__proto__:null,getStructShow:jme,getTupleShow:Lme,showBoolean:Ume,showNumber:Pme,showString:Bme,struct:b6,tuple:C6},Symbol.toStringTag,{value:"Module"}));function aE(e){return function(t){return function(n){return e.of([t,n])}}}function sE(e){return function(t){return function(n){return function(r){return e.map(n(r),function(i){var o=i[0],a=i[1];return[t(o),a]})}}}}function uE(e){return function(t){return function(n){return function(r){return e.chain(n(r),function(i){var o=i[0],a=i[1];return e.map(t(a),function(s){var u=s[0],c=s[1];return[o(u),c]})})}}}}function cE(e){return function(t){return function(n){return function(r){return e.chain(n(r),function(i){var o=i[0],a=i[1];return t(o)(a)})}}}}function lE(e){return function(t){return function(n){return e.of(t(n))}}}function fE(e){return function(t){return function(n){return e.map(t,function(r){return[r,n]})}}}function dE(e){return function(t){return function(n){return e.map(n(t),function(r){var i=r[0];return i})}}}function pE(e){return function(t){return function(n){return e.map(n(t),Mn)}}}function Wme(e){var t=uE(e),n=sE(e),r=cE(e),i=dE(e),o=pE(e);return{map:function(a,s){return C(a,n(s))},ap:function(a,s){return C(a,t(s))},of:aE(e),chain:function(a,s){return C(a,r(s))},get:function(){return function(a){return e.of([a,a])}},put:function(a){return function(){return e.of([void 0,a])}},modify:function(a){return function(s){return e.of([void 0,a(s)])}},gets:function(a){return function(s){return e.of([a(s),s])}},fromState:lE(e),fromM:fE(e),evalState:function(a,s){return C(a,i(s))},execState:function(a,s){return C(a,o(s))}}}const Kme=Object.freeze(Object.defineProperty({__proto__:null,ap:uE,chain:cE,evaluate:dE,execute:pE,fromF:fE,fromState:lE,getStateM:Wme,map:sE,of:aE},Symbol.toStringTag,{value:"Module"}));var AE=function(e){return function(){return Ry(e)}},hE=aE(fw);function S6(e){return Yi(Zx(e))}function Nme(e){return Yi(S3(e))}function _6(e){return Yi(Xx(e))}function qme(e){return Yi(_3(e))}function I6(e){return Yi(ew(e))}function Vme(e){return Yi(T3(e))}var Qme=function(e){return H(e,Jx)},zme=function(e){return function(t){return Ry(e(t)[0])}},T6=xs(function(e){return AE(e)},hE),x6=_6,wc=I6,ih=S6,w6=lE(fw),E6=function(e){return Yi(js(e))},$6=function(e){return Yi(tw(e))},Hme=function(e){return Yi(nw(e))},Yi=fE(vc),Yme=function(e){return function(t){return H(t,pA(e))}},R6=function(e){return function(t){return function(n){return e(n)(t)(n)}}},Gme=R6,O6=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return $6(e.apply(void 0,t))}},F6=function(e){return function(t){return C(t,oh(O6(e)))}},Jme=F6,k6=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return E6(e.apply(void 0,t))}},M6=function(e){return function(t){return C(t,oh(k6(e)))}},Zme=M6,L6=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return Yi(e.apply(void 0,t))}},j6=function(e){return function(t){return C(t,oh(L6(e)))}},Xme=j6,Gi=function(e,t){return C(e,U6(t))},Ba=function(e,t){return C(e,gE(t))},Ec=function(e,t){return C(e,vE(t))},mE=function(e,t){return function(n){return C(e(n),My(function(){return t()(n)}))}},Xy=function(e,t,n){return function(r){return C(e(r),uw(t,function(i){var o=i[0],a=i[1];return[n(o),a]}))}},e0=function(e,t){return function(n){return C(e(n),cw(t))}},U6=sE(vc),ege=function(e,t){return function(n){return Xy(n,e,t)}},tge=function(e){return function(t){return e0(t,e)}},gE=uE(er),nge=gE,Oo=hE,vE=cE(er),oh=vE,B6=oh(N),rge=B6,P6=function(e){return function(t){return function(n){return C(t(n),W3(function(){return e()(n)}))}}},ige=P6,t0=AE,Jt="StateReaderTaskEither",yE={URI:Jt,map:Gi},oge=Qe(yE),age={URI:Jt,of:Oo},n0={URI:Jt,map:Gi,ap:Ba},D6=Lt(n0),sge=D6,W6=jt(n0),uge=W6,cge={URI:Jt,map:Gi,ap:Ba,of:Oo},br={URI:Jt,map:Gi,ap:Ba,chain:Ec},$c={URI:Jt,fromState:w6},lge=LP($c),fge=jP($c),dge=UP($c),pge=BP($c),Age=uT($c),hge=PP($c,br),mge={URI:Jt,map:Gi,ap:Ba,of:Oo,chain:Ec},gge={URI:Jt,map:Gi,ap:Ba,of:Oo,chain:Ec,fromIO:wc},vge={URI:Jt,map:Gi,ap:Ba,of:Oo,chain:Ec,fromIO:wc,fromTask:ih},yge={URI:Jt,map:Gi,ap:Ba,of:Oo,chain:Ec,throwError:t0},K6=At(br),bge=K6,Cge={URI:Jt,bimap:Xy,mapLeft:e0},Sge={URI:Jt,map:Gi,alt:mE},cd={URI:Jt,fromReader:x6},_ge=mA(cd),Ige=gA(cd),Tge=uc(cd),N6=vA(cd,br),xge=N6,q6=yA(cd,br),wge=q6,Pa={URI:Jt,fromEither:T6},Ege=go(Pa),$ge=vo(Pa),Rge=Nu(Pa,br),V6=ca(Pa,br),Oge=V6,Q6=la(Pa,br),Fge=Q6,kge=ms(Pa),z6=qu(Pa,br),Mge=z6,Lge=Ur(Pa),r0={URI:Jt,fromIO:wc},jge=_o(r0),Uge=va(r0,br),Bge=ya(r0,br),i0={URI:Jt,fromIO:wc,fromTask:ih},Pge=cc(i0),Dge=Lf(i0,br),Wge=jf(i0,br),Kge=dE(vc),Nge=pE(vc),qge=Bt(yE),H6=Pt(br),Vge=H6,Y6=Ut(n0),Qge=Y6,G6=function(e){return function(t){return function(n){return function(r){return function(){return zl(t).reduce(function(i,o,a){return i.then(function(s){return nn(s)?i:e(a+1,o)(s.right[1])(r)().then(function(u){if(nn(u))return u;var c=u.right,l=c[0],d=c[1];return s.right[0].push(l),s.right[1]=d,s})})},e(0,jr(t))(n)(r)().then(tc(function(i){var o=i[0],a=i[1];return[[o],a]})))}}}}},bE=function(e){var t=G6(e);return function(n){return yt(n)?t(n):Oo(Sn)}},zge=bE,J6=function(e){return bE(function(t,n){return e(n)})},Hge=J6(N),Yge={URI:Jt,map:Gi,of:Oo,ap:Ba,chain:Ec,bimap:Xy,mapLeft:e0,alt:mE,fromIO:wc,fromTask:ih,throwError:t0},Gge={URI:Jt,map:Gi,of:Oo,ap:Ba,chain:Ec,bimap:Xy,mapLeft:e0,alt:mE,fromIO:wc,fromTask:ih,throwError:t0},Jge=function(e,t){return C(e(t),KA(function(n){var r=n[0];return r}))},Zge=function(e,t){return C(e(t),KA(function(n){n[0];var r=n[1];return r}))};function Xge(e,t,n){return e(t)(n)()}const eve=Object.freeze(Object.defineProperty({__proto__:null,Alt:Sge,Applicative:cge,Apply:n0,Bifunctor:Cge,Chain:br,FromEither:Pa,FromIO:r0,FromReader:cd,FromState:$c,FromTask:i0,Functor:yE,Monad:mge,MonadIO:gge,MonadTask:vge,MonadThrow:yge,Pointed:age,URI:Jt,alt:ige,altW:P6,ap:gE,apFirst:D6,apFirstW:sge,apS:Y6,apSW:Qge,apSecond:W6,apSecondW:uge,apW:nge,ask:_ge,asks:Ige,asksStateReaderTaskEither:Gme,asksStateReaderTaskEitherW:R6,bimap:ege,bind:H6,bindTo:qge,bindW:Vge,chain:vE,chainEitherK:V6,chainEitherKW:Oge,chainFirst:K6,chainFirstEitherK:Q6,chainFirstEitherKW:Fge,chainFirstIOK:Bge,chainFirstReaderK:q6,chainFirstReaderKW:wge,chainFirstTaskK:Wge,chainFirstW:bge,chainIOEitherK:Jme,chainIOEitherKW:F6,chainIOK:Uge,chainOptionK:Rge,chainReaderK:N6,chainReaderKW:xge,chainReaderTaskEitherK:Xme,chainReaderTaskEitherKW:j6,chainStateK:hge,chainTaskEitherK:Zme,chainTaskEitherKW:M6,chainTaskK:Dge,chainW:oh,evalState:Jge,evaluate:Kge,execState:Zge,execute:Nge,filterOrElse:z6,filterOrElseW:Mge,flap:oge,flatten:rge,flattenW:B6,fromEither:T6,fromEitherK:Lge,fromIO:wc,fromIOEither:$6,fromIOEitherK:O6,fromIOK:jge,fromOption:Ege,fromOptionK:$ge,fromPredicate:kge,fromReader:x6,fromReaderEither:Hme,fromReaderK:Tge,fromReaderTaskEither:Yi,fromReaderTaskEitherK:L6,fromState:w6,fromStateK:Age,fromTask:ih,fromTaskEither:E6,fromTaskEitherK:k6,fromTaskK:Pge,get:lge,gets:pge,left:AE,leftIO:Vme,leftReader:qme,leftState:zme,leftTask:Nme,local:Yme,map:U6,mapLeft:tge,modify:dge,of:Oo,put:fge,right:hE,rightIO:I6,rightReader:_6,rightState:Qme,rightTask:S6,run:Xge,sequenceArray:Hge,stateReaderTaskEither:Yge,stateReaderTaskEitherSeq:Gge,throwError:t0,traverseArray:J6,traverseArrayWithIndex:zge,traverseReadonlyArrayWithIndex:bE,traverseReadonlyNonEmptyArrayWithIndex:G6},Symbol.toStringTag,{value:"Module"}));function tve(e){return function(t){return{peek:t.peek,pos:e}}}function nve(e){return function(t){return{peek:t.peek,pos:e(t.pos)}}}function rve(e){return function(t){return t.peek(e(t.pos))}}function ive(e){return function(t){return function(n){return e.map(t(n.pos),function(r){return n.peek(r)})}}}var Z6=function(e,t){return C(e,e5(t))},ove=function(e,t){return C(e,CE(t))},CE=function(e){return function(t){return{peek:function(n){return e({peek:t.peek,pos:n})},pos:t.pos}}},X6=function(e){return e.peek(e.pos)},ave=CE(N),e5=function(e){return function(t){return{peek:function(n){return e(t.peek(n))},pos:t.pos}}},SE="Store",t5={URI:SE,map:Z6},sve=Qe(t5),n5={URI:SE,map:Z6,extend:ove,extract:X6},uve=n5;const cve=Object.freeze(Object.defineProperty({__proto__:null,Comonad:n5,Functor:t5,URI:SE,duplicate:ave,experiment:ive,extend:CE,extract:X6,flap:sve,map:e5,peeks:rve,seek:tve,seeks:nve,store:uve},Symbol.toStringTag,{value:"Module"}));function _E(e,t){return function(n,r){return t.compose(e.second(r),e.first(n))}}function r5(e,t){var n=_E(e,t);return function(r,i){return t.compose(n(r,i),e.promap(t.id(),N,function(o){return[o,o]}))}}function lve(e){return _E(e,e)}function fve(e){return r5(e,e)}const dve=Object.freeze(Object.defineProperty({__proto__:null,fanOut:r5,fanout:fve,split:_E,splitStrong:lve},Symbol.toStringTag,{value:"Module"}));var pve=function(){return{concat:function(e,t){return Object.assign({},e,t)}}},Ave=function(e){return function(t){var n={};for(var r in t)pt.call(t,r)&&(n[r]=e[r](t[r]));return n}};const hve=Object.freeze(Object.defineProperty({__proto__:null,evolve:Ave,getAssignSemigroup:pve},Symbol.toStringTag,{value:"Module"}));var mve=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(l){try{c(r.next(l))}catch(d){a(d)}}function u(l){try{c(r.throw(l))}catch(d){a(d)}}function c(l){l.done?o(l.value):i(l.value).then(s,u)}c((r=r.apply(e,t||[])).next())})},gve=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(c){return function(l){return u([c,l])}}function u(c){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(l){c=[6,l],i=0}finally{r=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},i5=IA(Tn),vve=LT(Tn),yve=Bn,o5=jT(Tn),ah=function(e){return o0(Zn(e))},o0=zv(De),bve=Fs(vf),a5=UT(De),Cve=a5,IE=Jv(Jf),Sve=IE,s5=IE,_ve=s5,u5=Zv(un),Ive=u5,Tve=Hv(Tn),c5=function(e){return function(){return mve(void 0,void 0,void 0,function(){return gve(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,e().then(de)];case 1:return[2,t.sent()];case 2:return t.sent(),[2,Ce];case 3:return[2]}})})}},xve=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return c5(function(){return e.apply(void 0,t)})}},wve=Yv(Tn),Eve=kT(un),$ve=Gv(Tn),Rve=MT(un),TE=Xv(De),l5=ey(hc),Fo=i5,a0=Wf(un),Ove=a0(N),xE=ty(un),Fve=xE,s0=TA(Tn),kve=s0(),wE=Co(De,Gu),EE=ha(De,Gu,Af),f5=ma(De,pa),d5=ga(De,pa),p5=ws(De,pa),A5=Es(De,pa),Ai=function(e,t){return C(e,TE(t))},Rc=function(e,t){return C(e,l5(t))},u0=function(e,t){return C(e,a0(t))},h5=function(e,t){return C(e,xE(t))},Mve=function(e,t){return C(e,f5(t))},Lve=function(e,t){return C(e,d5(t))},jve=function(e,t){return C(e,p5(t))},Uve=function(e,t){return C(e,A5(t))},cn="TaskOption",$E={URI:cn,map:Ai},Bve=Qe($E),m5={URI:cn,of:Fo},c0={URI:cn,map:Ai,ap:Rc},Pve=Lt(c0),Dve=jt(c0),Wve={URI:cn,map:Ai,ap:Rc,of:Fo},g5=function(e,t){return C(e,a0(function(n){return C(t,TE(n))}))},Kve={URI:cn,map:Ai,ap:g5},Nve={URI:cn,map:Ai,ap:g5,of:Fo},Da={URI:cn,map:Ai,ap:Rc,chain:u0},qve=At(Da),Vve={URI:cn,map:Ai,alt:h5},v5={URI:cn,zero:s0},Qve=tf(v5,m5),zve={URI:cn,map:Ai,ap:Rc,of:Fo,alt:h5,zero:s0},Hve={URI:cn,map:Ai,ap:Rc,of:Fo,chain:u0},Yve={URI:cn,map:Ai,ap:Rc,of:Fo,chain:u0,fromIO:ah},Gve={URI:cn,map:Ai,ap:Rc,of:Fo,chain:u0,fromIO:ah,fromTask:o0},Jve={URI:cn,compact:wE,separate:EE},Zve={URI:cn,map:Ai,compact:wE,separate:EE,filter:Mve,filterMap:Lve,partition:jve,partitionMap:Uve},l0={URI:cn,fromIO:ah},Xve=_o(l0),eye=va(l0,Da),tye=ya(l0,Da),f0={URI:cn,fromEither:o5},nye=Ur(f0),rye=ca(f0,Da),iye=la(f0,Da),d0={URI:cn,fromIO:ah,fromTask:o0},oye=cc(d0),aye=Lf(d0,Da),sye=jf(d0,Da),uye=Fo(on),cye=Bt($E),lye=Pt(Da),fye=Ut(c0),RE=Fo(Sn),y5=function(e){return H(Zf(e),Fs(Fv(Ar)))},OE=function(e){var t=y5(e);return function(n){return yt(n)?t(n):RE}},b5=function(e){return function(t){return function(){return zl(t).reduce(function(n,r,i){return n.then(function(o){return Vt(o)?n:e(i+1,r)().then(function(a){return Vt(a)?a:(o.value.push(a.value),o)})})},e(0,jr(t))().then(bo($p)))}}},FE=function(e){var t=b5(e);return function(n){return yt(n)?t(n):RE}},dye=OE,C5=function(e){return OE(function(t,n){return e(n)})},pye=C5(N),Aye=FE,S5=function(e){return FE(function(t,n){return e(n)})},hye=S5(N);const mye=Object.freeze(Object.defineProperty({__proto__:null,Alt:Vve,Alternative:zve,ApT:RE,ApplicativePar:Wve,ApplicativeSeq:Nve,ApplyPar:c0,ApplySeq:Kve,Chain:Da,Compactable:Jve,Do:uye,Filterable:Zve,FromEither:f0,FromIO:l0,FromTask:d0,Functor:$E,Monad:Hve,MonadIO:Yve,MonadTask:Gve,Pointed:m5,Zero:v5,alt:xE,altW:Fve,ap:l5,apFirst:Pve,apS:fye,apSecond:Dve,bind:lye,bindTo:cye,chain:a0,chainEitherK:rye,chainFirst:qve,chainFirstEitherK:iye,chainFirstIOK:tye,chainFirstTaskK:sye,chainIOK:eye,chainNullableK:Eve,chainOptionK:Rve,chainTaskK:aye,compact:wE,filter:f5,filterMap:d5,flap:Bve,flatten:Ove,fold:Sve,foldW:_ve,fromEither:o5,fromEitherK:nye,fromIO:ah,fromIOK:Xve,fromNullable:Tve,fromNullableK:wve,fromOption:yve,fromOptionK:$ve,fromPredicate:vve,fromTask:o0,fromTaskEither:bve,fromTaskK:oye,getOrElse:u5,getOrElseW:Ive,guard:Qve,map:TE,match:a5,matchE:IE,matchEW:s5,matchW:Cve,none:kve,of:Fo,partition:p5,partitionMap:A5,separate:EE,sequenceArray:pye,sequenceSeqArray:hye,some:i5,traverseArray:C5,traverseArrayWithIndex:dye,traverseReadonlyArrayWithIndex:OE,traverseReadonlyArrayWithIndexSeq:FE,traverseReadonlyNonEmptyArrayWithIndex:y5,traverseReadonlyNonEmptyArrayWithIndexSeq:b5,traverseSeqArray:S5,traverseSeqArrayWithIndex:Aye,tryCatch:c5,tryCatchK:xve,zero:s0},Symbol.toStringTag,{value:"Module"}));var Ze=function(e){return e._tag==="Left"},Ft=function(e){return e._tag==="Right"};function Tu(e){return e._tag==="Both"}function gn(e){return{_tag:"Left",left:e}}function Cr(e){return{_tag:"Right",right:e}}function nt(e,t){return{_tag:"Both",left:e,right:t}}var kE=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)}}},gye=kE,us=kE,vye=us,_5=us(Cr,gn,function(e,t){return nt(t,e)});function yye(e,t){return{show:us(function(n){return"left(".concat(e.show(n),")")},function(n){return"right(".concat(t.show(n),")")},function(n,r){return"both(".concat(e.show(n),", ").concat(t.show(r),")")})}}function bye(e,t){return ai(function(n,r){return Ze(n)?Ze(r)&&e.equals(n.left,r.left):Ft(n)?Ft(r)&&t.equals(n.right,r.right):Tu(r)&&e.equals(n.left,r.left)&&t.equals(n.right,r.right)})}function I5(e,t){return{concat:function(n,r){return Ze(n)?Ze(r)?gn(e.concat(n.left,r.left)):Ft(r)?nt(n.left,r.right):nt(e.concat(n.left,r.left),r.right):Ft(n)?Ze(r)?nt(r.left,n.right):Ft(r)?Cr(t.concat(n.right,r.right)):nt(r.left,t.concat(n.right,r.right)):Ze(r)?nt(e.concat(n.left,r.left),n.right):Ft(r)?nt(n.left,t.concat(n.right,r.right)):nt(e.concat(n.left,r.left),t.concat(n.right,r.right))}}}var p0=function(e){return{URI:Vr,_E:void 0,map:Oc,ap:function(t,n){return Ze(t)?Ze(n)?gn(e.concat(t.left,n.left)):Ft(n)?gn(t.left):gn(e.concat(t.left,n.left)):Ft(t)?Ze(n)?gn(n.left):Ft(n)?Cr(t.right(n.right)):nt(n.left,t.right(n.right)):Ze(n)?gn(e.concat(t.left,n.left)):Ft(n)?nt(t.left,t.right(n.right)):nt(e.concat(t.left,n.left),t.right(n.right))}}};function Cye(e){var t=p0(e);return{URI:Vr,_E:void 0,map:Oc,ap:t.ap,of:sh}}function T5(e){var t=p0(e),n=function(r,i){if(Ze(r))return r;if(Ft(r))return i(r.right);var o=i(r.right);return Ze(o)?gn(e.concat(r.left,o.left)):Ft(o)?nt(r.left,o.right):nt(e.concat(r.left,o.left),o.right)};return{URI:Vr,_E:void 0,map:Oc,ap:t.ap,chain:n}}function Sye(e){var t=T5(e);return{URI:Vr,_E:void 0,map:Oc,of:sh,ap:t.ap,chain:t.chain,throwError:gn}}function _ye(e){return Ze(e)?de(e.left):Ft(e)?Ce:de(e.left)}function Iye(e){return Ze(e)?Ce:(Ft(e),de(e.right))}function Tye(e){return function(t){return Vt(t)?gn(e):nt(e,t.value)}}function xye(e){return function(t){return Vt(t)?Cr(e):nt(t.value,e)}}function wye(e){return Ze(e)?de(e.left):Ce}function Eye(e){return Ft(e)?de(e.right):Ce}var $ye=function(e,t){return Vt(e)?Vt(t)?Ce:de(Cr(t.value)):Vt(t)?de(gn(e.value)):de(nt(e.value,t.value))},Oc=function(e,t){return C(e,PE(t))},x5=function(e,t,n){return C(e,UE(t,n))},w5=function(e,t){return C(e,BE(t))},ME=function(e,t,n){return C(e,$5(t,n))},LE=function(e){var t=R5(e);return function(n,r){return C(n,t(r))}},jE=function(e,t,n){return C(e,O5(t,n))},E5=function(e){var t=F5(e);return function(n,r){return C(n,t(r))}},UE=function(e,t){return function(n){return Ze(n)?gn(e(n.left)):Ft(n)?Cr(t(n.right)):nt(e(n.left),t(n.right))}},BE=function(e){return function(t){return Ze(t)?gn(e(t.left)):Tu(t)?nt(e(t.left),t.right):t}},PE=function(e){return function(t){return Ze(t)?t:Ft(t)?Cr(e(t.right)):nt(t.left,e(t.right))}},$5=function(e,t){return function(n){return Ze(n)?e:t(e,n.right)}},R5=function(e){return function(t){return function(n){return Ze(n)?e.empty:t(n.right)}}},O5=function(e,t){return function(n){return Ze(n)?e:t(n.right,e)}},F5=function(e){return function(t){return function(n){return Ze(n)?e.of(n):Ft(n)?e.map(t(n.right),Cr):e.map(t(n.right),function(r){return nt(n.left,r)})}}},DE=function(e){return function(t){return Ze(t)?e.of(t):Ft(t)?e.map(t.right,Cr):e.map(t.right,function(n){return nt(t.left,n)})}},sh=Cr,Vr="These",WE={URI:Vr,map:Oc},Rye=Qe(WE),Oye={URI:Vr,of:sh},Fye={URI:Vr,bimap:x5,mapLeft:w5},kye={URI:Vr,fromThese:N},Mye={URI:Vr,reduce:ME,foldMap:LE,reduceRight:jE},Lye={URI:Vr,map:Oc,reduce:ME,foldMap:LE,reduceRight:jE,traverse:E5,sequence:DE},KE={URI:Vr,fromEither:N},jye=go(KE),Uye=vo(KE),Bye=function(e){return function(t){return function(n){return Ze(n)?!1:e.equals(t,n.right)}}},Pye=function(e){return function(t){return Ze(t)?!1:e(t.right)}},NE=function(e,t){return function(n){return Ze(n)?[n.left,t()]:Ft(n)?[e(),n.right]:[n.left,n.right]}},Dye=function(e,t){return NE(function(){return e},function(){return t})},k5=sh(Sn),qE=function(e){return function(t){return function(n){var r=Ce,i=t(0,jr(n));if(Ze(i))return i;Tu(i)&&(r=de(i.left));for(var o=[i.right],a=1;a<n.length;a++){var s=t(a,n[a]);if(Ze(s))return s;Tu(s)&&(r=Vt(r)?de(s.left):de(e.concat(r.value,s.left))),o.push(s.right)}return Vt(r)?Cr(o):nt(r.value,o)}}},Wye=function(e){return function(t){var n=qE(e)(t);return function(r){return yt(r)?n(r):k5}}},Kye={URI:Vr,map:Oc,bimap:x5,mapLeft:w5,reduce:ME,foldMap:LE,reduceRight:jE,traverse:E5,sequence:DE};const Nye=Object.freeze(Object.defineProperty({__proto__:null,ApT:k5,Bifunctor:Fye,Foldable:Mye,FromEither:KE,FromThese:kye,Functor:WE,Pointed:Oye,Traversable:Lye,URI:Vr,bimap:UE,both:nt,elem:Bye,exists:Pye,flap:Rye,fold:vye,foldMap:R5,foldW:gye,fromOption:jye,fromOptionK:Uye,fromOptions:$ye,getApplicative:Cye,getApply:p0,getChain:T5,getEq:bye,getLeft:_ye,getLeftOnly:wye,getMonad:Sye,getRight:Iye,getRightOnly:Eye,getSemigroup:I5,getShow:yye,isBoth:Tu,isLeft:Ze,isRight:Ft,left:gn,leftOrBoth:Tye,map:PE,mapLeft:BE,match:us,matchW:kE,of:sh,reduce:$5,reduceRight:O5,right:Cr,rightOrBoth:xye,sequence:DE,swap:_5,these:Kye,toTuple:Dye,toTuple2:NE,traverse:F5,traverseReadonlyArrayWithIndex:Wye,traverseReadonlyNonEmptyArrayWithIndex:qE},Symbol.toStringTag,{value:"Module"}));function _m(e){return H(Cr,e.of)}function A0(e){return H(gn,e.of)}function VE(e){return H(nt,e.of)}function QE(e){return function(t){return e.map(t,Cr)}}function zE(e){return function(t){return e.map(t,gn)}}function HE(e){return Hl(e,WE)}function YE(e,t){return ua(e,p0(t))}function GE(e,t){var n=A0(e);return function(r){return function(i){return e.chain(i,us(n,r,function(o,a){return e.map(r(a),us(function(s){return gn(t.concat(o,s))},function(s){return nt(o,s)},function(s,u){return nt(t.concat(o,s),u)}))}))}}}function JE(e){return function(t,n){return function(r){return e.map(r,UE(t,n))}}}function ZE(e){return function(t){return function(n){return e.map(n,BE(t))}}}function M5(e){return function(t,n,r){return function(i){return e.map(i,us(t,n,r))}}}function XE(e){return function(t,n,r){return function(i){return e.chain(i,us(t,n,r))}}}function e$(e){return function(t){return e.map(t,_5)}}function t$(e){return function(t,n){return function(r){return e.map(r,NE(t,n))}}}function qye(e){var t=HE(e),n=JE(e),r=ZE(e),i=XE(e),o=t$(e),a=_m(e),s=function(u,c){return C(u,t(c))};return{map:s,bimap:function(u,c,l){return C(u,n(c,l))},mapLeft:function(u,c){return C(u,r(c))},fold:function(u,c,l,d){return C(u,i(c,l,d))},swap:e$(e),rightM:QE(e),leftM:zE(e),left:A0(e),right:_m(e),both:VE(e),toTuple:function(u,c,l){return C(u,o(function(){return c},function(){return l}))},getMonad:function(u){var c=YE(e,u),l=GE(e,u);return{_E:void 0,map:s,of:a,ap:function(d,p){return C(d,c(p))},chain:function(d,p){return C(d,l(p))}}}}}const Vye=Object.freeze(Object.defineProperty({__proto__:null,ap:YE,bimap:JE,both:VE,chain:GE,getTheseM:qye,left:A0,leftF:zE,map:HE,mapLeft:ZE,match:M5,matchE:XE,right:_m,rightF:QE,swap:e$,toTuple2:t$},Symbol.toStringTag,{value:"Module"}));var Qye=A0(Tn),L5=_m(Tn),zye=VE(Tn),n$=QE(De),j5=zE(De),U5=H(Zn,n$),Hye=H(Zn,j5),B5=Bn,P5=Bn,h0=U5,Yye=Zn,r$=n$,D5=M5(De),Gye=D5,W5=XE(un),K5=W5,N5=K5,Jye=N5,Zye=e$(De),Fc=function(e,t){return C(e,q5(t))},i$=function(e,t,n){return C(e,V5(t,n))},o$=function(e,t){return C(e,Q5(t))},q5=HE(De),V5=JE(De),Q5=ZE(De),uh=L5,tr="TaskThese",a$=function(e,t){var n=YE(e,t);return{URI:tr,_E:void 0,map:Fc,ap:function(r,i){return C(r,n(i))}}};function z5(e,t){var n=a$(e,t).ap;return{URI:tr,_E:void 0,map:Fc,ap:n,of:uh}}function H5(e){var t=a$(jA,e),n=GE(un,e);return{URI:tr,_E:void 0,map:Fc,ap:t.ap,chain:function(r,i){return C(r,n(i))}}}function Xye(e){var t=z5(jA,e),n=H5(e);return{URI:tr,_E:void 0,map:Fc,ap:t.ap,of:uh,chain:n.chain,fromIO:h0,fromTask:r$}}var Y5={URI:tr,map:Fc},e0e=Qe(Y5),t0e={URI:tr,of:uh},n0e={URI:tr,bimap:i$,mapLeft:o$},m0={URI:tr,fromEither:B5},r0e=go(m0),i0e=vo(m0),o0e=ms(m0),G5={URI:tr,fromThese:P5},a0e=DP(G5),J5={URI:tr,fromIO:h0},s0e=_o(J5),Z5={URI:tr,fromIO:h0,fromTask:r$},u0e=cc(Z5),X5=t$(De),s$=uh(Sn),e4=function(e){var t=qE(e);return function(n){return H(Zf(n),Fs(t(Ar)))}},c0e=function(e){return function(t){var n=e4(e)(t);return function(r){return yt(r)?n(r):s$}}},t4=function(e){return function(t){return function(n){return function(){return zl(n).reduce(function(r,i,o){return r.then(function(a){return Ze(a)?r:t(o+1,i)().then(function(s){if(Ze(s))return s;if(Tu(s)){var u=a.right;return u.push(s.right),Tu(a)?nt(e.concat(a.left,s.left),u):nt(s.left,u)}return a.right.push(s.right),a})})},t(0,jr(n))().then(PE($p)))}}}},l0e=function(e){return function(t){var n=t4(e)(t);return function(r){return yt(r)?n(r):s$}}},f0e={URI:tr,map:Fc},d0e={URI:tr,bimap:i$,mapLeft:o$},p0e=function(e,t){return X5(function(){return e},function(){return t})},A0e={URI:tr,map:Fc,bimap:i$,mapLeft:o$},h0e=function(e,t){return an(vy)(I5(e,t))};const m0e=Object.freeze(Object.defineProperty({__proto__:null,ApT:s$,Bifunctor:n0e,FromEither:m0,FromIO:J5,FromTask:Z5,FromThese:G5,Functor:Y5,Pointed:t0e,URI:tr,bifunctorTaskThese:d0e,bimap:V5,both:zye,flap:e0e,fold:K5,foldW:Jye,fromEither:B5,fromIO:h0,fromIOEither:Yye,fromIOK:s0e,fromOption:r0e,fromOptionK:i0e,fromPredicate:o0e,fromTask:r$,fromTaskK:u0e,fromThese:P5,fromTheseK:a0e,functorTaskThese:f0e,getApplicative:z5,getApply:a$,getChain:H5,getMonad:Xye,getSemigroup:h0e,left:Qye,leftIO:Hye,leftTask:j5,map:q5,mapLeft:Q5,match:D5,matchE:W5,matchEW:N5,matchW:Gye,of:uh,right:L5,rightIO:U5,rightTask:n$,swap:Zye,taskThese:A0e,toTuple:p0e,toTuple2:X5,traverseReadonlyArrayWithIndex:c0e,traverseReadonlyArrayWithIndexSeq:l0e,traverseReadonlyNonEmptyArrayWithIndex:e4,traverseReadonlyNonEmptyArrayWithIndexSeq:t4},Symbol.toStringTag,{value:"Module"}));function g0e(e,t){return function(n){return n(t(n(e.empty)))}}function v0e(e){return function(t){return[e(t),t]}}function y0e(e){return function(t){return function(n){return[t(n),e(n)]}}}function b0e(e){return function(t){return function(n){return t(e(n))}}}function C0e(e){function t(r,i){return function(o){return i(function(a){return r(e.concat(o,a))})}}function n(r){return r(e.empty)}return{URI:u$,_E:void 0,map:n4,extend:t,extract:n}}var n4=function(e,t){return C(e,r4(t))},r4=function(e){return function(t){return function(n){return e(t(n))}}},u$="Traced",c$={URI:u$,map:n4},S0e=Qe(c$),_0e=c$;const I0e=Object.freeze(Object.defineProperty({__proto__:null,Functor:c$,URI:u$,censor:b0e,flap:S0e,getComonad:C0e,listen:v0e,listens:y0e,map:r4,traced:_0e,tracks:g0e},Symbol.toStringTag,{value:"Module"}));function i4(e,t){return function(n){var r=e.traverse(n),i=t.traverse(n);return function(o){return function(a){return r(a,function(s){return i(s,o)})}}}}function o4(e,t){return function(n){var r=e.sequence(n),i=t.sequence(n);return function(o){return r(e.map(o,i))}}}function T0e(e,t){var n=Yl(e,t).map,r=zI(e,t),i=i4(e,t),o=o4(e,t);return{map:n,reduce:r.reduce,foldMap:r.foldMap,reduceRight:r.reduceRight,traverse:function(a){var s=i(a);return function(u,c){return C(u,s(c))}},sequence:function(a){var s=o(a);return function(u){return C(u,s)}}}}const x0e=Object.freeze(Object.defineProperty({__proto__:null,getTraversableComposition:T0e,sequence:o4,traverse:i4},Symbol.toStringTag,{value:"Module"})),w0e=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function a4(e,t){return t===void 0&&(t=[]),{value:e,forest:t}}function E0e(e){var t=function(n){return ss(n.forest)?"make(".concat(e.show(n.value),")"):"make(".concat(e.show(n.value),", [").concat(n.forest.map(t).join(", "),"])")};return{show:t}}function $0e(e){var t,n=ai(function(r,i){return e.equals(r.value,i.value)&&t.equals(r.forest,i.forest)});return t=m2(n),n}var s4=function(e,t){for(var n="",r=t.length,i,o=0;o<r;o++){i=t[o];var a=o===r-1;n+=e+(a?"└":"├")+"─ "+i.value,n+=s4(e+(r>1&&!a?"│ ":" "),i.forest)}return n};function u4(e){return s4(`
29
+ `,e)}function R0e(e){return e.value+u4(e.forest)}function c4(e,t){var n=t(e),r=n[0],i=n[1];return{value:r,forest:l4(i,t)}}function l4(e,t){return e.map(function(n){return c4(n,t)})}function f4(e){var t=d4(e);return function(n,r){return e.chain(r(n),function(i){var o=i[0],a=i[1];return e.map(t(a,r),function(s){return{value:o,forest:s}})})}}function d4(e){var t=Cv(e);return function(n,r){return C(n,t(function(i){return f4(e)(i,r)}))}}function O0e(e){var t=function(n){return e(n.value,n.forest.map(t))};return t}var Ks=function(e,t){return C(e,v0(t))},ld=function(e,t){return C(e,ch(function(n){return C(t,v0(n))}))},l$=function(e,t){return C(e,ch(t))},f$=function(e,t,n){return C(e,y0(t,n))},d$=function(e){var t=h4(e);return function(n,r){return C(n,t(r))}},p$=function(e,t,n){return C(e,A$(t,n))},p4=function(e,t){return C(e,g0(t))},A4=function(e){var t=m$(e);return function(n,r){return C(n,t(r))}},F0e=function(e){return function(t){return ld(t,e)}},ch=function(e){return function(t){var n=e(t.value),r=n.value,i=n.forest,o=cI().concat;return{value:r,forest:o(i,t.forest.map(ch(e)))}}},g0=function(e){return function(t){return{value:e(t),forest:t.forest.map(g0(e))}}},k0e=g0(N),M0e=ch(N),v0=function(e){return function(t){return{value:e(t.value),forest:t.forest.map(v0(e))}}},y0=function(e,t){return function(n){for(var r=t(e,n.value),i=n.forest.length,o=0;o<i;o++)r=C(n.forest[o],y0(r,t));return r}},h4=function(e){return function(t){return y0(e.empty,function(n,r){return e.concat(n,t(r))})}},A$=function(e,t){return function(n){for(var r=e,i=n.forest.length,o=i-1;o>=0;o--)r=C(n.forest[o],A$(r,t));return t(n.value,r)}},h$=function(e){return e.value},m$=function(e){var t=Cv(e),n=function(r){return function(i){return e.ap(e.map(r(i.value),function(o){return function(a){return{value:o,forest:a}}}),C(i.forest,t(n(r))))}};return n},g$=function(e){return m$(e)(N)},fd=function(e){return a4(e)},Ji="Tree",v$={URI:Ji,map:Ks},L0e=Qe(v$),j0e={URI:Ji,of:fd},b0={URI:Ji,map:Ks,ap:ld},U0e=Lt(b0),B0e=jt(b0),P0e={URI:Ji,map:Ks,ap:ld,of:fd},y$={URI:Ji,map:Ks,ap:ld,chain:l$},D0e={URI:Ji,map:Ks,ap:ld,of:fd,chain:l$},W0e=At(y$),K0e={URI:Ji,reduce:f$,foldMap:d$,reduceRight:p$},N0e={URI:Ji,map:Ks,reduce:f$,foldMap:d$,reduceRight:p$,traverse:A4,sequence:g$},q0e={URI:Ji,map:Ks,extend:p4,extract:h$},V0e=fd(on),Q0e=Bt(v$),z0e=Pt(y$),H0e=Ut(b0);function Y0e(e){var t=function(n,r){return e.equals(n,r.value)||r.forest.some(function(i){return t(n,i)})};return t}var m4=function(e){return function(t){return e(t.value)||t.forest.some(m4(e))}},G0e={URI:Ji,map:Ks,of:fd,ap:ld,chain:l$,reduce:f$,foldMap:d$,reduceRight:p$,traverse:A4,sequence:g$,extract:h$,extend:p4};const J0e=Object.freeze(Object.defineProperty({__proto__:null,Applicative:P0e,Apply:b0,Chain:y$,Comonad:q0e,Do:V0e,Foldable:K0e,Functor:v$,Monad:D0e,Pointed:j0e,Traversable:N0e,URI:Ji,ap:F0e,apFirst:U0e,apS:H0e,apSecond:B0e,bind:z0e,bindTo:Q0e,chain:ch,chainFirst:W0e,drawForest:u4,drawTree:R0e,duplicate:k0e,elem:Y0e,exists:m4,extend:g0,extract:h$,flap:L0e,flatten:M0e,fold:O0e,foldMap:h4,getEq:$0e,getShow:E0e,make:a4,map:v0,of:fd,reduce:y0,reduceRight:A$,sequence:g$,traverse:m$,tree:G0e,unfoldForest:l4,unfoldForestM:d4,unfoldTree:c4,unfoldTreeM:f4},Symbol.toStringTag,{value:"Module"}));var kr=rn,fr=Mn,Z0e=function(e){return[fr(e),kr(e)]};function b$(e){return{URI:Qr,_E:void 0,map:lh,ap:function(t,n){return[kr(t)(kr(n)),e.concat(fr(t),fr(n))]}}}var g4=function(e){return function(t){return[t,e.empty]}};function X0e(e){var t=b$(e);return{URI:Qr,_E:void 0,map:t.map,ap:t.ap,of:g4(e)}}function C$(e){var t=b$(e);return{URI:Qr,_E:void 0,map:t.map,ap:t.ap,chain:function(n,r){var i=r(kr(n)),o=i[0],a=i[1];return[o,e.concat(fr(n),a)]}}}function ebe(e){var t=C$(e);return{URI:Qr,_E:void 0,map:t.map,ap:t.ap,chain:t.chain,of:g4(e)}}function tbe(e){var t=function(r,i){for(var o=i(r),a=e.empty,s=kr(o);s._tag==="Left";)a=e.concat(a,fr(o)),o=i(s.left),s=kr(o);return[s.right,e.concat(a,fr(o))]},n=C$(e);return{URI:Qr,_E:void 0,map:n.map,ap:n.ap,chain:n.chain,chainRec:t}}var v4=function(e,t){return C(e,I4(t))},lh=function(e,t){return C(e,T$(t))},y4=function(e,t,n){return C(e,_4(t,n))},b4=function(e,t){return C(e,x$(t))},C4=function(e,t){return C(e,w$(t))},S$=function(e,t,n){return C(e,x4(t,n))},_$=function(e){var t=T4();return function(n,r){return C(n,t(r))}},I$=function(e,t,n){return C(e,w4(t,n))};function S4(e){var t=E4(e);return function(n,r){return C(n,t(r))}}var _4=function(e,t){return function(n){return[t(kr(n)),e(fr(n))]}},T$=function(e){return function(t){return[e(kr(t)),fr(t)]}},x$=function(e){return function(t){return[kr(t),e(fr(t))]}},I4=function(e){return function(t){return[kr(t),fr(e)]}},w$=function(e){return function(t){return[e(t),fr(t)]}},nbe=w$(N),E$=Zy,T4=zw,x4=Qw,w4=Hw,E4=function(e){return function(t){return function(n){return e.map(t(kr(n)),function(r){return[r,fr(n)]})}}},$$=function(e){return function(t){return e.map(kr(t),function(n){return[n,fr(t)]})}},Qr="Tuple",$4={URI:Qr,map:lh},rbe=Qe($4),ibe={URI:Qr,bimap:y4,mapLeft:b4},obe={URI:Qr,compose:v4},abe={URI:Qr,map:lh,extend:C4,extract:E$},sbe={URI:Qr,reduce:S$,foldMap:_$,reduceRight:I$},ube={URI:Qr,map:lh,reduce:S$,foldMap:_$,reduceRight:I$,traverse:S4,sequence:$$},cbe=T$,lbe=x$,fbe={URI:Qr,compose:v4,map:lh,bimap:y4,mapLeft:b4,extract:E$,extend:C4,reduce:S$,foldMap:_$,reduceRight:I$,traverse:S4,sequence:$$};const dbe=Object.freeze(Object.defineProperty({__proto__:null,Bifunctor:ibe,Comonad:abe,Foldable:sbe,Functor:$4,Semigroupoid:obe,Traversable:ube,URI:Qr,bimap:_4,compose:I4,duplicate:nbe,extend:w$,extract:E$,flap:rbe,foldMap:T4,fst:kr,getApplicative:X0e,getApply:b$,getChain:C$,getChainRec:tbe,getMonad:ebe,map:cbe,mapFst:T$,mapLeft:lbe,mapSnd:x$,reduce:x4,reduceRight:w4,sequence:$$,snd:fr,swap:Z0e,traverse:E4,tuple:fbe},Symbol.toStringTag,{value:"Module"})),pbe=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function Abe(e,t){var n=iL(t,Is(e));return{map:n.map,ap:n.ap,of:n.of,chain:function(r,i){return t.chain(r,function(o){return nn(o)?t.of(ea(o.left)):i(o.right)})},alt:function(r,i){return t.chain(r,function(o){return uS(o)?t.of(o):t.map(i(),function(a){return nn(a)?ea(e.concat(o.left,a.left)):a})})}}}const hbe=Object.freeze(Object.defineProperty({__proto__:null,getValidationM:Abe},Symbol.toStringTag,{value:"Module"}));var R4=pS(void 0),mbe={concat:R4.concat,empty:void 0};const gbe=Object.freeze(Object.defineProperty({__proto__:null,Monoid:mbe,Semigroup:R4},Symbol.toStringTag,{value:"Module"}));var vbe=function(e){return function(){return[void 0,e]}},ybe=function(e){return function(){var t=e(),n=t[0],r=t[1];return[[n,r],r]}},bbe=function(e){return function(){var t=e(),n=t[0],r=n[0],i=n[1],o=t[1];return[r,i(o)]}},Cbe=function(e){return function(t){return function(){var n=t(),r=n[0],i=n[1];return[[r,e(i)],i]}}},Sbe=function(e){return function(t){return function(){var n=t(),r=n[0],i=n[1];return[r,e(i)]}}},fh=function(e,t){return C(e,O4(t))},O4=function(e){return function(t){return function(){var n=t(),r=n[0],i=n[1];return[e(r),i]}}},kc="Writer",F4=function(e){return{URI:kc,_E:void 0,of:function(t){return function(){return[t,e.empty]}}}},R$=function(e){return{URI:kc,_E:void 0,map:fh,ap:function(t,n){return function(){var r=t(),i=r[0],o=r[1],a=n(),s=a[0],u=a[1];return[i(s),e.concat(o,u)]}}}},k4=function(e){var t=R$(e),n=F4(e);return{URI:kc,_E:void 0,map:fh,ap:t.ap,of:n.of}};function M4(e){var t=R$(e);return{URI:kc,_E:void 0,map:fh,ap:t.ap,chain:function(n,r){return function(){var i=n(),o=i[0],a=i[1],s=r(o)(),u=s[0],c=s[1];return[u,e.concat(a,c)]}}}}function _be(e){var t=k4(e),n=M4(e);return{URI:kc,_E:void 0,map:fh,ap:t.ap,of:t.of,chain:n.chain}}var O$={URI:kc,map:fh},Ibe=Qe(O$),Tbe=function(e){return e()[0]},xbe=function(e){return e()[1]},wbe=function(e){return e()[0]},Ebe=function(e){return e()[1]},$be=O$;const Rbe=Object.freeze(Object.defineProperty({__proto__:null,Functor:O$,URI:kc,censor:Sbe,evalWriter:wbe,evaluate:Tbe,execWriter:Ebe,execute:xbe,flap:Ibe,getApplicative:k4,getApply:R$,getChain:M4,getMonad:_be,getPointed:F4,listen:ybe,listens:Cbe,map:O4,pass:bbe,tell:vbe,writer:$be},Symbol.toStringTag,{value:"Module"}));function Obe(e){var t=function(n,r){return function(){return e.map(n(),function(i){var o=i[0],a=i[1];return[r(o),a]})}};return{map:t,evalWriter:function(n){return e.map(n(),function(r){var i=r[0];return i})},execWriter:function(n){return e.map(n(),function(r){r[0];var i=r[1];return i})},tell:function(n){return function(){return e.of([void 0,n])}},listen:function(n){return function(){return e.map(n(),function(r){var i=r[0],o=r[1];return[[i,o],o]})}},pass:function(n){return function(){return e.map(n(),function(r){var i=r[0],o=i[0],a=i[1],s=r[1];return[o,a(s)]})}},listens:function(n,r){return function(){return e.map(n(),function(i){var o=i[0],a=i[1];return[[o,r(a)],a]})}},censor:function(n,r){return function(){return e.map(n(),function(i){var o=i[0],a=i[1];return[o,r(a)]})}},getMonad:function(n){return{_E:void 0,map:t,of:function(r){return function(){return e.of([r,n.empty])}},ap:function(r,i){return function(){return e.chain(r(),function(o){var a=o[0],s=o[1];return e.map(i(),function(u){var c=u[0],l=u[1];return[a(c),n.concat(s,l)]})})}},chain:function(r,i){return function(){return e.chain(r(),function(o){var a=o[0],s=o[1];return e.map(i(a)(),function(u){var c=u[0],l=u[1];return[c,n.concat(s,l)]})})}}}}}}const Fbe=Object.freeze(Object.defineProperty({__proto__:null,getWriterM:Obe},Symbol.toStringTag,{value:"Module"})),kbe=Object.freeze(Object.defineProperty({__proto__:null,alt:Kz,alternative:qz,applicative:uH,apply:aH,array:nee,bifunctor:ree,boolean:fee,booleanAlgebra:mee,bounded:bee,boundedDistributiveLattice:_ee,boundedJoinSemilattice:Iee,boundedLattice:Tee,boundedMeetSemilattice:xee,category:wee,chain:cH,chainRec:Eee,choice:Oee,comonad:Fee,compactable:_te,console:Ete,const:Nte,contravariant:qte,date:Zte,distributiveLattice:Cee,either:ZB,eitherT:Dne,endomorphism:Kne,eq:SH,extend:Nne,field:Qne,filterable:Hne,filterableWithIndex:Yne,foldable:tre,foldableWithIndex:rre,fromEither:lH,fromIO:ire,fromReader:xre,fromState:Qre,fromTask:zre,fromThese:Hre,function:rL,functor:sH,functorWithIndex:Gre,group:Jre,heytingAlgebra:Zre,hkt:Xre,identity:Cie,invariant:Sie,io:Wie,ioEither:Woe,ioOption:Mae,ioRef:jae,joinSemilattice:Uae,json:Dae,lattice:Wae,magma:DH,map:Gse,meetSemilattice:Jse,monad:Zse,monadIO:Xse,monadTask:eue,monadThrow:tue,monoid:Aue,naturalTransformation:hue,nonEmptyArray:RG,number:UG,option:Cte,optionT:Noe,ord:jH,ordering:Sue,pipeable:Due,pointed:Wue,predicate:Uee,profunctor:Kue,random:Que,reader:Tre,readerEither:Kce,readerT:Vce,readerTask:Xle,readerTaskEither:xpe,readonlyArray:gZ,readonlyMap:Ase,readonlyNonEmptyArray:BY,readonlyRecord:gAe,readonlySet:MAe,readonlyTuple:YAe,record:Ghe,refinement:ome,ring:cme,semigroup:EL,semigroupoid:lme,semiring:dme,separated:NG,set:Mme,show:Dme,state:Vre,stateReaderTaskEither:eve,stateT:Kme,store:cve,string:Npe,strong:dve,struct:hve,task:gle,taskEither:cde,taskOption:mye,taskThese:m0e,these:Nye,theseT:Vye,traced:I0e,traversable:x0e,traversableWithIndex:w0e,tree:J0e,tuple:dbe,unfoldable:pbe,validationT:hbe,void:gbe,witherable:qG,writer:Rbe,writerT:Fbe,zero:VG},Symbol.toStringTag,{value:"Module"})),lt=Ku(kbe);var ln={},El={},hn={},Ge={};(function(e){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;var t=function(S){return function(){return{meet:function(y,T){return function(w){return S.meet(y(w),T(w))}},join:function(y,T){return function(w){return S.join(y(w),T(w))}},zero:function(){return S.zero},one:function(){return S.one},implies:function(y,T){return function(w){return S.implies(y(w),T(w))}},not:function(y){return function(T){return S.not(y(T))}}}}};e.getBooleanAlgebra=t;var n=function(S){return function(){return{concat:function(y,T){return function(w){return S.concat(y(w),T(w))}}}}};e.getSemigroup=n;var r=function(S){var y=(0,e.getSemigroup)(S);return function(){return{concat:y().concat,empty:function(){return S.empty}}}};e.getMonoid=r;var i=function(S){return{add:function(y,T){return function(w){return S.add(y(w),T(w))}},zero:function(){return S.zero},mul:function(y,T){return function(w){return S.mul(y(w),T(w))}},one:function(){return S.one}}};e.getSemiring=i;var o=function(S){var y=(0,e.getSemiring)(S);return{add:y.add,mul:y.mul,one:y.one,zero:y.zero,sub:function(T,w){return function(F){return S.sub(T(F),w(F))}}}};e.getRing=o;var a=function(S){return function(y){return y(S)}};e.apply=a;function s(S){return S}e.identity=s,e.unsafeCoerce=s;function u(S){return function(){return S}}e.constant=u,e.constTrue=u(!0),e.constFalse=u(!1),e.constNull=u(null),e.constUndefined=u(void 0),e.constVoid=e.constUndefined;function c(S){return function(y,T){return S(T,y)}}e.flip=c;function l(S,y,T,w,F,k,$,P,K){switch(arguments.length){case 1:return S;case 2:return function(){return y(S.apply(this,arguments))};case 3:return function(){return T(y(S.apply(this,arguments)))};case 4:return function(){return w(T(y(S.apply(this,arguments))))};case 5:return function(){return F(w(T(y(S.apply(this,arguments)))))};case 6:return function(){return k(F(w(T(y(S.apply(this,arguments))))))};case 7:return function(){return $(k(F(w(T(y(S.apply(this,arguments)))))))};case 8:return function(){return P($(k(F(w(T(y(S.apply(this,arguments))))))))};case 9:return function(){return K(P($(k(F(w(T(y(S.apply(this,arguments)))))))))}}}e.flow=l;function d(){for(var S=[],y=0;y<arguments.length;y++)S[y]=arguments[y];return S}e.tuple=d;function p(S){return S+1}e.increment=p;function A(S){return S-1}e.decrement=A;function m(S){throw new Error("Called `absurd` function which should be uncallable")}e.absurd=m;function g(S){return function(y){return S.apply(void 0,y)}}e.tupled=g;function _(S){return function(){for(var y=[],T=0;T<arguments.length;T++)y[T]=arguments[T];return S(y)}}e.untupled=_;function b(S,y,T,w,F,k,$,P,K){switch(arguments.length){case 1:return S;case 2:return y(S);case 3:return T(y(S));case 4:return w(T(y(S)));case 5:return F(w(T(y(S))));case 6:return k(F(w(T(y(S)))));case 7:return $(k(F(w(T(y(S))))));case 8:return P($(k(F(w(T(y(S)))))));case 9:return K(P($(k(F(w(T(y(S))))))));default:{for(var Y=arguments[0],ee=1;ee<arguments.length;ee++)Y=arguments[ee](Y);return Y}}}e.pipe=b,e.hole=m;var I=function(S,y){return y};e.SK=I;function x(S){return function(y){return!S(y)}}e.not=x;var v=function(){return{concat:function(S,y){return l(S,y)},empty:s}};e.getEndomorphismMonoid=v})(Ge);var Le={},Mbe=he&&he.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))};Object.defineProperty(Le,"__esModule",{value:!0});Le.fromReadonlyNonEmptyArray=Le.has=Le.emptyRecord=Le.emptyReadonlyArray=Le.tail=Le.head=Le.isNonEmpty=Le.singleton=Le.right=Le.left=Le.isRight=Le.isLeft=Le.some=Le.none=Le.isSome=Le.isNone=void 0;var Lbe=function(e){return e._tag==="None"};Le.isNone=Lbe;var jbe=function(e){return e._tag==="Some"};Le.isSome=jbe;Le.none={_tag:"None"};var Ube=function(e){return{_tag:"Some",value:e}};Le.some=Ube;var Bbe=function(e){return e._tag==="Left"};Le.isLeft=Bbe;var Pbe=function(e){return e._tag==="Right"};Le.isRight=Pbe;var Dbe=function(e){return{_tag:"Left",left:e}};Le.left=Dbe;var Wbe=function(e){return{_tag:"Right",right:e}};Le.right=Wbe;var Kbe=function(e){return[e]};Le.singleton=Kbe;var Nbe=function(e){return e.length>0};Le.isNonEmpty=Nbe;var qbe=function(e){return e[0]};Le.head=qbe;var Vbe=function(e){return e.slice(1)};Le.tail=Vbe;Le.emptyReadonlyArray=[];Le.emptyRecord={};Le.has=Object.prototype.hasOwnProperty;var Qbe=function(e){return Mbe([e[0]],e.slice(1),!0)};Le.fromReadonlyNonEmptyArray=Qbe;var zbe=he&&he.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(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){r===void 0&&(r=n),e[r]=t[n]}),Hbe=he&&he.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Ybe=he&&he.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&zbe(t,e,n);return Hbe(t,e),t};Object.defineProperty(hn,"__esModule",{value:!0});hn.sequenceS=hn.sequenceT=hn.getApplySemigroup=hn.apS=hn.apSecond=hn.apFirst=hn.ap=void 0;var Gbe=Ge,Jbe=Ybe(Le);function Zbe(e,t){return function(n){return function(r){return e.ap(e.map(r,function(i){return function(o){return t.ap(i,o)}}),n)}}}hn.ap=Zbe;function Xbe(e){return function(t){return function(n){return e.ap(e.map(n,function(r){return function(){return r}}),t)}}}hn.apFirst=Xbe;function e1e(e){return function(t){return function(n){return e.ap(e.map(n,function(){return function(r){return r}}),t)}}}hn.apSecond=e1e;function t1e(e){return function(t,n){return function(r){return e.ap(e.map(r,function(i){return function(o){var a;return Object.assign({},i,(a={},a[t]=o,a))}}),n)}}}hn.apS=t1e;function n1e(e){return function(t){return{concat:function(n,r){return e.ap(e.map(n,function(i){return function(o){return t.concat(i,o)}}),r)}}}}hn.getApplySemigroup=n1e;function F$(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,t===0?e.apply(null,i):F$(e,t-1,i)}}var Ab={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]}}}}}};function r1e(e){return Jbe.has.call(Ab,e)||(Ab[e]=F$(Gbe.tuple,e-1,[])),Ab[e]}function i1e(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r=t.length,i=r1e(r),o=e.map(t[0],i),a=1;a<r;a++)o=e.ap(o,t[a]);return o}}hn.sequenceT=i1e;function o1e(e){var t=e.length;switch(t){case 1:return function(n){var r;return r={},r[e[0]]=n,r};case 2:return function(n){return function(r){var i;return i={},i[e[0]]=n,i[e[1]]=r,i}};case 3:return function(n){return function(r){return function(i){var o;return o={},o[e[0]]=n,o[e[1]]=r,o[e[2]]=i,o}}};case 4:return function(n){return function(r){return function(i){return function(o){var a;return a={},a[e[0]]=n,a[e[1]]=r,a[e[2]]=i,a[e[3]]=o,a}}}};case 5:return function(n){return function(r){return function(i){return function(o){return function(a){var s;return s={},s[e[0]]=n,s[e[1]]=r,s[e[2]]=i,s[e[3]]=o,s[e[4]]=a,s}}}}};default:return F$(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,[])}}function a1e(e){return function(t){for(var n=Object.keys(t),r=n.length,i=o1e(n),o=e.map(t[n[0]],i),a=1;a<r;a++)o=e.ap(o,t[n[a]]);return o}}hn.sequenceS=a1e;var ei={};Object.defineProperty(ei,"__esModule",{value:!0});ei.getFunctorComposition=ei.bindTo=ei.flap=ei.map=void 0;var s1e=Ge;function L4(e,t){return function(n){return function(r){return e.map(r,function(i){return t.map(i,n)})}}}ei.map=L4;function u1e(e){return function(t){return function(n){return e.map(n,function(r){return r(t)})}}}ei.flap=u1e;function c1e(e){return function(t){return function(n){return e.map(n,function(r){var i;return i={},i[t]=r,i})}}}ei.bindTo=c1e;function l1e(e,t){var n=L4(e,t);return{map:function(r,i){return(0,s1e.pipe)(r,n(i))}}}ei.getFunctorComposition=l1e;Object.defineProperty(El,"__esModule",{value:!0});El.getApplicativeComposition=El.getApplicativeMonoid=void 0;var j4=hn,f1e=Ge,d1e=ei;function p1e(e){var t=(0,j4.getApplySemigroup)(e);return function(n){return{concat:t(n).concat,empty:e.of(n.empty)}}}El.getApplicativeMonoid=p1e;function A1e(e,t){var n=(0,d1e.getFunctorComposition)(e,t).map,r=(0,j4.ap)(e,t);return{map:n,of:function(i){return e.of(t.of(i))},ap:function(i,o){return(0,f1e.pipe)(i,r(o))}}}El.getApplicativeComposition=A1e;var xu={};Object.defineProperty(xu,"__esModule",{value:!0});xu.bind=xu.chainFirst=void 0;function h1e(e){return function(t){return function(n){return e.chain(n,function(r){return e.map(t(r),function(){return r})})}}}xu.chainFirst=h1e;function m1e(e){return function(t,n){return function(r){return e.chain(r,function(i){return e.map(n(i),function(o){var a;return Object.assign({},i,(a={},a[t]=o,a))})})}}}xu.bind=m1e;var C0={};Object.defineProperty(C0,"__esModule",{value:!0});C0.tailRec=void 0;var g1e=function(e,t){for(var n=t(e);n._tag==="Left";)n=t(n.left);return n.right};C0.tailRec=g1e;var Xt={},v1e=he&&he.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(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){r===void 0&&(r=n),e[r]=t[n]}),y1e=he&&he.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),b1e=he&&he.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&v1e(t,e,n);return y1e(t,e),t};Object.defineProperty(Xt,"__esModule",{value:!0});Xt.filterOrElse=Xt.chainFirstEitherK=Xt.chainEitherK=Xt.fromEitherK=Xt.chainOptionK=Xt.fromOptionK=Xt.fromPredicate=Xt.fromOption=void 0;var C1e=xu,k$=Ge,fu=b1e(Le);function U4(e){return function(t){return function(n){return e.fromEither(fu.isNone(n)?fu.left(t()):fu.right(n.value))}}}Xt.fromOption=U4;function S1e(e){return function(t,n){return function(r){return e.fromEither(t(r)?fu.right(r):fu.left(n(r)))}}}Xt.fromPredicate=S1e;function B4(e){var t=U4(e);return function(n){var r=t(n);return function(i){return(0,k$.flow)(i,r)}}}Xt.fromOptionK=B4;function _1e(e,t){var n=B4(e);return function(r){var i=n(r);return function(o){return function(a){return t.chain(a,i(o))}}}}Xt.chainOptionK=_1e;function M$(e){return function(t){return(0,k$.flow)(t,e.fromEither)}}Xt.fromEitherK=M$;function I1e(e,t){var n=M$(e);return function(r){return function(i){return t.chain(i,n(r))}}}Xt.chainEitherK=I1e;function T1e(e,t){return(0,k$.flow)(M$(e),(0,C1e.chainFirst)(t))}Xt.chainFirstEitherK=T1e;function x1e(e,t){return function(n,r){return function(i){return t.chain(i,function(o){return e.fromEither(n(o)?fu.right(o):fu.left(r(o)))})}}}Xt.filterOrElse=x1e;var P4={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.right=e.left=e.flap=e.Functor=e.Bifunctor=e.URI=e.bimap=e.mapLeft=e.map=e.separated=void 0;var t=Ge,n=ei,r=function(p,A){return{left:p,right:A}};e.separated=r;var i=function(p,A){return(0,t.pipe)(p,(0,e.map)(A))},o=function(p,A){return(0,t.pipe)(p,(0,e.mapLeft)(A))},a=function(p,A,m){return(0,t.pipe)(p,(0,e.bimap)(A,m))},s=function(p){return function(A){return(0,e.separated)((0,e.left)(A),p((0,e.right)(A)))}};e.map=s;var u=function(p){return function(A){return(0,e.separated)(p((0,e.left)(A)),(0,e.right)(A))}};e.mapLeft=u;var c=function(p,A){return function(m){return(0,e.separated)(p((0,e.left)(m)),A((0,e.right)(m)))}};e.bimap=c,e.URI="Separated",e.Bifunctor={URI:e.URI,mapLeft:o,bimap:a},e.Functor={URI:e.URI,map:i},e.flap=(0,n.flap)(e.Functor);var l=function(p){return p.left};e.left=l;var d=function(p){return p.right};e.right=d})(P4);var ns={},w1e=he&&he.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(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){r===void 0&&(r=n),e[r]=t[n]}),E1e=he&&he.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),$1e=he&&he.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&w1e(t,e,n);return E1e(t,e),t};Object.defineProperty(ns,"__esModule",{value:!0});ns.filterE=ns.witherDefault=ns.wiltDefault=void 0;var NO=$1e(Le);function R1e(e,t){return function(n){var r=e.traverse(n);return function(i,o){return n.map(r(i,o),t.separate)}}}ns.wiltDefault=R1e;function O1e(e,t){return function(n){var r=e.traverse(n);return function(i,o){return n.map(r(i,o),t.compact)}}}ns.witherDefault=O1e;function F1e(e){return function(t){var n=e.wither(t);return function(r){return function(i){return n(i,function(o){return t.map(r(o),function(a){return a?NO.some(o):NO.none})})}}}}ns.filterE=F1e;(function(e){var t=he&&he.__createBinding||(Object.create?function(U,j,W,Me){Me===void 0&&(Me=W);var B=Object.getOwnPropertyDescriptor(j,W);(!B||("get"in B?!j.__esModule:B.writable||B.configurable))&&(B={enumerable:!0,get:function(){return j[W]}}),Object.defineProperty(U,Me,B)}:function(U,j,W,Me){Me===void 0&&(Me=W),U[Me]=j[W]}),n=he&&he.__setModuleDefault||(Object.create?function(U,j){Object.defineProperty(U,"default",{enumerable:!0,value:j})}:function(U,j){U.default=j}),r=he&&he.__importStar||function(U){if(U&&U.__esModule)return U;var j={};if(U!=null)for(var W in U)W!=="default"&&Object.prototype.hasOwnProperty.call(U,W)&&t(j,U,W);return n(j,U),j};Object.defineProperty(e,"__esModule",{value:!0}),e.fold=e.match=e.foldW=e.matchW=e.isRight=e.isLeft=e.fromOption=e.fromPredicate=e.FromEither=e.MonadThrow=e.throwError=e.ChainRec=e.Extend=e.extend=e.Alt=e.alt=e.altW=e.Bifunctor=e.mapLeft=e.bimap=e.Traversable=e.sequence=e.traverse=e.Foldable=e.reduceRight=e.foldMap=e.reduce=e.Monad=e.Chain=e.chain=e.chainW=e.Applicative=e.Apply=e.ap=e.apW=e.Pointed=e.of=e.Functor=e.map=e.getAltValidation=e.getApplicativeValidation=e.getWitherable=e.getFilterable=e.getCompactable=e.getSemigroup=e.getEq=e.getShow=e.URI=e.right=e.left=void 0,e.getValidation=e.getValidationMonoid=e.getValidationSemigroup=e.getApplyMonoid=e.getApplySemigroup=e.either=e.stringifyJSON=e.parseJSON=e.sequenceArray=e.traverseArray=e.traverseArrayWithIndex=e.traverseReadonlyArrayWithIndex=e.traverseReadonlyNonEmptyArrayWithIndex=e.ApT=e.apSW=e.apS=e.bindW=e.bind=e.bindTo=e.Do=e.exists=e.elem=e.toError=e.toUnion=e.chainNullableK=e.fromNullableK=e.tryCatchK=e.tryCatch=e.fromNullable=e.orElse=e.orElseW=e.swap=e.filterOrElseW=e.filterOrElse=e.chainOptionK=e.fromOptionK=e.duplicate=e.flatten=e.flattenW=e.chainFirstW=e.chainFirst=e.apSecondW=e.apSecond=e.apFirstW=e.apFirst=e.flap=e.getOrElse=e.getOrElseW=void 0;var i=El,o=hn,a=xu,s=C0,u=Xt,c=Ge,l=ei,d=r(Le),p=P4,A=ns;e.left=d.left,e.right=d.right;var m=function(U,j){return(0,c.pipe)(U,(0,e.map)(j))},g=function(U,j){return(0,c.pipe)(U,(0,e.ap)(j))},_=function(U,j){return(0,c.pipe)(U,(0,e.chain)(j))},b=function(U,j,W){return(0,c.pipe)(U,(0,e.reduce)(j,W))},I=function(U){return function(j,W){var Me=(0,e.foldMap)(U);return(0,c.pipe)(j,Me(W))}},x=function(U,j,W){return(0,c.pipe)(U,(0,e.reduceRight)(j,W))},v=function(U){var j=(0,e.traverse)(U);return function(W,Me){return(0,c.pipe)(W,j(Me))}},S=function(U,j,W){return(0,c.pipe)(U,(0,e.bimap)(j,W))},y=function(U,j){return(0,c.pipe)(U,(0,e.mapLeft)(j))},T=function(U,j){return(0,c.pipe)(U,(0,e.alt)(j))},w=function(U,j){return(0,c.pipe)(U,(0,e.extend)(j))},F=function(U,j){return(0,s.tailRec)(j(U),function(W){return(0,e.isLeft)(W)?(0,e.right)((0,e.left)(W.left)):(0,e.isLeft)(W.right)?(0,e.left)(j(W.right.left)):(0,e.right)((0,e.right)(W.right.right))})};e.URI="Either";var k=function(U,j){return{show:function(W){return(0,e.isLeft)(W)?"left(".concat(U.show(W.left),")"):"right(".concat(j.show(W.right),")")}}};e.getShow=k;var $=function(U,j){return{equals:function(W,Me){return W===Me||((0,e.isLeft)(W)?(0,e.isLeft)(Me)&&U.equals(W.left,Me.left):(0,e.isRight)(Me)&&j.equals(W.right,Me.right))}}};e.getEq=$;var P=function(U){return{concat:function(j,W){return(0,e.isLeft)(W)?j:(0,e.isLeft)(j)?W:(0,e.right)(U.concat(j.right,W.right))}}};e.getSemigroup=P;var K=function(U){var j=(0,e.left)(U.empty);return{URI:e.URI,_E:void 0,compact:function(W){return(0,e.isLeft)(W)?W:W.right._tag==="None"?j:(0,e.right)(W.right.value)},separate:function(W){return(0,e.isLeft)(W)?(0,p.separated)(W,W):(0,e.isLeft)(W.right)?(0,p.separated)((0,e.right)(W.right.left),j):(0,p.separated)(j,(0,e.right)(W.right.right))}}};e.getCompactable=K;var Y=function(U){var j=(0,e.left)(U.empty),W=(0,e.getCompactable)(U),Me=W.compact,B=W.separate,ie=function(Ae,Ee){return(0,e.isLeft)(Ae)||Ee(Ae.right)?Ae:j},ge=function(Ae,Ee){return(0,e.isLeft)(Ae)?(0,p.separated)(Ae,Ae):Ee(Ae.right)?(0,p.separated)(j,(0,e.right)(Ae.right)):(0,p.separated)((0,e.right)(Ae.right),j)};return{URI:e.URI,_E:void 0,map:m,compact:Me,separate:B,filter:ie,filterMap:function(Ae,Ee){if((0,e.isLeft)(Ae))return Ae;var ut=Ee(Ae.right);return ut._tag==="None"?j:(0,e.right)(ut.value)},partition:ge,partitionMap:function(Ae,Ee){if((0,e.isLeft)(Ae))return(0,p.separated)(Ae,Ae);var ut=Ee(Ae.right);return(0,e.isLeft)(ut)?(0,p.separated)((0,e.right)(ut.left),j):(0,p.separated)(j,(0,e.right)(ut.right))}}};e.getFilterable=Y;var ee=function(U){var j=(0,e.getFilterable)(U),W=(0,e.getCompactable)(U);return{URI:e.URI,_E:void 0,map:m,compact:j.compact,separate:j.separate,filter:j.filter,filterMap:j.filterMap,partition:j.partition,partitionMap:j.partitionMap,traverse:v,sequence:e.sequence,reduce:b,foldMap:I,reduceRight:x,wither:(0,A.witherDefault)(e.Traversable,W),wilt:(0,A.wiltDefault)(e.Traversable,W)}};e.getWitherable=ee;var re=function(U){return{URI:e.URI,_E:void 0,map:m,ap:function(j,W){return(0,e.isLeft)(j)?(0,e.isLeft)(W)?(0,e.left)(U.concat(j.left,W.left)):j:(0,e.isLeft)(W)?W:(0,e.right)(j.right(W.right))},of:e.of}};e.getApplicativeValidation=re;var D=function(U){return{URI:e.URI,_E:void 0,map:m,alt:function(j,W){if((0,e.isRight)(j))return j;var Me=W();return(0,e.isLeft)(Me)?(0,e.left)(U.concat(j.left,Me.left)):Me}}};e.getAltValidation=D;var G=function(U){return function(j){return(0,e.isLeft)(j)?j:(0,e.right)(U(j.right))}};e.map=G,e.Functor={URI:e.URI,map:m},e.of=e.right,e.Pointed={URI:e.URI,of:e.of};var M=function(U){return function(j){return(0,e.isLeft)(j)?j:(0,e.isLeft)(U)?U:(0,e.right)(j.right(U.right))}};e.apW=M,e.ap=e.apW,e.Apply={URI:e.URI,map:m,ap:g},e.Applicative={URI:e.URI,map:m,ap:g,of:e.of};var O=function(U){return function(j){return(0,e.isLeft)(j)?j:U(j.right)}};e.chainW=O,e.chain=e.chainW,e.Chain={URI:e.URI,map:m,ap:g,chain:_},e.Monad={URI:e.URI,map:m,ap:g,of:e.of,chain:_};var q=function(U,j){return function(W){return(0,e.isLeft)(W)?U:j(U,W.right)}};e.reduce=q;var ue=function(U){return function(j){return function(W){return(0,e.isLeft)(W)?U.empty:j(W.right)}}};e.foldMap=ue;var ke=function(U,j){return function(W){return(0,e.isLeft)(W)?U:j(W.right,U)}};e.reduceRight=ke,e.Foldable={URI:e.URI,reduce:b,foldMap:I,reduceRight:x};var Ie=function(U){return function(j){return function(W){return(0,e.isLeft)(W)?U.of((0,e.left)(W.left)):U.map(j(W.right),e.right)}}};e.traverse=Ie;var rt=function(U){return function(j){return(0,e.isLeft)(j)?U.of((0,e.left)(j.left)):U.map(j.right,e.right)}};e.sequence=rt,e.Traversable={URI:e.URI,map:m,reduce:b,foldMap:I,reduceRight:x,traverse:v,sequence:e.sequence};var at=function(U,j){return function(W){return(0,e.isLeft)(W)?(0,e.left)(U(W.left)):(0,e.right)(j(W.right))}};e.bimap=at;var fn=function(U){return function(j){return(0,e.isLeft)(j)?(0,e.left)(U(j.left)):j}};e.mapLeft=fn,e.Bifunctor={URI:e.URI,bimap:S,mapLeft:y};var Zt=function(U){return function(j){return(0,e.isLeft)(j)?U():j}};e.altW=Zt,e.alt=e.altW,e.Alt={URI:e.URI,map:m,alt:T};var rr=function(U){return function(j){return(0,e.isLeft)(j)?j:(0,e.right)(U(j))}};e.extend=rr,e.Extend={URI:e.URI,map:m,extend:w},e.ChainRec={URI:e.URI,map:m,ap:g,chain:_,chainRec:F},e.throwError=e.left,e.MonadThrow={URI:e.URI,map:m,ap:g,of:e.of,chain:_,throwError:e.throwError},e.FromEither={URI:e.URI,fromEither:c.identity},e.fromPredicate=(0,u.fromPredicate)(e.FromEither),e.fromOption=(0,u.fromOption)(e.FromEither),e.isLeft=d.isLeft,e.isRight=d.isRight;var dn=function(U,j){return function(W){return(0,e.isLeft)(W)?U(W.left):j(W.right)}};e.matchW=dn,e.foldW=e.matchW,e.match=e.matchW,e.fold=e.match;var Hr=function(U){return function(j){return(0,e.isLeft)(j)?U(j.left):j.right}};e.getOrElseW=Hr,e.getOrElse=e.getOrElseW,e.flap=(0,l.flap)(e.Functor),e.apFirst=(0,o.apFirst)(e.Apply),e.apFirstW=e.apFirst,e.apSecond=(0,o.apSecond)(e.Apply),e.apSecondW=e.apSecond,e.chainFirst=(0,a.chainFirst)(e.Chain),e.chainFirstW=e.chainFirst,e.flattenW=(0,e.chainW)(c.identity),e.flatten=e.flattenW,e.duplicate=(0,e.extend)(c.identity),e.fromOptionK=(0,u.fromOptionK)(e.FromEither),e.chainOptionK=(0,u.chainOptionK)(e.FromEither,e.Chain),e.filterOrElse=(0,u.filterOrElse)(e.FromEither,e.Chain),e.filterOrElseW=e.filterOrElse;var Yr=function(U){return(0,e.isLeft)(U)?(0,e.right)(U.left):(0,e.left)(U.right)};e.swap=Yr;var Ne=function(U){return function(j){return(0,e.isLeft)(j)?U(j.left):j}};e.orElseW=Ne,e.orElse=e.orElseW;var dt=function(U){return function(j){return j==null?(0,e.left)(U):(0,e.right)(j)}};e.fromNullable=dt;var St=function(U,j){try{return(0,e.right)(U())}catch(W){return(0,e.left)(j(W))}};e.tryCatch=St;var st=function(U,j){return function(){for(var W=[],Me=0;Me<arguments.length;Me++)W[Me]=arguments[Me];return(0,e.tryCatch)(function(){return U.apply(void 0,W)},j)}};e.tryCatchK=st;var Wt=function(U){var j=(0,e.fromNullable)(U);return function(W){return(0,c.flow)(W,j)}};e.fromNullableK=Wt;var gi=function(U){var j=(0,e.fromNullableK)(U);return function(W){return(0,e.chain)(j(W))}};e.chainNullableK=gi,e.toUnion=(0,e.foldW)(c.identity,c.identity);function _r(U){return U instanceof Error?U:new Error(String(U))}e.toError=_r;function ir(U){return function(j,W){if(W===void 0){var Me=ir(U);return function(B){return Me(j,B)}}return(0,e.isLeft)(W)?!1:U.equals(j,W.right)}}e.elem=ir;var Gr=function(U){return function(j){return(0,e.isLeft)(j)?!1:U(j.right)}};e.exists=Gr,e.Do=(0,e.of)(d.emptyRecord),e.bindTo=(0,l.bindTo)(e.Functor),e.bind=(0,a.bind)(e.Chain),e.bindW=e.bind,e.apS=(0,o.apS)(e.Apply),e.apSW=e.apS,e.ApT=(0,e.of)(d.emptyReadonlyArray);var vi=function(U){return function(j){var W=U(0,d.head(j));if((0,e.isLeft)(W))return W;for(var Me=[W.right],B=1;B<j.length;B++){var ie=U(B,j[B]);if((0,e.isLeft)(ie))return ie;Me.push(ie.right)}return(0,e.right)(Me)}};e.traverseReadonlyNonEmptyArrayWithIndex=vi;var yi=function(U){var j=(0,e.traverseReadonlyNonEmptyArrayWithIndex)(U);return function(W){return d.isNonEmpty(W)?j(W):e.ApT}};e.traverseReadonlyArrayWithIndex=yi,e.traverseArrayWithIndex=e.traverseReadonlyArrayWithIndex;var jo=function(U){return(0,e.traverseReadonlyArrayWithIndex)(function(j,W){return U(W)})};e.traverseArray=jo,e.sequenceArray=(0,e.traverseArray)(c.identity);function Uo(U,j){return(0,e.tryCatch)(function(){return JSON.parse(U)},j)}e.parseJSON=Uo;var Bo=function(U,j){return(0,e.tryCatch)(function(){var W=JSON.stringify(U);if(typeof W!="string")throw new Error("Converting unsupported structure to JSON");return W},j)};e.stringifyJSON=Bo,e.either={URI:e.URI,map:m,of:e.of,ap:g,chain:_,reduce:b,foldMap:I,reduceRight:x,traverse:v,sequence:e.sequence,bimap:S,mapLeft:y,alt:T,extend:w,chainRec:F,throwError:e.throwError},e.getApplySemigroup=(0,o.getApplySemigroup)(e.Apply),e.getApplyMonoid=(0,i.getApplicativeMonoid)(e.Applicative);var Jr=function(U,j){return(0,o.getApplySemigroup)((0,e.getApplicativeValidation)(U))(j)};e.getValidationSemigroup=Jr;var Qa=function(U,j){return(0,i.getApplicativeMonoid)((0,e.getApplicativeValidation)(U))(j)};e.getValidationMonoid=Qa;function Vc(U){var j=(0,e.getApplicativeValidation)(U).ap,W=(0,e.getAltValidation)(U).alt;return{URI:e.URI,_E:void 0,map:m,of:e.of,chain:_,bimap:S,mapLeft:y,reduce:b,foldMap:I,reduceRight:x,extend:w,traverse:v,sequence:e.sequence,chainRec:F,throwError:e.throwError,ap:j,alt:W}}e.getValidation=Vc})(ln);var et=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),$l=function(){return $l=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},$l.apply(this,arguments)},k1e=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},ko=wt,tt=function(e,t,n){return ko([{value:e,context:t,message:n}])},Re=Ye,_e=function(){function e(t,n,r,i){this.name=t,this.is=n,this.validate=r,this.encode=i,this.decode=this.decode.bind(this)}return e.prototype.pipe=function(t,n){var r=this;return n===void 0&&(n="pipe(".concat(this.name,", ").concat(t.name,")")),new e(n,t.is,function(i,o){var a=r.validate(i,o);return se(a)?a:t.validate(a.right,o)},this.encode===We&&t.encode===We?We:function(i){return r.encode(t.encode(i))})},e.prototype.asDecoder=function(){return this},e.prototype.asEncoder=function(){return this},e.prototype.decode=function(t){return this.validate(t,[{key:"",type:this,actual:t}])},e}(),We=function(e){return e};function D4(e){return e.displayName||e.name||"<function".concat(e.length,">")}function M1e(e,t){return{key:e,type:t}}function Mi(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 ra(e,t){for(var n=t.length,r=0;r<n;r++)e.push(t[r])}var wu=Object.prototype.hasOwnProperty;function q1(e){return Object.keys(e).map(function(t){return"".concat(t,": ").concat(e[t].name)}).join(", ")}function tp(e){for(var t=0;t<e.length;t++)if(e[t].encode!==We)return!1;return!0}function W4(e){return"{ ".concat(q1(e)," }")}function K4(e){return"Partial<".concat(e,">")}function L1e(e,t,n,r){r===void 0&&(r="{ [K in ".concat(t.name,"]: ").concat(n.name," }"));var i=e.length;return new B$(r,function(o){return zn.is(o)&&e.every(function(a){return n.is(o[a])})},function(o,a){var s=zn.validate(o,a);if(se(s))return s;for(var u=s.right,c={},l=[],d=!1,p=0;p<i;p++){var A=e[p],m=u[A],g=n.validate(m,Mi(a,A,n,m));if(se(g))ra(l,g.left);else{var _=g.right;d=d||_!==m,c[A]=_}}return l.length>0?ko(l):Re(d||Object.keys(u).length!==i?c:u)},n.encode===We?We:function(o){for(var a={},s=0;s<i;s++){var u=e[s];a[u]=n.encode(o[u])}return a},t,n)}function L$(e){var t;if(V4(e)){var n=e.value;if(Zi.is(n))return t={},t[n]=null,t}else{if(W1e(e))return e.keys;if(z4(e)){var r=e.types.map(function(i){return L$(i)});return r.some(Im.is)?void 0:Object.assign.apply(Object,k1e([{}],r,!1))}}}function j1e(e,t,n){return n===void 0&&(n="{ [K in ".concat(e.name,"]: ").concat(t.name," }")),new B$(n,function(r){return zn.is(r)?Object.keys(r).every(function(i){return e.is(i)&&t.is(r[i])}):VO(t)&&Array.isArray(r)},function(r,i){if(zn.is(r)){for(var o={},a=[],s=Object.keys(r),u=s.length,c=!1,l=0;l<u;l++){var d=s[l],p=r[d],A=e.validate(d,Mi(i,d,e,d));if(se(A))ra(a,A.left);else{var m=A.right;c=c||m!==d,d=m;var g=t.validate(p,Mi(i,d,t,p));if(se(g))ra(a,g.left);else{var _=g.right;c=c||_!==p,o[d]=_}}}return a.length>0?ko(a):Re(c?o:r)}return VO(t)&&Array.isArray(r)?Re(r):tt(r,i)},e.encode===We&&t.encode===We?We:function(r){for(var i={},o=Object.keys(r),a=o.length,s=0;s<a;s++){var u=o[s];i[String(e.encode(u))]=t.encode(r[u])}return i},e,t)}function N4(e){return"("+e.map(function(t){return t.name}).join(" | ")+")"}function V1(e,t){for(var n=!0,r=!0,i=!zn.is(e),o=0,a=t;o<a.length;o++){var s=a[o];s!==e&&(n=!1),zn.is(s)&&(r=!1)}if(n)return e;if(r)return t[t.length-1];for(var u={},c=0,l=t;c<l.length;c++){var s=l[c];for(var d in s)(!wu.call(u,d)||i||s[d]!==e[d])&&(u[d]=s[d])}return u}function Q1(e){switch(e._tag){case"RefinementType":case"ReadonlyType":return Q1(e.type);case"InterfaceType":case"StrictType":case"PartialType":return e.props;case"IntersectionType":return e.types.reduce(function(t,n){return Object.assign(t,Q1(n))},{})}}function qO(e,t){for(var n=Object.getOwnPropertyNames(e),r=!1,i={},o=0;o<n.length;o++){var a=n[o];wu.call(t,a)?i[a]=e[a]:r=!0}return r?i:e}function U1e(e){return Q4(e)?"{| ".concat(q1(e.props)," |}"):K1e(e)?K4("{| ".concat(q1(e.props)," |}")):"Exact<".concat(e.name,">")}function B1e(e){return e.length>0}var ar={};function q4(e,t){for(var n=[],r=0,i=e;r<i.length;r++){var o=i[r];t.indexOf(o)!==-1&&n.push(o)}return n}function P1e(e,t){if(e===ar)return t;if(t===ar)return e;var n=Object.assign({},e);for(var r in t)if(wu.call(e,r)){var i=q4(e[r],t[r]);if(B1e(i))n[r]=i;else{n=ar;break}}else n[r]=t[r];return n}function D1e(e,t){if(e===ar||t===ar)return ar;var n=ar;for(var r in e)if(wu.call(t,r)){var i=q4(e[r],t[r]);i.length===0&&(n===ar&&(n={}),n[r]=e[r].concat(t[r]))}return n}function VO(e){return e._tag==="AnyType"}function V4(e){return e._tag==="LiteralType"}function W1e(e){return e._tag==="KeyofType"}function Q4(e){return e._tag==="InterfaceType"}function K1e(e){return e._tag==="PartialType"}function N1e(e){return e._tag==="StrictType"}function q1e(e){return e._tag==="ExactType"}function V1e(e){return e._tag==="RefinementType"}function Q1e(e){return e._tag==="IntersectionType"}function z4(e){return e._tag==="UnionType"}function z1e(e){return e._tag==="RecursiveType"}var hb=[];function Ga(e){if(hb.indexOf(e)!==-1)return ar;if(Q4(e)||N1e(e)){var t=ar;for(var n in e.props){var r=e.props[n];V4(r)&&(t===ar&&(t={}),t[n]=[r.value])}return t}else{if(q1e(e)||V1e(e))return Ga(e.type);if(Q1e(e))return e.types.reduce(function(o,a){return P1e(o,Ga(a))},ar);if(z4(e))return e.types.slice(1).reduce(function(o,a){return D1e(o,Ga(a))},Ga(e.types[0]));if(z1e(e)){hb.push(e);var i=Ga(e.type);return hb.pop(),i}}return ar}function H4(e){var t=Ga(e[0]),n=Object.keys(t),r=e.length,i=function(c){for(var l=t[c].slice(),d=[t[c]],p=1;p<r;p++){var A=e[p],m=Ga(A),g=m[c];if(g===void 0)return"continue-keys";if(g.some(function(_){return l.indexOf(_)!==-1}))return"continue-keys";l.push.apply(l,g),d.push(g)}return{value:[c,d]}};e:for(var o=0,a=n;o<a.length;o++){var s=a[o],u=i(s);if(typeof u=="object")return u.value;switch(u){case"continue-keys":continue e}}}var Y4=function(e){et(t,e);function t(){var n=e.call(this,"null",function(r){return r===null},function(r,i){return n.is(r)?Re(r):tt(r,i)},We)||this;return n._tag="NullType",n}return t}(_e),z1=new Y4,G4=function(e){et(t,e);function t(){var n=e.call(this,"undefined",function(r){return r===void 0},function(r,i){return n.is(r)?Re(r):tt(r,i)},We)||this;return n._tag="UndefinedType",n}return t}(_e),Im=new G4,J4=function(e){et(t,e);function t(){var n=e.call(this,"void",Im.is,Im.validate,We)||this;return n._tag="VoidType",n}return t}(_e),QO=new J4,Z4=function(e){et(t,e);function t(){var n=e.call(this,"unknown",function(r){return!0},Re,We)||this;return n._tag="UnknownType",n}return t}(_e),H1e=new Z4,X4=function(e){et(t,e);function t(){var n=e.call(this,"string",function(r){return typeof r=="string"},function(r,i){return n.is(r)?Re(r):tt(r,i)},We)||this;return n._tag="StringType",n}return t}(_e),Zi=new X4,e9=function(e){et(t,e);function t(){var n=e.call(this,"number",function(r){return typeof r=="number"},function(r,i){return n.is(r)?Re(r):tt(r,i)},We)||this;return n._tag="NumberType",n}return t}(_e),Mc=new e9,t9=function(e){et(t,e);function t(){var n=e.call(this,"bigint",function(r){return typeof r=="bigint"},function(r,i){return n.is(r)?Re(r):tt(r,i)},We)||this;return n._tag="BigIntType",n}return t}(_e),Y1e=new t9,n9=function(e){et(t,e);function t(){var n=e.call(this,"boolean",function(r){return typeof r=="boolean"},function(r,i){return n.is(r)?Re(r):tt(r,i)},We)||this;return n._tag="BooleanType",n}return t}(_e),S0=new n9,r9=function(e){et(t,e);function t(){var n=e.call(this,"UnknownArray",Array.isArray,function(r,i){return n.is(r)?Re(r):tt(r,i)},We)||this;return n._tag="AnyArrayType",n}return t}(_e),Rl=new r9,i9=function(e){et(t,e);function t(){var n=e.call(this,"UnknownRecord",function(r){var i=Object.prototype.toString.call(r);return i==="[object Object]"||i==="[object Window]"},function(r,i){return n.is(r)?Re(r):tt(r,i)},We)||this;return n._tag="AnyDictionaryType",n}return t}(_e),zn=new i9,o9=function(e){et(t,e);function t(n,r,i,o,a){var s=e.call(this,n,r,i,o)||this;return s.value=a,s._tag="LiteralType",s}return t}(_e);function dh(e,t){t===void 0&&(t=JSON.stringify(e));var n=function(r){return r===e};return new o9(t,n,function(r,i){return n(r)?Re(e):tt(r,i)},We,e)}var a9=function(e){et(t,e);function t(n,r,i,o,a){var s=e.call(this,n,r,i,o)||this;return s.keys=a,s._tag="KeyofType",s}return t}(_e);function G1e(e,t){t===void 0&&(t=Object.keys(e).map(function(r){return JSON.stringify(r)}).join(" | "));var n=function(r){return Zi.is(r)&&wu.call(e,r)};return new a9(t,n,function(r,i){return n(r)?Re(r):tt(r,i)},We,e)}var s9=function(e){et(t,e);function t(n,r,i,o,a,s){var u=e.call(this,n,r,i,o)||this;return u.type=a,u.predicate=s,u._tag="RefinementType",u}return t}(_e);function _0(e,t,n){return W$(e,t,n)}var Tm=_0(Mc,function(e){return Number.isInteger(e)},"Int"),j$=function(e){et(t,e);function t(n,r,i,o,a){var s=e.call(this,n,r,i,o)||this;return s.runDefinition=a,s._tag="RecursiveType",s}return t}(_e);Object.defineProperty(j$.prototype,"type",{get:function(){return this.runDefinition()},enumerable:!0,configurable:!0});function U$(e,t){var n,r=function(){return n||(n=t(i),n.name=e),n},i=new j$(e,function(o){return r().is(o)},function(o,a){return r().validate(o,a)},function(o){return r().encode(o)},r);return i}var u9=function(e){et(t,e);function t(n,r,i,o,a){var s=e.call(this,n,r,i,o)||this;return s.type=a,s._tag="ArrayType",s}return t}(_e);function I0(e,t){return t===void 0&&(t="Array<".concat(e.name,">")),new u9(t,function(n){return Rl.is(n)&&n.every(e.is)},function(n,r){var i=Rl.validate(n,r);if(se(i))return i;for(var o=i.right,a=o.length,s=o,u=[],c=0;c<a;c++){var l=o[c],d=e.validate(l,Mi(r,String(c),e,l));if(se(d))ra(u,d.left);else{var p=d.right;p!==l&&(s===o&&(s=o.slice()),s[c]=p)}}return u.length>0?ko(u):Re(s)},e.encode===We?We:function(n){return n.map(e.encode)},e)}var c9=function(e){et(t,e);function t(n,r,i,o,a){var s=e.call(this,n,r,i,o)||this;return s.props=a,s._tag="InterfaceType",s}return t}(_e);function H1(e,t){t===void 0&&(t=W4(e));var n=Object.keys(e),r=n.map(function(o){return e[o]}),i=n.length;return new c9(t,function(o){if(zn.is(o)){for(var a=0;a<i;a++){var s=n[a],u=o[s];if(u===void 0&&!wu.call(o,s)||!r[a].is(u))return!1}return!0}return!1},function(o,a){var s=zn.validate(o,a);if(se(s))return s;for(var u=s.right,c=u,l=[],d=0;d<i;d++){var p=n[d],A=c[p],m=r[d],g=m.validate(A,Mi(a,p,m,A));if(se(g))ra(l,g.left);else{var _=g.right;(_!==A||_===void 0&&!wu.call(c,p))&&(c===u&&(c=$l({},u)),c[p]=_)}}return l.length>0?ko(l):Re(c)},tp(r)?We:function(o){for(var a=$l({},o),s=0;s<i;s++){var u=n[s],c=r[s].encode;c!==We&&(a[u]=c(o[u]))}return a},e)}var l9=function(e){et(t,e);function t(n,r,i,o,a){var s=e.call(this,n,r,i,o)||this;return s.props=a,s._tag="PartialType",s}return t}(_e);function J1e(e,t){t===void 0&&(t=K4(W4(e)));var n=Object.keys(e),r=n.map(function(o){return e[o]}),i=n.length;return new l9(t,function(o){if(zn.is(o)){for(var a=0;a<i;a++){var s=n[a],u=o[s];if(u!==void 0&&!e[s].is(u))return!1}return!0}return!1},function(o,a){var s=zn.validate(o,a);if(se(s))return s;for(var u=s.right,c=u,l=[],d=0;d<i;d++){var p=n[d],A=c[p],m=e[p],g=m.validate(A,Mi(a,p,m,A));if(se(g))A!==void 0&&ra(l,g.left);else{var _=g.right;_!==A&&(c===u&&(c=$l({},u)),c[p]=_)}}return l.length>0?ko(l):Re(c)},tp(r)?We:function(o){for(var a=$l({},o),s=0;s<i;s++){var u=n[s],c=o[u];c!==void 0&&(a[u]=r[s].encode(c))}return a},e)}var B$=function(e){et(t,e);function t(n,r,i,o,a,s){var u=e.call(this,n,r,i,o)||this;return u.domain=a,u.codomain=s,u._tag="DictionaryType",u}return t}(_e);function P$(e,t,n){var r=L$(e);return r?L1e(Object.keys(r),e,t,n):j1e(e,t,n)}var D$=function(e){et(t,e);function t(n,r,i,o,a){var s=e.call(this,n,r,i,o)||this;return s.types=a,s._tag="UnionType",s}return t}(_e);function ph(e,t){t===void 0&&(t=N4(e));var n=H4(e);if(n!==void 0&&e.length>0){var r=n[0],i=n[1],o=i.length,a=function(s){for(var u=0;u<o;u++)if(i[u].indexOf(s)!==-1)return u};return new xm(t,function(s){if(zn.is(s)){var u=a(s[r]);return u!==void 0?e[u].is(s):!1}return!1},function(s,u){var c=zn.validate(s,u);if(se(c))return c;var l=c.right,d=a(l[r]);if(d===void 0)return tt(s,u);var p=e[d];return p.validate(l,Mi(u,String(d),p,l))},tp(e)?We:function(s){var u=a(s[r]);if(u===void 0)throw new Error("no codec found to encode value in union codec ".concat(t));return e[u].encode(s)},e,r)}else return new D$(t,function(s){return e.some(function(u){return u.is(s)})},function(s,u){for(var c=[],l=0;l<e.length;l++){var d=e[l],p=d.validate(s,Mi(u,String(l),d,s));if(se(p))ra(c,p.left);else return Re(p.right)}return ko(c)},tp(e)?We:function(s){for(var u=0,c=e;u<c.length;u++){var l=c[u];if(l.is(s))return l.encode(s)}throw new Error("no codec found to encode value in union type ".concat(t))},e)}var f9=function(e){et(t,e);function t(n,r,i,o,a){var s=e.call(this,n,r,i,o)||this;return s.types=a,s._tag="IntersectionType",s}return t}(_e);function Z1e(e,t){t===void 0&&(t="(".concat(e.map(function(r){return r.name}).join(" & "),")"));var n=e.length;return new f9(t,function(r){return e.every(function(i){return i.is(r)})},e.length===0?Re:function(r,i){for(var o=[],a=[],s=0;s<n;s++){var u=e[s],c=u.validate(r,Mi(i,String(s),u,r));se(c)?ra(a,c.left):o.push(c.right)}return a.length>0?ko(a):Re(V1(r,o))},e.length===0?We:function(r){return V1(r,e.map(function(i){return i.encode(r)}))},e)}var d9=function(e){et(t,e);function t(n,r,i,o,a){var s=e.call(this,n,r,i,o)||this;return s.types=a,s._tag="TupleType",s}return t}(_e);function X1e(e,t){t===void 0&&(t="[".concat(e.map(function(r){return r.name}).join(", "),"]"));var n=e.length;return new d9(t,function(r){return Rl.is(r)&&r.length===n&&e.every(function(i,o){return i.is(r[o])})},function(r,i){var o=Rl.validate(r,i);if(se(o))return o;for(var a=o.right,s=a.length>n?a.slice(0,n):a,u=[],c=0;c<n;c++){var l=a[c],d=e[c],p=d.validate(l,Mi(i,String(c),d,l));if(se(p))ra(u,p.left);else{var A=p.right;A!==l&&(s===a&&(s=a.slice()),s[c]=A)}}return u.length>0?ko(u):Re(s)},tp(e)?We:function(r){return e.map(function(i,o){return i.encode(r[o])})},e)}var p9=function(e){et(t,e);function t(n,r,i,o,a){var s=e.call(this,n,r,i,o)||this;return s.type=a,s._tag="ReadonlyType",s}return t}(_e);function eCe(e,t){return t===void 0&&(t="Readonly<".concat(e.name,">")),new p9(t,e.is,e.validate,e.encode,e)}var A9=function(e){et(t,e);function t(n,r,i,o,a){var s=e.call(this,n,r,i,o)||this;return s.type=a,s._tag="ReadonlyArrayType",s}return t}(_e);function h9(e,t){t===void 0&&(t="ReadonlyArray<".concat(e.name,">"));var n=I0(e);return new A9(t,n.is,n.validate,n.encode,e)}var np=function(e,t){return g9(H1(e),t)},m9=function(e){et(t,e);function t(n,r,i,o,a){var s=e.call(this,n,r,i,o)||this;return s.type=a,s._tag="ExactType",s}return t}(_e);function g9(e,t){t===void 0&&(t=U1e(e));var n=Q1(e);return new m9(t,e.is,function(r,i){var o=zn.validate(r,i);if(se(o))return o;var a=e.validate(r,i);return se(a)?a:Ye(qO(a.right,n))},function(r){return e.encode(qO(r,n))},e)}var v9=function(e){et(t,e);function t(){var n=e.call(this,"Function",function(r){return typeof r=="function"},function(r,i){return n.is(r)?Re(r):tt(r,i)},We)||this;return n._tag="FunctionType",n}return t}(_e),tCe=new v9,xm=function(e){et(t,e);function t(n,r,i,o,a,s){var u=e.call(this,n,r,i,o,a)||this;return u.tag=s,u}return t}(D$),nCe=function(e,t,n){n===void 0&&(n=N4(t));var r=ph(t,n);return r instanceof xm?r:(console.warn("[io-ts] Cannot build a tagged union for ".concat(n,", returning a de-optimized union")),new xm(n,r.is,r.validate,r.encode,t,e))},rCe=function(e,t){return{value:e,context:t}},y9=function(e){return[{key:"",type:e}]},b9=function(e){et(t,e);function t(){var n=e.call(this,"never",function(r){return!1},function(r,i){return tt(r,i)},function(){throw new Error("cannot encode never")})||this;return n._tag="NeverType",n}return t}(_e),iCe=new b9,C9=function(e){et(t,e);function t(){var n=e.call(this,"any",function(r){return!0},Re,We)||this;return n._tag="AnyType",n}return t}(_e),oCe=new C9,aCe=zn,S9=function(e){et(t,e);function t(){var n=e.call(this,"object",function(r){return r!==null&&typeof r=="object"},function(r,i){return n.is(r)?Re(r):tt(r,i)},We)||this;return n._tag="ObjectType",n}return t}(_e),sCe=new S9;function W$(e,t,n){return n===void 0&&(n="(".concat(e.name," | ").concat(D4(t),")")),new s9(n,function(r){return e.is(r)&&t(r)},function(r,i){var o=e.validate(r,i);if(se(o))return o;var a=o.right;return t(a)?Re(a):tt(a,i)},e.encode,e,t)}var uCe=W$(Mc,Number.isInteger,"Integer"),cCe=P$,lCe=function(e){et(t,e);function t(n,r,i,o,a){var s=e.call(this,n,r,i,o)||this;return s.props=a,s._tag="StrictType",s}return t}(_e);function fCe(e){return e}function dCe(e){return function(){return e}}const pCe=Object.freeze(Object.defineProperty({__proto__:null,AnyArrayType:r9,AnyDictionaryType:i9,AnyType:C9,Array:Rl,ArrayType:u9,BigIntType:t9,BooleanType:n9,Dictionary:aCe,DictionaryType:B$,ExactType:m9,Function:tCe,FunctionType:v9,Int:Tm,Integer:uCe,InterfaceType:c9,IntersectionType:f9,KeyofType:a9,LiteralType:o9,NeverType:b9,NullType:Y4,NumberType:e9,ObjectType:S9,PartialType:l9,ReadonlyArrayType:A9,ReadonlyType:p9,RecursiveType:j$,RefinementType:s9,StrictType:lCe,StringType:X4,TaggedUnionType:xm,TupleType:d9,Type:_e,UndefinedType:G4,UnionType:D$,UnknownArray:Rl,UnknownRecord:zn,UnknownType:Z4,VoidType:J4,alias:dCe,any:oCe,appendContext:Mi,array:I0,bigint:Y1e,boolean:S0,brand:_0,clean:fCe,dictionary:cCe,emptyTags:ar,exact:g9,failure:tt,failures:ko,getContextEntry:M1e,getDefaultContext:y9,getDomainKeys:L$,getFunctionName:D4,getIndex:H4,getTags:Ga,getValidationError:rCe,identity:We,interface:H1,intersection:Z1e,keyof:G1e,literal:dh,mergeAll:V1,never:iCe,null:z1,nullType:z1,number:Mc,object:sCe,partial:J1e,readonly:eCe,readonlyArray:h9,record:P$,recursion:U$,refinement:W$,strict:np,string:Zi,success:Re,taggedUnion:nCe,tuple:X1e,type:H1,undefined:Im,union:ph,unknown:H1e,void:QO,voidType:QO},Symbol.toStringTag,{value:"Module"})),Z=Ku(pCe);var Ah={};Object.defineProperty(Ah,"__esModule",{value:!0});Ah.ContentPath=void 0;const zO="::";Ah.ContentPath={serialize(e){return e.map(t=>t.key).join(zO)},current(e){return e[e.length-1]},append(e,t){return e+zO+t},make(e){return e.reduce((t,{key:n,type:r})=>n?t.concat({key:n,type:r}):t,[])}};var Lc={},T0={};Object.defineProperty(T0,"__esModule",{value:!0});T0.getAssetOrThrow=void 0;const ACe=e=>t=>{const n=e[t];if(!n)throw new Error(`Missing asset with id '${t}'!`);return n};T0.getAssetOrThrow=ACe;var x0={};Object.defineProperty(x0,"__esModule",{value:!0});x0.getEmbedOrThrow=void 0;const hCe=e=>t=>{const n=e[t];if(!n)throw new Error(`Missing embed with url '${t}'`);return n};x0.getEmbedOrThrow=hCe;var w0={},Xe={};const Xi=Ku(rL);function _9(e,t,n){return n===void 0&&(n=e.name),new _e(n,e.is,e.validate,function(r){return t(e.encode(r))})}const mCe=Object.freeze(Object.defineProperty({__proto__:null,mapOutput:_9},Symbol.toStringTag,{value:"Module"}));var I9=_0(Zi,function(e){return e.length>0},"NonEmptyString");function T9(e,t){t===void 0&&(t="NonEmptyArray<"+e.name+">");var n=I0(e);return new _e(t,function(r){return n.is(r)&&Qt(r)},function(r,i){return le(n.validate(r,i),ui(function(o){var a=ZS(o);return Ve(a)?tt(r,i):Re(a.value)}))},function(r){return n.encode(r)})}function x9(e,t,n){n===void 0&&(n="Set<"+e.name+">");var r=I0(e),i=y6(t),o=m6(t);return new _e(n,function(a){return a instanceof Set&&v6(e.is)(a)},function(a,s){return le(r.validate(a,s),ui(function(u){var c=o(u);return c.size!==u.length?tt(a,s):Re(c)}))},function(a){return r.encode(i(a))})}function gCe(e,t,n){return n===void 0&&(n="ReadonlySet<"+e.name+">"),x9(e,t,n)}function K$(e,t){return new _e(e,t,function(n,r){return t(n)?Re(n):tt(n,r)},We)}var vCe=function(e){return e instanceof Date},yCe=K$("Date",vCe),bCe=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},CCe=function(e,t){return{get:e,reverseGet:t}},w9=function(e){return Ns(e.get,H(e.reverseGet,pr))},SCe=function(e){return jc(H(e.get,Tt),e.reverseGet)},_Ce=function(e){return Wa(H(e.get,Tt),H(e.reverseGet,pr))},ICe=function(e){return dd(function(t){return function(n){return function(r){return t.map(n(e.get(r)),function(i){return e.reverseGet(i)})}}})},Ns=function(e,t){return{get:e,set:t}},N$=function(e){return Wa(H(e.get,Tt),e.set)},TCe=function(e){return dd(function(t){return function(n){return function(r){return t.map(n(e.get(r)),function(i){return e.set(i)(r)})}}})},E9=function(e){return function(t){return Ns(function(n){return e.get(t.get(n))},function(n){return function(r){return t.set(e.set(n)(t.get(r)))(r)}})}},xCe=function(e){return function(t){return jc(H(t.getOption,Zp(e.getOption)),H(e.reverseGet,t.reverseGet))}},wCe=function(e){return function(t){return Uc(q$(e))(N$(t))}},ECe=function(){return Ns(N,pr)},$Ce=function(e){return function(t){return Ns(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={},i[e]=n,i)))(r)}})}},RCe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(n){return Ns(function(r){for(var i=n.get(r),o={},a=0,s=e;a<s.length;a++){var u=s[a];o[u]=i[u]}return o},function(r){return function(i){for(var o=n.get(i),a=0,s=e;a<s.length;a++){var u=s[a];if(r[u]!==o[u])return n.set(Object.assign({},o,r))(i)}return i}})}},OCe=function(e){return function(t){return Ns(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)}})}},FCe=function(e){return function(t){return le(t,E9(eSe().at(e)))}},jc=function(e,t){return{getOption:e,reverseGet:t}},q$=function(e){return Wa(e.getOption,function(t){return R9(t)(e)})},$9=function(e){return dd(function(t){return function(n){return function(r){return le(e.getOption(r),_s(function(){return t.of(r)},function(i){return t.map(n(i),function(o){return R9(o)(e)(r)})}))}}})},kCe=function(e){return function(t){return function(n){return le(t.getOption(n),bo(function(r){var i=e(r);return i===r?n:t.reverseGet(i)}))}}},MCe=function(e){return function(t){var n=kCe(e)(t);return function(r){return le(n(r),RI(function(){return r}))}}},R9=function(e){return MCe(function(){return e})},LCe=function(e){return function(t){return Uc(N$(e))(q$(t))}},jCe=function(){return jc(Ju,N)},V$=function(e){return jc(_v(e),N)},UCe=function(){return jc(N,Tt)},BCe=function(){return jc(vf,Ye)},PCe=function(){return jc(function(e){return se(e)?Tt(e.left):ot},wt)},Wa=function(e,t){return{getOption:e,set:t}},DCe=function(e){return dd(function(t){return function(n){return function(r){return le(e.getOption(r),_s(function(){return t.of(r)},function(i){return t.map(n(i),function(o){return e.set(o)(r)})}))}}})},O9=function(e){return function(t){return function(n){return le(t.getOption(n),bo(function(r){var i=e(r);return i===r?n:t.set(i)(n)}))}}},F9=function(e){return function(t){var n=O9(e)(t);return function(r){return le(n(r),RI(function(){return r}))}}},Uc=function(e){return function(t){return Wa(H(t.getOption,Zp(e.getOption)),function(n){return F9(e.set(n))(t)})}},WCe=function(e){return function(t){return le(t,Uc(GCe().index(e)))}},KCe=function(e){return function(t){return le(t,Uc(JCe().index(e)))}},NCe=function(e){return function(t){return le(t,Uc(ZCe().index(e)))}},qCe=function(e){return Wa(rv(e),function(t){return function(n){return le(nv(e)(n),_s(function(){return n},function(r){return pv(r,t,n)}))}})},k9=function(e,t,n){if(n[e]===t)return n;var r=bCe([n[0]],n.slice(1),!0);return r[e]=t,r},VCe=function(e){return Wa(rv(e),function(t){return function(n){return le(nv(e)(n),_s(function(){return n},function(r){return k9(r,t,n)}))}})},dd=function(e){return{modifyF:e}};function Q$(e){return function(t){return dd(function(n){return function(r){return t.modifyF(n)(e.modifyF(n)(r))}})}}var QCe={URI:"Identity",map:function(e,t){return t(e)},of:N,ap:function(e,t){return e(t)}},zCe=function(e){return e.URI==="Identity"};function HCe(e){return function(){return dd(function(t){var n=zCe(t)?e.map:e.traverse(t);return function(r){return function(i){return n(i,r)}}})}}function YCe(e){return Q$(HCe(e)())}var z$=function(e){return{index:e}},GCe=function(){return z$(function(e){return Wa(function(t){return Su(e,t)},function(t){return function(n){return le(Su(e,n),_s(function(){return n},function(){return pv(e,t,n)}))}})})},JCe=function(){return z$(function(e){return Wa(function(t){return Su(e,t)},function(t){return function(n){return le(Su(e,n),_s(function(){return n},function(){return k9(e,t,n)}))}})})},ZCe=function(){return z$(function(e){return Wa(function(t){return _u(e,t)},function(t){return function(n){return n[e]===t||Ve(_u(e,n))?n:Rw(e,t)(n)}})})},XCe=function(e){return{at:e}};function eSe(){return XCe(function(e){return Ns(function(t){return _u(e,t)},_s(function(){return vw(e)},function(t){return Rw(e,t)}))})}var M9=CCe,Y1=w9,G1=SCe,J1=_Ce,Z1=ICe,tSe=function(e){return function(t){return M9(H(t.get,e.get),H(e.reverseGet,t.reverseGet))}},nSe=function(e){return M9(e.reverseGet,e.get)},rSe=function(e){return function(t){return function(n){return t.reverseGet(e(t.get(n)))}}},L9=Ns,wm=ECe,cs=N$,Ol=TCe,Eu=E9,iSe=Eu,oSe=H(w9,Eu),Bc=wCe,H$=function(e){return H(cs,Uc(e))},aSe=function(e){return H(Ol,Q$(e))},j9=function(e){return function(t){return function(n){var r=t.get(n),i=e(r);return r===i?n:t.set(i)(n)}}};function sSe(e){return function(t){return function(n){return function(r){return le(n.get(r),t,function(i){return e.map(i,function(o){return n.set(o)(r)})})}}}}var uSe=function(e){return Bc(jCe())(e)};function cSe(e){return Bc(V$(e))}var U9=$Ce,B9=RCe,lSe=OCe,fSe=function(e){return H(cs,WCe(e))},dSe=function(e){return H(cs,KCe(e))},pSe=function(e){return H(cs,NCe(e))},ASe=FCe,hSe=Bc(UCe()),mSe=Bc(BCe()),gSe=Bc(PCe());function vSe(e){return H(Ol,YCe(e))}function ySe(e){return H$(qCe(e))}function bSe(e){return H$(VCe(e))}var CSe=function(e,t){return function(n){return P9(n,e,t)}},P9=function(e,t,n){return L9(H(e.get,t),H(n,e.set))},E0="monocle-ts/Lens",SSe={URI:E0,imap:P9},D9={URI:E0,compose:function(e,t){return Eu(e)(t)}},_Se={URI:E0,compose:D9.compose,id:wm};const ISe=Object.freeze(Object.defineProperty({__proto__:null,Category:_Se,Invariant:SSe,Semigroupoid:D9,URI:E0,asOptional:cs,asTraversal:Ol,atKey:ASe,component:lSe,compose:Eu,composeIso:oSe,composeLens:iSe,composeOptional:H$,composePrism:Bc,composeTraversal:aSe,filter:cSe,findFirst:ySe,findFirstNonEmpty:bSe,fromNullable:uSe,id:wm,imap:CSe,index:fSe,indexNonEmpty:dSe,key:pSe,left:gSe,lens:L9,modify:j9,modifyF:sSe,prop:U9,props:B9,right:mSe,some:hSe,traverse:vSe},Symbol.toStringTag,{value:"Module"}));var HO=DCe,ou=Uc,TSe=O9,xSe=F9,wSe=V$,X1=q$,eC=$9,tC=xCe,ESe=LCe,Yo=Q$,W9=function(e){return function(t){return t.modifyF(QCe)(e)}},$Se=function(e){return W9(function(){return e})};function RSe(e){return Yo($9(V$(e)))}var YO=function(e){return new N9(e.get,e.reverseGet)},fl=function(e){return new Y$(e.get,e.set)},Od=function(e){return new q9(e.getOption,e.reverseGet)},ti=function(e){return new OSe(e.getOption,e.set)},xr=function(e){return new FSe(e.modifyF)},K9=function(e,t,n){var r;return n===e[t]?e:Object.assign({},e,(r={},r[t]=n,r))},N9=function(){function e(t,n){this.get=t,this.reverseGet=n,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 YO(nSe(this))},e.prototype.modify=function(t){return rSe(t)(this)},e.prototype.asLens=function(){return fl(Y1(this))},e.prototype.asPrism=function(){return Od(G1(this))},e.prototype.asOptional=function(){return ti(J1(this))},e.prototype.asTraversal=function(){return xr(Z1(this))},e.prototype.asFold=function(){var t=this;return new pd(function(){return function(n){return function(r){return n(t.get(r))}}})},e.prototype.asGetter=function(){var t=this;return new Q9(function(n){return t.get(n)})},e.prototype.asSetter=function(){var t=this;return new hh(function(n){return t.modify(n)})},e.prototype.compose=function(t){return YO(tSe(t)(this))},e.prototype.composeIso=function(t){return this.compose(t)},e.prototype.composeLens=function(t){return fl(le(this,Y1,Eu(t)))},e.prototype.composePrism=function(t){return Od(le(this,G1,tC(t)))},e.prototype.composeOptional=function(t){return ti(le(this,J1,ou(t)))},e.prototype.composeTraversal=function(t){return xr(le(this,Z1,Yo(t)))},e.prototype.composeFold=function(t){return this.asFold().compose(t)},e.prototype.composeGetter=function(t){return this.asGetter().compose(t)},e.prototype.composeSetter=function(t){return this.asSetter().compose(t)},e}(),Y$=function(){function e(t,n){this.get=t,this.set=n,this._tag="Lens"}return e.fromPath=function(){var t=e.fromProp();return function(n){var r=t(n[0]);return n.slice(1).reduce(function(i,o){return i.compose(t(o))},r)}},e.fromProp=function(){return function(t){return fl(le(wm(),U9(t)))}},e.fromProps=function(){return function(t){return fl(le(wm(),B9.apply(ISe,t)))}},e.fromNullableProp=function(){return function(t,n){return new e(function(r){var i=Ju(r[t]);return Ve(i)?n:i.value},function(r){return function(i){return K9(i,t,r)}})}},e.prototype.modify=function(t){return j9(t)(this)},e.prototype.asOptional=function(){return ti(cs(this))},e.prototype.asTraversal=function(){return xr(Ol(this))},e.prototype.asSetter=function(){var t=this;return new hh(function(n){return t.modify(n)})},e.prototype.asGetter=function(){var t=this;return new Q9(function(n){return t.get(n)})},e.prototype.asFold=function(){var t=this;return new pd(function(){return function(n){return function(r){return n(t.get(r))}}})},e.prototype.compose=function(t){return fl(Eu(t)(this))},e.prototype.composeLens=function(t){return this.compose(t)},e.prototype.composeGetter=function(t){return this.asGetter().compose(t)},e.prototype.composeFold=function(t){return this.asFold().compose(t)},e.prototype.composeOptional=function(t){return ti(le(this,cs,ou(t)))},e.prototype.composeTraversal=function(t){return xr(le(this,Ol,Yo(t)))},e.prototype.composeSetter=function(t){return this.asSetter().compose(t)},e.prototype.composeIso=function(t){return fl(le(this,Eu(le(t,Y1))))},e.prototype.composePrism=function(t){return ti(Bc(t)(this))},e}(),q9=function(){function e(t,n){this.getOption=t,this.reverseGet=n,this._tag="Prism"}return e.fromPredicate=function(t){return Od(wSe(t))},e.some=function(){return V9},e.prototype.modify=function(t){var n=this;return function(r){var i=n.modifyOption(t)(r);return Ve(i)?r:i.value}},e.prototype.modifyOption=function(t){var n=this;return function(r){return fB.map(n.getOption(r),function(i){var o=t(i);return o===i?r:n.reverseGet(o)})}},e.prototype.set=function(t){return this.modify(function(){return t})},e.prototype.asOptional=function(){return ti(X1(this))},e.prototype.asTraversal=function(){return xr(eC(this))},e.prototype.asSetter=function(){var t=this;return new hh(function(n){return t.modify(n)})},e.prototype.asFold=function(){var t=this;return new pd(function(n){return function(r){return function(i){var o=t.getOption(i);return Ve(o)?n.empty:r(o.value)}}})},e.prototype.compose=function(t){return Od(tC(t)(this))},e.prototype.composePrism=function(t){return this.compose(t)},e.prototype.composeOptional=function(t){return ti(le(this,X1,ou(t)))},e.prototype.composeTraversal=function(t){return xr(le(this,eC,Yo(t)))},e.prototype.composeFold=function(t){return this.asFold().compose(t)},e.prototype.composeSetter=function(t){return this.asSetter().compose(t)},e.prototype.composeIso=function(t){return Od(le(this,tC(le(t,G1))))},e.prototype.composeLens=function(t){return ti(ESe(t)(this))},e.prototype.composeGetter=function(t){return this.asFold().compose(t.asFold())},e}(),V9=new q9(N,Tt),OSe=function(){function e(t,n){this.getOption=t,this.set=n,this._tag="Optional"}return e.fromPath=function(){var t=e.fromNullableProp();return function(n){var r=t(n[0]);return n.slice(1).reduce(function(i,o){return i.compose(t(o))},r)}},e.fromNullableProp=function(){return function(t){return new e(function(n){return Ju(n[t])},function(n){return function(r){return r[t]==null?r:K9(r,t,n)}})}},e.fromOptionProp=function(){var t=Y$.fromProp();return function(n){return t(n).composePrism(V9)}},e.prototype.modify=function(t){return xSe(t)(this)},e.prototype.modifyOption=function(t){return TSe(t)(this)},e.prototype.asTraversal=function(){return xr(HO(this))},e.prototype.asFold=function(){var t=this;return new pd(function(n){return function(r){return function(i){var o=t.getOption(i);return Ve(o)?n.empty:r(o.value)}}})},e.prototype.asSetter=function(){var t=this;return new hh(function(n){return t.modify(n)})},e.prototype.compose=function(t){return ti(ou(t)(this))},e.prototype.composeOptional=function(t){return this.compose(t)},e.prototype.composeTraversal=function(t){return xr(le(this,HO,Yo(t)))},e.prototype.composeFold=function(t){return this.asFold().compose(t)},e.prototype.composeSetter=function(t){return this.asSetter().compose(t)},e.prototype.composeLens=function(t){return ti(le(this,ou(le(t,cs))))},e.prototype.composePrism=function(t){return ti(le(this,ou(le(t,X1))))},e.prototype.composeIso=function(t){return ti(le(this,ou(le(t,J1))))},e.prototype.composeGetter=function(t){return this.asFold().compose(t.asFold())},e}(),FSe=function(){function e(t){this.modifyF=t,this._tag="Traversal"}return e.prototype.modify=function(t){return W9(t)(this)},e.prototype.set=function(t){return $Se(t)(this)},e.prototype.filter=function(t){return xr(RSe(t)(this))},e.prototype.asFold=function(){var t=this;return new pd(function(n){return function(r){return t.modifyF(AB(n))(function(i){return yf(r(i))})}})},e.prototype.asSetter=function(){var t=this;return new hh(function(n){return t.modify(n)})},e.prototype.compose=function(t){return xr(Yo(t)(this))},e.prototype.composeTraversal=function(t){return this.compose(t)},e.prototype.composeFold=function(t){return this.asFold().compose(t)},e.prototype.composeSetter=function(t){return this.asSetter().compose(t)},e.prototype.composeOptional=function(t){return this.compose(t.asTraversal())},e.prototype.composeLens=function(t){return xr(le(this,Yo(le(t,Ol))))},e.prototype.composePrism=function(t){return xr(le(this,Yo(le(t,eC))))},e.prototype.composeIso=function(t){return xr(le(this,Yo(le(t,Z1))))},e.prototype.composeGetter=function(t){return this.asFold().compose(t.asFold())},e}(),Q9=function(){function e(t){this.get=t,this._tag="Getter"}return e.prototype.asFold=function(){var t=this;return new pd(function(){return function(n){return function(r){return n(t.get(r))}}})},e.prototype.compose=function(t){var n=this;return new e(function(r){return t.get(n.get(r))})},e.prototype.composeGetter=function(t){return this.compose(t)},e.prototype.composeFold=function(t){return this.asFold().compose(t)},e.prototype.composeLens=function(t){return this.compose(t.asGetter())},e.prototype.composeIso=function(t){return this.compose(t.asGetter())},e.prototype.composeTraversal=function(t){return this.asFold().compose(t.asFold())},e.prototype.composeOptional=function(t){return this.asFold().compose(t.asFold())},e.prototype.composePrism=function(t){return this.asFold().compose(t.asFold())},e}(),pd=function(){function e(t){this.foldMap=t,this._tag="Fold",this.getAll=t(cI())(Ss),this.exist=t(KW),this.all=t(WW),this.foldMapFirst=t(dB())}return e.prototype.compose=function(t){var n=this;return new e(function(r){return function(i){return n.foldMap(r)(t.foldMap(r)(i))}})},e.prototype.composeFold=function(t){return this.compose(t)},e.prototype.composeGetter=function(t){return this.compose(t.asFold())},e.prototype.composeTraversal=function(t){return this.compose(t.asFold())},e.prototype.composeOptional=function(t){return this.compose(t.asFold())},e.prototype.composeLens=function(t){return this.compose(t.asFold())},e.prototype.composePrism=function(t){return this.compose(t.asFold())},e.prototype.composeIso=function(t){return this.compose(t.asFold())},e.prototype.find=function(t){return this.foldMapFirst(_v(t))},e.prototype.headOption=function(t){return this.find(function(){return!0})(t)},e}(),hh=function(){function e(t){this.modify=t,this._tag="Setter"}return e.prototype.set=function(t){return this.modify(pr(t))},e.prototype.compose=function(t){var n=this;return new e(function(r){return n.modify(t.modify(r))})},e.prototype.composeSetter=function(t){return this.compose(t)},e.prototype.composeTraversal=function(t){return this.compose(t.asSetter())},e.prototype.composeOptional=function(t){return this.compose(t.asSetter())},e.prototype.composeLens=function(t){return this.compose(t.asSetter())},e.prototype.composePrism=function(t){return this.compose(t.asSetter())},e.prototype.composeIso=function(t){return this.compose(t.asSetter())},e}(),kSe=new N9(bl,bl);function MSe(){return kSe}function LSe(e,t){t===void 0&&(t="fromNewtype("+e.name+")");var n=MSe();return new _e(t,function(r){return e.is(r)},function(r,i){return le(e.validate(r,i),tc(n.wrap))},function(r){return e.encode(n.unwrap(r))})}var jSe=np({_tag:dh("None")}),USe=dh("Some");function z9(e,t){return t===void 0&&(t="Option<"+e.name+">"),ph([jSe,np({_tag:USe,value:e},"Some<"+e.name+">")],t)}function BSe(e,t){return t===void 0&&(t="Option<"+e.name+">"),new _e(t,z9(e).is,function(n,r){return n==null?Re(ot):le(e.validate(n,r),tc(Tt))},function(n){return OI(le(n,bo(e.encode)))})}var PSe=new _e("DateFromISOString",function(e){return e instanceof Date},function(e,t){return le(Zi.validate(e,t),ui(function(n){var r=new Date(n);return isNaN(r.getTime())?tt(e,t):Re(r)}))},function(e){return e.toISOString()});function DSe(e,t){return t===void 0&&(t="ReadonlyNonEmptyArray<"+e.name+">"),T9(e,t)}function H9(e){var t=Object.create(Object.getPrototypeOf(e));return Object.assign(t,e),t}var WSe=new _e("DateFromNumber",function(e){return e instanceof Date},function(e,t){return le(Mc.validate(e,t),ui(function(n){var r=new Date(n);return isNaN(r.getTime())?tt(e,t):Re(r)}))},function(e){return e.getTime()});function $0(e,t,n){n===void 0&&(n=e.name);var r=H9(e);return r.validate=t,r.decode=function(i){return t(i,y9(r))},r.name=n,r}function KSe(e,t,n){return n===void 0&&(n="withFallback("+e.name+")"),$0(e,function(r,i){return qB(function(){return Re(t)})(e.validate(r,i))},n)}var NSe=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,qSe=_0(Zi,function(e){return NSe.test(e)},"UUID");function VSe(e,t,n){return n===void 0&&(n="fromNullable("+e.name+")"),$0(e,function(r,i){return r==null?Re(t):e.validate(r,i)},n)}var QSe=new _e("BooleanFromString",S0.is,function(e,t){return le(Zi.validate(e,t),ui(function(n){return n==="true"?Re(!0):n==="false"?Re(!1):tt(e,t)}))},String);function zSe(e,t){return $0(e,function(n,r){return aA(function(){return[{value:n,context:r,message:t(n,r),actual:n}]})(e.validate(n,r))})}function Y9(e){switch(e._tag){case"InterfaceType":return e.props;case"ExactType":return Y9(e.type)}}var HSe=Y$.fromProp();function YSe(e){var t={};for(var n in Y9(e))t[n]=HSe(n);return t}var GSe=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},JSe=K$("RegExp",GSe),ZSe=new _e("DateFromUnixTime",function(e){return e instanceof Date},function(e,t){return le(Tm.validate(e,t),ui(function(n){var r=new Date(n*1e3);return isNaN(r.getTime())?tt(e,t):Re(r)}))},function(e){return Math.floor(e.getTime()/1e3)}),nC=new _e("NumberFromString",Mc.is,function(e,t){return le(Zi.validate(e,t),ui(function(n){var r=+n;return isNaN(r)||n.trim()===""?tt(e,t):Re(r)}))},String),XSe=new _e("IntFromString",Tm.is,function(e,t){return le(nC.validate(e,t),ui(function(n){return Tm.is(n)?Re(n):tt(e,t)}))},nC.encode),G9=U$("JsonArray",function(){return h9(R0)}),J9=U$("JsonRecord",function(){return P$(Zi,R0)}),R0=ph([S0,Mc,Zi,z1,G9,J9],"Json"),e_e=new _e("JsonFromString",R0.is,function(e,t){try{return Re(JSON.parse(e))}catch{return tt(e,t)}},function(e){return JSON.stringify(e)}),t_e=dh("Left"),n_e=dh("Right");function r_e(e,t,n){return n===void 0&&(n="Either<"+e.name+", "+t.name+">"),ph([np({_tag:t_e,left:e},"Left<"+e.name+">"),np({_tag:n_e,right:t},"Right<"+e.name+">")],n)}var i_e=new _e("BigIntFromString",function(e){return typeof e=="bigint"},function(e,t){return le(Zi.validate(e,t),ui(function(n){if(!I9.is(n.trim()))return tt(e,t);try{return Re(BigInt(n))}catch{return tt(e,t)}}))},String);function o_e(e,t,n){return n===void 0&&(n=e.name),new _e(n,e.is,e.validate,t)}var a_e=new _e("BooleanFromNumber",S0.is,function(e,t){return le(Mc.validate(e,t),tc(function(n){return n!==0}))},Number);const s_e=Object.freeze(Object.defineProperty({__proto__:null,BigIntFromString:i_e,BooleanFromNumber:a_e,BooleanFromString:QSe,DateFromISOString:PSe,DateFromNumber:WSe,DateFromUnixTime:ZSe,IntFromString:XSe,Json:R0,JsonArray:G9,JsonFromString:e_e,JsonRecord:J9,NonEmptyString:I9,NumberFromString:nC,UUID:qSe,clone:H9,date:yCe,either:r_e,fromNewtype:LSe,fromNullable:VSe,fromRefinement:K$,getLenses:YSe,mapOutput:_9,nonEmptyArray:T9,option:z9,optionFromNullable:BSe,readonlyNonEmptyArray:DSe,readonlySetFromArray:gCe,regexp:JSe,setFromArray:x9,withEncode:o_e,withFallback:KSe,withMessage:zSe,withValidate:$0},Symbol.toStringTag,{value:"Module"})),O0=Ku(s_e),u_e=Ku(mCe);Object.defineProperty(Xe,"__esModule",{value:!0});Xe.withCustomError=Xe.addType=Xe.isEmpty=Xe.objectToMap=Xe.grouped=Xe.formatDate=Xe.formatDateTime=Xe.filterDouble=Xe.refineType=Xe.nullable=void 0;const c_e=Q,Z9=lt,l_e=Xi,pl=(0,c_e.__importStar)(Z),f_e=O0,d_e=u_e;function p_e(e){return pl.union([e,pl.null,pl.undefined])}Xe.nullable=p_e;function A_e(e,t,n){return new pl.Type(t,e.is,(r,i)=>(0,l_e.pipe)(e.validate(r,i),Z9.either.chain(o=>n(o)?pl.success(o):pl.failure(r,i))),e.encode)}Xe.refineType=A_e;function h_e(e){if(e==="")return null;const t=Number(e);return Number.isNaN(t)?null:t}Xe.filterDouble=h_e;function m_e(e){return e.toISOString().replace(/\.\d{3}Z$/,"+0000")}Xe.formatDateTime=m_e;function g_e(e){return e.toISOString().replace(/T.*/,"")}Xe.formatDate=g_e;function v_e(e,t){return e.reduce((n,r,i)=>(i%t===0?n.push([r]):n[Math.floor(i/t)].push(r),n),new Array)}Xe.grouped=v_e;function y_e(e){return new Map(Object.entries(e))}Xe.objectToMap=y_e;function b_e(e){for(const t in e)return!1;return!0}Xe.isEmpty=b_e;function C_e(e,t){return(0,d_e.mapOutput)(e,n=>({...n,__TYPE__:t}))}Xe.addType=C_e;function S_e(e,t){return(0,f_e.withValidate)(e,(n,r)=>Z9.either.mapLeft(i=>i.find(o=>o.message)?i:[{value:n,context:r,message:t(n,r),actual:n}])(e.validate(n,r)))}Xe.withCustomError=S_e;Object.defineProperty(w0,"__esModule",{value:!0});w0.WidgetKey=void 0;const __e=Q,I_e=(0,__e.__importStar)(Z),T_e=Xe,x_e=new RegExp("^[^<>]+$");w0.WidgetKey=(0,T_e.refineType)(I_e.string,"WidgetKey",e=>e.length===0||x_e.test(e));(function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Q;(0,t.__exportStar)(T0,e),(0,t.__exportStar)(x0,e),(0,t.__exportStar)(w0,e)})(Lc);var fe={},X9={},Ad={},F0={},k0={};Object.defineProperty(k0,"__esModule",{value:!0});k0.clone=void 0;function w_e(e){var t=Object.create(Object.getPrototypeOf(e));return Object.assign(t,e),t}k0.clone=w_e;var E_e=he&&he.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),$_e=he&&he.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),R_e=he&&he.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)Object.hasOwnProperty.call(e,n)&&E_e(t,e,n);return $_e(t,e),t};Object.defineProperty(F0,"__esModule",{value:!0});F0.withValidate=void 0;var O_e=R_e(Z),F_e=k0;function k_e(e,t,n){n===void 0&&(n=e.name);var r=F_e.clone(e);return r.validate=t,r.decode=function(i){return t(i,O_e.getDefaultContext(r))},r.name=n,r}F0.withValidate=k_e;var M_e=he&&he.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),L_e=he&&he.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),j_e=he&&he.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)Object.hasOwnProperty.call(e,n)&&M_e(t,e,n);return L_e(t,e),t};Object.defineProperty(Ad,"__esModule",{value:!0});Ad.withFallback=void 0;var U_e=j_e(Z),B_e=F0,P_e=ln;function D_e(e,t,n){return n===void 0&&(n="withFallback("+e.name+")"),B_e.withValidate(e,function(r,i){return P_e.orElse(function(){return U_e.success(t)})(e.validate(r,i))},n)}Ad.withFallback=D_e;var mb={},en={};Object.defineProperty(en,"__esModule",{value:!0});en.EmptyArray=en.EmptyObject=en.Boolean=en.NumberOrNull=en.Number=en.StringOrNull=en.String=void 0;const W_e=Q,K_e=lt,N_e=Ge,Nt=(0,W_e.__importStar)(Z),mh=Xe;en.String=(0,mh.withCustomError)(Nt.string,()=>"The value must be a string");en.StringOrNull=(0,mh.withCustomError)(Nt.union([Nt.string,Nt.null]),()=>"The value must be a string or null");en.Number=(0,mh.withCustomError)(Nt.number,()=>"The value must be a number");en.NumberOrNull=(0,mh.withCustomError)(Nt.union([Nt.number,Nt.null]),()=>"The value must be a number or null");en.Boolean=(0,mh.withCustomError)(Nt.boolean,()=>"The value must be a boolean");en.EmptyObject=Nt.UnknownRecord.pipe(new Nt.Type("emptyObject",e=>Nt.UnknownRecord.is(e),(e,t)=>Object.keys(e).length>0?Nt.failure(e,t,"The object is not empty."):Nt.success({}),Nt.identity));en.EmptyArray=new Nt.Type("emptyArray",e=>Nt.UnknownArray.is(e)&&e.length===0,(e,t)=>(0,N_e.pipe)(Nt.UnknownArray.decode(e),K_e.either.chain(n=>n.length>0?Nt.failure(e,t,"The array is not empty."):Nt.success(new Array))),()=>[]);var Uh={};const Ka=Ku(ZB);var GO;function q_e(){if(GO)return Uh;GO=1,Object.defineProperty(Uh,"__esModule",{value:!0});const e=Q,t=Ka,n=Xi,r=(0,e.__importStar)(Z),i=ft();return Uh.default=new r.Type("dateFromString",o=>o instanceof Date,(o,a)=>(0,n.pipe)(i.String.validate(o,a),(0,t.chain)(s=>{const u=new Date(s);return isNaN(u.getTime())?r.failure(o,a):r.success(u)})),o=>o.toISOString()),Uh}var G$={};Object.defineProperty(G$,"__esModule",{value:!0});const V_e=Q,Q_e=Ka,z_e=Xi,Jc=(0,V_e.__importStar)(Z);G$.default=new Jc.Type("dateFromStringOrNumber",e=>e instanceof Date,(e,t)=>(0,z_e.pipe)(Jc.union([Jc.number,Jc.string]).validate(e,t),(0,Q_e.chain)(n=>{const r=new Date(n);return isNaN(r.getTime())?Jc.failure(e,t):Jc.success(r)})),e=>e);var J$={};Object.defineProperty(J$,"__esModule",{value:!0});const H_e=Q,Y_e=Ka,G_e=Xi,Bh=(0,H_e.__importStar)(Z);J$.default=new Bh.Type("dateFromTsMs",e=>e instanceof Date,(e,t)=>(0,G_e.pipe)(Bh.number.validate(e,t),(0,Y_e.chain)(n=>{const r=new Date(n);return isNaN(r.getTime())?Bh.failure(e,t):Bh.success(r)})),e=>e.getTime());var eq={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmptyArrayOrElse=e.EmptyObjectOrElse=e.NullOrElse=e.DefaultOrElse=void 0;const t=Q,n=ln,r=(0,t.__importStar)(Z),i=en,o=c=>l=>new r.Type(`DefaultOrElse<${c.name}, ${l.name}>`,d=>d===null||l.is(d),(d,p)=>(0,n.isRight)(c.validate(d,p))?r.success(null):l.validate(d,p),d=>d?l.encode(d):void 0);e.DefaultOrElse=o;const a=c=>(0,e.DefaultOrElse)(r.null)(c);e.NullOrElse=a;const s=c=>(0,e.DefaultOrElse)(i.EmptyObject)(c);e.EmptyObjectOrElse=s;const u=c=>(0,e.DefaultOrElse)(i.EmptyArray)(c);e.EmptyArrayOrElse=u})(eq);var Z$={};Object.defineProperty(Z$,"__esModule",{value:!0});const J_e=Q,Z_e=Ka,X_e=Xi,Js=(0,J_e.__importStar)(Z);Z$.default=new Js.Type("IntFromNumber",Js.Int.is,(e,t)=>(0,X_e.pipe)(Js.number.validate(e,t),(0,Z_e.chain)(n=>Js.Int.is(n)?Js.success(n):Js.success(Math.round(n)))),Js.Int.encode);var X$={};Object.defineProperty(X$,"__esModule",{value:!0});const eIe=Q,tIe=Ka,nIe=Xi,Zc=(0,eIe.__importStar)(Z),rIe=/^([0-9]+)px$/;X$.default=new Zc.Type("IntFromPixels",Zc.Int.is,(e,t)=>(0,nIe.pipe)(Zc.string.validate(e,t),(0,tIe.chain)(n=>{try{const r=n.match(rIe);if(!r)return Zc.failure(e,t);const i=parseInt(r[1]);return Zc.success(i)}catch{return Zc.failure(e,t)}})),String);var eR={};Object.defineProperty(eR,"__esModule",{value:!0});const iIe=Q,oIe=(0,iIe.__importStar)(Z),JO=Xe;eR.default=(0,JO.withCustomError)((0,JO.refineType)(oIe.string,"nonEmptyString",e=>e.trim().length>0),()=>"The value must be a non-empty string");var tR={},M0={};Object.defineProperty(M0,"__esModule",{value:!0});const aIe=Q,sIe=(0,aIe.__importStar)(Z),uIe=Xe;M0.default=(0,uIe.nullable)(sIe.string);Object.defineProperty(tR,"__esModule",{value:!0});const cIe=Q,lIe=Ka,fIe=Xi,gb=Z,dIe=(0,cIe.__importDefault)(M0);tR.default=new gb.Type("nonEmptyStringOrNull",e=>typeof e=="string"||e===null,(e,t)=>(0,fIe.pipe)(dIe.default.validate(e,t),(0,lIe.chain)(n=>typeof n=="string"&&n.length>0?(0,gb.success)(n):(0,gb.success)(null))),e=>e);var nR={};Object.defineProperty(nR,"__esModule",{value:!0});const pIe=Q,AIe=(0,pIe.__importStar)(Z),hIe=Xe;nR.default=(0,hIe.nullable)(AIe.number);var rR={};Object.defineProperty(rR,"__esModule",{value:!0});const mIe=Q,Ph=(0,mIe.__importStar)(Z),ZO=en;rR.default=(e,t,n)=>ZO.Number.pipe(new Ph.Type("numberInRange",r=>ZO.Number.is(r),(r,i)=>r>t||r<e?Ph.failure(r,i,`${n} must be a number between ${e} and ${t}`):Ph.success(r),Ph.identity));var iR={};Object.defineProperty(iR,"__esModule",{value:!0});const gIe=Q,vIe=Ka,yIe=Xi,Dh=(0,gIe.__importStar)(Z);iR.default=new Dh.Type("StringFromInt",Dh.string.is,(e,t)=>(0,yIe.pipe)(Dh.boolean.validate(e,t),(0,vIe.chain)(n=>Dh.success(n.toString()))),e=>e);var oR={};Object.defineProperty(oR,"__esModule",{value:!0});const bIe=Q,CIe=Ka,SIe=Xi,Wh=(0,bIe.__importStar)(Z);oR.default=new Wh.Type("StringFromInt",Wh.string.is,(e,t)=>(0,SIe.pipe)(Wh.number.validate(e,t),(0,CIe.chain)(n=>Wh.success(n.toString()))),e=>e);var XO;function ft(){return XO||(XO=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.StringOrNull=e.StringFromNumber=e.StringFromBoolean=e.NumberRange=e.NumberOrNull=e.NonEmptyStringOrNull=e.NonEmptyString=e.IntFromPixels=e.IntFromNumber=e.Function=e.DateFromTsMs=e.DateFromStringOrNumber=e.DateFromString=void 0;const t=Q;(0,t.__exportStar)(en,e);var n=q_e();Object.defineProperty(e,"DateFromString",{enumerable:!0,get:function(){return(0,t.__importDefault)(n).default}});var r=G$;Object.defineProperty(e,"DateFromStringOrNumber",{enumerable:!0,get:function(){return(0,t.__importDefault)(r).default}});var i=J$;Object.defineProperty(e,"DateFromTsMs",{enumerable:!0,get:function(){return(0,t.__importDefault)(i).default}}),(0,t.__exportStar)(eq,e),e.Function=(0,t.__importStar)(Xe);var o=Z$;Object.defineProperty(e,"IntFromNumber",{enumerable:!0,get:function(){return(0,t.__importDefault)(o).default}});var a=X$;Object.defineProperty(e,"IntFromPixels",{enumerable:!0,get:function(){return(0,t.__importDefault)(a).default}});var s=eR;Object.defineProperty(e,"NonEmptyString",{enumerable:!0,get:function(){return(0,t.__importDefault)(s).default}});var u=tR;Object.defineProperty(e,"NonEmptyStringOrNull",{enumerable:!0,get:function(){return(0,t.__importDefault)(u).default}});var c=nR;Object.defineProperty(e,"NumberOrNull",{enumerable:!0,get:function(){return(0,t.__importDefault)(c).default}});var l=rR;Object.defineProperty(e,"NumberRange",{enumerable:!0,get:function(){return(0,t.__importDefault)(l).default}});var d=iR;Object.defineProperty(e,"StringFromBoolean",{enumerable:!0,get:function(){return(0,t.__importDefault)(d).default}});var p=oR;Object.defineProperty(e,"StringFromNumber",{enumerable:!0,get:function(){return(0,t.__importDefault)(p).default}});var A=M0;Object.defineProperty(e,"StringOrNull",{enumerable:!0,get:function(){return(0,t.__importDefault)(A).default}})}(mb)),mb}var Ti={},wr={},hd={},Na={},aR={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BooleanField=e.BooleanConfig=e.BooleanFieldType=void 0;const n=(0,Q.__importStar)(Z),r=ft();e.BooleanFieldType="Boolean",e.BooleanConfig=n.exact(n.partial({label:r.StringOrNull,default_value:n.boolean,placeholder_true:n.string,placeholder_false:n.string})),e.BooleanField=n.exact(n.intersection([n.type({type:n.literal(e.BooleanFieldType)}),n.partial({config:e.BooleanConfig})]))})(aR);var sR={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Color=e.ColorConfig=e.ColorFieldType=void 0;const n=(0,Q.__importStar)(Z),r=ft();e.ColorFieldType="Color",e.ColorConfig=n.exact(n.partial({label:r.StringOrNull,placeholder:n.string})),e.Color=n.exact(n.intersection([n.type({type:n.literal(e.ColorFieldType)}),n.partial({fieldset:r.StringOrNull,config:e.ColorConfig})]))})(sR);var uR={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Date=e.DateConfig=e.DateFieldType=void 0;const n=(0,Q.__importStar)(Z),r=ft();e.DateFieldType="Date",e.DateConfig=n.exact(n.partial({label:r.StringOrNull,placeholder:n.string,default:n.string})),e.Date=n.exact(n.intersection([n.type({type:n.literal(e.DateFieldType)}),n.partial({fieldset:r.StringOrNull,config:e.DateConfig})]))})(uR);var cR={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Embed=e.EmbedConfig=e.EmbedFieldType=void 0;const n=(0,Q.__importStar)(Z),r=ft();e.EmbedFieldType="Embed",e.EmbedConfig=n.exact(n.partial({label:r.StringOrNull,placeholder:n.string,useAsTitle:n.boolean})),e.Embed=n.exact(n.intersection([n.type({type:n.literal(e.EmbedFieldType)}),n.partial({fieldset:r.StringOrNull,config:e.EmbedConfig})]))})(cR);var lR={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.GeoPoint=e.GeoPointConfig=e.GeoPointFieldType=void 0;const n=(0,Q.__importStar)(Z),r=ft();e.GeoPointFieldType="GeoPoint",e.GeoPointConfig=n.exact(n.partial({label:r.StringOrNull})),e.GeoPoint=n.exact(n.intersection([n.type({type:n.literal(e.GeoPointFieldType)}),n.partial({fieldset:r.StringOrNull,config:e.GeoPointConfig})]))})(lR);var fR={},gh={},L0={},md={},$u={};Object.defineProperty($u,"__esModule",{value:!0});$u.pipe=$u.pipeable=void 0;var rC=Ge,_Ie=function(e){return typeof e.map=="function"},IIe=function(e){return typeof e.contramap=="function"},TIe=function(e){return typeof e.mapWithIndex=="function"},xIe=function(e){return typeof e.ap=="function"},wIe=function(e){return typeof e.chain=="function"},EIe=function(e){return typeof e.bimap=="function"},$Ie=function(e){return typeof e.extend=="function"},RIe=function(e){return typeof e.reduce=="function"},OIe=function(e){return typeof e.reduceWithIndex=="function"},FIe=function(e){return typeof e.alt=="function"},kIe=function(e){return typeof e.compact=="function"},MIe=function(e){return typeof e.filter=="function"},LIe=function(e){return typeof e.filterWithIndex=="function"},jIe=function(e){return typeof e.promap=="function"},UIe=function(e){return typeof e.compose=="function"},BIe=function(e){return typeof e.throwError=="function"};function PIe(e){var t={};if(_Ie(e)){var n=function(M){return function(O){return e.map(O,M)}};t.map=n}if(IIe(e)){var r=function(M){return function(O){return e.contramap(O,M)}};t.contramap=r}if(TIe(e)){var i=function(M){return function(O){return e.mapWithIndex(O,M)}};t.mapWithIndex=i}if(xIe(e)){var o=function(M){return function(O){return e.ap(O,M)}},a=function(M){return function(O){return e.ap(e.map(O,function(q){return function(){return q}}),M)}};t.ap=o,t.apFirst=a,t.apSecond=function(M){return function(O){return e.ap(e.map(O,function(){return function(q){return q}}),M)}}}if(wIe(e)){var s=function(M){return function(O){return e.chain(O,M)}},u=function(M){return function(O){return e.chain(O,function(q){return e.map(M(q),function(){return q})})}},c=function(M){return e.chain(M,rC.identity)};t.chain=s,t.chainFirst=u,t.flatten=c}if(EIe(e)){var l=function(M,O){return function(q){return e.bimap(q,M,O)}},d=function(M){return function(O){return e.mapLeft(O,M)}};t.bimap=l,t.mapLeft=d}if($Ie(e)){var p=function(M){return function(O){return e.extend(O,M)}},A=function(M){return e.extend(M,rC.identity)};t.extend=p,t.duplicate=A}if(RIe(e)){var m=function(M,O){return function(q){return e.reduce(q,M,O)}},g=function(M){var O=e.foldMap(M);return function(q){return function(ue){return O(ue,q)}}},_=function(M,O){return function(q){return e.reduceRight(q,M,O)}};t.reduce=m,t.foldMap=g,t.reduceRight=_}if(OIe(e)){var b=function(M,O){return function(q){return e.reduceWithIndex(q,M,O)}},I=function(M){var O=e.foldMapWithIndex(M);return function(q){return function(ue){return O(ue,q)}}},x=function(M,O){return function(q){return e.reduceRightWithIndex(q,M,O)}};t.reduceWithIndex=b,t.foldMapWithIndex=I,t.reduceRightWithIndex=x}if(FIe(e)){var v=function(M){return function(O){return e.alt(O,M)}};t.alt=v}if(kIe(e)&&(t.compact=e.compact,t.separate=e.separate),MIe(e)){var S=function(M){return function(O){return e.filter(O,M)}},y=function(M){return function(O){return e.filterMap(O,M)}},T=function(M){return function(O){return e.partition(O,M)}},w=function(M){return function(O){return e.partitionMap(O,M)}};t.filter=S,t.filterMap=y,t.partition=T,t.partitionMap=w}if(LIe(e)){var F=function(M){return function(O){return e.filterWithIndex(O,M)}},k=function(M){return function(O){return e.filterMapWithIndex(O,M)}},$=function(M){return function(O){return e.partitionWithIndex(O,M)}},P=function(M){return function(O){return e.partitionMapWithIndex(O,M)}};t.filterWithIndex=F,t.filterMapWithIndex=k,t.partitionWithIndex=$,t.partitionMapWithIndex=P}if(jIe(e)){var K=function(M,O){return function(q){return e.promap(q,M,O)}};t.promap=K}if(UIe(e)){var Y=function(M){return function(O){return e.compose(O,M)}};t.compose=Y}if(BIe(e)){var ee=function(M){return function(O){return O._tag==="None"?e.throwError(M()):e.of(O.value)}},re=function(M){return M._tag==="Left"?e.throwError(M.left):e.of(M.right)},D=function(M,O){return function(q){return M(q)?e.of(q):e.throwError(O(q))}},G=function(M,O){return function(q){return e.chain(q,function(ue){return M(ue)?e.of(ue):e.throwError(O(ue))})}};t.fromOption=ee,t.fromEither=re,t.fromPredicate=D,t.filterOrElse=G}return t}$u.pipeable=PIe;$u.pipe=rC.pipe;var DIe=he&&he.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),WIe=he&&he.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),KIe=he&&he.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)Object.hasOwnProperty.call(e,n)&&DIe(t,e,n);return WIe(t,e),t};Object.defineProperty(md,"__esModule",{value:!0});md.NumberFromString=void 0;var bd=KIe(Z),NIe=$u,qIe=ln;md.NumberFromString=new bd.Type("NumberFromString",bd.number.is,function(e,t){return NIe.pipe(bd.string.validate(e,t),qIe.chain(function(n){var r=+n;return isNaN(r)||n.trim()===""?bd.failure(e,t):bd.success(r)}))},String);var VIe=he&&he.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),QIe=he&&he.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),zIe=he&&he.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)Object.hasOwnProperty.call(e,n)&&VIe(t,e,n);return QIe(t,e),t};Object.defineProperty(L0,"__esModule",{value:!0});L0.IntFromString=void 0;var Cd=zIe(Z),eF=md,HIe=$u,YIe=ln;L0.IntFromString=new Cd.Type("IntFromString",Cd.Int.is,function(e,t){return HIe.pipe(eF.NumberFromString.validate(e,t),YIe.chain(function(n){return Cd.Int.is(n)?Cd.success(n):Cd.failure(e,t)}))},eF.NumberFromString.encode);Object.defineProperty(gh,"__esModule",{value:!0});const GIe=Q,JIe=ln,qo=(0,GIe.__importStar)(Z),ZIe=L0,tF=ft(),nF=new qo.Type("SideConstraints",e=>!e||typeof e=="number",(e,t)=>JIe.either.chain(qo.union([qo.literal("auto"),qo.literal(""),qo.Int,ZIe.IntFromString,tF.IntFromNumber,tF.IntFromPixels,qo.null]).validate(e,t),n=>n==="auto"||n===""?qo.success(null):qo.success(n)),e=>e),XIe=qo.partial({width:nF,height:nF});gh.default=XIe;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Image=e.ImageConfig=e.Thumbnail=e.ImageFieldType=void 0;const t=Q,n=(0,t.__importStar)(Z),r=ft(),i=(0,t.__importDefault)(gh);e.ImageFieldType="Image",e.Thumbnail=n.exact(n.intersection([n.type({name:n.string}),i.default])),e.ImageConfig=n.exact(n.partial({label:r.StringOrNull,placeholder:n.string,constraint:i.default,thumbnails:n.readonlyArray(e.Thumbnail)})),e.Image=n.exact(n.intersection([n.type({type:n.literal(e.ImageFieldType)}),n.partial({fieldset:r.StringOrNull,config:e.ImageConfig})]))})(fR);var dR={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.IntegrationField=e.IntegrationFieldConfig=e.IntegrationFieldType=void 0;const n=(0,Q.__importStar)(Z),r=ft();e.IntegrationFieldType="IntegrationFields",e.IntegrationFieldConfig=n.exact(n.partial({label:r.StringOrNull,placeholder:n.string,catalog:n.string})),e.IntegrationField=n.exact(n.intersection([n.type({type:n.literal(e.IntegrationFieldType)}),n.partial({fieldset:r.StringOrNull,config:e.IntegrationFieldConfig})]))})(dR);var pR={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Link=e.LinkConfig=e.LinkFieldType=void 0;const t=Q,n=ln,r=(0,t.__importStar)(Z),i=Ad,o=ft(),a=c=>{if(c instanceof Array&&c.reduce((d,p)=>d&&typeof p=="string",!0))return r.success(c)},s=c=>{if(typeof c=="string")return r.success([c])},u=new r.Type("MasksArrayString",c=>c instanceof Array,(c,l)=>n.either.chain(r.union([r.array(r.string),r.string]).validate(c,l),d=>a(d)||s(d)||r.failure(c,l)),c=>c);e.LinkFieldType="Link",e.LinkConfig=r.exact(r.partial({label:o.StringOrNull,useAsTitle:r.boolean,placeholder:r.string,select:(0,i.withFallback)(r.union([r.literal("media"),r.literal("document"),r.literal("web"),r.null]),null),customtypes:r.readonlyArray(r.string),masks:u,tags:u,allowTargetBlank:r.boolean,allowText:r.boolean})),e.Link=r.exact(r.intersection([r.type({type:r.literal(e.LinkFieldType)}),r.partial({fieldset:o.StringOrNull,config:e.LinkConfig})]))})(pR);var AR={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Number=e.NumberConfig=e.NumberFieldType=void 0;const n=(0,Q.__importStar)(Z),r=md,i=ft();e.NumberFieldType="Number",e.NumberConfig=n.exact(n.partial({label:i.StringOrNull,placeholder:n.string,min:n.union([n.number,r.NumberFromString]),max:n.union([n.number,r.NumberFromString]),step:n.union([n.number,r.NumberFromString])})),e.Number=n.exact(n.intersection([n.type({type:n.literal(e.NumberFieldType)}),n.partial({fieldset:i.StringOrNull,config:e.NumberConfig})]))})(AR);var hR={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Range=e.RangeConfig=e.RangeFieldType=void 0;const n=(0,Q.__importStar)(Z),r=md,i=ft();e.RangeFieldType="Range",e.RangeConfig=n.exact(n.partial({label:i.StringOrNull,placeholder:n.string,min:n.union([n.number,r.NumberFromString]),max:n.union([n.number,r.NumberFromString]),step:n.union([n.number,r.NumberFromString])})),e.Range=n.exact(n.intersection([n.type({type:n.literal(e.RangeFieldType)}),n.partial({fieldset:i.StringOrNull,config:e.RangeConfig})]))})(hR);var mR={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RichText=e.RichTextConfig=e.RichTextNodeTypeCodec=e.RichTextNodeType=e.DEFAULT_OPTION=e.RichTextFieldType=void 0;const t=Q,n=lt,r=ln,i=Ge,o=(0,t.__importStar)(Z),a=ft(),s=(0,t.__importDefault)(gh);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=o.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});const u=new o.Type("RichTextOptions",m=>typeof m=="string",m=>(0,i.pipe)(o.union([o.string,o.null]).decode(m),n.either.map(g=>{if(!g)return e.DEFAULT_OPTION;const b=g.split(",").map(I=>I.trim()).filter(I=>(0,r.getOrElseW)(()=>{})(e.RichTextNodeTypeCodec.decode(I)));return b.length?b.join(","):e.DEFAULT_OPTION})),m=>m),c=m=>{if(!m)return o.success([])},l=m=>{if(m instanceof Object){const g=m;if(!Object.entries(g).length)return o.success([]);if(g[""])return o.success(g[""].map(b=>b.name));const _=Object.entries(g).reduce((b,[,I])=>b.concat(I.map(x=>x.name)),[]).filter(Boolean);return o.success(_)}},d=m=>{if(m instanceof Array&&m.reduce((_,b)=>_&&typeof b=="string",!0))return o.success(m)},p=m=>{if(typeof m=="string")return o.success([m])},A=new o.Type("RichTextLabels",m=>m instanceof Array,(m,g)=>{const _=o.record(o.string,o.readonlyArray(o.record(o.literal("name"),o.string))),b=o.readonlyArray(o.string);return(0,i.pipe)(o.union([_,b,o.string,o.null]).decode(m),n.either.chain(I=>c(I)||d(I)||l(I)||p(I)||o.failure(m,g)))},m=>m);e.RichTextConfig=o.exact(o.partial({label:a.StringOrNull,placeholder:o.string,useAsTitle:o.boolean,single:u,multi:u,imageConstraint:s.default,labels:A,allowTargetBlank:o.boolean})),e.RichText=o.exact(o.intersection([o.type({type:o.literal(e.RichTextFieldType)}),o.partial({fieldset:a.StringOrNull,config:e.RichTextConfig})]))})(mR);var gR={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Select=e.SelectConfig=e.SelectFieldType=void 0;const n=(0,Q.__importStar)(Z),r=ft();e.SelectFieldType="Select",e.SelectConfig=n.exact(n.partial({label:r.StringOrNull,placeholder:n.string,default_value:n.string,options:n.readonlyArray(n.union([n.string,r.StringFromNumber,r.StringFromBoolean]))})),e.Select=n.exact(n.intersection([n.type({type:n.literal(e.SelectFieldType)}),n.partial({fieldset:r.StringOrNull,config:e.SelectConfig})]))})(gR);var vR={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Separator=e.SeparatorConfig=e.SeparatorFieldType=void 0;const n=(0,Q.__importStar)(Z),r=ft();e.SeparatorFieldType="Separator",e.SeparatorConfig=n.exact(n.partial({label:r.StringOrNull})),e.Separator=n.exact(n.intersection([n.type({type:n.literal(e.SeparatorFieldType)}),n.partial({config:e.SeparatorConfig})]))})(vR);var yR={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Text=e.TextConfig=e.TextFieldType=void 0;const n=(0,Q.__importStar)(Z),r=ft();e.TextFieldType="Text",e.TextConfig=n.exact(n.partial({label:r.StringOrNull,useAsTitle:n.boolean,placeholder:n.string})),e.Text=n.exact(n.intersection([n.type({type:n.literal(e.TextFieldType)}),n.partial({fieldset:r.StringOrNull,config:e.TextConfig})]))})(yR);var bR={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Timestamp=e.TimestampConfig=e.TimestampFieldType=void 0;const n=(0,Q.__importStar)(Z),r=ft();e.TimestampFieldType="Timestamp",e.TimestampConfig=n.exact(n.partial({label:r.StringOrNull,placeholder:n.string,default:n.string})),e.Timestamp=n.exact(n.intersection([n.type({type:n.literal(e.TimestampFieldType)}),n.partial({fieldset:r.StringOrNull,config:e.TimestampConfig})]))})(bR);Object.defineProperty(Na,"__esModule",{value:!0});Na.NestableWidget=void 0;const eTe=Q,tTe=(0,eTe.__importStar)(Z),nTe=aR,rTe=sR,iTe=uR,oTe=cR,aTe=lR,sTe=fR,uTe=dR,cTe=pR,lTe=AR,fTe=hR,dTe=mR,pTe=gR,ATe=vR,hTe=yR,mTe=bR;Na.NestableWidget=tTe.union([rTe.Color,nTe.BooleanField,oTe.Embed,aTe.GeoPoint,iTe.Date,lTe.Number,fTe.Range,dTe.RichText,pTe.Select,ATe.Separator,hTe.Text,mTe.Timestamp,cTe.Link,sTe.Image,uTe.IntegrationField]);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Group=e.GroupConfig=e.NestedGroup=e.NestedGroupConfig=e.GroupFieldType=void 0;const n=(0,Q.__importStar)(Z),r=Lc,i=ft(),o=Na;e.GroupFieldType="Group";const a=u=>n.exact(n.partial({label:i.StringOrNull,repeat:n.boolean,fields:n.record(r.WidgetKey,u)})),s=u=>n.exact(n.intersection([n.type({type:n.literal(e.GroupFieldType)}),n.partial({fieldset:i.StringOrNull,icon:n.string,description:n.string,config:a(u)})]));e.NestedGroupConfig=a(o.NestableWidget),e.NestedGroup=s(o.NestableWidget),e.GroupConfig=a(n.union([o.NestableWidget,e.NestedGroup])),e.Group=s(n.union([o.NestableWidget,e.NestedGroup]))})(hd);var vh={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Q;(0,t.__exportStar)(aR,e),(0,t.__exportStar)(sR,e),(0,t.__exportStar)(uR,e),(0,t.__exportStar)(cR,e),(0,t.__exportStar)(lR,e),(0,t.__exportStar)(fR,e),(0,t.__exportStar)(dR,e),(0,t.__exportStar)(pR,e),(0,t.__exportStar)(Na,e),(0,t.__exportStar)(AR,e),(0,t.__exportStar)(hR,e),(0,t.__exportStar)(mR,e),(0,t.__exportStar)(gR,e),(0,t.__exportStar)(vR,e),(0,t.__exportStar)(yR,e),(0,t.__exportStar)(bR,e)})(vh);var CR={},j0={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isCompositeSlice=e.CompositeSlice=e.CompositeSliceConfig=e.CompositeSliceType=void 0;const n=(0,Q.__importStar)(Z),r=Lc,i=ft(),o=Na;e.CompositeSliceType="Slice",e.CompositeSliceConfig=n.exact(n.partial({label:i.StringOrNull})),e.CompositeSlice=n.exact(n.intersection([n.type({type:n.literal(e.CompositeSliceType)}),n.partial({fieldset:i.StringOrNull,description:n.string,icon:n.string,display:n.string,"non-repeat":n.record(r.WidgetKey,o.NestableWidget),repeat:n.record(r.WidgetKey,o.NestableWidget),config:e.CompositeSliceConfig})]));function a(s){return s.type==="Slice"}e.isCompositeSlice=a})(j0);var Ru={};Object.defineProperty(Ru,"__esModule",{value:!0});Ru.isLegacySlice=Ru.LegacySlice=void 0;const gTe=Q,vTe=(0,gTe.__importStar)(Z),yTe=hd,bTe=Na;Ru.LegacySlice=vTe.union([bTe.NestableWidget,yTe.NestedGroup]);function CTe(e){return e.type!=="Slice"&&e.type!=="SharedSlice"}Ru.isLegacySlice=CTe;var yh={},Ou={};Object.defineProperty(Ou,"__esModule",{value:!0});Ou.isSlicePrimaryWidget=Ou.SlicePrimaryWidget=void 0;const STe=Q,_Te=(0,STe.__importStar)(Z),tq=hd,nq=vh;Ou.SlicePrimaryWidget=_Te.union([nq.NestableWidget,tq.Group]);const ITe=e=>nq.NestableWidget.is(e)||tq.Group.is(e);Ou.isSlicePrimaryWidget=ITe;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isDynamicSharedSlice=e.isStaticSharedSlice=e.SharedSlice=e.SharedSliceType=e.Variation=void 0;const n=(0,Q.__importStar)(Z),r=Ad,i=Lc,o=Na,a=Ou,s="https://images.prismic.io/slice-machine/621a5ec4-0387-4bc5-9860-2dd46cbc07cd_default_ss.png?auto=compress,format";e.Variation=n.exact(n.intersection([n.type({id:n.string,name:n.string,description:n.string,imageUrl:(0,r.withFallback)(n.string,s),docURL:n.string,version:n.string}),n.partial({display:n.string,primary:n.record(i.WidgetKey,a.SlicePrimaryWidget),items:n.record(i.WidgetKey,o.NestableWidget)})])),e.SharedSliceType="SharedSlice";const u=n.string,c=n.string;e.SharedSlice=n.exact(n.intersection([n.type({id:n.string,type:n.literal(e.SharedSliceType),name:n.string,variations:n.readonlyArray(e.Variation)}),n.partial({description:n.string,legacyPaths:n.record(u,c)})]));function l(p){return p.type==="SharedSlice"}e.isStaticSharedSlice=l;function d(p){return p.type==="SharedSlice"}e.isDynamicSharedSlice=d})(yh);var bh={};Object.defineProperty(bh,"__esModule",{value:!0});bh.SharedSliceRef=void 0;const TTe=Q,vb=(0,TTe.__importStar)(Z),xTe=yh;bh.SharedSliceRef=vb.exact(vb.type({type:vb.literal(xTe.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;const n=(0,Q.__importStar)(Z),r=Lc,i=ft(),o=j0,a=Ru,s=yh,u=bh;e.LegacySlicesFieldType="Choice",e.SlicesFieldType="Slices",e.SlicesLabels=n.union([n.record(n.string,n.readonlyArray(n.exact(n.intersection([n.type({name:n.string}),n.partial({display:n.string})])))),n.null]);function c(p){return n.exact(n.partial({label:i.StringOrNull,labels:e.SlicesLabels,choices:n.record(r.WidgetKey,n.union([a.LegacySlice,o.CompositeSlice,p]))}))}e.slicesConfigReader=c,e.StaticSlicesConfig=c(s.SharedSlice),e.DynamicSlicesConfig=c(u.SharedSliceRef);const l={toStatic(p,A){const m=Object.entries(p.choices||{}).reduce((g,[_,b])=>{if(b.type==="SharedSlice"){const I=A.get(_);return I?{...g,[_]:I}:g}else return{...g,[_]:b}},{});return{...p,choices:m}}};function d(p){return n.exact(n.intersection([n.type({type:n.keyof({[e.SlicesFieldType]:null,[e.LegacySlicesFieldType]:null})}),n.partial({fieldset:i.StringOrNull,config:p})]))}e.slicesReader=d,e.StaticSlices=d(e.StaticSlicesConfig),e.DynamicSlices=d(e.DynamicSlicesConfig),e.Slices={toStatic(p,A){return p.config?{...p,config:l.toStatic(p.config,A)}:p}}})(CR);var SR={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.UID=e.UIDConfig=e.UIDFieldType=void 0;const n=(0,Q.__importStar)(Z),r=ft();e.UIDFieldType="UID",e.UIDConfig=n.exact(n.partial({label:r.StringOrNull,useAsTitle:n.boolean,placeholder:n.string})),e.UID=n.exact(n.intersection([n.type({type:n.literal(e.UIDFieldType)}),n.partial({fieldset:r.StringOrNull,config:e.UIDConfig})]))})(SR);Object.defineProperty(wr,"__esModule",{value:!0});wr.Widgets=wr.FieldType=wr.DynamicWidget=wr.StaticWidget=wr.widgetReader=void 0;const wTe=Q,rq=(0,wTe.__importStar)(Z),iq=hd,Nn=vh,ETe=Na,rp=CR,oq=SR;function _R(e){return rq.union([oq.UID,ETe.NestableWidget,iq.Group,e])}wr.widgetReader=_R;wr.StaticWidget=_R(rp.StaticSlices);wr.DynamicWidget=_R(rp.DynamicSlices);wr.FieldType=rq.keyof({[Nn.ColorFieldType]:null,[Nn.BooleanFieldType]:null,[Nn.NumberFieldType]:null,[Nn.EmbedFieldType]:null,[Nn.GeoPointFieldType]:null,[Nn.DateFieldType]:null,[Nn.RangeFieldType]:null,[Nn.RichTextFieldType]:null,[Nn.SelectFieldType]:null,[Nn.SeparatorFieldType]:null,[Nn.TextFieldType]:null,[Nn.TimestampFieldType]:null,[Nn.LinkFieldType]:null,[Nn.ImageFieldType]:null,[Nn.IntegrationFieldType]:null,[oq.UIDFieldType]:null,[iq.GroupFieldType]:null,[rp.SlicesFieldType]:null,[rp.LegacySlicesFieldType]:null});wr.Widgets={toStatic(e,t){switch(e.type){case"Choice":case"Slices":return rp.Slices.toStatic(e,t);default:return e}}};Object.defineProperty(Ti,"__esModule",{value:!0});Ti.Sections=Ti.DynamicSection=Ti.StaticSection=Ti.sectionReader=void 0;const $Te=Q,RTe=(0,$Te.__importStar)(Z),OTe=Lc,IR=wr;function TR(e){return RTe.record(OTe.WidgetKey,e)}Ti.sectionReader=TR;Ti.StaticSection=TR(IR.StaticWidget);Ti.DynamicSection=TR(IR.DynamicWidget);Ti.Sections={toStatic(e,t){return Object.entries(e).reduce((r,[i,o])=>({...r,[i]:IR.Widgets.toStatic(o,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;const t=Q,n=ln,r=(0,t.__importStar)(Z),i=Ad,o=ft(),a=Ti;e.CustomTypeFormat={page:"page",custom:"custom"};class s extends Error{constructor(v){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=v,this.message=this._formatError(v)}_formatError(v){return`The following slices doesn't exists in your Prismic repository:
30
30
  ${v.map(y=>` - ${y}`).join(`
31
31
  `)}
32
- `}}function u(x){return r.exact(r.intersection([r.type({id:r.string,label:o.StringOrNull,repeatable:(0,i.withFallback)(r.boolean,!0),json:r.record(r.string,x),status:(0,i.withFallback)(r.boolean,!0)}),r.partial({format:(0,i.withFallback)(r.keyof(e.CustomTypeFormat),"custom")})]))}e.StaticCustomType=u(a.StaticSection),e.CustomType=u(a.DynamicSection);function c(x){return Object.entries(x.json).reduce((v,[,S])=>{const y=Object.entries(S);return v.concat(y)},[])}e.flattenWidgets=c;function l(x){return Object.entries(x.json).reduce((v,[,S])=>{const y=Object.entries(S);return v.concat(y)},[])}e.flattenSections=l;function d(x){return c(x).filter(([,y])=>y.type==="Slices").reduce((y,[,T])=>{const w=Object.entries(T.config&&T.config.choices?T.config.choices:{}).filter(([,O])=>O.type==="SharedSlice").map(([O])=>O);return y.concat(w)},[])}function p(x){const v=d(x);return function(S){return v.map(S)}}function A(x,v){const S=Object.entries(x.json).reduce((y,[T,w])=>({...y,[T]:a.Sections.toStatic(w,v)}),{});return{...x,json:S}}e.toStatic=A;function m(x,v){const S=p(x)(y=>{if(!v.get(y))return y}).filter(Boolean);return S.length>0?(0,n.left)(new s(S)):(0,n.right)(x)}e.validateSlices=m;function g(x,v){const S=Object.entries(x.json).reduce((y,[T,w])=>{const O=Object.entries(w).reduce((F,[$,P])=>{const K=v($,P);return K?{...F,[$]:K}:F},{});return{...y,[T]:O}},{});return{...x,json:S}}e.collectWidgets=g;function _(x,v){return g(x,(S,y)=>{if(y.type==="Slices"){if(!y.config||!y.config.choices)return y;const T=Object.entries(y.config.choices).reduce((O,[F,$])=>$.type==="SharedSlice"&&!v.get(F)?O:{...O,[F]:$},{}),w={...y.config,choices:T};return{...y,config:w}}return y})}e.filterMissingSharedSlices=_;function b(x){return Object.values(x.json).reduce((v,S)=>({...v,...S}),{})}e.flattenCustomTypeFields=b;function I(x){return Object.entries(x.fields).reduce((v,[,S])=>{var y;return S.type==="Slices"||S.type==="Choice"?{...v,...Object.entries(((y=S.config)===null||y===void 0?void 0:y.choices)||{}).reduce((T,[w,O])=>O.type==="SharedSlice"?{...T,[w]:O}:T,{})}:v},{})}e.collectSharedSlices=I})(X9);var aq={},U0={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DiffOperation=void 0,function(t){t.Added="added",t.Removed="removed",t.Updated="updated"}(e.DiffOperation||(e.DiffOperation={}))})(U0);var B0={},Zo={},P0={};Object.defineProperty(P0,"__esModule",{value:!0});P0.HexaColor=void 0;const FTe=/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/;P0.HexaColor={is:e=>FTe.test(e)};var D0={};Object.defineProperty(D0,"__esModule",{value:!0});D0.toRecord=void 0;function kTe(e,t){return e.reduce((n,r)=>{const i=t(r);return{...n,[i]:r}},{})}D0.toRecord=kTe;var Er={};Object.defineProperty(Er,"__esModule",{value:!0});Er.mapValues=Er.isObject=Er.withOptionals=Er.isNotEmpty=Er.zipObjects=void 0;const MTe=Q,LTe=ln,yb=(0,MTe.__importStar)(Z);function jTe(e,t){return[...new Set(Object.keys(e||{}).concat(Object.keys(t||{})))].reduce((r,i)=>{const o=e==null?void 0:e[i],a=t==null?void 0:t[i];return{...r,[i]:{left:o,right:a}}},{})}Er.zipObjects=jTe;function UTe(e){return!!Object.keys(e).length}Er.isNotEmpty=UTe;function BTe(e,t){return{...e,...t.reduce((n,[r,i])=>i?{...n,[r]:i}:n,{})}}Er.withOptionals=BTe;const PTe=yb.record(yb.string,yb.unknown);function DTe(e){return(0,LTe.isRight)(PTe.decode(e))}Er.isObject=DTe;function WTe(e,t){return Object.entries(e).reduce((n,[r,i])=>({...n,[r]:t(i,r)}),{})}Er.mapValues=WTe;Object.defineProperty(Zo,"__esModule",{value:!0});Zo.Objects=Zo.Arrays=Zo.HexaColorCode=void 0;const xR=Q;Zo.HexaColorCode=(0,xR.__importStar)(P0);Zo.Arrays=(0,xR.__importStar)(D0);Zo.Objects=(0,xR.__importStar)(Er);var Ch={};Object.defineProperty(Ch,"__esModule",{value:!0});Ch.VariationComparator=void 0;const Em=Zo,bb=hd,Ja=U0;function KTe(e,t){const n=Em.Objects.zipObjects(e,t);return Object.entries(n).reduce((r,[i,o])=>i==="primary"||i==="items"||(o==null?void 0:o.left)===(o==null?void 0:o.right)?r:{...r,[i]:o==null?void 0:o.right},{})}function $m(e,t){const n=Em.Objects.zipObjects(e,t),r=Object.entries(n).reduce((i,[o,a])=>{if(JSON.stringify(a==null?void 0:a.left)===JSON.stringify(a==null?void 0:a.right))return i;const s=(()=>{var u,c,l,d,p,A,m;if(!(!(a!=null&&a.left)&&!(a!=null&&a.right))){if(a!=null&&a.left&&!a.right)return{op:Ja.DiffOperation.Removed};if(!(a!=null&&a.left)&&(a!=null&&a.right)){if(((u=a.right)===null||u===void 0?void 0:u.type)===bb.GroupFieldType){const g={...a.right,config:{...a.right.config,fields:{}}};return g.config.fields=$m(void 0,(c=a.right.config)===null||c===void 0?void 0:c.fields)||{},{op:Ja.DiffOperation.Added,value:g}}return{op:Ja.DiffOperation.Added,value:a.right}}if(((l=a.right)===null||l===void 0?void 0:l.type)===bb.GroupFieldType){const g={...a.right,config:{...a.right.config,fields:{}}};return g.config.fields=$m(((d=a.left)===null||d===void 0?void 0:d.type)===bb.GroupFieldType?(A=(p=a.left)===null||p===void 0?void 0:p.config)===null||A===void 0?void 0:A.fields:void 0,(m=a.right.config)===null||m===void 0?void 0:m.fields)||{},{op:Ja.DiffOperation.Updated,value:g}}return{op:Ja.DiffOperation.Updated,value:a.right}}})();return s?{...i,[o]:s}:i},{});return Em.Objects.isNotEmpty(r)?r:void 0}Ch.VariationComparator={compare(e,t){if(e&&!t)return{op:Ja.DiffOperation.Removed};if(!e&&t)return{op:Ja.DiffOperation.Added,value:t};const n=KTe(e,t),r=$m(e==null?void 0:e.primary,t==null?void 0:t.primary),i=$m(e==null?void 0:e.items,t==null?void 0:t.items),o={...n,...r?{primary:r}:{},...i?{items:i}:{}};if(Em.Objects.isNotEmpty(o))return{op:Ja.DiffOperation.Updated,value:o}}};Object.defineProperty(B0,"__esModule",{value:!0});B0.SliceComparator=void 0;const nl=Zo,Cb=U0,NTe=Ch;function qTe(e,t){const n=nl.Objects.zipObjects(e,t);return Object.entries(n).reduce((r,[i,o])=>i==="variations"||(o==null?void 0:o.left)===(o==null?void 0:o.right)?r:{...r,[i]:o==null?void 0:o.right},{})}B0.SliceComparator={compare(e,t){if(!e&&t)return{op:Cb.DiffOperation.Added,value:t};if(e&&!t)return{op:Cb.DiffOperation.Removed};const n=qTe(e,t),r=nl.Objects.zipObjects(e&&nl.Arrays.toRecord(e.variations,a=>a.id),t&&nl.Arrays.toRecord(t.variations,a=>a.id)),i=Object.entries(r).reduce((a,[s,u])=>{if(!u)return a;const c=NTe.VariationComparator.compare(u.left,u.right);return c?{...a,[s]:c}:a},{}),o={...n,...nl.Objects.isNotEmpty(i)?{variations:i}:{}};if(nl.Objects.isNotEmpty(o))return{op:Cb.DiffOperation.Updated,value:o}}};var sq={};Object.defineProperty(sq,"__esModule",{value:!0});(function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Q;(0,t.__exportStar)(U0,e),(0,t.__exportStar)(B0,e),(0,t.__exportStar)(Ch,e),(0,t.__exportStar)(sq,e)})(aq);var Mo={},uq={};(function(e){var t=he&&he.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(e,"__esModule",{value:!0}),e.ImageConstraint=void 0;var n=gh;Object.defineProperty(e,"ImageConstraint",{enumerable:!0,get:function(){return t(n).default}})})(uq);var cq={},lq={};Object.defineProperty(lq,"__esModule",{value:!0});var W0={};Object.defineProperty(W0,"__esModule",{value:!0});W0.SlicesTypes=void 0;const VTe=Q,QTe=(0,VTe.__importStar)(Z),zTe=j0,HTe=yh;W0.SlicesTypes=QTe.keyof({[zTe.CompositeSliceType]:null,[HTe.SharedSliceType]:null});(function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Q;(0,t.__exportStar)(j0,e),(0,t.__exportStar)(Ru,e),(0,t.__exportStar)(yh,e),(0,t.__exportStar)(bh,e),(0,t.__exportStar)(lq,e),(0,t.__exportStar)(Ou,e),(0,t.__exportStar)(CR,e),(0,t.__exportStar)(W0,e)})(cq);(function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Q;(0,t.__exportStar)(hd,e),(0,t.__exportStar)(vh,e),(0,t.__exportStar)(uq,e),(0,t.__exportStar)(cq,e),(0,t.__exportStar)(SR,e),(0,t.__exportStar)(wr,e)})(Mo);(function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Q;(0,t.__exportStar)(X9,e),(0,t.__exportStar)(aq,e),(0,t.__exportStar)(Ti,e),(0,t.__exportStar)(Mo,e)})(fe);var Sb={},_b={},Zs={},rF;function Dt(){if(rF)return Zs;rF=1,Object.defineProperty(Zs,"__esModule",{value:!0}),Zs.hasContentType=Zs.hasFieldContentType=void 0;const e=ln,t=OR();function n(i){var o;return r(i)&&i.__TYPE__===t.FieldContentType&&((o=i)===null||o===void 0?void 0:o.type)!==void 0&&typeof i.type=="string"&&(0,e.isRight)(t.FieldType.decode(i.type))}Zs.hasFieldContentType=n;function r(i){return typeof i=="object"&&i!==null&&"__TYPE__"in i}return Zs.hasContentType=r,Zs}var iF;function fq(){return iF||(iF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmptyContent=e.EmptyLegacy=e.isEmptyContent=e.EmptyContentType=void 0;const t=Q,n=lt,r=Ge,i=(0,t.__importStar)(Z),o=Dt();e.EmptyContentType="EmptyContent";const a=c=>(0,o.hasContentType)(c)&&c.__TYPE__===e.EmptyContentType;e.isEmptyContent=a;const s=i.union([i.null,i.type({value:i.null})]),u=c=>new i.Type("EmptyLegacy",e.isEmptyContent,l=>(0,r.pipe)(s.decode(l),n.either.map(()=>({type:c,__TYPE__:e.EmptyContentType}))),()=>null);e.EmptyLegacy=u,e.EmptyContent=i.strict({type:i.string,__TYPE__:i.literal(e.EmptyContentType)})}(_b)),_b}var Ib={},Qn={};Object.defineProperty(Qn,"__esModule",{value:!0});Qn.defaultCtx=Qn.getFieldCtx=Qn.LegacyContentCtx=Qn.FieldOrSliceType=void 0;const YTe=Q,GTe=(0,YTe.__importStar)(Z),oF=Mo;Qn.FieldOrSliceType=GTe.union([oF.FieldType,oF.SlicesTypes]);class wR{constructor(t,n,r){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=t,this.fieldPath=n||[],this.allTypes=r||new Map;const i=Array.of(this.fieldPath,[this.fieldKey]).flat().join(".");this.prefixedKey=i,this.keyOfType=`${i}_TYPE`,this.fieldType=this.allTypes.get(this.prefixedKey)}}Qn.LegacyContentCtx=wR;function JTe(e,t,n){return new wR(e,[...t.fieldPath,t.fieldKey,...n||[]],t.allTypes)}Qn.getFieldCtx=JTe;function ZTe(e,t=new Map){return new wR(e,[],t)}Qn.defaultCtx=ZTe;var Tb={},xb={},aF;function dq(){return aF||(aF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BooleanContentDefaultValue=e.BooleanContent=e.BooleanLegacy=e.isBooleanContent=e.BooleanContentType=void 0;const t=Q,n=lt,r=Ge,i=(0,t.__importStar)(Z),o=Dt();e.BooleanContentType="BooleanContent";const a=c=>(0,o.hasContentType)(c)&&c.__TYPE__===e.BooleanContentType;e.isBooleanContent=a;const s=c=>new i.Type("BooleanLegacy",e.isBooleanContent,l=>(0,r.pipe)(i.boolean.decode(l),n.either.map(d=>e.BooleanContent.encode({value:d,__TYPE__:e.BooleanContentType}))),l=>({content:l.value,types:{[c.keyOfType]:"Boolean"}}));e.BooleanLegacy=s,e.BooleanContent=i.strict({__TYPE__:i.literal(e.BooleanContentType),value:i.boolean});const u=c=>{var l;return((l=c.config)===null||l===void 0?void 0:l.default_value)!==void 0?{__TYPE__:e.BooleanContentType,value:c.config.default_value||!1}:void 0};e.BooleanContentDefaultValue=u}(xb)),xb}var wb={},sF;function ER(){return sF||(sF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmbedContent=e.EmbedLegacy=e.EmbedContentLegacy=e.isEmbedContent=e.EmbedContentType=void 0;const t=Q,n=lt,r=Ge,i=(0,t.__importStar)(Z),o=ft(),a=Dt();e.EmbedContentType="EmbedContent";const s=c=>(0,a.hasContentType)(c)&&c.__TYPE__===e.EmbedContentType;e.isEmbedContent=s,e.EmbedContentLegacy=i.exact(i.intersection([i.type({embed_url:i.string,type:i.string}),i.partial({version:i.union([i.string,i.number,i.null]),title:o.StringOrNull,author_name:o.StringOrNull,author_url:o.StringOrNull,provider_name:o.StringOrNull,provider_url:o.StringOrNull,cache_age:i.union([i.string,i.number,i.null]),thumbnail_url:o.StringOrNull,thumbnail_width:o.NumberOrNull,thumbnail_height:o.NumberOrNull,html:o.StringOrNull})]));const u=c=>new i.Type("EmbedLegacy",e.isEmbedContent,l=>(0,r.pipe)(e.EmbedContentLegacy.decode(l),n.either.map(d=>({...d,all:l,__TYPE__:e.EmbedContentType}))),l=>({content:l.all,types:{[c.keyOfType]:"Embed"}}));e.EmbedLegacy=u,e.EmbedContent=i.intersection([e.EmbedContentLegacy,i.strict({__TYPE__:i.literal(e.EmbedContentType),all:i.unknown})])}(wb)),wb}var Eb={},$b={},qa={};Object.defineProperty(qa,"__esModule",{value:!0});const XTe=Q,exe=Ka,txe=Xi,Kh=(0,XTe.__importStar)(Z);function nxe(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)}qa.default=new Kh.Type("TrimmedString",Kh.string.is,(e,t)=>(0,txe.pipe)(Kh.string.validate(e,t),(0,exe.chain)(n=>Kh.success(nxe(n)))),e=>e);var hi={};Object.defineProperty(hi,"__esModule",{value:!0});hi.FieldContentType=void 0;hi.FieldContentType="FieldContent";var uF;function cF(){return uF||(uF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ColorContent=e.ColorLegacy=e.isColorContent=void 0;const t=Q,n=lt,r=Ge,i=(0,t.__importStar)(Z),o=Mo,a=(0,t.__importDefault)(qa),s=Dt(),u=hi,c=d=>(0,s.hasContentType)(d)&&d.__TYPE__===u.FieldContentType&&(0,s.hasFieldContentType)(d)&&d.type==="Color";e.isColorContent=c;const l=d=>new i.Type("ColorLegacy",e.isColorContent,p=>(0,r.pipe)(a.default.decode(p),n.either.map(A=>e.ColorContent.encode({value:A,type:o.ColorFieldType,__TYPE__:u.FieldContentType}))),p=>({content:p.value,types:{[d.keyOfType]:o.ColorFieldType}}));e.ColorLegacy=l,e.ColorContent=i.strict({type:i.literal(o.ColorFieldType),value:a.default,__TYPE__:i.literal(u.FieldContentType)})}($b)),$b}var Rb={},lF;function fF(){return lF||(lF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DateContent=e.DateLegacy=e.isDateContent=void 0;const t=Q,n=lt,r=Ge,i=(0,t.__importStar)(Z),o=Mo,a=(0,t.__importDefault)(qa),s=Dt(),u=hi,c=d=>(0,s.hasContentType)(d)&&d.__TYPE__===u.FieldContentType&&(0,s.hasFieldContentType)(d)&&d.type==="Date";e.isDateContent=c;const l=d=>new i.Type("DateLegacy",e.isDateContent,p=>(0,r.pipe)(a.default.decode(p),n.either.map(A=>e.DateContent.encode({value:A,type:o.DateFieldType,__TYPE__:u.FieldContentType}))),p=>({content:p.value,types:{[d.keyOfType]:o.DateFieldType}}));e.DateLegacy=l,e.DateContent=i.strict({type:i.literal(o.DateFieldType),value:a.default,__TYPE__:i.literal(u.FieldContentType)})}(Rb)),Rb}var Ob={},dF;function pF(){return dF||(dF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NumberContent=e.NumberLegacy=e.isNumberContent=void 0;const t=Q,n=lt,r=Ge,i=(0,t.__importStar)(Z),o=Mo,a=(0,t.__importDefault)(qa),s=Dt(),u=hi,c=d=>(0,s.hasContentType)(d)&&d.__TYPE__===u.FieldContentType&&(0,s.hasFieldContentType)(d)&&d.type==="Number";e.isNumberContent=c;const l=d=>new i.Type("NumberLegacy",e.isNumberContent,p=>(0,r.pipe)(a.default.decode(p),n.either.map(A=>e.NumberContent.encode({value:A,type:o.NumberFieldType,__TYPE__:u.FieldContentType}))),p=>({content:p.value,types:{[d.keyOfType]:o.NumberFieldType}}));e.NumberLegacy=l,e.NumberContent=i.strict({type:i.literal(o.NumberFieldType),value:a.default,__TYPE__:i.literal(u.FieldContentType)})}(Ob)),Ob}var Fb={},AF;function hF(){return AF||(AF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RangeContent=e.RangeLegacy=e.isRangeContent=void 0;const t=Q,n=lt,r=Ge,i=(0,t.__importStar)(Z),o=Mo,a=(0,t.__importDefault)(qa),s=Dt(),u=hi,c=d=>(0,s.hasContentType)(d)&&d.__TYPE__===u.FieldContentType&&(0,s.hasFieldContentType)(d)&&d.type==="Range";e.isRangeContent=c;const l=d=>new i.Type("RangeLegacy",e.isRangeContent,p=>(0,r.pipe)(a.default.decode(p),n.either.map(A=>e.RangeContent.encode({value:A,type:o.RangeFieldType,__TYPE__:u.FieldContentType}))),p=>({content:p.value,types:{[d.keyOfType]:o.RangeFieldType}}));e.RangeLegacy=l,e.RangeContent=i.strict({type:i.literal(o.RangeFieldType),value:a.default,__TYPE__:i.literal(u.FieldContentType)})}(Fb)),Fb}var kb={},mF;function gF(){return mF||(mF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SelectContentDefaultValue=e.SelectContent=e.SelectLegacy=e.isSelectContent=void 0;const t=Q,n=lt,r=Ge,i=(0,t.__importStar)(Z),o=Mo,a=(0,t.__importDefault)(qa),s=Dt(),u=hi,c=p=>(0,s.hasContentType)(p)&&p.__TYPE__===u.FieldContentType&&(0,s.hasFieldContentType)(p)&&p.type==="Select";e.isSelectContent=c;const l=p=>new i.Type("SelectLegacy",e.isSelectContent,A=>(0,r.pipe)(a.default.decode(A),n.either.map(m=>e.SelectContent.encode({value:m,type:o.SelectFieldType,__TYPE__:u.FieldContentType}))),A=>({content:A.value,types:{[p.keyOfType]:o.SelectFieldType}}));e.SelectLegacy=l,e.SelectContent=i.strict({type:i.literal(o.SelectFieldType),value:a.default,__TYPE__:i.literal(u.FieldContentType)});const d=p=>{var A;return!((A=p.config)===null||A===void 0)&&A.default_value?{__TYPE__:u.FieldContentType,type:o.SelectFieldType,value:p.config.default_value||""}:void 0};e.SelectContentDefaultValue=d}(kb)),kb}var Mb={},vF;function yF(){return vF||(vF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TextContent=e.TextLegacy=e.isTextContent=void 0;const t=Q,n=lt,r=Ge,i=(0,t.__importStar)(Z),o=Mo,a=(0,t.__importDefault)(qa),s=Dt(),u=hi,c=d=>(0,s.hasContentType)(d)&&d.__TYPE__===u.FieldContentType&&(0,s.hasFieldContentType)(d)&&d.type==="Text";e.isTextContent=c;const l=d=>new i.Type("TextLegacy",e.isTextContent,p=>(0,r.pipe)(a.default.decode(p),n.either.map(A=>e.TextContent.encode({value:A,type:o.TextFieldType,__TYPE__:u.FieldContentType}))),p=>({content:p.value,types:{[d.keyOfType]:o.TextFieldType}}));e.TextLegacy=l,e.TextContent=i.strict({type:i.literal(o.TextFieldType),value:a.default,__TYPE__:i.literal(u.FieldContentType)})}(Mb)),Mb}var Lb={},bF;function CF(){return bF||(bF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TimestampContent=e.TimestampLegacy=e.isTimestampContent=void 0;const t=Q,n=lt,r=Ge,i=(0,t.__importStar)(Z),o=Mo,a=(0,t.__importDefault)(qa),s=Dt(),u=hi,c=d=>(0,s.hasContentType)(d)&&d.__TYPE__===u.FieldContentType&&(0,s.hasFieldContentType)(d)&&d.type==="Timestamp";e.isTimestampContent=c;const l=d=>new i.Type("TimestampLegacy",e.isTimestampContent,p=>(0,r.pipe)(a.default.decode(p),n.either.map(A=>e.TimestampContent.encode({value:A,type:o.TimestampFieldType,__TYPE__:u.FieldContentType}))),p=>({content:p.value,types:{[d.keyOfType]:o.TimestampFieldType}}));e.TimestampLegacy=l,e.TimestampContent=i.strict({type:i.literal(o.TimestampFieldType),value:a.default,__TYPE__:i.literal(u.FieldContentType)})}(Lb)),Lb}var SF;function pq(){return SF||(SF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FieldContent=e.FieldType=void 0;const t=Q,n=(0,t.__importStar)(Z),r=cF(),i=fF(),o=pF(),a=hF(),s=gF(),u=yF(),c=CF();e.FieldType=n.keyof({Text:null,Date:null,Timestamp:null,Color:null,Number:null,Range:null,Select:null}),e.FieldContent=n.union([i.DateContent,r.ColorContent,o.NumberContent,a.RangeContent,s.SelectContent,u.TextContent,c.TimestampContent]),(0,t.__exportStar)(cF(),e),(0,t.__exportStar)(hi,e),(0,t.__exportStar)(fF(),e),(0,t.__exportStar)(pF(),e),(0,t.__exportStar)(hF(),e),(0,t.__exportStar)(gF(),e),(0,t.__exportStar)(yF(),e),(0,t.__exportStar)(CF(),e)}(Eb)),Eb}var jb={},_F;function Aq(){return _F||(_F=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.GeoPointContent=e.GeoPointLegacy=e.isGeoPointContent=e.GeoPointContentType=void 0;const t=Q,n=lt,r=Xi,i=(0,t.__importStar)(Z),o=Dt();e.GeoPointContentType="GeoPointContent";const a=c=>(0,o.hasContentType)(c)&&c.__TYPE__===e.GeoPointContentType;e.isGeoPointContent=a;const s=i.strict({position:i.strict({lat:i.number,lng:i.number})}),u=c=>new i.Type("GeoPointLegacy",e.isGeoPointContent,l=>(0,r.pipe)(s.decode(l),n.either.map(d=>e.GeoPointContent.encode({...d,__TYPE__:e.GeoPointContentType}))),l=>({content:{position:l.position},types:{[c.keyOfType]:"GeoPoint"}}));e.GeoPointLegacy=u,e.GeoPointContent=i.intersection([s,i.strict({__TYPE__:i.literal(e.GeoPointContentType)})])}(jb)),jb}var Ub={},IF;function $R(){return IF||(IF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ImageContent=e.ImageLegacy=e.ImageContentView=e.isImageContent=e.ImageContentType=void 0;const t=Q,n=lt,r=Ge,i=(0,t.__importStar)(Z),o=Er,a=ft(),s=Dt();e.ImageContentType="ImageContent";const u=p=>(0,s.hasContentType)(p)&&p.__TYPE__===e.ImageContentType;e.isImageContent=u;const c=i.exact(i.type({id:i.string,url:i.string,width:i.number,height:i.number}));e.ImageContentView=i.exact(i.intersection([i.type({origin:c,width:i.number,height:i.number,edit:i.type({zoom:i.number,crop:i.type({x:i.number,y:i.number}),background:i.string})}),i.partial({url:i.string,credits:a.NonEmptyStringOrNull,alt:a.NonEmptyStringOrNull,provider:a.StringOrNull})]));const l=i.intersection([e.ImageContentView,i.partial({thumbnails:i.record(i.string,e.ImageContentView)})]),d=p=>new i.Type("ImageLegacy",e.isImageContent,A=>(0,r.pipe)(l.decode(A),n.either.map(m=>e.ImageContent.encode({...m,__TYPE__:e.ImageContentType}))),A=>({content:(0,o.withOptionals)({edit:A.edit,height:A.height,origin:A.origin,width:A.width},[["alt",A.alt],["credits",A.credits],["provider",A.provider],["thumbnails",A.thumbnails],["url",A.url]]),types:{[p.keyOfType]:"Image"}}));e.ImageLegacy=d,e.ImageContent=i.intersection([l,i.strict({__TYPE__:i.literal(e.ImageContentType)})])}(Ub)),Ub}var Bb={},TF;function hq(){return TF||(TF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.IntegrationFieldContent=e.IntegrationFieldLegacy=e.isIntegrationFieldContent=e.IntegrationFieldContentType=void 0;const t=Q,n=lt,r=Ge,i=(0,t.__importStar)(Z),o=Dt();e.IntegrationFieldContentType="IntegrationFieldsContent";const a=u=>(0,o.hasContentType)(u)&&u.__TYPE__===e.IntegrationFieldContentType;e.isIntegrationFieldContent=a;const s=u=>new i.Type("IntegrationFieldLegacy",e.isIntegrationFieldContent,c=>(0,r.pipe)(i.string.decode(c),n.either.map(l=>e.IntegrationFieldContent.encode({value:l,__TYPE__:e.IntegrationFieldContentType}))),c=>({content:c.value,types:{[u.keyOfType]:"IntegrationFields"}}));e.IntegrationFieldLegacy=s,e.IntegrationFieldContent=i.strict({__TYPE__:i.literal(e.IntegrationFieldContentType),value:i.string})}(Bb)),Bb}var Pb={},xF;function RR(){return xF||(xF=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;const t=Q,n=lt,r=Ge,i=(0,t.__importStar)(Z),o=O0,a=ft(),s=Xe,u=Dt();e.ImageLinkType="ImageLink";const c=i.intersection([i.strict({kind:i.string,id:i.string,url:i.string,height:i.string,width:i.string,size:i.string,name:i.string}),i.exact(i.partial({date:a.StringOrNull}))]),l=new i.Type("FilledImageLink",D=>(0,u.hasContentType)(D)&&D.__TYPE__===e.ImageLinkType,D=>(0,r.pipe)(c.decode(D),n.either.map(Y=>e.FilledImageLinkContent.encode({...Y,__TYPE__:e.ImageLinkType}))),D=>c.encode(D));e.FilledImageLinkContent=i.intersection([i.strict({__TYPE__:i.literal(e.ImageLinkType)}),c]);const d=i.union([i.intersection([c,i.exact(i.partial({text:i.string}))]),i.strict({kind:i.literal("image"),text:i.string})]),p=new i.Type("ImageLink",D=>(0,u.hasContentType)(D)&&D.__TYPE__===e.ImageLinkType,D=>(0,r.pipe)(d.decode(D),n.either.map(Y=>e.ImageLinkContent.encode({...Y,__TYPE__:e.ImageLinkType}))),D=>d.encode(D));e.ImageLinkContent=i.intersection([i.strict({__TYPE__:i.literal(e.ImageLinkType)}),d]),e.FileLinkType="FileLink";const A=i.exact(i.intersection([i.type({kind:i.string,id:i.string,url:i.string,name:i.string,size:(0,o.withFallback)(i.string,"0")}),i.partial({date:a.StringOrNull})])),m=new i.Type("FilledFileLink",D=>(0,u.hasContentType)(D)&&D.__TYPE__===e.FileLinkType,D=>(0,r.pipe)(A.decode(D),n.either.map(Y=>e.FilledFileLinkContent.encode({...Y,__TYPE__:e.FileLinkType}))),D=>A.encode(D));e.FilledFileLinkContent=i.intersection([i.strict({__TYPE__:i.literal(e.FileLinkType)}),A]);const g=i.union([i.intersection([A,i.exact(i.partial({text:i.string}))]),i.strict({kind:i.literal("file"),text:i.string})]),_=new i.Type("FileLink",D=>(0,u.hasContentType)(D)&&D.__TYPE__===e.FileLinkType,D=>(0,r.pipe)(g.decode(D),n.either.map(Y=>e.FileLinkContent.encode({...Y,__TYPE__:e.FileLinkType}))),D=>g.encode(D));e.FileLinkContent=i.intersection([i.strict({__TYPE__:i.literal(e.FileLinkType)}),g]),e.MediaLinkType="MediaLink";const b=i.strict({kind:i.literal("media"),text:i.string}),I=new i.Type("MediaLink",D=>(0,u.hasContentType)(D)&&D.__TYPE__===e.MediaLinkType,D=>(0,r.pipe)(b.decode(D),n.either.map(Y=>e.MediaLinkContent.encode({...Y,__TYPE__:e.MediaLinkType}))),D=>b.encode(D));e.MediaLinkContent=i.intersection([i.strict({__TYPE__:i.literal(e.MediaLinkType)}),b]),e.DocumentLinkType="DocumentLink";const x=i.strict({id:a.NonEmptyString}),v=new i.Type("FilledDocumentLink",D=>(0,u.hasContentType)(D)&&D.__TYPE__===e.DocumentLinkType,D=>(0,r.pipe)(x.decode(D),n.either.map(Y=>e.FilledDocumentLinkContent.encode({...Y,__TYPE__:e.DocumentLinkType}))),D=>x.encode(D));e.FilledDocumentLinkContent=i.intersection([i.strict({__TYPE__:i.literal(e.DocumentLinkType)}),x]);const S=i.union([i.intersection([x,i.exact(i.partial({text:i.string}))]),i.strict({kind:i.literal("document"),text:i.string})]),y=new i.Type("DocumentLink",D=>(0,u.hasContentType)(D)&&D.__TYPE__===e.DocumentLinkType,D=>(0,r.pipe)(S.decode(D),n.either.map(Y=>e.DocumentLinkContent.encode({...Y,__TYPE__:e.DocumentLinkType}))),D=>S.encode(D));e.DocumentLinkContent=i.intersection([i.strict({__TYPE__:i.literal(e.DocumentLinkType)}),S]),e.ExternalLinkType="ExternalLink";const T=i.exact(i.intersection([i.type({url:i.string}),i.partial({kind:i.literal("web"),target:a.StringOrNull,preview:(0,s.nullable)(i.partial({title:i.string}))})])),w=new i.Type("FilledExternalLink",D=>(0,u.hasContentType)(D)&&D.__TYPE__===e.ExternalLinkType,D=>(0,r.pipe)(T.decode(D),n.either.map(Y=>e.FilledExternalLinkContent.encode({...Y,__TYPE__:e.ExternalLinkType}))),D=>T.encode(D));e.FilledExternalLinkContent=i.intersection([i.strict({__TYPE__:i.literal(e.ExternalLinkType)}),T]);const O=i.union([i.intersection([T,i.exact(i.partial({text:i.string}))]),i.strict({kind:i.literal("web"),text:i.string})]),F=new i.Type("ExternalLink",D=>(0,u.hasContentType)(D)&&D.__TYPE__===e.ExternalLinkType,D=>(0,r.pipe)(O.decode(D),n.either.map(Y=>e.ExternalLinkContent.encode({...Y,__TYPE__:e.ExternalLinkType}))),D=>O.encode(D));e.ExternalLinkContent=i.intersection([i.strict({__TYPE__:i.literal(e.ExternalLinkType)}),O]),e.AnyLinkType="AnyLink";const $=i.strict({text:i.string}),P=new i.Type("AnyLink",D=>(0,u.hasContentType)(D)&&D.__TYPE__===e.AnyLinkType,D=>(0,r.pipe)($.decode(D),n.either.map(Y=>e.AnyLinkContent.encode({...Y,__TYPE__:e.AnyLinkType}))),D=>$.encode(D));e.AnyLinkContent=i.intersection([i.strict({__TYPE__:i.literal(e.AnyLinkType)}),$]),e.LinkContentType="LinkContent";const K=D=>(0,u.hasContentType)(D)&&D.__TYPE__===e.LinkContentType;e.isLinkContent=K,e.LinkLegacy=i.union([p,_,y,F,I,P]);const J=D=>new i.Type("LinkLegacy",e.isLinkContent,Y=>(0,r.pipe)(e.LinkLegacy.decode(Y),n.either.map(M=>e.LinkContent.encode({value:M,__TYPE__:e.LinkContentType}))),Y=>({content:e.LinkLegacy.encode(Y.value),types:{[D.keyOfType]:"Link"}}));e.LinkContentLegacy=J,e.Link=i.union([e.ImageLinkContent,e.FileLinkContent,e.DocumentLinkContent,e.ExternalLinkContent,e.MediaLinkContent,e.AnyLinkContent]),e.LinkContent=i.strict({__TYPE__:i.literal(e.LinkContentType),value:e.Link});const ee=D=>(0,u.hasContentType)(D)&&D.__TYPE__===e.LinkContentType;e.isFilledLinkContent=ee,e.FilledLinkLegacy=i.union([l,m,v,w]);const re=D=>new i.Type("FilledLinkLegacy",e.isFilledLinkContent,Y=>(0,r.pipe)(e.FilledLinkLegacy.decode(Y),n.either.map(M=>e.FilledLinkContent.encode({value:M,__TYPE__:e.LinkContentType}))),Y=>({content:e.FilledLinkLegacy.encode(Y.value),types:{[D.keyOfType]:"Link"}}));e.FilledLinkContentLegacy=re,e.FilledLink=i.union([e.FilledImageLinkContent,e.FilledFileLinkContent,e.FilledDocumentLinkContent,e.FilledExternalLinkContent]),e.FilledLinkContent=i.strict({__TYPE__:i.literal(e.LinkContentType),value:e.FilledLink})}(Pb)),Pb}var Ci={},Db={},Wb={},wF;function EF(){return wF||(wF=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;const t=Q,n=lt,r=ln,i=Ge,o=(0,t.__importStar)(Z),a=O0,s=vh,u=ft(),c=Xe,l=ER(),d=$R(),p=RR(),A=F=>o.strict({data:F,start:o.number,end:o.number,type:o.literal(s.RichTextNodeType.hyperlink)}),m=o.strict({data:(0,a.withFallback)(o.string,""),start:o.number,end:o.number,type:o.literal("label")}),g=o.strict({start:o.number,end:o.number,type:o.keyof({[s.RichTextNodeType.strong]:null,[s.RichTextNodeType.em]:null,"list-item":null})});e.Span=o.union([A(p.FilledLink),m,g]),e.SpanLegacy=o.union([A(p.FilledLinkLegacy),m,g]);const _=F=>new o.Type("ValidatedSpans",$=>Array.isArray($)&&$.every(F.is),($,P)=>{if(Array.isArray($)){const K=$.reduce((J,ee)=>{const re=F.decode(ee);return(0,r.isLeft)(re)?J:[...J,re.right]},[]).sort((J,ee)=>J.start-ee.start);return o.success(K)}else return o.failure($,P)},$=>$.reduce((P,K)=>{const J=F.encode(K);return[...P,J]},[]));e.ValidatedSpans=_;const b=F=>o.exact(o.intersection([o.type({type:o.literal(s.RichTextNodeType.image),data:o.intersection([d.ImageContentView,o.partial({linkTo:(0,c.nullable)(F)})])}),o.partial({label:u.StringOrNull,direction:u.StringOrNull})]));e.ImageBlock=b(p.FilledLink);const I=b(p.FilledLinkLegacy);function x(F){return F.type===s.RichTextNodeType.image}e.checkImageBlock=x;const v=o.exact(o.intersection([o.type({type:o.literal(s.RichTextNodeType.embed),data:o.unknown}),o.partial({label:u.StringOrNull,direction:u.StringOrNull})])),S=new o.Type("EmbedBlockLegacy",F=>F.type==="embed",F=>(0,i.pipe)(v.decode(F),n.either.chain($=>n.either.map(P=>[$,P])(l.EmbedContentLegacy.decode($.data))),n.either.map(([$,P])=>e.EmbedBlock.encode({...$,data:{...P,__TYPE__:l.EmbedContentType,all:$.data}}))),F=>({...v.encode(F),data:l.EmbedContentLegacy.encode(F.data)}));e.EmbedBlock=o.exact(o.intersection([o.type({type:o.literal(s.RichTextNodeType.embed),data:l.EmbedContent}),o.partial({label:u.StringOrNull,direction:u.StringOrNull})]));function y(F){return F.type===s.RichTextNodeType.embed}e.checkEmbedBlock=y;const T=F=>o.exact(o.intersection([o.type({type:(0,c.refineType)(s.RichTextNodeTypeCodec,`string which isn't ${s.RichTextNodeType.image} ${s.RichTextNodeType.embed}`,$=>$!==s.RichTextNodeType.image&&$!==s.RichTextNodeType.embed),content:o.intersection([o.type({text:o.string}),o.partial({spans:(0,e.ValidatedSpans)(F)})])}),o.partial({label:o.string,direction:o.string})]));e.TextBlock=T(e.Span);const w=T(e.SpanLegacy),O=o.union([S,I,w]);e.BlockLegacy=new o.Type("BlockLegacy",F=>S.is(F)||I.is(F)||w.is(F),F=>O.decode(F),F=>(()=>e.ImageBlock.is(F)?I.encode(F):e.EmbedBlock.is(F)?S.encode(F):w.encode(F))()),e.Block=o.union([e.ImageBlock,e.EmbedBlock,e.TextBlock])}(Wb)),Wb}var $F;function mq(){return $F||($F=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RichTextLegacy=e.RichTextContent=e.isRichTextContent=e.RichTextContentType=void 0;const t=Q,n=lt,r=Ge,i=(0,t.__importStar)(Z),o=Dt(),a=EF();e.RichTextContentType="StructuredTextContent";const s=l=>(0,o.hasContentType)(l)&&l.__TYPE__===e.RichTextContentType;e.isRichTextContent=s;const u=i.array(a.BlockLegacy);e.RichTextContent=i.strict({__TYPE__:i.literal(e.RichTextContentType),value:i.array(a.Block)}),(0,t.__exportStar)(EF(),e);const c=l=>new i.Type("RichTextLegacy",e.isRichTextContent,d=>(0,r.pipe)(u.decode(d),n.either.map(p=>({value:p,__TYPE__:e.RichTextContentType}))),d=>({content:u.encode(d.value),types:{[l.keyOfType]:"StructuredText"}}));e.RichTextLegacy=c}(Db)),Db}var Kb={},RF;function gq(){return RF||(RF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SeparatorContent=e.SeparatorLegacy=e.isSeparatorContent=e.SeparatorContentType=void 0;const n=(0,Q.__importStar)(Z),r=Dt();e.SeparatorContentType="SeparatorContent";const i=a=>(0,r.hasContentType)(a)&&a.__TYPE__===e.SeparatorContentType;e.isSeparatorContent=i;const o=a=>new n.Type("SeparatorLegacy",e.isSeparatorContent,()=>n.success(e.SeparatorContent.encode({__TYPE__:e.SeparatorContentType})),()=>({content:{},types:{[a.keyOfType]:"Separator"}}));e.SeparatorLegacy=o,e.SeparatorContent=n.strict({__TYPE__:n.literal(e.SeparatorContentType)})}(Kb)),Kb}var OF;function rxe(){if(OF)return Ci;OF=1,Object.defineProperty(Ci,"__esModule",{value:!0}),Ci.NestableLegacy=Ci.isNestableContent=Ci.NestableContentDefaultValue=Ci.NestableContent=void 0;const e=Q,t=ln,n=(0,e.__importStar)(Z),r=fq(),i=dq(),o=ER(),a=pq(),s=hi,u=Aq(),c=$R(),l=hq(),d=RR(),p=mq(),A=gq();Ci.NestableContent=n.union([r.EmptyContent,i.BooleanContent,o.EmbedContent,a.TextContent,a.TimestampContent,a.SelectContent,a.RangeContent,a.NumberContent,a.DateContent,a.ColorContent,u.GeoPointContent,c.ImageContent,l.IntegrationFieldContent,d.LinkContent,p.RichTextContent,A.SeparatorContent]);const m=b=>{switch(b.type){case"Boolean":return(0,i.BooleanContentDefaultValue)(b);case"Select":return(0,a.SelectContentDefaultValue)(b);default:return}};Ci.NestableContentDefaultValue=m;const g=b=>(0,a.isTextContent)(b)||(0,a.isColorContent)(b)||(0,a.isDateContent)(b)||(0,a.isTimestampContent)(b)||(0,a.isNumberContent)(b)||(0,a.isRangeContent)(b)||(0,a.isSelectContent)(b)||(0,u.isGeoPointContent)(b)||(0,p.isRichTextContent)(b)||(0,i.isBooleanContent)(b)||(0,o.isEmbedContent)(b)||(0,c.isImageContent)(b)||(0,l.isIntegrationFieldContent)(b)||(0,d.isLinkContent)(b)||(0,A.isSeparatorContent)(b)||(0,r.isEmptyContent)(b);Ci.isNestableContent=g;const _=b=>({decode(I){if(!b.fieldType)return;const x=(0,r.EmptyLegacy)(b.fieldType).decode(I);if((0,t.isRight)(x))return x;const v=(()=>{switch(b.fieldType){case"Text":return(0,a.TextLegacy)(b);case"Color":return(0,a.ColorLegacy)(b);case"Date":return(0,a.DateLegacy)(b);case"Timestamp":return(0,a.TimestampLegacy)(b);case"Number":return(0,a.NumberLegacy)(b);case"Range":return(0,a.RangeLegacy)(b);case"Select":return(0,a.SelectLegacy)(b);case"GeoPoint":return(0,u.GeoPointLegacy)(b);case"StructuredText":return(0,p.RichTextLegacy)(b);case"Boolean":return(0,i.BooleanLegacy)(b);case"Embed":return(0,o.EmbedLegacy)(b);case"Image":return(0,c.ImageLegacy)(b);case"IntegrationFields":return(0,l.IntegrationFieldLegacy)(b);case"Link":return(0,d.LinkContentLegacy)(b);case"Separator":return(0,A.SeparatorLegacy)(b);default:return}})();if(v)return v.decode(I)},encode(I){switch(I.__TYPE__){case s.FieldContentType:return I.type==="Text"?(0,a.TextLegacy)(b).encode(I):I.type==="Color"?(0,a.ColorLegacy)(b).encode(I):I.type==="Range"?(0,a.RangeLegacy)(b).encode(I):I.type==="Date"?(0,a.DateLegacy)(b).encode(I):I.type==="Number"?(0,a.NumberLegacy)(b).encode(I):I.type==="Timestamp"?(0,a.TimestampLegacy)(b).encode(I):I.type==="Select"?(0,a.SelectLegacy)(b).encode(I):void 0;case u.GeoPointContentType:return(0,u.GeoPointLegacy)(b).encode(I);case p.RichTextContentType:return(0,p.RichTextLegacy)(b).encode(I);case o.EmbedContentType:return(0,o.EmbedLegacy)(b).encode(I);case i.BooleanContentType:return(0,i.BooleanLegacy)(b).encode(I);case c.ImageContentType:return(0,c.ImageLegacy)(b).encode(I);case l.IntegrationFieldContentType:return(0,l.IntegrationFieldLegacy)(b).encode(I);case d.LinkContentType:return(0,d.LinkContentLegacy)(b).encode(I);case A.SeparatorContentType:return(0,A.SeparatorLegacy)(b).encode(I);default:return}}});return Ci.NestableLegacy=_,Ci}var FF;function Lo(){return FF||(FF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Q;(0,t.__exportStar)(dq(),e),(0,t.__exportStar)(ER(),e),(0,t.__exportStar)(pq(),e),(0,t.__exportStar)(Aq(),e),(0,t.__exportStar)($R(),e),(0,t.__exportStar)(hq(),e),(0,t.__exportStar)(RR(),e),(0,t.__exportStar)(rxe(),e),(0,t.__exportStar)(mq(),e),(0,t.__exportStar)(gq(),e)}(Tb)),Tb}var Wo={},kF;function K0(){if(kF)return Wo;kF=1,Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.repeatableContentWithDefaultNestableContentValues=Wo.withDefaultNestableContentValues=Wo.withDefaultSlicePrimaryContentValues=void 0;const e=fe,t=Va(),n=Lo();function r(a,s){const u=s;for(const[c,l]of Object.entries(a)){const d=s[c];if(d===void 0){if(l.type===e.GroupFieldType)u[c]=(0,t.groupContentWithDefaultValues)(l,t.GroupContentDefaultValue);else{const p=(0,n.NestableContentDefaultValue)(l);p&&(u[c]=p)}continue}l.type===e.GroupFieldType&&(0,t.isGroupContent)(d)&&(u[c]=(0,t.groupContentWithDefaultValues)(l,d))}return u}Wo.withDefaultSlicePrimaryContentValues=r;function i(a,s){return Object.entries(a).reduce((u,[c,l])=>{if(s[c]===void 0){const d=(0,n.NestableContentDefaultValue)(l);return d!==void 0?{...u,[c]:d}:u}return u},s)}Wo.withDefaultNestableContentValues=i;function o(a,s){const u=Object.entries(a);return s.map(c=>u.reduce((l,[d,p])=>{var A;const m=c.value.find(([g])=>g===d);if(p.type==="Group"){const g=(0,t.groupContentWithDefaultValues)(p,(A=m==null?void 0:m[1])!==null&&A!==void 0?A:{__TYPE__:t.GroupContentType,value:[]});return{...l,value:[...l.value.filter(([_])=>_!==d),...g?[[d,g]]:[]]}}else if(!m){const g=(0,n.NestableContentDefaultValue)(p);return{...l,value:[...l.value,...g?[[d,g]]:[]]}}return l},c))}return Wo.repeatableContentWithDefaultNestableContentValues=o,Wo}var MF;function Va(){return MF||(MF=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;const t=Q,n=lt,r=ln,i=Ge,o=(0,t.__importStar)(Z),a=fe,s=Qn,u=Dt(),c=Lo(),l=K0();e.GroupItemContentType="GroupItemContent",e.GroupContentType="GroupContentType",e.GroupItemContent=o.recursion("GroupItemContent",()=>o.strict({__TYPE__:o.literal(e.GroupItemContentType),value:o.array(o.tuple([o.string,o.union([c.NestableContent,e.GroupContent])]))})),e.GroupContent=o.recursion("GroupContent",()=>o.strict({__TYPE__:o.literal(e.GroupContentType),value:o.array(e.GroupItemContent)})),e.isGroupContent=e.GroupContent.is,e.GroupContentDefaultValue={__TYPE__:e.GroupContentType,value:[]};const d=o.record(o.string,o.unknown),p=b=>new o.Type("GroupItemLegacy",I=>(0,u.hasContentType)(I)&&I.__TYPE__===e.GroupItemContentType,I=>(0,i.pipe)(d.decode(I),n.either.map(v=>({value:Object.entries(v).reduce((y,[T,w])=>{const O=(0,s.getFieldCtx)(T,b),F=O.fieldType===a.GroupFieldType?(0,e.GroupLegacy)(O).decode(w):(0,c.NestableLegacy)(O).decode(w);return!F||(0,r.isLeft)(F)?y:[...y,[T,F.right]]},[]),__TYPE__:e.GroupItemContentType}))),I=>I.value.reduce((x,[v,S])=>{const y=(0,s.getFieldCtx)(v,b),T=(0,e.isGroupContent)(S)?(0,e.GroupLegacy)(y).encode(S):(0,c.NestableLegacy)(y).encode(S);return T?{content:{...x.content,[v]:T.content},types:{...x.types,...T.types}}:x},{content:{},types:{}}));e.GroupItemLegacy=p;const A=b=>{const I=o.array(o.union([o.null,(0,e.GroupItemLegacy)(b)])),x=o.array((0,e.GroupItemLegacy)(b));return new o.Type("GroupLegacy",e.isGroupContent,v=>(0,i.pipe)(I.decode(v),n.either.map(S=>({value:S.map(y=>y===null?{__TYPE__:e.GroupItemContentType,value:[]}:y),__TYPE__:e.GroupContentType}))),v=>{const S=x.encode(v.value);return{content:S.map(y=>y.content),types:S.reduce((y,T)=>({...y,...T.types}),{[b.keyOfType]:a.GroupFieldType})}})};e.GroupLegacy=A;function m(b,I){var x;const v=(x=b.config)===null||x===void 0?void 0:x.fields;return v?{...I,value:(0,l.repeatableContentWithDefaultNestableContentValues)(v,I.value)}:I}e.groupContentWithDefaultValues=m;function g({path:b,key:I,apiId:x,model:v,content:S}){return y=>{var T;const w=_({path:b,model:(T=v==null?void 0:v.config)===null||T===void 0?void 0:T.fields,content:S.value})(y);return y({path:b,key:I,apiId:x,model:v,content:{__TYPE__:S.__TYPE__,value:w}})}}e.traverseGroupContent=g;function _({path:b,model:I,content:x}){return v=>x.map((S,y)=>{const T=b.concat([{key:y.toString(),type:"GroupItem"}]),w=S.value.reduce((O,[F,$])=>{const P=I==null?void 0:I[F];let K;return(!P||(P==null?void 0:P.type)===a.GroupFieldType)&&$.__TYPE__===e.GroupContentType?K=g({path:T.concat([{key:F,type:"Widget"}]),key:F,apiId:F,model:P,content:$})(v):K=v({path:T.concat([{key:F,type:"Widget"}]),key:F,apiId:F,model:P,content:$}),!K||!((0,c.isNestableContent)(K)||(0,e.isGroupContent)(K))?O:O.concat([[F,K]])},[]);return{__TYPE__:S.__TYPE__,value:w}})}e.traverseGroupItemsContent=_}(Ib)),Ib}var Nb={},qb={},Vb={},Xs={},LF;function vq(){if(LF)return Xs;LF=1,Object.defineProperty(Xs,"__esModule",{value:!0}),Xs.RepeatableWidgets=Xs.RepeatableWidgetsLegacy=void 0;const t=(0,Q.__importStar)(Z),n=Va(),r=Lo(),i=s=>t.array((0,n.GroupItemLegacy)(s));Xs.RepeatableWidgetsLegacy=i;const o=t.tuple([t.string,t.union([r.NestableContent,n.GroupContent])]),a=t.strict({__TYPE__:t.literal(n.GroupItemContentType),value:t.array(o)});return Xs.RepeatableWidgets=t.array(a),Xs}var jF;function Rm(){return jF||(jF=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;const t=Q,n=lt,r=ln,i=Ge,o=(0,t.__importStar)(Z),a=Qn,s=Dt(),u=Va(),c=Lo(),l=K0(),d=vq();e.CompositeSliceContentType="CompositeSliceContent";const p=I=>(0,s.hasContentType)(I)&&I.__TYPE__===e.CompositeSliceContentType;e.isCompositeSliceContent=p;const A=o.exact(o.partial({repeat:o.array(o.unknown),"non-repeat":o.UnknownRecord})),m=I=>new o.Type("CompositeSliceLegacy",e.isCompositeSliceContent,x=>(0,i.pipe)(A.decode(x),n.either.map(v=>{const S=(()=>{const T=(0,a.getFieldCtx)("repeat",I),w=(0,d.RepeatableWidgetsLegacy)(T).decode(v.repeat);if(!(!w||(0,r.isLeft)(w)))return w.right})()||[];return{nonRepeat:Object.entries(v["non-repeat"]||{}).reduce((T,[w,O])=>{const F=(0,a.getFieldCtx)(w,I,["non-repeat"]);if(!F)return T;const $=(0,c.NestableLegacy)(F).decode(O);return!$||(0,r.isLeft)($)?T:{...T,[w]:$.right}},{}),repeat:S,__TYPE__:e.CompositeSliceContentType}})),x=>{const v=Object.entries(x.nonRepeat).reduce((y,[T,w])=>{const O=(0,a.getFieldCtx)(T,I,["non-repeat"]),F=(0,c.NestableLegacy)(O).encode(w);return F?{content:{...y.content,[T]:F.content},types:{...y.types,...F.types}}:y},{content:{},types:{}}),S=(()=>{const y=(0,a.getFieldCtx)("repeat",I);return(0,d.RepeatableWidgetsLegacy)(y).encode(x.repeat)})()||[];return{content:{"non-repeat":v.content,repeat:S.map(y=>y.content)},types:{[I.keyOfType]:"Slice",...v.types,...S.reduce((y,T)=>({...y,...T.types}),{})}}});e.CompositeSliceLegacy=m,e.CompositeSliceContent=o.strict({__TYPE__:o.literal(e.CompositeSliceContentType),nonRepeat:o.record(o.string,c.NestableContent),repeat:d.RepeatableWidgets});function g(I,x){var v,S;const y=(0,l.withDefaultNestableContentValues)((v=I["non-repeat"])!==null&&v!==void 0?v:{},x.nonRepeat),T=(0,l.repeatableContentWithDefaultNestableContentValues)((S=I.repeat)!==null&&S!==void 0?S:{},x.repeat);return{...x,nonRepeat:y,repeat:T}}e.compositeSliceContentWithDefaultValues=g;function _({path:I,sliceKey:x,sliceName:v,model:S,content:y}){return(T,w)=>{const O=Object.entries(y.widget.nonRepeat).reduce(($,[P,K])=>{const J=(()=>{var re,D,Y;return(S==null?void 0:S.type)==="SharedSlice"?(D=(re=S==null?void 0:S.fields)===null||re===void 0?void 0:re.primary)===null||D===void 0?void 0:D[P]:(Y=S==null?void 0:S["non-repeat"])===null||Y===void 0?void 0:Y[P]})(),ee=T({path:I.concat([{key:"non-repeat",type:"primary"},{key:P,type:"Widget"}]),key:P,apiId:v,model:J,content:K});return ee?(0,c.isNestableContent)(ee)?{...$,[P]:ee}:(console.warn(`Warn: Non nestable content with key [${P}] detected in a composite slice [${v}] with key [${x}]`),$):$},{}),F=(0,u.traverseGroupItemsContent)({path:I.concat([{key:"repeat",type:"items"}]),model:(S==null?void 0:S.type)==="SharedSlice"?S==null?void 0:S.fields.items:S==null?void 0:S.repeat,content:y.widget.repeat})(T);return w({key:x,apiId:v,path:I,model:S,content:{...y,widget:{__TYPE__:"CompositeSliceContent",repeat:F,nonRepeat:O}}})}}e.traverseCompositeSliceContent=_;function b(I,x){const[,v]=x.key.split("$");return{key:`${I.sliceName}$${v}`,name:I.sliceName,maybeLabel:x.maybeLabel,widget:{__TYPE__:"SharedSliceContent",variation:I.variationId,primary:Object.entries(x.widget.nonRepeat).reduce((S,[y,T])=>{var w;return!((w=I.fields.primary)===null||w===void 0)&&w[y]?{...S,[y]:T}:(console.warn(`The widget ${y} in the non-repeat zone of the composite slice [${I.sliceName}] with key [${x.key}] doesn't exist in the model.`),S)},{}),items:x.widget.repeat.map(S=>({__TYPE__:"GroupItemContent",value:S.value.reduce((y,[T,w])=>{var O;return!((O=I.fields.items)===null||O===void 0)&&O[T]?y.concat([[T,w]]):(console.warn(`The widget ${T} in the repeat zone of the composite slice [${I.sliceName}] with key [${x.key}] doesn't exist in the model.`),y)},[])}),[])}}}e.migrateCompositeSlice=b}(Vb)),Vb}var Qb={},Ko={},UF;function yq(){if(UF)return Ko;UF=1,Object.defineProperty(Ko,"__esModule",{value:!0}),Ko.isSlicePrimaryContent=Ko.SlicePrimaryLegacy=Ko.SlicePrimaryContent=void 0;const t=(0,Q.__importStar)(Z),n=fe,r=Va(),i=Lo();Ko.SlicePrimaryContent=t.union([i.NestableContent,r.GroupContent]);const o=s=>{const u=(0,r.GroupLegacy)(s),c=(0,i.NestableLegacy)(s);return{decode(l){return s.fieldType===n.GroupFieldType?u.decode(l):c.decode(l)},encode(l){return(0,r.isGroupContent)(l)?u.encode(l):c.encode(l)}}};Ko.SlicePrimaryLegacy=o;const a=s=>(0,i.isNestableContent)(s)||(0,r.isGroupContent)(s);return Ko.isSlicePrimaryContent=a,Ko}var BF;function Om(){return BF||(BF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.traverseSharedSliceContent=e.sharedSliceContentWithDefaultValues=e.SharedSliceContent=e.SharedSliceLegacy=e.isSharedSliceContent=e.SharedSliceContentType=void 0;const t=Q,n=lt,r=ln,i=Ge,o=(0,t.__importStar)(Z),a=O0,s=fe,u=Qn,c=Dt(),l=Va(),d=Lo(),p=K0(),A=vq(),m=yq();e.SharedSliceContentType="SharedSliceContent";const g=v=>(0,c.hasContentType)(v)&&v.__TYPE__===e.SharedSliceContentType;e.isSharedSliceContent=g;const _=o.exact(o.type({variation:o.string,items:(0,a.withFallback)(o.array(o.unknown),[]),primary:(0,a.withFallback)(o.UnknownRecord,{})})),b=v=>new o.Type("SharedSliceLegacy",e.isSharedSliceContent,S=>(0,i.pipe)(_.decode(S),n.either.map(y=>{const T=(()=>{const O=(0,u.getFieldCtx)("items",v,["variations",y.variation]),F=(0,A.RepeatableWidgetsLegacy)(O).decode(y.items);if(!(!F||(0,r.isLeft)(F)))return F.right})()||[],w=Object.entries(y.primary).reduce((O,[F,$])=>{const P=(0,u.getFieldCtx)(F,v,["variations",y.variation,"primary"]),K=(0,m.SlicePrimaryLegacy)(P).decode($);return!K||(0,r.isLeft)(K)?O:{...O,[F]:K.right}},{});return{variation:y.variation,primary:w,items:T,__TYPE__:e.SharedSliceContentType}})),S=>{const y=Object.entries(S.primary).reduce((w,[O,F])=>{const $=(0,u.getFieldCtx)(O,v,["variations",S.variation,"primary"]),P=(0,m.SlicePrimaryLegacy)($).encode(F);return P?{content:{...w.content,[O]:P.content},types:{...w.types,...P.types}}:w},{content:{},types:{}}),T=(()=>{const w=(0,u.getFieldCtx)("items",v,["variations",S.variation]);return(0,A.RepeatableWidgetsLegacy)(w).encode(S.items)})()||[];return{content:{primary:y.content,items:T.map(w=>w.content),variation:S.variation},types:{[v.keyOfType]:"SharedSlice",...y.types,...T.reduce((w,O)=>({...w,...O.types}),{})}}});e.SharedSliceLegacy=b,e.SharedSliceContent=o.strict({__TYPE__:o.literal(e.SharedSliceContentType),variation:o.string,primary:o.record(o.string,m.SlicePrimaryContent),items:A.RepeatableWidgets});function I(v,S){var y,T;const w=v.variations.find(K=>K.id===S.variation),O=(y=w==null?void 0:w.primary)!==null&&y!==void 0?y:{},F=(T=w==null?void 0:w.items)!==null&&T!==void 0?T:{},$=(0,p.withDefaultSlicePrimaryContentValues)(O,S.primary),P=(0,p.repeatableContentWithDefaultNestableContentValues)(F,S.items);return{...S,primary:$,items:P}}e.sharedSliceContentWithDefaultValues=I;function x({path:v,sliceKey:S,sliceName:y,model:T,content:w}){return(O,F)=>{const $=Object.entries(w.widget.primary).reduce((K,[J,ee])=>{var re,D;const Y=(D=(re=T==null?void 0:T.fields)===null||re===void 0?void 0:re.primary)===null||D===void 0?void 0:D[J],M=(()=>(0,l.isGroupContent)(ee)?(0,l.traverseGroupContent)({path:v.concat([{key:"primary",type:"primary"},{key:J,type:"Widget"}]),key:J,apiId:J,content:ee,model:(Y==null?void 0:Y.type)===s.GroupFieldType?Y:void 0})(O):(0,d.isNestableContent)(ee)?O({path:v.concat([{key:"primary",type:"primary"},{key:J,type:"Widget"}]),key:J,apiId:J,model:Y,content:ee}):void 0)();return M?((0,m.isSlicePrimaryContent)(M)||console.warn(`Warn: Non nestable or group content with key [${J}] detected in a shared slice [${y}] with key [${S}]`),{...K,[J]:M}):K},{}),P=(0,l.traverseGroupItemsContent)({path:v.concat([{key:"items",type:"items"}]),model:T==null?void 0:T.fields.items,content:w.widget.items})(O);return F({key:S,apiId:y,path:v,model:T,content:{...w,widget:{__TYPE__:"SharedSliceContent",variation:w.widget.variation,primary:$,items:P}}})}}e.traverseSharedSliceContent=x}(Qb)),Qb}var Tr={},PF;function Fm(){if(PF)return Tr;PF=1,Object.defineProperty(Tr,"__esModule",{value:!0}),Tr.migrateSimpleSlice=Tr.traverseSimpleSliceContent=Tr.SimpleSliceLegacy=Tr.isSimpleSliceContent=Tr.SimpleSliceContent=void 0;const t=(0,Q.__importStar)(Z),n=Va(),r=Lo();Tr.SimpleSliceContent=t.union([r.NestableContent,n.GroupContent]);const i=u=>(0,r.isNestableContent)(u)||(0,n.isGroupContent)(u);Tr.isSimpleSliceContent=i;const o=u=>({decode:(()=>u.fieldType==="Group"?(0,n.GroupLegacy)(u).decode.bind(null):(0,r.NestableLegacy)(u).decode.bind(null))(),encode:c=>{switch(c.__TYPE__){case"GroupContentType":return(0,n.GroupLegacy)(u).encode(c);default:return(0,r.NestableLegacy)(u).encode(c)}}});Tr.SimpleSliceLegacy=o;function a({path:u,sliceKey:c,sliceName:l,model:d,content:p}){return(A,m)=>{if((0,n.isGroupContent)(p.widget)){const _=(0,n.traverseGroupContent)({path:u,key:p.key,apiId:p.name,model:(()=>{if((d==null?void 0:d.type)==="Group")return d;if((d==null?void 0:d.type)==="SharedSlice")return{type:"Group",config:{fields:d.fields.items||{}}}})(),content:p.widget})(A);return _&&m({key:p.key,apiId:p.name,path:u,model:d,content:{...p,widget:_}})}const g=A({key:p.key,apiId:p.name,path:u,model:(()=>{var _;if((d==null?void 0:d.type)==="SharedSlice")return(_=d.fields.primary)===null||_===void 0?void 0:_[p.name];if((d==null?void 0:d.type)!=="Group")return d})(),content:p.widget});return g&&m({key:c,apiId:l,path:u,model:d,content:{...p,widget:g}})}}Tr.traverseSimpleSliceContent=a;function s(u,c){var l;const[,d]=c.key.split("$"),p=`${u.sliceName}$${d}`;return c.widget.__TYPE__==="GroupContentType"?{key:p,name:u.sliceName,maybeLabel:c.maybeLabel,widget:{__TYPE__:"SharedSliceContent",variation:u.variationId,primary:{},items:c.widget.value.map(A=>({__TYPE__:"GroupItemContent",value:A.value.reduce((m,[g,_])=>{var b;return!((b=u.fields.items)===null||b===void 0)&&b[g]?m.concat([[g,_]]):m},[])}),[])}}:{key:p,name:u.sliceName,maybeLabel:c.maybeLabel,widget:{__TYPE__:"SharedSliceContent",variation:u.variationId,primary:!((l=u.fields.primary)===null||l===void 0)&&l[c.name]?{[c.name]:c.widget}:{},items:[]}}}return Tr.migrateSimpleSlice=s,Tr}var DF;function bq(){return DF||(DF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SliceContent=e.SliceLegacy=void 0;const t=Q,n=(0,t.__importStar)(Z),r=Rm(),i=Om(),o=Fm(),a=s=>({decode:u=>(()=>{switch(s.fieldType){case"Slice":return(0,r.CompositeSliceLegacy)(s);case"SharedSlice":return(0,i.SharedSliceLegacy)(s);default:return(0,o.SimpleSliceLegacy)(s)}})().decode(u),encode:u=>{switch(u.__TYPE__){case"SharedSliceContent":return(0,i.SharedSliceLegacy)(s).encode(u);case"CompositeSliceContent":return(0,r.CompositeSliceLegacy)(s).encode(u);default:return(0,o.SimpleSliceLegacy)(s).encode(u)}}});e.SliceLegacy=a,e.SliceContent=n.union([r.CompositeSliceContent,i.SharedSliceContent,o.SimpleSliceContent]),(0,t.__exportStar)(Rm(),e),(0,t.__exportStar)(Om(),e),(0,t.__exportStar)(Fm(),e),(0,t.__exportStar)(yq(),e)}(qb)),qb}var pn={},WF;function Cq(){if(WF)return pn;WF=1,Object.defineProperty(pn,"__esModule",{value:!0}),pn.migrateSliceItem=pn.SlicesItemLegacy=pn.sliceItemContentWithDefaultValues=pn.isSimpleSliceItemContent=pn.isCompositeSliceItemContent=pn.isSharedSliceItemContent=pn.SliceItemContent=void 0;const e=Q,t=lt,n=ln,r=Ge,i=(0,e.__importStar)(Z),o=Xe,a=Qn,s=Va(),u=Lo(),c=K0(),l=bq(),d=Rm(),p=Om(),A=Fm();pn.SliceItemContent=i.type({key:i.string,name:i.string,maybeLabel:i.union([i.string,i.undefined]),widget:l.SliceContent});function m(S){return(0,p.isSharedSliceContent)(S.widget)}pn.isSharedSliceItemContent=m;function g(S){return(0,d.isCompositeSliceContent)(S.widget)}pn.isCompositeSliceItemContent=g;function _(S){return(0,s.isGroupContent)(S.widget)||(0,u.isNestableContent)(S.widget)}pn.isSimpleSliceItemContent=_;function b(S,y){var T;if(S.type==="SharedSlice"&&(0,p.isSharedSliceContent)(y))return(0,l.sharedSliceContentWithDefaultValues)(S,y);if(S.type==="Slice"&&(0,d.isCompositeSliceContent)(y))return(0,l.compositeSliceContentWithDefaultValues)(S,y);if(S.type==="Group"&&(0,s.isGroupContent)(y)&&(!((T=S.config)===null||T===void 0)&&T.fields)){const w=(0,c.repeatableContentWithDefaultNestableContentValues)(S.config.fields,y.value);return{...y,value:w}}return y}pn.sliceItemContentWithDefaultValues=b;const I=i.exact(i.intersection([i.type({key:i.string,value:i.unknown}),i.partial({label:(0,o.nullable)(i.string)})])),x=S=>new i.Type("SlicesItemLegacy",y=>((0,p.isSharedSliceContent)(y.widget),(0,d.isCompositeSliceContent)(y.widget),(0,A.isSimpleSliceContent)(y.widget)),(y,T)=>(0,r.pipe)(I.decode(y),t.either.chain(w=>{var O;const F=w.key.indexOf("$"),$=w.key.substring(0,F>0?F:void 0),P=(0,a.getFieldCtx)($,S),K=(0,l.SliceLegacy)(P).decode(w.value);return!K||(0,n.isLeft)(K)?i.failure(y,T):i.success({key:w.key,name:$,maybeLabel:(O=w.label)!==null&&O!==void 0?O:void 0,widget:K.right})})),y=>{const T=(0,a.getFieldCtx)(y.name,S),w=(0,l.SliceLegacy)(T).encode(y.widget);return{content:{key:y.key,label:y.maybeLabel,value:(w==null?void 0:w.content)||{}},types:(w==null?void 0:w.types)||{}}});pn.SlicesItemLegacy=x;const v=({model:S,content:y})=>g(y)&&(S==null?void 0:S.type)==="SharedSlice"?(0,d.migrateCompositeSlice)(S,y):_(y)&&(S==null?void 0:S.type)==="SharedSlice"?(0,A.migrateSimpleSlice)(S,y):y;return pn.migrateSliceItem=v,pn}var zb={},KF;function ixe(){return KF||(KF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.traverseSlices=e.slicesContentWithDefaultValues=e.SlicesContent=e.SlicesLegacy=e.isSlicesContent=e.SlicesContentType=void 0;const t=Q,n=lt,r=Ge,i=(0,t.__importStar)(Z),o=Ah,a=fe,s=Dt(),u=Rm(),c=Om(),l=Fm(),d=Cq();e.SlicesContentType="SliceContentType";const p=b=>(0,s.hasContentType)(b)&&b.__TYPE__===e.SlicesContentType;e.isSlicesContent=p;const A=b=>{const I=i.array((0,d.SlicesItemLegacy)(b));return new i.Type("SlicesLegacy",e.isSlicesContent,x=>(0,r.pipe)(I.decode(x),n.either.map(v=>({__TYPE__:e.SlicesContentType,value:v}))),x=>{const v=I.encode(x.value);return{content:v.map(S=>S.content),types:v.reduce((S,y)=>({...S,...y.types}),{[b.keyOfType]:"Slices"})}})};e.SlicesLegacy=A,e.SlicesContent=i.type({__TYPE__:i.literal(e.SlicesContentType),value:i.array(d.SliceItemContent)});function m(b,I){var x;const v=(x=b==null?void 0:b.config)===null||x===void 0?void 0:x.choices;if(v===void 0)return I;const S=I.value.map(y=>{const T=v[y.name];if(T){const w=(0,d.sliceItemContentWithDefaultValues)(T,y.widget);return{...y,widget:w}}return y});return{...I,value:S}}e.slicesContentWithDefaultValues=m;function g(b,I,x){var v,S;const y=(S=(v=I==null?void 0:I.config)===null||v===void 0?void 0:v.choices)===null||S===void 0?void 0:S[x.name],T=()=>{if((0,d.isSharedSliceItemContent)(x)&&y&&(0,a.isStaticSharedSlice)(y)){const F=y.variations.find($=>$.id===x.widget.variation);return F?{type:"SharedSlice",sliceName:y.id,variationId:F.id,fields:{primary:F.primary||{},items:F.items||{}}}:void 0}},w=()=>{var F;const $=o.ContentPath.append(o.ContentPath.serialize(b),x.name),P=Object.values(((F=I==null?void 0:I.config)===null||F===void 0?void 0:F.choices)||{}).find(J=>{var ee;return(0,a.isStaticSharedSlice)(J)?!!(!((ee=J.legacyPaths)===null||ee===void 0)&&ee[$]):!1});if(!P)return;const K=P==null?void 0:P.variations.find(J=>{var ee;return J.id===((ee=P.legacyPaths)===null||ee===void 0?void 0:ee[$])});if(K)return{type:"SharedSlice",sliceName:P.id,variationId:K.id,fields:{primary:K.primary||{},items:K.items||{}}}},O=()=>{if(y){if((0,a.isCompositeSlice)(y))return{type:"Slice","non-repeat":y["non-repeat"]||{},repeat:y.repeat||{}};if((0,a.isLegacySlice)(y))return y}};return T()||w()||O()}function _({path:b,key:I,model:x,content:v}){return({transformWidget:S=({content:T})=>T,transformSlice:y=({content:T})=>T})=>{const T=v.value.reduce((w,O)=>{const F=x&&g(b,x,O),$=(()=>{if((0,d.isSharedSliceItemContent)(O))return(0,c.traverseSharedSliceContent)({path:b.concat({key:O.key,type:"SharedSlice"}),sliceKey:O.key,sliceName:O.name,model:(F==null?void 0:F.type)==="SharedSlice"?F:void 0,content:O})(S,y);if((0,d.isCompositeSliceItemContent)(O))return(0,u.traverseCompositeSliceContent)({path:b.concat({key:O.key,type:"Slice"}),sliceKey:O.key,sliceName:O.name,model:(F==null?void 0:F.type)==="Slice"||(F==null?void 0:F.type)==="SharedSlice"?F:void 0,content:O})(S,y);if((0,d.isSimpleSliceItemContent)(O))return(0,l.traverseSimpleSliceContent)({path:b.concat({key:O.key,type:"LegacySlice"}),sliceKey:O.key,sliceName:O.name,model:F&&(F==null?void 0:F.type)!=="Slice"?F:void 0,content:O})(S,y)})();return $?w.concat($):w},[]);return S({path:b,key:I,apiId:I,model:x,content:{__TYPE__:v.__TYPE__,value:T}})}}e.traverseSlices=_}(zb)),zb}var NF;function Sq(){return NF||(NF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Q;(0,t.__exportStar)(bq(),e),(0,t.__exportStar)(Cq(),e),(0,t.__exportStar)(ixe(),e)}(Nb)),Nb}var Hb={},qF;function _q(){return qF||(qF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.UIDContent=e.UIDLegacy=e.isUIDContent=e.UIDContentType=void 0;const t=Q,n=lt,r=Ge,i=(0,t.__importStar)(Z),o=Dt();e.UIDContentType="UIDContent";const a=u=>(0,o.hasContentType)(u)&&u.__TYPE__===e.UIDContentType;e.isUIDContent=a;const s=u=>new i.Type("UIDLegacy",e.isUIDContent,c=>(0,r.pipe)(i.string.decode(c),n.either.map(l=>e.UIDContent.encode({value:l,__TYPE__:e.UIDContentType}))),c=>({content:c.value,types:{[u.keyOfType]:"UID"}}));e.UIDLegacy=s,e.UIDContent=i.type({__TYPE__:i.literal(e.UIDContentType),value:i.string})}(Hb)),Hb}var No={},VF;function oxe(){if(VF)return No;VF=1,Object.defineProperty(No,"__esModule",{value:!0}),No.WidgetLegacy=No.isWidgetContent=No.WidgetContent=void 0;const t=(0,Q.__importStar)(Z),n=Va(),r=Lo(),i=Sq(),o=_q();No.WidgetContent=t.union([n.GroupContent,r.NestableContent,o.UIDContent,i.SlicesContent]);const a=u=>(0,n.isGroupContent)(u)||(0,r.isNestableContent)(u)||(0,o.isUIDContent)(u)||(0,i.isSlicesContent)(u);No.isWidgetContent=a;const s=u=>({decode(c){if(!u.fieldType)return;const l=(()=>{switch(u.fieldType){case"UID":return(0,o.UIDLegacy)(u);case"Group":return(0,n.GroupLegacy)(u);case"Choice":case"Slices":return(0,i.SlicesLegacy)(u);default:return(0,r.NestableLegacy)(u)}})();if(l)return l.decode(c)},encode(c){switch(c.__TYPE__){case o.UIDContentType:return(0,o.UIDLegacy)(u).encode(c);case n.GroupContentType:return(0,n.GroupLegacy)(u).encode(c);case i.SlicesContentType:return(0,i.SlicesLegacy)(u).encode(c);default:return(0,r.NestableLegacy)(u).encode(c)}}});return No.WidgetLegacy=s,No}var QF;function OR(){return QF||(QF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Q;(0,t.__exportStar)(fq(),e),(0,t.__exportStar)(Va(),e),(0,t.__exportStar)(Lo(),e),(0,t.__exportStar)(Sq(),e),(0,t.__exportStar)(_q(),e),(0,t.__exportStar)(oxe(),e)}(Sb)),Sb}Object.defineProperty(or,"__esModule",{value:!0});or.migrateDocument=or.collectWidgets=or.traverseDocument=or.fillDocumentWithDefaultValues=or.DocumentLegacy=or.Document=void 0;const axe=Q,Iq=lt,FR=ln,Tq=Ge,Fl=(0,axe.__importStar)(Z),xq=Ah,kR=Lc,kl=fe,_i=OR(),iC=Qn;or.Document=Fl.record(kR.WidgetKey,_i.WidgetContent);const sxe=Fl.record(kR.WidgetKey,Fl.unknown),MR=e=>new Fl.Type("Document",t=>!!t&&typeof t=="object",t=>(0,Tq.pipe)(sxe.decode(t),Iq.either.map(n=>Object.entries(n).reduce((r,[i,o])=>{const a=(0,iC.defaultCtx)(i,e),s=(0,_i.WidgetLegacy)(a).decode(o);return!s||(0,FR.isLeft)(s)?r:{...r,[i]:s.right}},{}))),t=>Object.entries(t).reduce((n,[r,i])=>{const o=(0,iC.defaultCtx)(r,e),a=(0,_i.WidgetLegacy)(o).encode(i);return a?{content:{...n.content,[r]:a.content},types:{...n.types,...a.types}}:n},{content:{},types:{}}));function wq(e){const t=Object.entries(e),{types:n,widgets:r}=t.reduce((a,[s,u])=>{if(s.endsWith("_TYPE")){const c=iC.FieldOrSliceType.decode(u);if((0,FR.isRight)(c))return{...a,types:a.types.set(s.substring(0,s.length-5),c.right)}}return!s.endsWith("_POSITION")&&!s.endsWith("_TYPE")?{...a,widgets:{...a.widgets,[s]:u}}:a},{types:new Map,widgets:{}}),i=e.slugs_INTERNAL||[],o=e.uid;return{widgets:r,types:n,uid:o,slugs:i}}function uxe(e,t){const n=(0,Tq.pipe)(Fl.record(kR.WidgetKey,Fl.unknown).decode(e),Iq.either.chain(r=>{const{types:i,widgets:o}=wq(r);return MR(i).decode(o)}));return(0,FR.isLeft)(n)?void 0:Eq(n.right,t)}function cxe(e){const t=MR().encode(e);return{...t.content,...t.types}}or.DocumentLegacy={_codec:MR,extractMetadata:wq,parse:uxe,encode:cxe};function LR(e){return{customTypeId:e==null?void 0:e.id,fields:Object.fromEntries((0,kl.flattenSections)(e))}}function lxe(e,t){const{fields:n}=e&&kl.StaticCustomType.is(e)?LR(e):e;return Object.entries(n).reduce((r,[i,o])=>{const a=t[i],s=(()=>{switch(o.type){case"Group":return(0,_i.isGroupContent)(a)?(0,_i.groupContentWithDefaultValues)(o,a):a;case"Choice":case"Slices":return(0,_i.isSlicesContent)(a)?(0,_i.slicesContentWithDefaultValues)(o,a):a;default:return a===void 0&&kl.NestableWidget.is(o)?(0,_i.NestableContentDefaultValue)(o):a}})();return s?{...r,[i]:s}:r},t)}or.fillDocumentWithDefaultValues=lxe;function jR({document:e,customType:t}){const n=t&&kl.StaticCustomType.is(t)?LR(t):t;return({transformWidget:r=({content:o})=>o,transformSlice:i=({content:o})=>o})=>{const o=n&&Object.entries(n.fields).reduce((a,[s,u])=>({...a,[s]:u}),{});return Object.entries(e).reduce((a,[s,u])=>{const c=o&&o[s],l=xq.ContentPath.make([{key:n==null?void 0:n.customTypeId,type:"CustomType"},{key:s,type:"Widget"}]),d=(()=>{switch(u.__TYPE__){case"SliceContentType":return(0,_i.traverseSlices)({path:l,key:s,model:(c==null?void 0:c.type)==="Slices"||(c==null?void 0:c.type)==="Choice"?c:void 0,content:u})({transformWidget:r,transformSlice:i});case"GroupContentType":return(0,_i.traverseGroupContent)({path:l,key:s,apiId:s,model:(c==null?void 0:c.type)==="Group"?c:void 0,content:u})(r);default:return r({path:l,key:s,apiId:s,model:(c==null?void 0:c.type)!=="Group"&&(c==null?void 0:c.type)!=="Slices"&&(c==null?void 0:c.type)!=="Choice"?c:void 0,content:u})}})();return{...a,...d?{[s]:d}:{}}},{})}}or.traverseDocument=jR;function fxe(e,t){const n={};return jR({document:e})({transformWidget:({content:r,path:i})=>{const o=xq.ContentPath.serialize(i);return t(r,i)&&(n[o]=r),r}}),n}or.collectWidgets=fxe;function Eq(e,t){const n=kl.StaticCustomType.is(t)?LR(t):t;return Object.values((0,kl.collectSharedSlices)(n)).some(i=>!!i.legacyPaths)?jR({document:e,customType:t})({transformSlice:_i.migrateSliceItem}):e}or.migrateDocument=Eq;(function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Q;(0,t.__exportStar)(or,e),(0,t.__exportStar)(OR(),e),(0,t.__exportStar)(Qn,e)})(ye);function dxe(e,t){const n=pxe(e,t),r=Axe(e,n);return ye.fillDocumentWithDefaultValues(e,r)}function pxe(e,t){return fe.flattenSections(e).reduce((r,[i,o])=>!t[i]&&o.type==="Group"?{...r,[i]:$q}:r,t)}function Axe(e,t){return ye.traverseDocument({document:t,customType:e})({transformWidget({model:n,content:r}){return n?r:void 0},transformSlice(n){return n.model?n.content:void 0}})}const $q={__TYPE__:"GroupContentType",value:[{__TYPE__:"GroupItemContent",value:[]}]},Rq={unclassified:{title:"Draft",color:"amber"},published:{title:"Live",color:"green"},release:{title:"Planned",color:"purple"},archived:{title:"Archived",color:"grey"}},Oq={unclassified:["unclassified","published"],archived:["unclassified","published"],release:["release","published"],published:["published"]};function UR(e){const{documentId:t,versionId:n,baseUrl:r,status:i,releaseId:o}=e,a={s:i,v:n,r:o},s=Fr.createRouteParams({params:a}),u=new URLSearchParams(s).toString();return new URL(`pages/${t}?${u}`,r)}function Fq(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var hxe=xe.createContext(Fq()),mxe=({children:e})=>{const[t]=xe.useState(()=>Fq());return f.jsx(hxe.Provider,{value:t,children:typeof e=="function"?e(t):e})};function gxe(e){const{children:t,...n}=e;return f.jsx(mxe,{children:({reset:r})=>f.jsx(h.ErrorBoundary,{...n,onReset:r,children:t})})}const vxe="media-library-",zF=`${vxe}newMediaLibraryFeaturesBannerClosed`;function kq(e){const{maxWidth:t}=e,[n,r]=E.useState(()=>!(Id.localStorage.isAvailable()&&Id.localStorage.read(zF)));function i(){r(!1),Id.localStorage.isAvailable()&&Id.localStorage.write(zF,String(Date.now()))}return n?f.jsx(h.Box,{justifyContent:"center",padding:{inline:16,block:12},backgroundColor:"purple9",children:f.jsxs(h.Box,{maxWidth:t,width:"100%",alignItems:"center",gap:8,children:[f.jsx(h.CircleIcon,{color:"purple",name:"autoFixHigh",size:"extraSmall",variant:"solid"}),f.jsxs("div",{children:[f.jsx(h.Text,{color:"white",variant:"bold",children:"New features on the Media Library now available!"}),f.jsxs(h.Box,{gap:4,flexWrap:"wrap",children:[f.jsx(h.Text,{color:"white",children:"Media Tagging, Filtering, Improved Search & Bulk Deletion"}),f.jsx(h.Text,{color:"white",variant:"bold",href:"https://prismic.io/lp/new-media-library",target:"_blank",rel:"noopener noreferrer",underline:!0,children:"Find out More →"})]})]}),f.jsx(h.Button,{invisible:!0,color:"white",sx:{marginLeft:"auto",marginBottom:"auto",flexShrink:0},underline:!0,onClick:i,children:"Close"})]})}):null}const Mq=E.createContext(void 0),yxe={selectedIds:new Set,excludedIds:new Set,isAllSelected:!1};function Lq(e){const{children:t,initialState:n,initialTotalItemCount:r,isSelectAllEnabled:i=!1}=e,o=E.useRef(),a=E.useRef(r||0);function s(){if(n&&n.selectedIds){const T=[...n.selectedIds].pop();T&&(o.current=T)}return{...yxe,...n}}const[u,c]=E.useState(s),l=E.useMemo(()=>{const{selectedIds:T,excludedIds:w,isAllSelected:O}=u;return O?a.current-w.size:T.size},[u]),d=E.useCallback(T=>{const{isAllSelected:w,selectedIds:O,excludedIds:F}=u;return w?!F.has(T):O.has(T)},[u]),p=E.useCallback(()=>{const{isAllSelected:T,selectedIds:w,excludedIds:O}=u;return{selectedIds:[...w],excludedIds:[...O],isAllSelected:T,selectedCount:l}},[u,l]),A=Pe.useStableCallback(()=>{i&&c({isAllSelected:!0,selectedIds:new Set,excludedIds:new Set})}),m=Pe.useStableCallback(()=>{c({isAllSelected:!1,selectedIds:new Set,excludedIds:new Set})});E.useEffect(()=>{const{isAllSelected:T,selectedIds:w,excludedIds:O}=u,F=a.current;if(!(F===0||!i)){if(T&&O.size===F){m();return}if(!T&&w.size===F){A();return}}},[u,i,A,m]);const g=Pe.useStableCallback(T=>{const{id:w,isSingleSelection:O,metaKey:F,shiftKey:$,ids:P}=T;return $&&P&&P.length>0&&o.current?b(w,P,o.current):O&&!F?_(w):d(w)?v([w]):x([w]),o.current=w,d(w)});function _(T){d(T)&&l===1?c(w=>({...w,selectedIds:new Set})):c({isAllSelected:!1,selectedIds:new Set([T]),excludedIds:new Set})}function b(T,w,O){const F=bxe(w,O,T),$=d(T);return $?v(F):x(F),$}const I=Pe.useStableCallback(()=>{l>0?m():A()});function x(T){const{isAllSelected:w}=u;if(w){c(O=>({...O,excludedIds:HF(O.excludedIds,T)}));return}c(O=>({...O,selectedIds:YF(O.selectedIds,T)}))}function v(T){const{isAllSelected:w}=u;if(w){c(O=>({...O,excludedIds:YF(O.excludedIds,T)}));return}c(O=>({...O,selectedIds:HF(O.selectedIds,T)}))}function S(T){a.current=T}const y=E.useMemo(()=>({selectedCount:l,state:u,totalItemCount:a.current,isSelected:d,isSelectAllEnabled:i,getSelectionState:p,toggleSelection:g,toggleSelectAll:I,clearSelection:m,setTotalItemCount:S}),[u,m,p,i,d,l,I,g]);return f.jsx(Mq.Provider,{value:y,children:t})}function qs(e){const t=E.useContext(Mq);if(t===void 0)throw new Error("useSelectionManagerContext must be used within a SelectionManagerProvider");const{totalItemCount:n,onChangeSelection:r}=e||{},{setTotalItemCount:i,totalItemCount:o,state:a,getSelectionState:s,...u}=t;n!==void 0&&n!==o&&i(n);const c=Pe.useStableCallback(r);return E.useEffect(()=>{c==null||c(s())},[s,c,a]),{...u,getSelectionState:s,isAllSelected:a.isAllSelected}}function bxe(e,t,n){const r=e.indexOf(t),i=e.indexOf(n);if(r===-1||i===-1)throw new Error("Both startValue and endValue must be in the array");return r<=i?e.slice(r,i+1):e.slice(i,r+1)}function HF(e,t){const n=new Set(e);return t.forEach(r=>n.delete(r)),n}function YF(e,t){return new Set([...e,...t])}const N0=E.createContext(void 0);function Te(){const e=E.useContext(N0);if(!e)throw new Error("Missing EditorConfigContext.Provider");return e}class oC extends Error{}function Ht(e){throw new oC(`Missing EditorConfig.${e}`)}function Cxe(){if(new URL(location.href).searchParams.has("debug"))return;const n=console.error.bind(console);console.error=(...r)=>{r[0]instanceof oC||Sxe(r)||n(...r)},window.addEventListener("error",r=>{r.error instanceof oC&&r.preventDefault(),_xe(r.error)&&r.preventDefault()})}function Sxe(e){const t="Warning: flushSync was called from inside a lifecycle method",n=typeof e[0]=="string"&&e[0].includes(t),r=typeof e[1]=="string"&&e[1].includes("RichTextField");return n&&r}function _xe(e){const t=/Invalid content for node document: <(bulletList|orderedList)\(listItem*/,n=e.message;return!!(typeof n=="string"&&n.match(t))}var He;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const o={};for(const a of i)o[a]=a;return o},e.getValidEnumValues=i=>{const o=e.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),a={};for(const s of o)a[s]=i[s];return e.objectValues(a)},e.objectValues=i=>e.objectKeys(i).map(function(o){return i[o]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const o=[];for(const a in i)Object.prototype.hasOwnProperty.call(i,a)&&o.push(a);return o},e.find=(i,o)=>{for(const a of i)if(o(a))return a},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,o=" | "){return i.map(a=>typeof a=="string"?`'${a}'`:a).join(o)}e.joinValues=r,e.jsonStringifyReplacer=(i,o)=>typeof o=="bigint"?o.toString():o})(He||(He={}));var aC;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(aC||(aC={}));const ne=He.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Za=e=>{switch(typeof e){case"undefined":return ne.undefined;case"string":return ne.string;case"number":return isNaN(e)?ne.nan:ne.number;case"boolean":return ne.boolean;case"function":return ne.function;case"bigint":return ne.bigint;case"symbol":return ne.symbol;case"object":return Array.isArray(e)?ne.array:e===null?ne.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ne.promise:typeof Map<"u"&&e instanceof Map?ne.map:typeof Set<"u"&&e instanceof Set?ne.set:typeof Date<"u"&&e instanceof Date?ne.date:ne.object;default:return ne.unknown}},G=He.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"]),Ixe=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Ei extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(o){return o.message},r={_errors:[]},i=o=>{for(const a of o.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let s=r,u=0;for(;u<a.path.length;){const c=a.path[u];u===a.path.length-1?(s[c]=s[c]||{_errors:[]},s[c]._errors.push(n(a))):s[c]=s[c]||{_errors:[]},s=s[c],u++}}};return i(this),r}toString(){return this.message}get message(){return JSON.stringify(this.issues,He.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Ei.create=e=>new Ei(e);const ip=(e,t)=>{let n;switch(e.code){case G.invalid_type:e.received===ne.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case G.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,He.jsonStringifyReplacer)}`;break;case G.unrecognized_keys:n=`Unrecognized key(s) in object: ${He.joinValues(e.keys,", ")}`;break;case G.invalid_union:n="Invalid input";break;case G.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${He.joinValues(e.options)}`;break;case G.invalid_enum_value:n=`Invalid enum value. Expected ${He.joinValues(e.options)}, received '${e.received}'`;break;case G.invalid_arguments:n="Invalid function arguments";break;case G.invalid_return_type:n="Invalid function return type";break;case G.invalid_date:n="Invalid date";break;case G.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(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}"`:He.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case G.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case G.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case G.custom:n="Invalid input";break;case G.invalid_intersection_types:n="Intersection results could not be merged";break;case G.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case G.not_finite:n="Number must be finite";break;default:n=t.defaultError,He.assertNever(e)}return{message:n}};let jq=ip;function Txe(e){jq=e}function km(){return jq}const Mm=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,o=[...n,...i.path||[]],a={...i,path:o};let s="";const u=r.filter(c=>!!c).slice().reverse();for(const c of u)s=c(a,{data:t,defaultError:s}).message;return{...i,path:o,message:i.message||s}},xxe=[];function oe(e,t){const n=Mm({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,km(),ip].filter(r=>!!r)});e.common.issues.push(n)}class Ln{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return we;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n)r.push({key:await i.key,value:await i.value});return Ln.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:o,value:a}=i;if(o.status==="aborted"||a.status==="aborted")return we;o.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),(typeof a.value<"u"||i.alwaysSet)&&(r[o.value]=a.value)}return{status:t.value,value:r}}}const we=Object.freeze({status:"aborted"}),Uq=e=>({status:"dirty",value:e}),Hn=e=>({status:"valid",value:e}),sC=e=>e.status==="aborted",uC=e=>e.status==="dirty",Lm=e=>e.status==="valid",jm=e=>typeof Promise<"u"&&e instanceof Promise;var pe;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(pe||(pe={}));class po{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}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}}const GF=(e,t)=>{if(Lm(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Ei(e.common.issues);return this._error=n,this._error}}};function $e(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(a,s)=>a.code!=="invalid_type"?{message:s.defaultError}:typeof s.data>"u"?{message:r??s.defaultError}:{message:n??s.defaultError},description:i}}class Fe{constructor(t){this.spa=this.safeParseAsync,this._def=t,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(t){return Za(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Za(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Ln,ctx:{common:t.parent.common,data:t.data,parsedType:Za(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(jm(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const i={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Za(t)},o=this._parseSync({data:t,path:i.path,parent:i});return GF(i,o)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Za(t)},i=this._parse({data:t,path:r.path,parent:r}),o=await(jm(i)?i:Promise.resolve(i));return GF(r,o)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,o)=>{const a=t(i),s=()=>o.addIssue({code:G.custom,...r(i)});return typeof Promise<"u"&&a instanceof Promise?a.then(u=>u?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new Li({schema:this,typeName:be.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Xo.create(this,this._def)}nullable(){return Mu.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return $i.create(this,this._def)}promise(){return Ll.create(this,this._def)}or(t){return up.create([this,t],this._def)}and(t){return cp.create(this,t,this._def)}transform(t){return new Li({...$e(this._def),schema:this,typeName:be.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Ap({...$e(this._def),innerType:this,defaultValue:n,typeName:be.ZodDefault})}brand(){return new Pq({typeName:be.ZodBranded,type:this,...$e(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Dm({...$e(this._def),innerType:this,catchValue:n,typeName:be.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Sh.create(this,t)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const wxe=/^c[^\s-]{8,}$/i,Exe=/^[a-z][a-z0-9]*$/,$xe=/[0-9A-HJKMNP-TV-Z]{26}/,Rxe=/^([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,Oxe=/^(([^<>()[\]\\.,;:\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,})+))$/,Fxe=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u"),kxe=/^(((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}))$/,Mxe=/^(([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})))$/,Lxe=e=>e.precision?e.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`):e.precision===0?e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function jxe(e,t){return!!((t==="v4"||!t)&&kxe.test(e)||(t==="v6"||!t)&&Mxe.test(e))}class xi extends Fe{constructor(){super(...arguments),this._regex=(t,n,r)=>this.refinement(i=>t.test(i),{validation:n,code:G.invalid_string,...pe.errToObj(r)}),this.nonempty=t=>this.min(1,pe.errToObj(t)),this.trim=()=>new xi({...this._def,checks:[...this._def.checks,{kind:"trim"}]}),this.toLowerCase=()=>new xi({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]}),this.toUpperCase=()=>new xi({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ne.string){const o=this._getOrReturnCtx(t);return oe(o,{code:G.invalid_type,expected:ne.string,received:o.parsedType}),we}const r=new Ln;let i;for(const o of this._def.checks)if(o.kind==="min")t.data.length<o.value&&(i=this._getOrReturnCtx(t,i),oe(i,{code:G.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="max")t.data.length>o.value&&(i=this._getOrReturnCtx(t,i),oe(i,{code:G.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){const a=t.data.length>o.value,s=t.data.length<o.value;(a||s)&&(i=this._getOrReturnCtx(t,i),a?oe(i,{code:G.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):s&&oe(i,{code:G.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if(o.kind==="email")Oxe.test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{validation:"email",code:G.invalid_string,message:o.message}),r.dirty());else if(o.kind==="emoji")Fxe.test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{validation:"emoji",code:G.invalid_string,message:o.message}),r.dirty());else if(o.kind==="uuid")Rxe.test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{validation:"uuid",code:G.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid")wxe.test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{validation:"cuid",code:G.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid2")Exe.test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{validation:"cuid2",code:G.invalid_string,message:o.message}),r.dirty());else if(o.kind==="ulid")$xe.test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{validation:"ulid",code:G.invalid_string,message:o.message}),r.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),oe(i,{validation:"url",code:G.invalid_string,message:o.message}),r.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{validation:"regex",code:G.invalid_string,message:o.message}),r.dirty())):o.kind==="trim"?t.data=t.data.trim():o.kind==="includes"?t.data.includes(o.value,o.position)||(i=this._getOrReturnCtx(t,i),oe(i,{code:G.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),r.dirty()):o.kind==="toLowerCase"?t.data=t.data.toLowerCase():o.kind==="toUpperCase"?t.data=t.data.toUpperCase():o.kind==="startsWith"?t.data.startsWith(o.value)||(i=this._getOrReturnCtx(t,i),oe(i,{code:G.invalid_string,validation:{startsWith:o.value},message:o.message}),r.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(i=this._getOrReturnCtx(t,i),oe(i,{code:G.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()):o.kind==="datetime"?Lxe(o).test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{code:G.invalid_string,validation:"datetime",message:o.message}),r.dirty()):o.kind==="ip"?jxe(t.data,o.version)||(i=this._getOrReturnCtx(t,i),oe(i,{validation:"ip",code:G.invalid_string,message:o.message}),r.dirty()):He.assertNever(o);return{status:r.value,value:t.data}}_addCheck(t){return new xi({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...pe.errToObj(t)})}url(t){return this._addCheck({kind:"url",...pe.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...pe.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...pe.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...pe.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...pe.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...pe.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...pe.errToObj(t)})}datetime(t){var n;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,...pe.errToObj(t==null?void 0:t.message)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...pe.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...pe.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...pe.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...pe.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...pe.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...pe.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...pe.errToObj(n)})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}xi.create=e=>{var t;return new xi({checks:[],typeName:be.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...$e(e)})};function Uxe(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,o=parseInt(e.toFixed(i).replace(".","")),a=parseInt(t.toFixed(i).replace(".",""));return o%a/Math.pow(10,i)}class ls extends Fe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==ne.number){const o=this._getOrReturnCtx(t);return oe(o,{code:G.invalid_type,expected:ne.number,received:o.parsedType}),we}let r;const i=new Ln;for(const o of this._def.checks)o.kind==="int"?He.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),oe(r,{code:G.invalid_type,expected:"integer",received:"float",message:o.message}),i.dirty()):o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(r=this._getOrReturnCtx(t,r),oe(r,{code:G.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),oe(r,{code:G.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?Uxe(t.data,o.value)!==0&&(r=this._getOrReturnCtx(t,r),oe(r,{code:G.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),oe(r,{code:G.not_finite,message:o.message}),i.dirty()):He.assertNever(o);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,pe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,pe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,pe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,pe.toString(n))}setLimit(t,n,r,i){return new ls({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:pe.toString(i)}]})}_addCheck(t){return new ls({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:pe.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:pe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:pe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:pe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:pe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:pe.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:pe.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:pe.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:pe.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&He.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}ls.create=e=>new ls({checks:[],typeName:be.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...$e(e)});class fs extends Fe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==ne.bigint){const o=this._getOrReturnCtx(t);return oe(o,{code:G.invalid_type,expected:ne.bigint,received:o.parsedType}),we}let r;const i=new Ln;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(r=this._getOrReturnCtx(t,r),oe(r,{code:G.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),oe(r,{code:G.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),oe(r,{code:G.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):He.assertNever(o);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,pe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,pe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,pe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,pe.toString(n))}setLimit(t,n,r,i){return new fs({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:pe.toString(i)}]})}_addCheck(t){return new fs({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:pe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:pe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:pe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:pe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:pe.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}fs.create=e=>{var t;return new fs({checks:[],typeName:be.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...$e(e)})};class op extends Fe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ne.boolean){const r=this._getOrReturnCtx(t);return oe(r,{code:G.invalid_type,expected:ne.boolean,received:r.parsedType}),we}return Hn(t.data)}}op.create=e=>new op({typeName:be.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...$e(e)});class Fu extends Fe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ne.date){const o=this._getOrReturnCtx(t);return oe(o,{code:G.invalid_type,expected:ne.date,received:o.parsedType}),we}if(isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return oe(o,{code:G.invalid_date}),we}const r=new Ln;let i;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()<o.value&&(i=this._getOrReturnCtx(t,i),oe(i,{code:G.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),r.dirty()):o.kind==="max"?t.data.getTime()>o.value&&(i=this._getOrReturnCtx(t,i),oe(i,{code:G.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):He.assertNever(o);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Fu({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:pe.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:pe.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Fu.create=e=>new Fu({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:be.ZodDate,...$e(e)});class Um extends Fe{_parse(t){if(this._getType(t)!==ne.symbol){const r=this._getOrReturnCtx(t);return oe(r,{code:G.invalid_type,expected:ne.symbol,received:r.parsedType}),we}return Hn(t.data)}}Um.create=e=>new Um({typeName:be.ZodSymbol,...$e(e)});class ap extends Fe{_parse(t){if(this._getType(t)!==ne.undefined){const r=this._getOrReturnCtx(t);return oe(r,{code:G.invalid_type,expected:ne.undefined,received:r.parsedType}),we}return Hn(t.data)}}ap.create=e=>new ap({typeName:be.ZodUndefined,...$e(e)});class sp extends Fe{_parse(t){if(this._getType(t)!==ne.null){const r=this._getOrReturnCtx(t);return oe(r,{code:G.invalid_type,expected:ne.null,received:r.parsedType}),we}return Hn(t.data)}}sp.create=e=>new sp({typeName:be.ZodNull,...$e(e)});class Ml extends Fe{constructor(){super(...arguments),this._any=!0}_parse(t){return Hn(t.data)}}Ml.create=e=>new Ml({typeName:be.ZodAny,...$e(e)});class du extends Fe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Hn(t.data)}}du.create=e=>new du({typeName:be.ZodUnknown,...$e(e)});class ia extends Fe{_parse(t){const n=this._getOrReturnCtx(t);return oe(n,{code:G.invalid_type,expected:ne.never,received:n.parsedType}),we}}ia.create=e=>new ia({typeName:be.ZodNever,...$e(e)});class Bm extends Fe{_parse(t){if(this._getType(t)!==ne.undefined){const r=this._getOrReturnCtx(t);return oe(r,{code:G.invalid_type,expected:ne.void,received:r.parsedType}),we}return Hn(t.data)}}Bm.create=e=>new Bm({typeName:be.ZodVoid,...$e(e)});class $i extends Fe{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==ne.array)return oe(n,{code:G.invalid_type,expected:ne.array,received:n.parsedType}),we;if(i.exactLength!==null){const a=n.data.length>i.exactLength.value,s=n.data.length<i.exactLength.value;(a||s)&&(oe(n,{code:a?G.too_big:G.too_small,minimum:s?i.exactLength.value:void 0,maximum:a?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(oe(n,{code:G.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(oe(n,{code:G.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,s)=>i.type._parseAsync(new po(n,a,n.path,s)))).then(a=>Ln.mergeArray(r,a));const o=[...n.data].map((a,s)=>i.type._parseSync(new po(n,a,n.path,s)));return Ln.mergeArray(r,o)}get element(){return this._def.type}min(t,n){return new $i({...this._def,minLength:{value:t,message:pe.toString(n)}})}max(t,n){return new $i({...this._def,maxLength:{value:t,message:pe.toString(n)}})}length(t,n){return new $i({...this._def,exactLength:{value:t,message:pe.toString(n)}})}nonempty(t){return this.min(1,t)}}$i.create=(e,t)=>new $i({type:e,minLength:null,maxLength:null,exactLength:null,typeName:be.ZodArray,...$e(t)});function rl(e){if(e instanceof _t){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Xo.create(rl(r))}return new _t({...e._def,shape:()=>t})}else return e instanceof $i?new $i({...e._def,type:rl(e.element)}):e instanceof Xo?Xo.create(rl(e.unwrap())):e instanceof Mu?Mu.create(rl(e.unwrap())):e instanceof Ao?Ao.create(e.items.map(t=>rl(t))):e}class _t extends Fe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=He.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==ne.object){const c=this._getOrReturnCtx(t);return oe(c,{code:G.invalid_type,expected:ne.object,received:c.parsedType}),we}const{status:r,ctx:i}=this._processInputParams(t),{shape:o,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof ia&&this._def.unknownKeys==="strip"))for(const c in i.data)a.includes(c)||s.push(c);const u=[];for(const c of a){const l=o[c],d=i.data[c];u.push({key:{status:"valid",value:c},value:l._parse(new po(i,d,i.path,c)),alwaysSet:c in i.data})}if(this._def.catchall instanceof ia){const c=this._def.unknownKeys;if(c==="passthrough")for(const l of s)u.push({key:{status:"valid",value:l},value:{status:"valid",value:i.data[l]}});else if(c==="strict")s.length>0&&(oe(i,{code:G.unrecognized_keys,keys:s}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const l of s){const d=i.data[l];u.push({key:{status:"valid",value:l},value:c._parse(new po(i,d,i.path,l)),alwaysSet:l in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const c=[];for(const l of u){const d=await l.key;c.push({key:d,value:await l.value,alwaysSet:l.alwaysSet})}return c}).then(c=>Ln.mergeObjectSync(r,c)):Ln.mergeObjectSync(r,u)}get shape(){return this._def.shape()}strict(t){return pe.errToObj,new _t({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,o,a,s;const u=(a=(o=(i=this._def).errorMap)===null||o===void 0?void 0:o.call(i,n,r).message)!==null&&a!==void 0?a:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=pe.errToObj(t).message)!==null&&s!==void 0?s:u}:{message:u}}}:{}})}strip(){return new _t({...this._def,unknownKeys:"strip"})}passthrough(){return new _t({...this._def,unknownKeys:"passthrough"})}extend(t){return new _t({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new _t({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:be.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new _t({...this._def,catchall:t})}pick(t){const n={};return He.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new _t({...this._def,shape:()=>n})}omit(t){const n={};return He.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new _t({...this._def,shape:()=>n})}deepPartial(){return rl(this)}partial(t){const n={};return He.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}),new _t({...this._def,shape:()=>n})}required(t){const n={};return He.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof Xo;)o=o._def.innerType;n[r]=o}}),new _t({...this._def,shape:()=>n})}keyof(){return Bq(He.objectKeys(this.shape))}}_t.create=(e,t)=>new _t({shape:()=>e,unknownKeys:"strip",catchall:ia.create(),typeName:be.ZodObject,...$e(t)});_t.strictCreate=(e,t)=>new _t({shape:()=>e,unknownKeys:"strict",catchall:ia.create(),typeName:be.ZodObject,...$e(t)});_t.lazycreate=(e,t)=>new _t({shape:e,unknownKeys:"strip",catchall:ia.create(),typeName:be.ZodObject,...$e(t)});class up extends Fe{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(o){for(const s of o)if(s.result.status==="valid")return s.result;for(const s of o)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const a=o.map(s=>new Ei(s.ctx.common.issues));return oe(n,{code:G.invalid_union,unionErrors:a}),we}if(n.common.async)return Promise.all(r.map(async o=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(i);{let o;const a=[];for(const u of r){const c={...n,common:{...n.common,issues:[]},parent:null},l=u._parseSync({data:n.data,path:n.path,parent:c});if(l.status==="valid")return l;l.status==="dirty"&&!o&&(o={result:l,ctx:c}),c.common.issues.length&&a.push(c.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;const s=a.map(u=>new Ei(u));return oe(n,{code:G.invalid_union,unionErrors:s}),we}}get options(){return this._def.options}}up.create=(e,t)=>new up({options:e,typeName:be.ZodUnion,...$e(t)});const rm=e=>e instanceof fp?rm(e.schema):e instanceof Li?rm(e.innerType()):e instanceof dp?[e.value]:e instanceof ds?e.options:e instanceof pp?Object.keys(e.enum):e instanceof Ap?rm(e._def.innerType):e instanceof ap?[void 0]:e instanceof sp?[null]:null;class q0 extends Fe{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ne.object)return oe(n,{code:G.invalid_type,expected:ne.object,received:n.parsedType}),we;const r=this.discriminator,i=n.data[r],o=this.optionsMap.get(i);return o?n.common.async?o._parseAsync({data:n.data,path:n.path,parent:n}):o._parseSync({data:n.data,path:n.path,parent:n}):(oe(n,{code:G.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),we)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const i=new Map;for(const o of n){const a=rm(o.shape[t]);if(!a)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of a){if(i.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);i.set(s,o)}}return new q0({typeName:be.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...$e(r)})}}function cC(e,t){const n=Za(e),r=Za(t);if(e===t)return{valid:!0,data:e};if(n===ne.object&&r===ne.object){const i=He.objectKeys(t),o=He.objectKeys(e).filter(s=>i.indexOf(s)!==-1),a={...e,...t};for(const s of o){const u=cC(e[s],t[s]);if(!u.valid)return{valid:!1};a[s]=u.data}return{valid:!0,data:a}}else if(n===ne.array&&r===ne.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let o=0;o<e.length;o++){const a=e[o],s=t[o],u=cC(a,s);if(!u.valid)return{valid:!1};i.push(u.data)}return{valid:!0,data:i}}else return n===ne.date&&r===ne.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class cp extends Fe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=(o,a)=>{if(sC(o)||sC(a))return we;const s=cC(o.value,a.value);return s.valid?((uC(o)||uC(a))&&n.dirty(),{status:n.value,value:s.data}):(oe(r,{code:G.invalid_intersection_types}),we)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,a])=>i(o,a)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}cp.create=(e,t,n)=>new cp({left:e,right:t,typeName:be.ZodIntersection,...$e(n)});class Ao extends Fe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ne.array)return oe(r,{code:G.invalid_type,expected:ne.array,received:r.parsedType}),we;if(r.data.length<this._def.items.length)return oe(r,{code:G.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),we;!this._def.rest&&r.data.length>this._def.items.length&&(oe(r,{code:G.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const o=[...r.data].map((a,s)=>{const u=this._def.items[s]||this._def.rest;return u?u._parse(new po(r,a,r.path,s)):null}).filter(a=>!!a);return r.common.async?Promise.all(o).then(a=>Ln.mergeArray(n,a)):Ln.mergeArray(n,o)}get items(){return this._def.items}rest(t){return new Ao({...this._def,rest:t})}}Ao.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ao({items:e,typeName:be.ZodTuple,rest:null,...$e(t)})};class lp extends Fe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ne.object)return oe(r,{code:G.invalid_type,expected:ne.object,received:r.parsedType}),we;const i=[],o=this._def.keyType,a=this._def.valueType;for(const s in r.data)i.push({key:o._parse(new po(r,s,r.path,s)),value:a._parse(new po(r,r.data[s],r.path,s))});return r.common.async?Ln.mergeObjectAsync(n,i):Ln.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Fe?new lp({keyType:t,valueType:n,typeName:be.ZodRecord,...$e(r)}):new lp({keyType:xi.create(),valueType:t,typeName:be.ZodRecord,...$e(n)})}}class Pm extends Fe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ne.map)return oe(r,{code:G.invalid_type,expected:ne.map,received:r.parsedType}),we;const i=this._def.keyType,o=this._def.valueType,a=[...r.data.entries()].map(([s,u],c)=>({key:i._parse(new po(r,s,r.path,[c,"key"])),value:o._parse(new po(r,u,r.path,[c,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const u of a){const c=await u.key,l=await u.value;if(c.status==="aborted"||l.status==="aborted")return we;(c.status==="dirty"||l.status==="dirty")&&n.dirty(),s.set(c.value,l.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const u of a){const c=u.key,l=u.value;if(c.status==="aborted"||l.status==="aborted")return we;(c.status==="dirty"||l.status==="dirty")&&n.dirty(),s.set(c.value,l.value)}return{status:n.value,value:s}}}}Pm.create=(e,t,n)=>new Pm({valueType:t,keyType:e,typeName:be.ZodMap,...$e(n)});class ku extends Fe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ne.set)return oe(r,{code:G.invalid_type,expected:ne.set,received:r.parsedType}),we;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(oe(r,{code:G.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(oe(r,{code:G.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const o=this._def.valueType;function a(u){const c=new Set;for(const l of u){if(l.status==="aborted")return we;l.status==="dirty"&&n.dirty(),c.add(l.value)}return{status:n.value,value:c}}const s=[...r.data.values()].map((u,c)=>o._parse(new po(r,u,r.path,c)));return r.common.async?Promise.all(s).then(u=>a(u)):a(s)}min(t,n){return new ku({...this._def,minSize:{value:t,message:pe.toString(n)}})}max(t,n){return new ku({...this._def,maxSize:{value:t,message:pe.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}ku.create=(e,t)=>new ku({valueType:e,minSize:null,maxSize:null,typeName:be.ZodSet,...$e(t)});class Al extends Fe{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ne.function)return oe(n,{code:G.invalid_type,expected:ne.function,received:n.parsedType}),we;function r(s,u){return Mm({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,km(),ip].filter(c=>!!c),issueData:{code:G.invalid_arguments,argumentsError:u}})}function i(s,u){return Mm({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,km(),ip].filter(c=>!!c),issueData:{code:G.invalid_return_type,returnTypeError:u}})}const o={errorMap:n.common.contextualErrorMap},a=n.data;return this._def.returns instanceof Ll?Hn(async(...s)=>{const u=new Ei([]),c=await this._def.args.parseAsync(s,o).catch(p=>{throw u.addIssue(r(s,p)),u}),l=await a(...c);return await this._def.returns._def.type.parseAsync(l,o).catch(p=>{throw u.addIssue(i(l,p)),u})}):Hn((...s)=>{const u=this._def.args.safeParse(s,o);if(!u.success)throw new Ei([r(s,u.error)]);const c=a(...u.data),l=this._def.returns.safeParse(c,o);if(!l.success)throw new Ei([i(c,l.error)]);return l.data})}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Al({...this._def,args:Ao.create(t).rest(du.create())})}returns(t){return new Al({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Al({args:t||Ao.create([]).rest(du.create()),returns:n||du.create(),typeName:be.ZodFunction,...$e(r)})}}class fp extends Fe{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}fp.create=(e,t)=>new fp({getter:e,typeName:be.ZodLazy,...$e(t)});class dp extends Fe{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return oe(n,{received:n.data,code:G.invalid_literal,expected:this._def.value}),we}return{status:"valid",value:t.data}}get value(){return this._def.value}}dp.create=(e,t)=>new dp({value:e,typeName:be.ZodLiteral,...$e(t)});function Bq(e,t){return new ds({values:e,typeName:be.ZodEnum,...$e(t)})}class ds extends Fe{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return oe(n,{expected:He.joinValues(r),received:n.parsedType,code:G.invalid_type}),we}if(this._def.values.indexOf(t.data)===-1){const n=this._getOrReturnCtx(t),r=this._def.values;return oe(n,{received:n.data,code:G.invalid_enum_value,options:r}),we}return Hn(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t){return ds.create(t)}exclude(t){return ds.create(this.options.filter(n=>!t.includes(n)))}}ds.create=Bq;class pp extends Fe{_parse(t){const n=He.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==ne.string&&r.parsedType!==ne.number){const i=He.objectValues(n);return oe(r,{expected:He.joinValues(i),received:r.parsedType,code:G.invalid_type}),we}if(n.indexOf(t.data)===-1){const i=He.objectValues(n);return oe(r,{received:r.data,code:G.invalid_enum_value,options:i}),we}return Hn(t.data)}get enum(){return this._def.values}}pp.create=(e,t)=>new pp({values:e,typeName:be.ZodNativeEnum,...$e(t)});class Ll extends Fe{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ne.promise&&n.common.async===!1)return oe(n,{code:G.invalid_type,expected:ne.promise,received:n.parsedType}),we;const r=n.parsedType===ne.promise?n.data:Promise.resolve(n.data);return Hn(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Ll.create=(e,t)=>new Ll({type:e,typeName:be.ZodPromise,...$e(t)});class Li extends Fe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===be.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null;if(i.type==="preprocess"){const a=i.transform(r.data);return r.common.async?Promise.resolve(a).then(s=>this._def.schema._parseAsync({data:s,path:r.path,parent:r})):this._def.schema._parseSync({data:a,path:r.path,parent:r})}const o={addIssue:a=>{oe(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="refinement"){const a=s=>{const u=i.refinement(s,o);if(r.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?we:(s.status==="dirty"&&n.dirty(),a(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?we:(s.status==="dirty"&&n.dirty(),a(s.value).then(()=>({status:n.value,value:s.value}))))}if(i.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Lm(a))return a;const s=i.transform(a.value,o);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>Lm(a)?Promise.resolve(i.transform(a.value,o)).then(s=>({status:n.value,value:s})):a);He.assertNever(i)}}Li.create=(e,t,n)=>new Li({schema:e,typeName:be.ZodEffects,effect:t,...$e(n)});Li.createWithPreprocess=(e,t,n)=>new Li({schema:t,effect:{type:"preprocess",transform:e},typeName:be.ZodEffects,...$e(n)});class Xo extends Fe{_parse(t){return this._getType(t)===ne.undefined?Hn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Xo.create=(e,t)=>new Xo({innerType:e,typeName:be.ZodOptional,...$e(t)});class Mu extends Fe{_parse(t){return this._getType(t)===ne.null?Hn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Mu.create=(e,t)=>new Mu({innerType:e,typeName:be.ZodNullable,...$e(t)});class Ap extends Fe{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===ne.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Ap.create=(e,t)=>new Ap({innerType:e,typeName:be.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...$e(t)});class Dm extends Fe{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return jm(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Ei(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Ei(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Dm.create=(e,t)=>new Dm({innerType:e,typeName:be.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...$e(t)});class Wm extends Fe{_parse(t){if(this._getType(t)!==ne.nan){const r=this._getOrReturnCtx(t);return oe(r,{code:G.invalid_type,expected:ne.nan,received:r.parsedType}),we}return{status:"valid",value:t.data}}}Wm.create=e=>new Wm({typeName:be.ZodNaN,...$e(e)});const Bxe=Symbol("zod_brand");class Pq extends Fe{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class Sh extends Fe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?we:o.status==="dirty"?(n.dirty(),Uq(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?we:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new Sh({in:t,out:n,typeName:be.ZodPipeline})}}const Dq=(e,t={},n)=>e?Ml.create().superRefine((r,i)=>{var o,a;if(!e(r)){const s=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,u=(a=(o=s.fatal)!==null&&o!==void 0?o:n)!==null&&a!==void 0?a:!0,c=typeof s=="string"?{message:s}:s;i.addIssue({code:"custom",...c,fatal:u})}}):Ml.create(),Pxe={object:_t.lazycreate};var be;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline"})(be||(be={}));const Dxe=(e,t={message:`Input not instance of ${e.name}`})=>Dq(n=>n instanceof e,t),ru=xi.create,Km=ls.create,Wxe=Wm.create,Kxe=fs.create,Wq=op.create,Nxe=Fu.create,qxe=Um.create,Vxe=ap.create,Qxe=sp.create,zxe=Ml.create,Hxe=du.create,Yxe=ia.create,Gxe=Bm.create,Kq=$i.create,Nm=_t.create,Jxe=_t.strictCreate,Zxe=up.create,Xxe=q0.create,ewe=cp.create,twe=Ao.create,nwe=lp.create,rwe=Pm.create,iwe=ku.create,owe=Al.create,awe=fp.create,swe=dp.create,uwe=ds.create,cwe=pp.create,lwe=Ll.create,JF=Li.create,fwe=Xo.create,dwe=Mu.create,pwe=Li.createWithPreprocess,Awe=Sh.create,hwe=()=>ru().optional(),mwe=()=>Km().optional(),gwe=()=>Wq().optional(),vwe={string:e=>xi.create({...e,coerce:!0}),number:e=>ls.create({...e,coerce:!0}),boolean:e=>op.create({...e,coerce:!0}),bigint:e=>fs.create({...e,coerce:!0}),date:e=>Fu.create({...e,coerce:!0})},ywe=we;var L=Object.freeze({__proto__:null,defaultErrorMap:ip,setErrorMap:Txe,getErrorMap:km,makeIssue:Mm,EMPTY_PATH:xxe,addIssueToContext:oe,ParseStatus:Ln,INVALID:we,DIRTY:Uq,OK:Hn,isAborted:sC,isDirty:uC,isValid:Lm,isAsync:jm,get util(){return He},get objectUtil(){return aC},ZodParsedType:ne,getParsedType:Za,ZodType:Fe,ZodString:xi,ZodNumber:ls,ZodBigInt:fs,ZodBoolean:op,ZodDate:Fu,ZodSymbol:Um,ZodUndefined:ap,ZodNull:sp,ZodAny:Ml,ZodUnknown:du,ZodNever:ia,ZodVoid:Bm,ZodArray:$i,ZodObject:_t,ZodUnion:up,ZodDiscriminatedUnion:q0,ZodIntersection:cp,ZodTuple:Ao,ZodRecord:lp,ZodMap:Pm,ZodSet:ku,ZodFunction:Al,ZodLazy:fp,ZodLiteral:dp,ZodEnum:ds,ZodNativeEnum:pp,ZodPromise:Ll,ZodEffects:Li,ZodTransformer:Li,ZodOptional:Xo,ZodNullable:Mu,ZodDefault:Ap,ZodCatch:Dm,ZodNaN:Wm,BRAND:Bxe,ZodBranded:Pq,ZodPipeline:Sh,custom:Dq,Schema:Fe,ZodSchema:Fe,late:Pxe,get ZodFirstPartyTypeKind(){return be},coerce:vwe,any:zxe,array:Kq,bigint:Kxe,boolean:Wq,date:Nxe,discriminatedUnion:Xxe,effect:JF,enum:uwe,function:owe,instanceof:Dxe,intersection:ewe,lazy:awe,literal:swe,map:rwe,nan:Wxe,nativeEnum:cwe,never:Yxe,null:Qxe,nullable:dwe,number:Km,object:Nm,oboolean:gwe,onumber:mwe,optional:fwe,ostring:hwe,pipeline:Awe,preprocess:pwe,promise:lwe,record:nwe,set:iwe,strictObject:Jxe,string:ru,symbol:qxe,transformer:JF,tuple:twe,undefined:Vxe,union:Zxe,unknown:Hxe,void:Gxe,NEVER:ywe,ZodIssueCode:G,quotelessJson:Ixe,ZodError:Ei});const bwe=L.object({id:L.string(),label:L.string(),repeatable:L.boolean(),status:L.boolean()}),Cwe=L.array(bwe);function Nq(e,t,n){return me.request(new URL("customtypes",e),{headers:{repository:t},credentials:me.getRequestCredentials(n),okType:Cwe})}const Swe=L.object({first_name:L.string().optional(),last_name:L.string().optional(),email:L.string().optional(),uploadedAvatar:L.string().optional()}),BR=L.object({id:L.string(),name:L.string(),is_master:L.boolean().optional()}),_we=L.discriminatedUnion("status",[L.object({status:L.literal("unclassified")}),L.object({status:L.literal("published")}),L.object({status:L.literal("release"),release_id:L.string()}),L.object({status:L.literal("archived")})]).and(L.object({version_id:L.string(),tags:L.array(L.string()),custom_type_label:L.string(),preview_summary:L.string().optional(),preview_image:L.string().optional(),last_modified_date:L.coerce.date(),author:Swe,uid:L.string().optional()})),PR=L.object({id:L.string(),title:L.string().nullish().transform(e=>e??"Untitled"),custom_type_id:L.string(),group_lang_id:L.string(),language:BR,versions:L.array(_we)}),qq=L.object({total:L.number(),cursor:L.string().optional(),results:L.array(PR)}),Iwe=L.object({id:L.string(),title:L.string(),repository_id:L.string(),tags:L.array(L.string()).optional()}).passthrough(),Twe=L.object({results:L.array(Iwe)});function DR(e,t,n,r,i){const o=new URL("documents",e);return r&&o.searchParams.set("limit",r.toString()),i&&o.searchParams.set("cursor",i),o.search+=`&${n}`,me.request(o,{credentials:me.getRequestCredentials(t),okType:qq})}function Vq(e){const{baseUrl:t,authStrategy:n,limit:r,cursor:i,status:o,authors:a,language:s,group_lang_id:u,document_id:c,customTypes:l,tags:d,term:p,signal:A}=e,m=new URL("documents",t),g=[];return typeof r=="number"&&g.push({name:"limit",values:[r.toString()]}),i&&g.push({name:"cursor",values:[i]}),o!=null&&o.length&&g.push({name:"status",values:o}),a!=null&&a.length&&g.push({name:"authors",values:a}),s&&g.push({name:"language",values:[s]}),u&&g.push({name:"group_lang_id",values:[u]}),c!=null&&c.length&&g.push({name:"document_id",values:c}),l!=null&&l.length&&g.push({name:"customTypes",values:l}),d!=null&&d.length&&g.push({name:"tags",values:d}),p&&g.push({name:"term",values:[p]}),m.search=new URLSearchParams(V0(g)).toString(),me.request(m,{credentials:me.getRequestCredentials(n),okType:qq,signal:A})}function Qq(e,t,n,r){const i=new URL(e);return i.search=n,me.request(i,{credentials:me.getRequestCredentials(t),okType:Twe,...r})}function zq(e){const{repository:t,searchTerm:n,tags:r,localeId:i,customTypesIds:o}=e,a=new URLSearchParams;return a.append("repository",t),n&&a.append("searchTerm",n),r!=null&&r.length&&a.append("tags",r.toString()),i&&a.append("localeId",i),o!=null&&o.length&&a.append("customTypesIds",o.toString()),a.toString()}function V0(e){return e.reduce((t,n)=>{if(n.values.every(i=>i===""||i===void 0))return t;const r=n.values.map(i=>[n.name,i??""]);return t.concat(r)},[])}function _h(e,t,n){return me.request(new URL(`documents/${n}`,e),{credentials:me.getRequestCredentials(t),okType:PR})}const xwe=L.custom().transform((e,t)=>{const n=ye.Document.decode(e);return n._tag==="Left"?(t.addIssue({code:L.ZodIssueCode.custom,message:"Invalid document."}),L.NEVER):n.right});function WR(e){const t=Ql.keys(e).flatMap(r=>{const i=e[r];return i?{name:r,values:i}:[]});return new URLSearchParams(V0(t)).toString()}async function Hq(e,t,n){if(n.length===0)return[];const r=n.slice(0,50).map(({id:a})=>a),i=await Vq({baseUrl:e,authStrategy:t,document_id:r}),o=new Map(r.map((a,s)=>[a,s]));return i.results.sort((a,s)=>{const u=o.get(a.id),c=o.get(s.id);return(u??1/0)-(c??1/0)})}const wwe=L.unknown().transform((e,t)=>{const n=ye.SliceItemContent.decode(e);return n._tag==="Right"?n.right:(t.addIssue({code:L.ZodIssueCode.custom,message:"Invalid slice content."}),L.NEVER)}),Go={all:()=>["documents"],lists:()=>[...Go.all(),"list"],list:e=>[...Go.lists(),e],infiniteLists:()=>[...Go.all(),"list:infinite"],infiniteList:e=>[...Go.infiniteLists(),e]};function Ewe(e,t){e.setQueriesData({queryKey:Go.lists()},n=>n&&ZF(n,t)),e.setQueriesData({queryKey:Go.infiniteLists()},n=>n&&{...n,pages:n.pages.map(r=>ZF(r,t))})}function ZF(e,t){const n=e.results.flatMap(r=>{const i=t(r,e);return i?[i]:[]});return{...e,results:n,total:e.total+(n.length-e.results.length)}}async function $we(e){await e.invalidateQueries({queryKey:Go.lists()}),await e.invalidateQueries({queryKey:Go.infiniteLists()})}const Rwe=L.object({id:L.string(),firstname:L.string().optional(),lastname:L.string().optional(),email:L.string(),uploadedAvatar:L.string().optional()}),Owe=L.array(Rwe),Fwe=L.object({slicemachineEnabled:L.boolean()}),Yq=["next","nuxt","sveltekit"];function kwe(e){return Yq.includes(e)}const KR=L.preprocess(e=>typeof e=="string"&&kwe(e)?e:"other",L.enum([...Yq,"other"])),Mwe=L.object({simulator_url:L.string().url().nullish(),languages:L.array(BR).transform(e=>kt.sort(e,t=>t.name)),authors:Owe.optional().default([]),quotas:Fwe.optional().default({slicemachineEnabled:!1}),framework:KR.optional().default("other"),starterId:L.string().optional(),storageVersion:L.object({major:L.number().int(),minor:L.number().int()}),uploadedAvatar:L.string().url().optional()}).transform(({simulator_url:e,framework:t,...n})=>{const r=e&&Gq(e)?e:void 0;return{...n,framework:t,simulatorUrl:r,isSupportedFramework:t!=="other"}});function Q0(e,t){return me.request(new URL("repository",e),{credentials:me.getRequestCredentials(t),okType:Mwe})}function Gq(e){const t=Fr.toURL(e);return t?t.pathname.endsWith("/slice-simulator"):!1}const Lwe=L.object({results:L.array(L.string())});function Jq(e,t){return me.request(new URL("repository/tags",e),{credentials:me.getRequestCredentials(t),okType:Lwe})}const jwe=L.enum(["createPrismicProject","chooseLocale","createProject","setupSliceMachine","createPageType","codePage","createSlice","reviewAndPush","createContent","renderPage"]),Zq=L.object({completedSteps:L.array(L.string()),isDismissed:L.boolean(),context:L.object({framework:KR,starterId:L.string().nullable()})}),Xq=L.object({completedSteps:L.array(L.string())}),e7=L.object({isDismissed:L.boolean()});function Uwe(e,t,n){const r=new URL("onboarding",e);return r.searchParams.append("repository",t),me.request(r,{headers:{repository:t},credentials:me.getRequestCredentials(n),okType:Zq})}function Bwe(e,t,n,r){const i=new URL(`onboarding/${e}/toggle`,t);return i.searchParams.append("repository",n),me.request(i,{method:"PATCH",headers:{repository:n},credentials:me.getRequestCredentials(r),okType:Xq})}function Pwe(e,t,n){const r=new URL("onboarding/toggle",e);return r.searchParams.append("repository",t),me.request(r,{method:"PATCH",headers:{repository:t},credentials:me.getRequestCredentials(n),okType:e7})}const t7=L.enum(["Owner","Administrator","Writer","Manager","Readonly"]),Dwe=L.record(t7.optional()),Wwe=t7.or(Dwe),Kwe={SuperUser:"SuperUser",Owner:"Owner",Administrator:"Administrator",Manager:"Publisher",Writer:"Writer",Readonly:"Contributor"},n7=L.object({shortId:L.string(),intercomHash:L.string(),email:L.string(),firstName:L.string(),lastName:L.string(),superPower:L.boolean(),repositories:L.array(L.object({domain:L.string(),role:Wwe}))});function r7(e,t){const n=new URL("profile",e);return me.request(n,{credentials:me.getRequestCredentials(t),okType:n7})}function NR(){const e=Te();e.userServiceBaseUrl||Ht("userServiceBaseUrl");const{authStrategy:t,userServiceBaseUrl:n}=e;return Ke.useRequest(r7,[n,t])}const Nwe="https://prismic.io/docs/guides/manage-images#supported-media";function Ih(){const e=Te();e.mediaLibrary||Ht("mediaLibrary");const{assetsApiBaseUrl:t,authStrategy:n,repository:r}=e,{items:i}=Ke.useRequest(i7,[t,r,n]);return{tags:i}}function i7(e,t,n){return me.request(new URL("tags",e),{credentials:me.getRequestCredentials(n),okType:qwe,headers:{repository:t}})}const o7=1,a7=20,qR=L.string().min(o7).max(a7),VR=L.object({id:L.string(),name:qR,uploader_id:L.string().optional(),created_at:L.number(),last_modified:L.number(),count:L.number().optional().default(0)}),qwe=L.object({items:L.array(VR)});function Th(e){Ke.updateFetcherData(i7,t=>{const{items:n}=t,r=e(n);if(r)return{items:r}})}function Vwe(e){const{assetType:t,keyword:n,mode:r,tagIds:i}=e,o=Te();o.mediaLibrary||Ht("mediaLibrary");const{onAnalyticsEvent:a}=o,s=Ke.useFetcherData(mi),u=s[s.length-1],c=E.useRef(u);c.current=u,E.useEffect(()=>{if(!a||!n||!c.current||c.current.keyword!==n)return;const l=String(n.split(" ").length),d=String(c.current.total),p=i.join(",");a("Media Library Search",{searchQuery:n,numberOfWords:l,numberOfResults:d,timeToGetResults:c.current.time,assetType:t,mode:r,tags:p})},[n,t,r,a,i])}function Qwe(e){const{assetType:t,mediaDialogOpen:n}=e,r=Te(),i=Ke.useFetcherData(mi),o=E.useRef(0);E.useEffect(()=>{n&&(o.current=performance.now())},[n]);function a(s){if(!r.onAnalyticsEvent||!r.mediaLibrary)return;const u=i[i.length-1];if(!u)return;const{keyword:c,uploaderId:l,tags:d}=u,p=c7(i,c,t,l,d),A=String(c.split(" ").length),m=String(u.total),g=p.findIndex(x=>x.id===s),_=String(g+1),b=[s].join(","),I=(performance.now()-o.current).toFixed(0);r.onAnalyticsEvent("Media Added To Page",{assetType:t,searchQuery:c,numberOfWords:A,numberOfResults:m,searchPosition:_,mediaIds:b,timeToAddMediaToPage:I,tags:d})}return a}const Nh=L.array(L.string()).optional().transform(e=>e==null?void 0:e[0]),z0=L.object({id:L.string(),kind:L.string(),extension:L.string().optional(),filename:L.string(),width:L.number().optional(),height:L.number().optional(),last_modified:L.number(),url:L.string(),alt:L.string().optional(),uploader_id:L.string().optional(),size:L.number(),notes:L.string().optional(),credits:L.string().optional(),search_highlight:L.object({filename:Nh,alt:Nh,notes:Nh,credits:Nh}).optional(),tags:L.array(VR)}),s7={"X-Prismic-Source":"Wroom"},zwe=L.object({total:L.number(),cursor:L.string().optional(),items:L.array(z0)}),u7=30;function mi(e,t,n,r,i,o,a,s,u){const c=e?new URL("assets",e):void 0,l=new URLSearchParams(V0([{name:"limit",values:[`${u7}`]},{name:"cursor",values:[u]},{name:"keyword",values:[r]},{name:"assetType",values:[i]},{name:"uploaderId",values:[o]},{name:"tags",values:a.split(",")}])).toString(),d=zwe.transform(A=>({...A,keyword:r,assetType:i,uploaderId:o,tags:a,page:s})),p=performance.now();return me.request(`${(c==null?void 0:c.href)??""}?${l}`,{headers:{repository:t,...s7},credentials:me.getRequestCredentials(n),okType:d}).then(A=>({...A,time:(performance.now()-p).toFixed(0)}))}Ke.cache.registerFetcherConfig(mi,{revalidationStrategy:{type:"never"}});const Vn={keyword:"",assetType:"all",uploaderId:void 0,tagIds:[]};function Hwe(e){const{initialAssetType:t=Vn.assetType,mode:n}=e,r=Te(),[i,o]=E.useState({...Vn,assetType:t,page:0});r.mediaLibrary||Ht("mediaLibrary");const{assetsApiBaseUrl:a,authStrategy:s,repository:u}=r,{page:c,cursor:l,keyword:d,assetType:p,uploaderId:A,tagIds:m}=i,g=Ke.useRequest(mi,hp({assetsApiBaseUrl:a,authStrategy:s,repository:u,keyword:d,assetType:p,uploaderId:A,tagIds:m,page:c,cursor:l}));Vwe({assetType:p,keyword:d,tagIds:m,mode:n});const _=Zwe(d,p,A,m),b=g.total!==_.length;function I(){g.cursor!==void 0&&o(y=>({...y,page:y.page+1,cursor:g.cursor}))}function x(y){o(T=>({...T,page:0,cursor:void 0})),Lu((T,w)=>{if(w.page===0)return[...y,...T]})}function v(y){o(T=>({...T,...y,page:0,cursor:void 0}))}function S(){o(y=>({...y,...Vn,assetType:t==="all"?Vn.assetType:y.assetType,page:0,cursor:void 0}))}return{keyword:d,assetType:p,uploaderId:A,tagIds:m,setFilters:v,resetFilters:S,media:_,mediaTotal:g.total,limit:u7,hasNextPage:b,fetchNextPage:I,updateMedia:Ywe,unshiftMedia:x,deleteMedia:Gwe,deleteSearchData:Jwe,revalidateFirstPage:l7}}function Ywe(e){Lu(t=>t.flatMap(n=>{const r=e.find(i=>i.id===n.id);return r?r.response===void 0?[]:{...n,...r.response}:n}))}function Gwe(e){Lu(t=>t.filter(n=>!e.includes(n.id)))}function Jwe(e){const{keyword:t,assetType:n,uploaderId:r,tagIds:i}=e,o=i==null?void 0:i.join(",");Ke.updateFetcherData(mi,a=>{if(!(a.keyword===t&&a.assetType===n&&a.uploaderId===r&&a.tags===o))return a})}function c7(e,t,n,r,i){const o=e.filter(u=>u.keyword===t&&u.assetType===n&&u.uploaderId===r&&u.tags===i),s=kt.sort(o,u=>u.page).flatMap(u=>u.items);return t?kt.uniqBy(s,u=>u.id):s}function Zwe(e,t,n,r){const i=Ke.useFetcherData(mi);return c7(i,e,t,n,r.join(","))}function Lu(e){Ke.updateFetcherData(mi,t=>{const{items:n,total:r}=t,i=e(n,t);if(i)return{...t,total:r+(i.length-n.length),items:i}})}function l7(e){const{config:t,keyword:n=Vn.keyword,assetType:r=Vn.assetType,tagIds:i=Vn.tagIds}=e;if(!t.mediaLibrary)throw new Error("media library is not configured");const{assetsApiBaseUrl:o,authStrategy:a,repository:s}=t;Ke.revalidateData(mi,hp({assetsApiBaseUrl:o,repository:s,authStrategy:a,keyword:n,assetType:r,tagIds:i,page:0}))}function f7(e){const{config:t,keyword:n=Vn.keyword,assetType:r=Vn.assetType,tagIds:i=Vn.tagIds}=e;if(!t.mediaLibrary)throw new Error("media library is not configured");Ke.updateFetcherData(mi,o=>o.page===0?o:void 0),l7({config:t,keyword:n,assetType:r,tagIds:i})}function hp(e){return[e.assetsApiBaseUrl,e.repository,e.authStrategy,e.keyword,e.assetType,e.uploaderId,e.tagIds.join(","),e.page,e.cursor]}function d7(){const e=Te();e.mediaLibrary||Ht("mediaLibrary");const{assetsApiBaseUrl:t,coreApiBaseUrl:n,authStrategy:r,repository:i}=e,{authors:o}=Ke.useRequest(Q0,[n,r]),{items:a}=Ke.useRequest(p7,[t,i,r]),{shortId:s}=NR(),u=new Map(o.map(d=>[d.id,d])),c=[];for(const d of a){if(d.id==="ghost"){c.push({id:d.id,name:"Ghost",uploadedAvatar:"https://images.prismic.io/page-builder-assets/ZuAXWBoQrfVKl5sD_ghost_user.png?auto=format,compress&w=64"});continue}const p=u.get(d.id);if(!p)continue;let A;if(p.uploadedAvatar){const m=new URL(p.uploadedAvatar);m.searchParams.set("w","64"),A=m.toString()}c.push({id:d.id,name:[p.firstname,p.lastname].filter(Boolean).join(" "),firstName:p.firstname,lastName:p.lastname,email:p.email,uploadedAvatar:A})}const l=new Map(c.map(d=>[d.id,d]));return{uploaders:kt.sort(c,d=>d.id===s?0:1,d=>d.name),uploadersById:l}}function p7(e,t,n){return me.request(new URL("uploaders",e),{credentials:me.getRequestCredentials(n),okType:eEe,headers:{repository:t}})}const Xwe=L.object({id:L.string()}),eEe=L.object({items:L.array(Xwe)});function A7(){const e=Te();e.mediaLibrary||Ht("mediaLibrary");const{assetsApiBaseUrl:t,authStrategy:n,repository:r}=e;return()=>{Ke.revalidateData(p7,[t,r,n])}}function tEe(e){const{revalidate:t,config:n,keyword:r,assetType:i,uploaderId:o,tagIds:a}=e,{assetsApiBaseUrl:s=void 0,repository:u="",authStrategy:c="token"}=n.mediaLibrary?n:{},[l,d]=E.useState(!1),[p,A]=E.useState(!1),m={assetsApiBaseUrl:s,repository:u,authStrategy:c,keyword:r,assetType:i,uploaderId:o,tagIds:a,page:0},{revalidateData:g}=Ke.useCacheRevalidation({fetcher:mi,requestParams:hp(m),validator:(I,x)=>{var y,T;const v=((y=I.items[0])==null?void 0:y.id)??"",S=((T=x.items[0])==null?void 0:T.id)??"";return v!==S||I.total!==(x==null?void 0:x.total)},onCacheInvalidated:()=>A(!0),every:6e4}),_=I=>{g(hp({...m,...I}))};E.useEffect(()=>{l&&(A(!1),d(!1))},[l]);function b(){d(!0),t()}return{isMediaRevalidationInProgress:l,isMediaCacheInvalid:p,revalidateMedia:b,revalidateWithParams:_}}function nEe(e){const{onBeforeUpload:t,onComplete:n}=e,[r,i]=E.useState([]),o=r.some(l=>l.status==="idle"||l.status==="uploading"),a=Te();function s(){if(!r.length||r.some(A=>A.status==="uploading")||r.every(A=>A.status==="error"))return;const l=r.find(A=>A.status==="idle");if(!l)return;let d=r;function p(A){d=A(d),i(d),d.every(g=>g.status==="success"||g.status==="error")&&setTimeout(()=>{i([]),n==null||n(d)},1500)}p(A=>A.map(m=>m.id===l.id?{...m,status:"uploading"}:m)),rEe({file:l.file,config:a}).then(A=>{p(m=>m.map(g=>g.id===l.id?{...g,status:"success",response:A}:g))}).catch(()=>{p(A=>A.map(m=>m.id===l.id?{...m,status:"error"}:m))})}function u(l){const d=l.map(p=>({id:`temp-${crypto.randomUUID()}`,file:p,status:"idle"}));i(d),t(d)}const c=E.useCallback(l=>{const d=[{...l,status:"idle"},...r.filter(p=>p.id!==l.id)];i(d),t(d)},[t,r]);return E.useEffect(s,[a,r,n]),{isUploading:o,uploadingFiles:r,onFilesSelected:u,onRetry:c}}function rEe(e){const{file:t,config:n}=e;if(!n.mediaLibrary)throw new Error("Media Library not configured.");const{assetsApiBaseUrl:r,repository:i,authStrategy:o}=n,a=new FormData;return a.append(t.name,t),me.request(new URL("assets",r),{headers:{repository:i,"Content-Type":"multipart/form-data",...s7},method:"POST",body:a,credentials:me.getRequestCredentials(o),okType:z0})}const h7=E.createContext(void 0);function iEe(e){const{children:t,assetType:n=Vn.assetType,onSelectedChange:r,actionContainerRef:i}=e,o=r?"select":"browse",[a,s]=E.useTransition(),[u,c]=E.useTransition(),l=Te(),{showAlert:d}=h.useAlert(),p=NR(),A=A7(),{keyword:m,assetType:g,uploaderId:_,tagIds:b,setFilters:I,resetFilters:x,media:v,fetchNextPage:S,hasNextPage:y,updateMedia:T,unshiftMedia:w,deleteMedia:O,mediaTotal:F,deleteSearchData:$,revalidateFirstPage:P}=Hwe({initialAssetType:n,mode:o}),[K,J]=E.useState();function ee(){f7({config:l,keyword:m,assetType:g,uploaderId:_,tagIds:b})}const{isMediaRevalidationInProgress:re,isMediaCacheInvalid:D,revalidateMedia:Y,revalidateWithParams:M}=tEe({config:l,revalidate:ee,keyword:m,assetType:g,uploaderId:_,tagIds:b});function k(Ne){const dt=Ne.keyword===Vn.keyword,St=Ne.assetType===n,st=Ne.uploaderId===Vn.uploaderId,Wt=Ne.tagIds.length===Vn.tagIds.length&&Ne.tagIds.every((gi,_r)=>gi===Vn.tagIds[_r]);return dt&&St&&st&&Wt}function q(Ne){const dt={keyword:m,assetType:g,tagIds:b,uploaderId:_,...Ne};k(dt)?M(Ne):$(dt),c(()=>{I(Ne),at.clearSelection()})}const{isUploading:ue,onFilesSelected:ke,uploadingFiles:Ie,onRetry:rt}=nEe({onBeforeUpload:Ne=>{x();const dt=Ne.filter(st=>st.status==="idle").map(st=>({id:st.id,url:URL.createObjectURL(st.file),filename:st.file.name,size:st.file.size,extension:st.file.type,kind:st.file.type,last_modified:st.file.lastModified,tags:[],uploader_id:p.shortId}));w(dt);const[St]=dt??[];St&&at.toggleSelection({id:St.id,isSingleSelection:!0})},onComplete:Ne=>{const dt=Ne.flatMap(Wt=>Wt.status==="success"?Wt:(dn(Wt),{id:Wt.id,response:void 0}));T(dt),P({config:l,assetType:g,tagIds:b}),A();const St=dt[0];!St||!St.response||!at.isSelected(St.id)||at.toggleSelection({id:St.response.id,isSingleSelection:!0})}}),at=qs({totalItemCount:F,onChangeSelection:({selectedIds:Ne,selectedCount:dt})=>{if(Yr(!1),!!r){if(dt===1){const[St]=[...Ne];if(Ie.some(Wt=>Wt.id===St&&Wt.status!=="success")){r(new Set);return}}r(new Set(Ne))}}});function fn(Ne){ue||ke(Ne)}function Zt(){y&&s(S)}function rr(Ne,dt){T([{id:Ne,response:dt}])}function dn(Ne){const dt=Ep.overflow(Ne.file.name,30);d({id:Ne.id,title:`The specified file "${dt}" could not be uploaded.`,subtitle:f.jsxs(h.Text,{color:"inherit",children:["Read more about our"," ",f.jsx(h.Text,{color:"tomato11",href:Nwe,underline:!0,children:"supported media"}),"."]}),buttons:{action:{text:"Retry upload",icon:"cloudUpload",onClick:()=>rt(Ne)}}})}const[Hr,Yr]=E.useState(!1);return f.jsx(h7.Provider,{value:{isFetchingMedia:a,media:v,mediaTotal:F,onScrollToBottom:Zt,actionContainerRef:i,onFilesUpload:fn,isUploading:ue,uploadingFiles:Ie,isMediaRevalidationInProgress:re,isMediaCacheInvalid:D,revalidateMedia:Y,deleteMedia:O,updateMedia:rr,keyword:m,isSearchingMedia:u,assetType:g,initialAssetType:n,uploaderId:_,tagManagerOpen:Hr,setTagManagerOpen:Yr,tagIds:b,onFilterChange:q,openMediaSection:K,setOpenMediaSection:J},children:t})}function Ct(){const e=E.useContext(h7);if(!e)throw new Error("useMediaLibrary must be used within a MediaLibraryProvider");return e}function oEe(){const e=Te(),{initialAssetType:t}=Ct(),{assetsApiBaseUrl:n=void 0,repository:r="",authStrategy:i="token"}=e.mediaLibrary?e:{},{total:o}=Ke.useRequest(mi,hp({assetsApiBaseUrl:n,authStrategy:i,repository:r,assetType:t,keyword:"",tagIds:[],page:0}));return o}function m7(){return oEe()===0}function aEe(){return m7()?f.jsx(sEe,{}):f.jsx(v7,{})}function g7(e){const{children:t}=e;return f.jsx(h.Box,{justifyContent:"center",flexDirection:"column",height:"100%",children:t})}function v7(){return f.jsx(g7,{children:f.jsxs(h.BlankSlate,{children:[f.jsx(h.BlankSlateIcon,{name:"close",lineColor:"purple10",backgroundColor:"purple3",borderColor:"purple6",borderStyle:"dashed",size:"xlarge"}),f.jsx(h.BlankSlateTitle,{size:"big",children:"Oops!"}),f.jsx(h.BlankSlateDescription,{width:360,children:"No items found matching your search"})]})})}function sEe(){const{onFilesUpload:e}=Ct();return f.jsx(g7,{children:f.jsxs(h.Box,{gap:20,flexDirection:"column",alignItems:"center",children:[f.jsx(h.Box,{maxWidth:375,children:f.jsx(h.BlankSlateTitle,{size:"big",children:"Start by uploading your files!"})}),f.jsx(h.Box,{border:!0,borderStyle:"dashed",borderRadius:4,justifyContent:"center",children:f.jsxs(h.BlankSlate,{sx:{marginBlock:80,marginInline:48},children:[f.jsx(h.BlankSlateIcon,{name:"cloudUpload",lineColor:"purple11",backgroundColor:"purple5",size:"large"}),f.jsx(h.BlankSlateTitle,{children:"Drop your files anywhere to upload or ..."}),f.jsx(h.FileUploadButton,{onFilesSelected:e,renderButton:t=>f.jsx(h.Box,{display:"inline-flex",as:"span",children:f.jsx(h.Button,{onClick:t,color:"grey",children:"Upload media"})})}),f.jsx(h.BlankSlateDescription,{children:"Maximum upload size file: 128 MB"})]})})]})})}const jl={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 uEe(){const{actionContainerRef:e,isUploading:t,onFilesUpload:n,assetType:r}=Ct(),i=(e==null?void 0:e.current)!==void 0;return f.jsx(y7,{actionContainerRef:e,children:f.jsxs(h.Box,{width:"100%",gap:16,children:[f.jsx(cEe,{}),f.jsx(h.Tooltip,{title:jl.warning.uploadWhileUploading.title,content:jl.warning.uploadWhileUploading.description,visible:t,stableMount:!0,children:f.jsx(h.FileUploadButton,{disabled:t,onFilesSelected:n,startIcon:"cloudUpload",color:i?"purple":"grey",size:"large",assetType:r,children:"Upload media"})})]})})}function cEe(){const{keyword:e,onFilterChange:t,isFetchingMedia:n}=Ct(),[r,i]=E.useState(e);return Pe.useOnChange(e,()=>{e===""&&i("")}),Pe.useDebounce(r,300,Pe.useStableCallback(o=>t({keyword:o}))),f.jsx(h.Box,{width:"100%",flexDirection:"column",children:f.jsx(h.FormSearchInput,{value:r,placeholder:"Search",onValueChange:i,maxLength:200,isLoading:n&&e!==r})})}function y7(e){const{children:t,actionContainerRef:n}=e,r=(n==null?void 0:n.current)!==void 0,i=r?h.Portal:E.Fragment,o=r?{container:n.current,asChild:!0}:{},a=Pe.useForceUpdate();return E.useLayoutEffect(()=>{a()},[a]),f.jsx(i,{...o,children:t})}function lEe(e){const{children:t}=e,{onFilesUpload:n,assetType:r}=Ct();return f.jsx(h.FileDropZone,{overlay:f.jsx(fEe,{}),onFilesSelected:n,assetType:r,children:t})}function fEe(){const{isUploading:e}=Ct(),t=e?jl.warning.uploadWhileUploading.title:"Drop files here",n=e?jl.warning.uploadWhileUploading.description:"Drop your files to upload them instantly to the media library.";return f.jsx(h.Box,{justifyContent:"center",flexDirection:"column",height:"100%",children:f.jsxs(h.BlankSlate,{children:[f.jsx(h.BlankSlateIcon,{name:e?"block":"cloudUpload",lineColor:e?"tomato11":"purple10",backgroundColor:e?"tomato2":"purple3",borderColor:e?"tomato6":"purple6",borderStyle:"dashed",size:"xlarge"}),f.jsx(h.BlankSlateTitle,{size:"big",children:t}),f.jsx(h.BlankSlateDescription,{width:360,children:n})]})})}function b7(){return f.jsx(h.DefaultErrorMessage,{title:"Oops! Something went wrong",description:"An error occurred while searching for your image.",errorImageSrc:h.dialogErrorImage,sx:{marginBlock:"auto",marginInline:"auto"}})}function C7(e){const{mediaList:t,mediaActions:n,mediaToolbar:r,sidePane:i}=e,o=h.useMediaQuery({min:"medium"}),a=i&&o;return f.jsxs(h.Box,{display:"grid",gridTemplateRows:"auto auto 1fr",gridTemplateColumns:a?"1fr 380px":"1fr",width:"100%",height:"100%",children:[f.jsxs(h.Box,{position:"relative",display:"grid",gap:16,gridColumn:"1",gridRow:"1",padding:{right:16,bottom:16},children:[n,r]}),f.jsx(h.Box,{position:"relative",display:"grid",gridColumn:"1",gridRow:"2 / -1",children:t}),a&&i]})}function dEe(){var p;const{onScrollToBottom:e,media:t,isUploading:n,uploadingFiles:r,isSearchingMedia:i,isMediaRevalidationInProgress:o,setOpenMediaSection:a,isFetchingMedia:s}=Ct(),u=qs(),c=E.useRef(null);function l(A){u.toggleSelection({id:A,isSingleSelection:!0}),a("tags")}(n||i||o)&&((p=c.current)==null||p.scrollTo({top:0,behavior:"instant"}));function d(A,m,g){const _=m.shiftKey?t.map(({id:b})=>b):void 0;u.toggleSelection({id:A,isSingleSelection:g==="single",metaKey:m.metaKey,shiftKey:m.shiftKey,ids:_})}return f.jsxs(S7,{onScrollToBottom:e,scrollAreaRef:c,children:[t.map(A=>{var m,g;return f.jsx(h.MediaCard,{"aria-label":"media item",...A,filenameHighlight:(m=A.search_highlight)==null?void 0:m.filename,loading:i,status:(g=r.find(_=>_.id===A.id))==null?void 0:g.status,selected:u.isSelected(A.id),onCardClick:_=>d(A.id,_,"single"),onCheckedChange:(_,b)=>d(A.id,b,"multi"),onAddTagClick:()=>l(A.id)},A.id)}),f.jsx(h.Box,{gridColumn:"1 / -1",justifyContent:"center",children:f.jsx(h.AnimatedElement,{animation:{name:"fade"},children:s&&f.jsx(h.Text,{align:"center",color:"grey11",sx:{marginBlock:8},children:"Loading more items ..."})})})]})}function S7(e){const{children:t,scrollAreaRef:n,onScrollToBottom:r}=e,i=16,o=4,a="250px",s=`calc((100% - ${i*(o-1)}px) / ${o})`;return f.jsx(h.ScrollArea,{"aria-label":"Media list",ref:n,style:{display:"grid",gridTemplateColumns:`repeat(auto-fill, minmax(max(${a}, ${s}), 1fr))`,gridTemplateRows:"1fr 1fr 1fr ",gap:i,padding:2,paddingBottom:16,position:"relative"},onScrollToBottom:r,threshold:500,children:t})}function _7(e){const{children:t,hasSelectedMedia:n}=e;return f.jsx(h.Box,{overflow:"hidden",gridColumn:"2 / -1",gridRow:"1 / -1",children:f.jsx(h.ScrollArea,{style:{display:"grid",height:"100%"},children:f.jsx(h.Box,{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 I7(e){const{onFilesUpload:t,isUploading:n,isInitialLoad:r=!1}=e,i=r||n;return f.jsxs(h.Box,{flexDirection:"column",justifyContent:"center",alignItems:"center",padding:16,gap:16,width:"100%",children:[f.jsx(h.BlankSlateIcon,{name:"cloudUpload",lineColor:"purple11",backgroundColor:"purple5",size:"large"}),f.jsx(h.Box,{flexDirection:"column",gap:4,children:f.jsxs(h.Text,{align:"center",children:["Select or"," ",f.jsx(h.FileUploadButton,{disabled:i,onFilesSelected:t,renderButton:o=>f.jsx(h.Tooltip,{title:jl.warning.uploadWhileUploading.title,content:jl.warning.uploadWhileUploading.description,visible:n,children:f.jsx(h.Box,{display:"inline-flex",as:"span",children:f.jsx(h.Button,{disabled:i,onClick:o,invisible:!0,children:"upload"})})})})," ","media."]})}),f.jsx(h.FileUploadButton,{disabled:i,onFilesSelected:t,color:"grey",children:"Upload media"})]})}function T7(e){const{count:t}=e;return f.jsxs(h.Text,{variant:"bold",children:[t," item",t==1?"":"s"]})}function pEe(e){const{actionContainerRef:t}=e;return f.jsx(C7,{sidePane:f.jsx(mEe,{}),mediaActions:f.jsx(hEe,{actionContainerRef:t}),mediaToolbar:f.jsx(h.Skeleton,{color:"grey5",borderRadius:12,children:f.jsx(T7,{count:888})}),mediaList:f.jsx(AEe,{})})}function AEe(){return f.jsx(S7,{children:kt.range(1,24).map(e=>f.jsx(x7,{},e))})}function hEe(e){const{actionContainerRef:t}=e,n=Pe.useForceUpdate();return E.useLayoutEffect(()=>{n()},[n]),f.jsx(y7,{actionContainerRef:t,children:f.jsxs(h.Box,{width:"100%",gap:16,children:[f.jsx(h.Box,{width:"100%",flexDirection:"column",children:f.jsx(h.FormSearchInput,{placeholder:"Search",maxLength:200,value:"",disabled:!0,onValueChange:()=>{}})}),f.jsx(h.FileUploadButton,{disabled:!0,onFilesSelected:()=>{},startIcon:"cloudUpload",color:t?"purple":"grey",size:"large",children:"Upload media"})]})})}function mEe(){return f.jsx(_7,{hasSelectedMedia:!1,children:f.jsx(I7,{onFilesUpload:()=>{},isUploading:!1,isInitialLoad:!0})})}function x7(){return f.jsxs(h.Box,{height:302,width:"100%",flexDirection:"column",padding:16,backgroundColor:"grey1",border:!0,borderStyle:"solid",borderRadius:6,children:[f.jsx(h.Skeleton,{height:164,width:"100%"}),f.jsx(h.Skeleton,{height:16,width:"100%",sx:{marginTop:12}}),f.jsx(h.Skeleton,{height:10,width:100,sx:{marginTop:8}}),f.jsx(h.Skeleton,{height:1,width:"100%",sx:{marginTop:20,marginBottom:16}}),f.jsxs(h.Box,{flexDirection:"row",gap:8,children:[f.jsx(h.Skeleton,{height:24,width:54}),f.jsx(h.Skeleton,{height:24,width:45}),f.jsx(h.Skeleton,{height:24,width:62})]})]})}const w7=E.createContext({showToast:()=>{}});function gEe(e){const{children:t}=e,[n,r]=E.useState({title:"",seconds:5}),[i,o]=E.useState(!1),{title:a,action:s,seconds:u=1,icon:c="check"}=n,l=E.useMemo(()=>({showToast:d=>{r({seconds:u,...d}),o(!0)}}),[u]);return f.jsxs(f.Fragment,{children:[f.jsx(vEe,{}),f.jsx(h.Toast,{anchor:f.jsx(h.Box,{position:"absolute",justifyContent:"center",width:"100%",bottom:72}),open:i,onOpenChange:o,title:a,action:s,seconds:u,icon:c}),f.jsx(w7.Provider,{value:l,children:t})]})}function E7(){return E.useContext(w7)}function vEe(){const{revalidateMedia:e,isMediaCacheInvalid:t}=Ct(),[n,r]=E.useState(t);return Pe.useOnChange(t,r),f.jsx(h.Toast,{anchor:f.jsx(h.Box,{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 Pc(){const{media:e}=Ct(),t=qs();return e.filter(({id:n})=>t.isSelected(n))}function yEe(){const[e,t]=E.useState(!1),n=Pc(),r=qs(),i=E.useMemo(()=>n.some(({id:a})=>a.startsWith("temp")),[n]),[o]=n;return o?r.selectedCount>1?f.jsxs(h.Box,{gap:8,alignItems:"center",children:[f.jsxs(h.Text,{variant:"emphasized",noWrap:!0,sx:{flexGrow:1},children:[r.selectedCount," media selected"]}),f.jsx(h.Tooltip,{content:"Open all selected media in new tabs",children:f.jsx(h.IconButton,{icon:"openInFull",variant:"solid",size:"small",onClick:()=>n.forEach(a=>window.open(a.url,"_blank"))})}),f.jsx(h.Tooltip,{content:"Remove selected media",children:f.jsx(h.IconButton,{icon:"delete",variant:"solid",color:"tomato",size:"small",hiddenLabel:"Remove media",onClick:()=>t(!0),disabled:i})}),f.jsx(XF,{open:e,onOpenChange:t,media:n})]}):f.jsxs(h.Box,{gap:8,alignItems:"center",children:[f.jsx(h.Text,{variant:"emphasized",noWrap:!0,sx:{flexGrow:1},children:o.filename}),f.jsxs(h.Box,{gap:8,children:[f.jsx(h.Tooltip,{content:"Open media in new tab",children:f.jsx(h.IconButton,{icon:"openInFull",variant:"solid",size:"small",hiddenLabel:"Open media in new tab",onClick:()=>window.open(o.url,"_blank"),disabled:i})}),f.jsx(h.Tooltip,{content:"Copy media URL",children:f.jsx(h.IconButton,{icon:"link",variant:"solid",size:"small",hiddenLabel:"Copy media URL",onClick:()=>navigator.clipboard.writeText(o.url),disabled:i})}),f.jsx(h.Tooltip,{content:"Remove media",children:f.jsx(h.IconButton,{icon:"delete",variant:"solid",color:"tomato",size:"small",hiddenLabel:"Remove media",onClick:()=>t(!0),disabled:i})}),f.jsx(XF,{open:e,onOpenChange:t,media:o})]})]}):null}function XF(e){const{open:t,onOpenChange:n,media:r}=e,i=Te(),{showAlert:o}=h.useAlert(),{deleteMedia:a}=Ct(),s=qs(),u=A7(),[c,l]=E.useState(!1),d=Array.isArray(r),p=d?"these items":"this item";function A(){l(!0);const g=s.getSelectionState().selectedIds;CEe({ids:g,config:i}).then(()=>{n(!1),a(g),s.clearSelection(),u()}).catch(()=>{n(!1),o({title:"Error",subtitle:`Something went wrong when removing ${p}.`})}).finally(()=>{l(!1)})}return f.jsxs(h.Dialog,{onOpenChange:n,open:t,size:"small",children:[f.jsx(h.DialogHeader,{icon:"alert",title:`Remove ${p} from your media library?`}),f.jsx(h.DialogContent,{children:f.jsxs(h.Box,{padding:16,flexDirection:"column",children:[f.jsxs(h.Text,{children:["You are about to delete ",p,":  ",!d&&f.jsx("b",{children:r.filename})]}),d&&f.jsx(bEe,{media:r})]})}),f.jsxs(h.DialogActions,{children:[f.jsx(h.DialogCancelButton,{}),f.jsxs(h.DialogActionButton,{onClick:A,color:"tomato",loading:c,children:["Yes, I want to remove ",p]})]})]})}const Yb=15;function bEe(e){const{media:t}=e,n=t.slice(0,Yb),r=t.length>Yb,i=r?t.length-Yb:0,o=i===1?"item":"items";return f.jsxs(h.UnorderedList,{density:"compact",sx:{marginTop:8},children:[n.map((a,s)=>f.jsx(h.ListItem,{children:f.jsx("b",{children:a.filename})},s)),r&&f.jsxs(h.ListItem,{children:["And ",f.jsx("b",{children:i})," more ",o,"..."]})]})}function CEe(e){const{ids:t,config:n}=e;if(!n.mediaLibrary)throw new Error("Media Library not configured.");if(t.length===0)throw new Error("No ids provided during media deletion");const{assetsApiBaseUrl:r,repository:i,authStrategy:o}=n;if(t.length===1){const[a]=t;return me.request(new URL(`assets/${a}`,r),{headers:{repository:i},method:"DELETE",credentials:me.getRequestCredentials(o),okType:L.unknown()})}return me.request(new URL("assets/bulk-delete",r),{headers:{repository:i},method:"POST",credentials:me.getRequestCredentials(o),okType:L.unknown(),body:{ids:t}})}function SEe(){var o;const e=Pc(),{uploadingFiles:t}=Ct(),[n]=e;if(!n)return null;if(e.length===2)return f.jsx(Gb,{children:e.map((a,s)=>f.jsx("div",{style:{position:"absolute",transform:s===0?"translateX(25%) rotate(15deg) ":"translateX(-25%) rotate(-15deg) "},children:f.jsx(ek,{media:a})},a.id))});if(e.length>2)return f.jsx(Gb,{children:e.slice(-4).map((a,s)=>f.jsx("div",{style:{position:"absolute",paddingRight:s*16},children:f.jsx(ek,{media:a})},a.id))});const r=(o=t.find(a=>a.id===n.id))==null?void 0:o.status,i=n.kind.startsWith("image");return f.jsx(h.Box,{flexDirection:"column",children:f.jsx(h.CheckerBoard,{children:f.jsx(Gb,{uploadStatus:r,hasImage:i,children:i?f.jsx(h.Image,{src:n.url,alt:n.alt,sizing:"contain"}):f.jsx(h.MediaCardPlaceholder,{kind:n.kind,filename:n.filename})})})})}function Gb(e){const{children:t,uploadStatus:n,hasImage:r}=e;return f.jsxs(h.Box,{flexDirection:"column",alignItems:"center",justifyContent:"center",position:"relative",height:200,width:"100%",backgroundColor:r?"transparent":"purple2",children:[t,n&&f.jsx(_Ee,{uploadStatus:n})]})}function _Ee(e){const{uploadStatus:t}=e,{value:n,color:r,height:i,transition:o}=IEe(t);return f.jsx(h.Box,{position:"absolute",backgroundColor:"greyAlpha1",width:"100%",height:"100%",padding:{inline:16},justifyContent:"end",flexDirection:"column",children:f.jsx(h.ProgressBar,{value:n,color:r,height:i,transition:o})})}function IEe(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"}}}function ek(e){const{media:t}=e;return f.jsx(h.Box,{width:111,height:152,children:t.kind==="image"?f.jsx(h.Image,{borderRadius:8,src:t.url,alt:t.alt,sizing:"cover"}):f.jsx(h.MediaCardPlaceholder,{kind:t.kind,filename:t.filename})})}const Xa=2e3,gd="__MAIN_THUMBNAIL__";function lC(e,t,n){const r=e.name===gd?void 0:e.name;let i;return t?io.isDefined(n)?i=[n.width,n.height]:io.isDefined(e.width)||io.isDefined(e.height)?i=[e.width??void 0,e.height??void 0]:i=[t.origin.width,t.origin.height]:i=void 0,[r,i?`${i[0]??"auto"}×${i[1]??"auto"}px`:void 0]}function TEe(e){var t,n;return[{...(t=e.config)==null?void 0:t.constraint,name:gd}].concat(((n=e.config)==null?void 0:n.thumbnails)??[])}function xEe(e,t){var a,s;const{__TYPE__:n,thumbnails:r,...i}=t,o=(s=(a=e.config)==null?void 0:a.thumbnails)==null?void 0:s.map(({name:u})=>r==null?void 0:r[u]);return[i,...o??[]]}function wEe(e,t,n,r){const i=r.length===0?void 0:r;return e===gd||!ye.isImageContent(t)?{...t,alt:i}:{...t,thumbnails:{...t.thumbnails,[e]:{...n,alt:i}}}}function EEe(e,t){const{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]}function $Ee(e,t,n,r,i){if(LEe(e)==="svg")return e;const o=new URL(e);if(i){const{x:a,y:s,width:u,height:c}=t,l=[...o.searchParams.entries(),["rect",[a,s,u,c].join(",")],["w",n],["h",r]];o.search=l.map(d=>d.join("=")).join("&")}return o.toString()}function $7(e){const 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 REe(e){const 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()}function OEe(e){return e!=null&&e.url?$7(e.url):void 0}function FEe(e,t,n,r){var s,u,c,l,d;if(!n||e===gd){const p=(s=t.config)==null?void 0:s.thumbnails,A=p&&Object.fromEntries(p.map(m=>[m.name,im(r,m)]));return{__TYPE__:"ImageContent",...im(r,(u=t.config)==null?void 0:u.constraint),thumbnails:A}}const i=(l=(c=t.config)==null?void 0:c.thumbnails)==null?void 0:l.find(p=>p.name===e);if(!i)return n;const o=(d=n.thumbnails)==null?void 0:d[e],a=im(r,i);return a.url===(o==null?void 0:o.url)?n:{...n,thumbnails:Ql.mapValues(n.thumbnails??{},(p,A)=>A===e?a:p)}}function kEe(e){return"kind"in e&&"extension"in e}function im(e,t){const{width:n,height:r,rect:i}=MEe({...e,width:(e==null?void 0:e.width)??Xa,height:(e==null?void 0:e.height)??Xa},t),o=!!(t!=null&&t.width||t!=null&&t.height);return{provider:"imgix",url:$Ee(e.url,i,n,r,o),alt:e.alt,...kEe(e)?{credits:e.credits}:{},origin:{id:e.id,url:e.url,width:e.width??Xa,height:e.height??Xa},width:n,height:r,edit:{background:"transparent",zoom:1,crop:{x:i.x,y:i.y}}}}function MEe(e,t){const[n,r]=EEe(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),s=Math.round(n/i),u=Math.round(r/i);return{width:n,height:r,rect:{x:o,y:a,width:s,height:u}}}function LEe(e){const{pathname:t}=new URL(e),n=t.lastIndexOf(".");if(n!==-1)return t.substring(n).slice(1).toLowerCase()}function jEe(e){if(!e)return"";const{filename:t,extension:n}=e;if(!n)return t;const r=new RegExp(`\\.${n}$`);return t.replace(r,"")}function UEe(e){const t=e.length,n={},r=[];return e.forEach(o=>{o.tags.forEach(a=>{n[a.id]||(n[a.id]=0,r.push(a)),n[a.id]++})}),r.filter(o=>n[o.id]===t)}function R7(e){const{tags:t,toggleAssetTag:n,getTagsLabel:r}=e,{setTagManagerOpen:i}=Ct(),{showToast:o}=E7(),{showAlert:a}=h.useAlert(),[s,u]=E.useState("");async function c(l,d){u("");try{await n(l,d),o({title:"Media tags were updated",seconds:3})}catch{a({title:"Error",subtitle:"Something went wrong when updating media tags"})}}return f.jsxs(h.Box,{flexDirection:"column",children:[f.jsxs(h.Box,{justifyContent:"space-between",children:[f.jsx(h.Text,{color:"grey12",variant:"bold",children:r()}),f.jsx(h.Button,{startIcon:"edit",invisible:!0,color:"dark",onClick:()=>i(!0),children:"Manage tags"})]}),f.jsxs(h.ComboBox,{sx:{marginTop:4,marginBottom:8},children:[f.jsx(BEe,{searchTerm:s,setSearchTerm:u}),f.jsx(h.ComboBoxContent,{children:f.jsx(h.ErrorBoundary,{renderError:()=>f.jsx(h.Text,{color:"grey9",variant:"small",sx:{marginBlock:8,marginInline:8},children:"Error getting tags"}),children:f.jsx(E.Suspense,{fallback:f.jsx(h.Box,{padding:8,flexDirection:"column",gap:8,children:kt.range(1,6).map(l=>f.jsx(h.Skeleton,{height:24,width:85},l))}),children:f.jsx(PEe,{searchTerm:s,assignedTags:t,onToggleAssetTag:c})})})})]}),f.jsx(h.Box,{flexDirection:"column",alignItems:"flex-start",gap:8,children:t.map(l=>f.jsx(h.Badge,{title:l.name,size:"medium",color:"purple",selected:!0,onClose:()=>c(l,"remove")},l.id))})]})}function BEe(e){const{searchTerm:t,setSearchTerm:n}=e,r=E.useRef(null),{openMediaSection:i,setOpenMediaSection:o}=Ct();return E.useEffect(()=>{var a;i==="tags"&&((a=r.current)==null||a.focus(),o(void 0))},[i,o]),f.jsx(h.ComboBoxInput,{value:t,onValueChange:n,placeholder:"Add or create a new tag",ref:r})}function PEe(e){const{searchTerm:t,assignedTags:n,onToggleAssetTag:r}=e,[i]=Pc(),o=Te(),{showAlert:a}=h.useAlert(),{tags:s}=Ih(),u=E.useMemo(()=>{const p=t.toLowerCase();return s.filter(A=>A.name.toLowerCase().includes(p))},[s,t]),l=qR.safeParse(t).success&&s.every(p=>p.name!==t);async function d(){if(!t||!i)return;let p;try{p=await DEe({name:t,config:o}),Th(A=>[p,...A])}catch{a({title:"Error",subtitle:`Something went wrong when creating the tag ${t}`});return}await r(p,"add")}return i?f.jsxs(f.Fragment,{children:[!u.length&&f.jsx(h.Text,{color:"grey9",variant:"small",sx:{marginBlock:8,marginInline:8},children:"No tags found"}),u.map((p,A)=>f.jsx(h.ComboBoxItem,{value:p.id,onCheckedChange:m=>r(p,m?"add":"remove"),checked:n.some(m=>m.id===p.id),children:f.jsx(h.Badge,{title:p.name,color:"purple",size:"medium",sx:{marginInline:8,marginBottom:A===u.length-1?8:4,marginTop:A===0?8:4}})},p.id)),l&&f.jsx(h.ComboBoxItem,{value:"new",onCheckedChange:d,children:f.jsxs(h.Box,{padding:8,flexDirection:"row",alignItems:"center",gap:4,children:[f.jsx(h.Icon,{name:"add",size:"small",color:"grey11"}),f.jsxs(h.Text,{color:"grey12",children:['Create tag "',t,'"']})]})})]}):null}function DEe(e){const{name:t,config:n}=e;n.mediaLibrary||Ht("mediaLibrary");const{assetsApiBaseUrl:r,repository:i,authStrategy:o}=n;return me.request(new URL("tags",r),{headers:{repository:i},body:{name:t},method:"POST",credentials:me.getRequestCredentials(o),okType:VR})}function WEe(e){const{selectedMedia:t}=e,n=Te(),r=E.useMemo(()=>UEe(t),[t]);async function i(a,s){const u=s==="remove",c=t.map(d=>d.id);let l=[];Lu(d=>(l=d,d.map(p=>c.includes(p.id)?u?qEe(p,a):NEe(p,a):p)));try{await KEe({tagId:a.id,assetIds:c,operation:u?"remove":"add",config:n});const d=t.length*(u?-1:1);Th(p=>p.map(A=>A.id===a.id?{...A,count:A.count+d}:A))}catch(d){throw Lu(()=>l),d}}function o(){const a=r.length;return a>1?`${a} tags in common`:a===1?"1 tag in common":"Common tags"}return f.jsx(R7,{tags:r,getTagsLabel:o,toggleAssetTag:i})}function KEe(e){const{tagId:t,assetIds:n,config:r,operation:i}=e;if(!r.mediaLibrary)throw new Error("Media Library not configured.");const{assetsApiBaseUrl:o,repository:a,authStrategy:s}=r;return me.request(new URL(`tags/${t}/assets`,o),{headers:{repository:a},body:{assetIds:n},method:i==="add"?"POST":"DELETE",credentials:me.getRequestCredentials(s),okType:L.unknown()})}function NEe(e,t){return e.tags.some(({id:r})=>r===t.id)?e:{...e,tags:[...e.tags,t]}}function qEe(e,t){const n=e.tags.filter(r=>r.id!==t.id);return{...e,tags:n}}function VEe(e){const{selectedMedia:t}=e,n=t.tags,r=Te(),{updateMedia:i}=Ct();async function o(s,u){const c=t.tags,l=u==="remove",d=l?c.filter(p=>p.id!==s.id):[...c,s];i(t.id,{tags:d});try{await QEe({mediaId:t.id,config:r,tags:d.map(p=>p.id)}),Th(p=>p.map(A=>A.id===s.id?{...A,count:A.count+(l?-1:1)}:A))}catch(p){throw i(t.id,{tags:c}),p}}function a(){const s=n.length;return s>1?`${s} tags`:s===1?"1 tag":"Tags"}return f.jsx(R7,{tags:n,getTagsLabel:a,toggleAssetTag:o})}function QEe(e){const{mediaId:t,config:n,tags:r}=e;if(!n.mediaLibrary)throw new Error("Media Library not configured.");const{assetsApiBaseUrl:i,repository:o,authStrategy:a}=n;return me.request(new URL(`assets/${t}`,i),{headers:{repository:o},body:{tags:r},method:"PATCH",credentials:me.getRequestCredentials(a),okType:z0})}function zEe(){const[e,t]=E.useState("description");if(Pc().length!==1)return f.jsx(ZEe,{});const r=e==="description",i=e==="more-info";return f.jsxs(f.Fragment,{children:[f.jsxs(h.Box,{display:"grid",gridTemplateColumns:"1fr 1fr",backgroundColor:"grey2",border:!0,borderStyle:"solid",borderRadius:8,children:[f.jsx(h.Tab,{selected:r,outline:r,transparent:!0,onClick:()=>t("description"),children:"Description"}),f.jsx(h.Tab,{selected:i,outline:i,transparent:!0,onClick:()=>t("more-info"),children:"More info"})]}),f.jsx(HEe,{tab:e})]})}function HEe(e){const{tab:t}=e;switch(t){case"description":return f.jsx(YEe,{});case"more-info":return f.jsx(GEe,{})}}function YEe(){const{title:e,alt:t,onBlur:n,isUploading:r,selectedMedia:i}=F7();if(!i)return null;const{extension:o}=i;return f.jsxs(h.Box,{flexDirection:"column",gap:16,children:[f.jsx(h.FormInput,{value:e.value,onValueChange:e.set,label:"Media title",placeholder:"Media title",onBlur:n,disabled:r,suffix:o?`.${o}`:void 0}),f.jsx(h.FormInputField,{label:"Alternative text",children:f.jsx(h.ContentEditable,{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&&f.jsx(VEe,{selectedMedia:i})]})}function GEe(){const{credits:e,notes:t,onBlur:n,isUploading:r,selectedMedia:i}=F7();if(!i)return null;const{uploader_id:o}=i,a=t$e(i);return f.jsxs(h.Box,{gap:8,flexDirection:"column",children:[a.map(s=>f.jsxs(h.Box,{gap:8,children:[f.jsxs(h.Text,{color:"grey11",children:[s.label,":"]}),f.jsx(h.Text,{children:s.value})]},s.label)),f.jsxs(h.Box,{gap:8,children:[f.jsx(h.Text,{color:"grey11",children:"Uploaded by:"}),f.jsx(h.ErrorBoundary,{renderError:()=>f.jsx(h.Text,{color:"grey11",children:"Error getting uploader"}),children:f.jsx(E.Suspense,{fallback:f.jsx(O7,{}),children:f.jsx(JEe,{uploaderId:o})})})]}),f.jsx(h.FormInputField,{label:"Copyright",children:f.jsx(h.ContentEditable,{content:e.displayValue,contentVersion:e.version,readOnly:r,placeholder:"Media copyrights or credits",multiline:!0,decorations:{em:"highlight"},onChange:e.onChange,onBlur:n})}),f.jsx(h.FormInputField,{label:"Private notes",children:f.jsx(h.ContentEditable,{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 JEe(e){const{uploaderId:t}=e,{uploadersById:n}=d7(),r=n.get(t??"ghost");return t&&!r?f.jsx(O7,{}):r?f.jsxs(f.Fragment,{children:[f.jsx(h.Avatar,{size:24,firstName:r.firstName,lastName:r.lastName,imageUrl:r.uploadedAvatar,hasBorder:!1}),f.jsx(h.Text,{children:r.name})]}):null}function O7(){return f.jsx(h.Skeleton,{width:128})}function ZEe(){const e=Pc(),{uploadingFiles:t}=Ct(),n=E.useMemo(()=>t.some(r=>e.some(i=>r.id===i.id)&&r.status!=="success"),[e,t]);return f.jsx(f.Fragment,{children:!n&&f.jsx(WEe,{selectedMedia:e})})}function F7(){const[e]=Pc(),{updateMedia:t,uploadingFiles:n}=Ct(),r=Te(),{showToast:i}=E7(),o=(e==null?void 0:e.id)??"",a=qh(e,"alt"),s=qh(e,"notes"),u=qh(e,"credits"),c=qh(e,"filename",jEe),l=n.some(p=>p.id===(e==null?void 0:e.id)&&p.status!=="success");function d(){if(!e||!c.changed&&!a.changed&&!u.changed&&!s.changed)return;const{extension:p,search_highlight:A}=e,m=p?`${c.value}.${p}`:c.value;t(o,{filename:m,alt:a.value,credits:u.value,notes:s.value,search_highlight:{alt:a.changed||A==null?void 0:A.alt,credits:u.changed||A==null?void 0:A.credits,filename:c.changed||A==null?void 0:A.filename,notes:s.changed||A==null?void 0:A.notes}}),e$e({id:o,config:r,metadata:{filename:m,alt:a.value,credits:u.value,notes:s.value}}).then(()=>{i({title:"Media metadata has been saved.",seconds:3})}).catch(g=>{console.error(g)})}return{selectedMedia:e,onBlur:d,isUploading:l,title:c,alt:a,credits:u,notes:s,extension:e==null?void 0:e.extension}}function qh(e,t,n=r=>r==null?void 0:r[t]){var c;const r=n(e)??"",[i,o]=E.useState(r);Pe.useOnChange(e==null?void 0:e.id,()=>o(r));const a=(c=e==null?void 0:e.search_highlight)==null?void 0:c[t],s=!!a;function u(l){const{from:d,to:p}=l.state.selection;l.commands.selectAll(),l.commands.unsetAllMarks(),l.commands.setTextSelection({from:d,to:p}),o(l.getText())}return{value:i,set:o,displayValue:XEe(a??i)??"",onChange:u,version:`${(e==null?void 0:e.id)??""}_${s}`,changed:i!==r}}function XEe(e){return e==null?void 0:e.replace(/\n/g,"<br>")}function e$e(e){const{id:t,config:n,metadata:r}=e;if(!n.mediaLibrary)throw new Error("Media Library not configured.");const{assetsApiBaseUrl:i,repository:o,authStrategy:a}=n;return me.request(new URL(`assets/${t}`,i),{headers:{repository:o},body:{...r},method:"PATCH",credentials:me.getRequestCredentials(a),okType:z0})}function t$e(e){const{width:t,height:n,last_modified:r,size:i,extension:o}=e,a=t&&n,s={label:"Date",value:tS.prettyPrintDate(new Date(r))},u={label:"File size",value:Ep.formatBytes(i)},c=a?{label:"Dimensions",value:`${t}×${n}`}:void 0,l=a?{label:"Ratio",value:((t??0)/(n??0)).toFixed(1)}:void 0,d=o?{label:"Extension",value:o.toUpperCase()}:void 0;return[s,u,c,l,d].filter(io.isDefined)}function n$e(){const{setTagManagerOpen:e}=Ct(),[t,n]=E.useState("");return f.jsxs(h.Box,{gap:20,flexDirection:"column",height:"100%",children:[f.jsxs(h.Box,{alignItems:"center",gap:4,children:[f.jsx(h.IconButton,{icon:"close",size:"small",hasPadding:!1,onClick:()=>e(!1)}),f.jsx(h.Text,{variant:"bold",children:"Tags management"})]}),f.jsxs(h.Box,{gap:16,flexDirection:"column",height:"100%",children:[f.jsx(h.FormSearchInput,{value:t,onValueChange:n,placeholder:"Search for tags",endAdornment:!1,autoFocus:!0}),f.jsx(h.ErrorBoundary,{renderError:()=>f.jsx(a$e,{}),children:f.jsx(E.Suspense,{fallback:f.jsx(c$e,{}),children:f.jsx(r$e,{searchTerm:t})})})]})]})}function r$e(e){const{searchTerm:t}=e,{tags:n}=Ih(),r=n.filter(i=>i.name.toLowerCase().includes(t.toLowerCase()));return r.length===0?f.jsx(h.Text,{color:"grey9",variant:"small",children:"No tags found"}):f.jsx(h.AnimatedList,{ariaLabel:"Tags list",getItemKey:i=>i.id,gap:16,items:r,children:i=>f.jsx(i$e,{tag:i})})}function i$e(e){const{tag:t}=e,[n,r]=E.useState(!1),i=Te(),{showAlert:o}=h.useAlert(),{showToast:a}=h.useToast(),{tags:s}=Ih();async function u(c){if(!qR.safeParse(c).success){o({title:"Error",subtitle:`Failed to rename tag "${t.name}" to "${c}". Tag name must be at least ${o7} and at maximum ${a7} characters long.`});return}if(s.some(p=>p.name===c)){o({title:"Error",subtitle:`Failed to rename tag "${t.name}" to "${c}". Tag with name "${c}" already exists.`});return}try{await u$e({id:t.id,name:c,config:i}),Th(p=>p.map(A=>A.id===t.id?{...A,name:c}:A)),Lu(p=>p.map(A=>{if(A.tags.findIndex(g=>g.id===t.id)!==-1){const g=A.tags.map(_=>_.id===t.id?{..._,name:c}:_);return{...A,tags:g}}return A})),a({title:`Tag "${t.name}" renamed to "${c}"`,seconds:3})}catch{o({title:"Error",subtitle:"Something went wrong when renaming the tag."})}}return f.jsxs(f.Fragment,{children:[f.jsxs(h.Box,{justifyContent:"space-between",children:[f.jsx(h.Badge,{title:t.name,color:"purple",size:"medium",onEdit:u}),f.jsx(h.Button,{invisible:!0,color:"tomato",textWeight:"normal",onClick:()=>r(!0),children:"Delete"})]}),f.jsx(o$e,{open:n,onOpenChange:r,tag:t})]})}function o$e(e){const{open:t,onOpenChange:n,tag:r}=e,{id:i,name:o,count:a}=r,s=Te(),{showAlert:u}=h.useAlert(),[c,l]=E.useState(!1);async function d(){l(!0);try{await s$e({id:i,config:s}),Th(p=>p.filter(A=>A.id!==i)),Lu(p=>p.map(A=>{if(A.tags.findIndex(g=>g.id===i)!==-1){const g=A.tags.filter(_=>_.id!==i);return{...A,tags:g}}return A}))}catch{u({title:"Error",subtitle:"Something went wrong when removing the tag."})}finally{l(!1),n(!1)}}return f.jsxs(h.Dialog,{onOpenChange:n,open:t,size:"small",children:[f.jsx(h.DialogHeader,{title:`This tag is being used on ${a} media item${a===1?"":"s"}`}),f.jsx(h.DialogContent,{padding:16,children:f.jsxs(h.Text,{children:["You are about to delete the tag name ",f.jsx("b",{children:o}),"."," ",a>0&&`This tag is being
32
+ `}}function u(x){return r.exact(r.intersection([r.type({id:r.string,label:o.StringOrNull,repeatable:(0,i.withFallback)(r.boolean,!0),json:r.record(r.string,x),status:(0,i.withFallback)(r.boolean,!0)}),r.partial({format:(0,i.withFallback)(r.keyof(e.CustomTypeFormat),"custom")})]))}e.StaticCustomType=u(a.StaticSection),e.CustomType=u(a.DynamicSection);function c(x){return Object.entries(x.json).reduce((v,[,S])=>{const y=Object.entries(S);return v.concat(y)},[])}e.flattenWidgets=c;function l(x){return Object.entries(x.json).reduce((v,[,S])=>{const y=Object.entries(S);return v.concat(y)},[])}e.flattenSections=l;function d(x){return c(x).filter(([,y])=>y.type==="Slices").reduce((y,[,T])=>{const w=Object.entries(T.config&&T.config.choices?T.config.choices:{}).filter(([,F])=>F.type==="SharedSlice").map(([F])=>F);return y.concat(w)},[])}function p(x){const v=d(x);return function(S){return v.map(S)}}function A(x,v){const S=Object.entries(x.json).reduce((y,[T,w])=>({...y,[T]:a.Sections.toStatic(w,v)}),{});return{...x,json:S}}e.toStatic=A;function m(x,v){const S=p(x)(y=>{if(!v.get(y))return y}).filter(Boolean);return S.length>0?(0,n.left)(new s(S)):(0,n.right)(x)}e.validateSlices=m;function g(x,v){const S=Object.entries(x.json).reduce((y,[T,w])=>{const F=Object.entries(w).reduce((k,[$,P])=>{const K=v($,P);return K?{...k,[$]:K}:k},{});return{...y,[T]:F}},{});return{...x,json:S}}e.collectWidgets=g;function _(x,v){return g(x,(S,y)=>{if(y.type==="Slices"){if(!y.config||!y.config.choices)return y;const T=Object.entries(y.config.choices).reduce((F,[k,$])=>$.type==="SharedSlice"&&!v.get(k)?F:{...F,[k]:$},{}),w={...y.config,choices:T};return{...y,config:w}}return y})}e.filterMissingSharedSlices=_;function b(x){return Object.values(x.json).reduce((v,S)=>({...v,...S}),{})}e.flattenCustomTypeFields=b;function I(x){return Object.entries(x.fields).reduce((v,[,S])=>{var y;return S.type==="Slices"||S.type==="Choice"?{...v,...Object.entries(((y=S.config)===null||y===void 0?void 0:y.choices)||{}).reduce((T,[w,F])=>F.type==="SharedSlice"?{...T,[w]:F}:T,{})}:v},{})}e.collectSharedSlices=I})(X9);var aq={},U0={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DiffOperation=void 0,function(t){t.Added="added",t.Removed="removed",t.Updated="updated"}(e.DiffOperation||(e.DiffOperation={}))})(U0);var B0={},Zo={},P0={};Object.defineProperty(P0,"__esModule",{value:!0});P0.HexaColor=void 0;const FTe=/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/;P0.HexaColor={is:e=>FTe.test(e)};var D0={};Object.defineProperty(D0,"__esModule",{value:!0});D0.toRecord=void 0;function kTe(e,t){return e.reduce((n,r)=>{const i=t(r);return{...n,[i]:r}},{})}D0.toRecord=kTe;var Er={};Object.defineProperty(Er,"__esModule",{value:!0});Er.mapValues=Er.isObject=Er.withOptionals=Er.isNotEmpty=Er.zipObjects=void 0;const MTe=Q,LTe=ln,yb=(0,MTe.__importStar)(Z);function jTe(e,t){return[...new Set(Object.keys(e||{}).concat(Object.keys(t||{})))].reduce((r,i)=>{const o=e==null?void 0:e[i],a=t==null?void 0:t[i];return{...r,[i]:{left:o,right:a}}},{})}Er.zipObjects=jTe;function UTe(e){return!!Object.keys(e).length}Er.isNotEmpty=UTe;function BTe(e,t){return{...e,...t.reduce((n,[r,i])=>i?{...n,[r]:i}:n,{})}}Er.withOptionals=BTe;const PTe=yb.record(yb.string,yb.unknown);function DTe(e){return(0,LTe.isRight)(PTe.decode(e))}Er.isObject=DTe;function WTe(e,t){return Object.entries(e).reduce((n,[r,i])=>({...n,[r]:t(i,r)}),{})}Er.mapValues=WTe;Object.defineProperty(Zo,"__esModule",{value:!0});Zo.Objects=Zo.Arrays=Zo.HexaColorCode=void 0;const xR=Q;Zo.HexaColorCode=(0,xR.__importStar)(P0);Zo.Arrays=(0,xR.__importStar)(D0);Zo.Objects=(0,xR.__importStar)(Er);var Ch={};Object.defineProperty(Ch,"__esModule",{value:!0});Ch.VariationComparator=void 0;const Em=Zo,bb=hd,Ja=U0;function KTe(e,t){const n=Em.Objects.zipObjects(e,t);return Object.entries(n).reduce((r,[i,o])=>i==="primary"||i==="items"||(o==null?void 0:o.left)===(o==null?void 0:o.right)?r:{...r,[i]:o==null?void 0:o.right},{})}function $m(e,t){const n=Em.Objects.zipObjects(e,t),r=Object.entries(n).reduce((i,[o,a])=>{if(JSON.stringify(a==null?void 0:a.left)===JSON.stringify(a==null?void 0:a.right))return i;const s=(()=>{var u,c,l,d,p,A,m;if(!(!(a!=null&&a.left)&&!(a!=null&&a.right))){if(a!=null&&a.left&&!a.right)return{op:Ja.DiffOperation.Removed};if(!(a!=null&&a.left)&&(a!=null&&a.right)){if(((u=a.right)===null||u===void 0?void 0:u.type)===bb.GroupFieldType){const g={...a.right,config:{...a.right.config,fields:{}}};return g.config.fields=$m(void 0,(c=a.right.config)===null||c===void 0?void 0:c.fields)||{},{op:Ja.DiffOperation.Added,value:g}}return{op:Ja.DiffOperation.Added,value:a.right}}if(((l=a.right)===null||l===void 0?void 0:l.type)===bb.GroupFieldType){const g={...a.right,config:{...a.right.config,fields:{}}};return g.config.fields=$m(((d=a.left)===null||d===void 0?void 0:d.type)===bb.GroupFieldType?(A=(p=a.left)===null||p===void 0?void 0:p.config)===null||A===void 0?void 0:A.fields:void 0,(m=a.right.config)===null||m===void 0?void 0:m.fields)||{},{op:Ja.DiffOperation.Updated,value:g}}return{op:Ja.DiffOperation.Updated,value:a.right}}})();return s?{...i,[o]:s}:i},{});return Em.Objects.isNotEmpty(r)?r:void 0}Ch.VariationComparator={compare(e,t){if(e&&!t)return{op:Ja.DiffOperation.Removed};if(!e&&t)return{op:Ja.DiffOperation.Added,value:t};const n=KTe(e,t),r=$m(e==null?void 0:e.primary,t==null?void 0:t.primary),i=$m(e==null?void 0:e.items,t==null?void 0:t.items),o={...n,...r?{primary:r}:{},...i?{items:i}:{}};if(Em.Objects.isNotEmpty(o))return{op:Ja.DiffOperation.Updated,value:o}}};Object.defineProperty(B0,"__esModule",{value:!0});B0.SliceComparator=void 0;const nl=Zo,Cb=U0,NTe=Ch;function qTe(e,t){const n=nl.Objects.zipObjects(e,t);return Object.entries(n).reduce((r,[i,o])=>i==="variations"||(o==null?void 0:o.left)===(o==null?void 0:o.right)?r:{...r,[i]:o==null?void 0:o.right},{})}B0.SliceComparator={compare(e,t){if(!e&&t)return{op:Cb.DiffOperation.Added,value:t};if(e&&!t)return{op:Cb.DiffOperation.Removed};const n=qTe(e,t),r=nl.Objects.zipObjects(e&&nl.Arrays.toRecord(e.variations,a=>a.id),t&&nl.Arrays.toRecord(t.variations,a=>a.id)),i=Object.entries(r).reduce((a,[s,u])=>{if(!u)return a;const c=NTe.VariationComparator.compare(u.left,u.right);return c?{...a,[s]:c}:a},{}),o={...n,...nl.Objects.isNotEmpty(i)?{variations:i}:{}};if(nl.Objects.isNotEmpty(o))return{op:Cb.DiffOperation.Updated,value:o}}};var sq={};Object.defineProperty(sq,"__esModule",{value:!0});(function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Q;(0,t.__exportStar)(U0,e),(0,t.__exportStar)(B0,e),(0,t.__exportStar)(Ch,e),(0,t.__exportStar)(sq,e)})(aq);var Mo={},uq={};(function(e){var t=he&&he.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(e,"__esModule",{value:!0}),e.ImageConstraint=void 0;var n=gh;Object.defineProperty(e,"ImageConstraint",{enumerable:!0,get:function(){return t(n).default}})})(uq);var cq={},lq={};Object.defineProperty(lq,"__esModule",{value:!0});var W0={};Object.defineProperty(W0,"__esModule",{value:!0});W0.SlicesTypes=void 0;const VTe=Q,QTe=(0,VTe.__importStar)(Z),zTe=j0,HTe=yh;W0.SlicesTypes=QTe.keyof({[zTe.CompositeSliceType]:null,[HTe.SharedSliceType]:null});(function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Q;(0,t.__exportStar)(j0,e),(0,t.__exportStar)(Ru,e),(0,t.__exportStar)(yh,e),(0,t.__exportStar)(bh,e),(0,t.__exportStar)(lq,e),(0,t.__exportStar)(Ou,e),(0,t.__exportStar)(CR,e),(0,t.__exportStar)(W0,e)})(cq);(function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Q;(0,t.__exportStar)(hd,e),(0,t.__exportStar)(vh,e),(0,t.__exportStar)(uq,e),(0,t.__exportStar)(cq,e),(0,t.__exportStar)(SR,e),(0,t.__exportStar)(wr,e)})(Mo);(function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Q;(0,t.__exportStar)(X9,e),(0,t.__exportStar)(aq,e),(0,t.__exportStar)(Ti,e),(0,t.__exportStar)(Mo,e)})(fe);var Sb={},_b={},Zs={},rF;function Dt(){if(rF)return Zs;rF=1,Object.defineProperty(Zs,"__esModule",{value:!0}),Zs.hasContentType=Zs.hasFieldContentType=void 0;const e=ln,t=OR();function n(i){var o;return r(i)&&i.__TYPE__===t.FieldContentType&&((o=i)===null||o===void 0?void 0:o.type)!==void 0&&typeof i.type=="string"&&(0,e.isRight)(t.FieldType.decode(i.type))}Zs.hasFieldContentType=n;function r(i){return typeof i=="object"&&i!==null&&"__TYPE__"in i}return Zs.hasContentType=r,Zs}var iF;function fq(){return iF||(iF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmptyContent=e.EmptyLegacy=e.isEmptyContent=e.EmptyContentType=void 0;const t=Q,n=lt,r=Ge,i=(0,t.__importStar)(Z),o=Dt();e.EmptyContentType="EmptyContent";const a=c=>(0,o.hasContentType)(c)&&c.__TYPE__===e.EmptyContentType;e.isEmptyContent=a;const s=i.union([i.null,i.type({value:i.null})]),u=c=>new i.Type("EmptyLegacy",e.isEmptyContent,l=>(0,r.pipe)(s.decode(l),n.either.map(()=>({type:c,__TYPE__:e.EmptyContentType}))),()=>null);e.EmptyLegacy=u,e.EmptyContent=i.strict({type:i.string,__TYPE__:i.literal(e.EmptyContentType)})}(_b)),_b}var Ib={},Qn={};Object.defineProperty(Qn,"__esModule",{value:!0});Qn.defaultCtx=Qn.getFieldCtx=Qn.LegacyContentCtx=Qn.FieldOrSliceType=void 0;const YTe=Q,GTe=(0,YTe.__importStar)(Z),oF=Mo;Qn.FieldOrSliceType=GTe.union([oF.FieldType,oF.SlicesTypes]);class wR{constructor(t,n,r){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=t,this.fieldPath=n||[],this.allTypes=r||new Map;const i=Array.of(this.fieldPath,[this.fieldKey]).flat().join(".");this.prefixedKey=i,this.keyOfType=`${i}_TYPE`,this.fieldType=this.allTypes.get(this.prefixedKey)}}Qn.LegacyContentCtx=wR;function JTe(e,t,n){return new wR(e,[...t.fieldPath,t.fieldKey,...n||[]],t.allTypes)}Qn.getFieldCtx=JTe;function ZTe(e,t=new Map){return new wR(e,[],t)}Qn.defaultCtx=ZTe;var Tb={},xb={},aF;function dq(){return aF||(aF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BooleanContentDefaultValue=e.BooleanContent=e.BooleanLegacy=e.isBooleanContent=e.BooleanContentType=void 0;const t=Q,n=lt,r=Ge,i=(0,t.__importStar)(Z),o=Dt();e.BooleanContentType="BooleanContent";const a=c=>(0,o.hasContentType)(c)&&c.__TYPE__===e.BooleanContentType;e.isBooleanContent=a;const s=c=>new i.Type("BooleanLegacy",e.isBooleanContent,l=>(0,r.pipe)(i.boolean.decode(l),n.either.map(d=>e.BooleanContent.encode({value:d,__TYPE__:e.BooleanContentType}))),l=>({content:l.value,types:{[c.keyOfType]:"Boolean"}}));e.BooleanLegacy=s,e.BooleanContent=i.strict({__TYPE__:i.literal(e.BooleanContentType),value:i.boolean});const u=c=>{var l;return((l=c.config)===null||l===void 0?void 0:l.default_value)!==void 0?{__TYPE__:e.BooleanContentType,value:c.config.default_value||!1}:void 0};e.BooleanContentDefaultValue=u}(xb)),xb}var wb={},sF;function ER(){return sF||(sF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmbedContent=e.EmbedLegacy=e.EmbedContentLegacy=e.isEmbedContent=e.EmbedContentType=void 0;const t=Q,n=lt,r=Ge,i=(0,t.__importStar)(Z),o=ft(),a=Dt();e.EmbedContentType="EmbedContent";const s=c=>(0,a.hasContentType)(c)&&c.__TYPE__===e.EmbedContentType;e.isEmbedContent=s,e.EmbedContentLegacy=i.exact(i.intersection([i.type({embed_url:i.string,type:i.string}),i.partial({version:i.union([i.string,i.number,i.null]),title:o.StringOrNull,author_name:o.StringOrNull,author_url:o.StringOrNull,provider_name:o.StringOrNull,provider_url:o.StringOrNull,cache_age:i.union([i.string,i.number,i.null]),thumbnail_url:o.StringOrNull,thumbnail_width:o.NumberOrNull,thumbnail_height:o.NumberOrNull,html:o.StringOrNull})]));const u=c=>new i.Type("EmbedLegacy",e.isEmbedContent,l=>(0,r.pipe)(e.EmbedContentLegacy.decode(l),n.either.map(d=>({...d,all:l,__TYPE__:e.EmbedContentType}))),l=>({content:l.all,types:{[c.keyOfType]:"Embed"}}));e.EmbedLegacy=u,e.EmbedContent=i.intersection([e.EmbedContentLegacy,i.strict({__TYPE__:i.literal(e.EmbedContentType),all:i.unknown})])}(wb)),wb}var Eb={},$b={},qa={};Object.defineProperty(qa,"__esModule",{value:!0});const XTe=Q,exe=Ka,txe=Xi,Kh=(0,XTe.__importStar)(Z);function nxe(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)}qa.default=new Kh.Type("TrimmedString",Kh.string.is,(e,t)=>(0,txe.pipe)(Kh.string.validate(e,t),(0,exe.chain)(n=>Kh.success(nxe(n)))),e=>e);var hi={};Object.defineProperty(hi,"__esModule",{value:!0});hi.FieldContentType=void 0;hi.FieldContentType="FieldContent";var uF;function cF(){return uF||(uF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ColorContent=e.ColorLegacy=e.isColorContent=void 0;const t=Q,n=lt,r=Ge,i=(0,t.__importStar)(Z),o=Mo,a=(0,t.__importDefault)(qa),s=Dt(),u=hi,c=d=>(0,s.hasContentType)(d)&&d.__TYPE__===u.FieldContentType&&(0,s.hasFieldContentType)(d)&&d.type==="Color";e.isColorContent=c;const l=d=>new i.Type("ColorLegacy",e.isColorContent,p=>(0,r.pipe)(a.default.decode(p),n.either.map(A=>e.ColorContent.encode({value:A,type:o.ColorFieldType,__TYPE__:u.FieldContentType}))),p=>({content:p.value,types:{[d.keyOfType]:o.ColorFieldType}}));e.ColorLegacy=l,e.ColorContent=i.strict({type:i.literal(o.ColorFieldType),value:a.default,__TYPE__:i.literal(u.FieldContentType)})}($b)),$b}var Rb={},lF;function fF(){return lF||(lF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DateContent=e.DateLegacy=e.isDateContent=void 0;const t=Q,n=lt,r=Ge,i=(0,t.__importStar)(Z),o=Mo,a=(0,t.__importDefault)(qa),s=Dt(),u=hi,c=d=>(0,s.hasContentType)(d)&&d.__TYPE__===u.FieldContentType&&(0,s.hasFieldContentType)(d)&&d.type==="Date";e.isDateContent=c;const l=d=>new i.Type("DateLegacy",e.isDateContent,p=>(0,r.pipe)(a.default.decode(p),n.either.map(A=>e.DateContent.encode({value:A,type:o.DateFieldType,__TYPE__:u.FieldContentType}))),p=>({content:p.value,types:{[d.keyOfType]:o.DateFieldType}}));e.DateLegacy=l,e.DateContent=i.strict({type:i.literal(o.DateFieldType),value:a.default,__TYPE__:i.literal(u.FieldContentType)})}(Rb)),Rb}var Ob={},dF;function pF(){return dF||(dF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NumberContent=e.NumberLegacy=e.isNumberContent=void 0;const t=Q,n=lt,r=Ge,i=(0,t.__importStar)(Z),o=Mo,a=(0,t.__importDefault)(qa),s=Dt(),u=hi,c=d=>(0,s.hasContentType)(d)&&d.__TYPE__===u.FieldContentType&&(0,s.hasFieldContentType)(d)&&d.type==="Number";e.isNumberContent=c;const l=d=>new i.Type("NumberLegacy",e.isNumberContent,p=>(0,r.pipe)(a.default.decode(p),n.either.map(A=>e.NumberContent.encode({value:A,type:o.NumberFieldType,__TYPE__:u.FieldContentType}))),p=>({content:p.value,types:{[d.keyOfType]:o.NumberFieldType}}));e.NumberLegacy=l,e.NumberContent=i.strict({type:i.literal(o.NumberFieldType),value:a.default,__TYPE__:i.literal(u.FieldContentType)})}(Ob)),Ob}var Fb={},AF;function hF(){return AF||(AF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RangeContent=e.RangeLegacy=e.isRangeContent=void 0;const t=Q,n=lt,r=Ge,i=(0,t.__importStar)(Z),o=Mo,a=(0,t.__importDefault)(qa),s=Dt(),u=hi,c=d=>(0,s.hasContentType)(d)&&d.__TYPE__===u.FieldContentType&&(0,s.hasFieldContentType)(d)&&d.type==="Range";e.isRangeContent=c;const l=d=>new i.Type("RangeLegacy",e.isRangeContent,p=>(0,r.pipe)(a.default.decode(p),n.either.map(A=>e.RangeContent.encode({value:A,type:o.RangeFieldType,__TYPE__:u.FieldContentType}))),p=>({content:p.value,types:{[d.keyOfType]:o.RangeFieldType}}));e.RangeLegacy=l,e.RangeContent=i.strict({type:i.literal(o.RangeFieldType),value:a.default,__TYPE__:i.literal(u.FieldContentType)})}(Fb)),Fb}var kb={},mF;function gF(){return mF||(mF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SelectContentDefaultValue=e.SelectContent=e.SelectLegacy=e.isSelectContent=void 0;const t=Q,n=lt,r=Ge,i=(0,t.__importStar)(Z),o=Mo,a=(0,t.__importDefault)(qa),s=Dt(),u=hi,c=p=>(0,s.hasContentType)(p)&&p.__TYPE__===u.FieldContentType&&(0,s.hasFieldContentType)(p)&&p.type==="Select";e.isSelectContent=c;const l=p=>new i.Type("SelectLegacy",e.isSelectContent,A=>(0,r.pipe)(a.default.decode(A),n.either.map(m=>e.SelectContent.encode({value:m,type:o.SelectFieldType,__TYPE__:u.FieldContentType}))),A=>({content:A.value,types:{[p.keyOfType]:o.SelectFieldType}}));e.SelectLegacy=l,e.SelectContent=i.strict({type:i.literal(o.SelectFieldType),value:a.default,__TYPE__:i.literal(u.FieldContentType)});const d=p=>{var A;return!((A=p.config)===null||A===void 0)&&A.default_value?{__TYPE__:u.FieldContentType,type:o.SelectFieldType,value:p.config.default_value||""}:void 0};e.SelectContentDefaultValue=d}(kb)),kb}var Mb={},vF;function yF(){return vF||(vF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TextContent=e.TextLegacy=e.isTextContent=void 0;const t=Q,n=lt,r=Ge,i=(0,t.__importStar)(Z),o=Mo,a=(0,t.__importDefault)(qa),s=Dt(),u=hi,c=d=>(0,s.hasContentType)(d)&&d.__TYPE__===u.FieldContentType&&(0,s.hasFieldContentType)(d)&&d.type==="Text";e.isTextContent=c;const l=d=>new i.Type("TextLegacy",e.isTextContent,p=>(0,r.pipe)(a.default.decode(p),n.either.map(A=>e.TextContent.encode({value:A,type:o.TextFieldType,__TYPE__:u.FieldContentType}))),p=>({content:p.value,types:{[d.keyOfType]:o.TextFieldType}}));e.TextLegacy=l,e.TextContent=i.strict({type:i.literal(o.TextFieldType),value:a.default,__TYPE__:i.literal(u.FieldContentType)})}(Mb)),Mb}var Lb={},bF;function CF(){return bF||(bF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TimestampContent=e.TimestampLegacy=e.isTimestampContent=void 0;const t=Q,n=lt,r=Ge,i=(0,t.__importStar)(Z),o=Mo,a=(0,t.__importDefault)(qa),s=Dt(),u=hi,c=d=>(0,s.hasContentType)(d)&&d.__TYPE__===u.FieldContentType&&(0,s.hasFieldContentType)(d)&&d.type==="Timestamp";e.isTimestampContent=c;const l=d=>new i.Type("TimestampLegacy",e.isTimestampContent,p=>(0,r.pipe)(a.default.decode(p),n.either.map(A=>e.TimestampContent.encode({value:A,type:o.TimestampFieldType,__TYPE__:u.FieldContentType}))),p=>({content:p.value,types:{[d.keyOfType]:o.TimestampFieldType}}));e.TimestampLegacy=l,e.TimestampContent=i.strict({type:i.literal(o.TimestampFieldType),value:a.default,__TYPE__:i.literal(u.FieldContentType)})}(Lb)),Lb}var SF;function pq(){return SF||(SF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FieldContent=e.FieldType=void 0;const t=Q,n=(0,t.__importStar)(Z),r=cF(),i=fF(),o=pF(),a=hF(),s=gF(),u=yF(),c=CF();e.FieldType=n.keyof({Text:null,Date:null,Timestamp:null,Color:null,Number:null,Range:null,Select:null}),e.FieldContent=n.union([i.DateContent,r.ColorContent,o.NumberContent,a.RangeContent,s.SelectContent,u.TextContent,c.TimestampContent]),(0,t.__exportStar)(cF(),e),(0,t.__exportStar)(hi,e),(0,t.__exportStar)(fF(),e),(0,t.__exportStar)(pF(),e),(0,t.__exportStar)(hF(),e),(0,t.__exportStar)(gF(),e),(0,t.__exportStar)(yF(),e),(0,t.__exportStar)(CF(),e)}(Eb)),Eb}var jb={},_F;function Aq(){return _F||(_F=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.GeoPointContent=e.GeoPointLegacy=e.isGeoPointContent=e.GeoPointContentType=void 0;const t=Q,n=lt,r=Xi,i=(0,t.__importStar)(Z),o=Dt();e.GeoPointContentType="GeoPointContent";const a=c=>(0,o.hasContentType)(c)&&c.__TYPE__===e.GeoPointContentType;e.isGeoPointContent=a;const s=i.strict({position:i.strict({lat:i.number,lng:i.number})}),u=c=>new i.Type("GeoPointLegacy",e.isGeoPointContent,l=>(0,r.pipe)(s.decode(l),n.either.map(d=>e.GeoPointContent.encode({...d,__TYPE__:e.GeoPointContentType}))),l=>({content:{position:l.position},types:{[c.keyOfType]:"GeoPoint"}}));e.GeoPointLegacy=u,e.GeoPointContent=i.intersection([s,i.strict({__TYPE__:i.literal(e.GeoPointContentType)})])}(jb)),jb}var Ub={},IF;function $R(){return IF||(IF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ImageContent=e.ImageLegacy=e.ImageContentView=e.isImageContent=e.ImageContentType=void 0;const t=Q,n=lt,r=Ge,i=(0,t.__importStar)(Z),o=Er,a=ft(),s=Dt();e.ImageContentType="ImageContent";const u=p=>(0,s.hasContentType)(p)&&p.__TYPE__===e.ImageContentType;e.isImageContent=u;const c=i.exact(i.type({id:i.string,url:i.string,width:i.number,height:i.number}));e.ImageContentView=i.exact(i.intersection([i.type({origin:c,width:i.number,height:i.number,edit:i.type({zoom:i.number,crop:i.type({x:i.number,y:i.number}),background:i.string})}),i.partial({url:i.string,credits:a.NonEmptyStringOrNull,alt:a.NonEmptyStringOrNull,provider:a.StringOrNull})]));const l=i.intersection([e.ImageContentView,i.partial({thumbnails:i.record(i.string,e.ImageContentView)})]),d=p=>new i.Type("ImageLegacy",e.isImageContent,A=>(0,r.pipe)(l.decode(A),n.either.map(m=>e.ImageContent.encode({...m,__TYPE__:e.ImageContentType}))),A=>({content:(0,o.withOptionals)({edit:A.edit,height:A.height,origin:A.origin,width:A.width},[["alt",A.alt],["credits",A.credits],["provider",A.provider],["thumbnails",A.thumbnails],["url",A.url]]),types:{[p.keyOfType]:"Image"}}));e.ImageLegacy=d,e.ImageContent=i.intersection([l,i.strict({__TYPE__:i.literal(e.ImageContentType)})])}(Ub)),Ub}var Bb={},TF;function hq(){return TF||(TF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.IntegrationFieldContent=e.IntegrationFieldLegacy=e.isIntegrationFieldContent=e.IntegrationFieldContentType=void 0;const t=Q,n=lt,r=Ge,i=(0,t.__importStar)(Z),o=Dt();e.IntegrationFieldContentType="IntegrationFieldsContent";const a=u=>(0,o.hasContentType)(u)&&u.__TYPE__===e.IntegrationFieldContentType;e.isIntegrationFieldContent=a;const s=u=>new i.Type("IntegrationFieldLegacy",e.isIntegrationFieldContent,c=>(0,r.pipe)(i.string.decode(c),n.either.map(l=>e.IntegrationFieldContent.encode({value:l,__TYPE__:e.IntegrationFieldContentType}))),c=>({content:c.value,types:{[u.keyOfType]:"IntegrationFields"}}));e.IntegrationFieldLegacy=s,e.IntegrationFieldContent=i.strict({__TYPE__:i.literal(e.IntegrationFieldContentType),value:i.string})}(Bb)),Bb}var Pb={},xF;function RR(){return xF||(xF=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;const t=Q,n=lt,r=Ge,i=(0,t.__importStar)(Z),o=O0,a=ft(),s=Xe,u=Dt();e.ImageLinkType="ImageLink";const c=i.intersection([i.strict({kind:i.string,id:i.string,url:i.string,height:i.string,width:i.string,size:i.string,name:i.string}),i.exact(i.partial({date:a.StringOrNull}))]),l=new i.Type("FilledImageLink",D=>(0,u.hasContentType)(D)&&D.__TYPE__===e.ImageLinkType,D=>(0,r.pipe)(c.decode(D),n.either.map(G=>e.FilledImageLinkContent.encode({...G,__TYPE__:e.ImageLinkType}))),D=>c.encode(D));e.FilledImageLinkContent=i.intersection([i.strict({__TYPE__:i.literal(e.ImageLinkType)}),c]);const d=i.union([i.intersection([c,i.exact(i.partial({text:i.string}))]),i.strict({kind:i.literal("image"),text:i.string})]),p=new i.Type("ImageLink",D=>(0,u.hasContentType)(D)&&D.__TYPE__===e.ImageLinkType,D=>(0,r.pipe)(d.decode(D),n.either.map(G=>e.ImageLinkContent.encode({...G,__TYPE__:e.ImageLinkType}))),D=>d.encode(D));e.ImageLinkContent=i.intersection([i.strict({__TYPE__:i.literal(e.ImageLinkType)}),d]),e.FileLinkType="FileLink";const A=i.exact(i.intersection([i.type({kind:i.string,id:i.string,url:i.string,name:i.string,size:(0,o.withFallback)(i.string,"0")}),i.partial({date:a.StringOrNull})])),m=new i.Type("FilledFileLink",D=>(0,u.hasContentType)(D)&&D.__TYPE__===e.FileLinkType,D=>(0,r.pipe)(A.decode(D),n.either.map(G=>e.FilledFileLinkContent.encode({...G,__TYPE__:e.FileLinkType}))),D=>A.encode(D));e.FilledFileLinkContent=i.intersection([i.strict({__TYPE__:i.literal(e.FileLinkType)}),A]);const g=i.union([i.intersection([A,i.exact(i.partial({text:i.string}))]),i.strict({kind:i.literal("file"),text:i.string})]),_=new i.Type("FileLink",D=>(0,u.hasContentType)(D)&&D.__TYPE__===e.FileLinkType,D=>(0,r.pipe)(g.decode(D),n.either.map(G=>e.FileLinkContent.encode({...G,__TYPE__:e.FileLinkType}))),D=>g.encode(D));e.FileLinkContent=i.intersection([i.strict({__TYPE__:i.literal(e.FileLinkType)}),g]),e.MediaLinkType="MediaLink";const b=i.strict({kind:i.literal("media"),text:i.string}),I=new i.Type("MediaLink",D=>(0,u.hasContentType)(D)&&D.__TYPE__===e.MediaLinkType,D=>(0,r.pipe)(b.decode(D),n.either.map(G=>e.MediaLinkContent.encode({...G,__TYPE__:e.MediaLinkType}))),D=>b.encode(D));e.MediaLinkContent=i.intersection([i.strict({__TYPE__:i.literal(e.MediaLinkType)}),b]),e.DocumentLinkType="DocumentLink";const x=i.strict({id:a.NonEmptyString}),v=new i.Type("FilledDocumentLink",D=>(0,u.hasContentType)(D)&&D.__TYPE__===e.DocumentLinkType,D=>(0,r.pipe)(x.decode(D),n.either.map(G=>e.FilledDocumentLinkContent.encode({...G,__TYPE__:e.DocumentLinkType}))),D=>x.encode(D));e.FilledDocumentLinkContent=i.intersection([i.strict({__TYPE__:i.literal(e.DocumentLinkType)}),x]);const S=i.union([i.intersection([x,i.exact(i.partial({text:i.string}))]),i.strict({kind:i.literal("document"),text:i.string})]),y=new i.Type("DocumentLink",D=>(0,u.hasContentType)(D)&&D.__TYPE__===e.DocumentLinkType,D=>(0,r.pipe)(S.decode(D),n.either.map(G=>e.DocumentLinkContent.encode({...G,__TYPE__:e.DocumentLinkType}))),D=>S.encode(D));e.DocumentLinkContent=i.intersection([i.strict({__TYPE__:i.literal(e.DocumentLinkType)}),S]),e.ExternalLinkType="ExternalLink";const T=i.exact(i.intersection([i.type({url:i.string}),i.partial({kind:i.literal("web"),target:a.StringOrNull,preview:(0,s.nullable)(i.partial({title:i.string}))})])),w=new i.Type("FilledExternalLink",D=>(0,u.hasContentType)(D)&&D.__TYPE__===e.ExternalLinkType,D=>(0,r.pipe)(T.decode(D),n.either.map(G=>e.FilledExternalLinkContent.encode({...G,__TYPE__:e.ExternalLinkType}))),D=>T.encode(D));e.FilledExternalLinkContent=i.intersection([i.strict({__TYPE__:i.literal(e.ExternalLinkType)}),T]);const F=i.union([i.intersection([T,i.exact(i.partial({text:i.string}))]),i.strict({kind:i.literal("web"),text:i.string})]),k=new i.Type("ExternalLink",D=>(0,u.hasContentType)(D)&&D.__TYPE__===e.ExternalLinkType,D=>(0,r.pipe)(F.decode(D),n.either.map(G=>e.ExternalLinkContent.encode({...G,__TYPE__:e.ExternalLinkType}))),D=>F.encode(D));e.ExternalLinkContent=i.intersection([i.strict({__TYPE__:i.literal(e.ExternalLinkType)}),F]),e.AnyLinkType="AnyLink";const $=i.strict({text:i.string}),P=new i.Type("AnyLink",D=>(0,u.hasContentType)(D)&&D.__TYPE__===e.AnyLinkType,D=>(0,r.pipe)($.decode(D),n.either.map(G=>e.AnyLinkContent.encode({...G,__TYPE__:e.AnyLinkType}))),D=>$.encode(D));e.AnyLinkContent=i.intersection([i.strict({__TYPE__:i.literal(e.AnyLinkType)}),$]),e.LinkContentType="LinkContent";const K=D=>(0,u.hasContentType)(D)&&D.__TYPE__===e.LinkContentType;e.isLinkContent=K,e.LinkLegacy=i.union([p,_,y,k,I,P]);const Y=D=>new i.Type("LinkLegacy",e.isLinkContent,G=>(0,r.pipe)(e.LinkLegacy.decode(G),n.either.map(M=>e.LinkContent.encode({value:M,__TYPE__:e.LinkContentType}))),G=>({content:e.LinkLegacy.encode(G.value),types:{[D.keyOfType]:"Link"}}));e.LinkContentLegacy=Y,e.Link=i.union([e.ImageLinkContent,e.FileLinkContent,e.DocumentLinkContent,e.ExternalLinkContent,e.MediaLinkContent,e.AnyLinkContent]),e.LinkContent=i.strict({__TYPE__:i.literal(e.LinkContentType),value:e.Link});const ee=D=>(0,u.hasContentType)(D)&&D.__TYPE__===e.LinkContentType;e.isFilledLinkContent=ee,e.FilledLinkLegacy=i.union([l,m,v,w]);const re=D=>new i.Type("FilledLinkLegacy",e.isFilledLinkContent,G=>(0,r.pipe)(e.FilledLinkLegacy.decode(G),n.either.map(M=>e.FilledLinkContent.encode({value:M,__TYPE__:e.LinkContentType}))),G=>({content:e.FilledLinkLegacy.encode(G.value),types:{[D.keyOfType]:"Link"}}));e.FilledLinkContentLegacy=re,e.FilledLink=i.union([e.FilledImageLinkContent,e.FilledFileLinkContent,e.FilledDocumentLinkContent,e.FilledExternalLinkContent]),e.FilledLinkContent=i.strict({__TYPE__:i.literal(e.LinkContentType),value:e.FilledLink})}(Pb)),Pb}var Ci={},Db={},Wb={},wF;function EF(){return wF||(wF=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;const t=Q,n=lt,r=ln,i=Ge,o=(0,t.__importStar)(Z),a=O0,s=vh,u=ft(),c=Xe,l=ER(),d=$R(),p=RR(),A=k=>o.strict({data:k,start:o.number,end:o.number,type:o.literal(s.RichTextNodeType.hyperlink)}),m=o.strict({data:(0,a.withFallback)(o.string,""),start:o.number,end:o.number,type:o.literal("label")}),g=o.strict({start:o.number,end:o.number,type:o.keyof({[s.RichTextNodeType.strong]:null,[s.RichTextNodeType.em]:null,"list-item":null})});e.Span=o.union([A(p.FilledLink),m,g]),e.SpanLegacy=o.union([A(p.FilledLinkLegacy),m,g]);const _=k=>new o.Type("ValidatedSpans",$=>Array.isArray($)&&$.every(k.is),($,P)=>{if(Array.isArray($)){const K=$.reduce((Y,ee)=>{const re=k.decode(ee);return(0,r.isLeft)(re)?Y:[...Y,re.right]},[]).sort((Y,ee)=>Y.start-ee.start);return o.success(K)}else return o.failure($,P)},$=>$.reduce((P,K)=>{const Y=k.encode(K);return[...P,Y]},[]));e.ValidatedSpans=_;const b=k=>o.exact(o.intersection([o.type({type:o.literal(s.RichTextNodeType.image),data:o.intersection([d.ImageContentView,o.partial({linkTo:(0,c.nullable)(k)})])}),o.partial({label:u.StringOrNull,direction:u.StringOrNull})]));e.ImageBlock=b(p.FilledLink);const I=b(p.FilledLinkLegacy);function x(k){return k.type===s.RichTextNodeType.image}e.checkImageBlock=x;const v=o.exact(o.intersection([o.type({type:o.literal(s.RichTextNodeType.embed),data:o.unknown}),o.partial({label:u.StringOrNull,direction:u.StringOrNull})])),S=new o.Type("EmbedBlockLegacy",k=>k.type==="embed",k=>(0,i.pipe)(v.decode(k),n.either.chain($=>n.either.map(P=>[$,P])(l.EmbedContentLegacy.decode($.data))),n.either.map(([$,P])=>e.EmbedBlock.encode({...$,data:{...P,__TYPE__:l.EmbedContentType,all:$.data}}))),k=>({...v.encode(k),data:l.EmbedContentLegacy.encode(k.data)}));e.EmbedBlock=o.exact(o.intersection([o.type({type:o.literal(s.RichTextNodeType.embed),data:l.EmbedContent}),o.partial({label:u.StringOrNull,direction:u.StringOrNull})]));function y(k){return k.type===s.RichTextNodeType.embed}e.checkEmbedBlock=y;const T=k=>o.exact(o.intersection([o.type({type:(0,c.refineType)(s.RichTextNodeTypeCodec,`string which isn't ${s.RichTextNodeType.image} ${s.RichTextNodeType.embed}`,$=>$!==s.RichTextNodeType.image&&$!==s.RichTextNodeType.embed),content:o.intersection([o.type({text:o.string}),o.partial({spans:(0,e.ValidatedSpans)(k)})])}),o.partial({label:o.string,direction:o.string})]));e.TextBlock=T(e.Span);const w=T(e.SpanLegacy),F=o.union([S,I,w]);e.BlockLegacy=new o.Type("BlockLegacy",k=>S.is(k)||I.is(k)||w.is(k),k=>F.decode(k),k=>(()=>e.ImageBlock.is(k)?I.encode(k):e.EmbedBlock.is(k)?S.encode(k):w.encode(k))()),e.Block=o.union([e.ImageBlock,e.EmbedBlock,e.TextBlock])}(Wb)),Wb}var $F;function mq(){return $F||($F=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RichTextLegacy=e.RichTextContent=e.isRichTextContent=e.RichTextContentType=void 0;const t=Q,n=lt,r=Ge,i=(0,t.__importStar)(Z),o=Dt(),a=EF();e.RichTextContentType="StructuredTextContent";const s=l=>(0,o.hasContentType)(l)&&l.__TYPE__===e.RichTextContentType;e.isRichTextContent=s;const u=i.array(a.BlockLegacy);e.RichTextContent=i.strict({__TYPE__:i.literal(e.RichTextContentType),value:i.array(a.Block)}),(0,t.__exportStar)(EF(),e);const c=l=>new i.Type("RichTextLegacy",e.isRichTextContent,d=>(0,r.pipe)(u.decode(d),n.either.map(p=>({value:p,__TYPE__:e.RichTextContentType}))),d=>({content:u.encode(d.value),types:{[l.keyOfType]:"StructuredText"}}));e.RichTextLegacy=c}(Db)),Db}var Kb={},RF;function gq(){return RF||(RF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SeparatorContent=e.SeparatorLegacy=e.isSeparatorContent=e.SeparatorContentType=void 0;const n=(0,Q.__importStar)(Z),r=Dt();e.SeparatorContentType="SeparatorContent";const i=a=>(0,r.hasContentType)(a)&&a.__TYPE__===e.SeparatorContentType;e.isSeparatorContent=i;const o=a=>new n.Type("SeparatorLegacy",e.isSeparatorContent,()=>n.success(e.SeparatorContent.encode({__TYPE__:e.SeparatorContentType})),()=>({content:{},types:{[a.keyOfType]:"Separator"}}));e.SeparatorLegacy=o,e.SeparatorContent=n.strict({__TYPE__:n.literal(e.SeparatorContentType)})}(Kb)),Kb}var OF;function rxe(){if(OF)return Ci;OF=1,Object.defineProperty(Ci,"__esModule",{value:!0}),Ci.NestableLegacy=Ci.isNestableContent=Ci.NestableContentDefaultValue=Ci.NestableContent=void 0;const e=Q,t=ln,n=(0,e.__importStar)(Z),r=fq(),i=dq(),o=ER(),a=pq(),s=hi,u=Aq(),c=$R(),l=hq(),d=RR(),p=mq(),A=gq();Ci.NestableContent=n.union([r.EmptyContent,i.BooleanContent,o.EmbedContent,a.TextContent,a.TimestampContent,a.SelectContent,a.RangeContent,a.NumberContent,a.DateContent,a.ColorContent,u.GeoPointContent,c.ImageContent,l.IntegrationFieldContent,d.LinkContent,p.RichTextContent,A.SeparatorContent]);const m=b=>{switch(b.type){case"Boolean":return(0,i.BooleanContentDefaultValue)(b);case"Select":return(0,a.SelectContentDefaultValue)(b);default:return}};Ci.NestableContentDefaultValue=m;const g=b=>(0,a.isTextContent)(b)||(0,a.isColorContent)(b)||(0,a.isDateContent)(b)||(0,a.isTimestampContent)(b)||(0,a.isNumberContent)(b)||(0,a.isRangeContent)(b)||(0,a.isSelectContent)(b)||(0,u.isGeoPointContent)(b)||(0,p.isRichTextContent)(b)||(0,i.isBooleanContent)(b)||(0,o.isEmbedContent)(b)||(0,c.isImageContent)(b)||(0,l.isIntegrationFieldContent)(b)||(0,d.isLinkContent)(b)||(0,A.isSeparatorContent)(b)||(0,r.isEmptyContent)(b);Ci.isNestableContent=g;const _=b=>({decode(I){if(!b.fieldType)return;const x=(0,r.EmptyLegacy)(b.fieldType).decode(I);if((0,t.isRight)(x))return x;const v=(()=>{switch(b.fieldType){case"Text":return(0,a.TextLegacy)(b);case"Color":return(0,a.ColorLegacy)(b);case"Date":return(0,a.DateLegacy)(b);case"Timestamp":return(0,a.TimestampLegacy)(b);case"Number":return(0,a.NumberLegacy)(b);case"Range":return(0,a.RangeLegacy)(b);case"Select":return(0,a.SelectLegacy)(b);case"GeoPoint":return(0,u.GeoPointLegacy)(b);case"StructuredText":return(0,p.RichTextLegacy)(b);case"Boolean":return(0,i.BooleanLegacy)(b);case"Embed":return(0,o.EmbedLegacy)(b);case"Image":return(0,c.ImageLegacy)(b);case"IntegrationFields":return(0,l.IntegrationFieldLegacy)(b);case"Link":return(0,d.LinkContentLegacy)(b);case"Separator":return(0,A.SeparatorLegacy)(b);default:return}})();if(v)return v.decode(I)},encode(I){switch(I.__TYPE__){case s.FieldContentType:return I.type==="Text"?(0,a.TextLegacy)(b).encode(I):I.type==="Color"?(0,a.ColorLegacy)(b).encode(I):I.type==="Range"?(0,a.RangeLegacy)(b).encode(I):I.type==="Date"?(0,a.DateLegacy)(b).encode(I):I.type==="Number"?(0,a.NumberLegacy)(b).encode(I):I.type==="Timestamp"?(0,a.TimestampLegacy)(b).encode(I):I.type==="Select"?(0,a.SelectLegacy)(b).encode(I):void 0;case u.GeoPointContentType:return(0,u.GeoPointLegacy)(b).encode(I);case p.RichTextContentType:return(0,p.RichTextLegacy)(b).encode(I);case o.EmbedContentType:return(0,o.EmbedLegacy)(b).encode(I);case i.BooleanContentType:return(0,i.BooleanLegacy)(b).encode(I);case c.ImageContentType:return(0,c.ImageLegacy)(b).encode(I);case l.IntegrationFieldContentType:return(0,l.IntegrationFieldLegacy)(b).encode(I);case d.LinkContentType:return(0,d.LinkContentLegacy)(b).encode(I);case A.SeparatorContentType:return(0,A.SeparatorLegacy)(b).encode(I);default:return}}});return Ci.NestableLegacy=_,Ci}var FF;function Lo(){return FF||(FF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Q;(0,t.__exportStar)(dq(),e),(0,t.__exportStar)(ER(),e),(0,t.__exportStar)(pq(),e),(0,t.__exportStar)(Aq(),e),(0,t.__exportStar)($R(),e),(0,t.__exportStar)(hq(),e),(0,t.__exportStar)(RR(),e),(0,t.__exportStar)(rxe(),e),(0,t.__exportStar)(mq(),e),(0,t.__exportStar)(gq(),e)}(Tb)),Tb}var Wo={},kF;function K0(){if(kF)return Wo;kF=1,Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.repeatableContentWithDefaultNestableContentValues=Wo.withDefaultNestableContentValues=Wo.withDefaultSlicePrimaryContentValues=void 0;const e=fe,t=Va(),n=Lo();function r(a,s){const u=s;for(const[c,l]of Object.entries(a)){const d=s[c];if(d===void 0){if(l.type===e.GroupFieldType)u[c]=(0,t.groupContentWithDefaultValues)(l,t.GroupContentDefaultValue);else{const p=(0,n.NestableContentDefaultValue)(l);p&&(u[c]=p)}continue}l.type===e.GroupFieldType&&(0,t.isGroupContent)(d)&&(u[c]=(0,t.groupContentWithDefaultValues)(l,d))}return u}Wo.withDefaultSlicePrimaryContentValues=r;function i(a,s){return Object.entries(a).reduce((u,[c,l])=>{if(s[c]===void 0){const d=(0,n.NestableContentDefaultValue)(l);return d!==void 0?{...u,[c]:d}:u}return u},s)}Wo.withDefaultNestableContentValues=i;function o(a,s){const u=Object.entries(a);return s.map(c=>u.reduce((l,[d,p])=>{var A;const m=c.value.find(([g])=>g===d);if(p.type==="Group"){const g=(0,t.groupContentWithDefaultValues)(p,(A=m==null?void 0:m[1])!==null&&A!==void 0?A:{__TYPE__:t.GroupContentType,value:[]});return{...l,value:[...l.value.filter(([_])=>_!==d),...g?[[d,g]]:[]]}}else if(!m){const g=(0,n.NestableContentDefaultValue)(p);return{...l,value:[...l.value,...g?[[d,g]]:[]]}}return l},c))}return Wo.repeatableContentWithDefaultNestableContentValues=o,Wo}var MF;function Va(){return MF||(MF=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;const t=Q,n=lt,r=ln,i=Ge,o=(0,t.__importStar)(Z),a=fe,s=Qn,u=Dt(),c=Lo(),l=K0();e.GroupItemContentType="GroupItemContent",e.GroupContentType="GroupContentType",e.GroupItemContent=o.recursion("GroupItemContent",()=>o.strict({__TYPE__:o.literal(e.GroupItemContentType),value:o.array(o.tuple([o.string,o.union([c.NestableContent,e.GroupContent])]))})),e.GroupContent=o.recursion("GroupContent",()=>o.strict({__TYPE__:o.literal(e.GroupContentType),value:o.array(e.GroupItemContent)})),e.isGroupContent=e.GroupContent.is,e.GroupContentDefaultValue={__TYPE__:e.GroupContentType,value:[]};const d=o.record(o.string,o.unknown),p=b=>new o.Type("GroupItemLegacy",I=>(0,u.hasContentType)(I)&&I.__TYPE__===e.GroupItemContentType,I=>(0,i.pipe)(d.decode(I),n.either.map(v=>({value:Object.entries(v).reduce((y,[T,w])=>{const F=(0,s.getFieldCtx)(T,b),k=F.fieldType===a.GroupFieldType?(0,e.GroupLegacy)(F).decode(w):(0,c.NestableLegacy)(F).decode(w);return!k||(0,r.isLeft)(k)?y:[...y,[T,k.right]]},[]),__TYPE__:e.GroupItemContentType}))),I=>I.value.reduce((x,[v,S])=>{const y=(0,s.getFieldCtx)(v,b),T=(0,e.isGroupContent)(S)?(0,e.GroupLegacy)(y).encode(S):(0,c.NestableLegacy)(y).encode(S);return T?{content:{...x.content,[v]:T.content},types:{...x.types,...T.types}}:x},{content:{},types:{}}));e.GroupItemLegacy=p;const A=b=>{const I=o.array(o.union([o.null,(0,e.GroupItemLegacy)(b)])),x=o.array((0,e.GroupItemLegacy)(b));return new o.Type("GroupLegacy",e.isGroupContent,v=>(0,i.pipe)(I.decode(v),n.either.map(S=>({value:S.map(y=>y===null?{__TYPE__:e.GroupItemContentType,value:[]}:y),__TYPE__:e.GroupContentType}))),v=>{const S=x.encode(v.value);return{content:S.map(y=>y.content),types:S.reduce((y,T)=>({...y,...T.types}),{[b.keyOfType]:a.GroupFieldType})}})};e.GroupLegacy=A;function m(b,I){var x;const v=(x=b.config)===null||x===void 0?void 0:x.fields;return v?{...I,value:(0,l.repeatableContentWithDefaultNestableContentValues)(v,I.value)}:I}e.groupContentWithDefaultValues=m;function g({path:b,key:I,apiId:x,model:v,content:S}){return y=>{var T;const w=_({path:b,model:(T=v==null?void 0:v.config)===null||T===void 0?void 0:T.fields,content:S.value})(y);return y({path:b,key:I,apiId:x,model:v,content:{__TYPE__:S.__TYPE__,value:w}})}}e.traverseGroupContent=g;function _({path:b,model:I,content:x}){return v=>x.map((S,y)=>{const T=b.concat([{key:y.toString(),type:"GroupItem"}]),w=S.value.reduce((F,[k,$])=>{const P=I==null?void 0:I[k];let K;return(!P||(P==null?void 0:P.type)===a.GroupFieldType)&&$.__TYPE__===e.GroupContentType?K=g({path:T.concat([{key:k,type:"Widget"}]),key:k,apiId:k,model:P,content:$})(v):K=v({path:T.concat([{key:k,type:"Widget"}]),key:k,apiId:k,model:P,content:$}),!K||!((0,c.isNestableContent)(K)||(0,e.isGroupContent)(K))?F:F.concat([[k,K]])},[]);return{__TYPE__:S.__TYPE__,value:w}})}e.traverseGroupItemsContent=_}(Ib)),Ib}var Nb={},qb={},Vb={},Xs={},LF;function vq(){if(LF)return Xs;LF=1,Object.defineProperty(Xs,"__esModule",{value:!0}),Xs.RepeatableWidgets=Xs.RepeatableWidgetsLegacy=void 0;const t=(0,Q.__importStar)(Z),n=Va(),r=Lo(),i=s=>t.array((0,n.GroupItemLegacy)(s));Xs.RepeatableWidgetsLegacy=i;const o=t.tuple([t.string,t.union([r.NestableContent,n.GroupContent])]),a=t.strict({__TYPE__:t.literal(n.GroupItemContentType),value:t.array(o)});return Xs.RepeatableWidgets=t.array(a),Xs}var jF;function Rm(){return jF||(jF=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;const t=Q,n=lt,r=ln,i=Ge,o=(0,t.__importStar)(Z),a=Qn,s=Dt(),u=Va(),c=Lo(),l=K0(),d=vq();e.CompositeSliceContentType="CompositeSliceContent";const p=I=>(0,s.hasContentType)(I)&&I.__TYPE__===e.CompositeSliceContentType;e.isCompositeSliceContent=p;const A=o.exact(o.partial({repeat:o.array(o.unknown),"non-repeat":o.UnknownRecord})),m=I=>new o.Type("CompositeSliceLegacy",e.isCompositeSliceContent,x=>(0,i.pipe)(A.decode(x),n.either.map(v=>{const S=(()=>{const T=(0,a.getFieldCtx)("repeat",I),w=(0,d.RepeatableWidgetsLegacy)(T).decode(v.repeat);if(!(!w||(0,r.isLeft)(w)))return w.right})()||[];return{nonRepeat:Object.entries(v["non-repeat"]||{}).reduce((T,[w,F])=>{const k=(0,a.getFieldCtx)(w,I,["non-repeat"]);if(!k)return T;const $=(0,c.NestableLegacy)(k).decode(F);return!$||(0,r.isLeft)($)?T:{...T,[w]:$.right}},{}),repeat:S,__TYPE__:e.CompositeSliceContentType}})),x=>{const v=Object.entries(x.nonRepeat).reduce((y,[T,w])=>{const F=(0,a.getFieldCtx)(T,I,["non-repeat"]),k=(0,c.NestableLegacy)(F).encode(w);return k?{content:{...y.content,[T]:k.content},types:{...y.types,...k.types}}:y},{content:{},types:{}}),S=(()=>{const y=(0,a.getFieldCtx)("repeat",I);return(0,d.RepeatableWidgetsLegacy)(y).encode(x.repeat)})()||[];return{content:{"non-repeat":v.content,repeat:S.map(y=>y.content)},types:{[I.keyOfType]:"Slice",...v.types,...S.reduce((y,T)=>({...y,...T.types}),{})}}});e.CompositeSliceLegacy=m,e.CompositeSliceContent=o.strict({__TYPE__:o.literal(e.CompositeSliceContentType),nonRepeat:o.record(o.string,c.NestableContent),repeat:d.RepeatableWidgets});function g(I,x){var v,S;const y=(0,l.withDefaultNestableContentValues)((v=I["non-repeat"])!==null&&v!==void 0?v:{},x.nonRepeat),T=(0,l.repeatableContentWithDefaultNestableContentValues)((S=I.repeat)!==null&&S!==void 0?S:{},x.repeat);return{...x,nonRepeat:y,repeat:T}}e.compositeSliceContentWithDefaultValues=g;function _({path:I,sliceKey:x,sliceName:v,model:S,content:y}){return(T,w)=>{const F=Object.entries(y.widget.nonRepeat).reduce(($,[P,K])=>{const Y=(()=>{var re,D,G;return(S==null?void 0:S.type)==="SharedSlice"?(D=(re=S==null?void 0:S.fields)===null||re===void 0?void 0:re.primary)===null||D===void 0?void 0:D[P]:(G=S==null?void 0:S["non-repeat"])===null||G===void 0?void 0:G[P]})(),ee=T({path:I.concat([{key:"non-repeat",type:"primary"},{key:P,type:"Widget"}]),key:P,apiId:v,model:Y,content:K});return ee?(0,c.isNestableContent)(ee)?{...$,[P]:ee}:(console.warn(`Warn: Non nestable content with key [${P}] detected in a composite slice [${v}] with key [${x}]`),$):$},{}),k=(0,u.traverseGroupItemsContent)({path:I.concat([{key:"repeat",type:"items"}]),model:(S==null?void 0:S.type)==="SharedSlice"?S==null?void 0:S.fields.items:S==null?void 0:S.repeat,content:y.widget.repeat})(T);return w({key:x,apiId:v,path:I,model:S,content:{...y,widget:{__TYPE__:"CompositeSliceContent",repeat:k,nonRepeat:F}}})}}e.traverseCompositeSliceContent=_;function b(I,x){const[,v]=x.key.split("$");return{key:`${I.sliceName}$${v}`,name:I.sliceName,maybeLabel:x.maybeLabel,widget:{__TYPE__:"SharedSliceContent",variation:I.variationId,primary:Object.entries(x.widget.nonRepeat).reduce((S,[y,T])=>{var w;return!((w=I.fields.primary)===null||w===void 0)&&w[y]?{...S,[y]:T}:(console.warn(`The widget ${y} in the non-repeat zone of the composite slice [${I.sliceName}] with key [${x.key}] doesn't exist in the model.`),S)},{}),items:x.widget.repeat.map(S=>({__TYPE__:"GroupItemContent",value:S.value.reduce((y,[T,w])=>{var F;return!((F=I.fields.items)===null||F===void 0)&&F[T]?y.concat([[T,w]]):(console.warn(`The widget ${T} in the repeat zone of the composite slice [${I.sliceName}] with key [${x.key}] doesn't exist in the model.`),y)},[])}),[])}}}e.migrateCompositeSlice=b}(Vb)),Vb}var Qb={},Ko={},UF;function yq(){if(UF)return Ko;UF=1,Object.defineProperty(Ko,"__esModule",{value:!0}),Ko.isSlicePrimaryContent=Ko.SlicePrimaryLegacy=Ko.SlicePrimaryContent=void 0;const t=(0,Q.__importStar)(Z),n=fe,r=Va(),i=Lo();Ko.SlicePrimaryContent=t.union([i.NestableContent,r.GroupContent]);const o=s=>{const u=(0,r.GroupLegacy)(s),c=(0,i.NestableLegacy)(s);return{decode(l){return s.fieldType===n.GroupFieldType?u.decode(l):c.decode(l)},encode(l){return(0,r.isGroupContent)(l)?u.encode(l):c.encode(l)}}};Ko.SlicePrimaryLegacy=o;const a=s=>(0,i.isNestableContent)(s)||(0,r.isGroupContent)(s);return Ko.isSlicePrimaryContent=a,Ko}var BF;function Om(){return BF||(BF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.traverseSharedSliceContent=e.sharedSliceContentWithDefaultValues=e.SharedSliceContent=e.SharedSliceLegacy=e.isSharedSliceContent=e.SharedSliceContentType=void 0;const t=Q,n=lt,r=ln,i=Ge,o=(0,t.__importStar)(Z),a=O0,s=fe,u=Qn,c=Dt(),l=Va(),d=Lo(),p=K0(),A=vq(),m=yq();e.SharedSliceContentType="SharedSliceContent";const g=v=>(0,c.hasContentType)(v)&&v.__TYPE__===e.SharedSliceContentType;e.isSharedSliceContent=g;const _=o.exact(o.type({variation:o.string,items:(0,a.withFallback)(o.array(o.unknown),[]),primary:(0,a.withFallback)(o.UnknownRecord,{})})),b=v=>new o.Type("SharedSliceLegacy",e.isSharedSliceContent,S=>(0,i.pipe)(_.decode(S),n.either.map(y=>{const T=(()=>{const F=(0,u.getFieldCtx)("items",v,["variations",y.variation]),k=(0,A.RepeatableWidgetsLegacy)(F).decode(y.items);if(!(!k||(0,r.isLeft)(k)))return k.right})()||[],w=Object.entries(y.primary).reduce((F,[k,$])=>{const P=(0,u.getFieldCtx)(k,v,["variations",y.variation,"primary"]),K=(0,m.SlicePrimaryLegacy)(P).decode($);return!K||(0,r.isLeft)(K)?F:{...F,[k]:K.right}},{});return{variation:y.variation,primary:w,items:T,__TYPE__:e.SharedSliceContentType}})),S=>{const y=Object.entries(S.primary).reduce((w,[F,k])=>{const $=(0,u.getFieldCtx)(F,v,["variations",S.variation,"primary"]),P=(0,m.SlicePrimaryLegacy)($).encode(k);return P?{content:{...w.content,[F]:P.content},types:{...w.types,...P.types}}:w},{content:{},types:{}}),T=(()=>{const w=(0,u.getFieldCtx)("items",v,["variations",S.variation]);return(0,A.RepeatableWidgetsLegacy)(w).encode(S.items)})()||[];return{content:{primary:y.content,items:T.map(w=>w.content),variation:S.variation},types:{[v.keyOfType]:"SharedSlice",...y.types,...T.reduce((w,F)=>({...w,...F.types}),{})}}});e.SharedSliceLegacy=b,e.SharedSliceContent=o.strict({__TYPE__:o.literal(e.SharedSliceContentType),variation:o.string,primary:o.record(o.string,m.SlicePrimaryContent),items:A.RepeatableWidgets});function I(v,S){var y,T;const w=v.variations.find(K=>K.id===S.variation),F=(y=w==null?void 0:w.primary)!==null&&y!==void 0?y:{},k=(T=w==null?void 0:w.items)!==null&&T!==void 0?T:{},$=(0,p.withDefaultSlicePrimaryContentValues)(F,S.primary),P=(0,p.repeatableContentWithDefaultNestableContentValues)(k,S.items);return{...S,primary:$,items:P}}e.sharedSliceContentWithDefaultValues=I;function x({path:v,sliceKey:S,sliceName:y,model:T,content:w}){return(F,k)=>{const $=Object.entries(w.widget.primary).reduce((K,[Y,ee])=>{var re,D;const G=(D=(re=T==null?void 0:T.fields)===null||re===void 0?void 0:re.primary)===null||D===void 0?void 0:D[Y],M=(()=>(0,l.isGroupContent)(ee)?(0,l.traverseGroupContent)({path:v.concat([{key:"primary",type:"primary"},{key:Y,type:"Widget"}]),key:Y,apiId:Y,content:ee,model:(G==null?void 0:G.type)===s.GroupFieldType?G:void 0})(F):(0,d.isNestableContent)(ee)?F({path:v.concat([{key:"primary",type:"primary"},{key:Y,type:"Widget"}]),key:Y,apiId:Y,model:G,content:ee}):void 0)();return M?((0,m.isSlicePrimaryContent)(M)||console.warn(`Warn: Non nestable or group content with key [${Y}] detected in a shared slice [${y}] with key [${S}]`),{...K,[Y]:M}):K},{}),P=(0,l.traverseGroupItemsContent)({path:v.concat([{key:"items",type:"items"}]),model:T==null?void 0:T.fields.items,content:w.widget.items})(F);return k({key:S,apiId:y,path:v,model:T,content:{...w,widget:{__TYPE__:"SharedSliceContent",variation:w.widget.variation,primary:$,items:P}}})}}e.traverseSharedSliceContent=x}(Qb)),Qb}var Tr={},PF;function Fm(){if(PF)return Tr;PF=1,Object.defineProperty(Tr,"__esModule",{value:!0}),Tr.migrateSimpleSlice=Tr.traverseSimpleSliceContent=Tr.SimpleSliceLegacy=Tr.isSimpleSliceContent=Tr.SimpleSliceContent=void 0;const t=(0,Q.__importStar)(Z),n=Va(),r=Lo();Tr.SimpleSliceContent=t.union([r.NestableContent,n.GroupContent]);const i=u=>(0,r.isNestableContent)(u)||(0,n.isGroupContent)(u);Tr.isSimpleSliceContent=i;const o=u=>({decode:(()=>u.fieldType==="Group"?(0,n.GroupLegacy)(u).decode.bind(null):(0,r.NestableLegacy)(u).decode.bind(null))(),encode:c=>{switch(c.__TYPE__){case"GroupContentType":return(0,n.GroupLegacy)(u).encode(c);default:return(0,r.NestableLegacy)(u).encode(c)}}});Tr.SimpleSliceLegacy=o;function a({path:u,sliceKey:c,sliceName:l,model:d,content:p}){return(A,m)=>{if((0,n.isGroupContent)(p.widget)){const _=(0,n.traverseGroupContent)({path:u,key:p.key,apiId:p.name,model:(()=>{if((d==null?void 0:d.type)==="Group")return d;if((d==null?void 0:d.type)==="SharedSlice")return{type:"Group",config:{fields:d.fields.items||{}}}})(),content:p.widget})(A);return _&&m({key:p.key,apiId:p.name,path:u,model:d,content:{...p,widget:_}})}const g=A({key:p.key,apiId:p.name,path:u,model:(()=>{var _;if((d==null?void 0:d.type)==="SharedSlice")return(_=d.fields.primary)===null||_===void 0?void 0:_[p.name];if((d==null?void 0:d.type)!=="Group")return d})(),content:p.widget});return g&&m({key:c,apiId:l,path:u,model:d,content:{...p,widget:g}})}}Tr.traverseSimpleSliceContent=a;function s(u,c){var l;const[,d]=c.key.split("$"),p=`${u.sliceName}$${d}`;return c.widget.__TYPE__==="GroupContentType"?{key:p,name:u.sliceName,maybeLabel:c.maybeLabel,widget:{__TYPE__:"SharedSliceContent",variation:u.variationId,primary:{},items:c.widget.value.map(A=>({__TYPE__:"GroupItemContent",value:A.value.reduce((m,[g,_])=>{var b;return!((b=u.fields.items)===null||b===void 0)&&b[g]?m.concat([[g,_]]):m},[])}),[])}}:{key:p,name:u.sliceName,maybeLabel:c.maybeLabel,widget:{__TYPE__:"SharedSliceContent",variation:u.variationId,primary:!((l=u.fields.primary)===null||l===void 0)&&l[c.name]?{[c.name]:c.widget}:{},items:[]}}}return Tr.migrateSimpleSlice=s,Tr}var DF;function bq(){return DF||(DF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SliceContent=e.SliceLegacy=void 0;const t=Q,n=(0,t.__importStar)(Z),r=Rm(),i=Om(),o=Fm(),a=s=>({decode:u=>(()=>{switch(s.fieldType){case"Slice":return(0,r.CompositeSliceLegacy)(s);case"SharedSlice":return(0,i.SharedSliceLegacy)(s);default:return(0,o.SimpleSliceLegacy)(s)}})().decode(u),encode:u=>{switch(u.__TYPE__){case"SharedSliceContent":return(0,i.SharedSliceLegacy)(s).encode(u);case"CompositeSliceContent":return(0,r.CompositeSliceLegacy)(s).encode(u);default:return(0,o.SimpleSliceLegacy)(s).encode(u)}}});e.SliceLegacy=a,e.SliceContent=n.union([r.CompositeSliceContent,i.SharedSliceContent,o.SimpleSliceContent]),(0,t.__exportStar)(Rm(),e),(0,t.__exportStar)(Om(),e),(0,t.__exportStar)(Fm(),e),(0,t.__exportStar)(yq(),e)}(qb)),qb}var pn={},WF;function Cq(){if(WF)return pn;WF=1,Object.defineProperty(pn,"__esModule",{value:!0}),pn.migrateSliceItem=pn.SlicesItemLegacy=pn.sliceItemContentWithDefaultValues=pn.isSimpleSliceItemContent=pn.isCompositeSliceItemContent=pn.isSharedSliceItemContent=pn.SliceItemContent=void 0;const e=Q,t=lt,n=ln,r=Ge,i=(0,e.__importStar)(Z),o=Xe,a=Qn,s=Va(),u=Lo(),c=K0(),l=bq(),d=Rm(),p=Om(),A=Fm();pn.SliceItemContent=i.type({key:i.string,name:i.string,maybeLabel:i.union([i.string,i.undefined]),widget:l.SliceContent});function m(S){return(0,p.isSharedSliceContent)(S.widget)}pn.isSharedSliceItemContent=m;function g(S){return(0,d.isCompositeSliceContent)(S.widget)}pn.isCompositeSliceItemContent=g;function _(S){return(0,s.isGroupContent)(S.widget)||(0,u.isNestableContent)(S.widget)}pn.isSimpleSliceItemContent=_;function b(S,y){var T;if(S.type==="SharedSlice"&&(0,p.isSharedSliceContent)(y))return(0,l.sharedSliceContentWithDefaultValues)(S,y);if(S.type==="Slice"&&(0,d.isCompositeSliceContent)(y))return(0,l.compositeSliceContentWithDefaultValues)(S,y);if(S.type==="Group"&&(0,s.isGroupContent)(y)&&(!((T=S.config)===null||T===void 0)&&T.fields)){const w=(0,c.repeatableContentWithDefaultNestableContentValues)(S.config.fields,y.value);return{...y,value:w}}return y}pn.sliceItemContentWithDefaultValues=b;const I=i.exact(i.intersection([i.type({key:i.string,value:i.unknown}),i.partial({label:(0,o.nullable)(i.string)})])),x=S=>new i.Type("SlicesItemLegacy",y=>((0,p.isSharedSliceContent)(y.widget),(0,d.isCompositeSliceContent)(y.widget),(0,A.isSimpleSliceContent)(y.widget)),(y,T)=>(0,r.pipe)(I.decode(y),t.either.chain(w=>{var F;const k=w.key.indexOf("$"),$=w.key.substring(0,k>0?k:void 0),P=(0,a.getFieldCtx)($,S),K=(0,l.SliceLegacy)(P).decode(w.value);return!K||(0,n.isLeft)(K)?i.failure(y,T):i.success({key:w.key,name:$,maybeLabel:(F=w.label)!==null&&F!==void 0?F:void 0,widget:K.right})})),y=>{const T=(0,a.getFieldCtx)(y.name,S),w=(0,l.SliceLegacy)(T).encode(y.widget);return{content:{key:y.key,label:y.maybeLabel,value:(w==null?void 0:w.content)||{}},types:(w==null?void 0:w.types)||{}}});pn.SlicesItemLegacy=x;const v=({model:S,content:y})=>g(y)&&(S==null?void 0:S.type)==="SharedSlice"?(0,d.migrateCompositeSlice)(S,y):_(y)&&(S==null?void 0:S.type)==="SharedSlice"?(0,A.migrateSimpleSlice)(S,y):y;return pn.migrateSliceItem=v,pn}var zb={},KF;function ixe(){return KF||(KF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.traverseSlices=e.slicesContentWithDefaultValues=e.SlicesContent=e.SlicesLegacy=e.isSlicesContent=e.SlicesContentType=void 0;const t=Q,n=lt,r=Ge,i=(0,t.__importStar)(Z),o=Ah,a=fe,s=Dt(),u=Rm(),c=Om(),l=Fm(),d=Cq();e.SlicesContentType="SliceContentType";const p=b=>(0,s.hasContentType)(b)&&b.__TYPE__===e.SlicesContentType;e.isSlicesContent=p;const A=b=>{const I=i.array((0,d.SlicesItemLegacy)(b));return new i.Type("SlicesLegacy",e.isSlicesContent,x=>(0,r.pipe)(I.decode(x),n.either.map(v=>({__TYPE__:e.SlicesContentType,value:v}))),x=>{const v=I.encode(x.value);return{content:v.map(S=>S.content),types:v.reduce((S,y)=>({...S,...y.types}),{[b.keyOfType]:"Slices"})}})};e.SlicesLegacy=A,e.SlicesContent=i.type({__TYPE__:i.literal(e.SlicesContentType),value:i.array(d.SliceItemContent)});function m(b,I){var x;const v=(x=b==null?void 0:b.config)===null||x===void 0?void 0:x.choices;if(v===void 0)return I;const S=I.value.map(y=>{const T=v[y.name];if(T){const w=(0,d.sliceItemContentWithDefaultValues)(T,y.widget);return{...y,widget:w}}return y});return{...I,value:S}}e.slicesContentWithDefaultValues=m;function g(b,I,x){var v,S;const y=(S=(v=I==null?void 0:I.config)===null||v===void 0?void 0:v.choices)===null||S===void 0?void 0:S[x.name],T=()=>{if((0,d.isSharedSliceItemContent)(x)&&y&&(0,a.isStaticSharedSlice)(y)){const k=y.variations.find($=>$.id===x.widget.variation);return k?{type:"SharedSlice",sliceName:y.id,variationId:k.id,fields:{primary:k.primary||{},items:k.items||{}}}:void 0}},w=()=>{var k;const $=o.ContentPath.append(o.ContentPath.serialize(b),x.name),P=Object.values(((k=I==null?void 0:I.config)===null||k===void 0?void 0:k.choices)||{}).find(Y=>{var ee;return(0,a.isStaticSharedSlice)(Y)?!!(!((ee=Y.legacyPaths)===null||ee===void 0)&&ee[$]):!1});if(!P)return;const K=P==null?void 0:P.variations.find(Y=>{var ee;return Y.id===((ee=P.legacyPaths)===null||ee===void 0?void 0:ee[$])});if(K)return{type:"SharedSlice",sliceName:P.id,variationId:K.id,fields:{primary:K.primary||{},items:K.items||{}}}},F=()=>{if(y){if((0,a.isCompositeSlice)(y))return{type:"Slice","non-repeat":y["non-repeat"]||{},repeat:y.repeat||{}};if((0,a.isLegacySlice)(y))return y}};return T()||w()||F()}function _({path:b,key:I,model:x,content:v}){return({transformWidget:S=({content:T})=>T,transformSlice:y=({content:T})=>T})=>{const T=v.value.reduce((w,F)=>{const k=x&&g(b,x,F),$=(()=>{if((0,d.isSharedSliceItemContent)(F))return(0,c.traverseSharedSliceContent)({path:b.concat({key:F.key,type:"SharedSlice"}),sliceKey:F.key,sliceName:F.name,model:(k==null?void 0:k.type)==="SharedSlice"?k:void 0,content:F})(S,y);if((0,d.isCompositeSliceItemContent)(F))return(0,u.traverseCompositeSliceContent)({path:b.concat({key:F.key,type:"Slice"}),sliceKey:F.key,sliceName:F.name,model:(k==null?void 0:k.type)==="Slice"||(k==null?void 0:k.type)==="SharedSlice"?k:void 0,content:F})(S,y);if((0,d.isSimpleSliceItemContent)(F))return(0,l.traverseSimpleSliceContent)({path:b.concat({key:F.key,type:"LegacySlice"}),sliceKey:F.key,sliceName:F.name,model:k&&(k==null?void 0:k.type)!=="Slice"?k:void 0,content:F})(S,y)})();return $?w.concat($):w},[]);return S({path:b,key:I,apiId:I,model:x,content:{__TYPE__:v.__TYPE__,value:T}})}}e.traverseSlices=_}(zb)),zb}var NF;function Sq(){return NF||(NF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Q;(0,t.__exportStar)(bq(),e),(0,t.__exportStar)(Cq(),e),(0,t.__exportStar)(ixe(),e)}(Nb)),Nb}var Hb={},qF;function _q(){return qF||(qF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.UIDContent=e.UIDLegacy=e.isUIDContent=e.UIDContentType=void 0;const t=Q,n=lt,r=Ge,i=(0,t.__importStar)(Z),o=Dt();e.UIDContentType="UIDContent";const a=u=>(0,o.hasContentType)(u)&&u.__TYPE__===e.UIDContentType;e.isUIDContent=a;const s=u=>new i.Type("UIDLegacy",e.isUIDContent,c=>(0,r.pipe)(i.string.decode(c),n.either.map(l=>e.UIDContent.encode({value:l,__TYPE__:e.UIDContentType}))),c=>({content:c.value,types:{[u.keyOfType]:"UID"}}));e.UIDLegacy=s,e.UIDContent=i.type({__TYPE__:i.literal(e.UIDContentType),value:i.string})}(Hb)),Hb}var No={},VF;function oxe(){if(VF)return No;VF=1,Object.defineProperty(No,"__esModule",{value:!0}),No.WidgetLegacy=No.isWidgetContent=No.WidgetContent=void 0;const t=(0,Q.__importStar)(Z),n=Va(),r=Lo(),i=Sq(),o=_q();No.WidgetContent=t.union([n.GroupContent,r.NestableContent,o.UIDContent,i.SlicesContent]);const a=u=>(0,n.isGroupContent)(u)||(0,r.isNestableContent)(u)||(0,o.isUIDContent)(u)||(0,i.isSlicesContent)(u);No.isWidgetContent=a;const s=u=>({decode(c){if(!u.fieldType)return;const l=(()=>{switch(u.fieldType){case"UID":return(0,o.UIDLegacy)(u);case"Group":return(0,n.GroupLegacy)(u);case"Choice":case"Slices":return(0,i.SlicesLegacy)(u);default:return(0,r.NestableLegacy)(u)}})();if(l)return l.decode(c)},encode(c){switch(c.__TYPE__){case o.UIDContentType:return(0,o.UIDLegacy)(u).encode(c);case n.GroupContentType:return(0,n.GroupLegacy)(u).encode(c);case i.SlicesContentType:return(0,i.SlicesLegacy)(u).encode(c);default:return(0,r.NestableLegacy)(u).encode(c)}}});return No.WidgetLegacy=s,No}var QF;function OR(){return QF||(QF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Q;(0,t.__exportStar)(fq(),e),(0,t.__exportStar)(Va(),e),(0,t.__exportStar)(Lo(),e),(0,t.__exportStar)(Sq(),e),(0,t.__exportStar)(_q(),e),(0,t.__exportStar)(oxe(),e)}(Sb)),Sb}Object.defineProperty(or,"__esModule",{value:!0});or.migrateDocument=or.collectWidgets=or.traverseDocument=or.fillDocumentWithDefaultValues=or.DocumentLegacy=or.Document=void 0;const axe=Q,Iq=lt,FR=ln,Tq=Ge,Fl=(0,axe.__importStar)(Z),xq=Ah,kR=Lc,kl=fe,_i=OR(),iC=Qn;or.Document=Fl.record(kR.WidgetKey,_i.WidgetContent);const sxe=Fl.record(kR.WidgetKey,Fl.unknown),MR=e=>new Fl.Type("Document",t=>!!t&&typeof t=="object",t=>(0,Tq.pipe)(sxe.decode(t),Iq.either.map(n=>Object.entries(n).reduce((r,[i,o])=>{const a=(0,iC.defaultCtx)(i,e),s=(0,_i.WidgetLegacy)(a).decode(o);return!s||(0,FR.isLeft)(s)?r:{...r,[i]:s.right}},{}))),t=>Object.entries(t).reduce((n,[r,i])=>{const o=(0,iC.defaultCtx)(r,e),a=(0,_i.WidgetLegacy)(o).encode(i);return a?{content:{...n.content,[r]:a.content},types:{...n.types,...a.types}}:n},{content:{},types:{}}));function wq(e){const t=Object.entries(e),{types:n,widgets:r}=t.reduce((a,[s,u])=>{if(s.endsWith("_TYPE")){const c=iC.FieldOrSliceType.decode(u);if((0,FR.isRight)(c))return{...a,types:a.types.set(s.substring(0,s.length-5),c.right)}}return!s.endsWith("_POSITION")&&!s.endsWith("_TYPE")?{...a,widgets:{...a.widgets,[s]:u}}:a},{types:new Map,widgets:{}}),i=e.slugs_INTERNAL||[],o=e.uid;return{widgets:r,types:n,uid:o,slugs:i}}function uxe(e,t){const n=(0,Tq.pipe)(Fl.record(kR.WidgetKey,Fl.unknown).decode(e),Iq.either.chain(r=>{const{types:i,widgets:o}=wq(r);return MR(i).decode(o)}));return(0,FR.isLeft)(n)?void 0:Eq(n.right,t)}function cxe(e){const t=MR().encode(e);return{...t.content,...t.types}}or.DocumentLegacy={_codec:MR,extractMetadata:wq,parse:uxe,encode:cxe};function LR(e){return{customTypeId:e==null?void 0:e.id,fields:Object.fromEntries((0,kl.flattenSections)(e))}}function lxe(e,t){const{fields:n}=e&&kl.StaticCustomType.is(e)?LR(e):e;return Object.entries(n).reduce((r,[i,o])=>{const a=t[i],s=(()=>{switch(o.type){case"Group":return(0,_i.isGroupContent)(a)?(0,_i.groupContentWithDefaultValues)(o,a):a;case"Choice":case"Slices":return(0,_i.isSlicesContent)(a)?(0,_i.slicesContentWithDefaultValues)(o,a):a;default:return a===void 0&&kl.NestableWidget.is(o)?(0,_i.NestableContentDefaultValue)(o):a}})();return s?{...r,[i]:s}:r},t)}or.fillDocumentWithDefaultValues=lxe;function jR({document:e,customType:t}){const n=t&&kl.StaticCustomType.is(t)?LR(t):t;return({transformWidget:r=({content:o})=>o,transformSlice:i=({content:o})=>o})=>{const o=n&&Object.entries(n.fields).reduce((a,[s,u])=>({...a,[s]:u}),{});return Object.entries(e).reduce((a,[s,u])=>{const c=o&&o[s],l=xq.ContentPath.make([{key:n==null?void 0:n.customTypeId,type:"CustomType"},{key:s,type:"Widget"}]),d=(()=>{switch(u.__TYPE__){case"SliceContentType":return(0,_i.traverseSlices)({path:l,key:s,model:(c==null?void 0:c.type)==="Slices"||(c==null?void 0:c.type)==="Choice"?c:void 0,content:u})({transformWidget:r,transformSlice:i});case"GroupContentType":return(0,_i.traverseGroupContent)({path:l,key:s,apiId:s,model:(c==null?void 0:c.type)==="Group"?c:void 0,content:u})(r);default:return r({path:l,key:s,apiId:s,model:(c==null?void 0:c.type)!=="Group"&&(c==null?void 0:c.type)!=="Slices"&&(c==null?void 0:c.type)!=="Choice"?c:void 0,content:u})}})();return{...a,...d?{[s]:d}:{}}},{})}}or.traverseDocument=jR;function fxe(e,t){const n={};return jR({document:e})({transformWidget:({content:r,path:i})=>{const o=xq.ContentPath.serialize(i);return t(r,i)&&(n[o]=r),r}}),n}or.collectWidgets=fxe;function Eq(e,t){const n=kl.StaticCustomType.is(t)?LR(t):t;return Object.values((0,kl.collectSharedSlices)(n)).some(i=>!!i.legacyPaths)?jR({document:e,customType:t})({transformSlice:_i.migrateSliceItem}):e}or.migrateDocument=Eq;(function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Q;(0,t.__exportStar)(or,e),(0,t.__exportStar)(OR(),e),(0,t.__exportStar)(Qn,e)})(ye);function dxe(e,t){const n=pxe(e,t),r=Axe(e,n);return ye.fillDocumentWithDefaultValues(e,r)}function pxe(e,t){return fe.flattenSections(e).reduce((r,[i,o])=>!t[i]&&o.type==="Group"?{...r,[i]:$q}:r,t)}function Axe(e,t){return ye.traverseDocument({document:t,customType:e})({transformWidget({model:n,content:r}){return n?r:void 0},transformSlice(n){return n.model?n.content:void 0}})}const $q={__TYPE__:"GroupContentType",value:[{__TYPE__:"GroupItemContent",value:[]}]},Rq={unclassified:{title:"Draft",color:"amber"},published:{title:"Live",color:"green"},release:{title:"Planned",color:"purple"},archived:{title:"Archived",color:"grey"}},Oq={unclassified:["unclassified","published"],archived:["unclassified","published"],release:["release","published"],published:["published"]};function UR(e){const{documentId:t,versionId:n,baseUrl:r,status:i,releaseId:o}=e,a={s:i,v:n,r:o},s=Fr.createRouteParams({params:a}),u=new URLSearchParams(s).toString();return new URL(`pages/${t}?${u}`,r)}function Fq(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var hxe=xe.createContext(Fq()),mxe=({children:e})=>{const[t]=xe.useState(()=>Fq());return f.jsx(hxe.Provider,{value:t,children:typeof e=="function"?e(t):e})};function gxe(e){const{children:t,...n}=e;return f.jsx(mxe,{children:({reset:r})=>f.jsx(h.ErrorBoundary,{...n,onReset:r,children:t})})}const vxe="media-library-",zF=`${vxe}newMediaLibraryFeaturesBannerClosed`;function kq(e){const{maxWidth:t}=e,[n,r]=E.useState(()=>!(Id.localStorage.isAvailable()&&Id.localStorage.read(zF)));function i(){r(!1),Id.localStorage.isAvailable()&&Id.localStorage.write(zF,String(Date.now()))}return n?f.jsx(h.Box,{justifyContent:"center",padding:{inline:16,block:12},backgroundColor:"purple9",children:f.jsxs(h.Box,{maxWidth:t,width:"100%",alignItems:"center",gap:8,children:[f.jsx(h.CircleIcon,{color:"purple",name:"autoFixHigh",size:"extraSmall",variant:"solid"}),f.jsxs("div",{children:[f.jsx(h.Text,{color:"white",variant:"bold",children:"New features on the Media Library now available!"}),f.jsxs(h.Box,{gap:4,flexWrap:"wrap",children:[f.jsx(h.Text,{color:"white",children:"Media Tagging, Filtering, Improved Search & Bulk Deletion"}),f.jsx(h.Text,{color:"white",variant:"bold",href:"https://prismic.io/lp/new-media-library",target:"_blank",rel:"noopener noreferrer",underline:!0,children:"Find out More →"})]})]}),f.jsx(h.Button,{invisible:!0,color:"white",sx:{marginLeft:"auto",marginBottom:"auto",flexShrink:0},underline:!0,onClick:i,children:"Close"})]})}):null}const Mq=E.createContext(void 0),yxe={selectedIds:new Set,excludedIds:new Set,isAllSelected:!1};function Lq(e){const{children:t,initialState:n,initialTotalItemCount:r,isSelectAllEnabled:i=!1}=e,o=E.useRef(),a=E.useRef(r||0);function s(){if(n&&n.selectedIds){const T=[...n.selectedIds].pop();T&&(o.current=T)}return{...yxe,...n}}const[u,c]=E.useState(s),l=E.useMemo(()=>{const{selectedIds:T,excludedIds:w,isAllSelected:F}=u;return F?a.current-w.size:T.size},[u]),d=E.useCallback(T=>{const{isAllSelected:w,selectedIds:F,excludedIds:k}=u;return w?!k.has(T):F.has(T)},[u]),p=E.useCallback(()=>{const{isAllSelected:T,selectedIds:w,excludedIds:F}=u;return{selectedIds:[...w],excludedIds:[...F],isAllSelected:T,selectedCount:l}},[u,l]),A=Pe.useStableCallback(()=>{i&&c({isAllSelected:!0,selectedIds:new Set,excludedIds:new Set})}),m=Pe.useStableCallback(()=>{c({isAllSelected:!1,selectedIds:new Set,excludedIds:new Set})});E.useEffect(()=>{const{isAllSelected:T,selectedIds:w,excludedIds:F}=u,k=a.current;if(!(k===0||!i)){if(T&&F.size===k){m();return}if(!T&&w.size===k){A();return}}},[u,i,A,m]);const g=Pe.useStableCallback(T=>{const{id:w,isSingleSelection:F,metaKey:k,shiftKey:$,ids:P}=T;return $&&P&&P.length>0&&o.current?b(w,P,o.current):F&&!k?_(w):d(w)?v([w]):x([w]),o.current=w,d(w)});function _(T){d(T)&&l===1?c(w=>({...w,selectedIds:new Set})):c({isAllSelected:!1,selectedIds:new Set([T]),excludedIds:new Set})}function b(T,w,F){const k=bxe(w,F,T),$=d(T);return $?v(k):x(k),$}const I=Pe.useStableCallback(()=>{l>0?m():A()});function x(T){const{isAllSelected:w}=u;if(w){c(F=>({...F,excludedIds:HF(F.excludedIds,T)}));return}c(F=>({...F,selectedIds:YF(F.selectedIds,T)}))}function v(T){const{isAllSelected:w}=u;if(w){c(F=>({...F,excludedIds:YF(F.excludedIds,T)}));return}c(F=>({...F,selectedIds:HF(F.selectedIds,T)}))}function S(T){a.current=T}const y=E.useMemo(()=>({selectedCount:l,state:u,totalItemCount:a.current,isSelected:d,isSelectAllEnabled:i,getSelectionState:p,toggleSelection:g,toggleSelectAll:I,clearSelection:m,setTotalItemCount:S}),[u,m,p,i,d,l,I,g]);return f.jsx(Mq.Provider,{value:y,children:t})}function qs(e){const t=E.useContext(Mq);if(t===void 0)throw new Error("useSelectionManagerContext must be used within a SelectionManagerProvider");const{totalItemCount:n,onChangeSelection:r}=e||{},{setTotalItemCount:i,totalItemCount:o,state:a,getSelectionState:s,...u}=t;n!==void 0&&n!==o&&i(n);const c=Pe.useStableCallback(r);return E.useEffect(()=>{c==null||c(s())},[s,c,a]),{...u,getSelectionState:s,isAllSelected:a.isAllSelected}}function bxe(e,t,n){const r=e.indexOf(t),i=e.indexOf(n);if(r===-1||i===-1)throw new Error("Both startValue and endValue must be in the array");return r<=i?e.slice(r,i+1):e.slice(i,r+1)}function HF(e,t){const n=new Set(e);return t.forEach(r=>n.delete(r)),n}function YF(e,t){return new Set([...e,...t])}const N0=E.createContext(void 0);function Te(){const e=E.useContext(N0);if(!e)throw new Error("Missing EditorConfigContext.Provider");return e}class oC extends Error{}function Ht(e){throw new oC(`Missing EditorConfig.${e}`)}function Cxe(){if(new URL(location.href).searchParams.has("debug"))return;const n=console.error.bind(console);console.error=(...r)=>{r[0]instanceof oC||Sxe(r)||n(...r)},window.addEventListener("error",r=>{r.error instanceof oC&&r.preventDefault(),_xe(r.error)&&r.preventDefault()})}function Sxe(e){const t="Warning: flushSync was called from inside a lifecycle method",n=typeof e[0]=="string"&&e[0].includes(t),r=typeof e[1]=="string"&&e[1].includes("RichTextField");return n&&r}function _xe(e){const t=/Invalid content for node document: <(bulletList|orderedList)\(listItem*/,n=e.message;return!!(typeof n=="string"&&n.match(t))}var He;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const o={};for(const a of i)o[a]=a;return o},e.getValidEnumValues=i=>{const o=e.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),a={};for(const s of o)a[s]=i[s];return e.objectValues(a)},e.objectValues=i=>e.objectKeys(i).map(function(o){return i[o]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const o=[];for(const a in i)Object.prototype.hasOwnProperty.call(i,a)&&o.push(a);return o},e.find=(i,o)=>{for(const a of i)if(o(a))return a},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,o=" | "){return i.map(a=>typeof a=="string"?`'${a}'`:a).join(o)}e.joinValues=r,e.jsonStringifyReplacer=(i,o)=>typeof o=="bigint"?o.toString():o})(He||(He={}));var aC;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(aC||(aC={}));const ne=He.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Za=e=>{switch(typeof e){case"undefined":return ne.undefined;case"string":return ne.string;case"number":return isNaN(e)?ne.nan:ne.number;case"boolean":return ne.boolean;case"function":return ne.function;case"bigint":return ne.bigint;case"symbol":return ne.symbol;case"object":return Array.isArray(e)?ne.array:e===null?ne.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ne.promise:typeof Map<"u"&&e instanceof Map?ne.map:typeof Set<"u"&&e instanceof Set?ne.set:typeof Date<"u"&&e instanceof Date?ne.date:ne.object;default:return ne.unknown}},J=He.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"]),Ixe=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Ei extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(o){return o.message},r={_errors:[]},i=o=>{for(const a of o.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let s=r,u=0;for(;u<a.path.length;){const c=a.path[u];u===a.path.length-1?(s[c]=s[c]||{_errors:[]},s[c]._errors.push(n(a))):s[c]=s[c]||{_errors:[]},s=s[c],u++}}};return i(this),r}toString(){return this.message}get message(){return JSON.stringify(this.issues,He.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Ei.create=e=>new Ei(e);const ip=(e,t)=>{let n;switch(e.code){case J.invalid_type:e.received===ne.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case J.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,He.jsonStringifyReplacer)}`;break;case J.unrecognized_keys:n=`Unrecognized key(s) in object: ${He.joinValues(e.keys,", ")}`;break;case J.invalid_union:n="Invalid input";break;case J.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${He.joinValues(e.options)}`;break;case J.invalid_enum_value:n=`Invalid enum value. Expected ${He.joinValues(e.options)}, received '${e.received}'`;break;case J.invalid_arguments:n="Invalid function arguments";break;case J.invalid_return_type:n="Invalid function return type";break;case J.invalid_date:n="Invalid date";break;case J.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(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}"`:He.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case J.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case J.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case J.custom:n="Invalid input";break;case J.invalid_intersection_types:n="Intersection results could not be merged";break;case J.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case J.not_finite:n="Number must be finite";break;default:n=t.defaultError,He.assertNever(e)}return{message:n}};let jq=ip;function Txe(e){jq=e}function km(){return jq}const Mm=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,o=[...n,...i.path||[]],a={...i,path:o};let s="";const u=r.filter(c=>!!c).slice().reverse();for(const c of u)s=c(a,{data:t,defaultError:s}).message;return{...i,path:o,message:i.message||s}},xxe=[];function oe(e,t){const n=Mm({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,km(),ip].filter(r=>!!r)});e.common.issues.push(n)}class Ln{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return we;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n)r.push({key:await i.key,value:await i.value});return Ln.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:o,value:a}=i;if(o.status==="aborted"||a.status==="aborted")return we;o.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),(typeof a.value<"u"||i.alwaysSet)&&(r[o.value]=a.value)}return{status:t.value,value:r}}}const we=Object.freeze({status:"aborted"}),Uq=e=>({status:"dirty",value:e}),Hn=e=>({status:"valid",value:e}),sC=e=>e.status==="aborted",uC=e=>e.status==="dirty",Lm=e=>e.status==="valid",jm=e=>typeof Promise<"u"&&e instanceof Promise;var pe;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(pe||(pe={}));class po{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}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}}const GF=(e,t)=>{if(Lm(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Ei(e.common.issues);return this._error=n,this._error}}};function $e(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(a,s)=>a.code!=="invalid_type"?{message:s.defaultError}:typeof s.data>"u"?{message:r??s.defaultError}:{message:n??s.defaultError},description:i}}class Fe{constructor(t){this.spa=this.safeParseAsync,this._def=t,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(t){return Za(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Za(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Ln,ctx:{common:t.parent.common,data:t.data,parsedType:Za(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(jm(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const i={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Za(t)},o=this._parseSync({data:t,path:i.path,parent:i});return GF(i,o)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Za(t)},i=this._parse({data:t,path:r.path,parent:r}),o=await(jm(i)?i:Promise.resolve(i));return GF(r,o)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,o)=>{const a=t(i),s=()=>o.addIssue({code:J.custom,...r(i)});return typeof Promise<"u"&&a instanceof Promise?a.then(u=>u?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new Li({schema:this,typeName:be.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Xo.create(this,this._def)}nullable(){return Mu.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return $i.create(this,this._def)}promise(){return Ll.create(this,this._def)}or(t){return up.create([this,t],this._def)}and(t){return cp.create(this,t,this._def)}transform(t){return new Li({...$e(this._def),schema:this,typeName:be.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Ap({...$e(this._def),innerType:this,defaultValue:n,typeName:be.ZodDefault})}brand(){return new Pq({typeName:be.ZodBranded,type:this,...$e(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Dm({...$e(this._def),innerType:this,catchValue:n,typeName:be.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Sh.create(this,t)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const wxe=/^c[^\s-]{8,}$/i,Exe=/^[a-z][a-z0-9]*$/,$xe=/[0-9A-HJKMNP-TV-Z]{26}/,Rxe=/^([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,Oxe=/^(([^<>()[\]\\.,;:\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,})+))$/,Fxe=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u"),kxe=/^(((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}))$/,Mxe=/^(([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})))$/,Lxe=e=>e.precision?e.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`):e.precision===0?e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function jxe(e,t){return!!((t==="v4"||!t)&&kxe.test(e)||(t==="v6"||!t)&&Mxe.test(e))}class xi extends Fe{constructor(){super(...arguments),this._regex=(t,n,r)=>this.refinement(i=>t.test(i),{validation:n,code:J.invalid_string,...pe.errToObj(r)}),this.nonempty=t=>this.min(1,pe.errToObj(t)),this.trim=()=>new xi({...this._def,checks:[...this._def.checks,{kind:"trim"}]}),this.toLowerCase=()=>new xi({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]}),this.toUpperCase=()=>new xi({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ne.string){const o=this._getOrReturnCtx(t);return oe(o,{code:J.invalid_type,expected:ne.string,received:o.parsedType}),we}const r=new Ln;let i;for(const o of this._def.checks)if(o.kind==="min")t.data.length<o.value&&(i=this._getOrReturnCtx(t,i),oe(i,{code:J.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="max")t.data.length>o.value&&(i=this._getOrReturnCtx(t,i),oe(i,{code:J.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){const a=t.data.length>o.value,s=t.data.length<o.value;(a||s)&&(i=this._getOrReturnCtx(t,i),a?oe(i,{code:J.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):s&&oe(i,{code:J.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if(o.kind==="email")Oxe.test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{validation:"email",code:J.invalid_string,message:o.message}),r.dirty());else if(o.kind==="emoji")Fxe.test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{validation:"emoji",code:J.invalid_string,message:o.message}),r.dirty());else if(o.kind==="uuid")Rxe.test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{validation:"uuid",code:J.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid")wxe.test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{validation:"cuid",code:J.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid2")Exe.test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{validation:"cuid2",code:J.invalid_string,message:o.message}),r.dirty());else if(o.kind==="ulid")$xe.test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{validation:"ulid",code:J.invalid_string,message:o.message}),r.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),oe(i,{validation:"url",code:J.invalid_string,message:o.message}),r.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{validation:"regex",code:J.invalid_string,message:o.message}),r.dirty())):o.kind==="trim"?t.data=t.data.trim():o.kind==="includes"?t.data.includes(o.value,o.position)||(i=this._getOrReturnCtx(t,i),oe(i,{code:J.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),r.dirty()):o.kind==="toLowerCase"?t.data=t.data.toLowerCase():o.kind==="toUpperCase"?t.data=t.data.toUpperCase():o.kind==="startsWith"?t.data.startsWith(o.value)||(i=this._getOrReturnCtx(t,i),oe(i,{code:J.invalid_string,validation:{startsWith:o.value},message:o.message}),r.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(i=this._getOrReturnCtx(t,i),oe(i,{code:J.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()):o.kind==="datetime"?Lxe(o).test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{code:J.invalid_string,validation:"datetime",message:o.message}),r.dirty()):o.kind==="ip"?jxe(t.data,o.version)||(i=this._getOrReturnCtx(t,i),oe(i,{validation:"ip",code:J.invalid_string,message:o.message}),r.dirty()):He.assertNever(o);return{status:r.value,value:t.data}}_addCheck(t){return new xi({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...pe.errToObj(t)})}url(t){return this._addCheck({kind:"url",...pe.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...pe.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...pe.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...pe.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...pe.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...pe.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...pe.errToObj(t)})}datetime(t){var n;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,...pe.errToObj(t==null?void 0:t.message)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...pe.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...pe.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...pe.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...pe.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...pe.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...pe.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...pe.errToObj(n)})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}xi.create=e=>{var t;return new xi({checks:[],typeName:be.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...$e(e)})};function Uxe(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,o=parseInt(e.toFixed(i).replace(".","")),a=parseInt(t.toFixed(i).replace(".",""));return o%a/Math.pow(10,i)}class ls extends Fe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==ne.number){const o=this._getOrReturnCtx(t);return oe(o,{code:J.invalid_type,expected:ne.number,received:o.parsedType}),we}let r;const i=new Ln;for(const o of this._def.checks)o.kind==="int"?He.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),oe(r,{code:J.invalid_type,expected:"integer",received:"float",message:o.message}),i.dirty()):o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(r=this._getOrReturnCtx(t,r),oe(r,{code:J.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),oe(r,{code:J.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?Uxe(t.data,o.value)!==0&&(r=this._getOrReturnCtx(t,r),oe(r,{code:J.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),oe(r,{code:J.not_finite,message:o.message}),i.dirty()):He.assertNever(o);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,pe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,pe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,pe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,pe.toString(n))}setLimit(t,n,r,i){return new ls({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:pe.toString(i)}]})}_addCheck(t){return new ls({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:pe.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:pe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:pe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:pe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:pe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:pe.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:pe.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:pe.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:pe.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&He.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}ls.create=e=>new ls({checks:[],typeName:be.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...$e(e)});class fs extends Fe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==ne.bigint){const o=this._getOrReturnCtx(t);return oe(o,{code:J.invalid_type,expected:ne.bigint,received:o.parsedType}),we}let r;const i=new Ln;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(r=this._getOrReturnCtx(t,r),oe(r,{code:J.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),oe(r,{code:J.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),oe(r,{code:J.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):He.assertNever(o);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,pe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,pe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,pe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,pe.toString(n))}setLimit(t,n,r,i){return new fs({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:pe.toString(i)}]})}_addCheck(t){return new fs({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:pe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:pe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:pe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:pe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:pe.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}fs.create=e=>{var t;return new fs({checks:[],typeName:be.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...$e(e)})};class op extends Fe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ne.boolean){const r=this._getOrReturnCtx(t);return oe(r,{code:J.invalid_type,expected:ne.boolean,received:r.parsedType}),we}return Hn(t.data)}}op.create=e=>new op({typeName:be.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...$e(e)});class Fu extends Fe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ne.date){const o=this._getOrReturnCtx(t);return oe(o,{code:J.invalid_type,expected:ne.date,received:o.parsedType}),we}if(isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return oe(o,{code:J.invalid_date}),we}const r=new Ln;let i;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()<o.value&&(i=this._getOrReturnCtx(t,i),oe(i,{code:J.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),r.dirty()):o.kind==="max"?t.data.getTime()>o.value&&(i=this._getOrReturnCtx(t,i),oe(i,{code:J.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):He.assertNever(o);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Fu({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:pe.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:pe.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Fu.create=e=>new Fu({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:be.ZodDate,...$e(e)});class Um extends Fe{_parse(t){if(this._getType(t)!==ne.symbol){const r=this._getOrReturnCtx(t);return oe(r,{code:J.invalid_type,expected:ne.symbol,received:r.parsedType}),we}return Hn(t.data)}}Um.create=e=>new Um({typeName:be.ZodSymbol,...$e(e)});class ap extends Fe{_parse(t){if(this._getType(t)!==ne.undefined){const r=this._getOrReturnCtx(t);return oe(r,{code:J.invalid_type,expected:ne.undefined,received:r.parsedType}),we}return Hn(t.data)}}ap.create=e=>new ap({typeName:be.ZodUndefined,...$e(e)});class sp extends Fe{_parse(t){if(this._getType(t)!==ne.null){const r=this._getOrReturnCtx(t);return oe(r,{code:J.invalid_type,expected:ne.null,received:r.parsedType}),we}return Hn(t.data)}}sp.create=e=>new sp({typeName:be.ZodNull,...$e(e)});class Ml extends Fe{constructor(){super(...arguments),this._any=!0}_parse(t){return Hn(t.data)}}Ml.create=e=>new Ml({typeName:be.ZodAny,...$e(e)});class du extends Fe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Hn(t.data)}}du.create=e=>new du({typeName:be.ZodUnknown,...$e(e)});class ia extends Fe{_parse(t){const n=this._getOrReturnCtx(t);return oe(n,{code:J.invalid_type,expected:ne.never,received:n.parsedType}),we}}ia.create=e=>new ia({typeName:be.ZodNever,...$e(e)});class Bm extends Fe{_parse(t){if(this._getType(t)!==ne.undefined){const r=this._getOrReturnCtx(t);return oe(r,{code:J.invalid_type,expected:ne.void,received:r.parsedType}),we}return Hn(t.data)}}Bm.create=e=>new Bm({typeName:be.ZodVoid,...$e(e)});class $i extends Fe{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==ne.array)return oe(n,{code:J.invalid_type,expected:ne.array,received:n.parsedType}),we;if(i.exactLength!==null){const a=n.data.length>i.exactLength.value,s=n.data.length<i.exactLength.value;(a||s)&&(oe(n,{code:a?J.too_big:J.too_small,minimum:s?i.exactLength.value:void 0,maximum:a?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(oe(n,{code:J.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(oe(n,{code:J.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,s)=>i.type._parseAsync(new po(n,a,n.path,s)))).then(a=>Ln.mergeArray(r,a));const o=[...n.data].map((a,s)=>i.type._parseSync(new po(n,a,n.path,s)));return Ln.mergeArray(r,o)}get element(){return this._def.type}min(t,n){return new $i({...this._def,minLength:{value:t,message:pe.toString(n)}})}max(t,n){return new $i({...this._def,maxLength:{value:t,message:pe.toString(n)}})}length(t,n){return new $i({...this._def,exactLength:{value:t,message:pe.toString(n)}})}nonempty(t){return this.min(1,t)}}$i.create=(e,t)=>new $i({type:e,minLength:null,maxLength:null,exactLength:null,typeName:be.ZodArray,...$e(t)});function rl(e){if(e instanceof _t){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Xo.create(rl(r))}return new _t({...e._def,shape:()=>t})}else return e instanceof $i?new $i({...e._def,type:rl(e.element)}):e instanceof Xo?Xo.create(rl(e.unwrap())):e instanceof Mu?Mu.create(rl(e.unwrap())):e instanceof Ao?Ao.create(e.items.map(t=>rl(t))):e}class _t extends Fe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=He.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==ne.object){const c=this._getOrReturnCtx(t);return oe(c,{code:J.invalid_type,expected:ne.object,received:c.parsedType}),we}const{status:r,ctx:i}=this._processInputParams(t),{shape:o,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof ia&&this._def.unknownKeys==="strip"))for(const c in i.data)a.includes(c)||s.push(c);const u=[];for(const c of a){const l=o[c],d=i.data[c];u.push({key:{status:"valid",value:c},value:l._parse(new po(i,d,i.path,c)),alwaysSet:c in i.data})}if(this._def.catchall instanceof ia){const c=this._def.unknownKeys;if(c==="passthrough")for(const l of s)u.push({key:{status:"valid",value:l},value:{status:"valid",value:i.data[l]}});else if(c==="strict")s.length>0&&(oe(i,{code:J.unrecognized_keys,keys:s}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const l of s){const d=i.data[l];u.push({key:{status:"valid",value:l},value:c._parse(new po(i,d,i.path,l)),alwaysSet:l in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const c=[];for(const l of u){const d=await l.key;c.push({key:d,value:await l.value,alwaysSet:l.alwaysSet})}return c}).then(c=>Ln.mergeObjectSync(r,c)):Ln.mergeObjectSync(r,u)}get shape(){return this._def.shape()}strict(t){return pe.errToObj,new _t({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,o,a,s;const u=(a=(o=(i=this._def).errorMap)===null||o===void 0?void 0:o.call(i,n,r).message)!==null&&a!==void 0?a:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=pe.errToObj(t).message)!==null&&s!==void 0?s:u}:{message:u}}}:{}})}strip(){return new _t({...this._def,unknownKeys:"strip"})}passthrough(){return new _t({...this._def,unknownKeys:"passthrough"})}extend(t){return new _t({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new _t({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:be.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new _t({...this._def,catchall:t})}pick(t){const n={};return He.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new _t({...this._def,shape:()=>n})}omit(t){const n={};return He.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new _t({...this._def,shape:()=>n})}deepPartial(){return rl(this)}partial(t){const n={};return He.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}),new _t({...this._def,shape:()=>n})}required(t){const n={};return He.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof Xo;)o=o._def.innerType;n[r]=o}}),new _t({...this._def,shape:()=>n})}keyof(){return Bq(He.objectKeys(this.shape))}}_t.create=(e,t)=>new _t({shape:()=>e,unknownKeys:"strip",catchall:ia.create(),typeName:be.ZodObject,...$e(t)});_t.strictCreate=(e,t)=>new _t({shape:()=>e,unknownKeys:"strict",catchall:ia.create(),typeName:be.ZodObject,...$e(t)});_t.lazycreate=(e,t)=>new _t({shape:e,unknownKeys:"strip",catchall:ia.create(),typeName:be.ZodObject,...$e(t)});class up extends Fe{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(o){for(const s of o)if(s.result.status==="valid")return s.result;for(const s of o)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const a=o.map(s=>new Ei(s.ctx.common.issues));return oe(n,{code:J.invalid_union,unionErrors:a}),we}if(n.common.async)return Promise.all(r.map(async o=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(i);{let o;const a=[];for(const u of r){const c={...n,common:{...n.common,issues:[]},parent:null},l=u._parseSync({data:n.data,path:n.path,parent:c});if(l.status==="valid")return l;l.status==="dirty"&&!o&&(o={result:l,ctx:c}),c.common.issues.length&&a.push(c.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;const s=a.map(u=>new Ei(u));return oe(n,{code:J.invalid_union,unionErrors:s}),we}}get options(){return this._def.options}}up.create=(e,t)=>new up({options:e,typeName:be.ZodUnion,...$e(t)});const rm=e=>e instanceof fp?rm(e.schema):e instanceof Li?rm(e.innerType()):e instanceof dp?[e.value]:e instanceof ds?e.options:e instanceof pp?Object.keys(e.enum):e instanceof Ap?rm(e._def.innerType):e instanceof ap?[void 0]:e instanceof sp?[null]:null;class q0 extends Fe{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ne.object)return oe(n,{code:J.invalid_type,expected:ne.object,received:n.parsedType}),we;const r=this.discriminator,i=n.data[r],o=this.optionsMap.get(i);return o?n.common.async?o._parseAsync({data:n.data,path:n.path,parent:n}):o._parseSync({data:n.data,path:n.path,parent:n}):(oe(n,{code:J.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),we)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const i=new Map;for(const o of n){const a=rm(o.shape[t]);if(!a)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of a){if(i.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);i.set(s,o)}}return new q0({typeName:be.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...$e(r)})}}function cC(e,t){const n=Za(e),r=Za(t);if(e===t)return{valid:!0,data:e};if(n===ne.object&&r===ne.object){const i=He.objectKeys(t),o=He.objectKeys(e).filter(s=>i.indexOf(s)!==-1),a={...e,...t};for(const s of o){const u=cC(e[s],t[s]);if(!u.valid)return{valid:!1};a[s]=u.data}return{valid:!0,data:a}}else if(n===ne.array&&r===ne.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let o=0;o<e.length;o++){const a=e[o],s=t[o],u=cC(a,s);if(!u.valid)return{valid:!1};i.push(u.data)}return{valid:!0,data:i}}else return n===ne.date&&r===ne.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class cp extends Fe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=(o,a)=>{if(sC(o)||sC(a))return we;const s=cC(o.value,a.value);return s.valid?((uC(o)||uC(a))&&n.dirty(),{status:n.value,value:s.data}):(oe(r,{code:J.invalid_intersection_types}),we)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,a])=>i(o,a)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}cp.create=(e,t,n)=>new cp({left:e,right:t,typeName:be.ZodIntersection,...$e(n)});class Ao extends Fe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ne.array)return oe(r,{code:J.invalid_type,expected:ne.array,received:r.parsedType}),we;if(r.data.length<this._def.items.length)return oe(r,{code:J.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),we;!this._def.rest&&r.data.length>this._def.items.length&&(oe(r,{code:J.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const o=[...r.data].map((a,s)=>{const u=this._def.items[s]||this._def.rest;return u?u._parse(new po(r,a,r.path,s)):null}).filter(a=>!!a);return r.common.async?Promise.all(o).then(a=>Ln.mergeArray(n,a)):Ln.mergeArray(n,o)}get items(){return this._def.items}rest(t){return new Ao({...this._def,rest:t})}}Ao.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ao({items:e,typeName:be.ZodTuple,rest:null,...$e(t)})};class lp extends Fe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ne.object)return oe(r,{code:J.invalid_type,expected:ne.object,received:r.parsedType}),we;const i=[],o=this._def.keyType,a=this._def.valueType;for(const s in r.data)i.push({key:o._parse(new po(r,s,r.path,s)),value:a._parse(new po(r,r.data[s],r.path,s))});return r.common.async?Ln.mergeObjectAsync(n,i):Ln.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Fe?new lp({keyType:t,valueType:n,typeName:be.ZodRecord,...$e(r)}):new lp({keyType:xi.create(),valueType:t,typeName:be.ZodRecord,...$e(n)})}}class Pm extends Fe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ne.map)return oe(r,{code:J.invalid_type,expected:ne.map,received:r.parsedType}),we;const i=this._def.keyType,o=this._def.valueType,a=[...r.data.entries()].map(([s,u],c)=>({key:i._parse(new po(r,s,r.path,[c,"key"])),value:o._parse(new po(r,u,r.path,[c,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const u of a){const c=await u.key,l=await u.value;if(c.status==="aborted"||l.status==="aborted")return we;(c.status==="dirty"||l.status==="dirty")&&n.dirty(),s.set(c.value,l.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const u of a){const c=u.key,l=u.value;if(c.status==="aborted"||l.status==="aborted")return we;(c.status==="dirty"||l.status==="dirty")&&n.dirty(),s.set(c.value,l.value)}return{status:n.value,value:s}}}}Pm.create=(e,t,n)=>new Pm({valueType:t,keyType:e,typeName:be.ZodMap,...$e(n)});class ku extends Fe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ne.set)return oe(r,{code:J.invalid_type,expected:ne.set,received:r.parsedType}),we;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(oe(r,{code:J.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(oe(r,{code:J.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const o=this._def.valueType;function a(u){const c=new Set;for(const l of u){if(l.status==="aborted")return we;l.status==="dirty"&&n.dirty(),c.add(l.value)}return{status:n.value,value:c}}const s=[...r.data.values()].map((u,c)=>o._parse(new po(r,u,r.path,c)));return r.common.async?Promise.all(s).then(u=>a(u)):a(s)}min(t,n){return new ku({...this._def,minSize:{value:t,message:pe.toString(n)}})}max(t,n){return new ku({...this._def,maxSize:{value:t,message:pe.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}ku.create=(e,t)=>new ku({valueType:e,minSize:null,maxSize:null,typeName:be.ZodSet,...$e(t)});class Al extends Fe{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ne.function)return oe(n,{code:J.invalid_type,expected:ne.function,received:n.parsedType}),we;function r(s,u){return Mm({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,km(),ip].filter(c=>!!c),issueData:{code:J.invalid_arguments,argumentsError:u}})}function i(s,u){return Mm({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,km(),ip].filter(c=>!!c),issueData:{code:J.invalid_return_type,returnTypeError:u}})}const o={errorMap:n.common.contextualErrorMap},a=n.data;return this._def.returns instanceof Ll?Hn(async(...s)=>{const u=new Ei([]),c=await this._def.args.parseAsync(s,o).catch(p=>{throw u.addIssue(r(s,p)),u}),l=await a(...c);return await this._def.returns._def.type.parseAsync(l,o).catch(p=>{throw u.addIssue(i(l,p)),u})}):Hn((...s)=>{const u=this._def.args.safeParse(s,o);if(!u.success)throw new Ei([r(s,u.error)]);const c=a(...u.data),l=this._def.returns.safeParse(c,o);if(!l.success)throw new Ei([i(c,l.error)]);return l.data})}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Al({...this._def,args:Ao.create(t).rest(du.create())})}returns(t){return new Al({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Al({args:t||Ao.create([]).rest(du.create()),returns:n||du.create(),typeName:be.ZodFunction,...$e(r)})}}class fp extends Fe{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}fp.create=(e,t)=>new fp({getter:e,typeName:be.ZodLazy,...$e(t)});class dp extends Fe{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return oe(n,{received:n.data,code:J.invalid_literal,expected:this._def.value}),we}return{status:"valid",value:t.data}}get value(){return this._def.value}}dp.create=(e,t)=>new dp({value:e,typeName:be.ZodLiteral,...$e(t)});function Bq(e,t){return new ds({values:e,typeName:be.ZodEnum,...$e(t)})}class ds extends Fe{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return oe(n,{expected:He.joinValues(r),received:n.parsedType,code:J.invalid_type}),we}if(this._def.values.indexOf(t.data)===-1){const n=this._getOrReturnCtx(t),r=this._def.values;return oe(n,{received:n.data,code:J.invalid_enum_value,options:r}),we}return Hn(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t){return ds.create(t)}exclude(t){return ds.create(this.options.filter(n=>!t.includes(n)))}}ds.create=Bq;class pp extends Fe{_parse(t){const n=He.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==ne.string&&r.parsedType!==ne.number){const i=He.objectValues(n);return oe(r,{expected:He.joinValues(i),received:r.parsedType,code:J.invalid_type}),we}if(n.indexOf(t.data)===-1){const i=He.objectValues(n);return oe(r,{received:r.data,code:J.invalid_enum_value,options:i}),we}return Hn(t.data)}get enum(){return this._def.values}}pp.create=(e,t)=>new pp({values:e,typeName:be.ZodNativeEnum,...$e(t)});class Ll extends Fe{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ne.promise&&n.common.async===!1)return oe(n,{code:J.invalid_type,expected:ne.promise,received:n.parsedType}),we;const r=n.parsedType===ne.promise?n.data:Promise.resolve(n.data);return Hn(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Ll.create=(e,t)=>new Ll({type:e,typeName:be.ZodPromise,...$e(t)});class Li extends Fe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===be.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null;if(i.type==="preprocess"){const a=i.transform(r.data);return r.common.async?Promise.resolve(a).then(s=>this._def.schema._parseAsync({data:s,path:r.path,parent:r})):this._def.schema._parseSync({data:a,path:r.path,parent:r})}const o={addIssue:a=>{oe(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="refinement"){const a=s=>{const u=i.refinement(s,o);if(r.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?we:(s.status==="dirty"&&n.dirty(),a(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?we:(s.status==="dirty"&&n.dirty(),a(s.value).then(()=>({status:n.value,value:s.value}))))}if(i.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Lm(a))return a;const s=i.transform(a.value,o);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>Lm(a)?Promise.resolve(i.transform(a.value,o)).then(s=>({status:n.value,value:s})):a);He.assertNever(i)}}Li.create=(e,t,n)=>new Li({schema:e,typeName:be.ZodEffects,effect:t,...$e(n)});Li.createWithPreprocess=(e,t,n)=>new Li({schema:t,effect:{type:"preprocess",transform:e},typeName:be.ZodEffects,...$e(n)});class Xo extends Fe{_parse(t){return this._getType(t)===ne.undefined?Hn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Xo.create=(e,t)=>new Xo({innerType:e,typeName:be.ZodOptional,...$e(t)});class Mu extends Fe{_parse(t){return this._getType(t)===ne.null?Hn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Mu.create=(e,t)=>new Mu({innerType:e,typeName:be.ZodNullable,...$e(t)});class Ap extends Fe{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===ne.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Ap.create=(e,t)=>new Ap({innerType:e,typeName:be.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...$e(t)});class Dm extends Fe{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return jm(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Ei(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Ei(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Dm.create=(e,t)=>new Dm({innerType:e,typeName:be.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...$e(t)});class Wm extends Fe{_parse(t){if(this._getType(t)!==ne.nan){const r=this._getOrReturnCtx(t);return oe(r,{code:J.invalid_type,expected:ne.nan,received:r.parsedType}),we}return{status:"valid",value:t.data}}}Wm.create=e=>new Wm({typeName:be.ZodNaN,...$e(e)});const Bxe=Symbol("zod_brand");class Pq extends Fe{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class Sh extends Fe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?we:o.status==="dirty"?(n.dirty(),Uq(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?we:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new Sh({in:t,out:n,typeName:be.ZodPipeline})}}const Dq=(e,t={},n)=>e?Ml.create().superRefine((r,i)=>{var o,a;if(!e(r)){const s=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,u=(a=(o=s.fatal)!==null&&o!==void 0?o:n)!==null&&a!==void 0?a:!0,c=typeof s=="string"?{message:s}:s;i.addIssue({code:"custom",...c,fatal:u})}}):Ml.create(),Pxe={object:_t.lazycreate};var be;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline"})(be||(be={}));const Dxe=(e,t={message:`Input not instance of ${e.name}`})=>Dq(n=>n instanceof e,t),ru=xi.create,Km=ls.create,Wxe=Wm.create,Kxe=fs.create,Wq=op.create,Nxe=Fu.create,qxe=Um.create,Vxe=ap.create,Qxe=sp.create,zxe=Ml.create,Hxe=du.create,Yxe=ia.create,Gxe=Bm.create,Kq=$i.create,Nm=_t.create,Jxe=_t.strictCreate,Zxe=up.create,Xxe=q0.create,ewe=cp.create,twe=Ao.create,nwe=lp.create,rwe=Pm.create,iwe=ku.create,owe=Al.create,awe=fp.create,swe=dp.create,uwe=ds.create,cwe=pp.create,lwe=Ll.create,JF=Li.create,fwe=Xo.create,dwe=Mu.create,pwe=Li.createWithPreprocess,Awe=Sh.create,hwe=()=>ru().optional(),mwe=()=>Km().optional(),gwe=()=>Wq().optional(),vwe={string:e=>xi.create({...e,coerce:!0}),number:e=>ls.create({...e,coerce:!0}),boolean:e=>op.create({...e,coerce:!0}),bigint:e=>fs.create({...e,coerce:!0}),date:e=>Fu.create({...e,coerce:!0})},ywe=we;var L=Object.freeze({__proto__:null,defaultErrorMap:ip,setErrorMap:Txe,getErrorMap:km,makeIssue:Mm,EMPTY_PATH:xxe,addIssueToContext:oe,ParseStatus:Ln,INVALID:we,DIRTY:Uq,OK:Hn,isAborted:sC,isDirty:uC,isValid:Lm,isAsync:jm,get util(){return He},get objectUtil(){return aC},ZodParsedType:ne,getParsedType:Za,ZodType:Fe,ZodString:xi,ZodNumber:ls,ZodBigInt:fs,ZodBoolean:op,ZodDate:Fu,ZodSymbol:Um,ZodUndefined:ap,ZodNull:sp,ZodAny:Ml,ZodUnknown:du,ZodNever:ia,ZodVoid:Bm,ZodArray:$i,ZodObject:_t,ZodUnion:up,ZodDiscriminatedUnion:q0,ZodIntersection:cp,ZodTuple:Ao,ZodRecord:lp,ZodMap:Pm,ZodSet:ku,ZodFunction:Al,ZodLazy:fp,ZodLiteral:dp,ZodEnum:ds,ZodNativeEnum:pp,ZodPromise:Ll,ZodEffects:Li,ZodTransformer:Li,ZodOptional:Xo,ZodNullable:Mu,ZodDefault:Ap,ZodCatch:Dm,ZodNaN:Wm,BRAND:Bxe,ZodBranded:Pq,ZodPipeline:Sh,custom:Dq,Schema:Fe,ZodSchema:Fe,late:Pxe,get ZodFirstPartyTypeKind(){return be},coerce:vwe,any:zxe,array:Kq,bigint:Kxe,boolean:Wq,date:Nxe,discriminatedUnion:Xxe,effect:JF,enum:uwe,function:owe,instanceof:Dxe,intersection:ewe,lazy:awe,literal:swe,map:rwe,nan:Wxe,nativeEnum:cwe,never:Yxe,null:Qxe,nullable:dwe,number:Km,object:Nm,oboolean:gwe,onumber:mwe,optional:fwe,ostring:hwe,pipeline:Awe,preprocess:pwe,promise:lwe,record:nwe,set:iwe,strictObject:Jxe,string:ru,symbol:qxe,transformer:JF,tuple:twe,undefined:Vxe,union:Zxe,unknown:Hxe,void:Gxe,NEVER:ywe,ZodIssueCode:J,quotelessJson:Ixe,ZodError:Ei});const bwe=L.object({id:L.string(),label:L.string(),repeatable:L.boolean(),status:L.boolean()}),Cwe=L.array(bwe);function Nq(e,t,n){return me.request(new URL("customtypes",e),{headers:{repository:t},credentials:me.getRequestCredentials(n),okType:Cwe})}const Swe=L.object({first_name:L.string().optional(),last_name:L.string().optional(),email:L.string().optional(),uploadedAvatar:L.string().optional()}),BR=L.object({id:L.string(),name:L.string(),is_master:L.boolean().optional()}),_we=L.discriminatedUnion("status",[L.object({status:L.literal("unclassified")}),L.object({status:L.literal("published")}),L.object({status:L.literal("release"),release_id:L.string()}),L.object({status:L.literal("archived")})]).and(L.object({version_id:L.string(),tags:L.array(L.string()),custom_type_label:L.string(),preview_summary:L.string().optional(),preview_image:L.string().optional(),last_modified_date:L.coerce.date(),author:Swe,uid:L.string().optional()})),PR=L.object({id:L.string(),title:L.string().nullish().transform(e=>e??"Untitled"),custom_type_id:L.string(),group_lang_id:L.string(),language:BR,versions:L.array(_we)}),qq=L.object({total:L.number(),cursor:L.string().optional(),results:L.array(PR)}),Iwe=L.object({id:L.string(),title:L.string(),repository_id:L.string(),tags:L.array(L.string()).optional()}).passthrough(),Twe=L.object({results:L.array(Iwe)});function DR(e,t,n,r,i){const o=new URL("documents",e);return r&&o.searchParams.set("limit",r.toString()),i&&o.searchParams.set("cursor",i),o.search+=`&${n}`,me.request(o,{credentials:me.getRequestCredentials(t),okType:qq})}function Vq(e){const{baseUrl:t,authStrategy:n,limit:r,cursor:i,status:o,authors:a,language:s,group_lang_id:u,document_id:c,customTypes:l,tags:d,term:p,signal:A}=e,m=new URL("documents",t),g=[];return typeof r=="number"&&g.push({name:"limit",values:[r.toString()]}),i&&g.push({name:"cursor",values:[i]}),o!=null&&o.length&&g.push({name:"status",values:o}),a!=null&&a.length&&g.push({name:"authors",values:a}),s&&g.push({name:"language",values:[s]}),u&&g.push({name:"group_lang_id",values:[u]}),c!=null&&c.length&&g.push({name:"document_id",values:c}),l!=null&&l.length&&g.push({name:"customTypes",values:l}),d!=null&&d.length&&g.push({name:"tags",values:d}),p&&g.push({name:"term",values:[p]}),m.search=new URLSearchParams(V0(g)).toString(),me.request(m,{credentials:me.getRequestCredentials(n),okType:qq,signal:A})}function Qq(e,t,n,r){const i=new URL(e);return i.search=n,me.request(i,{credentials:me.getRequestCredentials(t),okType:Twe,...r})}function zq(e){const{repository:t,searchTerm:n,tags:r,localeId:i,customTypesIds:o}=e,a=new URLSearchParams;return a.append("repository",t),n&&a.append("searchTerm",n),r!=null&&r.length&&a.append("tags",r.toString()),i&&a.append("localeId",i),o!=null&&o.length&&a.append("customTypesIds",o.toString()),a.toString()}function V0(e){return e.reduce((t,n)=>{if(n.values.every(i=>i===""||i===void 0))return t;const r=n.values.map(i=>[n.name,i??""]);return t.concat(r)},[])}function _h(e,t,n){return me.request(new URL(`documents/${n}`,e),{credentials:me.getRequestCredentials(t),okType:PR})}const xwe=L.custom().transform((e,t)=>{const n=ye.Document.decode(e);return n._tag==="Left"?(t.addIssue({code:L.ZodIssueCode.custom,message:"Invalid document."}),L.NEVER):n.right});function WR(e){const t=Ql.keys(e).flatMap(r=>{const i=e[r];return i?{name:r,values:i}:[]});return new URLSearchParams(V0(t)).toString()}async function Hq(e,t,n){if(n.length===0)return[];const r=n.slice(0,50).map(({id:a})=>a),i=await Vq({baseUrl:e,authStrategy:t,document_id:r}),o=new Map(r.map((a,s)=>[a,s]));return i.results.sort((a,s)=>{const u=o.get(a.id),c=o.get(s.id);return(u??1/0)-(c??1/0)})}const wwe=L.unknown().transform((e,t)=>{const n=ye.SliceItemContent.decode(e);return n._tag==="Right"?n.right:(t.addIssue({code:L.ZodIssueCode.custom,message:"Invalid slice content."}),L.NEVER)}),Go={all:()=>["documents"],lists:()=>[...Go.all(),"list"],list:e=>[...Go.lists(),e],infiniteLists:()=>[...Go.all(),"list:infinite"],infiniteList:e=>[...Go.infiniteLists(),e]};function Ewe(e,t){e.setQueriesData({queryKey:Go.lists()},n=>n&&ZF(n,t)),e.setQueriesData({queryKey:Go.infiniteLists()},n=>n&&{...n,pages:n.pages.map(r=>ZF(r,t))})}function ZF(e,t){const n=e.results.flatMap(r=>{const i=t(r,e);return i?[i]:[]});return{...e,results:n,total:e.total+(n.length-e.results.length)}}async function $we(e){await e.invalidateQueries({queryKey:Go.lists()}),await e.invalidateQueries({queryKey:Go.infiniteLists()})}const Rwe=L.object({id:L.string(),firstname:L.string().optional(),lastname:L.string().optional(),email:L.string(),uploadedAvatar:L.string().optional()}),Owe=L.array(Rwe),Fwe=L.object({slicemachineEnabled:L.boolean()}),Yq=["next","nuxt","sveltekit"];function kwe(e){return Yq.includes(e)}const KR=L.preprocess(e=>typeof e=="string"&&kwe(e)?e:"other",L.enum([...Yq,"other"])),Mwe=L.object({simulator_url:L.string().url().nullish(),languages:L.array(BR).transform(e=>kt.sort(e,t=>t.name)),authors:Owe.optional().default([]),quotas:Fwe.optional().default({slicemachineEnabled:!1}),framework:KR.optional().default("other"),starterId:L.string().optional(),storageVersion:L.object({major:L.number().int(),minor:L.number().int()}),uploadedAvatar:L.string().url().optional()}).transform(({simulator_url:e,framework:t,...n})=>{const r=e&&Gq(e)?e:void 0;return{...n,framework:t,simulatorUrl:r,isSupportedFramework:t!=="other"}});function Q0(e,t){return me.request(new URL("repository",e),{credentials:me.getRequestCredentials(t),okType:Mwe})}function Gq(e){const t=Fr.toURL(e);return t?t.pathname.endsWith("/slice-simulator"):!1}const Lwe=L.object({results:L.array(L.string())});function Jq(e,t){return me.request(new URL("repository/tags",e),{credentials:me.getRequestCredentials(t),okType:Lwe})}const jwe=L.enum(["createPrismicProject","chooseLocale","createProject","setupSliceMachine","createPageType","codePage","createSlice","reviewAndPush","createContent","renderPage"]),Zq=L.object({completedSteps:L.array(L.string()),isDismissed:L.boolean(),context:L.object({framework:KR,starterId:L.string().nullable().optional()})}),Xq=L.object({completedSteps:L.array(L.string())}),e7=L.object({isDismissed:L.boolean()});function Uwe(e,t,n){const r=new URL("onboarding",e);return r.searchParams.append("repository",t),me.request(r,{headers:{repository:t},credentials:me.getRequestCredentials(n),okType:Zq})}function Bwe(e,t,n,r){const i=new URL(`onboarding/${e}/toggle`,t);return i.searchParams.append("repository",n),me.request(i,{method:"PATCH",headers:{repository:n},credentials:me.getRequestCredentials(r),okType:Xq})}function Pwe(e,t,n){const r=new URL("onboarding/toggle",e);return r.searchParams.append("repository",t),me.request(r,{method:"PATCH",headers:{repository:t},credentials:me.getRequestCredentials(n),okType:e7})}const t7=L.enum(["Owner","Administrator","Writer","Manager","Readonly"]),Dwe=L.record(t7.optional()),Wwe=t7.or(Dwe),Kwe={SuperUser:"SuperUser",Owner:"Owner",Administrator:"Administrator",Manager:"Publisher",Writer:"Writer",Readonly:"Contributor"},n7=L.object({shortId:L.string(),intercomHash:L.string(),email:L.string(),firstName:L.string(),lastName:L.string(),superPower:L.boolean(),repositories:L.array(L.object({domain:L.string(),role:Wwe}))});function r7(e,t){const n=new URL("profile",e);return me.request(n,{credentials:me.getRequestCredentials(t),okType:n7})}function NR(){const e=Te();e.userServiceBaseUrl||Ht("userServiceBaseUrl");const{authStrategy:t,userServiceBaseUrl:n}=e;return Ke.useRequest(r7,[n,t])}const Nwe="https://prismic.io/docs/guides/manage-images#supported-media";function Ih(){const e=Te();e.mediaLibrary||Ht("mediaLibrary");const{assetsApiBaseUrl:t,authStrategy:n,repository:r}=e,{items:i}=Ke.useRequest(i7,[t,r,n]);return{tags:i}}function i7(e,t,n){return me.request(new URL("tags",e),{credentials:me.getRequestCredentials(n),okType:qwe,headers:{repository:t}})}const o7=1,a7=20,qR=L.string().min(o7).max(a7),VR=L.object({id:L.string(),name:qR,uploader_id:L.string().optional(),created_at:L.number(),last_modified:L.number(),count:L.number().optional().default(0)}),qwe=L.object({items:L.array(VR)});function Th(e){Ke.updateFetcherData(i7,t=>{const{items:n}=t,r=e(n);if(r)return{items:r}})}function Vwe(e){const{assetType:t,keyword:n,mode:r,tagIds:i}=e,o=Te();o.mediaLibrary||Ht("mediaLibrary");const{onAnalyticsEvent:a}=o,s=Ke.useFetcherData(mi),u=s[s.length-1],c=E.useRef(u);c.current=u,E.useEffect(()=>{if(!a||!n||!c.current||c.current.keyword!==n)return;const l=String(n.split(" ").length),d=String(c.current.total),p=i.join(",");a("Media Library Search",{searchQuery:n,numberOfWords:l,numberOfResults:d,timeToGetResults:c.current.time,assetType:t,mode:r,tags:p})},[n,t,r,a,i])}function Qwe(e){const{assetType:t,mediaDialogOpen:n}=e,r=Te(),i=Ke.useFetcherData(mi),o=E.useRef(0);E.useEffect(()=>{n&&(o.current=performance.now())},[n]);function a(s){if(!r.onAnalyticsEvent||!r.mediaLibrary)return;const u=i[i.length-1];if(!u)return;const{keyword:c,uploaderId:l,tags:d}=u,p=c7(i,c,t,l,d),A=String(c.split(" ").length),m=String(u.total),g=p.findIndex(x=>x.id===s),_=String(g+1),b=[s].join(","),I=(performance.now()-o.current).toFixed(0);r.onAnalyticsEvent("Media Added To Page",{assetType:t,searchQuery:c,numberOfWords:A,numberOfResults:m,searchPosition:_,mediaIds:b,timeToAddMediaToPage:I,tags:d})}return a}const Nh=L.array(L.string()).optional().transform(e=>e==null?void 0:e[0]),z0=L.object({id:L.string(),kind:L.string(),extension:L.string().optional(),filename:L.string(),width:L.number().optional(),height:L.number().optional(),last_modified:L.number(),url:L.string(),alt:L.string().optional(),uploader_id:L.string().optional(),size:L.number(),notes:L.string().optional(),credits:L.string().optional(),search_highlight:L.object({filename:Nh,alt:Nh,notes:Nh,credits:Nh}).optional(),tags:L.array(VR)}),s7={"X-Prismic-Source":"Wroom"},zwe=L.object({total:L.number(),cursor:L.string().optional(),items:L.array(z0)}),u7=30;function mi(e,t,n,r,i,o,a,s,u){const c=e?new URL("assets",e):void 0,l=new URLSearchParams(V0([{name:"limit",values:[`${u7}`]},{name:"cursor",values:[u]},{name:"keyword",values:[r]},{name:"assetType",values:[i]},{name:"uploaderId",values:[o]},{name:"tags",values:a.split(",")}])).toString(),d=zwe.transform(A=>({...A,keyword:r,assetType:i,uploaderId:o,tags:a,page:s})),p=performance.now();return me.request(`${(c==null?void 0:c.href)??""}?${l}`,{headers:{repository:t,...s7},credentials:me.getRequestCredentials(n),okType:d}).then(A=>({...A,time:(performance.now()-p).toFixed(0)}))}Ke.cache.registerFetcherConfig(mi,{revalidationStrategy:{type:"never"}});const Vn={keyword:"",assetType:"all",uploaderId:void 0,tagIds:[]};function Hwe(e){const{initialAssetType:t=Vn.assetType,mode:n}=e,r=Te(),[i,o]=E.useState({...Vn,assetType:t,page:0});r.mediaLibrary||Ht("mediaLibrary");const{assetsApiBaseUrl:a,authStrategy:s,repository:u}=r,{page:c,cursor:l,keyword:d,assetType:p,uploaderId:A,tagIds:m}=i,g=Ke.useRequest(mi,hp({assetsApiBaseUrl:a,authStrategy:s,repository:u,keyword:d,assetType:p,uploaderId:A,tagIds:m,page:c,cursor:l}));Vwe({assetType:p,keyword:d,tagIds:m,mode:n});const _=Zwe(d,p,A,m),b=g.total!==_.length;function I(){g.cursor!==void 0&&o(y=>({...y,page:y.page+1,cursor:g.cursor}))}function x(y){o(T=>({...T,page:0,cursor:void 0})),Lu((T,w)=>{if(w.page===0)return[...y,...T]})}function v(y){o(T=>({...T,...y,page:0,cursor:void 0}))}function S(){o(y=>({...y,...Vn,assetType:t==="all"?Vn.assetType:y.assetType,page:0,cursor:void 0}))}return{keyword:d,assetType:p,uploaderId:A,tagIds:m,setFilters:v,resetFilters:S,media:_,mediaTotal:g.total,limit:u7,hasNextPage:b,fetchNextPage:I,updateMedia:Ywe,unshiftMedia:x,deleteMedia:Gwe,deleteSearchData:Jwe,revalidateFirstPage:l7}}function Ywe(e){Lu(t=>t.flatMap(n=>{const r=e.find(i=>i.id===n.id);return r?r.response===void 0?[]:{...n,...r.response}:n}))}function Gwe(e){Lu(t=>t.filter(n=>!e.includes(n.id)))}function Jwe(e){const{keyword:t,assetType:n,uploaderId:r,tagIds:i}=e,o=i==null?void 0:i.join(",");Ke.updateFetcherData(mi,a=>{if(!(a.keyword===t&&a.assetType===n&&a.uploaderId===r&&a.tags===o))return a})}function c7(e,t,n,r,i){const o=e.filter(u=>u.keyword===t&&u.assetType===n&&u.uploaderId===r&&u.tags===i),s=kt.sort(o,u=>u.page).flatMap(u=>u.items);return t?kt.uniqBy(s,u=>u.id):s}function Zwe(e,t,n,r){const i=Ke.useFetcherData(mi);return c7(i,e,t,n,r.join(","))}function Lu(e){Ke.updateFetcherData(mi,t=>{const{items:n,total:r}=t,i=e(n,t);if(i)return{...t,total:r+(i.length-n.length),items:i}})}function l7(e){const{config:t,keyword:n=Vn.keyword,assetType:r=Vn.assetType,tagIds:i=Vn.tagIds}=e;if(!t.mediaLibrary)throw new Error("media library is not configured");const{assetsApiBaseUrl:o,authStrategy:a,repository:s}=t;Ke.revalidateData(mi,hp({assetsApiBaseUrl:o,repository:s,authStrategy:a,keyword:n,assetType:r,tagIds:i,page:0}))}function f7(e){const{config:t,keyword:n=Vn.keyword,assetType:r=Vn.assetType,tagIds:i=Vn.tagIds}=e;if(!t.mediaLibrary)throw new Error("media library is not configured");Ke.updateFetcherData(mi,o=>o.page===0?o:void 0),l7({config:t,keyword:n,assetType:r,tagIds:i})}function hp(e){return[e.assetsApiBaseUrl,e.repository,e.authStrategy,e.keyword,e.assetType,e.uploaderId,e.tagIds.join(","),e.page,e.cursor]}function d7(){const e=Te();e.mediaLibrary||Ht("mediaLibrary");const{assetsApiBaseUrl:t,coreApiBaseUrl:n,authStrategy:r,repository:i}=e,{authors:o}=Ke.useRequest(Q0,[n,r]),{items:a}=Ke.useRequest(p7,[t,i,r]),{shortId:s}=NR(),u=new Map(o.map(d=>[d.id,d])),c=[];for(const d of a){if(d.id==="ghost"){c.push({id:d.id,name:"Ghost",uploadedAvatar:"https://images.prismic.io/page-builder-assets/ZuAXWBoQrfVKl5sD_ghost_user.png?auto=format,compress&w=64"});continue}const p=u.get(d.id);if(!p)continue;let A;if(p.uploadedAvatar){const m=new URL(p.uploadedAvatar);m.searchParams.set("w","64"),A=m.toString()}c.push({id:d.id,name:[p.firstname,p.lastname].filter(Boolean).join(" "),firstName:p.firstname,lastName:p.lastname,email:p.email,uploadedAvatar:A})}const l=new Map(c.map(d=>[d.id,d]));return{uploaders:kt.sort(c,d=>d.id===s?0:1,d=>d.name),uploadersById:l}}function p7(e,t,n){return me.request(new URL("uploaders",e),{credentials:me.getRequestCredentials(n),okType:eEe,headers:{repository:t}})}const Xwe=L.object({id:L.string()}),eEe=L.object({items:L.array(Xwe)});function A7(){const e=Te();e.mediaLibrary||Ht("mediaLibrary");const{assetsApiBaseUrl:t,authStrategy:n,repository:r}=e;return()=>{Ke.revalidateData(p7,[t,r,n])}}function tEe(e){const{revalidate:t,config:n,keyword:r,assetType:i,uploaderId:o,tagIds:a}=e,{assetsApiBaseUrl:s=void 0,repository:u="",authStrategy:c="token"}=n.mediaLibrary?n:{},[l,d]=E.useState(!1),[p,A]=E.useState(!1),m={assetsApiBaseUrl:s,repository:u,authStrategy:c,keyword:r,assetType:i,uploaderId:o,tagIds:a,page:0},{revalidateData:g}=Ke.useCacheRevalidation({fetcher:mi,requestParams:hp(m),validator:(I,x)=>{var y,T;const v=((y=I.items[0])==null?void 0:y.id)??"",S=((T=x.items[0])==null?void 0:T.id)??"";return v!==S||I.total!==(x==null?void 0:x.total)},onCacheInvalidated:()=>A(!0),every:6e4}),_=I=>{g(hp({...m,...I}))};E.useEffect(()=>{l&&(A(!1),d(!1))},[l]);function b(){d(!0),t()}return{isMediaRevalidationInProgress:l,isMediaCacheInvalid:p,revalidateMedia:b,revalidateWithParams:_}}function nEe(e){const{onBeforeUpload:t,onComplete:n}=e,[r,i]=E.useState([]),o=r.some(l=>l.status==="idle"||l.status==="uploading"),a=Te();function s(){if(!r.length||r.some(A=>A.status==="uploading")||r.every(A=>A.status==="error"))return;const l=r.find(A=>A.status==="idle");if(!l)return;let d=r;function p(A){d=A(d),i(d),d.every(g=>g.status==="success"||g.status==="error")&&setTimeout(()=>{i([]),n==null||n(d)},1500)}p(A=>A.map(m=>m.id===l.id?{...m,status:"uploading"}:m)),rEe({file:l.file,config:a}).then(A=>{p(m=>m.map(g=>g.id===l.id?{...g,status:"success",response:A}:g))}).catch(()=>{p(A=>A.map(m=>m.id===l.id?{...m,status:"error"}:m))})}function u(l){const d=l.map(p=>({id:`temp-${crypto.randomUUID()}`,file:p,status:"idle"}));i(d),t(d)}const c=E.useCallback(l=>{const d=[{...l,status:"idle"},...r.filter(p=>p.id!==l.id)];i(d),t(d)},[t,r]);return E.useEffect(s,[a,r,n]),{isUploading:o,uploadingFiles:r,onFilesSelected:u,onRetry:c}}function rEe(e){const{file:t,config:n}=e;if(!n.mediaLibrary)throw new Error("Media Library not configured.");const{assetsApiBaseUrl:r,repository:i,authStrategy:o}=n,a=new FormData;return a.append(t.name,t),me.request(new URL("assets",r),{headers:{repository:i,"Content-Type":"multipart/form-data",...s7},method:"POST",body:a,credentials:me.getRequestCredentials(o),okType:z0})}const h7=E.createContext(void 0);function iEe(e){const{children:t,assetType:n=Vn.assetType,onSelectedChange:r,actionContainerRef:i}=e,o=r?"select":"browse",[a,s]=E.useTransition(),[u,c]=E.useTransition(),l=Te(),{showAlert:d}=h.useAlert(),p=NR(),A=A7(),{keyword:m,assetType:g,uploaderId:_,tagIds:b,setFilters:I,resetFilters:x,media:v,fetchNextPage:S,hasNextPage:y,updateMedia:T,unshiftMedia:w,deleteMedia:F,mediaTotal:k,deleteSearchData:$,revalidateFirstPage:P}=Hwe({initialAssetType:n,mode:o}),[K,Y]=E.useState();function ee(){f7({config:l,keyword:m,assetType:g,uploaderId:_,tagIds:b})}const{isMediaRevalidationInProgress:re,isMediaCacheInvalid:D,revalidateMedia:G,revalidateWithParams:M}=tEe({config:l,revalidate:ee,keyword:m,assetType:g,uploaderId:_,tagIds:b});function O(Ne){const dt=Ne.keyword===Vn.keyword,St=Ne.assetType===n,st=Ne.uploaderId===Vn.uploaderId,Wt=Ne.tagIds.length===Vn.tagIds.length&&Ne.tagIds.every((gi,_r)=>gi===Vn.tagIds[_r]);return dt&&St&&st&&Wt}function q(Ne){const dt={keyword:m,assetType:g,tagIds:b,uploaderId:_,...Ne};O(dt)?M(Ne):$(dt),c(()=>{I(Ne),at.clearSelection()})}const{isUploading:ue,onFilesSelected:ke,uploadingFiles:Ie,onRetry:rt}=nEe({onBeforeUpload:Ne=>{x();const dt=Ne.filter(st=>st.status==="idle").map(st=>({id:st.id,url:URL.createObjectURL(st.file),filename:st.file.name,size:st.file.size,extension:st.file.type,kind:st.file.type,last_modified:st.file.lastModified,tags:[],uploader_id:p.shortId}));w(dt);const[St]=dt??[];St&&at.toggleSelection({id:St.id,isSingleSelection:!0})},onComplete:Ne=>{const dt=Ne.flatMap(Wt=>Wt.status==="success"?Wt:(dn(Wt),{id:Wt.id,response:void 0}));T(dt),P({config:l,assetType:g,tagIds:b}),A();const St=dt[0];!St||!St.response||!at.isSelected(St.id)||at.toggleSelection({id:St.response.id,isSingleSelection:!0})}}),at=qs({totalItemCount:k,onChangeSelection:({selectedIds:Ne,selectedCount:dt})=>{if(Yr(!1),!!r){if(dt===1){const[St]=[...Ne];if(Ie.some(Wt=>Wt.id===St&&Wt.status!=="success")){r(new Set);return}}r(new Set(Ne))}}});function fn(Ne){ue||ke(Ne)}function Zt(){y&&s(S)}function rr(Ne,dt){T([{id:Ne,response:dt}])}function dn(Ne){const dt=Ep.overflow(Ne.file.name,30);d({id:Ne.id,title:`The specified file "${dt}" could not be uploaded.`,subtitle:f.jsxs(h.Text,{color:"inherit",children:["Read more about our"," ",f.jsx(h.Text,{color:"tomato11",href:Nwe,underline:!0,children:"supported media"}),"."]}),buttons:{action:{text:"Retry upload",icon:"cloudUpload",onClick:()=>rt(Ne)}}})}const[Hr,Yr]=E.useState(!1);return f.jsx(h7.Provider,{value:{isFetchingMedia:a,media:v,mediaTotal:k,onScrollToBottom:Zt,actionContainerRef:i,onFilesUpload:fn,isUploading:ue,uploadingFiles:Ie,isMediaRevalidationInProgress:re,isMediaCacheInvalid:D,revalidateMedia:G,deleteMedia:F,updateMedia:rr,keyword:m,isSearchingMedia:u,assetType:g,initialAssetType:n,uploaderId:_,tagManagerOpen:Hr,setTagManagerOpen:Yr,tagIds:b,onFilterChange:q,openMediaSection:K,setOpenMediaSection:Y},children:t})}function Ct(){const e=E.useContext(h7);if(!e)throw new Error("useMediaLibrary must be used within a MediaLibraryProvider");return e}function oEe(){const e=Te(),{initialAssetType:t}=Ct(),{assetsApiBaseUrl:n=void 0,repository:r="",authStrategy:i="token"}=e.mediaLibrary?e:{},{total:o}=Ke.useRequest(mi,hp({assetsApiBaseUrl:n,authStrategy:i,repository:r,assetType:t,keyword:"",tagIds:[],page:0}));return o}function m7(){return oEe()===0}function aEe(){return m7()?f.jsx(sEe,{}):f.jsx(v7,{})}function g7(e){const{children:t}=e;return f.jsx(h.Box,{justifyContent:"center",flexDirection:"column",height:"100%",children:t})}function v7(){return f.jsx(g7,{children:f.jsxs(h.BlankSlate,{children:[f.jsx(h.BlankSlateIcon,{name:"close",lineColor:"purple10",backgroundColor:"purple3",borderColor:"purple6",borderStyle:"dashed",size:"xlarge"}),f.jsx(h.BlankSlateTitle,{size:"big",children:"Oops!"}),f.jsx(h.BlankSlateDescription,{width:360,children:"No items found matching your search"})]})})}function sEe(){const{onFilesUpload:e}=Ct();return f.jsx(g7,{children:f.jsxs(h.Box,{gap:20,flexDirection:"column",alignItems:"center",children:[f.jsx(h.Box,{maxWidth:375,children:f.jsx(h.BlankSlateTitle,{size:"big",children:"Start by uploading your files!"})}),f.jsx(h.Box,{border:!0,borderStyle:"dashed",borderRadius:4,justifyContent:"center",children:f.jsxs(h.BlankSlate,{sx:{marginBlock:80,marginInline:48},children:[f.jsx(h.BlankSlateIcon,{name:"cloudUpload",lineColor:"purple11",backgroundColor:"purple5",size:"large"}),f.jsx(h.BlankSlateTitle,{children:"Drop your files anywhere to upload or ..."}),f.jsx(h.FileUploadButton,{onFilesSelected:e,renderButton:t=>f.jsx(h.Box,{display:"inline-flex",as:"span",children:f.jsx(h.Button,{onClick:t,color:"grey",children:"Upload media"})})}),f.jsx(h.BlankSlateDescription,{children:"Maximum upload size file: 128 MB"})]})})]})})}const jl={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 uEe(){const{actionContainerRef:e,isUploading:t,onFilesUpload:n,assetType:r}=Ct(),i=(e==null?void 0:e.current)!==void 0;return f.jsx(y7,{actionContainerRef:e,children:f.jsxs(h.Box,{width:"100%",gap:16,children:[f.jsx(cEe,{}),f.jsx(h.Tooltip,{title:jl.warning.uploadWhileUploading.title,content:jl.warning.uploadWhileUploading.description,visible:t,stableMount:!0,children:f.jsx(h.FileUploadButton,{disabled:t,onFilesSelected:n,startIcon:"cloudUpload",color:i?"purple":"grey",size:"large",assetType:r,children:"Upload media"})})]})})}function cEe(){const{keyword:e,onFilterChange:t,isFetchingMedia:n}=Ct(),[r,i]=E.useState(e);return Pe.useOnChange(e,()=>{e===""&&i("")}),Pe.useDebounce(r,300,Pe.useStableCallback(o=>t({keyword:o}))),f.jsx(h.Box,{width:"100%",flexDirection:"column",children:f.jsx(h.FormSearchInput,{value:r,placeholder:"Search",onValueChange:i,maxLength:200,isLoading:n&&e!==r})})}function y7(e){const{children:t,actionContainerRef:n}=e,r=(n==null?void 0:n.current)!==void 0,i=r?h.Portal:E.Fragment,o=r?{container:n.current,asChild:!0}:{},a=Pe.useForceUpdate();return E.useLayoutEffect(()=>{a()},[a]),f.jsx(i,{...o,children:t})}function lEe(e){const{children:t}=e,{onFilesUpload:n,assetType:r}=Ct();return f.jsx(h.FileDropZone,{overlay:f.jsx(fEe,{}),onFilesSelected:n,assetType:r,children:t})}function fEe(){const{isUploading:e}=Ct(),t=e?jl.warning.uploadWhileUploading.title:"Drop files here",n=e?jl.warning.uploadWhileUploading.description:"Drop your files to upload them instantly to the media library.";return f.jsx(h.Box,{justifyContent:"center",flexDirection:"column",height:"100%",children:f.jsxs(h.BlankSlate,{children:[f.jsx(h.BlankSlateIcon,{name:e?"block":"cloudUpload",lineColor:e?"tomato11":"purple10",backgroundColor:e?"tomato2":"purple3",borderColor:e?"tomato6":"purple6",borderStyle:"dashed",size:"xlarge"}),f.jsx(h.BlankSlateTitle,{size:"big",children:t}),f.jsx(h.BlankSlateDescription,{width:360,children:n})]})})}function b7(){return f.jsx(h.DefaultErrorMessage,{title:"Oops! Something went wrong",description:"An error occurred while searching for your image.",errorImageSrc:h.dialogErrorImage,sx:{marginBlock:"auto",marginInline:"auto"}})}function C7(e){const{mediaList:t,mediaActions:n,mediaToolbar:r,sidePane:i}=e,o=h.useMediaQuery({min:"medium"}),a=i&&o;return f.jsxs(h.Box,{display:"grid",gridTemplateRows:"auto auto 1fr",gridTemplateColumns:a?"1fr 380px":"1fr",width:"100%",height:"100%",children:[f.jsxs(h.Box,{position:"relative",display:"grid",gap:16,gridColumn:"1",gridRow:"1",padding:{right:16,bottom:16},children:[n,r]}),f.jsx(h.Box,{position:"relative",display:"grid",gridColumn:"1",gridRow:"2 / -1",children:t}),a&&i]})}function dEe(){var p;const{onScrollToBottom:e,media:t,isUploading:n,uploadingFiles:r,isSearchingMedia:i,isMediaRevalidationInProgress:o,setOpenMediaSection:a,isFetchingMedia:s}=Ct(),u=qs(),c=E.useRef(null);function l(A){u.toggleSelection({id:A,isSingleSelection:!0}),a("tags")}(n||i||o)&&((p=c.current)==null||p.scrollTo({top:0,behavior:"instant"}));function d(A,m,g){const _=m.shiftKey?t.map(({id:b})=>b):void 0;u.toggleSelection({id:A,isSingleSelection:g==="single",metaKey:m.metaKey,shiftKey:m.shiftKey,ids:_})}return f.jsxs(S7,{onScrollToBottom:e,scrollAreaRef:c,children:[t.map(A=>{var m,g;return f.jsx(h.MediaCard,{"aria-label":"media item",...A,filenameHighlight:(m=A.search_highlight)==null?void 0:m.filename,loading:i,status:(g=r.find(_=>_.id===A.id))==null?void 0:g.status,selected:u.isSelected(A.id),onCardClick:_=>d(A.id,_,"single"),onCheckedChange:(_,b)=>d(A.id,b,"multi"),onAddTagClick:()=>l(A.id)},A.id)}),f.jsx(h.Box,{gridColumn:"1 / -1",justifyContent:"center",children:f.jsx(h.AnimatedElement,{animation:{name:"fade"},children:s&&f.jsx(h.Text,{align:"center",color:"grey11",sx:{marginBlock:8},children:"Loading more items ..."})})})]})}function S7(e){const{children:t,scrollAreaRef:n,onScrollToBottom:r}=e,i=16,o=4,a="250px",s=`calc((100% - ${i*(o-1)}px) / ${o})`;return f.jsx(h.ScrollArea,{"aria-label":"Media list",ref:n,style:{display:"grid",gridTemplateColumns:`repeat(auto-fill, minmax(max(${a}, ${s}), 1fr))`,gridTemplateRows:"1fr 1fr 1fr ",gap:i,padding:2,paddingBottom:16,position:"relative"},onScrollToBottom:r,threshold:500,children:t})}function _7(e){const{children:t,hasSelectedMedia:n}=e;return f.jsx(h.Box,{overflow:"hidden",gridColumn:"2 / -1",gridRow:"1 / -1",children:f.jsx(h.ScrollArea,{style:{display:"grid",height:"100%"},children:f.jsx(h.Box,{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 I7(e){const{onFilesUpload:t,isUploading:n,isInitialLoad:r=!1}=e,i=r||n;return f.jsxs(h.Box,{flexDirection:"column",justifyContent:"center",alignItems:"center",padding:16,gap:16,width:"100%",children:[f.jsx(h.BlankSlateIcon,{name:"cloudUpload",lineColor:"purple11",backgroundColor:"purple5",size:"large"}),f.jsx(h.Box,{flexDirection:"column",gap:4,children:f.jsxs(h.Text,{align:"center",children:["Select or"," ",f.jsx(h.FileUploadButton,{disabled:i,onFilesSelected:t,renderButton:o=>f.jsx(h.Tooltip,{title:jl.warning.uploadWhileUploading.title,content:jl.warning.uploadWhileUploading.description,visible:n,children:f.jsx(h.Box,{display:"inline-flex",as:"span",children:f.jsx(h.Button,{disabled:i,onClick:o,invisible:!0,children:"upload"})})})})," ","media."]})}),f.jsx(h.FileUploadButton,{disabled:i,onFilesSelected:t,color:"grey",children:"Upload media"})]})}function T7(e){const{count:t}=e;return f.jsxs(h.Text,{variant:"bold",children:[t," item",t==1?"":"s"]})}function pEe(e){const{actionContainerRef:t}=e;return f.jsx(C7,{sidePane:f.jsx(mEe,{}),mediaActions:f.jsx(hEe,{actionContainerRef:t}),mediaToolbar:f.jsx(h.Skeleton,{color:"grey5",borderRadius:12,children:f.jsx(T7,{count:888})}),mediaList:f.jsx(AEe,{})})}function AEe(){return f.jsx(S7,{children:kt.range(1,24).map(e=>f.jsx(x7,{},e))})}function hEe(e){const{actionContainerRef:t}=e,n=Pe.useForceUpdate();return E.useLayoutEffect(()=>{n()},[n]),f.jsx(y7,{actionContainerRef:t,children:f.jsxs(h.Box,{width:"100%",gap:16,children:[f.jsx(h.Box,{width:"100%",flexDirection:"column",children:f.jsx(h.FormSearchInput,{placeholder:"Search",maxLength:200,value:"",disabled:!0,onValueChange:()=>{}})}),f.jsx(h.FileUploadButton,{disabled:!0,onFilesSelected:()=>{},startIcon:"cloudUpload",color:t?"purple":"grey",size:"large",children:"Upload media"})]})})}function mEe(){return f.jsx(_7,{hasSelectedMedia:!1,children:f.jsx(I7,{onFilesUpload:()=>{},isUploading:!1,isInitialLoad:!0})})}function x7(){return f.jsxs(h.Box,{height:302,width:"100%",flexDirection:"column",padding:16,backgroundColor:"grey1",border:!0,borderStyle:"solid",borderRadius:6,children:[f.jsx(h.Skeleton,{height:164,width:"100%"}),f.jsx(h.Skeleton,{height:16,width:"100%",sx:{marginTop:12}}),f.jsx(h.Skeleton,{height:10,width:100,sx:{marginTop:8}}),f.jsx(h.Skeleton,{height:1,width:"100%",sx:{marginTop:20,marginBottom:16}}),f.jsxs(h.Box,{flexDirection:"row",gap:8,children:[f.jsx(h.Skeleton,{height:24,width:54}),f.jsx(h.Skeleton,{height:24,width:45}),f.jsx(h.Skeleton,{height:24,width:62})]})]})}const w7=E.createContext({showToast:()=>{}});function gEe(e){const{children:t}=e,[n,r]=E.useState({title:"",seconds:5}),[i,o]=E.useState(!1),{title:a,action:s,seconds:u=1,icon:c="check"}=n,l=E.useMemo(()=>({showToast:d=>{r({seconds:u,...d}),o(!0)}}),[u]);return f.jsxs(f.Fragment,{children:[f.jsx(vEe,{}),f.jsx(h.Toast,{anchor:f.jsx(h.Box,{position:"absolute",justifyContent:"center",width:"100%",bottom:72}),open:i,onOpenChange:o,title:a,action:s,seconds:u,icon:c}),f.jsx(w7.Provider,{value:l,children:t})]})}function E7(){return E.useContext(w7)}function vEe(){const{revalidateMedia:e,isMediaCacheInvalid:t}=Ct(),[n,r]=E.useState(t);return Pe.useOnChange(t,r),f.jsx(h.Toast,{anchor:f.jsx(h.Box,{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 Pc(){const{media:e}=Ct(),t=qs();return e.filter(({id:n})=>t.isSelected(n))}function yEe(){const[e,t]=E.useState(!1),n=Pc(),r=qs(),i=E.useMemo(()=>n.some(({id:a})=>a.startsWith("temp")),[n]),[o]=n;return o?r.selectedCount>1?f.jsxs(h.Box,{gap:8,alignItems:"center",children:[f.jsxs(h.Text,{variant:"emphasized",noWrap:!0,sx:{flexGrow:1},children:[r.selectedCount," media selected"]}),f.jsx(h.Tooltip,{content:"Open all selected media in new tabs",children:f.jsx(h.IconButton,{icon:"openInFull",variant:"solid",size:"small",onClick:()=>n.forEach(a=>window.open(a.url,"_blank"))})}),f.jsx(h.Tooltip,{content:"Remove selected media",children:f.jsx(h.IconButton,{icon:"delete",variant:"solid",color:"tomato",size:"small",hiddenLabel:"Remove media",onClick:()=>t(!0),disabled:i})}),f.jsx(XF,{open:e,onOpenChange:t,media:n})]}):f.jsxs(h.Box,{gap:8,alignItems:"center",children:[f.jsx(h.Text,{variant:"emphasized",noWrap:!0,sx:{flexGrow:1},children:o.filename}),f.jsxs(h.Box,{gap:8,children:[f.jsx(h.Tooltip,{content:"Open media in new tab",children:f.jsx(h.IconButton,{icon:"openInFull",variant:"solid",size:"small",hiddenLabel:"Open media in new tab",onClick:()=>window.open(o.url,"_blank"),disabled:i})}),f.jsx(h.Tooltip,{content:"Copy media URL",children:f.jsx(h.IconButton,{icon:"link",variant:"solid",size:"small",hiddenLabel:"Copy media URL",onClick:()=>navigator.clipboard.writeText(o.url),disabled:i})}),f.jsx(h.Tooltip,{content:"Remove media",children:f.jsx(h.IconButton,{icon:"delete",variant:"solid",color:"tomato",size:"small",hiddenLabel:"Remove media",onClick:()=>t(!0),disabled:i})}),f.jsx(XF,{open:e,onOpenChange:t,media:o})]})]}):null}function XF(e){const{open:t,onOpenChange:n,media:r}=e,i=Te(),{showAlert:o}=h.useAlert(),{deleteMedia:a}=Ct(),s=qs(),u=A7(),[c,l]=E.useState(!1),d=Array.isArray(r),p=d?"these items":"this item";function A(){l(!0);const g=s.getSelectionState().selectedIds;CEe({ids:g,config:i}).then(()=>{n(!1),a(g),s.clearSelection(),u()}).catch(()=>{n(!1),o({title:"Error",subtitle:`Something went wrong when removing ${p}.`})}).finally(()=>{l(!1)})}return f.jsxs(h.Dialog,{onOpenChange:n,open:t,size:"small",children:[f.jsx(h.DialogHeader,{icon:"alert",title:`Remove ${p} from your media library?`}),f.jsx(h.DialogContent,{children:f.jsxs(h.Box,{padding:16,flexDirection:"column",children:[f.jsxs(h.Text,{children:["You are about to delete ",p,":  ",!d&&f.jsx("b",{children:r.filename})]}),d&&f.jsx(bEe,{media:r})]})}),f.jsxs(h.DialogActions,{children:[f.jsx(h.DialogCancelButton,{}),f.jsxs(h.DialogActionButton,{onClick:A,color:"tomato",loading:c,children:["Yes, I want to remove ",p]})]})]})}const Yb=15;function bEe(e){const{media:t}=e,n=t.slice(0,Yb),r=t.length>Yb,i=r?t.length-Yb:0,o=i===1?"item":"items";return f.jsxs(h.UnorderedList,{density:"compact",sx:{marginTop:8},children:[n.map((a,s)=>f.jsx(h.ListItem,{children:f.jsx("b",{children:a.filename})},s)),r&&f.jsxs(h.ListItem,{children:["And ",f.jsx("b",{children:i})," more ",o,"..."]})]})}function CEe(e){const{ids:t,config:n}=e;if(!n.mediaLibrary)throw new Error("Media Library not configured.");if(t.length===0)throw new Error("No ids provided during media deletion");const{assetsApiBaseUrl:r,repository:i,authStrategy:o}=n;if(t.length===1){const[a]=t;return me.request(new URL(`assets/${a}`,r),{headers:{repository:i},method:"DELETE",credentials:me.getRequestCredentials(o),okType:L.unknown()})}return me.request(new URL("assets/bulk-delete",r),{headers:{repository:i},method:"POST",credentials:me.getRequestCredentials(o),okType:L.unknown(),body:{ids:t}})}function SEe(){var o;const e=Pc(),{uploadingFiles:t}=Ct(),[n]=e;if(!n)return null;if(e.length===2)return f.jsx(Gb,{children:e.map((a,s)=>f.jsx("div",{style:{position:"absolute",transform:s===0?"translateX(25%) rotate(15deg) ":"translateX(-25%) rotate(-15deg) "},children:f.jsx(ek,{media:a})},a.id))});if(e.length>2)return f.jsx(Gb,{children:e.slice(-4).map((a,s)=>f.jsx("div",{style:{position:"absolute",paddingRight:s*16},children:f.jsx(ek,{media:a})},a.id))});const r=(o=t.find(a=>a.id===n.id))==null?void 0:o.status,i=n.kind.startsWith("image");return f.jsx(h.Box,{flexDirection:"column",children:f.jsx(h.CheckerBoard,{children:f.jsx(Gb,{uploadStatus:r,hasImage:i,children:i?f.jsx(h.Image,{src:n.url,alt:n.alt,sizing:"contain"}):f.jsx(h.MediaCardPlaceholder,{kind:n.kind,filename:n.filename})})})})}function Gb(e){const{children:t,uploadStatus:n,hasImage:r}=e;return f.jsxs(h.Box,{flexDirection:"column",alignItems:"center",justifyContent:"center",position:"relative",height:200,width:"100%",backgroundColor:r?"transparent":"purple2",children:[t,n&&f.jsx(_Ee,{uploadStatus:n})]})}function _Ee(e){const{uploadStatus:t}=e,{value:n,color:r,height:i,transition:o}=IEe(t);return f.jsx(h.Box,{position:"absolute",backgroundColor:"greyAlpha1",width:"100%",height:"100%",padding:{inline:16},justifyContent:"end",flexDirection:"column",children:f.jsx(h.ProgressBar,{value:n,color:r,height:i,transition:o})})}function IEe(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"}}}function ek(e){const{media:t}=e;return f.jsx(h.Box,{width:111,height:152,children:t.kind==="image"?f.jsx(h.Image,{borderRadius:8,src:t.url,alt:t.alt,sizing:"cover"}):f.jsx(h.MediaCardPlaceholder,{kind:t.kind,filename:t.filename})})}const Xa=2e3,gd="__MAIN_THUMBNAIL__";function lC(e,t,n){const r=e.name===gd?void 0:e.name;let i;return t?io.isDefined(n)?i=[n.width,n.height]:io.isDefined(e.width)||io.isDefined(e.height)?i=[e.width??void 0,e.height??void 0]:i=[t.origin.width,t.origin.height]:i=void 0,[r,i?`${i[0]??"auto"}×${i[1]??"auto"}px`:void 0]}function TEe(e){var t,n;return[{...(t=e.config)==null?void 0:t.constraint,name:gd}].concat(((n=e.config)==null?void 0:n.thumbnails)??[])}function xEe(e,t){var a,s;const{__TYPE__:n,thumbnails:r,...i}=t,o=(s=(a=e.config)==null?void 0:a.thumbnails)==null?void 0:s.map(({name:u})=>r==null?void 0:r[u]);return[i,...o??[]]}function wEe(e,t,n,r){const i=r.length===0?void 0:r;return e===gd||!ye.isImageContent(t)?{...t,alt:i}:{...t,thumbnails:{...t.thumbnails,[e]:{...n,alt:i}}}}function EEe(e,t){const{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]}function $Ee(e,t,n,r,i){if(LEe(e)==="svg")return e;const o=new URL(e);if(i){const{x:a,y:s,width:u,height:c}=t,l=[...o.searchParams.entries(),["rect",[a,s,u,c].join(",")],["w",n],["h",r]];o.search=l.map(d=>d.join("=")).join("&")}return o.toString()}function $7(e){const 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 REe(e){const 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()}function OEe(e){return e!=null&&e.url?$7(e.url):void 0}function FEe(e,t,n,r){var s,u,c,l,d;if(!n||e===gd){const p=(s=t.config)==null?void 0:s.thumbnails,A=p&&Object.fromEntries(p.map(m=>[m.name,im(r,m)]));return{__TYPE__:"ImageContent",...im(r,(u=t.config)==null?void 0:u.constraint),thumbnails:A}}const i=(l=(c=t.config)==null?void 0:c.thumbnails)==null?void 0:l.find(p=>p.name===e);if(!i)return n;const o=(d=n.thumbnails)==null?void 0:d[e],a=im(r,i);return a.url===(o==null?void 0:o.url)?n:{...n,thumbnails:Ql.mapValues(n.thumbnails??{},(p,A)=>A===e?a:p)}}function kEe(e){return"kind"in e&&"extension"in e}function im(e,t){const{width:n,height:r,rect:i}=MEe({...e,width:(e==null?void 0:e.width)??Xa,height:(e==null?void 0:e.height)??Xa},t),o=!!(t!=null&&t.width||t!=null&&t.height);return{provider:"imgix",url:$Ee(e.url,i,n,r,o),alt:e.alt,...kEe(e)?{credits:e.credits}:{},origin:{id:e.id,url:e.url,width:e.width??Xa,height:e.height??Xa},width:n,height:r,edit:{background:"transparent",zoom:1,crop:{x:i.x,y:i.y}}}}function MEe(e,t){const[n,r]=EEe(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),s=Math.round(n/i),u=Math.round(r/i);return{width:n,height:r,rect:{x:o,y:a,width:s,height:u}}}function LEe(e){const{pathname:t}=new URL(e),n=t.lastIndexOf(".");if(n!==-1)return t.substring(n).slice(1).toLowerCase()}function jEe(e){if(!e)return"";const{filename:t,extension:n}=e;if(!n)return t;const r=new RegExp(`\\.${n}$`);return t.replace(r,"")}function UEe(e){const t=e.length,n={},r=[];return e.forEach(o=>{o.tags.forEach(a=>{n[a.id]||(n[a.id]=0,r.push(a)),n[a.id]++})}),r.filter(o=>n[o.id]===t)}function R7(e){const{tags:t,toggleAssetTag:n,getTagsLabel:r}=e,{setTagManagerOpen:i}=Ct(),{showToast:o}=E7(),{showAlert:a}=h.useAlert(),[s,u]=E.useState("");async function c(l,d){u("");try{await n(l,d),o({title:"Media tags were updated",seconds:3})}catch{a({title:"Error",subtitle:"Something went wrong when updating media tags"})}}return f.jsxs(h.Box,{flexDirection:"column",children:[f.jsxs(h.Box,{justifyContent:"space-between",children:[f.jsx(h.Text,{color:"grey12",variant:"bold",children:r()}),f.jsx(h.Button,{startIcon:"edit",invisible:!0,color:"dark",onClick:()=>i(!0),children:"Manage tags"})]}),f.jsxs(h.ComboBox,{sx:{marginTop:4,marginBottom:8},children:[f.jsx(BEe,{searchTerm:s,setSearchTerm:u}),f.jsx(h.ComboBoxContent,{children:f.jsx(h.ErrorBoundary,{renderError:()=>f.jsx(h.Text,{color:"grey9",variant:"small",sx:{marginBlock:8,marginInline:8},children:"Error getting tags"}),children:f.jsx(E.Suspense,{fallback:f.jsx(h.Box,{padding:8,flexDirection:"column",gap:8,children:kt.range(1,6).map(l=>f.jsx(h.Skeleton,{height:24,width:85},l))}),children:f.jsx(PEe,{searchTerm:s,assignedTags:t,onToggleAssetTag:c})})})})]}),f.jsx(h.Box,{flexDirection:"column",alignItems:"flex-start",gap:8,children:t.map(l=>f.jsx(h.Badge,{title:l.name,size:"medium",color:"purple",selected:!0,onClose:()=>c(l,"remove")},l.id))})]})}function BEe(e){const{searchTerm:t,setSearchTerm:n}=e,r=E.useRef(null),{openMediaSection:i,setOpenMediaSection:o}=Ct();return E.useEffect(()=>{var a;i==="tags"&&((a=r.current)==null||a.focus(),o(void 0))},[i,o]),f.jsx(h.ComboBoxInput,{value:t,onValueChange:n,placeholder:"Add or create a new tag",ref:r})}function PEe(e){const{searchTerm:t,assignedTags:n,onToggleAssetTag:r}=e,[i]=Pc(),o=Te(),{showAlert:a}=h.useAlert(),{tags:s}=Ih(),u=E.useMemo(()=>{const p=t.toLowerCase();return s.filter(A=>A.name.toLowerCase().includes(p))},[s,t]),l=qR.safeParse(t).success&&s.every(p=>p.name!==t);async function d(){if(!t||!i)return;let p;try{p=await DEe({name:t,config:o}),Th(A=>[p,...A])}catch{a({title:"Error",subtitle:`Something went wrong when creating the tag ${t}`});return}await r(p,"add")}return i?f.jsxs(f.Fragment,{children:[!u.length&&f.jsx(h.Text,{color:"grey9",variant:"small",sx:{marginBlock:8,marginInline:8},children:"No tags found"}),u.map((p,A)=>f.jsx(h.ComboBoxItem,{value:p.id,onCheckedChange:m=>r(p,m?"add":"remove"),checked:n.some(m=>m.id===p.id),children:f.jsx(h.Badge,{title:p.name,color:"purple",size:"medium",sx:{marginInline:8,marginBottom:A===u.length-1?8:4,marginTop:A===0?8:4}})},p.id)),l&&f.jsx(h.ComboBoxItem,{value:"new",onCheckedChange:d,children:f.jsxs(h.Box,{padding:8,flexDirection:"row",alignItems:"center",gap:4,children:[f.jsx(h.Icon,{name:"add",size:"small",color:"grey11"}),f.jsxs(h.Text,{color:"grey12",children:['Create tag "',t,'"']})]})})]}):null}function DEe(e){const{name:t,config:n}=e;n.mediaLibrary||Ht("mediaLibrary");const{assetsApiBaseUrl:r,repository:i,authStrategy:o}=n;return me.request(new URL("tags",r),{headers:{repository:i},body:{name:t},method:"POST",credentials:me.getRequestCredentials(o),okType:VR})}function WEe(e){const{selectedMedia:t}=e,n=Te(),r=E.useMemo(()=>UEe(t),[t]);async function i(a,s){const u=s==="remove",c=t.map(d=>d.id);let l=[];Lu(d=>(l=d,d.map(p=>c.includes(p.id)?u?qEe(p,a):NEe(p,a):p)));try{await KEe({tagId:a.id,assetIds:c,operation:u?"remove":"add",config:n});const d=t.length*(u?-1:1);Th(p=>p.map(A=>A.id===a.id?{...A,count:A.count+d}:A))}catch(d){throw Lu(()=>l),d}}function o(){const a=r.length;return a>1?`${a} tags in common`:a===1?"1 tag in common":"Common tags"}return f.jsx(R7,{tags:r,getTagsLabel:o,toggleAssetTag:i})}function KEe(e){const{tagId:t,assetIds:n,config:r,operation:i}=e;if(!r.mediaLibrary)throw new Error("Media Library not configured.");const{assetsApiBaseUrl:o,repository:a,authStrategy:s}=r;return me.request(new URL(`tags/${t}/assets`,o),{headers:{repository:a},body:{assetIds:n},method:i==="add"?"POST":"DELETE",credentials:me.getRequestCredentials(s),okType:L.unknown()})}function NEe(e,t){return e.tags.some(({id:r})=>r===t.id)?e:{...e,tags:[...e.tags,t]}}function qEe(e,t){const n=e.tags.filter(r=>r.id!==t.id);return{...e,tags:n}}function VEe(e){const{selectedMedia:t}=e,n=t.tags,r=Te(),{updateMedia:i}=Ct();async function o(s,u){const c=t.tags,l=u==="remove",d=l?c.filter(p=>p.id!==s.id):[...c,s];i(t.id,{tags:d});try{await QEe({mediaId:t.id,config:r,tags:d.map(p=>p.id)}),Th(p=>p.map(A=>A.id===s.id?{...A,count:A.count+(l?-1:1)}:A))}catch(p){throw i(t.id,{tags:c}),p}}function a(){const s=n.length;return s>1?`${s} tags`:s===1?"1 tag":"Tags"}return f.jsx(R7,{tags:n,getTagsLabel:a,toggleAssetTag:o})}function QEe(e){const{mediaId:t,config:n,tags:r}=e;if(!n.mediaLibrary)throw new Error("Media Library not configured.");const{assetsApiBaseUrl:i,repository:o,authStrategy:a}=n;return me.request(new URL(`assets/${t}`,i),{headers:{repository:o},body:{tags:r},method:"PATCH",credentials:me.getRequestCredentials(a),okType:z0})}function zEe(){const[e,t]=E.useState("description");if(Pc().length!==1)return f.jsx(ZEe,{});const r=e==="description",i=e==="more-info";return f.jsxs(f.Fragment,{children:[f.jsxs(h.Box,{display:"grid",gridTemplateColumns:"1fr 1fr",backgroundColor:"grey2",border:!0,borderStyle:"solid",borderRadius:8,children:[f.jsx(h.Tab,{selected:r,outline:r,transparent:!0,onClick:()=>t("description"),children:"Description"}),f.jsx(h.Tab,{selected:i,outline:i,transparent:!0,onClick:()=>t("more-info"),children:"More info"})]}),f.jsx(HEe,{tab:e})]})}function HEe(e){const{tab:t}=e;switch(t){case"description":return f.jsx(YEe,{});case"more-info":return f.jsx(GEe,{})}}function YEe(){const{title:e,alt:t,onBlur:n,isUploading:r,selectedMedia:i}=F7();if(!i)return null;const{extension:o}=i;return f.jsxs(h.Box,{flexDirection:"column",gap:16,children:[f.jsx(h.FormInput,{value:e.value,onValueChange:e.set,label:"Media title",placeholder:"Media title",onBlur:n,disabled:r,suffix:o?`.${o}`:void 0}),f.jsx(h.FormInputField,{label:"Alternative text",children:f.jsx(h.ContentEditable,{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&&f.jsx(VEe,{selectedMedia:i})]})}function GEe(){const{credits:e,notes:t,onBlur:n,isUploading:r,selectedMedia:i}=F7();if(!i)return null;const{uploader_id:o}=i,a=t$e(i);return f.jsxs(h.Box,{gap:8,flexDirection:"column",children:[a.map(s=>f.jsxs(h.Box,{gap:8,children:[f.jsxs(h.Text,{color:"grey11",children:[s.label,":"]}),f.jsx(h.Text,{children:s.value})]},s.label)),f.jsxs(h.Box,{gap:8,children:[f.jsx(h.Text,{color:"grey11",children:"Uploaded by:"}),f.jsx(h.ErrorBoundary,{renderError:()=>f.jsx(h.Text,{color:"grey11",children:"Error getting uploader"}),children:f.jsx(E.Suspense,{fallback:f.jsx(O7,{}),children:f.jsx(JEe,{uploaderId:o})})})]}),f.jsx(h.FormInputField,{label:"Copyright",children:f.jsx(h.ContentEditable,{content:e.displayValue,contentVersion:e.version,readOnly:r,placeholder:"Media copyrights or credits",multiline:!0,decorations:{em:"highlight"},onChange:e.onChange,onBlur:n})}),f.jsx(h.FormInputField,{label:"Private notes",children:f.jsx(h.ContentEditable,{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 JEe(e){const{uploaderId:t}=e,{uploadersById:n}=d7(),r=n.get(t??"ghost");return t&&!r?f.jsx(O7,{}):r?f.jsxs(f.Fragment,{children:[f.jsx(h.Avatar,{size:24,firstName:r.firstName,lastName:r.lastName,imageUrl:r.uploadedAvatar,hasBorder:!1}),f.jsx(h.Text,{children:r.name})]}):null}function O7(){return f.jsx(h.Skeleton,{width:128})}function ZEe(){const e=Pc(),{uploadingFiles:t}=Ct(),n=E.useMemo(()=>t.some(r=>e.some(i=>r.id===i.id)&&r.status!=="success"),[e,t]);return f.jsx(f.Fragment,{children:!n&&f.jsx(WEe,{selectedMedia:e})})}function F7(){const[e]=Pc(),{updateMedia:t,uploadingFiles:n}=Ct(),r=Te(),{showToast:i}=E7(),o=(e==null?void 0:e.id)??"",a=qh(e,"alt"),s=qh(e,"notes"),u=qh(e,"credits"),c=qh(e,"filename",jEe),l=n.some(p=>p.id===(e==null?void 0:e.id)&&p.status!=="success");function d(){if(!e||!c.changed&&!a.changed&&!u.changed&&!s.changed)return;const{extension:p,search_highlight:A}=e,m=p?`${c.value}.${p}`:c.value;t(o,{filename:m,alt:a.value,credits:u.value,notes:s.value,search_highlight:{alt:a.changed||A==null?void 0:A.alt,credits:u.changed||A==null?void 0:A.credits,filename:c.changed||A==null?void 0:A.filename,notes:s.changed||A==null?void 0:A.notes}}),e$e({id:o,config:r,metadata:{filename:m,alt:a.value,credits:u.value,notes:s.value}}).then(()=>{i({title:"Media metadata has been saved.",seconds:3})}).catch(g=>{console.error(g)})}return{selectedMedia:e,onBlur:d,isUploading:l,title:c,alt:a,credits:u,notes:s,extension:e==null?void 0:e.extension}}function qh(e,t,n=r=>r==null?void 0:r[t]){var c;const r=n(e)??"",[i,o]=E.useState(r);Pe.useOnChange(e==null?void 0:e.id,()=>o(r));const a=(c=e==null?void 0:e.search_highlight)==null?void 0:c[t],s=!!a;function u(l){const{from:d,to:p}=l.state.selection;l.commands.selectAll(),l.commands.unsetAllMarks(),l.commands.setTextSelection({from:d,to:p}),o(l.getText())}return{value:i,set:o,displayValue:XEe(a??i)??"",onChange:u,version:`${(e==null?void 0:e.id)??""}_${s}`,changed:i!==r}}function XEe(e){return e==null?void 0:e.replace(/\n/g,"<br>")}function e$e(e){const{id:t,config:n,metadata:r}=e;if(!n.mediaLibrary)throw new Error("Media Library not configured.");const{assetsApiBaseUrl:i,repository:o,authStrategy:a}=n;return me.request(new URL(`assets/${t}`,i),{headers:{repository:o},body:{...r},method:"PATCH",credentials:me.getRequestCredentials(a),okType:z0})}function t$e(e){const{width:t,height:n,last_modified:r,size:i,extension:o}=e,a=t&&n,s={label:"Date",value:tS.prettyPrintDate(new Date(r))},u={label:"File size",value:Ep.formatBytes(i)},c=a?{label:"Dimensions",value:`${t}×${n}`}:void 0,l=a?{label:"Ratio",value:((t??0)/(n??0)).toFixed(1)}:void 0,d=o?{label:"Extension",value:o.toUpperCase()}:void 0;return[s,u,c,l,d].filter(io.isDefined)}function n$e(){const{setTagManagerOpen:e}=Ct(),[t,n]=E.useState("");return f.jsxs(h.Box,{gap:20,flexDirection:"column",height:"100%",children:[f.jsxs(h.Box,{alignItems:"center",gap:4,children:[f.jsx(h.IconButton,{icon:"close",size:"small",hasPadding:!1,onClick:()=>e(!1)}),f.jsx(h.Text,{variant:"bold",children:"Tags management"})]}),f.jsxs(h.Box,{gap:16,flexDirection:"column",height:"100%",children:[f.jsx(h.FormSearchInput,{value:t,onValueChange:n,placeholder:"Search for tags",endAdornment:!1,autoFocus:!0}),f.jsx(h.ErrorBoundary,{renderError:()=>f.jsx(a$e,{}),children:f.jsx(E.Suspense,{fallback:f.jsx(c$e,{}),children:f.jsx(r$e,{searchTerm:t})})})]})]})}function r$e(e){const{searchTerm:t}=e,{tags:n}=Ih(),r=n.filter(i=>i.name.toLowerCase().includes(t.toLowerCase()));return r.length===0?f.jsx(h.Text,{color:"grey9",variant:"small",children:"No tags found"}):f.jsx(h.AnimatedList,{ariaLabel:"Tags list",getItemKey:i=>i.id,gap:16,items:r,children:i=>f.jsx(i$e,{tag:i})})}function i$e(e){const{tag:t}=e,[n,r]=E.useState(!1),i=Te(),{showAlert:o}=h.useAlert(),{showToast:a}=h.useToast(),{tags:s}=Ih();async function u(c){if(!qR.safeParse(c).success){o({title:"Error",subtitle:`Failed to rename tag "${t.name}" to "${c}". Tag name must be at least ${o7} and at maximum ${a7} characters long.`});return}if(s.some(p=>p.name===c)){o({title:"Error",subtitle:`Failed to rename tag "${t.name}" to "${c}". Tag with name "${c}" already exists.`});return}try{await u$e({id:t.id,name:c,config:i}),Th(p=>p.map(A=>A.id===t.id?{...A,name:c}:A)),Lu(p=>p.map(A=>{if(A.tags.findIndex(g=>g.id===t.id)!==-1){const g=A.tags.map(_=>_.id===t.id?{..._,name:c}:_);return{...A,tags:g}}return A})),a({title:`Tag "${t.name}" renamed to "${c}"`,seconds:3})}catch{o({title:"Error",subtitle:"Something went wrong when renaming the tag."})}}return f.jsxs(f.Fragment,{children:[f.jsxs(h.Box,{justifyContent:"space-between",children:[f.jsx(h.Badge,{title:t.name,color:"purple",size:"medium",onEdit:u}),f.jsx(h.Button,{invisible:!0,color:"tomato",textWeight:"normal",onClick:()=>r(!0),children:"Delete"})]}),f.jsx(o$e,{open:n,onOpenChange:r,tag:t})]})}function o$e(e){const{open:t,onOpenChange:n,tag:r}=e,{id:i,name:o,count:a}=r,s=Te(),{showAlert:u}=h.useAlert(),[c,l]=E.useState(!1);async function d(){l(!0);try{await s$e({id:i,config:s}),Th(p=>p.filter(A=>A.id!==i)),Lu(p=>p.map(A=>{if(A.tags.findIndex(g=>g.id===i)!==-1){const g=A.tags.filter(_=>_.id!==i);return{...A,tags:g}}return A}))}catch{u({title:"Error",subtitle:"Something went wrong when removing the tag."})}finally{l(!1),n(!1)}}return f.jsxs(h.Dialog,{onOpenChange:n,open:t,size:"small",children:[f.jsx(h.DialogHeader,{title:`This tag is being used on ${a} media item${a===1?"":"s"}`}),f.jsx(h.DialogContent,{padding:16,children:f.jsxs(h.Text,{children:["You are about to delete the tag name ",f.jsx("b",{children:o}),"."," ",a>0&&`This tag is being
33
33
  used on ${a} media item${a===1?"":"s"} and will be deleted
34
34
  from ${a===1?"it":"them"}.`]})}),f.jsxs(h.DialogActions,{children:[f.jsx(h.DialogCancelButton,{}),f.jsx(h.DialogActionButton,{onClick:d,color:"tomato",loading:c,children:"Yes, I want to delete"})]})]})}function a$e(){const e=E.useContext(Ke.ErrorBoundaryContext);return f.jsx(h.Box,{flexDirection:"column",children:f.jsxs(h.BlankSlate,{children:[f.jsx(h.BlankSlateIcon,{name:"close",lineColor:"purple10",backgroundColor:"purple3",borderColor:"purple6",borderStyle:"dashed"}),f.jsx(h.BlankSlateTitle,{size:"big",children:"Oops!"}),f.jsx(h.BlankSlateDescription,{width:360,children:"We couldn't load your media tags."}),f.jsx(h.BlankSlateActions,{children:f.jsx(h.Button,{onClick:e==null?void 0:e.reset,size:"medium",children:"Try again"})})]})})}function s$e(e){const{id:t,config:n}=e;n.mediaLibrary||Ht("mediaLibrary");const{assetsApiBaseUrl:r,repository:i,authStrategy:o}=n;return me.request(new URL(`tags/${t}`,r),{headers:{repository:i},method:"DELETE",credentials:me.getRequestCredentials(o),okType:L.unknown()})}function u$e(e){const{id:t,name:n,config:r}=e;r.mediaLibrary||Ht("mediaLibrary");const{assetsApiBaseUrl:i,repository:o,authStrategy:a}=r;return me.request(new URL(`tags/${t}`,i),{headers:{repository:o},method:"PATCH",credentials:me.getRequestCredentials(a),body:{name:n},okType:L.unknown()})}function c$e(){return f.jsx(h.Box,{flexDirection:"column",gap:16,children:kt.range(1,6).map(e=>f.jsxs(h.Box,{justifyContent:"space-between",children:[f.jsx(h.Skeleton,{height:24,width:85}),f.jsx(h.Skeleton,{height:24,width:45})]},e))})}function l$e(){const e=Pc(),{onFilesUpload:t,isUploading:n,tagManagerOpen:r}=Ct();return e.length===0&&r===!1?f.jsx(I7,{onFilesUpload:t,isUploading:n}):f.jsx(h.Box,{flexDirection:"column",backgroundColor:"grey1",width:"100%",padding:16,gap:16,borderRadius:{topLeft:8,topRight:8},children:r?f.jsx(n$e,{}):f.jsxs(f.Fragment,{children:[f.jsx(yEe,{}),f.jsx(SEe,{}),f.jsx(zEe,{})]})})}function f$e(){const e=qs();return f.jsx(_7,{hasSelectedMedia:e.selectedCount!==0,children:f.jsx(l$e,{})})}const fC={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"}},d$e=Object.entries(fC);function p$e(){const{assetType:e,initialAssetType:t,onFilterChange:n}=Ct(),[r,i]=E.useState(e);Pe.useOnChange(e,()=>{i(e)});const[o,a]=E.useState(!1);function s(p){a(!1),i(p),n({assetType:p})}const{icon:u,name:c}=fC[r],l=fC[t].name,d=t!=="all";return f.jsxs(h.DropdownMenu,{open:o,onOpenChange:a,children:[f.jsx(h.DropdownMenuTrigger,{disabled:d,children:f.jsx(A$e,{icon:u,isDropdownDisabled:d,buttonName:c,tooltipAssetTypeName:l})}),f.jsx(h.DropdownMenuContent,{minWidth:256,align:"start",childrenFocusScope:!0,children:f.jsx(f.Fragment,{children:d$e.filter(([p])=>p!==r).map(([p,{icon:A,name:m}])=>f.jsx(h.DropdownMenuItem,{startIcon:f.jsx(h.Icon,{name:A}),onSelect:()=>s(p),children:m},p))})})]})}const A$e=E.forwardRef(function(t,n){const{icon:r,isDropdownDisabled:i,buttonName:o,tooltipAssetTypeName:a,...s}=t;return f.jsx(h.Tooltip,{content:`You can only pick ${(a==null?void 0:a.toLocaleLowerCase())??"this type of media"}`,visible:i,children:f.jsx(h.Button,{startIcon:r,endIcon:"arrowDropDown",size:"small",color:"grey",disabled:i,ref:n,...s,children:o})})});function h$e(e){const{optimisticTagIds:t,setOptimisticTagIds:n}=e,{onFilterChange:r}=Ct(),{tags:i}=Ih(),o=E.useMemo(()=>sz.groupBy(i,s=>s.id),[i]);function a(s){const u=t.filter(c=>c!==s.id);n(u),r({tagIds:u})}return f.jsx(f.Fragment,{children:t.map(s=>{var c;const u=(c=o.get(s))==null?void 0:c[0];return u?f.jsx(h.Badge,{title:u.name,size:"medium",color:"purple",onClose:()=>a(u),selected:!0},u.id):null})})}function m$e(){const{setTagManagerOpen:e,tagIds:t,onFilterChange:n}=Ct(),[r,i]=E.useState(""),[o,a]=E.useState(!1),[s,u]=E.useState(t);Pe.useOnChange(JSON.stringify(t),()=>{u(t)});function c(p){a(p),p||i("")}function l(p){const A=s.includes(p.id)?t.filter(m=>m!==p.id):[...t,p.id];u(A),n({tagIds:A}),a(!1)}function d(){a(!1),e(!0)}return f.jsxs(f.Fragment,{children:[f.jsxs(h.DropdownMenu,{open:o,onOpenChange:c,children:[f.jsx(h.DropdownMenuTrigger,{children:f.jsx(h.Button,{startIcon:"label",endIcon:"arrowDropDown",size:"small",color:"grey",children:"Tags"})}),f.jsx(h.DropdownMenuContent,{minWidth:256,align:"start",border:!1,childrenFocusScope:!0,children:f.jsxs(h.ComboBox,{variant:"attached",children:[f.jsx(h.ComboBoxInput,{value:r,onValueChange:i,placeholder:"Search for a tag",autoFocus:!0}),f.jsx(h.ComboBoxContent,{paddingBlock:4,children:f.jsx(h.ErrorBoundary,{renderError:()=>f.jsx(h.Text,{color:"grey9",variant:"small",sx:{marginBlock:8,marginInline:8},children:"Error getting tags"}),children:f.jsx(E.Suspense,{fallback:f.jsx(h.Box,{padding:8,flexDirection:"column",gap:8,children:kt.range(1,6).map(p=>f.jsx(h.Skeleton,{height:24,width:85},p))}),children:f.jsx(g$e,{searchTerm:r,setSearchTerm:i,onTagToggle:l,optimisticTagIds:s})})})}),f.jsx(h.ComboboxAction,{children:f.jsx(h.Button,{invisible:!0,startIcon:"edit",textWeight:"normal",color:"dark",onClick:d,children:"Manage tags"})})]})})]}),s.length>0&&f.jsx(h.ErrorBoundary,{children:f.jsx(E.Suspense,{children:f.jsx(h$e,{optimisticTagIds:s,setOptimisticTagIds:u})})})]})}function g$e(e){const{onTagToggle:t,searchTerm:n,optimisticTagIds:r}=e,{tags:i}=Ih(),o=E.useMemo(()=>{const a=n.toLowerCase();return i.filter(s=>s.name.toLowerCase().includes(a))},[i,n]);return f.jsxs(f.Fragment,{children:[!o.length&&f.jsx(h.Text,{color:"grey9",variant:"small",sx:{marginBlock:8,marginInline:8},children:"No tags found"}),o.map(a=>{const s=r.includes(a.id);return f.jsx(h.ComboBoxItem,{value:a.id,onCheckedChange:()=>t(a),checked:s,children:f.jsx(h.Badge,{title:a.name,color:"purple",sx:{marginLeft:8,marginBottom:4,marginTop:4},size:"medium"})},a.id)})]})}function v$e(){const{uploaderId:e,onFilterChange:t}=Ct(),[n,r]=E.useState(""),[i,o]=E.useState(!1),[a,s]=E.useState();Pe.useOnChange(e,()=>{e||s(void 0)});function u(l){o(l),l||r("")}function c(l){s(l),t({uploaderId:l==null?void 0:l.id}),o(!1)}return f.jsxs(h.DropdownMenu,{open:i,onOpenChange:u,children:[f.jsx(h.DropdownMenuTrigger,{children:f.jsx(h.Button,{startIcon:"people",renderStartIcon:l=>a?f.jsx(h.Avatar,{imageUrl:a==null?void 0:a.uploadedAvatar,firstName:a.firstName,lastName:a.lastName,size:16,hasBorder:!1}):l,endIcon:"arrowDropDown",size:"small",color:"grey",children:(a==null?void 0:a.name)??"All uploaders"})}),f.jsx(h.DropdownMenuContent,{minWidth:256,align:"start",border:!1,childrenFocusScope:!0,children:f.jsxs(h.ComboBox,{variant:"attached",children:[f.jsx(h.ComboBoxInput,{value:n,onValueChange:r,placeholder:"Search for uploaders",autoFocus:!0}),f.jsx(h.ComboBoxContent,{paddingBlock:4,children:f.jsx(h.ErrorBoundary,{renderError:()=>f.jsx(h.Text,{color:"grey9",variant:"small",sx:{marginBlock:8,marginInline:8},children:"Error getting uploaders"}),children:f.jsx(E.Suspense,{fallback:f.jsx(b$e,{}),children:f.jsx(y$e,{searchTerm:n,setSearchTerm:r,onUploaderToggle:c,optimisticUploader:a})})})})]})})]})}function y$e(e){const{searchTerm:t,optimisticUploader:n,onUploaderToggle:r}=e,{uploaders:i}=d7(),o=E.useMemo(()=>{const a=t.toLowerCase();return kt.sort(i.filter(s=>{var u;return s.name.toLowerCase().includes(a)||((u=s.email)==null?void 0:u.toLowerCase().includes(a))}),s=>(n==null?void 0:n.id)===(s==null?void 0:s.id)?0:1)},[i,n,t]);return o.length?f.jsx(f.Fragment,{children:o.map(a=>{const s=a.id===(n==null?void 0:n.id);return f.jsx(h.ComboBoxItem,{value:a.id,onCheckedChange:()=>s?r():r(a),checked:s,children:f.jsxs(h.Box,{alignItems:"center",padding:{top:8,bottom:8,left:16,right:16},gap:8,children:[f.jsx(h.Avatar,{firstName:a.firstName,lastName:a.lastName,imageUrl:a.uploadedAvatar,hasBorder:!1}),f.jsxs(h.Box,{display:"flex",flexDirection:"column",children:[f.jsx(h.Text,{color:"grey12",variant:"normal",children:a.name}),a.email&&f.jsx(h.Text,{color:"grey10",variant:"small",children:a.email})]})]})},a.id)})}):f.jsx(h.Text,{color:"grey9",variant:"small",sx:{marginBlock:8,marginInline:8},children:"No uploaders found"})}function b$e(){return f.jsx(h.Box,{padding:8,flexDirection:"column",gap:8,children:kt.range(1,4).map(e=>f.jsx(h.Skeleton,{height:48,width:"full"},e))})}function C$e(){const{media:e,mediaTotal:t}=Ct(),n=qs();return f.jsxs(h.Box,{alignItems:"center",gap:16,children:[n.isSelectAllEnabled&&f.jsx(h.Checkbox,{onCheckedChange:n.toggleSelectAll,checked:n.selectedCount>0,indeterminate:n.selectedCount!==t,onClick:r=>r.stopPropagation(),disabled:e.length===0}),e.length!==0&&f.jsx(T7,{count:t}),f.jsxs(h.Box,{gap:8,alignItems:"center",children:[f.jsx(h.Text,{children:"Filter:"}),f.jsx(p$e,{}),f.jsx(v$e,{}),f.jsx(m$e,{})]})]})}function k7(e){const{assetType:t,onSelectedChange:n,actionContainerRef:r}=e;return f.jsx(h.ErrorBoundary,{renderError:()=>f.jsx(b7,{}),children:f.jsx(E.Suspense,{fallback:f.jsx(pEe,{actionContainerRef:r}),children:f.jsx(Lq,{children:f.jsx(iEe,{assetType:t,actionContainerRef:r,onSelectedChange:n,children:f.jsx(lEe,{children:f.jsx(S$e,{})})})})})})}function S$e(){const{media:e}=Ct(),t=m7();return f.jsx(gEe,{children:f.jsx(C7,{sidePane:t?void 0:f.jsx(f$e,{}),mediaActions:f.jsx(uEe,{}),mediaToolbar:f.jsx(C$e,{}),mediaList:e.length===0?f.jsx(aEe,{}):f.jsx(dEe,{})})})}function _$e(e){const{href:t}=e;return f.jsx(h.Box,{justifyContent:"center",padding:{block:6},children:f.jsxs(h.Text,{href:t,variant:"smallBold",color:"grey11",children:["Or watch our in-depth course",f.jsx(h.Icon,{name:"playCircle",color:"grey11",size:"small",sx:{marginLeft:4}})]})})}function I$e(e){const{step:t,stepIndex:n,isOpen:r,onActionClick:i,onClose:o,contentRef:a}=e,[s,u]=E.useState(!1),[c,l]=E.useState(e.isStepComplete);E.useEffect(()=>{r&&l(e.isStepComplete)},[e.isStepComplete,r]);async function d(){if(r)try{u(!0),await i(c)}finally{u(!1)}}return f.jsxs(h.Dialog,{open:r,onOpenChange:o,size:"small",children:[f.jsx(h.DialogHeader,{title:"Onboarding"}),f.jsxs(h.DialogContent,{children:[f.jsx(h.ScrollArea,{children:f.jsxs(h.Box,{ref:a,as:"article",flexDirection:"column",padding:16,gap:16,children:[f.jsxs("section",{children:[f.jsxs(h.Text,{sx:{marginBottom:4},color:"purple9",variant:"bold",children:["Step ",n+1]}),f.jsx(h.Text,{variant:"h3",children:t.title}),t.content]}),t.videoUrl&&f.jsx(h.Video,{src:t.videoUrl,sizing:"contain",borderRadius:4,autoPlay:!0,loop:!0})]})}),f.jsxs(h.DialogActions,{children:[f.jsx(h.DialogCancelButton,{size:"medium",children:"Close"}),!t.defaultCompleted&&f.jsx(h.DialogActionButton,{size:"medium",onClick:d,loading:s,color:c?"darkGrey":"purple",children:c?"Undo step":"Complete step"})]})]})]})}function T$e(e){const{steps:t,completedSteps:n,onToggleStep:r,tracking:i,stepOverrides:o}=e,[a,s]=E.useState(!1),[u,c]=E.useState(t[0]),l=E.useRef(null);if(!u)return null;const d=t.findIndex(({id:_})=>_===u.id);function p(_){return n.includes(_.id)}function A(_){c(_),s(!0),i.track({event:"shared-onboarding:step-opened",stepId:_.id,stepTitle:_.title,source:i.source})}async function m(_=!1){var b;if(u&&(await r(u),!_)){(b=l.current)==null||b.animate([{opacity:0},{opacity:1}],{duration:400});const I=g();I?A(I):s(!1)}}function g(){let _=d+1;for(;_<t.length;){const b=t[_];if(b&&!p(b))return b;_++}}return f.jsxs(f.Fragment,{children:[f.jsx(I$e,{contentRef:l,isOpen:a,step:u,stepIndex:d,isStepComplete:p(u),onClose:()=>s(!1),onActionClick:m}),f.jsxs(h.DropdownMenu,{children:[f.jsx(h.DropdownMenuTrigger,{children:f.jsx(h.Button,{size:"large",color:"grey",sx:{width:"100%"},renderStartIcon:x$e,children:n.length>0?"Continue":"Start now"})}),f.jsxs(h.DropdownMenuContent,{side:"right",minWidth:256,collisionPadding:8,children:[f.jsx(h.DropdownMenuLabel,{children:f.jsx(h.Text,{variant:"small",color:"grey11",sx:{marginInline:8},children:"Progress"})}),t.map((_,b)=>{const I=p(_);return f.jsx(h.DropdownMenuItem,{onSelect:(o==null?void 0:o[_.id])??(()=>A(_)),description:_.description,completed:I,endAdornment:f.jsx(h.Icon,{name:"chevronRight",size:"small",color:"grey11"}),children:`${b+1} ${_.title}`},_.id)})]})]})]})}function x$e(){return f.jsx(h.Icon,{name:"arrowForward",size:"small",color:"grey11"})}function w$e(e){const{steps:t,completedSteps:n,tutorialLink:r,tracking:i,onToggleStep:o,onClose:a,stepOverrides:s}=e,u=n.length===t.length;return f.jsx(h.Card,{variant:u?"elevated":"animated-light",paddingBlock:16,onClose:a,children:f.jsxs(h.CardContent,{children:[f.jsxs("div",{children:[f.jsx(h.Text,{variant:"bold",children:`Build your first page in ${t.length.toString()} simple steps`}),f.jsx(h.Text,{color:"grey11",variant:"small",children:"Render a live page with content coming from Prismic."})]}),f.jsx(h.ProgressBar,{value:n.length,max:t.length,displayLabel:!0,getValueLabel:(c,l)=>`${c}/${l}`}),f.jsx(T$e,{steps:t,completedSteps:n,onToggleStep:o,tracking:i,stepOverrides:s}),r&&f.jsx(_$e,{href:r})]})})}function E$e(e){const{framework:t,starter:n,projectName:r,repositoryName:i}=e,{frameworkNameLabel:o,createProjectCodeSnippet:a}=$$e(e),s=[{id:"createPrismicProject",title:"Create your Prismic project",description:"Create and set up your project",defaultCompleted:!0,content:f.jsx(h.Text,{children:"A Prismic project is a space for managing and organizing the content of your website."})},{id:"chooseLocale",title:"Select your main locale",description:"Choose your first locale",defaultCompleted:!!n,content:f.jsx(h.Text,{children:"Locales allow you to create and manage multilingual versions of your content within a single Prismic project."})},{id:"createProject",title:`Create a ${o}project`,description:"Create and set up your project",videoUrl:"https://res.cloudinary.com/dmtf1daqp/video/upload/v1727768069/DEV_TOOLS/ONBOARDING_GUIDE/Pagebuilder_onboarding_step_3_puh6fx.mp4",content:f.jsxs(f.Fragment,{children:[f.jsx(h.Text,{sx:{marginBottom:16},children:"Now that you have a Prismic project to manage the content of your website, let's create the code project that will be querying your content."}),!!a&&f.jsx(U1,{code:`${a} ${i??"<my-project>"}`,language:"bash"}),f.jsx(h.Text,{variant:"small",sx:{marginTop:16},children:"(example for Next.js below)"})]})},{id:"setupSliceMachine",title:"Set Up & run Slice Machine",description:"Prepare the code to fetch content",videoUrl:"https://res.cloudinary.com/dmtf1daqp/video/upload/v1727768069/DEV_TOOLS/ONBOARDING_GUIDE/page_builder_onboarding_step_4_yl8fb8.mp4",content:f.jsxs(f.Fragment,{children:[f.jsx(h.Text,{sx:{marginBottom:16},children:`Slice Machine is the Prismic tool for creating your content models.
35
35
  Install it in your ${o}project by running these commands:`}),f.jsx(U1,{code:`cd ${r??"<your project name>"}
36
- npx @slicemachine/init@latest --repository ${i??"<my-project>"}`,language:"bash",title:"Terminal",showLineNumbers:!1})]})},{id:"createPageType",title:"Create a Page Type",description:"Build the structure of your page",videoUrl:"https://res.cloudinary.com/dmtf1daqp/video/upload/v1721918320/DEV_TOOLS/ONBOARDING_GUIDE/Create_page_type_xdn13j.mp4",content:f.jsx(h.Text,{children:"A page type is a base content structure editors will use to create pages in the Page Builder (Prismic's content creation UI). A page type can be reusable (e.g., for multiple blog posts) or single (e.g., for a one-time page like the homepage)."})},{id:"codePage",title:"Code Your Page Type",description:"Prepare code to fetch content",videoUrl:"https://res.cloudinary.com/dmtf1daqp/video/upload/v1721918320/DEV_TOOLS/ONBOARDING_GUIDE/Step2_code_your_page_jatiur.mp4",content:f.jsx(h.Text,{children:"Prepare your code to query the content from the Prismic API."})},{id:"createSlice",title:"Create a Slice",description:"Build a reusable website section",videoUrl:"https://res.cloudinary.com/dmtf1daqp/video/upload/v1721918322/DEV_TOOLS/ONBOARDING_GUIDE/Step3_add_slice_qzmvxf.mp4",content:f.jsx(h.Text,{children:"Slices are website sections that can be reused on different pages with different content. Each slice has a code component automatically generated by Slice Machine. Start with a template and look at your code to see how it's structured."})},{id:"reviewAndPush",title:"Review and Push changes",description:"Enable editors to create content",videoUrl:"https://res.cloudinary.com/dmtf1daqp/video/upload/v1721918320/DEV_TOOLS/ONBOARDING_GUIDE/DevTools_Squad_push_changes_ovvmul.mp4",content:f.jsx(h.Text,{children:"Your page types and slices currently exist only in your local project. Push them to your repository to make them available for your content editors."})},{id:"createContent",title:"Create Content",description:"Publish a page to the Prismic API",videoUrl:"https://res.cloudinary.com/dmtf1daqp/video/upload/v1721918324/DEV_TOOLS/ONBOARDING_GUIDE/Cre%CC%81er_contenu_e%CC%81tape_4_z9vlzt.mp4",content:f.jsx(h.Text,{children:"In Prismic, content creation takes place in the Prismic Page Builder UI. Open the Page Builder and start creating your first page."})},{id:"renderPage",title:"Render Your Page",description:"View your page in the browser",videoUrl:"https://res.cloudinary.com/dmtf1daqp/video/upload/v1721918321/DEV_TOOLS/ONBOARDING_GUIDE/Step_6_Render_Page_tnauh9.mp4",content:f.jsxs(h.Text,{children:["Now that your content is published, you can run your project in your terminal and visit the page on your local server (e.g.,"," ",f.jsx(h.Text,{component:"code",children:"localhost:3000/example-page"}),"). Your content should now be visible!"]})}],u={next:"https://prismic.dev/course/next",nuxt:"https://prismic.dev/course/nuxt",sveltekit:"https://prismic.dev/course/sveltekit"};return{steps:s,defaultCompletedStepIds:s.flatMap(c=>c.defaultCompleted?[c.id]:[]),tutorialLink:t?u[t]:void 0}}function $$e(e){const{framework:t}=e;if(!t||t==="other")return{frameworkNameLabel:"",createProjectCodeSnippet:""};const n=QM[t];return{frameworkNameLabel:n?`${n} `:"",createProjectCodeSnippet:zM[t]}}const Jb=3e3,tk=400;function R$e(e){const{onboardingState:t,tracking:n,onToggleStep:r,onToggleGuide:i,fallback:o=null,stepOverrides:a,repositoryName:s,projectName:u}=e,{context:c,isDismissed:l}=t,{steps:d,defaultCompletedStepIds:p,tutorialLink:A}=E$e({...c,repositoryName:s,projectName:u}),m=I(t.completedSteps),g=O$e(_,tk);if(Pe.useOnChange(l,()=>!l&&g.reset()),c.framework==="other")return f.jsx(f.Fragment,{children:o});function _(){i()}async function b(x){const v=await r(x.id);v.includes(x.id)&&n.track({event:"shared-onboarding:step-completed",stepId:x.id,stepTitle:x.title,source:n.source}),I(v).length===d.length&&(n.track({event:"shared-onboarding:completed",source:n.source}),g.start())}function I(x){const v=d.map(({id:S})=>S);return Array.from(new Set([...x.filter(S=>v.includes(S)),...p]))}return l?null:f.jsx(h.AnimatedElement,{enterDuration:0,exitDuration:tk,children:g.status!=="hidden"&&f.jsxs("div",{ref:g.refs.container,style:{position:"relative"},children:[f.jsx(w$e,{steps:d,completedSteps:m,tutorialLink:A,tracking:n,onToggleStep:b,onClose:g.status!=="animating"?_:void 0,stepOverrides:a}),f.jsx("div",{ref:g.refs.cannon,style:{position:"absolute",bottom:0,left:0}})]})})}function O$e(e,t=400){const n=cz.useConfetti({config:{duration:Jb}}),[r,i]=E.useState("visible"),o=E.useRef(!1),a=E.useCallback(()=>{i("animating"),setTimeout(()=>i("hidden"),Jb-t),o.current||(setTimeout(e,Jb),o.current=!0)},[e,t]),s=()=>{n.throwConfetti(),a()},u=E.useCallback(()=>{i("visible"),o.current=!1},[]);return{refs:{container:n.confettiContainerRef,cannon:n.confettiCannonRef},status:r,start:s,reset:u}}const M7=E.createContext({editedUID:{current:!1},onEditUID:()=>{}});function L7(e){return Object.values(e.json).some(t=>{var n;return((n=t.uid)==null?void 0:n.type)==="UID"})}function F$e(e){const{content:t,customType:n}=e;return L7(n)&&!t.uid}function j7(e){const{documentId:t,documentsWithUid:n,uid:r}=e;return n.filter(i=>t!==i.id&&M$e({document:i,uid:r})&&k$e({...e,document:i}))}function k$e(e){const{customTypeId:t,languageId:n,document:r}=e,i=t===r.custom_type_id,o=n===r.language.id;return i&&o}function M$e(e){const{document:t,uid:n}=e,r=t.versions.filter(i=>i.uid===n);return r.length===0?!0:r.some(i=>i.status!=="archived")}const Ul=E.createContext(void 0);function L$e(e){const{customTypeFormat:t,children:n}=e,r=E.useMemo(()=>({customTypeFormat:t,isInSlice:!1,isInGroup:!1}),[t]);return f.jsx(Ul.Provider,{value:r,children:n})}function j$e(e){const{children:t}=e,n=E.useContext(Ul),r=E.useMemo(()=>n&&{...n,isInSlice:!0},[n]);return f.jsx(Ul.Provider,{value:r,children:t})}function U$e(e){const{children:t}=e,n=E.useContext(Ul),r=E.useMemo(()=>n&&{...n,isInGroup:!0},[n]);return f.jsx(Ul.Provider,{value:r,children:t})}function B$e(){return E.useContext(Ul)}function H0(e,t){return`${e}___${t}`}const U7=E.createContext({ids:[],isSelected:()=>!1,update:()=>{}});function Y0(){return E.useContext(U7)}function nr(e){var t;return((t=e.config)==null?void 0:t.label)??(e.type==="Boolean"||e.type==="Separator"?void 0:e.fieldset)??e.type}const QR="...";function P$e(e,t,n=QR){var r,i;return(t?(r=e.config)==null?void 0:r.placeholder_true:(i=e.config)==null?void 0:i.placeholder_false)||n}function Dc(e,t=QR){var n;return((n=e.config)==null?void 0:n.placeholder)||t}function D$e(e){var s;const{content:t,field:n,id:r,readOnly:i,onContentChange:o}=e,a=(t==null?void 0:t.value)??((s=n.config)==null?void 0:s.default_value)??!1;return f.jsxs(h.Field,{children:[f.jsx(h.FieldIcon,{name:"biToggle"}),f.jsx(h.FieldLabel,{htmlFor:r,children:nr(n)}),f.jsxs(h.FieldControl,{children:[f.jsx(h.Box,{padding:4,alignItems:"center",children:f.jsx(h.Text,{children:P$e(n,a)})}),f.jsx(h.Switch,{id:r,sx:{alignSelf:"center",marginLeft:"auto",marginRight:12},checked:a,onCheckedChange:u=>{i||o(W$e(u))}})]})]})}function W$e(e){return{__TYPE__:"BooleanContent",value:e}}function K$e(e){const{id:t,field:n,content:r,onContentChange:i}=e;return f.jsxs(h.Field,{children:[f.jsx(h.FieldIcon,{name:"colorLens"}),f.jsx(h.FieldLabel,{id:t,children:nr(n)}),f.jsx(h.FieldControl,{children:f.jsx(h.Box,{padding:{left:4},alignItems:"center",children:f.jsx(h.ColorInput,{onValueChange:o=>i(N$e(o)),value:r==null?void 0:r.value,"aria-labelledby":t,placeholder:Dc(n)})})})]})}function N$e(e){return e===void 0?void 0:{__TYPE__:"FieldContent",type:"Color",value:e}}function q$e(e){const{id:t,readOnly:n,field:r,content:i,onContentChange:o}=e,a=i!=null&&i.value?tS.dateFromISOString(i.value):void 0;return f.jsxs(h.Field,{children:[f.jsx(h.FieldIcon,{name:"dateRange"}),f.jsx(h.FieldLabel,{id:t,children:nr(r)}),f.jsx(h.FieldControl,{children:f.jsx(h.Box,{padding:{left:4,right:12},width:"100%",flexDirection:"column",justifyContent:"center",children:f.jsx(h.DateInput,{mode:"date","aria-labelledby":t,disabled:n,value:a,onValueChange:s=>o(V$e(s))})})})]})}function V$e(e){if(e)return{__TYPE__:"FieldContent",type:"Date",value:Q$e(e)}}function Q$e(e){const t=`${e.getFullYear()}`.padStart(4,"0"),n=`${e.getMonth()+1}`.padStart(2,"0"),r=`${e.getDate()}`.padStart(2,"0");return`${t}-${n}-${r}`}const Vs=E.forwardRef(function(t,n){return f.jsx(h.TextInput,{padding:B7,...t,ref:n,sx:{...t.sx,alignSelf:"stretch"}})}),B7={input:{inline:4},adornment:{inline:12}},z$e=({provider:e})=>H$e[e.toLowerCase()]??f.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("g",{clipPath:"url(#clip0_6524_22412)",children:f.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"})}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_6524_22412",children:f.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),H$e={codepen:f.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("g",{clipPath:"url(#clip0_6523_22409)",children:f.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"})}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_6523_22409",children:f.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),codesandbox:f.jsxs("svg",{width:"14",height:"16",viewBox:"0 0 14 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("g",{clipPath:"url(#clip0_6523_22406)",children:f.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"})}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_6523_22406",children:f.jsx("rect",{width:"13.8378",height:"16",fill:"white"})})})]}),dailymotion:f.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsxs("g",{clipPath:"url(#clip0_6523_22345)",children:[f.jsx("path",{d:"M16 0H0V16H16V0Z",fill:"white"}),f.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"})]}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_6523_22345",children:f.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),flickr:f.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("rect",{width:"16",height:"16",fill:"white"}),f.jsxs("g",{clipPath:"url(#clip0_6523_22379)",children:[f.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"}),f.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"})]}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_6523_22379",children:f.jsx("rect",{width:"12",height:"5.568",fill:"white",transform:"translate(2 5)"})})})]}),giphy:f.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("rect",{width:"16",height:"16",fill:"#121212"}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4 3.38889V12.2778H5.11111V3.38889H4Z",fill:"#00FF99"}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.6663 5.61111V12.2778H11.7774V5.61111H10.6663Z",fill:"#9933FF"}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.75 3H4V4.11111H8.83333V3H7.75Z",fill:"#FFF35C"}),f.jsx("path",{d:"M9.00041 4.11111H7.33374H8.83374V3.77778L9.00041 4.11111Z",fill:"#999999"}),f.jsx("path",{d:"M8.83374 4.11111H7.33374L8.44485 3L8.83374 3.77778V4.11111Z",fill:"#999237"}),f.jsx("path",{d:"M10.6663 7.44444V5.77778L11.7774 6.33333L10.6663 7.44444Z",fill:"#5C1F99"}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.6667 11.8889H4V13H11.7778V11.8889H10.6667Z",fill:"#00CCFF"}),f.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:f.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:[f.jsxs("g",{clipPath:"url(#clip0_6523_22356)",children:[f.jsx("mask",{id:"mask0_6523_22356",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"16",height:"16",children:f.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"})}),f.jsxs("g",{mask:"url(#mask0_6523_22356)",children:[f.jsx("mask",{id:"mask1_6523_22356",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"-1",y:"-1",width:"18",height:"18",children:f.jsx("path",{d:"M16.5905 -0.583628H-0.603516V16.6106H16.5905V-0.583628Z",fill:"white"})}),f.jsxs("g",{mask:"url(#mask1_6523_22356)",children:[f.jsx("mask",{id:"mask2_6523_22356",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"-1",y:"-1",width:"18",height:"18",children:f.jsx("path",{d:"M16.6701 -0.663237H-0.683105V16.6902H16.6701V-0.663237Z",fill:"white"})}),f.jsxs("g",{mask:"url(#mask2_6523_22356)",children:[f.jsx("mask",{id:"mask3_6523_22356",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"-1",y:"-1",width:"18",height:"18",children:f.jsx("path",{d:"M16.6701 -0.663237H-0.683105V16.6902H16.6701V-0.663237Z",fill:"white"})}),f.jsx("g",{mask:"url(#mask3_6523_22356)",children:f.jsx("rect",{x:"-0.688721",y:"-0.665792",width:"17.3622",height:"17.3622",fill:"url(#pattern0)"})})]})]})]})]}),f.jsxs("defs",{children:[f.jsx("pattern",{id:"pattern0",patternContentUnits:"objectBoundingBox",width:"1",height:"1",children:f.jsx("use",{xlinkHref:"#image0_6523_22356",transform:"scale(0.000439947)"})}),f.jsx("clipPath",{id:"clip0_6523_22356",children:f.jsx("rect",{width:"16",height:"16",fill:"white"})}),f.jsx("image",{id:"image0_6523_22356",width:"2273",height:"2275",xlinkHref:"data:image/jpeg;base64,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Hbvsfww7d9j+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/hh26jfww7dRv4Yduo38MO3Ub+GHbqN/DDt1G/hh26jfww7dRv4Yduo38MO3Ub+GHbqN/DDt1G/hh26jfww7dRv4Yduo38MO3Ub+GHbqN/DDt1G/hh26j+GHbqP4Yduo38MO3Ub+GHbqP4Yduo/hh26j+GHbmP4YduY/hh25j+GHbmP4YduY/hh25j+GHbmP4YduY/hh25j+GHbmP4YduY/hh25j+GHbmP4YduY/hh25j+GHbmP4YduY/hh25j+GHbmNh25jYduY2HbmNh25jYduY2HbmNh24jYduI2HbiNh24jYduI2HbiNh24jYduI2HbiNh24jYduI2HbiNh24jYduI2HbiNh24jYduI2HbiNh24jYduI2HbiNh0+Nh0+Jh0+Jh0+Jh0+Jh0+Jh0+Jh0+Jh0+Jh0+Jh0+Jh0+Jh0+Jh0+Jh0+Jh0+Jh0+Jh0+Jh0+Jh0+Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jhz+j7fweHn/AFd+fp9v6v8Ape79DDf1JLc930/LnmGfj9H0+v7/APAf6c32/wAQ/wCR+n/5f9383/iNaca041pxrTjWnGtONaca041pxrTjWnGtONaca041pxrTjWnGtONaca041pxrTjWnGtONaca041pxrTjWnGtONaca041pxrTjWnGtONaca041pxrTjWnGtONaca041pxrTjWnGtONaca0415xrzjXnGvONeca8415xrzjXnGvONeca8415xrzjXnGvONeca8415xrzjXnGvONeYa8w15hrzDXmGvMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMNeYa8w15hrzDXnGvONeca8415xrzjXnGvONeca041pxrTjWnGtONaca041pxrTjWnGtONacas41ZxqzjVnGrONWcas41ZxqzjVnGrONScak41JxqTjUUGooNRQaig1FBqKDTUGmoNNQaag01BpqDTUGmoNNQaag0lBpKDSUGkoNJQaSg0lBpKDSUGioNFQaKg0VBoqDRVGiqNFUaKo0FRoKjQVGgqNBUaCo0FRoKjQVGgqPXqj16o9eqPXqj16o9eqPXqj16o9eqPXqj1yo9cqPXKj1yo9cqPXLD1yw9csPXLD1yw9csPWrD1qw9asPWrD1qw9asPWrD1qw9asPWrD1qw9YsPWLD1iw9YsPWLD1iw9YsPWLD1iw9YsPWLD1iw9YsPWLD1iw9YsPWLD1iw9YsPWLD1iw9YsPWLD1aw9WsPVrD1aw9WsPVrD1aw9WsPVrD1aw9WsPVrB34/8Ay/z/AH/53yHY/wDU/E/0v+P7/wCz/9k="})]})]}),pinterest:f.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsxs("g",{clipPath:"url(#clip0_6570_25513)",children:[f.jsx("rect",{width:"15.996",height:"16",rx:"2",fill:"#CC2127"}),f.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"})]}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_6570_25513",children:f.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),spotify:f.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("g",{clipPath:"url(#clip0_6523_22402)",children:f.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"})}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_6523_22402",children:f.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),twitter:f.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.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:f.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsxs("g",{clipPath:"url(#clip0_6523_22340)",children:[f.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"}),f.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"})]}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_6523_22340",children:f.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),youtube:f.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.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"}),f.jsx("path",{d:"M6.36353 10.0058L10.5453 7.62974L6.36353 5.25349V10.0058Z",fill:"white"})]})};function P7(e){const{debouncedUrl:t,content:n,onContentChange:r,selected:i}=e,o=E.useRef(null),[a,s]=E.useState(!1);Pe.useOnChange(t,()=>{var c;a&&(s(!1),(c=o.current)==null||c.reset())});function u(){s(!0),r(void 0)}return Fr.toURL(t)?t===(n==null?void 0:n.embed_url)?f.jsx(dC,{content:n,selected:i}):f.jsx(h.ErrorBoundary,{ref:o,renderError:Y$e,onError:u,children:f.jsx(E.Suspense,{fallback:n&&f.jsx(dC,{content:n,selected:i}),children:f.jsx(G$e,{url:t,selected:i,onContentChange:r})})}):null}function Y$e(){return f.jsxs(h.Box,{backgroundColor:"grey2",borderRadius:6,padding:16,gap:4,children:[f.jsx(h.Icon,{name:"alert",size:"small",color:"grey11"}),f.jsx(h.Text,{variant:"smallBold",color:"grey11",children:"There is no embed data available."})]})}function dC(e){const{content:t,selected:n}=e,{thumbnail:r,provider:i,author:o,url:a,subtitle:s}=eRe(t);return f.jsxs(h.PreviewCard,{selected:n,children:[f.jsx(h.PreviewImage,{src:r.url,aspectRatio:r.aspectRatio}),f.jsxs(h.PreviewContent,{children:[f.jsxs(h.Box,{display:"flex",alignItems:"center",gap:4,children:[f.jsx(z$e,{provider:i}),f.jsx(h.Text,{variant:"smallBold",color:"grey12",noWrap:!0,children:i}),o&&f.jsx(h.Text,{variant:"small",color:"grey11",noWrap:!0,children:o})]}),f.jsx(h.Text,{variant:"smallBold",href:a,children:s})]})]})}function G$e(e){const{url:t,onContentChange:n,selected:r}=e,i=J$e({url:t,onContentChange:n});return f.jsx(dC,{content:i,selected:r})}function J$e(e){const{url:t,onContentChange:n}=e,{embedApiEndpoint:r}=Te(),i=Ke.useRequest(Z$e,[t,r]),o=Pe.useStableCallback(n);return E.useEffect(()=>{const a=h.handleEditorFlushSyncError(()=>o(i));return()=>{clearTimeout(a)}},[i,o]),i}function Z$e(e,t){const n=new URL(t);return n.searchParams.set("url",e),me.request(n,{okType:X$e(e)})}function X$e(e){return L.object({type:L.string(),version:L.string().or(L.number()).nullish(),title:L.string().nullish(),author_name:L.string().nullish(),author_url:L.string().nullish(),provider_name:L.string().nullish(),provider_url:L.string().nullish(),cache_age:L.string().or(L.number()).nullish(),thumbnail_url:L.string().nullish(),thumbnail_width:L.number().nullish(),thumbnail_height:L.number().nullish(),html:L.string().nullish()}).passthrough().transform(t=>{const 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 eRe(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:e.type==="video"?"16:9":"1:1"},provider:e.provider_name??"",author:e.author_name??"",subtitle:t}}function tRe(e){const{id:t,readOnly:n,field:r,content:i,onContentChange:o}=e,a=Pe.useDebounceState({initialState:(i==null?void 0:i.embed_url)??"",startTransition:E.startTransition});function s(u){a.set(u),Fr.toURL(u)||o(void 0)}return f.jsxs(h.Field,{footer:Fr.toURL(a.value)&&f.jsx(h.FieldFooter,{children:f.jsx(P7,{debouncedUrl:a.debouncedValue,content:i,onContentChange:o})}),children:[f.jsx(h.FieldIcon,{name:"cloud"}),f.jsx(h.FieldLabel,{htmlFor:t,children:nr(r)}),f.jsx(h.FieldControl,{children:f.jsx(Vs,{id:t,readOnly:n,placeholder:Dc(r),value:a.value,onValueChange:s,variant:Fr.toURL(a.value)?"link":"normal",endAdornment:f.jsx(h.Button,{startIcon:"close",color:"grey",size:"small",disabled:!a,onClick:()=>s("")})})})]})}function D7(e){return!(e.lat>85||e.lat<-85||e.lng>180||e.lng<-180)}function Zb(e){const t=/^.*@(-?\d+.\d+),(-?\d+.\d+).*$/,n=e.match(t);if(!n)return;const r=parseFloat(n[1]??""),i=parseFloat(n[2]??"");if(isNaN(r)||isNaN(i))return;const o={lat:r,lng:i};if(D7(o))return o}function nk(e){return e?`${e.lat}, ${e.lng}`:""}function rk(e){const t=/\(?([\d|.|-]*)[\s+]*,[\s]*([\d|.|-]*)\)?/,n=e.match(t);if(!n)return Zb(e);const r=parseFloat(n[1]??""),i=parseFloat(n[2]??"");if(isNaN(r)||isNaN(i))return Zb(e);const o={lat:r,lng:i};return D7(o)?o:Zb(e)}function nRe(e){const{field:t,id:n,readOnly:r,...i}=e,{onValueChange:o,displayedValue:a,onBlur:s,clearValue:u,isValidCoordinates:c}=rRe(i);return f.jsxs(h.Field,{children:[f.jsx(h.FieldIcon,{name:"place"}),f.jsx(h.FieldLabel,{htmlFor:n,children:nr(t)}),f.jsx(h.FieldControl,{children:f.jsx(Vs,{id:n,onValueChange:o,placeholder:QR,readOnly:r,value:a,onBlur:s,variant:c?"link":"normal",endAdornment:f.jsx(h.Button,{startIcon:"close",color:"grey",size:"small",disabled:!a,onClick:u})})})]})}function rRe(e){const{content:t,onContentChange:n}=e,r=nk(t==null?void 0:t.position),[i,o]=E.useState(r);function a(){const c=rk(i);if(!c)return o(""),n(void 0);const{lat:l,lng:d}=c;o(nk({lat:l,lng:d})),n({__TYPE__:"GeoPointContent",position:{lat:l,lng:d}})}function s(){o(""),n(void 0)}const u=!!rk(i);return{displayedValue:i,isValidCoordinates:u,onValueChange:o,onBlur:a,clearValue:s}}function W7(e){const{fieldLabel:t,imageLabel:n=[]}=e;return f.jsxs(h.CardHeaderTitle,{children:[f.jsx(h.Text,{variant:"bold",noWrap:!0,children:Ep.overflow(t,30)}),n.length!==0&&f.jsx(h.Text,{color:"grey11",noSelect:!0,children:` • ${n.join(" • ")}`})]})}function K7(e){const{fieldLabel:t,isUpdating:n,readOnly:r,onMediaDialogOpenChange:i}=e;return f.jsxs(f.Fragment,{children:[f.jsx(h.CardHeader,{sx:{flexWrap:"wrap"},children:f.jsx(W7,{fieldLabel:t})}),f.jsx(h.CardContent,{children:f.jsx(h.Card,{color:"grey2",variant:"dashed",paddingBlock:12,radius:4,sx:{width:"100%"},children:f.jsx(h.CardContent,{children:f.jsxs(h.BlankSlate,{variant:"horizontal",children:[f.jsx(h.BlankSlateIcon,{name:"cloudUpload",lineColor:"purple9",backgroundColor:"purple4",size:"small"}),f.jsx(h.BlankSlateTitle,{children:n?"Preparing your image...":"You haven't selected an image"}),!r&&f.jsx(h.BlankSlateActions,{children:f.jsx(h.Button,{disabled:n,onClick:()=>i(!0),size:"medium",children:"Select image"})})]})})})})]})}const iRe=Nm({id:ru(),width:Km(),height:Km(),urls:Nm({full:ru(),small:ru().transform(REe)}),alt_description:ru().optional(),description:ru().nullable()}),oRe=Nm({results:Kq(iRe)}).transform(e=>e.results);function N7(e,t){const n=new URL("search/photos",e);return n.searchParams.set("page","1"),n.searchParams.set("per_page","28"),n.searchParams.set("query",t),me.request(n,{okType:oRe})}Ke.cache.registerFetcherConfig(N7,{cacheCapacity:5,revalidationStrategy:{type:"never"}});function aRe(e,t){const n=E.useRef(),r=Te(),i=Ke.useRequest(N7,[e,t]);return Pe.useDebounce(t,1e3,()=>{var o;n.current&&t!==n.current&&((o=r.onAnalyticsEvent)==null||o.call(r,"Unsplash Image Searched")),n.current=t}),i}function sRe(e){const{onSelectedChange:t}=e,[n,r]=E.useTransition(),i=Pe.useDebounceState({initialState:"",ms:300,startTransition:r});return f.jsxs(h.Box,{flexDirection:"column",gap:16,width:"100%",position:"relative",children:[f.jsx(h.FormSearchInput,{value:i.value,placeholder:"Search on Unsplash.com",onValueChange:i.set}),f.jsx(h.ErrorBoundary,{renderError:()=>f.jsx(b7,{}),children:f.jsx(E.Suspense,{fallback:f.jsx(cRe,{}),children:f.jsx(uRe,{term:i.debouncedValue,loading:n,onSelectedChange:t})})})]})}function uRe(e){const{term:t,onSelectedChange:n,loading:r}=e,{media:i,toggleSelected:o,selectedImageId:a}=lRe({term:t,onSelectedChange:n});return f.jsxs(f.Fragment,{children:[i.length>0&&f.jsx(q7,{children:i==null?void 0:i.map(s=>{const c=new URL(s.urls.full).searchParams.get("fm")??"jpg";return f.jsx(h.MediaCard,{url:s.urls.small,filename:s.description??"Unsplash Image",selected:a===s.id,onCardClick:()=>o(s),onCheckedChange:()=>o(s),extension:c,kind:"image",width:s.width,height:s.height,loading:r},s.id)})}),i.length===0&&f.jsx(v7,{})]})}function q7(e){const{children:t}=e;return f.jsx(h.ScrollArea,{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 cRe(){return f.jsx(q7,{children:kt.range(1,24).map(e=>f.jsx(x7,{},e))})}function lRe(e){var c;const{term:t,onSelectedChange:n}=e,{unsplashApiBaseUrl:r}=Te(),i=aRe(r,t||"citrus fruit"),o=(c=i==null?void 0:i[0])==null?void 0:c.id,[a,s]=E.useState();E.useEffect(()=>{n==null||n([]),s(void 0)},[o,n]);function u(l){if(l.id===a)return s(void 0),n==null?void 0:n([]);s(l.id),n==null||n([{...l,url:l.urls.full,alt:l.alt_description}])}return{media:i,toggleSelected:u,selectedImageId:a}}function zR(e){const{open:t,onOpenChange:n,onMediaSelected:r,assetType:i}=e,o=Te(),a=o.mediaLibrary,[s,u]=E.useState(()=>a?"media":"unsplash"),[c,l]=E.useState(new Set),[d,p]=E.useState([]),A=c.size+d.length,m=Ke.useFetcherData(mi);E.useEffect(()=>{!t||!a||f7({config:o,assetType:i})},[t,o,i,a]);function g(S){if(S!=="media"&&S!=="unsplash")throw new Error(`Invalid option ${S}.`);u(S)}function _(S){S||l(new Set),n(S)}const b=Qwe({assetType:i,mediaDialogOpen:t});function I(){var S;if(s==="unsplash"){const y=d[0];if(!y)return;r(y),(S=o.onAnalyticsEvent)==null||S.call(o,"Unsplash Image Added")}else if(s==="media"){const w=m.flatMap(O=>O.items).filter(O=>c.has(O.id))[0];if(!w)return;r(w),b(w.id)}_(!1)}function x(){if(A===0)return"Select a media item to add to the page";if(A>1)return"Only one media item can be added to the page"}const{containerRef:v}=h.useAlert();return f.jsxs(h.Dialog,{open:t,onOpenChange:_,size:{width:"min(calc(100% - 48px), 2000px)",height:"calc(100% - 30px)"},position:"center",onPointerDownOutside:S=>{v&&Pe.refContainsTarget(v,S.target)&&S.preventDefault()},children:[f.jsx(h.DialogHeader,{icon:"image",title:"Media library"}),f.jsxs(h.DialogOptions,{value:s,onValueChange:g,padding:"small",width:"auto",children:[a&&f.jsx(h.DialogOptionsItem,{value:"media",icon:"photo"}),f.jsx(h.DialogOptionsItem,{value:"unsplash",icon:"unsplash"})]}),f.jsx(h.DialogContent,{children:f.jsxs(h.Box,{flexDirection:"column",flexGrow:1,overflow:"hidden",children:[f.jsx(kq,{}),f.jsxs(h.Box,{overflow:"hidden",backgroundColor:"grey2",padding:{top:16,inline:16},flexGrow:1,children:[s==="media"&&f.jsx(k7,{assetType:i,onSelectedChange:l}),s==="unsplash"&&f.jsx(sRe,{onSelectedChange:p})]})]})}),f.jsxs(h.DialogActions,{children:[f.jsx(h.DialogCancelButton,{}),f.jsx(h.DialogActionButton,{onClick:I,disabled:A!==1,tooltipLabel:x(),children:"Add to page"})]})]})}const V7=E.forwardRef(function(t,n){const{isMediaDialogOpen:r,selected:i,children:o,onMediaSelected:a,onMediaDialogOpenChange:s}=t;return f.jsxs(h.Card,{ref:n,color:i?"indigo2":"grey2",variant:i?"selected":"dashed",paddingBlock:12,radius:4,children:[o,f.jsx(zR,{open:r,onOpenChange:s,onMediaSelected:a,assetType:"image"})]})});function Q7(e){const{contentView:t,croppedImage:n}=e,{width:r,height:i,x:o,y:a,zoom:s}=n,u=dRe({origin:t.origin,croppedImage:n});return{...t,width:r,height:i,url:u,edit:{...t.edit,zoom:s,crop:{x:o,y:a}}}}function fRe(e){var c,l,d;const{field:t,content:n,thumbnail:r,croppedImage:i}=e;if(r===gd)return z7({content:n,croppedImage:i});const o=ye.isImageContent(n),a=(l=(c=t==null?void 0:t.config)==null?void 0:c.thumbnails)==null?void 0:l.find(p=>p.name===r),s=o?(d=n.thumbnails)==null?void 0:d[r]:void 0;if(!a||!s)return n;const u=Q7({contentView:s,croppedImage:i});return u.url===s.url?n:{...n,thumbnails:o?{...n.thumbnails,[r]:u}:void 0}}function z7(e){const{content:t,croppedImage:n}=e,r=Q7({contentView:t,croppedImage:n});return r.url===t.url?t:{...t,...r}}function dRe(e){const{origin:t,croppedImage:n}=e,{x:r,y:i,width:o,height:a,cropHeight:s,cropWidth:u}=n,c=new URL(t.url),l=t.height!==a||t.width!==o;if(r!==0||i!==0||s!==t.height||u!==t.width){const p=[r,i,u,s].map(Math.round).join(",");c.searchParams.set("rect",p),c.searchParams.set("w",o.toString()),c.searchParams.set("h",a.toString())}return l&&(c.searchParams.set("w",o.toString()),c.searchParams.set("h",a.toString())),c.toString()}function pRe(e){const{edit:{crop:{x:t,y:n},zoom:r},width:i,height:o,origin:{width:a,height:s}}=e;let u,c;const l=a/s,d=i/o;return d>=l?(u=a/r,c=u/d):(c=s/r,u=c*d),{x:t,y:n,width:i,height:o,zoom:r,cropWidth:u,cropHeight:c}}function ARe(e){const{selectedImage:t,imageCrop:n,setImageCrop:r}=e,{width:i,height:o,zoom:a,cropHeight:s,cropWidth:u}=n,c=t.contentView,l={x:n.x,y:n.y,width:u,height:s},[d,p]=E.useState(),A=(c==null?void 0:c.origin.url)??"",m=!(t!=null&&t.thumbnail.height&&(t!=null&&t.thumbnail.width));function g(v,S){const y=parseInt(S);isNaN(y)||y<=0||!m||r({...n,[v]:y})}function _(v){r({...n,cropWidth:v.width,cropHeight:v.height,x:v.x,y:v.y})}function b(v){r({...n,zoom:v})}function I(){p(Vh),r({...n,...Vh})}function x(){c&&(p(Vh),r({...n,...Vh,zoom:1,cropWidth:c.width,cropHeight:c.height}))}return f.jsxs(h.Box,{padding:{inline:24,block:16},flexDirection:"column",gap:16,height:"100%",overflowY:"auto",alignItems:"center",children:[f.jsxs(h.Box,{gap:8,height:32,alignItems:"flex-start",width:"100%",children:[f.jsx(h.Tooltip,{content:"Center",children:f.jsx(h.Button,{color:"grey",size:"medium",startIcon:"centerFocusWeak",onClick:I})}),f.jsx(h.Tooltip,{content:"Cover",children:f.jsx(h.Button,{color:"grey",size:"medium",startIcon:"zoomOutMap",onClick:x})}),f.jsx(h.Separator,{orientation:"vertical"}),f.jsx(h.FormInput,{prefix:"W",prefixTooltip:"Width",placeholder:"width",type:"number",size:"medium",value:String(i),onValueChange:v=>g("width",v),sx:{width:100},disabled:!m}),f.jsx(h.FormInput,{prefix:"H",prefixTooltip:"Height",placeholder:"height",type:"number",size:"medium",value:String(o),onValueChange:v=>g("height",v),sx:{width:100},disabled:!m})]}),f.jsx(h.Cropper,{image:A,aspect:i/o,crop:d??{x:0,y:0},onCropChange:p,zoom:a,onZoomChange:b,onCropAreaChange:(v,S)=>_(S),initialCroppedAreaPixels:l}),f.jsx(h.Box,{width:"100%",maxWidth:320,children:f.jsx(h.Slider,{min:1,max:3,step:.01,value:[a],onValueChange:([v])=>b(v??1)})})]})}const Vh={x:0,y:0};function hRe(e){const{trigger:t,initialImages:n,renderTooltip:r}=e,{open:i,onOpenChange:o,ready:a,option:s,selectedImage:u,croppedImage:c,setCroppedImage:l,setReady:d,setOption:p}=mRe(e);return f.jsxs(h.Dialog,{trigger:t,onAnimationEnd:()=>d(!0),open:i,onOpenChange:o,renderTooltip:r,children:[f.jsx(h.DialogHeader,{icon:"photo",title:"Image editor"}),f.jsx(h.DialogOptions,{value:String(s),onValueChange:A=>p(Number(A)),children:n.map((A,m)=>f.jsx(h.DialogOptionsItem,{value:String(m),icon:"photo",title:A.labels[0]??"Main",subtitle:A.labels[1]??""},A.thumbnail.name))}),u&&f.jsx(h.DialogContent,{children:a&&c&&f.jsx(ARe,{selectedImage:u,imageCrop:c,setImageCrop:l},u.thumbnail.name)})]})}function mRe(e){const{initialImages:t,initialOption:n,onClose:r}=e,[i,o]=E.useState(_),[a,s]=E.useState(!1),[u,c]=E.useState(!1),[l,d]=E.useState(n);function p(b){b?(d(n),o(_())):(c(!1),r({option:l,croppedImages:i})),s(b)}const A=t[l],m=i[(A==null?void 0:A.thumbnail.name)??""];function g(b){if(!A)return;const I=A.thumbnail.name;o({...i,[I]:b})}function _(){return t.reduce((b,I)=>(I.contentView&&(b[I.thumbnail.name]=pRe(I.contentView)),b),{})}return{open:a,ready:u,option:l,selectedImage:A,croppedImage:m,setCroppedImage:g,setReady:c,setOption:d,onClose:r,onOpenChange:p}}function gRe(e){const{readOnly:t,altText:n,selected:r,onValueChange:i}=e,o=E.useId();return f.jsxs(h.Field,{selected:r,children:[f.jsx(h.FieldLabel,{htmlFor:o,children:"Alt text"}),f.jsx(h.FieldControl,{children:f.jsx(h.Box,{flexGrow:1,height:40,children:f.jsx(Vs,{id:o,placeholder:"Short description for the visually impaired",readOnly:t,value:n,padding:{input:{inline:12}},onValueChange:i})})})]})}function vRe(e){const{fieldLabel:t,imageLabel:n,initialImages:r,page:i,displaySeparator:o=!0,isSVGContentView:a,visibility:s,onClear:u,onCropperDialogClose:c,onMediaDialogOpenChange:l}=e;return f.jsxs(h.Box,{display:"flex",flexDirection:"column",gap:12,children:[f.jsxs(h.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:4,children:[f.jsx(W7,{fieldLabel:t,imageLabel:n}),f.jsxs(h.CardHeaderActions,{sx:{visibility:s},children:[f.jsx(hRe,{trigger:f.jsx(h.Button,{startIcon:"crop",disabled:a,hiddenLabel:"Crop & Resize"}),renderTooltip:d=>f.jsx(h.Tooltip,{content:"Crop & Resize",children:d}),initialImages:r,initialOption:i,onClose:c}),f.jsx(h.Tooltip,{content:"Replace",children:f.jsx(h.Button,{startIcon:"imageSearch",hiddenLabel:"Replace",onClick:()=>l(!0)})}),f.jsx(h.Tooltip,{content:"Clear",children:f.jsx(h.Button,{onClick:u,startIcon:"delete",hiddenLabel:"Clear"})})]})]}),o&&f.jsx(h.Separator,{style:"dashed",decorative:!0})]})}function ju(e){const{description:t,largeIconName:n="public",loading:r,error:i,onEdit:o,onUnlink:a}=e,s=i?f.jsx(_Re,{}):f.jsx(SRe,{...e,largeIconName:n,loading:r});return f.jsx(h.Card,{sx:{width:420},children:f.jsxs(h.CardContent,{gap:12,children:[f.jsxs(h.Box,{display:"grid",gridTemplateColumns:"max-content 1fr min-content",gridTemplateRows:"1fr",gap:8,children:[s,f.jsxs(h.ButtonGroup,{size:"medium",color:"grey",sx:{justifySelf:"end"},children:[o&&f.jsx(h.Button,{startIcon:"edit",onClick:o}),a&&f.jsx(h.Button,{startIcon:"linkOff",onClick:a})]})]}),!i&&f.jsx(CRe,{description:t,loading:r})]})})}function yRe(e){const{url:t,title:n,loading:r}=e;return r?f.jsx(H7,{height:16,width:80}):n?f.jsx(h.Text,{variant:"smallBold",href:t==null?void 0:t.toString(),children:n}):null}function bRe(e){const{subTitle:t,loading:n}=e;return n?f.jsx(h.Box,{padding:{block:2},children:f.jsx(H7,{height:12,width:60})}):t?f.jsx(h.Text,{variant:"small",color:"grey11",noWrap:!0,children:t}):null}function CRe(e){const{description:t,loading:n}=e;return!t||n?null:f.jsx(h.Text,{variant:"small",color:"grey11",children:t})}function SRe(e){const{largeIconName:t,title:n,url:r,loading:i,subTitle:o}=e;return f.jsxs(f.Fragment,{children:[f.jsx(h.ConjoinedIcons,{largeIconName:t,smallIconName:"link"}),f.jsxs(h.Box,{flexDirection:"column",minWidth:0,children:[f.jsx(yRe,{title:n,url:r,loading:i}),f.jsx(bRe,{subTitle:o,loading:i})]})]})}function _Re(){return f.jsxs(h.Box,{alignItems:"center",gap:8,children:[f.jsx(h.CircleIcon,{name:"alert",color:"tomato",size:"small"}),f.jsx(h.Text,{color:"tomato11",children:"Failed to load linked document data"})]})}function H7(e){const{width:t,height:n}=e;return f.jsx(h.Skeleton,{color:"grey5",borderRadius:6,width:t,height:n})}function IRe(e){const{documentType:t,documentUrl:n,title:r,statusColor:i,description:o,tags:a,tagsFilter:s,previewImageUrl:u,highlighted:c,onSelect:l}=e;function d(p){return p.nativeEvent instanceof MouseEvent&&(p.metaKey||p.ctrlKey)?window.open(n,"_blank"):l()}return f.jsxs(h.Card,{paddingBlock:16,onSelect:d,variant:c?"highlighted":void 0,color:c?"purple2":void 0,sx:{marginBlock:c?4:0,marginInline:4,flexShrink:0},children:[f.jsx(h.CardContent,{children:f.jsxs(h.Box,{justifyContent:"space-between",gap:6,children:[f.jsxs(h.Box,{flexDirection:"column",gap:4,alignItems:"flex-start",flexGrow:1,children:[f.jsx(TRe,{documentType:t}),f.jsx(xRe,{title:r,statusColor:i}),f.jsx(wRe,{description:o})]}),f.jsx(ERe,{previewImageUrl:u})]})}),a.length>0&&f.jsx($Re,{tags:a,tagsFilter:s})]})}function TRe(e){const{documentType:t}=e;return f.jsx(h.Badge,{maxWidth:150,size:"medium",title:`Type: ${t}`,icon:"description"})}function xRe(e){const{title:t,statusColor:n}=e;return f.jsxs(h.Box,{gap:8,alignItems:"center",children:[f.jsx(h.Dot,{color:n}),f.jsx(h.Text,{variant:"bold",children:t})]})}function wRe(e){const{description:t}=e,n=t==null?void 0:t.substring(0,150);return n?f.jsx(h.Text,{variant:"small",color:"grey11",children:`${n}${n!==t?"...":""}`}):f.jsx(h.Text,{variant:"smallItalic",color:"grey11",children:"No description available"})}function ERe(e){const{previewImageUrl:t}=e;return f.jsx(h.Box,{width:142,height:90,backgroundColor:"grey2",border:!0,borderRadius:6,flexDirection:"column",alignItems:"center",justifyContent:"center",gap:4,flexShrink:0,padding:8,children:t?f.jsx(h.Image,{src:t,sizing:"cover"}):f.jsxs(f.Fragment,{children:[f.jsx(h.Icon,{name:"hideImage",size:"large",color:"grey11"}),f.jsx(h.Text,{color:"grey11",variant:"small",children:"No preview available"})]})})}function $Re(e){const{tags:t}=e;return f.jsxs(h.CardFooter,{children:[f.jsxs(h.Box,{gap:4,alignItems:"center",children:[f.jsx(h.Icon,{name:"label",size:"small",color:"grey11"}),f.jsx(h.Text,{variant:"small",color:"grey11",children:"Tags:"})]}),f.jsx(h.TextOverflow,{children:t.map(n=>f.jsx(h.Badge,{size:"medium",title:n,sx:{marginRight:8}},n))})]})}function RRe(e){var v,S;const{searchTerm:t,tagsFilter:n,typesFilter:r,localesFilter:i}=e,o=Te();o.searchDocuments||Ht("searchDocuments");const{coreApiBaseUrl:a,documentSearchBaseUrl:s,authStrategy:u,status:c,repository:l}=o,{storageVersion:d}=Ke.useRequest(Q0,[a,u]),p=d.major>=7;function A(){return p?zq({repository:l,searchTerm:t,customTypesIds:[...Fn.map(r,y=>y.id)],tags:[...Fn.map(n,y=>y.id)],localeId:[...Fn.map(i,y=>y.id)][0]}):WR({tags:[...Fn.map(n,y=>y.id)],customTypes:[...Fn.map(r,y=>y.id)],language:[...Fn.map(i,y=>y.id)],term:[t]})}const[m,g]=E.useState([]),[_,b]=E.useState(""),I=A(),x=Ke.useRequest(Y7,[a,s,u,I,c,p]);return I!==_?(b(I),g(x.results)):x.results.length>0&&((v=kt.last(m))==null?void 0:v.id)!==((S=kt.last(x.results))==null?void 0:S.id)&&g(y=>y.concat(x.results)),{documents:m,response:x}}Ke.cache.registerFetcherConfig(Y7,{cacheCapacity:500,revalidationStrategy:{type:"never"}});async function Y7(e,t,n,r,i,o){const a=Oq[i];if(!o){const l=await DR(e,n,r,200);return ik(l.results,a)}const s=await Qq(t,n,r),u=await Hq(e,n,s.results);return ik(u,a)}function ik(e,t){return{results:e.flatMap(r=>{const i=r.versions.filter(o=>t.includes(o.status));return i.length===0?[]:{...r,versions:i}})}}function ok(){const e=Te();e.searchDocuments||Ht("searchDocuments");const{coreApiBaseUrl:t,authStrategy:n}=e,r=Ke.useRequest(Q0,[t,n]);return new Set(r.languages.map(i=>({id:i.id,label:i.name})))}function ORe(){const e=Te();e.searchDocuments||Ht("searchDocuments");const{coreApiBaseUrl:t,authStrategy:n}=e,r=Ke.useRequest(Jq,[t,n]);return new Set(r.results.map(i=>({id:i,label:i})))}function FRe(){const e=Te();e.searchDocuments||Ht("searchDocuments");const{customTypesApiBaseUrl:t,repository:n,authStrategy:r}=e,i=Ke.useRequest(Nq,[t,n,r]);return new Set(i)}function kRe(e,t){const n=Te(),r=Pe.useDebounceState({initialState:""}),[i,o]=E.useState(new Set),[a,s]=E.useState(new Set);function u(){return!n.searchDocuments||!n.localeId?new Set:new Set([{id:n.localeId,label:n.localeId}])}const[c,l]=E.useState(u),d=Fn.union(a,qm(e)),p=Fn.union(i,qm(t));return{searchTerm:r,filteredTags:i,setFilteredTags:o,filteredCustomTypes:a,setFilteredCustomTypes:s,filteredLocales:c,setFilteredLocales:l,typesFilter:d,tagsFilter:p}}function qm(e){return e?Fn.map(e,t=>({id:t,label:t})):new Set}function MRe(e){const{filteredLocales:t,setFilteredLocales:n,filteredTags:r,setFilteredTags:i,filteredCustomTypes:o,setFilteredCustomTypes:a,fixedTags:s,fixedCustomTypes:u}=e;return f.jsxs(f.Fragment,{children:[f.jsx(jRe,{selectedValues:t,onSelectedValuesChange:n}),f.jsx(pC,{selectedValues:r,fixedSelectedValues:qm(s),onSelectedValuesChange:i,label:"Tags",icon:"label",fetchFilters:ORe}),f.jsx(pC,{selectedValues:o,fixedSelectedValues:qm(u),onSelectedValuesChange:a,label:"Type",icon:"description",fetchFilters:FRe})]})}function pC(e){const[t,n]=E.useState(!1),r=E.useRef(null);return f.jsx(h.ErrorBoundary,{ref:r,renderError:()=>{var i;return f.jsx(h.FilterField,{mode:"error",onErrorRetry:(i=r.current)==null?void 0:i.reset,open:t,setOpen:n,values:new Set,...e})},children:f.jsx(E.Suspense,{fallback:f.jsx(h.FilterField,{mode:"loading",open:t,setOpen:n,values:new Set,...e}),children:f.jsx(LRe,{open:t,setOpen:n,...e})})})}function LRe(e){const{open:t,setOpen:n,onSelectedValuesChange:r,fixedSelectedValues:i,selectedValues:o,label:a,icon:s,fetchFilters:u,multiple:c}=e,l=u();return f.jsx(h.FilterField,{open:t,setOpen:n,label:a,icon:s,selectedValues:o,values:new Set(l),fixedSelectedValues:i,onSelectedValuesChange:r,multiple:c})}function jRe(e){const{selectedValues:t,onSelectedValuesChange:n}=e,[r,i]=E.useState(Fn.first(t));function o(s){n(s),i(Fn.first(s))}const a=Fn.find(ok(),s=>{var u;return s.id===((u=Fn.first(t))==null?void 0:u.id)});return(a==null?void 0:a.label)!==(r==null?void 0:r.label)&&i(a),f.jsx(pC,{selectedValues:new Set(r?[r]:[]),onSelectedValuesChange:o,label:"Locale",icon:"public",fetchFilters:ok,multiple:!1})}function G7(e){const{onSelectDocument:t,fixedCustomTypes:n,fixedTags:r,linkedDocumentId:i,...o}=e,a=Te(),{searchTerm:s,filteredTags:u,setFilteredTags:c,filteredCustomTypes:l,setFilteredCustomTypes:d,filteredLocales:p,setFilteredLocales:A,typesFilter:m,tagsFilter:g}=kRe(n,r);return f.jsx(h.Dialog,{size:{height:727,width:656},hasClose:!1,...o,children:f.jsx(h.DialogContent,{children:f.jsxs(h.Box,{flexDirection:"column",height:"100%",children:[f.jsxs(h.Box,{padding:{top:16,inline:16,bottom:8},flexDirection:"column",gap:12,children:[f.jsx(h.FormInput,{value:s.value,onValueChange:s.set,placeholder:"Search a page",icon:"search"}),a.searchDocuments&&f.jsx(MRe,{filteredTags:u,setFilteredTags:c,filteredCustomTypes:l,setFilteredCustomTypes:d,filteredLocales:p,setFilteredLocales:A,fixedTags:r,fixedCustomTypes:n})]}),a.searchDocuments?f.jsx(URe,{searchTerm:s.debouncedValue,tagsFilter:g,typesFilter:m,localesFilter:p,onSelectDocument:t,linkedDocumentId:i}):f.jsx(Z7,{title:"Oops!",message:"Slice Machine does not yet support mock data for linked documents in the simulator."})]})})})}function URe(e){const{searchTerm:t,tagsFilter:n,typesFilter:r,localesFilter:i,linkedDocumentId:o,onSelectDocument:a}=e;return f.jsxs(h.ScrollArea,{style:{flexGrow:1,paddingBottom:h.theme.space[16],paddingInline:h.theme.space[12],display:"flex",flexDirection:"column"},children:[o&&f.jsxs(f.Fragment,{children:[f.jsx(sk,{children:"Linked page"}),f.jsx(h.ErrorBoundary,{renderError:()=>f.jsx(ak,{description:"An error occurred while fetching the linked page."}),children:f.jsx(E.Suspense,{fallback:WRe,children:f.jsx(DRe,{linkedDocumentId:o,tagsFilter:n,onSelectDocument:a})})})]}),f.jsx(sk,{children:"Link to a page"}),f.jsx(h.ErrorBoundary,{renderError:()=>f.jsx(ak,{description:"An error occurred while fetching pages."}),children:f.jsx(E.Suspense,{fallback:PRe,children:f.jsx(BRe,{searchTerm:t,tagsFilter:n,localesFilter:i,typesFilter:r,linkedDocumentId:o,onSelectDocument:a})})})]})}function BRe(e){const{searchTerm:t,tagsFilter:n,localesFilter:r,typesFilter:i,linkedDocumentId:o,onSelectDocument:a}=e,{documents:s}=RRe({searchTerm:t,tagsFilter:n,localesFilter:r,typesFilter:i}),u=s.filter(c=>c.id!==o);return u.length===0?f.jsx(Z7,{title:s.length===1?"No other pages found!":void 0}):f.jsx(h.Box,{flexDirection:"column",gap:12,children:u.map(c=>{const l=c==null?void 0:c.versions[0];return l?f.jsx(J7,{document:c,tagsFilter:n,onSelectDocument:a},`${c.id}-${l.status}`):null})})}const PRe=f.jsx(h.Box,{flexDirection:"column",gap:12,children:kt.range(1,3).map(e=>f.jsx(h.Skeleton,{height:124,sx:{marginInline:4},zIndex:-1},e))});function ak(e){const{description:t}=e;return f.jsx(h.Box,{flexDirection:"column",alignItems:"center",justifyContent:"center",children:f.jsx(h.DefaultErrorMessage,{title:"Request failed",description:t,errorImageSrc:h.dialogErrorImage})})}function DRe(e){const{linkedDocumentId:t,tagsFilter:n,onSelectDocument:r}=e,i=KRe(t);return f.jsx(J7,{document:i,tagsFilter:n,onSelectDocument:r,highlighted:!0})}const WRe=f.jsx(h.Skeleton,{height:124,sx:{marginBlock:4,marginInline:4},zIndex:-1});function KRe(e){const t=Te();t.searchDocuments||Ht("searchDocuments");const{coreApiBaseUrl:n,authStrategy:r}=t;return Ke.useRequest(_h,[n,r,e])}function J7(e){const{document:t,tagsFilter:n,highlighted:r,onSelectDocument:i}=e,o=Te(),a=t==null?void 0:t.versions[0];if(!a)return null;const s=UR({documentId:t.id,versionId:a.status==="archived"?a.version_id:void 0,releaseId:a.status==="release"?a.release_id:void 0,status:a.status,baseUrl:o.baseUrl}),u=NRe({tags:a.tags,tagsFilter:n});return f.jsx(IRe,{documentType:a.custom_type_label,documentUrl:s,description:a.preview_summary,tags:u,title:t.title,previewImageUrl:a.preview_image,onSelect:()=>i(t.id),statusColor:Rq[a.status].color,highlighted:r})}function sk(e){const{children:t}=e;return f.jsx(h.Box,{position:"sticky",top:0,backgroundColor:"white",padding:{block:6,inline:4},children:f.jsx(h.Text,{variant:"smallBold",color:"grey11",children:t})})}function Z7(e){const{title:t="No pages found!",message:n="Consider using different keywords or tweaking your filters to find what you need."}=e;return f.jsx(h.Box,{justifyContent:"center",flexDirection:"column",height:"100%",children:f.jsxs(h.BlankSlate,{children:[f.jsx(h.BlankSlateIcon,{name:"close",lineColor:"tomato11",backgroundColor:"tomato4",size:48}),f.jsx(h.BlankSlateTitle,{size:"big",children:t}),f.jsx(h.BlankSlateDescription,{width:360,children:n})]})})}function NRe(e){const{tags:t,tagsFilter:n}=e,r=[...n].map(o=>o.label).reverse();return kt.sort(t,o=>-r.indexOf(o))}function X7(e){const{hasLink:t,onUnlink:n,selectEnabled:r,selectedType:i,value:o,onOpenLinkModal:a,onValueChange:s,openInNewTab:u=!0,condensedButtons:c=!1,showNewTabButton:l=!1,displayTextEnabled:d}=e;return f.jsxs(f.Fragment,{children:[!d&&l&&u&&f.jsx(h.Badge,{title:"Open in a new tab",color:"indigo",size:"small",icon:"openInNew",onClick:a}),!t&&r&&f.jsxs(h.Select,{value:i==="any"?void 0:i,color:"grey",size:"small",boldTriggerText:!0,position:"popper",sideOffset:4,startIcon:om({selectType:i}),disabled:!r,onValueChange:s,placeholder:c?"":Xc("any"),onlyStartIcon:c&&i!==void 0,renderTrigger:({button:p})=>f.jsx(h.Tooltip,{content:Xc(i),visible:c,children:p}),children:[f.jsx(h.SelectItem,{value:"web",icon:"public",children:Xc("web")}),f.jsx(h.SelectItem,{value:"document",icon:"description",children:Xc("document")}),f.jsx(h.SelectItem,{value:"media",icon:"image",children:Xc("media")})]},i===void 0?"unlinked":"linked"),!t&&!r&&f.jsx(h.Button,{startIcon:om({selectType:i}),color:"grey",textColor:"link",textWeight:"normal",size:"small",onClick:a,children:Xc(i)}),t&&!d&&f.jsx(h.Button,{startIcon:"close",color:"grey",size:"small",onClick:n,"aria-label":"Close"}),t&&d&&f.jsxs(h.ButtonGroup,{density:"compact",children:[f.jsx(h.Button,{startIcon:om({selectType:i}),renderEndIcon:()=>u&&i==="web"?f.jsx(h.Icon,{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}),f.jsx(h.Button,{startIcon:"close",color:"grey",size:"small",onClick:n})]})]})}function Xc(e){if(!e||e==="any")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 e8(e){const{onEdit:t,onUnlink:n,url:r,title:i,subTitle:o}=e;return f.jsx(h.Card,{paddingBlock:16,children:f.jsxs(h.CardContent,{sx:{width:433},children:[f.jsx(VRe,{url:r,title:i,subTitle:o,onEdit:t,onUnlink:n}),r&&f.jsx(h.CheckerBoard,{children:f.jsx(qRe,{children:f.jsx(h.Image,{src:r,alt:i,sizing:"contain"})})})]})})}function qRe(e){const{children:t}=e;return f.jsx(h.Box,{flexDirection:"column",alignItems:"center",justifyContent:"center",position:"relative",height:327,children:t})}function VRe(e){const{url:t,title:n,subTitle:r,onEdit:i,onUnlink:o}=e;return f.jsxs(h.Box,{flexDirection:"row",justifyContent:"space-between",gap:8,children:[f.jsxs(h.Box,{gap:8,minWidth:0,children:[f.jsx(h.ConjoinedIcons,{largeIconName:"image",smallIconName:"link"}),f.jsxs(h.Box,{flexDirection:"column",minWidth:0,children:[f.jsx(h.Text,{noWrap:!0,variant:"smallBold",href:t,inline:!0,children:n}),f.jsx(h.Text,{variant:"small",color:"grey11",children:r})]})]}),f.jsxs(h.ButtonGroup,{size:"medium",color:"grey",children:[i&&f.jsx(QRe,{onEdit:i}),o&&f.jsx(zRe,{onUnlink:o})]})]})}function QRe(e){const{onEdit:t}=e;return f.jsx(h.Tooltip,{content:"Edit link",side:"top",stableMount:!0,zIndexHack:!0,children:f.jsx(h.Button,{startIcon:"edit",onClick:t})})}function zRe(e){const{onUnlink:t}=e;return f.jsx(h.Tooltip,{content:"Remove link",side:"top",stableMount:!0,zIndexHack:!0,children:f.jsx(h.Button,{startIcon:"linkOff",onClick:t})})}function HRe(e){var O,F;const{field:t,content:n,onContentChange:r}=e,i=g(),o=((O=t.config)==null?void 0:O.allowText)??!1,a=o&&(n==null?void 0:n.value.text)||void 0,[s,u]=E.useState(m),c=ye.FilledExternalLinkContent.is(n==null?void 0:n.value)&&(n==null?void 0:n.value.target)||void 0,[l,d]=E.useState(!1),p=E.useRef(null);Pe.useOnChange(i,T);const A=s?YRe[s]:void 0;function m(){var $,P;return!(($=t.config)!=null&&$.select)||n!=null&&n.value.__TYPE__?n==null?void 0:n.value.__TYPE__:uk[(P=t.config)==null?void 0:P.select]}function g(){return n?ye.FilledDocumentLinkContent.is(n.value)?n.value.id:ye.FilledExternalLinkContent.is(n.value)?n.value.url:ye.FilledFileLinkContent.is(n.value)||ye.FilledImageLinkContent.is(n.value)?n.value.name:"":""}function _($){var P;if(!$)return r(void 0);switch((P=t.config)==null?void 0:P.select){case"web":return r({__TYPE__:"LinkContent",value:{__TYPE__:"ExternalLink",kind:"web",text:$}});case"document":return r({__TYPE__:"LinkContent",value:{__TYPE__:"DocumentLink",kind:"document",text:$}});case"media":return r({__TYPE__:"LinkContent",value:{__TYPE__:"MediaLink",kind:"media",text:$}});default:return r({__TYPE__:"LinkContent",value:{__TYPE__:"AnyLink",text:$}})}}function b($,P){if(!$)return _(a);const K=P?"_blank":void 0;switch(s){case"ExternalLink":return r({__TYPE__:"LinkContent",value:{__TYPE__:"ExternalLink",url:$,target:K,text:a}});case"DocumentLink":return r({__TYPE__:"LinkContent",value:{__TYPE__:"DocumentLink",id:$,text:a}});default:return r(void 0)}}function I($){return n?r({__TYPE__:n.__TYPE__,value:{...n.value,text:$}}):_($)}const x=JRe();function v($){u($?uk[$]:void 0),b(""),$&&$!=="any"&&x($)}function S($){b($)}function y(){d(!0)}function T(){var $;l&&(d(!1),($=p.current)==null||$.reset())}function w($){const P=t8({media:$});switch(P.value.__TYPE__){case"ImageLink":return r({__TYPE__:P.__TYPE__,value:{...P.value,text:a}});case"FileLink":return r({__TYPE__:P.__TYPE__,value:{...P.value,text:a}})}}return{contentType:s,selectType:A,fieldValue:i,onDisplayTextChange:I,onValueChange:b,onTypeChange:v,placeholder:Dc(t),isTypeSelectEnabled:!((F=t.config)!=null&&F.select),onDocumentSelected:S,onError:y,errorBoundaryRef:p,isTargetNewTab:c==="_blank",onMediaSelected:w,displayTextEnabled:o,displayText:a??""}}const YRe={AnyLink:"any",DocumentLink:"document",ExternalLink:"web",FileLink:"media",ImageLink:"media",MediaLink:"media"},uk={any:"AnyLink",document:"DocumentLink",web:"ExternalLink",media:"FileLink"};function GRe(e){const t=Te();t.searchDocuments||Ht("searchDocuments");const{coreApiBaseUrl:n,authStrategy:r}=t;return Ke.useRequest(_h,[n,r,e]).title}Ke.cache.registerFetcherConfig(_h,{concurrency:50});function t8(e){var i,o,a,s,u,c;const{media:t}=e,n="kind"in t;return n&&t.kind==="image"?{__TYPE__:"LinkContent",value:{__TYPE__:"ImageLink",id:t.id,name:t.filename,url:t.url,kind:t.kind,size:t.size.toString(),height:((i=t.height)==null?void 0:i.toString())??`${Xa}`,width:((o=t.width)==null?void 0:o.toString())??`${Xa}`,date:((a=t.last_modified)==null?void 0:a.toString())??""}}:n?{__TYPE__:"LinkContent",value:{__TYPE__:"FileLink",id:t.id,name:t.filename,kind:t.kind,url:t.url,size:t.size.toString(),date:((s=t.last_modified)==null?void 0:s.toString())??""}}:{__TYPE__:"LinkContent",value:{__TYPE__:"ImageLink",id:t.id,name:(t==null?void 0:t.alt)??t.url,kind:"image",url:t.url,size:"0",height:((u=t.height)==null?void 0:u.toString())??`${Xa}`,width:((c=t.width)==null?void 0:c.toString())??`${Xa}`}}}const JRe=()=>{const e=B$e(),{onAnalyticsEvent:t}=Te();function n(r){e&&t&&t("Generic Link Added",{type:r,isInSlice:String(e.isInSlice),isInGroup:String(e.isInGroup),customTypeFormat:e.customTypeFormat??"custom"})}return n};function ZRe(e){const{open:t,setOpen:n,showNewTabButton:r}=e,{url:i,setUrl:o,openInNewTab:a,setOpenInNewTab:s,disabled:u,onUpdate:c}=XRe(e);return f.jsxs(h.Dialog,{open:t,onOpenChange:n,size:"small",children:[f.jsx(h.DialogHeader,{title:"Set Link URL"}),f.jsxs(h.DialogContent,{padding:16,children:[f.jsx(h.FormInput,{value:i,onValueChange:o,placeholder:"Paste URL",icon:"public"}),r&&f.jsx(h.InlineLabel,{value:"Open in a new tab",children:f.jsx(h.Checkbox,{checked:a,onCheckedChange:s})})]}),f.jsxs(h.DialogActions,{children:[f.jsx(h.DialogCancelButton,{}),f.jsx(h.DialogActionButton,{onClick:c,disabled:u,children:"Update"})]})]})}function XRe(e){const{url:t,openInNewTab:n,onUpdate:r,open:i,setOpen:o}=e,[a,s]=E.useState(t),[u,c]=E.useState(n);Pe.useOnChange(i,()=>{i&&(s(t),c(n))});const l=!a||a===t&&u===n;function d(){r(a,u),o(!1)}return{url:a,setUrl:s,openInNewTab:u,disabled:l,setOpenInNewTab:c,onUpdate:d}}function n8(e){var ee,re,D,Y;const{content:t,field:n,id:r,onContentChange:i,condensedButtons:o=!1}=e,[a,s]=E.useState(!1),[u,c]=E.useState(!1),[l,d]=E.useState(),{contentType:p,fieldValue:A,errorBoundaryRef:m,onDocumentSelected:g,onError:_,onMediaSelected:b,onValueChange:I,selectType:x,onTypeChange:v,isTypeSelectEnabled:S,displayTextEnabled:y,...T}=HRe({content:t,field:n,onContentChange:i});Pe.useOnChange(l,()=>{x!==void 0&&!l&&!A&&S&&v(void 0)});const w=a||u,O=p==="DocumentLink"&&A!=="",$=p==="ExternalLink"&&Fr.toURL(A),P=!!((ee=n.config)!=null&&ee.allowTargetBlank),K={...T,id:r,onBlur:()=>s(!1),onFocus:()=>{s(!0)},onOpenLinkModal:()=>{switch(s(!0),p){case"DocumentLink":return d("document");case"ExternalLink":return d("web");case"FileLink":case"ImageLink":case"MediaLink":return d("media");default:return d(void 0)}},onUnlink:()=>{S?v(void 0):I("")},onSelectValueChange:M=>{v(M),d(M)},value:A,condensedButtons:o,allowTargetBlank:P,selectType:x,onValueChange:I,isTypeSelectEnabled:S,displayTextEnabled:y},{searchDocuments:J}=Te();return f.jsxs(f.Fragment,{children:[f.jsxs(h.Popover,{onMouseOverChange:c,open:w,align:"start",sideOffset:-3,openDelay:100,closeDelay:200,focusOnEnter:!1,anchor:f.jsxs(h.Field,{onMouseOverChange:s,children:[f.jsx(h.FieldIcon,{name:om({selectType:x,displayTextEnabled:y})}),f.jsx(h.FieldLabel,{htmlFor:r,children:nr(n)}),f.jsx(h.FieldControl,{children:O&&J?f.jsx(iOe,{errorBoundaryRef:m,onError:_,fallback:f.jsx(AC,{...K,value:"..."}),renderError:()=>eOe(K),children:f.jsx(rOe,{...K,documentId:A})}):f.jsx(AC,{...K})})]}),children:[$&&f.jsx(ju,{url:$,title:Fr.getUrlTitle($)??"",subTitle:$.toString()}),t&&ye.FilledImageLinkContent.is(t.value)&&f.jsx(e8,{url:t.value.url,title:t.value.name,subTitle:`${t.value.width} x ${t.value.height} pixels`})]}),f.jsx(ZRe,{open:l==="web",setOpen:M=>d(M?"web":void 0),url:A,openInNewTab:T.isTargetNewTab,showNewTabButton:!!((re=n.config)!=null&&re.allowTargetBlank),onUpdate:(M,k)=>I(M,k)}),f.jsx(zR,{open:l==="media",onOpenChange:M=>d(M?"media":void 0),onMediaSelected:b,assetType:"all"}),f.jsx(G7,{open:l==="document",onOpenChange:M=>d(M?"document":void 0),onSelectDocument:M=>{d(void 0),g(M)},fixedCustomTypes:new Set((D=n.config)==null?void 0:D.customtypes),fixedTags:new Set((Y=n.config)==null?void 0:Y.tags),linkedDocumentId:t&&ye.FilledDocumentLinkContent.is(t.value)?t.value.id:void 0})]})}function eOe(e){return f.jsx(AC,{...e})}function tOe(e){return{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:r8({displayTextEnabled:e.displayTextEnabled,isTypeSelectEnabled:e.isTypeSelectEnabled,value:e.value})}}function AC(e){const{id:t,value:n,onOpenLinkModal:r,onBlur:i,isTypeSelectEnabled:o,selectType:a,onSelectValueChange:s,onUnlink:u,isTargetNewTab:c,condensedButtons:l,allowTargetBlank:d,displayTextEnabled:p}=e,A=tOe(e);return f.jsx(Vs,{id:t,...A,onBlur:i,textOverflow:"ellipsis",endAdornment:f.jsx(X7,{hasLink:!!(n&&a),onUnlink:u,selectEnabled:o,selectedType:a,value:n,onOpenLinkModal:r,onValueChange:s,openInNewTab:c,condensedButtons:l,showNewTabButton:d&&a==="web",displayTextEnabled:p})})}function nOe(e,t){return{onValueChange:e.displayTextEnabled?e.onDisplayTextChange:void 0,placeholder:e.displayTextEnabled?"Add your display text":void 0,readOnly:!e.displayTextEnabled,value:e.displayTextEnabled?e.displayText:t,variant:e.displayTextEnabled?"normal":"link",onFocus:e.displayTextEnabled?e.onFocus:e.onOpenLinkModal,cursor:r8({displayTextEnabled:e.displayTextEnabled,isTypeSelectEnabled:e.isTypeSelectEnabled,value:t})}}function rOe(e){const{id:t,documentId:n,onOpenLinkModal:r,isTypeSelectEnabled:i,selectType:o,displayTextEnabled:a,condensedButtons:s,onSelectValueChange:u,onUnlink:c}=e,l=GRe(n),d=nOe(e,l);return f.jsx(Vs,{id:t,...d,textOverflow:"ellipsis",endAdornment:f.jsx(X7,{hasLink:!0,onUnlink:c,selectEnabled:i,selectedType:o,value:l,onOpenLinkModal:r,condensedButtons:s,onValueChange:u,displayTextEnabled:a})})}function iOe(e){const{errorBoundaryRef:t,onError:n,children:r,fallback:i,renderError:o}=e;return f.jsx(h.ErrorBoundary,{ref:t,onError:n,renderError:o,children:f.jsx(E.Suspense,{fallback:i,children:r})})}function om(e){const{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 r8(e){const{displayTextEnabled:t,isTypeSelectEnabled:n,value:r}=e;return t?"text":n&&!r?"default":"pointer"}function oOe(e){const{onContentChange:t,...n}=e;function r(i){const o=ye.FilledLinkContent.is(i)?i:void 0;t(o)}return f.jsx(n8,{...n,onContentChange:r})}function aOe(e){const{linkTo:t,onLinkToChange:n}=e;return f.jsx(oOe,{content:sOe(t),onContentChange:r=>n(uOe(r)),field:{type:"Link",config:{label:"Link",allowTargetBlank:!0,allowText:!1}},condensedButtons:!0})}function sOe(e){return e?{__TYPE__:"LinkContent",value:e}:void 0}function uOe(e){return e==null?void 0:e.value}function i8(e){var x,v;const{allContentViews:t,content:n,contentView:r,fieldLabel:i,imageLabel:o,initialImages:a,isUpdating:s,page:u=0,readOnly:c,thumbnailName:l,onClear:d,onContentChange:p,onCropperDialogClose:A,onPageChange:m,onMediaDialogOpenChange:g}=e,_=((v=(x=n==null?void 0:n.url)==null?void 0:x.split("?")[0])==null?void 0:v.slice(-4))===".svg",b=n!=null&&n.url&&!c?"visible":"hidden",I=!ye.isImageContent(n);return f.jsxs(h.Box,{display:"flex",gap:12,padding:{inline:12},children:[f.jsx(h.Box,{children:f.jsx(h.Carousel,{getItemSource:OEe,items:t,onPageChange:m,page:u,buttonSize:"small",renderPrevTooltip:S=>f.jsx(h.Tooltip,{content:"Previous",children:S}),renderNextTooltip:S=>f.jsx(h.Tooltip,{content:"Next",children:S}),style:I?{width:181,height:142}:{width:123,height:93},children:S=>(S==null?void 0:S.url)&&f.jsx(h.CarouselItem,{"aria-label":"Image Field Item",src:$7(S.url),alt:S.alt??void 0,isUpdating:s,disableAnimation:I},`${l}_${S.url}`)})}),f.jsxs(h.Box,{width:"100%",display:"flex",flexDirection:"column",gap:I?16:12,children:[f.jsx(vRe,{fieldLabel:i,imageLabel:o,initialImages:a,page:u,displaySeparator:!I,isSVGContentView:_,visibility:b,onClear:d,onCropperDialogClose:A,onMediaDialogOpenChange:g}),f.jsx(gRe,{readOnly:c||!r,altText:(r==null?void 0:r.alt)??"",onValueChange:S=>{r&&p(wEe(l,n,r,S))}}),I&&f.jsx(aOe,{linkTo:n.linkTo,onLinkToChange:S=>{p({...n,linkTo:S})}})]})]})}function cOe(e){const{content:t,onContentChange:n,field:r}=e,[i,o]=E.useState(0),[a,s]=E.useTransition(),u=TEe(r),c=u[i],l=t?xEe(r,t):void 0,d=l==null?void 0:l[i];function p(_){if(!c)return;const b=FEe(c.name,r,t,_);b!==t&&s(()=>n(b))}function A(_){s(()=>o(_))}function m({option:_,croppedImages:b}){if(o(_),!t)return;const I=Object.entries(b).reduce((x,[v,S])=>fRe({field:r,content:x,thumbnail:v,croppedImage:S}),t);I!==t&&s(()=>n(I))}function g(){o==null||o(0),n(void 0)}return{onCropperDialogClose:m,onPageChange:A,onMediaSelected:p,isUpdating:a,page:i,thumbnail:c,allThumbnails:u,allContentViews:l,contentView:d,onClear:g}}function lOe(e){const{content:t,field:n,readOnly:r,onContentChange:i}=e,o=t&&t.origin.url.length>0,{onCropperDialogClose:a,onPageChange:s,onMediaSelected:u,isUpdating:c,page:l,thumbnail:d,allThumbnails:p,allContentViews:A,contentView:m,onClear:g}=cOe({field:n,content:t,onContentChange:i}),[_,b]=E.useState(!1),I=nr(n),x=p.map((y,T)=>{const w=A==null?void 0:A[T];return{thumbnail:y,contentView:w,labels:lC(y,t,w)}}),v=d&&o?lC(d,t,m).filter(io.isDefined):[],S=d&&t&&o&&A;return f.jsx(V7,{isMediaDialogOpen:_,onMediaSelected:u,onMediaDialogOpenChange:b,children:f.jsx(E.Suspense,{fallback:f.jsx("div",{style:{height:95}}),children:S?f.jsx(i8,{allContentViews:A,content:t,contentView:m,fieldLabel:I,imageLabel:v,initialImages:x,isUpdating:c,page:l,readOnly:r,thumbnailName:d.name,onClear:g,onContentChange:i,onCropperDialogClose:a,onMediaDialogOpenChange:b,onPageChange:s}):f.jsx(K7,{fieldLabel:I,isUpdating:c,readOnly:r,onMediaDialogOpenChange:b})})})}function fOe(e){var _,b;const{searchTerm:t,catalogId:n}=e,r=Te();r.integrationFields||Ht("integrationFields");const{integrationFieldsApiBaseUrl:i,repository:o,authStrategy:a}=r,[s,u]=E.useState(1),[c,l]=E.useState([]),[d,p]=E.useState(""),A=Ke.useRequest(dOe,[i,a,o,n,t,t===d?s:1]);t!==d?(p(t),u(1),l(A.items)):A.items.length>0&&((_=kt.last(c))==null?void 0:_.id)!==((b=kt.last(A.items))==null?void 0:b.id)&&l(I=>I.concat(A.items));const m=s<A.totalPages;function g(){m&&u(I=>I+1)}return{items:c,response:A,fetchNextPage:g,hasNextPage:m}}function dOe(e,t,n,r,i,o=1,a=30){const s=new URL(`if/search/${r}`,e);return s.searchParams.set("searchTerm",i),s.searchParams.set("limit",a.toString()),s.searchParams.set("page",o.toString()),me.request(s,{headers:{repository:n},credentials:me.getRequestCredentials(t),okType:pOe})}const o8=L.object({id:L.string(),title:L.string(),imageURL:L.string().optional(),description:L.string().optional()}),pOe=L.object({items:L.array(o8),totalPages:L.number(),page:L.number()});function a8(e){const{itemId:t,catalogId:n}=e,r=Te();r.integrationFields||Ht("integrationFields");const{integrationFieldsApiBaseUrl:i,repository:o,authStrategy:a}=r,u=Ke.useRequest(AOe,[i,a,o,n,t]).items[0];if(!u)throw new Error("Item not found");return{item:u}}function AOe(e,t,n,r,i){const o=new URL(`if/read/${r}`,e);return o.searchParams.set("ids",[i].toString()),me.request(o,{headers:{repository:n},credentials:me.getRequestCredentials(t),okType:hOe})}const hOe=L.object({items:L.array(o8)});function HR(e){const{item:t,onClick:n,catalogId:r}=e;return f.jsxs(h.PreviewCard,{variant:"large",onClick:n,children:[f.jsx(mOe,{src:t.imageURL??"",alt:t.title}),f.jsxs(h.PreviewContent,{children:[f.jsx(h.Badge,{title:`Catalog: ${r}`,icon:"multipleStop",size:"medium"}),f.jsx(h.Text,{variant:"bold",color:"grey12",sx:{marginTop:4},children:t.title}),f.jsx(h.Text,{variant:"small",color:"grey11",children:t.description??t.id})]})]})}const Qh=76;function mOe(e){const{src:t,alt:n}=e;return t?f.jsx(h.PreviewImage,{src:t,alt:n,width:Qh,height:Qh,framed:!0}):f.jsxs(h.Box,{borderRadius:6,backgroundColor:"grey2",height:Qh,width:Qh,flexDirection:"column",alignItems:"center",justifyContent:"center",border:!0,padding:{inline:4,block:8},children:[f.jsx(h.Icon,{name:"hideImage",size:"large",color:"grey11"}),f.jsx(h.Text,{color:"grey11",variant:"small",noSelect:!0,align:"center",children:"No preview image"})]})}function il(){return f.jsxs(h.PreviewCard,{variant:"large",children:[f.jsx(h.Skeleton,{height:76,width:76}),f.jsxs(h.PreviewContent,{children:[f.jsx(h.Skeleton,{height:24,width:168}),f.jsx(h.Skeleton,{height:24,width:240,sx:{marginTop:4}}),f.jsx(h.Skeleton,{height:16,width:144})]})]})}function gOe(e){const{open:t,onOpenChange:n,catalogId:r,onSelectItem:i}=e,o=Pe.useDebounceState({initialState:""}),a=Te();return f.jsx(h.Dialog,{open:t,onOpenChange:n,hasClose:!1,size:{width:612,height:724},children:f.jsx(h.DialogContent,{children:f.jsxs(h.Box,{flexDirection:"column",height:"100%",children:[f.jsxs(h.Box,{padding:{top:16,inline:16},flexDirection:"column",gap:8,children:[f.jsx(h.FormSearchInput,{value:o.value,onValueChange:o.set,placeholder:"Search in your catalog"}),f.jsx(h.Text,{variant:"smallBold",color:"grey11",children:"Select an item"})]}),a.integrationFields?f.jsx(h.ErrorBoundary,{renderError:()=>f.jsx(hC,{message:"There was an error while fetching your catalog items."}),children:f.jsx(E.Suspense,{fallback:f.jsxs(h.Box,{flexDirection:"column",gap:12,padding:{top:10,inline:16,bottom:16},children:[f.jsx(il,{}),f.jsx(il,{}),f.jsx(il,{}),f.jsx(il,{}),f.jsx(il,{})]}),children:f.jsx(vOe,{searchTerm:o.debouncedValue,catalogId:r,onItemClick:i})})}):f.jsx(hC,{message:"Slice Machine does not yet support mock data for integration field in the simulator."})]})})})}function vOe(e){const{catalogId:t,searchTerm:n,onItemClick:r}=e,[i,o]=E.useTransition(),{items:a,hasNextPage:s,fetchNextPage:u}=fOe({catalogId:t,searchTerm:n});return f.jsx(f.Fragment,{children:f.jsxs(h.ScrollArea,{onScrollToBottom:()=>s&&o(u),style:{flexGrow:1,paddingTop:h.theme.space[10],paddingBottom:h.theme.space[16],paddingInline:h.theme.space[16],display:"flex",flexDirection:"column",gap:h.theme.space[12]},threshold:252,children:[a.length===0?f.jsx(hC,{}):a.map(c=>f.jsx(HR,{item:c,catalogId:t,onClick:()=>r(c)},c.id)),f.jsx(h.AnimatedElement,{animation:{name:"fade"},children:i&&f.jsx(h.Text,{color:"grey11",align:"center",sx:{marginBlock:8},children:"Loading more results ..."})})]})})}function hC(e){const{message:t="We can't find any items matching your search"}=e,n="Oops!";return f.jsx(h.Box,{justifyContent:"center",flexDirection:"column",height:"100%",children:f.jsxs(h.BlankSlate,{children:[f.jsx(h.BlankSlateIcon,{name:"close",lineColor:"purple10",backgroundColor:"purple3",borderColor:"purple6",borderStyle:"dashed",size:"xlarge"}),f.jsx(h.BlankSlateTitle,{size:"big",children:n}),f.jsx(h.BlankSlateDescription,{width:360,children:t})]})})}function yOe(e){const{itemId:t,item:n}=e,r=Te();return t&&n&&n.id===t?f.jsx(ol,{...e,value:n.title}):t&&r.integrationFields?f.jsx(h.ErrorBoundary,{renderError:()=>f.jsx(ol,{...e,value:t}),children:f.jsx(E.Suspense,{fallback:f.jsx(ol,{...e,value:t}),children:f.jsx(SOe,{...e,itemId:t})},t)},t):t&&!r.integrationFields?f.jsx(ol,{...e,value:t}):f.jsx(ol,{...e,value:""})}function bOe(e){const{catalogId:t,itemId:n,item:r}=e,i=Te();return n&&r&&r.id===n?f.jsx(h.FieldFooter,{children:f.jsx(HR,{catalogId:t,item:r})}):n&&i.integrationFields?f.jsx(h.ErrorBoundary,{renderError:()=>null,children:f.jsx(h.FieldFooter,{children:f.jsx(E.Suspense,{fallback:f.jsx(il,{}),children:f.jsx(COe,{catalogId:t,itemId:n})},n)})},n):null}function COe(e){const{itemId:t,catalogId:n}=e,{item:r}=a8({catalogId:n,itemId:t});return f.jsx(HR,{catalogId:n,item:r})}function ol(e){const{id:t,field:n,readOnly:r,value:i,onFocus:o,onClearItem:a}=e;return f.jsx(Vs,{id:t,placeholder:Dc(n),readOnly:!0,variant:"link",value:i,...!r&&{cursor:"pointer",onFocus:o},endAdornment:f.jsx(h.Button,{startIcon:"close",color:"grey",size:"small",disabled:!i,onClick:a})})}function SOe(e){const{itemId:t,catalogId:n}=e,{item:r}=a8({catalogId:n,itemId:t});return f.jsx(ol,{...e,value:r.title})}function _Oe(e){var A;const{id:t,field:n,content:r,readOnly:i,onContentChange:o}=e,[a,s]=E.useState(!1),[u,c]=E.useState(),l=(A=n.config)==null?void 0:A.catalog;if(!l)return null;function d(m){o({value:m.id,__TYPE__:"IntegrationFieldsContent"}),c(m),s(!1)}function p(){o(void 0),c(void 0)}return f.jsxs(f.Fragment,{children:[f.jsxs(h.Field,{footer:f.jsx(bOe,{catalogId:l,item:u,itemId:r==null?void 0:r.value}),children:[f.jsx(h.FieldIcon,{name:"multipleStop"}),f.jsx(h.FieldLabel,{htmlFor:t,children:nr(n)}),f.jsx(h.FieldControl,{children:f.jsx(yOe,{id:t,field:n,readOnly:i,catalogId:l,item:u,itemId:r==null?void 0:r.value,onFocus:()=>s(!0),onClearItem:p})})]}),f.jsx(gOe,{open:a,onOpenChange:s,catalogId:l,onSelectItem:d})]})}function IOe(e){const{content:t,field:n,id:r,onContentChange:i,readOnly:o}=e;return f.jsxs(h.Field,{children:[f.jsx(h.FieldIcon,{name:"notes"}),f.jsx(h.FieldLabel,{htmlFor:r,children:nr(n)}),f.jsx(h.FieldControl,{children:f.jsx(h.TextArea,{id:r,placeholder:Dc(n),readOnly:o,paddingLeft:4,paddingRight:12,sx:{flexGrow:1},value:(t==null?void 0:t.value)??"",onChange:a=>{i(TOe(a))}})})]})}function TOe(e){return e.length===0?void 0:{__TYPE__:"FieldContent",type:"Text",value:e}}const xOe=({content:e,field:t,id:n,onContentChange:r,readOnly:i})=>{var s,u;const o=Number(e==null?void 0:e.value),a=Number.isFinite(o)?o:void 0;return f.jsxs(h.Field,{children:[f.jsx(h.FieldIcon,{name:"pin"}),f.jsx(h.FieldLabel,{htmlFor:n,children:nr(t)}),f.jsx(h.FieldControl,{children:f.jsx(h.NumberInput,{id:n,value:a,min:(s=t.config)==null?void 0:s.min,max:(u=t.config)==null?void 0:u.max,padding:B7,placeholder:Dc(t),readOnly:i,onValueChange:c=>r(wOe(c))})})]})};function wOe(e){return e===void 0?void 0:{__TYPE__:"FieldContent",type:"Number",value:String(e)}}function An(e){this.content=e}An.prototype={constructor:An,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return t==-1?void 0:this.content[t+1]},update:function(e,t,n){var r=n&&n!=e?this.remove(n):this,i=r.find(e),o=r.content.slice();return i==-1?o.push(n||e,t):(o[i+1]=t,n&&(o[i]=n)),new An(o)},remove:function(e){var t=this.find(e);if(t==-1)return this;var n=this.content.slice();return n.splice(t,2),new An(n)},addToStart:function(e,t){return new An([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new An(n)},addBefore:function(e,t,n){var r=this.remove(t),i=r.content.slice(),o=r.find(e);return i.splice(o==-1?i.length:o,0,t,n),new An(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=An.from(e),e.size?new An(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=An.from(e),e.size?new An(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=An.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}};An.from=function(e){if(e instanceof An)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new An(t)};function s8(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let i=e.child(r),o=t.child(r);if(i==o){n+=i.nodeSize;continue}if(!i.sameMarkup(o))return n;if(i.isText&&i.text!=o.text){for(let a=0;i.text[a]==o.text[a];a++)n++;return n}if(i.content.size||o.content.size){let a=s8(i.content,o.content,n+1);if(a!=null)return a}n+=i.nodeSize}}function u8(e,t,n,r){for(let i=e.childCount,o=t.childCount;;){if(i==0||o==0)return i==o?null:{a:n,b:r};let a=e.child(--i),s=t.child(--o),u=a.nodeSize;if(a==s){n-=u,r-=u;continue}if(!a.sameMarkup(s))return{a:n,b:r};if(a.isText&&a.text!=s.text){let c=0,l=Math.min(a.text.length,s.text.length);for(;c<l&&a.text[a.text.length-c-1]==s.text[s.text.length-c-1];)c++,n--,r--;return{a:n,b:r}}if(a.content.size||s.content.size){let c=u8(a.content,s.content,n-1,r-1);if(c)return c}n-=u,r-=u}}class X{constructor(t,n){if(this.content=t,this.size=n||0,n==null)for(let r=0;r<t.length;r++)this.size+=t[r].nodeSize}nodesBetween(t,n,r,i=0,o){for(let a=0,s=0;s<n;a++){let u=this.content[a],c=s+u.nodeSize;if(c>t&&r(u,i+s,o||null,a)!==!1&&u.content.size){let l=s+1;u.nodesBetween(Math.max(0,t-l),Math.min(u.content.size,n-l),r,i+l)}s=c}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,n,r,i){let o="",a=!0;return this.nodesBetween(t,n,(s,u)=>{s.isText?(o+=s.text.slice(Math.max(t,u)-u,n-u),a=!r):s.isLeaf?(i?o+=typeof i=="function"?i(s):i:s.type.spec.leafText&&(o+=s.type.spec.leafText(s)),a=!r):!a&&s.isBlock&&(o+=r,a=!0)},0),o}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,i=this.content.slice(),o=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),o=1);o<t.content.length;o++)i.push(t.content[o]);return new X(i,this.size+t.size)}cut(t,n=this.size){if(t==0&&n==this.size)return this;let r=[],i=0;if(n>t)for(let o=0,a=0;a<n;o++){let s=this.content[o],u=a+s.nodeSize;u>t&&((a<t||u>n)&&(s.isText?s=s.cut(Math.max(0,t-a),Math.min(s.text.length,n-a)):s=s.cut(Math.max(0,t-a-1),Math.min(s.content.size,n-a-1))),r.push(s),i+=s.nodeSize),a=u}return new X(r,i)}cutByIndex(t,n){return t==n?X.empty:t==0&&n==this.content.length?this:new X(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let i=this.content.slice(),o=this.size+n.nodeSize-r.nodeSize;return i[t]=n,new X(i,o)}addToStart(t){return new X([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new X(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(t.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(t){let n=this.content[t];if(!n)throw new RangeError("Index "+t+" out of range for "+this);return n}maybeChild(t){return this.content[t]||null}forEach(t){for(let n=0,r=0;n<this.content.length;n++){let i=this.content[n];t(i,r,n),r+=i.nodeSize}}findDiffStart(t,n=0){return s8(this,t,n)}findDiffEnd(t,n=this.size,r=t.size){return u8(this,t,n,r)}findIndex(t,n=-1){if(t==0)return zh(0,t);if(t==this.size)return zh(this.content.length,t);if(t>this.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let r=0,i=0;;r++){let o=this.child(r),a=i+o.nodeSize;if(a>=t)return a==t||n>0?zh(r+1,a):zh(r,i);i=a}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,n){if(!n)return X.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new X(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return X.empty;let n,r=0;for(let i=0;i<t.length;i++){let o=t[i];r+=o.nodeSize,i&&o.isText&&t[i-1].sameMarkup(o)?(n||(n=t.slice(0,i)),n[n.length-1]=o.withText(n[n.length-1].text+o.text)):n&&n.push(o)}return new X(n||t,r)}static from(t){if(!t)return X.empty;if(t instanceof X)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new X([t],t.nodeSize);throw new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}X.empty=new X([],0);const Xb={index:0,offset:0};function zh(e,t){return Xb.index=e,Xb.offset=t,Xb}function Vm(e,t){if(e===t)return!0;if(!(e&&typeof e=="object")||!(t&&typeof t=="object"))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!Vm(e[r],t[r]))return!1}else{for(let r in e)if(!(r in t)||!Vm(e[r],t[r]))return!1;for(let r in t)if(!(r in e))return!1}return!0}let vt=class mC{constructor(t,n){this.type=t,this.attrs=n}addToSet(t){let n,r=!1;for(let i=0;i<t.length;i++){let o=t[i];if(this.eq(o))return t;if(this.type.excludes(o.type))n||(n=t.slice(0,i));else{if(o.type.excludes(this.type))return t;!r&&o.type.rank>this.type.rank&&(n||(n=t.slice(0,i)),n.push(this),r=!0),n&&n.push(o)}}return n||(n=t.slice()),r||n.push(this),n}removeFromSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return t.slice(0,n).concat(t.slice(n+1));return t}isInSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return!0;return!1}eq(t){return this==t||this.type==t.type&&Vm(this.attrs,t.attrs)}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=t.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);return r.create(n.attrs)}static sameSet(t,n){if(t==n)return!0;if(t.length!=n.length)return!1;for(let r=0;r<t.length;r++)if(!t[r].eq(n[r]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&t.length==0)return mC.none;if(t instanceof mC)return[t];let n=t.slice();return n.sort((r,i)=>r.type.rank-i.type.rank),n}};vt.none=[];class mp extends Error{}class ae{constructor(t,n,r){this.content=t,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=l8(this.content,t+this.openStart,n);return r&&new ae(r,this.openStart,this.openEnd)}removeBetween(t,n){return new ae(c8(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,n){if(!n)return ae.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new ae(X.fromJSON(t,n.content),r,i)}static maxOpen(t,n=!0){let r=0,i=0;for(let o=t.firstChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.firstChild)r++;for(let o=t.lastChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.lastChild)i++;return new ae(t,r,i)}}ae.empty=new ae(X.empty,0,0);function c8(e,t,n){let{index:r,offset:i}=e.findIndex(t),o=e.maybeChild(r),{index:a,offset:s}=e.findIndex(n);if(i==t||o.isText){if(s!=n&&!e.child(a).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(r!=a)throw new RangeError("Removing non-flat range");return e.replaceChild(r,o.copy(c8(o.content,t-i-1,n-i-1)))}function l8(e,t,n,r){let{index:i,offset:o}=e.findIndex(t),a=e.maybeChild(i);if(o==t||a.isText)return r&&!r.canReplace(i,i,n)?null:e.cut(0,t).append(n).append(e.cut(t));let s=l8(a.content,t-o-1,n);return s&&e.replaceChild(i,a.copy(s))}function EOe(e,t,n){if(n.openStart>e.depth)throw new mp("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new mp("Inconsistent open depths");return f8(e,t,n,0)}function f8(e,t,n,r){let i=e.index(r),o=e.node(r);if(i==t.index(r)&&r<e.depth-n.openStart){let a=f8(e,t,n,r+1);return o.copy(o.content.replaceChild(i,a))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&e.depth==r&&t.depth==r){let a=e.parent,s=a.content;return Au(a,s.cut(0,e.parentOffset).append(n.content).append(s.cut(t.parentOffset)))}else{let{start:a,end:s}=$Oe(n,e);return Au(o,p8(e,a,s,t,r))}else return Au(o,Qm(e,t,r))}function d8(e,t){if(!t.type.compatibleContent(e.type))throw new mp("Cannot join "+t.type.name+" onto "+e.type.name)}function gC(e,t,n){let r=e.node(n);return d8(r,t.node(n)),r}function pu(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 Fd(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&&(pu(e.nodeAfter,r),o++));for(let s=o;s<a;s++)pu(i.child(s),r);t&&t.depth==n&&t.textOffset&&pu(t.nodeBefore,r)}function Au(e,t){return e.type.checkContent(t),e.copy(t)}function p8(e,t,n,r,i){let o=e.depth>i&&gC(e,t,i+1),a=r.depth>i&&gC(n,r,i+1),s=[];return Fd(null,e,i,s),o&&a&&t.index(i)==n.index(i)?(d8(o,a),pu(Au(o,p8(e,t,n,r,i+1)),s)):(o&&pu(Au(o,Qm(e,t,i+1)),s),Fd(t,n,i,s),a&&pu(Au(a,Qm(n,r,i+1)),s)),Fd(r,null,i,s),new X(s)}function Qm(e,t,n){let r=[];if(Fd(null,e,n,r),e.depth>n){let i=gC(e,t,n+1);pu(Au(i,Qm(e,t,n+1)),r)}return Fd(t,null,n,r),new X(r)}function $Oe(e,t){let n=t.depth-e.openStart,i=t.node(n).copy(e.content);for(let o=n-1;o>=0;o--)i=t.node(o).copy(X.from(i));return{start:i.resolveNoCache(e.openStart+n),end:i.resolveNoCache(i.content.size-e.openEnd-n)}}class gp{constructor(t,n,r){this.pos=t,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(t){return t==null?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[this.resolveDepth(t)*3]}index(t){return this.path[this.resolveDepth(t)*3+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t==this.depth&&!this.textOffset?0:1)}start(t){return t=this.resolveDepth(t),t==0?0:this.path[t*3-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]}after(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]+this.path[t*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,n=this.index(this.depth);if(n==t.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=t.child(n);return r?t.child(n).cut(r):i}get nodeBefore(){let t=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(t).cut(0,n):t==0?null:this.parent.child(t-1)}posAtIndex(t,n){n=this.resolveDepth(n);let r=this.path[n*3],i=n==0?0:this.path[n*3-1]+1;for(let o=0;o<t;o++)i+=r.child(o).nodeSize;return i}marks(){let t=this.parent,n=this.index();if(t.content.size==0)return vt.none;if(this.textOffset)return t.child(n).marks;let r=t.maybeChild(n-1),i=t.maybeChild(n);if(!r){let s=r;r=i,i=s}let o=r.marks;for(var a=0;a<o.length;a++)o[a].type.spec.inclusive===!1&&(!i||!o[a].isInSet(i.marks))&&(o=o[a--].removeFromSet(o));return o}marksAcross(t){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,i=t.parent.maybeChild(t.index());for(var o=0;o<r.length;o++)r[o].type.spec.inclusive===!1&&(!i||!r[o].isInSet(i.marks))&&(r=r[o--].removeFromSet(r));return r}sharedDepth(t){for(let n=this.depth;n>0;n--)if(this.start(n)<=t&&this.end(n)>=t)return n;return 0}blockRange(t=this,n){if(t.pos<this.pos)return t.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==t.pos?1:0);r>=0;r--)if(t.pos<=this.end(r)&&(!n||n(this.node(r))))return new zm(this,t,r);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos<this.pos?t:this}toString(){let t="";for(let n=1;n<=this.depth;n++)t+=(t?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return t+":"+this.parentOffset}static resolve(t,n){if(!(n>=0&&n<=t.content.size))throw new RangeError("Position "+n+" out of range");let r=[],i=0,o=n;for(let a=t;;){let{index:s,offset:u}=a.content.findIndex(o),c=o-u;if(r.push(a,s,i+u),!c||(a=a.child(s),a.isText))break;o=c-1,i+=u+1}return new gp(n,r,o)}static resolveCached(t,n){for(let i=0;i<e1.length;i++){let o=e1[i];if(o.pos==n&&o.doc==t)return o}let r=e1[t1]=gp.resolve(t,n);return t1=(t1+1)%ROe,r}}let e1=[],t1=0,ROe=12;class zm{constructor(t,n,r){this.$from=t,this.$to=n,this.depth=r}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)}}const OOe=Object.create(null);let hl=class vC{constructor(t,n,r,i=vt.none){this.type=t,this.attrs=n,this.marks=i,this.content=r||X.empty}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(t){return this.content.child(t)}maybeChild(t){return this.content.maybeChild(t)}forEach(t){this.content.forEach(t)}nodesBetween(t,n,r,i=0){this.content.nodesBetween(t,n,r,i,this)}descendants(t){this.nodesBetween(0,this.content.size,t)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(t,n,r,i){return this.content.textBetween(t,n,r,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(t){return this==t||this.sameMarkup(t)&&this.content.eq(t.content)}sameMarkup(t){return this.hasMarkup(t.type,t.attrs,t.marks)}hasMarkup(t,n,r){return this.type==t&&Vm(this.attrs,n||t.defaultAttrs||OOe)&&vt.sameSet(this.marks,r||vt.none)}copy(t=null){return t==this.content?this:new vC(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new vC(this.type,this.attrs,this.content,t)}cut(t,n=this.content.size){return t==0&&n==this.content.size?this:this.copy(this.content.cut(t,n))}slice(t,n=this.content.size,r=!1){if(t==n)return ae.empty;let i=this.resolve(t),o=this.resolve(n),a=r?0:i.sharedDepth(n),s=i.start(a),c=i.node(a).content.cut(i.pos-s,o.pos-s);return new ae(c,i.depth-a,o.depth-a)}replace(t,n,r){return EOe(this.resolve(t),this.resolve(n),r)}nodeAt(t){for(let n=this;;){let{index:r,offset:i}=n.content.findIndex(t);if(n=n.maybeChild(r),!n)return null;if(i==t||n.isText)return n;t-=i+1}}childAfter(t){let{index:n,offset:r}=this.content.findIndex(t);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(t){if(t==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(t);if(r<t)return{node:this.content.child(n),index:n,offset:r};let i=this.content.child(n-1);return{node:i,index:n-1,offset:r-i.nodeSize}}resolve(t){return gp.resolveCached(this,t)}resolveNoCache(t){return gp.resolve(this,t)}rangeHasMark(t,n,r){let i=!1;return n>t&&this.nodesBetween(t,n,o=>(r.isInSet(o.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),A8(this.marks,t)}contentMatchAt(t){let n=this.type.contentMatch.matchFragment(this.content,0,t);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(t,n,r=X.empty,i=0,o=r.childCount){let a=this.contentMatchAt(t).matchFragment(r,i,o),s=a&&a.matchFragment(this.content,n);if(!s||!s.validEnd)return!1;for(let u=i;u<o;u++)if(!this.type.allowsMarks(r.child(u).marks))return!1;return!0}canReplaceWith(t,n,r,i){if(i&&!this.type.allowsMarks(i))return!1;let o=this.contentMatchAt(t).matchType(r),a=o&&o.matchFragment(this.content,n);return a?a.validEnd:!1}canAppend(t){return t.content.size?this.canReplace(this.childCount,this.childCount,t.content):this.type.compatibleContent(t.type)}check(){this.type.checkContent(this.content);let t=vt.none;for(let n=0;n<this.marks.length;n++)t=this.marks[n].addToSet(t);if(!vt.sameSet(t,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(n=>n.toJSON())),t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r=null;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(t.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(n.text,r)}let i=X.fromJSON(t,n.content);return t.nodeType(n.type).create(n.attrs,i,r)}};hl.prototype.text=void 0;class Hm extends hl{constructor(t,n,r,i){if(super(t,n,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):A8(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,n){return this.text.slice(t,n)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new Hm(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new Hm(this.type,this.attrs,t,this.marks)}cut(t=0,n=this.text.length){return t==0&&n==this.text.length?this:this.withText(this.text.slice(t,n))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function A8(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class Uu{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new FOe(t,n);if(r.next==null)return Uu.empty;let i=h8(r);r.next&&r.err("Unexpected trailing text");let o=POe(BOe(i));return DOe(o,r),o}matchType(t){for(let n=0;n<this.next.length;n++)if(this.next[n].type==t)return this.next[n].next;return null}matchFragment(t,n=0,r=t.childCount){let i=this;for(let o=n;i&&o<r;o++)i=i.matchType(t.child(o).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let t=0;t<this.next.length;t++){let{type:n}=this.next[t];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(t){for(let n=0;n<this.next.length;n++)for(let r=0;r<t.next.length;r++)if(this.next[n].type==t.next[r].type)return!0;return!1}fillBefore(t,n=!1,r=0){let i=[this];function o(a,s){let u=a.matchFragment(t,r);if(u&&(!n||u.validEnd))return X.from(s.map(c=>c.createAndFill()));for(let c=0;c<a.next.length;c++){let{type:l,next:d}=a.next[c];if(!(l.isText||l.hasRequiredAttrs())&&i.indexOf(d)==-1){i.push(d);let p=o(d,s.concat(l));if(p)return p}}return null}return o(this,[])}findWrapping(t){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==t)return this.wrapCache[r+1];let n=this.computeWrapping(t);return this.wrapCache.push(t,n),n}computeWrapping(t){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),o=i.match;if(o.matchType(t)){let a=[];for(let s=i;s.type;s=s.via)a.push(s.type);return a.reverse()}for(let a=0;a<o.next.length;a++){let{type:s,next:u}=o.next[a];!s.isLeaf&&!s.hasRequiredAttrs()&&!(s.name in n)&&(!i.type||u.validEnd)&&(r.push({match:s.contentMatch,type:s,via:i}),n[s.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(t){if(t>=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];function n(r){t.push(r);for(let i=0;i<r.next.length;i++)t.indexOf(r.next[i].next)==-1&&n(r.next[i].next)}return n(this),t.map((r,i)=>{let o=i+(r.validEnd?"*":" ")+" ";for(let a=0;a<r.next.length;a++)o+=(a?", ":"")+r.next[a].type.name+"->"+t.indexOf(r.next[a].next);return o}).join(`
36
+ npx @slicemachine/init@latest --repository ${i??"<my-project>"}`,language:"bash",title:"Terminal",showLineNumbers:!1})]})},{id:"createPageType",title:"Create a Page Type",description:"Build the structure of your page",videoUrl:"https://res.cloudinary.com/dmtf1daqp/video/upload/v1721918320/DEV_TOOLS/ONBOARDING_GUIDE/Create_page_type_xdn13j.mp4",content:f.jsx(h.Text,{children:"A page type is a base content structure editors will use to create pages in the Page Builder (Prismic's content creation UI). A page type can be reusable (e.g., for multiple blog posts) or single (e.g., for a one-time page like the homepage)."})},{id:"codePage",title:"Code Your Page Type",description:"Prepare code to fetch content",videoUrl:"https://res.cloudinary.com/dmtf1daqp/video/upload/v1721918320/DEV_TOOLS/ONBOARDING_GUIDE/Step2_code_your_page_jatiur.mp4",content:f.jsx(h.Text,{children:"Prepare your code to query the content from the Prismic API."})},{id:"createSlice",title:"Create a Slice",description:"Build a reusable website section",videoUrl:"https://res.cloudinary.com/dmtf1daqp/video/upload/v1721918322/DEV_TOOLS/ONBOARDING_GUIDE/Step3_add_slice_qzmvxf.mp4",content:f.jsx(h.Text,{children:"Slices are website sections that can be reused on different pages with different content. Each slice has a code component automatically generated by Slice Machine. Start with a template and look at your code to see how it's structured."})},{id:"reviewAndPush",title:"Review and Push changes",description:"Enable editors to create content",videoUrl:"https://res.cloudinary.com/dmtf1daqp/video/upload/v1721918320/DEV_TOOLS/ONBOARDING_GUIDE/DevTools_Squad_push_changes_ovvmul.mp4",content:f.jsx(h.Text,{children:"Your page types and slices currently exist only in your local project. Push them to your repository to make them available for your content editors."})},{id:"createContent",title:"Create Content",description:"Publish a page to the Prismic API",videoUrl:"https://res.cloudinary.com/dmtf1daqp/video/upload/v1721918324/DEV_TOOLS/ONBOARDING_GUIDE/Cre%CC%81er_contenu_e%CC%81tape_4_z9vlzt.mp4",content:f.jsx(h.Text,{children:"In Prismic, content creation takes place in the Prismic Page Builder UI. Open the Page Builder and start creating your first page."})},{id:"renderPage",title:"Render Your Page",description:"View your page in the browser",videoUrl:"https://res.cloudinary.com/dmtf1daqp/video/upload/v1721918321/DEV_TOOLS/ONBOARDING_GUIDE/Step_6_Render_Page_tnauh9.mp4",content:f.jsxs(h.Text,{children:["Now that your content is published, you can run your project in your terminal and visit the page on your local server (e.g.,"," ",f.jsx(h.Text,{component:"code",children:"localhost:3000/example-page"}),"). Your content should now be visible!"]})}],u={next:"https://prismic.dev/course/next",nuxt:"https://prismic.dev/course/nuxt",sveltekit:"https://prismic.dev/course/sveltekit"};return{steps:s,defaultCompletedStepIds:s.flatMap(c=>c.defaultCompleted?[c.id]:[]),tutorialLink:t?u[t]:void 0}}function $$e(e){const{framework:t}=e;if(!t||t==="other")return{frameworkNameLabel:"",createProjectCodeSnippet:""};const n=QM[t];return{frameworkNameLabel:n?`${n} `:"",createProjectCodeSnippet:zM[t]}}const Jb=3e3,tk=400;function R$e(e){const{onboardingState:t,tracking:n,onToggleStep:r,onToggleGuide:i,fallback:o=null,stepOverrides:a,repositoryName:s,projectName:u}=e,{context:c,isDismissed:l}=t,{steps:d,defaultCompletedStepIds:p,tutorialLink:A}=E$e({...c,repositoryName:s,projectName:u}),m=I(t.completedSteps),g=O$e(_,tk);if(Pe.useOnChange(l,()=>!l&&g.reset()),c.framework==="other")return f.jsx(f.Fragment,{children:o});function _(){i()}async function b(x){const v=await r(x.id);v.includes(x.id)&&n.track({event:"shared-onboarding:step-completed",stepId:x.id,stepTitle:x.title,source:n.source}),I(v).length===d.length&&(n.track({event:"shared-onboarding:completed",source:n.source}),g.start())}function I(x){const v=d.map(({id:S})=>S);return Array.from(new Set([...x.filter(S=>v.includes(S)),...p]))}return l?null:f.jsx(h.AnimatedElement,{enterDuration:0,exitDuration:tk,children:g.status!=="hidden"&&f.jsxs("div",{ref:g.refs.container,style:{position:"relative"},children:[f.jsx(w$e,{steps:d,completedSteps:m,tutorialLink:A,tracking:n,onToggleStep:b,onClose:g.status!=="animating"?_:void 0,stepOverrides:a}),f.jsx("div",{ref:g.refs.cannon,style:{position:"absolute",bottom:0,left:0}})]})})}function O$e(e,t=400){const n=cz.useConfetti({config:{duration:Jb}}),[r,i]=E.useState("visible"),o=E.useRef(!1),a=E.useCallback(()=>{i("animating"),setTimeout(()=>i("hidden"),Jb-t),o.current||(setTimeout(e,Jb),o.current=!0)},[e,t]),s=()=>{n.throwConfetti(),a()},u=E.useCallback(()=>{i("visible"),o.current=!1},[]);return{refs:{container:n.confettiContainerRef,cannon:n.confettiCannonRef},status:r,start:s,reset:u}}const M7=E.createContext({editedUID:{current:!1},onEditUID:()=>{}});function L7(e){return Object.values(e.json).some(t=>{var n;return((n=t.uid)==null?void 0:n.type)==="UID"})}function F$e(e){const{content:t,customType:n}=e;return L7(n)&&!t.uid}function j7(e){const{documentId:t,documentsWithUid:n,uid:r}=e;return n.filter(i=>t!==i.id&&M$e({document:i,uid:r})&&k$e({...e,document:i}))}function k$e(e){const{customTypeId:t,languageId:n,document:r}=e,i=t===r.custom_type_id,o=n===r.language.id;return i&&o}function M$e(e){const{document:t,uid:n}=e,r=t.versions.filter(i=>i.uid===n);return r.length===0?!0:r.some(i=>i.status!=="archived")}const Ul=E.createContext(void 0);function L$e(e){const{customTypeFormat:t,children:n}=e,r=E.useMemo(()=>({customTypeFormat:t,isInSlice:!1,isInGroup:!1}),[t]);return f.jsx(Ul.Provider,{value:r,children:n})}function j$e(e){const{children:t}=e,n=E.useContext(Ul),r=E.useMemo(()=>n&&{...n,isInSlice:!0},[n]);return f.jsx(Ul.Provider,{value:r,children:t})}function U$e(e){const{children:t}=e,n=E.useContext(Ul),r=E.useMemo(()=>n&&{...n,isInGroup:!0},[n]);return f.jsx(Ul.Provider,{value:r,children:t})}function B$e(){return E.useContext(Ul)}function H0(e,t){return`${e}___${t}`}const U7=E.createContext({ids:[],isSelected:()=>!1,update:()=>{}});function Y0(){return E.useContext(U7)}function nr(e){var t;return((t=e.config)==null?void 0:t.label)??(e.type==="Boolean"||e.type==="Separator"?void 0:e.fieldset)??e.type}const QR="...";function P$e(e,t,n=QR){var r,i;return(t?(r=e.config)==null?void 0:r.placeholder_true:(i=e.config)==null?void 0:i.placeholder_false)||n}function Dc(e,t=QR){var n;return((n=e.config)==null?void 0:n.placeholder)||t}function D$e(e){var s;const{content:t,field:n,id:r,readOnly:i,onContentChange:o}=e,a=(t==null?void 0:t.value)??((s=n.config)==null?void 0:s.default_value)??!1;return f.jsxs(h.Field,{children:[f.jsx(h.FieldIcon,{name:"biToggle"}),f.jsx(h.FieldLabel,{htmlFor:r,children:nr(n)}),f.jsxs(h.FieldControl,{children:[f.jsx(h.Box,{padding:4,alignItems:"center",children:f.jsx(h.Text,{children:P$e(n,a)})}),f.jsx(h.Switch,{id:r,sx:{alignSelf:"center",marginLeft:"auto",marginRight:12},checked:a,onCheckedChange:u=>{i||o(W$e(u))}})]})]})}function W$e(e){return{__TYPE__:"BooleanContent",value:e}}function K$e(e){const{id:t,field:n,content:r,onContentChange:i}=e;return f.jsxs(h.Field,{children:[f.jsx(h.FieldIcon,{name:"colorLens"}),f.jsx(h.FieldLabel,{id:t,children:nr(n)}),f.jsx(h.FieldControl,{children:f.jsx(h.Box,{padding:{left:4},alignItems:"center",children:f.jsx(h.ColorInput,{onValueChange:o=>i(N$e(o)),value:r==null?void 0:r.value,"aria-labelledby":t,placeholder:Dc(n)})})})]})}function N$e(e){return e===void 0?void 0:{__TYPE__:"FieldContent",type:"Color",value:e}}function q$e(e){const{id:t,readOnly:n,field:r,content:i,onContentChange:o}=e,a=i!=null&&i.value?tS.dateFromISOString(i.value):void 0;return f.jsxs(h.Field,{children:[f.jsx(h.FieldIcon,{name:"dateRange"}),f.jsx(h.FieldLabel,{id:t,children:nr(r)}),f.jsx(h.FieldControl,{children:f.jsx(h.Box,{padding:{left:4,right:12},width:"100%",flexDirection:"column",justifyContent:"center",children:f.jsx(h.DateInput,{mode:"date","aria-labelledby":t,disabled:n,value:a,onValueChange:s=>o(V$e(s))})})})]})}function V$e(e){if(e)return{__TYPE__:"FieldContent",type:"Date",value:Q$e(e)}}function Q$e(e){const t=`${e.getFullYear()}`.padStart(4,"0"),n=`${e.getMonth()+1}`.padStart(2,"0"),r=`${e.getDate()}`.padStart(2,"0");return`${t}-${n}-${r}`}const Vs=E.forwardRef(function(t,n){return f.jsx(h.TextInput,{padding:B7,...t,ref:n,sx:{...t.sx,alignSelf:"stretch"}})}),B7={input:{inline:4},adornment:{inline:12}},z$e=({provider:e})=>H$e[e.toLowerCase()]??f.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("g",{clipPath:"url(#clip0_6524_22412)",children:f.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"})}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_6524_22412",children:f.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),H$e={codepen:f.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("g",{clipPath:"url(#clip0_6523_22409)",children:f.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"})}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_6523_22409",children:f.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),codesandbox:f.jsxs("svg",{width:"14",height:"16",viewBox:"0 0 14 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("g",{clipPath:"url(#clip0_6523_22406)",children:f.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"})}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_6523_22406",children:f.jsx("rect",{width:"13.8378",height:"16",fill:"white"})})})]}),dailymotion:f.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsxs("g",{clipPath:"url(#clip0_6523_22345)",children:[f.jsx("path",{d:"M16 0H0V16H16V0Z",fill:"white"}),f.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"})]}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_6523_22345",children:f.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),flickr:f.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("rect",{width:"16",height:"16",fill:"white"}),f.jsxs("g",{clipPath:"url(#clip0_6523_22379)",children:[f.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"}),f.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"})]}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_6523_22379",children:f.jsx("rect",{width:"12",height:"5.568",fill:"white",transform:"translate(2 5)"})})})]}),giphy:f.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("rect",{width:"16",height:"16",fill:"#121212"}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4 3.38889V12.2778H5.11111V3.38889H4Z",fill:"#00FF99"}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.6663 5.61111V12.2778H11.7774V5.61111H10.6663Z",fill:"#9933FF"}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.75 3H4V4.11111H8.83333V3H7.75Z",fill:"#FFF35C"}),f.jsx("path",{d:"M9.00041 4.11111H7.33374H8.83374V3.77778L9.00041 4.11111Z",fill:"#999999"}),f.jsx("path",{d:"M8.83374 4.11111H7.33374L8.44485 3L8.83374 3.77778V4.11111Z",fill:"#999237"}),f.jsx("path",{d:"M10.6663 7.44444V5.77778L11.7774 6.33333L10.6663 7.44444Z",fill:"#5C1F99"}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.6667 11.8889H4V13H11.7778V11.8889H10.6667Z",fill:"#00CCFF"}),f.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:f.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:[f.jsxs("g",{clipPath:"url(#clip0_6523_22356)",children:[f.jsx("mask",{id:"mask0_6523_22356",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"16",height:"16",children:f.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"})}),f.jsxs("g",{mask:"url(#mask0_6523_22356)",children:[f.jsx("mask",{id:"mask1_6523_22356",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"-1",y:"-1",width:"18",height:"18",children:f.jsx("path",{d:"M16.5905 -0.583628H-0.603516V16.6106H16.5905V-0.583628Z",fill:"white"})}),f.jsxs("g",{mask:"url(#mask1_6523_22356)",children:[f.jsx("mask",{id:"mask2_6523_22356",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"-1",y:"-1",width:"18",height:"18",children:f.jsx("path",{d:"M16.6701 -0.663237H-0.683105V16.6902H16.6701V-0.663237Z",fill:"white"})}),f.jsxs("g",{mask:"url(#mask2_6523_22356)",children:[f.jsx("mask",{id:"mask3_6523_22356",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"-1",y:"-1",width:"18",height:"18",children:f.jsx("path",{d:"M16.6701 -0.663237H-0.683105V16.6902H16.6701V-0.663237Z",fill:"white"})}),f.jsx("g",{mask:"url(#mask3_6523_22356)",children:f.jsx("rect",{x:"-0.688721",y:"-0.665792",width:"17.3622",height:"17.3622",fill:"url(#pattern0)"})})]})]})]})]}),f.jsxs("defs",{children:[f.jsx("pattern",{id:"pattern0",patternContentUnits:"objectBoundingBox",width:"1",height:"1",children:f.jsx("use",{xlinkHref:"#image0_6523_22356",transform:"scale(0.000439947)"})}),f.jsx("clipPath",{id:"clip0_6523_22356",children:f.jsx("rect",{width:"16",height:"16",fill:"white"})}),f.jsx("image",{id:"image0_6523_22356",width:"2273",height:"2275",xlinkHref:"data:image/jpeg;base64,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Hbvsfww7d9j+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/hh26jfww7dRv4Yduo38MO3Ub+GHbqN/DDt1G/hh26jfww7dRv4Yduo38MO3Ub+GHbqN/DDt1G/hh26jfww7dRv4Yduo38MO3Ub+GHbqN/DDt1G/hh26j+GHbqP4Yduo38MO3Ub+GHbqP4Yduo/hh26j+GHbmP4YduY/hh25j+GHbmP4YduY/hh25j+GHbmP4YduY/hh25j+GHbmP4YduY/hh25j+GHbmP4YduY/hh25j+GHbmP4YduY/hh25j+GHbmNh25jYduY2HbmNh25jYduY2HbmNh24jYduI2HbiNh24jYduI2HbiNh24jYduI2HbiNh24jYduI2HbiNh24jYduI2HbiNh24jYduI2HbiNh24jYduI2HbiNh0+Nh0+Jh0+Jh0+Jh0+Jh0+Jh0+Jh0+Jh0+Jh0+Jh0+Jh0+Jh0+Jh0+Jh0+Jh0+Jh0+Jh0+Jh0+Jh0+Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jhz+j7fweHn/AFd+fp9v6v8Ape79DDf1JLc930/LnmGfj9H0+v7/APAf6c32/wAQ/wCR+n/5f9383/iNaca041pxrTjWnGtONaca041pxrTjWnGtONaca041pxrTjWnGtONaca041pxrTjWnGtONaca041pxrTjWnGtONaca041pxrTjWnGtONaca041pxrTjWnGtONaca041pxrTjWnGtONaca0415xrzjXnGvONeca8415xrzjXnGvONeca8415xrzjXnGvONeca8415xrzjXnGvONeYa8w15hrzDXmGvMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMNeYa8w15hrzDXnGvONeca8415xrzjXnGvONeca041pxrTjWnGtONaca041pxrTjWnGtONacas41ZxqzjVnGrONWcas41ZxqzjVnGrONScak41JxqTjUUGooNRQaig1FBqKDTUGmoNNQaag01BpqDTUGmoNNQaag0lBpKDSUGkoNJQaSg0lBpKDSUGioNFQaKg0VBoqDRVGiqNFUaKo0FRoKjQVGgqNBUaCo0FRoKjQVGgqPXqj16o9eqPXqj16o9eqPXqj16o9eqPXqj1yo9cqPXKj1yo9cqPXLD1yw9csPXLD1yw9csPWrD1qw9asPWrD1qw9asPWrD1qw9asPWrD1qw9YsPWLD1iw9YsPWLD1iw9YsPWLD1iw9YsPWLD1iw9YsPWLD1iw9YsPWLD1iw9YsPWLD1iw9YsPWLD1aw9WsPVrD1aw9WsPVrD1aw9WsPVrD1aw9WsPVrB34/8Ay/z/AH/53yHY/wDU/E/0v+P7/wCz/9k="})]})]}),pinterest:f.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsxs("g",{clipPath:"url(#clip0_6570_25513)",children:[f.jsx("rect",{width:"15.996",height:"16",rx:"2",fill:"#CC2127"}),f.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"})]}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_6570_25513",children:f.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),spotify:f.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("g",{clipPath:"url(#clip0_6523_22402)",children:f.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"})}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_6523_22402",children:f.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),twitter:f.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.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:f.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsxs("g",{clipPath:"url(#clip0_6523_22340)",children:[f.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"}),f.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"})]}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_6523_22340",children:f.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),youtube:f.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.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"}),f.jsx("path",{d:"M6.36353 10.0058L10.5453 7.62974L6.36353 5.25349V10.0058Z",fill:"white"})]})};function P7(e){const{debouncedUrl:t,content:n,onContentChange:r,selected:i}=e,o=E.useRef(null),[a,s]=E.useState(!1);Pe.useOnChange(t,()=>{var c;a&&(s(!1),(c=o.current)==null||c.reset())});function u(){s(!0),r(void 0)}return Fr.toURL(t)?t===(n==null?void 0:n.embed_url)?f.jsx(dC,{content:n,selected:i}):f.jsx(h.ErrorBoundary,{ref:o,renderError:Y$e,onError:u,children:f.jsx(E.Suspense,{fallback:n&&f.jsx(dC,{content:n,selected:i}),children:f.jsx(G$e,{url:t,selected:i,onContentChange:r})})}):null}function Y$e(){return f.jsxs(h.Box,{backgroundColor:"grey2",borderRadius:6,padding:16,gap:4,children:[f.jsx(h.Icon,{name:"alert",size:"small",color:"grey11"}),f.jsx(h.Text,{variant:"smallBold",color:"grey11",children:"There is no embed data available."})]})}function dC(e){const{content:t,selected:n}=e,{thumbnail:r,provider:i,author:o,url:a,subtitle:s}=eRe(t);return f.jsxs(h.PreviewCard,{selected:n,children:[f.jsx(h.PreviewImage,{src:r.url,aspectRatio:r.aspectRatio}),f.jsxs(h.PreviewContent,{children:[f.jsxs(h.Box,{display:"flex",alignItems:"center",gap:4,children:[f.jsx(z$e,{provider:i}),f.jsx(h.Text,{variant:"smallBold",color:"grey12",noWrap:!0,children:i}),o&&f.jsx(h.Text,{variant:"small",color:"grey11",noWrap:!0,children:o})]}),f.jsx(h.Text,{variant:"smallBold",href:a,children:s})]})]})}function G$e(e){const{url:t,onContentChange:n,selected:r}=e,i=J$e({url:t,onContentChange:n});return f.jsx(dC,{content:i,selected:r})}function J$e(e){const{url:t,onContentChange:n}=e,{embedApiEndpoint:r}=Te(),i=Ke.useRequest(Z$e,[t,r]),o=Pe.useStableCallback(n);return E.useEffect(()=>{const a=h.handleEditorFlushSyncError(()=>o(i));return()=>{clearTimeout(a)}},[i,o]),i}function Z$e(e,t){const n=new URL(t);return n.searchParams.set("url",e),me.request(n,{okType:X$e(e)})}function X$e(e){return L.object({type:L.string(),version:L.string().or(L.number()).nullish(),title:L.string().nullish(),author_name:L.string().nullish(),author_url:L.string().nullish(),provider_name:L.string().nullish(),provider_url:L.string().nullish(),cache_age:L.string().or(L.number()).nullish(),thumbnail_url:L.string().nullish(),thumbnail_width:L.number().nullish(),thumbnail_height:L.number().nullish(),html:L.string().nullish()}).passthrough().transform(t=>{const 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 eRe(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:e.type==="video"?"16:9":"1:1"},provider:e.provider_name??"",author:e.author_name??"",subtitle:t}}function tRe(e){const{id:t,readOnly:n,field:r,content:i,onContentChange:o}=e,a=Pe.useDebounceState({initialState:(i==null?void 0:i.embed_url)??"",startTransition:E.startTransition});function s(u){a.set(u),Fr.toURL(u)||o(void 0)}return f.jsxs(h.Field,{footer:Fr.toURL(a.value)&&f.jsx(h.FieldFooter,{children:f.jsx(P7,{debouncedUrl:a.debouncedValue,content:i,onContentChange:o})}),children:[f.jsx(h.FieldIcon,{name:"cloud"}),f.jsx(h.FieldLabel,{htmlFor:t,children:nr(r)}),f.jsx(h.FieldControl,{children:f.jsx(Vs,{id:t,readOnly:n,placeholder:Dc(r),value:a.value,onValueChange:s,variant:Fr.toURL(a.value)?"link":"normal",endAdornment:f.jsx(h.Button,{startIcon:"close",color:"grey",size:"small",disabled:!a,onClick:()=>s("")})})})]})}function D7(e){return!(e.lat>85||e.lat<-85||e.lng>180||e.lng<-180)}function Zb(e){const t=/^.*@(-?\d+.\d+),(-?\d+.\d+).*$/,n=e.match(t);if(!n)return;const r=parseFloat(n[1]??""),i=parseFloat(n[2]??"");if(isNaN(r)||isNaN(i))return;const o={lat:r,lng:i};if(D7(o))return o}function nk(e){return e?`${e.lat}, ${e.lng}`:""}function rk(e){const t=/\(?([\d|.|-]*)[\s+]*,[\s]*([\d|.|-]*)\)?/,n=e.match(t);if(!n)return Zb(e);const r=parseFloat(n[1]??""),i=parseFloat(n[2]??"");if(isNaN(r)||isNaN(i))return Zb(e);const o={lat:r,lng:i};return D7(o)?o:Zb(e)}function nRe(e){const{field:t,id:n,readOnly:r,...i}=e,{onValueChange:o,displayedValue:a,onBlur:s,clearValue:u,isValidCoordinates:c}=rRe(i);return f.jsxs(h.Field,{children:[f.jsx(h.FieldIcon,{name:"place"}),f.jsx(h.FieldLabel,{htmlFor:n,children:nr(t)}),f.jsx(h.FieldControl,{children:f.jsx(Vs,{id:n,onValueChange:o,placeholder:QR,readOnly:r,value:a,onBlur:s,variant:c?"link":"normal",endAdornment:f.jsx(h.Button,{startIcon:"close",color:"grey",size:"small",disabled:!a,onClick:u})})})]})}function rRe(e){const{content:t,onContentChange:n}=e,r=nk(t==null?void 0:t.position),[i,o]=E.useState(r);function a(){const c=rk(i);if(!c)return o(""),n(void 0);const{lat:l,lng:d}=c;o(nk({lat:l,lng:d})),n({__TYPE__:"GeoPointContent",position:{lat:l,lng:d}})}function s(){o(""),n(void 0)}const u=!!rk(i);return{displayedValue:i,isValidCoordinates:u,onValueChange:o,onBlur:a,clearValue:s}}function W7(e){const{fieldLabel:t,imageLabel:n=[]}=e;return f.jsxs(h.CardHeaderTitle,{children:[f.jsx(h.Text,{variant:"bold",noWrap:!0,children:Ep.overflow(t,30)}),n.length!==0&&f.jsx(h.Text,{color:"grey11",noSelect:!0,children:` • ${n.join(" • ")}`})]})}function K7(e){const{fieldLabel:t,isUpdating:n,readOnly:r,onMediaDialogOpenChange:i}=e;return f.jsxs(f.Fragment,{children:[f.jsx(h.CardHeader,{sx:{flexWrap:"wrap"},children:f.jsx(W7,{fieldLabel:t})}),f.jsx(h.CardContent,{children:f.jsx(h.Card,{color:"grey2",variant:"dashed",paddingBlock:12,radius:4,sx:{width:"100%"},children:f.jsx(h.CardContent,{children:f.jsxs(h.BlankSlate,{variant:"horizontal",children:[f.jsx(h.BlankSlateIcon,{name:"cloudUpload",lineColor:"purple9",backgroundColor:"purple4",size:"small"}),f.jsx(h.BlankSlateTitle,{children:n?"Preparing your image...":"You haven't selected an image"}),!r&&f.jsx(h.BlankSlateActions,{children:f.jsx(h.Button,{disabled:n,onClick:()=>i(!0),size:"medium",children:"Select image"})})]})})})})]})}const iRe=Nm({id:ru(),width:Km(),height:Km(),urls:Nm({full:ru(),small:ru().transform(REe)}),alt_description:ru().optional(),description:ru().nullable()}),oRe=Nm({results:Kq(iRe)}).transform(e=>e.results);function N7(e,t){const n=new URL("search/photos",e);return n.searchParams.set("page","1"),n.searchParams.set("per_page","28"),n.searchParams.set("query",t),me.request(n,{okType:oRe})}Ke.cache.registerFetcherConfig(N7,{cacheCapacity:5,revalidationStrategy:{type:"never"}});function aRe(e,t){const n=E.useRef(),r=Te(),i=Ke.useRequest(N7,[e,t]);return Pe.useDebounce(t,1e3,()=>{var o;n.current&&t!==n.current&&((o=r.onAnalyticsEvent)==null||o.call(r,"Unsplash Image Searched")),n.current=t}),i}function sRe(e){const{onSelectedChange:t}=e,[n,r]=E.useTransition(),i=Pe.useDebounceState({initialState:"",ms:300,startTransition:r});return f.jsxs(h.Box,{flexDirection:"column",gap:16,width:"100%",position:"relative",children:[f.jsx(h.FormSearchInput,{value:i.value,placeholder:"Search on Unsplash.com",onValueChange:i.set}),f.jsx(h.ErrorBoundary,{renderError:()=>f.jsx(b7,{}),children:f.jsx(E.Suspense,{fallback:f.jsx(cRe,{}),children:f.jsx(uRe,{term:i.debouncedValue,loading:n,onSelectedChange:t})})})]})}function uRe(e){const{term:t,onSelectedChange:n,loading:r}=e,{media:i,toggleSelected:o,selectedImageId:a}=lRe({term:t,onSelectedChange:n});return f.jsxs(f.Fragment,{children:[i.length>0&&f.jsx(q7,{children:i==null?void 0:i.map(s=>{const c=new URL(s.urls.full).searchParams.get("fm")??"jpg";return f.jsx(h.MediaCard,{url:s.urls.small,filename:s.description??"Unsplash Image",selected:a===s.id,onCardClick:()=>o(s),onCheckedChange:()=>o(s),extension:c,kind:"image",width:s.width,height:s.height,loading:r},s.id)})}),i.length===0&&f.jsx(v7,{})]})}function q7(e){const{children:t}=e;return f.jsx(h.ScrollArea,{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 cRe(){return f.jsx(q7,{children:kt.range(1,24).map(e=>f.jsx(x7,{},e))})}function lRe(e){var c;const{term:t,onSelectedChange:n}=e,{unsplashApiBaseUrl:r}=Te(),i=aRe(r,t||"citrus fruit"),o=(c=i==null?void 0:i[0])==null?void 0:c.id,[a,s]=E.useState();E.useEffect(()=>{n==null||n([]),s(void 0)},[o,n]);function u(l){if(l.id===a)return s(void 0),n==null?void 0:n([]);s(l.id),n==null||n([{...l,url:l.urls.full,alt:l.alt_description}])}return{media:i,toggleSelected:u,selectedImageId:a}}function zR(e){const{open:t,onOpenChange:n,onMediaSelected:r,assetType:i}=e,o=Te(),a=o.mediaLibrary,[s,u]=E.useState(()=>a?"media":"unsplash"),[c,l]=E.useState(new Set),[d,p]=E.useState([]),A=c.size+d.length,m=Ke.useFetcherData(mi);E.useEffect(()=>{!t||!a||f7({config:o,assetType:i})},[t,o,i,a]);function g(S){if(S!=="media"&&S!=="unsplash")throw new Error(`Invalid option ${S}.`);u(S)}function _(S){S||l(new Set),n(S)}const b=Qwe({assetType:i,mediaDialogOpen:t});function I(){var S;if(s==="unsplash"){const y=d[0];if(!y)return;r(y),(S=o.onAnalyticsEvent)==null||S.call(o,"Unsplash Image Added")}else if(s==="media"){const w=m.flatMap(F=>F.items).filter(F=>c.has(F.id))[0];if(!w)return;r(w),b(w.id)}_(!1)}function x(){if(A===0)return"Select a media item to add to the page";if(A>1)return"Only one media item can be added to the page"}const{containerRef:v}=h.useAlert();return f.jsxs(h.Dialog,{open:t,onOpenChange:_,size:{width:"min(calc(100% - 48px), 2000px)",height:"calc(100% - 30px)"},position:"center",onPointerDownOutside:S=>{v&&Pe.refContainsTarget(v,S.target)&&S.preventDefault()},children:[f.jsx(h.DialogHeader,{icon:"image",title:"Media library"}),f.jsxs(h.DialogOptions,{value:s,onValueChange:g,padding:"small",width:"auto",children:[a&&f.jsx(h.DialogOptionsItem,{value:"media",icon:"photo"}),f.jsx(h.DialogOptionsItem,{value:"unsplash",icon:"unsplash"})]}),f.jsx(h.DialogContent,{children:f.jsxs(h.Box,{flexDirection:"column",flexGrow:1,overflow:"hidden",children:[f.jsx(kq,{}),f.jsxs(h.Box,{overflow:"hidden",backgroundColor:"grey2",padding:{top:16,inline:16},flexGrow:1,children:[s==="media"&&f.jsx(k7,{assetType:i,onSelectedChange:l}),s==="unsplash"&&f.jsx(sRe,{onSelectedChange:p})]})]})}),f.jsxs(h.DialogActions,{children:[f.jsx(h.DialogCancelButton,{}),f.jsx(h.DialogActionButton,{onClick:I,disabled:A!==1,tooltipLabel:x(),children:"Add to page"})]})]})}const V7=E.forwardRef(function(t,n){const{isMediaDialogOpen:r,selected:i,children:o,onMediaSelected:a,onMediaDialogOpenChange:s}=t;return f.jsxs(h.Card,{ref:n,color:i?"indigo2":"grey2",variant:i?"selected":"dashed",paddingBlock:12,radius:4,children:[o,f.jsx(zR,{open:r,onOpenChange:s,onMediaSelected:a,assetType:"image"})]})});function Q7(e){const{contentView:t,croppedImage:n}=e,{width:r,height:i,x:o,y:a,zoom:s}=n,u=dRe({origin:t.origin,croppedImage:n});return{...t,width:r,height:i,url:u,edit:{...t.edit,zoom:s,crop:{x:o,y:a}}}}function fRe(e){var c,l,d;const{field:t,content:n,thumbnail:r,croppedImage:i}=e;if(r===gd)return z7({content:n,croppedImage:i});const o=ye.isImageContent(n),a=(l=(c=t==null?void 0:t.config)==null?void 0:c.thumbnails)==null?void 0:l.find(p=>p.name===r),s=o?(d=n.thumbnails)==null?void 0:d[r]:void 0;if(!a||!s)return n;const u=Q7({contentView:s,croppedImage:i});return u.url===s.url?n:{...n,thumbnails:o?{...n.thumbnails,[r]:u}:void 0}}function z7(e){const{content:t,croppedImage:n}=e,r=Q7({contentView:t,croppedImage:n});return r.url===t.url?t:{...t,...r}}function dRe(e){const{origin:t,croppedImage:n}=e,{x:r,y:i,width:o,height:a,cropHeight:s,cropWidth:u}=n,c=new URL(t.url),l=t.height!==a||t.width!==o;if(r!==0||i!==0||s!==t.height||u!==t.width){const p=[r,i,u,s].map(Math.round).join(",");c.searchParams.set("rect",p),c.searchParams.set("w",o.toString()),c.searchParams.set("h",a.toString())}return l&&(c.searchParams.set("w",o.toString()),c.searchParams.set("h",a.toString())),c.toString()}function pRe(e){const{edit:{crop:{x:t,y:n},zoom:r},width:i,height:o,origin:{width:a,height:s}}=e;let u,c;const l=a/s,d=i/o;return d>=l?(u=a/r,c=u/d):(c=s/r,u=c*d),{x:t,y:n,width:i,height:o,zoom:r,cropWidth:u,cropHeight:c}}function ARe(e){const{selectedImage:t,imageCrop:n,setImageCrop:r}=e,{width:i,height:o,zoom:a,cropHeight:s,cropWidth:u}=n,c=t.contentView,l={x:n.x,y:n.y,width:u,height:s},[d,p]=E.useState(),A=(c==null?void 0:c.origin.url)??"",m=!(t!=null&&t.thumbnail.height&&(t!=null&&t.thumbnail.width));function g(v,S){const y=parseInt(S);isNaN(y)||y<=0||!m||r({...n,[v]:y})}function _(v){r({...n,cropWidth:v.width,cropHeight:v.height,x:v.x,y:v.y})}function b(v){r({...n,zoom:v})}function I(){p(Vh),r({...n,...Vh})}function x(){c&&(p(Vh),r({...n,...Vh,zoom:1,cropWidth:c.width,cropHeight:c.height}))}return f.jsxs(h.Box,{padding:{inline:24,block:16},flexDirection:"column",gap:16,height:"100%",overflowY:"auto",alignItems:"center",children:[f.jsxs(h.Box,{gap:8,height:32,alignItems:"flex-start",width:"100%",children:[f.jsx(h.Tooltip,{content:"Center",children:f.jsx(h.Button,{color:"grey",size:"medium",startIcon:"centerFocusWeak",onClick:I})}),f.jsx(h.Tooltip,{content:"Cover",children:f.jsx(h.Button,{color:"grey",size:"medium",startIcon:"zoomOutMap",onClick:x})}),f.jsx(h.Separator,{orientation:"vertical"}),f.jsx(h.FormInput,{prefix:"W",prefixTooltip:"Width",placeholder:"width",type:"number",size:"medium",value:String(i),onValueChange:v=>g("width",v),sx:{width:100},disabled:!m}),f.jsx(h.FormInput,{prefix:"H",prefixTooltip:"Height",placeholder:"height",type:"number",size:"medium",value:String(o),onValueChange:v=>g("height",v),sx:{width:100},disabled:!m})]}),f.jsx(h.Cropper,{image:A,aspect:i/o,crop:d??{x:0,y:0},onCropChange:p,zoom:a,onZoomChange:b,onCropAreaChange:(v,S)=>_(S),initialCroppedAreaPixels:l}),f.jsx(h.Box,{width:"100%",maxWidth:320,children:f.jsx(h.Slider,{min:1,max:3,step:.01,value:[a],onValueChange:([v])=>b(v??1)})})]})}const Vh={x:0,y:0};function hRe(e){const{trigger:t,initialImages:n,renderTooltip:r}=e,{open:i,onOpenChange:o,ready:a,option:s,selectedImage:u,croppedImage:c,setCroppedImage:l,setReady:d,setOption:p}=mRe(e);return f.jsxs(h.Dialog,{trigger:t,onAnimationEnd:()=>d(!0),open:i,onOpenChange:o,renderTooltip:r,children:[f.jsx(h.DialogHeader,{icon:"photo",title:"Image editor"}),f.jsx(h.DialogOptions,{value:String(s),onValueChange:A=>p(Number(A)),children:n.map((A,m)=>f.jsx(h.DialogOptionsItem,{value:String(m),icon:"photo",title:A.labels[0]??"Main",subtitle:A.labels[1]??""},A.thumbnail.name))}),u&&f.jsx(h.DialogContent,{children:a&&c&&f.jsx(ARe,{selectedImage:u,imageCrop:c,setImageCrop:l},u.thumbnail.name)})]})}function mRe(e){const{initialImages:t,initialOption:n,onClose:r}=e,[i,o]=E.useState(_),[a,s]=E.useState(!1),[u,c]=E.useState(!1),[l,d]=E.useState(n);function p(b){b?(d(n),o(_())):(c(!1),r({option:l,croppedImages:i})),s(b)}const A=t[l],m=i[(A==null?void 0:A.thumbnail.name)??""];function g(b){if(!A)return;const I=A.thumbnail.name;o({...i,[I]:b})}function _(){return t.reduce((b,I)=>(I.contentView&&(b[I.thumbnail.name]=pRe(I.contentView)),b),{})}return{open:a,ready:u,option:l,selectedImage:A,croppedImage:m,setCroppedImage:g,setReady:c,setOption:d,onClose:r,onOpenChange:p}}function gRe(e){const{readOnly:t,altText:n,selected:r,onValueChange:i}=e,o=E.useId();return f.jsxs(h.Field,{selected:r,children:[f.jsx(h.FieldLabel,{htmlFor:o,children:"Alt text"}),f.jsx(h.FieldControl,{children:f.jsx(h.Box,{flexGrow:1,height:40,children:f.jsx(Vs,{id:o,placeholder:"Short description for the visually impaired",readOnly:t,value:n,padding:{input:{inline:12}},onValueChange:i})})})]})}function vRe(e){const{fieldLabel:t,imageLabel:n,initialImages:r,page:i,displaySeparator:o=!0,isSVGContentView:a,visibility:s,onClear:u,onCropperDialogClose:c,onMediaDialogOpenChange:l}=e;return f.jsxs(h.Box,{display:"flex",flexDirection:"column",gap:12,children:[f.jsxs(h.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:4,children:[f.jsx(W7,{fieldLabel:t,imageLabel:n}),f.jsxs(h.CardHeaderActions,{sx:{visibility:s},children:[f.jsx(hRe,{trigger:f.jsx(h.Button,{startIcon:"crop",disabled:a,hiddenLabel:"Crop & Resize"}),renderTooltip:d=>f.jsx(h.Tooltip,{content:"Crop & Resize",children:d}),initialImages:r,initialOption:i,onClose:c}),f.jsx(h.Tooltip,{content:"Replace",children:f.jsx(h.Button,{startIcon:"imageSearch",hiddenLabel:"Replace",onClick:()=>l(!0)})}),f.jsx(h.Tooltip,{content:"Clear",children:f.jsx(h.Button,{onClick:u,startIcon:"delete",hiddenLabel:"Clear"})})]})]}),o&&f.jsx(h.Separator,{style:"dashed",decorative:!0})]})}function ju(e){const{description:t,largeIconName:n="public",loading:r,error:i,onEdit:o,onUnlink:a}=e,s=i?f.jsx(_Re,{}):f.jsx(SRe,{...e,largeIconName:n,loading:r});return f.jsx(h.Card,{sx:{width:420},children:f.jsxs(h.CardContent,{gap:12,children:[f.jsxs(h.Box,{display:"grid",gridTemplateColumns:"max-content 1fr min-content",gridTemplateRows:"1fr",gap:8,children:[s,f.jsxs(h.ButtonGroup,{size:"medium",color:"grey",sx:{justifySelf:"end"},children:[o&&f.jsx(h.Button,{startIcon:"edit",onClick:o}),a&&f.jsx(h.Button,{startIcon:"linkOff",onClick:a})]})]}),!i&&f.jsx(CRe,{description:t,loading:r})]})})}function yRe(e){const{url:t,title:n,loading:r}=e;return r?f.jsx(H7,{height:16,width:80}):n?f.jsx(h.Text,{variant:"smallBold",href:t==null?void 0:t.toString(),children:n}):null}function bRe(e){const{subTitle:t,loading:n}=e;return n?f.jsx(h.Box,{padding:{block:2},children:f.jsx(H7,{height:12,width:60})}):t?f.jsx(h.Text,{variant:"small",color:"grey11",noWrap:!0,children:t}):null}function CRe(e){const{description:t,loading:n}=e;return!t||n?null:f.jsx(h.Text,{variant:"small",color:"grey11",children:t})}function SRe(e){const{largeIconName:t,title:n,url:r,loading:i,subTitle:o}=e;return f.jsxs(f.Fragment,{children:[f.jsx(h.ConjoinedIcons,{largeIconName:t,smallIconName:"link"}),f.jsxs(h.Box,{flexDirection:"column",minWidth:0,children:[f.jsx(yRe,{title:n,url:r,loading:i}),f.jsx(bRe,{subTitle:o,loading:i})]})]})}function _Re(){return f.jsxs(h.Box,{alignItems:"center",gap:8,children:[f.jsx(h.CircleIcon,{name:"alert",color:"tomato",size:"small"}),f.jsx(h.Text,{color:"tomato11",children:"Failed to load linked document data"})]})}function H7(e){const{width:t,height:n}=e;return f.jsx(h.Skeleton,{color:"grey5",borderRadius:6,width:t,height:n})}function IRe(e){const{documentType:t,documentUrl:n,title:r,statusColor:i,description:o,tags:a,tagsFilter:s,previewImageUrl:u,highlighted:c,onSelect:l}=e;function d(p){return p.nativeEvent instanceof MouseEvent&&(p.metaKey||p.ctrlKey)?window.open(n,"_blank"):l()}return f.jsxs(h.Card,{paddingBlock:16,onSelect:d,variant:c?"highlighted":void 0,color:c?"purple2":void 0,sx:{marginBlock:c?4:0,marginInline:4,flexShrink:0},children:[f.jsx(h.CardContent,{children:f.jsxs(h.Box,{justifyContent:"space-between",gap:6,children:[f.jsxs(h.Box,{flexDirection:"column",gap:4,alignItems:"flex-start",flexGrow:1,children:[f.jsx(TRe,{documentType:t}),f.jsx(xRe,{title:r,statusColor:i}),f.jsx(wRe,{description:o})]}),f.jsx(ERe,{previewImageUrl:u})]})}),a.length>0&&f.jsx($Re,{tags:a,tagsFilter:s})]})}function TRe(e){const{documentType:t}=e;return f.jsx(h.Badge,{maxWidth:150,size:"medium",title:`Type: ${t}`,icon:"description"})}function xRe(e){const{title:t,statusColor:n}=e;return f.jsxs(h.Box,{gap:8,alignItems:"center",children:[f.jsx(h.Dot,{color:n}),f.jsx(h.Text,{variant:"bold",children:t})]})}function wRe(e){const{description:t}=e,n=t==null?void 0:t.substring(0,150);return n?f.jsx(h.Text,{variant:"small",color:"grey11",children:`${n}${n!==t?"...":""}`}):f.jsx(h.Text,{variant:"smallItalic",color:"grey11",children:"No description available"})}function ERe(e){const{previewImageUrl:t}=e;return f.jsx(h.Box,{width:142,height:90,backgroundColor:"grey2",border:!0,borderRadius:6,flexDirection:"column",alignItems:"center",justifyContent:"center",gap:4,flexShrink:0,padding:8,children:t?f.jsx(h.Image,{src:t,sizing:"cover"}):f.jsxs(f.Fragment,{children:[f.jsx(h.Icon,{name:"hideImage",size:"large",color:"grey11"}),f.jsx(h.Text,{color:"grey11",variant:"small",children:"No preview available"})]})})}function $Re(e){const{tags:t}=e;return f.jsxs(h.CardFooter,{children:[f.jsxs(h.Box,{gap:4,alignItems:"center",children:[f.jsx(h.Icon,{name:"label",size:"small",color:"grey11"}),f.jsx(h.Text,{variant:"small",color:"grey11",children:"Tags:"})]}),f.jsx(h.TextOverflow,{children:t.map(n=>f.jsx(h.Badge,{size:"medium",title:n,sx:{marginRight:8}},n))})]})}function RRe(e){var v,S;const{searchTerm:t,tagsFilter:n,typesFilter:r,localesFilter:i}=e,o=Te();o.searchDocuments||Ht("searchDocuments");const{coreApiBaseUrl:a,documentSearchBaseUrl:s,authStrategy:u,status:c,repository:l}=o,{storageVersion:d}=Ke.useRequest(Q0,[a,u]),p=d.major>=7;function A(){return p?zq({repository:l,searchTerm:t,customTypesIds:[...Fn.map(r,y=>y.id)],tags:[...Fn.map(n,y=>y.id)],localeId:[...Fn.map(i,y=>y.id)][0]}):WR({tags:[...Fn.map(n,y=>y.id)],customTypes:[...Fn.map(r,y=>y.id)],language:[...Fn.map(i,y=>y.id)],term:[t]})}const[m,g]=E.useState([]),[_,b]=E.useState(""),I=A(),x=Ke.useRequest(Y7,[a,s,u,I,c,p]);return I!==_?(b(I),g(x.results)):x.results.length>0&&((v=kt.last(m))==null?void 0:v.id)!==((S=kt.last(x.results))==null?void 0:S.id)&&g(y=>y.concat(x.results)),{documents:m,response:x}}Ke.cache.registerFetcherConfig(Y7,{cacheCapacity:500,revalidationStrategy:{type:"never"}});async function Y7(e,t,n,r,i,o){const a=Oq[i];if(!o){const l=await DR(e,n,r,200);return ik(l.results,a)}const s=await Qq(t,n,r),u=await Hq(e,n,s.results);return ik(u,a)}function ik(e,t){return{results:e.flatMap(r=>{const i=r.versions.filter(o=>t.includes(o.status));return i.length===0?[]:{...r,versions:i}})}}function ok(){const e=Te();e.searchDocuments||Ht("searchDocuments");const{coreApiBaseUrl:t,authStrategy:n}=e,r=Ke.useRequest(Q0,[t,n]);return new Set(r.languages.map(i=>({id:i.id,label:i.name})))}function ORe(){const e=Te();e.searchDocuments||Ht("searchDocuments");const{coreApiBaseUrl:t,authStrategy:n}=e,r=Ke.useRequest(Jq,[t,n]);return new Set(r.results.map(i=>({id:i,label:i})))}function FRe(){const e=Te();e.searchDocuments||Ht("searchDocuments");const{customTypesApiBaseUrl:t,repository:n,authStrategy:r}=e,i=Ke.useRequest(Nq,[t,n,r]);return new Set(i)}function kRe(e,t){const n=Te(),r=Pe.useDebounceState({initialState:""}),[i,o]=E.useState(new Set),[a,s]=E.useState(new Set);function u(){return!n.searchDocuments||!n.localeId?new Set:new Set([{id:n.localeId,label:n.localeId}])}const[c,l]=E.useState(u),d=Fn.union(a,qm(e)),p=Fn.union(i,qm(t));return{searchTerm:r,filteredTags:i,setFilteredTags:o,filteredCustomTypes:a,setFilteredCustomTypes:s,filteredLocales:c,setFilteredLocales:l,typesFilter:d,tagsFilter:p}}function qm(e){return e?Fn.map(e,t=>({id:t,label:t})):new Set}function MRe(e){const{filteredLocales:t,setFilteredLocales:n,filteredTags:r,setFilteredTags:i,filteredCustomTypes:o,setFilteredCustomTypes:a,fixedTags:s,fixedCustomTypes:u}=e;return f.jsxs(f.Fragment,{children:[f.jsx(jRe,{selectedValues:t,onSelectedValuesChange:n}),f.jsx(pC,{selectedValues:r,fixedSelectedValues:qm(s),onSelectedValuesChange:i,label:"Tags",icon:"label",fetchFilters:ORe}),f.jsx(pC,{selectedValues:o,fixedSelectedValues:qm(u),onSelectedValuesChange:a,label:"Type",icon:"description",fetchFilters:FRe})]})}function pC(e){const[t,n]=E.useState(!1),r=E.useRef(null);return f.jsx(h.ErrorBoundary,{ref:r,renderError:()=>{var i;return f.jsx(h.FilterField,{mode:"error",onErrorRetry:(i=r.current)==null?void 0:i.reset,open:t,setOpen:n,values:new Set,...e})},children:f.jsx(E.Suspense,{fallback:f.jsx(h.FilterField,{mode:"loading",open:t,setOpen:n,values:new Set,...e}),children:f.jsx(LRe,{open:t,setOpen:n,...e})})})}function LRe(e){const{open:t,setOpen:n,onSelectedValuesChange:r,fixedSelectedValues:i,selectedValues:o,label:a,icon:s,fetchFilters:u,multiple:c}=e,l=u();return f.jsx(h.FilterField,{open:t,setOpen:n,label:a,icon:s,selectedValues:o,values:new Set(l),fixedSelectedValues:i,onSelectedValuesChange:r,multiple:c})}function jRe(e){const{selectedValues:t,onSelectedValuesChange:n}=e,[r,i]=E.useState(Fn.first(t));function o(s){n(s),i(Fn.first(s))}const a=Fn.find(ok(),s=>{var u;return s.id===((u=Fn.first(t))==null?void 0:u.id)});return(a==null?void 0:a.label)!==(r==null?void 0:r.label)&&i(a),f.jsx(pC,{selectedValues:new Set(r?[r]:[]),onSelectedValuesChange:o,label:"Locale",icon:"public",fetchFilters:ok,multiple:!1})}function G7(e){const{onSelectDocument:t,fixedCustomTypes:n,fixedTags:r,linkedDocumentId:i,...o}=e,a=Te(),{searchTerm:s,filteredTags:u,setFilteredTags:c,filteredCustomTypes:l,setFilteredCustomTypes:d,filteredLocales:p,setFilteredLocales:A,typesFilter:m,tagsFilter:g}=kRe(n,r);return f.jsx(h.Dialog,{size:{height:727,width:656},hasClose:!1,...o,children:f.jsx(h.DialogContent,{children:f.jsxs(h.Box,{flexDirection:"column",height:"100%",children:[f.jsxs(h.Box,{padding:{top:16,inline:16,bottom:8},flexDirection:"column",gap:12,children:[f.jsx(h.FormInput,{value:s.value,onValueChange:s.set,placeholder:"Search a page",icon:"search"}),a.searchDocuments&&f.jsx(MRe,{filteredTags:u,setFilteredTags:c,filteredCustomTypes:l,setFilteredCustomTypes:d,filteredLocales:p,setFilteredLocales:A,fixedTags:r,fixedCustomTypes:n})]}),a.searchDocuments?f.jsx(URe,{searchTerm:s.debouncedValue,tagsFilter:g,typesFilter:m,localesFilter:p,onSelectDocument:t,linkedDocumentId:i}):f.jsx(Z7,{title:"Oops!",message:"Slice Machine does not yet support mock data for linked documents in the simulator."})]})})})}function URe(e){const{searchTerm:t,tagsFilter:n,typesFilter:r,localesFilter:i,linkedDocumentId:o,onSelectDocument:a}=e;return f.jsxs(h.ScrollArea,{style:{flexGrow:1,paddingBottom:h.theme.space[16],paddingInline:h.theme.space[12],display:"flex",flexDirection:"column"},children:[o&&f.jsxs(f.Fragment,{children:[f.jsx(sk,{children:"Linked page"}),f.jsx(h.ErrorBoundary,{renderError:()=>f.jsx(ak,{description:"An error occurred while fetching the linked page."}),children:f.jsx(E.Suspense,{fallback:WRe,children:f.jsx(DRe,{linkedDocumentId:o,tagsFilter:n,onSelectDocument:a})})})]}),f.jsx(sk,{children:"Link to a page"}),f.jsx(h.ErrorBoundary,{renderError:()=>f.jsx(ak,{description:"An error occurred while fetching pages."}),children:f.jsx(E.Suspense,{fallback:PRe,children:f.jsx(BRe,{searchTerm:t,tagsFilter:n,localesFilter:i,typesFilter:r,linkedDocumentId:o,onSelectDocument:a})})})]})}function BRe(e){const{searchTerm:t,tagsFilter:n,localesFilter:r,typesFilter:i,linkedDocumentId:o,onSelectDocument:a}=e,{documents:s}=RRe({searchTerm:t,tagsFilter:n,localesFilter:r,typesFilter:i}),u=s.filter(c=>c.id!==o);return u.length===0?f.jsx(Z7,{title:s.length===1?"No other pages found!":void 0}):f.jsx(h.Box,{flexDirection:"column",gap:12,children:u.map(c=>{const l=c==null?void 0:c.versions[0];return l?f.jsx(J7,{document:c,tagsFilter:n,onSelectDocument:a},`${c.id}-${l.status}`):null})})}const PRe=f.jsx(h.Box,{flexDirection:"column",gap:12,children:kt.range(1,3).map(e=>f.jsx(h.Skeleton,{height:124,sx:{marginInline:4},zIndex:-1},e))});function ak(e){const{description:t}=e;return f.jsx(h.Box,{flexDirection:"column",alignItems:"center",justifyContent:"center",children:f.jsx(h.DefaultErrorMessage,{title:"Request failed",description:t,errorImageSrc:h.dialogErrorImage})})}function DRe(e){const{linkedDocumentId:t,tagsFilter:n,onSelectDocument:r}=e,i=KRe(t);return f.jsx(J7,{document:i,tagsFilter:n,onSelectDocument:r,highlighted:!0})}const WRe=f.jsx(h.Skeleton,{height:124,sx:{marginBlock:4,marginInline:4},zIndex:-1});function KRe(e){const t=Te();t.searchDocuments||Ht("searchDocuments");const{coreApiBaseUrl:n,authStrategy:r}=t;return Ke.useRequest(_h,[n,r,e])}function J7(e){const{document:t,tagsFilter:n,highlighted:r,onSelectDocument:i}=e,o=Te(),a=t==null?void 0:t.versions[0];if(!a)return null;const s=UR({documentId:t.id,versionId:a.status==="archived"?a.version_id:void 0,releaseId:a.status==="release"?a.release_id:void 0,status:a.status,baseUrl:o.baseUrl}),u=NRe({tags:a.tags,tagsFilter:n});return f.jsx(IRe,{documentType:a.custom_type_label,documentUrl:s,description:a.preview_summary,tags:u,title:t.title,previewImageUrl:a.preview_image,onSelect:()=>i(t.id),statusColor:Rq[a.status].color,highlighted:r})}function sk(e){const{children:t}=e;return f.jsx(h.Box,{position:"sticky",top:0,backgroundColor:"white",padding:{block:6,inline:4},children:f.jsx(h.Text,{variant:"smallBold",color:"grey11",children:t})})}function Z7(e){const{title:t="No pages found!",message:n="Consider using different keywords or tweaking your filters to find what you need."}=e;return f.jsx(h.Box,{justifyContent:"center",flexDirection:"column",height:"100%",children:f.jsxs(h.BlankSlate,{children:[f.jsx(h.BlankSlateIcon,{name:"close",lineColor:"tomato11",backgroundColor:"tomato4",size:48}),f.jsx(h.BlankSlateTitle,{size:"big",children:t}),f.jsx(h.BlankSlateDescription,{width:360,children:n})]})})}function NRe(e){const{tags:t,tagsFilter:n}=e,r=[...n].map(o=>o.label).reverse();return kt.sort(t,o=>-r.indexOf(o))}function X7(e){const{hasLink:t,onUnlink:n,selectEnabled:r,selectedType:i,value:o,onOpenLinkModal:a,onValueChange:s,openInNewTab:u=!0,condensedButtons:c=!1,showNewTabButton:l=!1,displayTextEnabled:d}=e;return f.jsxs(f.Fragment,{children:[!d&&l&&u&&f.jsx(h.Badge,{title:"Open in a new tab",color:"indigo",size:"small",icon:"openInNew",onClick:a}),!t&&r&&f.jsxs(h.Select,{value:i==="any"?void 0:i,color:"grey",size:"small",boldTriggerText:!0,position:"popper",sideOffset:4,startIcon:om({selectType:i}),disabled:!r,onValueChange:s,placeholder:c?"":Xc("any"),onlyStartIcon:c&&i!==void 0,renderTrigger:({button:p})=>f.jsx(h.Tooltip,{content:Xc(i),visible:c,children:p}),children:[f.jsx(h.SelectItem,{value:"web",icon:"public",children:Xc("web")}),f.jsx(h.SelectItem,{value:"document",icon:"description",children:Xc("document")}),f.jsx(h.SelectItem,{value:"media",icon:"image",children:Xc("media")})]},i===void 0?"unlinked":"linked"),!t&&!r&&f.jsx(h.Button,{startIcon:om({selectType:i}),color:"grey",textColor:"link",textWeight:"normal",size:"small",onClick:a,children:Xc(i)}),t&&!d&&f.jsx(h.Button,{startIcon:"close",color:"grey",size:"small",onClick:n,"aria-label":"Close"}),t&&d&&f.jsxs(h.ButtonGroup,{density:"compact",children:[f.jsx(h.Button,{startIcon:om({selectType:i}),renderEndIcon:()=>u&&i==="web"?f.jsx(h.Icon,{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}),f.jsx(h.Button,{startIcon:"close",color:"grey",size:"small",onClick:n})]})]})}function Xc(e){if(!e||e==="any")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 e8(e){const{onEdit:t,onUnlink:n,url:r,title:i,subTitle:o}=e;return f.jsx(h.Card,{paddingBlock:16,children:f.jsxs(h.CardContent,{sx:{width:433},children:[f.jsx(VRe,{url:r,title:i,subTitle:o,onEdit:t,onUnlink:n}),r&&f.jsx(h.CheckerBoard,{children:f.jsx(qRe,{children:f.jsx(h.Image,{src:r,alt:i,sizing:"contain"})})})]})})}function qRe(e){const{children:t}=e;return f.jsx(h.Box,{flexDirection:"column",alignItems:"center",justifyContent:"center",position:"relative",height:327,children:t})}function VRe(e){const{url:t,title:n,subTitle:r,onEdit:i,onUnlink:o}=e;return f.jsxs(h.Box,{flexDirection:"row",justifyContent:"space-between",gap:8,children:[f.jsxs(h.Box,{gap:8,minWidth:0,children:[f.jsx(h.ConjoinedIcons,{largeIconName:"image",smallIconName:"link"}),f.jsxs(h.Box,{flexDirection:"column",minWidth:0,children:[f.jsx(h.Text,{noWrap:!0,variant:"smallBold",href:t,inline:!0,children:n}),f.jsx(h.Text,{variant:"small",color:"grey11",children:r})]})]}),f.jsxs(h.ButtonGroup,{size:"medium",color:"grey",children:[i&&f.jsx(QRe,{onEdit:i}),o&&f.jsx(zRe,{onUnlink:o})]})]})}function QRe(e){const{onEdit:t}=e;return f.jsx(h.Tooltip,{content:"Edit link",side:"top",stableMount:!0,zIndexHack:!0,children:f.jsx(h.Button,{startIcon:"edit",onClick:t})})}function zRe(e){const{onUnlink:t}=e;return f.jsx(h.Tooltip,{content:"Remove link",side:"top",stableMount:!0,zIndexHack:!0,children:f.jsx(h.Button,{startIcon:"linkOff",onClick:t})})}function HRe(e){var F,k;const{field:t,content:n,onContentChange:r}=e,i=g(),o=((F=t.config)==null?void 0:F.allowText)??!1,a=o&&(n==null?void 0:n.value.text)||void 0,[s,u]=E.useState(m),c=ye.FilledExternalLinkContent.is(n==null?void 0:n.value)&&(n==null?void 0:n.value.target)||void 0,[l,d]=E.useState(!1),p=E.useRef(null);Pe.useOnChange(i,T);const A=s?YRe[s]:void 0;function m(){var $,P;return!(($=t.config)!=null&&$.select)||n!=null&&n.value.__TYPE__?n==null?void 0:n.value.__TYPE__:uk[(P=t.config)==null?void 0:P.select]}function g(){return n?ye.FilledDocumentLinkContent.is(n.value)?n.value.id:ye.FilledExternalLinkContent.is(n.value)?n.value.url:ye.FilledFileLinkContent.is(n.value)||ye.FilledImageLinkContent.is(n.value)?n.value.name:"":""}function _($){var P;if(!$)return r(void 0);switch((P=t.config)==null?void 0:P.select){case"web":return r({__TYPE__:"LinkContent",value:{__TYPE__:"ExternalLink",kind:"web",text:$}});case"document":return r({__TYPE__:"LinkContent",value:{__TYPE__:"DocumentLink",kind:"document",text:$}});case"media":return r({__TYPE__:"LinkContent",value:{__TYPE__:"MediaLink",kind:"media",text:$}});default:return r({__TYPE__:"LinkContent",value:{__TYPE__:"AnyLink",text:$}})}}function b($,P){if(!$)return _(a);const K=P?"_blank":void 0;switch(s){case"ExternalLink":return r({__TYPE__:"LinkContent",value:{__TYPE__:"ExternalLink",url:$,target:K,text:a}});case"DocumentLink":return r({__TYPE__:"LinkContent",value:{__TYPE__:"DocumentLink",id:$,text:a}});default:return r(void 0)}}function I($){return n?r({__TYPE__:n.__TYPE__,value:{...n.value,text:$}}):_($)}const x=JRe();function v($){u($?uk[$]:void 0),b(""),$&&$!=="any"&&x($)}function S($){b($)}function y(){d(!0)}function T(){var $;l&&(d(!1),($=p.current)==null||$.reset())}function w($){const P=t8({media:$});switch(P.value.__TYPE__){case"ImageLink":return r({__TYPE__:P.__TYPE__,value:{...P.value,text:a}});case"FileLink":return r({__TYPE__:P.__TYPE__,value:{...P.value,text:a}})}}return{contentType:s,selectType:A,fieldValue:i,onDisplayTextChange:I,onValueChange:b,onTypeChange:v,placeholder:Dc(t),isTypeSelectEnabled:!((k=t.config)!=null&&k.select),onDocumentSelected:S,onError:y,errorBoundaryRef:p,isTargetNewTab:c==="_blank",onMediaSelected:w,displayTextEnabled:o,displayText:a??""}}const YRe={AnyLink:"any",DocumentLink:"document",ExternalLink:"web",FileLink:"media",ImageLink:"media",MediaLink:"media"},uk={any:"AnyLink",document:"DocumentLink",web:"ExternalLink",media:"FileLink"};function GRe(e){const t=Te();t.searchDocuments||Ht("searchDocuments");const{coreApiBaseUrl:n,authStrategy:r}=t;return Ke.useRequest(_h,[n,r,e]).title}Ke.cache.registerFetcherConfig(_h,{concurrency:50});function t8(e){var i,o,a,s,u,c;const{media:t}=e,n="kind"in t;return n&&t.kind==="image"?{__TYPE__:"LinkContent",value:{__TYPE__:"ImageLink",id:t.id,name:t.filename,url:t.url,kind:t.kind,size:t.size.toString(),height:((i=t.height)==null?void 0:i.toString())??`${Xa}`,width:((o=t.width)==null?void 0:o.toString())??`${Xa}`,date:((a=t.last_modified)==null?void 0:a.toString())??""}}:n?{__TYPE__:"LinkContent",value:{__TYPE__:"FileLink",id:t.id,name:t.filename,kind:t.kind,url:t.url,size:t.size.toString(),date:((s=t.last_modified)==null?void 0:s.toString())??""}}:{__TYPE__:"LinkContent",value:{__TYPE__:"ImageLink",id:t.id,name:(t==null?void 0:t.alt)??t.url,kind:"image",url:t.url,size:"0",height:((u=t.height)==null?void 0:u.toString())??`${Xa}`,width:((c=t.width)==null?void 0:c.toString())??`${Xa}`}}}const JRe=()=>{const e=B$e(),{onAnalyticsEvent:t}=Te();function n(r){e&&t&&t("Generic Link Added",{type:r,isInSlice:String(e.isInSlice),isInGroup:String(e.isInGroup),customTypeFormat:e.customTypeFormat??"custom"})}return n};function ZRe(e){const{open:t,setOpen:n,showNewTabButton:r}=e,{url:i,setUrl:o,openInNewTab:a,setOpenInNewTab:s,disabled:u,onUpdate:c}=XRe(e);return f.jsxs(h.Dialog,{open:t,onOpenChange:n,size:"small",children:[f.jsx(h.DialogHeader,{title:"Set Link URL"}),f.jsxs(h.DialogContent,{padding:16,children:[f.jsx(h.FormInput,{value:i,onValueChange:o,placeholder:"Paste URL",icon:"public"}),r&&f.jsx(h.InlineLabel,{value:"Open in a new tab",children:f.jsx(h.Checkbox,{checked:a,onCheckedChange:s})})]}),f.jsxs(h.DialogActions,{children:[f.jsx(h.DialogCancelButton,{}),f.jsx(h.DialogActionButton,{onClick:c,disabled:u,children:"Update"})]})]})}function XRe(e){const{url:t,openInNewTab:n,onUpdate:r,open:i,setOpen:o}=e,[a,s]=E.useState(t),[u,c]=E.useState(n);Pe.useOnChange(i,()=>{i&&(s(t),c(n))});const l=!a||a===t&&u===n;function d(){r(a,u),o(!1)}return{url:a,setUrl:s,openInNewTab:u,disabled:l,setOpenInNewTab:c,onUpdate:d}}function n8(e){var re,D,G,M;const{content:t,field:n,id:r,onContentChange:i,condensedButtons:o=!1}=e,[a,s]=E.useState(!1),[u,c]=E.useState(!1),[l,d]=E.useState(),{contentType:p,fieldValue:A,errorBoundaryRef:m,onDocumentSelected:g,onError:_,onMediaSelected:b,onValueChange:I,selectType:x,onTypeChange:v,isTypeSelectEnabled:S,displayTextEnabled:y,...T}=HRe({content:t,field:n,onContentChange:i});Pe.useOnChange(l,()=>{x!==void 0&&!l&&!A&&S&&v(void 0)});const w=a||u,F=p==="DocumentLink"&&A!=="",$=p==="ExternalLink"&&Fr.toURL(A),P=!!((re=n.config)!=null&&re.allowTargetBlank);function K(){switch(s(!0),p){case"DocumentLink":return d("document");case"ExternalLink":return d("web");case"FileLink":case"ImageLink":case"MediaLink":return d("media");default:return d(void 0)}}const Y={...T,id:r,onBlur:()=>s(!1),onFocus:()=>{s(!0)},onOpenLinkModal:K,onUnlink:()=>{S?v(void 0):I("")},onSelectValueChange:O=>{v(O),d(O)},value:A,condensedButtons:o,allowTargetBlank:P,selectType:x,onValueChange:I,isTypeSelectEnabled:S,displayTextEnabled:y,onKeyDown(O){y||(O.key==="Enter"||O.key===" ")&&(K(),O.preventDefault())},onClick:()=>{y||K()}},{searchDocuments:ee}=Te();return f.jsxs(f.Fragment,{children:[f.jsxs(h.Popover,{onMouseOverChange:c,open:w,align:"start",sideOffset:-3,openDelay:100,closeDelay:200,focusOnEnter:!1,anchor:f.jsxs(h.Field,{onMouseOverChange:s,children:[f.jsx(h.FieldIcon,{name:om({selectType:x,displayTextEnabled:y})}),f.jsx(h.FieldLabel,{htmlFor:r,children:nr(n)}),f.jsx(h.FieldControl,{children:F&&ee?f.jsx(iOe,{errorBoundaryRef:m,onError:_,fallback:f.jsx(AC,{...Y,value:"..."}),renderError:()=>eOe(Y),children:f.jsx(rOe,{...Y,documentId:A})}):f.jsx(AC,{...Y})})]}),children:[$&&f.jsx(ju,{url:$,title:Fr.getUrlTitle($)??"",subTitle:$.toString()}),t&&ye.FilledImageLinkContent.is(t.value)&&f.jsx(e8,{url:t.value.url,title:t.value.name,subTitle:`${t.value.width} x ${t.value.height} pixels`})]}),f.jsx(ZRe,{open:l==="web",setOpen:O=>d(O?"web":void 0),url:A,openInNewTab:T.isTargetNewTab,showNewTabButton:!!((D=n.config)!=null&&D.allowTargetBlank),onUpdate:(O,q)=>I(O,q)}),f.jsx(zR,{open:l==="media",onOpenChange:O=>d(O?"media":void 0),onMediaSelected:b,assetType:"all"}),f.jsx(G7,{open:l==="document",onOpenChange:O=>d(O?"document":void 0),onSelectDocument:O=>{d(void 0),g(O)},fixedCustomTypes:new Set((G=n.config)==null?void 0:G.customtypes),fixedTags:new Set((M=n.config)==null?void 0:M.tags),linkedDocumentId:t&&ye.FilledDocumentLinkContent.is(t.value)?t.value.id:void 0})]})}function eOe(e){return f.jsx(AC,{...e})}function tOe(e){return{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",cursor:r8({displayTextEnabled:e.displayTextEnabled,isTypeSelectEnabled:e.isTypeSelectEnabled,value:e.value})}}function AC(e){const{id:t,value:n,onOpenLinkModal:r,onBlur:i,isTypeSelectEnabled:o,selectType:a,onSelectValueChange:s,onUnlink:u,isTargetNewTab:c,condensedButtons:l,allowTargetBlank:d,displayTextEnabled:p,onFocus:A,onClick:m,onKeyDown:g}=e,_=tOe(e);return f.jsx(Vs,{id:t,..._,onBlur:i,onFocus:A,onClick:m,onKeyDown:g,textOverflow:"ellipsis",endAdornment:f.jsx(X7,{hasLink:!!(n&&a),onUnlink:u,selectEnabled:o,selectedType:a,value:n,onOpenLinkModal:r,onValueChange:s,openInNewTab:c,condensedButtons:l,showNewTabButton:d&&a==="web",displayTextEnabled:p})})}function nOe(e,t){return{onValueChange:e.displayTextEnabled?e.onDisplayTextChange:void 0,placeholder:e.displayTextEnabled?"Add your display text":void 0,readOnly:!e.displayTextEnabled,value:e.displayTextEnabled?e.displayText:t,variant:e.displayTextEnabled?"normal":"link",cursor:r8({displayTextEnabled:e.displayTextEnabled,isTypeSelectEnabled:e.isTypeSelectEnabled,value:t})}}function rOe(e){const{id:t,documentId:n,onOpenLinkModal:r,isTypeSelectEnabled:i,selectType:o,displayTextEnabled:a,condensedButtons:s,onSelectValueChange:u,onUnlink:c,onFocus:l,onClick:d,onKeyDown:p}=e,A=GRe(n),m=nOe(e,A);return f.jsx(Vs,{id:t,...m,onFocus:l,onClick:d,onKeyDown:p,textOverflow:"ellipsis",endAdornment:f.jsx(X7,{hasLink:!0,onUnlink:c,selectEnabled:i,selectedType:o,value:A,onOpenLinkModal:r,condensedButtons:s,onValueChange:u,displayTextEnabled:a})})}function iOe(e){const{errorBoundaryRef:t,onError:n,children:r,fallback:i,renderError:o}=e;return f.jsx(h.ErrorBoundary,{ref:t,onError:n,renderError:o,children:f.jsx(E.Suspense,{fallback:i,children:r})})}function om(e){const{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 r8(e){const{displayTextEnabled:t,isTypeSelectEnabled:n,value:r}=e;return t?"text":n&&!r?"default":"pointer"}function oOe(e){const{onContentChange:t,...n}=e;function r(i){const o=ye.FilledLinkContent.is(i)?i:void 0;t(o)}return f.jsx(n8,{...n,onContentChange:r})}function aOe(e){const{linkTo:t,onLinkToChange:n}=e;return f.jsx(oOe,{content:sOe(t),onContentChange:r=>n(uOe(r)),field:{type:"Link",config:{label:"Link",allowTargetBlank:!0,allowText:!1}},condensedButtons:!0})}function sOe(e){return e?{__TYPE__:"LinkContent",value:e}:void 0}function uOe(e){return e==null?void 0:e.value}function i8(e){var x,v;const{allContentViews:t,content:n,contentView:r,fieldLabel:i,imageLabel:o,initialImages:a,isUpdating:s,page:u=0,readOnly:c,thumbnailName:l,onClear:d,onContentChange:p,onCropperDialogClose:A,onPageChange:m,onMediaDialogOpenChange:g}=e,_=((v=(x=n==null?void 0:n.url)==null?void 0:x.split("?")[0])==null?void 0:v.slice(-4))===".svg",b=n!=null&&n.url&&!c?"visible":"hidden",I=!ye.isImageContent(n);return f.jsxs(h.Box,{display:"flex",gap:12,padding:{inline:12},children:[f.jsx(h.Box,{children:f.jsx(h.Carousel,{getItemSource:OEe,items:t,onPageChange:m,page:u,buttonSize:"small",renderPrevTooltip:S=>f.jsx(h.Tooltip,{content:"Previous",children:S}),renderNextTooltip:S=>f.jsx(h.Tooltip,{content:"Next",children:S}),style:I?{width:181,height:142}:{width:123,height:93},children:S=>(S==null?void 0:S.url)&&f.jsx(h.CarouselItem,{"aria-label":"Image Field Item",src:$7(S.url),alt:S.alt??void 0,isUpdating:s,disableAnimation:I},`${l}_${S.url}`)})}),f.jsxs(h.Box,{width:"100%",display:"flex",flexDirection:"column",gap:I?16:12,children:[f.jsx(vRe,{fieldLabel:i,imageLabel:o,initialImages:a,page:u,displaySeparator:!I,isSVGContentView:_,visibility:b,onClear:d,onCropperDialogClose:A,onMediaDialogOpenChange:g}),f.jsx(gRe,{readOnly:c||!r,altText:(r==null?void 0:r.alt)??"",onValueChange:S=>{r&&p(wEe(l,n,r,S))}}),I&&f.jsx(aOe,{linkTo:n.linkTo,onLinkToChange:S=>{p({...n,linkTo:S})}})]})]})}function cOe(e){const{content:t,onContentChange:n,field:r}=e,[i,o]=E.useState(0),[a,s]=E.useTransition(),u=TEe(r),c=u[i],l=t?xEe(r,t):void 0,d=l==null?void 0:l[i];function p(_){if(!c)return;const b=FEe(c.name,r,t,_);b!==t&&s(()=>n(b))}function A(_){s(()=>o(_))}function m({option:_,croppedImages:b}){if(o(_),!t)return;const I=Object.entries(b).reduce((x,[v,S])=>fRe({field:r,content:x,thumbnail:v,croppedImage:S}),t);I!==t&&s(()=>n(I))}function g(){o==null||o(0),n(void 0)}return{onCropperDialogClose:m,onPageChange:A,onMediaSelected:p,isUpdating:a,page:i,thumbnail:c,allThumbnails:u,allContentViews:l,contentView:d,onClear:g}}function lOe(e){const{content:t,field:n,readOnly:r,onContentChange:i}=e,o=t&&t.origin.url.length>0,{onCropperDialogClose:a,onPageChange:s,onMediaSelected:u,isUpdating:c,page:l,thumbnail:d,allThumbnails:p,allContentViews:A,contentView:m,onClear:g}=cOe({field:n,content:t,onContentChange:i}),[_,b]=E.useState(!1),I=nr(n),x=p.map((y,T)=>{const w=A==null?void 0:A[T];return{thumbnail:y,contentView:w,labels:lC(y,t,w)}}),v=d&&o?lC(d,t,m).filter(io.isDefined):[],S=d&&t&&o&&A;return f.jsx(V7,{isMediaDialogOpen:_,onMediaSelected:u,onMediaDialogOpenChange:b,children:f.jsx(E.Suspense,{fallback:f.jsx("div",{style:{height:95}}),children:S?f.jsx(i8,{allContentViews:A,content:t,contentView:m,fieldLabel:I,imageLabel:v,initialImages:x,isUpdating:c,page:l,readOnly:r,thumbnailName:d.name,onClear:g,onContentChange:i,onCropperDialogClose:a,onMediaDialogOpenChange:b,onPageChange:s}):f.jsx(K7,{fieldLabel:I,isUpdating:c,readOnly:r,onMediaDialogOpenChange:b})})})}function fOe(e){var _,b;const{searchTerm:t,catalogId:n}=e,r=Te();r.integrationFields||Ht("integrationFields");const{integrationFieldsApiBaseUrl:i,repository:o,authStrategy:a}=r,[s,u]=E.useState(1),[c,l]=E.useState([]),[d,p]=E.useState(""),A=Ke.useRequest(dOe,[i,a,o,n,t,t===d?s:1]);t!==d?(p(t),u(1),l(A.items)):A.items.length>0&&((_=kt.last(c))==null?void 0:_.id)!==((b=kt.last(A.items))==null?void 0:b.id)&&l(I=>I.concat(A.items));const m=s<A.totalPages;function g(){m&&u(I=>I+1)}return{items:c,response:A,fetchNextPage:g,hasNextPage:m}}function dOe(e,t,n,r,i,o=1,a=30){const s=new URL(`if/search/${r}`,e);return s.searchParams.set("searchTerm",i),s.searchParams.set("limit",a.toString()),s.searchParams.set("page",o.toString()),me.request(s,{headers:{repository:n},credentials:me.getRequestCredentials(t),okType:pOe})}const o8=L.object({id:L.string(),title:L.string(),imageURL:L.string().optional(),description:L.string().optional()}),pOe=L.object({items:L.array(o8),totalPages:L.number(),page:L.number()});function a8(e){const{itemId:t,catalogId:n}=e,r=Te();r.integrationFields||Ht("integrationFields");const{integrationFieldsApiBaseUrl:i,repository:o,authStrategy:a}=r,u=Ke.useRequest(AOe,[i,a,o,n,t]).items[0];if(!u)throw new Error("Item not found");return{item:u}}function AOe(e,t,n,r,i){const o=new URL(`if/read/${r}`,e);return o.searchParams.set("ids",[i].toString()),me.request(o,{headers:{repository:n},credentials:me.getRequestCredentials(t),okType:hOe})}const hOe=L.object({items:L.array(o8)});function HR(e){const{item:t,onClick:n,catalogId:r}=e;return f.jsxs(h.PreviewCard,{variant:"large",onClick:n,children:[f.jsx(mOe,{src:t.imageURL??"",alt:t.title}),f.jsxs(h.PreviewContent,{children:[f.jsx(h.Badge,{title:`Catalog: ${r}`,icon:"multipleStop",size:"medium"}),f.jsx(h.Text,{variant:"bold",color:"grey12",sx:{marginTop:4},children:t.title}),f.jsx(h.Text,{variant:"small",color:"grey11",children:t.description??t.id})]})]})}const Qh=76;function mOe(e){const{src:t,alt:n}=e;return t?f.jsx(h.PreviewImage,{src:t,alt:n,width:Qh,height:Qh,framed:!0}):f.jsxs(h.Box,{borderRadius:6,backgroundColor:"grey2",height:Qh,width:Qh,flexDirection:"column",alignItems:"center",justifyContent:"center",border:!0,padding:{inline:4,block:8},children:[f.jsx(h.Icon,{name:"hideImage",size:"large",color:"grey11"}),f.jsx(h.Text,{color:"grey11",variant:"small",noSelect:!0,align:"center",children:"No preview image"})]})}function il(){return f.jsxs(h.PreviewCard,{variant:"large",children:[f.jsx(h.Skeleton,{height:76,width:76}),f.jsxs(h.PreviewContent,{children:[f.jsx(h.Skeleton,{height:24,width:168}),f.jsx(h.Skeleton,{height:24,width:240,sx:{marginTop:4}}),f.jsx(h.Skeleton,{height:16,width:144})]})]})}function gOe(e){const{open:t,onOpenChange:n,catalogId:r,onSelectItem:i}=e,o=Pe.useDebounceState({initialState:""}),a=Te();return f.jsx(h.Dialog,{open:t,onOpenChange:n,hasClose:!1,size:{width:612,height:724},children:f.jsx(h.DialogContent,{children:f.jsxs(h.Box,{flexDirection:"column",height:"100%",children:[f.jsxs(h.Box,{padding:{top:16,inline:16},flexDirection:"column",gap:8,children:[f.jsx(h.FormSearchInput,{value:o.value,onValueChange:o.set,placeholder:"Search in your catalog"}),f.jsx(h.Text,{variant:"smallBold",color:"grey11",children:"Select an item"})]}),a.integrationFields?f.jsx(h.ErrorBoundary,{renderError:()=>f.jsx(hC,{message:"There was an error while fetching your catalog items."}),children:f.jsx(E.Suspense,{fallback:f.jsxs(h.Box,{flexDirection:"column",gap:12,padding:{top:10,inline:16,bottom:16},children:[f.jsx(il,{}),f.jsx(il,{}),f.jsx(il,{}),f.jsx(il,{}),f.jsx(il,{})]}),children:f.jsx(vOe,{searchTerm:o.debouncedValue,catalogId:r,onItemClick:i})})}):f.jsx(hC,{message:"Slice Machine does not yet support mock data for integration field in the simulator."})]})})})}function vOe(e){const{catalogId:t,searchTerm:n,onItemClick:r}=e,[i,o]=E.useTransition(),{items:a,hasNextPage:s,fetchNextPage:u}=fOe({catalogId:t,searchTerm:n});return f.jsx(f.Fragment,{children:f.jsxs(h.ScrollArea,{onScrollToBottom:()=>s&&o(u),style:{flexGrow:1,paddingTop:h.theme.space[10],paddingBottom:h.theme.space[16],paddingInline:h.theme.space[16],display:"flex",flexDirection:"column",gap:h.theme.space[12]},threshold:252,children:[a.length===0?f.jsx(hC,{}):a.map(c=>f.jsx(HR,{item:c,catalogId:t,onClick:()=>r(c)},c.id)),f.jsx(h.AnimatedElement,{animation:{name:"fade"},children:i&&f.jsx(h.Text,{color:"grey11",align:"center",sx:{marginBlock:8},children:"Loading more results ..."})})]})})}function hC(e){const{message:t="We can't find any items matching your search"}=e,n="Oops!";return f.jsx(h.Box,{justifyContent:"center",flexDirection:"column",height:"100%",children:f.jsxs(h.BlankSlate,{children:[f.jsx(h.BlankSlateIcon,{name:"close",lineColor:"purple10",backgroundColor:"purple3",borderColor:"purple6",borderStyle:"dashed",size:"xlarge"}),f.jsx(h.BlankSlateTitle,{size:"big",children:n}),f.jsx(h.BlankSlateDescription,{width:360,children:t})]})})}function yOe(e){const{itemId:t,item:n}=e,r=Te();return t&&n&&n.id===t?f.jsx(ol,{...e,value:n.title}):t&&r.integrationFields?f.jsx(h.ErrorBoundary,{renderError:()=>f.jsx(ol,{...e,value:t}),children:f.jsx(E.Suspense,{fallback:f.jsx(ol,{...e,value:t}),children:f.jsx(SOe,{...e,itemId:t})},t)},t):t&&!r.integrationFields?f.jsx(ol,{...e,value:t}):f.jsx(ol,{...e,value:""})}function bOe(e){const{catalogId:t,itemId:n,item:r}=e,i=Te();return n&&r&&r.id===n?f.jsx(h.FieldFooter,{children:f.jsx(HR,{catalogId:t,item:r})}):n&&i.integrationFields?f.jsx(h.ErrorBoundary,{renderError:()=>null,children:f.jsx(h.FieldFooter,{children:f.jsx(E.Suspense,{fallback:f.jsx(il,{}),children:f.jsx(COe,{catalogId:t,itemId:n})},n)})},n):null}function COe(e){const{itemId:t,catalogId:n}=e,{item:r}=a8({catalogId:n,itemId:t});return f.jsx(HR,{catalogId:n,item:r})}function ol(e){const{id:t,field:n,readOnly:r,value:i,onFocus:o,onClearItem:a}=e;return f.jsx(Vs,{id:t,placeholder:Dc(n),readOnly:!0,variant:"link",value:i,...!r&&{cursor:"pointer",onFocus:o},endAdornment:f.jsx(h.Button,{startIcon:"close",color:"grey",size:"small",disabled:!i,onClick:a})})}function SOe(e){const{itemId:t,catalogId:n}=e,{item:r}=a8({catalogId:n,itemId:t});return f.jsx(ol,{...e,value:r.title})}function _Oe(e){var A;const{id:t,field:n,content:r,readOnly:i,onContentChange:o}=e,[a,s]=E.useState(!1),[u,c]=E.useState(),l=(A=n.config)==null?void 0:A.catalog;if(!l)return null;function d(m){o({value:m.id,__TYPE__:"IntegrationFieldsContent"}),c(m),s(!1)}function p(){o(void 0),c(void 0)}return f.jsxs(f.Fragment,{children:[f.jsxs(h.Field,{footer:f.jsx(bOe,{catalogId:l,item:u,itemId:r==null?void 0:r.value}),children:[f.jsx(h.FieldIcon,{name:"multipleStop"}),f.jsx(h.FieldLabel,{htmlFor:t,children:nr(n)}),f.jsx(h.FieldControl,{children:f.jsx(yOe,{id:t,field:n,readOnly:i,catalogId:l,item:u,itemId:r==null?void 0:r.value,onFocus:()=>s(!0),onClearItem:p})})]}),f.jsx(gOe,{open:a,onOpenChange:s,catalogId:l,onSelectItem:d})]})}function IOe(e){const{content:t,field:n,id:r,onContentChange:i,readOnly:o}=e;return f.jsxs(h.Field,{children:[f.jsx(h.FieldIcon,{name:"notes"}),f.jsx(h.FieldLabel,{htmlFor:r,children:nr(n)}),f.jsx(h.FieldControl,{children:f.jsx(h.TextArea,{id:r,placeholder:Dc(n),readOnly:o,paddingLeft:4,paddingRight:12,sx:{flexGrow:1},value:(t==null?void 0:t.value)??"",onChange:a=>{i(TOe(a))}})})]})}function TOe(e){return e.length===0?void 0:{__TYPE__:"FieldContent",type:"Text",value:e}}const xOe=({content:e,field:t,id:n,onContentChange:r,readOnly:i})=>{var s,u;const o=Number(e==null?void 0:e.value),a=Number.isFinite(o)?o:void 0;return f.jsxs(h.Field,{children:[f.jsx(h.FieldIcon,{name:"pin"}),f.jsx(h.FieldLabel,{htmlFor:n,children:nr(t)}),f.jsx(h.FieldControl,{children:f.jsx(h.NumberInput,{id:n,value:a,min:(s=t.config)==null?void 0:s.min,max:(u=t.config)==null?void 0:u.max,padding:B7,placeholder:Dc(t),readOnly:i,onValueChange:c=>r(wOe(c))})})]})};function wOe(e){return e===void 0?void 0:{__TYPE__:"FieldContent",type:"Number",value:String(e)}}function An(e){this.content=e}An.prototype={constructor:An,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return t==-1?void 0:this.content[t+1]},update:function(e,t,n){var r=n&&n!=e?this.remove(n):this,i=r.find(e),o=r.content.slice();return i==-1?o.push(n||e,t):(o[i+1]=t,n&&(o[i]=n)),new An(o)},remove:function(e){var t=this.find(e);if(t==-1)return this;var n=this.content.slice();return n.splice(t,2),new An(n)},addToStart:function(e,t){return new An([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new An(n)},addBefore:function(e,t,n){var r=this.remove(t),i=r.content.slice(),o=r.find(e);return i.splice(o==-1?i.length:o,0,t,n),new An(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=An.from(e),e.size?new An(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=An.from(e),e.size?new An(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=An.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}};An.from=function(e){if(e instanceof An)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new An(t)};function s8(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let i=e.child(r),o=t.child(r);if(i==o){n+=i.nodeSize;continue}if(!i.sameMarkup(o))return n;if(i.isText&&i.text!=o.text){for(let a=0;i.text[a]==o.text[a];a++)n++;return n}if(i.content.size||o.content.size){let a=s8(i.content,o.content,n+1);if(a!=null)return a}n+=i.nodeSize}}function u8(e,t,n,r){for(let i=e.childCount,o=t.childCount;;){if(i==0||o==0)return i==o?null:{a:n,b:r};let a=e.child(--i),s=t.child(--o),u=a.nodeSize;if(a==s){n-=u,r-=u;continue}if(!a.sameMarkup(s))return{a:n,b:r};if(a.isText&&a.text!=s.text){let c=0,l=Math.min(a.text.length,s.text.length);for(;c<l&&a.text[a.text.length-c-1]==s.text[s.text.length-c-1];)c++,n--,r--;return{a:n,b:r}}if(a.content.size||s.content.size){let c=u8(a.content,s.content,n-1,r-1);if(c)return c}n-=u,r-=u}}class X{constructor(t,n){if(this.content=t,this.size=n||0,n==null)for(let r=0;r<t.length;r++)this.size+=t[r].nodeSize}nodesBetween(t,n,r,i=0,o){for(let a=0,s=0;s<n;a++){let u=this.content[a],c=s+u.nodeSize;if(c>t&&r(u,i+s,o||null,a)!==!1&&u.content.size){let l=s+1;u.nodesBetween(Math.max(0,t-l),Math.min(u.content.size,n-l),r,i+l)}s=c}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,n,r,i){let o="",a=!0;return this.nodesBetween(t,n,(s,u)=>{s.isText?(o+=s.text.slice(Math.max(t,u)-u,n-u),a=!r):s.isLeaf?(i?o+=typeof i=="function"?i(s):i:s.type.spec.leafText&&(o+=s.type.spec.leafText(s)),a=!r):!a&&s.isBlock&&(o+=r,a=!0)},0),o}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,i=this.content.slice(),o=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),o=1);o<t.content.length;o++)i.push(t.content[o]);return new X(i,this.size+t.size)}cut(t,n=this.size){if(t==0&&n==this.size)return this;let r=[],i=0;if(n>t)for(let o=0,a=0;a<n;o++){let s=this.content[o],u=a+s.nodeSize;u>t&&((a<t||u>n)&&(s.isText?s=s.cut(Math.max(0,t-a),Math.min(s.text.length,n-a)):s=s.cut(Math.max(0,t-a-1),Math.min(s.content.size,n-a-1))),r.push(s),i+=s.nodeSize),a=u}return new X(r,i)}cutByIndex(t,n){return t==n?X.empty:t==0&&n==this.content.length?this:new X(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let i=this.content.slice(),o=this.size+n.nodeSize-r.nodeSize;return i[t]=n,new X(i,o)}addToStart(t){return new X([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new X(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(t.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(t){let n=this.content[t];if(!n)throw new RangeError("Index "+t+" out of range for "+this);return n}maybeChild(t){return this.content[t]||null}forEach(t){for(let n=0,r=0;n<this.content.length;n++){let i=this.content[n];t(i,r,n),r+=i.nodeSize}}findDiffStart(t,n=0){return s8(this,t,n)}findDiffEnd(t,n=this.size,r=t.size){return u8(this,t,n,r)}findIndex(t,n=-1){if(t==0)return zh(0,t);if(t==this.size)return zh(this.content.length,t);if(t>this.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let r=0,i=0;;r++){let o=this.child(r),a=i+o.nodeSize;if(a>=t)return a==t||n>0?zh(r+1,a):zh(r,i);i=a}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,n){if(!n)return X.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new X(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return X.empty;let n,r=0;for(let i=0;i<t.length;i++){let o=t[i];r+=o.nodeSize,i&&o.isText&&t[i-1].sameMarkup(o)?(n||(n=t.slice(0,i)),n[n.length-1]=o.withText(n[n.length-1].text+o.text)):n&&n.push(o)}return new X(n||t,r)}static from(t){if(!t)return X.empty;if(t instanceof X)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new X([t],t.nodeSize);throw new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}X.empty=new X([],0);const Xb={index:0,offset:0};function zh(e,t){return Xb.index=e,Xb.offset=t,Xb}function Vm(e,t){if(e===t)return!0;if(!(e&&typeof e=="object")||!(t&&typeof t=="object"))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!Vm(e[r],t[r]))return!1}else{for(let r in e)if(!(r in t)||!Vm(e[r],t[r]))return!1;for(let r in t)if(!(r in e))return!1}return!0}let vt=class mC{constructor(t,n){this.type=t,this.attrs=n}addToSet(t){let n,r=!1;for(let i=0;i<t.length;i++){let o=t[i];if(this.eq(o))return t;if(this.type.excludes(o.type))n||(n=t.slice(0,i));else{if(o.type.excludes(this.type))return t;!r&&o.type.rank>this.type.rank&&(n||(n=t.slice(0,i)),n.push(this),r=!0),n&&n.push(o)}}return n||(n=t.slice()),r||n.push(this),n}removeFromSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return t.slice(0,n).concat(t.slice(n+1));return t}isInSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return!0;return!1}eq(t){return this==t||this.type==t.type&&Vm(this.attrs,t.attrs)}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=t.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);return r.create(n.attrs)}static sameSet(t,n){if(t==n)return!0;if(t.length!=n.length)return!1;for(let r=0;r<t.length;r++)if(!t[r].eq(n[r]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&t.length==0)return mC.none;if(t instanceof mC)return[t];let n=t.slice();return n.sort((r,i)=>r.type.rank-i.type.rank),n}};vt.none=[];class mp extends Error{}class ae{constructor(t,n,r){this.content=t,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=l8(this.content,t+this.openStart,n);return r&&new ae(r,this.openStart,this.openEnd)}removeBetween(t,n){return new ae(c8(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,n){if(!n)return ae.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new ae(X.fromJSON(t,n.content),r,i)}static maxOpen(t,n=!0){let r=0,i=0;for(let o=t.firstChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.firstChild)r++;for(let o=t.lastChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.lastChild)i++;return new ae(t,r,i)}}ae.empty=new ae(X.empty,0,0);function c8(e,t,n){let{index:r,offset:i}=e.findIndex(t),o=e.maybeChild(r),{index:a,offset:s}=e.findIndex(n);if(i==t||o.isText){if(s!=n&&!e.child(a).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(r!=a)throw new RangeError("Removing non-flat range");return e.replaceChild(r,o.copy(c8(o.content,t-i-1,n-i-1)))}function l8(e,t,n,r){let{index:i,offset:o}=e.findIndex(t),a=e.maybeChild(i);if(o==t||a.isText)return r&&!r.canReplace(i,i,n)?null:e.cut(0,t).append(n).append(e.cut(t));let s=l8(a.content,t-o-1,n);return s&&e.replaceChild(i,a.copy(s))}function EOe(e,t,n){if(n.openStart>e.depth)throw new mp("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new mp("Inconsistent open depths");return f8(e,t,n,0)}function f8(e,t,n,r){let i=e.index(r),o=e.node(r);if(i==t.index(r)&&r<e.depth-n.openStart){let a=f8(e,t,n,r+1);return o.copy(o.content.replaceChild(i,a))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&e.depth==r&&t.depth==r){let a=e.parent,s=a.content;return Au(a,s.cut(0,e.parentOffset).append(n.content).append(s.cut(t.parentOffset)))}else{let{start:a,end:s}=$Oe(n,e);return Au(o,p8(e,a,s,t,r))}else return Au(o,Qm(e,t,r))}function d8(e,t){if(!t.type.compatibleContent(e.type))throw new mp("Cannot join "+t.type.name+" onto "+e.type.name)}function gC(e,t,n){let r=e.node(n);return d8(r,t.node(n)),r}function pu(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 Fd(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&&(pu(e.nodeAfter,r),o++));for(let s=o;s<a;s++)pu(i.child(s),r);t&&t.depth==n&&t.textOffset&&pu(t.nodeBefore,r)}function Au(e,t){return e.type.checkContent(t),e.copy(t)}function p8(e,t,n,r,i){let o=e.depth>i&&gC(e,t,i+1),a=r.depth>i&&gC(n,r,i+1),s=[];return Fd(null,e,i,s),o&&a&&t.index(i)==n.index(i)?(d8(o,a),pu(Au(o,p8(e,t,n,r,i+1)),s)):(o&&pu(Au(o,Qm(e,t,i+1)),s),Fd(t,n,i,s),a&&pu(Au(a,Qm(n,r,i+1)),s)),Fd(r,null,i,s),new X(s)}function Qm(e,t,n){let r=[];if(Fd(null,e,n,r),e.depth>n){let i=gC(e,t,n+1);pu(Au(i,Qm(e,t,n+1)),r)}return Fd(t,null,n,r),new X(r)}function $Oe(e,t){let n=t.depth-e.openStart,i=t.node(n).copy(e.content);for(let o=n-1;o>=0;o--)i=t.node(o).copy(X.from(i));return{start:i.resolveNoCache(e.openStart+n),end:i.resolveNoCache(i.content.size-e.openEnd-n)}}class gp{constructor(t,n,r){this.pos=t,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(t){return t==null?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[this.resolveDepth(t)*3]}index(t){return this.path[this.resolveDepth(t)*3+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t==this.depth&&!this.textOffset?0:1)}start(t){return t=this.resolveDepth(t),t==0?0:this.path[t*3-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]}after(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]+this.path[t*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,n=this.index(this.depth);if(n==t.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=t.child(n);return r?t.child(n).cut(r):i}get nodeBefore(){let t=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(t).cut(0,n):t==0?null:this.parent.child(t-1)}posAtIndex(t,n){n=this.resolveDepth(n);let r=this.path[n*3],i=n==0?0:this.path[n*3-1]+1;for(let o=0;o<t;o++)i+=r.child(o).nodeSize;return i}marks(){let t=this.parent,n=this.index();if(t.content.size==0)return vt.none;if(this.textOffset)return t.child(n).marks;let r=t.maybeChild(n-1),i=t.maybeChild(n);if(!r){let s=r;r=i,i=s}let o=r.marks;for(var a=0;a<o.length;a++)o[a].type.spec.inclusive===!1&&(!i||!o[a].isInSet(i.marks))&&(o=o[a--].removeFromSet(o));return o}marksAcross(t){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,i=t.parent.maybeChild(t.index());for(var o=0;o<r.length;o++)r[o].type.spec.inclusive===!1&&(!i||!r[o].isInSet(i.marks))&&(r=r[o--].removeFromSet(r));return r}sharedDepth(t){for(let n=this.depth;n>0;n--)if(this.start(n)<=t&&this.end(n)>=t)return n;return 0}blockRange(t=this,n){if(t.pos<this.pos)return t.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==t.pos?1:0);r>=0;r--)if(t.pos<=this.end(r)&&(!n||n(this.node(r))))return new zm(this,t,r);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos<this.pos?t:this}toString(){let t="";for(let n=1;n<=this.depth;n++)t+=(t?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return t+":"+this.parentOffset}static resolve(t,n){if(!(n>=0&&n<=t.content.size))throw new RangeError("Position "+n+" out of range");let r=[],i=0,o=n;for(let a=t;;){let{index:s,offset:u}=a.content.findIndex(o),c=o-u;if(r.push(a,s,i+u),!c||(a=a.child(s),a.isText))break;o=c-1,i+=u+1}return new gp(n,r,o)}static resolveCached(t,n){for(let i=0;i<e1.length;i++){let o=e1[i];if(o.pos==n&&o.doc==t)return o}let r=e1[t1]=gp.resolve(t,n);return t1=(t1+1)%ROe,r}}let e1=[],t1=0,ROe=12;class zm{constructor(t,n,r){this.$from=t,this.$to=n,this.depth=r}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)}}const OOe=Object.create(null);let hl=class vC{constructor(t,n,r,i=vt.none){this.type=t,this.attrs=n,this.marks=i,this.content=r||X.empty}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(t){return this.content.child(t)}maybeChild(t){return this.content.maybeChild(t)}forEach(t){this.content.forEach(t)}nodesBetween(t,n,r,i=0){this.content.nodesBetween(t,n,r,i,this)}descendants(t){this.nodesBetween(0,this.content.size,t)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(t,n,r,i){return this.content.textBetween(t,n,r,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(t){return this==t||this.sameMarkup(t)&&this.content.eq(t.content)}sameMarkup(t){return this.hasMarkup(t.type,t.attrs,t.marks)}hasMarkup(t,n,r){return this.type==t&&Vm(this.attrs,n||t.defaultAttrs||OOe)&&vt.sameSet(this.marks,r||vt.none)}copy(t=null){return t==this.content?this:new vC(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new vC(this.type,this.attrs,this.content,t)}cut(t,n=this.content.size){return t==0&&n==this.content.size?this:this.copy(this.content.cut(t,n))}slice(t,n=this.content.size,r=!1){if(t==n)return ae.empty;let i=this.resolve(t),o=this.resolve(n),a=r?0:i.sharedDepth(n),s=i.start(a),c=i.node(a).content.cut(i.pos-s,o.pos-s);return new ae(c,i.depth-a,o.depth-a)}replace(t,n,r){return EOe(this.resolve(t),this.resolve(n),r)}nodeAt(t){for(let n=this;;){let{index:r,offset:i}=n.content.findIndex(t);if(n=n.maybeChild(r),!n)return null;if(i==t||n.isText)return n;t-=i+1}}childAfter(t){let{index:n,offset:r}=this.content.findIndex(t);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(t){if(t==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(t);if(r<t)return{node:this.content.child(n),index:n,offset:r};let i=this.content.child(n-1);return{node:i,index:n-1,offset:r-i.nodeSize}}resolve(t){return gp.resolveCached(this,t)}resolveNoCache(t){return gp.resolve(this,t)}rangeHasMark(t,n,r){let i=!1;return n>t&&this.nodesBetween(t,n,o=>(r.isInSet(o.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),A8(this.marks,t)}contentMatchAt(t){let n=this.type.contentMatch.matchFragment(this.content,0,t);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(t,n,r=X.empty,i=0,o=r.childCount){let a=this.contentMatchAt(t).matchFragment(r,i,o),s=a&&a.matchFragment(this.content,n);if(!s||!s.validEnd)return!1;for(let u=i;u<o;u++)if(!this.type.allowsMarks(r.child(u).marks))return!1;return!0}canReplaceWith(t,n,r,i){if(i&&!this.type.allowsMarks(i))return!1;let o=this.contentMatchAt(t).matchType(r),a=o&&o.matchFragment(this.content,n);return a?a.validEnd:!1}canAppend(t){return t.content.size?this.canReplace(this.childCount,this.childCount,t.content):this.type.compatibleContent(t.type)}check(){this.type.checkContent(this.content);let t=vt.none;for(let n=0;n<this.marks.length;n++)t=this.marks[n].addToSet(t);if(!vt.sameSet(t,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(n=>n.toJSON())),t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r=null;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(t.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(n.text,r)}let i=X.fromJSON(t,n.content);return t.nodeType(n.type).create(n.attrs,i,r)}};hl.prototype.text=void 0;class Hm extends hl{constructor(t,n,r,i){if(super(t,n,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):A8(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,n){return this.text.slice(t,n)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new Hm(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new Hm(this.type,this.attrs,t,this.marks)}cut(t=0,n=this.text.length){return t==0&&n==this.text.length?this:this.withText(this.text.slice(t,n))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function A8(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class Uu{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new FOe(t,n);if(r.next==null)return Uu.empty;let i=h8(r);r.next&&r.err("Unexpected trailing text");let o=POe(BOe(i));return DOe(o,r),o}matchType(t){for(let n=0;n<this.next.length;n++)if(this.next[n].type==t)return this.next[n].next;return null}matchFragment(t,n=0,r=t.childCount){let i=this;for(let o=n;i&&o<r;o++)i=i.matchType(t.child(o).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let t=0;t<this.next.length;t++){let{type:n}=this.next[t];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(t){for(let n=0;n<this.next.length;n++)for(let r=0;r<t.next.length;r++)if(this.next[n].type==t.next[r].type)return!0;return!1}fillBefore(t,n=!1,r=0){let i=[this];function o(a,s){let u=a.matchFragment(t,r);if(u&&(!n||u.validEnd))return X.from(s.map(c=>c.createAndFill()));for(let c=0;c<a.next.length;c++){let{type:l,next:d}=a.next[c];if(!(l.isText||l.hasRequiredAttrs())&&i.indexOf(d)==-1){i.push(d);let p=o(d,s.concat(l));if(p)return p}}return null}return o(this,[])}findWrapping(t){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==t)return this.wrapCache[r+1];let n=this.computeWrapping(t);return this.wrapCache.push(t,n),n}computeWrapping(t){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),o=i.match;if(o.matchType(t)){let a=[];for(let s=i;s.type;s=s.via)a.push(s.type);return a.reverse()}for(let a=0;a<o.next.length;a++){let{type:s,next:u}=o.next[a];!s.isLeaf&&!s.hasRequiredAttrs()&&!(s.name in n)&&(!i.type||u.validEnd)&&(r.push({match:s.contentMatch,type:s,via:i}),n[s.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(t){if(t>=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];function n(r){t.push(r);for(let i=0;i<r.next.length;i++)t.indexOf(r.next[i].next)==-1&&n(r.next[i].next)}return n(this),t.map((r,i)=>{let o=i+(r.validEnd?"*":" ")+" ";for(let a=0;a<r.next.length;a++)o+=(a?", ":"")+r.next[a].type.name+"->"+t.indexOf(r.next[a].next);return o}).join(`
37
37
  `)}}Uu.empty=new Uu(!0);class FOe{constructor(t,n){this.string=t,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}}function h8(e){let t=[];do t.push(kOe(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function kOe(e){let t=[];do t.push(MOe(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function MOe(e){let t=UOe(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else if(e.eat("{"))t=LOe(e,t);else break;return t}function ck(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function LOe(e,t){let n=ck(e),r=n;return e.eat(",")&&(e.next!="}"?r=ck(e):r=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function jOe(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let i=[];for(let o in n){let a=n[o];a.groups.indexOf(t)>-1&&i.push(a)}return i.length==0&&e.err("No node type or group '"+t+"' found"),i}function UOe(e){if(e.eat("(")){let t=h8(e);return e.eat(")")||e.err("Missing closing paren"),t}else if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let t=jOe(e,e.next).map(n=>(e.inline==null?e.inline=n.isInline:e.inline!=n.isInline&&e.err("Mixing inline and block content"),{type:"name",value:n}));return e.pos++,t.length==1?t[0]:{type:"choice",exprs:t}}}function BOe(e){let t=[[]];return i(o(e,0),n()),t;function n(){return t.push([])-1}function r(a,s,u){let c={term:u,to:s};return t[a].push(c),c}function i(a,s){a.forEach(u=>u.to=s)}function o(a,s){if(a.type=="choice")return a.exprs.reduce((u,c)=>u.concat(o(c,s)),[]);if(a.type=="seq")for(let u=0;;u++){let c=o(a.exprs[u],s);if(u==a.exprs.length-1)return c;i(c,s=n())}else if(a.type=="star"){let u=n();return r(s,u),i(o(a.expr,u),u),[r(u)]}else if(a.type=="plus"){let u=n();return i(o(a.expr,s),u),i(o(a.expr,u),u),[r(u)]}else{if(a.type=="opt")return[r(s)].concat(o(a.expr,s));if(a.type=="range"){let u=s;for(let c=0;c<a.min;c++){let l=n();i(o(a.expr,u),l),u=l}if(a.max==-1)i(o(a.expr,u),u);else for(let c=a.min;c<a.max;c++){let l=n();r(u,l),i(o(a.expr,u),l),u=l}return[r(u)]}else{if(a.type=="name")return[r(s,void 0,a.value)];throw new Error("Unknown expr type")}}}}function m8(e,t){return t-e}function lk(e,t){let n=[];return r(t),n.sort(m8);function r(i){let o=e[i];if(o.length==1&&!o[0].term)return r(o[0].to);n.push(i);for(let a=0;a<o.length;a++){let{term:s,to:u}=o[a];!s&&n.indexOf(u)==-1&&r(u)}}}function POe(e){let t=Object.create(null);return n(lk(e,0));function n(r){let i=[];r.forEach(a=>{e[a].forEach(({term:s,to:u})=>{if(!s)return;let c;for(let l=0;l<i.length;l++)i[l][0]==s&&(c=i[l][1]);lk(e,u).forEach(l=>{c||i.push([s,c=[]]),c.indexOf(l)==-1&&c.push(l)})})});let o=t[r.join(",")]=new Uu(r.indexOf(e.length-1)>-1);for(let a=0;a<i.length;a++){let s=i[a][1].sort(m8);o.next.push({type:i[a][0],next:t[s.join(",")]||n(s)})}return o}}function DOe(e,t){for(let n=0,r=[e];n<r.length;n++){let i=r[n],o=!i.validEnd,a=[];for(let s=0;s<i.next.length;s++){let{type:u,next:c}=i.next[s];a.push(u.name),o&&!(u.isText||u.hasRequiredAttrs())&&(o=!1),r.indexOf(c)==-1&&r.push(c)}o&&t.err("Only non-generatable nodes ("+a.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function g8(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 v8(e,t){let n=Object.create(null);for(let r in e){let i=t&&t[r];if(i===void 0){let o=e[r];if(o.hasDefault)i=o.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=i}return n}function y8(e){let t=Object.create(null);if(e)for(let n in e)t[n]=new WOe(e[n]);return t}let fk=class b8{constructor(t,n,r){this.name=t,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=y8(r.attrs),this.defaultAttrs=g8(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||t=="text"),this.isText=t=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Uu.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch)}computeAttrs(t){return!t&&this.defaultAttrs?this.defaultAttrs:v8(this.attrs,t)}create(t=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new hl(this,this.computeAttrs(t),X.from(n),vt.setFrom(r))}createChecked(t=null,n,r){return n=X.from(n),this.checkContent(n),new hl(this,this.computeAttrs(t),n,vt.setFrom(r))}createAndFill(t=null,n,r){if(t=this.computeAttrs(t),n=X.from(n),n.size){let a=this.contentMatch.fillBefore(n);if(!a)return null;n=a.append(n)}let i=this.contentMatch.matchFragment(n),o=i&&i.fillBefore(X.empty,!0);return o?new hl(this,t,n.append(o),vt.setFrom(r)):null}validContent(t){let n=this.contentMatch.matchFragment(t);if(!n||!n.validEnd)return!1;for(let r=0;r<t.childCount;r++)if(!this.allowsMarks(t.child(r).marks))return!1;return!0}checkContent(t){if(!this.validContent(t))throw new RangeError(`Invalid content for node ${this.name}: ${t.toString().slice(0,50)}`)}allowsMarkType(t){return this.markSet==null||this.markSet.indexOf(t)>-1}allowsMarks(t){if(this.markSet==null)return!0;for(let n=0;n<t.length;n++)if(!this.allowsMarkType(t[n].type))return!1;return!0}allowedMarks(t){if(this.markSet==null)return t;let n;for(let r=0;r<t.length;r++)this.allowsMarkType(t[r].type)?n&&n.push(t[r]):n||(n=t.slice(0,r));return n?n.length?n:vt.none:t}static compile(t,n){let r=Object.create(null);t.forEach((o,a)=>r[o]=new b8(o,n,a));let i=n.spec.topNode||"doc";if(!r[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let o in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};class WOe{constructor(t){this.hasDefault=Object.prototype.hasOwnProperty.call(t,"default"),this.default=t.default}get isRequired(){return!this.hasDefault}}class YR{constructor(t,n,r,i){this.name=t,this.rank=n,this.schema=r,this.spec=i,this.attrs=y8(i.attrs),this.excluded=null;let o=g8(this.attrs);this.instance=o?new vt(this,o):null}create(t=null){return!t&&this.instance?this.instance:new vt(this,v8(this.attrs,t))}static compile(t,n){let r=Object.create(null),i=0;return t.forEach((o,a)=>r[o]=new YR(o,i++,n,a)),r}removeFromSet(t){for(var n=0;n<t.length;n++)t[n].type==this&&(t=t.slice(0,n).concat(t.slice(n+1)),n--);return t}isInSet(t){for(let n=0;n<t.length;n++)if(t[n].type==this)return t[n]}excludes(t){return this.excluded.indexOf(t)>-1}}class C8{constructor(t){this.cached=Object.create(null);let n=this.spec={};for(let i in t)n[i]=t[i];n.nodes=An.from(t.nodes),n.marks=An.from(t.marks||{}),this.nodes=fk.compile(this.spec.nodes,this),this.marks=YR.compile(this.spec.marks,this);let r=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");let o=this.nodes[i],a=o.spec.content||"",s=o.spec.marks;o.contentMatch=r[a]||(r[a]=Uu.parse(a,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.markSet=s=="_"?null:s?dk(this,s.split(" ")):s==""||!o.inlineContent?[]:null}for(let i in this.marks){let o=this.marks[i],a=o.spec.excludes;o.excluded=a==null?[o]:a==""?[]:dk(this,a.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(t,n=null,r,i){if(typeof t=="string")t=this.nodeType(t);else if(t instanceof fk){if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}else throw new RangeError("Invalid node type: "+t);return t.createChecked(n,r,i)}text(t,n){let r=this.nodes.text;return new Hm(r,r.defaultAttrs,t,vt.setFrom(n))}mark(t,n){return typeof t=="string"&&(t=this.marks[t]),t.create(n)}nodeFromJSON(t){return hl.fromJSON(this,t)}markFromJSON(t){return vt.fromJSON(this,t)}nodeType(t){let n=this.nodes[t];if(!n)throw new RangeError("Unknown node type: "+t);return n}}function dk(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 s in e.marks){let u=e.marks[s];(i=="_"||u.spec.group&&u.spec.group.split(" ").indexOf(i)>-1)&&n.push(a=u)}if(!a)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}class hu{constructor(t,n){this.schema=t,this.rules=n,this.tags=[],this.styles=[],n.forEach(r=>{r.tag?this.tags.push(r):r.style&&this.styles.push(r)}),this.normalizeLists=!this.tags.some(r=>{if(!/^(ul|ol)\b/.test(r.tag)||!r.node)return!1;let i=t.nodes[r.node];return i.contentMatch.matchType(i)})}parse(t,n={}){let r=new Ak(this,n,!1);return r.addAll(t,n.from,n.to),r.finish()}parseSlice(t,n={}){let r=new Ak(this,n,!0);return r.addAll(t,n.from,n.to),ae.maxOpen(r.finish())}matchTag(t,n,r){for(let i=r?this.tags.indexOf(r)+1:0;i<this.tags.length;i++){let o=this.tags[i];if(qOe(t,o.tag)&&(o.namespace===void 0||t.namespaceURI==o.namespace)&&(!o.context||n.matchesContext(o.context))){if(o.getAttrs){let a=o.getAttrs(t);if(a===!1)continue;o.attrs=a||void 0}return o}}}matchStyle(t,n,r,i){for(let o=i?this.styles.indexOf(i)+1:0;o<this.styles.length;o++){let a=this.styles[o],s=a.style;if(!(s.indexOf(t)!=0||a.context&&!r.matchesContext(a.context)||s.length>t.length&&(s.charCodeAt(t.length)!=61||s.slice(t.length+1)!=n))){if(a.getAttrs){let u=a.getAttrs(n);if(u===!1)continue;a.attrs=u||void 0}return a}}}static schemaRules(t){let n=[];function r(i){let o=i.priority==null?50:i.priority,a=0;for(;a<n.length;a++){let s=n[a];if((s.priority==null?50:s.priority)<o)break}n.splice(a,0,i)}for(let i in t.marks){let o=t.marks[i].spec.parseDOM;o&&o.forEach(a=>{r(a=hk(a)),a.mark||a.ignore||a.clearMark||(a.mark=i)})}for(let i in t.nodes){let o=t.nodes[i].spec.parseDOM;o&&o.forEach(a=>{r(a=hk(a)),a.node||a.ignore||a.mark||(a.node=i)})}return n}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new hu(t,hu.schemaRules(t)))}}const S8={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},KOe={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},_8={ol:!0,ul:!0},Ym=1,Gm=2,kd=4;function pk(e,t,n){return t!=null?(t?Ym:0)|(t==="full"?Gm:0):e&&e.whitespace=="pre"?Ym|Gm:n&~kd}class Hh{constructor(t,n,r,i,o,a,s){this.type=t,this.attrs=n,this.marks=r,this.pendingMarks=i,this.solid=o,this.options=s,this.content=[],this.activeMarks=vt.none,this.stashMarks=[],this.match=a||(s&kd?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(X.from(t));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,i;return(i=r.findWrapping(t.type))?(this.match=r,i):null}}return this.match.findWrapping(t.type)}finish(t){if(!(this.options&Ym)){let r=this.content[this.content.length-1],i;if(r&&r.isText&&(i=/[ \t\r\n\u000c]+$/.exec(r.text))){let o=r;r.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=o.withText(o.text.slice(0,o.text.length-i[0].length))}}let n=X.from(this.content);return!t&&this.match&&(n=n.append(this.match.fillBefore(X.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}popFromStashMark(t){for(let n=this.stashMarks.length-1;n>=0;n--)if(t.eq(this.stashMarks[n]))return this.stashMarks.splice(n,1)[0]}applyPending(t){for(let n=0,r=this.pendingMarks;n<r.length;n++){let i=r[n];(this.type?this.type.allowsMarkType(i.type):QOe(i.type,t))&&!i.isInSet(this.activeMarks)&&(this.activeMarks=i.addToSet(this.activeMarks),this.pendingMarks=i.removeFromSet(this.pendingMarks))}}inlineContext(t){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:t.parentNode&&!S8.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}}class Ak{constructor(t,n,r){this.parser=t,this.options=n,this.isOpen=r,this.open=0;let i=n.topNode,o,a=pk(null,n.preserveWhitespace,0)|(r?kd:0);i?o=new Hh(i.type,i.attrs,vt.none,vt.none,!0,n.topMatch||i.type.contentMatch,a):r?o=new Hh(null,null,vt.none,vt.none,!0,null,a):o=new Hh(t.schema.topNodeType,null,vt.none,vt.none,!0,null,a),this.nodes=[o],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(t){if(t.nodeType==3)this.addTextNode(t);else if(t.nodeType==1){let n=t.getAttribute("style");if(!n)this.addElement(t);else{let r=this.readStyles(VOe(n));if(!r)return;let[i,o]=r,a=this.top;for(let s=0;s<o.length;s++)this.removePendingMark(o[s],a);for(let s=0;s<i.length;s++)this.addPendingMark(i[s]);this.addElement(t);for(let s=0;s<i.length;s++)this.removePendingMark(i[s],a);for(let s=0;s<o.length;s++)this.addPendingMark(o[s])}}}addTextNode(t){let n=t.nodeValue,r=this.top;if(r.options&Gm||r.inlineContext(t)||/[^ \t\r\n\u000c]/.test(n)){if(r.options&Ym)r.options&Gm?n=n.replace(/\r\n?/g,`
38
38
  `):n=n.replace(/\r?\n|\r/g," ");else if(n=n.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(n)&&this.open==this.nodes.length-1){let i=r.content[r.content.length-1],o=t.previousSibling;(!i||o&&o.nodeName=="BR"||i.isText&&/[ \t\r\n\u000c]$/.test(i.text))&&(n=n.slice(1))}n&&this.insertNode(this.parser.schema.text(n)),this.findInText(t)}else this.findInside(t)}addElement(t,n){let r=t.nodeName.toLowerCase(),i;_8.hasOwnProperty(r)&&this.parser.normalizeLists&&NOe(t);let o=this.options.ruleFromNode&&this.options.ruleFromNode(t)||(i=this.parser.matchTag(t,this,n));if(o?o.ignore:KOe.hasOwnProperty(r))this.findInside(t),this.ignoreFallback(t);else if(!o||o.skip||o.closeParent){o&&o.closeParent?this.open=Math.max(0,this.open-1):o&&o.skip.nodeType&&(t=o.skip);let a,s=this.top,u=this.needsBlock;if(S8.hasOwnProperty(r))s.content.length&&s.content[0].isInline&&this.open&&(this.open--,s=this.top),a=!0,s.type||(this.needsBlock=!0);else if(!t.firstChild){this.leafFallback(t);return}this.addAll(t),a&&this.sync(s),this.needsBlock=u}else this.addElementByRule(t,o,o.consuming===!1?i:void 0)}leafFallback(t){t.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode(`
39
39
  `))}ignoreFallback(t){t.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"))}readStyles(t){let n=vt.none,r=vt.none;e:for(let i=0;i<t.length;i+=2)for(let o=void 0;;){let a=this.parser.matchStyle(t[i],t[i+1],this,o);if(!a)continue e;if(a.ignore)return null;if(a.clearMark?this.top.pendingMarks.forEach(s=>{a.clearMark(s)&&(r=s.addToSet(r))}):n=this.parser.schema.marks[a.mark].create(a.attrs).addToSet(n),a.consuming===!1)o=a;else break}return[n,r]}addElementByRule(t,n,r){let i,o,a;n.node?(o=this.parser.schema.nodes[n.node],o.isLeaf?this.insertNode(o.create(n.attrs))||this.leafFallback(t):i=this.enter(o,n.attrs||null,n.preserveWhitespace)):(a=this.parser.schema.marks[n.mark].create(n.attrs),this.addPendingMark(a));let s=this.top;if(o&&o.isLeaf)this.findInside(t);else if(r)this.addElement(t,r);else if(n.getContent)this.findInside(t),n.getContent(t,this.parser.schema).forEach(u=>this.insertNode(u));else{let u=t;typeof n.contentElement=="string"?u=t.querySelector(n.contentElement):typeof n.contentElement=="function"?u=n.contentElement(t):n.contentElement&&(u=n.contentElement),this.findAround(t,u,!0),this.addAll(u)}i&&this.sync(s)&&this.open--,a&&this.removePendingMark(a,s)}addAll(t,n,r){let i=n||0;for(let o=n?t.childNodes[n]:t.firstChild,a=r==null?null:t.childNodes[r];o!=a;o=o.nextSibling,++i)this.findAtPoint(t,i),this.addDOM(o);this.findAtPoint(t,i)}findPlace(t){let n,r;for(let i=this.open;i>=0;i--){let o=this.nodes[i],a=o.findWrapping(t);if(a&&(!n||n.length>a.length)&&(n=a,r=o,!a.length)||o.solid)break}if(!n)return!1;this.sync(r);for(let i=0;i<n.length;i++)this.enterInner(n[i],null,!1);return!0}insertNode(t){if(t.isInline&&this.needsBlock&&!this.top.type){let n=this.textblockFromContext();n&&this.enterInner(n)}if(this.findPlace(t)){this.closeExtra();let n=this.top;n.applyPending(t.type),n.match&&(n.match=n.match.matchType(t.type));let r=n.activeMarks;for(let i=0;i<t.marks.length;i++)(!n.type||n.type.allowsMarkType(t.marks[i].type))&&(r=t.marks[i].addToSet(r));return n.content.push(t.mark(r)),!0}return!1}enter(t,n,r){let i=this.findPlace(t.create(n));return i&&this.enterInner(t,n,!0,r),i}enterInner(t,n=null,r=!1,i){this.closeExtra();let o=this.top;o.applyPending(t),o.match=o.match&&o.match.matchType(t);let a=pk(t,i,o.options);o.options&kd&&o.content.length==0&&(a|=kd),this.nodes.push(new Hh(t,n,o.activeMarks,o.pendingMarks,r,null,a)),this.open++}closeExtra(t=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(t){for(let n=this.open;n>=0;n--)if(this.nodes[n]==t)return this.open=n,!0;return!1}get currentPos(){this.closeExtra();let t=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let i=r.length-1;i>=0;i--)t+=r[i].nodeSize;n&&t++}return t}findAtPoint(t,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==t&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&t.nodeType==1&&t.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(t,n,r){if(t!=n&&this.find)for(let i=0;i<this.find.length;i++)this.find[i].pos==null&&t.nodeType==1&&t.contains(this.find[i].node)&&n.compareDocumentPosition(this.find[i].node)&(r?2:4)&&(this.find[i].pos=this.currentPos)}findInText(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==t&&(this.find[n].pos=this.currentPos-(t.nodeValue.length-this.find[n].offset))}matchesContext(t){if(t.indexOf("|")>-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let n=t.split("/"),r=this.options.context,i=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),o=-(r?r.depth+1:0)+(i?0:1),a=(s,u)=>{for(;s>=0;s--){let c=n[s];if(c==""){if(s==n.length-1||s==0)continue;for(;u>=o;u--)if(a(s-1,u))return!0;return!1}else{let l=u>0||u==0&&i?this.nodes[u].type:r&&u>=o?r.node(u-o).type:null;if(!l||l.name!=c&&l.groups.indexOf(c)==-1)return!1;u--}}return!0};return a(n.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let n=t.depth;n>=0;n--){let r=t.node(n).contentMatchAt(t.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}addPendingMark(t){let n=zOe(t,this.top.pendingMarks);n&&this.top.stashMarks.push(n),this.top.pendingMarks=t.addToSet(this.top.pendingMarks)}removePendingMark(t,n){for(let r=this.open;r>=0;r--){let i=this.nodes[r];if(i.pendingMarks.lastIndexOf(t)>-1)i.pendingMarks=t.removeFromSet(i.pendingMarks);else{i.activeMarks=t.removeFromSet(i.activeMarks);let a=i.popFromStashMark(t);a&&i.type&&i.type.allowsMarkType(a.type)&&(i.activeMarks=a.addToSet(i.activeMarks))}if(i==n)break}}}function NOe(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let r=t.nodeType==1?t.nodeName.toLowerCase():null;r&&_8.hasOwnProperty(r)&&n?(n.appendChild(t),t=n):r=="li"?n=t:r&&(n=null)}}function qOe(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function VOe(e){let t=/\s*([\w-]+)\s*:\s*([^;]+)/g,n,r=[];for(;n=t.exec(e);)r.push(n[1],n[2].trim());return r}function hk(e){let t={};for(let n in e)t[n]=e[n];return t}function QOe(e,t){let n=t.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(e))continue;let o=[],a=s=>{o.push(s);for(let u=0;u<s.edgeCount;u++){let{type:c,next:l}=s.edge(u);if(c==t||o.indexOf(l)<0&&a(l))return!0}};if(a(i.contentMatch))return!0}}function zOe(e,t){for(let n=0;n<t.length;n++)if(e.eq(t[n]))return t[n]}class au{constructor(t,n){this.nodes=t,this.marks=n}serializeFragment(t,n={},r){r||(r=n1(n).createDocumentFragment());let i=r,o=[];return t.forEach(a=>{if(o.length||a.marks.length){let s=0,u=0;for(;s<o.length&&u<a.marks.length;){let c=a.marks[u];if(!this.marks[c.type.name]){u++;continue}if(!c.eq(o[s][0])||c.type.spec.spanning===!1)break;s++,u++}for(;s<o.length;)i=o.pop()[1];for(;u<a.marks.length;){let c=a.marks[u++],l=this.serializeMark(c,a.isInline,n);l&&(o.push([c,i]),i.appendChild(l.dom),i=l.contentDOM||l.dom)}}i.appendChild(this.serializeNodeInner(a,n))}),r}serializeNodeInner(t,n){let{dom:r,contentDOM:i}=au.renderSpec(n1(n),this.nodes[t.type.name](t));if(i){if(t.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(t.content,n,i)}return r}serializeNode(t,n={}){let r=this.serializeNodeInner(t,n);for(let i=t.marks.length-1;i>=0;i--){let o=this.serializeMark(t.marks[i],t.isInline,n);o&&((o.contentDOM||o.dom).appendChild(r),r=o.dom)}return r}serializeMark(t,n,r={}){let i=this.marks[t.type.name];return i&&au.renderSpec(n1(r),i(t,n))}static renderSpec(t,n,r=null){if(typeof n=="string")return{dom:t.createTextNode(n)};if(n.nodeType!=null)return{dom:n};if(n.dom&&n.dom.nodeType!=null)return n;let i=n[0],o=i.indexOf(" ");o>0&&(r=i.slice(0,o),i=i.slice(o+1));let a,s=r?t.createElementNS(r,i):t.createElement(i),u=n[1],c=1;if(u&&typeof u=="object"&&u.nodeType==null&&!Array.isArray(u)){c=2;for(let l in u)if(u[l]!=null){let d=l.indexOf(" ");d>0?s.setAttributeNS(l.slice(0,d),l.slice(d+1),u[l]):s.setAttribute(l,u[l])}}for(let l=c;l<n.length;l++){let d=n[l];if(d===0){if(l<n.length-1||l>c)throw new RangeError("Content hole must be the only child of its parent node");return{dom:s,contentDOM:s}}else{let{dom:p,contentDOM:A}=au.renderSpec(t,d,r);if(s.appendChild(p),A){if(a)throw new RangeError("Multiple content holes");a=A}}}return{dom:s,contentDOM:a}}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new au(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let n=mk(t.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(t){return mk(t.marks)}}function mk(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function n1(e){return e.document||window.document}const I8=65535,T8=Math.pow(2,16);function HOe(e,t){return e+t*T8}function gk(e){return e&I8}function YOe(e){return(e-(e&I8))/T8}const x8=1,w8=2,am=4,E8=8;let yC=class{constructor(t,n,r){this.pos=t,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&E8)>0}get deletedBefore(){return(this.delInfo&(x8|am))>0}get deletedAfter(){return(this.delInfo&(w8|am))>0}get deletedAcross(){return(this.delInfo&am)>0}},Bl=class al{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&al.empty)return al.empty}recover(t){let n=0,r=gk(t);if(!this.inverted)for(let i=0;i<r;i++)n+=this.ranges[i*3+2]-this.ranges[i*3+1];return this.ranges[r*3]+n+YOe(t)}mapResult(t,n=1){return this._map(t,n,!1)}map(t,n=1){return this._map(t,n,!0)}_map(t,n,r){let i=0,o=this.inverted?2:1,a=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let u=this.ranges[s]-(this.inverted?i:0);if(u>t)break;let c=this.ranges[s+o],l=this.ranges[s+a],d=u+c;if(t<=d){let p=c?t==u?-1:t==d?1:n:n,A=u+i+(p<0?0:l);if(r)return A;let m=t==(n<0?u:d)?null:HOe(s/3,t-u),g=t==u?w8:t==d?x8:am;return(n<0?t!=u:t!=d)&&(g|=E8),new yC(A,g,m)}i+=l-c}return r?t+i:new yC(t+i,0,null)}touches(t,n){let r=0,i=gk(n),o=this.inverted?2:1,a=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let u=this.ranges[s]-(this.inverted?r:0);if(u>t)break;let c=this.ranges[s+o],l=u+c;if(t<=l&&s==i*3)return!0;r+=this.ranges[s+a]-c}return!1}forEach(t){let n=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,o=0;i<this.ranges.length;i+=3){let a=this.ranges[i],s=a-(this.inverted?o:0),u=a+(this.inverted?0:o),c=this.ranges[i+n],l=this.ranges[i+r];t(s,s+c,u,u+l),o+=l-c}}invert(){return new al(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(t){return t==0?al.empty:new al(t<0?[0,-t,0]:[0,0,t])}};Bl.empty=new Bl([]);class Md{constructor(t=[],n,r=0,i=t.length){this.maps=t,this.mirror=n,this.from=r,this.to=i}slice(t=0,n=this.maps.length){return new Md(this.maps,this.mirror,t,n)}copy(){return new Md(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}appendMap(t,n){this.to=this.maps.push(t),n!=null&&this.setMirror(this.maps.length-1,n)}appendMapping(t){for(let n=0,r=this.maps.length;n<t.maps.length;n++){let i=t.getMirror(n);this.appendMap(t.maps[n],i!=null&&i<n?r+i:void 0)}}getMirror(t){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==t)return this.mirror[n+(n%2?-1:1)]}}setMirror(t,n){this.mirror||(this.mirror=[]),this.mirror.push(t,n)}appendMappingInverted(t){for(let n=t.maps.length-1,r=this.maps.length+t.maps.length;n>=0;n--){let i=t.getMirror(n);this.appendMap(t.maps[n].invert(),i!=null&&i>n?r-i-1:void 0)}}invert(){let t=new Md;return t.appendMappingInverted(this),t}map(t,n=1){if(this.mirror)return this._map(t,n,!0);for(let r=this.from;r<this.to;r++)t=this.maps[r].map(t,n);return t}mapResult(t,n=1){return this._map(t,n,!1)}_map(t,n,r){let i=0;for(let o=this.from;o<this.to;o++){let a=this.maps[o],s=a.mapResult(t,n);if(s.recover!=null){let u=this.getMirror(o);if(u!=null&&u>o&&u<this.to){o=u,t=this.maps[u].recover(s.recover);continue}}i|=s.delInfo,t=s.pos}return r?t:new yC(t,i,null)}}const r1=Object.create(null);let Sr=class{getMap(){return Bl.empty}merge(t){return null}static fromJSON(t,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=r1[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in r1)throw new RangeError("Duplicate use of step JSON ID "+t);return r1[t]=n,n.prototype.jsonID=t,n}},sr=class Td{constructor(t,n){this.doc=t,this.failed=n}static ok(t){return new Td(t,null)}static fail(t){return new Td(null,t)}static fromReplace(t,n,r,i){try{return Td.ok(t.replace(n,r,i))}catch(o){if(o instanceof mp)return Td.fail(o.message);throw o}}};function GR(e,t,n){let r=[];for(let i=0;i<e.childCount;i++){let o=e.child(i);o.content.size&&(o=o.copy(GR(o.content,t,o))),o.isInline&&(o=t(o,n,i)),r.push(o)}return X.fromArray(r)}let $8=class xd extends Sr{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=t.resolve(this.from),i=r.node(r.sharedDepth(this.to)),o=new ae(GR(n.content,(a,s)=>!a.isAtom||!s.type.allowsMarkType(this.mark.type)?a:a.mark(this.mark.addToSet(a.marks)),i),n.openStart,n.openEnd);return sr.fromReplace(t,this.from,this.to,o)}invert(){return new R8(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 xd(n.pos,r.pos,this.mark)}merge(t){return t instanceof xd&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new xd(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new xd(n.from,n.to,t.markFromJSON(n.mark))}};Sr.jsonID("addMark",$8);let R8=class wd extends Sr{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=new ae(GR(n.content,i=>i.mark(this.mark.removeFromSet(i.marks)),t),n.openStart,n.openEnd);return sr.fromReplace(t,this.from,this.to,r)}invert(){return new $8(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 wd(n.pos,r.pos,this.mark)}merge(t){return t instanceof wd&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new wd(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new wd(n.from,n.to,t.markFromJSON(n.mark))}};Sr.jsonID("removeMark",R8);let O8=class Ed extends Sr{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return sr.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return sr.fromReplace(t,this.pos,this.pos+1,new ae(X.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let i=0;i<n.marks.length;i++)if(!n.marks[i].isInSet(r))return new Ed(this.pos,n.marks[i]);return new Ed(this.pos,this.mark)}}return new F8(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new Ed(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new Ed(n.pos,t.markFromJSON(n.mark))}};Sr.jsonID("addNodeMark",O8);let F8=class bC extends Sr{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return sr.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return sr.fromReplace(t,this.pos,this.pos+1,new ae(X.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new O8(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new bC(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new bC(n.pos,t.markFromJSON(n.mark))}};Sr.jsonID("removeNodeMark",F8);let xh=class eu extends Sr{constructor(t,n,r,i=!1){super(),this.from=t,this.to=n,this.slice=r,this.structure=i}apply(t){return this.structure&&CC(t,this.from,this.to)?sr.fail("Structure replace would overwrite content"):sr.fromReplace(t,this.from,this.to,this.slice)}getMap(){return new Bl([this.from,this.to-this.from,this.slice.size])}invert(t){return new eu(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 eu(n.pos,Math.max(n.pos,r.pos),this.slice)}merge(t){if(!(t instanceof eu)||t.structure||this.structure)return null;if(this.from+this.slice.size==t.from&&!this.slice.openEnd&&!t.slice.openStart){let n=this.slice.size+t.slice.size==0?ae.empty:new ae(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new eu(this.from,this.to+(t.to-t.from),n,this.structure)}else if(t.to==this.from&&!this.slice.openStart&&!t.slice.openEnd){let n=this.slice.size+t.slice.size==0?ae.empty:new ae(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new eu(t.from,this.to,n,this.structure)}else return null}toJSON(){let t={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new eu(n.from,n.to,ae.fromJSON(t,n.slice),!!n.structure)}};Sr.jsonID("replace",xh);let oa=class sm extends Sr{constructor(t,n,r,i,o,a,s=!1){super(),this.from=t,this.to=n,this.gapFrom=r,this.gapTo=i,this.slice=o,this.insert=a,this.structure=s}apply(t){if(this.structure&&(CC(t,this.from,this.gapFrom)||CC(t,this.gapTo,this.to)))return sr.fail("Structure gap-replace would overwrite content");let n=t.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return sr.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?sr.fromReplace(t,this.from,this.to,r):sr.fail("Content does not fit in gap")}getMap(){return new Bl([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 sm(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 sm(n.pos,r.pos,i,o,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new sm(n.from,n.to,n.gapFrom,n.gapTo,ae.fromJSON(t,n.slice),n.insert,!!n.structure)}};Sr.jsonID("replaceAround",oa);function CC(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 a=r.node(o).maybeChild(r.indexAfter(o));for(;i>0;){if(!a||a.isLeaf)return!0;a=a.firstChild,i--}}return!1}function GOe(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function wh(e){let n=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let r=e.depth;;--r){let i=e.$from.node(r),o=e.$from.index(r),a=e.$to.indexAfter(r);if(r<e.depth&&i.canReplace(o,a,n))return r;if(r==0||i.type.spec.isolating||!GOe(i,o,a))break}return null}function k8(e,t,n=null,r=e){let i=JOe(e,t),o=i&&ZOe(r,t);return o?i.map(vk).concat({type:t,attrs:n}).concat(o.map(vk)):null}function vk(e){return{type:e,attrs:null}}function JOe(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}function ZOe(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 c=r;u&&c<i;c++)u=u.matchType(n.child(c).type);return!u||!u.validEnd?null:a}function M8(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 c=i.depth-1,l=n-2;c>o;c--,l--){let d=i.node(c),p=i.index(c);if(d.type.spec.isolating)return!1;let A=d.content.cutByIndex(p,d.childCount),m=r&&r[l+1];m&&(A=A.replaceChild(0,m.type.create(m.attrs)));let g=r&&r[l]||d;if(!d.canReplace(p+1,d.childCount)||!g.type.validContent(A))return!1}let s=i.indexAfter(o),u=r&&r[0];return i.node(o).canReplaceWith(s,s,u?u.type:i.node(o+1).type)}function Eh(e,t){let n=e.resolve(t),r=n.index();return L8(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function L8(e,t){return!!(e&&t&&!e.isLeaf&&e.canAppend(t))}function j8(e,t,n=-1){let r=e.resolve(t);for(let i=r.depth;;i--){let o,a,s=r.index(i);if(i==r.depth?(o=r.nodeBefore,a=r.nodeAfter):n>0?(o=r.node(i+1),s++,a=r.node(i).maybeChild(s)):(o=r.node(i).maybeChild(s-1),a=r.node(i+1)),o&&!o.isTextblock&&L8(o,a)&&r.node(i).canReplace(s,s+1))return t;if(i==0)break;t=n<0?r.before(i):r.after(i)}}function XOe(e,t,n){let r=e.resolve(t);if(!n.content.size)return t;let i=n.content;for(let o=0;o<n.openStart;o++)i=i.firstChild.content;for(let o=1;o<=(n.openStart==0&&n.size?2:1);o++)for(let a=r.depth;a>=0;a--){let s=a==r.depth?0:r.pos<=(r.start(a+1)+r.end(a+1))/2?-1:1,u=r.index(a)+(s>0?1:0),c=r.node(a),l=!1;if(o==1)l=c.canReplace(u,u,i);else{let d=c.contentMatchAt(u).findWrapping(i.firstChild.type);l=d&&c.canReplaceWith(u,u,d[0])}if(l)return s==0?r.pos:s<0?r.before(a+1):r.after(a+1)}return null}function JR(e,t,n=t,r=ae.empty){if(t==n&&!r.size)return null;let i=e.resolve(t),o=e.resolve(n);return eFe(i,o,r)?new xh(t,n,r):new tFe(i,o,r).fit()}function eFe(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}class tFe{constructor(t,n,r){this.$from=t,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=X.empty;for(let i=0;i<=t.depth;i++){let o=t.node(i);this.frontier.push({type:o.type,match:o.contentMatchAt(t.indexAfter(i))})}for(let i=t.depth;i>0;i--)this.placed=X.from(t.node(i).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let c=this.findFittable();c?this.placeNodes(c):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,i=this.close(t<0?this.$to:r.doc.resolve(t));if(!i)return null;let o=this.placed,a=r.depth,s=i.depth;for(;a&&s&&o.childCount==1;)o=o.firstChild.content,a--,s--;let u=new ae(o,a,s);return t>-1?new oa(r.pos,t,this.$to.pos,this.$to.end(),u,n):u.size||r.pos!=this.$to.pos?new xh(r.pos,i.pos,u):null}findFittable(){let t=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,i=this.unplaced.openEnd;r<t;r++){let o=n.firstChild;if(n.childCount>1&&(i=0),o.type.spec.isolating&&i<=r){t=r;break}n=o.content}for(let n=1;n<=2;n++)for(let r=n==1?t:this.unplaced.openStart;r>=0;r--){let i,o=null;r?(o=i1(this.unplaced.content,r-1).firstChild,i=o.content):i=this.unplaced.content;let a=i.firstChild;for(let s=this.depth;s>=0;s--){let{type:u,match:c}=this.frontier[s],l,d=null;if(n==1&&(a?c.matchType(a.type)||(d=c.fillBefore(X.from(a),!1)):o&&u.compatibleContent(o.type)))return{sliceDepth:r,frontierDepth:s,parent:o,inject:d};if(n==2&&a&&(l=c.findWrapping(a.type)))return{sliceDepth:r,frontierDepth:s,parent:o,wrap:l};if(o&&c.matchType(o.type))break}}}openMore(){let{content:t,openStart:n,openEnd:r}=this.unplaced,i=i1(t,n);return!i.childCount||i.firstChild.isLeaf?!1:(this.unplaced=new ae(t,n+1,Math.max(r,i.size+n>=t.size-r?n+1:0)),!0)}dropNode(){let{content:t,openStart:n,openEnd:r}=this.unplaced,i=i1(t,n);if(i.childCount<=1&&n>0){let o=t.size-n<=n+i.size;this.unplaced=new ae($d(t,n-1,1),n-1,o?n-1:r)}else this.unplaced=new ae($d(t,n,1),n,r)}placeNodes({sliceDepth:t,frontierDepth:n,parent:r,inject:i,wrap:o}){for(;this.depth>n;)this.closeFrontierNode();if(o)for(let g=0;g<o.length;g++)this.openFrontierNode(o[g]);let a=this.unplaced,s=r?r.content:a.content,u=a.openStart-t,c=0,l=[],{match:d,type:p}=this.frontier[n];if(i){for(let g=0;g<i.childCount;g++)l.push(i.child(g));d=d.matchFragment(i)}let A=s.size+t-(a.content.size-a.openEnd);for(;c<s.childCount;){let g=s.child(c),_=d.matchType(g.type);if(!_)break;c++,(c>1||u==0||g.content.size)&&(d=_,l.push(U8(g.mark(p.allowedMarks(g.marks)),c==1?u:0,c==s.childCount?A:-1)))}let m=c==s.childCount;m||(A=-1),this.placed=Rd(this.placed,n,X.from(l)),this.frontier[n].match=d,m&&A<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let g=0,_=s;g<A;g++){let b=_.lastChild;this.frontier.push({type:b.type,match:b.contentMatchAt(b.childCount)}),_=b.content}this.unplaced=m?t==0?ae.empty:new ae($d(a.content,t-1,1),t-1,A<0?a.openEnd:t-1):new ae($d(a.content,t,c),a.openStart,a.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let t=this.frontier[this.depth],n;if(!t.type.isTextblock||!o1(this.$to,this.$to.depth,t.type,t.match,!1)||this.$to.depth==this.depth&&(n=this.findCloseLevel(this.$to))&&n.depth==this.depth)return-1;let{depth:r}=this.$to,i=this.$to.after(r);for(;r>1&&i==this.$to.end(--r);)++i;return i}findCloseLevel(t){e:for(let n=Math.min(this.depth,t.depth);n>=0;n--){let{match:r,type:i}=this.frontier[n],o=n<t.depth&&t.end(n+1)==t.pos+(t.depth-(n+1)),a=o1(t,n,i,r,o);if(a){for(let s=n-1;s>=0;s--){let{match:u,type:c}=this.frontier[s],l=o1(t,s,c,u,!0);if(!l||l.childCount)continue e}return{depth:n,fit:a,move:o?t.doc.resolve(t.after(n+1)):t}}}}close(t){let n=this.findCloseLevel(t);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=Rd(this.placed,n.depth,n.fit)),t=n.move;for(let r=n.depth+1;r<=t.depth;r++){let i=t.node(r),o=i.type.contentMatch.fillBefore(i.content,!0,t.index(r));this.openFrontierNode(i.type,i.attrs,o)}return t}openFrontierNode(t,n=null,r){let i=this.frontier[this.depth];i.match=i.match.matchType(t),this.placed=Rd(this.placed,this.depth,X.from(t.create(n,r))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(X.empty,!0);n.childCount&&(this.placed=Rd(this.placed,this.frontier.length,n))}}function $d(e,t,n){return t==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy($d(e.firstChild.content,t-1,n)))}function Rd(e,t,n){return t==0?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(Rd(e.lastChild.content,t-1,n)))}function i1(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function U8(e,t,n){if(t<=0)return e;let r=e.content;return t>1&&(r=r.replaceChild(0,U8(r.firstChild,t-1,r.childCount==1?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(X.empty,!0)))),e.copy(r)}function o1(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 s=r.fillBefore(o.content,!0,a);return s&&!nFe(n,o.content,a)?s:null}function nFe(e,t,n){for(let r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}let rFe=class um extends Sr{constructor(t,n,r){super(),this.pos=t,this.attr=n,this.value=r}apply(t){let n=t.nodeAt(this.pos);if(!n)return sr.fail("No node at attribute step's position");let r=Object.create(null);for(let o in n.attrs)r[o]=n.attrs[o];r[this.attr]=this.value;let i=n.type.create(r,null,n.marks);return sr.fromReplace(t,this.pos,this.pos+1,new ae(X.from(i),0,n.isLeaf?0:1))}getMap(){return Bl.empty}invert(t){return new um(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 um(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new um(n.pos,n.attr,n.value)}};Sr.jsonID("attr",rFe);let vp=class extends Error{};vp=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n};vp.prototype=Object.create(Error.prototype);vp.prototype.constructor=vp;vp.prototype.name="TransformError";const a1=Object.create(null);class ze{constructor(t,n,r){this.$anchor=t,this.$head=n,this.ranges=r||[new iFe(t.min(n),t.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let t=this.ranges;for(let n=0;n<t.length;n++)if(t[n].$from.pos!=t[n].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(t,n=ae.empty){let r=n.content.lastChild,i=null;for(let s=0;s<n.openEnd;s++)i=r,r=r.lastChild;let o=t.steps.length,a=this.ranges;for(let s=0;s<a.length;s++){let{$from:u,$to:c}=a[s],l=t.mapping.slice(o);t.replaceRange(l.map(u.pos),l.map(c.pos),s?ae.empty:n),s==0&&Ck(t,o,(r?r.isInline:i&&i.isTextblock)?-1:1)}}replaceWith(t,n){let r=t.steps.length,i=this.ranges;for(let o=0;o<i.length;o++){let{$from:a,$to:s}=i[o],u=t.mapping.slice(r),c=u.map(a.pos),l=u.map(s.pos);o?t.deleteRange(c,l):(t.replaceRangeWith(c,l,n),Ck(t,r,n.isInline?-1:1))}}static findFrom(t,n,r=!1){let i=t.parent.inlineContent?new Be(t):sl(t.node(0),t.parent,t.pos,t.index(),n,r);if(i)return i;for(let o=t.depth-1;o>=0;o--){let a=n<0?sl(t.node(0),t.node(o),t.before(o+1),t.index(o),n,r):sl(t.node(0),t.node(o),t.after(o+1),t.index(o)+1,n,r);if(a)return a}return null}static near(t,n=1){return this.findFrom(t,n)||this.findFrom(t,-n)||new Ri(t.node(0))}static atStart(t){return sl(t,t,0,0,1)||new Ri(t)}static atEnd(t){return sl(t,t,t.content.size,t.childCount,-1)||new Ri(t)}static fromJSON(t,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=a1[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in a1)throw new RangeError("Duplicate use of selection JSON ID "+t);return a1[t]=n,n.prototype.jsonID=t,n}getBookmark(){return Be.between(this.$anchor,this.$head).getBookmark()}}ze.prototype.visible=!0;class iFe{constructor(t,n){this.$from=t,this.$to=n}}let yk=!1;function bk(e){!yk&&!e.parent.inlineContent&&(yk=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class Be extends ze{constructor(t,n=t){bk(t),bk(n),super(t,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,n){let r=t.resolve(n.map(this.head));if(!r.parent.inlineContent)return ze.near(r);let i=t.resolve(n.map(this.anchor));return new Be(i.parent.inlineContent?i:r,r)}replace(t,n=ae.empty){if(super.replace(t,n),n==ae.empty){let r=this.$from.marksAcross(this.$to);r&&t.ensureMarks(r)}}eq(t){return t instanceof Be&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new G0(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new Be(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){let i=t.resolve(n);return new this(i,r==n?i:t.resolve(r))}static between(t,n,r){let i=t.pos-n.pos;if((!r||i)&&(r=i>=0?1:-1),!n.parent.inlineContent){let o=ze.findFrom(n,r,!0)||ze.findFrom(n,-r,!0);if(o)n=o.$head;else return ze.near(n,r)}return t.parent.inlineContent||(i==0?t=n:(t=(ze.findFrom(t,-r,!0)||ze.findFrom(t,r,!0)).$anchor,t.pos<n.pos!=i<0&&(t=n))),new Be(t,n)}}ze.jsonID("text",Be);class G0{constructor(t,n){this.anchor=t,this.head=n}map(t){return new G0(t.map(this.anchor),t.map(this.head))}resolve(t){return Be.between(t.resolve(this.anchor),t.resolve(this.head))}}class ve extends ze{constructor(t){let n=t.nodeAfter,r=t.node(0).resolve(t.pos+n.nodeSize);super(t,r),this.node=n}map(t,n){let{deleted:r,pos:i}=n.mapResult(this.anchor),o=t.resolve(i);return r?ze.near(o):new ve(o)}content(){return new ae(X.from(this.node),0,0)}eq(t){return t instanceof ve&&t.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new ZR(this.anchor)}static fromJSON(t,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new ve(t.resolve(n.anchor))}static create(t,n){return new ve(t.resolve(n))}static isSelectable(t){return!t.isText&&t.type.spec.selectable!==!1}}ve.prototype.visible=!1;ze.jsonID("node",ve);class ZR{constructor(t){this.anchor=t}map(t){let{deleted:n,pos:r}=t.mapResult(this.anchor);return n?new G0(r,r):new ZR(r)}resolve(t){let n=t.resolve(this.anchor),r=n.nodeAfter;return r&&ve.isSelectable(r)?new ve(n):ze.near(n)}}class Ri extends ze{constructor(t){super(t.resolve(0),t.resolve(t.content.size))}replace(t,n=ae.empty){if(n==ae.empty){t.delete(0,t.doc.content.size);let r=ze.atStart(t.doc);r.eq(t.selection)||t.setSelection(r)}else super.replace(t,n)}toJSON(){return{type:"all"}}static fromJSON(t){return new Ri(t)}map(t){return new Ri(t)}eq(t){return t instanceof Ri}getBookmark(){return oFe}}ze.jsonID("all",Ri);const oFe={map(){return this},resolve(e){return new Ri(e)}};function sl(e,t,n,r,i,o=!1){if(t.inlineContent)return Be.create(e,n);for(let a=r-(i>0?0:1);i>0?a<t.childCount:a>=0;a+=i){let s=t.child(a);if(s.isAtom){if(!o&&ve.isSelectable(s))return ve.create(e,n-(i<0?s.nodeSize:0))}else{let u=sl(e,s,n+i,i<0?s.childCount:0,i,o);if(u)return u}n+=s.nodeSize*i}return null}function Ck(e,t,n){let r=e.steps.length-1;if(r<t)return;let i=e.steps[r];if(!(i instanceof xh||i instanceof oa))return;let o=e.mapping.maps[r],a;o.forEach((s,u,c,l)=>{a==null&&(a=l)}),e.setSelection(ze.near(e.doc.resolve(a),n))}function Sk(e,t){return!t||!e?e:e.bind(t)}class Yh{constructor(t,n,r){this.name=t,this.init=Sk(n.init,r),this.apply=Sk(n.apply,r)}}new Yh("doc",{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new Yh("selection",{init(e,t){return e.selection||ze.atStart(t.doc)},apply(e){return e.selection}}),new Yh("storedMarks",{init(e){return e.storedMarks||null},apply(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new Yh("scrollToSelection",{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}});function B8(e,t,n){for(let r in e){let i=e[r];i instanceof Function?i=i.bind(t):r=="handleDOMEvents"&&(i=B8(i,t,{})),n[r]=i}return n}class zr{constructor(t){this.spec=t,this.props={},t.props&&B8(t.props,this,this.props),this.key=t.key?t.key.key:P8("plugin")}getState(t){return t[this.key]}}const s1=Object.create(null);function P8(e){return e in s1?e+"$"+ ++s1[e]:(s1[e]=0,e+"$")}class eo{constructor(t="key"){this.key=P8(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}const Wc=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},D8=function(e,t,n,r){return n&&(_k(e,t,n,r,-1)||_k(e,t,n,r,1))},aFe=/^(img|br|input|textarea|hr)$/i;function _k(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:Jm(e))){let o=e.parentNode;if(!o||o.nodeType!=1||XR(e)||aFe.test(e.nodeName)||e.contentEditable=="false")return!1;t=Wc(e)+(i<0?0:1),e=o}else if(e.nodeType==1){if(e=e.childNodes[t+(i<0?-1:0)],e.contentEditable=="false")return!1;t=i<0?Jm(e):0}else return!1}}function Jm(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function sFe(e,t,n){for(let r=t==0,i=t==Jm(e);r||i;){if(e==n)return!0;let o=Wc(e);if(e=e.parentNode,!e)return!1;r=r&&o==0,i=i&&o==Jm(e)}}function XR(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)}const W8=function(e){return e.focusNode&&D8(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function K8(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}const ho=typeof navigator<"u"?navigator:null,Ik=typeof document<"u"?document:null,Qs=ho&&ho.userAgent||"",SC=/Edge\/(\d+)/.exec(Qs),N8=/MSIE \d/.exec(Qs),_C=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Qs),$h=!!(N8||_C||SC),q8=N8?document.documentMode:_C?+_C[1]:SC?+SC[1]:0,J0=!$h&&/gecko\/(\d+)/i.test(Qs);J0&&+(/Firefox\/(\d+)/.exec(Qs)||[0,0])[1];const IC=!$h&&/Chrome\/(\d+)/.exec(Qs),zs=!!IC,V8=IC?+IC[1]:0,Kc=!$h&&!!ho&&/Apple Computer/.test(ho.vendor),eO=Kc&&(/Mobile\/\w+/.test(Qs)||!!ho&&ho.maxTouchPoints>2),Xr=eO||(ho?/Mac/.test(ho.platform):!1),uFe=ho?/Win/.test(ho.platform):!1,Rh=/Android \d/.test(Qs),tO=!!Ik&&"webkitFontSmoothing"in Ik.documentElement.style,cFe=tO?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function lFe(e,t=null){let n=e.domSelectionRange(),r=e.state.doc;if(!n.focusNode)return null;let i=e.docView.nearestDesc(n.focusNode),o=i&&i.size==0,a=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(a<0)return null;let s=r.resolve(a),u,c;if(W8(n)){for(u=s;i&&!i.node;)i=i.parent;let l=i.node;if(i&&l.isAtom&&ve.isSelectable(l)&&i.parent&&!(l.isInline&&sFe(n.focusNode,n.focusOffset,i.dom))){let d=i.posBefore;c=new ve(a==d?s:r.resolve(d))}}else{let l=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(l<0)return null;u=r.resolve(l)}if(!c){let l=t=="pointer"||e.state.selection.head<s.pos&&!o?1:-1;c=z8(e,u,s,l)}return c}function Q8(e){return e.editable?e.hasFocus():AFe(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function nO(e,t=!1){let n=e.state.selection;if(pFe(e,n),!!Q8(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&zs){let r=e.domSelectionRange(),i=e.domObserver.currentSelection;if(r.anchorNode&&i.anchorNode&&D8(r.anchorNode,r.anchorOffset,i.anchorNode,i.anchorOffset)){e.input.mouseDown.delayedSelectionSync=!0,e.domObserver.setCurSelection();return}}if(e.domObserver.disconnectSelection(),e.cursorWrapper)dFe(e);else{let{anchor:r,head:i}=n,o,a;Tk&&!(n instanceof Be)&&(n.$from.parent.inlineContent||(o=xk(e,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(a=xk(e,n.to))),e.docView.setSelection(r,i,e.root,t),Tk&&(o&&wk(o),a&&wk(a)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&fFe(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}const Tk=Kc||zs&&V8<63;function xk(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(Kc&&i&&i.contentEditable=="false")return u1(i);if((!i||i.contentEditable=="false")&&(!o||o.contentEditable=="false")){if(i)return u1(i);if(o)return u1(o)}}function u1(e){return e.contentEditable="true",Kc&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function wk(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function fFe(e){let t=e.dom.ownerDocument;t.removeEventListener("selectionchange",e.input.hideSelectionGuard);let n=e.domSelectionRange(),r=n.anchorNode,i=n.anchorOffset;t.addEventListener("selectionchange",e.input.hideSelectionGuard=()=>{(n.anchorNode!=r||n.anchorOffset!=i)&&(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout(()=>{(!Q8(e)||e.state.selection.visible)&&e.dom.classList.remove("ProseMirror-hideselection")},20))})}function dFe(e){let t=e.domSelection(),n=document.createRange();if(!t)return;let r=e.cursorWrapper.dom,i=r.nodeName=="IMG";i?n.setStart(r.parentNode,Wc(r)+1):n.setStart(r,0),n.collapse(!0),t.removeAllRanges(),t.addRange(n),!i&&!e.state.selection.visible&&$h&&q8<=11&&(r.disabled=!0,r.disabled=!1)}function pFe(e,t){if(t instanceof ve){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(Ek(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else Ek(e)}function Ek(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function z8(e,t,n,r){return e.someProp("createSelectionBetween",i=>i(e,t,n))||Be.between(t,n,r)}function AFe(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(t.anchorNode.nodeType==3?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(t.focusNode.nodeType==3?t.focusNode.parentNode:t.focusNode))}catch{return!1}}function TC(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&&ze.findFrom(o,t)}function Ha(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function $k(e,t,n){let r=e.state.selection;if(r instanceof Be)if(n.indexOf("s")>-1){let{$head:i}=r,o=i.textOffset?null:t<0?i.nodeBefore:i.nodeAfter;if(!o||o.isText||!o.isLeaf)return!1;let a=e.state.doc.resolve(i.pos+o.nodeSize*(t<0?-1:1));return Ha(e,new Be(r.$anchor,a))}else if(r.empty){if(e.endOfTextblock(t>0?"forward":"backward")){let i=TC(e.state,t);return i&&i instanceof ve?Ha(e,i):!1}else if(!(Xr&&n.indexOf("m")>-1)){let i=r.$head,o=i.textOffset?null:t<0?i.nodeBefore:i.nodeAfter,a;if(!o||o.isText)return!1;let s=t<0?i.pos-o.nodeSize:i.pos;return o.isAtom||(a=e.docView.descAt(s))&&!a.contentDOM?ve.isSelectable(o)?Ha(e,new ve(t<0?e.state.doc.resolve(i.pos-o.nodeSize):i)):tO?Ha(e,new Be(e.state.doc.resolve(t<0?s:s+o.nodeSize))):!1:!1}}else return!1;else{if(r instanceof ve&&r.node.isInline)return Ha(e,new Be(t>0?r.$to:r.$from));{let i=TC(e.state,t);return i?Ha(e,i):!1}}}function Zm(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function Ld(e,t){let n=e.pmViewDesc;return n&&n.size==0&&(t<0||e.nextSibling||e.nodeName!="BR")}function el(e,t){return t<0?hFe(e):mFe(e)}function hFe(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i,o,a=!1;for(J0&&n.nodeType==1&&r<Zm(n)&&Ld(n.childNodes[r],-1)&&(a=!0);;)if(r>0){if(n.nodeType!=1)break;{let s=n.childNodes[r-1];if(Ld(s,-1))i=n,o=--r;else if(s.nodeType==3)n=s,r=n.nodeValue.length;else break}}else{if(H8(n))break;{let s=n.previousSibling;for(;s&&Ld(s,-1);)i=n.parentNode,o=Wc(s),s=s.previousSibling;if(s)n=s,r=Zm(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}}a?xC(e,n,r):i&&xC(e,i,o)}function mFe(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i=Zm(n),o,a;for(;;)if(r<i){if(n.nodeType!=1)break;let s=n.childNodes[r];if(Ld(s,1))o=n,a=++r;else break}else{if(H8(n))break;{let s=n.nextSibling;for(;s&&Ld(s,1);)o=s.parentNode,a=Wc(s)+1,s=s.nextSibling;if(s)n=s,r=0,i=Zm(n);else{if(n=n.parentNode,n==e.dom)break;r=i=0}}}o&&xC(e,o,a)}function H8(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function gFe(e,t){for(;e&&t==e.childNodes.length&&!XR(e);)t=Wc(e)+1,e=e.parentNode;for(;e&&t<e.childNodes.length;){let n=e.childNodes[t];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;e=n,t=0}}function vFe(e,t){for(;e&&!t&&!XR(e);)t=Wc(e),e=e.parentNode;for(;e&&t;){let n=e.childNodes[t-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;e=n,t=e.childNodes.length}}function xC(e,t,n){if(t.nodeType!=3){let o,a;(a=gFe(t,n))?(t=a,n=0):(o=vFe(t,n))&&(t=o,n=o.nodeValue.length)}let r=e.domSelection();if(!r)return;if(W8(r)){let o=document.createRange();o.setEnd(t,n),o.setStart(t,n),r.removeAllRanges(),r.addRange(o)}else r.extend&&r.extend(t,n);e.domObserver.setCurSelection();let{state:i}=e;setTimeout(()=>{e.state==i&&nO(e)},50)}function Rk(e,t){let n=e.state.doc.resolve(t);if(!(zs||uFe)&&n.parent.inlineContent){let i=e.coordsAtPos(t);if(t>n.start()){let o=e.coordsAtPos(t-1),a=(o.top+o.bottom)/2;if(a>i.top&&a<i.bottom&&Math.abs(o.left-i.left)>1)return o.left<i.left?"ltr":"rtl"}if(t<n.end()){let o=e.coordsAtPos(t+1),a=(o.top+o.bottom)/2;if(a>i.top&&a<i.bottom&&Math.abs(o.left-i.left)>1)return o.left>i.left?"ltr":"rtl"}}return getComputedStyle(e.dom).direction=="rtl"?"rtl":"ltr"}function Ok(e,t,n){let r=e.state.selection;if(r instanceof Be&&!r.empty||n.indexOf("s")>-1||Xr&&n.indexOf("m")>-1)return!1;let{$from:i,$to:o}=r;if(!i.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let a=TC(e.state,t);if(a&&a instanceof ve)return Ha(e,a)}if(!i.parent.inlineContent){let a=t<0?i:o,s=r instanceof Ri?ze.near(a,t):ze.findFrom(a,t);return s?Ha(e,s):!1}return!1}function Fk(e,t){if(!(e.state.selection instanceof Be))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 a=e.state.tr;return t<0?a.delete(n.pos-o.nodeSize,n.pos):a.delete(n.pos,n.pos+o.nodeSize),e.dispatch(a),!0}return!1}function kk(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function yFe(e){if(!Kc||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&t.nodeType==1&&n==0&&t.firstChild&&t.firstChild.contentEditable=="false"){let r=t.firstChild;kk(e,r,"true"),setTimeout(()=>kk(e,r,"false"),20)}return!1}function bFe(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}function CFe(e,t){let n=t.keyCode,r=bFe(t);if(n==8||Xr&&n==72&&r=="c")return Fk(e,-1)||el(e,-1);if(n==46&&!t.shiftKey||Xr&&n==68&&r=="c")return Fk(e,1)||el(e,1);if(n==13||n==27)return!0;if(n==37||Xr&&n==66&&r=="c"){let i=n==37?Rk(e,e.state.selection.from)=="ltr"?-1:1:-1;return $k(e,i,r)||el(e,i)}else if(n==39||Xr&&n==70&&r=="c"){let i=n==39?Rk(e,e.state.selection.from)=="ltr"?1:-1:1;return $k(e,i,r)||el(e,i)}else{if(n==38||Xr&&n==80&&r=="c")return Ok(e,-1,r)||el(e,-1);if(n==40||Xr&&n==78&&r=="c")return yFe(e)||Ok(e,1,r)||el(e,1);if(r==(Xr?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function Y8(e,t){e.someProp("transformCopied",A=>{t=A(t,e)});let n=[],{content:r,openStart:i,openEnd:o}=t;for(;i>1&&o>1&&r.childCount==1&&r.firstChild.childCount==1;){i--,o--;let A=r.firstChild;n.push(A.type.name,A.attrs!=A.type.defaultAttrs?A.attrs:null),r=A.content}let a=e.someProp("clipboardSerializer")||au.fromSchema(e.state.schema),s=tV(),u=s.createElement("div");u.appendChild(a.serializeFragment(r,{document:s}));let c=u.firstChild,l,d=0;for(;c&&c.nodeType==1&&(l=eV[c.nodeName.toLowerCase()]);){for(let A=l.length-1;A>=0;A--){let m=s.createElement(l[A]);for(;u.firstChild;)m.appendChild(u.firstChild);u.appendChild(m),d++}c=u.firstChild}c&&c.nodeType==1&&c.setAttribute("data-pm-slice",`${i} ${o}${d?` -${d}`:""} ${JSON.stringify(n)}`);let p=e.someProp("clipboardTextSerializer",A=>A(t,e))||t.content.textBetween(0,t.content.size,`
@@ -43,7 +43,7 @@ npx @slicemachine/init@latest --repository ${i??"<my-project>"}`,language:"bash"
43
43
  `).scrollIntoView()),!0)};function CV(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const gke=(e,t)=>{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let i=n.node(-1),o=n.indexAfter(-1),a=CV(i.contentMatchAt(o));if(!a||!i.canReplaceWith(o,o,a))return!1;if(t){let s=n.after(),u=e.tr.replaceWith(s,s,a.createAndFill());u.setSelection(ze.near(u.doc.resolve(s),1)),t(u.scrollIntoView())}return!0},vke=(e,t)=>{let n=e.selection,{$from:r,$to:i}=n;if(n instanceof Ri||r.parent.inlineContent||i.parent.inlineContent)return!1;let o=CV(i.parent.contentMatchAt(i.indexAfter()));if(!o||!o.isTextblock)return!1;if(t){let a=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,s=e.tr.insert(a,o.createAndFill());s.setSelection(Be.create(s.doc,a+1)),t(s.scrollIntoView())}return!0},yke=(e,t)=>{let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let o=n.before();if(M8(e.doc,o))return t&&t(e.tr.split(o).scrollIntoView()),!0}let r=n.blockRange(),i=r&&wh(r);return i==null?!1:(t&&t(e.tr.lift(r,i).scrollIntoView()),!0)},bke=(e,t)=>{let{$from:n,to:r}=e.selection,i,o=n.sharedDepth(r);return o==0?!1:(i=n.before(o),t&&t(e.tr.setSelection(ve.create(e.doc,i))),!0)};function Cke(e,t,n){let r=t.nodeBefore,i=t.nodeAfter,o=t.index();return!r||!i||!r.type.compatibleContent(i.type)?!1:!r.content.size&&t.parent.canReplace(o-1,o)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),!0):!t.parent.canReplace(o,o+1)||!(i.isTextblock||Eh(e.doc,t.pos))?!1:(n&&n(e.tr.clearIncompatible(t.pos,r.type,r.contentMatchAt(r.childCount)).join(t.pos).scrollIntoView()),!0)}function SV(e,t,n){let r=t.nodeBefore,i=t.nodeAfter,o,a;if(r.type.spec.isolating||i.type.spec.isolating)return!1;if(Cke(e,t,n))return!0;let s=t.parent.canReplace(t.index(),t.index()+1);if(s&&(o=(a=r.contentMatchAt(r.childCount)).findWrapping(i.type))&&a.matchType(o[0]||i.type).validEnd){if(n){let d=t.pos+i.nodeSize,p=X.empty;for(let g=o.length-1;g>=0;g--)p=X.from(o[g].create(null,p));p=X.from(r.copy(p));let A=e.tr.step(new oa(t.pos-1,d,t.pos,d,new ae(p,1,0),o.length,!0)),m=d+2*o.length;Eh(A.doc,m)&&A.join(m),n(A.scrollIntoView())}return!0}let u=ze.findFrom(t,1),c=u&&u.$from.blockRange(u.$to),l=c&&wh(c);if(l!=null&&l>=t.depth)return n&&n(e.tr.lift(c,l).scrollIntoView()),!0;if(s&&Pl(i,"start",!0)&&Pl(r,"end")){let d=r,p=[];for(;p.push(d),!d.isTextblock;)d=d.lastChild;let A=i,m=1;for(;!A.isTextblock;A=A.firstChild)m++;if(d.canReplace(d.childCount,d.childCount,A.content)){if(n){let g=X.empty;for(let b=p.length-1;b>=0;b--)g=X.from(p[b].copy(g));let _=e.tr.step(new oa(t.pos-p.length,t.pos+i.nodeSize,t.pos+m,t.pos+i.nodeSize-m,new ae(g,p.length,0),0,!0));n(_.scrollIntoView())}return!0}}return!1}function _V(e){return function(t,n){let r=t.selection,i=e<0?r.$from:r.$to,o=i.depth;for(;i.node(o).isInline;){if(!o)return!1;o--}return i.node(o).isTextblock?(n&&n(t.tr.setSelection(Be.create(t.doc,e<0?i.start(o):i.end(o)))),!0):!1}}const Ske=_V(-1),_ke=_V(1);function Ike(e,t=null){return function(n,r){let{$from:i,$to:o}=n.selection,a=i.blockRange(o),s=a&&k8(a,e,t);return s?(r&&r(n.tr.wrap(a,s).scrollIntoView()),!0):!1}}function Dk(e,t=null){return function(n,r){let i=!1;for(let o=0;o<n.selection.ranges.length&&!i;o++){let{$from:{pos:a},$to:{pos:s}}=n.selection.ranges[o];n.doc.nodesBetween(a,s,(u,c)=>{if(i)return!1;if(!(!u.isTextblock||u.hasMarkup(e,t)))if(u.type==e)i=!0;else{let l=n.doc.resolve(c),d=l.index();i=l.parent.canReplaceWith(d,d+1,e)}})}if(!i)return!1;if(r){let o=n.tr;for(let a=0;a<n.selection.ranges.length;a++){let{$from:{pos:s},$to:{pos:u}}=n.selection.ranges[a];o.setBlockType(s,u,e,t)}r(o.scrollIntoView())}return!0}}typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function Tke(e,t=null){return function(n,r){let{$from:i,$to:o}=n.selection,a=i.blockRange(o),s=!1,u=a;if(!a)return!1;if(a.depth>=2&&i.node(a.depth-1).type.compatibleContent(e)&&a.startIndex==0){if(i.index(a.depth-1)==0)return!1;let l=n.doc.resolve(a.start-2);u=new zm(l,l,a.depth),a.endIndex<a.parent.childCount&&(a=new zm(i,n.doc.resolve(o.end(a.depth)),a.depth)),s=!0}let c=k8(u,e,t,a);return c?(r&&r(xke(n.tr,a,c,s,e).scrollIntoView()),!0):!1}}function xke(e,t,n,r,i){let o=X.empty;for(let l=n.length-1;l>=0;l--)o=X.from(n[l].type.create(n[l].attrs,o));e.step(new oa(t.start-(r?2:0),t.end,t.start,t.end,new ae(o,0,0),n.length,!0));let a=0;for(let l=0;l<n.length;l++)n[l].type==i&&(a=l+1);let s=n.length-a,u=t.start+n.length-(r?2:0),c=t.parent;for(let l=t.startIndex,d=t.endIndex,p=!0;l<d;l++,p=!1)!p&&M8(e.doc,u,s)&&(e.split(u,s),u+=2*s),u+=c.child(l).nodeSize;return e}function wke(e){return function(t,n){let{$from:r,$to:i}=t.selection,o=r.blockRange(i,a=>a.childCount>0&&a.firstChild.type==e);return o?n?r.node(o.depth-1).type==e?Eke(t,n,e,o):$ke(t,n,o):!0:!1}}function Eke(e,t,n,r){let i=e.tr,o=r.end,a=r.$to.end(r.depth);o<a&&(i.step(new oa(o-1,a,o,a,new ae(X.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new zm(i.doc.resolve(r.$from.pos),i.doc.resolve(a),r.depth));const s=wh(r);if(s==null)return!1;i.lift(r,s);let u=i.mapping.map(o,-1)-1;return Eh(i.doc,u)&&i.join(u),t(i.scrollIntoView()),!0}function $ke(e,t,n){let r=e.tr,i=n.parent;for(let A=n.end,m=n.endIndex-1,g=n.startIndex;m>g;m--)A-=i.child(m).nodeSize,r.delete(A-1,A+1);let o=r.doc.resolve(n.start),a=o.nodeAfter;if(r.mapping.map(n.end)!=n.start+o.nodeAfter.nodeSize)return!1;let s=n.startIndex==0,u=n.endIndex==i.childCount,c=o.node(-1),l=o.index(-1);if(!c.canReplace(l+(s?0:1),l+1,a.content.append(u?X.empty:X.from(i))))return!1;let d=o.pos,p=d+a.nodeSize;return r.step(new oa(d-(s?1:0),p+(u?1:0),d+1,p-1,new ae((s?X.empty:X.from(i.copy(X.empty))).append(u?X.empty:X.from(i.copy(X.empty))),s?0:1,u?0:1),s?0:1)),t(r.scrollIntoView()),!0}function Rke(e){return function(t,n){let{$from:r,$to:i}=t.selection,o=r.blockRange(i,c=>c.childCount>0&&c.firstChild.type==e);if(!o)return!1;let a=o.startIndex;if(a==0)return!1;let s=o.parent,u=s.child(a-1);if(u.type!=e)return!1;if(n){let c=u.lastChild&&u.lastChild.type==s.type,l=X.from(c?e.create():null),d=new ae(X.from(e.create(null,X.from(s.type.create(null,l)))),c?3:1,0),p=o.start,A=o.end;n(t.tr.step(new oa(p-(c?3:1),A,p,A,d,1,!0)).scrollIntoView())}return!0}}function X0(e){const{state:t,transaction:n}=e;let{selection:r}=n,{doc:i}=n,{storedMarks:o}=n;return{...t,apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return o},get selection(){return r},get doc(){return i},get tr(){return r=n.selection,i=n.doc,o=n.storedMarks,n}}}class lO{constructor(t){this.editor=t.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=t.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:t,editor:n,state:r}=this,{view:i}=n,{tr:o}=r,a=this.buildProps(o);return Object.fromEntries(Object.entries(t).map(([s,u])=>[s,(...l)=>{const d=u(...l)(a);return!o.getMeta("preventDispatch")&&!this.hasCustomState&&i.dispatch(o),d}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(t,n=!0){const{rawCommands:r,editor:i,state:o}=this,{view:a}=i,s=[],u=!!t,c=t||o.tr,l=()=>(!u&&n&&!c.getMeta("preventDispatch")&&!this.hasCustomState&&a.dispatch(c),s.every(p=>p===!0)),d={...Object.fromEntries(Object.entries(r).map(([p,A])=>[p,(...g)=>{const _=this.buildProps(c,n),b=A(...g)(_);return s.push(b),d}])),run:l};return d}createCan(t){const{rawCommands:n,state:r}=this,i=!1,o=t||r.tr,a=this.buildProps(o,i);return{...Object.fromEntries(Object.entries(n).map(([u,c])=>[u,(...l)=>c(...l)({...a,dispatch:void 0})])),chain:()=>this.createChain(o,i)}}buildProps(t,n=!0){const{rawCommands:r,editor:i,state:o}=this,{view:a}=i,s={tr:t,editor:i,view:a,state:X0({state:o,transaction:t}),dispatch:n?()=>{}:void 0,chain:()=>this.createChain(t,n),can:()=>this.createCan(t),get commands(){return Object.fromEntries(Object.entries(r).map(([u,c])=>[u,(...l)=>c(...l)(s)]))}};return s}}function ce(e,t,n){return e.config[t]===void 0&&e.parent?ce(e.parent,t,n):typeof e.config[t]=="function"?e.config[t].bind({...n,parent:e.parent?ce(e.parent,t,n):null}):e.config[t]}function eb(e){const t=e.filter(i=>i.type==="extension"),n=e.filter(i=>i.type==="node"),r=e.filter(i=>i.type==="mark");return{baseExtensions:t,nodeExtensions:n,markExtensions:r}}function IV(e){const t=[],{nodeExtensions:n,markExtensions:r}=eb(e),i=[...n,...r],o={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return e.forEach(a=>{const s={name:a.name,options:a.options,storage:a.storage,extensions:i},u=ce(a,"addGlobalAttributes",s);if(!u)return;u().forEach(l=>{l.types.forEach(d=>{Object.entries(l.attributes).forEach(([p,A])=>{t.push({type:d,name:p,attribute:{...o,...A}})})})})}),i.forEach(a=>{const s={name:a.name,options:a.options,storage:a.storage},u=ce(a,"addAttributes",s);if(!u)return;const c=u();Object.entries(c).forEach(([l,d])=>{const p={...o,...d};typeof(p==null?void 0:p.default)=="function"&&(p.default=p.default()),p!=null&&p.isRequired&&(p==null?void 0:p.default)===void 0&&delete p.default,t.push({type:a.name,name:l,attribute:p})})}),t}function Cn(e,t){if(typeof e=="string"){if(!t.nodes[e])throw Error(`There is no node type named '${e}'. Maybe you forgot to add the extension?`);return t.nodes[e]}return e}function Et(...e){return e.filter(t=>!!t).reduce((t,n)=>{const r={...t};return Object.entries(n).forEach(([i,o])=>{if(!r[i]){r[i]=o;return}if(i==="class"){const s=o?o.split(" "):[],u=r[i]?r[i].split(" "):[],c=s.filter(l=>!u.includes(l));r[i]=[...u,...c].join(" ")}else i==="style"?r[i]=[r[i],o].join("; "):r[i]=o}),r},{})}function RC(e,t){return t.filter(n=>n.attribute.rendered).map(n=>n.attribute.renderHTML?n.attribute.renderHTML(e.attrs)||{}:{[n.name]:e.attrs[n.name]}).reduce((n,r)=>Et(n,r),{})}function Oke(e){return typeof e=="function"}function Ue(e,t=void 0,...n){return Oke(e)?t?e.bind(t)(...n):e(...n):e}function Fke(e={}){return Object.keys(e).length===0&&e.constructor===Object}function kke(e){return typeof e!="string"?e:e.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(e):e==="true"?!0:e==="false"?!1:e}function Wk(e,t){return"style"in e?e:{...e,getAttrs:n=>{const r=e.getAttrs?e.getAttrs(n):e.attrs;if(r===!1)return!1;const i=t.reduce((o,a)=>{const s=a.attribute.parseHTML?a.attribute.parseHTML(n):kke(n.getAttribute(a.name));return s==null?o:{...o,[a.name]:s}},{});return{...r,...i}}}}function Kk(e){return Object.fromEntries(Object.entries(e).filter(([t,n])=>t==="attrs"&&Fke(n)?!1:n!=null))}function TV(e,t){var n;const r=IV(e),{nodeExtensions:i,markExtensions:o}=eb(e),a=(n=i.find(c=>ce(c,"topNode")))===null||n===void 0?void 0:n.name,s=Object.fromEntries(i.map(c=>{const l=r.filter(b=>b.type===c.name),d={name:c.name,options:c.options,storage:c.storage,editor:t},p=e.reduce((b,I)=>{const x=ce(I,"extendNodeSchema",d);return{...b,...x?x(c):{}}},{}),A=Kk({...p,content:Ue(ce(c,"content",d)),marks:Ue(ce(c,"marks",d)),group:Ue(ce(c,"group",d)),inline:Ue(ce(c,"inline",d)),atom:Ue(ce(c,"atom",d)),selectable:Ue(ce(c,"selectable",d)),draggable:Ue(ce(c,"draggable",d)),code:Ue(ce(c,"code",d)),whitespace:Ue(ce(c,"whitespace",d)),defining:Ue(ce(c,"defining",d)),isolating:Ue(ce(c,"isolating",d)),attrs:Object.fromEntries(l.map(b=>{var I;return[b.name,{default:(I=b==null?void 0:b.attribute)===null||I===void 0?void 0:I.default}]}))}),m=Ue(ce(c,"parseHTML",d));m&&(A.parseDOM=m.map(b=>Wk(b,l)));const g=ce(c,"renderHTML",d);g&&(A.toDOM=b=>g({node:b,HTMLAttributes:RC(b,l)}));const _=ce(c,"renderText",d);return _&&(A.toText=_),[c.name,A]})),u=Object.fromEntries(o.map(c=>{const l=r.filter(_=>_.type===c.name),d={name:c.name,options:c.options,storage:c.storage,editor:t},p=e.reduce((_,b)=>{const I=ce(b,"extendMarkSchema",d);return{..._,...I?I(c):{}}},{}),A=Kk({...p,inclusive:Ue(ce(c,"inclusive",d)),excludes:Ue(ce(c,"excludes",d)),group:Ue(ce(c,"group",d)),spanning:Ue(ce(c,"spanning",d)),code:Ue(ce(c,"code",d)),attrs:Object.fromEntries(l.map(_=>{var b;return[_.name,{default:(b=_==null?void 0:_.attribute)===null||b===void 0?void 0:b.default}]}))}),m=Ue(ce(c,"parseHTML",d));m&&(A.parseDOM=m.map(_=>Wk(_,l)));const g=ce(c,"renderHTML",d);return g&&(A.toDOM=_=>g({mark:_,HTMLAttributes:RC(_,l)})),[c.name,A]}));return new C8({topNode:a,nodes:s,marks:u})}function d1(e,t){return t.nodes[e]||t.marks[e]||null}function Nk(e,t){return Array.isArray(t)?t.some(n=>(typeof n=="string"?n:n.name)===e.name):t}const Mke=(e,t=500)=>{let n="";const r=e.parentOffset;return e.parent.nodesBetween(Math.max(0,r-t),r,(i,o,a,s)=>{var u,c;const l=((c=(u=i.type.spec).toText)===null||c===void 0?void 0:c.call(u,{node:i,pos:o,parent:a,index:s}))||i.textContent||"%leaf%";n+=i.isAtom&&!i.isText?l:l.slice(0,Math.max(0,r-o))}),n};function fO(e){return Object.prototype.toString.call(e)==="[object RegExp]"}class dO{constructor(t){this.find=t.find,this.handler=t.handler}}const Lke=(e,t)=>{if(fO(t))return t.exec(e);const n=t(e);if(!n)return null;const r=[n.text];return r.index=n.index,r.input=e,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(n.replaceWith)),r};function Gh(e){var t;const{editor:n,from:r,to:i,text:o,rules:a,plugin:s}=e,{view:u}=n;if(u.composing)return!1;const c=u.state.doc.resolve(r);if(c.parent.type.spec.code||!((t=c.nodeBefore||c.nodeAfter)===null||t===void 0)&&t.marks.find(p=>p.type.spec.code))return!1;let l=!1;const d=Mke(c)+o;return a.forEach(p=>{if(l)return;const A=Lke(d,p.find);if(!A)return;const m=u.state.tr,g=X0({state:u.state,transaction:m}),_={from:r-(A[0].length-o.length),to:i},{commands:b,chain:I,can:x}=new lO({editor:n,state:g});p.handler({state:g,range:_,match:A,commands:b,chain:I,can:x})===null||!m.steps.length||(m.setMeta(s,{transform:m,from:r,to:i,text:o}),u.dispatch(m),l=!0)}),l}function jke(e){const{editor:t,rules:n}=e,r=new zr({state:{init(){return null},apply(i,o){const a=i.getMeta(r);if(a)return a;const s=i.getMeta("applyInputRules");return!!s&&setTimeout(()=>{const{from:c,text:l}=s,d=c+l.length;Gh({editor:t,from:c,to:d,text:l,rules:n,plugin:r})}),i.selectionSet||i.docChanged?null:o}},props:{handleTextInput(i,o,a,s){return Gh({editor:t,from:o,to:a,text:s,rules:n,plugin:r})},handleDOMEvents:{compositionend:i=>(setTimeout(()=>{const{$cursor:o}=i.state.selection;o&&Gh({editor:t,from:o.pos,to:o.pos,text:"",rules:n,plugin:r})}),!1)},handleKeyDown(i,o){if(o.key!=="Enter")return!1;const{$cursor:a}=i.state.selection;return a?Gh({editor:t,from:a.pos,to:a.pos,text:`
44
44
  `,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function Uke(e){return typeof e=="number"}class Bke{constructor(t){this.find=t.find,this.handler=t.handler}}const Pke=(e,t,n)=>{if(fO(t))return[...e.matchAll(t)];const r=t(e,n);return r?r.map(i=>{const o=[i.text];return o.index=i.index,o.input=e,o.data=i.data,i.replaceWith&&(i.text.includes(i.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),o.push(i.replaceWith)),o}):[]};function Dke(e){const{editor:t,state:n,from:r,to:i,rule:o,pasteEvent:a,dropEvent:s}=e,{commands:u,chain:c,can:l}=new lO({editor:t,state:n}),d=[];return n.doc.nodesBetween(r,i,(A,m)=>{if(!A.isTextblock||A.type.spec.code)return;const g=Math.max(r,m),_=Math.min(i,m+A.content.size),b=A.textBetween(g-m,_-m,void 0,"");Pke(b,o.find,a).forEach(x=>{if(x.index===void 0)return;const v=g+x.index+1,S=v+x[0].length,y={from:n.tr.mapping.map(v),to:n.tr.mapping.map(S)},T=o.handler({state:n,range:y,match:x,commands:u,chain:c,can:l,pasteEvent:a,dropEvent:s});d.push(T)})}),d.every(A=>A!==null)}const Wke=e=>{var t;const n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(t=n.clipboardData)===null||t===void 0||t.setData("text/html",e),n};function Kke(e){const{editor:t,rules:n}=e;let r=null,i=!1,o=!1,a=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,s=typeof DragEvent<"u"?new DragEvent("drop"):null;const u=({state:l,from:d,to:p,rule:A,pasteEvt:m})=>{const g=l.tr,_=X0({state:l,transaction:g});if(!(!Dke({editor:t,state:_,from:Math.max(d-1,0),to:p.b-1,rule:A,pasteEvent:m,dropEvent:s})||!g.steps.length))return s=typeof DragEvent<"u"?new DragEvent("drop"):null,a=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,g};return n.map(l=>new zr({view(d){const p=A=>{var m;r=!((m=d.dom.parentElement)===null||m===void 0)&&m.contains(A.target)?d.dom.parentElement:null};return window.addEventListener("dragstart",p),{destroy(){window.removeEventListener("dragstart",p)}}},props:{handleDOMEvents:{drop:(d,p)=>(o=r===d.dom.parentElement,s=p,!1),paste:(d,p)=>{var A;const m=(A=p.clipboardData)===null||A===void 0?void 0:A.getData("text/html");return a=p,i=!!(m!=null&&m.includes("data-pm-slice")),!1}}},appendTransaction:(d,p,A)=>{const m=d[0],g=m.getMeta("uiEvent")==="paste"&&!i,_=m.getMeta("uiEvent")==="drop"&&!o,b=m.getMeta("applyPasteRules"),I=!!b;if(!g&&!_&&!I)return;if(I){const{from:S,text:y}=b,T=S+y.length,w=Wke(y);return u({rule:l,state:A,from:S,to:{b:T},pasteEvt:w})}const x=p.doc.content.findDiffStart(A.doc.content),v=p.doc.content.findDiffEnd(A.doc.content);if(!(!Uke(x)||!v||x===v.b))return u({rule:l,state:A,from:x,to:v,pasteEvt:a})}}))}function Nke(e){const t=e.filter((n,r)=>e.indexOf(n)!==r);return Array.from(new Set(t))}class dl{constructor(t,n){this.splittableMarks=[],this.editor=n,this.extensions=dl.resolve(t),this.schema=TV(this.extensions,n),this.setupExtensions()}static resolve(t){const n=dl.sort(dl.flatten(t)),r=Nke(n.map(i=>i.name));return r.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${r.map(i=>`'${i}'`).join(", ")}]. This can lead to issues.`),n}static flatten(t){return t.map(n=>{const r={name:n.name,options:n.options,storage:n.storage},i=ce(n,"addExtensions",r);return i?[n,...this.flatten(i())]:n}).flat(10)}static sort(t){return t.sort((r,i)=>{const o=ce(r,"priority")||100,a=ce(i,"priority")||100;return o>a?-1:o<a?1:0})}get commands(){return this.extensions.reduce((t,n)=>{const r={name:n.name,options:n.options,storage:n.storage,editor:this.editor,type:d1(n.name,this.schema)},i=ce(n,"addCommands",r);return i?{...t,...i()}:t},{})}get plugins(){const{editor:t}=this,n=dl.sort([...this.extensions].reverse()),r=[],i=[],o=n.map(a=>{const s={name:a.name,options:a.options,storage:a.storage,editor:t,type:d1(a.name,this.schema)},u=[],c=ce(a,"addKeyboardShortcuts",s);let l={};if(a.type==="mark"&&ce(a,"exitable",s)&&(l.ArrowRight=()=>Nc.handleExit({editor:t,mark:a})),c){const g=Object.fromEntries(Object.entries(c()).map(([_,b])=>[_,()=>b({editor:t})]));l={...l,...g}}const d=JFe(l);u.push(d);const p=ce(a,"addInputRules",s);Nk(a,t.options.enableInputRules)&&p&&r.push(...p());const A=ce(a,"addPasteRules",s);Nk(a,t.options.enablePasteRules)&&A&&i.push(...A());const m=ce(a,"addProseMirrorPlugins",s);if(m){const g=m();u.push(...g)}return u}).flat();return[jke({editor:t,rules:r}),...Kke({editor:t,rules:i}),...o]}get attributes(){return IV(this.extensions)}get nodeViews(){const{editor:t}=this,{nodeExtensions:n}=eb(this.extensions);return Object.fromEntries(n.filter(r=>!!ce(r,"addNodeView")).map(r=>{const i=this.attributes.filter(u=>u.type===r.name),o={name:r.name,options:r.options,storage:r.storage,editor:t,type:Cn(r.name,this.schema)},a=ce(r,"addNodeView",o);if(!a)return[];const s=(u,c,l,d)=>{const p=RC(u,i);return a()({editor:t,node:u,getPos:l,decorations:d,HTMLAttributes:p,extension:r})};return[r.name,s]}))}setupExtensions(){this.extensions.forEach(t=>{var n;this.editor.extensionStorage[t.name]=t.storage;const r={name:t.name,options:t.options,storage:t.storage,editor:this.editor,type:d1(t.name,this.schema)};t.type==="mark"&&(!((n=Ue(ce(t,"keepOnSplit",r)))!==null&&n!==void 0)||n)&&this.splittableMarks.push(t.name);const i=ce(t,"onBeforeCreate",r),o=ce(t,"onCreate",r),a=ce(t,"onUpdate",r),s=ce(t,"onSelectionUpdate",r),u=ce(t,"onTransaction",r),c=ce(t,"onFocus",r),l=ce(t,"onBlur",r),d=ce(t,"onDestroy",r);i&&this.editor.on("beforeCreate",i),o&&this.editor.on("create",o),a&&this.editor.on("update",a),s&&this.editor.on("selectionUpdate",s),u&&this.editor.on("transaction",u),c&&this.editor.on("focus",c),l&&this.editor.on("blur",l),d&&this.editor.on("destroy",d)})}}function qke(e){return Object.prototype.toString.call(e).slice(8,-1)}function Jh(e){return qke(e)!=="Object"?!1:e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype}function tb(e,t){const n={...e};return Jh(e)&&Jh(t)&&Object.keys(t).forEach(r=>{Jh(t[r])&&Jh(e[r])?n[r]=tb(e[r],t[r]):n[r]=t[r]}),n}class dr{constructor(t={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Ue(ce(this,"addOptions",{name:this.name}))),this.storage=Ue(ce(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new dr(t)}configure(t={}){const n=this.extend({...this.config,addOptions:()=>tb(this.options,t)});return n.name=this.name,n.parent=this.parent,n}extend(t={}){const n=new dr({...this.config,...t});return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=Ue(ce(n,"addOptions",{name:n.name})),n.storage=Ue(ce(n,"addStorage",{name:n.name,options:n.options})),n}}function Vke(e,t,n){const{from:r,to:i}=t,{blockSeparator:o=`
45
45
 
46
- `,textSerializers:a={}}=n||{};let s="";return e.nodesBetween(r,i,(u,c,l,d)=>{var p;u.isBlock&&c>r&&(s+=o);const A=a==null?void 0:a[u.type.name];if(A)return l&&(s+=A({node:u,pos:c,parent:l,index:d,range:t})),!1;u.isText&&(s+=(p=u==null?void 0:u.text)===null||p===void 0?void 0:p.slice(Math.max(r,c)-c,i-c))}),s}function Qke(e){return Object.fromEntries(Object.entries(e.nodes).filter(([,t])=>t.spec.toText).map(([t,n])=>[t,n.spec.toText]))}dr.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new zr({key:new eo("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:e}=this,{state:t,schema:n}=e,{doc:r,selection:i}=t,{ranges:o}=i,a=Math.min(...o.map(l=>l.$from.pos)),s=Math.max(...o.map(l=>l.$to.pos)),u=Qke(n);return Vke(r,{from:a,to:s},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:u})}}})]}});const zke=()=>({editor:e,view:t})=>(requestAnimationFrame(()=>{var n;e.isDestroyed||(t.dom.blur(),(n=window==null?void 0:window.getSelection())===null||n===void 0||n.removeAllRanges())}),!0),Hke=(e=!1)=>({commands:t})=>t.setContent("",e),Yke=()=>({state:e,tr:t,dispatch:n})=>{const{selection:r}=t,{ranges:i}=r;return n&&i.forEach(({$from:o,$to:a})=>{e.doc.nodesBetween(o.pos,a.pos,(s,u)=>{if(s.type.isText)return;const{doc:c,mapping:l}=t,d=c.resolve(l.map(u)),p=c.resolve(l.map(u+s.nodeSize)),A=d.blockRange(p);if(!A)return;const m=nke(A);if(s.type.isTextblock){const{defaultType:g}=d.parent.contentMatchAt(d.index());t.setNodeMarkup(A.start,g)}(m||m===0)&&t.lift(A,m)})}),!0},Gke=e=>t=>e(t),Jke=()=>({state:e,dispatch:t})=>vke(e,t),Zke=(e,t)=>({editor:n,tr:r})=>{const{state:i}=n,o=i.doc.slice(e.from,e.to);r.deleteRange(e.from,e.to);const a=r.mapping.map(t);return r.insert(a,o.content),r.setSelection(new Be(r.doc.resolve(a-1))),!0},Xke=()=>({tr:e,dispatch:t})=>{const{selection:n}=e,r=n.$anchor.node();if(r.content.size>0)return!1;const i=e.selection.$anchor;for(let o=i.depth;o>0;o-=1)if(i.node(o).type===r.type){if(t){const s=i.before(o),u=i.after(o);e.delete(s,u).scrollIntoView()}return!0}return!1},eMe=e=>({tr:t,state:n,dispatch:r})=>{const i=Cn(e,n.schema),o=t.selection.$anchor;for(let a=o.depth;a>0;a-=1)if(o.node(a).type===i){if(r){const u=o.before(a),c=o.after(a);t.delete(u,c).scrollIntoView()}return!0}return!1},tMe=e=>({tr:t,dispatch:n})=>{const{from:r,to:i}=e;return n&&t.delete(r,i),!0},nMe=()=>({state:e,dispatch:t})=>ake(e,t),rMe=()=>({commands:e})=>e.keyboardShortcut("Enter"),iMe=()=>({state:e,dispatch:t})=>gke(e,t);function ig(e,t,n={strict:!0}){const r=Object.keys(t);return r.length?r.every(i=>n.strict?t[i]===e[i]:fO(t[i])?t[i].test(e[i]):t[i]===e[i]):!0}function OC(e,t,n={}){return e.find(r=>r.type===t&&ig(r.attrs,n))}function oMe(e,t,n={}){return!!OC(e,t,n)}function pO(e,t,n={}){if(!e||!t)return;let r=e.parent.childAfter(e.parentOffset);if(e.parentOffset===r.offset&&r.offset!==0&&(r=e.parent.childBefore(e.parentOffset)),!r.node)return;const i=OC([...r.node.marks],t,n);if(!i)return;let o=r.index,a=e.start()+r.offset,s=o+1,u=a+r.node.nodeSize;for(OC([...r.node.marks],t,n);o>0&&i.isInSet(e.parent.child(o-1).marks);)o-=1,a-=e.parent.child(o).nodeSize;for(;s<e.parent.childCount&&oMe([...e.parent.child(s).marks],t,n);)u+=e.parent.child(s).nodeSize,s+=1;return{from:a,to:u}}function Hs(e,t){if(typeof e=="string"){if(!t.marks[e])throw Error(`There is no mark type named '${e}'. Maybe you forgot to add the extension?`);return t.marks[e]}return e}const aMe=(e,t={})=>({tr:n,state:r,dispatch:i})=>{const o=Hs(e,r.schema),{doc:a,selection:s}=n,{$from:u,from:c,to:l}=s;if(i){const d=pO(u,o,t);if(d&&d.from<=c&&d.to>=l){const p=Be.create(a,d.from,d.to);n.setSelection(p)}}return!0},sMe=e=>t=>{const n=typeof e=="function"?e(t):e;for(let r=0;r<n.length;r+=1)if(n[r](t))return!0;return!1};function AO(e){return e instanceof Be}function Jo(e=0,t=0,n=0){return Math.min(Math.max(e,t),n)}function uMe(e,t=null){if(!t)return null;const n=ze.atStart(e),r=ze.atEnd(e);if(t==="start"||t===!0)return n;if(t==="end")return r;const i=n.from,o=r.to;return t==="all"?Be.create(e,Jo(0,i,o),Jo(e.content.size,i,o)):Be.create(e,Jo(t,i,o),Jo(t,i,o))}function nb(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}const cMe=(e=null,t={})=>({editor:n,view:r,tr:i,dispatch:o})=>{t={scrollIntoView:!0,...t};const a=()=>{nb()&&r.dom.focus(),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),t!=null&&t.scrollIntoView&&n.commands.scrollIntoView())})};if(r.hasFocus()&&e===null||e===!1)return!0;if(o&&e===null&&!AO(n.state.selection))return a(),!0;const s=uMe(i.doc,e)||n.state.selection,u=n.state.selection.eq(s);return o&&(u||i.setSelection(s),u&&i.storedMarks&&i.setStoredMarks(i.storedMarks),a()),!0},lMe=(e,t)=>n=>e.every((r,i)=>t(r,{...n,index:i})),fMe=(e,t)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},e,t),xV=e=>{const t=e.childNodes;for(let n=t.length-1;n>=0;n-=1){const r=t[n];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?e.removeChild(r):r.nodeType===1&&xV(r)}return e};function Zh(e){const t=`<body>${e}</body>`,n=new window.DOMParser().parseFromString(t,"text/html").body;return xV(n)}function og(e,t,n){n={slice:!0,parseOptions:{},...n};const r=typeof e=="object"&&e!==null,i=typeof e=="string";if(r)try{if(Array.isArray(e)&&e.length>0)return X.fromArray(e.map(s=>t.nodeFromJSON(s)));const a=t.nodeFromJSON(e);return n.errorOnInvalidContent&&a.check(),a}catch(o){if(n.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:o});return console.warn("[tiptap warn]: Invalid content.","Passed value:",e,"Error:",o),og("",t,n)}if(i){if(n.errorOnInvalidContent){let a=!1,s="";const u=new C8({topNode:t.spec.topNode,marks:t.spec.marks,nodes:t.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:c=>(a=!0,s=typeof c=="string"?c:c.outerHTML,null)}]}})});if(n.slice?hu.fromSchema(u).parseSlice(Zh(e),n.parseOptions):hu.fromSchema(u).parse(Zh(e),n.parseOptions),n.errorOnInvalidContent&&a)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${s}`)})}const o=hu.fromSchema(t);return n.slice?o.parseSlice(Zh(e),n.parseOptions).content:o.parse(Zh(e),n.parseOptions)}return og("",t,n)}function dMe(e,t,n){const r=e.steps.length-1;if(r<t)return;const i=e.steps[r];if(!(i instanceof zo||i instanceof gl))return;const o=e.mapping.maps[r];let a=0;o.forEach((s,u,c,l)=>{a===0&&(a=l)}),e.setSelection(ze.near(e.doc.resolve(a),n))}const pMe=e=>!("type"in e),AMe=(e,t,n)=>({tr:r,dispatch:i,editor:o})=>{var a;if(i){n={parseOptions:{},updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let s;try{s=og(t,o.schema,{parseOptions:{preserveWhitespace:"full",...n.parseOptions},errorOnInvalidContent:(a=n.errorOnInvalidContent)!==null&&a!==void 0?a:o.options.enableContentCheck})}catch(m){return o.emit("contentError",{editor:o,error:m,disableCollaboration:()=>{console.error("[tiptap error]: Unable to disable collaboration at this point in time")}}),!1}let{from:u,to:c}=typeof e=="number"?{from:e,to:e}:{from:e.from,to:e.to},l=!0,d=!0;if((pMe(s)?s:[s]).forEach(m=>{m.check(),l=l?m.isText&&m.marks.length===0:!1,d=d?m.isBlock:!1}),u===c&&d){const{parent:m}=r.doc.resolve(u);m.isTextblock&&!m.type.spec.code&&!m.childCount&&(u-=1,c+=1)}let A;l?(Array.isArray(t)?A=t.map(m=>m.text||"").join(""):typeof t=="object"&&t&&t.text?A=t.text:A=t,r.insertText(A,u,c)):(A=s,r.replaceWith(u,c,A)),n.updateSelection&&dMe(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta("applyInputRules",{from:u,text:A}),n.applyPasteRules&&r.setMeta("applyPasteRules",{from:u,text:A})}return!0},hMe=()=>({state:e,dispatch:t})=>pke(e,t),mMe=()=>({state:e,dispatch:t})=>Ake(e,t),gMe=()=>({state:e,dispatch:t})=>ske(e,t),vMe=()=>({state:e,dispatch:t})=>fke(e,t),yMe=()=>({state:e,dispatch:t,tr:n})=>{try{const r=gV(e.doc,e.selection.$from.pos,-1);return r==null?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}},bMe=()=>({state:e,dispatch:t,tr:n})=>{try{const r=gV(e.doc,e.selection.$from.pos,1);return r==null?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}},CMe=()=>({state:e,dispatch:t})=>uke(e,t),SMe=()=>({state:e,dispatch:t})=>cke(e,t);function wV(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function _Me(e){const t=e.split(/-(?!$)/);let n=t[t.length-1];n==="Space"&&(n=" ");let r,i,o,a;for(let s=0;s<t.length-1;s+=1){const u=t[s];if(/^(cmd|meta|m)$/i.test(u))a=!0;else if(/^a(lt)?$/i.test(u))r=!0;else if(/^(c|ctrl|control)$/i.test(u))i=!0;else if(/^s(hift)?$/i.test(u))o=!0;else if(/^mod$/i.test(u))nb()||wV()?a=!0:i=!0;else throw new Error(`Unrecognized modifier name: ${u}`)}return r&&(n=`Alt-${n}`),i&&(n=`Ctrl-${n}`),a&&(n=`Meta-${n}`),o&&(n=`Shift-${n}`),n}const IMe=e=>({editor:t,view:n,tr:r,dispatch:i})=>{const o=_Me(e).split(/-(?!$)/),a=o.find(c=>!["Alt","Ctrl","Meta","Shift"].includes(c)),s=new KeyboardEvent("keydown",{key:a==="Space"?" ":a,altKey:o.includes("Alt"),ctrlKey:o.includes("Ctrl"),metaKey:o.includes("Meta"),shiftKey:o.includes("Shift"),bubbles:!0,cancelable:!0}),u=t.captureTransaction(()=>{n.someProp("handleKeyDown",c=>c(n,s))});return u==null||u.steps.forEach(c=>{const l=c.map(r.mapping);l&&i&&r.maybeStep(l)}),!0};function hO(e,t,n={}){const{from:r,to:i,empty:o}=e.selection,a=t?Cn(t,e.schema):null,s=[];e.doc.nodesBetween(r,i,(d,p)=>{if(d.isText)return;const A=Math.max(r,p),m=Math.min(i,p+d.nodeSize);s.push({node:d,from:A,to:m})});const u=i-r,c=s.filter(d=>a?a.name===d.node.type.name:!0).filter(d=>ig(d.node.attrs,n,{strict:!1}));return o?!!c.length:c.reduce((d,p)=>d+p.to-p.from,0)>=u}const TMe=(e,t={})=>({state:n,dispatch:r})=>{const i=Cn(e,n.schema);return hO(n,i,t)?hke(n,r):!1},xMe=()=>({state:e,dispatch:t})=>yke(e,t),wMe=e=>({state:t,dispatch:n})=>{const r=Cn(e,t.schema);return wke(r)(t,n)},EMe=()=>({state:e,dispatch:t})=>mke(e,t);function EV(e,t){return t.nodes[e]?"node":t.marks[e]?"mark":null}function qk(e,t){const n=typeof t=="string"?[t]:t;return Object.keys(e).reduce((r,i)=>(n.includes(i)||(r[i]=e[i]),r),{})}const $Me=(e,t)=>({tr:n,state:r,dispatch:i})=>{let o=null,a=null;const s=EV(typeof e=="string"?e:e.name,r.schema);return s?(s==="node"&&(o=Cn(e,r.schema)),s==="mark"&&(a=Hs(e,r.schema)),i&&n.selection.ranges.forEach(u=>{r.doc.nodesBetween(u.$from.pos,u.$to.pos,(c,l)=>{o&&o===c.type&&n.setNodeMarkup(l,void 0,qk(c.attrs,t)),a&&c.marks.length&&c.marks.forEach(d=>{a===d.type&&n.addMark(l,l+c.nodeSize,a.create(qk(d.attrs,t)))})})}),!0):!1},RMe=()=>({tr:e,dispatch:t})=>(t&&e.scrollIntoView(),!0),OMe=()=>({tr:e,commands:t})=>t.setTextSelection({from:0,to:e.doc.content.size}),FMe=()=>({state:e,dispatch:t})=>lke(e,t),kMe=()=>({state:e,dispatch:t})=>dke(e,t),MMe=()=>({state:e,dispatch:t})=>bke(e,t),LMe=()=>({state:e,dispatch:t})=>_ke(e,t),jMe=()=>({state:e,dispatch:t})=>Ske(e,t);function UMe(e,t,n={},r={}){return og(e,t,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}const BMe=(e,t=!1,n={},r={})=>({editor:i,tr:o,dispatch:a,commands:s})=>{var u,c;const{doc:l}=o;if(n.preserveWhitespace!=="full"){const d=UMe(e,i.schema,n,{errorOnInvalidContent:(u=r.errorOnInvalidContent)!==null&&u!==void 0?u:i.options.enableContentCheck});return a&&o.replaceWith(0,l.content.size,d).setMeta("preventUpdate",!t),!0}return a&&o.setMeta("preventUpdate",!t),s.insertContentAt({from:0,to:l.content.size},e,{parseOptions:n,errorOnInvalidContent:(c=r.errorOnInvalidContent)!==null&&c!==void 0?c:i.options.enableContentCheck})};function mO(e,t){const n=Hs(t,e.schema),{from:r,to:i,empty:o}=e.selection,a=[];o?(e.storedMarks&&a.push(...e.storedMarks),a.push(...e.selection.$head.marks())):e.doc.nodesBetween(r,i,u=>{a.push(...u.marks)});const s=a.find(u=>u.type.name===n.name);return s?{...s.attrs}:{}}function PMe(e){for(let t=0;t<e.edgeCount;t+=1){const{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}function DMe(e,t){for(let n=e.depth;n>0;n-=1){const r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}}function gO(e){return t=>DMe(t.$from,e)}function WMe(e,t){const n=dl.resolve(e);return TV(n,t)}function $V(e,t,n){const r=[];return e===t?n.resolve(e).marks().forEach(i=>{const o=n.resolve(e),a=pO(o,i.type);a&&r.push({mark:i,...a})}):n.nodesBetween(e,t,(i,o)=>{!i||(i==null?void 0:i.nodeSize)===void 0||r.push(...i.marks.map(a=>({from:o,to:o+i.nodeSize,mark:a})))}),r}function fm(e,t,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{const i=e.find(o=>o.type===t&&o.name===r);return i?i.attribute.keepOnSplit:!1}))}function KMe(e,t,n={}){const{empty:r,ranges:i}=e.selection,o=t?Hs(t,e.schema):null;if(r)return!!(e.storedMarks||e.selection.$from.marks()).filter(d=>o?o.name===d.type.name:!0).find(d=>ig(d.attrs,n,{strict:!1}));let a=0;const s=[];if(i.forEach(({$from:d,$to:p})=>{const A=d.pos,m=p.pos;e.doc.nodesBetween(A,m,(g,_)=>{if(!g.isText&&!g.marks.length)return;const b=Math.max(A,_),I=Math.min(m,_+g.nodeSize),x=I-b;a+=x,s.push(...g.marks.map(v=>({mark:v,from:b,to:I})))})}),a===0)return!1;const u=s.filter(d=>o?o.name===d.mark.type.name:!0).filter(d=>ig(d.mark.attrs,n,{strict:!1})).reduce((d,p)=>d+p.to-p.from,0),c=s.filter(d=>o?d.mark.type!==o&&d.mark.type.excludes(o):!0).reduce((d,p)=>d+p.to-p.from,0);return(u>0?u+c:u)>=a}function Vk(e,t){const{nodeExtensions:n}=eb(t),r=n.find(a=>a.name===e);if(!r)return!1;const i={name:r.name,options:r.options,storage:r.storage},o=Ue(ce(r,"group",i));return typeof o!="string"?!1:o.split(" ").includes("list")}function RV(e,{checkChildren:t=!0,ignoreWhitespace:n=!1}={}){var r;if(n){if(e.type.name==="hardBreak")return!0;if(e.isText)return/^\s*$/m.test((r=e.text)!==null&&r!==void 0?r:"")}if(e.isText)return!e.text;if(e.isAtom||e.isLeaf)return!1;if(e.content.childCount===0)return!0;if(t){let i=!0;return e.content.forEach(o=>{i!==!1&&(RV(o,{ignoreWhitespace:n,checkChildren:t})||(i=!1))}),i}return!1}function NMe(e){return e instanceof ve}function qMe(e,t,n){const i=e.state.doc.content.size,o=Jo(t,0,i),a=Jo(n,0,i),s=e.coordsAtPos(o),u=e.coordsAtPos(a,-1),c=Math.min(s.top,u.top),l=Math.max(s.bottom,u.bottom),d=Math.min(s.left,u.left),p=Math.max(s.right,u.right),A=p-d,m=l-c,b={top:c,bottom:l,left:d,right:p,width:A,height:m,x:d,y:c};return{...b,toJSON:()=>b}}function VMe(e,t,n){var r;const{selection:i}=t;let o=null;if(AO(i)&&(o=i.$cursor),o){const s=(r=e.storedMarks)!==null&&r!==void 0?r:o.marks();return!!n.isInSet(s)||!s.some(u=>u.type.excludes(n))}const{ranges:a}=i;return a.some(({$from:s,$to:u})=>{let c=s.depth===0?e.doc.inlineContent&&e.doc.type.allowsMarkType(n):!1;return e.doc.nodesBetween(s.pos,u.pos,(l,d,p)=>{if(c)return!1;if(l.isInline){const A=!p||p.type.allowsMarkType(n),m=!!n.isInSet(l.marks)||!l.marks.some(g=>g.type.excludes(n));c=A&&m}return!c}),c})}const QMe=(e,t={})=>({tr:n,state:r,dispatch:i})=>{const{selection:o}=n,{empty:a,ranges:s}=o,u=Hs(e,r.schema);if(i)if(a){const c=mO(r,u);n.addStoredMark(u.create({...c,...t}))}else s.forEach(c=>{const l=c.$from.pos,d=c.$to.pos;r.doc.nodesBetween(l,d,(p,A)=>{const m=Math.max(A,l),g=Math.min(A+p.nodeSize,d);p.marks.find(b=>b.type===u)?p.marks.forEach(b=>{u===b.type&&n.addMark(m,g,u.create({...b.attrs,...t}))}):n.addMark(m,g,u.create(t))})});return VMe(r,n,u)},zMe=(e,t)=>({tr:n})=>(n.setMeta(e,t),!0),HMe=(e,t={})=>({state:n,dispatch:r,chain:i})=>{const o=Cn(e,n.schema);return o.isTextblock?i().command(({commands:a})=>Dk(o,t)(n)?!0:a.clearNodes()).command(({state:a})=>Dk(o,t)(a,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},YMe=e=>({tr:t,dispatch:n})=>{if(n){const{doc:r}=t,i=Jo(e,0,r.content.size),o=ve.create(r,i);t.setSelection(o)}return!0},GMe=e=>({tr:t,dispatch:n})=>{if(n){const{doc:r}=t,{from:i,to:o}=typeof e=="number"?{from:e,to:e}:e,a=Be.atStart(r).from,s=Be.atEnd(r).to,u=Jo(i,a,s),c=Jo(o,a,s),l=Be.create(r,u,c);t.setSelection(l)}return!0},JMe=e=>({state:t,dispatch:n})=>{const r=Cn(e,t.schema);return Rke(r)(t,n)};function Qk(e,t){const n=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(n){const r=n.filter(i=>t==null?void 0:t.includes(i.type.name));e.tr.ensureMarks(r)}}const ZMe=({keepMarks:e=!0}={})=>({tr:t,state:n,dispatch:r,editor:i})=>{const{selection:o,doc:a}=t,{$from:s,$to:u}=o,c=i.extensionManager.attributes,l=fm(c,s.node().type.name,s.node().attrs);if(o instanceof ve&&o.node.isBlock)return!s.parentOffset||!lm(a,s.pos)?!1:(r&&(e&&Qk(n,i.extensionManager.splittableMarks),t.split(s.pos).scrollIntoView()),!0);if(!s.parent.isBlock)return!1;const d=u.parentOffset===u.parent.content.size,p=s.depth===0?void 0:PMe(s.node(-1).contentMatchAt(s.indexAfter(-1)));let A=d&&p?[{type:p,attrs:l}]:void 0,m=lm(t.doc,t.mapping.map(s.pos),1,A);if(!A&&!m&&lm(t.doc,t.mapping.map(s.pos),1,p?[{type:p}]:void 0)&&(m=!0,A=p?[{type:p,attrs:l}]:void 0),r){if(m&&(o instanceof Be&&t.deleteSelection(),t.split(t.mapping.map(s.pos),1,A),p&&!d&&!s.parentOffset&&s.parent.type!==p)){const g=t.mapping.map(s.before()),_=t.doc.resolve(g);s.node(-1).canReplaceWith(_.index(),_.index()+1,p)&&t.setNodeMarkup(t.mapping.map(s.before()),p)}e&&Qk(n,i.extensionManager.splittableMarks),t.scrollIntoView()}return m},XMe=(e,t={})=>({tr:n,state:r,dispatch:i,editor:o})=>{var a;const s=Cn(e,r.schema),{$from:u,$to:c}=r.selection,l=r.selection.node;if(l&&l.isBlock||u.depth<2||!u.sameParent(c))return!1;const d=u.node(-1);if(d.type!==s)return!1;const p=o.extensionManager.attributes;if(u.parent.content.size===0&&u.node(-1).childCount===u.indexAfter(-1)){if(u.depth===2||u.node(-3).type!==s||u.index(-2)!==u.node(-2).childCount-1)return!1;if(i){let b=X.empty;const I=u.index(-1)?1:u.index(-2)?2:3;for(let w=u.depth-I;w>=u.depth-3;w-=1)b=X.from(u.node(w).copy(b));const x=u.indexAfter(-1)<u.node(-2).childCount?1:u.indexAfter(-2)<u.node(-3).childCount?2:3,v={...fm(p,u.node().type.name,u.node().attrs),...t},S=((a=s.contentMatch.defaultType)===null||a===void 0?void 0:a.createAndFill(v))||void 0;b=b.append(X.from(s.createAndFill(null,S)||void 0));const y=u.before(u.depth-(I-1));n.replace(y,u.after(-x),new ae(b,4-I,0));let T=-1;n.doc.nodesBetween(y,n.doc.content.size,(w,O)=>{if(T>-1)return!1;w.isTextblock&&w.content.size===0&&(T=O+1)}),T>-1&&n.setSelection(Be.near(n.doc.resolve(T))),n.scrollIntoView()}return!0}const A=c.pos===u.end()?d.contentMatchAt(0).defaultType:null,m={...fm(p,d.type.name,d.attrs),...t},g={...fm(p,u.node().type.name,u.node().attrs),...t};n.delete(u.pos,c.pos);const _=A?[{type:s,attrs:m},{type:A,attrs:g}]:[{type:s,attrs:m}];if(!lm(n.doc,u.pos,2))return!1;if(i){const{selection:b,storedMarks:I}=r,{splittableMarks:x}=o.extensionManager,v=I||b.$to.parentOffset&&b.$from.marks();if(n.split(u.pos,2,_).scrollIntoView(),!v||!i)return!0;const S=v.filter(y=>x.includes(y.type.name));n.ensureMarks(S)}return!0},p1=(e,t)=>{const n=gO(a=>a.type===t)(e.selection);if(!n)return!0;const r=e.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(r===void 0)return!0;const i=e.doc.nodeAt(r);return n.node.type===(i==null?void 0:i.type)&&sO(e.doc,n.pos)&&e.join(n.pos),!0},A1=(e,t)=>{const n=gO(a=>a.type===t)(e.selection);if(!n)return!0;const r=e.doc.resolve(n.start).after(n.depth);if(r===void 0)return!0;const i=e.doc.nodeAt(r);return n.node.type===(i==null?void 0:i.type)&&sO(e.doc,r)&&e.join(r),!0},eLe=(e,t,n,r={})=>({editor:i,tr:o,state:a,dispatch:s,chain:u,commands:c,can:l})=>{const{extensions:d,splittableMarks:p}=i.extensionManager,A=Cn(e,a.schema),m=Cn(t,a.schema),{selection:g,storedMarks:_}=a,{$from:b,$to:I}=g,x=b.blockRange(I),v=_||g.$to.parentOffset&&g.$from.marks();if(!x)return!1;const S=gO(y=>Vk(y.type.name,d))(g);if(x.depth>=1&&S&&x.depth-S.depth<=1){if(S.node.type===A)return c.liftListItem(m);if(Vk(S.node.type.name,d)&&A.validContent(S.node.content)&&s)return u().command(()=>(o.setNodeMarkup(S.pos,A),!0)).command(()=>p1(o,A)).command(()=>A1(o,A)).run()}return!n||!v||!s?u().command(()=>l().wrapInList(A,r)?!0:c.clearNodes()).wrapInList(A,r).command(()=>p1(o,A)).command(()=>A1(o,A)).run():u().command(()=>{const y=l().wrapInList(A,r),T=v.filter(w=>p.includes(w.type.name));return o.ensureMarks(T),y?!0:c.clearNodes()}).wrapInList(A,r).command(()=>p1(o,A)).command(()=>A1(o,A)).run()},tLe=(e,t={},n={})=>({state:r,commands:i})=>{const{extendEmptyMarkRange:o=!1}=n,a=Hs(e,r.schema);return KMe(r,a,t)?i.unsetMark(a,{extendEmptyMarkRange:o}):i.setMark(a,t)},nLe=(e,t,n={})=>({state:r,commands:i})=>{const o=Cn(e,r.schema),a=Cn(t,r.schema);return hO(r,o,n)?i.setNode(a):i.setNode(o,n)},rLe=(e,t={})=>({state:n,commands:r})=>{const i=Cn(e,n.schema);return hO(n,i,t)?r.lift(i):r.wrapIn(i,t)},iLe=()=>({state:e,dispatch:t})=>{const n=e.plugins;for(let r=0;r<n.length;r+=1){const i=n[r];let o;if(i.spec.isInputRules&&(o=i.getState(e))){if(t){const a=e.tr,s=o.transform;for(let u=s.steps.length-1;u>=0;u-=1)a.step(s.steps[u].invert(s.docs[u]));if(o.text){const u=a.doc.resolve(o.from).marks();a.replaceWith(o.from,o.to,e.schema.text(o.text,u))}else a.delete(o.from,o.to)}return!0}}return!1},oLe=()=>({tr:e,dispatch:t})=>{const{selection:n}=e,{empty:r,ranges:i}=n;return r||t&&i.forEach(o=>{e.removeMark(o.$from.pos,o.$to.pos)}),!0},aLe=(e,t={})=>({tr:n,state:r,dispatch:i})=>{var o;const{extendEmptyMarkRange:a=!1}=t,{selection:s}=n,u=Hs(e,r.schema),{$from:c,empty:l,ranges:d}=s;if(!i)return!0;if(l&&a){let{from:p,to:A}=s;const m=(o=c.marks().find(_=>_.type===u))===null||o===void 0?void 0:o.attrs,g=pO(c,u,m);g&&(p=g.from,A=g.to),n.removeMark(p,A,u)}else d.forEach(p=>{n.removeMark(p.$from.pos,p.$to.pos,u)});return n.removeStoredMark(u),!0},sLe=(e,t={})=>({tr:n,state:r,dispatch:i})=>{let o=null,a=null;const s=EV(typeof e=="string"?e:e.name,r.schema);return s?(s==="node"&&(o=Cn(e,r.schema)),s==="mark"&&(a=Hs(e,r.schema)),i&&n.selection.ranges.forEach(u=>{const c=u.$from.pos,l=u.$to.pos;r.doc.nodesBetween(c,l,(d,p)=>{o&&o===d.type&&n.setNodeMarkup(p,void 0,{...d.attrs,...t}),a&&d.marks.length&&d.marks.forEach(A=>{if(a===A.type){const m=Math.max(p,c),g=Math.min(p+d.nodeSize,l);n.addMark(m,g,a.create({...A.attrs,...t}))}})})}),!0):!1},uLe=(e,t={})=>({state:n,dispatch:r})=>{const i=Cn(e,n.schema);return Ike(i,t)(n,r)},cLe=(e,t={})=>({state:n,dispatch:r})=>{const i=Cn(e,n.schema);return Tke(i,t)(n,r)};var lLe=Object.freeze({__proto__:null,blur:zke,clearContent:Hke,clearNodes:Yke,command:Gke,createParagraphNear:Jke,cut:Zke,deleteCurrentNode:Xke,deleteNode:eMe,deleteRange:tMe,deleteSelection:nMe,enter:rMe,exitCode:iMe,extendMarkRange:aMe,first:sMe,focus:cMe,forEach:lMe,insertContent:fMe,insertContentAt:AMe,joinBackward:gMe,joinDown:mMe,joinForward:vMe,joinItemBackward:yMe,joinItemForward:bMe,joinTextblockBackward:CMe,joinTextblockForward:SMe,joinUp:hMe,keyboardShortcut:IMe,lift:TMe,liftEmptyBlock:xMe,liftListItem:wMe,newlineInCode:EMe,resetAttributes:$Me,scrollIntoView:RMe,selectAll:OMe,selectNodeBackward:FMe,selectNodeForward:kMe,selectParentNode:MMe,selectTextblockEnd:LMe,selectTextblockStart:jMe,setContent:BMe,setMark:QMe,setMeta:zMe,setNode:HMe,setNodeSelection:YMe,setTextSelection:GMe,sinkListItem:JMe,splitBlock:ZMe,splitListItem:XMe,toggleList:eLe,toggleMark:tLe,toggleNode:nLe,toggleWrap:rLe,undoInputRule:iLe,unsetAllMarks:oLe,unsetMark:aLe,updateAttributes:sLe,wrapIn:uLe,wrapInList:cLe});dr.create({name:"commands",addCommands(){return{...lLe}}});dr.create({name:"editable",addProseMirrorPlugins(){return[new zr({key:new eo("editable"),props:{editable:()=>this.editor.options.editable}})]}});dr.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:e}=this;return[new zr({key:new eo("focusEvents"),props:{handleDOMEvents:{focus:(t,n)=>{e.isFocused=!0;const r=e.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1},blur:(t,n)=>{e.isFocused=!1;const r=e.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1}}}})]}});dr.create({name:"keymap",addKeyboardShortcuts(){const e=()=>this.editor.commands.first(({commands:a})=>[()=>a.undoInputRule(),()=>a.command(({tr:s})=>{const{selection:u,doc:c}=s,{empty:l,$anchor:d}=u,{pos:p,parent:A}=d,m=d.parent.isTextblock&&p>0?s.doc.resolve(p-1):d,g=m.parent.type.spec.isolating,_=d.pos-d.parentOffset,b=g&&m.parent.childCount===1?_===d.pos:ze.atStart(c).from===p;return!l||!A.type.isTextblock||A.textContent.length||!b||b&&d.parent.type.name==="paragraph"?!1:a.clearNodes()}),()=>a.deleteSelection(),()=>a.joinBackward(),()=>a.selectNodeBackward()]),t=()=>this.editor.commands.first(({commands:a})=>[()=>a.deleteSelection(),()=>a.deleteCurrentNode(),()=>a.joinForward(),()=>a.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:a})=>[()=>a.newlineInCode(),()=>a.createParagraphNear(),()=>a.liftEmptyBlock(),()=>a.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:e,"Mod-Backspace":e,"Shift-Backspace":e,Delete:t,"Mod-Delete":t,"Mod-a":()=>this.editor.commands.selectAll()},i={...r},o={...r,"Ctrl-h":e,"Alt-Backspace":e,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return nb()||wV()?o:i},addProseMirrorPlugins(){return[new zr({key:new eo("clearDocument"),appendTransaction:(e,t,n)=>{if(!(e.some(m=>m.docChanged)&&!t.doc.eq(n.doc)))return;const{empty:i,from:o,to:a}=t.selection,s=ze.atStart(t.doc).from,u=ze.atEnd(t.doc).to;if(i||!(o===s&&a===u)||!(n.doc.textBetween(0,n.doc.content.size," "," ").length===0))return;const d=n.tr,p=X0({state:n,transaction:d}),{commands:A}=new lO({editor:this.editor,state:p});if(A.clearNodes(),!!d.steps.length)return d}})]}});dr.create({name:"tabindex",addProseMirrorPlugins(){return[new zr({key:new eo("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}});function ag(e){return new dO({find:e.find,handler:({state:t,range:n,match:r})=>{const i=Ue(e.getAttributes,void 0,r);if(i===!1||i===null)return null;const{tr:o}=t,a=r[r.length-1],s=r[0];if(a){const u=s.search(/\S/),c=n.from+s.indexOf(a),l=c+a.length;if($V(n.from,n.to,t.doc).filter(A=>A.mark.type.excluded.find(g=>g===e.type&&g!==A.mark.type)).filter(A=>A.to>c).length)return null;l<n.to&&o.delete(l,n.to),c>n.from&&o.delete(n.from+u,c);const p=n.from+u+a.length;o.addMark(n.from+u,p,e.type.create(i||{})),o.removeStoredMark(e.type)}}})}function FC(e){return new dO({find:e.find,handler:({state:t,range:n,match:r})=>{const i=t.doc.resolve(n.from),o=Ue(e.getAttributes,void 0,r)||{};if(!i.node(-1).canReplaceWith(i.index(-1),i.indexAfter(-1),e.type))return null;t.tr.delete(n.from,n.to).setBlockType(n.from,n.from,e.type,o)}})}function sg(e){return new dO({find:e.find,handler:({state:t,range:n,match:r,chain:i})=>{const o=Ue(e.getAttributes,void 0,r)||{},a=t.tr.delete(n.from,n.to),u=a.doc.resolve(n.from).blockRange(),c=u&&rke(u,e.type,o);if(!c)return null;if(a.wrap(u,c),e.keepMarks&&e.editor){const{selection:d,storedMarks:p}=t,{splittableMarks:A}=e.editor.extensionManager,m=p||d.$to.parentOffset&&d.$from.marks();if(m){const g=m.filter(_=>A.includes(_.type.name));a.ensureMarks(g)}}if(e.keepAttributes){const d=e.type.name==="bulletList"||e.type.name==="orderedList"?"listItem":"taskList";i().updateAttributes(d,o).run()}const l=a.doc.resolve(n.from-1).nodeBefore;l&&l.type===e.type&&sO(a.doc,n.from-1)&&(!e.joinPredicate||e.joinPredicate(r,l))&&a.join(n.from-1)}})}let Nc=class kC{constructor(t={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Ue(ce(this,"addOptions",{name:this.name}))),this.storage=Ue(ce(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new kC(t)}configure(t={}){const n=this.extend({...this.config,addOptions:()=>tb(this.options,t)});return n.name=this.name,n.parent=this.parent,n}extend(t={}){const n=new kC(t);return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=Ue(ce(n,"addOptions",{name:n.name})),n.storage=Ue(ce(n,"addStorage",{name:n.name,options:n.options})),n}static handleExit({editor:t,mark:n}){const{tr:r}=t.state,i=t.state.selection.$from;if(i.pos===i.end()){const a=i.marks();if(!!!a.find(c=>(c==null?void 0:c.type.name)===n.name))return!1;const u=a.find(c=>(c==null?void 0:c.type.name)===n.name);return u&&r.removeStoredMark(u),r.insertText(" ",i.pos),t.view.dispatch(r),!0}return!1}};class jn{constructor(t={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Ue(ce(this,"addOptions",{name:this.name}))),this.storage=Ue(ce(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new jn(t)}configure(t={}){const n=this.extend({...this.config,addOptions:()=>tb(this.options,t)});return n.name=this.name,n.parent=this.parent,n}extend(t={}){const n=new jn(t);return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=Ue(ce(n,"addOptions",{name:n.name})),n.storage=Ue(ce(n,"addStorage",{name:n.name,options:n.options})),n}}function fLe(){return navigator.platform==="Android"||/android/i.test(navigator.userAgent)}class dLe{constructor(t,n,r){this.isDragging=!1,this.component=t,this.editor=n.editor,this.options={stopEvent:null,ignoreMutation:null,...r},this.extension=n.extension,this.node=n.node,this.decorations=n.decorations,this.getPos=n.getPos,this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(t){var n,r,i,o,a,s,u;const{view:c}=this.editor,l=t.target,d=l.nodeType===3?(n=l.parentElement)===null||n===void 0?void 0:n.closest("[data-drag-handle]"):l.closest("[data-drag-handle]");if(!this.dom||!((r=this.contentDOM)===null||r===void 0)&&r.contains(l)||!d)return;let p=0,A=0;if(this.dom!==d){const _=this.dom.getBoundingClientRect(),b=d.getBoundingClientRect(),I=(i=t.offsetX)!==null&&i!==void 0?i:(o=t.nativeEvent)===null||o===void 0?void 0:o.offsetX,x=(a=t.offsetY)!==null&&a!==void 0?a:(s=t.nativeEvent)===null||s===void 0?void 0:s.offsetY;p=b.x-_.x+I,A=b.y-_.y+x}(u=t.dataTransfer)===null||u===void 0||u.setDragImage(this.dom,p,A);const m=ve.create(c.state.doc,this.getPos()),g=c.state.tr.setSelection(m);c.dispatch(g)}stopEvent(t){var n;if(!this.dom)return!1;if(typeof this.options.stopEvent=="function")return this.options.stopEvent({event:t});const r=t.target;if(!(this.dom.contains(r)&&!(!((n=this.contentDOM)===null||n===void 0)&&n.contains(r))))return!1;const o=t.type.startsWith("drag"),a=t.type==="drop";if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(r.tagName)||r.isContentEditable)&&!a&&!o)return!0;const{isEditable:u}=this.editor,{isDragging:c}=this,l=!!this.node.type.spec.draggable,d=ve.isSelectable(this.node),p=t.type==="copy",A=t.type==="paste",m=t.type==="cut",g=t.type==="mousedown";if(!l&&d&&o&&t.preventDefault(),l&&o&&!c)return t.preventDefault(),!1;if(l&&u&&!c&&g){const _=r.closest("[data-drag-handle]");_&&(this.dom===_||this.dom.contains(_))&&(this.isDragging=!0,document.addEventListener("dragend",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("drop",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("mouseup",()=>{this.isDragging=!1},{once:!0}))}return!(c||a||p||A||m||g&&d)}ignoreMutation(t){return!this.dom||!this.contentDOM?!0:typeof this.options.ignoreMutation=="function"?this.options.ignoreMutation({mutation:t}):this.node.isLeaf||this.node.isAtom?!0:t.type==="selection"||this.dom.contains(t.target)&&t.type==="childList"&&(nb()||fLe())&&this.editor.isFocused&&[...Array.from(t.addedNodes),...Array.from(t.removedNodes)].every(r=>r.isContentEditable)?!1:this.contentDOM===t.target&&t.type==="attributes"?!0:!this.contentDOM.contains(t.target)}updateAttributes(t){this.editor.commands.command(({tr:n})=>{const r=this.getPos();return n.setNodeMarkup(r,void 0,{...this.node.attrs,...t}),!0})}deleteNode(){const t=this.getPos(),n=t+this.node.nodeSize;this.editor.commands.deleteRange({from:t,to:n})}}function ug(e){return new Bke({find:e.find,handler:({state:t,range:n,match:r,pasteEvent:i})=>{const o=Ue(e.getAttributes,void 0,r,i);if(o===!1||o===null)return null;const{tr:a}=t,s=r[r.length-1],u=r[0];let c=n.to;if(s){const l=u.search(/\S/),d=n.from+u.indexOf(s),p=d+s.length;if($V(n.from,n.to,t.doc).filter(m=>m.mark.type.excluded.find(_=>_===e.type&&_!==m.mark.type)).filter(m=>m.to>d).length)return null;p<n.to&&a.delete(p,n.to),d>n.from&&a.delete(n.from+l,d),c=n.from+l+s.length,a.addMark(n.from+l,c,e.type.create(o||{})),a.removeStoredMark(e.type)}}})}function pLe(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}var cg=200,tn=function(){};tn.prototype.append=function(t){return t.length?(t=tn.from(t),!this.length&&t||t.length<cg&&this.leafAppend(t)||this.length<cg&&t.leafPrepend(this)||this.appendInner(t)):this};tn.prototype.prepend=function(t){return t.length?tn.from(t).append(this):this};tn.prototype.appendInner=function(t){return new ALe(this,t)};tn.prototype.slice=function(t,n){return t===void 0&&(t=0),n===void 0&&(n=this.length),t>=n?tn.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,n))};tn.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)};tn.prototype.forEach=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(t,n,r,0):this.forEachInvertedInner(t,n,r,0)};tn.prototype.map=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var i=[];return this.forEach(function(o,a){return i.push(t(o,a))},n,r),i};tn.from=function(t){return t instanceof tn?t:t&&t.length?new OV(t):tn.empty};var OV=function(e){function t(r){e.call(this),this.values=r}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(i,o){return i==0&&o==this.length?this:new t(this.values.slice(i,o))},t.prototype.getInner=function(i){return this.values[i]},t.prototype.forEachInner=function(i,o,a,s){for(var u=o;u<a;u++)if(i(this.values[u],s+u)===!1)return!1},t.prototype.forEachInvertedInner=function(i,o,a,s){for(var u=o-1;u>=a;u--)if(i(this.values[u],s+u)===!1)return!1},t.prototype.leafAppend=function(i){if(this.length+i.length<=cg)return new t(this.values.concat(i.flatten()))},t.prototype.leafPrepend=function(i){if(this.length+i.length<=cg)return new t(i.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(tn);tn.empty=new OV([]);var ALe=function(e){function t(n,r){e.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},t.prototype.forEachInner=function(r,i,o,a){var s=this.left.length;if(i<s&&this.left.forEachInner(r,i,Math.min(o,s),a)===!1||o>s&&this.right.forEachInner(r,Math.max(i-s,0),Math.min(this.length,o)-s,a+s)===!1)return!1},t.prototype.forEachInvertedInner=function(r,i,o,a){var s=this.left.length;if(i>s&&this.right.forEachInvertedInner(r,i-s,Math.max(o,s)-s,a+s)===!1||o<s&&this.left.forEachInvertedInner(r,Math.min(i,s),o,a)===!1)return!1},t.prototype.sliceInner=function(r,i){if(r==0&&i==this.length)return this;var o=this.left.length;return i<=o?this.left.slice(r,i):r>=o?this.right.slice(r-o,i-o):this.left.slice(r,o).append(this.right.slice(0,i-o))},t.prototype.leafAppend=function(r){var i=this.right.leafAppend(r);if(i)return new t(this.left,i)},t.prototype.leafPrepend=function(r){var i=this.left.leafPrepend(r);if(i)return new t(i,this.right)},t.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new t(this.left,new t(this.right,r)):new t(this,r)},t}(tn);const hLe=500;class Ii{constructor(t,n){this.items=t,this.eventCount=n}popEvent(t,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let i,o;n&&(i=this.remapping(r,this.items.length),o=i.maps.length);let a=t.tr,s,u,c=[],l=[];return this.items.forEach((d,p)=>{if(!d.step){i||(i=this.remapping(r,p+1),o=i.maps.length),o--,l.push(d);return}if(i){l.push(new no(d.map));let A=d.step.map(i.slice(o)),m;A&&a.maybeStep(A).doc&&(m=a.mapping.maps[a.mapping.maps.length-1],c.push(new no(m,void 0,void 0,c.length+l.length))),o--,m&&i.appendMap(m,o)}else a.maybeStep(d.step);if(d.selection)return s=i?d.selection.map(i.slice(o)):d.selection,u=new Ii(this.items.slice(0,r).append(l.reverse().concat(c)),this.eventCount-1),!1},this.items.length,0),{remaining:u,transform:a,selection:s}}addTransform(t,n,r,i){let o=[],a=this.eventCount,s=this.items,u=!i&&s.length?s.get(s.length-1):null;for(let l=0;l<t.steps.length;l++){let d=t.steps[l].invert(t.docs[l]),p=new no(t.mapping.maps[l],d,n),A;(A=u&&u.merge(p))&&(p=A,l?o.pop():s=s.slice(0,s.length-1)),o.push(p),n&&(a++,n=void 0),i||(u=p)}let c=a-r.depth;return c>gLe&&(s=mLe(s,c),a-=c),new Ii(s.append(o),a)}remapping(t,n){let r=new Md;return this.items.forEach((i,o)=>{let a=i.mirrorOffset!=null&&o-i.mirrorOffset>=t?r.maps.length-i.mirrorOffset:void 0;r.appendMap(i.map,a)},t,n),r}addMaps(t){return this.eventCount==0?this:new Ii(this.items.append(t.map(n=>new no(n))),this.eventCount)}rebased(t,n){if(!this.eventCount)return this;let r=[],i=Math.max(0,this.items.length-n),o=t.mapping,a=t.steps.length,s=this.eventCount;this.items.forEach(p=>{p.selection&&s--},i);let u=n;this.items.forEach(p=>{let A=o.getMirror(--u);if(A==null)return;a=Math.min(a,A);let m=o.maps[A];if(p.step){let g=t.steps[A].invert(t.docs[A]),_=p.selection&&p.selection.map(o.slice(u+1,A));_&&s++,r.push(new no(m,g,_))}else r.push(new no(m))},i);let c=[];for(let p=n;p<a;p++)c.push(new no(o.maps[p]));let l=this.items.slice(0,i).append(c).append(r),d=new Ii(l,s);return d.emptyItemCount()>hLe&&(d=d.compress(this.items.length-r.length)),d}emptyItemCount(){let t=0;return this.items.forEach(n=>{n.step||t++}),t}compress(t=this.items.length){let n=this.remapping(0,t),r=n.maps.length,i=[],o=0;return this.items.forEach((a,s)=>{if(s>=t)i.push(a),a.selection&&o++;else if(a.step){let u=a.step.map(n.slice(r)),c=u&&u.getMap();if(r--,c&&n.appendMap(c,r),u){let l=a.selection&&a.selection.map(n.slice(r));l&&o++;let d=new no(c.invert(),u,l),p,A=i.length-1;(p=i.length&&i[A].merge(d))?i[A]=p:i.push(d)}}else a.map&&r--},this.items.length,0),new Ii(tn.from(i.reverse()),o)}}Ii.empty=new Ii(tn.empty,0);function mLe(e,t){let n;return e.forEach((r,i)=>{if(r.selection&&t--==0)return n=i,!1}),e.slice(n)}class no{constructor(t,n,r,i){this.map=t,this.step=n,this.selection=r,this.mirrorOffset=i}merge(t){if(this.step&&t.step&&!t.selection){let n=t.step.merge(this.step);if(n)return new no(n.getMap().invert(),n,this.selection)}}}class Ya{constructor(t,n,r,i,o){this.done=t,this.undone=n,this.prevRanges=r,this.prevTime=i,this.prevComposition=o}}const gLe=20;function vLe(e,t,n,r){let i=n.getMeta(vu),o;if(i)return i.historyState;n.getMeta(CLe)&&(e=new Ya(e.done,e.undone,null,0,-1));let a=n.getMeta("appendedTransaction");if(n.steps.length==0)return e;if(a&&a.getMeta(vu))return a.getMeta(vu).redo?new Ya(e.done.addTransform(n,void 0,r,dm(t)),e.undone,zk(n.mapping.maps),e.prevTime,e.prevComposition):new Ya(e.done,e.undone.addTransform(n,void 0,r,dm(t)),null,e.prevTime,e.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(a&&a.getMeta("addToHistory")===!1)){let s=n.getMeta("composition"),u=e.prevTime==0||!a&&e.prevComposition!=s&&(e.prevTime<(n.time||0)-r.newGroupDelay||!yLe(n,e.prevRanges)),c=a?h1(e.prevRanges,n.mapping):zk(n.mapping.maps);return new Ya(e.done.addTransform(n,u?t.selection.getBookmark():void 0,r,dm(t)),Ii.empty,c,n.time,s??e.prevComposition)}else return(o=n.getMeta("rebased"))?new Ya(e.done.rebased(n,o),e.undone.rebased(n,o),h1(e.prevRanges,n.mapping),e.prevTime,e.prevComposition):new Ya(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),h1(e.prevRanges,n.mapping),e.prevTime,e.prevComposition)}function yLe(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((r,i)=>{for(let o=0;o<t.length;o+=2)r<=t[o+1]&&i>=t[o]&&(n=!0)}),n}function zk(e){let t=[];for(let n=e.length-1;n>=0&&t.length==0;n--)e[n].forEach((r,i,o,a)=>t.push(o,a));return t}function h1(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let i=t.map(e[r],1),o=t.map(e[r+1],-1);i<=o&&n.push(i,o)}return n}function bLe(e,t,n){let r=dm(t),i=vu.get(t).spec.config,o=(n?e.undone:e.done).popEvent(t,r);if(!o)return null;let a=o.selection.resolve(o.transform.doc),s=(n?e.done:e.undone).addTransform(o.transform,t.selection.getBookmark(),i,r),u=new Ya(n?s:o.remaining,n?o.remaining:s,null,0,-1);return o.transform.setSelection(a).setMeta(vu,{redo:n,historyState:u})}let m1=!1,Hk=null;function dm(e){let t=e.plugins;if(Hk!=t){m1=!1,Hk=t;for(let n=0;n<t.length;n++)if(t[n].spec.historyPreserveItems){m1=!0;break}}return m1}const vu=new eo("history"),CLe=new eo("closeHistory");function SLe(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new zr({key:vu,state:{init(){return new Ya(Ii.empty,Ii.empty,null,0,-1)},apply(t,n,r){return vLe(n,r,t,e)}},config:e,props:{handleDOMEvents:{beforeinput(t,n){let r=n.inputType,i=r=="historyUndo"?kV:r=="historyRedo"?MV:null;return i?(n.preventDefault(),i(t.state,t.dispatch)):!1}}}})}function FV(e,t){return(n,r)=>{let i=vu.getState(n);if(!i||(e?i.undone:i.done).eventCount==0)return!1;if(r){let o=bLe(i,n,e);o&&r(t?o.scrollIntoView():o)}return!0}}const kV=FV(!1,!0),MV=FV(!0,!0),_Le=dr.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:e,dispatch:t})=>kV(e,t),redo:()=>({state:e,dispatch:t})=>MV(e,t)}},addProseMirrorPlugins(){return[SLe(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}});var ur="top",ri="bottom",ii="right",cr="left",vO="auto",Oh=[ur,ri,ii,cr],Dl="start",_p="end",ILe="clippingParents",LV="viewport",Sd="popper",TLe="reference",Yk=Oh.reduce(function(e,t){return e.concat([t+"-"+Dl,t+"-"+_p])},[]),jV=[].concat(Oh,[vO]).reduce(function(e,t){return e.concat([t,t+"-"+Dl,t+"-"+_p])},[]),xLe="beforeRead",wLe="read",ELe="afterRead",$Le="beforeMain",RLe="main",OLe="afterMain",FLe="beforeWrite",kLe="write",MLe="afterWrite",LLe=[xLe,wLe,ELe,$Le,RLe,OLe,FLe,kLe,MLe];function mo(e){return e?(e.nodeName||"").toLowerCase():null}function Lr(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Bu(e){var t=Lr(e).Element;return e instanceof t||e instanceof Element}function ni(e){var t=Lr(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function yO(e){if(typeof ShadowRoot>"u")return!1;var t=Lr(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function jLe(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!ni(o)||!mo(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function ULe(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(u,c){return u[c]="",u},{});!ni(i)||!mo(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(u){i.removeAttribute(u)}))})}}const UV={name:"applyStyles",enabled:!0,phase:"write",fn:jLe,effect:ULe,requires:["computeStyles"]};function oo(e){return e.split("-")[0]}var yu=Math.max,lg=Math.min,Wl=Math.round;function MC(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function BV(){return!/^((?!chrome|android).)*safari/i.test(MC())}function Kl(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&ni(e)&&(i=e.offsetWidth>0&&Wl(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Wl(r.height)/e.offsetHeight||1);var a=Bu(e)?Lr(e):window,s=a.visualViewport,u=!BV()&&n,c=(r.left+(u&&s?s.offsetLeft:0))/i,l=(r.top+(u&&s?s.offsetTop:0))/o,d=r.width/i,p=r.height/o;return{width:d,height:p,top:l,right:c+d,bottom:l+p,left:c,x:c,y:l}}function bO(e){var t=Kl(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function PV(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&yO(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function aa(e){return Lr(e).getComputedStyle(e)}function BLe(e){return["table","td","th"].indexOf(mo(e))>=0}function Ys(e){return((Bu(e)?e.ownerDocument:e.document)||window.document).documentElement}function rb(e){return mo(e)==="html"?e:e.assignedSlot||e.parentNode||(yO(e)?e.host:null)||Ys(e)}function Gk(e){return!ni(e)||aa(e).position==="fixed"?null:e.offsetParent}function PLe(e){var t=/firefox/i.test(MC()),n=/Trident/i.test(MC());if(n&&ni(e)){var r=aa(e);if(r.position==="fixed")return null}var i=rb(e);for(yO(i)&&(i=i.host);ni(i)&&["html","body"].indexOf(mo(i))<0;){var o=aa(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function Fh(e){for(var t=Lr(e),n=Gk(e);n&&BLe(n)&&aa(n).position==="static";)n=Gk(n);return n&&(mo(n)==="html"||mo(n)==="body"&&aa(n).position==="static")?t:n||PLe(e)||t}function CO(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Ud(e,t,n){return yu(e,lg(t,n))}function DLe(e,t,n){var r=Ud(e,t,n);return r>n?n:r}function DV(){return{top:0,right:0,bottom:0,left:0}}function WV(e){return Object.assign({},DV(),e)}function KV(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var WLe=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,WV(typeof t!="number"?t:KV(t,Oh))};function KLe(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=oo(n.placement),u=CO(s),c=[cr,ii].indexOf(s)>=0,l=c?"height":"width";if(!(!o||!a)){var d=WLe(i.padding,n),p=bO(o),A=u==="y"?ur:cr,m=u==="y"?ri:ii,g=n.rects.reference[l]+n.rects.reference[u]-a[u]-n.rects.popper[l],_=a[u]-n.rects.reference[u],b=Fh(o),I=b?u==="y"?b.clientHeight||0:b.clientWidth||0:0,x=g/2-_/2,v=d[A],S=I-p[l]-d[m],y=I/2-p[l]/2+x,T=Ud(v,y,S),w=u;n.modifiersData[r]=(t={},t[w]=T,t.centerOffset=T-y,t)}}function NLe(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||PV(t.elements.popper,i)&&(t.elements.arrow=i))}const qLe={name:"arrow",enabled:!0,phase:"main",fn:KLe,effect:NLe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Nl(e){return e.split("-")[1]}var VLe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function QLe(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:Wl(n*i)/i||0,y:Wl(r*i)/i||0}}function Jk(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,u=e.gpuAcceleration,c=e.adaptive,l=e.roundOffsets,d=e.isFixed,p=a.x,A=p===void 0?0:p,m=a.y,g=m===void 0?0:m,_=typeof l=="function"?l({x:A,y:g}):{x:A,y:g};A=_.x,g=_.y;var b=a.hasOwnProperty("x"),I=a.hasOwnProperty("y"),x=cr,v=ur,S=window;if(c){var y=Fh(n),T="clientHeight",w="clientWidth";if(y===Lr(n)&&(y=Ys(n),aa(y).position!=="static"&&s==="absolute"&&(T="scrollHeight",w="scrollWidth")),y=y,i===ur||(i===cr||i===ii)&&o===_p){v=ri;var O=d&&y===S&&S.visualViewport?S.visualViewport.height:y[T];g-=O-r.height,g*=u?1:-1}if(i===cr||(i===ur||i===ri)&&o===_p){x=ii;var F=d&&y===S&&S.visualViewport?S.visualViewport.width:y[w];A-=F-r.width,A*=u?1:-1}}var $=Object.assign({position:s},c&&VLe),P=l===!0?QLe({x:A,y:g},Lr(n)):{x:A,y:g};if(A=P.x,g=P.y,u){var K;return Object.assign({},$,(K={},K[v]=I?"0":"",K[x]=b?"0":"",K.transform=(S.devicePixelRatio||1)<=1?"translate("+A+"px, "+g+"px)":"translate3d("+A+"px, "+g+"px, 0)",K))}return Object.assign({},$,(t={},t[v]=I?g+"px":"",t[x]=b?A+"px":"",t.transform="",t))}function zLe(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,u=s===void 0?!0:s,c={placement:oo(t.placement),variation:Nl(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Jk(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:u})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Jk(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const HLe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:zLe,data:{}};var Xh={passive:!0};function YLe(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,u=Lr(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(l){l.addEventListener("scroll",n.update,Xh)}),s&&u.addEventListener("resize",n.update,Xh),function(){o&&c.forEach(function(l){l.removeEventListener("scroll",n.update,Xh)}),s&&u.removeEventListener("resize",n.update,Xh)}}const GLe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:YLe,data:{}};var JLe={left:"right",right:"left",bottom:"top",top:"bottom"};function pm(e){return e.replace(/left|right|bottom|top/g,function(t){return JLe[t]})}var ZLe={start:"end",end:"start"};function Zk(e){return e.replace(/start|end/g,function(t){return ZLe[t]})}function SO(e){var t=Lr(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function _O(e){return Kl(Ys(e)).left+SO(e).scrollLeft}function XLe(e,t){var n=Lr(e),r=Ys(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,u=0;if(i){o=i.width,a=i.height;var c=BV();(c||!c&&t==="fixed")&&(s=i.offsetLeft,u=i.offsetTop)}return{width:o,height:a,x:s+_O(e),y:u}}function eje(e){var t,n=Ys(e),r=SO(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=yu(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=yu(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+_O(e),u=-r.scrollTop;return aa(i||n).direction==="rtl"&&(s+=yu(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:u}}function IO(e){var t=aa(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function NV(e){return["html","body","#document"].indexOf(mo(e))>=0?e.ownerDocument.body:ni(e)&&IO(e)?e:NV(rb(e))}function Bd(e,t){var n;t===void 0&&(t=[]);var r=NV(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Lr(r),a=i?[o].concat(o.visualViewport||[],IO(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(Bd(rb(a)))}function LC(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function tje(e,t){var n=Kl(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function Xk(e,t,n){return t===LV?LC(XLe(e,n)):Bu(t)?tje(t,n):LC(eje(Ys(e)))}function nje(e){var t=Bd(rb(e)),n=["absolute","fixed"].indexOf(aa(e).position)>=0,r=n&&ni(e)?Fh(e):e;return Bu(r)?t.filter(function(i){return Bu(i)&&PV(i,r)&&mo(i)!=="body"}):[]}function rje(e,t,n,r){var i=t==="clippingParents"?nje(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(u,c){var l=Xk(e,c,r);return u.top=yu(l.top,u.top),u.right=lg(l.right,u.right),u.bottom=lg(l.bottom,u.bottom),u.left=yu(l.left,u.left),u},Xk(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function qV(e){var t=e.reference,n=e.element,r=e.placement,i=r?oo(r):null,o=r?Nl(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,u;switch(i){case ur:u={x:a,y:t.y-n.height};break;case ri:u={x:a,y:t.y+t.height};break;case ii:u={x:t.x+t.width,y:s};break;case cr:u={x:t.x-n.width,y:s};break;default:u={x:t.x,y:t.y}}var c=i?CO(i):null;if(c!=null){var l=c==="y"?"height":"width";switch(o){case Dl:u[c]=u[c]-(t[l]/2-n[l]/2);break;case _p:u[c]=u[c]+(t[l]/2-n[l]/2);break}}return u}function Ip(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,a=o===void 0?e.strategy:o,s=n.boundary,u=s===void 0?ILe:s,c=n.rootBoundary,l=c===void 0?LV:c,d=n.elementContext,p=d===void 0?Sd:d,A=n.altBoundary,m=A===void 0?!1:A,g=n.padding,_=g===void 0?0:g,b=WV(typeof _!="number"?_:KV(_,Oh)),I=p===Sd?TLe:Sd,x=e.rects.popper,v=e.elements[m?I:p],S=rje(Bu(v)?v:v.contextElement||Ys(e.elements.popper),u,l,a),y=Kl(e.elements.reference),T=qV({reference:y,element:x,strategy:"absolute",placement:i}),w=LC(Object.assign({},x,T)),O=p===Sd?w:y,F={top:S.top-O.top+b.top,bottom:O.bottom-S.bottom+b.bottom,left:S.left-O.left+b.left,right:O.right-S.right+b.right},$=e.modifiersData.offset;if(p===Sd&&$){var P=$[i];Object.keys(F).forEach(function(K){var J=[ii,ri].indexOf(K)>=0?1:-1,ee=[ur,ri].indexOf(K)>=0?"y":"x";F[K]+=P[ee]*J})}return F}function ije(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,u=n.allowedAutoPlacements,c=u===void 0?jV:u,l=Nl(r),d=l?s?Yk:Yk.filter(function(m){return Nl(m)===l}):Oh,p=d.filter(function(m){return c.indexOf(m)>=0});p.length===0&&(p=d);var A=p.reduce(function(m,g){return m[g]=Ip(e,{placement:g,boundary:i,rootBoundary:o,padding:a})[oo(g)],m},{});return Object.keys(A).sort(function(m,g){return A[m]-A[g]})}function oje(e){if(oo(e)===vO)return[];var t=pm(e);return[Zk(e),t,Zk(t)]}function aje(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,u=n.fallbackPlacements,c=n.padding,l=n.boundary,d=n.rootBoundary,p=n.altBoundary,A=n.flipVariations,m=A===void 0?!0:A,g=n.allowedAutoPlacements,_=t.options.placement,b=oo(_),I=b===_,x=u||(I||!m?[pm(_)]:oje(_)),v=[_].concat(x).reduce(function(Ie,rt){return Ie.concat(oo(rt)===vO?ije(t,{placement:rt,boundary:l,rootBoundary:d,padding:c,flipVariations:m,allowedAutoPlacements:g}):rt)},[]),S=t.rects.reference,y=t.rects.popper,T=new Map,w=!0,O=v[0],F=0;F<v.length;F++){var $=v[F],P=oo($),K=Nl($)===Dl,J=[ur,ri].indexOf(P)>=0,ee=J?"width":"height",re=Ip(t,{placement:$,boundary:l,rootBoundary:d,altBoundary:p,padding:c}),D=J?K?ii:cr:K?ri:ur;S[ee]>y[ee]&&(D=pm(D));var Y=pm(D),M=[];if(o&&M.push(re[P]<=0),s&&M.push(re[D]<=0,re[Y]<=0),M.every(function(Ie){return Ie})){O=$,w=!1;break}T.set($,M)}if(w)for(var k=m?3:1,q=function(rt){var at=v.find(function(fn){var Zt=T.get(fn);if(Zt)return Zt.slice(0,rt).every(function(rr){return rr})});if(at)return O=at,"break"},ue=k;ue>0;ue--){var ke=q(ue);if(ke==="break")break}t.placement!==O&&(t.modifiersData[r]._skip=!0,t.placement=O,t.reset=!0)}}const sje={name:"flip",enabled:!0,phase:"main",fn:aje,requiresIfExists:["offset"],data:{_skip:!1}};function eM(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function tM(e){return[ur,ii,ri,cr].some(function(t){return e[t]>=0})}function uje(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=Ip(t,{elementContext:"reference"}),s=Ip(t,{altBoundary:!0}),u=eM(a,r),c=eM(s,i,o),l=tM(u),d=tM(c);t.modifiersData[n]={referenceClippingOffsets:u,popperEscapeOffsets:c,isReferenceHidden:l,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":d})}const cje={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:uje};function lje(e,t,n){var r=oo(e),i=[cr,ur].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[cr,ii].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function fje(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=jV.reduce(function(l,d){return l[d]=lje(d,t.rects,o),l},{}),s=a[t.placement],u=s.x,c=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=u,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}const dje={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:fje};function pje(e){var t=e.state,n=e.name;t.modifiersData[n]=qV({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Aje={name:"popperOffsets",enabled:!0,phase:"read",fn:pje,data:{}};function hje(e){return e==="x"?"y":"x"}function mje(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,u=n.boundary,c=n.rootBoundary,l=n.altBoundary,d=n.padding,p=n.tether,A=p===void 0?!0:p,m=n.tetherOffset,g=m===void 0?0:m,_=Ip(t,{boundary:u,rootBoundary:c,padding:d,altBoundary:l}),b=oo(t.placement),I=Nl(t.placement),x=!I,v=CO(b),S=hje(v),y=t.modifiersData.popperOffsets,T=t.rects.reference,w=t.rects.popper,O=typeof g=="function"?g(Object.assign({},t.rects,{placement:t.placement})):g,F=typeof O=="number"?{mainAxis:O,altAxis:O}:Object.assign({mainAxis:0,altAxis:0},O),$=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,P={x:0,y:0};if(y){if(o){var K,J=v==="y"?ur:cr,ee=v==="y"?ri:ii,re=v==="y"?"height":"width",D=y[v],Y=D+_[J],M=D-_[ee],k=A?-w[re]/2:0,q=I===Dl?T[re]:w[re],ue=I===Dl?-w[re]:-T[re],ke=t.elements.arrow,Ie=A&&ke?bO(ke):{width:0,height:0},rt=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:DV(),at=rt[J],fn=rt[ee],Zt=Ud(0,T[re],Ie[re]),rr=x?T[re]/2-k-Zt-at-F.mainAxis:q-Zt-at-F.mainAxis,dn=x?-T[re]/2+k+Zt+fn+F.mainAxis:ue+Zt+fn+F.mainAxis,Hr=t.elements.arrow&&Fh(t.elements.arrow),Yr=Hr?v==="y"?Hr.clientTop||0:Hr.clientLeft||0:0,Ne=(K=$==null?void 0:$[v])!=null?K:0,dt=D+rr-Ne-Yr,St=D+dn-Ne,st=Ud(A?lg(Y,dt):Y,D,A?yu(M,St):M);y[v]=st,P[v]=st-D}if(s){var Wt,gi=v==="x"?ur:cr,_r=v==="x"?ri:ii,ir=y[S],Gr=S==="y"?"height":"width",vi=ir+_[gi],yi=ir-_[_r],jo=[ur,cr].indexOf(b)!==-1,Uo=(Wt=$==null?void 0:$[S])!=null?Wt:0,Bo=jo?vi:ir-T[Gr]-w[Gr]-Uo+F.altAxis,Jr=jo?ir+T[Gr]+w[Gr]-Uo-F.altAxis:yi,Qa=A&&jo?DLe(Bo,ir,Jr):Ud(A?Bo:vi,ir,A?Jr:yi);y[S]=Qa,P[S]=Qa-ir}t.modifiersData[r]=P}}const gje={name:"preventOverflow",enabled:!0,phase:"main",fn:mje,requiresIfExists:["offset"]};function vje(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function yje(e){return e===Lr(e)||!ni(e)?SO(e):vje(e)}function bje(e){var t=e.getBoundingClientRect(),n=Wl(t.width)/e.offsetWidth||1,r=Wl(t.height)/e.offsetHeight||1;return n!==1||r!==1}function Cje(e,t,n){n===void 0&&(n=!1);var r=ni(t),i=ni(t)&&bje(t),o=Ys(t),a=Kl(e,i,n),s={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(r||!r&&!n)&&((mo(t)!=="body"||IO(o))&&(s=yje(t)),ni(t)?(u=Kl(t,!0),u.x+=t.clientLeft,u.y+=t.clientTop):o&&(u.x=_O(o))),{x:a.left+s.scrollLeft-u.x,y:a.top+s.scrollTop-u.y,width:a.width,height:a.height}}function Sje(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var u=t.get(s);u&&i(u)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function _je(e){var t=Sje(e);return LLe.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function Ije(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Tje(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var nM={placement:"bottom",modifiers:[],strategy:"absolute"};function rM(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function xje(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,o=i===void 0?nM:i;return function(s,u,c){c===void 0&&(c=o);var l={placement:"bottom",orderedModifiers:[],options:Object.assign({},nM,o),modifiersData:{},elements:{reference:s,popper:u},attributes:{},styles:{}},d=[],p=!1,A={state:l,setOptions:function(b){var I=typeof b=="function"?b(l.options):b;g(),l.options=Object.assign({},o,l.options,I),l.scrollParents={reference:Bu(s)?Bd(s):s.contextElement?Bd(s.contextElement):[],popper:Bd(u)};var x=_je(Tje([].concat(r,l.options.modifiers)));return l.orderedModifiers=x.filter(function(v){return v.enabled}),m(),A.update()},forceUpdate:function(){if(!p){var b=l.elements,I=b.reference,x=b.popper;if(rM(I,x)){l.rects={reference:Cje(I,Fh(x),l.options.strategy==="fixed"),popper:bO(x)},l.reset=!1,l.placement=l.options.placement,l.orderedModifiers.forEach(function(F){return l.modifiersData[F.name]=Object.assign({},F.data)});for(var v=0;v<l.orderedModifiers.length;v++){if(l.reset===!0){l.reset=!1,v=-1;continue}var S=l.orderedModifiers[v],y=S.fn,T=S.options,w=T===void 0?{}:T,O=S.name;typeof y=="function"&&(l=y({state:l,options:w,name:O,instance:A})||l)}}}},update:Ije(function(){return new Promise(function(_){A.forceUpdate(),_(l)})}),destroy:function(){g(),p=!0}};if(!rM(s,u))return A;A.setOptions(c).then(function(_){!p&&c.onFirstUpdate&&c.onFirstUpdate(_)});function m(){l.orderedModifiers.forEach(function(_){var b=_.name,I=_.options,x=I===void 0?{}:I,v=_.effect;if(typeof v=="function"){var S=v({state:l,name:b,instance:A,options:x}),y=function(){};d.push(S||y)}})}function g(){d.forEach(function(_){return _()}),d=[]}return A}}var wje=[GLe,Aje,HLe,UV,dje,sje,gje,qLe,cje],Eje=xje({defaultModifiers:wje}),$je="tippy-box",VV="tippy-content",Rje="tippy-backdrop",QV="tippy-arrow",zV="tippy-svg-arrow",tu={passive:!0,capture:!0},HV=function(){return document.body};function Oje(e,t){return{}.hasOwnProperty.call(e,t)}function g1(e,t,n){if(Array.isArray(e)){var r=e[t];return r??(Array.isArray(n)?n[t]:n)}return e}function TO(e,t){var n={}.toString.call(e);return n.indexOf("[object")===0&&n.indexOf(t+"]")>-1}function YV(e,t){return typeof e=="function"?e.apply(void 0,t):e}function iM(e,t){if(t===0)return e;var n;return function(r){clearTimeout(n),n=setTimeout(function(){e(r)},t)}}function Fje(e,t){var n=Object.assign({},e);return t.forEach(function(r){delete n[r]}),n}function kje(e){return e.split(/\s+/).filter(Boolean)}function cl(e){return[].concat(e)}function oM(e,t){e.indexOf(t)===-1&&e.push(t)}function Mje(e){return e.filter(function(t,n){return e.indexOf(t)===n})}function Lje(e){return e.split("-")[0]}function fg(e){return[].slice.call(e)}function aM(e){return Object.keys(e).reduce(function(t,n){return e[n]!==void 0&&(t[n]=e[n]),t},{})}function Pd(){return document.createElement("div")}function Tp(e){return["Element","Fragment"].some(function(t){return TO(e,t)})}function jje(e){return TO(e,"NodeList")}function Uje(e){return TO(e,"MouseEvent")}function Bje(e){return!!(e&&e._tippy&&e._tippy.reference===e)}function Pje(e){return Tp(e)?[e]:jje(e)?fg(e):Array.isArray(e)?e:fg(document.querySelectorAll(e))}function v1(e,t){e.forEach(function(n){n&&(n.style.transitionDuration=t+"ms")})}function sM(e,t){e.forEach(function(n){n&&n.setAttribute("data-state",t)})}function Dje(e){var t,n=cl(e),r=n[0];return r!=null&&(t=r.ownerDocument)!=null&&t.body?r.ownerDocument:document}function Wje(e,t){var n=t.clientX,r=t.clientY;return e.every(function(i){var o=i.popperRect,a=i.popperState,s=i.props,u=s.interactiveBorder,c=Lje(a.placement),l=a.modifiersData.offset;if(!l)return!0;var d=c==="bottom"?l.top.y:0,p=c==="top"?l.bottom.y:0,A=c==="right"?l.left.x:0,m=c==="left"?l.right.x:0,g=o.top-r+d>u,_=r-o.bottom-p>u,b=o.left-n+A>u,I=n-o.right-m>u;return g||_||b||I})}function y1(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(i){e[r](i,n)})}function uM(e,t){for(var n=t;n;){var r;if(e.contains(n))return!0;n=n.getRootNode==null||(r=n.getRootNode())==null?void 0:r.host}return!1}var ro={isTouch:!1},cM=0;function Kje(){ro.isTouch||(ro.isTouch=!0,window.performance&&document.addEventListener("mousemove",GV))}function GV(){var e=performance.now();e-cM<20&&(ro.isTouch=!1,document.removeEventListener("mousemove",GV)),cM=e}function Nje(){var e=document.activeElement;if(Bje(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}function qje(){document.addEventListener("touchstart",Kje,tu),window.addEventListener("blur",Nje)}var Vje=typeof window<"u"&&typeof document<"u",Qje=Vje?!!window.msCrypto:!1;function tl(e){var t=e==="destroy"?"n already-":" ";return[e+"() was called on a"+t+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function lM(e){var t=/[ \t]{2,}/g,n=/^[ \t]*/gm;return e.replace(t," ").replace(n,"").trim()}function zje(e){return lM(`
46
+ `,textSerializers:a={}}=n||{};let s="";return e.nodesBetween(r,i,(u,c,l,d)=>{var p;u.isBlock&&c>r&&(s+=o);const A=a==null?void 0:a[u.type.name];if(A)return l&&(s+=A({node:u,pos:c,parent:l,index:d,range:t})),!1;u.isText&&(s+=(p=u==null?void 0:u.text)===null||p===void 0?void 0:p.slice(Math.max(r,c)-c,i-c))}),s}function Qke(e){return Object.fromEntries(Object.entries(e.nodes).filter(([,t])=>t.spec.toText).map(([t,n])=>[t,n.spec.toText]))}dr.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new zr({key:new eo("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:e}=this,{state:t,schema:n}=e,{doc:r,selection:i}=t,{ranges:o}=i,a=Math.min(...o.map(l=>l.$from.pos)),s=Math.max(...o.map(l=>l.$to.pos)),u=Qke(n);return Vke(r,{from:a,to:s},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:u})}}})]}});const zke=()=>({editor:e,view:t})=>(requestAnimationFrame(()=>{var n;e.isDestroyed||(t.dom.blur(),(n=window==null?void 0:window.getSelection())===null||n===void 0||n.removeAllRanges())}),!0),Hke=(e=!1)=>({commands:t})=>t.setContent("",e),Yke=()=>({state:e,tr:t,dispatch:n})=>{const{selection:r}=t,{ranges:i}=r;return n&&i.forEach(({$from:o,$to:a})=>{e.doc.nodesBetween(o.pos,a.pos,(s,u)=>{if(s.type.isText)return;const{doc:c,mapping:l}=t,d=c.resolve(l.map(u)),p=c.resolve(l.map(u+s.nodeSize)),A=d.blockRange(p);if(!A)return;const m=nke(A);if(s.type.isTextblock){const{defaultType:g}=d.parent.contentMatchAt(d.index());t.setNodeMarkup(A.start,g)}(m||m===0)&&t.lift(A,m)})}),!0},Gke=e=>t=>e(t),Jke=()=>({state:e,dispatch:t})=>vke(e,t),Zke=(e,t)=>({editor:n,tr:r})=>{const{state:i}=n,o=i.doc.slice(e.from,e.to);r.deleteRange(e.from,e.to);const a=r.mapping.map(t);return r.insert(a,o.content),r.setSelection(new Be(r.doc.resolve(a-1))),!0},Xke=()=>({tr:e,dispatch:t})=>{const{selection:n}=e,r=n.$anchor.node();if(r.content.size>0)return!1;const i=e.selection.$anchor;for(let o=i.depth;o>0;o-=1)if(i.node(o).type===r.type){if(t){const s=i.before(o),u=i.after(o);e.delete(s,u).scrollIntoView()}return!0}return!1},eMe=e=>({tr:t,state:n,dispatch:r})=>{const i=Cn(e,n.schema),o=t.selection.$anchor;for(let a=o.depth;a>0;a-=1)if(o.node(a).type===i){if(r){const u=o.before(a),c=o.after(a);t.delete(u,c).scrollIntoView()}return!0}return!1},tMe=e=>({tr:t,dispatch:n})=>{const{from:r,to:i}=e;return n&&t.delete(r,i),!0},nMe=()=>({state:e,dispatch:t})=>ake(e,t),rMe=()=>({commands:e})=>e.keyboardShortcut("Enter"),iMe=()=>({state:e,dispatch:t})=>gke(e,t);function ig(e,t,n={strict:!0}){const r=Object.keys(t);return r.length?r.every(i=>n.strict?t[i]===e[i]:fO(t[i])?t[i].test(e[i]):t[i]===e[i]):!0}function OC(e,t,n={}){return e.find(r=>r.type===t&&ig(r.attrs,n))}function oMe(e,t,n={}){return!!OC(e,t,n)}function pO(e,t,n={}){if(!e||!t)return;let r=e.parent.childAfter(e.parentOffset);if(e.parentOffset===r.offset&&r.offset!==0&&(r=e.parent.childBefore(e.parentOffset)),!r.node)return;const i=OC([...r.node.marks],t,n);if(!i)return;let o=r.index,a=e.start()+r.offset,s=o+1,u=a+r.node.nodeSize;for(OC([...r.node.marks],t,n);o>0&&i.isInSet(e.parent.child(o-1).marks);)o-=1,a-=e.parent.child(o).nodeSize;for(;s<e.parent.childCount&&oMe([...e.parent.child(s).marks],t,n);)u+=e.parent.child(s).nodeSize,s+=1;return{from:a,to:u}}function Hs(e,t){if(typeof e=="string"){if(!t.marks[e])throw Error(`There is no mark type named '${e}'. Maybe you forgot to add the extension?`);return t.marks[e]}return e}const aMe=(e,t={})=>({tr:n,state:r,dispatch:i})=>{const o=Hs(e,r.schema),{doc:a,selection:s}=n,{$from:u,from:c,to:l}=s;if(i){const d=pO(u,o,t);if(d&&d.from<=c&&d.to>=l){const p=Be.create(a,d.from,d.to);n.setSelection(p)}}return!0},sMe=e=>t=>{const n=typeof e=="function"?e(t):e;for(let r=0;r<n.length;r+=1)if(n[r](t))return!0;return!1};function AO(e){return e instanceof Be}function Jo(e=0,t=0,n=0){return Math.min(Math.max(e,t),n)}function uMe(e,t=null){if(!t)return null;const n=ze.atStart(e),r=ze.atEnd(e);if(t==="start"||t===!0)return n;if(t==="end")return r;const i=n.from,o=r.to;return t==="all"?Be.create(e,Jo(0,i,o),Jo(e.content.size,i,o)):Be.create(e,Jo(t,i,o),Jo(t,i,o))}function nb(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}const cMe=(e=null,t={})=>({editor:n,view:r,tr:i,dispatch:o})=>{t={scrollIntoView:!0,...t};const a=()=>{nb()&&r.dom.focus(),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),t!=null&&t.scrollIntoView&&n.commands.scrollIntoView())})};if(r.hasFocus()&&e===null||e===!1)return!0;if(o&&e===null&&!AO(n.state.selection))return a(),!0;const s=uMe(i.doc,e)||n.state.selection,u=n.state.selection.eq(s);return o&&(u||i.setSelection(s),u&&i.storedMarks&&i.setStoredMarks(i.storedMarks),a()),!0},lMe=(e,t)=>n=>e.every((r,i)=>t(r,{...n,index:i})),fMe=(e,t)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},e,t),xV=e=>{const t=e.childNodes;for(let n=t.length-1;n>=0;n-=1){const r=t[n];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?e.removeChild(r):r.nodeType===1&&xV(r)}return e};function Zh(e){const t=`<body>${e}</body>`,n=new window.DOMParser().parseFromString(t,"text/html").body;return xV(n)}function og(e,t,n){n={slice:!0,parseOptions:{},...n};const r=typeof e=="object"&&e!==null,i=typeof e=="string";if(r)try{if(Array.isArray(e)&&e.length>0)return X.fromArray(e.map(s=>t.nodeFromJSON(s)));const a=t.nodeFromJSON(e);return n.errorOnInvalidContent&&a.check(),a}catch(o){if(n.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:o});return console.warn("[tiptap warn]: Invalid content.","Passed value:",e,"Error:",o),og("",t,n)}if(i){if(n.errorOnInvalidContent){let a=!1,s="";const u=new C8({topNode:t.spec.topNode,marks:t.spec.marks,nodes:t.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:c=>(a=!0,s=typeof c=="string"?c:c.outerHTML,null)}]}})});if(n.slice?hu.fromSchema(u).parseSlice(Zh(e),n.parseOptions):hu.fromSchema(u).parse(Zh(e),n.parseOptions),n.errorOnInvalidContent&&a)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${s}`)})}const o=hu.fromSchema(t);return n.slice?o.parseSlice(Zh(e),n.parseOptions).content:o.parse(Zh(e),n.parseOptions)}return og("",t,n)}function dMe(e,t,n){const r=e.steps.length-1;if(r<t)return;const i=e.steps[r];if(!(i instanceof zo||i instanceof gl))return;const o=e.mapping.maps[r];let a=0;o.forEach((s,u,c,l)=>{a===0&&(a=l)}),e.setSelection(ze.near(e.doc.resolve(a),n))}const pMe=e=>!("type"in e),AMe=(e,t,n)=>({tr:r,dispatch:i,editor:o})=>{var a;if(i){n={parseOptions:{},updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let s;try{s=og(t,o.schema,{parseOptions:{preserveWhitespace:"full",...n.parseOptions},errorOnInvalidContent:(a=n.errorOnInvalidContent)!==null&&a!==void 0?a:o.options.enableContentCheck})}catch(m){return o.emit("contentError",{editor:o,error:m,disableCollaboration:()=>{console.error("[tiptap error]: Unable to disable collaboration at this point in time")}}),!1}let{from:u,to:c}=typeof e=="number"?{from:e,to:e}:{from:e.from,to:e.to},l=!0,d=!0;if((pMe(s)?s:[s]).forEach(m=>{m.check(),l=l?m.isText&&m.marks.length===0:!1,d=d?m.isBlock:!1}),u===c&&d){const{parent:m}=r.doc.resolve(u);m.isTextblock&&!m.type.spec.code&&!m.childCount&&(u-=1,c+=1)}let A;l?(Array.isArray(t)?A=t.map(m=>m.text||"").join(""):typeof t=="object"&&t&&t.text?A=t.text:A=t,r.insertText(A,u,c)):(A=s,r.replaceWith(u,c,A)),n.updateSelection&&dMe(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta("applyInputRules",{from:u,text:A}),n.applyPasteRules&&r.setMeta("applyPasteRules",{from:u,text:A})}return!0},hMe=()=>({state:e,dispatch:t})=>pke(e,t),mMe=()=>({state:e,dispatch:t})=>Ake(e,t),gMe=()=>({state:e,dispatch:t})=>ske(e,t),vMe=()=>({state:e,dispatch:t})=>fke(e,t),yMe=()=>({state:e,dispatch:t,tr:n})=>{try{const r=gV(e.doc,e.selection.$from.pos,-1);return r==null?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}},bMe=()=>({state:e,dispatch:t,tr:n})=>{try{const r=gV(e.doc,e.selection.$from.pos,1);return r==null?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}},CMe=()=>({state:e,dispatch:t})=>uke(e,t),SMe=()=>({state:e,dispatch:t})=>cke(e,t);function wV(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function _Me(e){const t=e.split(/-(?!$)/);let n=t[t.length-1];n==="Space"&&(n=" ");let r,i,o,a;for(let s=0;s<t.length-1;s+=1){const u=t[s];if(/^(cmd|meta|m)$/i.test(u))a=!0;else if(/^a(lt)?$/i.test(u))r=!0;else if(/^(c|ctrl|control)$/i.test(u))i=!0;else if(/^s(hift)?$/i.test(u))o=!0;else if(/^mod$/i.test(u))nb()||wV()?a=!0:i=!0;else throw new Error(`Unrecognized modifier name: ${u}`)}return r&&(n=`Alt-${n}`),i&&(n=`Ctrl-${n}`),a&&(n=`Meta-${n}`),o&&(n=`Shift-${n}`),n}const IMe=e=>({editor:t,view:n,tr:r,dispatch:i})=>{const o=_Me(e).split(/-(?!$)/),a=o.find(c=>!["Alt","Ctrl","Meta","Shift"].includes(c)),s=new KeyboardEvent("keydown",{key:a==="Space"?" ":a,altKey:o.includes("Alt"),ctrlKey:o.includes("Ctrl"),metaKey:o.includes("Meta"),shiftKey:o.includes("Shift"),bubbles:!0,cancelable:!0}),u=t.captureTransaction(()=>{n.someProp("handleKeyDown",c=>c(n,s))});return u==null||u.steps.forEach(c=>{const l=c.map(r.mapping);l&&i&&r.maybeStep(l)}),!0};function hO(e,t,n={}){const{from:r,to:i,empty:o}=e.selection,a=t?Cn(t,e.schema):null,s=[];e.doc.nodesBetween(r,i,(d,p)=>{if(d.isText)return;const A=Math.max(r,p),m=Math.min(i,p+d.nodeSize);s.push({node:d,from:A,to:m})});const u=i-r,c=s.filter(d=>a?a.name===d.node.type.name:!0).filter(d=>ig(d.node.attrs,n,{strict:!1}));return o?!!c.length:c.reduce((d,p)=>d+p.to-p.from,0)>=u}const TMe=(e,t={})=>({state:n,dispatch:r})=>{const i=Cn(e,n.schema);return hO(n,i,t)?hke(n,r):!1},xMe=()=>({state:e,dispatch:t})=>yke(e,t),wMe=e=>({state:t,dispatch:n})=>{const r=Cn(e,t.schema);return wke(r)(t,n)},EMe=()=>({state:e,dispatch:t})=>mke(e,t);function EV(e,t){return t.nodes[e]?"node":t.marks[e]?"mark":null}function qk(e,t){const n=typeof t=="string"?[t]:t;return Object.keys(e).reduce((r,i)=>(n.includes(i)||(r[i]=e[i]),r),{})}const $Me=(e,t)=>({tr:n,state:r,dispatch:i})=>{let o=null,a=null;const s=EV(typeof e=="string"?e:e.name,r.schema);return s?(s==="node"&&(o=Cn(e,r.schema)),s==="mark"&&(a=Hs(e,r.schema)),i&&n.selection.ranges.forEach(u=>{r.doc.nodesBetween(u.$from.pos,u.$to.pos,(c,l)=>{o&&o===c.type&&n.setNodeMarkup(l,void 0,qk(c.attrs,t)),a&&c.marks.length&&c.marks.forEach(d=>{a===d.type&&n.addMark(l,l+c.nodeSize,a.create(qk(d.attrs,t)))})})}),!0):!1},RMe=()=>({tr:e,dispatch:t})=>(t&&e.scrollIntoView(),!0),OMe=()=>({tr:e,commands:t})=>t.setTextSelection({from:0,to:e.doc.content.size}),FMe=()=>({state:e,dispatch:t})=>lke(e,t),kMe=()=>({state:e,dispatch:t})=>dke(e,t),MMe=()=>({state:e,dispatch:t})=>bke(e,t),LMe=()=>({state:e,dispatch:t})=>_ke(e,t),jMe=()=>({state:e,dispatch:t})=>Ske(e,t);function UMe(e,t,n={},r={}){return og(e,t,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}const BMe=(e,t=!1,n={},r={})=>({editor:i,tr:o,dispatch:a,commands:s})=>{var u,c;const{doc:l}=o;if(n.preserveWhitespace!=="full"){const d=UMe(e,i.schema,n,{errorOnInvalidContent:(u=r.errorOnInvalidContent)!==null&&u!==void 0?u:i.options.enableContentCheck});return a&&o.replaceWith(0,l.content.size,d).setMeta("preventUpdate",!t),!0}return a&&o.setMeta("preventUpdate",!t),s.insertContentAt({from:0,to:l.content.size},e,{parseOptions:n,errorOnInvalidContent:(c=r.errorOnInvalidContent)!==null&&c!==void 0?c:i.options.enableContentCheck})};function mO(e,t){const n=Hs(t,e.schema),{from:r,to:i,empty:o}=e.selection,a=[];o?(e.storedMarks&&a.push(...e.storedMarks),a.push(...e.selection.$head.marks())):e.doc.nodesBetween(r,i,u=>{a.push(...u.marks)});const s=a.find(u=>u.type.name===n.name);return s?{...s.attrs}:{}}function PMe(e){for(let t=0;t<e.edgeCount;t+=1){const{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}function DMe(e,t){for(let n=e.depth;n>0;n-=1){const r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}}function gO(e){return t=>DMe(t.$from,e)}function WMe(e,t){const n=dl.resolve(e);return TV(n,t)}function $V(e,t,n){const r=[];return e===t?n.resolve(e).marks().forEach(i=>{const o=n.resolve(e),a=pO(o,i.type);a&&r.push({mark:i,...a})}):n.nodesBetween(e,t,(i,o)=>{!i||(i==null?void 0:i.nodeSize)===void 0||r.push(...i.marks.map(a=>({from:o,to:o+i.nodeSize,mark:a})))}),r}function fm(e,t,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{const i=e.find(o=>o.type===t&&o.name===r);return i?i.attribute.keepOnSplit:!1}))}function KMe(e,t,n={}){const{empty:r,ranges:i}=e.selection,o=t?Hs(t,e.schema):null;if(r)return!!(e.storedMarks||e.selection.$from.marks()).filter(d=>o?o.name===d.type.name:!0).find(d=>ig(d.attrs,n,{strict:!1}));let a=0;const s=[];if(i.forEach(({$from:d,$to:p})=>{const A=d.pos,m=p.pos;e.doc.nodesBetween(A,m,(g,_)=>{if(!g.isText&&!g.marks.length)return;const b=Math.max(A,_),I=Math.min(m,_+g.nodeSize),x=I-b;a+=x,s.push(...g.marks.map(v=>({mark:v,from:b,to:I})))})}),a===0)return!1;const u=s.filter(d=>o?o.name===d.mark.type.name:!0).filter(d=>ig(d.mark.attrs,n,{strict:!1})).reduce((d,p)=>d+p.to-p.from,0),c=s.filter(d=>o?d.mark.type!==o&&d.mark.type.excludes(o):!0).reduce((d,p)=>d+p.to-p.from,0);return(u>0?u+c:u)>=a}function Vk(e,t){const{nodeExtensions:n}=eb(t),r=n.find(a=>a.name===e);if(!r)return!1;const i={name:r.name,options:r.options,storage:r.storage},o=Ue(ce(r,"group",i));return typeof o!="string"?!1:o.split(" ").includes("list")}function RV(e,{checkChildren:t=!0,ignoreWhitespace:n=!1}={}){var r;if(n){if(e.type.name==="hardBreak")return!0;if(e.isText)return/^\s*$/m.test((r=e.text)!==null&&r!==void 0?r:"")}if(e.isText)return!e.text;if(e.isAtom||e.isLeaf)return!1;if(e.content.childCount===0)return!0;if(t){let i=!0;return e.content.forEach(o=>{i!==!1&&(RV(o,{ignoreWhitespace:n,checkChildren:t})||(i=!1))}),i}return!1}function NMe(e){return e instanceof ve}function qMe(e,t,n){const i=e.state.doc.content.size,o=Jo(t,0,i),a=Jo(n,0,i),s=e.coordsAtPos(o),u=e.coordsAtPos(a,-1),c=Math.min(s.top,u.top),l=Math.max(s.bottom,u.bottom),d=Math.min(s.left,u.left),p=Math.max(s.right,u.right),A=p-d,m=l-c,b={top:c,bottom:l,left:d,right:p,width:A,height:m,x:d,y:c};return{...b,toJSON:()=>b}}function VMe(e,t,n){var r;const{selection:i}=t;let o=null;if(AO(i)&&(o=i.$cursor),o){const s=(r=e.storedMarks)!==null&&r!==void 0?r:o.marks();return!!n.isInSet(s)||!s.some(u=>u.type.excludes(n))}const{ranges:a}=i;return a.some(({$from:s,$to:u})=>{let c=s.depth===0?e.doc.inlineContent&&e.doc.type.allowsMarkType(n):!1;return e.doc.nodesBetween(s.pos,u.pos,(l,d,p)=>{if(c)return!1;if(l.isInline){const A=!p||p.type.allowsMarkType(n),m=!!n.isInSet(l.marks)||!l.marks.some(g=>g.type.excludes(n));c=A&&m}return!c}),c})}const QMe=(e,t={})=>({tr:n,state:r,dispatch:i})=>{const{selection:o}=n,{empty:a,ranges:s}=o,u=Hs(e,r.schema);if(i)if(a){const c=mO(r,u);n.addStoredMark(u.create({...c,...t}))}else s.forEach(c=>{const l=c.$from.pos,d=c.$to.pos;r.doc.nodesBetween(l,d,(p,A)=>{const m=Math.max(A,l),g=Math.min(A+p.nodeSize,d);p.marks.find(b=>b.type===u)?p.marks.forEach(b=>{u===b.type&&n.addMark(m,g,u.create({...b.attrs,...t}))}):n.addMark(m,g,u.create(t))})});return VMe(r,n,u)},zMe=(e,t)=>({tr:n})=>(n.setMeta(e,t),!0),HMe=(e,t={})=>({state:n,dispatch:r,chain:i})=>{const o=Cn(e,n.schema);return o.isTextblock?i().command(({commands:a})=>Dk(o,t)(n)?!0:a.clearNodes()).command(({state:a})=>Dk(o,t)(a,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},YMe=e=>({tr:t,dispatch:n})=>{if(n){const{doc:r}=t,i=Jo(e,0,r.content.size),o=ve.create(r,i);t.setSelection(o)}return!0},GMe=e=>({tr:t,dispatch:n})=>{if(n){const{doc:r}=t,{from:i,to:o}=typeof e=="number"?{from:e,to:e}:e,a=Be.atStart(r).from,s=Be.atEnd(r).to,u=Jo(i,a,s),c=Jo(o,a,s),l=Be.create(r,u,c);t.setSelection(l)}return!0},JMe=e=>({state:t,dispatch:n})=>{const r=Cn(e,t.schema);return Rke(r)(t,n)};function Qk(e,t){const n=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(n){const r=n.filter(i=>t==null?void 0:t.includes(i.type.name));e.tr.ensureMarks(r)}}const ZMe=({keepMarks:e=!0}={})=>({tr:t,state:n,dispatch:r,editor:i})=>{const{selection:o,doc:a}=t,{$from:s,$to:u}=o,c=i.extensionManager.attributes,l=fm(c,s.node().type.name,s.node().attrs);if(o instanceof ve&&o.node.isBlock)return!s.parentOffset||!lm(a,s.pos)?!1:(r&&(e&&Qk(n,i.extensionManager.splittableMarks),t.split(s.pos).scrollIntoView()),!0);if(!s.parent.isBlock)return!1;const d=u.parentOffset===u.parent.content.size,p=s.depth===0?void 0:PMe(s.node(-1).contentMatchAt(s.indexAfter(-1)));let A=d&&p?[{type:p,attrs:l}]:void 0,m=lm(t.doc,t.mapping.map(s.pos),1,A);if(!A&&!m&&lm(t.doc,t.mapping.map(s.pos),1,p?[{type:p}]:void 0)&&(m=!0,A=p?[{type:p,attrs:l}]:void 0),r){if(m&&(o instanceof Be&&t.deleteSelection(),t.split(t.mapping.map(s.pos),1,A),p&&!d&&!s.parentOffset&&s.parent.type!==p)){const g=t.mapping.map(s.before()),_=t.doc.resolve(g);s.node(-1).canReplaceWith(_.index(),_.index()+1,p)&&t.setNodeMarkup(t.mapping.map(s.before()),p)}e&&Qk(n,i.extensionManager.splittableMarks),t.scrollIntoView()}return m},XMe=(e,t={})=>({tr:n,state:r,dispatch:i,editor:o})=>{var a;const s=Cn(e,r.schema),{$from:u,$to:c}=r.selection,l=r.selection.node;if(l&&l.isBlock||u.depth<2||!u.sameParent(c))return!1;const d=u.node(-1);if(d.type!==s)return!1;const p=o.extensionManager.attributes;if(u.parent.content.size===0&&u.node(-1).childCount===u.indexAfter(-1)){if(u.depth===2||u.node(-3).type!==s||u.index(-2)!==u.node(-2).childCount-1)return!1;if(i){let b=X.empty;const I=u.index(-1)?1:u.index(-2)?2:3;for(let w=u.depth-I;w>=u.depth-3;w-=1)b=X.from(u.node(w).copy(b));const x=u.indexAfter(-1)<u.node(-2).childCount?1:u.indexAfter(-2)<u.node(-3).childCount?2:3,v={...fm(p,u.node().type.name,u.node().attrs),...t},S=((a=s.contentMatch.defaultType)===null||a===void 0?void 0:a.createAndFill(v))||void 0;b=b.append(X.from(s.createAndFill(null,S)||void 0));const y=u.before(u.depth-(I-1));n.replace(y,u.after(-x),new ae(b,4-I,0));let T=-1;n.doc.nodesBetween(y,n.doc.content.size,(w,F)=>{if(T>-1)return!1;w.isTextblock&&w.content.size===0&&(T=F+1)}),T>-1&&n.setSelection(Be.near(n.doc.resolve(T))),n.scrollIntoView()}return!0}const A=c.pos===u.end()?d.contentMatchAt(0).defaultType:null,m={...fm(p,d.type.name,d.attrs),...t},g={...fm(p,u.node().type.name,u.node().attrs),...t};n.delete(u.pos,c.pos);const _=A?[{type:s,attrs:m},{type:A,attrs:g}]:[{type:s,attrs:m}];if(!lm(n.doc,u.pos,2))return!1;if(i){const{selection:b,storedMarks:I}=r,{splittableMarks:x}=o.extensionManager,v=I||b.$to.parentOffset&&b.$from.marks();if(n.split(u.pos,2,_).scrollIntoView(),!v||!i)return!0;const S=v.filter(y=>x.includes(y.type.name));n.ensureMarks(S)}return!0},p1=(e,t)=>{const n=gO(a=>a.type===t)(e.selection);if(!n)return!0;const r=e.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(r===void 0)return!0;const i=e.doc.nodeAt(r);return n.node.type===(i==null?void 0:i.type)&&sO(e.doc,n.pos)&&e.join(n.pos),!0},A1=(e,t)=>{const n=gO(a=>a.type===t)(e.selection);if(!n)return!0;const r=e.doc.resolve(n.start).after(n.depth);if(r===void 0)return!0;const i=e.doc.nodeAt(r);return n.node.type===(i==null?void 0:i.type)&&sO(e.doc,r)&&e.join(r),!0},eLe=(e,t,n,r={})=>({editor:i,tr:o,state:a,dispatch:s,chain:u,commands:c,can:l})=>{const{extensions:d,splittableMarks:p}=i.extensionManager,A=Cn(e,a.schema),m=Cn(t,a.schema),{selection:g,storedMarks:_}=a,{$from:b,$to:I}=g,x=b.blockRange(I),v=_||g.$to.parentOffset&&g.$from.marks();if(!x)return!1;const S=gO(y=>Vk(y.type.name,d))(g);if(x.depth>=1&&S&&x.depth-S.depth<=1){if(S.node.type===A)return c.liftListItem(m);if(Vk(S.node.type.name,d)&&A.validContent(S.node.content)&&s)return u().command(()=>(o.setNodeMarkup(S.pos,A),!0)).command(()=>p1(o,A)).command(()=>A1(o,A)).run()}return!n||!v||!s?u().command(()=>l().wrapInList(A,r)?!0:c.clearNodes()).wrapInList(A,r).command(()=>p1(o,A)).command(()=>A1(o,A)).run():u().command(()=>{const y=l().wrapInList(A,r),T=v.filter(w=>p.includes(w.type.name));return o.ensureMarks(T),y?!0:c.clearNodes()}).wrapInList(A,r).command(()=>p1(o,A)).command(()=>A1(o,A)).run()},tLe=(e,t={},n={})=>({state:r,commands:i})=>{const{extendEmptyMarkRange:o=!1}=n,a=Hs(e,r.schema);return KMe(r,a,t)?i.unsetMark(a,{extendEmptyMarkRange:o}):i.setMark(a,t)},nLe=(e,t,n={})=>({state:r,commands:i})=>{const o=Cn(e,r.schema),a=Cn(t,r.schema);return hO(r,o,n)?i.setNode(a):i.setNode(o,n)},rLe=(e,t={})=>({state:n,commands:r})=>{const i=Cn(e,n.schema);return hO(n,i,t)?r.lift(i):r.wrapIn(i,t)},iLe=()=>({state:e,dispatch:t})=>{const n=e.plugins;for(let r=0;r<n.length;r+=1){const i=n[r];let o;if(i.spec.isInputRules&&(o=i.getState(e))){if(t){const a=e.tr,s=o.transform;for(let u=s.steps.length-1;u>=0;u-=1)a.step(s.steps[u].invert(s.docs[u]));if(o.text){const u=a.doc.resolve(o.from).marks();a.replaceWith(o.from,o.to,e.schema.text(o.text,u))}else a.delete(o.from,o.to)}return!0}}return!1},oLe=()=>({tr:e,dispatch:t})=>{const{selection:n}=e,{empty:r,ranges:i}=n;return r||t&&i.forEach(o=>{e.removeMark(o.$from.pos,o.$to.pos)}),!0},aLe=(e,t={})=>({tr:n,state:r,dispatch:i})=>{var o;const{extendEmptyMarkRange:a=!1}=t,{selection:s}=n,u=Hs(e,r.schema),{$from:c,empty:l,ranges:d}=s;if(!i)return!0;if(l&&a){let{from:p,to:A}=s;const m=(o=c.marks().find(_=>_.type===u))===null||o===void 0?void 0:o.attrs,g=pO(c,u,m);g&&(p=g.from,A=g.to),n.removeMark(p,A,u)}else d.forEach(p=>{n.removeMark(p.$from.pos,p.$to.pos,u)});return n.removeStoredMark(u),!0},sLe=(e,t={})=>({tr:n,state:r,dispatch:i})=>{let o=null,a=null;const s=EV(typeof e=="string"?e:e.name,r.schema);return s?(s==="node"&&(o=Cn(e,r.schema)),s==="mark"&&(a=Hs(e,r.schema)),i&&n.selection.ranges.forEach(u=>{const c=u.$from.pos,l=u.$to.pos;r.doc.nodesBetween(c,l,(d,p)=>{o&&o===d.type&&n.setNodeMarkup(p,void 0,{...d.attrs,...t}),a&&d.marks.length&&d.marks.forEach(A=>{if(a===A.type){const m=Math.max(p,c),g=Math.min(p+d.nodeSize,l);n.addMark(m,g,a.create({...A.attrs,...t}))}})})}),!0):!1},uLe=(e,t={})=>({state:n,dispatch:r})=>{const i=Cn(e,n.schema);return Ike(i,t)(n,r)},cLe=(e,t={})=>({state:n,dispatch:r})=>{const i=Cn(e,n.schema);return Tke(i,t)(n,r)};var lLe=Object.freeze({__proto__:null,blur:zke,clearContent:Hke,clearNodes:Yke,command:Gke,createParagraphNear:Jke,cut:Zke,deleteCurrentNode:Xke,deleteNode:eMe,deleteRange:tMe,deleteSelection:nMe,enter:rMe,exitCode:iMe,extendMarkRange:aMe,first:sMe,focus:cMe,forEach:lMe,insertContent:fMe,insertContentAt:AMe,joinBackward:gMe,joinDown:mMe,joinForward:vMe,joinItemBackward:yMe,joinItemForward:bMe,joinTextblockBackward:CMe,joinTextblockForward:SMe,joinUp:hMe,keyboardShortcut:IMe,lift:TMe,liftEmptyBlock:xMe,liftListItem:wMe,newlineInCode:EMe,resetAttributes:$Me,scrollIntoView:RMe,selectAll:OMe,selectNodeBackward:FMe,selectNodeForward:kMe,selectParentNode:MMe,selectTextblockEnd:LMe,selectTextblockStart:jMe,setContent:BMe,setMark:QMe,setMeta:zMe,setNode:HMe,setNodeSelection:YMe,setTextSelection:GMe,sinkListItem:JMe,splitBlock:ZMe,splitListItem:XMe,toggleList:eLe,toggleMark:tLe,toggleNode:nLe,toggleWrap:rLe,undoInputRule:iLe,unsetAllMarks:oLe,unsetMark:aLe,updateAttributes:sLe,wrapIn:uLe,wrapInList:cLe});dr.create({name:"commands",addCommands(){return{...lLe}}});dr.create({name:"editable",addProseMirrorPlugins(){return[new zr({key:new eo("editable"),props:{editable:()=>this.editor.options.editable}})]}});dr.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:e}=this;return[new zr({key:new eo("focusEvents"),props:{handleDOMEvents:{focus:(t,n)=>{e.isFocused=!0;const r=e.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1},blur:(t,n)=>{e.isFocused=!1;const r=e.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1}}}})]}});dr.create({name:"keymap",addKeyboardShortcuts(){const e=()=>this.editor.commands.first(({commands:a})=>[()=>a.undoInputRule(),()=>a.command(({tr:s})=>{const{selection:u,doc:c}=s,{empty:l,$anchor:d}=u,{pos:p,parent:A}=d,m=d.parent.isTextblock&&p>0?s.doc.resolve(p-1):d,g=m.parent.type.spec.isolating,_=d.pos-d.parentOffset,b=g&&m.parent.childCount===1?_===d.pos:ze.atStart(c).from===p;return!l||!A.type.isTextblock||A.textContent.length||!b||b&&d.parent.type.name==="paragraph"?!1:a.clearNodes()}),()=>a.deleteSelection(),()=>a.joinBackward(),()=>a.selectNodeBackward()]),t=()=>this.editor.commands.first(({commands:a})=>[()=>a.deleteSelection(),()=>a.deleteCurrentNode(),()=>a.joinForward(),()=>a.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:a})=>[()=>a.newlineInCode(),()=>a.createParagraphNear(),()=>a.liftEmptyBlock(),()=>a.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:e,"Mod-Backspace":e,"Shift-Backspace":e,Delete:t,"Mod-Delete":t,"Mod-a":()=>this.editor.commands.selectAll()},i={...r},o={...r,"Ctrl-h":e,"Alt-Backspace":e,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return nb()||wV()?o:i},addProseMirrorPlugins(){return[new zr({key:new eo("clearDocument"),appendTransaction:(e,t,n)=>{if(!(e.some(m=>m.docChanged)&&!t.doc.eq(n.doc)))return;const{empty:i,from:o,to:a}=t.selection,s=ze.atStart(t.doc).from,u=ze.atEnd(t.doc).to;if(i||!(o===s&&a===u)||!(n.doc.textBetween(0,n.doc.content.size," "," ").length===0))return;const d=n.tr,p=X0({state:n,transaction:d}),{commands:A}=new lO({editor:this.editor,state:p});if(A.clearNodes(),!!d.steps.length)return d}})]}});dr.create({name:"tabindex",addProseMirrorPlugins(){return[new zr({key:new eo("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}});function ag(e){return new dO({find:e.find,handler:({state:t,range:n,match:r})=>{const i=Ue(e.getAttributes,void 0,r);if(i===!1||i===null)return null;const{tr:o}=t,a=r[r.length-1],s=r[0];if(a){const u=s.search(/\S/),c=n.from+s.indexOf(a),l=c+a.length;if($V(n.from,n.to,t.doc).filter(A=>A.mark.type.excluded.find(g=>g===e.type&&g!==A.mark.type)).filter(A=>A.to>c).length)return null;l<n.to&&o.delete(l,n.to),c>n.from&&o.delete(n.from+u,c);const p=n.from+u+a.length;o.addMark(n.from+u,p,e.type.create(i||{})),o.removeStoredMark(e.type)}}})}function FC(e){return new dO({find:e.find,handler:({state:t,range:n,match:r})=>{const i=t.doc.resolve(n.from),o=Ue(e.getAttributes,void 0,r)||{};if(!i.node(-1).canReplaceWith(i.index(-1),i.indexAfter(-1),e.type))return null;t.tr.delete(n.from,n.to).setBlockType(n.from,n.from,e.type,o)}})}function sg(e){return new dO({find:e.find,handler:({state:t,range:n,match:r,chain:i})=>{const o=Ue(e.getAttributes,void 0,r)||{},a=t.tr.delete(n.from,n.to),u=a.doc.resolve(n.from).blockRange(),c=u&&rke(u,e.type,o);if(!c)return null;if(a.wrap(u,c),e.keepMarks&&e.editor){const{selection:d,storedMarks:p}=t,{splittableMarks:A}=e.editor.extensionManager,m=p||d.$to.parentOffset&&d.$from.marks();if(m){const g=m.filter(_=>A.includes(_.type.name));a.ensureMarks(g)}}if(e.keepAttributes){const d=e.type.name==="bulletList"||e.type.name==="orderedList"?"listItem":"taskList";i().updateAttributes(d,o).run()}const l=a.doc.resolve(n.from-1).nodeBefore;l&&l.type===e.type&&sO(a.doc,n.from-1)&&(!e.joinPredicate||e.joinPredicate(r,l))&&a.join(n.from-1)}})}let Nc=class kC{constructor(t={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Ue(ce(this,"addOptions",{name:this.name}))),this.storage=Ue(ce(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new kC(t)}configure(t={}){const n=this.extend({...this.config,addOptions:()=>tb(this.options,t)});return n.name=this.name,n.parent=this.parent,n}extend(t={}){const n=new kC(t);return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=Ue(ce(n,"addOptions",{name:n.name})),n.storage=Ue(ce(n,"addStorage",{name:n.name,options:n.options})),n}static handleExit({editor:t,mark:n}){const{tr:r}=t.state,i=t.state.selection.$from;if(i.pos===i.end()){const a=i.marks();if(!!!a.find(c=>(c==null?void 0:c.type.name)===n.name))return!1;const u=a.find(c=>(c==null?void 0:c.type.name)===n.name);return u&&r.removeStoredMark(u),r.insertText(" ",i.pos),t.view.dispatch(r),!0}return!1}};class jn{constructor(t={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Ue(ce(this,"addOptions",{name:this.name}))),this.storage=Ue(ce(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new jn(t)}configure(t={}){const n=this.extend({...this.config,addOptions:()=>tb(this.options,t)});return n.name=this.name,n.parent=this.parent,n}extend(t={}){const n=new jn(t);return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=Ue(ce(n,"addOptions",{name:n.name})),n.storage=Ue(ce(n,"addStorage",{name:n.name,options:n.options})),n}}function fLe(){return navigator.platform==="Android"||/android/i.test(navigator.userAgent)}class dLe{constructor(t,n,r){this.isDragging=!1,this.component=t,this.editor=n.editor,this.options={stopEvent:null,ignoreMutation:null,...r},this.extension=n.extension,this.node=n.node,this.decorations=n.decorations,this.getPos=n.getPos,this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(t){var n,r,i,o,a,s,u;const{view:c}=this.editor,l=t.target,d=l.nodeType===3?(n=l.parentElement)===null||n===void 0?void 0:n.closest("[data-drag-handle]"):l.closest("[data-drag-handle]");if(!this.dom||!((r=this.contentDOM)===null||r===void 0)&&r.contains(l)||!d)return;let p=0,A=0;if(this.dom!==d){const _=this.dom.getBoundingClientRect(),b=d.getBoundingClientRect(),I=(i=t.offsetX)!==null&&i!==void 0?i:(o=t.nativeEvent)===null||o===void 0?void 0:o.offsetX,x=(a=t.offsetY)!==null&&a!==void 0?a:(s=t.nativeEvent)===null||s===void 0?void 0:s.offsetY;p=b.x-_.x+I,A=b.y-_.y+x}(u=t.dataTransfer)===null||u===void 0||u.setDragImage(this.dom,p,A);const m=ve.create(c.state.doc,this.getPos()),g=c.state.tr.setSelection(m);c.dispatch(g)}stopEvent(t){var n;if(!this.dom)return!1;if(typeof this.options.stopEvent=="function")return this.options.stopEvent({event:t});const r=t.target;if(!(this.dom.contains(r)&&!(!((n=this.contentDOM)===null||n===void 0)&&n.contains(r))))return!1;const o=t.type.startsWith("drag"),a=t.type==="drop";if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(r.tagName)||r.isContentEditable)&&!a&&!o)return!0;const{isEditable:u}=this.editor,{isDragging:c}=this,l=!!this.node.type.spec.draggable,d=ve.isSelectable(this.node),p=t.type==="copy",A=t.type==="paste",m=t.type==="cut",g=t.type==="mousedown";if(!l&&d&&o&&t.preventDefault(),l&&o&&!c)return t.preventDefault(),!1;if(l&&u&&!c&&g){const _=r.closest("[data-drag-handle]");_&&(this.dom===_||this.dom.contains(_))&&(this.isDragging=!0,document.addEventListener("dragend",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("drop",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("mouseup",()=>{this.isDragging=!1},{once:!0}))}return!(c||a||p||A||m||g&&d)}ignoreMutation(t){return!this.dom||!this.contentDOM?!0:typeof this.options.ignoreMutation=="function"?this.options.ignoreMutation({mutation:t}):this.node.isLeaf||this.node.isAtom?!0:t.type==="selection"||this.dom.contains(t.target)&&t.type==="childList"&&(nb()||fLe())&&this.editor.isFocused&&[...Array.from(t.addedNodes),...Array.from(t.removedNodes)].every(r=>r.isContentEditable)?!1:this.contentDOM===t.target&&t.type==="attributes"?!0:!this.contentDOM.contains(t.target)}updateAttributes(t){this.editor.commands.command(({tr:n})=>{const r=this.getPos();return n.setNodeMarkup(r,void 0,{...this.node.attrs,...t}),!0})}deleteNode(){const t=this.getPos(),n=t+this.node.nodeSize;this.editor.commands.deleteRange({from:t,to:n})}}function ug(e){return new Bke({find:e.find,handler:({state:t,range:n,match:r,pasteEvent:i})=>{const o=Ue(e.getAttributes,void 0,r,i);if(o===!1||o===null)return null;const{tr:a}=t,s=r[r.length-1],u=r[0];let c=n.to;if(s){const l=u.search(/\S/),d=n.from+u.indexOf(s),p=d+s.length;if($V(n.from,n.to,t.doc).filter(m=>m.mark.type.excluded.find(_=>_===e.type&&_!==m.mark.type)).filter(m=>m.to>d).length)return null;p<n.to&&a.delete(p,n.to),d>n.from&&a.delete(n.from+l,d),c=n.from+l+s.length,a.addMark(n.from+l,c,e.type.create(o||{})),a.removeStoredMark(e.type)}}})}function pLe(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}var cg=200,tn=function(){};tn.prototype.append=function(t){return t.length?(t=tn.from(t),!this.length&&t||t.length<cg&&this.leafAppend(t)||this.length<cg&&t.leafPrepend(this)||this.appendInner(t)):this};tn.prototype.prepend=function(t){return t.length?tn.from(t).append(this):this};tn.prototype.appendInner=function(t){return new ALe(this,t)};tn.prototype.slice=function(t,n){return t===void 0&&(t=0),n===void 0&&(n=this.length),t>=n?tn.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,n))};tn.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)};tn.prototype.forEach=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(t,n,r,0):this.forEachInvertedInner(t,n,r,0)};tn.prototype.map=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var i=[];return this.forEach(function(o,a){return i.push(t(o,a))},n,r),i};tn.from=function(t){return t instanceof tn?t:t&&t.length?new OV(t):tn.empty};var OV=function(e){function t(r){e.call(this),this.values=r}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(i,o){return i==0&&o==this.length?this:new t(this.values.slice(i,o))},t.prototype.getInner=function(i){return this.values[i]},t.prototype.forEachInner=function(i,o,a,s){for(var u=o;u<a;u++)if(i(this.values[u],s+u)===!1)return!1},t.prototype.forEachInvertedInner=function(i,o,a,s){for(var u=o-1;u>=a;u--)if(i(this.values[u],s+u)===!1)return!1},t.prototype.leafAppend=function(i){if(this.length+i.length<=cg)return new t(this.values.concat(i.flatten()))},t.prototype.leafPrepend=function(i){if(this.length+i.length<=cg)return new t(i.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(tn);tn.empty=new OV([]);var ALe=function(e){function t(n,r){e.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},t.prototype.forEachInner=function(r,i,o,a){var s=this.left.length;if(i<s&&this.left.forEachInner(r,i,Math.min(o,s),a)===!1||o>s&&this.right.forEachInner(r,Math.max(i-s,0),Math.min(this.length,o)-s,a+s)===!1)return!1},t.prototype.forEachInvertedInner=function(r,i,o,a){var s=this.left.length;if(i>s&&this.right.forEachInvertedInner(r,i-s,Math.max(o,s)-s,a+s)===!1||o<s&&this.left.forEachInvertedInner(r,Math.min(i,s),o,a)===!1)return!1},t.prototype.sliceInner=function(r,i){if(r==0&&i==this.length)return this;var o=this.left.length;return i<=o?this.left.slice(r,i):r>=o?this.right.slice(r-o,i-o):this.left.slice(r,o).append(this.right.slice(0,i-o))},t.prototype.leafAppend=function(r){var i=this.right.leafAppend(r);if(i)return new t(this.left,i)},t.prototype.leafPrepend=function(r){var i=this.left.leafPrepend(r);if(i)return new t(i,this.right)},t.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new t(this.left,new t(this.right,r)):new t(this,r)},t}(tn);const hLe=500;class Ii{constructor(t,n){this.items=t,this.eventCount=n}popEvent(t,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let i,o;n&&(i=this.remapping(r,this.items.length),o=i.maps.length);let a=t.tr,s,u,c=[],l=[];return this.items.forEach((d,p)=>{if(!d.step){i||(i=this.remapping(r,p+1),o=i.maps.length),o--,l.push(d);return}if(i){l.push(new no(d.map));let A=d.step.map(i.slice(o)),m;A&&a.maybeStep(A).doc&&(m=a.mapping.maps[a.mapping.maps.length-1],c.push(new no(m,void 0,void 0,c.length+l.length))),o--,m&&i.appendMap(m,o)}else a.maybeStep(d.step);if(d.selection)return s=i?d.selection.map(i.slice(o)):d.selection,u=new Ii(this.items.slice(0,r).append(l.reverse().concat(c)),this.eventCount-1),!1},this.items.length,0),{remaining:u,transform:a,selection:s}}addTransform(t,n,r,i){let o=[],a=this.eventCount,s=this.items,u=!i&&s.length?s.get(s.length-1):null;for(let l=0;l<t.steps.length;l++){let d=t.steps[l].invert(t.docs[l]),p=new no(t.mapping.maps[l],d,n),A;(A=u&&u.merge(p))&&(p=A,l?o.pop():s=s.slice(0,s.length-1)),o.push(p),n&&(a++,n=void 0),i||(u=p)}let c=a-r.depth;return c>gLe&&(s=mLe(s,c),a-=c),new Ii(s.append(o),a)}remapping(t,n){let r=new Md;return this.items.forEach((i,o)=>{let a=i.mirrorOffset!=null&&o-i.mirrorOffset>=t?r.maps.length-i.mirrorOffset:void 0;r.appendMap(i.map,a)},t,n),r}addMaps(t){return this.eventCount==0?this:new Ii(this.items.append(t.map(n=>new no(n))),this.eventCount)}rebased(t,n){if(!this.eventCount)return this;let r=[],i=Math.max(0,this.items.length-n),o=t.mapping,a=t.steps.length,s=this.eventCount;this.items.forEach(p=>{p.selection&&s--},i);let u=n;this.items.forEach(p=>{let A=o.getMirror(--u);if(A==null)return;a=Math.min(a,A);let m=o.maps[A];if(p.step){let g=t.steps[A].invert(t.docs[A]),_=p.selection&&p.selection.map(o.slice(u+1,A));_&&s++,r.push(new no(m,g,_))}else r.push(new no(m))},i);let c=[];for(let p=n;p<a;p++)c.push(new no(o.maps[p]));let l=this.items.slice(0,i).append(c).append(r),d=new Ii(l,s);return d.emptyItemCount()>hLe&&(d=d.compress(this.items.length-r.length)),d}emptyItemCount(){let t=0;return this.items.forEach(n=>{n.step||t++}),t}compress(t=this.items.length){let n=this.remapping(0,t),r=n.maps.length,i=[],o=0;return this.items.forEach((a,s)=>{if(s>=t)i.push(a),a.selection&&o++;else if(a.step){let u=a.step.map(n.slice(r)),c=u&&u.getMap();if(r--,c&&n.appendMap(c,r),u){let l=a.selection&&a.selection.map(n.slice(r));l&&o++;let d=new no(c.invert(),u,l),p,A=i.length-1;(p=i.length&&i[A].merge(d))?i[A]=p:i.push(d)}}else a.map&&r--},this.items.length,0),new Ii(tn.from(i.reverse()),o)}}Ii.empty=new Ii(tn.empty,0);function mLe(e,t){let n;return e.forEach((r,i)=>{if(r.selection&&t--==0)return n=i,!1}),e.slice(n)}class no{constructor(t,n,r,i){this.map=t,this.step=n,this.selection=r,this.mirrorOffset=i}merge(t){if(this.step&&t.step&&!t.selection){let n=t.step.merge(this.step);if(n)return new no(n.getMap().invert(),n,this.selection)}}}class Ya{constructor(t,n,r,i,o){this.done=t,this.undone=n,this.prevRanges=r,this.prevTime=i,this.prevComposition=o}}const gLe=20;function vLe(e,t,n,r){let i=n.getMeta(vu),o;if(i)return i.historyState;n.getMeta(CLe)&&(e=new Ya(e.done,e.undone,null,0,-1));let a=n.getMeta("appendedTransaction");if(n.steps.length==0)return e;if(a&&a.getMeta(vu))return a.getMeta(vu).redo?new Ya(e.done.addTransform(n,void 0,r,dm(t)),e.undone,zk(n.mapping.maps),e.prevTime,e.prevComposition):new Ya(e.done,e.undone.addTransform(n,void 0,r,dm(t)),null,e.prevTime,e.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(a&&a.getMeta("addToHistory")===!1)){let s=n.getMeta("composition"),u=e.prevTime==0||!a&&e.prevComposition!=s&&(e.prevTime<(n.time||0)-r.newGroupDelay||!yLe(n,e.prevRanges)),c=a?h1(e.prevRanges,n.mapping):zk(n.mapping.maps);return new Ya(e.done.addTransform(n,u?t.selection.getBookmark():void 0,r,dm(t)),Ii.empty,c,n.time,s??e.prevComposition)}else return(o=n.getMeta("rebased"))?new Ya(e.done.rebased(n,o),e.undone.rebased(n,o),h1(e.prevRanges,n.mapping),e.prevTime,e.prevComposition):new Ya(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),h1(e.prevRanges,n.mapping),e.prevTime,e.prevComposition)}function yLe(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((r,i)=>{for(let o=0;o<t.length;o+=2)r<=t[o+1]&&i>=t[o]&&(n=!0)}),n}function zk(e){let t=[];for(let n=e.length-1;n>=0&&t.length==0;n--)e[n].forEach((r,i,o,a)=>t.push(o,a));return t}function h1(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let i=t.map(e[r],1),o=t.map(e[r+1],-1);i<=o&&n.push(i,o)}return n}function bLe(e,t,n){let r=dm(t),i=vu.get(t).spec.config,o=(n?e.undone:e.done).popEvent(t,r);if(!o)return null;let a=o.selection.resolve(o.transform.doc),s=(n?e.done:e.undone).addTransform(o.transform,t.selection.getBookmark(),i,r),u=new Ya(n?s:o.remaining,n?o.remaining:s,null,0,-1);return o.transform.setSelection(a).setMeta(vu,{redo:n,historyState:u})}let m1=!1,Hk=null;function dm(e){let t=e.plugins;if(Hk!=t){m1=!1,Hk=t;for(let n=0;n<t.length;n++)if(t[n].spec.historyPreserveItems){m1=!0;break}}return m1}const vu=new eo("history"),CLe=new eo("closeHistory");function SLe(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new zr({key:vu,state:{init(){return new Ya(Ii.empty,Ii.empty,null,0,-1)},apply(t,n,r){return vLe(n,r,t,e)}},config:e,props:{handleDOMEvents:{beforeinput(t,n){let r=n.inputType,i=r=="historyUndo"?kV:r=="historyRedo"?MV:null;return i?(n.preventDefault(),i(t.state,t.dispatch)):!1}}}})}function FV(e,t){return(n,r)=>{let i=vu.getState(n);if(!i||(e?i.undone:i.done).eventCount==0)return!1;if(r){let o=bLe(i,n,e);o&&r(t?o.scrollIntoView():o)}return!0}}const kV=FV(!1,!0),MV=FV(!0,!0),_Le=dr.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:e,dispatch:t})=>kV(e,t),redo:()=>({state:e,dispatch:t})=>MV(e,t)}},addProseMirrorPlugins(){return[SLe(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}});var ur="top",ri="bottom",ii="right",cr="left",vO="auto",Oh=[ur,ri,ii,cr],Dl="start",_p="end",ILe="clippingParents",LV="viewport",Sd="popper",TLe="reference",Yk=Oh.reduce(function(e,t){return e.concat([t+"-"+Dl,t+"-"+_p])},[]),jV=[].concat(Oh,[vO]).reduce(function(e,t){return e.concat([t,t+"-"+Dl,t+"-"+_p])},[]),xLe="beforeRead",wLe="read",ELe="afterRead",$Le="beforeMain",RLe="main",OLe="afterMain",FLe="beforeWrite",kLe="write",MLe="afterWrite",LLe=[xLe,wLe,ELe,$Le,RLe,OLe,FLe,kLe,MLe];function mo(e){return e?(e.nodeName||"").toLowerCase():null}function Lr(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Bu(e){var t=Lr(e).Element;return e instanceof t||e instanceof Element}function ni(e){var t=Lr(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function yO(e){if(typeof ShadowRoot>"u")return!1;var t=Lr(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function jLe(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!ni(o)||!mo(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function ULe(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(u,c){return u[c]="",u},{});!ni(i)||!mo(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(u){i.removeAttribute(u)}))})}}const UV={name:"applyStyles",enabled:!0,phase:"write",fn:jLe,effect:ULe,requires:["computeStyles"]};function oo(e){return e.split("-")[0]}var yu=Math.max,lg=Math.min,Wl=Math.round;function MC(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function BV(){return!/^((?!chrome|android).)*safari/i.test(MC())}function Kl(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&ni(e)&&(i=e.offsetWidth>0&&Wl(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Wl(r.height)/e.offsetHeight||1);var a=Bu(e)?Lr(e):window,s=a.visualViewport,u=!BV()&&n,c=(r.left+(u&&s?s.offsetLeft:0))/i,l=(r.top+(u&&s?s.offsetTop:0))/o,d=r.width/i,p=r.height/o;return{width:d,height:p,top:l,right:c+d,bottom:l+p,left:c,x:c,y:l}}function bO(e){var t=Kl(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function PV(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&yO(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function aa(e){return Lr(e).getComputedStyle(e)}function BLe(e){return["table","td","th"].indexOf(mo(e))>=0}function Ys(e){return((Bu(e)?e.ownerDocument:e.document)||window.document).documentElement}function rb(e){return mo(e)==="html"?e:e.assignedSlot||e.parentNode||(yO(e)?e.host:null)||Ys(e)}function Gk(e){return!ni(e)||aa(e).position==="fixed"?null:e.offsetParent}function PLe(e){var t=/firefox/i.test(MC()),n=/Trident/i.test(MC());if(n&&ni(e)){var r=aa(e);if(r.position==="fixed")return null}var i=rb(e);for(yO(i)&&(i=i.host);ni(i)&&["html","body"].indexOf(mo(i))<0;){var o=aa(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function Fh(e){for(var t=Lr(e),n=Gk(e);n&&BLe(n)&&aa(n).position==="static";)n=Gk(n);return n&&(mo(n)==="html"||mo(n)==="body"&&aa(n).position==="static")?t:n||PLe(e)||t}function CO(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Ud(e,t,n){return yu(e,lg(t,n))}function DLe(e,t,n){var r=Ud(e,t,n);return r>n?n:r}function DV(){return{top:0,right:0,bottom:0,left:0}}function WV(e){return Object.assign({},DV(),e)}function KV(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var WLe=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,WV(typeof t!="number"?t:KV(t,Oh))};function KLe(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=oo(n.placement),u=CO(s),c=[cr,ii].indexOf(s)>=0,l=c?"height":"width";if(!(!o||!a)){var d=WLe(i.padding,n),p=bO(o),A=u==="y"?ur:cr,m=u==="y"?ri:ii,g=n.rects.reference[l]+n.rects.reference[u]-a[u]-n.rects.popper[l],_=a[u]-n.rects.reference[u],b=Fh(o),I=b?u==="y"?b.clientHeight||0:b.clientWidth||0:0,x=g/2-_/2,v=d[A],S=I-p[l]-d[m],y=I/2-p[l]/2+x,T=Ud(v,y,S),w=u;n.modifiersData[r]=(t={},t[w]=T,t.centerOffset=T-y,t)}}function NLe(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||PV(t.elements.popper,i)&&(t.elements.arrow=i))}const qLe={name:"arrow",enabled:!0,phase:"main",fn:KLe,effect:NLe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Nl(e){return e.split("-")[1]}var VLe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function QLe(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:Wl(n*i)/i||0,y:Wl(r*i)/i||0}}function Jk(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,u=e.gpuAcceleration,c=e.adaptive,l=e.roundOffsets,d=e.isFixed,p=a.x,A=p===void 0?0:p,m=a.y,g=m===void 0?0:m,_=typeof l=="function"?l({x:A,y:g}):{x:A,y:g};A=_.x,g=_.y;var b=a.hasOwnProperty("x"),I=a.hasOwnProperty("y"),x=cr,v=ur,S=window;if(c){var y=Fh(n),T="clientHeight",w="clientWidth";if(y===Lr(n)&&(y=Ys(n),aa(y).position!=="static"&&s==="absolute"&&(T="scrollHeight",w="scrollWidth")),y=y,i===ur||(i===cr||i===ii)&&o===_p){v=ri;var F=d&&y===S&&S.visualViewport?S.visualViewport.height:y[T];g-=F-r.height,g*=u?1:-1}if(i===cr||(i===ur||i===ri)&&o===_p){x=ii;var k=d&&y===S&&S.visualViewport?S.visualViewport.width:y[w];A-=k-r.width,A*=u?1:-1}}var $=Object.assign({position:s},c&&VLe),P=l===!0?QLe({x:A,y:g},Lr(n)):{x:A,y:g};if(A=P.x,g=P.y,u){var K;return Object.assign({},$,(K={},K[v]=I?"0":"",K[x]=b?"0":"",K.transform=(S.devicePixelRatio||1)<=1?"translate("+A+"px, "+g+"px)":"translate3d("+A+"px, "+g+"px, 0)",K))}return Object.assign({},$,(t={},t[v]=I?g+"px":"",t[x]=b?A+"px":"",t.transform="",t))}function zLe(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,u=s===void 0?!0:s,c={placement:oo(t.placement),variation:Nl(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Jk(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:u})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Jk(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const HLe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:zLe,data:{}};var Xh={passive:!0};function YLe(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,u=Lr(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(l){l.addEventListener("scroll",n.update,Xh)}),s&&u.addEventListener("resize",n.update,Xh),function(){o&&c.forEach(function(l){l.removeEventListener("scroll",n.update,Xh)}),s&&u.removeEventListener("resize",n.update,Xh)}}const GLe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:YLe,data:{}};var JLe={left:"right",right:"left",bottom:"top",top:"bottom"};function pm(e){return e.replace(/left|right|bottom|top/g,function(t){return JLe[t]})}var ZLe={start:"end",end:"start"};function Zk(e){return e.replace(/start|end/g,function(t){return ZLe[t]})}function SO(e){var t=Lr(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function _O(e){return Kl(Ys(e)).left+SO(e).scrollLeft}function XLe(e,t){var n=Lr(e),r=Ys(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,u=0;if(i){o=i.width,a=i.height;var c=BV();(c||!c&&t==="fixed")&&(s=i.offsetLeft,u=i.offsetTop)}return{width:o,height:a,x:s+_O(e),y:u}}function eje(e){var t,n=Ys(e),r=SO(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=yu(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=yu(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+_O(e),u=-r.scrollTop;return aa(i||n).direction==="rtl"&&(s+=yu(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:u}}function IO(e){var t=aa(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function NV(e){return["html","body","#document"].indexOf(mo(e))>=0?e.ownerDocument.body:ni(e)&&IO(e)?e:NV(rb(e))}function Bd(e,t){var n;t===void 0&&(t=[]);var r=NV(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Lr(r),a=i?[o].concat(o.visualViewport||[],IO(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(Bd(rb(a)))}function LC(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function tje(e,t){var n=Kl(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function Xk(e,t,n){return t===LV?LC(XLe(e,n)):Bu(t)?tje(t,n):LC(eje(Ys(e)))}function nje(e){var t=Bd(rb(e)),n=["absolute","fixed"].indexOf(aa(e).position)>=0,r=n&&ni(e)?Fh(e):e;return Bu(r)?t.filter(function(i){return Bu(i)&&PV(i,r)&&mo(i)!=="body"}):[]}function rje(e,t,n,r){var i=t==="clippingParents"?nje(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(u,c){var l=Xk(e,c,r);return u.top=yu(l.top,u.top),u.right=lg(l.right,u.right),u.bottom=lg(l.bottom,u.bottom),u.left=yu(l.left,u.left),u},Xk(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function qV(e){var t=e.reference,n=e.element,r=e.placement,i=r?oo(r):null,o=r?Nl(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,u;switch(i){case ur:u={x:a,y:t.y-n.height};break;case ri:u={x:a,y:t.y+t.height};break;case ii:u={x:t.x+t.width,y:s};break;case cr:u={x:t.x-n.width,y:s};break;default:u={x:t.x,y:t.y}}var c=i?CO(i):null;if(c!=null){var l=c==="y"?"height":"width";switch(o){case Dl:u[c]=u[c]-(t[l]/2-n[l]/2);break;case _p:u[c]=u[c]+(t[l]/2-n[l]/2);break}}return u}function Ip(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,a=o===void 0?e.strategy:o,s=n.boundary,u=s===void 0?ILe:s,c=n.rootBoundary,l=c===void 0?LV:c,d=n.elementContext,p=d===void 0?Sd:d,A=n.altBoundary,m=A===void 0?!1:A,g=n.padding,_=g===void 0?0:g,b=WV(typeof _!="number"?_:KV(_,Oh)),I=p===Sd?TLe:Sd,x=e.rects.popper,v=e.elements[m?I:p],S=rje(Bu(v)?v:v.contextElement||Ys(e.elements.popper),u,l,a),y=Kl(e.elements.reference),T=qV({reference:y,element:x,strategy:"absolute",placement:i}),w=LC(Object.assign({},x,T)),F=p===Sd?w:y,k={top:S.top-F.top+b.top,bottom:F.bottom-S.bottom+b.bottom,left:S.left-F.left+b.left,right:F.right-S.right+b.right},$=e.modifiersData.offset;if(p===Sd&&$){var P=$[i];Object.keys(k).forEach(function(K){var Y=[ii,ri].indexOf(K)>=0?1:-1,ee=[ur,ri].indexOf(K)>=0?"y":"x";k[K]+=P[ee]*Y})}return k}function ije(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,u=n.allowedAutoPlacements,c=u===void 0?jV:u,l=Nl(r),d=l?s?Yk:Yk.filter(function(m){return Nl(m)===l}):Oh,p=d.filter(function(m){return c.indexOf(m)>=0});p.length===0&&(p=d);var A=p.reduce(function(m,g){return m[g]=Ip(e,{placement:g,boundary:i,rootBoundary:o,padding:a})[oo(g)],m},{});return Object.keys(A).sort(function(m,g){return A[m]-A[g]})}function oje(e){if(oo(e)===vO)return[];var t=pm(e);return[Zk(e),t,Zk(t)]}function aje(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,u=n.fallbackPlacements,c=n.padding,l=n.boundary,d=n.rootBoundary,p=n.altBoundary,A=n.flipVariations,m=A===void 0?!0:A,g=n.allowedAutoPlacements,_=t.options.placement,b=oo(_),I=b===_,x=u||(I||!m?[pm(_)]:oje(_)),v=[_].concat(x).reduce(function(Ie,rt){return Ie.concat(oo(rt)===vO?ije(t,{placement:rt,boundary:l,rootBoundary:d,padding:c,flipVariations:m,allowedAutoPlacements:g}):rt)},[]),S=t.rects.reference,y=t.rects.popper,T=new Map,w=!0,F=v[0],k=0;k<v.length;k++){var $=v[k],P=oo($),K=Nl($)===Dl,Y=[ur,ri].indexOf(P)>=0,ee=Y?"width":"height",re=Ip(t,{placement:$,boundary:l,rootBoundary:d,altBoundary:p,padding:c}),D=Y?K?ii:cr:K?ri:ur;S[ee]>y[ee]&&(D=pm(D));var G=pm(D),M=[];if(o&&M.push(re[P]<=0),s&&M.push(re[D]<=0,re[G]<=0),M.every(function(Ie){return Ie})){F=$,w=!1;break}T.set($,M)}if(w)for(var O=m?3:1,q=function(rt){var at=v.find(function(fn){var Zt=T.get(fn);if(Zt)return Zt.slice(0,rt).every(function(rr){return rr})});if(at)return F=at,"break"},ue=O;ue>0;ue--){var ke=q(ue);if(ke==="break")break}t.placement!==F&&(t.modifiersData[r]._skip=!0,t.placement=F,t.reset=!0)}}const sje={name:"flip",enabled:!0,phase:"main",fn:aje,requiresIfExists:["offset"],data:{_skip:!1}};function eM(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function tM(e){return[ur,ii,ri,cr].some(function(t){return e[t]>=0})}function uje(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=Ip(t,{elementContext:"reference"}),s=Ip(t,{altBoundary:!0}),u=eM(a,r),c=eM(s,i,o),l=tM(u),d=tM(c);t.modifiersData[n]={referenceClippingOffsets:u,popperEscapeOffsets:c,isReferenceHidden:l,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":d})}const cje={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:uje};function lje(e,t,n){var r=oo(e),i=[cr,ur].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[cr,ii].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function fje(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=jV.reduce(function(l,d){return l[d]=lje(d,t.rects,o),l},{}),s=a[t.placement],u=s.x,c=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=u,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}const dje={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:fje};function pje(e){var t=e.state,n=e.name;t.modifiersData[n]=qV({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Aje={name:"popperOffsets",enabled:!0,phase:"read",fn:pje,data:{}};function hje(e){return e==="x"?"y":"x"}function mje(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,u=n.boundary,c=n.rootBoundary,l=n.altBoundary,d=n.padding,p=n.tether,A=p===void 0?!0:p,m=n.tetherOffset,g=m===void 0?0:m,_=Ip(t,{boundary:u,rootBoundary:c,padding:d,altBoundary:l}),b=oo(t.placement),I=Nl(t.placement),x=!I,v=CO(b),S=hje(v),y=t.modifiersData.popperOffsets,T=t.rects.reference,w=t.rects.popper,F=typeof g=="function"?g(Object.assign({},t.rects,{placement:t.placement})):g,k=typeof F=="number"?{mainAxis:F,altAxis:F}:Object.assign({mainAxis:0,altAxis:0},F),$=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,P={x:0,y:0};if(y){if(o){var K,Y=v==="y"?ur:cr,ee=v==="y"?ri:ii,re=v==="y"?"height":"width",D=y[v],G=D+_[Y],M=D-_[ee],O=A?-w[re]/2:0,q=I===Dl?T[re]:w[re],ue=I===Dl?-w[re]:-T[re],ke=t.elements.arrow,Ie=A&&ke?bO(ke):{width:0,height:0},rt=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:DV(),at=rt[Y],fn=rt[ee],Zt=Ud(0,T[re],Ie[re]),rr=x?T[re]/2-O-Zt-at-k.mainAxis:q-Zt-at-k.mainAxis,dn=x?-T[re]/2+O+Zt+fn+k.mainAxis:ue+Zt+fn+k.mainAxis,Hr=t.elements.arrow&&Fh(t.elements.arrow),Yr=Hr?v==="y"?Hr.clientTop||0:Hr.clientLeft||0:0,Ne=(K=$==null?void 0:$[v])!=null?K:0,dt=D+rr-Ne-Yr,St=D+dn-Ne,st=Ud(A?lg(G,dt):G,D,A?yu(M,St):M);y[v]=st,P[v]=st-D}if(s){var Wt,gi=v==="x"?ur:cr,_r=v==="x"?ri:ii,ir=y[S],Gr=S==="y"?"height":"width",vi=ir+_[gi],yi=ir-_[_r],jo=[ur,cr].indexOf(b)!==-1,Uo=(Wt=$==null?void 0:$[S])!=null?Wt:0,Bo=jo?vi:ir-T[Gr]-w[Gr]-Uo+k.altAxis,Jr=jo?ir+T[Gr]+w[Gr]-Uo-k.altAxis:yi,Qa=A&&jo?DLe(Bo,ir,Jr):Ud(A?Bo:vi,ir,A?Jr:yi);y[S]=Qa,P[S]=Qa-ir}t.modifiersData[r]=P}}const gje={name:"preventOverflow",enabled:!0,phase:"main",fn:mje,requiresIfExists:["offset"]};function vje(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function yje(e){return e===Lr(e)||!ni(e)?SO(e):vje(e)}function bje(e){var t=e.getBoundingClientRect(),n=Wl(t.width)/e.offsetWidth||1,r=Wl(t.height)/e.offsetHeight||1;return n!==1||r!==1}function Cje(e,t,n){n===void 0&&(n=!1);var r=ni(t),i=ni(t)&&bje(t),o=Ys(t),a=Kl(e,i,n),s={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(r||!r&&!n)&&((mo(t)!=="body"||IO(o))&&(s=yje(t)),ni(t)?(u=Kl(t,!0),u.x+=t.clientLeft,u.y+=t.clientTop):o&&(u.x=_O(o))),{x:a.left+s.scrollLeft-u.x,y:a.top+s.scrollTop-u.y,width:a.width,height:a.height}}function Sje(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var u=t.get(s);u&&i(u)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function _je(e){var t=Sje(e);return LLe.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function Ije(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Tje(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var nM={placement:"bottom",modifiers:[],strategy:"absolute"};function rM(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function xje(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,o=i===void 0?nM:i;return function(s,u,c){c===void 0&&(c=o);var l={placement:"bottom",orderedModifiers:[],options:Object.assign({},nM,o),modifiersData:{},elements:{reference:s,popper:u},attributes:{},styles:{}},d=[],p=!1,A={state:l,setOptions:function(b){var I=typeof b=="function"?b(l.options):b;g(),l.options=Object.assign({},o,l.options,I),l.scrollParents={reference:Bu(s)?Bd(s):s.contextElement?Bd(s.contextElement):[],popper:Bd(u)};var x=_je(Tje([].concat(r,l.options.modifiers)));return l.orderedModifiers=x.filter(function(v){return v.enabled}),m(),A.update()},forceUpdate:function(){if(!p){var b=l.elements,I=b.reference,x=b.popper;if(rM(I,x)){l.rects={reference:Cje(I,Fh(x),l.options.strategy==="fixed"),popper:bO(x)},l.reset=!1,l.placement=l.options.placement,l.orderedModifiers.forEach(function(k){return l.modifiersData[k.name]=Object.assign({},k.data)});for(var v=0;v<l.orderedModifiers.length;v++){if(l.reset===!0){l.reset=!1,v=-1;continue}var S=l.orderedModifiers[v],y=S.fn,T=S.options,w=T===void 0?{}:T,F=S.name;typeof y=="function"&&(l=y({state:l,options:w,name:F,instance:A})||l)}}}},update:Ije(function(){return new Promise(function(_){A.forceUpdate(),_(l)})}),destroy:function(){g(),p=!0}};if(!rM(s,u))return A;A.setOptions(c).then(function(_){!p&&c.onFirstUpdate&&c.onFirstUpdate(_)});function m(){l.orderedModifiers.forEach(function(_){var b=_.name,I=_.options,x=I===void 0?{}:I,v=_.effect;if(typeof v=="function"){var S=v({state:l,name:b,instance:A,options:x}),y=function(){};d.push(S||y)}})}function g(){d.forEach(function(_){return _()}),d=[]}return A}}var wje=[GLe,Aje,HLe,UV,dje,sje,gje,qLe,cje],Eje=xje({defaultModifiers:wje}),$je="tippy-box",VV="tippy-content",Rje="tippy-backdrop",QV="tippy-arrow",zV="tippy-svg-arrow",tu={passive:!0,capture:!0},HV=function(){return document.body};function Oje(e,t){return{}.hasOwnProperty.call(e,t)}function g1(e,t,n){if(Array.isArray(e)){var r=e[t];return r??(Array.isArray(n)?n[t]:n)}return e}function TO(e,t){var n={}.toString.call(e);return n.indexOf("[object")===0&&n.indexOf(t+"]")>-1}function YV(e,t){return typeof e=="function"?e.apply(void 0,t):e}function iM(e,t){if(t===0)return e;var n;return function(r){clearTimeout(n),n=setTimeout(function(){e(r)},t)}}function Fje(e,t){var n=Object.assign({},e);return t.forEach(function(r){delete n[r]}),n}function kje(e){return e.split(/\s+/).filter(Boolean)}function cl(e){return[].concat(e)}function oM(e,t){e.indexOf(t)===-1&&e.push(t)}function Mje(e){return e.filter(function(t,n){return e.indexOf(t)===n})}function Lje(e){return e.split("-")[0]}function fg(e){return[].slice.call(e)}function aM(e){return Object.keys(e).reduce(function(t,n){return e[n]!==void 0&&(t[n]=e[n]),t},{})}function Pd(){return document.createElement("div")}function Tp(e){return["Element","Fragment"].some(function(t){return TO(e,t)})}function jje(e){return TO(e,"NodeList")}function Uje(e){return TO(e,"MouseEvent")}function Bje(e){return!!(e&&e._tippy&&e._tippy.reference===e)}function Pje(e){return Tp(e)?[e]:jje(e)?fg(e):Array.isArray(e)?e:fg(document.querySelectorAll(e))}function v1(e,t){e.forEach(function(n){n&&(n.style.transitionDuration=t+"ms")})}function sM(e,t){e.forEach(function(n){n&&n.setAttribute("data-state",t)})}function Dje(e){var t,n=cl(e),r=n[0];return r!=null&&(t=r.ownerDocument)!=null&&t.body?r.ownerDocument:document}function Wje(e,t){var n=t.clientX,r=t.clientY;return e.every(function(i){var o=i.popperRect,a=i.popperState,s=i.props,u=s.interactiveBorder,c=Lje(a.placement),l=a.modifiersData.offset;if(!l)return!0;var d=c==="bottom"?l.top.y:0,p=c==="top"?l.bottom.y:0,A=c==="right"?l.left.x:0,m=c==="left"?l.right.x:0,g=o.top-r+d>u,_=r-o.bottom-p>u,b=o.left-n+A>u,I=n-o.right-m>u;return g||_||b||I})}function y1(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(i){e[r](i,n)})}function uM(e,t){for(var n=t;n;){var r;if(e.contains(n))return!0;n=n.getRootNode==null||(r=n.getRootNode())==null?void 0:r.host}return!1}var ro={isTouch:!1},cM=0;function Kje(){ro.isTouch||(ro.isTouch=!0,window.performance&&document.addEventListener("mousemove",GV))}function GV(){var e=performance.now();e-cM<20&&(ro.isTouch=!1,document.removeEventListener("mousemove",GV)),cM=e}function Nje(){var e=document.activeElement;if(Bje(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}function qje(){document.addEventListener("touchstart",Kje,tu),window.addEventListener("blur",Nje)}var Vje=typeof window<"u"&&typeof document<"u",Qje=Vje?!!window.msCrypto:!1;function tl(e){var t=e==="destroy"?"n already-":" ";return[e+"() was called on a"+t+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function lM(e){var t=/[ \t]{2,}/g,n=/^[ \t]*/gm;return e.replace(t," ").replace(n,"").trim()}function zje(e){return lM(`
47
47
  %ctippy.js
48
48
 
49
49
  %c`+lM(e)+`
@@ -52,13 +52,13 @@ npx @slicemachine/init@latest --repository ${i??"<my-project>"}`,language:"bash"
52
52
  `)}function JV(e){return[zje(e),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}var xp;process.env.NODE_ENV!=="production"&&Hje();function Hje(){xp=new Set}function Qo(e,t){if(e&&!xp.has(t)){var n;xp.add(t),(n=console).warn.apply(n,JV(t))}}function jC(e,t){if(e&&!xp.has(t)){var n;xp.add(t),(n=console).error.apply(n,JV(t))}}function Yje(e){var t=!e,n=Object.prototype.toString.call(e)==="[object Object]"&&!e.addEventListener;jC(t,["tippy() was passed","`"+String(e)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),jC(n,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}var ZV={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Gje={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},Rr=Object.assign({appendTo:HV,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},ZV,Gje),Jje=Object.keys(Rr),Zje=function(t){process.env.NODE_ENV!=="production"&&eQ(t,[]);var n=Object.keys(t);n.forEach(function(r){Rr[r]=t[r]})};function XV(e){var t=e.plugins||[],n=t.reduce(function(r,i){var o=i.name,a=i.defaultValue;if(o){var s;r[o]=e[o]!==void 0?e[o]:(s=Rr[o])!=null?s:a}return r},{});return Object.assign({},e,n)}function Xje(e,t){var n=t?Object.keys(XV(Object.assign({},Rr,{plugins:t}))):Jje,r=n.reduce(function(i,o){var a=(e.getAttribute("data-tippy-"+o)||"").trim();if(!a)return i;if(o==="content")i[o]=a;else try{i[o]=JSON.parse(a)}catch{i[o]=a}return i},{});return r}function fM(e,t){var n=Object.assign({},t,{content:YV(t.content,[e])},t.ignoreAttributes?{}:Xje(e,t.plugins));return n.aria=Object.assign({},Rr.aria,n.aria),n.aria={expanded:n.aria.expanded==="auto"?t.interactive:n.aria.expanded,content:n.aria.content==="auto"?t.interactive?null:"describedby":n.aria.content},n}function eQ(e,t){e===void 0&&(e={}),t===void 0&&(t=[]);var n=Object.keys(e);n.forEach(function(r){var i=Fje(Rr,Object.keys(ZV)),o=!Oje(i,r);o&&(o=t.filter(function(a){return a.name===r}).length===0),Qo(o,["`"+r+"`","is not a valid prop. You may have spelled it incorrectly, or if it's","a plugin, forgot to pass it in an array as props.plugins.",`
53
53
 
54
54
  `,`All props: https://atomiks.github.io/tippyjs/v6/all-props/
55
- `,"Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}var eUe=function(){return"innerHTML"};function UC(e,t){e[eUe()]=t}function dM(e){var t=Pd();return e===!0?t.className=QV:(t.className=zV,Tp(e)?t.appendChild(e):UC(t,e)),t}function pM(e,t){Tp(t.content)?(UC(e,""),e.appendChild(t.content)):typeof t.content!="function"&&(t.allowHTML?UC(e,t.content):e.textContent=t.content)}function BC(e){var t=e.firstElementChild,n=fg(t.children);return{box:t,content:n.find(function(r){return r.classList.contains(VV)}),arrow:n.find(function(r){return r.classList.contains(QV)||r.classList.contains(zV)}),backdrop:n.find(function(r){return r.classList.contains(Rje)})}}function tQ(e){var t=Pd(),n=Pd();n.className=$je,n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=Pd();r.className=VV,r.setAttribute("data-state","hidden"),pM(r,e.props),t.appendChild(n),n.appendChild(r),i(e.props,e.props);function i(o,a){var s=BC(t),u=s.box,c=s.content,l=s.arrow;a.theme?u.setAttribute("data-theme",a.theme):u.removeAttribute("data-theme"),typeof a.animation=="string"?u.setAttribute("data-animation",a.animation):u.removeAttribute("data-animation"),a.inertia?u.setAttribute("data-inertia",""):u.removeAttribute("data-inertia"),u.style.maxWidth=typeof a.maxWidth=="number"?a.maxWidth+"px":a.maxWidth,a.role?u.setAttribute("role",a.role):u.removeAttribute("role"),(o.content!==a.content||o.allowHTML!==a.allowHTML)&&pM(c,e.props),a.arrow?l?o.arrow!==a.arrow&&(u.removeChild(l),u.appendChild(dM(a.arrow))):u.appendChild(dM(a.arrow)):l&&u.removeChild(l)}return{popper:t,onUpdate:i}}tQ.$$tippy=!0;var tUe=1,em=[],b1=[];function nUe(e,t){var n=fM(e,Object.assign({},Rr,XV(aM(t)))),r,i,o,a=!1,s=!1,u=!1,c=!1,l,d,p,A=[],m=iM(dt,n.interactiveDebounce),g,_=tUe++,b=null,I=Mje(n.plugins),x={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},v={id:_,reference:e,popper:Pd(),popperInstance:b,props:n,state:x,plugins:I,clearDelayTimeouts:Bo,setProps:Jr,setContent:Qa,show:Vc,hide:U,hideWithInteractivity:j,enable:jo,disable:Uo,unmount:W,destroy:Me};if(!n.render)return process.env.NODE_ENV!=="production"&&jC(!0,"render() function has not been supplied."),v;var S=n.render(v),y=S.popper,T=S.onUpdate;y.setAttribute("data-tippy-root",""),y.id="tippy-"+v.id,v.popper=y,e._tippy=v,y._tippy=v;var w=I.map(function(B){return B.fn(v)}),O=e.hasAttribute("aria-expanded");return Hr(),k(),D(),Y("onCreate",[v]),n.showOnCreate&&vi(),y.addEventListener("mouseenter",function(){v.props.interactive&&v.state.isVisible&&v.clearDelayTimeouts()}),y.addEventListener("mouseleave",function(){v.props.interactive&&v.props.trigger.indexOf("mouseenter")>=0&&J().addEventListener("mousemove",m)}),v;function F(){var B=v.props.touch;return Array.isArray(B)?B:[B,0]}function $(){return F()[0]==="hold"}function P(){var B;return!!((B=v.props.render)!=null&&B.$$tippy)}function K(){return g||e}function J(){var B=K().parentNode;return B?Dje(B):document}function ee(){return BC(y)}function re(B){return v.state.isMounted&&!v.state.isVisible||ro.isTouch||l&&l.type==="focus"?0:g1(v.props.delay,B?0:1,Rr.delay)}function D(B){B===void 0&&(B=!1),y.style.pointerEvents=v.props.interactive&&!B?"":"none",y.style.zIndex=""+v.props.zIndex}function Y(B,ie,ge){if(ge===void 0&&(ge=!0),w.forEach(function(Ee){Ee[B]&&Ee[B].apply(Ee,ie)}),ge){var Ae;(Ae=v.props)[B].apply(Ae,ie)}}function M(){var B=v.props.aria;if(B.content){var ie="aria-"+B.content,ge=y.id,Ae=cl(v.props.triggerTarget||e);Ae.forEach(function(Ee){var ut=Ee.getAttribute(ie);if(v.state.isVisible)Ee.setAttribute(ie,ut?ut+" "+ge:ge);else{var Wn=ut&&ut.replace(ge,"").trim();Wn?Ee.setAttribute(ie,Wn):Ee.removeAttribute(ie)}})}}function k(){if(!(O||!v.props.aria.expanded)){var B=cl(v.props.triggerTarget||e);B.forEach(function(ie){v.props.interactive?ie.setAttribute("aria-expanded",v.state.isVisible&&ie===K()?"true":"false"):ie.removeAttribute("aria-expanded")})}}function q(){J().removeEventListener("mousemove",m),em=em.filter(function(B){return B!==m})}function ue(B){if(!(ro.isTouch&&(u||B.type==="mousedown"))){var ie=B.composedPath&&B.composedPath()[0]||B.target;if(!(v.props.interactive&&uM(y,ie))){if(cl(v.props.triggerTarget||e).some(function(ge){return uM(ge,ie)})){if(ro.isTouch||v.state.isVisible&&v.props.trigger.indexOf("click")>=0)return}else Y("onClickOutside",[v,B]);v.props.hideOnClick===!0&&(v.clearDelayTimeouts(),v.hide(),s=!0,setTimeout(function(){s=!1}),v.state.isMounted||at())}}}function ke(){u=!0}function Ie(){u=!1}function rt(){var B=J();B.addEventListener("mousedown",ue,!0),B.addEventListener("touchend",ue,tu),B.addEventListener("touchstart",Ie,tu),B.addEventListener("touchmove",ke,tu)}function at(){var B=J();B.removeEventListener("mousedown",ue,!0),B.removeEventListener("touchend",ue,tu),B.removeEventListener("touchstart",Ie,tu),B.removeEventListener("touchmove",ke,tu)}function fn(B,ie){rr(B,function(){!v.state.isVisible&&y.parentNode&&y.parentNode.contains(y)&&ie()})}function Zt(B,ie){rr(B,ie)}function rr(B,ie){var ge=ee().box;function Ae(Ee){Ee.target===ge&&(y1(ge,"remove",Ae),ie())}if(B===0)return ie();y1(ge,"remove",d),y1(ge,"add",Ae),d=Ae}function dn(B,ie,ge){ge===void 0&&(ge=!1);var Ae=cl(v.props.triggerTarget||e);Ae.forEach(function(Ee){Ee.addEventListener(B,ie,ge),A.push({node:Ee,eventType:B,handler:ie,options:ge})})}function Hr(){$()&&(dn("touchstart",Ne,{passive:!0}),dn("touchend",St,{passive:!0})),kje(v.props.trigger).forEach(function(B){if(B!=="manual")switch(dn(B,Ne),B){case"mouseenter":dn("mouseleave",St);break;case"focus":dn(Qje?"focusout":"blur",st);break;case"focusin":dn("focusout",st);break}})}function Yr(){A.forEach(function(B){var ie=B.node,ge=B.eventType,Ae=B.handler,Ee=B.options;ie.removeEventListener(ge,Ae,Ee)}),A=[]}function Ne(B){var ie,ge=!1;if(!(!v.state.isEnabled||Wt(B)||s)){var Ae=((ie=l)==null?void 0:ie.type)==="focus";l=B,g=B.currentTarget,k(),!v.state.isVisible&&Uje(B)&&em.forEach(function(Ee){return Ee(B)}),B.type==="click"&&(v.props.trigger.indexOf("mouseenter")<0||a)&&v.props.hideOnClick!==!1&&v.state.isVisible?ge=!0:vi(B),B.type==="click"&&(a=!ge),ge&&!Ae&&yi(B)}}function dt(B){var ie=B.target,ge=K().contains(ie)||y.contains(ie);if(!(B.type==="mousemove"&&ge)){var Ae=Gr().concat(y).map(function(Ee){var ut,Wn=Ee._tippy,Ir=(ut=Wn.popperInstance)==null?void 0:ut.state;return Ir?{popperRect:Ee.getBoundingClientRect(),popperState:Ir,props:n}:null}).filter(Boolean);Wje(Ae,B)&&(q(),yi(B))}}function St(B){var ie=Wt(B)||v.props.trigger.indexOf("click")>=0&&a;if(!ie){if(v.props.interactive){v.hideWithInteractivity(B);return}yi(B)}}function st(B){v.props.trigger.indexOf("focusin")<0&&B.target!==K()||v.props.interactive&&B.relatedTarget&&y.contains(B.relatedTarget)||yi(B)}function Wt(B){return ro.isTouch?$()!==B.type.indexOf("touch")>=0:!1}function gi(){_r();var B=v.props,ie=B.popperOptions,ge=B.placement,Ae=B.offset,Ee=B.getReferenceClientRect,ut=B.moveTransition,Wn=P()?BC(y).arrow:null,Ir=Ee?{getBoundingClientRect:Ee,contextElement:Ee.contextElement||K()}:e,Qc={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(Hc){var Po=Hc.state;if(P()){var db=ee(),Yc=db.box;["placement","reference-hidden","escaped"].forEach(function(Gs){Gs==="placement"?Yc.setAttribute("data-placement",Po.placement):Po.attributes.popper["data-popper-"+Gs]?Yc.setAttribute("data-"+Gs,""):Yc.removeAttribute("data-"+Gs)}),Po.attributes.popper={}}}},bi=[{name:"offset",options:{offset:Ae}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!ut}},Qc];P()&&Wn&&bi.push({name:"arrow",options:{element:Wn,padding:3}}),bi.push.apply(bi,(ie==null?void 0:ie.modifiers)||[]),v.popperInstance=Eje(Ir,y,Object.assign({},ie,{placement:ge,onFirstUpdate:p,modifiers:bi}))}function _r(){v.popperInstance&&(v.popperInstance.destroy(),v.popperInstance=null)}function ir(){var B=v.props.appendTo,ie,ge=K();v.props.interactive&&B===HV||B==="parent"?ie=ge.parentNode:ie=YV(B,[ge]),ie.contains(y)||ie.appendChild(y),v.state.isMounted=!0,gi(),process.env.NODE_ENV!=="production"&&Qo(v.props.interactive&&B===Rr.appendTo&&ge.nextElementSibling!==y,["Interactive tippy element may not be accessible via keyboard","navigation because it is not directly after the reference element","in the DOM source order.",`
55
+ `,"Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}var eUe=function(){return"innerHTML"};function UC(e,t){e[eUe()]=t}function dM(e){var t=Pd();return e===!0?t.className=QV:(t.className=zV,Tp(e)?t.appendChild(e):UC(t,e)),t}function pM(e,t){Tp(t.content)?(UC(e,""),e.appendChild(t.content)):typeof t.content!="function"&&(t.allowHTML?UC(e,t.content):e.textContent=t.content)}function BC(e){var t=e.firstElementChild,n=fg(t.children);return{box:t,content:n.find(function(r){return r.classList.contains(VV)}),arrow:n.find(function(r){return r.classList.contains(QV)||r.classList.contains(zV)}),backdrop:n.find(function(r){return r.classList.contains(Rje)})}}function tQ(e){var t=Pd(),n=Pd();n.className=$je,n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=Pd();r.className=VV,r.setAttribute("data-state","hidden"),pM(r,e.props),t.appendChild(n),n.appendChild(r),i(e.props,e.props);function i(o,a){var s=BC(t),u=s.box,c=s.content,l=s.arrow;a.theme?u.setAttribute("data-theme",a.theme):u.removeAttribute("data-theme"),typeof a.animation=="string"?u.setAttribute("data-animation",a.animation):u.removeAttribute("data-animation"),a.inertia?u.setAttribute("data-inertia",""):u.removeAttribute("data-inertia"),u.style.maxWidth=typeof a.maxWidth=="number"?a.maxWidth+"px":a.maxWidth,a.role?u.setAttribute("role",a.role):u.removeAttribute("role"),(o.content!==a.content||o.allowHTML!==a.allowHTML)&&pM(c,e.props),a.arrow?l?o.arrow!==a.arrow&&(u.removeChild(l),u.appendChild(dM(a.arrow))):u.appendChild(dM(a.arrow)):l&&u.removeChild(l)}return{popper:t,onUpdate:i}}tQ.$$tippy=!0;var tUe=1,em=[],b1=[];function nUe(e,t){var n=fM(e,Object.assign({},Rr,XV(aM(t)))),r,i,o,a=!1,s=!1,u=!1,c=!1,l,d,p,A=[],m=iM(dt,n.interactiveDebounce),g,_=tUe++,b=null,I=Mje(n.plugins),x={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},v={id:_,reference:e,popper:Pd(),popperInstance:b,props:n,state:x,plugins:I,clearDelayTimeouts:Bo,setProps:Jr,setContent:Qa,show:Vc,hide:U,hideWithInteractivity:j,enable:jo,disable:Uo,unmount:W,destroy:Me};if(!n.render)return process.env.NODE_ENV!=="production"&&jC(!0,"render() function has not been supplied."),v;var S=n.render(v),y=S.popper,T=S.onUpdate;y.setAttribute("data-tippy-root",""),y.id="tippy-"+v.id,v.popper=y,e._tippy=v,y._tippy=v;var w=I.map(function(B){return B.fn(v)}),F=e.hasAttribute("aria-expanded");return Hr(),O(),D(),G("onCreate",[v]),n.showOnCreate&&vi(),y.addEventListener("mouseenter",function(){v.props.interactive&&v.state.isVisible&&v.clearDelayTimeouts()}),y.addEventListener("mouseleave",function(){v.props.interactive&&v.props.trigger.indexOf("mouseenter")>=0&&Y().addEventListener("mousemove",m)}),v;function k(){var B=v.props.touch;return Array.isArray(B)?B:[B,0]}function $(){return k()[0]==="hold"}function P(){var B;return!!((B=v.props.render)!=null&&B.$$tippy)}function K(){return g||e}function Y(){var B=K().parentNode;return B?Dje(B):document}function ee(){return BC(y)}function re(B){return v.state.isMounted&&!v.state.isVisible||ro.isTouch||l&&l.type==="focus"?0:g1(v.props.delay,B?0:1,Rr.delay)}function D(B){B===void 0&&(B=!1),y.style.pointerEvents=v.props.interactive&&!B?"":"none",y.style.zIndex=""+v.props.zIndex}function G(B,ie,ge){if(ge===void 0&&(ge=!0),w.forEach(function(Ee){Ee[B]&&Ee[B].apply(Ee,ie)}),ge){var Ae;(Ae=v.props)[B].apply(Ae,ie)}}function M(){var B=v.props.aria;if(B.content){var ie="aria-"+B.content,ge=y.id,Ae=cl(v.props.triggerTarget||e);Ae.forEach(function(Ee){var ut=Ee.getAttribute(ie);if(v.state.isVisible)Ee.setAttribute(ie,ut?ut+" "+ge:ge);else{var Wn=ut&&ut.replace(ge,"").trim();Wn?Ee.setAttribute(ie,Wn):Ee.removeAttribute(ie)}})}}function O(){if(!(F||!v.props.aria.expanded)){var B=cl(v.props.triggerTarget||e);B.forEach(function(ie){v.props.interactive?ie.setAttribute("aria-expanded",v.state.isVisible&&ie===K()?"true":"false"):ie.removeAttribute("aria-expanded")})}}function q(){Y().removeEventListener("mousemove",m),em=em.filter(function(B){return B!==m})}function ue(B){if(!(ro.isTouch&&(u||B.type==="mousedown"))){var ie=B.composedPath&&B.composedPath()[0]||B.target;if(!(v.props.interactive&&uM(y,ie))){if(cl(v.props.triggerTarget||e).some(function(ge){return uM(ge,ie)})){if(ro.isTouch||v.state.isVisible&&v.props.trigger.indexOf("click")>=0)return}else G("onClickOutside",[v,B]);v.props.hideOnClick===!0&&(v.clearDelayTimeouts(),v.hide(),s=!0,setTimeout(function(){s=!1}),v.state.isMounted||at())}}}function ke(){u=!0}function Ie(){u=!1}function rt(){var B=Y();B.addEventListener("mousedown",ue,!0),B.addEventListener("touchend",ue,tu),B.addEventListener("touchstart",Ie,tu),B.addEventListener("touchmove",ke,tu)}function at(){var B=Y();B.removeEventListener("mousedown",ue,!0),B.removeEventListener("touchend",ue,tu),B.removeEventListener("touchstart",Ie,tu),B.removeEventListener("touchmove",ke,tu)}function fn(B,ie){rr(B,function(){!v.state.isVisible&&y.parentNode&&y.parentNode.contains(y)&&ie()})}function Zt(B,ie){rr(B,ie)}function rr(B,ie){var ge=ee().box;function Ae(Ee){Ee.target===ge&&(y1(ge,"remove",Ae),ie())}if(B===0)return ie();y1(ge,"remove",d),y1(ge,"add",Ae),d=Ae}function dn(B,ie,ge){ge===void 0&&(ge=!1);var Ae=cl(v.props.triggerTarget||e);Ae.forEach(function(Ee){Ee.addEventListener(B,ie,ge),A.push({node:Ee,eventType:B,handler:ie,options:ge})})}function Hr(){$()&&(dn("touchstart",Ne,{passive:!0}),dn("touchend",St,{passive:!0})),kje(v.props.trigger).forEach(function(B){if(B!=="manual")switch(dn(B,Ne),B){case"mouseenter":dn("mouseleave",St);break;case"focus":dn(Qje?"focusout":"blur",st);break;case"focusin":dn("focusout",st);break}})}function Yr(){A.forEach(function(B){var ie=B.node,ge=B.eventType,Ae=B.handler,Ee=B.options;ie.removeEventListener(ge,Ae,Ee)}),A=[]}function Ne(B){var ie,ge=!1;if(!(!v.state.isEnabled||Wt(B)||s)){var Ae=((ie=l)==null?void 0:ie.type)==="focus";l=B,g=B.currentTarget,O(),!v.state.isVisible&&Uje(B)&&em.forEach(function(Ee){return Ee(B)}),B.type==="click"&&(v.props.trigger.indexOf("mouseenter")<0||a)&&v.props.hideOnClick!==!1&&v.state.isVisible?ge=!0:vi(B),B.type==="click"&&(a=!ge),ge&&!Ae&&yi(B)}}function dt(B){var ie=B.target,ge=K().contains(ie)||y.contains(ie);if(!(B.type==="mousemove"&&ge)){var Ae=Gr().concat(y).map(function(Ee){var ut,Wn=Ee._tippy,Ir=(ut=Wn.popperInstance)==null?void 0:ut.state;return Ir?{popperRect:Ee.getBoundingClientRect(),popperState:Ir,props:n}:null}).filter(Boolean);Wje(Ae,B)&&(q(),yi(B))}}function St(B){var ie=Wt(B)||v.props.trigger.indexOf("click")>=0&&a;if(!ie){if(v.props.interactive){v.hideWithInteractivity(B);return}yi(B)}}function st(B){v.props.trigger.indexOf("focusin")<0&&B.target!==K()||v.props.interactive&&B.relatedTarget&&y.contains(B.relatedTarget)||yi(B)}function Wt(B){return ro.isTouch?$()!==B.type.indexOf("touch")>=0:!1}function gi(){_r();var B=v.props,ie=B.popperOptions,ge=B.placement,Ae=B.offset,Ee=B.getReferenceClientRect,ut=B.moveTransition,Wn=P()?BC(y).arrow:null,Ir=Ee?{getBoundingClientRect:Ee,contextElement:Ee.contextElement||K()}:e,Qc={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(Hc){var Po=Hc.state;if(P()){var db=ee(),Yc=db.box;["placement","reference-hidden","escaped"].forEach(function(Gs){Gs==="placement"?Yc.setAttribute("data-placement",Po.placement):Po.attributes.popper["data-popper-"+Gs]?Yc.setAttribute("data-"+Gs,""):Yc.removeAttribute("data-"+Gs)}),Po.attributes.popper={}}}},bi=[{name:"offset",options:{offset:Ae}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!ut}},Qc];P()&&Wn&&bi.push({name:"arrow",options:{element:Wn,padding:3}}),bi.push.apply(bi,(ie==null?void 0:ie.modifiers)||[]),v.popperInstance=Eje(Ir,y,Object.assign({},ie,{placement:ge,onFirstUpdate:p,modifiers:bi}))}function _r(){v.popperInstance&&(v.popperInstance.destroy(),v.popperInstance=null)}function ir(){var B=v.props.appendTo,ie,ge=K();v.props.interactive&&B===HV||B==="parent"?ie=ge.parentNode:ie=YV(B,[ge]),ie.contains(y)||ie.appendChild(y),v.state.isMounted=!0,gi(),process.env.NODE_ENV!=="production"&&Qo(v.props.interactive&&B===Rr.appendTo&&ge.nextElementSibling!==y,["Interactive tippy element may not be accessible via keyboard","navigation because it is not directly after the reference element","in the DOM source order.",`
56
56
 
57
57
  `,"Using a wrapper <div> or <span> tag around the reference element","solves this by creating a new parentNode context.",`
58
58
 
59
59
  `,"Specifying `appendTo: document.body` silences this warning, but it","assumes you are using a focus management solution to handle","keyboard navigation.",`
60
60
 
61
- `,"See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "))}function Gr(){return fg(y.querySelectorAll("[data-tippy-root]"))}function vi(B){v.clearDelayTimeouts(),B&&Y("onTrigger",[v,B]),rt();var ie=re(!0),ge=F(),Ae=ge[0],Ee=ge[1];ro.isTouch&&Ae==="hold"&&Ee&&(ie=Ee),ie?r=setTimeout(function(){v.show()},ie):v.show()}function yi(B){if(v.clearDelayTimeouts(),Y("onUntrigger",[v,B]),!v.state.isVisible){at();return}if(!(v.props.trigger.indexOf("mouseenter")>=0&&v.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(B.type)>=0&&a)){var ie=re(!1);ie?i=setTimeout(function(){v.state.isVisible&&v.hide()},ie):o=requestAnimationFrame(function(){v.hide()})}}function jo(){v.state.isEnabled=!0}function Uo(){v.hide(),v.state.isEnabled=!1}function Bo(){clearTimeout(r),clearTimeout(i),cancelAnimationFrame(o)}function Jr(B){if(process.env.NODE_ENV!=="production"&&Qo(v.state.isDestroyed,tl("setProps")),!v.state.isDestroyed){Y("onBeforeUpdate",[v,B]),Yr();var ie=v.props,ge=fM(e,Object.assign({},ie,aM(B),{ignoreAttributes:!0}));v.props=ge,Hr(),ie.interactiveDebounce!==ge.interactiveDebounce&&(q(),m=iM(dt,ge.interactiveDebounce)),ie.triggerTarget&&!ge.triggerTarget?cl(ie.triggerTarget).forEach(function(Ae){Ae.removeAttribute("aria-expanded")}):ge.triggerTarget&&e.removeAttribute("aria-expanded"),k(),D(),T&&T(ie,ge),v.popperInstance&&(gi(),Gr().forEach(function(Ae){requestAnimationFrame(Ae._tippy.popperInstance.forceUpdate)})),Y("onAfterUpdate",[v,B])}}function Qa(B){v.setProps({content:B})}function Vc(){process.env.NODE_ENV!=="production"&&Qo(v.state.isDestroyed,tl("show"));var B=v.state.isVisible,ie=v.state.isDestroyed,ge=!v.state.isEnabled,Ae=ro.isTouch&&!v.props.touch,Ee=g1(v.props.duration,0,Rr.duration);if(!(B||ie||ge||Ae)&&!K().hasAttribute("disabled")&&(Y("onShow",[v],!1),v.props.onShow(v)!==!1)){if(v.state.isVisible=!0,P()&&(y.style.visibility="visible"),D(),rt(),v.state.isMounted||(y.style.transition="none"),P()){var ut=ee(),Wn=ut.box,Ir=ut.content;v1([Wn,Ir],0)}p=function(){var bi;if(!(!v.state.isVisible||c)){if(c=!0,y.offsetHeight,y.style.transition=v.props.moveTransition,P()&&v.props.animation){var zc=ee(),Hc=zc.box,Po=zc.content;v1([Hc,Po],Ee),sM([Hc,Po],"visible")}M(),k(),oM(b1,v),(bi=v.popperInstance)==null||bi.forceUpdate(),Y("onMount",[v]),v.props.animation&&P()&&Zt(Ee,function(){v.state.isShown=!0,Y("onShown",[v])})}},ir()}}function U(){process.env.NODE_ENV!=="production"&&Qo(v.state.isDestroyed,tl("hide"));var B=!v.state.isVisible,ie=v.state.isDestroyed,ge=!v.state.isEnabled,Ae=g1(v.props.duration,1,Rr.duration);if(!(B||ie||ge)&&(Y("onHide",[v],!1),v.props.onHide(v)!==!1)){if(v.state.isVisible=!1,v.state.isShown=!1,c=!1,a=!1,P()&&(y.style.visibility="hidden"),q(),at(),D(!0),P()){var Ee=ee(),ut=Ee.box,Wn=Ee.content;v.props.animation&&(v1([ut,Wn],Ae),sM([ut,Wn],"hidden"))}M(),k(),v.props.animation?P()&&fn(Ae,v.unmount):v.unmount()}}function j(B){process.env.NODE_ENV!=="production"&&Qo(v.state.isDestroyed,tl("hideWithInteractivity")),J().addEventListener("mousemove",m),oM(em,m),m(B)}function W(){process.env.NODE_ENV!=="production"&&Qo(v.state.isDestroyed,tl("unmount")),v.state.isVisible&&v.hide(),v.state.isMounted&&(_r(),Gr().forEach(function(B){B._tippy.unmount()}),y.parentNode&&y.parentNode.removeChild(y),b1=b1.filter(function(B){return B!==v}),v.state.isMounted=!1,Y("onHidden",[v]))}function Me(){process.env.NODE_ENV!=="production"&&Qo(v.state.isDestroyed,tl("destroy")),!v.state.isDestroyed&&(v.clearDelayTimeouts(),v.unmount(),Yr(),delete e._tippy,v.state.isDestroyed=!0,Y("onDestroy",[v]))}}function kh(e,t){t===void 0&&(t={});var n=Rr.plugins.concat(t.plugins||[]);process.env.NODE_ENV!=="production"&&(Yje(e),eQ(t,n)),qje();var r=Object.assign({},t,{plugins:n}),i=Pje(e);if(process.env.NODE_ENV!=="production"){var o=Tp(r.content),a=i.length>1;Qo(o&&a,["tippy() was passed an Element as the `content` prop, but more than","one tippy instance was created by this invocation. This means the","content element will only be appended to the last tippy instance.",`
61
+ `,"See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "))}function Gr(){return fg(y.querySelectorAll("[data-tippy-root]"))}function vi(B){v.clearDelayTimeouts(),B&&G("onTrigger",[v,B]),rt();var ie=re(!0),ge=k(),Ae=ge[0],Ee=ge[1];ro.isTouch&&Ae==="hold"&&Ee&&(ie=Ee),ie?r=setTimeout(function(){v.show()},ie):v.show()}function yi(B){if(v.clearDelayTimeouts(),G("onUntrigger",[v,B]),!v.state.isVisible){at();return}if(!(v.props.trigger.indexOf("mouseenter")>=0&&v.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(B.type)>=0&&a)){var ie=re(!1);ie?i=setTimeout(function(){v.state.isVisible&&v.hide()},ie):o=requestAnimationFrame(function(){v.hide()})}}function jo(){v.state.isEnabled=!0}function Uo(){v.hide(),v.state.isEnabled=!1}function Bo(){clearTimeout(r),clearTimeout(i),cancelAnimationFrame(o)}function Jr(B){if(process.env.NODE_ENV!=="production"&&Qo(v.state.isDestroyed,tl("setProps")),!v.state.isDestroyed){G("onBeforeUpdate",[v,B]),Yr();var ie=v.props,ge=fM(e,Object.assign({},ie,aM(B),{ignoreAttributes:!0}));v.props=ge,Hr(),ie.interactiveDebounce!==ge.interactiveDebounce&&(q(),m=iM(dt,ge.interactiveDebounce)),ie.triggerTarget&&!ge.triggerTarget?cl(ie.triggerTarget).forEach(function(Ae){Ae.removeAttribute("aria-expanded")}):ge.triggerTarget&&e.removeAttribute("aria-expanded"),O(),D(),T&&T(ie,ge),v.popperInstance&&(gi(),Gr().forEach(function(Ae){requestAnimationFrame(Ae._tippy.popperInstance.forceUpdate)})),G("onAfterUpdate",[v,B])}}function Qa(B){v.setProps({content:B})}function Vc(){process.env.NODE_ENV!=="production"&&Qo(v.state.isDestroyed,tl("show"));var B=v.state.isVisible,ie=v.state.isDestroyed,ge=!v.state.isEnabled,Ae=ro.isTouch&&!v.props.touch,Ee=g1(v.props.duration,0,Rr.duration);if(!(B||ie||ge||Ae)&&!K().hasAttribute("disabled")&&(G("onShow",[v],!1),v.props.onShow(v)!==!1)){if(v.state.isVisible=!0,P()&&(y.style.visibility="visible"),D(),rt(),v.state.isMounted||(y.style.transition="none"),P()){var ut=ee(),Wn=ut.box,Ir=ut.content;v1([Wn,Ir],0)}p=function(){var bi;if(!(!v.state.isVisible||c)){if(c=!0,y.offsetHeight,y.style.transition=v.props.moveTransition,P()&&v.props.animation){var zc=ee(),Hc=zc.box,Po=zc.content;v1([Hc,Po],Ee),sM([Hc,Po],"visible")}M(),O(),oM(b1,v),(bi=v.popperInstance)==null||bi.forceUpdate(),G("onMount",[v]),v.props.animation&&P()&&Zt(Ee,function(){v.state.isShown=!0,G("onShown",[v])})}},ir()}}function U(){process.env.NODE_ENV!=="production"&&Qo(v.state.isDestroyed,tl("hide"));var B=!v.state.isVisible,ie=v.state.isDestroyed,ge=!v.state.isEnabled,Ae=g1(v.props.duration,1,Rr.duration);if(!(B||ie||ge)&&(G("onHide",[v],!1),v.props.onHide(v)!==!1)){if(v.state.isVisible=!1,v.state.isShown=!1,c=!1,a=!1,P()&&(y.style.visibility="hidden"),q(),at(),D(!0),P()){var Ee=ee(),ut=Ee.box,Wn=Ee.content;v.props.animation&&(v1([ut,Wn],Ae),sM([ut,Wn],"hidden"))}M(),O(),v.props.animation?P()&&fn(Ae,v.unmount):v.unmount()}}function j(B){process.env.NODE_ENV!=="production"&&Qo(v.state.isDestroyed,tl("hideWithInteractivity")),Y().addEventListener("mousemove",m),oM(em,m),m(B)}function W(){process.env.NODE_ENV!=="production"&&Qo(v.state.isDestroyed,tl("unmount")),v.state.isVisible&&v.hide(),v.state.isMounted&&(_r(),Gr().forEach(function(B){B._tippy.unmount()}),y.parentNode&&y.parentNode.removeChild(y),b1=b1.filter(function(B){return B!==v}),v.state.isMounted=!1,G("onHidden",[v]))}function Me(){process.env.NODE_ENV!=="production"&&Qo(v.state.isDestroyed,tl("destroy")),!v.state.isDestroyed&&(v.clearDelayTimeouts(),v.unmount(),Yr(),delete e._tippy,v.state.isDestroyed=!0,G("onDestroy",[v]))}}function kh(e,t){t===void 0&&(t={});var n=Rr.plugins.concat(t.plugins||[]);process.env.NODE_ENV!=="production"&&(Yje(e),eQ(t,n)),qje();var r=Object.assign({},t,{plugins:n}),i=Pje(e);if(process.env.NODE_ENV!=="production"){var o=Tp(r.content),a=i.length>1;Qo(o&&a,["tippy() was passed an Element as the `content` prop, but more than","one tippy instance was created by this invocation. This means the","content element will only be appended to the last tippy instance.",`
62
62
 
63
63
  `,"Instead, pass the .innerHTML of the element, or use a function that","returns a cloned version of the element instead.",`
64
64
 
@@ -79,7 +79,7 @@ npx @slicemachine/init@latest --repository ${i??"<my-project>"}`,language:"bash"
79
79
  *
80
80
  * This source code is licensed under the MIT license found in the
81
81
  * LICENSE file in the root directory of this source tree.
82
- */var hM;function oUe(){return hM||(hM=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=E,t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(x){{for(var v=arguments.length,S=new Array(v>1?v-1:0),y=1;y<v;y++)S[y-1]=arguments[y];r("error",x,S)}}function r(x,v,S){{var y=t.ReactDebugCurrentFrame,T=y.getStackAddendum();T!==""&&(v+="%s",S=S.concat([T]));var w=S.map(function(O){return String(O)});w.unshift("Warning: "+v),Function.prototype.apply.call(console[x],console,w)}}function i(x,v){return x===v&&(x!==0||1/x===1/v)||x!==x&&v!==v}var o=typeof Object.is=="function"?Object.is:i,a=e.useState,s=e.useEffect,u=e.useLayoutEffect,c=e.useDebugValue,l=!1,d=!1;function p(x,v,S){l||e.startTransition!==void 0&&(l=!0,n("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var y=v();if(!d){var T=v();o(y,T)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}var w=a({inst:{value:y,getSnapshot:v}}),O=w[0].inst,F=w[1];return u(function(){O.value=y,O.getSnapshot=v,A(O)&&F({inst:O})},[x,y,v]),s(function(){A(O)&&F({inst:O});var $=function(){A(O)&&F({inst:O})};return x($)},[x]),c(y),y}function A(x){var v=x.getSnapshot,S=x.value;try{var y=v();return!o(S,y)}catch{return!0}}function m(x,v,S){return v()}var g=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",_=!g,b=_?m:p,I=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:b;S1.useSyncExternalStore=I,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),S1}process.env.NODE_ENV==="production"?PC.exports=iUe():PC.exports=oUe();var xO=PC.exports;const aUe=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n&&(n.current=t)})},sUe=({contentComponent:e})=>{const t=xO.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getServerSnapshot);return E.createElement(E.Fragment,null,Object.values(t))};function uUe(){const e=new Set;let t={};return{subscribe(n){return e.add(n),()=>{e.delete(n)}},getSnapshot(){return t},getServerSnapshot(){return t},setRenderer(n,r){t={...t,[n]:nS.createPortal(r.reactElement,r.element,n)},e.forEach(i=>i())},removeRenderer(n){const r={...t};delete r[n],t=r,e.forEach(i=>i())}}}class cUe extends E.Component{constructor(t){var n;super(t),this.editorContentRef=E.createRef(),this.initialized=!1,this.state={hasContentComponentInitialized:!!(!((n=t.editor)===null||n===void 0)&&n.contentComponent)}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){const t=this.props.editor;if(t&&!t.isDestroyed&&t.options.element){if(t.contentComponent)return;const n=this.editorContentRef.current;n.append(...t.options.element.childNodes),t.setOptions({element:n}),t.contentComponent=uUe(),this.state.hasContentComponentInitialized||(this.unsubscribeToContentComponent=t.contentComponent.subscribe(()=>{this.setState(r=>r.hasContentComponentInitialized?r:{hasContentComponentInitialized:!0}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent()})),t.createNodeViews(),this.initialized=!0}}componentWillUnmount(){const t=this.props.editor;if(!t||(this.initialized=!1,t.isDestroyed||t.view.setProps({nodeViews:{}}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent(),t.contentComponent=null,!t.options.element.firstChild))return;const n=document.createElement("div");n.append(...t.options.element.childNodes),t.setOptions({element:n})}render(){const{editor:t,innerRef:n,...r}=this.props;return E.createElement(E.Fragment,null,E.createElement("div",{ref:aUe(n,this.editorContentRef),...r}),(t==null?void 0:t.contentComponent)&&E.createElement(sUe,{contentComponent:t.contentComponent}))}}const lUe=E.forwardRef((e,t)=>{const n=E.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[e.editor]);return E.createElement(cUe,{key:n,innerRef:t,...e})}),fUe=E.memo(lUe);var _1={};/**
82
+ */var hM;function oUe(){return hM||(hM=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=E,t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(x){{for(var v=arguments.length,S=new Array(v>1?v-1:0),y=1;y<v;y++)S[y-1]=arguments[y];r("error",x,S)}}function r(x,v,S){{var y=t.ReactDebugCurrentFrame,T=y.getStackAddendum();T!==""&&(v+="%s",S=S.concat([T]));var w=S.map(function(F){return String(F)});w.unshift("Warning: "+v),Function.prototype.apply.call(console[x],console,w)}}function i(x,v){return x===v&&(x!==0||1/x===1/v)||x!==x&&v!==v}var o=typeof Object.is=="function"?Object.is:i,a=e.useState,s=e.useEffect,u=e.useLayoutEffect,c=e.useDebugValue,l=!1,d=!1;function p(x,v,S){l||e.startTransition!==void 0&&(l=!0,n("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var y=v();if(!d){var T=v();o(y,T)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}var w=a({inst:{value:y,getSnapshot:v}}),F=w[0].inst,k=w[1];return u(function(){F.value=y,F.getSnapshot=v,A(F)&&k({inst:F})},[x,y,v]),s(function(){A(F)&&k({inst:F});var $=function(){A(F)&&k({inst:F})};return x($)},[x]),c(y),y}function A(x){var v=x.getSnapshot,S=x.value;try{var y=v();return!o(S,y)}catch{return!0}}function m(x,v,S){return v()}var g=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",_=!g,b=_?m:p,I=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:b;S1.useSyncExternalStore=I,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),S1}process.env.NODE_ENV==="production"?PC.exports=iUe():PC.exports=oUe();var xO=PC.exports;const aUe=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n&&(n.current=t)})},sUe=({contentComponent:e})=>{const t=xO.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getServerSnapshot);return E.createElement(E.Fragment,null,Object.values(t))};function uUe(){const e=new Set;let t={};return{subscribe(n){return e.add(n),()=>{e.delete(n)}},getSnapshot(){return t},getServerSnapshot(){return t},setRenderer(n,r){t={...t,[n]:nS.createPortal(r.reactElement,r.element,n)},e.forEach(i=>i())},removeRenderer(n){const r={...t};delete r[n],t=r,e.forEach(i=>i())}}}class cUe extends E.Component{constructor(t){var n;super(t),this.editorContentRef=E.createRef(),this.initialized=!1,this.state={hasContentComponentInitialized:!!(!((n=t.editor)===null||n===void 0)&&n.contentComponent)}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){const t=this.props.editor;if(t&&!t.isDestroyed&&t.options.element){if(t.contentComponent)return;const n=this.editorContentRef.current;n.append(...t.options.element.childNodes),t.setOptions({element:n}),t.contentComponent=uUe(),this.state.hasContentComponentInitialized||(this.unsubscribeToContentComponent=t.contentComponent.subscribe(()=>{this.setState(r=>r.hasContentComponentInitialized?r:{hasContentComponentInitialized:!0}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent()})),t.createNodeViews(),this.initialized=!0}}componentWillUnmount(){const t=this.props.editor;if(!t||(this.initialized=!1,t.isDestroyed||t.view.setProps({nodeViews:{}}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent(),t.contentComponent=null,!t.options.element.firstChild))return;const n=document.createElement("div");n.append(...t.options.element.childNodes),t.setOptions({element:n})}render(){const{editor:t,innerRef:n,...r}=this.props;return E.createElement(E.Fragment,null,E.createElement("div",{ref:aUe(n,this.editorContentRef),...r}),(t==null?void 0:t.contentComponent)&&E.createElement(sUe,{contentComponent:t.contentComponent}))}}const lUe=E.forwardRef((e,t)=>{const n=E.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[e.editor]);return E.createElement(cUe,{key:n,innerRef:t,...e})}),fUe=E.memo(lUe);var _1={};/**
83
83
  * @license React
84
84
  * use-sync-external-store-shim/with-selector.production.min.js
85
85
  *
@@ -95,9 +95,9 @@ npx @slicemachine/init@latest --repository ${i??"<my-project>"}`,language:"bash"
95
95
  *
96
96
  * This source code is licensed under the MIT license found in the
97
97
  * LICENSE file in the root directory of this source tree.
98
- */var gM;function pUe(){return gM||(gM=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=E,t=xO;function n(l,d){return l===d&&(l!==0||1/l===1/d)||l!==l&&d!==d}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,o=e.useRef,a=e.useEffect,s=e.useMemo,u=e.useDebugValue;function c(l,d,p,A,m){var g=o(null),_;g.current===null?(_={hasValue:!1,value:null},g.current=_):_=g.current;var b=s(function(){var S=!1,y,T,w=function(P){if(!S){S=!0,y=P;var K=A(P);if(m!==void 0&&_.hasValue){var J=_.value;if(m(J,K))return T=J,J}return T=K,K}var ee=y,re=T;if(r(ee,P))return re;var D=A(P);return m!==void 0&&m(re,D)?re:(y=P,T=D,D)},O=p===void 0?null:p,F=function(){return w(d())},$=O===null?void 0:function(){return w(O())};return[F,$]},[d,p,A,m]),I=b[0],x=b[1],v=i(l,I,x);return a(function(){_.hasValue=!0,_.value=v},[v]),u(v),v}I1.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),I1}process.env.NODE_ENV==="production"?dUe():pUe();process.env.NODE_ENV;const rQ=E.createContext({editor:null});rQ.Consumer;const AUe=()=>E.useContext(rQ),T1=e=>{const[t,n]=E.useState(null),{editor:r}=AUe();return E.useEffect(()=>{var i;if(!t||!((i=e.editor)===null||i===void 0)&&i.isDestroyed||r!=null&&r.isDestroyed)return;const{pluginKey:o="bubbleMenu",editor:a,tippyOptions:s={},updateDelay:u,shouldShow:c=null}=e,l=a||r;if(!l){console.warn("BubbleMenu component is not rendered inside of an editor component or does not have editor prop.");return}const d=nQ({updateDelay:u,editor:l,element:t,pluginKey:o,shouldShow:c,tippyOptions:s});return l.registerPlugin(d),()=>l.unregisterPlugin(o)},[e.editor,r,t]),E.createElement("div",{ref:n,className:e.className,style:{visibility:"hidden"}},e.children)},iQ=E.createContext({onDragStart:void 0}),hUe=()=>E.useContext(iQ),oQ=E.forwardRef((e,t)=>{const{onDragStart:n}=hUe(),r=e.as||"div";return E.createElement(r,{...e,ref:t,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...e.style}})});function mUe(e){return!!(typeof e=="function"&&e.prototype&&e.prototype.isReactComponent)}function gUe(e){var t;return typeof e=="object"&&((t=e.$$typeof)===null||t===void 0?void 0:t.toString())==="Symbol(react.forward_ref)"}class aQ{constructor(t,{editor:n,props:r={},as:i="div",className:o="",attrs:a}){this.ref=null,this.id=Math.floor(Math.random()*4294967295).toString(),this.component=t,this.editor=n,this.props=r,this.element=document.createElement(i),this.element.classList.add("react-renderer"),o&&this.element.classList.add(...o.split(" ")),a&&Object.keys(a).forEach(s=>{this.element.setAttribute(s,a[s])}),this.editor.isInitialized?nS.flushSync(()=>{this.render()}):this.render()}render(){var t;const n=this.component,r=this.props,i=this.editor;(mUe(n)||gUe(n))&&(r.ref=o=>{this.ref=o}),this.reactElement=E.createElement(n,r),(t=i==null?void 0:i.contentComponent)===null||t===void 0||t.setRenderer(this.id,this)}updateProps(t={}){this.props={...this.props,...t},this.render()}destroy(){var t;const n=this.editor;(t=n==null?void 0:n.contentComponent)===null||t===void 0||t.removeRenderer(this.id)}}class vUe extends dLe{mount(){const t={editor:this.editor,node:this.node,decorations:this.decorations,selected:!1,extension:this.extension,getPos:()=>this.getPos(),updateAttributes:(c={})=>this.updateAttributes(c),deleteNode:()=>this.deleteNode()};if(!this.component.displayName){const c=l=>l.charAt(0).toUpperCase()+l.substring(1);this.component.displayName=c(this.extension.name)}const i={onDragStart:this.onDragStart.bind(this),nodeViewContentRef:c=>{c&&this.contentDOMElement&&c.firstChild!==this.contentDOMElement&&c.appendChild(this.contentDOMElement)}},o=this.component,a=E.memo(c=>E.createElement(iQ.Provider,{value:i},E.createElement(o,c)));a.displayName="ReactNodeView",this.node.isLeaf?this.contentDOMElement=null:this.options.contentDOMElementTag?this.contentDOMElement=document.createElement(this.options.contentDOMElementTag):this.contentDOMElement=document.createElement(this.node.isInline?"span":"div"),this.contentDOMElement&&(this.contentDOMElement.style.whiteSpace="inherit");let s=this.node.isInline?"span":"div";this.options.as&&(s=this.options.as);const{className:u=""}=this.options;this.handleSelectionUpdate=this.handleSelectionUpdate.bind(this),this.editor.on("selectionUpdate",this.handleSelectionUpdate),this.renderer=new aQ(a,{editor:this.editor,props:t,as:s,className:`node-${this.node.type.name} ${u}`.trim(),attrs:this.options.attrs})}get dom(){var t;if(this.renderer.element.firstElementChild&&!(!((t=this.renderer.element.firstElementChild)===null||t===void 0)&&t.hasAttribute("data-node-view-wrapper")))throw Error("Please use the NodeViewWrapper component for your node view.");return this.renderer.element}get contentDOM(){return this.node.isLeaf?null:this.contentDOMElement}handleSelectionUpdate(){const{from:t,to:n}=this.editor.state.selection;if(t<=this.getPos()&&n>=this.getPos()+this.node.nodeSize){if(this.renderer.props.selected)return;this.selectNode()}else{if(!this.renderer.props.selected)return;this.deselectNode()}}update(t,n){const r=i=>{this.renderer.updateProps(i)};if(t.type!==this.node.type)return!1;if(typeof this.options.update=="function"){const i=this.node,o=this.decorations;return this.node=t,this.decorations=n,this.options.update({oldNode:i,oldDecorations:o,newNode:t,newDecorations:n,updateProps:()=>r({node:t,decorations:n})})}return t===this.node&&this.decorations===n||(this.node=t,this.decorations=n,r({node:t,decorations:n})),!0}selectNode(){this.renderer.updateProps({selected:!0}),this.renderer.element.classList.add("ProseMirror-selectednode")}deselectNode(){this.renderer.updateProps({selected:!1}),this.renderer.element.classList.remove("ProseMirror-selectednode")}destroy(){this.renderer.destroy(),this.editor.off("selectionUpdate",this.handleSelectionUpdate),this.contentDOMElement=null}}function sQ(e,t){return n=>n.editor.contentComponent?new vUe(e,n,t):{}}const yUe=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,bUe=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,CUe=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,SUe=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,_Ue=Nc.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:e=>e.style.fontWeight!=="normal"&&null},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}]},renderHTML({HTMLAttributes:e}){return["strong",Et(this.options.HTMLAttributes,e),0]},addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[ag({find:yUe,type:this.type}),ag({find:CUe,type:this.type})]},addPasteRules(){return[ug({find:bUe,type:this.type}),ug({find:SUe,type:this.type})]}});var qc=(e=>(e.Document="document",e.Mark="mark",e.Node="node",e))(qc||{}),vl=(e=>(e.Text="text",e.Embed="embed",e.Image="image",e))(vl||{});class IUe{constructor(t,n,r){Rn(this,"extType","document");this.name=t,this.component=n,this.converter=r}}class Mh{constructor(t,n,r,i,o,a=!1){Rn(this,"extType","node");Rn(this,"nodeType","text");this.richTextNodeTypes=t,this.name=n,this.component=r,this.converter=i,this.placeholder=o,this.lockedFormat=a}}function uQ(e){return e instanceof Mh}class TUe{constructor(t,n,r,i){Rn(this,"extType","node");Rn(this,"nodeType","embed");this.richTextNodeTypes=t,this.name=n,this.component=r,this.converter=i}}class xUe{constructor(t,n,r,i){Rn(this,"extType","node");Rn(this,"nodeType","image");this.richTextNodeTypes=t,this.name=n,this.component=r,this.converter=i}}class wUe extends Mh{constructor(t,n,r,i,o){super(t,"heading",n,i,o),this.levels=r}}class wO extends Mh{constructor(t,n,r,i){super(t,n,r,i)}}function EUe(e){return e instanceof wO}const cQ=jn.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:e}){return["br",Et(this.options.HTMLAttributes,e)]},renderText(){return`
98
+ */var gM;function pUe(){return gM||(gM=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=E,t=xO;function n(l,d){return l===d&&(l!==0||1/l===1/d)||l!==l&&d!==d}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,o=e.useRef,a=e.useEffect,s=e.useMemo,u=e.useDebugValue;function c(l,d,p,A,m){var g=o(null),_;g.current===null?(_={hasValue:!1,value:null},g.current=_):_=g.current;var b=s(function(){var S=!1,y,T,w=function(P){if(!S){S=!0,y=P;var K=A(P);if(m!==void 0&&_.hasValue){var Y=_.value;if(m(Y,K))return T=Y,Y}return T=K,K}var ee=y,re=T;if(r(ee,P))return re;var D=A(P);return m!==void 0&&m(re,D)?re:(y=P,T=D,D)},F=p===void 0?null:p,k=function(){return w(d())},$=F===null?void 0:function(){return w(F())};return[k,$]},[d,p,A,m]),I=b[0],x=b[1],v=i(l,I,x);return a(function(){_.hasValue=!0,_.value=v},[v]),u(v),v}I1.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),I1}process.env.NODE_ENV==="production"?dUe():pUe();process.env.NODE_ENV;const rQ=E.createContext({editor:null});rQ.Consumer;const AUe=()=>E.useContext(rQ),T1=e=>{const[t,n]=E.useState(null),{editor:r}=AUe();return E.useEffect(()=>{var i;if(!t||!((i=e.editor)===null||i===void 0)&&i.isDestroyed||r!=null&&r.isDestroyed)return;const{pluginKey:o="bubbleMenu",editor:a,tippyOptions:s={},updateDelay:u,shouldShow:c=null}=e,l=a||r;if(!l){console.warn("BubbleMenu component is not rendered inside of an editor component or does not have editor prop.");return}const d=nQ({updateDelay:u,editor:l,element:t,pluginKey:o,shouldShow:c,tippyOptions:s});return l.registerPlugin(d),()=>l.unregisterPlugin(o)},[e.editor,r,t]),E.createElement("div",{ref:n,className:e.className,style:{visibility:"hidden"}},e.children)},iQ=E.createContext({onDragStart:void 0}),hUe=()=>E.useContext(iQ),oQ=E.forwardRef((e,t)=>{const{onDragStart:n}=hUe(),r=e.as||"div";return E.createElement(r,{...e,ref:t,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...e.style}})});function mUe(e){return!!(typeof e=="function"&&e.prototype&&e.prototype.isReactComponent)}function gUe(e){var t;return typeof e=="object"&&((t=e.$$typeof)===null||t===void 0?void 0:t.toString())==="Symbol(react.forward_ref)"}class aQ{constructor(t,{editor:n,props:r={},as:i="div",className:o="",attrs:a}){this.ref=null,this.id=Math.floor(Math.random()*4294967295).toString(),this.component=t,this.editor=n,this.props=r,this.element=document.createElement(i),this.element.classList.add("react-renderer"),o&&this.element.classList.add(...o.split(" ")),a&&Object.keys(a).forEach(s=>{this.element.setAttribute(s,a[s])}),this.editor.isInitialized?nS.flushSync(()=>{this.render()}):this.render()}render(){var t;const n=this.component,r=this.props,i=this.editor;(mUe(n)||gUe(n))&&(r.ref=o=>{this.ref=o}),this.reactElement=E.createElement(n,r),(t=i==null?void 0:i.contentComponent)===null||t===void 0||t.setRenderer(this.id,this)}updateProps(t={}){this.props={...this.props,...t},this.render()}destroy(){var t;const n=this.editor;(t=n==null?void 0:n.contentComponent)===null||t===void 0||t.removeRenderer(this.id)}}class vUe extends dLe{mount(){const t={editor:this.editor,node:this.node,decorations:this.decorations,selected:!1,extension:this.extension,getPos:()=>this.getPos(),updateAttributes:(c={})=>this.updateAttributes(c),deleteNode:()=>this.deleteNode()};if(!this.component.displayName){const c=l=>l.charAt(0).toUpperCase()+l.substring(1);this.component.displayName=c(this.extension.name)}const i={onDragStart:this.onDragStart.bind(this),nodeViewContentRef:c=>{c&&this.contentDOMElement&&c.firstChild!==this.contentDOMElement&&c.appendChild(this.contentDOMElement)}},o=this.component,a=E.memo(c=>E.createElement(iQ.Provider,{value:i},E.createElement(o,c)));a.displayName="ReactNodeView",this.node.isLeaf?this.contentDOMElement=null:this.options.contentDOMElementTag?this.contentDOMElement=document.createElement(this.options.contentDOMElementTag):this.contentDOMElement=document.createElement(this.node.isInline?"span":"div"),this.contentDOMElement&&(this.contentDOMElement.style.whiteSpace="inherit");let s=this.node.isInline?"span":"div";this.options.as&&(s=this.options.as);const{className:u=""}=this.options;this.handleSelectionUpdate=this.handleSelectionUpdate.bind(this),this.editor.on("selectionUpdate",this.handleSelectionUpdate),this.renderer=new aQ(a,{editor:this.editor,props:t,as:s,className:`node-${this.node.type.name} ${u}`.trim(),attrs:this.options.attrs})}get dom(){var t;if(this.renderer.element.firstElementChild&&!(!((t=this.renderer.element.firstElementChild)===null||t===void 0)&&t.hasAttribute("data-node-view-wrapper")))throw Error("Please use the NodeViewWrapper component for your node view.");return this.renderer.element}get contentDOM(){return this.node.isLeaf?null:this.contentDOMElement}handleSelectionUpdate(){const{from:t,to:n}=this.editor.state.selection;if(t<=this.getPos()&&n>=this.getPos()+this.node.nodeSize){if(this.renderer.props.selected)return;this.selectNode()}else{if(!this.renderer.props.selected)return;this.deselectNode()}}update(t,n){const r=i=>{this.renderer.updateProps(i)};if(t.type!==this.node.type)return!1;if(typeof this.options.update=="function"){const i=this.node,o=this.decorations;return this.node=t,this.decorations=n,this.options.update({oldNode:i,oldDecorations:o,newNode:t,newDecorations:n,updateProps:()=>r({node:t,decorations:n})})}return t===this.node&&this.decorations===n||(this.node=t,this.decorations=n,r({node:t,decorations:n})),!0}selectNode(){this.renderer.updateProps({selected:!0}),this.renderer.element.classList.add("ProseMirror-selectednode")}deselectNode(){this.renderer.updateProps({selected:!1}),this.renderer.element.classList.remove("ProseMirror-selectednode")}destroy(){this.renderer.destroy(),this.editor.off("selectionUpdate",this.handleSelectionUpdate),this.contentDOMElement=null}}function sQ(e,t){return n=>n.editor.contentComponent?new vUe(e,n,t):{}}const yUe=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,bUe=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,CUe=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,SUe=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,_Ue=Nc.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:e=>e.style.fontWeight!=="normal"&&null},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}]},renderHTML({HTMLAttributes:e}){return["strong",Et(this.options.HTMLAttributes,e),0]},addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[ag({find:yUe,type:this.type}),ag({find:CUe,type:this.type})]},addPasteRules(){return[ug({find:bUe,type:this.type}),ug({find:SUe,type:this.type})]}});var qc=(e=>(e.Document="document",e.Mark="mark",e.Node="node",e))(qc||{}),vl=(e=>(e.Text="text",e.Embed="embed",e.Image="image",e))(vl||{});class IUe{constructor(t,n,r){Rn(this,"extType","document");this.name=t,this.component=n,this.converter=r}}class Mh{constructor(t,n,r,i,o,a=!1){Rn(this,"extType","node");Rn(this,"nodeType","text");this.richTextNodeTypes=t,this.name=n,this.component=r,this.converter=i,this.placeholder=o,this.lockedFormat=a}}function uQ(e){return e instanceof Mh}class TUe{constructor(t,n,r,i){Rn(this,"extType","node");Rn(this,"nodeType","embed");this.richTextNodeTypes=t,this.name=n,this.component=r,this.converter=i}}class xUe{constructor(t,n,r,i){Rn(this,"extType","node");Rn(this,"nodeType","image");this.richTextNodeTypes=t,this.name=n,this.component=r,this.converter=i}}class wUe extends Mh{constructor(t,n,r,i,o){super(t,"heading",n,i,o),this.levels=r}}class wO extends Mh{constructor(t,n,r,i){super(t,n,r,i)}}function EUe(e){return e instanceof wO}const cQ=jn.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:e}){return["br",Et(this.options.HTMLAttributes,e)]},renderText(){return`
99
99
  `},addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:r})=>e.first([()=>e.exitCode(),()=>e.command(()=>{const{selection:i,storedMarks:o}=n;if(i.$from.parent.type.spec.isolating)return!1;const{keepMarks:a}=this.options,{splittableMarks:s}=r.extensionManager,u=o||i.$to.parentOffset&&i.$from.marks();return t().insertContent({type:this.name}).command(({tr:c,dispatch:l})=>{if(l&&u&&a){const d=u.filter(p=>s.includes(p.type.name));c.ensureMarks(d)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),Pu={isHardBreak(e){return e.type.name===cQ.name},children:{reduce(e,t,n){let r=n;return e.forEach((i,o,a)=>{r=t(r,i,a)}),r},map(e,t){return this.reduce(e,(n,r)=>[...n,t(r)],[])},exists(e,t){return this.reduce(e,(n,r)=>n||t(r),!1)},filter(e,t){return this.reduce(e,(n,r)=>[...n,...t(r)?[r]:[]],[])}},marks:{reduce(e,t,n){let r=n;return e.marks.forEach((i,o)=>{r=t(r,i,o)}),r},map(e,t){return this.reduce(e,(n,r)=>[...n,t(r)],[])},filter(e,t){return this.reduce(e,(n,r)=>[...n,...t(r)?[r]:[]],[])}}};function $Ue(e){if(!e||!(e!=null&&e.single)&&!(e!=null&&e.multi))return vM();const t=RUe(e);if(!t.size)return vM();const n=OUe(t),r=FUe(n,e);return{nodeTypes:t,extensions:r}}function RUe(e){const n=(e.single||e.multi||"").split(/\s*,\s*/).map(r=>{const i=fe.RichTextNodeTypeCodec.decode(r);return i._tag==="Right"?i.right:void 0}).filter(io.isDefined);return new Set(n)}function OUe(e){return HQ(e).filter(n=>Fn.some(e,r=>n.richTextNodeTypes.includes(r)))}function FUe(e,t){var r;const n=new Set(e);return Fn.some(n,EUe)&&n.add(ao),Fn.some(n,uQ)||n.add(ao),(r=t==null?void 0:t.labels)!=null&&r.length&&n.add(LO),[...n]}function vM(){return{extensions:HQ(),nodeTypes:new Set(Ql.keys(fe.RichTextNodeTypeCodec.keys))}}class kUe{constructor(t,n,r){Rn(this,"extType",qc.Mark);Rn(this,"richTextNodeTypes",[fe.RichTextNodeType.strong]);this.name=t,this.component=n,this.converter=r}}const lQ="bold",fQ=_Ue.extend({name:lQ}),MUe={fromPrismic(e){return function(){var t;return(t=e.marks[fQ.name])==null?void 0:t.create()}},toPrismic(){}},LUe=new kUe(lQ,fQ,MUe),EO=LUe,jUe=jn.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:e}){return["li",Et(this.options.HTMLAttributes,e),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),yM=Nc.create({name:"textStyle",priority:101,addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:e=>e.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["span",Et(this.options.HTMLAttributes,e),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:e,commands:t})=>{const n=mO(e,this.type);return Object.entries(n).some(([,i])=>!!i)?!0:t.unsetMark(this.name)}}}}),bM=/^\s*([-+*])\s$/,UUe=jn.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:e}){return["ul",Et(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleBulletList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(jUe.name,this.editor.getAttributes(yM.name)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let e=sg({find:bM,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(e=sg({find:bM,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(yM.name),editor:this.editor})),[e]}}),BUe=jn.create({name:"doc",topNode:!0,content:"block+"}),PUe=jn.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:e}){return["li",Et(this.options.HTMLAttributes,e),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),dQ=PUe.extend({name:"listItem",content:"paragraph*",addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name)}}}),DUe={fromPrismic(e){return function(t){var r;const n=ao.converter.fromPrismic(e)(t);if(n)return(r=e.nodes[dQ.name])==null?void 0:r.create({},n)}},toPrismic(e,t){return Pu.children.reduce(e,(n,r)=>{const i=ao.converter.toPrismic(r),o=(()=>i instanceof Array?i.map(a=>({...a,type:t})):i?[{...i,type:t}]:[])();return[...n,...o]},[])}},ql={component:dQ,converter:DUe,placeholder:"List"};function WUe(e,t){return e.copy(e.content.append(t.content))}const ll={heading1:"heading1",heading2:"heading2",heading3:"heading3",heading4:"heading4",heading5:"heading5",heading6:"heading6",paragraph:"paragraph",preformatted:"preformatted",strong:"strong",em:"em",listItem:"list-item",oListItem:"o-list-item",list:"group-list-item",oList:"group-o-list-item",image:"image",embed:"embed",hyperlink:"hyperlink",label:"label",span:"span"},ib=()=>(++ib.i).toString();ib.i=0;const KUe=e=>{const t=NUe(e),n=[];for(let r=0;r<t.length;r++)n.push(pQ(t[r]));return{key:ib(),children:n}},Dd=(e,t=[])=>({key:ib(),type:e.type,text:"text"in e?e.text:void 0,node:e,children:t}),x1=e=>Dd({type:ll.span,text:e,spans:[]}),NUe=e=>{const t=e.slice(0);for(let n=0;n<t.length;n++){const r=t[n];if(r.type===ll.listItem||r.type===ll.oListItem){const i=[r];for(;t[n+1]&&t[n+1].type===r.type;)i.push(t[n+1]),t.splice(n,1);r.type===ll.listItem?t[n]={type:ll.list,items:i}:t[n]={type:ll.oList,items:i}}}return t},pQ=e=>{if("text"in e)return Dd(e,AQ(e.spans,e));if("items"in e){const t=[];for(let n=0;n<e.items.length;n++)t.push(pQ(e.items[n]));return Dd(e,t)}return Dd(e)},AQ=(e,t,n)=>{if(!e.length)return[x1(t.text)];const r=e.slice(0);r.sort((o,a)=>o.start-a.start||a.end-o.end);const i=[];for(let o=0;o<r.length;o++){const a=r[o],s=n&&n.start||0,u=a.start-s,c=a.end-s,l=t.text.slice(u,c),d=[];for(let A=o;A<r.length;A++){const m=r[A];m!==a&&m.start>=a.start&&m.end<=a.end&&(d.push(m),r.splice(A,1),A--)}o===0&&u>0&&i.push(x1(t.text.slice(0,u)));const p={...a,text:l};i.push(Dd(p,AQ(d,{...t,text:l},a))),c<t.text.length&&i.push(x1(t.text.slice(c,r[o+1]?r[o+1].start-s:void 0)))}return i},qUe=(e,t)=>hQ(KUe(e).children,t),hQ=(e,t)=>{const n=[];for(let r=0;r<e.length;r++){const i=e[r],o=t(i.type,i.node,i.text,hQ(i.children,t),i.key);o!=null&&n.push(o)}return n},VUe=jn.create({name:"text",group:"inline"});function QUe(e){return e.reduce((t,n)=>{const r=(t[n.type]||[]).concat(n);return{...t,[n.type]:r}},{})}function CM(e){return e.sort((t,n)=>t.start-n.start)}function zUe(e){const t=QUe(e),n=Object.entries(t).map(([r,i])=>CM(i).reduce((a,s)=>{if(!a.length)return[s];const u=a.length-1,c=a[u];return c?c.end<s.start?[...a,s]:c.end>=s.end?a:[...a.slice(0,u),{...c,end:s.end}]:a},[])).flat();return CM(n)}const dg=cQ.extend({name:"hard_break"}),pg=`
100
- `,mQ={fromPrismic(e){return function(t){var n;if(t===pg)return(n=e.nodes[dg.name])==null?void 0:n.create({})}},toPrismic(e){if(e.type.name===dg.name)return pg}},w1={isEmptyLine(e){return e.length===0},isFirst(e){return e===0}};function HUe(e,t){return function(n){const r=mQ.fromPrismic(e)(pg);if(!r)return[n(t)];const i=t.split(pg);return i.length===1?t.length?[n(t)]:[r]:i.reduce((o,a,s)=>w1.isFirst(s)?w1.isEmptyLine(a)?o:[...o,n(a)]:w1.isEmptyLine(a)?[...o,r]:[...o,r,n(a)],[])}}const YUe={name:dg.name,component:dg,converter:mQ,splitTextToNodes:HUe},Ag=YUe,gQ={fromPrismic(e){return t=>{switch(t.type){case"hyperlink":return VQ.converter.fromPrismic(e)(t);case"em":return MO.converter.fromPrismic(e)(t);case"strong":return EO.converter.fromPrismic(e)(t);case"label":return LO.converter.fromPrismic(e)(t);case"list-item":return}}},toPrismic(e,t,n){const r=zQ.find(i=>e.type.name===i.name);if(!r)throw new Error(`Invalid mark extension '${e.type.name}'.`);switch(r.name){case"bold":return{type:"strong",start:t,end:n};case"em":return{type:r.name,start:t,end:n};case"hyperlink":return{type:r.name,start:t,end:n,data:r.converter.toPrismic(e)};case"label":return{type:r.name,start:t,end:n,data:r.converter.toPrismic(e)}}}},GUe={strong:"bold",label:"label",em:"em",hyperlink:"hyperlink","list-item":void 0},SM=VUe.extend({name:"text"}),JUe={fromPrismic(e){return function(t,n,r=!1){const i={type:t,text:n.content.text,spans:n.content.spans||[]};return qUe([i],ZUe(e,r)).flat()}},toPrismic(e,t,n){const r=Pu.children.reduce(e,(i,o)=>{const a=(()=>o.type.name===Ag.name?Ag.converter.toPrismic(o):o.textContent)(),s=a?i.text+a:i.text,u=i.text.length,c=s.length,l=(()=>o.marks.length?Pu.marks.map(o,p=>gQ.toPrismic(p,u,c)):void 0)();return{...i,text:s,spans:l?[...i.spans,...l]:i.spans}},{text:"",spans:[]});return{type:t,content:{text:r.text,spans:[...zUe(r.spans)].sort((i,o)=>i.type.localeCompare(o.type))},...n}}};function ZUe(e,t=!1){return(n,r,i,o)=>{if(n==="span"&&i&&i.length)return t?[e.text(i)]:Ag.splitTextToNodes(e,i)(u=>e.text(u));const a=gQ.fromPrismic(e)(r);return a?XUe(a,o):o.flat()}}function XUe(e,t){return t.flat().map(r=>{const o=[...r.marks,e].sort((a,s)=>a.type.name.localeCompare(s.type.name));return r.mark(o)})}const e2e={name:SM.name,component:SM,converter:JUe},Du=e2e,$O="document";function t2e(e){return BUe.extend({name:$O,content:e?"block+":"block"})}function n2e(e){return{fromPrismic(t,n,r){var o;const i=r.value.reduce((a,s)=>{const{extension:u,block:c}=a2e(e,s,t,n),l=i2e({extension:u,block:c,schema:t}),d=a.slice(0,a.length-1),p=kt.last(a),A=o2e({node:l,previousNode:p});return A.updatedNode?[...A.merged?d:a,A.updatedNode]:a},[]);return(o=t.nodes[$O])==null?void 0:o.create({},i)},toPrismic(t){return{__TYPE__:"StructuredTextContent",value:[...Pu.children.reduce(t,(r,i)=>{const o=Object.values(e).find(s=>i.type.name===s.name),a=o==null?void 0:o.converter.toPrismic(i);return a||console.warn(`Cannot convert node of type '${i.type.name}'.`),a?[...r,...a instanceof Array?a:[a]]:r},[])]}}}}const r2e=new IUe($O,t2e,n2e),DC=r2e;function i2e(e){const{extension:t,block:n,schema:r}=e;if(t)switch(t.nodeType){case vl.Embed:return ye.EmbedBlock.is(n)?t.converter.fromPrismic(r)(n):void 0;case vl.Text:return ye.TextBlock.is(n)?t.converter.fromPrismic(r)(n):void 0;case vl.Image:return ye.ImageBlock.is(n)?t.converter.fromPrismic(r)(n):void 0}}function o2e(e){const{node:t,previousNode:n}=e;return!t||!n?{merged:!1,updatedNode:t}:t.type.name===n.type.name&&(t.type.name===yg.name||t.type.name===Cg.name)?{merged:!0,updatedNode:WUe(n,t)}:{merged:!1,updatedNode:t}}function a2e(e,t,n,r){var s;const i=e.find(u=>u.richTextNodeTypes.includes(t.type)&&r.has(t.type));if(i)return{extension:i,block:t};if(!ye.TextBlock.is(t))return{extension:void 0,block:t};const o=e.find(u=>uQ(u)&&u.name in n.nodes),a=(s=t.content.spans)==null?void 0:s.filter(u=>{const c=GUe[u.type];return c&&c in n.marks});return{extension:o,block:{...t,content:{text:t.content.text,spans:a}}}}const s2e=dr.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new zr({key:new eo("placeholder"),props:{decorations:({doc:e,selection:t})=>{const n=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:r}=t,i=[];if(!n)return null;const o=this.editor.isEmpty;return e.descendants((a,s)=>{const u=r>=s&&r<=s+a.nodeSize,c=!a.isLeaf&&RV(a);if((u||!this.options.showOnlyCurrent)&&c){const l=[this.options.emptyNodeClass];o&&l.push(this.options.emptyEditorClass);const d=wi.node(s,s+a.nodeSize,{class:l.join(" "),"data-placeholder":typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:a,pos:s,hasAnchor:u}):this.options.placeholder});i.push(d)}return this.options.includeChildren}),Yt.create(e,i)}}})]}}),u2e=jn.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:e}){return["p",Et(this.options.HTMLAttributes,e),0]},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),Am="ltr",lu="rtl",Ho="dir",c2e=fe.RichTextNodeType.rtl,l2e=dr.create({name:"textDirection",addOptions(){return{supportedExtensionNames:[]}},addGlobalAttributes(){return[{types:this.options.supportedExtensionNames,attributes:{[Ho]:{default:Am,parseHTML:e=>e.getAttribute(Ho),renderHTML:e=>({[Ho]:WC(e[Ho])})}}}]},addCommands(){return{setDirection:e=>({commands:t})=>{switch(e){case Am:return t.setLeftToRight();case lu:return t.setRightToLeft()}},toggleDirection:e=>({commands:t})=>{const n=e===lu?Am:lu;return t.setDirection(n)},setRightToLeft:()=>({commands:e})=>this.options.supportedExtensionNames.every(t=>e.updateAttributes(t,{[Ho]:lu})),setLeftToRight:()=>({commands:e})=>this.options.supportedExtensionNames.every(t=>e.resetAttributes(t,Ho))}},addKeyboardShortcuts(){return{"Mod-Shift-r":()=>this.editor.commands.setRightToLeft(),"Mod-Shift-l":()=>this.editor.commands.setLeftToRight()}}}),sa={parseNodeAttrsDirection(e){return WC(e[Ho])},fromPrismic(e){return{[Ho]:WC(e.direction)}},toPrismic(e){return{direction:this.parseNodeAttrsDirection(e.attrs)}}};function WC(e){return e===lu?lu:Am}const hg=u2e.extend({name:"paragraph",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:e}){return["p",Et(this.options.HTMLAttributes,e),0]}}),f2e={fromPrismic(e){return function(t){var r;const n=Du.converter.fromPrismic(e)(hg.name,t);return(r=e.nodes[hg.name])==null?void 0:r.create(sa.fromPrismic(t),n)}},toPrismic(e){return Du.converter.toPrismic(e,fe.RichTextNodeType.paragraph,sa.toPrismic(e))}},d2e=new Mh([fe.RichTextNodeType.paragraph],hg.name,hg,f2e,"Type '/' for commands"),ao=d2e,p2e=e=>s2e.configure({includeChildren:!0,placeholder:t=>A2e(t,e),showOnlyCurrent:!1,showOnlyWhenEditable:!1});function A2e(e,t){const{editor:n,hasAnchor:r,pos:i,node:o}=e,{placeholderByNodeType:a,unfocusedPlaceholder:s,nodeExtensions:u}=t,c=!Pu.children.exists(n.state.doc,I=>I===o),l=n.isEditable;if(s&&!n.isFocused&&n.isEmpty&&i===0)return s;const d=o.type.name!==ao.name,p=n.isFocused&&r||d||c,A=u.filter(I=>I!==ao).length>1;function m(I){return I===ao.placeholder?l&&p&&A:l&&p}function g(){if(c)return ql.placeholder;const I=a[o.type.name];return typeof I=="string"?I:I==null?void 0:I(o.attrs)}const _=g();return m(_)&&_||""}function ob(e){return e.split("-")[1]}function vQ(e){return e==="y"?"height":"width"}function is(e){return e.split("-")[0]}function Lh(e){return["top","bottom"].includes(is(e))?"x":"y"}function _M(e,t,n){let{reference:r,floating:i}=e;const o=r.x+r.width/2-i.width/2,a=r.y+r.height/2-i.height/2,s=Lh(t),u=vQ(s),c=r[u]/2-i[u]/2,l=s==="x";let d;switch(is(t)){case"top":d={x:o,y:r.y-i.height};break;case"bottom":d={x:o,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:a};break;case"left":d={x:r.x-i.width,y:a};break;default:d={x:r.x,y:r.y}}switch(ob(t)){case"start":d[s]-=c*(n&&l?-1:1);break;case"end":d[s]+=c*(n&&l?-1:1)}return d}const h2e=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=o.filter(Boolean),u=await(a.isRTL==null?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:l,y:d}=_M(c,r,u),p=r,A={},m=0;for(let g=0;g<s.length;g++){const{name:_,fn:b}=s[g],{x:I,y:x,data:v,reset:S}=await b({x:l,y:d,initialPlacement:r,placement:p,strategy:i,middlewareData:A,rects:c,platform:a,elements:{reference:e,floating:t}});l=I??l,d=x??d,A={...A,[_]:{...A[_],...v}},S&&m<=50&&(m++,typeof S=="object"&&(S.placement&&(p=S.placement),S.rects&&(c=S.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):S.rects),{x:l,y:d}=_M(c,p,u)),g=-1)}return{x:l,y:d,placement:p,strategy:i,middlewareData:A}};function m2e(e){return typeof e!="number"?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(e):{top:e,right:e,bottom:e,left:e}}function KC(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function yQ(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:a,elements:s,strategy:u}=e,{boundary:c="clippingAncestors",rootBoundary:l="viewport",elementContext:d="floating",altBoundary:p=!1,padding:A=0}=t,m=m2e(A),g=s[p?d==="floating"?"reference":"floating":d],_=KC(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(g)))==null||n?g:g.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(s.floating)),boundary:c,rootBoundary:l,strategy:u})),b=d==="floating"?{...a.floating,x:r,y:i}:a.reference,I=await(o.getOffsetParent==null?void 0:o.getOffsetParent(s.floating)),x=await(o.isElement==null?void 0:o.isElement(I))&&await(o.getScale==null?void 0:o.getScale(I))||{x:1,y:1},v=KC(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({rect:b,offsetParent:I,strategy:u}):b);return{top:(_.top-v.top+m.top)/x.y,bottom:(v.bottom-_.bottom+m.bottom)/x.y,left:(_.left-v.left+m.left)/x.x,right:(v.right-_.right+m.right)/x.x}}const g2e=Math.min,v2e=Math.max;function IM(e,t,n){return v2e(e,g2e(t,n))}const y2e=["top","right","bottom","left"];y2e.reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]);const b2e={left:"right",right:"left",bottom:"top",top:"bottom"};function mg(e){return e.replace(/left|right|bottom|top/g,t=>b2e[t])}function C2e(e,t,n){n===void 0&&(n=!1);const r=ob(e),i=Lh(e),o=vQ(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=mg(a)),{main:a,cross:mg(a)}}const S2e={start:"end",end:"start"};function E1(e){return e.replace(/start|end/g,t=>S2e[t])}const _2e=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:i,rects:o,initialPlacement:a,platform:s,elements:u}=t,{mainAxis:c=!0,crossAxis:l=!0,fallbackPlacements:d,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:A="none",flipAlignment:m=!0,...g}=e,_=is(r),b=is(a)===a,I=await(s.isRTL==null?void 0:s.isRTL(u.floating)),x=d||(b||!m?[mg(a)]:function($){const P=mg($);return[E1($),P,E1(P)]}(a));d||A==="none"||x.push(...function($,P,K,J){const ee=ob($);let re=function(D,Y,M){const k=["left","right"],q=["right","left"],ue=["top","bottom"],ke=["bottom","top"];switch(D){case"top":case"bottom":return M?Y?q:k:Y?k:q;case"left":case"right":return Y?ue:ke;default:return[]}}(is($),K==="start",J);return ee&&(re=re.map(D=>D+"-"+ee),P&&(re=re.concat(re.map(E1)))),re}(a,m,A,I));const v=[a,...x],S=await yQ(t,g),y=[];let T=((n=i.flip)==null?void 0:n.overflows)||[];if(c&&y.push(S[_]),l){const{main:$,cross:P}=C2e(r,o,I);y.push(S[$],S[P])}if(T=[...T,{placement:r,overflows:y}],!y.every($=>$<=0)){var w,O;const $=(((w=i.flip)==null?void 0:w.index)||0)+1,P=v[$];if(P)return{data:{index:$,overflows:T},reset:{placement:P}};let K=(O=T.filter(J=>J.overflows[0]<=0).sort((J,ee)=>J.overflows[1]-ee.overflows[1])[0])==null?void 0:O.placement;if(!K)switch(p){case"bestFit":{var F;const J=(F=T.map(ee=>[ee.placement,ee.overflows.filter(re=>re>0).reduce((re,D)=>re+D,0)]).sort((ee,re)=>ee[1]-re[1])[0])==null?void 0:F[0];J&&(K=J);break}case"initialPlacement":K=a}if(r!==K)return{reset:{placement:K}}}return{}}}},I2e=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await async function(o,a){const{placement:s,platform:u,elements:c}=o,l=await(u.isRTL==null?void 0:u.isRTL(c.floating)),d=is(s),p=ob(s),A=Lh(s)==="x",m=["left","top"].includes(d)?-1:1,g=l&&A?-1:1,_=typeof a=="function"?a(o):a;let{mainAxis:b,crossAxis:I,alignmentAxis:x}=typeof _=="number"?{mainAxis:_,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,..._};return p&&typeof x=="number"&&(I=p==="end"?-1*x:x),A?{x:I*g,y:b*m}:{x:b*m,y:I*g}}(t,e);return{x:n+i.x,y:r+i.y,data:i}}}};function bQ(e){return e==="x"?"y":"x"}const T2e=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:_=>{let{x:b,y:I}=_;return{x:b,y:I}}},...u}=e,c={x:n,y:r},l=await yQ(t,u),d=Lh(is(i)),p=bQ(d);let A=c[d],m=c[p];if(o){const _=d==="y"?"bottom":"right";A=IM(A+l[d==="y"?"top":"left"],A,A-l[_])}if(a){const _=p==="y"?"bottom":"right";m=IM(m+l[p==="y"?"top":"left"],m,m-l[_])}const g=s.fn({...t,[d]:A,[p]:m});return{...g,data:{x:g.x-n,y:g.y-r}}}}},x2e=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:u=!0,crossAxis:c=!0}=e,l={x:n,y:r},d=Lh(i),p=bQ(d);let A=l[d],m=l[p];const g=typeof s=="function"?s(t):s,_=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(u){const x=d==="y"?"height":"width",v=o.reference[d]-o.floating[x]+_.mainAxis,S=o.reference[d]+o.reference[x]-_.mainAxis;A<v?A=v:A>S&&(A=S)}if(c){var b,I;const x=d==="y"?"width":"height",v=["top","left"].includes(is(i)),S=o.reference[p]-o.floating[x]+(v&&((b=a.offset)==null?void 0:b[p])||0)+(v?0:_.crossAxis),y=o.reference[p]+o.reference[x]+(v?0:((I=a.offset)==null?void 0:I[p])||0)-(v?_.crossAxis:0);m<S?m=S:m>y&&(m=y)}return{[d]:A,[p]:m}}}};function Or(e){var t;return((t=e.ownerDocument)==null?void 0:t.defaultView)||window}function so(e){return Or(e).getComputedStyle(e)}const TM=Math.min,Wd=Math.max,gg=Math.round;function CQ(e){const t=so(e);let n=parseFloat(t.width),r=parseFloat(t.height);const i=e.offsetWidth,o=e.offsetHeight,a=gg(n)!==i||gg(r)!==o;return a&&(n=i,r=o),{width:n,height:r,fallback:a}}function As(e){return _Q(e)?(e.nodeName||"").toLowerCase():""}let tm;function SQ(){if(tm)return tm;const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?(tm=e.brands.map(t=>t.brand+"/"+t.version).join(" "),tm):navigator.userAgent}function uo(e){return e instanceof Or(e).HTMLElement}function Oi(e){return e instanceof Or(e).Element}function _Q(e){return e instanceof Or(e).Node}function xM(e){return typeof ShadowRoot>"u"?!1:e instanceof Or(e).ShadowRoot||e instanceof ShadowRoot}function ab(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=so(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function w2e(e){return["table","td","th"].includes(As(e))}function NC(e){const t=/firefox/i.test(SQ()),n=so(e),r=n.backdropFilter||n.WebkitBackdropFilter;return n.transform!=="none"||n.perspective!=="none"||!!r&&r!=="none"||t&&n.willChange==="filter"||t&&!!n.filter&&n.filter!=="none"||["transform","perspective"].some(i=>n.willChange.includes(i))||["paint","layout","strict","content"].some(i=>{const o=n.contain;return o!=null&&o.includes(i)})}function qC(){return/^((?!chrome|android).)*safari/i.test(SQ())}function RO(e){return["html","body","#document"].includes(As(e))}function IQ(e){return Oi(e)?e:e.contextElement}const TQ={x:1,y:1};function yl(e){const t=IQ(e);if(!uo(t))return TQ;const n=t.getBoundingClientRect(),{width:r,height:i,fallback:o}=CQ(t);let a=(o?gg(n.width):n.width)/r,s=(o?gg(n.height):n.height)/i;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}function Wu(e,t,n,r){var i,o;t===void 0&&(t=!1),n===void 0&&(n=!1);const a=e.getBoundingClientRect(),s=IQ(e);let u=TQ;t&&(r?Oi(r)&&(u=yl(r)):u=yl(e));const c=s?Or(s):window,l=qC()&&n;let d=(a.left+(l&&((i=c.visualViewport)==null?void 0:i.offsetLeft)||0))/u.x,p=(a.top+(l&&((o=c.visualViewport)==null?void 0:o.offsetTop)||0))/u.y,A=a.width/u.x,m=a.height/u.y;if(s){const g=Or(s),_=r&&Oi(r)?Or(r):r;let b=g.frameElement;for(;b&&r&&_!==g;){const I=yl(b),x=b.getBoundingClientRect(),v=getComputedStyle(b);x.x+=(b.clientLeft+parseFloat(v.paddingLeft))*I.x,x.y+=(b.clientTop+parseFloat(v.paddingTop))*I.y,d*=I.x,p*=I.y,A*=I.x,m*=I.y,d+=x.x,p+=x.y,b=Or(b).frameElement}}return{width:A,height:m,top:p,right:d+A,bottom:p+m,left:d,x:d,y:p}}function as(e){return((_Q(e)?e.ownerDocument:e.document)||window.document).documentElement}function sb(e){return Oi(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function xQ(e){return Wu(as(e)).left+sb(e).scrollLeft}function wp(e){if(As(e)==="html")return e;const t=e.assignedSlot||e.parentNode||xM(e)&&e.host||as(e);return xM(t)?t.host:t}function wQ(e){const t=wp(e);return RO(t)?t.ownerDocument.body:uo(t)&&ab(t)?t:wQ(t)}function bu(e,t){var n;t===void 0&&(t=[]);const r=wQ(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Or(r);return i?t.concat(o,o.visualViewport||[],ab(r)?r:[]):t.concat(r,bu(r))}function wM(e,t,n){let r;if(t==="viewport")r=function(a,s){const u=Or(a),c=as(a),l=u.visualViewport;let d=c.clientWidth,p=c.clientHeight,A=0,m=0;if(l){d=l.width,p=l.height;const g=qC();(!g||g&&s==="fixed")&&(A=l.offsetLeft,m=l.offsetTop)}return{width:d,height:p,x:A,y:m}}(e,n);else if(t==="document")r=function(a){const s=as(a),u=sb(a),c=a.ownerDocument.body,l=Wd(s.scrollWidth,s.clientWidth,c.scrollWidth,c.clientWidth),d=Wd(s.scrollHeight,s.clientHeight,c.scrollHeight,c.clientHeight);let p=-u.scrollLeft+xQ(a);const A=-u.scrollTop;return so(c).direction==="rtl"&&(p+=Wd(s.clientWidth,c.clientWidth)-l),{width:l,height:d,x:p,y:A}}(as(e));else if(Oi(t))r=function(a,s){const u=Wu(a,!0,s==="fixed"),c=u.top+a.clientTop,l=u.left+a.clientLeft,d=uo(a)?yl(a):{x:1,y:1};return{width:a.clientWidth*d.x,height:a.clientHeight*d.y,x:l*d.x,y:c*d.y}}(t,n);else{const a={...t};if(qC()){var i,o;const s=Or(e);a.x-=((i=s.visualViewport)==null?void 0:i.offsetLeft)||0,a.y-=((o=s.visualViewport)==null?void 0:o.offsetTop)||0}r=a}return KC(r)}function EM(e,t){return uo(e)&&so(e).position!=="fixed"?t?t(e):e.offsetParent:null}function $M(e,t){const n=Or(e);let r=EM(e,t);for(;r&&w2e(r)&&so(r).position==="static";)r=EM(r,t);return r&&(As(r)==="html"||As(r)==="body"&&so(r).position==="static"&&!NC(r))?n:r||function(i){let o=wp(i);for(;uo(o)&&!RO(o);){if(NC(o))return o;o=wp(o)}return null}(e)||n}function E2e(e,t,n){const r=uo(t),i=as(t),o=Wu(e,!0,n==="fixed",t);let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&n!=="fixed")if((As(t)!=="body"||ab(i))&&(a=sb(t)),uo(t)){const u=Wu(t,!0);s.x=u.x+t.clientLeft,s.y=u.y+t.clientTop}else i&&(s.x=xQ(i));return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}const $2e={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=n==="clippingAncestors"?function(c,l){const d=l.get(c);if(d)return d;let p=bu(c).filter(_=>Oi(_)&&As(_)!=="body"),A=null;const m=so(c).position==="fixed";let g=m?wp(c):c;for(;Oi(g)&&!RO(g);){const _=so(g),b=NC(g);_.position==="fixed"?A=null:(m?b||A:b||_.position!=="static"||!A||!["absolute","fixed"].includes(A.position))?A=_:p=p.filter(I=>I!==g),g=wp(g)}return l.set(c,p),p}(t,this._c):[].concat(n),a=[...o,r],s=a[0],u=a.reduce((c,l)=>{const d=wM(t,l,i);return c.top=Wd(d.top,c.top),c.right=TM(d.right,c.right),c.bottom=TM(d.bottom,c.bottom),c.left=Wd(d.left,c.left),c},wM(t,s,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=uo(n),o=as(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0},s={x:1,y:1};const u={x:0,y:0};if((i||!i&&r!=="fixed")&&((As(n)!=="body"||ab(o))&&(a=sb(n)),uo(n))){const c=Wu(n);s=yl(n),u.x=c.x+n.clientLeft,u.y=c.y+n.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-a.scrollLeft*s.x+u.x,y:t.y*s.y-a.scrollTop*s.y+u.y}},isElement:Oi,getDimensions:function(e){return uo(e)?CQ(e):e.getBoundingClientRect()},getOffsetParent:$M,getDocumentElement:as,getScale:yl,async getElementRects(e){let{reference:t,floating:n,strategy:r}=e;const i=this.getOffsetParent||$M,o=this.getDimensions;return{reference:E2e(t,await i(n),r),floating:{x:0,y:0,...await o(n)}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>so(e).direction==="rtl"};function R2e(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=!0,animationFrame:s=!1}=r,u=i&&!s,c=u||o?[...Oi(e)?bu(e):e.contextElement?bu(e.contextElement):[],...bu(t)]:[];c.forEach(A=>{u&&A.addEventListener("scroll",n,{passive:!0}),o&&A.addEventListener("resize",n)});let l,d=null;if(a){let A=!0;d=new ResizeObserver(()=>{A||n(),A=!1}),Oi(e)&&!s&&d.observe(e),Oi(e)||!e.contextElement||s||d.observe(e.contextElement),d.observe(t)}let p=s?Wu(e):null;return s&&function A(){const m=Wu(e);!p||m.x===p.x&&m.y===p.y&&m.width===p.width&&m.height===p.height||n(),p=m,l=requestAnimationFrame(A)}(),n(),()=>{var A;c.forEach(m=>{u&&m.removeEventListener("scroll",n),o&&m.removeEventListener("resize",n)}),(A=d)==null||A.disconnect(),d=null,s&&cancelAnimationFrame(l)}}const O2e=(e,t,n)=>{const r=new Map,i={platform:$2e,...n},o={...i.platform,_c:r};return h2e(e,t,{...i,platform:o})};var hm=typeof document<"u"?E.useLayoutEffect:E.useEffect;function vg(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!vg(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!vg(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function RM(e){const t=xe.useRef(e);return hm(()=>{t.current=e}),t}function F2e(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,whileElementsMounted:o,open:a}=e,[s,u]=xe.useState({x:null,y:null,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[c,l]=xe.useState(r);vg(c,r)||l(r);const d=xe.useRef(null),p=xe.useRef(null),A=xe.useRef(s),m=RM(o),g=RM(i),[_,b]=xe.useState(null),[I,x]=xe.useState(null),v=xe.useCallback(F=>{d.current!==F&&(d.current=F,b(F))},[]),S=xe.useCallback(F=>{p.current!==F&&(p.current=F,x(F))},[]),y=xe.useCallback(()=>{if(!d.current||!p.current)return;const F={placement:t,strategy:n,middleware:c};g.current&&(F.platform=g.current),O2e(d.current,p.current,F).then($=>{const P={...$,isPositioned:!0};T.current&&!vg(A.current,P)&&(A.current=P,lz.flushSync(()=>{u(P)}))})},[c,t,n,g]);hm(()=>{a===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,u(F=>({...F,isPositioned:!1})))},[a]);const T=xe.useRef(!1);hm(()=>(T.current=!0,()=>{T.current=!1}),[]),hm(()=>{if(_&&I){if(m.current)return m.current(_,I,y);y()}},[_,I,y,m]);const w=xe.useMemo(()=>({reference:d,floating:p,setReference:v,setFloating:S}),[v,S]),O=xe.useMemo(()=>({reference:_,floating:I}),[_,I]);return xe.useMemo(()=>({...s,update:y,refs:w,elements:O,reference:v,floating:S}),[s,y,w,O,v,S])}var ts=typeof document<"u"?E.useLayoutEffect:E.useEffect;function k2e(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(i=>i(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){e.set(t,(e.get(t)||[]).filter(r=>r!==n))}}}let $1=!1,M2e=0;const OM=()=>"floating-ui-"+M2e++;function L2e(){const[e,t]=xe.useState(()=>$1?OM():void 0);return ts(()=>{e==null&&t(OM())},[]),xe.useEffect(()=>{$1||($1=!0)},[]),e}const FM=xe["useId".toString()],kM=FM??L2e,j2e=xe.createContext(null),U2e=xe.createContext(null),EQ=()=>{var e,t;return(e=(t=xe.useContext(j2e))==null?void 0:t.id)!=null?e:null},OO=()=>xe.useContext(U2e);function FO(e){var t;return(t=e==null?void 0:e.ownerDocument)!=null?t:document}function $Q(e){var t;return(t=FO(e).defaultView)!=null?t:window}function mm(e){return e?e instanceof $Q(e).Element:!1}function B2e(e){return e?e instanceof $Q(e).HTMLElement:!1}const MM=xe["useInsertionEffect".toString()];function VC(e){const t=xe.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return MM?MM(()=>{t.current=e}):t.current=e,xe.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current==null?void 0:t.current(...r)},[])}function P2e(e){let{open:t=!1,onOpenChange:n,whileElementsMounted:r,placement:i,middleware:o,strategy:a,nodeId:s}=e===void 0?{}:e;const[u,c]=xe.useState(null),l=OO(),d=xe.useRef(null),p=xe.useRef({}),A=xe.useState(()=>k2e())[0],m=F2e({placement:i,middleware:o,strategy:a,whileElementsMounted:r}),g=VC(n),_=xe.useMemo(()=>({...m.refs,domReference:d}),[m.refs]),b=xe.useMemo(()=>({...m,refs:_,dataRef:p,nodeId:s,events:A,open:t,onOpenChange:g,_:{domReference:u}}),[m,s,A,t,g,_,u]);ts(()=>{const v=l==null?void 0:l.nodesRef.current.find(S=>S.id===s);v&&(v.context=b)});const{reference:I}=m,x=xe.useCallback(v=>{(mm(v)||v===null)&&(b.refs.domReference.current=v,c(v)),I(v)},[I,b.refs]);return xe.useMemo(()=>({...m,context:b,refs:_,reference:x}),[m,_,b,x])}function R1(e,t,n){const r=new Map;return{...n==="floating"&&{tabIndex:-1},...e,...t.map(i=>i?i[n]:null).concat(e).reduce((i,o)=>(o&&Object.entries(o).forEach(a=>{let[s,u]=a;if(s.indexOf("on")===0){if(r.has(s)||r.set(s,[]),typeof u=="function"){var c;(c=r.get(s))==null||c.push(u),i[s]=function(){for(var l,d=arguments.length,p=new Array(d),A=0;A<d;A++)p[A]=arguments[A];(l=r.get(s))==null||l.forEach(m=>m(...p))}}}else i[s]=u}),i),{})}}const D2e=function(e){return e===void 0&&(e=[]),{getReferenceProps:t=>R1(t,e,"reference"),getFloatingProps:t=>R1(t,e,"floating"),getItemProps:t=>R1(t,e,"item")}};function O1(e,t){var n;let r=(n=e.filter(a=>{var s;return a.parentId===t&&((s=a.context)==null?void 0:s.open)}))!=null?n:[],i=r;for(;i.length;){var o;i=(o=e.filter(a=>{var s;return(s=i)==null?void 0:s.some(u=>{var c;return a.parentId===u.id&&((c=a.context)==null?void 0:c.open)})}))!=null?o:[],r=r.concat(i)}return r}function LM(e){let t=e.activeElement;for(;((n=t)==null||(r=n.shadowRoot)==null?void 0:r.activeElement)!=null;){var n,r;t=t.shadowRoot.activeElement}return t}function W2e(e){return"composedPath"in e?e.composedPath()[0]:e.target}function za(e){e.preventDefault(),e.stopPropagation()}function K2e(e){const t=E.useRef(e);return ts(()=>{t.current=e}),t}function jM(e){const t=E.useRef();return ts(()=>{t.current=e},[e]),t.current}const N2e=function(e,t){let{open:n}=e,{enabled:r=!0,role:i="dialog"}=t===void 0?{}:t;const o=kM(),a=kM(),s={id:o,role:i};return r?i==="tooltip"?{reference:{"aria-describedby":n?o:void 0},floating:s}:{reference:{"aria-expanded":n?"true":"false","aria-haspopup":i==="alertdialog"?"dialog":i,"aria-controls":n?o:void 0,...i==="listbox"&&{role:"combobox"},...i==="menu"&&{id:a}},floating:{...s,...i==="menu"&&{"aria-labelledby":a}}}:{}};function F1(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}const q2e=function(e,t){let{open:n,onOpenChange:r,refs:i,events:o,nodeId:a}=e,{enabled:s=!0,escapeKey:u=!0,outsidePointerDown:c=!0,referencePointerDown:l=!1,ancestorScroll:d=!1,bubbles:p=!0}=t===void 0?{}:t;const A=OO(),m=EQ()!=null,g=xe.useRef(!1);return xe.useEffect(()=>{if(!n||!s)return;function _(S){if(S.key==="Escape"){if(!p&&A&&O1(A.nodesRef.current,a).length>0)return;o.emit("dismiss",{preventScroll:!1}),r(!1)}}function b(S){const y=g.current;if(g.current=!1,y)return;const T=W2e(S);if(mm(T)&&i.floating.current){var w;const F=(w=i.floating.current.ownerDocument.defaultView)!=null?w:window,$=T.scrollWidth>T.clientWidth,P=T.scrollHeight>T.clientHeight;let K=P&&S.offsetX>T.clientWidth;if(P&&F.getComputedStyle(T).direction==="rtl"&&(K=S.offsetX<=T.offsetWidth-T.clientWidth),K||$&&S.offsetY>T.clientHeight)return}const O=A&&O1(A.nodesRef.current,a).some(F=>{var $;return F1(S,($=F.context)==null?void 0:$.refs.floating.current)});F1(S,i.floating.current)||F1(S,i.domReference.current)||O||!p&&A&&O1(A.nodesRef.current,a).length>0||(o.emit("dismiss",m?{preventScroll:!0}:!1),r(!1))}function I(){r(!1)}const x=FO(i.floating.current);u&&x.addEventListener("keydown",_),c&&x.addEventListener("pointerdown",b);const v=(d?[...mm(i.reference.current)?bu(i.reference.current):[],...mm(i.floating.current)?bu(i.floating.current):[]]:[]).filter(S=>{var y;return S!==((y=x.defaultView)==null?void 0:y.visualViewport)});return v.forEach(S=>S.addEventListener("scroll",I,{passive:!0})),()=>{u&&x.removeEventListener("keydown",_),c&&x.removeEventListener("pointerdown",b),v.forEach(S=>S.removeEventListener("scroll",I))}},[u,c,o,A,a,n,r,d,s,p,i,m]),s?{reference:{onPointerDown(){l&&(o.emit("dismiss"),r(!1))}},floating:{onPointerDownCapture(){g.current=!0}}}:{}},kO="ArrowUp",ub="ArrowDown",Vl="ArrowLeft",jh="ArrowRight";function nm(e,t,n){return Math.floor(e/t)!==n}function _d(e,t){return t<0||t>=e.current.length}function On(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:i,amount:o=1}=t===void 0?{}:t;const a=e.current;let s=n;do{var u,c;s=s+(r?-o:o)}while(s>=0&&s<=a.length-1&&(i?i.includes(s):a[s]==null||(u=a[s])!=null&&u.hasAttribute("disabled")||((c=a[s])==null?void 0:c.getAttribute("aria-disabled"))==="true"));return s}function cb(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function UM(e,t){return cb(t,e===kO||e===ub,e===Vl||e===jh)}function k1(e,t,n){return cb(t,e===ub,n?e===Vl:e===jh)||e==="Enter"||e==" "||e===""}function V2e(e,t,n){return cb(t,n?e===Vl:e===jh,e===ub)}function Q2e(e,t,n){return cb(t,n?e===jh:e===Vl,e===kO)}function M1(e,t){return On(e,{disabledIndices:t})}function BM(e,t){return On(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}const z2e=function(e,t){let{open:n,onOpenChange:r,refs:i}=e,{listRef:o,activeIndex:a,onNavigate:s=()=>{},enabled:u=!0,selectedIndex:c=null,allowEscape:l=!1,loop:d=!1,nested:p=!1,rtl:A=!1,virtual:m=!1,focusItemOnOpen:g="auto",focusItemOnHover:_=!0,openOnArrowKeyDown:b=!0,disabledIndices:I=void 0,orientation:x="vertical",cols:v=1}=t===void 0?{listRef:{current:[]},activeIndex:null,onNavigate:()=>{}}:t;process.env.NODE_ENV!=="production"&&(l&&(d||console.warn(["Floating UI: `useListNavigation` looping must be enabled to allow","escaping."].join(" ")),m||console.warn(["Floating UI: `useListNavigation` must be virtual to allow","escaping."].join(" "))),x==="vertical"&&v>1&&console.warn(["Floating UI: In grid list navigation mode (`cols` > 1), the",'`orientation` should be either "horizontal" or "both".'].join(" ")));const S=EQ(),y=OO(),T=jM(n),w=VC(s),O=VC(jM(s)),F=xe.useRef(g),$=xe.useRef(c??-1),P=xe.useRef(null),K=K2e(I),J=xe.useRef(!1),ee=xe.useRef(-1),[re,D]=xe.useState(),Y=xe.useCallback((k,q)=>{ee.current=requestAnimationFrame(()=>{if(m){var ue;D((ue=k.current[q.current])==null?void 0:ue.id)}else{var ke;(ke=k.current[q.current])==null||ke.focus({preventScroll:!0})}})},[m]);ts(()=>{u&&(!T&&n&&F.current&&c!=null&&w(c),T&&!n&&(cancelAnimationFrame(ee.current),$.current=-1,O(null)))},[n,T,c,o,Y,u,w,O]),ts(()=>{if(u&&n)if(a==null){if(c!=null)return;T&&($.current=-1,Y(o,$)),!T&&F.current&&(P.current!=null||F.current===!0&&P.current==null)&&($.current=P.current==null||k1(P.current,x,A)||p?M1(o,K.current):BM(o,K.current),w($.current),Y(o,$))}else _d(o,a)||($.current=a,Y(o,$))},[n,T,a,c,p,o,w,Y,u,l,x,A,m,K]),ts(()=>{if(u&&!n&&T){var k,q;const ue=y==null||(k=y.nodesRef.current.find(ke=>ke.id===S))==null||(q=k.context)==null?void 0:q.refs.floating.current;ue&&!ue.contains(LM(FO(ue)))&&ue.focus({preventScroll:!0})}},[u,n,T,y,S]),ts(()=>{P.current=null});function M(k){if(J.current=!0,p&&Q2e(k.key,x,A)){za(k),r(!1),B2e(i.domReference.current)&&i.domReference.current.focus();return}const q=$.current,ue=M1(o,I),ke=BM(o,I);if(k.key==="Home"&&($.current=ue,w($.current)),k.key==="End"&&($.current=ke,w($.current)),v>1){const Ie=$.current;if(k.key===kO){if(za(k),Ie===-1)$.current=ke;else if($.current=On(o,{startingIndex:Ie,amount:v,decrement:!0,disabledIndices:I}),d&&(Ie-v<ue||$.current<0)){const rt=Ie%v,at=ke%v,fn=ke-(at-rt);at===rt?$.current=ke:$.current=at>rt?fn:fn-v}_d(o,$.current)&&($.current=Ie),w($.current)}if(k.key===ub&&(za(k),Ie===-1?$.current=ue:($.current=On(o,{startingIndex:Ie,amount:v,disabledIndices:I}),d&&Ie+v>ke&&($.current=On(o,{startingIndex:Ie%v-v,amount:v,disabledIndices:I}))),_d(o,$.current)&&($.current=Ie),w($.current)),x==="both"){const rt=Math.floor(Ie/v);k.key===jh&&(za(k),Ie%v!==v-1?($.current=On(o,{startingIndex:Ie,disabledIndices:I}),d&&nm($.current,v,rt)&&($.current=On(o,{startingIndex:Ie-Ie%v-1,disabledIndices:I}))):d&&($.current=On(o,{startingIndex:Ie-Ie%v-1,disabledIndices:I})),nm($.current,v,rt)&&($.current=Ie)),k.key===Vl&&(za(k),Ie%v!==0?($.current=On(o,{startingIndex:Ie,disabledIndices:I,decrement:!0}),d&&nm($.current,v,rt)&&($.current=On(o,{startingIndex:Ie+(v-Ie%v),decrement:!0,disabledIndices:I}))):d&&($.current=On(o,{startingIndex:Ie+(v-Ie%v),decrement:!0,disabledIndices:I})),nm($.current,v,rt)&&($.current=Ie));const at=Math.floor(ke/v)===rt;_d(o,$.current)&&(d&&at?$.current=k.key===Vl?ke:On(o,{startingIndex:Ie-Ie%v-1,disabledIndices:I}):$.current=Ie),w($.current);return}}if(UM(k.key,x)){if(za(k),n&&!m&&LM(k.currentTarget.ownerDocument)===k.currentTarget){$.current=k1(k.key,x,A)?ue:ke,w($.current);return}k1(k.key,x,A)?d?$.current=q>=ke?l&&q!==o.current.length?-1:ue:On(o,{startingIndex:q,disabledIndices:I}):$.current=Math.min(ke,On(o,{startingIndex:q,disabledIndices:I})):d?$.current=q<=ue?l&&q!==-1?o.current.length:ke:On(o,{startingIndex:q,decrement:!0,disabledIndices:I}):$.current=Math.max(ue,On(o,{startingIndex:q,decrement:!0,disabledIndices:I})),_d(o,$.current)?w(null):w($.current)}}return u?{reference:{...m&&n&&a!=null&&{"aria-activedescendant":re},onKeyDown(k){if(J.current=!0,m&&n)return M(k);if((k.key.indexOf("Arrow")===0||k.key==="Enter"||k.key===" "||k.key==="")&&(P.current=k.key),p){V2e(k.key,x,A)&&(za(k),n?($.current=M1(o,I),w($.current)):r(!0));return}UM(k.key,x)&&(c!=null&&($.current=c),za(k),!n&&b?r(!0):M(k),n&&w($.current))}},floating:{"aria-orientation":x==="both"?void 0:x,...m&&a!=null&&{"aria-activedescendant":re},onKeyDown:M,onPointerMove(){J.current=!1}},item:{onFocus(k){let{currentTarget:q}=k;const ue=o.current.indexOf(q);ue!==-1&&w(ue)},onClick:k=>{let{currentTarget:q}=k;return q.focus({preventScroll:!0})},..._&&{onMouseMove(k){let{currentTarget:q}=k;const ue=q;if(ue){const ke=o.current.indexOf(ue);ke!==-1&&w(ke)}},onPointerLeave(){if(!J.current&&($.current=-1,Y(o,$),w(null),!m)){var k;(k=i.floating.current)==null||k.focus({preventScroll:!0})}}}}}:{}};function H2e(e){var t;const{char:n,allowSpaces:r,allowedPrefixes:i,startOfLine:o,$position:a}=e,s=pLe(n),u=new RegExp(`\\s${s}$`),c=o?"^":"",l=r?new RegExp(`${c}${s}.*?(?=\\s${s}|$)`,"gm"):new RegExp(`${c}(?:^)?${s}[^\\s${s}]*`,"gm"),d=((t=a.nodeBefore)===null||t===void 0?void 0:t.isText)&&a.nodeBefore.text;if(!d)return null;const p=a.pos-d.length,A=Array.from(d.matchAll(l)).pop();if(!A||A.input===void 0||A.index===void 0)return null;const m=A.input.slice(Math.max(0,A.index-1),A.index),g=new RegExp(`^[${i==null?void 0:i.join("")}\0]?$`).test(m);if(i!==null&&!g)return null;const _=p+A.index;let b=_+A[0].length;return r&&u.test(d.slice(b-1,b+1))&&(A[0]+=" ",b+=1),_<a.pos&&b>=a.pos?{range:{from:_,to:b},query:A[0].slice(n.length),text:A[0]}:null}const Y2e=new eo("suggestion");function G2e({pluginKey:e=Y2e,editor:t,char:n="@",allowSpaces:r=!1,allowedPrefixes:i=[" "],startOfLine:o=!1,decorationTag:a="span",decorationClass:s="suggestion",command:u=()=>null,items:c=()=>[],render:l=()=>({}),allow:d=()=>!0,findSuggestionMatch:p=H2e}){let A;const m=l==null?void 0:l(),g=new zr({key:e,view(){return{update:async(_,b)=>{var I,x,v,S,y,T,w;const O=(I=this.key)===null||I===void 0?void 0:I.getState(b),F=(x=this.key)===null||x===void 0?void 0:x.getState(_.state),$=O.active&&F.active&&O.range.from!==F.range.from,P=!O.active&&F.active,K=O.active&&!F.active,J=!P&&!K&&O.query!==F.query,ee=P||$&&J,re=J||$,D=K||$&&J;if(!ee&&!re&&!D)return;const Y=D&&!ee?O:F,M=_.dom.querySelector(`[data-decoration-id="${Y.decorationId}"]`);A={editor:t,range:Y.range,query:Y.query,text:Y.text,items:[],command:k=>u({editor:t,range:Y.range,props:k}),decorationNode:M,clientRect:M?()=>{var k;const{decorationId:q}=(k=this.key)===null||k===void 0?void 0:k.getState(t.state),ue=_.dom.querySelector(`[data-decoration-id="${q}"]`);return(ue==null?void 0:ue.getBoundingClientRect())||null}:null},ee&&((v=m==null?void 0:m.onBeforeStart)===null||v===void 0||v.call(m,A)),re&&((S=m==null?void 0:m.onBeforeUpdate)===null||S===void 0||S.call(m,A)),(re||ee)&&(A.items=await c({editor:t,query:Y.query})),D&&((y=m==null?void 0:m.onExit)===null||y===void 0||y.call(m,A)),re&&((T=m==null?void 0:m.onUpdate)===null||T===void 0||T.call(m,A)),ee&&((w=m==null?void 0:m.onStart)===null||w===void 0||w.call(m,A))},destroy:()=>{var _;A&&((_=m==null?void 0:m.onExit)===null||_===void 0||_.call(m,A))}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}},apply(_,b,I,x){const{isEditable:v}=t,{composing:S}=t.view,{selection:y}=_,{empty:T,from:w}=y,O={...b};if(O.composing=S,v&&(T||t.view.composing)){(w<b.range.from||w>b.range.to)&&!S&&!b.composing&&(O.active=!1);const F=p({char:n,allowSpaces:r,allowedPrefixes:i,startOfLine:o,$position:y.$from}),$=`id_${Math.floor(Math.random()*4294967295)}`;F&&d({editor:t,state:x,range:F.range,isActive:b.active})?(O.active=!0,O.decorationId=b.decorationId?b.decorationId:$,O.range=F.range,O.query=F.query,O.text=F.text):O.active=!1}else O.active=!1;return O.active||(O.decorationId=null,O.range={from:0,to:0},O.query=null,O.text=null),O}},props:{handleKeyDown(_,b){var I;const{active:x,range:v}=g.getState(_.state);return x&&((I=m==null?void 0:m.onKeyDown)===null||I===void 0?void 0:I.call(m,{view:_,event:b,range:v}))||!1},decorations(_){const{active:b,range:I,decorationId:x}=g.getState(_);return b?Yt.create(_.doc,[wi.inline(I.from,I.to,{nodeName:a,class:s,"data-decoration-id":x})]):null}}});return g}const RQ=["ArrowDown","ArrowUp","End","Home"],OQ=["Enter"],J2e=["Escape",...RQ,...OQ],Z2e=dr.create({name:"slash-commands",addOptions(){return{nodeTypes:[]}},addProseMirrorPlugins(){const e=gm(YQ,this.options.nodeTypes);return e.length>1?[G2e({allowSpaces:!0,char:"/",editor:this.editor,startOfLine:!0,allow:({state:t})=>{const n=t.selection.$from;return n.parent.type.name===ao.name&&n.depth===1},command:({editor:t,props:n,range:r})=>{n.runCommands(t,{deleteRange:r})},items:({query:t})=>{const n=t.toLocaleLowerCase().trim();return e.filter(r=>{var i,o;return((i=r.shortText)==null?void 0:i.toLocaleLowerCase().includes(n))||((o=r.text)==null?void 0:o.toLocaleLowerCase().includes(n))})},render:()=>{let t;return{onStart:n=>{t=new aQ(X2e,{editor:n.editor,props:n}),document.body.appendChild(t.element)},onUpdate:n=>{t==null||t.updateProps(n)},onKeyDown:({event:n})=>{var r;return!!(J2e.includes(n.key)&&((r=t==null?void 0:t.ref)!=null&&r.handleKeyDown(n)))},onExit:()=>{t==null||t.destroy(),t==null||t.element.remove()}}}})]:[]}}),X2e=E.forwardRef(function(t,n){const{command:r,decorationNode:i,editor:o,items:a}=t,[s,u]=E.useState(!0),{context:c,floating:l,reference:d,x:p,y:A}=P2e({middleware:[I2e(0),_2e(),T2e({limiter:x2e()})],onOpenChange:u,open:s,placement:"top-start",strategy:"fixed",whileElementsMounted:R2e});E.useLayoutEffect(()=>{d(i)},[d,i]),E.useEffect(()=>{let T;const w=()=>{T=window.setTimeout(()=>{u(!0)})},O=()=>{u(!1)};return o.on("focus",w).on("blur",O),()=>{o.off("focus",w).off("blur",O),clearTimeout(T)}},[o]);const[m,g]=E.useState(0),_=E.useRef([]);Pe.useOnChange(a,()=>{g(0),_.current=[]});const{getFloatingProps:b,getItemProps:I,getReferenceProps:x}=D2e([q2e(c,{outsidePointerDown:!1}),z2e(c,{activeIndex:m,listRef:_,onNavigate:T=>{g(w=>T??w)},openOnArrowKeyDown:!1,virtual:!0}),N2e(c,{role:"menu"})]),S=x().onKeyDown;E.useImperativeHandle(n,()=>({handleKeyDown:T=>{if(s){if(RQ.includes(T.key)&&S(T),OQ.includes(T.key)){const w=a[m];w!==void 0&&r(w)}return!0}else return!1}}),[m,r,a,S,s]);const y=p!==null&&A!==null;return s?f.jsx(h.Box,{...b(),minWidth:256,backgroundColor:"grey1",border:!0,borderStyle:"solid",borderRadius:6,flexDirection:"column",ref:l,top:0,left:0,position:"fixed",transform:y?`translate3d(${Math.round(p)}px, ${Math.round(A)}px, 0)`:"translate3d(0, -200%, 0)",overflow:"hidden",children:f.jsxs("div",{style:{boxShadow:"0px 2px 10px 0px hsla(0, 0%, 0%, 0.1)"},children:[a.map((T,w)=>{const O=I({onClick:()=>{r(T)},onPointerDown:F=>{F.preventDefault()}});return E.createElement(PM,{...O,key:T.nodeType,ref:F=>{_.current[w]=F},active:w===m,isFirstItem:w===0,isLastItem:w===a.length-1,shortcut:`/${T.shortText??""}`},T.text)}),a.length===0&&f.jsx(PM,{...I({onPointerDown:T=>{T.preventDefault()}}),disabled:!0,ref:T=>{_.current[0]=T},children:"No results"})]})}):null}),PM=E.forwardRef(function(t,n){const{children:r,disabled:i=!1,shortcut:o,active:a=!1,isFirstItem:s=!1,isLastItem:u=!1,...c}=t;return f.jsx("div",{...c,role:"button",style:{cursor:i?"default":"pointer"},ref:n,children:f.jsxs(h.Box,{alignItems:"center",height:32,flexDirection:"row",gap:8,padding:8,backgroundColor:a?"grey4":"inherit",justifyContent:"space-between",opacity:i?.5:1,children:[f.jsx(h.Text,{color:"grey12",component:"span",children:r}),o&&f.jsx(h.Text,{color:"inherit",component:"span",variant:"small",children:o})]})})});function eBe(e,t){var s,u;const n=t.map(c=>c.richTextNodeTypes).flat(),i={placeholderByNodeType:tBe(t),unfocusedPlaceholder:(s=e.config)==null?void 0:s.placeholder,nodeExtensions:t},o=n.includes(fe.RichTextNodeType.orderedList)||n.includes(fe.RichTextNodeType.list);return[DC.component(((u=e.config)==null?void 0:u.single)===void 0),Du.component,Ag.component,p2e(i),o?ql.component:void 0,Z2e.configure({nodeTypes:n})].filter(io.isDefined)}function tBe(e){return e.reduce((t,n)=>(n.nodeType===vl.Text&&(t[n.name]=n.placeholder),t),{})}const QC=UUe.extend({name:"bulletList",parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:e}){return["ul",Et(this.options.HTMLAttributes,e),0]}}).configure({itemTypeName:"listItem"}),nBe={fromPrismic(e){return function(t){var r;const n=ql.converter.fromPrismic(e)(t);if(n)return(r=e.nodes[QC.name])==null?void 0:r.create(sa.fromPrismic(t),n)}},toPrismic(e){return Pu.children.map(e,t=>ql.converter.toPrismic(t,fe.RichTextNodeType.list).filter(io.isDefined)).flat()}},rBe=new wO([fe.RichTextNodeType.list],QC.name,QC,nBe),yg=rBe,iBe=/^```([a-z]+)?[\s\n]$/,oBe=/^~~~([a-z]+)?[\s\n]$/,aBe=jn.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:e=>{var t;const{languageClassPrefix:n}=this.options,o=[...((t=e.firstElementChild)===null||t===void 0?void 0:t.classList)||[]].filter(a=>a.startsWith(n)).map(a=>a.replace(n,""))[0];return o||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:e,HTMLAttributes:t}){return["pre",Et(this.options.HTMLAttributes,t),["code",{class:e.attrs.language?this.options.languageClassPrefix+e.attrs.language:null},0]]},addCommands(){return{setCodeBlock:e=>({commands:t})=>t.setNode(this.name,e),toggleCodeBlock:e=>({commands:t})=>t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:e,$anchor:t}=this.editor.state.selection,n=t.pos===1;return!e||t.parent.type.name!==this.name?!1:n||!t.parent.textContent.length?this.editor.commands.clearNodes():!1},Enter:({editor:e})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:t}=e,{selection:n}=t,{$from:r,empty:i}=n;if(!i||r.parent.type!==this.type)return!1;const o=r.parentOffset===r.parent.nodeSize-2,a=r.parent.textContent.endsWith(`
100
+ `,mQ={fromPrismic(e){return function(t){var n;if(t===pg)return(n=e.nodes[dg.name])==null?void 0:n.create({})}},toPrismic(e){if(e.type.name===dg.name)return pg}},w1={isEmptyLine(e){return e.length===0},isFirst(e){return e===0}};function HUe(e,t){return function(n){const r=mQ.fromPrismic(e)(pg);if(!r)return[n(t)];const i=t.split(pg);return i.length===1?t.length?[n(t)]:[r]:i.reduce((o,a,s)=>w1.isFirst(s)?w1.isEmptyLine(a)?o:[...o,n(a)]:w1.isEmptyLine(a)?[...o,r]:[...o,r,n(a)],[])}}const YUe={name:dg.name,component:dg,converter:mQ,splitTextToNodes:HUe},Ag=YUe,gQ={fromPrismic(e){return t=>{switch(t.type){case"hyperlink":return VQ.converter.fromPrismic(e)(t);case"em":return MO.converter.fromPrismic(e)(t);case"strong":return EO.converter.fromPrismic(e)(t);case"label":return LO.converter.fromPrismic(e)(t);case"list-item":return}}},toPrismic(e,t,n){const r=zQ.find(i=>e.type.name===i.name);if(!r)throw new Error(`Invalid mark extension '${e.type.name}'.`);switch(r.name){case"bold":return{type:"strong",start:t,end:n};case"em":return{type:r.name,start:t,end:n};case"hyperlink":return{type:r.name,start:t,end:n,data:r.converter.toPrismic(e)};case"label":return{type:r.name,start:t,end:n,data:r.converter.toPrismic(e)}}}},GUe={strong:"bold",label:"label",em:"em",hyperlink:"hyperlink","list-item":void 0},SM=VUe.extend({name:"text"}),JUe={fromPrismic(e){return function(t,n,r=!1){const i={type:t,text:n.content.text,spans:n.content.spans||[]};return qUe([i],ZUe(e,r)).flat()}},toPrismic(e,t,n){const r=Pu.children.reduce(e,(i,o)=>{const a=(()=>o.type.name===Ag.name?Ag.converter.toPrismic(o):o.textContent)(),s=a?i.text+a:i.text,u=i.text.length,c=s.length,l=(()=>o.marks.length?Pu.marks.map(o,p=>gQ.toPrismic(p,u,c)):void 0)();return{...i,text:s,spans:l?[...i.spans,...l]:i.spans}},{text:"",spans:[]});return{type:t,content:{text:r.text,spans:[...zUe(r.spans)].sort((i,o)=>i.type.localeCompare(o.type))},...n}}};function ZUe(e,t=!1){return(n,r,i,o)=>{if(n==="span"&&i&&i.length)return t?[e.text(i)]:Ag.splitTextToNodes(e,i)(u=>e.text(u));const a=gQ.fromPrismic(e)(r);return a?XUe(a,o):o.flat()}}function XUe(e,t){return t.flat().map(r=>{const o=[...r.marks,e].sort((a,s)=>a.type.name.localeCompare(s.type.name));return r.mark(o)})}const e2e={name:SM.name,component:SM,converter:JUe},Du=e2e,$O="document";function t2e(e){return BUe.extend({name:$O,content:e?"block+":"block"})}function n2e(e){return{fromPrismic(t,n,r){var o;const i=r.value.reduce((a,s)=>{const{extension:u,block:c}=a2e(e,s,t,n),l=i2e({extension:u,block:c,schema:t}),d=a.slice(0,a.length-1),p=kt.last(a),A=o2e({node:l,previousNode:p});return A.updatedNode?[...A.merged?d:a,A.updatedNode]:a},[]);return(o=t.nodes[$O])==null?void 0:o.create({},i)},toPrismic(t){return{__TYPE__:"StructuredTextContent",value:[...Pu.children.reduce(t,(r,i)=>{const o=Object.values(e).find(s=>i.type.name===s.name),a=o==null?void 0:o.converter.toPrismic(i);return a||console.warn(`Cannot convert node of type '${i.type.name}'.`),a?[...r,...a instanceof Array?a:[a]]:r},[])]}}}}const r2e=new IUe($O,t2e,n2e),DC=r2e;function i2e(e){const{extension:t,block:n,schema:r}=e;if(t)switch(t.nodeType){case vl.Embed:return ye.EmbedBlock.is(n)?t.converter.fromPrismic(r)(n):void 0;case vl.Text:return ye.TextBlock.is(n)?t.converter.fromPrismic(r)(n):void 0;case vl.Image:return ye.ImageBlock.is(n)?t.converter.fromPrismic(r)(n):void 0}}function o2e(e){const{node:t,previousNode:n}=e;return!t||!n?{merged:!1,updatedNode:t}:t.type.name===n.type.name&&(t.type.name===yg.name||t.type.name===Cg.name)?{merged:!0,updatedNode:WUe(n,t)}:{merged:!1,updatedNode:t}}function a2e(e,t,n,r){var s;const i=e.find(u=>u.richTextNodeTypes.includes(t.type)&&r.has(t.type));if(i)return{extension:i,block:t};if(!ye.TextBlock.is(t))return{extension:void 0,block:t};const o=e.find(u=>uQ(u)&&u.name in n.nodes),a=(s=t.content.spans)==null?void 0:s.filter(u=>{const c=GUe[u.type];return c&&c in n.marks});return{extension:o,block:{...t,content:{text:t.content.text,spans:a}}}}const s2e=dr.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new zr({key:new eo("placeholder"),props:{decorations:({doc:e,selection:t})=>{const n=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:r}=t,i=[];if(!n)return null;const o=this.editor.isEmpty;return e.descendants((a,s)=>{const u=r>=s&&r<=s+a.nodeSize,c=!a.isLeaf&&RV(a);if((u||!this.options.showOnlyCurrent)&&c){const l=[this.options.emptyNodeClass];o&&l.push(this.options.emptyEditorClass);const d=wi.node(s,s+a.nodeSize,{class:l.join(" "),"data-placeholder":typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:a,pos:s,hasAnchor:u}):this.options.placeholder});i.push(d)}return this.options.includeChildren}),Yt.create(e,i)}}})]}}),u2e=jn.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:e}){return["p",Et(this.options.HTMLAttributes,e),0]},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),Am="ltr",lu="rtl",Ho="dir",c2e=fe.RichTextNodeType.rtl,l2e=dr.create({name:"textDirection",addOptions(){return{supportedExtensionNames:[]}},addGlobalAttributes(){return[{types:this.options.supportedExtensionNames,attributes:{[Ho]:{default:Am,parseHTML:e=>e.getAttribute(Ho),renderHTML:e=>({[Ho]:WC(e[Ho])})}}}]},addCommands(){return{setDirection:e=>({commands:t})=>{switch(e){case Am:return t.setLeftToRight();case lu:return t.setRightToLeft()}},toggleDirection:e=>({commands:t})=>{const n=e===lu?Am:lu;return t.setDirection(n)},setRightToLeft:()=>({commands:e})=>this.options.supportedExtensionNames.every(t=>e.updateAttributes(t,{[Ho]:lu})),setLeftToRight:()=>({commands:e})=>this.options.supportedExtensionNames.every(t=>e.resetAttributes(t,Ho))}},addKeyboardShortcuts(){return{"Mod-Shift-r":()=>this.editor.commands.setRightToLeft(),"Mod-Shift-l":()=>this.editor.commands.setLeftToRight()}}}),sa={parseNodeAttrsDirection(e){return WC(e[Ho])},fromPrismic(e){return{[Ho]:WC(e.direction)}},toPrismic(e){return{direction:this.parseNodeAttrsDirection(e.attrs)}}};function WC(e){return e===lu?lu:Am}const hg=u2e.extend({name:"paragraph",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:e}){return["p",Et(this.options.HTMLAttributes,e),0]}}),f2e={fromPrismic(e){return function(t){var r;const n=Du.converter.fromPrismic(e)(hg.name,t);return(r=e.nodes[hg.name])==null?void 0:r.create(sa.fromPrismic(t),n)}},toPrismic(e){return Du.converter.toPrismic(e,fe.RichTextNodeType.paragraph,sa.toPrismic(e))}},d2e=new Mh([fe.RichTextNodeType.paragraph],hg.name,hg,f2e,"Type '/' for commands"),ao=d2e,p2e=e=>s2e.configure({includeChildren:!0,placeholder:t=>A2e(t,e),showOnlyCurrent:!1,showOnlyWhenEditable:!1});function A2e(e,t){const{editor:n,hasAnchor:r,pos:i,node:o}=e,{placeholderByNodeType:a,unfocusedPlaceholder:s,nodeExtensions:u}=t,c=!Pu.children.exists(n.state.doc,I=>I===o),l=n.isEditable;if(s&&!n.isFocused&&n.isEmpty&&i===0)return s;const d=o.type.name!==ao.name,p=n.isFocused&&r||d||c,A=u.filter(I=>I!==ao).length>1;function m(I){return I===ao.placeholder?l&&p&&A:l&&p}function g(){if(c)return ql.placeholder;const I=a[o.type.name];return typeof I=="string"?I:I==null?void 0:I(o.attrs)}const _=g();return m(_)&&_||""}function ob(e){return e.split("-")[1]}function vQ(e){return e==="y"?"height":"width"}function is(e){return e.split("-")[0]}function Lh(e){return["top","bottom"].includes(is(e))?"x":"y"}function _M(e,t,n){let{reference:r,floating:i}=e;const o=r.x+r.width/2-i.width/2,a=r.y+r.height/2-i.height/2,s=Lh(t),u=vQ(s),c=r[u]/2-i[u]/2,l=s==="x";let d;switch(is(t)){case"top":d={x:o,y:r.y-i.height};break;case"bottom":d={x:o,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:a};break;case"left":d={x:r.x-i.width,y:a};break;default:d={x:r.x,y:r.y}}switch(ob(t)){case"start":d[s]-=c*(n&&l?-1:1);break;case"end":d[s]+=c*(n&&l?-1:1)}return d}const h2e=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=o.filter(Boolean),u=await(a.isRTL==null?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:l,y:d}=_M(c,r,u),p=r,A={},m=0;for(let g=0;g<s.length;g++){const{name:_,fn:b}=s[g],{x:I,y:x,data:v,reset:S}=await b({x:l,y:d,initialPlacement:r,placement:p,strategy:i,middlewareData:A,rects:c,platform:a,elements:{reference:e,floating:t}});l=I??l,d=x??d,A={...A,[_]:{...A[_],...v}},S&&m<=50&&(m++,typeof S=="object"&&(S.placement&&(p=S.placement),S.rects&&(c=S.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):S.rects),{x:l,y:d}=_M(c,p,u)),g=-1)}return{x:l,y:d,placement:p,strategy:i,middlewareData:A}};function m2e(e){return typeof e!="number"?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(e):{top:e,right:e,bottom:e,left:e}}function KC(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function yQ(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:a,elements:s,strategy:u}=e,{boundary:c="clippingAncestors",rootBoundary:l="viewport",elementContext:d="floating",altBoundary:p=!1,padding:A=0}=t,m=m2e(A),g=s[p?d==="floating"?"reference":"floating":d],_=KC(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(g)))==null||n?g:g.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(s.floating)),boundary:c,rootBoundary:l,strategy:u})),b=d==="floating"?{...a.floating,x:r,y:i}:a.reference,I=await(o.getOffsetParent==null?void 0:o.getOffsetParent(s.floating)),x=await(o.isElement==null?void 0:o.isElement(I))&&await(o.getScale==null?void 0:o.getScale(I))||{x:1,y:1},v=KC(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({rect:b,offsetParent:I,strategy:u}):b);return{top:(_.top-v.top+m.top)/x.y,bottom:(v.bottom-_.bottom+m.bottom)/x.y,left:(_.left-v.left+m.left)/x.x,right:(v.right-_.right+m.right)/x.x}}const g2e=Math.min,v2e=Math.max;function IM(e,t,n){return v2e(e,g2e(t,n))}const y2e=["top","right","bottom","left"];y2e.reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]);const b2e={left:"right",right:"left",bottom:"top",top:"bottom"};function mg(e){return e.replace(/left|right|bottom|top/g,t=>b2e[t])}function C2e(e,t,n){n===void 0&&(n=!1);const r=ob(e),i=Lh(e),o=vQ(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=mg(a)),{main:a,cross:mg(a)}}const S2e={start:"end",end:"start"};function E1(e){return e.replace(/start|end/g,t=>S2e[t])}const _2e=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:i,rects:o,initialPlacement:a,platform:s,elements:u}=t,{mainAxis:c=!0,crossAxis:l=!0,fallbackPlacements:d,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:A="none",flipAlignment:m=!0,...g}=e,_=is(r),b=is(a)===a,I=await(s.isRTL==null?void 0:s.isRTL(u.floating)),x=d||(b||!m?[mg(a)]:function($){const P=mg($);return[E1($),P,E1(P)]}(a));d||A==="none"||x.push(...function($,P,K,Y){const ee=ob($);let re=function(D,G,M){const O=["left","right"],q=["right","left"],ue=["top","bottom"],ke=["bottom","top"];switch(D){case"top":case"bottom":return M?G?q:O:G?O:q;case"left":case"right":return G?ue:ke;default:return[]}}(is($),K==="start",Y);return ee&&(re=re.map(D=>D+"-"+ee),P&&(re=re.concat(re.map(E1)))),re}(a,m,A,I));const v=[a,...x],S=await yQ(t,g),y=[];let T=((n=i.flip)==null?void 0:n.overflows)||[];if(c&&y.push(S[_]),l){const{main:$,cross:P}=C2e(r,o,I);y.push(S[$],S[P])}if(T=[...T,{placement:r,overflows:y}],!y.every($=>$<=0)){var w,F;const $=(((w=i.flip)==null?void 0:w.index)||0)+1,P=v[$];if(P)return{data:{index:$,overflows:T},reset:{placement:P}};let K=(F=T.filter(Y=>Y.overflows[0]<=0).sort((Y,ee)=>Y.overflows[1]-ee.overflows[1])[0])==null?void 0:F.placement;if(!K)switch(p){case"bestFit":{var k;const Y=(k=T.map(ee=>[ee.placement,ee.overflows.filter(re=>re>0).reduce((re,D)=>re+D,0)]).sort((ee,re)=>ee[1]-re[1])[0])==null?void 0:k[0];Y&&(K=Y);break}case"initialPlacement":K=a}if(r!==K)return{reset:{placement:K}}}return{}}}},I2e=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await async function(o,a){const{placement:s,platform:u,elements:c}=o,l=await(u.isRTL==null?void 0:u.isRTL(c.floating)),d=is(s),p=ob(s),A=Lh(s)==="x",m=["left","top"].includes(d)?-1:1,g=l&&A?-1:1,_=typeof a=="function"?a(o):a;let{mainAxis:b,crossAxis:I,alignmentAxis:x}=typeof _=="number"?{mainAxis:_,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,..._};return p&&typeof x=="number"&&(I=p==="end"?-1*x:x),A?{x:I*g,y:b*m}:{x:b*m,y:I*g}}(t,e);return{x:n+i.x,y:r+i.y,data:i}}}};function bQ(e){return e==="x"?"y":"x"}const T2e=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:_=>{let{x:b,y:I}=_;return{x:b,y:I}}},...u}=e,c={x:n,y:r},l=await yQ(t,u),d=Lh(is(i)),p=bQ(d);let A=c[d],m=c[p];if(o){const _=d==="y"?"bottom":"right";A=IM(A+l[d==="y"?"top":"left"],A,A-l[_])}if(a){const _=p==="y"?"bottom":"right";m=IM(m+l[p==="y"?"top":"left"],m,m-l[_])}const g=s.fn({...t,[d]:A,[p]:m});return{...g,data:{x:g.x-n,y:g.y-r}}}}},x2e=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:u=!0,crossAxis:c=!0}=e,l={x:n,y:r},d=Lh(i),p=bQ(d);let A=l[d],m=l[p];const g=typeof s=="function"?s(t):s,_=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(u){const x=d==="y"?"height":"width",v=o.reference[d]-o.floating[x]+_.mainAxis,S=o.reference[d]+o.reference[x]-_.mainAxis;A<v?A=v:A>S&&(A=S)}if(c){var b,I;const x=d==="y"?"width":"height",v=["top","left"].includes(is(i)),S=o.reference[p]-o.floating[x]+(v&&((b=a.offset)==null?void 0:b[p])||0)+(v?0:_.crossAxis),y=o.reference[p]+o.reference[x]+(v?0:((I=a.offset)==null?void 0:I[p])||0)-(v?_.crossAxis:0);m<S?m=S:m>y&&(m=y)}return{[d]:A,[p]:m}}}};function Or(e){var t;return((t=e.ownerDocument)==null?void 0:t.defaultView)||window}function so(e){return Or(e).getComputedStyle(e)}const TM=Math.min,Wd=Math.max,gg=Math.round;function CQ(e){const t=so(e);let n=parseFloat(t.width),r=parseFloat(t.height);const i=e.offsetWidth,o=e.offsetHeight,a=gg(n)!==i||gg(r)!==o;return a&&(n=i,r=o),{width:n,height:r,fallback:a}}function As(e){return _Q(e)?(e.nodeName||"").toLowerCase():""}let tm;function SQ(){if(tm)return tm;const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?(tm=e.brands.map(t=>t.brand+"/"+t.version).join(" "),tm):navigator.userAgent}function uo(e){return e instanceof Or(e).HTMLElement}function Oi(e){return e instanceof Or(e).Element}function _Q(e){return e instanceof Or(e).Node}function xM(e){return typeof ShadowRoot>"u"?!1:e instanceof Or(e).ShadowRoot||e instanceof ShadowRoot}function ab(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=so(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function w2e(e){return["table","td","th"].includes(As(e))}function NC(e){const t=/firefox/i.test(SQ()),n=so(e),r=n.backdropFilter||n.WebkitBackdropFilter;return n.transform!=="none"||n.perspective!=="none"||!!r&&r!=="none"||t&&n.willChange==="filter"||t&&!!n.filter&&n.filter!=="none"||["transform","perspective"].some(i=>n.willChange.includes(i))||["paint","layout","strict","content"].some(i=>{const o=n.contain;return o!=null&&o.includes(i)})}function qC(){return/^((?!chrome|android).)*safari/i.test(SQ())}function RO(e){return["html","body","#document"].includes(As(e))}function IQ(e){return Oi(e)?e:e.contextElement}const TQ={x:1,y:1};function yl(e){const t=IQ(e);if(!uo(t))return TQ;const n=t.getBoundingClientRect(),{width:r,height:i,fallback:o}=CQ(t);let a=(o?gg(n.width):n.width)/r,s=(o?gg(n.height):n.height)/i;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}function Wu(e,t,n,r){var i,o;t===void 0&&(t=!1),n===void 0&&(n=!1);const a=e.getBoundingClientRect(),s=IQ(e);let u=TQ;t&&(r?Oi(r)&&(u=yl(r)):u=yl(e));const c=s?Or(s):window,l=qC()&&n;let d=(a.left+(l&&((i=c.visualViewport)==null?void 0:i.offsetLeft)||0))/u.x,p=(a.top+(l&&((o=c.visualViewport)==null?void 0:o.offsetTop)||0))/u.y,A=a.width/u.x,m=a.height/u.y;if(s){const g=Or(s),_=r&&Oi(r)?Or(r):r;let b=g.frameElement;for(;b&&r&&_!==g;){const I=yl(b),x=b.getBoundingClientRect(),v=getComputedStyle(b);x.x+=(b.clientLeft+parseFloat(v.paddingLeft))*I.x,x.y+=(b.clientTop+parseFloat(v.paddingTop))*I.y,d*=I.x,p*=I.y,A*=I.x,m*=I.y,d+=x.x,p+=x.y,b=Or(b).frameElement}}return{width:A,height:m,top:p,right:d+A,bottom:p+m,left:d,x:d,y:p}}function as(e){return((_Q(e)?e.ownerDocument:e.document)||window.document).documentElement}function sb(e){return Oi(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function xQ(e){return Wu(as(e)).left+sb(e).scrollLeft}function wp(e){if(As(e)==="html")return e;const t=e.assignedSlot||e.parentNode||xM(e)&&e.host||as(e);return xM(t)?t.host:t}function wQ(e){const t=wp(e);return RO(t)?t.ownerDocument.body:uo(t)&&ab(t)?t:wQ(t)}function bu(e,t){var n;t===void 0&&(t=[]);const r=wQ(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Or(r);return i?t.concat(o,o.visualViewport||[],ab(r)?r:[]):t.concat(r,bu(r))}function wM(e,t,n){let r;if(t==="viewport")r=function(a,s){const u=Or(a),c=as(a),l=u.visualViewport;let d=c.clientWidth,p=c.clientHeight,A=0,m=0;if(l){d=l.width,p=l.height;const g=qC();(!g||g&&s==="fixed")&&(A=l.offsetLeft,m=l.offsetTop)}return{width:d,height:p,x:A,y:m}}(e,n);else if(t==="document")r=function(a){const s=as(a),u=sb(a),c=a.ownerDocument.body,l=Wd(s.scrollWidth,s.clientWidth,c.scrollWidth,c.clientWidth),d=Wd(s.scrollHeight,s.clientHeight,c.scrollHeight,c.clientHeight);let p=-u.scrollLeft+xQ(a);const A=-u.scrollTop;return so(c).direction==="rtl"&&(p+=Wd(s.clientWidth,c.clientWidth)-l),{width:l,height:d,x:p,y:A}}(as(e));else if(Oi(t))r=function(a,s){const u=Wu(a,!0,s==="fixed"),c=u.top+a.clientTop,l=u.left+a.clientLeft,d=uo(a)?yl(a):{x:1,y:1};return{width:a.clientWidth*d.x,height:a.clientHeight*d.y,x:l*d.x,y:c*d.y}}(t,n);else{const a={...t};if(qC()){var i,o;const s=Or(e);a.x-=((i=s.visualViewport)==null?void 0:i.offsetLeft)||0,a.y-=((o=s.visualViewport)==null?void 0:o.offsetTop)||0}r=a}return KC(r)}function EM(e,t){return uo(e)&&so(e).position!=="fixed"?t?t(e):e.offsetParent:null}function $M(e,t){const n=Or(e);let r=EM(e,t);for(;r&&w2e(r)&&so(r).position==="static";)r=EM(r,t);return r&&(As(r)==="html"||As(r)==="body"&&so(r).position==="static"&&!NC(r))?n:r||function(i){let o=wp(i);for(;uo(o)&&!RO(o);){if(NC(o))return o;o=wp(o)}return null}(e)||n}function E2e(e,t,n){const r=uo(t),i=as(t),o=Wu(e,!0,n==="fixed",t);let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&n!=="fixed")if((As(t)!=="body"||ab(i))&&(a=sb(t)),uo(t)){const u=Wu(t,!0);s.x=u.x+t.clientLeft,s.y=u.y+t.clientTop}else i&&(s.x=xQ(i));return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}const $2e={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=n==="clippingAncestors"?function(c,l){const d=l.get(c);if(d)return d;let p=bu(c).filter(_=>Oi(_)&&As(_)!=="body"),A=null;const m=so(c).position==="fixed";let g=m?wp(c):c;for(;Oi(g)&&!RO(g);){const _=so(g),b=NC(g);_.position==="fixed"?A=null:(m?b||A:b||_.position!=="static"||!A||!["absolute","fixed"].includes(A.position))?A=_:p=p.filter(I=>I!==g),g=wp(g)}return l.set(c,p),p}(t,this._c):[].concat(n),a=[...o,r],s=a[0],u=a.reduce((c,l)=>{const d=wM(t,l,i);return c.top=Wd(d.top,c.top),c.right=TM(d.right,c.right),c.bottom=TM(d.bottom,c.bottom),c.left=Wd(d.left,c.left),c},wM(t,s,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=uo(n),o=as(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0},s={x:1,y:1};const u={x:0,y:0};if((i||!i&&r!=="fixed")&&((As(n)!=="body"||ab(o))&&(a=sb(n)),uo(n))){const c=Wu(n);s=yl(n),u.x=c.x+n.clientLeft,u.y=c.y+n.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-a.scrollLeft*s.x+u.x,y:t.y*s.y-a.scrollTop*s.y+u.y}},isElement:Oi,getDimensions:function(e){return uo(e)?CQ(e):e.getBoundingClientRect()},getOffsetParent:$M,getDocumentElement:as,getScale:yl,async getElementRects(e){let{reference:t,floating:n,strategy:r}=e;const i=this.getOffsetParent||$M,o=this.getDimensions;return{reference:E2e(t,await i(n),r),floating:{x:0,y:0,...await o(n)}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>so(e).direction==="rtl"};function R2e(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=!0,animationFrame:s=!1}=r,u=i&&!s,c=u||o?[...Oi(e)?bu(e):e.contextElement?bu(e.contextElement):[],...bu(t)]:[];c.forEach(A=>{u&&A.addEventListener("scroll",n,{passive:!0}),o&&A.addEventListener("resize",n)});let l,d=null;if(a){let A=!0;d=new ResizeObserver(()=>{A||n(),A=!1}),Oi(e)&&!s&&d.observe(e),Oi(e)||!e.contextElement||s||d.observe(e.contextElement),d.observe(t)}let p=s?Wu(e):null;return s&&function A(){const m=Wu(e);!p||m.x===p.x&&m.y===p.y&&m.width===p.width&&m.height===p.height||n(),p=m,l=requestAnimationFrame(A)}(),n(),()=>{var A;c.forEach(m=>{u&&m.removeEventListener("scroll",n),o&&m.removeEventListener("resize",n)}),(A=d)==null||A.disconnect(),d=null,s&&cancelAnimationFrame(l)}}const O2e=(e,t,n)=>{const r=new Map,i={platform:$2e,...n},o={...i.platform,_c:r};return h2e(e,t,{...i,platform:o})};var hm=typeof document<"u"?E.useLayoutEffect:E.useEffect;function vg(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!vg(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!vg(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function RM(e){const t=xe.useRef(e);return hm(()=>{t.current=e}),t}function F2e(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,whileElementsMounted:o,open:a}=e,[s,u]=xe.useState({x:null,y:null,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[c,l]=xe.useState(r);vg(c,r)||l(r);const d=xe.useRef(null),p=xe.useRef(null),A=xe.useRef(s),m=RM(o),g=RM(i),[_,b]=xe.useState(null),[I,x]=xe.useState(null),v=xe.useCallback(k=>{d.current!==k&&(d.current=k,b(k))},[]),S=xe.useCallback(k=>{p.current!==k&&(p.current=k,x(k))},[]),y=xe.useCallback(()=>{if(!d.current||!p.current)return;const k={placement:t,strategy:n,middleware:c};g.current&&(k.platform=g.current),O2e(d.current,p.current,k).then($=>{const P={...$,isPositioned:!0};T.current&&!vg(A.current,P)&&(A.current=P,lz.flushSync(()=>{u(P)}))})},[c,t,n,g]);hm(()=>{a===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,u(k=>({...k,isPositioned:!1})))},[a]);const T=xe.useRef(!1);hm(()=>(T.current=!0,()=>{T.current=!1}),[]),hm(()=>{if(_&&I){if(m.current)return m.current(_,I,y);y()}},[_,I,y,m]);const w=xe.useMemo(()=>({reference:d,floating:p,setReference:v,setFloating:S}),[v,S]),F=xe.useMemo(()=>({reference:_,floating:I}),[_,I]);return xe.useMemo(()=>({...s,update:y,refs:w,elements:F,reference:v,floating:S}),[s,y,w,F,v,S])}var ts=typeof document<"u"?E.useLayoutEffect:E.useEffect;function k2e(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(i=>i(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){e.set(t,(e.get(t)||[]).filter(r=>r!==n))}}}let $1=!1,M2e=0;const OM=()=>"floating-ui-"+M2e++;function L2e(){const[e,t]=xe.useState(()=>$1?OM():void 0);return ts(()=>{e==null&&t(OM())},[]),xe.useEffect(()=>{$1||($1=!0)},[]),e}const FM=xe["useId".toString()],kM=FM??L2e,j2e=xe.createContext(null),U2e=xe.createContext(null),EQ=()=>{var e,t;return(e=(t=xe.useContext(j2e))==null?void 0:t.id)!=null?e:null},OO=()=>xe.useContext(U2e);function FO(e){var t;return(t=e==null?void 0:e.ownerDocument)!=null?t:document}function $Q(e){var t;return(t=FO(e).defaultView)!=null?t:window}function mm(e){return e?e instanceof $Q(e).Element:!1}function B2e(e){return e?e instanceof $Q(e).HTMLElement:!1}const MM=xe["useInsertionEffect".toString()];function VC(e){const t=xe.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return MM?MM(()=>{t.current=e}):t.current=e,xe.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current==null?void 0:t.current(...r)},[])}function P2e(e){let{open:t=!1,onOpenChange:n,whileElementsMounted:r,placement:i,middleware:o,strategy:a,nodeId:s}=e===void 0?{}:e;const[u,c]=xe.useState(null),l=OO(),d=xe.useRef(null),p=xe.useRef({}),A=xe.useState(()=>k2e())[0],m=F2e({placement:i,middleware:o,strategy:a,whileElementsMounted:r}),g=VC(n),_=xe.useMemo(()=>({...m.refs,domReference:d}),[m.refs]),b=xe.useMemo(()=>({...m,refs:_,dataRef:p,nodeId:s,events:A,open:t,onOpenChange:g,_:{domReference:u}}),[m,s,A,t,g,_,u]);ts(()=>{const v=l==null?void 0:l.nodesRef.current.find(S=>S.id===s);v&&(v.context=b)});const{reference:I}=m,x=xe.useCallback(v=>{(mm(v)||v===null)&&(b.refs.domReference.current=v,c(v)),I(v)},[I,b.refs]);return xe.useMemo(()=>({...m,context:b,refs:_,reference:x}),[m,_,b,x])}function R1(e,t,n){const r=new Map;return{...n==="floating"&&{tabIndex:-1},...e,...t.map(i=>i?i[n]:null).concat(e).reduce((i,o)=>(o&&Object.entries(o).forEach(a=>{let[s,u]=a;if(s.indexOf("on")===0){if(r.has(s)||r.set(s,[]),typeof u=="function"){var c;(c=r.get(s))==null||c.push(u),i[s]=function(){for(var l,d=arguments.length,p=new Array(d),A=0;A<d;A++)p[A]=arguments[A];(l=r.get(s))==null||l.forEach(m=>m(...p))}}}else i[s]=u}),i),{})}}const D2e=function(e){return e===void 0&&(e=[]),{getReferenceProps:t=>R1(t,e,"reference"),getFloatingProps:t=>R1(t,e,"floating"),getItemProps:t=>R1(t,e,"item")}};function O1(e,t){var n;let r=(n=e.filter(a=>{var s;return a.parentId===t&&((s=a.context)==null?void 0:s.open)}))!=null?n:[],i=r;for(;i.length;){var o;i=(o=e.filter(a=>{var s;return(s=i)==null?void 0:s.some(u=>{var c;return a.parentId===u.id&&((c=a.context)==null?void 0:c.open)})}))!=null?o:[],r=r.concat(i)}return r}function LM(e){let t=e.activeElement;for(;((n=t)==null||(r=n.shadowRoot)==null?void 0:r.activeElement)!=null;){var n,r;t=t.shadowRoot.activeElement}return t}function W2e(e){return"composedPath"in e?e.composedPath()[0]:e.target}function za(e){e.preventDefault(),e.stopPropagation()}function K2e(e){const t=E.useRef(e);return ts(()=>{t.current=e}),t}function jM(e){const t=E.useRef();return ts(()=>{t.current=e},[e]),t.current}const N2e=function(e,t){let{open:n}=e,{enabled:r=!0,role:i="dialog"}=t===void 0?{}:t;const o=kM(),a=kM(),s={id:o,role:i};return r?i==="tooltip"?{reference:{"aria-describedby":n?o:void 0},floating:s}:{reference:{"aria-expanded":n?"true":"false","aria-haspopup":i==="alertdialog"?"dialog":i,"aria-controls":n?o:void 0,...i==="listbox"&&{role:"combobox"},...i==="menu"&&{id:a}},floating:{...s,...i==="menu"&&{"aria-labelledby":a}}}:{}};function F1(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}const q2e=function(e,t){let{open:n,onOpenChange:r,refs:i,events:o,nodeId:a}=e,{enabled:s=!0,escapeKey:u=!0,outsidePointerDown:c=!0,referencePointerDown:l=!1,ancestorScroll:d=!1,bubbles:p=!0}=t===void 0?{}:t;const A=OO(),m=EQ()!=null,g=xe.useRef(!1);return xe.useEffect(()=>{if(!n||!s)return;function _(S){if(S.key==="Escape"){if(!p&&A&&O1(A.nodesRef.current,a).length>0)return;o.emit("dismiss",{preventScroll:!1}),r(!1)}}function b(S){const y=g.current;if(g.current=!1,y)return;const T=W2e(S);if(mm(T)&&i.floating.current){var w;const k=(w=i.floating.current.ownerDocument.defaultView)!=null?w:window,$=T.scrollWidth>T.clientWidth,P=T.scrollHeight>T.clientHeight;let K=P&&S.offsetX>T.clientWidth;if(P&&k.getComputedStyle(T).direction==="rtl"&&(K=S.offsetX<=T.offsetWidth-T.clientWidth),K||$&&S.offsetY>T.clientHeight)return}const F=A&&O1(A.nodesRef.current,a).some(k=>{var $;return F1(S,($=k.context)==null?void 0:$.refs.floating.current)});F1(S,i.floating.current)||F1(S,i.domReference.current)||F||!p&&A&&O1(A.nodesRef.current,a).length>0||(o.emit("dismiss",m?{preventScroll:!0}:!1),r(!1))}function I(){r(!1)}const x=FO(i.floating.current);u&&x.addEventListener("keydown",_),c&&x.addEventListener("pointerdown",b);const v=(d?[...mm(i.reference.current)?bu(i.reference.current):[],...mm(i.floating.current)?bu(i.floating.current):[]]:[]).filter(S=>{var y;return S!==((y=x.defaultView)==null?void 0:y.visualViewport)});return v.forEach(S=>S.addEventListener("scroll",I,{passive:!0})),()=>{u&&x.removeEventListener("keydown",_),c&&x.removeEventListener("pointerdown",b),v.forEach(S=>S.removeEventListener("scroll",I))}},[u,c,o,A,a,n,r,d,s,p,i,m]),s?{reference:{onPointerDown(){l&&(o.emit("dismiss"),r(!1))}},floating:{onPointerDownCapture(){g.current=!0}}}:{}},kO="ArrowUp",ub="ArrowDown",Vl="ArrowLeft",jh="ArrowRight";function nm(e,t,n){return Math.floor(e/t)!==n}function _d(e,t){return t<0||t>=e.current.length}function On(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:i,amount:o=1}=t===void 0?{}:t;const a=e.current;let s=n;do{var u,c;s=s+(r?-o:o)}while(s>=0&&s<=a.length-1&&(i?i.includes(s):a[s]==null||(u=a[s])!=null&&u.hasAttribute("disabled")||((c=a[s])==null?void 0:c.getAttribute("aria-disabled"))==="true"));return s}function cb(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function UM(e,t){return cb(t,e===kO||e===ub,e===Vl||e===jh)}function k1(e,t,n){return cb(t,e===ub,n?e===Vl:e===jh)||e==="Enter"||e==" "||e===""}function V2e(e,t,n){return cb(t,n?e===Vl:e===jh,e===ub)}function Q2e(e,t,n){return cb(t,n?e===jh:e===Vl,e===kO)}function M1(e,t){return On(e,{disabledIndices:t})}function BM(e,t){return On(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}const z2e=function(e,t){let{open:n,onOpenChange:r,refs:i}=e,{listRef:o,activeIndex:a,onNavigate:s=()=>{},enabled:u=!0,selectedIndex:c=null,allowEscape:l=!1,loop:d=!1,nested:p=!1,rtl:A=!1,virtual:m=!1,focusItemOnOpen:g="auto",focusItemOnHover:_=!0,openOnArrowKeyDown:b=!0,disabledIndices:I=void 0,orientation:x="vertical",cols:v=1}=t===void 0?{listRef:{current:[]},activeIndex:null,onNavigate:()=>{}}:t;process.env.NODE_ENV!=="production"&&(l&&(d||console.warn(["Floating UI: `useListNavigation` looping must be enabled to allow","escaping."].join(" ")),m||console.warn(["Floating UI: `useListNavigation` must be virtual to allow","escaping."].join(" "))),x==="vertical"&&v>1&&console.warn(["Floating UI: In grid list navigation mode (`cols` > 1), the",'`orientation` should be either "horizontal" or "both".'].join(" ")));const S=EQ(),y=OO(),T=jM(n),w=VC(s),F=VC(jM(s)),k=xe.useRef(g),$=xe.useRef(c??-1),P=xe.useRef(null),K=K2e(I),Y=xe.useRef(!1),ee=xe.useRef(-1),[re,D]=xe.useState(),G=xe.useCallback((O,q)=>{ee.current=requestAnimationFrame(()=>{if(m){var ue;D((ue=O.current[q.current])==null?void 0:ue.id)}else{var ke;(ke=O.current[q.current])==null||ke.focus({preventScroll:!0})}})},[m]);ts(()=>{u&&(!T&&n&&k.current&&c!=null&&w(c),T&&!n&&(cancelAnimationFrame(ee.current),$.current=-1,F(null)))},[n,T,c,o,G,u,w,F]),ts(()=>{if(u&&n)if(a==null){if(c!=null)return;T&&($.current=-1,G(o,$)),!T&&k.current&&(P.current!=null||k.current===!0&&P.current==null)&&($.current=P.current==null||k1(P.current,x,A)||p?M1(o,K.current):BM(o,K.current),w($.current),G(o,$))}else _d(o,a)||($.current=a,G(o,$))},[n,T,a,c,p,o,w,G,u,l,x,A,m,K]),ts(()=>{if(u&&!n&&T){var O,q;const ue=y==null||(O=y.nodesRef.current.find(ke=>ke.id===S))==null||(q=O.context)==null?void 0:q.refs.floating.current;ue&&!ue.contains(LM(FO(ue)))&&ue.focus({preventScroll:!0})}},[u,n,T,y,S]),ts(()=>{P.current=null});function M(O){if(Y.current=!0,p&&Q2e(O.key,x,A)){za(O),r(!1),B2e(i.domReference.current)&&i.domReference.current.focus();return}const q=$.current,ue=M1(o,I),ke=BM(o,I);if(O.key==="Home"&&($.current=ue,w($.current)),O.key==="End"&&($.current=ke,w($.current)),v>1){const Ie=$.current;if(O.key===kO){if(za(O),Ie===-1)$.current=ke;else if($.current=On(o,{startingIndex:Ie,amount:v,decrement:!0,disabledIndices:I}),d&&(Ie-v<ue||$.current<0)){const rt=Ie%v,at=ke%v,fn=ke-(at-rt);at===rt?$.current=ke:$.current=at>rt?fn:fn-v}_d(o,$.current)&&($.current=Ie),w($.current)}if(O.key===ub&&(za(O),Ie===-1?$.current=ue:($.current=On(o,{startingIndex:Ie,amount:v,disabledIndices:I}),d&&Ie+v>ke&&($.current=On(o,{startingIndex:Ie%v-v,amount:v,disabledIndices:I}))),_d(o,$.current)&&($.current=Ie),w($.current)),x==="both"){const rt=Math.floor(Ie/v);O.key===jh&&(za(O),Ie%v!==v-1?($.current=On(o,{startingIndex:Ie,disabledIndices:I}),d&&nm($.current,v,rt)&&($.current=On(o,{startingIndex:Ie-Ie%v-1,disabledIndices:I}))):d&&($.current=On(o,{startingIndex:Ie-Ie%v-1,disabledIndices:I})),nm($.current,v,rt)&&($.current=Ie)),O.key===Vl&&(za(O),Ie%v!==0?($.current=On(o,{startingIndex:Ie,disabledIndices:I,decrement:!0}),d&&nm($.current,v,rt)&&($.current=On(o,{startingIndex:Ie+(v-Ie%v),decrement:!0,disabledIndices:I}))):d&&($.current=On(o,{startingIndex:Ie+(v-Ie%v),decrement:!0,disabledIndices:I})),nm($.current,v,rt)&&($.current=Ie));const at=Math.floor(ke/v)===rt;_d(o,$.current)&&(d&&at?$.current=O.key===Vl?ke:On(o,{startingIndex:Ie-Ie%v-1,disabledIndices:I}):$.current=Ie),w($.current);return}}if(UM(O.key,x)){if(za(O),n&&!m&&LM(O.currentTarget.ownerDocument)===O.currentTarget){$.current=k1(O.key,x,A)?ue:ke,w($.current);return}k1(O.key,x,A)?d?$.current=q>=ke?l&&q!==o.current.length?-1:ue:On(o,{startingIndex:q,disabledIndices:I}):$.current=Math.min(ke,On(o,{startingIndex:q,disabledIndices:I})):d?$.current=q<=ue?l&&q!==-1?o.current.length:ke:On(o,{startingIndex:q,decrement:!0,disabledIndices:I}):$.current=Math.max(ue,On(o,{startingIndex:q,decrement:!0,disabledIndices:I})),_d(o,$.current)?w(null):w($.current)}}return u?{reference:{...m&&n&&a!=null&&{"aria-activedescendant":re},onKeyDown(O){if(Y.current=!0,m&&n)return M(O);if((O.key.indexOf("Arrow")===0||O.key==="Enter"||O.key===" "||O.key==="")&&(P.current=O.key),p){V2e(O.key,x,A)&&(za(O),n?($.current=M1(o,I),w($.current)):r(!0));return}UM(O.key,x)&&(c!=null&&($.current=c),za(O),!n&&b?r(!0):M(O),n&&w($.current))}},floating:{"aria-orientation":x==="both"?void 0:x,...m&&a!=null&&{"aria-activedescendant":re},onKeyDown:M,onPointerMove(){Y.current=!1}},item:{onFocus(O){let{currentTarget:q}=O;const ue=o.current.indexOf(q);ue!==-1&&w(ue)},onClick:O=>{let{currentTarget:q}=O;return q.focus({preventScroll:!0})},..._&&{onMouseMove(O){let{currentTarget:q}=O;const ue=q;if(ue){const ke=o.current.indexOf(ue);ke!==-1&&w(ke)}},onPointerLeave(){if(!Y.current&&($.current=-1,G(o,$),w(null),!m)){var O;(O=i.floating.current)==null||O.focus({preventScroll:!0})}}}}}:{}};function H2e(e){var t;const{char:n,allowSpaces:r,allowedPrefixes:i,startOfLine:o,$position:a}=e,s=pLe(n),u=new RegExp(`\\s${s}$`),c=o?"^":"",l=r?new RegExp(`${c}${s}.*?(?=\\s${s}|$)`,"gm"):new RegExp(`${c}(?:^)?${s}[^\\s${s}]*`,"gm"),d=((t=a.nodeBefore)===null||t===void 0?void 0:t.isText)&&a.nodeBefore.text;if(!d)return null;const p=a.pos-d.length,A=Array.from(d.matchAll(l)).pop();if(!A||A.input===void 0||A.index===void 0)return null;const m=A.input.slice(Math.max(0,A.index-1),A.index),g=new RegExp(`^[${i==null?void 0:i.join("")}\0]?$`).test(m);if(i!==null&&!g)return null;const _=p+A.index;let b=_+A[0].length;return r&&u.test(d.slice(b-1,b+1))&&(A[0]+=" ",b+=1),_<a.pos&&b>=a.pos?{range:{from:_,to:b},query:A[0].slice(n.length),text:A[0]}:null}const Y2e=new eo("suggestion");function G2e({pluginKey:e=Y2e,editor:t,char:n="@",allowSpaces:r=!1,allowedPrefixes:i=[" "],startOfLine:o=!1,decorationTag:a="span",decorationClass:s="suggestion",command:u=()=>null,items:c=()=>[],render:l=()=>({}),allow:d=()=>!0,findSuggestionMatch:p=H2e}){let A;const m=l==null?void 0:l(),g=new zr({key:e,view(){return{update:async(_,b)=>{var I,x,v,S,y,T,w;const F=(I=this.key)===null||I===void 0?void 0:I.getState(b),k=(x=this.key)===null||x===void 0?void 0:x.getState(_.state),$=F.active&&k.active&&F.range.from!==k.range.from,P=!F.active&&k.active,K=F.active&&!k.active,Y=!P&&!K&&F.query!==k.query,ee=P||$&&Y,re=Y||$,D=K||$&&Y;if(!ee&&!re&&!D)return;const G=D&&!ee?F:k,M=_.dom.querySelector(`[data-decoration-id="${G.decorationId}"]`);A={editor:t,range:G.range,query:G.query,text:G.text,items:[],command:O=>u({editor:t,range:G.range,props:O}),decorationNode:M,clientRect:M?()=>{var O;const{decorationId:q}=(O=this.key)===null||O===void 0?void 0:O.getState(t.state),ue=_.dom.querySelector(`[data-decoration-id="${q}"]`);return(ue==null?void 0:ue.getBoundingClientRect())||null}:null},ee&&((v=m==null?void 0:m.onBeforeStart)===null||v===void 0||v.call(m,A)),re&&((S=m==null?void 0:m.onBeforeUpdate)===null||S===void 0||S.call(m,A)),(re||ee)&&(A.items=await c({editor:t,query:G.query})),D&&((y=m==null?void 0:m.onExit)===null||y===void 0||y.call(m,A)),re&&((T=m==null?void 0:m.onUpdate)===null||T===void 0||T.call(m,A)),ee&&((w=m==null?void 0:m.onStart)===null||w===void 0||w.call(m,A))},destroy:()=>{var _;A&&((_=m==null?void 0:m.onExit)===null||_===void 0||_.call(m,A))}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}},apply(_,b,I,x){const{isEditable:v}=t,{composing:S}=t.view,{selection:y}=_,{empty:T,from:w}=y,F={...b};if(F.composing=S,v&&(T||t.view.composing)){(w<b.range.from||w>b.range.to)&&!S&&!b.composing&&(F.active=!1);const k=p({char:n,allowSpaces:r,allowedPrefixes:i,startOfLine:o,$position:y.$from}),$=`id_${Math.floor(Math.random()*4294967295)}`;k&&d({editor:t,state:x,range:k.range,isActive:b.active})?(F.active=!0,F.decorationId=b.decorationId?b.decorationId:$,F.range=k.range,F.query=k.query,F.text=k.text):F.active=!1}else F.active=!1;return F.active||(F.decorationId=null,F.range={from:0,to:0},F.query=null,F.text=null),F}},props:{handleKeyDown(_,b){var I;const{active:x,range:v}=g.getState(_.state);return x&&((I=m==null?void 0:m.onKeyDown)===null||I===void 0?void 0:I.call(m,{view:_,event:b,range:v}))||!1},decorations(_){const{active:b,range:I,decorationId:x}=g.getState(_);return b?Yt.create(_.doc,[wi.inline(I.from,I.to,{nodeName:a,class:s,"data-decoration-id":x})]):null}}});return g}const RQ=["ArrowDown","ArrowUp","End","Home"],OQ=["Enter"],J2e=["Escape",...RQ,...OQ],Z2e=dr.create({name:"slash-commands",addOptions(){return{nodeTypes:[]}},addProseMirrorPlugins(){const e=gm(YQ,this.options.nodeTypes);return e.length>1?[G2e({allowSpaces:!0,char:"/",editor:this.editor,startOfLine:!0,allow:({state:t})=>{const n=t.selection.$from;return n.parent.type.name===ao.name&&n.depth===1},command:({editor:t,props:n,range:r})=>{n.runCommands(t,{deleteRange:r})},items:({query:t})=>{const n=t.toLocaleLowerCase().trim();return e.filter(r=>{var i,o;return((i=r.shortText)==null?void 0:i.toLocaleLowerCase().includes(n))||((o=r.text)==null?void 0:o.toLocaleLowerCase().includes(n))})},render:()=>{let t;return{onStart:n=>{t=new aQ(X2e,{editor:n.editor,props:n}),document.body.appendChild(t.element)},onUpdate:n=>{t==null||t.updateProps(n)},onKeyDown:({event:n})=>{var r;return!!(J2e.includes(n.key)&&((r=t==null?void 0:t.ref)!=null&&r.handleKeyDown(n)))},onExit:()=>{t==null||t.destroy(),t==null||t.element.remove()}}}})]:[]}}),X2e=E.forwardRef(function(t,n){const{command:r,decorationNode:i,editor:o,items:a}=t,[s,u]=E.useState(!0),{context:c,floating:l,reference:d,x:p,y:A}=P2e({middleware:[I2e(0),_2e(),T2e({limiter:x2e()})],onOpenChange:u,open:s,placement:"top-start",strategy:"fixed",whileElementsMounted:R2e});E.useLayoutEffect(()=>{d(i)},[d,i]),E.useEffect(()=>{let T;const w=()=>{T=window.setTimeout(()=>{u(!0)})},F=()=>{u(!1)};return o.on("focus",w).on("blur",F),()=>{o.off("focus",w).off("blur",F),clearTimeout(T)}},[o]);const[m,g]=E.useState(0),_=E.useRef([]);Pe.useOnChange(a,()=>{g(0),_.current=[]});const{getFloatingProps:b,getItemProps:I,getReferenceProps:x}=D2e([q2e(c,{outsidePointerDown:!1}),z2e(c,{activeIndex:m,listRef:_,onNavigate:T=>{g(w=>T??w)},openOnArrowKeyDown:!1,virtual:!0}),N2e(c,{role:"menu"})]),S=x().onKeyDown;E.useImperativeHandle(n,()=>({handleKeyDown:T=>{if(s){if(RQ.includes(T.key)&&S(T),OQ.includes(T.key)){const w=a[m];w!==void 0&&r(w)}return!0}else return!1}}),[m,r,a,S,s]);const y=p!==null&&A!==null;return s?f.jsx(h.Box,{...b(),minWidth:256,backgroundColor:"grey1",border:!0,borderStyle:"solid",borderRadius:6,flexDirection:"column",ref:l,top:0,left:0,position:"fixed",transform:y?`translate3d(${Math.round(p)}px, ${Math.round(A)}px, 0)`:"translate3d(0, -200%, 0)",overflow:"hidden",children:f.jsxs("div",{style:{boxShadow:"0px 2px 10px 0px hsla(0, 0%, 0%, 0.1)"},children:[a.map((T,w)=>{const F=I({onClick:()=>{r(T)},onPointerDown:k=>{k.preventDefault()}});return E.createElement(PM,{...F,key:T.nodeType,ref:k=>{_.current[w]=k},active:w===m,isFirstItem:w===0,isLastItem:w===a.length-1,shortcut:`/${T.shortText??""}`},T.text)}),a.length===0&&f.jsx(PM,{...I({onPointerDown:T=>{T.preventDefault()}}),disabled:!0,ref:T=>{_.current[0]=T},children:"No results"})]})}):null}),PM=E.forwardRef(function(t,n){const{children:r,disabled:i=!1,shortcut:o,active:a=!1,isFirstItem:s=!1,isLastItem:u=!1,...c}=t;return f.jsx("div",{...c,role:"button",style:{cursor:i?"default":"pointer"},ref:n,children:f.jsxs(h.Box,{alignItems:"center",height:32,flexDirection:"row",gap:8,padding:8,backgroundColor:a?"grey4":"inherit",justifyContent:"space-between",opacity:i?.5:1,children:[f.jsx(h.Text,{color:"grey12",component:"span",children:r}),o&&f.jsx(h.Text,{color:"inherit",component:"span",variant:"small",children:o})]})})});function eBe(e,t){var s,u;const n=t.map(c=>c.richTextNodeTypes).flat(),i={placeholderByNodeType:tBe(t),unfocusedPlaceholder:(s=e.config)==null?void 0:s.placeholder,nodeExtensions:t},o=n.includes(fe.RichTextNodeType.orderedList)||n.includes(fe.RichTextNodeType.list);return[DC.component(((u=e.config)==null?void 0:u.single)===void 0),Du.component,Ag.component,p2e(i),o?ql.component:void 0,Z2e.configure({nodeTypes:n})].filter(io.isDefined)}function tBe(e){return e.reduce((t,n)=>(n.nodeType===vl.Text&&(t[n.name]=n.placeholder),t),{})}const QC=UUe.extend({name:"bulletList",parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:e}){return["ul",Et(this.options.HTMLAttributes,e),0]}}).configure({itemTypeName:"listItem"}),nBe={fromPrismic(e){return function(t){var r;const n=ql.converter.fromPrismic(e)(t);if(n)return(r=e.nodes[QC.name])==null?void 0:r.create(sa.fromPrismic(t),n)}},toPrismic(e){return Pu.children.map(e,t=>ql.converter.toPrismic(t,fe.RichTextNodeType.list).filter(io.isDefined)).flat()}},rBe=new wO([fe.RichTextNodeType.list],QC.name,QC,nBe),yg=rBe,iBe=/^```([a-z]+)?[\s\n]$/,oBe=/^~~~([a-z]+)?[\s\n]$/,aBe=jn.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:e=>{var t;const{languageClassPrefix:n}=this.options,o=[...((t=e.firstElementChild)===null||t===void 0?void 0:t.classList)||[]].filter(a=>a.startsWith(n)).map(a=>a.replace(n,""))[0];return o||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:e,HTMLAttributes:t}){return["pre",Et(this.options.HTMLAttributes,t),["code",{class:e.attrs.language?this.options.languageClassPrefix+e.attrs.language:null},0]]},addCommands(){return{setCodeBlock:e=>({commands:t})=>t.setNode(this.name,e),toggleCodeBlock:e=>({commands:t})=>t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:e,$anchor:t}=this.editor.state.selection,n=t.pos===1;return!e||t.parent.type.name!==this.name?!1:n||!t.parent.textContent.length?this.editor.commands.clearNodes():!1},Enter:({editor:e})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:t}=e,{selection:n}=t,{$from:r,empty:i}=n;if(!i||r.parent.type!==this.type)return!1;const o=r.parentOffset===r.parent.nodeSize-2,a=r.parent.textContent.endsWith(`
101
101
 
102
102
  `);return!o||!a?!1:e.chain().command(({tr:s})=>(s.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;const{state:t}=e,{selection:n,doc:r}=t,{$from:i,empty:o}=n;if(!o||i.parent.type!==this.type||!(i.parentOffset===i.parent.nodeSize-2))return!1;const s=i.after();return s===void 0?!1:r.nodeAt(s)?e.commands.command(({tr:c})=>(c.setSelection(ze.near(r.resolve(s))),!0)):e.commands.exitCode()}}},addInputRules(){return[FC({find:iBe,type:this.type,getAttributes:e=>({language:e[1]})}),FC({find:oBe,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new zr({key:new eo("codeBlockVSCodeHandler"),props:{handlePaste:(e,t)=>{if(!t.clipboardData||this.editor.isActive(this.type.name))return!1;const n=t.clipboardData.getData("text/plain"),r=t.clipboardData.getData("vscode-editor-data"),i=r?JSON.parse(r):void 0,o=i==null?void 0:i.mode;if(!n||!o)return!1;const{tr:a,schema:s}=e.state,u=s.text(n.replace(/\r\n?/g,`
103
103
  `));return a.replaceSelectionWith(this.type.create({language:o},u)),a.selection.$from.parent.type!==this.type&&a.setSelection(Be.near(a.doc.resolve(Math.max(0,a.selection.from-2)))),a.setMeta("paste",!0),e.dispatch(a),!0}}})]}}),bg=aBe.extend({name:"preformatted",addAttributes(){return{language:{default:null,parseHTML:e=>{var o;const{languageClassPrefix:t}=this.options,i=[...((o=e.firstElementChild)==null?void 0:o.classList)||[]].filter(a=>a.startsWith(t)).map(a=>a.replace(t,""))[0];return i||null},renderHTML:e=>e.language?{class:this.options.languageClassPrefix+e.language}:null}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({HTMLAttributes:e}){return["pre",Et(this.options.HTMLAttributes),["code",e,0]]}}).configure({exitOnTripleEnter:!1}),sBe={fromPrismic(e){return function(t){var r;const n=Du.converter.fromPrismic(e)(bg.name,t,!0);return(r=e.nodes[bg.name])==null?void 0:r.create(sa.fromPrismic(t),n)}},toPrismic(e){return Du.converter.toPrismic(e,fe.RichTextNodeType.preformatted,sa.toPrismic(e))}},uBe=new Mh([fe.RichTextNodeType.preformatted],bg.name,bg,sBe,"",!0),FQ=uBe;function kQ(e){const{editor:t,getPos:n,node:r}=e,[i,o]=E.useState(!1);return E.useEffect(()=>{function a(){const{from:u,to:c}=t.state.selection,l=n(),d=n()+r.nodeSize,p=u<=l&&c>=d;o(p)}function s(){o(!1)}return t.on("blur",s),t.on("selectionUpdate",a),()=>{t.off("blur",s),t.off("selectionUpdate",a)}},[t,n,r.nodeSize]),{selected:i}}function cBe(e,t,n){const{node:r}=e,i=r.attrs.content,o=Pe.useStableCallback(e.updateAttributes),a=Pe.useDebounceState({initialState:(i==null?void 0:i.embed_url)??"",startTransition:E.startTransition});function s(l){o({content:l})}function u(l){a.set(l),Fr.toURL(l)||s(void 0)}const{onKeyDown:c}=lBe(e,a.value,t,n);return{inputRef:t,containerRef:n,onKeyDown:c,url:a.value,urlChanged:u,onContentChange:s,debouncedUrl:a.debouncedValue,content:e.node.attrs.content}}function lBe(e,t,n,r){const{editor:i,getPos:o,node:a}=e,[s,u]=E.useState(!0);E.useEffect(()=>{!s||!e.editor.isFocused||h.handleEditorFlushSyncError(()=>{var l;return(l=n.current)==null?void 0:l.focus()})},[n,s,e.editor.isFocused]);function c(l){const d=o(),p=o()+a.nodeSize;l.code==="Enter"&&(u(!1),i.chain().insertContentAt(p,{type:"paragraph"}).focus(p+1).run()),l.code==="Backspace"&&t===""&&i.chain().deleteRange({from:d,to:p}).focus(p+1).run(),l.code==="ArrowUp"&&(u(!1),i.chain().focus(d-1).run()),l.code==="ArrowDown"&&(u(!1),i.chain().focus(p+1).run())}return{containerRef:r,inputRef:n,onKeyDown:c}}function fBe(e){const t=E.useRef(null),n=E.useRef(null),{onKeyDown:r,url:i,urlChanged:o,onContentChange:a,debouncedUrl:s,content:u}=cBe(e,t,n),{selected:c}=kQ(e);return f.jsx(oQ,{className:"custom-embed",children:f.jsxs("div",{contentEditable:"false",suppressContentEditableWarning:!0,children:[f.jsxs(h.Box,{flexGrow:1,alignItems:"center",children:[f.jsx(h.Icon,{size:"small",name:"cloud",color:"grey11"}),f.jsx(h.Box,{flexGrow:1,height:40,ref:n,children:f.jsx(Vs,{id:"id",ref:t,value:i,variant:Fr.toURL(i)?"link":"normal",placeholder:"Paste your link here",onValueChange:o,onKeyDown:r})})]}),Fr.toURL(i)&&f.jsx(P7,{selected:c,debouncedUrl:s,onContentChange:a,content:u})]})})}const zC=jn.create({name:"embed",group:"block",atom:!0,content:"block*",marks:"",addAttributes(){return{content:{default:void 0}}},addCommands(){return{setEmbed:()=>({tr:e,dispatch:t})=>{const n=this.type.create();return t&&e.replaceSelectionWith(n),!0}}},parseHTML(){return[{tag:"embed"}]},renderHTML(){return["embed"]},addNodeView(){return sQ(fBe)}}),dBe={fromPrismic(e){return function(t){var n;return(n=e.nodes[zC.name])==null?void 0:n.create({content:t.data})}},toPrismic(e){return e.attrs.content===void 0?{type:"embed",data:{type:"embed",embed_url:"",__TYPE__:"EmbedContent",all:[]}}:{type:"embed",data:{...e.attrs.content}}}},MQ=new TUe([fe.RichTextNodeType.embed],zC.name,zC,dBe),pBe=jn.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(e=>({tag:`h${e}`,attrs:{level:e}}))},renderHTML({node:e,HTMLAttributes:t}){return[`h${this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0]}`,Et(this.options.HTMLAttributes,t),0]},addCommands(){return{setHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.setNode(this.name,e):!1,toggleHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.toggleNode(this.name,"paragraph",e):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((e,t)=>({...e,[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})}),{})},addInputRules(){return this.options.levels.map(e=>FC({find:new RegExp(`^(#{1,${e}})\\s$`),type:this.type,getAttributes:{level:e}}))}}),HC="heading";function lb(e){switch(e){case 1:return fe.RichTextNodeType.heading1;case 2:return fe.RichTextNodeType.heading2;case 3:return fe.RichTextNodeType.heading3;case 4:return fe.RichTextNodeType.heading4;case 5:return fe.RichTextNodeType.heading5;case 6:return fe.RichTextNodeType.heading6}}function DM(e){return{fullName:lb(e),level:e}}const LQ=[1,2,3,4,5,6];function jQ(e,t=LQ){const n=new RegExp(`^heading([${t.join(",")}]){1}$`),r=e.match(n);if(!r||!r[1])return;const i=parseInt(r[1]);return{fullName:lb(i),level:i}}function UQ(e,t){const n=e.level;if(t.includes(n))return{fullName:lb(n),level:n}}const ABe=e=>{const t=e[0]??1;return{fromPrismic(n){return function(r){var a;const i=Du.converter.fromPrismic(n)(HC,r),o=jQ(r.type,e)||DM(t);return(a=n.nodes[HC])==null?void 0:a.create({level:o.level,...sa.fromPrismic(r)},i)}},toPrismic(n){const{fullName:r}=UQ(n.attrs,e)||DM(t);return Du.converter.toPrismic(n,r,sa.toPrismic(n))}}};function hBe(e){return e?e.size?Array.from(e.values()).reduce((n,r)=>{const i=jQ(r);return i?[...n,i.level]:n},[]).sort((n,r)=>n-r):[]:LQ}function mBe(e){return pBe.extend({name:"heading"}).configure({levels:e})}const nu={name:HC,build:e=>{const t=hBe(e);if(!t)return;const n=t.map(r=>lb(r));return new wUe(n,mBe(t),t,ABe(t),r=>{const i=UQ(r,t);return i&&`Heading ${i.level}`})}};function gBe(e){const{content:t,thumbnail:n,imageViewProps:{getPos:r,updateAttributes:i,editor:o,node:a}}=e,[s,u]=E.useTransition();function c(A){u(()=>i({content:A}))}function l(A){const m=im(A),g=r()+a.nodeSize;c({...t,...m}),o.chain().focus(g+1).run()}function d({croppedImages:A}){if(!t)return;const m=A[n.name];if(!m)return;const g=z7({content:t,croppedImage:m});g!==t&&c(g)}function p(){const A=r(),m=r()+a.nodeSize;o.chain().deleteRange({from:A,to:m}).focus(m).run()}return{onMediaSelected:l,onCropperDialogClose:d,isUpdating:s,updateContent:c,onClear:p}}function vBe(e){const{node:t}=e,n=t.attrs.content,{selected:r}=kQ(e),i=E.useRef(null),o={width:void 0,height:void 0,name:gd},{onMediaSelected:a,onCropperDialogClose:s,isUpdating:u,updateContent:c,onClear:l}=gBe({content:n,thumbnail:o,imageViewProps:e}),[d,p]=E.useState(!1),A="Feature image",m=(n==null?void 0:n.width)===0&&(n==null?void 0:n.height)===0,g=n&&!m?[`${n.width}×${n.height}px`]:[],_={thumbnail:o,contentView:n,labels:lC(o,n,n)};return E.useLayoutEffect(()=>{var I;const b=(I=i==null?void 0:i.current)==null?void 0:I.closest(`.${BQ}`);Id.isHTMLElement(b)&&b.style.removeProperty("height")},[]),f.jsx(oQ,{children:f.jsx(V7,{ref:i,isMediaDialogOpen:d,selected:r,onMediaSelected:a,onMediaDialogOpenChange:p,children:f.jsx(E.Suspense,{fallback:CBe,children:n!=null&&n.url?f.jsx(i8,{allContentViews:[n],content:n,contentView:n,fieldLabel:A,imageLabel:g,initialImages:[_],isUpdating:u,readOnly:!1,thumbnailName:o.name,onClear:l,onContentChange:c,onCropperDialogClose:s,onMediaDialogOpenChange:p}):f.jsx(K7,{fieldLabel:A,isUpdating:u,readOnly:!1,onMediaDialogOpenChange:p})})})})}const BQ="imageViewNodeWrapper",PQ=144,yBe=94;function bBe(e){return(e?yBe:PQ)+12+12+1+1}const CBe=f.jsx("div",{style:{height:PQ}}),YC=jn.create({name:"image",group:"block",atom:!0,addAttributes(){return{content:{default:void 0}}},addCommands(){return{setImage:()=>e=>{const{dispatch:t,tr:n}=e,r=this.type.create();return t&&n.replaceSelectionWith(r),!0}}},parseHTML(){return[{tag:"image"}]},renderHTML({HTMLAttributes:e}){return["image",e]},addNodeView(){return function(t){const n=t.node.attrs.content===void 0;return sQ(vBe,{attrs:{style:`height: ${bBe(n)}px`,class:BQ}})(t)}}}),SBe={fromPrismic(e){return function(t){var n;return(n=e.nodes[YC.name])==null?void 0:n.create({content:t.data})}},toPrismic(e){if(e.attrs.content!==void 0)return{type:"image",data:{...e.attrs.content}}}},DQ=new xUe([fe.RichTextNodeType.image],YC.name,YC,SBe),_Be=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,IBe=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,TBe=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,xBe=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,wBe=Nc.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:e=>e.style.fontStyle!=="normal"&&null},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:e}){return["em",Et(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[ag({find:_Be,type:this.type}),ag({find:TBe,type:this.type})]},addPasteRules(){return[ug({find:IBe,type:this.type}),ug({find:xBe,type:this.type})]}});class EBe{constructor(t,n,r){Rn(this,"extType",qc.Mark);Rn(this,"richTextNodeTypes",[fe.RichTextNodeType.em]);this.name=t,this.component=n,this.converter=r}}const WQ="em",KQ=wBe.extend({name:WQ}),$Be={fromPrismic(e){return function(){var t;return(t=e.marks[KQ.name])==null?void 0:t.create()}},toPrismic(){}},RBe=new EBe(WQ,KQ,$Be),MO=RBe;class OBe{constructor(t,n,r){Rn(this,"extType",qc.Mark);Rn(this,"richTextNodeTypes",[]);this.name=t,this.component=n,this.converter=r}}const NQ="label",GC=Nc.create({name:NQ,priority:1e3,keepOnSplit:!1,inclusive:!1,addOptions(){return{htmlAttributes:{style:"background-color: hsl(251, 89%, 96%); border: 1px dashed rgba(68, 53, 146, 0.4); border-radius: 0px 2px 2px 2px"}}},addAttributes(){return{label:{default:""}}},addCommands(){return{setLabel:e=>({chain:t})=>t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMark(this.name,e).run(),unsetLabel:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},renderHTML({HTMLAttributes:e}){return["span",Et(this.options.htmlAttributes,e),0]}}),FBe={fromPrismic(e){return function(t){var i;const n=t.data,r={type:GC.name,label:n};return(i=e.marks[GC.name])==null?void 0:i.create(r)}},toPrismic(e){return e.attrs.label}},LO=new OBe(NQ,GC,FBe);class kBe{constructor(t,n,r){Rn(this,"extType",qc.Mark);Rn(this,"richTextNodeTypes",[fe.RichTextNodeType.hyperlink]);this.name=t,this.component=n,this.converter=r}}const qQ="hyperlink",Vo=Nc.create({name:qQ,priority:1e3,keepOnSplit:!1,inclusive:!1,addOptions(){return{openOnClick:!1,linkOnPaste:!0,autolink:!0,protocols:[],htmlAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null,id:""},validate:void 0}},addAttributes(){return{href:{default:""},id:{default:""},target:{default:"_blank"},rel:{default:"noopener noreferrer nofollow"},class:{default:null},media:{default:null}}},parseHTML(){return[{tag:'a[href]:not([href *= "javascript:" i])'}]},renderHTML({HTMLAttributes:e}){return["a",Et(this.options.htmlAttributes,e),0]},addCommands(){return{setWebLink:e=>({chain:t})=>t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMark(this.name,e).setMeta("preventAutolink",!0).run(),setDocumentLink:e=>({chain:t})=>t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMark(this.name,e).setMeta("preventAutolink",!0).run(),setMediaLink:e=>({chain:t})=>{const n=JC(t8({media:e.media}).value);return t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMark(this.name,{media:n}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}}}),MBe={fromPrismic(e){return function(t){var r,i,o,a;const n=t.data;if(n.__TYPE__==="DocumentLink"){const s={type:Vo.name,id:n.id};return(r=e.marks[Vo.name])==null?void 0:r.create(s)}if(n.__TYPE__==="ImageLink"){const s={type:Vo.name,media:JC(n)};return(i=e.marks[Vo.name])==null?void 0:i.create(s)}if(n.__TYPE__==="FileLink"){const s={type:Vo.name,media:JC(n)};return(o=e.marks[Vo.name])==null?void 0:o.create(s)}if(n.__TYPE__==="ExternalLink"){const s={type:Vo.name,url:n.url,href:n.url,target:n.target};return(a=e.marks[Vo.name])==null?void 0:a.create(s)}}},toPrismic(e){return e.attrs.media?QQ(e.attrs.media):e.attrs.id?{__TYPE__:"DocumentLink",id:e.attrs.id}:{__TYPE__:"ExternalLink",url:e.attrs.href,target:e.attrs.target}}},VQ=new kBe(qQ,Vo,MBe);function JC(e){return JSON.stringify(e)}function QQ(e){return JSON.parse(e)}const LBe=jn.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:e}){return["li",Et(this.options.HTMLAttributes,e),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),WM=Nc.create({name:"textStyle",priority:101,addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:e=>e.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["span",Et(this.options.HTMLAttributes,e),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:e,commands:t})=>{const n=mO(e,this.type);return Object.entries(n).some(([,i])=>!!i)?!0:t.unsetMark(this.name)}}}}),KM=/^(\d+)\.\s$/,jBe=jn.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:e=>e.hasAttribute("start")?parseInt(e.getAttribute("start")||"",10):1},type:{default:void 0,parseHTML:e=>e.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:e}){const{start:t,...n}=e;return t===1?["ol",Et(this.options.HTMLAttributes,n),0]:["ol",Et(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleOrderedList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(LBe.name,this.editor.getAttributes(WM.name)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let e=sg({find:KM,type:this.type,getAttributes:t=>({start:+t[1]}),joinPredicate:(t,n)=>n.childCount+n.attrs.start===+t[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(e=sg({find:KM,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:t=>({start:+t[1],...this.editor.getAttributes(WM.name)}),joinPredicate:(t,n)=>n.childCount+n.attrs.start===+t[1],editor:this.editor})),[e]}}),ZC=jBe.extend({name:"orderedList",addAttributes(){return{start:{default:1,parseHTML:e=>e.hasAttribute("start")?parseInt(e.getAttribute("start")||"",10):1}}},renderHTML({HTMLAttributes:e}){const{start:t,...n}=e;return t===1?["ol",Et(this.options.HTMLAttributes,n),0]:["ol",Et(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleOrderedList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}}}).configure({itemTypeName:"listItem"}),UBe={fromPrismic(e){return function(t){var r;const n=ql.converter.fromPrismic(e)(t);if(n)return(r=e.nodes[ZC.name])==null?void 0:r.create(sa.fromPrismic(t),n)}},toPrismic(e){return Pu.children.map(e,t=>ql.converter.toPrismic(t,fe.RichTextNodeType.orderedList).filter(io.isDefined)).flat()}},BBe=new wO([fe.RichTextNodeType.orderedList],ZC.name,ZC,UBe),Cg=BBe,zQ=[EO,MO,VQ,LO];function HQ(e){return[ao,yg,Cg,nu.build(e),FQ,MQ,DQ,...zQ].filter(io.isDefined)}const YQ=[{nodeType:fe.RichTextNodeType.paragraph,icon:"textFields",isActive:e=>e.isActive(ao.name)&&!e.isActive(yg.name)&&!e.isActive(Cg.name),runCommands:Ot((e,t)=>e.clearNodes().setDirection(Si(t))),shortText:"par",text:"Paragraph"},{nodeType:fe.RichTextNodeType.heading1,icon:"looks1",isActive:e=>e.isActive(nu.name,{level:1}),runCommands:Ot((e,t)=>e.setHeading({level:1}).setDirection(Si(t))),shortText:"h1",text:"Heading 1"},{nodeType:fe.RichTextNodeType.heading2,icon:"looks2",isActive:e=>e.isActive(nu.name,{level:2}),runCommands:Ot((e,t)=>e.setHeading({level:2}).setDirection(Si(t))),shortText:"h2",text:"Heading 2"},{nodeType:fe.RichTextNodeType.heading3,icon:"looks3",isActive:e=>e.isActive(nu.name,{level:3}),runCommands:Ot((e,t)=>e.setHeading({level:3}).setDirection(Si(t))),shortText:"h3",text:"Heading 3"},{nodeType:fe.RichTextNodeType.heading4,icon:"looks4",isActive:e=>e.isActive(nu.name,{level:4}),runCommands:Ot((e,t)=>e.setHeading({level:4}).setDirection(Si(t))),shortText:"h4",text:"Heading 4"},{nodeType:fe.RichTextNodeType.heading5,icon:"looks5",isActive:e=>e.isActive(nu.name,{level:5}),runCommands:Ot((e,t)=>e.setHeading({level:5}).setDirection(Si(t))),shortText:"h5",text:"Heading 5"},{nodeType:fe.RichTextNodeType.heading6,icon:"looks6",isActive:e=>e.isActive(nu.name,{level:6}),runCommands:Ot((e,t)=>e.setHeading({level:6}).setDirection(Si(t))),shortText:"h6",text:"Heading 6"},{nodeType:fe.RichTextNodeType.list,icon:"formatListBulleted",isActive:e=>e.isActive(yg.name),runCommands:Ot((e,t)=>e.toggleBulletList().setDirection(Si(t))),shortText:"bull",text:"Bulleted list"},{nodeType:fe.RichTextNodeType.orderedList,icon:"formatListNumbered",isActive:e=>e.isActive(Cg.name),runCommands:Ot((e,t)=>e.toggleOrderedList().setDirection(Si(t))),shortText:"num",text:"Numbered list"},{nodeType:fe.RichTextNodeType.preformatted,icon:"dataObject",isActive:e=>e.isActive(FQ.name),runCommands:Ot((e,t)=>e.setCodeBlock().setDirection(Si(t))),shortText:"code",text:"Code"},{nodeType:fe.RichTextNodeType.embed,icon:"cloud",isActive:e=>e.isActive(MQ.name),runCommands:Ot(e=>e.setEmbed()),shortText:"emb",text:"Embed"},{nodeType:fe.RichTextNodeType.image,icon:"image",isActive:e=>e.isActive(DQ.name),runCommands:Ot(e=>e.setImage()),shortText:"img",text:"Image"}],PBe=[{nodeType:fe.RichTextNodeType.strong,icon:"formatBold",isActive:e=>e.isActive(EO.name),runCommands:Ot(e=>e.toggleBold())},{nodeType:fe.RichTextNodeType.em,icon:"formatItalic",isActive:e=>e.isActive(MO.name),runCommands:Ot(e=>e.toggleItalic())}],DBe=[{nodeType:fe.RichTextNodeType.rtl,icon:"formatTextDirectionRToL",isActive:e=>e.isActive({[Ho]:lu}),runCommands:Ot((e,t)=>e.toggleDirection(Si(t)))}];function Ot(e){return(t,n={})=>{let r=n.can===!0?t.can().chain():t.chain().focus();return n.deleteRange!==void 0&&(r=r.deleteRange(n.deleteRange)),n.can?WBe(t,r,e):e(r,t).run()}}function Si(e){const t=e.state.selection.$from.parent.attrs;return sa.parseNodeAttrsDirection(t)}function gm(e,t){return e.filter(n=>t.includes(n.nodeType))}function WBe(e,t,n){try{return n(t,e).run()}catch{return!1}}function KBe(e){const{items:t,editor:n}=e;return t.length===0?null:f.jsxs(f.Fragment,{children:[f.jsx(h.ToolbarSeparator,{}),t.map(r=>f.jsx(h.ToolbarToggleButton,{disabled:!r.runCommands(n,{can:!0}),onPressedChange:()=>{r.runCommands(n)},pressed:r.isActive(n),startIcon:r.icon},r.nodeType))]})}function NBe(e){const{labels:t,editor:n}=e,r=n.getAttributes("label").label;return f.jsxs(f.Fragment,{children:[f.jsx(h.ToolbarSeparator,{}),f.jsxs(h.DropdownMenu,{children:[f.jsx(h.DropdownMenuTrigger,{disabled:t.length===0,children:f.jsx(h.Button,{endIcon:"arrowDropDown",size:"small",color:"grey",children:NM(r??"Labels")})}),f.jsx(h.DropdownMenuContent,{align:"start",asPortal:!1,maxHeight:256,avoidCollisions:!1,children:t.map((i,o)=>{const a=r===i;return f.jsx(h.DropdownMenuItem,{onSelect:()=>a?n.commands.unsetLabel():qBe(n,i),endIcon:a&&f.jsx(h.Icon,{name:"check",size:"extraSmall"}),children:NM(i)},`${i}-${o}`)})})]})]})}function qBe(e,t){Ot(r=>r.setLabel({label:t}))(e)}function NM(e){return Ep.overflow(e,20)}function VBe(e){const{editor:t}=e,n=t.getAttributes("label");if(!n.label)return null;const r=n.label;return f.jsx(h.Box,{backgroundColor:"purple9",padding:{block:2,inline:4},alignItems:"center",borderRadius:{topLeft:2,topRight:2,bottomRight:2},maxWidth:125,children:f.jsx(h.Text,{color:"white",variant:"small",noWrap:!0,children:r})})}function QBe(e){const{disabled:t,showWebLinkModal:n,showDocumentsLinkModal:r,showMediaLinkModal:i}=zBe(e);return f.jsxs(f.Fragment,{children:[f.jsx(h.ToolbarSeparator,{}),f.jsxs(h.ToolbarButtonGroup,{density:"compact",children:[f.jsx(h.ToolbarButton,{disabled:t,startIcon:"link",onClick:n},fe.RichTextNodeType.hyperlink),f.jsxs(h.DropdownMenu,{children:[f.jsx(h.DropdownMenuTrigger,{children:f.jsx(h.ToolbarButton,{startIcon:"arrowDropDown"})}),f.jsxs(h.DropdownMenuContent,{align:"end",asPortal:!1,children:[f.jsx(h.DropdownMenuItem,{startIcon:f.jsx(h.Icon,{name:"public"}),onSelect:n,children:"Link to web page"}),f.jsx(h.DropdownMenuItem,{startIcon:f.jsx(h.Icon,{name:"description"}),onSelect:r,children:"Link to document"}),f.jsx(h.DropdownMenuItem,{startIcon:f.jsx(h.Icon,{name:"image"}),onSelect:i,children:"Link to media"})]})]})]})]})}function zBe(e){const{editor:t,setModal:n}=e;function r(){n("webLink")}function i(){n("documentLink")}function o(){n("mediaLink")}return{disabled:!Ot(s=>s.setWebLink({href:""}))(t,{can:!0}),showWebLinkModal:r,showDocumentsLinkModal:i,showMediaLinkModal:o}}function HBe(e){const{docId:t,onEdit:n,onUnlink:r}=e,i=YBe(t),o=Te();if(!i)return null;const a=i.versions[0],s=UR({status:a==null?void 0:a.status,releaseId:(a==null?void 0:a.status)==="release"?a.release_id:void 0,documentId:i.id,versionId:a==null?void 0:a.version_id,baseUrl:o.baseUrl}),u=(a==null?void 0:a.preview_summary)??"",c=(a==null?void 0:a.custom_type_label)??"";return f.jsx(ju,{url:s,title:i.title,subTitle:c,description:u,onEdit:n,onUnlink:r,largeIconName:"description"})}function YBe(e){const t=Te();t.searchDocuments||Ht("searchDocuments");const{coreApiBaseUrl:n,authStrategy:r}=t;return Ke.useRequest(_h,[n,r,e])}function GBe(e){const{editor:t}=e,{searchDocuments:n}=Te(),r=t.getAttributes(fe.RichTextNodeType.hyperlink);if(r.id&&n){const i=r.id;return f.jsx(JBe,{docId:i,...e})}if(r.href){const i=r.href;return f.jsx(ZBe,{url:i,...e})}if(r.media){const i=QQ(r.media);return f.jsx(XBe,{media:i,...e})}return null}function JBe(e){const{editor:t,onEditDocumentLink:n,docId:r}=e;return f.jsx(h.ErrorBoundary,{renderError:()=>f.jsx(ju,{title:"Failed to Load Linked Document Data",error:!0,onEdit:n,onUnlink:()=>Cu(t)}),children:f.jsx(E.Suspense,{fallback:f.jsx(ju,{loading:!0,onEdit:n,onUnlink:()=>Cu(t)}),children:f.jsx(HBe,{docId:r,onEdit:n,onUnlink:()=>Cu(t)})})})}function ZBe(e){const{url:t,editor:n,onEditWebLink:r}=e,i=Fr.toURL(t);return i?f.jsx(ju,{url:t,title:Fr.getUrlTitle(i),subTitle:t,onEdit:r,onUnlink:()=>Cu(n)}):f.jsx(ju,{url:t,subTitle:t,onEdit:r,onUnlink:()=>Cu(n)})}function XBe(e){const{media:t,editor:n,onEditMediaLink:r}=e;return ye.FilledImageLinkContent.is(t)?f.jsx(e8,{url:t.url,title:t.name,subTitle:`${t.width} x ${t.height} pixels`,onEdit:r,onUnlink:()=>Cu(n)}):ye.FilledFileLinkContent.is(t)?f.jsx(ju,{url:t.url,title:t.name,subTitle:ePe({filename:t.name}),largeIconName:"insertDriveFile",onEdit:r,onUnlink:()=>Cu(n)}):null}function Cu(e){Ot(n=>n.unsetLink())(e)}function ePe(e){const{filename:t}=e,n=t.split(".").pop();return n?n.toLowerCase():""}function tPe(e){const{open:t}=e,{onOpenChange:n,onSelectDocument:r}=nPe(e);return f.jsx(G7,{open:t,onOpenChange:n,onSelectDocument:r})}function nPe(e){const{editor:t,setOpen:n}=e;function r(o){Ot(s=>s.extendMarkRange(fe.RichTextNodeType.hyperlink).setDocumentLink({id:o}))(t),n(!1)}function i(o){n(o)}return{onSelectDocument:r,onOpenChange:i}}function rPe(e){const{open:t}=e,{onOpenChange:n,onMediaSelected:r}=iPe(e);return f.jsx(zR,{open:t,onOpenChange:n,onMediaSelected:r,assetType:"all"})}function iPe(e){const{editor:t,setOpen:n}=e;function r(i){Ot(a=>a.extendMarkRange(fe.RichTextNodeType.hyperlink).setMediaLink({media:i}))(t),n(!1)}return{onMediaSelected:r,onOpenChange:n}}function oPe(e){const{open:t,setOpen:n}=e,{url:r,setUrl:i,openInNewTab:o,setOpenInNewTab:a,disabled:s,onUpdate:u}=aPe(e);return f.jsxs(h.Dialog,{open:t,onOpenChange:n,size:"small",children:[f.jsx(h.DialogHeader,{title:"Set Link URL"}),f.jsxs(h.DialogContent,{padding:16,children:[f.jsx(h.FormInput,{value:r,onValueChange:i,placeholder:"Paste URL",icon:"public"}),r&&f.jsx(h.InlineLabel,{value:"Open in new tab",children:f.jsx(h.Checkbox,{checked:o,onCheckedChange:a})})]}),f.jsxs(h.DialogActions,{children:[f.jsx(h.DialogCancelButton,{}),f.jsx(h.DialogActionButton,{onClick:u,disabled:s,children:"Update"})]})]})}function aPe(e){const{editor:t,open:n,setOpen:r}=e,i=sPe(t),[o,a]=E.useState(i.url),[s,u]=E.useState(i.openInNewTab);Pe.useOnChange(n,()=>{n&&(a(i.url),u(i.openInNewTab))});const c=!o||o===i.url&&s===i.openInNewTab;function l(){const d=s?"_blank":"_self";Ot(p=>p.extendMarkRange(fe.RichTextNodeType.hyperlink).setWebLink({href:o,target:d}))(t),r(!1)}return{url:o,setUrl:a,openInNewTab:s,disabled:c,setOpenInNewTab:u,onUpdate:l}}function sPe(e){const t=e.getAttributes(fe.RichTextNodeType.hyperlink);return{url:t.href??"",openInNewTab:t.target==="_blank"}}function uPe(e){const{items:t,editor:n}=e;return t.length===0?null:f.jsxs(f.Fragment,{children:[f.jsx(h.ToolbarSeparator,{}),f.jsx(h.ToolbarToggleButtonGroup,{onValueChange:r=>{t.forEach(i=>{(i.isActive(n)&&!r.includes(i.nodeType)||!i.isActive(n)&&r.includes(i.nodeType))&&i.runCommands(n)})},type:"multiple",value:t.filter(r=>r.isActive(n)).map(r=>r.nodeType),children:t.map(r=>f.jsx(h.ToolbarToggleButtonGroupItem,{disabled:!r.runCommands(n,{can:!0}),startIcon:r.icon,value:r.nodeType},r.nodeType))},"mark")]})}function cPe(e){var r;const{items:t,editor:n}=e;return t.length===0?null:f.jsxs(h.DropdownMenu,{children:[f.jsx(h.DropdownMenuTrigger,{disabled:t.length===1,children:f.jsx(h.Button,{endIcon:"arrowDropDown",size:"small",color:"grey",children:((r=t.find(i=>i.isActive(n)))==null?void 0:r.text)??""})}),f.jsx(h.DropdownMenuContent,{align:"start",asPortal:!1,maxHeight:256,avoidCollisions:!1,children:t.map(i=>f.jsx(h.DropdownMenuItem,{onSelect:()=>{i.runCommands(n)},children:i.text},i.nodeType))})]})}function L1(e){return{duration:100,hideOnClick:!0,offset:e,placement:"top-start",appendTo:document.querySelector("body > div")??"parent"}}function lPe(e){const{editor:t,nodeTypes:n,labels:r}=e,[i,o]=E.useState(),a=n.includes(fe.RichTextNodeType.hyperlink),s=!i,{shouldShowBubbleMenu:u,shouldshowPopover:c}=dPe({editor:t}),[l,d]=E.useState(!0);E.useEffect(()=>{d(!1)},[]);function p(g){o(g?"webLink":void 0)}function A(g){o(g?"documentLink":void 0)}function m(g){o(g?"mediaLink":void 0)}return l?null:f.jsxs(f.Fragment,{children:[f.jsx(T1,{editor:t,tippyOptions:L1([-48,0]),shouldShow:u,children:s&&f.jsx(fPe,{editor:t,nodeTypes:n,labels:r,setModal:o})}),f.jsx(T1,{editor:t,tippyOptions:L1([-48,0]),shouldShow:g=>c(g,"hyperlink"),children:s&&f.jsx(GBe,{editor:t,onEditWebLink:()=>o("webLink"),onEditDocumentLink:()=>o("documentLink"),onEditMediaLink:()=>o("mediaLink")})}),f.jsx(T1,{editor:t,tippyOptions:L1([0,0]),shouldShow:g=>c(g,"label"),children:f.jsx(VBe,{editor:t})}),a&&f.jsxs(f.Fragment,{children:[f.jsx(oPe,{open:i==="webLink",setOpen:p,editor:t}),f.jsx(tPe,{open:i==="documentLink",setOpen:A,editor:t}),f.jsx(rPe,{open:i==="mediaLink",setOpen:m,editor:t})]})]})}function fPe(e){const{editor:t,nodeTypes:n,labels:r,setModal:i}=e,o=n.includes("hyperlink"),a=r.length>0,s=gm(YQ,n),u=gm(PBe,n),c=gm(DBe,n),l=s.length+u.length+c.length+Number(o);return l===0?null:f.jsxs(h.Toolbar,{children:[f.jsx(cPe,{items:s,editor:t}),a&&f.jsx(NBe,{labels:r,editor:t}),f.jsx(uPe,{items:u,editor:t}),o&&f.jsx(QBe,{editor:t,setModal:i}),f.jsx(KBe,{items:c,editor:t}),l>1&&f.jsxs(f.Fragment,{children:[f.jsx(h.ToolbarSeparator,{}),f.jsx(h.ToolbarButton,{onClick:()=>{t.chain().focus().clearNodes().unsetAllMarks().run()},startIcon:"formatClear"},"clear")]})]})}function dPe(e){const{editor:t}=e;function n(i){const{view:o,state:a,from:s,to:u}=i;if(!o.hasFocus())return!1;const{doc:c,selection:l}=a;return!(t.isActive(fe.RichTextNodeType.preformatted)||l.empty||c.textBetween(s,u).length===0)}function r(i,o){const{view:a,state:s,from:u,to:c}=i,l=a.state.doc.nodeAt(u),{doc:d,selection:p}=s;return!p.empty||d.textBetween(u,c).length>0?!1:!!(l!=null&&l.marks.some(m=>m.type.name===o))}return{shouldShowBubbleMenu:n,shouldshowPopover:r}}function pPe(e){const{content:t,field:n,id:r,readOnly:i}=e,o=APe(n),a=t&&DC.converter(o.nodeExtensions).fromPrismic(o.schema,o.nodeTypes,t),s=Pe.useStableCallback(e.onContentChange),u=h.useEditor({content:a==null?void 0:a.toJSON(),editable:!i,editorProps:{attributes:{class:`${h.contentEditableClass} ${h.contentEditableMultilinePlaceholderClass}`,id:r,tabIndex:"0"}},extensions:o.allComponents,injectCSS:!1,onUpdate({editor:c}){if(c.isEmpty)return s(void 0);const l=DC.converter(o.nodeExtensions).toPrismic(c.state.doc);s(l)}},[o,i]);return f.jsxs(h.Field,{children:[f.jsx(h.FieldLabel,{htmlFor:r,children:nr(n)}),f.jsxs(h.FieldControl,{children:[u.isEditable&&f.jsx(lPe,{editor:u,nodeTypes:o.names.concat(c2e),labels:o.labels}),f.jsx(fUe,{editor:u,style:{flexGrow:1}})]})]})}function APe(e){var n,r;const t=`${((n=e.config)==null?void 0:n.multi)??""}-${((r=e.config)==null?void 0:r.single)??""}`;return E.useMemo(()=>{var m;const{extensions:i,nodeTypes:o}=$Ue(e.config),a=i.filter(hPe),s=i.flatMap(g=>g.richTextNodeTypes),u=i.map(g=>g.component),c=i.filter(mPe).map(g=>g.name),l=[...u,...eBe(e,a),l2e.configure({supportedExtensionNames:c}),_Le],d=l.map(g=>g.name),p=WMe(l),A=gPe((m=e.config)==null?void 0:m.labels);return{allComponents:l,extensionNames:d,nodeTypes:o,nodeExtensions:a,names:s,schema:p,labels:A}},[t])}function hPe(e){return e.extType===qc.Node}function mPe(e){return!(e.extType!==qc.Node||e.nodeType!==vl.Text||e.lockedFormat)}function gPe(e){return Array.from(e??[])}function vPe(e){var p,A;const{content:t,field:n,id:r,readOnly:i,onContentChange:o}=e,{placeholder:a,options:s}=n.config??{},u=!!(s!=null&&s.includes("")),c=CPe(n),l=yPe({content:t,placeholder:a,defaultValue:c,canHaveEmptyValue:u}),d=a&&c===void 0;return f.jsxs(h.Field,{children:[f.jsx(h.FieldIcon,{name:"arrowDropDownCircle"}),f.jsx(h.FieldLabel,{htmlFor:r,children:nr(n)}),f.jsx(h.FieldControl,{children:f.jsxs(h.Select,{id:r,size:"large",color:"grey",value:l,disabled:i,renderTrigger:()=>f.jsx(h.SelectGhostTrigger,{id:r}),onValueChange:m=>{o(bPe({value:m,placeholder:a}))},children:[d&&f.jsx(h.SelectItem,{value:a,children:a}),(A=(p=n.config)==null?void 0:p.options)==null?void 0:A.map(m=>f.jsx(h.SelectItem,{value:m||jO,children:m},m))]})})]})}function yPe(e){const{content:t,placeholder:n,defaultValue:r,canHaveEmptyValue:i}=e;let{value:o}=t??{};return o===""&&i?jO:(o===""&&(o=void 0),o??r??n)}function bPe(e){const{placeholder:t}=e;let{value:n}=e;if(n!==t)return n===jO&&(n=""),{__TYPE__:"FieldContent",type:"Select",value:n}}function CPe(e){var t,n;return((t=e.config)==null?void 0:t.default_value)===void 0||(n=e.config.options)==null?void 0:n[0]}const jO=" ";function SPe(e){const{id:t,readOnly:n,field:r,content:i,onContentChange:o}=e,a=i!=null&&i.value?tS.dateFromISOString(i.value):void 0;return f.jsxs(h.Field,{children:[f.jsx(h.FieldIcon,{name:"event"}),f.jsx(h.FieldLabel,{id:t,children:nr(r)}),f.jsx(h.FieldControl,{children:f.jsx(h.Box,{padding:{left:4,right:12},width:"100%",flexDirection:"column",justifyContent:"center",children:f.jsx(h.DateInput,{mode:"date-time","aria-labelledby":t,disabled:n,value:a,onValueChange:s=>o(_Pe(s))})})})]})}function _Pe(e){if(e)return{__TYPE__:"FieldContent",type:"Timestamp",value:IPe(e)}}function IPe(e){const t=`${e.getUTCFullYear()}`.padStart(4,"0"),n=`${e.getUTCMonth()+1}`.padStart(2,"0"),r=`${e.getUTCDate()}`.padStart(2,"0"),i=`${e.getUTCHours()}`.padStart(2,"0"),o=`${e.getUTCMinutes()}`.padStart(2,"0");return`${t}-${n}-${r}T${i}:${o}:00+00:00`}function fb(e){const{id:t,readOnly:n,content:r,nestableWidget:i}=e,o=Pe.useStableCallback(e.onContentChange);return E.useMemo(()=>{const a={id:t,readOnly:n,onContentChange:o};return i.type==="Boolean"?f.jsx(D$e,{...a,field:i,content:ye.isBooleanContent(r)?r:void 0}):i.type==="Date"?f.jsx(q$e,{...a,field:i,content:ye.isDateContent(r)?r:void 0}):i.type==="Timestamp"?f.jsx(SPe,{...a,field:i,content:ye.isTimestampContent(r)?r:void 0}):i.type==="Image"?f.jsx(lOe,{...a,field:i,content:ye.isImageContent(r)?r:void 0}):i.type==="Link"?f.jsx(n8,{...a,field:i,content:ye.isLinkContent(r)?r:void 0}):i.type==="Number"?f.jsx(xOe,{...a,field:i,content:ye.isNumberContent(r)?r:void 0}):i.type==="StructuredText"?f.jsx(pPe,{...a,field:i,content:ye.isRichTextContent(r)?r:void 0}):i.type==="Select"?f.jsx(vPe,{...a,field:i,content:ye.isSelectContent(r)?r:void 0}):i.type==="Text"?f.jsx(IOe,{...a,field:i,content:ye.isTextContent(r)?r:void 0}):i.type==="Embed"?f.jsx(tRe,{...a,field:i,content:ye.isEmbedContent(r)?r:void 0}):i.type==="Color"?f.jsx(K$e,{...a,field:i,content:ye.isColorContent(r)?r:void 0}):i.type==="GeoPoint"?f.jsx(nRe,{...a,field:i,content:ye.isGeoPointContent(r)?r:void 0}):i.type==="IntegrationFields"?f.jsx(_Oe,{...a,field:i,content:ye.isIntegrationFieldContent(r)?r:void 0}):null},[r,t,i,o,n])}function TPe(e){const{content:t,id:n,nonRepeatableZone:r,onContentChange:i,readOnly:o}=e,a=E.useMemo(()=>Object.entries(r),[r]);return f.jsx(f.Fragment,{children:a.map(([s,u])=>{const c=t[s];return f.jsx(fb,{id:`${n}.${s}`,readOnly:o,nestableWidget:u,content:ye.isNestableContent(c)?c:void 0,onContentChange:l=>{i(xPe(t,s,l))}},s)})})}function xPe(e,t,n){return n?{...e,[t]:n}:Ql.removeKey(e,t)}function UO(e){var o,a;const{group:t,content:n,onContentChange:r,...i}=e;return f.jsx(U$e,{children:f.jsx(BO,{...i,title:XC(t),addItemButtonTitle:`Add item in "${XC(t)}"`,repeatable:((o=t.config)==null?void 0:o.repeat)!==!1,repeatableZone:((a=t.config)==null?void 0:a.fields)??{},content:n==null?void 0:n.value,onContentChange:s=>{r({__TYPE__:"GroupContentType",value:s})}})})}function XC(e){var t;return((t=e.config)==null?void 0:t.label)??e.fieldset??e.type}function GQ(e){const{id:t,readOnly:n,content:r,widget:i}=e,o=Pe.useStableCallback(e.onContentChange);return E.useMemo(()=>{const a={id:t,readOnly:n,onContentChange:o};return i.type==="Group"?f.jsx(UO,{...a,group:i,content:ye.isGroupContent(r)?r:void 0}):f.jsx(fb,{...a,nestableWidget:i,content:ye.isNestableContent(r)?r:void 0})},[r,t,i,o,n])}function BO(e){const{id:t,title:n,addItemButtonTitle:r,content:i,onContentChange:o,readOnly:a,repeatable:s=!0,repeatableZone:u}=e,c=Object.entries(u);let l=i??[$Pe];!s&&l.length>1&&(l=l.slice(0,1));const{scrollOffsetTop:d}=Te(),p=E.useRef(new WeakMap);wPe(p.current,l);function A(I){return p.current.get(I)??"!bugged!"}function m(I){const x=eS();o(kt.insertAtIndex(l,I,x))}function g(I){const{index:x,offset:v}=I;o(kt.move(l,x,x+v))}function _(I){o(kt.removeIndex(l,I))}function b(I,x,v,S){const y=OPe(I,[v,S]),T=RPe(l,[x,y]);EPe(p.current,I,y),o(T)}return Object.keys(u).length===0?null:f.jsx(h.Group,{title:n??"Repeatable zone",addItemButtonTitle:r??"Add item in repeatable zone",items:l,maxItems:s?void 0:1,getItemKey:A,onAddItem:m,dnd:{scrollOffsetTop:d,onReorder:o,renderDragPreview:({index:I})=>f.jsx(FPe,{title:n??"Repeatable zone",index:I}),renderDropIndicator:kPe},children:(I,x)=>{const v=new Map(I.value),S=A(I);return f.jsx(h.LazyRender,{keepLoaded:!0,loadWhenSearching:!0,children:f.jsx(h.GroupItem,{index:x,title:`${x+1} • Item`,onMove:g,onDelete:_,children:c.map(([y,T])=>f.jsx(GQ,{id:`${t}[${S}].${y}`,content:v.get(y),widget:T,onContentChange:w=>b(I,x,y,w),readOnly:a},y))})})}})}function wPe(e,t){t.forEach(n=>{e.has(n)||e.set(n,uz.uniqueNumber())})}function EPe(e,t,n){const r=e.get(t);r!==void 0&&e.set(n,r)}const $Pe={__TYPE__:"GroupItemContent",value:[]};function RPe(e,t){const[n,r]=t;return r?e.map((i,o)=>o===n?r:i):e.filter((i,o)=>o!==n)}function OPe(e,t){const[n,r]=t;if(!r){const o=e.value.filter(([a])=>a!==n);return eS(o)}const i=Array.from(new Map(e.value).set(n,r));return eS(i)}function eS(e=[]){return{__TYPE__:"GroupItemContent",value:e}}function FPe(e){const{title:t,index:n}=e;return f.jsxs(h.Box,{padding:{block:8,inline:12},backgroundColor:"grey3",border:!0,borderRadius:6,alignItems:"center",justifyContent:"space-between",width:"100%",children:[f.jsxs("div",{children:[f.jsx(h.Text,{variant:"smallBold",color:"grey11",children:t??"Repeatable zone"}),f.jsxs(h.Text,{variant:"small",color:"grey11",children:[n+1," • Item"]})]}),f.jsx(h.Icon,{name:"dragIndicator",size:"small",color:"grey8"})]})}function kPe(e){const{isDropTarget:t,itemIndex:n,position:r}=e,i=t?f.jsx(h.Line,{color:"purple",thickness:2,sx:{position:"absolute",left:0,right:0,bottom:n===0&&r==="before"?0:void 0}},"line"):void 0;return f.jsx(h.AnimatedElement,{enterDuration:150,children:i})}function MPe(e){const{compositeSlice:t,content:n,onContentChange:r,sliceKey:i,id:o,readOnly:a,header:s}=e,u=Y0();function c(){i&&u.update({id:i,requestedFrom:"sliceFieldSet"})}return f.jsxs(h.FieldSet,{id:i&&H0("sliceFieldSet",i),selected:i?u.isSelected(i):!1,onFocus:c,legend:LPe(t),header:s,children:[f.jsx(TPe,{id:o,readOnly:a,nonRepeatableZone:t["non-repeat"]??{},content:n.nonRepeat,onContentChange:l=>{r({...n,nonRepeat:l})}}),f.jsx(BO,{id:o,readOnly:a,repeatableZone:t.repeat??{},content:n.repeat,onContentChange:l=>{r({...n,repeat:l})}})]})}function LPe(e){var t;return((t=e.config)==null?void 0:t.label)??e.fieldset??e.type}const JQ={__TYPE__:"ImageContent",edit:{background:"",crop:{x:0,y:0},zoom:0},height:0,width:0,origin:{height:0,width:0,id:"",url:""},url:""};function jPe(e){const{field:t}=e;if(t.type==="Image")return JQ}function UPe(e){const{content:t,legacySlice:n,sliceKey:r,id:i,readOnly:o,onContentChange:a,header:s}=e,u=Y0();function c(){r&&u.update({id:r,requestedFrom:"sliceFieldSet"})}const l=n.type==="Group"?XC(n):nr(n);return f.jsx(h.FieldSet,{id:r&&H0("sliceFieldSet",r),selected:r?u.isSelected(r):!1,onFocus:c,legend:l,header:s,children:n.type==="Group"?f.jsx(UO,{id:i,readOnly:o,onContentChange:a,group:n,content:ye.isGroupContent(t)?t:void 0}):f.jsx(fb,{id:i,readOnly:o,nestableWidget:n,content:ye.isNestableContent(t)?t:void 0,onContentChange:d=>{const p=jPe({field:n});!d&&p&&a(p),d&&a(d)}})})}function BPe(e){const{content:t,id:n,slicePrimaryZone:r,onContentChange:i,readOnly:o}=e,a=E.useMemo(()=>Object.entries(r),[r]);return f.jsx(f.Fragment,{children:a.map(([s,u])=>{const c=t[s];return f.jsx(GQ,{id:`${n}.${s}`,readOnly:o,widget:u,content:ye.isSlicePrimaryContent(c)?c:void 0,onContentChange:l=>{i(PPe(t,s,l))}},s)})})}function PPe(e,t,n){return n?{...e,[t]:n}:Ql.removeKey(e,t)}function ZQ(e){const{config:t,content:n,sliceKey:r,readOnly:i=!1,sharedSlice:o,onContentChange:a,...s}=e,u=DPe(o,n.variation),c=E.useId(),d={id:s.id??c,readOnly:i},p=Y0();function A(){r&&p.update({id:r,requestedFrom:"sliceFieldSet"})}return u===void 0?null:f.jsx(N0.Provider,{value:t,children:f.jsx(j$e,{children:f.jsxs(h.FieldSet,{id:r&&H0("sliceFieldSet",r),selected:r?p.isSelected(r):!1,onFocus:A,legend:WPe(o,u),children:[f.jsx(h.LazyRender,{heightEstimate:400,gap:16,keepLoaded:!0,loadWhenSearching:!0,children:f.jsx(BPe,{...d,slicePrimaryZone:u.primary??{},content:n.primary,onContentChange:m=>{a({...n,primary:m})}})}),f.jsx(BO,{...d,repeatableZone:u.items??{},content:n.items,onContentChange:m=>{a({...n,items:m})}})]})})})}function DPe(e,t){return E.useMemo(()=>e.variations.find(n=>n.id===t),[e,t])}function WPe(e,t){return[e.name,t.name].join(" • ")}function qM(e){var u,c;const{sliceZone:t,onChange:n,slices:r,sliceContent:i}=e,o=(c=(u=t.config)==null?void 0:u.labels)==null?void 0:c[i.name];if(!o)return null;const a=o.find(l=>l.name===i.maybeLabel);function s(l){const d=r.value.map(p=>p.key===i.key?{...p,maybeLabel:l}:p);n({...r,value:d})}return f.jsxs(f.Fragment,{children:[f.jsx(h.Text,{component:"span",variant:"smallBold",children:"•"}),f.jsxs(h.DropdownMenu,{children:[f.jsx(h.DropdownMenuTrigger,{children:f.jsx(h.Button,{color:"grey",size:"small",endIcon:"arrowDropDown",invisible:!0,children:(a==null?void 0:a.display)??"Slice variation"})}),f.jsxs(h.DropdownMenuContent,{align:"start",maxHeight:256,children:[f.jsx(h.DropdownMenuItem,{onSelect:()=>s(void 0),endIcon:i.maybeLabel===void 0?f.jsx(h.Icon,{name:"check"}):void 0,children:"..."}),o==null?void 0:o.map(l=>f.jsx(h.DropdownMenuItem,{onSelect:()=>s(l.name),endIcon:l.name===i.maybeLabel?f.jsx(h.Icon,{name:"check"}):void 0,children:l.display??"[Missing display value]"},l.name))]})]})]})}function KPe(e){const{content:t,id:n,onContentChange:r,readOnly:i,sliceZone:o}=e,a=Te();return f.jsx(f.Fragment,{children:t==null?void 0:t.value.map((s,u)=>{var p,A;const c=(A=(p=o.config)==null?void 0:p.choices)==null?void 0:A[s.name];if(c===void 0)return null;const l=s.widget,d={id:`${n}[${s.key}]`,key:s.key,sliceKey:s.key,onContentChange:m=>{const g={...s,widget:m},_=NPe(t,[u,g]);r(_)},readOnly:i};return c.type==="SharedSlice"?ye.isSharedSliceContent(l)?f.jsx(ZQ,{...d,config:a,sharedSlice:c,content:l}):null:c.type==="Slice"?ye.isCompositeSliceContent(l)?f.jsx(MPe,{...d,compositeSlice:c,content:l,header:f.jsx(qM,{sliceContent:s,sliceZone:o,slices:t,onChange:r})}):null:ye.isSimpleSliceContent(l)?f.jsx(UPe,{...d,legacySlice:c,content:l,header:f.jsx(qM,{sliceContent:s,sliceZone:o,slices:t,onChange:r})}):null})})}function NPe(e,[t,n]){return{__TYPE__:"SliceContentType",value:e.value.map((r,i)=>i===t?n:r)}}function qPe(e){const{id:t,field:n,content:r,onContentChange:i}=e,o=Pe.useDebounceState({state:(r==null?void 0:r.value)??"",synchronize:!0}),{onEditUID:a}=E.useContext(M7);function s(c){a();const l=Ep.slugify(c);i(zPe(l)),o.set(l)}function u(c){s(c.clipboardData.getData("Text").trim()),c.preventDefault()}return f.jsxs(h.Field,{children:[f.jsx(h.FieldIcon,{name:"tag"}),f.jsx(h.FieldLabel,{htmlFor:t,children:nr(n)}),f.jsx(h.FieldControl,{children:f.jsx(Vs,{id:t,variant:"success",placeholder:Dc(n,"Enter a unique identifier"),value:o.value,onPaste:u,onValueChange:s,endAdornment:f.jsx(h.AnimatedElement,{enterDuration:150,children:f.jsx(VPe,{uid:o.debouncedValue})})})})]})}function VPe(e){const{uid:t}=e,n=Te();return t?n.uidField?f.jsx(h.ErrorBoundary,{children:f.jsx(E.Suspense,{children:f.jsx(QPe,{uid:t})})}):null:f.jsx(h.Badge,{color:"tomato",title:"Required",size:"medium"})}function QPe(e){const t=HPe(e),n=Te();if(!t.documentId)return null;const r=UR({status:t.status,releaseId:t.releaseId,documentId:t.documentId,versionId:t.versionId,baseUrl:n.baseUrl});return f.jsx("a",{href:r.href,target:"_blank",rel:"noreferrer",children:f.jsx(h.Badge,{color:"tomato",size:"medium",title:f.jsxs(h.Text,{color:"tomato11",variant:"small",children:["Value already used in"," ",f.jsx(h.Text,{color:"tomato11",variant:"small",underline:!0,children:"another document"})]})})})}function zPe(e){return e===""?void 0:{__TYPE__:"UIDContent",value:e}}function HPe(e){var A,m,g,_;const{uid:t}=e,n=Te();n.uidField||Ht("uidField");const{coreApiBaseUrl:r,authStrategy:i,customTypeId:o,localeId:a,documentId:s}=n,u=WR({uid:[t]}),l=Ke.useRequest(DR,[r,i,u]).results,p=j7({customTypeId:o,languageId:a,documentsWithUid:l,documentId:s,uid:t})[0];return p?{documentId:p.id,versionId:(A=p.versions[0])==null?void 0:A.version_id,status:(m=p.versions[0])==null?void 0:m.status,releaseId:((g=p.versions[0])==null?void 0:g.status)==="release"?(_=p.versions[0])==null?void 0:_.release_id:void 0}:{}}function YPe(e){const{id:t,readOnly:n,staticZone:r,content:i,onContentChange:o}=e,a=E.useMemo(()=>Object.entries(r),[r]);return a.length===0?null:f.jsx(h.FieldSet,{legend:"Page data",children:a.map(([s,u])=>{const c={id:`${t}.${s}`,onContentChange:d=>{const{[s]:p,...A}=i;o({...A,...d!==void 0&&{[s]:d}})},readOnly:n},l=i[s];return u.type==="UID"?E.createElement(qPe,{...c,content:ye.isUIDContent(l)?l:void 0,key:s,field:u}):u.type==="Group"?E.createElement(UO,{...c,content:ye.isGroupContent(l)?l:void 0,group:u,key:s}):E.createElement(fb,{...c,content:ye.isNestableContent(l)?l:void 0,key:s,nestableWidget:u})})})}function GPe(e){const{id:t,readOnly:n,section:r,content:i,onContentChange:o}=e,[a,s]=ZPe(r),[u,c]=XPe(i);return f.jsxs("div",{style:{display:"flex",flexDirection:"column",position:"relative",zIndex:0},children:[f.jsx(YPe,{id:t,readOnly:n,staticZone:a,content:u,onContentChange:l=>o({...c,...l})}),s.map(([l,d])=>{const p=c[l];return f.jsx(KPe,{id:`${t}.${l}`,readOnly:n,sliceZone:d,content:p,onContentChange:A=>o({...u,...c,[l]:A})},l)})]})}function JPe(e){return e.type==="Choice"||e.type==="Slices"}function ZPe(e){return Object.entries(e).reduce(([t,n],[r,i])=>(JPe(i)?n.push([r,i]):Object.assign(t,{[r]:i}),[t,n]),[{},[]])}function XPe(e){return Object.entries(e).reduce(([t,n],[r,i])=>{const o={[r]:i};return Object.assign(ye.isSlicesContent(i)?n:t,o),[t,n]},[{},{}])}function eDe(e){const{config:t,readOnly:n=!1,customType:r,sectionName:i,content:o,onContentChange:a}=e,s=E.useId();if(Ql.isEmpty(r.json))return null;const u=tDe(r,i),[c,l]=nDe(u,o);return f.jsx(N0.Provider,{value:t,children:f.jsx(L$e,{customTypeFormat:r.format,children:f.jsx(GPe,{id:s,readOnly:n,section:u,content:c,onContentChange:d=>a({...l,...d})})})})}function tDe(e,t){const n=e.json[t];if(n===void 0)throw new Error(`Cannot find a section with name '${t}'.`);return n}function nDe(e,t){return Object.entries(t).reduce(([n,r],[i,o])=>{const a=e[i]!==void 0,s={[i]:o};return[{...n,...a?s:{}},{...r,...a?{}:s}]},[{},{}])}exports.DeferredCodeBlock=U1;exports.DocumentEditor=eDe;exports.EditorConfigContext=N0;exports.EditorErrorBoundary=gxe;exports.MediaLibrary=k7;exports.NewMediaLibraryFeaturesBanner=kq;exports.OnboardingGuide=R$e;exports.OnboardingStepId=jwe;exports.SelectionManagerProvider=Lq;exports.SharedSliceEditor=ZQ;exports.SliceSelectionContext=U7;exports.UIDContext=M7;exports.createSearchParams=V0;exports.defaultGroupContentWithOneItem=$q;exports.defaultImageContentWidget=JQ;exports.documentKeys=Go;exports.documentMetaOkType=PR;exports.documentSchema=xwe;exports.documentStatus=Rq;exports.frameworkCreateProjectCodeSnippet=zM;exports.frameworkLabels=QM;exports.getConflictingUidDocuments=j7;exports.getDocumentById=_h;exports.getDocumentList=Vq;exports.getDocuments=DR;exports.getEnrichedSearchDocuments=Hq;exports.getOnboarding=Uwe;exports.getProfile=r7;exports.getRepository=Q0;exports.getRepositoryCustomTypes=Nq;exports.getRepositoryTags=Jq;exports.getSliceSelectionDOMId=H0;exports.hasUIDField=L7;exports.invalidateDocumentListData=$we;exports.isMissingUID=F$e;exports.isValidSimulatorURL=Gq;exports.languageOkType=BR;exports.makeGetDocumentsQueryString=WR;exports.makeSearchFullTextDocumentsQueryString=zq;exports.onboardingStateSchema=Zq;exports.onboardingToggleResultSchema=e7;exports.onboardingToggleStepResultSchema=Xq;exports.prepareDocumentForSave=dxe;exports.profileResponse=n7;exports.repositoryFramework=KR;exports.roleMap=Kwe;exports.searchDocumentStatus=Oq;exports.searchFullTextDocuments=Qq;exports.sliceItemContentSchema=wwe;exports.suppressErrors=Cxe;exports.throwConfigError=Ht;exports.toggleOnboarding=Pwe;exports.toggleOnboardingStep=Bwe;exports.updateDocumentListData=Ewe;exports.useProfile=NR;exports.useSelectionManager=qs;exports.useSliceSelection=Y0;