@bigbinary/neeto-editor 0.9.3 → 0.9.5

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.
package/build/index.js CHANGED
@@ -29,7 +29,7 @@ od.exports=sd;var $d=od.exports,Hd={exports:{}},Wd={},Vd="function"==typeof Symb
29
29
  * http://jaywcjlove.github.io/hotkeys
30
30
  * Licensed under the MIT license
31
31
  */
32
- var xh="undefined"!=typeof navigator&&navigator.userAgent.toLowerCase().indexOf("firefox")>0;function Eh(e,t,n,r){e.addEventListener?e.addEventListener(t,n,r):e.attachEvent&&e.attachEvent("on".concat(t),(function(){n(window.event)}))}function Mh(e,t){for(var n=t.slice(0,t.length-1),r=0;r<n.length;r++)n[r]=e[n[r].toLowerCase()];return n}function kh(e){"string"!=typeof e&&(e="");for(var t=(e=e.replace(/\s/g,"")).split(","),n=t.lastIndexOf("");n>=0;)t[n-1]+=",",t.splice(n,1),n=t.lastIndexOf("");return t}for(var _h={backspace:8,tab:9,clear:12,enter:13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"⇪":20,",":188,".":190,"/":191,"`":192,"-":xh?173:189,"=":xh?61:187,";":xh?59:186,"'":222,"[":219,"]":221,"\\":220},Dh={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,command:91},Ch={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},Oh={16:!1,18:!1,17:!1,91:!1},Nh={},Th=1;Th<20;Th++)_h["f".concat(Th)]=111+Th;var Sh=[],Ah=!1,Ih="all",Lh=[],jh=function(e){return _h[e.toLowerCase()]||Dh[e.toLowerCase()]||e.toUpperCase().charCodeAt(0)};function zh(e){Ih=e||"all"}function Fh(){return Ih||"all"}var Ph=function(e){var t=e.key,n=e.scope,r=e.method,i=e.splitKey,o=void 0===i?"+":i;kh(t).forEach((function(e){var t=e.split(o),i=t.length,s=t[i-1],a="*"===s?"*":jh(s);if(Nh[a]){n||(n=Fh());var l=i>1?Mh(Dh,t):[];Nh[a]=Nh[a].filter((function(e){return!((!r||e.method===r)&&e.scope===n&&function(e,t){for(var n=e.length>=t.length?e:t,r=e.length>=t.length?t:e,i=!0,o=0;o<n.length;o++)-1===r.indexOf(n[o])&&(i=!1);return i}(e.mods,l))}))}}))};function Rh(e,t,n,r){var i;if(t.element===r&&(t.scope===n||"all"===t.scope)){for(var o in i=t.mods.length>0,Oh)Object.prototype.hasOwnProperty.call(Oh,o)&&(!Oh[o]&&t.mods.indexOf(+o)>-1||Oh[o]&&-1===t.mods.indexOf(+o))&&(i=!1);(0!==t.mods.length||Oh[16]||Oh[18]||Oh[17]||Oh[91])&&!i&&"*"!==t.shortcut||!1===t.method(e,t)&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0))}}function Bh(e,t){var n=Nh["*"],r=e.keyCode||e.which||e.charCode;if(Uh.filter.call(this,e)){if(93!==r&&224!==r||(r=91),-1===Sh.indexOf(r)&&229!==r&&Sh.push(r),["ctrlKey","altKey","shiftKey","metaKey"].forEach((function(t){var n=Ch[t];e[t]&&-1===Sh.indexOf(n)?Sh.push(n):!e[t]&&Sh.indexOf(n)>-1?Sh.splice(Sh.indexOf(n),1):"metaKey"===t&&e[t]&&3===Sh.length&&(e.ctrlKey||e.shiftKey||e.altKey||(Sh=Sh.slice(Sh.indexOf(n))))})),r in Oh){for(var i in Oh[r]=!0,Dh)Dh[i]===r&&(Uh[i]=!0);if(!n)return}for(var o in Oh)Object.prototype.hasOwnProperty.call(Oh,o)&&(Oh[o]=e[Ch[o]]);e.getModifierState&&(!e.altKey||e.ctrlKey)&&e.getModifierState("AltGraph")&&(-1===Sh.indexOf(17)&&Sh.push(17),-1===Sh.indexOf(18)&&Sh.push(18),Oh[17]=!0,Oh[18]=!0);var s=Fh();if(n)for(var a=0;a<n.length;a++)n[a].scope===s&&("keydown"===e.type&&n[a].keydown||"keyup"===e.type&&n[a].keyup)&&Rh(e,n[a],s,t);if(r in Nh)for(var l=0;l<Nh[r].length;l++)if(("keydown"===e.type&&Nh[r][l].keydown||"keyup"===e.type&&Nh[r][l].keyup)&&Nh[r][l].key){for(var c=Nh[r][l],u=c.splitKey,d=c.key.split(u),p=[],h=0;h<d.length;h++)p.push(jh(d[h]));p.sort().join("")===Sh.sort().join("")&&Rh(e,c,s,t)}}}function Uh(e,t,n){Sh=[];var r=kh(e),i=[],o="all",s=document,a=0,l=!1,c=!0,u="+",d=!1;for(void 0===n&&"function"==typeof t&&(n=t),"[object Object]"===Object.prototype.toString.call(t)&&(t.scope&&(o=t.scope),t.element&&(s=t.element),t.keyup&&(l=t.keyup),void 0!==t.keydown&&(c=t.keydown),void 0!==t.capture&&(d=t.capture),"string"==typeof t.splitKey&&(u=t.splitKey)),"string"==typeof t&&(o=t);a<r.length;a++)i=[],(e=r[a].split(u)).length>1&&(i=Mh(Dh,e)),(e="*"===(e=e[e.length-1])?"*":jh(e))in Nh||(Nh[e]=[]),Nh[e].push({keyup:l,keydown:c,scope:o,mods:i,shortcut:r[a],method:n,key:r[a],splitKey:u,element:s});void 0!==s&&!function(e){return Lh.indexOf(e)>-1}(s)&&window&&(Lh.push(s),Eh(s,"keydown",(function(e){Bh(e,s)}),d),Ah||(Ah=!0,Eh(window,"focus",(function(){Sh=[]}),d)),Eh(s,"keyup",(function(e){Bh(e,s),function(e){var t=e.keyCode||e.which||e.charCode,n=Sh.indexOf(t);if(n>=0&&Sh.splice(n,1),e.key&&"meta"===e.key.toLowerCase()&&Sh.splice(0,Sh.length),93!==t&&224!==t||(t=91),t in Oh)for(var r in Oh[t]=!1,Dh)Dh[r]===t&&(Uh[r]=!1)}(e)}),d))}var $h={setScope:zh,getScope:Fh,deleteScope:function(e,t){var n,r;for(var i in e||(e=Fh()),Nh)if(Object.prototype.hasOwnProperty.call(Nh,i))for(n=Nh[i],r=0;r<n.length;)n[r].scope===e?n.splice(r,1):r++;Fh()===e&&zh(t||"all")},getPressedKeyCodes:function(){return Sh.slice(0)},isPressed:function(e){return"string"==typeof e&&(e=jh(e)),-1!==Sh.indexOf(e)},filter:function(e){var t=e.target||e.srcElement,n=t.tagName,r=!0;return!t.isContentEditable&&("INPUT"!==n&&"TEXTAREA"!==n&&"SELECT"!==n||t.readOnly)||(r=!1),r},trigger:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"all";Object.keys(Nh).forEach((function(n){var r=Nh[n].find((function(n){return n.scope===t&&n.shortcut===e}));r&&r.method&&r.method()}))},unbind:function(e){if(e){if(Array.isArray(e))e.forEach((function(e){e.key&&Ph(e)}));else if("object"==typeof e)e.key&&Ph(e);else if("string"==typeof e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=n[0],o=n[1];"function"==typeof i&&(o=i,i=""),Ph({key:e,scope:i,method:o,splitKey:"+"})}}else Object.keys(Nh).forEach((function(e){return delete Nh[e]}))},keyMap:_h,modifier:Dh,modifierMap:Ch};for(var Hh in $h)Object.prototype.hasOwnProperty.call($h,Hh)&&(Uh[Hh]=$h[Hh]);if("undefined"!=typeof window){var Wh=window.hotkeys;Uh.noConflict=function(e){return e&&window.hotkeys===Uh&&(window.hotkeys=Wh),Uh},window.hotkeys=Uh}Uh.filter=function(){return!0};var Vh=function(e,t){var n=e.target,r=n&&n.tagName;return Boolean(r&&t&&t.includes(r))};function qh(e,t,n,r){n instanceof Array&&(r=n,n=void 0);var i=n||{},s=i.enableOnTags,a=i.filter,l=i.keyup,d=i.keydown,p=i.filterPreventDefault,h=void 0===p||p,f=i.enabled,m=void 0===f||f,g=i.enableOnContentEditable,b=void 0!==g&&g,y=c(null),v=u((function(e,n){var r;return a&&!a(e)?!h:!!(Vh(e,["INPUT","TEXTAREA","SELECT"])&&!Vh(e,s)||null!=(r=e.target)&&r.isContentEditable&&!b)||(null===y.current||document.activeElement===y.current)&&(t(e,n),!0)}),r?[y,s,a].concat(r):[y,s,a]);return o((function(){if(m)return l&&!0!==d&&(n.keydown=!1),Uh(e,n||{},v),function(){return Uh.unbind(e,v)};Uh.unbind(e,v)}),[v,e,m]),y}Uh.isPressed;const Yh=()=>{},Kh="xs",Qh="sm",Gh="md",Zh=e=>{let{size:n="sm",isOpen:r=!1,onClose:i=Yh,loading:o=!1,children:s,className:a="",closeOnEsc:l=!0,closeButton:u=!0,backdropClassName:d="",closeOnOutsideClick:p=!0,...h}=e;const f=c();return nd(f,p?i:Yh),qh("esc",l?i:Yh),t.createElement(td,{className:"ne-portal"},r&&t.createElement(zu,{key:"modal-backdrop",className:Sc("ne-modal__backdrop",d)},t.createElement("div",x({ref:f,key:"modal-wrapper",className:Sc("ne-modal__wrapper",{"ne-modal__wrapper--xs":n===Kh,"ne-modal__wrapper--sm":n===Qh,"ne-modal__wrapper--md":n===Gh,[a]:a})},h),u&&t.createElement(ed,{style:"text",icon:Ep,className:"ne-modal__close",onClick:i}),o?"":s)))},Jh=e=>{let{children:n,className:r="",required:i=!1,helpIconProps:o=null,...s}=e;const{onClick:a,icon:l,tooltipProps:c,className:u,...d}=o||{},p=l||zp;return t.createElement("label",x({className:Sc("ne-label flex items-center",r)},s),n,i&&t.createElement("span",{"aria-hidden":!0},"*"),o&&t.createElement(Qu,x({},c,{disabled:!c}),t.createElement("span",{className:Sc("ml-1",{[u]:u}),onClick:a},t.createElement(p,x({size:16},d)))))},Xh=s(((e,n)=>{const{id:r,size:i="small",type:o="text",label:s,error:a=null,suffix:l=null,prefix:c=null,disabled:u=!1,helpText:d="",className:p="",nakedInput:h=!1,contentSize:f=null,required:m=!1,...g}=e;return t.createElement("div",{className:Sc(["ne-input__wrapper",p])},s&&t.createElement(Jh,{required:m,"data-cy":"neeto-editor-".concat(Su(s),"-input-label"),htmlFor:r},s),t.createElement("div",{className:Sc("ne-input",{"ne-input--naked":!!h,"ne-input--error":!!a,"ne-input--disabled":!!u,"ne-input--small":"small"===i})},c&&t.createElement("div",{className:"ne-input__prefix"},c),t.createElement("input",x({ref:n,type:o,disabled:u,size:f,required:m,"aria-invalid":!!a,"data-cy":"".concat(Su(s),"-input-field")},g)),l&&t.createElement("div",{className:"ne-input__suffix"},l)),!!a&&t.createElement("p",{"data-cy":"".concat(Su(s),"-input-error"),className:"ne-input__error"},a),d&&t.createElement("p",{className:"ne-input__help-text"},d))}));Xh.displayName="Input";const ef=e=>{let{url:n,editor:r,onClose:o,alt:s}=e;const[a,l]=i(s||""),[c,u]=i(!1),d=()=>{r.chain().focus().setImage({src:n,alt:a}).run(),o()};return t.createElement("div",{className:"neeto-editor-image-editor",onKeyDown:e=>{"Enter"===e.key&&d()}},c?t.createElement("div",{className:"neeto-editor-image-editor__error"},t.createElement("h2",null,"Something Went Wrong!"),t.createElement("p",null,"The selected image cannot be displayed. Please try again using another image.")):t.createElement(t.Fragment,null,t.createElement("figure",null,t.createElement("img",{src:n,loading:"lazy",onError:e=>{let{currentTarget:t}=e;u(!0),t.onerror=null}})),t.createElement(Xh,{autoFocus:!0,value:a,onChange:e=>l(e.target.value),placeholder:"Brand Image",label:"Caption"})),t.createElement("div",{className:"neeto-editor-image-editor__footer"},t.createElement(ed,{size:"large",label:"Proceed",disabled:c,onClick:d}),t.createElement(ed,{size:"large",label:"Cancel",style:"text",onClick:o})))},tf=e=>{let{editor:n,isOpen:r,onClose:i}=e;const o=n&&n.view.state.selection.node;return t.createElement(Zh,{isOpen:r,onClose:i},t.createElement("div",{className:"neeto-editor-image-uploader"},t.createElement("div",{className:"neeto-editor-image-uploader__content"},t.createElement(ef,{editor:n,onClose:i,url:null==o?void 0:o.attrs.src,alt:null==o?void 0:o.attrs.alt}))))},nf=e=>{let{editor:t,isImageEditorModalOpen:n,setIsImageEditorModalOpen:r}=e;return[{Icon:Pp,command:()=>t.chain().focus().setImageAttributes({float:"left",align:"none"}).run(),active:t.isActive("image",{float:"left",align:"none"}),optionName:"Float Left"},{Icon:wp,command:()=>t.chain().focus().setImageAttributes({float:"none",align:"center"}).run(),active:t.isActive("image",{float:"none",align:"center"}),optionName:"Align Center"},{Icon:eh,command:()=>t.chain().focus().setImageAttributes({float:"right",align:"none"}).run(),active:t.isActive("image",{float:"right",align:"center"}),optionName:"Float Right"},{Icon:Op,command:()=>r(!0),active:n,optionName:"Caption"},{Icon:Ep,command:()=>t.commands.deleteSelection(),active:!1,optionName:"Remove"}]},rf=e=>{let{Icon:n,command:r,active:i,optionName:o}=e;return t.createElement(Qu,{content:Tu(o),position:"top",delay:[500]},t.createElement("div",{className:Sc("neeto-editor-bubble-menu__item",{active:i}),onClick:r,"data-cy":"neeto-editor-bubble-menu-".concat(o,"-option")},t.createElement(n,{size:20})))},of=e=>{let{editor:n,isImageEditorModalOpen:r,setIsImageEditorModalOpen:i}=e;return nf({editor:n,isImageEditorModalOpen:r,setIsImageEditorModalOpen:i}).map((e=>t.createElement(rf,x({key:e.optionName},e))))},sf=/[(http(s)?)://(www.)?a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_+.~#?&//=]*)/,af=/^((?:https?:)?\/\/)?((?:www|m)\.)?((?:youtube\.com|youtu.be))(\/(?:[\w-]+\?v=|embed\/|v\/)?)([\w-]+)(\S+)?$/,lf=/((?:http|https):\/\/)?(www\.|player\.)?vimeo\.com\/(?:channels\/(?:\w+\/)?|groups\/([^/]*)\/videos\/|(?:manage\/)?videos?\/|)(\d+)(?:(?:\/|\?h=)(\w+))?(?:|\/\?)/,cf=e=>{let{editor:n,handleClose:r,handleAnimateInvalidLink:s}=e;const[a,l]=i("");o((()=>{l(n.getAttributes("link").href||"")}),[]);const c=()=>{sf.test(a)?(n.chain().focus().setLink({href:a}).run(),r()):Iu(a)?(n.chain().focus().unsetLink().run(),r()):(l(""),s())};return t.createElement("div",{onKeyDown:e=>{"Escape"===e.key?r():"Enter"===e.key&&c()},className:"neeto-editor-bubble-menu__link"},t.createElement("input",{autoFocus:!0,name:"url",value:a,placeholder:"Paste or type a link...",onChange:e=>{let{target:{value:t}}=e;return l(t)},className:"neeto-editor-bubble-menu-link__input","data-cy":"neeto-editor-link-input"}),t.createElement(ed,{style:"icon",icon:Ep,onClick:()=>{a?(l(""),n.chain().focus().unsetLink().run()):r()},"data-cy":"neeto-editor-link-cancel-button"}))},uf=e=>{let{editor:n,options:r,setIsInvalidLink:o,isLinkOptionActive:s,setIsLinkOptionActive:a}=e;const[l,c]=i(!1),u=(e=>{let{editor:t,setIsLinkOptionActive:n}=e;return[{Icon:ih,command:()=>t.chain().focus().toggleBold().run(),active:t.isActive("bold"),optionName:"bold"},{Icon:ph,command:()=>t.chain().focus().toggleItalic().run(),active:t.isActive("italic"),optionName:"italic"},{Icon:yh,command:()=>t.chain().focus().toggleUnderline().run(),active:t.isActive("underline"),optionName:"underline"},{Icon:sh,command:()=>t.chain().focus().toggleStrike().run(),active:t.isActive("strike"),optionName:"strike"},{Icon:Bp,command:()=>n(!0),active:t.isActive("link"),optionName:"link"},{Icon:kp,command:()=>t.chain().focus().toggleCode().run(),active:t.isActive("code"),optionName:"code-block"},{Icon:Ap,command:()=>t.chain().focus().toggleHighlight().run(),active:t.isActive("highlight"),optionName:"highlight"}]})({editor:n,setIsLinkOptionActive:a}).filter((e=>{let{optionName:t}=e;return r.includes(t)})),d=(e=>{let{editor:t}=e;return[{optionName:"Heading 1",active:t.isActive("heading",{level:1}),command:()=>t.chain().focus().setNode("heading",{level:1}).run()},{optionName:"Heading 2",active:t.isActive("heading",{level:2}),command:()=>t.chain().focus().setNode("heading",{level:2}).run()},{optionName:"Heading 3",active:t.isActive("heading",{level:3}),command:()=>t.chain().focus().setNode("heading",{level:3}).run()},{optionName:"Ordered List",active:t.isActive("orderedList"),command:()=>t.chain().focus().toggleOrderedList().run()},{optionName:"Bulleted List",active:t.isActive("bulletList"),command:()=>t.chain().focus().toggleBulletList().run()},{optionName:"Paragraph",active:t.isActive("paragraph"),command:()=>t.chain().focus().setNode("paragraph").run()}]})({editor:n}),p=(e=>{var t;return(null===(t=e.find((e=>e.active)))||void 0===t?void 0:t.optionName)||"Paragraph"})(d),h=()=>{o(!0),setTimeout((()=>{o(!1)}),1e3)},f=()=>c(!1);return s?t.createElement(cf,{editor:n,handleClose:()=>a(!1),handleAnimateInvalidLink:h}):t.createElement(t.Fragment,null,t.createElement(Ku,{interactive:!0,placement:"bottom",visible:l,onClickOutside:f,content:d.map((e=>{let{optionName:n,command:r}=e;return t.createElement("button",{key:n,onClick:()=>{r(),f()},className:"neeto-editor-bubble-menu__item neeto-editor-bubble-menu__dropdown"},n)}))},t.createElement("button",{onClick:()=>c((e=>!e)),className:"neeto-editor-bubble-menu__item neeto-editor-bubble-menu__dropdown-target"},p,t.createElement(Dp,{size:14}))),u.map((e=>t.createElement(rf,x({},e,{key:e.optionName})))))},df=e=>{let{editor:n,options:r}=e;const[o,s]=i(!1),[a,l]=i(!1),[c,u]=i(!1),d=n&&n.view.state.selection.node,p=d&&"image"===d.type.name,h=[C.BOLD,C.ITALIC,C.UNDERLINE,C.STRIKETHROUGH,C.LINK],f=Iu(r.filter((e=>h.includes(e))));return!n||!p&&f?null:t.createElement("div",null,t.createElement(hc,{editor:n,tippyOptions:{arrow:ml,zIndex:99999,onHide:()=>l(!1)},className:Sc("neeto-editor-bubble-menu",{"neeto-editor-bubble-menu-animate-shake":o})},p?t.createElement(of,{editor:n,isImageEditorModalOpen:c,setIsImageEditorModalOpen:u}):t.createElement(uf,{editor:n,options:r,setIsInvalidLink:s,isLinkOptionActive:a,setIsLinkOptionActive:l})),t.createElement(tf,{editor:n,isOpen:c,onClose:()=>u(!1)}))},pf=e=>{let{count:n,limit:r,strategy:i}=e;const o="limit"===i&&r;return t.createElement("p",{className:"neeto-editor-character-count","data-cy":"neeto-editor-character-count"},o?"".concat(r-n," characters remaining"):"".concat(n," characters"))};var hf={exports:{}},ff="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";function mf(){}function gf(){}gf.resetWarningCache=mf;hf.exports=function(){function e(e,t,n,r,i,o){if(o!==ff){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. "+"Use PropTypes.checkPropTypes() to call them. "+"Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:gf,resetWarningCache:mf};return n.PropTypes=n,n}();const bf=()=>document.documentElement.style.setProperty("--focus-background-color","rgba(234, 243, 252, 0.5)"),yf=()=>document.documentElement.style.setProperty("--focus-background-color","transparent"),vf={onMouseEnter:bf,onMouseLeave:yf},wf=20,xf="#2F3941",Ef="#87929D",Mf=e=>{let{icon:n,iconActive:r=!0,tooltipProps:i,highlight:o=!1,...s}=e;return t.createElement(Qu,i,t.createElement("button",x({className:"neeto-editor-fixed-menu__item",type:"button"},function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]?vf:{}}(o),s),t.createElement(n,{color:r?xf:Ef,size:wf})))};Mf.propTypes={icon:hf.exports.oneOfType([hf.exports.element,hf.exports.func]),iconActive:hf.exports.bool,onClick:hf.exports.func,tooltipProps:hf.exports.object},e.createContext(),e.createContext();var kf=function(e){return e.reduce((function(e,t){var n=t[0],r=t[1];return e[n]=r,e}),{})},_f="undefined"!=typeof window&&window.document&&window.document.createElement?e.useLayoutEffect:e.useEffect,Df="undefined"!=typeof Element,Cf="function"==typeof Map,Of="function"==typeof Set,Nf="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;function Tf(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;var n,r,i,o;if(Array.isArray(e)){if((n=e.length)!=t.length)return!1;for(r=n;0!=r--;)if(!Tf(e[r],t[r]))return!1;return!0}if(Cf&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;for(o=e.entries();!(r=o.next()).done;)if(!Tf(r.value[1],t.get(r.value[0])))return!1;return!0}if(Of&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(Nf&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if((n=e.length)!=t.length)return!1;for(r=n;0!=r--;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if((n=(i=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;if(Df&&e instanceof Element)return!1;for(r=n;0!=r--;)if(("_owner"!==i[r]&&"__v"!==i[r]&&"__o"!==i[r]||!e.$$typeof)&&!Tf(e[i[r]],t[i[r]]))return!1;return!0}return e!=e&&t!=t}var Sf=function(e,t){try{return Tf(e,t)}catch(e){if((e.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw e}},Af=[];const If=()=>{},Lf=(n,r)=>{let{label:s,isOpen:a,onVisible:l=If,onClose:u=If,ulProps:h,position:f,children:m,className:g,customTarget:b,closeOnEsc:y=!0,closeOnSelect:v=!0,closeOnOutsideClick:w=!0,dropdownModifiers:E=[],...M}=n;const k=c(),_=b(),D=!(null==a),[C,O]=i(!1),[N,T]=i(null),[S,A]=i(null),{styles:I,attributes:L}=function(t,n,r){void 0===r&&(r={});var i=e.useRef(null),o={onFirstUpdate:r.onFirstUpdate,placement:r.placement||"bottom",strategy:r.strategy||"absolute",modifiers:r.modifiers||Af},s=e.useState({styles:{popper:{position:o.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),a=s[0],l=s[1],c=e.useMemo((function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(e){var t=e.state,n=Object.keys(t.elements);p.flushSync((function(){l({styles:kf(n.map((function(e){return[e,t.styles[e]||{}]}))),attributes:kf(n.map((function(e){return[e,t.attributes[e]]})))})}))},requires:["computeStyles"]}}),[]),u=e.useMemo((function(){var e={onFirstUpdate:o.onFirstUpdate,placement:o.placement,strategy:o.strategy,modifiers:[].concat(o.modifiers,[c,{name:"applyStyles",enabled:!1}])};return Sf(i.current,e)?i.current||e:(i.current=e,e)}),[o.onFirstUpdate,o.placement,o.strategy,o.modifiers,c]),d=e.useRef();return _f((function(){d.current&&d.current.setOptions(u)}),[u]),_f((function(){if(null!=t&&null!=n){var e=(r.createPopper||fl)(t,n,u);return d.current=e,function(){e.destroy(),d.current=null}}}),[t,n,r.createPopper]),{state:d.current?d.current.state:null,styles:a.styles,attributes:a.attributes,update:d.current?d.current.update:null,forceUpdate:d.current?d.current.forceUpdate:null}}(N,S,{placement:f||"bottom-end",modifiers:E});d(r,(()=>({close:()=>O(!1),visible:C})));const j=()=>{D||O(!1),u()};return qh("esc",y?j:If),nd(k,w?j:If),o((()=>{D&&O(a)}),[a]),o((()=>{C&&l()}),[C]),t.createElement("div",x({ref:k,className:Sc("ne-dropdown__wrapper",{[g]:g})},M),b?t.createElement("div",{ref:T,onClick:()=>{!D&&O(!C)}},_):t.createElement("div",null,s,t.createElement(Dp,null)),C&&t.createElement("ul",x({className:"ne-dropdown__popup",ref:A,onClick:()=>{v&&j()},"data-cy":"neeto-editor-".concat(Su(s),"-dropdown-container")},h,{style:{display:"block",...I.offset,...I.popper}},L.popper),m))};Lf.displayName="Dropdown";var jf=s(Lf);function zf(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ff,Pf={exports:{}},Rf={exports:{}},Bf=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}},Uf=Bf,$f=Object.prototype.toString,Hf=(Ff=Object.create(null),function(e){var t=$f.call(e);return Ff[t]||(Ff[t]=t.slice(8,-1).toLowerCase())});function Wf(e){return e=e.toLowerCase(),function(t){return Hf(t)===e}}function Vf(e){return Array.isArray(e)}function qf(e){return void 0===e}var Yf=Wf("ArrayBuffer");function Kf(e){return null!==e&&"object"==typeof e}function Qf(e){if("object"!==Hf(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var Gf=Wf("Date"),Zf=Wf("File"),Jf=Wf("Blob"),Xf=Wf("FileList");function em(e){return"[object Function]"===$f.call(e)}var tm=Wf("URLSearchParams");function nm(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),Vf(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}var rm,im=(rm="undefined"!=typeof Uint8Array&&Object.getPrototypeOf(Uint8Array),function(e){return rm&&e instanceof rm}),om={isArray:Vf,isArrayBuffer:Yf,isBuffer:function(e){return null!==e&&!qf(e)&&null!==e.constructor&&!qf(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){var t="[object FormData]";return e&&("function"==typeof FormData&&e instanceof FormData||$f.call(e)===t||em(e.toString)&&e.toString()===t)},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&Yf(e.buffer)},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:Kf,isPlainObject:Qf,isUndefined:qf,isDate:Gf,isFile:Zf,isBlob:Jf,isFunction:em,isStream:function(e){return Kf(e)&&em(e.pipe)},isURLSearchParams:tm,isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:nm,merge:function e(){var t={};function n(n,r){Qf(t[r])&&Qf(n)?t[r]=e(t[r],n):Qf(n)?t[r]=e({},n):Vf(n)?t[r]=n.slice():t[r]=n}for(var r=0,i=arguments.length;r<i;r++)nm(arguments[r],n);return t},extend:function(e,t,n){return nm(t,(function(t,r){e[r]=n&&"function"==typeof t?Uf(t,n):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,n,r){e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,n&&Object.assign(e.prototype,n)},toFlatObject:function(e,t,n){var r,i,o,s={};t=t||{};do{for(i=(r=Object.getOwnPropertyNames(e)).length;i-- >0;)s[o=r[i]]||(t[o]=e[o],s[o]=!0);e=Object.getPrototypeOf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:Hf,kindOfTest:Wf,endsWith:function(e,t,n){e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;var r=e.indexOf(t,n);return-1!==r&&r===n},toArray:function(e){if(!e)return null;var t=e.length;if(qf(t))return null;for(var n=new Array(t);t-- >0;)n[t]=e[t];return n},isTypedArray:im,isFileList:Xf},sm=om;function am(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var lm=function(e,t,n){if(!t)return e;var r;if(n)r=n(t);else if(sm.isURLSearchParams(t))r=t.toString();else{var i=[];sm.forEach(t,(function(e,t){null!=e&&(sm.isArray(e)?t+="[]":e=[e],sm.forEach(e,(function(e){sm.isDate(e)?e=e.toISOString():sm.isObject(e)&&(e=JSON.stringify(e)),i.push(am(t)+"="+am(e))})))})),r=i.join("&")}if(r){var o=e.indexOf("#");-1!==o&&(e=e.slice(0,o)),e+=(-1===e.indexOf("?")?"?":"&")+r}return e},cm=om;function um(){this.handlers=[]}um.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},um.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},um.prototype.forEach=function(e){cm.forEach(this.handlers,(function(t){null!==t&&e(t)}))};var dm,pm,hm=um,fm=om;function mm(){if(pm)return dm;pm=1;var e=om;function t(e,t,n,r,i){Error.call(this),this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}e.inherits(t,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var n=t.prototype,r={};return["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED"].forEach((function(e){r[e]={value:e}})),Object.defineProperties(t,r),Object.defineProperty(n,"isAxiosError",{value:!0}),t.from=function(r,i,o,s,a,l){var c=Object.create(n);return e.toFlatObject(r,c,(function(e){return e!==Error.prototype})),t.call(c,r.message,i,o,s,a),c.name=r.name,l&&Object.assign(c,l),c},dm=t}var gm,bm,ym,vm,wm,xm,Em={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};function Mm(){if(bm)return gm;bm=1;var e=om;return gm=function(t,n){n=n||new FormData;var r=[];function i(t){return null===t?"":e.isDate(t)?t.toISOString():e.isArrayBuffer(t)||e.isTypedArray(t)?"function"==typeof Blob?new Blob([t]):Buffer.from(t):t}return function t(o,s){if(e.isPlainObject(o)||e.isArray(o)){if(-1!==r.indexOf(o))throw Error("Circular reference detected in "+s);r.push(o),e.forEach(o,(function(r,o){if(!e.isUndefined(r)){var a,l=s?s+"."+o:o;if(r&&!s&&"object"==typeof r)if(e.endsWith(o,"{}"))r=JSON.stringify(r);else if(e.endsWith(o,"[]")&&(a=e.toArray(r)))return void a.forEach((function(t){!e.isUndefined(t)&&n.append(l,i(t))}));t(r,l)}})),r.pop()}else n.append(s,i(o))}(t),n},gm}function km(){if(vm)return ym;vm=1;var e=mm();return ym=function(t,n,r){var i=r.config.validateStatus;r.status&&i&&!i(r.status)?n(new e("Request failed with status code "+r.status,[e.ERR_BAD_REQUEST,e.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):t(r)}}function _m(){if(xm)return wm;xm=1;var e=om;return wm=e.isStandardBrowserEnv()?{write:function(t,n,r,i,o,s){var a=[];a.push(t+"="+encodeURIComponent(n)),e.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),e.isString(i)&&a.push("path="+i),e.isString(o)&&a.push("domain="+o),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}},wm}var Dm,Cm,Om,Nm,Tm,Sm,Am,Im,Lm,jm,zm,Fm,Pm=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)},Rm=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e},Bm=function(e,t){return e&&!Pm(t)?Rm(e,t):t};function Um(){if(Cm)return Dm;Cm=1;var e=om,t=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];return Dm=function(n){var r,i,o,s={};return n?(e.forEach(n.split("\n"),(function(n){if(o=n.indexOf(":"),r=e.trim(n.substr(0,o)).toLowerCase(),i=e.trim(n.substr(o+1)),r){if(s[r]&&t.indexOf(r)>=0)return;s[r]="set-cookie"===r?(s[r]?s[r]:[]).concat([i]):s[r]?s[r]+", "+i:i}})),s):s},Dm}function $m(){if(Nm)return Om;Nm=1;var e=om;return Om=e.isStandardBrowserEnv()?function(){var t,n=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function i(e){var t=e;return n&&(r.setAttribute("href",t),t=r.href),r.setAttribute("href",t),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return t=i(window.location.href),function(n){var r=e.isString(n)?i(n):n;return r.protocol===t.protocol&&r.host===t.host}}():function(){return!0}}function Hm(){if(Sm)return Tm;Sm=1;var e=mm();function t(t){e.call(this,null==t?"canceled":t,e.ERR_CANCELED),this.name="CanceledError"}return om.inherits(t,e,{__CANCEL__:!0}),Tm=t}function Wm(){return Im||(Im=1,Am=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}),Am}function Vm(){if(jm)return Lm;jm=1;var e=om,t=km(),n=_m(),r=lm,i=Bm,o=Um(),s=$m(),a=Em,l=mm(),c=Hm(),u=Wm();return Lm=function(d){return new Promise((function(p,h){var f,m=d.data,g=d.headers,b=d.responseType;function y(){d.cancelToken&&d.cancelToken.unsubscribe(f),d.signal&&d.signal.removeEventListener("abort",f)}e.isFormData(m)&&e.isStandardBrowserEnv()&&delete g["Content-Type"];var v=new XMLHttpRequest;if(d.auth){var w=d.auth.username||"",x=d.auth.password?unescape(encodeURIComponent(d.auth.password)):"";g.Authorization="Basic "+btoa(w+":"+x)}var E=i(d.baseURL,d.url);function M(){if(v){var e="getAllResponseHeaders"in v?o(v.getAllResponseHeaders()):null,n={data:b&&"text"!==b&&"json"!==b?v.response:v.responseText,status:v.status,statusText:v.statusText,headers:e,config:d,request:v};t((function(e){p(e),y()}),(function(e){h(e),y()}),n),v=null}}if(v.open(d.method.toUpperCase(),r(E,d.params,d.paramsSerializer),!0),v.timeout=d.timeout,"onloadend"in v?v.onloadend=M:v.onreadystatechange=function(){v&&4===v.readyState&&(0!==v.status||v.responseURL&&0===v.responseURL.indexOf("file:"))&&setTimeout(M)},v.onabort=function(){v&&(h(new l("Request aborted",l.ECONNABORTED,d,v)),v=null)},v.onerror=function(){h(new l("Network Error",l.ERR_NETWORK,d,v,v)),v=null},v.ontimeout=function(){var e=d.timeout?"timeout of "+d.timeout+"ms exceeded":"timeout exceeded",t=d.transitional||a;d.timeoutErrorMessage&&(e=d.timeoutErrorMessage),h(new l(e,t.clarifyTimeoutError?l.ETIMEDOUT:l.ECONNABORTED,d,v)),v=null},e.isStandardBrowserEnv()){var k=(d.withCredentials||s(E))&&d.xsrfCookieName?n.read(d.xsrfCookieName):void 0;k&&(g[d.xsrfHeaderName]=k)}"setRequestHeader"in v&&e.forEach(g,(function(e,t){void 0===m&&"content-type"===t.toLowerCase()?delete g[t]:v.setRequestHeader(t,e)})),e.isUndefined(d.withCredentials)||(v.withCredentials=!!d.withCredentials),b&&"json"!==b&&(v.responseType=d.responseType),"function"==typeof d.onDownloadProgress&&v.addEventListener("progress",d.onDownloadProgress),"function"==typeof d.onUploadProgress&&v.upload&&v.upload.addEventListener("progress",d.onUploadProgress),(d.cancelToken||d.signal)&&(f=function(e){v&&(h(!e||e&&e.type?new c:e),v.abort(),v=null)},d.cancelToken&&d.cancelToken.subscribe(f),d.signal&&(d.signal.aborted?f():d.signal.addEventListener("abort",f))),m||(m=null);var _=u(E);_&&-1===["http","https","file"].indexOf(_)?h(new l("Unsupported protocol "+_+":",l.ERR_BAD_REQUEST,d)):v.send(m)}))},Lm}var qm=om,Ym=function(e,t){fm.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))},Km=mm(),Qm=Em,Gm=Mm(),Zm={"Content-Type":"application/x-www-form-urlencoded"};function Jm(e,t){!qm.isUndefined(e)&&qm.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var Xm,eg={transitional:Qm,adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(Xm=Vm()),Xm),transformRequest:[function(e,t){if(Ym(t,"Accept"),Ym(t,"Content-Type"),qm.isFormData(e)||qm.isArrayBuffer(e)||qm.isBuffer(e)||qm.isStream(e)||qm.isFile(e)||qm.isBlob(e))return e;if(qm.isArrayBufferView(e))return e.buffer;if(qm.isURLSearchParams(e))return Jm(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();var n,r=qm.isObject(e),i=t&&t["Content-Type"];if((n=qm.isFileList(e))||r&&"multipart/form-data"===i){var o=this.env&&this.env.FormData;return Gm(n?{"files[]":e}:e,o&&new o)}return r||"application/json"===i?(Jm(t,"application/json"),function(e,t,n){if(qm.isString(e))try{return(t||JSON.parse)(e),qm.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||eg.transitional,n=t&&t.silentJSONParsing,r=t&&t.forcedJSONParsing,i=!n&&"json"===this.responseType;if(i||r&&qm.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(i){if("SyntaxError"===e.name)throw Km.from(e,Km.ERR_BAD_RESPONSE,this,null,this.response);throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Fm?zm:(Fm=1,zm=null)},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};qm.forEach(["delete","get","head"],(function(e){eg.headers[e]={}})),qm.forEach(["post","put","patch"],(function(e){eg.headers[e]=qm.merge(Zm)}));var tg,ng,rg=eg,ig=om,og=rg;function sg(){return ng?tg:(ng=1,tg=function(e){return!(!e||!e.__CANCEL__)})}var ag=om,lg=function(e,t,n){var r=this||og;return ig.forEach(n,(function(n){e=n.call(r,e,t)})),e},cg=sg(),ug=rg,dg=Hm();function pg(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new dg}var hg,fg,mg=om,gg=function(e,t){t=t||{};var n={};function r(e,t){return mg.isPlainObject(e)&&mg.isPlainObject(t)?mg.merge(e,t):mg.isPlainObject(t)?mg.merge({},t):mg.isArray(t)?t.slice():t}function i(n){return mg.isUndefined(t[n])?mg.isUndefined(e[n])?void 0:r(void 0,e[n]):r(e[n],t[n])}function o(e){if(!mg.isUndefined(t[e]))return r(void 0,t[e])}function s(n){return mg.isUndefined(t[n])?mg.isUndefined(e[n])?void 0:r(void 0,e[n]):r(void 0,t[n])}function a(n){return n in t?r(e[n],t[n]):n in e?r(void 0,e[n]):void 0}var l={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a};return mg.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=l[e]||i,r=t(e);mg.isUndefined(r)&&t!==a||(n[e]=r)})),n};function bg(){return fg?hg:(fg=1,hg={version:"0.27.2"})}var yg=bg().version,vg=mm(),wg={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){wg[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var xg={};wg.transitional=function(e,t,n){function r(e,t){return"[Axios v"+yg+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,i,o){if(!1===e)throw new vg(r(i," has been removed"+(t?" in "+t:"")),vg.ERR_DEPRECATED);return t&&!xg[i]&&(xg[i]=!0,console.warn(r(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,i,o)}};var Eg,Mg,kg,_g,Dg,Cg,Og={assertOptions:function(e,t,n){if("object"!=typeof e)throw new vg("options must be an object",vg.ERR_BAD_OPTION_VALUE);for(var r=Object.keys(e),i=r.length;i-- >0;){var o=r[i],s=t[o];if(s){var a=e[o],l=void 0===a||s(a,o,e);if(!0!==l)throw new vg("option "+o+" must be "+l,vg.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new vg("Unknown option "+o,vg.ERR_BAD_OPTION)}},validators:wg},Ng=om,Tg=lm,Sg=hm,Ag=function(e){return pg(e),e.headers=e.headers||{},e.data=lg.call(e,e.data,e.headers,e.transformRequest),e.headers=ag.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),ag.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||ug.adapter)(e).then((function(t){return pg(e),t.data=lg.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return cg(t)||(pg(e),t&&t.response&&(t.response.data=lg.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))},Ig=gg,Lg=Bm,jg=Og,zg=jg.validators;function Fg(e){this.defaults=e,this.interceptors={request:new Sg,response:new Sg}}Fg.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=Ig(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var n=t.transitional;void 0!==n&&jg.assertOptions(n,{silentJSONParsing:zg.transitional(zg.boolean),forcedJSONParsing:zg.transitional(zg.boolean),clarifyTimeoutError:zg.transitional(zg.boolean)},!1);var r=[],i=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(i=i&&e.synchronous,r.unshift(e.fulfilled,e.rejected))}));var o,s=[];if(this.interceptors.response.forEach((function(e){s.push(e.fulfilled,e.rejected)})),!i){var a=[Ag,void 0];for(Array.prototype.unshift.apply(a,r),a=a.concat(s),o=Promise.resolve(t);a.length;)o=o.then(a.shift(),a.shift());return o}for(var l=t;r.length;){var c=r.shift(),u=r.shift();try{l=c(l)}catch(e){u(e);break}}try{o=Ag(l)}catch(e){return Promise.reject(e)}for(;s.length;)o=o.then(s.shift(),s.shift());return o},Fg.prototype.getUri=function(e){e=Ig(this.defaults,e);var t=Lg(e.baseURL,e.url);return Tg(t,e.params,e.paramsSerializer)},Ng.forEach(["delete","get","head","options"],(function(e){Fg.prototype[e]=function(t,n){return this.request(Ig(n||{},{method:e,url:t,data:(n||{}).data}))}})),Ng.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,i){return this.request(Ig(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Fg.prototype[e]=t(),Fg.prototype[e+"Form"]=t(!0)}));var Pg=om,Rg=Bf,Bg=Fg,Ug=gg;var $g=function e(t){var n=new Bg(t),r=Rg(Bg.prototype.request,n);return Pg.extend(r,Bg.prototype,n),Pg.extend(r,n),r.create=function(n){return e(Ug(t,n))},r}(rg);$g.Axios=Bg,$g.CanceledError=Hm(),$g.CancelToken=function(){if(Mg)return Eg;Mg=1;var e=Hm();function t(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var n;this.promise=new Promise((function(e){n=e}));var r=this;this.promise.then((function(e){if(r._listeners){var t,n=r._listeners.length;for(t=0;t<n;t++)r._listeners[t](e);r._listeners=null}})),this.promise.then=function(e){var t,n=new Promise((function(e){r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},t((function(t){r.reason||(r.reason=new e(t),n(r.reason))}))}return t.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},t.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},t.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},t.source=function(){var e,n=new t((function(t){e=t}));return{token:n,cancel:e}},Eg=t}(),$g.isCancel=sg(),$g.VERSION=bg().version,$g.toFormData=Mm(),$g.AxiosError=mm(),$g.Cancel=$g.CanceledError,$g.all=function(e){return Promise.all(e)},$g.spread=_g?kg:(_g=1,kg=function(e){return function(t){return e.apply(null,t)}}),$g.isAxiosError=function(){if(Cg)return Dg;Cg=1;var e=om;return Dg=function(t){return e.isObject(t)&&!0===t.isAxiosError}}(),Rf.exports=$g,Rf.exports.default=$g;var Hg=Cc(Pf.exports=Rf.exports);function Wg(e){return e&&e.__esModule?e.default:e}function Vg(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var qg,Yg,Kg,Qg,Gg,Zg,Jg={},Xg=[],eb=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function tb(e,t){for(var n in t)e[n]=t[n];return e}function nb(e){var t=e.parentNode;t&&t.removeChild(e)}function rb(e,t,n){var r,i,o,s={};for(o in t)"key"==o?r=t[o]:"ref"==o?i=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?qg.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===s[o]&&(s[o]=e.defaultProps[o]);return ib(e,s,r,i,null)}function ib(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==i?++Kg:i};return null==i&&null!=Yg.vnode&&Yg.vnode(o),o}function ob(e){return e.children}function sb(e,t){this.props=e,this.context=t}function ab(e,t){if(null==t)return e.__?ab(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?ab(e):null}function lb(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return lb(e)}}function cb(e){(!e.__d&&(e.__d=!0)&&Qg.push(e)&&!ub.__r++||Zg!==Yg.debounceRendering)&&((Zg=Yg.debounceRendering)||Gg)(ub)}function ub(){for(var e;ub.__r=Qg.length;)e=Qg.sort((function(e,t){return e.__v.__b-t.__v.__b})),Qg=[],e.some((function(e){var t,n,r,i,o,s;e.__d&&(o=(i=(t=e).__v).__e,(s=t.__P)&&(n=[],(r=tb({},i)).__v=i.__v+1,vb(s,i,r,t.__n,void 0!==s.ownerSVGElement,null!=i.__h?[o]:null,n,null==o?ab(i):o,i.__h),wb(n,i),i.__e!=o&&lb(i)))}))}function db(e,t,n,r,i,o,s,a,l,c){var u,d,p,h,f,m,g,b=r&&r.__k||Xg,y=b.length;for(n.__k=[],u=0;u<t.length;u++)if(null!=(h=n.__k[u]=null==(h=t[u])||"boolean"==typeof h?null:"string"==typeof h||"number"==typeof h||"bigint"==typeof h?ib(null,h,null,null,h):Array.isArray(h)?ib(ob,{children:h},null,null,null):h.__b>0?ib(h.type,h.props,h.key,null,h.__v):h)){if(h.__=n,h.__b=n.__b+1,null===(p=b[u])||p&&h.key==p.key&&h.type===p.type)b[u]=void 0;else for(d=0;d<y;d++){if((p=b[d])&&h.key==p.key&&h.type===p.type){b[d]=void 0;break}p=null}vb(e,h,p=p||Jg,i,o,s,a,l,c),f=h.__e,(d=h.ref)&&p.ref!=d&&(g||(g=[]),p.ref&&g.push(p.ref,null,h),g.push(d,h.__c||f,h)),null!=f?(null==m&&(m=f),"function"==typeof h.type&&h.__k===p.__k?h.__d=l=pb(h,l,e):l=fb(e,h,p,b,f,l),"function"==typeof n.type&&(n.__d=l)):l&&p.__e==l&&l.parentNode!=e&&(l=ab(p))}for(n.__e=m,u=y;u--;)null!=b[u]&&("function"==typeof n.type&&null!=b[u].__e&&b[u].__e==n.__d&&(n.__d=ab(r,u+1)),Eb(b[u],b[u]));if(g)for(u=0;u<g.length;u++)xb(g[u],g[++u],g[++u])}function pb(e,t,n){for(var r,i=e.__k,o=0;i&&o<i.length;o++)(r=i[o])&&(r.__=e,t="function"==typeof r.type?pb(r,t,n):fb(n,r,r,i,r.__e,t));return t}function hb(e,t){return t=t||[],null==e||"boolean"==typeof e||(Array.isArray(e)?e.some((function(e){hb(e,t)})):t.push(e)),t}function fb(e,t,n,r,i,o){var s,a,l;if(void 0!==t.__d)s=t.__d,t.__d=void 0;else if(null==n||i!=o||null==i.parentNode)e:if(null==o||o.parentNode!==e)e.appendChild(i),s=null;else{for(a=o,l=0;(a=a.nextSibling)&&l<r.length;l+=2)if(a==i)break e;e.insertBefore(i,o),s=o}return void 0!==s?s:i.nextSibling}function mb(e,t,n){"-"===t[0]?e.setProperty(t,n):e[t]=null==n?"":"number"!=typeof n||eb.test(t)?n:n+"px"}function gb(e,t,n,r,i){var o;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||mb(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||mb(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r||e.addEventListener(t,o?yb:bb,o):e.removeEventListener(t,o?yb:bb,o);else if("dangerouslySetInnerHTML"!==t){if(i)t=t.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null!=n&&(!1!==n||"a"===t[0]&&"r"===t[1])?e.setAttribute(t,n):e.removeAttribute(t))}}function bb(e){this.l[e.type+!1](Yg.event?Yg.event(e):e)}function yb(e){this.l[e.type+!0](Yg.event?Yg.event(e):e)}function vb(e,t,n,r,i,o,s,a,l){var c,u,d,p,h,f,m,g,b,y,v,w=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(l=n.__h,a=t.__e=n.__e,t.__h=null,o=[a]),(c=Yg.__b)&&c(t);try{e:if("function"==typeof w){if(g=t.props,b=(c=w.contextType)&&r[c.__c],y=c?b?b.props.value:c.__:r,n.__c?m=(u=t.__c=n.__c).__=u.__E:("prototype"in w&&w.prototype.render?t.__c=u=new w(g,y):(t.__c=u=new sb(g,y),u.constructor=w,u.render=Mb),b&&b.sub(u),u.props=g,u.state||(u.state={}),u.context=y,u.__n=r,d=u.__d=!0,u.__h=[]),null==u.__s&&(u.__s=u.state),null!=w.getDerivedStateFromProps&&(u.__s==u.state&&(u.__s=tb({},u.__s)),tb(u.__s,w.getDerivedStateFromProps(g,u.__s))),p=u.props,h=u.state,d)null==w.getDerivedStateFromProps&&null!=u.componentWillMount&&u.componentWillMount(),null!=u.componentDidMount&&u.__h.push(u.componentDidMount);else{if(null==w.getDerivedStateFromProps&&g!==p&&null!=u.componentWillReceiveProps&&u.componentWillReceiveProps(g,y),!u.__e&&null!=u.shouldComponentUpdate&&!1===u.shouldComponentUpdate(g,u.__s,y)||t.__v===n.__v){u.props=g,u.state=u.__s,t.__v!==n.__v&&(u.__d=!1),u.__v=t,t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),u.__h.length&&s.push(u);break e}null!=u.componentWillUpdate&&u.componentWillUpdate(g,u.__s,y),null!=u.componentDidUpdate&&u.__h.push((function(){u.componentDidUpdate(p,h,f)}))}u.context=y,u.props=g,u.state=u.__s,(c=Yg.__r)&&c(t),u.__d=!1,u.__v=t,u.__P=e,c=u.render(u.props,u.state,u.context),u.state=u.__s,null!=u.getChildContext&&(r=tb(tb({},r),u.getChildContext())),d||null==u.getSnapshotBeforeUpdate||(f=u.getSnapshotBeforeUpdate(p,h)),v=null!=c&&c.type===ob&&null==c.key?c.props.children:c,db(e,Array.isArray(v)?v:[v],t,n,r,i,o,s,a,l),u.base=t.__e,t.__h=null,u.__h.length&&s.push(u),m&&(u.__E=u.__=null),u.__e=!1}else null==o&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=function(e,t,n,r,i,o,s,a){var l,c,u,d=n.props,p=t.props,h=t.type,f=0;if("svg"===h&&(i=!0),null!=o)for(;f<o.length;f++)if((l=o[f])&&"setAttribute"in l==!!h&&(h?l.localName===h:3===l.nodeType)){e=l,o[f]=null;break}if(null==e){if(null===h)return document.createTextNode(p);e=i?document.createElementNS("http://www.w3.org/2000/svg",h):document.createElement(h,p.is&&p),o=null,a=!1}if(null===h)d===p||a&&e.data===p||(e.data=p);else{if(o=o&&qg.call(e.childNodes),c=(d=n.props||Jg).dangerouslySetInnerHTML,u=p.dangerouslySetInnerHTML,!a){if(null!=o)for(d={},f=0;f<e.attributes.length;f++)d[e.attributes[f].name]=e.attributes[f].value;(u||c)&&(u&&(c&&u.__html==c.__html||u.__html===e.innerHTML)||(e.innerHTML=u&&u.__html||""))}if(function(e,t,n,r,i){var o;for(o in n)"children"===o||"key"===o||o in t||gb(e,o,null,n[o],r);for(o in t)i&&"function"!=typeof t[o]||"children"===o||"key"===o||"value"===o||"checked"===o||n[o]===t[o]||gb(e,o,t[o],n[o],r)}(e,p,d,i,a),u)t.__k=[];else if(f=t.props.children,db(e,Array.isArray(f)?f:[f],t,n,r,i&&"foreignObject"!==h,o,s,o?o[0]:n.__k&&ab(n,0),a),null!=o)for(f=o.length;f--;)null!=o[f]&&nb(o[f]);a||("value"in p&&void 0!==(f=p.value)&&(f!==d.value||f!==e.value||"progress"===h&&!f)&&gb(e,"value",f,d.value,!1),"checked"in p&&void 0!==(f=p.checked)&&f!==e.checked&&gb(e,"checked",f,d.checked,!1))}return e}(n.__e,t,n,r,i,o,s,l);(c=Yg.diffed)&&c(t)}catch(e){t.__v=null,(l||null!=o)&&(t.__e=a,t.__h=!!l,o[o.indexOf(a)]=null),Yg.__e(e,t,n)}}function wb(e,t){Yg.__c&&Yg.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){Yg.__e(e,t.__v)}}))}function xb(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){Yg.__e(e,n)}}function Eb(e,t,n){var r,i;if(Yg.unmount&&Yg.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||xb(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){Yg.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&Eb(r[i],t,"function"!=typeof e.type);n||null==e.__e||nb(e.__e),e.__e=e.__d=void 0}function Mb(e,t,n){return this.constructor(e,n)}function kb(e,t,n){var r,i,o;Yg.__&&Yg.__(e,t),i=(r="function"==typeof n)?null:n&&n.__k||t.__k,o=[],vb(t,e=(!r&&n||t).__k=rb(ob,null,[e]),i||Jg,Jg,void 0!==t.ownerSVGElement,!r&&n?[n]:i?null:t.firstChild?qg.call(t.childNodes):null,o,!r&&n?n:i?i.__e:t.firstChild,r),wb(o,e)}qg=Xg.slice,Yg={__e:function(e,t){for(var n,r,i;t=t.__;)if((n=t.__c)&&!n.__)try{if((r=n.constructor)&&null!=r.getDerivedStateFromError&&(n.setState(r.getDerivedStateFromError(e)),i=n.__d),null!=n.componentDidCatch&&(n.componentDidCatch(e),i=n.__d),i)return n.__E=n}catch(t){e=t}throw e}},Kg=0,sb.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=tb({},this.state),"function"==typeof e&&(e=e(tb({},n),this.props)),e&&tb(n,e),null!=e&&this.__v&&(t&&this.__h.push(t),cb(this))},sb.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),cb(this))},sb.prototype.render=ob,Qg=[],Gg="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,ub.__r=0;var _b=0;function Db(e,t,n,r,i){var o,s,a={};for(s in t)"ref"==s?o=t[s]:a[s]=t[s];var l={type:e,props:a,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--_b,__source:r,__self:i};if("function"==typeof e&&(o=e.defaultProps))for(s in o)void 0===a[s]&&(a[s]=o[s]);return Yg.vnode&&Yg.vnode(l),l}var Cb;Cb=JSON.parse('{"search":"Search","search_no_results_1":"Oh no!","search_no_results_2":"That emoji couldn’t be found","pick":"Pick an emoji…","add_custom":"Add custom emoji","categories":{"activity":"Activity","custom":"Custom","flags":"Flags","foods":"Food & Drink","frequent":"Frequently used","nature":"Animals & Nature","objects":"Objects","people":"Smileys & People","places":"Travel & Places","search":"Search Results","symbols":"Symbols"},"skins":{"1":"Default","2":"Light","3":"Medium-Light","4":"Medium","5":"Medium-Dark","6":"Dark","choose":"Choose default skin tone"}}');var Ob={autoFocus:{value:!1},emojiButtonColors:{value:null},emojiButtonRadius:{value:"100%"},emojiButtonSize:{value:36},emojiSize:{value:24},emojiVersion:{value:14,choices:[1,2,3,4,5,11,12,12.1,13,13.1,14]},icons:{value:"auto",choices:["auto","outline","solid"]},locale:{value:"en",choices:["en","ar","de","es","fa","fr","it","ja","nl","pl","pt","ru","uk","zh"]},maxFrequentRows:{value:4},navPosition:{value:"top",choices:["top","bottom","none"]},noCountryFlags:{value:!1},noResultsEmoji:{value:null},perLine:{value:9},previewEmoji:{value:null},previewPosition:{value:"bottom",choices:["top","bottom","none"]},searchPosition:{value:"sticky",choices:["sticky","static","none"]},set:{value:"native",choices:["native","apple","facebook","google","twitter"]},skin:{value:1,choices:[1,2,3,4,5,6]},skinTonePosition:{value:"preview",choices:["preview","search","none"]},theme:{value:"auto",choices:["auto","light","dark"]},categories:null,categoryIcons:null,custom:null,data:null,i18n:null,getImageURL:null,getSpritesheetURL:null,onAddCustomEmoji:null,onClickOutside:null,onEmojiSelect:null,stickySearch:{deprecated:!0,value:!0}};var Nb={set:function(e,t){try{window.localStorage[`emoji-mart.${e}`]=JSON.stringify(t)}catch(e){}},get:function(e){try{const t=window.localStorage[`emoji-mart.${e}`];if(t)return JSON.parse(t)}catch(e){}}},Tb=new Map;function Sb(e){if(Tb.has(e))return Tb.get(e);var t=Ab(e);return Tb.set(e,t),t}var Ab=function(){var e=null;try{e=document.createElement("canvas").getContext("2d")}catch(e){}if(!e)return function(){return!1};var t=25,n=20,r=Math.floor(t/2);return e.font=r+"px Arial, Sans-Serif",e.textBaseline="top",e.canvas.width=2*n,e.canvas.height=t,function(r){e.clearRect(0,0,2*n,t),e.fillStyle="#FF0000",e.fillText(r,0,22),e.fillStyle="#0000FF",e.fillText(r,n,22);for(var i=e.getImageData(0,0,n,t).data,o=i.length,s=0;s<o&&!i[s+3];s+=4);if(s>=o)return!1;var a=n+s/4%n,l=Math.floor(s/4/n),c=e.getImageData(a,l,1,1).data;return i[s]===c[0]&&i[s+2]===c[2]&&!(e.measureText(r).width>=n)}}();const Ib=[{v:14,emoji:"🫠"},{v:13.1,emoji:"😶‍🌫️"},{v:13,emoji:"🥸"},{v:12.1,emoji:"🧑‍🦰"},{v:12,emoji:"🥱"},{v:11,emoji:"🥰"},{v:5,emoji:"🤩"},{v:4,emoji:"👱‍♀️"},{v:3,emoji:"🤣"},{v:2,emoji:"👋🏻"},{v:1,emoji:"🙃"}];var Lb={latestVersion:function(){for(const{v:e,emoji:t}of Ib)if(Sb(t))return e},noCountryFlags:function(){return!Sb("🇨🇦")}};const jb=["+1","grinning","kissing_heart","heart_eyes","laughing","stuck_out_tongue_winking_eye","sweat_smile","joy","scream","disappointed","unamused","weary","sob","sunglasses","heart"];let zb=null;var Fb={add:function(e){zb||(zb=Nb.get("frequently")||{});const t=e.id||e;t&&(zb[t]||(zb[t]=0),zb[t]+=1,Nb.set("last",t),Nb.set("frequently",zb))},get:function({maxFrequentRows:e,perLine:t}){if(!e)return[];zb||(zb=Nb.get("frequently"));let n=[];if(!zb){zb={};for(let e in jb.slice(0,t)){const r=jb[e];zb[r]=t-e,n.push(r)}return n}const r=e*t,i=Nb.get("last");for(let e in zb)n.push(e);if(n.sort(((e,t)=>{const n=zb[t],r=zb[e];return n==r?e.localeCompare(t):n-r})),n.length>r){const e=n.slice(r);n=n.slice(0,r);for(let t of e)t!=i&&delete zb[t];i&&-1==n.indexOf(i)&&(delete zb[n[n.length-1]],n.splice(-1,1,i)),Nb.set("frequently",zb)}return n}};let Pb=null;var Rb={search:async function(e,{maxResults:t}={}){if(!e||!e.trim().length)return null;t||(t=90),await qb();const n=e.toLowerCase().replace(/(\w)-/,"$1 ").split(/[\s|,]+/).filter(((e,t,n)=>e.trim()&&n.indexOf(e)==t));if(!n.length)return;let r,i,o=Pb||(Pb=Object.values($b.emojis));for(const e of n){if(!o.length)break;r=[],i={};for(const t of o){if(!t.search)continue;const n=t.search.indexOf(`,${e}`);-1!=n&&(r.push(t),i[t.id]||(i[t.id]=0),i[t.id]+=t.id==e?0:n+1)}o=r}return r.length<2||(r.sort(((e,t)=>{const n=i[e.id],r=i[t.id];return n==r?e.id.localeCompare(t.id):n-r})),r.length>t&&(r=r.slice(0,t))),r},get:function(e){return e.id?e:$b.emojis[e]||$b.emojis[$b.aliases[e]]||$b.emojis[$b.natives[e]]},reset:function(){Pb=null},SHORTCODES_REGEX:/^(?:\:([^\:]+)\:)(?:\:skin-tone-(\d)\:)?$/};const Bb=["checkered_flag","crossed_flags","pirate_flag","rainbow-flag","transgender_flag","triangular_flag_on_post","waving_black_flag","waving_white_flag"];let Ub=null,$b=null;async function Hb(e){const t=await fetch(e);return await t.json()}let Wb=null,Vb=null;function qb(e){return Wb||(Wb=new Promise((e=>{Vb=e}))),e&&async function(e){let{emojiVersion:t,set:n,locale:r}=e;if(t||(t=Ob.emojiVersion.value),n||(n=Ob.set.value),r||(r=Ob.locale.value),$b)$b.categories=$b.categories.filter((e=>!!!e.name));else{$b=("function"==typeof e.data?await e.data():e.data)||await Hb(`https://cdn.jsdelivr.net/npm/@emoji-mart/data@latest/sets/${t}/${n}.json`),$b.emoticons={},$b.natives={},$b.categories.unshift({id:"frequent",emojis:[]});for(const e in $b.aliases){const t=$b.aliases[e],n=$b.emojis[t];n&&(n.aliases||(n.aliases=[]),n.aliases.push(e))}}Ub||(Ub=("function"==typeof e.i18n?await e.i18n():e.i18n)||("en"==r?Wg(Cb):await Hb(`https://cdn.jsdelivr.net/npm/@emoji-mart/data@latest/i18n/${r}.json`)));if(e.custom)for(let t in e.custom){t=parseInt(t);const n=e.custom[t],r=e.custom[t-1];if(!n.emojis||!n.emojis.length)continue;n.id||(n.id=`custom_${t+1}`),n.name||(n.name=Ub.categories.custom),r&&!n.icon&&(n.target=r.target||r),$b.categories.push(n);const i=[];for(const e of n.emojis)i.indexOf(e.id)>-1||($b.emojis[e.id]=e,i.push(e.id));n.emojis=i}e.categories&&($b.categories=$b.categories.filter((t=>-1!=e.categories.indexOf(t.id))).sort(((t,n)=>e.categories.indexOf(t.id)-e.categories.indexOf(n.id))));let i=null,o=null;"native"==n&&(i=Lb.latestVersion(),o=e.noCountryFlags||Lb.noCountryFlags());let s=$b.categories.length,a=!1;for(;s--;){const t=$b.categories[s];if("frequent"==t.id&&(t.emojis=Fb.get(e)),!t.emojis||!t.emojis.length){$b.categories.splice(s,1);continue}const{categoryIcons:n}=e;if(n){const e=n[t.id];e&&!t.icon&&(t.icon=e)}let r=t.emojis.length;for(;r--;){const e=$b.emojis[t.emojis[r]],n=()=>{t.emojis.splice(r,1)};if(e)if(i&&e.version>i)n();else if(!o||"flags"!=t.id||Bb.includes(e.id)){if(!e.search){if(a=!0,e.search=","+[[e.id,!1],[e.name,!0],[e.keywords,!1],[e.emoticons,!1]].map((([e,t])=>{if(e)return(Array.isArray(e)?e:[e]).map((e=>(t?e.split(/[-|_|\s]+/):[e]).map((e=>e.toLowerCase())))).flat()})).flat().filter((e=>e&&e.trim())).join(","),e.emoticons)for(const t of e.emoticons)$b.emoticons[t]||($b.emoticons[t]=e.id);let t=0;for(const n of e.skins){if(!n)continue;t++;const{native:r}=n;r&&($b.natives[r]=e.id,e.search+=`,${r}`);const i=1==t?"":`:skin-tone-${t}:`;n.shortcodes=`:${e.id}:${i}`}}}else n();else n()}}a&&Rb.reset();Vb()}(e),Wb}function Yb(e,t,n){e||(e={});const r={};for(let i in t)r[i]=Kb(i,e,t,n);return r}function Kb(e,t,n,r){const i=n[e];let o=r&&r.getAttribute(e)||(null!=t[e]&&null!=t[e]?t[e]:null);return i?(null!=o&&i.value&&typeof i.value!=typeof o&&(o="boolean"==typeof i.value?"false"!=o:i.value.constructor(o)),(null==o||i.choices&&-1==i.choices.indexOf(o))&&(o=i.value),o):o}var Qb={categories:{activity:{outline:Db("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:Db("path",{d:"M12 0C5.373 0 0 5.372 0 12c0 6.627 5.373 12 12 12 6.628 0 12-5.373 12-12 0-6.628-5.372-12-12-12m9.949 11H17.05c.224-2.527 1.232-4.773 1.968-6.113A9.966 9.966 0 0 1 21.949 11M13 11V2.051a9.945 9.945 0 0 1 4.432 1.564c-.858 1.491-2.156 4.22-2.392 7.385H13zm-2 0H8.961c-.238-3.165-1.536-5.894-2.393-7.385A9.95 9.95 0 0 1 11 2.051V11zm0 2v8.949a9.937 9.937 0 0 1-4.432-1.564c.857-1.492 2.155-4.221 2.393-7.385H11zm4.04 0c.236 3.164 1.534 5.893 2.392 7.385A9.92 9.92 0 0 1 13 21.949V13h2.04zM4.982 4.887C5.718 6.227 6.726 8.473 6.951 11h-4.9a9.977 9.977 0 0 1 2.931-6.113M2.051 13h4.9c-.226 2.527-1.233 4.771-1.969 6.113A9.972 9.972 0 0 1 2.051 13m16.967 6.113c-.735-1.342-1.744-3.586-1.968-6.113h4.899a9.961 9.961 0 0 1-2.931 6.113"})}),solid:Db("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Db("path",{d:"M16.17 337.5c0 44.98 7.565 83.54 13.98 107.9C35.22 464.3 50.46 496 174.9 496c9.566 0 19.59-.4707 29.84-1.271L17.33 307.3C16.53 317.6 16.17 327.7 16.17 337.5zM495.8 174.5c0-44.98-7.565-83.53-13.98-107.9c-4.688-17.54-18.34-31.23-36.04-35.95C435.5 27.91 392.9 16 337 16c-9.564 0-19.59 .4707-29.84 1.271l187.5 187.5C495.5 194.4 495.8 184.3 495.8 174.5zM26.77 248.8l236.3 236.3c142-36.1 203.9-150.4 222.2-221.1L248.9 26.87C106.9 62.96 45.07 177.2 26.77 248.8zM256 335.1c0 9.141-7.474 16-16 16c-4.094 0-8.188-1.564-11.31-4.689L164.7 283.3C161.6 280.2 160 276.1 160 271.1c0-8.529 6.865-16 16-16c4.095 0 8.189 1.562 11.31 4.688l64.01 64C254.4 327.8 256 331.9 256 335.1zM304 287.1c0 9.141-7.474 16-16 16c-4.094 0-8.188-1.564-11.31-4.689L212.7 235.3C209.6 232.2 208 228.1 208 223.1c0-9.141 7.473-16 16-16c4.094 0 8.188 1.562 11.31 4.688l64.01 64.01C302.5 279.8 304 283.9 304 287.1zM256 175.1c0-9.141 7.473-16 16-16c4.094 0 8.188 1.562 11.31 4.688l64.01 64.01c3.125 3.125 4.688 7.219 4.688 11.31c0 9.133-7.468 16-16 16c-4.094 0-8.189-1.562-11.31-4.688l-64.01-64.01C257.6 184.2 256 180.1 256 175.1z"})})},custom:Db("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",children:Db("path",{d:"M417.1 368c-5.937 10.27-16.69 16-27.75 16c-5.422 0-10.92-1.375-15.97-4.281L256 311.4V448c0 17.67-14.33 32-31.1 32S192 465.7 192 448V311.4l-118.3 68.29C68.67 382.6 63.17 384 57.75 384c-11.06 0-21.81-5.734-27.75-16c-8.828-15.31-3.594-34.88 11.72-43.72L159.1 256L41.72 187.7C26.41 178.9 21.17 159.3 29.1 144C36.63 132.5 49.26 126.7 61.65 128.2C65.78 128.7 69.88 130.1 73.72 132.3L192 200.6V64c0-17.67 14.33-32 32-32S256 46.33 256 64v136.6l118.3-68.29c3.838-2.213 7.939-3.539 12.07-4.051C398.7 126.7 411.4 132.5 417.1 144c8.828 15.31 3.594 34.88-11.72 43.72L288 256l118.3 68.28C421.6 333.1 426.8 352.7 417.1 368z"})}),flags:{outline:Db("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:Db("path",{d:"M0 0l6.084 24H8L1.916 0zM21 5h-4l-1-4H4l3 12h3l1 4h13L21 5zM6.563 3h7.875l2 8H8.563l-2-8zm8.832 10l-2.856 1.904L12.063 13h3.332zM19 13l-1.5-6h1.938l2 8H16l3-2z"})}),solid:Db("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Db("path",{d:"M64 496C64 504.8 56.75 512 48 512h-32C7.25 512 0 504.8 0 496V32c0-17.75 14.25-32 32-32s32 14.25 32 32V496zM476.3 0c-6.365 0-13.01 1.35-19.34 4.233c-45.69 20.86-79.56 27.94-107.8 27.94c-59.96 0-94.81-31.86-163.9-31.87C160.9 .3055 131.6 4.867 96 15.75v350.5c32-9.984 59.87-14.1 84.85-14.1c73.63 0 124.9 31.78 198.6 31.78c31.91 0 68.02-5.971 111.1-23.09C504.1 355.9 512 344.4 512 332.1V30.73C512 11.1 495.3 0 476.3 0z"})})},foods:{outline:Db("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:Db("path",{d:"M17 4.978c-1.838 0-2.876.396-3.68.934.513-1.172 1.768-2.934 4.68-2.934a1 1 0 0 0 0-2c-2.921 0-4.629 1.365-5.547 2.512-.064.078-.119.162-.18.244C11.73 1.838 10.798.023 9.207.023 8.579.022 7.85.306 7 .978 5.027 2.54 5.329 3.902 6.492 4.999 3.609 5.222 0 7.352 0 12.969c0 4.582 4.961 11.009 9 11.009 1.975 0 2.371-.486 3-1 .629.514 1.025 1 3 1 4.039 0 9-6.418 9-11 0-5.953-4.055-8-7-8M8.242 2.546c.641-.508.943-.523.965-.523.426.169.975 1.405 1.357 3.055-1.527-.629-2.741-1.352-2.98-1.846.059-.112.241-.356.658-.686M15 21.978c-1.08 0-1.21-.109-1.559-.402l-.176-.146c-.367-.302-.816-.452-1.266-.452s-.898.15-1.266.452l-.176.146c-.347.292-.477.402-1.557.402-2.813 0-7-5.389-7-9.009 0-5.823 4.488-5.991 5-5.991 1.939 0 2.484.471 3.387 1.251l.323.276a1.995 1.995 0 0 0 2.58 0l.323-.276c.902-.78 1.447-1.251 3.387-1.251.512 0 5 .168 5 6 0 3.617-4.187 9-7 9"})}),solid:Db("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Db("path",{d:"M481.9 270.1C490.9 279.1 496 291.3 496 304C496 316.7 490.9 328.9 481.9 337.9C472.9 346.9 460.7 352 448 352H64C51.27 352 39.06 346.9 30.06 337.9C21.06 328.9 16 316.7 16 304C16 291.3 21.06 279.1 30.06 270.1C39.06 261.1 51.27 256 64 256H448C460.7 256 472.9 261.1 481.9 270.1zM475.3 388.7C478.3 391.7 480 395.8 480 400V416C480 432.1 473.3 449.3 461.3 461.3C449.3 473.3 432.1 480 416 480H96C79.03 480 62.75 473.3 50.75 461.3C38.74 449.3 32 432.1 32 416V400C32 395.8 33.69 391.7 36.69 388.7C39.69 385.7 43.76 384 48 384H464C468.2 384 472.3 385.7 475.3 388.7zM50.39 220.8C45.93 218.6 42.03 215.5 38.97 211.6C35.91 207.7 33.79 203.2 32.75 198.4C31.71 193.5 31.8 188.5 32.99 183.7C54.98 97.02 146.5 32 256 32C365.5 32 457 97.02 479 183.7C480.2 188.5 480.3 193.5 479.2 198.4C478.2 203.2 476.1 207.7 473 211.6C469.1 215.5 466.1 218.6 461.6 220.8C457.2 222.9 452.3 224 447.3 224H64.67C59.73 224 54.84 222.9 50.39 220.8zM372.7 116.7C369.7 119.7 368 123.8 368 128C368 131.2 368.9 134.3 370.7 136.9C372.5 139.5 374.1 141.6 377.9 142.8C380.8 143.1 384 144.3 387.1 143.7C390.2 143.1 393.1 141.6 395.3 139.3C397.6 137.1 399.1 134.2 399.7 131.1C400.3 128 399.1 124.8 398.8 121.9C397.6 118.1 395.5 116.5 392.9 114.7C390.3 112.9 387.2 111.1 384 111.1C379.8 111.1 375.7 113.7 372.7 116.7V116.7zM244.7 84.69C241.7 87.69 240 91.76 240 96C240 99.16 240.9 102.3 242.7 104.9C244.5 107.5 246.1 109.6 249.9 110.8C252.8 111.1 256 112.3 259.1 111.7C262.2 111.1 265.1 109.6 267.3 107.3C269.6 105.1 271.1 102.2 271.7 99.12C272.3 96.02 271.1 92.8 270.8 89.88C269.6 86.95 267.5 84.45 264.9 82.7C262.3 80.94 259.2 79.1 256 79.1C251.8 79.1 247.7 81.69 244.7 84.69V84.69zM116.7 116.7C113.7 119.7 112 123.8 112 128C112 131.2 112.9 134.3 114.7 136.9C116.5 139.5 118.1 141.6 121.9 142.8C124.8 143.1 128 144.3 131.1 143.7C134.2 143.1 137.1 141.6 139.3 139.3C141.6 137.1 143.1 134.2 143.7 131.1C144.3 128 143.1 124.8 142.8 121.9C141.6 118.1 139.5 116.5 136.9 114.7C134.3 112.9 131.2 111.1 128 111.1C123.8 111.1 119.7 113.7 116.7 116.7L116.7 116.7z"})})},frequent:{outline:Db("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[Db("path",{d:"M13 4h-2l-.001 7H9v2h2v2h2v-2h4v-2h-4z"}),Db("path",{d:"M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0m0 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10"})]}),solid:Db("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Db("path",{d:"M256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512zM232 256C232 264 236 271.5 242.7 275.1L338.7 339.1C349.7 347.3 364.6 344.3 371.1 333.3C379.3 322.3 376.3 307.4 365.3 300L280 243.2V120C280 106.7 269.3 96 255.1 96C242.7 96 231.1 106.7 231.1 120L232 256z"})})},nature:{outline:Db("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[Db("path",{d:"M15.5 8a1.5 1.5 0 1 0 .001 3.001A1.5 1.5 0 0 0 15.5 8M8.5 8a1.5 1.5 0 1 0 .001 3.001A1.5 1.5 0 0 0 8.5 8"}),Db("path",{d:"M18.933 0h-.027c-.97 0-2.138.787-3.018 1.497-1.274-.374-2.612-.51-3.887-.51-1.285 0-2.616.133-3.874.517C7.245.79 6.069 0 5.093 0h-.027C3.352 0 .07 2.67.002 7.026c-.039 2.479.276 4.238 1.04 5.013.254.258.882.677 1.295.882.191 3.177.922 5.238 2.536 6.38.897.637 2.187.949 3.2 1.102C8.04 20.6 8 20.795 8 21c0 1.773 2.35 3 4 3 1.648 0 4-1.227 4-3 0-.201-.038-.393-.072-.586 2.573-.385 5.435-1.877 5.925-7.587.396-.22.887-.568 1.104-.788.763-.774 1.079-2.534 1.04-5.013C23.929 2.67 20.646 0 18.933 0M3.223 9.135c-.237.281-.837 1.155-.884 1.238-.15-.41-.368-1.349-.337-3.291.051-3.281 2.478-4.972 3.091-5.031.256.015.731.27 1.265.646-1.11 1.171-2.275 2.915-2.352 5.125-.133.546-.398.858-.783 1.313M12 22c-.901 0-1.954-.693-2-1 0-.654.475-1.236 1-1.602V20a1 1 0 1 0 2 0v-.602c.524.365 1 .947 1 1.602-.046.307-1.099 1-2 1m3-3.48v.02a4.752 4.752 0 0 0-1.262-1.02c1.092-.516 2.239-1.334 2.239-2.217 0-1.842-1.781-2.195-3.977-2.195-2.196 0-3.978.354-3.978 2.195 0 .883 1.148 1.701 2.238 2.217A4.8 4.8 0 0 0 9 18.539v-.025c-1-.076-2.182-.281-2.973-.842-1.301-.92-1.838-3.045-1.853-6.478l.023-.041c.496-.826 1.49-1.45 1.804-3.102 0-2.047 1.357-3.631 2.362-4.522C9.37 3.178 10.555 3 11.948 3c1.447 0 2.685.192 3.733.57 1 .9 2.316 2.465 2.316 4.48.313 1.651 1.307 2.275 1.803 3.102.035.058.068.117.102.178-.059 5.967-1.949 7.01-4.902 7.19m6.628-8.202c-.037-.065-.074-.13-.113-.195a7.587 7.587 0 0 0-.739-.987c-.385-.455-.648-.768-.782-1.313-.076-2.209-1.241-3.954-2.353-5.124.531-.376 1.004-.63 1.261-.647.636.071 3.044 1.764 3.096 5.031.027 1.81-.347 3.218-.37 3.235"})]}),solid:Db("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",children:Db("path",{d:"M332.7 19.85C334.6 8.395 344.5 0 356.1 0C363.6 0 370.6 3.52 375.1 9.502L392 32H444.1C456.8 32 469.1 37.06 478.1 46.06L496 64H552C565.3 64 576 74.75 576 88V112C576 156.2 540.2 192 496 192H426.7L421.6 222.5L309.6 158.5L332.7 19.85zM448 64C439.2 64 432 71.16 432 80C432 88.84 439.2 96 448 96C456.8 96 464 88.84 464 80C464 71.16 456.8 64 448 64zM416 256.1V480C416 497.7 401.7 512 384 512H352C334.3 512 320 497.7 320 480V364.8C295.1 377.1 268.8 384 240 384C211.2 384 184 377.1 160 364.8V480C160 497.7 145.7 512 128 512H96C78.33 512 64 497.7 64 480V249.8C35.23 238.9 12.64 214.5 4.836 183.3L.9558 167.8C-3.331 150.6 7.094 133.2 24.24 128.1C41.38 124.7 58.76 135.1 63.05 152.2L66.93 167.8C70.49 182 83.29 191.1 97.97 191.1H303.8L416 256.1z"})})},objects:{outline:Db("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[Db("path",{d:"M12 0a9 9 0 0 0-5 16.482V21s2.035 3 5 3 5-3 5-3v-4.518A9 9 0 0 0 12 0zm0 2c3.86 0 7 3.141 7 7s-3.14 7-7 7-7-3.141-7-7 3.14-7 7-7zM9 17.477c.94.332 1.946.523 3 .523s2.06-.19 3-.523v.834c-.91.436-1.925.689-3 .689a6.924 6.924 0 0 1-3-.69v-.833zm.236 3.07A8.854 8.854 0 0 0 12 21c.965 0 1.888-.167 2.758-.451C14.155 21.173 13.153 22 12 22c-1.102 0-2.117-.789-2.764-1.453z"}),Db("path",{d:"M14.745 12.449h-.004c-.852-.024-1.188-.858-1.577-1.824-.421-1.061-.703-1.561-1.182-1.566h-.009c-.481 0-.783.497-1.235 1.537-.436.982-.801 1.811-1.636 1.791l-.276-.043c-.565-.171-.853-.691-1.284-1.794-.125-.313-.202-.632-.27-.913-.051-.213-.127-.53-.195-.634C7.067 9.004 7.039 9 6.99 9A1 1 0 0 1 7 7h.01c1.662.017 2.015 1.373 2.198 2.134.486-.981 1.304-2.058 2.797-2.075 1.531.018 2.28 1.153 2.731 2.141l.002-.008C14.944 8.424 15.327 7 16.979 7h.032A1 1 0 1 1 17 9h-.011c-.149.076-.256.474-.319.709a6.484 6.484 0 0 1-.311.951c-.429.973-.79 1.789-1.614 1.789"})]}),solid:Db("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",children:Db("path",{d:"M112.1 454.3c0 6.297 1.816 12.44 5.284 17.69l17.14 25.69c5.25 7.875 17.17 14.28 26.64 14.28h61.67c9.438 0 21.36-6.401 26.61-14.28l17.08-25.68c2.938-4.438 5.348-12.37 5.348-17.7L272 415.1h-160L112.1 454.3zM191.4 .0132C89.44 .3257 16 82.97 16 175.1c0 44.38 16.44 84.84 43.56 115.8c16.53 18.84 42.34 58.23 52.22 91.45c.0313 .25 .0938 .5166 .125 .7823h160.2c.0313-.2656 .0938-.5166 .125-.7823c9.875-33.22 35.69-72.61 52.22-91.45C351.6 260.8 368 220.4 368 175.1C368 78.61 288.9-.2837 191.4 .0132zM192 96.01c-44.13 0-80 35.89-80 79.1C112 184.8 104.8 192 96 192S80 184.8 80 176c0-61.76 50.25-111.1 112-111.1c8.844 0 16 7.159 16 16S200.8 96.01 192 96.01z"})})},people:{outline:Db("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[Db("path",{d:"M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0m0 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10"}),Db("path",{d:"M8 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 8 7M16 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 16 7M15.232 15c-.693 1.195-1.87 2-3.349 2-1.477 0-2.655-.805-3.347-2H15m3-2H6a6 6 0 1 0 12 0"})]}),solid:Db("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Db("path",{d:"M0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256zM256 432C332.1 432 396.2 382 415.2 314.1C419.1 300.4 407.8 288 393.6 288H118.4C104.2 288 92.92 300.4 96.76 314.1C115.8 382 179.9 432 256 432V432zM176.4 160C158.7 160 144.4 174.3 144.4 192C144.4 209.7 158.7 224 176.4 224C194 224 208.4 209.7 208.4 192C208.4 174.3 194 160 176.4 160zM336.4 224C354 224 368.4 209.7 368.4 192C368.4 174.3 354 160 336.4 160C318.7 160 304.4 174.3 304.4 192C304.4 209.7 318.7 224 336.4 224z"})})},places:{outline:Db("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[Db("path",{d:"M6.5 12C5.122 12 4 13.121 4 14.5S5.122 17 6.5 17 9 15.879 9 14.5 7.878 12 6.5 12m0 3c-.275 0-.5-.225-.5-.5s.225-.5.5-.5.5.225.5.5-.225.5-.5.5M17.5 12c-1.378 0-2.5 1.121-2.5 2.5s1.122 2.5 2.5 2.5 2.5-1.121 2.5-2.5-1.122-2.5-2.5-2.5m0 3c-.275 0-.5-.225-.5-.5s.225-.5.5-.5.5.225.5.5-.225.5-.5.5"}),Db("path",{d:"M22.482 9.494l-1.039-.346L21.4 9h.6c.552 0 1-.439 1-.992 0-.006-.003-.008-.003-.008H23c0-1-.889-2-1.984-2h-.642l-.731-1.717C19.262 3.012 18.091 2 16.764 2H7.236C5.909 2 4.738 3.012 4.357 4.283L3.626 6h-.642C1.889 6 1 7 1 8h.003S1 8.002 1 8.008C1 8.561 1.448 9 2 9h.6l-.043.148-1.039.346a2.001 2.001 0 0 0-1.359 2.097l.751 7.508a1 1 0 0 0 .994.901H3v1c0 1.103.896 2 2 2h2c1.104 0 2-.897 2-2v-1h6v1c0 1.103.896 2 2 2h2c1.104 0 2-.897 2-2v-1h1.096a.999.999 0 0 0 .994-.901l.751-7.508a2.001 2.001 0 0 0-1.359-2.097M6.273 4.857C6.402 4.43 6.788 4 7.236 4h9.527c.448 0 .834.43.963.857L19.313 9H4.688l1.585-4.143zM7 21H5v-1h2v1zm12 0h-2v-1h2v1zm2.189-3H2.811l-.662-6.607L3 11h18l.852.393L21.189 18z"})]}),solid:Db("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Db("path",{d:"M39.61 196.8L74.8 96.29C88.27 57.78 124.6 32 165.4 32H346.6C387.4 32 423.7 57.78 437.2 96.29L472.4 196.8C495.6 206.4 512 229.3 512 256V448C512 465.7 497.7 480 480 480H448C430.3 480 416 465.7 416 448V400H96V448C96 465.7 81.67 480 64 480H32C14.33 480 0 465.7 0 448V256C0 229.3 16.36 206.4 39.61 196.8V196.8zM109.1 192H402.9L376.8 117.4C372.3 104.6 360.2 96 346.6 96H165.4C151.8 96 139.7 104.6 135.2 117.4L109.1 192zM96 256C78.33 256 64 270.3 64 288C64 305.7 78.33 320 96 320C113.7 320 128 305.7 128 288C128 270.3 113.7 256 96 256zM416 320C433.7 320 448 305.7 448 288C448 270.3 433.7 256 416 256C398.3 256 384 270.3 384 288C384 305.7 398.3 320 416 320z"})})},symbols:{outline:Db("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:Db("path",{d:"M0 0h11v2H0zM4 11h3V6h4V4H0v2h4zM15.5 17c1.381 0 2.5-1.116 2.5-2.493s-1.119-2.493-2.5-2.493S13 13.13 13 14.507 14.119 17 15.5 17m0-2.986c.276 0 .5.222.5.493 0 .272-.224.493-.5.493s-.5-.221-.5-.493.224-.493.5-.493M21.5 19.014c-1.381 0-2.5 1.116-2.5 2.493S20.119 24 21.5 24s2.5-1.116 2.5-2.493-1.119-2.493-2.5-2.493m0 2.986a.497.497 0 0 1-.5-.493c0-.271.224-.493.5-.493s.5.222.5.493a.497.497 0 0 1-.5.493M22 13l-9 9 1.513 1.5 8.99-9.009zM17 11c2.209 0 4-1.119 4-2.5V2s.985-.161 1.498.949C23.01 4.055 23 6 23 6s1-1.119 1-3.135C24-.02 21 0 21 0h-2v6.347A5.853 5.853 0 0 0 17 6c-2.209 0-4 1.119-4 2.5s1.791 2.5 4 2.5M10.297 20.482l-1.475-1.585a47.54 47.54 0 0 1-1.442 1.129c-.307-.288-.989-1.016-2.045-2.183.902-.836 1.479-1.466 1.729-1.892s.376-.871.376-1.336c0-.592-.273-1.178-.818-1.759-.546-.581-1.329-.871-2.349-.871-1.008 0-1.79.293-2.344.879-.556.587-.832 1.181-.832 1.784 0 .813.419 1.748 1.256 2.805-.847.614-1.444 1.208-1.794 1.784a3.465 3.465 0 0 0-.523 1.833c0 .857.308 1.56.924 2.107.616.549 1.423.823 2.42.823 1.173 0 2.444-.379 3.813-1.137L8.235 24h2.819l-2.09-2.383 1.333-1.135zm-6.736-6.389a1.02 1.02 0 0 1 .73-.286c.31 0 .559.085.747.254a.849.849 0 0 1 .283.659c0 .518-.419 1.112-1.257 1.784-.536-.651-.805-1.231-.805-1.742a.901.901 0 0 1 .302-.669M3.74 22c-.427 0-.778-.116-1.057-.349-.279-.232-.418-.487-.418-.766 0-.594.509-1.288 1.527-2.083.968 1.134 1.717 1.946 2.248 2.438-.921.507-1.686.76-2.3.76"})}),solid:Db("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Db("path",{d:"M500.3 7.251C507.7 13.33 512 22.41 512 31.1V175.1C512 202.5 483.3 223.1 447.1 223.1C412.7 223.1 383.1 202.5 383.1 175.1C383.1 149.5 412.7 127.1 447.1 127.1V71.03L351.1 90.23V207.1C351.1 234.5 323.3 255.1 287.1 255.1C252.7 255.1 223.1 234.5 223.1 207.1C223.1 181.5 252.7 159.1 287.1 159.1V63.1C287.1 48.74 298.8 35.61 313.7 32.62L473.7 .6198C483.1-1.261 492.9 1.173 500.3 7.251H500.3zM74.66 303.1L86.5 286.2C92.43 277.3 102.4 271.1 113.1 271.1H174.9C185.6 271.1 195.6 277.3 201.5 286.2L213.3 303.1H239.1C266.5 303.1 287.1 325.5 287.1 351.1V463.1C287.1 490.5 266.5 511.1 239.1 511.1H47.1C21.49 511.1-.0019 490.5-.0019 463.1V351.1C-.0019 325.5 21.49 303.1 47.1 303.1H74.66zM143.1 359.1C117.5 359.1 95.1 381.5 95.1 407.1C95.1 434.5 117.5 455.1 143.1 455.1C170.5 455.1 191.1 434.5 191.1 407.1C191.1 381.5 170.5 359.1 143.1 359.1zM440.3 367.1H496C502.7 367.1 508.6 372.1 510.1 378.4C513.3 384.6 511.6 391.7 506.5 396L378.5 508C372.9 512.1 364.6 513.3 358.6 508.9C352.6 504.6 350.3 496.6 353.3 489.7L391.7 399.1H336C329.3 399.1 323.4 395.9 321 389.6C318.7 383.4 320.4 376.3 325.5 371.1L453.5 259.1C459.1 255 467.4 254.7 473.4 259.1C479.4 263.4 481.6 271.4 478.7 278.3L440.3 367.1zM116.7 219.1L19.85 119.2C-8.112 90.26-6.614 42.31 24.85 15.34C51.82-8.137 93.26-3.642 118.2 21.83L128.2 32.32L137.7 21.83C162.7-3.642 203.6-8.137 231.6 15.34C262.6 42.31 264.1 90.26 236.1 119.2L139.7 219.1C133.2 225.6 122.7 225.6 116.7 219.1H116.7z"})})}},search:{loupe:Db("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:Db("path",{d:"M12.9 14.32a8 8 0 1 1 1.41-1.41l5.35 5.33-1.42 1.42-5.33-5.34zM8 14A6 6 0 1 0 8 2a6 6 0 0 0 0 12z"})}),delete:Db("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:Db("path",{d:"M10 8.586L2.929 1.515 1.515 2.929 8.586 10l-7.071 7.071 1.414 1.414L10 11.414l7.071 7.071 1.414-1.414L11.414 10l7.071-7.071-1.414-1.414L10 8.586z"})})}};function Gb(e){let{id:t,skin:n,emoji:r}=e;if(e.shortcodes){const r=e.shortcodes.match(Rb.SHORTCODES_REGEX);r&&(t=r[1],r[2]&&(n=r[2]))}if(r||(r=Rb.get(t||e.native)),!r)return e.fallback;const i=r.skins[n-1]||r.skins[0],o=i.src||("native"==e.set||e.spritesheet?void 0:"function"==typeof e.getImageURL?e.getImageURL(e.set,i.unified):`https://cdn.jsdelivr.net/npm/emoji-datasource-${e.set}@14.0.0/img/${e.set}/64/${i.unified}.png`),s="function"==typeof e.getSpritesheetURL?e.getSpritesheetURL(e.set):`https://cdn.jsdelivr.net/npm/emoji-datasource-${e.set}@14.0.0/img/${e.set}/sheets-256/64.png`;return Db("span",{class:"emoji-mart-emoji","data-emoji-set":e.set,children:o?Db("img",{style:{height:e.size||"1em",width:"auto",display:"inline-block",position:"relative",top:".1em"},alt:i.native||i.shortcodes,src:o}):"native"==e.set?Db("span",{style:{fontSize:e.size,fontFamily:'"EmojiMart", "Segoe UI Emoji", "Segoe UI Symbol", "Segoe UI", "Apple Color Emoji", "Twemoji Mozilla", "Noto Color Emoji", "Android Emoji"'},children:i.native}):Db("span",{style:{display:"block",width:e.size,height:e.size,backgroundImage:`url(${s})`,backgroundSize:`${100*$b.sheet.cols}% ${100*$b.sheet.rows}%`,backgroundPosition:`${100/($b.sheet.cols-1)*i.x}% ${100/($b.sheet.rows-1)*i.y}%`}})})}const Zb="undefined"!=typeof window?window.HTMLElement:Object;class Jb extends Zb{static get observedAttributes(){return Object.keys(this.Props)}update(e={}){for(let t in e)this.attributeChangedCallback(t,null,e[t])}attributeChangedCallback(e,t,n){if(!this.component)return;const r=Kb(e,{[e]:n},this.constructor.Props,this);this.component.componentWillReceiveProps?this.component.componentWillReceiveProps({[e]:r}):(this.component.props[e]=r,this.component.forceUpdate())}constructor(e={}){if(super(),this.props=e,e.parent||e.ref){let t=null;const n=e.parent||(t=e.ref&&e.ref.current);t&&(t.innerHTML=""),n&&n.appendChild(this)}}}class Xb extends Jb{setShadow(){this.attachShadow({mode:"open"})}injectStyles(e){if(!e)return;const t=document.createElement("style");t.textContent=e,this.shadowRoot.insertBefore(t,this.shadowRoot.firstChild)}constructor(e,{styles:t}={}){super(e),this.setShadow(),this.injectStyles(t)}}var ey={fallback:"",id:"",native:"",shortcodes:"",size:"",set:Ob.set,skin:Ob.skin};class ty extends Jb{async connectedCallback(){const e=Yb(this.props,ey,this);e.element=this,e.ref=e=>{this.component=e},await qb(),kb(Db(Gb,{...e}),this)}constructor(e){super(e)}}Vg(ty,"Props",ey),"undefined"==typeof customElements||customElements.get("em-emoji")||customElements.define("em-emoji",ty);var ny,ry=[],iy=Yg.__b,oy=Yg.__r,sy=Yg.diffed,ay=Yg.__c,ly=Yg.unmount;function cy(){var e;for(ry.sort((function(e,t){return e.__v.__b-t.__v.__b}));e=ry.pop();)if(e.__P)try{e.__H.__h.forEach(dy),e.__H.__h.forEach(py),e.__H.__h=[]}catch(t){e.__H.__h=[],Yg.__e(t,e.__v)}}Yg.__b=function(e){iy&&iy(e)},Yg.__r=function(e){oy&&oy(e);var t=e.__c.__H;t&&(t.__h.forEach(dy),t.__h.forEach(py),t.__h=[])},Yg.diffed=function(e){sy&&sy(e);var t=e.__c;t&&t.__H&&t.__H.__h.length&&(1!==ry.push(t)&&ny===Yg.requestAnimationFrame||((ny=Yg.requestAnimationFrame)||function(e){var t,n=function(){clearTimeout(r),uy&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);uy&&(t=requestAnimationFrame(n))})(cy))},Yg.__c=function(e,t){t.some((function(e){try{e.__h.forEach(dy),e.__h=e.__h.filter((function(e){return!e.__||py(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],Yg.__e(n,e.__v)}})),ay&&ay(e,t)},Yg.unmount=function(e){ly&&ly(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{dy(e)}catch(e){t=e}})),t&&Yg.__e(t,n.__v))};var uy="function"==typeof requestAnimationFrame;function dy(e){var t=e.__c;"function"==typeof t&&(e.__c=void 0,t())}function py(e){e.__c=e.__()}function hy(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function fy(e){this.props=e}(fy.prototype=new sb).isPureReactComponent=!0,fy.prototype.shouldComponentUpdate=function(e,t){return hy(this.props,e)||hy(this.state,t)};var my=Yg.__b;Yg.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),my&&my(e)};var gy=Yg.__e;Yg.__e=function(e,t,n){if(e.then)for(var r,i=t;i=i.__;)if((r=i.__c)&&r.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),r.__c(e,t);gy(e,t,n)};var by=Yg.unmount;function yy(){this.__u=0,this.t=null,this.__b=null}function vy(e){var t=e.__.__c;return t&&t.__e&&t.__e(e)}function wy(){this.u=null,this.o=null}Yg.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),by&&by(e)},(yy.prototype=new sb).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var i=vy(r.__v),o=!1,s=function(){o||(o=!0,n.__R=null,i?i(a):a())};n.__R=s;var a=function(){if(!--r.__u){if(r.state.__e){var e=r.state.__e;r.__v.__k[0]=function e(t,n,r){return t&&(t.__v=null,t.__k=t.__k&&t.__k.map((function(t){return e(t,n,r)})),t.__c&&t.__c.__P===n&&(t.__e&&r.insertBefore(t.__e,t.__d),t.__c.__e=!0,t.__c.__P=r)),t}(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__e:r.__b=null});t=r.t.pop();)t.forceUpdate()}},l=!0===t.__h;r.__u++||l||r.setState({__e:r.__b=r.__v.__k[0]}),e.then(s,s)},yy.prototype.componentWillUnmount=function(){this.t=[]},yy.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=function e(t,n,r){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),t.__c.__H=null),null!=(t=function(e,t){for(var n in t)e[n]=t[n];return e}({},t)).__c&&(t.__c.__P===r&&(t.__c.__P=n),t.__c=null),t.__k=t.__k&&t.__k.map((function(t){return e(t,n,r)}))),t}(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__e&&rb(ob,null,e.fallback);return i&&(i.__h=null),[rb(ob,null,t.__e?null:e.children),i]};var xy=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};(wy.prototype=new sb).__e=function(e){var t=this,n=vy(t.__v),r=t.o.get(e);return r[0]++,function(i){var o=function(){t.props.revealOrder?(r.push(i),xy(t,e,r)):i()};n?n(o):o()}},wy.prototype.render=function(e){this.u=null,this.o=new Map;var t=hb(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},wy.prototype.componentDidUpdate=wy.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){xy(e,n,t)}))};var Ey="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,My=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,ky="undefined"!=typeof document,_y=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};sb.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(sb.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var Dy=Yg.event;function Cy(){}function Oy(){return this.cancelBubble}function Ny(){return this.defaultPrevented}Yg.event=function(e){return Dy&&(e=Dy(e)),e.persist=Cy,e.isPropagationStopped=Oy,e.isDefaultPrevented=Ny,e.nativeEvent=e};var Ty={configurable:!0,get:function(){return this.class}},Sy=Yg.vnode;Yg.vnode=function(e){var t=e.type,n=e.props,r=n;if("string"==typeof t){var i=-1===t.indexOf("-");for(var o in r={},n){var s=n[o];ky&&"children"===o&&"noscript"===t||"value"===o&&"defaultValue"in n&&null==s||("defaultValue"===o&&"value"in n&&null==n.value?o="value":"download"===o&&!0===s?s="":/ondoubleclick/i.test(o)?o="ondblclick":/^onchange(textarea|input)/i.test(o+t)&&!_y(n.type)?o="oninput":/^onfocus$/i.test(o)?o="onfocusin":/^onblur$/i.test(o)?o="onfocusout":/^on(Ani|Tra|Tou|BeforeInp)/.test(o)?o=o.toLowerCase():i&&My.test(o)?o=o.replace(/[A-Z0-9]/,"-$&").toLowerCase():null===s&&(s=void 0),r[o]=s)}"select"==t&&r.multiple&&Array.isArray(r.value)&&(r.value=hb(n.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==t&&null!=r.defaultValue&&(r.value=hb(n.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),e.props=r,n.class!=n.className&&(Ty.enumerable="className"in n,null!=n.className&&(r.class=n.className),Object.defineProperty(r,"className",Ty))}e.$$typeof=Ey,Sy&&Sy(e)};var Ay=Yg.__r;Yg.__r=function(e){Ay&&Ay(e),e.__c};const Iy={light:"outline",dark:"solid"};class Ly extends fy{renderIcon(e){const{icon:t}=e;if(t){if(t.svg)return Db("span",{class:"flex",dangerouslySetInnerHTML:{__html:t.svg}});if(t.src)return Db("img",{src:t.src})}const n=Qb.categories[e.id]||Qb.categories.custom;return n["auto"==this.props.icons?Iy[this.props.theme]:this.props.icons]||n}render(){let e=null;return Db("nav",{id:"nav",class:"padding","data-position":this.props.position,children:Db("div",{class:"flex relative",children:[this.categories.map(((t,n)=>{const r=t.name||Ub.categories[t.id],i=!this.props.unfocused&&t.id==this.state.categoryId;return i&&(e=n),Db("button",{"aria-label":r,"aria-selected":i||void 0,title:r,type:"button",class:"flex flex-grow flex-center",onMouseDown:e=>e.preventDefault(),onClick:()=>{this.props.onClick({category:t,i:n})},children:this.renderIcon(t)})})),Db("div",{class:"bar",style:{width:`${100/this.categories.length}%`,opacity:null==e?0:1,transform:`translateX(${100*e}%)`}})]})})}constructor(){super(),this.categories=$b.categories.filter((e=>!e.target)),this.state={categoryId:this.categories[0].id}}}class jy extends fy{shouldComponentUpdate(e){for(let t in e)if("children"!=t&&e[t]!=this.props[t])return!0;return!1}render(){return this.props.children}}const zy=10;class Fy extends sb{getInitialState(e=this.props){return{skin:Nb.get("skin")||e.skin,theme:this.initTheme(e.theme)}}componentWillMount(){this.observers=[],this.dir=Ub.rtl?"rtl":"ltr",this.refs={menu:{current:null},navigation:{current:null},scroll:{current:null},search:{current:null},searchInput:{current:null},skinToneButton:{current:null},skinToneRadio:{current:null}},this.initGrid(),0==this.props.stickySearch&&"sticky"==this.props.searchPosition&&(console.warn("[EmojiMart] Deprecation warning: `stickySearch` has been renamed `searchPosition`."),this.props.searchPosition="static")}componentDidMount(){if(this.register(),this.shadowRoot=this.base.parentNode,this.props.autoFocus){const{searchInput:e}=this.refs;e.current&&e.current.focus()}}componentWillReceiveProps(e){let t=null;for(const n in e)this.props[n]=e[n],"custom"===n||"categories"===n?this.reset():n in this.state&&(t||(t=this.getInitialState()),this.setState({[n]:t[n]}))}componentWillUnmount(){this.unregister()}reset(){qb(this.props),this.initGrid(),this.unobserve(),this.forceUpdate((()=>{this.observeCategories(),this.observeRows()}))}register(){document.addEventListener("click",this.handleClickOutside),this.observe()}unregister(){document.removeEventListener("click",this.handleClickOutside),this.unobserve()}observe(){this.observeCategories(),this.observeRows()}unobserve(){for(const e of this.observers)e.disconnect()}initGrid(){const{categories:e}=$b;this.refs.categories=new Map;const t=$b.categories.map((e=>e.id)).join(",");this.navKey&&this.navKey!=t&&this.refs.scroll.current&&(this.refs.scroll.current.scrollTop=0),this.navKey=t,this.grid=[],this.grid.setsize=0;const n=(e,t)=>{const n=[];n.__categoryId=t.id,n.__index=e.length,this.grid.push(n);const r=this.grid.length-1,i=r%zy?{}:{current:null};return i.index=r,i.posinset=this.grid.setsize+1,e.push(i),n};for(let t of e){const e=[];let r=n(e,t);for(let i of t.emojis)r.length==this.props.perLine&&(r=n(e,t)),this.grid.setsize+=1,r.push(i);this.refs.categories.set(t.id,{root:{current:null},rows:e})}}initTheme(e){if("auto"!=e)return e;if(!this.darkMedia){if(this.darkMedia=matchMedia("(prefers-color-scheme: dark)"),this.darkMedia.media.match(/^not/))return"light";this.darkMedia.addListener((()=>{"auto"==this.props.theme&&this.setState({theme:this.darkMedia.matches?"dark":"light"})}))}return this.darkMedia.matches?"dark":"light"}getEmojiByPos([e,t]){const n=this.state.searchResults||this.grid,r=n[e]&&n[e][t];if(r)return Rb.get(r)}observeCategories(){const e=this.refs.navigation.current;if(!e)return;const t=new Map,n=t=>{t!=e.state.categoryId&&e.setState({categoryId:t})},r={root:this.refs.scroll.current,threshold:[0,1]},i=new IntersectionObserver((e=>{for(const n of e){const e=n.target.dataset.id;t.set(e,n.intersectionRatio)}const r=[...t],i=r[r.length-1];if(1==i[1])return n(i[0]);for(const[e,t]of r)if(t){n(e);break}}),r);for(const{root:e}of this.refs.categories.values())i.observe(e.current);this.observers.push(i)}observeRows(){const e={...this.state.visibleRows},t=new IntersectionObserver((t=>{for(const n of t){const t=parseInt(n.target.dataset.index);n.isIntersecting?e[t]=!0:delete e[t]}this.setState({visibleRows:e})}),{root:this.refs.scroll.current,rootMargin:`${this.props.emojiButtonSize*(zy+5)}px 0px ${this.props.emojiButtonSize*zy}px`});for(const{rows:e}of this.refs.categories.values())for(const n of e)n.current&&t.observe(n.current);this.observers.push(t)}preventDefault(e){e.preventDefault()}unfocusSearch(){const e=this.refs.searchInput.current;e&&e.blur()}navigate({e:e,input:t,left:n,right:r,up:i,down:o}){const s=this.state.searchResults||this.grid;if(!s.length)return;let[a,l]=this.state.pos;const c=(()=>{if(0==a&&0==l&&!e.repeat&&(n||i))return null;if(-1==a)return e.repeat||!r&&!o||t.selectionStart!=t.value.length?null:[0,0];if(n||r){let e=s[a];const t=n?-1:1;if(l+=t,!e[l]){if(a+=t,e=s[a],!e)return a=n?0:s.length-1,l=n?0:s[a].length-1,[a,l];l=n?e.length-1:0}return[a,l]}if(i||o){a+=i?-1:1;const e=s[a];return e?(e[l]||(l=e.length-1),[a,l]):(a=i?0:s.length-1,l=i?0:s[a].length-1,[a,l])}})();c?(e.preventDefault(),this.setState({pos:c,keyboard:!0},(()=>{this.scrollTo({row:c[0]})}))):this.state.pos[0]>-1&&this.setState({pos:[-1,-1]})}scrollTo({categoryId:e,row:t}){const n=this.state.searchResults||this.grid;if(!n.length)return;const r=this.refs.scroll.current,i=r.getBoundingClientRect();let o=0;if(t>=0&&(e=n[t].__categoryId),e){o=(this.refs[e]||this.refs.categories.get(e).root).current.getBoundingClientRect().top-(i.top-r.scrollTop)+1}if(t>=0)if(t){const e=o+n[t].__index*this.props.emojiButtonSize,s=e+this.props.emojiButtonSize+.88*this.props.emojiButtonSize;if(e<r.scrollTop)o=e;else{if(!(s>r.scrollTop+i.height))return;o=s-i.height}}else o=0;this.ignoreMouse(),r.scrollTop=o}ignoreMouse(){this.mouseIsIgnored=!0,clearTimeout(this.ignoreMouseTimer),this.ignoreMouseTimer=setTimeout((()=>{delete this.mouseIsIgnored}),100)}handleEmojiOver(e){this.mouseIsIgnored||this.state.showSkins||this.setState({pos:e||[-1,-1],keyboard:!1})}handleEmojiClick({emoji:e,pos:t}){if(this.props.onEmojiSelect&&(!e&&t&&(e=this.getEmojiByPos(t)),e)){const t=e.skins[this.state.skin-1]||e.skins[0],n={id:e.id,name:e.name,native:t.native,unified:t.unified,keywords:e.keywords,shortcodes:t.shortcodes||e.shortcodes};t.src&&(n.src=t.src),e.aliases&&e.aliases.length&&(n.aliases=e.aliases),e.emoticons&&e.emoticons.length&&(n.emoticons=e.emoticons),this.props.maxFrequentRows&&Fb.add(n,this.props),this.props.onEmojiSelect(n)}}closeSkins(){this.state.showSkins&&(this.setState({showSkins:null,tempSkin:null}),this.base.removeEventListener("click",this.handleBaseClick),this.base.removeEventListener("keydown",this.handleBaseKeydown))}handleSkinMouseOver(e){this.setState({tempSkin:e})}handleSkinClick(e){this.ignoreMouse(),this.closeSkins(),this.setState({skin:e,tempSkin:null}),Nb.set("skin",e)}renderNav(){return Db(Ly,{ref:this.refs.navigation,icons:this.props.icons,theme:this.state.theme,unfocused:!!this.state.searchResults,position:this.props.navPosition,onClick:this.handleCategoryClick},this.navKey)}renderPreview(){const e=this.getEmojiByPos(this.state.pos),t=this.state.searchResults&&!this.state.searchResults.length;return Db("div",{id:"preview",class:"flex flex-middle",dir:this.dir,"data-position":this.props.previewPosition,children:[Db("div",{class:"flex flex-middle flex-grow",children:[Db("div",{class:"flex flex-auto flex-middle flex-center",style:{height:this.props.emojiButtonSize,fontSize:this.props.emojiButtonSize},children:Db(Gb,{emoji:e,id:t?this.props.noResultsEmoji||"cry":this.props.previewEmoji||("top"==this.props.previewPosition?"point_down":"point_up"),set:this.props.set,size:this.props.emojiButtonSize,skin:this.state.tempSkin||this.state.skin,spritesheet:!0,getSpritesheetURL:this.props.getSpritesheetURL})}),Db("div",{class:`margin-${this.dir[0]}`,children:Db("div",e?{class:`padding-${this.dir[2]} align-${this.dir[0]}`,children:[Db("div",{class:"ellipsis",style:{fontSize:"1.1em"},children:e.name}),Db("div",{class:"ellipsis color-c",style:{fontSize:".9em"},children:e.skins[0].shortcodes})]}:t?{class:`padding-${this.dir[2]} align-${this.dir[0]}`,children:[Db("div",{class:"ellipsis",style:{fontSize:"1.1em"},children:Ub.search_no_results_1}),Db("div",{class:"ellipsis color-c",style:{fontSize:".9em"},children:Ub.search_no_results_2})]}:{class:"color-c",style:{fontSize:21},children:Ub.pick})})]}),!e&&"preview"==this.props.skinTonePosition&&this.renderSkinToneButton()]})}renderEmojiButton(e,{pos:t,posinset:n,grid:r}){const i=this.props.emojiButtonSize,o=this.state.tempSkin||this.state.skin,s=(e.skins[o-1]||e.skins[0]).native,a=function(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===t.length&&e.every(((e,n)=>e==t[n]))}(this.state.pos,t),l=t.concat(e.id).join("");return Db(jy,{selected:a,skin:o,size:i,children:Db("button",{"aria-label":s,"aria-selected":a||void 0,"aria-posinset":n,"aria-setsize":r.setsize,"data-keyboard":this.state.keyboard,title:"none"==this.props.previewPosition?e.name:void 0,type:"button",class:"flex flex-center flex-middle",tabindex:"-1",onClick:()=>this.handleEmojiClick({emoji:e}),onMouseEnter:()=>this.handleEmojiOver(t),onMouseLeave:()=>this.handleEmojiOver(),style:{width:this.props.emojiButtonSize,height:this.props.emojiButtonSize,fontSize:this.props.emojiSize,lineHeight:0},children:[Db("div",{"aria-hidden":"true",class:"background",style:{borderRadius:this.props.emojiButtonRadius,backgroundColor:this.props.emojiButtonColors?this.props.emojiButtonColors[(n-1)%this.props.emojiButtonColors.length]:void 0}}),Db(Gb,{emoji:e,set:this.props.set,size:this.props.emojiSize,skin:o,spritesheet:!0,getSpritesheetURL:this.props.getSpritesheetURL})]})},l)}renderSearch(){const e="none"==this.props.previewPosition||"search"==this.props.skinTonePosition;return Db("div",{children:[Db("div",{class:"spacer"}),Db("div",{class:"flex flex-middle",children:[e&&"rtl"==this.dir&&this.renderSkinToneButton(),Db("div",{class:"search relative flex-grow",children:[Db("input",{type:"search",ref:this.refs.searchInput,placeholder:Ub.search,onClick:this.handleSearchClick,onInput:this.handleSearchInput,onKeyDown:this.handleSearchKeyDown}),Db("span",{class:"icon loupe flex",children:Qb.search.loupe}),this.state.searchResults&&Db("button",{title:"Clear","aria-label":"Clear",type:"button",class:"icon delete flex",onClick:this.clearSearch,onMouseDown:this.preventDefault,children:Qb.search.delete})]}),e&&"ltr"==this.dir&&this.renderSkinToneButton()]})]})}renderSearchResults(){const{searchResults:e}=this.state;return e?Db("div",{class:"category",ref:this.refs.search,children:[Db("div",{class:`sticky padding-small align-${this.dir[0]}`,children:Ub.categories.search}),Db("div",{children:e.length?e.map(((t,n)=>Db("div",{class:"flex",children:t.map(((t,r)=>this.renderEmojiButton(t,{pos:[n,r],posinset:n*this.props.perLine+r+1,grid:e})))}))):Db("div",{class:`padding-small align-${this.dir[0]}`,children:this.props.onAddCustomEmoji&&Db("a",{onClick:this.props.onAddCustomEmoji,children:Ub.add_custom})})})]}):null}renderCategories(){const{categories:e}=$b,t=!!this.state.searchResults;return Db("div",{style:{visibility:t?"hidden":void 0,display:t?"none":void 0},children:e.map((e=>{const{root:t,rows:n}=this.refs.categories.get(e.id);return Db("div",{"data-id":e.target?e.target.id:e.id,class:"category",ref:t,children:[Db("div",{class:`sticky padding-small align-${this.dir[0]}`,children:e.name||Ub.categories[e.id]}),Db("div",{class:"relative",style:{height:n.length*this.props.emojiButtonSize},children:n.map(((t,n)=>{const r=t.index-t.index%zy,i=this.state.visibleRows[r],o="current"in t?t:void 0;if(!i&&!o)return null;const s=n*this.props.perLine,a=s+this.props.perLine,l=e.emojis.slice(s,a);return Db("div",{"data-index":t.index,ref:o,class:"flex row",style:{top:n*this.props.emojiButtonSize},children:i&&l.map(((e,n)=>{const r=Rb.get(e);return this.renderEmojiButton(r,{pos:[t.index,n],posinset:t.posinset+n,grid:this.grid})}))},t.index)}))})]})}))})}renderSkinToneButton(){return"none"==this.props.skinTonePosition?null:Db("div",{class:"flex flex-auto flex-center flex-middle",style:{position:"relative",width:this.props.emojiButtonSize,height:this.props.emojiButtonSize},children:Db("button",{type:"button",ref:this.refs.skinToneButton,class:"skin-tone-button flex flex-auto flex-center flex-middle","aria-selected":this.state.showSkins?"":void 0,"aria-label":Ub.skins.choose,title:Ub.skins.choose,onClick:this.openSkins,style:{width:this.props.emojiSize,height:this.props.emojiSize},children:Db("span",{class:`skin-tone skin-tone-${this.state.skin}`})})})}renderSkins(){const e=this.refs.skinToneButton.current.getBoundingClientRect(),t=this.base.getBoundingClientRect(),n={};return"ltr"==this.dir?n.right=t.right-e.right-3:n.left=e.left-t.left-3,"bottom"==this.props.previewPosition&&"preview"==this.props.skinTonePosition?n.bottom=t.bottom-e.top+6:(n.top=e.bottom-t.top+3,n.bottom="auto"),Db("div",{ref:this.refs.menu,role:"radiogroup",dir:this.dir,"aria-label":Ub.skins.choose,class:"menu hidden","data-position":n.top?"top":"bottom",style:n,children:[...Array(6).keys()].map((e=>{const t=e+1,n=this.state.skin==t;return Db("div",{children:[Db("input",{type:"radio",name:"skin-tone",value:t,"aria-label":Ub.skins[t],ref:n?this.refs.skinToneRadio:null,defaultChecked:n,onChange:()=>this.handleSkinMouseOver(t),onKeyDown:e=>{"Enter"!=e.code&&"Space"!=e.code&&"Tab"!=e.code||(e.preventDefault(),this.handleSkinClick(t))}}),Db("button",{"aria-hidden":"true",tabindex:"-1",onClick:()=>this.handleSkinClick(t),onMouseEnter:()=>this.handleSkinMouseOver(t),onMouseLeave:()=>this.handleSkinMouseOver(),class:"option flex flex-grow flex-middle",children:[Db("span",{class:`skin-tone skin-tone-${t}`}),Db("span",{class:"margin-small-lr",children:Ub.skins[t]})]})]})}))})}render(){return Db("section",{id:"root",class:"flex flex-column",style:{width:this.props.perLine*this.props.emojiButtonSize+28},"data-emoji-set":this.props.set,"data-theme":this.state.theme,"data-menu":this.state.showSkins?"":void 0,children:["top"==this.props.previewPosition&&this.renderPreview(),"top"==this.props.navPosition&&this.renderNav(),"sticky"==this.props.searchPosition&&Db("div",{class:"padding-lr",children:this.renderSearch()}),Db("div",{ref:this.refs.scroll,class:"scroll flex-grow padding-lr",children:Db("div",{style:{width:this.props.perLine*this.props.emojiButtonSize},children:["static"==this.props.searchPosition&&this.renderSearch(),this.renderSearchResults(),this.renderCategories(),Db("div",{class:"spacer"})]})}),"bottom"==this.props.navPosition&&this.renderNav(),"bottom"==this.props.previewPosition&&this.renderPreview(),this.state.showSkins&&this.renderSkins()]})}constructor(e){super(),Vg(this,"handleClickOutside",(e=>{const{element:t}=this.props;e.target!=t&&(this.state.showSkins&&this.closeSkins(),this.props.onClickOutside&&this.props.onClickOutside())})),Vg(this,"handleBaseClick",(e=>{this.state.showSkins&&(e.target.closest(".menu")||(e.preventDefault(),e.stopImmediatePropagation(),this.closeSkins()))})),Vg(this,"handleBaseKeydown",(e=>{this.state.showSkins&&"Escape"==e.key&&(e.preventDefault(),e.stopImmediatePropagation(),this.closeSkins())})),Vg(this,"handleSearchClick",(()=>{this.getEmojiByPos(this.state.pos)&&this.setState({pos:[-1,-1]})})),Vg(this,"handleSearchInput",(async()=>{const e=this.refs.searchInput.current;if(!e)return;const{value:t}=e,n=await Rb.search(t),r=()=>{this.refs.scroll.current&&(this.refs.scroll.current.scrollTop=0)};if(!n)return this.setState({searchResults:n,pos:[-1,-1]},r);const i=e.selectionStart==e.value.length?[0,0]:[-1,-1],o=[];o.setsize=n.length;let s=null;for(let e of n)o.length&&s.length!=this.props.perLine||(s=[],s.__categoryId="search",s.__index=o.length,o.push(s)),s.push(e);this.ignoreMouse(),this.setState({searchResults:o,pos:i},r)})),Vg(this,"handleSearchKeyDown",(e=>{const t=e.currentTarget;switch(e.stopImmediatePropagation(),e.key){case"ArrowLeft":this.navigate({e:e,input:t,left:!0});break;case"ArrowRight":this.navigate({e:e,input:t,right:!0});break;case"ArrowUp":this.navigate({e:e,input:t,up:!0});break;case"ArrowDown":this.navigate({e:e,input:t,down:!0});break;case"Enter":e.preventDefault(),this.handleEmojiClick({pos:this.state.pos});break;case"Escape":e.preventDefault(),this.state.searchResults?this.clearSearch():this.unfocusSearch()}})),Vg(this,"clearSearch",(()=>{const e=this.refs.searchInput.current;e&&(e.value="",e.focus(),this.handleSearchInput())})),Vg(this,"handleCategoryClick",(({category:e,i:t})=>{this.scrollTo(0==t?{row:-1}:{categoryId:e.id})})),Vg(this,"openSkins",(e=>{const{currentTarget:t}=e,n=t.getBoundingClientRect();this.setState({showSkins:n},(async()=>{await async function(e=1){for(let t in[...Array(e).keys()])await new Promise(requestAnimationFrame)}(2);const e=this.refs.menu.current;e&&(e.classList.remove("hidden"),this.refs.skinToneRadio.current.focus(),this.base.addEventListener("click",this.handleBaseClick,!0),this.base.addEventListener("keydown",this.handleBaseKeydown,!0))}))})),this.state={pos:[-1,-1],visibleRows:{0:!0},...this.getInitialState(e)}}}class Py extends Xb{async connectedCallback(){const e=Yb(this.props,Ob,this);e.element=this,e.ref=e=>{this.component=e},await qb(e),kb(Db(Fy,{...e}),this.shadowRoot)}disconnectedCallback(){this.component&&this.component.unregister()}constructor(e){super(e,{styles:Wg(Ry)})}}Vg(Py,"Props",Ob),"undefined"==typeof customElements||customElements.get("em-emoji-picker")||customElements.define("em-emoji-picker",Py);var Ry={};Ry=':host {\n display: flex;\n width: -webkit-min-content;\n width: -moz-min-content;\n width: min-content;\n height: 435px;\n min-height: 230px;\n border-radius: var(--border-radius);\n box-shadow: var(--shadow);\n --border-radius: 10px;\n --category-icon-size: 18px;\n --font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;\n --font-size: 15px;\n --shadow-color: 0deg 0% 0%;\n --shadow:\n 0.3px 0.5px 2.7px hsl(var(--shadow-color) / 0.14),\n 0.4px 0.8px 1px -3.2px hsl(var(--shadow-color) / 0.14),\n 1px 2px 2.5px -4.5px hsl(var(--shadow-color) / 0.14);\n}\n\n[data-theme=light] {\n --em-rgb-color: var(--rgb-color, 34, 36, 39);\n --em-rgb-accent: var(--rgb-accent, 34, 102, 237);\n --em-rgb-background: var(--rgb-background, 255, 255, 255);\n --em-rgb-input: var(--rgb-input, 255, 255, 255);\n --em-color-border: var(--color-border, rgba(0, 0, 0, .05));\n --em-color-border-over: var(--color-border-over, rgba(0, 0, 0, .1));\n}\n\n[data-theme=dark] {\n --em-rgb-color: var(--rgb-color, 222, 222, 221);\n --em-rgb-accent: var(--rgb-accent, 58, 130, 247);\n --em-rgb-background: var(--rgb-background, 21, 22, 23);\n --em-rgb-input: var(--rgb-input, 0, 0, 0);\n --em-color-border: var(--color-border, rgba(255, 255, 255, .1));\n --em-color-border-over: var(--color-border-over, rgba(255, 255, 255, .2));\n}\n\n#root {\n --color-a: rgb(var(--em-rgb-color));\n --color-b: rgba(var(--em-rgb-color), .65);\n --color-c: rgba(var(--em-rgb-color), .45);\n --padding: 12px;\n --padding-small: calc(var(--padding) / 2);\n --sidebar-width: 16px;\n --duration: 225ms;\n --duration-fast: 125ms;\n --duration-instant: 50ms;\n --easing: cubic-bezier(.4, .0, .2, 1);\n position: relative;\n width: 100%;\n text-align: left;\n border-radius: var(--border-radius);\n background-color: rgb(var(--em-rgb-background));\n}\n\n@media (prefers-reduced-motion) {\n #root {\n --duration: 0;\n --duration-fast: 0;\n --duration-instant: 0;\n }\n}\n\n#root[data-menu] button {\n cursor: auto;\n}\n\n#root[data-menu] .menu button {\n cursor: pointer;\n}\n\n:host, #root, input, button {\n color: rgb(var(--em-rgb-color));\n font-family: var(--font-family);\n font-size: var(--font-size);\n line-height: normal;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n*, *:before, *:after {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n min-width: 0;\n}\n\n.relative {\n position: relative;\n}\n\n.flex {\n display: flex;\n}\n\n.flex-auto {\n flex: 0 0 auto;\n}\n\n.flex-center {\n justify-content: center;\n}\n\n.flex-column {\n flex-direction: column;\n}\n\n.flex-grow {\n flex: 1 1 auto;\n}\n\n.flex-middle {\n align-items: center;\n}\n\n.flex-wrap {\n flex-wrap: wrap;\n}\n\n.padding {\n padding: var(--padding);\n}\n\n.padding-t {\n padding-top: var(--padding);\n}\n\n.padding-lr {\n padding-left: var(--padding);\n padding-right: var(--padding);\n}\n\n.padding-r {\n padding-right: var(--padding);\n}\n\n.padding-small {\n padding: var(--padding-small);\n}\n\n.padding-small-b {\n padding-bottom: var(--padding-small);\n}\n\n.padding-small-lr {\n padding-left: var(--padding-small);\n padding-right: var(--padding-small);\n}\n\n.margin {\n margin: var(--padding);\n}\n\n.margin-r {\n margin-right: var(--padding);\n}\n\n.margin-l {\n margin-left: var(--padding);\n}\n\n.margin-small-l {\n margin-left: var(--padding-small);\n}\n\n.margin-small-lr {\n margin-left: var(--padding-small);\n margin-right: var(--padding-small);\n}\n\n.align-l {\n text-align: left;\n}\n\n.align-r {\n text-align: right;\n}\n\n.color-a {\n color: var(--color-a);\n}\n\n.color-b {\n color: var(--color-b);\n}\n\n.color-c {\n color: var(--color-c);\n}\n\n.ellipsis {\n white-space: nowrap;\n max-width: 100%;\n width: auto;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\na {\n cursor: pointer;\n color: rgb(var(--em-rgb-accent));\n}\n\na:hover {\n text-decoration: underline;\n}\n\n.spacer {\n height: 10px;\n}\n\n.scroll {\n overflow: auto;\n overflow-x: hidden;\n padding-right: 0;\n}\n\n.scroll::-webkit-scrollbar {\n width: var(--sidebar-width);\n height: var(--sidebar-width);\n}\n\n.scroll::-webkit-scrollbar-track {\n border: 0;\n}\n\n.scroll::-webkit-scrollbar-button {\n width: 0;\n height: 0;\n display: none;\n}\n\n.scroll::-webkit-scrollbar-corner {\n background-color: transparent;\n}\n\n.scroll::-webkit-scrollbar-thumb {\n min-height: 20%;\n min-height: 65px;\n border: 4px solid rgb(var(--em-rgb-background));\n border-radius: 8px;\n}\n\n.scroll::-webkit-scrollbar-thumb:hover {\n background-color: var(--em-color-border-over) !important;\n}\n\n.scroll:hover::-webkit-scrollbar-thumb {\n background-color: var(--em-color-border);\n}\n\n.sticky {\n position: -webkit-sticky;\n position: sticky;\n z-index: 1;\n top: -1px;\n font-weight: 500;\n background-color: rgba(var(--em-rgb-background), 0.9);\n -webkit-backdrop-filter: blur(4px);\n backdrop-filter: blur(4px);\n}\n\n.search {\n z-index: 2;\n position: relative;\n}\n\n.search input, .search button {\n font-size: calc(var(--font-size) - 1px);\n}\n\n.search input[type=search] {\n display: block;\n border: 0;\n outline: 0;\n width: 100%;\n padding: 10px 2em 10px 2.2em;\n border-radius: 10px;\n background-color: var(--em-color-border);\n transition-duration: var(--duration);\n transition-property: background-color, box-shadow;\n transition-timing-function: var(--easing);\n}\n\n.search input[type=search]::-moz-placeholder {\n color: inherit;\n opacity: 0.6;\n}\n\n.search input[type=search]:-ms-input-placeholder {\n color: inherit;\n opacity: 0.6;\n}\n\n.search input[type=search]::placeholder {\n color: inherit;\n opacity: 0.6;\n}\n\n.search input[type=search], .search input[type=search]::-webkit-search-decoration, .search input[type=search]::-webkit-search-cancel-button, .search input[type=search]::-webkit-search-results-button, .search input[type=search]::-webkit-search-results-decoration {\n -webkit-appearance: none;\n appearance: none;\n}\n\n.search input[type=search]:focus {\n background-color: rgb(var(--em-rgb-input));\n box-shadow: inset 0 0 0 1px rgb(var(--em-rgb-accent)), 0 1px 3px rgba(65, 69, 73, 0.2);\n}\n\n.search .icon {\n z-index: 1;\n position: absolute;\n top: 50%;\n color: rgba(var(--em-rgb-color), 0.7);\n transform: translateY(-50%);\n}\n\n.search .loupe {\n left: 0.7em;\n pointer-events: none;\n}\n\n.search .delete {\n right: 0.7em;\n}\n\nsvg {\n fill: currentColor;\n width: 1em;\n height: 1em;\n}\n\nbutton {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n cursor: pointer;\n color: currentColor;\n border: 0;\n background-color: transparent;\n}\n\n#nav {\n z-index: 2;\n position: relative;\n padding-top: 12px;\n padding-bottom: 12px;\n padding-right: var(--sidebar-width);\n}\n\n#nav button {\n color: var(--color-b);\n transition: color var(--duration) var(--easing);\n}\n\n#nav button:hover {\n color: var(--color-a);\n}\n\n#nav svg, #nav img {\n width: var(--category-icon-size);\n height: var(--category-icon-size);\n}\n\n#nav .bar {\n position: absolute;\n bottom: -12px;\n left: 0;\n width: 100%;\n height: 3px;\n background-color: rgb(var(--em-rgb-accent));\n border-radius: 3px 3px 0 0;\n transition: transform var(--duration) var(--easing);\n}\n\n#nav button[aria-selected] {\n color: rgb(var(--em-rgb-accent));\n}\n\n#preview {\n z-index: 2;\n position: relative;\n padding: calc(var(--padding) + 4px) var(--padding);\n padding-right: var(--sidebar-width);\n}\n\n#nav:before, #preview:before {\n content: "";\n position: absolute;\n left: 0;\n right: 0;\n height: 2px;\n}\n\n#nav[data-position=top]:before, #preview[data-position=top]:before {\n top: 100%;\n background: linear-gradient(to bottom, var(--em-color-border), transparent);\n}\n\n#nav[data-position=bottom]:before, #preview[data-position=bottom]:before {\n bottom: 100%;\n background: linear-gradient(to top, var(--em-color-border), transparent);\n}\n\n.category button {\n position: relative;\n font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;\n}\n\n.category button > * {\n position: relative;\n}\n\n.category button .background {\n position: absolute;\n inset: 0;\n opacity: 0;\n background-color: var(--em-color-border);\n transition: opacity var(--duration-fast) var(--easing) var(--duration-instant);\n}\n\n.category button:hover .background {\n transition-duration: var(--duration-instant);\n transition-delay: 0ms;\n}\n\n.category button[aria-selected] .background {\n opacity: 1;\n}\n\n.category button[data-keyboard] .background {\n transition: none;\n}\n\n.row {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n}\n\n.skin-tone-button {\n border-radius: 100%;\n border: 1px solid transparent;\n}\n\n.skin-tone-button:hover {\n border-color: var(--em-color-border);\n}\n\n.skin-tone-button:active .skin-tone {\n transform: scale(0.85) !important;\n}\n\n.skin-tone-button .skin-tone {\n transition: transform var(--duration) var(--easing);\n}\n\n.skin-tone-button[aria-selected] {\n border-left-width: 0;\n border-right-width: 0;\n border-top-color: rgba(0, 0, 0, 0.05);\n border-bottom-color: transparent;\n background-color: var(--em-color-border);\n}\n\n.skin-tone-button[aria-selected] .skin-tone {\n transform: scale(0.9);\n}\n\n.menu {\n z-index: 2;\n position: absolute;\n white-space: nowrap;\n padding: 4px;\n border: 1px solid var(--em-color-border);\n background-color: rgba(var(--em-rgb-background), 0.9);\n -webkit-backdrop-filter: blur(4px);\n backdrop-filter: blur(4px);\n border-radius: 10px;\n box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.05);\n transition-property: opacity, transform;\n transition-duration: var(--duration);\n transition-timing-function: var(--easing);\n}\n\n.menu.hidden {\n opacity: 0;\n}\n\n.menu[data-position=bottom] {\n transform-origin: bottom right;\n}\n\n.menu[data-position=bottom].hidden {\n transform: scale(0.9) rotate(-3deg) translateY(5%);\n}\n\n.menu[data-position=top] {\n transform-origin: top right;\n}\n\n.menu[data-position=top].hidden {\n transform: scale(0.9) rotate(3deg) translateY(-5%);\n}\n\n.menu input[type=radio] {\n position: absolute;\n overflow: hidden;\n clip: rect(0 0 0 0);\n width: 1px;\n height: 1px;\n padding: 0;\n margin: 0;\n border: 0;\n}\n\n.menu input[type=radio]:checked + .option {\n box-shadow: 0 0 0 2px rgb(var(--em-rgb-accent));\n}\n\n.option {\n width: 100%;\n padding: 4px 6px;\n border-radius: 6px;\n}\n\n.option:hover {\n color: #fff;\n background-color: rgb(var(--em-rgb-accent));\n}\n\n.skin-tone {\n position: relative;\n display: inline-block;\n width: 16px;\n height: 16px;\n border-radius: 100%;\n overflow: hidden;\n}\n\n.skin-tone:after {\n content: "";\n position: absolute;\n inset: 0;\n border-radius: 100%;\n border: 1px solid rgba(0, 0, 0, 0.8);\n mix-blend-mode: overlay;\n box-shadow: inset 0 -2px 3px #000, inset 0 1px 2px #fff;\n background: linear-gradient(to bottom, rgba(255, 255, 255, 0.2), transparent);\n}\n\n.skin-tone-1 {\n background-color: #ffc93a;\n}\n\n.skin-tone-2 {\n background-color: #ffdab7;\n}\n\n.skin-tone-3 {\n background-color: #e7b98f;\n}\n\n.skin-tone-4 {\n background-color: #c88c61;\n}\n\n.skin-tone-5 {\n background-color: #a46134;\n}\n\n.skin-tone-6 {\n background-color: #5d4437;\n}\n\n[data-emoji-set=twitter] .skin-tone:after {\n border-color: rgba(0, 0, 0, 0.5);\n box-shadow: none;\n}\n\n[data-emoji-set=twitter] .skin-tone-1 {\n background-color: #FADE72;\n}\n\n[data-emoji-set=twitter] .skin-tone-2 {\n background-color: #F3DFD0;\n}\n\n[data-emoji-set=twitter] .skin-tone-3 {\n background-color: #EED3A8;\n}\n\n[data-emoji-set=twitter] .skin-tone-4 {\n background-color: #CFAD8D;\n}\n\n[data-emoji-set=twitter] .skin-tone-5 {\n background-color: #A8805D;\n}\n\n[data-emoji-set=twitter] .skin-tone-6 {\n background-color: #765542;\n}\n\n[data-emoji-set=google] .skin-tone:after {\n box-shadow: inset 0 0 2px 2px rgba(0, 0, 0, 0.4);\n}\n\n[data-emoji-set=google] .skin-tone-1 {\n background-color: #F5C748;\n}\n\n[data-emoji-set=google] .skin-tone-2 {\n background-color: #F1D5AA;\n}\n\n[data-emoji-set=google] .skin-tone-3 {\n background-color: #D4B48D;\n}\n\n[data-emoji-set=google] .skin-tone-4 {\n background-color: #AA876B;\n}\n\n[data-emoji-set=google] .skin-tone-5 {\n background-color: #916544;\n}\n\n[data-emoji-set=google] .skin-tone-6 {\n background-color: #61493F;\n}\n\n[data-emoji-set=facebook] .skin-tone:after {\n border-color: rgba(0, 0, 0, 0.4);\n box-shadow: inset 0 -2px 3px #000, inset 0 1px 4px #fff;\n}\n\n[data-emoji-set=facebook] .skin-tone-1 {\n background-color: #F5C748;\n}\n\n[data-emoji-set=facebook] .skin-tone-2 {\n background-color: #F1D5AA;\n}\n\n[data-emoji-set=facebook] .skin-tone-3 {\n background-color: #D4B48D;\n}\n\n[data-emoji-set=facebook] .skin-tone-4 {\n background-color: #AA876B;\n}\n\n[data-emoji-set=facebook] .skin-tone-5 {\n background-color: #916544;\n}\n\n[data-emoji-set=facebook] .skin-tone-6 {\n background-color: #61493F;\n}\n';class By extends t.Component{constructor(){super(...arguments),zf(this,"ref",t.createRef()),zf(this,"fetchEmojiData",(async()=>{try{const{data:e}=await Hg.get("https://cdn.jsdelivr.net/npm/@emoji-mart/data");return e}catch(e){return{}}})),zf(this,"onKeyDown",(e=>{let{event:t}=e;return"Escape"===t.key&&(this.props.editor.chain().focus().deleteRange(this.props.range).run(),!0)})),zf(this,"handleSelect",(e=>{this.props.editor.chain().focus().deleteRange(this.props.range).setEmoji(e).run()}))}componentDidMount(){new Py({...this.props,onEmojiSelect:this.handleSelect,style:{maxWidth:"100%"},theme:"light",native:!0,previewPosition:"none",showSkinTones:!1,data:this.fetchEmojiData,ref:this.ref})}render(){return t.createElement("div",{ref:this.ref,"data-cy":"neeto-editor-emoji-picker"})}}By.defaultProps={editor:{},range:{}},By.propTypes={editor:hf.exports.object.isRequired,range:hf.exports.object};const Uy=e=>{let{editor:n}=e;const r=c();return t.createElement(jf,{ref:r,closeOnSelect:!1,customTarget:()=>{var e;return t.createElement(Mf,{icon:nh,iconActive:null==r||null===(e=r.current)||void 0===e?void 0:e.visible,tooltipProps:{content:"Emoji",position:"bottom",delay:[500]},"data-cy":"neeto-editor-fixed-menu-emoji-option-button"})},position:"bottom-start"},t.createElement(By,{editor:n}))},$y=e=>{let{editor:n}=e;return t.createElement(jf,{customTarget:()=>t.createElement(Mf,{icon:gh,iconActive:n.isActive("heading"),tooltipProps:{content:"Font Size",position:"bottom",delay:[500]},"data-cy":"neeto-editor-fixed-menu-font-size-option"}),className:"neeto-editor-font-size-wrapper",placement:"bottom"},O.map((e=>{let{label:r,value:i}=e;return t.createElement("li",{onClick:()=>{return e=i,n.chain().focus().toggleHeading({level:e}).run();var e},key:i,className:Sc({active:(o=i,n.isActive("heading",{level:o}))}),"data-cy":"neeto-editor-fixed-menu-font-size-option-".concat(r)},r);var o})))},Hy=e=>{let{editor:n}=e;const r=c(),o=c(),[s,a]=i(""),[l,u]=i(""),d=n.isActive("link"),p=()=>{u(n.getAttributes("link").href||"")},h=()=>{var e;sf.test(l)?(n.chain().focus().setLink({href:l}).run(),null===(e=r.current)||void 0===e||e.close()):a("Please enter a valid url")};return t.createElement(jf,{ref:r,onVisible:()=>{var e;return null===(e=o.current)||void 0===e?void 0:e.focus({preventScroll:!0})},customTarget:()=>t.createElement(Mf,{icon:Bp,iconActive:d,onClick:p,tooltipProps:{content:"Link",position:"bottom",delay:[500]},"data-cy":"neeto-editor-fixed-menu-link-option"}),className:"neeto-editor-link-wrapper",closeOnSelect:!1,position:"bottom"},t.createElement("div",{onKeyDown:e=>{"Escape"===e.key?r.current.close():"Enter"===e.key&&h()},className:"neeto-editor-link__item"},t.createElement(Xh,{ref:o,name:"url",value:l,placeholder:"Paste URL",onFocus:()=>a(""),error:s,onChange:e=>{let{target:{value:t}}=e;return u(t)},"data-cy":"neeto-editor-fixed-menu-link-option-input"}),t.createElement(ed,{label:"Link",onClick:h,"data-cy":"neeto-editor-fixed-menu-link-option-link-button"}),d&&t.createElement(ed,{label:"Unlink",onClick:()=>{var e;n.chain().focus().unsetLink().run(),null===(e=r.current)||void 0===e||e.close()},"data-cy":"neeto-editor-fixed-menu-link-option-unlink-button"})))};var Wy=Lc((function(e){for(var t={},n=0;n<e.length;)t[e[n][0]]=e[n][1],n+=1;return t}));const Vy=e=>{let{editor:t,options:n,setImageUploadVisible:r}=e;const i=((e,t)=>({font:[{Icon:ih,command:()=>e.chain().focus().toggleBold().run(),active:e.isActive("bold"),optionName:"bold"},{Icon:ph,command:()=>e.chain().focus().toggleItalic().run(),active:e.isActive("italic"),optionName:"italic"},{Icon:yh,command:()=>e.chain().focus().toggleUnderline().run(),active:e.isActive("underline"),optionName:"underline"},{Icon:sh,command:()=>e.chain().focus().toggleStrike().run(),active:e.isActive("strike"),optionName:"strike"},{Icon:Ap,command:()=>e.chain().focus().toggleHighlight().run(),active:e.isActive("highlight"),optionName:"highlight"}],block:[{Icon:Jp,command:()=>e.chain().focus().toggleBlockquote().run(),active:e.isActive("blockquote"),optionName:"block-quote",highlight:!0},{Icon:kp,command:()=>e.chain().focus().toggleCodeBlock().run(),active:e.isActive("codeBlock"),optionName:"code-block",highlight:!0},{Icon:Lp,command:()=>t(!0),active:e.isActive("imageUpload"),optionName:"image-upload"}],list:[{Icon:$p,command:()=>e.chain().focus().toggleBulletList().run(),active:e.isActive("bulletList"),optionName:"bullet-list",highlight:!0},{Icon:Wp,command:()=>e.chain().focus().toggleOrderedList().run(),active:e.isActive("orderedList"),optionName:"ordered-list",highlight:!0}]}))(t,r);return Wy(["font","block","list"].map((e=>[e,i[e].filter((e=>n.includes(e.optionName)))])))},qy={small:24,medium:32,large:40,xlarge:64},Yy=["#E5E7EB","#FECACA","#FDE68A","#A7F3D0","#BFDBFE","#C7D2FE","#DDD6FE","#FBCFE8"],Ky=e=>{let{size:n,user:r,isSquare:o,status:s,onClick:a,className:l,...c}=e;const[u,d]=i(!1),{name:p="",imageUrl:h}=r,f="medium"===n,m="large"===n,g="xlarge"===n,b=(e=>{const t=e.trim().split(" "),n=t.reduce(((e,n,r)=>(0!==r&&r!==t.length-1||(e="".concat(e).concat(n.charAt(0).toUpperCase())),e)),"");return n})(p),y={height:qy[n],width:qy[n],backgroundColor:(()=>{const e=(b.charCodeAt(0)||0)+(b.charCodeAt(1)||0);return Yy[e%65%Yy.length]||Yy[0]})()},v=Sc("ne-avatar",{"ne-avatar--medium":f,"ne-avatar--large":m,"ne-avatar--xlarge":g,"ne-avatar--round":!o,hidden:!u}),w=Sc("ne-avatar__text",{"ne-avatar__text-medium":f,"ne-avatar__text-large":m,"ne-avatar__text-xlarge":g}),E=Sc("ne-avatar__status","".concat(s),{"ne-avatar__status-medium":f,"ne-avatar__status-large":m,"ne-avatar__status-xlarge":g,"ne-avatar__status-square":o}),M=()=>null==s?t.Fragment:t.createElement("span",{className:E}),k=()=>t.createElement("span",{className:w},b),_=b&&!h&&!u;return t.createElement("div",x({onClick:a,style:y,className:Sc("ne-avatar--container",{"ne-avatar--container-round":!o},l)},c),t.createElement(M,null),_?t.createElement(k,null):t.createElement("img",{className:v,onLoad:()=>d(!0),onError:()=>d(!1),src:h,alt:"avatar-".concat(b)}))};Ky.defaultProps={size:"medium",user:{imageUrl:"",name:""},isSquare:!1,onClick:()=>{},status:null},Ky.propTypes={size:hf.exports.oneOf(Object.keys(qy)),user:hf.exports.shape({imageUrl:hf.exports.string,name:hf.exports.string}),isSquare:hf.exports.bool,onClick:hf.exports.func,status:hf.exports.oneOf(Object.keys({online:"online",idle:"idle",offline:"offline"})),className:hf.exports.string};var Qy=Rc;var Gy="function"==typeof Object.assign?Object.assign:function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1,r=arguments.length;n<r;){var i=arguments[n];if(null!=i)for(var o in i)Qy(o,i)&&(t[o]=i[o]);n+=1}return t},Zy=Gy,Jy=Fc((function(e,t){return Zy({},t,e)})),Xy=Jy;const ev=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e.map(((e,n)=>Xy(e,{showImage:t,key:"".concat(Su(e.name),"-").concat(n)}))).sort(((e,t)=>e.name.localeCompare(t.name)))},tv=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=ev(e,t);return e=>{let{query:t}=e;return n.filter((e=>{let{name:n}=e;return n.toLocaleLowerCase().includes(t.toLocaleLowerCase())}))}},nv=e=>{let{editor:n,mentions:r,showImageInMention:i}=e;const o=c(),s=ev(r,i);return Cu(s)?null:t.createElement(jf,{ref:o,customTarget:()=>{var e;return t.createElement(Mf,{icon:Tp,iconActive:null===(e=o.current)||void 0===e?void 0:e.visible,tooltipProps:{content:"Mention",position:"bottom",delay:[500]},"data-cy":"neeto-editor-mention-option"})}},t.createElement("div",{className:"neeto-editor-mentions__wrapper neeto-editor-mentions__wrapper--small"},s.map((e=>{let{key:r,name:o,imageUrl:s}=e;return t.createElement("button",{className:"neeto-editor-mentions__item neeto-editor-mentions__item--light",key:r,onClick:()=>n.commands.setMention({id:r,label:o}),type:"button","data-cy":"neeto-editor-mention-option-".concat(r)},i&&t.createElement(Ky,{size:"small",user:{name:o,imageUrl:s}}),t.createElement("p",null,o))}))))},rv=e=>{let{onClickVariable:n,variables:r}=e;const i=function(){const e=[],t=[];return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach((n=>{const{category_key:r,category_label:i,variables:o}=n;if(r&&o){const e=o.map((e=>({...e,category_key:r})));t.push({label:i,variables:e})}else e.push(n)})),e.length&&t.push({label:t.length?"Others":null,variables:e}),t}(r);return r&&r.length?t.createElement("div",{className:"neeto-editor-variables-list"},i.map(((e,r)=>{let{label:i,variables:o}=e;return t.createElement(iv,{key:r,index:r,title:i,variables:o,onClickItem:n})}))):null},iv=e=>{let{index:n,title:r,variables:i,onClickItem:o}=e;return t.createElement("div",{className:"neeto-editor-variables-block","data-cy":"neeto-editor-variable-option-category-".concat(n)},r&&t.createElement("h6",null,r),t.createElement("div",{className:"neeto-editor-variables-row"},i.map((e=>t.createElement("button",{type:"button",onClick:()=>o(e),key:"".concat(e.label,"--").concat(e.value),className:"neeto-editor-variable","data-cy":"neeto-editor-variable-option-item-".concat(e.label,"--").concat(e.value)},e.label)))))},ov=e=>{let{editor:n,variables:r}=e;const i=c();return r&&r.length?t.createElement(jf,{ref:i,customTarget:()=>{var e;return t.createElement(Mf,{icon:yp,iconActive:null===(e=i.current)||void 0===e?void 0:e.visible,tooltipProps:{content:"Variables",position:"bottom",delay:[500]},"data-cy":"neeto-editor-variable-option"})}},t.createElement(rv,{onClickVariable:e=>{const{category_key:t,key:r}=e,i=t?"".concat(t,".").concat(r):r;n.chain().focus().setVariable({label:i}).run()},variables:r})):null},sv=e=>{let{editor:n,variables:r,setImageUploadVisible:o,options:s,mentions:a,showImageInMention:l}=e;const[c,u]=i(!1),d=n&&n.view.state.selection.node,p=d&&"image"===d.type.name;if(!n)return null;const{font:h,block:f,list:m}=Vy({editor:n,options:s,setImageUploadVisible:o}),g=s.filter((e=>e.match(/^h[1-6]$/))).length>0,b=s.includes(C.EMOJI),y=s.includes(C.LINK),v=(e,n)=>{let{Icon:r,command:i,active:o,optionName:s,highlight:a}=e;return t.createElement(Mf,{key:n,icon:r,iconActive:o,highlight:a,onClick:i,tooltipProps:{content:Tu(s),position:"bottom",delay:[500]},"data-cy":"neeto-editor-fixed-menu-".concat(s,"-option")})};return t.createElement("div",{className:"neeto-editor-fixed-menu"},g&&t.createElement($y,{editor:n}),h.map(v),b&&t.createElement(Uy,{editor:n}),y&&t.createElement(Hy,{editor:n}),f.map(v),m.map(v),p&&nf({editor:n,isImageEditorModalOpen:c,setIsImageEditorModalOpen:u}).map(((e,n)=>{let{Icon:r,command:i,active:o,optionName:s}=e;return t.createElement(Mf,{key:n,icon:r,iconActive:o,onClick:i,tooltipProps:{content:Tu(s),position:"bottom",delay:[500]},"data-cy":"neeto-editor-fixed-menu-".concat(s,"-option")})})),t.createElement("div",{className:"neeto-editor-fixed-menu-addons"},t.createElement(ov,{editor:n,variables:r}),t.createElement(nv,{editor:n,mentions:a,showImageInMention:l})),t.createElement(Zh,{isOpen:c,onClose:()=>u(!1)},t.createElement("div",{className:"neeto-editor-image-uploader"},t.createElement("div",{className:"neeto-editor-image-uploader__content"},t.createElement(ef,{editor:n,onClose:()=>u(!1),url:null==d?void 0:d.attrs.src,alt:null==d?void 0:d.attrs.alt})))))},av=()=>{},lv="large",cv=e=>{let{children:n,size:r,noUnderline:i,className:o="",...s}=e;return t.createElement("div",x({className:Sc({"ne-tab__wrapper":!0},{"ne-tab__wrapper--size-large":r===lv},{"ne-tab__wrapper--underline-none":i},[o]),"data-cy":"tab-container"},s),n)};cv.Item=e=>{let{active:n,className:r="",children:i,icon:o=null,onClick:s=av,...a}=e;const l="button",c="string"==typeof o?()=>t.createElement("i",{className:o,"data-cy":"tab-item-icon"}):o||t.Fragment;return t.createElement(l,x({className:Sc(["ne-tab flex select-none items-center justify-center",r],{active:n}),onClick:s,"data-cy":"tab-item"},a),o&&t.createElement(c,{className:"ne-tab__icon"}),i)};const uv={autoProceed:!0,allowMultipleUploads:!1,restrictions:{maxFileSize:5*1024*1024,allowedFileTypes:[".jpg",".jpeg",".png",".gif"]}},dv={formData:!0,fieldName:"blob"},pv=[{title:"Upload",key:"local"},{title:"Link",key:"link"},{title:"Unsplash",key:"unsplash"}];var hv={exports:{}},fv={};function mv(e){return e<10?`0${e}`:e.toString()}var gv=function(){const e=new Date;return`${mv(e.getHours())}:${mv(e.getMinutes())}:${mv(e.getSeconds())}`};Object.defineProperty(fv,"__esModule",{value:!0}),fv.justErrorsLogger=fv.debugLogger=void 0;const bv=gv,yv={debug:()=>{},warn:()=>{},error:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return console.error(`[Uppy] [${bv()}]`,...t)}};fv.justErrorsLogger=yv;const vv={debug:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return console.debug(`[Uppy] [${bv()}]`,...t)},warn:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return console.warn(`[Uppy] [${bv()}]`,...t)},error:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return console.error(`[Uppy] [${bv()}]`,...t)}};fv.debugLogger=vv;let wv="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var xv={nanoid:(e=21)=>{let t="",n=e;for(;n--;)t+=wv[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(n=t)=>{let r="",i=n;for(;i--;)r+=e[Math.random()*e.length|0];return r}},Ev={},Mv=function(e){if("number"!=typeof e||isNaN(e))throw new TypeError("Expected a number, got "+typeof e);var t=e<0,n=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];if(t&&(e=-e),e<1)return(t?"-":"")+e+" B";var r=Math.min(Math.floor(Math.log(e)/Math.log(1024)),n.length-1);e=Number(e/Math.pow(1024,r));var i=n[r];return e>=10||e%1==0?(t?"-":"")+e.toFixed(0)+" "+i:(t?"-":"")+e.toFixed(1)+" "+i};function kv(e,t){this.text=e=e||"",this.hasWild=~e.indexOf("*"),this.separator=t,this.parts=e.split(t)}kv.prototype.match=function(e){var t,n,r=!0,i=this.parts,o=i.length;if("string"==typeof e||e instanceof String)if(this.hasWild||this.text==e){for(n=(e||"").split(this.separator),t=0;r&&t<o;t++)"*"!==i[t]&&(r=t<n.length&&i[t]===n[t]);r=r&&n}else r=!1;else if("function"==typeof e.splice)for(r=[],t=e.length;t--;)this.match(e[t])&&(r[r.length]=e[t]);else if("object"==typeof e)for(var s in r={},e)this.match(s)&&(r[s]=e[s]);return r};var _v=function(e,t,n){var r=new kv(e,n||/[\/\.]/);return void 0!==t?r.match(t):r},Dv=/[\/\+\.]/;Object.defineProperty(Ev,"__esModule",{value:!0}),Ev.defaultOptions=Ev.RestrictionError=Ev.Restricter=void 0;const Cv=Mv,Ov=function(e,t){function n(t){var n=_v(t,e,Dv);return n&&n.length>=2}return t?n(t.split(";")[0]):n};Ev.defaultOptions={maxFileSize:null,minFileSize:null,maxTotalFileSize:null,maxNumberOfFiles:null,minNumberOfFiles:null,allowedFileTypes:null,requiredMetaFields:[]};class Nv extends Error{constructor(){super(...arguments),this.isRestriction=!0}}Ev.RestrictionError=Nv,"undefined"==typeof AggregateError&&(globalThis.AggregateError=class extends Error{constructor(e,t){super(t),this.errors=e}});function Tv(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}Ev.Restricter=class{constructor(e,t){this.i18n=t,this.getOpts=()=>{const t=e();if(null!=t.restrictions.allowedFileTypes&&!Array.isArray(t.restrictions.allowedFileTypes))throw new TypeError("`restrictions.allowedFileTypes` must be an array");return t}}validate(e,t){const{maxFileSize:n,minFileSize:r,maxTotalFileSize:i,maxNumberOfFiles:o,allowedFileTypes:s}=this.getOpts().restrictions;if(o&&t.length+1>o)throw new Nv(`${this.i18n("youCanOnlyUploadX",{smart_count:o})}`);if(s){const t=s.some((t=>t.includes("/")?!!e.type&&Ov(e.type.replace(/;.*?$/,""),t):!("."!==t[0]||!e.extension)&&e.extension.toLowerCase()===t.slice(1).toLowerCase()));if(!t){const e=s.join(", ");throw new Nv(this.i18n("youCanOnlyUploadFileTypes",{types:e}))}}if(i&&null!=e.size){const n=t.reduce(((e,t)=>e+t.size),e.size);if(n>i)throw new Nv(this.i18n("exceedsSize",{size:Cv(i),file:e.name}))}if(n&&null!=e.size&&e.size>n)throw new Nv(this.i18n("exceedsSize",{size:Cv(n),file:e.name}));if(r&&null!=e.size&&e.size<r)throw new Nv(this.i18n("inferiorSize",{size:Cv(r)}))}validateMinNumberOfFiles(e){const{minNumberOfFiles:t}=this.getOpts().restrictions;if(Object.keys(e).length<t)throw new Nv(this.i18n("youHaveToAtLeastSelectX",{smart_count:t}))}getMissingRequiredMetaFields(e){const t=new Nv(this.i18n("missingRequiredMetaFieldOnFile",{fileName:e.name})),{requiredMetaFields:n}=this.getOpts().restrictions,r=Object.prototype.hasOwnProperty,i=[];for(const t of n)r.call(e.meta,t)&&""!==e.meta[t]||i.push(t);return{missingFields:i,error:t}}};var Sv=0;function Av(e){return"__private_"+Sv+++"_"+e}const Iv=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};function Lv(e,t,n){const r=[];return e.forEach((e=>"string"!=typeof e?r.push(e):t[Symbol.split](e).forEach(((e,t,i)=>{""!==e&&r.push(e),t<i.length-1&&r.push(n)})))),r}
32
+ var xh="undefined"!=typeof navigator&&navigator.userAgent.toLowerCase().indexOf("firefox")>0;function Eh(e,t,n,r){e.addEventListener?e.addEventListener(t,n,r):e.attachEvent&&e.attachEvent("on".concat(t),(function(){n(window.event)}))}function Mh(e,t){for(var n=t.slice(0,t.length-1),r=0;r<n.length;r++)n[r]=e[n[r].toLowerCase()];return n}function kh(e){"string"!=typeof e&&(e="");for(var t=(e=e.replace(/\s/g,"")).split(","),n=t.lastIndexOf("");n>=0;)t[n-1]+=",",t.splice(n,1),n=t.lastIndexOf("");return t}for(var _h={backspace:8,tab:9,clear:12,enter:13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"⇪":20,",":188,".":190,"/":191,"`":192,"-":xh?173:189,"=":xh?61:187,";":xh?59:186,"'":222,"[":219,"]":221,"\\":220},Dh={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,command:91},Ch={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},Oh={16:!1,18:!1,17:!1,91:!1},Nh={},Th=1;Th<20;Th++)_h["f".concat(Th)]=111+Th;var Sh=[],Ah=!1,Ih="all",Lh=[],jh=function(e){return _h[e.toLowerCase()]||Dh[e.toLowerCase()]||e.toUpperCase().charCodeAt(0)};function zh(e){Ih=e||"all"}function Fh(){return Ih||"all"}var Ph=function(e){var t=e.key,n=e.scope,r=e.method,i=e.splitKey,o=void 0===i?"+":i;kh(t).forEach((function(e){var t=e.split(o),i=t.length,s=t[i-1],a="*"===s?"*":jh(s);if(Nh[a]){n||(n=Fh());var l=i>1?Mh(Dh,t):[];Nh[a]=Nh[a].filter((function(e){return!((!r||e.method===r)&&e.scope===n&&function(e,t){for(var n=e.length>=t.length?e:t,r=e.length>=t.length?t:e,i=!0,o=0;o<n.length;o++)-1===r.indexOf(n[o])&&(i=!1);return i}(e.mods,l))}))}}))};function Rh(e,t,n,r){var i;if(t.element===r&&(t.scope===n||"all"===t.scope)){for(var o in i=t.mods.length>0,Oh)Object.prototype.hasOwnProperty.call(Oh,o)&&(!Oh[o]&&t.mods.indexOf(+o)>-1||Oh[o]&&-1===t.mods.indexOf(+o))&&(i=!1);(0!==t.mods.length||Oh[16]||Oh[18]||Oh[17]||Oh[91])&&!i&&"*"!==t.shortcut||!1===t.method(e,t)&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0))}}function Bh(e,t){var n=Nh["*"],r=e.keyCode||e.which||e.charCode;if(Uh.filter.call(this,e)){if(93!==r&&224!==r||(r=91),-1===Sh.indexOf(r)&&229!==r&&Sh.push(r),["ctrlKey","altKey","shiftKey","metaKey"].forEach((function(t){var n=Ch[t];e[t]&&-1===Sh.indexOf(n)?Sh.push(n):!e[t]&&Sh.indexOf(n)>-1?Sh.splice(Sh.indexOf(n),1):"metaKey"===t&&e[t]&&3===Sh.length&&(e.ctrlKey||e.shiftKey||e.altKey||(Sh=Sh.slice(Sh.indexOf(n))))})),r in Oh){for(var i in Oh[r]=!0,Dh)Dh[i]===r&&(Uh[i]=!0);if(!n)return}for(var o in Oh)Object.prototype.hasOwnProperty.call(Oh,o)&&(Oh[o]=e[Ch[o]]);e.getModifierState&&(!e.altKey||e.ctrlKey)&&e.getModifierState("AltGraph")&&(-1===Sh.indexOf(17)&&Sh.push(17),-1===Sh.indexOf(18)&&Sh.push(18),Oh[17]=!0,Oh[18]=!0);var s=Fh();if(n)for(var a=0;a<n.length;a++)n[a].scope===s&&("keydown"===e.type&&n[a].keydown||"keyup"===e.type&&n[a].keyup)&&Rh(e,n[a],s,t);if(r in Nh)for(var l=0;l<Nh[r].length;l++)if(("keydown"===e.type&&Nh[r][l].keydown||"keyup"===e.type&&Nh[r][l].keyup)&&Nh[r][l].key){for(var c=Nh[r][l],u=c.splitKey,d=c.key.split(u),p=[],h=0;h<d.length;h++)p.push(jh(d[h]));p.sort().join("")===Sh.sort().join("")&&Rh(e,c,s,t)}}}function Uh(e,t,n){Sh=[];var r=kh(e),i=[],o="all",s=document,a=0,l=!1,c=!0,u="+",d=!1;for(void 0===n&&"function"==typeof t&&(n=t),"[object Object]"===Object.prototype.toString.call(t)&&(t.scope&&(o=t.scope),t.element&&(s=t.element),t.keyup&&(l=t.keyup),void 0!==t.keydown&&(c=t.keydown),void 0!==t.capture&&(d=t.capture),"string"==typeof t.splitKey&&(u=t.splitKey)),"string"==typeof t&&(o=t);a<r.length;a++)i=[],(e=r[a].split(u)).length>1&&(i=Mh(Dh,e)),(e="*"===(e=e[e.length-1])?"*":jh(e))in Nh||(Nh[e]=[]),Nh[e].push({keyup:l,keydown:c,scope:o,mods:i,shortcut:r[a],method:n,key:r[a],splitKey:u,element:s});void 0!==s&&!function(e){return Lh.indexOf(e)>-1}(s)&&window&&(Lh.push(s),Eh(s,"keydown",(function(e){Bh(e,s)}),d),Ah||(Ah=!0,Eh(window,"focus",(function(){Sh=[]}),d)),Eh(s,"keyup",(function(e){Bh(e,s),function(e){var t=e.keyCode||e.which||e.charCode,n=Sh.indexOf(t);if(n>=0&&Sh.splice(n,1),e.key&&"meta"===e.key.toLowerCase()&&Sh.splice(0,Sh.length),93!==t&&224!==t||(t=91),t in Oh)for(var r in Oh[t]=!1,Dh)Dh[r]===t&&(Uh[r]=!1)}(e)}),d))}var $h={setScope:zh,getScope:Fh,deleteScope:function(e,t){var n,r;for(var i in e||(e=Fh()),Nh)if(Object.prototype.hasOwnProperty.call(Nh,i))for(n=Nh[i],r=0;r<n.length;)n[r].scope===e?n.splice(r,1):r++;Fh()===e&&zh(t||"all")},getPressedKeyCodes:function(){return Sh.slice(0)},isPressed:function(e){return"string"==typeof e&&(e=jh(e)),-1!==Sh.indexOf(e)},filter:function(e){var t=e.target||e.srcElement,n=t.tagName,r=!0;return!t.isContentEditable&&("INPUT"!==n&&"TEXTAREA"!==n&&"SELECT"!==n||t.readOnly)||(r=!1),r},trigger:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"all";Object.keys(Nh).forEach((function(n){var r=Nh[n].find((function(n){return n.scope===t&&n.shortcut===e}));r&&r.method&&r.method()}))},unbind:function(e){if(e){if(Array.isArray(e))e.forEach((function(e){e.key&&Ph(e)}));else if("object"==typeof e)e.key&&Ph(e);else if("string"==typeof e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=n[0],o=n[1];"function"==typeof i&&(o=i,i=""),Ph({key:e,scope:i,method:o,splitKey:"+"})}}else Object.keys(Nh).forEach((function(e){return delete Nh[e]}))},keyMap:_h,modifier:Dh,modifierMap:Ch};for(var Hh in $h)Object.prototype.hasOwnProperty.call($h,Hh)&&(Uh[Hh]=$h[Hh]);if("undefined"!=typeof window){var Wh=window.hotkeys;Uh.noConflict=function(e){return e&&window.hotkeys===Uh&&(window.hotkeys=Wh),Uh},window.hotkeys=Uh}Uh.filter=function(){return!0};var Vh=function(e,t){var n=e.target,r=n&&n.tagName;return Boolean(r&&t&&t.includes(r))};function qh(e,t,n,r){n instanceof Array&&(r=n,n=void 0);var i=n||{},s=i.enableOnTags,a=i.filter,l=i.keyup,d=i.keydown,p=i.filterPreventDefault,h=void 0===p||p,f=i.enabled,m=void 0===f||f,g=i.enableOnContentEditable,b=void 0!==g&&g,y=c(null),v=u((function(e,n){var r;return a&&!a(e)?!h:!!(Vh(e,["INPUT","TEXTAREA","SELECT"])&&!Vh(e,s)||null!=(r=e.target)&&r.isContentEditable&&!b)||(null===y.current||document.activeElement===y.current)&&(t(e,n),!0)}),r?[y,s,a].concat(r):[y,s,a]);return o((function(){if(m)return l&&!0!==d&&(n.keydown=!1),Uh(e,n||{},v),function(){return Uh.unbind(e,v)};Uh.unbind(e,v)}),[v,e,m]),y}Uh.isPressed;const Yh=()=>{},Kh="xs",Qh="sm",Gh="md",Zh=e=>{let{size:n="sm",isOpen:r=!1,onClose:i=Yh,loading:o=!1,children:s,className:a="",closeOnEsc:l=!0,closeButton:u=!0,backdropClassName:d="",closeOnOutsideClick:p=!0,...h}=e;const f=c();return nd(f,p?i:Yh),qh("esc",l?i:Yh),t.createElement(td,{className:"ne-portal"},r&&t.createElement(zu,{key:"modal-backdrop",className:Sc("ne-modal__backdrop",d)},t.createElement("div",x({ref:f,key:"modal-wrapper",className:Sc("ne-modal__wrapper",{"ne-modal__wrapper--xs":n===Kh,"ne-modal__wrapper--sm":n===Qh,"ne-modal__wrapper--md":n===Gh,[a]:a})},h),u&&t.createElement(ed,{style:"text",icon:Ep,className:"ne-modal__close",onClick:i}),o?"":s)))},Jh=e=>{let{children:n,className:r="",required:i=!1,helpIconProps:o=null,...s}=e;const{onClick:a,icon:l,tooltipProps:c,className:u,...d}=o||{},p=l||zp;return t.createElement("label",x({className:Sc("ne-label flex items-center",r)},s),n,i&&t.createElement("span",{"aria-hidden":!0},"*"),o&&t.createElement(Qu,x({},c,{disabled:!c}),t.createElement("span",{className:Sc("ml-1",{[u]:u}),onClick:a},t.createElement(p,x({size:16},d)))))},Xh=s(((e,n)=>{const{id:r,size:i="small",type:o="text",label:s,error:a=null,suffix:l=null,prefix:c=null,disabled:u=!1,helpText:d="",className:p="",nakedInput:h=!1,contentSize:f=null,required:m=!1,...g}=e;return t.createElement("div",{className:Sc(["ne-input__wrapper",p])},s&&t.createElement(Jh,{required:m,"data-cy":"neeto-editor-".concat(Su(s),"-input-label"),htmlFor:r},s),t.createElement("div",{className:Sc("ne-input",{"ne-input--naked":!!h,"ne-input--error":!!a,"ne-input--disabled":!!u,"ne-input--small":"small"===i})},c&&t.createElement("div",{className:"ne-input__prefix"},c),t.createElement("input",x({ref:n,type:o,disabled:u,size:f,required:m,"aria-invalid":!!a,"data-cy":"".concat(Su(s),"-input-field")},g)),l&&t.createElement("div",{className:"ne-input__suffix"},l)),!!a&&t.createElement("p",{"data-cy":"".concat(Su(s),"-input-error"),className:"ne-input__error"},a),d&&t.createElement("p",{className:"ne-input__help-text"},d))}));Xh.displayName="Input";const ef=e=>{let{url:n,editor:r,onClose:o,alt:s}=e;const[a,l]=i(s||""),[c,u]=i(!1),d=()=>{r.chain().focus().setImage({src:n,alt:a}).run(),o()};return t.createElement("div",{className:"neeto-editor-image-editor",onKeyDown:e=>{"Enter"===e.key&&d()}},c?t.createElement("div",{className:"neeto-editor-image-editor__error"},t.createElement("h2",null,"Something Went Wrong!"),t.createElement("p",null,"The selected image cannot be displayed. Please try again using another image.")):t.createElement(t.Fragment,null,t.createElement("figure",null,t.createElement("img",{src:n,loading:"lazy",onError:e=>{let{currentTarget:t}=e;u(!0),t.onerror=null}})),t.createElement(Xh,{autoFocus:!0,value:a,onChange:e=>l(e.target.value),placeholder:"Brand Image",label:"Caption"})),t.createElement("div",{className:"neeto-editor-image-editor__footer"},t.createElement(ed,{size:"large",label:"Proceed",disabled:c,onClick:d}),t.createElement(ed,{size:"large",label:"Cancel",style:"text",onClick:o})))},tf=e=>{let{editor:n,isOpen:r,onClose:i}=e;const o=n&&n.view.state.selection.node;return t.createElement(Zh,{isOpen:r,onClose:i},t.createElement("div",{className:"neeto-editor-image-uploader"},t.createElement("div",{className:"neeto-editor-image-uploader__content"},t.createElement(ef,{editor:n,onClose:i,url:null==o?void 0:o.attrs.src,alt:null==o?void 0:o.attrs.alt}))))},nf=e=>{let{editor:t,isImageEditorModalOpen:n,setIsImageEditorModalOpen:r}=e;return[{Icon:Pp,command:()=>t.chain().focus().setImageAttributes({float:"left",align:"none"}).run(),active:t.isActive("image",{float:"left",align:"none"}),optionName:"Float Left"},{Icon:wp,command:()=>t.chain().focus().setImageAttributes({float:"none",align:"center"}).run(),active:t.isActive("image",{float:"none",align:"center"}),optionName:"Align Center"},{Icon:eh,command:()=>t.chain().focus().setImageAttributes({float:"right",align:"none"}).run(),active:t.isActive("image",{float:"right",align:"center"}),optionName:"Float Right"},{Icon:Op,command:()=>r(!0),active:n,optionName:"Caption"},{Icon:Ep,command:()=>t.commands.deleteSelection(),active:!1,optionName:"Remove"}]},rf=e=>{let{Icon:n,command:r,active:i,optionName:o}=e;return t.createElement(Qu,{content:Tu(o),position:"top",delay:[500]},t.createElement("div",{className:Sc("neeto-editor-bubble-menu__item",{active:i}),onClick:r,"data-cy":"neeto-editor-bubble-menu-".concat(o,"-option")},t.createElement(n,{size:20})))},of=e=>{let{editor:n,isImageEditorModalOpen:r,setIsImageEditorModalOpen:i}=e;return nf({editor:n,isImageEditorModalOpen:r,setIsImageEditorModalOpen:i}).map((e=>t.createElement(rf,x({key:e.optionName},e))))},sf=/[(http(s)?)://(www.)?a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_+.~#?&//=]*)/,af=/^((?:https?:)?\/\/)?((?:www|m)\.)?((?:youtube\.com|youtu.be))(\/(?:[\w-]+\?v=|embed\/|v\/)?)([\w-]+)(\S+)?$/,lf=/((?:http|https):\/\/)?(www\.|player\.)?vimeo\.com\/(?:channels\/(?:\w+\/)?|groups\/([^/]*)\/videos\/|(?:manage\/)?videos?\/|)(\d+)(?:(?:\/|\?h=)(\w+))?(?:|\/\?)/,cf=e=>{let{editor:n,handleClose:r,handleAnimateInvalidLink:s}=e;const[a,l]=i("");o((()=>{l(n.getAttributes("link").href||"")}),[]);const c=()=>{sf.test(a)?(n.chain().focus().setLink({href:a}).run(),r()):Iu(a)?(n.chain().focus().unsetLink().run(),r()):(l(""),s())};return t.createElement("div",{onKeyDown:e=>{"Escape"===e.key?r():"Enter"===e.key&&c()},className:"neeto-editor-bubble-menu__link"},t.createElement("input",{autoFocus:!0,name:"url",value:a,placeholder:"Paste or type a link...",onChange:e=>{let{target:{value:t}}=e;return l(t)},className:"neeto-editor-bubble-menu-link__input","data-cy":"neeto-editor-link-input"}),t.createElement(ed,{style:"icon",icon:Ep,onClick:()=>{a?(l(""),n.chain().focus().unsetLink().run()):r()},"data-cy":"neeto-editor-link-cancel-button"}))},uf=e=>{let{editor:n,options:r,setIsInvalidLink:o,isLinkOptionActive:s,setIsLinkOptionActive:a}=e;const[l,c]=i(!1),u=(e=>{let{editor:t,setIsLinkOptionActive:n}=e;return[{Icon:ih,command:()=>t.chain().focus().toggleBold().run(),active:t.isActive("bold"),optionName:"bold"},{Icon:ph,command:()=>t.chain().focus().toggleItalic().run(),active:t.isActive("italic"),optionName:"italic"},{Icon:yh,command:()=>t.chain().focus().toggleUnderline().run(),active:t.isActive("underline"),optionName:"underline"},{Icon:sh,command:()=>t.chain().focus().toggleStrike().run(),active:t.isActive("strike"),optionName:"strike"},{Icon:Bp,command:()=>n(!0),active:t.isActive("link"),optionName:"link"},{Icon:kp,command:()=>t.chain().focus().toggleCode().run(),active:t.isActive("code"),optionName:"code-block"},{Icon:Ap,command:()=>t.chain().focus().toggleHighlight().run(),active:t.isActive("highlight"),optionName:"highlight"}]})({editor:n,setIsLinkOptionActive:a}).filter((e=>{let{optionName:t}=e;return r.includes(t)})),d=(e=>{let{editor:t}=e;return[{optionName:"Heading 1",active:t.isActive("heading",{level:1}),command:()=>t.chain().focus().setNode("heading",{level:1}).run()},{optionName:"Heading 2",active:t.isActive("heading",{level:2}),command:()=>t.chain().focus().setNode("heading",{level:2}).run()},{optionName:"Heading 3",active:t.isActive("heading",{level:3}),command:()=>t.chain().focus().setNode("heading",{level:3}).run()},{optionName:"Ordered List",active:t.isActive("orderedList"),command:()=>t.chain().focus().toggleOrderedList().run()},{optionName:"Bulleted List",active:t.isActive("bulletList"),command:()=>t.chain().focus().toggleBulletList().run()},{optionName:"Paragraph",active:t.isActive("paragraph"),command:()=>t.chain().focus().setNode("paragraph").run()}]})({editor:n}),p=(e=>{var t;return(null===(t=e.find((e=>e.active)))||void 0===t?void 0:t.optionName)||"Paragraph"})(d),h=()=>{o(!0),setTimeout((()=>{o(!1)}),1e3)},f=()=>c(!1);return s?t.createElement(cf,{editor:n,handleClose:()=>a(!1),handleAnimateInvalidLink:h}):t.createElement(t.Fragment,null,t.createElement(Ku,{interactive:!0,placement:"bottom",visible:l,onClickOutside:f,content:d.map((e=>{let{optionName:n,command:r}=e;return t.createElement("button",{type:"button",key:n,onClick:()=>{r(),f()},className:"neeto-editor-bubble-menu__item neeto-editor-bubble-menu__dropdown"},n)}))},t.createElement("button",{type:"button",onClick:()=>c((e=>!e)),className:"neeto-editor-bubble-menu__item neeto-editor-bubble-menu__dropdown-target"},p,t.createElement(Dp,{size:14}))),u.map((e=>t.createElement(rf,x({},e,{key:e.optionName})))))},df=e=>{let{editor:n,options:r}=e;const[o,s]=i(!1),[a,l]=i(!1),[c,u]=i(!1),d=n&&n.view.state.selection.node,p=d&&"image"===d.type.name,h=[C.BOLD,C.ITALIC,C.UNDERLINE,C.STRIKETHROUGH,C.LINK],f=Iu(r.filter((e=>h.includes(e))));return!n||!p&&f?null:t.createElement("div",null,t.createElement(hc,{editor:n,tippyOptions:{arrow:ml,zIndex:99999,onHide:()=>l(!1)},className:Sc("neeto-editor-bubble-menu",{"neeto-editor-bubble-menu-animate-shake":o})},p?t.createElement(of,{editor:n,isImageEditorModalOpen:c,setIsImageEditorModalOpen:u}):t.createElement(uf,{editor:n,options:r,setIsInvalidLink:s,isLinkOptionActive:a,setIsLinkOptionActive:l})),t.createElement(tf,{editor:n,isOpen:c,onClose:()=>u(!1)}))},pf=e=>{let{count:n,limit:r,strategy:i}=e;const o="limit"===i&&r;return t.createElement("p",{className:"neeto-editor-character-count","data-cy":"neeto-editor-character-count"},o?"".concat(r-n," characters remaining"):"".concat(n," characters"))};var hf={exports:{}},ff="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";function mf(){}function gf(){}gf.resetWarningCache=mf;hf.exports=function(){function e(e,t,n,r,i,o){if(o!==ff){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. "+"Use PropTypes.checkPropTypes() to call them. "+"Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:gf,resetWarningCache:mf};return n.PropTypes=n,n}();const bf=()=>document.documentElement.style.setProperty("--focus-background-color","rgba(234, 243, 252, 0.5)"),yf=()=>document.documentElement.style.setProperty("--focus-background-color","transparent"),vf={onMouseEnter:bf,onMouseLeave:yf},wf=20,xf="#2F3941",Ef="#87929D",Mf=e=>{let{icon:n,iconActive:r=!0,tooltipProps:i,highlight:o=!1,...s}=e;return t.createElement(Qu,i,t.createElement("button",x({className:"neeto-editor-fixed-menu__item",type:"button"},function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]?vf:{}}(o),s),t.createElement(n,{color:r?xf:Ef,size:wf})))};Mf.propTypes={icon:hf.exports.oneOfType([hf.exports.element,hf.exports.func]),iconActive:hf.exports.bool,onClick:hf.exports.func,tooltipProps:hf.exports.object},e.createContext(),e.createContext();var kf=function(e){return e.reduce((function(e,t){var n=t[0],r=t[1];return e[n]=r,e}),{})},_f="undefined"!=typeof window&&window.document&&window.document.createElement?e.useLayoutEffect:e.useEffect,Df="undefined"!=typeof Element,Cf="function"==typeof Map,Of="function"==typeof Set,Nf="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;function Tf(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;var n,r,i,o;if(Array.isArray(e)){if((n=e.length)!=t.length)return!1;for(r=n;0!=r--;)if(!Tf(e[r],t[r]))return!1;return!0}if(Cf&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;for(o=e.entries();!(r=o.next()).done;)if(!Tf(r.value[1],t.get(r.value[0])))return!1;return!0}if(Of&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(Nf&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if((n=e.length)!=t.length)return!1;for(r=n;0!=r--;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if((n=(i=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;if(Df&&e instanceof Element)return!1;for(r=n;0!=r--;)if(("_owner"!==i[r]&&"__v"!==i[r]&&"__o"!==i[r]||!e.$$typeof)&&!Tf(e[i[r]],t[i[r]]))return!1;return!0}return e!=e&&t!=t}var Sf=function(e,t){try{return Tf(e,t)}catch(e){if((e.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw e}},Af=[];const If=()=>{},Lf=(n,r)=>{let{label:s,isOpen:a,onVisible:l=If,onClose:u=If,ulProps:h,position:f,children:m,className:g,customTarget:b,closeOnEsc:y=!0,closeOnSelect:v=!0,closeOnOutsideClick:w=!0,dropdownModifiers:E=[],...M}=n;const k=c(),_=b(),D=!(null==a),[C,O]=i(!1),[N,T]=i(null),[S,A]=i(null),{styles:I,attributes:L}=function(t,n,r){void 0===r&&(r={});var i=e.useRef(null),o={onFirstUpdate:r.onFirstUpdate,placement:r.placement||"bottom",strategy:r.strategy||"absolute",modifiers:r.modifiers||Af},s=e.useState({styles:{popper:{position:o.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),a=s[0],l=s[1],c=e.useMemo((function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(e){var t=e.state,n=Object.keys(t.elements);p.flushSync((function(){l({styles:kf(n.map((function(e){return[e,t.styles[e]||{}]}))),attributes:kf(n.map((function(e){return[e,t.attributes[e]]})))})}))},requires:["computeStyles"]}}),[]),u=e.useMemo((function(){var e={onFirstUpdate:o.onFirstUpdate,placement:o.placement,strategy:o.strategy,modifiers:[].concat(o.modifiers,[c,{name:"applyStyles",enabled:!1}])};return Sf(i.current,e)?i.current||e:(i.current=e,e)}),[o.onFirstUpdate,o.placement,o.strategy,o.modifiers,c]),d=e.useRef();return _f((function(){d.current&&d.current.setOptions(u)}),[u]),_f((function(){if(null!=t&&null!=n){var e=(r.createPopper||fl)(t,n,u);return d.current=e,function(){e.destroy(),d.current=null}}}),[t,n,r.createPopper]),{state:d.current?d.current.state:null,styles:a.styles,attributes:a.attributes,update:d.current?d.current.update:null,forceUpdate:d.current?d.current.forceUpdate:null}}(N,S,{placement:f||"bottom-end",modifiers:E});d(r,(()=>({close:()=>O(!1),visible:C})));const j=()=>{D||O(!1),u()};return qh("esc",y?j:If),nd(k,w?j:If),o((()=>{D&&O(a)}),[a]),o((()=>{C&&l()}),[C]),t.createElement("div",x({ref:k,className:Sc("ne-dropdown__wrapper",{[g]:g})},M),b?t.createElement("div",{ref:T,onClick:()=>{!D&&O(!C)}},_):t.createElement("div",null,s,t.createElement(Dp,null)),C&&t.createElement("ul",x({className:"ne-dropdown__popup",ref:A,onClick:()=>{v&&j()},"data-cy":"neeto-editor-".concat(Su(s),"-dropdown-container")},h,{style:{display:"block",...I.offset,...I.popper}},L.popper),m))};Lf.displayName="Dropdown";var jf=s(Lf);function zf(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ff,Pf={exports:{}},Rf={exports:{}},Bf=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}},Uf=Bf,$f=Object.prototype.toString,Hf=(Ff=Object.create(null),function(e){var t=$f.call(e);return Ff[t]||(Ff[t]=t.slice(8,-1).toLowerCase())});function Wf(e){return e=e.toLowerCase(),function(t){return Hf(t)===e}}function Vf(e){return Array.isArray(e)}function qf(e){return void 0===e}var Yf=Wf("ArrayBuffer");function Kf(e){return null!==e&&"object"==typeof e}function Qf(e){if("object"!==Hf(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var Gf=Wf("Date"),Zf=Wf("File"),Jf=Wf("Blob"),Xf=Wf("FileList");function em(e){return"[object Function]"===$f.call(e)}var tm=Wf("URLSearchParams");function nm(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),Vf(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}var rm,im=(rm="undefined"!=typeof Uint8Array&&Object.getPrototypeOf(Uint8Array),function(e){return rm&&e instanceof rm}),om={isArray:Vf,isArrayBuffer:Yf,isBuffer:function(e){return null!==e&&!qf(e)&&null!==e.constructor&&!qf(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){var t="[object FormData]";return e&&("function"==typeof FormData&&e instanceof FormData||$f.call(e)===t||em(e.toString)&&e.toString()===t)},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&Yf(e.buffer)},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:Kf,isPlainObject:Qf,isUndefined:qf,isDate:Gf,isFile:Zf,isBlob:Jf,isFunction:em,isStream:function(e){return Kf(e)&&em(e.pipe)},isURLSearchParams:tm,isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:nm,merge:function e(){var t={};function n(n,r){Qf(t[r])&&Qf(n)?t[r]=e(t[r],n):Qf(n)?t[r]=e({},n):Vf(n)?t[r]=n.slice():t[r]=n}for(var r=0,i=arguments.length;r<i;r++)nm(arguments[r],n);return t},extend:function(e,t,n){return nm(t,(function(t,r){e[r]=n&&"function"==typeof t?Uf(t,n):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,n,r){e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,n&&Object.assign(e.prototype,n)},toFlatObject:function(e,t,n){var r,i,o,s={};t=t||{};do{for(i=(r=Object.getOwnPropertyNames(e)).length;i-- >0;)s[o=r[i]]||(t[o]=e[o],s[o]=!0);e=Object.getPrototypeOf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:Hf,kindOfTest:Wf,endsWith:function(e,t,n){e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;var r=e.indexOf(t,n);return-1!==r&&r===n},toArray:function(e){if(!e)return null;var t=e.length;if(qf(t))return null;for(var n=new Array(t);t-- >0;)n[t]=e[t];return n},isTypedArray:im,isFileList:Xf},sm=om;function am(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var lm=function(e,t,n){if(!t)return e;var r;if(n)r=n(t);else if(sm.isURLSearchParams(t))r=t.toString();else{var i=[];sm.forEach(t,(function(e,t){null!=e&&(sm.isArray(e)?t+="[]":e=[e],sm.forEach(e,(function(e){sm.isDate(e)?e=e.toISOString():sm.isObject(e)&&(e=JSON.stringify(e)),i.push(am(t)+"="+am(e))})))})),r=i.join("&")}if(r){var o=e.indexOf("#");-1!==o&&(e=e.slice(0,o)),e+=(-1===e.indexOf("?")?"?":"&")+r}return e},cm=om;function um(){this.handlers=[]}um.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},um.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},um.prototype.forEach=function(e){cm.forEach(this.handlers,(function(t){null!==t&&e(t)}))};var dm,pm,hm=um,fm=om;function mm(){if(pm)return dm;pm=1;var e=om;function t(e,t,n,r,i){Error.call(this),this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}e.inherits(t,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var n=t.prototype,r={};return["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED"].forEach((function(e){r[e]={value:e}})),Object.defineProperties(t,r),Object.defineProperty(n,"isAxiosError",{value:!0}),t.from=function(r,i,o,s,a,l){var c=Object.create(n);return e.toFlatObject(r,c,(function(e){return e!==Error.prototype})),t.call(c,r.message,i,o,s,a),c.name=r.name,l&&Object.assign(c,l),c},dm=t}var gm,bm,ym,vm,wm,xm,Em={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};function Mm(){if(bm)return gm;bm=1;var e=om;return gm=function(t,n){n=n||new FormData;var r=[];function i(t){return null===t?"":e.isDate(t)?t.toISOString():e.isArrayBuffer(t)||e.isTypedArray(t)?"function"==typeof Blob?new Blob([t]):Buffer.from(t):t}return function t(o,s){if(e.isPlainObject(o)||e.isArray(o)){if(-1!==r.indexOf(o))throw Error("Circular reference detected in "+s);r.push(o),e.forEach(o,(function(r,o){if(!e.isUndefined(r)){var a,l=s?s+"."+o:o;if(r&&!s&&"object"==typeof r)if(e.endsWith(o,"{}"))r=JSON.stringify(r);else if(e.endsWith(o,"[]")&&(a=e.toArray(r)))return void a.forEach((function(t){!e.isUndefined(t)&&n.append(l,i(t))}));t(r,l)}})),r.pop()}else n.append(s,i(o))}(t),n},gm}function km(){if(vm)return ym;vm=1;var e=mm();return ym=function(t,n,r){var i=r.config.validateStatus;r.status&&i&&!i(r.status)?n(new e("Request failed with status code "+r.status,[e.ERR_BAD_REQUEST,e.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):t(r)}}function _m(){if(xm)return wm;xm=1;var e=om;return wm=e.isStandardBrowserEnv()?{write:function(t,n,r,i,o,s){var a=[];a.push(t+"="+encodeURIComponent(n)),e.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),e.isString(i)&&a.push("path="+i),e.isString(o)&&a.push("domain="+o),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}},wm}var Dm,Cm,Om,Nm,Tm,Sm,Am,Im,Lm,jm,zm,Fm,Pm=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)},Rm=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e},Bm=function(e,t){return e&&!Pm(t)?Rm(e,t):t};function Um(){if(Cm)return Dm;Cm=1;var e=om,t=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];return Dm=function(n){var r,i,o,s={};return n?(e.forEach(n.split("\n"),(function(n){if(o=n.indexOf(":"),r=e.trim(n.substr(0,o)).toLowerCase(),i=e.trim(n.substr(o+1)),r){if(s[r]&&t.indexOf(r)>=0)return;s[r]="set-cookie"===r?(s[r]?s[r]:[]).concat([i]):s[r]?s[r]+", "+i:i}})),s):s},Dm}function $m(){if(Nm)return Om;Nm=1;var e=om;return Om=e.isStandardBrowserEnv()?function(){var t,n=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function i(e){var t=e;return n&&(r.setAttribute("href",t),t=r.href),r.setAttribute("href",t),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return t=i(window.location.href),function(n){var r=e.isString(n)?i(n):n;return r.protocol===t.protocol&&r.host===t.host}}():function(){return!0}}function Hm(){if(Sm)return Tm;Sm=1;var e=mm();function t(t){e.call(this,null==t?"canceled":t,e.ERR_CANCELED),this.name="CanceledError"}return om.inherits(t,e,{__CANCEL__:!0}),Tm=t}function Wm(){return Im||(Im=1,Am=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}),Am}function Vm(){if(jm)return Lm;jm=1;var e=om,t=km(),n=_m(),r=lm,i=Bm,o=Um(),s=$m(),a=Em,l=mm(),c=Hm(),u=Wm();return Lm=function(d){return new Promise((function(p,h){var f,m=d.data,g=d.headers,b=d.responseType;function y(){d.cancelToken&&d.cancelToken.unsubscribe(f),d.signal&&d.signal.removeEventListener("abort",f)}e.isFormData(m)&&e.isStandardBrowserEnv()&&delete g["Content-Type"];var v=new XMLHttpRequest;if(d.auth){var w=d.auth.username||"",x=d.auth.password?unescape(encodeURIComponent(d.auth.password)):"";g.Authorization="Basic "+btoa(w+":"+x)}var E=i(d.baseURL,d.url);function M(){if(v){var e="getAllResponseHeaders"in v?o(v.getAllResponseHeaders()):null,n={data:b&&"text"!==b&&"json"!==b?v.response:v.responseText,status:v.status,statusText:v.statusText,headers:e,config:d,request:v};t((function(e){p(e),y()}),(function(e){h(e),y()}),n),v=null}}if(v.open(d.method.toUpperCase(),r(E,d.params,d.paramsSerializer),!0),v.timeout=d.timeout,"onloadend"in v?v.onloadend=M:v.onreadystatechange=function(){v&&4===v.readyState&&(0!==v.status||v.responseURL&&0===v.responseURL.indexOf("file:"))&&setTimeout(M)},v.onabort=function(){v&&(h(new l("Request aborted",l.ECONNABORTED,d,v)),v=null)},v.onerror=function(){h(new l("Network Error",l.ERR_NETWORK,d,v,v)),v=null},v.ontimeout=function(){var e=d.timeout?"timeout of "+d.timeout+"ms exceeded":"timeout exceeded",t=d.transitional||a;d.timeoutErrorMessage&&(e=d.timeoutErrorMessage),h(new l(e,t.clarifyTimeoutError?l.ETIMEDOUT:l.ECONNABORTED,d,v)),v=null},e.isStandardBrowserEnv()){var k=(d.withCredentials||s(E))&&d.xsrfCookieName?n.read(d.xsrfCookieName):void 0;k&&(g[d.xsrfHeaderName]=k)}"setRequestHeader"in v&&e.forEach(g,(function(e,t){void 0===m&&"content-type"===t.toLowerCase()?delete g[t]:v.setRequestHeader(t,e)})),e.isUndefined(d.withCredentials)||(v.withCredentials=!!d.withCredentials),b&&"json"!==b&&(v.responseType=d.responseType),"function"==typeof d.onDownloadProgress&&v.addEventListener("progress",d.onDownloadProgress),"function"==typeof d.onUploadProgress&&v.upload&&v.upload.addEventListener("progress",d.onUploadProgress),(d.cancelToken||d.signal)&&(f=function(e){v&&(h(!e||e&&e.type?new c:e),v.abort(),v=null)},d.cancelToken&&d.cancelToken.subscribe(f),d.signal&&(d.signal.aborted?f():d.signal.addEventListener("abort",f))),m||(m=null);var _=u(E);_&&-1===["http","https","file"].indexOf(_)?h(new l("Unsupported protocol "+_+":",l.ERR_BAD_REQUEST,d)):v.send(m)}))},Lm}var qm=om,Ym=function(e,t){fm.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))},Km=mm(),Qm=Em,Gm=Mm(),Zm={"Content-Type":"application/x-www-form-urlencoded"};function Jm(e,t){!qm.isUndefined(e)&&qm.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var Xm,eg={transitional:Qm,adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(Xm=Vm()),Xm),transformRequest:[function(e,t){if(Ym(t,"Accept"),Ym(t,"Content-Type"),qm.isFormData(e)||qm.isArrayBuffer(e)||qm.isBuffer(e)||qm.isStream(e)||qm.isFile(e)||qm.isBlob(e))return e;if(qm.isArrayBufferView(e))return e.buffer;if(qm.isURLSearchParams(e))return Jm(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();var n,r=qm.isObject(e),i=t&&t["Content-Type"];if((n=qm.isFileList(e))||r&&"multipart/form-data"===i){var o=this.env&&this.env.FormData;return Gm(n?{"files[]":e}:e,o&&new o)}return r||"application/json"===i?(Jm(t,"application/json"),function(e,t,n){if(qm.isString(e))try{return(t||JSON.parse)(e),qm.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||eg.transitional,n=t&&t.silentJSONParsing,r=t&&t.forcedJSONParsing,i=!n&&"json"===this.responseType;if(i||r&&qm.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(i){if("SyntaxError"===e.name)throw Km.from(e,Km.ERR_BAD_RESPONSE,this,null,this.response);throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Fm?zm:(Fm=1,zm=null)},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};qm.forEach(["delete","get","head"],(function(e){eg.headers[e]={}})),qm.forEach(["post","put","patch"],(function(e){eg.headers[e]=qm.merge(Zm)}));var tg,ng,rg=eg,ig=om,og=rg;function sg(){return ng?tg:(ng=1,tg=function(e){return!(!e||!e.__CANCEL__)})}var ag=om,lg=function(e,t,n){var r=this||og;return ig.forEach(n,(function(n){e=n.call(r,e,t)})),e},cg=sg(),ug=rg,dg=Hm();function pg(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new dg}var hg,fg,mg=om,gg=function(e,t){t=t||{};var n={};function r(e,t){return mg.isPlainObject(e)&&mg.isPlainObject(t)?mg.merge(e,t):mg.isPlainObject(t)?mg.merge({},t):mg.isArray(t)?t.slice():t}function i(n){return mg.isUndefined(t[n])?mg.isUndefined(e[n])?void 0:r(void 0,e[n]):r(e[n],t[n])}function o(e){if(!mg.isUndefined(t[e]))return r(void 0,t[e])}function s(n){return mg.isUndefined(t[n])?mg.isUndefined(e[n])?void 0:r(void 0,e[n]):r(void 0,t[n])}function a(n){return n in t?r(e[n],t[n]):n in e?r(void 0,e[n]):void 0}var l={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a};return mg.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=l[e]||i,r=t(e);mg.isUndefined(r)&&t!==a||(n[e]=r)})),n};function bg(){return fg?hg:(fg=1,hg={version:"0.27.2"})}var yg=bg().version,vg=mm(),wg={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){wg[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var xg={};wg.transitional=function(e,t,n){function r(e,t){return"[Axios v"+yg+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,i,o){if(!1===e)throw new vg(r(i," has been removed"+(t?" in "+t:"")),vg.ERR_DEPRECATED);return t&&!xg[i]&&(xg[i]=!0,console.warn(r(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,i,o)}};var Eg,Mg,kg,_g,Dg,Cg,Og={assertOptions:function(e,t,n){if("object"!=typeof e)throw new vg("options must be an object",vg.ERR_BAD_OPTION_VALUE);for(var r=Object.keys(e),i=r.length;i-- >0;){var o=r[i],s=t[o];if(s){var a=e[o],l=void 0===a||s(a,o,e);if(!0!==l)throw new vg("option "+o+" must be "+l,vg.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new vg("Unknown option "+o,vg.ERR_BAD_OPTION)}},validators:wg},Ng=om,Tg=lm,Sg=hm,Ag=function(e){return pg(e),e.headers=e.headers||{},e.data=lg.call(e,e.data,e.headers,e.transformRequest),e.headers=ag.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),ag.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||ug.adapter)(e).then((function(t){return pg(e),t.data=lg.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return cg(t)||(pg(e),t&&t.response&&(t.response.data=lg.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))},Ig=gg,Lg=Bm,jg=Og,zg=jg.validators;function Fg(e){this.defaults=e,this.interceptors={request:new Sg,response:new Sg}}Fg.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=Ig(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var n=t.transitional;void 0!==n&&jg.assertOptions(n,{silentJSONParsing:zg.transitional(zg.boolean),forcedJSONParsing:zg.transitional(zg.boolean),clarifyTimeoutError:zg.transitional(zg.boolean)},!1);var r=[],i=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(i=i&&e.synchronous,r.unshift(e.fulfilled,e.rejected))}));var o,s=[];if(this.interceptors.response.forEach((function(e){s.push(e.fulfilled,e.rejected)})),!i){var a=[Ag,void 0];for(Array.prototype.unshift.apply(a,r),a=a.concat(s),o=Promise.resolve(t);a.length;)o=o.then(a.shift(),a.shift());return o}for(var l=t;r.length;){var c=r.shift(),u=r.shift();try{l=c(l)}catch(e){u(e);break}}try{o=Ag(l)}catch(e){return Promise.reject(e)}for(;s.length;)o=o.then(s.shift(),s.shift());return o},Fg.prototype.getUri=function(e){e=Ig(this.defaults,e);var t=Lg(e.baseURL,e.url);return Tg(t,e.params,e.paramsSerializer)},Ng.forEach(["delete","get","head","options"],(function(e){Fg.prototype[e]=function(t,n){return this.request(Ig(n||{},{method:e,url:t,data:(n||{}).data}))}})),Ng.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,i){return this.request(Ig(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Fg.prototype[e]=t(),Fg.prototype[e+"Form"]=t(!0)}));var Pg=om,Rg=Bf,Bg=Fg,Ug=gg;var $g=function e(t){var n=new Bg(t),r=Rg(Bg.prototype.request,n);return Pg.extend(r,Bg.prototype,n),Pg.extend(r,n),r.create=function(n){return e(Ug(t,n))},r}(rg);$g.Axios=Bg,$g.CanceledError=Hm(),$g.CancelToken=function(){if(Mg)return Eg;Mg=1;var e=Hm();function t(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var n;this.promise=new Promise((function(e){n=e}));var r=this;this.promise.then((function(e){if(r._listeners){var t,n=r._listeners.length;for(t=0;t<n;t++)r._listeners[t](e);r._listeners=null}})),this.promise.then=function(e){var t,n=new Promise((function(e){r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},t((function(t){r.reason||(r.reason=new e(t),n(r.reason))}))}return t.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},t.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},t.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},t.source=function(){var e,n=new t((function(t){e=t}));return{token:n,cancel:e}},Eg=t}(),$g.isCancel=sg(),$g.VERSION=bg().version,$g.toFormData=Mm(),$g.AxiosError=mm(),$g.Cancel=$g.CanceledError,$g.all=function(e){return Promise.all(e)},$g.spread=_g?kg:(_g=1,kg=function(e){return function(t){return e.apply(null,t)}}),$g.isAxiosError=function(){if(Cg)return Dg;Cg=1;var e=om;return Dg=function(t){return e.isObject(t)&&!0===t.isAxiosError}}(),Rf.exports=$g,Rf.exports.default=$g;var Hg=Cc(Pf.exports=Rf.exports);function Wg(e){return e&&e.__esModule?e.default:e}function Vg(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var qg,Yg,Kg,Qg,Gg,Zg,Jg={},Xg=[],eb=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function tb(e,t){for(var n in t)e[n]=t[n];return e}function nb(e){var t=e.parentNode;t&&t.removeChild(e)}function rb(e,t,n){var r,i,o,s={};for(o in t)"key"==o?r=t[o]:"ref"==o?i=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?qg.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===s[o]&&(s[o]=e.defaultProps[o]);return ib(e,s,r,i,null)}function ib(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==i?++Kg:i};return null==i&&null!=Yg.vnode&&Yg.vnode(o),o}function ob(e){return e.children}function sb(e,t){this.props=e,this.context=t}function ab(e,t){if(null==t)return e.__?ab(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?ab(e):null}function lb(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return lb(e)}}function cb(e){(!e.__d&&(e.__d=!0)&&Qg.push(e)&&!ub.__r++||Zg!==Yg.debounceRendering)&&((Zg=Yg.debounceRendering)||Gg)(ub)}function ub(){for(var e;ub.__r=Qg.length;)e=Qg.sort((function(e,t){return e.__v.__b-t.__v.__b})),Qg=[],e.some((function(e){var t,n,r,i,o,s;e.__d&&(o=(i=(t=e).__v).__e,(s=t.__P)&&(n=[],(r=tb({},i)).__v=i.__v+1,vb(s,i,r,t.__n,void 0!==s.ownerSVGElement,null!=i.__h?[o]:null,n,null==o?ab(i):o,i.__h),wb(n,i),i.__e!=o&&lb(i)))}))}function db(e,t,n,r,i,o,s,a,l,c){var u,d,p,h,f,m,g,b=r&&r.__k||Xg,y=b.length;for(n.__k=[],u=0;u<t.length;u++)if(null!=(h=n.__k[u]=null==(h=t[u])||"boolean"==typeof h?null:"string"==typeof h||"number"==typeof h||"bigint"==typeof h?ib(null,h,null,null,h):Array.isArray(h)?ib(ob,{children:h},null,null,null):h.__b>0?ib(h.type,h.props,h.key,null,h.__v):h)){if(h.__=n,h.__b=n.__b+1,null===(p=b[u])||p&&h.key==p.key&&h.type===p.type)b[u]=void 0;else for(d=0;d<y;d++){if((p=b[d])&&h.key==p.key&&h.type===p.type){b[d]=void 0;break}p=null}vb(e,h,p=p||Jg,i,o,s,a,l,c),f=h.__e,(d=h.ref)&&p.ref!=d&&(g||(g=[]),p.ref&&g.push(p.ref,null,h),g.push(d,h.__c||f,h)),null!=f?(null==m&&(m=f),"function"==typeof h.type&&h.__k===p.__k?h.__d=l=pb(h,l,e):l=fb(e,h,p,b,f,l),"function"==typeof n.type&&(n.__d=l)):l&&p.__e==l&&l.parentNode!=e&&(l=ab(p))}for(n.__e=m,u=y;u--;)null!=b[u]&&("function"==typeof n.type&&null!=b[u].__e&&b[u].__e==n.__d&&(n.__d=ab(r,u+1)),Eb(b[u],b[u]));if(g)for(u=0;u<g.length;u++)xb(g[u],g[++u],g[++u])}function pb(e,t,n){for(var r,i=e.__k,o=0;i&&o<i.length;o++)(r=i[o])&&(r.__=e,t="function"==typeof r.type?pb(r,t,n):fb(n,r,r,i,r.__e,t));return t}function hb(e,t){return t=t||[],null==e||"boolean"==typeof e||(Array.isArray(e)?e.some((function(e){hb(e,t)})):t.push(e)),t}function fb(e,t,n,r,i,o){var s,a,l;if(void 0!==t.__d)s=t.__d,t.__d=void 0;else if(null==n||i!=o||null==i.parentNode)e:if(null==o||o.parentNode!==e)e.appendChild(i),s=null;else{for(a=o,l=0;(a=a.nextSibling)&&l<r.length;l+=2)if(a==i)break e;e.insertBefore(i,o),s=o}return void 0!==s?s:i.nextSibling}function mb(e,t,n){"-"===t[0]?e.setProperty(t,n):e[t]=null==n?"":"number"!=typeof n||eb.test(t)?n:n+"px"}function gb(e,t,n,r,i){var o;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||mb(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||mb(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r||e.addEventListener(t,o?yb:bb,o):e.removeEventListener(t,o?yb:bb,o);else if("dangerouslySetInnerHTML"!==t){if(i)t=t.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null!=n&&(!1!==n||"a"===t[0]&&"r"===t[1])?e.setAttribute(t,n):e.removeAttribute(t))}}function bb(e){this.l[e.type+!1](Yg.event?Yg.event(e):e)}function yb(e){this.l[e.type+!0](Yg.event?Yg.event(e):e)}function vb(e,t,n,r,i,o,s,a,l){var c,u,d,p,h,f,m,g,b,y,v,w=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(l=n.__h,a=t.__e=n.__e,t.__h=null,o=[a]),(c=Yg.__b)&&c(t);try{e:if("function"==typeof w){if(g=t.props,b=(c=w.contextType)&&r[c.__c],y=c?b?b.props.value:c.__:r,n.__c?m=(u=t.__c=n.__c).__=u.__E:("prototype"in w&&w.prototype.render?t.__c=u=new w(g,y):(t.__c=u=new sb(g,y),u.constructor=w,u.render=Mb),b&&b.sub(u),u.props=g,u.state||(u.state={}),u.context=y,u.__n=r,d=u.__d=!0,u.__h=[]),null==u.__s&&(u.__s=u.state),null!=w.getDerivedStateFromProps&&(u.__s==u.state&&(u.__s=tb({},u.__s)),tb(u.__s,w.getDerivedStateFromProps(g,u.__s))),p=u.props,h=u.state,d)null==w.getDerivedStateFromProps&&null!=u.componentWillMount&&u.componentWillMount(),null!=u.componentDidMount&&u.__h.push(u.componentDidMount);else{if(null==w.getDerivedStateFromProps&&g!==p&&null!=u.componentWillReceiveProps&&u.componentWillReceiveProps(g,y),!u.__e&&null!=u.shouldComponentUpdate&&!1===u.shouldComponentUpdate(g,u.__s,y)||t.__v===n.__v){u.props=g,u.state=u.__s,t.__v!==n.__v&&(u.__d=!1),u.__v=t,t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),u.__h.length&&s.push(u);break e}null!=u.componentWillUpdate&&u.componentWillUpdate(g,u.__s,y),null!=u.componentDidUpdate&&u.__h.push((function(){u.componentDidUpdate(p,h,f)}))}u.context=y,u.props=g,u.state=u.__s,(c=Yg.__r)&&c(t),u.__d=!1,u.__v=t,u.__P=e,c=u.render(u.props,u.state,u.context),u.state=u.__s,null!=u.getChildContext&&(r=tb(tb({},r),u.getChildContext())),d||null==u.getSnapshotBeforeUpdate||(f=u.getSnapshotBeforeUpdate(p,h)),v=null!=c&&c.type===ob&&null==c.key?c.props.children:c,db(e,Array.isArray(v)?v:[v],t,n,r,i,o,s,a,l),u.base=t.__e,t.__h=null,u.__h.length&&s.push(u),m&&(u.__E=u.__=null),u.__e=!1}else null==o&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=function(e,t,n,r,i,o,s,a){var l,c,u,d=n.props,p=t.props,h=t.type,f=0;if("svg"===h&&(i=!0),null!=o)for(;f<o.length;f++)if((l=o[f])&&"setAttribute"in l==!!h&&(h?l.localName===h:3===l.nodeType)){e=l,o[f]=null;break}if(null==e){if(null===h)return document.createTextNode(p);e=i?document.createElementNS("http://www.w3.org/2000/svg",h):document.createElement(h,p.is&&p),o=null,a=!1}if(null===h)d===p||a&&e.data===p||(e.data=p);else{if(o=o&&qg.call(e.childNodes),c=(d=n.props||Jg).dangerouslySetInnerHTML,u=p.dangerouslySetInnerHTML,!a){if(null!=o)for(d={},f=0;f<e.attributes.length;f++)d[e.attributes[f].name]=e.attributes[f].value;(u||c)&&(u&&(c&&u.__html==c.__html||u.__html===e.innerHTML)||(e.innerHTML=u&&u.__html||""))}if(function(e,t,n,r,i){var o;for(o in n)"children"===o||"key"===o||o in t||gb(e,o,null,n[o],r);for(o in t)i&&"function"!=typeof t[o]||"children"===o||"key"===o||"value"===o||"checked"===o||n[o]===t[o]||gb(e,o,t[o],n[o],r)}(e,p,d,i,a),u)t.__k=[];else if(f=t.props.children,db(e,Array.isArray(f)?f:[f],t,n,r,i&&"foreignObject"!==h,o,s,o?o[0]:n.__k&&ab(n,0),a),null!=o)for(f=o.length;f--;)null!=o[f]&&nb(o[f]);a||("value"in p&&void 0!==(f=p.value)&&(f!==d.value||f!==e.value||"progress"===h&&!f)&&gb(e,"value",f,d.value,!1),"checked"in p&&void 0!==(f=p.checked)&&f!==e.checked&&gb(e,"checked",f,d.checked,!1))}return e}(n.__e,t,n,r,i,o,s,l);(c=Yg.diffed)&&c(t)}catch(e){t.__v=null,(l||null!=o)&&(t.__e=a,t.__h=!!l,o[o.indexOf(a)]=null),Yg.__e(e,t,n)}}function wb(e,t){Yg.__c&&Yg.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){Yg.__e(e,t.__v)}}))}function xb(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){Yg.__e(e,n)}}function Eb(e,t,n){var r,i;if(Yg.unmount&&Yg.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||xb(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){Yg.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&Eb(r[i],t,"function"!=typeof e.type);n||null==e.__e||nb(e.__e),e.__e=e.__d=void 0}function Mb(e,t,n){return this.constructor(e,n)}function kb(e,t,n){var r,i,o;Yg.__&&Yg.__(e,t),i=(r="function"==typeof n)?null:n&&n.__k||t.__k,o=[],vb(t,e=(!r&&n||t).__k=rb(ob,null,[e]),i||Jg,Jg,void 0!==t.ownerSVGElement,!r&&n?[n]:i?null:t.firstChild?qg.call(t.childNodes):null,o,!r&&n?n:i?i.__e:t.firstChild,r),wb(o,e)}qg=Xg.slice,Yg={__e:function(e,t){for(var n,r,i;t=t.__;)if((n=t.__c)&&!n.__)try{if((r=n.constructor)&&null!=r.getDerivedStateFromError&&(n.setState(r.getDerivedStateFromError(e)),i=n.__d),null!=n.componentDidCatch&&(n.componentDidCatch(e),i=n.__d),i)return n.__E=n}catch(t){e=t}throw e}},Kg=0,sb.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=tb({},this.state),"function"==typeof e&&(e=e(tb({},n),this.props)),e&&tb(n,e),null!=e&&this.__v&&(t&&this.__h.push(t),cb(this))},sb.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),cb(this))},sb.prototype.render=ob,Qg=[],Gg="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,ub.__r=0;var _b=0;function Db(e,t,n,r,i){var o,s,a={};for(s in t)"ref"==s?o=t[s]:a[s]=t[s];var l={type:e,props:a,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--_b,__source:r,__self:i};if("function"==typeof e&&(o=e.defaultProps))for(s in o)void 0===a[s]&&(a[s]=o[s]);return Yg.vnode&&Yg.vnode(l),l}var Cb;Cb=JSON.parse('{"search":"Search","search_no_results_1":"Oh no!","search_no_results_2":"That emoji couldn’t be found","pick":"Pick an emoji…","add_custom":"Add custom emoji","categories":{"activity":"Activity","custom":"Custom","flags":"Flags","foods":"Food & Drink","frequent":"Frequently used","nature":"Animals & Nature","objects":"Objects","people":"Smileys & People","places":"Travel & Places","search":"Search Results","symbols":"Symbols"},"skins":{"1":"Default","2":"Light","3":"Medium-Light","4":"Medium","5":"Medium-Dark","6":"Dark","choose":"Choose default skin tone"}}');var Ob={autoFocus:{value:!1},emojiButtonColors:{value:null},emojiButtonRadius:{value:"100%"},emojiButtonSize:{value:36},emojiSize:{value:24},emojiVersion:{value:14,choices:[1,2,3,4,5,11,12,12.1,13,13.1,14]},icons:{value:"auto",choices:["auto","outline","solid"]},locale:{value:"en",choices:["en","ar","de","es","fa","fr","it","ja","nl","pl","pt","ru","uk","zh"]},maxFrequentRows:{value:4},navPosition:{value:"top",choices:["top","bottom","none"]},noCountryFlags:{value:!1},noResultsEmoji:{value:null},perLine:{value:9},previewEmoji:{value:null},previewPosition:{value:"bottom",choices:["top","bottom","none"]},searchPosition:{value:"sticky",choices:["sticky","static","none"]},set:{value:"native",choices:["native","apple","facebook","google","twitter"]},skin:{value:1,choices:[1,2,3,4,5,6]},skinTonePosition:{value:"preview",choices:["preview","search","none"]},theme:{value:"auto",choices:["auto","light","dark"]},categories:null,categoryIcons:null,custom:null,data:null,i18n:null,getImageURL:null,getSpritesheetURL:null,onAddCustomEmoji:null,onClickOutside:null,onEmojiSelect:null,stickySearch:{deprecated:!0,value:!0}};var Nb={set:function(e,t){try{window.localStorage[`emoji-mart.${e}`]=JSON.stringify(t)}catch(e){}},get:function(e){try{const t=window.localStorage[`emoji-mart.${e}`];if(t)return JSON.parse(t)}catch(e){}}},Tb=new Map;function Sb(e){if(Tb.has(e))return Tb.get(e);var t=Ab(e);return Tb.set(e,t),t}var Ab=function(){var e=null;try{e=document.createElement("canvas").getContext("2d")}catch(e){}if(!e)return function(){return!1};var t=25,n=20,r=Math.floor(t/2);return e.font=r+"px Arial, Sans-Serif",e.textBaseline="top",e.canvas.width=2*n,e.canvas.height=t,function(r){e.clearRect(0,0,2*n,t),e.fillStyle="#FF0000",e.fillText(r,0,22),e.fillStyle="#0000FF",e.fillText(r,n,22);for(var i=e.getImageData(0,0,n,t).data,o=i.length,s=0;s<o&&!i[s+3];s+=4);if(s>=o)return!1;var a=n+s/4%n,l=Math.floor(s/4/n),c=e.getImageData(a,l,1,1).data;return i[s]===c[0]&&i[s+2]===c[2]&&!(e.measureText(r).width>=n)}}();const Ib=[{v:14,emoji:"🫠"},{v:13.1,emoji:"😶‍🌫️"},{v:13,emoji:"🥸"},{v:12.1,emoji:"🧑‍🦰"},{v:12,emoji:"🥱"},{v:11,emoji:"🥰"},{v:5,emoji:"🤩"},{v:4,emoji:"👱‍♀️"},{v:3,emoji:"🤣"},{v:2,emoji:"👋🏻"},{v:1,emoji:"🙃"}];var Lb={latestVersion:function(){for(const{v:e,emoji:t}of Ib)if(Sb(t))return e},noCountryFlags:function(){return!Sb("🇨🇦")}};const jb=["+1","grinning","kissing_heart","heart_eyes","laughing","stuck_out_tongue_winking_eye","sweat_smile","joy","scream","disappointed","unamused","weary","sob","sunglasses","heart"];let zb=null;var Fb={add:function(e){zb||(zb=Nb.get("frequently")||{});const t=e.id||e;t&&(zb[t]||(zb[t]=0),zb[t]+=1,Nb.set("last",t),Nb.set("frequently",zb))},get:function({maxFrequentRows:e,perLine:t}){if(!e)return[];zb||(zb=Nb.get("frequently"));let n=[];if(!zb){zb={};for(let e in jb.slice(0,t)){const r=jb[e];zb[r]=t-e,n.push(r)}return n}const r=e*t,i=Nb.get("last");for(let e in zb)n.push(e);if(n.sort(((e,t)=>{const n=zb[t],r=zb[e];return n==r?e.localeCompare(t):n-r})),n.length>r){const e=n.slice(r);n=n.slice(0,r);for(let t of e)t!=i&&delete zb[t];i&&-1==n.indexOf(i)&&(delete zb[n[n.length-1]],n.splice(-1,1,i)),Nb.set("frequently",zb)}return n}};let Pb=null;var Rb={search:async function(e,{maxResults:t}={}){if(!e||!e.trim().length)return null;t||(t=90),await qb();const n=e.toLowerCase().replace(/(\w)-/,"$1 ").split(/[\s|,]+/).filter(((e,t,n)=>e.trim()&&n.indexOf(e)==t));if(!n.length)return;let r,i,o=Pb||(Pb=Object.values($b.emojis));for(const e of n){if(!o.length)break;r=[],i={};for(const t of o){if(!t.search)continue;const n=t.search.indexOf(`,${e}`);-1!=n&&(r.push(t),i[t.id]||(i[t.id]=0),i[t.id]+=t.id==e?0:n+1)}o=r}return r.length<2||(r.sort(((e,t)=>{const n=i[e.id],r=i[t.id];return n==r?e.id.localeCompare(t.id):n-r})),r.length>t&&(r=r.slice(0,t))),r},get:function(e){return e.id?e:$b.emojis[e]||$b.emojis[$b.aliases[e]]||$b.emojis[$b.natives[e]]},reset:function(){Pb=null},SHORTCODES_REGEX:/^(?:\:([^\:]+)\:)(?:\:skin-tone-(\d)\:)?$/};const Bb=["checkered_flag","crossed_flags","pirate_flag","rainbow-flag","transgender_flag","triangular_flag_on_post","waving_black_flag","waving_white_flag"];let Ub=null,$b=null;async function Hb(e){const t=await fetch(e);return await t.json()}let Wb=null,Vb=null;function qb(e){return Wb||(Wb=new Promise((e=>{Vb=e}))),e&&async function(e){let{emojiVersion:t,set:n,locale:r}=e;if(t||(t=Ob.emojiVersion.value),n||(n=Ob.set.value),r||(r=Ob.locale.value),$b)$b.categories=$b.categories.filter((e=>!!!e.name));else{$b=("function"==typeof e.data?await e.data():e.data)||await Hb(`https://cdn.jsdelivr.net/npm/@emoji-mart/data@latest/sets/${t}/${n}.json`),$b.emoticons={},$b.natives={},$b.categories.unshift({id:"frequent",emojis:[]});for(const e in $b.aliases){const t=$b.aliases[e],n=$b.emojis[t];n&&(n.aliases||(n.aliases=[]),n.aliases.push(e))}}Ub||(Ub=("function"==typeof e.i18n?await e.i18n():e.i18n)||("en"==r?Wg(Cb):await Hb(`https://cdn.jsdelivr.net/npm/@emoji-mart/data@latest/i18n/${r}.json`)));if(e.custom)for(let t in e.custom){t=parseInt(t);const n=e.custom[t],r=e.custom[t-1];if(!n.emojis||!n.emojis.length)continue;n.id||(n.id=`custom_${t+1}`),n.name||(n.name=Ub.categories.custom),r&&!n.icon&&(n.target=r.target||r),$b.categories.push(n);const i=[];for(const e of n.emojis)i.indexOf(e.id)>-1||($b.emojis[e.id]=e,i.push(e.id));n.emojis=i}e.categories&&($b.categories=$b.categories.filter((t=>-1!=e.categories.indexOf(t.id))).sort(((t,n)=>e.categories.indexOf(t.id)-e.categories.indexOf(n.id))));let i=null,o=null;"native"==n&&(i=Lb.latestVersion(),o=e.noCountryFlags||Lb.noCountryFlags());let s=$b.categories.length,a=!1;for(;s--;){const t=$b.categories[s];if("frequent"==t.id&&(t.emojis=Fb.get(e)),!t.emojis||!t.emojis.length){$b.categories.splice(s,1);continue}const{categoryIcons:n}=e;if(n){const e=n[t.id];e&&!t.icon&&(t.icon=e)}let r=t.emojis.length;for(;r--;){const e=$b.emojis[t.emojis[r]],n=()=>{t.emojis.splice(r,1)};if(e)if(i&&e.version>i)n();else if(!o||"flags"!=t.id||Bb.includes(e.id)){if(!e.search){if(a=!0,e.search=","+[[e.id,!1],[e.name,!0],[e.keywords,!1],[e.emoticons,!1]].map((([e,t])=>{if(e)return(Array.isArray(e)?e:[e]).map((e=>(t?e.split(/[-|_|\s]+/):[e]).map((e=>e.toLowerCase())))).flat()})).flat().filter((e=>e&&e.trim())).join(","),e.emoticons)for(const t of e.emoticons)$b.emoticons[t]||($b.emoticons[t]=e.id);let t=0;for(const n of e.skins){if(!n)continue;t++;const{native:r}=n;r&&($b.natives[r]=e.id,e.search+=`,${r}`);const i=1==t?"":`:skin-tone-${t}:`;n.shortcodes=`:${e.id}:${i}`}}}else n();else n()}}a&&Rb.reset();Vb()}(e),Wb}function Yb(e,t,n){e||(e={});const r={};for(let i in t)r[i]=Kb(i,e,t,n);return r}function Kb(e,t,n,r){const i=n[e];let o=r&&r.getAttribute(e)||(null!=t[e]&&null!=t[e]?t[e]:null);return i?(null!=o&&i.value&&typeof i.value!=typeof o&&(o="boolean"==typeof i.value?"false"!=o:i.value.constructor(o)),(null==o||i.choices&&-1==i.choices.indexOf(o))&&(o=i.value),o):o}var Qb={categories:{activity:{outline:Db("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:Db("path",{d:"M12 0C5.373 0 0 5.372 0 12c0 6.627 5.373 12 12 12 6.628 0 12-5.373 12-12 0-6.628-5.372-12-12-12m9.949 11H17.05c.224-2.527 1.232-4.773 1.968-6.113A9.966 9.966 0 0 1 21.949 11M13 11V2.051a9.945 9.945 0 0 1 4.432 1.564c-.858 1.491-2.156 4.22-2.392 7.385H13zm-2 0H8.961c-.238-3.165-1.536-5.894-2.393-7.385A9.95 9.95 0 0 1 11 2.051V11zm0 2v8.949a9.937 9.937 0 0 1-4.432-1.564c.857-1.492 2.155-4.221 2.393-7.385H11zm4.04 0c.236 3.164 1.534 5.893 2.392 7.385A9.92 9.92 0 0 1 13 21.949V13h2.04zM4.982 4.887C5.718 6.227 6.726 8.473 6.951 11h-4.9a9.977 9.977 0 0 1 2.931-6.113M2.051 13h4.9c-.226 2.527-1.233 4.771-1.969 6.113A9.972 9.972 0 0 1 2.051 13m16.967 6.113c-.735-1.342-1.744-3.586-1.968-6.113h4.899a9.961 9.961 0 0 1-2.931 6.113"})}),solid:Db("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Db("path",{d:"M16.17 337.5c0 44.98 7.565 83.54 13.98 107.9C35.22 464.3 50.46 496 174.9 496c9.566 0 19.59-.4707 29.84-1.271L17.33 307.3C16.53 317.6 16.17 327.7 16.17 337.5zM495.8 174.5c0-44.98-7.565-83.53-13.98-107.9c-4.688-17.54-18.34-31.23-36.04-35.95C435.5 27.91 392.9 16 337 16c-9.564 0-19.59 .4707-29.84 1.271l187.5 187.5C495.5 194.4 495.8 184.3 495.8 174.5zM26.77 248.8l236.3 236.3c142-36.1 203.9-150.4 222.2-221.1L248.9 26.87C106.9 62.96 45.07 177.2 26.77 248.8zM256 335.1c0 9.141-7.474 16-16 16c-4.094 0-8.188-1.564-11.31-4.689L164.7 283.3C161.6 280.2 160 276.1 160 271.1c0-8.529 6.865-16 16-16c4.095 0 8.189 1.562 11.31 4.688l64.01 64C254.4 327.8 256 331.9 256 335.1zM304 287.1c0 9.141-7.474 16-16 16c-4.094 0-8.188-1.564-11.31-4.689L212.7 235.3C209.6 232.2 208 228.1 208 223.1c0-9.141 7.473-16 16-16c4.094 0 8.188 1.562 11.31 4.688l64.01 64.01C302.5 279.8 304 283.9 304 287.1zM256 175.1c0-9.141 7.473-16 16-16c4.094 0 8.188 1.562 11.31 4.688l64.01 64.01c3.125 3.125 4.688 7.219 4.688 11.31c0 9.133-7.468 16-16 16c-4.094 0-8.189-1.562-11.31-4.688l-64.01-64.01C257.6 184.2 256 180.1 256 175.1z"})})},custom:Db("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",children:Db("path",{d:"M417.1 368c-5.937 10.27-16.69 16-27.75 16c-5.422 0-10.92-1.375-15.97-4.281L256 311.4V448c0 17.67-14.33 32-31.1 32S192 465.7 192 448V311.4l-118.3 68.29C68.67 382.6 63.17 384 57.75 384c-11.06 0-21.81-5.734-27.75-16c-8.828-15.31-3.594-34.88 11.72-43.72L159.1 256L41.72 187.7C26.41 178.9 21.17 159.3 29.1 144C36.63 132.5 49.26 126.7 61.65 128.2C65.78 128.7 69.88 130.1 73.72 132.3L192 200.6V64c0-17.67 14.33-32 32-32S256 46.33 256 64v136.6l118.3-68.29c3.838-2.213 7.939-3.539 12.07-4.051C398.7 126.7 411.4 132.5 417.1 144c8.828 15.31 3.594 34.88-11.72 43.72L288 256l118.3 68.28C421.6 333.1 426.8 352.7 417.1 368z"})}),flags:{outline:Db("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:Db("path",{d:"M0 0l6.084 24H8L1.916 0zM21 5h-4l-1-4H4l3 12h3l1 4h13L21 5zM6.563 3h7.875l2 8H8.563l-2-8zm8.832 10l-2.856 1.904L12.063 13h3.332zM19 13l-1.5-6h1.938l2 8H16l3-2z"})}),solid:Db("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Db("path",{d:"M64 496C64 504.8 56.75 512 48 512h-32C7.25 512 0 504.8 0 496V32c0-17.75 14.25-32 32-32s32 14.25 32 32V496zM476.3 0c-6.365 0-13.01 1.35-19.34 4.233c-45.69 20.86-79.56 27.94-107.8 27.94c-59.96 0-94.81-31.86-163.9-31.87C160.9 .3055 131.6 4.867 96 15.75v350.5c32-9.984 59.87-14.1 84.85-14.1c73.63 0 124.9 31.78 198.6 31.78c31.91 0 68.02-5.971 111.1-23.09C504.1 355.9 512 344.4 512 332.1V30.73C512 11.1 495.3 0 476.3 0z"})})},foods:{outline:Db("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:Db("path",{d:"M17 4.978c-1.838 0-2.876.396-3.68.934.513-1.172 1.768-2.934 4.68-2.934a1 1 0 0 0 0-2c-2.921 0-4.629 1.365-5.547 2.512-.064.078-.119.162-.18.244C11.73 1.838 10.798.023 9.207.023 8.579.022 7.85.306 7 .978 5.027 2.54 5.329 3.902 6.492 4.999 3.609 5.222 0 7.352 0 12.969c0 4.582 4.961 11.009 9 11.009 1.975 0 2.371-.486 3-1 .629.514 1.025 1 3 1 4.039 0 9-6.418 9-11 0-5.953-4.055-8-7-8M8.242 2.546c.641-.508.943-.523.965-.523.426.169.975 1.405 1.357 3.055-1.527-.629-2.741-1.352-2.98-1.846.059-.112.241-.356.658-.686M15 21.978c-1.08 0-1.21-.109-1.559-.402l-.176-.146c-.367-.302-.816-.452-1.266-.452s-.898.15-1.266.452l-.176.146c-.347.292-.477.402-1.557.402-2.813 0-7-5.389-7-9.009 0-5.823 4.488-5.991 5-5.991 1.939 0 2.484.471 3.387 1.251l.323.276a1.995 1.995 0 0 0 2.58 0l.323-.276c.902-.78 1.447-1.251 3.387-1.251.512 0 5 .168 5 6 0 3.617-4.187 9-7 9"})}),solid:Db("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Db("path",{d:"M481.9 270.1C490.9 279.1 496 291.3 496 304C496 316.7 490.9 328.9 481.9 337.9C472.9 346.9 460.7 352 448 352H64C51.27 352 39.06 346.9 30.06 337.9C21.06 328.9 16 316.7 16 304C16 291.3 21.06 279.1 30.06 270.1C39.06 261.1 51.27 256 64 256H448C460.7 256 472.9 261.1 481.9 270.1zM475.3 388.7C478.3 391.7 480 395.8 480 400V416C480 432.1 473.3 449.3 461.3 461.3C449.3 473.3 432.1 480 416 480H96C79.03 480 62.75 473.3 50.75 461.3C38.74 449.3 32 432.1 32 416V400C32 395.8 33.69 391.7 36.69 388.7C39.69 385.7 43.76 384 48 384H464C468.2 384 472.3 385.7 475.3 388.7zM50.39 220.8C45.93 218.6 42.03 215.5 38.97 211.6C35.91 207.7 33.79 203.2 32.75 198.4C31.71 193.5 31.8 188.5 32.99 183.7C54.98 97.02 146.5 32 256 32C365.5 32 457 97.02 479 183.7C480.2 188.5 480.3 193.5 479.2 198.4C478.2 203.2 476.1 207.7 473 211.6C469.1 215.5 466.1 218.6 461.6 220.8C457.2 222.9 452.3 224 447.3 224H64.67C59.73 224 54.84 222.9 50.39 220.8zM372.7 116.7C369.7 119.7 368 123.8 368 128C368 131.2 368.9 134.3 370.7 136.9C372.5 139.5 374.1 141.6 377.9 142.8C380.8 143.1 384 144.3 387.1 143.7C390.2 143.1 393.1 141.6 395.3 139.3C397.6 137.1 399.1 134.2 399.7 131.1C400.3 128 399.1 124.8 398.8 121.9C397.6 118.1 395.5 116.5 392.9 114.7C390.3 112.9 387.2 111.1 384 111.1C379.8 111.1 375.7 113.7 372.7 116.7V116.7zM244.7 84.69C241.7 87.69 240 91.76 240 96C240 99.16 240.9 102.3 242.7 104.9C244.5 107.5 246.1 109.6 249.9 110.8C252.8 111.1 256 112.3 259.1 111.7C262.2 111.1 265.1 109.6 267.3 107.3C269.6 105.1 271.1 102.2 271.7 99.12C272.3 96.02 271.1 92.8 270.8 89.88C269.6 86.95 267.5 84.45 264.9 82.7C262.3 80.94 259.2 79.1 256 79.1C251.8 79.1 247.7 81.69 244.7 84.69V84.69zM116.7 116.7C113.7 119.7 112 123.8 112 128C112 131.2 112.9 134.3 114.7 136.9C116.5 139.5 118.1 141.6 121.9 142.8C124.8 143.1 128 144.3 131.1 143.7C134.2 143.1 137.1 141.6 139.3 139.3C141.6 137.1 143.1 134.2 143.7 131.1C144.3 128 143.1 124.8 142.8 121.9C141.6 118.1 139.5 116.5 136.9 114.7C134.3 112.9 131.2 111.1 128 111.1C123.8 111.1 119.7 113.7 116.7 116.7L116.7 116.7z"})})},frequent:{outline:Db("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[Db("path",{d:"M13 4h-2l-.001 7H9v2h2v2h2v-2h4v-2h-4z"}),Db("path",{d:"M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0m0 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10"})]}),solid:Db("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Db("path",{d:"M256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512zM232 256C232 264 236 271.5 242.7 275.1L338.7 339.1C349.7 347.3 364.6 344.3 371.1 333.3C379.3 322.3 376.3 307.4 365.3 300L280 243.2V120C280 106.7 269.3 96 255.1 96C242.7 96 231.1 106.7 231.1 120L232 256z"})})},nature:{outline:Db("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[Db("path",{d:"M15.5 8a1.5 1.5 0 1 0 .001 3.001A1.5 1.5 0 0 0 15.5 8M8.5 8a1.5 1.5 0 1 0 .001 3.001A1.5 1.5 0 0 0 8.5 8"}),Db("path",{d:"M18.933 0h-.027c-.97 0-2.138.787-3.018 1.497-1.274-.374-2.612-.51-3.887-.51-1.285 0-2.616.133-3.874.517C7.245.79 6.069 0 5.093 0h-.027C3.352 0 .07 2.67.002 7.026c-.039 2.479.276 4.238 1.04 5.013.254.258.882.677 1.295.882.191 3.177.922 5.238 2.536 6.38.897.637 2.187.949 3.2 1.102C8.04 20.6 8 20.795 8 21c0 1.773 2.35 3 4 3 1.648 0 4-1.227 4-3 0-.201-.038-.393-.072-.586 2.573-.385 5.435-1.877 5.925-7.587.396-.22.887-.568 1.104-.788.763-.774 1.079-2.534 1.04-5.013C23.929 2.67 20.646 0 18.933 0M3.223 9.135c-.237.281-.837 1.155-.884 1.238-.15-.41-.368-1.349-.337-3.291.051-3.281 2.478-4.972 3.091-5.031.256.015.731.27 1.265.646-1.11 1.171-2.275 2.915-2.352 5.125-.133.546-.398.858-.783 1.313M12 22c-.901 0-1.954-.693-2-1 0-.654.475-1.236 1-1.602V20a1 1 0 1 0 2 0v-.602c.524.365 1 .947 1 1.602-.046.307-1.099 1-2 1m3-3.48v.02a4.752 4.752 0 0 0-1.262-1.02c1.092-.516 2.239-1.334 2.239-2.217 0-1.842-1.781-2.195-3.977-2.195-2.196 0-3.978.354-3.978 2.195 0 .883 1.148 1.701 2.238 2.217A4.8 4.8 0 0 0 9 18.539v-.025c-1-.076-2.182-.281-2.973-.842-1.301-.92-1.838-3.045-1.853-6.478l.023-.041c.496-.826 1.49-1.45 1.804-3.102 0-2.047 1.357-3.631 2.362-4.522C9.37 3.178 10.555 3 11.948 3c1.447 0 2.685.192 3.733.57 1 .9 2.316 2.465 2.316 4.48.313 1.651 1.307 2.275 1.803 3.102.035.058.068.117.102.178-.059 5.967-1.949 7.01-4.902 7.19m6.628-8.202c-.037-.065-.074-.13-.113-.195a7.587 7.587 0 0 0-.739-.987c-.385-.455-.648-.768-.782-1.313-.076-2.209-1.241-3.954-2.353-5.124.531-.376 1.004-.63 1.261-.647.636.071 3.044 1.764 3.096 5.031.027 1.81-.347 3.218-.37 3.235"})]}),solid:Db("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",children:Db("path",{d:"M332.7 19.85C334.6 8.395 344.5 0 356.1 0C363.6 0 370.6 3.52 375.1 9.502L392 32H444.1C456.8 32 469.1 37.06 478.1 46.06L496 64H552C565.3 64 576 74.75 576 88V112C576 156.2 540.2 192 496 192H426.7L421.6 222.5L309.6 158.5L332.7 19.85zM448 64C439.2 64 432 71.16 432 80C432 88.84 439.2 96 448 96C456.8 96 464 88.84 464 80C464 71.16 456.8 64 448 64zM416 256.1V480C416 497.7 401.7 512 384 512H352C334.3 512 320 497.7 320 480V364.8C295.1 377.1 268.8 384 240 384C211.2 384 184 377.1 160 364.8V480C160 497.7 145.7 512 128 512H96C78.33 512 64 497.7 64 480V249.8C35.23 238.9 12.64 214.5 4.836 183.3L.9558 167.8C-3.331 150.6 7.094 133.2 24.24 128.1C41.38 124.7 58.76 135.1 63.05 152.2L66.93 167.8C70.49 182 83.29 191.1 97.97 191.1H303.8L416 256.1z"})})},objects:{outline:Db("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[Db("path",{d:"M12 0a9 9 0 0 0-5 16.482V21s2.035 3 5 3 5-3 5-3v-4.518A9 9 0 0 0 12 0zm0 2c3.86 0 7 3.141 7 7s-3.14 7-7 7-7-3.141-7-7 3.14-7 7-7zM9 17.477c.94.332 1.946.523 3 .523s2.06-.19 3-.523v.834c-.91.436-1.925.689-3 .689a6.924 6.924 0 0 1-3-.69v-.833zm.236 3.07A8.854 8.854 0 0 0 12 21c.965 0 1.888-.167 2.758-.451C14.155 21.173 13.153 22 12 22c-1.102 0-2.117-.789-2.764-1.453z"}),Db("path",{d:"M14.745 12.449h-.004c-.852-.024-1.188-.858-1.577-1.824-.421-1.061-.703-1.561-1.182-1.566h-.009c-.481 0-.783.497-1.235 1.537-.436.982-.801 1.811-1.636 1.791l-.276-.043c-.565-.171-.853-.691-1.284-1.794-.125-.313-.202-.632-.27-.913-.051-.213-.127-.53-.195-.634C7.067 9.004 7.039 9 6.99 9A1 1 0 0 1 7 7h.01c1.662.017 2.015 1.373 2.198 2.134.486-.981 1.304-2.058 2.797-2.075 1.531.018 2.28 1.153 2.731 2.141l.002-.008C14.944 8.424 15.327 7 16.979 7h.032A1 1 0 1 1 17 9h-.011c-.149.076-.256.474-.319.709a6.484 6.484 0 0 1-.311.951c-.429.973-.79 1.789-1.614 1.789"})]}),solid:Db("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",children:Db("path",{d:"M112.1 454.3c0 6.297 1.816 12.44 5.284 17.69l17.14 25.69c5.25 7.875 17.17 14.28 26.64 14.28h61.67c9.438 0 21.36-6.401 26.61-14.28l17.08-25.68c2.938-4.438 5.348-12.37 5.348-17.7L272 415.1h-160L112.1 454.3zM191.4 .0132C89.44 .3257 16 82.97 16 175.1c0 44.38 16.44 84.84 43.56 115.8c16.53 18.84 42.34 58.23 52.22 91.45c.0313 .25 .0938 .5166 .125 .7823h160.2c.0313-.2656 .0938-.5166 .125-.7823c9.875-33.22 35.69-72.61 52.22-91.45C351.6 260.8 368 220.4 368 175.1C368 78.61 288.9-.2837 191.4 .0132zM192 96.01c-44.13 0-80 35.89-80 79.1C112 184.8 104.8 192 96 192S80 184.8 80 176c0-61.76 50.25-111.1 112-111.1c8.844 0 16 7.159 16 16S200.8 96.01 192 96.01z"})})},people:{outline:Db("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[Db("path",{d:"M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0m0 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10"}),Db("path",{d:"M8 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 8 7M16 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 16 7M15.232 15c-.693 1.195-1.87 2-3.349 2-1.477 0-2.655-.805-3.347-2H15m3-2H6a6 6 0 1 0 12 0"})]}),solid:Db("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Db("path",{d:"M0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256zM256 432C332.1 432 396.2 382 415.2 314.1C419.1 300.4 407.8 288 393.6 288H118.4C104.2 288 92.92 300.4 96.76 314.1C115.8 382 179.9 432 256 432V432zM176.4 160C158.7 160 144.4 174.3 144.4 192C144.4 209.7 158.7 224 176.4 224C194 224 208.4 209.7 208.4 192C208.4 174.3 194 160 176.4 160zM336.4 224C354 224 368.4 209.7 368.4 192C368.4 174.3 354 160 336.4 160C318.7 160 304.4 174.3 304.4 192C304.4 209.7 318.7 224 336.4 224z"})})},places:{outline:Db("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[Db("path",{d:"M6.5 12C5.122 12 4 13.121 4 14.5S5.122 17 6.5 17 9 15.879 9 14.5 7.878 12 6.5 12m0 3c-.275 0-.5-.225-.5-.5s.225-.5.5-.5.5.225.5.5-.225.5-.5.5M17.5 12c-1.378 0-2.5 1.121-2.5 2.5s1.122 2.5 2.5 2.5 2.5-1.121 2.5-2.5-1.122-2.5-2.5-2.5m0 3c-.275 0-.5-.225-.5-.5s.225-.5.5-.5.5.225.5.5-.225.5-.5.5"}),Db("path",{d:"M22.482 9.494l-1.039-.346L21.4 9h.6c.552 0 1-.439 1-.992 0-.006-.003-.008-.003-.008H23c0-1-.889-2-1.984-2h-.642l-.731-1.717C19.262 3.012 18.091 2 16.764 2H7.236C5.909 2 4.738 3.012 4.357 4.283L3.626 6h-.642C1.889 6 1 7 1 8h.003S1 8.002 1 8.008C1 8.561 1.448 9 2 9h.6l-.043.148-1.039.346a2.001 2.001 0 0 0-1.359 2.097l.751 7.508a1 1 0 0 0 .994.901H3v1c0 1.103.896 2 2 2h2c1.104 0 2-.897 2-2v-1h6v1c0 1.103.896 2 2 2h2c1.104 0 2-.897 2-2v-1h1.096a.999.999 0 0 0 .994-.901l.751-7.508a2.001 2.001 0 0 0-1.359-2.097M6.273 4.857C6.402 4.43 6.788 4 7.236 4h9.527c.448 0 .834.43.963.857L19.313 9H4.688l1.585-4.143zM7 21H5v-1h2v1zm12 0h-2v-1h2v1zm2.189-3H2.811l-.662-6.607L3 11h18l.852.393L21.189 18z"})]}),solid:Db("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Db("path",{d:"M39.61 196.8L74.8 96.29C88.27 57.78 124.6 32 165.4 32H346.6C387.4 32 423.7 57.78 437.2 96.29L472.4 196.8C495.6 206.4 512 229.3 512 256V448C512 465.7 497.7 480 480 480H448C430.3 480 416 465.7 416 448V400H96V448C96 465.7 81.67 480 64 480H32C14.33 480 0 465.7 0 448V256C0 229.3 16.36 206.4 39.61 196.8V196.8zM109.1 192H402.9L376.8 117.4C372.3 104.6 360.2 96 346.6 96H165.4C151.8 96 139.7 104.6 135.2 117.4L109.1 192zM96 256C78.33 256 64 270.3 64 288C64 305.7 78.33 320 96 320C113.7 320 128 305.7 128 288C128 270.3 113.7 256 96 256zM416 320C433.7 320 448 305.7 448 288C448 270.3 433.7 256 416 256C398.3 256 384 270.3 384 288C384 305.7 398.3 320 416 320z"})})},symbols:{outline:Db("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:Db("path",{d:"M0 0h11v2H0zM4 11h3V6h4V4H0v2h4zM15.5 17c1.381 0 2.5-1.116 2.5-2.493s-1.119-2.493-2.5-2.493S13 13.13 13 14.507 14.119 17 15.5 17m0-2.986c.276 0 .5.222.5.493 0 .272-.224.493-.5.493s-.5-.221-.5-.493.224-.493.5-.493M21.5 19.014c-1.381 0-2.5 1.116-2.5 2.493S20.119 24 21.5 24s2.5-1.116 2.5-2.493-1.119-2.493-2.5-2.493m0 2.986a.497.497 0 0 1-.5-.493c0-.271.224-.493.5-.493s.5.222.5.493a.497.497 0 0 1-.5.493M22 13l-9 9 1.513 1.5 8.99-9.009zM17 11c2.209 0 4-1.119 4-2.5V2s.985-.161 1.498.949C23.01 4.055 23 6 23 6s1-1.119 1-3.135C24-.02 21 0 21 0h-2v6.347A5.853 5.853 0 0 0 17 6c-2.209 0-4 1.119-4 2.5s1.791 2.5 4 2.5M10.297 20.482l-1.475-1.585a47.54 47.54 0 0 1-1.442 1.129c-.307-.288-.989-1.016-2.045-2.183.902-.836 1.479-1.466 1.729-1.892s.376-.871.376-1.336c0-.592-.273-1.178-.818-1.759-.546-.581-1.329-.871-2.349-.871-1.008 0-1.79.293-2.344.879-.556.587-.832 1.181-.832 1.784 0 .813.419 1.748 1.256 2.805-.847.614-1.444 1.208-1.794 1.784a3.465 3.465 0 0 0-.523 1.833c0 .857.308 1.56.924 2.107.616.549 1.423.823 2.42.823 1.173 0 2.444-.379 3.813-1.137L8.235 24h2.819l-2.09-2.383 1.333-1.135zm-6.736-6.389a1.02 1.02 0 0 1 .73-.286c.31 0 .559.085.747.254a.849.849 0 0 1 .283.659c0 .518-.419 1.112-1.257 1.784-.536-.651-.805-1.231-.805-1.742a.901.901 0 0 1 .302-.669M3.74 22c-.427 0-.778-.116-1.057-.349-.279-.232-.418-.487-.418-.766 0-.594.509-1.288 1.527-2.083.968 1.134 1.717 1.946 2.248 2.438-.921.507-1.686.76-2.3.76"})}),solid:Db("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Db("path",{d:"M500.3 7.251C507.7 13.33 512 22.41 512 31.1V175.1C512 202.5 483.3 223.1 447.1 223.1C412.7 223.1 383.1 202.5 383.1 175.1C383.1 149.5 412.7 127.1 447.1 127.1V71.03L351.1 90.23V207.1C351.1 234.5 323.3 255.1 287.1 255.1C252.7 255.1 223.1 234.5 223.1 207.1C223.1 181.5 252.7 159.1 287.1 159.1V63.1C287.1 48.74 298.8 35.61 313.7 32.62L473.7 .6198C483.1-1.261 492.9 1.173 500.3 7.251H500.3zM74.66 303.1L86.5 286.2C92.43 277.3 102.4 271.1 113.1 271.1H174.9C185.6 271.1 195.6 277.3 201.5 286.2L213.3 303.1H239.1C266.5 303.1 287.1 325.5 287.1 351.1V463.1C287.1 490.5 266.5 511.1 239.1 511.1H47.1C21.49 511.1-.0019 490.5-.0019 463.1V351.1C-.0019 325.5 21.49 303.1 47.1 303.1H74.66zM143.1 359.1C117.5 359.1 95.1 381.5 95.1 407.1C95.1 434.5 117.5 455.1 143.1 455.1C170.5 455.1 191.1 434.5 191.1 407.1C191.1 381.5 170.5 359.1 143.1 359.1zM440.3 367.1H496C502.7 367.1 508.6 372.1 510.1 378.4C513.3 384.6 511.6 391.7 506.5 396L378.5 508C372.9 512.1 364.6 513.3 358.6 508.9C352.6 504.6 350.3 496.6 353.3 489.7L391.7 399.1H336C329.3 399.1 323.4 395.9 321 389.6C318.7 383.4 320.4 376.3 325.5 371.1L453.5 259.1C459.1 255 467.4 254.7 473.4 259.1C479.4 263.4 481.6 271.4 478.7 278.3L440.3 367.1zM116.7 219.1L19.85 119.2C-8.112 90.26-6.614 42.31 24.85 15.34C51.82-8.137 93.26-3.642 118.2 21.83L128.2 32.32L137.7 21.83C162.7-3.642 203.6-8.137 231.6 15.34C262.6 42.31 264.1 90.26 236.1 119.2L139.7 219.1C133.2 225.6 122.7 225.6 116.7 219.1H116.7z"})})}},search:{loupe:Db("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:Db("path",{d:"M12.9 14.32a8 8 0 1 1 1.41-1.41l5.35 5.33-1.42 1.42-5.33-5.34zM8 14A6 6 0 1 0 8 2a6 6 0 0 0 0 12z"})}),delete:Db("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:Db("path",{d:"M10 8.586L2.929 1.515 1.515 2.929 8.586 10l-7.071 7.071 1.414 1.414L10 11.414l7.071 7.071 1.414-1.414L11.414 10l7.071-7.071-1.414-1.414L10 8.586z"})})}};function Gb(e){let{id:t,skin:n,emoji:r}=e;if(e.shortcodes){const r=e.shortcodes.match(Rb.SHORTCODES_REGEX);r&&(t=r[1],r[2]&&(n=r[2]))}if(r||(r=Rb.get(t||e.native)),!r)return e.fallback;const i=r.skins[n-1]||r.skins[0],o=i.src||("native"==e.set||e.spritesheet?void 0:"function"==typeof e.getImageURL?e.getImageURL(e.set,i.unified):`https://cdn.jsdelivr.net/npm/emoji-datasource-${e.set}@14.0.0/img/${e.set}/64/${i.unified}.png`),s="function"==typeof e.getSpritesheetURL?e.getSpritesheetURL(e.set):`https://cdn.jsdelivr.net/npm/emoji-datasource-${e.set}@14.0.0/img/${e.set}/sheets-256/64.png`;return Db("span",{class:"emoji-mart-emoji","data-emoji-set":e.set,children:o?Db("img",{style:{height:e.size||"1em",width:"auto",display:"inline-block",position:"relative",top:".1em"},alt:i.native||i.shortcodes,src:o}):"native"==e.set?Db("span",{style:{fontSize:e.size,fontFamily:'"EmojiMart", "Segoe UI Emoji", "Segoe UI Symbol", "Segoe UI", "Apple Color Emoji", "Twemoji Mozilla", "Noto Color Emoji", "Android Emoji"'},children:i.native}):Db("span",{style:{display:"block",width:e.size,height:e.size,backgroundImage:`url(${s})`,backgroundSize:`${100*$b.sheet.cols}% ${100*$b.sheet.rows}%`,backgroundPosition:`${100/($b.sheet.cols-1)*i.x}% ${100/($b.sheet.rows-1)*i.y}%`}})})}const Zb="undefined"!=typeof window?window.HTMLElement:Object;class Jb extends Zb{static get observedAttributes(){return Object.keys(this.Props)}update(e={}){for(let t in e)this.attributeChangedCallback(t,null,e[t])}attributeChangedCallback(e,t,n){if(!this.component)return;const r=Kb(e,{[e]:n},this.constructor.Props,this);this.component.componentWillReceiveProps?this.component.componentWillReceiveProps({[e]:r}):(this.component.props[e]=r,this.component.forceUpdate())}constructor(e={}){if(super(),this.props=e,e.parent||e.ref){let t=null;const n=e.parent||(t=e.ref&&e.ref.current);t&&(t.innerHTML=""),n&&n.appendChild(this)}}}class Xb extends Jb{setShadow(){this.attachShadow({mode:"open"})}injectStyles(e){if(!e)return;const t=document.createElement("style");t.textContent=e,this.shadowRoot.insertBefore(t,this.shadowRoot.firstChild)}constructor(e,{styles:t}={}){super(e),this.setShadow(),this.injectStyles(t)}}var ey={fallback:"",id:"",native:"",shortcodes:"",size:"",set:Ob.set,skin:Ob.skin};class ty extends Jb{async connectedCallback(){const e=Yb(this.props,ey,this);e.element=this,e.ref=e=>{this.component=e},await qb(),kb(Db(Gb,{...e}),this)}constructor(e){super(e)}}Vg(ty,"Props",ey),"undefined"==typeof customElements||customElements.get("em-emoji")||customElements.define("em-emoji",ty);var ny,ry=[],iy=Yg.__b,oy=Yg.__r,sy=Yg.diffed,ay=Yg.__c,ly=Yg.unmount;function cy(){var e;for(ry.sort((function(e,t){return e.__v.__b-t.__v.__b}));e=ry.pop();)if(e.__P)try{e.__H.__h.forEach(dy),e.__H.__h.forEach(py),e.__H.__h=[]}catch(t){e.__H.__h=[],Yg.__e(t,e.__v)}}Yg.__b=function(e){iy&&iy(e)},Yg.__r=function(e){oy&&oy(e);var t=e.__c.__H;t&&(t.__h.forEach(dy),t.__h.forEach(py),t.__h=[])},Yg.diffed=function(e){sy&&sy(e);var t=e.__c;t&&t.__H&&t.__H.__h.length&&(1!==ry.push(t)&&ny===Yg.requestAnimationFrame||((ny=Yg.requestAnimationFrame)||function(e){var t,n=function(){clearTimeout(r),uy&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);uy&&(t=requestAnimationFrame(n))})(cy))},Yg.__c=function(e,t){t.some((function(e){try{e.__h.forEach(dy),e.__h=e.__h.filter((function(e){return!e.__||py(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],Yg.__e(n,e.__v)}})),ay&&ay(e,t)},Yg.unmount=function(e){ly&&ly(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{dy(e)}catch(e){t=e}})),t&&Yg.__e(t,n.__v))};var uy="function"==typeof requestAnimationFrame;function dy(e){var t=e.__c;"function"==typeof t&&(e.__c=void 0,t())}function py(e){e.__c=e.__()}function hy(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function fy(e){this.props=e}(fy.prototype=new sb).isPureReactComponent=!0,fy.prototype.shouldComponentUpdate=function(e,t){return hy(this.props,e)||hy(this.state,t)};var my=Yg.__b;Yg.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),my&&my(e)};var gy=Yg.__e;Yg.__e=function(e,t,n){if(e.then)for(var r,i=t;i=i.__;)if((r=i.__c)&&r.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),r.__c(e,t);gy(e,t,n)};var by=Yg.unmount;function yy(){this.__u=0,this.t=null,this.__b=null}function vy(e){var t=e.__.__c;return t&&t.__e&&t.__e(e)}function wy(){this.u=null,this.o=null}Yg.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),by&&by(e)},(yy.prototype=new sb).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var i=vy(r.__v),o=!1,s=function(){o||(o=!0,n.__R=null,i?i(a):a())};n.__R=s;var a=function(){if(!--r.__u){if(r.state.__e){var e=r.state.__e;r.__v.__k[0]=function e(t,n,r){return t&&(t.__v=null,t.__k=t.__k&&t.__k.map((function(t){return e(t,n,r)})),t.__c&&t.__c.__P===n&&(t.__e&&r.insertBefore(t.__e,t.__d),t.__c.__e=!0,t.__c.__P=r)),t}(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__e:r.__b=null});t=r.t.pop();)t.forceUpdate()}},l=!0===t.__h;r.__u++||l||r.setState({__e:r.__b=r.__v.__k[0]}),e.then(s,s)},yy.prototype.componentWillUnmount=function(){this.t=[]},yy.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=function e(t,n,r){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),t.__c.__H=null),null!=(t=function(e,t){for(var n in t)e[n]=t[n];return e}({},t)).__c&&(t.__c.__P===r&&(t.__c.__P=n),t.__c=null),t.__k=t.__k&&t.__k.map((function(t){return e(t,n,r)}))),t}(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__e&&rb(ob,null,e.fallback);return i&&(i.__h=null),[rb(ob,null,t.__e?null:e.children),i]};var xy=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};(wy.prototype=new sb).__e=function(e){var t=this,n=vy(t.__v),r=t.o.get(e);return r[0]++,function(i){var o=function(){t.props.revealOrder?(r.push(i),xy(t,e,r)):i()};n?n(o):o()}},wy.prototype.render=function(e){this.u=null,this.o=new Map;var t=hb(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},wy.prototype.componentDidUpdate=wy.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){xy(e,n,t)}))};var Ey="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,My=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,ky="undefined"!=typeof document,_y=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};sb.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(sb.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var Dy=Yg.event;function Cy(){}function Oy(){return this.cancelBubble}function Ny(){return this.defaultPrevented}Yg.event=function(e){return Dy&&(e=Dy(e)),e.persist=Cy,e.isPropagationStopped=Oy,e.isDefaultPrevented=Ny,e.nativeEvent=e};var Ty={configurable:!0,get:function(){return this.class}},Sy=Yg.vnode;Yg.vnode=function(e){var t=e.type,n=e.props,r=n;if("string"==typeof t){var i=-1===t.indexOf("-");for(var o in r={},n){var s=n[o];ky&&"children"===o&&"noscript"===t||"value"===o&&"defaultValue"in n&&null==s||("defaultValue"===o&&"value"in n&&null==n.value?o="value":"download"===o&&!0===s?s="":/ondoubleclick/i.test(o)?o="ondblclick":/^onchange(textarea|input)/i.test(o+t)&&!_y(n.type)?o="oninput":/^onfocus$/i.test(o)?o="onfocusin":/^onblur$/i.test(o)?o="onfocusout":/^on(Ani|Tra|Tou|BeforeInp)/.test(o)?o=o.toLowerCase():i&&My.test(o)?o=o.replace(/[A-Z0-9]/,"-$&").toLowerCase():null===s&&(s=void 0),r[o]=s)}"select"==t&&r.multiple&&Array.isArray(r.value)&&(r.value=hb(n.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==t&&null!=r.defaultValue&&(r.value=hb(n.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),e.props=r,n.class!=n.className&&(Ty.enumerable="className"in n,null!=n.className&&(r.class=n.className),Object.defineProperty(r,"className",Ty))}e.$$typeof=Ey,Sy&&Sy(e)};var Ay=Yg.__r;Yg.__r=function(e){Ay&&Ay(e),e.__c};const Iy={light:"outline",dark:"solid"};class Ly extends fy{renderIcon(e){const{icon:t}=e;if(t){if(t.svg)return Db("span",{class:"flex",dangerouslySetInnerHTML:{__html:t.svg}});if(t.src)return Db("img",{src:t.src})}const n=Qb.categories[e.id]||Qb.categories.custom;return n["auto"==this.props.icons?Iy[this.props.theme]:this.props.icons]||n}render(){let e=null;return Db("nav",{id:"nav",class:"padding","data-position":this.props.position,children:Db("div",{class:"flex relative",children:[this.categories.map(((t,n)=>{const r=t.name||Ub.categories[t.id],i=!this.props.unfocused&&t.id==this.state.categoryId;return i&&(e=n),Db("button",{"aria-label":r,"aria-selected":i||void 0,title:r,type:"button",class:"flex flex-grow flex-center",onMouseDown:e=>e.preventDefault(),onClick:()=>{this.props.onClick({category:t,i:n})},children:this.renderIcon(t)})})),Db("div",{class:"bar",style:{width:`${100/this.categories.length}%`,opacity:null==e?0:1,transform:`translateX(${100*e}%)`}})]})})}constructor(){super(),this.categories=$b.categories.filter((e=>!e.target)),this.state={categoryId:this.categories[0].id}}}class jy extends fy{shouldComponentUpdate(e){for(let t in e)if("children"!=t&&e[t]!=this.props[t])return!0;return!1}render(){return this.props.children}}const zy=10;class Fy extends sb{getInitialState(e=this.props){return{skin:Nb.get("skin")||e.skin,theme:this.initTheme(e.theme)}}componentWillMount(){this.observers=[],this.dir=Ub.rtl?"rtl":"ltr",this.refs={menu:{current:null},navigation:{current:null},scroll:{current:null},search:{current:null},searchInput:{current:null},skinToneButton:{current:null},skinToneRadio:{current:null}},this.initGrid(),0==this.props.stickySearch&&"sticky"==this.props.searchPosition&&(console.warn("[EmojiMart] Deprecation warning: `stickySearch` has been renamed `searchPosition`."),this.props.searchPosition="static")}componentDidMount(){if(this.register(),this.shadowRoot=this.base.parentNode,this.props.autoFocus){const{searchInput:e}=this.refs;e.current&&e.current.focus()}}componentWillReceiveProps(e){let t=null;for(const n in e)this.props[n]=e[n],"custom"===n||"categories"===n?this.reset():n in this.state&&(t||(t=this.getInitialState()),this.setState({[n]:t[n]}))}componentWillUnmount(){this.unregister()}reset(){qb(this.props),this.initGrid(),this.unobserve(),this.forceUpdate((()=>{this.observeCategories(),this.observeRows()}))}register(){document.addEventListener("click",this.handleClickOutside),this.observe()}unregister(){document.removeEventListener("click",this.handleClickOutside),this.unobserve()}observe(){this.observeCategories(),this.observeRows()}unobserve(){for(const e of this.observers)e.disconnect()}initGrid(){const{categories:e}=$b;this.refs.categories=new Map;const t=$b.categories.map((e=>e.id)).join(",");this.navKey&&this.navKey!=t&&this.refs.scroll.current&&(this.refs.scroll.current.scrollTop=0),this.navKey=t,this.grid=[],this.grid.setsize=0;const n=(e,t)=>{const n=[];n.__categoryId=t.id,n.__index=e.length,this.grid.push(n);const r=this.grid.length-1,i=r%zy?{}:{current:null};return i.index=r,i.posinset=this.grid.setsize+1,e.push(i),n};for(let t of e){const e=[];let r=n(e,t);for(let i of t.emojis)r.length==this.props.perLine&&(r=n(e,t)),this.grid.setsize+=1,r.push(i);this.refs.categories.set(t.id,{root:{current:null},rows:e})}}initTheme(e){if("auto"!=e)return e;if(!this.darkMedia){if(this.darkMedia=matchMedia("(prefers-color-scheme: dark)"),this.darkMedia.media.match(/^not/))return"light";this.darkMedia.addListener((()=>{"auto"==this.props.theme&&this.setState({theme:this.darkMedia.matches?"dark":"light"})}))}return this.darkMedia.matches?"dark":"light"}getEmojiByPos([e,t]){const n=this.state.searchResults||this.grid,r=n[e]&&n[e][t];if(r)return Rb.get(r)}observeCategories(){const e=this.refs.navigation.current;if(!e)return;const t=new Map,n=t=>{t!=e.state.categoryId&&e.setState({categoryId:t})},r={root:this.refs.scroll.current,threshold:[0,1]},i=new IntersectionObserver((e=>{for(const n of e){const e=n.target.dataset.id;t.set(e,n.intersectionRatio)}const r=[...t],i=r[r.length-1];if(1==i[1])return n(i[0]);for(const[e,t]of r)if(t){n(e);break}}),r);for(const{root:e}of this.refs.categories.values())i.observe(e.current);this.observers.push(i)}observeRows(){const e={...this.state.visibleRows},t=new IntersectionObserver((t=>{for(const n of t){const t=parseInt(n.target.dataset.index);n.isIntersecting?e[t]=!0:delete e[t]}this.setState({visibleRows:e})}),{root:this.refs.scroll.current,rootMargin:`${this.props.emojiButtonSize*(zy+5)}px 0px ${this.props.emojiButtonSize*zy}px`});for(const{rows:e}of this.refs.categories.values())for(const n of e)n.current&&t.observe(n.current);this.observers.push(t)}preventDefault(e){e.preventDefault()}unfocusSearch(){const e=this.refs.searchInput.current;e&&e.blur()}navigate({e:e,input:t,left:n,right:r,up:i,down:o}){const s=this.state.searchResults||this.grid;if(!s.length)return;let[a,l]=this.state.pos;const c=(()=>{if(0==a&&0==l&&!e.repeat&&(n||i))return null;if(-1==a)return e.repeat||!r&&!o||t.selectionStart!=t.value.length?null:[0,0];if(n||r){let e=s[a];const t=n?-1:1;if(l+=t,!e[l]){if(a+=t,e=s[a],!e)return a=n?0:s.length-1,l=n?0:s[a].length-1,[a,l];l=n?e.length-1:0}return[a,l]}if(i||o){a+=i?-1:1;const e=s[a];return e?(e[l]||(l=e.length-1),[a,l]):(a=i?0:s.length-1,l=i?0:s[a].length-1,[a,l])}})();c?(e.preventDefault(),this.setState({pos:c,keyboard:!0},(()=>{this.scrollTo({row:c[0]})}))):this.state.pos[0]>-1&&this.setState({pos:[-1,-1]})}scrollTo({categoryId:e,row:t}){const n=this.state.searchResults||this.grid;if(!n.length)return;const r=this.refs.scroll.current,i=r.getBoundingClientRect();let o=0;if(t>=0&&(e=n[t].__categoryId),e){o=(this.refs[e]||this.refs.categories.get(e).root).current.getBoundingClientRect().top-(i.top-r.scrollTop)+1}if(t>=0)if(t){const e=o+n[t].__index*this.props.emojiButtonSize,s=e+this.props.emojiButtonSize+.88*this.props.emojiButtonSize;if(e<r.scrollTop)o=e;else{if(!(s>r.scrollTop+i.height))return;o=s-i.height}}else o=0;this.ignoreMouse(),r.scrollTop=o}ignoreMouse(){this.mouseIsIgnored=!0,clearTimeout(this.ignoreMouseTimer),this.ignoreMouseTimer=setTimeout((()=>{delete this.mouseIsIgnored}),100)}handleEmojiOver(e){this.mouseIsIgnored||this.state.showSkins||this.setState({pos:e||[-1,-1],keyboard:!1})}handleEmojiClick({emoji:e,pos:t}){if(this.props.onEmojiSelect&&(!e&&t&&(e=this.getEmojiByPos(t)),e)){const t=e.skins[this.state.skin-1]||e.skins[0],n={id:e.id,name:e.name,native:t.native,unified:t.unified,keywords:e.keywords,shortcodes:t.shortcodes||e.shortcodes};t.src&&(n.src=t.src),e.aliases&&e.aliases.length&&(n.aliases=e.aliases),e.emoticons&&e.emoticons.length&&(n.emoticons=e.emoticons),this.props.maxFrequentRows&&Fb.add(n,this.props),this.props.onEmojiSelect(n)}}closeSkins(){this.state.showSkins&&(this.setState({showSkins:null,tempSkin:null}),this.base.removeEventListener("click",this.handleBaseClick),this.base.removeEventListener("keydown",this.handleBaseKeydown))}handleSkinMouseOver(e){this.setState({tempSkin:e})}handleSkinClick(e){this.ignoreMouse(),this.closeSkins(),this.setState({skin:e,tempSkin:null}),Nb.set("skin",e)}renderNav(){return Db(Ly,{ref:this.refs.navigation,icons:this.props.icons,theme:this.state.theme,unfocused:!!this.state.searchResults,position:this.props.navPosition,onClick:this.handleCategoryClick},this.navKey)}renderPreview(){const e=this.getEmojiByPos(this.state.pos),t=this.state.searchResults&&!this.state.searchResults.length;return Db("div",{id:"preview",class:"flex flex-middle",dir:this.dir,"data-position":this.props.previewPosition,children:[Db("div",{class:"flex flex-middle flex-grow",children:[Db("div",{class:"flex flex-auto flex-middle flex-center",style:{height:this.props.emojiButtonSize,fontSize:this.props.emojiButtonSize},children:Db(Gb,{emoji:e,id:t?this.props.noResultsEmoji||"cry":this.props.previewEmoji||("top"==this.props.previewPosition?"point_down":"point_up"),set:this.props.set,size:this.props.emojiButtonSize,skin:this.state.tempSkin||this.state.skin,spritesheet:!0,getSpritesheetURL:this.props.getSpritesheetURL})}),Db("div",{class:`margin-${this.dir[0]}`,children:Db("div",e?{class:`padding-${this.dir[2]} align-${this.dir[0]}`,children:[Db("div",{class:"ellipsis",style:{fontSize:"1.1em"},children:e.name}),Db("div",{class:"ellipsis color-c",style:{fontSize:".9em"},children:e.skins[0].shortcodes})]}:t?{class:`padding-${this.dir[2]} align-${this.dir[0]}`,children:[Db("div",{class:"ellipsis",style:{fontSize:"1.1em"},children:Ub.search_no_results_1}),Db("div",{class:"ellipsis color-c",style:{fontSize:".9em"},children:Ub.search_no_results_2})]}:{class:"color-c",style:{fontSize:21},children:Ub.pick})})]}),!e&&"preview"==this.props.skinTonePosition&&this.renderSkinToneButton()]})}renderEmojiButton(e,{pos:t,posinset:n,grid:r}){const i=this.props.emojiButtonSize,o=this.state.tempSkin||this.state.skin,s=(e.skins[o-1]||e.skins[0]).native,a=function(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===t.length&&e.every(((e,n)=>e==t[n]))}(this.state.pos,t),l=t.concat(e.id).join("");return Db(jy,{selected:a,skin:o,size:i,children:Db("button",{"aria-label":s,"aria-selected":a||void 0,"aria-posinset":n,"aria-setsize":r.setsize,"data-keyboard":this.state.keyboard,title:"none"==this.props.previewPosition?e.name:void 0,type:"button",class:"flex flex-center flex-middle",tabindex:"-1",onClick:()=>this.handleEmojiClick({emoji:e}),onMouseEnter:()=>this.handleEmojiOver(t),onMouseLeave:()=>this.handleEmojiOver(),style:{width:this.props.emojiButtonSize,height:this.props.emojiButtonSize,fontSize:this.props.emojiSize,lineHeight:0},children:[Db("div",{"aria-hidden":"true",class:"background",style:{borderRadius:this.props.emojiButtonRadius,backgroundColor:this.props.emojiButtonColors?this.props.emojiButtonColors[(n-1)%this.props.emojiButtonColors.length]:void 0}}),Db(Gb,{emoji:e,set:this.props.set,size:this.props.emojiSize,skin:o,spritesheet:!0,getSpritesheetURL:this.props.getSpritesheetURL})]})},l)}renderSearch(){const e="none"==this.props.previewPosition||"search"==this.props.skinTonePosition;return Db("div",{children:[Db("div",{class:"spacer"}),Db("div",{class:"flex flex-middle",children:[e&&"rtl"==this.dir&&this.renderSkinToneButton(),Db("div",{class:"search relative flex-grow",children:[Db("input",{type:"search",ref:this.refs.searchInput,placeholder:Ub.search,onClick:this.handleSearchClick,onInput:this.handleSearchInput,onKeyDown:this.handleSearchKeyDown}),Db("span",{class:"icon loupe flex",children:Qb.search.loupe}),this.state.searchResults&&Db("button",{title:"Clear","aria-label":"Clear",type:"button",class:"icon delete flex",onClick:this.clearSearch,onMouseDown:this.preventDefault,children:Qb.search.delete})]}),e&&"ltr"==this.dir&&this.renderSkinToneButton()]})]})}renderSearchResults(){const{searchResults:e}=this.state;return e?Db("div",{class:"category",ref:this.refs.search,children:[Db("div",{class:`sticky padding-small align-${this.dir[0]}`,children:Ub.categories.search}),Db("div",{children:e.length?e.map(((t,n)=>Db("div",{class:"flex",children:t.map(((t,r)=>this.renderEmojiButton(t,{pos:[n,r],posinset:n*this.props.perLine+r+1,grid:e})))}))):Db("div",{class:`padding-small align-${this.dir[0]}`,children:this.props.onAddCustomEmoji&&Db("a",{onClick:this.props.onAddCustomEmoji,children:Ub.add_custom})})})]}):null}renderCategories(){const{categories:e}=$b,t=!!this.state.searchResults;return Db("div",{style:{visibility:t?"hidden":void 0,display:t?"none":void 0},children:e.map((e=>{const{root:t,rows:n}=this.refs.categories.get(e.id);return Db("div",{"data-id":e.target?e.target.id:e.id,class:"category",ref:t,children:[Db("div",{class:`sticky padding-small align-${this.dir[0]}`,children:e.name||Ub.categories[e.id]}),Db("div",{class:"relative",style:{height:n.length*this.props.emojiButtonSize},children:n.map(((t,n)=>{const r=t.index-t.index%zy,i=this.state.visibleRows[r],o="current"in t?t:void 0;if(!i&&!o)return null;const s=n*this.props.perLine,a=s+this.props.perLine,l=e.emojis.slice(s,a);return Db("div",{"data-index":t.index,ref:o,class:"flex row",style:{top:n*this.props.emojiButtonSize},children:i&&l.map(((e,n)=>{const r=Rb.get(e);return this.renderEmojiButton(r,{pos:[t.index,n],posinset:t.posinset+n,grid:this.grid})}))},t.index)}))})]})}))})}renderSkinToneButton(){return"none"==this.props.skinTonePosition?null:Db("div",{class:"flex flex-auto flex-center flex-middle",style:{position:"relative",width:this.props.emojiButtonSize,height:this.props.emojiButtonSize},children:Db("button",{type:"button",ref:this.refs.skinToneButton,class:"skin-tone-button flex flex-auto flex-center flex-middle","aria-selected":this.state.showSkins?"":void 0,"aria-label":Ub.skins.choose,title:Ub.skins.choose,onClick:this.openSkins,style:{width:this.props.emojiSize,height:this.props.emojiSize},children:Db("span",{class:`skin-tone skin-tone-${this.state.skin}`})})})}renderSkins(){const e=this.refs.skinToneButton.current.getBoundingClientRect(),t=this.base.getBoundingClientRect(),n={};return"ltr"==this.dir?n.right=t.right-e.right-3:n.left=e.left-t.left-3,"bottom"==this.props.previewPosition&&"preview"==this.props.skinTonePosition?n.bottom=t.bottom-e.top+6:(n.top=e.bottom-t.top+3,n.bottom="auto"),Db("div",{ref:this.refs.menu,role:"radiogroup",dir:this.dir,"aria-label":Ub.skins.choose,class:"menu hidden","data-position":n.top?"top":"bottom",style:n,children:[...Array(6).keys()].map((e=>{const t=e+1,n=this.state.skin==t;return Db("div",{children:[Db("input",{type:"radio",name:"skin-tone",value:t,"aria-label":Ub.skins[t],ref:n?this.refs.skinToneRadio:null,defaultChecked:n,onChange:()=>this.handleSkinMouseOver(t),onKeyDown:e=>{"Enter"!=e.code&&"Space"!=e.code&&"Tab"!=e.code||(e.preventDefault(),this.handleSkinClick(t))}}),Db("button",{"aria-hidden":"true",tabindex:"-1",onClick:()=>this.handleSkinClick(t),onMouseEnter:()=>this.handleSkinMouseOver(t),onMouseLeave:()=>this.handleSkinMouseOver(),class:"option flex flex-grow flex-middle",children:[Db("span",{class:`skin-tone skin-tone-${t}`}),Db("span",{class:"margin-small-lr",children:Ub.skins[t]})]})]})}))})}render(){return Db("section",{id:"root",class:"flex flex-column",style:{width:this.props.perLine*this.props.emojiButtonSize+28},"data-emoji-set":this.props.set,"data-theme":this.state.theme,"data-menu":this.state.showSkins?"":void 0,children:["top"==this.props.previewPosition&&this.renderPreview(),"top"==this.props.navPosition&&this.renderNav(),"sticky"==this.props.searchPosition&&Db("div",{class:"padding-lr",children:this.renderSearch()}),Db("div",{ref:this.refs.scroll,class:"scroll flex-grow padding-lr",children:Db("div",{style:{width:this.props.perLine*this.props.emojiButtonSize},children:["static"==this.props.searchPosition&&this.renderSearch(),this.renderSearchResults(),this.renderCategories(),Db("div",{class:"spacer"})]})}),"bottom"==this.props.navPosition&&this.renderNav(),"bottom"==this.props.previewPosition&&this.renderPreview(),this.state.showSkins&&this.renderSkins()]})}constructor(e){super(),Vg(this,"handleClickOutside",(e=>{const{element:t}=this.props;e.target!=t&&(this.state.showSkins&&this.closeSkins(),this.props.onClickOutside&&this.props.onClickOutside())})),Vg(this,"handleBaseClick",(e=>{this.state.showSkins&&(e.target.closest(".menu")||(e.preventDefault(),e.stopImmediatePropagation(),this.closeSkins()))})),Vg(this,"handleBaseKeydown",(e=>{this.state.showSkins&&"Escape"==e.key&&(e.preventDefault(),e.stopImmediatePropagation(),this.closeSkins())})),Vg(this,"handleSearchClick",(()=>{this.getEmojiByPos(this.state.pos)&&this.setState({pos:[-1,-1]})})),Vg(this,"handleSearchInput",(async()=>{const e=this.refs.searchInput.current;if(!e)return;const{value:t}=e,n=await Rb.search(t),r=()=>{this.refs.scroll.current&&(this.refs.scroll.current.scrollTop=0)};if(!n)return this.setState({searchResults:n,pos:[-1,-1]},r);const i=e.selectionStart==e.value.length?[0,0]:[-1,-1],o=[];o.setsize=n.length;let s=null;for(let e of n)o.length&&s.length!=this.props.perLine||(s=[],s.__categoryId="search",s.__index=o.length,o.push(s)),s.push(e);this.ignoreMouse(),this.setState({searchResults:o,pos:i},r)})),Vg(this,"handleSearchKeyDown",(e=>{const t=e.currentTarget;switch(e.stopImmediatePropagation(),e.key){case"ArrowLeft":this.navigate({e:e,input:t,left:!0});break;case"ArrowRight":this.navigate({e:e,input:t,right:!0});break;case"ArrowUp":this.navigate({e:e,input:t,up:!0});break;case"ArrowDown":this.navigate({e:e,input:t,down:!0});break;case"Enter":e.preventDefault(),this.handleEmojiClick({pos:this.state.pos});break;case"Escape":e.preventDefault(),this.state.searchResults?this.clearSearch():this.unfocusSearch()}})),Vg(this,"clearSearch",(()=>{const e=this.refs.searchInput.current;e&&(e.value="",e.focus(),this.handleSearchInput())})),Vg(this,"handleCategoryClick",(({category:e,i:t})=>{this.scrollTo(0==t?{row:-1}:{categoryId:e.id})})),Vg(this,"openSkins",(e=>{const{currentTarget:t}=e,n=t.getBoundingClientRect();this.setState({showSkins:n},(async()=>{await async function(e=1){for(let t in[...Array(e).keys()])await new Promise(requestAnimationFrame)}(2);const e=this.refs.menu.current;e&&(e.classList.remove("hidden"),this.refs.skinToneRadio.current.focus(),this.base.addEventListener("click",this.handleBaseClick,!0),this.base.addEventListener("keydown",this.handleBaseKeydown,!0))}))})),this.state={pos:[-1,-1],visibleRows:{0:!0},...this.getInitialState(e)}}}class Py extends Xb{async connectedCallback(){const e=Yb(this.props,Ob,this);e.element=this,e.ref=e=>{this.component=e},await qb(e),kb(Db(Fy,{...e}),this.shadowRoot)}disconnectedCallback(){this.component&&this.component.unregister()}constructor(e){super(e,{styles:Wg(Ry)})}}Vg(Py,"Props",Ob),"undefined"==typeof customElements||customElements.get("em-emoji-picker")||customElements.define("em-emoji-picker",Py);var Ry={};Ry=':host {\n display: flex;\n width: -webkit-min-content;\n width: -moz-min-content;\n width: min-content;\n height: 435px;\n min-height: 230px;\n border-radius: var(--border-radius);\n box-shadow: var(--shadow);\n --border-radius: 10px;\n --category-icon-size: 18px;\n --font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;\n --font-size: 15px;\n --shadow-color: 0deg 0% 0%;\n --shadow:\n 0.3px 0.5px 2.7px hsl(var(--shadow-color) / 0.14),\n 0.4px 0.8px 1px -3.2px hsl(var(--shadow-color) / 0.14),\n 1px 2px 2.5px -4.5px hsl(var(--shadow-color) / 0.14);\n}\n\n[data-theme=light] {\n --em-rgb-color: var(--rgb-color, 34, 36, 39);\n --em-rgb-accent: var(--rgb-accent, 34, 102, 237);\n --em-rgb-background: var(--rgb-background, 255, 255, 255);\n --em-rgb-input: var(--rgb-input, 255, 255, 255);\n --em-color-border: var(--color-border, rgba(0, 0, 0, .05));\n --em-color-border-over: var(--color-border-over, rgba(0, 0, 0, .1));\n}\n\n[data-theme=dark] {\n --em-rgb-color: var(--rgb-color, 222, 222, 221);\n --em-rgb-accent: var(--rgb-accent, 58, 130, 247);\n --em-rgb-background: var(--rgb-background, 21, 22, 23);\n --em-rgb-input: var(--rgb-input, 0, 0, 0);\n --em-color-border: var(--color-border, rgba(255, 255, 255, .1));\n --em-color-border-over: var(--color-border-over, rgba(255, 255, 255, .2));\n}\n\n#root {\n --color-a: rgb(var(--em-rgb-color));\n --color-b: rgba(var(--em-rgb-color), .65);\n --color-c: rgba(var(--em-rgb-color), .45);\n --padding: 12px;\n --padding-small: calc(var(--padding) / 2);\n --sidebar-width: 16px;\n --duration: 225ms;\n --duration-fast: 125ms;\n --duration-instant: 50ms;\n --easing: cubic-bezier(.4, .0, .2, 1);\n position: relative;\n width: 100%;\n text-align: left;\n border-radius: var(--border-radius);\n background-color: rgb(var(--em-rgb-background));\n}\n\n@media (prefers-reduced-motion) {\n #root {\n --duration: 0;\n --duration-fast: 0;\n --duration-instant: 0;\n }\n}\n\n#root[data-menu] button {\n cursor: auto;\n}\n\n#root[data-menu] .menu button {\n cursor: pointer;\n}\n\n:host, #root, input, button {\n color: rgb(var(--em-rgb-color));\n font-family: var(--font-family);\n font-size: var(--font-size);\n line-height: normal;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n*, *:before, *:after {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n min-width: 0;\n}\n\n.relative {\n position: relative;\n}\n\n.flex {\n display: flex;\n}\n\n.flex-auto {\n flex: 0 0 auto;\n}\n\n.flex-center {\n justify-content: center;\n}\n\n.flex-column {\n flex-direction: column;\n}\n\n.flex-grow {\n flex: 1 1 auto;\n}\n\n.flex-middle {\n align-items: center;\n}\n\n.flex-wrap {\n flex-wrap: wrap;\n}\n\n.padding {\n padding: var(--padding);\n}\n\n.padding-t {\n padding-top: var(--padding);\n}\n\n.padding-lr {\n padding-left: var(--padding);\n padding-right: var(--padding);\n}\n\n.padding-r {\n padding-right: var(--padding);\n}\n\n.padding-small {\n padding: var(--padding-small);\n}\n\n.padding-small-b {\n padding-bottom: var(--padding-small);\n}\n\n.padding-small-lr {\n padding-left: var(--padding-small);\n padding-right: var(--padding-small);\n}\n\n.margin {\n margin: var(--padding);\n}\n\n.margin-r {\n margin-right: var(--padding);\n}\n\n.margin-l {\n margin-left: var(--padding);\n}\n\n.margin-small-l {\n margin-left: var(--padding-small);\n}\n\n.margin-small-lr {\n margin-left: var(--padding-small);\n margin-right: var(--padding-small);\n}\n\n.align-l {\n text-align: left;\n}\n\n.align-r {\n text-align: right;\n}\n\n.color-a {\n color: var(--color-a);\n}\n\n.color-b {\n color: var(--color-b);\n}\n\n.color-c {\n color: var(--color-c);\n}\n\n.ellipsis {\n white-space: nowrap;\n max-width: 100%;\n width: auto;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\na {\n cursor: pointer;\n color: rgb(var(--em-rgb-accent));\n}\n\na:hover {\n text-decoration: underline;\n}\n\n.spacer {\n height: 10px;\n}\n\n.scroll {\n overflow: auto;\n overflow-x: hidden;\n padding-right: 0;\n}\n\n.scroll::-webkit-scrollbar {\n width: var(--sidebar-width);\n height: var(--sidebar-width);\n}\n\n.scroll::-webkit-scrollbar-track {\n border: 0;\n}\n\n.scroll::-webkit-scrollbar-button {\n width: 0;\n height: 0;\n display: none;\n}\n\n.scroll::-webkit-scrollbar-corner {\n background-color: transparent;\n}\n\n.scroll::-webkit-scrollbar-thumb {\n min-height: 20%;\n min-height: 65px;\n border: 4px solid rgb(var(--em-rgb-background));\n border-radius: 8px;\n}\n\n.scroll::-webkit-scrollbar-thumb:hover {\n background-color: var(--em-color-border-over) !important;\n}\n\n.scroll:hover::-webkit-scrollbar-thumb {\n background-color: var(--em-color-border);\n}\n\n.sticky {\n position: -webkit-sticky;\n position: sticky;\n z-index: 1;\n top: -1px;\n font-weight: 500;\n background-color: rgba(var(--em-rgb-background), 0.9);\n -webkit-backdrop-filter: blur(4px);\n backdrop-filter: blur(4px);\n}\n\n.search {\n z-index: 2;\n position: relative;\n}\n\n.search input, .search button {\n font-size: calc(var(--font-size) - 1px);\n}\n\n.search input[type=search] {\n display: block;\n border: 0;\n outline: 0;\n width: 100%;\n padding: 10px 2em 10px 2.2em;\n border-radius: 10px;\n background-color: var(--em-color-border);\n transition-duration: var(--duration);\n transition-property: background-color, box-shadow;\n transition-timing-function: var(--easing);\n}\n\n.search input[type=search]::-moz-placeholder {\n color: inherit;\n opacity: 0.6;\n}\n\n.search input[type=search]:-ms-input-placeholder {\n color: inherit;\n opacity: 0.6;\n}\n\n.search input[type=search]::placeholder {\n color: inherit;\n opacity: 0.6;\n}\n\n.search input[type=search], .search input[type=search]::-webkit-search-decoration, .search input[type=search]::-webkit-search-cancel-button, .search input[type=search]::-webkit-search-results-button, .search input[type=search]::-webkit-search-results-decoration {\n -webkit-appearance: none;\n appearance: none;\n}\n\n.search input[type=search]:focus {\n background-color: rgb(var(--em-rgb-input));\n box-shadow: inset 0 0 0 1px rgb(var(--em-rgb-accent)), 0 1px 3px rgba(65, 69, 73, 0.2);\n}\n\n.search .icon {\n z-index: 1;\n position: absolute;\n top: 50%;\n color: rgba(var(--em-rgb-color), 0.7);\n transform: translateY(-50%);\n}\n\n.search .loupe {\n left: 0.7em;\n pointer-events: none;\n}\n\n.search .delete {\n right: 0.7em;\n}\n\nsvg {\n fill: currentColor;\n width: 1em;\n height: 1em;\n}\n\nbutton {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n cursor: pointer;\n color: currentColor;\n border: 0;\n background-color: transparent;\n}\n\n#nav {\n z-index: 2;\n position: relative;\n padding-top: 12px;\n padding-bottom: 12px;\n padding-right: var(--sidebar-width);\n}\n\n#nav button {\n color: var(--color-b);\n transition: color var(--duration) var(--easing);\n}\n\n#nav button:hover {\n color: var(--color-a);\n}\n\n#nav svg, #nav img {\n width: var(--category-icon-size);\n height: var(--category-icon-size);\n}\n\n#nav .bar {\n position: absolute;\n bottom: -12px;\n left: 0;\n width: 100%;\n height: 3px;\n background-color: rgb(var(--em-rgb-accent));\n border-radius: 3px 3px 0 0;\n transition: transform var(--duration) var(--easing);\n}\n\n#nav button[aria-selected] {\n color: rgb(var(--em-rgb-accent));\n}\n\n#preview {\n z-index: 2;\n position: relative;\n padding: calc(var(--padding) + 4px) var(--padding);\n padding-right: var(--sidebar-width);\n}\n\n#nav:before, #preview:before {\n content: "";\n position: absolute;\n left: 0;\n right: 0;\n height: 2px;\n}\n\n#nav[data-position=top]:before, #preview[data-position=top]:before {\n top: 100%;\n background: linear-gradient(to bottom, var(--em-color-border), transparent);\n}\n\n#nav[data-position=bottom]:before, #preview[data-position=bottom]:before {\n bottom: 100%;\n background: linear-gradient(to top, var(--em-color-border), transparent);\n}\n\n.category button {\n position: relative;\n font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;\n}\n\n.category button > * {\n position: relative;\n}\n\n.category button .background {\n position: absolute;\n inset: 0;\n opacity: 0;\n background-color: var(--em-color-border);\n transition: opacity var(--duration-fast) var(--easing) var(--duration-instant);\n}\n\n.category button:hover .background {\n transition-duration: var(--duration-instant);\n transition-delay: 0ms;\n}\n\n.category button[aria-selected] .background {\n opacity: 1;\n}\n\n.category button[data-keyboard] .background {\n transition: none;\n}\n\n.row {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n}\n\n.skin-tone-button {\n border-radius: 100%;\n border: 1px solid transparent;\n}\n\n.skin-tone-button:hover {\n border-color: var(--em-color-border);\n}\n\n.skin-tone-button:active .skin-tone {\n transform: scale(0.85) !important;\n}\n\n.skin-tone-button .skin-tone {\n transition: transform var(--duration) var(--easing);\n}\n\n.skin-tone-button[aria-selected] {\n border-left-width: 0;\n border-right-width: 0;\n border-top-color: rgba(0, 0, 0, 0.05);\n border-bottom-color: transparent;\n background-color: var(--em-color-border);\n}\n\n.skin-tone-button[aria-selected] .skin-tone {\n transform: scale(0.9);\n}\n\n.menu {\n z-index: 2;\n position: absolute;\n white-space: nowrap;\n padding: 4px;\n border: 1px solid var(--em-color-border);\n background-color: rgba(var(--em-rgb-background), 0.9);\n -webkit-backdrop-filter: blur(4px);\n backdrop-filter: blur(4px);\n border-radius: 10px;\n box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.05);\n transition-property: opacity, transform;\n transition-duration: var(--duration);\n transition-timing-function: var(--easing);\n}\n\n.menu.hidden {\n opacity: 0;\n}\n\n.menu[data-position=bottom] {\n transform-origin: bottom right;\n}\n\n.menu[data-position=bottom].hidden {\n transform: scale(0.9) rotate(-3deg) translateY(5%);\n}\n\n.menu[data-position=top] {\n transform-origin: top right;\n}\n\n.menu[data-position=top].hidden {\n transform: scale(0.9) rotate(3deg) translateY(-5%);\n}\n\n.menu input[type=radio] {\n position: absolute;\n overflow: hidden;\n clip: rect(0 0 0 0);\n width: 1px;\n height: 1px;\n padding: 0;\n margin: 0;\n border: 0;\n}\n\n.menu input[type=radio]:checked + .option {\n box-shadow: 0 0 0 2px rgb(var(--em-rgb-accent));\n}\n\n.option {\n width: 100%;\n padding: 4px 6px;\n border-radius: 6px;\n}\n\n.option:hover {\n color: #fff;\n background-color: rgb(var(--em-rgb-accent));\n}\n\n.skin-tone {\n position: relative;\n display: inline-block;\n width: 16px;\n height: 16px;\n border-radius: 100%;\n overflow: hidden;\n}\n\n.skin-tone:after {\n content: "";\n position: absolute;\n inset: 0;\n border-radius: 100%;\n border: 1px solid rgba(0, 0, 0, 0.8);\n mix-blend-mode: overlay;\n box-shadow: inset 0 -2px 3px #000, inset 0 1px 2px #fff;\n background: linear-gradient(to bottom, rgba(255, 255, 255, 0.2), transparent);\n}\n\n.skin-tone-1 {\n background-color: #ffc93a;\n}\n\n.skin-tone-2 {\n background-color: #ffdab7;\n}\n\n.skin-tone-3 {\n background-color: #e7b98f;\n}\n\n.skin-tone-4 {\n background-color: #c88c61;\n}\n\n.skin-tone-5 {\n background-color: #a46134;\n}\n\n.skin-tone-6 {\n background-color: #5d4437;\n}\n\n[data-emoji-set=twitter] .skin-tone:after {\n border-color: rgba(0, 0, 0, 0.5);\n box-shadow: none;\n}\n\n[data-emoji-set=twitter] .skin-tone-1 {\n background-color: #FADE72;\n}\n\n[data-emoji-set=twitter] .skin-tone-2 {\n background-color: #F3DFD0;\n}\n\n[data-emoji-set=twitter] .skin-tone-3 {\n background-color: #EED3A8;\n}\n\n[data-emoji-set=twitter] .skin-tone-4 {\n background-color: #CFAD8D;\n}\n\n[data-emoji-set=twitter] .skin-tone-5 {\n background-color: #A8805D;\n}\n\n[data-emoji-set=twitter] .skin-tone-6 {\n background-color: #765542;\n}\n\n[data-emoji-set=google] .skin-tone:after {\n box-shadow: inset 0 0 2px 2px rgba(0, 0, 0, 0.4);\n}\n\n[data-emoji-set=google] .skin-tone-1 {\n background-color: #F5C748;\n}\n\n[data-emoji-set=google] .skin-tone-2 {\n background-color: #F1D5AA;\n}\n\n[data-emoji-set=google] .skin-tone-3 {\n background-color: #D4B48D;\n}\n\n[data-emoji-set=google] .skin-tone-4 {\n background-color: #AA876B;\n}\n\n[data-emoji-set=google] .skin-tone-5 {\n background-color: #916544;\n}\n\n[data-emoji-set=google] .skin-tone-6 {\n background-color: #61493F;\n}\n\n[data-emoji-set=facebook] .skin-tone:after {\n border-color: rgba(0, 0, 0, 0.4);\n box-shadow: inset 0 -2px 3px #000, inset 0 1px 4px #fff;\n}\n\n[data-emoji-set=facebook] .skin-tone-1 {\n background-color: #F5C748;\n}\n\n[data-emoji-set=facebook] .skin-tone-2 {\n background-color: #F1D5AA;\n}\n\n[data-emoji-set=facebook] .skin-tone-3 {\n background-color: #D4B48D;\n}\n\n[data-emoji-set=facebook] .skin-tone-4 {\n background-color: #AA876B;\n}\n\n[data-emoji-set=facebook] .skin-tone-5 {\n background-color: #916544;\n}\n\n[data-emoji-set=facebook] .skin-tone-6 {\n background-color: #61493F;\n}\n';class By extends t.Component{constructor(){super(...arguments),zf(this,"ref",t.createRef()),zf(this,"fetchEmojiData",(async()=>{try{const{data:e}=await Hg.get("https://cdn.jsdelivr.net/npm/@emoji-mart/data");return e}catch(e){return{}}})),zf(this,"onKeyDown",(e=>{let{event:t}=e;return"Escape"===t.key&&(this.props.editor.chain().focus().deleteRange(this.props.range).run(),!0)})),zf(this,"handleSelect",(e=>{this.props.editor.chain().focus().deleteRange(this.props.range).setEmoji(e).run()}))}componentDidMount(){new Py({...this.props,onEmojiSelect:this.handleSelect,style:{maxWidth:"100%"},theme:"light",native:!0,previewPosition:"none",showSkinTones:!1,data:this.fetchEmojiData,ref:this.ref})}render(){return t.createElement("div",{ref:this.ref,"data-cy":"neeto-editor-emoji-picker"})}}By.defaultProps={editor:{},range:{}},By.propTypes={editor:hf.exports.object.isRequired,range:hf.exports.object};const Uy=e=>{let{editor:n}=e;const r=c();return t.createElement(jf,{ref:r,closeOnSelect:!1,customTarget:()=>{var e;return t.createElement(Mf,{icon:nh,iconActive:null==r||null===(e=r.current)||void 0===e?void 0:e.visible,tooltipProps:{content:"Emoji",position:"bottom",delay:[500]},"data-cy":"neeto-editor-fixed-menu-emoji-option-button"})},position:"bottom-start"},t.createElement(By,{editor:n}))},$y=e=>{let{editor:n}=e;return t.createElement(jf,{customTarget:()=>t.createElement(Mf,{icon:gh,iconActive:n.isActive("heading"),tooltipProps:{content:"Font Size",position:"bottom",delay:[500]},"data-cy":"neeto-editor-fixed-menu-font-size-option"}),className:"neeto-editor-font-size-wrapper",placement:"bottom"},O.map((e=>{let{label:r,value:i}=e;return t.createElement("li",{onClick:()=>{return e=i,n.chain().focus().toggleHeading({level:e}).run();var e},key:i,className:Sc({active:(o=i,n.isActive("heading",{level:o}))}),"data-cy":"neeto-editor-fixed-menu-font-size-option-".concat(r)},r);var o})))},Hy=e=>{let{editor:n}=e;const r=c(),o=c(),[s,a]=i(""),[l,u]=i(""),d=n.isActive("link"),p=()=>{u(n.getAttributes("link").href||"")},h=()=>{var e;sf.test(l)?(n.chain().focus().setLink({href:l}).run(),null===(e=r.current)||void 0===e||e.close()):a("Please enter a valid url")};return t.createElement(jf,{ref:r,onVisible:()=>{var e;return null===(e=o.current)||void 0===e?void 0:e.focus({preventScroll:!0})},customTarget:()=>t.createElement(Mf,{icon:Bp,iconActive:d,onClick:p,tooltipProps:{content:"Link",position:"bottom",delay:[500]},"data-cy":"neeto-editor-fixed-menu-link-option"}),className:"neeto-editor-link-wrapper",closeOnSelect:!1,position:"bottom"},t.createElement("div",{onKeyDown:e=>{"Escape"===e.key?r.current.close():"Enter"===e.key&&h()},className:"neeto-editor-link__item"},t.createElement(Xh,{ref:o,name:"url",value:l,placeholder:"Paste URL",onFocus:()=>a(""),error:s,onChange:e=>{let{target:{value:t}}=e;return u(t)},"data-cy":"neeto-editor-fixed-menu-link-option-input"}),t.createElement(ed,{label:"Link",onClick:h,"data-cy":"neeto-editor-fixed-menu-link-option-link-button"}),d&&t.createElement(ed,{label:"Unlink",onClick:()=>{var e;n.chain().focus().unsetLink().run(),null===(e=r.current)||void 0===e||e.close()},"data-cy":"neeto-editor-fixed-menu-link-option-unlink-button"})))};var Wy=Lc((function(e){for(var t={},n=0;n<e.length;)t[e[n][0]]=e[n][1],n+=1;return t}));const Vy=e=>{let{editor:t,options:n,setImageUploadVisible:r}=e;const i=((e,t)=>({font:[{Icon:ih,command:()=>e.chain().focus().toggleBold().run(),active:e.isActive("bold"),optionName:"bold"},{Icon:ph,command:()=>e.chain().focus().toggleItalic().run(),active:e.isActive("italic"),optionName:"italic"},{Icon:yh,command:()=>e.chain().focus().toggleUnderline().run(),active:e.isActive("underline"),optionName:"underline"},{Icon:sh,command:()=>e.chain().focus().toggleStrike().run(),active:e.isActive("strike"),optionName:"strike"},{Icon:Ap,command:()=>e.chain().focus().toggleHighlight().run(),active:e.isActive("highlight"),optionName:"highlight"}],block:[{Icon:Jp,command:()=>e.chain().focus().toggleBlockquote().run(),active:e.isActive("blockquote"),optionName:"block-quote",highlight:!0},{Icon:kp,command:()=>e.chain().focus().toggleCodeBlock().run(),active:e.isActive("codeBlock"),optionName:"code-block",highlight:!0},{Icon:Lp,command:()=>t(!0),active:e.isActive("imageUpload"),optionName:"image-upload"}],list:[{Icon:$p,command:()=>e.chain().focus().toggleBulletList().run(),active:e.isActive("bulletList"),optionName:"bullet-list",highlight:!0},{Icon:Wp,command:()=>e.chain().focus().toggleOrderedList().run(),active:e.isActive("orderedList"),optionName:"ordered-list",highlight:!0}]}))(t,r);return Wy(["font","block","list"].map((e=>[e,i[e].filter((e=>n.includes(e.optionName)))])))},qy={small:24,medium:32,large:40,xlarge:64},Yy=["#E5E7EB","#FECACA","#FDE68A","#A7F3D0","#BFDBFE","#C7D2FE","#DDD6FE","#FBCFE8"],Ky=e=>{let{size:n,user:r,isSquare:o,status:s,onClick:a,className:l,...c}=e;const[u,d]=i(!1),{name:p="",imageUrl:h}=r,f="medium"===n,m="large"===n,g="xlarge"===n,b=(e=>{const t=e.trim().split(" "),n=t.reduce(((e,n,r)=>(0!==r&&r!==t.length-1||(e="".concat(e).concat(n.charAt(0).toUpperCase())),e)),"");return n})(p),y={height:qy[n],width:qy[n],backgroundColor:(()=>{const e=(b.charCodeAt(0)||0)+(b.charCodeAt(1)||0);return Yy[e%65%Yy.length]||Yy[0]})()},v=Sc("ne-avatar",{"ne-avatar--medium":f,"ne-avatar--large":m,"ne-avatar--xlarge":g,"ne-avatar--round":!o,hidden:!u}),w=Sc("ne-avatar__text",{"ne-avatar__text-medium":f,"ne-avatar__text-large":m,"ne-avatar__text-xlarge":g}),E=Sc("ne-avatar__status","".concat(s),{"ne-avatar__status-medium":f,"ne-avatar__status-large":m,"ne-avatar__status-xlarge":g,"ne-avatar__status-square":o}),M=()=>null==s?t.Fragment:t.createElement("span",{className:E}),k=()=>t.createElement("span",{className:w},b),_=b&&!h&&!u;return t.createElement("div",x({onClick:a,style:y,className:Sc("ne-avatar--container",{"ne-avatar--container-round":!o},l)},c),t.createElement(M,null),_?t.createElement(k,null):t.createElement("img",{className:v,onLoad:()=>d(!0),onError:()=>d(!1),src:h,alt:"avatar-".concat(b)}))};Ky.defaultProps={size:"medium",user:{imageUrl:"",name:""},isSquare:!1,onClick:()=>{},status:null},Ky.propTypes={size:hf.exports.oneOf(Object.keys(qy)),user:hf.exports.shape({imageUrl:hf.exports.string,name:hf.exports.string}),isSquare:hf.exports.bool,onClick:hf.exports.func,status:hf.exports.oneOf(Object.keys({online:"online",idle:"idle",offline:"offline"})),className:hf.exports.string};var Qy=Rc;var Gy="function"==typeof Object.assign?Object.assign:function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1,r=arguments.length;n<r;){var i=arguments[n];if(null!=i)for(var o in i)Qy(o,i)&&(t[o]=i[o]);n+=1}return t},Zy=Gy,Jy=Fc((function(e,t){return Zy({},t,e)})),Xy=Jy;const ev=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e.map(((e,n)=>Xy(e,{showImage:t,key:"".concat(Su(e.name),"-").concat(n)}))).sort(((e,t)=>e.name.localeCompare(t.name)))},tv=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=ev(e,t);return e=>{let{query:t}=e;return n.filter((e=>{let{name:n}=e;return n.toLocaleLowerCase().includes(t.toLocaleLowerCase())}))}},nv=e=>{let{editor:n,mentions:r,showImageInMention:i}=e;const o=c(),s=ev(r,i);return Cu(s)?null:t.createElement(jf,{ref:o,customTarget:()=>{var e;return t.createElement(Mf,{icon:Tp,iconActive:null===(e=o.current)||void 0===e?void 0:e.visible,tooltipProps:{content:"Mention",position:"bottom",delay:[500]},"data-cy":"neeto-editor-mention-option"})}},t.createElement("div",{className:"neeto-editor-mentions__wrapper neeto-editor-mentions__wrapper--small"},s.map((e=>{let{key:r,name:o,imageUrl:s}=e;return t.createElement("button",{className:"neeto-editor-mentions__item neeto-editor-mentions__item--light",key:r,onClick:()=>n.commands.setMention({id:r,label:o}),type:"button","data-cy":"neeto-editor-mention-option-".concat(r)},i&&t.createElement(Ky,{size:"small",user:{name:o,imageUrl:s}}),t.createElement("p",null,o))}))))},rv=e=>{let{onClickVariable:n,variables:r}=e;const i=function(){const e=[],t=[];return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach((n=>{const{category_key:r,category_label:i,variables:o}=n;if(r&&o){const e=o.map((e=>({...e,category_key:r})));t.push({label:i,variables:e})}else e.push(n)})),e.length&&t.push({label:t.length?"Others":null,variables:e}),t}(r);return r&&r.length?t.createElement("div",{className:"neeto-editor-variables-list"},i.map(((e,r)=>{let{label:i,variables:o}=e;return t.createElement(iv,{key:r,index:r,title:i,variables:o,onClickItem:n})}))):null},iv=e=>{let{index:n,title:r,variables:i,onClickItem:o}=e;return t.createElement("div",{className:"neeto-editor-variables-block","data-cy":"neeto-editor-variable-option-category-".concat(n)},r&&t.createElement("h6",null,r),t.createElement("div",{className:"neeto-editor-variables-row"},i.map((e=>t.createElement("button",{type:"button",onClick:()=>o(e),key:"".concat(e.label,"--").concat(e.value),className:"neeto-editor-variable","data-cy":"neeto-editor-variable-option-item-".concat(e.label,"--").concat(e.value)},e.label)))))},ov=e=>{let{editor:n,variables:r}=e;const i=c();return r&&r.length?t.createElement(jf,{ref:i,customTarget:()=>{var e;return t.createElement(Mf,{icon:yp,iconActive:null===(e=i.current)||void 0===e?void 0:e.visible,tooltipProps:{content:"Variables",position:"bottom",delay:[500]},"data-cy":"neeto-editor-variable-option"})}},t.createElement(rv,{onClickVariable:e=>{const{category_key:t,key:r}=e,i=t?"".concat(t,".").concat(r):r;n.chain().focus().setVariable({label:i}).run()},variables:r})):null},sv=e=>{let{editor:n,variables:r,setImageUploadVisible:o,options:s,mentions:a,showImageInMention:l}=e;const[c,u]=i(!1),d=n&&n.view.state.selection.node,p=d&&"image"===d.type.name;if(!n)return null;const{font:h,block:f,list:m}=Vy({editor:n,options:s,setImageUploadVisible:o}),g=s.filter((e=>e.match(/^h[1-6]$/))).length>0,b=s.includes(C.EMOJI),y=s.includes(C.LINK),v=(e,n)=>{let{Icon:r,command:i,active:o,optionName:s,highlight:a}=e;return t.createElement(Mf,{key:n,icon:r,iconActive:o,highlight:a,onClick:i,tooltipProps:{content:Tu(s),position:"bottom",delay:[500]},"data-cy":"neeto-editor-fixed-menu-".concat(s,"-option")})};return t.createElement("div",{className:"neeto-editor-fixed-menu"},g&&t.createElement($y,{editor:n}),h.map(v),b&&t.createElement(Uy,{editor:n}),y&&t.createElement(Hy,{editor:n}),f.map(v),m.map(v),p&&nf({editor:n,isImageEditorModalOpen:c,setIsImageEditorModalOpen:u}).map(((e,n)=>{let{Icon:r,command:i,active:o,optionName:s}=e;return t.createElement(Mf,{key:n,icon:r,iconActive:o,onClick:i,tooltipProps:{content:Tu(s),position:"bottom",delay:[500]},"data-cy":"neeto-editor-fixed-menu-".concat(s,"-option")})})),t.createElement("div",{className:"neeto-editor-fixed-menu-addons"},t.createElement(ov,{editor:n,variables:r}),t.createElement(nv,{editor:n,mentions:a,showImageInMention:l})),t.createElement(Zh,{isOpen:c,onClose:()=>u(!1)},t.createElement("div",{className:"neeto-editor-image-uploader"},t.createElement("div",{className:"neeto-editor-image-uploader__content"},t.createElement(ef,{editor:n,onClose:()=>u(!1),url:null==d?void 0:d.attrs.src,alt:null==d?void 0:d.attrs.alt})))))},av=()=>{},lv="large",cv=e=>{let{children:n,size:r,noUnderline:i,className:o="",...s}=e;return t.createElement("div",x({className:Sc({"ne-tab__wrapper":!0},{"ne-tab__wrapper--size-large":r===lv},{"ne-tab__wrapper--underline-none":i},[o]),"data-cy":"tab-container"},s),n)};cv.Item=e=>{let{active:n,className:r="",children:i,icon:o=null,onClick:s=av,...a}=e;const l="button",c="string"==typeof o?()=>t.createElement("i",{className:o,"data-cy":"tab-item-icon"}):o||t.Fragment;return t.createElement(l,x({className:Sc(["ne-tab flex select-none items-center justify-center",r],{active:n}),onClick:s,"data-cy":"tab-item"},a),o&&t.createElement(c,{className:"ne-tab__icon"}),i)};const uv={autoProceed:!0,allowMultipleUploads:!1,restrictions:{maxFileSize:5*1024*1024,allowedFileTypes:[".jpg",".jpeg",".png",".gif"]}},dv={formData:!0,fieldName:"blob"},pv=[{title:"Upload",key:"local"},{title:"Link",key:"link"},{title:"Unsplash",key:"unsplash"}];var hv={exports:{}},fv={};function mv(e){return e<10?`0${e}`:e.toString()}var gv=function(){const e=new Date;return`${mv(e.getHours())}:${mv(e.getMinutes())}:${mv(e.getSeconds())}`};Object.defineProperty(fv,"__esModule",{value:!0}),fv.justErrorsLogger=fv.debugLogger=void 0;const bv=gv,yv={debug:()=>{},warn:()=>{},error:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return console.error(`[Uppy] [${bv()}]`,...t)}};fv.justErrorsLogger=yv;const vv={debug:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return console.debug(`[Uppy] [${bv()}]`,...t)},warn:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return console.warn(`[Uppy] [${bv()}]`,...t)},error:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return console.error(`[Uppy] [${bv()}]`,...t)}};fv.debugLogger=vv;let wv="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var xv={nanoid:(e=21)=>{let t="",n=e;for(;n--;)t+=wv[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(n=t)=>{let r="",i=n;for(;i--;)r+=e[Math.random()*e.length|0];return r}},Ev={},Mv=function(e){if("number"!=typeof e||isNaN(e))throw new TypeError("Expected a number, got "+typeof e);var t=e<0,n=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];if(t&&(e=-e),e<1)return(t?"-":"")+e+" B";var r=Math.min(Math.floor(Math.log(e)/Math.log(1024)),n.length-1);e=Number(e/Math.pow(1024,r));var i=n[r];return e>=10||e%1==0?(t?"-":"")+e.toFixed(0)+" "+i:(t?"-":"")+e.toFixed(1)+" "+i};function kv(e,t){this.text=e=e||"",this.hasWild=~e.indexOf("*"),this.separator=t,this.parts=e.split(t)}kv.prototype.match=function(e){var t,n,r=!0,i=this.parts,o=i.length;if("string"==typeof e||e instanceof String)if(this.hasWild||this.text==e){for(n=(e||"").split(this.separator),t=0;r&&t<o;t++)"*"!==i[t]&&(r=t<n.length&&i[t]===n[t]);r=r&&n}else r=!1;else if("function"==typeof e.splice)for(r=[],t=e.length;t--;)this.match(e[t])&&(r[r.length]=e[t]);else if("object"==typeof e)for(var s in r={},e)this.match(s)&&(r[s]=e[s]);return r};var _v=function(e,t,n){var r=new kv(e,n||/[\/\.]/);return void 0!==t?r.match(t):r},Dv=/[\/\+\.]/;Object.defineProperty(Ev,"__esModule",{value:!0}),Ev.defaultOptions=Ev.RestrictionError=Ev.Restricter=void 0;const Cv=Mv,Ov=function(e,t){function n(t){var n=_v(t,e,Dv);return n&&n.length>=2}return t?n(t.split(";")[0]):n};Ev.defaultOptions={maxFileSize:null,minFileSize:null,maxTotalFileSize:null,maxNumberOfFiles:null,minNumberOfFiles:null,allowedFileTypes:null,requiredMetaFields:[]};class Nv extends Error{constructor(){super(...arguments),this.isRestriction=!0}}Ev.RestrictionError=Nv,"undefined"==typeof AggregateError&&(globalThis.AggregateError=class extends Error{constructor(e,t){super(t),this.errors=e}});function Tv(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}Ev.Restricter=class{constructor(e,t){this.i18n=t,this.getOpts=()=>{const t=e();if(null!=t.restrictions.allowedFileTypes&&!Array.isArray(t.restrictions.allowedFileTypes))throw new TypeError("`restrictions.allowedFileTypes` must be an array");return t}}validate(e,t){const{maxFileSize:n,minFileSize:r,maxTotalFileSize:i,maxNumberOfFiles:o,allowedFileTypes:s}=this.getOpts().restrictions;if(o&&t.length+1>o)throw new Nv(`${this.i18n("youCanOnlyUploadX",{smart_count:o})}`);if(s){const t=s.some((t=>t.includes("/")?!!e.type&&Ov(e.type.replace(/;.*?$/,""),t):!("."!==t[0]||!e.extension)&&e.extension.toLowerCase()===t.slice(1).toLowerCase()));if(!t){const e=s.join(", ");throw new Nv(this.i18n("youCanOnlyUploadFileTypes",{types:e}))}}if(i&&null!=e.size){const n=t.reduce(((e,t)=>e+t.size),e.size);if(n>i)throw new Nv(this.i18n("exceedsSize",{size:Cv(i),file:e.name}))}if(n&&null!=e.size&&e.size>n)throw new Nv(this.i18n("exceedsSize",{size:Cv(n),file:e.name}));if(r&&null!=e.size&&e.size<r)throw new Nv(this.i18n("inferiorSize",{size:Cv(r)}))}validateMinNumberOfFiles(e){const{minNumberOfFiles:t}=this.getOpts().restrictions;if(Object.keys(e).length<t)throw new Nv(this.i18n("youHaveToAtLeastSelectX",{smart_count:t}))}getMissingRequiredMetaFields(e){const t=new Nv(this.i18n("missingRequiredMetaFieldOnFile",{fileName:e.name})),{requiredMetaFields:n}=this.getOpts().restrictions,r=Object.prototype.hasOwnProperty,i=[];for(const t of n)r.call(e.meta,t)&&""!==e.meta[t]||i.push(t);return{missingFields:i,error:t}}};var Sv=0;function Av(e){return"__private_"+Sv+++"_"+e}const Iv=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};function Lv(e,t,n){const r=[];return e.forEach((e=>"string"!=typeof e?r.push(e):t[Symbol.split](e).forEach(((e,t,i)=>{""!==e&&r.push(e),t<i.length-1&&r.push(n)})))),r}
33
33
  /**
34
34
  * Takes a string with placeholder variables like `%{smart_count} file selected`
35
35
  * and replaces it with values from options `{smart_count: 5}`
@@ -40,4 +40,4 @@ var xh="undefined"!=typeof navigator&&navigator.userAgent.toLowerCase().indexOf(
40
40
  * @param {string} phrase that needs interpolation, with placeholders
41
41
  * @param {object} options with values that will be used to replace placeholders
42
42
  * @returns {any[]} interpolated
43
- */function jv(e,t){const n=/\$/g,r="$$$$";let i=[e];if(null==t)return i;for(const e of Object.keys(t))if("_"!==e){let o=t[e];"string"==typeof o&&(o=n[Symbol.replace](o,r)),i=Lv(i,new RegExp(`%\\{${e}\\}`,"g"),o)}return i}var zv=Av("apply");function Fv(e){if(null==e||!e.strings)return;const t=this.locale;this.locale={...t,strings:{...t.strings,...e.strings}},this.locale.pluralize=e.pluralize||t.pluralize}var Pv=class{constructor(e){Object.defineProperty(this,zv,{value:Fv}),this.locale={strings:{},pluralize:e=>1===e?0:1},Array.isArray(e)?e.forEach(Tv(this,zv)[zv],this):Tv(this,zv)[zv](e)}translate(e,t){return this.translateArray(e,t).join("")}translateArray(e,t){if(!Iv(this.locale.strings,e))throw new Error(`missing string: ${e}`);const n=this.locale.strings[e];if("object"==typeof n){if(t&&void 0!==t.smart_count){return jv(n[this.locale.pluralize(t.smart_count)],t)}throw new Error("Attempted to use a string with plural forms, but no value was given for %{smart_count}")}return jv(n,t)}},Rv="Expected a function",Bv=0/0,Uv="[object Symbol]",$v=/^\s+|\s+$/g,Hv=/^[-+]0x[0-9a-f]+$/i,Wv=/^0b[01]+$/i,Vv=/^0o[0-7]+$/i,qv=parseInt,Yv="object"==typeof Dc&&Dc&&Dc.Object===Object&&Dc,Kv="object"==typeof self&&self&&self.Object===Object&&self,Qv=Yv||Kv||Function("return this")(),Gv=Object.prototype.toString,Zv=Math.max,Jv=Math.min,Xv=function(){return Qv.Date.now()};function ew(e,t,n){var r,i,o,s,a,l,c=0,u=!1,d=!1,p=!0;if("function"!=typeof e)throw new TypeError(Rv);function h(t){var n=r,o=i;return r=i=void 0,c=t,s=e.apply(o,n)}function f(e){return c=e,a=setTimeout(g,t),u?h(e):s}function m(e){var n=e-l;return void 0===l||n>=t||n<0||d&&e-c>=o}function g(){var e=Xv();if(m(e))return b(e);a=setTimeout(g,function(e){var n=t-(e-l);return d?Jv(n,o-(e-c)):n}(e))}function b(e){return a=void 0,p&&r?h(e):(r=i=void 0,s)}function y(){var e=Xv(),n=m(e);if(r=arguments,i=this,l=e,n){if(void 0===a)return f(l);if(d)return a=setTimeout(g,t),h(l)}return void 0===a&&(a=setTimeout(g,t)),s}return t=nw(t)||0,tw(n)&&(u=!!n.leading,o=(d="maxWait"in n)?Zv(nw(n.maxWait)||0,t):o,p="trailing"in n?!!n.trailing:p),y.cancel=function(){void 0!==a&&clearTimeout(a),c=0,r=l=i=a=void 0},y.flush=function(){return void 0===a?s:b(Xv())},y}function tw(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function nw(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&Gv.call(e)==Uv}(e))return Bv;if(tw(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=tw(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace($v,"");var n=Wv.test(e);return n||Vv.test(e)?qv(e.slice(2),n?2:8):Hv.test(e)?Bv:+e}var rw=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new TypeError(Rv);return tw(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),ew(e,t,{leading:r,maxWait:t,trailing:i})};var iw=0;function ow(e){return"__private_"+iw+++"_"+e}var sw=ow("publish");class aw{constructor(){Object.defineProperty(this,sw,{value:lw}),this.state={},this.callbacks=[]}getState(){return this.state}setState(e){const t={...this.state},n={...this.state,...e};this.state=n,function(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}(this,sw)[sw](t,n,e)}subscribe(e){return this.callbacks.push(e),()=>{this.callbacks.splice(this.callbacks.indexOf(e),1)}}}function lw(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.callbacks.forEach((e=>{e(...t)}))}aw.VERSION="2.1.0";var cw=function(e){const t=e.lastIndexOf(".");return-1===t||t===e.length-1?{name:e,extension:void 0}:{name:e.slice(0,t),extension:e.slice(t+1)}};const uw=cw,dw={md:"text/markdown",markdown:"text/markdown",mp4:"video/mp4",mp3:"audio/mp3",svg:"image/svg+xml",jpg:"image/jpeg",png:"image/png",gif:"image/gif",heic:"image/heic",heif:"image/heif",yaml:"text/yaml",yml:"text/yaml",csv:"text/csv",tsv:"text/tab-separated-values",tab:"text/tab-separated-values",avi:"video/x-msvideo",mks:"video/x-matroska",mkv:"video/x-matroska",mov:"video/quicktime",dicom:"application/dicom",doc:"application/msword",docm:"application/vnd.ms-word.document.macroenabled.12",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",dot:"application/msword",dotm:"application/vnd.ms-word.template.macroenabled.12",dotx:"application/vnd.openxmlformats-officedocument.wordprocessingml.template",xla:"application/vnd.ms-excel",xlam:"application/vnd.ms-excel.addin.macroenabled.12",xlc:"application/vnd.ms-excel",xlf:"application/x-xliff+xml",xlm:"application/vnd.ms-excel",xls:"application/vnd.ms-excel",xlsb:"application/vnd.ms-excel.sheet.binary.macroenabled.12",xlsm:"application/vnd.ms-excel.sheet.macroenabled.12",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",xlt:"application/vnd.ms-excel",xltm:"application/vnd.ms-excel.template.macroenabled.12",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template",xlw:"application/vnd.ms-excel",txt:"text/plain",text:"text/plain",conf:"text/plain",log:"text/plain",pdf:"application/pdf",zip:"application/zip","7z":"application/x-7z-compressed",rar:"application/x-rar-compressed",tar:"application/x-tar",gz:"application/gzip",dmg:"application/x-apple-diskimage"};function pw(e){let t="";return e.replace(/[^A-Z0-9]/gi,(e=>(t+=`-${function(e){return e.charCodeAt(0).toString(32)}(e)}`,"/")))+t}var hw=function(e){let t="uppy";return"string"==typeof e.name&&(t+=`-${pw(e.name.toLowerCase())}`),void 0!==e.type&&(t+=`-${e.type}`),e.meta&&"string"==typeof e.meta.relativePath&&(t+=`-${pw(e.meta.relativePath.toLowerCase())}`),void 0!==e.data.size&&(t+=`-${e.data.size}`),void 0!==e.data.lastModified&&(t+=`-${e.data.lastModified}`),t};var fw=function(e){if(null==e&&"undefined"!=typeof navigator&&(e=navigator.userAgent),!e)return!0;const t=/Edge\/(\d+\.\d+)/.exec(e);if(!t)return!0;const n=t[1];let[r,i]=n.split(".");return r=parseInt(r,10),i=parseInt(i,10),r<15||15===r&&i<15063||(r>18||18===r&&i>=18218)};var mw=xv,gw=fv,bw=Ev;let yw,vw;function ww(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var xw=0;function Ew(e){return"__private_"+xw+++"_"+e}const Mw=Pv,kw=function(){var e={},t=e._fns={};return e.emit=function(e,n,r,i,o,s,a){var l=function(e){var n=t[e]?t[e]:[],r=e.indexOf(":"),i=-1===r?[e]:[e.substring(0,r),e.substring(r+1)],o=Object.keys(t),s=0,a=o.length;for(;s<a;s++){var l=o[s];if("*"===l&&(n=n.concat(t[l])),2===i.length&&i[0]===l){n=n.concat(t[l]);break}}return n}(e);l.length&&function(e,t,n){var r=0,i=t.length;for(;r<i&&t[r];r++)t[r].event=e,t[r].apply(t[r],n)}(e,l,[n,r,i,o,s,a])},e.on=function(e,n){t[e]||(t[e]=[]),t[e].push(n)},e.once=function(t,n){this.on(t,(function r(){n.apply(this,arguments),e.off(t,r)}))},e.off=function(e,t){var n=[];if(e&&t)for(var r=this._fns[e],i=0,o=r?r.length:0;i<o;i++)r[i]!==t&&n.push(r[i]);n.length?this._fns[e]=n:delete this._fns[e]},e},_w=rw,Dw=function(){return new aw},Cw=function(e){var t;if(e.type)return e.type;const n=e.name?null==(t=uw(e.name).extension)?void 0:t.toLowerCase():null;return n&&n in dw?dw[n]:"application/octet-stream"},Ow=cw,Nw=hw,Tw=fw,Sw=function(e,t){return t.name?t.name:"image"===e.split("/")[0]?`${e.split("/")[0]}.${e.split("/")[1]}`:"noname"},Aw={strings:{addBulkFilesFailed:{0:"Failed to add %{smart_count} file due to an internal error",1:"Failed to add %{smart_count} files due to internal errors"},youCanOnlyUploadX:{0:"You can only upload %{smart_count} file",1:"You can only upload %{smart_count} files"},youHaveToAtLeastSelectX:{0:"You have to select at least %{smart_count} file",1:"You have to select at least %{smart_count} files"},exceedsSize:"%{file} exceeds maximum allowed size of %{size}",missingRequiredMetaField:"Missing required meta fields",missingRequiredMetaFieldOnFile:"Missing required meta fields in %{fileName}",inferiorSize:"This file is smaller than the allowed size of %{size}",youCanOnlyUploadFileTypes:"You can only upload: %{types}",noMoreFilesAllowed:"Cannot add more files",noDuplicates:"Cannot add the duplicate file '%{fileName}', it already exists",companionError:"Connection with Companion failed",authAborted:"Authentication aborted",companionUnauthorizeHint:"To unauthorize to your %{provider} account, please go to %{url}",failedToUpload:"Failed to upload %{file}",noInternetConnection:"No Internet connection",connectedToInternet:"Connected to the Internet",noFilesFound:"You have no files or folders here",selectX:{0:"Select %{smart_count}",1:"Select %{smart_count}"},allFilesFromFolderNamed:"All files from folder %{name}",openFolderNamed:"Open folder %{name}",cancel:"Cancel",logOut:"Log out",filter:"Filter",resetFilter:"Reset filter",loading:"Loading...",authenticateWithTitle:"Please authenticate with %{pluginName} to select files",authenticateWith:"Connect to %{pluginName}",signInWithGoogle:"Sign in with Google",searchImages:"Search for images",enterTextToSearch:"Enter text to search for images",search:"Search",emptyFolderAdded:"No files were added from empty folder",folderAlreadyAdded:'The folder "%{folder}" was already added',folderAdded:{0:"Added %{smart_count} file from %{folder}",1:"Added %{smart_count} files from %{folder}"}}};var Iw=Ew("plugins"),Lw=Ew("restricter"),jw=Ew("storeUnsubscribe"),zw=Ew("emitter"),Fw=Ew("preProcessors"),Pw=Ew("uploaders"),Rw=Ew("postProcessors"),Bw=Ew("informAndEmit"),Uw=Ew("checkRequiredMetaFieldsOnFile"),$w=Ew("checkRequiredMetaFields"),Hw=Ew("assertNewUploadAllowed"),Ww=Ew("checkAndCreateFileStateObject"),Vw=Ew("startIfAutoProceed"),qw=Ew("addListeners"),Yw=Ew("updateOnlineStatus"),Kw=Ew("createUpload"),Qw=Ew("getUpload"),Gw=Ew("removeUpload"),Zw=Ew("runUpload");yw=Symbol.for("uppy test: getPlugins"),vw=Symbol.for("uppy test: createUpload");class Jw{constructor(e){Object.defineProperty(this,Zw,{value:cx}),Object.defineProperty(this,Gw,{value:lx}),Object.defineProperty(this,Qw,{value:ax}),Object.defineProperty(this,Kw,{value:sx}),Object.defineProperty(this,qw,{value:ox}),Object.defineProperty(this,Vw,{value:ix}),Object.defineProperty(this,Ww,{value:rx}),Object.defineProperty(this,Hw,{value:nx}),Object.defineProperty(this,$w,{value:tx}),Object.defineProperty(this,Uw,{value:ex}),Object.defineProperty(this,Bw,{value:Xw}),Object.defineProperty(this,Iw,{writable:!0,value:Object.create(null)}),Object.defineProperty(this,Lw,{writable:!0,value:void 0}),Object.defineProperty(this,jw,{writable:!0,value:void 0}),Object.defineProperty(this,zw,{writable:!0,value:kw()}),Object.defineProperty(this,Fw,{writable:!0,value:new Set}),Object.defineProperty(this,Pw,{writable:!0,value:new Set}),Object.defineProperty(this,Rw,{writable:!0,value:new Set}),Object.defineProperty(this,Yw,{writable:!0,value:this.updateOnlineStatus.bind(this)}),this.defaultLocale=Aw;const t={id:"uppy",autoProceed:!1,allowMultipleUploads:!0,allowMultipleUploadBatches:!0,debug:!1,restrictions:bw.defaultOptions,meta:{},onBeforeFileAdded:e=>e,onBeforeUpload:e=>e,store:Dw(),logger:gw.justErrorsLogger,infoTimeout:5e3};this.opts={...t,...e,restrictions:{...t.restrictions,...e&&e.restrictions}},e&&e.logger&&e.debug?this.log("You are using a custom `logger`, but also set `debug: true`, which uses built-in logger to output logs to console. Ignoring `debug: true` and using your custom `logger`.","warning"):e&&e.debug&&(this.opts.logger=gw.debugLogger),this.log(`Using Core v${this.constructor.VERSION}`),this.i18nInit(),this.calculateProgress=_w(this.calculateProgress.bind(this),500,{leading:!0,trailing:!0}),this.store=this.opts.store,this.setState({plugins:{},files:{},currentUploads:{},allowNewUpload:!0,capabilities:{uploadProgress:Tw(),individualCancellation:!0,resumableUploads:!1},totalProgress:0,meta:{...this.opts.meta},info:[],recoveredState:null}),ww(this,Lw)[Lw]=new bw.Restricter((()=>this.opts),this.i18n),ww(this,jw)[jw]=this.store.subscribe(((e,t,n)=>{this.emit("state-update",e,t,n),this.updateAll(t)})),this.opts.debug&&"undefined"!=typeof window&&(window[this.opts.id]=this),ww(this,qw)[qw]()}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];ww(this,zw)[zw].emit(e,...n)}on(e,t){return ww(this,zw)[zw].on(e,t),this}once(e,t){return ww(this,zw)[zw].once(e,t),this}off(e,t){return ww(this,zw)[zw].off(e,t),this}updateAll(e){this.iteratePlugins((t=>{t.update(e)}))}setState(e){this.store.setState(e)}getState(){return this.store.getState()}get state(){return this.getState()}setFileState(e,t){if(!this.getState().files[e])throw new Error(`Can’t set state for ${e} (the file could have been removed)`);this.setState({files:{...this.getState().files,[e]:{...this.getState().files[e],...t}}})}i18nInit(){const e=new Mw([this.defaultLocale,this.opts.locale]);this.i18n=e.translate.bind(e),this.i18nArray=e.translateArray.bind(e),this.locale=e.locale}setOptions(e){this.opts={...this.opts,...e,restrictions:{...this.opts.restrictions,...e&&e.restrictions}},e.meta&&this.setMeta(e.meta),this.i18nInit(),e.locale&&this.iteratePlugins((e=>{e.setOptions()})),this.setState()}resetProgress(){const e={percentage:0,bytesUploaded:0,uploadComplete:!1,uploadStarted:null},t={...this.getState().files},n={};Object.keys(t).forEach((r=>{const i={...t[r]};i.progress={...i.progress,...e},n[r]=i})),this.setState({files:n,totalProgress:0}),this.emit("reset-progress")}addPreProcessor(e){ww(this,Fw)[Fw].add(e)}removePreProcessor(e){return ww(this,Fw)[Fw].delete(e)}addPostProcessor(e){ww(this,Rw)[Rw].add(e)}removePostProcessor(e){return ww(this,Rw)[Rw].delete(e)}addUploader(e){ww(this,Pw)[Pw].add(e)}removeUploader(e){return ww(this,Pw)[Pw].delete(e)}setMeta(e){const t={...this.getState().meta,...e},n={...this.getState().files};Object.keys(n).forEach((t=>{n[t]={...n[t],meta:{...n[t].meta,...e}}})),this.log("Adding metadata:"),this.log(e),this.setState({meta:t,files:n})}setFileMeta(e,t){const n={...this.getState().files};if(!n[e])return void this.log("Was trying to set metadata for a file that has been removed: ",e);const r={...n[e].meta,...t};n[e]={...n[e],meta:r},this.setState({files:n})}getFile(e){return this.getState().files[e]}getFiles(){const{files:e}=this.getState();return Object.values(e)}getObjectOfFilesPerState(){const{files:e,totalProgress:t,error:n}=this.getState(),r=Object.values(e),i=r.filter((e=>{let{progress:t}=e;return!t.uploadComplete&&t.uploadStarted})),o=r.filter((e=>!e.progress.uploadStarted)),s=r.filter((e=>e.progress.uploadStarted||e.progress.preprocess||e.progress.postprocess)),a=r.filter((e=>e.progress.uploadStarted)),l=r.filter((e=>e.isPaused)),c=r.filter((e=>e.progress.uploadComplete)),u=r.filter((e=>e.error)),d=i.filter((e=>!e.isPaused)),p=r.filter((e=>e.progress.preprocess||e.progress.postprocess));return{newFiles:o,startedFiles:s,uploadStartedFiles:a,pausedFiles:l,completeFiles:c,erroredFiles:u,inProgressFiles:i,inProgressNotPausedFiles:d,processingFiles:p,isUploadStarted:a.length>0,isAllComplete:100===t&&c.length===r.length&&0===p.length,isAllErrored:!!n&&u.length===r.length,isAllPaused:0!==i.length&&l.length===i.length,isUploadInProgress:i.length>0,isSomeGhost:r.some((e=>e.isGhost))}}validateRestrictions(e,t){void 0===t&&(t=this.getFiles());try{return ww(this,Lw)[Lw].validate(e,t),{result:!0}}catch(e){return{result:!1,reason:e.message}}}checkIfFileAlreadyExists(e){const{files:t}=this.getState();return!(!t[e]||t[e].isGhost)}addFile(e){ww(this,Hw)[Hw](e);const{files:t}=this.getState();let n=ww(this,Ww)[Ww](t,e);return t[n.id]&&t[n.id].isGhost&&(n={...t[n.id],data:e.data,isGhost:!1},this.log(`Replaced the blob in the restored ghost file: ${n.name}, ${n.id}`)),this.setState({files:{...t,[n.id]:n}}),this.emit("file-added",n),this.emit("files-added",[n]),this.log(`Added file: ${n.name}, ${n.id}, mime type: ${n.type}`),ww(this,Vw)[Vw](),n.id}addFiles(e){ww(this,Hw)[Hw]();const t={...this.getState().files},n=[],r=[];for(let i=0;i<e.length;i++)try{let r=ww(this,Ww)[Ww](t,e[i]);t[r.id]&&t[r.id].isGhost&&(r={...t[r.id],data:e[i].data,isGhost:!1},this.log(`Replaced blob in a ghost file: ${r.name}, ${r.id}`)),t[r.id]=r,n.push(r)}catch(e){e.isRestriction||r.push(e)}if(this.setState({files:t}),n.forEach((e=>{this.emit("file-added",e)})),this.emit("files-added",n),n.length>5?this.log(`Added batch of ${n.length} files`):Object.keys(n).forEach((e=>{this.log(`Added file: ${n[e].name}\n id: ${n[e].id}\n type: ${n[e].type}`)})),n.length>0&&ww(this,Vw)[Vw](),r.length>0){let e="Multiple errors occurred while adding files:\n";if(r.forEach((t=>{e+=`\n * ${t.message}`})),this.info({message:this.i18n("addBulkFilesFailed",{smart_count:r.length}),details:e},"error",this.opts.infoTimeout),"function"==typeof AggregateError)throw new AggregateError(r,e);{const t=new Error(e);throw t.errors=r,t}}}removeFiles(e,t){const{files:n,currentUploads:r}=this.getState(),i={...n},o={...r},s=Object.create(null);function a(e){return void 0===s[e]}e.forEach((e=>{n[e]&&(s[e]=n[e],delete i[e])})),Object.keys(o).forEach((e=>{const t=r[e].fileIDs.filter(a);0!==t.length?o[e]={...r[e],fileIDs:t}:delete o[e]}));const l={currentUploads:o,files:i};0===Object.keys(i).length&&(l.allowNewUpload=!0,l.error=null,l.recoveredState=null),this.setState(l),this.calculateTotalProgress();const c=Object.keys(s);c.forEach((e=>{this.emit("file-removed",s[e],t)})),c.length>5?this.log(`Removed ${c.length} files`):this.log(`Removed files: ${c.join(", ")}`)}removeFile(e,t){void 0===t&&(t=null),this.removeFiles([e],t)}pauseResume(e){if(!this.getState().capabilities.resumableUploads||this.getFile(e).uploadComplete)return;const t=!(this.getFile(e).isPaused||!1);return this.setFileState(e,{isPaused:t}),this.emit("upload-pause",e,t),t}pauseAll(){const e={...this.getState().files};Object.keys(e).filter((t=>!e[t].progress.uploadComplete&&e[t].progress.uploadStarted)).forEach((t=>{const n={...e[t],isPaused:!0};e[t]=n})),this.setState({files:e}),this.emit("pause-all")}resumeAll(){const e={...this.getState().files};Object.keys(e).filter((t=>!e[t].progress.uploadComplete&&e[t].progress.uploadStarted)).forEach((t=>{const n={...e[t],isPaused:!1,error:null};e[t]=n})),this.setState({files:e}),this.emit("resume-all")}retryAll(){const e={...this.getState().files},t=Object.keys(e).filter((t=>e[t].error));if(t.forEach((t=>{const n={...e[t],isPaused:!1,error:null};e[t]=n})),this.setState({files:e,error:null}),this.emit("retry-all",t),0===t.length)return Promise.resolve({successful:[],failed:[]});const n=ww(this,Kw)[Kw](t,{forceAllowNewUpload:!0});return ww(this,Zw)[Zw](n)}cancelAll(e){let{reason:t="user"}=void 0===e?{}:e;if(this.emit("cancel-all",{reason:t}),"user"===t){const{files:e}=this.getState(),t=Object.keys(e);t.length&&this.removeFiles(t,"cancel-all"),this.setState({totalProgress:0,error:null,recoveredState:null})}}retryUpload(e){this.setFileState(e,{error:null,isPaused:!1}),this.emit("upload-retry",e);const t=ww(this,Kw)[Kw]([e],{forceAllowNewUpload:!0});return ww(this,Zw)[Zw](t)}reset(){this.cancelAll(...arguments)}logout(){this.iteratePlugins((e=>{e.provider&&e.provider.logout&&e.provider.logout()}))}calculateProgress(e,t){if(null==e||!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`);const n=Number.isFinite(t.bytesTotal)&&t.bytesTotal>0;this.setFileState(e.id,{progress:{...this.getFile(e.id).progress,bytesUploaded:t.bytesUploaded,bytesTotal:t.bytesTotal,percentage:n?Math.round(t.bytesUploaded/t.bytesTotal*100):0}}),this.calculateTotalProgress()}calculateTotalProgress(){const e=this.getFiles().filter((e=>e.progress.uploadStarted||e.progress.preprocess||e.progress.postprocess));if(0===e.length)return this.emit("progress",0),void this.setState({totalProgress:0});const t=e.filter((e=>null!=e.progress.bytesTotal)),n=e.filter((e=>null==e.progress.bytesTotal));if(0===t.length){const t=100*e.length,r=n.reduce(((e,t)=>e+t.progress.percentage),0),i=Math.round(r/t*100);return void this.setState({totalProgress:i})}let r=t.reduce(((e,t)=>e+t.progress.bytesTotal),0);const i=r/t.length;r+=i*n.length;let o=0;t.forEach((e=>{o+=e.progress.bytesUploaded})),n.forEach((e=>{o+=i*(e.progress.percentage||0)/100}));let s=0===r?0:Math.round(o/r*100);s>100&&(s=100),this.setState({totalProgress:s}),this.emit("progress",s)}updateOnlineStatus(){void 0===window.navigator.onLine||window.navigator.onLine?(this.emit("is-online"),this.wasOffline&&(this.emit("back-online"),this.info(this.i18n("connectedToInternet"),"success",3e3),this.wasOffline=!1)):(this.emit("is-offline"),this.info(this.i18n("noInternetConnection"),"error",0),this.wasOffline=!0)}getID(){return this.opts.id}use(e,t){if("function"!=typeof e){throw new TypeError(`Expected a plugin class, but got ${null===e?"null":typeof e}.`+" Please verify that the plugin was imported and spelled correctly.")}const n=new e(this,t),r=n.id;if(!r)throw new Error("Your plugin must have an id");if(!n.type)throw new Error("Your plugin must have a type");const i=this.getPlugin(r);if(i){const e=`Already found a plugin named '${i.id}'. `+`Tried to use: '${r}'.\n`+"Uppy plugins must have unique `id` options. See https://uppy.io/docs/plugins/#id.";throw new Error(e)}return e.VERSION&&this.log(`Using ${r} v${e.VERSION}`),n.type in ww(this,Iw)[Iw]?ww(this,Iw)[Iw][n.type].push(n):ww(this,Iw)[Iw][n.type]=[n],n.install(),this}getPlugin(e){for(const t of Object.values(ww(this,Iw)[Iw])){const n=t.find((t=>t.id===e));if(null!=n)return n}}[yw](e){return ww(this,Iw)[Iw][e]}iteratePlugins(e){Object.values(ww(this,Iw)[Iw]).flat(1).forEach(e)}removePlugin(e){this.log(`Removing plugin ${e.id}`),this.emit("plugin-remove",e),e.uninstall&&e.uninstall();const t=ww(this,Iw)[Iw][e.type],n=t.findIndex((t=>t.id===e.id));-1!==n&&t.splice(n,1);const r={plugins:{...this.getState().plugins,[e.id]:void 0}};this.setState(r)}close(e){let{reason:t}=void 0===e?{}:e;this.log(`Closing Uppy instance ${this.opts.id}: removing all files and uninstalling plugins`),this.cancelAll({reason:t}),ww(this,jw)[jw](),this.iteratePlugins((e=>{this.removePlugin(e)})),"undefined"!=typeof window&&window.removeEventListener&&(window.removeEventListener("online",ww(this,Yw)[Yw]),window.removeEventListener("offline",ww(this,Yw)[Yw]))}hideInfo(){const{info:e}=this.getState();this.setState({info:e.slice(1)}),this.emit("info-hidden")}info(e,t,n){void 0===t&&(t="info"),void 0===n&&(n=3e3);const r="object"==typeof e;this.setState({info:[...this.getState().info,{type:t,message:r?e.message:e,details:r?e.details:null}]}),setTimeout((()=>this.hideInfo()),n),this.emit("info-visible")}log(e,t){const{logger:n}=this.opts;switch(t){case"error":n.error(e);break;case"warning":n.warn(e);break;default:n.debug(e)}}restore(e){return this.log(`Core: attempting to restore upload "${e}"`),this.getState().currentUploads[e]?ww(this,Zw)[Zw](e):(ww(this,Gw)[Gw](e),Promise.reject(new Error("Nonexistent upload")))}[vw](){return ww(this,Kw)[Kw](...arguments)}addResultData(e,t){if(!ww(this,Qw)[Qw](e))return void this.log(`Not setting result for an upload that has been removed: ${e}`);const{currentUploads:n}=this.getState(),r={...n[e],result:{...n[e].result,...t}};this.setState({currentUploads:{...n,[e]:r}})}upload(){var e;null!=(e=ww(this,Iw)[Iw].uploader)&&e.length||this.log("No uploader type plugins are used","warning");let{files:t}=this.getState();const n=this.opts.onBeforeUpload(t);return!1===n?Promise.reject(new Error("Not starting the upload because onBeforeUpload returned false")):(n&&"object"==typeof n&&(t=n,this.setState({files:t})),Promise.resolve().then((()=>ww(this,Lw)[Lw].validateMinNumberOfFiles(t))).catch((e=>{throw ww(this,Bw)[Bw](e),e})).then((()=>{if(!ww(this,$w)[$w](t))throw new bw.RestrictionError(this.i18n("missingRequiredMetaField"))})).catch((e=>{throw e})).then((()=>{const{currentUploads:e}=this.getState(),n=Object.values(e).flatMap((e=>e.fileIDs)),r=[];Object.keys(t).forEach((e=>{const t=this.getFile(e);t.progress.uploadStarted||-1!==n.indexOf(e)||r.push(t.id)}));const i=ww(this,Kw)[Kw](r);return ww(this,Zw)[Zw](i)})).catch((e=>{throw this.emit("error",e),this.log(e,"error"),e})))}}function Xw(e,t){const{message:n,details:r=""}=e;e.isRestriction?this.emit("restriction-failed",t,e):this.emit("error",e),this.info({message:n,details:r},"error",this.opts.infoTimeout),this.log(`${n} ${r}`.trim(),"error")}function ex(e){const{missingFields:t,error:n}=ww(this,Lw)[Lw].getMissingRequiredMetaFields(e);return!(t.length>0)||(this.setFileState(e.id,{missingRequiredMetaFields:t}),this.log(n.message),this.emit("restriction-failed",e,n),!1)}function tx(e){let t=!0;for(const n of Object.values(e))ww(this,Uw)[Uw](n)||(t=!1);return t}function nx(e){const{allowNewUpload:t}=this.getState();if(!1===t){const t=new bw.RestrictionError(this.i18n("noMoreFilesAllowed"));throw ww(this,Bw)[Bw](t,e),t}}function rx(e,t){const n=Cw(t),r=Sw(n,t),i=Ow(r).extension,o=Boolean(t.isRemote),s=Nw({...t,type:n});if(this.checkIfFileAlreadyExists(s)){const e=new bw.RestrictionError(this.i18n("noDuplicates",{fileName:r}));throw ww(this,Bw)[Bw](e,t),e}const a=t.meta||{};a.name=r,a.type=n;const l=Number.isFinite(t.data.size)?t.data.size:null;let c={source:t.source||"",id:s,name:r,extension:i||"",meta:{...this.getState().meta,...a},type:n,data:t.data,progress:{percentage:0,bytesUploaded:0,bytesTotal:l,uploadComplete:!1,uploadStarted:null},size:l,isRemote:o,remote:t.remote||"",preview:t.preview};const u=this.opts.onBeforeFileAdded(c,e);if(!1===u){const e=new bw.RestrictionError("Cannot add the file because onBeforeFileAdded returned false.");throw this.emit("restriction-failed",t,e),e}"object"==typeof u&&null!==u&&(c=u);try{const t=Object.keys(e).map((t=>e[t]));ww(this,Lw)[Lw].validate(c,t)}catch(e){throw ww(this,Bw)[Bw](e,c),e}return c}function ix(){this.opts.autoProceed&&!this.scheduledAutoProceed&&(this.scheduledAutoProceed=setTimeout((()=>{this.scheduledAutoProceed=null,this.upload().catch((e=>{e.isRestriction||this.log(e.stack||e.message||e)}))}),4))}function ox(){const e=(e,t,n)=>{let r=e.message||"Unknown error";e.details&&(r+=` ${e.details}`),this.setState({error:r}),null!=t&&t.id in this.getState().files&&this.setFileState(t.id,{error:r,response:n})};this.on("error",e),this.on("upload-error",((t,n,r)=>{if(e(n,t,r),"object"==typeof n&&n.message){const e=new Error(n.message);e.details=n.message,n.details&&(e.details+=` ${n.details}`),e.message=this.i18n("failedToUpload",{file:null==t?void 0:t.name}),ww(this,Bw)[Bw](e)}else ww(this,Bw)[Bw](n)})),this.on("upload",(()=>{this.setState({error:null})})),this.on("upload-started",(e=>{null!=e&&this.getFile(e.id)?this.setFileState(e.id,{progress:{uploadStarted:Date.now(),uploadComplete:!1,percentage:0,bytesUploaded:0,bytesTotal:e.size}}):this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`)})),this.on("upload-progress",this.calculateProgress),this.on("upload-success",((e,t)=>{if(null==e||!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`);const n=this.getFile(e.id).progress;this.setFileState(e.id,{progress:{...n,postprocess:ww(this,Rw)[Rw].size>0?{mode:"indeterminate"}:null,uploadComplete:!0,percentage:100,bytesUploaded:n.bytesTotal},response:t,uploadURL:t.uploadURL,isPaused:!1}),null==e.size&&this.setFileState(e.id,{size:t.bytesUploaded||n.bytesTotal}),this.calculateTotalProgress()})),this.on("preprocess-progress",((e,t)=>{null!=e&&this.getFile(e.id)?this.setFileState(e.id,{progress:{...this.getFile(e.id).progress,preprocess:t}}):this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`)})),this.on("preprocess-complete",(e=>{if(null==e||!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`);const t={...this.getState().files};t[e.id]={...t[e.id],progress:{...t[e.id].progress}},delete t[e.id].progress.preprocess,this.setState({files:t})})),this.on("postprocess-progress",((e,t)=>{null!=e&&this.getFile(e.id)?this.setFileState(e.id,{progress:{...this.getState().files[e.id].progress,postprocess:t}}):this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`)})),this.on("postprocess-complete",(e=>{if(null==e||!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`);const t={...this.getState().files};t[e.id]={...t[e.id],progress:{...t[e.id].progress}},delete t[e.id].progress.postprocess,this.setState({files:t})})),this.on("restored",(()=>{this.calculateTotalProgress()})),this.on("dashboard:file-edit-complete",(e=>{e&&ww(this,Uw)[Uw](e)})),"undefined"!=typeof window&&window.addEventListener&&(window.addEventListener("online",ww(this,Yw)[Yw]),window.addEventListener("offline",ww(this,Yw)[Yw]),setTimeout(ww(this,Yw)[Yw],3e3))}function sx(e,t){void 0===t&&(t={});const{forceAllowNewUpload:n=!1}=t,{allowNewUpload:r,currentUploads:i}=this.getState();if(!r&&!n)throw new Error("Cannot create a new upload: already uploading.");const o=(0,mw.nanoid)();return this.emit("upload",{id:o,fileIDs:e}),this.setState({allowNewUpload:!1!==this.opts.allowMultipleUploadBatches&&!1!==this.opts.allowMultipleUploads,currentUploads:{...i,[o]:{fileIDs:e,step:0,result:{}}}}),o}function ax(e){const{currentUploads:t}=this.getState();return t[e]}function lx(e){const t={...this.getState().currentUploads};delete t[e],this.setState({currentUploads:t})}async function cx(e){let{currentUploads:t}=this.getState(),n=t[e];const r=n.step||0,i=[...ww(this,Fw)[Fw],...ww(this,Pw)[Pw],...ww(this,Rw)[Rw]];try{for(let o=r;o<i.length&&n;o++){const r=i[o],s={...n,step:o};this.setState({currentUploads:{...t,[e]:s}}),await r(s.fileIDs,e),t=this.getState().currentUploads,n=t[e]}}catch(t){throw ww(this,Gw)[Gw](e),t}if(n){n.fileIDs.forEach((e=>{const t=this.getFile(e);t&&t.progress.postprocess&&this.emit("postprocess-complete",t)}));const r=n.fileIDs.map((e=>this.getFile(e))),i=r.filter((e=>!e.error)),o=r.filter((e=>e.error));await this.addResultData(e,{successful:i,failed:o,uploadID:e}),t=this.getState().currentUploads,n=t[e]}let o;return n&&(o=n.result,this.emit("complete",o),ww(this,Gw)[Gw](e)),null==o&&this.log(`Not setting result for an upload that has been removed: ${e}`),o}Jw.VERSION="2.3.1";var ux,dx,px,hx,fx,mx,gx,bx=Jw,yx={},vx=[],wx=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function xx(e,t){for(var n in t)e[n]=t[n];return e}function Ex(e){var t=e.parentNode;t&&t.removeChild(e)}function Mx(e,t,n){var r,i,o,s={};for(o in t)"key"==o?r=t[o]:"ref"==o?i=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?ux.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===s[o]&&(s[o]=e.defaultProps[o]);return kx(e,s,r,i,null)}function kx(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==i?++px:i};return null==i&&null!=dx.vnode&&dx.vnode(o),o}function _x(e){return e.children}function Dx(e,t){this.props=e,this.context=t}function Cx(e,t){if(null==t)return e.__?Cx(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?Cx(e):null}function Ox(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return Ox(e)}}function Nx(e){(!e.__d&&(e.__d=!0)&&fx.push(e)&&!Tx.__r++||mx!==dx.debounceRendering)&&((mx=dx.debounceRendering)||setTimeout)(Tx)}function Tx(){for(var e;Tx.__r=fx.length;)e=fx.sort((function(e,t){return e.__v.__b-t.__v.__b})),fx=[],e.some((function(e){var t,n,r,i,o,s;e.__d&&(o=(i=(t=e).__v).__e,(s=t.__P)&&(n=[],(r=xx({},i)).__v=i.__v+1,Px(s,i,r,t.__n,void 0!==s.ownerSVGElement,null!=i.__h?[o]:null,n,null==o?Cx(i):o,i.__h),Rx(n,i),i.__e!=o&&Ox(i)))}))}function Sx(e,t,n,r,i,o,s,a,l,c){var u,d,p,h,f,m,g,b=r&&r.__k||vx,y=b.length;for(n.__k=[],u=0;u<t.length;u++)if(null!=(h=n.__k[u]=null==(h=t[u])||"boolean"==typeof h?null:"string"==typeof h||"number"==typeof h||"bigint"==typeof h?kx(null,h,null,null,h):Array.isArray(h)?kx(_x,{children:h},null,null,null):h.__b>0?kx(h.type,h.props,h.key,null,h.__v):h)){if(h.__=n,h.__b=n.__b+1,null===(p=b[u])||p&&h.key==p.key&&h.type===p.type)b[u]=void 0;else for(d=0;d<y;d++){if((p=b[d])&&h.key==p.key&&h.type===p.type){b[d]=void 0;break}p=null}Px(e,h,p=p||yx,i,o,s,a,l,c),f=h.__e,(d=h.ref)&&p.ref!=d&&(g||(g=[]),p.ref&&g.push(p.ref,null,h),g.push(d,h.__c||f,h)),null!=f?(null==m&&(m=f),"function"==typeof h.type&&h.__k===p.__k?h.__d=l=Ax(h,l,e):l=Ix(e,h,p,b,f,l),"function"==typeof n.type&&(n.__d=l)):l&&p.__e==l&&l.parentNode!=e&&(l=Cx(p))}for(n.__e=m,u=y;u--;)null!=b[u]&&("function"==typeof n.type&&null!=b[u].__e&&b[u].__e==n.__d&&(n.__d=Cx(r,u+1)),$x(b[u],b[u]));if(g)for(u=0;u<g.length;u++)Ux(g[u],g[++u],g[++u])}function Ax(e,t,n){for(var r,i=e.__k,o=0;i&&o<i.length;o++)(r=i[o])&&(r.__=e,t="function"==typeof r.type?Ax(r,t,n):Ix(n,r,r,i,r.__e,t));return t}function Ix(e,t,n,r,i,o){var s,a,l;if(void 0!==t.__d)s=t.__d,t.__d=void 0;else if(null==n||i!=o||null==i.parentNode)e:if(null==o||o.parentNode!==e)e.appendChild(i),s=null;else{for(a=o,l=0;(a=a.nextSibling)&&l<r.length;l+=2)if(a==i)break e;e.insertBefore(i,o),s=o}return void 0!==s?s:i.nextSibling}function Lx(e,t,n){"-"===t[0]?e.setProperty(t,n):e[t]=null==n?"":"number"!=typeof n||wx.test(t)?n:n+"px"}function jx(e,t,n,r,i){var o;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Lx(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Lx(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r||e.addEventListener(t,o?Fx:zx,o):e.removeEventListener(t,o?Fx:zx,o);else if("dangerouslySetInnerHTML"!==t){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null!=n&&(!1!==n||"a"===t[0]&&"r"===t[1])?e.setAttribute(t,n):e.removeAttribute(t))}}function zx(e){this.l[e.type+!1](dx.event?dx.event(e):e)}function Fx(e){this.l[e.type+!0](dx.event?dx.event(e):e)}function Px(e,t,n,r,i,o,s,a,l){var c,u,d,p,h,f,m,g,b,y,v,w,x,E=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(l=n.__h,a=t.__e=n.__e,t.__h=null,o=[a]),(c=dx.__b)&&c(t);try{e:if("function"==typeof E){if(g=t.props,b=(c=E.contextType)&&r[c.__c],y=c?b?b.props.value:c.__:r,n.__c?m=(u=t.__c=n.__c).__=u.__E:("prototype"in E&&E.prototype.render?t.__c=u=new E(g,y):(t.__c=u=new Dx(g,y),u.constructor=E,u.render=Hx),b&&b.sub(u),u.props=g,u.state||(u.state={}),u.context=y,u.__n=r,d=u.__d=!0,u.__h=[]),null==u.__s&&(u.__s=u.state),null!=E.getDerivedStateFromProps&&(u.__s==u.state&&(u.__s=xx({},u.__s)),xx(u.__s,E.getDerivedStateFromProps(g,u.__s))),p=u.props,h=u.state,d)null==E.getDerivedStateFromProps&&null!=u.componentWillMount&&u.componentWillMount(),null!=u.componentDidMount&&u.__h.push(u.componentDidMount);else{if(null==E.getDerivedStateFromProps&&g!==p&&null!=u.componentWillReceiveProps&&u.componentWillReceiveProps(g,y),!u.__e&&null!=u.shouldComponentUpdate&&!1===u.shouldComponentUpdate(g,u.__s,y)||t.__v===n.__v){u.props=g,u.state=u.__s,t.__v!==n.__v&&(u.__d=!1),u.__v=t,t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),u.__h.length&&s.push(u);break e}null!=u.componentWillUpdate&&u.componentWillUpdate(g,u.__s,y),null!=u.componentDidUpdate&&u.__h.push((function(){u.componentDidUpdate(p,h,f)}))}if(u.context=y,u.props=g,u.__v=t,u.__P=e,v=dx.__r,w=0,"prototype"in E&&E.prototype.render)u.state=u.__s,u.__d=!1,v&&v(t),c=u.render(u.props,u.state,u.context);else do{u.__d=!1,v&&v(t),c=u.render(u.props,u.state,u.context),u.state=u.__s}while(u.__d&&++w<25);u.state=u.__s,null!=u.getChildContext&&(r=xx(xx({},r),u.getChildContext())),d||null==u.getSnapshotBeforeUpdate||(f=u.getSnapshotBeforeUpdate(p,h)),x=null!=c&&c.type===_x&&null==c.key?c.props.children:c,Sx(e,Array.isArray(x)?x:[x],t,n,r,i,o,s,a,l),u.base=t.__e,t.__h=null,u.__h.length&&s.push(u),m&&(u.__E=u.__=null),u.__e=!1}else null==o&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=Bx(n.__e,t,n,r,i,o,s,l);(c=dx.diffed)&&c(t)}catch(e){t.__v=null,(l||null!=o)&&(t.__e=a,t.__h=!!l,o[o.indexOf(a)]=null),dx.__e(e,t,n)}}function Rx(e,t){dx.__c&&dx.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){dx.__e(e,t.__v)}}))}function Bx(e,t,n,r,i,o,s,a){var l,c,u,d=n.props,p=t.props,h=t.type,f=0;if("svg"===h&&(i=!0),null!=o)for(;f<o.length;f++)if((l=o[f])&&"setAttribute"in l==!!h&&(h?l.localName===h:3===l.nodeType)){e=l,o[f]=null;break}if(null==e){if(null===h)return document.createTextNode(p);e=i?document.createElementNS("http://www.w3.org/2000/svg",h):document.createElement(h,p.is&&p),o=null,a=!1}if(null===h)d===p||a&&e.data===p||(e.data=p);else{if(o=o&&ux.call(e.childNodes),c=(d=n.props||yx).dangerouslySetInnerHTML,u=p.dangerouslySetInnerHTML,!a){if(null!=o)for(d={},f=0;f<e.attributes.length;f++)d[e.attributes[f].name]=e.attributes[f].value;(u||c)&&(u&&(c&&u.__html==c.__html||u.__html===e.innerHTML)||(e.innerHTML=u&&u.__html||""))}if(function(e,t,n,r,i){var o;for(o in n)"children"===o||"key"===o||o in t||jx(e,o,null,n[o],r);for(o in t)i&&"function"!=typeof t[o]||"children"===o||"key"===o||"value"===o||"checked"===o||n[o]===t[o]||jx(e,o,t[o],n[o],r)}(e,p,d,i,a),u)t.__k=[];else if(f=t.props.children,Sx(e,Array.isArray(f)?f:[f],t,n,r,i&&"foreignObject"!==h,o,s,o?o[0]:n.__k&&Cx(n,0),a),null!=o)for(f=o.length;f--;)null!=o[f]&&Ex(o[f]);a||("value"in p&&void 0!==(f=p.value)&&(f!==e.value||"progress"===h&&!f||"option"===h&&f!==d.value)&&jx(e,"value",f,d.value,!1),"checked"in p&&void 0!==(f=p.checked)&&f!==e.checked&&jx(e,"checked",f,d.checked,!1))}return e}function Ux(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){dx.__e(e,n)}}function $x(e,t,n){var r,i;if(dx.unmount&&dx.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Ux(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){dx.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&$x(r[i],t,"function"!=typeof e.type);n||null==e.__e||Ex(e.__e),e.__e=e.__d=void 0}function Hx(e,t,n){return this.constructor(e,n)}function Wx(e,t,n){var r,i,o;dx.__&&dx.__(e,t),i=(r="function"==typeof n)?null:n&&n.__k||t.__k,o=[],Px(t,e=(!r&&n||t).__k=Mx(_x,null,[e]),i||yx,yx,void 0!==t.ownerSVGElement,!r&&n?[n]:i?null:t.firstChild?ux.call(t.childNodes):null,o,!r&&n?n:i?i.__e:t.firstChild,r),Rx(o,e)}ux=vx.slice,dx={__e:function(e,t,n,r){for(var i,o,s;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),s=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,r||{}),s=i.__d),s)return i.__E=i}catch(t){e=t}throw e}},px=0,hx=function(e){return null!=e&&void 0===e.constructor},Dx.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=xx({},this.state),"function"==typeof e&&(e=e(xx({},n),this.props)),e&&xx(n,e),null!=e&&this.__v&&(t&&this.__h.push(t),Nx(this))},Dx.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Nx(this))},Dx.prototype.render=_x,fx=[],Tx.__r=0,gx=0;var Vx=Object.freeze({__proto__:null,render:Wx,hydrate:function e(t,n){Wx(t,n,e)},createElement:Mx,h:Mx,Fragment:_x,createRef:function(){return{current:null}},get isValidElement(){return hx},Component:Dx,cloneElement:function(e,t,n){var r,i,o,s=xx({},e.props);for(o in t)"key"==o?r=t[o]:"ref"==o?i=t[o]:s[o]=t[o];return arguments.length>2&&(s.children=arguments.length>3?ux.call(arguments,2):n),kx(e.type,s,r||e.key,i||e.ref,null)},createContext:function(e,t){var n={__c:t="__cC"+gx++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some(Nx)},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n},toChildArray:function e(t,n){return n=n||[],null==t||"boolean"==typeof t||(Array.isArray(t)?t.some((function(t){e(t,n)})):n.push(t)),n},get options(){return dx}}),qx=Oc(Vx);var Yx=function(e){return(null==e?void 0:e.nodeType)===Node.ELEMENT_NODE};const Kx=Yx;var Qx=function(e,t){return void 0===t&&(t=document),"string"==typeof e?t.querySelector(e):Kx(e)?e:null};var Gx=function(e){for(var t;e&&!e.dir;)e=e.parentNode;return null==(t=e)?void 0:t.dir};const Zx=Pv;var Jx=class{constructor(e,t){void 0===t&&(t={}),this.uppy=e,this.opts=t}getPluginState(){const{plugins:e}=this.uppy.getState();return e[this.id]||{}}setPluginState(e){const{plugins:t}=this.uppy.getState();this.uppy.setState({plugins:{...t,[this.id]:{...t[this.id],...e}}})}setOptions(e){this.opts={...this.opts,...e},this.setPluginState(),this.i18nInit()}i18nInit(){const e=new Zx([this.defaultLocale,this.uppy.locale,this.opts.locale]);this.i18n=e.translate.bind(e),this.i18nArray=e.translateArray.bind(e),this.setPluginState()}addTarget(){throw new Error("Extend the addTarget method to add your plugin to another plugin's target")}install(){}uninstall(){}render(){throw new Error("Extend the render method to add your plugin to a DOM element")}update(){}afterUpdate(){}},Xx=qx;function eE(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var tE=0;function nE(e){return"__private_"+tE+++"_"+e}const rE=Qx,iE=Gx,oE=Jx;var sE=nE("updateUI");class aE extends oE{constructor(){super(...arguments),Object.defineProperty(this,sE,{writable:!0,value:void 0})}mount(e,t){const n=t.id,r=rE(e);if(r){this.isTargetDOMEl=!0;const t=document.createElement("div");return t.classList.add("uppy-Root"),eE(this,sE)[sE]=function(e){let t=null,n=null;return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=i,t||(t=Promise.resolve().then((()=>(t=null,e(...n))))),t}}((e=>{this.uppy.getPlugin(this.id)&&((0,Xx.render)(this.render(e),t),this.afterUpdate())})),this.uppy.log(`Installing ${n} to a DOM element '${e}'`),this.opts.replaceTargetContent&&(r.innerHTML=""),(0,Xx.render)(this.render(this.uppy.getState()),t),this.el=t,r.appendChild(t),t.dir=this.opts.direction||iE(t)||"ltr",this.onMount(),this.el}let i;if("object"==typeof e&&e instanceof aE)i=e;else if("function"==typeof e){const t=e;this.uppy.iteratePlugins((e=>{e instanceof t&&(i=e)}))}if(i)return this.uppy.log(`Installing ${n} to ${i.id}`),this.parent=i,this.el=i.addTarget(t),this.onMount(),this.el;this.uppy.log(`Not installing ${n}`);let o=`Invalid target option given to ${n}.`;throw o+="function"==typeof e?" The given target is not a Plugin class. "+"Please check that you're not specifying a React Component instead of a plugin. "+"If you are using @uppy/* packages directly, make sure you have only 1 version of @uppy/core installed: "+"run `npm ls @uppy/core` on the command line and verify that all the versions match and are deduped correctly.":"If you meant to target an HTML element, please make sure that the element exists. "+"Check that the <script> tag initializing Uppy is right before the closing </body> tag at the end of the page. "+"(see https://github.com/transloadit/uppy/issues/1042)\n\n"+"If you meant to target a plugin, please confirm that your `import` statements or `require` calls are correct.",new Error(o)}update(e){var t,n;null!=this.el&&(null==(t=(n=eE(this,sE))[sE])||t.call(n,e))}unmount(){var e;this.isTargetDOMEl&&(null==(e=this.el)||e.remove());this.onUnmount()}onMount(){}onUnmount(){}}var lE=aE;!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Uppy=t.UIPlugin=t.BasePlugin=void 0,Object.defineProperty(t,"debugLogger",{enumerable:!0,get:function(){return n.debugLogger}});var n=fv;e.exports=bx;const r=lE;t.UIPlugin=r;const i=Jx;t.BasePlugin=i;const o=bx;t.Uppy=o;const s=lE,a=Jx;o.Uppy=o,o.UIPlugin=s,o.BasePlugin=a,o.debugLogger=n.debugLogger}(hv,hv.exports);var cE=Cc(hv.exports),uE={exports:{}},dE={},pE=Array.from,hE=['a[href]:not([tabindex^="-"]):not([inert]):not([aria-hidden])','area[href]:not([tabindex^="-"]):not([inert]):not([aria-hidden])',"input:not([disabled]):not([inert]):not([aria-hidden])","select:not([disabled]):not([inert]):not([aria-hidden])","textarea:not([disabled]):not([inert]):not([aria-hidden])","button:not([disabled]):not([inert]):not([aria-hidden])",'iframe:not([tabindex^="-"]):not([inert]):not([aria-hidden])','object:not([tabindex^="-"]):not([inert]):not([aria-hidden])','embed:not([tabindex^="-"]):not([inert]):not([aria-hidden])','[contenteditable]:not([tabindex^="-"]):not([inert]):not([aria-hidden])','[tabindex]:not([tabindex^="-"]):not([inert]):not([aria-hidden])'];var fE=function(e,t){if(t){const n=e.querySelector(`[data-uppy-paneltype="${t}"]`);if(n)return n}return e};Object.defineProperty(dE,"__esModule",{value:!0}),dE.forInline=function(e,t,n){null===t||vE(e,t,n)},dE.forModal=vE;const mE=pE,gE=hE,bE=fE;function yE(e,t){const n=t[0];n&&(n.focus(),e.preventDefault())}function vE(e,t,n){const r=bE(n,t),i=mE(r.querySelectorAll(gE)),o=i.indexOf(document.activeElement);!function(e){return e.contains(document.activeElement)}(r)?yE(e,i):e.shiftKey&&0===o?function(e,t){const n=t[t.length-1];n&&(n.focus(),e.preventDefault())}(e,i):e.shiftKey||o!==i.length-1||yE(e,i)}var wE={exports:{}};var xE=function(e){if(!e.bytesUploaded)return 0;const t=Date.now()-e.uploadStarted;return e.bytesUploaded/(t/1e3)};var EE=function(e){return e.bytesTotal-e.bytesUploaded},ME={STATE_ERROR:"error",STATE_WAITING:"waiting",STATE_PREPROCESSING:"preprocessing",STATE_UPLOADING:"uploading",STATE_POSTPROCESSING:"postprocessing",STATE_COMPLETE:"complete"},kE={};const _E=function(e){return{hours:Math.floor(e/3600)%24,minutes:Math.floor(e/60)%60,seconds:Math.floor(e%60)}};var DE=function(e){const t=_E(e);return`${0===t.hours?"":`${t.hours}h`}${0===t.minutes?"":`${0===t.hours?t.minutes:` ${t.minutes.toString(10).padStart(2,"0")}`}m`}${0!==t.hours?"":`${0===t.minutes?t.seconds:` ${t.seconds.toString(10).padStart(2,"0")}`}s`}`};Object.defineProperty(kE,"__esModule",{value:!0}),kE.CancelBtn=function(e){const{i18n:t,uppy:n}=e;return(0,CE.h)("button",{type:"button",className:"uppy-u-reset uppy-StatusBar-actionCircleBtn",title:t("cancel"),"aria-label":t("cancel"),onClick:()=>n.cancelAll(),"data-cy":"cancel","data-uppy-super-focusable":!0},(0,CE.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"16",height:"16",viewBox:"0 0 16 16"},(0,CE.h)("g",{fill:"none",fillRule:"evenodd"},(0,CE.h)("circle",{fill:"#888",cx:"8",cy:"8",r:"8"}),(0,CE.h)("path",{fill:"#FFF",d:"M9.283 8l2.567 2.567-1.283 1.283L8 9.283 5.433 11.85 4.15 10.567 6.717 8 4.15 5.433 5.433 4.15 8 6.717l2.567-2.567 1.283 1.283z"}))))},kE.DoneBtn=function(e){const{i18n:t,doneButtonHandler:n}=e;return(0,CE.h)("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-StatusBar-actionBtn uppy-StatusBar-actionBtn--done",onClick:n,"data-uppy-super-focusable":!0},t("done"))},kE.LoadingSpinner=LE,kE.PauseResumeButton=function(e){const{isAllPaused:t,i18n:n,isAllComplete:r,resumableUploads:i,uppy:o}=e,s=n(t?"resume":"pause");return(0,CE.h)("button",{title:s,"aria-label":s,className:"uppy-u-reset uppy-StatusBar-actionCircleBtn",type:"button",onClick:function(){return r?null:i?t?o.resumeAll():o.pauseAll():o.cancelAll()},"data-uppy-super-focusable":!0},(0,CE.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"16",height:"16",viewBox:"0 0 16 16"},(0,CE.h)("g",{fill:"none",fillRule:"evenodd"},(0,CE.h)("circle",{fill:"#888",cx:"8",cy:"8",r:"8"}),(0,CE.h)("path",{fill:"#FFF",d:t?"M6 4.25L11.5 8 6 11.75z":"M5 4.5h2v7H5v-7zm4 0h2v7H9v-7z"}))))},kE.ProgressBarComplete=function(e){const{i18n:t}=e;return(0,CE.h)("div",{className:"uppy-StatusBar-content",role:"status",title:t("complete")},(0,CE.h)("div",{className:"uppy-StatusBar-status"},(0,CE.h)("div",{className:"uppy-StatusBar-statusPrimary"},(0,CE.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-StatusBar-statusIndicator uppy-c-icon",width:"15",height:"11",viewBox:"0 0 15 11"},(0,CE.h)("path",{d:"M.414 5.843L1.627 4.63l3.472 3.472L13.202 0l1.212 1.213L5.1 10.528z"})),t("complete"))))},kE.ProgressBarError=function(e){const{error:t,i18n:n,complete:r,numUploads:i}=e;return(0,CE.h)("div",{className:"uppy-StatusBar-content",title:n("uploadFailed")},(0,CE.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-StatusBar-statusIndicator uppy-c-icon",width:"11",height:"11",viewBox:"0 0 11 11"},(0,CE.h)("path",{d:"M4.278 5.5L0 1.222 1.222 0 5.5 4.278 9.778 0 11 1.222 6.722 5.5 11 9.778 9.778 11 5.5 6.722 1.222 11 0 9.778z"})),(0,CE.h)("div",{className:"uppy-StatusBar-status"},(0,CE.h)("div",{className:"uppy-StatusBar-statusPrimary"},n("uploadFailed"),(0,CE.h)("button",{className:"uppy-u-reset uppy-StatusBar-details","aria-label":n("showErrorDetails"),"data-microtip-position":"top-right","data-microtip-size":"medium",onClick:function(){const e=`${n("uploadFailed")} \n\n ${t}`;alert(e)},type:"button"},"?")),(0,CE.h)(zE,{i18n:n,complete:r,numUploads:i})))},kE.ProgressBarProcessing=function(e){const{progress:t}=e,{value:n,mode:r,message:i}=t,o=Math.round(100*n),s=`·`;return(0,CE.h)("div",{className:"uppy-StatusBar-content"},(0,CE.h)(LE,null),"determinate"===r?`${o}% ${s} `:"",i)},kE.ProgressBarUploading=function(e){const{i18n:t,supportsUploadProgress:n,totalProgress:r,showProgressDetails:i,isUploadStarted:o,isAllComplete:s,isAllPaused:a,newFiles:l,numUploads:c,complete:u,totalUploadedSize:d,totalSize:p,totalETA:h,startUpload:f}=e,m=l&&o;if(!o||s)return null;const g=t(a?"paused":"uploading");return(0,CE.h)("div",{className:"uppy-StatusBar-content","aria-label":g,title:g},a?null:(0,CE.h)(LE,null),(0,CE.h)("div",{className:"uppy-StatusBar-status"},(0,CE.h)("div",{className:"uppy-StatusBar-statusPrimary"},n?`${g}: ${r}%`:g),a||m||!i?null:n?(0,CE.h)(PE,{numUploads:c,complete:u,totalUploadedSize:d,totalSize:p,totalETA:h,i18n:t}):(0,CE.h)(zE,{i18n:t,complete:u,numUploads:c}),m?(0,CE.h)(FE,{i18n:t,newFiles:l,startUpload:f}):null))},kE.ProgressDetails=jE,kE.RetryBtn=function(e){const{i18n:t,uppy:n}=e;return(0,CE.h)("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-StatusBar-actionBtn uppy-StatusBar-actionBtn--retry","aria-label":t("retryUpload"),onClick:()=>n.retryAll(),"data-uppy-super-focusable":!0},(0,CE.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"8",height:"10",viewBox:"0 0 8 10"},(0,CE.h)("path",{d:"M4 2.408a2.75 2.75 0 1 0 2.75 2.75.626.626 0 0 1 1.25.018v.023a4 4 0 1 1-4-4.041V.25a.25.25 0 0 1 .389-.208l2.299 1.533a.25.25 0 0 1 0 .416l-2.3 1.533A.25.25 0 0 1 4 3.316v-.908z"})),t("retry"))},kE.UploadBtn=function(e){const{newFiles:t,isUploadStarted:n,recoveredState:r,i18n:i,uploadState:o,isSomeGhost:s,startUpload:a}=e,l=OE("uppy-u-reset","uppy-c-btn","uppy-StatusBar-actionBtn","uppy-StatusBar-actionBtn--upload",{"uppy-c-btn-primary":o===SE.STATE_WAITING},{"uppy-StatusBar-actionBtn--disabled":s}),c=i(t&&n&&!r?"uploadXNewFiles":"uploadXFiles",{smart_count:t});return(0,CE.h)("button",{type:"button",className:l,"aria-label":i("uploadXFiles",{smart_count:t}),onClick:a,disabled:s,"data-uppy-super-focusable":!0},c)};var CE=qx;const OE=Tc.exports,NE=Mv,TE=DE,SE=ME,AE=`·`,IE=()=>` ${AE} `;function LE(){return(0,CE.h)("svg",{className:"uppy-StatusBar-spinner","aria-hidden":"true",focusable:"false",width:"14",height:"14"},(0,CE.h)("path",{d:"M13.983 6.547c-.12-2.509-1.64-4.893-3.939-5.936-2.48-1.127-5.488-.656-7.556 1.094C.524 3.367-.398 6.048.162 8.562c.556 2.495 2.46 4.52 4.94 5.183 2.932.784 5.61-.602 7.256-3.015-1.493 1.993-3.745 3.309-6.298 2.868-2.514-.434-4.578-2.349-5.153-4.84a6.226 6.226 0 0 1 2.98-6.778C6.34.586 9.74 1.1 11.373 3.493c.407.596.693 1.282.842 1.988.127.598.073 1.197.161 1.794.078.525.543 1.257 1.15.864.525-.341.49-1.05.456-1.592-.007-.15.02.3 0 0",fillRule:"evenodd"}))}function jE(e){const{numUploads:t,complete:n,totalUploadedSize:r,totalSize:i,totalETA:o,i18n:s}=e,a=t>1;return(0,CE.h)("div",{className:"uppy-StatusBar-statusSecondary"},a&&s("filesUploadedOfTotal",{complete:n,smart_count:t}),(0,CE.h)("span",{className:"uppy-StatusBar-additionalInfo"},a&&IE(),s("dataUploadedOfTotal",{complete:NE(r),total:NE(i)}),IE(),s("xTimeLeft",{time:TE(o)})))}function zE(e){const{i18n:t,complete:n,numUploads:r}=e;return(0,CE.h)("div",{className:"uppy-StatusBar-statusSecondary"},t("filesUploadedOfTotal",{complete:n,smart_count:r}))}function FE(e){const{i18n:t,newFiles:n,startUpload:r}=e,i=OE("uppy-u-reset","uppy-c-btn","uppy-StatusBar-actionBtn","uppy-StatusBar-actionBtn--uploadNewlyAdded");return(0,CE.h)("div",{className:"uppy-StatusBar-statusSecondary"},(0,CE.h)("div",{className:"uppy-StatusBar-statusSecondaryHint"},t("xMoreFilesAdded",{smart_count:n})),(0,CE.h)("button",{type:"button",className:i,"aria-label":t("uploadXFiles",{smart_count:n}),onClick:r},t("upload")))}const PE=rw(jE,500,{leading:!0,trailing:!0});var RE=qx,BE=kE;const UE=Tc.exports,$E=ME,HE=function(e){const t=[];let n,r;for(const{progress:i}of Object.values(e)){const{preprocess:e,postprocess:o}=i;null==r&&(e||o)&&({mode:n,message:r}=e||o),"determinate"===(null==e?void 0:e.mode)&&t.push(e.value),"determinate"===(null==o?void 0:o.mode)&&t.push(o.value)}return{mode:n,message:r,value:t.reduce(((e,n)=>e+n/t.length),0)}},{STATE_ERROR:WE,STATE_WAITING:VE,STATE_PREPROCESSING:qE,STATE_UPLOADING:YE,STATE_POSTPROCESSING:KE,STATE_COMPLETE:QE}=$E;var GE=function(e){const{newFiles:t,allowNewUpload:n,isUploadInProgress:r,isAllPaused:i,resumableUploads:o,error:s,hideUploadButton:a,hidePauseResumeButton:l,hideCancelButton:c,hideRetryButton:u,recoveredState:d,uploadState:p,totalProgress:h,files:f,supportsUploadProgress:m,hideAfterFinish:g,isSomeGhost:b,doneButtonHandler:y,isUploadStarted:v,i18n:w,startUpload:x,uppy:E,isAllComplete:M,showProgressDetails:k,numUploads:_,complete:D,totalSize:C,totalETA:O,totalUploadedSize:N}=e,T=function(){switch(p){case KE:case qE:{const e=HE(f);return"determinate"===e.mode?100*e.value:h}case WE:return null;case YE:return m?h:null;default:return h}}(),S=function(){if(d)return!1;switch(p){case VE:return a||0===t;case QE:return g;default:return!1}}(),A=null!=T?T:100,I=!s&&t&&!r&&!i&&n&&!a,L=!c&&p!==VE&&p!==QE,j=o&&!l&&p===YE,z=s&&!M&&!u,F=y&&p===QE,P=UE("uppy-StatusBar-progress",{"is-indeterminate":function(){switch(p){case KE:case qE:{const{mode:e}=HE(f);return"indeterminate"===e}case YE:return!m;default:return!1}}()}),R=UE("uppy-StatusBar",`is-${p}`,{"has-ghosts":b});return(0,RE.h)("div",{className:R,"aria-hidden":S},(0,RE.h)("div",{className:P,style:{width:`${A}%`},role:"progressbar","aria-label":`${A}%`,"aria-valuetext":`${A}%`,"aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":T}),(()=>{switch(p){case qE:case KE:return(0,RE.h)(BE.ProgressBarProcessing,{progress:HE(f)});case QE:return(0,RE.h)(BE.ProgressBarComplete,{i18n:w});case WE:return(0,RE.h)(BE.ProgressBarError,{error:s,i18n:w,numUploads:_,complete:D});case YE:return(0,RE.h)(BE.ProgressBarUploading,{i18n:w,supportsUploadProgress:m,totalProgress:h,showProgressDetails:k,isUploadStarted:v,isAllComplete:M,isAllPaused:i,newFiles:t,numUploads:_,complete:D,totalUploadedSize:N,totalSize:C,totalETA:O,startUpload:x});default:return null}})(),(0,RE.h)("div",{className:"uppy-StatusBar-actions"},d||I?(0,RE.h)(BE.UploadBtn,{newFiles:t,isUploadStarted:v,recoveredState:d,i18n:w,isSomeGhost:b,startUpload:x,uploadState:p}):null,z?(0,RE.h)(BE.RetryBtn,{i18n:w,uppy:E}):null,j?(0,RE.h)(BE.PauseResumeButton,{isAllPaused:i,i18n:w,isAllComplete:M,resumableUploads:o,uppy:E}):null,L?(0,RE.h)(BE.CancelBtn,{i18n:w,uppy:E}):null,F?(0,RE.h)(BE.DoneBtn,{i18n:w,doneButtonHandler:y}):null))},ZE=hv.exports;const JE=xE,XE=EE,eM=Gx,tM=ME,nM=GE,rM={strings:{uploading:"Uploading",complete:"Complete",uploadFailed:"Upload failed",paused:"Paused",retry:"Retry",cancel:"Cancel",pause:"Pause",resume:"Resume",done:"Done",filesUploadedOfTotal:{0:"%{complete} of %{smart_count} file uploaded",1:"%{complete} of %{smart_count} files uploaded"},dataUploadedOfTotal:"%{complete} of %{total}",xTimeLeft:"%{time} left",uploadXFiles:{0:"Upload %{smart_count} file",1:"Upload %{smart_count} files"},uploadXNewFiles:{0:"Upload +%{smart_count} file",1:"Upload +%{smart_count} files"},upload:"Upload",retryUpload:"Retry upload",xMoreFilesAdded:{0:"%{smart_count} more file added",1:"%{smart_count} more files added"},showErrorDetails:"Show error details"}};function iM(e){const t=function(e){let t=0;return e.forEach((e=>{t+=JE(e.progress)})),t}(e);if(0===t)return 0;const n=e.reduce(((e,t)=>e+XE(t.progress)),0);return Math.round(n/t*10)/10}function oM(e,t,n,r){if(e&&!t)return tM.STATE_ERROR;if(t)return tM.STATE_COMPLETE;if(n)return tM.STATE_WAITING;let i=tM.STATE_WAITING;const o=Object.keys(r);for(let e=0;e<o.length;e++){const{progress:t}=r[o[e]];if(t.uploadStarted&&!t.uploadComplete)return tM.STATE_UPLOADING;t.preprocess&&i!==tM.STATE_UPLOADING&&(i=tM.STATE_PREPROCESSING),t.postprocess&&i!==tM.STATE_UPLOADING&&i!==tM.STATE_PREPROCESSING&&(i=tM.STATE_POSTPROCESSING)}return i}class sM extends ZE.UIPlugin{constructor(e,t){super(e,t),this.startUpload=()=>{const{recoveredState:e}=this.uppy.getState();if(!e)return this.uppy.upload().catch((()=>{}));this.uppy.emit("restore-confirmed")},this.id=this.opts.id||"StatusBar",this.title="StatusBar",this.type="progressindicator",this.defaultLocale=rM;this.opts={target:"body",hideUploadButton:!1,hideRetryButton:!1,hidePauseResumeButton:!1,hideCancelButton:!1,showProgressDetails:!1,hideAfterFinish:!0,doneButtonHandler:null,...t},this.i18nInit(),this.render=this.render.bind(this),this.install=this.install.bind(this)}render(e){const{capabilities:t,files:n,allowNewUpload:r,totalProgress:i,error:o,recoveredState:s}=e,{newFiles:a,startedFiles:l,completeFiles:c,inProgressNotPausedFiles:u,isUploadStarted:d,isAllComplete:p,isAllErrored:h,isAllPaused:f,isUploadInProgress:m,isSomeGhost:g}=this.uppy.getObjectOfFilesPerState(),b=s?Object.values(n):a,y=iM(u),v=!!t.resumableUploads,w=!1!==t.uploadProgress;let x=0,E=0;return l.forEach((e=>{x+=e.progress.bytesTotal||0,E+=e.progress.bytesUploaded||0})),nM({error:o,uploadState:oM(o,p,s,e.files||{}),allowNewUpload:r,totalProgress:i,totalSize:x,totalUploadedSize:E,isAllComplete:!1,isAllPaused:f,isAllErrored:h,isUploadStarted:d,isUploadInProgress:m,isSomeGhost:g,recoveredState:s,complete:c.length,newFiles:b.length,numUploads:l.length,totalETA:y,files:n,i18n:this.i18n,uppy:this.uppy,startUpload:this.startUpload,doneButtonHandler:this.opts.doneButtonHandler,resumableUploads:v,supportsUploadProgress:w,showProgressDetails:this.opts.showProgressDetails,hideUploadButton:this.opts.hideUploadButton,hideRetryButton:this.opts.hideRetryButton,hidePauseResumeButton:this.opts.hidePauseResumeButton,hideCancelButton:this.opts.hideCancelButton,hideAfterFinish:this.opts.hideAfterFinish,isTargetDOMEl:this.isTargetDOMEl})}onMount(){const e=this.el;eM(e)||(e.dir="ltr")}install(){const{target:e}=this.opts;e&&this.mount(e,this)}uninstall(){this.unmount()}}sM.VERSION="2.2.1",wE.exports=sM;var aM={exports:{}},lM=qx;const cM=300;class uM extends lM.Component{constructor(){super(...arguments),this.ref=(0,lM.createRef)()}componentWillEnter(e){this.ref.current.style.opacity="1",this.ref.current.style.transform="none",setTimeout(e,cM)}componentWillLeave(e){this.ref.current.style.opacity="0",this.ref.current.style.transform="translateY(350%)",setTimeout(e,cM)}render(){const{children:e}=this.props;return(0,lM.h)("div",{className:"uppy-Informer-animated",ref:this.ref},e)}}var dM=uM,pM=qx;function hM(e,t){const n=e._ptgLinkedRefs||(e._ptgLinkedRefs={});return n[t]||(n[t]=n=>{e.refs[t]=n})}function fM(e){const t={};for(let o=0;o<e.length;o++)if(null!=e[o]){t[(n=e[o],r=o.toString(36),i=void 0,null!=(i=null==n?void 0:n.key)?i:r)]=e[o]}var n,r,i;return t}function mM(e,t){e=e||{},t=t||{};const n=n=>t.hasOwnProperty(n)?t[n]:e[n],r={};let i=[];for(const n in e)t.hasOwnProperty(n)?i.length&&(r[n]=i,i=[]):i.push(n);const o={};for(const e in t){if(r.hasOwnProperty(e))for(let t=0;t<r[e].length;t++){const i=r[e][t];o[r[e][t]]=n(i)}o[e]=n(e)}for(let e=0;e<i.length;e++)o[i[e]]=n(i[e]);return o}class gM extends pM.Component{constructor(e,t){super(e,t),this.refs={},this.state={children:fM((0,pM.toChildArray)((0,pM.toChildArray)(this.props.children))||[])},this.performAppear=this.performAppear.bind(this),this.performEnter=this.performEnter.bind(this),this.performLeave=this.performLeave.bind(this)}componentWillMount(){this.currentlyTransitioningKeys={},this.keysToAbortLeave=[],this.keysToEnter=[],this.keysToLeave=[]}componentDidMount(){const e=this.state.children;for(const t in e)e[t]&&this.performAppear(t)}componentWillReceiveProps(e){const t=fM((0,pM.toChildArray)(e.children)||[]),n=this.state.children;let r;for(r in this.setState((e=>({children:mM(e.children,t)}))),t)if(t.hasOwnProperty(r)){const e=n&&n.hasOwnProperty(r);t[r]&&e&&this.currentlyTransitioningKeys[r]?(this.keysToEnter.push(r),this.keysToAbortLeave.push(r)):!t[r]||e||this.currentlyTransitioningKeys[r]||this.keysToEnter.push(r)}for(r in n)if(n.hasOwnProperty(r)){const e=t&&t.hasOwnProperty(r);!n[r]||e||this.currentlyTransitioningKeys[r]||this.keysToLeave.push(r)}}componentDidUpdate(){const{keysToEnter:e}=this;this.keysToEnter=[],e.forEach(this.performEnter);const{keysToLeave:t}=this;this.keysToLeave=[],t.forEach(this.performLeave)}_finishAbort(e){const t=this.keysToAbortLeave.indexOf(e);-1!==t&&this.keysToAbortLeave.splice(t,1)}performAppear(e){this.currentlyTransitioningKeys[e]=!0;const t=this.refs[e];t.componentWillAppear?t.componentWillAppear(this._handleDoneAppearing.bind(this,e)):this._handleDoneAppearing(e)}_handleDoneAppearing(e){const t=this.refs[e];t.componentDidAppear&&t.componentDidAppear(),delete this.currentlyTransitioningKeys[e],this._finishAbort(e);const n=fM((0,pM.toChildArray)(this.props.children)||[]);n&&n.hasOwnProperty(e)||this.performLeave(e)}performEnter(e){this.currentlyTransitioningKeys[e]=!0;const t=this.refs[e];t.componentWillEnter?t.componentWillEnter(this._handleDoneEntering.bind(this,e)):this._handleDoneEntering(e)}_handleDoneEntering(e){const t=this.refs[e];t.componentDidEnter&&t.componentDidEnter(),delete this.currentlyTransitioningKeys[e],this._finishAbort(e);const n=fM((0,pM.toChildArray)(this.props.children)||[]);n&&n.hasOwnProperty(e)||this.performLeave(e)}performLeave(e){if(-1!==this.keysToAbortLeave.indexOf(e))return;this.currentlyTransitioningKeys[e]=!0;const t=this.refs[e];t.componentWillLeave?t.componentWillLeave(this._handleDoneLeaving.bind(this,e)):this._handleDoneLeaving(e)}_handleDoneLeaving(e){if(-1!==this.keysToAbortLeave.indexOf(e))return;const t=this.refs[e];t.componentDidLeave&&t.componentDidLeave(),delete this.currentlyTransitioningKeys[e];const n=fM((0,pM.toChildArray)(this.props.children)||[]);if(n&&n.hasOwnProperty(e))this.performEnter(e);else{const t=(r={},i=this.state.children,Object.assign(r,i));delete t[e],this.setState({children:t})}var r,i}render(e,t){let{childFactory:n,transitionLeave:r,transitionName:i,transitionAppear:o,transitionEnter:s,transitionLeaveTimeout:a,transitionEnterTimeout:l,transitionAppearTimeout:c,component:u,...d}=e,{children:p}=t;const h=[];for(const e in p)if(p.hasOwnProperty(e)){const t=p[e];if(t){const r=hM(this,e),i=(0,pM.cloneElement)(n(t),{ref:r,key:e});h.push(i)}}return(0,pM.h)(u,d,h)}}gM.defaultProps={component:"span",childFactory:e=>e};var bM=qx,yM=hv.exports;const vM=dM,wM=gM;class xM extends yM.UIPlugin{constructor(e,t){super(e,t),this.render=e=>(0,bM.h)("div",{className:"uppy uppy-Informer"},(0,bM.h)(wM,null,e.info.map((e=>(0,bM.h)(vM,{key:e.message},(0,bM.h)("p",{role:"alert"},e.message," ",e.details&&(0,bM.h)("span",{"aria-label":e.details,"data-microtip-position":"top-left","data-microtip-size":"medium",role:"tooltip",onClick:()=>alert(`${e.message} \n\n ${e.details}`)},"?"))))))),this.type="progressindicator",this.id=this.opts.id||"Informer",this.title="Informer";this.opts={...t}}install(){const{target:e}=this.opts;e&&this.mount(e,this)}}xM.VERSION="2.1.0",aM.exports=xM;var EM={exports:{}};!function(e){function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var n="undefined"!=typeof self?self:Dc;const r="undefined"!=typeof navigator,i=r&&"undefined"==typeof HTMLImageElement,o=!(void 0===Dc||"undefined"==typeof process||!process.versions||!process.versions.node),s=n.Buffer,a=!!s,l=e=>void 0!==e;function c(e){return void 0===e||(e instanceof Map?0===e.size:0===Object.values(e).filter(l).length)}function u(e){let t=new Error(e);throw delete t.stack,t}function d(e){let t=function(e){let t=0;return e.ifd0.enabled&&(t+=1024),e.exif.enabled&&(t+=2048),e.makerNote&&(t+=2048),e.userComment&&(t+=1024),e.gps.enabled&&(t+=512),e.interop.enabled&&(t+=100),e.ifd1.enabled&&(t+=1024),t+2048}(e);return e.jfif.enabled&&(t+=50),e.xmp.enabled&&(t+=2e4),e.iptc.enabled&&(t+=14e3),e.icc.enabled&&(t+=6e3),t}const p=e=>String.fromCharCode.apply(null,e),h="undefined"!=typeof TextDecoder?new TextDecoder("utf-8"):void 0;class f{static from(e,t){return e instanceof this&&e.le===t?e:new f(e,void 0,void 0,t)}constructor(e,t=0,n,r){if("boolean"==typeof r&&(this.le=r),Array.isArray(e)&&(e=new Uint8Array(e)),0===e)this.byteOffset=0,this.byteLength=0;else if(e instanceof ArrayBuffer){void 0===n&&(n=e.byteLength-t);let r=new DataView(e,t,n);this._swapDataView(r)}else if(e instanceof Uint8Array||e instanceof DataView||e instanceof f){void 0===n&&(n=e.byteLength-t),(t+=e.byteOffset)+n>e.byteOffset+e.byteLength&&u("Creating view outside of available memory in ArrayBuffer");let r=new DataView(e.buffer,t,n);this._swapDataView(r)}else if("number"==typeof e){let t=new DataView(new ArrayBuffer(e));this._swapDataView(t)}else u("Invalid input argument for BufferView: "+e)}_swapArrayBuffer(e){this._swapDataView(new DataView(e))}_swapBuffer(e){this._swapDataView(new DataView(e.buffer,e.byteOffset,e.byteLength))}_swapDataView(e){this.dataView=e,this.buffer=e.buffer,this.byteOffset=e.byteOffset,this.byteLength=e.byteLength}_lengthToEnd(e){return this.byteLength-e}set(e,t,n=f){return e instanceof DataView||e instanceof f?e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e instanceof ArrayBuffer&&(e=new Uint8Array(e)),e instanceof Uint8Array||u("BufferView.set(): Invalid data argument."),this.toUint8().set(e,t),new n(this,t,e.byteLength)}subarray(e,t){return t=t||this._lengthToEnd(e),new f(this,e,t)}toUint8(){return new Uint8Array(this.buffer,this.byteOffset,this.byteLength)}getUint8Array(e,t){return new Uint8Array(this.buffer,this.byteOffset+e,t)}getString(e=0,t=this.byteLength){return n=this.getUint8Array(e,t),h?h.decode(n):a?Buffer.from(n).toString("utf8"):decodeURIComponent(escape(p(n)));var n}getLatin1String(e=0,t=this.byteLength){let n=this.getUint8Array(e,t);return p(n)}getUnicodeString(e=0,t=this.byteLength){const n=[];for(let r=0;r<t&&e+r<this.byteLength;r+=2)n.push(this.getUint16(e+r));return p(n)}getInt8(e){return this.dataView.getInt8(e)}getUint8(e){return this.dataView.getUint8(e)}getInt16(e,t=this.le){return this.dataView.getInt16(e,t)}getInt32(e,t=this.le){return this.dataView.getInt32(e,t)}getUint16(e,t=this.le){return this.dataView.getUint16(e,t)}getUint32(e,t=this.le){return this.dataView.getUint32(e,t)}getFloat32(e,t=this.le){return this.dataView.getFloat32(e,t)}getFloat64(e,t=this.le){return this.dataView.getFloat64(e,t)}getFloat(e,t=this.le){return this.dataView.getFloat32(e,t)}getDouble(e,t=this.le){return this.dataView.getFloat64(e,t)}getUintBytes(e,t,n){switch(t){case 1:return this.getUint8(e,n);case 2:return this.getUint16(e,n);case 4:return this.getUint32(e,n);case 8:return this.getUint64&&this.getUint64(e,n)}}getUint(e,t,n){switch(t){case 8:return this.getUint8(e,n);case 16:return this.getUint16(e,n);case 32:return this.getUint32(e,n);case 64:return this.getUint64&&this.getUint64(e,n)}}toString(e){return this.dataView.toString(e,this.constructor.name)}ensureChunk(){}}function m(e,t){u(`${e} '${t}' was not loaded, try using full build of exifr.`)}class g extends Map{constructor(e){super(),this.kind=e}get(e,t){return this.has(e)||m(this.kind,e),t&&(e in t||function(e,t){u(`Unknown ${e} '${t}'.`)}(this.kind,e),t[e].enabled||m(this.kind,e)),super.get(e)}keyList(){return Array.from(this.keys())}}var b=new g("file parser"),y=new g("segment parser"),v=new g("file reader");let w=n.fetch;const x="Invalid input argument";function E(e,t){return(n=e).startsWith("data:")||n.length>1e4?k(e,t,"base64"):o&&e.includes("://")?M(e,t,"url",_):o?k(e,t,"fs"):r?M(e,t,"url",_):void u(x);var n}async function M(e,t,n,r){return v.has(n)?k(e,t,n):r?async function(e,t){let n=await t(e);return new f(n)}(e,r):void u(`Parser ${n} is not loaded`)}async function k(e,t,n){let r=new(v.get(n))(e,t);return await r.read(),r}const _=e=>w(e).then((e=>e.arrayBuffer())),D=e=>new Promise(((t,n)=>{let r=new FileReader;r.onloadend=()=>t(r.result||new ArrayBuffer),r.onerror=n,r.readAsArrayBuffer(e)}));class C extends Map{get tagKeys(){return this.allKeys||(this.allKeys=Array.from(this.keys())),this.allKeys}get tagValues(){return this.allValues||(this.allValues=Array.from(this.values())),this.allValues}}function O(e,t,n){let r=new C;for(let[e,t]of n)r.set(e,t);if(Array.isArray(t))for(let n of t)e.set(n,r);else e.set(t,r);return r}function N(e,t,n){let r,i=e.get(t);for(r of n)i.set(r[0],r[1])}const T=new Map,S=new Map,A=new Map,I=37500,L=37510,j=33723,z=34675,F=34665,P=34853,R=40965,B=["chunked","firstChunkSize","firstChunkSizeNode","firstChunkSizeBrowser","chunkSize","chunkLimit"],U=["jfif","xmp","icc","iptc","ihdr"],$=["tiff",...U],H=["ifd0","ifd1","exif","gps","interop"],W=[...$,...H],V=["makerNote","userComment"],q=["translateKeys","translateValues","reviveValues","multiSegment"],Y=[...q,"sanitize","mergeOutput","silentErrors"];class K{get translate(){return this.translateKeys||this.translateValues||this.reviveValues}}class Q extends K{get needed(){return this.enabled||this.deps.size>0}constructor(e,n,r,i){if(super(),t(this,"enabled",!1),t(this,"skip",new Set),t(this,"pick",new Set),t(this,"deps",new Set),t(this,"translateKeys",!1),t(this,"translateValues",!1),t(this,"reviveValues",!1),this.key=e,this.enabled=n,this.parse=this.enabled,this.applyInheritables(i),this.canBeFiltered=H.includes(e),this.canBeFiltered&&(this.dict=T.get(e)),void 0!==r)if(Array.isArray(r))this.parse=this.enabled=!0,this.canBeFiltered&&r.length>0&&this.translateTagSet(r,this.pick);else if("object"==typeof r){if(this.enabled=!0,this.parse=!1!==r.parse,this.canBeFiltered){let{pick:e,skip:t}=r;e&&e.length>0&&this.translateTagSet(e,this.pick),t&&t.length>0&&this.translateTagSet(t,this.skip)}this.applyInheritables(r)}else!0===r||!1===r?this.parse=this.enabled=r:u(`Invalid options argument: ${r}`)}applyInheritables(e){let t,n;for(t of q)n=e[t],void 0!==n&&(this[t]=n)}translateTagSet(e,t){if(this.dict){let n,r,{tagKeys:i,tagValues:o}=this.dict;for(n of e)"string"==typeof n?(r=o.indexOf(n),-1===r&&(r=i.indexOf(Number(n))),-1!==r&&t.add(Number(i[r]))):t.add(n)}else for(let n of e)t.add(n)}finalizeFilters(){!this.enabled&&this.deps.size>0?(this.enabled=!0,te(this.pick,this.deps)):this.enabled&&this.pick.size>0&&te(this.pick,this.deps)}}var G={jfif:!1,tiff:!0,xmp:!1,icc:!1,iptc:!1,ifd0:!0,ifd1:!1,exif:!0,gps:!0,interop:!1,ihdr:void 0,makerNote:!1,userComment:!1,multiSegment:!1,skip:[],pick:[],translateKeys:!0,translateValues:!0,reviveValues:!0,sanitize:!0,mergeOutput:!0,silentErrors:!0,chunked:!0,firstChunkSize:void 0,firstChunkSizeNode:512,firstChunkSizeBrowser:65536,chunkSize:65536,chunkLimit:5},Z=new Map;class J extends K{static useCached(e){let t=Z.get(e);return void 0!==t||(t=new this(e),Z.set(e,t)),t}constructor(e){super(),!0===e?this.setupFromTrue():void 0===e?this.setupFromUndefined():Array.isArray(e)?this.setupFromArray(e):"object"==typeof e?this.setupFromObject(e):u(`Invalid options argument ${e}`),void 0===this.firstChunkSize&&(this.firstChunkSize=r?this.firstChunkSizeBrowser:this.firstChunkSizeNode),this.mergeOutput&&(this.ifd1.enabled=!1),this.filterNestedSegmentTags(),this.traverseTiffDependencyTree(),this.checkLoadedPlugins()}setupFromUndefined(){let e;for(e of B)this[e]=G[e];for(e of Y)this[e]=G[e];for(e of V)this[e]=G[e];for(e of W)this[e]=new Q(e,G[e],void 0,this)}setupFromTrue(){let e;for(e of B)this[e]=G[e];for(e of Y)this[e]=G[e];for(e of V)this[e]=!0;for(e of W)this[e]=new Q(e,!0,void 0,this)}setupFromArray(e){let t;for(t of B)this[t]=G[t];for(t of Y)this[t]=G[t];for(t of V)this[t]=G[t];for(t of W)this[t]=new Q(t,!1,void 0,this);this.setupGlobalFilters(e,void 0,H)}setupFromObject(e){let t;for(t of(H.ifd0=H.ifd0||H.image,H.ifd1=H.ifd1||H.thumbnail,Object.assign(this,e),B))this[t]=ee(e[t],G[t]);for(t of Y)this[t]=ee(e[t],G[t]);for(t of V)this[t]=ee(e[t],G[t]);for(t of $)this[t]=new Q(t,G[t],e[t],this);for(t of H)this[t]=new Q(t,G[t],e[t],this.tiff);this.setupGlobalFilters(e.pick,e.skip,H,W),!0===e.tiff?this.batchEnableWithBool(H,!0):!1===e.tiff?this.batchEnableWithUserValue(H,e):Array.isArray(e.tiff)?this.setupGlobalFilters(e.tiff,void 0,H):"object"==typeof e.tiff&&this.setupGlobalFilters(e.tiff.pick,e.tiff.skip,H)}batchEnableWithBool(e,t){for(let n of e)this[n].enabled=t}batchEnableWithUserValue(e,t){for(let n of e){let e=t[n];this[n].enabled=!1!==e&&void 0!==e}}setupGlobalFilters(e,t,n,r=n){if(e&&e.length){for(let e of r)this[e].enabled=!1;let t=X(e,n);for(let[e,n]of t)te(this[e].pick,n),this[e].enabled=!0}else if(t&&t.length){let e=X(t,n);for(let[t,n]of e)te(this[t].skip,n)}}filterNestedSegmentTags(){let{ifd0:e,exif:t,xmp:n,iptc:r,icc:i}=this;this.makerNote?t.deps.add(I):t.skip.add(I),this.userComment?t.deps.add(L):t.skip.add(L),n.enabled||e.skip.add(700),r.enabled||e.skip.add(j),i.enabled||e.skip.add(z)}traverseTiffDependencyTree(){let{ifd0:e,exif:t,gps:n,interop:r}=this;r.needed&&(t.deps.add(R),e.deps.add(R)),t.needed&&e.deps.add(F),n.needed&&e.deps.add(P),this.tiff.enabled=H.some((e=>!0===this[e].enabled))||this.makerNote||this.userComment;for(let e of H)this[e].finalizeFilters()}get onlyTiff(){return!U.map((e=>this[e].enabled)).some((e=>!0===e))&&this.tiff.enabled}checkLoadedPlugins(){for(let e of $)this[e].enabled&&!y.has(e)&&m("segment parser",e)}}function X(e,t){let n,r,i,o,s=[];for(i of t){for(o of(n=T.get(i),r=[],n))(e.includes(o[0])||e.includes(o[1]))&&r.push(o[0]);r.length&&s.push([i,r])}return s}function ee(e,t){return void 0!==e?e:void 0!==t?t:void 0}function te(e,t){for(let n of t)e.add(n)}t(J,"default",G);class ne{constructor(e){t(this,"parsers",{}),t(this,"output",{}),t(this,"errors",[]),t(this,"pushToErrors",(e=>this.errors.push(e))),this.options=J.useCached(e)}async read(e){this.file=await function(e,t){return"string"==typeof e?E(e,t):r&&!i&&e instanceof HTMLImageElement?E(e.src,t):e instanceof Uint8Array||e instanceof ArrayBuffer||e instanceof DataView?new f(e):r&&e instanceof Blob?M(e,t,"blob",D):void u(x)}(e,this.options)}setup(){if(this.fileParser)return;let{file:e}=this,t=e.getUint16(0);for(let[n,r]of b)if(r.canHandle(e,t))return this.fileParser=new r(this.options,this.file,this.parsers),e[n]=!0;this.file.close&&this.file.close(),u("Unknown file format")}async parse(){let{output:e,errors:t}=this;return this.setup(),this.options.silentErrors?(await this.executeParsers().catch(this.pushToErrors),t.push(...this.fileParser.errors)):await this.executeParsers(),this.file.close&&this.file.close(),this.options.silentErrors&&t.length>0&&(e.errors=t),c(n=e)?void 0:n;var n}async executeParsers(){let{output:e}=this;await this.fileParser.parse();let t=Object.values(this.parsers).map((async t=>{let n=await t.parse();t.assignToOutput(e,n)}));this.options.silentErrors&&(t=t.map((e=>e.catch(this.pushToErrors)))),await Promise.all(t)}async extractThumbnail(){this.setup();let{options:e,file:t}=this,n=y.get("tiff",e);var r;if(t.tiff?r={start:0,type:"tiff"}:t.jpeg&&(r=await this.fileParser.getOrFindSegment("tiff")),void 0===r)return;let i=await this.fileParser.ensureSegmentChunk(r),o=this.parsers.tiff=new n(i,e,t),s=await o.extractThumbnail();return t.close&&t.close(),s}}async function re(e,t){let n=new ne(t);return await n.read(e),n.parse()}var ie=Object.freeze({__proto__:null,parse:re,Exifr:ne,fileParsers:b,segmentParsers:y,fileReaders:v,tagKeys:T,tagValues:S,tagRevivers:A,createDictionary:O,extendDictionary:N,fetchUrlAsArrayBuffer:_,readBlobAsArrayBuffer:D,chunkedProps:B,otherSegments:U,segments:$,tiffBlocks:H,segmentsAndBlocks:W,tiffExtractables:V,inheritables:q,allFormatters:Y,Options:J});class oe{static findPosition(e,t){let n=e.getUint16(t+2)+2,r="function"==typeof this.headerLength?this.headerLength(e,t,n):this.headerLength,i=t+r,o=n-r;return{offset:t,length:n,headerLength:r,start:i,size:o,end:i+o}}static parse(e,t={}){return new this(e,new J({[this.type]:t}),e).parse()}normalizeInput(e){return e instanceof f?e:new f(e)}constructor(e,n={},r){t(this,"errors",[]),t(this,"raw",new Map),t(this,"handleError",(e=>{if(!this.options.silentErrors)throw e;this.errors.push(e.message)})),this.chunk=this.normalizeInput(e),this.file=r,this.type=this.constructor.type,this.globalOptions=this.options=n,this.localOptions=n[this.type],this.canTranslate=this.localOptions&&this.localOptions.translate}translate(){this.canTranslate&&(this.translated=this.translateBlock(this.raw,this.type))}get output(){return this.translated?this.translated:this.raw?Object.fromEntries(this.raw):void 0}translateBlock(e,t){let n=A.get(t),r=S.get(t),i=T.get(t),o=this.options[t],s=o.reviveValues&&!!n,a=o.translateValues&&!!r,l=o.translateKeys&&!!i,c={};for(let[t,o]of e)s&&n.has(t)?o=n.get(t)(o):a&&r.has(t)&&(o=this.translateValue(o,r.get(t))),l&&i.has(t)&&(t=i.get(t)||t),c[t]=o;return c}translateValue(e,t){return t[e]||t.DEFAULT||e}assignToOutput(e,t){this.assignObjectToOutput(e,this.constructor.type,t)}assignObjectToOutput(e,t,n){if(this.globalOptions.mergeOutput)return Object.assign(e,n);e[t]?Object.assign(e[t],n):e[t]=n}}function se(e){return 192===e||194===e||196===e||219===e||221===e||218===e||254===e}function ae(e){return e>=224&&e<=239}function le(e,t,n){for(let[r,i]of y)if(i.canHandle(e,t,n))return r}t(oe,"headerLength",4),t(oe,"type",void 0),t(oe,"multiSegment",!1),t(oe,"canHandle",(()=>!1));class ce extends class{constructor(e,n,r){t(this,"errors",[]),t(this,"ensureSegmentChunk",(async e=>{let t=e.start,n=e.size||65536;if(this.file.chunked)if(this.file.available(t,n))e.chunk=this.file.subarray(t,n);else try{e.chunk=await this.file.readChunk(t,n)}catch(t){u(`Couldn't read segment: ${JSON.stringify(e)}. ${t.message}`)}else this.file.byteLength>t+n?e.chunk=this.file.subarray(t,n):void 0===e.size?e.chunk=this.file.subarray(t):u("Segment unreachable: "+JSON.stringify(e));return e.chunk})),this.extendOptions&&this.extendOptions(e),this.options=e,this.file=n,this.parsers=r}injectSegment(e,t){this.options[e].enabled&&this.createParser(e,t)}createParser(e,t){let n=new(y.get(e))(t,this.options,this.file);return this.parsers[e]=n}createParsers(e){for(let t of e){let{type:e,chunk:n}=t,r=this.options[e];if(r&&r.enabled){let t=this.parsers[e];t&&t.append||t||this.createParser(e,n)}}}async readSegments(e){let t=e.map(this.ensureSegmentChunk);await Promise.all(t)}}{constructor(...e){super(...e),t(this,"appSegments",[]),t(this,"jpegSegments",[]),t(this,"unknownSegments",[])}static canHandle(e,t){return 65496===t}async parse(){await this.findAppSegments(),await this.readSegments(this.appSegments),this.mergeMultiSegments(),this.createParsers(this.mergedAppSegments||this.appSegments)}setupSegmentFinderArgs(e){!0===e?(this.findAll=!0,this.wanted=new Set(y.keyList())):(e=void 0===e?y.keyList().filter((e=>this.options[e].enabled)):e.filter((e=>this.options[e].enabled&&y.has(e))),this.findAll=!1,this.remaining=new Set(e),this.wanted=new Set(e)),this.unfinishedMultiSegment=!1}async findAppSegments(e=0,t){this.setupSegmentFinderArgs(t);let{file:n,findAll:r,wanted:i,remaining:o}=this;if(!r&&this.file.chunked&&(r=Array.from(i).some((e=>{let t=y.get(e),n=this.options[e];return t.multiSegment&&n.multiSegment})),r&&await this.file.readWhole()),e=this.findAppSegmentsInRange(e,n.byteLength),!this.options.onlyTiff&&n.chunked){let t=!1;for(;o.size>0&&!t&&(n.canReadNextChunk||this.unfinishedMultiSegment);){let{nextChunkOffset:r}=n,i=this.appSegments.some((e=>!this.file.available(e.offset||e.start,e.length||e.size)));if(t=e>r&&!i?!await n.readNextChunk(e):!await n.readNextChunk(r),void 0===(e=this.findAppSegmentsInRange(e,n.byteLength)))return}}}findAppSegmentsInRange(e,t){t-=2;let n,r,i,o,s,a,{file:l,findAll:c,wanted:u,remaining:d,options:p}=this;for(;e<t;e++)if(255===l.getUint8(e))if(n=l.getUint8(e+1),ae(n)){if(r=l.getUint16(e+2),i=le(l,e,r),i&&u.has(i)&&(o=y.get(i),s=o.findPosition(l,e),a=p[i],s.type=i,this.appSegments.push(s),!c&&(o.multiSegment&&a.multiSegment?(this.unfinishedMultiSegment=s.chunkNumber<s.chunkCount,this.unfinishedMultiSegment||d.delete(i)):d.delete(i),0===d.size)))break;p.recordUnknownSegments&&(s=oe.findPosition(l,e),s.marker=n,this.unknownSegments.push(s)),e+=r+1}else if(se(n)){if(r=l.getUint16(e+2),218===n&&!1!==p.stopAfterSos)return;p.recordJpegSegments&&this.jpegSegments.push({offset:e,length:r,marker:n}),e+=r+1}return e}mergeMultiSegments(){if(!this.appSegments.some((e=>e.multiSegment)))return;let e=function(e,t){let n,r,i,o=new Map;for(let s=0;s<e.length;s++)n=e[s],r=n[t],o.has(r)?i=o.get(r):o.set(r,i=[]),i.push(n);return Array.from(o)}(this.appSegments,"type");this.mergedAppSegments=e.map((([e,t])=>{let n=y.get(e,this.options);return n.handleMultiSegments?{type:e,chunk:n.handleMultiSegments(t)}:t[0]}))}getSegment(e){return this.appSegments.find((t=>t.type===e))}async getOrFindSegment(e){let t=this.getSegment(e);return void 0===t&&(await this.findAppSegments(0,[e]),t=this.getSegment(e)),t}}t(ce,"type","jpeg"),b.set("jpeg",ce);const ue=[void 0,1,1,2,4,8,1,1,2,4,8,4,8,4];class de extends oe{parseHeader(){var e=this.chunk.getUint16();18761===e?this.le=!0:19789===e&&(this.le=!1),this.chunk.le=this.le,this.headerParsed=!0}parseTags(e,t,n=new Map){let{pick:r,skip:i}=this.options[t];r=new Set(r);let o=r.size>0,s=0===i.size,a=this.chunk.getUint16(e);e+=2;for(let l=0;l<a;l++){let a=this.chunk.getUint16(e);if(o){if(r.has(a)&&(n.set(a,this.parseTag(e,a,t)),r.delete(a),0===r.size))break}else!s&&i.has(a)||n.set(a,this.parseTag(e,a,t));e+=12}return n}parseTag(e,t,n){let{chunk:r}=this,i=r.getUint16(e+2),o=r.getUint32(e+4),s=ue[i];if(s*o<=4?e+=8:e=r.getUint32(e+8),(i<1||i>13)&&u(`Invalid TIFF value type. block: ${n.toUpperCase()}, tag: ${t.toString(16)}, type: ${i}, offset ${e}`),e>r.byteLength&&u(`Invalid TIFF value offset. block: ${n.toUpperCase()}, tag: ${t.toString(16)}, type: ${i}, offset ${e} is outside of chunk size ${r.byteLength}`),1===i)return r.getUint8Array(e,o);if(2===i)return""===(a=function(e){for(;e.endsWith("\0");)e=e.slice(0,-1);return e}(a=r.getString(e,o)).trim())?void 0:a;var a;if(7===i)return r.getUint8Array(e,o);if(1===o)return this.parseTagValue(i,e);{let t=new(function(e){switch(e){case 1:return Uint8Array;case 3:return Uint16Array;case 4:return Uint32Array;case 5:case 10:default:return Array;case 6:return Int8Array;case 8:return Int16Array;case 9:return Int32Array;case 11:return Float32Array;case 12:return Float64Array}}(i))(o),n=s;for(let r=0;r<o;r++)t[r]=this.parseTagValue(i,e),e+=n;return t}}parseTagValue(e,t){let{chunk:n}=this;switch(e){case 1:return n.getUint8(t);case 3:return n.getUint16(t);case 4:case 13:return n.getUint32(t);case 5:return n.getUint32(t)/n.getUint32(t+4);case 6:return n.getInt8(t);case 8:return n.getInt16(t);case 9:return n.getInt32(t);case 10:return n.getInt32(t)/n.getInt32(t+4);case 11:return n.getFloat(t);case 12:return n.getDouble(t);default:u(`Invalid tiff type ${e}`)}}}class pe extends de{static canHandle(e,t){return 225===e.getUint8(t+1)&&1165519206===e.getUint32(t+4)&&0===e.getUint16(t+8)}async parse(){this.parseHeader();let{options:e}=this;return e.ifd0.enabled&&await this.parseIfd0Block(),e.exif.enabled&&await this.safeParse("parseExifBlock"),e.gps.enabled&&await this.safeParse("parseGpsBlock"),e.interop.enabled&&await this.safeParse("parseInteropBlock"),e.ifd1.enabled&&await this.safeParse("parseThumbnailBlock"),this.createOutput()}safeParse(e){let t=this[e]();return void 0!==t.catch&&(t=t.catch(this.handleError)),t}findIfd0Offset(){void 0===this.ifd0Offset&&(this.ifd0Offset=this.chunk.getUint32(4))}findIfd1Offset(){if(void 0===this.ifd1Offset){this.findIfd0Offset();let e=this.chunk.getUint16(this.ifd0Offset),t=this.ifd0Offset+2+12*e;this.ifd1Offset=this.chunk.getUint32(t)}}parseBlock(e,t){let n=new Map;return this[t]=n,this.parseTags(e,t,n),n}async parseIfd0Block(){if(this.ifd0)return;let{file:e}=this;this.findIfd0Offset(),this.ifd0Offset<8&&u("Malformed EXIF data"),!e.chunked&&this.ifd0Offset>e.byteLength&&u(`IFD0 offset points to outside of file.\nthis.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e.byteLength}`),e.tiff&&await e.ensureChunk(this.ifd0Offset,d(this.options));let t=this.parseBlock(this.ifd0Offset,"ifd0");return 0!==t.size?(this.exifOffset=t.get(F),this.interopOffset=t.get(R),this.gpsOffset=t.get(P),this.xmp=t.get(700),this.iptc=t.get(j),this.icc=t.get(z),this.options.sanitize&&(t.delete(F),t.delete(R),t.delete(P),t.delete(700),t.delete(j),t.delete(z)),t):void 0}async parseExifBlock(){if(this.exif)return;if(this.ifd0||await this.parseIfd0Block(),void 0===this.exifOffset)return;this.file.tiff&&await this.file.ensureChunk(this.exifOffset,d(this.options));let e=this.parseBlock(this.exifOffset,"exif");return this.interopOffset||(this.interopOffset=e.get(R)),this.makerNote=e.get(I),this.userComment=e.get(L),this.options.sanitize&&(e.delete(R),e.delete(I),e.delete(L)),this.unpack(e,41728),this.unpack(e,41729),e}unpack(e,t){let n=e.get(t);n&&1===n.length&&e.set(t,n[0])}async parseGpsBlock(){if(this.gps)return;if(this.ifd0||await this.parseIfd0Block(),void 0===this.gpsOffset)return;let e=this.parseBlock(this.gpsOffset,"gps");return e&&e.has(2)&&e.has(4)&&(e.set("latitude",he(...e.get(2),e.get(1))),e.set("longitude",he(...e.get(4),e.get(3)))),e}async parseInteropBlock(){if(!this.interop&&(this.ifd0||await this.parseIfd0Block(),void 0!==this.interopOffset||this.exif||await this.parseExifBlock(),void 0!==this.interopOffset))return this.parseBlock(this.interopOffset,"interop")}async parseThumbnailBlock(e=!1){if(!this.ifd1&&!this.ifd1Parsed&&(!this.options.mergeOutput||e))return this.findIfd1Offset(),this.ifd1Offset>0&&(this.parseBlock(this.ifd1Offset,"ifd1"),this.ifd1Parsed=!0),this.ifd1}async extractThumbnail(){if(this.headerParsed||this.parseHeader(),this.ifd1Parsed||await this.parseThumbnailBlock(!0),void 0===this.ifd1)return;let e=this.ifd1.get(513),t=this.ifd1.get(514);return this.chunk.getUint8Array(e,t)}get image(){return this.ifd0}get thumbnail(){return this.ifd1}createOutput(){let e,t,n,r={};for(t of H)if(e=this[t],!c(e))if(n=this.canTranslate?this.translateBlock(e,t):Object.fromEntries(e),this.options.mergeOutput){if("ifd1"===t)continue;Object.assign(r,n)}else r[t]=n;return this.makerNote&&(r.makerNote=this.makerNote),this.userComment&&(r.userComment=this.userComment),r}assignToOutput(e,t){if(this.globalOptions.mergeOutput)Object.assign(e,t);else for(let[n,r]of Object.entries(t))this.assignObjectToOutput(e,n,r)}}function he(e,t,n,r){var i=e+t/60+n/3600;return"S"!==r&&"W"!==r||(i*=-1),i}t(pe,"type","tiff"),t(pe,"headerLength",10),y.set("tiff",pe);var fe=Object.freeze({__proto__:null,default:ie,Exifr:ne,fileParsers:b,segmentParsers:y,fileReaders:v,tagKeys:T,tagValues:S,tagRevivers:A,createDictionary:O,extendDictionary:N,fetchUrlAsArrayBuffer:_,readBlobAsArrayBuffer:D,chunkedProps:B,otherSegments:U,segments:$,tiffBlocks:H,segmentsAndBlocks:W,tiffExtractables:V,inheritables:q,allFormatters:Y,Options:J,parse:re});const me={ifd0:!1,ifd1:!1,exif:!1,gps:!1,interop:!1,sanitize:!1,reviveValues:!0,translateKeys:!1,translateValues:!1,mergeOutput:!1},ge=Object.assign({},me,{firstChunkSize:4e4,gps:[1,2,3,4]}),be=Object.assign({},me,{tiff:!1,ifd1:!0,mergeOutput:!1}),ye=Object.assign({},me,{firstChunkSize:4e4,ifd0:[274]});async function ve(e){let t=new ne(ye);await t.read(e);let n=await t.parse();if(n&&n.ifd0)return n.ifd0[274]}const we=Object.freeze({1:{dimensionSwapped:!1,scaleX:1,scaleY:1,deg:0,rad:0},2:{dimensionSwapped:!1,scaleX:-1,scaleY:1,deg:0,rad:0},3:{dimensionSwapped:!1,scaleX:1,scaleY:1,deg:180,rad:180*Math.PI/180},4:{dimensionSwapped:!1,scaleX:-1,scaleY:1,deg:180,rad:180*Math.PI/180},5:{dimensionSwapped:!0,scaleX:1,scaleY:-1,deg:90,rad:90*Math.PI/180},6:{dimensionSwapped:!0,scaleX:1,scaleY:1,deg:90,rad:90*Math.PI/180},7:{dimensionSwapped:!0,scaleX:1,scaleY:-1,deg:270,rad:270*Math.PI/180},8:{dimensionSwapped:!0,scaleX:1,scaleY:1,deg:270,rad:270*Math.PI/180}});if(e.rotateCanvas=!0,e.rotateCss=!0,"object"==typeof navigator){let t=navigator.userAgent;if(t.includes("iPad")||t.includes("iPhone")){let n=t.match(/OS (\d+)_(\d+)/);if(n){let[,t,r]=n,i=Number(t)+.1*Number(r);e.rotateCanvas=i<13.4,e.rotateCss=!1}}else if(t.includes("OS X 10")){let[,n]=t.match(/OS X 10[_.](\d+)/);e.rotateCanvas=e.rotateCss=Number(n)<15}if(t.includes("Chrome/")){let[,n]=t.match(/Chrome\/(\d+)/);e.rotateCanvas=e.rotateCss=Number(n)<81}else if(t.includes("Firefox/")){let[,n]=t.match(/Firefox\/(\d+)/);e.rotateCanvas=e.rotateCss=Number(n)<77}}class xe extends f{constructor(...e){super(...e),t(this,"ranges",new Ee),0!==this.byteLength&&this.ranges.add(0,this.byteLength)}_tryExtend(e,t,n){if(0===e&&0===this.byteLength&&n){let e=new DataView(n.buffer||n,n.byteOffset,n.byteLength);this._swapDataView(e)}else{let n=e+t;if(n>this.byteLength){let{dataView:e}=this._extend(n);this._swapDataView(e)}}}_extend(e){let t;t=a?s.allocUnsafe(e):new Uint8Array(e);let n=new DataView(t.buffer,t.byteOffset,t.byteLength);return t.set(new Uint8Array(this.buffer,this.byteOffset,this.byteLength),0),{uintView:t,dataView:n}}subarray(e,t,n=!1){return t=t||this._lengthToEnd(e),n&&this._tryExtend(e,t),this.ranges.add(e,t),super.subarray(e,t)}set(e,t,n=!1){n&&this._tryExtend(t,e.byteLength,e);let r=super.set(e,t);return this.ranges.add(t,r.byteLength),r}async ensureChunk(e,t){this.chunked&&(this.ranges.available(e,t)||await this.readChunk(e,t))}available(e,t){return this.ranges.available(e,t)}}class Ee{constructor(){t(this,"list",[])}get length(){return this.list.length}add(e,t,n=0){let r=e+t,i=this.list.filter((t=>Me(e,t.offset,r)||Me(e,t.end,r)));if(i.length>0){e=Math.min(e,...i.map((e=>e.offset))),r=Math.max(r,...i.map((e=>e.end))),t=r-e;let n=i.shift();n.offset=e,n.length=t,n.end=r,this.list=this.list.filter((e=>!i.includes(e)))}else this.list.push({offset:e,length:t,end:r})}available(e,t){let n=e+t;return this.list.some((t=>t.offset<=e&&n<=t.end))}}function Me(e,t,n){return e<=t&&t<=n}class ke extends xe{constructor(e,n){super(0),t(this,"chunksRead",0),this.input=e,this.options=n}async readWhole(){this.chunked=!1,await this.readChunk(this.nextChunkOffset)}async readChunked(){this.chunked=!0,await this.readChunk(0,this.options.firstChunkSize)}async readNextChunk(e=this.nextChunkOffset){if(this.fullyRead)return this.chunksRead++,!1;let t=this.options.chunkSize,n=await this.readChunk(e,t);return!!n&&n.byteLength===t}async readChunk(e,t){if(this.chunksRead++,0!==(t=this.safeWrapAddress(e,t)))return this._readChunk(e,t)}safeWrapAddress(e,t){return void 0!==this.size&&e+t>this.size?Math.max(0,this.size-e):t}get nextChunkOffset(){if(0!==this.ranges.list.length)return this.ranges.list[0].length}get canReadNextChunk(){return this.chunksRead<this.options.chunkLimit}get fullyRead(){return void 0!==this.size&&this.nextChunkOffset===this.size}read(){return this.options.chunked?this.readChunked():this.readWhole()}close(){}}v.set("blob",class extends ke{async readWhole(){this.chunked=!1;let e=await D(this.input);this._swapArrayBuffer(e)}readChunked(){return this.chunked=!0,this.size=this.input.size,super.readChunked()}async _readChunk(e,t){let n=t?e+t:void 0,r=this.input.slice(e,n),i=await D(r);return this.set(i,e,!0)}}),e.Exifr=ne,e.Options=J,e.allFormatters=Y,e.chunkedProps=B,e.createDictionary=O,e.default=fe,e.extendDictionary=N,e.fetchUrlAsArrayBuffer=_,e.fileParsers=b,e.fileReaders=v,e.gps=async function(e){let t=new ne(ge);await t.read(e);let n=await t.parse();if(n&&n.gps){let{latitude:e,longitude:t}=n.gps;return{latitude:e,longitude:t}}},e.gpsOnlyOptions=ge,e.inheritables=q,e.orientation=ve,e.orientationOnlyOptions=ye,e.otherSegments=U,e.parse=re,e.readBlobAsArrayBuffer=D,e.rotation=async function(t){let n=await ve(t);return Object.assign({canvas:e.rotateCanvas,css:e.rotateCss},we[n])},e.rotations=we,e.segmentParsers=y,e.segments=$,e.segmentsAndBlocks=W,e.tagKeys=T,e.tagRevivers=A,e.tagValues=S,e.thumbnail=async function(e){let t=new ne(be);await t.read(e);let n=await t.extractThumbnail();return n&&a?s.from(n):n},e.thumbnailOnlyOptions=be,e.thumbnailUrl=async function(e){let t=await this.thumbnail(e);if(void 0!==t){let e=new Blob([t]);return URL.createObjectURL(e)}},e.tiffBlocks=H,e.tiffExtractables=V,Object.defineProperty(e,"__esModule",{value:!0})}(EM.exports);const MM=/^data:([^/]+\/[^,;]+(?:[^,]*?))(;base64)?,([\s\S]*)$/;var kM=function(e,t,n){var r,i;const o=MM.exec(e),s=null!=(r=null!=(i=t.mimeType)?i:null==o?void 0:o[1])?r:"plain/text";let a;if(null!=o[2]){const e=atob(decodeURIComponent(o[3])),t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);a=[t]}else a=[decodeURIComponent(o[3])];return n?new File(a,t.name||"",{type:s}):new Blob(a,{type:s})};var _M=hv.exports,DM=EM.exports;const CM=kM,OM=function(e){return e.startsWith("blob:")},NM=function(e){return!!e&&/^[^/]+\/(jpe?g|gif|png|svg|svg\+xml|bmp|webp|avif)$/.test(e)},TM={strings:{generatingThumbnails:"Generating thumbnails..."}};class SM extends _M.UIPlugin{constructor(e,t){super(e,t),this.onFileAdded=e=>{!e.preview&&e.data&&NM(e.type)&&!e.isRemote&&this.addToQueue(e.id)},this.onCancelRequest=e=>{const t=this.queue.indexOf(e.id);-1!==t&&this.queue.splice(t,1)},this.onFileRemoved=e=>{const t=this.queue.indexOf(e.id);-1!==t&&this.queue.splice(t,1),e.preview&&OM(e.preview)&&URL.revokeObjectURL(e.preview)},this.onRestored=()=>{this.uppy.getFiles().filter((e=>e.isRestored)).forEach((e=>{e.preview&&!OM(e.preview)||this.addToQueue(e.id)}))},this.onAllFilesRemoved=()=>{this.queue=[]},this.waitUntilAllProcessed=e=>{e.forEach((e=>{const t=this.uppy.getFile(e);this.uppy.emit("preprocess-progress",t,{mode:"indeterminate",message:this.i18n("generatingThumbnails")})}));const t=()=>{e.forEach((e=>{const t=this.uppy.getFile(e);this.uppy.emit("preprocess-complete",t)}))};return new Promise((e=>{this.queueProcessing?this.uppy.once("thumbnail:all-generated",(()=>{t(),e()})):(t(),e())}))},this.type="modifier",this.id=this.opts.id||"ThumbnailGenerator",this.title="Thumbnail Generator",this.queue=[],this.queueProcessing=!1,this.defaultThumbnailDimension=200,this.thumbnailType=this.opts.thumbnailType||"image/jpeg",this.defaultLocale=TM;if(this.opts={thumbnailWidth:null,thumbnailHeight:null,waitForThumbnailsBeforeUpload:!1,lazy:!1,...t},this.i18nInit(),this.opts.lazy&&this.opts.waitForThumbnailsBeforeUpload)throw new Error("ThumbnailGenerator: The `lazy` and `waitForThumbnailsBeforeUpload` options are mutually exclusive. Please ensure at most one of them is set to `true`.")}createThumbnail(e,t,n){const r=URL.createObjectURL(e.data),i=new Promise(((e,t)=>{const n=new Image;n.src=r,n.addEventListener("load",(()=>{URL.revokeObjectURL(r),e(n)})),n.addEventListener("error",(e=>{URL.revokeObjectURL(r),t(e.error||new Error("Could not create thumbnail"))}))})),o=(0,DM.rotation)(e.data).catch((()=>1));return Promise.all([i,o]).then((e=>{let[r,i]=e;const o=this.getProportionalDimensions(r,t,n,i.deg),s=this.rotateImage(r,i),a=this.resizeImage(s,o.width,o.height);return this.canvasToBlob(a,this.thumbnailType,80)})).then((e=>URL.createObjectURL(e)))}getProportionalDimensions(e,t,n,r){let i=e.width/e.height;return 90!==r&&270!==r||(i=e.height/e.width),null!=t?{width:t,height:Math.round(t/i)}:null!=n?{width:Math.round(n*i),height:n}:{width:this.defaultThumbnailDimension,height:Math.round(this.defaultThumbnailDimension/i)}}resizeImage(e,t,n){let r=this.protect(e),i=Math.ceil(Math.log2(r.width/t));i<1&&(i=1);let o=t*2**(i-1),s=n*2**(i-1);const a=2;for(;i--;){const e=document.createElement("canvas");e.width=o,e.height=s,e.getContext("2d").drawImage(r,0,0,o,s),r=e,o=Math.round(o/a),s=Math.round(s/a)}return r}setPreviewURL(e,t){this.uppy.setFileState(e,{preview:t})}addToQueue(e){this.queue.push(e),!1===this.queueProcessing&&this.processQueue()}processQueue(){if(this.queueProcessing=!0,this.queue.length>0){const e=this.uppy.getFile(this.queue.shift());return e?this.requestThumbnail(e).catch((()=>{})).then((()=>this.processQueue())):(this.uppy.log("[ThumbnailGenerator] file was removed before a thumbnail could be generated, but not removed from the queue. This is probably a bug","error"),Promise.resolve())}return this.queueProcessing=!1,this.uppy.log("[ThumbnailGenerator] Emptied thumbnail queue"),this.uppy.emit("thumbnail:all-generated"),Promise.resolve()}requestThumbnail(e){return NM(e.type)&&!e.isRemote?this.createThumbnail(e,this.opts.thumbnailWidth,this.opts.thumbnailHeight).then((t=>{this.setPreviewURL(e.id,t),this.uppy.log(`[ThumbnailGenerator] Generated thumbnail for ${e.id}`),this.uppy.emit("thumbnail:generated",this.uppy.getFile(e.id),t)})).catch((t=>{this.uppy.log(`[ThumbnailGenerator] Failed thumbnail for ${e.id}:`,"warning"),this.uppy.log(t,"warning"),this.uppy.emit("thumbnail:error",this.uppy.getFile(e.id),t)})):Promise.resolve()}install(){this.uppy.on("file-removed",this.onFileRemoved),this.uppy.on("cancel-all",this.onAllFilesRemoved),this.opts.lazy?(this.uppy.on("thumbnail:request",this.onFileAdded),this.uppy.on("thumbnail:cancel",this.onCancelRequest)):(this.uppy.on("file-added",this.onFileAdded),this.uppy.on("restored",this.onRestored)),this.opts.waitForThumbnailsBeforeUpload&&this.uppy.addPreProcessor(this.waitUntilAllProcessed)}uninstall(){this.uppy.off("file-removed",this.onFileRemoved),this.uppy.off("cancel-all",this.onAllFilesRemoved),this.opts.lazy?(this.uppy.off("thumbnail:request",this.onFileAdded),this.uppy.off("thumbnail:cancel",this.onCancelRequest)):(this.uppy.off("file-added",this.onFileAdded),this.uppy.off("restored",this.onRestored)),this.opts.waitForThumbnailsBeforeUpload&&this.uppy.removePreProcessor(this.waitUntilAllProcessed)}}SM.VERSION="2.2.0";var AM=SM;SM.prototype.canvasToBlob=function(e,t,n){try{e.getContext("2d").getImageData(0,0,1,1)}catch(e){if(18===e.code)return Promise.reject(new Error("cannot read image, probably an svg with external resources"))}return e.toBlob?new Promise((r=>{e.toBlob(r,t,n)})).then((e=>{if(null===e)throw new Error("cannot read image, probably an svg with external resources");return e})):Promise.resolve().then((()=>CM(e.toDataURL(t,n),{}))).then((e=>{if(null===e)throw new Error("could not extract blob, probably an old browser");return e}))},SM.prototype.protect=function(e){const t=e.width/e.height,n=5e6,r=4096;let i=Math.floor(Math.sqrt(n*t)),o=Math.floor(n/Math.sqrt(n*t));if(i>r&&(i=r,o=Math.round(i/t)),o>r&&(o=r,i=Math.round(t*o)),e.width>i){const t=document.createElement("canvas");return t.width=i,t.height=o,t.getContext("2d").drawImage(e,0,0,i,o),t}return e},SM.prototype.rotateImage=function(e,t){let n=e.width,r=e.height;90!==t.deg&&270!==t.deg||(n=e.height,r=e.width);const i=document.createElement("canvas");i.width=n,i.height=r;const o=i.getContext("2d");return o.translate(n/2,r/2),t.canvas&&(o.rotate(t.rad),o.scale(t.scaleX,t.scaleY)),o.drawImage(e,-e.width/2,-e.height/2,e.width,e.height),i};const IM=Yx;var LM=function(e){if("string"==typeof e){const t=document.querySelectorAll(e);return 0===t.length?null:Array.from(t)}return"object"==typeof e&&IM(e)?[e]:null};var jM=function e(t,n,r,i){let{onSuccess:o}=i;t.readEntries((i=>{const s=[...n,...i];i.length?setTimeout((()=>{e(t,s,r,{onSuccess:o})}),0):o(s)}),(e=>{r(e),o(n)}))};const zM=function(e){return e.fullPath&&e.fullPath!==`/${e.name}`?e.fullPath:null},FM=jM,PM=pE;var RM=function(e,t){const n=[],r=[],i=e=>new Promise((r=>{if(e.isFile)e.file((t=>{t.relativePath=zM(e),n.push(t),r()}),(e=>{t(e),r()}));else if(e.isDirectory){const n=e.createReader();FM(n,[],t,{onSuccess:e=>r(Promise.all(e.map(i)))})}}));return PM(e.items).forEach((e=>{const t=e.webkitGetAsEntry();t&&r.push(i(t))})),Promise.all(r).then((()=>n))};const BM=pE;const UM=RM,$M=function(e){const t=BM(e.files);return Promise.resolve(t)};var HM=function(e,t){var n;let{logDropError:r=(()=>{})}=void 0===t?{}:t;return null!=(n=e.items)&&n[0]&&"webkitGetAsEntry"in e.items[0]?UM(e,r):$M(e)},WM=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function VM(e,t){return e===t||!(!WM(e)||!WM(t))}function qM(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!VM(e[n],t[n]))return!1;return!0}var YM=Object.freeze({__proto__:null,default:function(e,t){var n;void 0===t&&(t=qM);var r,i=[],o=!1;return function(){for(var s=[],a=0;a<arguments.length;a++)s[a]=arguments[a];return o&&n===this&&t(s,i)||(r=e.apply(this,s),o=!0,n=this,i=s),r}}}),KM=Oc(YM),QM="Expected a function",GM=0/0,ZM="[object Symbol]",JM=/^\s+|\s+$/g,XM=/^[-+]0x[0-9a-f]+$/i,ek=/^0b[01]+$/i,tk=/^0o[0-7]+$/i,nk=parseInt,rk="object"==typeof Dc&&Dc&&Dc.Object===Object&&Dc,ik="object"==typeof self&&self&&self.Object===Object&&self,ok=rk||ik||Function("return this")(),sk=Object.prototype.toString,ak=Math.max,lk=Math.min,ck=function(){return ok.Date.now()};function uk(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function dk(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&sk.call(e)==ZM}(e))return GM;if(uk(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=uk(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(JM,"");var n=ek.test(e);return n||tk.test(e)?nk(e.slice(2),n?2:8):XM.test(e)?GM:+e}var pk=function(e,t,n){var r,i,o,s,a,l,c=0,u=!1,d=!1,p=!0;if("function"!=typeof e)throw new TypeError(QM);function h(t){var n=r,o=i;return r=i=void 0,c=t,s=e.apply(o,n)}function f(e){return c=e,a=setTimeout(g,t),u?h(e):s}function m(e){var n=e-l;return void 0===l||n>=t||n<0||d&&e-c>=o}function g(){var e=ck();if(m(e))return b(e);a=setTimeout(g,function(e){var n=t-(e-l);return d?lk(n,o-(e-c)):n}(e))}function b(e){return a=void 0,p&&r?h(e):(r=i=void 0,s)}function y(){var e=ck(),n=m(e);if(r=arguments,i=this,l=e,n){if(void 0===a)return f(l);if(d)return a=setTimeout(g,t),h(l)}return void 0===a&&(a=setTimeout(g,t)),s}return t=dk(t)||0,uk(n)&&(u=!!n.leading,o=(d="maxWait"in n)?ak(dk(n.maxWait)||0,t):o,p="trailing"in n?!!n.trailing:p),y.cancel=function(){void 0!==a&&clearTimeout(a),c=0,r=l=i=a=void 0},y.flush=function(){return void 0===a?s:b(ck())},y};const hk=pk,fk=hE,mk=fE;var gk=function(){let e=!1;return hk(((t,n)=>{const r=mk(t,n),i=r.contains(document.activeElement);if(i&&e)return;const o=r.querySelector("[data-uppy-super-focusable]");if(!i||o)if(o)o.focus({preventScroll:!0}),e=!0;else{const t=r.querySelector(fk);null==t||t.focus({preventScroll:!0}),e=!1}}),260)};var bk=function(){const e=document.body;return"draggable"in e&&"ondragstart"in e&&"ondrop"in e&&("FormData"in window&&"FileReader"in window)},yk=qx;var vk=function(e){const t={color:"#838999",icon:(0,yk.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"25",height:"25",viewBox:"0 0 25 25"},(0,yk.h)("g",{fill:"#A7AFB7",fillRule:"nonzero"},(0,yk.h)("path",{d:"M5.5 22a.5.5 0 0 1-.5-.5v-18a.5.5 0 0 1 .5-.5h10.719a.5.5 0 0 1 .367.16l3.281 3.556a.5.5 0 0 1 .133.339V21.5a.5.5 0 0 1-.5.5h-14zm.5-1h13V7.25L16 4H6v17z"}),(0,yk.h)("path",{d:"M15 4v3a1 1 0 0 0 1 1h3V7h-3V4h-1z"})))};if(!e)return t;const n=e.split("/")[0],r=e.split("/")[1];return"text"===n?{color:"#5a5e69",icon:(0,yk.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"25",height:"25",viewBox:"0 0 25 25"},(0,yk.h)("path",{d:"M4.5 7h13a.5.5 0 1 1 0 1h-13a.5.5 0 0 1 0-1zm0 3h15a.5.5 0 1 1 0 1h-15a.5.5 0 1 1 0-1zm0 3h15a.5.5 0 1 1 0 1h-15a.5.5 0 1 1 0-1zm0 3h10a.5.5 0 1 1 0 1h-10a.5.5 0 1 1 0-1z",fill:"#5A5E69",fillRule:"nonzero"}))}:"image"===n?{color:"#686de0",icon:(0,yk.h)("svg",{"aria-hidden":"true",focusable:"false",width:"25",height:"25",viewBox:"0 0 25 25"},(0,yk.h)("g",{fill:"#686DE0",fillRule:"evenodd"},(0,yk.h)("path",{d:"M5 7v10h15V7H5zm0-1h15a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1z",fillRule:"nonzero"}),(0,yk.h)("path",{d:"M6.35 17.172l4.994-5.026a.5.5 0 0 1 .707 0l2.16 2.16 3.505-3.505a.5.5 0 0 1 .707 0l2.336 2.31-.707.72-1.983-1.97-3.505 3.505a.5.5 0 0 1-.707 0l-2.16-2.159-3.938 3.939-1.409.026z",fillRule:"nonzero"}),(0,yk.h)("circle",{cx:"7.5",cy:"9.5",r:"1.5"})))}:"audio"===n?{color:"#068dbb",icon:(0,yk.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"25",height:"25",viewBox:"0 0 25 25"},(0,yk.h)("path",{d:"M9.5 18.64c0 1.14-1.145 2-2.5 2s-2.5-.86-2.5-2c0-1.14 1.145-2 2.5-2 .557 0 1.079.145 1.5.396V7.25a.5.5 0 0 1 .379-.485l9-2.25A.5.5 0 0 1 18.5 5v11.64c0 1.14-1.145 2-2.5 2s-2.5-.86-2.5-2c0-1.14 1.145-2 2.5-2 .557 0 1.079.145 1.5.396V8.67l-8 2v7.97zm8-11v-2l-8 2v2l8-2zM7 19.64c.855 0 1.5-.484 1.5-1s-.645-1-1.5-1-1.5.484-1.5 1 .645 1 1.5 1zm9-2c.855 0 1.5-.484 1.5-1s-.645-1-1.5-1-1.5.484-1.5 1 .645 1 1.5 1z",fill:"#049BCF",fillRule:"nonzero"}))}:"video"===n?{color:"#19af67",icon:(0,yk.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"25",height:"25",viewBox:"0 0 25 25"},(0,yk.h)("path",{d:"M16 11.834l4.486-2.691A1 1 0 0 1 22 10v6a1 1 0 0 1-1.514.857L16 14.167V17a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v2.834zM15 9H5v8h10V9zm1 4l5 3v-6l-5 3z",fill:"#19AF67",fillRule:"nonzero"}))}:"application"===n&&"pdf"===r?{color:"#e25149",icon:(0,yk.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"25",height:"25",viewBox:"0 0 25 25"},(0,yk.h)("path",{d:"M9.766 8.295c-.691-1.843-.539-3.401.747-3.726 1.643-.414 2.505.938 2.39 3.299-.039.79-.194 1.662-.537 3.148.324.49.66.967 1.055 1.51.17.231.382.488.629.757 1.866-.128 3.653.114 4.918.655 1.487.635 2.192 1.685 1.614 2.84-.566 1.133-1.839 1.084-3.416.249-1.141-.604-2.457-1.634-3.51-2.707a13.467 13.467 0 0 0-2.238.426c-1.392 4.051-4.534 6.453-5.707 4.572-.986-1.58 1.38-4.206 4.914-5.375.097-.322.185-.656.264-1.001.08-.353.306-1.31.407-1.737-.678-1.059-1.2-2.031-1.53-2.91zm2.098 4.87c-.033.144-.068.287-.104.427l.033-.01-.012.038a14.065 14.065 0 0 1 1.02-.197l-.032-.033.052-.004a7.902 7.902 0 0 1-.208-.271c-.197-.27-.38-.526-.555-.775l-.006.028-.002-.003c-.076.323-.148.632-.186.8zm5.77 2.978c1.143.605 1.832.632 2.054.187.26-.519-.087-1.034-1.113-1.473-.911-.39-2.175-.608-3.55-.608.845.766 1.787 1.459 2.609 1.894zM6.559 18.789c.14.223.693.16 1.425-.413.827-.648 1.61-1.747 2.208-3.206-2.563 1.064-4.102 2.867-3.633 3.62zm5.345-10.97c.088-1.793-.351-2.48-1.146-2.28-.473.119-.564 1.05-.056 2.405.213.566.52 1.188.908 1.859.18-.858.268-1.453.294-1.984z",fill:"#E2514A",fillRule:"nonzero"}))}:"application"===n&&-1!==["zip","x-7z-compressed","x-rar-compressed","x-tar","x-gzip","x-apple-diskimage"].indexOf(r)?{color:"#00C469",icon:(0,yk.h)("svg",{"aria-hidden":"true",focusable:"false",width:"25",height:"25",viewBox:"0 0 25 25"},(0,yk.h)("path",{d:"M10.45 2.05h1.05a.5.5 0 0 1 .5.5v.024a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5V2.55a.5.5 0 0 1 .5-.5zm2.05 1.024h1.05a.5.5 0 0 1 .5.5V3.6a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5v-.001zM10.45 0h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5V.5a.5.5 0 0 1 .5-.5zm2.05 1.025h1.05a.5.5 0 0 1 .5.5v.024a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.024a.5.5 0 0 1 .5-.5zm-2.05 3.074h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5zm2.05 1.025h1.05a.5.5 0 0 1 .5.5v.024a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.024a.5.5 0 0 1 .5-.5zm-2.05 1.024h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5zm2.05 1.025h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5zm-2.05 1.025h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5zm2.05 1.025h1.05a.5.5 0 0 1 .5.5v.024a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.024a.5.5 0 0 1 .5-.5zm-1.656 3.074l-.82 5.946c.52.302 1.174.458 1.976.458.803 0 1.455-.156 1.975-.458l-.82-5.946h-2.311zm0-1.025h2.312c.512 0 .946.378 1.015.885l.82 5.946c.056.412-.142.817-.501 1.026-.686.398-1.515.597-2.49.597-.974 0-1.804-.199-2.49-.597a1.025 1.025 0 0 1-.5-1.026l.819-5.946c.07-.507.503-.885 1.015-.885zm.545 6.6a.5.5 0 0 1-.397-.561l.143-.999a.5.5 0 0 1 .495-.429h.74a.5.5 0 0 1 .495.43l.143.998a.5.5 0 0 1-.397.561c-.404.08-.819.08-1.222 0z",fill:"#00C469",fillRule:"nonzero"}))}:t},wk=qx;const xk=vk;var Ek=function(e){const{file:t}=e;if(t.preview)return(0,wk.h)("img",{className:"uppy-Dashboard-Item-previewImg",alt:t.name,src:t.preview});const{color:n,icon:r}=xk(t.type);return(0,wk.h)("div",{className:"uppy-Dashboard-Item-previewIconWrap"},(0,wk.h)("span",{className:"uppy-Dashboard-Item-previewIcon",style:{color:n}},r),(0,wk.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-Dashboard-Item-previewIconBg",width:"58",height:"76",viewBox:"0 0 58 76"},(0,wk.h)("rect",{fill:"#FFF",width:"58",height:"76",rx:"3",fillRule:"evenodd"})))},Mk=qx;var kk=function(e){const{file:t,toggleFileCard:n,i18n:r,metaFields:i}=e,{missingRequiredMetaFields:o}=t;if(null==o||!o.length)return null;const s=o.map((e=>((e,t)=>{const n=t.filter((t=>t.id===e));return n[0].name})(e,i))).join(", ");return(0,Mk.h)("div",{className:"uppy-Dashboard-Item-errorMessage"},r("missingRequiredMetaFields",{smart_count:o.length,fields:s})," ",(0,Mk.h)("button",{type:"button",class:"uppy-u-reset uppy-Dashboard-Item-errorMessageBtn",onClick:()=>n(!0,t.id)},r("editFile")))},_k=qx;const Dk=Ek,Ck=kk,Ok=vk;var Nk=qx;function Tk(e){return e.isUploaded?e.i18n("uploadComplete"):e.error?e.i18n("retryUpload"):e.resumableUploads?e.file.isPaused?e.i18n("resumeUpload"):e.i18n("pauseUpload"):e.individualCancellation?e.i18n("cancelUpload"):""}function Sk(e){return(0,Nk.h)("div",{className:"uppy-Dashboard-Item-progress"},(0,Nk.h)("button",{className:"uppy-u-reset uppy-Dashboard-Item-progressIndicator",type:"button","aria-label":Tk(e),title:Tk(e),onClick:()=>function(e){e.isUploaded||(!e.error||e.hideRetryButton?e.resumableUploads&&!e.hidePauseResumeButton?e.uppy.pauseResume(e.file.id):e.individualCancellation&&!e.hideCancelButton&&e.uppy.removeFile(e.file.id):e.uppy.retryUpload(e.file.id))}(e)},e.children))}function Ak(e){let{children:t}=e;return(0,Nk.h)("svg",{"aria-hidden":"true",focusable:"false",width:"70",height:"70",viewBox:"0 0 36 36",className:"uppy-c-icon uppy-Dashboard-Item-progressIcon--circle"},t)}function Ik(e){let{progress:t}=e;const n=2*Math.PI*15;return(0,Nk.h)("g",null,(0,Nk.h)("circle",{className:"uppy-Dashboard-Item-progressIcon--bg",r:"15",cx:"18",cy:"18","stroke-width":"2",fill:"none"}),(0,Nk.h)("circle",{className:"uppy-Dashboard-Item-progressIcon--progress",r:"15",cx:"18",cy:"18",transform:"rotate(-90, 18, 18)",fill:"none","stroke-width":"2","stroke-dasharray":n,"stroke-dashoffset":n-n/100*t}))}const Lk="...";var jk=qx;const zk=Mv,Fk=function(e,t){if(0===t)return"";if(e.length<=t)return e;if(t<=Lk.length+1)return`${e.slice(0,t-1)}…`;const n=t-Lk.length,r=Math.ceil(n/2),i=Math.floor(n/2);return e.slice(0,r)+Lk+e.slice(-i)},Pk=kk,Rk=e=>{let{file:t,onClick:n}=e;return t.error?(0,jk.h)("button",{className:"uppy-u-reset uppy-Dashboard-Item-errorDetails","aria-label":t.error,"data-microtip-position":"bottom","data-microtip-size":"medium",onClick:n,type:"button"},"?"):null};var Bk=qx;const Uk=function(e,t){return t||(t="Copy the URL below"),new Promise((n=>{const r=document.createElement("textarea");r.setAttribute("style",{position:"fixed",top:0,left:0,width:"2em",height:"2em",padding:0,border:"none",outline:"none",boxShadow:"none",background:"transparent"}),r.value=e,document.body.appendChild(r),r.select();const i=()=>{document.body.removeChild(r),window.prompt(t,e),n()};try{return document.execCommand("copy")?(document.body.removeChild(r),n()):i()}catch(e){return document.body.removeChild(r),i()}}))};function $k(e){let{file:t,uploadInProgressOrComplete:n,metaFields:r,canEditFile:i,i18n:o,onClick:s}=e;return!n&&r&&r.length>0||!n&&i(t)?(0,Bk.h)("button",{className:"uppy-u-reset uppy-Dashboard-Item-action uppy-Dashboard-Item-action--edit",type:"button","aria-label":o("editFileWithFilename",{file:t.meta.name}),title:o("editFileWithFilename",{file:t.meta.name}),onClick:()=>s()},(0,Bk.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"14",height:"14",viewBox:"0 0 14 14"},(0,Bk.h)("g",{fillRule:"evenodd"},(0,Bk.h)("path",{d:"M1.5 10.793h2.793A1 1 0 0 0 5 10.5L11.5 4a1 1 0 0 0 0-1.414L9.707.793a1 1 0 0 0-1.414 0l-6.5 6.5A1 1 0 0 0 1.5 8v2.793zm1-1V8L9 1.5l1.793 1.793-6.5 6.5H2.5z",fillRule:"nonzero"}),(0,Bk.h)("rect",{x:"1",y:"12.293",width:"11",height:"1",rx:".5"}),(0,Bk.h)("path",{fillRule:"nonzero",d:"M6.793 2.5L9.5 5.207l.707-.707L7.5 1.793z"})))):null}function Hk(e){let{i18n:t,onClick:n,file:r}=e;return(0,Bk.h)("button",{className:"uppy-u-reset uppy-Dashboard-Item-action uppy-Dashboard-Item-action--remove",type:"button","aria-label":t("removeFile",{file:r.meta.name}),title:t("removeFile",{file:r.meta.name}),onClick:()=>n()},(0,Bk.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"18",height:"18",viewBox:"0 0 18 18"},(0,Bk.h)("path",{d:"M9 0C4.034 0 0 4.034 0 9s4.034 9 9 9 9-4.034 9-9-4.034-9-9-9z"}),(0,Bk.h)("path",{fill:"#FFF",d:"M13 12.222l-.778.778L9 9.778 5.778 13 5 12.222 8.222 9 5 5.778 5.778 5 9 8.222 12.222 5l.778.778L9.778 9z"})))}function Wk(e){const{i18n:t}=e;return(0,Bk.h)("button",{className:"uppy-u-reset uppy-Dashboard-Item-action uppy-Dashboard-Item-action--copyLink",type:"button","aria-label":t("copyLink"),title:t("copyLink"),onClick:t=>((e,t)=>{Uk(t.file.uploadURL,t.i18n("copyLinkToClipboardFallback")).then((()=>{t.uppy.log("Link copied to clipboard."),t.uppy.info(t.i18n("copyLinkToClipboardSuccess"),"info",3e3)})).catch(t.uppy.log).then((()=>e.target.focus({preventScroll:!0})))})(t,e)},(0,Bk.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"14",height:"14",viewBox:"0 0 14 12"},(0,Bk.h)("path",{d:"M7.94 7.703a2.613 2.613 0 0 1-.626 2.681l-.852.851a2.597 2.597 0 0 1-1.849.766A2.616 2.616 0 0 1 2.764 7.54l.852-.852a2.596 2.596 0 0 1 2.69-.625L5.267 7.099a1.44 1.44 0 0 0-.833.407l-.852.851a1.458 1.458 0 0 0 1.03 2.486c.39 0 .755-.152 1.03-.426l.852-.852c.231-.231.363-.522.406-.824l1.04-1.038zm4.295-5.937A2.596 2.596 0 0 0 10.387 1c-.698 0-1.355.272-1.849.766l-.852.851a2.614 2.614 0 0 0-.624 2.688l1.036-1.036c.041-.304.173-.6.407-.833l.852-.852c.275-.275.64-.426 1.03-.426a1.458 1.458 0 0 1 1.03 2.486l-.852.851a1.442 1.442 0 0 1-.824.406l-1.04 1.04a2.596 2.596 0 0 0 2.683-.628l.851-.85a2.616 2.616 0 0 0 0-3.697zm-6.88 6.883a.577.577 0 0 0 .82 0l3.474-3.474a.579.579 0 1 0-.819-.82L5.355 7.83a.579.579 0 0 0 0 .819z"})))}var Vk=function(e){const{uppy:t,file:n,uploadInProgressOrComplete:r,canEditFile:i,metaFields:o,showLinkToFileUploadResult:s,showRemoveButton:a,i18n:l,toggleFileCard:c,openFileEditor:u}=e;return(0,Bk.h)("div",{className:"uppy-Dashboard-Item-actionWrapper"},(0,Bk.h)($k,{i18n:l,file:n,uploadInProgressOrComplete:r,canEditFile:i,metaFields:o,onClick:()=>{o&&o.length>0?c(!0,n.id):u(n)}}),s&&n.uploadURL?(0,Bk.h)(Wk,{file:n,uppy:t,i18n:l}):null,a?(0,Bk.h)(Hk,{i18n:l,file:n,uppy:t,onClick:()=>e.uppy.removeFile(n.id,"removed-by-user")}):null)},qk=qx;const Yk=Tc.exports,Kk=function(e,t){if(e===t)return!0;for(var n in e)if(!(n in t))return!1;for(var n in t)if(e[n]!==t[n])return!1;return!0},Qk=function(e){return(0,_k.h)("div",{className:"uppy-Dashboard-Item-previewInnerWrap",style:{backgroundColor:Ok(e.file.type).color}},e.showLinkToFileUploadResult&&e.file.uploadURL&&(0,_k.h)("a",{className:"uppy-Dashboard-Item-previewLink",href:e.file.uploadURL,rel:"noreferrer noopener",target:"_blank","aria-label":e.file.meta.name},(0,_k.h)("span",{hidden:!0},e.file.meta.name)),(0,_k.h)(Dk,{file:e.file}),(0,_k.h)(Ck,{file:e.file,i18n:e.i18n,toggleFileCard:e.toggleFileCard,metaFields:e.metaFields}))},Gk=function(e){return e.file.progress.uploadStarted?e.isUploaded?(0,Nk.h)("div",{className:"uppy-Dashboard-Item-progress"},(0,Nk.h)("div",{className:"uppy-Dashboard-Item-progressIndicator"},(0,Nk.h)(Ak,null,(0,Nk.h)("circle",{r:"15",cx:"18",cy:"18",fill:"#1bb240"}),(0,Nk.h)("polygon",{className:"uppy-Dashboard-Item-progressIcon--check",transform:"translate(2, 3)",points:"14 22.5 7 15.2457065 8.99985857 13.1732815 14 18.3547104 22.9729883 9 25 11.1005634"})))):e.recoveredState?void 0:e.error&&!e.hideRetryButton?(0,Nk.h)(Sk,e,(0,Nk.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon uppy-Dashboard-Item-progressIcon--retry",width:"28",height:"31",viewBox:"0 0 16 19"},(0,Nk.h)("path",{d:"M16 11a8 8 0 1 1-8-8v2a6 6 0 1 0 6 6h2z"}),(0,Nk.h)("path",{d:"M7.9 3H10v2H7.9z"}),(0,Nk.h)("path",{d:"M8.536.5l3.535 3.536-1.414 1.414L7.12 1.914z"}),(0,Nk.h)("path",{d:"M10.657 2.621l1.414 1.415L8.536 7.57 7.12 6.157z"}))):e.resumableUploads&&!e.hidePauseResumeButton?(0,Nk.h)(Sk,e,(0,Nk.h)(Ak,null,(0,Nk.h)(Ik,{progress:e.file.progress.percentage}),e.file.isPaused?(0,Nk.h)("polygon",{className:"uppy-Dashboard-Item-progressIcon--play",transform:"translate(3, 3)",points:"12 20 12 10 20 15"}):(0,Nk.h)("g",{className:"uppy-Dashboard-Item-progressIcon--pause",transform:"translate(14.5, 13)"},(0,Nk.h)("rect",{x:"0",y:"0",width:"2",height:"10",rx:"0"}),(0,Nk.h)("rect",{x:"5",y:"0",width:"2",height:"10",rx:"0"})))):e.resumableUploads||!e.individualCancellation||e.hideCancelButton?(0,Nk.h)("div",{className:"uppy-Dashboard-Item-progress"},(0,Nk.h)("div",{className:"uppy-Dashboard-Item-progressIndicator"},(0,Nk.h)(Ak,null,(0,Nk.h)(Ik,{progress:e.file.progress.percentage})))):(0,Nk.h)(Sk,e,(0,Nk.h)(Ak,null,(0,Nk.h)(Ik,{progress:e.file.progress.percentage}),(0,Nk.h)("polygon",{className:"cancel",transform:"translate(2, 2)",points:"19.8856516 11.0625 16 14.9481516 12.1019737 11.0625 11.0625 12.1143484 14.9481516 16 11.0625 19.8980263 12.1019737 20.9375 16 17.0518484 19.8856516 20.9375 20.9375 19.8980263 17.0518484 16 20.9375 12"}))):null},Zk=function(e){const{file:t}=e;return(0,jk.h)("div",{className:"uppy-Dashboard-Item-fileInfo","data-uppy-file-source":t.source},(0,jk.h)("div",{className:"uppy-Dashboard-Item-fileName"},(e=>{const{author:t,name:n}=e.file.meta;return(0,jk.h)("div",{className:"uppy-Dashboard-Item-name",title:n},Fk(n,e.containerWidth<=352?35:e.containerWidth<=576?60:t?20:30))})(e),(0,jk.h)(Rk,{file:e.file,onClick:()=>alert(e.file.error)})),(0,jk.h)("div",{className:"uppy-Dashboard-Item-status"},(e=>{const{author:t}=e.file.meta,{providerName:n}=e.file.remote,r=`·`;return t?(0,jk.h)("div",{className:"uppy-Dashboard-Item-author"},(0,jk.h)("a",{href:`${t.url}?utm_source=Companion&utm_medium=referral`,target:"_blank",rel:"noopener noreferrer"},Fk(t.name,13)),n?(0,jk.h)(jk.Fragment,null,` ${r} `,n,` ${r} `):null):null})(e),(e=>e.file.size&&(0,jk.h)("div",{className:"uppy-Dashboard-Item-statusSize"},zk(e.file.size)))(e),(e=>e.file.isGhost&&(0,jk.h)("span",null," • ",(0,jk.h)("button",{className:"uppy-u-reset uppy-c-btn uppy-Dashboard-Item-reSelect",type:"button",onClick:e.toggleAddFilesPanel},e.i18n("reSelect"))))(e)),(0,jk.h)(Pk,{file:e.file,i18n:e.i18n,toggleFileCard:e.toggleFileCard,metaFields:e.metaFields}))},Jk=Vk;class Xk extends qk.Component{componentDidMount(){const{file:e}=this.props;e.preview||this.props.handleRequestThumbnail(e)}shouldComponentUpdate(e){return!Kk(this.props,e)}componentDidUpdate(){const{file:e}=this.props;e.preview||this.props.handleRequestThumbnail(e)}componentWillUnmount(){const{file:e}=this.props;e.preview||this.props.handleCancelThumbnail(e)}render(){const{file:e}=this.props,t=e.progress.preprocess||e.progress.postprocess,n=e.progress.uploadComplete&&!t&&!e.error,r=e.progress.uploadStarted||t,i=e.progress.uploadStarted&&!e.progress.uploadComplete||t,o=e.error||!1,{isGhost:s}=e;let a=(this.props.individualCancellation||!i)&&!n;n&&this.props.showRemoveButtonAfterComplete&&(a=!0);const l=Yk({"uppy-Dashboard-Item":!0,"is-inprogress":i&&!this.props.recoveredState,"is-processing":t,"is-complete":n,"is-error":!!o,"is-resumable":this.props.resumableUploads,"is-noIndividualCancellation":!this.props.individualCancellation,"is-ghost":s});return(0,qk.h)("div",{className:l,id:`uppy_${e.id}`,role:this.props.role},(0,qk.h)("div",{className:"uppy-Dashboard-Item-preview"},(0,qk.h)(Qk,{file:e,showLinkToFileUploadResult:this.props.showLinkToFileUploadResult,i18n:this.props.i18n,toggleFileCard:this.props.toggleFileCard,metaFields:this.props.metaFields}),(0,qk.h)(Gk,{uppy:this.props.uppy,file:e,error:o,isUploaded:n,hideRetryButton:this.props.hideRetryButton,hideCancelButton:this.props.hideCancelButton,hidePauseResumeButton:this.props.hidePauseResumeButton,recoveredState:this.props.recoveredState,showRemoveButtonAfterComplete:this.props.showRemoveButtonAfterComplete,resumableUploads:this.props.resumableUploads,individualCancellation:this.props.individualCancellation,i18n:this.props.i18n})),(0,qk.h)("div",{className:"uppy-Dashboard-Item-fileInfoAndButtons"},(0,qk.h)(Zk,{file:e,id:this.props.id,acquirers:this.props.acquirers,containerWidth:this.props.containerWidth,i18n:this.props.i18n,toggleAddFilesPanel:this.props.toggleAddFilesPanel,toggleFileCard:this.props.toggleFileCard,metaFields:this.props.metaFields}),(0,qk.h)(Jk,{file:e,metaFields:this.props.metaFields,showLinkToFileUploadResult:this.props.showLinkToFileUploadResult,showRemoveButton:a,canEditFile:this.props.canEditFile,uploadInProgressOrComplete:r,toggleFileCard:this.props.toggleFileCard,openFileEditor:this.props.openFileEditor,uppy:this.props.uppy,i18n:this.props.i18n})))}}var e_=Xk,t_=qx;function n_(){return n_=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n_.apply(this,arguments)}const r_={position:"relative",width:"100%",minHeight:"100%"},i_={position:"absolute",top:0,left:0,width:"100%",overflow:"visible"};class o_ extends t_.Component{constructor(e){super(e),this.handleScroll=()=>{this.setState({offset:this.base.scrollTop})},this.handleResize=()=>{this.resize()},this.focusElement=null,this.state={offset:0,height:0}}componentDidMount(){this.resize(),window.addEventListener("resize",this.handleResize)}componentWillUpdate(){this.base.contains(document.activeElement)&&(this.focusElement=document.activeElement)}componentDidUpdate(){this.focusElement&&this.focusElement.parentNode&&document.activeElement!==this.focusElement&&this.focusElement.focus(),this.focusElement=null,this.resize()}componentWillUnmount(){window.removeEventListener("resize",this.handleResize)}resize(){const{height:e}=this.state;e!==this.base.offsetHeight&&this.setState({height:this.base.offsetHeight})}render(e){let{data:t,rowHeight:n,renderRow:r,overscanCount:i=10,...o}=e;const{offset:s,height:a}=this.state;let l=Math.floor(s/n),c=Math.floor(a/n);i&&(l=Math.max(0,l-l%i),c+=i);const u=l+c+4,d=t.slice(l,u),p={...r_,height:t.length*n},h={...i_,top:l*n};return(0,t_.h)("div",n_({onScroll:this.handleScroll},o),(0,t_.h)("div",{role:"presentation",style:p},(0,t_.h)("div",{role:"presentation",style:h},d.map(r))))}}var s_=qx;function a_(){return a_=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a_.apply(this,arguments)}const l_=Tc.exports,c_=e_,u_=o_;var d_=qx;let p_;p_=Symbol.for("uppy test: disable unused locale key warning");class h_ extends d_.Component{constructor(){super(...arguments),this.triggerFileInputClick=()=>{this.fileInput.click()},this.triggerFolderInputClick=()=>{this.folderInput.click()},this.onFileInputChange=e=>{this.props.handleInputChange(e),e.target.value=null},this.renderHiddenInput=(e,t)=>(0,d_.h)("input",{className:"uppy-Dashboard-input",hidden:!0,"aria-hidden":"true",tabIndex:-1,webkitdirectory:e,type:"file",name:"files[]",multiple:1!==this.props.maxNumberOfFiles,onChange:this.onFileInputChange,accept:this.props.allowedFileTypes,ref:t}),this.renderMyDeviceAcquirer=()=>(0,d_.h)("div",{className:"uppy-DashboardTab",role:"presentation","data-uppy-acquirer-id":"MyDevice"},(0,d_.h)("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-DashboardTab-btn",role:"tab",tabIndex:0,"data-uppy-super-focusable":!0,onClick:this.triggerFileInputClick},(0,d_.h)("svg",{"aria-hidden":"true",focusable:"false",width:"32",height:"32",viewBox:"0 0 32 32"},(0,d_.h)("g",{fill:"none",fillRule:"evenodd"},(0,d_.h)("rect",{className:"uppy-ProviderIconBg",width:"32",height:"32",rx:"16",fill:"#2275D7"}),(0,d_.h)("path",{d:"M21.973 21.152H9.863l-1.108-5.087h14.464l-1.246 5.087zM9.935 11.37h3.958l.886 1.444a.673.673 0 0 0 .585.316h6.506v1.37H9.935v-3.13zm14.898 3.44a.793.793 0 0 0-.616-.31h-.978v-2.126c0-.379-.275-.613-.653-.613H15.75l-.886-1.445a.673.673 0 0 0-.585-.316H9.232c-.378 0-.667.209-.667.587V14.5h-.782a.793.793 0 0 0-.61.303.795.795 0 0 0-.155.663l1.45 6.633c.078.36.396.618.764.618h13.354c.36 0 .674-.246.76-.595l1.631-6.636a.795.795 0 0 0-.144-.675z",fill:"#FFF"}))),(0,d_.h)("div",{className:"uppy-DashboardTab-name"},this.props.i18n("myDevice")))),this.renderBrowseButton=(e,t)=>{const n=this.props.acquirers.length;return(0,d_.h)("button",{type:"button",className:"uppy-u-reset uppy-Dashboard-browse",onClick:t,"data-uppy-super-focusable":0===n},e)},this.renderDropPasteBrowseTagline=()=>{const e=this.props.acquirers.length,t=this.renderBrowseButton(this.props.i18n("browseFiles"),this.triggerFileInputClick),n=this.renderBrowseButton(this.props.i18n("browseFolders"),this.triggerFolderInputClick),r=this.props.fileManagerSelectionType,i=r.charAt(0).toUpperCase()+r.slice(1);return(0,d_.h)("div",{class:"uppy-Dashboard-AddFiles-title"},this.props.disableLocalFiles?this.props.i18n("importFiles"):e>0?this.props.i18nArray(`dropPasteImport${i}`,{browseFiles:t,browseFolders:n,browse:t}):this.props.i18nArray(`dropPaste${i}`,{browseFiles:t,browseFolders:n,browse:t}))},this.renderAcquirer=e=>(0,d_.h)("div",{className:"uppy-DashboardTab",role:"presentation","data-uppy-acquirer-id":e.id},(0,d_.h)("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-DashboardTab-btn",role:"tab",tabIndex:0,"data-cy":e.id,"aria-controls":`uppy-DashboardContent-panel--${e.id}`,"aria-selected":this.props.activePickerPanel.id===e.id,"data-uppy-super-focusable":!0,onClick:()=>this.props.showPanel(e.id)},e.icon(),(0,d_.h)("div",{className:"uppy-DashboardTab-name"},e.name))),this.renderAcquirers=(e,t)=>{const n=[...e],r=n.splice(e.length-2,e.length);return(0,d_.h)("div",{className:"uppy-Dashboard-AddFiles-list",role:"tablist"},!t&&this.renderMyDeviceAcquirer(),n.map((e=>this.renderAcquirer(e))),(0,d_.h)("span",{role:"presentation",style:{"white-space":"nowrap"}},r.map((e=>this.renderAcquirer(e)))))}}[p_](){this.props.i18nArray("dropPasteBoth"),this.props.i18nArray("dropPasteFiles"),this.props.i18nArray("dropPasteFolders"),this.props.i18nArray("dropPasteImportBoth"),this.props.i18nArray("dropPasteImportFiles"),this.props.i18nArray("dropPasteImportFolders")}renderPoweredByUppy(){const{i18nArray:e}=this.props,t=e("poweredBy",{uppy:(0,d_.h)("span",null,(0,d_.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon uppy-Dashboard-poweredByIcon",width:"11",height:"11",viewBox:"0 0 11 11"},(0,d_.h)("path",{d:"M7.365 10.5l-.01-4.045h2.612L5.5.806l-4.467 5.65h2.604l.01 4.044h3.718z",fillRule:"evenodd"})),(0,d_.h)("span",{className:"uppy-Dashboard-poweredByUppy"},"Uppy"))});return(0,d_.h)("a",{tabIndex:"-1",href:"https://uppy.io",rel:"noreferrer noopener",target:"_blank",className:"uppy-Dashboard-poweredBy"},t)}render(){return(0,d_.h)("div",{className:"uppy-Dashboard-AddFiles"},this.renderHiddenInput(!1,(e=>{this.fileInput=e})),this.renderHiddenInput(!0,(e=>{this.folderInput=e})),this.renderDropPasteBrowseTagline(),this.props.acquirers.length>0&&this.renderAcquirers(this.props.acquirers,this.props.disableLocalFiles),(0,d_.h)("div",{className:"uppy-Dashboard-AddFiles-info"},this.props.note&&(0,d_.h)("div",{className:"uppy-Dashboard-note"},this.props.note),this.props.proudlyDisplayPoweredByUppy&&this.renderPoweredByUppy(this.props)))}}var f_=h_,m_=qx;const g_=Tc.exports,b_=f_;var y_=e=>(0,m_.h)("div",{className:g_("uppy-Dashboard-AddFilesPanel",e.className),"data-uppy-panelType":"AddFiles","aria-hidden":e.showAddFilesPanel},(0,m_.h)("div",{className:"uppy-DashboardContent-bar"},(0,m_.h)("div",{className:"uppy-DashboardContent-title",role:"heading","aria-level":"1"},e.i18n("addingMoreFiles")),(0,m_.h)("button",{className:"uppy-DashboardContent-back",type:"button",onClick:()=>e.toggleAddFilesPanel(!1)},e.i18n("back"))),(0,m_.h)(b_,e));var v_=function(e){const{tagName:t}=e.target;"INPUT"!==t&&"TEXTAREA"!==t?(e.preventDefault(),e.stopPropagation()):e.stopPropagation()},w_=qx;const x_=Tc.exports,E_=v_;var M_=function(e){let{activePickerPanel:t,className:n,hideAllPanels:r,i18n:i,state:o,uppy:s}=e;return(0,w_.h)("div",{className:x_("uppy-DashboardContent-panel",n),role:"tabpanel","data-uppy-panelType":"PickerPanel",id:`uppy-DashboardContent-panel--${t.id}`,onDragOver:E_,onDragLeave:E_,onDrop:E_,onPaste:E_},(0,w_.h)("div",{className:"uppy-DashboardContent-bar"},(0,w_.h)("div",{className:"uppy-DashboardContent-title",role:"heading","aria-level":"1"},i("importFrom",{name:t.name})),(0,w_.h)("button",{className:"uppy-DashboardContent-back",type:"button",onClick:r},i("cancel"))),(0,w_.h)("div",{className:"uppy-DashboardContent-panelBody"},s.getPlugin(t.id).render(o)))},k_=qx;const __=Tc.exports;var D_=function(e){const t=e.files[e.fileCardFor];return(0,k_.h)("div",{className:__("uppy-DashboardContent-panel",e.className),role:"tabpanel","data-uppy-panelType":"FileEditor",id:"uppy-DashboardContent-panel--editor"},(0,k_.h)("div",{className:"uppy-DashboardContent-bar"},(0,k_.h)("div",{className:"uppy-DashboardContent-title",role:"heading","aria-level":"1"},e.i18nArray("editing",{file:(0,k_.h)("span",{className:"uppy-DashboardContent-titleFile"},t.meta?t.meta.name:t.name)})),(0,k_.h)("button",{className:"uppy-DashboardContent-back",type:"button",onClick:e.hideAllPanels},e.i18n("cancel")),(0,k_.h)("button",{className:"uppy-DashboardContent-save",type:"button",onClick:e.saveFileEditor},e.i18n("save"))),(0,k_.h)("div",{className:"uppy-DashboardContent-panelBody"},e.editors.map((t=>e.uppy.getPlugin(t.id).render(e.state)))))},C_=qx;const O_="error",N_="waiting",T_="preprocessing",S_="uploading",A_="postprocessing",I_="complete",L_="paused";function j_(e){let{files:t,i18n:n,isAllComplete:r,isAllErrored:i,isAllPaused:o,inProgressNotPausedFiles:s,newFiles:a,processingFiles:l}=e;const c=function(e,t,n,r){if(void 0===r&&(r={}),e)return O_;if(t)return I_;if(n)return L_;let i=N_;const o=Object.keys(r);for(let e=0;e<o.length;e++){const{progress:t}=r[o[e]];if(t.uploadStarted&&!t.uploadComplete)return S_;t.preprocess&&i!==S_&&(i=T_),t.postprocess&&i!==S_&&i!==T_&&(i=A_)}return i}(i,r,o,t);switch(c){case"uploading":return n("uploadingXFiles",{smart_count:s.length});case"preprocessing":case"postprocessing":return n("processingXFiles",{smart_count:l.length});case"paused":return n("uploadPaused");case"waiting":return n("xFilesSelected",{smart_count:a.length});case"complete":return n("uploadComplete")}}var z_=function(e){const{i18n:t,isAllComplete:n,hideCancelButton:r,maxNumberOfFiles:i,toggleAddFilesPanel:o,uppy:s}=e;let{allowNewUpload:a}=e;return a&&i&&(a=e.totalFileCount<e.maxNumberOfFiles),(0,C_.h)("div",{className:"uppy-DashboardContent-bar"},n||r?(0,C_.h)("div",null):(0,C_.h)("button",{className:"uppy-DashboardContent-back",type:"button",onClick:()=>s.cancelAll()},t("cancel")),(0,C_.h)("div",{className:"uppy-DashboardContent-title",role:"heading","aria-level":"1"},(0,C_.h)(j_,e)),a?(0,C_.h)("button",{className:"uppy-DashboardContent-addMore",type:"button","aria-label":t("addMoreFiles"),title:t("addMoreFiles"),onClick:()=>o(!0)},(0,C_.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"15",height:"15",viewBox:"0 0 15 15"},(0,C_.h)("path",{d:"M8 6.5h6a.5.5 0 0 1 .5.5v.5a.5.5 0 0 1-.5.5H8v6a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V8h-6a.5.5 0 0 1-.5-.5V7a.5.5 0 0 1 .5-.5h6v-6A.5.5 0 0 1 7 0h.5a.5.5 0 0 1 .5.5v6z"})),(0,C_.h)("span",{className:"uppy-DashboardContent-addMoreCaption"},t("addMore"))):(0,C_.h)("div",null))},F_=qx,P_=xv;const R_=Tc.exports,B_=vk,U_=v_,$_=Ek;class H_ extends F_.Component{constructor(e){super(e),this.form=document.createElement("form"),this.updateMeta=(e,t)=>{this.setState((n=>{let{formState:r}=n;return{formState:{...r,[t]:e}}}))},this.handleSave=e=>{e.preventDefault();const t=this.props.fileCardFor;this.props.saveFileCard(this.state.formState,t)},this.handleCancel=()=>{const{currentImage:e}=this.getPluginState(),t=this.props.uppy.getFile(e.id);this.props.uppy.emit("file-editor:cancel",t),this.props.toggleFileCard(!1)},this.saveOnEnter=e=>{if(13===e.keyCode){e.stopPropagation(),e.preventDefault();const t=this.props.files[this.props.fileCardFor];this.props.saveFileCard(this.state.formState,t.id)}},this.renderMetaFields=()=>{const e=this.getMetaFields()||[],t={text:"uppy-u-reset uppy-c-textInput uppy-Dashboard-FileCard-input"};return e.map((e=>{const n=`uppy-Dashboard-FileCard-input-${e.id}`,r=this.props.requiredMetaFields.includes(e.id);return(0,F_.h)("fieldset",{key:e.id,className:"uppy-Dashboard-FileCard-fieldset"},(0,F_.h)("label",{className:"uppy-Dashboard-FileCard-label",htmlFor:n},e.name),void 0!==e.render?e.render({value:this.state.formState[e.id],onChange:t=>this.updateMeta(t,e.id),fieldCSSClasses:t,required:r,form:this.form.id},F_.h):(0,F_.h)("input",{className:t.text,id:n,form:this.form.id,type:e.type||"text",required:r,value:this.state.formState[e.id],placeholder:e.placeholder,onKeyUp:"form"in HTMLInputElement.prototype?void 0:this.saveOnEnter,onKeyDown:"form"in HTMLInputElement.prototype?void 0:this.saveOnEnter,onKeyPress:"form"in HTMLInputElement.prototype?void 0:this.saveOnEnter,onInput:t=>this.updateMeta(t.target.value,e.id),"data-uppy-super-focusable":!0}))}))};const t=this.props.files[this.props.fileCardFor],n=this.getMetaFields()||[],r={};n.forEach((e=>{r[e.id]=t.meta[e.id]||""})),this.state={formState:r},this.form.id=(0,P_.nanoid)()}componentWillMount(){this.form.addEventListener("submit",this.handleSave),document.body.appendChild(this.form)}componentWillUnmount(){this.form.removeEventListener("submit",this.handleSave),document.body.removeChild(this.form)}getMetaFields(){return"function"==typeof this.props.metaFields?this.props.metaFields(this.props.files[this.props.fileCardFor]):this.props.metaFields}render(){const e=this.props.files[this.props.fileCardFor],t=this.props.canEditFile(e);return(0,F_.h)("div",{className:R_("uppy-Dashboard-FileCard",this.props.className),"data-uppy-panelType":"FileCard",onDragOver:U_,onDragLeave:U_,onDrop:U_,onPaste:U_},(0,F_.h)("div",{className:"uppy-DashboardContent-bar"},(0,F_.h)("div",{className:"uppy-DashboardContent-title",role:"heading","aria-level":"1"},this.props.i18nArray("editing",{file:(0,F_.h)("span",{className:"uppy-DashboardContent-titleFile"},e.meta?e.meta.name:e.name)})),(0,F_.h)("button",{className:"uppy-DashboardContent-back",type:"button",form:this.form.id,title:this.props.i18n("finishEditingFile"),onClick:this.handleCancel},this.props.i18n("cancel"))),(0,F_.h)("div",{className:"uppy-Dashboard-FileCard-inner"},(0,F_.h)("div",{className:"uppy-Dashboard-FileCard-preview",style:{backgroundColor:B_(e.type).color}},(0,F_.h)($_,{file:e}),t&&(0,F_.h)("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-Dashboard-FileCard-edit",onClick:t=>{this.handleSave(t),this.props.openFileEditor(e)},form:this.form.id},this.props.i18n("editFile"))),(0,F_.h)("div",{className:"uppy-Dashboard-FileCard-info"},this.renderMetaFields()),(0,F_.h)("div",{className:"uppy-Dashboard-FileCard-actions"},(0,F_.h)("button",{className:"uppy-u-reset uppy-c-btn uppy-c-btn-primary uppy-Dashboard-FileCard-actionsBtn",type:"form"in HTMLButtonElement.prototype?"submit":"button",onClick:"form"in HTMLButtonElement.prototype?void 0:this.handleSave,form:this.form.id},this.props.i18n("saveChanges")),(0,F_.h)("button",{className:"uppy-u-reset uppy-c-btn uppy-c-btn-link uppy-Dashboard-FileCard-actionsBtn",type:"button",onClick:this.handleCancel,form:this.form.id},this.props.i18n("cancel")))))}}var W_=H_,V_=qx;const q_=Tc.exports,Y_="uppy-transition-slideDownUp",K_=250;class Q_ extends V_.Component{constructor(e){super(e),this.state={cachedChildren:null,className:""}}componentWillUpdate(e){const{cachedChildren:t}=this.state,n=(0,V_.toChildArray)(e.children)[0];if(t===n)return null;const r={cachedChildren:n};n&&!t&&(r.className=`${Y_}-enter`,cancelAnimationFrame(this.animationFrame),clearTimeout(this.leaveTimeout),this.leaveTimeout=void 0,this.animationFrame=requestAnimationFrame((()=>{this.setState({className:`${Y_}-enter ${Y_}-enter-active`}),this.enterTimeout=setTimeout((()=>{this.setState({className:""})}),K_)}))),t&&!n&&void 0===this.leaveTimeout&&(r.cachedChildren=t,r.className=`${Y_}-leave`,cancelAnimationFrame(this.animationFrame),clearTimeout(this.enterTimeout),this.enterTimeout=void 0,this.animationFrame=requestAnimationFrame((()=>{this.setState({className:`${Y_}-leave ${Y_}-leave-active`}),this.leaveTimeout=setTimeout((()=>{this.setState({cachedChildren:null,className:""})}),K_)}))),this.setState(r)}render(){const{cachedChildren:e,className:t}=this.state;return e?(0,V_.cloneElement)(e,{className:q_(t,e.props.className)}):null}}var G_=qx;function Z_(){return Z_=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Z_.apply(this,arguments)}const J_=Tc.exports,X_=bk,eD=e=>{const t=0===e.totalFileCount,n=l_("uppy-Dashboard-files",{"uppy-Dashboard-files--noFiles":t}),r=1===e.itemsPerRow?71:200,i={id:e.id,error:e.error,i18n:e.i18n,uppy:e.uppy,acquirers:e.acquirers,resumableUploads:e.resumableUploads,individualCancellation:e.individualCancellation,hideRetryButton:e.hideRetryButton,hidePauseResumeButton:e.hidePauseResumeButton,hideCancelButton:e.hideCancelButton,showLinkToFileUploadResult:e.showLinkToFileUploadResult,showRemoveButtonAfterComplete:e.showRemoveButtonAfterComplete,isWide:e.isWide,metaFields:e.metaFields,recoveredState:e.recoveredState,toggleFileCard:e.toggleFileCard,handleRequestThumbnail:e.handleRequestThumbnail,handleCancelThumbnail:e.handleCancelThumbnail},o=Object.keys(e.files);e.recoveredState&&o.sort(((t,n)=>e.files[n].isGhost-e.files[t].isGhost));const s=function(e,t){const n=[];let r=[];return e.forEach((e=>{r.length<t?r.push(e):(n.push(r),r=[e])})),r.length&&n.push(r),n}(o,e.itemsPerRow);return(0,s_.h)(u_,{class:n,role:"list",data:s,renderRow:t=>(0,s_.h)("div",{role:"presentation",key:t[0]},t.map((t=>(0,s_.h)(c_,a_({key:t,uppy:e.uppy},i,{role:"listitem",openFileEditor:e.openFileEditor,canEditFile:e.canEditFile,toggleAddFilesPanel:e.toggleAddFilesPanel,file:e.files[t]}))))),rowHeight:r})},tD=f_,nD=y_,rD=M_,iD=D_,oD=z_,sD=W_,aD=Q_,lD=900,cD=700,uD=576,dD=400;var pD=qx,hD=hv.exports,fD=xv,mD=dE;function gD(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var bD=0;function yD(e){return"__private_"+bD+++"_"+e}const vD=wE.exports,wD=aM.exports,xD=AM,ED=LM,MD=pE,kD=HM,_D=KM,DD=hE,CD=gk,OD=function(e){const t=0===e.totalFileCount,n=e.containerWidth>uD,r=J_({"uppy-Dashboard":!0,"uppy-Dashboard--isDisabled":e.disabled,"uppy-Dashboard--animateOpenClose":e.animateOpenClose,"uppy-Dashboard--isClosing":e.isClosing,"uppy-Dashboard--isDraggingOver":e.isDraggingOver,"uppy-Dashboard--modal":!e.inline,"uppy-size--md":e.containerWidth>uD,"uppy-size--lg":e.containerWidth>cD,"uppy-size--xl":e.containerWidth>lD,"uppy-size--height-md":e.containerHeight>dD,"uppy-Dashboard--isAddFilesPanelVisible":e.showAddFilesPanel,"uppy-Dashboard--isInnerWrapVisible":e.areInsidesReadyToBeVisible});let i=1;e.containerWidth>lD?i=5:e.containerWidth>cD?i=4:e.containerWidth>uD&&(i=3);const o=e.showSelectedFiles&&!t,s=e.recoveredState?Object.keys(e.recoveredState.files).length:null,a=e.files?Object.keys(e.files).filter((t=>e.files[t].isGhost)).length:null;return(0,G_.h)("div",{className:r,"data-uppy-theme":e.theme,"data-uppy-num-acquirers":e.acquirers.length,"data-uppy-drag-drop-supported":!e.disableLocalFiles&&X_(),"aria-hidden":e.inline?"false":e.isHidden,"aria-disabled":e.disabled,"aria-label":e.inline?e.i18n("dashboardTitle"):e.i18n("dashboardWindowTitle"),onPaste:e.handlePaste,onDragOver:e.handleDragOver,onDragLeave:e.handleDragLeave,onDrop:e.handleDrop},(0,G_.h)("div",{"aria-hidden":"true",className:"uppy-Dashboard-overlay",tabIndex:-1,onClick:e.handleClickOutside}),(0,G_.h)("div",{className:"uppy-Dashboard-inner","aria-modal":!e.inline&&"true",role:!e.inline&&"dialog",style:{width:e.inline&&e.width?e.width:"",height:e.inline&&e.height?e.height:""}},e.inline?null:(0,G_.h)("button",{className:"uppy-u-reset uppy-Dashboard-close",type:"button","aria-label":e.i18n("closeModal"),title:e.i18n("closeModal"),onClick:e.closeModal},(0,G_.h)("span",{"aria-hidden":"true"},"×")),(0,G_.h)("div",{className:"uppy-Dashboard-innerWrap"},(0,G_.h)("div",{className:"uppy-Dashboard-dropFilesHereHint"},e.i18n("dropHint")),o&&(0,G_.h)(oD,e),s&&(0,G_.h)("div",{className:"uppy-Dashboard-serviceMsg"},(0,G_.h)("svg",{className:"uppy-Dashboard-serviceMsg-icon","aria-hidden":"true",focusable:"false",width:"21",height:"16",viewBox:"0 0 24 19"},(0,G_.h)("g",{transform:"translate(0 -1)",fill:"none",fillRule:"evenodd"},(0,G_.h)("path",{d:"M12.857 1.43l10.234 17.056A1 1 0 0122.234 20H1.766a1 1 0 01-.857-1.514L11.143 1.429a1 1 0 011.714 0z",fill:"#FFD300"}),(0,G_.h)("path",{fill:"#000",d:"M11 6h2l-.3 8h-1.4z"}),(0,G_.h)("circle",{fill:"#000",cx:"12",cy:"17",r:"1"}))),(0,G_.h)("strong",{className:"uppy-Dashboard-serviceMsg-title"},e.i18n("sessionRestored")),(0,G_.h)("div",{className:"uppy-Dashboard-serviceMsg-text"},a>0?e.i18n("recoveredXFiles",{smart_count:a}):e.i18n("recoveredAllFiles"))),o?(0,G_.h)(eD,Z_({},e,{itemsPerRow:i})):(0,G_.h)(tD,Z_({},e,{isSizeMD:n})),(0,G_.h)(aD,null,e.showAddFilesPanel?(0,G_.h)(nD,Z_({key:"AddFiles"},e,{isSizeMD:n})):null),(0,G_.h)(aD,null,e.fileCardFor?(0,G_.h)(sD,Z_({key:"FileCard"},e)):null),(0,G_.h)(aD,null,e.activePickerPanel?(0,G_.h)(rD,Z_({key:"Picker"},e)):null),(0,G_.h)(aD,null,e.showFileEditor?(0,G_.h)(iD,Z_({key:"Editor"},e)):null),(0,G_.h)("div",{className:"uppy-Dashboard-progressindicators"},e.progressindicators.map((t=>e.uppy.getPlugin(t.id).render(e.state)))))))},ND={strings:{closeModal:"Close Modal",addMoreFiles:"Add more files",addingMoreFiles:"Adding more files",importFrom:"Import from %{name}",dashboardWindowTitle:"Uppy Dashboard Window (Press escape to close)",dashboardTitle:"Uppy Dashboard",copyLinkToClipboardSuccess:"Link copied to clipboard.",copyLinkToClipboardFallback:"Copy the URL below",copyLink:"Copy link",back:"Back",removeFile:"Remove file",editFile:"Edit file",editing:"Editing %{file}",finishEditingFile:"Finish editing file",saveChanges:"Save changes",myDevice:"My Device",dropHint:"Drop your files here",uploadComplete:"Upload complete",uploadPaused:"Upload paused",resumeUpload:"Resume upload",pauseUpload:"Pause upload",retryUpload:"Retry upload",cancelUpload:"Cancel upload",xFilesSelected:{0:"%{smart_count} file selected",1:"%{smart_count} files selected"},uploadingXFiles:{0:"Uploading %{smart_count} file",1:"Uploading %{smart_count} files"},processingXFiles:{0:"Processing %{smart_count} file",1:"Processing %{smart_count} files"},poweredBy:"Powered by %{uppy}",addMore:"Add more",editFileWithFilename:"Edit file %{file}",save:"Save",cancel:"Cancel",dropPasteFiles:"Drop files here or %{browseFiles}",dropPasteFolders:"Drop files here or %{browseFolders}",dropPasteBoth:"Drop files here, %{browseFiles} or %{browseFolders}",dropPasteImportFiles:"Drop files here, %{browseFiles} or import from:",dropPasteImportFolders:"Drop files here, %{browseFolders} or import from:",dropPasteImportBoth:"Drop files here, %{browseFiles}, %{browseFolders} or import from:",importFiles:"Import files from:",browseFiles:"browse files",browseFolders:"browse folders",recoveredXFiles:{0:"We could not fully recover 1 file. Please re-select it and resume the upload.",1:"We could not fully recover %{smart_count} files. Please re-select them and resume the upload."},recoveredAllFiles:"We restored all files. You can now resume the upload.",sessionRestored:"Session restored",reSelect:"Re-select",missingRequiredMetaFields:{0:"Missing required meta field: %{fields}.",1:"Missing required meta fields: %{fields}."}}},TD=_D.default||_D,SD=9,AD=27;function ID(){const e={};return e.promise=new Promise(((t,n)=>{e.resolve=t,e.reject=n})),e}function LD(){return(0,pD.h)("svg",{"aria-hidden":"true",focusable:"false",width:"30",height:"30",viewBox:"0 0 30 30"},(0,pD.h)("path",{d:"M15 30c8.284 0 15-6.716 15-15 0-8.284-6.716-15-15-15C6.716 0 0 6.716 0 15c0 8.284 6.716 15 15 15zm4.258-12.676v6.846h-8.426v-6.846H5.204l9.82-12.364 9.82 12.364H19.26z"}))}var jD=yD("openFileEditorWhenFilesAdded"),zD=yD("attachRenderFunctionToTarget"),FD=yD("isTargetSupported"),PD=yD("getAcquirers"),RD=yD("getProgressIndicators"),BD=yD("getEditors");class UD extends hD.UIPlugin{constructor(e,t){var n;super(e,t),n=this,this.removeTarget=e=>{const t=this.getPluginState().targets.filter((t=>t.id!==e.id));this.setPluginState({targets:t})},this.addTarget=e=>{const t=e.id||e.constructor.name,n=e.title||t,r=e.type;if("acquirer"!==r&&"progressindicator"!==r&&"editor"!==r){const e="Dashboard: can only be targeted by plugins of types: acquirer, progressindicator, editor";return void this.uppy.log(e,"error")}const i={id:t,name:n,type:r},o=this.getPluginState().targets.slice();return o.push(i),this.setPluginState({targets:o}),this.el},this.hideAllPanels=()=>{const e=this.getPluginState(),t={activePickerPanel:!1,showAddFilesPanel:!1,activeOverlayType:null,fileCardFor:null,showFileEditor:!1};e.activePickerPanel===t.activePickerPanel&&e.showAddFilesPanel===t.showAddFilesPanel&&e.showFileEditor===t.showFileEditor&&e.activeOverlayType===t.activeOverlayType||this.setPluginState(t)},this.showPanel=e=>{const{targets:t}=this.getPluginState(),n=t.filter((t=>"acquirer"===t.type&&t.id===e))[0];this.setPluginState({activePickerPanel:n,activeOverlayType:"PickerPanel"})},this.canEditFile=e=>{const{targets:t}=this.getPluginState();return gD(this,BD)[BD](t).some((t=>this.uppy.getPlugin(t.id).canEditFile(e)))},this.openFileEditor=e=>{const{targets:t}=this.getPluginState(),n=gD(this,BD)[BD](t);this.setPluginState({showFileEditor:!0,fileCardFor:e.id||null,activeOverlayType:"FileEditor"}),n.forEach((t=>{this.uppy.getPlugin(t.id).selectFile(e)}))},this.saveFileEditor=()=>{const{targets:e}=this.getPluginState();gD(this,BD)[BD](e).forEach((e=>{this.uppy.getPlugin(e.id).save()})),this.hideAllPanels()},this.openModal=()=>{const{promise:e,resolve:t}=ID();if(this.savedScrollPosition=window.pageYOffset,this.savedActiveElement=document.activeElement,this.opts.disablePageScrollWhenModalOpen&&document.body.classList.add("uppy-Dashboard-isFixed"),this.opts.animateOpenClose&&this.getPluginState().isClosing){const e=()=>{this.setPluginState({isHidden:!1}),this.el.removeEventListener("animationend",e,!1),t()};this.el.addEventListener("animationend",e,!1)}else this.setPluginState({isHidden:!1}),t();return this.opts.browserBackButtonClose&&this.updateBrowserHistory(),document.addEventListener("keydown",this.handleKeyDownInModal),this.uppy.emit("dashboard:modal-open"),e},this.closeModal=function(e){void 0===e&&(e={});const{manualClose:t=!0}=e,{isHidden:r,isClosing:i}=n.getPluginState();if(r||i)return;const{promise:o,resolve:s}=ID();if(n.opts.disablePageScrollWhenModalOpen&&document.body.classList.remove("uppy-Dashboard-isFixed"),n.opts.animateOpenClose){n.setPluginState({isClosing:!0});const e=()=>{n.setPluginState({isHidden:!0,isClosing:!1}),n.superFocus.cancel(),n.savedActiveElement.focus(),n.el.removeEventListener("animationend",e,!1),s()};n.el.addEventListener("animationend",e,!1)}else n.setPluginState({isHidden:!0}),n.superFocus.cancel(),n.savedActiveElement.focus(),s();var a;(document.removeEventListener("keydown",n.handleKeyDownInModal),t)&&(n.opts.browserBackButtonClose&&null!=(a=history.state)&&a[n.modalName]&&history.back());return n.uppy.emit("dashboard:modal-closed"),o},this.isModalOpen=()=>!this.getPluginState().isHidden||!1,this.requestCloseModal=()=>this.opts.onRequestCloseModal?this.opts.onRequestCloseModal():this.closeModal(),this.setDarkModeCapability=e=>{const{capabilities:t}=this.uppy.getState();this.uppy.setState({capabilities:{...t,darkMode:e}})},this.handleSystemDarkModeChange=e=>{const t=e.matches;this.uppy.log(`[Dashboard] Dark mode is ${t?"on":"off"}`),this.setDarkModeCapability(t)},this.toggleFileCard=(e,t)=>{const n=this.uppy.getFile(t);e?this.uppy.emit("dashboard:file-edit-start",n):this.uppy.emit("dashboard:file-edit-complete",n),this.setPluginState({fileCardFor:e?t:null,activeOverlayType:e?"FileCard":null})},this.toggleAddFilesPanel=e=>{this.setPluginState({showAddFilesPanel:e,activeOverlayType:e?"AddFiles":null})},this.addFiles=e=>{const t=e.map((e=>({source:this.id,name:e.name,type:e.type,data:e,meta:{relativePath:e.relativePath||e.webkitRelativePath||null}})));try{this.uppy.addFiles(t)}catch(e){this.uppy.log(e)}},this.startListeningToResize=()=>{this.resizeObserver=new ResizeObserver((e=>{const t=e[0],{width:n,height:r}=t.contentRect;this.uppy.log(`[Dashboard] resized: ${n} / ${r}`,"debug"),this.setPluginState({containerWidth:n,containerHeight:r,areInsidesReadyToBeVisible:!0})})),this.resizeObserver.observe(this.el.querySelector(".uppy-Dashboard-inner")),this.makeDashboardInsidesVisibleAnywayTimeout=setTimeout((()=>{const e=this.getPluginState(),t=!this.opts.inline&&e.isHidden;e.areInsidesReadyToBeVisible||t||(this.uppy.log("[Dashboard] resize event didn't fire on time: defaulted to mobile layout","debug"),this.setPluginState({areInsidesReadyToBeVisible:!0}))}),1e3)},this.stopListeningToResize=()=>{this.resizeObserver.disconnect(),clearTimeout(this.makeDashboardInsidesVisibleAnywayTimeout)},this.recordIfFocusedOnUppyRecently=e=>{this.el.contains(e.target)?this.ifFocusedOnUppyRecently=!0:(this.ifFocusedOnUppyRecently=!1,this.superFocus.cancel())},this.disableAllFocusableElements=e=>{const t=MD(this.el.querySelectorAll(DD));e?t.forEach((e=>{const t=e.getAttribute("tabindex");t&&(e.dataset.inertTabindex=t),e.setAttribute("tabindex","-1")})):t.forEach((e=>{"inertTabindex"in e.dataset?e.setAttribute("tabindex",e.dataset.inertTabindex):e.removeAttribute("tabindex")})),this.dashboardIsDisabled=e},this.updateBrowserHistory=()=>{var e;null!=(e=history.state)&&e[this.modalName]||history.pushState({...history.state,[this.modalName]:!0},""),window.addEventListener("popstate",this.handlePopState,!1)},this.handlePopState=e=>{var t;!this.isModalOpen()||e.state&&e.state[this.modalName]||this.closeModal({manualClose:!1}),!this.isModalOpen()&&null!=(t=e.state)&&t[this.modalName]&&history.back()},this.handleKeyDownInModal=e=>{e.keyCode===AD&&this.requestCloseModal(e),e.keyCode===SD&&mD.forModal(e,this.getPluginState().activeOverlayType,this.el)},this.handleClickOutside=()=>{this.opts.closeModalOnClickOutside&&this.requestCloseModal()},this.handlePaste=e=>{this.uppy.iteratePlugins((t=>{"acquirer"===t.type&&(null==t.handleRootPaste||t.handleRootPaste(e))}));const t=MD(e.clipboardData.files);t.length>0&&(this.uppy.log("[Dashboard] Files pasted"),this.addFiles(t))},this.handleInputChange=e=>{e.preventDefault();const t=MD(e.target.files);t.length>0&&(this.uppy.log("[Dashboard] Files selected through input"),this.addFiles(t))},this.handleDragOver=e=>{var t,n;e.preventDefault(),e.stopPropagation();const r=(()=>{let t=!0;return this.uppy.iteratePlugins((n=>{null!=n.canHandleRootDrop&&n.canHandleRootDrop(e)&&(t=!0)})),t})(),i=(()=>{const{types:t}=e.dataTransfer;return t.some((e=>"Files"===e))})();if(!r&&!i||this.opts.disabled||this.opts.disableLocalFiles&&(i||!r)||!this.uppy.getState().allowNewUpload)return e.dataTransfer.dropEffect="none",void clearTimeout(this.removeDragOverClassTimeout);e.dataTransfer.dropEffect="copy",clearTimeout(this.removeDragOverClassTimeout),this.setPluginState({isDraggingOver:!0}),null==(t=(n=this.opts).onDragOver)||t.call(n,e)},this.handleDragLeave=e=>{var t,n;e.preventDefault(),e.stopPropagation(),clearTimeout(this.removeDragOverClassTimeout),this.removeDragOverClassTimeout=setTimeout((()=>{this.setPluginState({isDraggingOver:!1})}),50),null==(t=(n=this.opts).onDragLeave)||t.call(n,e)},this.handleDrop=async e=>{var t,n;e.preventDefault(),e.stopPropagation(),clearTimeout(this.removeDragOverClassTimeout),this.setPluginState({isDraggingOver:!1}),this.uppy.iteratePlugins((t=>{"acquirer"===t.type&&(null==t.handleRootDrop||t.handleRootDrop(e))}));let r=!1;const i=await kD(e.dataTransfer,{logDropError:e=>{this.uppy.log(e,"error"),r||(this.uppy.info(e.message,"error"),r=!0)}});i.length>0&&(this.uppy.log("[Dashboard] Files dropped"),this.addFiles(i)),null==(t=(n=this.opts).onDrop)||t.call(n,e)},this.handleRequestThumbnail=e=>{this.opts.waitForThumbnailsBeforeUpload||this.uppy.emit("thumbnail:request",e)},this.handleCancelThumbnail=e=>{this.opts.waitForThumbnailsBeforeUpload||this.uppy.emit("thumbnail:cancel",e)},this.handleKeyDownInInline=e=>{e.keyCode===SD&&mD.forInline(e,this.getPluginState().activeOverlayType,this.el)},this.handlePasteOnBody=e=>{this.el.contains(document.activeElement)&&this.handlePaste(e)},this.handleComplete=e=>{let{failed:t}=e;this.opts.closeAfterFinish&&0===t.length&&this.requestCloseModal()},this.handleCancelRestore=()=>{this.uppy.emit("restore-canceled")},Object.defineProperty(this,jD,{writable:!0,value:e=>{const t=e[0];this.canEditFile(t)&&this.openFileEditor(t)}}),this.initEvents=()=>{if(this.opts.trigger&&!this.opts.inline){const e=ED(this.opts.trigger);e?e.forEach((e=>e.addEventListener("click",this.openModal))):this.uppy.log("Dashboard modal trigger not found. Make sure `trigger` is set in Dashboard options, unless you are planning to call `dashboard.openModal()` method yourself","warning")}this.startListeningToResize(),document.addEventListener("paste",this.handlePasteOnBody),this.uppy.on("plugin-remove",this.removeTarget),this.uppy.on("file-added",this.hideAllPanels),this.uppy.on("dashboard:modal-closed",this.hideAllPanels),this.uppy.on("file-editor:complete",this.hideAllPanels),this.uppy.on("complete",this.handleComplete),document.addEventListener("focus",this.recordIfFocusedOnUppyRecently,!0),document.addEventListener("click",this.recordIfFocusedOnUppyRecently,!0),this.opts.inline&&this.el.addEventListener("keydown",this.handleKeyDownInInline),this.opts.autoOpenFileEditor&&this.uppy.on("files-added",gD(this,jD)[jD])},this.removeEvents=()=>{const e=ED(this.opts.trigger);!this.opts.inline&&e&&e.forEach((e=>e.removeEventListener("click",this.openModal))),this.stopListeningToResize(),document.removeEventListener("paste",this.handlePasteOnBody),window.removeEventListener("popstate",this.handlePopState,!1),this.uppy.off("plugin-remove",this.removeTarget),this.uppy.off("file-added",this.hideAllPanels),this.uppy.off("dashboard:modal-closed",this.hideAllPanels),this.uppy.off("file-editor:complete",this.hideAllPanels),this.uppy.off("complete",this.handleComplete),document.removeEventListener("focus",this.recordIfFocusedOnUppyRecently),document.removeEventListener("click",this.recordIfFocusedOnUppyRecently),this.opts.inline&&this.el.removeEventListener("keydown",this.handleKeyDownInInline),this.opts.autoOpenFileEditor&&this.uppy.off("files-added",gD(this,jD)[jD])},this.superFocusOnEachUpdate=()=>{const e=this.el.contains(document.activeElement),t=document.activeElement===document.body||null===document.activeElement,n=0===this.uppy.getState().info.length,r=!this.opts.inline;n&&(r||e||t&&this.ifFocusedOnUppyRecently)?this.superFocus(this.el,this.getPluginState().activeOverlayType):this.superFocus.cancel()},this.afterUpdate=()=>{!this.opts.disabled||this.dashboardIsDisabled?(!this.opts.disabled&&this.dashboardIsDisabled&&this.disableAllFocusableElements(!1),this.superFocusOnEachUpdate()):this.disableAllFocusableElements(!0)},this.saveFileCard=(e,t)=>{this.uppy.setFileMeta(t,e),this.toggleFileCard(!1,t)},Object.defineProperty(this,zD,{writable:!0,value:e=>{const t=this.uppy.getPlugin(e.id);return{...e,icon:t.icon||this.opts.defaultPickerIcon,render:t.render}}}),Object.defineProperty(this,FD,{writable:!0,value:e=>{const t=this.uppy.getPlugin(e.id);return"function"!=typeof t.isSupported||t.isSupported()}}),Object.defineProperty(this,PD,{writable:!0,value:TD((e=>e.filter((e=>"acquirer"===e.type&&gD(this,FD)[FD](e))).map(gD(this,zD)[zD])))}),Object.defineProperty(this,RD,{writable:!0,value:TD((e=>e.filter((e=>"progressindicator"===e.type)).map(gD(this,zD)[zD])))}),Object.defineProperty(this,BD,{writable:!0,value:TD((e=>e.filter((e=>"editor"===e.type)).map(gD(this,zD)[zD])))}),this.render=e=>{const t=this.getPluginState(),{files:n,capabilities:r,allowNewUpload:i}=e,{newFiles:o,uploadStartedFiles:s,completeFiles:a,erroredFiles:l,inProgressFiles:c,inProgressNotPausedFiles:u,processingFiles:d,isUploadStarted:p,isAllComplete:h,isAllErrored:f,isAllPaused:m}=this.uppy.getObjectOfFilesPerState(),g=gD(this,PD)[PD](t.targets),b=gD(this,RD)[RD](t.targets),y=gD(this,BD)[BD](t.targets);let v;return v="auto"===this.opts.theme?r.darkMode?"dark":"light":this.opts.theme,["files","folders","both"].indexOf(this.opts.fileManagerSelectionType)<0&&(this.opts.fileManagerSelectionType="files",console.warn(`Unsupported option for "fileManagerSelectionType". Using default of "${this.opts.fileManagerSelectionType}".`)),OD({state:e,isHidden:t.isHidden,files:n,newFiles:o,uploadStartedFiles:s,completeFiles:a,erroredFiles:l,inProgressFiles:c,inProgressNotPausedFiles:u,processingFiles:d,isUploadStarted:p,isAllComplete:h,isAllErrored:f,isAllPaused:m,totalFileCount:Object.keys(n).length,totalProgress:e.totalProgress,allowNewUpload:i,acquirers:g,theme:v,disabled:this.opts.disabled,disableLocalFiles:this.opts.disableLocalFiles,direction:this.opts.direction,activePickerPanel:t.activePickerPanel,showFileEditor:t.showFileEditor,saveFileEditor:this.saveFileEditor,disableAllFocusableElements:this.disableAllFocusableElements,animateOpenClose:this.opts.animateOpenClose,isClosing:t.isClosing,progressindicators:b,editors:y,autoProceed:this.uppy.opts.autoProceed,id:this.id,closeModal:this.requestCloseModal,handleClickOutside:this.handleClickOutside,handleInputChange:this.handleInputChange,handlePaste:this.handlePaste,inline:this.opts.inline,showPanel:this.showPanel,hideAllPanels:this.hideAllPanels,i18n:this.i18n,i18nArray:this.i18nArray,uppy:this.uppy,note:this.opts.note,recoveredState:e.recoveredState,metaFields:t.metaFields,resumableUploads:r.resumableUploads||!1,individualCancellation:r.individualCancellation,isMobileDevice:r.isMobileDevice,fileCardFor:t.fileCardFor,toggleFileCard:this.toggleFileCard,toggleAddFilesPanel:this.toggleAddFilesPanel,showAddFilesPanel:t.showAddFilesPanel,saveFileCard:this.saveFileCard,openFileEditor:this.openFileEditor,canEditFile:this.canEditFile,width:this.opts.width,height:this.opts.height,showLinkToFileUploadResult:this.opts.showLinkToFileUploadResult,fileManagerSelectionType:this.opts.fileManagerSelectionType,proudlyDisplayPoweredByUppy:this.opts.proudlyDisplayPoweredByUppy,hideCancelButton:this.opts.hideCancelButton,hideRetryButton:this.opts.hideRetryButton,hidePauseResumeButton:this.opts.hidePauseResumeButton,showRemoveButtonAfterComplete:this.opts.showRemoveButtonAfterComplete,containerWidth:t.containerWidth,containerHeight:t.containerHeight,areInsidesReadyToBeVisible:t.areInsidesReadyToBeVisible,isTargetDOMEl:this.isTargetDOMEl,parentElement:this.el,allowedFileTypes:this.uppy.opts.restrictions.allowedFileTypes,maxNumberOfFiles:this.uppy.opts.restrictions.maxNumberOfFiles,requiredMetaFields:this.uppy.opts.restrictions.requiredMetaFields,showSelectedFiles:this.opts.showSelectedFiles,handleCancelRestore:this.handleCancelRestore,handleRequestThumbnail:this.handleRequestThumbnail,handleCancelThumbnail:this.handleCancelThumbnail,isDraggingOver:t.isDraggingOver,handleDragOver:this.handleDragOver,handleDragLeave:this.handleDragLeave,handleDrop:this.handleDrop})},this.discoverProviderPlugins=()=>{this.uppy.iteratePlugins((e=>{e&&!e.target&&e.opts&&e.opts.target===this.constructor&&this.addTarget(e)}))},this.install=()=>{this.setPluginState({isHidden:!0,fileCardFor:null,activeOverlayType:null,showAddFilesPanel:!1,activePickerPanel:!1,showFileEditor:!1,metaFields:this.opts.metaFields,targets:[],areInsidesReadyToBeVisible:!1,isDraggingOver:!1});const{inline:e,closeAfterFinish:t}=this.opts;if(e&&t)throw new Error("[Dashboard] `closeAfterFinish: true` cannot be used on an inline Dashboard, because an inline Dashboard cannot be closed at all. Either set `inline: false`, or disable the `closeAfterFinish` option.");const{allowMultipleUploads:n,allowMultipleUploadBatches:r}=this.uppy.opts;(n||r)&&t&&this.uppy.log("[Dashboard] When using `closeAfterFinish`, we recommended setting the `allowMultipleUploadBatches` option to `false` in the Uppy constructor. See https://uppy.io/docs/uppy/#allowMultipleUploads-true","warning");const{target:i}=this.opts;i&&this.mount(i,this);(this.opts.plugins||[]).forEach((e=>{const t=this.uppy.getPlugin(e);t&&t.mount(this,t)})),this.opts.disableStatusBar||this.uppy.use(vD,{id:`${this.id}:StatusBar`,target:this,hideUploadButton:this.opts.hideUploadButton,hideRetryButton:this.opts.hideRetryButton,hidePauseResumeButton:this.opts.hidePauseResumeButton,hideCancelButton:this.opts.hideCancelButton,showProgressDetails:this.opts.showProgressDetails,hideAfterFinish:this.opts.hideProgressAfterFinish,locale:this.opts.locale,doneButtonHandler:this.opts.doneButtonHandler}),this.opts.disableInformer||this.uppy.use(wD,{id:`${this.id}:Informer`,target:this}),this.opts.disableThumbnailGenerator||this.uppy.use(xD,{id:`${this.id}:ThumbnailGenerator`,thumbnailWidth:this.opts.thumbnailWidth,thumbnailHeight:this.opts.thumbnailHeight,thumbnailType:this.opts.thumbnailType,waitForThumbnailsBeforeUpload:this.opts.waitForThumbnailsBeforeUpload,lazy:!this.opts.waitForThumbnailsBeforeUpload}),this.darkModeMediaQuery="undefined"!=typeof window&&window.matchMedia?window.matchMedia("(prefers-color-scheme: dark)"):null;const o=!!this.darkModeMediaQuery&&this.darkModeMediaQuery.matches;this.uppy.log(`[Dashboard] Dark mode is ${o?"on":"off"}`),this.setDarkModeCapability(o),"auto"===this.opts.theme&&this.darkModeMediaQuery.addListener(this.handleSystemDarkModeChange),this.discoverProviderPlugins(),this.initEvents()},this.uninstall=()=>{if(!this.opts.disableInformer){const e=this.uppy.getPlugin(`${this.id}:Informer`);e&&this.uppy.removePlugin(e)}if(!this.opts.disableStatusBar){const e=this.uppy.getPlugin(`${this.id}:StatusBar`);e&&this.uppy.removePlugin(e)}if(!this.opts.disableThumbnailGenerator){const e=this.uppy.getPlugin(`${this.id}:ThumbnailGenerator`);e&&this.uppy.removePlugin(e)}(this.opts.plugins||[]).forEach((e=>{const t=this.uppy.getPlugin(e);t&&t.unmount()})),"auto"===this.opts.theme&&this.darkModeMediaQuery.removeListener(this.handleSystemDarkModeChange),this.unmount(),this.removeEvents()},this.id=this.opts.id||"Dashboard",this.title="Dashboard",this.type="orchestrator",this.modalName=`uppy-Dashboard-${(0,fD.nanoid)()}`,this.defaultLocale=ND;const r={target:"body",metaFields:[],trigger:null,inline:!1,width:750,height:550,thumbnailWidth:280,thumbnailType:"image/jpeg",waitForThumbnailsBeforeUpload:!1,defaultPickerIcon:LD,showLinkToFileUploadResult:!1,showProgressDetails:!1,hideUploadButton:!1,hideCancelButton:!1,hideRetryButton:!1,hidePauseResumeButton:!1,hideProgressAfterFinish:!1,doneButtonHandler:()=>{this.uppy.reset(),this.requestCloseModal()},note:null,closeModalOnClickOutside:!1,closeAfterFinish:!1,disableStatusBar:!1,disableInformer:!1,disableThumbnailGenerator:!1,disablePageScrollWhenModalOpen:!0,animateOpenClose:!0,fileManagerSelectionType:"files",proudlyDisplayPoweredByUppy:!0,onRequestCloseModal:()=>this.closeModal(),showSelectedFiles:!0,showRemoveButtonAfterComplete:!1,browserBackButtonClose:!1,theme:"light",autoOpenFileEditor:!1,disabled:!1,disableLocalFiles:!1};this.opts={...r,...t},this.i18nInit(),this.superFocus=CD(),this.ifFocusedOnUppyRecently=!1,this.makeDashboardInsidesVisibleAnywayTimeout=null,this.removeDragOverClassTimeout=null}}UD.VERSION="2.4.0",uE.exports=UD;const $D=hf.exports,HD=hv.exports.Uppy,WD=$D.instanceOf(HD).isRequired,VD=$D.arrayOf($D.string),qD=$D.shape({strings:$D.object,pluralize:$D.func}),YD=$D.shape({id:$D.string.isRequired,name:$D.string.isRequired,placeholder:$D.string}),KD=$D.oneOfType([$D.arrayOf(YD),$D.func]),QD=$D.oneOfType([$D.string,$D.number]);var GD={uppy:WD,locale:qD,dashboard:{uppy:WD,inline:$D.bool,plugins:VD,width:QD,height:QD,showProgressDetails:$D.bool,hideUploadButton:$D.bool,hideProgressAfterFinish:$D.bool,note:$D.string,metaFields:KD,proudlyDisplayPoweredByUppy:$D.bool,disableStatusBar:$D.bool,disableInformer:$D.bool,disableThumbnailGenerator:$D.bool,thumbnailWidth:$D.number,locale:qD}};const ZD=["defaultChecked","defaultValue","suppressContentEditableWarning","suppressHydrationWarning","dangerouslySetInnerHTML","accessKey","className","contentEditable","contextMenu","dir","draggable","hidden","id","lang","placeholder","slot","spellCheck","style","tabIndex","title","translate","radioGroup","role","about","datatype","inlist","prefix","property","resource","typeof","vocab","autoCapitalize","autoCorrect","autoSave","color","itemProp","itemScope","itemType","itemID","itemRef","results","security","unselectable","inputMode","is","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],JD=/^(aria-|data-)/;var XD=e=>Object.fromEntries(Object.entries(e).filter((e=>{let[t]=e;return JD.test(t)||ZD.includes(t)})));var eC=function(e,t){return Object.keys(e.props).some((n=>!((e,t)=>Object.prototype.hasOwnProperty.call(e,t))(e.validProps,n)&&e.props[n]!==t[n]))};const tC=t,nC=uE.exports,rC=GD.dashboard,iC=XD,oC=eC,sC=tC.createElement;class aC extends tC.Component{componentDidMount(){this.installPlugin()}componentDidUpdate(e){if(e.uppy!==this.props.uppy)this.uninstallPlugin(e),this.installPlugin();else if(oC(this,e)){const e={...this.props,target:this.container};delete e.uppy,this.plugin.setOptions(e)}}componentWillUnmount(){this.uninstallPlugin()}installPlugin(){const{uppy:e}=this.props,t={id:"react:Dashboard",...this.props,target:this.container};delete t.uppy,e.use(nC,t),this.plugin=e.getPlugin(t.id)}uninstallPlugin(e){void 0===e&&(e=this.props);const{uppy:t}=e;t.removePlugin(this.plugin)}render(){return this.validProps=iC(this.props),sC("div",{className:"uppy-Container",ref:e=>{this.container=e},...this.validProps})}}aC.propTypes=rC,aC.defaultProps={inline:!0};const lC=t,cC=hf.exports,uC=uE.exports,dC=GD.dashboard,pC=XD,hC=eC,fC=lC.createElement;class mC extends lC.Component{componentDidMount(){this.installPlugin()}componentDidUpdate(e){if(e.uppy!==this.props.uppy)this.uninstallPlugin(e),this.installPlugin();else if(hC(this,e)){const e={...this.props,onRequestCloseModal:this.props.onRequestClose};delete e.uppy,this.plugin.setOptions(e)}e.open&&!this.props.open?this.plugin.closeModal():!e.open&&this.props.open&&this.plugin.openModal()}componentWillUnmount(){this.uninstallPlugin()}installPlugin(){const{uppy:e}=this.props,t={id:"react:DashboardModal",...this.props,onRequestCloseModal:this.props.onRequestClose};t.target||(t.target=this.container),delete t.uppy,e.use(uC,t),this.plugin=e.getPlugin(t.id),this.props.open&&this.plugin.openModal()}uninstallPlugin(e){void 0===e&&(e=this.props);const{uppy:t}=e;t.removePlugin(this.plugin)}render(){return this.validProps=pC(this.props),fC("div",{className:"uppy-Container",ref:e=>{this.container=e},...this.validProps})}}mC.propTypes={target:"undefined"!=typeof window?cC.instanceOf(window.HTMLElement):cC.any,open:cC.bool,onRequestClose:cC.func,closeModalOnClickOutside:cC.bool,disablePageScrollWhenModalOpen:cC.bool,...dC};var gC={exports:{}},bC=hv.exports,yC=qx;const vC=pE,wC=bk,xC=HM,EC={strings:{dropHereOr:"Drop here or %{browse}",browse:"browse"}};class MC extends bC.UIPlugin{constructor(e,t){super(e,t),this.handleDrop=async e=>{var t,n;e.preventDefault(),e.stopPropagation(),clearTimeout(this.removeDragOverClassTimeout),this.setPluginState({isDraggingOver:!1});const r=await xC(e.dataTransfer,{logDropError:e=>{this.uppy.log(e,"error")}});r.length>0&&(this.uppy.log("[DragDrop] Files dropped"),this.addFiles(r)),null==(t=(n=this.opts).onDrop)||t.call(n,e)},this.type="acquirer",this.id=this.opts.id||"DragDrop",this.title="Drag & Drop",this.defaultLocale=EC;this.opts={target:null,inputName:"files[]",width:"100%",height:"100%",note:null,...t},this.i18nInit(),this.isDragDropSupported=wC(),this.removeDragOverClassTimeout=null,this.onInputChange=this.onInputChange.bind(this),this.handleDragOver=this.handleDragOver.bind(this),this.handleDragLeave=this.handleDragLeave.bind(this),this.handleDrop=this.handleDrop.bind(this),this.addFiles=this.addFiles.bind(this),this.render=this.render.bind(this)}addFiles(e){const t=e.map((e=>({source:this.id,name:e.name,type:e.type,data:e,meta:{relativePath:e.relativePath||null}})));try{this.uppy.addFiles(t)}catch(e){this.uppy.log(e)}}onInputChange(e){const t=vC(e.target.files);t.length>0&&(this.uppy.log("[DragDrop] Files selected through input"),this.addFiles(t)),e.target.value=null}handleDragOver(e){var t,n;e.preventDefault(),e.stopPropagation();const{types:r}=e.dataTransfer,i=r.some((e=>"Files"===e)),{allowNewUpload:o}=this.uppy.getState();if(!i||!o)return e.dataTransfer.dropEffect="none",void clearTimeout(this.removeDragOverClassTimeout);e.dataTransfer.dropEffect="copy",clearTimeout(this.removeDragOverClassTimeout),this.setPluginState({isDraggingOver:!0}),null==(t=(n=this.opts).onDragOver)||t.call(n,e)}handleDragLeave(e){var t,n;e.preventDefault(),e.stopPropagation(),clearTimeout(this.removeDragOverClassTimeout),this.removeDragOverClassTimeout=setTimeout((()=>{this.setPluginState({isDraggingOver:!1})}),50),null==(t=(n=this.opts).onDragLeave)||t.call(n,e)}renderHiddenFileInput(){const{restrictions:e}=this.uppy.opts;return(0,yC.h)("input",{className:"uppy-DragDrop-input",type:"file",hidden:!0,ref:e=>{this.fileInputRef=e},name:this.opts.inputName,multiple:1!==e.maxNumberOfFiles,accept:e.allowedFileTypes,onChange:this.onInputChange})}static renderArrowSvg(){return(0,yC.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon uppy-DragDrop-arrow",width:"16",height:"16",viewBox:"0 0 16 16"},(0,yC.h)("path",{d:"M11 10V0H5v10H2l6 6 6-6h-3zm0 0",fillRule:"evenodd"}))}renderLabel(){return(0,yC.h)("div",{className:"uppy-DragDrop-label"},this.i18nArray("dropHereOr",{browse:(0,yC.h)("span",{className:"uppy-DragDrop-browse"},this.i18n("browse"))}))}renderNote(){return(0,yC.h)("span",{className:"uppy-DragDrop-note"},this.opts.note)}render(){const e=`uppy-u-reset\n uppy-DragDrop-container\n ${this.isDragDropSupported?"uppy-DragDrop--isDragDropSupported":""}\n ${this.getPluginState().isDraggingOver?"uppy-DragDrop--isDraggingOver":""}\n `,t={width:this.opts.width,height:this.opts.height};return(0,yC.h)("button",{type:"button",className:e,style:t,onClick:()=>this.fileInputRef.click(),onDragOver:this.handleDragOver,onDragLeave:this.handleDragLeave,onDrop:this.handleDrop},this.renderHiddenFileInput(),(0,yC.h)("div",{className:"uppy-DragDrop-inner"},MC.renderArrowSvg(),this.renderLabel(),this.renderNote()))}install(){const{target:e}=this.opts;this.setPluginState({isDraggingOver:!1}),e&&this.mount(e,this)}uninstall(){this.unmount()}}MC.VERSION="2.1.1";const kC=t,_C=gC.exports=MC,DC=GD,CC=XD,OC=eC,NC=kC.createElement;class TC extends kC.Component{componentDidMount(){this.installPlugin()}componentDidUpdate(e){if(e.uppy!==this.props.uppy)this.uninstallPlugin(e),this.installPlugin();else if(OC(this,e)){const e={...this.props,target:this.container};delete e.uppy,this.plugin.setOptions(e)}}componentWillUnmount(){this.uninstallPlugin()}installPlugin(){const{uppy:e}=this.props,t={id:"react:DragDrop",...this.props,target:this.container};delete t.uppy,e.use(_C,t),this.plugin=e.getPlugin(t.id)}uninstallPlugin(e){void 0===e&&(e=this.props);const{uppy:t}=e;t.removePlugin(this.plugin)}render(){return this.validProps=CC(this.props),NC("div",{className:"uppy-Container",ref:e=>{this.container=e},...this.validProps})}}TC.propTypes={uppy:DC.uppy,locale:DC.locale},TC.defaultProps={};var SC=TC,AC={exports:{}},IC=qx,LC=hv.exports;class jC extends LC.UIPlugin{constructor(e,t){super(e,t),this.id=this.opts.id||"ProgressBar",this.title="Progress Bar",this.type="progressindicator";this.opts={target:"body",fixed:!1,hideAfterFinish:!0,...t},this.render=this.render.bind(this)}render(e){const t=e.totalProgress||0,n=(0===t||100===t)&&this.opts.hideAfterFinish;return(0,IC.h)("div",{className:"uppy uppy-ProgressBar",style:{position:this.opts.fixed?"fixed":"initial"},"aria-hidden":n},(0,IC.h)("div",{className:"uppy-ProgressBar-inner",style:{width:`${t}%`}}),(0,IC.h)("div",{className:"uppy-ProgressBar-percentage"},t))}install(){const{target:e}=this.opts;e&&this.mount(e,this)}uninstall(){this.unmount()}}jC.VERSION="2.1.1",AC.exports=jC;const zC=t,FC=hf.exports,PC=AC.exports,RC=GD.uppy,BC=XD,UC=eC,$C=zC.createElement;class HC extends zC.Component{componentDidMount(){this.installPlugin()}componentDidUpdate(e){if(e.uppy!==this.props.uppy)this.uninstallPlugin(e),this.installPlugin();else if(UC(this,e)){const e={...this.props,target:this.container};delete e.uppy,this.plugin.setOptions(e)}}componentWillUnmount(){this.uninstallPlugin()}installPlugin(){const{uppy:e}=this.props,t={id:"react:ProgressBar",...this.props,target:this.container};delete t.uppy,e.use(PC,t),this.plugin=e.getPlugin(t.id)}uninstallPlugin(e){void 0===e&&(e=this.props);const{uppy:t}=e;t.removePlugin(this.plugin)}render(){return this.validProps=BC(this.props),$C("div",{className:"uppy-Container",ref:e=>{this.container=e},...this.validProps})}}HC.propTypes={uppy:RC,fixed:FC.bool,hideAfterFinish:FC.bool},HC.defaultProps={};const WC=t,VC=hf.exports,qC=wE.exports,YC=GD.uppy,KC=XD,QC=eC,GC=WC.createElement;class ZC extends WC.Component{componentDidMount(){this.installPlugin()}componentDidUpdate(e){if(e.uppy!==this.props.uppy)this.uninstallPlugin(e),this.installPlugin();else if(QC(this,e)){const e={...this.props,target:this.container};delete e.uppy,this.plugin.setOptions(e)}}componentWillUnmount(){this.uninstallPlugin()}installPlugin(){const{uppy:e}=this.props,t={id:"react:StatusBar",...this.props,target:this.container};delete t.uppy,e.use(qC,t),this.plugin=e.getPlugin(t.id)}uninstallPlugin(e){void 0===e&&(e=this.props);const{uppy:t}=e;t.removePlugin(this.plugin)}render(){return this.validProps=KC(this.props),GC("div",{className:"uppy-Container",ref:e=>{this.container=e},...this.validProps})}}ZC.propTypes={uppy:YC,hideAfterFinish:VC.bool,showProgressDetails:VC.bool},ZC.defaultProps={};var JC={exports:{}},XC=hv.exports,eO=qx;const tO=pE,nO={strings:{chooseFiles:"Choose files"}};class rO extends XC.UIPlugin{constructor(e,t){super(e,t),this.id=this.opts.id||"FileInput",this.title="File Input",this.type="acquirer",this.defaultLocale=nO;this.opts={target:null,pretty:!0,inputName:"files[]",...t},this.i18nInit(),this.render=this.render.bind(this),this.handleInputChange=this.handleInputChange.bind(this),this.handleClick=this.handleClick.bind(this)}addFiles(e){const t=e.map((e=>({source:this.id,name:e.name,type:e.type,data:e})));try{this.uppy.addFiles(t)}catch(e){this.uppy.log(e)}}handleInputChange(e){this.uppy.log("[FileInput] Something selected through input...");const t=tO(e.target.files);this.addFiles(t),e.target.value=null}handleClick(){this.input.click()}render(){const{restrictions:e}=this.uppy.opts,t=e.allowedFileTypes?e.allowedFileTypes.join(","):null;return(0,eO.h)("div",{className:"uppy-FileInput-container"},(0,eO.h)("input",{className:"uppy-FileInput-input",style:this.opts.pretty&&{width:"0.1px",height:"0.1px",opacity:0,overflow:"hidden",position:"absolute",zIndex:-1},type:"file",name:this.opts.inputName,onChange:this.handleInputChange,multiple:1!==e.maxNumberOfFiles,accept:t,ref:e=>{this.input=e}}),this.opts.pretty&&(0,eO.h)("button",{className:"uppy-FileInput-btn",type:"button",onClick:this.handleClick},this.i18n("chooseFiles")))}install(){const{target:e}=this.opts;e&&this.mount(e,this)}uninstall(){this.unmount()}}rO.VERSION="2.1.1",JC.exports=rO;const iO=hf.exports,oO=t,sO=JC.exports,aO=GD,lO=oO.createElement;class cO extends oO.Component{componentDidMount(){this.installPlugin()}componentDidUpdate(e){e.uppy!==this.props.uppy&&(this.uninstallPlugin(e),this.installPlugin())}componentWillUnmount(){this.uninstallPlugin()}installPlugin(){const{uppy:e}=this.props,t={id:"react:FileInput",...this.props,target:this.container};delete t.uppy,e.use(sO,t),this.plugin=e.getPlugin(t.id)}uninstallPlugin(e){void 0===e&&(e=this.props);const{uppy:t}=e;t.removePlugin(this.plugin)}render(){return lO("div",{className:"uppy-Container",ref:e=>{this.container=e}})}}cO.propTypes={uppy:aO.uppy,locale:aO.locale,pretty:iO.bool,inputName:iO.string},cO.defaultProps={};const{useEffect:uO,useRef:dO}=t,pO=hv.exports.Uppy;var hO=Gy,fO=Fc((function(e,t){return hO({},e,t)})),mO=fO;class gO extends hv.exports.BasePlugin{constructor(e,t){super(e,t),zf(this,"upload",(e=>{if(0===e.length)return Promise.resolve();const t=e.map((e=>this.uploadFile(this.uppy.getFile(e))));return Promise.all(t)})),zf(this,"uploadFile",(e=>new Promise(((t,n)=>{const r=this.createProgressTimeout(this.opts.timeout,(t=>{this.uppy.emit("upload-error",e,t),n(t)})),i={directUploadWillStoreFileWithXHR:null,directUploadDidProgress:null};i.directUploadDidProgress=t=>{r.progress(),t.lengthComputable&&this.uppy.emit("upload-progress",e,{uploader:this,bytesUploaded:t.loaded,bytesTotal:t.total})},i.directUploadWillStoreFileWithXHR=e=>{e.upload.addEventListener("progress",(e=>i.directUploadDidProgress(e)))};const{data:o,meta:s}=e;!o.name&&s.name&&(o.name=s.name);const a=new g(o,this.opts.directUploadUrl,this.opts.token,this.opts.attachmentName,i);a.create(((i,o)=>{if(r.done(),i){const t={status:"error"};return this.uppy.setFileState(e.id,{response:t}),this.uppy.emit("upload-error",e,i),n(i)}const s={status:"success",directUploadSignedId:o.signed_id};return this.uppy.setFileState(e.id,{response:s}),this.uppy.emit("upload-success",e,o),t(e)})),this.uppy.on("file-removed",(t=>{var n;t.id===e.id&&(r.done(),null===(n=a.abort)||void 0===n||n.call(a))})),this.uppy.on("upload-cancel",(t=>{var n;t===e.id&&(r.done(),null===(n=a.abort)||void 0===n||n.call(a))})),this.uppy.on("cancel-all",(()=>{var e;r.done(),null===(e=a.abort)||void 0===e||e.call(a)}))})))),this.type="uploader",this.id=t.id||"ActiveStorageUpload",this.title=t.title||"Active Storage Upload",this.token=t.token||"",this.attachmentName=t.attachmentName||"";const n={timeout:30*1e3,limit:0,directUploadUrl:this.opts.directUploadUrl};this.opts=mO(n,t)}install(){this.uppy.addUploader(this.upload)}uninstall(){this.uppy.removeUploader(this.upload)}createProgressTimeout(e,t){let n=null,r=!1;return{progress:()=>{r||(n&&clearTimeout(n),n=setTimeout((()=>t("Request timed out.")),e))},done:()=>{n&&(clearTimeout(n),n=null),r=!0}}}}const bO=e=>{var n;let{uppy:r}=e;const[s,a]=i(0);o((()=>{r.on("progress",a)}),[r]);const l="".concat(s,"%");return t.createElement("div",{className:"neeto-editor-image-uploader__progress"},t.createElement("p",{className:"neeto-editor-image-uploader__progress-title"},"Uploading..."),t.createElement("p",{className:"neeto-editor-image-uploader__progress-file"},null===(n=r.getFiles()[0])||void 0===n?void 0:n.name),t.createElement("div",{className:"neeto-editor-progress-bar__wrapper","data-cy":"neeto-editor-image-upload-progress-bar"},t.createElement("div",{className:"neeto-editor-progress-bar__percent"},t.createElement("p",null,l),t.createElement(ed,{icon:Ep,onClick:()=>r.cancelAll(),size:"small",style:"text"})),t.createElement("div",{className:"neeto-editor-progress-bar__indicator"},t.createElement("div",{style:{width:l},className:"neeto-editor-progress-bar__indicator-inner"}))))},yO=e=>{const t=["B","KB","MB","GB"];let n=0;for(;e>=1024&&n<t.length;)e/=1024,++n;return"".concat(e.toFixed(1)," ").concat(t[n])},vO=e=>{let{endpoint:n,onSuccess:r,uploadConfig:o}=e;const[s,a]=i(!1),[l,c]=i(""),u={...uv,...o},d=function(e){if("function"!=typeof e)throw new TypeError("useUppy: expected a function that returns a new Uppy instance");const t=dO(void 0);if(void 0===t.current&&(t.current=e(),!(t.current instanceof pO)))throw new TypeError(`useUppy: factory function must return an Uppy instance, got ${typeof t.current}`);return uO((()=>()=>{t.current.close({reason:"unmount"}),t.current=void 0}),[t]),t.current}((()=>new cE({...u,onBeforeFileAdded:e=>{const{maxFileSize:t,allowedFileTypes:n}=u.restrictions;return e.size>t?(c("File size is too large. Max size is ".concat(yO(u.restrictions.maxFileSize),".")),!1):!!n.includes(".".concat(e.extension))||(c("File type is not permitted. Allowed file types are: ".concat(n.join(", "),".")),!1)}}).use(gO,{directUploadUrl:n,...dv}).on("upload",(()=>a(!0))).on("upload-success",((e,t)=>{let{blob_url:n}=t;return r(n)})).on("cancel-all",(()=>a(!1))).on("complete",(()=>a(!1)))));return s?t.createElement(bO,{uppy:d}):t.createElement("div",{className:"neeto-editor-image-uploader__dnd-wrapper"},t.createElement(SC,{className:"neeto-editor-image-uploader__dnd",note:"Max. File Size: ".concat(yO(u.restrictions.maxFileSize)),locale:{strings:{dropHereOr:"Drop your file(s) here or %{browse}",browse:"Browse"}},uppy:d,"data-cy":"neeto-editor-image-local-uploader"}),l&&t.createElement("p",{className:"neeto-editor-image-uploader__dnd--error"},l))},wO=()=>t.createElement("div",{className:"neeto-editor-loader"},t.createElement("span",{className:"neeto-editor-loader__spinner-icon"}));var xO={},EO=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},MO=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object.create(null);function n(e,n){return t[e]=t[e]||[],t[e].push(n),this}function r(e,t){return t._once=!0,n(e,t),this}function i(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n?t[e].splice(t[e].indexOf(n),1):delete t[e],this}function o(e){for(var n=this,r=arguments.length,o=Array(r>1?r-1:0),s=1;s<r;s++)o[s-1]=arguments[s];var a=t[e]&&t[e].slice();return a&&a.forEach((function(t){t._once&&i(e,t),t.apply(n,o)})),this}return EO({},e,{on:n,once:r,off:i,emit:o})},kO=Object.freeze({__proto__:null,default:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=void 0,n=void 0,r=void 0,i=void 0,o=void 0,s=void 0,a=void 0,l=void 0,c=void 0,u=void 0,d=void 0,p=void 0,h=void 0,f=0===e.packed.indexOf("data-")?e.packed:"data-"+e.packed,m=e.sizes.slice().reverse(),g=!1!==e.position,b=e.container.nodeType?e.container:document.querySelector(e.container),y={all:function(){return M(b.children)},new:function(){return M(b.children).filter((function(e){return!e.hasAttribute(""+f)}))}},v=[D,C,O],w=[N,T,S,A],x=MO({pack:j,update:z,resize:F});return x;function E(e){e.forEach((function(e){return e()}))}function M(e){return Array.prototype.slice.call(e)}function k(e){return Array.apply(null,Array(e)).map((function(){return 0}))}function _(){return m.map((function(e){return e.mq&&window.matchMedia("(min-width: "+e.mq+")").matches})).indexOf(!0)}function D(){r=_()}function C(){i=-1===r?m[m.length-1]:m[r]}function O(){s=k(i.columns)}function N(){d=y[t?"new":"all"]()}function T(){0!==d.length&&(p=d.map((function(e){return e.clientWidth})),h=d.map((function(e){return e.clientHeight})))}function S(){d.forEach((function(e,t){o=s.indexOf(Math.min.apply(Math,s)),e.style.position="absolute",a=s[o]+"px",l=o*p[t]+o*i.gutter+"px",g?(e.style.top=a,e.style.left=l):e.style.transform="translate3d("+l+", "+a+", 0)",e.setAttribute(f,""),c=p[t],u=h[t],c&&u&&(s[o]+=u+i.gutter)}))}function A(){b.style.position="relative",b.style.width=i.columns*c+(i.columns-1)*i.gutter+"px",b.style.height=Math.max.apply(Math,s)-i.gutter+"px"}function I(){n||(window.requestAnimationFrame(L),n=!0)}function L(){r!==_()&&(j(),x.emit("resize",i)),n=!1}function j(){return t=!1,E(v.concat(w)),x.emit("pack")}function z(){return t=!0,E(w),x.emit("update")}function F(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=e?"addEventListener":"removeEventListener";return window[t]("resize",I),x}}}),_O=Oc(kO),DO={exports:{}},CO={exports:{}};!function(e,n){Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=t,o=a(i),s=a(hf.exports);function a(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.scrollListener=n.scrollListener.bind(n),n.eventListenerOptions=n.eventListenerOptions.bind(n),n.mousewheelListener=n.mousewheelListener.bind(n),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"componentDidMount",value:function(){this.pageLoaded=this.props.pageStart,this.options=this.eventListenerOptions(),this.attachScrollListener()}},{key:"componentDidUpdate",value:function(){if(this.props.isReverse&&this.loadMore){var e=this.getParentElement(this.scrollComponent);e.scrollTop=e.scrollHeight-this.beforeScrollHeight+this.beforeScrollTop,this.loadMore=!1}this.attachScrollListener()}},{key:"componentWillUnmount",value:function(){this.detachScrollListener(),this.detachMousewheelListener()}},{key:"isPassiveSupported",value:function(){var e=!1,t={get passive(){e=!0}};try{document.addEventListener("test",null,t),document.removeEventListener("test",null,t)}catch(e){}return e}},{key:"eventListenerOptions",value:function(){this.props.useCapture;return this.isPassiveSupported()?{useCapture:this.props.useCapture,passive:!0}:{passive:!1}}},{key:"setDefaultLoader",value:function(e){this.defaultLoader=e}},{key:"detachMousewheelListener",value:function(){var e=window;!1===this.props.useWindow&&(e=this.scrollComponent.parentNode),e.removeEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture)}},{key:"detachScrollListener",value:function(){var e=window;!1===this.props.useWindow&&(e=this.getParentElement(this.scrollComponent)),e.removeEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),e.removeEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture)}},{key:"getParentElement",value:function(e){var t=this.props.getScrollParent&&this.props.getScrollParent();return null!=t?t:e&&e.parentNode}},{key:"filterProps",value:function(e){return e}},{key:"attachScrollListener",value:function(){var e=this.getParentElement(this.scrollComponent);if(this.props.hasMore&&e){var t=window;!1===this.props.useWindow&&(t=e),t.addEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture),t.addEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),t.addEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture),this.props.initialLoad&&this.scrollListener()}}},{key:"mousewheelListener",value:function(e){1!==e.deltaY||this.isPassiveSupported()||e.preventDefault()}},{key:"scrollListener",value:function(){var e=this.scrollComponent,t=window,n=this.getParentElement(e),r=void 0;if(this.props.useWindow){var i=document.documentElement||document.body.parentNode||document.body,o=void 0!==t.pageYOffset?t.pageYOffset:i.scrollTop;r=this.props.isReverse?o:this.calculateOffset(e,o)}else r=this.props.isReverse?n.scrollTop:e.scrollHeight-n.scrollTop-n.clientHeight;r<Number(this.props.threshold)&&e&&null!==e.offsetParent&&(this.detachScrollListener(),this.beforeScrollHeight=n.scrollHeight,this.beforeScrollTop=n.scrollTop,"function"==typeof this.props.loadMore&&(this.props.loadMore(this.pageLoaded+=1),this.loadMore=!0))}},{key:"calculateOffset",value:function(e,t){return e?this.calculateTopPosition(e)+(e.offsetHeight-t-window.innerHeight):0}},{key:"calculateTopPosition",value:function(e){return e?e.offsetTop+this.calculateTopPosition(e.offsetParent):0}},{key:"render",value:function(){var e=this,t=this.filterProps(this.props),n=t.children,r=t.element,i=t.hasMore;t.initialLoad;var s=t.isReverse,a=t.loader;t.loadMore,t.pageStart;var l=t.ref;t.threshold,t.useCapture,t.useWindow,t.getScrollParent;var c=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(t,["children","element","hasMore","initialLoad","isReverse","loader","loadMore","pageStart","ref","threshold","useCapture","useWindow","getScrollParent"]);c.ref=function(t){e.scrollComponent=t,l&&l(t)};var u=[n];return i&&(a?s?u.unshift(a):u.push(a):this.defaultLoader&&(s?u.unshift(this.defaultLoader):u.push(this.defaultLoader))),o.default.createElement(r,c,u)}}]),t}(i.Component);l.propTypes={children:s.default.node.isRequired,element:s.default.node,hasMore:s.default.bool,initialLoad:s.default.bool,isReverse:s.default.bool,loader:s.default.node,loadMore:s.default.func.isRequired,pageStart:s.default.number,ref:s.default.func,getScrollParent:s.default.func,threshold:s.default.number,useCapture:s.default.bool,useWindow:s.default.bool},l.defaultProps={element:"div",hasMore:!1,initialLoad:!0,pageStart:0,ref:null,threshold:250,useWindow:!0,isReverse:!1,useCapture:!1,loader:null,getScrollParent:null},n.default=l,e.exports=n["default"]}(CO,CO.exports),DO.exports=CO.exports,Object.defineProperty(xO,"__esModule",{value:!0});var OO,NO,TO=xO.default=void 0,SO=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),AO=t,IO=FO(AO),LO=FO(hf.exports),jO=FO(_O),zO=FO(DO.exports);function FO(e){return e&&e.__esModule?e:{default:e}}function PO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function RO(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var BO=(NO=OO=function(e){function t(){var e,n,r;PO(this,t);for(var i=arguments.length,o=Array(i),s=0;s<i;s++)o[s]=arguments[s];return n=r=RO(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(o))),r.setContainerRef=function(e){r.masonryContainer=e},r.forcePack=function(){r.masonryContainer&&r.state.instance.pack()},r.forceUpdate=function(){r.masonryContainer&&r.state.instance.update()},r.createNewInstance=function(){var e=r.props,t=e.packed,n=e.sizes,i=e.children,o=e.position,s=(0,jO.default)({container:r.masonryContainer,packed:t,sizes:n,position:o});s.resize(!0),i.length>0&&s.pack(),r.setState((function(){return{instance:s}}))},RO(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,AO.Component),SO(t,[{key:"componentDidMount",value:function(){this.createNewInstance()}},{key:"componentDidUpdate",value:function(e){var t=this.props.children,n=this.state.instance;if(0!==e.children.length||0!==t.length)return 0===e.children.length&&t.length>0?n.pack():e.children.length!==t.length?this.props.pack?n.pack():n.update():void 0}},{key:"componentWillUnmount",value:function(){this.state&&this.state.instance.resize(!1)}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.style;e.pack,e.packed,e.position,e.sizes;var i=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["children","className","style","pack","packed","position","sizes"]);return IO.default.createElement(zO.default,i,IO.default.createElement("div",{ref:this.setContainerRef,className:n,style:r},t))}}]),t}(),OO.propTypes={children:LO.default.arrayOf(LO.default.element).isRequired,className:LO.default.string,initialLoad:LO.default.bool,pack:LO.default.bool,packed:LO.default.string,position:LO.default.bool,sizes:LO.default.array,style:LO.default.object},OO.defaultProps={className:"",initialLoad:!0,pack:!1,packed:"data-packed",position:!0,sizes:[{columns:1,gutter:20},{mq:"768px",columns:2,gutter:20},{mq:"1024px",columns:3,gutter:20}],style:{}},NO);TO=xO.default=BO;const UO=e=>{let{onSubmit:n,unsplashApiKey:r}=e;const s=c(null),[a,l]=i(""),[u,d]=i(!1),[p,h]=i([]),[f,m]=i(1),[g,b]=i(!0),[y,v]=i(!1),w=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:800;const[n,r]=i(e);return o((()=>{const n=setTimeout((()=>{r(e)}),t);return()=>{clearTimeout(n)}}),[e]),n}(a||"latest");o((()=>{x(1)}),[w]);const x=async e=>{try{v(!0),d(!1);const t=await(e=>{let{pageNo:t,query:n,apiKey:r}=e;return Hg.get(D,{headers:{Authorization:"Client-ID ".concat(r)},params:{page:t,per_page:30,order_by:"popular",query:n}})})({page:e,query:w,apiKey:r}),{data:{results:n,total_pages:i}}=t;h(1===e?n:[...p,...n]),m(e+1),b(e<i)}catch(e){d(!0)}finally{v(!1)}};return t.createElement("div",{className:"neeto-editor-unsplash-wrapper"},t.createElement(Xh,{autoFocus:!0,name:"text",value:a,placeholder:"Search Unsplash",onChange:e=>{let{target:{value:t}}=e;l(t)},"data-cy":"neeto-editor-unsplash-image-picker-search-input"}),u&&t.createElement("p",{className:"neeto-editor-unsplash-gallery__text","data-cy":"neeto-editor-unsplash-image-picker-error"},"Something went wrong! Please try again later."),!u&&!y&&Iu(p)&&t.createElement("p",{className:"neeto-editor-unsplash-gallery__text","data-cy":"neeto-editor-unsplash-image-picker-no-results-error"},"No results"),!u&&t.createElement("div",{className:"neeto-editor-unsplash-container"},t.createElement(TO,{ref:s,pack:!0,style:{width:"100%"},sizes:[{columns:3,gutter:0},{mq:"768px",columns:3,gutter:0},{mq:"1024px",columns:3,gutter:0}],hasMore:g,loadMore:()=>{!y&&g&&f>1&&x(f)},position:!0,useWindow:!1,className:"neeto-editor-unsplash-gallery",loader:t.createElement(wO,{key:0})},p&&p.map(((e,r)=>t.createElement("div",{key:r,className:"neeto-editor-unsplash-gallery__item","data-cy":"neeto-editor-unsplash-image-picker-result-".concat(r)},t.createElement("div",{className:"neeto-editor-unsplash-gallery__item-placeholder",style:{paddingBottom:"".concat(e.height/e.width*100,"%")}},t.createElement("div",{className:"neeto-editor-unsplash-gallery__item-inner",id:"unsplashImage".concat(r)},t.createElement("img",{src:e.urls.regular,onClick:()=>n(e.urls.small)}),t.createElement("a",{href:"https://unsplash.com/@".concat(e.user.username),target:"_blank",rel:"noreferrer"},e.user.name," "))))))),!g&&t.createElement("p",{className:"neeto-editor-unsplash-gallery__text"},"End of results")))},$O=e=>{let{buttonLabel:n="Submit",placeholder:r,onSubmit:o,className:s}=e;const[a,l]=i(""),[c,u]=i("");return t.createElement("div",{className:Sc("neeto-editor-url-form__wrapper",{[s]:s})},t.createElement(Xh,{autoFocus:!0,name:"url",value:a,placeholder:r,onFocus:()=>u(""),error:c,onChange:e=>{let{target:{value:t}}=e;return l(t)},"data-cy":"neeto-editor-image-upload-url-input"}),t.createElement(ed,{size:"large",label:n,onClick:e=>{e.preventDefault(),sf.test(a)?o(a):u("Please enter a valid url")},disabled:!a,"data-cy":"neeto-editor-image-upload-url-submit"}))},HO=e=>{let{editor:n,imageUploadUrl:r,uploadConfig:o,isVisible:s,setIsVisible:a,unsplashApiKey:l,isUnsplashImageUploadActive:c}=e;const[u,d]=(e=>{var t;const[n,r]=i(null===(t=e[0])||void 0===t?void 0:t.key);return[n,e=>r(e.key)]})(pv),[p,h]=i(""),f=e=>{h(e)},m={local:()=>t.createElement(vO,{endpoint:r,onSuccess:f,uploadConfig:o}),link:()=>t.createElement($O,{onSubmit:f,buttonLabel:"Upload Image",placeholder:"Paste the image link"}),unsplash:()=>t.createElement(UO,{unsplashApiKey:l,onSubmit:f})}[u];return t.createElement(Zh,{isOpen:s,onClose:()=>{a(!1),d(pv[0])},closeButton:!1},t.createElement("div",{className:"neeto-editor-image-uploader"},t.createElement(cv,null,pv.filter((e=>"unsplash"!==e.key||c)).map((e=>t.createElement(cv.Item,{key:e.key,active:u===e.key,onClick:()=>d(e)},e.title)))),t.createElement("div",{className:"neeto-editor-image-uploader__content"},p?t.createElement(ef,{url:p,editor:n,onClose:()=>{h(null),a(!1)}}):t.createElement(m,null))))},WO=is.create({name:"characterCount",addOptions:()=>({limit:null,mode:"textSize"}),addStorage:()=>({characters:()=>0,words:()=>0}),onBeforeCreate(){this.storage.characters=e=>{const t=(null==e?void 0:e.node)||this.editor.state.doc;if("textSize"===((null==e?void 0:e.mode)||this.options.mode)){return t.textBetween(0,t.content.size,void 0," ").length}return t.nodeSize},this.storage.words=e=>{const t=(null==e?void 0:e.node)||this.editor.state.doc;return t.textBetween(0,t.content.size," "," ").split(" ").filter((e=>""!==e)).length}},addProseMirrorPlugins(){return[new Qt({key:new Jt("characterCount"),filterTransaction:(e,t)=>{const n=this.options.limit;if(!e.docChanged||0===n||null==n)return!0;const r=this.storage.characters({node:t.doc}),i=this.storage.characters({node:e.doc});if(i<=n)return!0;if(r>n&&i>n&&i<=r)return!0;if(r>n&&i>n&&i>r)return!1;if(!e.getMeta("paste"))return!1;const o=e.selection.$head.pos,s=o-(i-n),a=o;e.deleteRange(s,a);return!(this.storage.characters({node:e.doc})>n)}})]}}),VO=/(?:^|\s)((?:`)((?:[^`]+))(?:`))$/,qO=/(?:^|\s)((?:`)((?:[^`]+))(?:`))/g,YO=Zs.create({name:"code",addOptions:()=>({HTMLAttributes:{}}),excludes:"_",code:!0,exitable:!0,parseHTML:()=>[{tag:"code"}],renderHTML({HTMLAttributes:e}){return["code",Bo(this.options.HTMLAttributes,e),0]},addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[qs({find:VO,type:this.type})]},addPasteRules(){return[Xs({find:qO,type:this.type})]}}),KO=is.create({name:"focus",addOptions:()=>({className:"has-focus",mode:"all"}),addProseMirrorPlugins(){return[new Qt({key:new Jt("focus"),props:{decorations:({doc:e,selection:t})=>{const{isEditable:n,isFocused:r}=this.editor,{anchor:i}=t,o=[];if(!n||!r)return zi.create(e,[]);let s=0;"deepest"===this.options.mode&&e.descendants(((e,t)=>{if(e.isText)return;if(!(i>=t&&i<=t+e.nodeSize-1))return!1;s+=1}));let a=0;return e.descendants(((e,t)=>{if(e.isText)return!1;if(!(i>=t&&i<=t+e.nodeSize-1))return!1;a+=1;if("deepest"===this.options.mode&&s-a>0||"shallowest"===this.options.mode&&a>1)return"deepest"===this.options.mode;o.push(Ii.node(t,t+e.nodeSize,{class:this.options.className}))})),zi.create(e,o)}}})]}}),QO=/(?:^|\s)((?:==)((?:[^~=]+))(?:==))$/,GO=/(?:^|\s)((?:==)((?:[^~=]+))(?:==))/g,ZO=Zs.create({name:"highlight",addOptions:()=>({multicolor:!1,HTMLAttributes:{}}),addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:e=>e.getAttribute("data-color")||e.style.backgroundColor,renderHTML:e=>e.color?{"data-color":e.color,style:`background-color: ${e.color}`}:{}}}:{}},parseHTML:()=>[{tag:"mark"}],renderHTML({HTMLAttributes:e}){return["mark",Bo(this.options.HTMLAttributes,e),0]},addCommands(){return{setHighlight:e=>({commands:t})=>t.setMark(this.name,e),toggleHighlight:e=>({commands:t})=>t.toggleMark(this.name,e),unsetHighlight:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[qs({find:QO,type:this.type})]},addPasteRules(){return[Xs({find:GO,type:this.type})]}});function JO(e){this.j={},this.jr=[],this.jd=null,this.t=e}JO.prototype={accepts:function(){return!!this.t},tt:function(e,t){if(t&&t.j)return this.j[e]=t,t;var n=t,r=this.j[e];if(r)return n&&(r.t=n),r;r=XO();var i=rN(this,e);return i?(Object.assign(r.j,i.j),r.jr.append(i.jr),r.jr=i.jd,r.t=n||i.t):r.t=n,this.j[e]=r,r}};var XO=function(){return new JO},eN=function(e){return new JO(e)},tN=function(e,t,n){e.j[t]||(e.j[t]=n)},nN=function(e,t,n){e.jr.push([t,n])},rN=function(e,t){var n=e.j[t];if(n)return n;for(var r=0;r<e.jr.length;r++){var i=e.jr[r][0],o=e.jr[r][1];if(i.test(t))return o}return e.jd},iN=function(e,t,n){for(var r=0;r<t.length;r++)tN(e,t[r],n)},oN=function(e,t){for(var n=0;n<t.length;n++){var r=t[n][0],i=t[n][1];tN(e,r,i)}},sN=function(e,t,n,r){for(var i,o=0,s=t.length;o<s&&(i=e.j[t[o]]);)e=i,o++;if(o>=s)return[];for(;o<s-1;)i=r(),tN(e,t[o],i),e=i,o++;tN(e,t[s-1],n)},aN="DOMAIN",lN="LOCALHOST",cN="TLD",uN="NUM",dN="PROTOCOL",pN="MAILTO",hN="WS",fN="NL",mN="OPENBRACE",gN="OPENBRACKET",bN="OPENANGLEBRACKET",yN="OPENPAREN",vN="CLOSEBRACE",wN="CLOSEBRACKET",xN="CLOSEANGLEBRACKET",EN="CLOSEPAREN",MN="AMPERSAND",kN="APOSTROPHE",_N="ASTERISK",DN="AT",CN="BACKSLASH",ON="BACKTICK",NN="CARET",TN="COLON",SN="COMMA",AN="DOLLAR",IN="DOT",LN="EQUALS",jN="EXCLAMATION",zN="HYPHEN",FN="PERCENT",PN="PIPE",RN="PLUS",BN="POUND",UN="QUERY",$N="QUOTE",HN="SEMI",WN="SLASH",VN="TILDE",qN="UNDERSCORE",YN="SYM",KN=Object.freeze({__proto__:null,DOMAIN:aN,LOCALHOST:lN,TLD:cN,NUM:uN,PROTOCOL:dN,MAILTO:pN,WS:hN,NL:fN,OPENBRACE:mN,OPENBRACKET:gN,OPENANGLEBRACKET:bN,OPENPAREN:yN,CLOSEBRACE:vN,CLOSEBRACKET:wN,CLOSEANGLEBRACKET:xN,CLOSEPAREN:EN,AMPERSAND:MN,APOSTROPHE:kN,ASTERISK:_N,AT:DN,BACKSLASH:CN,BACKTICK:ON,CARET:NN,COLON:TN,COMMA:SN,DOLLAR:AN,DOT:IN,EQUALS:LN,EXCLAMATION:jN,HYPHEN:zN,PERCENT:FN,PIPE:PN,PLUS:RN,POUND:BN,QUERY:UN,QUOTE:$N,SEMI:HN,SLASH:WN,TILDE:VN,UNDERSCORE:qN,SYM:YN}),QN="aaa aarp abarth abb abbott abbvie abc able abogado abudhabi ac academy accenture accountant accountants aco actor ad adac ads adult ae aeg aero aetna af afamilycompany afl africa ag agakhan agency ai aig airbus airforce airtel akdn al alfaromeo alibaba alipay allfinanz allstate ally alsace alstom am amazon americanexpress americanfamily amex amfam amica amsterdam analytics android anquan anz ao aol apartments app apple aq aquarelle ar arab aramco archi army arpa art arte as asda asia associates at athleta attorney au auction audi audible audio auspost author auto autos avianca aw aws ax axa az azure ba baby baidu banamex bananarepublic band bank bar barcelona barclaycard barclays barefoot bargains baseball basketball bauhaus bayern bb bbc bbt bbva bcg bcn bd be beats beauty beer bentley berlin best bestbuy bet bf bg bh bharti bi bible bid bike bing bingo bio biz bj black blackfriday blockbuster blog bloomberg blue bm bms bmw bn bnpparibas bo boats boehringer bofa bom bond boo book booking bosch bostik boston bot boutique box br bradesco bridgestone broadway broker brother brussels bs bt budapest bugatti build builders business buy buzz bv bw by bz bzh ca cab cafe cal call calvinklein cam camera camp cancerresearch canon capetown capital capitalone car caravan cards care career careers cars casa case cash casino cat catering catholic cba cbn cbre cbs cc cd center ceo cern cf cfa cfd cg ch chanel channel charity chase chat cheap chintai christmas chrome church ci cipriani circle cisco citadel citi citic city cityeats ck cl claims cleaning click clinic clinique clothing cloud club clubmed cm cn co coach codes coffee college cologne com comcast commbank community company compare computer comsec condos construction consulting contact contractors cooking cookingchannel cool coop corsica country coupon coupons courses cpa cr credit creditcard creditunion cricket crown crs cruise cruises csc cu cuisinella cv cw cx cy cymru cyou cz dabur dad dance data date dating datsun day dclk dds de deal dealer deals degree delivery dell deloitte delta democrat dental dentist desi design dev dhl diamonds diet digital direct directory discount discover dish diy dj dk dm dnp do docs doctor dog domains dot download drive dtv dubai duck dunlop dupont durban dvag dvr dz earth eat ec eco edeka edu education ee eg email emerck energy engineer engineering enterprises epson equipment er ericsson erni es esq estate et etisalat eu eurovision eus events exchange expert exposed express extraspace fage fail fairwinds faith family fan fans farm farmers fashion fast fedex feedback ferrari ferrero fi fiat fidelity fido film final finance financial fire firestone firmdale fish fishing fit fitness fj fk flickr flights flir florist flowers fly fm fo foo food foodnetwork football ford forex forsale forum foundation fox fr free fresenius frl frogans frontdoor frontier ftr fujitsu fujixerox fun fund furniture futbol fyi ga gal gallery gallo gallup game games gap garden gay gb gbiz gd gdn ge gea gent genting george gf gg ggee gh gi gift gifts gives giving gl glade glass gle global globo gm gmail gmbh gmo gmx gn godaddy gold goldpoint golf goo goodyear goog google gop got gov gp gq gr grainger graphics gratis green gripe grocery group gs gt gu guardian gucci guge guide guitars guru gw gy hair hamburg hangout haus hbo hdfc hdfcbank health healthcare help helsinki here hermes hgtv hiphop hisamitsu hitachi hiv hk hkt hm hn hockey holdings holiday homedepot homegoods homes homesense honda horse hospital host hosting hot hoteles hotels hotmail house how hr hsbc ht hu hughes hyatt hyundai ibm icbc ice icu id ie ieee ifm ikano il im imamat imdb immo immobilien in inc industries infiniti info ing ink institute insurance insure int international intuit investments io ipiranga iq ir irish is ismaili ist istanbul it itau itv iveco jaguar java jcb je jeep jetzt jewelry jio jll jm jmp jnj jo jobs joburg jot joy jp jpmorgan jprs juegos juniper kaufen kddi ke kerryhotels kerrylogistics kerryproperties kfh kg kh ki kia kim kinder kindle kitchen kiwi km kn koeln komatsu kosher kp kpmg kpn kr krd kred kuokgroup kw ky kyoto kz la lacaixa lamborghini lamer lancaster lancia land landrover lanxess lasalle lat latino latrobe law lawyer lb lc lds lease leclerc lefrak legal lego lexus lgbt li lidl life lifeinsurance lifestyle lighting like lilly limited limo lincoln linde link lipsy live living lixil lk llc llp loan loans locker locus loft lol london lotte lotto love lpl lplfinancial lr ls lt ltd ltda lu lundbeck luxe luxury lv ly ma macys madrid maif maison makeup man management mango map market marketing markets marriott marshalls maserati mattel mba mc mckinsey md me med media meet melbourne meme memorial men menu merckmsd mg mh miami microsoft mil mini mint mit mitsubishi mk ml mlb mls mm mma mn mo mobi mobile moda moe moi mom monash money monster mormon mortgage moscow moto motorcycles mov movie mp mq mr ms msd mt mtn mtr mu museum mutual mv mw mx my mz na nab nagoya name nationwide natura navy nba nc ne nec net netbank netflix network neustar new news next nextdirect nexus nf nfl ng ngo nhk ni nico nike nikon ninja nissan nissay nl no nokia northwesternmutual norton now nowruz nowtv np nr nra nrw ntt nu nyc nz obi observer off office okinawa olayan olayangroup oldnavy ollo om omega one ong onl online onyourside ooo open oracle orange org organic origins osaka otsuka ott ovh pa page panasonic paris pars partners parts party passagens pay pccw pe pet pf pfizer pg ph pharmacy phd philips phone photo photography photos physio pics pictet pictures pid pin ping pink pioneer pizza pk pl place play playstation plumbing plus pm pn pnc pohl poker politie porn post pr pramerica praxi press prime pro prod productions prof progressive promo properties property protection pru prudential ps pt pub pw pwc py qa qpon quebec quest qvc racing radio raid re read realestate realtor realty recipes red redstone redumbrella rehab reise reisen reit reliance ren rent rentals repair report republican rest restaurant review reviews rexroth rich richardli ricoh ril rio rip rmit ro rocher rocks rodeo rogers room rs rsvp ru rugby ruhr run rw rwe ryukyu sa saarland safe safety sakura sale salon samsclub samsung sandvik sandvikcoromant sanofi sap sarl sas save saxo sb sbi sbs sc sca scb schaeffler schmidt scholarships school schule schwarz science scjohnson scot sd se search seat secure security seek select sener services ses seven sew sex sexy sfr sg sh shangrila sharp shaw shell shia shiksha shoes shop shopping shouji show showtime si silk sina singles site sj sk ski skin sky skype sl sling sm smart smile sn sncf so soccer social softbank software sohu solar solutions song sony soy spa space sport spot spreadbetting sr srl ss st stada staples star statebank statefarm stc stcgroup stockholm storage store stream studio study style su sucks supplies supply support surf surgery suzuki sv swatch swiftcover swiss sx sy sydney systems sz tab taipei talk taobao target tatamotors tatar tattoo tax taxi tc tci td tdk team tech technology tel temasek tennis teva tf tg th thd theater theatre tiaa tickets tienda tiffany tips tires tirol tj tjmaxx tjx tk tkmaxx tl tm tmall tn to today tokyo tools top toray toshiba total tours town toyota toys tr trade trading training travel travelchannel travelers travelersinsurance trust trv tt tube tui tunes tushu tv tvs tw tz ua ubank ubs ug uk unicom university uno uol ups us uy uz va vacations vana vanguard vc ve vegas ventures verisign versicherung vet vg vi viajes video vig viking villas vin vip virgin visa vision viva vivo vlaanderen vn vodka volkswagen volvo vote voting voto voyage vu vuelos wales walmart walter wang wanggou watch watches weather weatherchannel webcam weber website wed wedding weibo weir wf whoswho wien wiki williamhill win windows wine winners wme wolterskluwer woodside work works world wow ws wtc wtf xbox xerox xfinity xihuan xin xxx xyz yachts yahoo yamaxun yandex ye yodobashi yoga yokohama you youtube yt yun za zappos zara zero zip zm zone zuerich zw vermögensberater-ctb vermögensberatung-pwb ελ ευ бг бел дети ею католик ком қаз мкд мон москва онлайн орг рус рф сайт срб укр გე հայ ישראל קום ابوظبي اتصالات ارامكو الاردن البحرين الجزائر السعودية العليان المغرب امارات ایران بارت بازار بھارت بيتك پاکستان ڀارت تونس سودان سورية شبكة عراق عرب عمان فلسطين قطر كاثوليك كوم مصر مليسيا موريتانيا موقع همراه कॉम नेट भारत भारतम् भारोत संगठन বাংলা ভারত ভাৰত ਭਾਰਤ ભારત ଭାରତ இந்தியா இலங்கை சிங்கப்பூர் భారత్ ಭಾರತ ഭാരതം ලංකා คอม ไทย ລາວ 닷넷 닷컴 삼성 한국 アマゾン グーグル クラウド コム ストア セール ファッション ポイント みんな 世界 中信 中国 中國 中文网 亚马逊 企业 佛山 信息 健康 八卦 公司 公益 台湾 台灣 商城 商店 商标 嘉里 嘉里大酒店 在线 大众汽车 大拿 天主教 娱乐 家電 广东 微博 慈善 我爱你 手机 招聘 政务 政府 新加坡 新闻 时尚 書籍 机构 淡马锡 游戏 澳門 点看 移动 组织机构 网址 网店 网站 网络 联通 诺基亚 谷歌 购物 通販 集团 電訊盈科 飞利浦 食品 餐厅 香格里拉 香港".split(" "),GN=/(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/,ZN=/(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEDD-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDDFF\uDE70-\uDE74\uDE78-\uDE7C\uDE80-\uDE86\uDE90-\uDEAC\uDEB0-\uDEBA\uDEC0-\uDEC5\uDED0-\uDED9\uDEE0-\uDEE7\uDEF0-\uDEF6])/,JN=/\uFE0F/,XN=/\d/,eT=/\s/;function tT(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=XO(),n=eN(uN),r=eN(aN),i=XO(),o=eN(hN),s=[[XN,r],[GN,r],[ZN,r],[JN,r]],a=function(){var e=eN(aN);return e.j={"-":i},e.jr=[].concat(s),e},l=function(e){var t=a();return t.t=e,t};oN(t,[["'",eN(kN)],["{",eN(mN)],["[",eN(gN)],["<",eN(bN)],["(",eN(yN)],["}",eN(vN)],["]",eN(wN)],[">",eN(xN)],[")",eN(EN)],["&",eN(MN)],["*",eN(_N)],["@",eN(DN)],["`",eN(ON)],["^",eN(NN)],[":",eN(TN)],[",",eN(SN)],["$",eN(AN)],[".",eN(IN)],["=",eN(LN)],["!",eN(jN)],["-",eN(zN)],["%",eN(FN)],["|",eN(PN)],["+",eN(RN)],["#",eN(BN)],["?",eN(UN)],['"',eN($N)],["/",eN(WN)],[";",eN(HN)],["~",eN(VN)],["_",eN(qN)],["\\",eN(CN)]]),tN(t,"\n",eN(fN)),nN(t,eT,o),tN(o,"\n",XO()),nN(o,eT,o);for(var c=0;c<QN.length;c++)sN(t,QN[c],l(cN),a);var u=a(),d=a(),p=a(),h=a();sN(t,"file",u,a),sN(t,"ftp",d,a),sN(t,"http",p,a),sN(t,"mailto",h,a);var f=a(),m=eN(dN),g=eN(pN);tN(d,"s",f),tN(d,":",m),tN(p,"s",f),tN(p,":",m),tN(u,":",m),tN(f,":",m),tN(h,":",g);for(var b=a(),y=0;y<e.length;y++)sN(t,e[y],b,a);return tN(b,":",m),sN(t,"localhost",l(lN),a),nN(t,XN,n),nN(t,GN,r),nN(t,ZN,r),nN(t,JN,r),nN(n,XN,n),nN(n,GN,r),nN(n,ZN,r),nN(n,JN,r),tN(n,"-",i),tN(r,"-",i),tN(i,"-",i),nN(r,XN,r),nN(r,GN,r),nN(r,ZN,r),nN(r,JN,r),nN(i,XN,r),nN(i,GN,r),nN(i,ZN,r),nN(i,JN,r),t.jd=eN(YN),t}var nT={defaultProtocol:"http",events:null,format:rT,formatHref:rT,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:0,className:null,attributes:null,ignoreTags:[]};function rT(e){return e}function iT(){}function oT(e,t){function n(t,n){this.t=e,this.v=t,this.tk=n}return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Object.create(e.prototype);for(var i in n)r[i]=n[i];r.constructor=t,t.prototype=r}(iT,n,t),n}iT.prototype={t:"token",isLink:!1,toString:function(){return this.v},toHref:function(){return this.toString()},startIndex:function(){return this.tk[0].s},endIndex:function(){return this.tk[this.tk.length-1].e},toObject:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:nT.defaultProtocol;return{type:this.t,value:this.v,isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}}};var sT=oT("email",{isLink:!0}),aT=oT("email",{isLink:!0,toHref:function(){return"mailto:"+this.toString()}}),lT=oT("text"),cT=oT("nl"),uT=oT("url",{isLink:!0,toHref:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:nT.defaultProtocol,t=this.tk,n=!1,r=!1,i=[],o=0;t[o].t===dN;)n=!0,i.push(t[o].v),o++;for(;t[o].t===WN;)r=!0,i.push(t[o].v),o++;for(;o<t.length;o++)i.push(t[o].v);return i=i.join(""),n||r||(i="".concat(e,"://").concat(i)),i},hasProtocol:function(){return this.tk[0].t===dN}}),dT=Object.freeze({__proto__:null,MultiToken:iT,Base:iT,createTokenClass:oT,MailtoEmail:sT,Email:aT,Text:lT,Nl:cT,Url:uT});function pT(){var e=XO(),t=XO(),n=XO(),r=XO(),i=XO(),o=XO(),s=XO(),a=eN(uT),l=XO(),c=eN(uT),u=eN(uT),d=XO(),p=XO(),h=XO(),f=XO(),m=XO(),g=eN(uT),b=eN(uT),y=eN(uT),v=eN(uT),w=XO(),x=XO(),E=XO(),M=XO(),k=XO(),_=XO(),D=eN(aT),C=XO(),O=eN(aT),N=eN(sT),T=XO(),S=XO(),A=XO(),I=XO(),L=eN(cT);tN(e,fN,L),tN(e,dN,t),tN(e,pN,n),tN(t,WN,r),tN(r,WN,i),tN(e,cN,o),tN(e,aN,o),tN(e,lN,a),tN(e,uN,o),tN(i,cN,u),tN(i,aN,u),tN(i,uN,u),tN(i,lN,u),tN(o,IN,s),tN(k,IN,_),tN(s,cN,a),tN(s,aN,o),tN(s,uN,o),tN(s,lN,o),tN(_,cN,D),tN(_,aN,k),tN(_,uN,k),tN(_,lN,k),tN(a,IN,s),tN(D,IN,_),tN(a,TN,l),tN(a,WN,u),tN(l,uN,c),tN(c,WN,u),tN(D,TN,C),tN(C,uN,O);var j=[MN,_N,DN,CN,ON,NN,AN,aN,LN,zN,lN,uN,FN,PN,RN,BN,dN,WN,YN,VN,cN,qN],z=[kN,xN,vN,wN,EN,TN,SN,IN,jN,bN,mN,gN,yN,UN,$N,HN];tN(u,mN,p),tN(u,gN,h),tN(u,bN,f),tN(u,yN,m),tN(d,mN,p),tN(d,gN,h),tN(d,bN,f),tN(d,yN,m),tN(p,vN,u),tN(h,wN,u),tN(f,xN,u),tN(m,EN,u),tN(g,vN,u),tN(b,wN,u),tN(y,xN,u),tN(v,EN,u),tN(w,vN,u),tN(x,wN,u),tN(E,xN,u),tN(M,EN,u),iN(p,j,g),iN(h,j,b),iN(f,j,y),iN(m,j,v),iN(p,z,w),iN(h,z,x),iN(f,z,E),iN(m,z,M),iN(g,j,g),iN(b,j,b),iN(y,j,y),iN(v,j,v),iN(g,z,g),iN(b,z,b),iN(y,z,y),iN(v,z,v),iN(w,j,g),iN(x,j,b),iN(E,j,y),iN(M,j,v),iN(w,z,w),iN(x,z,x),iN(E,z,E),iN(M,z,M),iN(u,j,u),iN(d,j,u),iN(u,z,d),iN(d,z,d),tN(n,cN,N),tN(n,aN,N),tN(n,uN,N),tN(n,lN,N),iN(N,j,N),iN(N,z,T),iN(T,j,N),iN(T,z,T);var F=[MN,kN,_N,CN,ON,NN,vN,AN,aN,LN,zN,uN,mN,FN,PN,RN,BN,UN,WN,YN,VN,cN,qN];return iN(o,F,S),tN(o,DN,A),iN(a,F,S),tN(a,DN,A),iN(s,F,S),iN(S,F,S),tN(S,DN,A),tN(S,IN,I),iN(I,F,S),tN(A,cN,k),tN(A,aN,k),tN(A,uN,k),tN(A,lN,D),e}function hT(e,t,n){var r=n[0].s,i=n[n.length-1].e;return new e(t.substr(r,i-r),n)}var fT="undefined"!=typeof console&&console&&console.warn||function(){},mT={scanner:null,parser:null,pluginQueue:[],customProtocols:[],initialized:!1};function gT(e){if(mT.initialized&&fT('linkifyjs: already initialized - will not register custom protocol "'.concat(e,'" until you manually call linkify.init(). To avoid this warning, please register all custom protocols before invoking linkify the first time.')),!/^[a-z-]+$/.test(e))throw Error("linkifyjs: protocols containing characters other than a-z or - (hyphen) are not supported");mT.customProtocols.push(e)}function bT(e){return mT.initialized||function(){mT.scanner={start:tT(mT.customProtocols),tokens:KN},mT.parser={start:pT(),tokens:dT};for(var e={createTokenClass:oT},t=0;t<mT.pluginQueue.length;t++)mT.pluginQueue[t][1]({scanner:mT.scanner,parser:mT.parser,utils:e});mT.initialized=!0}(),function(e,t,n){for(var r=n.length,i=0,o=[],s=[];i<r;){for(var a=e,l=null,c=null,u=0,d=null,p=-1;i<r&&!(l=rN(a,n[i].t));)s.push(n[i++]);for(;i<r&&(c=l||rN(a,n[i].t));)l=null,(a=c).accepts()?(p=0,d=a):p>=0&&p++,i++,u++;if(p<0)for(var h=i-u;h<i;h++)s.push(n[h]);else{s.length>0&&(o.push(hT(lT,t,s)),s=[]),i-=p,u-=p;var f=d.t,m=n.slice(i-u,i);o.push(hT(f,t,m))}}return s.length>0&&o.push(hT(lT,t,s)),o}(mT.parser.start,e,function(e,t){for(var n=function(e){for(var t=[],n=e.length,r=0;r<n;){var i=e.charCodeAt(r),o=void 0,s=i<55296||i>56319||r+1===n||(o=e.charCodeAt(r+1))<56320||o>57343?e[r]:e.slice(r,r+2);t.push(s),r+=s.length}return t}(t.replace(/[A-Z]/g,(function(e){return e.toLowerCase()}))),r=n.length,i=[],o=0,s=0;s<r;){for(var a=e,l=null,c=0,u=null,d=-1,p=-1;s<r&&(l=rN(a,n[s]));)(a=l).accepts()?(d=0,p=0,u=a):d>=0&&(d+=n[s].length,p++),c+=n[s].length,o+=n[s].length,s++;o-=d,s-=p,c-=d,i.push({t:u.t,v:t.substr(o-c,c),s:o-c,e:o})}return i}(mT.scanner.start,e))}function yT(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=bT(e),r=[],i=0;i<n.length;i++){var o=n[i];!o.isLink||t&&o.t!==t||r.push(o.toObject())}return r}function vT(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=bT(e);return 1===n.length&&n[0].isLink&&(!t||n[0].t===t)}function wT(e){return new Qt({key:new Jt("autolink"),appendTransaction:(t,n,r)=>{const i=t.some((e=>e.docChanged))&&!n.doc.eq(r.doc),o=t.some((e=>e.getMeta("preventAutolink")));if(!i||o)return;const{tr:s}=r,a=function(e,t){const n=new _t(e);return t.forEach((e=>{e.steps.forEach((e=>{n.step(e)}))})),n}(n.doc,[...t]),{mapping:l}=a,c=function(e){const{mapping:t,steps:n}=e,r=[];return t.maps.forEach(((e,i)=>{const o=[];if(e.ranges.length)e.forEach(((e,t)=>{o.push({from:e,to:t})}));else{const{from:e,to:t}=n[i];if(void 0===e||void 0===t)return;o.push({from:e,to:t})}o.forEach((({from:e,to:n})=>{const o=t.slice(i).map(e,-1),s=t.slice(i).map(n),a=t.invert().map(o,-1),l=t.invert().map(s);r.push({oldRange:{from:a,to:l},newRange:{from:o,to:s}})}))})),Hs(r)}(a);return c.forEach((({oldRange:t,newRange:i})=>{Ws(t.from,t.to,n.doc).filter((t=>t.mark.type===e.type)).forEach((t=>{const i=Ws(l.map(t.from),l.map(t.to),r.doc).filter((t=>t.mark.type===e.type));if(!i.length)return;const o=i[0],a=n.doc.textBetween(t.from,t.to,void 0," "),c=r.doc.textBetween(o.from,o.to,void 0," "),u=vT(a),d=vT(c);u&&!d&&s.removeMark(o.from,o.to,e.type)})),function(e,t,n){const r=[];return e.nodesBetween(t.from,t.to,((e,t)=>{n(e)&&r.push({node:e,pos:t})})),r}(r.doc,i,(e=>e.isTextblock)).forEach((t=>{yT(r.doc.textBetween(t.pos,t.pos+t.node.nodeSize,void 0," ")).filter((e=>e.isLink)).filter((t=>!e.validate||e.validate(t.value))).map((e=>({...e,from:t.pos+e.start+1,to:t.pos+e.end+1}))).filter((e=>{const t=i.from>=e.from&&i.from<=e.to,n=i.to>=e.from&&i.to<=e.to;return t||n})).forEach((t=>{s.addMark(t.from,t.to,e.type.create({href:t.href}))}))}))})),s.steps.length?s:void 0}})}const xT=Zs.create({name:"link",priority:1e3,keepOnSplit:!1,onCreate(){this.options.protocols.forEach(gT)},inclusive(){return this.options.autolink},addOptions:()=>({openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},validate:void 0}),addAttributes(){return{href:{default:null},target:{default:this.options.HTMLAttributes.target},class:{default:this.options.HTMLAttributes.class}}},parseHTML:()=>[{tag:'a[href]:not([href *= "javascript:" i])'}],renderHTML({HTMLAttributes:e}){return["a",Bo(this.options.HTMLAttributes,e),0]},addCommands(){return{setLink:e=>({chain:t})=>t().setMark(this.name,e).setMeta("preventAutolink",!0).run(),toggleLink:e=>({chain:t})=>t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run(),unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[Xs({find:e=>yT(e).filter((e=>!this.options.validate||this.options.validate(e.value))).filter((e=>e.isLink)).map((e=>({text:e.value,index:e.start,data:e}))),type:this.type,getAttributes:e=>{var t;return{href:null===(t=e.data)||void 0===t?void 0:t.href}}})]},addProseMirrorPlugins(){const e=[];var t;return this.options.autolink&&e.push(wT({type:this.type,validate:this.options.validate})),this.options.openOnClick&&e.push((t={type:this.type},new Qt({key:new Jt("handleClickLink"),props:{handleClick:(e,n,r)=>{var i;const o=Bs(e.state,t.type.name);return!(!(null===(i=r.target)||void 0===i?void 0:i.closest("a"))||!o.href||(window.open(o.href,o.target),0))}}}))),this.options.linkOnPaste&&e.push(function(e){return new Qt({key:new Jt("handlePasteLink"),props:{handlePaste:(t,n,r)=>{const{state:i}=t,{selection:o}=i,{empty:s}=o;if(s)return!1;let a="";r.content.forEach((e=>{a+=e.textContent}));const l=yT(a).find((e=>e.isLink&&e.value===a));return!(!a||!l||(e.editor.commands.setMark(e.type,{href:l.href}),0))}}})}({editor:this.editor,type:this.type})),e}}),ET=Zs.create({name:"underline",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>!!e.includes("underline")&&{}}],renderHTML({HTMLAttributes:e}){return["u",Bo(this.options.HTMLAttributes,e),0]},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),MT=/^\s*>\s$/,kT=Js.create({name:"blockquote",addOptions:()=>({HTMLAttributes:{}}),content:"block+",group:"block",defining:!0,parseHTML:()=>[{tag:"blockquote"}],renderHTML({HTMLAttributes:e}){return["blockquote",Bo(this.options.HTMLAttributes,e),0]},addCommands(){return{setBlockquote:()=>({commands:e})=>e.wrapIn(this.name),toggleBlockquote:()=>({commands:e})=>e.toggleWrap(this.name),unsetBlockquote:()=>({commands:e})=>e.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[Gs({find:MT,type:this.type})]}}),_T=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))$/,DT=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))/g,CT=/(?:^|\s)((?:__)((?:[^__]+))(?:__))$/,OT=/(?:^|\s)((?:__)((?:[^__]+))(?:__))/g,NT=Zs.create({name:"bold",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"strong"},{tag:"b",getAttrs:e=>"normal"!==e.style.fontWeight&&null},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}],renderHTML({HTMLAttributes:e}){return["strong",Bo(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[qs({find:_T,type:this.type}),qs({find:CT,type:this.type})]},addPasteRules(){return[Xs({find:DT,type:this.type}),Xs({find:OT,type:this.type})]}}),TT=/^\s*([-+*])\s$/,ST=Js.create({name:"bulletList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{}}),group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML:()=>[{tag:"ul"}],renderHTML({HTMLAttributes:e}){return["ul",Bo(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleBulletList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){return[Gs({find:TT,type:this.type})]}}),AT=/^```([a-z]+)?[\s\n]$/,IT=/^~~~([a-z]+)?[\s\n]$/,LT=Js.create({name:"codeBlock",addOptions:()=>({languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,HTMLAttributes:{}}),content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:null,parseHTML:e=>{var t;const{languageClassPrefix:n}=this.options,r=[...(null===(t=e.firstElementChild)||void 0===t?void 0:t.classList)||[]].filter((e=>e.startsWith(n))).map((e=>e.replace(n,"")))[0];return r||null},rendered:!1}}},parseHTML:()=>[{tag:"pre",preserveWhitespace:"full"}],renderHTML({node:e,HTMLAttributes:t}){return["pre",Bo(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=1===t.pos;return!(!e||t.parent.type.name!==this.name)&&(!(!n&&t.parent.textContent.length)&&this.editor.commands.clearNodes())},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,s=r.parent.textContent.endsWith("\n\n");return!(!o||!s)&&e.chain().command((({tr:e})=>(e.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)return!1;if(!(i.parentOffset===i.parent.nodeSize-2))return!1;const s=i.after();if(void 0===s)return!1;return!r.nodeAt(s)&&e.commands.exitCode()}}},addInputRules(){return[Ks({find:AT,type:this.type,getAttributes:e=>({language:e[1]})}),Ks({find:IT,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new Qt({key:new Jt("codeBlockVSCodeHandler"),props:{handlePaste:(e,t)=>{if(!t.clipboardData)return!1;if(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=null==i?void 0:i.mode;if(!n||!o)return!1;const{tr:s}=e.state;return s.replaceSelectionWith(this.type.create({language:o})),s.setSelection(St.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.insertText(n.replace(/\r\n?/g,"\n")),s.setMeta("paste",!0),e.dispatch(s),!0}}})]}}),jT=Js.create({name:"doc",topNode:!0,content:"block+"});function zT(e={}){return new Qt({view:t=>new FT(t,e)})}class FT{constructor(e,t){this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=t.width||1,this.color=t.color||"black",this.class=t.class,this.handlers=["dragover","dragend","drop","dragleave"].map((t=>{let n=e=>{this[t](e)};return e.dom.addEventListener(t,n),{name:t,handler:n}}))}destroy(){this.handlers.forEach((({name:e,handler:t})=>this.editorView.dom.removeEventListener(e,t)))}update(e,t){null!=this.cursorPos&&t.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,null==e?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e,t=this.editorView.state.doc.resolve(this.cursorPos);if(!t.parent.inlineContent){let n=t.nodeBefore,r=t.nodeAfter;if(n||r){let t=this.editorView.nodeDOM(this.cursorPos-(n?n.nodeSize:0)).getBoundingClientRect(),i=n?t.bottom:t.top;n&&r&&(i=(i+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),e={left:t.left,right:t.right,top:i-this.width/2,bottom:i+this.width/2}}}if(!e){let t=this.editorView.coordsAtPos(this.cursorPos);e={left:t.left-this.width/2,right:t.left+this.width/2,top:t.top,bottom:t.bottom}}let n,r,i=this.editorView.dom.offsetParent;if(this.element||(this.element=i.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none; background-color: "+this.color),!i||i==document.body&&"static"==getComputedStyle(i).position)n=-pageXOffset,r=-pageYOffset;else{let e=i.getBoundingClientRect();n=e.left-i.scrollLeft,r=e.top-i.scrollTop}this.element.style.left=e.left-n+"px",this.element.style.top=e.top-r+"px",this.element.style.width=e.right-e.left+"px",this.element.style.height=e.bottom-e.top+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout((()=>this.setCursor(null)),e)}dragover(e){if(!this.editorView.editable)return;let t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),n=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),r=n&&n.type.spec.disableDropCursor,i="function"==typeof r?r(this.editorView,t):r;if(t&&!i){let e=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice&&(e=pt(this.editorView.state.doc,e,this.editorView.dragging.slice),null==e))return this.setCursor(null);this.setCursor(e),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){e.target!=this.editorView.dom&&this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}const PT=is.create({name:"dropCursor",addOptions:()=>({color:"currentColor",width:1,class:void 0}),addProseMirrorPlugins(){return[zT(this.options)]}}),RT="undefined"!=typeof navigator?navigator:null,BT="undefined"!=typeof document?document:null,UT=RT&&RT.userAgent||"",$T=/Edge\/(\d+)/.exec(UT),HT=/MSIE \d/.exec(UT),WT=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(UT),VT=!!(HT||WT||$T),qT=HT?document.documentMode:WT?+WT[1]:$T?+$T[1]:0,YT=!VT&&/gecko\/(\d+)/i.test(UT);YT&&(/Firefox\/(\d+)/.exec(UT)||[0,0])[1];const KT=!VT&&/Chrome\/(\d+)/.exec(UT),QT=!!KT,GT=KT?+KT[1]:0,ZT=!VT&&!!RT&&/Apple Computer/.test(RT.vendor),JT=ZT&&(/Mobile\/\w+/.test(UT)||!!RT&&RT.maxTouchPoints>2),XT=JT||!!RT&&/Mac/.test(RT.platform),eS=/Android \d/.test(UT),tS=!!BT&&"webkitFontSmoothing"in BT.documentElement.style,nS=tS?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,rS=function(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t},iS=/^(img|br|input|textarea|hr)$/i;function oS(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:sS(e))){let n=e.parentNode;if(!n||1!=n.nodeType||aS(e)||iS.test(e.nodeName)||"false"==e.contentEditable)return!1;t=rS(e)+(i<0?0:1),e=n}else{if(1!=e.nodeType)return!1;if("false"==(e=e.childNodes[t+(i<0?-1:0)]).contentEditable)return!1;t=i<0?sS(e):0}}}function sS(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function aS(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 lS=function(e){let t=e.isCollapsed;return t&&QT&&e.rangeCount&&!e.getRangeAt(0).collapsed&&(t=!1),t};function cS(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}function uS(e,t=null){let n=e.domSelection(),r=e.state.doc;if(!n.focusNode)return null;let i=e.docView.nearestDesc(n.focusNode),o=i&&0==i.size,s=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let a,l,c=r.resolve(s);if(lS(n)){for(a=c;i&&!i.node;)i=i.parent;let e=i.node;if(i&&e.isAtom&&It.isSelectable(e)&&i.parent&&(!e.isInline||!function(e,t,n){for(let r=0==t,i=t==sS(e);r||i;){if(e==n)return!0;let t=rS(e);if(!(e=e.parentNode))return!1;r=r&&0==t,i=i&&t==sS(e)}}(n.focusNode,n.focusOffset,i.dom))){let e=i.posBefore;l=new It(s==e?c:r.resolve(e))}}else{let t=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(t<0)return null;a=r.resolve(t)}if(!l){l=yS(e,a,c,"pointer"==t||e.state.selection.head<c.pos&&!o?1:-1)}return l}function dS(e){return e.editable?e.hasFocus():function(e){let t=e.domSelection();if(!t.anchorNode)return!1;try{return e.dom.contains(3==t.anchorNode.nodeType?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(3==t.focusNode.nodeType?t.focusNode.parentNode:t.focusNode))}catch(e){return!1}}(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function pS(e,t=!1){let n=e.state.selection;if(function(e,t){if(t instanceof It){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(bS(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else bS(e)}(e,n),dS(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&QT){let t=e.domSelection(),n=e.domObserver.currentSelection;if(t.anchorNode&&n.anchorNode&&(r=t.anchorNode,i=t.anchorOffset,o=n.anchorNode,s=n.anchorOffset,o&&(oS(r,i,o,s,-1)||oS(r,i,o,s,1))))return e.input.mouseDown.delayedSelectionSync=!0,void e.domObserver.setCurSelection()}var r,i,o,s;if(e.domObserver.disconnectSelection(),e.cursorWrapper)!function(e){let t=e.domSelection(),n=document.createRange(),r=e.cursorWrapper.dom,i="IMG"==r.nodeName;i?n.setEnd(r.parentNode,rS(r)+1):n.setEnd(r,0);n.collapse(!1),t.removeAllRanges(),t.addRange(n),!i&&!e.state.selection.visible&&VT&&qT<=11&&(r.disabled=!0,r.disabled=!1)}(e);else{let r,i,{anchor:o,head:s}=n;!hS||n instanceof St||(n.$from.parent.inlineContent||(r=fS(e,n.from)),n.empty||n.$from.parent.inlineContent||(i=fS(e,n.to))),e.docView.setSelection(o,s,e.root,t),hS&&(r&&gS(r),i&&gS(i)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&function(e){let t=e.dom.ownerDocument;t.removeEventListener("selectionchange",e.input.hideSelectionGuard);let n=e.domSelection(),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((()=>{dS(e)&&!e.state.selection.visible||e.dom.classList.remove("ProseMirror-hideselection")}),20))})}(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}const hS=ZT||QT&&GT<63;function fS(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(ZT&&i&&"false"==i.contentEditable)return mS(i);if(!(i&&"false"!=i.contentEditable||o&&"false"!=o.contentEditable)){if(i)return mS(i);if(o)return mS(o)}}function mS(e){return e.contentEditable="true",ZT&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function gS(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function bS(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function yS(e,t,n,r){return e.someProp("createSelectionBetween",(r=>r(e,t,n)))||St.between(t,n,r)}function vS(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&&Ct.findFrom(o,t)}function wS(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function xS(e,t,n){let r=e.state.selection;if(!(r instanceof St)){if(r instanceof It&&r.node.isInline)return wS(e,new St(t>0?r.$to:r.$from));{let n=vS(e.state,t);return!!n&&wS(e,n)}}if(!r.empty||n.indexOf("s")>-1)return!1;if(e.endOfTextblock(t>0?"right":"left")){let n=vS(e.state,t);return!!(n&&n instanceof It)&&wS(e,n)}if(!(XT&&n.indexOf("m")>-1)){let n,i=r.$head,o=i.textOffset?null:t<0?i.nodeBefore:i.nodeAfter;if(!o||o.isText)return!1;let s=t<0?i.pos-o.nodeSize:i.pos;return!!(o.isAtom||(n=e.docView.descAt(s))&&!n.contentDOM)&&(It.isSelectable(o)?wS(e,new It(t<0?e.state.doc.resolve(i.pos-o.nodeSize):i)):!!tS&&wS(e,new St(e.state.doc.resolve(t<0?s:s+o.nodeSize))))}}function ES(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function MS(e){let t=e.pmViewDesc;return t&&0==t.size&&(e.nextSibling||"BR"!=e.nodeName)}function kS(e){let t=e.domSelection(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i,o,s=!1;for(YT&&1==n.nodeType&&r<ES(n)&&MS(n.childNodes[r])&&(s=!0);;)if(r>0){if(1!=n.nodeType)break;{let e=n.childNodes[r-1];if(MS(e))i=n,o=--r;else{if(3!=e.nodeType)break;n=e,r=n.nodeValue.length}}}else{if(DS(n))break;{let t=n.previousSibling;for(;t&&MS(t);)i=n.parentNode,o=rS(t),t=t.previousSibling;if(t)n=t,r=ES(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}}s?CS(e,t,n,r):i&&CS(e,t,i,o)}function _S(e){let t=e.domSelection(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i,o,s=ES(n);for(;;)if(r<s){if(1!=n.nodeType)break;if(!MS(n.childNodes[r]))break;i=n,o=++r}else{if(DS(n))break;{let t=n.nextSibling;for(;t&&MS(t);)i=t.parentNode,o=rS(t)+1,t=t.nextSibling;if(t)n=t,r=0,s=ES(n);else{if(n=n.parentNode,n==e.dom)break;r=s=0}}}i&&CS(e,t,i,o)}function DS(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function CS(e,t,n,r){if(lS(t)){let e=document.createRange();e.setEnd(n,r),e.setStart(n,r),t.removeAllRanges(),t.addRange(e)}else t.extend&&t.extend(n,r);e.domObserver.setCurSelection();let{state:i}=e;setTimeout((()=>{e.state==i&&pS(e)}),50)}function OS(e,t,n){let r=e.state.selection;if(r instanceof St&&!r.empty||n.indexOf("s")>-1)return!1;if(XT&&n.indexOf("m")>-1)return!1;let{$from:i,$to:o}=r;if(!i.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let n=vS(e.state,t);if(n&&n instanceof It)return wS(e,n)}if(!i.parent.inlineContent){let n=t<0?i:o,s=r instanceof jt?Ct.near(n,t):Ct.findFrom(n,t);return!!s&&wS(e,s)}return!1}function NS(e,t){if(!(e.state.selection instanceof St))return!0;let{$head:n,$anchor:r,empty:i}=e.state.selection;if(!n.sameParent(r))return!0;if(!i)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let o=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(o&&!o.isText){let r=e.state.tr;return t<0?r.delete(n.pos-o.nodeSize,n.pos):r.delete(n.pos,n.pos+o.nodeSize),e.dispatch(r),!0}return!1}function TS(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function SS(e,t){let n=t.keyCode,r=function(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}(t);return 8==n||XT&&72==n&&"c"==r?NS(e,-1)||kS(e):46==n||XT&&68==n&&"c"==r?NS(e,1)||_S(e):13==n||27==n||(37==n||XT&&66==n&&"c"==r?xS(e,-1,r)||kS(e):39==n||XT&&70==n&&"c"==r?xS(e,1,r)||_S(e):38==n||XT&&80==n&&"c"==r?OS(e,-1,r)||kS(e):40==n||XT&&78==n&&"c"==r?function(e){if(!ZT||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelection();if(t&&1==t.nodeType&&0==n&&t.firstChild&&"false"==t.firstChild.contentEditable){let n=t.firstChild;TS(e,n,"true"),setTimeout((()=>TS(e,n,"false")),20)}return!1}(e)||OS(e,1,r)||_S(e):r==(XT?"m":"c")&&(66==n||73==n||89==n||90==n))}function AS(e,t){let n=[],{content:r,openStart:i,openEnd:o}=t;for(;i>1&&o>1&&1==r.childCount&&1==r.firstChild.childCount;){i--,o--;let e=r.firstChild;n.push(e.type.name,e.attrs!=e.type.defaultAttrs?e.attrs:null),r=e.content}let s=e.someProp("clipboardSerializer")||Fe.fromSchema(e.state.schema),a=$S(),l=a.createElement("div");l.appendChild(s.serializeFragment(r,{document:a}));let c,u=l.firstChild,d=0;for(;u&&1==u.nodeType&&(c=BS[u.nodeName.toLowerCase()]);){for(let e=c.length-1;e>=0;e--){let t=a.createElement(c[e]);for(;l.firstChild;)t.appendChild(l.firstChild);l.appendChild(t),d++}u=l.firstChild}u&&1==u.nodeType&&u.setAttribute("data-pm-slice",`${i} ${o}${d?` -${d}`:""} ${JSON.stringify(n)}`);let p=e.someProp("clipboardTextSerializer",(e=>e(t)))||t.content.textBetween(0,t.content.size,"\n\n");return{dom:l,text:p}}function IS(e,t,n,r,i){let o,s,a=i.parent.type.spec.code;if(!n&&!t)return null;let l=t&&(r||a||!n);if(l){if(e.someProp("transformPastedText",(e=>{t=e(t,a||r)})),a)return t?new B(L.from(e.state.schema.text(t.replace(/\r\n?/g,"\n"))),0,0):B.empty;let n=e.someProp("clipboardTextParser",(e=>e(t,i,r)));if(n)s=n;else{let n=i.marks(),{schema:r}=e.state,s=Fe.fromSchema(r);o=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach((e=>{let t=o.appendChild(document.createElement("p"));e&&t.appendChild(s.serializeNode(r.text(e,n)))}))}}else e.someProp("transformPastedHTML",(e=>{n=e(n)})),o=function(e){let t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n,r=$S().createElement("div"),i=/<([a-z][^>\s]+)/i.exec(e);(n=i&&BS[i[1].toLowerCase()])&&(e=n.map((e=>"<"+e+">")).join("")+e+n.map((e=>"</"+e+">")).reverse().join(""));if(r.innerHTML=e,n)for(let e=0;e<n.length;e++)r=r.querySelector(n[e])||r;return r}(n),tS&&function(e){let t=e.querySelectorAll(QT?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<t.length;n++){let r=t[n];1==r.childNodes.length&&" "==r.textContent&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),r)}}(o);let c=o&&o.querySelector("[data-pm-slice]"),u=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(u&&u[3])for(let e=+u[3];e>0&&o.firstChild;e--)o=o.firstChild;if(!s){let t=e.someProp("clipboardParser")||e.someProp("domParser")||ke.fromSchema(e.state.schema);s=t.parseSlice(o,{preserveWhitespace:!(!l&&!u),context:i,ruleFromNode:e=>"BR"!=e.nodeName||e.nextSibling||!e.parentNode||LS.test(e.parentNode.nodeName)?null:{ignore:!0}})}if(u)s=function(e,t){if(!e.size)return e;let n,r=e.content.firstChild.type.schema;try{n=JSON.parse(t)}catch(t){return e}let{content:i,openStart:o,openEnd:s}=e;for(let e=n.length-2;e>=0;e-=2){let t=r.nodes[n[e]];if(!t||t.hasRequiredAttrs())break;i=L.from(t.create(n[e+1],i)),o++,s++}return new B(i,o,s)}(RS(s,+u[1],+u[2]),u[4]);else if(s=B.maxOpen(function(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let r,i=t.node(n).contentMatchAt(t.index(n)),o=[];if(e.forEach((e=>{if(!o)return;let t,n=i.findWrapping(e.type);if(!n)return o=null;if(t=o.length&&r.length&&zS(n,r,e,o[o.length-1],0))o[o.length-1]=t;else{o.length&&(o[o.length-1]=FS(o[o.length-1],r.length));let t=jS(e,n);o.push(t),i=i.matchType(t.type),r=n}})),o)return L.from(o)}return e}(s.content,i),!0),s.openStart||s.openEnd){let e=0,t=0;for(let t=s.content.firstChild;e<s.openStart&&!t.type.spec.isolating;e++,t=t.firstChild);for(let e=s.content.lastChild;t<s.openEnd&&!e.type.spec.isolating;t++,e=e.lastChild);s=RS(s,e,t)}return e.someProp("transformPasted",(e=>{s=e(s)})),s}const LS=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function jS(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,L.from(e));return e}function zS(e,t,n,r,i){if(i<e.length&&i<t.length&&e[i]==t[i]){let o=zS(e,t,n,r.lastChild,i+1);if(o)return r.copy(r.content.replaceChild(r.childCount-1,o));if(r.contentMatchAt(r.childCount).matchType(i==e.length-1?n.type:e[i+1]))return r.copy(r.content.append(L.from(jS(n,e,i+1))))}}function FS(e,t){if(0==t)return e;let n=e.content.replaceChild(e.childCount-1,FS(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(L.empty,!0);return e.copy(n.append(r))}function PS(e,t,n,r,i,o){let s=t<0?e.firstChild:e.lastChild,a=s.content;return i<r-1&&(a=PS(a,t,n,r,i+1,o)),i>=n&&(a=t<0?s.contentMatchAt(0).fillBefore(a,e.childCount>1||o<=i).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(L.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,s.copy(a))}function RS(e,t,n){return t<e.openStart&&(e=new B(PS(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new B(PS(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}const BS={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let US=null;function $S(){return US||(US=document.implementation.createHTMLDocument("title"))}const HS={};let WS={};function VS(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function qS(e){return{left:e.clientX,top:e.clientY}}function YS(e,t,n,r,i){if(-1==r)return!1;let o=e.state.doc.resolve(r);for(let r=o.depth+1;r>0;r--)if(e.someProp(t,(t=>r>o.depth?t(e,n,o.nodeAfter,o.before(r),i,!0):t(e,n,o.node(r),o.before(r),i,!1))))return!0;return!1}function KS(e,t,n){e.focused||e.focus();let r=e.state.tr.setSelection(t);"pointer"==n&&r.setMeta("pointer",!0),e.dispatch(r)}function QS(e,t,n,r,i){return YS(e,"handleClickOn",t,n,r)||e.someProp("handleClick",(n=>n(e,t,r)))||(i?function(e,t){if(-1==t)return!1;let n,r,i=e.state.selection;i instanceof It&&(n=i.node);let o=e.state.doc.resolve(t);for(let e=o.depth+1;e>0;e--){let t=e>o.depth?o.nodeAfter:o.node(e);if(It.isSelectable(t)){r=n&&i.$from.depth>0&&e>=i.$from.depth&&o.before(i.$from.depth+1)==i.$from.pos?o.before(i.$from.depth):o.before(e);break}}return null!=r&&(KS(e,It.create(e.state.doc,r),"pointer"),!0)}(e,n):function(e,t){if(-1==t)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return!!(r&&r.isAtom&&It.isSelectable(r))&&(KS(e,new It(n),"pointer"),!0)}(e,n))}function GS(e,t,n,r){return YS(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",(n=>n(e,t,r)))}function ZS(e,t,n,r){return YS(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",(n=>n(e,t,r)))||function(e,t,n){if(0!=n.button)return!1;let r=e.state.doc;if(-1==t)return!!r.inlineContent&&(KS(e,St.create(r,0,r.content.size),"pointer"),!0);let i=r.resolve(t);for(let t=i.depth+1;t>0;t--){let n=t>i.depth?i.nodeAfter:i.node(t),o=i.before(t);if(n.inlineContent)KS(e,St.create(r,o+1,o+1+n.content.size),"pointer");else{if(!It.isSelectable(n))continue;KS(e,It.create(r,o),"pointer")}return!0}}(e,n,r)}function JS(e){return oA(e)}WS.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=16==n.keyCode||n.shiftKey,!tA(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!eS||!QT||13!=n.keyCode))if(229!=n.keyCode&&e.domObserver.forceFlush(),!JT||13!=n.keyCode||n.ctrlKey||n.altKey||n.metaKey)e.someProp("handleKeyDown",(t=>t(e,n)))||SS(e,n)?n.preventDefault():VS(e,"key");else{let t=Date.now();e.input.lastIOSEnter=t,e.input.lastIOSEnterFallbackTimeout=setTimeout((()=>{e.input.lastIOSEnter==t&&(e.someProp("handleKeyDown",(t=>t(e,cS(13,"Enter")))),e.input.lastIOSEnter=0)}),200)}},WS.keyup=(e,t)=>{16==t.keyCode&&(e.input.shiftKey=!1)},WS.keypress=(e,t)=>{let n=t;if(tA(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||XT&&n.metaKey)return;if(e.someProp("handleKeyPress",(t=>t(e,n))))return void n.preventDefault();let r=e.state.selection;if(!(r instanceof St&&r.$from.sameParent(r.$to))){let t=String.fromCharCode(n.charCode);e.someProp("handleTextInput",(n=>n(e,r.$from.pos,r.$to.pos,t)))||e.dispatch(e.state.tr.insertText(t).scrollIntoView()),n.preventDefault()}};const XS=XT?"metaKey":"ctrlKey";HS.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=JS(e),i=Date.now(),o="singleClick";i-e.input.lastClick.time<500&&function(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}(n,e.input.lastClick)&&!n[XS]&&("singleClick"==e.input.lastClick.type?o="doubleClick":"doubleClick"==e.input.lastClick.type&&(o="tripleClick")),e.input.lastClick={time:i,x:n.clientX,y:n.clientY,type:o};let s=e.posAtCoords(qS(n));s&&("singleClick"==o?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new eA(e,s,n,!!r)):("doubleClick"==o?GS:ZS)(e,s.pos,s.inside,n)?n.preventDefault():VS(e,"pointer"))};class eA{constructor(e,t,n,r){let i,o;if(this.view=e,this.pos=t,this.event=n,this.flushed=r,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!n[XS],this.allowDefault=n.shiftKey,t.inside>-1)i=e.state.doc.nodeAt(t.inside),o=t.inside;else{let n=e.state.doc.resolve(t.pos);i=n.parent,o=n.depth?n.before():0}const s=r?null:n.target,a=s?e.docView.nearestDesc(s,!0):null;this.target=a?a.dom:null;let{selection:l}=e.state;(0==n.button&&i.type.spec.draggable&&!1!==i.type.spec.selectable||l instanceof It&&l.from<=o&&l.to>o)&&(this.mightDrag={node:i,pos:o,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!YT||this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout((()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")}),20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),VS(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout((()=>pS(this.view))),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(qS(e))),this.allowDefault||!t?VS(this.view,"pointer"):QS(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():0==e.button&&(this.flushed||ZT&&this.mightDrag&&!this.mightDrag.node.isAtom||QT&&!(this.view.state.selection instanceof St)&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(KS(this.view,Ct.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):VS(this.view,"pointer")}move(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0),VS(this.view,"pointer"),0==e.buttons&&this.done()}}function tA(e,t){return!!e.composing||!!(ZT&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500)&&(e.input.compositionEndedAt=-2e8,!0)}HS.touchdown=e=>{JS(e),VS(e,"pointer")},HS.contextmenu=e=>JS(e);const nA=eS?5e3:-1;function rA(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout((()=>oA(e)),t))}function iA(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=function(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function oA(e,t=!1){if(!(eS&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),iA(e),t||e.docView&&e.docView.dirty){let t=uS(e);return t&&!t.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(t)):e.updateState(e.state),!0}return!1}}WS.compositionstart=WS.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some((e=>!1===e.type.spec.inclusive))))e.markCursor=e.state.storedMarks||n.marks(),oA(e,!0),e.markCursor=null;else if(oA(e),YT&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let t=e.domSelection();for(let e=t.focusNode,n=t.focusOffset;e&&1==e.nodeType&&0!=n;){let r=n<0?e.lastChild:e.childNodes[n-1];if(!r)break;if(3==r.nodeType){t.collapse(r,r.nodeValue.length);break}e=r,n=-1}}e.input.composing=!0}rA(e,nA)},WS.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,rA(e,20))};const sA=VT&&qT<15||JT&&nS<604;function aA(e,t,n,r){let i=IS(e,t,n,e.input.shiftKey,e.state.selection.$from);if(e.someProp("handlePaste",(t=>t(e,r,i||B.empty))))return!0;if(!i)return!1;let o=function(e){return 0==e.openStart&&0==e.openEnd&&1==e.content.childCount?e.content.firstChild:null}(i),s=o?e.state.tr.replaceSelectionWith(o,e.input.shiftKey):e.state.tr.replaceSelection(i);return e.dispatch(s.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}HS.copy=WS.cut=(e,t)=>{let n=t,r=e.state.selection,i="cut"==n.type;if(r.empty)return;let o=sA?null:n.clipboardData,s=r.content(),{dom:a,text:l}=AS(e,s);o?(n.preventDefault(),o.clearData(),o.setData("text/html",a.innerHTML),o.setData("text/plain",l)):function(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),i=document.createRange();i.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout((()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()}),50)}(e,a),i&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))},WS.paste=(e,t)=>{let n=t;if(e.composing&&!eS)return;let r=sA?null:n.clipboardData;r&&aA(e,r.getData("text/plain"),r.getData("text/html"),n)?n.preventDefault():function(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus(),setTimeout((()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?aA(e,r.value,null,t):aA(e,r.textContent,r.innerHTML,t)}),50)}(e,n)};class lA{constructor(e,t){this.slice=e,this.move=t}}const cA=XT?"altKey":"ctrlKey";HS.dragstart=(e,t)=>{let n=t,r=e.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let i=e.state.selection,o=i.empty?null:e.posAtCoords(qS(n));if(o&&o.pos>=i.from&&o.pos<=(i instanceof It?i.to-1:i.to));else if(r&&r.mightDrag)e.dispatch(e.state.tr.setSelection(It.create(e.state.doc,r.mightDrag.pos)));else if(n.target&&1==n.target.nodeType){let t=e.docView.nearestDesc(n.target,!0);t&&t.node.type.spec.draggable&&t!=e.docView&&e.dispatch(e.state.tr.setSelection(It.create(e.state.doc,t.posBefore)))}let s=e.state.selection.content(),{dom:a,text:l}=AS(e,s);n.dataTransfer.clearData(),n.dataTransfer.setData(sA?"Text":"text/html",a.innerHTML),n.dataTransfer.effectAllowed="copyMove",sA||n.dataTransfer.setData("text/plain",l),e.dragging=new lA(s,!n[cA])},HS.dragend=e=>{let t=e.dragging;window.setTimeout((()=>{e.dragging==t&&(e.dragging=null)}),50)},WS.dragover=WS.dragenter=(e,t)=>t.preventDefault(),WS.drop=(e,t)=>{let n=t,r=e.dragging;if(e.dragging=null,!n.dataTransfer)return;let i=e.posAtCoords(qS(n));if(!i)return;let o=e.state.doc.resolve(i.pos);if(!o)return;let s=r&&r.slice;s?e.someProp("transformPasted",(e=>{s=e(s)})):s=IS(e,n.dataTransfer.getData(sA?"Text":"text/plain"),sA?null:n.dataTransfer.getData("text/html"),!1,o);let a=!(!r||n[cA]);if(e.someProp("handleDrop",(t=>t(e,n,s||B.empty,a))))return void n.preventDefault();if(!s)return;n.preventDefault();let l=s?pt(e.state.doc,o.pos,s):o.pos;null==l&&(l=o.pos);let c=e.state.tr;a&&c.deleteSelection();let u=c.mapping.map(l),d=0==s.openStart&&0==s.openEnd&&1==s.content.childCount,p=c.doc;if(d?c.replaceRangeWith(u,u,s.content.firstChild):c.replaceRange(u,u,s),c.doc.eq(p))return;let h=c.doc.resolve(u);if(d&&It.isSelectable(s.content.firstChild)&&h.nodeAfter&&h.nodeAfter.sameMarkup(s.content.firstChild))c.setSelection(new It(h));else{let t=c.mapping.map(l);c.mapping.maps[c.mapping.maps.length-1].forEach(((e,n,r,i)=>t=i)),c.setSelection(yS(e,h,c.doc.resolve(t)))}e.focus(),e.dispatch(c.setMeta("uiEvent","drop"))},HS.focus=e=>{e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout((()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelection())&&pS(e)}),20))},HS.blur=(e,t)=>{let n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)},HS.beforeinput=(e,t)=>{if(QT&&eS&&"deleteContentBackward"==t.inputType){e.domObserver.flushSoon();let{domChangeCount:t}=e.input;setTimeout((()=>{if(e.input.domChangeCount!=t)return;if(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",(t=>t(e,cS(8,"Backspace")))))return;let{$cursor:n}=e.state.selection;n&&n.pos>0&&e.dispatch(e.state.tr.delete(n.pos-1,n.pos).scrollIntoView())}),50)}};for(let e in WS)HS[e]=WS[e];function uA(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}class dA{constructor(e,t){this.toDOM=e,this.spec=t||gA,this.side=this.spec.side||0}map(e,t,n,r){let{pos:i,deleted:o}=e.mapResult(t.from+r,this.side<0?-1:1);return o?null:new fA(i-n,i-n,this)}valid(){return!0}eq(e){return this==e||e instanceof dA&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&uA(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class pA{constructor(e,t){this.attrs=e,this.spec=t||gA}map(e,t,n,r){let i=e.map(t.from+r,this.spec.inclusiveStart?-1:1)-n,o=e.map(t.to+r,this.spec.inclusiveEnd?1:-1)-n;return i>=o?null:new fA(i,o,this)}valid(e,t){return t.from<t.to}eq(e){return this==e||e instanceof pA&&uA(this.attrs,e.attrs)&&uA(this.spec,e.spec)}static is(e){return e.type instanceof pA}destroy(){}}class hA{constructor(e,t){this.attrs=e,this.spec=t||gA}map(e,t,n,r){let i=e.mapResult(t.from+r,1);if(i.deleted)return null;let o=e.mapResult(t.to+r,-1);return o.deleted||o.pos<=i.pos?null:new fA(i.pos-n,o.pos-n,this)}valid(e,t){let n,{index:r,offset:i}=e.content.findIndex(t.from);return i==t.from&&!(n=e.child(r)).isText&&i+n.nodeSize==t.to}eq(e){return this==e||e instanceof hA&&uA(this.attrs,e.attrs)&&uA(this.spec,e.spec)}destroy(){}}class fA{constructor(e,t,n){this.from=e,this.to=t,this.type=n}copy(e,t){return new fA(e,t,this.type)}eq(e,t=0){return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}map(e,t,n){return this.type.map(e,this,t,n)}static widget(e,t,n){return new fA(e,e,new dA(t,n))}static inline(e,t,n,r){return new fA(e,t,new pA(n,r))}static node(e,t,n,r){return new fA(e,t,new hA(n,r))}get spec(){return this.type.spec}get inline(){return this.type instanceof pA}}const mA=[],gA={};class bA{constructor(e,t){this.local=e.length?e:mA,this.children=t.length?t:mA}static create(e,t){return t.length?MA(t,e,0,gA):yA}find(e,t,n){let r=[];return this.findInner(null==e?0:e,null==t?1e9:t,r,0,n),r}findInner(e,t,n,r,i){for(let o=0;o<this.local.length;o++){let s=this.local[o];s.from<=t&&s.to>=e&&(!i||i(s.spec))&&n.push(s.copy(s.from+r,s.to+r))}for(let o=0;o<this.children.length;o+=3)if(this.children[o]<t&&this.children[o+1]>e){let s=this.children[o]+1;this.children[o+2].findInner(e-s,t-s,n,r+s,i)}}map(e,t,n){return this==yA||0==e.maps.length?this:this.mapInner(e,t,0,0,n||gA)}mapInner(e,t,n,r,i){let o;for(let s=0;s<this.local.length;s++){let a=this.local[s].map(e,n,r);a&&a.type.valid(t,a)?(o||(o=[])).push(a):i.onRemove&&i.onRemove(this.local[s].spec)}return this.children.length?function(e,t,n,r,i,o,s){let a=e.slice(),l=(e,t,n,r)=>{for(let s=0;s<a.length;s+=3){let l,c=a[s+1];if(c<0||e>c+o)continue;let u=a[s]+o;t>=u?a[s+1]=e<=u?-2:-1:n>=i&&(l=r-n-(t-e))&&(a[s]+=l,a[s+1]+=l)}};for(let e=0;e<n.maps.length;e++)n.maps[e].forEach(l);let c=!1;for(let t=0;t<a.length;t+=3)if(a[t+1]<0){if(-2==a[t+1]){c=!0,a[t+1]=-1;continue}let l=n.map(e[t]+o),u=l-i;if(u<0||u>=r.content.size){c=!0;continue}let d=n.map(e[t+1]+o,-1)-i,{index:p,offset:h}=r.content.findIndex(u),f=r.maybeChild(p);if(f&&h==u&&h+f.nodeSize==d){let r=a[t+2].mapInner(n,f,l+1,e[t]+o+1,s);r!=yA?(a[t]=u,a[t+1]=d,a[t+2]=r):(a[t+1]=-2,c=!0)}else c=!0}if(c){let l=function(e,t,n,r,i,o,s){function a(e,t){for(let o=0;o<e.local.length;o++){let a=e.local[o].map(r,i,t);a?n.push(a):s.onRemove&&s.onRemove(e.local[o].spec)}for(let n=0;n<e.children.length;n+=3)a(e.children[n+2],e.children[n]+t+1)}for(let n=0;n<e.length;n+=3)-1==e[n+1]&&a(e[n+2],t[n]+o+1);return n}(a,e,t,n,i,o,s),c=MA(l,r,0,s);t=c.local;for(let e=0;e<a.length;e+=3)a[e+1]<0&&(a.splice(e,3),e-=3);for(let e=0,t=0;e<c.children.length;e+=3){let n=c.children[e];for(;t<a.length&&a[t]<n;)t+=3;a.splice(t,0,c.children[e],c.children[e+1],c.children[e+2])}}return new bA(t.sort(kA),a)}(this.children,o||[],e,t,n,r,i):o?new bA(o.sort(kA),mA):yA}add(e,t){return t.length?this==yA?bA.create(e,t):this.addInner(e,t,0):this}addInner(e,t,n){let r,i=0;e.forEach(((e,o)=>{let s,a=o+n;if(s=xA(t,e,a)){for(r||(r=this.children.slice());i<r.length&&r[i]<o;)i+=3;r[i]==o?r[i+2]=r[i+2].addInner(e,s,a+1):r.splice(i,0,o,o+e.nodeSize,MA(s,e,a+1,gA)),i+=3}}));let o=wA(i?EA(t):t,-n);for(let t=0;t<o.length;t++)o[t].type.valid(e,o[t])||o.splice(t--,1);return new bA(o.length?this.local.concat(o).sort(kA):this.local,r||this.children)}remove(e){return 0==e.length||this==yA?this:this.removeInner(e,0)}removeInner(e,t){let n=this.children,r=this.local;for(let r=0;r<n.length;r+=3){let i,o=n[r]+t,s=n[r+1]+t;for(let t,n=0;n<e.length;n++)(t=e[n])&&t.from>o&&t.to<s&&(e[n]=null,(i||(i=[])).push(t));if(!i)continue;n==this.children&&(n=this.children.slice());let a=n[r+2].removeInner(i,o+1);a!=yA?n[r+2]=a:(n.splice(r,3),r-=3)}if(r.length)for(let n,i=0;i<e.length;i++)if(n=e[i])for(let e=0;e<r.length;e++)r[e].eq(n,t)&&(r==this.local&&(r=this.local.slice()),r.splice(e--,1));return n==this.children&&r==this.local?this:r.length||n.length?new bA(r,n):yA}forChild(e,t){if(this==yA)return this;if(t.isLeaf)return bA.empty;let n,r;for(let t=0;t<this.children.length;t+=3)if(this.children[t]>=e){this.children[t]==e&&(n=this.children[t+2]);break}let i=e+1,o=i+t.content.size;for(let e=0;e<this.local.length;e++){let t=this.local[e];if(t.from<o&&t.to>i&&t.type instanceof pA){let e=Math.max(i,t.from)-i,n=Math.min(o,t.to)-i;e<n&&(r||(r=[])).push(t.copy(e,n))}}if(r){let e=new bA(r.sort(kA),mA);return n?new vA([e,n]):e}return n||yA}eq(e){if(this==e)return!0;if(!(e instanceof bA)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let t=0;t<this.local.length;t++)if(!this.local[t].eq(e.local[t]))return!1;for(let t=0;t<this.children.length;t+=3)if(this.children[t]!=e.children[t]||this.children[t+1]!=e.children[t+1]||!this.children[t+2].eq(e.children[t+2]))return!1;return!0}locals(e){return _A(this.localsInner(e))}localsInner(e){if(this==yA)return mA;if(e.inlineContent||!this.local.some(pA.is))return this.local;let t=[];for(let e=0;e<this.local.length;e++)this.local[e].type instanceof pA||t.push(this.local[e]);return t}}bA.empty=new bA([],[]),bA.removeOverlap=_A;const yA=bA.empty;class vA{constructor(e){this.members=e}map(e,t){const n=this.members.map((n=>n.map(e,t,gA)));return vA.from(n)}forChild(e,t){if(t.isLeaf)return bA.empty;let n=[];for(let r=0;r<this.members.length;r++){let i=this.members[r].forChild(e,t);i!=yA&&(i instanceof vA?n=n.concat(i.members):n.push(i))}return vA.from(n)}eq(e){if(!(e instanceof vA)||e.members.length!=this.members.length)return!1;for(let t=0;t<this.members.length;t++)if(!this.members[t].eq(e.members[t]))return!1;return!0}locals(e){let t,n=!0;for(let r=0;r<this.members.length;r++){let i=this.members[r].localsInner(e);if(i.length)if(t){n&&(t=t.slice(),n=!1);for(let e=0;e<i.length;e++)t.push(i[e])}else t=i}return t?_A(n?t:t.sort(kA)):mA}static from(e){switch(e.length){case 0:return yA;case 1:return e[0];default:return new vA(e)}}}function wA(e,t){if(!t||!e.length)return e;let n=[];for(let r=0;r<e.length;r++){let i=e[r];n.push(new fA(i.from+t,i.to+t,i.type))}return n}function xA(e,t,n){if(t.isLeaf)return null;let r=n+t.nodeSize,i=null;for(let t,o=0;o<e.length;o++)(t=e[o])&&t.from>n&&t.to<r&&((i||(i=[])).push(t),e[o]=null);return i}function EA(e){let t=[];for(let n=0;n<e.length;n++)null!=e[n]&&t.push(e[n]);return t}function MA(e,t,n,r){let i=[],o=!1;t.forEach(((t,s)=>{let a=xA(e,t,s+n);if(a){o=!0;let e=MA(a,t,n+s+1,r);e!=yA&&i.push(s,s+t.nodeSize,e)}}));let s=wA(o?EA(e):e,-n).sort(kA);for(let e=0;e<s.length;e++)s[e].type.valid(t,s[e])||(r.onRemove&&r.onRemove(s[e].spec),s.splice(e--,1));return s.length||i.length?new bA(s,i):yA}function kA(e,t){return e.from-t.from||e.to-t.to}function _A(e){let t=e;for(let n=0;n<t.length-1;n++){let r=t[n];if(r.from!=r.to)for(let i=n+1;i<t.length;i++){let o=t[i];if(o.from!=r.from){o.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,o.from),DA(t,i,r.copy(o.from,r.to)));break}o.to!=r.to&&(t==e&&(t=e.slice()),t[i]=o.copy(o.from,r.to),DA(t,i+1,o.copy(r.to,o.to)))}}return t}function DA(e,t,n){for(;t<e.length&&kA(n,e[t])>0;)t++;e.splice(t,0,n)}class CA extends Ct{constructor(e){super(e,e)}map(e,t){let n=e.resolve(t.map(this.head));return CA.valid(n)?new CA(n):Ct.near(n)}content(){return B.empty}eq(e){return e instanceof CA&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,t){if("number"!=typeof t.pos)throw new RangeError("Invalid input for GapCursor.fromJSON");return new CA(e.resolve(t.pos))}getBookmark(){return new OA(this.anchor)}static valid(e){let t=e.parent;if(t.isTextblock||!function(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(0!=n)for(let e=r.child(n-1);;e=e.lastChild){if(0==e.childCount&&!e.inlineContent||e.isAtom||e.type.spec.isolating)return!0;if(e.inlineContent)return!1}else if(r.type.spec.isolating)return!0}return!0}(e)||!function(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n!=r.childCount)for(let e=r.child(n);;e=e.firstChild){if(0==e.childCount&&!e.inlineContent||e.isAtom||e.type.spec.isolating)return!0;if(e.inlineContent)return!1}else if(r.type.spec.isolating)return!0}return!0}(e))return!1;let n=t.type.spec.allowGapCursor;if(null!=n)return n;let r=t.contentMatchAt(e.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(e,t,n=!1){e:for(;;){if(!n&&CA.valid(e))return e;let r=e.pos,i=null;for(let n=e.depth;;n--){let o=e.node(n);if(t>0?e.indexAfter(n)<o.childCount:e.index(n)>0){i=o.child(t>0?e.indexAfter(n):e.index(n)-1);break}if(0==n)return null;r+=t;let s=e.doc.resolve(r);if(CA.valid(s))return s}for(;;){let o=t>0?i.firstChild:i.lastChild;if(!o){if(i.isAtom&&!i.isText&&!It.isSelectable(i)){e=e.doc.resolve(r+i.nodeSize*t),n=!1;continue e}break}i=o,r+=t;let s=e.doc.resolve(r);if(CA.valid(s))return s}return null}}}CA.prototype.visible=!1,CA.findFrom=CA.findGapCursorFrom,Ct.jsonID("gapcursor",CA);class OA{constructor(e){this.pos=e}map(e){return new OA(e.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return CA.valid(t)?new CA(t):Ct.near(t)}}const NA=Eo({ArrowLeft:TA("horiz",-1),ArrowRight:TA("horiz",1),ArrowUp:TA("vert",-1),ArrowDown:TA("vert",1)});function TA(e,t){const n="vert"==e?t>0?"down":"up":t>0?"right":"left";return function(e,r,i){let o=e.selection,s=t>0?o.$to:o.$from,a=o.empty;if(o instanceof St){if(!i.endOfTextblock(n)||0==s.depth)return!1;a=!1,s=e.doc.resolve(t>0?s.after():s.before())}let l=CA.findGapCursorFrom(s,t,a);return!!l&&(r&&r(e.tr.setSelection(new CA(l))),!0)}}function SA(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!CA.valid(r))return!1;let i=e.posAtCoords({left:n.clientX,top:n.clientY});return!(i&&i.inside>-1&&It.isSelectable(e.state.doc.nodeAt(i.inside)))&&(e.dispatch(e.state.tr.setSelection(new CA(r))),!0)}function AA(e,t){if("insertCompositionText"!=t.inputType||!(e.state.selection instanceof CA))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let i=L.empty;for(let e=r.length-1;e>=0;e--)i=L.from(r[e].createAndFill(null,i));let o=e.state.tr.replace(n.pos,n.pos,new B(i,0,0));return o.setSelection(St.near(o.doc.resolve(n.pos+1))),e.dispatch(o),!1}function IA(e){if(!(e.selection instanceof CA))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",bA.create(e.doc,[fA.widget(e.selection.head,t,{key:"gapcursor"})])}const LA=is.create({name:"gapCursor",addProseMirrorPlugins:()=>[new Qt({props:{decorations:IA,createSelectionBetween:(e,t,n)=>t.pos==n.pos&&CA.valid(n)?new CA(n):null,handleClick:SA,handleKeyDown:NA,handleDOMEvents:{beforeinput:AA}}})],extendNodeSchema(e){var t;return{allowGapCursor:null!==(t=Ho(zo(e,"allowGapCursor",{name:e.name,options:e.options,storage:e.storage})))&&void 0!==t?t:null}}}),jA=Js.create({name:"hardBreak",addOptions:()=>({keepMarks:!0,HTMLAttributes:{}}),inline:!0,group:"inline",selectable:!1,parseHTML:()=>[{tag:"br"}],renderHTML({HTMLAttributes:e}){return["br",Bo(this.options.HTMLAttributes,e)]},renderText:()=>"\n",addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:r})=>e.first([()=>e.exitCode(),()=>e.command((()=>{const{selection:e,storedMarks:i}=n;if(e.$from.parent.type.spec.isolating)return!1;const{keepMarks:o}=this.options,{splittableMarks:s}=r.extensionManager,a=i||e.$to.parentOffset&&e.$from.marks();return t().insertContent({type:this.name}).command((({tr:e,dispatch:t})=>{if(t&&a&&o){const t=a.filter((e=>s.includes(e.type.name)));e.ensureMarks(t)}return!0})).run()}))])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),zA=Js.create({name:"heading",addOptions:()=>({levels:[1,2,3,4,5,6],HTMLAttributes:{}}),content:"inline*",group:"block",defining:!0,addAttributes:()=>({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]}`,Bo(this.options.HTMLAttributes,t),0]},addCommands(){return{setHeading:e=>({commands:t})=>!!this.options.levels.includes(e.level)&&t.setNode(this.name,e),toggleHeading:e=>({commands:t})=>!!this.options.levels.includes(e.level)&&t.toggleNode(this.name,"paragraph",e)}},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=>Ks({find:new RegExp(`^(#{1,${e}})\\s$`),type:this.type,getAttributes:{level:e}})))}});var FA=200,PA=function(){};PA.prototype.append=function(e){return e.length?(e=PA.from(e),!this.length&&e||e.length<FA&&this.leafAppend(e)||this.length<FA&&e.leafPrepend(this)||this.appendInner(e)):this},PA.prototype.prepend=function(e){return e.length?PA.from(e).append(this):this},PA.prototype.appendInner=function(e){return new BA(this,e)},PA.prototype.slice=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.length),e>=t?PA.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},PA.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},PA.prototype.forEach=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)},PA.prototype.map=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length);var r=[];return this.forEach((function(t,n){return r.push(e(t,n))}),t,n),r},PA.from=function(e){return e instanceof PA?e:e&&e.length?new RA(e):PA.empty};var RA=function(e){function t(t){e.call(this),this.values=t}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(e,n){return 0==e&&n==this.length?this:new t(this.values.slice(e,n))},t.prototype.getInner=function(e){return this.values[e]},t.prototype.forEachInner=function(e,t,n,r){for(var i=t;i<n;i++)if(!1===e(this.values[i],r+i))return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){for(var i=t-1;i>=n;i--)if(!1===e(this.values[i],r+i))return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=FA)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=FA)return new t(e.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(PA);PA.empty=new RA([]);var BA=function(e){function t(t,n){e.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.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(e){return e<this.left.length?this.left.get(e):this.right.get(e-this.left.length)},t.prototype.forEachInner=function(e,t,n,r){var i=this.left.length;return!(t<i&&!1===this.left.forEachInner(e,t,Math.min(n,i),r))&&(!(n>i&&!1===this.right.forEachInner(e,Math.max(t-i,0),Math.min(this.length,n)-i,r+i))&&void 0)},t.prototype.forEachInvertedInner=function(e,t,n,r){var i=this.left.length;return!(t>i&&!1===this.right.forEachInvertedInner(e,t-i,Math.max(n,i)-i,r+i))&&(!(n<i&&!1===this.left.forEachInvertedInner(e,Math.min(t,i),n,r))&&void 0)},t.prototype.sliceInner=function(e,t){if(0==e&&t==this.length)return this;var n=this.left.length;return t<=n?this.left.slice(e,t):e>=n?this.right.slice(e-n,t-n):this.left.slice(e,n).append(this.right.slice(0,t-n))},t.prototype.leafAppend=function(e){var n=this.right.leafAppend(e);if(n)return new t(this.left,n)},t.prototype.leafPrepend=function(e){var n=this.left.leafPrepend(e);if(n)return new t(n,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}(PA),UA=PA;const $A=500;class HA{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){if(0==this.eventCount)return null;let n,r,i=this.items.length;for(;;i--){if(this.items.get(i-1).selection){--i;break}}t&&(n=this.remapping(i,this.items.length),r=n.maps.length);let o,s,a=e.tr,l=[],c=[];return this.items.forEach(((e,t)=>{if(!e.step)return n||(n=this.remapping(i,t+1),r=n.maps.length),r--,void c.push(e);if(n){c.push(new WA(e.map));let t,i=e.step.map(n.slice(r));i&&a.maybeStep(i).doc&&(t=a.mapping.maps[a.mapping.maps.length-1],l.push(new WA(t,void 0,void 0,l.length+c.length))),r--,t&&n.appendMap(t,r)}else a.maybeStep(e.step);return e.selection?(o=n?e.selection.map(n.slice(r)):e.selection,s=new HA(this.items.slice(0,i).append(c.reverse().concat(l)),this.eventCount-1),!1):void 0}),this.items.length,0),{remaining:s,transform:a,selection:o}}addTransform(e,t,n,r){let i=[],o=this.eventCount,s=this.items,a=!r&&s.length?s.get(s.length-1):null;for(let n=0;n<e.steps.length;n++){let l,c=e.steps[n].invert(e.docs[n]),u=new WA(e.mapping.maps[n],c,t);(l=a&&a.merge(u))&&(u=l,n?i.pop():s=s.slice(0,s.length-1)),i.push(u),t&&(o++,t=void 0),r||(a=u)}let l=o-n.depth;return l>qA&&(s=function(e,t){let n;return e.forEach(((e,r)=>{if(e.selection&&0==t--)return n=r,!1})),e.slice(n)}(s,l),o-=l),new HA(s.append(i),o)}remapping(e,t){let n=new Ge;return this.items.forEach(((t,r)=>{let i=null!=t.mirrorOffset&&r-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:void 0;n.appendMap(t.map,i)}),e,t),n}addMaps(e){return 0==this.eventCount?this:new HA(this.items.append(e.map((e=>new WA(e)))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let n=[],r=Math.max(0,this.items.length-t),i=e.mapping,o=e.steps.length,s=this.eventCount;this.items.forEach((e=>{e.selection&&s--}),r);let a=t;this.items.forEach((t=>{let r=i.getMirror(--a);if(null==r)return;o=Math.min(o,r);let l=i.maps[r];if(t.step){let o=e.steps[r].invert(e.docs[r]),c=t.selection&&t.selection.map(i.slice(a+1,r));c&&s++,n.push(new WA(l,o,c))}else n.push(new WA(l))}),r);let l=[];for(let e=t;e<o;e++)l.push(new WA(i.maps[e]));let c=this.items.slice(0,r).append(l).append(n),u=new HA(c,s);return u.emptyItemCount()>$A&&(u=u.compress(this.items.length-n.length)),u}emptyItemCount(){let e=0;return this.items.forEach((t=>{t.step||e++})),e}compress(e=this.items.length){let t=this.remapping(0,e),n=t.maps.length,r=[],i=0;return this.items.forEach(((o,s)=>{if(s>=e)r.push(o),o.selection&&i++;else if(o.step){let e=o.step.map(t.slice(n)),s=e&&e.getMap();if(n--,s&&t.appendMap(s,n),e){let a=o.selection&&o.selection.map(t.slice(n));a&&i++;let l,c=new WA(s.invert(),e,a),u=r.length-1;(l=r.length&&r[u].merge(c))?r[u]=l:r.push(c)}}else o.map&&n--}),this.items.length,0),new HA(UA.from(r.reverse()),i)}}HA.empty=new HA(UA.empty,0);class WA{constructor(e,t,n,r){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=r}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new WA(t.getMap().invert(),t,this.selection)}}}class VA{constructor(e,t,n,r){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=r}}const qA=20;function YA(e){let t=[];return e.forEach(((e,n,r,i)=>t.push(r,i))),t}function KA(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 QA(e,t,n,r){let i=JA(t),o=XA.get(t).spec.config,s=(r?e.undone:e.done).popEvent(t,i);if(!s)return;let a=s.selection.resolve(s.transform.doc),l=(r?e.done:e.undone).addTransform(s.transform,t.selection.getBookmark(),o,i),c=new VA(r?l:s.remaining,r?s.remaining:l,null,0);n(s.transform.setSelection(a).setMeta(XA,{redo:r,historyState:c}).scrollIntoView())}let GA=!1,ZA=null;function JA(e){let t=e.plugins;if(ZA!=t){GA=!1,ZA=t;for(let e=0;e<t.length;e++)if(t[e].spec.historyPreserveItems){GA=!0;break}}return GA}const XA=new Jt("history"),eI=new Jt("closeHistory");function tI(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new Qt({key:XA,state:{init:()=>new VA(HA.empty,HA.empty,null,0),apply:(t,n,r)=>function(e,t,n,r){let i,o=n.getMeta(XA);if(o)return o.historyState;n.getMeta(eI)&&(e=new VA(e.done,e.undone,null,0));let s=n.getMeta("appendedTransaction");if(0==n.steps.length)return e;if(s&&s.getMeta(XA))return s.getMeta(XA).redo?new VA(e.done.addTransform(n,void 0,r,JA(t)),e.undone,YA(n.mapping.maps[n.steps.length-1]),e.prevTime):new VA(e.done,e.undone.addTransform(n,void 0,r,JA(t)),null,e.prevTime);if(!1===n.getMeta("addToHistory")||s&&!1===s.getMeta("addToHistory"))return(i=n.getMeta("rebased"))?new VA(e.done.rebased(n,i),e.undone.rebased(n,i),KA(e.prevRanges,n.mapping),e.prevTime):new VA(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),KA(e.prevRanges,n.mapping),e.prevTime);{let i=0==e.prevTime||!s&&(e.prevTime<(n.time||0)-r.newGroupDelay||!function(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach(((e,r)=>{for(let i=0;i<t.length;i+=2)e<=t[i+1]&&r>=t[i]&&(n=!0)})),n}(n,e.prevRanges)),o=s?KA(e.prevRanges,n.mapping):YA(n.mapping.maps[n.steps.length-1]);return new VA(e.done.addTransform(n,i?t.selection.getBookmark():void 0,r,JA(t)),HA.empty,o,n.time)}}(n,r,t,e)},config:e,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,r="historyUndo"==n?nI:"historyRedo"==n?rI:null;return!!r&&(t.preventDefault(),r(e.state,e.dispatch))}}}})}const nI=(e,t)=>{let n=XA.getState(e);return!(!n||0==n.done.eventCount)&&(t&&QA(n,e,t,!1),!0)},rI=(e,t)=>{let n=XA.getState(e);return!(!n||0==n.undone.eventCount)&&(t&&QA(n,e,t,!0),!0)},iI=is.create({name:"history",addOptions:()=>({depth:100,newGroupDelay:500}),addCommands:()=>({undo:()=>({state:e,dispatch:t})=>nI(e,t),redo:()=>({state:e,dispatch:t})=>rI(e,t)}),addProseMirrorPlugins(){return[tI(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Mod-y":()=>this.editor.commands.redo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),oI=Js.create({name:"horizontalRule",addOptions:()=>({HTMLAttributes:{}}),group:"block",parseHTML:()=>[{tag:"hr"}],renderHTML({HTMLAttributes:e}){return["hr",Bo(this.options.HTMLAttributes,e)]},addCommands(){return{setHorizontalRule:()=>({chain:e})=>e().insertContent({type:this.name}).command((({tr:e,dispatch:t})=>{var n;if(t){const{$to:t}=e.selection,r=t.end();if(t.nodeAfter)e.setSelection(St.create(e.doc,t.pos));else{const i=null===(n=t.parent.type.contentMatch.defaultType)||void 0===n?void 0:n.create();i&&(e.insert(r,i),e.setSelection(St.create(e.doc,r)))}e.scrollIntoView()}return!0})).run()}},addInputRules(){return[Ys({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),sI=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))$/,aI=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))/g,lI=/(?:^|\s)((?:_)((?:[^_]+))(?:_))$/,cI=/(?:^|\s)((?:_)((?:[^_]+))(?:_))/g,uI=Zs.create({name:"italic",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"em"},{tag:"i",getAttrs:e=>"normal"!==e.style.fontStyle&&null},{style:"font-style=italic"}],renderHTML({HTMLAttributes:e}){return["em",Bo(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[qs({find:sI,type:this.type}),qs({find:lI,type:this.type})]},addPasteRules(){return[Xs({find:aI,type:this.type}),Xs({find:cI,type:this.type})]}}),dI=Js.create({name:"listItem",addOptions:()=>({HTMLAttributes:{}}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:e}){return["li",Bo(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)}}}),pI=/^(\d+)\.\s$/,hI=Js.create({name:"orderedList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{}}),group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes:()=>({start:{default:1,parseHTML:e=>e.hasAttribute("start")?parseInt(e.getAttribute("start")||"",10):1}}),parseHTML:()=>[{tag:"ol"}],renderHTML({HTMLAttributes:e}){const{start:t,...n}=e;return 1===t?["ol",Bo(this.options.HTMLAttributes,n),0]:["ol",Bo(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()}},addInputRules(){return[Gs({find:pI,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1]})]}}),fI=Js.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:e}){return["p",Bo(this.options.HTMLAttributes,e),0]},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),mI=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))$/,gI=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))/g,bI=Zs.create({name:"strike",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:e=>!!e.includes("line-through")&&{}}],renderHTML({HTMLAttributes:e}){return["s",Bo(this.options.HTMLAttributes,e),0]},addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-x":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[qs({find:mI,type:this.type})]},addPasteRules(){return[Xs({find:gI,type:this.type})]}}),yI=Js.create({name:"text",group:"inline"}),vI=is.create({name:"starterKit",addExtensions(){var e,t,n,r,i,o,s,a,l,c,u,d,p,h,f,m,g,b;const y=[];return!1!==this.options.blockquote&&y.push(kT.configure(null===(e=this.options)||void 0===e?void 0:e.blockquote)),!1!==this.options.bold&&y.push(NT.configure(null===(t=this.options)||void 0===t?void 0:t.bold)),!1!==this.options.bulletList&&y.push(ST.configure(null===(n=this.options)||void 0===n?void 0:n.bulletList)),!1!==this.options.code&&y.push(YO.configure(null===(r=this.options)||void 0===r?void 0:r.code)),!1!==this.options.codeBlock&&y.push(LT.configure(null===(i=this.options)||void 0===i?void 0:i.codeBlock)),!1!==this.options.document&&y.push(jT.configure(null===(o=this.options)||void 0===o?void 0:o.document)),!1!==this.options.dropcursor&&y.push(PT.configure(null===(s=this.options)||void 0===s?void 0:s.dropcursor)),!1!==this.options.gapcursor&&y.push(LA.configure(null===(a=this.options)||void 0===a?void 0:a.gapcursor)),!1!==this.options.hardBreak&&y.push(jA.configure(null===(l=this.options)||void 0===l?void 0:l.hardBreak)),!1!==this.options.heading&&y.push(zA.configure(null===(c=this.options)||void 0===c?void 0:c.heading)),!1!==this.options.history&&y.push(iI.configure(null===(u=this.options)||void 0===u?void 0:u.history)),!1!==this.options.horizontalRule&&y.push(oI.configure(null===(d=this.options)||void 0===d?void 0:d.horizontalRule)),!1!==this.options.italic&&y.push(uI.configure(null===(p=this.options)||void 0===p?void 0:p.italic)),!1!==this.options.listItem&&y.push(dI.configure(null===(h=this.options)||void 0===h?void 0:h.listItem)),!1!==this.options.orderedList&&y.push(hI.configure(null===(f=this.options)||void 0===f?void 0:f.orderedList)),!1!==this.options.paragraph&&y.push(fI.configure(null===(m=this.options)||void 0===m?void 0:m.paragraph)),!1!==this.options.strike&&y.push(bI.configure(null===(g=this.options)||void 0===g?void 0:g.strike)),!1!==this.options.text&&y.push(yI.configure(null===(b=this.options)||void 0===b?void 0:b.text)),y}});function wI(e,t=[]){return e.map((e=>{const n=[...t,...e.properties?e.properties.className:[]];return e.children?wI(e.children,n):{text:e.value,classes:n}})).flat()}function xI(e){return e.value||e.children||[]}function EI({doc:e,name:t,lowlight:n,defaultLanguage:r}){const i=[];return $s(e,(e=>e.type.name===t)).forEach((e=>{let t=e.pos+1;const o=e.node.attrs.language||r,s=n.listLanguages();wI(o&&s.includes(o)?xI(n.highlight(o,e.node.textContent)):xI(n.highlightAuto(e.node.textContent))).forEach((e=>{const n=t+e.text.length;if(e.classes.length){const r=Ii.inline(t,n,{class:e.classes.join(" ")});i.push(r)}t=n}))})),zi.create(e,i)}function MI({name:e,lowlight:t,defaultLanguage:n}){if(!["highlight","highlightAuto","listLanguages"].every((e=>"function"==typeof t[e])))throw Error("You should provide an instance of lowlight to use the code-block-lowlight extension");const r=new Qt({key:new Jt("lowlight"),state:{init:(r,{doc:i})=>EI({doc:i,name:e,lowlight:t,defaultLanguage:n}),apply:(r,i,o,s)=>{const a=o.selection.$head.parent.type.name,l=s.selection.$head.parent.type.name,c=$s(o.doc,(t=>t.type.name===e)),u=$s(s.doc,(t=>t.type.name===e));return r.docChanged&&([a,l].includes(e)||u.length!==c.length||r.steps.some((e=>void 0!==e.from&&void 0!==e.to&&c.some((t=>t.pos>=e.from&&t.pos+t.node.nodeSize<=e.to)))))?EI({doc:r.doc,name:e,lowlight:t,defaultLanguage:n}):i.map(r.mapping,r.doc)}},props:{decorations:e=>r.getState(e)}});return r}const kI=LT.extend({addOptions(){var e;return{...null===(e=this.parent)||void 0===e?void 0:e.call(this),lowlight:{},defaultLanguage:null}},addProseMirrorPlugins(){var e;return[...(null===(e=this.parent)||void 0===e?void 0:e.call(this))||[],MI({name:this.name,lowlight:this.options.lowlight,defaultLanguage:this.options.defaultLanguage})]}});const _I=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],DI=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],CI=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],OI=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],NI=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inline-size","isolation","justify-content","left","letter-spacing","line-break","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","pause","pause-after","pause-before","perspective","perspective-origin","pointer-events","position","quotes","resize","rest","rest-after","rest-before","right","row-gap","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","speak","speak-as","src","tab-size","table-layout","text-align","text-align-all","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-box","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index"].reverse();var TI="[0-9](_*[0-9])*",SI=`\\.(${TI})`,AI="[0-9a-fA-F](_*[0-9a-fA-F])*",II={className:"number",variants:[{begin:`(\\b(${TI})((${SI})|\\.)?|(${SI}))`+`[eE][+-]?(${TI})[fFdD]?\\b`},{begin:`\\b(${TI})((${SI})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${SI})[fFdD]?\\b`},{begin:`\\b(${TI})[fFdD]\\b`},{begin:`\\b0[xX]((${AI})\\.?|(${AI})?\\.(${AI}))`+`[pP][+-]?(${TI})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${AI})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function LI(e,t,n){return-1===n?"":e.replace(t,(r=>LI(e,t,n-1)))}const jI="[A-Za-z$_][0-9A-Za-z$_]*",zI=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],FI=["true","false","null","undefined","NaN","Infinity"],PI=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],RI=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],BI=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],UI=["arguments","this","super","console","window","document","localStorage","module","global"],$I=[].concat(BI,PI,RI);var HI="[0-9](_*[0-9])*",WI=`\\.(${HI})`,VI="[0-9a-fA-F](_*[0-9a-fA-F])*",qI={className:"number",variants:[{begin:`(\\b(${HI})((${WI})|\\.)?|(${WI}))`+`[eE][+-]?(${HI})[fFdD]?\\b`},{begin:`\\b(${HI})((${WI})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${WI})[fFdD]?\\b`},{begin:`\\b(${HI})[fFdD]\\b`},{begin:`\\b0[xX]((${VI})\\.?|(${VI})?\\.(${VI}))`+`[pP][+-]?(${HI})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${VI})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};const YI=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],KI=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],QI=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],GI=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],ZI=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inline-size","isolation","justify-content","left","letter-spacing","line-break","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","pause","pause-after","pause-before","perspective","perspective-origin","pointer-events","position","quotes","resize","rest","rest-after","rest-before","right","row-gap","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","speak","speak-as","src","tab-size","table-layout","text-align","text-align-all","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-box","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index"].reverse(),JI=QI.concat(GI);const XI=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],eL=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],tL=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],nL=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],rL=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inline-size","isolation","justify-content","left","letter-spacing","line-break","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","pause","pause-after","pause-before","perspective","perspective-origin","pointer-events","position","quotes","resize","rest","rest-after","rest-before","right","row-gap","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","speak","speak-as","src","tab-size","table-layout","text-align","text-align-all","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-box","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index"].reverse();function iL(e){return e?"string"==typeof e?e:e.source:null}function oL(e){return sL("(?=",e,")")}function sL(...e){const t=e.map((e=>iL(e))).join("");return t}function aL(...e){const t=function(e){const t=e[e.length-1];return"object"==typeof t&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}(e),n="("+(t.capture?"":"?:")+e.map((e=>iL(e))).join("|")+")";return n}const lL=e=>sL(/\b/,e,/\w$/.test(e)?/\b/:/\B/),cL=["Protocol","Type"].map(lL),uL=["init","self"].map(lL),dL=["Any","Self"],pL=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","break","case","catch","class","continue","convenience","default","defer","deinit","didSet","distributed","do","dynamic","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],hL=["false","nil","true"],fL=["assignment","associativity","higherThan","left","lowerThan","none","right"],mL=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warn_unqualified_access","#warning"],gL=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],bL=aL(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),yL=aL(bL,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),vL=sL(bL,yL,"*"),wL=aL(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),xL=aL(wL,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),EL=sL(wL,xL,"*"),ML=sL(/[A-Z]/,xL,"*"),kL=["autoclosure",sL(/convention\(/,aL("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",sL(/objc\(/,EL,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","testable","UIApplicationMain","unknown","usableFromInline"],_L=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];const DL="[A-Za-z$_][0-9A-Za-z$_]*",CL=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],OL=["true","false","null","undefined","NaN","Infinity"],NL=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],TL=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],SL=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],AL=["arguments","this","super","console","window","document","localStorage","module","global"],IL=[].concat(SL,NL,TL);function LL(e){const t=e.regex,n=DL,r="<>",i="</>",o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{const n=e[0].length+e.index,r=e.input[n];if("<"===r||","===r)return void t.ignoreMatch();let i;">"===r&&(((e,{after:t})=>{const n="</"+e[0].slice(1);return-1!==e.input.indexOf(n,t)})(e,{after:n})||t.ignoreMatch());(i=e.input.substring(n).match(/^\s+extends\s+/))&&0===i.index&&t.ignoreMatch()}},s={$pattern:DL,keyword:CL,literal:OL,built_in:IL,"variable.language":AL},a="[0-9](_?[0-9])*",l=`\\.(${a})`,c=`0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*`,u={className:"number",variants:[{begin:`(\\b(${c})((${l})|\\.)?|(${l}))`+`[eE][+-]?(${a})\\b`},{begin:`\\b(${c})\\b((${l})\\b|\\.)?|(${l})\\b`},{begin:`\\b(0|[1-9](_?[0-9])*)n\\b`},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},d={className:"subst",begin:"\\$\\{",end:"\\}",keywords:s,contains:[]},p={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,d],subLanguage:"xml"}},h={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,d],subLanguage:"css"}},f={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,d]},m={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:n+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},g=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,h,f,u];d.contains=g.concat({begin:/\{/,end:/\}/,keywords:s,contains:["self"].concat(g)});const b=[].concat(m,d.contains),y=b.concat([{begin:/\(/,end:/\)/,keywords:s,contains:["self"].concat(b)}]),v={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:y},w={variants:[{match:[/class/,/\s+/,n,/\s+/,/extends/,/\s+/,t.concat(n,"(",t.concat(/\./,n),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,n],scope:{1:"keyword",3:"title.class"}}]},x={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...NL,...TL]}},E={variants:[{match:[/function/,/\s+/,n,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[v],illegal:/%/};const M={match:t.concat(/\b/,(k=[...SL,"super"],t.concat("(?!",k.join("|"),")")),n,t.lookahead(/\(/)),className:"title.function",relevance:0};var k;const _={begin:t.concat(/\./,t.lookahead(t.concat(n,/(?![0-9A-Za-z$_(])/))),end:n,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},D={match:[/get|set/,/\s+/,n,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},v]},C="(\\("+"[^()]*(\\("+"[^()]*(\\("+"[^()]*"+"\\)[^()]*)*"+"\\)[^()]*)*"+"\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",O={match:[/const|var|let/,/\s+/,n,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(C)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[v]};return{name:"Javascript",aliases:["js","jsx","mjs","cjs"],keywords:s,exports:{PARAMS_CONTAINS:y,CLASS_REFERENCE:x},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),{label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,h,f,m,u,x,{className:"attr",begin:n+t.lookahead(":"),relevance:0},O,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[m,e.REGEXP_MODE,{className:"function",begin:C,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:y}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:r,end:i},{match:/<[A-Za-z0-9\\._:-]+\s*\/>/},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0,contains:["self"]}]}]},E,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\("+"[^()]*(\\("+"[^()]*(\\("+"[^()]*"+"\\)[^()]*)*"+"\\)[^()]*)*"+"\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[v,e.inherit(e.TITLE_MODE,{begin:n,className:"title.function"})]},{match:/\.\.\./,relevance:0},_,{match:"\\$"+n,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[v]},M,{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},w,D,{match:/\$[(.]/}]}}var jL={exports:{}};function zL(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach((function(t){var n=e[t];"object"!=typeof n||Object.isFrozen(n)||zL(n)})),e}jL.exports=zL,jL.exports.default=zL;class FL{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function PL(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function RL(e,...t){const n=Object.create(null);for(const t in e)n[t]=e[t];return t.forEach((function(e){for(const t in e)n[t]=e[t]})),n}const BL="</span>",UL=e=>!!e.scope||e.sublanguage&&e.language;class $L{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=PL(e)}openNode(e){if(!UL(e))return;let t="";t=e.sublanguage?`language-${e.language}`:((e,{prefix:t})=>{if(e.includes(".")){const n=e.split(".");return[`${t}${n.shift()}`,...n.map(((e,t)=>`${e}${"_".repeat(t+1)}`))].join(" ")}return`${t}${e}`})(e.scope,{prefix:this.classPrefix}),this.span(t)}closeNode(e){UL(e)&&(this.buffer+=BL)}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}}const HL=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class WL{constructor(){this.rootNode=HL(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){const t=HL({scope:e});this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return"string"==typeof t?e.addText(t):t.children&&(e.openNode(t),t.children.forEach((t=>this._walk(e,t))),e.closeNode(t)),e}static _collapse(e){"string"!=typeof e&&e.children&&(e.children.every((e=>"string"==typeof e))?e.children=[e.children.join("")]:e.children.forEach((e=>{WL._collapse(e)})))}}class VL extends WL{constructor(e){super(),this.options=e}addKeyword(e,t){""!==e&&(this.openNode(t),this.addText(e),this.closeNode())}addText(e){""!==e&&this.add(e)}addSublanguage(e,t){const n=e.root;n.sublanguage=!0,n.language=t,this.add(n)}toHTML(){return new $L(this,this.options).value()}finalize(){return!0}}function qL(e){return e?"string"==typeof e?e:e.source:null}function YL(e){return GL("(?=",e,")")}function KL(e){return GL("(?:",e,")*")}function QL(e){return GL("(?:",e,")?")}function GL(...e){const t=e.map((e=>qL(e))).join("");return t}function ZL(...e){const t=function(e){const t=e[e.length-1];return"object"==typeof t&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}(e),n="("+(t.capture?"":"?:")+e.map((e=>qL(e))).join("|")+")";return n}function JL(e){return new RegExp(e.toString()+"|").exec("").length-1}const XL=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function ej(e,{joinWith:t}){let n=0;return e.map((e=>{n+=1;const t=n;let r=qL(e),i="";for(;r.length>0;){const e=XL.exec(r);if(!e){i+=r;break}i+=r.substring(0,e.index),r=r.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?i+="\\"+String(Number(e[1])+t):(i+=e[0],"("===e[0]&&n++)}return i})).map((e=>`(${e})`)).join(t)}const tj="[a-zA-Z]\\w*",nj="[a-zA-Z_]\\w*",rj="\\b\\d+(\\.\\d+)?",ij="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",oj="\\b(0b[01]+)",sj={begin:"\\\\[\\s\\S]",relevance:0},aj={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[sj]},lj={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[sj]},cj=function(e,t,n={}){const r=RL({scope:"comment",begin:e,end:t,contains:[]},n);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const i=ZL("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:GL(/[ ]+/,"(",i,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},uj=cj("//","$"),dj=cj("/\\*","\\*/"),pj=cj("#","$"),hj={scope:"number",begin:rj,relevance:0},fj={scope:"number",begin:ij,relevance:0},mj={scope:"number",begin:oj,relevance:0},gj={begin:/(?=\/[^/\n]*\/)/,contains:[{scope:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[sj,{begin:/\[/,end:/\]/,relevance:0,contains:[sj]}]}]},bj={scope:"title",begin:tj,relevance:0},yj={scope:"title",begin:nj,relevance:0},vj={begin:"\\.\\s*"+nj,relevance:0};var wj=Object.freeze({__proto__:null,MATCH_NOTHING_RE:/\b\B/,IDENT_RE:tj,UNDERSCORE_IDENT_RE:nj,NUMBER_RE:rj,C_NUMBER_RE:ij,BINARY_NUMBER_RE:oj,RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=GL(t,/.*\b/,e.binary,/\b.*/)),RL({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{0!==e.index&&t.ignoreMatch()}},e)},BACKSLASH_ESCAPE:sj,APOS_STRING_MODE:aj,QUOTE_STRING_MODE:lj,PHRASAL_WORDS_MODE:{begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},COMMENT:cj,C_LINE_COMMENT_MODE:uj,C_BLOCK_COMMENT_MODE:dj,HASH_COMMENT_MODE:pj,NUMBER_MODE:hj,C_NUMBER_MODE:fj,BINARY_NUMBER_MODE:mj,REGEXP_MODE:gj,TITLE_MODE:bj,UNDERSCORE_TITLE_MODE:yj,METHOD_GUARD:vj,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})}});function xj(e,t){"."===e.input[e.index-1]&&t.ignoreMatch()}function Ej(e,t){void 0!==e.className&&(e.scope=e.className,delete e.className)}function Mj(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=xj,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,void 0===e.relevance&&(e.relevance=0))}function kj(e,t){Array.isArray(e.illegal)&&(e.illegal=ZL(...e.illegal))}function _j(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function Dj(e,t){void 0===e.relevance&&(e.relevance=1)}const Cj=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const n=Object.assign({},e);Object.keys(e).forEach((t=>{delete e[t]})),e.keywords=n.keywords,e.begin=GL(n.beforeMatch,YL(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},Oj=["of","and","for","in","not","or","if","then","parent","list","value"],Nj="keyword";function Tj(e,t,n=Nj){const r=Object.create(null);return"string"==typeof e?i(n,e.split(" ")):Array.isArray(e)?i(n,e):Object.keys(e).forEach((function(n){Object.assign(r,Tj(e[n],t,n))})),r;function i(e,n){t&&(n=n.map((e=>e.toLowerCase()))),n.forEach((function(t){const n=t.split("|");r[n[0]]=[e,Sj(n[0],n[1])]}))}}function Sj(e,t){return t?Number(t):function(e){return Oj.includes(e.toLowerCase())}(e)?0:1}const Aj={},Ij=e=>{console.error(e)},Lj=(e,...t)=>{console.log(`WARN: ${e}`,...t)},jj=(e,t)=>{Aj[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),Aj[`${e}/${t}`]=!0)},zj=new Error;function Fj(e,t,{key:n}){let r=0;const i=e[n],o={},s={};for(let e=1;e<=t.length;e++)s[e+r]=i[e],o[e+r]=!0,r+=JL(t[e-1]);e[n]=s,e[n]._emit=o,e[n]._multi=!0}function Pj(e){!function(e){e.scope&&"object"==typeof e.scope&&null!==e.scope&&(e.beginScope=e.scope,delete e.scope)}(e),"string"==typeof e.beginScope&&(e.beginScope={_wrap:e.beginScope}),"string"==typeof e.endScope&&(e.endScope={_wrap:e.endScope}),function(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw Ij("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),zj;if("object"!=typeof e.beginScope||null===e.beginScope)throw Ij("beginScope must be object"),zj;Fj(e,e.begin,{key:"beginScope"}),e.begin=ej(e.begin,{joinWith:""})}}(e),function(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw Ij("skip, excludeEnd, returnEnd not compatible with endScope: {}"),zj;if("object"!=typeof e.endScope||null===e.endScope)throw Ij("endScope must be object"),zj;Fj(e,e.end,{key:"endScope"}),e.end=ej(e.end,{joinWith:""})}}(e)}function Rj(e){function t(t,n){return new RegExp(qL(t),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(n?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,t){t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),this.matchAt+=JL(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const e=this.regexes.map((e=>e[1]));this.matcherRe=t(ej(e,{joinWith:"|"}),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;const t=this.matcherRe.exec(e);if(!t)return null;const n=t.findIndex(((e,t)=>t>0&&void 0!==e)),r=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,r)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];const t=new n;return this.rules.slice(e).forEach((([e,n])=>t.addRule(e,n))),t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,t){this.rules.push([e,t]),"begin"===t.type&&this.count++}exec(e){const t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex;let n=t.exec(e);if(this.resumingScanAtSamePosition())if(n&&n.index===this.lastIndex);else{const t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)}return n&&(this.regexIndex+=n.position+1,this.regexIndex===this.count&&this.considerAll()),n}}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=RL(e.classNameAliases||{}),function n(i,o){const s=i;if(i.isCompiled)return s;[Ej,_j,Pj,Cj].forEach((e=>e(i,o))),e.compilerExtensions.forEach((e=>e(i,o))),i.__beforeBegin=null,[Mj,kj,Dj].forEach((e=>e(i,o))),i.isCompiled=!0;let a=null;return"object"==typeof i.keywords&&i.keywords.$pattern&&(i.keywords=Object.assign({},i.keywords),a=i.keywords.$pattern,delete i.keywords.$pattern),a=a||/\w+/,i.keywords&&(i.keywords=Tj(i.keywords,e.case_insensitive)),s.keywordPatternRe=t(a,!0),o&&(i.begin||(i.begin=/\B|\b/),s.beginRe=t(s.begin),i.end||i.endsWithParent||(i.end=/\B|\b/),i.end&&(s.endRe=t(s.end)),s.terminatorEnd=qL(s.end)||"",i.endsWithParent&&o.terminatorEnd&&(s.terminatorEnd+=(i.end?"|":"")+o.terminatorEnd)),i.illegal&&(s.illegalRe=t(i.illegal)),i.contains||(i.contains=[]),i.contains=[].concat(...i.contains.map((function(e){return function(e){e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map((function(t){return RL(e,{variants:null},t)})));if(e.cachedVariants)return e.cachedVariants;if(Bj(e))return RL(e,{starts:e.starts?RL(e.starts):null});if(Object.isFrozen(e))return RL(e);return e}("self"===e?i:e)}))),i.contains.forEach((function(e){n(e,s)})),i.starts&&n(i.starts,o),s.matcher=function(e){const t=new r;return e.contains.forEach((e=>t.addRule(e.begin,{rule:e,type:"begin"}))),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:"end"}),e.illegal&&t.addRule(e.illegal,{type:"illegal"}),t}(s),s}(e)}function Bj(e){return!!e&&(e.endsWithParent||Bj(e.starts))}var Uj="11.6.0";class $j extends Error{constructor(e,t){super(e),this.name="HTMLInjectionError",this.html=t}}const Hj=PL,Wj=RL,Vj=Symbol("nomatch"),qj=7;var Yj=function(e){const t=Object.create(null),n=Object.create(null),r=[];let i=!0;const o="Could not find the language '{}', did you forget to load/include a language module?",s={disableAutodetect:!0,name:"Plain text",contains:[]};let a={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:VL};function l(e){return a.noHighlightRe.test(e)}function c(e,t,n){let r="",i="";"object"==typeof t?(r=e,n=t.ignoreIllegals,i=t.language):(jj("10.7.0","highlight(lang, code, ...args) has been deprecated."),jj("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),i=e,r=t),void 0===n&&(n=!0);const o={code:r,language:i};y("before:highlight",o);const s=o.result?o.result:u(o.language,o.code,n);return s.code=o.code,y("after:highlight",s),s}function u(e,n,r,s){const l=Object.create(null);function c(){if(!k.keywords)return void D.addText(C);let e=0;k.keywordPatternRe.lastIndex=0;let t=k.keywordPatternRe.exec(C),n="";for(;t;){n+=C.substring(e,t.index);const i=x.case_insensitive?t[0].toLowerCase():t[0],o=(r=i,k.keywords[r]);if(o){const[e,r]=o;if(D.addText(n),n="",l[i]=(l[i]||0)+1,l[i]<=qj&&(O+=r),e.startsWith("_"))n+=t[0];else{const n=x.classNameAliases[e]||e;D.addKeyword(t[0],n)}}else n+=t[0];e=k.keywordPatternRe.lastIndex,t=k.keywordPatternRe.exec(C)}var r;n+=C.substring(e),D.addText(n)}function p(){null!=k.subLanguage?function(){if(""===C)return;let e=null;if("string"==typeof k.subLanguage){if(!t[k.subLanguage])return void D.addText(C);e=u(k.subLanguage,C,!0,_[k.subLanguage]),_[k.subLanguage]=e._top}else e=d(C,k.subLanguage.length?k.subLanguage:null);k.relevance>0&&(O+=e.relevance),D.addSublanguage(e._emitter,e.language)}():c(),C=""}function h(e,t){let n=1;const r=t.length-1;for(;n<=r;){if(!e._emit[n]){n++;continue}const r=x.classNameAliases[e[n]]||e[n],i=t[n];r?D.addKeyword(i,r):(C=i,c(),C=""),n++}}function f(e,t){return e.scope&&"string"==typeof e.scope&&D.openNode(x.classNameAliases[e.scope]||e.scope),e.beginScope&&(e.beginScope._wrap?(D.addKeyword(C,x.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap),C=""):e.beginScope._multi&&(h(e.beginScope,t),C="")),k=Object.create(e,{parent:{value:k}}),k}function g(e,t,n){let r=function(e,t){const n=e&&e.exec(t);return n&&0===n.index}(e.endRe,n);if(r){if(e["on:end"]){const n=new FL(e);e["on:end"](t,n),n.isMatchIgnored&&(r=!1)}if(r){for(;e.endsParent&&e.parent;)e=e.parent;return e}}if(e.endsWithParent)return g(e.parent,t,n)}function b(e){return 0===k.matcher.regexIndex?(C+=e[0],1):(S=!0,0)}function y(e){const t=e[0],r=n.substring(e.index),i=g(k,e,r);if(!i)return Vj;const o=k;k.endScope&&k.endScope._wrap?(p(),D.addKeyword(t,k.endScope._wrap)):k.endScope&&k.endScope._multi?(p(),h(k.endScope,e)):o.skip?C+=t:(o.returnEnd||o.excludeEnd||(C+=t),p(),o.excludeEnd&&(C=t));do{k.scope&&D.closeNode(),k.skip||k.subLanguage||(O+=k.relevance),k=k.parent}while(k!==i.parent);return i.starts&&f(i.starts,e),o.returnEnd?0:t.length}let v={};function w(t,o){const s=o&&o[0];if(C+=t,null==s)return p(),0;if("begin"===v.type&&"end"===o.type&&v.index===o.index&&""===s){if(C+=n.slice(o.index,o.index+1),!i){const t=new Error(`0 width match regex (${e})`);throw t.languageName=e,t.badRule=v.rule,t}return 1}if(v=o,"begin"===o.type)return function(e){const t=e[0],n=e.rule,r=new FL(n),i=[n.__beforeBegin,n["on:begin"]];for(const n of i)if(n&&(n(e,r),r.isMatchIgnored))return b(t);return n.skip?C+=t:(n.excludeBegin&&(C+=t),p(),n.returnBegin||n.excludeBegin||(C=t)),f(n,e),n.returnBegin?0:t.length}(o);if("illegal"===o.type&&!r){const e=new Error('Illegal lexeme "'+s+'" for mode "'+(k.scope||"<unnamed>")+'"');throw e.mode=k,e}if("end"===o.type){const e=y(o);if(e!==Vj)return e}if("illegal"===o.type&&""===s)return 1;if(T>1e5&&T>3*o.index){throw new Error("potential infinite loop, way more iterations than matches")}return C+=s,s.length}const x=m(e);if(!x)throw Ij(o.replace("{}",e)),new Error('Unknown language: "'+e+'"');const E=Rj(x);let M="",k=s||E;const _={},D=new a.__emitter(a);!function(){const e=[];for(let t=k;t!==x;t=t.parent)t.scope&&e.unshift(t.scope);e.forEach((e=>D.openNode(e)))}();let C="",O=0,N=0,T=0,S=!1;try{for(k.matcher.considerAll();;){T++,S?S=!1:k.matcher.considerAll(),k.matcher.lastIndex=N;const e=k.matcher.exec(n);if(!e)break;const t=w(n.substring(N,e.index),e);N=e.index+t}return w(n.substring(N)),D.closeAllNodes(),D.finalize(),M=D.toHTML(),{language:e,value:M,relevance:O,illegal:!1,_emitter:D,_top:k}}catch(t){if(t.message&&t.message.includes("Illegal"))return{language:e,value:Hj(n),illegal:!0,relevance:0,_illegalBy:{message:t.message,index:N,context:n.slice(N-100,N+100),mode:t.mode,resultSoFar:M},_emitter:D};if(i)return{language:e,value:Hj(n),illegal:!1,relevance:0,errorRaised:t,_emitter:D,_top:k};throw t}}function d(e,n){n=n||a.languages||Object.keys(t);const r=function(e){const t={value:Hj(e),illegal:!1,relevance:0,_top:s,_emitter:new a.__emitter(a)};return t._emitter.addText(e),t}(e),i=n.filter(m).filter(b).map((t=>u(t,e,!1)));i.unshift(r);const o=i.sort(((e,t)=>{if(e.relevance!==t.relevance)return t.relevance-e.relevance;if(e.language&&t.language){if(m(e.language).supersetOf===t.language)return 1;if(m(t.language).supersetOf===e.language)return-1}return 0})),[l,c]=o,d=l;return d.secondBest=c,d}function p(e){let t=null;const r=function(e){let t=e.className+" ";t+=e.parentNode?e.parentNode.className:"";const n=a.languageDetectRe.exec(t);if(n){const t=m(n[1]);return t||(Lj(o.replace("{}",n[1])),Lj("Falling back to no-highlight mode for this block.",e)),t?n[1]:"no-highlight"}return t.split(/\s+/).find((e=>l(e)||m(e)))}(e);if(l(r))return;if(y("before:highlightElement",{el:e,language:r}),e.children.length>0&&(a.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(e)),a.throwUnescapedHTML)){throw new $j("One of your code blocks includes unescaped HTML.",e.innerHTML)}t=e;const i=t.textContent,s=r?c(i,{language:r,ignoreIllegals:!0}):d(i);e.innerHTML=s.value,function(e,t,r){const i=t&&n[t]||r;e.classList.add("hljs"),e.classList.add(`language-${i}`)}(e,r,s.language),e.result={language:s.language,re:s.relevance,relevance:s.relevance},s.secondBest&&(e.secondBest={language:s.secondBest.language,relevance:s.secondBest.relevance}),y("after:highlightElement",{el:e,result:s,text:i})}let h=!1;function f(){if("loading"===document.readyState)return void(h=!0);document.querySelectorAll(a.cssSelector).forEach(p)}function m(e){return e=(e||"").toLowerCase(),t[e]||t[n[e]]}function g(e,{languageName:t}){"string"==typeof e&&(e=[e]),e.forEach((e=>{n[e.toLowerCase()]=t}))}function b(e){const t=m(e);return t&&!t.disableAutodetect}function y(e,t){const n=e;r.forEach((function(e){e[n]&&e[n](t)}))}"undefined"!=typeof window&&window.addEventListener&&window.addEventListener("DOMContentLoaded",(function(){h&&f()}),!1),Object.assign(e,{highlight:c,highlightAuto:d,highlightAll:f,highlightElement:p,highlightBlock:function(e){return jj("10.7.0","highlightBlock will be removed entirely in v12.0"),jj("10.7.0","Please use highlightElement now."),p(e)},configure:function(e){a=Wj(a,e)},initHighlighting:()=>{f(),jj("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")},initHighlightingOnLoad:function(){f(),jj("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")},registerLanguage:function(n,r){let o=null;try{o=r(e)}catch(e){if(Ij("Language definition for '{}' could not be registered.".replace("{}",n)),!i)throw e;Ij(e),o=s}o.name||(o.name=n),t[n]=o,o.rawDefinition=r.bind(null,e),o.aliases&&g(o.aliases,{languageName:n})},unregisterLanguage:function(e){delete t[e];for(const t of Object.keys(n))n[t]===e&&delete n[t]},listLanguages:function(){return Object.keys(t)},getLanguage:m,registerAliases:g,autoDetection:b,inherit:Wj,addPlugin:function(e){!function(e){e["before:highlightBlock"]&&!e["before:highlightElement"]&&(e["before:highlightElement"]=t=>{e["before:highlightBlock"](Object.assign({block:t.el},t))}),e["after:highlightBlock"]&&!e["after:highlightElement"]&&(e["after:highlightElement"]=t=>{e["after:highlightBlock"](Object.assign({block:t.el},t))})}(e),r.push(e)}}),e.debugMode=function(){i=!1},e.safeMode=function(){i=!0},e.versionString=Uj,e.regex={concat:GL,lookahead:YL,either:ZL,optional:QL,anyNumberOfTimes:KL};for(const e in wj)"object"==typeof wj[e]&&jL.exports(wj[e]);return Object.assign(e,wj),e}({}),Kj=Yj;Yj.HighlightJS=Yj,Yj.default=Yj;var Qj={exports:{}};!function(e){!function(){var t;function n(e){for(var t,n,r,i,o=1,s=[].slice.call(arguments),a=0,l=e.length,c="",u=!1,d=!1,p=function(){return s[o++]},h=function(){for(var n="";/\d/.test(e[a]);)n+=e[a++],t=e[a];return n.length>0?parseInt(n):null};a<l;++a)if(t=e[a],u)switch(u=!1,"."==t?(d=!1,t=e[++a]):"0"==t&&"."==e[a+1]?(d=!0,t=e[a+=2]):d=!0,i=h(),t){case"b":c+=parseInt(p(),10).toString(2);break;case"c":c+="string"==typeof(n=p())||n instanceof String?n:String.fromCharCode(parseInt(n,10));break;case"d":c+=parseInt(p(),10);break;case"f":r=String(parseFloat(p()).toFixed(i||6)),c+=d?r:r.replace(/^0/,"");break;case"j":c+=JSON.stringify(p());break;case"o":c+="0"+parseInt(p(),10).toString(8);break;case"s":c+=p();break;case"x":c+="0x"+parseInt(p(),10).toString(16);break;case"X":c+="0x"+parseInt(p(),10).toString(16).toUpperCase();break;default:c+=t}else"%"===t?u=!0:c+=t;return c}(t=e.exports=n).format=n,t.vsprintf=function(e,t){return n.apply(null,[e].concat(t))},"undefined"!=typeof console&&"function"==typeof console.log&&(t.printf=function(){console.log(n.apply(null,arguments))})}()}(Qj);var Gj=Qj.exports;const Zj=Object.assign(Jj(Error),{eval:Jj(EvalError),range:Jj(RangeError),reference:Jj(ReferenceError),syntax:Jj(SyntaxError),type:Jj(TypeError),uri:Jj(URIError)});function Jj(e){return t.displayName=e.displayName||e.name,t;function t(t,...n){const r=t?Gj(t,...n):t;return new e(r)}}const Xj={}.hasOwnProperty,ez="hljs-";function tz(e,t,n={}){let r=n.prefix;if("string"!=typeof e)throw Zj("Expected `string` for name, got `%s`",e);if(!Kj.getLanguage(e))throw Zj("Unknown language: `%s` is not registered",e);if("string"!=typeof t)throw Zj("Expected `string` for value, got `%s`",t);null==r&&(r=ez),Kj.configure({__emitter:nz,classPrefix:r});const i=Kj.highlight(t,{language:e,ignoreIllegals:!0});if(Kj.configure({}),i.errorRaised)throw i.errorRaised;return i._emitter.root.data.language=i.language,i._emitter.root.data.relevance=i.relevance,i._emitter.root}class nz{constructor(e){this.options=e,this.root={type:"root",data:{language:null,relevance:0},children:[]},this.stack=[this.root]}addText(e){if(""===e)return;const t=this.stack[this.stack.length-1],n=t.children[t.children.length-1];n&&"text"===n.type?n.value+=e:t.children.push({type:"text",value:e})}addKeyword(e,t){this.openNode(t),this.addText(e),this.closeNode()}addSublanguage(e,t){const n=this.stack[this.stack.length-1],r=e.root.children;t?n.children.push({type:"element",tagName:"span",properties:{className:[t]},children:r}):n.children.push(...r)}openNode(e){const t=e.split(".").map(((e,t)=>t?e+"_".repeat(t):this.options.classPrefix+e)),n={type:"element",tagName:"span",properties:{className:t},children:[]};this.stack[this.stack.length-1].children.push(n),this.stack.push(n)}closeNode(){this.stack.pop()}closeAllNodes(){}finalize(){}toHTML(){return""}}const rz={highlight:tz,highlightAuto:function(e,t={}){const n=t.subset||Kj.listLanguages();t.prefix;let r=-1,i={type:"root",data:{language:null,relevance:0},children:[]};if("string"!=typeof e)throw Zj("Expected `string` for value, got `%s`",e);for(;++r<n.length;){const o=n[r];if(!Kj.getLanguage(o))continue;const s=tz(o,e,t);s.data.relevance>i.data.relevance&&(i=s)}return i},registerLanguage:function(e,t){Kj.registerLanguage(e,t)},registered:function(e){return Boolean(Kj.getLanguage(e))},listLanguages:function(){return Kj.listLanguages()},registerAlias:function(e,t){if("string"==typeof e)Kj.registerAliases(t,{languageName:e});else{let t;for(t in e)Xj.call(e,t)&&Kj.registerAliases(e[t],{languageName:t})}}};rz.registerLanguage("arduino",(function(e){const t={type:["boolean","byte","word","String"],built_in:["KeyboardController","MouseController","SoftwareSerial","EthernetServer","EthernetClient","LiquidCrystal","RobotControl","GSMVoiceCall","EthernetUDP","EsploraTFT","HttpClient","RobotMotor","WiFiClient","GSMScanner","FileSystem","Scheduler","GSMServer","YunClient","YunServer","IPAddress","GSMClient","GSMModem","Keyboard","Ethernet","Console","GSMBand","Esplora","Stepper","Process","WiFiUDP","GSM_SMS","Mailbox","USBHost","Firmata","PImage","Client","Server","GSMPIN","FileIO","Bridge","Serial","EEPROM","Stream","Mouse","Audio","Servo","File","Task","GPRS","WiFi","Wire","TFT","GSM","SPI","SD"],_hints:["setup","loop","runShellCommandAsynchronously","analogWriteResolution","retrieveCallingNumber","printFirmwareVersion","analogReadResolution","sendDigitalPortPair","noListenOnLocalhost","readJoystickButton","setFirmwareVersion","readJoystickSwitch","scrollDisplayRight","getVoiceCallStatus","scrollDisplayLeft","writeMicroseconds","delayMicroseconds","beginTransmission","getSignalStrength","runAsynchronously","getAsynchronously","listenOnLocalhost","getCurrentCarrier","readAccelerometer","messageAvailable","sendDigitalPorts","lineFollowConfig","countryNameWrite","runShellCommand","readStringUntil","rewindDirectory","readTemperature","setClockDivider","readLightSensor","endTransmission","analogReference","detachInterrupt","countryNameRead","attachInterrupt","encryptionType","readBytesUntil","robotNameWrite","readMicrophone","robotNameRead","cityNameWrite","userNameWrite","readJoystickY","readJoystickX","mouseReleased","openNextFile","scanNetworks","noInterrupts","digitalWrite","beginSpeaker","mousePressed","isActionDone","mouseDragged","displayLogos","noAutoscroll","addParameter","remoteNumber","getModifiers","keyboardRead","userNameRead","waitContinue","processInput","parseCommand","printVersion","readNetworks","writeMessage","blinkVersion","cityNameRead","readMessage","setDataMode","parsePacket","isListening","setBitOrder","beginPacket","isDirectory","motorsWrite","drawCompass","digitalRead","clearScreen","serialEvent","rightToLeft","setTextSize","leftToRight","requestFrom","keyReleased","compassRead","analogWrite","interrupts","WiFiServer","disconnect","playMelody","parseFloat","autoscroll","getPINUsed","setPINUsed","setTimeout","sendAnalog","readSlider","analogRead","beginWrite","createChar","motorsStop","keyPressed","tempoWrite","readButton","subnetMask","debugPrint","macAddress","writeGreen","randomSeed","attachGPRS","readString","sendString","remotePort","releaseAll","mouseMoved","background","getXChange","getYChange","answerCall","getResult","voiceCall","endPacket","constrain","getSocket","writeJSON","getButton","available","connected","findUntil","readBytes","exitValue","readGreen","writeBlue","startLoop","IPAddress","isPressed","sendSysex","pauseMode","gatewayIP","setCursor","getOemKey","tuneWrite","noDisplay","loadImage","switchPIN","onRequest","onReceive","changePIN","playFile","noBuffer","parseInt","overflow","checkPIN","knobRead","beginTFT","bitClear","updateIR","bitWrite","position","writeRGB","highByte","writeRed","setSpeed","readBlue","noStroke","remoteIP","transfer","shutdown","hangCall","beginSMS","endWrite","attached","maintain","noCursor","checkReg","checkPUK","shiftOut","isValid","shiftIn","pulseIn","connect","println","localIP","pinMode","getIMEI","display","noBlink","process","getBand","running","beginSD","drawBMP","lowByte","setBand","release","bitRead","prepare","pointTo","readRed","setMode","noFill","remove","listen","stroke","detach","attach","noTone","exists","buffer","height","bitSet","circle","config","cursor","random","IRread","setDNS","endSMS","getKey","micros","millis","begin","print","write","ready","flush","width","isPIN","blink","clear","press","mkdir","rmdir","close","point","yield","image","BSSID","click","delay","read","text","move","peek","beep","rect","line","open","seek","fill","size","turn","stop","home","find","step","tone","sqrt","RSSI","SSID","end","bit","tan","cos","sin","pow","map","abs","max","min","get","run","put"],literal:["DIGITAL_MESSAGE","FIRMATA_STRING","ANALOG_MESSAGE","REPORT_DIGITAL","REPORT_ANALOG","INPUT_PULLUP","SET_PIN_MODE","INTERNAL2V56","SYSTEM_RESET","LED_BUILTIN","INTERNAL1V1","SYSEX_START","INTERNAL","EXTERNAL","DEFAULT","OUTPUT","INPUT","HIGH","LOW"]},n=function(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",o="(?!struct)("+r+"|"+t.optional(i)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",s={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},a={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},l={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},c={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line "+"pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(a,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},u={className:"title",begin:t.optional(i)+e.IDENT_RE,relevance:0},d=t.optional(i)+e.IDENT_RE+"\\s*\\(",p={type:["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],keyword:["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"]},h={className:"function.dispatch",relevance:0,keywords:{_hint:["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"]},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},f=[h,c,s,n,e.C_BLOCK_COMMENT_MODE,l,a],m={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:p,contains:f.concat([{begin:/\(/,end:/\)/,keywords:p,contains:f.concat(["self"]),relevance:0}]),relevance:0},g={className:"function",begin:"("+o+"[\\*&\\s]+)+"+d,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:p,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:p,relevance:0},{begin:d,returnBegin:!0,contains:[u],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[a,l]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:p,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,a,l,s,{begin:/\(/,end:/\)/,keywords:p,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,a,l,s]}]},s,n,e.C_BLOCK_COMMENT_MODE,c]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:p,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(m,g,h,f,[c,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function)\\s*<(?!<)",end:">",keywords:p,contains:["self",s]},{begin:e.IDENT_RE+"::",keywords:p},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}(e),r=n.keywords;return r.type=[...r.type,...t.type],r.literal=[...r.literal,...t.literal],r.built_in=[...r.built_in,...t.built_in],r._hints=t._hints,n.name="Arduino",n.aliases=["ino"],n.supersetOf="cpp",n})),rz.registerLanguage("bash",(function(e){const t=e.regex,n={},r={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,`(?![\\w\\d])(?![$])`)},r]});const i={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},o={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},s={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,i]};i.contains.push(s);const a={begin:/\$\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},l=e.SHEBANG({binary:`(${["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"].join("|")})`,relevance:10}),c={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0};return{name:"Bash",aliases:["sh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:["if","then","else","elif","fi","for","while","in","do","done","case","esac","function"],literal:["true","false"],built_in:["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset","alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","type","typeset","ulimit","unalias","set","shopt","autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp","chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"]},contains:[l,e.SHEBANG(),c,a,e.HASH_COMMENT_MODE,o,{match:/(\/[a-z._-]+)+/},s,{className:"",begin:/\\"/},{className:"string",begin:/'/,end:/'/},n]}})),rz.registerLanguage("c",(function(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",o="("+r+"|"+t.optional(i)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",s={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},a={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},l={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},c={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line "+"pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(a,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},u={className:"title",begin:t.optional(i)+e.IDENT_RE,relevance:0},d=t.optional(i)+e.IDENT_RE+"\\s*\\(",p={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal128","const","static","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream "+"auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set "+"unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos "+"asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp "+"fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper "+"isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow "+"printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp "+"strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan "+"vfprintf vprintf vsprintf endl initializer_list unique_ptr"},h=[c,s,n,e.C_BLOCK_COMMENT_MODE,l,a],f={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:p,contains:h.concat([{begin:/\(/,end:/\)/,keywords:p,contains:h.concat(["self"]),relevance:0}]),relevance:0},m={begin:"("+o+"[\\*&\\s]+)+"+d,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:p,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:p,relevance:0},{begin:d,returnBegin:!0,contains:[e.inherit(u,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:p,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,a,l,s,{begin:/\(/,end:/\)/,keywords:p,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,a,l,s]}]},s,n,e.C_BLOCK_COMMENT_MODE,c]};return{name:"C",aliases:["h"],keywords:p,disableAutodetect:!0,illegal:"</",contains:[].concat(f,m,h,[c,{begin:e.IDENT_RE+"::",keywords:p},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:c,strings:a,keywords:p}}})),rz.registerLanguage("cpp",(function(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",o="(?!struct)("+r+"|"+t.optional(i)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",s={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},a={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},l={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},c={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line "+"pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(a,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},u={className:"title",begin:t.optional(i)+e.IDENT_RE,relevance:0},d=t.optional(i)+e.IDENT_RE+"\\s*\\(",p={type:["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],keyword:["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"]},h={className:"function.dispatch",relevance:0,keywords:{_hint:["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"]},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},f=[h,c,s,n,e.C_BLOCK_COMMENT_MODE,l,a],m={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:p,contains:f.concat([{begin:/\(/,end:/\)/,keywords:p,contains:f.concat(["self"]),relevance:0}]),relevance:0},g={className:"function",begin:"("+o+"[\\*&\\s]+)+"+d,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:p,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:p,relevance:0},{begin:d,returnBegin:!0,contains:[u],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[a,l]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:p,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,a,l,s,{begin:/\(/,end:/\)/,keywords:p,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,a,l,s]}]},s,n,e.C_BLOCK_COMMENT_MODE,c]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:p,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(m,g,h,f,[c,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function)\\s*<(?!<)",end:">",keywords:p,contains:["self",s]},{begin:e.IDENT_RE+"::",keywords:p},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}})),rz.registerLanguage("csharp",(function(e){const t={keyword:["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"].concat(["add","alias","and","ascending","async","await","by","descending","equals","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","remove","select","set","unmanaged","value|0","var","when","where","with","yield"]),built_in:["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],literal:["default","false","null","true"]},n=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),r={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},i={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},o=e.inherit(i,{illegal:/\n/}),s={className:"subst",begin:/\{/,end:/\}/,keywords:t},a=e.inherit(s,{illegal:/\n/}),l={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,a]},c={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},s]},u=e.inherit(c,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},a]});s.contains=[c,l,i,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,r,e.C_BLOCK_COMMENT_MODE],a.contains=[u,l,o,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,r,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const d={variants:[c,l,i,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},p={begin:"<",end:">",contains:[{beginKeywords:"in out"},n]},h=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",f={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:t,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"\x3c!--|--\x3e"},{begin:"</?",end:">"}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},d,r,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},n,p,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[n,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[n,p,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+h+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:t,contains:[{beginKeywords:["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"].join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,p],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:t,relevance:0,contains:[d,r,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},f]}})),rz.registerLanguage("css",(function(e){const t=e.regex,n=(e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"("+"%|em|ex|ch|rem"+"|vw|vh|vmin|vmax"+"|cm|mm|in|pt|pc|px"+"|deg|grad|rad|turn"+"|s|ms"+"|Hz|kHz"+"|dpi|dpcm|dppx"+")?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z][A-Za-z0-9_-]*/}}))(e),r=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[n.BLOCK_COMMENT,{begin:/-(webkit|moz|ms|o)-(?=[a-z])/},n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+"[a-zA-Z-][a-zA-Z0-9_-]*",relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+CI.join("|")+")"},{begin:":(:)?("+OI.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+NI.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...r,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...r,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:/@-?\w[\w]*(-\w+)*/},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:"and or not only",attribute:DI.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...r,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+_I.join("|")+")\\b"}]}})),rz.registerLanguage("diff",(function(e){const t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}})),rz.registerLanguage("go",(function(e){const t={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:t,illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{begin:e.C_NUMBER_RE+"[i]",relevance:1},e.C_NUMBER_MODE]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,illegal:/["']/}]}]}})),rz.registerLanguage("graphql",(function(e){const t=e.regex;return{name:"GraphQL",aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"],literal:["true","false","null"]},contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation",begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{scope:"symbol",begin:t.concat(/[_A-Za-z][_0-9A-Za-z]*/,t.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}})),rz.registerLanguage("ini",(function(e){const t=e.regex,n={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:e.NUMBER_RE}]},r=e.COMMENT();r.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const i={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},o={className:"literal",begin:/\bon|off|true|false|yes|no\b/},s={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},a={begin:/\[/,end:/\]/,contains:[r,o,i,s,n,"self"],relevance:0},l=t.either(/[A-Za-z0-9_-]+/,/"(\\"|[^"])*"/,/'[^']*'/);return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[r,{className:"section",begin:/\[+/,end:/\]+/},{begin:t.concat(l,"(\\s*\\.\\s*",l,")*",t.lookahead(/\s*=\s*[^#\s]/)),className:"attr",starts:{end:/$/,contains:[r,a,o,i,s,n]}}]}})),rz.registerLanguage("java",(function(e){const t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",r=n+LI("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),i={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},o={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},s={className:"params",begin:/\(/,end:/\)/,keywords:i,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:i,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[s,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+r+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:i,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:i,relevance:0,contains:[o,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,II,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},II,o]}})),rz.registerLanguage("javascript",(function(e){const t=e.regex,n=jI,r="<>",i="</>",o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{const n=e[0].length+e.index,r=e.input[n];if("<"===r||","===r)return void t.ignoreMatch();let i;">"===r&&(((e,{after:t})=>{const n="</"+e[0].slice(1);return-1!==e.input.indexOf(n,t)})(e,{after:n})||t.ignoreMatch());(i=e.input.substring(n).match(/^\s+extends\s+/))&&0===i.index&&t.ignoreMatch()}},s={$pattern:jI,keyword:zI,literal:FI,built_in:$I,"variable.language":UI},a="[0-9](_?[0-9])*",l=`\\.(${a})`,c=`0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*`,u={className:"number",variants:[{begin:`(\\b(${c})((${l})|\\.)?|(${l}))`+`[eE][+-]?(${a})\\b`},{begin:`\\b(${c})\\b((${l})\\b|\\.)?|(${l})\\b`},{begin:`\\b(0|[1-9](_?[0-9])*)n\\b`},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},d={className:"subst",begin:"\\$\\{",end:"\\}",keywords:s,contains:[]},p={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,d],subLanguage:"xml"}},h={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,d],subLanguage:"css"}},f={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,d]},m={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:n+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},g=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,h,f,u];d.contains=g.concat({begin:/\{/,end:/\}/,keywords:s,contains:["self"].concat(g)});const b=[].concat(m,d.contains),y=b.concat([{begin:/\(/,end:/\)/,keywords:s,contains:["self"].concat(b)}]),v={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:y},w={variants:[{match:[/class/,/\s+/,n,/\s+/,/extends/,/\s+/,t.concat(n,"(",t.concat(/\./,n),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,n],scope:{1:"keyword",3:"title.class"}}]},x={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...PI,...RI]}},E={variants:[{match:[/function/,/\s+/,n,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[v],illegal:/%/},M={match:t.concat(/\b/,(k=[...BI,"super"],t.concat("(?!",k.join("|"),")")),n,t.lookahead(/\(/)),className:"title.function",relevance:0};var k;const _={begin:t.concat(/\./,t.lookahead(t.concat(n,/(?![0-9A-Za-z$_(])/))),end:n,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},D={match:[/get|set/,/\s+/,n,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},v]},C="(\\("+"[^()]*(\\("+"[^()]*(\\("+"[^()]*"+"\\)[^()]*)*"+"\\)[^()]*)*"+"\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",O={match:[/const|var|let/,/\s+/,n,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(C)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[v]};return{name:"Javascript",aliases:["js","jsx","mjs","cjs"],keywords:s,exports:{PARAMS_CONTAINS:y,CLASS_REFERENCE:x},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),{label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,h,f,m,u,x,{className:"attr",begin:n+t.lookahead(":"),relevance:0},O,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[m,e.REGEXP_MODE,{className:"function",begin:C,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:y}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:r,end:i},{match:/<[A-Za-z0-9\\._:-]+\s*\/>/},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0,contains:["self"]}]}]},E,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\("+"[^()]*(\\("+"[^()]*(\\("+"[^()]*"+"\\)[^()]*)*"+"\\)[^()]*)*"+"\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[v,e.inherit(e.TITLE_MODE,{begin:n,className:"title.function"})]},{match:/\.\.\./,relevance:0},_,{match:"\\$"+n,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[v]},M,{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},w,D,{match:/\$[(.]/}]}})),rz.registerLanguage("json",(function(e){const t=["true","false","null"],n={scope:"literal",beginKeywords:t.join(" ")};return{name:"JSON",keywords:{literal:t},contains:[{className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},{match:/[{}[\],:]/,className:"punctuation",relevance:0},e.QUOTE_STRING_MODE,n,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}})),rz.registerLanguage("kotlin",(function(e){const t={keyword:"abstract as val var vararg get set class object open private protected public noinline "+"crossinline dynamic final enum if else do while for when throw try catch finally "+"import package is in fun override companion reified inline lateinit init "+"interface annotation data sealed internal infix operator out by constructor super "+"tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},n={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},r={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},i={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},o={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[i,r]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,i,r]}]};r.contains.push(o);const s={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},a={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(o,{className:"string"}),"self"]}]},l=qI,c=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),u={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},d=u;return d.variants[1].contains=[u],u.variants[1].contains=[d],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,c,{className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},n,s,a,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[u,e.C_LINE_COMMENT_MODE,c],relevance:0},e.C_LINE_COMMENT_MODE,c,s,a,o,e.C_NUMBER_MODE]},c]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},s,a]},o,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:"\n"},l]}})),rz.registerLanguage("less",(function(e){const t=(e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"("+"%|em|ex|ch|rem"+"|vw|vh|vmin|vmax"+"|cm|mm|in|pt|pc|px"+"|deg|grad|rad|turn"+"|s|ms"+"|Hz|kHz"+"|dpi|dpcm|dppx"+")?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z][A-Za-z0-9_-]*/}}))(e),n=JI,r="[\\w-]+",i="("+r+"|@\\{"+r+"\\})",o=[],s=[],a=function(e){return{className:"string",begin:"~?"+e+".*?"+e}},l=function(e,t,n){return{className:e,begin:t,relevance:n}},c={$pattern:/[a-z-]+/,keyword:"and or not only",attribute:KI.join(" ")},u={begin:"\\(",end:"\\)",contains:s,keywords:c,relevance:0};s.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,a("'"),a('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,u,l("variable","@@?"+r,10),l("variable","@\\{"+r+"\\}"),l("built_in","~?`[^`]*?`"),{className:"attribute",begin:r+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);const d=s.concat({begin:/\{/,end:/\}/,contains:o}),p={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(s)},h={begin:i+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+ZI.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:s}}]},f={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:c,returnEnd:!0,contains:s,relevance:0}},m={className:"variable",variants:[{begin:"@"+r+"\\s*:",relevance:15},{begin:"@"+r}],starts:{end:"[;}]",returnEnd:!0,contains:d}},g={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:i,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:"[<='$\"]",relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,p,l("keyword","all\\b"),l("variable","@\\{"+r+"\\}"),{begin:"\\b("+YI.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,l("selector-tag",i,0),l("selector-id","#"+i),l("selector-class","\\."+i,0),l("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+QI.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+GI.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:d},{begin:"!important"},t.FUNCTION_DISPATCH]},b={begin:r+":(:)?"+`(${n.join("|")})`,returnBegin:!0,contains:[g]};return o.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,f,m,b,h,g,p,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:"[=>'/<($\"]",contains:o}})),rz.registerLanguage("lua",(function(e){const t="\\[=*\\[",n="\\]=*\\]",r={begin:t,end:n,contains:["self"]},i=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,n,{contains:[r],relevance:10})];return{name:"Lua",keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len "+"__gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert "+"collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring "+"module next pairs pcall print rawequal rawget rawset require select setfenv "+"setmetatable tonumber tostring type unpack xpcall arg self "+"coroutine resume yield status wrap create running debug getupvalue "+"debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv "+"io lines write close flush open output type read stderr stdin input stdout popen tmpfile "+"math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan "+"os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall "+"string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower "+"table setn insert getn foreachi maxn foreach concat sort remove"},contains:i.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:i}].concat(i)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:n,contains:[r],relevance:5}])}})),rz.registerLanguage("makefile",(function(e){const t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},n={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,t]},r={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort "+"word wordlist firstword lastword dir notdir suffix basename "+"addsuffix addprefix join wildcard realpath abspath error warning "+"shell origin flavor foreach if or and call eval file value"},contains:[t]},i={begin:"^"+e.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},o={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[t]};return{name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif "+"include -include sinclude override export unexport private vpath"},contains:[e.HASH_COMMENT_MODE,t,n,r,i,{className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},o]}})),rz.registerLanguage("markdown",(function(e){const t={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},n={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:e.regex.concat(/\[.+?\]\(/,/[A-Za-z][A-Za-z0-9+.-]*/,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},r={className:"strong",contains:[],variants:[{begin:/_{2}/,end:/_{2}/},{begin:/\*{2}/,end:/\*{2}/}]},i={className:"emphasis",contains:[],variants:[{begin:/\*(?!\*)/,end:/\*/},{begin:/_(?!_)/,end:/_/,relevance:0}]},o=e.inherit(r,{contains:[]}),s=e.inherit(i,{contains:[]});r.contains.push(s),i.contains.push(o);let a=[t,n];return[r,i,o,s].forEach((e=>{e.contains=e.contains.concat(a)})),a=a.concat(r,i),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:a},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:a}]}]},t,{className:"bullet",begin:"^[ \t]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},r,i,{className:"quote",begin:"^>\\s+",contains:a,end:"$"},{className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},{begin:"^[-\\*]{3,}",end:"$"},n,{begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]}]}})),rz.registerLanguage("objectivec",(function(e){const t=/[a-zA-Z@][a-zA-Z0-9_]*/,n={$pattern:t,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:{"variable.language":["this","super"],$pattern:t,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},illegal:"</",contains:[{className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line "+"pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+n.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:n,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}})),rz.registerLanguage("perl",(function(e){const t=e.regex,n=/[dualxmsipngr]{0,12}/,r={$pattern:/[\w.]+/,keyword:["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"].join(" ")},i={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:r},o={begin:/->\{/,end:/\}/},s={variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,`(?![A-Za-z])(?![@$%])`)},{begin:/[$%@][^\s\w{]/,relevance:0}]},a=[e.BACKSLASH_ESCAPE,i,s],l=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],c=(e,r,i="\\1")=>{const o="\\1"===i?i:t.concat(i,r);return t.concat(t.concat("(?:",e,")"),r,/(?:\\.|[^\\\/])*?/,o,/(?:\\.|[^\\\/])*?/,i,n)},u=(e,r,i)=>t.concat(t.concat("(?:",e,")"),r,/(?:\\.|[^\\\/])*?/,i,n),d=[s,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),o,{className:"string",contains:a,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:c("s|tr|y",t.either(...l,{capture:!0}))},{begin:c("s|tr|y","\\(","\\)")},{begin:c("s|tr|y","\\[","\\]")},{begin:c("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:u("(?:m|qr)?",/\//,/\//)},{begin:u("m|qr",t.either(...l,{capture:!0}),/\1/)},{begin:u("m|qr",/\(/,/\)/)},{begin:u("m|qr",/\[/,/\]/)},{begin:u("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return i.contains=d,o.contains=d,{name:"Perl",aliases:["pl","pm"],keywords:r,contains:d}})),rz.registerLanguage("php",(function(e){const t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,r=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),i=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),o={scope:"variable",match:"\\$+"+r},s={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},a=e.inherit(e.APOS_STRING_MODE,{illegal:null}),l="[ \t\n]",c={scope:"string",variants:[e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(s)}),a,e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*(\w+)\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(s)})]},u={scope:"number",variants:[{begin:`\\b0[bB][01]+(?:_[01]+)*\\b`},{begin:`\\b0[oO][0-7]+(?:_[0-7]+)*\\b`},{begin:`\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b`},{begin:`(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?`}],relevance:0},d=["false","null","true"],p=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],h=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],f={keyword:p,literal:(e=>{const t=[];return e.forEach((e=>{t.push(e),e.toLowerCase()===e?t.push(e.toUpperCase()):t.push(e.toLowerCase())})),t})(d),built_in:h},m=e=>e.map((e=>e.replace(/\|\d+$/,""))),g={variants:[{match:[/new/,t.concat(l,"+"),t.concat("(?!",m(h).join("\\b|"),"\\b)"),i],scope:{1:"keyword",4:"title.class"}}]},b=t.concat(r,"\\b(?!\\()"),y={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),b],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[i,t.concat(/::/,t.lookahead(/(?!class\b)/)),b],scope:{1:"title.class",3:"variable.constant"}},{match:[i,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[i,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},v={scope:"attr",match:t.concat(r,t.lookahead(":"),t.lookahead(/(?!::)/))},w={relevance:0,begin:/\(/,end:/\)/,keywords:f,contains:[v,o,y,e.C_BLOCK_COMMENT_MODE,c,u,g]},x={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",m(p).join("\\b|"),"|",m(h).join("\\b|"),"\\b)"),r,t.concat(l,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[w]};w.contains.push(x);const E=[v,y,e.C_BLOCK_COMMENT_MODE,c,u,g];return{case_insensitive:!1,keywords:f,contains:[{begin:t.concat(/#\[\s*/,i),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:d,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:d,keyword:["new","array"]},contains:["self",...E]},...E,{scope:"meta",match:i}]},e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},{scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},{scope:"variable.language",match:/\$this\b/},o,x,y,{match:[/const/,/\s/,r],scope:{1:"keyword",3:"variable.constant"}},g,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:f,contains:["self",o,y,e.C_BLOCK_COMMENT_MODE,c,u]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},c,u]}})),rz.registerLanguage("php-template",(function(e){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}})),rz.registerLanguage("plaintext",(function(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}})),rz.registerLanguage("python",(function(e){const t=e.regex,n=/[\p{XID_Start}_]\p{XID_Continue}*/u,r=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],i={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},o={className:"meta",begin:/^(>>>|\.\.\.) /},s={className:"subst",begin:/\{/,end:/\}/,keywords:i,illegal:/#/},a={begin:/\{\{/,relevance:0},l={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,o],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,o],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,o,a,s]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,o,a,s]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,a,s]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,a,s]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},c="[0-9](_?[0-9])*",u=`(\\b(${c}))?\\.(${c})|\\b(${c})\\.`,d=`\\b|${r.join("|")}`,p={className:"number",relevance:0,variants:[{begin:`(\\b(${c})|(${u}))[eE][+-]?(${c})[jJ]?(?=${d})`},{begin:`(${u})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${d})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${d})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${d})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${d})`},{begin:`\\b(${c})[jJ](?=${d})`}]},h={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:i,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},f={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:i,contains:["self",o,p,l,e.HASH_COMMENT_MODE]}]};return s.contains=[l,p,o],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:i,illegal:/(<\/|->|\?)|=>/,contains:[o,p,{begin:/\bself\b/},{beginKeywords:"if",relevance:0},l,h,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[f]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[p,f,l]}]}})),rz.registerLanguage("python-repl",(function(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}})),rz.registerLanguage("r",(function(e){const t=e.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,r=t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),i=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,o=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:n,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 "+"NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F "+"abs acos acosh all any anyNA Arg as.call as.character "+"as.complex as.double as.environment as.integer as.logical "+"as.null.default as.numeric as.raw asin asinh atan atanh attr "+"attributes baseenv browser c call ceiling class Conj cos cosh "+"cospi cummax cummin cumprod cumsum digamma dim dimnames "+"emptyenv exp expression floor forceAndCall gamma gc.time "+"globalenv Im interactive invisible is.array is.atomic is.call "+"is.character is.complex is.double is.environment is.expression "+"is.finite is.function is.infinite is.integer is.language "+"is.list is.logical is.matrix is.na is.name is.nan is.null "+"is.numeric is.object is.pairlist is.raw is.recursive is.single "+"is.symbol lazyLoadDBfetch length lgamma list log max min "+"missing Mod names nargs nzchar oldClass on.exit pos.to.env "+"proc.time prod quote range Re rep retracemem return round "+"seq_along seq_len seq.int sign signif sin sinh sinpi sqrt "+"standardGeneric substitute sum switch tan tanh tanpi tracemem "+"trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:n},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[i,r]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,r]},{scope:{1:"punctuation",2:"number"},match:[o,r]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,r]}]},{scope:{3:"operator"},match:[n,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:i},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:o},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}})),rz.registerLanguage("ruby",(function(e){const t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",r=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),i=t.concat(r,/(::\w+)*/),o={"variable.constant":["__FILE__","__LINE__"],"variable.language":["self","super"],keyword:["alias","and","attr_accessor","attr_reader","attr_writer","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","include","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield"],built_in:["proc","lambda"],literal:["true","false","nil"]},s={className:"doctag",begin:"@[A-Za-z]+"},a={begin:"#<",end:">"},l=[e.COMMENT("#","$",{contains:[s]}),e.COMMENT("^=begin","^=end",{contains:[s],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],c={className:"subst",begin:/#\{/,end:/\}/,keywords:o},u={className:"string",contains:[e.BACKSLASH_ESCAPE,c],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,c]})]}]},d="[0-9](_?[0-9])*",p={className:"number",relevance:0,variants:[{begin:`\\b(${"[1-9](_?[0-9])*|0"})(\\.(${d}))?([eE][+-]?(${d})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},h={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:o}]},f=[u,{variants:[{match:[/class\s+/,i,/\s+<\s+/,i]},{match:[/class\s+/,i]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:o},{relevance:0,match:[i,/\.new[ (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[h]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[u,{begin:n}],relevance:0},p,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])"+`(?![A-Za-z])(?![@$?'])`},{className:"params",begin:/\|/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:o},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,c],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(a,l),relevance:0}].concat(a,l);c.contains=f,h.contains=f;const m=[{begin:/^\s*=>/,starts:{end:"$",contains:f}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:o,contains:f}}];return l.unshift(a),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:o,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(m).concat(l).concat(f)}})),rz.registerLanguage("rust",(function(e){const t=e.regex,n={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let\b)/,e.IDENT_RE,t.lookahead(/\s*\(/))},r="([ui](8|16|32|64|128|size)|f(32|64))?",i=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],o=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:o,keyword:["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","unsafe","unsized","use","virtual","where","while","yield"],literal:["true","false","Some","None","Ok","Err"],built_in:i},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'\\?(x\w{2}|u\w{4}|U\w{8}|.)'/}]},{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*/},{className:"number",variants:[{begin:"\\b0b([01_]+)"+r},{begin:"\\b0o([0-7_]+)"+r},{begin:"\\b0x([A-Fa-f0-9_]+)"+r},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+r}],relevance:0},{begin:[/fn/,/\s+/,e.UNDERSCORE_IDENT_RE],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,e.UNDERSCORE_IDENT_RE],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,e.UNDERSCORE_IDENT_RE,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,e.UNDERSCORE_IDENT_RE],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,e.UNDERSCORE_IDENT_RE],className:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:i,type:o}},{className:"punctuation",begin:"->"},n]}})),rz.registerLanguage("scss",(function(e){const t=(e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"("+"%|em|ex|ch|rem"+"|vw|vh|vmin|vmax"+"|cm|mm|in|pt|pc|px"+"|deg|grad|rad|turn"+"|s|ms"+"|Hz|kHz"+"|dpi|dpcm|dppx"+")?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z][A-Za-z0-9_-]*/}}))(e),n=nL,r=tL,i="@[a-z-]+",o={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+XI.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+r.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+n.join("|")+")"},o,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+rL.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,o,t.HEXCOLOR,t.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:i,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:"and or not only",attribute:eL.join(" ")},contains:[{begin:i,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},o,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}})),rz.registerLanguage("shell",(function(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}})),rz.registerLanguage("sql",(function(e){const t=e.regex,n=e.COMMENT("--","$"),r=["true","false","unknown"],i=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],o=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],s=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],a=o,l=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year","add","asc","collation","desc","final","first","last","view"].filter((e=>!o.includes(e))),c={begin:t.concat(/\b/,t.either(...a),/\s*\(/),relevance:0,keywords:{built_in:a}};return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:function(e,{exceptions:t,when:n}={}){const r=n;return t=t||[],e.map((e=>e.match(/\|\d+$/)||t.includes(e)?e:r(e)?`${e}|0`:e))}(l,{when:e=>e.length<3}),literal:r,type:i,built_in:["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"]},contains:[{begin:t.either(...s),relevance:0,keywords:{$pattern:/[\w\.]+/,keyword:l.concat(s),literal:r,type:i}},{className:"type",begin:t.either("double precision","large object","with timezone","without timezone")},c,{className:"variable",begin:/@[a-z0-9]+/},{className:"string",variants:[{begin:/'/,end:/'/,contains:[{begin:/''/}]}]},{begin:/"/,end:/"/,contains:[{begin:/""/}]},e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,{className:"operator",begin:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0}]}})),rz.registerLanguage("swift",(function(e){const t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),r=[e.C_LINE_COMMENT_MODE,n],i={match:[/\./,aL(...cL,...uL)],className:{2:"keyword"}},o={match:sL(/\./,aL(...pL)),relevance:0},s=pL.filter((e=>"string"==typeof e)).concat(["_|0"]),a={variants:[{className:"keyword",match:aL(...pL.filter((e=>"string"!=typeof e)).concat(dL).map(lL),...uL)}]},l={$pattern:aL(/\b\w+/,/#\w+/),keyword:s.concat(mL),literal:hL},c=[i,o,a],u=[{match:sL(/\./,aL(...gL)),relevance:0},{className:"built_in",match:sL(/\b/,aL(...gL),/(?=\()/)}],d={match:/->/,relevance:0},p=[d,{className:"operator",relevance:0,variants:[{match:vL},{match:`\\.(\\.|${yL})+`}]}],h="([0-9]_*)+",f="([0-9a-fA-F]_*)+",m={className:"number",relevance:0,variants:[{match:`\\b(${h})(\\.(${h}))?`+`([eE][+-]?(${h}))?\\b`},{match:`\\b0x(${f})(\\.(${f}))?`+`([pP][+-]?(${h}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},g=(e="")=>({className:"subst",variants:[{match:sL(/\\/,e,/[0\\tnr"']/)},{match:sL(/\\/,e,/u\{[0-9a-fA-F]{1,8}\}/)}]}),b=(e="")=>({className:"subst",match:sL(/\\/,e,/[\t ]*(?:[\r\n]|\r\n)/)}),y=(e="")=>({className:"subst",label:"interpol",begin:sL(/\\/,e,/\(/),end:/\)/}),v=(e="")=>({begin:sL(e,/"""/),end:sL(/"""/,e),contains:[g(e),b(e),y(e)]}),w=(e="")=>({begin:sL(e,/"/),end:sL(/"/,e),contains:[g(e),y(e)]}),x={className:"string",variants:[v(),v("#"),v("##"),v("###"),w(),w("#"),w("##"),w("###")]},E={match:sL(/`/,EL,/`/)},M=[E,{className:"variable",match:/\$\d+/},{className:"variable",match:`\\$${xL}+`}],k=[{match:/(@|#(un)?)available/,className:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:_L,contains:[...p,m,x]}]}},{className:"keyword",match:sL(/@/,aL(...kL))},{className:"meta",match:sL(/@/,EL)}],_={match:oL(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:sL(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,xL,"+")},{className:"type",match:ML,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:sL(/\s+&\s+/,oL(ML)),relevance:0}]},D={begin:/</,end:/>/,keywords:l,contains:[...r,...c,...k,d,_]};_.contains.push(D);const C={begin:/\(/,end:/\)/,relevance:0,keywords:l,contains:["self",{match:sL(EL,/\s*:/),keywords:"_|0",relevance:0},...r,...c,...u,...p,m,x,...M,...k,_]},O={begin:/</,end:/>/,contains:[...r,_]},N={begin:/\(/,end:/\)/,keywords:l,contains:[{begin:aL(oL(sL(EL,/\s*:/)),oL(sL(EL,/\s+/,EL,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:EL}]},...r,...c,...p,m,x,...k,_,C],endsParent:!0,illegal:/["']/},T={match:[/func/,/\s+/,aL(E.match,EL,vL)],className:{1:"keyword",3:"title.function"},contains:[O,N,t],illegal:[/\[/,/%/]},S={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[O,N,t],illegal:/\[|%/},A={match:[/operator/,/\s+/,vL],className:{1:"keyword",3:"title"}},I={begin:[/precedencegroup/,/\s+/,ML],className:{1:"keyword",3:"title"},contains:[_],keywords:[...fL,...hL],end:/}/};for(const e of x.variants){const t=e.contains.find((e=>"interpol"===e.label));t.keywords=l;const n=[...c,...u,...p,m,x,...M];t.contains=[...n,{begin:/\(/,end:/\)/,contains:["self",...n]}]}return{name:"Swift",keywords:l,contains:[...r,T,S,{beginKeywords:"struct protocol class extension enum actor",end:"\\{",excludeEnd:!0,keywords:l,contains:[e.inherit(e.TITLE_MODE,{className:"title.class",begin:/[A-Za-z$_][\u00C0-\u02B80-9A-Za-z$_]*/}),...c]},A,I,{beginKeywords:"import",end:/$/,contains:[...r],relevance:0},...c,...u,...p,m,x,...M,...k,_,C]}})),rz.registerLanguage("typescript",(function(e){const t=LL(e),n=DL,r=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],i={beginKeywords:"namespace",end:/\{/,excludeEnd:!0,contains:[t.exports.CLASS_REFERENCE]},o={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:r},contains:[t.exports.CLASS_REFERENCE]},s={$pattern:DL,keyword:CL.concat(["type","namespace","interface","public","private","protected","implements","declare","abstract","readonly","enum","override"]),literal:OL,built_in:IL.concat(r),"variable.language":AL},a={className:"meta",begin:"@"+n},l=(e,t,n)=>{const r=e.contains.findIndex((e=>e.label===t));if(-1===r)throw new Error("can not find mode to replace");e.contains.splice(r,1,n)};Object.assign(t.keywords,s),t.exports.PARAMS_CONTAINS.push(a),t.contains=t.contains.concat([a,i,o]),l(t,"shebang",e.SHEBANG()),l(t,"use_strict",{className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/});const c=t.contains.find((e=>"func.def"===e.label));return c.relevance=0,Object.assign(t,{name:"TypeScript",aliases:["ts","tsx"]}),t})),rz.registerLanguage("vbnet",(function(e){const t=e.regex,n=/\d{1,2}\/\d{1,2}\/\d{4}/,r=/\d{4}-\d{1,2}-\d{1,2}/,i=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,o=/\d{1,2}(:\d{1,2}){1,2}/,s={className:"literal",variants:[{begin:t.concat(/# */,t.either(r,n),/ *#/)},{begin:t.concat(/# */,o,/ *#/)},{begin:t.concat(/# */,i,/ *#/)},{begin:t.concat(/# */,t.either(r,n),/ +/,t.either(i,o),/ *#/)}]},a=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),l=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval "+"call case catch class compare const continue custom declare default delegate dim distinct do "+"each equals else elseif end enum erase error event exit explicit finally for friend from function "+"get global goto group handles if implements imports in inherits interface into iterator "+"join key let lib loop me mid module mustinherit mustoverride mybase myclass "+"namespace narrowing new next notinheritable notoverridable "+"of off on operator option optional order overloads overridable overrides "+"paramarray partial preserve private property protected public "+"raiseevent readonly redim removehandler resume return "+"select set shadows shared skip static step stop structure strict sub synclock "+"take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor "+"cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[{className:"string",begin:/"(""|[^/n])"C\b/},{className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},s,{className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},{className:"label",begin:/^\w+:/},a,l,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[l]}]}})),rz.registerLanguage("wasm",(function(e){e.regex;const t=e.COMMENT(/\(;/,/;\)/);return t.contains.push("self"),{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"]},contains:[e.COMMENT(/;;/,/$/),t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},{className:"variable",begin:/\$[\w_]+/},{match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},{begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},e.QUOTE_STRING_MODE,{match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},{className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/},{className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/}]}})),rz.registerLanguage("xml",(function(e){const t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},i={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},o=e.inherit(i,{begin:/\(/,end:/\)/}),s=e.inherit(e.APOS_STRING_MODE,{className:"string"}),a=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),l={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:/[\p{L}0-9._:-]+/u,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[r]},{begin:/'/,end:/'/,contains:[r]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[i,a,s,o,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[i,o,a,s]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},r,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[a]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[l],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[l],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:l}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}})),rz.registerLanguage("yaml",(function(e){const t="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",r={className:"string",relevance:0,variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,{className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]}]},i=e.inherit(r,{variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),o={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},s={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},a={begin:/\{/,end:/\}/,contains:[s],illegal:"\\n",relevance:0},l={begin:"\\[",end:"\\]",contains:[s],illegal:"\\n",relevance:0},c=[{className:"attr",variants:[{begin:"\\w[\\w :\\/.-]*:(?=[ \t]|$)"},{begin:'"\\w[\\w :\\/.-]*":(?=[ \t]|$)'},{begin:"'\\w[\\w :\\/.-]*':(?=[ \t]|$)"}]},{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},o,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},a,l,r],u=[...c];return u.pop(),u.push(i),s.contains=u,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:c}}));const iz=()=>t.createElement(xc,{"data-cy":"neeto-editor-code-block"},t.createElement("pre",null,t.createElement(wc,{as:"code"})));var oz=kI.extend({addNodeView:()=>new kc(iz)}).configure({lowlight:rz}),sz=is.create({name:"paste-unformatted",addCommands:()=>({pasteUnformatted:()=>async e=>{let{editor:t}=e;const n=await navigator.clipboard.readText();t.commands.insertContent(n)}})}),az=jT.extend({content:"root",addProseMirrorPlugins(){const{editor:e}=this;return[new Qt({key:new Jt("eventHandler"),props:{handleClick(t,n){const{state:r}=t,i=r.doc.lastChild,o=r.doc.resolve(n).nodeBefore;if(i&&o){const t=i.eq(o),r=i.isInline,s=["paragraph","text"].includes(i.type.name);!t||r||s||e.commands.insertContentAt(n,{type:"paragraph",content:""})}}}})]}}),lz=Js.create({name:"external-video",addOptions:()=>({inline:!1,HTMLAttributes:{}}),inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes:()=>({src:{default:null},title:{default:null},frameborder:{default:"0"},allow:{default:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"},allowfullscreen:{default:"allowfullscreen"}}),parseHTML:()=>[{tag:"iframe[src]"}],renderHTML(e){let{HTMLAttributes:t}=e;return["iframe",Bo(this.options.HTMLAttributes,{...t,class:"video-wrapper"})]},addCommands(){return{setExternalVideo:e=>t=>{let{commands:n}=t;return n.insertContent({type:this.name,attrs:e})}}}});const cz=new Jt("suggestion");function uz({pluginKey:e=cz,editor:t,char:n="@",allowSpaces:r=!1,allowedPrefixes:i=[" "],startOfLine:o=!1,decorationTag:s="span",decorationClass:a="suggestion",command:l=(()=>null),items:c=(()=>[]),render:u=(()=>({})),allow:d=(()=>!0)}){let p;const h=null==u?void 0:u(),f=new Qt({key:e,view(){return{update:async(e,n)=>{var r,i,o,s,a,u,d;const f=null===(r=this.key)||void 0===r?void 0:r.getState(n),m=null===(i=this.key)||void 0===i?void 0:i.getState(e.state),g=f.active&&m.active&&f.range.from!==m.range.from,b=!f.active&&m.active,y=f.active&&!m.active,v=b||g,w=!b&&!y&&f.query!==m.query&&!g,x=y||g;if(!v&&!w&&!x)return;const E=x&&!v?f:m,M=e.dom.querySelector(`[data-decoration-id="${E.decorationId}"]`);p={editor:t,range:E.range,query:E.query,text:E.text,items:[],command:e=>{l({editor:t,range:E.range,props:e})},decorationNode:M,clientRect:M?()=>{var n;const{decorationId:r}=null===(n=this.key)||void 0===n?void 0:n.getState(t.state),i=e.dom.querySelector(`[data-decoration-id="${r}"]`);return(null==i?void 0:i.getBoundingClientRect())||null}:null},v&&(null===(o=null==h?void 0:h.onBeforeStart)||void 0===o||o.call(h,p)),w&&(null===(s=null==h?void 0:h.onBeforeUpdate)||void 0===s||s.call(h,p)),(w||v)&&(p.items=await c({editor:t,query:E.query})),x&&(null===(a=null==h?void 0:h.onExit)||void 0===a||a.call(h,p)),w&&(null===(u=null==h?void 0:h.onUpdate)||void 0===u||u.call(h,p)),v&&(null===(d=null==h?void 0:h.onStart)||void 0===d||d.call(h,p))},destroy:()=>{var e;p&&(null===(e=null==h?void 0:h.onExit)||void 0===e||e.call(h,p))}}},state:{init:()=>({active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}),apply(e,s,a,l){const{isEditable:c}=t,{composing:u}=t.view,{selection:p}=e,{empty:h,from:f}=p,m={...s};if(m.composing=u,c&&(h||t.view.composing)){!(f<s.range.from||f>s.range.to)||u||s.composing||(m.active=!1);const e=function(e){var t;const{char:n,allowSpaces:r,allowedPrefixes:i,startOfLine:o,$position:s}=e,a=n.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),l=new RegExp(`\\s${a}$`),c=o?"^":"",u=r?new RegExp(`${c}${a}.*?(?=\\s${a}|$)`,"gm"):new RegExp(`${c}(?:^)?${a}[^\\s${a}]*`,"gm"),d=(null===(t=s.nodeBefore)||void 0===t?void 0:t.isText)&&s.nodeBefore.text;if(!d)return null;const p=s.pos-d.length,h=Array.from(d.matchAll(u)).pop();if(!h||void 0===h.input||void 0===h.index)return null;const f=h.input.slice(Math.max(0,h.index-1),h.index),m=new RegExp(`^[${null==i?void 0:i.join("")}\0]?$`).test(f);if(null!==i&&!m)return null;const g=p+h.index;let b=g+h[0].length;return r&&l.test(d.slice(b-1,b+1))&&(h[0]+=" ",b+=1),g<s.pos&&b>=s.pos?{range:{from:g,to:b},query:h[0].slice(n.length),text:h[0]}:null}({char:n,allowSpaces:r,allowedPrefixes:i,startOfLine:o,$position:p.$from}),a=`id_${Math.floor(4294967295*Math.random())}`;e&&d({editor:t,state:l,range:e.range})?(m.active=!0,m.decorationId=s.decorationId?s.decorationId:a,m.range=e.range,m.query=e.query,m.text=e.text):m.active=!1}else m.active=!1;return m.active||(m.decorationId=null,m.range={from:0,to:0},m.query=null,m.text=null),m}},props:{handleKeyDown(e,t){var n;const{active:r,range:i}=f.getState(e.state);return r&&(null===(n=null==h?void 0:h.onKeyDown)||void 0===n?void 0:n.call(h,{view:e,event:t,range:i}))||!1},decorations(e){const{active:t,range:n,decorationId:r}=f.getState(e);return t?zi.create(e.doc,[Ii.inline(n.from,n.to,{nodeName:s,class:a,"data-decoration-id":r})]):null}}});return f}const dz=new Jt("emoji-picker"),pz=Js.create({name:"emojiPicker",group:"inline",inline:!0,selectable:!1,atom:!0,addOptions:()=>({suggestion:{char:"::",startOfLine:!1,pluginKey:dz,items:()=>[],render:()=>{let e,t;return{onStart(n){e=new Ec(By,{props:n,editor:n.editor}),t=oc("body",{theme:"light",getReferenceClientRect:n.clientRect,appendTo:()=>document.body,content:e.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"bottom-start",zIndex:99999})},onKeyDown(t){var n;return null===(n=e.ref)||void 0===n?void 0:n.onKeyDown(t)},onExit(){t[0].destroy(),e.destroy()}}}}}),addProseMirrorPlugins(){return[uz({editor:this.editor,...this.options.suggestion})]}});class hz extends t.Component{constructor(){super(...arguments),zf(this,"state",{isLoading:!1,selectedIndex:0,emojiSuggestions:[]}),zf(this,"fetchEmojiData",(async()=>{this.setState({isLoading:!0});try{const{data:e}=await Hg.get("https://cdn.jsdelivr.net/npm/@emoji-mart/data");return this.setState({isLoading:!1}),e}catch(e){return this.setState({isLoading:!1}),{}}})),zf(this,"searchEmoji",(async()=>{if(this.props.query)return(await Rb.search(this.props.query)).slice(0,5);return(await Promise.all(["+1","-1","smile","tada","heart"].map((e=>Rb.search(e))))).map((e=>e[0]))})),zf(this,"searchEmojiAndSetState",(async()=>{const e=await this.searchEmoji();this.setState({emojiSuggestions:e})})),zf(this,"setEditorState",(async()=>{const e=await this.searchEmoji();this.props.editor.chain().focus().deleteRange(this.props.range).setEmoji(e[0]).run()})),zf(this,"onKeyDown",(e=>{let{event:t}=e;return"ArrowLeft"===t.key||"ArrowDown"===t.key?(this.setState((e=>{let{selectedIndex:t,emojiSuggestions:n}=e;return{selectedIndex:(t+n.length-1)%n.length}})),!0):"ArrowRight"===t.key||"ArrowUp"===t.key?(this.setState((e=>{let{selectedIndex:t,emojiSuggestions:n}=e;return{selectedIndex:(t+1)%n.length}})),!0):"Enter"===t.key?(this.selectItem(this.state.selectedIndex),!0):" "===t.key?(Iu(this.props.query)?this.props.editor.chain().focus().insertContent(" ").run():this.setEditorState(),!0):"Escape"===t.key&&(this.props.editor.chain().focus().insertContent(" ").run(),!0)})),zf(this,"selectItem",(e=>{this.props.editor.chain().focus().deleteRange(this.props.range).setEmoji(this.state.emojiSuggestions[e]).run()}))}componentDidMount(){qb({data:this.fetchEmojiData,theme:"light",previewPosition:"none"}),this.searchEmojiAndSetState()}componentDidUpdate(e){this.props.query!==e.query&&this.searchEmojiAndSetState()}render(){return t.createElement("div",{className:"neeto-editor-emoji-suggestion"},this.state.isLoading&&t.createElement(wO,null),!this.state.isLoading&&(this.state.emojiSuggestions.length>0?this.state.emojiSuggestions.map(((e,n)=>t.createElement("div",{key:e.id,onClick:()=>this.selectItem(n),className:Sc("neeto-editor-emoji-suggestion__item",{"neeto-editor-emoji-suggestion__item--selected":n===this.state.selectedIndex}),"data-cy":"neeto-editor-emoji-suggestion-".concat(e.id)},e.skins[0].native))):t.createElement("p",null,"No results")))}}const fz={char:":",startOfLine:!1,pluginKey:new Jt("emoji-suggestion"),command:e=>{let{editor:t,range:n,props:r}=e;t.chain().focus().deleteRange(n).setEmoji(r).run()},items:()=>[],render:()=>{let e,t;return{onStart(n){e=new Ec(hz,{props:n,editor:n.editor}),t=oc("body",{theme:"light",getReferenceClientRect:n.clientRect,appendTo:()=>document.body,content:e.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"top-start",zIndex:99999})},onUpdate(n){e.updateProps(n),t[0].setProps({getReferenceClientRect:n.clientRect})},onKeyDown(t){var n;return null===(n=e.ref)||void 0===n?void 0:n.onKeyDown(t)},onExit(){t[0].destroy(),e.destroy()}}}};var mz=Js.create({name:"emojiSuggestion",group:"inline",inline:!0,selectable:!1,atom:!0,addOptions:()=>({HTMLAttributes:{class:"neeto-editor-emoji"},renderEmoji(e){let{node:t}=e;return t.attrs.label},suggestion:{}}),addAttributes:()=>({label:{default:null,parseHTML:e=>e.getAttribute("data-label"),renderHTML:e=>e.label?{"data-label":e.label}:{}}}),parseHTML:()=>[{tag:"span[data-emoji]"}],renderHTML(e){let{node:t,HTMLAttributes:n}=e;return["span",Bo({"data-emoji":""},this.options.HTMLAttributes,n),this.options.renderEmoji({node:t})]},renderText(e){let{node:t}=e;return this.options.renderEmoji({node:t})},addCommands(){return{setEmoji:e=>t=>{var n;let{chain:r}=t;r().focus().insertContent([{type:this.name,attrs:{label:(null==e?void 0:e.native)||(null==e||null===(n=e.skins[0])||void 0===n?void 0:n.native)||""}},{type:"text",text:" "}]).run()}}},addProseMirrorPlugins(){return[uz({editor:this.editor,...this.options.suggestion})]}}).configure({suggestion:fz});const gz=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,bz=Js.create({name:"image",addOptions:()=>({inline:!1,allowBase64:!1,HTMLAttributes:{}}),inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes:()=>({src:{default:null},alt:{default:null},title:{default:null}}),parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:e}){return["img",Bo(this.options.HTMLAttributes,e)]},addCommands(){return{setImage:e=>({commands:t})=>t.insertContent({type:this.name,attrs:e})}},addInputRules(){return[Ys({find:gz,type:this.type,getAttributes:e=>{const[,,t,n,r]=e;return{src:n,alt:t,title:r}}})]}});var yz,vz=void 0&&(void 0).__extends||(yz=function(e,t){return yz=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},yz(e,t)},function(e,t){function n(){this.constructor=e}yz(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),wz=void 0&&(void 0).__assign||function(){return wz=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},wz.apply(this,arguments)},xz={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},Ez={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},Mz={width:"20px",height:"20px",position:"absolute"},kz={top:wz(wz({},xz),{top:"-5px"}),right:wz(wz({},Ez),{left:void 0,right:"-5px"}),bottom:wz(wz({},xz),{top:void 0,bottom:"-5px"}),left:wz(wz({},Ez),{left:"-5px"}),topRight:wz(wz({},Mz),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:wz(wz({},Mz),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:wz(wz({},Mz),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:wz(wz({},Mz),{left:"-10px",top:"-10px",cursor:"nw-resize"})},_z=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.onMouseDown=function(t){e.props.onResizeStart(t,e.props.direction)},e.onTouchStart=function(t){e.props.onResizeStart(t,e.props.direction)},e}return vz(n,t),n.prototype.render=function(){return e.createElement("div",{className:this.props.className||"",style:wz(wz({position:"absolute",userSelect:"none"},kz[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart},this.props.children)},n}(e.PureComponent),Dz=void 0&&(void 0).__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Cz=void 0&&(void 0).__assign||function(){return Cz=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Cz.apply(this,arguments)},Oz={width:"auto",height:"auto"},Nz=function(e,t,n){return Math.max(Math.min(e,n),t)},Tz=function(e,t){return Math.round(e/t)*t},Sz=function(e,t){return new RegExp(e,"i").test(t)},Az=function(e){return Boolean(e.touches&&e.touches.length)},Iz=function(e,t,n){void 0===n&&(n=0);var r=t.reduce((function(n,r,i){return Math.abs(r-e)<Math.abs(t[n]-e)?i:n}),0),i=Math.abs(t[r]-e);return 0===n||i<n?t[r]:e},Lz=function(e){return"auto"===(e=e.toString())||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:e+"px"},jz=function(e,t,n,r){if(e&&"string"==typeof e){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%"))return t*(Number(e.replace("%",""))/100);if(e.endsWith("vw"))return n*(Number(e.replace("vw",""))/100);if(e.endsWith("vh"))return r*(Number(e.replace("vh",""))/100)}return e},zz=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],Fz="__resizable_base__",Pz=function(t){function n(e){var n=t.call(this,e)||this;return n.ratio=1,n.resizable=null,n.parentLeft=0,n.parentTop=0,n.resizableLeft=0,n.resizableRight=0,n.resizableTop=0,n.resizableBottom=0,n.targetLeft=0,n.targetTop=0,n.appendBase=function(){if(!n.resizable||!n.window)return null;var e=n.parentNode;if(!e)return null;var t=n.window.document.createElement("div");return t.style.width="100%",t.style.height="100%",t.style.position="absolute",t.style.transform="scale(0, 0)",t.style.left="0",t.style.flex="0 0 100%",t.classList?t.classList.add(Fz):t.className+=Fz,e.appendChild(t),t},n.removeBase=function(e){var t=n.parentNode;t&&t.removeChild(e)},n.ref=function(e){e&&(n.resizable=e)},n.state={isResizing:!1,width:void 0===(n.propsSize&&n.propsSize.width)?"auto":n.propsSize&&n.propsSize.width,height:void 0===(n.propsSize&&n.propsSize.height)?"auto":n.propsSize&&n.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},n.onResizeStart=n.onResizeStart.bind(n),n.onMouseMove=n.onMouseMove.bind(n),n.onMouseUp=n.onMouseUp.bind(n),n}return Dz(n,t),Object.defineProperty(n.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"window",{get:function(){return this.resizable&&this.resizable.ownerDocument?this.resizable.ownerDocument.defaultView:null},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||Oz},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"size",{get:function(){var e=0,t=0;if(this.resizable&&this.window){var n=this.resizable.offsetWidth,r=this.resizable.offsetHeight,i=this.resizable.style.position;"relative"!==i&&(this.resizable.style.position="relative"),e="auto"!==this.resizable.style.width?this.resizable.offsetWidth:n,t="auto"!==this.resizable.style.height?this.resizable.offsetHeight:r,this.resizable.style.position=i}return{width:e,height:t}},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"sizeStyle",{get:function(){var e=this,t=this.props.size,n=function(t){if(void 0===e.state[t]||"auto"===e.state[t])return"auto";if(e.propsSize&&e.propsSize[t]&&e.propsSize[t].toString().endsWith("%")){if(e.state[t].toString().endsWith("%"))return e.state[t].toString();var n=e.getParentSize();return Number(e.state[t].toString().replace("px",""))/n[t]*100+"%"}return Lz(e.state[t])};return{width:t&&void 0!==t.width&&!this.state.isResizing?Lz(t.width):n("width"),height:t&&void 0!==t.height&&!this.state.isResizing?Lz(t.height):n("height")}},enumerable:!1,configurable:!0}),n.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var e=this.appendBase();if(!e)return{width:0,height:0};var t=!1,n=this.parentNode.style.flexWrap;"wrap"!==n&&(t=!0,this.parentNode.style.flexWrap="wrap"),e.style.position="relative",e.style.minWidth="100%",e.style.minHeight="100%";var r={width:e.offsetWidth,height:e.offsetHeight};return t&&(this.parentNode.style.flexWrap=n),this.removeBase(e),r},n.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},n.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},n.prototype.componentDidMount=function(){if(this.resizable&&this.window){var e=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:"auto"!==e.flexBasis?e.flexBasis:void 0})}},n.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},n.prototype.createSizeForCssProperty=function(e,t){var n=this.propsSize&&this.propsSize[t];return"auto"!==this.state[t]||this.state.original[t]!==e||void 0!==n&&"auto"!==n?e:"auto"},n.prototype.calculateNewMaxFromBoundary=function(e,t){var n,r,i=this.props.boundsByDirection,o=this.state.direction,s=i&&Sz("left",o),a=i&&Sz("top",o);if("parent"===this.props.bounds){var l=this.parentNode;l&&(n=s?this.resizableRight-this.parentLeft:l.offsetWidth+(this.parentLeft-this.resizableLeft),r=a?this.resizableBottom-this.parentTop:l.offsetHeight+(this.parentTop-this.resizableTop))}else"window"===this.props.bounds?this.window&&(n=s?this.resizableRight:this.window.innerWidth-this.resizableLeft,r=a?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(n=s?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),r=a?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return n&&Number.isFinite(n)&&(e=e&&e<n?e:n),r&&Number.isFinite(r)&&(t=t&&t<r?t:r),{maxWidth:e,maxHeight:t}},n.prototype.calculateNewSizeFromDirection=function(e,t){var n=this.props.scale||1,r=this.props.resizeRatio||1,i=this.state,o=i.direction,s=i.original,a=this.props,l=a.lockAspectRatio,c=a.lockAspectRatioExtraHeight,u=a.lockAspectRatioExtraWidth,d=s.width,p=s.height,h=c||0,f=u||0;return Sz("right",o)&&(d=s.width+(e-s.x)*r/n,l&&(p=(d-f)/this.ratio+h)),Sz("left",o)&&(d=s.width-(e-s.x)*r/n,l&&(p=(d-f)/this.ratio+h)),Sz("bottom",o)&&(p=s.height+(t-s.y)*r/n,l&&(d=(p-h)*this.ratio+f)),Sz("top",o)&&(p=s.height-(t-s.y)*r/n,l&&(d=(p-h)*this.ratio+f)),{newWidth:d,newHeight:p}},n.prototype.calculateNewSizeFromAspectRatio=function(e,t,n,r){var i=this.props,o=i.lockAspectRatio,s=i.lockAspectRatioExtraHeight,a=i.lockAspectRatioExtraWidth,l=void 0===r.width?10:r.width,c=void 0===n.width||n.width<0?e:n.width,u=void 0===r.height?10:r.height,d=void 0===n.height||n.height<0?t:n.height,p=s||0,h=a||0;if(o){var f=(u-p)*this.ratio+h,m=(d-p)*this.ratio+h,g=(l-h)/this.ratio+p,b=(c-h)/this.ratio+p,y=Math.max(l,f),v=Math.min(c,m),w=Math.max(u,g),x=Math.min(d,b);e=Nz(e,y,v),t=Nz(t,w,x)}else e=Nz(e,l,c),t=Nz(t,u,d);return{newWidth:e,newHeight:t}},n.prototype.setBoundingClientRect=function(){if("parent"===this.props.bounds){var e=this.parentNode;if(e){var t=e.getBoundingClientRect();this.parentLeft=t.left,this.parentTop=t.top}}if(this.props.bounds&&"string"!=typeof this.props.bounds){var n=this.props.bounds.getBoundingClientRect();this.targetLeft=n.left,this.targetTop=n.top}if(this.resizable){var r=this.resizable.getBoundingClientRect(),i=r.left,o=r.top,s=r.right,a=r.bottom;this.resizableLeft=i,this.resizableRight=s,this.resizableTop=o,this.resizableBottom=a}},n.prototype.onResizeStart=function(e,t){if(this.resizable&&this.window){var n,r=0,i=0;if(e.nativeEvent&&function(e){return Boolean((e.clientX||0===e.clientX)&&(e.clientY||0===e.clientY))}(e.nativeEvent)?(r=e.nativeEvent.clientX,i=e.nativeEvent.clientY):e.nativeEvent&&Az(e.nativeEvent)&&(r=e.nativeEvent.touches[0].clientX,i=e.nativeEvent.touches[0].clientY),this.props.onResizeStart)if(this.resizable)if(!1===this.props.onResizeStart(e,t,this.resizable))return;this.props.size&&(void 0!==this.props.size.height&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),void 0!==this.props.size.width&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio="number"==typeof this.props.lockAspectRatio?this.props.lockAspectRatio:this.size.width/this.size.height;var o=this.window.getComputedStyle(this.resizable);if("auto"!==o.flexBasis){var s=this.parentNode;if(s){var a=this.window.getComputedStyle(s).flexDirection;this.flexDir=a.startsWith("row")?"row":"column",n=o.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var l={original:{x:r,y:i,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:Cz(Cz({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(e.target).cursor||"auto"}),direction:t,flexBasis:n};this.setState(l)}},n.prototype.onMouseMove=function(e){var t=this;if(this.state.isResizing&&this.resizable&&this.window){if(this.window.TouchEvent&&Az(e))try{e.preventDefault(),e.stopPropagation()}catch(e){}var n=this.props,r=n.maxWidth,i=n.maxHeight,o=n.minWidth,s=n.minHeight,a=Az(e)?e.touches[0].clientX:e.clientX,l=Az(e)?e.touches[0].clientY:e.clientY,c=this.state,u=c.direction,d=c.original,p=c.width,h=c.height,m=this.getParentSize(),g=function(e,t,n,r,i,o,s){return r=jz(r,e.width,t,n),i=jz(i,e.height,t,n),o=jz(o,e.width,t,n),s=jz(s,e.height,t,n),{maxWidth:void 0===r?void 0:Number(r),maxHeight:void 0===i?void 0:Number(i),minWidth:void 0===o?void 0:Number(o),minHeight:void 0===s?void 0:Number(s)}}(m,this.window.innerWidth,this.window.innerHeight,r,i,o,s);r=g.maxWidth,i=g.maxHeight,o=g.minWidth,s=g.minHeight;var b=this.calculateNewSizeFromDirection(a,l),y=b.newHeight,v=b.newWidth,w=this.calculateNewMaxFromBoundary(r,i);this.props.snap&&this.props.snap.x&&(v=Iz(v,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(y=Iz(y,this.props.snap.y,this.props.snapGap));var x=this.calculateNewSizeFromAspectRatio(v,y,{width:w.maxWidth,height:w.maxHeight},{width:o,height:s});if(v=x.newWidth,y=x.newHeight,this.props.grid){var E=Tz(v,this.props.grid[0]),M=Tz(y,this.props.grid[1]),k=this.props.snapGap||0;v=0===k||Math.abs(E-v)<=k?E:v,y=0===k||Math.abs(M-y)<=k?M:y}var _={width:v-d.width,height:y-d.height};if(p&&"string"==typeof p)if(p.endsWith("%"))v=v/m.width*100+"%";else if(p.endsWith("vw")){v=v/this.window.innerWidth*100+"vw"}else if(p.endsWith("vh")){v=v/this.window.innerHeight*100+"vh"}if(h&&"string"==typeof h)if(h.endsWith("%"))y=y/m.height*100+"%";else if(h.endsWith("vw")){y=y/this.window.innerWidth*100+"vw"}else if(h.endsWith("vh")){y=y/this.window.innerHeight*100+"vh"}var D={width:this.createSizeForCssProperty(v,"width"),height:this.createSizeForCssProperty(y,"height")};"row"===this.flexDir?D.flexBasis=D.width:"column"===this.flexDir&&(D.flexBasis=D.height),f((function(){t.setState(D)})),this.props.onResize&&this.props.onResize(e,u,this.resizable,_)}},n.prototype.onMouseUp=function(e){var t=this.state,n=t.isResizing,r=t.direction,i=t.original;if(n&&this.resizable){var o={width:this.size.width-i.width,height:this.size.height-i.height};this.props.onResizeStop&&this.props.onResizeStop(e,r,this.resizable,o),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:Cz(Cz({},this.state.backgroundStyle),{cursor:"auto"})})}},n.prototype.updateSize=function(e){this.setState({width:e.width,height:e.height})},n.prototype.renderResizer=function(){var t=this,n=this.props,r=n.enable,i=n.handleStyles,o=n.handleClasses,s=n.handleWrapperStyle,a=n.handleWrapperClass,l=n.handleComponent;if(!r)return null;var c=Object.keys(r).map((function(n){return!1!==r[n]?e.createElement(_z,{key:n,direction:n,onResizeStart:t.onResizeStart,replaceStyles:i&&i[n],className:o&&o[n]},l&&l[n]?l[n]:null):null}));return e.createElement("div",{className:a,style:s},c)},n.prototype.render=function(){var t=this,n=Object.keys(this.props).reduce((function(e,n){return-1!==zz.indexOf(n)||(e[n]=t.props[n]),e}),{}),r=Cz(Cz(Cz({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(r.flexBasis=this.state.flexBasis);var i=this.props.as||"div";return e.createElement(i,Cz({ref:this.ref,style:r,className:this.props.className},n),this.state.isResizing&&e.createElement("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer())},n.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},n}(e.PureComponent);const Rz=e=>{let{node:n,editor:r,getPos:i}=e;const{alt:o,src:s,float:a,align:l,height:c,width:u}=n.attrs,d=o||"",{view:p}=r;return t.createElement(xc,null,t.createElement(Pz,{lockAspectRatio:!0,className:"neeto-editor__image neeto-editor__image--".concat(a," neeto-editor__image--").concat(l," neeto-editor__image-defaults"),size:{height:c,width:u},onResizeStop:(e,t,o)=>{p.dispatch(p.state.tr.setNodeMarkup(i(),void 0,{...n.attrs,height:o.offsetHeight,width:o.offsetWidth})),r.commands.focus()}},t.createElement("figure",null,t.createElement("img",x({alt:d,src:s},n.attrs)),t.createElement("figcaption",null,d))))},Bz=bz.extend({name:"image",addAttributes:()=>({...bz.config.addAttributes(),height:{default:"auto",rendered:!1},width:{default:"fit-content",rendered:!1},float:{default:"none",rendered:!1},align:{default:"center",rendered:!1}}),addCommands(){return{setImage:e=>t=>{var n,r,i;let{tr:o,commands:s}=t;return"image"===(null===(n=o.selection)||void 0===n||null===(r=n.node)||void 0===r||null===(i=r.type)||void 0===i?void 0:i.name)?s.updateAttributes("image",e):s.insertContent({type:this.name,attrs:e})},setImageAttributes:e=>t=>{let{tr:n}=t;const{selection:r}=n,i={...r.node.attrs,...e},o=this.type.create(i);n.replaceRangeWith(r.from,r.to,o)}}},parseHTML:()=>[{tag:"img"}],renderHTML(e){let{node:t}=e;const{alt:n,src:r,float:i,align:o,height:s,width:a}=t.attrs,l=n||"",c=isNaN(s)?s:"".concat(s,"px"),u=isNaN(a)?a:"".concat(a,"px"),d="height:".concat(c,";width:").concat(u,";");return["a",{class:"neeto-editor__image neeto-editor__image--".concat(i," neeto-editor__image--").concat(o," neeto-editor__image-defaults"),style:d,href:r,target:"_blank",rel:"noopener noreferrer"},["figure",{},["img",Bo(t.attrs,{src:r,caption:l})],["figcaption",l]]]},addNodeView:()=>kc(Rz)});var Uz=e=>{let{uploadEndpoint:t}=e;return Bz.extend({addProseMirrorPlugins:()=>[new Qt({props:{handleDOMEvents:{paste(e,n){var r,i;const{schema:o,selection:{$anchor:{pos:s}}}=e.state;if(!(null===(r=n.clipboardData)||void 0===r||null===(i=r.files)||void 0===i?void 0:i.length))return;const a=Array.from(n.clipboardData.files).filter((e=>/image/i.test(e.type)));a.length&&(n.preventDefault(),a.forEach((async n=>{const r=o.nodes.image.create({src:await(i=n,a=t,new Promise(((e,t)=>{new g(i,a).create(((n,r)=>{let{blob_url:i}=r;return n?t(n):e(i)}))})))});var i,a;const l=e.state.tr.insert(s,r);e.dispatch(l)})))}}}})]})},$z=Js.create({name:"figcaption",selectable:!1,draggable:!1,parseHTML:()=>[{tag:"figcaption"}]});const Hz=e=>{let{handleSubmit:t,shortcuts:n}=e;return is.create({name:"keyboard-shortcuts",addKeyboardShortcuts(){return{"Mod-Enter":()=>(null==t||t(this.editor.getHTML()),this.editor.commands.blur(),!0),...n}}})};var Wz=e=>{let{handleSubmit:t,shortcuts:n}=e;return Hz({handleSubmit:t,shortcuts:n})};const Vz=new Jt("mention"),qz=Js.create({name:"mention",addOptions(){return{HTMLAttributes:{},renderLabel({options:e,node:t}){var n;return`${e.suggestion.char}${null!==(n=t.attrs.label)&&void 0!==n?n:t.attrs.id}`},suggestion:{char:"@",pluginKey:Vz,command:({editor:e,range:t,props:n})=>{var r,i;const o=e.view.state.selection.$to.nodeAfter;(null===(r=null==o?void 0:o.text)||void 0===r?void 0:r.startsWith(" "))&&(t.to+=1),e.chain().focus().insertContentAt(t,[{type:this.name,attrs:n},{type:"text",text:" "}]).run(),null===(i=window.getSelection())||void 0===i||i.collapseToEnd()},allow:({state:e,range:t})=>{const n=e.doc.resolve(t.from),r=e.schema.nodes[this.name];return!!n.parent.type.contentMatch.matchType(r)}}}},group:"inline",inline:!0,selectable:!1,atom:!0,addAttributes:()=>({id:{default:null,parseHTML:e=>e.getAttribute("data-id"),renderHTML:e=>e.id?{"data-id":e.id}:{}},label:{default:null,parseHTML:e=>e.getAttribute("data-label"),renderHTML:e=>e.label?{"data-label":e.label}:{}}}),parseHTML(){return[{tag:`span[data-type="${this.name}"]`}]},renderHTML({node:e,HTMLAttributes:t}){return["span",Bo({"data-type":this.name},this.options.HTMLAttributes,t),this.options.renderLabel({options:this.options,node:e})]},renderText({node:e}){return this.options.renderLabel({options:this.options,node:e})},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.command((({tr:e,state:t})=>{let n=!1;const{selection:r}=t,{empty:i,anchor:o}=r;return!!i&&(t.doc.nodesBetween(o-1,o,((t,r)=>{if(t.type.name===this.name)return n=!0,e.insertText(this.options.suggestion.char||"",r,r+t.nodeSize),!1})),n)}))}},addProseMirrorPlugins(){return[uz({editor:this.editor,...this.options.suggestion})]}}),Yz=e=>{let{wrapperRef:t,index:n}=e;if(!t.current||n>=t.current.children.length)return;const r=8,i=t.current,o=i.children[n],s=o.clientHeight+r;let a=i.scrollTop;o.offsetTop+s>a+i.clientHeight?a=o.offsetTop-i.clientHeight+s:a>o.offsetTop&&(a=o.offsetTop-r),t.current.scrollTop=a};class Kz extends t.Component{constructor(e){super(e),zf(this,"selectItem",(e=>{const{items:t,command:n}=this.props,r=t[e];r&&n({label:r.name,id:r.key})})),zf(this,"upHandler",(()=>{const{items:e}=this.props;this.setState((t=>{const{selectedIndex:n}=t;return{selectedIndex:(n+e.length-1)%e.length}}))})),zf(this,"downHandler",(()=>{const{items:e}=this.props;this.setState((t=>{const{selectedIndex:n}=t;return{selectedIndex:(n+1)%e.length}}))})),zf(this,"enterHandler",(()=>{const{selectedIndex:e}=this.state;this.selectItem(e)})),zf(this,"onKeyDown",(e=>{let{event:t}=e;const n={ArrowUp:this.upHandler,ArrowDown:this.downHandler,Enter:this.enterHandler};return!!Object.prototype.hasOwnProperty.call(n,t.key)&&(n[t.key](),!0)})),this.state={selectedIndex:0},this.mentionRef=t.createRef()}componentDidUpdate(e){const{items:t}=this.props;t!==e.items&&this.setState({selectedIndex:0}),Yz({wrapperRef:this.mentionRef,index:this.state.selectedIndex})}render(){const{selectedIndex:e}=this.state,{items:n}=this.props;return 0===n.length?t.createElement("div",{className:"neeto-editor-mentions__wrapper"},t.createElement("p",{className:"neeto-editor-mentions__item"},"No Results")):t.createElement("div",{ref:this.mentionRef,className:"neeto-editor-mentions__wrapper","data-cy":"neeto-editor-mention-list"},n.map(((n,r)=>{let{key:i,name:o,imageUrl:s,showImage:a}=n;return t.createElement("button",{className:Sc("neeto-editor-mentions__item",{active:r===e}),key:i,onClick:()=>this.selectItem(r),type:"button","data-cy":"neeto-editor-mention-list-".concat(o)},a&&t.createElement(Ky,{user:{name:o,imageUrl:s}}),t.createElement("p",null,o))})))}}const Qz={render:()=>{let e,t;return{onStart:n=>{e=new Ec(Kz,{props:n,editor:n.editor}),t=oc("body",{getReferenceClientRect:n.clientRect,appendTo:()=>document.body,content:e.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"bottom-start",zIndex:99999})},onUpdate(n){e.updateProps(n),t[0].setProps({getReferenceClientRect:n.clientRect})},onKeyDown(n){var r;return"Escape"===n.event.key?(t[0].hide(),!0):null===(r=e.ref)||void 0===r?void 0:r.onKeyDown(n)},onExit(){t[0].destroy(),e.destroy()}}}},Gz=qz.extend({addCommands(){return{setMention:e=>{let{id:t,label:n}=e;return e=>{let{chain:r}=e;r().focus().insertContent([{type:this.name,attrs:{id:t,label:n}},{type:"text",text:" "}]).run()}}}}});var Zz=e=>{let{suggestion:t={},...n}=e;return Gz.configure({...n,suggestion:{...Qz,...t}})},Jz="[object Object]";var Xz,eF,tF=Function.prototype,nF=Object.prototype,rF=tF.toString,iF=nF.hasOwnProperty,oF=rF.call(Object),sF=nF.toString,aF=(Xz=Object.getPrototypeOf,eF=Object,function(e){return Xz(eF(e))});var lF=function(e){if(!function(e){return!!e&&"object"==typeof e}(e)||sF.call(e)!=Jz||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e))return!1;var t=aF(e);if(null===t)return!0;var n=iF.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&rF.call(n)==oF};const cF=e=>{const t=typeof e;return"string"===t||"funtion"===t?e:lF(e)?t=>{let{node:n}=t;const{name:r}=n.type;return e[r]}:""};var uF=is.create({name:"placeholder",addOptions:()=>({excludeNodeTypes:["variable","codeBlock"],emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!1,includeChildren:!1}),addProseMirrorPlugins(){return[new Qt({props:{decorations:e=>{let{doc:t,selection:n}=e;const r=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:i}=n,o=[];return r?(t.descendants(((e,t)=>{const n=i>=t&&i<=t+e.nodeSize,r=!e.isLeaf&&!e.childCount,s=this.options.excludeNodeTypes.includes(e.type.name);if((n||!this.options.showOnlyCurrent)&&!s&&r){const n=[this.options.emptyNodeClass];this.editor.isEmpty&&n.push(this.options.emptyEditorClass);const r=Ii.node(t,t+e.nodeSize,{class:n.join(" "),"data-placeholder":"function"==typeof this.options.placeholder?this.options.placeholder({editor:this.editor,node:e,pos:t}):this.options.placeholder});o.push(r)}return this.options.includeChildren})),zi.create(t,o)):null}}})]}});class dF extends t.Component{constructor(e){super(e),zf(this,"keydownHandler",(e=>{const t={Enter:this.enterHandler,ArrowUp:this.upHandler,ArrowDown:this.downHandler,ArrowLeft:this.leftArrowHandler,ArrowRight:this.rightArrowHandler};e.key in t&&t[e.key](e)})),zf(this,"selectItem",(e=>{const{items:t,editor:n,range:r}=this.props,i=t[e],o=i&&i.command,s=Iu(i.items);o&&s&&i.command({editor:n,range:r})})),zf(this,"upHandler",(()=>{const{items:e}=this.props,{selectedIndex:t}=this.state;this.setState({selectedIndex:(t+e.length-1)%e.length})})),zf(this,"downHandler",(()=>{const{items:e}=this.props,{selectedIndex:t}=this.state;this.setState({selectedIndex:(t+1)%e.length})})),zf(this,"enterHandler",(()=>{const{selectedIndex:e}=this.state;this.selectItem(e)})),zf(this,"leftArrowHandler",(()=>{const{menuIndex:e,setActiveMenuIndex:t}=this.props;e>0&&t(e-1)})),zf(this,"rightArrowHandler",(()=>{const{menuIndex:e,setActiveMenuIndex:t,items:n}=this.props,{selectedIndex:r}=this.state,i=n[r];i&&!Iu(i.items)&&t(e+1)})),this.state={selectedIndex:0},this.menuRef=t.createRef()}componentDidMount(){const{menuIndex:e,activeMenuIndex:t}=this.props;e===t&&document.addEventListener("keydown",this.keydownHandler)}componentWillUnmount(){document.removeEventListener("keydown",this.keydownHandler)}componentDidUpdate(e){const{items:t,menuIndex:n,activeMenuIndex:r}=this.props,i=n===r;t!==e.items&&this.setState({selectedIndex:0}),Yz({wrapperRef:this.menuRef,index:this.state.selectedIndex}),i?document.addEventListener("keydown",this.keydownHandler):document.removeEventListener("keydown",this.keydownHandler)}render(){const{items:e,menuIndex:n,activeMenuIndex:r}=this.props,{selectedIndex:i}=this.state,o=n===r;return t.createElement("div",{ref:this.menuRef,className:"neeto-editor-slash-commands__wrapper"},e.map(((e,r)=>{const s=Iu(e.items),a=t.createElement(pF,{key:e.title,item:e,index:r,selectedIndex:o?i:-1,selectItem:()=>s&&this.selectItem(r),onHover:()=>this.setState({selectedIndex:r})});return s?a:t.createElement(Ku,{key:e.title,interactive:!0,placement:"right",content:t.createElement(dF,x({},this.props,{items:e.items,menuIndex:n+1})),onCreate:e=>{let{popper:t}=e;return t.style.width="max-content"},visible:i===r,onShow:()=>{this.isSubmenuOpened=!0},onHide:()=>{this.isSubmenuOpened=!1}},a)})))}}const pF=s(((e,n)=>{let{item:r,selectedIndex:i,index:o,selectItem:s,onHover:a}=e;const{Icon:l}=r;return t.createElement("div",{className:Sc("neeto-editor-slash-commands__item",{active:o===i}),onClick:s,ref:n,"data-cy":"neeto-editor-command-list-item-".concat(o),onMouseEnter:a},l&&t.createElement(l,{size:20}),t.createElement("div",{className:"neeto-editor-slash-commands__item-content"},t.createElement("h5",null,r.title),t.createElement("p",null,r.description)))}));class hF extends t.Component{constructor(){super(...arguments),zf(this,"state",{activeMenuIndex:0}),zf(this,"onKeyDown",(e=>{let{event:t}=e;return["Enter","ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(t.key)})),zf(this,"setActiveMenuIndex",(e=>this.setState({activeMenuIndex:e})))}render(){return t.createElement(dF,x({},this.props,{menuIndex:0,activeMenuIndex:this.state.activeMenuIndex,setActiveMenuIndex:this.setActiveMenuIndex}))}}const fF={PARAGRAPH:{optionName:C.PARAGRAPH,title:"Paragraph",description:"Add a plain text block.",Icon:Gp,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).setNode("paragraph").run()}},H1:{optionName:C.H1,title:"H1",description:"Add a big heading.",Icon:lh,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).setNode("heading",{level:1}).run()}},H2:{optionName:C.H2,title:"H2",description:"Add a sub-heading.",Icon:uh,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).setNode("heading",{level:2}).run()}},H3:{optionName:C.H3,title:"H3",description:"Add a sub-heading of level 3.",Icon:fh,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).setNode("heading",{level:3}).run()}},H4:{optionName:C.H4,title:"H4",description:"Add a sub-heading of level 4.",Icon:fh,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).setNode("heading",{level:4}).run()}},H5:{optionName:C.H5,title:"H5",description:"Add a sub-heading of level 5.",Icon:fh,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).setNode("heading",{level:5}).run()}},H6:{optionName:C.H6,title:"H6",description:"Add a sub-heading of level 6.",Icon:fh,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).setNode("heading",{level:6}).run()}},LIST_ORDERED:{optionName:C.LIST_ORDERED,title:"Numbered list",description:"Add a list with numbering.",Icon:Wp,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).toggleOrderedList().run()}},LIST_BULLETS:{optionName:C.LIST_BULLETS,title:"Bulleted list",description:"Add a list with bullets.",Icon:$p,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).toggleBulletList().run()}},BLOCKQUOTE:{optionName:C.BLOCKQUOTE,title:"Blockquote",description:"Add a quote.",Icon:gp,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).toggleBlockquote().run()}},IMAGE:{optionName:C.IMAGE_UPLOAD,title:"Image",description:"Add an image.",Icon:Lp,command:e=>{let{editor:t,range:n}=e;return t.chain().focus().deleteRange(n).run()}},CODE:{optionName:C.CODE_BLOCK,title:"Code block",description:"Add a code block with syntax highlighting.",Icon:kp,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).toggleCodeBlock().run()}},EMOJI:{optionName:C.EMOJI,title:"Emoji",description:"Add an emoji.",Icon:nh,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).insertContent("::").run()}},DIVIDER:{optionName:C.DIVIDER,title:"Divider",description:"Add an horizontal line to separate sections.",Icon:qp,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).setHorizontalRule().run()}},VIDEO:{optionName:C.VIDEO_EMBED,title:"Embed Youtube/Vimeo",description:"Embed a video from major services.",Icon:wh,command:e=>{let{editor:t,range:n}=e;const r=prompt("Please enter Youtube/Vimeo embed URL."),i=(e=>{const t=e.match(af);return t&&"https://www.youtube.com/embed/".concat(t[5])})(r)||(e=>{const t=e.match(lf);return t&&"https://player.vimeo.com/video/".concat(t[4],"?h=").concat(t[5])})(r);i?t.chain().focus().deleteRange(n).setExternalVideo({src:i}).run():t.chain().focus().deleteRange(n).insertContent("#invalid").run()}},PASTE_UNFORMATTED:{optionName:C.PASTE_UNFORMATTED,title:"Paste Unformatted",description:"Paste by removing all styles.",Icon:Kp,command:e=>{let{editor:t,range:n}=e;return t.chain().focus().deleteRange(n).pasteUnformatted().run()}},NO_RESULT:{title:"No results",command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).run()}}},mF=new Jt("commands");var gF=e=>{let{setImageUploadVisible:t,addonCommands:n,options:r}=e,i=[fF.PARAGRAPH,fF.H1,fF.H2,fF.H3,fF.H4,fF.H5,fF.H6,fF.LIST_ORDERED,fF.LIST_BULLETS,fF.BLOCKQUOTE,{...fF.IMAGE,command:function(){t(!0),fF.IMAGE.command(...arguments)}},fF.CODE,fF.EMOJI,fF.DIVIDER,fF.VIDEO,fF.PASTE_UNFORMATTED];return Iu(r)||(i=i.filter((e=>{let{optionName:t}=e;return r.includes(t)}))),Iu(n)||(i=i.concat(n)),is.create({name:"slash-commands",addOptions:()=>({HTMLAttributes:{class:"commands"},suggestion:{char:"/",startOfLine:!1,pluginKey:mF,command:e=>{let{editor:t,range:n,props:r}=e;r.command({editor:t,range:n})},items:e=>{let{query:t}=e;const n=i.filter((e=>{let{title:n}=e;return n.toLowerCase().includes(t.toLowerCase())}));return Iu(n)?[fF.NO_RESULT]:n},render:()=>{let e,t;return{onStart:n=>{e=new Ec(hF,{props:n,editor:n.editor}),t=oc("body",{getReferenceClientRect:n.clientRect,appendTo:()=>document.body,content:e.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"bottom-start",arrow:!1,zIndex:99999}),bf()},onUpdate(n){e.updateProps(n),t[0].setProps({getReferenceClientRect:n.clientRect})},onKeyDown(t){var n;return null===(n=e.ref)||void 0===n?void 0:n.onKeyDown(t)},onExit(){t&&t[0].destroy(),e&&e.destroy(),yf()}}}}}),addProseMirrorPlugins(){return[uz({editor:this.editor,...this.options.suggestion})]}})},bF=zA.extend({name:"title",defining:!0,addAttributes:()=>({level:{default:1,rendered:!1}}),parseHTML:()=>[{tag:"h1"}],renderHTML(e){let{_node:t,HTMLAttributes:n}=e;return["h1",Bo(this.options.HTMLAttributes,n),0]}});const yF=Qs({find:/--$/,replace:"—"}),vF=Qs({find:/\.\.\.$/,replace:"…"}),wF=Qs({find:/(?:^|[\s{[(<'"\u2018\u201C])(")$/,replace:"“"}),xF=Qs({find:/"$/,replace:"”"}),EF=Qs({find:/(?:^|[\s{[(<'"\u2018\u201C])(')$/,replace:"‘"}),MF=Qs({find:/'$/,replace:"’"}),kF=Qs({find:/<-$/,replace:"←"}),_F=Qs({find:/->$/,replace:"→"}),DF=Qs({find:/\(c\)$/,replace:"©"}),CF=Qs({find:/\(tm\)$/,replace:"™"}),OF=Qs({find:/\(r\)$/,replace:"®"}),NF=Qs({find:/1\/2$/,replace:"½"}),TF=Qs({find:/\+\/-$/,replace:"±"}),SF=Qs({find:/!=$/,replace:"≠"}),AF=Qs({find:/<<$/,replace:"«"}),IF=Qs({find:/>>$/,replace:"»"}),LF=Qs({find:/\d+\s?([*x])\s?\d+$/,replace:"×"}),jF=Qs({find:/\^2$/,replace:"²"}),zF=Qs({find:/\^3$/,replace:"³"}),FF=Qs({find:/1\/4$/,replace:"¼"}),PF=Qs({find:/3\/4$/,replace:"¾"});var RF=is.create({name:"typography",addInputRules(){const e=[];return!1!==this.options.emDash&&e.push(yF),!1!==this.options.ellipsis&&e.push(vF),!1!==this.options.openDoubleQuote&&e.push(wF),!1!==this.options.closeDoubleQuote&&e.push(xF),!1!==this.options.openSingleQuote&&e.push(EF),!1!==this.options.closeSingleQuote&&e.push(MF),!1!==this.options.leftArrow&&e.push(kF),!1!==this.options.rightArrow&&e.push(_F),!1!==this.options.copyright&&e.push(DF),!1!==this.options.trademark&&e.push(CF),!1!==this.options.registeredTrademark&&e.push(OF),!1!==this.options.oneHalf&&e.push(NF),!1!==this.options.plusMinus&&e.push(TF),!1!==this.options.notEqual&&e.push(SF),!1!==this.options.laquo&&e.push(AF),!1!==this.options.raquo&&e.push(IF),!1!==this.options.multiplication&&e.push(LF),!1!==this.options.superscriptTwo&&e.push(jF),!1!==this.options.superscriptThree&&e.push(zF),!1!==this.options.oneQuarter&&e.push(FF),!1!==this.options.threeQuarters&&e.push(PF),e}}).configure({emDash:!1,openDoubleQuote:!1,closeDoubleQuote:!1,openSingleQuote:!1,closeSingleQuote:!1});const BF=e=>{let{items:n,command:r}=e;return t.createElement("div",{className:"neeto-editor-variables-suggestion"},t.createElement(rv,{variables:n,onClickVariable:e=>{const{category_key:t,key:n}=e,i=t?"".concat(t,".").concat(n):n;r({label:i,id:i})}}))},UF=new Jt("variables"),$F=Js.create({name:"variable",addOptions:()=>({HTMLAttributes:{class:"neeto-editor-variable"},charOpen:"{{",charClose:"}}",renderLabel(e){let{options:t,node:n}=e;return"".concat(t.charOpen).concat(n.attrs.label||n.attrs.id).concat(t.charClose)},suggestion:{}}),group:"inline",inline:!0,selectable:!1,atom:!0,addAttributes:()=>({id:{default:null,parseHTML:e=>e.getAttribute("data-id"),renderHTML:e=>e.id?{"data-id":e.id}:{}},label:{default:null,parseHTML:e=>e.getAttribute("data-label"),renderHTML:e=>e.label?{"data-label":e.label}:{}}}),parseHTML:()=>[{tag:"span[data-variable]"}],renderHTML(e){let{node:t,HTMLAttributes:n}=e;return["span",Bo({"data-variable":""},this.options.HTMLAttributes,n),this.options.renderLabel({options:this.options,node:t})]},renderText(e){let{node:t}=e;return this.options.renderLabel({options:this.options,node:t})},addCommands(){return{setVariable:e=>t=>{let{chain:n}=t;n().focus().insertContent([{type:this.name,attrs:e},{type:"text",text:" "}]).run()}}},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.command((e=>{let{tr:t,state:n}=e,r=!1;const{selection:i}=n,{empty:o,anchor:s}=i;return!!o&&(n.doc.nodesBetween(s-1,s,((e,n)=>{if(e.type.name===this.name)return r=!0,t.insertText("",n,n+e.nodeSize),!1})),r)}))}},addProseMirrorPlugins(){return[uz({editor:this.editor,...this.options.suggestion})]}}),HF={char:"{{",startOfLine:!1,pluginKey:UF,command:e=>{let{editor:t,range:n,props:r}=e;t.chain().focus().deleteRange(n).setVariable(r).run()},items:()=>[],render:()=>{let e,t;return{onStart:n=>{e=new Ec(BF,{props:n,editor:n.editor}),t=oc("body",{getReferenceClientRect:n.clientRect,appendTo:()=>document.body,content:e.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"bottom-start",zIndex:99999})},onUpdate(n){e.updateProps(n),t[0].setProps({getReferenceClientRect:n.clientRect})},onExit(){t[0].destroy(),e.destroy()}}}};var WF=e=>{let{suggestion:t={}}=e;return $F.configure({suggestion:{...HF,...t}})};const VF=(e,t)=>{const n=[];e.split(/\n/).forEach((e=>{const r={type:"paragraph"};e.length>0&&(r.content=[{type:"text",text:e}]);const i=ie.fromJSON(t.doc.type.schema,r);n.push(i)}));const r=L.fromArray(n);return B.maxOpen(r)},qF=(e,n)=>{let{forceTitle:r=!1,titleError:s=!1,hideSlashCommands:a=!1,defaults:l=ju,addons:c=[],addonCommands:u,className:d,uploadEndpoint:p=N,uploadConfig:h={},initialValue:f="",onChange:m=(()=>{}),onFocus:g=(()=>{}),onBlur:b=(()=>{}),menuType:y="fixed",variables:v,mentions:w,showImageInMention:E=!1,placeholder:D=(r?{title:"Untitled"}:null),extensions:O,contentClassName:T,characterLimit:S,editorSecrets:A,rows:I=6,autoFocus:L=!1,onSubmit:j,heightStrategy:z="fixed",characterCountStrategy:F="hidden",keyboardShortcuts:P=[],error:R=null,...B}=e;const[U,$]=i(!1),H="fixed"===y,W="bubble"===y,V=!a,q=(e=>{if(e){if("string"==typeof e&&e.length)return!0;if("object"==typeof e&&Object.keys(e).length)return!0;if("function"==typeof e)return!0}return!1})(D),Y=!q&&V,K=c.includes("image-upload-unsplash"),Q="hidden"!==F,G=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],{includeImageUpload:n}=arguments.length>2?arguments[2]:void 0;const r=t.map((e=>e.toLowerCase()));return n&&r.push(C.IMAGE_UPLOAD),[].concat(e,r)}(l,c,{includeImageUpload:K}),Z=(e=>{let{forceTitle:t,placeholder:n,extensions:r,mentions:i,variables:o,isSlashCommandsActive:s,showImageInMention:a,setImageUploadVisible:l,options:c,addonCommands:u,characterLimit:d,onSubmit:p,keyboardShortcuts:h,uploadEndpoint:f}=e,m=[bF,az.extend({content:t?"title block*":"block+"}),vI.configure({document:!1,codeBlock:!1,code:!1}),YO,ET,RF,ZO,oz,Uz({uploadEndpoint:f}),$z,lz,xT,KO.configure({mode:"shallowest"}),uF.configure({placeholder:cF(n)}),mz,pz,sz,WO.configure({limit:d}),Wz({handleSubmit:p,shortcuts:h})];return s&&m.push(gF({setImageUploadVisible:l,options:c,addonCommands:u})),Iu(i)||m.push(Zz({suggestion:{items:tv(i,a)}})),Iu(o)||m.push(WF({suggestion:{items:()=>o}})),Iu(r)||(m=m.concat(r)),m})({contentClassName:T,forceTitle:r,placeholder:D,extensions:O,mentions:w,variables:v,isSlashCommandsActive:V,showImageInMention:E,setImageUploadVisible:$,options:G,addonCommands:u,characterLimit:S,keyboardShortcuts:P,onSubmit:j,uploadEndpoint:p}),J=Sc("neeto-editor",{"slash-active":Y,"fixed-menu-active border":H,"bubble-menu-active":W,"force-title":r,"force-title--error":s,"placeholder-active":q,[d]:d}),X=(e=>{let{heightStrategy:t,rows:n}=e;const r={},i=n*_+2*(M+k);return"flexible"===t?r["min-height"]="".concat(i,"px"):r.height="".concat(i,"px"),r})({heightStrategy:z,rows:I}),ee=_c({extensions:Z,content:f,injectCSS:!1,autofocus:L&&"end",editorProps:{attributes:{class:J,style:Au(X)},clipboardTextParser:VF},parseOptions:{preserveWhitespace:!0},onCreate:e=>{let{editor:t}=e;return!L&&(e=>{const{state:t,view:n}=e,r=Ct.atEnd(t.doc),i=t.tr;i.setSelection(r),n.dispatch(i)})(t)},onUpdate:e=>{let{editor:t}=e;return m(t.getHTML())},onFocus:g,onBlur:b});return t.useImperativeHandle(n,(()=>({editor:ee}))),o((()=>{![process.env.RAILS_ENV,"production"].includes("production")&&Iu(f)&&console.warn('[neeto-editor]: Empty value of "initialValue" in needtoEditor is expected to be "<p></p>" instead of "'.concat(f,'".'))}),[f]),t.createElement(Lu,{error:R,isFixedMenuActive:H},H&&t.createElement(sv,{editor:ee,variables:v,setImageUploadVisible:$,options:G,mentions:w,showImageInMention:E}),W&&t.createElement(df,{editor:ee,options:G}),t.createElement(HO,{isVisible:U,setIsVisible:$,editor:ee,imageUploadUrl:p,uploadConfig:h,isUnsplashImageUploadActive:K,unsplashApiKey:null==A?void 0:A.unsplash}),t.createElement(bc,x({editor:ee},B)),Q&&t.createElement(pf,{count:null==ee?void 0:ee.storage.characterCount.characters(),limit:S,strategy:F}))};var YF=t.forwardRef(qF),KF={exports:{}},QF=KF.exports=function(){function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,n){return t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(e,n)}function n(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function r(e,i,o){return r=n()?Reflect.construct:function(e,n,r){var i=[null];i.push.apply(i,n);var o=new(Function.bind.apply(e,i));return r&&t(o,r.prototype),o},r.apply(null,arguments)}function i(e){return o(e)||s(e)||a(e)||c()}function o(e){if(Array.isArray(e))return l(e)}function s(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function a(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u=Object.hasOwnProperty,d=Object.setPrototypeOf,p=Object.isFrozen,h=Object.getPrototypeOf,f=Object.getOwnPropertyDescriptor,m=Object.freeze,g=Object.seal,b=Object.create,y="undefined"!=typeof Reflect&&Reflect,v=y.apply,w=y.construct;v||(v=function(e,t,n){return e.apply(t,n)}),m||(m=function(e){return e}),g||(g=function(e){return e}),w||(w=function(e,t){return r(e,i(t))});var x=S(Array.prototype.forEach),E=S(Array.prototype.pop),M=S(Array.prototype.push),k=S(String.prototype.toLowerCase),_=S(String.prototype.match),D=S(String.prototype.replace),C=S(String.prototype.indexOf),O=S(String.prototype.trim),N=S(RegExp.prototype.test),T=A(TypeError);function S(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return v(e,t,r)}}function A(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return w(e,n)}}function I(e,t,n){n=n||k,d&&d(e,null);for(var r=t.length;r--;){var i=t[r];if("string"==typeof i){var o=n(i);o!==i&&(p(t)||(t[r]=o),i=o)}e[i]=!0}return e}function L(e){var t,n=b(null);for(t in e)v(u,e,[t])&&(n[t]=e[t]);return n}function j(e,t){for(;null!==e;){var n=f(e,t);if(n){if(n.get)return S(n.get);if("function"==typeof n.value)return S(n.value)}e=h(e)}function r(e){return console.warn("fallback value for",e),null}return r}var z=m(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),F=m(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),P=m(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),R=m(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),B=m(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),U=m(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),$=m(["#text"]),H=m(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),W=m(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),V=m(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),q=m(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Y=g(/\{\{[\w\W]*|[\w\W]*\}\}/gm),K=g(/<%[\w\W]*|[\w\W]*%>/gm),Q=g(/^data-[\-\w.\u00B7-\uFFFF]/),G=g(/^aria-[\-\w]+$/),Z=g(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),J=g(/^(?:\w+script|data):/i),X=g(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ee=g(/^html$/i),te=function(){return"undefined"==typeof window?null:window},ne=function(t,n){if("object"!==e(t)||"function"!=typeof t.createPolicy)return null;var r=null,i="data-tt-policy-suffix";n.currentScript&&n.currentScript.hasAttribute(i)&&(r=n.currentScript.getAttribute(i));var o="dompurify"+(r?"#"+r:"");try{return t.createPolicy(o,{createHTML:function(e){return e},createScriptURL:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}};function re(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:te(),n=function(e){return re(e)};if(n.version="2.3.10",n.removed=[],!t||!t.document||9!==t.document.nodeType)return n.isSupported=!1,n;var r=t.document,o=t.document,s=t.DocumentFragment,a=t.HTMLTemplateElement,l=t.Node,c=t.Element,u=t.NodeFilter,d=t.NamedNodeMap,p=void 0===d?t.NamedNodeMap||t.MozNamedAttrMap:d,h=t.HTMLFormElement,f=t.DOMParser,g=t.trustedTypes,b=c.prototype,y=j(b,"cloneNode"),v=j(b,"nextSibling"),w=j(b,"childNodes"),S=j(b,"parentNode");if("function"==typeof a){var A=o.createElement("template");A.content&&A.content.ownerDocument&&(o=A.content.ownerDocument)}var ie=ne(g,r),oe=ie?ie.createHTML(""):"",se=o,ae=se.implementation,le=se.createNodeIterator,ce=se.createDocumentFragment,ue=se.getElementsByTagName,de=r.importNode,pe={};try{pe=L(o).documentMode?o.documentMode:{}}catch(e){}var he={};n.isSupported="function"==typeof S&&ae&&void 0!==ae.createHTMLDocument&&9!==pe;var fe,me,ge=Y,be=K,ye=Q,ve=G,we=J,xe=X,Ee=Z,Me=null,ke=I({},[].concat(i(z),i(F),i(P),i(B),i($))),_e=null,De=I({},[].concat(i(H),i(W),i(V),i(q))),Ce=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Oe=null,Ne=null,Te=!0,Se=!0,Ae=!1,Ie=!1,Le=!1,je=!1,ze=!1,Fe=!1,Pe=!1,Re=!1,Be=!0,Ue=!0,$e=!1,He={},We=null,Ve=I({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),qe=null,Ye=I({},["audio","video","img","source","image","track"]),Ke=null,Qe=I({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ge="http://www.w3.org/1998/Math/MathML",Ze="http://www.w3.org/2000/svg",Je="http://www.w3.org/1999/xhtml",Xe=Je,et=!1,tt=["application/xhtml+xml","text/html"],nt="text/html",rt=null,it=o.createElement("form"),ot=function(e){return e instanceof RegExp||e instanceof Function},st=function(t){rt&&rt===t||(t&&"object"===e(t)||(t={}),t=L(t),fe=fe=-1===tt.indexOf(t.PARSER_MEDIA_TYPE)?nt:t.PARSER_MEDIA_TYPE,me="application/xhtml+xml"===fe?function(e){return e}:k,Me="ALLOWED_TAGS"in t?I({},t.ALLOWED_TAGS,me):ke,_e="ALLOWED_ATTR"in t?I({},t.ALLOWED_ATTR,me):De,Ke="ADD_URI_SAFE_ATTR"in t?I(L(Qe),t.ADD_URI_SAFE_ATTR,me):Qe,qe="ADD_DATA_URI_TAGS"in t?I(L(Ye),t.ADD_DATA_URI_TAGS,me):Ye,We="FORBID_CONTENTS"in t?I({},t.FORBID_CONTENTS,me):Ve,Oe="FORBID_TAGS"in t?I({},t.FORBID_TAGS,me):{},Ne="FORBID_ATTR"in t?I({},t.FORBID_ATTR,me):{},He="USE_PROFILES"in t&&t.USE_PROFILES,Te=!1!==t.ALLOW_ARIA_ATTR,Se=!1!==t.ALLOW_DATA_ATTR,Ae=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Ie=t.SAFE_FOR_TEMPLATES||!1,Le=t.WHOLE_DOCUMENT||!1,Fe=t.RETURN_DOM||!1,Pe=t.RETURN_DOM_FRAGMENT||!1,Re=t.RETURN_TRUSTED_TYPE||!1,ze=t.FORCE_BODY||!1,Be=!1!==t.SANITIZE_DOM,Ue=!1!==t.KEEP_CONTENT,$e=t.IN_PLACE||!1,Ee=t.ALLOWED_URI_REGEXP||Ee,Xe=t.NAMESPACE||Je,t.CUSTOM_ELEMENT_HANDLING&&ot(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ce.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&ot(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ce.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ce.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ie&&(Se=!1),Pe&&(Fe=!0),He&&(Me=I({},i($)),_e=[],!0===He.html&&(I(Me,z),I(_e,H)),!0===He.svg&&(I(Me,F),I(_e,W),I(_e,q)),!0===He.svgFilters&&(I(Me,P),I(_e,W),I(_e,q)),!0===He.mathMl&&(I(Me,B),I(_e,V),I(_e,q))),t.ADD_TAGS&&(Me===ke&&(Me=L(Me)),I(Me,t.ADD_TAGS,me)),t.ADD_ATTR&&(_e===De&&(_e=L(_e)),I(_e,t.ADD_ATTR,me)),t.ADD_URI_SAFE_ATTR&&I(Ke,t.ADD_URI_SAFE_ATTR,me),t.FORBID_CONTENTS&&(We===Ve&&(We=L(We)),I(We,t.FORBID_CONTENTS,me)),Ue&&(Me["#text"]=!0),Le&&I(Me,["html","head","body"]),Me.table&&(I(Me,["tbody"]),delete Oe.tbody),m&&m(t),rt=t)},at=I({},["mi","mo","mn","ms","mtext"]),lt=I({},["foreignobject","desc","title","annotation-xml"]),ct=I({},["title","style","font","a","script"]),ut=I({},F);I(ut,P),I(ut,R);var dt=I({},B);I(dt,U);var pt=function(e){var t=S(e);t&&t.tagName||(t={namespaceURI:Je,tagName:"template"});var n=k(e.tagName),r=k(t.tagName);return e.namespaceURI===Ze?t.namespaceURI===Je?"svg"===n:t.namespaceURI===Ge?"svg"===n&&("annotation-xml"===r||at[r]):Boolean(ut[n]):e.namespaceURI===Ge?t.namespaceURI===Je?"math"===n:t.namespaceURI===Ze?"math"===n&&lt[r]:Boolean(dt[n]):e.namespaceURI===Je&&!(t.namespaceURI===Ze&&!lt[r])&&!(t.namespaceURI===Ge&&!at[r])&&!dt[n]&&(ct[n]||!ut[n])},ht=function(e){M(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=oe}catch(t){e.remove()}}},ft=function(e,t){try{M(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){M(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!_e[e])if(Fe||Pe)try{ht(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},mt=function(e){var t,n;if(ze)e="<remove></remove>"+e;else{var r=_(e,/^[\r\n\t ]+/);n=r&&r[0]}"application/xhtml+xml"===fe&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");var i=ie?ie.createHTML(e):e;if(Xe===Je)try{t=(new f).parseFromString(i,fe)}catch(e){}if(!t||!t.documentElement){t=ae.createDocument(Xe,"template",null);try{t.documentElement.innerHTML=et?"":i}catch(e){}}var s=t.body||t.documentElement;return e&&n&&s.insertBefore(o.createTextNode(n),s.childNodes[0]||null),Xe===Je?ue.call(t,Le?"html":"body")[0]:Le?t.documentElement:s},gt=function(e){return le.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT,null,!1)},bt=function(e){return e instanceof h&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof p)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore)},yt=function(t){return"object"===e(l)?t instanceof l:t&&"object"===e(t)&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName},vt=function(e,t,r){he[e]&&x(he[e],(function(e){e.call(n,t,r,rt)}))},wt=function(e){var t;if(vt("beforeSanitizeElements",e,null),bt(e))return ht(e),!0;if(N(/[\u0080-\uFFFF]/,e.nodeName))return ht(e),!0;var r=me(e.nodeName);if(vt("uponSanitizeElement",e,{tagName:r,allowedTags:Me}),e.hasChildNodes()&&!yt(e.firstElementChild)&&(!yt(e.content)||!yt(e.content.firstElementChild))&&N(/<[/\w]/g,e.innerHTML)&&N(/<[/\w]/g,e.textContent))return ht(e),!0;if("select"===r&&N(/<template/i,e.innerHTML))return ht(e),!0;if(!Me[r]||Oe[r]){if(!Oe[r]&&Et(r)){if(Ce.tagNameCheck instanceof RegExp&&N(Ce.tagNameCheck,r))return!1;if(Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(r))return!1}if(Ue&&!We[r]){var i=S(e)||e.parentNode,o=w(e)||e.childNodes;if(o&&i)for(var s=o.length-1;s>=0;--s)i.insertBefore(y(o[s],!0),v(e))}return ht(e),!0}return e instanceof c&&!pt(e)?(ht(e),!0):"noscript"!==r&&"noembed"!==r||!N(/<\/no(script|embed)/i,e.innerHTML)?(Ie&&3===e.nodeType&&(t=e.textContent,t=D(t,ge," "),t=D(t,be," "),e.textContent!==t&&(M(n.removed,{element:e.cloneNode()}),e.textContent=t)),vt("afterSanitizeElements",e,null),!1):(ht(e),!0)},xt=function(e,t,n){if(Be&&("id"===t||"name"===t)&&(n in o||n in it))return!1;if(Se&&!Ne[t]&&N(ye,t));else if(Te&&N(ve,t));else if(!_e[t]||Ne[t]){if(!(Et(e)&&(Ce.tagNameCheck instanceof RegExp&&N(Ce.tagNameCheck,e)||Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(e))&&(Ce.attributeNameCheck instanceof RegExp&&N(Ce.attributeNameCheck,t)||Ce.attributeNameCheck instanceof Function&&Ce.attributeNameCheck(t))||"is"===t&&Ce.allowCustomizedBuiltInElements&&(Ce.tagNameCheck instanceof RegExp&&N(Ce.tagNameCheck,n)||Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(n))))return!1}else if(Ke[t]);else if(N(Ee,D(n,xe,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==C(n,"data:")||!qe[e])if(Ae&&!N(we,D(n,xe,"")));else if(n)return!1;return!0},Et=function(e){return e.indexOf("-")>0},Mt=function(t){var r,i,o,s;vt("beforeSanitizeAttributes",t,null);var a=t.attributes;if(a){var l={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:_e};for(s=a.length;s--;){var c=r=a[s],u=c.name,d=c.namespaceURI;if(i="value"===u?r.value:O(r.value),o=me(u),l.attrName=o,l.attrValue=i,l.keepAttr=!0,l.forceKeepAttr=void 0,vt("uponSanitizeAttribute",t,l),i=l.attrValue,!l.forceKeepAttr&&(ft(u,t),l.keepAttr))if(N(/\/>/i,i))ft(u,t);else{Ie&&(i=D(i,ge," "),i=D(i,be," "));var p=me(t.nodeName);if(xt(p,o,i)){if(ie&&"object"===e(g)&&"function"==typeof g.getAttributeType)if(d);else switch(g.getAttributeType(p,o)){case"TrustedHTML":i=ie.createHTML(i);break;case"TrustedScriptURL":i=ie.createScriptURL(i)}try{d?t.setAttributeNS(d,u,i):t.setAttribute(u,i),E(n.removed)}catch(e){}}}}vt("afterSanitizeAttributes",t,null)}},kt=function e(t){var n,r=gt(t);for(vt("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)vt("uponSanitizeShadowNode",n,null),wt(n)||(n.content instanceof s&&e(n.content),Mt(n));vt("afterSanitizeShadowDOM",t,null)};return n.sanitize=function(i,o){var a,c,u,d,p;if((et=!i)&&(i="\x3c!--\x3e"),"string"!=typeof i&&!yt(i)){if("function"!=typeof i.toString)throw T("toString is not a function");if("string"!=typeof(i=i.toString()))throw T("dirty is not a string, aborting")}if(!n.isSupported){if("object"===e(t.toStaticHTML)||"function"==typeof t.toStaticHTML){if("string"==typeof i)return t.toStaticHTML(i);if(yt(i))return t.toStaticHTML(i.outerHTML)}return i}if(je||st(o),n.removed=[],"string"==typeof i&&($e=!1),$e){if(i.nodeName){var h=me(i.nodeName);if(!Me[h]||Oe[h])throw T("root node is forbidden and cannot be sanitized in-place")}}else if(i instanceof l)1===(c=(a=mt("\x3c!----\x3e")).ownerDocument.importNode(i,!0)).nodeType&&"BODY"===c.nodeName||"HTML"===c.nodeName?a=c:a.appendChild(c);else{if(!Fe&&!Ie&&!Le&&-1===i.indexOf("<"))return ie&&Re?ie.createHTML(i):i;if(!(a=mt(i)))return Fe?null:Re?oe:""}a&&ze&&ht(a.firstChild);for(var f=gt($e?i:a);u=f.nextNode();)3===u.nodeType&&u===d||wt(u)||(u.content instanceof s&&kt(u.content),Mt(u),d=u);if(d=null,$e)return i;if(Fe){if(Pe)for(p=ce.call(a.ownerDocument);a.firstChild;)p.appendChild(a.firstChild);else p=a;return _e.shadowroot&&(p=de.call(r,p,!0)),p}var m=Le?a.outerHTML:a.innerHTML;return Le&&Me["!doctype"]&&a.ownerDocument&&a.ownerDocument.doctype&&a.ownerDocument.doctype.name&&N(ee,a.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+a.ownerDocument.doctype.name+">\n"+m),Ie&&(m=D(m,ge," "),m=D(m,be," ")),ie&&Re?ie.createHTML(m):m},n.setConfig=function(e){st(e),je=!0},n.clearConfig=function(){rt=null,je=!1},n.isValidAttribute=function(e,t,n){rt||st({});var r=me(e),i=me(t);return xt(r,i,n)},n.addHook=function(e,t){"function"==typeof t&&(he[e]=he[e]||[],M(he[e],t))},n.removeHook=function(e){if(he[e])return E(he[e])},n.removeHooks=function(e){he[e]&&(he[e]=[])},n.removeAllHooks=function(){he={}},n}return re()}();const GF=e=>{if(e.tagName){const n=e.children?e.children.map(GF):null;return t.createElement(e.tagName,e.properties,n)}return e.value},ZF=e=>{let{content:n="",className:r,...i}=e;const o=(e=>e.replaceAll("&gt;",">").replaceAll("&lt;","<").replaceAll("&amp;","&").replaceAll(T,((e,t)=>{const n=rz.highlightAuto(t).children.map(GF);return"<pre><code>".concat(b(n),"</code></pre>")})))(n),s=QF.sanitize;return t.createElement("div",x({className:Sc(E,{[r]:r}),dangerouslySetInnerHTML:{__html:s(o,{ADD_ATTR:["target"]})},"data-cy":"neeto-editor-content"},i))};export{C as EDITOR_OPTIONS,YF as Editor,ZF as EditorContent};
43
+ */function jv(e,t){const n=/\$/g,r="$$$$";let i=[e];if(null==t)return i;for(const e of Object.keys(t))if("_"!==e){let o=t[e];"string"==typeof o&&(o=n[Symbol.replace](o,r)),i=Lv(i,new RegExp(`%\\{${e}\\}`,"g"),o)}return i}var zv=Av("apply");function Fv(e){if(null==e||!e.strings)return;const t=this.locale;this.locale={...t,strings:{...t.strings,...e.strings}},this.locale.pluralize=e.pluralize||t.pluralize}var Pv=class{constructor(e){Object.defineProperty(this,zv,{value:Fv}),this.locale={strings:{},pluralize:e=>1===e?0:1},Array.isArray(e)?e.forEach(Tv(this,zv)[zv],this):Tv(this,zv)[zv](e)}translate(e,t){return this.translateArray(e,t).join("")}translateArray(e,t){if(!Iv(this.locale.strings,e))throw new Error(`missing string: ${e}`);const n=this.locale.strings[e];if("object"==typeof n){if(t&&void 0!==t.smart_count){return jv(n[this.locale.pluralize(t.smart_count)],t)}throw new Error("Attempted to use a string with plural forms, but no value was given for %{smart_count}")}return jv(n,t)}},Rv="Expected a function",Bv=0/0,Uv="[object Symbol]",$v=/^\s+|\s+$/g,Hv=/^[-+]0x[0-9a-f]+$/i,Wv=/^0b[01]+$/i,Vv=/^0o[0-7]+$/i,qv=parseInt,Yv="object"==typeof Dc&&Dc&&Dc.Object===Object&&Dc,Kv="object"==typeof self&&self&&self.Object===Object&&self,Qv=Yv||Kv||Function("return this")(),Gv=Object.prototype.toString,Zv=Math.max,Jv=Math.min,Xv=function(){return Qv.Date.now()};function ew(e,t,n){var r,i,o,s,a,l,c=0,u=!1,d=!1,p=!0;if("function"!=typeof e)throw new TypeError(Rv);function h(t){var n=r,o=i;return r=i=void 0,c=t,s=e.apply(o,n)}function f(e){return c=e,a=setTimeout(g,t),u?h(e):s}function m(e){var n=e-l;return void 0===l||n>=t||n<0||d&&e-c>=o}function g(){var e=Xv();if(m(e))return b(e);a=setTimeout(g,function(e){var n=t-(e-l);return d?Jv(n,o-(e-c)):n}(e))}function b(e){return a=void 0,p&&r?h(e):(r=i=void 0,s)}function y(){var e=Xv(),n=m(e);if(r=arguments,i=this,l=e,n){if(void 0===a)return f(l);if(d)return a=setTimeout(g,t),h(l)}return void 0===a&&(a=setTimeout(g,t)),s}return t=nw(t)||0,tw(n)&&(u=!!n.leading,o=(d="maxWait"in n)?Zv(nw(n.maxWait)||0,t):o,p="trailing"in n?!!n.trailing:p),y.cancel=function(){void 0!==a&&clearTimeout(a),c=0,r=l=i=a=void 0},y.flush=function(){return void 0===a?s:b(Xv())},y}function tw(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function nw(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&Gv.call(e)==Uv}(e))return Bv;if(tw(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=tw(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace($v,"");var n=Wv.test(e);return n||Vv.test(e)?qv(e.slice(2),n?2:8):Hv.test(e)?Bv:+e}var rw=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new TypeError(Rv);return tw(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),ew(e,t,{leading:r,maxWait:t,trailing:i})};var iw=0;function ow(e){return"__private_"+iw+++"_"+e}var sw=ow("publish");class aw{constructor(){Object.defineProperty(this,sw,{value:lw}),this.state={},this.callbacks=[]}getState(){return this.state}setState(e){const t={...this.state},n={...this.state,...e};this.state=n,function(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}(this,sw)[sw](t,n,e)}subscribe(e){return this.callbacks.push(e),()=>{this.callbacks.splice(this.callbacks.indexOf(e),1)}}}function lw(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.callbacks.forEach((e=>{e(...t)}))}aw.VERSION="2.1.0";var cw=function(e){const t=e.lastIndexOf(".");return-1===t||t===e.length-1?{name:e,extension:void 0}:{name:e.slice(0,t),extension:e.slice(t+1)}};const uw=cw,dw={md:"text/markdown",markdown:"text/markdown",mp4:"video/mp4",mp3:"audio/mp3",svg:"image/svg+xml",jpg:"image/jpeg",png:"image/png",gif:"image/gif",heic:"image/heic",heif:"image/heif",yaml:"text/yaml",yml:"text/yaml",csv:"text/csv",tsv:"text/tab-separated-values",tab:"text/tab-separated-values",avi:"video/x-msvideo",mks:"video/x-matroska",mkv:"video/x-matroska",mov:"video/quicktime",dicom:"application/dicom",doc:"application/msword",docm:"application/vnd.ms-word.document.macroenabled.12",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",dot:"application/msword",dotm:"application/vnd.ms-word.template.macroenabled.12",dotx:"application/vnd.openxmlformats-officedocument.wordprocessingml.template",xla:"application/vnd.ms-excel",xlam:"application/vnd.ms-excel.addin.macroenabled.12",xlc:"application/vnd.ms-excel",xlf:"application/x-xliff+xml",xlm:"application/vnd.ms-excel",xls:"application/vnd.ms-excel",xlsb:"application/vnd.ms-excel.sheet.binary.macroenabled.12",xlsm:"application/vnd.ms-excel.sheet.macroenabled.12",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",xlt:"application/vnd.ms-excel",xltm:"application/vnd.ms-excel.template.macroenabled.12",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template",xlw:"application/vnd.ms-excel",txt:"text/plain",text:"text/plain",conf:"text/plain",log:"text/plain",pdf:"application/pdf",zip:"application/zip","7z":"application/x-7z-compressed",rar:"application/x-rar-compressed",tar:"application/x-tar",gz:"application/gzip",dmg:"application/x-apple-diskimage"};function pw(e){let t="";return e.replace(/[^A-Z0-9]/gi,(e=>(t+=`-${function(e){return e.charCodeAt(0).toString(32)}(e)}`,"/")))+t}var hw=function(e){let t="uppy";return"string"==typeof e.name&&(t+=`-${pw(e.name.toLowerCase())}`),void 0!==e.type&&(t+=`-${e.type}`),e.meta&&"string"==typeof e.meta.relativePath&&(t+=`-${pw(e.meta.relativePath.toLowerCase())}`),void 0!==e.data.size&&(t+=`-${e.data.size}`),void 0!==e.data.lastModified&&(t+=`-${e.data.lastModified}`),t};var fw=function(e){if(null==e&&"undefined"!=typeof navigator&&(e=navigator.userAgent),!e)return!0;const t=/Edge\/(\d+\.\d+)/.exec(e);if(!t)return!0;const n=t[1];let[r,i]=n.split(".");return r=parseInt(r,10),i=parseInt(i,10),r<15||15===r&&i<15063||(r>18||18===r&&i>=18218)};var mw=xv,gw=fv,bw=Ev;let yw,vw;function ww(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var xw=0;function Ew(e){return"__private_"+xw+++"_"+e}const Mw=Pv,kw=function(){var e={},t=e._fns={};return e.emit=function(e,n,r,i,o,s,a){var l=function(e){var n=t[e]?t[e]:[],r=e.indexOf(":"),i=-1===r?[e]:[e.substring(0,r),e.substring(r+1)],o=Object.keys(t),s=0,a=o.length;for(;s<a;s++){var l=o[s];if("*"===l&&(n=n.concat(t[l])),2===i.length&&i[0]===l){n=n.concat(t[l]);break}}return n}(e);l.length&&function(e,t,n){var r=0,i=t.length;for(;r<i&&t[r];r++)t[r].event=e,t[r].apply(t[r],n)}(e,l,[n,r,i,o,s,a])},e.on=function(e,n){t[e]||(t[e]=[]),t[e].push(n)},e.once=function(t,n){this.on(t,(function r(){n.apply(this,arguments),e.off(t,r)}))},e.off=function(e,t){var n=[];if(e&&t)for(var r=this._fns[e],i=0,o=r?r.length:0;i<o;i++)r[i]!==t&&n.push(r[i]);n.length?this._fns[e]=n:delete this._fns[e]},e},_w=rw,Dw=function(){return new aw},Cw=function(e){var t;if(e.type)return e.type;const n=e.name?null==(t=uw(e.name).extension)?void 0:t.toLowerCase():null;return n&&n in dw?dw[n]:"application/octet-stream"},Ow=cw,Nw=hw,Tw=fw,Sw=function(e,t){return t.name?t.name:"image"===e.split("/")[0]?`${e.split("/")[0]}.${e.split("/")[1]}`:"noname"},Aw={strings:{addBulkFilesFailed:{0:"Failed to add %{smart_count} file due to an internal error",1:"Failed to add %{smart_count} files due to internal errors"},youCanOnlyUploadX:{0:"You can only upload %{smart_count} file",1:"You can only upload %{smart_count} files"},youHaveToAtLeastSelectX:{0:"You have to select at least %{smart_count} file",1:"You have to select at least %{smart_count} files"},exceedsSize:"%{file} exceeds maximum allowed size of %{size}",missingRequiredMetaField:"Missing required meta fields",missingRequiredMetaFieldOnFile:"Missing required meta fields in %{fileName}",inferiorSize:"This file is smaller than the allowed size of %{size}",youCanOnlyUploadFileTypes:"You can only upload: %{types}",noMoreFilesAllowed:"Cannot add more files",noDuplicates:"Cannot add the duplicate file '%{fileName}', it already exists",companionError:"Connection with Companion failed",authAborted:"Authentication aborted",companionUnauthorizeHint:"To unauthorize to your %{provider} account, please go to %{url}",failedToUpload:"Failed to upload %{file}",noInternetConnection:"No Internet connection",connectedToInternet:"Connected to the Internet",noFilesFound:"You have no files or folders here",selectX:{0:"Select %{smart_count}",1:"Select %{smart_count}"},allFilesFromFolderNamed:"All files from folder %{name}",openFolderNamed:"Open folder %{name}",cancel:"Cancel",logOut:"Log out",filter:"Filter",resetFilter:"Reset filter",loading:"Loading...",authenticateWithTitle:"Please authenticate with %{pluginName} to select files",authenticateWith:"Connect to %{pluginName}",signInWithGoogle:"Sign in with Google",searchImages:"Search for images",enterTextToSearch:"Enter text to search for images",search:"Search",emptyFolderAdded:"No files were added from empty folder",folderAlreadyAdded:'The folder "%{folder}" was already added',folderAdded:{0:"Added %{smart_count} file from %{folder}",1:"Added %{smart_count} files from %{folder}"}}};var Iw=Ew("plugins"),Lw=Ew("restricter"),jw=Ew("storeUnsubscribe"),zw=Ew("emitter"),Fw=Ew("preProcessors"),Pw=Ew("uploaders"),Rw=Ew("postProcessors"),Bw=Ew("informAndEmit"),Uw=Ew("checkRequiredMetaFieldsOnFile"),$w=Ew("checkRequiredMetaFields"),Hw=Ew("assertNewUploadAllowed"),Ww=Ew("checkAndCreateFileStateObject"),Vw=Ew("startIfAutoProceed"),qw=Ew("addListeners"),Yw=Ew("updateOnlineStatus"),Kw=Ew("createUpload"),Qw=Ew("getUpload"),Gw=Ew("removeUpload"),Zw=Ew("runUpload");yw=Symbol.for("uppy test: getPlugins"),vw=Symbol.for("uppy test: createUpload");class Jw{constructor(e){Object.defineProperty(this,Zw,{value:cx}),Object.defineProperty(this,Gw,{value:lx}),Object.defineProperty(this,Qw,{value:ax}),Object.defineProperty(this,Kw,{value:sx}),Object.defineProperty(this,qw,{value:ox}),Object.defineProperty(this,Vw,{value:ix}),Object.defineProperty(this,Ww,{value:rx}),Object.defineProperty(this,Hw,{value:nx}),Object.defineProperty(this,$w,{value:tx}),Object.defineProperty(this,Uw,{value:ex}),Object.defineProperty(this,Bw,{value:Xw}),Object.defineProperty(this,Iw,{writable:!0,value:Object.create(null)}),Object.defineProperty(this,Lw,{writable:!0,value:void 0}),Object.defineProperty(this,jw,{writable:!0,value:void 0}),Object.defineProperty(this,zw,{writable:!0,value:kw()}),Object.defineProperty(this,Fw,{writable:!0,value:new Set}),Object.defineProperty(this,Pw,{writable:!0,value:new Set}),Object.defineProperty(this,Rw,{writable:!0,value:new Set}),Object.defineProperty(this,Yw,{writable:!0,value:this.updateOnlineStatus.bind(this)}),this.defaultLocale=Aw;const t={id:"uppy",autoProceed:!1,allowMultipleUploads:!0,allowMultipleUploadBatches:!0,debug:!1,restrictions:bw.defaultOptions,meta:{},onBeforeFileAdded:e=>e,onBeforeUpload:e=>e,store:Dw(),logger:gw.justErrorsLogger,infoTimeout:5e3};this.opts={...t,...e,restrictions:{...t.restrictions,...e&&e.restrictions}},e&&e.logger&&e.debug?this.log("You are using a custom `logger`, but also set `debug: true`, which uses built-in logger to output logs to console. Ignoring `debug: true` and using your custom `logger`.","warning"):e&&e.debug&&(this.opts.logger=gw.debugLogger),this.log(`Using Core v${this.constructor.VERSION}`),this.i18nInit(),this.calculateProgress=_w(this.calculateProgress.bind(this),500,{leading:!0,trailing:!0}),this.store=this.opts.store,this.setState({plugins:{},files:{},currentUploads:{},allowNewUpload:!0,capabilities:{uploadProgress:Tw(),individualCancellation:!0,resumableUploads:!1},totalProgress:0,meta:{...this.opts.meta},info:[],recoveredState:null}),ww(this,Lw)[Lw]=new bw.Restricter((()=>this.opts),this.i18n),ww(this,jw)[jw]=this.store.subscribe(((e,t,n)=>{this.emit("state-update",e,t,n),this.updateAll(t)})),this.opts.debug&&"undefined"!=typeof window&&(window[this.opts.id]=this),ww(this,qw)[qw]()}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];ww(this,zw)[zw].emit(e,...n)}on(e,t){return ww(this,zw)[zw].on(e,t),this}once(e,t){return ww(this,zw)[zw].once(e,t),this}off(e,t){return ww(this,zw)[zw].off(e,t),this}updateAll(e){this.iteratePlugins((t=>{t.update(e)}))}setState(e){this.store.setState(e)}getState(){return this.store.getState()}get state(){return this.getState()}setFileState(e,t){if(!this.getState().files[e])throw new Error(`Can’t set state for ${e} (the file could have been removed)`);this.setState({files:{...this.getState().files,[e]:{...this.getState().files[e],...t}}})}i18nInit(){const e=new Mw([this.defaultLocale,this.opts.locale]);this.i18n=e.translate.bind(e),this.i18nArray=e.translateArray.bind(e),this.locale=e.locale}setOptions(e){this.opts={...this.opts,...e,restrictions:{...this.opts.restrictions,...e&&e.restrictions}},e.meta&&this.setMeta(e.meta),this.i18nInit(),e.locale&&this.iteratePlugins((e=>{e.setOptions()})),this.setState()}resetProgress(){const e={percentage:0,bytesUploaded:0,uploadComplete:!1,uploadStarted:null},t={...this.getState().files},n={};Object.keys(t).forEach((r=>{const i={...t[r]};i.progress={...i.progress,...e},n[r]=i})),this.setState({files:n,totalProgress:0}),this.emit("reset-progress")}addPreProcessor(e){ww(this,Fw)[Fw].add(e)}removePreProcessor(e){return ww(this,Fw)[Fw].delete(e)}addPostProcessor(e){ww(this,Rw)[Rw].add(e)}removePostProcessor(e){return ww(this,Rw)[Rw].delete(e)}addUploader(e){ww(this,Pw)[Pw].add(e)}removeUploader(e){return ww(this,Pw)[Pw].delete(e)}setMeta(e){const t={...this.getState().meta,...e},n={...this.getState().files};Object.keys(n).forEach((t=>{n[t]={...n[t],meta:{...n[t].meta,...e}}})),this.log("Adding metadata:"),this.log(e),this.setState({meta:t,files:n})}setFileMeta(e,t){const n={...this.getState().files};if(!n[e])return void this.log("Was trying to set metadata for a file that has been removed: ",e);const r={...n[e].meta,...t};n[e]={...n[e],meta:r},this.setState({files:n})}getFile(e){return this.getState().files[e]}getFiles(){const{files:e}=this.getState();return Object.values(e)}getObjectOfFilesPerState(){const{files:e,totalProgress:t,error:n}=this.getState(),r=Object.values(e),i=r.filter((e=>{let{progress:t}=e;return!t.uploadComplete&&t.uploadStarted})),o=r.filter((e=>!e.progress.uploadStarted)),s=r.filter((e=>e.progress.uploadStarted||e.progress.preprocess||e.progress.postprocess)),a=r.filter((e=>e.progress.uploadStarted)),l=r.filter((e=>e.isPaused)),c=r.filter((e=>e.progress.uploadComplete)),u=r.filter((e=>e.error)),d=i.filter((e=>!e.isPaused)),p=r.filter((e=>e.progress.preprocess||e.progress.postprocess));return{newFiles:o,startedFiles:s,uploadStartedFiles:a,pausedFiles:l,completeFiles:c,erroredFiles:u,inProgressFiles:i,inProgressNotPausedFiles:d,processingFiles:p,isUploadStarted:a.length>0,isAllComplete:100===t&&c.length===r.length&&0===p.length,isAllErrored:!!n&&u.length===r.length,isAllPaused:0!==i.length&&l.length===i.length,isUploadInProgress:i.length>0,isSomeGhost:r.some((e=>e.isGhost))}}validateRestrictions(e,t){void 0===t&&(t=this.getFiles());try{return ww(this,Lw)[Lw].validate(e,t),{result:!0}}catch(e){return{result:!1,reason:e.message}}}checkIfFileAlreadyExists(e){const{files:t}=this.getState();return!(!t[e]||t[e].isGhost)}addFile(e){ww(this,Hw)[Hw](e);const{files:t}=this.getState();let n=ww(this,Ww)[Ww](t,e);return t[n.id]&&t[n.id].isGhost&&(n={...t[n.id],data:e.data,isGhost:!1},this.log(`Replaced the blob in the restored ghost file: ${n.name}, ${n.id}`)),this.setState({files:{...t,[n.id]:n}}),this.emit("file-added",n),this.emit("files-added",[n]),this.log(`Added file: ${n.name}, ${n.id}, mime type: ${n.type}`),ww(this,Vw)[Vw](),n.id}addFiles(e){ww(this,Hw)[Hw]();const t={...this.getState().files},n=[],r=[];for(let i=0;i<e.length;i++)try{let r=ww(this,Ww)[Ww](t,e[i]);t[r.id]&&t[r.id].isGhost&&(r={...t[r.id],data:e[i].data,isGhost:!1},this.log(`Replaced blob in a ghost file: ${r.name}, ${r.id}`)),t[r.id]=r,n.push(r)}catch(e){e.isRestriction||r.push(e)}if(this.setState({files:t}),n.forEach((e=>{this.emit("file-added",e)})),this.emit("files-added",n),n.length>5?this.log(`Added batch of ${n.length} files`):Object.keys(n).forEach((e=>{this.log(`Added file: ${n[e].name}\n id: ${n[e].id}\n type: ${n[e].type}`)})),n.length>0&&ww(this,Vw)[Vw](),r.length>0){let e="Multiple errors occurred while adding files:\n";if(r.forEach((t=>{e+=`\n * ${t.message}`})),this.info({message:this.i18n("addBulkFilesFailed",{smart_count:r.length}),details:e},"error",this.opts.infoTimeout),"function"==typeof AggregateError)throw new AggregateError(r,e);{const t=new Error(e);throw t.errors=r,t}}}removeFiles(e,t){const{files:n,currentUploads:r}=this.getState(),i={...n},o={...r},s=Object.create(null);function a(e){return void 0===s[e]}e.forEach((e=>{n[e]&&(s[e]=n[e],delete i[e])})),Object.keys(o).forEach((e=>{const t=r[e].fileIDs.filter(a);0!==t.length?o[e]={...r[e],fileIDs:t}:delete o[e]}));const l={currentUploads:o,files:i};0===Object.keys(i).length&&(l.allowNewUpload=!0,l.error=null,l.recoveredState=null),this.setState(l),this.calculateTotalProgress();const c=Object.keys(s);c.forEach((e=>{this.emit("file-removed",s[e],t)})),c.length>5?this.log(`Removed ${c.length} files`):this.log(`Removed files: ${c.join(", ")}`)}removeFile(e,t){void 0===t&&(t=null),this.removeFiles([e],t)}pauseResume(e){if(!this.getState().capabilities.resumableUploads||this.getFile(e).uploadComplete)return;const t=!(this.getFile(e).isPaused||!1);return this.setFileState(e,{isPaused:t}),this.emit("upload-pause",e,t),t}pauseAll(){const e={...this.getState().files};Object.keys(e).filter((t=>!e[t].progress.uploadComplete&&e[t].progress.uploadStarted)).forEach((t=>{const n={...e[t],isPaused:!0};e[t]=n})),this.setState({files:e}),this.emit("pause-all")}resumeAll(){const e={...this.getState().files};Object.keys(e).filter((t=>!e[t].progress.uploadComplete&&e[t].progress.uploadStarted)).forEach((t=>{const n={...e[t],isPaused:!1,error:null};e[t]=n})),this.setState({files:e}),this.emit("resume-all")}retryAll(){const e={...this.getState().files},t=Object.keys(e).filter((t=>e[t].error));if(t.forEach((t=>{const n={...e[t],isPaused:!1,error:null};e[t]=n})),this.setState({files:e,error:null}),this.emit("retry-all",t),0===t.length)return Promise.resolve({successful:[],failed:[]});const n=ww(this,Kw)[Kw](t,{forceAllowNewUpload:!0});return ww(this,Zw)[Zw](n)}cancelAll(e){let{reason:t="user"}=void 0===e?{}:e;if(this.emit("cancel-all",{reason:t}),"user"===t){const{files:e}=this.getState(),t=Object.keys(e);t.length&&this.removeFiles(t,"cancel-all"),this.setState({totalProgress:0,error:null,recoveredState:null})}}retryUpload(e){this.setFileState(e,{error:null,isPaused:!1}),this.emit("upload-retry",e);const t=ww(this,Kw)[Kw]([e],{forceAllowNewUpload:!0});return ww(this,Zw)[Zw](t)}reset(){this.cancelAll(...arguments)}logout(){this.iteratePlugins((e=>{e.provider&&e.provider.logout&&e.provider.logout()}))}calculateProgress(e,t){if(null==e||!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`);const n=Number.isFinite(t.bytesTotal)&&t.bytesTotal>0;this.setFileState(e.id,{progress:{...this.getFile(e.id).progress,bytesUploaded:t.bytesUploaded,bytesTotal:t.bytesTotal,percentage:n?Math.round(t.bytesUploaded/t.bytesTotal*100):0}}),this.calculateTotalProgress()}calculateTotalProgress(){const e=this.getFiles().filter((e=>e.progress.uploadStarted||e.progress.preprocess||e.progress.postprocess));if(0===e.length)return this.emit("progress",0),void this.setState({totalProgress:0});const t=e.filter((e=>null!=e.progress.bytesTotal)),n=e.filter((e=>null==e.progress.bytesTotal));if(0===t.length){const t=100*e.length,r=n.reduce(((e,t)=>e+t.progress.percentage),0),i=Math.round(r/t*100);return void this.setState({totalProgress:i})}let r=t.reduce(((e,t)=>e+t.progress.bytesTotal),0);const i=r/t.length;r+=i*n.length;let o=0;t.forEach((e=>{o+=e.progress.bytesUploaded})),n.forEach((e=>{o+=i*(e.progress.percentage||0)/100}));let s=0===r?0:Math.round(o/r*100);s>100&&(s=100),this.setState({totalProgress:s}),this.emit("progress",s)}updateOnlineStatus(){void 0===window.navigator.onLine||window.navigator.onLine?(this.emit("is-online"),this.wasOffline&&(this.emit("back-online"),this.info(this.i18n("connectedToInternet"),"success",3e3),this.wasOffline=!1)):(this.emit("is-offline"),this.info(this.i18n("noInternetConnection"),"error",0),this.wasOffline=!0)}getID(){return this.opts.id}use(e,t){if("function"!=typeof e){throw new TypeError(`Expected a plugin class, but got ${null===e?"null":typeof e}.`+" Please verify that the plugin was imported and spelled correctly.")}const n=new e(this,t),r=n.id;if(!r)throw new Error("Your plugin must have an id");if(!n.type)throw new Error("Your plugin must have a type");const i=this.getPlugin(r);if(i){const e=`Already found a plugin named '${i.id}'. `+`Tried to use: '${r}'.\n`+"Uppy plugins must have unique `id` options. See https://uppy.io/docs/plugins/#id.";throw new Error(e)}return e.VERSION&&this.log(`Using ${r} v${e.VERSION}`),n.type in ww(this,Iw)[Iw]?ww(this,Iw)[Iw][n.type].push(n):ww(this,Iw)[Iw][n.type]=[n],n.install(),this}getPlugin(e){for(const t of Object.values(ww(this,Iw)[Iw])){const n=t.find((t=>t.id===e));if(null!=n)return n}}[yw](e){return ww(this,Iw)[Iw][e]}iteratePlugins(e){Object.values(ww(this,Iw)[Iw]).flat(1).forEach(e)}removePlugin(e){this.log(`Removing plugin ${e.id}`),this.emit("plugin-remove",e),e.uninstall&&e.uninstall();const t=ww(this,Iw)[Iw][e.type],n=t.findIndex((t=>t.id===e.id));-1!==n&&t.splice(n,1);const r={plugins:{...this.getState().plugins,[e.id]:void 0}};this.setState(r)}close(e){let{reason:t}=void 0===e?{}:e;this.log(`Closing Uppy instance ${this.opts.id}: removing all files and uninstalling plugins`),this.cancelAll({reason:t}),ww(this,jw)[jw](),this.iteratePlugins((e=>{this.removePlugin(e)})),"undefined"!=typeof window&&window.removeEventListener&&(window.removeEventListener("online",ww(this,Yw)[Yw]),window.removeEventListener("offline",ww(this,Yw)[Yw]))}hideInfo(){const{info:e}=this.getState();this.setState({info:e.slice(1)}),this.emit("info-hidden")}info(e,t,n){void 0===t&&(t="info"),void 0===n&&(n=3e3);const r="object"==typeof e;this.setState({info:[...this.getState().info,{type:t,message:r?e.message:e,details:r?e.details:null}]}),setTimeout((()=>this.hideInfo()),n),this.emit("info-visible")}log(e,t){const{logger:n}=this.opts;switch(t){case"error":n.error(e);break;case"warning":n.warn(e);break;default:n.debug(e)}}restore(e){return this.log(`Core: attempting to restore upload "${e}"`),this.getState().currentUploads[e]?ww(this,Zw)[Zw](e):(ww(this,Gw)[Gw](e),Promise.reject(new Error("Nonexistent upload")))}[vw](){return ww(this,Kw)[Kw](...arguments)}addResultData(e,t){if(!ww(this,Qw)[Qw](e))return void this.log(`Not setting result for an upload that has been removed: ${e}`);const{currentUploads:n}=this.getState(),r={...n[e],result:{...n[e].result,...t}};this.setState({currentUploads:{...n,[e]:r}})}upload(){var e;null!=(e=ww(this,Iw)[Iw].uploader)&&e.length||this.log("No uploader type plugins are used","warning");let{files:t}=this.getState();const n=this.opts.onBeforeUpload(t);return!1===n?Promise.reject(new Error("Not starting the upload because onBeforeUpload returned false")):(n&&"object"==typeof n&&(t=n,this.setState({files:t})),Promise.resolve().then((()=>ww(this,Lw)[Lw].validateMinNumberOfFiles(t))).catch((e=>{throw ww(this,Bw)[Bw](e),e})).then((()=>{if(!ww(this,$w)[$w](t))throw new bw.RestrictionError(this.i18n("missingRequiredMetaField"))})).catch((e=>{throw e})).then((()=>{const{currentUploads:e}=this.getState(),n=Object.values(e).flatMap((e=>e.fileIDs)),r=[];Object.keys(t).forEach((e=>{const t=this.getFile(e);t.progress.uploadStarted||-1!==n.indexOf(e)||r.push(t.id)}));const i=ww(this,Kw)[Kw](r);return ww(this,Zw)[Zw](i)})).catch((e=>{throw this.emit("error",e),this.log(e,"error"),e})))}}function Xw(e,t){const{message:n,details:r=""}=e;e.isRestriction?this.emit("restriction-failed",t,e):this.emit("error",e),this.info({message:n,details:r},"error",this.opts.infoTimeout),this.log(`${n} ${r}`.trim(),"error")}function ex(e){const{missingFields:t,error:n}=ww(this,Lw)[Lw].getMissingRequiredMetaFields(e);return!(t.length>0)||(this.setFileState(e.id,{missingRequiredMetaFields:t}),this.log(n.message),this.emit("restriction-failed",e,n),!1)}function tx(e){let t=!0;for(const n of Object.values(e))ww(this,Uw)[Uw](n)||(t=!1);return t}function nx(e){const{allowNewUpload:t}=this.getState();if(!1===t){const t=new bw.RestrictionError(this.i18n("noMoreFilesAllowed"));throw ww(this,Bw)[Bw](t,e),t}}function rx(e,t){const n=Cw(t),r=Sw(n,t),i=Ow(r).extension,o=Boolean(t.isRemote),s=Nw({...t,type:n});if(this.checkIfFileAlreadyExists(s)){const e=new bw.RestrictionError(this.i18n("noDuplicates",{fileName:r}));throw ww(this,Bw)[Bw](e,t),e}const a=t.meta||{};a.name=r,a.type=n;const l=Number.isFinite(t.data.size)?t.data.size:null;let c={source:t.source||"",id:s,name:r,extension:i||"",meta:{...this.getState().meta,...a},type:n,data:t.data,progress:{percentage:0,bytesUploaded:0,bytesTotal:l,uploadComplete:!1,uploadStarted:null},size:l,isRemote:o,remote:t.remote||"",preview:t.preview};const u=this.opts.onBeforeFileAdded(c,e);if(!1===u){const e=new bw.RestrictionError("Cannot add the file because onBeforeFileAdded returned false.");throw this.emit("restriction-failed",t,e),e}"object"==typeof u&&null!==u&&(c=u);try{const t=Object.keys(e).map((t=>e[t]));ww(this,Lw)[Lw].validate(c,t)}catch(e){throw ww(this,Bw)[Bw](e,c),e}return c}function ix(){this.opts.autoProceed&&!this.scheduledAutoProceed&&(this.scheduledAutoProceed=setTimeout((()=>{this.scheduledAutoProceed=null,this.upload().catch((e=>{e.isRestriction||this.log(e.stack||e.message||e)}))}),4))}function ox(){const e=(e,t,n)=>{let r=e.message||"Unknown error";e.details&&(r+=` ${e.details}`),this.setState({error:r}),null!=t&&t.id in this.getState().files&&this.setFileState(t.id,{error:r,response:n})};this.on("error",e),this.on("upload-error",((t,n,r)=>{if(e(n,t,r),"object"==typeof n&&n.message){const e=new Error(n.message);e.details=n.message,n.details&&(e.details+=` ${n.details}`),e.message=this.i18n("failedToUpload",{file:null==t?void 0:t.name}),ww(this,Bw)[Bw](e)}else ww(this,Bw)[Bw](n)})),this.on("upload",(()=>{this.setState({error:null})})),this.on("upload-started",(e=>{null!=e&&this.getFile(e.id)?this.setFileState(e.id,{progress:{uploadStarted:Date.now(),uploadComplete:!1,percentage:0,bytesUploaded:0,bytesTotal:e.size}}):this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`)})),this.on("upload-progress",this.calculateProgress),this.on("upload-success",((e,t)=>{if(null==e||!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`);const n=this.getFile(e.id).progress;this.setFileState(e.id,{progress:{...n,postprocess:ww(this,Rw)[Rw].size>0?{mode:"indeterminate"}:null,uploadComplete:!0,percentage:100,bytesUploaded:n.bytesTotal},response:t,uploadURL:t.uploadURL,isPaused:!1}),null==e.size&&this.setFileState(e.id,{size:t.bytesUploaded||n.bytesTotal}),this.calculateTotalProgress()})),this.on("preprocess-progress",((e,t)=>{null!=e&&this.getFile(e.id)?this.setFileState(e.id,{progress:{...this.getFile(e.id).progress,preprocess:t}}):this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`)})),this.on("preprocess-complete",(e=>{if(null==e||!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`);const t={...this.getState().files};t[e.id]={...t[e.id],progress:{...t[e.id].progress}},delete t[e.id].progress.preprocess,this.setState({files:t})})),this.on("postprocess-progress",((e,t)=>{null!=e&&this.getFile(e.id)?this.setFileState(e.id,{progress:{...this.getState().files[e.id].progress,postprocess:t}}):this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`)})),this.on("postprocess-complete",(e=>{if(null==e||!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`);const t={...this.getState().files};t[e.id]={...t[e.id],progress:{...t[e.id].progress}},delete t[e.id].progress.postprocess,this.setState({files:t})})),this.on("restored",(()=>{this.calculateTotalProgress()})),this.on("dashboard:file-edit-complete",(e=>{e&&ww(this,Uw)[Uw](e)})),"undefined"!=typeof window&&window.addEventListener&&(window.addEventListener("online",ww(this,Yw)[Yw]),window.addEventListener("offline",ww(this,Yw)[Yw]),setTimeout(ww(this,Yw)[Yw],3e3))}function sx(e,t){void 0===t&&(t={});const{forceAllowNewUpload:n=!1}=t,{allowNewUpload:r,currentUploads:i}=this.getState();if(!r&&!n)throw new Error("Cannot create a new upload: already uploading.");const o=(0,mw.nanoid)();return this.emit("upload",{id:o,fileIDs:e}),this.setState({allowNewUpload:!1!==this.opts.allowMultipleUploadBatches&&!1!==this.opts.allowMultipleUploads,currentUploads:{...i,[o]:{fileIDs:e,step:0,result:{}}}}),o}function ax(e){const{currentUploads:t}=this.getState();return t[e]}function lx(e){const t={...this.getState().currentUploads};delete t[e],this.setState({currentUploads:t})}async function cx(e){let{currentUploads:t}=this.getState(),n=t[e];const r=n.step||0,i=[...ww(this,Fw)[Fw],...ww(this,Pw)[Pw],...ww(this,Rw)[Rw]];try{for(let o=r;o<i.length&&n;o++){const r=i[o],s={...n,step:o};this.setState({currentUploads:{...t,[e]:s}}),await r(s.fileIDs,e),t=this.getState().currentUploads,n=t[e]}}catch(t){throw ww(this,Gw)[Gw](e),t}if(n){n.fileIDs.forEach((e=>{const t=this.getFile(e);t&&t.progress.postprocess&&this.emit("postprocess-complete",t)}));const r=n.fileIDs.map((e=>this.getFile(e))),i=r.filter((e=>!e.error)),o=r.filter((e=>e.error));await this.addResultData(e,{successful:i,failed:o,uploadID:e}),t=this.getState().currentUploads,n=t[e]}let o;return n&&(o=n.result,this.emit("complete",o),ww(this,Gw)[Gw](e)),null==o&&this.log(`Not setting result for an upload that has been removed: ${e}`),o}Jw.VERSION="2.3.1";var ux,dx,px,hx,fx,mx,gx,bx=Jw,yx={},vx=[],wx=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function xx(e,t){for(var n in t)e[n]=t[n];return e}function Ex(e){var t=e.parentNode;t&&t.removeChild(e)}function Mx(e,t,n){var r,i,o,s={};for(o in t)"key"==o?r=t[o]:"ref"==o?i=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?ux.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===s[o]&&(s[o]=e.defaultProps[o]);return kx(e,s,r,i,null)}function kx(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==i?++px:i};return null==i&&null!=dx.vnode&&dx.vnode(o),o}function _x(e){return e.children}function Dx(e,t){this.props=e,this.context=t}function Cx(e,t){if(null==t)return e.__?Cx(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?Cx(e):null}function Ox(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return Ox(e)}}function Nx(e){(!e.__d&&(e.__d=!0)&&fx.push(e)&&!Tx.__r++||mx!==dx.debounceRendering)&&((mx=dx.debounceRendering)||setTimeout)(Tx)}function Tx(){for(var e;Tx.__r=fx.length;)e=fx.sort((function(e,t){return e.__v.__b-t.__v.__b})),fx=[],e.some((function(e){var t,n,r,i,o,s;e.__d&&(o=(i=(t=e).__v).__e,(s=t.__P)&&(n=[],(r=xx({},i)).__v=i.__v+1,Px(s,i,r,t.__n,void 0!==s.ownerSVGElement,null!=i.__h?[o]:null,n,null==o?Cx(i):o,i.__h),Rx(n,i),i.__e!=o&&Ox(i)))}))}function Sx(e,t,n,r,i,o,s,a,l,c){var u,d,p,h,f,m,g,b=r&&r.__k||vx,y=b.length;for(n.__k=[],u=0;u<t.length;u++)if(null!=(h=n.__k[u]=null==(h=t[u])||"boolean"==typeof h?null:"string"==typeof h||"number"==typeof h||"bigint"==typeof h?kx(null,h,null,null,h):Array.isArray(h)?kx(_x,{children:h},null,null,null):h.__b>0?kx(h.type,h.props,h.key,null,h.__v):h)){if(h.__=n,h.__b=n.__b+1,null===(p=b[u])||p&&h.key==p.key&&h.type===p.type)b[u]=void 0;else for(d=0;d<y;d++){if((p=b[d])&&h.key==p.key&&h.type===p.type){b[d]=void 0;break}p=null}Px(e,h,p=p||yx,i,o,s,a,l,c),f=h.__e,(d=h.ref)&&p.ref!=d&&(g||(g=[]),p.ref&&g.push(p.ref,null,h),g.push(d,h.__c||f,h)),null!=f?(null==m&&(m=f),"function"==typeof h.type&&h.__k===p.__k?h.__d=l=Ax(h,l,e):l=Ix(e,h,p,b,f,l),"function"==typeof n.type&&(n.__d=l)):l&&p.__e==l&&l.parentNode!=e&&(l=Cx(p))}for(n.__e=m,u=y;u--;)null!=b[u]&&("function"==typeof n.type&&null!=b[u].__e&&b[u].__e==n.__d&&(n.__d=Cx(r,u+1)),$x(b[u],b[u]));if(g)for(u=0;u<g.length;u++)Ux(g[u],g[++u],g[++u])}function Ax(e,t,n){for(var r,i=e.__k,o=0;i&&o<i.length;o++)(r=i[o])&&(r.__=e,t="function"==typeof r.type?Ax(r,t,n):Ix(n,r,r,i,r.__e,t));return t}function Ix(e,t,n,r,i,o){var s,a,l;if(void 0!==t.__d)s=t.__d,t.__d=void 0;else if(null==n||i!=o||null==i.parentNode)e:if(null==o||o.parentNode!==e)e.appendChild(i),s=null;else{for(a=o,l=0;(a=a.nextSibling)&&l<r.length;l+=2)if(a==i)break e;e.insertBefore(i,o),s=o}return void 0!==s?s:i.nextSibling}function Lx(e,t,n){"-"===t[0]?e.setProperty(t,n):e[t]=null==n?"":"number"!=typeof n||wx.test(t)?n:n+"px"}function jx(e,t,n,r,i){var o;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Lx(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Lx(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r||e.addEventListener(t,o?Fx:zx,o):e.removeEventListener(t,o?Fx:zx,o);else if("dangerouslySetInnerHTML"!==t){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null!=n&&(!1!==n||"a"===t[0]&&"r"===t[1])?e.setAttribute(t,n):e.removeAttribute(t))}}function zx(e){this.l[e.type+!1](dx.event?dx.event(e):e)}function Fx(e){this.l[e.type+!0](dx.event?dx.event(e):e)}function Px(e,t,n,r,i,o,s,a,l){var c,u,d,p,h,f,m,g,b,y,v,w,x,E=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(l=n.__h,a=t.__e=n.__e,t.__h=null,o=[a]),(c=dx.__b)&&c(t);try{e:if("function"==typeof E){if(g=t.props,b=(c=E.contextType)&&r[c.__c],y=c?b?b.props.value:c.__:r,n.__c?m=(u=t.__c=n.__c).__=u.__E:("prototype"in E&&E.prototype.render?t.__c=u=new E(g,y):(t.__c=u=new Dx(g,y),u.constructor=E,u.render=Hx),b&&b.sub(u),u.props=g,u.state||(u.state={}),u.context=y,u.__n=r,d=u.__d=!0,u.__h=[]),null==u.__s&&(u.__s=u.state),null!=E.getDerivedStateFromProps&&(u.__s==u.state&&(u.__s=xx({},u.__s)),xx(u.__s,E.getDerivedStateFromProps(g,u.__s))),p=u.props,h=u.state,d)null==E.getDerivedStateFromProps&&null!=u.componentWillMount&&u.componentWillMount(),null!=u.componentDidMount&&u.__h.push(u.componentDidMount);else{if(null==E.getDerivedStateFromProps&&g!==p&&null!=u.componentWillReceiveProps&&u.componentWillReceiveProps(g,y),!u.__e&&null!=u.shouldComponentUpdate&&!1===u.shouldComponentUpdate(g,u.__s,y)||t.__v===n.__v){u.props=g,u.state=u.__s,t.__v!==n.__v&&(u.__d=!1),u.__v=t,t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),u.__h.length&&s.push(u);break e}null!=u.componentWillUpdate&&u.componentWillUpdate(g,u.__s,y),null!=u.componentDidUpdate&&u.__h.push((function(){u.componentDidUpdate(p,h,f)}))}if(u.context=y,u.props=g,u.__v=t,u.__P=e,v=dx.__r,w=0,"prototype"in E&&E.prototype.render)u.state=u.__s,u.__d=!1,v&&v(t),c=u.render(u.props,u.state,u.context);else do{u.__d=!1,v&&v(t),c=u.render(u.props,u.state,u.context),u.state=u.__s}while(u.__d&&++w<25);u.state=u.__s,null!=u.getChildContext&&(r=xx(xx({},r),u.getChildContext())),d||null==u.getSnapshotBeforeUpdate||(f=u.getSnapshotBeforeUpdate(p,h)),x=null!=c&&c.type===_x&&null==c.key?c.props.children:c,Sx(e,Array.isArray(x)?x:[x],t,n,r,i,o,s,a,l),u.base=t.__e,t.__h=null,u.__h.length&&s.push(u),m&&(u.__E=u.__=null),u.__e=!1}else null==o&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=Bx(n.__e,t,n,r,i,o,s,l);(c=dx.diffed)&&c(t)}catch(e){t.__v=null,(l||null!=o)&&(t.__e=a,t.__h=!!l,o[o.indexOf(a)]=null),dx.__e(e,t,n)}}function Rx(e,t){dx.__c&&dx.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){dx.__e(e,t.__v)}}))}function Bx(e,t,n,r,i,o,s,a){var l,c,u,d=n.props,p=t.props,h=t.type,f=0;if("svg"===h&&(i=!0),null!=o)for(;f<o.length;f++)if((l=o[f])&&"setAttribute"in l==!!h&&(h?l.localName===h:3===l.nodeType)){e=l,o[f]=null;break}if(null==e){if(null===h)return document.createTextNode(p);e=i?document.createElementNS("http://www.w3.org/2000/svg",h):document.createElement(h,p.is&&p),o=null,a=!1}if(null===h)d===p||a&&e.data===p||(e.data=p);else{if(o=o&&ux.call(e.childNodes),c=(d=n.props||yx).dangerouslySetInnerHTML,u=p.dangerouslySetInnerHTML,!a){if(null!=o)for(d={},f=0;f<e.attributes.length;f++)d[e.attributes[f].name]=e.attributes[f].value;(u||c)&&(u&&(c&&u.__html==c.__html||u.__html===e.innerHTML)||(e.innerHTML=u&&u.__html||""))}if(function(e,t,n,r,i){var o;for(o in n)"children"===o||"key"===o||o in t||jx(e,o,null,n[o],r);for(o in t)i&&"function"!=typeof t[o]||"children"===o||"key"===o||"value"===o||"checked"===o||n[o]===t[o]||jx(e,o,t[o],n[o],r)}(e,p,d,i,a),u)t.__k=[];else if(f=t.props.children,Sx(e,Array.isArray(f)?f:[f],t,n,r,i&&"foreignObject"!==h,o,s,o?o[0]:n.__k&&Cx(n,0),a),null!=o)for(f=o.length;f--;)null!=o[f]&&Ex(o[f]);a||("value"in p&&void 0!==(f=p.value)&&(f!==e.value||"progress"===h&&!f||"option"===h&&f!==d.value)&&jx(e,"value",f,d.value,!1),"checked"in p&&void 0!==(f=p.checked)&&f!==e.checked&&jx(e,"checked",f,d.checked,!1))}return e}function Ux(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){dx.__e(e,n)}}function $x(e,t,n){var r,i;if(dx.unmount&&dx.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Ux(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){dx.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&$x(r[i],t,"function"!=typeof e.type);n||null==e.__e||Ex(e.__e),e.__e=e.__d=void 0}function Hx(e,t,n){return this.constructor(e,n)}function Wx(e,t,n){var r,i,o;dx.__&&dx.__(e,t),i=(r="function"==typeof n)?null:n&&n.__k||t.__k,o=[],Px(t,e=(!r&&n||t).__k=Mx(_x,null,[e]),i||yx,yx,void 0!==t.ownerSVGElement,!r&&n?[n]:i?null:t.firstChild?ux.call(t.childNodes):null,o,!r&&n?n:i?i.__e:t.firstChild,r),Rx(o,e)}ux=vx.slice,dx={__e:function(e,t,n,r){for(var i,o,s;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),s=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,r||{}),s=i.__d),s)return i.__E=i}catch(t){e=t}throw e}},px=0,hx=function(e){return null!=e&&void 0===e.constructor},Dx.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=xx({},this.state),"function"==typeof e&&(e=e(xx({},n),this.props)),e&&xx(n,e),null!=e&&this.__v&&(t&&this.__h.push(t),Nx(this))},Dx.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Nx(this))},Dx.prototype.render=_x,fx=[],Tx.__r=0,gx=0;var Vx=Object.freeze({__proto__:null,render:Wx,hydrate:function e(t,n){Wx(t,n,e)},createElement:Mx,h:Mx,Fragment:_x,createRef:function(){return{current:null}},get isValidElement(){return hx},Component:Dx,cloneElement:function(e,t,n){var r,i,o,s=xx({},e.props);for(o in t)"key"==o?r=t[o]:"ref"==o?i=t[o]:s[o]=t[o];return arguments.length>2&&(s.children=arguments.length>3?ux.call(arguments,2):n),kx(e.type,s,r||e.key,i||e.ref,null)},createContext:function(e,t){var n={__c:t="__cC"+gx++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some(Nx)},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n},toChildArray:function e(t,n){return n=n||[],null==t||"boolean"==typeof t||(Array.isArray(t)?t.some((function(t){e(t,n)})):n.push(t)),n},get options(){return dx}}),qx=Oc(Vx);var Yx=function(e){return(null==e?void 0:e.nodeType)===Node.ELEMENT_NODE};const Kx=Yx;var Qx=function(e,t){return void 0===t&&(t=document),"string"==typeof e?t.querySelector(e):Kx(e)?e:null};var Gx=function(e){for(var t;e&&!e.dir;)e=e.parentNode;return null==(t=e)?void 0:t.dir};const Zx=Pv;var Jx=class{constructor(e,t){void 0===t&&(t={}),this.uppy=e,this.opts=t}getPluginState(){const{plugins:e}=this.uppy.getState();return e[this.id]||{}}setPluginState(e){const{plugins:t}=this.uppy.getState();this.uppy.setState({plugins:{...t,[this.id]:{...t[this.id],...e}}})}setOptions(e){this.opts={...this.opts,...e},this.setPluginState(),this.i18nInit()}i18nInit(){const e=new Zx([this.defaultLocale,this.uppy.locale,this.opts.locale]);this.i18n=e.translate.bind(e),this.i18nArray=e.translateArray.bind(e),this.setPluginState()}addTarget(){throw new Error("Extend the addTarget method to add your plugin to another plugin's target")}install(){}uninstall(){}render(){throw new Error("Extend the render method to add your plugin to a DOM element")}update(){}afterUpdate(){}},Xx=qx;function eE(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var tE=0;function nE(e){return"__private_"+tE+++"_"+e}const rE=Qx,iE=Gx,oE=Jx;var sE=nE("updateUI");class aE extends oE{constructor(){super(...arguments),Object.defineProperty(this,sE,{writable:!0,value:void 0})}mount(e,t){const n=t.id,r=rE(e);if(r){this.isTargetDOMEl=!0;const t=document.createElement("div");return t.classList.add("uppy-Root"),eE(this,sE)[sE]=function(e){let t=null,n=null;return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=i,t||(t=Promise.resolve().then((()=>(t=null,e(...n))))),t}}((e=>{this.uppy.getPlugin(this.id)&&((0,Xx.render)(this.render(e),t),this.afterUpdate())})),this.uppy.log(`Installing ${n} to a DOM element '${e}'`),this.opts.replaceTargetContent&&(r.innerHTML=""),(0,Xx.render)(this.render(this.uppy.getState()),t),this.el=t,r.appendChild(t),t.dir=this.opts.direction||iE(t)||"ltr",this.onMount(),this.el}let i;if("object"==typeof e&&e instanceof aE)i=e;else if("function"==typeof e){const t=e;this.uppy.iteratePlugins((e=>{e instanceof t&&(i=e)}))}if(i)return this.uppy.log(`Installing ${n} to ${i.id}`),this.parent=i,this.el=i.addTarget(t),this.onMount(),this.el;this.uppy.log(`Not installing ${n}`);let o=`Invalid target option given to ${n}.`;throw o+="function"==typeof e?" The given target is not a Plugin class. "+"Please check that you're not specifying a React Component instead of a plugin. "+"If you are using @uppy/* packages directly, make sure you have only 1 version of @uppy/core installed: "+"run `npm ls @uppy/core` on the command line and verify that all the versions match and are deduped correctly.":"If you meant to target an HTML element, please make sure that the element exists. "+"Check that the <script> tag initializing Uppy is right before the closing </body> tag at the end of the page. "+"(see https://github.com/transloadit/uppy/issues/1042)\n\n"+"If you meant to target a plugin, please confirm that your `import` statements or `require` calls are correct.",new Error(o)}update(e){var t,n;null!=this.el&&(null==(t=(n=eE(this,sE))[sE])||t.call(n,e))}unmount(){var e;this.isTargetDOMEl&&(null==(e=this.el)||e.remove());this.onUnmount()}onMount(){}onUnmount(){}}var lE=aE;!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Uppy=t.UIPlugin=t.BasePlugin=void 0,Object.defineProperty(t,"debugLogger",{enumerable:!0,get:function(){return n.debugLogger}});var n=fv;e.exports=bx;const r=lE;t.UIPlugin=r;const i=Jx;t.BasePlugin=i;const o=bx;t.Uppy=o;const s=lE,a=Jx;o.Uppy=o,o.UIPlugin=s,o.BasePlugin=a,o.debugLogger=n.debugLogger}(hv,hv.exports);var cE=Cc(hv.exports),uE={exports:{}},dE={},pE=Array.from,hE=['a[href]:not([tabindex^="-"]):not([inert]):not([aria-hidden])','area[href]:not([tabindex^="-"]):not([inert]):not([aria-hidden])',"input:not([disabled]):not([inert]):not([aria-hidden])","select:not([disabled]):not([inert]):not([aria-hidden])","textarea:not([disabled]):not([inert]):not([aria-hidden])","button:not([disabled]):not([inert]):not([aria-hidden])",'iframe:not([tabindex^="-"]):not([inert]):not([aria-hidden])','object:not([tabindex^="-"]):not([inert]):not([aria-hidden])','embed:not([tabindex^="-"]):not([inert]):not([aria-hidden])','[contenteditable]:not([tabindex^="-"]):not([inert]):not([aria-hidden])','[tabindex]:not([tabindex^="-"]):not([inert]):not([aria-hidden])'];var fE=function(e,t){if(t){const n=e.querySelector(`[data-uppy-paneltype="${t}"]`);if(n)return n}return e};Object.defineProperty(dE,"__esModule",{value:!0}),dE.forInline=function(e,t,n){null===t||vE(e,t,n)},dE.forModal=vE;const mE=pE,gE=hE,bE=fE;function yE(e,t){const n=t[0];n&&(n.focus(),e.preventDefault())}function vE(e,t,n){const r=bE(n,t),i=mE(r.querySelectorAll(gE)),o=i.indexOf(document.activeElement);!function(e){return e.contains(document.activeElement)}(r)?yE(e,i):e.shiftKey&&0===o?function(e,t){const n=t[t.length-1];n&&(n.focus(),e.preventDefault())}(e,i):e.shiftKey||o!==i.length-1||yE(e,i)}var wE={exports:{}};var xE=function(e){if(!e.bytesUploaded)return 0;const t=Date.now()-e.uploadStarted;return e.bytesUploaded/(t/1e3)};var EE=function(e){return e.bytesTotal-e.bytesUploaded},ME={STATE_ERROR:"error",STATE_WAITING:"waiting",STATE_PREPROCESSING:"preprocessing",STATE_UPLOADING:"uploading",STATE_POSTPROCESSING:"postprocessing",STATE_COMPLETE:"complete"},kE={};const _E=function(e){return{hours:Math.floor(e/3600)%24,minutes:Math.floor(e/60)%60,seconds:Math.floor(e%60)}};var DE=function(e){const t=_E(e);return`${0===t.hours?"":`${t.hours}h`}${0===t.minutes?"":`${0===t.hours?t.minutes:` ${t.minutes.toString(10).padStart(2,"0")}`}m`}${0!==t.hours?"":`${0===t.minutes?t.seconds:` ${t.seconds.toString(10).padStart(2,"0")}`}s`}`};Object.defineProperty(kE,"__esModule",{value:!0}),kE.CancelBtn=function(e){const{i18n:t,uppy:n}=e;return(0,CE.h)("button",{type:"button",className:"uppy-u-reset uppy-StatusBar-actionCircleBtn",title:t("cancel"),"aria-label":t("cancel"),onClick:()=>n.cancelAll(),"data-cy":"cancel","data-uppy-super-focusable":!0},(0,CE.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"16",height:"16",viewBox:"0 0 16 16"},(0,CE.h)("g",{fill:"none",fillRule:"evenodd"},(0,CE.h)("circle",{fill:"#888",cx:"8",cy:"8",r:"8"}),(0,CE.h)("path",{fill:"#FFF",d:"M9.283 8l2.567 2.567-1.283 1.283L8 9.283 5.433 11.85 4.15 10.567 6.717 8 4.15 5.433 5.433 4.15 8 6.717l2.567-2.567 1.283 1.283z"}))))},kE.DoneBtn=function(e){const{i18n:t,doneButtonHandler:n}=e;return(0,CE.h)("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-StatusBar-actionBtn uppy-StatusBar-actionBtn--done",onClick:n,"data-uppy-super-focusable":!0},t("done"))},kE.LoadingSpinner=LE,kE.PauseResumeButton=function(e){const{isAllPaused:t,i18n:n,isAllComplete:r,resumableUploads:i,uppy:o}=e,s=n(t?"resume":"pause");return(0,CE.h)("button",{title:s,"aria-label":s,className:"uppy-u-reset uppy-StatusBar-actionCircleBtn",type:"button",onClick:function(){return r?null:i?t?o.resumeAll():o.pauseAll():o.cancelAll()},"data-uppy-super-focusable":!0},(0,CE.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"16",height:"16",viewBox:"0 0 16 16"},(0,CE.h)("g",{fill:"none",fillRule:"evenodd"},(0,CE.h)("circle",{fill:"#888",cx:"8",cy:"8",r:"8"}),(0,CE.h)("path",{fill:"#FFF",d:t?"M6 4.25L11.5 8 6 11.75z":"M5 4.5h2v7H5v-7zm4 0h2v7H9v-7z"}))))},kE.ProgressBarComplete=function(e){const{i18n:t}=e;return(0,CE.h)("div",{className:"uppy-StatusBar-content",role:"status",title:t("complete")},(0,CE.h)("div",{className:"uppy-StatusBar-status"},(0,CE.h)("div",{className:"uppy-StatusBar-statusPrimary"},(0,CE.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-StatusBar-statusIndicator uppy-c-icon",width:"15",height:"11",viewBox:"0 0 15 11"},(0,CE.h)("path",{d:"M.414 5.843L1.627 4.63l3.472 3.472L13.202 0l1.212 1.213L5.1 10.528z"})),t("complete"))))},kE.ProgressBarError=function(e){const{error:t,i18n:n,complete:r,numUploads:i}=e;return(0,CE.h)("div",{className:"uppy-StatusBar-content",title:n("uploadFailed")},(0,CE.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-StatusBar-statusIndicator uppy-c-icon",width:"11",height:"11",viewBox:"0 0 11 11"},(0,CE.h)("path",{d:"M4.278 5.5L0 1.222 1.222 0 5.5 4.278 9.778 0 11 1.222 6.722 5.5 11 9.778 9.778 11 5.5 6.722 1.222 11 0 9.778z"})),(0,CE.h)("div",{className:"uppy-StatusBar-status"},(0,CE.h)("div",{className:"uppy-StatusBar-statusPrimary"},n("uploadFailed"),(0,CE.h)("button",{className:"uppy-u-reset uppy-StatusBar-details","aria-label":n("showErrorDetails"),"data-microtip-position":"top-right","data-microtip-size":"medium",onClick:function(){const e=`${n("uploadFailed")} \n\n ${t}`;alert(e)},type:"button"},"?")),(0,CE.h)(zE,{i18n:n,complete:r,numUploads:i})))},kE.ProgressBarProcessing=function(e){const{progress:t}=e,{value:n,mode:r,message:i}=t,o=Math.round(100*n),s=`·`;return(0,CE.h)("div",{className:"uppy-StatusBar-content"},(0,CE.h)(LE,null),"determinate"===r?`${o}% ${s} `:"",i)},kE.ProgressBarUploading=function(e){const{i18n:t,supportsUploadProgress:n,totalProgress:r,showProgressDetails:i,isUploadStarted:o,isAllComplete:s,isAllPaused:a,newFiles:l,numUploads:c,complete:u,totalUploadedSize:d,totalSize:p,totalETA:h,startUpload:f}=e,m=l&&o;if(!o||s)return null;const g=t(a?"paused":"uploading");return(0,CE.h)("div",{className:"uppy-StatusBar-content","aria-label":g,title:g},a?null:(0,CE.h)(LE,null),(0,CE.h)("div",{className:"uppy-StatusBar-status"},(0,CE.h)("div",{className:"uppy-StatusBar-statusPrimary"},n?`${g}: ${r}%`:g),a||m||!i?null:n?(0,CE.h)(PE,{numUploads:c,complete:u,totalUploadedSize:d,totalSize:p,totalETA:h,i18n:t}):(0,CE.h)(zE,{i18n:t,complete:u,numUploads:c}),m?(0,CE.h)(FE,{i18n:t,newFiles:l,startUpload:f}):null))},kE.ProgressDetails=jE,kE.RetryBtn=function(e){const{i18n:t,uppy:n}=e;return(0,CE.h)("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-StatusBar-actionBtn uppy-StatusBar-actionBtn--retry","aria-label":t("retryUpload"),onClick:()=>n.retryAll(),"data-uppy-super-focusable":!0},(0,CE.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"8",height:"10",viewBox:"0 0 8 10"},(0,CE.h)("path",{d:"M4 2.408a2.75 2.75 0 1 0 2.75 2.75.626.626 0 0 1 1.25.018v.023a4 4 0 1 1-4-4.041V.25a.25.25 0 0 1 .389-.208l2.299 1.533a.25.25 0 0 1 0 .416l-2.3 1.533A.25.25 0 0 1 4 3.316v-.908z"})),t("retry"))},kE.UploadBtn=function(e){const{newFiles:t,isUploadStarted:n,recoveredState:r,i18n:i,uploadState:o,isSomeGhost:s,startUpload:a}=e,l=OE("uppy-u-reset","uppy-c-btn","uppy-StatusBar-actionBtn","uppy-StatusBar-actionBtn--upload",{"uppy-c-btn-primary":o===SE.STATE_WAITING},{"uppy-StatusBar-actionBtn--disabled":s}),c=i(t&&n&&!r?"uploadXNewFiles":"uploadXFiles",{smart_count:t});return(0,CE.h)("button",{type:"button",className:l,"aria-label":i("uploadXFiles",{smart_count:t}),onClick:a,disabled:s,"data-uppy-super-focusable":!0},c)};var CE=qx;const OE=Tc.exports,NE=Mv,TE=DE,SE=ME,AE=`·`,IE=()=>` ${AE} `;function LE(){return(0,CE.h)("svg",{className:"uppy-StatusBar-spinner","aria-hidden":"true",focusable:"false",width:"14",height:"14"},(0,CE.h)("path",{d:"M13.983 6.547c-.12-2.509-1.64-4.893-3.939-5.936-2.48-1.127-5.488-.656-7.556 1.094C.524 3.367-.398 6.048.162 8.562c.556 2.495 2.46 4.52 4.94 5.183 2.932.784 5.61-.602 7.256-3.015-1.493 1.993-3.745 3.309-6.298 2.868-2.514-.434-4.578-2.349-5.153-4.84a6.226 6.226 0 0 1 2.98-6.778C6.34.586 9.74 1.1 11.373 3.493c.407.596.693 1.282.842 1.988.127.598.073 1.197.161 1.794.078.525.543 1.257 1.15.864.525-.341.49-1.05.456-1.592-.007-.15.02.3 0 0",fillRule:"evenodd"}))}function jE(e){const{numUploads:t,complete:n,totalUploadedSize:r,totalSize:i,totalETA:o,i18n:s}=e,a=t>1;return(0,CE.h)("div",{className:"uppy-StatusBar-statusSecondary"},a&&s("filesUploadedOfTotal",{complete:n,smart_count:t}),(0,CE.h)("span",{className:"uppy-StatusBar-additionalInfo"},a&&IE(),s("dataUploadedOfTotal",{complete:NE(r),total:NE(i)}),IE(),s("xTimeLeft",{time:TE(o)})))}function zE(e){const{i18n:t,complete:n,numUploads:r}=e;return(0,CE.h)("div",{className:"uppy-StatusBar-statusSecondary"},t("filesUploadedOfTotal",{complete:n,smart_count:r}))}function FE(e){const{i18n:t,newFiles:n,startUpload:r}=e,i=OE("uppy-u-reset","uppy-c-btn","uppy-StatusBar-actionBtn","uppy-StatusBar-actionBtn--uploadNewlyAdded");return(0,CE.h)("div",{className:"uppy-StatusBar-statusSecondary"},(0,CE.h)("div",{className:"uppy-StatusBar-statusSecondaryHint"},t("xMoreFilesAdded",{smart_count:n})),(0,CE.h)("button",{type:"button",className:i,"aria-label":t("uploadXFiles",{smart_count:n}),onClick:r},t("upload")))}const PE=rw(jE,500,{leading:!0,trailing:!0});var RE=qx,BE=kE;const UE=Tc.exports,$E=ME,HE=function(e){const t=[];let n,r;for(const{progress:i}of Object.values(e)){const{preprocess:e,postprocess:o}=i;null==r&&(e||o)&&({mode:n,message:r}=e||o),"determinate"===(null==e?void 0:e.mode)&&t.push(e.value),"determinate"===(null==o?void 0:o.mode)&&t.push(o.value)}return{mode:n,message:r,value:t.reduce(((e,n)=>e+n/t.length),0)}},{STATE_ERROR:WE,STATE_WAITING:VE,STATE_PREPROCESSING:qE,STATE_UPLOADING:YE,STATE_POSTPROCESSING:KE,STATE_COMPLETE:QE}=$E;var GE=function(e){const{newFiles:t,allowNewUpload:n,isUploadInProgress:r,isAllPaused:i,resumableUploads:o,error:s,hideUploadButton:a,hidePauseResumeButton:l,hideCancelButton:c,hideRetryButton:u,recoveredState:d,uploadState:p,totalProgress:h,files:f,supportsUploadProgress:m,hideAfterFinish:g,isSomeGhost:b,doneButtonHandler:y,isUploadStarted:v,i18n:w,startUpload:x,uppy:E,isAllComplete:M,showProgressDetails:k,numUploads:_,complete:D,totalSize:C,totalETA:O,totalUploadedSize:N}=e,T=function(){switch(p){case KE:case qE:{const e=HE(f);return"determinate"===e.mode?100*e.value:h}case WE:return null;case YE:return m?h:null;default:return h}}(),S=function(){if(d)return!1;switch(p){case VE:return a||0===t;case QE:return g;default:return!1}}(),A=null!=T?T:100,I=!s&&t&&!r&&!i&&n&&!a,L=!c&&p!==VE&&p!==QE,j=o&&!l&&p===YE,z=s&&!M&&!u,F=y&&p===QE,P=UE("uppy-StatusBar-progress",{"is-indeterminate":function(){switch(p){case KE:case qE:{const{mode:e}=HE(f);return"indeterminate"===e}case YE:return!m;default:return!1}}()}),R=UE("uppy-StatusBar",`is-${p}`,{"has-ghosts":b});return(0,RE.h)("div",{className:R,"aria-hidden":S},(0,RE.h)("div",{className:P,style:{width:`${A}%`},role:"progressbar","aria-label":`${A}%`,"aria-valuetext":`${A}%`,"aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":T}),(()=>{switch(p){case qE:case KE:return(0,RE.h)(BE.ProgressBarProcessing,{progress:HE(f)});case QE:return(0,RE.h)(BE.ProgressBarComplete,{i18n:w});case WE:return(0,RE.h)(BE.ProgressBarError,{error:s,i18n:w,numUploads:_,complete:D});case YE:return(0,RE.h)(BE.ProgressBarUploading,{i18n:w,supportsUploadProgress:m,totalProgress:h,showProgressDetails:k,isUploadStarted:v,isAllComplete:M,isAllPaused:i,newFiles:t,numUploads:_,complete:D,totalUploadedSize:N,totalSize:C,totalETA:O,startUpload:x});default:return null}})(),(0,RE.h)("div",{className:"uppy-StatusBar-actions"},d||I?(0,RE.h)(BE.UploadBtn,{newFiles:t,isUploadStarted:v,recoveredState:d,i18n:w,isSomeGhost:b,startUpload:x,uploadState:p}):null,z?(0,RE.h)(BE.RetryBtn,{i18n:w,uppy:E}):null,j?(0,RE.h)(BE.PauseResumeButton,{isAllPaused:i,i18n:w,isAllComplete:M,resumableUploads:o,uppy:E}):null,L?(0,RE.h)(BE.CancelBtn,{i18n:w,uppy:E}):null,F?(0,RE.h)(BE.DoneBtn,{i18n:w,doneButtonHandler:y}):null))},ZE=hv.exports;const JE=xE,XE=EE,eM=Gx,tM=ME,nM=GE,rM={strings:{uploading:"Uploading",complete:"Complete",uploadFailed:"Upload failed",paused:"Paused",retry:"Retry",cancel:"Cancel",pause:"Pause",resume:"Resume",done:"Done",filesUploadedOfTotal:{0:"%{complete} of %{smart_count} file uploaded",1:"%{complete} of %{smart_count} files uploaded"},dataUploadedOfTotal:"%{complete} of %{total}",xTimeLeft:"%{time} left",uploadXFiles:{0:"Upload %{smart_count} file",1:"Upload %{smart_count} files"},uploadXNewFiles:{0:"Upload +%{smart_count} file",1:"Upload +%{smart_count} files"},upload:"Upload",retryUpload:"Retry upload",xMoreFilesAdded:{0:"%{smart_count} more file added",1:"%{smart_count} more files added"},showErrorDetails:"Show error details"}};function iM(e){const t=function(e){let t=0;return e.forEach((e=>{t+=JE(e.progress)})),t}(e);if(0===t)return 0;const n=e.reduce(((e,t)=>e+XE(t.progress)),0);return Math.round(n/t*10)/10}function oM(e,t,n,r){if(e&&!t)return tM.STATE_ERROR;if(t)return tM.STATE_COMPLETE;if(n)return tM.STATE_WAITING;let i=tM.STATE_WAITING;const o=Object.keys(r);for(let e=0;e<o.length;e++){const{progress:t}=r[o[e]];if(t.uploadStarted&&!t.uploadComplete)return tM.STATE_UPLOADING;t.preprocess&&i!==tM.STATE_UPLOADING&&(i=tM.STATE_PREPROCESSING),t.postprocess&&i!==tM.STATE_UPLOADING&&i!==tM.STATE_PREPROCESSING&&(i=tM.STATE_POSTPROCESSING)}return i}class sM extends ZE.UIPlugin{constructor(e,t){super(e,t),this.startUpload=()=>{const{recoveredState:e}=this.uppy.getState();if(!e)return this.uppy.upload().catch((()=>{}));this.uppy.emit("restore-confirmed")},this.id=this.opts.id||"StatusBar",this.title="StatusBar",this.type="progressindicator",this.defaultLocale=rM;this.opts={target:"body",hideUploadButton:!1,hideRetryButton:!1,hidePauseResumeButton:!1,hideCancelButton:!1,showProgressDetails:!1,hideAfterFinish:!0,doneButtonHandler:null,...t},this.i18nInit(),this.render=this.render.bind(this),this.install=this.install.bind(this)}render(e){const{capabilities:t,files:n,allowNewUpload:r,totalProgress:i,error:o,recoveredState:s}=e,{newFiles:a,startedFiles:l,completeFiles:c,inProgressNotPausedFiles:u,isUploadStarted:d,isAllComplete:p,isAllErrored:h,isAllPaused:f,isUploadInProgress:m,isSomeGhost:g}=this.uppy.getObjectOfFilesPerState(),b=s?Object.values(n):a,y=iM(u),v=!!t.resumableUploads,w=!1!==t.uploadProgress;let x=0,E=0;return l.forEach((e=>{x+=e.progress.bytesTotal||0,E+=e.progress.bytesUploaded||0})),nM({error:o,uploadState:oM(o,p,s,e.files||{}),allowNewUpload:r,totalProgress:i,totalSize:x,totalUploadedSize:E,isAllComplete:!1,isAllPaused:f,isAllErrored:h,isUploadStarted:d,isUploadInProgress:m,isSomeGhost:g,recoveredState:s,complete:c.length,newFiles:b.length,numUploads:l.length,totalETA:y,files:n,i18n:this.i18n,uppy:this.uppy,startUpload:this.startUpload,doneButtonHandler:this.opts.doneButtonHandler,resumableUploads:v,supportsUploadProgress:w,showProgressDetails:this.opts.showProgressDetails,hideUploadButton:this.opts.hideUploadButton,hideRetryButton:this.opts.hideRetryButton,hidePauseResumeButton:this.opts.hidePauseResumeButton,hideCancelButton:this.opts.hideCancelButton,hideAfterFinish:this.opts.hideAfterFinish,isTargetDOMEl:this.isTargetDOMEl})}onMount(){const e=this.el;eM(e)||(e.dir="ltr")}install(){const{target:e}=this.opts;e&&this.mount(e,this)}uninstall(){this.unmount()}}sM.VERSION="2.2.1",wE.exports=sM;var aM={exports:{}},lM=qx;const cM=300;class uM extends lM.Component{constructor(){super(...arguments),this.ref=(0,lM.createRef)()}componentWillEnter(e){this.ref.current.style.opacity="1",this.ref.current.style.transform="none",setTimeout(e,cM)}componentWillLeave(e){this.ref.current.style.opacity="0",this.ref.current.style.transform="translateY(350%)",setTimeout(e,cM)}render(){const{children:e}=this.props;return(0,lM.h)("div",{className:"uppy-Informer-animated",ref:this.ref},e)}}var dM=uM,pM=qx;function hM(e,t){const n=e._ptgLinkedRefs||(e._ptgLinkedRefs={});return n[t]||(n[t]=n=>{e.refs[t]=n})}function fM(e){const t={};for(let o=0;o<e.length;o++)if(null!=e[o]){t[(n=e[o],r=o.toString(36),i=void 0,null!=(i=null==n?void 0:n.key)?i:r)]=e[o]}var n,r,i;return t}function mM(e,t){e=e||{},t=t||{};const n=n=>t.hasOwnProperty(n)?t[n]:e[n],r={};let i=[];for(const n in e)t.hasOwnProperty(n)?i.length&&(r[n]=i,i=[]):i.push(n);const o={};for(const e in t){if(r.hasOwnProperty(e))for(let t=0;t<r[e].length;t++){const i=r[e][t];o[r[e][t]]=n(i)}o[e]=n(e)}for(let e=0;e<i.length;e++)o[i[e]]=n(i[e]);return o}class gM extends pM.Component{constructor(e,t){super(e,t),this.refs={},this.state={children:fM((0,pM.toChildArray)((0,pM.toChildArray)(this.props.children))||[])},this.performAppear=this.performAppear.bind(this),this.performEnter=this.performEnter.bind(this),this.performLeave=this.performLeave.bind(this)}componentWillMount(){this.currentlyTransitioningKeys={},this.keysToAbortLeave=[],this.keysToEnter=[],this.keysToLeave=[]}componentDidMount(){const e=this.state.children;for(const t in e)e[t]&&this.performAppear(t)}componentWillReceiveProps(e){const t=fM((0,pM.toChildArray)(e.children)||[]),n=this.state.children;let r;for(r in this.setState((e=>({children:mM(e.children,t)}))),t)if(t.hasOwnProperty(r)){const e=n&&n.hasOwnProperty(r);t[r]&&e&&this.currentlyTransitioningKeys[r]?(this.keysToEnter.push(r),this.keysToAbortLeave.push(r)):!t[r]||e||this.currentlyTransitioningKeys[r]||this.keysToEnter.push(r)}for(r in n)if(n.hasOwnProperty(r)){const e=t&&t.hasOwnProperty(r);!n[r]||e||this.currentlyTransitioningKeys[r]||this.keysToLeave.push(r)}}componentDidUpdate(){const{keysToEnter:e}=this;this.keysToEnter=[],e.forEach(this.performEnter);const{keysToLeave:t}=this;this.keysToLeave=[],t.forEach(this.performLeave)}_finishAbort(e){const t=this.keysToAbortLeave.indexOf(e);-1!==t&&this.keysToAbortLeave.splice(t,1)}performAppear(e){this.currentlyTransitioningKeys[e]=!0;const t=this.refs[e];t.componentWillAppear?t.componentWillAppear(this._handleDoneAppearing.bind(this,e)):this._handleDoneAppearing(e)}_handleDoneAppearing(e){const t=this.refs[e];t.componentDidAppear&&t.componentDidAppear(),delete this.currentlyTransitioningKeys[e],this._finishAbort(e);const n=fM((0,pM.toChildArray)(this.props.children)||[]);n&&n.hasOwnProperty(e)||this.performLeave(e)}performEnter(e){this.currentlyTransitioningKeys[e]=!0;const t=this.refs[e];t.componentWillEnter?t.componentWillEnter(this._handleDoneEntering.bind(this,e)):this._handleDoneEntering(e)}_handleDoneEntering(e){const t=this.refs[e];t.componentDidEnter&&t.componentDidEnter(),delete this.currentlyTransitioningKeys[e],this._finishAbort(e);const n=fM((0,pM.toChildArray)(this.props.children)||[]);n&&n.hasOwnProperty(e)||this.performLeave(e)}performLeave(e){if(-1!==this.keysToAbortLeave.indexOf(e))return;this.currentlyTransitioningKeys[e]=!0;const t=this.refs[e];t.componentWillLeave?t.componentWillLeave(this._handleDoneLeaving.bind(this,e)):this._handleDoneLeaving(e)}_handleDoneLeaving(e){if(-1!==this.keysToAbortLeave.indexOf(e))return;const t=this.refs[e];t.componentDidLeave&&t.componentDidLeave(),delete this.currentlyTransitioningKeys[e];const n=fM((0,pM.toChildArray)(this.props.children)||[]);if(n&&n.hasOwnProperty(e))this.performEnter(e);else{const t=(r={},i=this.state.children,Object.assign(r,i));delete t[e],this.setState({children:t})}var r,i}render(e,t){let{childFactory:n,transitionLeave:r,transitionName:i,transitionAppear:o,transitionEnter:s,transitionLeaveTimeout:a,transitionEnterTimeout:l,transitionAppearTimeout:c,component:u,...d}=e,{children:p}=t;const h=[];for(const e in p)if(p.hasOwnProperty(e)){const t=p[e];if(t){const r=hM(this,e),i=(0,pM.cloneElement)(n(t),{ref:r,key:e});h.push(i)}}return(0,pM.h)(u,d,h)}}gM.defaultProps={component:"span",childFactory:e=>e};var bM=qx,yM=hv.exports;const vM=dM,wM=gM;class xM extends yM.UIPlugin{constructor(e,t){super(e,t),this.render=e=>(0,bM.h)("div",{className:"uppy uppy-Informer"},(0,bM.h)(wM,null,e.info.map((e=>(0,bM.h)(vM,{key:e.message},(0,bM.h)("p",{role:"alert"},e.message," ",e.details&&(0,bM.h)("span",{"aria-label":e.details,"data-microtip-position":"top-left","data-microtip-size":"medium",role:"tooltip",onClick:()=>alert(`${e.message} \n\n ${e.details}`)},"?"))))))),this.type="progressindicator",this.id=this.opts.id||"Informer",this.title="Informer";this.opts={...t}}install(){const{target:e}=this.opts;e&&this.mount(e,this)}}xM.VERSION="2.1.0",aM.exports=xM;var EM={exports:{}};!function(e){function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var n="undefined"!=typeof self?self:Dc;const r="undefined"!=typeof navigator,i=r&&"undefined"==typeof HTMLImageElement,o=!(void 0===Dc||"undefined"==typeof process||!process.versions||!process.versions.node),s=n.Buffer,a=!!s,l=e=>void 0!==e;function c(e){return void 0===e||(e instanceof Map?0===e.size:0===Object.values(e).filter(l).length)}function u(e){let t=new Error(e);throw delete t.stack,t}function d(e){let t=function(e){let t=0;return e.ifd0.enabled&&(t+=1024),e.exif.enabled&&(t+=2048),e.makerNote&&(t+=2048),e.userComment&&(t+=1024),e.gps.enabled&&(t+=512),e.interop.enabled&&(t+=100),e.ifd1.enabled&&(t+=1024),t+2048}(e);return e.jfif.enabled&&(t+=50),e.xmp.enabled&&(t+=2e4),e.iptc.enabled&&(t+=14e3),e.icc.enabled&&(t+=6e3),t}const p=e=>String.fromCharCode.apply(null,e),h="undefined"!=typeof TextDecoder?new TextDecoder("utf-8"):void 0;class f{static from(e,t){return e instanceof this&&e.le===t?e:new f(e,void 0,void 0,t)}constructor(e,t=0,n,r){if("boolean"==typeof r&&(this.le=r),Array.isArray(e)&&(e=new Uint8Array(e)),0===e)this.byteOffset=0,this.byteLength=0;else if(e instanceof ArrayBuffer){void 0===n&&(n=e.byteLength-t);let r=new DataView(e,t,n);this._swapDataView(r)}else if(e instanceof Uint8Array||e instanceof DataView||e instanceof f){void 0===n&&(n=e.byteLength-t),(t+=e.byteOffset)+n>e.byteOffset+e.byteLength&&u("Creating view outside of available memory in ArrayBuffer");let r=new DataView(e.buffer,t,n);this._swapDataView(r)}else if("number"==typeof e){let t=new DataView(new ArrayBuffer(e));this._swapDataView(t)}else u("Invalid input argument for BufferView: "+e)}_swapArrayBuffer(e){this._swapDataView(new DataView(e))}_swapBuffer(e){this._swapDataView(new DataView(e.buffer,e.byteOffset,e.byteLength))}_swapDataView(e){this.dataView=e,this.buffer=e.buffer,this.byteOffset=e.byteOffset,this.byteLength=e.byteLength}_lengthToEnd(e){return this.byteLength-e}set(e,t,n=f){return e instanceof DataView||e instanceof f?e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e instanceof ArrayBuffer&&(e=new Uint8Array(e)),e instanceof Uint8Array||u("BufferView.set(): Invalid data argument."),this.toUint8().set(e,t),new n(this,t,e.byteLength)}subarray(e,t){return t=t||this._lengthToEnd(e),new f(this,e,t)}toUint8(){return new Uint8Array(this.buffer,this.byteOffset,this.byteLength)}getUint8Array(e,t){return new Uint8Array(this.buffer,this.byteOffset+e,t)}getString(e=0,t=this.byteLength){return n=this.getUint8Array(e,t),h?h.decode(n):a?Buffer.from(n).toString("utf8"):decodeURIComponent(escape(p(n)));var n}getLatin1String(e=0,t=this.byteLength){let n=this.getUint8Array(e,t);return p(n)}getUnicodeString(e=0,t=this.byteLength){const n=[];for(let r=0;r<t&&e+r<this.byteLength;r+=2)n.push(this.getUint16(e+r));return p(n)}getInt8(e){return this.dataView.getInt8(e)}getUint8(e){return this.dataView.getUint8(e)}getInt16(e,t=this.le){return this.dataView.getInt16(e,t)}getInt32(e,t=this.le){return this.dataView.getInt32(e,t)}getUint16(e,t=this.le){return this.dataView.getUint16(e,t)}getUint32(e,t=this.le){return this.dataView.getUint32(e,t)}getFloat32(e,t=this.le){return this.dataView.getFloat32(e,t)}getFloat64(e,t=this.le){return this.dataView.getFloat64(e,t)}getFloat(e,t=this.le){return this.dataView.getFloat32(e,t)}getDouble(e,t=this.le){return this.dataView.getFloat64(e,t)}getUintBytes(e,t,n){switch(t){case 1:return this.getUint8(e,n);case 2:return this.getUint16(e,n);case 4:return this.getUint32(e,n);case 8:return this.getUint64&&this.getUint64(e,n)}}getUint(e,t,n){switch(t){case 8:return this.getUint8(e,n);case 16:return this.getUint16(e,n);case 32:return this.getUint32(e,n);case 64:return this.getUint64&&this.getUint64(e,n)}}toString(e){return this.dataView.toString(e,this.constructor.name)}ensureChunk(){}}function m(e,t){u(`${e} '${t}' was not loaded, try using full build of exifr.`)}class g extends Map{constructor(e){super(),this.kind=e}get(e,t){return this.has(e)||m(this.kind,e),t&&(e in t||function(e,t){u(`Unknown ${e} '${t}'.`)}(this.kind,e),t[e].enabled||m(this.kind,e)),super.get(e)}keyList(){return Array.from(this.keys())}}var b=new g("file parser"),y=new g("segment parser"),v=new g("file reader");let w=n.fetch;const x="Invalid input argument";function E(e,t){return(n=e).startsWith("data:")||n.length>1e4?k(e,t,"base64"):o&&e.includes("://")?M(e,t,"url",_):o?k(e,t,"fs"):r?M(e,t,"url",_):void u(x);var n}async function M(e,t,n,r){return v.has(n)?k(e,t,n):r?async function(e,t){let n=await t(e);return new f(n)}(e,r):void u(`Parser ${n} is not loaded`)}async function k(e,t,n){let r=new(v.get(n))(e,t);return await r.read(),r}const _=e=>w(e).then((e=>e.arrayBuffer())),D=e=>new Promise(((t,n)=>{let r=new FileReader;r.onloadend=()=>t(r.result||new ArrayBuffer),r.onerror=n,r.readAsArrayBuffer(e)}));class C extends Map{get tagKeys(){return this.allKeys||(this.allKeys=Array.from(this.keys())),this.allKeys}get tagValues(){return this.allValues||(this.allValues=Array.from(this.values())),this.allValues}}function O(e,t,n){let r=new C;for(let[e,t]of n)r.set(e,t);if(Array.isArray(t))for(let n of t)e.set(n,r);else e.set(t,r);return r}function N(e,t,n){let r,i=e.get(t);for(r of n)i.set(r[0],r[1])}const T=new Map,S=new Map,A=new Map,I=37500,L=37510,j=33723,z=34675,F=34665,P=34853,R=40965,B=["chunked","firstChunkSize","firstChunkSizeNode","firstChunkSizeBrowser","chunkSize","chunkLimit"],U=["jfif","xmp","icc","iptc","ihdr"],$=["tiff",...U],H=["ifd0","ifd1","exif","gps","interop"],W=[...$,...H],V=["makerNote","userComment"],q=["translateKeys","translateValues","reviveValues","multiSegment"],Y=[...q,"sanitize","mergeOutput","silentErrors"];class K{get translate(){return this.translateKeys||this.translateValues||this.reviveValues}}class Q extends K{get needed(){return this.enabled||this.deps.size>0}constructor(e,n,r,i){if(super(),t(this,"enabled",!1),t(this,"skip",new Set),t(this,"pick",new Set),t(this,"deps",new Set),t(this,"translateKeys",!1),t(this,"translateValues",!1),t(this,"reviveValues",!1),this.key=e,this.enabled=n,this.parse=this.enabled,this.applyInheritables(i),this.canBeFiltered=H.includes(e),this.canBeFiltered&&(this.dict=T.get(e)),void 0!==r)if(Array.isArray(r))this.parse=this.enabled=!0,this.canBeFiltered&&r.length>0&&this.translateTagSet(r,this.pick);else if("object"==typeof r){if(this.enabled=!0,this.parse=!1!==r.parse,this.canBeFiltered){let{pick:e,skip:t}=r;e&&e.length>0&&this.translateTagSet(e,this.pick),t&&t.length>0&&this.translateTagSet(t,this.skip)}this.applyInheritables(r)}else!0===r||!1===r?this.parse=this.enabled=r:u(`Invalid options argument: ${r}`)}applyInheritables(e){let t,n;for(t of q)n=e[t],void 0!==n&&(this[t]=n)}translateTagSet(e,t){if(this.dict){let n,r,{tagKeys:i,tagValues:o}=this.dict;for(n of e)"string"==typeof n?(r=o.indexOf(n),-1===r&&(r=i.indexOf(Number(n))),-1!==r&&t.add(Number(i[r]))):t.add(n)}else for(let n of e)t.add(n)}finalizeFilters(){!this.enabled&&this.deps.size>0?(this.enabled=!0,te(this.pick,this.deps)):this.enabled&&this.pick.size>0&&te(this.pick,this.deps)}}var G={jfif:!1,tiff:!0,xmp:!1,icc:!1,iptc:!1,ifd0:!0,ifd1:!1,exif:!0,gps:!0,interop:!1,ihdr:void 0,makerNote:!1,userComment:!1,multiSegment:!1,skip:[],pick:[],translateKeys:!0,translateValues:!0,reviveValues:!0,sanitize:!0,mergeOutput:!0,silentErrors:!0,chunked:!0,firstChunkSize:void 0,firstChunkSizeNode:512,firstChunkSizeBrowser:65536,chunkSize:65536,chunkLimit:5},Z=new Map;class J extends K{static useCached(e){let t=Z.get(e);return void 0!==t||(t=new this(e),Z.set(e,t)),t}constructor(e){super(),!0===e?this.setupFromTrue():void 0===e?this.setupFromUndefined():Array.isArray(e)?this.setupFromArray(e):"object"==typeof e?this.setupFromObject(e):u(`Invalid options argument ${e}`),void 0===this.firstChunkSize&&(this.firstChunkSize=r?this.firstChunkSizeBrowser:this.firstChunkSizeNode),this.mergeOutput&&(this.ifd1.enabled=!1),this.filterNestedSegmentTags(),this.traverseTiffDependencyTree(),this.checkLoadedPlugins()}setupFromUndefined(){let e;for(e of B)this[e]=G[e];for(e of Y)this[e]=G[e];for(e of V)this[e]=G[e];for(e of W)this[e]=new Q(e,G[e],void 0,this)}setupFromTrue(){let e;for(e of B)this[e]=G[e];for(e of Y)this[e]=G[e];for(e of V)this[e]=!0;for(e of W)this[e]=new Q(e,!0,void 0,this)}setupFromArray(e){let t;for(t of B)this[t]=G[t];for(t of Y)this[t]=G[t];for(t of V)this[t]=G[t];for(t of W)this[t]=new Q(t,!1,void 0,this);this.setupGlobalFilters(e,void 0,H)}setupFromObject(e){let t;for(t of(H.ifd0=H.ifd0||H.image,H.ifd1=H.ifd1||H.thumbnail,Object.assign(this,e),B))this[t]=ee(e[t],G[t]);for(t of Y)this[t]=ee(e[t],G[t]);for(t of V)this[t]=ee(e[t],G[t]);for(t of $)this[t]=new Q(t,G[t],e[t],this);for(t of H)this[t]=new Q(t,G[t],e[t],this.tiff);this.setupGlobalFilters(e.pick,e.skip,H,W),!0===e.tiff?this.batchEnableWithBool(H,!0):!1===e.tiff?this.batchEnableWithUserValue(H,e):Array.isArray(e.tiff)?this.setupGlobalFilters(e.tiff,void 0,H):"object"==typeof e.tiff&&this.setupGlobalFilters(e.tiff.pick,e.tiff.skip,H)}batchEnableWithBool(e,t){for(let n of e)this[n].enabled=t}batchEnableWithUserValue(e,t){for(let n of e){let e=t[n];this[n].enabled=!1!==e&&void 0!==e}}setupGlobalFilters(e,t,n,r=n){if(e&&e.length){for(let e of r)this[e].enabled=!1;let t=X(e,n);for(let[e,n]of t)te(this[e].pick,n),this[e].enabled=!0}else if(t&&t.length){let e=X(t,n);for(let[t,n]of e)te(this[t].skip,n)}}filterNestedSegmentTags(){let{ifd0:e,exif:t,xmp:n,iptc:r,icc:i}=this;this.makerNote?t.deps.add(I):t.skip.add(I),this.userComment?t.deps.add(L):t.skip.add(L),n.enabled||e.skip.add(700),r.enabled||e.skip.add(j),i.enabled||e.skip.add(z)}traverseTiffDependencyTree(){let{ifd0:e,exif:t,gps:n,interop:r}=this;r.needed&&(t.deps.add(R),e.deps.add(R)),t.needed&&e.deps.add(F),n.needed&&e.deps.add(P),this.tiff.enabled=H.some((e=>!0===this[e].enabled))||this.makerNote||this.userComment;for(let e of H)this[e].finalizeFilters()}get onlyTiff(){return!U.map((e=>this[e].enabled)).some((e=>!0===e))&&this.tiff.enabled}checkLoadedPlugins(){for(let e of $)this[e].enabled&&!y.has(e)&&m("segment parser",e)}}function X(e,t){let n,r,i,o,s=[];for(i of t){for(o of(n=T.get(i),r=[],n))(e.includes(o[0])||e.includes(o[1]))&&r.push(o[0]);r.length&&s.push([i,r])}return s}function ee(e,t){return void 0!==e?e:void 0!==t?t:void 0}function te(e,t){for(let n of t)e.add(n)}t(J,"default",G);class ne{constructor(e){t(this,"parsers",{}),t(this,"output",{}),t(this,"errors",[]),t(this,"pushToErrors",(e=>this.errors.push(e))),this.options=J.useCached(e)}async read(e){this.file=await function(e,t){return"string"==typeof e?E(e,t):r&&!i&&e instanceof HTMLImageElement?E(e.src,t):e instanceof Uint8Array||e instanceof ArrayBuffer||e instanceof DataView?new f(e):r&&e instanceof Blob?M(e,t,"blob",D):void u(x)}(e,this.options)}setup(){if(this.fileParser)return;let{file:e}=this,t=e.getUint16(0);for(let[n,r]of b)if(r.canHandle(e,t))return this.fileParser=new r(this.options,this.file,this.parsers),e[n]=!0;this.file.close&&this.file.close(),u("Unknown file format")}async parse(){let{output:e,errors:t}=this;return this.setup(),this.options.silentErrors?(await this.executeParsers().catch(this.pushToErrors),t.push(...this.fileParser.errors)):await this.executeParsers(),this.file.close&&this.file.close(),this.options.silentErrors&&t.length>0&&(e.errors=t),c(n=e)?void 0:n;var n}async executeParsers(){let{output:e}=this;await this.fileParser.parse();let t=Object.values(this.parsers).map((async t=>{let n=await t.parse();t.assignToOutput(e,n)}));this.options.silentErrors&&(t=t.map((e=>e.catch(this.pushToErrors)))),await Promise.all(t)}async extractThumbnail(){this.setup();let{options:e,file:t}=this,n=y.get("tiff",e);var r;if(t.tiff?r={start:0,type:"tiff"}:t.jpeg&&(r=await this.fileParser.getOrFindSegment("tiff")),void 0===r)return;let i=await this.fileParser.ensureSegmentChunk(r),o=this.parsers.tiff=new n(i,e,t),s=await o.extractThumbnail();return t.close&&t.close(),s}}async function re(e,t){let n=new ne(t);return await n.read(e),n.parse()}var ie=Object.freeze({__proto__:null,parse:re,Exifr:ne,fileParsers:b,segmentParsers:y,fileReaders:v,tagKeys:T,tagValues:S,tagRevivers:A,createDictionary:O,extendDictionary:N,fetchUrlAsArrayBuffer:_,readBlobAsArrayBuffer:D,chunkedProps:B,otherSegments:U,segments:$,tiffBlocks:H,segmentsAndBlocks:W,tiffExtractables:V,inheritables:q,allFormatters:Y,Options:J});class oe{static findPosition(e,t){let n=e.getUint16(t+2)+2,r="function"==typeof this.headerLength?this.headerLength(e,t,n):this.headerLength,i=t+r,o=n-r;return{offset:t,length:n,headerLength:r,start:i,size:o,end:i+o}}static parse(e,t={}){return new this(e,new J({[this.type]:t}),e).parse()}normalizeInput(e){return e instanceof f?e:new f(e)}constructor(e,n={},r){t(this,"errors",[]),t(this,"raw",new Map),t(this,"handleError",(e=>{if(!this.options.silentErrors)throw e;this.errors.push(e.message)})),this.chunk=this.normalizeInput(e),this.file=r,this.type=this.constructor.type,this.globalOptions=this.options=n,this.localOptions=n[this.type],this.canTranslate=this.localOptions&&this.localOptions.translate}translate(){this.canTranslate&&(this.translated=this.translateBlock(this.raw,this.type))}get output(){return this.translated?this.translated:this.raw?Object.fromEntries(this.raw):void 0}translateBlock(e,t){let n=A.get(t),r=S.get(t),i=T.get(t),o=this.options[t],s=o.reviveValues&&!!n,a=o.translateValues&&!!r,l=o.translateKeys&&!!i,c={};for(let[t,o]of e)s&&n.has(t)?o=n.get(t)(o):a&&r.has(t)&&(o=this.translateValue(o,r.get(t))),l&&i.has(t)&&(t=i.get(t)||t),c[t]=o;return c}translateValue(e,t){return t[e]||t.DEFAULT||e}assignToOutput(e,t){this.assignObjectToOutput(e,this.constructor.type,t)}assignObjectToOutput(e,t,n){if(this.globalOptions.mergeOutput)return Object.assign(e,n);e[t]?Object.assign(e[t],n):e[t]=n}}function se(e){return 192===e||194===e||196===e||219===e||221===e||218===e||254===e}function ae(e){return e>=224&&e<=239}function le(e,t,n){for(let[r,i]of y)if(i.canHandle(e,t,n))return r}t(oe,"headerLength",4),t(oe,"type",void 0),t(oe,"multiSegment",!1),t(oe,"canHandle",(()=>!1));class ce extends class{constructor(e,n,r){t(this,"errors",[]),t(this,"ensureSegmentChunk",(async e=>{let t=e.start,n=e.size||65536;if(this.file.chunked)if(this.file.available(t,n))e.chunk=this.file.subarray(t,n);else try{e.chunk=await this.file.readChunk(t,n)}catch(t){u(`Couldn't read segment: ${JSON.stringify(e)}. ${t.message}`)}else this.file.byteLength>t+n?e.chunk=this.file.subarray(t,n):void 0===e.size?e.chunk=this.file.subarray(t):u("Segment unreachable: "+JSON.stringify(e));return e.chunk})),this.extendOptions&&this.extendOptions(e),this.options=e,this.file=n,this.parsers=r}injectSegment(e,t){this.options[e].enabled&&this.createParser(e,t)}createParser(e,t){let n=new(y.get(e))(t,this.options,this.file);return this.parsers[e]=n}createParsers(e){for(let t of e){let{type:e,chunk:n}=t,r=this.options[e];if(r&&r.enabled){let t=this.parsers[e];t&&t.append||t||this.createParser(e,n)}}}async readSegments(e){let t=e.map(this.ensureSegmentChunk);await Promise.all(t)}}{constructor(...e){super(...e),t(this,"appSegments",[]),t(this,"jpegSegments",[]),t(this,"unknownSegments",[])}static canHandle(e,t){return 65496===t}async parse(){await this.findAppSegments(),await this.readSegments(this.appSegments),this.mergeMultiSegments(),this.createParsers(this.mergedAppSegments||this.appSegments)}setupSegmentFinderArgs(e){!0===e?(this.findAll=!0,this.wanted=new Set(y.keyList())):(e=void 0===e?y.keyList().filter((e=>this.options[e].enabled)):e.filter((e=>this.options[e].enabled&&y.has(e))),this.findAll=!1,this.remaining=new Set(e),this.wanted=new Set(e)),this.unfinishedMultiSegment=!1}async findAppSegments(e=0,t){this.setupSegmentFinderArgs(t);let{file:n,findAll:r,wanted:i,remaining:o}=this;if(!r&&this.file.chunked&&(r=Array.from(i).some((e=>{let t=y.get(e),n=this.options[e];return t.multiSegment&&n.multiSegment})),r&&await this.file.readWhole()),e=this.findAppSegmentsInRange(e,n.byteLength),!this.options.onlyTiff&&n.chunked){let t=!1;for(;o.size>0&&!t&&(n.canReadNextChunk||this.unfinishedMultiSegment);){let{nextChunkOffset:r}=n,i=this.appSegments.some((e=>!this.file.available(e.offset||e.start,e.length||e.size)));if(t=e>r&&!i?!await n.readNextChunk(e):!await n.readNextChunk(r),void 0===(e=this.findAppSegmentsInRange(e,n.byteLength)))return}}}findAppSegmentsInRange(e,t){t-=2;let n,r,i,o,s,a,{file:l,findAll:c,wanted:u,remaining:d,options:p}=this;for(;e<t;e++)if(255===l.getUint8(e))if(n=l.getUint8(e+1),ae(n)){if(r=l.getUint16(e+2),i=le(l,e,r),i&&u.has(i)&&(o=y.get(i),s=o.findPosition(l,e),a=p[i],s.type=i,this.appSegments.push(s),!c&&(o.multiSegment&&a.multiSegment?(this.unfinishedMultiSegment=s.chunkNumber<s.chunkCount,this.unfinishedMultiSegment||d.delete(i)):d.delete(i),0===d.size)))break;p.recordUnknownSegments&&(s=oe.findPosition(l,e),s.marker=n,this.unknownSegments.push(s)),e+=r+1}else if(se(n)){if(r=l.getUint16(e+2),218===n&&!1!==p.stopAfterSos)return;p.recordJpegSegments&&this.jpegSegments.push({offset:e,length:r,marker:n}),e+=r+1}return e}mergeMultiSegments(){if(!this.appSegments.some((e=>e.multiSegment)))return;let e=function(e,t){let n,r,i,o=new Map;for(let s=0;s<e.length;s++)n=e[s],r=n[t],o.has(r)?i=o.get(r):o.set(r,i=[]),i.push(n);return Array.from(o)}(this.appSegments,"type");this.mergedAppSegments=e.map((([e,t])=>{let n=y.get(e,this.options);return n.handleMultiSegments?{type:e,chunk:n.handleMultiSegments(t)}:t[0]}))}getSegment(e){return this.appSegments.find((t=>t.type===e))}async getOrFindSegment(e){let t=this.getSegment(e);return void 0===t&&(await this.findAppSegments(0,[e]),t=this.getSegment(e)),t}}t(ce,"type","jpeg"),b.set("jpeg",ce);const ue=[void 0,1,1,2,4,8,1,1,2,4,8,4,8,4];class de extends oe{parseHeader(){var e=this.chunk.getUint16();18761===e?this.le=!0:19789===e&&(this.le=!1),this.chunk.le=this.le,this.headerParsed=!0}parseTags(e,t,n=new Map){let{pick:r,skip:i}=this.options[t];r=new Set(r);let o=r.size>0,s=0===i.size,a=this.chunk.getUint16(e);e+=2;for(let l=0;l<a;l++){let a=this.chunk.getUint16(e);if(o){if(r.has(a)&&(n.set(a,this.parseTag(e,a,t)),r.delete(a),0===r.size))break}else!s&&i.has(a)||n.set(a,this.parseTag(e,a,t));e+=12}return n}parseTag(e,t,n){let{chunk:r}=this,i=r.getUint16(e+2),o=r.getUint32(e+4),s=ue[i];if(s*o<=4?e+=8:e=r.getUint32(e+8),(i<1||i>13)&&u(`Invalid TIFF value type. block: ${n.toUpperCase()}, tag: ${t.toString(16)}, type: ${i}, offset ${e}`),e>r.byteLength&&u(`Invalid TIFF value offset. block: ${n.toUpperCase()}, tag: ${t.toString(16)}, type: ${i}, offset ${e} is outside of chunk size ${r.byteLength}`),1===i)return r.getUint8Array(e,o);if(2===i)return""===(a=function(e){for(;e.endsWith("\0");)e=e.slice(0,-1);return e}(a=r.getString(e,o)).trim())?void 0:a;var a;if(7===i)return r.getUint8Array(e,o);if(1===o)return this.parseTagValue(i,e);{let t=new(function(e){switch(e){case 1:return Uint8Array;case 3:return Uint16Array;case 4:return Uint32Array;case 5:case 10:default:return Array;case 6:return Int8Array;case 8:return Int16Array;case 9:return Int32Array;case 11:return Float32Array;case 12:return Float64Array}}(i))(o),n=s;for(let r=0;r<o;r++)t[r]=this.parseTagValue(i,e),e+=n;return t}}parseTagValue(e,t){let{chunk:n}=this;switch(e){case 1:return n.getUint8(t);case 3:return n.getUint16(t);case 4:case 13:return n.getUint32(t);case 5:return n.getUint32(t)/n.getUint32(t+4);case 6:return n.getInt8(t);case 8:return n.getInt16(t);case 9:return n.getInt32(t);case 10:return n.getInt32(t)/n.getInt32(t+4);case 11:return n.getFloat(t);case 12:return n.getDouble(t);default:u(`Invalid tiff type ${e}`)}}}class pe extends de{static canHandle(e,t){return 225===e.getUint8(t+1)&&1165519206===e.getUint32(t+4)&&0===e.getUint16(t+8)}async parse(){this.parseHeader();let{options:e}=this;return e.ifd0.enabled&&await this.parseIfd0Block(),e.exif.enabled&&await this.safeParse("parseExifBlock"),e.gps.enabled&&await this.safeParse("parseGpsBlock"),e.interop.enabled&&await this.safeParse("parseInteropBlock"),e.ifd1.enabled&&await this.safeParse("parseThumbnailBlock"),this.createOutput()}safeParse(e){let t=this[e]();return void 0!==t.catch&&(t=t.catch(this.handleError)),t}findIfd0Offset(){void 0===this.ifd0Offset&&(this.ifd0Offset=this.chunk.getUint32(4))}findIfd1Offset(){if(void 0===this.ifd1Offset){this.findIfd0Offset();let e=this.chunk.getUint16(this.ifd0Offset),t=this.ifd0Offset+2+12*e;this.ifd1Offset=this.chunk.getUint32(t)}}parseBlock(e,t){let n=new Map;return this[t]=n,this.parseTags(e,t,n),n}async parseIfd0Block(){if(this.ifd0)return;let{file:e}=this;this.findIfd0Offset(),this.ifd0Offset<8&&u("Malformed EXIF data"),!e.chunked&&this.ifd0Offset>e.byteLength&&u(`IFD0 offset points to outside of file.\nthis.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e.byteLength}`),e.tiff&&await e.ensureChunk(this.ifd0Offset,d(this.options));let t=this.parseBlock(this.ifd0Offset,"ifd0");return 0!==t.size?(this.exifOffset=t.get(F),this.interopOffset=t.get(R),this.gpsOffset=t.get(P),this.xmp=t.get(700),this.iptc=t.get(j),this.icc=t.get(z),this.options.sanitize&&(t.delete(F),t.delete(R),t.delete(P),t.delete(700),t.delete(j),t.delete(z)),t):void 0}async parseExifBlock(){if(this.exif)return;if(this.ifd0||await this.parseIfd0Block(),void 0===this.exifOffset)return;this.file.tiff&&await this.file.ensureChunk(this.exifOffset,d(this.options));let e=this.parseBlock(this.exifOffset,"exif");return this.interopOffset||(this.interopOffset=e.get(R)),this.makerNote=e.get(I),this.userComment=e.get(L),this.options.sanitize&&(e.delete(R),e.delete(I),e.delete(L)),this.unpack(e,41728),this.unpack(e,41729),e}unpack(e,t){let n=e.get(t);n&&1===n.length&&e.set(t,n[0])}async parseGpsBlock(){if(this.gps)return;if(this.ifd0||await this.parseIfd0Block(),void 0===this.gpsOffset)return;let e=this.parseBlock(this.gpsOffset,"gps");return e&&e.has(2)&&e.has(4)&&(e.set("latitude",he(...e.get(2),e.get(1))),e.set("longitude",he(...e.get(4),e.get(3)))),e}async parseInteropBlock(){if(!this.interop&&(this.ifd0||await this.parseIfd0Block(),void 0!==this.interopOffset||this.exif||await this.parseExifBlock(),void 0!==this.interopOffset))return this.parseBlock(this.interopOffset,"interop")}async parseThumbnailBlock(e=!1){if(!this.ifd1&&!this.ifd1Parsed&&(!this.options.mergeOutput||e))return this.findIfd1Offset(),this.ifd1Offset>0&&(this.parseBlock(this.ifd1Offset,"ifd1"),this.ifd1Parsed=!0),this.ifd1}async extractThumbnail(){if(this.headerParsed||this.parseHeader(),this.ifd1Parsed||await this.parseThumbnailBlock(!0),void 0===this.ifd1)return;let e=this.ifd1.get(513),t=this.ifd1.get(514);return this.chunk.getUint8Array(e,t)}get image(){return this.ifd0}get thumbnail(){return this.ifd1}createOutput(){let e,t,n,r={};for(t of H)if(e=this[t],!c(e))if(n=this.canTranslate?this.translateBlock(e,t):Object.fromEntries(e),this.options.mergeOutput){if("ifd1"===t)continue;Object.assign(r,n)}else r[t]=n;return this.makerNote&&(r.makerNote=this.makerNote),this.userComment&&(r.userComment=this.userComment),r}assignToOutput(e,t){if(this.globalOptions.mergeOutput)Object.assign(e,t);else for(let[n,r]of Object.entries(t))this.assignObjectToOutput(e,n,r)}}function he(e,t,n,r){var i=e+t/60+n/3600;return"S"!==r&&"W"!==r||(i*=-1),i}t(pe,"type","tiff"),t(pe,"headerLength",10),y.set("tiff",pe);var fe=Object.freeze({__proto__:null,default:ie,Exifr:ne,fileParsers:b,segmentParsers:y,fileReaders:v,tagKeys:T,tagValues:S,tagRevivers:A,createDictionary:O,extendDictionary:N,fetchUrlAsArrayBuffer:_,readBlobAsArrayBuffer:D,chunkedProps:B,otherSegments:U,segments:$,tiffBlocks:H,segmentsAndBlocks:W,tiffExtractables:V,inheritables:q,allFormatters:Y,Options:J,parse:re});const me={ifd0:!1,ifd1:!1,exif:!1,gps:!1,interop:!1,sanitize:!1,reviveValues:!0,translateKeys:!1,translateValues:!1,mergeOutput:!1},ge=Object.assign({},me,{firstChunkSize:4e4,gps:[1,2,3,4]}),be=Object.assign({},me,{tiff:!1,ifd1:!0,mergeOutput:!1}),ye=Object.assign({},me,{firstChunkSize:4e4,ifd0:[274]});async function ve(e){let t=new ne(ye);await t.read(e);let n=await t.parse();if(n&&n.ifd0)return n.ifd0[274]}const we=Object.freeze({1:{dimensionSwapped:!1,scaleX:1,scaleY:1,deg:0,rad:0},2:{dimensionSwapped:!1,scaleX:-1,scaleY:1,deg:0,rad:0},3:{dimensionSwapped:!1,scaleX:1,scaleY:1,deg:180,rad:180*Math.PI/180},4:{dimensionSwapped:!1,scaleX:-1,scaleY:1,deg:180,rad:180*Math.PI/180},5:{dimensionSwapped:!0,scaleX:1,scaleY:-1,deg:90,rad:90*Math.PI/180},6:{dimensionSwapped:!0,scaleX:1,scaleY:1,deg:90,rad:90*Math.PI/180},7:{dimensionSwapped:!0,scaleX:1,scaleY:-1,deg:270,rad:270*Math.PI/180},8:{dimensionSwapped:!0,scaleX:1,scaleY:1,deg:270,rad:270*Math.PI/180}});if(e.rotateCanvas=!0,e.rotateCss=!0,"object"==typeof navigator){let t=navigator.userAgent;if(t.includes("iPad")||t.includes("iPhone")){let n=t.match(/OS (\d+)_(\d+)/);if(n){let[,t,r]=n,i=Number(t)+.1*Number(r);e.rotateCanvas=i<13.4,e.rotateCss=!1}}else if(t.includes("OS X 10")){let[,n]=t.match(/OS X 10[_.](\d+)/);e.rotateCanvas=e.rotateCss=Number(n)<15}if(t.includes("Chrome/")){let[,n]=t.match(/Chrome\/(\d+)/);e.rotateCanvas=e.rotateCss=Number(n)<81}else if(t.includes("Firefox/")){let[,n]=t.match(/Firefox\/(\d+)/);e.rotateCanvas=e.rotateCss=Number(n)<77}}class xe extends f{constructor(...e){super(...e),t(this,"ranges",new Ee),0!==this.byteLength&&this.ranges.add(0,this.byteLength)}_tryExtend(e,t,n){if(0===e&&0===this.byteLength&&n){let e=new DataView(n.buffer||n,n.byteOffset,n.byteLength);this._swapDataView(e)}else{let n=e+t;if(n>this.byteLength){let{dataView:e}=this._extend(n);this._swapDataView(e)}}}_extend(e){let t;t=a?s.allocUnsafe(e):new Uint8Array(e);let n=new DataView(t.buffer,t.byteOffset,t.byteLength);return t.set(new Uint8Array(this.buffer,this.byteOffset,this.byteLength),0),{uintView:t,dataView:n}}subarray(e,t,n=!1){return t=t||this._lengthToEnd(e),n&&this._tryExtend(e,t),this.ranges.add(e,t),super.subarray(e,t)}set(e,t,n=!1){n&&this._tryExtend(t,e.byteLength,e);let r=super.set(e,t);return this.ranges.add(t,r.byteLength),r}async ensureChunk(e,t){this.chunked&&(this.ranges.available(e,t)||await this.readChunk(e,t))}available(e,t){return this.ranges.available(e,t)}}class Ee{constructor(){t(this,"list",[])}get length(){return this.list.length}add(e,t,n=0){let r=e+t,i=this.list.filter((t=>Me(e,t.offset,r)||Me(e,t.end,r)));if(i.length>0){e=Math.min(e,...i.map((e=>e.offset))),r=Math.max(r,...i.map((e=>e.end))),t=r-e;let n=i.shift();n.offset=e,n.length=t,n.end=r,this.list=this.list.filter((e=>!i.includes(e)))}else this.list.push({offset:e,length:t,end:r})}available(e,t){let n=e+t;return this.list.some((t=>t.offset<=e&&n<=t.end))}}function Me(e,t,n){return e<=t&&t<=n}class ke extends xe{constructor(e,n){super(0),t(this,"chunksRead",0),this.input=e,this.options=n}async readWhole(){this.chunked=!1,await this.readChunk(this.nextChunkOffset)}async readChunked(){this.chunked=!0,await this.readChunk(0,this.options.firstChunkSize)}async readNextChunk(e=this.nextChunkOffset){if(this.fullyRead)return this.chunksRead++,!1;let t=this.options.chunkSize,n=await this.readChunk(e,t);return!!n&&n.byteLength===t}async readChunk(e,t){if(this.chunksRead++,0!==(t=this.safeWrapAddress(e,t)))return this._readChunk(e,t)}safeWrapAddress(e,t){return void 0!==this.size&&e+t>this.size?Math.max(0,this.size-e):t}get nextChunkOffset(){if(0!==this.ranges.list.length)return this.ranges.list[0].length}get canReadNextChunk(){return this.chunksRead<this.options.chunkLimit}get fullyRead(){return void 0!==this.size&&this.nextChunkOffset===this.size}read(){return this.options.chunked?this.readChunked():this.readWhole()}close(){}}v.set("blob",class extends ke{async readWhole(){this.chunked=!1;let e=await D(this.input);this._swapArrayBuffer(e)}readChunked(){return this.chunked=!0,this.size=this.input.size,super.readChunked()}async _readChunk(e,t){let n=t?e+t:void 0,r=this.input.slice(e,n),i=await D(r);return this.set(i,e,!0)}}),e.Exifr=ne,e.Options=J,e.allFormatters=Y,e.chunkedProps=B,e.createDictionary=O,e.default=fe,e.extendDictionary=N,e.fetchUrlAsArrayBuffer=_,e.fileParsers=b,e.fileReaders=v,e.gps=async function(e){let t=new ne(ge);await t.read(e);let n=await t.parse();if(n&&n.gps){let{latitude:e,longitude:t}=n.gps;return{latitude:e,longitude:t}}},e.gpsOnlyOptions=ge,e.inheritables=q,e.orientation=ve,e.orientationOnlyOptions=ye,e.otherSegments=U,e.parse=re,e.readBlobAsArrayBuffer=D,e.rotation=async function(t){let n=await ve(t);return Object.assign({canvas:e.rotateCanvas,css:e.rotateCss},we[n])},e.rotations=we,e.segmentParsers=y,e.segments=$,e.segmentsAndBlocks=W,e.tagKeys=T,e.tagRevivers=A,e.tagValues=S,e.thumbnail=async function(e){let t=new ne(be);await t.read(e);let n=await t.extractThumbnail();return n&&a?s.from(n):n},e.thumbnailOnlyOptions=be,e.thumbnailUrl=async function(e){let t=await this.thumbnail(e);if(void 0!==t){let e=new Blob([t]);return URL.createObjectURL(e)}},e.tiffBlocks=H,e.tiffExtractables=V,Object.defineProperty(e,"__esModule",{value:!0})}(EM.exports);const MM=/^data:([^/]+\/[^,;]+(?:[^,]*?))(;base64)?,([\s\S]*)$/;var kM=function(e,t,n){var r,i;const o=MM.exec(e),s=null!=(r=null!=(i=t.mimeType)?i:null==o?void 0:o[1])?r:"plain/text";let a;if(null!=o[2]){const e=atob(decodeURIComponent(o[3])),t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);a=[t]}else a=[decodeURIComponent(o[3])];return n?new File(a,t.name||"",{type:s}):new Blob(a,{type:s})};var _M=hv.exports,DM=EM.exports;const CM=kM,OM=function(e){return e.startsWith("blob:")},NM=function(e){return!!e&&/^[^/]+\/(jpe?g|gif|png|svg|svg\+xml|bmp|webp|avif)$/.test(e)},TM={strings:{generatingThumbnails:"Generating thumbnails..."}};class SM extends _M.UIPlugin{constructor(e,t){super(e,t),this.onFileAdded=e=>{!e.preview&&e.data&&NM(e.type)&&!e.isRemote&&this.addToQueue(e.id)},this.onCancelRequest=e=>{const t=this.queue.indexOf(e.id);-1!==t&&this.queue.splice(t,1)},this.onFileRemoved=e=>{const t=this.queue.indexOf(e.id);-1!==t&&this.queue.splice(t,1),e.preview&&OM(e.preview)&&URL.revokeObjectURL(e.preview)},this.onRestored=()=>{this.uppy.getFiles().filter((e=>e.isRestored)).forEach((e=>{e.preview&&!OM(e.preview)||this.addToQueue(e.id)}))},this.onAllFilesRemoved=()=>{this.queue=[]},this.waitUntilAllProcessed=e=>{e.forEach((e=>{const t=this.uppy.getFile(e);this.uppy.emit("preprocess-progress",t,{mode:"indeterminate",message:this.i18n("generatingThumbnails")})}));const t=()=>{e.forEach((e=>{const t=this.uppy.getFile(e);this.uppy.emit("preprocess-complete",t)}))};return new Promise((e=>{this.queueProcessing?this.uppy.once("thumbnail:all-generated",(()=>{t(),e()})):(t(),e())}))},this.type="modifier",this.id=this.opts.id||"ThumbnailGenerator",this.title="Thumbnail Generator",this.queue=[],this.queueProcessing=!1,this.defaultThumbnailDimension=200,this.thumbnailType=this.opts.thumbnailType||"image/jpeg",this.defaultLocale=TM;if(this.opts={thumbnailWidth:null,thumbnailHeight:null,waitForThumbnailsBeforeUpload:!1,lazy:!1,...t},this.i18nInit(),this.opts.lazy&&this.opts.waitForThumbnailsBeforeUpload)throw new Error("ThumbnailGenerator: The `lazy` and `waitForThumbnailsBeforeUpload` options are mutually exclusive. Please ensure at most one of them is set to `true`.")}createThumbnail(e,t,n){const r=URL.createObjectURL(e.data),i=new Promise(((e,t)=>{const n=new Image;n.src=r,n.addEventListener("load",(()=>{URL.revokeObjectURL(r),e(n)})),n.addEventListener("error",(e=>{URL.revokeObjectURL(r),t(e.error||new Error("Could not create thumbnail"))}))})),o=(0,DM.rotation)(e.data).catch((()=>1));return Promise.all([i,o]).then((e=>{let[r,i]=e;const o=this.getProportionalDimensions(r,t,n,i.deg),s=this.rotateImage(r,i),a=this.resizeImage(s,o.width,o.height);return this.canvasToBlob(a,this.thumbnailType,80)})).then((e=>URL.createObjectURL(e)))}getProportionalDimensions(e,t,n,r){let i=e.width/e.height;return 90!==r&&270!==r||(i=e.height/e.width),null!=t?{width:t,height:Math.round(t/i)}:null!=n?{width:Math.round(n*i),height:n}:{width:this.defaultThumbnailDimension,height:Math.round(this.defaultThumbnailDimension/i)}}resizeImage(e,t,n){let r=this.protect(e),i=Math.ceil(Math.log2(r.width/t));i<1&&(i=1);let o=t*2**(i-1),s=n*2**(i-1);const a=2;for(;i--;){const e=document.createElement("canvas");e.width=o,e.height=s,e.getContext("2d").drawImage(r,0,0,o,s),r=e,o=Math.round(o/a),s=Math.round(s/a)}return r}setPreviewURL(e,t){this.uppy.setFileState(e,{preview:t})}addToQueue(e){this.queue.push(e),!1===this.queueProcessing&&this.processQueue()}processQueue(){if(this.queueProcessing=!0,this.queue.length>0){const e=this.uppy.getFile(this.queue.shift());return e?this.requestThumbnail(e).catch((()=>{})).then((()=>this.processQueue())):(this.uppy.log("[ThumbnailGenerator] file was removed before a thumbnail could be generated, but not removed from the queue. This is probably a bug","error"),Promise.resolve())}return this.queueProcessing=!1,this.uppy.log("[ThumbnailGenerator] Emptied thumbnail queue"),this.uppy.emit("thumbnail:all-generated"),Promise.resolve()}requestThumbnail(e){return NM(e.type)&&!e.isRemote?this.createThumbnail(e,this.opts.thumbnailWidth,this.opts.thumbnailHeight).then((t=>{this.setPreviewURL(e.id,t),this.uppy.log(`[ThumbnailGenerator] Generated thumbnail for ${e.id}`),this.uppy.emit("thumbnail:generated",this.uppy.getFile(e.id),t)})).catch((t=>{this.uppy.log(`[ThumbnailGenerator] Failed thumbnail for ${e.id}:`,"warning"),this.uppy.log(t,"warning"),this.uppy.emit("thumbnail:error",this.uppy.getFile(e.id),t)})):Promise.resolve()}install(){this.uppy.on("file-removed",this.onFileRemoved),this.uppy.on("cancel-all",this.onAllFilesRemoved),this.opts.lazy?(this.uppy.on("thumbnail:request",this.onFileAdded),this.uppy.on("thumbnail:cancel",this.onCancelRequest)):(this.uppy.on("file-added",this.onFileAdded),this.uppy.on("restored",this.onRestored)),this.opts.waitForThumbnailsBeforeUpload&&this.uppy.addPreProcessor(this.waitUntilAllProcessed)}uninstall(){this.uppy.off("file-removed",this.onFileRemoved),this.uppy.off("cancel-all",this.onAllFilesRemoved),this.opts.lazy?(this.uppy.off("thumbnail:request",this.onFileAdded),this.uppy.off("thumbnail:cancel",this.onCancelRequest)):(this.uppy.off("file-added",this.onFileAdded),this.uppy.off("restored",this.onRestored)),this.opts.waitForThumbnailsBeforeUpload&&this.uppy.removePreProcessor(this.waitUntilAllProcessed)}}SM.VERSION="2.2.0";var AM=SM;SM.prototype.canvasToBlob=function(e,t,n){try{e.getContext("2d").getImageData(0,0,1,1)}catch(e){if(18===e.code)return Promise.reject(new Error("cannot read image, probably an svg with external resources"))}return e.toBlob?new Promise((r=>{e.toBlob(r,t,n)})).then((e=>{if(null===e)throw new Error("cannot read image, probably an svg with external resources");return e})):Promise.resolve().then((()=>CM(e.toDataURL(t,n),{}))).then((e=>{if(null===e)throw new Error("could not extract blob, probably an old browser");return e}))},SM.prototype.protect=function(e){const t=e.width/e.height,n=5e6,r=4096;let i=Math.floor(Math.sqrt(n*t)),o=Math.floor(n/Math.sqrt(n*t));if(i>r&&(i=r,o=Math.round(i/t)),o>r&&(o=r,i=Math.round(t*o)),e.width>i){const t=document.createElement("canvas");return t.width=i,t.height=o,t.getContext("2d").drawImage(e,0,0,i,o),t}return e},SM.prototype.rotateImage=function(e,t){let n=e.width,r=e.height;90!==t.deg&&270!==t.deg||(n=e.height,r=e.width);const i=document.createElement("canvas");i.width=n,i.height=r;const o=i.getContext("2d");return o.translate(n/2,r/2),t.canvas&&(o.rotate(t.rad),o.scale(t.scaleX,t.scaleY)),o.drawImage(e,-e.width/2,-e.height/2,e.width,e.height),i};const IM=Yx;var LM=function(e){if("string"==typeof e){const t=document.querySelectorAll(e);return 0===t.length?null:Array.from(t)}return"object"==typeof e&&IM(e)?[e]:null};var jM=function e(t,n,r,i){let{onSuccess:o}=i;t.readEntries((i=>{const s=[...n,...i];i.length?setTimeout((()=>{e(t,s,r,{onSuccess:o})}),0):o(s)}),(e=>{r(e),o(n)}))};const zM=function(e){return e.fullPath&&e.fullPath!==`/${e.name}`?e.fullPath:null},FM=jM,PM=pE;var RM=function(e,t){const n=[],r=[],i=e=>new Promise((r=>{if(e.isFile)e.file((t=>{t.relativePath=zM(e),n.push(t),r()}),(e=>{t(e),r()}));else if(e.isDirectory){const n=e.createReader();FM(n,[],t,{onSuccess:e=>r(Promise.all(e.map(i)))})}}));return PM(e.items).forEach((e=>{const t=e.webkitGetAsEntry();t&&r.push(i(t))})),Promise.all(r).then((()=>n))};const BM=pE;const UM=RM,$M=function(e){const t=BM(e.files);return Promise.resolve(t)};var HM=function(e,t){var n;let{logDropError:r=(()=>{})}=void 0===t?{}:t;return null!=(n=e.items)&&n[0]&&"webkitGetAsEntry"in e.items[0]?UM(e,r):$M(e)},WM=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function VM(e,t){return e===t||!(!WM(e)||!WM(t))}function qM(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!VM(e[n],t[n]))return!1;return!0}var YM=Object.freeze({__proto__:null,default:function(e,t){var n;void 0===t&&(t=qM);var r,i=[],o=!1;return function(){for(var s=[],a=0;a<arguments.length;a++)s[a]=arguments[a];return o&&n===this&&t(s,i)||(r=e.apply(this,s),o=!0,n=this,i=s),r}}}),KM=Oc(YM),QM="Expected a function",GM=0/0,ZM="[object Symbol]",JM=/^\s+|\s+$/g,XM=/^[-+]0x[0-9a-f]+$/i,ek=/^0b[01]+$/i,tk=/^0o[0-7]+$/i,nk=parseInt,rk="object"==typeof Dc&&Dc&&Dc.Object===Object&&Dc,ik="object"==typeof self&&self&&self.Object===Object&&self,ok=rk||ik||Function("return this")(),sk=Object.prototype.toString,ak=Math.max,lk=Math.min,ck=function(){return ok.Date.now()};function uk(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function dk(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&sk.call(e)==ZM}(e))return GM;if(uk(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=uk(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(JM,"");var n=ek.test(e);return n||tk.test(e)?nk(e.slice(2),n?2:8):XM.test(e)?GM:+e}var pk=function(e,t,n){var r,i,o,s,a,l,c=0,u=!1,d=!1,p=!0;if("function"!=typeof e)throw new TypeError(QM);function h(t){var n=r,o=i;return r=i=void 0,c=t,s=e.apply(o,n)}function f(e){return c=e,a=setTimeout(g,t),u?h(e):s}function m(e){var n=e-l;return void 0===l||n>=t||n<0||d&&e-c>=o}function g(){var e=ck();if(m(e))return b(e);a=setTimeout(g,function(e){var n=t-(e-l);return d?lk(n,o-(e-c)):n}(e))}function b(e){return a=void 0,p&&r?h(e):(r=i=void 0,s)}function y(){var e=ck(),n=m(e);if(r=arguments,i=this,l=e,n){if(void 0===a)return f(l);if(d)return a=setTimeout(g,t),h(l)}return void 0===a&&(a=setTimeout(g,t)),s}return t=dk(t)||0,uk(n)&&(u=!!n.leading,o=(d="maxWait"in n)?ak(dk(n.maxWait)||0,t):o,p="trailing"in n?!!n.trailing:p),y.cancel=function(){void 0!==a&&clearTimeout(a),c=0,r=l=i=a=void 0},y.flush=function(){return void 0===a?s:b(ck())},y};const hk=pk,fk=hE,mk=fE;var gk=function(){let e=!1;return hk(((t,n)=>{const r=mk(t,n),i=r.contains(document.activeElement);if(i&&e)return;const o=r.querySelector("[data-uppy-super-focusable]");if(!i||o)if(o)o.focus({preventScroll:!0}),e=!0;else{const t=r.querySelector(fk);null==t||t.focus({preventScroll:!0}),e=!1}}),260)};var bk=function(){const e=document.body;return"draggable"in e&&"ondragstart"in e&&"ondrop"in e&&("FormData"in window&&"FileReader"in window)},yk=qx;var vk=function(e){const t={color:"#838999",icon:(0,yk.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"25",height:"25",viewBox:"0 0 25 25"},(0,yk.h)("g",{fill:"#A7AFB7",fillRule:"nonzero"},(0,yk.h)("path",{d:"M5.5 22a.5.5 0 0 1-.5-.5v-18a.5.5 0 0 1 .5-.5h10.719a.5.5 0 0 1 .367.16l3.281 3.556a.5.5 0 0 1 .133.339V21.5a.5.5 0 0 1-.5.5h-14zm.5-1h13V7.25L16 4H6v17z"}),(0,yk.h)("path",{d:"M15 4v3a1 1 0 0 0 1 1h3V7h-3V4h-1z"})))};if(!e)return t;const n=e.split("/")[0],r=e.split("/")[1];return"text"===n?{color:"#5a5e69",icon:(0,yk.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"25",height:"25",viewBox:"0 0 25 25"},(0,yk.h)("path",{d:"M4.5 7h13a.5.5 0 1 1 0 1h-13a.5.5 0 0 1 0-1zm0 3h15a.5.5 0 1 1 0 1h-15a.5.5 0 1 1 0-1zm0 3h15a.5.5 0 1 1 0 1h-15a.5.5 0 1 1 0-1zm0 3h10a.5.5 0 1 1 0 1h-10a.5.5 0 1 1 0-1z",fill:"#5A5E69",fillRule:"nonzero"}))}:"image"===n?{color:"#686de0",icon:(0,yk.h)("svg",{"aria-hidden":"true",focusable:"false",width:"25",height:"25",viewBox:"0 0 25 25"},(0,yk.h)("g",{fill:"#686DE0",fillRule:"evenodd"},(0,yk.h)("path",{d:"M5 7v10h15V7H5zm0-1h15a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1z",fillRule:"nonzero"}),(0,yk.h)("path",{d:"M6.35 17.172l4.994-5.026a.5.5 0 0 1 .707 0l2.16 2.16 3.505-3.505a.5.5 0 0 1 .707 0l2.336 2.31-.707.72-1.983-1.97-3.505 3.505a.5.5 0 0 1-.707 0l-2.16-2.159-3.938 3.939-1.409.026z",fillRule:"nonzero"}),(0,yk.h)("circle",{cx:"7.5",cy:"9.5",r:"1.5"})))}:"audio"===n?{color:"#068dbb",icon:(0,yk.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"25",height:"25",viewBox:"0 0 25 25"},(0,yk.h)("path",{d:"M9.5 18.64c0 1.14-1.145 2-2.5 2s-2.5-.86-2.5-2c0-1.14 1.145-2 2.5-2 .557 0 1.079.145 1.5.396V7.25a.5.5 0 0 1 .379-.485l9-2.25A.5.5 0 0 1 18.5 5v11.64c0 1.14-1.145 2-2.5 2s-2.5-.86-2.5-2c0-1.14 1.145-2 2.5-2 .557 0 1.079.145 1.5.396V8.67l-8 2v7.97zm8-11v-2l-8 2v2l8-2zM7 19.64c.855 0 1.5-.484 1.5-1s-.645-1-1.5-1-1.5.484-1.5 1 .645 1 1.5 1zm9-2c.855 0 1.5-.484 1.5-1s-.645-1-1.5-1-1.5.484-1.5 1 .645 1 1.5 1z",fill:"#049BCF",fillRule:"nonzero"}))}:"video"===n?{color:"#19af67",icon:(0,yk.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"25",height:"25",viewBox:"0 0 25 25"},(0,yk.h)("path",{d:"M16 11.834l4.486-2.691A1 1 0 0 1 22 10v6a1 1 0 0 1-1.514.857L16 14.167V17a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v2.834zM15 9H5v8h10V9zm1 4l5 3v-6l-5 3z",fill:"#19AF67",fillRule:"nonzero"}))}:"application"===n&&"pdf"===r?{color:"#e25149",icon:(0,yk.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"25",height:"25",viewBox:"0 0 25 25"},(0,yk.h)("path",{d:"M9.766 8.295c-.691-1.843-.539-3.401.747-3.726 1.643-.414 2.505.938 2.39 3.299-.039.79-.194 1.662-.537 3.148.324.49.66.967 1.055 1.51.17.231.382.488.629.757 1.866-.128 3.653.114 4.918.655 1.487.635 2.192 1.685 1.614 2.84-.566 1.133-1.839 1.084-3.416.249-1.141-.604-2.457-1.634-3.51-2.707a13.467 13.467 0 0 0-2.238.426c-1.392 4.051-4.534 6.453-5.707 4.572-.986-1.58 1.38-4.206 4.914-5.375.097-.322.185-.656.264-1.001.08-.353.306-1.31.407-1.737-.678-1.059-1.2-2.031-1.53-2.91zm2.098 4.87c-.033.144-.068.287-.104.427l.033-.01-.012.038a14.065 14.065 0 0 1 1.02-.197l-.032-.033.052-.004a7.902 7.902 0 0 1-.208-.271c-.197-.27-.38-.526-.555-.775l-.006.028-.002-.003c-.076.323-.148.632-.186.8zm5.77 2.978c1.143.605 1.832.632 2.054.187.26-.519-.087-1.034-1.113-1.473-.911-.39-2.175-.608-3.55-.608.845.766 1.787 1.459 2.609 1.894zM6.559 18.789c.14.223.693.16 1.425-.413.827-.648 1.61-1.747 2.208-3.206-2.563 1.064-4.102 2.867-3.633 3.62zm5.345-10.97c.088-1.793-.351-2.48-1.146-2.28-.473.119-.564 1.05-.056 2.405.213.566.52 1.188.908 1.859.18-.858.268-1.453.294-1.984z",fill:"#E2514A",fillRule:"nonzero"}))}:"application"===n&&-1!==["zip","x-7z-compressed","x-rar-compressed","x-tar","x-gzip","x-apple-diskimage"].indexOf(r)?{color:"#00C469",icon:(0,yk.h)("svg",{"aria-hidden":"true",focusable:"false",width:"25",height:"25",viewBox:"0 0 25 25"},(0,yk.h)("path",{d:"M10.45 2.05h1.05a.5.5 0 0 1 .5.5v.024a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5V2.55a.5.5 0 0 1 .5-.5zm2.05 1.024h1.05a.5.5 0 0 1 .5.5V3.6a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5v-.001zM10.45 0h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5V.5a.5.5 0 0 1 .5-.5zm2.05 1.025h1.05a.5.5 0 0 1 .5.5v.024a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.024a.5.5 0 0 1 .5-.5zm-2.05 3.074h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5zm2.05 1.025h1.05a.5.5 0 0 1 .5.5v.024a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.024a.5.5 0 0 1 .5-.5zm-2.05 1.024h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5zm2.05 1.025h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5zm-2.05 1.025h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5zm2.05 1.025h1.05a.5.5 0 0 1 .5.5v.024a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.024a.5.5 0 0 1 .5-.5zm-1.656 3.074l-.82 5.946c.52.302 1.174.458 1.976.458.803 0 1.455-.156 1.975-.458l-.82-5.946h-2.311zm0-1.025h2.312c.512 0 .946.378 1.015.885l.82 5.946c.056.412-.142.817-.501 1.026-.686.398-1.515.597-2.49.597-.974 0-1.804-.199-2.49-.597a1.025 1.025 0 0 1-.5-1.026l.819-5.946c.07-.507.503-.885 1.015-.885zm.545 6.6a.5.5 0 0 1-.397-.561l.143-.999a.5.5 0 0 1 .495-.429h.74a.5.5 0 0 1 .495.43l.143.998a.5.5 0 0 1-.397.561c-.404.08-.819.08-1.222 0z",fill:"#00C469",fillRule:"nonzero"}))}:t},wk=qx;const xk=vk;var Ek=function(e){const{file:t}=e;if(t.preview)return(0,wk.h)("img",{className:"uppy-Dashboard-Item-previewImg",alt:t.name,src:t.preview});const{color:n,icon:r}=xk(t.type);return(0,wk.h)("div",{className:"uppy-Dashboard-Item-previewIconWrap"},(0,wk.h)("span",{className:"uppy-Dashboard-Item-previewIcon",style:{color:n}},r),(0,wk.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-Dashboard-Item-previewIconBg",width:"58",height:"76",viewBox:"0 0 58 76"},(0,wk.h)("rect",{fill:"#FFF",width:"58",height:"76",rx:"3",fillRule:"evenodd"})))},Mk=qx;var kk=function(e){const{file:t,toggleFileCard:n,i18n:r,metaFields:i}=e,{missingRequiredMetaFields:o}=t;if(null==o||!o.length)return null;const s=o.map((e=>((e,t)=>{const n=t.filter((t=>t.id===e));return n[0].name})(e,i))).join(", ");return(0,Mk.h)("div",{className:"uppy-Dashboard-Item-errorMessage"},r("missingRequiredMetaFields",{smart_count:o.length,fields:s})," ",(0,Mk.h)("button",{type:"button",class:"uppy-u-reset uppy-Dashboard-Item-errorMessageBtn",onClick:()=>n(!0,t.id)},r("editFile")))},_k=qx;const Dk=Ek,Ck=kk,Ok=vk;var Nk=qx;function Tk(e){return e.isUploaded?e.i18n("uploadComplete"):e.error?e.i18n("retryUpload"):e.resumableUploads?e.file.isPaused?e.i18n("resumeUpload"):e.i18n("pauseUpload"):e.individualCancellation?e.i18n("cancelUpload"):""}function Sk(e){return(0,Nk.h)("div",{className:"uppy-Dashboard-Item-progress"},(0,Nk.h)("button",{className:"uppy-u-reset uppy-Dashboard-Item-progressIndicator",type:"button","aria-label":Tk(e),title:Tk(e),onClick:()=>function(e){e.isUploaded||(!e.error||e.hideRetryButton?e.resumableUploads&&!e.hidePauseResumeButton?e.uppy.pauseResume(e.file.id):e.individualCancellation&&!e.hideCancelButton&&e.uppy.removeFile(e.file.id):e.uppy.retryUpload(e.file.id))}(e)},e.children))}function Ak(e){let{children:t}=e;return(0,Nk.h)("svg",{"aria-hidden":"true",focusable:"false",width:"70",height:"70",viewBox:"0 0 36 36",className:"uppy-c-icon uppy-Dashboard-Item-progressIcon--circle"},t)}function Ik(e){let{progress:t}=e;const n=2*Math.PI*15;return(0,Nk.h)("g",null,(0,Nk.h)("circle",{className:"uppy-Dashboard-Item-progressIcon--bg",r:"15",cx:"18",cy:"18","stroke-width":"2",fill:"none"}),(0,Nk.h)("circle",{className:"uppy-Dashboard-Item-progressIcon--progress",r:"15",cx:"18",cy:"18",transform:"rotate(-90, 18, 18)",fill:"none","stroke-width":"2","stroke-dasharray":n,"stroke-dashoffset":n-n/100*t}))}const Lk="...";var jk=qx;const zk=Mv,Fk=function(e,t){if(0===t)return"";if(e.length<=t)return e;if(t<=Lk.length+1)return`${e.slice(0,t-1)}…`;const n=t-Lk.length,r=Math.ceil(n/2),i=Math.floor(n/2);return e.slice(0,r)+Lk+e.slice(-i)},Pk=kk,Rk=e=>{let{file:t,onClick:n}=e;return t.error?(0,jk.h)("button",{className:"uppy-u-reset uppy-Dashboard-Item-errorDetails","aria-label":t.error,"data-microtip-position":"bottom","data-microtip-size":"medium",onClick:n,type:"button"},"?"):null};var Bk=qx;const Uk=function(e,t){return t||(t="Copy the URL below"),new Promise((n=>{const r=document.createElement("textarea");r.setAttribute("style",{position:"fixed",top:0,left:0,width:"2em",height:"2em",padding:0,border:"none",outline:"none",boxShadow:"none",background:"transparent"}),r.value=e,document.body.appendChild(r),r.select();const i=()=>{document.body.removeChild(r),window.prompt(t,e),n()};try{return document.execCommand("copy")?(document.body.removeChild(r),n()):i()}catch(e){return document.body.removeChild(r),i()}}))};function $k(e){let{file:t,uploadInProgressOrComplete:n,metaFields:r,canEditFile:i,i18n:o,onClick:s}=e;return!n&&r&&r.length>0||!n&&i(t)?(0,Bk.h)("button",{className:"uppy-u-reset uppy-Dashboard-Item-action uppy-Dashboard-Item-action--edit",type:"button","aria-label":o("editFileWithFilename",{file:t.meta.name}),title:o("editFileWithFilename",{file:t.meta.name}),onClick:()=>s()},(0,Bk.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"14",height:"14",viewBox:"0 0 14 14"},(0,Bk.h)("g",{fillRule:"evenodd"},(0,Bk.h)("path",{d:"M1.5 10.793h2.793A1 1 0 0 0 5 10.5L11.5 4a1 1 0 0 0 0-1.414L9.707.793a1 1 0 0 0-1.414 0l-6.5 6.5A1 1 0 0 0 1.5 8v2.793zm1-1V8L9 1.5l1.793 1.793-6.5 6.5H2.5z",fillRule:"nonzero"}),(0,Bk.h)("rect",{x:"1",y:"12.293",width:"11",height:"1",rx:".5"}),(0,Bk.h)("path",{fillRule:"nonzero",d:"M6.793 2.5L9.5 5.207l.707-.707L7.5 1.793z"})))):null}function Hk(e){let{i18n:t,onClick:n,file:r}=e;return(0,Bk.h)("button",{className:"uppy-u-reset uppy-Dashboard-Item-action uppy-Dashboard-Item-action--remove",type:"button","aria-label":t("removeFile",{file:r.meta.name}),title:t("removeFile",{file:r.meta.name}),onClick:()=>n()},(0,Bk.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"18",height:"18",viewBox:"0 0 18 18"},(0,Bk.h)("path",{d:"M9 0C4.034 0 0 4.034 0 9s4.034 9 9 9 9-4.034 9-9-4.034-9-9-9z"}),(0,Bk.h)("path",{fill:"#FFF",d:"M13 12.222l-.778.778L9 9.778 5.778 13 5 12.222 8.222 9 5 5.778 5.778 5 9 8.222 12.222 5l.778.778L9.778 9z"})))}function Wk(e){const{i18n:t}=e;return(0,Bk.h)("button",{className:"uppy-u-reset uppy-Dashboard-Item-action uppy-Dashboard-Item-action--copyLink",type:"button","aria-label":t("copyLink"),title:t("copyLink"),onClick:t=>((e,t)=>{Uk(t.file.uploadURL,t.i18n("copyLinkToClipboardFallback")).then((()=>{t.uppy.log("Link copied to clipboard."),t.uppy.info(t.i18n("copyLinkToClipboardSuccess"),"info",3e3)})).catch(t.uppy.log).then((()=>e.target.focus({preventScroll:!0})))})(t,e)},(0,Bk.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"14",height:"14",viewBox:"0 0 14 12"},(0,Bk.h)("path",{d:"M7.94 7.703a2.613 2.613 0 0 1-.626 2.681l-.852.851a2.597 2.597 0 0 1-1.849.766A2.616 2.616 0 0 1 2.764 7.54l.852-.852a2.596 2.596 0 0 1 2.69-.625L5.267 7.099a1.44 1.44 0 0 0-.833.407l-.852.851a1.458 1.458 0 0 0 1.03 2.486c.39 0 .755-.152 1.03-.426l.852-.852c.231-.231.363-.522.406-.824l1.04-1.038zm4.295-5.937A2.596 2.596 0 0 0 10.387 1c-.698 0-1.355.272-1.849.766l-.852.851a2.614 2.614 0 0 0-.624 2.688l1.036-1.036c.041-.304.173-.6.407-.833l.852-.852c.275-.275.64-.426 1.03-.426a1.458 1.458 0 0 1 1.03 2.486l-.852.851a1.442 1.442 0 0 1-.824.406l-1.04 1.04a2.596 2.596 0 0 0 2.683-.628l.851-.85a2.616 2.616 0 0 0 0-3.697zm-6.88 6.883a.577.577 0 0 0 .82 0l3.474-3.474a.579.579 0 1 0-.819-.82L5.355 7.83a.579.579 0 0 0 0 .819z"})))}var Vk=function(e){const{uppy:t,file:n,uploadInProgressOrComplete:r,canEditFile:i,metaFields:o,showLinkToFileUploadResult:s,showRemoveButton:a,i18n:l,toggleFileCard:c,openFileEditor:u}=e;return(0,Bk.h)("div",{className:"uppy-Dashboard-Item-actionWrapper"},(0,Bk.h)($k,{i18n:l,file:n,uploadInProgressOrComplete:r,canEditFile:i,metaFields:o,onClick:()=>{o&&o.length>0?c(!0,n.id):u(n)}}),s&&n.uploadURL?(0,Bk.h)(Wk,{file:n,uppy:t,i18n:l}):null,a?(0,Bk.h)(Hk,{i18n:l,file:n,uppy:t,onClick:()=>e.uppy.removeFile(n.id,"removed-by-user")}):null)},qk=qx;const Yk=Tc.exports,Kk=function(e,t){if(e===t)return!0;for(var n in e)if(!(n in t))return!1;for(var n in t)if(e[n]!==t[n])return!1;return!0},Qk=function(e){return(0,_k.h)("div",{className:"uppy-Dashboard-Item-previewInnerWrap",style:{backgroundColor:Ok(e.file.type).color}},e.showLinkToFileUploadResult&&e.file.uploadURL&&(0,_k.h)("a",{className:"uppy-Dashboard-Item-previewLink",href:e.file.uploadURL,rel:"noreferrer noopener",target:"_blank","aria-label":e.file.meta.name},(0,_k.h)("span",{hidden:!0},e.file.meta.name)),(0,_k.h)(Dk,{file:e.file}),(0,_k.h)(Ck,{file:e.file,i18n:e.i18n,toggleFileCard:e.toggleFileCard,metaFields:e.metaFields}))},Gk=function(e){return e.file.progress.uploadStarted?e.isUploaded?(0,Nk.h)("div",{className:"uppy-Dashboard-Item-progress"},(0,Nk.h)("div",{className:"uppy-Dashboard-Item-progressIndicator"},(0,Nk.h)(Ak,null,(0,Nk.h)("circle",{r:"15",cx:"18",cy:"18",fill:"#1bb240"}),(0,Nk.h)("polygon",{className:"uppy-Dashboard-Item-progressIcon--check",transform:"translate(2, 3)",points:"14 22.5 7 15.2457065 8.99985857 13.1732815 14 18.3547104 22.9729883 9 25 11.1005634"})))):e.recoveredState?void 0:e.error&&!e.hideRetryButton?(0,Nk.h)(Sk,e,(0,Nk.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon uppy-Dashboard-Item-progressIcon--retry",width:"28",height:"31",viewBox:"0 0 16 19"},(0,Nk.h)("path",{d:"M16 11a8 8 0 1 1-8-8v2a6 6 0 1 0 6 6h2z"}),(0,Nk.h)("path",{d:"M7.9 3H10v2H7.9z"}),(0,Nk.h)("path",{d:"M8.536.5l3.535 3.536-1.414 1.414L7.12 1.914z"}),(0,Nk.h)("path",{d:"M10.657 2.621l1.414 1.415L8.536 7.57 7.12 6.157z"}))):e.resumableUploads&&!e.hidePauseResumeButton?(0,Nk.h)(Sk,e,(0,Nk.h)(Ak,null,(0,Nk.h)(Ik,{progress:e.file.progress.percentage}),e.file.isPaused?(0,Nk.h)("polygon",{className:"uppy-Dashboard-Item-progressIcon--play",transform:"translate(3, 3)",points:"12 20 12 10 20 15"}):(0,Nk.h)("g",{className:"uppy-Dashboard-Item-progressIcon--pause",transform:"translate(14.5, 13)"},(0,Nk.h)("rect",{x:"0",y:"0",width:"2",height:"10",rx:"0"}),(0,Nk.h)("rect",{x:"5",y:"0",width:"2",height:"10",rx:"0"})))):e.resumableUploads||!e.individualCancellation||e.hideCancelButton?(0,Nk.h)("div",{className:"uppy-Dashboard-Item-progress"},(0,Nk.h)("div",{className:"uppy-Dashboard-Item-progressIndicator"},(0,Nk.h)(Ak,null,(0,Nk.h)(Ik,{progress:e.file.progress.percentage})))):(0,Nk.h)(Sk,e,(0,Nk.h)(Ak,null,(0,Nk.h)(Ik,{progress:e.file.progress.percentage}),(0,Nk.h)("polygon",{className:"cancel",transform:"translate(2, 2)",points:"19.8856516 11.0625 16 14.9481516 12.1019737 11.0625 11.0625 12.1143484 14.9481516 16 11.0625 19.8980263 12.1019737 20.9375 16 17.0518484 19.8856516 20.9375 20.9375 19.8980263 17.0518484 16 20.9375 12"}))):null},Zk=function(e){const{file:t}=e;return(0,jk.h)("div",{className:"uppy-Dashboard-Item-fileInfo","data-uppy-file-source":t.source},(0,jk.h)("div",{className:"uppy-Dashboard-Item-fileName"},(e=>{const{author:t,name:n}=e.file.meta;return(0,jk.h)("div",{className:"uppy-Dashboard-Item-name",title:n},Fk(n,e.containerWidth<=352?35:e.containerWidth<=576?60:t?20:30))})(e),(0,jk.h)(Rk,{file:e.file,onClick:()=>alert(e.file.error)})),(0,jk.h)("div",{className:"uppy-Dashboard-Item-status"},(e=>{const{author:t}=e.file.meta,{providerName:n}=e.file.remote,r=`·`;return t?(0,jk.h)("div",{className:"uppy-Dashboard-Item-author"},(0,jk.h)("a",{href:`${t.url}?utm_source=Companion&utm_medium=referral`,target:"_blank",rel:"noopener noreferrer"},Fk(t.name,13)),n?(0,jk.h)(jk.Fragment,null,` ${r} `,n,` ${r} `):null):null})(e),(e=>e.file.size&&(0,jk.h)("div",{className:"uppy-Dashboard-Item-statusSize"},zk(e.file.size)))(e),(e=>e.file.isGhost&&(0,jk.h)("span",null," • ",(0,jk.h)("button",{className:"uppy-u-reset uppy-c-btn uppy-Dashboard-Item-reSelect",type:"button",onClick:e.toggleAddFilesPanel},e.i18n("reSelect"))))(e)),(0,jk.h)(Pk,{file:e.file,i18n:e.i18n,toggleFileCard:e.toggleFileCard,metaFields:e.metaFields}))},Jk=Vk;class Xk extends qk.Component{componentDidMount(){const{file:e}=this.props;e.preview||this.props.handleRequestThumbnail(e)}shouldComponentUpdate(e){return!Kk(this.props,e)}componentDidUpdate(){const{file:e}=this.props;e.preview||this.props.handleRequestThumbnail(e)}componentWillUnmount(){const{file:e}=this.props;e.preview||this.props.handleCancelThumbnail(e)}render(){const{file:e}=this.props,t=e.progress.preprocess||e.progress.postprocess,n=e.progress.uploadComplete&&!t&&!e.error,r=e.progress.uploadStarted||t,i=e.progress.uploadStarted&&!e.progress.uploadComplete||t,o=e.error||!1,{isGhost:s}=e;let a=(this.props.individualCancellation||!i)&&!n;n&&this.props.showRemoveButtonAfterComplete&&(a=!0);const l=Yk({"uppy-Dashboard-Item":!0,"is-inprogress":i&&!this.props.recoveredState,"is-processing":t,"is-complete":n,"is-error":!!o,"is-resumable":this.props.resumableUploads,"is-noIndividualCancellation":!this.props.individualCancellation,"is-ghost":s});return(0,qk.h)("div",{className:l,id:`uppy_${e.id}`,role:this.props.role},(0,qk.h)("div",{className:"uppy-Dashboard-Item-preview"},(0,qk.h)(Qk,{file:e,showLinkToFileUploadResult:this.props.showLinkToFileUploadResult,i18n:this.props.i18n,toggleFileCard:this.props.toggleFileCard,metaFields:this.props.metaFields}),(0,qk.h)(Gk,{uppy:this.props.uppy,file:e,error:o,isUploaded:n,hideRetryButton:this.props.hideRetryButton,hideCancelButton:this.props.hideCancelButton,hidePauseResumeButton:this.props.hidePauseResumeButton,recoveredState:this.props.recoveredState,showRemoveButtonAfterComplete:this.props.showRemoveButtonAfterComplete,resumableUploads:this.props.resumableUploads,individualCancellation:this.props.individualCancellation,i18n:this.props.i18n})),(0,qk.h)("div",{className:"uppy-Dashboard-Item-fileInfoAndButtons"},(0,qk.h)(Zk,{file:e,id:this.props.id,acquirers:this.props.acquirers,containerWidth:this.props.containerWidth,i18n:this.props.i18n,toggleAddFilesPanel:this.props.toggleAddFilesPanel,toggleFileCard:this.props.toggleFileCard,metaFields:this.props.metaFields}),(0,qk.h)(Jk,{file:e,metaFields:this.props.metaFields,showLinkToFileUploadResult:this.props.showLinkToFileUploadResult,showRemoveButton:a,canEditFile:this.props.canEditFile,uploadInProgressOrComplete:r,toggleFileCard:this.props.toggleFileCard,openFileEditor:this.props.openFileEditor,uppy:this.props.uppy,i18n:this.props.i18n})))}}var e_=Xk,t_=qx;function n_(){return n_=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n_.apply(this,arguments)}const r_={position:"relative",width:"100%",minHeight:"100%"},i_={position:"absolute",top:0,left:0,width:"100%",overflow:"visible"};class o_ extends t_.Component{constructor(e){super(e),this.handleScroll=()=>{this.setState({offset:this.base.scrollTop})},this.handleResize=()=>{this.resize()},this.focusElement=null,this.state={offset:0,height:0}}componentDidMount(){this.resize(),window.addEventListener("resize",this.handleResize)}componentWillUpdate(){this.base.contains(document.activeElement)&&(this.focusElement=document.activeElement)}componentDidUpdate(){this.focusElement&&this.focusElement.parentNode&&document.activeElement!==this.focusElement&&this.focusElement.focus(),this.focusElement=null,this.resize()}componentWillUnmount(){window.removeEventListener("resize",this.handleResize)}resize(){const{height:e}=this.state;e!==this.base.offsetHeight&&this.setState({height:this.base.offsetHeight})}render(e){let{data:t,rowHeight:n,renderRow:r,overscanCount:i=10,...o}=e;const{offset:s,height:a}=this.state;let l=Math.floor(s/n),c=Math.floor(a/n);i&&(l=Math.max(0,l-l%i),c+=i);const u=l+c+4,d=t.slice(l,u),p={...r_,height:t.length*n},h={...i_,top:l*n};return(0,t_.h)("div",n_({onScroll:this.handleScroll},o),(0,t_.h)("div",{role:"presentation",style:p},(0,t_.h)("div",{role:"presentation",style:h},d.map(r))))}}var s_=qx;function a_(){return a_=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a_.apply(this,arguments)}const l_=Tc.exports,c_=e_,u_=o_;var d_=qx;let p_;p_=Symbol.for("uppy test: disable unused locale key warning");class h_ extends d_.Component{constructor(){super(...arguments),this.triggerFileInputClick=()=>{this.fileInput.click()},this.triggerFolderInputClick=()=>{this.folderInput.click()},this.onFileInputChange=e=>{this.props.handleInputChange(e),e.target.value=null},this.renderHiddenInput=(e,t)=>(0,d_.h)("input",{className:"uppy-Dashboard-input",hidden:!0,"aria-hidden":"true",tabIndex:-1,webkitdirectory:e,type:"file",name:"files[]",multiple:1!==this.props.maxNumberOfFiles,onChange:this.onFileInputChange,accept:this.props.allowedFileTypes,ref:t}),this.renderMyDeviceAcquirer=()=>(0,d_.h)("div",{className:"uppy-DashboardTab",role:"presentation","data-uppy-acquirer-id":"MyDevice"},(0,d_.h)("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-DashboardTab-btn",role:"tab",tabIndex:0,"data-uppy-super-focusable":!0,onClick:this.triggerFileInputClick},(0,d_.h)("svg",{"aria-hidden":"true",focusable:"false",width:"32",height:"32",viewBox:"0 0 32 32"},(0,d_.h)("g",{fill:"none",fillRule:"evenodd"},(0,d_.h)("rect",{className:"uppy-ProviderIconBg",width:"32",height:"32",rx:"16",fill:"#2275D7"}),(0,d_.h)("path",{d:"M21.973 21.152H9.863l-1.108-5.087h14.464l-1.246 5.087zM9.935 11.37h3.958l.886 1.444a.673.673 0 0 0 .585.316h6.506v1.37H9.935v-3.13zm14.898 3.44a.793.793 0 0 0-.616-.31h-.978v-2.126c0-.379-.275-.613-.653-.613H15.75l-.886-1.445a.673.673 0 0 0-.585-.316H9.232c-.378 0-.667.209-.667.587V14.5h-.782a.793.793 0 0 0-.61.303.795.795 0 0 0-.155.663l1.45 6.633c.078.36.396.618.764.618h13.354c.36 0 .674-.246.76-.595l1.631-6.636a.795.795 0 0 0-.144-.675z",fill:"#FFF"}))),(0,d_.h)("div",{className:"uppy-DashboardTab-name"},this.props.i18n("myDevice")))),this.renderBrowseButton=(e,t)=>{const n=this.props.acquirers.length;return(0,d_.h)("button",{type:"button",className:"uppy-u-reset uppy-Dashboard-browse",onClick:t,"data-uppy-super-focusable":0===n},e)},this.renderDropPasteBrowseTagline=()=>{const e=this.props.acquirers.length,t=this.renderBrowseButton(this.props.i18n("browseFiles"),this.triggerFileInputClick),n=this.renderBrowseButton(this.props.i18n("browseFolders"),this.triggerFolderInputClick),r=this.props.fileManagerSelectionType,i=r.charAt(0).toUpperCase()+r.slice(1);return(0,d_.h)("div",{class:"uppy-Dashboard-AddFiles-title"},this.props.disableLocalFiles?this.props.i18n("importFiles"):e>0?this.props.i18nArray(`dropPasteImport${i}`,{browseFiles:t,browseFolders:n,browse:t}):this.props.i18nArray(`dropPaste${i}`,{browseFiles:t,browseFolders:n,browse:t}))},this.renderAcquirer=e=>(0,d_.h)("div",{className:"uppy-DashboardTab",role:"presentation","data-uppy-acquirer-id":e.id},(0,d_.h)("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-DashboardTab-btn",role:"tab",tabIndex:0,"data-cy":e.id,"aria-controls":`uppy-DashboardContent-panel--${e.id}`,"aria-selected":this.props.activePickerPanel.id===e.id,"data-uppy-super-focusable":!0,onClick:()=>this.props.showPanel(e.id)},e.icon(),(0,d_.h)("div",{className:"uppy-DashboardTab-name"},e.name))),this.renderAcquirers=(e,t)=>{const n=[...e],r=n.splice(e.length-2,e.length);return(0,d_.h)("div",{className:"uppy-Dashboard-AddFiles-list",role:"tablist"},!t&&this.renderMyDeviceAcquirer(),n.map((e=>this.renderAcquirer(e))),(0,d_.h)("span",{role:"presentation",style:{"white-space":"nowrap"}},r.map((e=>this.renderAcquirer(e)))))}}[p_](){this.props.i18nArray("dropPasteBoth"),this.props.i18nArray("dropPasteFiles"),this.props.i18nArray("dropPasteFolders"),this.props.i18nArray("dropPasteImportBoth"),this.props.i18nArray("dropPasteImportFiles"),this.props.i18nArray("dropPasteImportFolders")}renderPoweredByUppy(){const{i18nArray:e}=this.props,t=e("poweredBy",{uppy:(0,d_.h)("span",null,(0,d_.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon uppy-Dashboard-poweredByIcon",width:"11",height:"11",viewBox:"0 0 11 11"},(0,d_.h)("path",{d:"M7.365 10.5l-.01-4.045h2.612L5.5.806l-4.467 5.65h2.604l.01 4.044h3.718z",fillRule:"evenodd"})),(0,d_.h)("span",{className:"uppy-Dashboard-poweredByUppy"},"Uppy"))});return(0,d_.h)("a",{tabIndex:"-1",href:"https://uppy.io",rel:"noreferrer noopener",target:"_blank",className:"uppy-Dashboard-poweredBy"},t)}render(){return(0,d_.h)("div",{className:"uppy-Dashboard-AddFiles"},this.renderHiddenInput(!1,(e=>{this.fileInput=e})),this.renderHiddenInput(!0,(e=>{this.folderInput=e})),this.renderDropPasteBrowseTagline(),this.props.acquirers.length>0&&this.renderAcquirers(this.props.acquirers,this.props.disableLocalFiles),(0,d_.h)("div",{className:"uppy-Dashboard-AddFiles-info"},this.props.note&&(0,d_.h)("div",{className:"uppy-Dashboard-note"},this.props.note),this.props.proudlyDisplayPoweredByUppy&&this.renderPoweredByUppy(this.props)))}}var f_=h_,m_=qx;const g_=Tc.exports,b_=f_;var y_=e=>(0,m_.h)("div",{className:g_("uppy-Dashboard-AddFilesPanel",e.className),"data-uppy-panelType":"AddFiles","aria-hidden":e.showAddFilesPanel},(0,m_.h)("div",{className:"uppy-DashboardContent-bar"},(0,m_.h)("div",{className:"uppy-DashboardContent-title",role:"heading","aria-level":"1"},e.i18n("addingMoreFiles")),(0,m_.h)("button",{className:"uppy-DashboardContent-back",type:"button",onClick:()=>e.toggleAddFilesPanel(!1)},e.i18n("back"))),(0,m_.h)(b_,e));var v_=function(e){const{tagName:t}=e.target;"INPUT"!==t&&"TEXTAREA"!==t?(e.preventDefault(),e.stopPropagation()):e.stopPropagation()},w_=qx;const x_=Tc.exports,E_=v_;var M_=function(e){let{activePickerPanel:t,className:n,hideAllPanels:r,i18n:i,state:o,uppy:s}=e;return(0,w_.h)("div",{className:x_("uppy-DashboardContent-panel",n),role:"tabpanel","data-uppy-panelType":"PickerPanel",id:`uppy-DashboardContent-panel--${t.id}`,onDragOver:E_,onDragLeave:E_,onDrop:E_,onPaste:E_},(0,w_.h)("div",{className:"uppy-DashboardContent-bar"},(0,w_.h)("div",{className:"uppy-DashboardContent-title",role:"heading","aria-level":"1"},i("importFrom",{name:t.name})),(0,w_.h)("button",{className:"uppy-DashboardContent-back",type:"button",onClick:r},i("cancel"))),(0,w_.h)("div",{className:"uppy-DashboardContent-panelBody"},s.getPlugin(t.id).render(o)))},k_=qx;const __=Tc.exports;var D_=function(e){const t=e.files[e.fileCardFor];return(0,k_.h)("div",{className:__("uppy-DashboardContent-panel",e.className),role:"tabpanel","data-uppy-panelType":"FileEditor",id:"uppy-DashboardContent-panel--editor"},(0,k_.h)("div",{className:"uppy-DashboardContent-bar"},(0,k_.h)("div",{className:"uppy-DashboardContent-title",role:"heading","aria-level":"1"},e.i18nArray("editing",{file:(0,k_.h)("span",{className:"uppy-DashboardContent-titleFile"},t.meta?t.meta.name:t.name)})),(0,k_.h)("button",{className:"uppy-DashboardContent-back",type:"button",onClick:e.hideAllPanels},e.i18n("cancel")),(0,k_.h)("button",{className:"uppy-DashboardContent-save",type:"button",onClick:e.saveFileEditor},e.i18n("save"))),(0,k_.h)("div",{className:"uppy-DashboardContent-panelBody"},e.editors.map((t=>e.uppy.getPlugin(t.id).render(e.state)))))},C_=qx;const O_="error",N_="waiting",T_="preprocessing",S_="uploading",A_="postprocessing",I_="complete",L_="paused";function j_(e){let{files:t,i18n:n,isAllComplete:r,isAllErrored:i,isAllPaused:o,inProgressNotPausedFiles:s,newFiles:a,processingFiles:l}=e;const c=function(e,t,n,r){if(void 0===r&&(r={}),e)return O_;if(t)return I_;if(n)return L_;let i=N_;const o=Object.keys(r);for(let e=0;e<o.length;e++){const{progress:t}=r[o[e]];if(t.uploadStarted&&!t.uploadComplete)return S_;t.preprocess&&i!==S_&&(i=T_),t.postprocess&&i!==S_&&i!==T_&&(i=A_)}return i}(i,r,o,t);switch(c){case"uploading":return n("uploadingXFiles",{smart_count:s.length});case"preprocessing":case"postprocessing":return n("processingXFiles",{smart_count:l.length});case"paused":return n("uploadPaused");case"waiting":return n("xFilesSelected",{smart_count:a.length});case"complete":return n("uploadComplete")}}var z_=function(e){const{i18n:t,isAllComplete:n,hideCancelButton:r,maxNumberOfFiles:i,toggleAddFilesPanel:o,uppy:s}=e;let{allowNewUpload:a}=e;return a&&i&&(a=e.totalFileCount<e.maxNumberOfFiles),(0,C_.h)("div",{className:"uppy-DashboardContent-bar"},n||r?(0,C_.h)("div",null):(0,C_.h)("button",{className:"uppy-DashboardContent-back",type:"button",onClick:()=>s.cancelAll()},t("cancel")),(0,C_.h)("div",{className:"uppy-DashboardContent-title",role:"heading","aria-level":"1"},(0,C_.h)(j_,e)),a?(0,C_.h)("button",{className:"uppy-DashboardContent-addMore",type:"button","aria-label":t("addMoreFiles"),title:t("addMoreFiles"),onClick:()=>o(!0)},(0,C_.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"15",height:"15",viewBox:"0 0 15 15"},(0,C_.h)("path",{d:"M8 6.5h6a.5.5 0 0 1 .5.5v.5a.5.5 0 0 1-.5.5H8v6a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V8h-6a.5.5 0 0 1-.5-.5V7a.5.5 0 0 1 .5-.5h6v-6A.5.5 0 0 1 7 0h.5a.5.5 0 0 1 .5.5v6z"})),(0,C_.h)("span",{className:"uppy-DashboardContent-addMoreCaption"},t("addMore"))):(0,C_.h)("div",null))},F_=qx,P_=xv;const R_=Tc.exports,B_=vk,U_=v_,$_=Ek;class H_ extends F_.Component{constructor(e){super(e),this.form=document.createElement("form"),this.updateMeta=(e,t)=>{this.setState((n=>{let{formState:r}=n;return{formState:{...r,[t]:e}}}))},this.handleSave=e=>{e.preventDefault();const t=this.props.fileCardFor;this.props.saveFileCard(this.state.formState,t)},this.handleCancel=()=>{const{currentImage:e}=this.getPluginState(),t=this.props.uppy.getFile(e.id);this.props.uppy.emit("file-editor:cancel",t),this.props.toggleFileCard(!1)},this.saveOnEnter=e=>{if(13===e.keyCode){e.stopPropagation(),e.preventDefault();const t=this.props.files[this.props.fileCardFor];this.props.saveFileCard(this.state.formState,t.id)}},this.renderMetaFields=()=>{const e=this.getMetaFields()||[],t={text:"uppy-u-reset uppy-c-textInput uppy-Dashboard-FileCard-input"};return e.map((e=>{const n=`uppy-Dashboard-FileCard-input-${e.id}`,r=this.props.requiredMetaFields.includes(e.id);return(0,F_.h)("fieldset",{key:e.id,className:"uppy-Dashboard-FileCard-fieldset"},(0,F_.h)("label",{className:"uppy-Dashboard-FileCard-label",htmlFor:n},e.name),void 0!==e.render?e.render({value:this.state.formState[e.id],onChange:t=>this.updateMeta(t,e.id),fieldCSSClasses:t,required:r,form:this.form.id},F_.h):(0,F_.h)("input",{className:t.text,id:n,form:this.form.id,type:e.type||"text",required:r,value:this.state.formState[e.id],placeholder:e.placeholder,onKeyUp:"form"in HTMLInputElement.prototype?void 0:this.saveOnEnter,onKeyDown:"form"in HTMLInputElement.prototype?void 0:this.saveOnEnter,onKeyPress:"form"in HTMLInputElement.prototype?void 0:this.saveOnEnter,onInput:t=>this.updateMeta(t.target.value,e.id),"data-uppy-super-focusable":!0}))}))};const t=this.props.files[this.props.fileCardFor],n=this.getMetaFields()||[],r={};n.forEach((e=>{r[e.id]=t.meta[e.id]||""})),this.state={formState:r},this.form.id=(0,P_.nanoid)()}componentWillMount(){this.form.addEventListener("submit",this.handleSave),document.body.appendChild(this.form)}componentWillUnmount(){this.form.removeEventListener("submit",this.handleSave),document.body.removeChild(this.form)}getMetaFields(){return"function"==typeof this.props.metaFields?this.props.metaFields(this.props.files[this.props.fileCardFor]):this.props.metaFields}render(){const e=this.props.files[this.props.fileCardFor],t=this.props.canEditFile(e);return(0,F_.h)("div",{className:R_("uppy-Dashboard-FileCard",this.props.className),"data-uppy-panelType":"FileCard",onDragOver:U_,onDragLeave:U_,onDrop:U_,onPaste:U_},(0,F_.h)("div",{className:"uppy-DashboardContent-bar"},(0,F_.h)("div",{className:"uppy-DashboardContent-title",role:"heading","aria-level":"1"},this.props.i18nArray("editing",{file:(0,F_.h)("span",{className:"uppy-DashboardContent-titleFile"},e.meta?e.meta.name:e.name)})),(0,F_.h)("button",{className:"uppy-DashboardContent-back",type:"button",form:this.form.id,title:this.props.i18n("finishEditingFile"),onClick:this.handleCancel},this.props.i18n("cancel"))),(0,F_.h)("div",{className:"uppy-Dashboard-FileCard-inner"},(0,F_.h)("div",{className:"uppy-Dashboard-FileCard-preview",style:{backgroundColor:B_(e.type).color}},(0,F_.h)($_,{file:e}),t&&(0,F_.h)("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-Dashboard-FileCard-edit",onClick:t=>{this.handleSave(t),this.props.openFileEditor(e)},form:this.form.id},this.props.i18n("editFile"))),(0,F_.h)("div",{className:"uppy-Dashboard-FileCard-info"},this.renderMetaFields()),(0,F_.h)("div",{className:"uppy-Dashboard-FileCard-actions"},(0,F_.h)("button",{className:"uppy-u-reset uppy-c-btn uppy-c-btn-primary uppy-Dashboard-FileCard-actionsBtn",type:"form"in HTMLButtonElement.prototype?"submit":"button",onClick:"form"in HTMLButtonElement.prototype?void 0:this.handleSave,form:this.form.id},this.props.i18n("saveChanges")),(0,F_.h)("button",{className:"uppy-u-reset uppy-c-btn uppy-c-btn-link uppy-Dashboard-FileCard-actionsBtn",type:"button",onClick:this.handleCancel,form:this.form.id},this.props.i18n("cancel")))))}}var W_=H_,V_=qx;const q_=Tc.exports,Y_="uppy-transition-slideDownUp",K_=250;class Q_ extends V_.Component{constructor(e){super(e),this.state={cachedChildren:null,className:""}}componentWillUpdate(e){const{cachedChildren:t}=this.state,n=(0,V_.toChildArray)(e.children)[0];if(t===n)return null;const r={cachedChildren:n};n&&!t&&(r.className=`${Y_}-enter`,cancelAnimationFrame(this.animationFrame),clearTimeout(this.leaveTimeout),this.leaveTimeout=void 0,this.animationFrame=requestAnimationFrame((()=>{this.setState({className:`${Y_}-enter ${Y_}-enter-active`}),this.enterTimeout=setTimeout((()=>{this.setState({className:""})}),K_)}))),t&&!n&&void 0===this.leaveTimeout&&(r.cachedChildren=t,r.className=`${Y_}-leave`,cancelAnimationFrame(this.animationFrame),clearTimeout(this.enterTimeout),this.enterTimeout=void 0,this.animationFrame=requestAnimationFrame((()=>{this.setState({className:`${Y_}-leave ${Y_}-leave-active`}),this.leaveTimeout=setTimeout((()=>{this.setState({cachedChildren:null,className:""})}),K_)}))),this.setState(r)}render(){const{cachedChildren:e,className:t}=this.state;return e?(0,V_.cloneElement)(e,{className:q_(t,e.props.className)}):null}}var G_=qx;function Z_(){return Z_=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Z_.apply(this,arguments)}const J_=Tc.exports,X_=bk,eD=e=>{const t=0===e.totalFileCount,n=l_("uppy-Dashboard-files",{"uppy-Dashboard-files--noFiles":t}),r=1===e.itemsPerRow?71:200,i={id:e.id,error:e.error,i18n:e.i18n,uppy:e.uppy,acquirers:e.acquirers,resumableUploads:e.resumableUploads,individualCancellation:e.individualCancellation,hideRetryButton:e.hideRetryButton,hidePauseResumeButton:e.hidePauseResumeButton,hideCancelButton:e.hideCancelButton,showLinkToFileUploadResult:e.showLinkToFileUploadResult,showRemoveButtonAfterComplete:e.showRemoveButtonAfterComplete,isWide:e.isWide,metaFields:e.metaFields,recoveredState:e.recoveredState,toggleFileCard:e.toggleFileCard,handleRequestThumbnail:e.handleRequestThumbnail,handleCancelThumbnail:e.handleCancelThumbnail},o=Object.keys(e.files);e.recoveredState&&o.sort(((t,n)=>e.files[n].isGhost-e.files[t].isGhost));const s=function(e,t){const n=[];let r=[];return e.forEach((e=>{r.length<t?r.push(e):(n.push(r),r=[e])})),r.length&&n.push(r),n}(o,e.itemsPerRow);return(0,s_.h)(u_,{class:n,role:"list",data:s,renderRow:t=>(0,s_.h)("div",{role:"presentation",key:t[0]},t.map((t=>(0,s_.h)(c_,a_({key:t,uppy:e.uppy},i,{role:"listitem",openFileEditor:e.openFileEditor,canEditFile:e.canEditFile,toggleAddFilesPanel:e.toggleAddFilesPanel,file:e.files[t]}))))),rowHeight:r})},tD=f_,nD=y_,rD=M_,iD=D_,oD=z_,sD=W_,aD=Q_,lD=900,cD=700,uD=576,dD=400;var pD=qx,hD=hv.exports,fD=xv,mD=dE;function gD(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var bD=0;function yD(e){return"__private_"+bD+++"_"+e}const vD=wE.exports,wD=aM.exports,xD=AM,ED=LM,MD=pE,kD=HM,_D=KM,DD=hE,CD=gk,OD=function(e){const t=0===e.totalFileCount,n=e.containerWidth>uD,r=J_({"uppy-Dashboard":!0,"uppy-Dashboard--isDisabled":e.disabled,"uppy-Dashboard--animateOpenClose":e.animateOpenClose,"uppy-Dashboard--isClosing":e.isClosing,"uppy-Dashboard--isDraggingOver":e.isDraggingOver,"uppy-Dashboard--modal":!e.inline,"uppy-size--md":e.containerWidth>uD,"uppy-size--lg":e.containerWidth>cD,"uppy-size--xl":e.containerWidth>lD,"uppy-size--height-md":e.containerHeight>dD,"uppy-Dashboard--isAddFilesPanelVisible":e.showAddFilesPanel,"uppy-Dashboard--isInnerWrapVisible":e.areInsidesReadyToBeVisible});let i=1;e.containerWidth>lD?i=5:e.containerWidth>cD?i=4:e.containerWidth>uD&&(i=3);const o=e.showSelectedFiles&&!t,s=e.recoveredState?Object.keys(e.recoveredState.files).length:null,a=e.files?Object.keys(e.files).filter((t=>e.files[t].isGhost)).length:null;return(0,G_.h)("div",{className:r,"data-uppy-theme":e.theme,"data-uppy-num-acquirers":e.acquirers.length,"data-uppy-drag-drop-supported":!e.disableLocalFiles&&X_(),"aria-hidden":e.inline?"false":e.isHidden,"aria-disabled":e.disabled,"aria-label":e.inline?e.i18n("dashboardTitle"):e.i18n("dashboardWindowTitle"),onPaste:e.handlePaste,onDragOver:e.handleDragOver,onDragLeave:e.handleDragLeave,onDrop:e.handleDrop},(0,G_.h)("div",{"aria-hidden":"true",className:"uppy-Dashboard-overlay",tabIndex:-1,onClick:e.handleClickOutside}),(0,G_.h)("div",{className:"uppy-Dashboard-inner","aria-modal":!e.inline&&"true",role:!e.inline&&"dialog",style:{width:e.inline&&e.width?e.width:"",height:e.inline&&e.height?e.height:""}},e.inline?null:(0,G_.h)("button",{className:"uppy-u-reset uppy-Dashboard-close",type:"button","aria-label":e.i18n("closeModal"),title:e.i18n("closeModal"),onClick:e.closeModal},(0,G_.h)("span",{"aria-hidden":"true"},"×")),(0,G_.h)("div",{className:"uppy-Dashboard-innerWrap"},(0,G_.h)("div",{className:"uppy-Dashboard-dropFilesHereHint"},e.i18n("dropHint")),o&&(0,G_.h)(oD,e),s&&(0,G_.h)("div",{className:"uppy-Dashboard-serviceMsg"},(0,G_.h)("svg",{className:"uppy-Dashboard-serviceMsg-icon","aria-hidden":"true",focusable:"false",width:"21",height:"16",viewBox:"0 0 24 19"},(0,G_.h)("g",{transform:"translate(0 -1)",fill:"none",fillRule:"evenodd"},(0,G_.h)("path",{d:"M12.857 1.43l10.234 17.056A1 1 0 0122.234 20H1.766a1 1 0 01-.857-1.514L11.143 1.429a1 1 0 011.714 0z",fill:"#FFD300"}),(0,G_.h)("path",{fill:"#000",d:"M11 6h2l-.3 8h-1.4z"}),(0,G_.h)("circle",{fill:"#000",cx:"12",cy:"17",r:"1"}))),(0,G_.h)("strong",{className:"uppy-Dashboard-serviceMsg-title"},e.i18n("sessionRestored")),(0,G_.h)("div",{className:"uppy-Dashboard-serviceMsg-text"},a>0?e.i18n("recoveredXFiles",{smart_count:a}):e.i18n("recoveredAllFiles"))),o?(0,G_.h)(eD,Z_({},e,{itemsPerRow:i})):(0,G_.h)(tD,Z_({},e,{isSizeMD:n})),(0,G_.h)(aD,null,e.showAddFilesPanel?(0,G_.h)(nD,Z_({key:"AddFiles"},e,{isSizeMD:n})):null),(0,G_.h)(aD,null,e.fileCardFor?(0,G_.h)(sD,Z_({key:"FileCard"},e)):null),(0,G_.h)(aD,null,e.activePickerPanel?(0,G_.h)(rD,Z_({key:"Picker"},e)):null),(0,G_.h)(aD,null,e.showFileEditor?(0,G_.h)(iD,Z_({key:"Editor"},e)):null),(0,G_.h)("div",{className:"uppy-Dashboard-progressindicators"},e.progressindicators.map((t=>e.uppy.getPlugin(t.id).render(e.state)))))))},ND={strings:{closeModal:"Close Modal",addMoreFiles:"Add more files",addingMoreFiles:"Adding more files",importFrom:"Import from %{name}",dashboardWindowTitle:"Uppy Dashboard Window (Press escape to close)",dashboardTitle:"Uppy Dashboard",copyLinkToClipboardSuccess:"Link copied to clipboard.",copyLinkToClipboardFallback:"Copy the URL below",copyLink:"Copy link",back:"Back",removeFile:"Remove file",editFile:"Edit file",editing:"Editing %{file}",finishEditingFile:"Finish editing file",saveChanges:"Save changes",myDevice:"My Device",dropHint:"Drop your files here",uploadComplete:"Upload complete",uploadPaused:"Upload paused",resumeUpload:"Resume upload",pauseUpload:"Pause upload",retryUpload:"Retry upload",cancelUpload:"Cancel upload",xFilesSelected:{0:"%{smart_count} file selected",1:"%{smart_count} files selected"},uploadingXFiles:{0:"Uploading %{smart_count} file",1:"Uploading %{smart_count} files"},processingXFiles:{0:"Processing %{smart_count} file",1:"Processing %{smart_count} files"},poweredBy:"Powered by %{uppy}",addMore:"Add more",editFileWithFilename:"Edit file %{file}",save:"Save",cancel:"Cancel",dropPasteFiles:"Drop files here or %{browseFiles}",dropPasteFolders:"Drop files here or %{browseFolders}",dropPasteBoth:"Drop files here, %{browseFiles} or %{browseFolders}",dropPasteImportFiles:"Drop files here, %{browseFiles} or import from:",dropPasteImportFolders:"Drop files here, %{browseFolders} or import from:",dropPasteImportBoth:"Drop files here, %{browseFiles}, %{browseFolders} or import from:",importFiles:"Import files from:",browseFiles:"browse files",browseFolders:"browse folders",recoveredXFiles:{0:"We could not fully recover 1 file. Please re-select it and resume the upload.",1:"We could not fully recover %{smart_count} files. Please re-select them and resume the upload."},recoveredAllFiles:"We restored all files. You can now resume the upload.",sessionRestored:"Session restored",reSelect:"Re-select",missingRequiredMetaFields:{0:"Missing required meta field: %{fields}.",1:"Missing required meta fields: %{fields}."}}},TD=_D.default||_D,SD=9,AD=27;function ID(){const e={};return e.promise=new Promise(((t,n)=>{e.resolve=t,e.reject=n})),e}function LD(){return(0,pD.h)("svg",{"aria-hidden":"true",focusable:"false",width:"30",height:"30",viewBox:"0 0 30 30"},(0,pD.h)("path",{d:"M15 30c8.284 0 15-6.716 15-15 0-8.284-6.716-15-15-15C6.716 0 0 6.716 0 15c0 8.284 6.716 15 15 15zm4.258-12.676v6.846h-8.426v-6.846H5.204l9.82-12.364 9.82 12.364H19.26z"}))}var jD=yD("openFileEditorWhenFilesAdded"),zD=yD("attachRenderFunctionToTarget"),FD=yD("isTargetSupported"),PD=yD("getAcquirers"),RD=yD("getProgressIndicators"),BD=yD("getEditors");class UD extends hD.UIPlugin{constructor(e,t){var n;super(e,t),n=this,this.removeTarget=e=>{const t=this.getPluginState().targets.filter((t=>t.id!==e.id));this.setPluginState({targets:t})},this.addTarget=e=>{const t=e.id||e.constructor.name,n=e.title||t,r=e.type;if("acquirer"!==r&&"progressindicator"!==r&&"editor"!==r){const e="Dashboard: can only be targeted by plugins of types: acquirer, progressindicator, editor";return void this.uppy.log(e,"error")}const i={id:t,name:n,type:r},o=this.getPluginState().targets.slice();return o.push(i),this.setPluginState({targets:o}),this.el},this.hideAllPanels=()=>{const e=this.getPluginState(),t={activePickerPanel:!1,showAddFilesPanel:!1,activeOverlayType:null,fileCardFor:null,showFileEditor:!1};e.activePickerPanel===t.activePickerPanel&&e.showAddFilesPanel===t.showAddFilesPanel&&e.showFileEditor===t.showFileEditor&&e.activeOverlayType===t.activeOverlayType||this.setPluginState(t)},this.showPanel=e=>{const{targets:t}=this.getPluginState(),n=t.filter((t=>"acquirer"===t.type&&t.id===e))[0];this.setPluginState({activePickerPanel:n,activeOverlayType:"PickerPanel"})},this.canEditFile=e=>{const{targets:t}=this.getPluginState();return gD(this,BD)[BD](t).some((t=>this.uppy.getPlugin(t.id).canEditFile(e)))},this.openFileEditor=e=>{const{targets:t}=this.getPluginState(),n=gD(this,BD)[BD](t);this.setPluginState({showFileEditor:!0,fileCardFor:e.id||null,activeOverlayType:"FileEditor"}),n.forEach((t=>{this.uppy.getPlugin(t.id).selectFile(e)}))},this.saveFileEditor=()=>{const{targets:e}=this.getPluginState();gD(this,BD)[BD](e).forEach((e=>{this.uppy.getPlugin(e.id).save()})),this.hideAllPanels()},this.openModal=()=>{const{promise:e,resolve:t}=ID();if(this.savedScrollPosition=window.pageYOffset,this.savedActiveElement=document.activeElement,this.opts.disablePageScrollWhenModalOpen&&document.body.classList.add("uppy-Dashboard-isFixed"),this.opts.animateOpenClose&&this.getPluginState().isClosing){const e=()=>{this.setPluginState({isHidden:!1}),this.el.removeEventListener("animationend",e,!1),t()};this.el.addEventListener("animationend",e,!1)}else this.setPluginState({isHidden:!1}),t();return this.opts.browserBackButtonClose&&this.updateBrowserHistory(),document.addEventListener("keydown",this.handleKeyDownInModal),this.uppy.emit("dashboard:modal-open"),e},this.closeModal=function(e){void 0===e&&(e={});const{manualClose:t=!0}=e,{isHidden:r,isClosing:i}=n.getPluginState();if(r||i)return;const{promise:o,resolve:s}=ID();if(n.opts.disablePageScrollWhenModalOpen&&document.body.classList.remove("uppy-Dashboard-isFixed"),n.opts.animateOpenClose){n.setPluginState({isClosing:!0});const e=()=>{n.setPluginState({isHidden:!0,isClosing:!1}),n.superFocus.cancel(),n.savedActiveElement.focus(),n.el.removeEventListener("animationend",e,!1),s()};n.el.addEventListener("animationend",e,!1)}else n.setPluginState({isHidden:!0}),n.superFocus.cancel(),n.savedActiveElement.focus(),s();var a;(document.removeEventListener("keydown",n.handleKeyDownInModal),t)&&(n.opts.browserBackButtonClose&&null!=(a=history.state)&&a[n.modalName]&&history.back());return n.uppy.emit("dashboard:modal-closed"),o},this.isModalOpen=()=>!this.getPluginState().isHidden||!1,this.requestCloseModal=()=>this.opts.onRequestCloseModal?this.opts.onRequestCloseModal():this.closeModal(),this.setDarkModeCapability=e=>{const{capabilities:t}=this.uppy.getState();this.uppy.setState({capabilities:{...t,darkMode:e}})},this.handleSystemDarkModeChange=e=>{const t=e.matches;this.uppy.log(`[Dashboard] Dark mode is ${t?"on":"off"}`),this.setDarkModeCapability(t)},this.toggleFileCard=(e,t)=>{const n=this.uppy.getFile(t);e?this.uppy.emit("dashboard:file-edit-start",n):this.uppy.emit("dashboard:file-edit-complete",n),this.setPluginState({fileCardFor:e?t:null,activeOverlayType:e?"FileCard":null})},this.toggleAddFilesPanel=e=>{this.setPluginState({showAddFilesPanel:e,activeOverlayType:e?"AddFiles":null})},this.addFiles=e=>{const t=e.map((e=>({source:this.id,name:e.name,type:e.type,data:e,meta:{relativePath:e.relativePath||e.webkitRelativePath||null}})));try{this.uppy.addFiles(t)}catch(e){this.uppy.log(e)}},this.startListeningToResize=()=>{this.resizeObserver=new ResizeObserver((e=>{const t=e[0],{width:n,height:r}=t.contentRect;this.uppy.log(`[Dashboard] resized: ${n} / ${r}`,"debug"),this.setPluginState({containerWidth:n,containerHeight:r,areInsidesReadyToBeVisible:!0})})),this.resizeObserver.observe(this.el.querySelector(".uppy-Dashboard-inner")),this.makeDashboardInsidesVisibleAnywayTimeout=setTimeout((()=>{const e=this.getPluginState(),t=!this.opts.inline&&e.isHidden;e.areInsidesReadyToBeVisible||t||(this.uppy.log("[Dashboard] resize event didn't fire on time: defaulted to mobile layout","debug"),this.setPluginState({areInsidesReadyToBeVisible:!0}))}),1e3)},this.stopListeningToResize=()=>{this.resizeObserver.disconnect(),clearTimeout(this.makeDashboardInsidesVisibleAnywayTimeout)},this.recordIfFocusedOnUppyRecently=e=>{this.el.contains(e.target)?this.ifFocusedOnUppyRecently=!0:(this.ifFocusedOnUppyRecently=!1,this.superFocus.cancel())},this.disableAllFocusableElements=e=>{const t=MD(this.el.querySelectorAll(DD));e?t.forEach((e=>{const t=e.getAttribute("tabindex");t&&(e.dataset.inertTabindex=t),e.setAttribute("tabindex","-1")})):t.forEach((e=>{"inertTabindex"in e.dataset?e.setAttribute("tabindex",e.dataset.inertTabindex):e.removeAttribute("tabindex")})),this.dashboardIsDisabled=e},this.updateBrowserHistory=()=>{var e;null!=(e=history.state)&&e[this.modalName]||history.pushState({...history.state,[this.modalName]:!0},""),window.addEventListener("popstate",this.handlePopState,!1)},this.handlePopState=e=>{var t;!this.isModalOpen()||e.state&&e.state[this.modalName]||this.closeModal({manualClose:!1}),!this.isModalOpen()&&null!=(t=e.state)&&t[this.modalName]&&history.back()},this.handleKeyDownInModal=e=>{e.keyCode===AD&&this.requestCloseModal(e),e.keyCode===SD&&mD.forModal(e,this.getPluginState().activeOverlayType,this.el)},this.handleClickOutside=()=>{this.opts.closeModalOnClickOutside&&this.requestCloseModal()},this.handlePaste=e=>{this.uppy.iteratePlugins((t=>{"acquirer"===t.type&&(null==t.handleRootPaste||t.handleRootPaste(e))}));const t=MD(e.clipboardData.files);t.length>0&&(this.uppy.log("[Dashboard] Files pasted"),this.addFiles(t))},this.handleInputChange=e=>{e.preventDefault();const t=MD(e.target.files);t.length>0&&(this.uppy.log("[Dashboard] Files selected through input"),this.addFiles(t))},this.handleDragOver=e=>{var t,n;e.preventDefault(),e.stopPropagation();const r=(()=>{let t=!0;return this.uppy.iteratePlugins((n=>{null!=n.canHandleRootDrop&&n.canHandleRootDrop(e)&&(t=!0)})),t})(),i=(()=>{const{types:t}=e.dataTransfer;return t.some((e=>"Files"===e))})();if(!r&&!i||this.opts.disabled||this.opts.disableLocalFiles&&(i||!r)||!this.uppy.getState().allowNewUpload)return e.dataTransfer.dropEffect="none",void clearTimeout(this.removeDragOverClassTimeout);e.dataTransfer.dropEffect="copy",clearTimeout(this.removeDragOverClassTimeout),this.setPluginState({isDraggingOver:!0}),null==(t=(n=this.opts).onDragOver)||t.call(n,e)},this.handleDragLeave=e=>{var t,n;e.preventDefault(),e.stopPropagation(),clearTimeout(this.removeDragOverClassTimeout),this.removeDragOverClassTimeout=setTimeout((()=>{this.setPluginState({isDraggingOver:!1})}),50),null==(t=(n=this.opts).onDragLeave)||t.call(n,e)},this.handleDrop=async e=>{var t,n;e.preventDefault(),e.stopPropagation(),clearTimeout(this.removeDragOverClassTimeout),this.setPluginState({isDraggingOver:!1}),this.uppy.iteratePlugins((t=>{"acquirer"===t.type&&(null==t.handleRootDrop||t.handleRootDrop(e))}));let r=!1;const i=await kD(e.dataTransfer,{logDropError:e=>{this.uppy.log(e,"error"),r||(this.uppy.info(e.message,"error"),r=!0)}});i.length>0&&(this.uppy.log("[Dashboard] Files dropped"),this.addFiles(i)),null==(t=(n=this.opts).onDrop)||t.call(n,e)},this.handleRequestThumbnail=e=>{this.opts.waitForThumbnailsBeforeUpload||this.uppy.emit("thumbnail:request",e)},this.handleCancelThumbnail=e=>{this.opts.waitForThumbnailsBeforeUpload||this.uppy.emit("thumbnail:cancel",e)},this.handleKeyDownInInline=e=>{e.keyCode===SD&&mD.forInline(e,this.getPluginState().activeOverlayType,this.el)},this.handlePasteOnBody=e=>{this.el.contains(document.activeElement)&&this.handlePaste(e)},this.handleComplete=e=>{let{failed:t}=e;this.opts.closeAfterFinish&&0===t.length&&this.requestCloseModal()},this.handleCancelRestore=()=>{this.uppy.emit("restore-canceled")},Object.defineProperty(this,jD,{writable:!0,value:e=>{const t=e[0];this.canEditFile(t)&&this.openFileEditor(t)}}),this.initEvents=()=>{if(this.opts.trigger&&!this.opts.inline){const e=ED(this.opts.trigger);e?e.forEach((e=>e.addEventListener("click",this.openModal))):this.uppy.log("Dashboard modal trigger not found. Make sure `trigger` is set in Dashboard options, unless you are planning to call `dashboard.openModal()` method yourself","warning")}this.startListeningToResize(),document.addEventListener("paste",this.handlePasteOnBody),this.uppy.on("plugin-remove",this.removeTarget),this.uppy.on("file-added",this.hideAllPanels),this.uppy.on("dashboard:modal-closed",this.hideAllPanels),this.uppy.on("file-editor:complete",this.hideAllPanels),this.uppy.on("complete",this.handleComplete),document.addEventListener("focus",this.recordIfFocusedOnUppyRecently,!0),document.addEventListener("click",this.recordIfFocusedOnUppyRecently,!0),this.opts.inline&&this.el.addEventListener("keydown",this.handleKeyDownInInline),this.opts.autoOpenFileEditor&&this.uppy.on("files-added",gD(this,jD)[jD])},this.removeEvents=()=>{const e=ED(this.opts.trigger);!this.opts.inline&&e&&e.forEach((e=>e.removeEventListener("click",this.openModal))),this.stopListeningToResize(),document.removeEventListener("paste",this.handlePasteOnBody),window.removeEventListener("popstate",this.handlePopState,!1),this.uppy.off("plugin-remove",this.removeTarget),this.uppy.off("file-added",this.hideAllPanels),this.uppy.off("dashboard:modal-closed",this.hideAllPanels),this.uppy.off("file-editor:complete",this.hideAllPanels),this.uppy.off("complete",this.handleComplete),document.removeEventListener("focus",this.recordIfFocusedOnUppyRecently),document.removeEventListener("click",this.recordIfFocusedOnUppyRecently),this.opts.inline&&this.el.removeEventListener("keydown",this.handleKeyDownInInline),this.opts.autoOpenFileEditor&&this.uppy.off("files-added",gD(this,jD)[jD])},this.superFocusOnEachUpdate=()=>{const e=this.el.contains(document.activeElement),t=document.activeElement===document.body||null===document.activeElement,n=0===this.uppy.getState().info.length,r=!this.opts.inline;n&&(r||e||t&&this.ifFocusedOnUppyRecently)?this.superFocus(this.el,this.getPluginState().activeOverlayType):this.superFocus.cancel()},this.afterUpdate=()=>{!this.opts.disabled||this.dashboardIsDisabled?(!this.opts.disabled&&this.dashboardIsDisabled&&this.disableAllFocusableElements(!1),this.superFocusOnEachUpdate()):this.disableAllFocusableElements(!0)},this.saveFileCard=(e,t)=>{this.uppy.setFileMeta(t,e),this.toggleFileCard(!1,t)},Object.defineProperty(this,zD,{writable:!0,value:e=>{const t=this.uppy.getPlugin(e.id);return{...e,icon:t.icon||this.opts.defaultPickerIcon,render:t.render}}}),Object.defineProperty(this,FD,{writable:!0,value:e=>{const t=this.uppy.getPlugin(e.id);return"function"!=typeof t.isSupported||t.isSupported()}}),Object.defineProperty(this,PD,{writable:!0,value:TD((e=>e.filter((e=>"acquirer"===e.type&&gD(this,FD)[FD](e))).map(gD(this,zD)[zD])))}),Object.defineProperty(this,RD,{writable:!0,value:TD((e=>e.filter((e=>"progressindicator"===e.type)).map(gD(this,zD)[zD])))}),Object.defineProperty(this,BD,{writable:!0,value:TD((e=>e.filter((e=>"editor"===e.type)).map(gD(this,zD)[zD])))}),this.render=e=>{const t=this.getPluginState(),{files:n,capabilities:r,allowNewUpload:i}=e,{newFiles:o,uploadStartedFiles:s,completeFiles:a,erroredFiles:l,inProgressFiles:c,inProgressNotPausedFiles:u,processingFiles:d,isUploadStarted:p,isAllComplete:h,isAllErrored:f,isAllPaused:m}=this.uppy.getObjectOfFilesPerState(),g=gD(this,PD)[PD](t.targets),b=gD(this,RD)[RD](t.targets),y=gD(this,BD)[BD](t.targets);let v;return v="auto"===this.opts.theme?r.darkMode?"dark":"light":this.opts.theme,["files","folders","both"].indexOf(this.opts.fileManagerSelectionType)<0&&(this.opts.fileManagerSelectionType="files",console.warn(`Unsupported option for "fileManagerSelectionType". Using default of "${this.opts.fileManagerSelectionType}".`)),OD({state:e,isHidden:t.isHidden,files:n,newFiles:o,uploadStartedFiles:s,completeFiles:a,erroredFiles:l,inProgressFiles:c,inProgressNotPausedFiles:u,processingFiles:d,isUploadStarted:p,isAllComplete:h,isAllErrored:f,isAllPaused:m,totalFileCount:Object.keys(n).length,totalProgress:e.totalProgress,allowNewUpload:i,acquirers:g,theme:v,disabled:this.opts.disabled,disableLocalFiles:this.opts.disableLocalFiles,direction:this.opts.direction,activePickerPanel:t.activePickerPanel,showFileEditor:t.showFileEditor,saveFileEditor:this.saveFileEditor,disableAllFocusableElements:this.disableAllFocusableElements,animateOpenClose:this.opts.animateOpenClose,isClosing:t.isClosing,progressindicators:b,editors:y,autoProceed:this.uppy.opts.autoProceed,id:this.id,closeModal:this.requestCloseModal,handleClickOutside:this.handleClickOutside,handleInputChange:this.handleInputChange,handlePaste:this.handlePaste,inline:this.opts.inline,showPanel:this.showPanel,hideAllPanels:this.hideAllPanels,i18n:this.i18n,i18nArray:this.i18nArray,uppy:this.uppy,note:this.opts.note,recoveredState:e.recoveredState,metaFields:t.metaFields,resumableUploads:r.resumableUploads||!1,individualCancellation:r.individualCancellation,isMobileDevice:r.isMobileDevice,fileCardFor:t.fileCardFor,toggleFileCard:this.toggleFileCard,toggleAddFilesPanel:this.toggleAddFilesPanel,showAddFilesPanel:t.showAddFilesPanel,saveFileCard:this.saveFileCard,openFileEditor:this.openFileEditor,canEditFile:this.canEditFile,width:this.opts.width,height:this.opts.height,showLinkToFileUploadResult:this.opts.showLinkToFileUploadResult,fileManagerSelectionType:this.opts.fileManagerSelectionType,proudlyDisplayPoweredByUppy:this.opts.proudlyDisplayPoweredByUppy,hideCancelButton:this.opts.hideCancelButton,hideRetryButton:this.opts.hideRetryButton,hidePauseResumeButton:this.opts.hidePauseResumeButton,showRemoveButtonAfterComplete:this.opts.showRemoveButtonAfterComplete,containerWidth:t.containerWidth,containerHeight:t.containerHeight,areInsidesReadyToBeVisible:t.areInsidesReadyToBeVisible,isTargetDOMEl:this.isTargetDOMEl,parentElement:this.el,allowedFileTypes:this.uppy.opts.restrictions.allowedFileTypes,maxNumberOfFiles:this.uppy.opts.restrictions.maxNumberOfFiles,requiredMetaFields:this.uppy.opts.restrictions.requiredMetaFields,showSelectedFiles:this.opts.showSelectedFiles,handleCancelRestore:this.handleCancelRestore,handleRequestThumbnail:this.handleRequestThumbnail,handleCancelThumbnail:this.handleCancelThumbnail,isDraggingOver:t.isDraggingOver,handleDragOver:this.handleDragOver,handleDragLeave:this.handleDragLeave,handleDrop:this.handleDrop})},this.discoverProviderPlugins=()=>{this.uppy.iteratePlugins((e=>{e&&!e.target&&e.opts&&e.opts.target===this.constructor&&this.addTarget(e)}))},this.install=()=>{this.setPluginState({isHidden:!0,fileCardFor:null,activeOverlayType:null,showAddFilesPanel:!1,activePickerPanel:!1,showFileEditor:!1,metaFields:this.opts.metaFields,targets:[],areInsidesReadyToBeVisible:!1,isDraggingOver:!1});const{inline:e,closeAfterFinish:t}=this.opts;if(e&&t)throw new Error("[Dashboard] `closeAfterFinish: true` cannot be used on an inline Dashboard, because an inline Dashboard cannot be closed at all. Either set `inline: false`, or disable the `closeAfterFinish` option.");const{allowMultipleUploads:n,allowMultipleUploadBatches:r}=this.uppy.opts;(n||r)&&t&&this.uppy.log("[Dashboard] When using `closeAfterFinish`, we recommended setting the `allowMultipleUploadBatches` option to `false` in the Uppy constructor. See https://uppy.io/docs/uppy/#allowMultipleUploads-true","warning");const{target:i}=this.opts;i&&this.mount(i,this);(this.opts.plugins||[]).forEach((e=>{const t=this.uppy.getPlugin(e);t&&t.mount(this,t)})),this.opts.disableStatusBar||this.uppy.use(vD,{id:`${this.id}:StatusBar`,target:this,hideUploadButton:this.opts.hideUploadButton,hideRetryButton:this.opts.hideRetryButton,hidePauseResumeButton:this.opts.hidePauseResumeButton,hideCancelButton:this.opts.hideCancelButton,showProgressDetails:this.opts.showProgressDetails,hideAfterFinish:this.opts.hideProgressAfterFinish,locale:this.opts.locale,doneButtonHandler:this.opts.doneButtonHandler}),this.opts.disableInformer||this.uppy.use(wD,{id:`${this.id}:Informer`,target:this}),this.opts.disableThumbnailGenerator||this.uppy.use(xD,{id:`${this.id}:ThumbnailGenerator`,thumbnailWidth:this.opts.thumbnailWidth,thumbnailHeight:this.opts.thumbnailHeight,thumbnailType:this.opts.thumbnailType,waitForThumbnailsBeforeUpload:this.opts.waitForThumbnailsBeforeUpload,lazy:!this.opts.waitForThumbnailsBeforeUpload}),this.darkModeMediaQuery="undefined"!=typeof window&&window.matchMedia?window.matchMedia("(prefers-color-scheme: dark)"):null;const o=!!this.darkModeMediaQuery&&this.darkModeMediaQuery.matches;this.uppy.log(`[Dashboard] Dark mode is ${o?"on":"off"}`),this.setDarkModeCapability(o),"auto"===this.opts.theme&&this.darkModeMediaQuery.addListener(this.handleSystemDarkModeChange),this.discoverProviderPlugins(),this.initEvents()},this.uninstall=()=>{if(!this.opts.disableInformer){const e=this.uppy.getPlugin(`${this.id}:Informer`);e&&this.uppy.removePlugin(e)}if(!this.opts.disableStatusBar){const e=this.uppy.getPlugin(`${this.id}:StatusBar`);e&&this.uppy.removePlugin(e)}if(!this.opts.disableThumbnailGenerator){const e=this.uppy.getPlugin(`${this.id}:ThumbnailGenerator`);e&&this.uppy.removePlugin(e)}(this.opts.plugins||[]).forEach((e=>{const t=this.uppy.getPlugin(e);t&&t.unmount()})),"auto"===this.opts.theme&&this.darkModeMediaQuery.removeListener(this.handleSystemDarkModeChange),this.unmount(),this.removeEvents()},this.id=this.opts.id||"Dashboard",this.title="Dashboard",this.type="orchestrator",this.modalName=`uppy-Dashboard-${(0,fD.nanoid)()}`,this.defaultLocale=ND;const r={target:"body",metaFields:[],trigger:null,inline:!1,width:750,height:550,thumbnailWidth:280,thumbnailType:"image/jpeg",waitForThumbnailsBeforeUpload:!1,defaultPickerIcon:LD,showLinkToFileUploadResult:!1,showProgressDetails:!1,hideUploadButton:!1,hideCancelButton:!1,hideRetryButton:!1,hidePauseResumeButton:!1,hideProgressAfterFinish:!1,doneButtonHandler:()=>{this.uppy.reset(),this.requestCloseModal()},note:null,closeModalOnClickOutside:!1,closeAfterFinish:!1,disableStatusBar:!1,disableInformer:!1,disableThumbnailGenerator:!1,disablePageScrollWhenModalOpen:!0,animateOpenClose:!0,fileManagerSelectionType:"files",proudlyDisplayPoweredByUppy:!0,onRequestCloseModal:()=>this.closeModal(),showSelectedFiles:!0,showRemoveButtonAfterComplete:!1,browserBackButtonClose:!1,theme:"light",autoOpenFileEditor:!1,disabled:!1,disableLocalFiles:!1};this.opts={...r,...t},this.i18nInit(),this.superFocus=CD(),this.ifFocusedOnUppyRecently=!1,this.makeDashboardInsidesVisibleAnywayTimeout=null,this.removeDragOverClassTimeout=null}}UD.VERSION="2.4.0",uE.exports=UD;const $D=hf.exports,HD=hv.exports.Uppy,WD=$D.instanceOf(HD).isRequired,VD=$D.arrayOf($D.string),qD=$D.shape({strings:$D.object,pluralize:$D.func}),YD=$D.shape({id:$D.string.isRequired,name:$D.string.isRequired,placeholder:$D.string}),KD=$D.oneOfType([$D.arrayOf(YD),$D.func]),QD=$D.oneOfType([$D.string,$D.number]);var GD={uppy:WD,locale:qD,dashboard:{uppy:WD,inline:$D.bool,plugins:VD,width:QD,height:QD,showProgressDetails:$D.bool,hideUploadButton:$D.bool,hideProgressAfterFinish:$D.bool,note:$D.string,metaFields:KD,proudlyDisplayPoweredByUppy:$D.bool,disableStatusBar:$D.bool,disableInformer:$D.bool,disableThumbnailGenerator:$D.bool,thumbnailWidth:$D.number,locale:qD}};const ZD=["defaultChecked","defaultValue","suppressContentEditableWarning","suppressHydrationWarning","dangerouslySetInnerHTML","accessKey","className","contentEditable","contextMenu","dir","draggable","hidden","id","lang","placeholder","slot","spellCheck","style","tabIndex","title","translate","radioGroup","role","about","datatype","inlist","prefix","property","resource","typeof","vocab","autoCapitalize","autoCorrect","autoSave","color","itemProp","itemScope","itemType","itemID","itemRef","results","security","unselectable","inputMode","is","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],JD=/^(aria-|data-)/;var XD=e=>Object.fromEntries(Object.entries(e).filter((e=>{let[t]=e;return JD.test(t)||ZD.includes(t)})));var eC=function(e,t){return Object.keys(e.props).some((n=>!((e,t)=>Object.prototype.hasOwnProperty.call(e,t))(e.validProps,n)&&e.props[n]!==t[n]))};const tC=t,nC=uE.exports,rC=GD.dashboard,iC=XD,oC=eC,sC=tC.createElement;class aC extends tC.Component{componentDidMount(){this.installPlugin()}componentDidUpdate(e){if(e.uppy!==this.props.uppy)this.uninstallPlugin(e),this.installPlugin();else if(oC(this,e)){const e={...this.props,target:this.container};delete e.uppy,this.plugin.setOptions(e)}}componentWillUnmount(){this.uninstallPlugin()}installPlugin(){const{uppy:e}=this.props,t={id:"react:Dashboard",...this.props,target:this.container};delete t.uppy,e.use(nC,t),this.plugin=e.getPlugin(t.id)}uninstallPlugin(e){void 0===e&&(e=this.props);const{uppy:t}=e;t.removePlugin(this.plugin)}render(){return this.validProps=iC(this.props),sC("div",{className:"uppy-Container",ref:e=>{this.container=e},...this.validProps})}}aC.propTypes=rC,aC.defaultProps={inline:!0};const lC=t,cC=hf.exports,uC=uE.exports,dC=GD.dashboard,pC=XD,hC=eC,fC=lC.createElement;class mC extends lC.Component{componentDidMount(){this.installPlugin()}componentDidUpdate(e){if(e.uppy!==this.props.uppy)this.uninstallPlugin(e),this.installPlugin();else if(hC(this,e)){const e={...this.props,onRequestCloseModal:this.props.onRequestClose};delete e.uppy,this.plugin.setOptions(e)}e.open&&!this.props.open?this.plugin.closeModal():!e.open&&this.props.open&&this.plugin.openModal()}componentWillUnmount(){this.uninstallPlugin()}installPlugin(){const{uppy:e}=this.props,t={id:"react:DashboardModal",...this.props,onRequestCloseModal:this.props.onRequestClose};t.target||(t.target=this.container),delete t.uppy,e.use(uC,t),this.plugin=e.getPlugin(t.id),this.props.open&&this.plugin.openModal()}uninstallPlugin(e){void 0===e&&(e=this.props);const{uppy:t}=e;t.removePlugin(this.plugin)}render(){return this.validProps=pC(this.props),fC("div",{className:"uppy-Container",ref:e=>{this.container=e},...this.validProps})}}mC.propTypes={target:"undefined"!=typeof window?cC.instanceOf(window.HTMLElement):cC.any,open:cC.bool,onRequestClose:cC.func,closeModalOnClickOutside:cC.bool,disablePageScrollWhenModalOpen:cC.bool,...dC};var gC={exports:{}},bC=hv.exports,yC=qx;const vC=pE,wC=bk,xC=HM,EC={strings:{dropHereOr:"Drop here or %{browse}",browse:"browse"}};class MC extends bC.UIPlugin{constructor(e,t){super(e,t),this.handleDrop=async e=>{var t,n;e.preventDefault(),e.stopPropagation(),clearTimeout(this.removeDragOverClassTimeout),this.setPluginState({isDraggingOver:!1});const r=await xC(e.dataTransfer,{logDropError:e=>{this.uppy.log(e,"error")}});r.length>0&&(this.uppy.log("[DragDrop] Files dropped"),this.addFiles(r)),null==(t=(n=this.opts).onDrop)||t.call(n,e)},this.type="acquirer",this.id=this.opts.id||"DragDrop",this.title="Drag & Drop",this.defaultLocale=EC;this.opts={target:null,inputName:"files[]",width:"100%",height:"100%",note:null,...t},this.i18nInit(),this.isDragDropSupported=wC(),this.removeDragOverClassTimeout=null,this.onInputChange=this.onInputChange.bind(this),this.handleDragOver=this.handleDragOver.bind(this),this.handleDragLeave=this.handleDragLeave.bind(this),this.handleDrop=this.handleDrop.bind(this),this.addFiles=this.addFiles.bind(this),this.render=this.render.bind(this)}addFiles(e){const t=e.map((e=>({source:this.id,name:e.name,type:e.type,data:e,meta:{relativePath:e.relativePath||null}})));try{this.uppy.addFiles(t)}catch(e){this.uppy.log(e)}}onInputChange(e){const t=vC(e.target.files);t.length>0&&(this.uppy.log("[DragDrop] Files selected through input"),this.addFiles(t)),e.target.value=null}handleDragOver(e){var t,n;e.preventDefault(),e.stopPropagation();const{types:r}=e.dataTransfer,i=r.some((e=>"Files"===e)),{allowNewUpload:o}=this.uppy.getState();if(!i||!o)return e.dataTransfer.dropEffect="none",void clearTimeout(this.removeDragOverClassTimeout);e.dataTransfer.dropEffect="copy",clearTimeout(this.removeDragOverClassTimeout),this.setPluginState({isDraggingOver:!0}),null==(t=(n=this.opts).onDragOver)||t.call(n,e)}handleDragLeave(e){var t,n;e.preventDefault(),e.stopPropagation(),clearTimeout(this.removeDragOverClassTimeout),this.removeDragOverClassTimeout=setTimeout((()=>{this.setPluginState({isDraggingOver:!1})}),50),null==(t=(n=this.opts).onDragLeave)||t.call(n,e)}renderHiddenFileInput(){const{restrictions:e}=this.uppy.opts;return(0,yC.h)("input",{className:"uppy-DragDrop-input",type:"file",hidden:!0,ref:e=>{this.fileInputRef=e},name:this.opts.inputName,multiple:1!==e.maxNumberOfFiles,accept:e.allowedFileTypes,onChange:this.onInputChange})}static renderArrowSvg(){return(0,yC.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon uppy-DragDrop-arrow",width:"16",height:"16",viewBox:"0 0 16 16"},(0,yC.h)("path",{d:"M11 10V0H5v10H2l6 6 6-6h-3zm0 0",fillRule:"evenodd"}))}renderLabel(){return(0,yC.h)("div",{className:"uppy-DragDrop-label"},this.i18nArray("dropHereOr",{browse:(0,yC.h)("span",{className:"uppy-DragDrop-browse"},this.i18n("browse"))}))}renderNote(){return(0,yC.h)("span",{className:"uppy-DragDrop-note"},this.opts.note)}render(){const e=`uppy-u-reset\n uppy-DragDrop-container\n ${this.isDragDropSupported?"uppy-DragDrop--isDragDropSupported":""}\n ${this.getPluginState().isDraggingOver?"uppy-DragDrop--isDraggingOver":""}\n `,t={width:this.opts.width,height:this.opts.height};return(0,yC.h)("button",{type:"button",className:e,style:t,onClick:()=>this.fileInputRef.click(),onDragOver:this.handleDragOver,onDragLeave:this.handleDragLeave,onDrop:this.handleDrop},this.renderHiddenFileInput(),(0,yC.h)("div",{className:"uppy-DragDrop-inner"},MC.renderArrowSvg(),this.renderLabel(),this.renderNote()))}install(){const{target:e}=this.opts;this.setPluginState({isDraggingOver:!1}),e&&this.mount(e,this)}uninstall(){this.unmount()}}MC.VERSION="2.1.1";const kC=t,_C=gC.exports=MC,DC=GD,CC=XD,OC=eC,NC=kC.createElement;class TC extends kC.Component{componentDidMount(){this.installPlugin()}componentDidUpdate(e){if(e.uppy!==this.props.uppy)this.uninstallPlugin(e),this.installPlugin();else if(OC(this,e)){const e={...this.props,target:this.container};delete e.uppy,this.plugin.setOptions(e)}}componentWillUnmount(){this.uninstallPlugin()}installPlugin(){const{uppy:e}=this.props,t={id:"react:DragDrop",...this.props,target:this.container};delete t.uppy,e.use(_C,t),this.plugin=e.getPlugin(t.id)}uninstallPlugin(e){void 0===e&&(e=this.props);const{uppy:t}=e;t.removePlugin(this.plugin)}render(){return this.validProps=CC(this.props),NC("div",{className:"uppy-Container",ref:e=>{this.container=e},...this.validProps})}}TC.propTypes={uppy:DC.uppy,locale:DC.locale},TC.defaultProps={};var SC=TC,AC={exports:{}},IC=qx,LC=hv.exports;class jC extends LC.UIPlugin{constructor(e,t){super(e,t),this.id=this.opts.id||"ProgressBar",this.title="Progress Bar",this.type="progressindicator";this.opts={target:"body",fixed:!1,hideAfterFinish:!0,...t},this.render=this.render.bind(this)}render(e){const t=e.totalProgress||0,n=(0===t||100===t)&&this.opts.hideAfterFinish;return(0,IC.h)("div",{className:"uppy uppy-ProgressBar",style:{position:this.opts.fixed?"fixed":"initial"},"aria-hidden":n},(0,IC.h)("div",{className:"uppy-ProgressBar-inner",style:{width:`${t}%`}}),(0,IC.h)("div",{className:"uppy-ProgressBar-percentage"},t))}install(){const{target:e}=this.opts;e&&this.mount(e,this)}uninstall(){this.unmount()}}jC.VERSION="2.1.1",AC.exports=jC;const zC=t,FC=hf.exports,PC=AC.exports,RC=GD.uppy,BC=XD,UC=eC,$C=zC.createElement;class HC extends zC.Component{componentDidMount(){this.installPlugin()}componentDidUpdate(e){if(e.uppy!==this.props.uppy)this.uninstallPlugin(e),this.installPlugin();else if(UC(this,e)){const e={...this.props,target:this.container};delete e.uppy,this.plugin.setOptions(e)}}componentWillUnmount(){this.uninstallPlugin()}installPlugin(){const{uppy:e}=this.props,t={id:"react:ProgressBar",...this.props,target:this.container};delete t.uppy,e.use(PC,t),this.plugin=e.getPlugin(t.id)}uninstallPlugin(e){void 0===e&&(e=this.props);const{uppy:t}=e;t.removePlugin(this.plugin)}render(){return this.validProps=BC(this.props),$C("div",{className:"uppy-Container",ref:e=>{this.container=e},...this.validProps})}}HC.propTypes={uppy:RC,fixed:FC.bool,hideAfterFinish:FC.bool},HC.defaultProps={};const WC=t,VC=hf.exports,qC=wE.exports,YC=GD.uppy,KC=XD,QC=eC,GC=WC.createElement;class ZC extends WC.Component{componentDidMount(){this.installPlugin()}componentDidUpdate(e){if(e.uppy!==this.props.uppy)this.uninstallPlugin(e),this.installPlugin();else if(QC(this,e)){const e={...this.props,target:this.container};delete e.uppy,this.plugin.setOptions(e)}}componentWillUnmount(){this.uninstallPlugin()}installPlugin(){const{uppy:e}=this.props,t={id:"react:StatusBar",...this.props,target:this.container};delete t.uppy,e.use(qC,t),this.plugin=e.getPlugin(t.id)}uninstallPlugin(e){void 0===e&&(e=this.props);const{uppy:t}=e;t.removePlugin(this.plugin)}render(){return this.validProps=KC(this.props),GC("div",{className:"uppy-Container",ref:e=>{this.container=e},...this.validProps})}}ZC.propTypes={uppy:YC,hideAfterFinish:VC.bool,showProgressDetails:VC.bool},ZC.defaultProps={};var JC={exports:{}},XC=hv.exports,eO=qx;const tO=pE,nO={strings:{chooseFiles:"Choose files"}};class rO extends XC.UIPlugin{constructor(e,t){super(e,t),this.id=this.opts.id||"FileInput",this.title="File Input",this.type="acquirer",this.defaultLocale=nO;this.opts={target:null,pretty:!0,inputName:"files[]",...t},this.i18nInit(),this.render=this.render.bind(this),this.handleInputChange=this.handleInputChange.bind(this),this.handleClick=this.handleClick.bind(this)}addFiles(e){const t=e.map((e=>({source:this.id,name:e.name,type:e.type,data:e})));try{this.uppy.addFiles(t)}catch(e){this.uppy.log(e)}}handleInputChange(e){this.uppy.log("[FileInput] Something selected through input...");const t=tO(e.target.files);this.addFiles(t),e.target.value=null}handleClick(){this.input.click()}render(){const{restrictions:e}=this.uppy.opts,t=e.allowedFileTypes?e.allowedFileTypes.join(","):null;return(0,eO.h)("div",{className:"uppy-FileInput-container"},(0,eO.h)("input",{className:"uppy-FileInput-input",style:this.opts.pretty&&{width:"0.1px",height:"0.1px",opacity:0,overflow:"hidden",position:"absolute",zIndex:-1},type:"file",name:this.opts.inputName,onChange:this.handleInputChange,multiple:1!==e.maxNumberOfFiles,accept:t,ref:e=>{this.input=e}}),this.opts.pretty&&(0,eO.h)("button",{className:"uppy-FileInput-btn",type:"button",onClick:this.handleClick},this.i18n("chooseFiles")))}install(){const{target:e}=this.opts;e&&this.mount(e,this)}uninstall(){this.unmount()}}rO.VERSION="2.1.1",JC.exports=rO;const iO=hf.exports,oO=t,sO=JC.exports,aO=GD,lO=oO.createElement;class cO extends oO.Component{componentDidMount(){this.installPlugin()}componentDidUpdate(e){e.uppy!==this.props.uppy&&(this.uninstallPlugin(e),this.installPlugin())}componentWillUnmount(){this.uninstallPlugin()}installPlugin(){const{uppy:e}=this.props,t={id:"react:FileInput",...this.props,target:this.container};delete t.uppy,e.use(sO,t),this.plugin=e.getPlugin(t.id)}uninstallPlugin(e){void 0===e&&(e=this.props);const{uppy:t}=e;t.removePlugin(this.plugin)}render(){return lO("div",{className:"uppy-Container",ref:e=>{this.container=e}})}}cO.propTypes={uppy:aO.uppy,locale:aO.locale,pretty:iO.bool,inputName:iO.string},cO.defaultProps={};const{useEffect:uO,useRef:dO}=t,pO=hv.exports.Uppy;var hO=Gy,fO=Fc((function(e,t){return hO({},e,t)})),mO=fO;class gO extends hv.exports.BasePlugin{constructor(e,t){super(e,t),zf(this,"upload",(e=>{if(0===e.length)return Promise.resolve();const t=e.map((e=>this.uploadFile(this.uppy.getFile(e))));return Promise.all(t)})),zf(this,"uploadFile",(e=>new Promise(((t,n)=>{const r=this.createProgressTimeout(this.opts.timeout,(t=>{this.uppy.emit("upload-error",e,t),n(t)})),i={directUploadWillStoreFileWithXHR:null,directUploadDidProgress:null};i.directUploadDidProgress=t=>{r.progress(),t.lengthComputable&&this.uppy.emit("upload-progress",e,{uploader:this,bytesUploaded:t.loaded,bytesTotal:t.total})},i.directUploadWillStoreFileWithXHR=e=>{e.upload.addEventListener("progress",(e=>i.directUploadDidProgress(e)))};const{data:o,meta:s}=e;!o.name&&s.name&&(o.name=s.name);const a=new g(o,this.opts.directUploadUrl,this.opts.token,this.opts.attachmentName,i);a.create(((i,o)=>{if(r.done(),i){const t={status:"error"};return this.uppy.setFileState(e.id,{response:t}),this.uppy.emit("upload-error",e,i),n(i)}const s={status:"success",directUploadSignedId:o.signed_id};return this.uppy.setFileState(e.id,{response:s}),this.uppy.emit("upload-success",e,o),t(e)})),this.uppy.on("file-removed",(t=>{var n;t.id===e.id&&(r.done(),null===(n=a.abort)||void 0===n||n.call(a))})),this.uppy.on("upload-cancel",(t=>{var n;t===e.id&&(r.done(),null===(n=a.abort)||void 0===n||n.call(a))})),this.uppy.on("cancel-all",(()=>{var e;r.done(),null===(e=a.abort)||void 0===e||e.call(a)}))})))),this.type="uploader",this.id=t.id||"ActiveStorageUpload",this.title=t.title||"Active Storage Upload",this.token=t.token||"",this.attachmentName=t.attachmentName||"";const n={timeout:30*1e3,limit:0,directUploadUrl:this.opts.directUploadUrl};this.opts=mO(n,t)}install(){this.uppy.addUploader(this.upload)}uninstall(){this.uppy.removeUploader(this.upload)}createProgressTimeout(e,t){let n=null,r=!1;return{progress:()=>{r||(n&&clearTimeout(n),n=setTimeout((()=>t("Request timed out.")),e))},done:()=>{n&&(clearTimeout(n),n=null),r=!0}}}}const bO=e=>{var n;let{uppy:r}=e;const[s,a]=i(0);o((()=>{r.on("progress",a)}),[r]);const l="".concat(s,"%");return t.createElement("div",{className:"neeto-editor-image-uploader__progress"},t.createElement("p",{className:"neeto-editor-image-uploader__progress-title"},"Uploading..."),t.createElement("p",{className:"neeto-editor-image-uploader__progress-file"},null===(n=r.getFiles()[0])||void 0===n?void 0:n.name),t.createElement("div",{className:"neeto-editor-progress-bar__wrapper","data-cy":"neeto-editor-image-upload-progress-bar"},t.createElement("div",{className:"neeto-editor-progress-bar__percent"},t.createElement("p",null,l),t.createElement(ed,{icon:Ep,onClick:()=>r.cancelAll(),size:"small",style:"text"})),t.createElement("div",{className:"neeto-editor-progress-bar__indicator"},t.createElement("div",{style:{width:l},className:"neeto-editor-progress-bar__indicator-inner"}))))},yO=e=>{const t=["B","KB","MB","GB"];let n=0;for(;e>=1024&&n<t.length;)e/=1024,++n;return"".concat(e.toFixed(1)," ").concat(t[n])},vO=e=>{let{endpoint:n,onSuccess:r,uploadConfig:o}=e;const[s,a]=i(!1),[l,c]=i(""),u={...uv,...o},d=function(e){if("function"!=typeof e)throw new TypeError("useUppy: expected a function that returns a new Uppy instance");const t=dO(void 0);if(void 0===t.current&&(t.current=e(),!(t.current instanceof pO)))throw new TypeError(`useUppy: factory function must return an Uppy instance, got ${typeof t.current}`);return uO((()=>()=>{t.current.close({reason:"unmount"}),t.current=void 0}),[t]),t.current}((()=>new cE({...u,onBeforeFileAdded:e=>{const{maxFileSize:t,allowedFileTypes:n}=u.restrictions;return e.size>t?(c("File size is too large. Max size is ".concat(yO(u.restrictions.maxFileSize),".")),!1):!!n.includes(".".concat(e.extension))||(c("File type is not permitted. Allowed file types are: ".concat(n.join(", "),".")),!1)}}).use(gO,{directUploadUrl:n,...dv}).on("upload",(()=>a(!0))).on("upload-success",((e,t)=>{let{blob_url:n}=t;return r(n)})).on("cancel-all",(()=>a(!1))).on("complete",(()=>a(!1)))));return s?t.createElement(bO,{uppy:d}):t.createElement("div",{className:"neeto-editor-image-uploader__dnd-wrapper"},t.createElement(SC,{className:"neeto-editor-image-uploader__dnd",note:"Max. File Size: ".concat(yO(u.restrictions.maxFileSize)),locale:{strings:{dropHereOr:"Drop your file(s) here or %{browse}",browse:"Browse"}},uppy:d,"data-cy":"neeto-editor-image-local-uploader"}),l&&t.createElement("p",{className:"neeto-editor-image-uploader__dnd--error"},l))},wO=()=>t.createElement("div",{className:"neeto-editor-loader"},t.createElement("span",{className:"neeto-editor-loader__spinner-icon"}));var xO={},EO=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},MO=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object.create(null);function n(e,n){return t[e]=t[e]||[],t[e].push(n),this}function r(e,t){return t._once=!0,n(e,t),this}function i(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n?t[e].splice(t[e].indexOf(n),1):delete t[e],this}function o(e){for(var n=this,r=arguments.length,o=Array(r>1?r-1:0),s=1;s<r;s++)o[s-1]=arguments[s];var a=t[e]&&t[e].slice();return a&&a.forEach((function(t){t._once&&i(e,t),t.apply(n,o)})),this}return EO({},e,{on:n,once:r,off:i,emit:o})},kO=Object.freeze({__proto__:null,default:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=void 0,n=void 0,r=void 0,i=void 0,o=void 0,s=void 0,a=void 0,l=void 0,c=void 0,u=void 0,d=void 0,p=void 0,h=void 0,f=0===e.packed.indexOf("data-")?e.packed:"data-"+e.packed,m=e.sizes.slice().reverse(),g=!1!==e.position,b=e.container.nodeType?e.container:document.querySelector(e.container),y={all:function(){return M(b.children)},new:function(){return M(b.children).filter((function(e){return!e.hasAttribute(""+f)}))}},v=[D,C,O],w=[N,T,S,A],x=MO({pack:j,update:z,resize:F});return x;function E(e){e.forEach((function(e){return e()}))}function M(e){return Array.prototype.slice.call(e)}function k(e){return Array.apply(null,Array(e)).map((function(){return 0}))}function _(){return m.map((function(e){return e.mq&&window.matchMedia("(min-width: "+e.mq+")").matches})).indexOf(!0)}function D(){r=_()}function C(){i=-1===r?m[m.length-1]:m[r]}function O(){s=k(i.columns)}function N(){d=y[t?"new":"all"]()}function T(){0!==d.length&&(p=d.map((function(e){return e.clientWidth})),h=d.map((function(e){return e.clientHeight})))}function S(){d.forEach((function(e,t){o=s.indexOf(Math.min.apply(Math,s)),e.style.position="absolute",a=s[o]+"px",l=o*p[t]+o*i.gutter+"px",g?(e.style.top=a,e.style.left=l):e.style.transform="translate3d("+l+", "+a+", 0)",e.setAttribute(f,""),c=p[t],u=h[t],c&&u&&(s[o]+=u+i.gutter)}))}function A(){b.style.position="relative",b.style.width=i.columns*c+(i.columns-1)*i.gutter+"px",b.style.height=Math.max.apply(Math,s)-i.gutter+"px"}function I(){n||(window.requestAnimationFrame(L),n=!0)}function L(){r!==_()&&(j(),x.emit("resize",i)),n=!1}function j(){return t=!1,E(v.concat(w)),x.emit("pack")}function z(){return t=!0,E(w),x.emit("update")}function F(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=e?"addEventListener":"removeEventListener";return window[t]("resize",I),x}}}),_O=Oc(kO),DO={exports:{}},CO={exports:{}};!function(e,n){Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=t,o=a(i),s=a(hf.exports);function a(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.scrollListener=n.scrollListener.bind(n),n.eventListenerOptions=n.eventListenerOptions.bind(n),n.mousewheelListener=n.mousewheelListener.bind(n),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"componentDidMount",value:function(){this.pageLoaded=this.props.pageStart,this.options=this.eventListenerOptions(),this.attachScrollListener()}},{key:"componentDidUpdate",value:function(){if(this.props.isReverse&&this.loadMore){var e=this.getParentElement(this.scrollComponent);e.scrollTop=e.scrollHeight-this.beforeScrollHeight+this.beforeScrollTop,this.loadMore=!1}this.attachScrollListener()}},{key:"componentWillUnmount",value:function(){this.detachScrollListener(),this.detachMousewheelListener()}},{key:"isPassiveSupported",value:function(){var e=!1,t={get passive(){e=!0}};try{document.addEventListener("test",null,t),document.removeEventListener("test",null,t)}catch(e){}return e}},{key:"eventListenerOptions",value:function(){this.props.useCapture;return this.isPassiveSupported()?{useCapture:this.props.useCapture,passive:!0}:{passive:!1}}},{key:"setDefaultLoader",value:function(e){this.defaultLoader=e}},{key:"detachMousewheelListener",value:function(){var e=window;!1===this.props.useWindow&&(e=this.scrollComponent.parentNode),e.removeEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture)}},{key:"detachScrollListener",value:function(){var e=window;!1===this.props.useWindow&&(e=this.getParentElement(this.scrollComponent)),e.removeEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),e.removeEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture)}},{key:"getParentElement",value:function(e){var t=this.props.getScrollParent&&this.props.getScrollParent();return null!=t?t:e&&e.parentNode}},{key:"filterProps",value:function(e){return e}},{key:"attachScrollListener",value:function(){var e=this.getParentElement(this.scrollComponent);if(this.props.hasMore&&e){var t=window;!1===this.props.useWindow&&(t=e),t.addEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture),t.addEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),t.addEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture),this.props.initialLoad&&this.scrollListener()}}},{key:"mousewheelListener",value:function(e){1!==e.deltaY||this.isPassiveSupported()||e.preventDefault()}},{key:"scrollListener",value:function(){var e=this.scrollComponent,t=window,n=this.getParentElement(e),r=void 0;if(this.props.useWindow){var i=document.documentElement||document.body.parentNode||document.body,o=void 0!==t.pageYOffset?t.pageYOffset:i.scrollTop;r=this.props.isReverse?o:this.calculateOffset(e,o)}else r=this.props.isReverse?n.scrollTop:e.scrollHeight-n.scrollTop-n.clientHeight;r<Number(this.props.threshold)&&e&&null!==e.offsetParent&&(this.detachScrollListener(),this.beforeScrollHeight=n.scrollHeight,this.beforeScrollTop=n.scrollTop,"function"==typeof this.props.loadMore&&(this.props.loadMore(this.pageLoaded+=1),this.loadMore=!0))}},{key:"calculateOffset",value:function(e,t){return e?this.calculateTopPosition(e)+(e.offsetHeight-t-window.innerHeight):0}},{key:"calculateTopPosition",value:function(e){return e?e.offsetTop+this.calculateTopPosition(e.offsetParent):0}},{key:"render",value:function(){var e=this,t=this.filterProps(this.props),n=t.children,r=t.element,i=t.hasMore;t.initialLoad;var s=t.isReverse,a=t.loader;t.loadMore,t.pageStart;var l=t.ref;t.threshold,t.useCapture,t.useWindow,t.getScrollParent;var c=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(t,["children","element","hasMore","initialLoad","isReverse","loader","loadMore","pageStart","ref","threshold","useCapture","useWindow","getScrollParent"]);c.ref=function(t){e.scrollComponent=t,l&&l(t)};var u=[n];return i&&(a?s?u.unshift(a):u.push(a):this.defaultLoader&&(s?u.unshift(this.defaultLoader):u.push(this.defaultLoader))),o.default.createElement(r,c,u)}}]),t}(i.Component);l.propTypes={children:s.default.node.isRequired,element:s.default.node,hasMore:s.default.bool,initialLoad:s.default.bool,isReverse:s.default.bool,loader:s.default.node,loadMore:s.default.func.isRequired,pageStart:s.default.number,ref:s.default.func,getScrollParent:s.default.func,threshold:s.default.number,useCapture:s.default.bool,useWindow:s.default.bool},l.defaultProps={element:"div",hasMore:!1,initialLoad:!0,pageStart:0,ref:null,threshold:250,useWindow:!0,isReverse:!1,useCapture:!1,loader:null,getScrollParent:null},n.default=l,e.exports=n["default"]}(CO,CO.exports),DO.exports=CO.exports,Object.defineProperty(xO,"__esModule",{value:!0});var OO,NO,TO=xO.default=void 0,SO=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),AO=t,IO=FO(AO),LO=FO(hf.exports),jO=FO(_O),zO=FO(DO.exports);function FO(e){return e&&e.__esModule?e:{default:e}}function PO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function RO(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var BO=(NO=OO=function(e){function t(){var e,n,r;PO(this,t);for(var i=arguments.length,o=Array(i),s=0;s<i;s++)o[s]=arguments[s];return n=r=RO(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(o))),r.setContainerRef=function(e){r.masonryContainer=e},r.forcePack=function(){r.masonryContainer&&r.state.instance.pack()},r.forceUpdate=function(){r.masonryContainer&&r.state.instance.update()},r.createNewInstance=function(){var e=r.props,t=e.packed,n=e.sizes,i=e.children,o=e.position,s=(0,jO.default)({container:r.masonryContainer,packed:t,sizes:n,position:o});s.resize(!0),i.length>0&&s.pack(),r.setState((function(){return{instance:s}}))},RO(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,AO.Component),SO(t,[{key:"componentDidMount",value:function(){this.createNewInstance()}},{key:"componentDidUpdate",value:function(e){var t=this.props.children,n=this.state.instance;if(0!==e.children.length||0!==t.length)return 0===e.children.length&&t.length>0?n.pack():e.children.length!==t.length?this.props.pack?n.pack():n.update():void 0}},{key:"componentWillUnmount",value:function(){this.state&&this.state.instance.resize(!1)}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.style;e.pack,e.packed,e.position,e.sizes;var i=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["children","className","style","pack","packed","position","sizes"]);return IO.default.createElement(zO.default,i,IO.default.createElement("div",{ref:this.setContainerRef,className:n,style:r},t))}}]),t}(),OO.propTypes={children:LO.default.arrayOf(LO.default.element).isRequired,className:LO.default.string,initialLoad:LO.default.bool,pack:LO.default.bool,packed:LO.default.string,position:LO.default.bool,sizes:LO.default.array,style:LO.default.object},OO.defaultProps={className:"",initialLoad:!0,pack:!1,packed:"data-packed",position:!0,sizes:[{columns:1,gutter:20},{mq:"768px",columns:2,gutter:20},{mq:"1024px",columns:3,gutter:20}],style:{}},NO);TO=xO.default=BO;const UO=e=>{let{onSubmit:n,unsplashApiKey:r}=e;const s=c(null),[a,l]=i(""),[u,d]=i(!1),[p,h]=i([]),[f,m]=i(1),[g,b]=i(!0),[y,v]=i(!1),w=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:800;const[n,r]=i(e);return o((()=>{const n=setTimeout((()=>{r(e)}),t);return()=>{clearTimeout(n)}}),[e]),n}(a||"latest");o((()=>{x(1)}),[w]);const x=async e=>{try{v(!0),d(!1);const t=await(e=>{let{pageNo:t,query:n,apiKey:r}=e;return Hg.get(D,{headers:{Authorization:"Client-ID ".concat(r)},params:{page:t,per_page:30,order_by:"popular",query:n}})})({page:e,query:w,apiKey:r}),{data:{results:n,total_pages:i}}=t;h(1===e?n:[...p,...n]),m(e+1),b(e<i)}catch(e){d(!0)}finally{v(!1)}};return t.createElement("div",{className:"neeto-editor-unsplash-wrapper"},t.createElement(Xh,{autoFocus:!0,name:"text",value:a,placeholder:"Search Unsplash",onChange:e=>{let{target:{value:t}}=e;l(t)},"data-cy":"neeto-editor-unsplash-image-picker-search-input"}),u&&t.createElement("p",{className:"neeto-editor-unsplash-gallery__text","data-cy":"neeto-editor-unsplash-image-picker-error"},"Something went wrong! Please try again later."),!u&&!y&&Iu(p)&&t.createElement("p",{className:"neeto-editor-unsplash-gallery__text","data-cy":"neeto-editor-unsplash-image-picker-no-results-error"},"No results"),!u&&t.createElement("div",{className:"neeto-editor-unsplash-container"},t.createElement(TO,{ref:s,pack:!0,style:{width:"100%"},sizes:[{columns:3,gutter:0},{mq:"768px",columns:3,gutter:0},{mq:"1024px",columns:3,gutter:0}],hasMore:g,loadMore:()=>{!y&&g&&f>1&&x(f)},position:!0,useWindow:!1,className:"neeto-editor-unsplash-gallery",loader:t.createElement(wO,{key:0})},p&&p.map(((e,r)=>t.createElement("div",{key:r,className:"neeto-editor-unsplash-gallery__item","data-cy":"neeto-editor-unsplash-image-picker-result-".concat(r)},t.createElement("div",{className:"neeto-editor-unsplash-gallery__item-placeholder",style:{paddingBottom:"".concat(e.height/e.width*100,"%")}},t.createElement("div",{className:"neeto-editor-unsplash-gallery__item-inner",id:"unsplashImage".concat(r)},t.createElement("img",{src:e.urls.regular,onClick:()=>n(e.urls.small)}),t.createElement("a",{href:"https://unsplash.com/@".concat(e.user.username),target:"_blank",rel:"noreferrer"},e.user.name," "))))))),!g&&t.createElement("p",{className:"neeto-editor-unsplash-gallery__text"},"End of results")))},$O=e=>{let{buttonLabel:n="Submit",placeholder:r,onSubmit:o,className:s}=e;const[a,l]=i(""),[c,u]=i("");return t.createElement("div",{className:Sc("neeto-editor-url-form__wrapper",{[s]:s})},t.createElement(Xh,{autoFocus:!0,name:"url",value:a,placeholder:r,onFocus:()=>u(""),error:c,onChange:e=>{let{target:{value:t}}=e;return l(t)},"data-cy":"neeto-editor-image-upload-url-input"}),t.createElement(ed,{size:"large",label:n,onClick:e=>{e.preventDefault(),sf.test(a)?o(a):u("Please enter a valid url")},disabled:!a,"data-cy":"neeto-editor-image-upload-url-submit"}))},HO=e=>{let{editor:n,imageUploadUrl:r,uploadConfig:o,isVisible:s,setIsVisible:a,unsplashApiKey:l,isUnsplashImageUploadActive:c}=e;const[u,d]=(e=>{var t;const[n,r]=i(null===(t=e[0])||void 0===t?void 0:t.key);return[n,e=>r(e.key)]})(pv),[p,h]=i(""),f=e=>{h(e)},m={local:()=>t.createElement(vO,{endpoint:r,onSuccess:f,uploadConfig:o}),link:()=>t.createElement($O,{onSubmit:f,buttonLabel:"Upload Image",placeholder:"Paste the image link"}),unsplash:()=>t.createElement(UO,{unsplashApiKey:l,onSubmit:f})}[u];return t.createElement(Zh,{isOpen:s,onClose:()=>{a(!1),d(pv[0])},closeButton:!1},t.createElement("div",{className:"neeto-editor-image-uploader"},t.createElement(cv,null,pv.filter((e=>"unsplash"!==e.key||c)).map((e=>t.createElement(cv.Item,{key:e.key,active:u===e.key,onClick:()=>d(e)},e.title)))),t.createElement("div",{className:"neeto-editor-image-uploader__content"},p?t.createElement(ef,{url:p,editor:n,onClose:()=>{h(null),a(!1)}}):t.createElement(m,null))))},WO=is.create({name:"characterCount",addOptions:()=>({limit:null,mode:"textSize"}),addStorage:()=>({characters:()=>0,words:()=>0}),onBeforeCreate(){this.storage.characters=e=>{const t=(null==e?void 0:e.node)||this.editor.state.doc;if("textSize"===((null==e?void 0:e.mode)||this.options.mode)){return t.textBetween(0,t.content.size,void 0," ").length}return t.nodeSize},this.storage.words=e=>{const t=(null==e?void 0:e.node)||this.editor.state.doc;return t.textBetween(0,t.content.size," "," ").split(" ").filter((e=>""!==e)).length}},addProseMirrorPlugins(){return[new Qt({key:new Jt("characterCount"),filterTransaction:(e,t)=>{const n=this.options.limit;if(!e.docChanged||0===n||null==n)return!0;const r=this.storage.characters({node:t.doc}),i=this.storage.characters({node:e.doc});if(i<=n)return!0;if(r>n&&i>n&&i<=r)return!0;if(r>n&&i>n&&i>r)return!1;if(!e.getMeta("paste"))return!1;const o=e.selection.$head.pos,s=o-(i-n),a=o;e.deleteRange(s,a);return!(this.storage.characters({node:e.doc})>n)}})]}}),VO=/(?:^|\s)((?:`)((?:[^`]+))(?:`))$/,qO=/(?:^|\s)((?:`)((?:[^`]+))(?:`))/g,YO=Zs.create({name:"code",addOptions:()=>({HTMLAttributes:{}}),excludes:"_",code:!0,exitable:!0,parseHTML:()=>[{tag:"code"}],renderHTML({HTMLAttributes:e}){return["code",Bo(this.options.HTMLAttributes,e),0]},addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[qs({find:VO,type:this.type})]},addPasteRules(){return[Xs({find:qO,type:this.type})]}}),KO=is.create({name:"focus",addOptions:()=>({className:"has-focus",mode:"all"}),addProseMirrorPlugins(){return[new Qt({key:new Jt("focus"),props:{decorations:({doc:e,selection:t})=>{const{isEditable:n,isFocused:r}=this.editor,{anchor:i}=t,o=[];if(!n||!r)return zi.create(e,[]);let s=0;"deepest"===this.options.mode&&e.descendants(((e,t)=>{if(e.isText)return;if(!(i>=t&&i<=t+e.nodeSize-1))return!1;s+=1}));let a=0;return e.descendants(((e,t)=>{if(e.isText)return!1;if(!(i>=t&&i<=t+e.nodeSize-1))return!1;a+=1;if("deepest"===this.options.mode&&s-a>0||"shallowest"===this.options.mode&&a>1)return"deepest"===this.options.mode;o.push(Ii.node(t,t+e.nodeSize,{class:this.options.className}))})),zi.create(e,o)}}})]}}),QO=/(?:^|\s)((?:==)((?:[^~=]+))(?:==))$/,GO=/(?:^|\s)((?:==)((?:[^~=]+))(?:==))/g,ZO=Zs.create({name:"highlight",addOptions:()=>({multicolor:!1,HTMLAttributes:{}}),addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:e=>e.getAttribute("data-color")||e.style.backgroundColor,renderHTML:e=>e.color?{"data-color":e.color,style:`background-color: ${e.color}`}:{}}}:{}},parseHTML:()=>[{tag:"mark"}],renderHTML({HTMLAttributes:e}){return["mark",Bo(this.options.HTMLAttributes,e),0]},addCommands(){return{setHighlight:e=>({commands:t})=>t.setMark(this.name,e),toggleHighlight:e=>({commands:t})=>t.toggleMark(this.name,e),unsetHighlight:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[qs({find:QO,type:this.type})]},addPasteRules(){return[Xs({find:GO,type:this.type})]}});function JO(e){this.j={},this.jr=[],this.jd=null,this.t=e}JO.prototype={accepts:function(){return!!this.t},tt:function(e,t){if(t&&t.j)return this.j[e]=t,t;var n=t,r=this.j[e];if(r)return n&&(r.t=n),r;r=XO();var i=rN(this,e);return i?(Object.assign(r.j,i.j),r.jr.append(i.jr),r.jr=i.jd,r.t=n||i.t):r.t=n,this.j[e]=r,r}};var XO=function(){return new JO},eN=function(e){return new JO(e)},tN=function(e,t,n){e.j[t]||(e.j[t]=n)},nN=function(e,t,n){e.jr.push([t,n])},rN=function(e,t){var n=e.j[t];if(n)return n;for(var r=0;r<e.jr.length;r++){var i=e.jr[r][0],o=e.jr[r][1];if(i.test(t))return o}return e.jd},iN=function(e,t,n){for(var r=0;r<t.length;r++)tN(e,t[r],n)},oN=function(e,t){for(var n=0;n<t.length;n++){var r=t[n][0],i=t[n][1];tN(e,r,i)}},sN=function(e,t,n,r){for(var i,o=0,s=t.length;o<s&&(i=e.j[t[o]]);)e=i,o++;if(o>=s)return[];for(;o<s-1;)i=r(),tN(e,t[o],i),e=i,o++;tN(e,t[s-1],n)},aN="DOMAIN",lN="LOCALHOST",cN="TLD",uN="NUM",dN="PROTOCOL",pN="MAILTO",hN="WS",fN="NL",mN="OPENBRACE",gN="OPENBRACKET",bN="OPENANGLEBRACKET",yN="OPENPAREN",vN="CLOSEBRACE",wN="CLOSEBRACKET",xN="CLOSEANGLEBRACKET",EN="CLOSEPAREN",MN="AMPERSAND",kN="APOSTROPHE",_N="ASTERISK",DN="AT",CN="BACKSLASH",ON="BACKTICK",NN="CARET",TN="COLON",SN="COMMA",AN="DOLLAR",IN="DOT",LN="EQUALS",jN="EXCLAMATION",zN="HYPHEN",FN="PERCENT",PN="PIPE",RN="PLUS",BN="POUND",UN="QUERY",$N="QUOTE",HN="SEMI",WN="SLASH",VN="TILDE",qN="UNDERSCORE",YN="SYM",KN=Object.freeze({__proto__:null,DOMAIN:aN,LOCALHOST:lN,TLD:cN,NUM:uN,PROTOCOL:dN,MAILTO:pN,WS:hN,NL:fN,OPENBRACE:mN,OPENBRACKET:gN,OPENANGLEBRACKET:bN,OPENPAREN:yN,CLOSEBRACE:vN,CLOSEBRACKET:wN,CLOSEANGLEBRACKET:xN,CLOSEPAREN:EN,AMPERSAND:MN,APOSTROPHE:kN,ASTERISK:_N,AT:DN,BACKSLASH:CN,BACKTICK:ON,CARET:NN,COLON:TN,COMMA:SN,DOLLAR:AN,DOT:IN,EQUALS:LN,EXCLAMATION:jN,HYPHEN:zN,PERCENT:FN,PIPE:PN,PLUS:RN,POUND:BN,QUERY:UN,QUOTE:$N,SEMI:HN,SLASH:WN,TILDE:VN,UNDERSCORE:qN,SYM:YN}),QN="aaa aarp abarth abb abbott abbvie abc able abogado abudhabi ac academy accenture accountant accountants aco actor ad adac ads adult ae aeg aero aetna af afamilycompany afl africa ag agakhan agency ai aig airbus airforce airtel akdn al alfaromeo alibaba alipay allfinanz allstate ally alsace alstom am amazon americanexpress americanfamily amex amfam amica amsterdam analytics android anquan anz ao aol apartments app apple aq aquarelle ar arab aramco archi army arpa art arte as asda asia associates at athleta attorney au auction audi audible audio auspost author auto autos avianca aw aws ax axa az azure ba baby baidu banamex bananarepublic band bank bar barcelona barclaycard barclays barefoot bargains baseball basketball bauhaus bayern bb bbc bbt bbva bcg bcn bd be beats beauty beer bentley berlin best bestbuy bet bf bg bh bharti bi bible bid bike bing bingo bio biz bj black blackfriday blockbuster blog bloomberg blue bm bms bmw bn bnpparibas bo boats boehringer bofa bom bond boo book booking bosch bostik boston bot boutique box br bradesco bridgestone broadway broker brother brussels bs bt budapest bugatti build builders business buy buzz bv bw by bz bzh ca cab cafe cal call calvinklein cam camera camp cancerresearch canon capetown capital capitalone car caravan cards care career careers cars casa case cash casino cat catering catholic cba cbn cbre cbs cc cd center ceo cern cf cfa cfd cg ch chanel channel charity chase chat cheap chintai christmas chrome church ci cipriani circle cisco citadel citi citic city cityeats ck cl claims cleaning click clinic clinique clothing cloud club clubmed cm cn co coach codes coffee college cologne com comcast commbank community company compare computer comsec condos construction consulting contact contractors cooking cookingchannel cool coop corsica country coupon coupons courses cpa cr credit creditcard creditunion cricket crown crs cruise cruises csc cu cuisinella cv cw cx cy cymru cyou cz dabur dad dance data date dating datsun day dclk dds de deal dealer deals degree delivery dell deloitte delta democrat dental dentist desi design dev dhl diamonds diet digital direct directory discount discover dish diy dj dk dm dnp do docs doctor dog domains dot download drive dtv dubai duck dunlop dupont durban dvag dvr dz earth eat ec eco edeka edu education ee eg email emerck energy engineer engineering enterprises epson equipment er ericsson erni es esq estate et etisalat eu eurovision eus events exchange expert exposed express extraspace fage fail fairwinds faith family fan fans farm farmers fashion fast fedex feedback ferrari ferrero fi fiat fidelity fido film final finance financial fire firestone firmdale fish fishing fit fitness fj fk flickr flights flir florist flowers fly fm fo foo food foodnetwork football ford forex forsale forum foundation fox fr free fresenius frl frogans frontdoor frontier ftr fujitsu fujixerox fun fund furniture futbol fyi ga gal gallery gallo gallup game games gap garden gay gb gbiz gd gdn ge gea gent genting george gf gg ggee gh gi gift gifts gives giving gl glade glass gle global globo gm gmail gmbh gmo gmx gn godaddy gold goldpoint golf goo goodyear goog google gop got gov gp gq gr grainger graphics gratis green gripe grocery group gs gt gu guardian gucci guge guide guitars guru gw gy hair hamburg hangout haus hbo hdfc hdfcbank health healthcare help helsinki here hermes hgtv hiphop hisamitsu hitachi hiv hk hkt hm hn hockey holdings holiday homedepot homegoods homes homesense honda horse hospital host hosting hot hoteles hotels hotmail house how hr hsbc ht hu hughes hyatt hyundai ibm icbc ice icu id ie ieee ifm ikano il im imamat imdb immo immobilien in inc industries infiniti info ing ink institute insurance insure int international intuit investments io ipiranga iq ir irish is ismaili ist istanbul it itau itv iveco jaguar java jcb je jeep jetzt jewelry jio jll jm jmp jnj jo jobs joburg jot joy jp jpmorgan jprs juegos juniper kaufen kddi ke kerryhotels kerrylogistics kerryproperties kfh kg kh ki kia kim kinder kindle kitchen kiwi km kn koeln komatsu kosher kp kpmg kpn kr krd kred kuokgroup kw ky kyoto kz la lacaixa lamborghini lamer lancaster lancia land landrover lanxess lasalle lat latino latrobe law lawyer lb lc lds lease leclerc lefrak legal lego lexus lgbt li lidl life lifeinsurance lifestyle lighting like lilly limited limo lincoln linde link lipsy live living lixil lk llc llp loan loans locker locus loft lol london lotte lotto love lpl lplfinancial lr ls lt ltd ltda lu lundbeck luxe luxury lv ly ma macys madrid maif maison makeup man management mango map market marketing markets marriott marshalls maserati mattel mba mc mckinsey md me med media meet melbourne meme memorial men menu merckmsd mg mh miami microsoft mil mini mint mit mitsubishi mk ml mlb mls mm mma mn mo mobi mobile moda moe moi mom monash money monster mormon mortgage moscow moto motorcycles mov movie mp mq mr ms msd mt mtn mtr mu museum mutual mv mw mx my mz na nab nagoya name nationwide natura navy nba nc ne nec net netbank netflix network neustar new news next nextdirect nexus nf nfl ng ngo nhk ni nico nike nikon ninja nissan nissay nl no nokia northwesternmutual norton now nowruz nowtv np nr nra nrw ntt nu nyc nz obi observer off office okinawa olayan olayangroup oldnavy ollo om omega one ong onl online onyourside ooo open oracle orange org organic origins osaka otsuka ott ovh pa page panasonic paris pars partners parts party passagens pay pccw pe pet pf pfizer pg ph pharmacy phd philips phone photo photography photos physio pics pictet pictures pid pin ping pink pioneer pizza pk pl place play playstation plumbing plus pm pn pnc pohl poker politie porn post pr pramerica praxi press prime pro prod productions prof progressive promo properties property protection pru prudential ps pt pub pw pwc py qa qpon quebec quest qvc racing radio raid re read realestate realtor realty recipes red redstone redumbrella rehab reise reisen reit reliance ren rent rentals repair report republican rest restaurant review reviews rexroth rich richardli ricoh ril rio rip rmit ro rocher rocks rodeo rogers room rs rsvp ru rugby ruhr run rw rwe ryukyu sa saarland safe safety sakura sale salon samsclub samsung sandvik sandvikcoromant sanofi sap sarl sas save saxo sb sbi sbs sc sca scb schaeffler schmidt scholarships school schule schwarz science scjohnson scot sd se search seat secure security seek select sener services ses seven sew sex sexy sfr sg sh shangrila sharp shaw shell shia shiksha shoes shop shopping shouji show showtime si silk sina singles site sj sk ski skin sky skype sl sling sm smart smile sn sncf so soccer social softbank software sohu solar solutions song sony soy spa space sport spot spreadbetting sr srl ss st stada staples star statebank statefarm stc stcgroup stockholm storage store stream studio study style su sucks supplies supply support surf surgery suzuki sv swatch swiftcover swiss sx sy sydney systems sz tab taipei talk taobao target tatamotors tatar tattoo tax taxi tc tci td tdk team tech technology tel temasek tennis teva tf tg th thd theater theatre tiaa tickets tienda tiffany tips tires tirol tj tjmaxx tjx tk tkmaxx tl tm tmall tn to today tokyo tools top toray toshiba total tours town toyota toys tr trade trading training travel travelchannel travelers travelersinsurance trust trv tt tube tui tunes tushu tv tvs tw tz ua ubank ubs ug uk unicom university uno uol ups us uy uz va vacations vana vanguard vc ve vegas ventures verisign versicherung vet vg vi viajes video vig viking villas vin vip virgin visa vision viva vivo vlaanderen vn vodka volkswagen volvo vote voting voto voyage vu vuelos wales walmart walter wang wanggou watch watches weather weatherchannel webcam weber website wed wedding weibo weir wf whoswho wien wiki williamhill win windows wine winners wme wolterskluwer woodside work works world wow ws wtc wtf xbox xerox xfinity xihuan xin xxx xyz yachts yahoo yamaxun yandex ye yodobashi yoga yokohama you youtube yt yun za zappos zara zero zip zm zone zuerich zw vermögensberater-ctb vermögensberatung-pwb ελ ευ бг бел дети ею католик ком қаз мкд мон москва онлайн орг рус рф сайт срб укр გე հայ ישראל קום ابوظبي اتصالات ارامكو الاردن البحرين الجزائر السعودية العليان المغرب امارات ایران بارت بازار بھارت بيتك پاکستان ڀارت تونس سودان سورية شبكة عراق عرب عمان فلسطين قطر كاثوليك كوم مصر مليسيا موريتانيا موقع همراه कॉम नेट भारत भारतम् भारोत संगठन বাংলা ভারত ভাৰত ਭਾਰਤ ભારત ଭାରତ இந்தியா இலங்கை சிங்கப்பூர் భారత్ ಭಾರತ ഭാരതം ලංකා คอม ไทย ລາວ 닷넷 닷컴 삼성 한국 アマゾン グーグル クラウド コム ストア セール ファッション ポイント みんな 世界 中信 中国 中國 中文网 亚马逊 企业 佛山 信息 健康 八卦 公司 公益 台湾 台灣 商城 商店 商标 嘉里 嘉里大酒店 在线 大众汽车 大拿 天主教 娱乐 家電 广东 微博 慈善 我爱你 手机 招聘 政务 政府 新加坡 新闻 时尚 書籍 机构 淡马锡 游戏 澳門 点看 移动 组织机构 网址 网店 网站 网络 联通 诺基亚 谷歌 购物 通販 集团 電訊盈科 飞利浦 食品 餐厅 香格里拉 香港".split(" "),GN=/(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/,ZN=/(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEDD-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDDFF\uDE70-\uDE74\uDE78-\uDE7C\uDE80-\uDE86\uDE90-\uDEAC\uDEB0-\uDEBA\uDEC0-\uDEC5\uDED0-\uDED9\uDEE0-\uDEE7\uDEF0-\uDEF6])/,JN=/\uFE0F/,XN=/\d/,eT=/\s/;function tT(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=XO(),n=eN(uN),r=eN(aN),i=XO(),o=eN(hN),s=[[XN,r],[GN,r],[ZN,r],[JN,r]],a=function(){var e=eN(aN);return e.j={"-":i},e.jr=[].concat(s),e},l=function(e){var t=a();return t.t=e,t};oN(t,[["'",eN(kN)],["{",eN(mN)],["[",eN(gN)],["<",eN(bN)],["(",eN(yN)],["}",eN(vN)],["]",eN(wN)],[">",eN(xN)],[")",eN(EN)],["&",eN(MN)],["*",eN(_N)],["@",eN(DN)],["`",eN(ON)],["^",eN(NN)],[":",eN(TN)],[",",eN(SN)],["$",eN(AN)],[".",eN(IN)],["=",eN(LN)],["!",eN(jN)],["-",eN(zN)],["%",eN(FN)],["|",eN(PN)],["+",eN(RN)],["#",eN(BN)],["?",eN(UN)],['"',eN($N)],["/",eN(WN)],[";",eN(HN)],["~",eN(VN)],["_",eN(qN)],["\\",eN(CN)]]),tN(t,"\n",eN(fN)),nN(t,eT,o),tN(o,"\n",XO()),nN(o,eT,o);for(var c=0;c<QN.length;c++)sN(t,QN[c],l(cN),a);var u=a(),d=a(),p=a(),h=a();sN(t,"file",u,a),sN(t,"ftp",d,a),sN(t,"http",p,a),sN(t,"mailto",h,a);var f=a(),m=eN(dN),g=eN(pN);tN(d,"s",f),tN(d,":",m),tN(p,"s",f),tN(p,":",m),tN(u,":",m),tN(f,":",m),tN(h,":",g);for(var b=a(),y=0;y<e.length;y++)sN(t,e[y],b,a);return tN(b,":",m),sN(t,"localhost",l(lN),a),nN(t,XN,n),nN(t,GN,r),nN(t,ZN,r),nN(t,JN,r),nN(n,XN,n),nN(n,GN,r),nN(n,ZN,r),nN(n,JN,r),tN(n,"-",i),tN(r,"-",i),tN(i,"-",i),nN(r,XN,r),nN(r,GN,r),nN(r,ZN,r),nN(r,JN,r),nN(i,XN,r),nN(i,GN,r),nN(i,ZN,r),nN(i,JN,r),t.jd=eN(YN),t}var nT={defaultProtocol:"http",events:null,format:rT,formatHref:rT,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:0,className:null,attributes:null,ignoreTags:[]};function rT(e){return e}function iT(){}function oT(e,t){function n(t,n){this.t=e,this.v=t,this.tk=n}return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Object.create(e.prototype);for(var i in n)r[i]=n[i];r.constructor=t,t.prototype=r}(iT,n,t),n}iT.prototype={t:"token",isLink:!1,toString:function(){return this.v},toHref:function(){return this.toString()},startIndex:function(){return this.tk[0].s},endIndex:function(){return this.tk[this.tk.length-1].e},toObject:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:nT.defaultProtocol;return{type:this.t,value:this.v,isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}}};var sT=oT("email",{isLink:!0}),aT=oT("email",{isLink:!0,toHref:function(){return"mailto:"+this.toString()}}),lT=oT("text"),cT=oT("nl"),uT=oT("url",{isLink:!0,toHref:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:nT.defaultProtocol,t=this.tk,n=!1,r=!1,i=[],o=0;t[o].t===dN;)n=!0,i.push(t[o].v),o++;for(;t[o].t===WN;)r=!0,i.push(t[o].v),o++;for(;o<t.length;o++)i.push(t[o].v);return i=i.join(""),n||r||(i="".concat(e,"://").concat(i)),i},hasProtocol:function(){return this.tk[0].t===dN}}),dT=Object.freeze({__proto__:null,MultiToken:iT,Base:iT,createTokenClass:oT,MailtoEmail:sT,Email:aT,Text:lT,Nl:cT,Url:uT});function pT(){var e=XO(),t=XO(),n=XO(),r=XO(),i=XO(),o=XO(),s=XO(),a=eN(uT),l=XO(),c=eN(uT),u=eN(uT),d=XO(),p=XO(),h=XO(),f=XO(),m=XO(),g=eN(uT),b=eN(uT),y=eN(uT),v=eN(uT),w=XO(),x=XO(),E=XO(),M=XO(),k=XO(),_=XO(),D=eN(aT),C=XO(),O=eN(aT),N=eN(sT),T=XO(),S=XO(),A=XO(),I=XO(),L=eN(cT);tN(e,fN,L),tN(e,dN,t),tN(e,pN,n),tN(t,WN,r),tN(r,WN,i),tN(e,cN,o),tN(e,aN,o),tN(e,lN,a),tN(e,uN,o),tN(i,cN,u),tN(i,aN,u),tN(i,uN,u),tN(i,lN,u),tN(o,IN,s),tN(k,IN,_),tN(s,cN,a),tN(s,aN,o),tN(s,uN,o),tN(s,lN,o),tN(_,cN,D),tN(_,aN,k),tN(_,uN,k),tN(_,lN,k),tN(a,IN,s),tN(D,IN,_),tN(a,TN,l),tN(a,WN,u),tN(l,uN,c),tN(c,WN,u),tN(D,TN,C),tN(C,uN,O);var j=[MN,_N,DN,CN,ON,NN,AN,aN,LN,zN,lN,uN,FN,PN,RN,BN,dN,WN,YN,VN,cN,qN],z=[kN,xN,vN,wN,EN,TN,SN,IN,jN,bN,mN,gN,yN,UN,$N,HN];tN(u,mN,p),tN(u,gN,h),tN(u,bN,f),tN(u,yN,m),tN(d,mN,p),tN(d,gN,h),tN(d,bN,f),tN(d,yN,m),tN(p,vN,u),tN(h,wN,u),tN(f,xN,u),tN(m,EN,u),tN(g,vN,u),tN(b,wN,u),tN(y,xN,u),tN(v,EN,u),tN(w,vN,u),tN(x,wN,u),tN(E,xN,u),tN(M,EN,u),iN(p,j,g),iN(h,j,b),iN(f,j,y),iN(m,j,v),iN(p,z,w),iN(h,z,x),iN(f,z,E),iN(m,z,M),iN(g,j,g),iN(b,j,b),iN(y,j,y),iN(v,j,v),iN(g,z,g),iN(b,z,b),iN(y,z,y),iN(v,z,v),iN(w,j,g),iN(x,j,b),iN(E,j,y),iN(M,j,v),iN(w,z,w),iN(x,z,x),iN(E,z,E),iN(M,z,M),iN(u,j,u),iN(d,j,u),iN(u,z,d),iN(d,z,d),tN(n,cN,N),tN(n,aN,N),tN(n,uN,N),tN(n,lN,N),iN(N,j,N),iN(N,z,T),iN(T,j,N),iN(T,z,T);var F=[MN,kN,_N,CN,ON,NN,vN,AN,aN,LN,zN,uN,mN,FN,PN,RN,BN,UN,WN,YN,VN,cN,qN];return iN(o,F,S),tN(o,DN,A),iN(a,F,S),tN(a,DN,A),iN(s,F,S),iN(S,F,S),tN(S,DN,A),tN(S,IN,I),iN(I,F,S),tN(A,cN,k),tN(A,aN,k),tN(A,uN,k),tN(A,lN,D),e}function hT(e,t,n){var r=n[0].s,i=n[n.length-1].e;return new e(t.substr(r,i-r),n)}var fT="undefined"!=typeof console&&console&&console.warn||function(){},mT={scanner:null,parser:null,pluginQueue:[],customProtocols:[],initialized:!1};function gT(e){if(mT.initialized&&fT('linkifyjs: already initialized - will not register custom protocol "'.concat(e,'" until you manually call linkify.init(). To avoid this warning, please register all custom protocols before invoking linkify the first time.')),!/^[a-z-]+$/.test(e))throw Error("linkifyjs: protocols containing characters other than a-z or - (hyphen) are not supported");mT.customProtocols.push(e)}function bT(e){return mT.initialized||function(){mT.scanner={start:tT(mT.customProtocols),tokens:KN},mT.parser={start:pT(),tokens:dT};for(var e={createTokenClass:oT},t=0;t<mT.pluginQueue.length;t++)mT.pluginQueue[t][1]({scanner:mT.scanner,parser:mT.parser,utils:e});mT.initialized=!0}(),function(e,t,n){for(var r=n.length,i=0,o=[],s=[];i<r;){for(var a=e,l=null,c=null,u=0,d=null,p=-1;i<r&&!(l=rN(a,n[i].t));)s.push(n[i++]);for(;i<r&&(c=l||rN(a,n[i].t));)l=null,(a=c).accepts()?(p=0,d=a):p>=0&&p++,i++,u++;if(p<0)for(var h=i-u;h<i;h++)s.push(n[h]);else{s.length>0&&(o.push(hT(lT,t,s)),s=[]),i-=p,u-=p;var f=d.t,m=n.slice(i-u,i);o.push(hT(f,t,m))}}return s.length>0&&o.push(hT(lT,t,s)),o}(mT.parser.start,e,function(e,t){for(var n=function(e){for(var t=[],n=e.length,r=0;r<n;){var i=e.charCodeAt(r),o=void 0,s=i<55296||i>56319||r+1===n||(o=e.charCodeAt(r+1))<56320||o>57343?e[r]:e.slice(r,r+2);t.push(s),r+=s.length}return t}(t.replace(/[A-Z]/g,(function(e){return e.toLowerCase()}))),r=n.length,i=[],o=0,s=0;s<r;){for(var a=e,l=null,c=0,u=null,d=-1,p=-1;s<r&&(l=rN(a,n[s]));)(a=l).accepts()?(d=0,p=0,u=a):d>=0&&(d+=n[s].length,p++),c+=n[s].length,o+=n[s].length,s++;o-=d,s-=p,c-=d,i.push({t:u.t,v:t.substr(o-c,c),s:o-c,e:o})}return i}(mT.scanner.start,e))}function yT(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=bT(e),r=[],i=0;i<n.length;i++){var o=n[i];!o.isLink||t&&o.t!==t||r.push(o.toObject())}return r}function vT(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=bT(e);return 1===n.length&&n[0].isLink&&(!t||n[0].t===t)}function wT(e){return new Qt({key:new Jt("autolink"),appendTransaction:(t,n,r)=>{const i=t.some((e=>e.docChanged))&&!n.doc.eq(r.doc),o=t.some((e=>e.getMeta("preventAutolink")));if(!i||o)return;const{tr:s}=r,a=function(e,t){const n=new _t(e);return t.forEach((e=>{e.steps.forEach((e=>{n.step(e)}))})),n}(n.doc,[...t]),{mapping:l}=a,c=function(e){const{mapping:t,steps:n}=e,r=[];return t.maps.forEach(((e,i)=>{const o=[];if(e.ranges.length)e.forEach(((e,t)=>{o.push({from:e,to:t})}));else{const{from:e,to:t}=n[i];if(void 0===e||void 0===t)return;o.push({from:e,to:t})}o.forEach((({from:e,to:n})=>{const o=t.slice(i).map(e,-1),s=t.slice(i).map(n),a=t.invert().map(o,-1),l=t.invert().map(s);r.push({oldRange:{from:a,to:l},newRange:{from:o,to:s}})}))})),Hs(r)}(a);return c.forEach((({oldRange:t,newRange:i})=>{Ws(t.from,t.to,n.doc).filter((t=>t.mark.type===e.type)).forEach((t=>{const i=Ws(l.map(t.from),l.map(t.to),r.doc).filter((t=>t.mark.type===e.type));if(!i.length)return;const o=i[0],a=n.doc.textBetween(t.from,t.to,void 0," "),c=r.doc.textBetween(o.from,o.to,void 0," "),u=vT(a),d=vT(c);u&&!d&&s.removeMark(o.from,o.to,e.type)})),function(e,t,n){const r=[];return e.nodesBetween(t.from,t.to,((e,t)=>{n(e)&&r.push({node:e,pos:t})})),r}(r.doc,i,(e=>e.isTextblock)).forEach((t=>{yT(r.doc.textBetween(t.pos,t.pos+t.node.nodeSize,void 0," ")).filter((e=>e.isLink)).filter((t=>!e.validate||e.validate(t.value))).map((e=>({...e,from:t.pos+e.start+1,to:t.pos+e.end+1}))).filter((e=>{const t=i.from>=e.from&&i.from<=e.to,n=i.to>=e.from&&i.to<=e.to;return t||n})).forEach((t=>{s.addMark(t.from,t.to,e.type.create({href:t.href}))}))}))})),s.steps.length?s:void 0}})}const xT=Zs.create({name:"link",priority:1e3,keepOnSplit:!1,onCreate(){this.options.protocols.forEach(gT)},inclusive(){return this.options.autolink},addOptions:()=>({openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},validate:void 0}),addAttributes(){return{href:{default:null},target:{default:this.options.HTMLAttributes.target},class:{default:this.options.HTMLAttributes.class}}},parseHTML:()=>[{tag:'a[href]:not([href *= "javascript:" i])'}],renderHTML({HTMLAttributes:e}){return["a",Bo(this.options.HTMLAttributes,e),0]},addCommands(){return{setLink:e=>({chain:t})=>t().setMark(this.name,e).setMeta("preventAutolink",!0).run(),toggleLink:e=>({chain:t})=>t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run(),unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[Xs({find:e=>yT(e).filter((e=>!this.options.validate||this.options.validate(e.value))).filter((e=>e.isLink)).map((e=>({text:e.value,index:e.start,data:e}))),type:this.type,getAttributes:e=>{var t;return{href:null===(t=e.data)||void 0===t?void 0:t.href}}})]},addProseMirrorPlugins(){const e=[];var t;return this.options.autolink&&e.push(wT({type:this.type,validate:this.options.validate})),this.options.openOnClick&&e.push((t={type:this.type},new Qt({key:new Jt("handleClickLink"),props:{handleClick:(e,n,r)=>{var i;const o=Bs(e.state,t.type.name);return!(!(null===(i=r.target)||void 0===i?void 0:i.closest("a"))||!o.href||(window.open(o.href,o.target),0))}}}))),this.options.linkOnPaste&&e.push(function(e){return new Qt({key:new Jt("handlePasteLink"),props:{handlePaste:(t,n,r)=>{const{state:i}=t,{selection:o}=i,{empty:s}=o;if(s)return!1;let a="";r.content.forEach((e=>{a+=e.textContent}));const l=yT(a).find((e=>e.isLink&&e.value===a));return!(!a||!l||(e.editor.commands.setMark(e.type,{href:l.href}),0))}}})}({editor:this.editor,type:this.type})),e}}),ET=Zs.create({name:"underline",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>!!e.includes("underline")&&{}}],renderHTML({HTMLAttributes:e}){return["u",Bo(this.options.HTMLAttributes,e),0]},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),MT=/^\s*>\s$/,kT=Js.create({name:"blockquote",addOptions:()=>({HTMLAttributes:{}}),content:"block+",group:"block",defining:!0,parseHTML:()=>[{tag:"blockquote"}],renderHTML({HTMLAttributes:e}){return["blockquote",Bo(this.options.HTMLAttributes,e),0]},addCommands(){return{setBlockquote:()=>({commands:e})=>e.wrapIn(this.name),toggleBlockquote:()=>({commands:e})=>e.toggleWrap(this.name),unsetBlockquote:()=>({commands:e})=>e.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[Gs({find:MT,type:this.type})]}}),_T=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))$/,DT=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))/g,CT=/(?:^|\s)((?:__)((?:[^__]+))(?:__))$/,OT=/(?:^|\s)((?:__)((?:[^__]+))(?:__))/g,NT=Zs.create({name:"bold",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"strong"},{tag:"b",getAttrs:e=>"normal"!==e.style.fontWeight&&null},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}],renderHTML({HTMLAttributes:e}){return["strong",Bo(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[qs({find:_T,type:this.type}),qs({find:CT,type:this.type})]},addPasteRules(){return[Xs({find:DT,type:this.type}),Xs({find:OT,type:this.type})]}}),TT=/^\s*([-+*])\s$/,ST=Js.create({name:"bulletList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{}}),group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML:()=>[{tag:"ul"}],renderHTML({HTMLAttributes:e}){return["ul",Bo(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleBulletList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){return[Gs({find:TT,type:this.type})]}}),AT=/^```([a-z]+)?[\s\n]$/,IT=/^~~~([a-z]+)?[\s\n]$/,LT=Js.create({name:"codeBlock",addOptions:()=>({languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,HTMLAttributes:{}}),content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:null,parseHTML:e=>{var t;const{languageClassPrefix:n}=this.options,r=[...(null===(t=e.firstElementChild)||void 0===t?void 0:t.classList)||[]].filter((e=>e.startsWith(n))).map((e=>e.replace(n,"")))[0];return r||null},rendered:!1}}},parseHTML:()=>[{tag:"pre",preserveWhitespace:"full"}],renderHTML({node:e,HTMLAttributes:t}){return["pre",Bo(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=1===t.pos;return!(!e||t.parent.type.name!==this.name)&&(!(!n&&t.parent.textContent.length)&&this.editor.commands.clearNodes())},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,s=r.parent.textContent.endsWith("\n\n");return!(!o||!s)&&e.chain().command((({tr:e})=>(e.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)return!1;if(!(i.parentOffset===i.parent.nodeSize-2))return!1;const s=i.after();if(void 0===s)return!1;return!r.nodeAt(s)&&e.commands.exitCode()}}},addInputRules(){return[Ks({find:AT,type:this.type,getAttributes:e=>({language:e[1]})}),Ks({find:IT,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new Qt({key:new Jt("codeBlockVSCodeHandler"),props:{handlePaste:(e,t)=>{if(!t.clipboardData)return!1;if(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=null==i?void 0:i.mode;if(!n||!o)return!1;const{tr:s}=e.state;return s.replaceSelectionWith(this.type.create({language:o})),s.setSelection(St.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.insertText(n.replace(/\r\n?/g,"\n")),s.setMeta("paste",!0),e.dispatch(s),!0}}})]}}),jT=Js.create({name:"doc",topNode:!0,content:"block+"});function zT(e={}){return new Qt({view:t=>new FT(t,e)})}class FT{constructor(e,t){this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=t.width||1,this.color=t.color||"black",this.class=t.class,this.handlers=["dragover","dragend","drop","dragleave"].map((t=>{let n=e=>{this[t](e)};return e.dom.addEventListener(t,n),{name:t,handler:n}}))}destroy(){this.handlers.forEach((({name:e,handler:t})=>this.editorView.dom.removeEventListener(e,t)))}update(e,t){null!=this.cursorPos&&t.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,null==e?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e,t=this.editorView.state.doc.resolve(this.cursorPos);if(!t.parent.inlineContent){let n=t.nodeBefore,r=t.nodeAfter;if(n||r){let t=this.editorView.nodeDOM(this.cursorPos-(n?n.nodeSize:0)).getBoundingClientRect(),i=n?t.bottom:t.top;n&&r&&(i=(i+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),e={left:t.left,right:t.right,top:i-this.width/2,bottom:i+this.width/2}}}if(!e){let t=this.editorView.coordsAtPos(this.cursorPos);e={left:t.left-this.width/2,right:t.left+this.width/2,top:t.top,bottom:t.bottom}}let n,r,i=this.editorView.dom.offsetParent;if(this.element||(this.element=i.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none; background-color: "+this.color),!i||i==document.body&&"static"==getComputedStyle(i).position)n=-pageXOffset,r=-pageYOffset;else{let e=i.getBoundingClientRect();n=e.left-i.scrollLeft,r=e.top-i.scrollTop}this.element.style.left=e.left-n+"px",this.element.style.top=e.top-r+"px",this.element.style.width=e.right-e.left+"px",this.element.style.height=e.bottom-e.top+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout((()=>this.setCursor(null)),e)}dragover(e){if(!this.editorView.editable)return;let t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),n=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),r=n&&n.type.spec.disableDropCursor,i="function"==typeof r?r(this.editorView,t):r;if(t&&!i){let e=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice&&(e=pt(this.editorView.state.doc,e,this.editorView.dragging.slice),null==e))return this.setCursor(null);this.setCursor(e),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){e.target!=this.editorView.dom&&this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}const PT=is.create({name:"dropCursor",addOptions:()=>({color:"currentColor",width:1,class:void 0}),addProseMirrorPlugins(){return[zT(this.options)]}}),RT="undefined"!=typeof navigator?navigator:null,BT="undefined"!=typeof document?document:null,UT=RT&&RT.userAgent||"",$T=/Edge\/(\d+)/.exec(UT),HT=/MSIE \d/.exec(UT),WT=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(UT),VT=!!(HT||WT||$T),qT=HT?document.documentMode:WT?+WT[1]:$T?+$T[1]:0,YT=!VT&&/gecko\/(\d+)/i.test(UT);YT&&(/Firefox\/(\d+)/.exec(UT)||[0,0])[1];const KT=!VT&&/Chrome\/(\d+)/.exec(UT),QT=!!KT,GT=KT?+KT[1]:0,ZT=!VT&&!!RT&&/Apple Computer/.test(RT.vendor),JT=ZT&&(/Mobile\/\w+/.test(UT)||!!RT&&RT.maxTouchPoints>2),XT=JT||!!RT&&/Mac/.test(RT.platform),eS=/Android \d/.test(UT),tS=!!BT&&"webkitFontSmoothing"in BT.documentElement.style,nS=tS?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,rS=function(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t},iS=/^(img|br|input|textarea|hr)$/i;function oS(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:sS(e))){let n=e.parentNode;if(!n||1!=n.nodeType||aS(e)||iS.test(e.nodeName)||"false"==e.contentEditable)return!1;t=rS(e)+(i<0?0:1),e=n}else{if(1!=e.nodeType)return!1;if("false"==(e=e.childNodes[t+(i<0?-1:0)]).contentEditable)return!1;t=i<0?sS(e):0}}}function sS(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function aS(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 lS=function(e){let t=e.isCollapsed;return t&&QT&&e.rangeCount&&!e.getRangeAt(0).collapsed&&(t=!1),t};function cS(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}function uS(e,t=null){let n=e.domSelection(),r=e.state.doc;if(!n.focusNode)return null;let i=e.docView.nearestDesc(n.focusNode),o=i&&0==i.size,s=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let a,l,c=r.resolve(s);if(lS(n)){for(a=c;i&&!i.node;)i=i.parent;let e=i.node;if(i&&e.isAtom&&It.isSelectable(e)&&i.parent&&(!e.isInline||!function(e,t,n){for(let r=0==t,i=t==sS(e);r||i;){if(e==n)return!0;let t=rS(e);if(!(e=e.parentNode))return!1;r=r&&0==t,i=i&&t==sS(e)}}(n.focusNode,n.focusOffset,i.dom))){let e=i.posBefore;l=new It(s==e?c:r.resolve(e))}}else{let t=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(t<0)return null;a=r.resolve(t)}if(!l){l=yS(e,a,c,"pointer"==t||e.state.selection.head<c.pos&&!o?1:-1)}return l}function dS(e){return e.editable?e.hasFocus():function(e){let t=e.domSelection();if(!t.anchorNode)return!1;try{return e.dom.contains(3==t.anchorNode.nodeType?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(3==t.focusNode.nodeType?t.focusNode.parentNode:t.focusNode))}catch(e){return!1}}(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function pS(e,t=!1){let n=e.state.selection;if(function(e,t){if(t instanceof It){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(bS(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else bS(e)}(e,n),dS(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&QT){let t=e.domSelection(),n=e.domObserver.currentSelection;if(t.anchorNode&&n.anchorNode&&(r=t.anchorNode,i=t.anchorOffset,o=n.anchorNode,s=n.anchorOffset,o&&(oS(r,i,o,s,-1)||oS(r,i,o,s,1))))return e.input.mouseDown.delayedSelectionSync=!0,void e.domObserver.setCurSelection()}var r,i,o,s;if(e.domObserver.disconnectSelection(),e.cursorWrapper)!function(e){let t=e.domSelection(),n=document.createRange(),r=e.cursorWrapper.dom,i="IMG"==r.nodeName;i?n.setEnd(r.parentNode,rS(r)+1):n.setEnd(r,0);n.collapse(!1),t.removeAllRanges(),t.addRange(n),!i&&!e.state.selection.visible&&VT&&qT<=11&&(r.disabled=!0,r.disabled=!1)}(e);else{let r,i,{anchor:o,head:s}=n;!hS||n instanceof St||(n.$from.parent.inlineContent||(r=fS(e,n.from)),n.empty||n.$from.parent.inlineContent||(i=fS(e,n.to))),e.docView.setSelection(o,s,e.root,t),hS&&(r&&gS(r),i&&gS(i)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&function(e){let t=e.dom.ownerDocument;t.removeEventListener("selectionchange",e.input.hideSelectionGuard);let n=e.domSelection(),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((()=>{dS(e)&&!e.state.selection.visible||e.dom.classList.remove("ProseMirror-hideselection")}),20))})}(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}const hS=ZT||QT&&GT<63;function fS(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(ZT&&i&&"false"==i.contentEditable)return mS(i);if(!(i&&"false"!=i.contentEditable||o&&"false"!=o.contentEditable)){if(i)return mS(i);if(o)return mS(o)}}function mS(e){return e.contentEditable="true",ZT&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function gS(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function bS(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function yS(e,t,n,r){return e.someProp("createSelectionBetween",(r=>r(e,t,n)))||St.between(t,n,r)}function vS(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&&Ct.findFrom(o,t)}function wS(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function xS(e,t,n){let r=e.state.selection;if(!(r instanceof St)){if(r instanceof It&&r.node.isInline)return wS(e,new St(t>0?r.$to:r.$from));{let n=vS(e.state,t);return!!n&&wS(e,n)}}if(!r.empty||n.indexOf("s")>-1)return!1;if(e.endOfTextblock(t>0?"right":"left")){let n=vS(e.state,t);return!!(n&&n instanceof It)&&wS(e,n)}if(!(XT&&n.indexOf("m")>-1)){let n,i=r.$head,o=i.textOffset?null:t<0?i.nodeBefore:i.nodeAfter;if(!o||o.isText)return!1;let s=t<0?i.pos-o.nodeSize:i.pos;return!!(o.isAtom||(n=e.docView.descAt(s))&&!n.contentDOM)&&(It.isSelectable(o)?wS(e,new It(t<0?e.state.doc.resolve(i.pos-o.nodeSize):i)):!!tS&&wS(e,new St(e.state.doc.resolve(t<0?s:s+o.nodeSize))))}}function ES(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function MS(e){let t=e.pmViewDesc;return t&&0==t.size&&(e.nextSibling||"BR"!=e.nodeName)}function kS(e){let t=e.domSelection(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i,o,s=!1;for(YT&&1==n.nodeType&&r<ES(n)&&MS(n.childNodes[r])&&(s=!0);;)if(r>0){if(1!=n.nodeType)break;{let e=n.childNodes[r-1];if(MS(e))i=n,o=--r;else{if(3!=e.nodeType)break;n=e,r=n.nodeValue.length}}}else{if(DS(n))break;{let t=n.previousSibling;for(;t&&MS(t);)i=n.parentNode,o=rS(t),t=t.previousSibling;if(t)n=t,r=ES(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}}s?CS(e,t,n,r):i&&CS(e,t,i,o)}function _S(e){let t=e.domSelection(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i,o,s=ES(n);for(;;)if(r<s){if(1!=n.nodeType)break;if(!MS(n.childNodes[r]))break;i=n,o=++r}else{if(DS(n))break;{let t=n.nextSibling;for(;t&&MS(t);)i=t.parentNode,o=rS(t)+1,t=t.nextSibling;if(t)n=t,r=0,s=ES(n);else{if(n=n.parentNode,n==e.dom)break;r=s=0}}}i&&CS(e,t,i,o)}function DS(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function CS(e,t,n,r){if(lS(t)){let e=document.createRange();e.setEnd(n,r),e.setStart(n,r),t.removeAllRanges(),t.addRange(e)}else t.extend&&t.extend(n,r);e.domObserver.setCurSelection();let{state:i}=e;setTimeout((()=>{e.state==i&&pS(e)}),50)}function OS(e,t,n){let r=e.state.selection;if(r instanceof St&&!r.empty||n.indexOf("s")>-1)return!1;if(XT&&n.indexOf("m")>-1)return!1;let{$from:i,$to:o}=r;if(!i.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let n=vS(e.state,t);if(n&&n instanceof It)return wS(e,n)}if(!i.parent.inlineContent){let n=t<0?i:o,s=r instanceof jt?Ct.near(n,t):Ct.findFrom(n,t);return!!s&&wS(e,s)}return!1}function NS(e,t){if(!(e.state.selection instanceof St))return!0;let{$head:n,$anchor:r,empty:i}=e.state.selection;if(!n.sameParent(r))return!0;if(!i)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let o=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(o&&!o.isText){let r=e.state.tr;return t<0?r.delete(n.pos-o.nodeSize,n.pos):r.delete(n.pos,n.pos+o.nodeSize),e.dispatch(r),!0}return!1}function TS(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function SS(e,t){let n=t.keyCode,r=function(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}(t);return 8==n||XT&&72==n&&"c"==r?NS(e,-1)||kS(e):46==n||XT&&68==n&&"c"==r?NS(e,1)||_S(e):13==n||27==n||(37==n||XT&&66==n&&"c"==r?xS(e,-1,r)||kS(e):39==n||XT&&70==n&&"c"==r?xS(e,1,r)||_S(e):38==n||XT&&80==n&&"c"==r?OS(e,-1,r)||kS(e):40==n||XT&&78==n&&"c"==r?function(e){if(!ZT||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelection();if(t&&1==t.nodeType&&0==n&&t.firstChild&&"false"==t.firstChild.contentEditable){let n=t.firstChild;TS(e,n,"true"),setTimeout((()=>TS(e,n,"false")),20)}return!1}(e)||OS(e,1,r)||_S(e):r==(XT?"m":"c")&&(66==n||73==n||89==n||90==n))}function AS(e,t){let n=[],{content:r,openStart:i,openEnd:o}=t;for(;i>1&&o>1&&1==r.childCount&&1==r.firstChild.childCount;){i--,o--;let e=r.firstChild;n.push(e.type.name,e.attrs!=e.type.defaultAttrs?e.attrs:null),r=e.content}let s=e.someProp("clipboardSerializer")||Fe.fromSchema(e.state.schema),a=$S(),l=a.createElement("div");l.appendChild(s.serializeFragment(r,{document:a}));let c,u=l.firstChild,d=0;for(;u&&1==u.nodeType&&(c=BS[u.nodeName.toLowerCase()]);){for(let e=c.length-1;e>=0;e--){let t=a.createElement(c[e]);for(;l.firstChild;)t.appendChild(l.firstChild);l.appendChild(t),d++}u=l.firstChild}u&&1==u.nodeType&&u.setAttribute("data-pm-slice",`${i} ${o}${d?` -${d}`:""} ${JSON.stringify(n)}`);let p=e.someProp("clipboardTextSerializer",(e=>e(t)))||t.content.textBetween(0,t.content.size,"\n\n");return{dom:l,text:p}}function IS(e,t,n,r,i){let o,s,a=i.parent.type.spec.code;if(!n&&!t)return null;let l=t&&(r||a||!n);if(l){if(e.someProp("transformPastedText",(e=>{t=e(t,a||r)})),a)return t?new B(L.from(e.state.schema.text(t.replace(/\r\n?/g,"\n"))),0,0):B.empty;let n=e.someProp("clipboardTextParser",(e=>e(t,i,r)));if(n)s=n;else{let n=i.marks(),{schema:r}=e.state,s=Fe.fromSchema(r);o=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach((e=>{let t=o.appendChild(document.createElement("p"));e&&t.appendChild(s.serializeNode(r.text(e,n)))}))}}else e.someProp("transformPastedHTML",(e=>{n=e(n)})),o=function(e){let t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n,r=$S().createElement("div"),i=/<([a-z][^>\s]+)/i.exec(e);(n=i&&BS[i[1].toLowerCase()])&&(e=n.map((e=>"<"+e+">")).join("")+e+n.map((e=>"</"+e+">")).reverse().join(""));if(r.innerHTML=e,n)for(let e=0;e<n.length;e++)r=r.querySelector(n[e])||r;return r}(n),tS&&function(e){let t=e.querySelectorAll(QT?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<t.length;n++){let r=t[n];1==r.childNodes.length&&" "==r.textContent&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),r)}}(o);let c=o&&o.querySelector("[data-pm-slice]"),u=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(u&&u[3])for(let e=+u[3];e>0&&o.firstChild;e--)o=o.firstChild;if(!s){let t=e.someProp("clipboardParser")||e.someProp("domParser")||ke.fromSchema(e.state.schema);s=t.parseSlice(o,{preserveWhitespace:!(!l&&!u),context:i,ruleFromNode:e=>"BR"!=e.nodeName||e.nextSibling||!e.parentNode||LS.test(e.parentNode.nodeName)?null:{ignore:!0}})}if(u)s=function(e,t){if(!e.size)return e;let n,r=e.content.firstChild.type.schema;try{n=JSON.parse(t)}catch(t){return e}let{content:i,openStart:o,openEnd:s}=e;for(let e=n.length-2;e>=0;e-=2){let t=r.nodes[n[e]];if(!t||t.hasRequiredAttrs())break;i=L.from(t.create(n[e+1],i)),o++,s++}return new B(i,o,s)}(RS(s,+u[1],+u[2]),u[4]);else if(s=B.maxOpen(function(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let r,i=t.node(n).contentMatchAt(t.index(n)),o=[];if(e.forEach((e=>{if(!o)return;let t,n=i.findWrapping(e.type);if(!n)return o=null;if(t=o.length&&r.length&&zS(n,r,e,o[o.length-1],0))o[o.length-1]=t;else{o.length&&(o[o.length-1]=FS(o[o.length-1],r.length));let t=jS(e,n);o.push(t),i=i.matchType(t.type),r=n}})),o)return L.from(o)}return e}(s.content,i),!0),s.openStart||s.openEnd){let e=0,t=0;for(let t=s.content.firstChild;e<s.openStart&&!t.type.spec.isolating;e++,t=t.firstChild);for(let e=s.content.lastChild;t<s.openEnd&&!e.type.spec.isolating;t++,e=e.lastChild);s=RS(s,e,t)}return e.someProp("transformPasted",(e=>{s=e(s)})),s}const LS=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function jS(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,L.from(e));return e}function zS(e,t,n,r,i){if(i<e.length&&i<t.length&&e[i]==t[i]){let o=zS(e,t,n,r.lastChild,i+1);if(o)return r.copy(r.content.replaceChild(r.childCount-1,o));if(r.contentMatchAt(r.childCount).matchType(i==e.length-1?n.type:e[i+1]))return r.copy(r.content.append(L.from(jS(n,e,i+1))))}}function FS(e,t){if(0==t)return e;let n=e.content.replaceChild(e.childCount-1,FS(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(L.empty,!0);return e.copy(n.append(r))}function PS(e,t,n,r,i,o){let s=t<0?e.firstChild:e.lastChild,a=s.content;return i<r-1&&(a=PS(a,t,n,r,i+1,o)),i>=n&&(a=t<0?s.contentMatchAt(0).fillBefore(a,e.childCount>1||o<=i).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(L.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,s.copy(a))}function RS(e,t,n){return t<e.openStart&&(e=new B(PS(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new B(PS(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}const BS={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let US=null;function $S(){return US||(US=document.implementation.createHTMLDocument("title"))}const HS={};let WS={};function VS(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function qS(e){return{left:e.clientX,top:e.clientY}}function YS(e,t,n,r,i){if(-1==r)return!1;let o=e.state.doc.resolve(r);for(let r=o.depth+1;r>0;r--)if(e.someProp(t,(t=>r>o.depth?t(e,n,o.nodeAfter,o.before(r),i,!0):t(e,n,o.node(r),o.before(r),i,!1))))return!0;return!1}function KS(e,t,n){e.focused||e.focus();let r=e.state.tr.setSelection(t);"pointer"==n&&r.setMeta("pointer",!0),e.dispatch(r)}function QS(e,t,n,r,i){return YS(e,"handleClickOn",t,n,r)||e.someProp("handleClick",(n=>n(e,t,r)))||(i?function(e,t){if(-1==t)return!1;let n,r,i=e.state.selection;i instanceof It&&(n=i.node);let o=e.state.doc.resolve(t);for(let e=o.depth+1;e>0;e--){let t=e>o.depth?o.nodeAfter:o.node(e);if(It.isSelectable(t)){r=n&&i.$from.depth>0&&e>=i.$from.depth&&o.before(i.$from.depth+1)==i.$from.pos?o.before(i.$from.depth):o.before(e);break}}return null!=r&&(KS(e,It.create(e.state.doc,r),"pointer"),!0)}(e,n):function(e,t){if(-1==t)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return!!(r&&r.isAtom&&It.isSelectable(r))&&(KS(e,new It(n),"pointer"),!0)}(e,n))}function GS(e,t,n,r){return YS(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",(n=>n(e,t,r)))}function ZS(e,t,n,r){return YS(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",(n=>n(e,t,r)))||function(e,t,n){if(0!=n.button)return!1;let r=e.state.doc;if(-1==t)return!!r.inlineContent&&(KS(e,St.create(r,0,r.content.size),"pointer"),!0);let i=r.resolve(t);for(let t=i.depth+1;t>0;t--){let n=t>i.depth?i.nodeAfter:i.node(t),o=i.before(t);if(n.inlineContent)KS(e,St.create(r,o+1,o+1+n.content.size),"pointer");else{if(!It.isSelectable(n))continue;KS(e,It.create(r,o),"pointer")}return!0}}(e,n,r)}function JS(e){return oA(e)}WS.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=16==n.keyCode||n.shiftKey,!tA(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!eS||!QT||13!=n.keyCode))if(229!=n.keyCode&&e.domObserver.forceFlush(),!JT||13!=n.keyCode||n.ctrlKey||n.altKey||n.metaKey)e.someProp("handleKeyDown",(t=>t(e,n)))||SS(e,n)?n.preventDefault():VS(e,"key");else{let t=Date.now();e.input.lastIOSEnter=t,e.input.lastIOSEnterFallbackTimeout=setTimeout((()=>{e.input.lastIOSEnter==t&&(e.someProp("handleKeyDown",(t=>t(e,cS(13,"Enter")))),e.input.lastIOSEnter=0)}),200)}},WS.keyup=(e,t)=>{16==t.keyCode&&(e.input.shiftKey=!1)},WS.keypress=(e,t)=>{let n=t;if(tA(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||XT&&n.metaKey)return;if(e.someProp("handleKeyPress",(t=>t(e,n))))return void n.preventDefault();let r=e.state.selection;if(!(r instanceof St&&r.$from.sameParent(r.$to))){let t=String.fromCharCode(n.charCode);e.someProp("handleTextInput",(n=>n(e,r.$from.pos,r.$to.pos,t)))||e.dispatch(e.state.tr.insertText(t).scrollIntoView()),n.preventDefault()}};const XS=XT?"metaKey":"ctrlKey";HS.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=JS(e),i=Date.now(),o="singleClick";i-e.input.lastClick.time<500&&function(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}(n,e.input.lastClick)&&!n[XS]&&("singleClick"==e.input.lastClick.type?o="doubleClick":"doubleClick"==e.input.lastClick.type&&(o="tripleClick")),e.input.lastClick={time:i,x:n.clientX,y:n.clientY,type:o};let s=e.posAtCoords(qS(n));s&&("singleClick"==o?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new eA(e,s,n,!!r)):("doubleClick"==o?GS:ZS)(e,s.pos,s.inside,n)?n.preventDefault():VS(e,"pointer"))};class eA{constructor(e,t,n,r){let i,o;if(this.view=e,this.pos=t,this.event=n,this.flushed=r,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!n[XS],this.allowDefault=n.shiftKey,t.inside>-1)i=e.state.doc.nodeAt(t.inside),o=t.inside;else{let n=e.state.doc.resolve(t.pos);i=n.parent,o=n.depth?n.before():0}const s=r?null:n.target,a=s?e.docView.nearestDesc(s,!0):null;this.target=a?a.dom:null;let{selection:l}=e.state;(0==n.button&&i.type.spec.draggable&&!1!==i.type.spec.selectable||l instanceof It&&l.from<=o&&l.to>o)&&(this.mightDrag={node:i,pos:o,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!YT||this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout((()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")}),20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),VS(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout((()=>pS(this.view))),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(qS(e))),this.allowDefault||!t?VS(this.view,"pointer"):QS(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():0==e.button&&(this.flushed||ZT&&this.mightDrag&&!this.mightDrag.node.isAtom||QT&&!(this.view.state.selection instanceof St)&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(KS(this.view,Ct.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):VS(this.view,"pointer")}move(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0),VS(this.view,"pointer"),0==e.buttons&&this.done()}}function tA(e,t){return!!e.composing||!!(ZT&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500)&&(e.input.compositionEndedAt=-2e8,!0)}HS.touchdown=e=>{JS(e),VS(e,"pointer")},HS.contextmenu=e=>JS(e);const nA=eS?5e3:-1;function rA(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout((()=>oA(e)),t))}function iA(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=function(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function oA(e,t=!1){if(!(eS&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),iA(e),t||e.docView&&e.docView.dirty){let t=uS(e);return t&&!t.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(t)):e.updateState(e.state),!0}return!1}}WS.compositionstart=WS.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some((e=>!1===e.type.spec.inclusive))))e.markCursor=e.state.storedMarks||n.marks(),oA(e,!0),e.markCursor=null;else if(oA(e),YT&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let t=e.domSelection();for(let e=t.focusNode,n=t.focusOffset;e&&1==e.nodeType&&0!=n;){let r=n<0?e.lastChild:e.childNodes[n-1];if(!r)break;if(3==r.nodeType){t.collapse(r,r.nodeValue.length);break}e=r,n=-1}}e.input.composing=!0}rA(e,nA)},WS.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,rA(e,20))};const sA=VT&&qT<15||JT&&nS<604;function aA(e,t,n,r){let i=IS(e,t,n,e.input.shiftKey,e.state.selection.$from);if(e.someProp("handlePaste",(t=>t(e,r,i||B.empty))))return!0;if(!i)return!1;let o=function(e){return 0==e.openStart&&0==e.openEnd&&1==e.content.childCount?e.content.firstChild:null}(i),s=o?e.state.tr.replaceSelectionWith(o,e.input.shiftKey):e.state.tr.replaceSelection(i);return e.dispatch(s.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}HS.copy=WS.cut=(e,t)=>{let n=t,r=e.state.selection,i="cut"==n.type;if(r.empty)return;let o=sA?null:n.clipboardData,s=r.content(),{dom:a,text:l}=AS(e,s);o?(n.preventDefault(),o.clearData(),o.setData("text/html",a.innerHTML),o.setData("text/plain",l)):function(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),i=document.createRange();i.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout((()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()}),50)}(e,a),i&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))},WS.paste=(e,t)=>{let n=t;if(e.composing&&!eS)return;let r=sA?null:n.clipboardData;r&&aA(e,r.getData("text/plain"),r.getData("text/html"),n)?n.preventDefault():function(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus(),setTimeout((()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?aA(e,r.value,null,t):aA(e,r.textContent,r.innerHTML,t)}),50)}(e,n)};class lA{constructor(e,t){this.slice=e,this.move=t}}const cA=XT?"altKey":"ctrlKey";HS.dragstart=(e,t)=>{let n=t,r=e.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let i=e.state.selection,o=i.empty?null:e.posAtCoords(qS(n));if(o&&o.pos>=i.from&&o.pos<=(i instanceof It?i.to-1:i.to));else if(r&&r.mightDrag)e.dispatch(e.state.tr.setSelection(It.create(e.state.doc,r.mightDrag.pos)));else if(n.target&&1==n.target.nodeType){let t=e.docView.nearestDesc(n.target,!0);t&&t.node.type.spec.draggable&&t!=e.docView&&e.dispatch(e.state.tr.setSelection(It.create(e.state.doc,t.posBefore)))}let s=e.state.selection.content(),{dom:a,text:l}=AS(e,s);n.dataTransfer.clearData(),n.dataTransfer.setData(sA?"Text":"text/html",a.innerHTML),n.dataTransfer.effectAllowed="copyMove",sA||n.dataTransfer.setData("text/plain",l),e.dragging=new lA(s,!n[cA])},HS.dragend=e=>{let t=e.dragging;window.setTimeout((()=>{e.dragging==t&&(e.dragging=null)}),50)},WS.dragover=WS.dragenter=(e,t)=>t.preventDefault(),WS.drop=(e,t)=>{let n=t,r=e.dragging;if(e.dragging=null,!n.dataTransfer)return;let i=e.posAtCoords(qS(n));if(!i)return;let o=e.state.doc.resolve(i.pos);if(!o)return;let s=r&&r.slice;s?e.someProp("transformPasted",(e=>{s=e(s)})):s=IS(e,n.dataTransfer.getData(sA?"Text":"text/plain"),sA?null:n.dataTransfer.getData("text/html"),!1,o);let a=!(!r||n[cA]);if(e.someProp("handleDrop",(t=>t(e,n,s||B.empty,a))))return void n.preventDefault();if(!s)return;n.preventDefault();let l=s?pt(e.state.doc,o.pos,s):o.pos;null==l&&(l=o.pos);let c=e.state.tr;a&&c.deleteSelection();let u=c.mapping.map(l),d=0==s.openStart&&0==s.openEnd&&1==s.content.childCount,p=c.doc;if(d?c.replaceRangeWith(u,u,s.content.firstChild):c.replaceRange(u,u,s),c.doc.eq(p))return;let h=c.doc.resolve(u);if(d&&It.isSelectable(s.content.firstChild)&&h.nodeAfter&&h.nodeAfter.sameMarkup(s.content.firstChild))c.setSelection(new It(h));else{let t=c.mapping.map(l);c.mapping.maps[c.mapping.maps.length-1].forEach(((e,n,r,i)=>t=i)),c.setSelection(yS(e,h,c.doc.resolve(t)))}e.focus(),e.dispatch(c.setMeta("uiEvent","drop"))},HS.focus=e=>{e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout((()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelection())&&pS(e)}),20))},HS.blur=(e,t)=>{let n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)},HS.beforeinput=(e,t)=>{if(QT&&eS&&"deleteContentBackward"==t.inputType){e.domObserver.flushSoon();let{domChangeCount:t}=e.input;setTimeout((()=>{if(e.input.domChangeCount!=t)return;if(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",(t=>t(e,cS(8,"Backspace")))))return;let{$cursor:n}=e.state.selection;n&&n.pos>0&&e.dispatch(e.state.tr.delete(n.pos-1,n.pos).scrollIntoView())}),50)}};for(let e in WS)HS[e]=WS[e];function uA(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}class dA{constructor(e,t){this.toDOM=e,this.spec=t||gA,this.side=this.spec.side||0}map(e,t,n,r){let{pos:i,deleted:o}=e.mapResult(t.from+r,this.side<0?-1:1);return o?null:new fA(i-n,i-n,this)}valid(){return!0}eq(e){return this==e||e instanceof dA&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&uA(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class pA{constructor(e,t){this.attrs=e,this.spec=t||gA}map(e,t,n,r){let i=e.map(t.from+r,this.spec.inclusiveStart?-1:1)-n,o=e.map(t.to+r,this.spec.inclusiveEnd?1:-1)-n;return i>=o?null:new fA(i,o,this)}valid(e,t){return t.from<t.to}eq(e){return this==e||e instanceof pA&&uA(this.attrs,e.attrs)&&uA(this.spec,e.spec)}static is(e){return e.type instanceof pA}destroy(){}}class hA{constructor(e,t){this.attrs=e,this.spec=t||gA}map(e,t,n,r){let i=e.mapResult(t.from+r,1);if(i.deleted)return null;let o=e.mapResult(t.to+r,-1);return o.deleted||o.pos<=i.pos?null:new fA(i.pos-n,o.pos-n,this)}valid(e,t){let n,{index:r,offset:i}=e.content.findIndex(t.from);return i==t.from&&!(n=e.child(r)).isText&&i+n.nodeSize==t.to}eq(e){return this==e||e instanceof hA&&uA(this.attrs,e.attrs)&&uA(this.spec,e.spec)}destroy(){}}class fA{constructor(e,t,n){this.from=e,this.to=t,this.type=n}copy(e,t){return new fA(e,t,this.type)}eq(e,t=0){return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}map(e,t,n){return this.type.map(e,this,t,n)}static widget(e,t,n){return new fA(e,e,new dA(t,n))}static inline(e,t,n,r){return new fA(e,t,new pA(n,r))}static node(e,t,n,r){return new fA(e,t,new hA(n,r))}get spec(){return this.type.spec}get inline(){return this.type instanceof pA}}const mA=[],gA={};class bA{constructor(e,t){this.local=e.length?e:mA,this.children=t.length?t:mA}static create(e,t){return t.length?MA(t,e,0,gA):yA}find(e,t,n){let r=[];return this.findInner(null==e?0:e,null==t?1e9:t,r,0,n),r}findInner(e,t,n,r,i){for(let o=0;o<this.local.length;o++){let s=this.local[o];s.from<=t&&s.to>=e&&(!i||i(s.spec))&&n.push(s.copy(s.from+r,s.to+r))}for(let o=0;o<this.children.length;o+=3)if(this.children[o]<t&&this.children[o+1]>e){let s=this.children[o]+1;this.children[o+2].findInner(e-s,t-s,n,r+s,i)}}map(e,t,n){return this==yA||0==e.maps.length?this:this.mapInner(e,t,0,0,n||gA)}mapInner(e,t,n,r,i){let o;for(let s=0;s<this.local.length;s++){let a=this.local[s].map(e,n,r);a&&a.type.valid(t,a)?(o||(o=[])).push(a):i.onRemove&&i.onRemove(this.local[s].spec)}return this.children.length?function(e,t,n,r,i,o,s){let a=e.slice(),l=(e,t,n,r)=>{for(let s=0;s<a.length;s+=3){let l,c=a[s+1];if(c<0||e>c+o)continue;let u=a[s]+o;t>=u?a[s+1]=e<=u?-2:-1:n>=i&&(l=r-n-(t-e))&&(a[s]+=l,a[s+1]+=l)}};for(let e=0;e<n.maps.length;e++)n.maps[e].forEach(l);let c=!1;for(let t=0;t<a.length;t+=3)if(a[t+1]<0){if(-2==a[t+1]){c=!0,a[t+1]=-1;continue}let l=n.map(e[t]+o),u=l-i;if(u<0||u>=r.content.size){c=!0;continue}let d=n.map(e[t+1]+o,-1)-i,{index:p,offset:h}=r.content.findIndex(u),f=r.maybeChild(p);if(f&&h==u&&h+f.nodeSize==d){let r=a[t+2].mapInner(n,f,l+1,e[t]+o+1,s);r!=yA?(a[t]=u,a[t+1]=d,a[t+2]=r):(a[t+1]=-2,c=!0)}else c=!0}if(c){let l=function(e,t,n,r,i,o,s){function a(e,t){for(let o=0;o<e.local.length;o++){let a=e.local[o].map(r,i,t);a?n.push(a):s.onRemove&&s.onRemove(e.local[o].spec)}for(let n=0;n<e.children.length;n+=3)a(e.children[n+2],e.children[n]+t+1)}for(let n=0;n<e.length;n+=3)-1==e[n+1]&&a(e[n+2],t[n]+o+1);return n}(a,e,t,n,i,o,s),c=MA(l,r,0,s);t=c.local;for(let e=0;e<a.length;e+=3)a[e+1]<0&&(a.splice(e,3),e-=3);for(let e=0,t=0;e<c.children.length;e+=3){let n=c.children[e];for(;t<a.length&&a[t]<n;)t+=3;a.splice(t,0,c.children[e],c.children[e+1],c.children[e+2])}}return new bA(t.sort(kA),a)}(this.children,o||[],e,t,n,r,i):o?new bA(o.sort(kA),mA):yA}add(e,t){return t.length?this==yA?bA.create(e,t):this.addInner(e,t,0):this}addInner(e,t,n){let r,i=0;e.forEach(((e,o)=>{let s,a=o+n;if(s=xA(t,e,a)){for(r||(r=this.children.slice());i<r.length&&r[i]<o;)i+=3;r[i]==o?r[i+2]=r[i+2].addInner(e,s,a+1):r.splice(i,0,o,o+e.nodeSize,MA(s,e,a+1,gA)),i+=3}}));let o=wA(i?EA(t):t,-n);for(let t=0;t<o.length;t++)o[t].type.valid(e,o[t])||o.splice(t--,1);return new bA(o.length?this.local.concat(o).sort(kA):this.local,r||this.children)}remove(e){return 0==e.length||this==yA?this:this.removeInner(e,0)}removeInner(e,t){let n=this.children,r=this.local;for(let r=0;r<n.length;r+=3){let i,o=n[r]+t,s=n[r+1]+t;for(let t,n=0;n<e.length;n++)(t=e[n])&&t.from>o&&t.to<s&&(e[n]=null,(i||(i=[])).push(t));if(!i)continue;n==this.children&&(n=this.children.slice());let a=n[r+2].removeInner(i,o+1);a!=yA?n[r+2]=a:(n.splice(r,3),r-=3)}if(r.length)for(let n,i=0;i<e.length;i++)if(n=e[i])for(let e=0;e<r.length;e++)r[e].eq(n,t)&&(r==this.local&&(r=this.local.slice()),r.splice(e--,1));return n==this.children&&r==this.local?this:r.length||n.length?new bA(r,n):yA}forChild(e,t){if(this==yA)return this;if(t.isLeaf)return bA.empty;let n,r;for(let t=0;t<this.children.length;t+=3)if(this.children[t]>=e){this.children[t]==e&&(n=this.children[t+2]);break}let i=e+1,o=i+t.content.size;for(let e=0;e<this.local.length;e++){let t=this.local[e];if(t.from<o&&t.to>i&&t.type instanceof pA){let e=Math.max(i,t.from)-i,n=Math.min(o,t.to)-i;e<n&&(r||(r=[])).push(t.copy(e,n))}}if(r){let e=new bA(r.sort(kA),mA);return n?new vA([e,n]):e}return n||yA}eq(e){if(this==e)return!0;if(!(e instanceof bA)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let t=0;t<this.local.length;t++)if(!this.local[t].eq(e.local[t]))return!1;for(let t=0;t<this.children.length;t+=3)if(this.children[t]!=e.children[t]||this.children[t+1]!=e.children[t+1]||!this.children[t+2].eq(e.children[t+2]))return!1;return!0}locals(e){return _A(this.localsInner(e))}localsInner(e){if(this==yA)return mA;if(e.inlineContent||!this.local.some(pA.is))return this.local;let t=[];for(let e=0;e<this.local.length;e++)this.local[e].type instanceof pA||t.push(this.local[e]);return t}}bA.empty=new bA([],[]),bA.removeOverlap=_A;const yA=bA.empty;class vA{constructor(e){this.members=e}map(e,t){const n=this.members.map((n=>n.map(e,t,gA)));return vA.from(n)}forChild(e,t){if(t.isLeaf)return bA.empty;let n=[];for(let r=0;r<this.members.length;r++){let i=this.members[r].forChild(e,t);i!=yA&&(i instanceof vA?n=n.concat(i.members):n.push(i))}return vA.from(n)}eq(e){if(!(e instanceof vA)||e.members.length!=this.members.length)return!1;for(let t=0;t<this.members.length;t++)if(!this.members[t].eq(e.members[t]))return!1;return!0}locals(e){let t,n=!0;for(let r=0;r<this.members.length;r++){let i=this.members[r].localsInner(e);if(i.length)if(t){n&&(t=t.slice(),n=!1);for(let e=0;e<i.length;e++)t.push(i[e])}else t=i}return t?_A(n?t:t.sort(kA)):mA}static from(e){switch(e.length){case 0:return yA;case 1:return e[0];default:return new vA(e)}}}function wA(e,t){if(!t||!e.length)return e;let n=[];for(let r=0;r<e.length;r++){let i=e[r];n.push(new fA(i.from+t,i.to+t,i.type))}return n}function xA(e,t,n){if(t.isLeaf)return null;let r=n+t.nodeSize,i=null;for(let t,o=0;o<e.length;o++)(t=e[o])&&t.from>n&&t.to<r&&((i||(i=[])).push(t),e[o]=null);return i}function EA(e){let t=[];for(let n=0;n<e.length;n++)null!=e[n]&&t.push(e[n]);return t}function MA(e,t,n,r){let i=[],o=!1;t.forEach(((t,s)=>{let a=xA(e,t,s+n);if(a){o=!0;let e=MA(a,t,n+s+1,r);e!=yA&&i.push(s,s+t.nodeSize,e)}}));let s=wA(o?EA(e):e,-n).sort(kA);for(let e=0;e<s.length;e++)s[e].type.valid(t,s[e])||(r.onRemove&&r.onRemove(s[e].spec),s.splice(e--,1));return s.length||i.length?new bA(s,i):yA}function kA(e,t){return e.from-t.from||e.to-t.to}function _A(e){let t=e;for(let n=0;n<t.length-1;n++){let r=t[n];if(r.from!=r.to)for(let i=n+1;i<t.length;i++){let o=t[i];if(o.from!=r.from){o.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,o.from),DA(t,i,r.copy(o.from,r.to)));break}o.to!=r.to&&(t==e&&(t=e.slice()),t[i]=o.copy(o.from,r.to),DA(t,i+1,o.copy(r.to,o.to)))}}return t}function DA(e,t,n){for(;t<e.length&&kA(n,e[t])>0;)t++;e.splice(t,0,n)}class CA extends Ct{constructor(e){super(e,e)}map(e,t){let n=e.resolve(t.map(this.head));return CA.valid(n)?new CA(n):Ct.near(n)}content(){return B.empty}eq(e){return e instanceof CA&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,t){if("number"!=typeof t.pos)throw new RangeError("Invalid input for GapCursor.fromJSON");return new CA(e.resolve(t.pos))}getBookmark(){return new OA(this.anchor)}static valid(e){let t=e.parent;if(t.isTextblock||!function(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(0!=n)for(let e=r.child(n-1);;e=e.lastChild){if(0==e.childCount&&!e.inlineContent||e.isAtom||e.type.spec.isolating)return!0;if(e.inlineContent)return!1}else if(r.type.spec.isolating)return!0}return!0}(e)||!function(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n!=r.childCount)for(let e=r.child(n);;e=e.firstChild){if(0==e.childCount&&!e.inlineContent||e.isAtom||e.type.spec.isolating)return!0;if(e.inlineContent)return!1}else if(r.type.spec.isolating)return!0}return!0}(e))return!1;let n=t.type.spec.allowGapCursor;if(null!=n)return n;let r=t.contentMatchAt(e.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(e,t,n=!1){e:for(;;){if(!n&&CA.valid(e))return e;let r=e.pos,i=null;for(let n=e.depth;;n--){let o=e.node(n);if(t>0?e.indexAfter(n)<o.childCount:e.index(n)>0){i=o.child(t>0?e.indexAfter(n):e.index(n)-1);break}if(0==n)return null;r+=t;let s=e.doc.resolve(r);if(CA.valid(s))return s}for(;;){let o=t>0?i.firstChild:i.lastChild;if(!o){if(i.isAtom&&!i.isText&&!It.isSelectable(i)){e=e.doc.resolve(r+i.nodeSize*t),n=!1;continue e}break}i=o,r+=t;let s=e.doc.resolve(r);if(CA.valid(s))return s}return null}}}CA.prototype.visible=!1,CA.findFrom=CA.findGapCursorFrom,Ct.jsonID("gapcursor",CA);class OA{constructor(e){this.pos=e}map(e){return new OA(e.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return CA.valid(t)?new CA(t):Ct.near(t)}}const NA=Eo({ArrowLeft:TA("horiz",-1),ArrowRight:TA("horiz",1),ArrowUp:TA("vert",-1),ArrowDown:TA("vert",1)});function TA(e,t){const n="vert"==e?t>0?"down":"up":t>0?"right":"left";return function(e,r,i){let o=e.selection,s=t>0?o.$to:o.$from,a=o.empty;if(o instanceof St){if(!i.endOfTextblock(n)||0==s.depth)return!1;a=!1,s=e.doc.resolve(t>0?s.after():s.before())}let l=CA.findGapCursorFrom(s,t,a);return!!l&&(r&&r(e.tr.setSelection(new CA(l))),!0)}}function SA(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!CA.valid(r))return!1;let i=e.posAtCoords({left:n.clientX,top:n.clientY});return!(i&&i.inside>-1&&It.isSelectable(e.state.doc.nodeAt(i.inside)))&&(e.dispatch(e.state.tr.setSelection(new CA(r))),!0)}function AA(e,t){if("insertCompositionText"!=t.inputType||!(e.state.selection instanceof CA))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let i=L.empty;for(let e=r.length-1;e>=0;e--)i=L.from(r[e].createAndFill(null,i));let o=e.state.tr.replace(n.pos,n.pos,new B(i,0,0));return o.setSelection(St.near(o.doc.resolve(n.pos+1))),e.dispatch(o),!1}function IA(e){if(!(e.selection instanceof CA))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",bA.create(e.doc,[fA.widget(e.selection.head,t,{key:"gapcursor"})])}const LA=is.create({name:"gapCursor",addProseMirrorPlugins:()=>[new Qt({props:{decorations:IA,createSelectionBetween:(e,t,n)=>t.pos==n.pos&&CA.valid(n)?new CA(n):null,handleClick:SA,handleKeyDown:NA,handleDOMEvents:{beforeinput:AA}}})],extendNodeSchema(e){var t;return{allowGapCursor:null!==(t=Ho(zo(e,"allowGapCursor",{name:e.name,options:e.options,storage:e.storage})))&&void 0!==t?t:null}}}),jA=Js.create({name:"hardBreak",addOptions:()=>({keepMarks:!0,HTMLAttributes:{}}),inline:!0,group:"inline",selectable:!1,parseHTML:()=>[{tag:"br"}],renderHTML({HTMLAttributes:e}){return["br",Bo(this.options.HTMLAttributes,e)]},renderText:()=>"\n",addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:r})=>e.first([()=>e.exitCode(),()=>e.command((()=>{const{selection:e,storedMarks:i}=n;if(e.$from.parent.type.spec.isolating)return!1;const{keepMarks:o}=this.options,{splittableMarks:s}=r.extensionManager,a=i||e.$to.parentOffset&&e.$from.marks();return t().insertContent({type:this.name}).command((({tr:e,dispatch:t})=>{if(t&&a&&o){const t=a.filter((e=>s.includes(e.type.name)));e.ensureMarks(t)}return!0})).run()}))])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),zA=Js.create({name:"heading",addOptions:()=>({levels:[1,2,3,4,5,6],HTMLAttributes:{}}),content:"inline*",group:"block",defining:!0,addAttributes:()=>({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]}`,Bo(this.options.HTMLAttributes,t),0]},addCommands(){return{setHeading:e=>({commands:t})=>!!this.options.levels.includes(e.level)&&t.setNode(this.name,e),toggleHeading:e=>({commands:t})=>!!this.options.levels.includes(e.level)&&t.toggleNode(this.name,"paragraph",e)}},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=>Ks({find:new RegExp(`^(#{1,${e}})\\s$`),type:this.type,getAttributes:{level:e}})))}});var FA=200,PA=function(){};PA.prototype.append=function(e){return e.length?(e=PA.from(e),!this.length&&e||e.length<FA&&this.leafAppend(e)||this.length<FA&&e.leafPrepend(this)||this.appendInner(e)):this},PA.prototype.prepend=function(e){return e.length?PA.from(e).append(this):this},PA.prototype.appendInner=function(e){return new BA(this,e)},PA.prototype.slice=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.length),e>=t?PA.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},PA.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},PA.prototype.forEach=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)},PA.prototype.map=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length);var r=[];return this.forEach((function(t,n){return r.push(e(t,n))}),t,n),r},PA.from=function(e){return e instanceof PA?e:e&&e.length?new RA(e):PA.empty};var RA=function(e){function t(t){e.call(this),this.values=t}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(e,n){return 0==e&&n==this.length?this:new t(this.values.slice(e,n))},t.prototype.getInner=function(e){return this.values[e]},t.prototype.forEachInner=function(e,t,n,r){for(var i=t;i<n;i++)if(!1===e(this.values[i],r+i))return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){for(var i=t-1;i>=n;i--)if(!1===e(this.values[i],r+i))return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=FA)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=FA)return new t(e.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(PA);PA.empty=new RA([]);var BA=function(e){function t(t,n){e.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.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(e){return e<this.left.length?this.left.get(e):this.right.get(e-this.left.length)},t.prototype.forEachInner=function(e,t,n,r){var i=this.left.length;return!(t<i&&!1===this.left.forEachInner(e,t,Math.min(n,i),r))&&(!(n>i&&!1===this.right.forEachInner(e,Math.max(t-i,0),Math.min(this.length,n)-i,r+i))&&void 0)},t.prototype.forEachInvertedInner=function(e,t,n,r){var i=this.left.length;return!(t>i&&!1===this.right.forEachInvertedInner(e,t-i,Math.max(n,i)-i,r+i))&&(!(n<i&&!1===this.left.forEachInvertedInner(e,Math.min(t,i),n,r))&&void 0)},t.prototype.sliceInner=function(e,t){if(0==e&&t==this.length)return this;var n=this.left.length;return t<=n?this.left.slice(e,t):e>=n?this.right.slice(e-n,t-n):this.left.slice(e,n).append(this.right.slice(0,t-n))},t.prototype.leafAppend=function(e){var n=this.right.leafAppend(e);if(n)return new t(this.left,n)},t.prototype.leafPrepend=function(e){var n=this.left.leafPrepend(e);if(n)return new t(n,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}(PA),UA=PA;const $A=500;class HA{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){if(0==this.eventCount)return null;let n,r,i=this.items.length;for(;;i--){if(this.items.get(i-1).selection){--i;break}}t&&(n=this.remapping(i,this.items.length),r=n.maps.length);let o,s,a=e.tr,l=[],c=[];return this.items.forEach(((e,t)=>{if(!e.step)return n||(n=this.remapping(i,t+1),r=n.maps.length),r--,void c.push(e);if(n){c.push(new WA(e.map));let t,i=e.step.map(n.slice(r));i&&a.maybeStep(i).doc&&(t=a.mapping.maps[a.mapping.maps.length-1],l.push(new WA(t,void 0,void 0,l.length+c.length))),r--,t&&n.appendMap(t,r)}else a.maybeStep(e.step);return e.selection?(o=n?e.selection.map(n.slice(r)):e.selection,s=new HA(this.items.slice(0,i).append(c.reverse().concat(l)),this.eventCount-1),!1):void 0}),this.items.length,0),{remaining:s,transform:a,selection:o}}addTransform(e,t,n,r){let i=[],o=this.eventCount,s=this.items,a=!r&&s.length?s.get(s.length-1):null;for(let n=0;n<e.steps.length;n++){let l,c=e.steps[n].invert(e.docs[n]),u=new WA(e.mapping.maps[n],c,t);(l=a&&a.merge(u))&&(u=l,n?i.pop():s=s.slice(0,s.length-1)),i.push(u),t&&(o++,t=void 0),r||(a=u)}let l=o-n.depth;return l>qA&&(s=function(e,t){let n;return e.forEach(((e,r)=>{if(e.selection&&0==t--)return n=r,!1})),e.slice(n)}(s,l),o-=l),new HA(s.append(i),o)}remapping(e,t){let n=new Ge;return this.items.forEach(((t,r)=>{let i=null!=t.mirrorOffset&&r-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:void 0;n.appendMap(t.map,i)}),e,t),n}addMaps(e){return 0==this.eventCount?this:new HA(this.items.append(e.map((e=>new WA(e)))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let n=[],r=Math.max(0,this.items.length-t),i=e.mapping,o=e.steps.length,s=this.eventCount;this.items.forEach((e=>{e.selection&&s--}),r);let a=t;this.items.forEach((t=>{let r=i.getMirror(--a);if(null==r)return;o=Math.min(o,r);let l=i.maps[r];if(t.step){let o=e.steps[r].invert(e.docs[r]),c=t.selection&&t.selection.map(i.slice(a+1,r));c&&s++,n.push(new WA(l,o,c))}else n.push(new WA(l))}),r);let l=[];for(let e=t;e<o;e++)l.push(new WA(i.maps[e]));let c=this.items.slice(0,r).append(l).append(n),u=new HA(c,s);return u.emptyItemCount()>$A&&(u=u.compress(this.items.length-n.length)),u}emptyItemCount(){let e=0;return this.items.forEach((t=>{t.step||e++})),e}compress(e=this.items.length){let t=this.remapping(0,e),n=t.maps.length,r=[],i=0;return this.items.forEach(((o,s)=>{if(s>=e)r.push(o),o.selection&&i++;else if(o.step){let e=o.step.map(t.slice(n)),s=e&&e.getMap();if(n--,s&&t.appendMap(s,n),e){let a=o.selection&&o.selection.map(t.slice(n));a&&i++;let l,c=new WA(s.invert(),e,a),u=r.length-1;(l=r.length&&r[u].merge(c))?r[u]=l:r.push(c)}}else o.map&&n--}),this.items.length,0),new HA(UA.from(r.reverse()),i)}}HA.empty=new HA(UA.empty,0);class WA{constructor(e,t,n,r){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=r}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new WA(t.getMap().invert(),t,this.selection)}}}class VA{constructor(e,t,n,r){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=r}}const qA=20;function YA(e){let t=[];return e.forEach(((e,n,r,i)=>t.push(r,i))),t}function KA(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 QA(e,t,n,r){let i=JA(t),o=XA.get(t).spec.config,s=(r?e.undone:e.done).popEvent(t,i);if(!s)return;let a=s.selection.resolve(s.transform.doc),l=(r?e.done:e.undone).addTransform(s.transform,t.selection.getBookmark(),o,i),c=new VA(r?l:s.remaining,r?s.remaining:l,null,0);n(s.transform.setSelection(a).setMeta(XA,{redo:r,historyState:c}).scrollIntoView())}let GA=!1,ZA=null;function JA(e){let t=e.plugins;if(ZA!=t){GA=!1,ZA=t;for(let e=0;e<t.length;e++)if(t[e].spec.historyPreserveItems){GA=!0;break}}return GA}const XA=new Jt("history"),eI=new Jt("closeHistory");function tI(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new Qt({key:XA,state:{init:()=>new VA(HA.empty,HA.empty,null,0),apply:(t,n,r)=>function(e,t,n,r){let i,o=n.getMeta(XA);if(o)return o.historyState;n.getMeta(eI)&&(e=new VA(e.done,e.undone,null,0));let s=n.getMeta("appendedTransaction");if(0==n.steps.length)return e;if(s&&s.getMeta(XA))return s.getMeta(XA).redo?new VA(e.done.addTransform(n,void 0,r,JA(t)),e.undone,YA(n.mapping.maps[n.steps.length-1]),e.prevTime):new VA(e.done,e.undone.addTransform(n,void 0,r,JA(t)),null,e.prevTime);if(!1===n.getMeta("addToHistory")||s&&!1===s.getMeta("addToHistory"))return(i=n.getMeta("rebased"))?new VA(e.done.rebased(n,i),e.undone.rebased(n,i),KA(e.prevRanges,n.mapping),e.prevTime):new VA(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),KA(e.prevRanges,n.mapping),e.prevTime);{let i=0==e.prevTime||!s&&(e.prevTime<(n.time||0)-r.newGroupDelay||!function(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach(((e,r)=>{for(let i=0;i<t.length;i+=2)e<=t[i+1]&&r>=t[i]&&(n=!0)})),n}(n,e.prevRanges)),o=s?KA(e.prevRanges,n.mapping):YA(n.mapping.maps[n.steps.length-1]);return new VA(e.done.addTransform(n,i?t.selection.getBookmark():void 0,r,JA(t)),HA.empty,o,n.time)}}(n,r,t,e)},config:e,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,r="historyUndo"==n?nI:"historyRedo"==n?rI:null;return!!r&&(t.preventDefault(),r(e.state,e.dispatch))}}}})}const nI=(e,t)=>{let n=XA.getState(e);return!(!n||0==n.done.eventCount)&&(t&&QA(n,e,t,!1),!0)},rI=(e,t)=>{let n=XA.getState(e);return!(!n||0==n.undone.eventCount)&&(t&&QA(n,e,t,!0),!0)},iI=is.create({name:"history",addOptions:()=>({depth:100,newGroupDelay:500}),addCommands:()=>({undo:()=>({state:e,dispatch:t})=>nI(e,t),redo:()=>({state:e,dispatch:t})=>rI(e,t)}),addProseMirrorPlugins(){return[tI(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Mod-y":()=>this.editor.commands.redo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),oI=Js.create({name:"horizontalRule",addOptions:()=>({HTMLAttributes:{}}),group:"block",parseHTML:()=>[{tag:"hr"}],renderHTML({HTMLAttributes:e}){return["hr",Bo(this.options.HTMLAttributes,e)]},addCommands(){return{setHorizontalRule:()=>({chain:e})=>e().insertContent({type:this.name}).command((({tr:e,dispatch:t})=>{var n;if(t){const{$to:t}=e.selection,r=t.end();if(t.nodeAfter)e.setSelection(St.create(e.doc,t.pos));else{const i=null===(n=t.parent.type.contentMatch.defaultType)||void 0===n?void 0:n.create();i&&(e.insert(r,i),e.setSelection(St.create(e.doc,r)))}e.scrollIntoView()}return!0})).run()}},addInputRules(){return[Ys({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),sI=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))$/,aI=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))/g,lI=/(?:^|\s)((?:_)((?:[^_]+))(?:_))$/,cI=/(?:^|\s)((?:_)((?:[^_]+))(?:_))/g,uI=Zs.create({name:"italic",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"em"},{tag:"i",getAttrs:e=>"normal"!==e.style.fontStyle&&null},{style:"font-style=italic"}],renderHTML({HTMLAttributes:e}){return["em",Bo(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[qs({find:sI,type:this.type}),qs({find:lI,type:this.type})]},addPasteRules(){return[Xs({find:aI,type:this.type}),Xs({find:cI,type:this.type})]}}),dI=Js.create({name:"listItem",addOptions:()=>({HTMLAttributes:{}}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:e}){return["li",Bo(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)}}}),pI=/^(\d+)\.\s$/,hI=Js.create({name:"orderedList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{}}),group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes:()=>({start:{default:1,parseHTML:e=>e.hasAttribute("start")?parseInt(e.getAttribute("start")||"",10):1}}),parseHTML:()=>[{tag:"ol"}],renderHTML({HTMLAttributes:e}){const{start:t,...n}=e;return 1===t?["ol",Bo(this.options.HTMLAttributes,n),0]:["ol",Bo(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()}},addInputRules(){return[Gs({find:pI,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1]})]}}),fI=Js.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:e}){return["p",Bo(this.options.HTMLAttributes,e),0]},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),mI=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))$/,gI=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))/g,bI=Zs.create({name:"strike",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:e=>!!e.includes("line-through")&&{}}],renderHTML({HTMLAttributes:e}){return["s",Bo(this.options.HTMLAttributes,e),0]},addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-x":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[qs({find:mI,type:this.type})]},addPasteRules(){return[Xs({find:gI,type:this.type})]}}),yI=Js.create({name:"text",group:"inline"}),vI=is.create({name:"starterKit",addExtensions(){var e,t,n,r,i,o,s,a,l,c,u,d,p,h,f,m,g,b;const y=[];return!1!==this.options.blockquote&&y.push(kT.configure(null===(e=this.options)||void 0===e?void 0:e.blockquote)),!1!==this.options.bold&&y.push(NT.configure(null===(t=this.options)||void 0===t?void 0:t.bold)),!1!==this.options.bulletList&&y.push(ST.configure(null===(n=this.options)||void 0===n?void 0:n.bulletList)),!1!==this.options.code&&y.push(YO.configure(null===(r=this.options)||void 0===r?void 0:r.code)),!1!==this.options.codeBlock&&y.push(LT.configure(null===(i=this.options)||void 0===i?void 0:i.codeBlock)),!1!==this.options.document&&y.push(jT.configure(null===(o=this.options)||void 0===o?void 0:o.document)),!1!==this.options.dropcursor&&y.push(PT.configure(null===(s=this.options)||void 0===s?void 0:s.dropcursor)),!1!==this.options.gapcursor&&y.push(LA.configure(null===(a=this.options)||void 0===a?void 0:a.gapcursor)),!1!==this.options.hardBreak&&y.push(jA.configure(null===(l=this.options)||void 0===l?void 0:l.hardBreak)),!1!==this.options.heading&&y.push(zA.configure(null===(c=this.options)||void 0===c?void 0:c.heading)),!1!==this.options.history&&y.push(iI.configure(null===(u=this.options)||void 0===u?void 0:u.history)),!1!==this.options.horizontalRule&&y.push(oI.configure(null===(d=this.options)||void 0===d?void 0:d.horizontalRule)),!1!==this.options.italic&&y.push(uI.configure(null===(p=this.options)||void 0===p?void 0:p.italic)),!1!==this.options.listItem&&y.push(dI.configure(null===(h=this.options)||void 0===h?void 0:h.listItem)),!1!==this.options.orderedList&&y.push(hI.configure(null===(f=this.options)||void 0===f?void 0:f.orderedList)),!1!==this.options.paragraph&&y.push(fI.configure(null===(m=this.options)||void 0===m?void 0:m.paragraph)),!1!==this.options.strike&&y.push(bI.configure(null===(g=this.options)||void 0===g?void 0:g.strike)),!1!==this.options.text&&y.push(yI.configure(null===(b=this.options)||void 0===b?void 0:b.text)),y}});function wI(e,t=[]){return e.map((e=>{const n=[...t,...e.properties?e.properties.className:[]];return e.children?wI(e.children,n):{text:e.value,classes:n}})).flat()}function xI(e){return e.value||e.children||[]}function EI({doc:e,name:t,lowlight:n,defaultLanguage:r}){const i=[];return $s(e,(e=>e.type.name===t)).forEach((e=>{let t=e.pos+1;const o=e.node.attrs.language||r,s=n.listLanguages();wI(o&&s.includes(o)?xI(n.highlight(o,e.node.textContent)):xI(n.highlightAuto(e.node.textContent))).forEach((e=>{const n=t+e.text.length;if(e.classes.length){const r=Ii.inline(t,n,{class:e.classes.join(" ")});i.push(r)}t=n}))})),zi.create(e,i)}function MI({name:e,lowlight:t,defaultLanguage:n}){if(!["highlight","highlightAuto","listLanguages"].every((e=>"function"==typeof t[e])))throw Error("You should provide an instance of lowlight to use the code-block-lowlight extension");const r=new Qt({key:new Jt("lowlight"),state:{init:(r,{doc:i})=>EI({doc:i,name:e,lowlight:t,defaultLanguage:n}),apply:(r,i,o,s)=>{const a=o.selection.$head.parent.type.name,l=s.selection.$head.parent.type.name,c=$s(o.doc,(t=>t.type.name===e)),u=$s(s.doc,(t=>t.type.name===e));return r.docChanged&&([a,l].includes(e)||u.length!==c.length||r.steps.some((e=>void 0!==e.from&&void 0!==e.to&&c.some((t=>t.pos>=e.from&&t.pos+t.node.nodeSize<=e.to)))))?EI({doc:r.doc,name:e,lowlight:t,defaultLanguage:n}):i.map(r.mapping,r.doc)}},props:{decorations:e=>r.getState(e)}});return r}const kI=LT.extend({addOptions(){var e;return{...null===(e=this.parent)||void 0===e?void 0:e.call(this),lowlight:{},defaultLanguage:null}},addProseMirrorPlugins(){var e;return[...(null===(e=this.parent)||void 0===e?void 0:e.call(this))||[],MI({name:this.name,lowlight:this.options.lowlight,defaultLanguage:this.options.defaultLanguage})]}});const _I=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],DI=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],CI=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],OI=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],NI=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inline-size","isolation","justify-content","left","letter-spacing","line-break","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","pause","pause-after","pause-before","perspective","perspective-origin","pointer-events","position","quotes","resize","rest","rest-after","rest-before","right","row-gap","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","speak","speak-as","src","tab-size","table-layout","text-align","text-align-all","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-box","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index"].reverse();var TI="[0-9](_*[0-9])*",SI=`\\.(${TI})`,AI="[0-9a-fA-F](_*[0-9a-fA-F])*",II={className:"number",variants:[{begin:`(\\b(${TI})((${SI})|\\.)?|(${SI}))`+`[eE][+-]?(${TI})[fFdD]?\\b`},{begin:`\\b(${TI})((${SI})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${SI})[fFdD]?\\b`},{begin:`\\b(${TI})[fFdD]\\b`},{begin:`\\b0[xX]((${AI})\\.?|(${AI})?\\.(${AI}))`+`[pP][+-]?(${TI})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${AI})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function LI(e,t,n){return-1===n?"":e.replace(t,(r=>LI(e,t,n-1)))}const jI="[A-Za-z$_][0-9A-Za-z$_]*",zI=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],FI=["true","false","null","undefined","NaN","Infinity"],PI=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],RI=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],BI=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],UI=["arguments","this","super","console","window","document","localStorage","module","global"],$I=[].concat(BI,PI,RI);var HI="[0-9](_*[0-9])*",WI=`\\.(${HI})`,VI="[0-9a-fA-F](_*[0-9a-fA-F])*",qI={className:"number",variants:[{begin:`(\\b(${HI})((${WI})|\\.)?|(${WI}))`+`[eE][+-]?(${HI})[fFdD]?\\b`},{begin:`\\b(${HI})((${WI})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${WI})[fFdD]?\\b`},{begin:`\\b(${HI})[fFdD]\\b`},{begin:`\\b0[xX]((${VI})\\.?|(${VI})?\\.(${VI}))`+`[pP][+-]?(${HI})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${VI})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};const YI=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],KI=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],QI=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],GI=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],ZI=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inline-size","isolation","justify-content","left","letter-spacing","line-break","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","pause","pause-after","pause-before","perspective","perspective-origin","pointer-events","position","quotes","resize","rest","rest-after","rest-before","right","row-gap","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","speak","speak-as","src","tab-size","table-layout","text-align","text-align-all","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-box","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index"].reverse(),JI=QI.concat(GI);const XI=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],eL=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],tL=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],nL=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],rL=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inline-size","isolation","justify-content","left","letter-spacing","line-break","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","pause","pause-after","pause-before","perspective","perspective-origin","pointer-events","position","quotes","resize","rest","rest-after","rest-before","right","row-gap","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","speak","speak-as","src","tab-size","table-layout","text-align","text-align-all","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-box","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index"].reverse();function iL(e){return e?"string"==typeof e?e:e.source:null}function oL(e){return sL("(?=",e,")")}function sL(...e){const t=e.map((e=>iL(e))).join("");return t}function aL(...e){const t=function(e){const t=e[e.length-1];return"object"==typeof t&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}(e),n="("+(t.capture?"":"?:")+e.map((e=>iL(e))).join("|")+")";return n}const lL=e=>sL(/\b/,e,/\w$/.test(e)?/\b/:/\B/),cL=["Protocol","Type"].map(lL),uL=["init","self"].map(lL),dL=["Any","Self"],pL=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","break","case","catch","class","continue","convenience","default","defer","deinit","didSet","distributed","do","dynamic","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],hL=["false","nil","true"],fL=["assignment","associativity","higherThan","left","lowerThan","none","right"],mL=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warn_unqualified_access","#warning"],gL=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],bL=aL(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),yL=aL(bL,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),vL=sL(bL,yL,"*"),wL=aL(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),xL=aL(wL,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),EL=sL(wL,xL,"*"),ML=sL(/[A-Z]/,xL,"*"),kL=["autoclosure",sL(/convention\(/,aL("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",sL(/objc\(/,EL,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","testable","UIApplicationMain","unknown","usableFromInline"],_L=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];const DL="[A-Za-z$_][0-9A-Za-z$_]*",CL=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],OL=["true","false","null","undefined","NaN","Infinity"],NL=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],TL=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],SL=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],AL=["arguments","this","super","console","window","document","localStorage","module","global"],IL=[].concat(SL,NL,TL);function LL(e){const t=e.regex,n=DL,r="<>",i="</>",o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{const n=e[0].length+e.index,r=e.input[n];if("<"===r||","===r)return void t.ignoreMatch();let i;">"===r&&(((e,{after:t})=>{const n="</"+e[0].slice(1);return-1!==e.input.indexOf(n,t)})(e,{after:n})||t.ignoreMatch());(i=e.input.substring(n).match(/^\s+extends\s+/))&&0===i.index&&t.ignoreMatch()}},s={$pattern:DL,keyword:CL,literal:OL,built_in:IL,"variable.language":AL},a="[0-9](_?[0-9])*",l=`\\.(${a})`,c=`0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*`,u={className:"number",variants:[{begin:`(\\b(${c})((${l})|\\.)?|(${l}))`+`[eE][+-]?(${a})\\b`},{begin:`\\b(${c})\\b((${l})\\b|\\.)?|(${l})\\b`},{begin:`\\b(0|[1-9](_?[0-9])*)n\\b`},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},d={className:"subst",begin:"\\$\\{",end:"\\}",keywords:s,contains:[]},p={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,d],subLanguage:"xml"}},h={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,d],subLanguage:"css"}},f={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,d]},m={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:n+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},g=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,h,f,u];d.contains=g.concat({begin:/\{/,end:/\}/,keywords:s,contains:["self"].concat(g)});const b=[].concat(m,d.contains),y=b.concat([{begin:/\(/,end:/\)/,keywords:s,contains:["self"].concat(b)}]),v={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:y},w={variants:[{match:[/class/,/\s+/,n,/\s+/,/extends/,/\s+/,t.concat(n,"(",t.concat(/\./,n),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,n],scope:{1:"keyword",3:"title.class"}}]},x={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...NL,...TL]}},E={variants:[{match:[/function/,/\s+/,n,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[v],illegal:/%/};const M={match:t.concat(/\b/,(k=[...SL,"super"],t.concat("(?!",k.join("|"),")")),n,t.lookahead(/\(/)),className:"title.function",relevance:0};var k;const _={begin:t.concat(/\./,t.lookahead(t.concat(n,/(?![0-9A-Za-z$_(])/))),end:n,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},D={match:[/get|set/,/\s+/,n,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},v]},C="(\\("+"[^()]*(\\("+"[^()]*(\\("+"[^()]*"+"\\)[^()]*)*"+"\\)[^()]*)*"+"\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",O={match:[/const|var|let/,/\s+/,n,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(C)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[v]};return{name:"Javascript",aliases:["js","jsx","mjs","cjs"],keywords:s,exports:{PARAMS_CONTAINS:y,CLASS_REFERENCE:x},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),{label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,h,f,m,u,x,{className:"attr",begin:n+t.lookahead(":"),relevance:0},O,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[m,e.REGEXP_MODE,{className:"function",begin:C,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:y}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:r,end:i},{match:/<[A-Za-z0-9\\._:-]+\s*\/>/},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0,contains:["self"]}]}]},E,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\("+"[^()]*(\\("+"[^()]*(\\("+"[^()]*"+"\\)[^()]*)*"+"\\)[^()]*)*"+"\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[v,e.inherit(e.TITLE_MODE,{begin:n,className:"title.function"})]},{match:/\.\.\./,relevance:0},_,{match:"\\$"+n,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[v]},M,{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},w,D,{match:/\$[(.]/}]}}var jL={exports:{}};function zL(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach((function(t){var n=e[t];"object"!=typeof n||Object.isFrozen(n)||zL(n)})),e}jL.exports=zL,jL.exports.default=zL;class FL{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function PL(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function RL(e,...t){const n=Object.create(null);for(const t in e)n[t]=e[t];return t.forEach((function(e){for(const t in e)n[t]=e[t]})),n}const BL="</span>",UL=e=>!!e.scope||e.sublanguage&&e.language;class $L{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=PL(e)}openNode(e){if(!UL(e))return;let t="";t=e.sublanguage?`language-${e.language}`:((e,{prefix:t})=>{if(e.includes(".")){const n=e.split(".");return[`${t}${n.shift()}`,...n.map(((e,t)=>`${e}${"_".repeat(t+1)}`))].join(" ")}return`${t}${e}`})(e.scope,{prefix:this.classPrefix}),this.span(t)}closeNode(e){UL(e)&&(this.buffer+=BL)}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}}const HL=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class WL{constructor(){this.rootNode=HL(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){const t=HL({scope:e});this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return"string"==typeof t?e.addText(t):t.children&&(e.openNode(t),t.children.forEach((t=>this._walk(e,t))),e.closeNode(t)),e}static _collapse(e){"string"!=typeof e&&e.children&&(e.children.every((e=>"string"==typeof e))?e.children=[e.children.join("")]:e.children.forEach((e=>{WL._collapse(e)})))}}class VL extends WL{constructor(e){super(),this.options=e}addKeyword(e,t){""!==e&&(this.openNode(t),this.addText(e),this.closeNode())}addText(e){""!==e&&this.add(e)}addSublanguage(e,t){const n=e.root;n.sublanguage=!0,n.language=t,this.add(n)}toHTML(){return new $L(this,this.options).value()}finalize(){return!0}}function qL(e){return e?"string"==typeof e?e:e.source:null}function YL(e){return GL("(?=",e,")")}function KL(e){return GL("(?:",e,")*")}function QL(e){return GL("(?:",e,")?")}function GL(...e){const t=e.map((e=>qL(e))).join("");return t}function ZL(...e){const t=function(e){const t=e[e.length-1];return"object"==typeof t&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}(e),n="("+(t.capture?"":"?:")+e.map((e=>qL(e))).join("|")+")";return n}function JL(e){return new RegExp(e.toString()+"|").exec("").length-1}const XL=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function ej(e,{joinWith:t}){let n=0;return e.map((e=>{n+=1;const t=n;let r=qL(e),i="";for(;r.length>0;){const e=XL.exec(r);if(!e){i+=r;break}i+=r.substring(0,e.index),r=r.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?i+="\\"+String(Number(e[1])+t):(i+=e[0],"("===e[0]&&n++)}return i})).map((e=>`(${e})`)).join(t)}const tj="[a-zA-Z]\\w*",nj="[a-zA-Z_]\\w*",rj="\\b\\d+(\\.\\d+)?",ij="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",oj="\\b(0b[01]+)",sj={begin:"\\\\[\\s\\S]",relevance:0},aj={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[sj]},lj={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[sj]},cj=function(e,t,n={}){const r=RL({scope:"comment",begin:e,end:t,contains:[]},n);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const i=ZL("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:GL(/[ ]+/,"(",i,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},uj=cj("//","$"),dj=cj("/\\*","\\*/"),pj=cj("#","$"),hj={scope:"number",begin:rj,relevance:0},fj={scope:"number",begin:ij,relevance:0},mj={scope:"number",begin:oj,relevance:0},gj={begin:/(?=\/[^/\n]*\/)/,contains:[{scope:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[sj,{begin:/\[/,end:/\]/,relevance:0,contains:[sj]}]}]},bj={scope:"title",begin:tj,relevance:0},yj={scope:"title",begin:nj,relevance:0},vj={begin:"\\.\\s*"+nj,relevance:0};var wj=Object.freeze({__proto__:null,MATCH_NOTHING_RE:/\b\B/,IDENT_RE:tj,UNDERSCORE_IDENT_RE:nj,NUMBER_RE:rj,C_NUMBER_RE:ij,BINARY_NUMBER_RE:oj,RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=GL(t,/.*\b/,e.binary,/\b.*/)),RL({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{0!==e.index&&t.ignoreMatch()}},e)},BACKSLASH_ESCAPE:sj,APOS_STRING_MODE:aj,QUOTE_STRING_MODE:lj,PHRASAL_WORDS_MODE:{begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},COMMENT:cj,C_LINE_COMMENT_MODE:uj,C_BLOCK_COMMENT_MODE:dj,HASH_COMMENT_MODE:pj,NUMBER_MODE:hj,C_NUMBER_MODE:fj,BINARY_NUMBER_MODE:mj,REGEXP_MODE:gj,TITLE_MODE:bj,UNDERSCORE_TITLE_MODE:yj,METHOD_GUARD:vj,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})}});function xj(e,t){"."===e.input[e.index-1]&&t.ignoreMatch()}function Ej(e,t){void 0!==e.className&&(e.scope=e.className,delete e.className)}function Mj(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=xj,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,void 0===e.relevance&&(e.relevance=0))}function kj(e,t){Array.isArray(e.illegal)&&(e.illegal=ZL(...e.illegal))}function _j(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function Dj(e,t){void 0===e.relevance&&(e.relevance=1)}const Cj=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const n=Object.assign({},e);Object.keys(e).forEach((t=>{delete e[t]})),e.keywords=n.keywords,e.begin=GL(n.beforeMatch,YL(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},Oj=["of","and","for","in","not","or","if","then","parent","list","value"],Nj="keyword";function Tj(e,t,n=Nj){const r=Object.create(null);return"string"==typeof e?i(n,e.split(" ")):Array.isArray(e)?i(n,e):Object.keys(e).forEach((function(n){Object.assign(r,Tj(e[n],t,n))})),r;function i(e,n){t&&(n=n.map((e=>e.toLowerCase()))),n.forEach((function(t){const n=t.split("|");r[n[0]]=[e,Sj(n[0],n[1])]}))}}function Sj(e,t){return t?Number(t):function(e){return Oj.includes(e.toLowerCase())}(e)?0:1}const Aj={},Ij=e=>{console.error(e)},Lj=(e,...t)=>{console.log(`WARN: ${e}`,...t)},jj=(e,t)=>{Aj[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),Aj[`${e}/${t}`]=!0)},zj=new Error;function Fj(e,t,{key:n}){let r=0;const i=e[n],o={},s={};for(let e=1;e<=t.length;e++)s[e+r]=i[e],o[e+r]=!0,r+=JL(t[e-1]);e[n]=s,e[n]._emit=o,e[n]._multi=!0}function Pj(e){!function(e){e.scope&&"object"==typeof e.scope&&null!==e.scope&&(e.beginScope=e.scope,delete e.scope)}(e),"string"==typeof e.beginScope&&(e.beginScope={_wrap:e.beginScope}),"string"==typeof e.endScope&&(e.endScope={_wrap:e.endScope}),function(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw Ij("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),zj;if("object"!=typeof e.beginScope||null===e.beginScope)throw Ij("beginScope must be object"),zj;Fj(e,e.begin,{key:"beginScope"}),e.begin=ej(e.begin,{joinWith:""})}}(e),function(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw Ij("skip, excludeEnd, returnEnd not compatible with endScope: {}"),zj;if("object"!=typeof e.endScope||null===e.endScope)throw Ij("endScope must be object"),zj;Fj(e,e.end,{key:"endScope"}),e.end=ej(e.end,{joinWith:""})}}(e)}function Rj(e){function t(t,n){return new RegExp(qL(t),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(n?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,t){t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),this.matchAt+=JL(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const e=this.regexes.map((e=>e[1]));this.matcherRe=t(ej(e,{joinWith:"|"}),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;const t=this.matcherRe.exec(e);if(!t)return null;const n=t.findIndex(((e,t)=>t>0&&void 0!==e)),r=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,r)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];const t=new n;return this.rules.slice(e).forEach((([e,n])=>t.addRule(e,n))),t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,t){this.rules.push([e,t]),"begin"===t.type&&this.count++}exec(e){const t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex;let n=t.exec(e);if(this.resumingScanAtSamePosition())if(n&&n.index===this.lastIndex);else{const t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)}return n&&(this.regexIndex+=n.position+1,this.regexIndex===this.count&&this.considerAll()),n}}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=RL(e.classNameAliases||{}),function n(i,o){const s=i;if(i.isCompiled)return s;[Ej,_j,Pj,Cj].forEach((e=>e(i,o))),e.compilerExtensions.forEach((e=>e(i,o))),i.__beforeBegin=null,[Mj,kj,Dj].forEach((e=>e(i,o))),i.isCompiled=!0;let a=null;return"object"==typeof i.keywords&&i.keywords.$pattern&&(i.keywords=Object.assign({},i.keywords),a=i.keywords.$pattern,delete i.keywords.$pattern),a=a||/\w+/,i.keywords&&(i.keywords=Tj(i.keywords,e.case_insensitive)),s.keywordPatternRe=t(a,!0),o&&(i.begin||(i.begin=/\B|\b/),s.beginRe=t(s.begin),i.end||i.endsWithParent||(i.end=/\B|\b/),i.end&&(s.endRe=t(s.end)),s.terminatorEnd=qL(s.end)||"",i.endsWithParent&&o.terminatorEnd&&(s.terminatorEnd+=(i.end?"|":"")+o.terminatorEnd)),i.illegal&&(s.illegalRe=t(i.illegal)),i.contains||(i.contains=[]),i.contains=[].concat(...i.contains.map((function(e){return function(e){e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map((function(t){return RL(e,{variants:null},t)})));if(e.cachedVariants)return e.cachedVariants;if(Bj(e))return RL(e,{starts:e.starts?RL(e.starts):null});if(Object.isFrozen(e))return RL(e);return e}("self"===e?i:e)}))),i.contains.forEach((function(e){n(e,s)})),i.starts&&n(i.starts,o),s.matcher=function(e){const t=new r;return e.contains.forEach((e=>t.addRule(e.begin,{rule:e,type:"begin"}))),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:"end"}),e.illegal&&t.addRule(e.illegal,{type:"illegal"}),t}(s),s}(e)}function Bj(e){return!!e&&(e.endsWithParent||Bj(e.starts))}var Uj="11.6.0";class $j extends Error{constructor(e,t){super(e),this.name="HTMLInjectionError",this.html=t}}const Hj=PL,Wj=RL,Vj=Symbol("nomatch"),qj=7;var Yj=function(e){const t=Object.create(null),n=Object.create(null),r=[];let i=!0;const o="Could not find the language '{}', did you forget to load/include a language module?",s={disableAutodetect:!0,name:"Plain text",contains:[]};let a={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:VL};function l(e){return a.noHighlightRe.test(e)}function c(e,t,n){let r="",i="";"object"==typeof t?(r=e,n=t.ignoreIllegals,i=t.language):(jj("10.7.0","highlight(lang, code, ...args) has been deprecated."),jj("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),i=e,r=t),void 0===n&&(n=!0);const o={code:r,language:i};y("before:highlight",o);const s=o.result?o.result:u(o.language,o.code,n);return s.code=o.code,y("after:highlight",s),s}function u(e,n,r,s){const l=Object.create(null);function c(){if(!k.keywords)return void D.addText(C);let e=0;k.keywordPatternRe.lastIndex=0;let t=k.keywordPatternRe.exec(C),n="";for(;t;){n+=C.substring(e,t.index);const i=x.case_insensitive?t[0].toLowerCase():t[0],o=(r=i,k.keywords[r]);if(o){const[e,r]=o;if(D.addText(n),n="",l[i]=(l[i]||0)+1,l[i]<=qj&&(O+=r),e.startsWith("_"))n+=t[0];else{const n=x.classNameAliases[e]||e;D.addKeyword(t[0],n)}}else n+=t[0];e=k.keywordPatternRe.lastIndex,t=k.keywordPatternRe.exec(C)}var r;n+=C.substring(e),D.addText(n)}function p(){null!=k.subLanguage?function(){if(""===C)return;let e=null;if("string"==typeof k.subLanguage){if(!t[k.subLanguage])return void D.addText(C);e=u(k.subLanguage,C,!0,_[k.subLanguage]),_[k.subLanguage]=e._top}else e=d(C,k.subLanguage.length?k.subLanguage:null);k.relevance>0&&(O+=e.relevance),D.addSublanguage(e._emitter,e.language)}():c(),C=""}function h(e,t){let n=1;const r=t.length-1;for(;n<=r;){if(!e._emit[n]){n++;continue}const r=x.classNameAliases[e[n]]||e[n],i=t[n];r?D.addKeyword(i,r):(C=i,c(),C=""),n++}}function f(e,t){return e.scope&&"string"==typeof e.scope&&D.openNode(x.classNameAliases[e.scope]||e.scope),e.beginScope&&(e.beginScope._wrap?(D.addKeyword(C,x.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap),C=""):e.beginScope._multi&&(h(e.beginScope,t),C="")),k=Object.create(e,{parent:{value:k}}),k}function g(e,t,n){let r=function(e,t){const n=e&&e.exec(t);return n&&0===n.index}(e.endRe,n);if(r){if(e["on:end"]){const n=new FL(e);e["on:end"](t,n),n.isMatchIgnored&&(r=!1)}if(r){for(;e.endsParent&&e.parent;)e=e.parent;return e}}if(e.endsWithParent)return g(e.parent,t,n)}function b(e){return 0===k.matcher.regexIndex?(C+=e[0],1):(S=!0,0)}function y(e){const t=e[0],r=n.substring(e.index),i=g(k,e,r);if(!i)return Vj;const o=k;k.endScope&&k.endScope._wrap?(p(),D.addKeyword(t,k.endScope._wrap)):k.endScope&&k.endScope._multi?(p(),h(k.endScope,e)):o.skip?C+=t:(o.returnEnd||o.excludeEnd||(C+=t),p(),o.excludeEnd&&(C=t));do{k.scope&&D.closeNode(),k.skip||k.subLanguage||(O+=k.relevance),k=k.parent}while(k!==i.parent);return i.starts&&f(i.starts,e),o.returnEnd?0:t.length}let v={};function w(t,o){const s=o&&o[0];if(C+=t,null==s)return p(),0;if("begin"===v.type&&"end"===o.type&&v.index===o.index&&""===s){if(C+=n.slice(o.index,o.index+1),!i){const t=new Error(`0 width match regex (${e})`);throw t.languageName=e,t.badRule=v.rule,t}return 1}if(v=o,"begin"===o.type)return function(e){const t=e[0],n=e.rule,r=new FL(n),i=[n.__beforeBegin,n["on:begin"]];for(const n of i)if(n&&(n(e,r),r.isMatchIgnored))return b(t);return n.skip?C+=t:(n.excludeBegin&&(C+=t),p(),n.returnBegin||n.excludeBegin||(C=t)),f(n,e),n.returnBegin?0:t.length}(o);if("illegal"===o.type&&!r){const e=new Error('Illegal lexeme "'+s+'" for mode "'+(k.scope||"<unnamed>")+'"');throw e.mode=k,e}if("end"===o.type){const e=y(o);if(e!==Vj)return e}if("illegal"===o.type&&""===s)return 1;if(T>1e5&&T>3*o.index){throw new Error("potential infinite loop, way more iterations than matches")}return C+=s,s.length}const x=m(e);if(!x)throw Ij(o.replace("{}",e)),new Error('Unknown language: "'+e+'"');const E=Rj(x);let M="",k=s||E;const _={},D=new a.__emitter(a);!function(){const e=[];for(let t=k;t!==x;t=t.parent)t.scope&&e.unshift(t.scope);e.forEach((e=>D.openNode(e)))}();let C="",O=0,N=0,T=0,S=!1;try{for(k.matcher.considerAll();;){T++,S?S=!1:k.matcher.considerAll(),k.matcher.lastIndex=N;const e=k.matcher.exec(n);if(!e)break;const t=w(n.substring(N,e.index),e);N=e.index+t}return w(n.substring(N)),D.closeAllNodes(),D.finalize(),M=D.toHTML(),{language:e,value:M,relevance:O,illegal:!1,_emitter:D,_top:k}}catch(t){if(t.message&&t.message.includes("Illegal"))return{language:e,value:Hj(n),illegal:!0,relevance:0,_illegalBy:{message:t.message,index:N,context:n.slice(N-100,N+100),mode:t.mode,resultSoFar:M},_emitter:D};if(i)return{language:e,value:Hj(n),illegal:!1,relevance:0,errorRaised:t,_emitter:D,_top:k};throw t}}function d(e,n){n=n||a.languages||Object.keys(t);const r=function(e){const t={value:Hj(e),illegal:!1,relevance:0,_top:s,_emitter:new a.__emitter(a)};return t._emitter.addText(e),t}(e),i=n.filter(m).filter(b).map((t=>u(t,e,!1)));i.unshift(r);const o=i.sort(((e,t)=>{if(e.relevance!==t.relevance)return t.relevance-e.relevance;if(e.language&&t.language){if(m(e.language).supersetOf===t.language)return 1;if(m(t.language).supersetOf===e.language)return-1}return 0})),[l,c]=o,d=l;return d.secondBest=c,d}function p(e){let t=null;const r=function(e){let t=e.className+" ";t+=e.parentNode?e.parentNode.className:"";const n=a.languageDetectRe.exec(t);if(n){const t=m(n[1]);return t||(Lj(o.replace("{}",n[1])),Lj("Falling back to no-highlight mode for this block.",e)),t?n[1]:"no-highlight"}return t.split(/\s+/).find((e=>l(e)||m(e)))}(e);if(l(r))return;if(y("before:highlightElement",{el:e,language:r}),e.children.length>0&&(a.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(e)),a.throwUnescapedHTML)){throw new $j("One of your code blocks includes unescaped HTML.",e.innerHTML)}t=e;const i=t.textContent,s=r?c(i,{language:r,ignoreIllegals:!0}):d(i);e.innerHTML=s.value,function(e,t,r){const i=t&&n[t]||r;e.classList.add("hljs"),e.classList.add(`language-${i}`)}(e,r,s.language),e.result={language:s.language,re:s.relevance,relevance:s.relevance},s.secondBest&&(e.secondBest={language:s.secondBest.language,relevance:s.secondBest.relevance}),y("after:highlightElement",{el:e,result:s,text:i})}let h=!1;function f(){if("loading"===document.readyState)return void(h=!0);document.querySelectorAll(a.cssSelector).forEach(p)}function m(e){return e=(e||"").toLowerCase(),t[e]||t[n[e]]}function g(e,{languageName:t}){"string"==typeof e&&(e=[e]),e.forEach((e=>{n[e.toLowerCase()]=t}))}function b(e){const t=m(e);return t&&!t.disableAutodetect}function y(e,t){const n=e;r.forEach((function(e){e[n]&&e[n](t)}))}"undefined"!=typeof window&&window.addEventListener&&window.addEventListener("DOMContentLoaded",(function(){h&&f()}),!1),Object.assign(e,{highlight:c,highlightAuto:d,highlightAll:f,highlightElement:p,highlightBlock:function(e){return jj("10.7.0","highlightBlock will be removed entirely in v12.0"),jj("10.7.0","Please use highlightElement now."),p(e)},configure:function(e){a=Wj(a,e)},initHighlighting:()=>{f(),jj("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")},initHighlightingOnLoad:function(){f(),jj("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")},registerLanguage:function(n,r){let o=null;try{o=r(e)}catch(e){if(Ij("Language definition for '{}' could not be registered.".replace("{}",n)),!i)throw e;Ij(e),o=s}o.name||(o.name=n),t[n]=o,o.rawDefinition=r.bind(null,e),o.aliases&&g(o.aliases,{languageName:n})},unregisterLanguage:function(e){delete t[e];for(const t of Object.keys(n))n[t]===e&&delete n[t]},listLanguages:function(){return Object.keys(t)},getLanguage:m,registerAliases:g,autoDetection:b,inherit:Wj,addPlugin:function(e){!function(e){e["before:highlightBlock"]&&!e["before:highlightElement"]&&(e["before:highlightElement"]=t=>{e["before:highlightBlock"](Object.assign({block:t.el},t))}),e["after:highlightBlock"]&&!e["after:highlightElement"]&&(e["after:highlightElement"]=t=>{e["after:highlightBlock"](Object.assign({block:t.el},t))})}(e),r.push(e)}}),e.debugMode=function(){i=!1},e.safeMode=function(){i=!0},e.versionString=Uj,e.regex={concat:GL,lookahead:YL,either:ZL,optional:QL,anyNumberOfTimes:KL};for(const e in wj)"object"==typeof wj[e]&&jL.exports(wj[e]);return Object.assign(e,wj),e}({}),Kj=Yj;Yj.HighlightJS=Yj,Yj.default=Yj;var Qj={exports:{}};!function(e){!function(){var t;function n(e){for(var t,n,r,i,o=1,s=[].slice.call(arguments),a=0,l=e.length,c="",u=!1,d=!1,p=function(){return s[o++]},h=function(){for(var n="";/\d/.test(e[a]);)n+=e[a++],t=e[a];return n.length>0?parseInt(n):null};a<l;++a)if(t=e[a],u)switch(u=!1,"."==t?(d=!1,t=e[++a]):"0"==t&&"."==e[a+1]?(d=!0,t=e[a+=2]):d=!0,i=h(),t){case"b":c+=parseInt(p(),10).toString(2);break;case"c":c+="string"==typeof(n=p())||n instanceof String?n:String.fromCharCode(parseInt(n,10));break;case"d":c+=parseInt(p(),10);break;case"f":r=String(parseFloat(p()).toFixed(i||6)),c+=d?r:r.replace(/^0/,"");break;case"j":c+=JSON.stringify(p());break;case"o":c+="0"+parseInt(p(),10).toString(8);break;case"s":c+=p();break;case"x":c+="0x"+parseInt(p(),10).toString(16);break;case"X":c+="0x"+parseInt(p(),10).toString(16).toUpperCase();break;default:c+=t}else"%"===t?u=!0:c+=t;return c}(t=e.exports=n).format=n,t.vsprintf=function(e,t){return n.apply(null,[e].concat(t))},"undefined"!=typeof console&&"function"==typeof console.log&&(t.printf=function(){console.log(n.apply(null,arguments))})}()}(Qj);var Gj=Qj.exports;const Zj=Object.assign(Jj(Error),{eval:Jj(EvalError),range:Jj(RangeError),reference:Jj(ReferenceError),syntax:Jj(SyntaxError),type:Jj(TypeError),uri:Jj(URIError)});function Jj(e){return t.displayName=e.displayName||e.name,t;function t(t,...n){const r=t?Gj(t,...n):t;return new e(r)}}const Xj={}.hasOwnProperty,ez="hljs-";function tz(e,t,n={}){let r=n.prefix;if("string"!=typeof e)throw Zj("Expected `string` for name, got `%s`",e);if(!Kj.getLanguage(e))throw Zj("Unknown language: `%s` is not registered",e);if("string"!=typeof t)throw Zj("Expected `string` for value, got `%s`",t);null==r&&(r=ez),Kj.configure({__emitter:nz,classPrefix:r});const i=Kj.highlight(t,{language:e,ignoreIllegals:!0});if(Kj.configure({}),i.errorRaised)throw i.errorRaised;return i._emitter.root.data.language=i.language,i._emitter.root.data.relevance=i.relevance,i._emitter.root}class nz{constructor(e){this.options=e,this.root={type:"root",data:{language:null,relevance:0},children:[]},this.stack=[this.root]}addText(e){if(""===e)return;const t=this.stack[this.stack.length-1],n=t.children[t.children.length-1];n&&"text"===n.type?n.value+=e:t.children.push({type:"text",value:e})}addKeyword(e,t){this.openNode(t),this.addText(e),this.closeNode()}addSublanguage(e,t){const n=this.stack[this.stack.length-1],r=e.root.children;t?n.children.push({type:"element",tagName:"span",properties:{className:[t]},children:r}):n.children.push(...r)}openNode(e){const t=e.split(".").map(((e,t)=>t?e+"_".repeat(t):this.options.classPrefix+e)),n={type:"element",tagName:"span",properties:{className:t},children:[]};this.stack[this.stack.length-1].children.push(n),this.stack.push(n)}closeNode(){this.stack.pop()}closeAllNodes(){}finalize(){}toHTML(){return""}}const rz={highlight:tz,highlightAuto:function(e,t={}){const n=t.subset||Kj.listLanguages();t.prefix;let r=-1,i={type:"root",data:{language:null,relevance:0},children:[]};if("string"!=typeof e)throw Zj("Expected `string` for value, got `%s`",e);for(;++r<n.length;){const o=n[r];if(!Kj.getLanguage(o))continue;const s=tz(o,e,t);s.data.relevance>i.data.relevance&&(i=s)}return i},registerLanguage:function(e,t){Kj.registerLanguage(e,t)},registered:function(e){return Boolean(Kj.getLanguage(e))},listLanguages:function(){return Kj.listLanguages()},registerAlias:function(e,t){if("string"==typeof e)Kj.registerAliases(t,{languageName:e});else{let t;for(t in e)Xj.call(e,t)&&Kj.registerAliases(e[t],{languageName:t})}}};rz.registerLanguage("arduino",(function(e){const t={type:["boolean","byte","word","String"],built_in:["KeyboardController","MouseController","SoftwareSerial","EthernetServer","EthernetClient","LiquidCrystal","RobotControl","GSMVoiceCall","EthernetUDP","EsploraTFT","HttpClient","RobotMotor","WiFiClient","GSMScanner","FileSystem","Scheduler","GSMServer","YunClient","YunServer","IPAddress","GSMClient","GSMModem","Keyboard","Ethernet","Console","GSMBand","Esplora","Stepper","Process","WiFiUDP","GSM_SMS","Mailbox","USBHost","Firmata","PImage","Client","Server","GSMPIN","FileIO","Bridge","Serial","EEPROM","Stream","Mouse","Audio","Servo","File","Task","GPRS","WiFi","Wire","TFT","GSM","SPI","SD"],_hints:["setup","loop","runShellCommandAsynchronously","analogWriteResolution","retrieveCallingNumber","printFirmwareVersion","analogReadResolution","sendDigitalPortPair","noListenOnLocalhost","readJoystickButton","setFirmwareVersion","readJoystickSwitch","scrollDisplayRight","getVoiceCallStatus","scrollDisplayLeft","writeMicroseconds","delayMicroseconds","beginTransmission","getSignalStrength","runAsynchronously","getAsynchronously","listenOnLocalhost","getCurrentCarrier","readAccelerometer","messageAvailable","sendDigitalPorts","lineFollowConfig","countryNameWrite","runShellCommand","readStringUntil","rewindDirectory","readTemperature","setClockDivider","readLightSensor","endTransmission","analogReference","detachInterrupt","countryNameRead","attachInterrupt","encryptionType","readBytesUntil","robotNameWrite","readMicrophone","robotNameRead","cityNameWrite","userNameWrite","readJoystickY","readJoystickX","mouseReleased","openNextFile","scanNetworks","noInterrupts","digitalWrite","beginSpeaker","mousePressed","isActionDone","mouseDragged","displayLogos","noAutoscroll","addParameter","remoteNumber","getModifiers","keyboardRead","userNameRead","waitContinue","processInput","parseCommand","printVersion","readNetworks","writeMessage","blinkVersion","cityNameRead","readMessage","setDataMode","parsePacket","isListening","setBitOrder","beginPacket","isDirectory","motorsWrite","drawCompass","digitalRead","clearScreen","serialEvent","rightToLeft","setTextSize","leftToRight","requestFrom","keyReleased","compassRead","analogWrite","interrupts","WiFiServer","disconnect","playMelody","parseFloat","autoscroll","getPINUsed","setPINUsed","setTimeout","sendAnalog","readSlider","analogRead","beginWrite","createChar","motorsStop","keyPressed","tempoWrite","readButton","subnetMask","debugPrint","macAddress","writeGreen","randomSeed","attachGPRS","readString","sendString","remotePort","releaseAll","mouseMoved","background","getXChange","getYChange","answerCall","getResult","voiceCall","endPacket","constrain","getSocket","writeJSON","getButton","available","connected","findUntil","readBytes","exitValue","readGreen","writeBlue","startLoop","IPAddress","isPressed","sendSysex","pauseMode","gatewayIP","setCursor","getOemKey","tuneWrite","noDisplay","loadImage","switchPIN","onRequest","onReceive","changePIN","playFile","noBuffer","parseInt","overflow","checkPIN","knobRead","beginTFT","bitClear","updateIR","bitWrite","position","writeRGB","highByte","writeRed","setSpeed","readBlue","noStroke","remoteIP","transfer","shutdown","hangCall","beginSMS","endWrite","attached","maintain","noCursor","checkReg","checkPUK","shiftOut","isValid","shiftIn","pulseIn","connect","println","localIP","pinMode","getIMEI","display","noBlink","process","getBand","running","beginSD","drawBMP","lowByte","setBand","release","bitRead","prepare","pointTo","readRed","setMode","noFill","remove","listen","stroke","detach","attach","noTone","exists","buffer","height","bitSet","circle","config","cursor","random","IRread","setDNS","endSMS","getKey","micros","millis","begin","print","write","ready","flush","width","isPIN","blink","clear","press","mkdir","rmdir","close","point","yield","image","BSSID","click","delay","read","text","move","peek","beep","rect","line","open","seek","fill","size","turn","stop","home","find","step","tone","sqrt","RSSI","SSID","end","bit","tan","cos","sin","pow","map","abs","max","min","get","run","put"],literal:["DIGITAL_MESSAGE","FIRMATA_STRING","ANALOG_MESSAGE","REPORT_DIGITAL","REPORT_ANALOG","INPUT_PULLUP","SET_PIN_MODE","INTERNAL2V56","SYSTEM_RESET","LED_BUILTIN","INTERNAL1V1","SYSEX_START","INTERNAL","EXTERNAL","DEFAULT","OUTPUT","INPUT","HIGH","LOW"]},n=function(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",o="(?!struct)("+r+"|"+t.optional(i)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",s={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},a={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},l={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},c={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line "+"pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(a,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},u={className:"title",begin:t.optional(i)+e.IDENT_RE,relevance:0},d=t.optional(i)+e.IDENT_RE+"\\s*\\(",p={type:["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],keyword:["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"]},h={className:"function.dispatch",relevance:0,keywords:{_hint:["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"]},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},f=[h,c,s,n,e.C_BLOCK_COMMENT_MODE,l,a],m={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:p,contains:f.concat([{begin:/\(/,end:/\)/,keywords:p,contains:f.concat(["self"]),relevance:0}]),relevance:0},g={className:"function",begin:"("+o+"[\\*&\\s]+)+"+d,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:p,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:p,relevance:0},{begin:d,returnBegin:!0,contains:[u],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[a,l]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:p,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,a,l,s,{begin:/\(/,end:/\)/,keywords:p,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,a,l,s]}]},s,n,e.C_BLOCK_COMMENT_MODE,c]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:p,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(m,g,h,f,[c,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function)\\s*<(?!<)",end:">",keywords:p,contains:["self",s]},{begin:e.IDENT_RE+"::",keywords:p},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}(e),r=n.keywords;return r.type=[...r.type,...t.type],r.literal=[...r.literal,...t.literal],r.built_in=[...r.built_in,...t.built_in],r._hints=t._hints,n.name="Arduino",n.aliases=["ino"],n.supersetOf="cpp",n})),rz.registerLanguage("bash",(function(e){const t=e.regex,n={},r={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,`(?![\\w\\d])(?![$])`)},r]});const i={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},o={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},s={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,i]};i.contains.push(s);const a={begin:/\$\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},l=e.SHEBANG({binary:`(${["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"].join("|")})`,relevance:10}),c={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0};return{name:"Bash",aliases:["sh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:["if","then","else","elif","fi","for","while","in","do","done","case","esac","function"],literal:["true","false"],built_in:["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset","alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","type","typeset","ulimit","unalias","set","shopt","autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp","chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"]},contains:[l,e.SHEBANG(),c,a,e.HASH_COMMENT_MODE,o,{match:/(\/[a-z._-]+)+/},s,{className:"",begin:/\\"/},{className:"string",begin:/'/,end:/'/},n]}})),rz.registerLanguage("c",(function(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",o="("+r+"|"+t.optional(i)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",s={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},a={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},l={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},c={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line "+"pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(a,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},u={className:"title",begin:t.optional(i)+e.IDENT_RE,relevance:0},d=t.optional(i)+e.IDENT_RE+"\\s*\\(",p={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal128","const","static","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream "+"auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set "+"unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos "+"asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp "+"fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper "+"isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow "+"printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp "+"strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan "+"vfprintf vprintf vsprintf endl initializer_list unique_ptr"},h=[c,s,n,e.C_BLOCK_COMMENT_MODE,l,a],f={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:p,contains:h.concat([{begin:/\(/,end:/\)/,keywords:p,contains:h.concat(["self"]),relevance:0}]),relevance:0},m={begin:"("+o+"[\\*&\\s]+)+"+d,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:p,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:p,relevance:0},{begin:d,returnBegin:!0,contains:[e.inherit(u,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:p,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,a,l,s,{begin:/\(/,end:/\)/,keywords:p,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,a,l,s]}]},s,n,e.C_BLOCK_COMMENT_MODE,c]};return{name:"C",aliases:["h"],keywords:p,disableAutodetect:!0,illegal:"</",contains:[].concat(f,m,h,[c,{begin:e.IDENT_RE+"::",keywords:p},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:c,strings:a,keywords:p}}})),rz.registerLanguage("cpp",(function(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",o="(?!struct)("+r+"|"+t.optional(i)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",s={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},a={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},l={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},c={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line "+"pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(a,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},u={className:"title",begin:t.optional(i)+e.IDENT_RE,relevance:0},d=t.optional(i)+e.IDENT_RE+"\\s*\\(",p={type:["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],keyword:["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"]},h={className:"function.dispatch",relevance:0,keywords:{_hint:["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"]},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},f=[h,c,s,n,e.C_BLOCK_COMMENT_MODE,l,a],m={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:p,contains:f.concat([{begin:/\(/,end:/\)/,keywords:p,contains:f.concat(["self"]),relevance:0}]),relevance:0},g={className:"function",begin:"("+o+"[\\*&\\s]+)+"+d,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:p,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:p,relevance:0},{begin:d,returnBegin:!0,contains:[u],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[a,l]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:p,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,a,l,s,{begin:/\(/,end:/\)/,keywords:p,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,a,l,s]}]},s,n,e.C_BLOCK_COMMENT_MODE,c]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:p,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(m,g,h,f,[c,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function)\\s*<(?!<)",end:">",keywords:p,contains:["self",s]},{begin:e.IDENT_RE+"::",keywords:p},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}})),rz.registerLanguage("csharp",(function(e){const t={keyword:["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"].concat(["add","alias","and","ascending","async","await","by","descending","equals","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","remove","select","set","unmanaged","value|0","var","when","where","with","yield"]),built_in:["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],literal:["default","false","null","true"]},n=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),r={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},i={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},o=e.inherit(i,{illegal:/\n/}),s={className:"subst",begin:/\{/,end:/\}/,keywords:t},a=e.inherit(s,{illegal:/\n/}),l={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,a]},c={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},s]},u=e.inherit(c,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},a]});s.contains=[c,l,i,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,r,e.C_BLOCK_COMMENT_MODE],a.contains=[u,l,o,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,r,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const d={variants:[c,l,i,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},p={begin:"<",end:">",contains:[{beginKeywords:"in out"},n]},h=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",f={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:t,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"\x3c!--|--\x3e"},{begin:"</?",end:">"}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},d,r,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},n,p,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[n,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[n,p,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+h+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:t,contains:[{beginKeywords:["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"].join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,p],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:t,relevance:0,contains:[d,r,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},f]}})),rz.registerLanguage("css",(function(e){const t=e.regex,n=(e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"("+"%|em|ex|ch|rem"+"|vw|vh|vmin|vmax"+"|cm|mm|in|pt|pc|px"+"|deg|grad|rad|turn"+"|s|ms"+"|Hz|kHz"+"|dpi|dpcm|dppx"+")?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z][A-Za-z0-9_-]*/}}))(e),r=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[n.BLOCK_COMMENT,{begin:/-(webkit|moz|ms|o)-(?=[a-z])/},n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+"[a-zA-Z-][a-zA-Z0-9_-]*",relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+CI.join("|")+")"},{begin:":(:)?("+OI.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+NI.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...r,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...r,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:/@-?\w[\w]*(-\w+)*/},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:"and or not only",attribute:DI.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...r,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+_I.join("|")+")\\b"}]}})),rz.registerLanguage("diff",(function(e){const t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}})),rz.registerLanguage("go",(function(e){const t={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:t,illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{begin:e.C_NUMBER_RE+"[i]",relevance:1},e.C_NUMBER_MODE]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,illegal:/["']/}]}]}})),rz.registerLanguage("graphql",(function(e){const t=e.regex;return{name:"GraphQL",aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"],literal:["true","false","null"]},contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation",begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{scope:"symbol",begin:t.concat(/[_A-Za-z][_0-9A-Za-z]*/,t.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}})),rz.registerLanguage("ini",(function(e){const t=e.regex,n={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:e.NUMBER_RE}]},r=e.COMMENT();r.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const i={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},o={className:"literal",begin:/\bon|off|true|false|yes|no\b/},s={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},a={begin:/\[/,end:/\]/,contains:[r,o,i,s,n,"self"],relevance:0},l=t.either(/[A-Za-z0-9_-]+/,/"(\\"|[^"])*"/,/'[^']*'/);return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[r,{className:"section",begin:/\[+/,end:/\]+/},{begin:t.concat(l,"(\\s*\\.\\s*",l,")*",t.lookahead(/\s*=\s*[^#\s]/)),className:"attr",starts:{end:/$/,contains:[r,a,o,i,s,n]}}]}})),rz.registerLanguage("java",(function(e){const t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",r=n+LI("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),i={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},o={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},s={className:"params",begin:/\(/,end:/\)/,keywords:i,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:i,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[s,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+r+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:i,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:i,relevance:0,contains:[o,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,II,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},II,o]}})),rz.registerLanguage("javascript",(function(e){const t=e.regex,n=jI,r="<>",i="</>",o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{const n=e[0].length+e.index,r=e.input[n];if("<"===r||","===r)return void t.ignoreMatch();let i;">"===r&&(((e,{after:t})=>{const n="</"+e[0].slice(1);return-1!==e.input.indexOf(n,t)})(e,{after:n})||t.ignoreMatch());(i=e.input.substring(n).match(/^\s+extends\s+/))&&0===i.index&&t.ignoreMatch()}},s={$pattern:jI,keyword:zI,literal:FI,built_in:$I,"variable.language":UI},a="[0-9](_?[0-9])*",l=`\\.(${a})`,c=`0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*`,u={className:"number",variants:[{begin:`(\\b(${c})((${l})|\\.)?|(${l}))`+`[eE][+-]?(${a})\\b`},{begin:`\\b(${c})\\b((${l})\\b|\\.)?|(${l})\\b`},{begin:`\\b(0|[1-9](_?[0-9])*)n\\b`},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},d={className:"subst",begin:"\\$\\{",end:"\\}",keywords:s,contains:[]},p={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,d],subLanguage:"xml"}},h={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,d],subLanguage:"css"}},f={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,d]},m={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:n+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},g=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,h,f,u];d.contains=g.concat({begin:/\{/,end:/\}/,keywords:s,contains:["self"].concat(g)});const b=[].concat(m,d.contains),y=b.concat([{begin:/\(/,end:/\)/,keywords:s,contains:["self"].concat(b)}]),v={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:y},w={variants:[{match:[/class/,/\s+/,n,/\s+/,/extends/,/\s+/,t.concat(n,"(",t.concat(/\./,n),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,n],scope:{1:"keyword",3:"title.class"}}]},x={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...PI,...RI]}},E={variants:[{match:[/function/,/\s+/,n,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[v],illegal:/%/},M={match:t.concat(/\b/,(k=[...BI,"super"],t.concat("(?!",k.join("|"),")")),n,t.lookahead(/\(/)),className:"title.function",relevance:0};var k;const _={begin:t.concat(/\./,t.lookahead(t.concat(n,/(?![0-9A-Za-z$_(])/))),end:n,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},D={match:[/get|set/,/\s+/,n,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},v]},C="(\\("+"[^()]*(\\("+"[^()]*(\\("+"[^()]*"+"\\)[^()]*)*"+"\\)[^()]*)*"+"\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",O={match:[/const|var|let/,/\s+/,n,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(C)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[v]};return{name:"Javascript",aliases:["js","jsx","mjs","cjs"],keywords:s,exports:{PARAMS_CONTAINS:y,CLASS_REFERENCE:x},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),{label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,h,f,m,u,x,{className:"attr",begin:n+t.lookahead(":"),relevance:0},O,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[m,e.REGEXP_MODE,{className:"function",begin:C,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:y}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:r,end:i},{match:/<[A-Za-z0-9\\._:-]+\s*\/>/},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0,contains:["self"]}]}]},E,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\("+"[^()]*(\\("+"[^()]*(\\("+"[^()]*"+"\\)[^()]*)*"+"\\)[^()]*)*"+"\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[v,e.inherit(e.TITLE_MODE,{begin:n,className:"title.function"})]},{match:/\.\.\./,relevance:0},_,{match:"\\$"+n,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[v]},M,{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},w,D,{match:/\$[(.]/}]}})),rz.registerLanguage("json",(function(e){const t=["true","false","null"],n={scope:"literal",beginKeywords:t.join(" ")};return{name:"JSON",keywords:{literal:t},contains:[{className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},{match:/[{}[\],:]/,className:"punctuation",relevance:0},e.QUOTE_STRING_MODE,n,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}})),rz.registerLanguage("kotlin",(function(e){const t={keyword:"abstract as val var vararg get set class object open private protected public noinline "+"crossinline dynamic final enum if else do while for when throw try catch finally "+"import package is in fun override companion reified inline lateinit init "+"interface annotation data sealed internal infix operator out by constructor super "+"tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},n={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},r={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},i={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},o={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[i,r]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,i,r]}]};r.contains.push(o);const s={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},a={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(o,{className:"string"}),"self"]}]},l=qI,c=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),u={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},d=u;return d.variants[1].contains=[u],u.variants[1].contains=[d],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,c,{className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},n,s,a,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[u,e.C_LINE_COMMENT_MODE,c],relevance:0},e.C_LINE_COMMENT_MODE,c,s,a,o,e.C_NUMBER_MODE]},c]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},s,a]},o,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:"\n"},l]}})),rz.registerLanguage("less",(function(e){const t=(e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"("+"%|em|ex|ch|rem"+"|vw|vh|vmin|vmax"+"|cm|mm|in|pt|pc|px"+"|deg|grad|rad|turn"+"|s|ms"+"|Hz|kHz"+"|dpi|dpcm|dppx"+")?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z][A-Za-z0-9_-]*/}}))(e),n=JI,r="[\\w-]+",i="("+r+"|@\\{"+r+"\\})",o=[],s=[],a=function(e){return{className:"string",begin:"~?"+e+".*?"+e}},l=function(e,t,n){return{className:e,begin:t,relevance:n}},c={$pattern:/[a-z-]+/,keyword:"and or not only",attribute:KI.join(" ")},u={begin:"\\(",end:"\\)",contains:s,keywords:c,relevance:0};s.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,a("'"),a('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,u,l("variable","@@?"+r,10),l("variable","@\\{"+r+"\\}"),l("built_in","~?`[^`]*?`"),{className:"attribute",begin:r+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);const d=s.concat({begin:/\{/,end:/\}/,contains:o}),p={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(s)},h={begin:i+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+ZI.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:s}}]},f={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:c,returnEnd:!0,contains:s,relevance:0}},m={className:"variable",variants:[{begin:"@"+r+"\\s*:",relevance:15},{begin:"@"+r}],starts:{end:"[;}]",returnEnd:!0,contains:d}},g={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:i,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:"[<='$\"]",relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,p,l("keyword","all\\b"),l("variable","@\\{"+r+"\\}"),{begin:"\\b("+YI.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,l("selector-tag",i,0),l("selector-id","#"+i),l("selector-class","\\."+i,0),l("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+QI.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+GI.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:d},{begin:"!important"},t.FUNCTION_DISPATCH]},b={begin:r+":(:)?"+`(${n.join("|")})`,returnBegin:!0,contains:[g]};return o.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,f,m,b,h,g,p,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:"[=>'/<($\"]",contains:o}})),rz.registerLanguage("lua",(function(e){const t="\\[=*\\[",n="\\]=*\\]",r={begin:t,end:n,contains:["self"]},i=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,n,{contains:[r],relevance:10})];return{name:"Lua",keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len "+"__gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert "+"collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring "+"module next pairs pcall print rawequal rawget rawset require select setfenv "+"setmetatable tonumber tostring type unpack xpcall arg self "+"coroutine resume yield status wrap create running debug getupvalue "+"debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv "+"io lines write close flush open output type read stderr stdin input stdout popen tmpfile "+"math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan "+"os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall "+"string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower "+"table setn insert getn foreachi maxn foreach concat sort remove"},contains:i.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:i}].concat(i)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:n,contains:[r],relevance:5}])}})),rz.registerLanguage("makefile",(function(e){const t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},n={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,t]},r={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort "+"word wordlist firstword lastword dir notdir suffix basename "+"addsuffix addprefix join wildcard realpath abspath error warning "+"shell origin flavor foreach if or and call eval file value"},contains:[t]},i={begin:"^"+e.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},o={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[t]};return{name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif "+"include -include sinclude override export unexport private vpath"},contains:[e.HASH_COMMENT_MODE,t,n,r,i,{className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},o]}})),rz.registerLanguage("markdown",(function(e){const t={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},n={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:e.regex.concat(/\[.+?\]\(/,/[A-Za-z][A-Za-z0-9+.-]*/,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},r={className:"strong",contains:[],variants:[{begin:/_{2}/,end:/_{2}/},{begin:/\*{2}/,end:/\*{2}/}]},i={className:"emphasis",contains:[],variants:[{begin:/\*(?!\*)/,end:/\*/},{begin:/_(?!_)/,end:/_/,relevance:0}]},o=e.inherit(r,{contains:[]}),s=e.inherit(i,{contains:[]});r.contains.push(s),i.contains.push(o);let a=[t,n];return[r,i,o,s].forEach((e=>{e.contains=e.contains.concat(a)})),a=a.concat(r,i),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:a},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:a}]}]},t,{className:"bullet",begin:"^[ \t]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},r,i,{className:"quote",begin:"^>\\s+",contains:a,end:"$"},{className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},{begin:"^[-\\*]{3,}",end:"$"},n,{begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]}]}})),rz.registerLanguage("objectivec",(function(e){const t=/[a-zA-Z@][a-zA-Z0-9_]*/,n={$pattern:t,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:{"variable.language":["this","super"],$pattern:t,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},illegal:"</",contains:[{className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line "+"pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+n.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:n,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}})),rz.registerLanguage("perl",(function(e){const t=e.regex,n=/[dualxmsipngr]{0,12}/,r={$pattern:/[\w.]+/,keyword:["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"].join(" ")},i={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:r},o={begin:/->\{/,end:/\}/},s={variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,`(?![A-Za-z])(?![@$%])`)},{begin:/[$%@][^\s\w{]/,relevance:0}]},a=[e.BACKSLASH_ESCAPE,i,s],l=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],c=(e,r,i="\\1")=>{const o="\\1"===i?i:t.concat(i,r);return t.concat(t.concat("(?:",e,")"),r,/(?:\\.|[^\\\/])*?/,o,/(?:\\.|[^\\\/])*?/,i,n)},u=(e,r,i)=>t.concat(t.concat("(?:",e,")"),r,/(?:\\.|[^\\\/])*?/,i,n),d=[s,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),o,{className:"string",contains:a,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:c("s|tr|y",t.either(...l,{capture:!0}))},{begin:c("s|tr|y","\\(","\\)")},{begin:c("s|tr|y","\\[","\\]")},{begin:c("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:u("(?:m|qr)?",/\//,/\//)},{begin:u("m|qr",t.either(...l,{capture:!0}),/\1/)},{begin:u("m|qr",/\(/,/\)/)},{begin:u("m|qr",/\[/,/\]/)},{begin:u("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return i.contains=d,o.contains=d,{name:"Perl",aliases:["pl","pm"],keywords:r,contains:d}})),rz.registerLanguage("php",(function(e){const t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,r=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),i=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),o={scope:"variable",match:"\\$+"+r},s={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},a=e.inherit(e.APOS_STRING_MODE,{illegal:null}),l="[ \t\n]",c={scope:"string",variants:[e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(s)}),a,e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*(\w+)\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(s)})]},u={scope:"number",variants:[{begin:`\\b0[bB][01]+(?:_[01]+)*\\b`},{begin:`\\b0[oO][0-7]+(?:_[0-7]+)*\\b`},{begin:`\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b`},{begin:`(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?`}],relevance:0},d=["false","null","true"],p=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],h=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],f={keyword:p,literal:(e=>{const t=[];return e.forEach((e=>{t.push(e),e.toLowerCase()===e?t.push(e.toUpperCase()):t.push(e.toLowerCase())})),t})(d),built_in:h},m=e=>e.map((e=>e.replace(/\|\d+$/,""))),g={variants:[{match:[/new/,t.concat(l,"+"),t.concat("(?!",m(h).join("\\b|"),"\\b)"),i],scope:{1:"keyword",4:"title.class"}}]},b=t.concat(r,"\\b(?!\\()"),y={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),b],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[i,t.concat(/::/,t.lookahead(/(?!class\b)/)),b],scope:{1:"title.class",3:"variable.constant"}},{match:[i,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[i,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},v={scope:"attr",match:t.concat(r,t.lookahead(":"),t.lookahead(/(?!::)/))},w={relevance:0,begin:/\(/,end:/\)/,keywords:f,contains:[v,o,y,e.C_BLOCK_COMMENT_MODE,c,u,g]},x={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",m(p).join("\\b|"),"|",m(h).join("\\b|"),"\\b)"),r,t.concat(l,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[w]};w.contains.push(x);const E=[v,y,e.C_BLOCK_COMMENT_MODE,c,u,g];return{case_insensitive:!1,keywords:f,contains:[{begin:t.concat(/#\[\s*/,i),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:d,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:d,keyword:["new","array"]},contains:["self",...E]},...E,{scope:"meta",match:i}]},e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},{scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},{scope:"variable.language",match:/\$this\b/},o,x,y,{match:[/const/,/\s/,r],scope:{1:"keyword",3:"variable.constant"}},g,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:f,contains:["self",o,y,e.C_BLOCK_COMMENT_MODE,c,u]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},c,u]}})),rz.registerLanguage("php-template",(function(e){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}})),rz.registerLanguage("plaintext",(function(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}})),rz.registerLanguage("python",(function(e){const t=e.regex,n=/[\p{XID_Start}_]\p{XID_Continue}*/u,r=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],i={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},o={className:"meta",begin:/^(>>>|\.\.\.) /},s={className:"subst",begin:/\{/,end:/\}/,keywords:i,illegal:/#/},a={begin:/\{\{/,relevance:0},l={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,o],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,o],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,o,a,s]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,o,a,s]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,a,s]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,a,s]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},c="[0-9](_?[0-9])*",u=`(\\b(${c}))?\\.(${c})|\\b(${c})\\.`,d=`\\b|${r.join("|")}`,p={className:"number",relevance:0,variants:[{begin:`(\\b(${c})|(${u}))[eE][+-]?(${c})[jJ]?(?=${d})`},{begin:`(${u})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${d})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${d})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${d})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${d})`},{begin:`\\b(${c})[jJ](?=${d})`}]},h={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:i,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},f={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:i,contains:["self",o,p,l,e.HASH_COMMENT_MODE]}]};return s.contains=[l,p,o],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:i,illegal:/(<\/|->|\?)|=>/,contains:[o,p,{begin:/\bself\b/},{beginKeywords:"if",relevance:0},l,h,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[f]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[p,f,l]}]}})),rz.registerLanguage("python-repl",(function(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}})),rz.registerLanguage("r",(function(e){const t=e.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,r=t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),i=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,o=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:n,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 "+"NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F "+"abs acos acosh all any anyNA Arg as.call as.character "+"as.complex as.double as.environment as.integer as.logical "+"as.null.default as.numeric as.raw asin asinh atan atanh attr "+"attributes baseenv browser c call ceiling class Conj cos cosh "+"cospi cummax cummin cumprod cumsum digamma dim dimnames "+"emptyenv exp expression floor forceAndCall gamma gc.time "+"globalenv Im interactive invisible is.array is.atomic is.call "+"is.character is.complex is.double is.environment is.expression "+"is.finite is.function is.infinite is.integer is.language "+"is.list is.logical is.matrix is.na is.name is.nan is.null "+"is.numeric is.object is.pairlist is.raw is.recursive is.single "+"is.symbol lazyLoadDBfetch length lgamma list log max min "+"missing Mod names nargs nzchar oldClass on.exit pos.to.env "+"proc.time prod quote range Re rep retracemem return round "+"seq_along seq_len seq.int sign signif sin sinh sinpi sqrt "+"standardGeneric substitute sum switch tan tanh tanpi tracemem "+"trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:n},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[i,r]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,r]},{scope:{1:"punctuation",2:"number"},match:[o,r]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,r]}]},{scope:{3:"operator"},match:[n,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:i},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:o},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}})),rz.registerLanguage("ruby",(function(e){const t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",r=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),i=t.concat(r,/(::\w+)*/),o={"variable.constant":["__FILE__","__LINE__"],"variable.language":["self","super"],keyword:["alias","and","attr_accessor","attr_reader","attr_writer","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","include","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield"],built_in:["proc","lambda"],literal:["true","false","nil"]},s={className:"doctag",begin:"@[A-Za-z]+"},a={begin:"#<",end:">"},l=[e.COMMENT("#","$",{contains:[s]}),e.COMMENT("^=begin","^=end",{contains:[s],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],c={className:"subst",begin:/#\{/,end:/\}/,keywords:o},u={className:"string",contains:[e.BACKSLASH_ESCAPE,c],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,c]})]}]},d="[0-9](_?[0-9])*",p={className:"number",relevance:0,variants:[{begin:`\\b(${"[1-9](_?[0-9])*|0"})(\\.(${d}))?([eE][+-]?(${d})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},h={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:o}]},f=[u,{variants:[{match:[/class\s+/,i,/\s+<\s+/,i]},{match:[/class\s+/,i]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:o},{relevance:0,match:[i,/\.new[ (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[h]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[u,{begin:n}],relevance:0},p,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])"+`(?![A-Za-z])(?![@$?'])`},{className:"params",begin:/\|/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:o},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,c],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(a,l),relevance:0}].concat(a,l);c.contains=f,h.contains=f;const m=[{begin:/^\s*=>/,starts:{end:"$",contains:f}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:o,contains:f}}];return l.unshift(a),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:o,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(m).concat(l).concat(f)}})),rz.registerLanguage("rust",(function(e){const t=e.regex,n={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let\b)/,e.IDENT_RE,t.lookahead(/\s*\(/))},r="([ui](8|16|32|64|128|size)|f(32|64))?",i=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],o=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:o,keyword:["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","unsafe","unsized","use","virtual","where","while","yield"],literal:["true","false","Some","None","Ok","Err"],built_in:i},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'\\?(x\w{2}|u\w{4}|U\w{8}|.)'/}]},{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*/},{className:"number",variants:[{begin:"\\b0b([01_]+)"+r},{begin:"\\b0o([0-7_]+)"+r},{begin:"\\b0x([A-Fa-f0-9_]+)"+r},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+r}],relevance:0},{begin:[/fn/,/\s+/,e.UNDERSCORE_IDENT_RE],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,e.UNDERSCORE_IDENT_RE],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,e.UNDERSCORE_IDENT_RE,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,e.UNDERSCORE_IDENT_RE],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,e.UNDERSCORE_IDENT_RE],className:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:i,type:o}},{className:"punctuation",begin:"->"},n]}})),rz.registerLanguage("scss",(function(e){const t=(e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"("+"%|em|ex|ch|rem"+"|vw|vh|vmin|vmax"+"|cm|mm|in|pt|pc|px"+"|deg|grad|rad|turn"+"|s|ms"+"|Hz|kHz"+"|dpi|dpcm|dppx"+")?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z][A-Za-z0-9_-]*/}}))(e),n=nL,r=tL,i="@[a-z-]+",o={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+XI.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+r.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+n.join("|")+")"},o,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+rL.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,o,t.HEXCOLOR,t.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:i,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:"and or not only",attribute:eL.join(" ")},contains:[{begin:i,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},o,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}})),rz.registerLanguage("shell",(function(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}})),rz.registerLanguage("sql",(function(e){const t=e.regex,n=e.COMMENT("--","$"),r=["true","false","unknown"],i=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],o=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],s=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],a=o,l=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year","add","asc","collation","desc","final","first","last","view"].filter((e=>!o.includes(e))),c={begin:t.concat(/\b/,t.either(...a),/\s*\(/),relevance:0,keywords:{built_in:a}};return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:function(e,{exceptions:t,when:n}={}){const r=n;return t=t||[],e.map((e=>e.match(/\|\d+$/)||t.includes(e)?e:r(e)?`${e}|0`:e))}(l,{when:e=>e.length<3}),literal:r,type:i,built_in:["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"]},contains:[{begin:t.either(...s),relevance:0,keywords:{$pattern:/[\w\.]+/,keyword:l.concat(s),literal:r,type:i}},{className:"type",begin:t.either("double precision","large object","with timezone","without timezone")},c,{className:"variable",begin:/@[a-z0-9]+/},{className:"string",variants:[{begin:/'/,end:/'/,contains:[{begin:/''/}]}]},{begin:/"/,end:/"/,contains:[{begin:/""/}]},e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,{className:"operator",begin:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0}]}})),rz.registerLanguage("swift",(function(e){const t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),r=[e.C_LINE_COMMENT_MODE,n],i={match:[/\./,aL(...cL,...uL)],className:{2:"keyword"}},o={match:sL(/\./,aL(...pL)),relevance:0},s=pL.filter((e=>"string"==typeof e)).concat(["_|0"]),a={variants:[{className:"keyword",match:aL(...pL.filter((e=>"string"!=typeof e)).concat(dL).map(lL),...uL)}]},l={$pattern:aL(/\b\w+/,/#\w+/),keyword:s.concat(mL),literal:hL},c=[i,o,a],u=[{match:sL(/\./,aL(...gL)),relevance:0},{className:"built_in",match:sL(/\b/,aL(...gL),/(?=\()/)}],d={match:/->/,relevance:0},p=[d,{className:"operator",relevance:0,variants:[{match:vL},{match:`\\.(\\.|${yL})+`}]}],h="([0-9]_*)+",f="([0-9a-fA-F]_*)+",m={className:"number",relevance:0,variants:[{match:`\\b(${h})(\\.(${h}))?`+`([eE][+-]?(${h}))?\\b`},{match:`\\b0x(${f})(\\.(${f}))?`+`([pP][+-]?(${h}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},g=(e="")=>({className:"subst",variants:[{match:sL(/\\/,e,/[0\\tnr"']/)},{match:sL(/\\/,e,/u\{[0-9a-fA-F]{1,8}\}/)}]}),b=(e="")=>({className:"subst",match:sL(/\\/,e,/[\t ]*(?:[\r\n]|\r\n)/)}),y=(e="")=>({className:"subst",label:"interpol",begin:sL(/\\/,e,/\(/),end:/\)/}),v=(e="")=>({begin:sL(e,/"""/),end:sL(/"""/,e),contains:[g(e),b(e),y(e)]}),w=(e="")=>({begin:sL(e,/"/),end:sL(/"/,e),contains:[g(e),y(e)]}),x={className:"string",variants:[v(),v("#"),v("##"),v("###"),w(),w("#"),w("##"),w("###")]},E={match:sL(/`/,EL,/`/)},M=[E,{className:"variable",match:/\$\d+/},{className:"variable",match:`\\$${xL}+`}],k=[{match:/(@|#(un)?)available/,className:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:_L,contains:[...p,m,x]}]}},{className:"keyword",match:sL(/@/,aL(...kL))},{className:"meta",match:sL(/@/,EL)}],_={match:oL(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:sL(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,xL,"+")},{className:"type",match:ML,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:sL(/\s+&\s+/,oL(ML)),relevance:0}]},D={begin:/</,end:/>/,keywords:l,contains:[...r,...c,...k,d,_]};_.contains.push(D);const C={begin:/\(/,end:/\)/,relevance:0,keywords:l,contains:["self",{match:sL(EL,/\s*:/),keywords:"_|0",relevance:0},...r,...c,...u,...p,m,x,...M,...k,_]},O={begin:/</,end:/>/,contains:[...r,_]},N={begin:/\(/,end:/\)/,keywords:l,contains:[{begin:aL(oL(sL(EL,/\s*:/)),oL(sL(EL,/\s+/,EL,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:EL}]},...r,...c,...p,m,x,...k,_,C],endsParent:!0,illegal:/["']/},T={match:[/func/,/\s+/,aL(E.match,EL,vL)],className:{1:"keyword",3:"title.function"},contains:[O,N,t],illegal:[/\[/,/%/]},S={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[O,N,t],illegal:/\[|%/},A={match:[/operator/,/\s+/,vL],className:{1:"keyword",3:"title"}},I={begin:[/precedencegroup/,/\s+/,ML],className:{1:"keyword",3:"title"},contains:[_],keywords:[...fL,...hL],end:/}/};for(const e of x.variants){const t=e.contains.find((e=>"interpol"===e.label));t.keywords=l;const n=[...c,...u,...p,m,x,...M];t.contains=[...n,{begin:/\(/,end:/\)/,contains:["self",...n]}]}return{name:"Swift",keywords:l,contains:[...r,T,S,{beginKeywords:"struct protocol class extension enum actor",end:"\\{",excludeEnd:!0,keywords:l,contains:[e.inherit(e.TITLE_MODE,{className:"title.class",begin:/[A-Za-z$_][\u00C0-\u02B80-9A-Za-z$_]*/}),...c]},A,I,{beginKeywords:"import",end:/$/,contains:[...r],relevance:0},...c,...u,...p,m,x,...M,...k,_,C]}})),rz.registerLanguage("typescript",(function(e){const t=LL(e),n=DL,r=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],i={beginKeywords:"namespace",end:/\{/,excludeEnd:!0,contains:[t.exports.CLASS_REFERENCE]},o={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:r},contains:[t.exports.CLASS_REFERENCE]},s={$pattern:DL,keyword:CL.concat(["type","namespace","interface","public","private","protected","implements","declare","abstract","readonly","enum","override"]),literal:OL,built_in:IL.concat(r),"variable.language":AL},a={className:"meta",begin:"@"+n},l=(e,t,n)=>{const r=e.contains.findIndex((e=>e.label===t));if(-1===r)throw new Error("can not find mode to replace");e.contains.splice(r,1,n)};Object.assign(t.keywords,s),t.exports.PARAMS_CONTAINS.push(a),t.contains=t.contains.concat([a,i,o]),l(t,"shebang",e.SHEBANG()),l(t,"use_strict",{className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/});const c=t.contains.find((e=>"func.def"===e.label));return c.relevance=0,Object.assign(t,{name:"TypeScript",aliases:["ts","tsx"]}),t})),rz.registerLanguage("vbnet",(function(e){const t=e.regex,n=/\d{1,2}\/\d{1,2}\/\d{4}/,r=/\d{4}-\d{1,2}-\d{1,2}/,i=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,o=/\d{1,2}(:\d{1,2}){1,2}/,s={className:"literal",variants:[{begin:t.concat(/# */,t.either(r,n),/ *#/)},{begin:t.concat(/# */,o,/ *#/)},{begin:t.concat(/# */,i,/ *#/)},{begin:t.concat(/# */,t.either(r,n),/ +/,t.either(i,o),/ *#/)}]},a=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),l=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval "+"call case catch class compare const continue custom declare default delegate dim distinct do "+"each equals else elseif end enum erase error event exit explicit finally for friend from function "+"get global goto group handles if implements imports in inherits interface into iterator "+"join key let lib loop me mid module mustinherit mustoverride mybase myclass "+"namespace narrowing new next notinheritable notoverridable "+"of off on operator option optional order overloads overridable overrides "+"paramarray partial preserve private property protected public "+"raiseevent readonly redim removehandler resume return "+"select set shadows shared skip static step stop structure strict sub synclock "+"take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor "+"cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[{className:"string",begin:/"(""|[^/n])"C\b/},{className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},s,{className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},{className:"label",begin:/^\w+:/},a,l,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[l]}]}})),rz.registerLanguage("wasm",(function(e){e.regex;const t=e.COMMENT(/\(;/,/;\)/);return t.contains.push("self"),{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"]},contains:[e.COMMENT(/;;/,/$/),t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},{className:"variable",begin:/\$[\w_]+/},{match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},{begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},e.QUOTE_STRING_MODE,{match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},{className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/},{className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/}]}})),rz.registerLanguage("xml",(function(e){const t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},i={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},o=e.inherit(i,{begin:/\(/,end:/\)/}),s=e.inherit(e.APOS_STRING_MODE,{className:"string"}),a=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),l={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:/[\p{L}0-9._:-]+/u,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[r]},{begin:/'/,end:/'/,contains:[r]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[i,a,s,o,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[i,o,a,s]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},r,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[a]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[l],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[l],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:l}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}})),rz.registerLanguage("yaml",(function(e){const t="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",r={className:"string",relevance:0,variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,{className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]}]},i=e.inherit(r,{variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),o={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},s={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},a={begin:/\{/,end:/\}/,contains:[s],illegal:"\\n",relevance:0},l={begin:"\\[",end:"\\]",contains:[s],illegal:"\\n",relevance:0},c=[{className:"attr",variants:[{begin:"\\w[\\w :\\/.-]*:(?=[ \t]|$)"},{begin:'"\\w[\\w :\\/.-]*":(?=[ \t]|$)'},{begin:"'\\w[\\w :\\/.-]*':(?=[ \t]|$)"}]},{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},o,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},a,l,r],u=[...c];return u.pop(),u.push(i),s.contains=u,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:c}}));const iz=()=>t.createElement(xc,{"data-cy":"neeto-editor-code-block"},t.createElement("pre",null,t.createElement(wc,{as:"code"})));var oz=kI.extend({addNodeView:()=>new kc(iz)}).configure({lowlight:rz}),sz=is.create({name:"paste-unformatted",addCommands:()=>({pasteUnformatted:()=>async e=>{let{editor:t}=e;const n=await navigator.clipboard.readText();t.commands.insertContent(n)}})}),az=jT.extend({content:"root",addProseMirrorPlugins(){const{editor:e}=this;return[new Qt({key:new Jt("eventHandler"),props:{handleClick(t,n){const{state:r}=t,i=r.doc.lastChild,o=r.doc.resolve(n).nodeBefore;if(i&&o){const t=i.eq(o),r=i.isInline,s=["paragraph","text"].includes(i.type.name);!t||r||s||e.commands.insertContentAt(n,{type:"paragraph",content:""})}}}})]}}),lz=Js.create({name:"external-video",addOptions:()=>({inline:!1,HTMLAttributes:{}}),inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes:()=>({src:{default:null},title:{default:null},frameborder:{default:"0"},allow:{default:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"},allowfullscreen:{default:"allowfullscreen"}}),parseHTML:()=>[{tag:"iframe[src]"}],renderHTML(e){let{HTMLAttributes:t}=e;return["iframe",Bo(this.options.HTMLAttributes,{...t,class:"video-wrapper"})]},addCommands(){return{setExternalVideo:e=>t=>{let{commands:n}=t;return n.insertContent({type:this.name,attrs:e})}}}});const cz=new Jt("suggestion");function uz({pluginKey:e=cz,editor:t,char:n="@",allowSpaces:r=!1,allowedPrefixes:i=[" "],startOfLine:o=!1,decorationTag:s="span",decorationClass:a="suggestion",command:l=(()=>null),items:c=(()=>[]),render:u=(()=>({})),allow:d=(()=>!0)}){let p;const h=null==u?void 0:u(),f=new Qt({key:e,view(){return{update:async(e,n)=>{var r,i,o,s,a,u,d;const f=null===(r=this.key)||void 0===r?void 0:r.getState(n),m=null===(i=this.key)||void 0===i?void 0:i.getState(e.state),g=f.active&&m.active&&f.range.from!==m.range.from,b=!f.active&&m.active,y=f.active&&!m.active,v=b||g,w=!b&&!y&&f.query!==m.query&&!g,x=y||g;if(!v&&!w&&!x)return;const E=x&&!v?f:m,M=e.dom.querySelector(`[data-decoration-id="${E.decorationId}"]`);p={editor:t,range:E.range,query:E.query,text:E.text,items:[],command:e=>{l({editor:t,range:E.range,props:e})},decorationNode:M,clientRect:M?()=>{var n;const{decorationId:r}=null===(n=this.key)||void 0===n?void 0:n.getState(t.state),i=e.dom.querySelector(`[data-decoration-id="${r}"]`);return(null==i?void 0:i.getBoundingClientRect())||null}:null},v&&(null===(o=null==h?void 0:h.onBeforeStart)||void 0===o||o.call(h,p)),w&&(null===(s=null==h?void 0:h.onBeforeUpdate)||void 0===s||s.call(h,p)),(w||v)&&(p.items=await c({editor:t,query:E.query})),x&&(null===(a=null==h?void 0:h.onExit)||void 0===a||a.call(h,p)),w&&(null===(u=null==h?void 0:h.onUpdate)||void 0===u||u.call(h,p)),v&&(null===(d=null==h?void 0:h.onStart)||void 0===d||d.call(h,p))},destroy:()=>{var e;p&&(null===(e=null==h?void 0:h.onExit)||void 0===e||e.call(h,p))}}},state:{init:()=>({active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}),apply(e,s,a,l){const{isEditable:c}=t,{composing:u}=t.view,{selection:p}=e,{empty:h,from:f}=p,m={...s};if(m.composing=u,c&&(h||t.view.composing)){!(f<s.range.from||f>s.range.to)||u||s.composing||(m.active=!1);const e=function(e){var t;const{char:n,allowSpaces:r,allowedPrefixes:i,startOfLine:o,$position:s}=e,a=n.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),l=new RegExp(`\\s${a}$`),c=o?"^":"",u=r?new RegExp(`${c}${a}.*?(?=\\s${a}|$)`,"gm"):new RegExp(`${c}(?:^)?${a}[^\\s${a}]*`,"gm"),d=(null===(t=s.nodeBefore)||void 0===t?void 0:t.isText)&&s.nodeBefore.text;if(!d)return null;const p=s.pos-d.length,h=Array.from(d.matchAll(u)).pop();if(!h||void 0===h.input||void 0===h.index)return null;const f=h.input.slice(Math.max(0,h.index-1),h.index),m=new RegExp(`^[${null==i?void 0:i.join("")}\0]?$`).test(f);if(null!==i&&!m)return null;const g=p+h.index;let b=g+h[0].length;return r&&l.test(d.slice(b-1,b+1))&&(h[0]+=" ",b+=1),g<s.pos&&b>=s.pos?{range:{from:g,to:b},query:h[0].slice(n.length),text:h[0]}:null}({char:n,allowSpaces:r,allowedPrefixes:i,startOfLine:o,$position:p.$from}),a=`id_${Math.floor(4294967295*Math.random())}`;e&&d({editor:t,state:l,range:e.range})?(m.active=!0,m.decorationId=s.decorationId?s.decorationId:a,m.range=e.range,m.query=e.query,m.text=e.text):m.active=!1}else m.active=!1;return m.active||(m.decorationId=null,m.range={from:0,to:0},m.query=null,m.text=null),m}},props:{handleKeyDown(e,t){var n;const{active:r,range:i}=f.getState(e.state);return r&&(null===(n=null==h?void 0:h.onKeyDown)||void 0===n?void 0:n.call(h,{view:e,event:t,range:i}))||!1},decorations(e){const{active:t,range:n,decorationId:r}=f.getState(e);return t?zi.create(e.doc,[Ii.inline(n.from,n.to,{nodeName:s,class:a,"data-decoration-id":r})]):null}}});return f}const dz=new Jt("emoji-picker"),pz=Js.create({name:"emojiPicker",group:"inline",inline:!0,selectable:!1,atom:!0,addOptions:()=>({suggestion:{char:"::",startOfLine:!1,pluginKey:dz,items:()=>[],render:()=>{let e,t;return{onStart(n){e=new Ec(By,{props:n,editor:n.editor}),t=oc("body",{theme:"light",getReferenceClientRect:n.clientRect,appendTo:()=>document.body,content:e.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"bottom-start",zIndex:99999})},onKeyDown(t){var n;return null===(n=e.ref)||void 0===n?void 0:n.onKeyDown(t)},onExit(){t[0].destroy(),e.destroy()}}}}}),addProseMirrorPlugins(){return[uz({editor:this.editor,...this.options.suggestion})]}});class hz extends t.Component{constructor(){super(...arguments),zf(this,"state",{isLoading:!1,selectedIndex:0,emojiSuggestions:[]}),zf(this,"fetchEmojiData",(async()=>{this.setState({isLoading:!0});try{const{data:e}=await Hg.get("https://cdn.jsdelivr.net/npm/@emoji-mart/data");return this.setState({isLoading:!1}),e}catch(e){return this.setState({isLoading:!1}),{}}})),zf(this,"searchEmoji",(async()=>{if(this.props.query)return(await Rb.search(this.props.query)).slice(0,5);return(await Promise.all(["+1","-1","smile","tada","heart"].map((e=>Rb.search(e))))).map((e=>e[0]))})),zf(this,"searchEmojiAndSetState",(async()=>{const e=await this.searchEmoji();this.setState({emojiSuggestions:e})})),zf(this,"setEditorState",(async()=>{const e=await this.searchEmoji();this.props.editor.chain().focus().deleteRange(this.props.range).setEmoji(e[0]).run()})),zf(this,"onKeyDown",(e=>{let{event:t}=e;return"ArrowLeft"===t.key||"ArrowDown"===t.key?(this.setState((e=>{let{selectedIndex:t,emojiSuggestions:n}=e;return{selectedIndex:(t+n.length-1)%n.length}})),!0):"ArrowRight"===t.key||"ArrowUp"===t.key?(this.setState((e=>{let{selectedIndex:t,emojiSuggestions:n}=e;return{selectedIndex:(t+1)%n.length}})),!0):"Enter"===t.key?(this.selectItem(this.state.selectedIndex),!0):" "===t.key?(Iu(this.props.query)?this.props.editor.chain().focus().insertContent(" ").run():this.setEditorState(),!0):"Escape"===t.key&&(this.props.editor.chain().focus().insertContent(" ").run(),!0)})),zf(this,"selectItem",(e=>{this.props.editor.chain().focus().deleteRange(this.props.range).setEmoji(this.state.emojiSuggestions[e]).run()}))}componentDidMount(){qb({data:this.fetchEmojiData,theme:"light",previewPosition:"none"}),this.searchEmojiAndSetState()}componentDidUpdate(e){this.props.query!==e.query&&this.searchEmojiAndSetState()}render(){return t.createElement("div",{className:"neeto-editor-emoji-suggestion"},this.state.isLoading&&t.createElement(wO,null),!this.state.isLoading&&(this.state.emojiSuggestions.length>0?this.state.emojiSuggestions.map(((e,n)=>t.createElement("div",{key:e.id,onClick:()=>this.selectItem(n),className:Sc("neeto-editor-emoji-suggestion__item",{"neeto-editor-emoji-suggestion__item--selected":n===this.state.selectedIndex}),"data-cy":"neeto-editor-emoji-suggestion-".concat(e.id)},e.skins[0].native))):t.createElement("p",null,"No results")))}}const fz={char:":",startOfLine:!1,pluginKey:new Jt("emoji-suggestion"),command:e=>{let{editor:t,range:n,props:r}=e;t.chain().focus().deleteRange(n).setEmoji(r).run()},items:()=>[],render:()=>{let e,t;return{onStart(n){e=new Ec(hz,{props:n,editor:n.editor}),t=oc("body",{theme:"light",getReferenceClientRect:n.clientRect,appendTo:()=>document.body,content:e.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"top-start",zIndex:99999})},onUpdate(n){e.updateProps(n),t[0].setProps({getReferenceClientRect:n.clientRect})},onKeyDown(t){var n;return null===(n=e.ref)||void 0===n?void 0:n.onKeyDown(t)},onExit(){t[0].destroy(),e.destroy()}}}};var mz=Js.create({name:"emojiSuggestion",group:"inline",inline:!0,selectable:!1,atom:!0,addOptions:()=>({HTMLAttributes:{class:"neeto-editor-emoji"},renderEmoji(e){let{node:t}=e;return t.attrs.label},suggestion:{}}),addAttributes:()=>({label:{default:null,parseHTML:e=>e.getAttribute("data-label"),renderHTML:e=>e.label?{"data-label":e.label}:{}}}),parseHTML:()=>[{tag:"span[data-emoji]"}],renderHTML(e){let{node:t,HTMLAttributes:n}=e;return["span",Bo({"data-emoji":""},this.options.HTMLAttributes,n),this.options.renderEmoji({node:t})]},renderText(e){let{node:t}=e;return this.options.renderEmoji({node:t})},addCommands(){return{setEmoji:e=>t=>{var n;let{chain:r}=t;r().focus().insertContent([{type:this.name,attrs:{label:(null==e?void 0:e.native)||(null==e||null===(n=e.skins[0])||void 0===n?void 0:n.native)||""}},{type:"text",text:" "}]).run()}}},addProseMirrorPlugins(){return[uz({editor:this.editor,...this.options.suggestion})]}}).configure({suggestion:fz});const gz=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,bz=Js.create({name:"image",addOptions:()=>({inline:!1,allowBase64:!1,HTMLAttributes:{}}),inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes:()=>({src:{default:null},alt:{default:null},title:{default:null}}),parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:e}){return["img",Bo(this.options.HTMLAttributes,e)]},addCommands(){return{setImage:e=>({commands:t})=>t.insertContent({type:this.name,attrs:e})}},addInputRules(){return[Ys({find:gz,type:this.type,getAttributes:e=>{const[,,t,n,r]=e;return{src:n,alt:t,title:r}}})]}});var yz,vz=void 0&&(void 0).__extends||(yz=function(e,t){return yz=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},yz(e,t)},function(e,t){function n(){this.constructor=e}yz(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),wz=void 0&&(void 0).__assign||function(){return wz=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},wz.apply(this,arguments)},xz={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},Ez={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},Mz={width:"20px",height:"20px",position:"absolute"},kz={top:wz(wz({},xz),{top:"-5px"}),right:wz(wz({},Ez),{left:void 0,right:"-5px"}),bottom:wz(wz({},xz),{top:void 0,bottom:"-5px"}),left:wz(wz({},Ez),{left:"-5px"}),topRight:wz(wz({},Mz),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:wz(wz({},Mz),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:wz(wz({},Mz),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:wz(wz({},Mz),{left:"-10px",top:"-10px",cursor:"nw-resize"})},_z=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.onMouseDown=function(t){e.props.onResizeStart(t,e.props.direction)},e.onTouchStart=function(t){e.props.onResizeStart(t,e.props.direction)},e}return vz(n,t),n.prototype.render=function(){return e.createElement("div",{className:this.props.className||"",style:wz(wz({position:"absolute",userSelect:"none"},kz[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart},this.props.children)},n}(e.PureComponent),Dz=void 0&&(void 0).__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Cz=void 0&&(void 0).__assign||function(){return Cz=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Cz.apply(this,arguments)},Oz={width:"auto",height:"auto"},Nz=function(e,t,n){return Math.max(Math.min(e,n),t)},Tz=function(e,t){return Math.round(e/t)*t},Sz=function(e,t){return new RegExp(e,"i").test(t)},Az=function(e){return Boolean(e.touches&&e.touches.length)},Iz=function(e,t,n){void 0===n&&(n=0);var r=t.reduce((function(n,r,i){return Math.abs(r-e)<Math.abs(t[n]-e)?i:n}),0),i=Math.abs(t[r]-e);return 0===n||i<n?t[r]:e},Lz=function(e){return"auto"===(e=e.toString())||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:e+"px"},jz=function(e,t,n,r){if(e&&"string"==typeof e){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%"))return t*(Number(e.replace("%",""))/100);if(e.endsWith("vw"))return n*(Number(e.replace("vw",""))/100);if(e.endsWith("vh"))return r*(Number(e.replace("vh",""))/100)}return e},zz=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],Fz="__resizable_base__",Pz=function(t){function n(e){var n=t.call(this,e)||this;return n.ratio=1,n.resizable=null,n.parentLeft=0,n.parentTop=0,n.resizableLeft=0,n.resizableRight=0,n.resizableTop=0,n.resizableBottom=0,n.targetLeft=0,n.targetTop=0,n.appendBase=function(){if(!n.resizable||!n.window)return null;var e=n.parentNode;if(!e)return null;var t=n.window.document.createElement("div");return t.style.width="100%",t.style.height="100%",t.style.position="absolute",t.style.transform="scale(0, 0)",t.style.left="0",t.style.flex="0 0 100%",t.classList?t.classList.add(Fz):t.className+=Fz,e.appendChild(t),t},n.removeBase=function(e){var t=n.parentNode;t&&t.removeChild(e)},n.ref=function(e){e&&(n.resizable=e)},n.state={isResizing:!1,width:void 0===(n.propsSize&&n.propsSize.width)?"auto":n.propsSize&&n.propsSize.width,height:void 0===(n.propsSize&&n.propsSize.height)?"auto":n.propsSize&&n.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},n.onResizeStart=n.onResizeStart.bind(n),n.onMouseMove=n.onMouseMove.bind(n),n.onMouseUp=n.onMouseUp.bind(n),n}return Dz(n,t),Object.defineProperty(n.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"window",{get:function(){return this.resizable&&this.resizable.ownerDocument?this.resizable.ownerDocument.defaultView:null},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||Oz},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"size",{get:function(){var e=0,t=0;if(this.resizable&&this.window){var n=this.resizable.offsetWidth,r=this.resizable.offsetHeight,i=this.resizable.style.position;"relative"!==i&&(this.resizable.style.position="relative"),e="auto"!==this.resizable.style.width?this.resizable.offsetWidth:n,t="auto"!==this.resizable.style.height?this.resizable.offsetHeight:r,this.resizable.style.position=i}return{width:e,height:t}},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"sizeStyle",{get:function(){var e=this,t=this.props.size,n=function(t){if(void 0===e.state[t]||"auto"===e.state[t])return"auto";if(e.propsSize&&e.propsSize[t]&&e.propsSize[t].toString().endsWith("%")){if(e.state[t].toString().endsWith("%"))return e.state[t].toString();var n=e.getParentSize();return Number(e.state[t].toString().replace("px",""))/n[t]*100+"%"}return Lz(e.state[t])};return{width:t&&void 0!==t.width&&!this.state.isResizing?Lz(t.width):n("width"),height:t&&void 0!==t.height&&!this.state.isResizing?Lz(t.height):n("height")}},enumerable:!1,configurable:!0}),n.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var e=this.appendBase();if(!e)return{width:0,height:0};var t=!1,n=this.parentNode.style.flexWrap;"wrap"!==n&&(t=!0,this.parentNode.style.flexWrap="wrap"),e.style.position="relative",e.style.minWidth="100%",e.style.minHeight="100%";var r={width:e.offsetWidth,height:e.offsetHeight};return t&&(this.parentNode.style.flexWrap=n),this.removeBase(e),r},n.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},n.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},n.prototype.componentDidMount=function(){if(this.resizable&&this.window){var e=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:"auto"!==e.flexBasis?e.flexBasis:void 0})}},n.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},n.prototype.createSizeForCssProperty=function(e,t){var n=this.propsSize&&this.propsSize[t];return"auto"!==this.state[t]||this.state.original[t]!==e||void 0!==n&&"auto"!==n?e:"auto"},n.prototype.calculateNewMaxFromBoundary=function(e,t){var n,r,i=this.props.boundsByDirection,o=this.state.direction,s=i&&Sz("left",o),a=i&&Sz("top",o);if("parent"===this.props.bounds){var l=this.parentNode;l&&(n=s?this.resizableRight-this.parentLeft:l.offsetWidth+(this.parentLeft-this.resizableLeft),r=a?this.resizableBottom-this.parentTop:l.offsetHeight+(this.parentTop-this.resizableTop))}else"window"===this.props.bounds?this.window&&(n=s?this.resizableRight:this.window.innerWidth-this.resizableLeft,r=a?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(n=s?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),r=a?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return n&&Number.isFinite(n)&&(e=e&&e<n?e:n),r&&Number.isFinite(r)&&(t=t&&t<r?t:r),{maxWidth:e,maxHeight:t}},n.prototype.calculateNewSizeFromDirection=function(e,t){var n=this.props.scale||1,r=this.props.resizeRatio||1,i=this.state,o=i.direction,s=i.original,a=this.props,l=a.lockAspectRatio,c=a.lockAspectRatioExtraHeight,u=a.lockAspectRatioExtraWidth,d=s.width,p=s.height,h=c||0,f=u||0;return Sz("right",o)&&(d=s.width+(e-s.x)*r/n,l&&(p=(d-f)/this.ratio+h)),Sz("left",o)&&(d=s.width-(e-s.x)*r/n,l&&(p=(d-f)/this.ratio+h)),Sz("bottom",o)&&(p=s.height+(t-s.y)*r/n,l&&(d=(p-h)*this.ratio+f)),Sz("top",o)&&(p=s.height-(t-s.y)*r/n,l&&(d=(p-h)*this.ratio+f)),{newWidth:d,newHeight:p}},n.prototype.calculateNewSizeFromAspectRatio=function(e,t,n,r){var i=this.props,o=i.lockAspectRatio,s=i.lockAspectRatioExtraHeight,a=i.lockAspectRatioExtraWidth,l=void 0===r.width?10:r.width,c=void 0===n.width||n.width<0?e:n.width,u=void 0===r.height?10:r.height,d=void 0===n.height||n.height<0?t:n.height,p=s||0,h=a||0;if(o){var f=(u-p)*this.ratio+h,m=(d-p)*this.ratio+h,g=(l-h)/this.ratio+p,b=(c-h)/this.ratio+p,y=Math.max(l,f),v=Math.min(c,m),w=Math.max(u,g),x=Math.min(d,b);e=Nz(e,y,v),t=Nz(t,w,x)}else e=Nz(e,l,c),t=Nz(t,u,d);return{newWidth:e,newHeight:t}},n.prototype.setBoundingClientRect=function(){if("parent"===this.props.bounds){var e=this.parentNode;if(e){var t=e.getBoundingClientRect();this.parentLeft=t.left,this.parentTop=t.top}}if(this.props.bounds&&"string"!=typeof this.props.bounds){var n=this.props.bounds.getBoundingClientRect();this.targetLeft=n.left,this.targetTop=n.top}if(this.resizable){var r=this.resizable.getBoundingClientRect(),i=r.left,o=r.top,s=r.right,a=r.bottom;this.resizableLeft=i,this.resizableRight=s,this.resizableTop=o,this.resizableBottom=a}},n.prototype.onResizeStart=function(e,t){if(this.resizable&&this.window){var n,r=0,i=0;if(e.nativeEvent&&function(e){return Boolean((e.clientX||0===e.clientX)&&(e.clientY||0===e.clientY))}(e.nativeEvent)?(r=e.nativeEvent.clientX,i=e.nativeEvent.clientY):e.nativeEvent&&Az(e.nativeEvent)&&(r=e.nativeEvent.touches[0].clientX,i=e.nativeEvent.touches[0].clientY),this.props.onResizeStart)if(this.resizable)if(!1===this.props.onResizeStart(e,t,this.resizable))return;this.props.size&&(void 0!==this.props.size.height&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),void 0!==this.props.size.width&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio="number"==typeof this.props.lockAspectRatio?this.props.lockAspectRatio:this.size.width/this.size.height;var o=this.window.getComputedStyle(this.resizable);if("auto"!==o.flexBasis){var s=this.parentNode;if(s){var a=this.window.getComputedStyle(s).flexDirection;this.flexDir=a.startsWith("row")?"row":"column",n=o.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var l={original:{x:r,y:i,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:Cz(Cz({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(e.target).cursor||"auto"}),direction:t,flexBasis:n};this.setState(l)}},n.prototype.onMouseMove=function(e){var t=this;if(this.state.isResizing&&this.resizable&&this.window){if(this.window.TouchEvent&&Az(e))try{e.preventDefault(),e.stopPropagation()}catch(e){}var n=this.props,r=n.maxWidth,i=n.maxHeight,o=n.minWidth,s=n.minHeight,a=Az(e)?e.touches[0].clientX:e.clientX,l=Az(e)?e.touches[0].clientY:e.clientY,c=this.state,u=c.direction,d=c.original,p=c.width,h=c.height,m=this.getParentSize(),g=function(e,t,n,r,i,o,s){return r=jz(r,e.width,t,n),i=jz(i,e.height,t,n),o=jz(o,e.width,t,n),s=jz(s,e.height,t,n),{maxWidth:void 0===r?void 0:Number(r),maxHeight:void 0===i?void 0:Number(i),minWidth:void 0===o?void 0:Number(o),minHeight:void 0===s?void 0:Number(s)}}(m,this.window.innerWidth,this.window.innerHeight,r,i,o,s);r=g.maxWidth,i=g.maxHeight,o=g.minWidth,s=g.minHeight;var b=this.calculateNewSizeFromDirection(a,l),y=b.newHeight,v=b.newWidth,w=this.calculateNewMaxFromBoundary(r,i);this.props.snap&&this.props.snap.x&&(v=Iz(v,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(y=Iz(y,this.props.snap.y,this.props.snapGap));var x=this.calculateNewSizeFromAspectRatio(v,y,{width:w.maxWidth,height:w.maxHeight},{width:o,height:s});if(v=x.newWidth,y=x.newHeight,this.props.grid){var E=Tz(v,this.props.grid[0]),M=Tz(y,this.props.grid[1]),k=this.props.snapGap||0;v=0===k||Math.abs(E-v)<=k?E:v,y=0===k||Math.abs(M-y)<=k?M:y}var _={width:v-d.width,height:y-d.height};if(p&&"string"==typeof p)if(p.endsWith("%"))v=v/m.width*100+"%";else if(p.endsWith("vw")){v=v/this.window.innerWidth*100+"vw"}else if(p.endsWith("vh")){v=v/this.window.innerHeight*100+"vh"}if(h&&"string"==typeof h)if(h.endsWith("%"))y=y/m.height*100+"%";else if(h.endsWith("vw")){y=y/this.window.innerWidth*100+"vw"}else if(h.endsWith("vh")){y=y/this.window.innerHeight*100+"vh"}var D={width:this.createSizeForCssProperty(v,"width"),height:this.createSizeForCssProperty(y,"height")};"row"===this.flexDir?D.flexBasis=D.width:"column"===this.flexDir&&(D.flexBasis=D.height),f((function(){t.setState(D)})),this.props.onResize&&this.props.onResize(e,u,this.resizable,_)}},n.prototype.onMouseUp=function(e){var t=this.state,n=t.isResizing,r=t.direction,i=t.original;if(n&&this.resizable){var o={width:this.size.width-i.width,height:this.size.height-i.height};this.props.onResizeStop&&this.props.onResizeStop(e,r,this.resizable,o),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:Cz(Cz({},this.state.backgroundStyle),{cursor:"auto"})})}},n.prototype.updateSize=function(e){this.setState({width:e.width,height:e.height})},n.prototype.renderResizer=function(){var t=this,n=this.props,r=n.enable,i=n.handleStyles,o=n.handleClasses,s=n.handleWrapperStyle,a=n.handleWrapperClass,l=n.handleComponent;if(!r)return null;var c=Object.keys(r).map((function(n){return!1!==r[n]?e.createElement(_z,{key:n,direction:n,onResizeStart:t.onResizeStart,replaceStyles:i&&i[n],className:o&&o[n]},l&&l[n]?l[n]:null):null}));return e.createElement("div",{className:a,style:s},c)},n.prototype.render=function(){var t=this,n=Object.keys(this.props).reduce((function(e,n){return-1!==zz.indexOf(n)||(e[n]=t.props[n]),e}),{}),r=Cz(Cz(Cz({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(r.flexBasis=this.state.flexBasis);var i=this.props.as||"div";return e.createElement(i,Cz({ref:this.ref,style:r,className:this.props.className},n),this.state.isResizing&&e.createElement("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer())},n.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},n}(e.PureComponent);const Rz=e=>{let{node:n,editor:r,getPos:i}=e;const{alt:o,src:s,float:a,align:l,height:c,width:u}=n.attrs,d=o||"",{view:p}=r;return t.createElement(xc,null,t.createElement(Pz,{lockAspectRatio:!0,className:"neeto-editor__image neeto-editor__image--".concat(a," neeto-editor__image--").concat(l," neeto-editor__image-defaults"),size:{height:c,width:u},onResizeStop:(e,t,o)=>{p.dispatch(p.state.tr.setNodeMarkup(i(),void 0,{...n.attrs,height:o.offsetHeight,width:o.offsetWidth})),r.commands.focus()}},t.createElement("figure",null,t.createElement("img",x({alt:d,src:s},n.attrs)),t.createElement("figcaption",null,d))))},Bz=bz.extend({name:"image",addAttributes:()=>({...bz.config.addAttributes(),height:{default:"auto",rendered:!1},width:{default:"fit-content",rendered:!1},float:{default:"none",rendered:!1},align:{default:"center",rendered:!1}}),addCommands(){return{setImage:e=>t=>{var n,r,i;let{tr:o,commands:s}=t;return"image"===(null===(n=o.selection)||void 0===n||null===(r=n.node)||void 0===r||null===(i=r.type)||void 0===i?void 0:i.name)?s.updateAttributes("image",e):s.insertContent({type:this.name,attrs:e})},setImageAttributes:e=>t=>{let{tr:n}=t;const{selection:r}=n,i={...r.node.attrs,...e},o=this.type.create(i);n.replaceRangeWith(r.from,r.to,o)}}},parseHTML:()=>[{tag:"img"}],renderHTML(e){let{node:t}=e;const{alt:n,src:r,float:i,align:o,height:s,width:a}=t.attrs,l=n||"",c=isNaN(s)?s:"".concat(s,"px"),u=isNaN(a)?a:"".concat(a,"px"),d="height:".concat(c,";width:").concat(u,";");return["a",{class:"neeto-editor__image neeto-editor__image--".concat(i," neeto-editor__image--").concat(o," neeto-editor__image-defaults"),style:d,href:r,target:"_blank",rel:"noopener noreferrer"},["figure",{},["img",Bo(t.attrs,{src:r,caption:l})],["figcaption",l]]]},addNodeView:()=>kc(Rz)});var Uz=e=>{let{uploadEndpoint:t}=e;return Bz.extend({addProseMirrorPlugins:()=>[new Qt({props:{handleDOMEvents:{paste(e,n){var r,i;const{schema:o,selection:{$anchor:{pos:s}}}=e.state;if(!(null===(r=n.clipboardData)||void 0===r||null===(i=r.files)||void 0===i?void 0:i.length))return;const a=Array.from(n.clipboardData.files).filter((e=>/image/i.test(e.type)));a.length&&(n.preventDefault(),a.forEach((async n=>{const r=o.nodes.image.create({src:await(i=n,a=t,new Promise(((e,t)=>{new g(i,a).create(((n,r)=>{let{blob_url:i}=r;return n?t(n):e(i)}))})))});var i,a;const l=e.state.tr.insert(s,r);e.dispatch(l)})))}}}})]})},$z=Js.create({name:"figcaption",selectable:!1,draggable:!1,parseHTML:()=>[{tag:"figcaption"}]});const Hz=e=>{let{handleSubmit:t,shortcuts:n}=e;return is.create({name:"keyboard-shortcuts",addKeyboardShortcuts(){return{"Mod-Enter":()=>(null==t||t(this.editor.getHTML()),this.editor.commands.blur(),!0),...n}}})};var Wz=e=>{let{handleSubmit:t,shortcuts:n}=e;return Hz({handleSubmit:t,shortcuts:n})};const Vz=new Jt("mention"),qz=Js.create({name:"mention",addOptions(){return{HTMLAttributes:{},renderLabel({options:e,node:t}){var n;return`${e.suggestion.char}${null!==(n=t.attrs.label)&&void 0!==n?n:t.attrs.id}`},suggestion:{char:"@",pluginKey:Vz,command:({editor:e,range:t,props:n})=>{var r,i;const o=e.view.state.selection.$to.nodeAfter;(null===(r=null==o?void 0:o.text)||void 0===r?void 0:r.startsWith(" "))&&(t.to+=1),e.chain().focus().insertContentAt(t,[{type:this.name,attrs:n},{type:"text",text:" "}]).run(),null===(i=window.getSelection())||void 0===i||i.collapseToEnd()},allow:({state:e,range:t})=>{const n=e.doc.resolve(t.from),r=e.schema.nodes[this.name];return!!n.parent.type.contentMatch.matchType(r)}}}},group:"inline",inline:!0,selectable:!1,atom:!0,addAttributes:()=>({id:{default:null,parseHTML:e=>e.getAttribute("data-id"),renderHTML:e=>e.id?{"data-id":e.id}:{}},label:{default:null,parseHTML:e=>e.getAttribute("data-label"),renderHTML:e=>e.label?{"data-label":e.label}:{}}}),parseHTML(){return[{tag:`span[data-type="${this.name}"]`}]},renderHTML({node:e,HTMLAttributes:t}){return["span",Bo({"data-type":this.name},this.options.HTMLAttributes,t),this.options.renderLabel({options:this.options,node:e})]},renderText({node:e}){return this.options.renderLabel({options:this.options,node:e})},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.command((({tr:e,state:t})=>{let n=!1;const{selection:r}=t,{empty:i,anchor:o}=r;return!!i&&(t.doc.nodesBetween(o-1,o,((t,r)=>{if(t.type.name===this.name)return n=!0,e.insertText(this.options.suggestion.char||"",r,r+t.nodeSize),!1})),n)}))}},addProseMirrorPlugins(){return[uz({editor:this.editor,...this.options.suggestion})]}}),Yz=e=>{let{wrapperRef:t,index:n}=e;if(!t.current||n>=t.current.children.length)return;const r=8,i=t.current,o=i.children[n],s=o.clientHeight+r;let a=i.scrollTop;o.offsetTop+s>a+i.clientHeight?a=o.offsetTop-i.clientHeight+s:a>o.offsetTop&&(a=o.offsetTop-r),t.current.scrollTop=a};class Kz extends t.Component{constructor(e){super(e),zf(this,"selectItem",(e=>{const{items:t,command:n}=this.props,r=t[e];r&&n({label:r.name,id:r.key})})),zf(this,"upHandler",(()=>{const{items:e}=this.props;this.setState((t=>{const{selectedIndex:n}=t;return{selectedIndex:(n+e.length-1)%e.length}}))})),zf(this,"downHandler",(()=>{const{items:e}=this.props;this.setState((t=>{const{selectedIndex:n}=t;return{selectedIndex:(n+1)%e.length}}))})),zf(this,"enterHandler",(()=>{const{selectedIndex:e}=this.state;this.selectItem(e)})),zf(this,"onKeyDown",(e=>{let{event:t}=e;const n={ArrowUp:this.upHandler,ArrowDown:this.downHandler,Enter:this.enterHandler};return!!Object.prototype.hasOwnProperty.call(n,t.key)&&(n[t.key](),!0)})),this.state={selectedIndex:0},this.mentionRef=t.createRef()}componentDidUpdate(e){const{items:t}=this.props;t!==e.items&&this.setState({selectedIndex:0}),Yz({wrapperRef:this.mentionRef,index:this.state.selectedIndex})}render(){const{selectedIndex:e}=this.state,{items:n}=this.props;return 0===n.length?t.createElement("div",{className:"neeto-editor-mentions__wrapper"},t.createElement("p",{className:"neeto-editor-mentions__item"},"No Results")):t.createElement("div",{ref:this.mentionRef,className:"neeto-editor-mentions__wrapper","data-cy":"neeto-editor-mention-list"},n.map(((n,r)=>{let{key:i,name:o,imageUrl:s,showImage:a}=n;return t.createElement("button",{className:Sc("neeto-editor-mentions__item",{active:r===e}),key:i,onClick:()=>this.selectItem(r),type:"button","data-cy":"neeto-editor-mention-list-".concat(o)},a&&t.createElement(Ky,{user:{name:o,imageUrl:s}}),t.createElement("p",null,o))})))}}const Qz={render:()=>{let e,t;return{onStart:n=>{e=new Ec(Kz,{props:n,editor:n.editor}),t=oc("body",{getReferenceClientRect:n.clientRect,appendTo:()=>document.body,content:e.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"bottom-start",zIndex:99999})},onUpdate(n){e.updateProps(n),t[0].setProps({getReferenceClientRect:n.clientRect})},onKeyDown(n){var r;return"Escape"===n.event.key?(t[0].hide(),!0):null===(r=e.ref)||void 0===r?void 0:r.onKeyDown(n)},onExit(){t[0].destroy(),e.destroy()}}}},Gz=qz.extend({addCommands(){return{setMention:e=>{let{id:t,label:n}=e;return e=>{let{chain:r}=e;r().focus().insertContent([{type:this.name,attrs:{id:t,label:n}},{type:"text",text:" "}]).run()}}}}});var Zz=e=>{let{suggestion:t={},...n}=e;return Gz.configure({...n,suggestion:{...Qz,...t}})},Jz="[object Object]";var Xz,eF,tF=Function.prototype,nF=Object.prototype,rF=tF.toString,iF=nF.hasOwnProperty,oF=rF.call(Object),sF=nF.toString,aF=(Xz=Object.getPrototypeOf,eF=Object,function(e){return Xz(eF(e))});var lF=function(e){if(!function(e){return!!e&&"object"==typeof e}(e)||sF.call(e)!=Jz||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e))return!1;var t=aF(e);if(null===t)return!0;var n=iF.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&rF.call(n)==oF};const cF=e=>{const t=typeof e;return"string"===t||"funtion"===t?e:lF(e)?t=>{let{node:n}=t;const{name:r}=n.type;return e[r]}:""};var uF=is.create({name:"placeholder",addOptions:()=>({excludeNodeTypes:["variable","codeBlock"],emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!1,includeChildren:!1}),addProseMirrorPlugins(){return[new Qt({props:{decorations:e=>{let{doc:t,selection:n}=e;const r=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:i}=n,o=[];return r?(t.descendants(((e,t)=>{const n=i>=t&&i<=t+e.nodeSize,r=!e.isLeaf&&!e.childCount,s=this.options.excludeNodeTypes.includes(e.type.name);if((n||!this.options.showOnlyCurrent)&&!s&&r){const n=[this.options.emptyNodeClass];this.editor.isEmpty&&n.push(this.options.emptyEditorClass);const r=Ii.node(t,t+e.nodeSize,{class:n.join(" "),"data-placeholder":"function"==typeof this.options.placeholder?this.options.placeholder({editor:this.editor,node:e,pos:t}):this.options.placeholder});o.push(r)}return this.options.includeChildren})),zi.create(t,o)):null}}})]}});class dF extends t.Component{constructor(e){super(e),zf(this,"keydownHandler",(e=>{const t={Enter:this.enterHandler,ArrowUp:this.upHandler,ArrowDown:this.downHandler,ArrowLeft:this.leftArrowHandler,ArrowRight:this.rightArrowHandler};e.key in t&&t[e.key](e)})),zf(this,"selectItem",(e=>{const{items:t,editor:n,range:r}=this.props,i=t[e],o=i&&i.command,s=Iu(i.items);o&&s&&i.command({editor:n,range:r})})),zf(this,"upHandler",(()=>{const{items:e}=this.props,{selectedIndex:t}=this.state;this.setState({selectedIndex:(t+e.length-1)%e.length})})),zf(this,"downHandler",(()=>{const{items:e}=this.props,{selectedIndex:t}=this.state;this.setState({selectedIndex:(t+1)%e.length})})),zf(this,"enterHandler",(()=>{const{selectedIndex:e}=this.state;this.selectItem(e)})),zf(this,"leftArrowHandler",(()=>{const{menuIndex:e,setActiveMenuIndex:t}=this.props;e>0&&t(e-1)})),zf(this,"rightArrowHandler",(()=>{const{menuIndex:e,setActiveMenuIndex:t,items:n}=this.props,{selectedIndex:r}=this.state,i=n[r];i&&!Iu(i.items)&&t(e+1)})),this.state={selectedIndex:0},this.menuRef=t.createRef()}componentDidMount(){const{menuIndex:e,activeMenuIndex:t}=this.props;e===t&&document.addEventListener("keydown",this.keydownHandler)}componentWillUnmount(){document.removeEventListener("keydown",this.keydownHandler)}componentDidUpdate(e){const{items:t,menuIndex:n,activeMenuIndex:r}=this.props,i=n===r;t!==e.items&&this.setState({selectedIndex:0}),Yz({wrapperRef:this.menuRef,index:this.state.selectedIndex}),i?document.addEventListener("keydown",this.keydownHandler):document.removeEventListener("keydown",this.keydownHandler)}render(){const{items:e,menuIndex:n,activeMenuIndex:r}=this.props,{selectedIndex:i}=this.state,o=n===r;return t.createElement("div",{ref:this.menuRef,className:"neeto-editor-slash-commands__wrapper"},e.map(((e,r)=>{const s=Iu(e.items),a=t.createElement(pF,{key:e.title,item:e,index:r,selectedIndex:o?i:-1,selectItem:()=>s&&this.selectItem(r),onHover:()=>this.setState({selectedIndex:r})});return s?a:t.createElement(Ku,{key:e.title,interactive:!0,placement:"right",content:t.createElement(dF,x({},this.props,{items:e.items,menuIndex:n+1})),onCreate:e=>{let{popper:t}=e;return t.style.width="max-content"},visible:i===r,onShow:()=>{this.isSubmenuOpened=!0},onHide:()=>{this.isSubmenuOpened=!1}},a)})))}}const pF=s(((e,n)=>{let{item:r,selectedIndex:i,index:o,selectItem:s,onHover:a}=e;const{Icon:l}=r;return t.createElement("div",{className:Sc("neeto-editor-slash-commands__item",{active:o===i}),onClick:s,ref:n,"data-cy":"neeto-editor-command-list-item-".concat(o),onMouseEnter:a},l&&t.createElement(l,{size:20}),t.createElement("div",{className:"neeto-editor-slash-commands__item-content"},t.createElement("h5",null,r.title),t.createElement("p",null,r.description)))}));class hF extends t.Component{constructor(){super(...arguments),zf(this,"state",{activeMenuIndex:0}),zf(this,"onKeyDown",(e=>{let{event:t}=e;return["Enter","ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(t.key)})),zf(this,"setActiveMenuIndex",(e=>this.setState({activeMenuIndex:e})))}render(){return t.createElement(dF,x({},this.props,{menuIndex:0,activeMenuIndex:this.state.activeMenuIndex,setActiveMenuIndex:this.setActiveMenuIndex}))}}const fF={PARAGRAPH:{optionName:C.PARAGRAPH,title:"Paragraph",description:"Add a plain text block.",Icon:Gp,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).setNode("paragraph").run()}},H1:{optionName:C.H1,title:"H1",description:"Add a big heading.",Icon:lh,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).setNode("heading",{level:1}).run()}},H2:{optionName:C.H2,title:"H2",description:"Add a sub-heading.",Icon:uh,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).setNode("heading",{level:2}).run()}},H3:{optionName:C.H3,title:"H3",description:"Add a sub-heading of level 3.",Icon:fh,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).setNode("heading",{level:3}).run()}},H4:{optionName:C.H4,title:"H4",description:"Add a sub-heading of level 4.",Icon:fh,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).setNode("heading",{level:4}).run()}},H5:{optionName:C.H5,title:"H5",description:"Add a sub-heading of level 5.",Icon:fh,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).setNode("heading",{level:5}).run()}},H6:{optionName:C.H6,title:"H6",description:"Add a sub-heading of level 6.",Icon:fh,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).setNode("heading",{level:6}).run()}},LIST_ORDERED:{optionName:C.LIST_ORDERED,title:"Numbered list",description:"Add a list with numbering.",Icon:Wp,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).toggleOrderedList().run()}},LIST_BULLETS:{optionName:C.LIST_BULLETS,title:"Bulleted list",description:"Add a list with bullets.",Icon:$p,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).toggleBulletList().run()}},BLOCKQUOTE:{optionName:C.BLOCKQUOTE,title:"Blockquote",description:"Add a quote.",Icon:gp,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).toggleBlockquote().run()}},IMAGE:{optionName:C.IMAGE_UPLOAD,title:"Image",description:"Add an image.",Icon:Lp,command:e=>{let{editor:t,range:n}=e;return t.chain().focus().deleteRange(n).run()}},CODE:{optionName:C.CODE_BLOCK,title:"Code block",description:"Add a code block with syntax highlighting.",Icon:kp,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).toggleCodeBlock().run()}},EMOJI:{optionName:C.EMOJI,title:"Emoji",description:"Add an emoji.",Icon:nh,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).insertContent("::").run()}},DIVIDER:{optionName:C.DIVIDER,title:"Divider",description:"Add an horizontal line to separate sections.",Icon:qp,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).setHorizontalRule().run()}},VIDEO:{optionName:C.VIDEO_EMBED,title:"Embed Youtube/Vimeo",description:"Embed a video from major services.",Icon:wh,command:e=>{let{editor:t,range:n}=e;const r=prompt("Please enter Youtube/Vimeo embed URL."),i=(e=>{const t=e.match(af);return t&&"https://www.youtube.com/embed/".concat(t[5])})(r)||(e=>{const t=e.match(lf);return t&&"https://player.vimeo.com/video/".concat(t[4],"?h=").concat(t[5])})(r);i?t.chain().focus().deleteRange(n).setExternalVideo({src:i}).run():t.chain().focus().deleteRange(n).insertContent("#invalid").run()}},PASTE_UNFORMATTED:{optionName:C.PASTE_UNFORMATTED,title:"Paste Unformatted",description:"Paste by removing all styles.",Icon:Kp,command:e=>{let{editor:t,range:n}=e;return t.chain().focus().deleteRange(n).pasteUnformatted().run()}},NO_RESULT:{title:"No results",command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).run()}}},mF=new Jt("commands");var gF=e=>{let{setImageUploadVisible:t,addonCommands:n,options:r}=e,i=[fF.PARAGRAPH,fF.H1,fF.H2,fF.H3,fF.H4,fF.H5,fF.H6,fF.LIST_ORDERED,fF.LIST_BULLETS,fF.BLOCKQUOTE,{...fF.IMAGE,command:function(){t(!0),fF.IMAGE.command(...arguments)}},fF.CODE,fF.EMOJI,fF.DIVIDER,fF.VIDEO,fF.PASTE_UNFORMATTED];return Iu(r)||(i=i.filter((e=>{let{optionName:t}=e;return r.includes(t)}))),Iu(n)||(i=i.concat(n)),is.create({name:"slash-commands",addOptions:()=>({HTMLAttributes:{class:"commands"},suggestion:{char:"/",startOfLine:!1,pluginKey:mF,command:e=>{let{editor:t,range:n,props:r}=e;r.command({editor:t,range:n})},items:e=>{let{query:t}=e;const n=i.filter((e=>{let{title:n}=e;return n.toLowerCase().includes(t.toLowerCase())}));return Iu(n)?[fF.NO_RESULT]:n},render:()=>{let e,t;return{onStart:n=>{e=new Ec(hF,{props:n,editor:n.editor}),t=oc("body",{getReferenceClientRect:n.clientRect,appendTo:()=>document.body,content:e.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"bottom-start",arrow:!1,zIndex:99999}),bf()},onUpdate(n){e.updateProps(n),t[0].setProps({getReferenceClientRect:n.clientRect})},onKeyDown(t){var n;return null===(n=e.ref)||void 0===n?void 0:n.onKeyDown(t)},onExit(){t&&t[0].destroy(),e&&e.destroy(),yf()}}}}}),addProseMirrorPlugins(){return[uz({editor:this.editor,...this.options.suggestion})]}})},bF=zA.extend({name:"title",defining:!0,addAttributes:()=>({level:{default:1,rendered:!1}}),parseHTML:()=>[{tag:"h1"}],renderHTML(e){let{_node:t,HTMLAttributes:n}=e;return["h1",Bo(this.options.HTMLAttributes,n),0]}});const yF=Qs({find:/--$/,replace:"—"}),vF=Qs({find:/\.\.\.$/,replace:"…"}),wF=Qs({find:/(?:^|[\s{[(<'"\u2018\u201C])(")$/,replace:"“"}),xF=Qs({find:/"$/,replace:"”"}),EF=Qs({find:/(?:^|[\s{[(<'"\u2018\u201C])(')$/,replace:"‘"}),MF=Qs({find:/'$/,replace:"’"}),kF=Qs({find:/<-$/,replace:"←"}),_F=Qs({find:/->$/,replace:"→"}),DF=Qs({find:/\(c\)$/,replace:"©"}),CF=Qs({find:/\(tm\)$/,replace:"™"}),OF=Qs({find:/\(r\)$/,replace:"®"}),NF=Qs({find:/1\/2$/,replace:"½"}),TF=Qs({find:/\+\/-$/,replace:"±"}),SF=Qs({find:/!=$/,replace:"≠"}),AF=Qs({find:/<<$/,replace:"«"}),IF=Qs({find:/>>$/,replace:"»"}),LF=Qs({find:/\d+\s?([*x])\s?\d+$/,replace:"×"}),jF=Qs({find:/\^2$/,replace:"²"}),zF=Qs({find:/\^3$/,replace:"³"}),FF=Qs({find:/1\/4$/,replace:"¼"}),PF=Qs({find:/3\/4$/,replace:"¾"});var RF=is.create({name:"typography",addInputRules(){const e=[];return!1!==this.options.emDash&&e.push(yF),!1!==this.options.ellipsis&&e.push(vF),!1!==this.options.openDoubleQuote&&e.push(wF),!1!==this.options.closeDoubleQuote&&e.push(xF),!1!==this.options.openSingleQuote&&e.push(EF),!1!==this.options.closeSingleQuote&&e.push(MF),!1!==this.options.leftArrow&&e.push(kF),!1!==this.options.rightArrow&&e.push(_F),!1!==this.options.copyright&&e.push(DF),!1!==this.options.trademark&&e.push(CF),!1!==this.options.registeredTrademark&&e.push(OF),!1!==this.options.oneHalf&&e.push(NF),!1!==this.options.plusMinus&&e.push(TF),!1!==this.options.notEqual&&e.push(SF),!1!==this.options.laquo&&e.push(AF),!1!==this.options.raquo&&e.push(IF),!1!==this.options.multiplication&&e.push(LF),!1!==this.options.superscriptTwo&&e.push(jF),!1!==this.options.superscriptThree&&e.push(zF),!1!==this.options.oneQuarter&&e.push(FF),!1!==this.options.threeQuarters&&e.push(PF),e}}).configure({emDash:!1,openDoubleQuote:!1,closeDoubleQuote:!1,openSingleQuote:!1,closeSingleQuote:!1});const BF=e=>{let{items:n,command:r}=e;return t.createElement("div",{className:"neeto-editor-variables-suggestion"},t.createElement(rv,{variables:n,onClickVariable:e=>{const{category_key:t,key:n}=e,i=t?"".concat(t,".").concat(n):n;r({label:i,id:i})}}))},UF=new Jt("variables"),$F=Js.create({name:"variable",addOptions:()=>({HTMLAttributes:{class:"neeto-editor-variable"},charOpen:"{{",charClose:"}}",renderLabel(e){let{options:t,node:n}=e;return"".concat(t.charOpen).concat(n.attrs.label||n.attrs.id).concat(t.charClose)},suggestion:{}}),group:"inline",inline:!0,selectable:!1,atom:!0,addAttributes:()=>({id:{default:null,parseHTML:e=>e.getAttribute("data-id"),renderHTML:e=>e.id?{"data-id":e.id}:{}},label:{default:null,parseHTML:e=>e.getAttribute("data-label"),renderHTML:e=>e.label?{"data-label":e.label}:{}}}),parseHTML:()=>[{tag:"span[data-variable]"}],renderHTML(e){let{node:t,HTMLAttributes:n}=e;return["span",Bo({"data-variable":""},this.options.HTMLAttributes,n),this.options.renderLabel({options:this.options,node:t})]},renderText(e){let{node:t}=e;return this.options.renderLabel({options:this.options,node:t})},addCommands(){return{setVariable:e=>t=>{let{chain:n}=t;n().focus().insertContent([{type:this.name,attrs:e},{type:"text",text:" "}]).run()}}},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.command((e=>{let{tr:t,state:n}=e,r=!1;const{selection:i}=n,{empty:o,anchor:s}=i;return!!o&&(n.doc.nodesBetween(s-1,s,((e,n)=>{if(e.type.name===this.name)return r=!0,t.insertText("",n,n+e.nodeSize),!1})),r)}))}},addProseMirrorPlugins(){return[uz({editor:this.editor,...this.options.suggestion})]}}),HF={char:"{{",startOfLine:!1,pluginKey:UF,command:e=>{let{editor:t,range:n,props:r}=e;t.chain().focus().deleteRange(n).setVariable(r).run()},items:()=>[],render:()=>{let e,t;return{onStart:n=>{e=new Ec(BF,{props:n,editor:n.editor}),t=oc("body",{getReferenceClientRect:n.clientRect,appendTo:()=>document.body,content:e.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"bottom-start",zIndex:99999})},onUpdate(n){e.updateProps(n),t[0].setProps({getReferenceClientRect:n.clientRect})},onExit(){t[0].destroy(),e.destroy()}}}};var WF=e=>{let{suggestion:t={}}=e;return $F.configure({suggestion:{...HF,...t}})};const VF=(e,t)=>{const n=[];e.split(/\n/).forEach((e=>{const r={type:"paragraph"};e.length>0&&(r.content=[{type:"text",text:e}]);const i=ie.fromJSON(t.doc.type.schema,r);n.push(i)}));const r=L.fromArray(n);return B.maxOpen(r)},qF=(e,n)=>{let{forceTitle:r=!1,titleError:s=!1,hideSlashCommands:a=!1,defaults:l=ju,addons:c=[],addonCommands:u,className:d,uploadEndpoint:p=N,uploadConfig:h={},initialValue:f="",onChange:m=(()=>{}),onFocus:g=(()=>{}),onBlur:b=(()=>{}),menuType:y="fixed",variables:v,mentions:w,showImageInMention:E=!1,placeholder:D=(r?{title:"Untitled"}:null),extensions:O,contentClassName:T,characterLimit:S,editorSecrets:A,rows:I=6,autoFocus:L=!1,onSubmit:j,heightStrategy:z="fixed",characterCountStrategy:F="hidden",keyboardShortcuts:P=[],error:R=null,...B}=e;const[U,$]=i(!1),H="fixed"===y,W="bubble"===y,V=!a,q=(e=>{if(e){if("string"==typeof e&&e.length)return!0;if("object"==typeof e&&Object.keys(e).length)return!0;if("function"==typeof e)return!0}return!1})(D),Y=!q&&V,K=c.includes("image-upload-unsplash"),Q="hidden"!==F,G=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],{includeImageUpload:n}=arguments.length>2?arguments[2]:void 0;const r=t.map((e=>e.toLowerCase()));return n&&r.push(C.IMAGE_UPLOAD),[].concat(e,r)}(l,c,{includeImageUpload:K}),Z=(e=>{let{forceTitle:t,placeholder:n,extensions:r,mentions:i,variables:o,isSlashCommandsActive:s,showImageInMention:a,setImageUploadVisible:l,options:c,addonCommands:u,characterLimit:d,onSubmit:p,keyboardShortcuts:h,uploadEndpoint:f}=e,m=[bF,az.extend({content:t?"title block*":"block+"}),vI.configure({document:!1,codeBlock:!1,code:!1}),YO,ET,RF,ZO,oz,Uz({uploadEndpoint:f}),$z,lz,xT,KO.configure({mode:"shallowest"}),uF.configure({placeholder:cF(n)}),mz,pz,sz,WO.configure({limit:d}),Wz({handleSubmit:p,shortcuts:h})];return s&&m.push(gF({setImageUploadVisible:l,options:c,addonCommands:u})),Iu(i)||m.push(Zz({suggestion:{items:tv(i,a)}})),Iu(o)||m.push(WF({suggestion:{items:()=>o}})),Iu(r)||(m=m.concat(r)),m})({contentClassName:T,forceTitle:r,placeholder:D,extensions:O,mentions:w,variables:v,isSlashCommandsActive:V,showImageInMention:E,setImageUploadVisible:$,options:G,addonCommands:u,characterLimit:S,keyboardShortcuts:P,onSubmit:j,uploadEndpoint:p});no.prototype.updateState=function(e){this.docView&&this.updateStateInner(e,this.state.plugins!==e.plugins)};const J=Sc("neeto-editor",{"slash-active":Y,"fixed-menu-active border":H,"bubble-menu-active":W,"force-title":r,"force-title--error":s,"placeholder-active":q,[d]:d}),X=(e=>{let{heightStrategy:t,rows:n}=e;const r={},i=n*_+2*(M+k);return"flexible"===t?r["min-height"]="".concat(i,"px"):r.height="".concat(i,"px"),r})({heightStrategy:z,rows:I}),ee=_c({extensions:Z,content:f,injectCSS:!1,autofocus:L&&"end",editorProps:{attributes:{class:J,style:Au(X)},clipboardTextParser:VF},parseOptions:{preserveWhitespace:!0},onCreate:e=>{let{editor:t}=e;return!L&&(e=>{const{state:t,view:n}=e,r=Ct.atEnd(t.doc),i=t.tr;i.setSelection(r),n.dispatch(i)})(t)},onUpdate:e=>{let{editor:t}=e;return m(t.getHTML())},onFocus:g,onBlur:b});return t.useImperativeHandle(n,(()=>({editor:ee}))),o((()=>{![process.env.RAILS_ENV,"production"].includes("production")&&Iu(f)&&console.warn('[neeto-editor]: Empty value of "initialValue" in needtoEditor is expected to be "<p></p>" instead of "'.concat(f,'".'))}),[f]),t.createElement(Lu,{error:R,isFixedMenuActive:H},H&&t.createElement(sv,{editor:ee,variables:v,setImageUploadVisible:$,options:G,mentions:w,showImageInMention:E}),W&&t.createElement(df,{editor:ee,options:G}),t.createElement(HO,{isVisible:U,setIsVisible:$,editor:ee,imageUploadUrl:p,uploadConfig:h,isUnsplashImageUploadActive:K,unsplashApiKey:null==A?void 0:A.unsplash}),t.createElement(bc,x({editor:ee},B)),Q&&t.createElement(pf,{count:null==ee?void 0:ee.storage.characterCount.characters(),limit:S,strategy:F}))};var YF=t.forwardRef(qF),KF={exports:{}},QF=KF.exports=function(){function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,n){return t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(e,n)}function n(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function r(e,i,o){return r=n()?Reflect.construct:function(e,n,r){var i=[null];i.push.apply(i,n);var o=new(Function.bind.apply(e,i));return r&&t(o,r.prototype),o},r.apply(null,arguments)}function i(e){return o(e)||s(e)||a(e)||c()}function o(e){if(Array.isArray(e))return l(e)}function s(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function a(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u=Object.hasOwnProperty,d=Object.setPrototypeOf,p=Object.isFrozen,h=Object.getPrototypeOf,f=Object.getOwnPropertyDescriptor,m=Object.freeze,g=Object.seal,b=Object.create,y="undefined"!=typeof Reflect&&Reflect,v=y.apply,w=y.construct;v||(v=function(e,t,n){return e.apply(t,n)}),m||(m=function(e){return e}),g||(g=function(e){return e}),w||(w=function(e,t){return r(e,i(t))});var x=S(Array.prototype.forEach),E=S(Array.prototype.pop),M=S(Array.prototype.push),k=S(String.prototype.toLowerCase),_=S(String.prototype.match),D=S(String.prototype.replace),C=S(String.prototype.indexOf),O=S(String.prototype.trim),N=S(RegExp.prototype.test),T=A(TypeError);function S(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return v(e,t,r)}}function A(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return w(e,n)}}function I(e,t,n){n=n||k,d&&d(e,null);for(var r=t.length;r--;){var i=t[r];if("string"==typeof i){var o=n(i);o!==i&&(p(t)||(t[r]=o),i=o)}e[i]=!0}return e}function L(e){var t,n=b(null);for(t in e)v(u,e,[t])&&(n[t]=e[t]);return n}function j(e,t){for(;null!==e;){var n=f(e,t);if(n){if(n.get)return S(n.get);if("function"==typeof n.value)return S(n.value)}e=h(e)}function r(e){return console.warn("fallback value for",e),null}return r}var z=m(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),F=m(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),P=m(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),R=m(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),B=m(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),U=m(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),$=m(["#text"]),H=m(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),W=m(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),V=m(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),q=m(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Y=g(/\{\{[\w\W]*|[\w\W]*\}\}/gm),K=g(/<%[\w\W]*|[\w\W]*%>/gm),Q=g(/^data-[\-\w.\u00B7-\uFFFF]/),G=g(/^aria-[\-\w]+$/),Z=g(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),J=g(/^(?:\w+script|data):/i),X=g(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ee=g(/^html$/i),te=function(){return"undefined"==typeof window?null:window},ne=function(t,n){if("object"!==e(t)||"function"!=typeof t.createPolicy)return null;var r=null,i="data-tt-policy-suffix";n.currentScript&&n.currentScript.hasAttribute(i)&&(r=n.currentScript.getAttribute(i));var o="dompurify"+(r?"#"+r:"");try{return t.createPolicy(o,{createHTML:function(e){return e},createScriptURL:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}};function re(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:te(),n=function(e){return re(e)};if(n.version="2.3.10",n.removed=[],!t||!t.document||9!==t.document.nodeType)return n.isSupported=!1,n;var r=t.document,o=t.document,s=t.DocumentFragment,a=t.HTMLTemplateElement,l=t.Node,c=t.Element,u=t.NodeFilter,d=t.NamedNodeMap,p=void 0===d?t.NamedNodeMap||t.MozNamedAttrMap:d,h=t.HTMLFormElement,f=t.DOMParser,g=t.trustedTypes,b=c.prototype,y=j(b,"cloneNode"),v=j(b,"nextSibling"),w=j(b,"childNodes"),S=j(b,"parentNode");if("function"==typeof a){var A=o.createElement("template");A.content&&A.content.ownerDocument&&(o=A.content.ownerDocument)}var ie=ne(g,r),oe=ie?ie.createHTML(""):"",se=o,ae=se.implementation,le=se.createNodeIterator,ce=se.createDocumentFragment,ue=se.getElementsByTagName,de=r.importNode,pe={};try{pe=L(o).documentMode?o.documentMode:{}}catch(e){}var he={};n.isSupported="function"==typeof S&&ae&&void 0!==ae.createHTMLDocument&&9!==pe;var fe,me,ge=Y,be=K,ye=Q,ve=G,we=J,xe=X,Ee=Z,Me=null,ke=I({},[].concat(i(z),i(F),i(P),i(B),i($))),_e=null,De=I({},[].concat(i(H),i(W),i(V),i(q))),Ce=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Oe=null,Ne=null,Te=!0,Se=!0,Ae=!1,Ie=!1,Le=!1,je=!1,ze=!1,Fe=!1,Pe=!1,Re=!1,Be=!0,Ue=!0,$e=!1,He={},We=null,Ve=I({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),qe=null,Ye=I({},["audio","video","img","source","image","track"]),Ke=null,Qe=I({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ge="http://www.w3.org/1998/Math/MathML",Ze="http://www.w3.org/2000/svg",Je="http://www.w3.org/1999/xhtml",Xe=Je,et=!1,tt=["application/xhtml+xml","text/html"],nt="text/html",rt=null,it=o.createElement("form"),ot=function(e){return e instanceof RegExp||e instanceof Function},st=function(t){rt&&rt===t||(t&&"object"===e(t)||(t={}),t=L(t),fe=fe=-1===tt.indexOf(t.PARSER_MEDIA_TYPE)?nt:t.PARSER_MEDIA_TYPE,me="application/xhtml+xml"===fe?function(e){return e}:k,Me="ALLOWED_TAGS"in t?I({},t.ALLOWED_TAGS,me):ke,_e="ALLOWED_ATTR"in t?I({},t.ALLOWED_ATTR,me):De,Ke="ADD_URI_SAFE_ATTR"in t?I(L(Qe),t.ADD_URI_SAFE_ATTR,me):Qe,qe="ADD_DATA_URI_TAGS"in t?I(L(Ye),t.ADD_DATA_URI_TAGS,me):Ye,We="FORBID_CONTENTS"in t?I({},t.FORBID_CONTENTS,me):Ve,Oe="FORBID_TAGS"in t?I({},t.FORBID_TAGS,me):{},Ne="FORBID_ATTR"in t?I({},t.FORBID_ATTR,me):{},He="USE_PROFILES"in t&&t.USE_PROFILES,Te=!1!==t.ALLOW_ARIA_ATTR,Se=!1!==t.ALLOW_DATA_ATTR,Ae=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Ie=t.SAFE_FOR_TEMPLATES||!1,Le=t.WHOLE_DOCUMENT||!1,Fe=t.RETURN_DOM||!1,Pe=t.RETURN_DOM_FRAGMENT||!1,Re=t.RETURN_TRUSTED_TYPE||!1,ze=t.FORCE_BODY||!1,Be=!1!==t.SANITIZE_DOM,Ue=!1!==t.KEEP_CONTENT,$e=t.IN_PLACE||!1,Ee=t.ALLOWED_URI_REGEXP||Ee,Xe=t.NAMESPACE||Je,t.CUSTOM_ELEMENT_HANDLING&&ot(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ce.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&ot(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ce.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ce.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ie&&(Se=!1),Pe&&(Fe=!0),He&&(Me=I({},i($)),_e=[],!0===He.html&&(I(Me,z),I(_e,H)),!0===He.svg&&(I(Me,F),I(_e,W),I(_e,q)),!0===He.svgFilters&&(I(Me,P),I(_e,W),I(_e,q)),!0===He.mathMl&&(I(Me,B),I(_e,V),I(_e,q))),t.ADD_TAGS&&(Me===ke&&(Me=L(Me)),I(Me,t.ADD_TAGS,me)),t.ADD_ATTR&&(_e===De&&(_e=L(_e)),I(_e,t.ADD_ATTR,me)),t.ADD_URI_SAFE_ATTR&&I(Ke,t.ADD_URI_SAFE_ATTR,me),t.FORBID_CONTENTS&&(We===Ve&&(We=L(We)),I(We,t.FORBID_CONTENTS,me)),Ue&&(Me["#text"]=!0),Le&&I(Me,["html","head","body"]),Me.table&&(I(Me,["tbody"]),delete Oe.tbody),m&&m(t),rt=t)},at=I({},["mi","mo","mn","ms","mtext"]),lt=I({},["foreignobject","desc","title","annotation-xml"]),ct=I({},["title","style","font","a","script"]),ut=I({},F);I(ut,P),I(ut,R);var dt=I({},B);I(dt,U);var pt=function(e){var t=S(e);t&&t.tagName||(t={namespaceURI:Je,tagName:"template"});var n=k(e.tagName),r=k(t.tagName);return e.namespaceURI===Ze?t.namespaceURI===Je?"svg"===n:t.namespaceURI===Ge?"svg"===n&&("annotation-xml"===r||at[r]):Boolean(ut[n]):e.namespaceURI===Ge?t.namespaceURI===Je?"math"===n:t.namespaceURI===Ze?"math"===n&&lt[r]:Boolean(dt[n]):e.namespaceURI===Je&&!(t.namespaceURI===Ze&&!lt[r])&&!(t.namespaceURI===Ge&&!at[r])&&!dt[n]&&(ct[n]||!ut[n])},ht=function(e){M(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=oe}catch(t){e.remove()}}},ft=function(e,t){try{M(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){M(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!_e[e])if(Fe||Pe)try{ht(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},mt=function(e){var t,n;if(ze)e="<remove></remove>"+e;else{var r=_(e,/^[\r\n\t ]+/);n=r&&r[0]}"application/xhtml+xml"===fe&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");var i=ie?ie.createHTML(e):e;if(Xe===Je)try{t=(new f).parseFromString(i,fe)}catch(e){}if(!t||!t.documentElement){t=ae.createDocument(Xe,"template",null);try{t.documentElement.innerHTML=et?"":i}catch(e){}}var s=t.body||t.documentElement;return e&&n&&s.insertBefore(o.createTextNode(n),s.childNodes[0]||null),Xe===Je?ue.call(t,Le?"html":"body")[0]:Le?t.documentElement:s},gt=function(e){return le.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT,null,!1)},bt=function(e){return e instanceof h&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof p)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore)},yt=function(t){return"object"===e(l)?t instanceof l:t&&"object"===e(t)&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName},vt=function(e,t,r){he[e]&&x(he[e],(function(e){e.call(n,t,r,rt)}))},wt=function(e){var t;if(vt("beforeSanitizeElements",e,null),bt(e))return ht(e),!0;if(N(/[\u0080-\uFFFF]/,e.nodeName))return ht(e),!0;var r=me(e.nodeName);if(vt("uponSanitizeElement",e,{tagName:r,allowedTags:Me}),e.hasChildNodes()&&!yt(e.firstElementChild)&&(!yt(e.content)||!yt(e.content.firstElementChild))&&N(/<[/\w]/g,e.innerHTML)&&N(/<[/\w]/g,e.textContent))return ht(e),!0;if("select"===r&&N(/<template/i,e.innerHTML))return ht(e),!0;if(!Me[r]||Oe[r]){if(!Oe[r]&&Et(r)){if(Ce.tagNameCheck instanceof RegExp&&N(Ce.tagNameCheck,r))return!1;if(Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(r))return!1}if(Ue&&!We[r]){var i=S(e)||e.parentNode,o=w(e)||e.childNodes;if(o&&i)for(var s=o.length-1;s>=0;--s)i.insertBefore(y(o[s],!0),v(e))}return ht(e),!0}return e instanceof c&&!pt(e)?(ht(e),!0):"noscript"!==r&&"noembed"!==r||!N(/<\/no(script|embed)/i,e.innerHTML)?(Ie&&3===e.nodeType&&(t=e.textContent,t=D(t,ge," "),t=D(t,be," "),e.textContent!==t&&(M(n.removed,{element:e.cloneNode()}),e.textContent=t)),vt("afterSanitizeElements",e,null),!1):(ht(e),!0)},xt=function(e,t,n){if(Be&&("id"===t||"name"===t)&&(n in o||n in it))return!1;if(Se&&!Ne[t]&&N(ye,t));else if(Te&&N(ve,t));else if(!_e[t]||Ne[t]){if(!(Et(e)&&(Ce.tagNameCheck instanceof RegExp&&N(Ce.tagNameCheck,e)||Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(e))&&(Ce.attributeNameCheck instanceof RegExp&&N(Ce.attributeNameCheck,t)||Ce.attributeNameCheck instanceof Function&&Ce.attributeNameCheck(t))||"is"===t&&Ce.allowCustomizedBuiltInElements&&(Ce.tagNameCheck instanceof RegExp&&N(Ce.tagNameCheck,n)||Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(n))))return!1}else if(Ke[t]);else if(N(Ee,D(n,xe,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==C(n,"data:")||!qe[e])if(Ae&&!N(we,D(n,xe,"")));else if(n)return!1;return!0},Et=function(e){return e.indexOf("-")>0},Mt=function(t){var r,i,o,s;vt("beforeSanitizeAttributes",t,null);var a=t.attributes;if(a){var l={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:_e};for(s=a.length;s--;){var c=r=a[s],u=c.name,d=c.namespaceURI;if(i="value"===u?r.value:O(r.value),o=me(u),l.attrName=o,l.attrValue=i,l.keepAttr=!0,l.forceKeepAttr=void 0,vt("uponSanitizeAttribute",t,l),i=l.attrValue,!l.forceKeepAttr&&(ft(u,t),l.keepAttr))if(N(/\/>/i,i))ft(u,t);else{Ie&&(i=D(i,ge," "),i=D(i,be," "));var p=me(t.nodeName);if(xt(p,o,i)){if(ie&&"object"===e(g)&&"function"==typeof g.getAttributeType)if(d);else switch(g.getAttributeType(p,o)){case"TrustedHTML":i=ie.createHTML(i);break;case"TrustedScriptURL":i=ie.createScriptURL(i)}try{d?t.setAttributeNS(d,u,i):t.setAttribute(u,i),E(n.removed)}catch(e){}}}}vt("afterSanitizeAttributes",t,null)}},kt=function e(t){var n,r=gt(t);for(vt("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)vt("uponSanitizeShadowNode",n,null),wt(n)||(n.content instanceof s&&e(n.content),Mt(n));vt("afterSanitizeShadowDOM",t,null)};return n.sanitize=function(i,o){var a,c,u,d,p;if((et=!i)&&(i="\x3c!--\x3e"),"string"!=typeof i&&!yt(i)){if("function"!=typeof i.toString)throw T("toString is not a function");if("string"!=typeof(i=i.toString()))throw T("dirty is not a string, aborting")}if(!n.isSupported){if("object"===e(t.toStaticHTML)||"function"==typeof t.toStaticHTML){if("string"==typeof i)return t.toStaticHTML(i);if(yt(i))return t.toStaticHTML(i.outerHTML)}return i}if(je||st(o),n.removed=[],"string"==typeof i&&($e=!1),$e){if(i.nodeName){var h=me(i.nodeName);if(!Me[h]||Oe[h])throw T("root node is forbidden and cannot be sanitized in-place")}}else if(i instanceof l)1===(c=(a=mt("\x3c!----\x3e")).ownerDocument.importNode(i,!0)).nodeType&&"BODY"===c.nodeName||"HTML"===c.nodeName?a=c:a.appendChild(c);else{if(!Fe&&!Ie&&!Le&&-1===i.indexOf("<"))return ie&&Re?ie.createHTML(i):i;if(!(a=mt(i)))return Fe?null:Re?oe:""}a&&ze&&ht(a.firstChild);for(var f=gt($e?i:a);u=f.nextNode();)3===u.nodeType&&u===d||wt(u)||(u.content instanceof s&&kt(u.content),Mt(u),d=u);if(d=null,$e)return i;if(Fe){if(Pe)for(p=ce.call(a.ownerDocument);a.firstChild;)p.appendChild(a.firstChild);else p=a;return _e.shadowroot&&(p=de.call(r,p,!0)),p}var m=Le?a.outerHTML:a.innerHTML;return Le&&Me["!doctype"]&&a.ownerDocument&&a.ownerDocument.doctype&&a.ownerDocument.doctype.name&&N(ee,a.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+a.ownerDocument.doctype.name+">\n"+m),Ie&&(m=D(m,ge," "),m=D(m,be," ")),ie&&Re?ie.createHTML(m):m},n.setConfig=function(e){st(e),je=!0},n.clearConfig=function(){rt=null,je=!1},n.isValidAttribute=function(e,t,n){rt||st({});var r=me(e),i=me(t);return xt(r,i,n)},n.addHook=function(e,t){"function"==typeof t&&(he[e]=he[e]||[],M(he[e],t))},n.removeHook=function(e){if(he[e])return E(he[e])},n.removeHooks=function(e){he[e]&&(he[e]=[])},n.removeAllHooks=function(){he={}},n}return re()}();const GF=e=>{if(e.tagName){const n=e.children?e.children.map(GF):null;return t.createElement(e.tagName,e.properties,n)}return e.value},ZF=e=>{let{content:n="",className:r,...i}=e;const o=(e=>e.replaceAll("&gt;",">").replaceAll("&lt;","<").replaceAll("&amp;","&").replaceAll(T,((e,t)=>{const n=rz.highlightAuto(t).children.map(GF);return"<pre><code>".concat(b(n),"</code></pre>")})))(n),s=QF.sanitize;return t.createElement("div",x({className:Sc(E,{[r]:r}),dangerouslySetInnerHTML:{__html:s(o,{ADD_ATTR:["target"]})},"data-cy":"neeto-editor-content"},i))};export{C as EDITOR_OPTIONS,YF as Editor,ZF as EditorContent};