dvadf
File manager - Edit - /home/centroca/public_html/wp/wp-content/plugins/elementor/assets/js/packages/editor-controls/editor-controls.min.js
Back
/*! For license information please see editor-controls.min.js.LICENSE.txt */ !function(){var r={2020:function(r){"use strict";r.exports=window.elementorV2.editorProps},5067:function(r,o,i){"use strict";var a,c=Object.defineProperty,u=Object.getOwnPropertyDescriptor,p=Object.getOwnPropertyNames,g=Object.prototype.hasOwnProperty,v={};((r,o)=>{for(var i in o)c(r,i,{get:o[i],enumerable:!0})})(v,{Paragraph:()=>E,default:()=>w}),r.exports=(a=v,((r,o,i,a)=>{if(o&&"object"==typeof o||"function"==typeof o)for(let v of p(o))g.call(r,v)||v===i||c(r,v,{get:()=>o[v],enumerable:!(a=u(o,v))||a.enumerable});return r})(c({},"__esModule",{value:!0}),a));var b=i(99248),k=" ",E=b.Node.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:r}){return["p",(0,b.mergeAttributes)(this.options.HTMLAttributes,r),0]},parseMarkdown:(r,o)=>{const i=r.tokens||[];if(1===i.length&&"image"===i[0].type)return o.parseChildren([i[0]]);const a=o.parseInline(i);return 1!==a.length||"text"!==a[0].type||a[0].text!==k&&" "!==a[0].text?o.createNode("paragraph",void 0,a):o.createNode("paragraph",void 0,[])},renderMarkdown:(r,o)=>{if(!r)return"";const i=Array.isArray(r.content)?r.content:[];return 0===i.length?k:o.renderChildren(i)},addCommands(){return{setParagraph:()=>({commands:r})=>r.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),w=E},5527:function(r){"use strict";r.exports=window.elementorV2.editorV1Adapters},5820:function(r,o,i){"use strict";var a,c=Object.defineProperty,u=Object.getOwnPropertyDescriptor,p=Object.getOwnPropertyNames,g=Object.prototype.hasOwnProperty,v={};((r,o)=>{for(var i in o)c(r,i,{get:o[i],enumerable:!0})})(v,{Subscript:()=>k,default:()=>E}),r.exports=(a=v,((r,o,i,a)=>{if(o&&"object"==typeof o||"function"==typeof o)for(let v of p(o))g.call(r,v)||v===i||c(r,v,{get:()=>o[v],enumerable:!(a=u(o,v))||a.enumerable});return r})(c({},"__esModule",{value:!0}),a));var b=i(99248),k=b.Mark.create({name:"subscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sub"},{style:"vertical-align",getAttrs(r){return"sub"===r&&null}}]},renderHTML({HTMLAttributes:r}){return["sub",(0,b.mergeAttributes)(this.options.HTMLAttributes,r),0]},addCommands(){return{setSubscript:()=>({commands:r})=>r.setMark(this.name),toggleSubscript:()=>({commands:r})=>r.toggleMark(this.name),unsetSubscript:()=>({commands:r})=>r.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-,":()=>this.editor.commands.toggleSubscript()}}}),E=k},14841:function(r,o,i){"use strict";var a,c=Object.defineProperty,u=Object.getOwnPropertyDescriptor,p=Object.getOwnPropertyNames,g=Object.prototype.hasOwnProperty,v={};((r,o)=>{for(var i in o)c(r,i,{get:o[i],enumerable:!0})})(v,{Superscript:()=>k,default:()=>E}),r.exports=(a=v,((r,o,i,a)=>{if(o&&"object"==typeof o||"function"==typeof o)for(let v of p(o))g.call(r,v)||v===i||c(r,v,{get:()=>o[v],enumerable:!(a=u(o,v))||a.enumerable});return r})(c({},"__esModule",{value:!0}),a));var b=i(99248),k=b.Mark.create({name:"superscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sup"},{style:"vertical-align",getAttrs(r){return"super"===r&&null}}]},renderHTML({HTMLAttributes:r}){return["sup",(0,b.mergeAttributes)(this.options.HTMLAttributes,r),0]},addCommands(){return{setSuperscript:()=>({commands:r})=>r.setMark(this.name),toggleSuperscript:()=>({commands:r})=>r.toggleMark(this.name),unsetSuperscript:()=>({commands:r})=>r.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-.":()=>this.editor.commands.toggleSuperscript()}}}),E=k},18998:function(r){"use strict";r.exports=window.elementorV2.httpClient},19721:function(r,o,i){"use strict";var a,c=Object.defineProperty,u=Object.getOwnPropertyDescriptor,p=Object.getOwnPropertyNames,g=Object.prototype.hasOwnProperty,v={};((r,o)=>{for(var i in o)c(r,i,{get:o[i],enumerable:!0})})(v,{Underline:()=>k,default:()=>E}),r.exports=(a=v,((r,o,i,a)=>{if(o&&"object"==typeof o||"function"==typeof o)for(let v of p(o))g.call(r,v)||v===i||c(r,v,{get:()=>o[v],enumerable:!(a=u(o,v))||a.enumerable});return r})(c({},"__esModule",{value:!0}),a));var b=i(99248),k=b.Mark.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:r=>!!r.includes("underline")&&{}}]},renderHTML({HTMLAttributes:r}){return["u",(0,b.mergeAttributes)(this.options.HTMLAttributes,r),0]},parseMarkdown(r,o){return o.applyMark(this.name||"underline",o.parseInline(r.tokens||[]))},renderMarkdown(r,o){return`++${o.renderChildren(r)}++`},markdownTokenizer:{name:"underline",level:"inline",start(r){return r.indexOf("++")},tokenize(r,o,i){const a=/^(\+\+)([\s\S]+?)(\+\+)/.exec(r);if(!a)return;const c=a[2].trim();return{type:"underline",raw:a[0],text:c,tokens:i.inlineTokens(c)}}},addCommands(){return{setUnderline:()=>({commands:r})=>r.setMark(this.name),toggleUnderline:()=>({commands:r})=>r.toggleMark(this.name),unsetUnderline:()=>({commands:r})=>r.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),E=k},19888:function(r,o,i){"use strict";r.exports=i(58493)},21020:function(r,o,i){"use strict";var a=i(97557),c=Symbol.for("react.element"),u=Symbol.for("react.fragment"),p=Object.prototype.hasOwnProperty,g=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,v={key:!0,ref:!0,__self:!0,__source:!0};function q(r,o,i){var a,u={},b=null,k=null;for(a in void 0!==i&&(b=""+i),void 0!==o.key&&(b=""+o.key),void 0!==o.ref&&(k=o.ref),o)p.call(o,a)&&!v.hasOwnProperty(a)&&(u[a]=o[a]);if(r&&r.defaultProps)for(a in o=r.defaultProps)void 0===u[a]&&(u[a]=o[a]);return{$$typeof:c,type:r,key:b,ref:k,props:u,_owner:g.current}}o.Fragment=u,o.jsx=q,o.jsxs=q},21765:function(r){"use strict";var o,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,c=Object.getOwnPropertyNames,u=Object.prototype.hasOwnProperty,p={};function Fragment(r){return r.children}((r,o)=>{for(var a in o)i(r,a,{get:o[a],enumerable:!0})})(p,{Fragment:()=>Fragment,createElement:()=>h,h:()=>h,jsx:()=>h,jsxDEV:()=>h,jsxs:()=>h}),r.exports=(o=p,((r,o,p,g)=>{if(o&&"object"==typeof o||"function"==typeof o)for(let v of c(o))u.call(r,v)||v===p||i(r,v,{get:()=>o[v],enumerable:!(g=a(o,v))||g.enumerable});return r})(i({},"__esModule",{value:!0}),o));var h=(r,o)=>{if("slot"===r)return 0;if(r instanceof Function)return r(o);const{children:i,...a}=null!=o?o:{};if("svg"===r)throw new Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");return[r,a,i]}},22162:function(r,o,i){"use strict";var a=i(97557),c=i(19888);var u="function"==typeof Object.is?Object.is:function is(r,o){return r===o&&(0!==r||1/r==1/o)||r!=r&&o!=o},p=c.useSyncExternalStore,g=a.useRef,v=a.useEffect,b=a.useMemo,k=a.useDebugValue;o.useSyncExternalStoreWithSelector=function(r,o,i,a,c){var E=g(null);if(null===E.current){var w={hasValue:!1,value:null};E.current=w}else w=E.current;E=b(function(){function memoizedSelector(o){if(!g){if(g=!0,r=o,o=a(o),void 0!==c&&w.hasValue){var i=w.value;if(c(i,o))return p=i}return p=o}if(i=p,u(r,o))return i;var v=a(o);return void 0!==c&&c(i,v)?(r=o,i):(r=o,p=v)}var r,p,g=!1,v=void 0===i?null:i;return[function(){return memoizedSelector(o())},null===v?void 0:function(){return memoizedSelector(v())}]},[o,i,a,c]);var x=p(r,E[0],E[1]);return v(function(){w.hasValue=!0,w.value=x},[x]),k(x),x}},22444:function(r){"use strict";r.exports=window.elementorV2.utils},24007:function(r,o,i){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),function _createStarExport(r){Object.keys(r).filter(r=>"default"!==r&&"__esModule"!==r).forEach(i=>{o.hasOwnProperty(i)||Object.defineProperty(o,i,{enumerable:!0,configurable:!0,get:()=>r[i]})})}(i(57449))},24413:function(r){"use strict";r.exports=window.elementorV2.icons},26401:function(r,o,i){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),function _createStarExport(r){Object.keys(r).filter(r=>"default"!==r&&"__esModule"!==r).forEach(i=>{o.hasOwnProperty(i)||Object.defineProperty(o,i,{enumerable:!0,configurable:!0,get:()=>r[i]})})}(i(36553))},27096:function(r,o,i){"use strict";var a,c=Object.defineProperty,u=Object.getOwnPropertyDescriptor,p=Object.getOwnPropertyNames,g=Object.prototype.hasOwnProperty,v={};((r,o)=>{for(var i in o)c(r,i,{get:o[i],enumerable:!0})})(v,{Bold:()=>_,default:()=>T,starInputRegex:()=>E,starPasteRegex:()=>w,underscoreInputRegex:()=>x,underscorePasteRegex:()=>C}),r.exports=(a=v,((r,o,i,a)=>{if(o&&"object"==typeof o||"function"==typeof o)for(let v of p(o))g.call(r,v)||v===i||c(r,v,{get:()=>o[v],enumerable:!(a=u(o,v))||a.enumerable});return r})(c({},"__esModule",{value:!0}),a));var b=i(99248),k=i(38882),E=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,w=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,x=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,C=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,_=b.Mark.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:r=>"normal"!==r.style.fontWeight&&null},{style:"font-weight=400",clearMark:r=>r.type.name===this.name},{style:"font-weight",getAttrs:r=>/^(bold(er)?|[5-9]\d{2,})$/.test(r)&&null}]},renderHTML({HTMLAttributes:r}){return(0,k.jsx)("strong",{...(0,b.mergeAttributes)(this.options.HTMLAttributes,r),children:(0,k.jsx)("slot",{})})},markdownTokenName:"strong",parseMarkdown:(r,o)=>o.applyMark("bold",o.parseInline(r.tokens||[])),renderMarkdown:(r,o)=>`**${o.renderChildren(r)}**`,addCommands(){return{setBold:()=>({commands:r})=>r.setMark(this.name),toggleBold:()=>({commands:r})=>r.toggleMark(this.name),unsetBold:()=>({commands:r})=>r.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[(0,b.markInputRule)({find:E,type:this.type}),(0,b.markInputRule)({find:x,type:this.type})]},addPasteRules(){return[(0,b.markPasteRule)({find:w,type:this.type}),(0,b.markPasteRule)({find:C,type:this.type})]}}),T=_},27723:function(r){"use strict";r.exports=window.wp.i18n},29656:function(r,o,i){"use strict";var a,c=Object.defineProperty,u=Object.getOwnPropertyDescriptor,p=Object.getOwnPropertyNames,g=Object.prototype.hasOwnProperty,v={};((r,o)=>{for(var i in o)c(r,i,{get:o[i],enumerable:!0})})(v,{HardBreak:()=>k,default:()=>E}),r.exports=(a=v,((r,o,i,a)=>{if(o&&"object"==typeof o||"function"==typeof o)for(let v of p(o))g.call(r,v)||v===i||c(r,v,{get:()=>o[v],enumerable:!(a=u(o,v))||a.enumerable});return r})(c({},"__esModule",{value:!0}),a));var b=i(99248),k=b.Node.create({name:"hardBreak",markdownTokenName:"br",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:r}){return["br",(0,b.mergeAttributes)(this.options.HTMLAttributes,r)]},renderText(){return"\n"},renderMarkdown:()=>" \n",parseMarkdown:()=>({type:"hardBreak"}),addCommands(){return{setHardBreak:()=>({commands:r,chain:o,state:i,editor:a})=>r.first([()=>r.exitCode(),()=>r.command(()=>{const{selection:r,storedMarks:c}=i;if(r.$from.parent.type.spec.isolating)return!1;const{keepMarks:u}=this.options,{splittableMarks:p}=a.extensionManager,g=c||r.$to.parentOffset&&r.$from.marks();return o().insertContent({type:this.name}).command(({tr:r,dispatch:o})=>{if(o&&g&&u){const o=g.filter(r=>p.includes(r.type.name));r.ensureMarks(o)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),E=k},32386:function(r,o,i){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),function _createStarExport(r){Object.keys(r).filter(r=>"default"!==r&&"__esModule"!==r).forEach(i=>{o.hasOwnProperty(i)||Object.defineProperty(o,i,{enumerable:!0,configurable:!0,get:()=>r[i]})})}(i(77712))},33176:function(r){"use strict";r.exports=window.elementorV2.events},34243:function(r,o,i){"use strict";var a=i(36553),c=i(77712),u=i(37820),p=["ol",0],g=["ul",0],v=["li",0],b={attrs:{order:{default:1,validate:"number"}},parseDOM:[{tag:"ol",getAttrs:function getAttrs(r){return{order:r.hasAttribute("start")?+r.getAttribute("start"):1}}}],toDOM:function toDOM(r){return 1==r.attrs.order?p:["ol",{start:r.attrs.order},0]}},k={parseDOM:[{tag:"ul"}],toDOM:function toDOM(){return g}},E={parseDOM:[{tag:"li"}],toDOM:function toDOM(){return v},defining:!0};function add(r,o){var i={};for(var a in r)i[a]=r[a];for(var c in o)i[c]=o[c];return i}function wrapRangeInList(r,o,i){var u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,p=!1,g=o,v=o.$from.doc;if(o.depth>=2&&o.$from.node(o.depth-1).type.compatibleContent(i)&&0==o.startIndex){if(0==o.$from.index(o.depth-1))return!1;var b=v.resolve(o.start-2);g=new c.NodeRange(b,b,o.depth),o.endIndex<o.parent.childCount&&(o=new c.NodeRange(o.$from,v.resolve(o.$to.end(o.depth)),o.depth)),p=!0}var k=a.findWrapping(g,i,u,o);return!!k&&(r&&function doWrapInList(r,o,i,u,p){for(var g=c.Fragment.empty,v=i.length-1;v>=0;v--)g=c.Fragment.from(i[v].type.create(i[v].attrs,g));r.step(new a.ReplaceAroundStep(o.start-(u?2:0),o.end,o.start,o.end,new c.Slice(g,0,0),i.length,!0));for(var b=0,k=0;k<i.length;k++)i[k].type==p&&(b=k+1);for(var E=i.length-b,w=o.start+i.length-(u?2:0),x=o.parent,C=o.startIndex,_=o.endIndex,T=!0;C<_;C++,T=!1)!T&&a.canSplit(r.doc,w,E)&&(r.split(w,E),w+=2*E),w+=x.child(C).nodeSize;return r}(r,o,k,p,i),!0)}function splitListItem(r,o){return function(i,p){var g=i.selection,v=g.$from,b=g.$to,k=g.node;if(k&&k.isBlock||v.depth<2||!v.sameParent(b))return!1;var E=v.node(-1);if(E.type!=r)return!1;if(0==v.parent.content.size&&v.node(-1).childCount==v.indexAfter(-1)){if(3==v.depth||v.node(-3).type!=r||v.index(-2)!=v.node(-2).childCount-1)return!1;if(p){for(var w=c.Fragment.empty,x=v.index(-1)?1:v.index(-2)?2:3,C=v.depth-x;C>=v.depth-3;C--)w=c.Fragment.from(v.node(C).copy(w));var _=v.indexAfter(-1)<v.node(-2).childCount?1:v.indexAfter(-2)<v.node(-3).childCount?2:3;w=w.append(c.Fragment.from(r.createAndFill()));var T=v.before(v.depth-(x-1)),P=i.tr.replace(T,v.after(-_),new c.Slice(w,4-x,0)),A=-1;P.doc.nodesBetween(T,P.doc.content.size,function(r,o){if(A>-1)return!1;r.isTextblock&&0==r.content.size&&(A=o+1)}),A>-1&&P.setSelection(u.Selection.near(P.doc.resolve(A))),p(P.scrollIntoView())}return!0}var N=b.pos==v.end()?E.contentMatchAt(0).defaultType:null,R=i.tr.delete(v.pos,b.pos),I=N?[o?{type:r,attrs:o}:null,{type:N}]:void 0;return!!a.canSplit(R.doc,v.pos,2,I)&&(p&&p(R.split(v.pos,2,I).scrollIntoView()),!0)}}o.addListNodes=function addListNodes(r,o,i){return r.append({ordered_list:add(b,{content:"list_item+",group:i}),bullet_list:add(k,{content:"list_item+",group:i}),list_item:add(E,{content:o})})},o.bulletList=k,o.liftListItem=function liftListItem(r){return function(o,i){var u=o.selection,p=u.$from,g=u.$to,v=p.blockRange(g,function(o){return o.childCount>0&&o.firstChild.type==r});return!!v&&(!i||(p.node(v.depth-1).type==r?function liftToOuterList(r,o,i,u){var p=r.tr,g=u.end,v=u.$to.end(u.depth);g<v&&(p.step(new a.ReplaceAroundStep(g-1,v,g,v,new c.Slice(c.Fragment.from(i.create(null,u.parent.copy())),1,0),1,!0)),u=new c.NodeRange(p.doc.resolve(u.$from.pos),p.doc.resolve(v),u.depth));var b=a.liftTarget(u);if(null==b)return!1;p.lift(u,b);var k=p.doc.resolve(p.mapping.map(g,-1)-1);a.canJoin(p.doc,k.pos)&&k.nodeBefore.type==k.nodeAfter.type&&p.join(k.pos);return o(p.scrollIntoView()),!0}(o,i,r,v):function liftOutOfList(r,o,i){for(var u=r.tr,p=i.parent,g=i.end,v=i.endIndex-1,b=i.startIndex;v>b;v--)g-=p.child(v).nodeSize,u.delete(g-1,g+1);var k=u.doc.resolve(i.start),E=k.nodeAfter;if(u.mapping.map(i.end)!=i.start+k.nodeAfter.nodeSize)return!1;var w=0==i.startIndex,x=i.endIndex==p.childCount,C=k.node(-1),_=k.index(-1);if(!C.canReplace(_+(w?0:1),_+1,E.content.append(x?c.Fragment.empty:c.Fragment.from(p))))return!1;var T=k.pos,P=T+E.nodeSize;return u.step(new a.ReplaceAroundStep(T-(w?1:0),P+(x?1:0),T+1,P-1,new c.Slice((w?c.Fragment.empty:c.Fragment.from(p.copy(c.Fragment.empty))).append(x?c.Fragment.empty:c.Fragment.from(p.copy(c.Fragment.empty))),w?0:1,x?0:1),w?0:1)),o(u.scrollIntoView()),!0}(o,i,v)))}},o.listItem=E,o.orderedList=b,o.sinkListItem=function sinkListItem(r){return function(o,i){var u=o.selection,p=u.$from,g=u.$to,v=p.blockRange(g,function(o){return o.childCount>0&&o.firstChild.type==r});if(!v)return!1;var b=v.startIndex;if(0==b)return!1;var k=v.parent,E=k.child(b-1);if(E.type!=r)return!1;if(i){var w=E.lastChild&&E.lastChild.type==k.type,x=c.Fragment.from(w?r.create():null),C=new c.Slice(c.Fragment.from(r.create(null,c.Fragment.from(k.type.create(null,x)))),w?3:1,0),_=v.start,T=v.end;i(o.tr.step(new a.ReplaceAroundStep(_-(w?3:1),T,_,T,C,1,!0)).scrollIntoView())}return!0}},o.splitListItem=splitListItem,o.splitListItemKeepMarks=function splitListItemKeepMarks(r,o){var i=splitListItem(r,o);return function(r,o){return i(r,o&&function(i){var a=r.storedMarks||r.selection.$to.parentOffset&&r.selection.$from.marks();a&&i.ensureMarks(a),o(i)})}},o.wrapInList=function wrapInList(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return function(i,a){var c=i.selection,u=c.$from,p=c.$to,g=u.blockRange(p);if(!g)return!1;var v=a?i.tr:null;return!!wrapRangeInList(v,g,r,o)&&(a&&a(v.scrollIntoView()),!0)}},o.wrapRangeInList=wrapRangeInList},35423:function(r,o,i){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),function _createStarExport(r){Object.keys(r).filter(r=>"default"!==r&&"__esModule"!==r).forEach(i=>{o.hasOwnProperty(i)||Object.defineProperty(o,i,{enumerable:!0,configurable:!0,get:()=>r[i]})})}(i(34243))},36553:function(r,o,i){"use strict";function _wrapNativeSuper(r){var o="function"==typeof Map?new Map:void 0;return _wrapNativeSuper=function _wrapNativeSuper(r){if(null===r||!function _isNativeFunction(r){try{return-1!==Function.toString.call(r).indexOf("[native code]")}catch(o){return"function"==typeof r}}(r))return r;if("function"!=typeof r)throw new TypeError("Super expression must either be null or a function");if(void 0!==o){if(o.has(r))return o.get(r);o.set(r,Wrapper)}function Wrapper(){return _construct(r,arguments,_getPrototypeOf(this).constructor)}return Wrapper.prototype=Object.create(r.prototype,{constructor:{value:Wrapper,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf(Wrapper,r)},_wrapNativeSuper(r)}function _construct(r,o,i){return _construct=_isNativeReflectConstruct()?Reflect.construct.bind():function _construct(r,o,i){var a=[null];a.push.apply(a,o);var c=new(Function.bind.apply(r,a));return i&&_setPrototypeOf(c,i.prototype),c},_construct.apply(null,arguments)}function _inherits(r,o){if("function"!=typeof o&&null!==o)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(o&&o.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),o&&_setPrototypeOf(r,o)}function _setPrototypeOf(r,o){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(r,o){return r.__proto__=o,r},_setPrototypeOf(r,o)}function _createSuper(r){var o=_isNativeReflectConstruct();return function _createSuperInternal(){var i,a=_getPrototypeOf(r);if(o){var c=_getPrototypeOf(this).constructor;i=Reflect.construct(a,arguments,c)}else i=a.apply(this,arguments);return function _possibleConstructorReturn(r,o){if(o&&("object"===_typeof(o)||"function"==typeof o))return o;if(void 0!==o)throw new TypeError("Derived constructors may only return object or undefined");return function _assertThisInitialized(r){if(void 0===r)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(r)}(this,i)}}function _isNativeReflectConstruct(){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(r){return!1}}function _getPrototypeOf(r){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(r){return r.__proto__||Object.getPrototypeOf(r)},_getPrototypeOf(r)}function _typeof(r){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},_typeof(r)}function _classCallCheck(r,o){if(!(r instanceof o))throw new TypeError("Cannot call a class as a function")}function _defineProperties(r,o){for(var i=0;i<o.length;i++){var a=o[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(r,_toPropertyKey(a.key),a)}}function _createClass(r,o,i){return o&&_defineProperties(r.prototype,o),i&&_defineProperties(r,i),Object.defineProperty(r,"prototype",{writable:!1}),r}function _toPropertyKey(r){var o=function _toPrimitive(r,o){if("object"!==_typeof(r)||null===r)return r;var i=r[Symbol.toPrimitive];if(void 0!==i){var a=i.call(r,o||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===o?String:Number)(r)}(r,"string");return"symbol"===_typeof(o)?o:String(o)}var a=i(77712),c=Math.pow(2,16);function makeRecover(r,o){return r+o*c}function recoverIndex(r){return 65535&r}var u=function(){function MapResult(r,o,i){_classCallCheck(this,MapResult),this.pos=r,this.delInfo=o,this.recover=i}return _createClass(MapResult,[{key:"deleted",get:function get(){return(8&this.delInfo)>0}},{key:"deletedBefore",get:function get(){return(5&this.delInfo)>0}},{key:"deletedAfter",get:function get(){return(6&this.delInfo)>0}},{key:"deletedAcross",get:function get(){return(4&this.delInfo)>0}}]),MapResult}(),p=function(){function StepMap(r){var o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(_classCallCheck(this,StepMap),this.ranges=r,this.inverted=o,!r.length&&StepMap.empty)return StepMap.empty}return _createClass(StepMap,[{key:"recover",value:function recover(r){var o=0,i=recoverIndex(r);if(!this.inverted)for(var a=0;a<i;a++)o+=this.ranges[3*a+2]-this.ranges[3*a+1];return this.ranges[3*i]+o+function recoverOffset(r){return(r-(65535&r))/c}(r)}},{key:"mapResult",value:function mapResult(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this._map(r,o,!1)}},{key:"map",value:function map(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this._map(r,o,!0)}},{key:"_map",value:function _map(r,o,i){for(var a=0,c=this.inverted?2:1,p=this.inverted?1:2,g=0;g<this.ranges.length;g+=3){var v=this.ranges[g]-(this.inverted?a:0);if(v>r)break;var b=this.ranges[g+c],k=this.ranges[g+p],E=v+b;if(r<=E){var w=v+a+((b?r==v?-1:r==E?1:o:o)<0?0:k);if(i)return w;var x=r==(o<0?v:E)?null:makeRecover(g/3,r-v),C=r==v?2:r==E?1:4;return(o<0?r!=v:r!=E)&&(C|=8),new u(w,C,x)}a+=k-b}return i?r+a:new u(r+a,0,null)}},{key:"touches",value:function touches(r,o){for(var i=0,a=recoverIndex(o),c=this.inverted?2:1,u=this.inverted?1:2,p=0;p<this.ranges.length;p+=3){var g=this.ranges[p]-(this.inverted?i:0);if(g>r)break;var v=this.ranges[p+c];if(r<=g+v&&p==3*a)return!0;i+=this.ranges[p+u]-v}return!1}},{key:"forEach",value:function forEach(r){for(var o=this.inverted?2:1,i=this.inverted?1:2,a=0,c=0;a<this.ranges.length;a+=3){var u=this.ranges[a],p=u-(this.inverted?c:0),g=u+(this.inverted?0:c),v=this.ranges[a+o],b=this.ranges[a+i];r(p,p+v,g,g+b),c+=b-v}}},{key:"invert",value:function invert(){return new StepMap(this.ranges,!this.inverted)}},{key:"toString",value:function toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}}],[{key:"offset",value:function offset(r){return 0==r?StepMap.empty:new StepMap(r<0?[0,-r,0]:[0,0,r])}}]),StepMap}();p.empty=new p([]);var g=function(){function Mapping(r,o){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:r?r.length:0;_classCallCheck(this,Mapping),this.mirror=o,this.from=i,this.to=a,this._maps=r||[],this.ownData=!(r||o)}return _createClass(Mapping,[{key:"maps",get:function get(){return this._maps}},{key:"slice",value:function slice(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.maps.length;return new Mapping(this._maps,this.mirror,r,o)}},{key:"appendMap",value:function appendMap(r,o){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(r),null!=o&&this.setMirror(this._maps.length-1,o)}},{key:"appendMapping",value:function appendMapping(r){for(var o=0,i=this._maps.length;o<r._maps.length;o++){var a=r.getMirror(o);this.appendMap(r._maps[o],null!=a&&a<o?i+a:void 0)}}},{key:"getMirror",value:function getMirror(r){if(this.mirror)for(var o=0;o<this.mirror.length;o++)if(this.mirror[o]==r)return this.mirror[o+(o%2?-1:1)]}},{key:"setMirror",value:function setMirror(r,o){this.mirror||(this.mirror=[]),this.mirror.push(r,o)}},{key:"appendMappingInverted",value:function appendMappingInverted(r){for(var o=r.maps.length-1,i=this._maps.length+r._maps.length;o>=0;o--){var a=r.getMirror(o);this.appendMap(r._maps[o].invert(),null!=a&&a>o?i-a-1:void 0)}}},{key:"invert",value:function invert(){var r=new Mapping;return r.appendMappingInverted(this),r}},{key:"map",value:function map(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(this.mirror)return this._map(r,o,!0);for(var i=this.from;i<this.to;i++)r=this._maps[i].map(r,o);return r}},{key:"mapResult",value:function mapResult(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this._map(r,o,!1)}},{key:"_map",value:function _map(r,o,i){for(var a=0,c=this.from;c<this.to;c++){var p=this._maps[c].mapResult(r,o);if(null!=p.recover){var g=this.getMirror(c);if(null!=g&&g>c&&g<this.to){c=g,r=this._maps[g].recover(p.recover);continue}}a|=p.delInfo,r=p.pos}return i?r:new u(r,a,null)}}]),Mapping}(),v=Object.create(null),b=function(){function Step(){_classCallCheck(this,Step)}return _createClass(Step,[{key:"getMap",value:function getMap(){return p.empty}},{key:"merge",value:function merge(r){return null}}],[{key:"fromJSON",value:function fromJSON(r,o){if(!o||!o.stepType)throw new RangeError("Invalid input for Step.fromJSON");var i=v[o.stepType];if(!i)throw new RangeError("No step type ".concat(o.stepType," defined"));return i.fromJSON(r,o)}},{key:"jsonID",value:function jsonID(r,o){if(r in v)throw new RangeError("Duplicate use of step JSON ID "+r);return v[r]=o,o.prototype.jsonID=r,o}}]),Step}(),k=function(){function StepResult(r,o){_classCallCheck(this,StepResult),this.doc=r,this.failed=o}return _createClass(StepResult,null,[{key:"ok",value:function ok(r){return new StepResult(r,null)}},{key:"fail",value:function fail(r){return new StepResult(null,r)}},{key:"fromReplace",value:function fromReplace(r,o,i,c){try{return StepResult.ok(r.replace(o,i,c))}catch(r){if(r instanceof a.ReplaceError)return StepResult.fail(r.message);throw r}}}]),StepResult}();function mapFragment(r,o,i){for(var c=[],u=0;u<r.childCount;u++){var p=r.child(u);p.content.size&&(p=p.copy(mapFragment(p.content,o,p))),p.isInline&&(p=o(p,i,u)),c.push(p)}return a.Fragment.fromArray(c)}var E=function(r){_inherits(AddMarkStep,r);var o=_createSuper(AddMarkStep);function AddMarkStep(r,i,a){var c;return _classCallCheck(this,AddMarkStep),(c=o.call(this)).from=r,c.to=i,c.mark=a,c}return _createClass(AddMarkStep,[{key:"apply",value:function apply(r){var o=this,i=r.slice(this.from,this.to),c=r.resolve(this.from),u=c.node(c.sharedDepth(this.to)),p=new a.Slice(mapFragment(i.content,function(r,i){return r.isAtom&&i.type.allowsMarkType(o.mark.type)?r.mark(o.mark.addToSet(r.marks)):r},u),i.openStart,i.openEnd);return k.fromReplace(r,this.from,this.to,p)}},{key:"invert",value:function invert(){return new w(this.from,this.to,this.mark)}},{key:"map",value:function map(r){var o=r.mapResult(this.from,1),i=r.mapResult(this.to,-1);return o.deleted&&i.deleted||o.pos>=i.pos?null:new AddMarkStep(o.pos,i.pos,this.mark)}},{key:"merge",value:function merge(r){return r instanceof AddMarkStep&&r.mark.eq(this.mark)&&this.from<=r.to&&this.to>=r.from?new AddMarkStep(Math.min(this.from,r.from),Math.max(this.to,r.to),this.mark):null}},{key:"toJSON",value:function toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}}],[{key:"fromJSON",value:function fromJSON(r,o){if("number"!=typeof o.from||"number"!=typeof o.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new AddMarkStep(o.from,o.to,r.markFromJSON(o.mark))}}]),AddMarkStep}(b);b.jsonID("addMark",E);var w=function(r){_inherits(RemoveMarkStep,r);var o=_createSuper(RemoveMarkStep);function RemoveMarkStep(r,i,a){var c;return _classCallCheck(this,RemoveMarkStep),(c=o.call(this)).from=r,c.to=i,c.mark=a,c}return _createClass(RemoveMarkStep,[{key:"apply",value:function apply(r){var o=this,i=r.slice(this.from,this.to),c=new a.Slice(mapFragment(i.content,function(r){return r.mark(o.mark.removeFromSet(r.marks))},r),i.openStart,i.openEnd);return k.fromReplace(r,this.from,this.to,c)}},{key:"invert",value:function invert(){return new E(this.from,this.to,this.mark)}},{key:"map",value:function map(r){var o=r.mapResult(this.from,1),i=r.mapResult(this.to,-1);return o.deleted&&i.deleted||o.pos>=i.pos?null:new RemoveMarkStep(o.pos,i.pos,this.mark)}},{key:"merge",value:function merge(r){return r instanceof RemoveMarkStep&&r.mark.eq(this.mark)&&this.from<=r.to&&this.to>=r.from?new RemoveMarkStep(Math.min(this.from,r.from),Math.max(this.to,r.to),this.mark):null}},{key:"toJSON",value:function toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}}],[{key:"fromJSON",value:function fromJSON(r,o){if("number"!=typeof o.from||"number"!=typeof o.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new RemoveMarkStep(o.from,o.to,r.markFromJSON(o.mark))}}]),RemoveMarkStep}(b);b.jsonID("removeMark",w);var x=function(r){_inherits(AddNodeMarkStep,r);var o=_createSuper(AddNodeMarkStep);function AddNodeMarkStep(r,i){var a;return _classCallCheck(this,AddNodeMarkStep),(a=o.call(this)).pos=r,a.mark=i,a}return _createClass(AddNodeMarkStep,[{key:"apply",value:function apply(r){var o=r.nodeAt(this.pos);if(!o)return k.fail("No node at mark step's position");var i=o.type.create(o.attrs,null,this.mark.addToSet(o.marks));return k.fromReplace(r,this.pos,this.pos+1,new a.Slice(a.Fragment.from(i),0,o.isLeaf?0:1))}},{key:"invert",value:function invert(r){var o=r.nodeAt(this.pos);if(o){var i=this.mark.addToSet(o.marks);if(i.length==o.marks.length){for(var a=0;a<o.marks.length;a++)if(!o.marks[a].isInSet(i))return new AddNodeMarkStep(this.pos,o.marks[a]);return new AddNodeMarkStep(this.pos,this.mark)}}return new C(this.pos,this.mark)}},{key:"map",value:function map(r){var o=r.mapResult(this.pos,1);return o.deletedAfter?null:new AddNodeMarkStep(o.pos,this.mark)}},{key:"toJSON",value:function toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}}],[{key:"fromJSON",value:function fromJSON(r,o){if("number"!=typeof o.pos)throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new AddNodeMarkStep(o.pos,r.markFromJSON(o.mark))}}]),AddNodeMarkStep}(b);b.jsonID("addNodeMark",x);var C=function(r){_inherits(RemoveNodeMarkStep,r);var o=_createSuper(RemoveNodeMarkStep);function RemoveNodeMarkStep(r,i){var a;return _classCallCheck(this,RemoveNodeMarkStep),(a=o.call(this)).pos=r,a.mark=i,a}return _createClass(RemoveNodeMarkStep,[{key:"apply",value:function apply(r){var o=r.nodeAt(this.pos);if(!o)return k.fail("No node at mark step's position");var i=o.type.create(o.attrs,null,this.mark.removeFromSet(o.marks));return k.fromReplace(r,this.pos,this.pos+1,new a.Slice(a.Fragment.from(i),0,o.isLeaf?0:1))}},{key:"invert",value:function invert(r){var o=r.nodeAt(this.pos);return o&&this.mark.isInSet(o.marks)?new x(this.pos,this.mark):this}},{key:"map",value:function map(r){var o=r.mapResult(this.pos,1);return o.deletedAfter?null:new RemoveNodeMarkStep(o.pos,this.mark)}},{key:"toJSON",value:function toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}}],[{key:"fromJSON",value:function fromJSON(r,o){if("number"!=typeof o.pos)throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new RemoveNodeMarkStep(o.pos,r.markFromJSON(o.mark))}}]),RemoveNodeMarkStep}(b);b.jsonID("removeNodeMark",C);var _=function(r){_inherits(ReplaceStep,r);var o=_createSuper(ReplaceStep);function ReplaceStep(r,i,a){var c,u=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return _classCallCheck(this,ReplaceStep),(c=o.call(this)).from=r,c.to=i,c.slice=a,c.structure=u,c}return _createClass(ReplaceStep,[{key:"apply",value:function apply(r){return this.structure&&contentBetween(r,this.from,this.to)?k.fail("Structure replace would overwrite content"):k.fromReplace(r,this.from,this.to,this.slice)}},{key:"getMap",value:function getMap(){return new p([this.from,this.to-this.from,this.slice.size])}},{key:"invert",value:function invert(r){return new ReplaceStep(this.from,this.from+this.slice.size,r.slice(this.from,this.to))}},{key:"map",value:function map(r){var o=r.mapResult(this.from,1),i=r.mapResult(this.to,-1);return o.deletedAcross&&i.deletedAcross?null:new ReplaceStep(o.pos,Math.max(o.pos,i.pos),this.slice,this.structure)}},{key:"merge",value:function merge(r){if(!(r instanceof ReplaceStep)||r.structure||this.structure)return null;if(this.from+this.slice.size!=r.from||this.slice.openEnd||r.slice.openStart){if(r.to!=this.from||this.slice.openStart||r.slice.openEnd)return null;var o=this.slice.size+r.slice.size==0?a.Slice.empty:new a.Slice(r.slice.content.append(this.slice.content),r.slice.openStart,this.slice.openEnd);return new ReplaceStep(r.from,this.to,o,this.structure)}var i=this.slice.size+r.slice.size==0?a.Slice.empty:new a.Slice(this.slice.content.append(r.slice.content),this.slice.openStart,r.slice.openEnd);return new ReplaceStep(this.from,this.to+(r.to-r.from),i,this.structure)}},{key:"toJSON",value:function toJSON(){var r={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(r.slice=this.slice.toJSON()),this.structure&&(r.structure=!0),r}}],[{key:"fromJSON",value:function fromJSON(r,o){if("number"!=typeof o.from||"number"!=typeof o.to)throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new ReplaceStep(o.from,o.to,a.Slice.fromJSON(r,o.slice),!!o.structure)}}]),ReplaceStep}(b);b.jsonID("replace",_);var T=function(r){_inherits(ReplaceAroundStep,r);var o=_createSuper(ReplaceAroundStep);function ReplaceAroundStep(r,i,a,c,u,p){var g,v=arguments.length>6&&void 0!==arguments[6]&&arguments[6];return _classCallCheck(this,ReplaceAroundStep),(g=o.call(this)).from=r,g.to=i,g.gapFrom=a,g.gapTo=c,g.slice=u,g.insert=p,g.structure=v,g}return _createClass(ReplaceAroundStep,[{key:"apply",value:function apply(r){if(this.structure&&(contentBetween(r,this.from,this.gapFrom)||contentBetween(r,this.gapTo,this.to)))return k.fail("Structure gap-replace would overwrite content");var o=r.slice(this.gapFrom,this.gapTo);if(o.openStart||o.openEnd)return k.fail("Gap is not a flat range");var i=this.slice.insertAt(this.insert,o.content);return i?k.fromReplace(r,this.from,this.to,i):k.fail("Content does not fit in gap")}},{key:"getMap",value:function getMap(){return new p([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}},{key:"invert",value:function invert(r){var o=this.gapTo-this.gapFrom;return new ReplaceAroundStep(this.from,this.from+this.slice.size+o,this.from+this.insert,this.from+this.insert+o,r.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}},{key:"map",value:function map(r){var o=r.mapResult(this.from,1),i=r.mapResult(this.to,-1),a=this.from==this.gapFrom?o.pos:r.map(this.gapFrom,-1),c=this.to==this.gapTo?i.pos:r.map(this.gapTo,1);return o.deletedAcross&&i.deletedAcross||a<o.pos||c>i.pos?null:new ReplaceAroundStep(o.pos,i.pos,a,c,this.slice,this.insert,this.structure)}},{key:"toJSON",value:function toJSON(){var r={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(r.slice=this.slice.toJSON()),this.structure&&(r.structure=!0),r}}],[{key:"fromJSON",value:function fromJSON(r,o){if("number"!=typeof o.from||"number"!=typeof o.to||"number"!=typeof o.gapFrom||"number"!=typeof o.gapTo||"number"!=typeof o.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new ReplaceAroundStep(o.from,o.to,o.gapFrom,o.gapTo,a.Slice.fromJSON(r,o.slice),o.insert,!!o.structure)}}]),ReplaceAroundStep}(b);function contentBetween(r,o,i){for(var a=r.resolve(o),c=i-o,u=a.depth;c>0&&u>0&&a.indexAfter(u)==a.node(u).childCount;)u--,c--;if(c>0)for(var p=a.node(u).maybeChild(a.indexAfter(u));c>0;){if(!p||p.isLeaf)return!0;p=p.firstChild,c--}return!1}function _clearIncompatible(r,o,i){for(var c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:i.contentMatch,u=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],p=r.doc.nodeAt(o),g=[],v=o+1,b=0;b<p.childCount;b++){var k=p.child(b),E=v+k.nodeSize,x=c.matchType(k.type);if(x){c=x;for(var C=0;C<k.marks.length;C++)i.allowsMarkType(k.marks[C].type)||r.step(new w(v,E,k.marks[C]));if(u&&k.isText&&"pre"!=i.whitespace)for(var T=void 0,P=/\r?\n|\r/g,A=void 0;T=P.exec(k.text);)A||(A=new a.Slice(a.Fragment.from(i.schema.text(" ",i.allowedMarks(k.marks))),0,0)),g.push(new _(v+T.index,v+T.index+T[0].length,A))}else g.push(new _(v,E,a.Slice.empty));v=E}if(!c.validEnd){var N=c.fillBefore(a.Fragment.empty,!0);r.replace(v,v,new a.Slice(N,0,0))}for(var R=g.length-1;R>=0;R--)r.step(g[R])}function canCut(r,o,i){return(0==o||r.canReplace(o,r.childCount))&&(i==r.childCount||r.canReplace(0,i))}function withAttrs(r){return{type:r,attrs:null}}function replaceNewlines(r,o,i,a){o.forEach(function(c,u){if(c.isText)for(var p,g=/\r?\n|\r/g;p=g.exec(c.text);){var v=r.mapping.slice(a).map(i+1+u+p.index);r.replaceWith(v,v+1,o.type.schema.linebreakReplacement.create())}})}function replaceLinebreaks(r,o,i,a){o.forEach(function(c,u){if(c.type==c.type.schema.linebreakReplacement){var p=r.mapping.slice(a).map(i+1+u);r.replaceWith(p,p+1,o.type.schema.text("\n"))}})}function joinable(r,o){return!(!r||!o||r.isLeaf||!function canAppendWithSubstitutedLinebreaks(r,o){o.content.size||r.type.compatibleContent(o.type);for(var i=r.contentMatchAt(r.childCount),a=r.type.schema.linebreakReplacement,c=0;c<o.childCount;c++){var u=o.child(c),p=u.type==a?r.type.schema.nodes.text:u.type;if(!(i=i.matchType(p)))return!1;if(!r.type.allowsMarks(u.marks))return!1}return i.validEnd}(r,o))}function insertPoint(r,o,i){var a=r.resolve(o);if(a.parent.canReplaceWith(a.index(),a.index(),i))return o;if(0==a.parentOffset)for(var c=a.depth-1;c>=0;c--){var u=a.index(c);if(a.node(c).canReplaceWith(u,u,i))return a.before(c+1);if(u>0)return null}if(a.parentOffset==a.parent.content.size)for(var p=a.depth-1;p>=0;p--){var g=a.indexAfter(p);if(a.node(p).canReplaceWith(g,g,i))return a.after(p+1);if(g<a.node(p).childCount)return null}return null}function replaceStep(r,o){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:a.Slice.empty;if(o==i&&!c.size)return null;var u=r.resolve(o),p=r.resolve(i);return fitsTrivially(u,p,c)?new _(o,i,c):new P(u,p,c).fit()}function fitsTrivially(r,o,i){return!i.openStart&&!i.openEnd&&r.start()==o.start()&&r.parent.canReplace(r.index(),o.index(),i.content)}b.jsonID("replaceAround",T);var P=function(){function Fitter(r,o,i){_classCallCheck(this,Fitter),this.$from=r,this.$to=o,this.unplaced=i,this.frontier=[],this.placed=a.Fragment.empty;for(var c=0;c<=r.depth;c++){var u=r.node(c);this.frontier.push({type:u.type,match:u.contentMatchAt(r.indexAfter(c))})}for(var p=r.depth;p>0;p--)this.placed=a.Fragment.from(r.node(p).copy(this.placed))}return _createClass(Fitter,[{key:"depth",get:function get(){return this.frontier.length-1}},{key:"fit",value:function fit(){for(;this.unplaced.size;){var fit=this.findFittable();fit?this.placeNodes(fit):this.openMore()||this.dropNode()}var r=this.mustMoveInline(),o=this.placed.size-this.depth-this.$from.depth,i=this.$from,c=this.close(r<0?this.$to:i.doc.resolve(r));if(!c)return null;for(var u=this.placed,p=i.depth,g=c.depth;p&&g&&1==u.childCount;)u=u.firstChild.content,p--,g--;var v=new a.Slice(u,p,g);return r>-1?new T(i.pos,r,this.$to.pos,this.$to.end(),v,o):v.size||i.pos!=this.$to.pos?new _(i.pos,c.pos,v):null}},{key:"findFittable",value:function findFittable(){for(var r=this.unplaced.openStart,o=this.unplaced.content,i=0,c=this.unplaced.openEnd;i<r;i++){var u=o.firstChild;if(o.childCount>1&&(c=0),u.type.spec.isolating&&c<=i){r=i;break}o=u.content}for(var p=1;p<=2;p++)for(var g=1==p?r:this.unplaced.openStart;g>=0;g--)for(var v=null,b=(g?(v=contentAt(this.unplaced.content,g-1).firstChild).content:this.unplaced.content).firstChild,k=this.depth;k>=0;k--){var E=this.frontier[k],w=E.type,x=E.match,C=void 0,_=null;if(1==p&&(b?x.matchType(b.type)||(_=x.fillBefore(a.Fragment.from(b),!1)):v&&w.compatibleContent(v.type)))return{sliceDepth:g,frontierDepth:k,parent:v,inject:_};if(2==p&&b&&(C=x.findWrapping(b.type)))return{sliceDepth:g,frontierDepth:k,parent:v,wrap:C};if(v&&x.matchType(v.type))break}}},{key:"openMore",value:function openMore(){var r=this.unplaced,o=r.content,i=r.openStart,c=r.openEnd,u=contentAt(o,i);return!(!u.childCount||u.firstChild.isLeaf)&&(this.unplaced=new a.Slice(o,i+1,Math.max(c,u.size+i>=o.size-c?i+1:0)),!0)}},{key:"dropNode",value:function dropNode(){var r=this.unplaced,o=r.content,i=r.openStart,c=r.openEnd,u=contentAt(o,i);if(u.childCount<=1&&i>0){var p=o.size-i<=i+u.size;this.unplaced=new a.Slice(dropFromFragment(o,i-1,1),i-1,p?i-1:c)}else this.unplaced=new a.Slice(dropFromFragment(o,i,1),i,c)}},{key:"placeNodes",value:function placeNodes(r){for(var o=r.sliceDepth,i=r.frontierDepth,c=r.parent,u=r.inject,p=r.wrap;this.depth>i;)this.closeFrontierNode();if(p)for(var g=0;g<p.length;g++)this.openFrontierNode(p[g]);var v=this.unplaced,b=c?c.content:v.content,k=v.openStart-o,E=0,w=[],x=this.frontier[i],C=x.match,_=x.type;if(u){for(var T=0;T<u.childCount;T++)w.push(u.child(T));C=C.matchFragment(u)}for(var P=b.size+o-(v.content.size-v.openEnd);E<b.childCount;){var A=b.child(E),N=C.matchType(A.type);if(!N)break;(++E>1||0==k||A.content.size)&&(C=N,w.push(closeNodeStart(A.mark(_.allowedMarks(A.marks)),1==E?k:0,E==b.childCount?P:-1)))}var R=E==b.childCount;R||(P=-1),this.placed=addToFragment(this.placed,i,a.Fragment.from(w)),this.frontier[i].match=C,R&&P<0&&c&&c.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(var I=0,L=b;I<P;I++){var z=L.lastChild;this.frontier.push({type:z.type,match:z.contentMatchAt(z.childCount)}),L=z.content}this.unplaced=R?0==o?a.Slice.empty:new a.Slice(dropFromFragment(v.content,o-1,1),o-1,P<0?v.openEnd:o-1):new a.Slice(dropFromFragment(v.content,o,E),v.openStart,v.openEnd)}},{key:"mustMoveInline",value:function mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;var r,o=this.frontier[this.depth];if(!o.type.isTextblock||!contentAfterFits(this.$to,this.$to.depth,o.type,o.match,!1)||this.$to.depth==this.depth&&(r=this.findCloseLevel(this.$to))&&r.depth==this.depth)return-1;for(var i=this.$to.depth,a=this.$to.after(i);i>1&&a==this.$to.end(--i);)++a;return a}},{key:"findCloseLevel",value:function findCloseLevel(r){e:for(var o=Math.min(this.depth,r.depth);o>=0;o--){var i=this.frontier[o],a=i.match,c=i.type,u=o<r.depth&&r.end(o+1)==r.pos+(r.depth-(o+1)),p=contentAfterFits(r,o,c,a,u);if(p){for(var g=o-1;g>=0;g--){var v=this.frontier[g],b=v.match,k=contentAfterFits(r,g,v.type,b,!0);if(!k||k.childCount)continue e}return{depth:o,fit:p,move:u?r.doc.resolve(r.after(o+1)):r}}}}},{key:"close",value:function close(r){var close=this.findCloseLevel(r);if(!close)return null;for(;this.depth>close.depth;)this.closeFrontierNode();close.fit.childCount&&(this.placed=addToFragment(this.placed,close.depth,close.fit)),r=close.move;for(var o=close.depth+1;o<=r.depth;o++){var i=r.node(o),a=i.type.contentMatch.fillBefore(i.content,!0,r.index(o));this.openFrontierNode(i.type,i.attrs,a)}return r}},{key:"openFrontierNode",value:function openFrontierNode(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2?arguments[2]:void 0,c=this.frontier[this.depth];c.match=c.match.matchType(r),this.placed=addToFragment(this.placed,this.depth,a.Fragment.from(r.create(o,i))),this.frontier.push({type:r,match:r.contentMatch})}},{key:"closeFrontierNode",value:function closeFrontierNode(){var r=this.frontier.pop().match.fillBefore(a.Fragment.empty,!0);r.childCount&&(this.placed=addToFragment(this.placed,this.frontier.length,r))}}]),Fitter}();function dropFromFragment(r,o,i){return 0==o?r.cutByIndex(i,r.childCount):r.replaceChild(0,r.firstChild.copy(dropFromFragment(r.firstChild.content,o-1,i)))}function addToFragment(r,o,i){return 0==o?r.append(i):r.replaceChild(r.childCount-1,r.lastChild.copy(addToFragment(r.lastChild.content,o-1,i)))}function contentAt(r,o){for(var i=0;i<o;i++)r=r.firstChild.content;return r}function closeNodeStart(r,o,i){if(o<=0)return r;var c=r.content;return o>1&&(c=c.replaceChild(0,closeNodeStart(c.firstChild,o-1,1==c.childCount?i-1:0))),o>0&&(c=r.type.contentMatch.fillBefore(c).append(c),i<=0&&(c=c.append(r.type.contentMatch.matchFragment(c).fillBefore(a.Fragment.empty,!0)))),r.copy(c)}function contentAfterFits(r,o,i,a,c){var u=r.node(o),p=c?r.indexAfter(o):r.index(o);if(p==u.childCount&&!i.compatibleContent(u.type))return null;var g=a.fillBefore(u.content,!0,p);return g&&!function invalidMarks(r,o,i){for(var a=i;a<o.childCount;a++)if(!r.allowsMarks(o.child(a).marks))return!0;return!1}(i,u.content,p)?g:null}function definesContent(r){return r.spec.defining||r.spec.definingForContent}function closeFragment(r,o,i,c,u){if(o<i){var p=r.firstChild;r=r.replaceChild(0,p.copy(closeFragment(p.content,o+1,i,c,p)))}if(o>c){var g=u.contentMatchAt(0),v=g.fillBefore(r).append(r);r=v.append(g.matchFragment(v).fillBefore(a.Fragment.empty,!0))}return r}function coveredDepths(r,o){for(var i=[],a=Math.min(r.depth,o.depth);a>=0;a--){var c=r.start(a);if(c<r.pos-(r.depth-a)||o.end(a)>o.pos+(o.depth-a)||r.node(a).type.spec.isolating||o.node(a).type.spec.isolating)break;(c==o.start(a)||a==r.depth&&a==o.depth&&r.parent.inlineContent&&o.parent.inlineContent&&a&&o.start(a-1)==c-1)&&i.push(a)}return i}var A=function(r){_inherits(AttrStep,r);var o=_createSuper(AttrStep);function AttrStep(r,i,a){var c;return _classCallCheck(this,AttrStep),(c=o.call(this)).pos=r,c.attr=i,c.value=a,c}return _createClass(AttrStep,[{key:"apply",value:function apply(r){var o=r.nodeAt(this.pos);if(!o)return k.fail("No node at attribute step's position");var i=Object.create(null);for(var c in o.attrs)i[c]=o.attrs[c];i[this.attr]=this.value;var u=o.type.create(i,null,o.marks);return k.fromReplace(r,this.pos,this.pos+1,new a.Slice(a.Fragment.from(u),0,o.isLeaf?0:1))}},{key:"getMap",value:function getMap(){return p.empty}},{key:"invert",value:function invert(r){return new AttrStep(this.pos,this.attr,r.nodeAt(this.pos).attrs[this.attr])}},{key:"map",value:function map(r){var o=r.mapResult(this.pos,1);return o.deletedAfter?null:new AttrStep(o.pos,this.attr,this.value)}},{key:"toJSON",value:function toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}}],[{key:"fromJSON",value:function fromJSON(r,o){if("number"!=typeof o.pos||"string"!=typeof o.attr)throw new RangeError("Invalid input for AttrStep.fromJSON");return new AttrStep(o.pos,o.attr,o.value)}}]),AttrStep}(b);b.jsonID("attr",A);var N=function(r){_inherits(DocAttrStep,r);var o=_createSuper(DocAttrStep);function DocAttrStep(r,i){var a;return _classCallCheck(this,DocAttrStep),(a=o.call(this)).attr=r,a.value=i,a}return _createClass(DocAttrStep,[{key:"apply",value:function apply(r){var o=Object.create(null);for(var i in r.attrs)o[i]=r.attrs[i];o[this.attr]=this.value;var a=r.type.create(o,r.content,r.marks);return k.ok(a)}},{key:"getMap",value:function getMap(){return p.empty}},{key:"invert",value:function invert(r){return new DocAttrStep(this.attr,r.attrs[this.attr])}},{key:"map",value:function map(r){return this}},{key:"toJSON",value:function toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}}],[{key:"fromJSON",value:function fromJSON(r,o){if("string"!=typeof o.attr)throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new DocAttrStep(o.attr,o.value)}}]),DocAttrStep}(b);b.jsonID("docAttr",N),o.TransformError=function(r){_inherits(TransformError,r);var o=_createSuper(TransformError);function TransformError(){return _classCallCheck(this,TransformError),o.apply(this,arguments)}return _createClass(TransformError)}(_wrapNativeSuper(Error)),o.TransformError=function TransformError(r){var o=Error.call(this,r);return o.__proto__=TransformError.prototype,o},o.TransformError.prototype=Object.create(Error.prototype),o.TransformError.prototype.constructor=o.TransformError,o.TransformError.prototype.name="TransformError";var R=function(){function Transform(r){_classCallCheck(this,Transform),this.doc=r,this.steps=[],this.docs=[],this.mapping=new g}return _createClass(Transform,[{key:"before",get:function get(){return this.docs.length?this.docs[0]:this.doc}},{key:"step",value:function step(r){var i=this.maybeStep(r);if(i.failed)throw new o.TransformError(i.failed);return this}},{key:"maybeStep",value:function maybeStep(r){var o=r.apply(this.doc);return o.failed||this.addStep(r,o.doc),o}},{key:"docChanged",get:function get(){return this.steps.length>0}},{key:"changedRange",value:function changedRange(){for(var r=1e9,o=-1e9,i=0;i<this.mapping.maps.length;i++){var a=this.mapping.maps[i];i&&(r=a.map(r,1),o=a.map(o,-1)),a.forEach(function(i,a,c,u){r=Math.min(r,c),o=Math.max(o,u)})}return 1e9==r?null:{from:r,to:o}}},{key:"addStep",value:function addStep(r,o){this.docs.push(this.doc),this.steps.push(r),this.mapping.appendMap(r.getMap()),this.doc=o}},{key:"replace",value:function replace(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a.Slice.empty,c=replaceStep(this.doc,r,o,i);return c&&this.step(c),this}},{key:"replaceWith",value:function replaceWith(r,o,i){return this.replace(r,o,new a.Slice(a.Fragment.from(i),0,0))}},{key:"delete",value:function _delete(r,o){return this.replace(r,o,a.Slice.empty)}},{key:"insert",value:function insert(r,o){return this.replaceWith(r,r,o)}},{key:"replaceRange",value:function replaceRange(r,o,i){return function _replaceRange(r,o,i,c){if(!c.size)return r.deleteRange(o,i);var u=r.doc.resolve(o),p=r.doc.resolve(i);if(fitsTrivially(u,p,c))return r.step(new _(o,i,c));var g=coveredDepths(u,p);0==g[g.length-1]&&g.pop();var v=-(u.depth+1);g.unshift(v);for(var b=u.depth,k=u.pos-1;b>0;b--,k--){var E=u.node(b).type.spec;if(E.defining||E.definingAsContext||E.isolating)break;g.indexOf(b)>-1?v=b:u.before(b)==k&&g.splice(1,0,-b)}for(var w=g.indexOf(v),x=[],C=c.openStart,T=c.content,P=0;;P++){var A=T.firstChild;if(x.push(A),P==c.openStart)break;T=A.content}for(var N=C-1;N>=0;N--){var R=x[N],I=definesContent(R.type);if(I&&!R.sameMarkup(u.node(Math.abs(v)-1)))C=N;else if(I||!R.type.isTextblock)break}for(var L=c.openStart;L>=0;L--){var z=(L+C+1)%(c.openStart+1),j=x[z];if(j)for(var B=0;B<g.length;B++){var V=g[(B+w)%g.length],U=!0;V<0&&(U=!1,V=-V);var H=u.node(V-1),W=u.index(V-1);if(H.canReplaceWith(W,W,j.type,j.marks))return r.replace(u.before(V),U?p.after(V):i,new a.Slice(closeFragment(c.content,0,c.openStart,z),z,c.openEnd))}}for(var K=r.steps.length,G=g.length-1;G>=0&&(r.replace(o,i,c),!(r.steps.length>K));G--){var J=g[G];J<0||(o=u.before(J),i=p.after(J))}}(this,r,o,i),this}},{key:"replaceRangeWith",value:function replaceRangeWith(r,o,i){return function _replaceRangeWith(r,o,i,c){if(!c.isInline&&o==i&&r.doc.resolve(o).parent.content.size){var u=insertPoint(r.doc,o,c.type);null!=u&&(o=i=u)}r.replaceRange(o,i,new a.Slice(a.Fragment.from(c),0,0))}(this,r,o,i),this}},{key:"deleteRange",value:function deleteRange(r,o){return function _deleteRange(r,o,i){for(var a=r.doc.resolve(o),c=r.doc.resolve(i),u=coveredDepths(a,c),p=0;p<u.length;p++){var g=u[p],v=p==u.length-1;if(v&&0==g||a.node(g).type.contentMatch.validEnd)return r.delete(a.start(g),c.end(g));if(g>0&&(v||a.node(g-1).canReplace(a.index(g-1),c.indexAfter(g-1))))return r.delete(a.before(g),c.after(g))}for(var b=1;b<=a.depth&&b<=c.depth;b++)if(o-a.start(b)==a.depth-b&&i>a.end(b)&&c.end(b)-i!=c.depth-b&&a.start(b-1)==c.start(b-1)&&a.node(b-1).canReplace(a.index(b-1),c.index(b-1)))return r.delete(a.before(b),i);r.delete(o,i)}(this,r,o),this}},{key:"lift",value:function lift(r,o){return function _lift(r,o,i){for(var c=o.$from,u=o.$to,p=o.depth,g=c.before(p+1),v=u.after(p+1),b=g,k=v,E=a.Fragment.empty,w=0,x=p,C=!1;x>i;x--)C||c.index(x)>0?(C=!0,E=a.Fragment.from(c.node(x).copy(E)),w++):b--;for(var _=a.Fragment.empty,P=0,A=p,N=!1;A>i;A--)N||u.after(A+1)<u.end(A)?(N=!0,_=a.Fragment.from(u.node(A).copy(_)),P++):k++;r.step(new T(b,k,g,v,new a.Slice(E.append(_),w,P),E.size-w,!0))}(this,r,o),this}},{key:"join",value:function join(r){return function _join(r,o,i){var c=null,u=r.doc.type.schema.linebreakReplacement,p=r.doc.resolve(o-i),g=p.node().type;if(u&&g.inlineContent){var v="pre"==g.whitespace,b=!!g.contentMatch.matchType(u);v&&!b?c=!1:!v&&b&&(c=!0)}var k=r.steps.length;if(!1===c){var E=r.doc.resolve(o+i);replaceLinebreaks(r,E.node(),E.before(),k)}g.inlineContent&&_clearIncompatible(r,o+i-1,g,p.node().contentMatchAt(p.index()),null==c);var w=r.mapping.slice(k),x=w.map(o-i);if(r.step(new _(x,w.map(o+i,-1),a.Slice.empty,!0)),!0===c){var C=r.doc.resolve(x);replaceNewlines(r,C.node(),C.before(),r.steps.length)}return r}(this,r,arguments.length>1&&void 0!==arguments[1]?arguments[1]:1),this}},{key:"wrap",value:function wrap(r,o){return function _wrap2(r,o,i){for(var c=a.Fragment.empty,u=i.length-1;u>=0;u--){if(c.size){var p=i[u].type.contentMatch.matchFragment(c);if(!p||!p.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}c=a.Fragment.from(i[u].type.create(i[u].attrs,c))}var g=o.start,v=o.end;r.step(new T(g,v,g,v,new a.Slice(c,0,0),i.length,!0))}(this,r,o),this}},{key:"setBlockType",value:function setBlockType(r){return function _setBlockType(r,o,i,c,u){if(!c.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");var p=r.steps.length;r.doc.nodesBetween(o,i,function(o,i){var g="function"==typeof u?u(o):u;if(o.isTextblock&&!o.hasMarkup(c,g)&&function canChangeType(r,o,i){var a=r.resolve(o),c=a.index();return a.parent.canReplaceWith(c,c+1,i)}(r.doc,r.mapping.slice(p).map(i),c)){var v=null;if(c.schema.linebreakReplacement){var b="pre"==c.whitespace,k=!!c.contentMatch.matchType(c.schema.linebreakReplacement);b&&!k?v=!1:!b&&k&&(v=!0)}!1===v&&replaceLinebreaks(r,o,i,p),_clearIncompatible(r,r.mapping.slice(p).map(i,1),c,void 0,null===v);var E=r.mapping.slice(p),w=E.map(i,1),x=E.map(i+o.nodeSize,1);return r.step(new T(w,x,w+1,x-1,new a.Slice(a.Fragment.from(c.create(g,null,o.marks)),0,0),1,!0)),!0===v&&replaceNewlines(r,o,i,p),!1}})}(this,r,arguments.length>1&&void 0!==arguments[1]?arguments[1]:r,arguments.length>2?arguments[2]:void 0,arguments.length>3&&void 0!==arguments[3]?arguments[3]:null),this}},{key:"setNodeMarkup",value:function setNodeMarkup(r,o){return function _setNodeMarkup(r,o,i,c,u){var p=r.doc.nodeAt(o);if(!p)throw new RangeError("No node at given position");i||(i=p.type);var g=i.create(c,null,u||p.marks);if(p.isLeaf)return r.replaceWith(o,o+p.nodeSize,g);if(!i.validContent(p.content))throw new RangeError("Invalid content for node type "+i.name);r.step(new T(o,o+p.nodeSize,o+1,o+p.nodeSize-1,new a.Slice(a.Fragment.from(g),0,0),1,!0))}(this,r,o,arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,arguments.length>3?arguments[3]:void 0),this}},{key:"setNodeAttribute",value:function setNodeAttribute(r,o,i){return this.step(new A(r,o,i)),this}},{key:"setDocAttribute",value:function setDocAttribute(r,o){return this.step(new N(r,o)),this}},{key:"addNodeMark",value:function addNodeMark(r,o){return this.step(new x(r,o)),this}},{key:"removeNodeMark",value:function removeNodeMark(r,o){var i=this.doc.nodeAt(r);if(!i)throw new RangeError("No node at position "+r);if(o instanceof a.Mark)o.isInSet(i.marks)&&this.step(new C(r,o));else{for(var c,u=i.marks,p=[];c=o.isInSet(u);)p.push(new C(r,c)),u=c.removeFromSet(u);for(var g=p.length-1;g>=0;g--)this.step(p[g])}return this}},{key:"split",value:function split(r){return function _split(r,o){for(var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,c=arguments.length>3?arguments[3]:void 0,u=r.doc.resolve(o),p=a.Fragment.empty,g=a.Fragment.empty,v=u.depth,b=u.depth-i,k=i-1;v>b;v--,k--){p=a.Fragment.from(u.node(v).copy(p));var E=c&&c[k];g=a.Fragment.from(E?E.type.create(E.attrs,g):u.node(v).copy(g))}r.step(new _(o,o,new a.Slice(p.append(g),i,i),!0))}(this,r,arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,arguments.length>2?arguments[2]:void 0),this}},{key:"addMark",value:function addMark(r,o,i){return function _addMark(r,o,i,a){var c,u,p=[],g=[];r.doc.nodesBetween(o,i,function(r,v,b){if(r.isInline){var k=r.marks;if(!a.isInSet(k)&&b.type.allowsMarkType(a.type)){for(var x=Math.max(v,o),C=Math.min(v+r.nodeSize,i),_=a.addToSet(k),T=0;T<k.length;T++)k[T].isInSet(_)||(c&&c.to==x&&c.mark.eq(k[T])?c.to=C:p.push(c=new w(x,C,k[T])));u&&u.to==x?u.to=C:g.push(u=new E(x,C,a))}}}),p.forEach(function(o){return r.step(o)}),g.forEach(function(o){return r.step(o)})}(this,r,o,i),this}},{key:"removeMark",value:function removeMark(r,o,i){return function _removeMark(r,o,i,c){var u=[],p=0;r.doc.nodesBetween(o,i,function(r,g){if(r.isInline){p++;var v=null;if(c instanceof a.MarkType)for(var b,k=r.marks;b=c.isInSet(k);)(v||(v=[])).push(b),k=b.removeFromSet(k);else c?c.isInSet(r.marks)&&(v=[c]):v=r.marks;if(v&&v.length)for(var E=Math.min(g+r.nodeSize,i),w=0;w<v.length;w++){for(var x=v[w],C=void 0,_=0;_<u.length;_++){var T=u[_];T.step==p-1&&x.eq(u[_].style)&&(C=T)}C?(C.to=E,C.step=p):u.push({style:x,from:Math.max(g,o),to:E,step:p})}}}),u.forEach(function(o){return r.step(new w(o.from,o.to,o.style))})}(this,r,o,i),this}},{key:"clearIncompatible",value:function clearIncompatible(r,o,i){return _clearIncompatible(this,r,o,i),this}}]),Transform}();o.AddMarkStep=E,o.AddNodeMarkStep=x,o.AttrStep=A,o.DocAttrStep=N,o.MapResult=u,o.Mapping=g,o.RemoveMarkStep=w,o.RemoveNodeMarkStep=C,o.ReplaceAroundStep=T,o.ReplaceStep=_,o.Step=b,o.StepMap=p,o.StepResult=k,o.Transform=R,o.canJoin=function canJoin(r,o){var i=r.resolve(o),a=i.index();return joinable(i.nodeBefore,i.nodeAfter)&&i.parent.canReplace(a,a+1)},o.canSplit=function canSplit(r,o){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=arguments.length>3?arguments[3]:void 0,c=r.resolve(o),u=c.depth-i,p=a&&a[a.length-1]||c.parent;if(u<0||c.parent.type.spec.isolating||!c.parent.canReplace(c.index(),c.parent.childCount)||!p.type.validContent(c.parent.content.cutByIndex(c.index(),c.parent.childCount)))return!1;for(var g=c.depth-1,v=i-2;g>u;g--,v--){var b=c.node(g),k=c.index(g);if(b.type.spec.isolating)return!1;var E=b.content.cutByIndex(k,b.childCount),w=a&&a[v+1];w&&(E=E.replaceChild(0,w.type.create(w.attrs)));var x=a&&a[v]||b;if(!b.canReplace(k+1,b.childCount)||!x.type.validContent(E))return!1}var C=c.indexAfter(u),_=a&&a[0];return c.node(u).canReplaceWith(C,C,_?_.type:c.node(u+1).type)},o.dropPoint=function dropPoint(r,o,i){var a=r.resolve(o);if(!i.content.size)return o;for(var c=i.content,u=0;u<i.openStart;u++)c=c.firstChild.content;for(var p=1;p<=(0==i.openStart&&i.size?2:1);p++)for(var g=a.depth;g>=0;g--){var v=g==a.depth?0:a.pos<=(a.start(g+1)+a.end(g+1))/2?-1:1,b=a.index(g)+(v>0?1:0),k=a.node(g),E=!1;if(1==p)E=k.canReplace(b,b,c);else{var w=k.contentMatchAt(b).findWrapping(c.firstChild.type);E=w&&k.canReplaceWith(b,b,w[0])}if(E)return 0==v?a.pos:v<0?a.before(g+1):a.after(g+1)}return null},o.findWrapping=function findWrapping(r,o){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:r,c=function findWrappingOutside(r,o){var i=r.parent,a=r.startIndex,c=r.endIndex,u=i.contentMatchAt(a).findWrapping(o);if(!u)return null;var p=u.length?u[0]:o;return i.canReplaceWith(a,c,p)?u:null}(r,o),u=c&&function findWrappingInside(r,o){var i=r.parent,a=r.startIndex,c=r.endIndex,u=i.child(a),p=o.contentMatch.findWrapping(u.type);if(!p)return null;for(var g=(p.length?p[p.length-1]:o).contentMatch,v=a;g&&v<c;v++)g=g.matchType(i.child(v).type);return g&&g.validEnd?p:null}(a,o);return u?c.map(withAttrs).concat({type:o,attrs:i}).concat(u.map(withAttrs)):null},o.insertPoint=insertPoint,o.joinPoint=function joinPoint(r,o){for(var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,a=r.resolve(o),c=a.depth;;c--){var u=void 0,p=void 0,g=a.index(c);if(c==a.depth?(u=a.nodeBefore,p=a.nodeAfter):i>0?(u=a.node(c+1),g++,p=a.node(c).maybeChild(g)):(u=a.node(c).maybeChild(g-1),p=a.node(c+1)),u&&!u.isTextblock&&joinable(u,p)&&a.node(c).canReplace(g,g+1))return o;if(0==c)break;o=i<0?a.before(c):a.after(c)}},o.liftTarget=function liftTarget(r){for(var o=r.parent.content.cutByIndex(r.startIndex,r.endIndex),i=r.depth,a=0,c=0;;--i){var u=r.$from.node(i),p=r.$from.index(i)+a,g=r.$to.indexAfter(i)-c;if(i<r.depth&&u.canReplace(p,g,o))return i;if(0==i||u.type.spec.isolating||!canCut(u,p,g))break;p&&(a=1),g<u.childCount&&(c=1)}return null},o.replaceStep=replaceStep},37112:function(r,o,i){"use strict";i.r(o),i.d(o,{Mention:function(){return Oe}});var a=i(97557),c=i.n(a);function _arrayLikeToArray$2(r,o){(null==o||o>r.length)&&(o=r.length);for(var i=0,a=Array(o);i<o;i++)a[i]=r[i];return a}function _unsupportedIterableToArray$2(r,o){if(r){if("string"==typeof r)return _arrayLikeToArray$2(r,o);var i={}.toString.call(r).slice(8,-1);return"Object"===i&&r.constructor&&(i=r.constructor.name),"Map"===i||"Set"===i?Array.from(r):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray$2(r,o):void 0}}function _slicedToArray(r,o){return function _arrayWithHoles(r){if(Array.isArray(r))return r}(r)||function _iterableToArrayLimit(r,o){var i=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=i){var a,c,u,p,g=[],v=!0,b=!1;try{if(u=(i=i.call(r)).next,0===o){if(Object(i)!==i)return;v=!1}else for(;!(v=(a=u.call(i)).done)&&(g.push(a.value),g.length!==o);v=!0);}catch(r){b=!0,c=r}finally{try{if(!v&&null!=i.return&&(p=i.return(),Object(p)!==p))return}finally{if(b)throw c}}return g}}(r,o)||_unsupportedIterableToArray$2(r,o)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _typeof(r){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},_typeof(r)}function classNames(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];if(o){for(var a=[],c=0;c<o.length;c++){var u=o[c];if(u){var p=_typeof(u);if("string"===p||"number"===p)a.push(u);else if("object"===p){var g=Array.isArray(u)?u:Object.entries(u).map(function(r){var o=_slicedToArray(r,2),i=o[0];return o[1]?i:null});a=g.length?a.concat(g.filter(function(r){return!!r})):a}}}return a.join(" ").trim()}}function _toConsumableArray(r){return function _arrayWithoutHoles(r){if(Array.isArray(r))return _arrayLikeToArray$2(r)}(r)||function _iterableToArray(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r)}(r)||_unsupportedIterableToArray$2(r)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _classCallCheck(r,o){if(!(r instanceof o))throw new TypeError("Cannot call a class as a function")}function toPropertyKey(r){var o=function toPrimitive(r,o){if("object"!=_typeof(r)||!r)return r;var i=r[Symbol.toPrimitive];if(void 0!==i){var a=i.call(r,o||"default");if("object"!=_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===o?String:Number)(r)}(r,"string");return"symbol"==_typeof(o)?o:o+""}function _defineProperties(r,o){for(var i=0;i<o.length;i++){var a=o[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(r,toPropertyKey(a.key),a)}}function _createClass(r,o,i){return o&&_defineProperties(r.prototype,o),i&&_defineProperties(r,i),Object.defineProperty(r,"prototype",{writable:!1}),r}function _defineProperty(r,o,i){return(o=toPropertyKey(o))in r?Object.defineProperty(r,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[o]=i,r}function _createForOfIteratorHelper$1(r,o){var i="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(!i){if(Array.isArray(r)||(i=function _unsupportedIterableToArray$1(r,o){if(r){if("string"==typeof r)return _arrayLikeToArray$1(r,o);var i={}.toString.call(r).slice(8,-1);return"Object"===i&&r.constructor&&(i=r.constructor.name),"Map"===i||"Set"===i?Array.from(r):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray$1(r,o):void 0}}(r))||o&&r&&"number"==typeof r.length){i&&(r=i);var a=0,c=function F(){};return{s:c,n:function n(){return a>=r.length?{done:!0}:{done:!1,value:r[a++]}},e:function e(r){throw r},f:c}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u,p=!0,g=!1;return{s:function s(){i=i.call(r)},n:function n(){var r=i.next();return p=r.done,r},e:function e(r){g=!0,u=r},f:function f(){try{p||null==i.return||i.return()}finally{if(g)throw u}}}}function _arrayLikeToArray$1(r,o){(null==o||o>r.length)&&(o=r.length);for(var i=0,a=Array(o);i<o;i++)a[i]=r[i];return a}var u=function(){function DomHandler(){_classCallCheck(this,DomHandler)}return _createClass(DomHandler,null,[{key:"innerWidth",value:function innerWidth(r){if(r){var o=r.offsetWidth,i=getComputedStyle(r);return o+=parseFloat(i.paddingLeft)+parseFloat(i.paddingRight)}return 0}},{key:"width",value:function width(r){if(r){var o=r.offsetWidth,i=getComputedStyle(r);return o-=parseFloat(i.paddingLeft)+parseFloat(i.paddingRight)}return 0}},{key:"getBrowserLanguage",value:function getBrowserLanguage(){return navigator.userLanguage||navigator.languages&&navigator.languages.length&&navigator.languages[0]||navigator.language||navigator.browserLanguage||navigator.systemLanguage||"en"}},{key:"getWindowScrollTop",value:function getWindowScrollTop(){var r=document.documentElement;return(window.pageYOffset||r.scrollTop)-(r.clientTop||0)}},{key:"getWindowScrollLeft",value:function getWindowScrollLeft(){var r=document.documentElement;return(window.pageXOffset||r.scrollLeft)-(r.clientLeft||0)}},{key:"getOuterWidth",value:function getOuterWidth(r,o){if(r){var i=r.getBoundingClientRect().width||r.offsetWidth;if(o){var a=getComputedStyle(r);i+=parseFloat(a.marginLeft)+parseFloat(a.marginRight)}return i}return 0}},{key:"getOuterHeight",value:function getOuterHeight(r,o){if(r){var i=r.getBoundingClientRect().height||r.offsetHeight;if(o){var a=getComputedStyle(r);i+=parseFloat(a.marginTop)+parseFloat(a.marginBottom)}return i}return 0}},{key:"getClientHeight",value:function getClientHeight(r,o){if(r){var i=r.clientHeight;if(o){var a=getComputedStyle(r);i+=parseFloat(a.marginTop)+parseFloat(a.marginBottom)}return i}return 0}},{key:"getClientWidth",value:function getClientWidth(r,o){if(r){var i=r.clientWidth;if(o){var a=getComputedStyle(r);i+=parseFloat(a.marginLeft)+parseFloat(a.marginRight)}return i}return 0}},{key:"getViewport",value:function getViewport(){var r=window,o=document,i=o.documentElement,a=o.getElementsByTagName("body")[0];return{width:r.innerWidth||i.clientWidth||a.clientWidth,height:r.innerHeight||i.clientHeight||a.clientHeight}}},{key:"getOffset",value:function getOffset(r){if(r){var o=r.getBoundingClientRect();return{top:o.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:o.left+(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0)}}return{top:"auto",left:"auto"}}},{key:"index",value:function index(r){if(r)for(var o=r.parentNode.childNodes,i=0,a=0;a<o.length;a++){if(o[a]===r)return i;1===o[a].nodeType&&i++}return-1}},{key:"addMultipleClasses",value:function addMultipleClasses(r,o){if(r&&o)if(r.classList)for(var i=o.split(" "),a=0;a<i.length;a++)r.classList.add(i[a]);else for(var c=o.split(" "),u=0;u<c.length;u++)r.className=r.className+" "+c[u]}},{key:"removeMultipleClasses",value:function removeMultipleClasses(r,o){if(r&&o)if(r.classList)for(var i=o.split(" "),a=0;a<i.length;a++)r.classList.remove(i[a]);else for(var c=o.split(" "),u=0;u<c.length;u++)r.className=r.className.replace(new RegExp("(^|\\b)"+c[u].split(" ").join("|")+"(\\b|$)","gi")," ")}},{key:"addClass",value:function addClass(r,o){r&&o&&(r.classList?r.classList.add(o):r.className=r.className+" "+o)}},{key:"removeClass",value:function removeClass(r,o){r&&o&&(r.classList?r.classList.remove(o):r.className=r.className.replace(new RegExp("(^|\\b)"+o.split(" ").join("|")+"(\\b|$)","gi")," "))}},{key:"hasClass",value:function hasClass(r,o){return!!r&&(r.classList?r.classList.contains(o):new RegExp("(^| )"+o+"( |$)","gi").test(r.className))}},{key:"addStyles",value:function addStyles(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r&&Object.entries(o).forEach(function(o){var i=_slicedToArray(o,2),a=i[0],c=i[1];return r.style[a]=c})}},{key:"find",value:function find(r,o){return r?Array.from(r.querySelectorAll(o)):[]}},{key:"findSingle",value:function findSingle(r,o){return r?r.querySelector(o):null}},{key:"setAttributes",value:function setAttributes(r){var o=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(r){var a=function computedStyles(o,i){var c,u,p=null!=r&&null!==(c=r.$attrs)&&void 0!==c&&c[o]?[null==r||null===(u=r.$attrs)||void 0===u?void 0:u[o]]:[];return[i].flat().reduce(function(r,i){if(null!=i){var c=_typeof(i);if("string"===c||"number"===c)r.push(i);else if("object"===c){var u=Array.isArray(i)?a(o,i):Object.entries(i).map(function(r){var i=_slicedToArray(r,2),a=i[0],c=i[1];return"style"!==o||!c&&0!==c?c?a:void 0:"".concat(a.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),":").concat(c)});r=u.length?r.concat(u.filter(function(r){return!!r})):r}}return r},p)};Object.entries(i).forEach(function(i){var c=_slicedToArray(i,2),u=c[0],p=c[1];if(null!=p){var g=u.match(/^on(.+)/);g?r.addEventListener(g[1].toLowerCase(),p):"p-bind"===u?o.setAttributes(r,p):(p="class"===u?_toConsumableArray(new Set(a("class",p))).join(" ").trim():"style"===u?a("style",p).join(";").trim():p,(r.$attrs=r.$attrs||{})&&(r.$attrs[u]=p),r.setAttribute(u,p))}})}}},{key:"getAttribute",value:function getAttribute(r,o){if(r){var i=r.getAttribute(o);return isNaN(i)?"true"===i||"false"===i?"true"===i:i:+i}}},{key:"isAttributeEquals",value:function isAttributeEquals(r,o,i){return!!r&&this.getAttribute(r,o)===i}},{key:"isAttributeNotEquals",value:function isAttributeNotEquals(r,o,i){return!this.isAttributeEquals(r,o,i)}},{key:"getHeight",value:function getHeight(r){if(r){var o=r.offsetHeight,i=getComputedStyle(r);return o-=parseFloat(i.paddingTop)+parseFloat(i.paddingBottom)+parseFloat(i.borderTopWidth)+parseFloat(i.borderBottomWidth)}return 0}},{key:"getWidth",value:function getWidth(r){if(r){var o=r.offsetWidth,i=getComputedStyle(r);return o-=parseFloat(i.paddingLeft)+parseFloat(i.paddingRight)+parseFloat(i.borderLeftWidth)+parseFloat(i.borderRightWidth)}return 0}},{key:"alignOverlay",value:function alignOverlay(r,o,i){var a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];r&&o&&("self"===i?this.relativePosition(r,o):(a&&(r.style.minWidth=DomHandler.getOuterWidth(o)+"px"),this.absolutePosition(r,o)))}},{key:"absolutePosition",value:function absolutePosition(r,o){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"left";if(r&&o){var a,c,u=r.offsetParent?{width:r.offsetWidth,height:r.offsetHeight}:this.getHiddenElementDimensions(r),p=u.height,g=u.width,v=o.offsetHeight,b=o.offsetWidth,k=o.getBoundingClientRect(),E=this.getWindowScrollTop(),w=this.getWindowScrollLeft(),x=this.getViewport();k.top+v+p>x.height?((a=k.top+E-p)<0&&(a=E),r.style.transformOrigin="bottom"):(a=v+k.top+E,r.style.transformOrigin="top");var C=k.left;c="left"===i?C+g>x.width?Math.max(0,C+w+b-g):C+w:C+b-g<0?w:C+b-g+w,r.style.top=a+"px",r.style.left=c+"px"}}},{key:"relativePosition",value:function relativePosition(r,o){if(r&&o){var i,a,c=r.offsetParent?{width:r.offsetWidth,height:r.offsetHeight}:this.getHiddenElementDimensions(r),u=o.offsetHeight,p=o.getBoundingClientRect(),g=this.getViewport();p.top+u+c.height>g.height?(i=-1*c.height,p.top+i<0&&(i=-1*p.top),r.style.transformOrigin="bottom"):(i=u,r.style.transformOrigin="top"),a=c.width>g.width?-1*p.left:p.left+c.width>g.width?-1*(p.left+c.width-g.width):0,r.style.top=i+"px",r.style.left=a+"px"}}},{key:"flipfitCollision",value:function flipfitCollision(r,o){var i=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"left top",c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"left bottom",u=arguments.length>4?arguments[4]:void 0;if(r&&o){var p=o.getBoundingClientRect(),g=this.getViewport(),v=a.split(" "),b=c.split(" "),k=function getPositionValue(r,o){return o?+r.substring(r.search(/(\+|-)/g))||0:r.substring(0,r.search(/(\+|-)/g))||r},E={my:{x:k(v[0]),y:k(v[1]||v[0]),offsetX:k(v[0],!0),offsetY:k(v[1]||v[0],!0)},at:{x:k(b[0]),y:k(b[1]||b[0]),offsetX:k(b[0],!0),offsetY:k(b[1]||b[0],!0)}},w={left:function left(){return E.my.offsetX+E.at.offsetX+p.left+("left"===E.my.x?0:-1*("center"===E.my.x?i.getOuterWidth(r)/2:i.getOuterWidth(r)))},top:function top(){return E.my.offsetY+E.at.offsetY+p.top+("top"===E.my.y?0:-1*("center"===E.my.y?i.getOuterHeight(r)/2:i.getOuterHeight(r)))}},x={count:{x:0,y:0},left:function left(){var left=w.left(),o=DomHandler.getWindowScrollLeft();r.style.left=left+o+"px",2===this.count.x?(r.style.left=o+"px",this.count.x=0):left<0&&(this.count.x++,E.my.x="left",E.at.x="right",E.my.offsetX*=-1,E.at.offsetX*=-1,this.right())},right:function right(){var i=w.left()+DomHandler.getOuterWidth(o),a=DomHandler.getWindowScrollLeft();r.style.left=i+a+"px",2===this.count.x?(r.style.left=g.width-DomHandler.getOuterWidth(r)+a+"px",this.count.x=0):i+DomHandler.getOuterWidth(r)>g.width&&(this.count.x++,E.my.x="right",E.at.x="left",E.my.offsetX*=-1,E.at.offsetX*=-1,this.left())},top:function top(){var top=w.top(),o=DomHandler.getWindowScrollTop();r.style.top=top+o+"px",2===this.count.y?(r.style.left=o+"px",this.count.y=0):top<0&&(this.count.y++,E.my.y="top",E.at.y="bottom",E.my.offsetY*=-1,E.at.offsetY*=-1,this.bottom())},bottom:function bottom(){var i=w.top()+DomHandler.getOuterHeight(o),a=DomHandler.getWindowScrollTop();r.style.top=i+a+"px",2===this.count.y?(r.style.left=g.height-DomHandler.getOuterHeight(r)+a+"px",this.count.y=0):i+DomHandler.getOuterHeight(o)>g.height&&(this.count.y++,E.my.y="bottom",E.at.y="top",E.my.offsetY*=-1,E.at.offsetY*=-1,this.top())},center:function center(i){if("y"===i){var a=w.top()+DomHandler.getOuterHeight(o)/2;r.style.top=a+DomHandler.getWindowScrollTop()+"px",a<0?this.bottom():a+DomHandler.getOuterHeight(o)>g.height&&this.top()}else{var c=w.left()+DomHandler.getOuterWidth(o)/2;r.style.left=c+DomHandler.getWindowScrollLeft()+"px",c<0?this.left():c+DomHandler.getOuterWidth(r)>g.width&&this.right()}}};x[E.at.x]("x"),x[E.at.y]("y"),this.isFunction(u)&&u(E)}}},{key:"findCollisionPosition",value:function findCollisionPosition(r){if(r){var o="left"===r?"right":"left";return"top"===r||"bottom"===r?{axis:"y",my:"center ".concat("top"===r?"bottom":"top"),at:"center ".concat(r)}:{axis:"x",my:"".concat(o," center"),at:"".concat(r," center")}}}},{key:"getParents",value:function getParents(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return null===r.parentNode?o:this.getParents(r.parentNode,o.concat([r.parentNode]))}},{key:"getScrollableParents",value:function getScrollableParents(r){var o=this,i=[];if(r){var a,c=this.getParents(r),u=/(auto|scroll)/,p=function overflowCheck(r){var o=r?getComputedStyle(r):null;return o&&(u.test(o.getPropertyValue("overflow"))||u.test(o.getPropertyValue("overflow-x"))||u.test(o.getPropertyValue("overflow-y")))},g=function addScrollableParent(r){i.push("BODY"===r.nodeName||"HTML"===r.nodeName||o.isDocument(r)?window:r)},v=_createForOfIteratorHelper$1(c);try{for(v.s();!(a=v.n()).done;){var b,k=a.value,E=1===k.nodeType&&(null===(b=k.dataset)||void 0===b?void 0:b.scrollselectors);if(E){var w,x=_createForOfIteratorHelper$1(E.split(","));try{for(x.s();!(w=x.n()).done;){var C=w.value,_=this.findSingle(k,C);_&&p(_)&&g(_)}}catch(r){x.e(r)}finally{x.f()}}1===k.nodeType&&p(k)&&g(k)}}catch(r){v.e(r)}finally{v.f()}}return i}},{key:"getHiddenElementOuterHeight",value:function getHiddenElementOuterHeight(r){if(r){r.style.visibility="hidden",r.style.display="block";var o=r.offsetHeight;return r.style.display="none",r.style.visibility="visible",o}return 0}},{key:"getHiddenElementOuterWidth",value:function getHiddenElementOuterWidth(r){if(r){r.style.visibility="hidden",r.style.display="block";var o=r.offsetWidth;return r.style.display="none",r.style.visibility="visible",o}return 0}},{key:"getHiddenElementDimensions",value:function getHiddenElementDimensions(r){var o={};return r&&(r.style.visibility="hidden",r.style.display="block",o.width=r.offsetWidth,o.height=r.offsetHeight,r.style.display="none",r.style.visibility="visible"),o}},{key:"fadeIn",value:function fadeIn(r,o){if(r){r.style.opacity=0;var i=+new Date,a=0,c=function tick(){a=+r.style.opacity+((new Date).getTime()-i)/o,r.style.opacity=a,i=+new Date,+a<1&&(window.requestAnimationFrame&&requestAnimationFrame(c)||setTimeout(c,16))};c()}}},{key:"fadeOut",value:function fadeOut(r,o){if(r)var i=1,a=50/o,c=setInterval(function(){(i-=a)<=0&&(i=0,clearInterval(c)),r.style.opacity=i},50)}},{key:"getUserAgent",value:function getUserAgent(){return navigator.userAgent}},{key:"isIOS",value:function isIOS(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream}},{key:"isAndroid",value:function isAndroid(){return/(android)/i.test(navigator.userAgent)}},{key:"isChrome",value:function isChrome(){return/(chrome)/i.test(navigator.userAgent)}},{key:"isClient",value:function isClient(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}},{key:"isTouchDevice",value:function isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0}},{key:"isFunction",value:function isFunction(r){return!!(r&&r.constructor&&r.call&&r.apply)}},{key:"appendChild",value:function appendChild(r,o){if(this.isElement(o))o.appendChild(r);else{if(!o.el||!o.el.nativeElement)throw new Error("Cannot append "+o+" to "+r);o.el.nativeElement.appendChild(r)}}},{key:"removeChild",value:function removeChild(r,o){if(this.isElement(o))o.removeChild(r);else{if(!o.el||!o.el.nativeElement)throw new Error("Cannot remove "+r+" from "+o);o.el.nativeElement.removeChild(r)}}},{key:"isElement",value:function isElement(r){return"object"===("undefined"==typeof HTMLElement?"undefined":_typeof(HTMLElement))?r instanceof HTMLElement:r&&"object"===_typeof(r)&&null!==r&&1===r.nodeType&&"string"==typeof r.nodeName}},{key:"isDocument",value:function isDocument(r){return"object"===("undefined"==typeof Document?"undefined":_typeof(Document))?r instanceof Document:r&&"object"===_typeof(r)&&null!==r&&9===r.nodeType}},{key:"scrollInView",value:function scrollInView(r,o){var i=getComputedStyle(r).getPropertyValue("border-top-width"),a=i?parseFloat(i):0,c=getComputedStyle(r).getPropertyValue("padding-top"),u=c?parseFloat(c):0,p=r.getBoundingClientRect(),g=o.getBoundingClientRect().top+document.body.scrollTop-(p.top+document.body.scrollTop)-a-u,v=r.scrollTop,b=r.clientHeight,k=this.getOuterHeight(o);g<0?r.scrollTop=v+g:g+k>b&&(r.scrollTop=v+g-b+k)}},{key:"clearSelection",value:function clearSelection(){if(window.getSelection)window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().rangeCount>0&&window.getSelection().getRangeAt(0).getClientRects().length>0&&window.getSelection().removeAllRanges();else if(document.selection&&document.selection.empty)try{document.selection.empty()}catch(r){}}},{key:"calculateScrollbarWidth",value:function calculateScrollbarWidth(r){if(r){var o=getComputedStyle(r);return r.offsetWidth-r.clientWidth-parseFloat(o.borderLeftWidth)-parseFloat(o.borderRightWidth)}if(null!=this.calculatedScrollbarWidth)return this.calculatedScrollbarWidth;var i=document.createElement("div");i.className="p-scrollbar-measure",document.body.appendChild(i);var a=i.offsetWidth-i.clientWidth;return document.body.removeChild(i),this.calculatedScrollbarWidth=a,a}},{key:"calculateBodyScrollbarWidth",value:function calculateBodyScrollbarWidth(){return window.innerWidth-document.documentElement.offsetWidth}},{key:"getBrowser",value:function getBrowser(){if(!this.browser){var r=this.resolveUserAgent();this.browser={},r.browser&&(this.browser[r.browser]=!0,this.browser.version=r.version),this.browser.chrome?this.browser.webkit=!0:this.browser.webkit&&(this.browser.safari=!0)}return this.browser}},{key:"resolveUserAgent",value:function resolveUserAgent(){var r=navigator.userAgent.toLowerCase(),o=/(chrome)[ ]([\w.]+)/.exec(r)||/(webkit)[ ]([\w.]+)/.exec(r)||/(opera)(?:.*version|)[ ]([\w.]+)/.exec(r)||/(msie) ([\w.]+)/.exec(r)||r.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(r)||[];return{browser:o[1]||"",version:o[2]||"0"}}},{key:"blockBodyScroll",value:function blockBodyScroll(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"p-overflow-hidden";!!!document.body.style.getPropertyValue("--scrollbar-width")&&document.body.style.setProperty("--scrollbar-width",this.calculateBodyScrollbarWidth()+"px"),this.addClass(document.body,r)}},{key:"unblockBodyScroll",value:function unblockBodyScroll(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"p-overflow-hidden";document.body.style.removeProperty("--scrollbar-width"),this.removeClass(document.body,r)}},{key:"isVisible",value:function isVisible(r){return r&&(0!==r.clientHeight||0!==r.getClientRects().length||"none"!==getComputedStyle(r).display)}},{key:"isExist",value:function isExist(r){return!(null==r||!r.nodeName||!r.parentNode)}},{key:"getFocusableElements",value:function getFocusableElements(r){var o,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",a=[],c=_createForOfIteratorHelper$1(DomHandler.find(r,'button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])'.concat(i,',\n [href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])').concat(i,',\n input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])').concat(i,',\n select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])').concat(i,',\n textarea:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])').concat(i,',\n [tabIndex]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])').concat(i,',\n [contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])').concat(i)));try{for(c.s();!(o=c.n()).done;){var u=o.value;"none"!==getComputedStyle(u).display&&"hidden"!==getComputedStyle(u).visibility&&a.push(u)}}catch(r){c.e(r)}finally{c.f()}return a}},{key:"getFirstFocusableElement",value:function getFirstFocusableElement(r,o){var i=DomHandler.getFocusableElements(r,o);return i.length>0?i[0]:null}},{key:"getLastFocusableElement",value:function getLastFocusableElement(r,o){var i=DomHandler.getFocusableElements(r,o);return i.length>0?i[i.length-1]:null}},{key:"focus",value:function focus(r,o){var i=void 0===o||!o;r&&document.activeElement!==r&&r.focus({preventScroll:i})}},{key:"focusFirstElement",value:function focusFirstElement(r,o){if(r){var i=DomHandler.getFirstFocusableElement(r);return i&&DomHandler.focus(i,o),i}}},{key:"getCursorOffset",value:function getCursorOffset(r,o,i,a){if(r){var c=getComputedStyle(r),u=document.createElement("div");u.style.position="absolute",u.style.top="0px",u.style.left="0px",u.style.visibility="hidden",u.style.pointerEvents="none",u.style.overflow=c.overflow,u.style.width=c.width,u.style.height=c.height,u.style.padding=c.padding,u.style.border=c.border,u.style.overflowWrap=c.overflowWrap,u.style.whiteSpace=c.whiteSpace,u.style.lineHeight=c.lineHeight,u.innerHTML=o.replace(/\r\n|\r|\n/g,"<br />");var p=document.createElement("span");p.textContent=a,u.appendChild(p);var g=document.createTextNode(i);u.appendChild(g),document.body.appendChild(u);var v=p.offsetLeft,b=p.offsetTop,k=p.clientHeight;return document.body.removeChild(u),{left:Math.abs(v-r.scrollLeft),top:Math.abs(b-r.scrollTop)+k}}return{top:"auto",left:"auto"}}},{key:"invokeElementMethod",value:function invokeElementMethod(r,o,i){r[o].apply(r,i)}},{key:"isClickable",value:function isClickable(r){var o=r.nodeName,i=r.parentElement&&r.parentElement.nodeName;return"INPUT"===o||"TEXTAREA"===o||"BUTTON"===o||"A"===o||"INPUT"===i||"TEXTAREA"===i||"BUTTON"===i||"A"===i||this.hasClass(r,"p-button")||this.hasClass(r.parentElement,"p-button")||this.hasClass(r.parentElement,"p-checkbox")||this.hasClass(r.parentElement,"p-radiobutton")}},{key:"applyStyle",value:function applyStyle(r,o){if("string"==typeof o)r.style.cssText=o;else for(var i in o)r.style[i]=o[i]}},{key:"exportCSV",value:function exportCSV(r,o){var i=new Blob([r],{type:"application/csv;charset=utf-8;"});window.navigator.msSaveOrOpenBlob?navigator.msSaveOrOpenBlob(i,o+".csv"):DomHandler.saveAs({name:o+".csv",src:URL.createObjectURL(i)})||(r="data:text/csv;charset=utf-8,"+r,window.open(encodeURI(r)))}},{key:"saveAs",value:function saveAs(r){if(r){var o=document.createElement("a");if(void 0!==o.download){var i=r.name,a=r.src;return o.setAttribute("href",a),o.setAttribute("download",i),o.style.display="none",document.body.appendChild(o),o.click(),document.body.removeChild(o),!0}}return!1}},{key:"createInlineStyle",value:function createInlineStyle(r,o){var i=document.createElement("style");return DomHandler.addNonce(i,r),o||(o=document.head),o.appendChild(i),i}},{key:"removeInlineStyle",value:function removeInlineStyle(r){if(this.isExist(r)){try{r.parentNode.removeChild(r)}catch(r){}r=null}return r}},{key:"addNonce",value:function addNonce(r,o){try{o||(o=process.env.REACT_APP_CSS_NONCE)}catch(r){}o&&r.setAttribute("nonce",o)}},{key:"getTargetElement",value:function getTargetElement(r){if(!r)return null;if("document"===r)return document;if("window"===r)return window;if("object"===_typeof(r)&&r.hasOwnProperty("current"))return this.isExist(r.current)?r.current:null;var o=function isFunction(r){return!!(r&&r.constructor&&r.call&&r.apply)}(r)?r():r;return this.isDocument(o)||this.isExist(o)?o:null}},{key:"getAttributeNames",value:function getAttributeNames(r){var o,i,a;for(i=[],a=r.attributes,o=0;o<a.length;++o)i.push(a[o].nodeName);return i.sort(),i}},{key:"isEqualElement",value:function isEqualElement(r,o){var i,a,c,u,p;if(i=DomHandler.getAttributeNames(r),a=DomHandler.getAttributeNames(o),i.join(",")!==a.join(","))return!1;for(var g=0;g<i.length;++g)if("style"===(c=i[g]))for(var v=r.style,b=o.style,k=/^\d+$/,E=0,w=Object.keys(v);E<w.length;E++){var x=w[E];if(!k.test(x)&&v[x]!==b[x])return!1}else if(r.getAttribute(c)!==o.getAttribute(c))return!1;for(u=r.firstChild,p=o.firstChild;u&&p;u=u.nextSibling,p=p.nextSibling){if(u.nodeType!==p.nodeType)return!1;if(1===u.nodeType){if(!DomHandler.isEqualElement(u,p))return!1}else if(u.nodeValue!==p.nodeValue)return!1}return!u&&!p}},{key:"hasCSSAnimation",value:function hasCSSAnimation(r){if(r){var o=getComputedStyle(r);return parseFloat(o.getPropertyValue("animation-duration")||"0")>0}return!1}},{key:"hasCSSTransition",value:function hasCSSTransition(r){if(r){var o=getComputedStyle(r);return parseFloat(o.getPropertyValue("transition-duration")||"0")>0}return!1}}])}();function _createForOfIteratorHelper(r,o){var i="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(!i){if(Array.isArray(r)||(i=function _unsupportedIterableToArray(r,o){if(r){if("string"==typeof r)return _arrayLikeToArray(r,o);var i={}.toString.call(r).slice(8,-1);return"Object"===i&&r.constructor&&(i=r.constructor.name),"Map"===i||"Set"===i?Array.from(r):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(r,o):void 0}}(r))||o&&r&&"number"==typeof r.length){i&&(r=i);var a=0,c=function F(){};return{s:c,n:function n(){return a>=r.length?{done:!0}:{done:!1,value:r[a++]}},e:function e(r){throw r},f:c}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u,p=!0,g=!1;return{s:function s(){i=i.call(r)},n:function n(){var r=i.next();return p=r.done,r},e:function e(r){g=!0,u=r},f:function f(){try{p||null==i.return||i.return()}finally{if(g)throw u}}}}function _arrayLikeToArray(r,o){(null==o||o>r.length)&&(o=r.length);for(var i=0,a=Array(o);i<o;i++)a[i]=r[i];return a}_defineProperty(u,"DATA_PROPS",["data-"]),_defineProperty(u,"ARIA_PROPS",["aria","focus-target"]);var p=function(){function ObjectUtils(){_classCallCheck(this,ObjectUtils)}return _createClass(ObjectUtils,null,[{key:"equals",value:function equals(r,o,i){return i&&r&&"object"===_typeof(r)&&o&&"object"===_typeof(o)?this.deepEquals(this.resolveFieldData(r,i),this.resolveFieldData(o,i)):this.deepEquals(r,o)}},{key:"deepEquals",value:function deepEquals(r,o){if(r===o)return!0;if(r&&o&&"object"===_typeof(r)&&"object"===_typeof(o)){var i,a,c,u=Array.isArray(r),p=Array.isArray(o);if(u&&p){if((a=r.length)!==o.length)return!1;for(i=a;0!==i--;)if(!this.deepEquals(r[i],o[i]))return!1;return!0}if(u!==p)return!1;var g=r instanceof Date,v=o instanceof Date;if(g!==v)return!1;if(g&&v)return r.getTime()===o.getTime();var b=r instanceof RegExp,k=o instanceof RegExp;if(b!==k)return!1;if(b&&k)return r.toString()===o.toString();var E=Object.keys(r);if((a=E.length)!==Object.keys(o).length)return!1;for(i=a;0!==i--;)if(!Object.prototype.hasOwnProperty.call(o,E[i]))return!1;for(i=a;0!==i--;)if(c=E[i],!this.deepEquals(r[c],o[c]))return!1;return!0}return r!=r&&o!=o}},{key:"resolveFieldData",value:function resolveFieldData(r,o){if(!r||!o)return null;try{var i=r[o];if(this.isNotEmpty(i))return i}catch(r){}if(Object.keys(r).length){if(this.isFunction(o))return o(r);if(this.isNotEmpty(r[o]))return r[o];if(-1===o.indexOf("."))return r[o];for(var a=o.split("."),c=r,u=0,p=a.length;u<p;++u){if(null==c)return null;c=c[a[u]]}return c}return null}},{key:"findDiffKeys",value:function findDiffKeys(r,o){return r&&o?Object.keys(r).filter(function(r){return!o.hasOwnProperty(r)}).reduce(function(o,i){return o[i]=r[i],o},{}):{}}},{key:"reduceKeys",value:function reduceKeys(r,o){var i={};return r&&o&&0!==o.length?(Object.keys(r).filter(function(r){return o.some(function(o){return r.startsWith(o)})}).forEach(function(o){i[o]=r[o],delete r[o]}),i):i}},{key:"reorderArray",value:function reorderArray(r,o,i){r&&o!==i&&(i>=r.length&&(i%=r.length,o%=r.length),r.splice(i,0,r.splice(o,1)[0]))}},{key:"findIndexInList",value:function findIndexInList(r,o,i){var a=this;return o?i?o.findIndex(function(o){return a.equals(o,r,i)}):o.findIndex(function(o){return o===r}):-1}},{key:"getJSXElement",value:function getJSXElement(r){for(var o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];return this.isFunction(r)?r.apply(void 0,i):r}},{key:"getItemValue",value:function getItemValue(r){for(var o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];return this.isFunction(r)?r.apply(void 0,i):r}},{key:"getProp",value:function getProp(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=r?r[o]:void 0;return void 0===a?i[o]:a}},{key:"getPropCaseInsensitive",value:function getPropCaseInsensitive(r,o){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=this.toFlatCase(o);for(var c in r)if(r.hasOwnProperty(c)&&this.toFlatCase(c)===a)return r[c];for(var u in i)if(i.hasOwnProperty(u)&&this.toFlatCase(u)===a)return i[u]}},{key:"getMergedProps",value:function getMergedProps(r,o){return Object.assign({},o,r)}},{key:"getDiffProps",value:function getDiffProps(r,o){return this.findDiffKeys(r,o)}},{key:"getPropValue",value:function getPropValue(r){if(!this.isFunction(r))return r;for(var o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];if(1===i.length){var c=i[0];return r(Array.isArray(c)?c[0]:c)}return r.apply(void 0,i)}},{key:"getComponentProp",value:function getComponentProp(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.isNotEmpty(r)?this.getProp(r.props,o,i):void 0}},{key:"getComponentProps",value:function getComponentProps(r,o){return this.isNotEmpty(r)?this.getMergedProps(r.props,o):void 0}},{key:"getComponentDiffProps",value:function getComponentDiffProps(r,o){return this.isNotEmpty(r)?this.getDiffProps(r.props,o):void 0}},{key:"isValidChild",value:function isValidChild(r,o,i){if(r){var a,c=this.getComponentProp(r,"__TYPE")||(r.type?r.type.displayName:void 0);!c&&null!=r&&null!==(a=r.type)&&void 0!==a&&null!==(a=a._payload)&&void 0!==a&&a.value&&(c=r.type._payload.value.find(function(r){return r===o}));var u=c===o;try{0}catch(r){}return u}return!1}},{key:"getRefElement",value:function getRefElement(r){return r?"object"===_typeof(r)&&r.hasOwnProperty("current")?r.current:r:null}},{key:"combinedRefs",value:function combinedRefs(r,o){r&&o&&("function"==typeof o?o(r.current):o.current=r.current)}},{key:"removeAccents",value:function removeAccents(r){return r&&r.search(/[\xC0-\xFF]/g)>-1&&(r=r.replace(/[\xC0-\xC5]/g,"A").replace(/[\xC6]/g,"AE").replace(/[\xC7]/g,"C").replace(/[\xC8-\xCB]/g,"E").replace(/[\xCC-\xCF]/g,"I").replace(/[\xD0]/g,"D").replace(/[\xD1]/g,"N").replace(/[\xD2-\xD6\xD8]/g,"O").replace(/[\xD9-\xDC]/g,"U").replace(/[\xDD]/g,"Y").replace(/[\xDE]/g,"P").replace(/[\xE0-\xE5]/g,"a").replace(/[\xE6]/g,"ae").replace(/[\xE7]/g,"c").replace(/[\xE8-\xEB]/g,"e").replace(/[\xEC-\xEF]/g,"i").replace(/[\xF1]/g,"n").replace(/[\xF2-\xF6\xF8]/g,"o").replace(/[\xF9-\xFC]/g,"u").replace(/[\xFE]/g,"p").replace(/[\xFD\xFF]/g,"y")),r}},{key:"toFlatCase",value:function toFlatCase(r){return this.isNotEmpty(r)&&this.isString(r)?r.replace(/(-|_)/g,"").toLowerCase():r}},{key:"toCapitalCase",value:function toCapitalCase(r){return this.isNotEmpty(r)&&this.isString(r)?r[0].toUpperCase()+r.slice(1):r}},{key:"trim",value:function trim(r){return this.isNotEmpty(r)&&this.isString(r)?r.trim():r}},{key:"isEmpty",value:function isEmpty(r){return null==r||""===r||Array.isArray(r)&&0===r.length||!(r instanceof Date)&&"object"===_typeof(r)&&0===Object.keys(r).length}},{key:"isNotEmpty",value:function isNotEmpty(r){return!this.isEmpty(r)}},{key:"isFunction",value:function isFunction(r){return!!(r&&r.constructor&&r.call&&r.apply)}},{key:"isObject",value:function isObject(r){return null!==r&&r instanceof Object&&r.constructor===Object}},{key:"isDate",value:function isDate(r){return null!==r&&r instanceof Date&&r.constructor===Date}},{key:"isArray",value:function isArray(r){return null!==r&&Array.isArray(r)}},{key:"isString",value:function isString(r){return null!==r&&"string"==typeof r}},{key:"isPrintableCharacter",value:function isPrintableCharacter(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.isNotEmpty(r)&&1===r.length&&r.match(/\S| /)}},{key:"isLetter",value:function isLetter(r){return/^[a-zA-Z\u00C0-\u017F]$/.test(r)}},{key:"isScalar",value:function isScalar(r){return null!=r&&("string"==typeof r||"number"==typeof r||"bigint"==typeof r||"boolean"==typeof r)}},{key:"findLast",value:function findLast(r,o){var i;if(this.isNotEmpty(r))try{i=r.findLast(o)}catch(a){i=_toConsumableArray(r).reverse().find(o)}return i}},{key:"findLastIndex",value:function findLastIndex(r,o){var i=-1;if(this.isNotEmpty(r))try{i=r.findLastIndex(o)}catch(a){i=r.lastIndexOf(_toConsumableArray(r).reverse().find(o))}return i}},{key:"sort",value:function sort(r,o){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=arguments.length>3?arguments[3]:void 0,c=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,u=this.compare(r,o,a,i),p=i;return(this.isEmpty(r)||this.isEmpty(o))&&(p=1===c?i:c),p*u}},{key:"compare",value:function compare(r,o,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,c=this.isEmpty(r),u=this.isEmpty(o);return c&&u?0:c?a:u?-a:"string"==typeof r&&"string"==typeof o?i(r,o):r<o?-1:r>o?1:0}},{key:"localeComparator",value:function localeComparator(r){return new Intl.Collator(r,{numeric:!0}).compare}},{key:"findChildrenByKey",value:function findChildrenByKey(r,o){var i,a=_createForOfIteratorHelper(r);try{for(a.s();!(i=a.n()).done;){var c=i.value;if(c.key===o)return c.children||[];if(c.children){var u=this.findChildrenByKey(c.children,o);if(u.length>0)return u}}}catch(r){a.e(r)}finally{a.f()}return[]}},{key:"mutateFieldData",value:function mutateFieldData(r,o,i){if("object"===_typeof(r)&&"string"==typeof o)for(var a=o.split("."),c=r,u=0,p=a.length;u<p;++u){if(u+1-p===0){c[a[u]]=i;break}c[a[u]]||(c[a[u]]={}),c=c[a[u]]}}},{key:"getNestedValue",value:function getNestedValue(r,o){return o.split(".").reduce(function(r,o){return r&&void 0!==r[o]?r[o]:void 0},r)}},{key:"absoluteCompare",value:function absoluteCompare(r,o){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if(!r||!o)return!0;if(a>i)return!0;if(_typeof(r)!==_typeof(o))return!1;var c=Object.keys(r),u=Object.keys(o);if(c.length!==u.length)return!1;for(var p=0,g=c;p<g.length;p++){var v=g[p],b=r[v],k=o[v],E=ObjectUtils.isObject(b)&&ObjectUtils.isObject(k),w=ObjectUtils.isFunction(b)&&ObjectUtils.isFunction(k);if((E||w)&&!this.absoluteCompare(b,k,i,a+1))return!1;if(!E&&b!==k)return!1}return!0}},{key:"selectiveCompare",value:function selectiveCompare(r,o,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;if(r===o)return!0;if(!r||!o||"object"!==_typeof(r)||"object"!==_typeof(o))return!1;if(!i)return this.absoluteCompare(r,o,1);var c,u=_createForOfIteratorHelper(i);try{for(u.s();!(c=u.n()).done;){var p=c.value,g=this.getNestedValue(r,p),v=this.getNestedValue(o,p),b="object"===_typeof(g)&&null!==g&&"object"===_typeof(v)&&null!==v;if(b&&!this.absoluteCompare(g,v,a))return!1;if(!b&&g!==v)return!1}}catch(r){u.e(r)}finally{u.f()}return!0}}])}(),g=0;function UniqueComponentId(){return g++,"".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"pr_id_").concat(g)}function ownKeys(r,o){var i=Object.keys(r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);o&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(r,o).enumerable})),i.push.apply(i,a)}return i}function _objectSpread(r){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?ownKeys(Object(i),!0).forEach(function(o){_defineProperty(r,o,i[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):ownKeys(Object(i)).forEach(function(o){Object.defineProperty(r,o,Object.getOwnPropertyDescriptor(i,o))})}return r}function mergeProps(r){if(r){var o=function isFunction(r){return"function"==typeof r},i=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).classNameMergeFunction,a=o(i);return r.reduce(function(r,c){if(!c)return r;var u=function _loop(){var u=c[p];if("style"===p)r.style=_objectSpread(_objectSpread({},r.style),c.style);else if("className"===p){var g="";g=a?i(r.className,c.className):[r.className,c.className].join(" ").trim(),r.className=g||void 0}else if(o(u)){var v=r[p];r[p]=v?function(){v.apply(void 0,arguments),u.apply(void 0,arguments)}:u}else r[p]=u};for(var p in c)u();return r},{})}}var v=function handler(){var r=[],o=function getLastZIndex(o,i){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return _toConsumableArray(r).reverse().find(function(r){return!!i||r.key===o})||{key:o,value:a}};return{get:function getZIndex(r){return r&&parseInt(r.style.zIndex,10)||0},set:function set(i,a,c,u){a&&(a.style.zIndex=String(function generateZIndex(i,a){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:999,u=o(i,a,c),p=u.value+(u.key===i?0:c)+1;return r.push({key:i,value:p}),p}(i,c,u)))},clear:function clear(o){o&&(!function revertZIndex(o){r=r.filter(function(r){return r.value!==o})}(v.get(o)),o.style.zIndex="")},getCurrent:function getCurrent(r,i){return function getCurrentZIndex(r,i){return o(r,i).value}(r,i)}}}(),b=Object.freeze({STARTS_WITH:"startsWith",CONTAINS:"contains",NOT_CONTAINS:"notContains",ENDS_WITH:"endsWith",EQUALS:"equals",NOT_EQUALS:"notEquals",IN:"in",NOT_IN:"notIn",LESS_THAN:"lt",LESS_THAN_OR_EQUAL_TO:"lte",GREATER_THAN:"gt",GREATER_THAN_OR_EQUAL_TO:"gte",BETWEEN:"between",DATE_IS:"dateIs",DATE_IS_NOT:"dateIsNot",DATE_BEFORE:"dateBefore",DATE_AFTER:"dateAfter",CUSTOM:"custom"});Object.freeze({AND:"and",OR:"or"});function api_esm_typeof(r){return api_esm_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},api_esm_typeof(r)}function api_esm_toPropertyKey(r){var o=function api_esm_toPrimitive(r,o){if("object"!=api_esm_typeof(r)||!r)return r;var i=r[Symbol.toPrimitive];if(void 0!==i){var a=i.call(r,o||"default");if("object"!=api_esm_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===o?String:Number)(r)}(r,"string");return"symbol"==api_esm_typeof(o)?o:o+""}function api_esm_defineProperty(r,o,i){return(o=api_esm_toPropertyKey(o))in r?Object.defineProperty(r,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[o]=i,r}function api_esm_defineProperties(r,o){for(var i=0;i<o.length;i++){var a=o[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(r,api_esm_toPropertyKey(a.key),a)}}function api_esm_createClass(r,o,i){return o&&api_esm_defineProperties(r.prototype,o),i&&api_esm_defineProperties(r,i),Object.defineProperty(r,"prototype",{writable:!1}),r}var k=api_esm_createClass(function PrimeReact(){!function api_esm_classCallCheck(r,o){if(!(r instanceof o))throw new TypeError("Cannot call a class as a function")}(this,PrimeReact)});api_esm_defineProperty(k,"ripple",!1),api_esm_defineProperty(k,"inputStyle","outlined"),api_esm_defineProperty(k,"locale","en"),api_esm_defineProperty(k,"appendTo",null),api_esm_defineProperty(k,"cssTransition",!0),api_esm_defineProperty(k,"autoZIndex",!0),api_esm_defineProperty(k,"hideOverlaysOnDocumentScrolling",!1),api_esm_defineProperty(k,"nonce",null),api_esm_defineProperty(k,"nullSortOrder",1),api_esm_defineProperty(k,"zIndex",{modal:1100,overlay:1e3,menu:1e3,tooltip:1100,toast:1200}),api_esm_defineProperty(k,"pt",void 0),api_esm_defineProperty(k,"filterMatchModeOptions",{text:[b.STARTS_WITH,b.CONTAINS,b.NOT_CONTAINS,b.ENDS_WITH,b.EQUALS,b.NOT_EQUALS],numeric:[b.EQUALS,b.NOT_EQUALS,b.LESS_THAN,b.LESS_THAN_OR_EQUAL_TO,b.GREATER_THAN,b.GREATER_THAN_OR_EQUAL_TO],date:[b.DATE_IS,b.DATE_IS_NOT,b.DATE_BEFORE,b.DATE_AFTER]}),api_esm_defineProperty(k,"changeTheme",function(r,o,i,a){var c,u=document.getElementById(i);if(!u)throw Error("Element with id ".concat(i," not found."));var p=u.getAttribute("href").replace(r,o),g=document.createElement("link");g.setAttribute("rel","stylesheet"),g.setAttribute("id",i),g.setAttribute("href",p),g.addEventListener("load",function(){a&&a()}),null===(c=u.parentNode)||void 0===c||c.replaceChild(g,u)});Object.freeze({SUCCESS:"success",INFO:"info",WARN:"warn",ERROR:"error",SECONDARY:"secondary",CONTRAST:"contrast"}),Object.freeze({ADDRESS_BOOK:"pi pi-address-book",ALIGN_CENTER:"pi pi-align-center",ALIGN_JUSTIFY:"pi pi-align-justify",ALIGN_LEFT:"pi pi-align-left",ALIGN_RIGHT:"pi pi-align-right",AMAZON:"pi pi-amazon",ANDROID:"pi pi-android",ANGLE_DOUBLE_DOWN:"pi pi-angle-double-down",ANGLE_DOUBLE_LEFT:"pi pi-angle-double-left",ANGLE_DOUBLE_RIGHT:"pi pi-angle-double-right",ANGLE_DOUBLE_UP:"pi pi-angle-double-up",ANGLE_DOWN:"pi pi-angle-down",ANGLE_LEFT:"pi pi-angle-left",ANGLE_RIGHT:"pi pi-angle-right",ANGLE_UP:"pi pi-angle-up",APPLE:"pi pi-apple",ARROW_CIRCLE_DOWN:"pi pi-arrow-circle-down",ARROW_CIRCLE_LEFT:"pi pi-arrow-circle-left",ARROW_CIRCLE_RIGHT:"pi pi-arrow-circle-right",ARROW_CIRCLE_UP:"pi pi-arrow-circle-up",ARROW_DOWN_LEFT_AND_ARROW_UP_RIGHT_TO_CENTER:"pi pi-arrow-down-left-and-arrow-up-right-to-center",ARROW_DOWN_LEFT:"pi pi-arrow-down-left",ARROW_DOWN_RIGHT:"pi pi-arrow-down-right",ARROW_DOWN:"pi pi-arrow-down",ARROW_LEFT:"pi pi-arrow-left",ARROW_RIGHT_ARROW_LEFT:"pi pi-arrow-right-arrow-left",ARROW_RIGHT:"pi pi-arrow-right",ARROW_UP_LEFT:"pi pi-arrow-up-left",ARROW_UP_RIGHT_AND_ARROW_DOWN_LEFT_FROM_CENTER:"pi pi-arrow-up-right-and-arrow-down-left-from-center",ARROW_UP_RIGHT:"pi pi-arrow-up-right",ARROW_UP:"pi pi-arrow-up",ARROWS_ALT:"pi pi-arrows-alt",ARROWS_H:"pi pi-arrows-h",ARROWS_V:"pi pi-arrows-v",ASTERISK:"pi pi-asterisk",AT:"pi pi-at",BACKWARD:"pi pi-backward",BAN:"pi pi-ban",BARCODE:"pi pi-barcode",BARS:"pi pi-bars",BELL_SLASH:"pi pi-bell-slash",BELL:"pi pi-bell",BITCOIN:"pi pi-bitcoin",BOLT:"pi pi-bolt",BOOK:"pi pi-book",BOOKMARK_FILL:"pi pi-bookmark-fill",BOOKMARK:"pi pi-bookmark",BOX:"pi pi-box",BRIEFCASE:"pi pi-briefcase",BUILDING_COLUMNS:"pi pi-building-columns",BUILDING:"pi pi-building",BULLSEYE:"pi pi-bullseye",CALCULATOR:"pi pi-calculator",CALENDAR_CLOCK:"pi pi-calendar-clock",CALENDAR_MINUS:"pi pi-calendar-minus",CALENDAR_PLUS:"pi pi-calendar-plus",CALENDAR_TIMES:"pi pi-calendar-times",CALENDAR:"pi pi-calendar",CAMERA:"pi pi-camera",CAR:"pi pi-car",CARET_DOWN:"pi pi-caret-down",CARET_LEFT:"pi pi-caret-left",CARET_RIGHT:"pi pi-caret-right",CARET_UP:"pi pi-caret-up",CART_ARROW_DOWN:"pi pi-cart-arrow-down",CART_MINUS:"pi pi-cart-minus",CART_PLUS:"pi pi-cart-plus",CHART_BAR:"pi pi-chart-bar",CHART_LINE:"pi pi-chart-line",CHART_PIE:"pi pi-chart-pie",CHART_SCATTER:"pi pi-chart-scatter",CHECK_CIRCLE:"pi pi-check-circle",CHECK_SQUARE:"pi pi-check-square",CHECK:"pi pi-check",CHEVRON_CIRCLE_DOWN:"pi pi-chevron-circle-down",CHEVRON_CIRCLE_LEFT:"pi pi-chevron-circle-left",CHEVRON_CIRCLE_RIGHT:"pi pi-chevron-circle-right",CHEVRON_CIRCLE_UP:"pi pi-chevron-circle-up",CHEVRON_DOWN:"pi pi-chevron-down",CHEVRON_LEFT:"pi pi-chevron-left",CHEVRON_RIGHT:"pi pi-chevron-right",CHEVRON_UP:"pi pi-chevron-up",CIRCLE_FILL:"pi pi-circle-fill",CIRCLE_OFF:"pi pi-circle-off",CIRCLE_ON:"pi pi-circle-on",CIRCLE:"pi pi-circle",CLIPBOARD:"pi pi-clipboard",CLOCK:"pi pi-clock",CLONE:"pi pi-clone",CLOUD_DOWNLOAD:"pi pi-cloud-download",CLOUD_UPLOAD:"pi pi-cloud-upload",CLOUD:"pi pi-cloud",CODE:"pi pi-code",COG:"pi pi-cog",COMMENT:"pi pi-comment",COMMENTS:"pi pi-comments",COMPASS:"pi pi-compass",COPY:"pi pi-copy",CREDIT_CARD:"pi pi-credit-card",CROWN:"pi pi-crown",DATABASE:"pi pi-database",DELETE_LEFT:"pi pi-delete-left",DESKTOP:"pi pi-desktop",DIRECTIONS_ALT:"pi pi-directions-alt",DIRECTIONS:"pi pi-directions",DISCORD:"pi pi-discord",DOLLAR:"pi pi-dollar",DOWNLOAD:"pi pi-download",EJECT:"pi pi-eject",ELLIPSIS_H:"pi pi-ellipsis-h",ELLIPSIS_V:"pi pi-ellipsis-v",ENVELOPE:"pi pi-envelope",EQUALS:"pi pi-equals",ERASER:"pi pi-eraser",ETHEREUM:"pi pi-ethereum",EURO:"pi pi-euro",EXCLAMATION_CIRCLE:"pi pi-exclamation-circle",EXCLAMATION_TRIANGLE:"pi pi-exclamation-triangle",EXPAND:"pi pi-expand",EXTERNAL_LINK:"pi pi-external-link",EYE_SLASH:"pi pi-eye-slash",EYE:"pi pi-eye",FACE_SMILE:"pi pi-face-smile",FACEBOOK:"pi pi-facebook",FAST_BACKWARD:"pi pi-fast-backward",FAST_FORWARD:"pi pi-fast-forward",FILE_ARROW_UP:"pi pi-file-arrow-up",FILE_CHECK:"pi pi-file-check",FILE_EDIT:"pi pi-file-edit",FILE_EXCEL:"pi pi-file-excel",FILE_EXPORT:"pi pi-file-export",FILE_IMPORT:"pi pi-file-import",FILE_O:"pi pi-file-o",FILE_PDF:"pi pi-file-pdf",FILE_PLUS:"pi pi-file-plus",FILE_WORD:"pi pi-file-word",FILE:"pi pi-file",FILTER_FILL:"pi pi-filter-fill",FILTER_SLASH:"pi pi-filter-slash",FILTER:"pi pi-filter",FLAG_FILL:"pi pi-flag-fill",FLAG:"pi pi-flag",FOLDER_OPEN:"pi pi-folder-open",FOLDER_PLUS:"pi pi-folder-plus",FOLDER:"pi pi-folder",FORWARD:"pi pi-forward",GAUGE:"pi pi-gauge",GIFT:"pi pi-gift",GITHUB:"pi pi-github",GLOBE:"pi pi-globe",GOOGLE:"pi pi-google",GRADUATION_CAP:"pi pi-graduation-cap",HAMMER:"pi pi-hammer",HASHTAG:"pi pi-hashtag",HEADPHONES:"pi pi-headphones",HEART_FILL:"pi pi-heart-fill",HEART:"pi pi-heart",HISTORY:"pi pi-history",HOME:"pi pi-home",HOURGLASS:"pi pi-hourglass",ID_CARD:"pi pi-id-card",IMAGE:"pi pi-image",IMAGES:"pi pi-images",INBOX:"pi pi-inbox",INDIAN_RUPEE:"pi pi-indian-rupee",INFO_CIRCLE:"pi pi-info-circle",INFO:"pi pi-info",INSTAGRAM:"pi pi-instagram",KEY:"pi pi-key",LANGUAGE:"pi pi-language",LIGHTBULB:"pi pi-lightbulb",LINK:"pi pi-link",LINKEDIN:"pi pi-linkedin",LIST_CHECK:"pi pi-list-check",LIST:"pi pi-list",LOCK_OPEN:"pi pi-lock-open",LOCK:"pi pi-lock",MAP_MARKER:"pi pi-map-marker",MAP:"pi pi-map",MARS:"pi pi-mars",MEGAPHONE:"pi pi-megaphone",MICROCHIP_AI:"pi pi-microchip-ai",MICROCHIP:"pi pi-microchip",MICROPHONE:"pi pi-microphone",MICROSOFT:"pi pi-microsoft",MINUS_CIRCLE:"pi pi-minus-circle",MINUS:"pi pi-minus",MOBILE:"pi pi-mobile",MONEY_BILL:"pi pi-money-bill",MOON:"pi pi-moon",OBJECTS_COLUMN:"pi pi-objects-column",PALETTE:"pi pi-palette",PAPERCLIP:"pi pi-paperclip",PAUSE_CIRCLE:"pi pi-pause-circle",PAUSE:"pi pi-pause",PAYPAL:"pi pi-paypal",PEN_TO_SQUARE:"pi pi-pen-to-square",PENCIL:"pi pi-pencil",PERCENTAGE:"pi pi-percentage",PHONE:"pi pi-phone",PINTEREST:"pi pi-pinterest",PLAY_CIRCLE:"pi pi-play-circle",PLAY:"pi pi-play",PLUS_CIRCLE:"pi pi-plus-circle",PLUS:"pi pi-plus",POUND:"pi pi-pound",POWER_OFF:"pi pi-power-off",PRIME:"pi pi-prime",PRINT:"pi pi-print",QRCODE:"pi pi-qrcode",QUESTION_CIRCLE:"pi pi-question-circle",QUESTION:"pi pi-question",RECEIPT:"pi pi-receipt",REDDIT:"pi pi-reddit",REFRESH:"pi pi-refresh",REPLAY:"pi pi-replay",REPLY:"pi pi-reply",SAVE:"pi pi-save",SEARCH_MINUS:"pi pi-search-minus",SEARCH_PLUS:"pi pi-search-plus",SEARCH:"pi pi-search",SEND:"pi pi-send",SERVER:"pi pi-server",SHARE_ALT:"pi pi-share-alt",SHIELD:"pi pi-shield",SHOP:"pi pi-shop",SHOPPING_BAG:"pi pi-shopping-bag",SHOPPING_CART:"pi pi-shopping-cart",SIGN_IN:"pi pi-sign-in",SIGN_OUT:"pi pi-sign-out",SITEMAP:"pi pi-sitemap",SLACK:"pi pi-slack",SLIDERS_H:"pi pi-sliders-h",SLIDERS_V:"pi pi-sliders-v",SORT_ALPHA_DOWN_ALT:"pi pi-sort-alpha-down-alt",SORT_ALPHA_DOWN:"pi pi-sort-alpha-down",SORT_ALPHA_UP_ALT:"pi pi-sort-alpha-up-alt",SORT_ALPHA_UP:"pi pi-sort-alpha-up",SORT_ALT_SLASH:"pi pi-sort-alt-slash",SORT_ALT:"pi pi-sort-alt",SORT_AMOUNT_DOWN_ALT:"pi pi-sort-amount-down-alt",SORT_AMOUNT_DOWN:"pi pi-sort-amount-down",SORT_AMOUNT_UP_ALT:"pi pi-sort-amount-up-alt",SORT_AMOUNT_UP:"pi pi-sort-amount-up",SORT_DOWN_FILL:"pi pi-sort-down-fill",SORT_DOWN:"pi pi-sort-down",SORT_NUMERIC_DOWN_ALT:"pi pi-sort-numeric-down-alt",SORT_NUMERIC_DOWN:"pi pi-sort-numeric-down",SORT_NUMERIC_UP_ALT:"pi pi-sort-numeric-up-alt",SORT_NUMERIC_UP:"pi pi-sort-numeric-up",SORT_UP_FILL:"pi pi-sort-up-fill",SORT_UP:"pi pi-sort-up",SORT:"pi pi-sort",SPARKLES:"pi pi-sparkles",SPINNER_DOTTED:"pi pi-spinner-dotted",SPINNER:"pi pi-spinner",STAR_FILL:"pi pi-star-fill",STAR_HALF_FILL:"pi pi-star-half-fill",STAR_HALF:"pi pi-star-half",STAR:"pi pi-star",STEP_BACKWARD_ALT:"pi pi-step-backward-alt",STEP_BACKWARD:"pi pi-step-backward",STEP_FORWARD_ALT:"pi pi-step-forward-alt",STEP_FORWARD:"pi pi-step-forward",STOP_CIRCLE:"pi pi-stop-circle",STOP:"pi pi-stop",STOPWATCH:"pi pi-stopwatch",SUN:"pi pi-sun",SYNC:"pi pi-sync",TABLE:"pi pi-table",TABLET:"pi pi-tablet",TAG:"pi pi-tag",TAGS:"pi pi-tags",TELEGRAM:"pi pi-telegram",TH_LARGE:"pi pi-th-large",THUMBS_DOWN_FILL:"pi pi-thumbs-down-fill",THUMBS_DOWN:"pi pi-thumbs-down",THUMBS_UP_FILL:"pi pi-thumbs-up-fill",THUMBS_UP:"pi pi-thumbs-up",THUMBTACK:"pi pi-thumbtack",TICKET:"pi pi-ticket",TIKTOK:"pi pi-tiktok",TIMES_CIRCLE:"pi pi-times-circle",TIMES:"pi pi-times",TRASH:"pi pi-trash",TROPHY:"pi pi-trophy",TRUCK:"pi pi-truck",TURKISH_LIRA:"pi pi-turkish-lira",TWITCH:"pi pi-twitch",TWITTER:"pi pi-twitter",UNDO:"pi pi-undo",UNLOCK:"pi pi-unlock",UPLOAD:"pi pi-upload",USER_EDIT:"pi pi-user-edit",USER_MINUS:"pi pi-user-minus",USER_PLUS:"pi pi-user-plus",USER:"pi pi-user",USERS:"pi pi-users",VENUS:"pi pi-venus",VERIFIED:"pi pi-verified",VIDEO:"pi pi-video",VIMEO:"pi pi-vimeo",VOLUME_DOWN:"pi pi-volume-down",VOLUME_OFF:"pi pi-volume-off",VOLUME_UP:"pi pi-volume-up",WALLET:"pi pi-wallet",WAREHOUSE:"pi pi-warehouse",WAVE_PULSE:"pi pi-wave-pulse",WHATSAPP:"pi pi-whatsapp",WIFI:"pi pi-wifi",WINDOW_MAXIMIZE:"pi pi-window-maximize",WINDOW_MINIMIZE:"pi pi-window-minimize",WRENCH:"pi pi-wrench",YOUTUBE:"pi pi-youtube"}),Object.freeze({DESC:-1,UNSORTED:0,ASC:1});var E=c().createContext(),w=k;function hooks_esm_arrayLikeToArray(r,o){(null==o||o>r.length)&&(o=r.length);for(var i=0,a=Array(o);i<o;i++)a[i]=r[i];return a}function hooks_esm_unsupportedIterableToArray(r,o){if(r){if("string"==typeof r)return hooks_esm_arrayLikeToArray(r,o);var i={}.toString.call(r).slice(8,-1);return"Object"===i&&r.constructor&&(i=r.constructor.name),"Map"===i||"Set"===i?Array.from(r):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?hooks_esm_arrayLikeToArray(r,o):void 0}}function hooks_esm_slicedToArray(r,o){return function hooks_esm_arrayWithHoles(r){if(Array.isArray(r))return r}(r)||function hooks_esm_iterableToArrayLimit(r,o){var i=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=i){var a,c,u,p,g=[],v=!0,b=!1;try{if(u=(i=i.call(r)).next,0===o){if(Object(i)!==i)return;v=!1}else for(;!(v=(a=u.call(i)).done)&&(g.push(a.value),g.length!==o);v=!0);}catch(r){b=!0,c=r}finally{try{if(!v&&null!=i.return&&(p=i.return(),Object(p)!==p))return}finally{if(b)throw c}}return g}}(r,o)||hooks_esm_unsupportedIterableToArray(r,o)||function hooks_esm_nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var x=function usePrevious(r){var o=a.useRef(null);return a.useEffect(function(){return o.current=r,function(){o.current=null}},[r]),o.current},C=function useUnmountEffect(r){return a.useEffect(function(){return r},[])},_=function useEventListener(r){var o=r.target,i=void 0===o?"document":o,c=r.type,g=r.listener,v=r.options,b=r.when,k=void 0===b||b,E=a.useRef(null),w=a.useRef(null),_=x(g),T=x(v),P=function bind(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=r.target;p.isNotEmpty(o)&&(A(),(r.when||k)&&(E.current=u.getTargetElement(o))),!w.current&&E.current&&(w.current=function(r){return g&&g(r)},E.current.addEventListener(c,w.current,v))},A=function unbind(){w.current&&(E.current.removeEventListener(c,w.current,v),w.current=null)},N=function dispose(){A(),_=null,T=null},R=a.useCallback(function(){k?E.current=u.getTargetElement(i):(A(),E.current=null)},[i,k]);return a.useEffect(function(){R()},[R]),a.useEffect(function(){var r="".concat(_)!=="".concat(g),o=T!==v,i=w.current;i&&(r||o)?(A(),k&&P()):i||N()},[g,v,k]),C(function(){N()}),[P,A]},T={};function hooks_esm_toConsumableArray(r){return function hooks_esm_arrayWithoutHoles(r){if(Array.isArray(r))return hooks_esm_arrayLikeToArray(r)}(r)||function hooks_esm_iterableToArray(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r)}(r)||hooks_esm_unsupportedIterableToArray(r)||function hooks_esm_nonIterableSpread(){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 P=1200,A={escKeyListeners:new Map,onGlobalKeyDown:function onGlobalKeyDown(r){if("Escape"===r.code){var o=A.escKeyListeners,i=Math.max.apply(Math,hooks_esm_toConsumableArray(o.keys())),a=o.get(i),c=Math.max.apply(Math,hooks_esm_toConsumableArray(a.keys()));a.get(c)(r)}},refreshGlobalKeyDownListener:function refreshGlobalKeyDownListener(){var r=u.getTargetElement("document");this.escKeyListeners.size>0?r.addEventListener("keydown",this.onGlobalKeyDown):r.removeEventListener("keydown",this.onGlobalKeyDown)},addListener:function addListener(r,o){var i=this,a=hooks_esm_slicedToArray(o,2),c=a[0],u=a[1],p=this.escKeyListeners;p.has(c)||p.set(c,new Map);var g=p.get(c);if(g.has(u))throw new Error("Unexpected: global esc key listener with priority [".concat(c,", ").concat(u,"] already exists."));return g.set(u,r),this.refreshGlobalKeyDownListener(),function(){g.delete(u),0===g.size&&p.delete(c),i.refreshGlobalKeyDownListener()}}},N=function useMergeProps(){var r=(0,a.useContext)(E);return function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return mergeProps(i,null==r?void 0:r.ptOptions)}},R=function useMountEffect(r){var o=a.useRef(!1);return a.useEffect(function(){if(!o.current)return o.current=!0,r&&r()},[])};var I=function useOverlayScrollListener(r){var o=r.target,i=r.listener,c=r.options,g=r.when,v=void 0===g||g,b=a.useContext(E),k=a.useRef(null),_=a.useRef(null),T=a.useRef([]),P=x(i),A=x(c),N=function bind(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(p.isNotEmpty(r.target)&&(R(),(r.when||v)&&(k.current=u.getTargetElement(r.target))),!_.current&&k.current){var o=b?b.hideOverlaysOnDocumentScrolling:w.hideOverlaysOnDocumentScrolling,a=T.current=u.getScrollableParents(k.current);a.some(function(r){return r===document.body||r===window})||a.push(o?window:document.body),_.current=function(r){return i&&i(r)},a.forEach(function(r){return r.addEventListener("scroll",_.current,c)})}},R=function unbind(){_.current&&(T.current.forEach(function(r){return r.removeEventListener("scroll",_.current,c)}),_.current=null)},I=function dispose(){R(),T.current=null,P=null,A=null},L=a.useCallback(function(){v?k.current=u.getTargetElement(o):(R(),k.current=null)},[o,v]);return a.useEffect(function(){L()},[L]),a.useEffect(function(){var r="".concat(P)!=="".concat(i),o=A!==c,a=_.current;a&&(r||o)?(R(),v&&N()):a||I()},[i,c,v]),C(function(){I()}),[N,R]},L=function useResizeListener(r){var o=r.listener,i=r.when;return _({target:"window",type:"resize",listener:o,when:void 0===i||i})},z=0,j=function useStyle(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=hooks_esm_slicedToArray((0,a.useState)(!1),2),c=i[0],p=i[1],g=(0,a.useRef)(null),v=(0,a.useContext)(E),b=u.isClient()?window.document:void 0,k=o.document,x=void 0===k?b:k,C=o.manual,_=void 0!==C&&C,T=o.name,P=void 0===T?"style_".concat(++z):T,A=o.id,N=void 0===A?void 0:A,R=o.media,I=void 0===R?void 0:R,L=function load(){if(x&&!c){var o=(null==v?void 0:v.styleContainer)||x.head;g.current=function getCurrentStyleRef(r){var o=r.querySelector('style[data-primereact-style-id="'.concat(P,'"]'));if(o)return o;if(void 0!==N){var i=x.getElementById(N);if(i)return i}return x.createElement("style")}(o),g.current.isConnected||(g.current.type="text/css",N&&(g.current.id=N),I&&(g.current.media=I),u.addNonce(g.current,v&&v.nonce||w.nonce),o.appendChild(g.current),P&&g.current.setAttribute("data-primereact-style-id",P)),g.current.textContent=r,p(!0)}};return(0,a.useEffect)(function(){_||L()},[_]),{id:N,name:P,update:function update(o){c&&r!==o&&(g.current.textContent=o)},unload:function unload(){x&&g.current&&(u.removeInlineStyle(g.current),p(!1))},load:L,isLoaded:c}},B=function useUpdateEffect(r,o){var i=a.useRef(!1);return a.useEffect(function(){if(i.current)return r&&r();i.current=!0},o)};function componentbase_esm_arrayLikeToArray(r,o){(null==o||o>r.length)&&(o=r.length);for(var i=0,a=Array(o);i<o;i++)a[i]=r[i];return a}function componentbase_esm_toConsumableArray(r){return function componentbase_esm_arrayWithoutHoles(r){if(Array.isArray(r))return componentbase_esm_arrayLikeToArray(r)}(r)||function componentbase_esm_iterableToArray(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r)}(r)||function componentbase_esm_unsupportedIterableToArray(r,o){if(r){if("string"==typeof r)return componentbase_esm_arrayLikeToArray(r,o);var i={}.toString.call(r).slice(8,-1);return"Object"===i&&r.constructor&&(i=r.constructor.name),"Map"===i||"Set"===i?Array.from(r):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?componentbase_esm_arrayLikeToArray(r,o):void 0}}(r)||function componentbase_esm_nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function componentbase_esm_typeof(r){return componentbase_esm_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},componentbase_esm_typeof(r)}function componentbase_esm_toPropertyKey(r){var o=function componentbase_esm_toPrimitive(r,o){if("object"!=componentbase_esm_typeof(r)||!r)return r;var i=r[Symbol.toPrimitive];if(void 0!==i){var a=i.call(r,o||"default");if("object"!=componentbase_esm_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===o?String:Number)(r)}(r,"string");return"symbol"==componentbase_esm_typeof(o)?o:o+""}function componentbase_esm_defineProperty(r,o,i){return(o=componentbase_esm_toPropertyKey(o))in r?Object.defineProperty(r,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[o]=i,r}function componentbase_esm_ownKeys(r,o){var i=Object.keys(r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);o&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(r,o).enumerable})),i.push.apply(i,a)}return i}function componentbase_esm_objectSpread(r){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?componentbase_esm_ownKeys(Object(i),!0).forEach(function(o){componentbase_esm_defineProperty(r,o,i[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):componentbase_esm_ownKeys(Object(i)).forEach(function(o){Object.defineProperty(r,o,Object.getOwnPropertyDescriptor(i,o))})}return r}var V="\n@layer primereact {\n .p-component, .p-component * {\n box-sizing: border-box;\n }\n\n .p-hidden {\n display: none;\n }\n\n .p-hidden-space {\n visibility: hidden;\n }\n\n .p-reset {\n margin: 0;\n padding: 0;\n border: 0;\n outline: 0;\n text-decoration: none;\n font-size: 100%;\n list-style: none;\n }\n\n .p-disabled, .p-disabled * {\n cursor: default;\n pointer-events: none;\n user-select: none;\n }\n\n .p-component-overlay {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n }\n\n .p-unselectable-text {\n user-select: none;\n }\n\n .p-scrollbar-measure {\n width: 100px;\n height: 100px;\n overflow: scroll;\n position: absolute;\n top: -9999px;\n }\n\n @-webkit-keyframes p-fadein {\n 0% { opacity: 0; }\n 100% { opacity: 1; }\n }\n @keyframes p-fadein {\n 0% { opacity: 0; }\n 100% { opacity: 1; }\n }\n\n .p-link {\n text-align: left;\n background-color: transparent;\n margin: 0;\n padding: 0;\n border: none;\n cursor: pointer;\n user-select: none;\n }\n\n .p-link:disabled {\n cursor: default;\n }\n\n /* Non react overlay animations */\n .p-connected-overlay {\n opacity: 0;\n transform: scaleY(0.8);\n transition: transform .12s cubic-bezier(0, 0, 0.2, 1), opacity .12s cubic-bezier(0, 0, 0.2, 1);\n }\n\n .p-connected-overlay-visible {\n opacity: 1;\n transform: scaleY(1);\n }\n\n .p-connected-overlay-hidden {\n opacity: 0;\n transform: scaleY(1);\n transition: opacity .1s linear;\n }\n\n /* React based overlay animations */\n .p-connected-overlay-enter {\n opacity: 0;\n transform: scaleY(0.8);\n }\n\n .p-connected-overlay-enter-active {\n opacity: 1;\n transform: scaleY(1);\n transition: transform .12s cubic-bezier(0, 0, 0.2, 1), opacity .12s cubic-bezier(0, 0, 0.2, 1);\n }\n\n .p-connected-overlay-enter-done {\n transform: none;\n }\n\n .p-connected-overlay-exit {\n opacity: 1;\n }\n\n .p-connected-overlay-exit-active {\n opacity: 0;\n transition: opacity .1s linear;\n }\n\n /* Toggleable Content */\n .p-toggleable-content-enter {\n max-height: 0;\n }\n\n .p-toggleable-content-enter-active {\n overflow: hidden;\n max-height: 1000px;\n transition: max-height 1s ease-in-out;\n }\n\n .p-toggleable-content-enter-done {\n transform: none;\n }\n\n .p-toggleable-content-exit {\n max-height: 1000px;\n }\n\n .p-toggleable-content-exit-active {\n overflow: hidden;\n max-height: 0;\n transition: max-height 0.45s cubic-bezier(0, 1, 0, 1);\n }\n\n /* @todo Refactor */\n .p-menu .p-menuitem-link {\n cursor: pointer;\n display: flex;\n align-items: center;\n text-decoration: none;\n overflow: hidden;\n position: relative;\n }\n\n ".concat("\n.p-button {\n margin: 0;\n display: inline-flex;\n cursor: pointer;\n user-select: none;\n align-items: center;\n vertical-align: bottom;\n text-align: center;\n overflow: hidden;\n position: relative;\n}\n\n.p-button-label {\n flex: 1 1 auto;\n}\n\n.p-button-icon {\n pointer-events: none;\n}\n\n.p-button-icon-right {\n order: 1;\n}\n\n.p-button:disabled {\n cursor: default;\n}\n\n.p-button-icon-only {\n justify-content: center;\n}\n\n.p-button-icon-only .p-button-label {\n visibility: hidden;\n width: 0;\n flex: 0 0 auto;\n}\n\n.p-button-vertical {\n flex-direction: column;\n}\n\n.p-button-icon-bottom {\n order: 2;\n}\n\n.p-button-group .p-button {\n margin: 0;\n}\n\n.p-button-group .p-button:not(:last-child) {\n border-right: 0 none;\n}\n\n.p-button-group .p-button:not(:first-of-type):not(:last-of-type) {\n border-radius: 0;\n}\n\n.p-button-group .p-button:first-of-type {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n\n.p-button-group .p-button:last-of-type {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n}\n\n.p-button-group .p-button:focus {\n position: relative;\n z-index: 1;\n}\n\n.p-button-group-single .p-button:first-of-type {\n border-top-right-radius: var(--border-radius) !important;\n border-bottom-right-radius: var(--border-radius) !important;\n}\n\n.p-button-group-single .p-button:last-of-type {\n border-top-left-radius: var(--border-radius) !important;\n border-bottom-left-radius: var(--border-radius) !important;\n}\n","\n ").concat("\n.p-inputtext {\n margin: 0;\n}\n\n.p-fluid .p-inputtext {\n width: 100%;\n}\n\n/* InputGroup */\n.p-inputgroup {\n display: flex;\n align-items: stretch;\n width: 100%;\n}\n\n.p-inputgroup-addon {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.p-inputgroup .p-float-label {\n display: flex;\n align-items: stretch;\n width: 100%;\n}\n\n.p-inputgroup .p-inputtext,\n.p-fluid .p-inputgroup .p-inputtext,\n.p-inputgroup .p-inputwrapper,\n.p-fluid .p-inputgroup .p-input {\n flex: 1 1 auto;\n width: 1%;\n}\n\n/* Floating Label */\n.p-float-label {\n display: block;\n position: relative;\n}\n\n.p-float-label label {\n position: absolute;\n pointer-events: none;\n top: 50%;\n margin-top: -0.5rem;\n transition-property: all;\n transition-timing-function: ease;\n line-height: 1;\n}\n\n.p-float-label textarea ~ label,\n.p-float-label .p-mention ~ label {\n top: 1rem;\n}\n\n.p-float-label input:focus ~ label,\n.p-float-label input:-webkit-autofill ~ label,\n.p-float-label input.p-filled ~ label,\n.p-float-label textarea:focus ~ label,\n.p-float-label textarea.p-filled ~ label,\n.p-float-label .p-inputwrapper-focus ~ label,\n.p-float-label .p-inputwrapper-filled ~ label,\n.p-float-label .p-tooltip-target-wrapper ~ label {\n top: -0.75rem;\n font-size: 12px;\n}\n\n.p-float-label .p-placeholder,\n.p-float-label input::placeholder,\n.p-float-label .p-inputtext::placeholder {\n opacity: 0;\n transition-property: all;\n transition-timing-function: ease;\n}\n\n.p-float-label .p-focus .p-placeholder,\n.p-float-label input:focus::placeholder,\n.p-float-label .p-inputtext:focus::placeholder {\n opacity: 1;\n transition-property: all;\n transition-timing-function: ease;\n}\n\n.p-input-icon-left,\n.p-input-icon-right {\n position: relative;\n display: inline-block;\n}\n\n.p-input-icon-left > i,\n.p-input-icon-right > i,\n.p-input-icon-left > svg,\n.p-input-icon-right > svg,\n.p-input-icon-left > .p-input-prefix,\n.p-input-icon-right > .p-input-suffix {\n position: absolute;\n top: 50%;\n margin-top: -0.5rem;\n}\n\n.p-fluid .p-input-icon-left,\n.p-fluid .p-input-icon-right {\n display: block;\n width: 100%;\n}\n","\n ").concat("\n.p-icon {\n display: inline-block;\n}\n\n.p-icon-spin {\n -webkit-animation: p-icon-spin 2s infinite linear;\n animation: p-icon-spin 2s infinite linear;\n}\n\nsvg.p-icon {\n pointer-events: auto;\n}\n\nsvg.p-icon g,\n.p-disabled svg.p-icon {\n pointer-events: none;\n}\n\n@-webkit-keyframes p-icon-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(359deg);\n transform: rotate(359deg);\n }\n}\n\n@keyframes p-icon-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(359deg);\n transform: rotate(359deg);\n }\n}\n","\n}\n"),U={cProps:void 0,cParams:void 0,cName:void 0,defaultProps:{pt:void 0,ptOptions:void 0,unstyled:!1},context:{},globalCSS:void 0,classes:{},styles:"",extend:function extend(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=r.css,i=componentbase_esm_objectSpread(componentbase_esm_objectSpread({},r.defaultProps),U.defaultProps),a={},c=function getPTValue(){var r,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},c=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];o.hasOwnProperty("pt")&&void 0!==o.pt&&(o=o.pt);var u=i,g=/./g.test(u)&&!!a[u.split(".")[0]],v=g?p.toFlatCase(u.split(".")[1]):p.toFlatCase(u),b=a.hostName&&p.toFlatCase(a.hostName)||a.props&&a.props.__TYPE&&p.toFlatCase(a.props.__TYPE)||"",k="transition"===v,E="data-pc-",w=function getHostInstance(r){return null!=r&&r.props?r.hostName?r.props.__TYPE===r.hostName?r.props:w(r.parent):r.parent:void 0};U.cParams=a,U.cName=b;var x=function getPropValue(r){var o,i;return(null===(o=a.props)||void 0===o?void 0:o[r])||(null===(i=w(a))||void 0===i?void 0:i[r])}("ptOptions")||U.context.ptOptions||{},C=x.mergeSections,_=void 0===C||C,T=x.mergeProps,P=void 0!==T&&T,A=function getPTClassValue(){var r=H.apply(void 0,arguments);return Array.isArray(r)?{className:classNames.apply(void 0,componentbase_esm_toConsumableArray(r))}:p.isString(r)?{className:r}:null!=r&&r.hasOwnProperty("className")&&Array.isArray(r.className)?{className:classNames.apply(void 0,componentbase_esm_toConsumableArray(r.className))}:r},N=c?g?G(A,u,a):J(A,u,a):void 0,R=g?void 0:K(W(o,b),A,u,a),I=!k&&componentbase_esm_objectSpread(componentbase_esm_objectSpread({},"root"===v&&componentbase_esm_defineProperty({},"".concat(E,"name"),a.props&&a.props.__parentMetadata?p.toFlatCase(a.props.__TYPE):b)),{},componentbase_esm_defineProperty({},"".concat(E,"section"),v));return _||!_&&R?P?mergeProps([N,R,Object.keys(I).length?I:{}],{classNameMergeFunction:null===(r=U.context.ptOptions)||void 0===r?void 0:r.classNameMergeFunction}):componentbase_esm_objectSpread(componentbase_esm_objectSpread(componentbase_esm_objectSpread({},N),R),Object.keys(I).length?I:{}):componentbase_esm_objectSpread(componentbase_esm_objectSpread({},R),Object.keys(I).length?I:{})};return componentbase_esm_objectSpread(componentbase_esm_objectSpread({getProps:function getProps(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return U.context=o,U.cProps=r,p.getMergedProps(r,i)},getOtherProps:function getOtherProps(r){return p.getDiffProps(r,i)},setMetaData:function setMetaData(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=r.props,u=r.state,p=function isUnstyled(){return U.context.unstyled||w.unstyled||i.unstyled};return{ptm:function ptm(){var o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return c((i||{}).pt,o,componentbase_esm_objectSpread(componentbase_esm_objectSpread({},r),a))},ptmo:function ptmo(){return c(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},!1)},sx:function sx(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(arguments.length>2&&void 0!==arguments[2])||arguments[2]){var p,g=H(o&&o.inlineStyles,r,componentbase_esm_objectSpread({props:i,state:u},c));return mergeProps([H(a,r,componentbase_esm_objectSpread({props:i,state:u},c)),g],{classNameMergeFunction:null===(p=U.context.ptOptions)||void 0===p?void 0:p.classNameMergeFunction})}},cx:function cx(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return p()?void 0:H(o&&o.classes,r,componentbase_esm_objectSpread({props:i,state:u},a))},isUnstyled:p}}},r),{},{defaultProps:i})}},H=function getOptionValue(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=String(p.toFlatCase(o)).split("."),c=a.shift(),u=p.isNotEmpty(r)?Object.keys(r).find(function(r){return p.toFlatCase(r)===c}):"";return c?p.isObject(r)?H(p.getItemValue(r[u],i),a.join("."),i):void 0:p.getItemValue(r,i)},W=function _getPT(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2?arguments[2]:void 0,a=null==r?void 0:r._usept,c=function getValue(r){var a,c=arguments.length>1&&void 0!==arguments[1]&&arguments[1],u=i?i(r):r,g=p.toFlatCase(o);return null!==(a=c?g!==U.cName?null==u?void 0:u[g]:void 0:null==u?void 0:u[g])&&void 0!==a?a:u};return p.isNotEmpty(a)?{_usept:a,originalValue:c(r.originalValue),value:c(r.value)}:c(r,!0)},K=function _usePT(r,o,i,a){var c=function fn(r){return o(r,i,a)};if(null!=r&&r.hasOwnProperty("_usept")){var u=r._usept||U.context.ptOptions||{},g=u.mergeSections,v=void 0===g||g,b=u.mergeProps,k=void 0!==b&&b,E=u.classNameMergeFunction,w=c(r.originalValue),x=c(r.value);if(void 0===w&&void 0===x)return;return p.isString(x)?x:p.isString(w)?w:v||!v&&x?k?mergeProps([w,x],{classNameMergeFunction:E}):componentbase_esm_objectSpread(componentbase_esm_objectSpread({},w),x):x}return c(r)},G=function _useGlobalPT(r,o,i){return K(function getGlobalPT(){return W(U.context.pt||w.pt,void 0,function(r){return p.getItemValue(r,U.cParams)})}(),r,o,i)},J=function _useDefaultPT(r,o,i){return K(function getDefaultPT(){return W(U.context.pt||w.pt,void 0,function(r){return H(r,U.cName,U.cParams)||p.getItemValue(r,U.cParams)})}(),r,o,i)},Y=function useHandleStyle(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},i=arguments.length>2?arguments[2]:void 0,a=i.name,c=i.styled,u=void 0!==c&&c,g=i.hostName,v=void 0===g?"":g,b=G(H,"global.css",U.cParams),k=p.toFlatCase(a),E=j("\n.p-hidden-accessible {\n border: 0;\n clip: rect(0 0 0 0);\n height: 1px;\n margin: -1px;\n opacity: 0;\n overflow: hidden;\n padding: 0;\n pointer-events: none;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n}\n\n.p-overflow-hidden {\n overflow: hidden;\n padding-right: var(--scrollbar-width);\n}\n",{name:"base",manual:!0}).load,w=j(V,{name:"common",manual:!0}).load,x=j(b,{name:"global",manual:!0}).load,_=j(r,{name:a,manual:!0}).load,T=function hook(r){if(!v){var o=K(W((U.cProps||{}).pt,k),H,"hooks.".concat(r)),i=J(H,"hooks.".concat(r));null==o||o(),null==i||i()}};T("useMountEffect"),R(function(){E(),x(),o()||(w(),u||_())}),B(function(){T("useUpdateEffect")}),C(function(){T("useUnmountEffect")})};function extends_extends(){return extends_extends=Object.assign?Object.assign.bind():function(r){for(var o=1;o<arguments.length;o++){var i=arguments[o];for(var a in i)({}).hasOwnProperty.call(i,a)&&(r[a]=i[a])}return r},extends_extends.apply(null,arguments)}function _objectWithoutPropertiesLoose(r,o){if(null==r)return{};var i={};for(var a in r)if({}.hasOwnProperty.call(r,a)){if(-1!==o.indexOf(a))continue;i[a]=r[a]}return i}function _setPrototypeOf(r,o){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},_setPrototypeOf(r,o)}function _inheritsLoose(r,o){r.prototype=Object.create(o.prototype),r.prototype.constructor=r,_setPrototypeOf(r,o)}function replaceClassName(r,o){return r.replace(new RegExp("(^|\\s)"+o+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}var X=i(43617),Q=i.n(X),Z=!1,ee=c().createContext(null),te=function forceReflow(r){return r.scrollTop},ne="unmounted",re="exited",oe="entering",ie="entered",ae="exiting",se=function(r){function Transition(o,i){var a;a=r.call(this,o,i)||this;var c,u=i&&!i.isMounting?o.enter:o.appear;return a.appearStatus=null,o.in?u?(c=re,a.appearStatus=oe):c=ie:c=o.unmountOnExit||o.mountOnEnter?ne:re,a.state={status:c},a.nextCallback=null,a}_inheritsLoose(Transition,r),Transition.getDerivedStateFromProps=function getDerivedStateFromProps(r,o){return r.in&&o.status===ne?{status:re}:null};var o=Transition.prototype;return o.componentDidMount=function componentDidMount(){this.updateStatus(!0,this.appearStatus)},o.componentDidUpdate=function componentDidUpdate(r){var o=null;if(r!==this.props){var i=this.state.status;this.props.in?i!==oe&&i!==ie&&(o=oe):i!==oe&&i!==ie||(o=ae)}this.updateStatus(!1,o)},o.componentWillUnmount=function componentWillUnmount(){this.cancelNextCallback()},o.getTimeouts=function getTimeouts(){var r,o,i,a=this.props.timeout;return r=o=i=a,null!=a&&"number"!=typeof a&&(r=a.exit,o=a.enter,i=void 0!==a.appear?a.appear:o),{exit:r,enter:o,appear:i}},o.updateStatus=function updateStatus(r,o){if(void 0===r&&(r=!1),null!==o)if(this.cancelNextCallback(),o===oe){if(this.props.unmountOnExit||this.props.mountOnEnter){var i=this.props.nodeRef?this.props.nodeRef.current:Q().findDOMNode(this);i&&te(i)}this.performEnter(r)}else this.performExit();else this.props.unmountOnExit&&this.state.status===re&&this.setState({status:ne})},o.performEnter=function performEnter(r){var o=this,i=this.props.enter,a=this.context?this.context.isMounting:r,c=this.props.nodeRef?[a]:[Q().findDOMNode(this),a],u=c[0],p=c[1],g=this.getTimeouts(),v=a?g.appear:g.enter;!r&&!i||Z?this.safeSetState({status:ie},function(){o.props.onEntered(u)}):(this.props.onEnter(u,p),this.safeSetState({status:oe},function(){o.props.onEntering(u,p),o.onTransitionEnd(v,function(){o.safeSetState({status:ie},function(){o.props.onEntered(u,p)})})}))},o.performExit=function performExit(){var r=this,o=this.props.exit,i=this.getTimeouts(),a=this.props.nodeRef?void 0:Q().findDOMNode(this);o&&!Z?(this.props.onExit(a),this.safeSetState({status:ae},function(){r.props.onExiting(a),r.onTransitionEnd(i.exit,function(){r.safeSetState({status:re},function(){r.props.onExited(a)})})})):this.safeSetState({status:re},function(){r.props.onExited(a)})},o.cancelNextCallback=function cancelNextCallback(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},o.safeSetState=function safeSetState(r,o){o=this.setNextCallback(o),this.setState(r,o)},o.setNextCallback=function setNextCallback(r){var o=this,i=!0;return this.nextCallback=function(a){i&&(i=!1,o.nextCallback=null,r(a))},this.nextCallback.cancel=function(){i=!1},this.nextCallback},o.onTransitionEnd=function onTransitionEnd(r,o){this.setNextCallback(o);var i=this.props.nodeRef?this.props.nodeRef.current:Q().findDOMNode(this),a=null==r&&!this.props.addEndListener;if(i&&!a){if(this.props.addEndListener){var c=this.props.nodeRef?[this.nextCallback]:[i,this.nextCallback],u=c[0],p=c[1];this.props.addEndListener(u,p)}null!=r&&setTimeout(this.nextCallback,r)}else setTimeout(this.nextCallback,0)},o.render=function render(){var r=this.state.status;if(r===ne)return null;var o=this.props,i=o.children,a=(o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef,_objectWithoutPropertiesLoose(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return c().createElement(ee.Provider,{value:null},"function"==typeof i?i(r,a):c().cloneElement(c().Children.only(i),a))},Transition}(c().Component);function noop(){}se.contextType=ee,se.propTypes={},se.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:noop,onEntering:noop,onEntered:noop,onExit:noop,onExiting:noop,onExited:noop},se.UNMOUNTED=ne,se.EXITED=re,se.ENTERING=oe,se.ENTERED=ie,se.EXITING=ae;var le=se,ce=function removeClass(r,o){return r&&o&&o.split(" ").forEach(function(o){return function removeClass_removeClass(r,o){r.classList?r.classList.remove(o):"string"==typeof r.className?r.className=replaceClassName(r.className,o):r.setAttribute("class",replaceClassName(r.className&&r.className.baseVal||"",o))}(r,o)})},ue=function(r){function CSSTransition(){for(var o,i=arguments.length,a=new Array(i),c=0;c<i;c++)a[c]=arguments[c];return(o=r.call.apply(r,[this].concat(a))||this).appliedClasses={appear:{},enter:{},exit:{}},o.onEnter=function(r,i){var a=o.resolveArguments(r,i),c=a[0],u=a[1];o.removeClasses(c,"exit"),o.addClass(c,u?"appear":"enter","base"),o.props.onEnter&&o.props.onEnter(r,i)},o.onEntering=function(r,i){var a=o.resolveArguments(r,i),c=a[0],u=a[1]?"appear":"enter";o.addClass(c,u,"active"),o.props.onEntering&&o.props.onEntering(r,i)},o.onEntered=function(r,i){var a=o.resolveArguments(r,i),c=a[0],u=a[1]?"appear":"enter";o.removeClasses(c,u),o.addClass(c,u,"done"),o.props.onEntered&&o.props.onEntered(r,i)},o.onExit=function(r){var i=o.resolveArguments(r)[0];o.removeClasses(i,"appear"),o.removeClasses(i,"enter"),o.addClass(i,"exit","base"),o.props.onExit&&o.props.onExit(r)},o.onExiting=function(r){var i=o.resolveArguments(r)[0];o.addClass(i,"exit","active"),o.props.onExiting&&o.props.onExiting(r)},o.onExited=function(r){var i=o.resolveArguments(r)[0];o.removeClasses(i,"exit"),o.addClass(i,"exit","done"),o.props.onExited&&o.props.onExited(r)},o.resolveArguments=function(r,i){return o.props.nodeRef?[o.props.nodeRef.current,r]:[r,i]},o.getClassNames=function(r){var i=o.props.classNames,a="string"==typeof i,c=a?""+(a&&i?i+"-":"")+r:i[r];return{baseClassName:c,activeClassName:a?c+"-active":i[r+"Active"],doneClassName:a?c+"-done":i[r+"Done"]}},o}_inheritsLoose(CSSTransition,r);var o=CSSTransition.prototype;return o.addClass=function addClass(r,o,i){var a=this.getClassNames(o)[i+"ClassName"],c=this.getClassNames("enter").doneClassName;"appear"===o&&"done"===i&&c&&(a+=" "+c),"active"===i&&r&&te(r),a&&(this.appliedClasses[o][i]=a,function addClass(r,o){r&&o&&o.split(" ").forEach(function(o){return function addClass_addClass(r,o){r.classList?r.classList.add(o):function hasClass(r,o){return r.classList?!!o&&r.classList.contains(o):-1!==(" "+(r.className.baseVal||r.className)+" ").indexOf(" "+o+" ")}(r,o)||("string"==typeof r.className?r.className=r.className+" "+o:r.setAttribute("class",(r.className&&r.className.baseVal||"")+" "+o))}(r,o)})}(r,a))},o.removeClasses=function removeClasses(r,o){var i=this.appliedClasses[o],a=i.base,c=i.active,u=i.done;this.appliedClasses[o]={},a&&ce(r,a),c&&ce(r,c),u&&ce(r,u)},o.render=function render(){var r=this.props,o=(r.classNames,_objectWithoutPropertiesLoose(r,["classNames"]));return c().createElement(le,extends_extends({},o,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},CSSTransition}(c().Component);ue.defaultProps={classNames:""},ue.propTypes={};var pe=ue;function csstransition_esm_typeof(r){return csstransition_esm_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},csstransition_esm_typeof(r)}function csstransition_esm_toPropertyKey(r){var o=function csstransition_esm_toPrimitive(r,o){if("object"!=csstransition_esm_typeof(r)||!r)return r;var i=r[Symbol.toPrimitive];if(void 0!==i){var a=i.call(r,o||"default");if("object"!=csstransition_esm_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===o?String:Number)(r)}(r,"string");return"symbol"==csstransition_esm_typeof(o)?o:o+""}function csstransition_esm_defineProperty(r,o,i){return(o=csstransition_esm_toPropertyKey(o))in r?Object.defineProperty(r,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[o]=i,r}var de={defaultProps:{__TYPE:"CSSTransition",children:void 0},getProps:function getProps(r){return p.getMergedProps(r,de.defaultProps)},getOtherProps:function getOtherProps(r){return p.getDiffProps(r,de.defaultProps)}};function csstransition_esm_ownKeys(r,o){var i=Object.keys(r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);o&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(r,o).enumerable})),i.push.apply(i,a)}return i}function csstransition_esm_objectSpread(r){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?csstransition_esm_ownKeys(Object(i),!0).forEach(function(o){csstransition_esm_defineProperty(r,o,i[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):csstransition_esm_ownKeys(Object(i)).forEach(function(o){Object.defineProperty(r,o,Object.getOwnPropertyDescriptor(i,o))})}return r}var fe=a.forwardRef(function(r,o){var i=de.getProps(r),c=a.useContext(E),u=i.disabled||i.options&&i.options.disabled||c&&!c.cssTransition||!w.cssTransition,g=function onEnter(r,o){i.onEnter&&i.onEnter(r,o),i.options&&i.options.onEnter&&i.options.onEnter(r,o)},v=function onEntering(r,o){i.onEntering&&i.onEntering(r,o),i.options&&i.options.onEntering&&i.options.onEntering(r,o)},b=function onEntered(r,o){i.onEntered&&i.onEntered(r,o),i.options&&i.options.onEntered&&i.options.onEntered(r,o)},k=function onExit(r){i.onExit&&i.onExit(r),i.options&&i.options.onExit&&i.options.onExit(r)},x=function onExiting(r){i.onExiting&&i.onExiting(r),i.options&&i.options.onExiting&&i.options.onExiting(r)},C=function onExited(r){i.onExited&&i.onExited(r),i.options&&i.options.onExited&&i.options.onExited(r)};if(B(function(){if(u){var r=p.getRefElement(i.nodeRef);i.in?(g(r,!0),v(r,!0),b(r,!0)):(k(r),x(r),C(r))}},[i.in]),u)return i.in?i.children:null;var _={nodeRef:i.nodeRef,in:i.in,appear:i.appear,onEnter:g,onEntering:v,onEntered:b,onExit:k,onExiting:x,onExited:C},T=csstransition_esm_objectSpread(csstransition_esm_objectSpread(csstransition_esm_objectSpread({},{classNames:i.classNames,timeout:i.timeout,unmountOnExit:i.unmountOnExit}),i.options||{}),_);return a.createElement(pe,T,i.children)});function keyfilter_esm_arrayLikeToArray(r,o){(null==o||o>r.length)&&(o=r.length);for(var i=0,a=Array(o);i<o;i++)a[i]=r[i];return a}function keyfilter_esm_toConsumableArray(r){return function keyfilter_esm_arrayWithoutHoles(r){if(Array.isArray(r))return keyfilter_esm_arrayLikeToArray(r)}(r)||function keyfilter_esm_iterableToArray(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r)}(r)||function keyfilter_esm_unsupportedIterableToArray(r,o){if(r){if("string"==typeof r)return keyfilter_esm_arrayLikeToArray(r,o);var i={}.toString.call(r).slice(8,-1);return"Object"===i&&r.constructor&&(i=r.constructor.name),"Map"===i||"Set"===i?Array.from(r):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?keyfilter_esm_arrayLikeToArray(r,o):void 0}}(r)||function keyfilter_esm_nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}fe.displayName="CSSTransition";var he={DEFAULT_MASKS:{pint:/[\d]/,int:/[\d\-]/,pnum:/[\d\.]/,money:/[\d\.\s,]/,num:/[\d\-\.]/,hex:/[0-9a-f]/i,email:/[a-z0-9_\.\-@]/i,alpha:/[a-z_]/i,alphanum:/[a-z0-9_]/i},getRegex:function getRegex(r){return he.DEFAULT_MASKS[r]?he.DEFAULT_MASKS[r]:r},onBeforeInput:function onBeforeInput(r,o,i){!i&&u.isAndroid()&&this.validateKey(r,r.data,o)},onKeyPress:function onKeyPress(r,o,i){i||u.isAndroid()||r.ctrlKey||r.altKey||r.metaKey||this.validateKey(r,r.key,o)},onPaste:function onPaste(r,o,i){if(!i){var a=this.getRegex(o);keyfilter_esm_toConsumableArray(r.clipboardData.getData("text")).forEach(function(o){if(!a.test(o))return r.preventDefault(),!1})}},validateKey:function validateKey(r,o,i){null!=o&&(o.length<=2&&(this.getRegex(i).test(o)||r.preventDefault()))},validate:function validate(r,o){var i=r.target.value,a=!0,c=this.getRegex(o);return i&&!c.test(i)&&(a=!1),a}};function portal_esm_arrayLikeToArray(r,o){(null==o||o>r.length)&&(o=r.length);for(var i=0,a=Array(o);i<o;i++)a[i]=r[i];return a}function portal_esm_slicedToArray(r,o){return function portal_esm_arrayWithHoles(r){if(Array.isArray(r))return r}(r)||function portal_esm_iterableToArrayLimit(r,o){var i=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=i){var a,c,u,p,g=[],v=!0,b=!1;try{if(u=(i=i.call(r)).next,0===o){if(Object(i)!==i)return;v=!1}else for(;!(v=(a=u.call(i)).done)&&(g.push(a.value),g.length!==o);v=!0);}catch(r){b=!0,c=r}finally{try{if(!v&&null!=i.return&&(p=i.return(),Object(p)!==p))return}finally{if(b)throw c}}return g}}(r,o)||function portal_esm_unsupportedIterableToArray(r,o){if(r){if("string"==typeof r)return portal_esm_arrayLikeToArray(r,o);var i={}.toString.call(r).slice(8,-1);return"Object"===i&&r.constructor&&(i=r.constructor.name),"Map"===i||"Set"===i?Array.from(r):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?portal_esm_arrayLikeToArray(r,o):void 0}}(r,o)||function portal_esm_nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var me={defaultProps:{__TYPE:"Portal",element:null,appendTo:null,visible:!1,onMounted:null,onUnmounted:null,children:void 0},getProps:function getProps(r){return p.getMergedProps(r,me.defaultProps)},getOtherProps:function getOtherProps(r){return p.getDiffProps(r,me.defaultProps)}},ge=a.memo(function(r){var o=me.getProps(r),i=a.useContext(E),c=portal_esm_slicedToArray(a.useState(o.visible&&u.isClient()),2),g=c[0],v=c[1];R(function(){u.isClient()&&!g&&(v(!0),o.onMounted&&o.onMounted())}),B(function(){o.onMounted&&o.onMounted()},[g]),C(function(){o.onUnmounted&&o.onUnmounted()});var b=o.element||o.children;if(b&&g){var k=o.appendTo||i&&i.appendTo||w.appendTo;return p.isFunction(k)&&(k=k()),k||(k=document.body),"self"===k?b:Q().createPortal(b,k)}return null});function tooltip_esm_extends(){return tooltip_esm_extends=Object.assign?Object.assign.bind():function(r){for(var o=1;o<arguments.length;o++){var i=arguments[o];for(var a in i)({}).hasOwnProperty.call(i,a)&&(r[a]=i[a])}return r},tooltip_esm_extends.apply(null,arguments)}function tooltip_esm_typeof(r){return tooltip_esm_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},tooltip_esm_typeof(r)}function tooltip_esm_toPropertyKey(r){var o=function tooltip_esm_toPrimitive(r,o){if("object"!=tooltip_esm_typeof(r)||!r)return r;var i=r[Symbol.toPrimitive];if(void 0!==i){var a=i.call(r,o||"default");if("object"!=tooltip_esm_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===o?String:Number)(r)}(r,"string");return"symbol"==tooltip_esm_typeof(o)?o:o+""}function tooltip_esm_defineProperty(r,o,i){return(o=tooltip_esm_toPropertyKey(o))in r?Object.defineProperty(r,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[o]=i,r}function tooltip_esm_arrayLikeToArray(r,o){(null==o||o>r.length)&&(o=r.length);for(var i=0,a=Array(o);i<o;i++)a[i]=r[i];return a}function tooltip_esm_unsupportedIterableToArray(r,o){if(r){if("string"==typeof r)return tooltip_esm_arrayLikeToArray(r,o);var i={}.toString.call(r).slice(8,-1);return"Object"===i&&r.constructor&&(i=r.constructor.name),"Map"===i||"Set"===i?Array.from(r):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?tooltip_esm_arrayLikeToArray(r,o):void 0}}function tooltip_esm_toConsumableArray(r){return function tooltip_esm_arrayWithoutHoles(r){if(Array.isArray(r))return tooltip_esm_arrayLikeToArray(r)}(r)||function tooltip_esm_iterableToArray(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r)}(r)||tooltip_esm_unsupportedIterableToArray(r)||function tooltip_esm_nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tooltip_esm_slicedToArray(r,o){return function tooltip_esm_arrayWithHoles(r){if(Array.isArray(r))return r}(r)||function tooltip_esm_iterableToArrayLimit(r,o){var i=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=i){var a,c,u,p,g=[],v=!0,b=!1;try{if(u=(i=i.call(r)).next,0===o){if(Object(i)!==i)return;v=!1}else for(;!(v=(a=u.call(i)).done)&&(g.push(a.value),g.length!==o);v=!0);}catch(r){b=!0,c=r}finally{try{if(!v&&null!=i.return&&(p=i.return(),Object(p)!==p))return}finally{if(b)throw c}}return g}}(r,o)||tooltip_esm_unsupportedIterableToArray(r,o)||function tooltip_esm_nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}ge.displayName="Portal";var ve={root:function root(r){var o=r.positionState,i=r.classNameState;return classNames("p-tooltip p-component",tooltip_esm_defineProperty({},"p-tooltip-".concat(o),!0),i)},arrow:"p-tooltip-arrow",text:"p-tooltip-text"},ye=U.extend({defaultProps:{__TYPE:"Tooltip",appendTo:null,at:null,autoHide:!0,autoZIndex:!0,baseZIndex:0,className:null,closeOnEscape:!1,content:null,disabled:!1,event:null,hideDelay:0,hideEvent:"mouseleave",id:null,mouseTrack:!1,mouseTrackLeft:5,mouseTrackTop:5,my:null,onBeforeHide:null,onBeforeShow:null,onHide:null,onShow:null,position:"right",showDelay:0,showEvent:"mouseenter",showOnDisabled:!1,style:null,target:null,updateDelay:0,children:void 0},css:{classes:ve,styles:"\n@layer primereact {\n .p-tooltip {\n position: absolute;\n padding: .25em .5rem;\n /* #3687: Tooltip prevent scrollbar flickering */\n top: -9999px;\n left: -9999px;\n }\n \n .p-tooltip.p-tooltip-right,\n .p-tooltip.p-tooltip-left {\n padding: 0 .25rem;\n }\n \n .p-tooltip.p-tooltip-top,\n .p-tooltip.p-tooltip-bottom {\n padding:.25em 0;\n }\n \n .p-tooltip .p-tooltip-text {\n white-space: pre-line;\n word-break: break-word;\n }\n \n .p-tooltip-arrow {\n position: absolute;\n width: 0;\n height: 0;\n border-color: transparent;\n border-style: solid;\n }\n \n .p-tooltip-right .p-tooltip-arrow {\n top: 50%;\n left: 0;\n margin-top: -.25rem;\n border-width: .25em .25em .25em 0;\n }\n \n .p-tooltip-left .p-tooltip-arrow {\n top: 50%;\n right: 0;\n margin-top: -.25rem;\n border-width: .25em 0 .25em .25rem;\n }\n \n .p-tooltip.p-tooltip-top {\n padding: .25em 0;\n }\n \n .p-tooltip-top .p-tooltip-arrow {\n bottom: 0;\n left: 50%;\n margin-left: -.25rem;\n border-width: .25em .25em 0;\n }\n \n .p-tooltip-bottom .p-tooltip-arrow {\n top: 0;\n left: 50%;\n margin-left: -.25rem;\n border-width: 0 .25em .25rem;\n }\n\n .p-tooltip-target-wrapper {\n display: inline-flex;\n }\n}\n",inlineStyles:{arrow:function arrow(r){var o=r.context;return{top:o.bottom?"0":o.right||o.left||!o.right&&!o.left&&!o.top&&!o.bottom?"50%":null,bottom:o.top?"0":null,left:!o.right&&(o.right||o.left||o.top||o.bottom)?o.top||o.bottom?"50%":null:"0",right:o.left?"0":null}}}}});function tooltip_esm_ownKeys(r,o){var i=Object.keys(r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);o&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(r,o).enumerable})),i.push.apply(i,a)}return i}function tooltip_esm_objectSpread(r){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?tooltip_esm_ownKeys(Object(i),!0).forEach(function(o){tooltip_esm_defineProperty(r,o,i[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):tooltip_esm_ownKeys(Object(i)).forEach(function(o){Object.defineProperty(r,o,Object.getOwnPropertyDescriptor(i,o))})}return r}var be=a.memo(a.forwardRef(function(r,o){var i=N(),c=a.useContext(E),g=ye.getProps(r,c),b=tooltip_esm_slicedToArray(a.useState(!1),2),k=b[0],x=b[1],_=tooltip_esm_slicedToArray(a.useState(g.position||"right"),2),z=_[0],j=_[1],V=tooltip_esm_slicedToArray(a.useState(""),2),U=V[0],H=V[1],W=tooltip_esm_slicedToArray(a.useState(!1),2),K=W[0],G=W[1],J=k&&g.closeOnEscape,X=function useDisplayOrder(r){var o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=hooks_esm_slicedToArray(a.useState(function(){return UniqueComponentId()}),1)[0],c=hooks_esm_slicedToArray(a.useState(0),2),u=c[0],g=c[1];return a.useEffect(function(){if(o){T[r]||(T[r]=[]);var a=T[r].push(i);return g(a),function(){delete T[r][a-1];var o=T[r].length-1,i=p.findLastIndex(T[r],function(r){return void 0!==r});i!==o&&T[r].splice(i+1),g(void 0)}}},[r,i,o]),u}("tooltip",J),Q={props:g,state:{visible:k,position:z,className:U},context:{right:"right"===z,left:"left"===z,top:"top"===z,bottom:"bottom"===z}},Z=ye.setMetaData(Q),ee=Z.ptm,te=Z.cx,ne=Z.sx,re=Z.isUnstyled;Y(ye.css.styles,re,{name:"tooltip"}),function useGlobalOnEscapeKey(r){var o=r.callback,i=r.when,c=r.priority;(0,a.useEffect)(function(){if(i)return A.addListener(o,c)},[o,i,c])}({callback:function callback(){Ae()},when:J,priority:[P,X]});var oe=a.useRef(null),ie=a.useRef(null),ae=a.useRef(null),se=a.useRef(null),le=a.useRef(!0),ce=a.useRef({}),ue=a.useRef(null),pe=tooltip_esm_slicedToArray(L({listener:function listener(r){!u.isTouchDevice()&&Ae(r)}}),2),de=pe[0],fe=pe[1],he=tooltip_esm_slicedToArray(I({target:ae.current,listener:function listener(r){Ae(r)},when:k}),2),me=he[0],ve=he[1],be=function isMouseTrack(r){return we(r,"mousetrack")||g.mouseTrack},ke=function isDisabled(r){return"true"===we(r,"disabled")||xe(r,"disabled")||g.disabled},Ee=function isShowOnDisabled(r){return we(r,"showondisabled")||g.showOnDisabled},Se=function isAutoHide(){return we(ae.current,"autohide")||g.autoHide},we=function getTargetOption(r,o){return xe(r,"data-pr-".concat(o))?r.getAttribute("data-pr-".concat(o)):null},xe=function hasTargetOption(r,o){return r&&r.hasAttribute(o)},Ce=function getEvents(r){var o=[we(r,"showevent")||g.showEvent],i=[we(r,"hideevent")||g.hideEvent];if(be(r))o=["mousemove"],i=["mouseleave"];else{var a=we(r,"event")||g.event;"focus"===a&&(o=["focus"],i=["blur"]),"both"===a&&(o=["focus","mouseenter"],i=K?["blur"]:["mouseleave","blur"])}return{showEvents:o,hideEvents:i}},_e=function getPosition(r){return we(r,"position")||z},Te=function updateText(r,o){if(ie.current){var i=we(r,"tooltip")||g.content;i?(ie.current.innerHTML="",ie.current.appendChild(document.createTextNode(i)),o()):g.children&&o()}},Oe=function updateTooltipState(r){Te(ae.current,function(){var o=ue.current,i=o.pageX,a=o.pageY;g.autoZIndex&&!v.get(oe.current)&&v.set("tooltip",oe.current,c&&c.autoZIndex||w.autoZIndex,g.baseZIndex||c&&c.zIndex.tooltip||w.zIndex.tooltip),oe.current.style.left="",oe.current.style.top="",Se()&&(oe.current.style.pointerEvents="none");var p=be(ae.current)||"mouse"===r;(p&&!se.current||p)&&(se.current={width:u.getOuterWidth(oe.current),height:u.getOuterHeight(oe.current)}),Me(ae.current,{x:i,y:a},r)})},Pe=function show(r){r.type&&"focus"===r.type&&G(!0),ae.current=r.currentTarget;var o=ke(ae.current);(function isContentEmpty(r){return!(g.content||we(r,"tooltip")||g.children)})(Ee(ae.current)&&o?ae.current.firstChild:ae.current)||o||(ue.current=r,k?Le("updateDelay",Oe):Fe(g.onBeforeShow,{originalEvent:r,target:ae.current})&&Le("showDelay",function(){x(!0),Fe(g.onShow,{originalEvent:r,target:ae.current})}))},Ae=function hide(r){(r&&"blur"===r.type&&G(!1),ze(),k)?Fe(g.onBeforeHide,{originalEvent:r,target:ae.current})&&Le("hideDelay",function(){(Se()||!1!==le.current)&&(v.clear(oe.current),u.removeClass(oe.current,"p-tooltip-active"),x(!1),Fe(g.onHide,{originalEvent:r,target:ae.current}))}):g.onBeforeHide||De("hideDelay")||x(!1)},Me=function align(r,o,i){var a=0,c=0,p=i||z;if((be(r)||"mouse"==p)&&o){var v={width:u.getOuterWidth(oe.current),height:u.getOuterHeight(oe.current)};a=o.x,c=o.y;var b=function getMouseTrackPosition(r){return{top:we(r,"mousetracktop")||g.mouseTrackTop,left:we(r,"mousetrackleft")||g.mouseTrackLeft}}(r),k=b.top,E=b.left;switch(p){case"left":a-=v.width+E,c-=v.height/2-k;break;case"right":case"mouse":a+=E,c-=v.height/2-k;break;case"top":a-=v.width/2-E,c-=v.height+k;break;case"bottom":a-=v.width/2-E,c+=k}a<=0||se.current.width>v.width?(oe.current.style.left="0px",oe.current.style.right=window.innerWidth-v.width-a+"px"):(oe.current.style.right="",oe.current.style.left=a+"px"),oe.current.style.top=c+"px",u.addClass(oe.current,"p-tooltip-active")}else{var w=u.findCollisionPosition(p),x=we(r,"my")||g.my||w.my,C=we(r,"at")||g.at||w.at;oe.current.style.padding="0px",u.flipfitCollision(oe.current,r,x,C,function(r){var o=r.at,i=o.x,a=o.y,c=r.my.x,p=g.at?"center"!==i&&i!==c?i:a:r.at["".concat(w.axis)];oe.current.style.padding="",j(p),Ne(p),u.addClass(oe.current,"p-tooltip-active")})}},Ne=function updateContainerPosition(r){if(oe.current){var o=getComputedStyle(oe.current);"left"===r?oe.current.style.left=parseFloat(o.left)-2*parseFloat(o.paddingLeft)+"px":"top"===r&&(oe.current.style.top=parseFloat(o.top)-2*parseFloat(o.paddingTop)+"px")}},Re=function bindTargetEvent(r){if(r){var o=Ce(r),i=o.showEvents,a=o.hideEvents,c=je(r);i.forEach(function(r){return null==c?void 0:c.addEventListener(r,Pe)}),a.forEach(function(r){return null==c?void 0:c.addEventListener(r,Ae)})}},Ie=function unbindTargetEvent(r){if(r){var o=Ce(r),i=o.showEvents,a=o.hideEvents,c=je(r);i.forEach(function(r){return null==c?void 0:c.removeEventListener(r,Pe)}),a.forEach(function(r){return null==c?void 0:c.removeEventListener(r,Ae)})}},De=function getDelay(r){return we(ae.current,r.toLowerCase())||g[r]},Le=function applyDelay(r,o){ze();var i=De(r);i?ce.current["".concat(r)]=setTimeout(function(){return o()},i):o()},Fe=function sendCallback(r){if(r){for(var o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];var c=r.apply(void 0,i);return void 0===c&&(c=!0),c}return!0},ze=function clearTimeouts(){Object.values(ce.current).forEach(function(r){return clearTimeout(r)})},je=function getTarget(r){if(r){if(Ee(r)){if(!r.hasWrapper){var o=document.createElement("div");return"INPUT"===r.nodeName?u.addMultipleClasses(o,"p-tooltip-target-wrapper p-inputwrapper"):u.addClass(o,"p-tooltip-target-wrapper"),r.parentNode.insertBefore(o,r),o.appendChild(r),r.hasWrapper=!0,o}return r.parentElement}var i;return r.hasWrapper&&((i=r.parentElement).replaceWith.apply(i,tooltip_esm_toConsumableArray(r.parentElement.childNodes)),delete r.hasWrapper),r}return null},Be=function updateTargetEvents(r){$e(r),Ve(r)},Ve=function loadTargetEvents(r){Ue(r||g.target,Re)},$e=function unloadTargetEvents(r){Ue(r||g.target,Ie)},Ue=function setTargetEventOperations(r,o){if(r=p.getRefElement(r))if(u.isElement(r))o(r);else{var i=function setEvent(r){u.find(document,r).forEach(function(r){o(r)})};r instanceof Array?r.forEach(function(r){i(r)}):i(r)}};R(function(){k&&ae.current&&ke(ae.current)&&Ae()}),B(function(){return Ve(),function(){$e()}},[Pe,Ae,g.target]),B(function(){if(k){var r=_e(ae.current),o=we(ae.current,"classname");j(r),H(o),Oe(r),de(),me()}else j(g.position||"right"),H(""),ae.current=null,se.current=null,le.current=!0;return function(){fe(),ve()}},[k]),B(function(){var r=_e(ae.current);k&&"mouse"!==r&&Le("updateDelay",function(){Te(ae.current,function(){Me(ae.current)})})},[g.content]),C(function(){Ae(),v.clear(oe.current)}),a.useImperativeHandle(o,function(){return{props:g,updateTargetEvents:Be,loadTargetEvents:Ve,unloadTargetEvents:$e,show:Pe,hide:Ae,getElement:function getElement(){return oe.current},getTarget:function getTarget(){return ae.current}}});if(k){var He=function createElement(){var r=function isTargetContentEmpty(r){return!(g.content||we(r,"tooltip"))}(ae.current),o=i({id:g.id,className:classNames(g.className,te("root",{positionState:z,classNameState:U})),style:g.style,role:"tooltip","aria-hidden":k,onMouseEnter:function onMouseEnter(r){return function onMouseEnter(){Se()||(le.current=!1)}()},onMouseLeave:function onMouseLeave(r){return function onMouseLeave(r){Se()||(le.current=!0,Ae(r))}(r)}},ye.getOtherProps(g),ee("root")),c=i({className:te("arrow"),style:ne("arrow",tooltip_esm_objectSpread({},Q))},ee("arrow")),u=i({className:te("text")},ee("text"));return a.createElement("div",tooltip_esm_extends({ref:oe},o),a.createElement("div",c),a.createElement("div",tooltip_esm_extends({ref:ie},u),r&&g.children))}();return a.createElement(ge,{element:He,appendTo:g.appendTo,visible:!0})}return null}));be.displayName="Tooltip";var ke=function EventBus(){var r=new Map;return{on:function on(o,i){var a=r.get(o);a?a.push(i):a=[i],r.set(o,a)},off:function off(o,i){var a=r.get(o);a&&a.splice(a.indexOf(i)>>>0,1)},emit:function emit(o,i){var a=r.get(o);a&&a.slice().forEach(function(r){return r(i)})}}}();function ripple_esm_extends(){return ripple_esm_extends=Object.assign?Object.assign.bind():function(r){for(var o=1;o<arguments.length;o++){var i=arguments[o];for(var a in i)({}).hasOwnProperty.call(i,a)&&(r[a]=i[a])}return r},ripple_esm_extends.apply(null,arguments)}function ripple_esm_typeof(r){return ripple_esm_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ripple_esm_typeof(r)}function ripple_esm_toPropertyKey(r){var o=function ripple_esm_toPrimitive(r,o){if("object"!=ripple_esm_typeof(r)||!r)return r;var i=r[Symbol.toPrimitive];if(void 0!==i){var a=i.call(r,o||"default");if("object"!=ripple_esm_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===o?String:Number)(r)}(r,"string");return"symbol"==ripple_esm_typeof(o)?o:o+""}function ripple_esm_defineProperty(r,o,i){return(o=ripple_esm_toPropertyKey(o))in r?Object.defineProperty(r,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[o]=i,r}function ripple_esm_arrayLikeToArray(r,o){(null==o||o>r.length)&&(o=r.length);for(var i=0,a=Array(o);i<o;i++)a[i]=r[i];return a}function ripple_esm_slicedToArray(r,o){return function ripple_esm_arrayWithHoles(r){if(Array.isArray(r))return r}(r)||function ripple_esm_iterableToArrayLimit(r,o){var i=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=i){var a,c,u,p,g=[],v=!0,b=!1;try{if(u=(i=i.call(r)).next,0===o){if(Object(i)!==i)return;v=!1}else for(;!(v=(a=u.call(i)).done)&&(g.push(a.value),g.length!==o);v=!0);}catch(r){b=!0,c=r}finally{try{if(!v&&null!=i.return&&(p=i.return(),Object(p)!==p))return}finally{if(b)throw c}}return g}}(r,o)||function ripple_esm_unsupportedIterableToArray(r,o){if(r){if("string"==typeof r)return ripple_esm_arrayLikeToArray(r,o);var i={}.toString.call(r).slice(8,-1);return"Object"===i&&r.constructor&&(i=r.constructor.name),"Map"===i||"Set"===i?Array.from(r):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?ripple_esm_arrayLikeToArray(r,o):void 0}}(r,o)||function ripple_esm_nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Ee=U.extend({defaultProps:{__TYPE:"Ripple",children:void 0},css:{styles:"\n@layer primereact {\n .p-ripple {\n overflow: hidden;\n position: relative;\n }\n \n .p-ink {\n display: block;\n position: absolute;\n background: rgba(255, 255, 255, 0.5);\n border-radius: 100%;\n transform: scale(0);\n }\n \n .p-ink-active {\n animation: ripple 0.4s linear;\n }\n \n .p-ripple-disabled .p-ink {\n display: none;\n }\n}\n\n@keyframes ripple {\n 100% {\n opacity: 0;\n transform: scale(2.5);\n }\n}\n\n",classes:{root:"p-ink"}},getProps:function getProps(r){return p.getMergedProps(r,Ee.defaultProps)},getOtherProps:function getOtherProps(r){return p.getDiffProps(r,Ee.defaultProps)}});function ripple_esm_ownKeys(r,o){var i=Object.keys(r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);o&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(r,o).enumerable})),i.push.apply(i,a)}return i}var Se=a.memo(a.forwardRef(function(r,o){var i=ripple_esm_slicedToArray(a.useState(!1),2),c=i[0],p=i[1],g=a.useRef(null),v=a.useRef(null),b=N(),k=a.useContext(E),x=Ee.getProps(r,k),_=k&&k.ripple||w.ripple,T={props:x};j(Ee.css.styles,{name:"ripple",manual:!_});var P=Ee.setMetaData(function ripple_esm_objectSpread(r){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?ripple_esm_ownKeys(Object(i),!0).forEach(function(o){ripple_esm_defineProperty(r,o,i[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):ripple_esm_ownKeys(Object(i)).forEach(function(o){Object.defineProperty(r,o,Object.getOwnPropertyDescriptor(i,o))})}return r}({},T)),A=P.ptm,I=P.cx,L=function getTarget(){return g.current&&g.current.parentElement},z=function bindEvents(){v.current&&v.current.addEventListener("pointerdown",V)},V=function onPointerDown(r){var o=u.getOffset(v.current),i=r.pageX-o.left+document.body.scrollTop-u.getWidth(g.current)/2,a=r.pageY-o.top+document.body.scrollLeft-u.getHeight(g.current)/2;U(i,a)},U=function activateRipple(r,o){g.current&&"none"!==getComputedStyle(g.current,null).display&&(u.removeClass(g.current,"p-ink-active"),H(),g.current.style.top=o+"px",g.current.style.left=r+"px",u.addClass(g.current,"p-ink-active"))},H=function setDimensions(){if(g.current&&!u.getHeight(g.current)&&!u.getWidth(g.current)){var r=Math.max(u.getOuterWidth(v.current),u.getOuterHeight(v.current));g.current.style.height=r+"px",g.current.style.width=r+"px"}};if(a.useImperativeHandle(o,function(){return{props:x,getInk:function getInk(){return g.current},getTarget:function getTarget(){return v.current}}}),R(function(){p(!0)}),B(function(){c&&g.current&&(v.current=L(),H(),z())},[c]),B(function(){g.current&&!v.current&&(v.current=L(),H(),z())}),C(function(){g.current&&(v.current=null,function unbindEvents(){v.current&&v.current.removeEventListener("pointerdown",V)}())}),!_)return null;var W=b({"aria-hidden":!0,className:classNames(I("root"))},Ee.getOtherProps(x),A("root"));return a.createElement("span",ripple_esm_extends({role:"presentation",ref:g},W,{onAnimationEnd:function onAnimationEnd(r){u.removeClass(r.currentTarget,"p-ink-active")}}))}));function mention_esm_extends(){return mention_esm_extends=Object.assign?Object.assign.bind():function(r){for(var o=1;o<arguments.length;o++){var i=arguments[o];for(var a in i)({}).hasOwnProperty.call(i,a)&&(r[a]=i[a])}return r},mention_esm_extends.apply(null,arguments)}function mention_esm_arrayLikeToArray(r,o){(null==o||o>r.length)&&(o=r.length);for(var i=0,a=Array(o);i<o;i++)a[i]=r[i];return a}function mention_esm_unsupportedIterableToArray(r,o){if(r){if("string"==typeof r)return mention_esm_arrayLikeToArray(r,o);var i={}.toString.call(r).slice(8,-1);return"Object"===i&&r.constructor&&(i=r.constructor.name),"Map"===i||"Set"===i?Array.from(r):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?mention_esm_arrayLikeToArray(r,o):void 0}}function mention_esm_toConsumableArray(r){return function mention_esm_arrayWithoutHoles(r){if(Array.isArray(r))return mention_esm_arrayLikeToArray(r)}(r)||function mention_esm_iterableToArray(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r)}(r)||mention_esm_unsupportedIterableToArray(r)||function mention_esm_nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function mention_esm_typeof(r){return mention_esm_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},mention_esm_typeof(r)}function mention_esm_toPropertyKey(r){var o=function mention_esm_toPrimitive(r,o){if("object"!=mention_esm_typeof(r)||!r)return r;var i=r[Symbol.toPrimitive];if(void 0!==i){var a=i.call(r,o||"default");if("object"!=mention_esm_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===o?String:Number)(r)}(r,"string");return"symbol"==mention_esm_typeof(o)?o:o+""}function mention_esm_defineProperty(r,o,i){return(o=mention_esm_toPropertyKey(o))in r?Object.defineProperty(r,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[o]=i,r}function mention_esm_slicedToArray(r,o){return function mention_esm_arrayWithHoles(r){if(Array.isArray(r))return r}(r)||function mention_esm_iterableToArrayLimit(r,o){var i=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=i){var a,c,u,p,g=[],v=!0,b=!1;try{if(u=(i=i.call(r)).next,0===o){if(Object(i)!==i)return;v=!1}else for(;!(v=(a=u.call(i)).done)&&(g.push(a.value),g.length!==o);v=!0);}catch(r){b=!0,c=r}finally{try{if(!v&&null!=i.return&&(p=i.return(),Object(p)!==p))return}finally{if(b)throw c}}return g}}(r,o)||mention_esm_unsupportedIterableToArray(r,o)||function mention_esm_nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}Se.displayName="Ripple";var we={root:function root(r){var o=r.props,i=r.context,a=r.isFilled;return classNames("p-inputtextarea p-inputtext p-component",{"p-disabled":o.disabled,"p-filled":a,"p-inputtextarea-resizable":o.autoResize,"p-invalid":o.invalid,"p-variant-filled":o.variant?"filled"===o.variant:i&&"filled"===i.inputStyle})}},xe=U.extend({defaultProps:{__TYPE:"InputTextarea",__parentMetadata:null,autoResize:!1,invalid:!1,variant:null,keyfilter:null,onBlur:null,onFocus:null,onBeforeInput:null,onInput:null,onKeyDown:null,onKeyUp:null,onPaste:null,tooltip:null,tooltipOptions:null,validateOnly:!1,children:void 0,className:null},css:{classes:we,styles:"\n@layer primereact {\n .p-inputtextarea-resizable {\n overflow: hidden;\n resize: none;\n }\n \n .p-fluid .p-inputtextarea {\n width: 100%;\n }\n}\n"}});function mention_esm_ownKeys$1(r,o){var i=Object.keys(r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);o&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(r,o).enumerable})),i.push.apply(i,a)}return i}function mention_esm_objectSpread$1(r){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?mention_esm_ownKeys$1(Object(i),!0).forEach(function(o){mention_esm_defineProperty(r,o,i[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):mention_esm_ownKeys$1(Object(i)).forEach(function(o){Object.defineProperty(r,o,Object.getOwnPropertyDescriptor(i,o))})}return r}var Ce=a.memo(a.forwardRef(function(r,o){var i=N(),c=a.useContext(E),g=xe.getProps(r,c),v=a.useRef(o),b=a.useRef(0),k=xe.setMetaData(mention_esm_objectSpread$1(mention_esm_objectSpread$1({props:g},g.__parentMetadata),{},{context:{disabled:g.disabled}})),w=k.ptm,x=k.cx,C=k.isUnstyled;Y(xe.css.styles,C,{name:"inputtextarea"});var _=function resize(r){var o=v.current;o&&T()&&(b.current||(b.current=o.scrollHeight,o.style.overflow="hidden"),(b.current!==o.scrollHeight||r)&&(o.style.height="",o.style.height=o.scrollHeight+"px",parseFloat(o.style.height)>=parseFloat(o.style.maxHeight)?(o.style.overflowY="scroll",o.style.height=o.style.maxHeight):o.style.overflow="hidden",b.current=o.scrollHeight))},T=function isVisible(){if(u.isVisible(v.current)){var r=v.current.getBoundingClientRect();return r.width>0&&r.height>0}return!1};a.useEffect(function(){p.combinedRefs(v,o)},[v,o]),a.useEffect(function(){g.autoResize&&_(!0)},[g.autoResize,g.value]);var P=a.useMemo(function(){return p.isNotEmpty(g.value)||p.isNotEmpty(g.defaultValue)},[g.value,g.defaultValue]),A=p.isNotEmpty(g.tooltip),R=i({ref:v,className:classNames(g.className,x("root",{context:c,isFilled:P})),onFocus:function onFocus(r){g.autoResize&&_(),g.onFocus&&g.onFocus(r)},onBlur:function onBlur(r){g.autoResize&&_(),g.onBlur&&g.onBlur(r)},onKeyUp:function onKeyUp(r){g.autoResize&&_(),g.onKeyUp&&g.onKeyUp(r)},onKeyDown:function onKeyDown(r){g.onKeyDown&&g.onKeyDown(r),g.keyfilter&&he.onKeyPress(r,g.keyfilter,g.validateOnly)},onBeforeInput:function onBeforeInput(r){g.onBeforeInput&&g.onBeforeInput(r),g.keyfilter&&he.onBeforeInput(r,g.keyfilter,g.validateOnly)},onInput:function onInput(r){var o=r.target;g.autoResize&&_(p.isEmpty(o.value)),g.onInput&&g.onInput(r),p.isNotEmpty(o.value)?u.addClass(o,"p-filled"):u.removeClass(o,"p-filled")},onPaste:function onPaste(r){g.onPaste&&g.onPaste(r),g.keyfilter&&he.onPaste(r,g.keyfilter,g.validateOnly)}},xe.getOtherProps(g),w("root"));return a.createElement(a.Fragment,null,a.createElement("textarea",R),A&&a.createElement(be,mention_esm_extends({target:v,content:g.tooltip,pt:w("tooltip")},g.tooltipOptions)))}));Ce.displayName="InputTextarea";var _e={item:function item(r){return classNames("p-mention-item",{"p-highlight":r.isSelected})},items:"p-mention-items",panel:function panel(r){return classNames("p-mention-panel p-component",r.props.panelClassName)},input:function input(r){return classNames("p-mention-input",r.props.inputClassName)},root:function root(r){return r.props,classNames("p-mention p-component p-inputwrapper",{"p-inputwrapper-filled":r.isFilled,"p-inputwrapper-focus":r.focusedState})},transition:"p-connected-overlay"},Te=U.extend({defaultProps:{__TYPE:"Mention",autoHighlight:!0,autoResize:!1,className:null,delay:0,field:null,footerTemplate:null,headerTemplate:null,id:null,inputClassName:null,inputId:null,inputRef:null,inputStyle:null,itemTemplate:null,onBlur:null,onChange:null,onFocus:null,onHide:null,onInput:null,onSearch:null,onSelect:null,onShow:null,panelClassName:null,panelStyle:null,scrollHeight:"200px",style:null,suggestions:null,transitionOptions:null,trigger:"@",variant:null,children:void 0},css:{classes:_e,styles:"\n@layer primereact {\n .p-mention {\n display: inline-flex;\n position: relative;\n }\n \n .p-autocomplete-loader {\n position: absolute;\n top: 50%;\n margin-top: -.5rem;\n }\n \n .p-mention .p-mention-panel {\n min-width: 100%;\n }\n \n .p-mention-panel {\n position: absolute;\n top: 0;\n left: 0;\n overflow: auto;\n }\n \n .p-mention-items {\n margin: 0;\n padding: 0;\n list-style-type: none;\n }\n \n .p-mention-item {\n cursor: pointer;\n white-space: nowrap;\n position: relative;\n overflow: hidden;\n }\n \n .p-fluid .p-mention {\n display: flex;\n }\n}\n"}});function mention_esm_ownKeys(r,o){var i=Object.keys(r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);o&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(r,o).enumerable})),i.push.apply(i,a)}return i}function mention_esm_objectSpread(r){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?mention_esm_ownKeys(Object(i),!0).forEach(function(o){mention_esm_defineProperty(r,o,i[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):mention_esm_ownKeys(Object(i)).forEach(function(o){Object.defineProperty(r,o,Object.getOwnPropertyDescriptor(i,o))})}return r}var Oe=a.memo(a.forwardRef(function(r,o){var i=N(),c=a.useContext(E),g=Te.getProps(r,c),b=mention_esm_slicedToArray(a.useState(!1),2),k=b[0],x=b[1],T=mention_esm_slicedToArray(a.useState(!1),2),P=T[0],A=T[1],R=mention_esm_slicedToArray(a.useState(!1),2),z=R[0],j=R[1],V=mention_esm_slicedToArray(a.useState(null),2),U=V[0],H=V[1],W=mention_esm_slicedToArray(a.useState([]),2),K=W[0],G=W[1],J=a.useRef(null),X=a.useRef(null),Q=a.useRef(g.inputRef),Z=a.useRef(null),ee=a.useRef(null),te={props:g,state:{overlayVisible:k,focused:P,searching:z,trigger:U}},ne=Te.setMetaData(te),re=ne.ptm,oe=ne.cx;ne.sx;var ie=ne.isUnstyled;Y(Te.css.styles,ie,{name:"mention"});var ae=function useOverlayListener(r){var o=r.target,i=r.overlay,c=r.listener,p=r.when,g=void 0===p||p,v=r.type,b=void 0===v?"click":v,k=a.useRef(null),E=a.useRef(null),w=hooks_esm_slicedToArray(_({target:"window",type:b,listener:function listener(r){c&&c(r,{type:"outside",valid:3!==r.which&&H(r)})},when:g}),2),x=w[0],T=w[1],P=hooks_esm_slicedToArray(L({listener:function listener(r){c&&c(r,{type:"resize",valid:!u.isTouchDevice()})},when:g}),2),A=P[0],N=P[1],R=hooks_esm_slicedToArray(_({target:"window",type:"orientationchange",listener:function listener(r){c&&c(r,{type:"orientationchange",valid:!0})},when:g}),2),z=R[0],j=R[1],B=hooks_esm_slicedToArray(I({target:o,listener:function listener(r){c&&c(r,{type:"scroll",valid:!0})},when:g}),2),V=B[0],U=B[1],H=function isOutsideClicked(r){return k.current&&!(k.current.isSameNode(r.target)||k.current.contains(r.target)||E.current&&E.current.contains(r.target))},W=function unbind(){T(),N(),j(),U()};return a.useEffect(function(){g?(k.current=u.getTargetElement(o),E.current=u.getTargetElement(i)):(W(),k.current=E.current=null)},[o,i,g]),C(function(){W()}),[function bind(){x(),A(),z(),V()},W]}({target:J,overlay:X,listener:function listener(r,o){var i=o.valid,a=o.type;i&&(c.hideOverlaysOnDocumentScrolling||"outside"===a?pe():u.isDocument(r.target)||be())},when:k}),se=mention_esm_slicedToArray(ae,2),le=se[0],ce=se[1],ue=function show(){x(!0)},pe=function hide(){x(!1),j(!1),H(null)},de=function onOverlayEnter(){v.set("overlay",X.current,c&&c.autoZIndex||w.autoZIndex,c&&c.zIndex.overlay||w.zIndex.overlay),u.addStyles(X.current,{position:"absolute",top:"0",left:"0"}),be()},he=function onOverlayEntering(){g.autoHighlight&&g.suggestions&&g.suggestions.length&&G(function(r){var o=mention_esm_toConsumableArray(r);return o[0]=!0,o})},me=function onOverlayEntered(){le(),g.onShow&&g.onShow()},ve=function onOverlayExit(){ce()},ye=function onOverlayExited(){v.clear(X.current),g.onHide&&g.onHide()},be=function alignOverlay(){if(U){var r=U.key,o=U.index,i=Q.current.value,a=u.getCursorOffset(Q.current,i.substring(0,o-1),i.substring(o),r);X.current.style.transformOrigin="top",X.current.style.left="calc(".concat(a.left,"px + 1rem)"),X.current.style.top="calc(".concat(a.top,"px + 1.2rem)")}},Ee=function onPanelClick(r){ke.emit("overlay-click",{originalEvent:r,target:J.current})},we=function getLatestTrigger(r,o){if(Array.isArray(g.trigger)){var i={};return g.trigger.forEach(function(a){var c=r.substring(0,o).lastIndexOf(a);-1!==c&&(c>i.index||!i.index)&&(i={key:a,index:-1!==c?c+1:-1})}),i}var a=r.substring(0,o).lastIndexOf(g.trigger);return{key:g.trigger,index:-1!==a?a+1:-1}},xe=function onSearch(r){ee.current&&clearTimeout(ee.current);var o=r.target,i=o.value,a=o.selectionStart,c=i.substring(a-1,a);if(" "!==c){var u=function getTrigger(r,o,i){if(!U){var a=Array.isArray(g.trigger)?g.trigger.find(function(r){return r===o}):g.trigger===o?g.trigger:null;if(a)return{key:a,index:i};var c=r.substring(0,i).lastIndexOf(" "),u=we(r,i);if(u.index>c)return u}return U}(i,c,a);if(u&&u.index>-1){var p=i.substring(u.index,a);ee.current=setTimeout(function(){_e(r,p,u)},g.delay)}}else pe()},_e=function search(r,o,i){g.onSearch&&(j(!0),H(i),g.onSearch({originalEvent:r,trigger:i.key,query:o}))},Oe=function selectItem(r,o){var i=Q.current,a=i.value,c=i.selectionStart,u=a.indexOf(" ",U.index),p=a.substring(U.index,u>-1?u:c),v=Pe(o).replace(/\s+/g,"");if(p.trim()!==v){var b=a.substring(0,U.index),k=a.substring(u>-1?c:U.index+p.length);Q.current.value=" "===k[0]?"".concat(b).concat(v).concat(k):"".concat(b).concat(v," ").concat(k),r.target=Q.current,g.onChange&&g.onChange(r)}var E=U.index+v.length+1;Q.current.setSelectionRange(E,E),pe(),g.onSelect&&g.onSelect({originalEvent:r,suggestion:o})},Pe=function formatValue(r){if(r){var o=Array.isArray(g.field)?g.field[g.trigger.findIndex(function(r){return r===U.key})]:g.field;return o?p.resolveFieldData(r,o):r}return""},Ae=Q.current&&Q.current.value,Me=a.useMemo(function(){return p.isNotEmpty(g.value)||p.isNotEmpty(g.defaultValue)||p.isNotEmpty(Ae)},[g.value,g.defaultValue,Ae]);a.useImperativeHandle(o,function(){return{props:g,show:ue,hide:pe,focus:function focus(){return u.focus(Q.current)},getElement:function getElement(){return J.current},getOverlay:function getOverlay(){return X.current},getInput:function getInput(){return Q.current}}}),a.useEffect(function(){p.combinedRefs(Q,g.inputRef)},[Q,g.inputRef]),B(function(){var r=g.suggestions&&g.suggestions.length;if(r){var o=g.suggestions.map(function(){return!1});G(o)}z&&(r?ue():pe(),k&&be(),j(!1))},[g.suggestions]),B(function(){var r=ie(),o=r?u.isAttributeEquals(J.current,"data-p-inputwrapper-filled",!0):u.hasClass(J.current,"p-inputwrapper-filled");!Me&&o&&(r?u.setAttributes(J.current,{"data-p-inputwrapper-filled":!1}):u.removeClass(J.current,"p-inputwrapper-filled"))},[Me]),C(function(){v.clear(X.current)});var Ne=function createItem(r,o){var c=o+"_item",v=g.itemTemplate?p.getJSXElement(g.itemTemplate,r,{trigger:U?U.key:"",index:o}):Pe(r),b=K[o],k=i({className:oe("item",{isSelected:b}),onClick:function onClick(o){return function onItemClick(r,o){u.focus(Q.current),Oe(r,o)}(o,r)},"data-p-highlight":b},function getPTOptions(r,o,i){return re(o,{context:{trigger:U?U.key:""},state:mention_esm_objectSpread({},i)})}(0,"item",{selected:b}));return a.createElement("li",mention_esm_extends({},k,{key:c}),v,a.createElement(Se,null))},Re=Te.getOtherProps(g),Ie=function createPanel(){var r=p.getJSXElement(g.headerTemplate,g),o=p.getJSXElement(g.footerTemplate,g),c=function createList(){var r=i({ref:Z,className:oe("items")},re("items"));if(g.suggestions){var o=g.suggestions.map(Ne);return a.createElement("ul",r,o)}return null}(),u=i({ref:X,className:oe("panel"),style:mention_esm_objectSpread({maxHeight:g.scrollHeight},g.panelStyle),onClick:Ee},re("panel")),v=i({classNames:oe("transition"),in:k,timeout:{enter:120,exit:100},options:g.transitionOptions,unmountOnExit:!0,onEnter:de,onEntering:he,onEntered:me,onExit:ve,onExited:ye},re("transition")),b=a.createElement(fe,mention_esm_extends({nodeRef:X},v),a.createElement("div",u,r,c,o));return a.createElement(ge,{element:b,appendTo:"self"})}(),De=i(mention_esm_objectSpread(mention_esm_objectSpread({ref:Q,id:g.inputId,className:oe("input"),style:g.inputStyle},Re),{},{unstyled:g.unstyled,variant:g.variant,autoResize:g.autoResize,onFocus:function onFocus(r){A(!0),g.onFocus&&g.onFocus(r)},onBlur:function onBlur(r){A(!1),g.onBlur&&g.onBlur(r)},onKeyDown:function onKeyDown(r){if(k){var o=u.findSingle(X.current,'li[data-p-highlight="true"]');switch(r.which){case 40:if(o){var i=o.nextElementSibling;if(i){var a=u.index(i),c=u.index(o);G(function(r){var o=mention_esm_toConsumableArray(r);return o[a]=!0,o[c]=!1,o}),u.scrollInView(X.current,i)}}else if(o=u.findSingle(X.current,"li")){var p=u.index(o);G(function(r){var o=mention_esm_toConsumableArray(r);return o[p]=!0,o})}r.preventDefault();break;case 38:if(o){var v=o.previousElementSibling;if(v){var b=u.index(v),E=u.index(o);G(function(r){var o=mention_esm_toConsumableArray(r);return o[b]=!0,o[E]=!1,o}),u.scrollInView(X.current,v)}}r.preventDefault();break;case 8:var w=r.target,x=w.value,C=w.selectionStart;x.substring(C-1,C)===U.key&&pe();break;case 13:o&&Oe(r,g.suggestions[u.index(o)]),r.preventDefault();break;case 27:pe(),r.preventDefault()}}},onInput:function onInput(r){g.onInput&&g.onInput(r);var o=r.target.value.length>0;ie()?u.setAttributes(J.current,{"data-p-inputwrapper-filled":o}):o?u.addClass(J.current,"p-inputwrapper-filled"):u.removeClass(J.current,"p-inputwrapper-filled")},onKeyUp:function onKeyUp(r){37!==r.which&&39!==r.which||xe(r)},onChange:function onChange(r){g.onChange&&g.onChange(r),xe(r)},__parentMetadata:{parent:te}}),re("input")),Le=i({ref:J,id:g.id,className:classNames(g.className,oe("root",{focusedState:P,isFilled:Me})),style:g.style},Te.getOtherProps(g),re("root"));return a.createElement("div",Le,a.createElement(Ce,De),Ie)}));Oe.displayName="Mention"},37820:function(r,o,i){"use strict";function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function _get(r,o,i){var a=function _superPropBase(r,o){for(;!Object.prototype.hasOwnProperty.call(r,o)&&null!==(r=_getPrototypeOf(r)););return r}(r,o);if(a){var c=Object.getOwnPropertyDescriptor(a,o);return c.get?c.get.call(arguments.length<3?r:i):c.value}},_get.apply(this,arguments)}function _inherits(r,o){if("function"!=typeof o&&null!==o)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(o&&o.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),o&&_setPrototypeOf(r,o)}function _setPrototypeOf(r,o){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(r,o){return r.__proto__=o,r},_setPrototypeOf(r,o)}function _createSuper(r){var o=function _isNativeReflectConstruct(){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(r){return!1}}();return function _createSuperInternal(){var i,a=_getPrototypeOf(r);if(o){var c=_getPrototypeOf(this).constructor;i=Reflect.construct(a,arguments,c)}else i=a.apply(this,arguments);return function _possibleConstructorReturn(r,o){if(o&&("object"===_typeof(o)||"function"==typeof o))return o;if(void 0!==o)throw new TypeError("Derived constructors may only return object or undefined");return function _assertThisInitialized(r){if(void 0===r)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(r)}(this,i)}}function _getPrototypeOf(r){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(r){return r.__proto__||Object.getPrototypeOf(r)},_getPrototypeOf(r)}function _typeof(r){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},_typeof(r)}function _classCallCheck(r,o){if(!(r instanceof o))throw new TypeError("Cannot call a class as a function")}function _defineProperties(r,o){for(var i=0;i<o.length;i++){var a=o[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(r,_toPropertyKey(a.key),a)}}function _createClass(r,o,i){return o&&_defineProperties(r.prototype,o),i&&_defineProperties(r,i),Object.defineProperty(r,"prototype",{writable:!1}),r}function _toPropertyKey(r){var o=function _toPrimitive(r,o){if("object"!==_typeof(r)||null===r)return r;var i=r[Symbol.toPrimitive];if(void 0!==i){var a=i.call(r,o||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===o?String:Number)(r)}(r,"string");return"symbol"===_typeof(o)?o:String(o)}var a=i(77712),c=i(36553),u=Object.create(null),p=function(){function Selection(r,o,i){_classCallCheck(this,Selection),this.$anchor=r,this.$head=o,this.ranges=i||[new g(r.min(o),r.max(o))]}return _createClass(Selection,[{key:"anchor",get:function get(){return this.$anchor.pos}},{key:"head",get:function get(){return this.$head.pos}},{key:"from",get:function get(){return this.$from.pos}},{key:"to",get:function get(){return this.$to.pos}},{key:"$from",get:function get(){return this.ranges[0].$from}},{key:"$to",get:function get(){return this.ranges[0].$to}},{key:"empty",get:function get(){for(var r=this.ranges,o=0;o<r.length;o++)if(r[o].$from.pos!=r[o].$to.pos)return!1;return!0}},{key:"content",value:function content(){return this.$from.doc.slice(this.from,this.to,!0)}},{key:"replace",value:function replace(r){for(var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.Slice.empty,i=o.content.lastChild,c=null,u=0;u<o.openEnd;u++)c=i,i=i.lastChild;for(var p=r.steps.length,g=this.ranges,v=0;v<g.length;v++){var b=g[v],k=b.$from,E=b.$to,w=r.mapping.slice(p);r.replaceRange(w.map(k.pos),w.map(E.pos),v?a.Slice.empty:o),0==v&&selectionToInsertionEnd(r,p,(i?i.isInline:c&&c.isTextblock)?-1:1)}}},{key:"replaceWith",value:function replaceWith(r,o){for(var i=r.steps.length,a=this.ranges,c=0;c<a.length;c++){var u=a[c],p=u.$from,g=u.$to,v=r.mapping.slice(i),b=v.map(p.pos),k=v.map(g.pos);c?r.deleteRange(b,k):(r.replaceRangeWith(b,k,o),selectionToInsertionEnd(r,i,o.isInline?-1:1))}}},{key:"getBookmark",value:function getBookmark(){return b.between(this.$anchor,this.$head).getBookmark()}}],[{key:"findFrom",value:function findFrom(r,o){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=r.parent.inlineContent?new b(r):findSelectionIn(r.node(0),r.parent,r.pos,r.index(),o,i);if(a)return a;for(var c=r.depth-1;c>=0;c--){var u=o<0?findSelectionIn(r.node(0),r.node(c),r.before(c+1),r.index(c),o,i):findSelectionIn(r.node(0),r.node(c),r.after(c+1),r.index(c)+1,o,i);if(u)return u}return null}},{key:"near",value:function near(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this.findFrom(r,o)||this.findFrom(r,-o)||new x(r.node(0))}},{key:"atStart",value:function atStart(r){return findSelectionIn(r,r,0,0,1)||new x(r)}},{key:"atEnd",value:function atEnd(r){return findSelectionIn(r,r,r.content.size,r.childCount,-1)||new x(r)}},{key:"fromJSON",value:function fromJSON(r,o){if(!o||!o.type)throw new RangeError("Invalid input for Selection.fromJSON");var i=u[o.type];if(!i)throw new RangeError("No selection type ".concat(o.type," defined"));return i.fromJSON(r,o)}},{key:"jsonID",value:function jsonID(r,o){if(r in u)throw new RangeError("Duplicate use of selection JSON ID "+r);return u[r]=o,o.prototype.jsonID=r,o}}]),Selection}();p.prototype.visible=!0;var g=_createClass(function SelectionRange(r,o){_classCallCheck(this,SelectionRange),this.$from=r,this.$to=o}),v=!1;function checkTextSelection(r){v||r.parent.inlineContent||(v=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+r.parent.type.name+")"))}var b=function(r){_inherits(TextSelection,r);var o=_createSuper(TextSelection);function TextSelection(r){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r;return _classCallCheck(this,TextSelection),checkTextSelection(r),checkTextSelection(i),o.call(this,r,i)}return _createClass(TextSelection,[{key:"$cursor",get:function get(){return this.$anchor.pos==this.$head.pos?this.$head:null}},{key:"map",value:function map(r,o){var i=r.resolve(o.map(this.head));if(!i.parent.inlineContent)return p.near(i);var a=r.resolve(o.map(this.anchor));return new TextSelection(a.parent.inlineContent?a:i,i)}},{key:"replace",value:function replace(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.Slice.empty;if(_get(_getPrototypeOf(TextSelection.prototype),"replace",this).call(this,r,o),o==a.Slice.empty){var i=this.$from.marksAcross(this.$to);i&&r.ensureMarks(i)}}},{key:"eq",value:function eq(r){return r instanceof TextSelection&&r.anchor==this.anchor&&r.head==this.head}},{key:"getBookmark",value:function getBookmark(){return new k(this.anchor,this.head)}},{key:"toJSON",value:function toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}}],[{key:"fromJSON",value:function fromJSON(r,o){if("number"!=typeof o.anchor||"number"!=typeof o.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new TextSelection(r.resolve(o.anchor),r.resolve(o.head))}},{key:"create",value:function create(r,o){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o,a=r.resolve(o);return new this(a,i==o?a:r.resolve(i))}},{key:"between",value:function between(r,o,i){var a=r.pos-o.pos;if(i&&!a||(i=a>=0?1:-1),!o.parent.inlineContent){var c=p.findFrom(o,i,!0)||p.findFrom(o,-i,!0);if(!c)return p.near(o,i);o=c.$head}return r.parent.inlineContent||(0==a||(r=(p.findFrom(r,-i,!0)||p.findFrom(r,i,!0)).$anchor).pos<o.pos!=a<0)&&(r=o),new TextSelection(r,o)}}]),TextSelection}(p);p.jsonID("text",b);var k=function(){function TextBookmark(r,o){_classCallCheck(this,TextBookmark),this.anchor=r,this.head=o}return _createClass(TextBookmark,[{key:"map",value:function map(r){return new TextBookmark(r.map(this.anchor),r.map(this.head))}},{key:"resolve",value:function resolve(r){return b.between(r.resolve(this.anchor),r.resolve(this.head))}}]),TextBookmark}(),E=function(r){_inherits(NodeSelection,r);var o=_createSuper(NodeSelection);function NodeSelection(r){var i;_classCallCheck(this,NodeSelection);var a=r.nodeAfter,c=r.node(0).resolve(r.pos+a.nodeSize);return(i=o.call(this,r,c)).node=a,i}return _createClass(NodeSelection,[{key:"map",value:function map(r,o){var i=o.mapResult(this.anchor),a=i.deleted,c=i.pos,u=r.resolve(c);return a?p.near(u):new NodeSelection(u)}},{key:"content",value:function content(){return new a.Slice(a.Fragment.from(this.node),0,0)}},{key:"eq",value:function eq(r){return r instanceof NodeSelection&&r.anchor==this.anchor}},{key:"toJSON",value:function toJSON(){return{type:"node",anchor:this.anchor}}},{key:"getBookmark",value:function getBookmark(){return new w(this.anchor)}}],[{key:"fromJSON",value:function fromJSON(r,o){if("number"!=typeof o.anchor)throw new RangeError("Invalid input for NodeSelection.fromJSON");return new NodeSelection(r.resolve(o.anchor))}},{key:"create",value:function create(r,o){return new NodeSelection(r.resolve(o))}},{key:"isSelectable",value:function isSelectable(r){return!r.isText&&!1!==r.type.spec.selectable}}]),NodeSelection}(p);E.prototype.visible=!1,p.jsonID("node",E);var w=function(){function NodeBookmark(r){_classCallCheck(this,NodeBookmark),this.anchor=r}return _createClass(NodeBookmark,[{key:"map",value:function map(r){var o=r.mapResult(this.anchor),i=o.deleted,a=o.pos;return i?new k(a,a):new NodeBookmark(a)}},{key:"resolve",value:function resolve(r){var o=r.resolve(this.anchor),i=o.nodeAfter;return i&&E.isSelectable(i)?new E(o):p.near(o)}}]),NodeBookmark}(),x=function(r){_inherits(AllSelection,r);var o=_createSuper(AllSelection);function AllSelection(r){return _classCallCheck(this,AllSelection),o.call(this,r.resolve(0),r.resolve(r.content.size))}return _createClass(AllSelection,[{key:"replace",value:function replace(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.Slice.empty;if(o==a.Slice.empty){r.delete(0,r.doc.content.size);var i=p.atStart(r.doc);i.eq(r.selection)||r.setSelection(i)}else _get(_getPrototypeOf(AllSelection.prototype),"replace",this).call(this,r,o)}},{key:"toJSON",value:function toJSON(){return{type:"all"}}},{key:"map",value:function map(r){return new AllSelection(r)}},{key:"eq",value:function eq(r){return r instanceof AllSelection}},{key:"getBookmark",value:function getBookmark(){return C}}],[{key:"fromJSON",value:function fromJSON(r){return new AllSelection(r)}}]),AllSelection}(p);p.jsonID("all",x);var C={map:function map(){return this},resolve:function resolve(r){return new x(r)}};function findSelectionIn(r,o,i,a,c){var u=arguments.length>5&&void 0!==arguments[5]&&arguments[5];if(o.inlineContent)return b.create(r,i);for(var p=a-(c>0?0:1);c>0?p<o.childCount:p>=0;p+=c){var g=o.child(p);if(g.isAtom){if(!u&&E.isSelectable(g))return E.create(r,i-(c<0?g.nodeSize:0))}else{var v=findSelectionIn(r,g,i+c,c<0?g.childCount:0,c,u);if(v)return v}i+=g.nodeSize*c}return null}function selectionToInsertionEnd(r,o,i){var a=r.steps.length-1;if(!(a<o)){var u,g=r.steps[a];if(g instanceof c.ReplaceStep||g instanceof c.ReplaceAroundStep)r.mapping.maps[a].forEach(function(r,o,i,a){null==u&&(u=a)}),r.setSelection(p.near(r.doc.resolve(u),i))}}var _=function(r){_inherits(Transaction,r);var o=_createSuper(Transaction);function Transaction(r){var i;return _classCallCheck(this,Transaction),(i=o.call(this,r.doc)).curSelectionFor=0,i.updated=0,i.meta=Object.create(null),i.time=Date.now(),i.curSelection=r.selection,i.storedMarks=r.storedMarks,i}return _createClass(Transaction,[{key:"selection",get:function get(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}},{key:"setSelection",value:function setSelection(r){if(r.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=r,this.curSelectionFor=this.steps.length,this.updated=-3&this.updated|1,this.storedMarks=null,this}},{key:"selectionSet",get:function get(){return(1&this.updated)>0}},{key:"setStoredMarks",value:function setStoredMarks(r){return this.storedMarks=r,this.updated|=2,this}},{key:"ensureMarks",value:function ensureMarks(r){return a.Mark.sameSet(this.storedMarks||this.selection.$from.marks(),r)||this.setStoredMarks(r),this}},{key:"addStoredMark",value:function addStoredMark(r){return this.ensureMarks(r.addToSet(this.storedMarks||this.selection.$head.marks()))}},{key:"removeStoredMark",value:function removeStoredMark(r){return this.ensureMarks(r.removeFromSet(this.storedMarks||this.selection.$head.marks()))}},{key:"storedMarksSet",get:function get(){return(2&this.updated)>0}},{key:"addStep",value:function addStep(r,o){_get(_getPrototypeOf(Transaction.prototype),"addStep",this).call(this,r,o),this.updated=-3&this.updated,this.storedMarks=null}},{key:"setTime",value:function setTime(r){return this.time=r,this}},{key:"replaceSelection",value:function replaceSelection(r){return this.selection.replace(this,r),this}},{key:"replaceSelectionWith",value:function replaceSelectionWith(r){var o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this.selection;return o&&(r=r.mark(this.storedMarks||(i.empty?i.$from.marks():i.$from.marksAcross(i.$to)||a.Mark.none))),i.replaceWith(this,r),this}},{key:"deleteSelection",value:function deleteSelection(){return this.selection.replace(this),this}},{key:"insertText",value:function insertText(r,o,i){var a=this.doc.type.schema;if(null==o)return r?this.replaceSelectionWith(a.text(r),!0):this.deleteSelection();if(null==i&&(i=o),!r)return this.deleteRange(o,i);var c=this.storedMarks;if(!c){var u=this.doc.resolve(o);c=i==o?u.marks():u.marksAcross(this.doc.resolve(i))}return this.replaceRangeWith(o,i,a.text(r,c)),this.selection.empty||this.selection.to!=o+r.length||this.setSelection(p.near(this.selection.$to)),this}},{key:"setMeta",value:function setMeta(r,o){return this.meta["string"==typeof r?r:r.key]=o,this}},{key:"getMeta",value:function getMeta(r){return this.meta["string"==typeof r?r:r.key]}},{key:"isGeneric",get:function get(){for(var r in this.meta)return!1;return!0}},{key:"scrollIntoView",value:function scrollIntoView(){return this.updated|=4,this}},{key:"scrolledIntoView",get:function get(){return(4&this.updated)>0}}]),Transaction}(c.Transform);function bind(r,o){return o&&r?r.bind(o):r}var T=_createClass(function FieldDesc(r,o,i){_classCallCheck(this,FieldDesc),this.name=r,this.init=bind(o.init,i),this.apply=bind(o.apply,i)}),P=[new T("doc",{init:function init(r){return r.doc||r.schema.topNodeType.createAndFill()},apply:function apply(r){return r.doc}}),new T("selection",{init:function init(r,o){return r.selection||p.atStart(o.doc)},apply:function apply(r){return r.selection}}),new T("storedMarks",{init:function init(r){return r.storedMarks||null},apply:function apply(r,o,i,a){return a.selection.$cursor?r.storedMarks:null}}),new T("scrollToSelection",{init:function init(){return 0},apply:function apply(r,o){return r.scrolledIntoView?o+1:o}})],A=_createClass(function Configuration(r,o){var i=this;_classCallCheck(this,Configuration),this.schema=r,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=P.slice(),o&&o.forEach(function(r){if(i.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");i.plugins.push(r),i.pluginsByKey[r.key]=r,r.spec.state&&i.fields.push(new T(r.key,r.spec.state,r))})}),N=function(){function EditorState(r){_classCallCheck(this,EditorState),this.config=r}return _createClass(EditorState,[{key:"schema",get:function get(){return this.config.schema}},{key:"plugins",get:function get(){return this.config.plugins}},{key:"apply",value:function apply(r){return this.applyTransaction(r).state}},{key:"filterTransaction",value:function filterTransaction(r){for(var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,i=0;i<this.config.plugins.length;i++)if(i!=o){var a=this.config.plugins[i];if(a.spec.filterTransaction&&!a.spec.filterTransaction.call(a,r,this))return!1}return!0}},{key:"applyTransaction",value:function applyTransaction(r){if(!this.filterTransaction(r))return{state:this,transactions:[]};for(var o=[r],i=this.applyInner(r),a=null;;){for(var c=!1,u=0;u<this.config.plugins.length;u++){var p=this.config.plugins[u];if(p.spec.appendTransaction){var g=a?a[u].n:0,v=a?a[u].state:this,b=g<o.length&&p.spec.appendTransaction.call(p,g?o.slice(g):o,v,i);if(b&&i.filterTransaction(b,u)){if(b.setMeta("appendedTransaction",r),!a){a=[];for(var k=0;k<this.config.plugins.length;k++)a.push(k<u?{state:i,n:o.length}:{state:this,n:0})}o.push(b),i=i.applyInner(b),c=!0}a&&(a[u]={state:i,n:o.length})}}if(!c)return{state:i,transactions:o}}}},{key:"applyInner",value:function applyInner(r){if(!r.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");for(var o=new EditorState(this.config),i=this.config.fields,a=0;a<i.length;a++){var c=i[a];o[c.name]=c.apply(r,this[c.name],this,o)}return o}},{key:"tr",get:function get(){return new _(this)}},{key:"reconfigure",value:function reconfigure(r){for(var o=new A(this.schema,r.plugins),i=o.fields,a=new EditorState(o),c=0;c<i.length;c++){var u=i[c].name;a[u]=this.hasOwnProperty(u)?this[u]:i[c].init(r,a)}return a}},{key:"toJSON",value:function toJSON(r){var o={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(o.storedMarks=this.storedMarks.map(function(r){return r.toJSON()})),r&&"object"==_typeof(r))for(var i in r){if("doc"==i||"selection"==i)throw new RangeError("The JSON fields `doc` and `selection` are reserved");var a=r[i],c=a.spec.state;c&&c.toJSON&&(o[i]=c.toJSON.call(a,this[a.key]))}return o}}],[{key:"create",value:function create(r){for(var o=new A(r.doc?r.doc.type.schema:r.schema,r.plugins),i=new EditorState(o),a=0;a<o.fields.length;a++)i[o.fields[a].name]=o.fields[a].init(r,i);return i}},{key:"fromJSON",value:function fromJSON(r,o,i){if(!o)throw new RangeError("Invalid input for EditorState.fromJSON");if(!r.schema)throw new RangeError("Required config field 'schema' missing");var c=new A(r.schema,r.plugins),u=new EditorState(c);return c.fields.forEach(function(c){if("doc"==c.name)u.doc=a.Node.fromJSON(r.schema,o.doc);else if("selection"==c.name)u.selection=p.fromJSON(u.doc,o.selection);else if("storedMarks"==c.name)o.storedMarks&&(u.storedMarks=o.storedMarks.map(r.schema.markFromJSON));else{if(i)for(var g in i){var v=i[g],b=v.spec.state;if(v.key==c.name&&b&&b.fromJSON&&Object.prototype.hasOwnProperty.call(o,g))return void(u[c.name]=b.fromJSON.call(v,r,o[g],u))}u[c.name]=c.init(r,u)}}),u}}]),EditorState}();function bindProps(r,o,i){for(var a in r){var c=r[a];c instanceof Function?c=c.bind(o):"handleDOMEvents"==a&&(c=bindProps(c,o,{})),i[a]=c}return i}var R=function(){function Plugin(r){_classCallCheck(this,Plugin),this.spec=r,this.props={},r.props&&bindProps(r.props,this,this.props),this.key=r.key?r.key.key:createKey("plugin")}return _createClass(Plugin,[{key:"getState",value:function getState(r){return r[this.key]}}]),Plugin}(),I=Object.create(null);function createKey(r){return r in I?r+"$"+ ++I[r]:(I[r]=0,r+"$")}var L=function(){function PluginKey(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"key";_classCallCheck(this,PluginKey),this.key=createKey(r)}return _createClass(PluginKey,[{key:"get",value:function get(r){return r.config.pluginsByKey[this.key]}},{key:"getState",value:function getState(r){return r[this.key]}}]),PluginKey}();o.AllSelection=x,o.EditorState=N,o.NodeSelection=E,o.Plugin=R,o.PluginKey=L,o.Selection=p,o.SelectionRange=g,o.TextSelection=b,o.Transaction=_},38393:function(r,o,i){"use strict";var a,c=Object.defineProperty,u=Object.getOwnPropertyDescriptor,p=Object.getOwnPropertyNames,g=Object.prototype.hasOwnProperty,v={};((r,o)=>{for(var i in o)c(r,i,{get:o[i],enumerable:!0})})(v,{Strike:()=>w,default:()=>x,inputRegex:()=>k,pasteRegex:()=>E}),r.exports=(a=v,((r,o,i,a)=>{if(o&&"object"==typeof o||"function"==typeof o)for(let v of p(o))g.call(r,v)||v===i||c(r,v,{get:()=>o[v],enumerable:!(a=u(o,v))||a.enumerable});return r})(c({},"__esModule",{value:!0}),a));var b=i(99248),k=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,E=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,w=b.Mark.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:r=>!!r.includes("line-through")&&{}}]},renderHTML({HTMLAttributes:r}){return["s",(0,b.mergeAttributes)(this.options.HTMLAttributes,r),0]},markdownTokenName:"del",parseMarkdown:(r,o)=>o.applyMark("strike",o.parseInline(r.tokens||[])),renderMarkdown:(r,o)=>`~~${o.renderChildren(r)}~~`,addCommands(){return{setStrike:()=>({commands:r})=>r.setMark(this.name),toggleStrike:()=>({commands:r})=>r.toggleMark(this.name),unsetStrike:()=>({commands:r})=>r.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[(0,b.markInputRule)({find:k,type:this.type})]},addPasteRules(){return[(0,b.markPasteRule)({find:E,type:this.type})]}}),x=w},38882:function(r,o,i){r.exports=i(21765)},39007:function(r,o,i){"use strict";var a,c=Object.defineProperty,u=Object.getOwnPropertyDescriptor,p=Object.getOwnPropertyNames,g=Object.prototype.hasOwnProperty,v={};((r,o)=>{for(var i in o)c(r,i,{get:o[i],enumerable:!0})})(v,{Italic:()=>C,default:()=>_,starInputRegex:()=>k,starPasteRegex:()=>E,underscoreInputRegex:()=>w,underscorePasteRegex:()=>x}),r.exports=(a=v,((r,o,i,a)=>{if(o&&"object"==typeof o||"function"==typeof o)for(let v of p(o))g.call(r,v)||v===i||c(r,v,{get:()=>o[v],enumerable:!(a=u(o,v))||a.enumerable});return r})(c({},"__esModule",{value:!0}),a));var b=i(99248),k=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,E=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,w=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,x=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,C=b.Mark.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:r=>"normal"!==r.style.fontStyle&&null},{style:"font-style=normal",clearMark:r=>r.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:r}){return["em",(0,b.mergeAttributes)(this.options.HTMLAttributes,r),0]},addCommands(){return{setItalic:()=>({commands:r})=>r.setMark(this.name),toggleItalic:()=>({commands:r})=>r.toggleMark(this.name),unsetItalic:()=>({commands:r})=>r.unsetMark(this.name)}},markdownTokenName:"em",parseMarkdown:(r,o)=>o.applyMark("italic",o.parseInline(r.tokens||[])),renderMarkdown:(r,o)=>`*${o.renderChildren(r)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[(0,b.markInputRule)({find:k,type:this.type}),(0,b.markInputRule)({find:w,type:this.type})]},addPasteRules(){return[(0,b.markPasteRule)({find:E,type:this.type}),(0,b.markPasteRule)({find:x,type:this.type})]}}),_=C},40002:function(r,o,i){"use strict";var a,c=Object.create,u=Object.defineProperty,p=Object.getOwnPropertyDescriptor,g=Object.getOwnPropertyNames,v=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty,__copyProps=(r,o,i,a)=>{if(o&&"object"==typeof o||"function"==typeof o)for(let c of g(o))b.call(r,c)||c===i||u(r,c,{get:()=>o[c],enumerable:!(a=p(o,c))||a.enumerable});return r},__toESM=(r,o,i)=>(i=null!=r?c(v(r)):{},__copyProps(!o&&r&&r.__esModule?i:u(i,"default",{value:r,enumerable:!0}),r)),k={};((r,o)=>{for(var i in o)u(r,i,{get:o[i],enumerable:!0})})(k,{AspectRatioControl:()=>cs,AttachmentTypeControl:()=>Hd,AttributesControl:()=>mf,BackgroundControl:()=>jl,BoxShadowRepeaterControl:()=>lr,ChipsControl:()=>oo,ClearIconButton:()=>ClearIconButton,ColorControl:()=>Lt,ControlActions:()=>ControlActions,ControlActionsProvider:()=>ControlActionsProvider,ControlAdornments:()=>ControlAdornments,ControlAdornmentsProvider:()=>ControlAdornmentsProvider,ControlFormLabel:()=>ControlFormLabel,ControlReplacementsProvider:()=>ControlReplacementsProvider,ControlToggleButtonGroup:()=>ControlToggleButtonGroup,DateRangeControl:()=>Ip,DateTimeControl:()=>Sp,DisplayConditionsControl:()=>lf,EmailFormActionControl:()=>jd,EqualUnequalSizesControl:()=>EqualUnequalSizesControl,FilterRepeaterControl:()=>Gr,FontFamilyControl:()=>Ti,GapControl:()=>GapControl,GridSpanControl:()=>Gd,HtmlTagControl:()=>Pa,ImageControl:()=>Te,InlineEditingControl:()=>gd,InlineEditor:()=>md,InlineEditorToolbar:()=>InlineEditorToolbar,ItemSelector:()=>ItemSelector,KeyValueControl:()=>Xl,LinkControl:()=>ma,LinkedDimensionsControl:()=>LinkedDimensionsControl,MentionTextAreaControl:()=>Ve,NumberControl:()=>wo,NumberInput:()=>pt,PopoverContent:()=>PopoverContent,PopoverGridContainer:()=>rr,PositionControl:()=>PositionControl,PromotionTrigger:()=>of,PropKeyProvider:()=>PropKeyProvider,PropProvider:()=>PropProvider,QueryChipsControl:()=>La,QueryControl:()=>ca,QueryFilterRepeaterControl:()=>Ha,RepeatableControl:()=>Wl,Repeater:()=>Repeater3,SelectControl:()=>_e,SelectControlWrapper:()=>Qr,SizeComponent:()=>SizeComponent,SizeControl:()=>Ct,StrokeControl:()=>zt,StyledToggleButton:()=>mo,StyledToggleButtonGroup:()=>ho,SvgMediaControl:()=>Rs,SwitchControl:()=>fa,TextAreaControl:()=>De,TextControl:()=>Me,TimeRangeControl:()=>Hp,TimeStringControl:()=>zp,ToggleButtonGroupUi:()=>go,ToggleControl:()=>bo,TransformRepeaterControl:()=>Du,TransformSettingsControl:()=>TransformSettingsControl,TransitionRepeaterControl:()=>gp,UnstableSizeControl:()=>hi,UnstableSizeField:()=>UnstableSizeField,UrlControl:()=>Mi,VideoMediaControl:()=>Vs,createControl:()=>createControl,createControlReplacementsRegistry:()=>createControlReplacementsRegistry,enqueueFont:()=>enqueueFont,getControlReplacements:()=>re,injectIntoRepeaterItemActions:()=>An,injectIntoRepeaterItemIcon:()=>_n,injectIntoRepeaterItemLabel:()=>On,isUnitExtendedOption:()=>isUnitExtendedOption,registerControlReplacement:()=>ne,trackUpgradePromotionClick:()=>trackUpgradePromotionClick,trackViewPromotion:()=>trackViewPromotion,transitionProperties:()=>Qu,transitionsItemsList:()=>Zu,useBoundProp:()=>useBoundProp,useControlActions:()=>useControlActions,useControlReplacement:()=>useControlReplacement,useFontFamilies:()=>useFontFamilies,useSyncExternalState:()=>useSyncExternalState,useTypingBuffer:()=>useTypingBuffer}),r.exports=(a=k,__copyProps(u({},"__esModule",{value:!0}),a));var E=__toESM(i(97557)),w=i(2020),x=i(79513),C=i(27723),_=__toESM(i(97557)),T=i(97557),P=i(22444),A=(0,P.createError)({code:"missing_prop_provider_prop_type",message:"Prop type is missing"}),N=(0,P.createError)({code:"unsupported_prop_provider_prop_type",message:"Parent prop type is not supported"}),R=(0,P.createError)({code:"hook_outside_provider",message:"Hook used outside of provider"}),I=(0,T.createContext)(null),PropProvider=({children:r,value:o,setValue:i,propType:a,placeholder:c,baseValue:u,isDisabled:p})=>_.createElement(I.Provider,{value:{value:o,propType:a,setValue:i,placeholder:c,baseValue:u,isDisabled:p}},r),usePropContext=()=>{const r=(0,T.useContext)(I);if(!r)throw new R({context:{hook:"usePropContext",provider:"PropProvider"}});return r},L=__toESM(i(97557)),z=i(97557),j=(0,z.createContext)(null),PropKeyProvider=({children:r,bind:o})=>{const{propType:i}=usePropContext();if(!i)throw new A({context:{bind:o}});if("array"===i.kind)return L.createElement(ArrayPropKeyProvider,{bind:o},r);if("object"===i.kind)return L.createElement(ObjectPropKeyProvider,{bind:o},r);throw new N({context:{propType:i}})},ObjectPropKeyProvider=({children:r,bind:o})=>{const i=usePropContext(),{path:a}=(0,z.useContext)(j)??{},c=i.value?.[o],u=i.placeholder?.[o],p=i.baseValue?.[o],g=i.propType.shape[o];return L.createElement(j.Provider,{value:{...i,value:c,setValue:(r,a,c)=>{const u={...i.value??i.baseValue,[o]:r};return i?.setValue(u,a,{...c,bind:o})},placeholder:u,baseValue:p,bind:o,propType:g,path:[...a??[],o]}},r)},ArrayPropKeyProvider=({children:r,bind:o})=>{const i=usePropContext(),{path:a}=(0,z.useContext)(j)??{},c=i.value?.[Number(o)],u=i.placeholder?.[Number(o)],p=i.baseValue?.[Number(o)],g=i.propType.item_prop_type;return L.createElement(j.Provider,{value:{...i,value:c,setValue:(r,a)=>{const c=[...i.value??i.baseValue??[]];return c[Number(o)]=r,i?.setValue(c,a,{bind:o})},bind:o,propType:g,path:[...a??[],o],placeholder:u??void 0,baseValue:p??void 0}},r)},usePropKeyContext=()=>{const r=(0,z.useContext)(j);if(!r)throw new R({context:{hook:"usePropKeyContext",provider:"PropKeyProvider"}});return r},B=i(97557);function useBoundProp(r){const o=usePropKeyContext(),{isValid:i,validate:a,restoreValue:c}=useValidation(o.propType),u=o.isDisabled?.(o.propType),resetValue=()=>{o.setValue(o.propType.initial_value??null)};if(!r)return{...o,disabled:u,resetValue:resetValue};const p=resolveUnionPropType(o.propType,r.key),g=void 0!==o.baseValue&&null!==o.baseValue?null:p.default,v=r.extract(o.value??g??null),b=r.extract(o.baseValue??null),k=r.extract(o.placeholder??o.baseValue??null);return{...o,propType:p,setValue:function setValue(i,c,u){if(a(i,u?.validation))return null===i?o?.setValue(null,c,u):o?.setValue(r?.create(i,c),{},u)},value:i?v:null,restoreValue:c,placeholder:k,baseValue:b,disabled:u,resetValue:resetValue}}var useValidation=r=>{const[o,i]=(0,B.useState)(!0);return{isValid:o,setIsValid:i,validate:(o,a)=>{let c=!0;return r.settings.required&&null===o&&(c=!1),a&&!a(o)&&(c=!1),i(c),c},restoreValue:()=>i(!0)}},resolveUnionPropType=(r,o)=>{let i=r;if("union"===r.kind&&(i=r.prop_types[o]),!i)throw new A({context:{key:o}});return i},V=__toESM(i(97557)),U=i(79513),ControlFormLabel=r=>V.createElement(U.FormLabel,{size:"tiny",...r}),H=__toESM(i(97557)),W=i(79513),K=__toESM(i(97557)),G=__toESM(i(97557)),J=i(97557),Y=(0,J.createContext)(null),ControlAdornmentsProvider=({children:r,items:o})=>G.createElement(Y.Provider,{value:{items:o}},r),useControlAdornments=()=>{const r=(0,J.useContext)(Y);return r?.items??[]};function ControlAdornments({customContext:r}){const o=useControlAdornments();return 0===o?.length?null:K.createElement(K.Fragment,null,o.map(({Adornment:o,id:i})=>K.createElement(o,{key:i,customContext:r})))}var ControlLabel=({children:r,...o})=>H.createElement(W.Stack,{direction:"row",alignItems:"center",justifyItems:"start",gap:.25},H.createElement(ControlFormLabel,{...o},r),H.createElement(ControlAdornments,null)),X=__toESM(i(97557)),Q=i(79513),Z=__toESM(i(97557)),ee=i(97557),te=(0,ee.createContext)([]),ControlReplacementsProvider=({replacements:r,children:o})=>Z.createElement(te.Provider,{value:r},o),useControlReplacement=r=>{const{value:o,placeholder:i}=useBoundProp(),a=(0,ee.useContext)(te);try{const c=a.find(r=>r.condition({value:o,placeholder:i}));return{ControlToRender:c?.component??r,OriginalControl:r,isReplaced:!!c}}catch{return{ControlToRender:r,OriginalControl:r}}},createControlReplacementsRegistry=()=>{const r=[];return{registerControlReplacement:function registerControlReplacement2(o){r.push(o)},getControlReplacements:function getControlReplacements2(){return r}}},{registerControlReplacement:ne,getControlReplacements:re}=createControlReplacementsRegistry();function createControl(r){return o=>{const{ControlToRender:i,OriginalControl:a,isReplaced:c}=useControlReplacement(r),u=c?{...o,OriginalControl:a}:o;return X.createElement(Q.ErrorBoundary,{fallback:null},X.createElement(i,{...u}))}}var oe=i(45643),ie=i(18998),ae="elementor/v1/settings",apiClient_getElementorSetting=r=>(0,ie.httpService)().get(`${ae}/${r}`).then(r=>formatSettingResponse(r.data)),apiClient_updateElementorSetting=(r,o)=>(0,ie.httpService)().put(`${ae}/${r}`,{value:o}),formatSettingResponse=r=>r.data.value,se="elementor_unfiltered_files_upload",le={queryKey:[se]},useUnfilteredFilesUpload=()=>(0,oe.useQuery)({...le,queryFn:()=>apiClient_getElementorSetting(se).then(r=>formatResponse(r)),staleTime:1/0});var formatResponse=r=>Boolean("1"===r),ce=__toESM(i(97557)),ue=i(2020),pe=i(24413),de=i(79513),fe=i(84792),he=i(27723),me=__toESM(i(97557)),ge=i(70374),ve=__toESM(i(97557)),ye=i(97557),be=(0,ye.createContext)(null),ControlActionsProvider=({children:r,items:o})=>ve.createElement(be.Provider,{value:{items:o}},r),useControlActions=()=>{const r=(0,ye.useContext)(be);if(!r)throw new Error("useControlActions must be used within a ControlActionsProvider");return r};function ControlActions({children:r}){const{items:o}=useControlActions(),{disabled:i}=useBoundProp();if(0===o.length||i)return r;const a=o.map(({MenuItem:r,id:o})=>me.createElement(r,{key:o}));return me.createElement(ge.FloatingActionsBar,{actions:a},r)}var ke=createControl(({mediaTypes:r=["image"]})=>{const{value:o,setValue:i,propType:a,placeholder:c}=useBoundProp(ue.imageSrcPropTypeUtil),{id:u,url:p}=o??{},{data:g,isFetching:v}=(0,fe.useWpMediaAttachment)(u?.value||null),{data:b}=(0,fe.useWpMediaAttachment)(c?.id?.value||null),k=g?.url??p?.value??b?.url??null,E=ue.imageSrcPropTypeUtil.extract(a.default??null)?.url?.value,w=p?.value&&p.value!==E?p.value:void 0,x=o?.alt?.value,{open:C}=(0,fe.useWpMediaFrame)({mediaTypes:r,multiple:!1,selected:u?.value||null,allowUrlImport:!0,onSelect:r=>{i({id:{$$type:"image-attachment-id",value:r.id},url:null})},onSelectUrl:(r,o)=>{i({id:null,url:ue.urlPropTypeUtil.create(r),alt:o?ue.stringPropTypeUtil.create(o):null})}});return ce.createElement(ControlActions,null,ce.createElement(de.Card,{variant:"outlined"},ce.createElement(de.CardMedia,{image:k,sx:{height:a.meta.isDynamic?134:150}},v?ce.createElement(de.Stack,{justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},ce.createElement(de.CircularProgress,null)):ce.createElement(ce.Fragment,null)),ce.createElement(de.CardOverlay,null,ce.createElement(de.Stack,{gap:1},ce.createElement(de.Button,{size:"tiny",color:"inherit",variant:"outlined",onClick:()=>C({mode:"browse"})},(0,he.__)("Select image","elementor")),ce.createElement(de.Button,{size:"tiny",variant:"text",color:"inherit",startIcon:ce.createElement(pe.UploadIcon,null),onClick:()=>C({mode:"upload"})},(0,he.__)("Upload","elementor")),ce.createElement(de.Button,{size:"tiny",variant:"text",color:"inherit",onClick:()=>C({mode:"url",currentUrl:w,currentAlt:x})},(0,he.__)("Insert from URL","elementor"))))))}),Ee=__toESM(i(97557)),Se=i(2020),we=i(70374),xe=i(79513),Ce={MenuListProps:{sx:{maxHeight:"160px"}}},_e=createControl(({options:r,onChange:o,MenuProps:i=Ce,ariaLabel:a})=>{const{value:c,setValue:u,disabled:p,placeholder:g}=useBoundProp(Se.stringPropTypeUtil),v=p||0===r.length;return Ee.createElement(ControlActions,null,Ee.createElement(xe.Select,{sx:{overflow:"hidden"},displayEmpty:!0,size:"tiny",MenuProps:i,"aria-label":a||g,renderValue:o=>getSelectRenderValue(r,g,o),value:c??"",onChange:r=>{const i=r.target.value||null;o?.(i,c),u(i)},disabled:v,fullWidth:!0},r.map(({label:r,...o})=>Ee.createElement(we.MenuListItem,{key:o.value,...o,value:o.value??""},r))))});function getSelectRenderValue(r,o,i){const optionWithValue=o=>r.find(({value:r})=>r===o);if(!isUnsetSelectValue(i))return optionWithValue(i)?.label??i;if(o){const r=optionWithValue(o)?.label??o;return Ee.createElement(xe.Typography,{component:"span",variant:"inherit",color:"text.tertiary"},r)}return r.find(({value:r})=>isUnsetSelectValue(r))?.label??""}function isUnsetSelectValue(r){return null==r||""===r}var Te=createControl(({sizes:r,label:o=(0,C.__)("Image","elementor")})=>{const i=useBoundProp(w.imagePropTypeUtil);return E.createElement(PropProvider,{...i},E.createElement(x.Stack,{gap:1.5},E.createElement(ControlLabel,null,o),E.createElement(ImageSrcControl,null),E.createElement(x.Grid,{container:!0,gap:1.5,alignItems:"center",flexWrap:"nowrap"},E.createElement(x.Grid,{item:!0,xs:6},E.createElement(ControlFormLabel,null,(0,C.__)("Resolution","elementor"))),E.createElement(x.Grid,{item:!0,xs:6,sx:{overflow:"hidden"}},E.createElement(ImageSizeControl,{sizes:r})))))}),ImageSrcControl=()=>{const{data:r}=useUnfilteredFilesUpload(),o=r?["image","svg"]:["image"];return E.createElement(PropKeyProvider,{bind:"src"},E.createElement(ke,{mediaTypes:o}))},ImageSizeControl=({sizes:r})=>E.createElement(PropKeyProvider,{bind:"size"},E.createElement(_e,{options:r})),Oe=__toESM(i(97557)),Pe=i(2020),Ae=i(79513),Me=createControl(({placeholder:r,error:o,inputValue:i,inputDisabled:a,helperText:c,sx:u,ariaLabel:p})=>{const{value:g,setValue:v,disabled:b,placeholder:k}=useBoundProp(Pe.stringPropTypeUtil),E=r??k??void 0;return Oe.createElement(ControlActions,null,Oe.createElement(Ae.TextField,{size:"tiny",fullWidth:!0,disabled:a??b,value:i??g??"",onChange:r=>v(r.target.value),placeholder:E,error:o,helperText:c,sx:u,inputProps:{...p?{"aria-label":p}:{}}}))}),Ne=__toESM(i(97557)),Re=i(2020),Ie=i(79513),De=createControl(({placeholder:r,ariaLabel:o})=>{const{value:i,setValue:a,disabled:c,placeholder:u}=useBoundProp(Re.stringPropTypeUtil),p=r??u??void 0;return Ne.createElement(ControlActions,null,Ne.createElement(Ie.TextField,{size:"tiny",multiline:!0,fullWidth:!0,minRows:5,disabled:c,value:i??"",onChange:r=>{a(r.target.value)},placeholder:p,inputProps:{...o?{"aria-label":o}:{}}}))}),Le=__toESM(i(97557)),Fe=i(97557),ze=i(37112),je=i(2020),Be=(0,i(79513).styled)("div")(({theme:r})=>({position:"relative","& .p-mention":{width:"100%",position:"relative"},"& textarea":{width:"100%",boxSizing:"border-box",fontFamily:"inherit",fontSize:r.typography.pxToRem(12),lineHeight:1.4375,padding:"4px 8px",borderRadius:r.shape.borderRadius,border:`1px solid ${r.palette.divider}`,backgroundColor:"transparent",color:"inherit",resize:"vertical",outline:"none",transition:"border-color 150ms ease-in-out","&:hover":{borderColor:r.palette.action.active},"&:focus":{borderColor:r.palette.primary.main,borderWidth:2,padding:"3px 7px"},"&:disabled":{opacity:.38,cursor:"default"},"&::placeholder":{color:"inherit",opacity:.5}},"& .p-mention-panel":{fontFamily:"inherit",fontSize:r.typography.pxToRem(12),backgroundColor:r.palette.background.paper,border:`1px solid ${r.palette.divider}`,borderRadius:r.shape.borderRadius,boxShadow:r.shadows[4],maxHeight:"200px",overflow:"auto",zIndex:r.zIndex.modal,maxWidth:"100%",right:0,left:"auto !important"},"& .p-mention-items":{listStyle:"none",margin:0,padding:"4px 0"},"& .p-mention-item":{padding:"6px 12px",cursor:"pointer",color:r.palette.text.primary,"&:hover":{backgroundColor:r.palette.action.hover},"&.p-highlight":{backgroundColor:r.palette.action.selected}},'&[data-single-line="true"] textarea':{resize:"none"}}));function createMentionPattern(r,o){const i=r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(`${"start"===o?"^":""}@${i}(?=\\s|$|[^a-zA-Z0-9_-])`,"g")}var Ve=createControl(({placeholder:r,ariaLabel:o,suggestions:i,rows:a=5,triggerPosition:c="auto"})=>{const{value:u,setValue:p,disabled:g}=useBoundProp(je.stringPropTypeUtil),[v,b]=(0,Fe.useState)([]),k=(0,Fe.useCallback)(r=>{let o=r;for(const r of i){const i=createMentionPattern(r.value,c);o=o.replace(i,`[${r.value}]`)}return o},[i,c]),E=(0,Fe.useCallback)(r=>{const o=r.target.value,i=k(o);p(i)},[p,k]),w=(0,Fe.useCallback)(r=>{if("start"===c){if(0!==r.originalEvent.target.selectionStart-r.query.length-r.trigger.length)return void b([])}const o=r.query.toLowerCase(),a=i.filter(r=>r.label.toLowerCase().includes(o)||r.value.toLowerCase().includes(o));b(a)},[i,c]);return Le.createElement(ControlActions,null,Le.createElement(Be,{"data-single-line":1===a?"true":void 0},Le.createElement(ze.Mention,{value:u??"",onChange:E,suggestions:v,onSearch:w,field:"value",trigger:"@",rows:a,disabled:g,placeholder:r,itemTemplate:SuggestionItem,...o?{"aria-label":o}:{}})))}),SuggestionItem=r=>Le.createElement("span",null,r.label),$e=__toESM(i(97557)),Ue=i(97557),He=i(2020),We=i(74518),qe=i(79513),Ke=__toESM(i(97557)),Ge=i(24413),Je=i(79513),Ye=i(97557);function useTypingBuffer(r={}){const{limit:o=3,timeout:i=600}=r,a=(0,Ye.useRef)(""),c=(0,Ye.useRef)(null);return(0,Ye.useEffect)(()=>()=>{a.current="",c.current&&(clearTimeout(c.current),c.current=null)},[]),{buffer:a.current,appendKey:r=>(a.current=(a.current+r).slice(-o),c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{a.current="",c.current=null},i),a.current),startsWith:(r,o)=>!(3<r.length&&2>o.length)&&r.startsWith(o)}}var Xe=["px","%","em","rem","vw","vh","ch"],Qe="px",Ze=NaN,et=["auto","custom"];function isUnitExtendedOption(r){return et.includes(r)}var nt=__toESM(i(97557)),rt=i(97557),ot=i(2020),it=i(70374),at=i(79513),st=__toESM(i(97557)),lt=i(97557),ct=i(79513),ut=["e","E","+"],pt=(0,lt.forwardRef)((r,o)=>{const[i,a]=(0,lt.useState)(0);return st.createElement(ct.TextField,{...r,ref:o,key:i,onKeyDown:o=>{!function blockRestrictedKeys(r,o){const i=[...ut];o>=0&&i.push("-");i.includes(r.key)&&r.preventDefault()}(o,r.inputProps?.min),r.onKeyDown?.(o)},onBlur:o=>{r.onBlur?.(o);const{valid:i}=o.target.validity;i||a(r=>r+1)}})});var dt=(0,rt.forwardRef)(({placeholder:r,type:o,value:i,onChange:a,onBlur:c,onKeyDown:u,onKeyUp:p,InputProps:g,inputProps:v,disabled:b,isPopoverOpen:k,id:E},w)=>{const{placeholder:x}=useBoundProp(ot.sizePropTypeUtil);return nt.createElement(pt,{ref:w,sx:{input:{cursor:g.readOnly?"default !important":void 0}},size:"tiny",fullWidth:!0,type:o,value:i,onInput:a,onKeyDown:u,onKeyUp:p,disabled:b,onBlur:c,focused:!!k||void 0,placeholder:r??(String(x?.size??"")||void 0),InputProps:g,inputProps:v,id:E})}),SelectionEndAdornment=({options:r,alternativeOptionLabels:o={},onClick:i,value:a,menuItemsAttributes:c={},disabled:u})=>{const p=(0,at.usePopupState)({variant:"popover",popupId:(0,rt.useId)()}),{placeholder:g,showPrimaryColor:v}=function useUnitPlaceholder(r){const{value:o,placeholder:i}=useBoundProp(ot.sizePropTypeUtil),a=o?.size,c=o?.unit,u="custom"===r&&Boolean(a),p="auto"===r,g=p||u||Boolean(a);if(!i)return{placeholder:null,showPrimaryColor:g};const v=!c&&r===Qe;return{placeholder:v?i.unit:void 0,showPrimaryColor:g}}(a),b={display:"flex",flexDirection:"column",justifyContent:"center"};return nt.createElement(at.InputAdornment,{position:"end"},nt.createElement(ft,{isPrimaryColor:v,size:"small",disabled:u,...(0,at.bindTrigger)(p)},g??o[a]??a),nt.createElement(at.Menu,{MenuListProps:{dense:!0},...(0,at.bindMenu)(p)},r.map((a,u)=>nt.createElement(it.MenuListItem,{key:a,onClick:()=>(o=>{i(r[o]),p.close()})(u),...c?.[a],primaryTypographyProps:{variant:"caption",sx:{...b,lineHeight:"1"}},menuItemTextProps:{sx:b}},o[a]??a.toUpperCase()))))};var ft=(0,at.styled)(at.Button,{shouldForwardProp:r=>"isPrimaryColor"!==r})(({isPrimaryColor:r,theme:o})=>({color:r?o.palette.text.primary:o.palette.text.tertiary,font:"inherit",minWidth:"initial",textTransform:"uppercase"})),SizeInput=({units:r,handleUnitChange:o,handleSizeChange:i,placeholder:a,startIcon:c,onBlur:u,onFocus:p,onClick:g,size:v,unit:b,popupState:k,disabled:E,min:w,id:x,ariaLabel:C})=>{const{appendKey:_,startsWith:T}=useTypingBuffer(),P=isUnitExtendedOption(b)?"text":"number",A=!isUnitExtendedOption(b)&&Number.isNaN(v)?"":v??"",N={"aria-controls":k.isOpen?k.popupId:void 0,"aria-haspopup":!0},R=r.includes("custom")?{custom:N}:void 0,I={custom:Ke.createElement(Ge.MathFunctionIcon,{fontSize:"tiny"})},L={...N,readOnly:isUnitExtendedOption(b),autoComplete:"off",onClick:g,onFocus:p,startAdornment:c?Ke.createElement(Je.InputAdornment,{position:"start",disabled:E},c):void 0,endAdornment:Ke.createElement(SelectionEndAdornment,{disabled:E,options:r,onClick:o,value:b,alternativeOptionLabels:I,menuItemsAttributes:R})};return Ke.createElement(ControlActions,null,Ke.createElement(Je.Box,null,Ke.createElement(dt,{disabled:E,placeholder:a,type:P,value:A,onChange:i,onKeyDown:i=>{const{key:a,altKey:c,ctrlKey:u,metaKey:p}=i;if(c||u||p)return;if(isUnitExtendedOption(b)&&!isNaN(Number(a))){const i=r?.[0];return void(i&&o(i))}if(!/^[a-zA-Z%]$/.test(a))return;i.preventDefault();const g=a.toLowerCase(),v=_(g),k=r.find(r=>T(r,v));k&&o(k)},onBlur:u,InputProps:L,inputProps:{min:w,step:"any","aria-label":C},isPopoverOpen:k.isOpen,id:x})))},ht=__toESM(i(97557)),mt=i(97557),gt=i(70374),vt=i(24413),yt=i(79513),bt=i(27723),TextFieldPopover=r=>{const{popupState:o,restoreValue:i,anchorRef:a,value:c,onChange:u}=r,p=(0,mt.useRef)(null);(0,mt.useEffect)(()=>{o.isOpen&&requestAnimationFrame(()=>{p.current&&p.current.focus()})},[o.isOpen]);const handleClose=()=>{i(),o.close()};return ht.createElement(yt.Popover,{disablePortal:!0,slotProps:{paper:{sx:{borderRadius:2,width:a.current?.offsetWidth+"px"}}},...(0,yt.bindPopover)(o),anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},onClose:handleClose},ht.createElement(gt.PopoverHeader,{title:(0,bt.__)("CSS function","elementor"),onClose:handleClose,icon:ht.createElement(vt.MathFunctionIcon,{fontSize:"tiny"})}),ht.createElement(yt.TextField,{value:c,onChange:u,onKeyPress:r=>{"enter"===r.key.toLowerCase()&&handleClose()},size:"tiny",type:"text",fullWidth:!0,inputProps:{ref:p},sx:{pt:0,pr:1.5,pb:1.5,pl:1.5}}))},kt=i(97557);var Et=i(97557),useSyncExternalState=({external:r,setExternal:o,persistWhen:i,fallback:a})=>{function toInternal(r,o){return r||a(o)}const[c,u]=(0,Et.useState)(toInternal(r,null));(0,Et.useEffect)(()=>{u(o=>toInternal(r,o))},[r]);return[c,(r,a,p)=>{const g=("function"==typeof r?r:()=>r)(c);u(g),o(function toExternal(r){return i(r)?r:null}(g),a,p)}]},getPropTypeSettings=r=>r.settings,St={length:"px",angle:"deg",time:"ms"},wt={length:[...Xe],angle:["deg","rad","grad","turn"],time:["s","ms"]},xt="fx",Ct=createControl(({variant:r="length",defaultUnit:o,units:i,placeholder:a,startIcon:c,anchorRef:u,extendedOptions:p,disableCustom:g,min:v=0,enablePropTypeUnits:b=!1,id:k,ariaLabel:E})=>{const{value:w,setValue:x,disabled:C,restoreValue:_,placeholder:T,propType:P}=useBoundProp(He.sizePropTypeUtil),A=o??T?.unit??St[r],N=(0,We.useActiveBreakpoint)(),R=function useSizeExtendedOptions(r,o){return(0,kt.useMemo)(()=>{const i=[...r];return o||i.includes("custom")?r.includes("custom")&&i.splice(i.indexOf("custom"),1):i.push("custom"),i},[r,o])}(p||[],g??!1),I=function resolveUnits(r,o,i,a,c){const u=[...wt[i]];if(!o)return[...a??u,...c||[]];return getPropTypeSettings(r)?.available_units??u}(P,b,r,i,R),L=(0,qe.usePopupState)({variant:"popover"}),z=(0,Ue.useMemo)(()=>function createStateFromSizeProp(r,o,i="",a=""){const c=r?.unit??o,u=r?.size??i;return{numeric:isUnitExtendedOption(c)||isNaN(Number(u))||!u&&0!==u?Ze:Number(u),custom:"custom"===c?String(u):a,unit:c}}(w,A),[w,A]),[j,B]=useSyncExternalState({external:z,setExternal:(r,o,i)=>x(extractValueFromState(r),o,i),persistWhen:r=>!!extractValueFromState(r),fallback:r=>({unit:r?.unit??A,numeric:r?.numeric??Ze,custom:r?.custom??""})}),{size:V=Ze,unit:U=A}=extractValueFromState(j,!0)||{},handleSizeChange=r=>{const o=r.target.value,i=r.target.validity.valid;"auto"!==U?B(r=>({...r,["custom"===U?"custom":"numeric"]:formatSize(o,U),unit:U}),void 0,{validation:()=>i}):B(r=>({...r,unit:U}))},H=(0,Ue.useCallback)(()=>{L&&L.isOpen&&L.close()},[L]);return(0,Ue.useEffect)(()=>{H()},[N]),$e.createElement($e.Fragment,null,$e.createElement(SizeInput,{disabled:C,size:V,unit:U,units:[...I],placeholder:a,startIcon:c,handleSizeChange:handleSizeChange,handleUnitChange:r=>{"custom"===r&&L.open(u?.current),B(o=>({...o,unit:r}))},onBlur:_,onClick:r=>{r.target.closest("input")&&"custom"===j.unit&&L.open(u?.current)},popupState:L,min:v,id:k,ariaLabel:E}),u?.current&&L.isOpen&&$e.createElement(TextFieldPopover,{popupState:L,anchorRef:u,restoreValue:_,value:V,onChange:handleSizeChange}))});function formatSize(r,o){return isUnitExtendedOption(o)?"auto"===o?"":String(r??""):r||0===r?Number(r):NaN}function extractValueFromState(r,o=!1){if(!r)return null;if(!r?.unit)return{size:Ze,unit:Qe};const{unit:i}=r;if("auto"===i)return{size:"",unit:i};if("custom"===i)return{size:r.custom??"",unit:"custom"};const a=r.numeric;return o||null!=a&&!Number.isNaN(a)?{size:a,unit:i}:null}var _t=__toESM(i(97557)),Tt=i(97557),Ot=i(2020),Pt=i(79513),At=i(27723),Mt=__toESM(i(97557)),Nt=i(79513),SectionContent=({gap:r=.5,sx:o,children:i})=>Mt.createElement(Nt.Stack,{gap:r,sx:{...o}},i),Rt=__toESM(i(97557)),It=i(2020),Dt=i(79513),Lt=createControl(({propTypeUtil:r=It.colorPropTypeUtil,anchorEl:o,slotProps:i={},id:a,...c})=>{const{value:u,setValue:p,placeholder:g,disabled:v}=useBoundProp(r),b=c.placeholder??g;return Rt.createElement(ControlActions,null,Rt.createElement(Dt.UnstableColorField,{id:a,size:"tiny",fullWidth:!0,value:u??"",placeholder:b??"",onChange:r=>{p(r||null)},...c,disabled:v,slotProps:{...i,colorPicker:{anchorEl:o,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:-10},slotProps:{colorIndicator:{value:u??b??""},colorBox:{value:u??b??""}}}}}))}),Ft=["px","em","rem"],zt=createControl(()=>{const r=useBoundProp(Ot.strokePropTypeUtil),o=(0,Tt.useRef)(null);return _t.createElement(PropProvider,{...r},_t.createElement(SectionContent,{gap:2},_t.createElement(jt,{bind:"width",label:(0,At.__)("Stroke width","elementor"),ref:o},_t.createElement(Ct,{units:Ft,anchorRef:o})),_t.createElement(jt,{bind:"color",label:(0,At.__)("Stroke color","elementor")},_t.createElement(Lt,null))))}),jt=(0,Tt.forwardRef)(({bind:r,label:o,children:i},a)=>_t.createElement(PropKeyProvider,{bind:r},_t.createElement(Pt.Grid,{container:!0,gap:2,alignItems:"center",flexWrap:"nowrap",ref:a},_t.createElement(Pt.Grid,{item:!0,xs:6},_t.createElement(ControlFormLabel,null,o)),_t.createElement(Pt.Grid,{item:!0,xs:6},i)))),Bt=__toESM(i(97557)),Vt=i(97557),$t=i(2020),Ut=i(79513),Ht=i(27723),Wt=__toESM(i(97557)),qt=i(24413),Kt=i(79513),Gt=i(27723),Jt=__toESM(i(97557)),Yt=i(97557),Xt=i(79513),Qt=i(97557),Zt=i(74518),usePopoverDismiss=({isOpen:r,onClose:o})=>{const i=(0,Qt.useRef)(o);i.current=o;const a=(0,Zt.useActiveBreakpoint)(),c=(0,Zt.useBreakpoints)(),u=(0,Qt.useMemo)(()=>(r=>r.map(r=>[r.id,r.width??"",r.type??""].join(":")).join("|"))(c),[c]),p=(0,Qt.useRef)(void 0),g=(0,Qt.useRef)(null);(0,Qt.useEffect)(()=>{if(!r)return p.current=a,void(g.current=u);const o=p.current,c=g.current;(void 0!==o&&o!==a||null!==c&&c!==u)&&i.current(),p.current=a,g.current=u},[a,u,r]),(0,Qt.useEffect)(()=>{if(!r)return;const onKeyDown=r=>{"Escape"!==r.key||r.defaultPrevented||i.current()};return document.addEventListener("keydown",onKeyDown),()=>{document.removeEventListener("keydown",onKeyDown)}},[r])},en=new class{listeners=new Map;subscribe(r,o){this.listeners.has(r)||this.listeners.set(r,new Set);const i=this.listeners.get(r);i&&i.add(o)}unsubscribe(r,o){const i=this.listeners.get(r);i&&(i.delete(o),0===i.size&&this.listeners.delete(r))}emit(r,o){const i=this.listeners.get(r);i&&i.forEach(r=>r(o))}clearAll(){this.listeners.clear()}},tn=(0,i(97557).createContext)({index:-1,value:{}}),nn=(0,Yt.createContext)(null),useRepeaterContext=()=>{const r=(0,Yt.useContext)(nn),o=(0,Yt.useContext)(tn);if(!r)throw new Error("useRepeaterContext must be used within a RepeaterContextProvider");return{...r,...o}},RepeaterContextProvider=({children:r,initial:o,propTypeUtil:i,isItemDisabled:a=()=>!1})=>{const{value:c,setValue:u}=useBoundProp(i),[p,g]=useSyncExternalState({external:c,fallback:()=>[],setExternal:u,persistWhen:()=>!0}),[v,b]=(0,Yt.useState)(()=>p?.map(()=>generateUniqueKey())??[]);(0,Yt.useEffect)(()=>{const r=p?.length??0;b(o=>{const i=o.length;return i===r?o:i>r?o.slice(0,r):[...o,...Array.from({length:r-i},generateUniqueKey)]})},[p?.length]);const k=(0,Yt.useMemo)(()=>v.map((r,o)=>({key:r,item:p[o]})).filter(({item:r})=>void 0!==r),[v,p]),[E,w]=(0,Yt.useState)(-1),[x,C]=(0,Yt.useState)(null),_=-1!==E,T=(0,Xt.usePopupState)({variant:"popover"});return usePopoverDismiss({isOpen:_,onClose:()=>{_&&(w(-1),C(null),T.close())}}),Jt.createElement(nn.Provider,{value:{isOpen:_,openItemIndex:E,setOpenItemIndex:w,items:k??[],setItems:r=>{g(r.map(({item:r})=>r))},popoverState:T,initial:o,updateItem:(r,o)=>{const i=[...p.slice(0,o),r,...p.slice(o+1)];g(i)},addItem:(r,a)=>{const c=a?.item??{...o},u=a?.index??p.length,k=generateUniqueKey(),E=[...p];E.splice(u,0,c),g(E),b([...v.slice(0,u),k,...v.slice(u)]),w(u),T.open(x??r),en.emit(`${i.key}-item-added`,{itemValue:o.value})},removeItem:r=>{const o=p[r];g(p.filter((o,i)=>i!==r)),b(v.filter((o,i)=>i!==r)),en.emit(`${i.key}-item-removed`,{itemValue:o?.value})},rowRef:x,setRowRef:C,isItemDisabled:r=>a(k[r].item)}},r)},generateUniqueKey=()=>Date.now()+Math.floor(1e6*Math.random()),rn="tiny",TooltipAddItemAction=({disabled:r=!1,enableTooltip:o=!1,tooltipContent:i=null,newItemIndex:a,ariaLabel:c})=>{const{addItem:u}=useRepeaterContext();return Wt.createElement(ConditionalToolTip,{content:i,enable:o},Wt.createElement(Kt.Box,{component:"span",sx:{cursor:r?"not-allowed":"pointer"}},Wt.createElement(Kt.IconButton,{size:rn,disabled:r,onClick:r=>u(r,{index:a}),"aria-label":(0,Gt.sprintf)((0,Gt.__)("Add %s item","elementor"),c?.toLowerCase())},Wt.createElement(qt.PlusIcon,{fontSize:rn}))))},ConditionalToolTip=({children:r,enable:o,content:i})=>o&&i?Wt.createElement(Kt.Infotip,{placement:"right",color:"secondary",content:i},r):r,an=__toESM(i(97557)),sn=__toESM(i(97557)),ln=i(24413),cn=i(79513),un=i(27723),SortableProvider=r=>sn.createElement(cn.List,{sx:{p:0,my:-.5,mx:0}},sn.createElement(cn.UnstableSortableProvider,{restrictAxis:!0,disableDragOverlay:!1,variant:"static",...r})),SortableItem=({id:r,children:o,disabled:i})=>sn.createElement(cn.UnstableSortableItem,{id:r,disabled:i,render:({itemProps:r,triggerProps:a,itemStyle:c,triggerStyle:u,showDropIndication:p,dropIndicationStyle:g})=>sn.createElement(pn,{...r,style:c,tabIndex:-1},!i&&sn.createElement(SortableTrigger,{...a,style:u}),o,p&&sn.createElement(dn,{style:g}))}),pn=(0,cn.styled)(cn.ListItem)` position: relative; margin-inline: 0px; padding-inline: 0px; padding-block: ${({theme:r})=>r.spacing(.5)}; & .class-item-sortable-trigger { color: ${({theme:r})=>r.palette.action.active}; height: 100%; display: flex; align-items: center; visibility: hidden; position: absolute; top: 50%; padding-inline-end: ${({theme:r})=>r.spacing(.5)}; transform: translate( -75%, -50% ); } &[aria-describedby=''] > .MuiTag-root { background-color: ${({theme:r})=>r.palette.background.paper}; box-shadow: ${({theme:r})=>r.shadows[3]}; } &:hover, &:focus-within { & .class-item-sortable-trigger { visibility: visible; } } `,SortableTrigger=r=>sn.createElement("div",{...r,role:"button",className:"class-item-sortable-trigger",tabIndex:0,"aria-label":(0,un.__)("Drag item","elementor")},sn.createElement(ln.GripVerticalIcon,{fontSize:"tiny"})),dn=(0,cn.styled)(cn.Divider)` height: 0px; border: none; overflow: visible; &:after { --height: 2px; content: ''; display: block; width: 100%; height: var( --height ); margin-block: calc( -1 * var( --height ) / 2 ); border-radius: ${({theme:r})=>r.spacing(.5)}; background-color: ${({theme:r})=>r.palette.text.primary}; } `,ItemsContainer=({isSortable:r=!0,children:o})=>{const{items:i,setItems:a}=useRepeaterContext(),c=i.map(({key:r})=>r);if(!o)return null;return an.createElement(an.Fragment,null,an.createElement(SortableProvider,{value:c,onChange:r=>{a(r.map(r=>{const o=i.findIndex(o=>o.key===r);return i[o]}))}},c.map((a,c)=>{const u=i[c].item;return an.createElement(SortableItem,{id:a,key:`sortable-${a}`,disabled:!r},an.createElement(tn.Provider,{value:{index:c,value:u}},o))})))},hn=__toESM(i(97557)),mn=i(97557),gn=i(79513),vn=i(27723),yn=i(97557),bn=(0,yn.createContext)(void 0),useRepeatableControlContext=()=>{const r=(0,yn.useContext)(bn);if(!r)throw new Error("useRepeatableControlContext must be used within RepeatableControl");return r},kn=__toESM(i(97557)),En=i(97557),Sn=i(79513),wn=(0,En.forwardRef)((r,o)=>kn.createElement(Sn.UnstableTag,{ref:o,fullWidth:!0,showActionsOnHover:!0,variant:"outlined",sx:{minHeight:r=>r.spacing(3.5)},...r})),xn=i(87627),{Slot:Cn,inject:_n}=(0,xn.createReplaceableLocation)(),{Slot:Tn,inject:On}=(0,xn.createReplaceableLocation)(),{Slot:Pn,inject:An}=(0,xn.createLocation)(),Item=({Label:r,Icon:o,actions:i})=>{const{popoverState:a,setRowRef:c,openItemIndex:u,setOpenItemIndex:p,index:g=-1,value:v,isItemDisabled:b}=useRepeaterContext(),k=(0,mn.useContext)(bn),E=!!k?.props?.readOnly,w=(0,gn.bindTrigger)(a);return hn.createElement(wn,{ref:r=>{r&&u===g&&r!==a.anchorEl&&(c(r),a.setAnchorEl(r))},label:hn.createElement(Tn,{value:v},hn.createElement(r,{value:v})),"aria-label":(0,vn.__)("Open item","elementor"),...w,onClick:r=>{E||b(g)||(w.onClick(r),p(g))},startIcon:hn.createElement(Cn,{value:v},hn.createElement(o,{value:v})),sx:{minHeight:r=>r.spacing(3.5),...b(g)&&{'[role="button"]':{cursor:"not-allowed"}}},actions:hn.createElement(hn.Fragment,null,hn.createElement(Pn,{index:g??-1}),i)})},Mn=__toESM(i(97557)),ControlRepeater=({children:r,initial:o,propTypeUtil:i,isItemDisabled:a})=>Mn.createElement(SectionContent,null,Mn.createElement(RepeaterContextProvider,{initial:o,propTypeUtil:i,isItemDisabled:a},r)),Nn=__toESM(i(97557)),Rn=i(24413),In=i(79513),Dn=i(27723),Ln="tiny",DisableItemAction=()=>{const{items:r,updateItem:o,index:i=-1}=useRepeaterContext();if(-1===i)return null;const a=r[i].item.disabled??!1,c=a?(0,Dn.__)("Show","elementor"):(0,Dn.__)("Hide","elementor");return Nn.createElement(In.Tooltip,{title:c,placement:"top"},Nn.createElement(In.IconButton,{size:Ln,onClick:()=>{const a=structuredClone(r[i].item);a.disabled=!a.disabled,a.disabled||delete a.disabled,o(a,i)},"aria-label":c},a?Nn.createElement(Rn.EyeOffIcon,{fontSize:Ln}):Nn.createElement(Rn.EyeIcon,{fontSize:Ln})))},Fn=__toESM(i(97557)),zn=i(24413),jn=i(79513),Bn=i(27723),Vn="tiny",DuplicateItemAction=()=>{const{items:r,addItem:o,index:i=-1,isItemDisabled:a}=useRepeaterContext();if(-1===i)return null;const c=(0,Bn.__)("Duplicate","elementor"),u=r[i]?.item;return Fn.createElement(jn.Tooltip,{title:c,placement:"top"},Fn.createElement(jn.IconButton,{size:Vn,onClick:r=>{const a=structuredClone(u);o(r,{item:a,index:i+1})},"aria-label":c,disabled:a(i)},Fn.createElement(zn.CopyIcon,{fontSize:Vn})))},$n=__toESM(i(97557)),Un=i(24413),Hn=i(79513),Wn=i(27723),qn="tiny",RemoveItemAction=()=>{const{removeItem:r,index:o=-1}=useRepeaterContext();if(-1===o)return null;const i=(0,Wn.__)("Remove","elementor");return $n.createElement(Hn.Tooltip,{title:i,placement:"top"},$n.createElement(Hn.IconButton,{size:qn,onClick:()=>r(o),"aria-label":i},$n.createElement(Un.XIcon,{fontSize:qn})))},Kn=__toESM(i(97557)),Gn=i(79513),Jn=__toESM(i(97557)),Yn=i(79513),RepeaterPopover=({children:r,width:o,...i})=>Jn.createElement(Yn.Popover,{disablePortal:!0,disableEnforceFocus:!0,anchorOrigin:{vertical:"bottom",horizontal:"left"},slotProps:{paper:{sx:{marginBlockStart:.5,width:o,overflow:"visible"}}},...i},r),EditItemPopover=({children:r})=>{const{popoverState:o,openItemIndex:i,isOpen:a,rowRef:c,setOpenItemIndex:u,setRowRef:p}=useRepeaterContext();if(!a||!c)return null;return Kn.createElement(RepeaterPopover,{width:c.offsetWidth,...(0,Gn.bindPopover)(o),onClose:()=>{p(null),o.setAnchorEl(null),u(-1)}},Kn.createElement(PropKeyProvider,{bind:String(i)},Kn.createElement(Gn.Box,null,r)))},Xn=__toESM(i(97557)),Qn=i(79513),PopoverContent=({gap:r=1.5,children:o,...i})=>Xn.createElement(Qn.Stack,{...i,gap:r},o),Zn=i(97557),er=__toESM(i(97557)),nr=i(79513),rr=(0,Zn.forwardRef)(({gap:r=1.5,alignItems:o="center",flexWrap:i="nowrap",children:a},c)=>er.createElement(nr.Grid,{container:!0,gap:r,alignItems:o,flexWrap:i,ref:c},a)),or=__toESM(i(97557)),ir=i(97557),ar=i(79513),sr=(0,ir.forwardRef)(({label:r,children:o,adornment:i=ControlAdornments},a)=>or.createElement(ar.Stack,{direction:"row",alignItems:"center",gap:1,sx:{marginInlineEnd:-.75,py:.25},ref:a},or.createElement(ar.Box,{display:"flex",alignItems:"center",gap:1,sx:{flexGrow:1}},or.createElement(ar.Typography,{component:"label",variant:"caption",color:"text.secondary",sx:{lineHeight:1}},r),or.createElement(i,null)),o)),lr=createControl(()=>{const{propType:r,value:o,setValue:i,disabled:a}=useBoundProp($t.boxShadowPropTypeUtil);return Bt.createElement(PropProvider,{propType:r,value:o,setValue:i,isDisabled:()=>a},Bt.createElement(ControlRepeater,{initial:ur,propTypeUtil:$t.boxShadowPropTypeUtil},Bt.createElement(sr,{label:(0,Ht.__)("Box shadow","elementor")},Bt.createElement(TooltipAddItemAction,{newItemIndex:0,disabled:a,ariaLabel:"Box shadow"})),Bt.createElement(ItemsContainer,null,Bt.createElement(Item,{Icon:ItemIcon,Label:ItemLabel,actions:Bt.createElement(Bt.Fragment,null,Bt.createElement(DuplicateItemAction,null),Bt.createElement(DisableItemAction,null),Bt.createElement(RemoveItemAction,null))})),Bt.createElement(EditItemPopover,null,Bt.createElement(Content,null))))}),cr=(0,Ut.styled)(Ut.UnstableColorIndicator)(({theme:r})=>({height:"1rem",width:"1rem",borderRadius:r.shape.borderRadius/2+"px"})),ItemIcon=({value:r})=>Bt.createElement(cr,{size:"inherit",component:"span",value:r.value.color?.value}),Content=()=>{const r=useBoundProp($t.shadowPropTypeUtil),o=[(0,Vt.useRef)(null),(0,Vt.useRef)(null)],{rowRef:i}=useRepeaterContext();return Bt.createElement(PropProvider,{...r},Bt.createElement(PopoverContent,{p:1.5},Bt.createElement(rr,null,Bt.createElement(Control2,{bind:"color",label:(0,Ht.__)("Color","elementor")},Bt.createElement(Lt,{anchorEl:i})),Bt.createElement(Control2,{bind:"position",label:(0,Ht.__)("Position","elementor"),sx:{overflow:"hidden"}},Bt.createElement(_e,{options:[{label:(0,Ht.__)("Inset","elementor"),value:"inset"},{label:(0,Ht.__)("Outset","elementor"),value:null}]}))),Bt.createElement(rr,{ref:o[0]},Bt.createElement(Control2,{bind:"hOffset",label:(0,Ht.__)("Horizontal","elementor")},Bt.createElement(Ct,{anchorRef:o[0],min:-Number.MAX_SAFE_INTEGER})),Bt.createElement(Control2,{bind:"vOffset",label:(0,Ht.__)("Vertical","elementor")},Bt.createElement(Ct,{anchorRef:o[0],min:-Number.MAX_SAFE_INTEGER}))),Bt.createElement(rr,{ref:o[1]},Bt.createElement(Control2,{bind:"blur",label:(0,Ht.__)("Blur","elementor")},Bt.createElement(Ct,{anchorRef:o[1]})),Bt.createElement(Control2,{bind:"spread",label:(0,Ht.__)("Spread","elementor")},Bt.createElement(Ct,{anchorRef:o[1],min:-Number.MAX_SAFE_INTEGER})))))},Control2=({label:r,bind:o,children:i,sx:a})=>Bt.createElement(PropKeyProvider,{bind:o},Bt.createElement(Ut.Grid,{item:!0,xs:6,sx:a},Bt.createElement(Ut.Grid,{container:!0,gap:.75,alignItems:"center"},Bt.createElement(Ut.Grid,{item:!0,xs:12},Bt.createElement(Ut.FormLabel,{size:"tiny"},r)),Bt.createElement(Ut.Grid,{item:!0,xs:12},i)))),ItemLabel=({value:r})=>{const{position:o,hOffset:i,vOffset:a,blur:c,spread:u}=r.value,{size:p="",unit:g=""}=c?.value||{},{size:v="",unit:b=""}=u?.value||{},{size:k="unset",unit:E=""}=i?.value||{},{size:w="unset",unit:x=""}=a?.value||{},C=o?.value||"outset",_=[[k,E],[w,x],[p,g],[v,b]].map(([r,o])=>"custom"!==o?r+o:r||xt).join(" ");return Bt.createElement("span",{style:{textTransform:"capitalize"}},C,": ",_)},ur={$$type:"shadow",value:{hOffset:{$$type:"size",value:{unit:"px",size:0}},vOffset:{$$type:"size",value:{unit:"px",size:0}},blur:{$$type:"size",value:{unit:"px",size:10}},spread:{$$type:"size",value:{unit:"px",size:0}},color:{$$type:"color",value:"rgba(0, 0, 0, 1)"},position:null}},pr=__toESM(i(97557)),dr=i(2020),fr=i(27723),hr=__toESM(i(97557)),mr=i(97557),gr=i(2020),vr=i(27723),yr=i(27723),br={blur:{blur:{name:(0,yr.__)("Blur","elementor"),valueName:(0,yr.__)("Radius","elementor")}},intensity:{brightness:{name:(0,yr.__)("Brightness","elementor")},contrast:{name:(0,yr.__)("Contrast","elementor")},saturate:{name:(0,yr.__)("Saturate","elementor")}},"hue-rotate":{"hue-rotate":{name:(0,yr.__)("Hue Rotate","elementor"),valueName:(0,yr.__)("Angle","elementor")}},"color-tone":{grayscale:{name:(0,yr.__)("Grayscale","elementor")},invert:{name:(0,yr.__)("Invert","elementor")},sepia:{name:(0,yr.__)("Sepia","elementor")}},"drop-shadow":{"drop-shadow":{name:(0,yr.__)("Drop shadow","elementor"),valueName:(0,yr.__)("Drop-shadow","elementor")}}},kr=(0,vr.__)("Amount","elementor"),Er={"drop-shadow":r=>function buildDropShadowDefault(r){const o=r.shape;return{blur:o?.blur?.default,xAxis:o?.xAxis?.default,yAxis:o?.yAxis?.default,color:o?.color?.default??(o?.color).prop_types.color.default}}(r)};function buildFilterConfig(r){const o=Object.entries(br).flatMap(([o,i])=>Object.entries(i).map(([i,a])=>function createEntry(o,i,{name:a,valueName:c}){const u=function extractPropType(r,o){return r.shape?.args?.prop_types[o]}(r,o),p=Er[i]?.(u)??function buildSizeDefault(r){const o=r?.shape?.size;return{size:o?.default}}(u),g=function createDefaultValue({filterFunction:r,filterFunctionGroup:o,value:i}){return{$$type:"css-filter-func",value:{func:{$$type:"string",value:r},args:{$$type:o,value:i}}}}({filterFunction:i,filterFunctionGroup:o,value:p});return[i,{name:a,valueName:c??kr,defaultValue:g,filterFunctionGroup:o}]}(o,i,a)));return Object.fromEntries(o)}var Sr=(0,mr.createContext)(null);function FilterConfigProvider({children:r}){const o=useBoundProp(gr.cssFilterFunctionPropUtil),i=(0,mr.useMemo)(()=>{const r=buildFilterConfig(o.propType.item_prop_type),i=Object.entries(r).map(([r,o])=>({value:r,label:o.name}));return{config:r,filterOptions:i,getFilterFunctionConfig:o=>r[o],getInitialValue:()=>r.blur.defaultValue}},[o.propType]);return hr.createElement(Sr.Provider,{value:i},r)}function useFilterConfig(){const r=(0,mr.useContext)(Sr);if(!r)throw new Error("useFilterConfig must be used within FilterConfigProvider");return r}var wr=__toESM(i(97557)),xr=i(2020),Cr=i(79513),_r=i(27723),Tr=__toESM(i(97557)),Or=i(97557),Pr=i(2020),Ar=i(79513),Mr=i(27723),Nr=[{bind:"xAxis",label:(0,Mr.__)("X-axis","elementor"),rowIndex:0},{bind:"yAxis",label:(0,Mr.__)("Y-axis","elementor"),rowIndex:0},{bind:"blur",label:(0,Mr.__)("Blur","elementor"),rowIndex:1},{bind:"color",label:(0,Mr.__)("Color","elementor"),rowIndex:1}],DropShadowItemContent=({anchorEl:r})=>{const o=useBoundProp(Pr.dropShadowFilterPropTypeUtil),i=[(0,Or.useRef)(null),(0,Or.useRef)(null)];return Tr.createElement(PropProvider,{...o},Nr.map(o=>Tr.createElement(rr,{key:o.bind,ref:i[o.rowIndex]??null},Tr.createElement(PropKeyProvider,{bind:o.bind},Tr.createElement(Ar.Grid,{item:!0,xs:6},Tr.createElement(ControlFormLabel,null,o.label)),Tr.createElement(Ar.Grid,{item:!0,xs:6},"color"===o.bind?Tr.createElement(Lt,{anchorEl:r}):Tr.createElement(Ct,{anchorRef:i[o.rowIndex],enablePropTypeUnits:!0,min:"blur"===o.bind?0:-Number.MAX_SAFE_INTEGER,defaultUnit:"px"}))))))},Rr=i(97557),Ir=__toESM(i(97557)),Dr=i(2020),Lr=i(79513),Fr={blur:Dr.blurFilterPropTypeUtil,intensity:Dr.intensityFilterPropTypeUtil,"hue-rotate":Dr.hueRotateFilterPropTypeUtil,"color-tone":Dr.colorToneFilterPropTypeUtil},SingleSizeItemContent=({filterFunc:r})=>{const o=(0,Rr.useRef)(null),{getFilterFunctionConfig:i}=useFilterConfig(),{valueName:a,filterFunctionGroup:c}=i(r),u=useBoundProp(Fr[c]);return Ir.createElement(PropProvider,{...u},Ir.createElement(PropKeyProvider,{bind:c},Ir.createElement(PropKeyProvider,{bind:"size"},Ir.createElement(rr,{ref:o},Ir.createElement(Lr.Grid,{item:!0,xs:6},Ir.createElement(ControlFormLabel,null,a)),Ir.createElement(Lr.Grid,{item:!0,xs:6},Ir.createElement(Ct,{anchorRef:o,enablePropTypeUnits:!0}))))))},FilterContent=()=>{const r=useBoundProp(xr.cssFilterFunctionPropUtil),{filterOptions:o,getFilterFunctionConfig:i}=useFilterConfig();return wr.createElement(PropProvider,{...r,setValue:(o,a,c)=>{let u=structuredClone(o);const p=i(u?.func.value);"func"===c?.bind&&(u=p.defaultValue.value),u.args&&r.setValue(u)}},wr.createElement(PropKeyProvider,{bind:"css-filter-func"},wr.createElement(PopoverContent,{p:1.5},wr.createElement(rr,null,wr.createElement(Cr.Grid,{item:!0,xs:6},wr.createElement(ControlFormLabel,null,(0,_r.__)("Filter","elementor"))),wr.createElement(Cr.Grid,{item:!0,xs:6},wr.createElement(PropKeyProvider,{bind:"func"},wr.createElement(_e,{options:o})))),wr.createElement(PropKeyProvider,{bind:"args"},wr.createElement(FilterValueContent,null)))))},FilterValueContent=()=>{const{openItemIndex:r,items:o}=useRepeaterContext(),i=o[r].item.value.func.value;return"drop-shadow"===i?wr.createElement(DropShadowItemContent,null):wr.createElement(SingleSizeItemContent,{filterFunc:i})},zr=__toESM(i(97557)),jr=i(79513),FilterIcon=({value:r})=>"drop-shadow"!==r.value.func.value?null:zr.createElement(Br,{size:"inherit",component:"span",value:r.value.args.value?.color.value}),Br=(0,jr.styled)(jr.UnstableColorIndicator)(({theme:r})=>({borderRadius:r.shape.borderRadius/2+"px"})),Vr=__toESM(i(97557)),$r=__toESM(i(97557)),Ur=i(79513),Hr=i(27723),DropShadowItemLabel=({value:r})=>{const o=r.value.args.value,i=["xAxis","yAxis","blur"].map(r=>"custom"!==o[r]?.value?.unit?`${o[r]?.value?.size??0}${o[r]?.value?.unit??"px"}`:o[r]?.value?.size||xt);return $r.createElement(Ur.Box,{component:"span"},$r.createElement(Ur.Box,{component:"span",style:{textTransform:"capitalize"}},(0,Hr.__)("Drop shadow:","elementor")),` ${i.join(" ")}`)},Wr=__toESM(i(97557)),qr=i(79513),SingleSizeItemLabel=({value:r})=>{const{func:o,args:i}=r.value,{getFilterFunctionConfig:a}=useFilterConfig(),{defaultValue:c}=a(o.value??""),u=c.value.args.value?.size?.value?.unit??Xe[0],{unit:p,size:g}=i.value.size?.value??{unit:u,size:0},v=Wr.createElement(qr.Box,{component:"span",style:{textTransform:"capitalize"}},o.value??"",":");return Wr.createElement(qr.Box,{component:"span"},v," "+("custom"!==p?`${g??0}${p??u}`:g||xt))},FilterLabel=({value:r})=>"drop-shadow"===r.value.func.value?Vr.createElement(DropShadowItemLabel,{value:r}):Vr.createElement(SingleSizeItemLabel,{value:r}),Kr={filter:{propTypeUtil:dr.filterPropTypeUtil,label:(0,fr.__)("Filters","elementor")},"backdrop-filter":{propTypeUtil:dr.backdropFilterPropTypeUtil,label:(0,fr.__)("Backdrop filters","elementor")}},Gr=createControl(({filterPropName:r="filter"})=>{const{propTypeUtil:o,label:i}=function ensureFilterConfig(r){if(r&&r in Kr)return Kr[r];return Kr.filter}(r),{propType:a,value:c,setValue:u}=useBoundProp(o);return pr.createElement(FilterConfigProvider,null,pr.createElement(PropProvider,{propType:a,value:c,setValue:u},pr.createElement(Repeater,{propTypeUtil:o,label:i,filterPropName:r})))}),Repeater=({propTypeUtil:r,label:o,filterPropName:i})=>{const{getInitialValue:a}=useFilterConfig();return pr.createElement(ControlRepeater,{initial:a(),propTypeUtil:r},pr.createElement(sr,{label:o},pr.createElement(TooltipAddItemAction,{newItemIndex:0,ariaLabel:"backdrop-filter"===i?"backdrop filter":"filter"})),pr.createElement(ItemsContainer,null,pr.createElement(Item,{Label:FilterLabel,Icon:FilterIcon,actions:pr.createElement(pr.Fragment,null,pr.createElement(DuplicateItemAction,null),pr.createElement(DisableItemAction,null),pr.createElement(RemoveItemAction,null))})),pr.createElement(EditItemPopover,null,pr.createElement(FilterContent,null)))};var Jr=__toESM(i(97557)),Yr=i(97557),Xr={"off-canvas":()=>{const r=window,o=r.elementor.config.document.id,i=r.elementor.$previewContents[0].querySelectorAll(`[data-elementor-id="${o}"] .elementor-widget-off-canvas.elementor-element-edit-mode`);return Array.from(i).map(r=>({label:r.querySelector(".e-off-canvas")?.getAttribute("aria-label")??"",value:r.dataset.id}))},"form-elements":()=>{const r=window,o=r.elementor.config.document.id,i=[`[data-elementor-id="${o}"] input[id]:not([type="hidden"]):not([type="reset"]):not([type="button"])`,`[data-elementor-id="${o}"] select[id]`,`[data-elementor-id="${o}"] textarea[id]`],a=r.elementor.$previewContents[0].querySelectorAll(i.join(", "));return Array.from(a).map(r=>{const o=r.tagName.toLowerCase();return{label:`${r.id} (${"input"===o?r.getAttribute("type"):o})`,value:r.id}})}},Qr=createControl(({collectionId:r,options:o,...i})=>{const a=((r,o)=>{const[i,a]=(0,Yr.useState)(o??[]);return(0,Yr.useEffect)(()=>{r&&Xr[r]?a(Xr[r]()):a(o??[])},[r,o]),i})(r,o);return Jr.createElement(_e,{options:a,...i})}),Zr=__toESM(i(97557)),eo=i(2020),to=i(79513),no=__toESM(i(97557)),ro=i(79513);function ChipsList({getLabel:r,getTagProps:o,values:i}){return no.createElement(no.Fragment,null,i.map((i,a)=>{const{key:c,...u}=o({index:a});return no.createElement(ro.Chip,{key:c,label:r(i),size:"tiny",...u})}))}var oo=createControl(({options:r,freeChips:o})=>{const{value:i,setValue:a,disabled:c}=useBoundProp(eo.stringArrayPropTypeUtil),u=(i||[]).map(r=>eo.stringPropTypeUtil.extract(r)).filter(r=>null!==r).map(o=>((r,o)=>o.find(o=>o.value===r)??{label:r,value:r})(o,r));return Zr.createElement(ControlActions,null,Zr.createElement(to.Autocomplete,{fullWidth:!0,multiple:!0,freeSolo:o,size:"tiny",disabled:c,value:u,filterSelectedOptions:!0,onChange:(r,o)=>{a(o.map(r=>eo.stringPropTypeUtil.create("string"==typeof r?r:r.value)))},options:r,getOptionLabel:r=>"string"==typeof r?r:r.label,isOptionEqualToValue:(r,o)=>r.value===o.value,renderInput:r=>Zr.createElement(to.TextField,{...r}),renderTags:(r,o)=>Zr.createElement(ChipsList,{getLabel:r=>"string"==typeof r?r:r.label,getTagProps:o,values:r})}))}),io=__toESM(i(97557)),ao=i(2020),so=__toESM(i(97557)),lo=i(97557),co=i(24413),uo=i(79513),po=__toESM(i(97557)),fo=i(79513),ConditionalTooltip=({showTooltip:r,children:o,label:i})=>r&&i?po.createElement(fo.Tooltip,{title:i,disableFocusListener:!0,placement:"top"},o):o,ho=(0,uo.styled)(uo.ToggleButtonGroup)` ${({justify:r})=>`justify-content: ${r};`} button:not( :last-of-type ) { border-start-end-radius: 0; border-end-end-radius: 0; } button:not( :first-of-type ) { border-start-start-radius: 0; border-end-start-radius: 0; } button:last-of-type { border-start-end-radius: 8px; border-end-end-radius: 8px; } `,mo=(0,uo.styled)(uo.ToggleButton,{shouldForwardProp:r=>"isPlaceholder"!==r})` ${({theme:r,isPlaceholder:o})=>o&&`\n\t\tcolor: ${r.palette.text.tertiary};\n\t\tbackground-color: ${"dark"===r.palette.mode?"rgba(255,255,255,0.04)":"rgba(0,0,0,0.02)"};\n\n\t\t&:hover {\n\t\t\tbackground-color: ${"dark"===r.palette.mode?"rgba(255,255,255,0.08)":"rgba(0,0,0,0.04)"};\n\t\t}\n\t`} `,go=so.forwardRef(({justify:r="end",size:o="tiny",value:i,onChange:a,items:c,maxItems:u,exclusive:p=!1,fullWidth:g=!1,disabled:v,placeholder:b},k)=>{const E=p&&void 0!==u&&c.length>u,w=E?c.slice(u-1):[],x=E?c.slice(0,u-1):c,C="rtl"===(0,uo.useTheme)().direction,_=(0,lo.useMemo)(()=>{const r=w?.length,o=r?x.length+1:x.length,i=r?"auto":"";return g?`repeat(${o}, 1fr) ${i}`:`repeat(${o}, minmax(0, 25%)) ${i}`},[w?.length,x.length,g]),T=p&&(null==i||""===i),P=!p&&Array.isArray(i)?i.map(r=>"string"==typeof r?r:"").join(" ").trim().split(/\s+/).filter(Boolean):[],A=!p&&0===P.length,N=(R=b,Array.isArray(R)?R.flatMap(r=>"string"==typeof r?r.trim().split(/\s+/).filter(Boolean):[]):"string"==typeof R?R.trim().split(/\s+/).filter(Boolean):[]);var R;return so.createElement(ho,{ref:k,justify:r,value:i,onChange:(r,o)=>{a(o)},exclusive:p,disabled:v,sx:{direction:C?"rtl /* @noflip */":"ltr /* @noflip */",display:"grid",gridTemplateColumns:_,width:"100%"}},x.map(({label:r,value:i,renderContent:a,showTooltip:c,disabled:u=!1})=>{const p=N.length>0&&N.includes(i)&&(T||A);return so.createElement(ConditionalTooltip,{key:i,label:r,showTooltip:c||!1},so.createElement(mo,{value:i,"aria-label":r,size:o,fullWidth:g,isPlaceholder:p,disabled:u},so.createElement(a,{size:o})))}),w.length&&p&&so.createElement(SplitButtonGroup,{size:o,value:i||null,onChange:a,items:w,fullWidth:g}))}),ControlToggleButtonGroup=r=>so.createElement(ControlActions,null,so.createElement(go,{...r})),SplitButtonGroup=({size:r="tiny",onChange:o,items:i,fullWidth:a,value:c})=>{const u=usePreviewButton(i,c),[p,g]=(0,lo.useState)(!1),v=(0,lo.useRef)(null),onMenuItemClick=r=>{g(!1),onToggleItem(r)},onToggleItem=r=>{o(r===c?null:r)};return so.createElement(so.Fragment,null,so.createElement(uo.ToggleButton,{value:u.value,"aria-label":u.label,size:r,fullWidth:a,onClick:r=>{r.preventDefault(),onMenuItemClick(u.value)}},u.renderContent({size:r})),so.createElement(uo.ToggleButton,{size:r,"aria-expanded":p?"true":void 0,"aria-haspopup":"menu","aria-pressed":void 0,onClick:r=>{g(r=>!r),r.preventDefault()},ref:v,value:"__chevron-icon-button__"},so.createElement(co.ChevronDownIcon,{fontSize:r})),so.createElement(uo.Menu,{open:p,onClose:()=>g(!1),anchorEl:v.current,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},sx:{mt:.5}},i.filter(r=>r.value!==u.value).map(({label:r,value:o})=>so.createElement(uo.MenuItem,{key:o,selected:o===c,onClick:()=>onMenuItemClick(o)},so.createElement(uo.ListItemText,null,so.createElement(uo.Typography,{sx:{fontSize:"14px"}},r))))))},usePreviewButton=(r,o)=>{const[i,a]=(0,lo.useState)(r.find(r=>r.value===o)??r[0]);return(0,lo.useEffect)(()=>{const i=r.find(r=>r.value===o);i&&a(i)},[r,o]),i},vo=__toESM(i(97557)),yo=__toESM(i(24413)),bo=createControl(({options:r,fullWidth:o=!1,size:i="tiny",exclusive:a=!0,maxItems:c,convertOptions:u=!1})=>{const{value:p,setValue:g,placeholder:v,disabled:b}=useBoundProp(ao.stringPropTypeUtil),k=u?(r=>r.map(r=>{const o=r.icon,i=yo[o];return{value:r.value,label:r.label,renderContent:({size:o})=>i?vo.createElement(i,{fontSize:o}):r.label,showTooltip:r.showTooltip,exclusive:r.exclusive}}))(r):r,E=k.filter(r=>r.exclusive).map(r=>r.value),w={items:k,maxItems:c,fullWidth:o,size:i,placeholder:v};return a?io.createElement(ControlToggleButtonGroup,{...w,value:p??null,onChange:g,disabled:b,exclusive:!0}):io.createElement(ControlToggleButtonGroup,{...w,value:p?.split(" ")??[],onChange:r=>{const o=r[r.length-1],i=E.includes(o)?[o]:r?.filter(r=>!E.includes(r));g(i?.join(" ")||null)},disabled:b,exclusive:!1})}),ko=__toESM(i(97557)),Eo=i(2020),So=i(79513),isEmptyOrNaN=r=>null==r||""===r||Number.isNaN(Number(r)),renderSuffix=r=>r.meta?.suffix?ko.createElement(So.InputAdornment,{position:"end"},ko.createElement(So.Typography,{variant:"caption",color:"text.secondary"},r.meta.suffix)):ko.createElement(ko.Fragment,null),wo=createControl(({placeholder:r,max:o=Number.MAX_SAFE_INTEGER,min:i=-Number.MAX_SAFE_INTEGER,step:a=1,shouldForceInt:c=!1,startIcon:u,disabled:p})=>{const{value:g,setValue:v,placeholder:b,disabled:k,restoreValue:E,propType:w}=useBoundProp(Eo.numberPropTypeUtil);return ko.createElement(ControlActions,null,ko.createElement(pt,{size:"tiny",type:"number",fullWidth:!0,disabled:p??k,value:isEmptyOrNaN(g)?"":g,onInput:r=>{const{value:a,validity:{valid:u}}=r.target;let p;if(isEmptyOrNaN(a))p=null;else{const r=c?+parseInt(a):Number(a);p=Math.min(Math.max(r,i??Number.MIN_SAFE_INTEGER),o??Number.MAX_SAFE_INTEGER)}v(p,void 0,{validation:()=>u})},onBlur:E,placeholder:r??(isEmptyOrNaN(b)?"":String(b)),inputProps:{step:a,min:i},InputProps:{startAdornment:u?ko.createElement(So.InputAdornment,{position:"start",disabled:p??k},u):void 0,endAdornment:renderSuffix(w)}}))}),xo=__toESM(i(97557)),Co=i(97557),_o=i(79513),To=i(27723);function EqualUnequalSizesControl({label:r,icon:o,tooltipLabel:i,items:a,multiSizePropTypeUtil:c}){const u=(0,Co.useId)(),p=(0,_o.usePopupState)({variant:"popover",popupId:u}),g=[(0,Co.useRef)(null),(0,Co.useRef)(null)],{propType:v,disabled:b}=useBoundProp(c),{value:k,setValue:E,placeholder:w}=useBoundProp(),getMultiSizeValues=r=>{if(c.isValid(r))return r.value;const o={};a.forEach(i=>{o[i.bind]=r});const i=c.create(o);return i?.value},x=!p.isOpen,C=getMultiSizeValues(k),_=getMultiSizeValues(w),isEqualValues=r=>{if(!r)return!0;const o=c.create(r),i={};a.forEach(r=>{i[r.bind]=o?.value?.[r.bind]??null});const u=Object.values(i).map(r=>JSON.stringify(r));return u.every(r=>r===u[0])},T=!k&&!isEqualValues(_),P=T||!isEqualValues(C);return xo.createElement(xo.Fragment,null,xo.createElement(_o.Grid,{container:!0,gap:2,alignItems:"center",flexWrap:"nowrap",ref:g[0]},xo.createElement(_o.Grid,{item:!0,xs:6},x?xo.createElement(ControlLabel,null,r):xo.createElement(ControlFormLabel,null,r)),xo.createElement(_o.Grid,{item:!0,xs:6},xo.createElement(_o.Stack,{direction:"row",alignItems:"center",gap:1},xo.createElement(_o.Box,{flexGrow:1},xo.createElement(Ct,{placeholder:P?(0,To.__)("Mixed","elementor"):void 0,enablePropTypeUnits:!P||!T,anchorRef:g[0]})),xo.createElement(_o.Tooltip,{title:i,placement:"top"},xo.createElement(mo,{size:"tiny",value:"check",sx:{marginLeft:"auto"},...(0,_o.bindToggle)(p),selected:p.isOpen,isPlaceholder:T,"aria-label":i},o))))),xo.createElement(_o.Popover,{disablePortal:!0,disableScrollLock:!0,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},...(0,_o.bindPopover)(p),slotProps:{paper:{sx:{mt:.5,width:g[0].current?.getBoundingClientRect().width}}}},xo.createElement(PropProvider,{propType:v,value:C,placeholder:_,setValue:r=>{isEqualValues(r)?E(Object.values(r)?.pop()??null):E(c.create(r))},isDisabled:()=>b},xo.createElement(PopoverContent,{p:1.5},xo.createElement(rr,{ref:g[1]},xo.createElement(MultiSizeValueControl,{item:a[0],rowRef:g[1]}),xo.createElement(MultiSizeValueControl,{item:a[1],rowRef:g[1]})),xo.createElement(rr,{ref:g[2]},xo.createElement(MultiSizeValueControl,{item:a[2],rowRef:g[2]}),xo.createElement(MultiSizeValueControl,{item:a[3],rowRef:g[2]}))))))}var MultiSizeValueControl=({item:r,rowRef:o})=>{const{bind:i,label:a,icon:c,ariaLabel:u}=r;return xo.createElement(PropKeyProvider,{bind:i},xo.createElement(_o.Grid,{item:!0,xs:6},xo.createElement(_o.Grid,{container:!0,gap:.75,alignItems:"center"},xo.createElement(_o.Grid,{item:!0,xs:12},xo.createElement(ControlLabel,null,a)),xo.createElement(_o.Grid,{item:!0,xs:12},xo.createElement(Ct,{startIcon:c,ariaLabel:u,anchorRef:o})))))},Oo=__toESM(i(97557)),Po=i(97557),Ao=i(2020),Mo=i(74518),No=i(24413),Ro=i(79513),Io=i(27723),Do=__toESM(i(97557)),Lo=i(97557),Fo=i(2020),zo=__toESM(i(97557)),jo=i(97557),Bo=i(74518),Vo=i(79513),$o=__toESM(i(97557)),Uo=i(24413),Ho=i(79513),getLengthUnits=()=>window.elementor?.config?.size_units?.length??[],getAngleUnits=()=>window.elementor?.config?.size_units?.angle??[],getTimeUnits=()=>window.elementor?.config?.size_units?.time??[],isExtendedUnit=r=>(window.elementor?.config?.size_units?.extended_units??[]).includes(r),Wo=/^[a-zA-Z%]$/,isNumericValue=r=>"number"==typeof r?!isNaN(r):"string"==typeof r&&(""!==r.trim()&&!isNaN(Number(r))),qo=i(97557),Ko="",Go="auto",Jo="custom",resolveSizeOnUnitChange=(r,o)=>isExtendedUnit(o)?Ko:r,resolveFallbackUnit=(r,o,i)=>o.includes(r)?r:i&&o.includes(i)?i:o[0]??"",sanitizeSize=r=>"number"==typeof r&&isNaN(r)?Ko:r,Yo=i(97557),useSizeValue=({value:r,setValue:o,units:i,defaultUnit:a})=>{const c=(0,qo.useMemo)(()=>((r,o)=>{if(!r)return r;const{units:i,defaultUnit:a}=o,c=resolveFallbackUnit(r.unit,i,a);return c===Go?{size:Ko,unit:c}:c===Jo?{size:String(r.size??Ko),unit:c}:{size:sanitizeSize(r.size)??Ko,unit:c}})(r,{units:i,defaultUnit:a}),[r?.size,r?.unit,a]),[u,p]=useSyncExternalState({external:c,setExternal:(r,i,a)=>{null!==r&&o(r,i,a)},persistWhen:r=>hasChanged(r,c),fallback:()=>((r,o)=>{let[i]=r;return void 0!==o&&(i=resolveFallbackUnit(o,r)),{size:Ko,unit:i}})(i,a)}),[g,v]=(({sizeValue:r,setUnit:o,persistWhen:i})=>{const[a,c]=(0,Yo.useState)(r.unit);return(0,Yo.useEffect)(()=>{r.unit!==a&&c(r.unit)},[r.unit,r.size]),[a,r=>{c(r),(isExtendedUnit(r)||i())&&o(r)}]})({sizeValue:u,setUnit:r=>{p({unit:r,size:resolveSizeOnUnitChange(u.size,r)})},persistWhen:()=>Boolean(u.size)||""!==u.size||isExtendedUnit(u.unit)});return{size:u.size,setSize:(r,o=!0)=>{if(isExtendedUnit(g))return;const i=r.trim(),a=Number(i),c={unit:g,size:i&&!isNaN(a)?a:""};p(c,void 0,{validation:()=>o})},unit:g,setUnit:v}},hasChanged=(r,o)=>r?.size!==o?.size||r?.unit!==o?.unit,Xo=__toESM(i(97557)),Qo=(0,i(97557).forwardRef)(({id:r,type:o,value:i,onBlur:a,onKeyUp:c,focused:u,disabled:p,onChange:g,onKeyDown:v,InputProps:b,inputProps:k,placeholder:E},w)=>Xo.createElement(pt,{id:r,ref:w,size:"tiny",fullWidth:!0,type:o,value:i,placeholder:E,onKeyUp:c,focused:u,disabled:p,onKeyDown:v,onInput:g,onBlur:a,InputProps:b,inputProps:k,sx:getCursorStyle(b?.readOnly??!1)})),getCursorStyle=r=>({input:{cursor:r?"default !important":void 0}}),Zo=__toESM(i(97557)),ei=i(97557),ti=i(70374),ni=i(79513),ri={display:"flex",flexDirection:"column",justifyContent:"center"},UnitSelector=({value:r,isUnitHighlighted:o,onSelect:i,options:a,disabled:c,menuItemsAttributes:u={},optionLabelOverrides:p={}})=>{const g=(0,ni.usePopupState)({variant:"popover",popupId:(0,ei.useId)()});return Zo.createElement(Zo.Fragment,null,Zo.createElement(oi,{isHighlighted:o,disabled:c,size:"small",...(0,ni.bindTrigger)(g)},p[r]??r),Zo.createElement(ni.Menu,{MenuListProps:{dense:!0},...(0,ni.bindMenu)(g)},a.map(r=>Zo.createElement(ti.MenuListItem,{key:r,onClick:()=>(r=>{i(r),g.close()})(r),...u?.[r],primaryTypographyProps:{variant:"caption",sx:{...ri,lineHeight:"1"}},menuItemTextProps:{sx:ri}},p[r]??r.toUpperCase()))))},oi=(0,ni.styled)(ni.Button,{shouldForwardProp:r=>"isHighlighted"!==r})(({isHighlighted:r,theme:o})=>({color:r?o.palette.text.primary:o.palette.text.tertiary,font:"inherit",minWidth:"initial",textTransform:"uppercase"})),ii={custom:$o.createElement(Uo.MathFunctionIcon,{fontSize:"tiny"})},SizeField=({value:r,focused:o,disabled:i,InputProps:a,defaultUnit:c,placeholder:u,onUnitChange:p,startIcon:g,ariaLabel:v,onKeyDown:b,setValue:k,onBlur:E,units:w,min:x,unitSelectorProps:C})=>{const{size:_,unit:T,setSize:P,setUnit:A}=useSizeValue({value:r,setValue:k,units:w,defaultUnit:c}),handleUnitChange=r=>{A(r),p?.(r)},{onUnitKeyDown:N}=(({unit:r,units:o,onUnitChange:i})=>{const{appendKey:a,startsWith:c}=useTypingBuffer();return{onUnitKeyDown:u=>{if(0===o.length)return;const{key:p,altKey:g,ctrlKey:v,metaKey:b}=u;if(g||v||b)return;if(isExtendedUnit(r)&&isNumericValue(p)){const[r]=o;return void(r&&i(r))}if(!Wo.test(p))return;u.preventDefault();const k=a(p.toLowerCase()),E=o.find(r=>c(r,k));E&&i(E)}}})({unit:T,onUnitChange:handleUnitChange,units:w}),R=isExtendedUnit(T)?"text":"number";return $o.createElement(Qo,{disabled:i,focused:o,type:R,value:_,placeholder:u,onBlur:E,onKeyDown:r=>{N(r),b?.(r)},onChange:r=>{const o=r.target.value,i=r.target.validity.valid;P(o,i)},InputProps:{...a,autoComplete:"off",readOnly:isExtendedUnit(T),startAdornment:g&&$o.createElement(Ho.InputAdornment,{position:"start",disabled:i},g),endAdornment:$o.createElement(Ho.InputAdornment,{position:"end"},$o.createElement(UnitSelector,{options:w,value:T,onSelect:handleUnitChange,isUnitHighlighted:shouldHighlightUnit({size:_,unit:T}),...C,optionLabelOverrides:ii}))},inputProps:{min:x,step:"any","aria-label":v}})},shouldHighlightUnit=r=>!!r&&(r.unit===Go||(Boolean(r.size)||0===r.size)),ai=__toESM(i(97557)),si=i(97557),li=i(70374),ci=i(24413),ui=i(79513),pi=i(27723),TextFieldPopover2=({popupState:r,anchorRef:o,value:i,onChange:a,onClose:c})=>{const u=(0,si.useRef)(null);(0,si.useEffect)(()=>{r.isOpen&&requestAnimationFrame(()=>{u.current&&u.current.focus()})},[r.isOpen]);const handleClose=()=>{c?.(),r.close()};return ai.createElement(ui.Popover,{disablePortal:!0,slotProps:{paper:{sx:{borderRadius:2,width:o.current?.offsetWidth+"px"}}},...(0,ui.bindPopover)(r),anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},onClose:handleClose},ai.createElement(li.PopoverHeader,{title:(0,pi.__)("CSS function","elementor"),onClose:handleClose,icon:ai.createElement(ci.MathFunctionIcon,{fontSize:"tiny"})}),ai.createElement(ui.TextField,{value:i,onChange:a,onKeyDown:r=>{"enter"===r.key.toLowerCase()&&handleClose()},size:"tiny",type:"text",fullWidth:!0,inputProps:{ref:u},sx:{pt:0,pr:1.5,pb:1.5,pl:1.5}}))},SizeComponent=({anchorRef:r,SizeFieldWrapper:o=zo.Fragment,...i})=>{const a=(0,Vo.usePopupState)({variant:"popover"}),c=(0,Bo.useActiveBreakpoint)(),u=i?.value?.unit===Jo,p=i.units.includes(Jo);(0,jo.useEffect)(()=>{a&&a.isOpen&&a.close()},[c]);const g={"aria-controls":a.isOpen?a.popupId:void 0,"aria-haspopup":!0};return zo.createElement(zo.Fragment,null,zo.createElement(o,null,zo.createElement(Vo.Box,null,zo.createElement(SizeField,{focused:!!a.isOpen||void 0,onUnitChange:o=>{o===Jo&&r?.current&&a.open(r.current)},InputProps:{...g,onClick:o=>{o.target.closest("input")&&u&&a.open(r?.current)}},unitSelectorProps:{menuItemsAttributes:p?{custom:g}:void 0},...i}))),a.isOpen&&r?.current&&zo.createElement(TextFieldPopover2,{popupState:a,anchorRef:r,value:String(i?.value?.size??""),onChange:r=>{i.setValue({size:r.target.value,unit:Jo})},onClose:()=>{}}))},di=i(2020),toUnitPlaceholder=r=>({...r,size:""}),pickFirstValid=r=>{const o=r.find(({candidate:r})=>validateSizeValue(r));return o?o.resolve(o.candidate):null},validateSizeValue=r=>{if(!r||"object"!=typeof r)return!1;const o=di.sizePropTypeUtil.create(r);return di.sizePropTypeUtil.isValid(o)},resolvePlaceholder=r=>{if("string"==typeof r)return r;const o=r?.size;return void 0!==o?"number"==typeof o?o.toString():o:void 0},getSizeUnits=(r,o)=>(r=>getPropTypeSettings(r)?.available_units)(r)??(r=>({length:getLengthUnits,angle:getAngleUnits,time:getTimeUnits}[r]()))(o),fi=[r=>Boolean(r),r=>null==r?.size||""===r?.size,r=>r?.unit!==Go,r=>r?.unit!==Jo],hi=createControl(({variant:r="length",placeholder:o,anchorRef:i,startIcon:a,ariaLabel:c,min:u})=>{const{value:p,setValue:g,propType:v,placeholder:b,restoreValue:k}=useBoundProp(Fo.sizePropTypeUtil),E=(0,Lo.useRef)(null),{sizeValue:w,placeholder:x}=((r,o,i)=>{const a=i??o;return{sizeValue:pickFirstValid([{candidate:r,resolve:r=>r},{candidate:i,resolve:toUnitPlaceholder},{candidate:o,resolve:toUnitPlaceholder}]),placeholder:Boolean(r)?void 0:resolvePlaceholder(a)}})(p??E.current,b,o),C=getSizeUnits(v,r),_=(r=>getPropTypeSettings(r)?.default_unit)(v);return Do.createElement(SizeComponent,{units:C,value:w,anchorRef:i,placeholder:x,defaultUnit:_,onBlur:()=>{const r=v.settings.required;(r=>fi.every(o=>o(r)))(p)&&!r&&g(null),r&&k()},setValue:(r,o,i)=>{if(isTransitioningFromExtendedUnit(r,p))return E.current=r,void g(null);g(r,o,{...i,validation:()=>v.settings.required?""!==r.size:!i?.validation||i.validation(r)})},SizeFieldWrapper:ControlActions,startIcon:a,ariaLabel:c,min:u})}),isTransitioningFromExtendedUnit=(r,o)=>!isExtendedUnit(r.unit)&&isExtendedUnit(o?.unit)&&""===r.size,LinkedDimensionsControl=({label:r,isSiteRtl:o=!1,min:i})=>{const a=[(0,Po.useRef)(null),(0,Po.useRef)(null)],{disabled:c}=useBoundProp(Ao.sizePropTypeUtil),{value:u,setValue:p,propType:g,placeholder:v,disabled:b}=useBoundProp(Ao.dimensionsPropTypeUtil),{value:k,placeholder:E,setValue:w}=useBoundProp(),inferIsLinked=()=>!Ao.dimensionsPropTypeUtil.isValid(k)&&!(!k&&Ao.dimensionsPropTypeUtil.isValid(E)),[x,C]=(0,Po.useState)(()=>inferIsLinked()),_=(0,Mo.useActiveBreakpoint)(),T=Ao.dimensionsPropTypeUtil.isValid(k??E);(0,Po.useLayoutEffect)(()=>{C(inferIsLinked)},[_,T]);const P=r.toLowerCase(),A=x?No.LinkIcon:No.DetachIcon,N=(0,Io.__)("Link %s","elementor").replace("%s",P),R=(0,Io.__)("Unlink %s","elementor").replace("%s",P),I=c||b,L={propType:g,value:u,placeholder:v??(x?null:{"block-start":E,"block-end":E,"inline-start":E,"inline-end":E}),setValue:r=>{const o=Object.entries(r).filter(([,r])=>Boolean(r));p(0===o.length?null:Object.fromEntries(o))},isDisabled:()=>b},z=!k&&(v||E),getEffectivePlaceholder=r=>{if(x){const r=getFirstDefined(v);return Ao.sizePropTypeUtil.extract(r)}return Ao.sizePropTypeUtil.extract(v?.[r])};return Oo.createElement(PropProvider,{...L},Oo.createElement(Ro.Stack,{direction:"row",gap:2,flexWrap:"nowrap"},Oo.createElement(ControlFormLabel,null,r),Oo.createElement(Ro.Tooltip,{title:x?R:N,placement:"top"},Oo.createElement(mo,{"aria-label":x?R:N,size:"tiny",value:"check",selected:x,sx:{marginLeft:"auto"},onChange:()=>{if(C(r=>!r),!Ao.dimensionsPropTypeUtil.isValid(k)){const r=k||null;return r?void w(Ao.dimensionsPropTypeUtil.create({"block-start":r,"block-end":r,"inline-start":r,"inline-end":r})):void w(null)}const r=getFirstDefined(u)??null;w(r||null)},disabled:I,isPlaceholder:z},Oo.createElement(A,{fontSize:"tiny"})))),function getCssDimensionProps(r,o){return[[{bind:"block-start",label:(0,Io.__)("Top","elementor"),ariaLabel:(0,Io.sprintf)((0,Io.__)("%s top","elementor"),r),icon:Oo.createElement(No.SideTopIcon,{fontSize:"tiny"})},{bind:"inline-end",label:o?(0,Io.__)("Left","elementor"):(0,Io.__)("Right","elementor"),ariaLabel:o?(0,Io.sprintf)((0,Io.__)("%s left","elementor"),r):(0,Io.sprintf)((0,Io.__)("%s right","elementor"),r),icon:o?Oo.createElement(No.SideLeftIcon,{fontSize:"tiny"}):Oo.createElement(No.SideRightIcon,{fontSize:"tiny"})}],[{bind:"block-end",label:(0,Io.__)("Bottom","elementor"),ariaLabel:(0,Io.sprintf)((0,Io.__)("%s bottom","elementor"),r),icon:Oo.createElement(No.SideBottomIcon,{fontSize:"tiny"})},{bind:"inline-start",label:o?(0,Io.__)("Right","elementor"):(0,Io.__)("Left","elementor"),ariaLabel:o?(0,Io.sprintf)((0,Io.__)("%s right","elementor"),r):(0,Io.sprintf)((0,Io.__)("%s left","elementor"),r),icon:o?Oo.createElement(No.SideRightIcon,{fontSize:"tiny"}):Oo.createElement(No.SideLeftIcon,{fontSize:"tiny"})}]]}(r,o).map((r,o)=>Oo.createElement(Ro.Stack,{direction:"row",gap:2,flexWrap:"nowrap",key:o,ref:a[o]},r.map(({icon:r,...c})=>Oo.createElement(Ro.Grid,{container:!0,gap:.75,alignItems:"center",key:c.bind},Oo.createElement(Ro.Grid,{item:!0,xs:12},Oo.createElement(Label,{...c})),Oo.createElement(Ro.Grid,{item:!0,xs:12},Oo.createElement(Control3,{bind:c.bind,ariaLabel:c.ariaLabel,startIcon:r,isLinked:x,placeholder:getEffectivePlaceholder(c.bind)??void 0,anchorRef:a[o],min:i})))))))},Control3=({bind:r,ariaLabel:o,startIcon:i,isLinked:a,placeholder:c,anchorRef:u,min:p})=>a?Oo.createElement(hi,{ariaLabel:o,startIcon:i,anchorRef:u,placeholder:c,min:p}):Oo.createElement(PropKeyProvider,{bind:r},Oo.createElement(hi,{ariaLabel:o,startIcon:i,anchorRef:u,min:p,placeholder:c})),Label=({label:r,bind:o})=>Oo.createElement(PropKeyProvider,{bind:o},Oo.createElement(ControlLabel,null,r)),getFirstDefined=r=>r?.["block-start"]??r?.["inline-end"]??r?.["block-end"]??r?.["inline-start"];var mi=__toESM(i(97557)),gi=i(97557),vi=i(2020),yi=i(24413),bi=i(79513),ki=i(27723),Ei=__toESM(i(97557)),Si=i(97557),wi=i(70374),xi=i(79513),Ci=i(22444),_i=i(27723),ItemSelector=({itemsList:r,selectedItem:o,onItemChange:i,onClose:a,sectionWidth:c,title:u,itemStyle:p=()=>({}),onDebounce:g=()=>{},icon:v,disabledItems:b,id:k="item-selector",footer:E,categoryItemContentTemplate:w})=>{const[x,C]=(0,Si.useState)(""),_=((r,o,i)=>r.reduce((r,a)=>{const c=a.items.filter(r=>r.toLowerCase().includes(o.toLowerCase()));return c.length&&(r.push({type:"category",value:a.label}),c.forEach(o=>{r.push({type:"item",value:o,disabled:i?.includes(o)??!1})})),r},[]))(r,x,b),T=v,handleClose=()=>{C(""),a()};return Ei.createElement(wi.PopoverBody,{width:c,id:k},Ei.createElement(wi.PopoverHeader,{title:u,onClose:handleClose,icon:Ei.createElement(T,{fontSize:"tiny"})}),Ei.createElement(wi.SearchField,{value:x,onSearch:r=>{C(r)},placeholder:(0,_i.__)("Search","elementor"),id:k+"-search"}),Ei.createElement(xi.Divider,null),Ei.createElement(xi.Box,{sx:{flex:1,overflow:"auto",minHeight:0}},_.length>0?Ei.createElement(ItemList,{itemListItems:_,setSelectedItem:i,handleClose:handleClose,selectedItem:o,itemStyle:p,onDebounce:g,categoryItemContentTemplate:w}):Ei.createElement(xi.Stack,{alignItems:"center",justifyContent:"center",height:"100%",p:2.5,gap:1.5,overflow:"hidden"},Ei.createElement(T,{fontSize:"large"}),Ei.createElement(xi.Box,{sx:{maxWidth:160,overflow:"hidden"}},Ei.createElement(xi.Typography,{align:"center",variant:"subtitle2",color:"text.secondary"},(0,_i.__)("Sorry, nothing matched","elementor")),Ei.createElement(xi.Typography,{variant:"subtitle2",color:"text.secondary",sx:{display:"flex",width:"100%",justifyContent:"center"}},Ei.createElement("span",null,"“"),Ei.createElement(xi.Box,{component:"span",sx:{maxWidth:"80%",overflow:"hidden",textOverflow:"ellipsis"}},x),Ei.createElement("span",null,"”."))),Ei.createElement(xi.Typography,{align:"center",variant:"caption",color:"text.secondary",sx:{display:"flex",flexDirection:"column"}},(0,_i.__)("Try something else.","elementor"),Ei.createElement(xi.Link,{color:"secondary",variant:"caption",component:"button",onClick:()=>C("")},(0,_i.__)("Clear & try again","elementor"))))),E)},ItemList=({itemListItems:r,setSelectedItem:o,handleClose:i,selectedItem:a,itemStyle:c=()=>({}),onDebounce:u=()=>{},categoryItemContentTemplate:p})=>{const g=r.find(r=>r.value===a),v=useDebounce(r=>{r.forEach(r=>{r&&"item"===r.type&&u(r.value)})},100),b=(0,Si.useCallback)(r=>c(r),[c]);return Ei.createElement(wi.PopoverMenuList,{items:r,selectedValue:g?.value,onChange:v,onSelect:o,onClose:i,itemStyle:b,"data-testid":"item-list",categoryItemContentTemplate:p})},useDebounce=(r,o)=>{const[i]=(0,Si.useState)(()=>(0,Ci.debounce)(r,o));return(0,Si.useEffect)(()=>()=>i.cancel(),[i]),i},enqueueFont=(r,o="editor")=>{const i=window;return i.elementor?.helpers?.enqueueFont?.(r,o)??null},Ti=createControl(({fontFamilies:r,sectionWidth:o,ariaLabel:i})=>{const{value:a,setValue:c,disabled:u,placeholder:p}=useBoundProp(vi.fontFamilyPropTypeUtil),g=(0,bi.usePopupState)({variant:"popover"}),v=!a&&p,b=(0,gi.useMemo)(()=>r.map(({label:r,fonts:o})=>({label:r,items:o})),[r]);return mi.createElement(mi.Fragment,null,mi.createElement(ControlActions,null,mi.createElement(bi.UnstableTag,{id:"font-family-control",variant:"outlined",label:a||p,endIcon:mi.createElement(yi.ChevronDownIcon,{fontSize:"tiny"}),...(0,bi.bindTrigger)(g),fullWidth:!0,disabled:u,"aria-label":i,sx:v?{"& .MuiTag-label":{color:r=>r.palette.text.tertiary},textTransform:"capitalize"}:void 0})),mi.createElement(bi.Popover,{disablePortal:!0,disableScrollLock:!0,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},sx:{my:1.5},...(0,bi.bindPopover)(g)},mi.createElement(ItemSelector,{id:"font-family-selector",itemsList:b,selectedItem:a,onItemChange:c,onClose:g.close,sectionWidth:o,title:(0,ki.__)("Font family","elementor"),itemStyle:r=>({fontFamily:r.value}),onDebounce:enqueueFont,icon:yi.TextIcon})))}),Oi=__toESM(i(97557)),Pi=i(2020),Ai=i(79513),Mi=createControl(({placeholder:r,ariaLabel:o})=>{const{value:i,setValue:a,disabled:c,placeholder:u}=useBoundProp(Pi.urlPropTypeUtil),p=r??u??void 0;return Oi.createElement(ControlActions,null,Oi.createElement(Ai.TextField,{size:"tiny",fullWidth:!0,value:i??"",disabled:c,onChange:r=>a(r.target.value),placeholder:p,inputProps:{...o?{"aria-label":o}:{}}}))}),Ni=__toESM(i(97557)),Ri=i(97557),Ii=i(70975),Di=i(2020),Li=i(5527),Fi=i(24413),zi=i(78187),ji=i(79513),Bi=i(22444),Vi=i(27723),$i=__toESM(i(97557)),Ui=i(70975),Hi=i(24413),Wi=i(79513),qi=i(27723),Ki={label:(0,qi.__)("Learn More","elementor"),href:"https://go.elementor.com/element-link-inside-link-infotip"},Gi={descendant:(0,qi.__)("To add a link or action to this element, first remove the link or action from the elements inside of it.","elementor"),ancestor:(0,qi.__)("To add a link or action to this container, first remove the link or action from its parent container.","elementor")};var RestrictedLinkInfotip=({linkInLinkRestriction:r,isVisible:o,children:i})=>{const{shouldRestrict:a,reason:c,elementId:u}=r,p=!(!u||!function isTargetInCurrentDocument(r){if(!r)return!1;const o=(0,Ui.getContainer)(r)?.view?.el;if(!o)return!1;const i=o.closest("[data-elementor-id]")?.getAttribute("data-elementor-id"),a=String((0,Ui.getCurrentDocumentId)()??"");return!(!i||!a||i!==a)}(u)),g=$i.createElement(Wi.Alert,{color:"secondary",icon:$i.createElement(Hi.InfoCircleFilledIcon,null),size:"small",action:p?$i.createElement(Wi.AlertAction,{sx:{width:"fit-content"},variant:"contained",color:"secondary",onClick:()=>{u&&(0,Ui.selectElement)(u)}},(0,qi.__)("Take me there","elementor")):void 0},$i.createElement(Wi.AlertTitle,null,(0,qi.__)("Nested links","elementor")),$i.createElement(Wi.Box,{component:"span"},Gi[c??"descendant"]," ",$i.createElement(Wi.Link,{href:Ki.href,target:"_blank",color:"info.main"},Ki.label)));return a&&o?$i.createElement(Wi.Infotip,{placement:"right",content:g,color:"secondary",slotProps:{popper:{sx:{width:300}}}},$i.createElement(Wi.Box,null,i)):$i.createElement($i.Fragment,null,i)},Ji=__toESM(i(97557)),Yi=i(2020),Xi=i(24413),Qi=i(27723),Zi=__toESM(i(97557)),ea=i(97557),na=i(24413),ra=i(79513),oa=(0,ea.forwardRef)((r,o)=>{const{options:i,onOptionChange:a,onTextChange:c,allowCustomValues:u=!1,placeholder:p="",minInputLength:g=2,value:v="",startAdornment:b,disablePortal:k=!0,inputProps:E,...w}=r,x=function factoryFilter(r,o,i){if(null===r)return o;const a=String(r||"")?.toLowerCase();if(a.length<i)return new Array(0);return o.filter(r=>String(r.id).toLowerCase().includes(a)||r.label.toLowerCase().includes(a))}(v,i,g).map(({id:r})=>r),C=!!v,_=u||!!v?.toString()?.length?void 0:()=>!0,T="number"==typeof v&&!!findMatchingOption(i,v),P=(v?.toString()?.length??0)>=g&&(!u||x.length>0);return Zi.createElement(ra.Autocomplete,{...w,ref:o,forcePopupIcon:!1,disablePortal:k,disableClearable:!0,freeSolo:u,openOnFocus:!1,open:P,value:v?.toString()||"",size:"tiny",onChange:(r,o)=>a(Number(o)),readOnly:T,options:x,getOptionKey:r=>findMatchingOption(i,r)?.id||r,getOptionLabel:r=>findMatchingOption(i,r)?.label||r.toString(),groupBy:isCategorizedOptionPool(i)?r=>findMatchingOption(i,r)?.groupLabel||r:void 0,isOptionEqualToValue:_,filterOptions:()=>x,renderOption:(r,o)=>Zi.createElement(ra.Box,{component:"li",...r,key:r.id},findMatchingOption(i,o)?.label??o),renderInput:r=>Zi.createElement(TextInput,{params:r,handleChange:r=>c?.(r),allowClear:C,placeholder:p,hasSelectedValue:T,startAdornment:b,extraInputProps:E})})}),TextInput=({params:r,allowClear:o,placeholder:i,handleChange:a,hasSelectedValue:c,startAdornment:u,extraInputProps:p})=>Zi.createElement(ra.TextField,{...r,placeholder:i,onChange:r=>{a(r.target.value)},inputProps:{...r.inputProps??{},...p??{}},sx:{"& .MuiInputBase-input":{cursor:c?"default":void 0}},InputProps:{...r.InputProps,startAdornment:u||r.InputProps.startAdornment,endAdornment:Zi.createElement(ClearButton,{params:r,allowClear:o,handleChange:a})}}),ClearButton=({allowClear:r,handleChange:o,params:i})=>Zi.createElement(ra.InputAdornment,{position:"end"},r&&Zi.createElement(ra.IconButton,{size:i.size,onClick:()=>o(null),sx:{cursor:"pointer"}},Zi.createElement(na.XIcon,{fontSize:i.size})));function findMatchingOption(r,o=null){const i=(o||"").toString();return r.find(({id:r})=>i===r.toString())}function isCategorizedOptionPool(r){if(r.length<=1)return!1;return new Set(r.map(r=>r.groupLabel)).size>1}var ia=i(97557),aa=i(2020),sa=i(18998),la=i(22444);function useQueryAutocomplete({url:r,params:o={},minInputLength:i=2,initialQueryValue:a=null,excludeIds:c}){const u=(0,ia.useMemo)(()=>new Set((c??[]).map(String)),[c]),[p,g]=(0,ia.useState)(function generateFirstLoadedOption(r){const o=extractFlatOptionFromQueryValue(r);return o?[o]:[]}(a)),v=(0,ia.useMemo)(()=>(0,la.debounce)(o=>fetchOptions(r,o).then(r=>{g(formatOptions(filterExcludedOptions(r,u)))}),400),[r,u]);(0,ia.useEffect)(()=>{0===i&&r&&fetchOptions(r,{...o,term:""}).then(r=>{g(formatOptions(filterExcludedOptions(r,u)))})},[r,i,u,o]);return{options:p,updateOptions:a=>{const c=a??"";!r||c.length<i||v({...o,term:c})}}}async function fetchOptions(r,o){if(!o||!r)return[];try{const{data:i}=await(0,sa.httpService)().get(r,{params:o});return i.data.value}catch{return[]}}function formatOptions(r){const o=isCategorizedOptionPool(r)?"groupLabel":"label";return r.sort((r,i)=>r[o]&&i[o]?r[o].localeCompare(i[o]):0)}function filterExcludedOptions(r,o){return 0===o.size?r:r.filter(r=>!o.has(String(r.id)))}function extractFlatOptionFromQueryValue(r){const o=aa.numberPropTypeUtil.extract(r?.id),i=aa.stringPropTypeUtil.extract(r?.label);return null===o?null:{id:String(o),label:i||String(o)}}var ca=createControl(r=>{const{value:o,setValue:i}=useBoundProp(Yi.queryPropTypeUtil),{value:a,setValue:c,placeholder:u}=useBoundProp(Yi.urlPropTypeUtil),{allowCustomValues:p=!0,queryOptions:{url:g,params:v={}},placeholder:b=(0,Qi.__)("Search","elementor"),minInputLength:k=2,onSetValue:E,ariaLabel:w}=r||{},{options:x,updateOptions:C}=useQueryAutocomplete({url:g,params:v,minInputLength:k,initialQueryValue:o}),_=o?.id?.value??a;return Ji.createElement(ControlActions,null,Ji.createElement(oa,{options:x,allowCustomValues:p,placeholder:u??b,startAdornment:Ji.createElement(Xi.SearchIcon,{fontSize:"tiny"}),value:_,onOptionChange:r=>{if(null===r)return i(null),void E?.(null);const o={id:Yi.numberPropTypeUtil.create(r),label:Yi.stringPropTypeUtil.create(findMatchingOption(x,r)?.label||null)};i(o),E?.(Yi.queryPropTypeUtil.create(o))},onTextChange:r=>{const o=r?.trim()||"";if(!o)return c(null),void E?.(null);c(o),E?.(Yi.urlPropTypeUtil.create(o)),C(r)},minInputLength:k,disablePortal:!1,inputProps:{...w?{"aria-label":w}:{}}}))}),ua=__toESM(i(97557)),pa=i(2020),da=i(79513),fa=createControl(()=>{const{value:r,setValue:o,disabled:i,placeholder:a}=useBoundProp(pa.booleanPropTypeUtil);return ua.createElement(da.Box,{sx:{display:"flex",justifyContent:"flex-end"}},ua.createElement(da.Switch,{checked:!(!r&&!a),onChange:r=>{o(r.target.checked)},size:"small",disabled:i,inputProps:{...i?{style:{opacity:0}}:{}}}))}),ha="tiny",ma=createControl(r=>{const{value:o,path:i,setValue:a,...c}=useBoundProp(Di.linkPropTypeUtil),u=c.placeholder,[p,g]=(0,zi.useSessionStorage)(i.join("/")),[v,b]=(0,Ri.useState)(!!o||!!u),{allowCustomValues:k=!0,queryOptions:E,placeholder:w,minInputLength:x=2,context:{elementId:C},label:_=(0,Vi.__)("Link","elementor"),ariaLabel:T}=r||{},[P,A]=(0,Ri.useState)((0,Ii.getLinkInLinkRestriction)(C,o??u)),N=!v&&P.shouldRestrict,R=(0,Bi.useDebouncedCallback)(()=>{const r=(0,Ii.getLinkInLinkRestriction)(C,o??u);r.shouldRestrict&&v&&!u&&(b(!1),null!==o&&a(null)),A(o=>function isSameRestriction(r,o){return r.shouldRestrict===o.shouldRestrict&&r.reason===o.reason&&r.elementId===o.elementId}(o,r)?o:r)},300);(0,Li.__privateUseListenTo)((0,Li.commandEndEvent)("document/elements/set-settings"),()=>{R()},[R]),(0,Ri.useEffect)(()=>{R();const handleInlineLinkChanged=()=>{R()};return window.addEventListener("elementor:inline-link-changed",handleInlineLinkChanged),()=>{window.removeEventListener("elementor:inline-link-changed",handleInlineLinkChanged)}},[C,R]);return Ni.createElement(PropProvider,{...c,value:o,setValue:a},Ni.createElement(ji.Stack,{gap:1.5},Ni.createElement(ji.Stack,{direction:"row",sx:{justifyContent:"space-between",alignItems:"center",marginInlineEnd:-.75}},Ni.createElement(ControlLabel,null,_),Ni.createElement(RestrictedLinkInfotip,{isVisible:!v,linkInLinkRestriction:P},Ni.createElement(ji.IconButton,{size:ha,onClick:()=>{if(A((0,Ii.getLinkInLinkRestriction)(C,o??u)),P.shouldRestrict&&!v)return;const r=!v;b(r),r||null===o||a(null),r&&p?.value&&a(p.value),g({value:p?.value,meta:{isEnabled:r}})},"aria-label":(0,Vi.__)("Toggle link","elementor"),disabled:N},v?Ni.createElement(Fi.MinusIcon,{fontSize:ha}):Ni.createElement(Fi.PlusIcon,{fontSize:ha})))),Ni.createElement(ji.Collapse,{in:v,timeout:"auto",unmountOnExit:!0},Ni.createElement(ji.Stack,{gap:1.5},Ni.createElement(PropKeyProvider,{bind:"destination"},Ni.createElement(ca,{queryOptions:E,allowCustomValues:k,minInputLength:x,placeholder:w,onSetValue:r=>{const i=r?{...o,destination:r}:null;g({...p,value:i})},ariaLabel:T||_})),Ni.createElement(PropKeyProvider,{bind:"isTargetBlank"},Ni.createElement(ji.Grid,{container:!0,alignItems:"center",flexWrap:"nowrap",justifyContent:"space-between"},Ni.createElement(ji.Grid,{item:!0},Ni.createElement(ControlFormLabel,null,(0,Vi.__)("Open in a new tab","elementor"))),Ni.createElement(ji.Grid,{item:!0,sx:{marginInlineEnd:-1}},Ni.createElement(fa,null))))))))});var ga=__toESM(i(97557)),va=i(70975),ya=i(2020),ba=i(70374),ka=i(79513),Ea=i(27723),Sa=__toESM(i(97557)),wa=i(70374),xa=i(79513),Ca=i(79513),_a="secondary",Ta=Sa.forwardRef(({children:r,title:o,description:i,alertProps:a,infotipProps:c,...u},p)=>{const g="rtl"===(0,xa.useTheme)().direction,v=u.isEnabled&&(o||i);return Sa.createElement(xa.Box,{ref:p},v?Sa.createElement(Ca.DirectionProvider,{rtl:g},Sa.createElement(xa.Infotip,{placement:"right",color:_a,slotProps:{popper:{modifiers:[{name:"offset",options:{offset:[0,10]}}]}},...c,content:Sa.createElement(wa.InfoAlert,{color:_a,sx:{width:300,px:1.5,py:2},...a},Sa.createElement(xa.Box,{sx:{flexDirection:"column",display:"flex",gap:.5}},Sa.createElement(xa.AlertTitle,null,o),Sa.createElement(xa.Box,null,i)))},r)):r)}),Oa=(0,ka.styled)(ka.Select)(()=>({".MuiSelect-select.Mui-disabled":{cursor:"not-allowed"}})),Pa=createControl(r=>{const{options:o,onChange:i,fallbackLabels:a={},context:{elementId:c}}=r,{value:u,setValue:p,disabled:g,placeholder:v}=useBoundProp(ya.stringPropTypeUtil),b=(0,va.getElementLabel)(c)??"element",k={title:(0,Ea.__)("HTML Tag","elementor"),description:(0,Ea.__)("The tag is locked to 'a' tag because this %s has a link. To pick a different tag, remove the link first.","elementor").replace("%s",b),isEnabled:!!g},findOptionByValue=r=>o.find(o=>o.value===r);return ga.createElement(ControlActions,null,ga.createElement(Ta,{...k},ga.createElement(Oa,{sx:{overflow:"hidden",cursor:g?"not-allowed":void 0},displayEmpty:!0,size:"tiny",renderValue:r=>{if(r)return findOptionByValue(r)?.label||a[r]||r;if(!v)return"";const o=findOptionByValue(v),i=o?.label||v;return ga.createElement(ka.Typography,{component:"span",variant:"caption",color:"text.tertiary"},i)},value:u??"",onChange:r=>{const o=r.target.value||null;i?.(o,u),p(o)},disabled:g,fullWidth:!0},o.map(({label:r,...o})=>ga.createElement(ba.MenuListItem,{key:o.value,...o,value:o.value??""},r)))))}),Aa=__toESM(i(97557)),Ma=i(97557),Na=i(2020),Ra=i(79513),Ia=i(27723),Da=(0,Na.createArrayPropUtils)(Na.queryPropTypeUtil.key,Na.queryPropTypeUtil.schema),La=createControl(r=>{const{queryOptions:o,placeholder:i,minInputLength:a=2}=r,{value:c,setValue:u,disabled:p}=useBoundProp(Da),g=(0,Ma.useMemo)(()=>function extractChips(r){if(!r)return[];return r.map(r=>extractFlatOptionFromQueryValue(r?.value)).filter(r=>null!==r)}(c),[c]),v=(0,Ma.useMemo)(()=>g.map(r=>Number(r.id)).filter(r=>Number.isFinite(r)),[g]),{options:b,updateOptions:k}=useQueryAutocomplete({url:o.url,params:o.params,minInputLength:a,excludeIds:v});return Aa.createElement(ControlActions,null,Aa.createElement(Ra.Autocomplete,{multiple:!0,fullWidth:!0,disableClearable:!0,forcePopupIcon:!1,disabled:p,size:"tiny",value:g,options:b,onChange:(r,o)=>{u(o.map(r=>Na.queryPropTypeUtil.create({id:Na.numberPropTypeUtil.create(Number(r.id)),label:Na.stringPropTypeUtil.create(r.label)})))},onInputChange:(r,o)=>{k(o||null)},getOptionLabel:r=>r.label,isOptionEqualToValue:(r,o)=>r.id===o.id,filterOptions:r=>r,renderTags:(r,o)=>Aa.createElement(ChipsList,{getLabel:r=>r.label,getTagProps:o,values:r}),renderInput:r=>Aa.createElement(Ra.TextField,{...r,placeholder:i??(0,Ia.__)("Search","elementor")})}))});var Fa=__toESM(i(97557)),za=i(97557),ja=i(70975),Ba=i(2020),Va=i(24413),$a=i(79513),Ua=i(27723),Ha=createControl(({allowedKeys:r,keyConfig:o,label:i=(0,Ua.__)("Filter","elementor"),chipsPlaceholder:a})=>{const{propType:c,value:u,setValue:p}=useBoundProp(Ba.queryFilterArrayPropTypeUtil),{settings:g}=(0,ja.useSelectedElementSettings)(),v=(0,za.useMemo)(()=>r.filter(r=>function isKeyVisible(r,o){if(!r)return!0;if(!o)return!1;const i=Ba.stringPropTypeUtil.extract((0,Ba.extractValue)(r.path,o));return null!==i&&r.in.includes(i)}(o[r]?.visibleWhen,g)),[r,o,g]),b=(0,za.useMemo)(()=>function getUsedKeys(r){const o=r.map(r=>Ba.stringPropTypeUtil.extract(r?.value?.key)).filter(r=>!!r);return new Set(o)}(u??[]),[u]),k=(0,za.useMemo)(()=>v.find(r=>!b.has(r))??null,[v,b]),E=(0,za.useMemo)(()=>r=>v.map(i=>({value:i,label:o[i]?.label??i,disabled:i!==r&&b.has(i)})),[v,o,b]),w=(0,za.useMemo)(()=>createItemForKey(v[0]??""),[v]);return Fa.createElement(PropProvider,{propType:c,value:u,setValue:p},Fa.createElement(ControlRepeater,{initial:w,propTypeUtil:Ba.queryFilterArrayPropTypeUtil},Fa.createElement(sr,{label:i},Fa.createElement(AddFilterItemAction,{nextAvailableKey:k,ariaLabel:i})),Fa.createElement(ItemsContainer,{isSortable:!1},Fa.createElement(Item,{Icon:EmptyIcon,actions:Fa.createElement(RemoveItemAction,null),Label:({value:r})=>Fa.createElement(ItemLabel2,{value:r,keyConfig:o})})),Fa.createElement(EditItemPopover,null,Fa.createElement(ItemContent,{keyConfig:o,getKeySelectOptions:E,chipsPlaceholder:a}))))}),AddFilterItemAction=({nextAvailableKey:r,ariaLabel:o})=>{const{addItem:i}=useRepeaterContext(),a=null===r;return Fa.createElement($a.Box,{component:"span",sx:{cursor:a?"not-allowed":"pointer"}},Fa.createElement($a.IconButton,{size:"tiny",disabled:a,onClick:o=>{r&&i(o,{item:createItemForKey(r),index:0})},"aria-label":(0,Ua.sprintf)((0,Ua.__)("Add %s item","elementor"),o.toLowerCase())},Fa.createElement(Va.PlusIcon,{fontSize:"tiny"})))},EmptyIcon=()=>null,ItemLabel2=({value:r,keyConfig:o})=>{const i=Ba.stringPropTypeUtil.extract(r?.value?.key),a=i&&o[i]?.label||(0,Ua.__)("Item","elementor"),c=function extractChipLabels(r){return(r?.value??[]).map(r=>Ba.stringPropTypeUtil.extract(r?.value?.label)).filter(r=>!!r)}(r?.value?.values),u=[...c,...function extractTaxonomyLabels(r,o){const i=(Ba.stringArrayPropTypeUtil.extract(r)??[]).map(r=>Ba.stringPropTypeUtil.extract(r)).filter(r=>!!r);if(!i.length)return[];const a=o?.staticOptions??[];return i.map(r=>a.find(o=>o.value===r)?.label??r)}(r?.value?.taxonomies,i?o[i]:void 0)],p=u.length>0?`: ${u.join(", ")}`:"";return Fa.createElement($a.Box,{component:"span"},a,p)};var ItemContent=({keyConfig:r,getKeySelectOptions:o,chipsPlaceholder:i})=>{const a=useBoundProp(Ba.queryFilterPropTypeUtil),c=(0,za.useRef)({}),u=Ba.stringPropTypeUtil.extract(a.value?.key),p=u?r[u]:void 0,g=p?.valueType??"chips",v=(0,za.useMemo)(()=>o(u),[o,u]);return Fa.createElement(PopoverContent,{p:1.5},Fa.createElement(PropProvider,{...a,setValue:(r,o,i)=>{if("key"!==i?.bind)return void a.setValue(r,o,i);const u=Ba.stringPropTypeUtil.extract(a.value?.key),p=Ba.stringPropTypeUtil.extract(r?.key);u&&(c.current[u]={values:a.value?.values??null,taxonomies:a.value?.taxonomies??null});const g=p?c.current[p]:void 0;a.setValue({...r,values:g?.values??null,taxonomies:g?.taxonomies??null},o,i)}},Fa.createElement(rr,{flexWrap:"wrap"},Fa.createElement($a.Grid,{item:!0,xs:12},Fa.createElement(ControlFormLabel,null,(0,Ua.__)("Type","elementor"))),Fa.createElement($a.Grid,{item:!0,xs:12},Fa.createElement(PropKeyProvider,{bind:"key"},Fa.createElement(_e,{options:v})))),"taxonomies"===g&&p?.staticOptions&&Fa.createElement(rr,{flexWrap:"wrap"},Fa.createElement($a.Grid,{item:!0,xs:12},Fa.createElement(ControlFormLabel,null,p.label)),Fa.createElement($a.Grid,{item:!0,xs:12},Fa.createElement(PropKeyProvider,{bind:"taxonomies"},Fa.createElement(oo,{options:p.staticOptions})))),"taxonomies"!==g&&p?.queryEndpoint&&Fa.createElement(rr,{flexWrap:"wrap"},Fa.createElement($a.Grid,{item:!0,xs:12},Fa.createElement(ControlFormLabel,null,p.label)),Fa.createElement($a.Grid,{item:!0,xs:12},Fa.createElement(PropKeyProvider,{bind:"values"},Fa.createElement(La,{queryOptions:{url:p.queryEndpoint.url,params:p.queryEndpoint.params??{}},placeholder:p.chipsPlaceholder??i}))))))};function createItemForKey(r){return Ba.queryFilterPropTypeUtil.create({key:Ba.stringPropTypeUtil.create(r),values:null,taxonomies:null})}var Wa=__toESM(i(97557)),qa=i(97557),Ka=i(2020),Ga=i(74518),Ja=i(24413),Ya=i(79513),Xa=i(27723),GapControl=({label:r})=>{const o=(0,qa.useRef)(null),{disabled:i}=useBoundProp(Ka.sizePropTypeUtil),{value:a,setValue:c,propType:u,placeholder:p,disabled:g}=useBoundProp(Ka.layoutDirectionPropTypeUtil),{value:v,setValue:b,placeholder:k}=useBoundProp(),inferIsLinked=()=>!Ka.layoutDirectionPropTypeUtil.isValid(v)&&!(!v&&Ka.layoutDirectionPropTypeUtil.isValid(k)),[E,w]=(0,qa.useState)(()=>inferIsLinked()),x=Ka.layoutDirectionPropTypeUtil.isValid(v??k),C=(0,Ga.useActiveBreakpoint)();(0,qa.useLayoutEffect)(()=>{w(inferIsLinked())},[C,x]);const _=r.toLowerCase(),T=E?Ja.LinkIcon:Ja.DetachIcon,P=(0,Xa.__)("Link %s","elementor").replace("%s",_),A=(0,Xa.__)("Unlink %s","elementor").replace("%s",_),N=i||g,R={propType:u,value:a??(E?null:{row:p?.row,column:p?.column}),setValue:r=>{const o=Object.entries(r).filter(([,r])=>Boolean(r));c(0===o.length?null:Object.fromEntries(o))},placeholder:p},I=!v&&(p||k),getEffectivePlaceholder=r=>{if(E){const r=p?.column??p?.row;return Ka.sizePropTypeUtil.extract(r)}return Ka.sizePropTypeUtil.extract(p?.[r])};return Wa.createElement(PropProvider,{...R},Wa.createElement(Ya.Stack,{direction:"row",gap:2,flexWrap:"nowrap"},Wa.createElement(ControlLabel,null,r),Wa.createElement(Ya.Tooltip,{title:E?A:P,placement:"top"},Wa.createElement(mo,{"aria-label":E?A:P,size:"tiny",value:"check",selected:E,sx:{marginLeft:"auto"},onChange:()=>{if(w(r=>!r),!Ka.layoutDirectionPropTypeUtil.isValid(v)){const r=v||null;return r?void b(Ka.layoutDirectionPropTypeUtil.create({row:r,column:r})):void b(null)}b(a?.column??a?.row??null)},disabled:N,isPlaceholder:I},Wa.createElement(T,{fontSize:"tiny"})))),Wa.createElement(Ya.Stack,{direction:"row",gap:2,flexWrap:"nowrap",ref:o},Wa.createElement(Ya.Grid,{container:!0,gap:.75,alignItems:"center"},Wa.createElement(Ya.Grid,{item:!0,xs:12},Wa.createElement(ControlFormLabel,null,(0,Xa.__)("Column","elementor"))),Wa.createElement(Ya.Grid,{item:!0,xs:12},Wa.createElement(Control4,{bind:"column",ariaLabel:(0,Xa.__)("Column gap","elementor"),isLinked:E,anchorRef:o,placeholder:getEffectivePlaceholder("column")??void 0}))),Wa.createElement(Ya.Grid,{container:!0,gap:.75,alignItems:"center"},Wa.createElement(Ya.Grid,{item:!0,xs:12},Wa.createElement(ControlFormLabel,null,(0,Xa.__)("Row","elementor"))),Wa.createElement(Ya.Grid,{item:!0,xs:12},Wa.createElement(Control4,{bind:"row",ariaLabel:(0,Xa.__)("Row gap","elementor"),isLinked:E,anchorRef:o,placeholder:getEffectivePlaceholder("row")??void 0})))))},Control4=({bind:r,ariaLabel:o,isLinked:i,anchorRef:a,placeholder:c})=>i?Wa.createElement(hi,{anchorRef:a,placeholder:c,ariaLabel:o}):Wa.createElement(PropKeyProvider,{bind:r},Wa.createElement(hi,{anchorRef:a,placeholder:c,ariaLabel:o})),Qa=__toESM(i(97557)),Za=i(97557),es=i(2020),ns=i(70374),rs=i(24413),os=i(79513),as=i(27723),ss=[{label:(0,as.__)("Auto","elementor"),value:"auto"},{label:"1/1",value:"1/1"},{label:"4/3",value:"4/3"},{label:"3/4",value:"3/4"},{label:"16/9",value:"16/9"},{label:"9/16",value:"9/16"},{label:"3/2",value:"3/2"},{label:"2/3",value:"2/3"}],ls="custom",cs=createControl(({label:r})=>{const{value:o,setValue:i,disabled:a,placeholder:c}=useBoundProp(es.stringPropTypeUtil),u=o??c,p=u&&!ss.some(r=>r.value===u),[g,v]=p?u.split("/"):["",""],[b,k]=(0,Za.useState)(p),[E,w]=(0,Za.useState)(g),[x,C]=(0,Za.useState)(v),[_,T]=(0,Za.useState)(p?ls:u||"");(0,Za.useEffect)(()=>{if(u&&!ss.some(r=>r.value===u)){const[r,o]=u.split("/");w(r||""),C(o||""),T(ls),k(!0)}else T(u||""),k(!1),w(""),C("")},[u]);const P=o??c,A=ss.find(r=>r.value===P);return Qa.createElement(ControlActions,null,Qa.createElement(os.Stack,{direction:"column",gap:2},Qa.createElement(os.Grid,{container:!0,gap:2,alignItems:"center",flexWrap:"nowrap"},Qa.createElement(os.Grid,{item:!0,xs:6},Qa.createElement(ControlLabel,null,r)),Qa.createElement(os.Grid,{item:!0,xs:6},Qa.createElement(os.Select,{size:"tiny",displayEmpty:!0,sx:{overflow:"hidden"},disabled:a,value:_,onChange:r=>{const o=r.target.value,a=o===ls;k(a),T(o),a||i(o)},renderValue:p?void 0:()=>A?.label,fullWidth:!0},[...ss,{label:(0,as.__)("Custom","elementor"),value:ls}].map(({label:r,...o})=>Qa.createElement(ns.MenuListItem,{key:o.value,...o,value:o.value??""},r))))),b&&Qa.createElement(os.Grid,{container:!0,gap:2,alignItems:"center",flexWrap:"nowrap"},Qa.createElement(os.Grid,{item:!0,xs:6},Qa.createElement(os.TextField,{size:"tiny",type:"number",fullWidth:!0,disabled:a,value:E,onChange:r=>{const o=r.target.value;w(o),o&&x&&i(`${o}/${x}`)},InputProps:{startAdornment:Qa.createElement(rs.ArrowsMoveHorizontalIcon,{fontSize:"tiny"})}})),Qa.createElement(os.Grid,{item:!0,xs:6},Qa.createElement(os.TextField,{size:"tiny",type:"number",fullWidth:!0,disabled:a,value:x,onChange:r=>{const o=r.target.value;C(o),E&&o&&i(`${E}/${o}`)},InputProps:{startAdornment:Qa.createElement(rs.ArrowsMoveVerticalIcon,{fontSize:"tiny"})}})))))}),us=__toESM(i(97557)),ps=i(97557),ds=i(46400),fs=i(2020),hs=i(24413),ms=i(79513),gs=i(84792),vs=i(27723),ys=__toESM(i(97557)),bs=i(97557),ks=i(79513),Es=i(27723),Ss=(0,Es.__)("Enable Unfiltered Uploads","elementor"),ws=(0,Es.__)("Before you enable unfiltered files upload, note that such files include a security risk. Elementor does run a process to remove possible malicious code, but there is still risk involved when using such files.","elementor"),xs=(0,Es.__)("Failed to enable unfiltered files upload.","elementor"),Cs=(0,Es.__)("You can try again, if the problem persists, please contact support.","elementor"),EnableUnfilteredModal=r=>{const{mutateAsync:o,isPending:i}=function useUpdateUnfilteredFilesUpload(){const r=(0,oe.useQueryClient)();return(0,oe.useMutation)({mutationFn:({allowUnfilteredFilesUpload:r})=>apiClient_updateElementorSetting(se,r?"1":"0"),onSuccess:()=>r.invalidateQueries(le)})}(),[a,c]=(0,bs.useState)(!1),u={...r,isPending:i,handleEnable:async()=>{try{const i=await o({allowUnfilteredFilesUpload:!0});!1===i?.data?.success?c(!0):r.onClose(!0)}catch{c(!0)}},isError:a,onClose:o=>{r.onClose(o),setTimeout(()=>c(!1),300)}};return ys.createElement(AdminDialog,{...u})},AdminDialog=({open:r,onClose:o,handleEnable:i,isPending:a,isError:c})=>ys.createElement(ks.Dialog,{open:r,maxWidth:"sm",onClose:()=>o(!1)},ys.createElement(ks.DialogHeader,{logo:!1},ys.createElement(ks.DialogTitle,null,Ss)),ys.createElement(ks.Divider,null),ys.createElement(ks.DialogContent,null,ys.createElement(ks.DialogContentText,null,c?ys.createElement(ys.Fragment,null,xs," ",ys.createElement("br",null)," ",Cs):ws)),ys.createElement(ks.DialogActions,null,ys.createElement(ks.Button,{size:"medium",color:"secondary",onClick:()=>o(!1)},(0,Es.__)("Cancel","elementor")),ys.createElement(ks.Button,{size:"medium",onClick:()=>i(),variant:"contained",color:"primary",disabled:a},a?ys.createElement(ks.CircularProgress,{size:24}):(0,Es.__)("Enable","elementor")))),_s="transparent",Ts="#c1c1c1",Os=`linear-gradient(45deg, ${Ts} 25%, ${_s} 0, ${_s} 75%, ${Ts} 0, ${Ts})`,Ps=(0,ms.styled)(ms.Card)` background-color: white; background-image: ${Os}, ${Os}; background-size: ${8}px ${8}px; background-position: 0 0, ${4}px ${4}px; border: none; `,As=(0,ms.styled)(ms.Stack)` position: relative; height: 140px; object-fit: contain; padding: 5px; justify-content: center; align-items: center; background-color: rgba( 255, 255, 255, 0.37 ); `,Ms={mode:"browse"},Ns={mode:"upload"},Rs=createControl(()=>{const{value:r,setValue:o}=useBoundProp(fs.svgSrcPropTypeUtil),i=r?.id,a=r?.url,{data:c,isFetching:u}=(0,gs.useWpMediaAttachment)(i?.value||null),p=c?.url??a?.value??null,{data:g}=useUnfilteredFilesUpload(),[v,b]=(0,ps.useState)(!1),{isAdmin:k}=(0,ds.useCurrentUserCapabilities)(),{open:E}=(0,gs.useWpMediaFrame)({mediaTypes:["svg"],multiple:!1,selected:i?.value||null,onSelect:r=>{o({id:{$$type:"image-attachment-id",value:r.id},url:fs.urlPropTypeUtil.create(r.url)})}}),handleClick=r=>{g||r!==Ns?E(r):b(!0)},w={title:(0,vs.__)("Sorry, you can't upload that file yet.","elementor"),description:us.createElement(us.Fragment,null,(0,vs.__)("To upload them anyway, ask the site administrator to enable unfiltered","elementor"),us.createElement("br",null),(0,vs.__)("file uploads.","elementor")),isEnabled:!k};return us.createElement(ms.Stack,{gap:1,"aria-label":"SVG Control"},us.createElement(EnableUnfilteredModal,{open:v,onClose:r=>{b(!1),r&&E(Ns)}}),us.createElement(ControlActions,null,us.createElement(Ps,{variant:"outlined"},us.createElement(As,null,u?us.createElement(ms.CircularProgress,{role:"progressbar"}):us.createElement(ms.CardMedia,{component:"img",image:p,alt:(0,vs.__)("Preview SVG","elementor"),sx:{maxHeight:"140px",width:"50px"}})),us.createElement(ms.CardOverlay,{sx:{"&:hover":{backgroundColor:"rgba( 0, 0, 0, 0.75 )"}}},us.createElement(ms.Stack,{gap:1},us.createElement(ms.Button,{size:"tiny",color:"inherit",variant:"outlined",onClick:()=>handleClick(Ms),"aria-label":"Select SVG"},(0,vs.__)("Select SVG","elementor")),us.createElement(Ta,{...w},us.createElement("span",null,us.createElement(ms.ThemeProvider,{colorScheme:k?"light":"dark"},us.createElement(ms.Button,{size:"tiny",variant:"text",color:"inherit",startIcon:us.createElement(hs.UploadIcon,null),disabled:!k,onClick:()=>k&&handleClick(Ns),"aria-label":"Upload SVG"},(0,vs.__)("Upload","elementor"))))))))))}),Is=__toESM(i(97557)),Ds=i(2020),Ls=i(24413),Fs=i(79513),zs=i(84792),js=i(27723),Bs=window.elementorCommon?.config?.urls?.assets+"/shapes/play-triangle.svg",Vs=createControl(()=>{const{value:r,setValue:o}=useBoundProp(Ds.videoSrcPropTypeUtil),{id:i,url:a}=r??{},{data:c,isFetching:u}=(0,zs.useWpMediaAttachment)(i?.value||null),p=c?.url??a?.value??null,{open:g}=(0,zs.useWpMediaFrame)({mediaTypes:["video"],multiple:!1,selected:i?.value||null,onSelect:r=>{o({id:{$$type:"video-attachment-id",value:r.id},url:null})}});return Is.createElement(ControlActions,null,Is.createElement(Fs.Card,{variant:"outlined"},Is.createElement(Fs.CardMedia,{sx:{height:140,backgroundColor:"white",backgroundSize:"8px 8px",backgroundPosition:"0 0, 4px 4px",backgroundRepeat:"repeat",backgroundImage:`${Os}, ${Os}`,display:"flex",justifyContent:"center",alignItems:"center"}},Is.createElement(VideoPreview,{isFetching:u,videoUrl:p})),Is.createElement(Fs.CardOverlay,null,Is.createElement(Fs.Stack,{gap:1},Is.createElement(Fs.Button,{size:"tiny",color:"inherit",variant:"outlined",onClick:()=>g({mode:"browse"})},(0,js.__)("Select video","elementor")),Is.createElement(Fs.Button,{size:"tiny",variant:"text",color:"inherit",startIcon:Is.createElement(Ls.UploadIcon,null),onClick:()=>g({mode:"upload"})},(0,js.__)("Upload","elementor"))))))}),VideoPreview=({isFetching:r=!1,videoUrl:o})=>r?Is.createElement(Fs.CircularProgress,null):o?Is.createElement("video",{src:o,muted:!0,preload:"metadata",style:{width:"100%",height:"100%",objectFit:"cover",pointerEvents:"none"}}):Is.createElement("img",{src:Bs,alt:"No video selected"}),$s=__toESM(i(97557)),Us=i(2020),Hs=i(79513),Ws=i(27723),qs=__toESM(i(97557)),Ks=i(2020),Gs=i(79513),Js=i(84792),Ys=i(27723),Xs=i(78806),{env:Qs}=(0,Xs.parseEnv)("@elementor/editor-controls"),Zs=__toESM(i(97557)),el=i(2020),tl=i(79513),nl=createControl(()=>{const{value:r,setValue:o}=useBoundProp(el.backgroundGradientOverlayPropTypeUtil),createTransformableValue=r=>({...r,type:el.stringPropTypeUtil.create(r.type),angle:el.numberPropTypeUtil.create(r.angle),stops:el.gradientColorStopPropTypeUtil.create(r.stops.map(({color:r,offset:o})=>el.colorStopPropTypeUtil.create({color:el.colorPropTypeUtil.create(r),offset:el.numberPropTypeUtil.create(o)})))});return Zs.createElement(tl.UnstableGradientBox,{sx:{width:"auto",padding:1.5},value:(()=>{if(!r)return;const{type:o,angle:i,stops:a,positions:c}=r;return{type:o.value,angle:i?.value||0,stops:a.value.map(({value:{color:r,offset:o}})=>({color:r.value,offset:o.value})),positions:c?.value.split(" ")}})(),onChange:r=>{const i=createTransformableValue(r);i.positions&&(i.positions=el.stringPropTypeUtil.create(r.positions.join(" "))),o(i)}})}),rl=el.backgroundGradientOverlayPropTypeUtil.create({type:el.stringPropTypeUtil.create("linear"),angle:el.numberPropTypeUtil.create(180),stops:el.gradientColorStopPropTypeUtil.create([el.colorStopPropTypeUtil.create({color:el.colorPropTypeUtil.create("rgb(0,0,0)"),offset:el.numberPropTypeUtil.create(0)}),el.colorStopPropTypeUtil.create({color:el.colorPropTypeUtil.create("rgb(255,255,255)"),offset:el.numberPropTypeUtil.create(100)})])}),ol=__toESM(i(97557)),il=i(24413),al=i(79513),sl=i(27723),ll=[{value:"fixed",label:(0,sl.__)("Fixed","elementor"),renderContent:({size:r})=>ol.createElement(il.PinIcon,{fontSize:r}),showTooltip:!0},{value:"scroll",label:(0,sl.__)("Scroll","elementor"),renderContent:({size:r})=>ol.createElement(il.PinnedOffIcon,{fontSize:r}),showTooltip:!0}],BackgroundImageOverlayAttachment=()=>ol.createElement(rr,null,ol.createElement(al.Grid,{item:!0,xs:6},ol.createElement(ControlFormLabel,null,(0,sl.__)("Attachment","elementor"))),ol.createElement(al.Grid,{item:!0,xs:6,sx:{display:"flex",justifyContent:"flex-end",overflow:"hidden"}},ol.createElement(bo,{options:ll}))),cl=__toESM(i(97557)),ul=i(97557),pl=i(2020),dl=i(70374),fl=i(24413),hl=i(79513),ml=i(27723),gl=[{label:(0,ml.__)("Center center","elementor"),value:"center center"},{label:(0,ml.__)("Center left","elementor"),value:"center left"},{label:(0,ml.__)("Center right","elementor"),value:"center right"},{label:(0,ml.__)("Top center","elementor"),value:"top center"},{label:(0,ml.__)("Top left","elementor"),value:"top left"},{label:(0,ml.__)("Top right","elementor"),value:"top right"},{label:(0,ml.__)("Bottom center","elementor"),value:"bottom center"},{label:(0,ml.__)("Bottom left","elementor"),value:"bottom left"},{label:(0,ml.__)("Bottom right","elementor"),value:"bottom right"},{label:(0,ml.__)("Custom","elementor"),value:"custom"}],BackgroundImageOverlayPosition=()=>{const r=useBoundProp(pl.backgroundImagePositionOffsetPropTypeUtil),o=useBoundProp(pl.stringPropTypeUtil),i=!!r.value,a=(0,ul.useRef)(null);return cl.createElement(hl.Grid,{container:!0,spacing:1.5},cl.createElement(hl.Grid,{item:!0,xs:12},cl.createElement(rr,null,cl.createElement(hl.Grid,{item:!0,xs:6},cl.createElement(ControlFormLabel,null,(0,ml.__)("Position","elementor"))),cl.createElement(hl.Grid,{item:!0,xs:6,sx:{display:"flex",justifyContent:"flex-end",overflow:"hidden"}},cl.createElement(ControlActions,null,cl.createElement(hl.Select,{fullWidth:!0,size:"tiny",onChange:i=>{const a=i.target.value||null;"custom"===a?r.setValue({x:null,y:null}):o.setValue(a)},disabled:o.disabled,value:(r.value?"custom":o.value)??""},gl.map(({label:r,value:o})=>cl.createElement(dl.MenuListItem,{key:o,value:o??""},r))))))),i?cl.createElement(PropProvider,{...r},cl.createElement(hl.Grid,{item:!0,xs:12},cl.createElement(hl.Grid,{container:!0,spacing:1.5,ref:a},cl.createElement(hl.Grid,{item:!0,xs:6},cl.createElement(PropKeyProvider,{bind:"x"},cl.createElement(Ct,{startIcon:cl.createElement(fl.LetterXIcon,{fontSize:"tiny"}),anchorRef:a,min:-Number.MAX_SAFE_INTEGER}))),cl.createElement(hl.Grid,{item:!0,xs:6},cl.createElement(PropKeyProvider,{bind:"y"},cl.createElement(Ct,{startIcon:cl.createElement(fl.LetterYIcon,{fontSize:"tiny"}),anchorRef:a,min:-Number.MAX_SAFE_INTEGER})))))):null)},vl=__toESM(i(97557)),yl=i(24413),bl=i(79513),kl=i(27723),El=[{value:"repeat",label:(0,kl.__)("Repeat","elementor"),renderContent:({size:r})=>vl.createElement(yl.GridDotsIcon,{fontSize:r}),showTooltip:!0},{value:"repeat-x",label:(0,kl.__)("Repeat-x","elementor"),renderContent:({size:r})=>vl.createElement(yl.DotsHorizontalIcon,{fontSize:r}),showTooltip:!0},{value:"repeat-y",label:(0,kl.__)("Repeat-y","elementor"),renderContent:({size:r})=>vl.createElement(yl.DotsVerticalIcon,{fontSize:r}),showTooltip:!0},{value:"no-repeat",label:(0,kl.__)("No-repeat","elementor"),renderContent:({size:r})=>vl.createElement(yl.XIcon,{fontSize:r}),showTooltip:!0}],BackgroundImageOverlayRepeat=()=>vl.createElement(rr,null,vl.createElement(bl.Grid,{item:!0,xs:6},vl.createElement(ControlFormLabel,null,(0,kl.__)("Repeat","elementor"))),vl.createElement(bl.Grid,{item:!0,xs:6,sx:{display:"flex",justifyContent:"flex-end"}},vl.createElement(bo,{options:El}))),Sl=__toESM(i(97557)),wl=i(97557),xl=i(2020),Cl=i(24413),_l=i(79513),Tl=i(27723),Ol=[{value:"auto",label:(0,Tl.__)("Auto","elementor"),renderContent:({size:r})=>Sl.createElement(Cl.LetterAIcon,{fontSize:r}),showTooltip:!0},{value:"cover",label:(0,Tl.__)("Cover","elementor"),renderContent:({size:r})=>Sl.createElement(Cl.ArrowsMaximizeIcon,{fontSize:r}),showTooltip:!0},{value:"contain",label:(0,Tl.__)("Contain","elementor"),renderContent:({size:r})=>Sl.createElement(Cl.ArrowBarBothIcon,{fontSize:r}),showTooltip:!0},{value:"custom",label:(0,Tl.__)("Custom","elementor"),renderContent:({size:r})=>Sl.createElement(Cl.PencilIcon,{fontSize:r}),showTooltip:!0}],BackgroundImageOverlaySize=()=>{const r=useBoundProp(xl.backgroundImageSizeScalePropTypeUtil),o=useBoundProp(xl.stringPropTypeUtil),i=!!r.value,a=(0,wl.useRef)(null);return Sl.createElement(_l.Grid,{container:!0,spacing:1.5},Sl.createElement(_l.Grid,{item:!0,xs:12},Sl.createElement(rr,null,Sl.createElement(_l.Grid,{item:!0,xs:6},Sl.createElement(ControlFormLabel,null,(0,Tl.__)("Size","elementor"))),Sl.createElement(_l.Grid,{item:!0,xs:6,sx:{display:"flex",justifyContent:"flex-end"}},Sl.createElement(ControlToggleButtonGroup,{exclusive:!0,items:Ol,onChange:i=>{"custom"===i?r.setValue({width:null,height:null}):o.setValue(i)},disabled:o.disabled,value:r.value?"custom":o.value})))),i?Sl.createElement(PropProvider,{...r},Sl.createElement(_l.Grid,{item:!0,xs:12,ref:a},Sl.createElement(rr,null,Sl.createElement(_l.Grid,{item:!0,xs:6},Sl.createElement(PropKeyProvider,{bind:"width"},Sl.createElement(Ct,{startIcon:Sl.createElement(Cl.ArrowsMoveHorizontalIcon,{fontSize:"tiny"}),extendedOptions:["auto"],anchorRef:a}))),Sl.createElement(_l.Grid,{item:!0,xs:6},Sl.createElement(PropKeyProvider,{bind:"height"},Sl.createElement(Ct,{startIcon:Sl.createElement(Cl.ArrowsMoveVerticalIcon,{fontSize:"tiny"}),extendedOptions:["auto"],anchorRef:a})))))):null)},Pl=i(97557),Al=i(2020),Ml=i(79513),Nl=Ks.backgroundColorOverlayPropTypeUtil.create({color:Ks.colorPropTypeUtil.create("#00000033")}),getInitialBackgroundOverlay=()=>({$$type:"background-image-overlay",value:{image:{$$type:"image",value:{src:{$$type:"image-src",value:{url:{$$type:"url",value:Qs.background_placeholder_image},id:null}},size:{$$type:"string",value:"large"}}}}}),Rl=[{label:(0,Ys.__)("Thumbnail - 150 x 150","elementor"),value:"thumbnail"},{label:(0,Ys.__)("Medium - 300 x 300","elementor"),value:"medium"},{label:(0,Ys.__)("Large 1024 x 1024","elementor"),value:"large"},{label:(0,Ys.__)("Full","elementor"),value:"full"}],Il=createControl(()=>{const{propType:r,value:o,setValue:i}=useBoundProp(Ks.backgroundOverlayPropTypeUtil);return qs.createElement(PropProvider,{propType:r,value:o,setValue:i},qs.createElement(ControlRepeater,{initial:getInitialBackgroundOverlay(),propTypeUtil:Ks.backgroundOverlayPropTypeUtil},qs.createElement(sr,{label:(0,Ys.__)("Overlay","elementor")},qs.createElement(TooltipAddItemAction,{newItemIndex:0})),qs.createElement(ItemsContainer,null,qs.createElement(Item,{Icon:ItemIcon2,Label:ItemLabel3,actions:qs.createElement(qs.Fragment,null,qs.createElement(DuplicateItemAction,null),qs.createElement(DisableItemAction,null),qs.createElement(RemoveItemAction,null))})),qs.createElement(EditItemPopover,null,qs.createElement(ItemContent2,null))))}),ItemContent2=()=>{const{getTabsProps:r,getTabProps:o,getTabPanelProps:i}=(({color:r,image:o,gradient:i})=>{const{value:a,setValue:c}=useBoundProp(Al.backgroundImageOverlayPropTypeUtil),{value:u,setValue:p}=useBoundProp(Al.backgroundColorOverlayPropTypeUtil),{value:g,setValue:v}=useBoundProp(Al.backgroundGradientOverlayPropTypeUtil),{getTabsProps:b,getTabProps:k,getTabPanelProps:E}=(0,Ml.useTabs)(u?"color":g?"gradient":"image"),w=(0,Pl.useRef)({image:o,color:r,gradient:i}),saveToHistory=(r,o)=>{o&&(w.current[r]=o)},onTabChange=(r,o)=>{switch(o){case"image":c(w.current.image),saveToHistory("color",u),saveToHistory("gradient",g);break;case"gradient":v(w.current.gradient),saveToHistory("color",u),saveToHistory("image",a);break;case"color":p(w.current.color),saveToHistory("image",a),saveToHistory("gradient",g)}return b().onChange(r,o)};return{getTabProps:k,getTabPanelProps:E,getTabsProps:()=>({...b(),onChange:onTabChange})}})({image:getInitialBackgroundOverlay().value,color:Nl.value,gradient:rl.value}),{rowRef:a}=useRepeaterContext();return qs.createElement(Gs.Box,{sx:{width:"100%"}},qs.createElement(Gs.Box,{sx:{borderBottom:1,borderColor:"divider"}},qs.createElement(Gs.Tabs,{size:"small",variant:"fullWidth",...r(),"aria-label":(0,Ys.__)("Background Overlay","elementor")},qs.createElement(Gs.Tab,{label:(0,Ys.__)("Image","elementor"),...o("image")}),qs.createElement(Gs.Tab,{label:(0,Ys.__)("Gradient","elementor"),...o("gradient")}),qs.createElement(Gs.Tab,{label:(0,Ys.__)("Color","elementor"),...o("color")}))),qs.createElement(Gs.TabPanel,{sx:{p:1.5},...i("image")},qs.createElement(PopoverContent,null,qs.createElement(ImageOverlayContent,null))),qs.createElement(Gs.TabPanel,{sx:{p:1.5},...i("gradient")},qs.createElement(nl,null)),qs.createElement(Gs.TabPanel,{sx:{p:1.5},...i("color")},qs.createElement(PopoverContent,null,qs.createElement(ColorOverlayContent,{anchorEl:a}))))},ItemIcon2=({value:r})=>{switch(r.$$type){case"background-image-overlay":return qs.createElement(ItemIconImage,{value:r});case"background-color-overlay":return qs.createElement(ItemIconColor,{value:r});case"background-gradient-overlay":return qs.createElement(ItemIconGradient,{value:r});default:return null}},extractColorFrom=r=>r?.value?.color?.value?r.value.color.value:"",ItemIconColor=({value:r})=>{const o=extractColorFrom(r);return qs.createElement(Dl,{size:"inherit",component:"span",value:o})},ItemIconImage=({value:r})=>{const{imageUrl:o}=useImage(r);return qs.createElement(Gs.CardMedia,{image:o,sx:r=>({height:"1rem",width:"1rem",borderRadius:r.shape.borderRadius/2+"px",outline:`1px solid ${r.palette.action.disabled}`})})},ItemIconGradient=({value:r})=>{const o=getGradientValue(r);return qs.createElement(Dl,{size:"inherit",component:"span",value:o})},ItemLabel3=({value:r})=>{switch(r.$$type){case"background-image-overlay":return qs.createElement(ItemLabelImage,{value:r});case"background-color-overlay":return qs.createElement(ItemLabelColor,{value:r});case"background-gradient-overlay":return qs.createElement(ItemLabelGradient,{value:r});default:return null}},ItemLabelColor=({value:r})=>{const o=extractColorFrom(r);return qs.createElement("span",null,o)},ItemLabelImage=({value:r})=>{const{imageTitle:o}=useImage(r);return qs.createElement("span",null,o)},ItemLabelGradient=({value:r})=>"linear"===r.value.type.value?qs.createElement("span",null,(0,Ys.__)("Linear Gradient","elementor")):qs.createElement("span",null,(0,Ys.__)("Radial Gradient","elementor")),ColorOverlayContent=({anchorEl:r})=>{const o=useBoundProp(Ks.backgroundColorOverlayPropTypeUtil);return qs.createElement(PropProvider,{...o},qs.createElement(PropKeyProvider,{bind:"color"},qs.createElement(Lt,{anchorEl:r})))},ImageOverlayContent=()=>{const r=useBoundProp(Ks.backgroundImageOverlayPropTypeUtil);return qs.createElement(PropProvider,{...r},qs.createElement(PropKeyProvider,{bind:"image"},qs.createElement(Te,{sizes:Rl})),qs.createElement(PropKeyProvider,{bind:"position"},qs.createElement(BackgroundImageOverlayPosition,null)),qs.createElement(PropKeyProvider,{bind:"repeat"},qs.createElement(BackgroundImageOverlayRepeat,null)),qs.createElement(PropKeyProvider,{bind:"size"},qs.createElement(BackgroundImageOverlaySize,null)),qs.createElement(PropKeyProvider,{bind:"attachment"},qs.createElement(BackgroundImageOverlayAttachment,null)))},Dl=(0,Gs.styled)(Gs.UnstableColorIndicator)(({theme:r})=>({height:"1rem",width:"1rem",borderRadius:r.shape.borderRadius/2+"px"})),useImage=r=>{let o,i=null;const a=r?.value.image.value?.src.value,{data:c}=(0,Js.useWpMediaAttachment)(a.id?.value||null);if(a.id){const r=getFileExtensionFromFilename(c?.filename);o=`${c?.title}${r}`||null,i=c?.url||null}else a.url&&(i=a.url.value,o=i?.substring(i.lastIndexOf("/")+1)||null);return{imageTitle:o,imageUrl:i}},getFileExtensionFromFilename=r=>{if(!r)return"";return`.${r.substring(r.lastIndexOf(".")+1)}`},getGradientValue=r=>{const o=r.value,i=o.stops.value?.map(({value:{color:r,offset:o}})=>`${r.value} ${o.value??0}%`)?.join(",");return"linear"===o.type.value?`linear-gradient(${o.angle.value}deg, ${i})`:`radial-gradient(circle at ${o.positions.value}, ${i})`},Ll=[{label:(0,Ws.__)("Full element","elementor"),value:"border-box"},{label:(0,Ws.__)("Padding edges","elementor"),value:"padding-box"},{label:(0,Ws.__)("Content edges","elementor"),value:"content-box"},{label:(0,Ws.__)("Text","elementor"),value:"text"}],Fl=(0,Ws.__)("Color","elementor"),zl=(0,Ws.__)("Clipping","elementor"),jl=createControl(()=>{const r=useBoundProp(Us.backgroundPropTypeUtil);return $s.createElement(PropProvider,{...r},$s.createElement(PropKeyProvider,{bind:"background-overlay"},$s.createElement(Il,null)),$s.createElement(BackgroundColorField,null),$s.createElement(BackgroundClipField,null))}),BackgroundColorField=()=>$s.createElement(PropKeyProvider,{bind:"color"},$s.createElement(Hs.Grid,{container:!0,gap:2,alignItems:"center",flexWrap:"nowrap"},$s.createElement(Hs.Grid,{item:!0,xs:6},$s.createElement(ControlLabel,null,Fl)),$s.createElement(Hs.Grid,{item:!0,xs:6},$s.createElement(Lt,null)))),BackgroundClipField=()=>$s.createElement(PropKeyProvider,{bind:"clip"},$s.createElement(Hs.Grid,{container:!0,gap:2,alignItems:"center",flexWrap:"nowrap"},$s.createElement(Hs.Grid,{item:!0,xs:6},$s.createElement(ControlLabel,null,zl)),$s.createElement(Hs.Grid,{item:!0,xs:6},$s.createElement(_e,{options:Ll})))),Bl=__toESM(i(97557)),Vl=i(97557),$l=i(2020),Ul=i(79513),Hl=/\$\{([^}]+)\}/g,Wl=createControl(({repeaterLabel:r,childControlConfig:o,showDuplicate:i,showToggle:a,initialValues:c,patternLabel:u,placeholder:p,propKey:g,isSortable:v,addItemTooltipProps:b})=>{const{propTypeUtil:k,isItemDisabled:E}=o;if(!k)return null;const w=(0,Vl.useMemo)(()=>(0,$l.createArrayPropUtils)(k.key,k.schema,g),[k.key,k.schema,g]),x=(0,Vl.useMemo)(()=>({...o,placeholder:p||"",patternLabel:u||""}),[o,p,u]),{propType:C,value:_,setValue:T}=useBoundProp(w),P=null===b?.newItemIndex?void 0:0;return Bl.createElement(PropProvider,{propType:C,value:_,setValue:T},Bl.createElement(bn.Provider,{value:x},Bl.createElement(ControlRepeater,{initial:k.create(c||null),propTypeUtil:w,isItemDisabled:E},Bl.createElement(sr,{label:r},Bl.createElement(TooltipAddItemAction,{...b,newItemIndex:P,ariaLabel:r})),Bl.createElement(ItemsContainer,{isSortable:v},Bl.createElement(Item,{Icon:ItemIcon3,Label:ItemLabel4,actions:Bl.createElement(Bl.Fragment,null,i&&Bl.createElement(DuplicateItemAction,null),a&&Bl.createElement(DisableItemAction,null),Bl.createElement(RemoveItemAction,null))})),Bl.createElement(EditItemPopover,null,Bl.createElement(Content2,null)))))}),ItemIcon3=()=>Bl.createElement(Bl.Fragment,null),Content2=()=>{const{component:r,props:o={}}=useRepeatableControlContext();return Bl.createElement(PopoverContent,{p:1.5},Bl.createElement(rr,null,Bl.createElement(r,{...o})))},getNestedValue=(r,o)=>{let i={};const a=o.split("."),c=a.slice(-1)[0];let u=a.reduce((r,o,c)=>(c===a.length-2&&(i=r),r&&"object"==typeof r?r[o]:{}),r);u=u||"";const p=i?.$$type,g=i?.value;return"unit"===c&&"size"===p&&"custom"===g?.unit?g?.size?"":xt:u},isEmptyValue=r=>"string"==typeof r?""===r.trim():!!Number.isNaN(r)||(Array.isArray(r)?0===r.length:"object"==typeof r&&null!==r&&0===Object.keys(r).length),ItemLabel4=({value:r})=>{const{placeholder:o,patternLabel:i,props:a}=useRepeatableControlContext(),c=((r,o)=>{const i=getAllProperties(r).map(r=>getNestedValue(o,r));return!(0===i.length||!i.some(r=>null==r)&&!i.every(isEmptyValue))})(i,r),u=c?o:(p=i,(g=r)?p.replace(Hl,(r,o)=>{const i=getNestedValue(g,o);return"object"!=typeof i||null===i||Array.isArray(i)?Array.isArray(i)?i.join(", "):String(i??""):"name"in i&&i.name?i.name:JSON.stringify(i)}):p);var p,g;const v=((r,o)=>r?"text.disabled":o?"text.tertiary":"text.primary")(!!a?.readOnly,c);return Bl.createElement(Ul.Box,{component:"span",color:v},u)},getAllProperties=r=>r.match(Hl)?.map(r=>r.slice(2,-1))||[],ql=__toESM(i(97557)),Kl=i(97557),Gl=i(2020),Jl=i(79513),Yl=i(27723),escapeHtmlAttr=r=>{const o={"&":"&","<":"<",">":">","'":"'",'"':"""};return r.replace(/[&<>'"]/g,r=>o[r]||r)},getInitialFieldValue=r=>{const o=r;return r&&"object"==typeof r&&"dynamic"!==o.$$type&&o.value||""},Xl=createControl((r={})=>{const{value:o,setValue:i,...a}=useBoundProp(Gl.keyValuePropTypeUtil),[c,u]=(0,Kl.useState)(""),[p,g]=(0,Kl.useState)(""),[v,b]=(0,Kl.useState)({key:getInitialFieldValue(o?.key),value:getInitialFieldValue(o?.value)}),k=r.keyName||(0,Yl.__)("Key","elementor"),E=r.valueName||(0,Yl.__)("Value","elementor"),{keyHelper:w,valueHelper:x}=r.getHelperText?.(v.key,v.value)||{keyHelper:void 0,valueHelper:void 0},[C,_,T]=(0,Kl.useMemo)(()=>[r.regexKey?new RegExp(r.regexKey):void 0,r.regexValue?new RegExp(r.regexValue):void 0,r.validationErrorMessage||(0,Yl.__)("Invalid Format","elementor")],[r.regexKey,r.regexValue,r.validationErrorMessage]);return ql.createElement(PropProvider,{...a,value:o,setValue:(r,a,c)=>{const p=c?.bind;if(!p)return;const v=r[p];if((0,Gl.isTransformable)(v)&&"dynamic"===v.$$type)return void i({...o,[p]:v});const k=Gl.stringPropTypeUtil.extract(v);b(r=>({...r,[p]:k})),k&&((r,o)=>{if("key"===o&&C){const o=C.test(r);return u(o?"":T),o}if("value"===o&&_){const o=_.test(r);return g(o?"":T),o}return!0})(k,p)?i({...o,[p]:v}):i({...o,[p]:{value:"",$$type:"string"}})}},ql.createElement(Jl.Grid,{container:!0,gap:1.5},ql.createElement(Jl.Grid,{item:!0,xs:12,display:"flex",flexDirection:"column"},ql.createElement(Jl.FormLabel,{size:"tiny",sx:{pb:1}},k),ql.createElement(PropKeyProvider,{bind:"key"},ql.createElement(Me,{inputValue:r.escapeHtml?escapeHtmlAttr(v.key):v.key,error:!!c,helperText:w})),!!c&&ql.createElement(Jl.FormHelperText,{error:!0},c)),ql.createElement(Jl.Grid,{item:!0,xs:12,display:"flex",flexDirection:"column"},ql.createElement(Jl.FormLabel,{size:"tiny",sx:{pb:1}},E),ql.createElement(PropKeyProvider,{bind:"value"},ql.createElement(Me,{inputValue:r.escapeHtml?escapeHtmlAttr(v.value):v.value,error:!!p,inputDisabled:!!c,helperText:x})),!!p&&ql.createElement(Jl.FormHelperText,{error:!0},p))))}),Ql=__toESM(i(97557)),Zl=i(2020),ec=i(70374),tc=i(24413),nc=i(79513),rc=i(27723),oc=[{label:(0,rc.__)("Center center","elementor"),value:"center center"},{label:(0,rc.__)("Center left","elementor"),value:"center left"},{label:(0,rc.__)("Center right","elementor"),value:"center right"},{label:(0,rc.__)("Top center","elementor"),value:"top center"},{label:(0,rc.__)("Top left","elementor"),value:"top left"},{label:(0,rc.__)("Top right","elementor"),value:"top right"},{label:(0,rc.__)("Bottom center","elementor"),value:"bottom center"},{label:(0,rc.__)("Bottom left","elementor"),value:"bottom left"},{label:(0,rc.__)("Bottom right","elementor"),value:"bottom right"},{label:(0,rc.__)("Custom","elementor"),value:"custom"}],PositionControl=()=>{const r=useBoundProp(Zl.positionPropTypeUtil),o=useBoundProp(Zl.stringPropTypeUtil),i=!!r.value,a=r.placeholder?"custom":o.placeholder??null;return Ql.createElement(nc.Grid,{container:!0,spacing:1.5},Ql.createElement(nc.Grid,{item:!0,xs:12},Ql.createElement(nc.Grid,{container:!0,gap:2,alignItems:"center",flexWrap:"nowrap"},Ql.createElement(nc.Grid,{item:!0,xs:6},Ql.createElement(ControlFormLabel,null,(0,rc.__)("Object position","elementor"))),Ql.createElement(nc.Grid,{item:!0,xs:6,sx:{overflow:"hidden"}},Ql.createElement(nc.Select,{size:"tiny",displayEmpty:!0,disabled:o.disabled,value:(r.value?"custom":o.value)??"",onChange:i=>{const a=i.target.value||null;"custom"===a?r.setValue({x:null,y:null}):o.setValue(a)},renderValue:r=>getSelectRenderValue(oc,a,r),fullWidth:!0},oc.map(({label:r,value:o})=>Ql.createElement(ec.MenuListItem,{key:o,value:o??""},r)))))),i&&Ql.createElement(PropProvider,{...r},Ql.createElement(nc.Grid,{item:!0,xs:12},Ql.createElement(nc.Grid,{container:!0,spacing:1.5},Ql.createElement(nc.Grid,{item:!0,xs:6},Ql.createElement(PropKeyProvider,{bind:"x"},Ql.createElement(Ct,{startIcon:Ql.createElement(tc.LetterXIcon,{fontSize:"tiny"}),min:-Number.MAX_SAFE_INTEGER}))),Ql.createElement(nc.Grid,{item:!0,xs:6},Ql.createElement(PropKeyProvider,{bind:"y"},Ql.createElement(Ct,{startIcon:Ql.createElement(tc.LetterYIcon,{fontSize:"tiny"}),min:-Number.MAX_SAFE_INTEGER})))))))},ic=__toESM(i(97557)),ac=i(97557),sc=i(2020),lc=i(24413),cc=i(79513),uc=i(27723),pc=i(2020),dc="transform-move",fc="transform-scale",hc="transform-rotate",mc="transform-skew",gc={move:{size:0,unit:"px"},scale:1,rotate:{size:0,unit:"deg"},skew:{size:0,unit:"deg"}},vc={$$type:dc,value:{x:{$$type:"size",value:{size:gc.move.size,unit:gc.move.unit}},y:{$$type:"size",value:{size:gc.move.size,unit:gc.move.unit}},z:{$$type:"size",value:{size:gc.move.size,unit:gc.move.unit}}}},yc=pc.scaleTransformPropTypeUtil.create({x:pc.numberPropTypeUtil.create(gc.scale),y:pc.numberPropTypeUtil.create(gc.scale),z:pc.numberPropTypeUtil.create(gc.scale)}),bc=pc.rotateTransformPropTypeUtil.create({x:{$$type:"size",value:{size:gc.rotate.size,unit:gc.rotate.unit}},y:{$$type:"size",value:{size:gc.rotate.size,unit:gc.rotate.unit}},z:{$$type:"size",value:{size:gc.rotate.size,unit:gc.rotate.unit}}}),kc=pc.skewTransformPropTypeUtil.create({x:{$$type:"size",value:{size:gc.skew.size,unit:gc.skew.unit}},y:{$$type:"size",value:{size:gc.skew.size,unit:gc.skew.unit}}}),Ec=__toESM(i(97557)),Sc=i(79513),wc=i(27723),xc=__toESM(i(97557)),Cc=i(97557),_c=i(2020),Tc=i(24413),Oc=i(79513),Pc=i(27723),Ac=__toESM(i(97557)),Mc=i(79513),AxisRow=({label:r,bind:o,startIcon:i,anchorRef:a,units:c,variant:u="angle"})=>{const p=r.replace(/\s+/g,"-").toLowerCase();return Ac.createElement(Mc.Grid,{item:!0,xs:12},Ac.createElement(rr,{ref:a},Ac.createElement(Mc.Grid,{item:!0,xs:6},Ac.createElement(ControlLabel,{htmlFor:p},r)),Ac.createElement(Mc.Grid,{item:!0,xs:6},Ac.createElement(PropKeyProvider,{bind:o},Ac.createElement(Ct,{anchorRef:a,startIcon:i,units:c,variant:u,min:-Number.MAX_SAFE_INTEGER,id:p})))))},Nc=[{label:(0,Pc.__)("Move X","elementor"),bind:"x",startIcon:xc.createElement(Tc.ArrowRightIcon,{fontSize:"tiny"}),units:["px","%","em","rem","vw"]},{label:(0,Pc.__)("Move Y","elementor"),bind:"y",startIcon:xc.createElement(Tc.ArrowDownSmallIcon,{fontSize:"tiny"}),units:["px","%","em","rem","vh"]},{label:(0,Pc.__)("Move Z","elementor"),bind:"z",startIcon:xc.createElement(Tc.ArrowDownLeftIcon,{fontSize:"tiny"}),units:["px","%","em","rem","vw","vh"]}],Move=()=>{const r=useBoundProp(_c.moveTransformPropTypeUtil),o=[(0,Cc.useRef)(null),(0,Cc.useRef)(null),(0,Cc.useRef)(null)];return xc.createElement(Oc.Grid,{container:!0,spacing:1.5},xc.createElement(PropProvider,{...r},xc.createElement(PropKeyProvider,{bind:dc},Nc.map((r,i)=>xc.createElement(AxisRow,{key:r.bind,...r,anchorRef:o[i],units:r.units,variant:"length"})))))},Rc=__toESM(i(97557)),Ic=i(97557),Dc=i(2020),Lc=i(24413),Fc=i(79513),zc=i(27723),jc=[{label:(0,zc.__)("Rotate X","elementor"),bind:"x",startIcon:Rc.createElement(Lc.Arrow360Icon,{fontSize:"tiny"})},{label:(0,zc.__)("Rotate Y","elementor"),bind:"y",startIcon:Rc.createElement(Lc.Arrow360Icon,{fontSize:"tiny",style:{transform:"scaleX(-1) rotate(-90deg)"}})},{label:(0,zc.__)("Rotate Z","elementor"),bind:"z",startIcon:Rc.createElement(Lc.RotateClockwiseIcon,{fontSize:"tiny"})}],Bc=["deg","rad","grad","turn"],Rotate=()=>{const r=useBoundProp(Dc.rotateTransformPropTypeUtil),o=[(0,Ic.useRef)(null),(0,Ic.useRef)(null),(0,Ic.useRef)(null)];return Rc.createElement(Fc.Grid,{container:!0,spacing:1.5},Rc.createElement(PropProvider,{...r},Rc.createElement(PropKeyProvider,{bind:hc},jc.map((r,i)=>Rc.createElement(AxisRow,{key:r.bind,...r,anchorRef:o[i],units:Bc})))))},Vc=__toESM(i(97557)),$c=i(97557),Uc=i(2020),Hc=i(24413),Wc=i(79513),qc=i(27723),Kc=__toESM(i(97557)),Gc=i(79513),ScaleAxisRow=({label:r,bind:o,startIcon:i,anchorRef:a})=>Kc.createElement(Gc.Grid,{item:!0,xs:12},Kc.createElement(rr,{ref:a},Kc.createElement(Gc.Grid,{item:!0,xs:6},Kc.createElement(ControlLabel,null,r)),Kc.createElement(Gc.Grid,{item:!0,xs:6},Kc.createElement(PropKeyProvider,{bind:o},Kc.createElement(wo,{step:.1,placeholder:"1",startIcon:i}))))),Jc=[{label:(0,qc.__)("Scale X","elementor"),bind:"x",startIcon:Vc.createElement(Hc.ArrowRightIcon,{fontSize:"tiny"})},{label:(0,qc.__)("Scale Y","elementor"),bind:"y",startIcon:Vc.createElement(Hc.ArrowDownSmallIcon,{fontSize:"tiny"})},{label:(0,qc.__)("Scale Z","elementor"),bind:"z",startIcon:Vc.createElement(Hc.ArrowDownLeftIcon,{fontSize:"tiny"})}],Scale=()=>{const r=useBoundProp(Uc.scaleTransformPropTypeUtil),o=[(0,$c.useRef)(null),(0,$c.useRef)(null),(0,$c.useRef)(null)];return Vc.createElement(Wc.Grid,{container:!0,spacing:1.5},Vc.createElement(PropProvider,{...r},Vc.createElement(PropKeyProvider,{bind:fc},Jc.map((r,i)=>Vc.createElement(ScaleAxisRow,{key:r.bind,...r,anchorRef:o[i]})))))},Yc=__toESM(i(97557)),Xc=i(97557),Qc=i(2020),Zc=i(24413),eu=i(79513),tu=i(27723),nu=[{label:(0,tu.__)("Skew X","elementor"),bind:"x",startIcon:Yc.createElement(Zc.ArrowRightIcon,{fontSize:"tiny"})},{label:(0,tu.__)("Skew Y","elementor"),bind:"y",startIcon:Yc.createElement(Zc.ArrowLeftIcon,{fontSize:"tiny",style:{transform:"scaleX(-1) rotate(-90deg)"}})}],ru=["deg","rad","grad","turn"],Skew=()=>{const r=useBoundProp(Qc.skewTransformPropTypeUtil),o=[(0,Xc.useRef)(null),(0,Xc.useRef)(null),(0,Xc.useRef)(null)];return Yc.createElement(eu.Grid,{container:!0,spacing:1.5},Yc.createElement(PropProvider,{...r},Yc.createElement(PropKeyProvider,{bind:mc},nu.map((r,i)=>Yc.createElement(AxisRow,{key:r.bind,...r,anchorRef:o[i],units:ru})))))},ou=i(97557),iu=i(2020),au=i(79513),TransformContent=()=>{const{getTabsProps:r,getTabProps:o,getTabPanelProps:i}=(({move:r,scale:o,rotate:i,skew:a})=>{const{value:c,setValue:u}=useBoundProp(iu.moveTransformPropTypeUtil),{value:p,setValue:g}=useBoundProp(iu.scaleTransformPropTypeUtil),{value:v,setValue:b}=useBoundProp(iu.rotateTransformPropTypeUtil),{value:k,setValue:E}=useBoundProp(iu.skewTransformPropTypeUtil),{openItemIndex:w,items:x}=useRepeaterContext(),{getTabsProps:C,getTabProps:_,getTabPanelProps:T}=(0,au.useTabs)((()=>{switch(!0){case!!p:return fc;case!!v:return hc;case!!k:return mc;default:return dc}})()),P=(0,ou.useRef)({move:r,scale:o,rotate:i,skew:a}),saveToHistory=(r,o)=>{o&&(P.current[r]=o)},onTabChange=(r,o)=>{switch(o){case dc:u(P.current.move),saveToHistory("scale",p),saveToHistory("rotate",v),saveToHistory("skew",k);break;case fc:g(P.current.scale),saveToHistory("move",c),saveToHistory("rotate",v),saveToHistory("skew",k);break;case hc:b(P.current.rotate),saveToHistory("move",c),saveToHistory("scale",p),saveToHistory("skew",k);break;case mc:E(P.current.skew),saveToHistory("move",c),saveToHistory("scale",p),saveToHistory("rotate",v)}return C().onChange(r,o)};return{getTabProps:r=>{return{..._(r),disabled:(o=r,!!x.find(({item:{$$type:r}},i)=>o===r&&i!==w))};var o},getTabPanelProps:T,getTabsProps:()=>({...C(),onChange:onTabChange})}})({move:vc.value,scale:yc.value,rotate:bc.value,skew:kc.value});return Ec.createElement(PopoverContent,null,Ec.createElement(Sc.Box,{sx:{width:"100%"}},Ec.createElement(Sc.Box,{sx:{borderBottom:1,borderColor:"divider"}},Ec.createElement(Sc.Tabs,{size:"small",variant:"fullWidth",sx:{"& .MuiTab-root":{minWidth:"62px"}},...r(),"aria-label":(0,wc.__)("Transform","elementor")},Ec.createElement(Sc.Tab,{label:(0,wc.__)("Move","elementor"),...o(dc)}),Ec.createElement(Sc.Tab,{label:(0,wc.__)("Scale","elementor"),...o(fc)}),Ec.createElement(Sc.Tab,{label:(0,wc.__)("Rotate","elementor"),...o(hc)}),Ec.createElement(Sc.Tab,{label:(0,wc.__)("Skew","elementor"),...o(mc)}))),Ec.createElement(Sc.TabPanel,{sx:{p:1.5},...i(dc)},Ec.createElement(Move,null)),Ec.createElement(Sc.TabPanel,{sx:{p:1.5},...i(fc)},Ec.createElement(Scale,null)),Ec.createElement(Sc.TabPanel,{sx:{p:1.5},...i(hc)},Ec.createElement(Rotate,null)),Ec.createElement(Sc.TabPanel,{sx:{p:1.5},...i(mc)},Ec.createElement(Skew,null))))},su=__toESM(i(97557)),lu=i(24413),TransformIcon=({value:r})=>{switch(r.$$type){case dc:return su.createElement(lu.ArrowsMaximizeIcon,{fontSize:"tiny"});case fc:return su.createElement(lu.ArrowAutofitHeightIcon,{fontSize:"tiny"});case hc:return su.createElement(lu.RotateClockwise2Icon,{fontSize:"tiny"});case mc:return su.createElement(lu.SkewXIcon,{fontSize:"tiny"});default:return null}},cu=__toESM(i(97557)),uu=i(79513),pu=i(27723),du=["x","y","z"],formatLabel=(r,o)=>du.map(i=>{const a=r[i];if("scale"===o)return a?.value||gc[o];const c=gc[o],u=a?.value?.size??c.size,p=a?.value?.unit??c.unit;return"custom"===p?u||xt:`${u}${p}`}).join(", "),TransformLabel=r=>{const{$$type:o,value:i}=r.value;switch(o){case dc:return cu.createElement(Label2,{label:(0,pu.__)("Move","elementor"),value:formatLabel(i,"move")});case fc:return cu.createElement(Label2,{label:(0,pu.__)("Scale","elementor"),value:formatLabel(i,"scale")});case hc:return cu.createElement(Label2,{label:(0,pu.__)("Rotate","elementor"),value:formatLabel(i,"rotate")});case mc:return cu.createElement(Label2,{label:(0,pu.__)("Skew","elementor"),value:formatLabel(i,"skew")});default:return""}},Label2=({label:r,value:o})=>cu.createElement(uu.Box,{component:"span"},r,": ",o),fu=__toESM(i(97557)),hu=i(70374),mu=i(24413),gu=i(79513),vu=i(27723),yu=__toESM(i(97557)),bu=i(97557),ku=i(2020),Eu=i(79513),Su=i(27723),wu=["px","%","em","rem"],xu={label:(0,Su.__)("Perspective","elementor"),bind:"perspective",units:["px","em","rem","vw","vh"]},Cu=[{label:(0,Su.__)("Origin X","elementor"),bind:"x",units:wu},{label:(0,Su.__)("Origin Y","elementor"),bind:"y",units:wu}],ChildrenPerspectiveControl=()=>yu.createElement(Eu.Stack,{direction:"column",spacing:1.5},yu.createElement(ControlFormLabel,null,(0,Su.__)("Children perspective","elementor")),yu.createElement(PerspectiveControl,null),yu.createElement(PerspectiveOriginControl,null)),PerspectiveControl=()=>yu.createElement(PropKeyProvider,{bind:"perspective"},yu.createElement(ControlFields,{control:xu,key:xu.bind})),PerspectiveOriginControl=()=>yu.createElement(PropKeyProvider,{bind:"perspective-origin"},yu.createElement(PerspectiveOriginControlProvider,null)),PerspectiveOriginControlProvider=()=>{const r=useBoundProp(ku.perspectiveOriginPropTypeUtil);return yu.createElement(PropProvider,{...r},Cu.map(r=>yu.createElement(PropKeyProvider,{bind:r.bind,key:r.bind},yu.createElement(ControlFields,{control:r}))))},ControlFields=({control:r})=>{const o=(0,bu.useRef)(null);return yu.createElement(rr,{ref:o},yu.createElement(Eu.Grid,{item:!0,xs:6},yu.createElement(ControlFormLabel,null,r.label)),yu.createElement(Eu.Grid,{item:!0,xs:6},yu.createElement(Ct,{variant:"length",units:r.units,anchorRef:o,disableCustom:!0})))},_u=__toESM(i(97557)),Tu=i(97557),Ou=i(2020),Pu=i(79513),Au=i(27723),Mu=["px","%","em","rem"],Nu=Mu.filter(r=>"%"!==r),Ru=[{label:(0,Au.__)("Origin X","elementor"),bind:"x",units:Mu},{label:(0,Au.__)("Origin Y","elementor"),bind:"y",units:Mu},{label:(0,Au.__)("Origin Z","elementor"),bind:"z",units:Nu}],TransformOriginControl=()=>_u.createElement(Pu.Stack,{direction:"column",spacing:1.5},_u.createElement(ControlFormLabel,null,(0,Au.__)("Transform","elementor")),Ru.map(r=>_u.createElement(ControlFields2,{control:r,key:r.bind}))),ControlFields2=({control:r})=>{const o=useBoundProp(Ou.transformOriginPropTypeUtil),i=(0,Tu.useRef)(null);return _u.createElement(PropProvider,{...o},_u.createElement(PropKeyProvider,{bind:r.bind},_u.createElement(rr,{ref:i},_u.createElement(Pu.Grid,{item:!0,xs:6},_u.createElement(ControlFormLabel,null,r.label)),_u.createElement(Pu.Grid,{item:!0,xs:6},_u.createElement(Ct,{variant:"length",units:r.units,anchorRef:i})))))},TransformSettingsControl=({popupState:r,anchorRef:o,showChildrenPerspective:i})=>{const a=(0,gu.bindPopover)({...r,anchorEl:o.current??void 0});return fu.createElement(gu.Popover,{disablePortal:!0,anchorOrigin:{vertical:"bottom",horizontal:"left"},slotProps:{paper:{sx:{width:(o.current?.offsetWidth||0)-6+"px",mt:.5}}},...a},fu.createElement(hu.PopoverHeader,{title:(0,vu.__)("Transform settings","elementor"),onClose:r.close,icon:fu.createElement(mu.AdjustmentsIcon,{fontSize:"tiny"})}),fu.createElement(gu.Divider,null),fu.createElement(PopoverContent,{sx:{px:2,py:1.5}},fu.createElement(PropKeyProvider,{bind:"transform-origin"},fu.createElement(TransformOriginControl,null)),i&&fu.createElement(fu.Fragment,null,fu.createElement(gu.Box,{sx:{my:.5}},fu.createElement(gu.Divider,null)),fu.createElement(ChildrenPerspectiveControl,null))))},Iu="tiny",Du=createControl(({showChildrenPerspective:r})=>{const o=useBoundProp(sc.transformPropTypeUtil),i=(0,ac.useRef)(null),a=(0,cc.usePopupState)({variant:"popover"});return ic.createElement(PropProvider,{...o},ic.createElement(TransformSettingsControl,{popupState:a,anchorRef:i,showChildrenPerspective:r}),ic.createElement(PropKeyProvider,{bind:"transform-functions"},ic.createElement(Repeater2,{headerRef:i,propType:o.propType,popupState:a})))}),Lu=ic.createElement(cc.Box,{component:"span","aria-label":void 0,sx:{display:"flex",gap:.5,p:2,width:320,borderRadius:1}},ic.createElement(lc.InfoCircleFilledIcon,{sx:{color:"secondary.main"}}),ic.createElement(cc.Typography,{variant:"body2",color:"text.secondary",fontSize:"14px"},(0,uc.__)("You can use each kind of transform only once per element.","elementor"))),Repeater2=({headerRef:r,propType:o,popupState:i})=>{const a=useBoundProp(sc.transformFunctionsPropTypeUtil),c=[vc,yc,bc,kc],{value:u,bind:p}=a,getInitialValue2=()=>c.find(r=>!u?.some(o=>o.$$type===r.$$type)),g=!getInitialValue2();return ic.createElement(PropProvider,{...a},ic.createElement(ControlRepeater,{initial:getInitialValue2()??vc,propTypeUtil:sc.transformFunctionsPropTypeUtil},ic.createElement(sr,{label:(0,uc.__)("Transform","elementor"),adornment:()=>ic.createElement(ControlAdornments,{customContext:{path:["transform"],propType:o}}),ref:r},ic.createElement(TransformBasePopoverTrigger,{popupState:i,repeaterBindKey:p}),ic.createElement(TooltipAddItemAction,{disabled:g,tooltipContent:Lu,enableTooltip:g,ariaLabel:"transform"})),ic.createElement(ItemsContainer,null,ic.createElement(Item,{Icon:TransformIcon,Label:TransformLabel,actions:ic.createElement(ic.Fragment,null,ic.createElement(DisableItemAction,null),ic.createElement(RemoveItemAction,null))})),ic.createElement(EditItemPopover,null,ic.createElement(TransformContent,null))))},TransformBasePopoverTrigger=({popupState:r,repeaterBindKey:o})=>{const{bind:i}=useBoundProp(),a=(0,uc.__)("Transform settings","elementor");return i!==o?null:ic.createElement(cc.Tooltip,{title:a,placement:"top"},ic.createElement(cc.IconButton,{size:Iu,"aria-label":a,...(0,cc.bindTrigger)(r)},ic.createElement(lc.AdjustmentsIcon,{fontSize:Iu})))},Fu=__toESM(i(97557)),zu=i(97557),ju=i(2020),Bu=i(24413),Vu=i(79513),$u=i(22444),Uu=i(27723),Hu=__toESM(i(97557)),Wu=i(97557),qu=i(2020),Ku=i(79513),Gu=createControl(({selectionLabel:r,sizeLabel:o,selectionConfig:i,sizeConfigMap:a})=>{const{value:c,setValue:u,propType:p}=useBoundProp(qu.selectionSizePropTypeUtil),g=(0,Wu.useRef)(null),v=o.replace(/\s+/g,"-").toLowerCase(),b=(0,Wu.useMemo)(()=>{switch(c.selection.$$type){case"key-value":return a[c?.selection?.value.value.value||""];case"string":return a[c?.selection?.value||""];default:return null}},[c,a]),k=i.component;return Hu.createElement(PropProvider,{value:c,setValue:u,propType:p},Hu.createElement(Ku.Grid,{container:!0,spacing:1.5,ref:g},Hu.createElement(Ku.Grid,{item:!0,xs:6,sx:{display:"flex",alignItems:"center"}},Hu.createElement(ControlFormLabel,null,r)),Hu.createElement(Ku.Grid,{item:!0,xs:6},Hu.createElement(PropKeyProvider,{bind:"selection"},Hu.createElement(k,{...i.props}))),b&&Hu.createElement(Hu.Fragment,null,Hu.createElement(Ku.Grid,{item:!0,xs:6,sx:{display:"flex",alignItems:"center"}},Hu.createElement(ControlFormLabel,{htmlFor:v},o)),Hu.createElement(Ku.Grid,{item:!0,xs:6},Hu.createElement(PropKeyProvider,{bind:"size"},Hu.createElement(Ct,{anchorRef:g,variant:b.variant,units:b.units,defaultUnit:b.defaultUnit,id:v}))))))}),Ju=i(22444),Yu=i(27723),Xu={selection:{$$type:"key-value",value:{key:{value:(0,Yu.__)("All properties","elementor"),$$type:"string"},value:{value:"all",$$type:"string"}}},size:{$$type:"size",value:{size:200,unit:"ms"}}},Qu=(()=>{const r=!!window.elementorFrontend?.config?.is_rtl,o=[{label:(0,Yu.__)("Default","elementor"),type:"category",properties:[{label:(0,Yu.__)("All properties","elementor"),value:"all"}]},{label:(0,Yu.__)("Margin","elementor"),type:"category",properties:[{label:(0,Yu.__)("Margin (all)","elementor"),value:"margin",isDisabled:!0},{label:(0,Yu.__)("Margin bottom","elementor"),value:"margin-block-end",isDisabled:!0},{label:r?(0,Yu.__)("Margin right","elementor"):(0,Yu.__)("Margin left","elementor"),value:"margin-inline-start",isDisabled:!0},{label:r?(0,Yu.__)("Margin left","elementor"):(0,Yu.__)("Margin right","elementor"),value:"margin-inline-end",isDisabled:!0},{label:(0,Yu.__)("Margin top","elementor"),value:"margin-block-start",isDisabled:!0}]},{label:(0,Yu.__)("Padding","elementor"),type:"category",properties:[{label:(0,Yu.__)("Padding (all)","elementor"),value:"padding",isDisabled:!0},{label:(0,Yu.__)("Padding bottom","elementor"),value:"padding-block-end",isDisabled:!0},{label:r?(0,Yu.__)("Padding right","elementor"):(0,Yu.__)("Padding left","elementor"),value:"padding-inline-start",isDisabled:!0},{label:r?(0,Yu.__)("Padding left","elementor"):(0,Yu.__)("Padding right","elementor"),value:"padding-inline-end",isDisabled:!0},{label:(0,Yu.__)("Padding top","elementor"),value:"padding-block-start",isDisabled:!0}]},{label:(0,Yu.__)("Flex","elementor"),type:"category",properties:[{label:(0,Yu.__)("Flex (all)","elementor"),value:"flex",isDisabled:!0},{label:(0,Yu.__)("Flex grow","elementor"),value:"flex-grow",isDisabled:!0},{label:(0,Yu.__)("Flex shrink","elementor"),value:"flex-shrink",isDisabled:!0},{label:(0,Yu.__)("Flex basis","elementor"),value:"flex-basis",isDisabled:!0}]},{label:(0,Yu.__)("Size","elementor"),type:"category",properties:[{label:(0,Yu.__)("Width","elementor"),value:"width",isDisabled:!0},{label:(0,Yu.__)("Height","elementor"),value:"height",isDisabled:!0},{label:(0,Yu.__)("Max height","elementor"),value:"max-height",isDisabled:!0},{label:(0,Yu.__)("Max width","elementor"),value:"max-width",isDisabled:!0},{label:(0,Yu.__)("Min height","elementor"),value:"min-height",isDisabled:!0},{label:(0,Yu.__)("Min width","elementor"),value:"min-width",isDisabled:!0}]},{label:(0,Yu.__)("Position","elementor"),type:"category",properties:[{label:(0,Yu.__)("Top","elementor"),value:"inset-block-start",isDisabled:!0},{label:r?(0,Yu.__)("Right","elementor"):(0,Yu.__)("Left","elementor"),value:"inset-inline-start",isDisabled:!0},{label:r?(0,Yu.__)("Left","elementor"):(0,Yu.__)("Right","elementor"),value:"inset-inline-end",isDisabled:!0},{label:(0,Yu.__)("Bottom","elementor"),value:"inset-block-end",isDisabled:!0},{label:(0,Yu.__)("Z-index","elementor"),value:"z-index",isDisabled:!0}]},{label:(0,Yu.__)("Typography","elementor"),type:"category",properties:[{label:(0,Yu.__)("Font color","elementor"),value:"color",isDisabled:!0},{label:(0,Yu.__)("Font size","elementor"),value:"font-size",isDisabled:!0},{label:(0,Yu.__)("Line height","elementor"),value:"line-height",isDisabled:!0},{label:(0,Yu.__)("Letter spacing","elementor"),value:"letter-spacing",isDisabled:!0},{label:(0,Yu.__)("Word spacing","elementor"),value:"word-spacing",isDisabled:!0},{label:(0,Yu.__)("Font variations","elementor"),value:"font-variation-settings",isDisabled:!0},{label:(0,Yu.__)("Text stroke color","elementor"),value:"-webkit-text-stroke-color",isDisabled:!0}]},{label:(0,Yu.__)("Background","elementor"),type:"category",properties:[{label:(0,Yu.__)("Background color","elementor"),value:"background-color",isDisabled:!0},{label:(0,Yu.__)("Background position","elementor"),value:"background-position",isDisabled:!0},{label:(0,Yu.__)("Box shadow","elementor"),value:"box-shadow",isDisabled:!0}]},{label:(0,Yu.__)("Border","elementor"),type:"category",properties:[{label:(0,Yu.__)("Border (all)","elementor"),value:"border",isDisabled:!0},{label:(0,Yu.__)("Border radius","elementor"),value:"border-radius",isDisabled:!0},{label:(0,Yu.__)("Border color","elementor"),value:"border-color",isDisabled:!0},{label:(0,Yu.__)("Border width","elementor"),value:"border-width",isDisabled:!0}]},{label:(0,Yu.__)("Effects","elementor"),type:"category",properties:[{label:(0,Yu.__)("Opacity","elementor"),value:"opacity",isDisabled:!0},{label:(0,Yu.__)("Transform (all)","elementor"),value:"transform",isDisabled:!0},{label:(0,Yu.__)("Filter (all)","elementor"),value:"filter",isDisabled:!0}]}];return(()=>{if(!(0,Ju.hasProInstalled)())return!0;const r=window.elementorPro?.config?.version;return!!r&&(0,Ju.isVersionGreaterOrEqual)(r,"3.35")})()?o:[o[0]]})(),Zu=Qu.map(r=>({label:r.label,items:r.properties.map(r=>r.label)})),ep=i(70975),tp=i(33176),np={eventName:"click_added_transition",location:"V4 Style Tab",secondaryLocation:"Transition control",trigger:"click"};var rp=__toESM(i(97557)),op=i(97557),ip=i(2020),ap=i(70374),sp=i(24413),lp=i(79513),cp=i(27723),pp=i(70975),dp=i(33176),getBaseEventProperties=(r,o)=>({app_type:o?.appTypes?.editor??"editor",window_name:o?.appTypes?.editor??"editor",interaction_type:o?.triggers?.click??"Click",target_name:r.target_name,target_location:r.target_location??"widget_panel",location_l1:r.location_l1??(0,pp.getSelectedElements)()[0]?.type??"",...r.location_l2&&{location_l2:r.location_l2}}),dispatchPromotionEvent=(r,o)=>{const{dispatchEvent:i,config:a}=(0,dp.getMixpanel)(),{eventName:c,interactionResult:u,interactionDescription:p}=o(a);c&&i?.(c,{...getBaseEventProperties(r,a),interaction_result:u,interaction_description:p})},trackViewPromotion=r=>{dispatchPromotionEvent(r,r=>({eventName:r?.names?.promotions?.viewPromotion,interactionResult:r?.interactionResults?.promotionViewed??"promotion_viewed",interactionDescription:"user_viewed_promotion"}))},trackUpgradePromotionClick=r=>{dispatchPromotionEvent(r,r=>({eventName:r?.names?.promotions?.upgradePromotionClick,interactionResult:r?.interactionResults?.upgradeNow??"upgrade_now",interactionDescription:"user_clicked_upgrade_now"}))};function getTransitionPropertyByValue(r){if(!r?.value)return null;for(const o of Qu)for(const i of o.properties)if(i.value===r.value)return i;return null}var includeCurrentValueInOptions=(r,o)=>o.filter(o=>o!==r.key.value),TransitionSelector=({recentlyUsedList:r=[],disabledItems:o=[],showPromotion:i=!1})=>{const{value:a,setValue:c}=useBoundProp(ip.keyValuePropTypeUtil),{key:{value:u}}=a,p=(0,op.useRef)(null),g=(0,lp.usePopupState)({variant:"popover"}),v=(0,op.useMemo)(()=>new Set(Qu.filter(r=>r.properties.some(r=>r.isDisabled)).map(r=>r.label)),[]);return rp.createElement(lp.Box,{ref:p},rp.createElement(ControlActions,null,rp.createElement(lp.UnstableTag,{variant:"outlined",label:u,endIcon:rp.createElement(sp.ChevronDownIcon,{fontSize:"tiny"}),...(0,lp.bindTrigger)(g),fullWidth:!0})),rp.createElement(lp.Popover,{disablePortal:!0,disableScrollLock:!0,...(0,lp.bindPopover)(g),anchorReference:"anchorPosition",anchorPosition:(()=>{if(!p.current)return;const r=p.current.getBoundingClientRect();return{top:r.top,left:r.right+36}})(),anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"}},rp.createElement(ItemSelector,{itemsList:(()=>{const o=r.map(r=>getTransitionPropertyByValue({value:r,$$type:"string"})?.label).filter(r=>!!r),i=Zu.map(r=>({...r,items:r.items.filter(r=>!o.includes(r))}));if(0===o.length)return i;const[a,...c]=i;return[a,{label:(0,cp.__)("Recently Used","elementor"),items:o},...c]})(),selectedItem:u,onItemChange:r=>{const o=(r=>{for(const o of Qu){const i=o.properties.find(o=>o.label===r);if(i)return{key:{value:i.label,$$type:"string"},value:{value:i.value,$$type:"string"}}}return null})(r);o&&(c(o),g.close())},onClose:g.close,sectionWidth:268,title:(0,cp.__)("Transition Property","elementor"),icon:sp.VariationsIcon,disabledItems:includeCurrentValueInOptions(a,o),categoryItemContentTemplate:r=>rp.createElement(lp.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%"}},rp.createElement("span",null,r.value),i&&v.has(r.value)&&rp.createElement(ap.PromotionChip,null)),footer:i?rp.createElement(ap.PromotionAlert,{message:(0,cp.__)("Upgrade to customize transition properties and control effects.","elementor"),upgradeUrl:"https://go.elementor.com/go-pro-transitions-modal/",onCtaClick:()=>trackUpgradePromotionClick({target_name:"transition_property",location_l2:"style"})}):null})))},fp={variant:"time",units:["s","ms"],defaultUnit:"ms"},hp=(0,ju.createArrayPropUtils)(ju.selectionSizePropTypeUtil.key,ju.selectionSizePropTypeUtil.schema,"transition");!function subscribeToTransitionEvent(){en.subscribe("transition-item-added",r=>{const o=r,i=o?.itemValue?.selection?.value?.value?.value,a=(0,ep.getSelectedElements)(),c=a[0]?.type??null;(0,tp.trackEvent)({transition_type:i??"unknown",...np,widget_type:c})})}();var getSelectionSizeProps=(r,o,i)=>({selectionLabel:(0,Uu.__)("Type","elementor"),sizeLabel:(0,Uu.__)("Duration","elementor"),selectionConfig:{component:TransitionSelector,props:{recentlyUsedList:r,disabledItems:o,showPromotion:i}},sizeConfigMap:{...Qu.reduce((r,o)=>(o.properties.forEach(o=>{r[o.value]=fp}),r),{})}}),isItemDisabled=r=>{const o=getTransitionPropertyByValue(r.value.selection.value?.value);return!!o&&!!o.isDisabled},getChildControlConfig=(r,o,i)=>({propTypeUtil:ju.selectionSizePropTypeUtil,component:Gu,props:getSelectionSizeProps(r,o,i),isItemDisabled:isItemDisabled}),isPropertyUsed=(r,o)=>(r??[]).some(r=>r?.value?.selection?.value?.value?.value===o.value),getInitialValue=(r=[])=>{if(!r?.length)return Xu;for(const o of Qu)for(const i of o.properties)if(!isPropertyUsed(r,i))return{...Xu,selection:{$$type:"key-value",value:{key:{value:i.label,$$type:"string"},value:{value:i.value,$$type:"string"}}}};return Xu},mp=Fu.createElement(Vu.Alert,{sx:{width:280,gap:.5},color:"secondary",icon:Fu.createElement(Bu.InfoCircleFilledIcon,null)},Fu.createElement(Vu.AlertTitle,null,(0,Uu.__)("Transitions","elementor")),Fu.createElement(Vu.Box,{component:"span"},Fu.createElement(Vu.Typography,{variant:"body2"},(0,Uu.__)("Switch to 'Normal' state to add a transition.","elementor")))),gp=createControl(({recentlyUsedListGetter:r,currentStyleState:o})=>{const i=null===o,[a,c]=(0,zu.useState)([]),u=(0,$u.hasProInstalled)(),{value:p,setValue:g}=useBoundProp(hp),{allDisabled:v,proDisabled:b}=(0,zu.useMemo)(()=>((r=[])=>{const o=(r||[]).map(r=>r.value?.selection?.value?.key?.value),i=[];return Qu.forEach(r=>{const a=r.properties.filter(r=>r.isDisabled&&!o.includes(r.label)).map(r=>r.label);i.push(...a)}),{allDisabled:[...o,...i],proDisabled:i}})(p),[p]),k=(0,zu.useMemo)(()=>{const r=new Set;return Qu.forEach(o=>{o.properties.forEach(o=>{o.isDisabled&&!u||r.add(o.value)})}),r},[u]);(0,zu.useEffect)(()=>{if(!p||0===p.length)return;const r=p.filter(r=>{const o=r?.value?.selection?.value?.value?.value??"";return k.has(o)});r.length!==p.length&&g(r)},[k]),(0,zu.useEffect)(()=>{r().then(c)},[r]);const E=(0,zu.useMemo)(()=>((r=[])=>!!r?.length&&Qu.every(o=>o.properties.every(o=>o.isDisabled||!!r?.find(r=>r.value?.selection?.value?.value?.value===o.value))))(p),[p]),w=!i||E;return Fu.createElement(Wl,{label:(0,Uu.__)("Transitions","elementor"),repeaterLabel:(0,Uu.__)("Transitions","elementor"),patternLabel:"${value.selection.value.key.value}: ${value.size.value.size}${value.size.value.unit}",placeholder:(0,Uu.__)("Empty Transition","elementor"),showDuplicate:!1,showToggle:!0,initialValues:getInitialValue(p),childControlConfig:getChildControlConfig(a,v,b.length>0),propKey:"transition",addItemTooltipProps:{disabled:w,enableTooltip:!i,tooltipContent:mp}})}),vp=__toESM(i(97557)),yp=__toESM(i(74353)),bp=i(2020),kp=i(2020),Ep=i(79513),Sp=createControl(({inputDisabled:r})=>{const{value:o,setValue:i,...a}=useBoundProp(kp.DateTimePropTypeUtil),handleChange=(r,a)=>{const c=a.bind,u=r[c];if((0,bp.isTransformable)(u))return i({...o,[c]:u});let p="";if(u){const r=u;p="date"===c?r.format("YYYY-MM-DD"):r.format("HH:mm")}i({...o,[c]:{$$type:"string",value:p}})};return vp.createElement(PropProvider,{...a,value:o,setValue:i},vp.createElement(ControlActions,null,vp.createElement(Ep.LocalizationProvider,null,vp.createElement(Ep.Box,{display:"flex",gap:1,alignItems:"center"},vp.createElement(PropKeyProvider,{bind:"date"},vp.createElement(Ep.DatePicker,{value:(r=>{if(!r)return null;const o=yp.default(r);return o&&"function"==typeof o.isValid&&o.isValid()?o:null})(bp.stringPropTypeUtil.extract(o?.date)),onChange:r=>handleChange({date:r},{bind:"date"}),disabled:r,slotProps:{textField:{size:"tiny"},openPickerButton:{size:"tiny"},openPickerIcon:{fontSize:"tiny"}}})),vp.createElement(PropKeyProvider,{bind:"time"},vp.createElement(Ep.TimePicker,{value:(r=>{if(!r)return null;const[o,i]=r.split(":"),a=Number.parseInt(o??"",10),c=Number.parseInt(i??"",10);if(Number.isNaN(a)||Number.isNaN(c))return null;return yp.default().hour(a).minute(c).second(0).millisecond(0)})(bp.stringPropTypeUtil.extract(o?.time)),onChange:r=>handleChange({time:r},{bind:"time"}),disabled:r,slotProps:{textField:{size:"tiny"},openPickerButton:{size:"tiny"},openPickerIcon:{fontSize:"tiny"}}}))))))}),wp=__toESM(i(97557)),xp=i(2020),Cp=i(79513),_p=i(27723),Tp=__toESM(i(97557)),Op=i(2020),Pp=i(79513),Ap=__toESM(i(74353));function isValidDayjs(r){return!!r&&"function"==typeof r.isValid&&r.isValid()}function parseDateString(r){if(!r)return null;const o=Ap.default(r);return isValidDayjs(o)?o:null}function parseTimeString(r){if(!r)return null;const[o,i,a]=r.split(":"),c=Number.parseInt(o??"",10),u=Number.parseInt(i??"",10),p=Number.parseInt(a??"0",10);if(Number.isNaN(c)||Number.isNaN(u))return null;return Ap.default().hour(c).minute(u).second(Number.isNaN(p)?0:p).millisecond(0)}var Mp=createControl(({inputDisabled:r,ariaLabel:o,error:i,coerceInvalidToNull:a=!1})=>{const{value:c,setValue:u,disabled:p}=useBoundProp(Op.dateStringPropTypeUtil),g=r??p,v={textField:{size:"tiny",fullWidth:!0,error:i,inputProps:o?{"aria-label":o}:void 0},openPickerButton:{size:"tiny"},openPickerIcon:{fontSize:"tiny"}};return Tp.createElement(Pp.LocalizationProvider,null,Tp.createElement(ControlActions,null,Tp.createElement(Pp.DatePicker,{value:parseDateString(c??""),onChange:r=>((r,o)=>{!r||a&&!isValidDayjs(r)?u(null):u(r.format(o))})(r,"YYYY-MM-DD"),disabled:g,slotProps:v})))}),Np={min:(0,_p.__)("Min date","elementor"),max:(0,_p.__)("Max date","elementor")},Rp=(0,_p.__)("Max date must be on or after Min date","elementor"),Ip=createControl(()=>{const{value:r,setValue:o,...i}=useBoundProp(xp.dateRangePropTypeUtil),a=xp.dateStringPropTypeUtil.extract(r?.min),c=xp.dateStringPropTypeUtil.extract(r?.max),u=(g=c,!(!(p=a)||!g)&&g<p);var p,g;return wp.createElement(PropProvider,{...i,value:r,setValue:o},wp.createElement(Cp.Stack,{gap:.75},wp.createElement(Cp.Stack,{direction:"row",gap:2,flexWrap:"nowrap"},wp.createElement(Cp.Grid,{container:!0,gap:.75,alignItems:"center"},wp.createElement(Cp.Grid,{item:!0,xs:12},wp.createElement(ControlFormLabel,null,Np.min)),wp.createElement(Cp.Grid,{item:!0,xs:12},wp.createElement(BoundDateStringControl,{bind:"min",ariaLabel:Np.min,error:u}))),wp.createElement(Cp.Grid,{container:!0,gap:.75,alignItems:"center"},wp.createElement(Cp.Grid,{item:!0,xs:12},wp.createElement(ControlFormLabel,null,Np.max)),wp.createElement(Cp.Grid,{item:!0,xs:12},wp.createElement(BoundDateStringControl,{bind:"max",ariaLabel:Np.max,error:u})))),u&&wp.createElement(Cp.FormHelperText,{error:!0},Rp)))}),BoundDateStringControl=({bind:r,ariaLabel:o,error:i})=>wp.createElement(PropKeyProvider,{bind:r},wp.createElement(Mp,{ariaLabel:o,error:i,coerceInvalidToNull:!0})),Dp=__toESM(i(97557)),Lp=i(2020),Fp=i(79513),zp=createControl(({inputDisabled:r,ariaLabel:o,error:i,coerceInvalidToNull:a=!1})=>{const{value:c,setValue:u,disabled:p}=useBoundProp(Lp.timeStringPropTypeUtil),g=r??p,v={textField:{size:"tiny",fullWidth:!0,error:i,inputProps:o?{"aria-label":o}:void 0},openPickerButton:{size:"tiny"},openPickerIcon:{fontSize:"tiny"}};return Dp.createElement(Fp.LocalizationProvider,null,Dp.createElement(ControlActions,null,Dp.createElement(Fp.TimePicker,{value:parseTimeString(c??""),onChange:r=>((r,o)=>{!r||a&&!isValidDayjs(r)?u(null):u(r.format(o))})(r,"HH:mm"),disabled:g,slotProps:v})))}),jp=__toESM(i(97557)),Bp=i(2020),Vp=i(79513),$p=i(27723),Up={min:(0,$p.__)("Start time","elementor"),max:(0,$p.__)("End time","elementor")},Hp=createControl(()=>{const{value:r,setValue:o,...i}=useBoundProp(Bp.timeRangePropTypeUtil);return jp.createElement(PropProvider,{...i,value:r,setValue:o},jp.createElement(Vp.Stack,{direction:"row",gap:2,flexWrap:"nowrap"},jp.createElement(Vp.Grid,{container:!0,gap:.75,alignItems:"center"},jp.createElement(Vp.Grid,{item:!0,xs:12},jp.createElement(ControlFormLabel,null,Up.min)),jp.createElement(Vp.Grid,{item:!0,xs:12},jp.createElement(BoundTimeStringControl,{bind:"min",ariaLabel:Up.min}))),jp.createElement(Vp.Grid,{container:!0,gap:.75,alignItems:"center"},jp.createElement(Vp.Grid,{item:!0,xs:12},jp.createElement(ControlFormLabel,null,Up.max)),jp.createElement(Vp.Grid,{item:!0,xs:12},jp.createElement(BoundTimeStringControl,{bind:"max",ariaLabel:Up.max})))))}),BoundTimeStringControl=({bind:r,ariaLabel:o})=>jp.createElement(PropKeyProvider,{bind:r},jp.createElement(zp,{ariaLabel:o,coerceInvalidToNull:!0})),Wp=__toESM(i(97557)),qp=i(97557),Kp=i(2020),Gp=i(79513),Jp=i(22444),Yp=__toESM(i(97557)),Xp=i(97557),Qp=i(79513),Zp=__toESM(i(27096)),ed=__toESM(i(62430)),td=__toESM(i(29656)),nd=__toESM(i(74951)),rd=__toESM(i(39007)),od=__toESM(i(81531)),id=__toESM(i(5067)),ad=__toESM(i(38393)),sd=__toESM(i(5820)),ld=__toESM(i(14841)),cd=__toESM(i(50976)),ud=__toESM(i(19721)),pd=i(83574);function htmlToPlainText(r){if(!r)return"";const o=r.replace(/<br\s*\/?>/gi,"\n").replace(/<\/p>\s*<p[^>]*>/gi,"\n");return(new DOMParser).parseFromString(o,"text/html").body.textContent??""}var dd="i",fd="b",hd="u",md=Yp.forwardRef((r,o)=>{const{value:i,setValue:a,placeholder:c=null,editorProps:u={},elementClasses:p="",autofocus:g=!1,sx:v={},onBlur:b,expectedTag:k=null,onEditorCreate:E,wrapperClassName:w,onSelectionEnd:x,mountElement:C=null}=r,_=(0,Xp.useRef)(null),T=(0,Xp.useRef)(b);T.current=b;const P=k?"block+":"inline*",editedElementAttributes=r=>({...r,class:p}),A=(0,pd.useEditor)({...C?{element:C}:{},extensions:[ed.default.extend({content:P}),id.default.extend({renderHTML({HTMLAttributes:r}){return[k??"p",editedElementAttributes(r),0]}}),nd.default.extend({renderHTML({node:r,HTMLAttributes:o}){if(k)return[k,editedElementAttributes(o),0];return[`h${this.options.levels.includes(r.attrs.level)?r.attrs.level:this.options.levels[0]}`,editedElementAttributes(o),0]}}).configure({levels:[1,2,3,4,5,6]}),od.default.configure({openOnClick:!1}),cd.default,Zp.default,rd.default,ad.default,ld.default,sd.default,ud.default,td.default.extend({addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.setHardBreak()}}})],content:i,onUpdate:({editor:r})=>{const o=r.getHTML();a(function isEmpty(r=""){if(!r)return!0;const o=document.createElement("div");return o.innerHTML=r,!o.textContent?.length}(o)?null:o)},autofocus:g,editorProps:{...u,handleDOMEvents:{keydown:(r,o)=>{"Escape"===o.key&&T.current?.(),!o.metaKey&&!o.ctrlKey||o.altKey||[dd,fd,hd].includes(o.key)&&o.stopPropagation()}},attributes:{...u.attributes??{},role:"textbox",...c?{"data-placeholder":htmlToPlainText(c)}:{},...null===i||""===i?{class:"is-empty"}:{}}},onCreate:E?({editor:r})=>E(r):void 0,onBlur:C?void 0:()=>T.current?.(),onSelectionUpdate:x?({editor:r})=>x(r.view):void 0});return useOnUpdate(()=>{if(!A)return;A.getHTML()!==i&&A.commands.setContent(i,{emitUpdate:!1})},[A,i]),C?null:Yp.createElement(Qp.Box,{ref:_,sx:v,className:w},Yp.createElement(pd.EditorContent,{ref:o,editor:A}))}),useOnUpdate=(r,o)=>{const i=(0,Xp.useRef)(!1);(0,Xp.useEffect)(()=>{i.current?r():i.current=!0},o)},gd=createControl(({sx:r,attributes:o,props:i})=>{const{value:a,setValue:c,placeholder:u}=useBoundProp(Kp.htmlV3PropTypeUtil),p=Kp.stringPropTypeUtil.extract(a?.content??null)??"",g=(0,qp.useMemo)(()=>(0,Jp.debounce)(r=>{const o=(0,Kp.parseHtmlChildren)(r);c({content:o.content?Kp.stringPropTypeUtil.create(o.content):null,children:o.children})},300),[c]),v=(0,qp.useCallback)(r=>{const o=r??"";c({content:o?Kp.stringPropTypeUtil.create(o):null,children:a?.children??[]}),g(o)},[c,a?.children,g]);return(0,qp.useEffect)(()=>()=>g.cancel(),[g]),Wp.createElement(ControlActions,null,Wp.createElement(Gp.Box,{sx:{p:.8,border:"1px solid",borderColor:"grey.200",borderRadius:"8px",transition:"border-color .2s ease, box-shadow .2s ease","&:hover":{borderColor:"black"},"&:focus-within":{borderColor:"black",boxShadow:"0 0 0 1px black"},"& .ProseMirror:focus":{outline:"none"},"& .ProseMirror":{minHeight:"70px",fontSize:"12px","& a":{color:"inherit"},"& .elementor-inline-editor-reset":{margin:0,padding:0},"&.is-empty::before":{content:"attr(data-placeholder)",color:"text.tertiary",pointerEvents:"none",position:"absolute",opacity:.6}},".strip-styles *":{all:"unset"},...r},...o,...i},Wp.createElement(md,{value:p,setValue:v,placeholder:u?.content?.value??null})))}),vd=__toESM(i(97557)),yd=i(2020),bd=i(70374),kd=i(79513),Ed=i(27723),Sd=__toESM(i(97557)),wd=i(70374),xd=i(79513),Cd=i(27723),_d=i(70975),Td=i(2020),Od=i(5527),Pd=["e-form-input","e-form-textarea","e-form-checkbox","e-form-radio-button","e-form-select","e-form-date-picker","e-form-time-picker"];function extractStringPropValue(r){return Td.stringPropTypeUtil.extract(r)}function getSettingWithDefault(r,o,i){const a=r.settings.get(i);if(null!=a)return a;const c=(0,_d.getWidgetsCache)()?.[o]?.atomic_props_schema;return c?.[i]?.default??null}function useFormFieldSuggestions(r){return(0,Od.__privateUseListenTo)([(0,Od.v1ReadyEvent)(),(0,Od.commandEndEvent)("document/elements/create"),(0,Od.commandEndEvent)("document/elements/delete"),(0,Od.commandEndEvent)("document/elements/set-settings")],()=>{const o=(0,_d.getSelectedElements)()[0];if(!o)return[];const i=function getFormContainer(r){let o=(0,_d.getContainer)(r);for(;o;){if("e-form"===o.model.get("elType"))return o;o=o.parent??null}return null}(o.id);if(!i?.children)return[];const a=[],c=new Set;return i.children.forEachRecursive?.(o=>{const i=o.model.get("widgetType");if(!i||!function isFormFieldWidgetType(r){return Pd.includes(r)}(i))return;if(r?.inputType){if(extractStringPropValue(getSettingWithDefault(o,i,"type"))!==r.inputType)return}const u=function getFieldCssId(r,o){return extractStringPropValue(getSettingWithDefault(r,o,"_cssid"))}(o,i);u&&!c.has(u)&&(c.add(u),a.push({label:u,value:u}))}),a},[])}var Ad=__toESM(i(97557)),Md=i(97557),Nd=i(2020),Rd=i(79513),Id=i(59618),Dd=i(22444),Ld=new Set([" ",","]);function isValidEmail(r){return Id.z.string().email().safeParse(r).success}var EmailChipsField=({fieldLabel:r,placeholder:o})=>{const{value:i,setValue:a,disabled:c}=useBoundProp(Nd.stringArrayPropTypeUtil),[u,p]=(0,Md.useState)(""),g=i||[],v=g.map(r=>Nd.stringPropTypeUtil.extract(r)).filter(r=>null!==r),tryAddChip=r=>{const o=r.trim();o&&!v.includes(o)&&isValidEmail(o)&&(a([...g,Nd.stringPropTypeUtil.create(o)]),p(""))},handleKeyDown=r=>{Ld.has(r.key)&&u.trim()&&(r.preventDefault(),tryAddChip(u))};return Ad.createElement(Rd.Grid,{container:!0,direction:"column",gap:.5},Ad.createElement(Rd.Grid,{item:!0},Ad.createElement(ControlFormLabel,null,r)),Ad.createElement(Rd.Grid,{item:!0},Ad.createElement(Rd.Autocomplete,{fullWidth:!0,multiple:!0,freeSolo:!0,size:"tiny",disabled:c,inputValue:u,onInputChange:(r,o,i)=>{"reset"!==i&&p(o)},value:v,onChange:(r,o)=>{const i=[];for(const r of o){const o=r.trim();o&&isValidEmail(o)&&i.push(Nd.stringPropTypeUtil.create(o))}a(i),p("")},options:[],onBlur:r=>{const o=r.target;tryAddChip(o.value),p("")},getOptionLabel:r=>r,isOptionEqualToValue:(r,o)=>r===o,renderInput:r=>Ad.createElement(Rd.TextField,{...r,placeholder:o,onKeyDown:handleKeyDown}),renderTags:(r,o)=>Ad.createElement(ChipsList,{getLabel:r=>r,getTagProps:o,values:r})})))},Fd=__toESM(i(97557)),zd=i(79513),EmailField=({bind:r,label:o,placeholder:i})=>Fd.createElement(PropKeyProvider,{bind:r},Fd.createElement(zd.Grid,{container:!0,direction:"column",gap:.5},Fd.createElement(zd.Grid,{item:!0},Fd.createElement(ControlFormLabel,null,o)),Fd.createElement(zd.Grid,{item:!0},Fd.createElement(Me,{placeholder:i})))),SendToField=({placeholder:r})=>Sd.createElement(EmailChipsField,{fieldLabel:(0,Cd.__)("Send to","elementor"),placeholder:r}),SubjectField=()=>Sd.createElement(EmailField,{bind:"subject",label:(0,Cd.__)("Email subject","elementor"),placeholder:(0,Cd.__)("New form submission","elementor")}),MessageField=()=>{const r=useFormFieldSuggestions();return Sd.createElement(PropKeyProvider,{bind:"message"},Sd.createElement(xd.Grid,{container:!0,direction:"column",gap:.5},Sd.createElement(xd.Grid,{item:!0},Sd.createElement(ControlFormLabel,null,(0,Cd.__)("Message","elementor"))),Sd.createElement(xd.Grid,{item:!0},Sd.createElement(Ve,{suggestions:r})),Sd.createElement(xd.Grid,{item:!0},Sd.createElement(wd.InfoAlert,null,(()=>{if(!(0,Dd.hasProInstalled)())return!0;const r=window.elementorPro?.config?.version;return!!r&&(0,Dd.isVersionGreaterOrEqual)(r,"4.1.0")})()?(0,Cd.__)("[all-fields] shortcode sends all fields. Type @ to insert specific fields and customize your message.","elementor"):(0,Cd.__)("[all-fields] shortcode sends all fields.","elementor")))))},FromEmailField=()=>Sd.createElement(EmailField,{bind:"from",label:(0,Cd.__)("From email","elementor"),placeholder:(0,Cd.__)("What email should appear as the sender?","elementor")}),FromNameField=()=>Sd.createElement(EmailField,{bind:"from-name",label:(0,Cd.__)("From name","elementor"),placeholder:(0,Cd.__)("What name should appear as the sender?","elementor")}),ReplyToField=()=>{const r=useFormFieldSuggestions({inputType:"email"});return Sd.createElement(PropKeyProvider,{bind:"reply-to"},Sd.createElement(xd.Grid,{container:!0,direction:"column",gap:.5},Sd.createElement(xd.Grid,{item:!0},Sd.createElement(ControlFormLabel,null,(0,Cd.__)("Reply-to","elementor"))),Sd.createElement(xd.Grid,{item:!0},Sd.createElement(Ve,{suggestions:r,rows:1,triggerPosition:"start",placeholder:(0,Cd.__)("You can type @ to insert an email field","elementor")}))))},CcField=()=>Sd.createElement(PropKeyProvider,{bind:"cc"},Sd.createElement(EmailChipsField,{fieldLabel:(0,Cd.__)("Cc","elementor")})),BccField=()=>Sd.createElement(PropKeyProvider,{bind:"bcc"},Sd.createElement(EmailChipsField,{fieldLabel:(0,Cd.__)("Bcc","elementor")})),MetaDataField=()=>Sd.createElement(PropKeyProvider,{bind:"meta-data"},Sd.createElement(xd.Stack,{gap:.5},Sd.createElement(ControlFormLabel,null,(0,Cd.__)("Metadata","elementor")),Sd.createElement(oo,{options:[{label:(0,Cd.__)("Date","elementor"),value:"date"},{label:(0,Cd.__)("Time","elementor"),value:"time"},{label:(0,Cd.__)("Page URL","elementor"),value:"page-url"},{label:(0,Cd.__)("User agent","elementor"),value:"user-agent"},{label:(0,Cd.__)("Credit","elementor"),value:"credit"}]}))),SendAsField=()=>Sd.createElement(PropKeyProvider,{bind:"send-as"},Sd.createElement(xd.Grid,{container:!0,direction:"column",gap:.5},Sd.createElement(xd.Grid,{item:!0},Sd.createElement(ControlFormLabel,null,(0,Cd.__)("Send as","elementor"))),Sd.createElement(xd.Grid,{item:!0},Sd.createElement(_e,{options:[{label:(0,Cd.__)("HTML","elementor"),value:"html"},{label:(0,Cd.__)("Plain Text","elementor"),value:"plain"}]})))),jd=createControl(({toPlaceholder:r,label:o})=>{const{value:i,setValue:a,...c}=useBoundProp(yd.emailsPropTypeUtil);return vd.createElement(PropProvider,{...c,value:i,setValue:a},vd.createElement(kd.Stack,{gap:2},vd.createElement(ControlLabel,null,o?o+" "+(0,Ed.__)("settings","elementor"):(0,Ed.__)("Email settings","elementor")),vd.createElement(PropKeyProvider,{bind:"to"},vd.createElement(SendToField,{placeholder:r})),vd.createElement(SubjectField,null),vd.createElement(MessageField,null),vd.createElement(FromEmailField,null),vd.createElement(AdvancedSettings,null)))}),AdvancedSettings=()=>vd.createElement(bd.CollapsibleContent,{defaultOpen:!1},vd.createElement(kd.Box,{sx:{pt:2}},vd.createElement(kd.Stack,{gap:2},vd.createElement(FromNameField,null),vd.createElement(ReplyToField,null),vd.createElement(CcField,null),vd.createElement(BccField,null),vd.createElement(kd.Divider,null),vd.createElement(MetaDataField,null),vd.createElement(SendAsField,null)))),Bd=__toESM(i(97557)),Vd=i(70374),$d=i(79513),Ud=i(27723),Hd=createControl(({label:r,options:o})=>Bd.createElement($d.Grid,{container:!0,direction:"column",gap:1},r&&Bd.createElement($d.Grid,{item:!0},Bd.createElement(ControlFormLabel,null,r)),Bd.createElement($d.Grid,{item:!0},Bd.createElement(_e,{options:o})),Bd.createElement($d.Grid,{item:!0},Bd.createElement(Vd.InfoAlert,null,(0,Ud.__)("Linked uploads are saved to the server. Direct attachments will not appear under Submissions.","elementor"))))),Wd=__toESM(i(97557)),qd=i(2020),Kd=i(79513),Gd=createControl(({placeholder:r,error:o,inputValue:i,inputDisabled:a,helperText:c,sx:u,ariaLabel:p})=>{const{value:g,setValue:v,disabled:b,placeholder:k}=useBoundProp(qd.spanPropTypeUtil),E=r??k??"e.g: 'span 2' or '1 / 3'";return Wd.createElement(ControlActions,null,Wd.createElement(Kd.TextField,{size:"tiny",fullWidth:!0,disabled:a??b,value:i??g??"",onChange:r=>{const o=r.target.value;v(""===o?null:o)},placeholder:E,error:o,helperText:c,sx:u,inputProps:{...p?{"aria-label":p}:{}}}))}),Jd=__toESM(i(97557)),Yd=i(97557),Xd=i(24413),Qd=i(79513),Zd=i(27723),ef=__toESM(i(97557)),tf=i(97557),nf=i(70374),rf=i(79513);var of=(0,tf.forwardRef)(({promotionKey:r,children:o,trackingData:i},a)=>{const[c,u]=(0,tf.useState)(!1),p=function getV4Promotion(r){return window.elementor?.config?.v4Promotions?.[r]}(r),g=(0,tf.useCallback)(()=>{u(r=>(r||trackViewPromotion(i),!r))},[i]);return(0,tf.useImperativeHandle)(a,()=>({toggle:g}),[g]),ef.createElement(ef.Fragment,null,p&&ef.createElement(nf.PromotionInfotip,{title:p.title,content:p.content,assetUrl:p.image,ctaUrl:p.ctaUrl,open:c,onClose:r=>{r.stopPropagation(),u(!1)},onCtaClick:()=>trackUpgradePromotionClick(i)},ef.createElement(rf.Box,{onClick:r=>{r.stopPropagation(),g()},sx:{cursor:"pointer",display:"inline-flex"}},o??ef.createElement(nf.PromotionChip,null))))}),af=(0,Zd.__)("Display Conditions","elementor"),sf={target_name:"display_conditions",location_l2:"general"},lf=createControl(()=>{const r=(0,Yd.useRef)(null);return Jd.createElement(Qd.Stack,{direction:"row",spacing:2,sx:{justifyContent:"flex-end",alignItems:"center"}},Jd.createElement(of,{ref:r,promotionKey:"displayConditions",trackingData:sf}),Jd.createElement(Qd.Tooltip,{title:af,placement:"top"},Jd.createElement(Qd.IconButton,{size:"tiny","aria-label":af,"data-behavior":"display-conditions",onClick:()=>r.current?.toggle(),sx:{border:"1px solid",borderColor:"divider",borderRadius:1}},Jd.createElement(Xd.SitemapIcon,{fontSize:"tiny",color:"disabled"}))))}),cf=__toESM(i(97557)),uf=i(97557),pf=i(24413),df=i(79513),ff=(0,i(27723).__)("Attributes","elementor"),hf={target_name:"attributes",location_l2:"general"},mf=createControl(()=>{const r=(0,uf.useRef)(null);return cf.createElement(df.Stack,{direction:"row",spacing:2,sx:{justifyContent:"flex-end",alignItems:"center"}},cf.createElement(of,{ref:r,promotionKey:"attributes",trackingData:hf}),cf.createElement(df.Tooltip,{title:ff,placement:"top"},cf.createElement(pf.PlusIcon,{"aria-label":ff,fontSize:"tiny",color:"disabled",onClick:()=>r.current?.toggle(),sx:{cursor:"pointer"}})))}),gf=__toESM(i(97557)),vf=i(24413),yf=i(79513),bf=(0,yf.styled)(yf.IconButton)(({theme:r})=>({width:r.spacing(2.5),height:r.spacing(2.5)})),ClearIconButton=({tooltipText:r,onClick:o,disabled:i,size:a="tiny"})=>gf.createElement(yf.Tooltip,{title:r,placement:"top",disableInteractive:!0},gf.createElement(bf,{"aria-label":r,size:a,onClick:o,disabled:i},gf.createElement(vf.BrushBigIcon,{fontSize:a}))),kf=__toESM(i(97557)),Ef=i(97557),Sf=i(24413),wf=i(79513),xf=i(27723),Cf="tiny",Repeater3=({label:r,itemSettings:o,disabled:i=!1,openOnAdd:a=!1,values:c=[],setValues:u,showDuplicate:p=!0,showToggle:g=!0,showRemove:v=!0,disableAddItemButton:b=!1,addButtonInfotipContent:k,openItem:E=-1,isSortable:w=!0})=>{const[x,C]=(0,Ef.useState)(E),_=c.map((r,i)=>w&&"getId"in o?o.getId({item:r,index:i}):String(i)),T=i||b,P=T&&k,A=kf.createElement(wf.IconButton,{size:Cf,sx:{ml:"auto"},disabled:T,onClick:()=>{const r=structuredClone(o.initialValues),i=c.length;u([...c,r],{},{action:{type:"add",payload:[{index:i,item:r}]}}),a&&C(i)},"aria-label":(0,xf.__)("Add item","elementor")},kf.createElement(Sf.PlusIcon,{fontSize:Cf}));return kf.createElement(SectionContent,{gap:2},kf.createElement(sr,{label:r,adornment:ControlAdornments},P?kf.createElement(wf.Infotip,{placement:"right",content:k,color:"secondary",slotProps:{popper:{sx:{width:300}}}},kf.createElement(wf.Box,{sx:{...T?{cursor:"not-allowed"}:{}}},A)):A),0<_.length&&kf.createElement(SortableProvider,{value:_,onChange:(r,o)=>{u(r.map(r=>c[_.indexOf(r)]),{},{action:{type:"reorder",payload:{...o}}})}},_.map(r=>{const b=_.indexOf(r),k=c[b];return k?kf.createElement(SortableItem,{id:r,key:`sortable-${r}`,disabled:!w},kf.createElement(RepeaterItem,{disabled:i,propDisabled:k?.disabled,label:kf.createElement(Tn,{value:k},kf.createElement(o.Label,{value:k,index:b})),startIcon:kf.createElement(Cn,{value:k},kf.createElement(o.Icon,{value:k})),removeItem:()=>(r=>{const o=c[r];u(c.filter((o,i)=>i!==r),{},{action:{type:"remove",payload:[{index:r,item:o}]}})})(b),duplicateItem:()=>(r=>{const o=structuredClone(c[r]),i=1+r;u([...c.slice(0,i),o,...c.slice(i)],{},{action:{type:"duplicate",payload:[{index:r,item:o}]}})})(b),toggleDisableItem:()=>(r=>{u(c.map((o,i)=>{if(i===r){const{disabled:r,...i}=o;return{...i,...r?{}:{disabled:!0}}}return o}),{},{action:{type:"toggle-disable"}})})(b),openOnMount:a&&x===b,onOpen:()=>C(-1),onPopoverOpen:o.onPopoverOpen,onPopoverClose:o.onPopoverClose,showDuplicate:p,showToggle:g,showRemove:v,actions:o.actions,value:k},r=>kf.createElement(o.Content,{...r,value:k,bind:String(b),index:b}))):null})))},RepeaterItem=({label:r,propDisabled:o,startIcon:i,children:a,removeItem:c,duplicateItem:u,toggleDisableItem:p,openOnMount:g,onOpen:v,onPopoverOpen:b,onPopoverClose:k,showDuplicate:E,showToggle:w,showRemove:x,disabled:C,actions:_,value:T})=>{const P=k?()=>k(T):void 0,{popoverState:A,popoverProps:N,ref:R,setRef:I}=usePopover(g,()=>{v(),b?.(T)},P),L=(0,wf.bindTrigger)(A);usePopoverDismiss({isOpen:A.isOpen,onClose:N.onClose});const z=(0,xf.__)("Duplicate","elementor"),j=o?(0,xf.__)("Show","elementor"):(0,xf.__)("Hide","elementor"),B=(0,xf.__)("Remove","elementor");return kf.createElement(wf.Box,{sx:{display:"contents"}},kf.createElement(wn,{disabled:C,label:r,ref:I,"aria-label":(0,xf.__)("Open item","elementor"),...L,onClick:r=>{L.onClick(r),A.isOpen||b?.(T)},startIcon:i,actions:kf.createElement(kf.Fragment,null,E&&kf.createElement(wf.Tooltip,{title:z,placement:"top"},kf.createElement(wf.IconButton,{size:Cf,onClick:u,"aria-label":z},kf.createElement(Sf.CopyIcon,{fontSize:Cf}))),w&&kf.createElement(wf.Tooltip,{title:j,placement:"top"},kf.createElement(wf.IconButton,{size:Cf,onClick:p,"aria-label":j},o?kf.createElement(Sf.EyeOffIcon,{fontSize:Cf}):kf.createElement(Sf.EyeIcon,{fontSize:Cf}))),_?.(T),x&&kf.createElement(wf.Tooltip,{title:B,placement:"top"},kf.createElement(wf.IconButton,{size:Cf,onClick:c,"aria-label":B},kf.createElement(Sf.XIcon,{fontSize:Cf}))))}),kf.createElement(RepeaterPopover,{width:R?.getBoundingClientRect().width,...N,anchorEl:R},kf.createElement(wf.Box,null,a({anchorEl:R}))))},usePopover=(r,o,i)=>{const[a,c]=(0,Ef.useState)(null),u=(0,wf.usePopupState)({variant:"popover"}),p=(0,wf.bindPopover)(u);(0,Ef.useEffect)(()=>{r&&a&&(u.open(a),o?.())},[a]);return{popoverState:u,ref:a,setRef:c,popoverProps:{...p,onClose:()=>{p.onClose?.(),i?.()}}}},_f=__toESM(i(97557)),Tf=i(97557),Of=i(70975),Pf=i(24413),Af=i(79513),Mf=i(83574),Nf=i(27723),Rf=__toESM(i(97557)),If=i(97557),Df=i(24413),Lf=i(79513),Ff=i(27723),UrlPopover=({popupState:r,restoreValue:o,anchorRef:i,value:a,onChange:c,openInNewTab:u,onToggleNewTab:p})=>{const g=(0,If.useRef)(null);(0,If.useEffect)(()=>{r.isOpen&&requestAnimationFrame(()=>g.current?.focus())},[r.isOpen]);const handleClose=()=>{o(),r.close()};return Rf.createElement(Lf.Popover,{slotProps:{paper:{sx:{borderRadius:"16px",width:i.current?.offsetWidth+"px",marginTop:-1}}},...(0,Lf.bindPopover)(r),anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},onClose:handleClose},Rf.createElement(Lf.Stack,{direction:"row",alignItems:"center",gap:1,sx:{p:1.5}},Rf.createElement(Lf.TextField,{value:a,onChange:c,size:"tiny",fullWidth:!0,placeholder:(0,Ff.__)("Type a URL","elementor"),inputProps:{ref:g},color:"secondary",InputProps:{sx:{borderRadius:"8px"}},onKeyUp:r=>"Enter"===r.key&&handleClose()}),Rf.createElement(Lf.Tooltip,{title:(0,Ff.__)("Open in a new tab","elementor")},Rf.createElement(Lf.ToggleButton,{size:"tiny",value:"newTab",selected:u,onClick:p,"aria-label":(0,Ff.__)("Open in a new tab","elementor"),sx:{borderRadius:"8px"}},Rf.createElement(Df.ExternalLinkIcon,{fontSize:"tiny"})))))},InlineEditorToolbar=({editor:r,elementId:o,sx:i={}})=>{const[a,c]=(0,Tf.useState)(""),[u,p]=(0,Tf.useState)(!1),g=(0,Tf.useRef)(null),v=(0,Af.usePopupState)({variant:"popover"}),b=!!o&&checkIfElementIsClickable(o),k=(0,Mf.useEditorState)({editor:r,selector:r=>Vf.filter(o=>r.editor.isActive(o))}),E=(0,Tf.useMemo)(()=>{const r=Object.values(Bf);return b?r.filter(r=>"link"!==r.action):r},[b]);return(0,Tf.useEffect)(()=>{r?.commands?.focus()},[r]),_f.createElement(Af.Box,{ref:g,sx:{display:"inline-flex",gap:.5,padding:.5,borderRadius:"8px",backgroundColor:"background.paper",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.2)",alignItems:"center",visibility:v.isOpen?"hidden":"visible",pointerEvents:v.isOpen?"none":"all",...i}},_f.createElement(Af.Tooltip,{title:jf.label,placement:"top",sx:{borderRadius:"8px"}},_f.createElement(Af.IconButton,{"aria-label":jf.label,onClick:()=>jf.method(r),size:"tiny"},jf.icon)),_f.createElement(Af.ToggleButtonGroup,{value:k,size:"tiny",sx:{display:"flex",gap:.5,border:"none",[`& .${Af.toggleButtonGroupClasses.firstButton}, & .${Af.toggleButtonGroupClasses.middleButton}, & .${Af.toggleButtonGroupClasses.lastButton}`]:{borderRadius:"8px",border:"none",marginLeft:0,"&.Mui-selected":{marginLeft:0},"& + &.Mui-selected":{marginLeft:0}}}},E.map(o=>_f.createElement(Af.Tooltip,{title:o.label,key:o.action,placement:"top"},_f.createElement(Af.ToggleButton,{value:o.action,"aria-label":o.label,size:"tiny",onClick:()=>{"link"===o.action?(()=>{const o=r.getAttributes("link");c(o.href||""),p("_blank"===o.target),v.open(g.current)})():o.method?.(r),r?.commands?.focus()}},o.icon)))),_f.createElement(UrlPopover,{popupState:v,anchorRef:g,restoreValue:()=>{a?r.chain().focus().setLink({href:a,target:u?"_blank":"_self"}).run():r.chain().focus().unsetLink().run(),o&&window.dispatchEvent(new CustomEvent("elementor:inline-link-changed",{detail:{elementId:o}})),v.close()},value:a,onChange:r=>{c(r.target.value)},openInNewTab:u,onToggleNewTab:()=>{p(!u)}}))},checkIfElementIsClickable=r=>{const o=(0,Of.getContainer)(r),i=o?.model.get("widgetType"),a="e-button"===i,c=!!(0,Of.getElementSetting)(r,"link")?.value?.destination;return a||c},zf={clear:{label:(0,Nf.__)("Clear","elementor"),icon:_f.createElement(Pf.MinusIcon,{fontSize:"tiny"}),action:"clear",method:r=>{r.chain().focus().clearNodes().unsetAllMarks().run()}},bold:{label:(0,Nf.__)("Bold","elementor"),icon:_f.createElement(Pf.BoldIcon,{fontSize:"tiny"}),action:"bold",method:r=>{r.chain().focus().toggleBold().run()}},italic:{label:(0,Nf.__)("Italic","elementor"),icon:_f.createElement(Pf.ItalicIcon,{fontSize:"tiny"}),action:"italic",method:r=>{r.chain().focus().toggleItalic().run()}},underline:{label:(0,Nf.__)("Underline","elementor"),icon:_f.createElement(Pf.UnderlineIcon,{fontSize:"tiny"}),action:"underline",method:r=>{r.chain().focus().toggleUnderline().run()}},strike:{label:(0,Nf.__)("Strikethrough","elementor"),icon:_f.createElement(Pf.StrikethroughIcon,{fontSize:"tiny"}),action:"strike",method:r=>{r.chain().focus().toggleStrike().run()}},superscript:{label:(0,Nf.__)("Superscript","elementor"),icon:_f.createElement(Pf.SuperscriptIcon,{fontSize:"tiny"}),action:"superscript",method:r=>{r.chain().focus().toggleSuperscript().run()}},subscript:{label:(0,Nf.__)("Subscript","elementor"),icon:_f.createElement(Pf.SubscriptIcon,{fontSize:"tiny"}),action:"subscript",method:r=>{r.chain().focus().toggleSubscript().run()}},link:{label:(0,Nf.__)("Link","elementor"),icon:_f.createElement(Pf.LinkIcon,{fontSize:"tiny"}),action:"link",method:null}},{clear:jf,...Bf}=zf,Vf=Object.keys(Bf),$f=__toESM(i(97557)),Uf=i(79513),differsFromExternal=(r,o)=>r?.size!==o?.size||r?.unit!==o?.unit,Hf=__toESM(i(97557)),Wf=i(97557),qf=i(70374),Kf=i(79513),Gf={display:"flex",flexDirection:"column",justifyContent:"center"},UnitSelect=({value:r,showPrimaryColor:o,onClick:i,options:a})=>{const c=(0,Kf.usePopupState)({variant:"popover",popupId:(0,Wf.useId)()});return Hf.createElement(Hf.Fragment,null,Hf.createElement(Jf,{isPrimaryColor:o,size:"small",...(0,Kf.bindTrigger)(c)},r),Hf.createElement(Kf.Menu,{MenuListProps:{dense:!0},...(0,Kf.bindMenu)(c)},a.map((r,o)=>Hf.createElement(qf.MenuListItem,{key:r,onClick:()=>(r=>{i(a[r]),c.close()})(o),primaryTypographyProps:{variant:"caption",sx:{...Gf,lineHeight:"1"}},menuItemTextProps:{sx:Gf}},r.toUpperCase()))))},Jf=(0,Kf.styled)(Kf.Button,{shouldForwardProp:r=>"isPrimaryColor"!==r})(({isPrimaryColor:r,theme:o})=>({color:r?o.palette.text.primary:o.palette.text.tertiary,font:"inherit",minWidth:"initial",textTransform:"uppercase"})),Yf=__toESM(i(97557)),Xf=(0,i(97557).forwardRef)(({type:r,value:o,onChange:i,onKeyDown:a,onKeyUp:c,InputProps:u,onBlur:p,focused:g,disabled:v},b)=>Yf.createElement(pt,{ref:b,size:"tiny",fullWidth:!0,type:r,value:o,onKeyUp:c,focused:g,disabled:v,onKeyDown:a,onInput:i,onBlur:p,InputProps:u,sx:getCursorStyle2(u?.readOnly??!1)})),getCursorStyle2=r=>({input:{cursor:r?"default !important":void 0}}),UnstableSizeField=({value:r,InputProps:o,onChange:i,onBlur:a,units:c,defaultUnit:u,startIcon:p})=>{const{size:g,unit:v,setSize:b,setUnit:k}=((r,o,i)=>{const[a,c]=useSyncExternalState({external:r,setExternal:r=>{null!==r&&o(r)},persistWhen:o=>differsFromExternal(o,r),fallback:()=>({size:"",unit:i??"px"})});return{size:a.size,unit:a.unit,setSize:r=>{const o={...a,size:""===r.trim()?null:Number(r)};c(o)},setUnit:r=>{const o={...a,unit:r};c(o)}}})(r,i,u);return $f.createElement(Xf,{type:"number",value:g??"",onBlur:a,onChange:r=>b(r.target.value),InputProps:{...o,startAdornment:p&&$f.createElement(Uf.InputAdornment,{position:"start"},p),endAdornment:$f.createElement(Uf.InputAdornment,{position:"end"},$f.createElement(UnitSelect,{options:c,value:v,onClick:k,showPrimaryColor:hasValue(g)}))}})},hasValue=r=>null!==r&&""!==r,Qf=i(97557),Zf=i(5527),useFontFamilies=()=>{const{groups:r,options:o}=(()=>{const{controls:r}=(0,Zf.getElementorConfig)();return r?.font??{}})();return(0,Qf.useMemo)(()=>{if(!r||!o)return[];const i=Object.keys(r),a=new Map(i.map((r,o)=>[r,o]));return Object.entries(o).reduce((o,[i,c])=>{const u=a.get(c);return void 0===u||(o[u]||(o[u]={label:r[c],fonts:[]}),o[u].fonts.push(i)),o},[]).filter(Boolean)},[r,o])}},40331:function(r,o){"use strict";const{getOwnPropertyNames:i,getOwnPropertySymbols:a}=Object,{hasOwnProperty:c}=Object.prototype;function combineComparators(r,o){return function isEqual(i,a,c){return r(i,a,c)&&o(i,a,c)}}function createIsCircular(r){return function isCircular(o,i,a){if(!o||!i||"object"!=typeof o||"object"!=typeof i)return r(o,i,a);const{cache:c}=a,u=c.get(o),p=c.get(i);if(u&&p)return u===i&&p===o;c.set(o,i),c.set(i,o);const g=r(o,i,a);return c.delete(o),c.delete(i),g}}function getStrictProperties(r){return i(r).concat(a(r))}const u=Object.hasOwn||((r,o)=>c.call(r,o));function sameValueZeroEqual(r,o){return r===o||!r&&!o&&r!=r&&o!=o}const{getOwnPropertyDescriptor:p,keys:g}=Object;function areArrayBuffersEqual(r,o){return r.byteLength===o.byteLength&&areTypedArraysEqual(new Uint8Array(r),new Uint8Array(o))}function areArraysEqual(r,o,i){let a=r.length;if(o.length!==a)return!1;for(;a-- >0;)if(!i.equals(r[a],o[a],a,a,r,o,i))return!1;return!0}function areDataViewsEqual(r,o){return r.byteLength===o.byteLength&&areTypedArraysEqual(new Uint8Array(r.buffer,r.byteOffset,r.byteLength),new Uint8Array(o.buffer,o.byteOffset,o.byteLength))}function areDatesEqual(r,o){return sameValueZeroEqual(r.getTime(),o.getTime())}function areErrorsEqual(r,o){return r.name===o.name&&r.message===o.message&&r.cause===o.cause&&r.stack===o.stack}function areFunctionsEqual(r,o){return r===o}function areMapsEqual(r,o,i){const a=r.size;if(a!==o.size)return!1;if(!a)return!0;const c=new Array(a),u=r.entries();let p,g,v=0;for(;(p=u.next())&&!p.done;){const a=o.entries();let u=!1,b=0;for(;(g=a.next())&&!g.done;){if(c[b]){b++;continue}const a=p.value,k=g.value;if(i.equals(a[0],k[0],v,b,r,o,i)&&i.equals(a[1],k[1],a[0],k[0],r,o,i)){u=c[b]=!0;break}b++}if(!u)return!1;v++}return!0}const v=sameValueZeroEqual;function areObjectsEqual(r,o,i){const a=g(r);let c=a.length;if(g(o).length!==c)return!1;for(;c-- >0;)if(!isPropertyEqual(r,o,i,a[c]))return!1;return!0}function areObjectsEqualStrict(r,o,i){const a=getStrictProperties(r);let c,u,g,v=a.length;if(getStrictProperties(o).length!==v)return!1;for(;v-- >0;){if(c=a[v],!isPropertyEqual(r,o,i,c))return!1;if(u=p(r,c),g=p(o,c),(u||g)&&(!u||!g||u.configurable!==g.configurable||u.enumerable!==g.enumerable||u.writable!==g.writable))return!1}return!0}function arePrimitiveWrappersEqual(r,o){return sameValueZeroEqual(r.valueOf(),o.valueOf())}function areRegExpsEqual(r,o){return r.source===o.source&&r.flags===o.flags}function areSetsEqual(r,o,i){const a=r.size;if(a!==o.size)return!1;if(!a)return!0;const c=new Array(a),u=r.values();let p,g;for(;(p=u.next())&&!p.done;){const a=o.values();let u=!1,v=0;for(;(g=a.next())&&!g.done;){if(!c[v]&&i.equals(p.value,g.value,p.value,g.value,r,o,i)){u=c[v]=!0;break}v++}if(!u)return!1}return!0}function areTypedArraysEqual(r,o){let i=r.byteLength;if(o.byteLength!==i||r.byteOffset!==o.byteOffset)return!1;for(;i-- >0;)if(r[i]!==o[i])return!1;return!0}function areUrlsEqual(r,o){return r.hostname===o.hostname&&r.pathname===o.pathname&&r.protocol===o.protocol&&r.port===o.port&&r.hash===o.hash&&r.username===o.username&&r.password===o.password}function isPropertyEqual(r,o,i,a){return!("_owner"!==a&&"__o"!==a&&"__v"!==a||!r.$$typeof&&!o.$$typeof)||u(o,a)&&i.equals(r[a],o[a],a,a,r,o,i)}const b={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},k=Object.prototype.toString;function createEqualityComparator({areArrayBuffersEqual:r,areArraysEqual:o,areDataViewsEqual:i,areDatesEqual:a,areErrorsEqual:c,areFunctionsEqual:u,areMapsEqual:p,areNumbersEqual:g,areObjectsEqual:v,arePrimitiveWrappersEqual:E,areRegExpsEqual:w,areSetsEqual:x,areTypedArraysEqual:C,areUrlsEqual:_,unknownTagComparators:T}){return function comparator(P,A,N){if(P===A)return!0;if(null==P||null==A)return!1;const R=typeof P;if(R!==typeof A)return!1;if("object"!==R)return"number"===R?g(P,A,N):"function"===R&&u(P,A,N);const I=P.constructor;if(I!==A.constructor)return!1;if(I===Object)return v(P,A,N);if(Array.isArray(P))return o(P,A,N);if(I===Date)return a(P,A,N);if(I===RegExp)return w(P,A,N);if(I===Map)return p(P,A,N);if(I===Set)return x(P,A,N);const L=k.call(P);if("[object Date]"===L)return a(P,A,N);if("[object RegExp]"===L)return w(P,A,N);if("[object Map]"===L)return p(P,A,N);if("[object Set]"===L)return x(P,A,N);if("[object Object]"===L)return"function"!=typeof P.then&&"function"!=typeof A.then&&v(P,A,N);if("[object URL]"===L)return _(P,A,N);if("[object Error]"===L)return c(P,A,N);if("[object Arguments]"===L)return v(P,A,N);if(b[L])return C(P,A,N);if("[object ArrayBuffer]"===L)return r(P,A,N);if("[object DataView]"===L)return i(P,A,N);if("[object Boolean]"===L||"[object Number]"===L||"[object String]"===L)return E(P,A,N);if(T){let r=T[L];if(!r){const o=function getShortTag(r){return null!=r?r[Symbol.toStringTag]:void 0}(P);o&&(r=T[o])}if(r)return r(P,A,N)}return!1}}const E=createCustomEqual(),w=createCustomEqual({strict:!0}),x=createCustomEqual({circular:!0}),C=createCustomEqual({circular:!0,strict:!0}),_=createCustomEqual({createInternalComparator:()=>sameValueZeroEqual}),T=createCustomEqual({strict:!0,createInternalComparator:()=>sameValueZeroEqual}),P=createCustomEqual({circular:!0,createInternalComparator:()=>sameValueZeroEqual}),A=createCustomEqual({circular:!0,createInternalComparator:()=>sameValueZeroEqual,strict:!0});function createCustomEqual(r={}){const{circular:o=!1,createInternalComparator:i,createState:a,strict:c=!1}=r,u=function createEqualityComparatorConfig({circular:r,createCustomConfig:o,strict:i}){let a={areArrayBuffersEqual:areArrayBuffersEqual,areArraysEqual:i?areObjectsEqualStrict:areArraysEqual,areDataViewsEqual:areDataViewsEqual,areDatesEqual:areDatesEqual,areErrorsEqual:areErrorsEqual,areFunctionsEqual:areFunctionsEqual,areMapsEqual:i?combineComparators(areMapsEqual,areObjectsEqualStrict):areMapsEqual,areNumbersEqual:v,areObjectsEqual:i?areObjectsEqualStrict:areObjectsEqual,arePrimitiveWrappersEqual:arePrimitiveWrappersEqual,areRegExpsEqual:areRegExpsEqual,areSetsEqual:i?combineComparators(areSetsEqual,areObjectsEqualStrict):areSetsEqual,areTypedArraysEqual:i?combineComparators(areTypedArraysEqual,areObjectsEqualStrict):areTypedArraysEqual,areUrlsEqual:areUrlsEqual,unknownTagComparators:void 0};if(o&&(a=Object.assign({},a,o(a))),r){const r=createIsCircular(a.areArraysEqual),o=createIsCircular(a.areMapsEqual),i=createIsCircular(a.areObjectsEqual),c=createIsCircular(a.areSetsEqual);a=Object.assign({},a,{areArraysEqual:r,areMapsEqual:o,areObjectsEqual:i,areSetsEqual:c})}return a}(r),p=createEqualityComparator(u);return function createIsEqual({circular:r,comparator:o,createState:i,equals:a,strict:c}){if(i)return function isEqual(u,p){const{cache:g=(r?new WeakMap:void 0),meta:v}=i();return o(u,p,{cache:g,equals:a,meta:v,strict:c})};if(r)return function isEqual(r,i){return o(r,i,{cache:new WeakMap,equals:a,meta:void 0,strict:c})};const u={cache:void 0,equals:a,meta:void 0,strict:c};return function isEqual(r,i){return o(r,i,u)}}({circular:o,comparator:p,createState:a,equals:i?i(p):function createInternalEqualityComparator(r){return function(o,i,a,c,u,p,g){return r(o,i,g)}}(p),strict:c})}o.circularDeepEqual=x,o.circularShallowEqual=P,o.createCustomEqual=createCustomEqual,o.deepEqual=E,o.sameValueZeroEqual=sameValueZeroEqual,o.shallowEqual=_,o.strictCircularDeepEqual=C,o.strictCircularShallowEqual=A,o.strictDeepEqual=w,o.strictShallowEqual=T},43617:function(r){"use strict";r.exports=window.ReactDOM},45643:function(r){"use strict";r.exports=window.elementorV2.query},46400:function(r){"use strict";r.exports=window.elementorV2.editorCurrentUser},49162:function(r,o,i){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),function _createStarExport(r){Object.keys(r).filter(r=>"default"!==r&&"__esModule"!==r).forEach(i=>{o.hasOwnProperty(i)||Object.defineProperty(o,i,{enumerable:!0,configurable:!0,get:()=>r[i]})})}(i(37820))},49454:function(r,o,i){"use strict";function _slicedToArray(r,o){return function _arrayWithHoles(r){if(Array.isArray(r))return r}(r)||function _iterableToArrayLimit(r,o){var i=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=i){var a,c,u,p,g=[],v=!0,b=!1;try{if(u=(i=i.call(r)).next,0===o){if(Object(i)!==i)return;v=!1}else for(;!(v=(a=u.call(i)).done)&&(g.push(a.value),g.length!==o);v=!0);}catch(r){b=!0,c=r}finally{try{if(!v&&null!=i.return&&(p=i.return(),Object(p)!==p))return}finally{if(b)throw c}}return g}}(r,o)||_unsupportedIterableToArray(r,o)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _createForOfIteratorHelper(r,o){var i="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(!i){if(Array.isArray(r)||(i=_unsupportedIterableToArray(r))||o&&r&&"number"==typeof r.length){i&&(r=i);var a=0,c=function F(){};return{s:c,n:function n(){return a>=r.length?{done:!0}:{done:!1,value:r[a++]}},e:function e(r){throw r},f:c}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u,p=!0,g=!1;return{s:function s(){i=i.call(r)},n:function n(){var r=i.next();return p=r.done,r},e:function e(r){g=!0,u=r},f:function f(){try{p||null==i.return||i.return()}finally{if(g)throw u}}}}function _unsupportedIterableToArray(r,o){if(r){if("string"==typeof r)return _arrayLikeToArray(r,o);var i=Object.prototype.toString.call(r).slice(8,-1);return"Object"===i&&r.constructor&&(i=r.constructor.name),"Map"===i||"Set"===i?Array.from(r):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(r,o):void 0}}function _arrayLikeToArray(r,o){(null==o||o>r.length)&&(o=r.length);for(var i=0,a=new Array(o);i<o;i++)a[i]=r[i];return a}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function _get(r,o,i){var a=function _superPropBase(r,o){for(;!Object.prototype.hasOwnProperty.call(r,o)&&null!==(r=_getPrototypeOf(r)););return r}(r,o);if(a){var c=Object.getOwnPropertyDescriptor(a,o);return c.get?c.get.call(arguments.length<3?r:i):c.value}},_get.apply(this,arguments)}function _inherits(r,o){if("function"!=typeof o&&null!==o)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(o&&o.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),o&&_setPrototypeOf(r,o)}function _setPrototypeOf(r,o){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(r,o){return r.__proto__=o,r},_setPrototypeOf(r,o)}function _createSuper(r){var o=function _isNativeReflectConstruct(){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(r){return!1}}();return function _createSuperInternal(){var i,a=_getPrototypeOf(r);if(o){var c=_getPrototypeOf(this).constructor;i=Reflect.construct(a,arguments,c)}else i=a.apply(this,arguments);return function _possibleConstructorReturn(r,o){if(o&&("object"===_typeof(o)||"function"==typeof o))return o;if(void 0!==o)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(r)}(this,i)}}function _assertThisInitialized(r){if(void 0===r)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function _getPrototypeOf(r){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(r){return r.__proto__||Object.getPrototypeOf(r)},_getPrototypeOf(r)}function _typeof(r){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},_typeof(r)}function _classCallCheck(r,o){if(!(r instanceof o))throw new TypeError("Cannot call a class as a function")}function _defineProperties(r,o){for(var i=0;i<o.length;i++){var a=o[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(r,_toPropertyKey(a.key),a)}}function _createClass(r,o,i){return o&&_defineProperties(r.prototype,o),i&&_defineProperties(r,i),Object.defineProperty(r,"prototype",{writable:!1}),r}function _toPropertyKey(r){var o=function _toPrimitive(r,o){if("object"!==_typeof(r)||null===r)return r;var i=r[Symbol.toPrimitive];if(void 0!==i){var a=i.call(r,o||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===o?String:Number)(r)}(r,"string");return"symbol"===_typeof(o)?o:String(o)}var a=i(37820),c=i(77712),u=i(36553),p=function domIndex(r){for(var o=0;;o++)if(!(r=r.previousSibling))return o},g=function parentNode(r){var o=r.assignedSlot||r.parentNode;return o&&11==o.nodeType?o.host:o},v=null,b=function textRange(r,o,i){var a=v||(v=document.createRange());return a.setEnd(r,null==i?r.nodeValue.length:i),a.setStart(r,o||0),a},k=function isEquivalentPosition(r,o,i,a){return i&&(scanFor(r,o,i,a,-1)||scanFor(r,o,i,a,1))},E=/^(img|br|input|textarea|hr)$/i;function scanFor(r,o,i,a,c){for(var u;;){if(r==i&&o==a)return!0;if(o==(c<0?0:nodeSize(r))){var g=r.parentNode;if(!g||1!=g.nodeType||hasBlockDesc(r)||E.test(r.nodeName)||"false"==r.contentEditable)return!1;o=p(r)+(c<0?0:1),r=g}else{if(1!=r.nodeType)return!1;var v=r.childNodes[o+(c<0?-1:0)];if(1==v.nodeType&&"false"==v.contentEditable){if(!(null===(u=v.pmViewDesc)||void 0===u?void 0:u.ignoreForSelection))return!1;o+=c}else r=v,o=c<0?nodeSize(r):0}}}function nodeSize(r){return 3==r.nodeType?r.nodeValue.length:r.childNodes.length}function hasBlockDesc(r){for(var o,i=r;i&&!(o=i.pmViewDesc);i=i.parentNode);return o&&o.node&&o.node.isBlock&&(o.dom==r||o.contentDOM==r)}var w=function selectionCollapsed(r){return r.focusNode&&k(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)};function keyEvent(r,o){var i=document.createEvent("Event");return i.initEvent("keydown",!0,!0),i.keyCode=r,i.key=i.code=o,i}var x="undefined"!=typeof navigator?navigator:null,C="undefined"!=typeof document?document:null,_=x&&x.userAgent||"",T=/Edge\/(\d+)/.exec(_),P=/MSIE \d/.exec(_),A=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(_),N=!!(P||A||T),R=P?document.documentMode:A?+A[1]:T?+T[1]:0,I=!N&&/gecko\/(\d+)/i.test(_);I&&(/Firefox\/(\d+)/.exec(_)||[0,0])[1];var L=!N&&/Chrome\/(\d+)/.exec(_),z=!!L,j=L?+L[1]:0,B=!N&&!!x&&/Apple Computer/.test(x.vendor),V=B&&(/Mobile\/\w+/.test(_)||!!x&&x.maxTouchPoints>2),U=V||!!x&&/Mac/.test(x.platform),H=!!x&&/Win/.test(x.platform),W=/Android \d/.test(_),K=!!C&&"webkitFontSmoothing"in C.documentElement.style,G=K?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function windowRect(r){var o=r.defaultView&&r.defaultView.visualViewport;return o?{left:0,right:o.width,top:0,bottom:o.height}:{left:0,right:r.documentElement.clientWidth,top:0,bottom:r.documentElement.clientHeight}}function getSide(r,o){return"number"==typeof r?r:r[o]}function clientRect(r){var o=r.getBoundingClientRect(),i=o.width/r.offsetWidth||1,a=o.height/r.offsetHeight||1;return{left:o.left,right:o.left+r.clientWidth*i,top:o.top,bottom:o.top+r.clientHeight*a}}function scrollRectIntoView(r,o,i){for(var a=r.someProp("scrollThreshold")||0,c=r.someProp("scrollMargin")||5,u=r.dom.ownerDocument,p=i||r.dom;p;)if(1==p.nodeType){var v=p,b=v==u.body,k=b?windowRect(u):clientRect(v),E=0,w=0;if(o.top<k.top+getSide(a,"top")?w=-(k.top-o.top+getSide(c,"top")):o.bottom>k.bottom-getSide(a,"bottom")&&(w=o.bottom-o.top>k.bottom-k.top?o.top+getSide(c,"top")-k.top:o.bottom-k.bottom+getSide(c,"bottom")),o.left<k.left+getSide(a,"left")?E=-(k.left-o.left+getSide(c,"left")):o.right>k.right-getSide(a,"right")&&(E=o.right-k.right+getSide(c,"right")),E||w)if(b)u.defaultView.scrollBy(E,w);else{var x=v.scrollLeft,C=v.scrollTop;w&&(v.scrollTop+=w),E&&(v.scrollLeft+=E);var _=v.scrollLeft-x,T=v.scrollTop-C;o={left:o.left-_,top:o.top-T,right:o.right-_,bottom:o.bottom-T}}var P=b?"fixed":getComputedStyle(p).position;if(/^(fixed|sticky)$/.test(P))break;p="absolute"==P?p.offsetParent:g(p)}else p=g(p)}function scrollStack(r){for(var o=[],i=r.ownerDocument,a=r;a&&(o.push({dom:a,top:a.scrollTop,left:a.scrollLeft}),r!=i);a=g(a));return o}function restoreScrollStack(r,o){for(var i=0;i<r.length;i++){var a=r[i],c=a.dom,u=a.top,p=a.left;c.scrollTop!=u+o&&(c.scrollTop=u+o),c.scrollLeft!=p&&(c.scrollLeft=p)}}var J=null;function findOffsetInNode(r,o){for(var i,a,c,u,p=2e8,g=0,v=o.top,k=o.top,E=r.firstChild,w=0;E;E=E.nextSibling,w++){var x=void 0;if(1==E.nodeType)x=E.getClientRects();else{if(3!=E.nodeType)continue;x=b(E).getClientRects()}for(var C=0;C<x.length;C++){var _=x[C];if(_.top<=v&&_.bottom>=k){v=Math.max(_.bottom,v),k=Math.min(_.top,k);var T=_.left>o.left?_.left-o.left:_.right<o.left?o.left-_.right:0;if(T<p){i=E,p=T,a=T&&3==i.nodeType?{left:_.right<o.left?_.right:_.left,top:o.top}:o,1==E.nodeType&&T&&(g=w+(o.left>=(_.left+_.right)/2?1:0));continue}}else _.top>o.top&&!c&&_.left<=o.left&&_.right>=o.left&&(c=E,u={left:Math.max(_.left,Math.min(_.right,o.left)),top:_.top});!i&&(o.left>=_.right&&o.top>=_.top||o.left>=_.left&&o.top>=_.bottom)&&(g=w+1)}}return!i&&c&&(i=c,a=u,p=0),i&&3==i.nodeType?function findOffsetInText(r,o){for(var i,a=r.nodeValue.length,c=document.createRange(),u=0;u<a;u++){c.setEnd(r,u+1),c.setStart(r,u);var p=singleRect(c,1);if(p.top!=p.bottom&&inRect(o,p)){i={node:r,offset:u+(o.left>=(p.left+p.right)/2?1:0)};break}}return c.detach(),i||{node:r,offset:0}}(i,a):!i||p&&1==i.nodeType?{node:r,offset:g}:findOffsetInNode(i,a)}function inRect(r,o){return r.left>=o.left-1&&r.left<=o.right+1&&r.top>=o.top-1&&r.top<=o.bottom+1}function elementFromPoint(r,o,i){var a=r.childNodes.length;if(a&&i.top<i.bottom)for(var c=Math.max(0,Math.min(a-1,Math.floor(a*(o.top-i.top)/(i.bottom-i.top))-2)),u=c;;){var p=r.childNodes[u];if(1==p.nodeType)for(var g=p.getClientRects(),v=0;v<g.length;v++){var b=g[v];if(inRect(o,b))return elementFromPoint(p,o,b)}if((u=(u+1)%a)==c)break}return r}function _posAtCoords(r,o){var i,a=r.dom.ownerDocument,c=0,u=function caretFromPoint(r,o,i){if(r.caretPositionFromPoint)try{var a=r.caretPositionFromPoint(o,i);if(a)return{node:a.offsetNode,offset:Math.min(nodeSize(a.offsetNode),a.offset)}}catch(r){}if(r.caretRangeFromPoint){var c=r.caretRangeFromPoint(o,i);if(c)return{node:c.startContainer,offset:Math.min(nodeSize(c.startContainer),c.startOffset)}}}(a,o.left,o.top);u&&(i=u.node,c=u.offset);var p,v=(r.root.elementFromPoint?r.root:a).elementFromPoint(o.left,o.top);if(!v||!r.dom.contains(1!=v.nodeType?v.parentNode:v)){var b=r.dom.getBoundingClientRect();if(!inRect(o,b))return null;if(!(v=elementFromPoint(r.dom,o,b)))return null}if(B)for(var k=v;i&&k;k=g(k))k.draggable&&(i=void 0);if(v=function targetKludge(r,o){var i=r.parentNode;return i&&/^li$/i.test(i.nodeName)&&o.left<r.getBoundingClientRect().left?i:r}(v,o),i){if(I&&1==i.nodeType&&(c=Math.min(c,i.childNodes.length))<i.childNodes.length){var E,w=i.childNodes[c];"IMG"==w.nodeName&&(E=w.getBoundingClientRect()).right<=o.left&&E.bottom>o.top&&c++}var x;K&&c&&1==i.nodeType&&1==(x=i.childNodes[c-1]).nodeType&&"false"==x.contentEditable&&x.getBoundingClientRect().top>=o.top&&c--,i==r.dom&&c==i.childNodes.length-1&&1==i.lastChild.nodeType&&o.top>i.lastChild.getBoundingClientRect().bottom?p=r.state.doc.content.size:0!=c&&1==i.nodeType&&"BR"==i.childNodes[c-1].nodeName||(p=function posFromCaret(r,o,i,a){for(var c=-1,u=o,p=!1;u!=r.dom;){var g=r.docView.nearestDesc(u,!0),v=void 0;if(!g)return null;if(1==g.dom.nodeType&&(g.node.isBlock&&g.parent||!g.contentDOM)&&((v=g.dom.getBoundingClientRect()).width||v.height)&&(g.node.isBlock&&g.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(g.dom.nodeName)&&(!p&&v.left>a.left||v.top>a.top?c=g.posBefore:(!p&&v.right<a.left||v.bottom<a.top)&&(c=g.posAfter),p=!0),!g.contentDOM&&c<0&&!g.node.isText))return(g.node.isBlock?a.top<(v.top+v.bottom)/2:a.left<(v.left+v.right)/2)?g.posBefore:g.posAfter;u=g.dom.parentNode}return c>-1?c:r.docView.posFromDOM(o,i,-1)}(r,i,c,o))}null==p&&(p=function posFromElement(r,o,i){var a=findOffsetInNode(o,i),c=a.node,u=a.offset,p=-1;if(1==c.nodeType&&!c.firstChild){var g=c.getBoundingClientRect();p=g.left!=g.right&&i.left>(g.left+g.right)/2?1:-1}return r.docView.posFromDOM(c,u,p)}(r,v,o));var C=r.docView.nearestDesc(v,!0);return{pos:p,inside:C?C.posAtStart-C.border:-1}}function nonZero(r){return r.top<r.bottom||r.left<r.right}function singleRect(r,o){var i=r.getClientRects();if(i.length){var a=i[o<0?0:i.length-1];if(nonZero(a))return a}return Array.prototype.find.call(i,nonZero)||r.getBoundingClientRect()}var Y=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function _coordsAtPos(r,o,i){var a=r.docView.domFromPos(o,i<0?-1:1),c=a.node,u=a.offset,p=a.atom,g=K||I;if(3==c.nodeType){if(!g||!Y.test(c.nodeValue)&&(i<0?u:u!=c.nodeValue.length)){var v=u,k=u,E=i<0?1:-1;return i<0&&!u?(k++,E=-1):i>=0&&u==c.nodeValue.length?(v--,E=1):i<0?v--:k++,flattenV(singleRect(b(c,v,k),E),E<0)}var w=singleRect(b(c,u,u),i);if(I&&u&&/\s/.test(c.nodeValue[u-1])&&u<c.nodeValue.length){var x=singleRect(b(c,u-1,u-1),-1);if(x.top==w.top){var C=singleRect(b(c,u,u+1),-1);if(C.top!=w.top)return flattenV(C,C.left<x.left)}}return w}if(!r.state.doc.resolve(o-(p||0)).parent.inlineContent){if(null==p&&u&&(i<0||u==nodeSize(c))){var _=c.childNodes[u-1];if(1==_.nodeType)return flattenH(_.getBoundingClientRect(),!1)}if(null==p&&u<nodeSize(c)){var T=c.childNodes[u];if(1==T.nodeType)return flattenH(T.getBoundingClientRect(),!0)}return flattenH(c.getBoundingClientRect(),i>=0)}if(null==p&&u&&(i<0||u==nodeSize(c))){var P=c.childNodes[u-1],A=3==P.nodeType?b(P,nodeSize(P)-(g?0:1)):1!=P.nodeType||"BR"==P.nodeName&&P.nextSibling?null:P;if(A)return flattenV(singleRect(A,1),!1)}if(null==p&&u<nodeSize(c)){for(var N=c.childNodes[u];N.pmViewDesc&&N.pmViewDesc.ignoreForCoords;)N=N.nextSibling;var R=N?3==N.nodeType?b(N,0,g?0:1):1==N.nodeType?N:null:null;if(R)return flattenV(singleRect(R,-1),!0)}return flattenV(singleRect(3==c.nodeType?b(c):c,-i),i>=0)}function flattenV(r,o){if(0==r.width)return r;var i=o?r.left:r.right;return{top:r.top,bottom:r.bottom,left:i,right:i}}function flattenH(r,o){if(0==r.height)return r;var i=o?r.top:r.bottom;return{top:i,bottom:i,left:r.left,right:r.right}}function withFlushedState(r,o,i){var a=r.state,c=r.root.activeElement;a!=o&&r.updateState(o),c!=r.dom&&r.focus();try{return i()}finally{a!=o&&r.updateState(a),c!=r.dom&&c&&c.focus()}}var X=/[\u0590-\u08ac]/;var Q=null,Z=null,ee=!1;function _endOfTextblock(r,o,i){return Q==o&&Z==i?ee:(Q=o,Z=i,ee="up"==i||"down"==i?function endOfTextblockVertical(r,o,i){var a=o.selection,c="up"==i?a.$from:a.$to;return withFlushedState(r,o,function(){for(var o=r.docView.domFromPos(c.pos,"up"==i?-1:1).node;;){var a=r.docView.nearestDesc(o,!0);if(!a)break;if(a.node.isBlock){o=a.contentDOM||a.dom;break}o=a.dom.parentNode}for(var u=_coordsAtPos(r,c.pos,1),p=o.firstChild;p;p=p.nextSibling){var g=void 0;if(1==p.nodeType)g=p.getClientRects();else{if(3!=p.nodeType)continue;g=b(p,0,p.nodeValue.length).getClientRects()}for(var v=0;v<g.length;v++){var k=g[v];if(k.bottom>k.top+1&&("up"==i?u.top-k.top>2*(k.bottom-u.top):k.bottom-u.bottom>2*(u.bottom-k.top)))return!1}}return!0})}(r,o,i):function endOfTextblockHorizontal(r,o,i){var a=o.selection.$head;if(!a.parent.isTextblock)return!1;var c=a.parentOffset,u=!c,p=c==a.parent.content.size,g=r.domSelection();return g?X.test(a.parent.textContent)&&g.modify?withFlushedState(r,o,function(){var o=r.domSelectionRange(),c=o.focusNode,u=o.focusOffset,p=o.anchorNode,v=o.anchorOffset,b=g.caretBidiLevel;g.modify("move",i,"character");var k=a.depth?r.docView.domAfterPos(a.before()):r.dom,E=r.domSelectionRange(),w=E.focusNode,x=E.focusOffset,C=w&&!k.contains(1==w.nodeType?w:w.parentNode)||c==w&&u==x;try{g.collapse(p,v),c&&(c!=p||u!=v)&&g.extend&&g.extend(c,u)}catch(r){}return null!=b&&(g.caretBidiLevel=b),C}):"left"==i||"backward"==i?u:p:a.pos==a.start()||a.pos==a.end()}(r,o,i))}var te=function(){function ViewDesc(r,o,i,a){_classCallCheck(this,ViewDesc),this.parent=r,this.children=o,this.dom=i,this.contentDOM=a,this.dirty=0,i.pmViewDesc=this}return _createClass(ViewDesc,[{key:"matchesWidget",value:function matchesWidget(r){return!1}},{key:"matchesMark",value:function matchesMark(r){return!1}},{key:"matchesNode",value:function matchesNode(r,o,i){return!1}},{key:"matchesHack",value:function matchesHack(r){return!1}},{key:"parseRule",value:function parseRule(){return null}},{key:"stopEvent",value:function stopEvent(r){return!1}},{key:"size",get:function get(){for(var r=0,o=0;o<this.children.length;o++)r+=this.children[o].size;return r}},{key:"border",get:function get(){return 0}},{key:"destroy",value:function destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(var r=0;r<this.children.length;r++)this.children[r].destroy()}},{key:"posBeforeChild",value:function posBeforeChild(r){for(var o=0,i=this.posAtStart;;o++){var a=this.children[o];if(a==r)return i;i+=a.size}}},{key:"posBefore",get:function get(){return this.parent.posBeforeChild(this)}},{key:"posAtStart",get:function get(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}},{key:"posAfter",get:function get(){return this.posBefore+this.size}},{key:"posAtEnd",get:function get(){return this.posAtStart+this.size-2*this.border}},{key:"localPosFromDOM",value:function localPosFromDOM(r,o,i){if(this.contentDOM&&this.contentDOM.contains(1==r.nodeType?r:r.parentNode)){if(i<0){var a,c;if(r==this.contentDOM)a=r.childNodes[o-1];else{for(;r.parentNode!=this.contentDOM;)r=r.parentNode;a=r.previousSibling}for(;a&&(!(c=a.pmViewDesc)||c.parent!=this);)a=a.previousSibling;return a?this.posBeforeChild(c)+c.size:this.posAtStart}var u,g;if(r==this.contentDOM)u=r.childNodes[o];else{for(;r.parentNode!=this.contentDOM;)r=r.parentNode;u=r.nextSibling}for(;u&&(!(g=u.pmViewDesc)||g.parent!=this);)u=u.nextSibling;return u?this.posBeforeChild(g):this.posAtEnd}var v;if(r==this.dom&&this.contentDOM)v=o>p(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))v=2&r.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==o)for(var b=r;;b=b.parentNode){if(b==this.dom){v=!1;break}if(b.previousSibling)break}if(null==v&&o==r.childNodes.length)for(var k=r;;k=k.parentNode){if(k==this.dom){v=!0;break}if(k.nextSibling)break}}return(null==v?i>0:v)?this.posAtEnd:this.posAtStart}},{key:"nearestDesc",value:function nearestDesc(r){for(var o=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=!0,a=r;a;a=a.parentNode){var c=this.getDesc(a),u=void 0;if(c&&(!o||c.node)){if(!i||!(u=c.nodeDOM)||(1==u.nodeType?u.contains(1==r.nodeType?r:r.parentNode):u==r))return c;i=!1}}}},{key:"getDesc",value:function getDesc(r){for(var o=r.pmViewDesc,i=o;i;i=i.parent)if(i==this)return o}},{key:"posFromDOM",value:function posFromDOM(r,o,i){for(var a=r;a;a=a.parentNode){var c=this.getDesc(a);if(c)return c.localPosFromDOM(r,o,i)}return-1}},{key:"descAt",value:function descAt(r){for(var o=0,i=0;o<this.children.length;o++){var a=this.children[o],c=i+a.size;if(i==r&&c!=i){for(;!a.border&&a.children.length;)for(var u=0;u<a.children.length;u++){var p=a.children[u];if(p.size){a=p;break}}return a}if(r<c)return a.descAt(r-i-a.border);i=c}}},{key:"domFromPos",value:function domFromPos(r,o){if(!this.contentDOM)return{node:this.dom,offset:0,atom:r+1};for(var i,a=0,c=0,u=0;a<this.children.length;a++){var g=this.children[a],v=u+g.size;if(v>r||g instanceof se){c=r-u;break}u=v}if(c)return this.children[a].domFromPos(c-this.children[a].border,o);for(;a&&!(i=this.children[a-1]).size&&i instanceof ne&&i.side>=0;a--);if(o<=0){for(var b,k=!0;(b=a?this.children[a-1]:null)&&b.dom.parentNode!=this.contentDOM;a--,k=!1);return b&&o&&k&&!b.border&&!b.domAtom?b.domFromPos(b.size,o):{node:this.contentDOM,offset:b?p(b.dom)+1:0}}for(var E,w=!0;(E=a<this.children.length?this.children[a]:null)&&E.dom.parentNode!=this.contentDOM;a++,w=!1);return E&&w&&!E.border&&!E.domAtom?E.domFromPos(0,o):{node:this.contentDOM,offset:E?p(E.dom):this.contentDOM.childNodes.length}}},{key:"parseRange",value:function parseRange(r,o){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(0==this.children.length)return{node:this.contentDOM,from:r,to:o,fromOffset:0,toOffset:this.contentDOM.childNodes.length};for(var a=-1,c=-1,u=i,g=0;;g++){var v=this.children[g],b=u+v.size;if(-1==a&&r<=b){var k=u+v.border;if(r>=k&&o<=b-v.border&&v.node&&v.contentDOM&&this.contentDOM.contains(v.contentDOM))return v.parseRange(r,o,k);r=u;for(var E=g;E>0;E--){var w=this.children[E-1];if(w.size&&w.dom.parentNode==this.contentDOM&&!w.emptyChildAt(1)){a=p(w.dom)+1;break}r-=w.size}-1==a&&(a=0)}if(a>-1&&(b>o||g==this.children.length-1)){o=b;for(var x=g+1;x<this.children.length;x++){var C=this.children[x];if(C.size&&C.dom.parentNode==this.contentDOM&&!C.emptyChildAt(-1)){c=p(C.dom);break}o+=C.size}-1==c&&(c=this.contentDOM.childNodes.length);break}u=b}return{node:this.contentDOM,from:r,to:o,fromOffset:a,toOffset:c}}},{key:"emptyChildAt",value:function emptyChildAt(r){if(this.border||!this.contentDOM||!this.children.length)return!1;var o=this.children[r<0?0:this.children.length-1];return 0==o.size||o.emptyChildAt(r)}},{key:"domAfterPos",value:function domAfterPos(r){var o=this.domFromPos(r,0),i=o.node,a=o.offset;if(1!=i.nodeType||a==i.childNodes.length)throw new RangeError("No node after pos "+r);return i.childNodes[a]}},{key:"setSelection",value:function setSelection(r,o,i){for(var a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],c=Math.min(r,o),u=Math.max(r,o),g=0,v=0;g<this.children.length;g++){var b=this.children[g],E=v+b.size;if(c>v&&u<E)return b.setSelection(r-v-b.border,o-v-b.border,i,a);v=E}var w=this.domFromPos(r,r?-1:1),x=o==r?w:this.domFromPos(o,o?-1:1),C=i.root.getSelection(),_=i.domSelectionRange(),T=!1;if((I||B)&&r==o){var P=w,A=P.node,N=P.offset;if(3==A.nodeType){if((T=!(!N||"\n"!=A.nodeValue[N-1]))&&N==A.nodeValue.length)for(var R,L=A;L;L=L.parentNode){if(R=L.nextSibling){"BR"==R.nodeName&&(w=x={node:R.parentNode,offset:p(R)+1});break}var z=L.pmViewDesc;if(z&&z.node&&z.node.isBlock)break}}else{var j=A.childNodes[N-1];T=j&&("BR"==j.nodeName||"false"==j.contentEditable)}}if(I&&_.focusNode&&_.focusNode!=x.node&&1==_.focusNode.nodeType){var V=_.focusNode.childNodes[_.focusOffset];V&&"false"==V.contentEditable&&(a=!0)}if(a||T&&B||!k(w.node,w.offset,_.anchorNode,_.anchorOffset)||!k(x.node,x.offset,_.focusNode,_.focusOffset)){var U=!1;if((C.extend||r==o)&&(!T||!I)){C.collapse(w.node,w.offset);try{r!=o&&C.extend(x.node,x.offset),U=!0}catch(r){}}if(!U){if(r>o){var H=w;w=x,x=H}var W=document.createRange();W.setEnd(x.node,x.offset),W.setStart(w.node,w.offset),C.removeAllRanges(),C.addRange(W)}}}},{key:"ignoreMutation",value:function ignoreMutation(r){return!this.contentDOM&&"selection"!=r.type}},{key:"contentLost",get:function get(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}},{key:"markDirty",value:function markDirty(r,o){for(var i=0,a=0;a<this.children.length;a++){var c=this.children[a],u=i+c.size;if(i==u?r<=u&&o>=i:r<u&&o>i){var p=i+c.border,g=u-c.border;if(r>=p&&o<=g)return this.dirty=r==i||o==u?2:1,void(r!=p||o!=g||!c.contentLost&&c.dom.parentNode==this.contentDOM?c.markDirty(r-p,o-p):c.dirty=3);c.dirty=c.dom!=c.contentDOM||c.dom.parentNode!=this.contentDOM||c.children.length?3:2}i=u}this.dirty=2}},{key:"markParentsDirty",value:function markParentsDirty(){for(var r=1,o=this.parent;o;o=o.parent,r++){var i=1==r?2:1;o.dirty<i&&(o.dirty=i)}}},{key:"domAtom",get:function get(){return!1}},{key:"ignoreForCoords",get:function get(){return!1}},{key:"ignoreForSelection",get:function get(){return!1}},{key:"isText",value:function isText(r){return!1}}]),ViewDesc}(),ne=function(r){_inherits(WidgetViewDesc,r);var o=_createSuper(WidgetViewDesc);function WidgetViewDesc(r,i,a,c){var u;_classCallCheck(this,WidgetViewDesc);var p,g=i.type.toDOM;if("function"==typeof g&&(g=g(a,function(){return p?p.parent?p.parent.posBeforeChild(p):void 0:c})),!i.type.spec.raw){if(1!=g.nodeType){var v=document.createElement("span");v.appendChild(g),g=v}g.contentEditable="false",g.classList.add("ProseMirror-widget")}return(u=o.call(this,r,[],g,null)).widget=i,u.widget=i,p=_assertThisInitialized(u),u}return _createClass(WidgetViewDesc,[{key:"matchesWidget",value:function matchesWidget(r){return 0==this.dirty&&r.type.eq(this.widget.type)}},{key:"parseRule",value:function parseRule(){return{ignore:!0}}},{key:"stopEvent",value:function stopEvent(r){var o=this.widget.spec.stopEvent;return!!o&&o(r)}},{key:"ignoreMutation",value:function ignoreMutation(r){return"selection"!=r.type||this.widget.spec.ignoreSelection}},{key:"destroy",value:function destroy(){this.widget.type.destroy(this.dom),_get(_getPrototypeOf(WidgetViewDesc.prototype),"destroy",this).call(this)}},{key:"domAtom",get:function get(){return!0}},{key:"ignoreForSelection",get:function get(){return!!this.widget.type.spec.relaxedSide}},{key:"side",get:function get(){return this.widget.type.side}}]),WidgetViewDesc}(te),re=function(r){_inherits(CompositionViewDesc,r);var o=_createSuper(CompositionViewDesc);function CompositionViewDesc(r,i,a,c){var u;return _classCallCheck(this,CompositionViewDesc),(u=o.call(this,r,[],i,null)).textDOM=a,u.text=c,u}return _createClass(CompositionViewDesc,[{key:"size",get:function get(){return this.text.length}},{key:"localPosFromDOM",value:function localPosFromDOM(r,o){return r!=this.textDOM?this.posAtStart+(o?this.size:0):this.posAtStart+o}},{key:"domFromPos",value:function domFromPos(r){return{node:this.textDOM,offset:r}}},{key:"ignoreMutation",value:function ignoreMutation(r){return"characterData"===r.type&&r.target.nodeValue==r.oldValue}}]),CompositionViewDesc}(te),oe=function(r){_inherits(MarkViewDesc,r);var o=_createSuper(MarkViewDesc);function MarkViewDesc(r,i,a,c,u){var p;return _classCallCheck(this,MarkViewDesc),(p=o.call(this,r,[],a,c)).mark=i,p.spec=u,p}return _createClass(MarkViewDesc,[{key:"parseRule",value:function parseRule(){return 3&this.dirty||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}},{key:"matchesMark",value:function matchesMark(r){return 3!=this.dirty&&this.mark.eq(r)}},{key:"markDirty",value:function markDirty(r,o){if(_get(_getPrototypeOf(MarkViewDesc.prototype),"markDirty",this).call(this,r,o),0!=this.dirty){for(var i=this.parent;!i.node;)i=i.parent;i.dirty<this.dirty&&(i.dirty=this.dirty),this.dirty=0}}},{key:"slice",value:function slice(r,o,i){var a=MarkViewDesc.create(this.parent,this.mark,!0,i),c=this.children,u=this.size;o<u&&(c=replaceNodes(c,o,u,i)),r>0&&(c=replaceNodes(c,0,r,i));for(var p=0;p<c.length;p++)c[p].parent=a;return a.children=c,a}},{key:"ignoreMutation",value:function ignoreMutation(r){return this.spec.ignoreMutation?this.spec.ignoreMutation(r):_get(_getPrototypeOf(MarkViewDesc.prototype),"ignoreMutation",this).call(this,r)}},{key:"destroy",value:function destroy(){this.spec.destroy&&this.spec.destroy(),_get(_getPrototypeOf(MarkViewDesc.prototype),"destroy",this).call(this)}}],[{key:"create",value:function create(r,o,i,a){var u=a.nodeViews[o.type.name],p=u&&u(o,a,i);return p&&p.dom||(p=c.DOMSerializer.renderSpec(document,o.type.spec.toDOM(o,i),null,o.attrs)),new MarkViewDesc(r,o,p.dom,p.contentDOM||p.dom,p)}}]),MarkViewDesc}(te),ie=function(r){_inherits(NodeViewDesc,r);var o=_createSuper(NodeViewDesc);function NodeViewDesc(r,i,a,c,u,p,g,v,b){var k;return _classCallCheck(this,NodeViewDesc),(k=o.call(this,r,[],u,p)).node=i,k.outerDeco=a,k.innerDeco=c,k.nodeDOM=g,k}return _createClass(NodeViewDesc,[{key:"parseRule",value:function parseRule(){var r=this;if(this.node.type.spec.reparseInView)return null;var o={node:this.node.type.name,attrs:this.node.attrs};if("pre"==this.node.type.whitespace&&(o.preserveWhitespace="full"),this.contentDOM)if(this.contentLost){for(var i=this.children.length-1;i>=0;i--){var a=this.children[i];if(this.dom.contains(a.dom.parentNode)){o.contentElement=a.dom.parentNode;break}}o.contentElement||(o.getContent=function(){return c.Fragment.empty})}else o.contentElement=this.contentDOM;else o.getContent=function(){return r.node.content};return o}},{key:"matchesNode",value:function matchesNode(r,o,i){return 0==this.dirty&&r.eq(this.node)&&sameOuterDeco(o,this.outerDeco)&&i.eq(this.innerDeco)}},{key:"size",get:function get(){return this.node.nodeSize}},{key:"border",get:function get(){return this.node.isLeaf?0:1}},{key:"updateChildren",value:function updateChildren(r,o){var i=this,a=this.node.inlineContent,u=o,p=r.composing?this.localCompositionInfo(r,o):null,g=p&&p.pos>-1?p:null,v=p&&p.pos<0,b=new pe(this,g&&g.node,r);!function iterDeco(r,o,i,a){var c=o.locals(r),u=0;if(0==c.length){for(var p=0;p<r.childCount;p++){var g=r.child(p);a(g,c,o.forChild(u,g),p),u+=g.nodeSize}return}for(var v=0,b=[],k=null,E=0;;){for(var w=void 0,x=void 0;v<c.length&&c[v].to==u;){var C=c[v++];C.widget&&(w?(x||(x=[w])).push(C):w=C)}if(w)if(x){x.sort(compareSide);for(var _=0;_<x.length;_++)i(x[_],E,!!k)}else i(w,E,!!k);var T=void 0,P=void 0;if(k)P=-1,T=k,k=null;else{if(!(E<r.childCount))break;P=E,T=r.child(E++)}for(var A=0;A<b.length;A++)b[A].to<=u&&b.splice(A--,1);for(;v<c.length&&c[v].from<=u&&c[v].to>u;)b.push(c[v++]);var N=u+T.nodeSize;if(T.isText){var R=N;v<c.length&&c[v].from<R&&(R=c[v].from);for(var I=0;I<b.length;I++)b[I].to<R&&(R=b[I].to);R<N&&(k=T.cut(R-u),T=T.cut(0,R-u),N=R,P=-1)}else for(;v<c.length&&c[v].to<N;)v++;a(T,T.isInline&&!T.isLeaf?b.filter(function(r){return!r.inline}):b.slice(),o.forChild(u,T),P),u=N}}(this.node,this.innerDeco,function(o,p,g){o.spec.marks?b.syncToMarks(o.spec.marks,a,r,p):o.type.side>=0&&!g&&b.syncToMarks(p==i.node.childCount?c.Mark.none:i.node.child(p).marks,a,r,p),b.placeWidget(o,r,u)},function(o,i,c,g){var k;b.syncToMarks(o.marks,a,r,g),b.findNodeMatch(o,i,c,g)||v&&r.state.selection.from>u&&r.state.selection.to<u+o.nodeSize&&(k=b.findIndexWithChild(p.node))>-1&&b.updateNodeAt(o,i,c,k,r)||b.updateNextNode(o,i,c,r,g,u)||b.addNode(o,i,c,r,u),u+=o.nodeSize}),b.syncToMarks([],a,r,0),this.node.isTextblock&&b.addTextblockHacks(),b.destroyRest(),(b.changed||2==this.dirty)&&(g&&this.protectLocalComposition(r,g),renderDescs(this.contentDOM,this.children,r),V&&function iosHacks(r){if("UL"==r.nodeName||"OL"==r.nodeName){var o=r.style.cssText;r.style.cssText=o+"; list-style: square !important",window.getComputedStyle(r).listStyle,r.style.cssText=o}}(this.dom))}},{key:"localCompositionInfo",value:function localCompositionInfo(r,o){var i=r.state.selection,c=i.from,u=i.to;if(!(r.state.selection instanceof a.TextSelection)||c<o||u>o+this.node.content.size)return null;var p=r.input.compositionNode;if(!p||!this.dom.contains(p.parentNode))return null;if(this.node.inlineContent){var g=p.nodeValue,v=function findTextInFragment(r,o,i,a){for(var c=0,u=0;c<r.childCount&&u<=a;){var p=r.child(c++),g=u;if(u+=p.nodeSize,p.isText){for(var v=p.text;c<r.childCount;){var b=r.child(c++);if(u+=b.nodeSize,!b.isText)break;v+=b.text}if(u>=i){if(u>=a&&v.slice(a-o.length-g,a-g)==o)return a-o.length;var k=g<a?v.lastIndexOf(o,a-g-1):-1;if(k>=0&&k+o.length+g>=i)return g+k;if(i==a&&v.length>=a+o.length-g&&v.slice(a-g,a-g+o.length)==o)return a}}}return-1}(this.node.content,g,c-o,u-o);return v<0?null:{node:p,pos:v,text:g}}return{node:p,pos:-1,text:""}}},{key:"protectLocalComposition",value:function protectLocalComposition(r,o){var i=o.node,a=o.pos,c=o.text;if(!this.getDesc(i)){for(var u=i;u.parentNode!=this.contentDOM;u=u.parentNode){for(;u.previousSibling;)u.parentNode.removeChild(u.previousSibling);for(;u.nextSibling;)u.parentNode.removeChild(u.nextSibling);u.pmViewDesc&&(u.pmViewDesc=void 0)}var p=new re(this,u,i,c);r.input.compositionNodes.push(p),this.children=replaceNodes(this.children,a,a+c.length,r,p)}}},{key:"update",value:function update(r,o,i,a){return!(3==this.dirty||!r.sameMarkup(this.node))&&(this.updateInner(r,o,i,a),!0)}},{key:"updateInner",value:function updateInner(r,o,i,a){this.updateOuterDeco(o),this.node=r,this.innerDeco=i,this.contentDOM&&this.updateChildren(a,this.posAtStart),this.dirty=0}},{key:"updateOuterDeco",value:function updateOuterDeco(r){if(!sameOuterDeco(r,this.outerDeco)){var o=1!=this.nodeDOM.nodeType,i=this.dom;this.dom=patchOuterDeco(this.dom,this.nodeDOM,computeOuterDeco(this.outerDeco,this.node,o),computeOuterDeco(r,this.node,o)),this.dom!=i&&(i.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=r}}},{key:"selectNode",value:function selectNode(){1==this.nodeDOM.nodeType&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.nodeDOM.draggable=!0))}},{key:"deselectNode",value:function deselectNode(){1==this.nodeDOM.nodeType&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||this.nodeDOM.removeAttribute("draggable"))}},{key:"domAtom",get:function get(){return this.node.isAtom}}],[{key:"create",value:function create(r,o,i,a,u,p){var g,v=u.nodeViews[o.type.name],b=v&&v(o,u,function(){return g?g.parent?g.parent.posBeforeChild(g):void 0:p},i,a),k=b&&b.dom,E=b&&b.contentDOM;if(o.isText)if(k){if(3!=k.nodeType)throw new RangeError("Text must be rendered as a DOM text node")}else k=document.createTextNode(o.text);else if(!k){var w=c.DOMSerializer.renderSpec(document,o.type.spec.toDOM(o),null,o.attrs);k=w.dom,E=w.contentDOM}E||o.isText||"BR"==k.nodeName||(k.hasAttribute("contenteditable")||(k.contentEditable="false"),o.type.spec.draggable&&(k.draggable=!0));var x=k;return k=applyOuterDeco(k,i,o),b?g=new le(r,o,i,a,k,E||null,x,b,u,p+1):o.isText?new ae(r,o,i,a,k,x,u):new NodeViewDesc(r,o,i,a,k,E||null,x,u,p+1)}}]),NodeViewDesc}(te);function docViewDesc(r,o,i,a,c){applyOuterDeco(a,o,r);var u=new ie(void 0,r,o,i,a,a,a,c,0);return u.contentDOM&&u.updateChildren(c,0),u}var ae=function(r){_inherits(TextViewDesc,r);var o=_createSuper(TextViewDesc);function TextViewDesc(r,i,a,c,u,p,g){return _classCallCheck(this,TextViewDesc),o.call(this,r,i,a,c,u,null,p,g,0)}return _createClass(TextViewDesc,[{key:"parseRule",value:function parseRule(){for(var r=this.nodeDOM.parentNode;r&&r!=this.dom&&!r.pmIsDeco;)r=r.parentNode;return{skip:r||!0}}},{key:"update",value:function update(r,o,i,a){return!(3==this.dirty||0!=this.dirty&&!this.inParent()||!r.sameMarkup(this.node))&&(this.updateOuterDeco(o),0==this.dirty&&r.text==this.node.text||r.text==this.nodeDOM.nodeValue||(this.nodeDOM.nodeValue=r.text,a.trackWrites==this.nodeDOM&&(a.trackWrites=null)),this.node=r,this.dirty=0,!0)}},{key:"inParent",value:function inParent(){for(var r=this.parent.contentDOM,o=this.nodeDOM;o;o=o.parentNode)if(o==r)return!0;return!1}},{key:"domFromPos",value:function domFromPos(r){return{node:this.nodeDOM,offset:r}}},{key:"localPosFromDOM",value:function localPosFromDOM(r,o,i){return r==this.nodeDOM?this.posAtStart+Math.min(o,this.node.text.length):_get(_getPrototypeOf(TextViewDesc.prototype),"localPosFromDOM",this).call(this,r,o,i)}},{key:"ignoreMutation",value:function ignoreMutation(r){return"characterData"!=r.type&&"selection"!=r.type}},{key:"slice",value:function slice(r,o,i){var a=this.node.cut(r,o),c=document.createTextNode(a.text);return new TextViewDesc(this.parent,a,this.outerDeco,this.innerDeco,c,c,i)}},{key:"markDirty",value:function markDirty(r,o){_get(_getPrototypeOf(TextViewDesc.prototype),"markDirty",this).call(this,r,o),this.dom==this.nodeDOM||0!=r&&o!=this.nodeDOM.nodeValue.length||(this.dirty=3)}},{key:"domAtom",get:function get(){return!1}},{key:"isText",value:function isText(r){return this.node.text==r}}]),TextViewDesc}(ie),se=function(r){_inherits(TrailingHackViewDesc,r);var o=_createSuper(TrailingHackViewDesc);function TrailingHackViewDesc(){return _classCallCheck(this,TrailingHackViewDesc),o.apply(this,arguments)}return _createClass(TrailingHackViewDesc,[{key:"parseRule",value:function parseRule(){return{ignore:!0}}},{key:"matchesHack",value:function matchesHack(r){return 0==this.dirty&&this.dom.nodeName==r}},{key:"domAtom",get:function get(){return!0}},{key:"ignoreForCoords",get:function get(){return"IMG"==this.dom.nodeName}}]),TrailingHackViewDesc}(te),le=function(r){_inherits(CustomNodeViewDesc,r);var o=_createSuper(CustomNodeViewDesc);function CustomNodeViewDesc(r,i,a,c,u,p,g,v,b,k){var E;return _classCallCheck(this,CustomNodeViewDesc),(E=o.call(this,r,i,a,c,u,p,g,b,k)).spec=v,E}return _createClass(CustomNodeViewDesc,[{key:"update",value:function update(r,o,i,a){if(3==this.dirty)return!1;if(this.spec.update&&(this.node.type==r.type||this.spec.multiType)){var c=this.spec.update(r,o,i);return c&&this.updateInner(r,o,i,a),c}return!(!this.contentDOM&&!r.isLeaf)&&_get(_getPrototypeOf(CustomNodeViewDesc.prototype),"update",this).call(this,r,o,i,a)}},{key:"selectNode",value:function selectNode(){this.spec.selectNode?this.spec.selectNode():_get(_getPrototypeOf(CustomNodeViewDesc.prototype),"selectNode",this).call(this)}},{key:"deselectNode",value:function deselectNode(){this.spec.deselectNode?this.spec.deselectNode():_get(_getPrototypeOf(CustomNodeViewDesc.prototype),"deselectNode",this).call(this)}},{key:"setSelection",value:function setSelection(r,o,i,a){this.spec.setSelection?this.spec.setSelection(r,o,i.root):_get(_getPrototypeOf(CustomNodeViewDesc.prototype),"setSelection",this).call(this,r,o,i,a)}},{key:"destroy",value:function destroy(){this.spec.destroy&&this.spec.destroy(),_get(_getPrototypeOf(CustomNodeViewDesc.prototype),"destroy",this).call(this)}},{key:"stopEvent",value:function stopEvent(r){return!!this.spec.stopEvent&&this.spec.stopEvent(r)}},{key:"ignoreMutation",value:function ignoreMutation(r){return this.spec.ignoreMutation?this.spec.ignoreMutation(r):_get(_getPrototypeOf(CustomNodeViewDesc.prototype),"ignoreMutation",this).call(this,r)}}]),CustomNodeViewDesc}(ie);function renderDescs(r,o,i){for(var a=r.firstChild,c=!1,u=0;u<o.length;u++){var p=o[u],g=p.dom;if(g.parentNode==r){for(;g!=a;)a=rm(a),c=!0;a=a.nextSibling}else c=!0,r.insertBefore(g,a);if(p instanceof oe){var v=a?a.previousSibling:r.lastChild;renderDescs(p.contentDOM,p.children,i),a=v?v.nextSibling:r.firstChild}}for(;a;)a=rm(a),c=!0;c&&i.trackWrites==r&&(i.trackWrites=null)}var ce=function OuterDecoLevel(r){r&&(this.nodeName=r)};ce.prototype=Object.create(null);var ue=[new ce];function computeOuterDeco(r,o,i){if(0==r.length)return ue;for(var a=i?ue[0]:new ce,c=[a],u=0;u<r.length;u++){var p=r[u].type.attrs;if(p)for(var g in p.nodeName&&c.push(a=new ce(p.nodeName)),p){var v=p[g];null!=v&&(i&&1==c.length&&c.push(a=new ce(o.isInline?"span":"div")),"class"==g?a.class=(a.class?a.class+" ":"")+v:"style"==g?a.style=(a.style?a.style+";":"")+v:"nodeName"!=g&&(a[g]=v))}}return c}function patchOuterDeco(r,o,i,a){if(i==ue&&a==ue)return o;for(var c=o,u=0;u<a.length;u++){var p=a[u],g=i[u];if(u){var v=void 0;g&&g.nodeName==p.nodeName&&c!=r&&(v=c.parentNode)&&v.nodeName.toLowerCase()==p.nodeName||((v=document.createElement(p.nodeName)).pmIsDeco=!0,v.appendChild(c),g=ue[0]),c=v}patchAttributes(c,g||ue[0],p)}return c}function patchAttributes(r,o,i){for(var a in o)"class"==a||"style"==a||"nodeName"==a||a in i||r.removeAttribute(a);for(var c in i)"class"!=c&&"style"!=c&&"nodeName"!=c&&i[c]!=o[c]&&r.setAttribute(c,i[c]);if(o.class!=i.class){for(var u=o.class?o.class.split(" ").filter(Boolean):[],p=i.class?i.class.split(" ").filter(Boolean):[],g=0;g<u.length;g++)-1==p.indexOf(u[g])&&r.classList.remove(u[g]);for(var v=0;v<p.length;v++)-1==u.indexOf(p[v])&&r.classList.add(p[v]);0==r.classList.length&&r.removeAttribute("class")}if(o.style!=i.style){if(o.style)for(var b,k=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g;b=k.exec(o.style);)r.style.removeProperty(b[1]);i.style&&(r.style.cssText+=i.style)}}function applyOuterDeco(r,o,i){return patchOuterDeco(r,r,ue,computeOuterDeco(o,i,1!=r.nodeType))}function sameOuterDeco(r,o){if(r.length!=o.length)return!1;for(var i=0;i<r.length;i++)if(!r[i].type.eq(o[i].type))return!1;return!0}function rm(r){var o=r.nextSibling;return r.parentNode.removeChild(r),o}var pe=function(){function ViewTreeUpdater(r,o,i){_classCallCheck(this,ViewTreeUpdater),this.lock=o,this.view=i,this.index=0,this.stack=[],this.changed=!1,this.top=r,this.preMatch=function preMatch(r,o){var i=o,a=i.children.length,c=r.childCount,u=new Map,p=[];e:for(;c>0;){for(var g=void 0;;)if(a){var v=i.children[a-1];if(!(v instanceof oe)){g=v,a--;break}i=v,a=v.children.length}else{if(i==o)break e;a=i.parent.children.indexOf(i),i=i.parent}var b=g.node;if(b){if(b!=r.child(c-1))break;--c,u.set(g,c),p.push(g)}}return{index:c,matched:u,matches:p.reverse()}}(r.node.content,r)}return _createClass(ViewTreeUpdater,[{key:"destroyBetween",value:function destroyBetween(r,o){if(r!=o){for(var i=r;i<o;i++)this.top.children[i].destroy();this.top.children.splice(r,o-r),this.changed=!0}}},{key:"destroyRest",value:function destroyRest(){this.destroyBetween(this.index,this.top.children.length)}},{key:"syncToMarks",value:function syncToMarks(r,o,i,a){for(var c=0,u=this.stack.length>>1,p=Math.min(u,r.length);c<p&&(c==u-1?this.top:this.stack[c+1<<1]).matchesMark(r[c])&&!1!==r[c].type.spec.spanning;)c++;for(;c<u;)this.destroyRest(),this.top.dirty=0,this.index=this.stack.pop(),this.top=this.stack.pop(),u--;for(;u<r.length;){this.stack.push(this.top,this.index+1);var g=-1,v=this.top.children.length;a<this.preMatch.index&&(v=Math.min(this.index+3,v));for(var b=this.index;b<v;b++){var k=this.top.children[b];if(k.matchesMark(r[u])&&!this.isLocked(k.dom)){g=b;break}}if(g>-1)g>this.index&&(this.changed=!0,this.destroyBetween(this.index,g)),this.top=this.top.children[this.index];else{var E=oe.create(this.top,r[u],o,i);this.top.children.splice(this.index,0,E),this.top=E,this.changed=!0}this.index=0,u++}}},{key:"findNodeMatch",value:function findNodeMatch(r,o,i,a){var c,u=-1;if(a>=this.preMatch.index&&(c=this.preMatch.matches[a-this.preMatch.index]).parent==this.top&&c.matchesNode(r,o,i))u=this.top.children.indexOf(c,this.index);else for(var p=this.index,g=Math.min(this.top.children.length,p+5);p<g;p++){var v=this.top.children[p];if(v.matchesNode(r,o,i)&&!this.preMatch.matched.has(v)){u=p;break}}return!(u<0)&&(this.destroyBetween(this.index,u),this.index++,!0)}},{key:"updateNodeAt",value:function updateNodeAt(r,o,i,a,c){var u=this.top.children[a];return 3==u.dirty&&u.dom==u.contentDOM&&(u.dirty=2),!!u.update(r,o,i,c)&&(this.destroyBetween(this.index,a),this.index++,!0)}},{key:"findIndexWithChild",value:function findIndexWithChild(r){for(;;){var o=r.parentNode;if(!o)return-1;if(o==this.top.contentDOM){var i=r.pmViewDesc;if(i)for(var a=this.index;a<this.top.children.length;a++)if(this.top.children[a]==i)return a;return-1}r=o}}},{key:"updateNextNode",value:function updateNextNode(r,o,i,a,c,u){for(var p=this.index;p<this.top.children.length;p++){var g=this.top.children[p];if(g instanceof ie){var v=this.preMatch.matched.get(g);if(null!=v&&v!=c)return!1;var b=g.dom,k=void 0,E=this.isLocked(b)&&!(r.isText&&g.node&&g.node.isText&&g.nodeDOM.nodeValue==r.text&&3!=g.dirty&&sameOuterDeco(o,g.outerDeco));if(!E&&g.update(r,o,i,a))return this.destroyBetween(this.index,p),g.dom!=b&&(this.changed=!0),this.index++,!0;if(!E&&(k=this.recreateWrapper(g,r,o,i,a,u)))return this.destroyBetween(this.index,p),this.top.children[this.index]=k,k.contentDOM&&(k.dirty=2,k.updateChildren(a,u+1),k.dirty=0),this.changed=!0,this.index++,!0;break}}return!1}},{key:"recreateWrapper",value:function recreateWrapper(r,o,i,a,c,u){if(r.dirty||o.isAtom||!r.children.length||!r.node.content.eq(o.content)||!sameOuterDeco(i,r.outerDeco)||!a.eq(r.innerDeco))return null;var p=ie.create(this.top,o,i,a,c,u);if(p.contentDOM){p.children=r.children,r.children=[];var g,v=_createForOfIteratorHelper(p.children);try{for(v.s();!(g=v.n()).done;){g.value.parent=p}}catch(r){v.e(r)}finally{v.f()}}return r.destroy(),p}},{key:"addNode",value:function addNode(r,o,i,a,c){var u=ie.create(this.top,r,o,i,a,c);u.contentDOM&&u.updateChildren(a,c+1),this.top.children.splice(this.index++,0,u),this.changed=!0}},{key:"placeWidget",value:function placeWidget(r,o,i){var a=this.index<this.top.children.length?this.top.children[this.index]:null;if(!a||!a.matchesWidget(r)||r!=a.widget&&a.widget.type.toDOM.parentNode){var c=new ne(this.top,r,o,i);this.top.children.splice(this.index++,0,c),this.changed=!0}else this.index++}},{key:"addTextblockHacks",value:function addTextblockHacks(){for(var r=this.top.children[this.index-1],o=this.top;r instanceof oe;)r=(o=r).children[o.children.length-1];(!r||!(r instanceof ae)||/\n$/.test(r.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(r.node.text))&&((B||z)&&r&&"false"==r.dom.contentEditable&&this.addHackNode("IMG",o),this.addHackNode("BR",this.top))}},{key:"addHackNode",value:function addHackNode(r,o){if(o==this.top&&this.index<o.children.length&&o.children[this.index].matchesHack(r))this.index++;else{var i=document.createElement(r);"IMG"==r&&(i.className="ProseMirror-separator",i.alt=""),"BR"==r&&(i.className="ProseMirror-trailingBreak");var a=new se(this.top,[],i,null);o!=this.top?o.children.push(a):o.children.splice(this.index++,0,a),this.changed=!0}}},{key:"isLocked",value:function isLocked(r){return this.lock&&(r==this.lock||1==r.nodeType&&r.contains(this.lock.parentNode))}}]),ViewTreeUpdater}();function compareSide(r,o){return r.type.side-o.type.side}function replaceNodes(r,o,i,a,c){for(var u=[],p=0,g=0;p<r.length;p++){var v=r[p],b=g,k=g+=v.size;b>=i||k<=o?u.push(v):(b<o&&u.push(v.slice(0,o-b,a)),c&&(u.push(c),c=void 0),k>i&&u.push(v.slice(i-b,v.size,a)))}return u}function selectionFromDOM(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=r.domSelectionRange(),c=r.state.doc;if(!i.focusNode)return null;var u=r.docView.nearestDesc(i.focusNode),g=u&&0==u.size,v=r.docView.posFromDOM(i.focusNode,i.focusOffset,1);if(v<0)return null;var b,k,E=c.resolve(v);if(w(i)){for(b=v;u&&!u.node;)u=u.parent;var x=u.node;if(u&&x.isAtom&&a.NodeSelection.isSelectable(x)&&u.parent&&(!x.isInline||!function isOnEdge(r,o,i){for(var a=0==o,c=o==nodeSize(r);a||c;){if(r==i)return!0;var u=p(r);if(!(r=r.parentNode))return!1;a=a&&0==u,c=c&&u==nodeSize(r)}}(i.focusNode,i.focusOffset,u.dom))){var C=u.posBefore;k=new a.NodeSelection(v==C?E:c.resolve(C))}}else{if(i instanceof r.dom.ownerDocument.defaultView.Selection&&i.rangeCount>1){for(var _=v,T=v,P=0;P<i.rangeCount;P++){var A=i.getRangeAt(P);_=Math.min(_,r.docView.posFromDOM(A.startContainer,A.startOffset,1)),T=Math.max(T,r.docView.posFromDOM(A.endContainer,A.endOffset,-1))}if(_<0)return null;var N=_slicedToArray(T==r.state.selection.anchor?[T,_]:[_,T],2);b=N[0],v=N[1],E=c.resolve(v)}else b=r.docView.posFromDOM(i.anchorNode,i.anchorOffset,1);if(b<0)return null}var R=c.resolve(b);k||(k=selectionBetween(r,R,E,"pointer"==o||r.state.selection.head<E.pos&&!g?1:-1));return k}function editorOwnsSelection(r){return r.editable?r.hasFocus():hasSelection(r)&&document.activeElement&&document.activeElement.contains(r.dom)}function selectionToDOM(r){var o=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=r.state.selection;if(syncNodeSelection(r,i),editorOwnsSelection(r)){if(!o&&r.input.mouseDown&&r.input.mouseDown.allowDefault&&z){var c=r.domSelectionRange(),u=r.domObserver.currentSelection;if(c.anchorNode&&u.anchorNode&&k(c.anchorNode,c.anchorOffset,u.anchorNode,u.anchorOffset))return r.input.mouseDown.delayedSelectionSync=!0,void r.domObserver.setCurSelection()}if(r.domObserver.disconnectSelection(),r.cursorWrapper)!function selectCursorWrapper(r){var o=r.domSelection();if(!o)return;var i=r.cursorWrapper.dom,a="IMG"==i.nodeName;a?o.collapse(i.parentNode,p(i)+1):o.collapse(i,0);!a&&!r.state.selection.visible&&N&&R<=11&&(i.disabled=!0,i.disabled=!1)}(r);else{var g,v,b=i.anchor,E=i.head;!de||i instanceof a.TextSelection||(i.$from.parent.inlineContent||(g=temporarilyEditableNear(r,i.from)),i.empty||i.$from.parent.inlineContent||(v=temporarilyEditableNear(r,i.to))),r.docView.setSelection(b,E,r,o),de&&(g&&resetEditable(g),v&&resetEditable(v)),i.visible?r.dom.classList.remove("ProseMirror-hideselection"):(r.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&function removeClassOnSelectionChange(r){var o=r.dom.ownerDocument;o.removeEventListener("selectionchange",r.input.hideSelectionGuard);var i=r.domSelectionRange(),a=i.anchorNode,c=i.anchorOffset;o.addEventListener("selectionchange",r.input.hideSelectionGuard=function(){i.anchorNode==a&&i.anchorOffset==c||(o.removeEventListener("selectionchange",r.input.hideSelectionGuard),setTimeout(function(){editorOwnsSelection(r)&&!r.state.selection.visible||r.dom.classList.remove("ProseMirror-hideselection")},20))})}(r))}r.domObserver.setCurSelection(),r.domObserver.connectSelection()}}var de=B||z&&j<63;function temporarilyEditableNear(r,o){var i=r.docView.domFromPos(o,0),a=i.node,c=i.offset,u=c<a.childNodes.length?a.childNodes[c]:null,p=c?a.childNodes[c-1]:null;if(B&&u&&"false"==u.contentEditable)return setEditable(u);if(!(u&&"false"!=u.contentEditable||p&&"false"!=p.contentEditable)){if(u)return setEditable(u);if(p)return setEditable(p)}}function setEditable(r){return r.contentEditable="true",B&&r.draggable&&(r.draggable=!1,r.wasDraggable=!0),r}function resetEditable(r){r.contentEditable="false",r.wasDraggable&&(r.draggable=!0,r.wasDraggable=null)}function syncNodeSelection(r,o){if(o instanceof a.NodeSelection){var i=r.docView.descAt(o.from);i!=r.lastSelectedViewDesc&&(clearNodeSelection(r),i&&i.selectNode(),r.lastSelectedViewDesc=i)}else clearNodeSelection(r)}function clearNodeSelection(r){r.lastSelectedViewDesc&&(r.lastSelectedViewDesc.parent&&r.lastSelectedViewDesc.deselectNode(),r.lastSelectedViewDesc=void 0)}function selectionBetween(r,o,i,c){return r.someProp("createSelectionBetween",function(a){return a(r,o,i)})||a.TextSelection.between(o,i,c)}function hasFocusAndSelection(r){return!(r.editable&&!r.hasFocus())&&hasSelection(r)}function hasSelection(r){var o=r.domSelectionRange();if(!o.anchorNode)return!1;try{return r.dom.contains(3==o.anchorNode.nodeType?o.anchorNode.parentNode:o.anchorNode)&&(r.editable||r.dom.contains(3==o.focusNode.nodeType?o.focusNode.parentNode:o.focusNode))}catch(r){return!1}}function moveSelectionBlock(r,o){var i=r.selection,c=i.$anchor,u=i.$head,p=o>0?c.max(u):c.min(u),g=p.parent.inlineContent?p.depth?r.doc.resolve(o>0?p.after():p.before()):null:p;return g&&a.Selection.findFrom(g,o)}function apply(r,o){return r.dispatch(r.state.tr.setSelection(o).scrollIntoView()),!0}function selectHorizontally(r,o,i){var c=r.state.selection;if(!(c instanceof a.TextSelection)){if(c instanceof a.NodeSelection&&c.node.isInline)return apply(r,new a.TextSelection(o>0?c.$to:c.$from));var u=moveSelectionBlock(r.state,o);return!!u&&apply(r,u)}if(i.indexOf("s")>-1){var p=c.$head,g=p.textOffset?null:o<0?p.nodeBefore:p.nodeAfter;if(!g||g.isText||!g.isLeaf)return!1;var v=r.state.doc.resolve(p.pos+g.nodeSize*(o<0?-1:1));return apply(r,new a.TextSelection(c.$anchor,v))}if(!c.empty)return!1;if(r.endOfTextblock(o>0?"forward":"backward")){var b=moveSelectionBlock(r.state,o);return!!(b&&b instanceof a.NodeSelection)&&apply(r,b)}if(!(U&&i.indexOf("m")>-1)){var k,E=c.$head,w=E.textOffset?null:o<0?E.nodeBefore:E.nodeAfter;if(!w||w.isText)return!1;var x=o<0?E.pos-w.nodeSize:E.pos;return!!(w.isAtom||(k=r.docView.descAt(x))&&!k.contentDOM)&&(a.NodeSelection.isSelectable(w)?apply(r,new a.NodeSelection(o<0?r.state.doc.resolve(E.pos-w.nodeSize):E)):!!K&&apply(r,new a.TextSelection(r.state.doc.resolve(o<0?x:x+w.nodeSize))))}}function nodeLen(r){return 3==r.nodeType?r.nodeValue.length:r.childNodes.length}function isIgnorable(r,o){var i=r.pmViewDesc;return i&&0==i.size&&(o<0||r.nextSibling||"BR"!=r.nodeName)}function skipIgnoredNodes(r,o){return o<0?function skipIgnoredNodesBefore(r){var o=r.domSelectionRange(),i=o.focusNode,a=o.focusOffset;if(!i)return;var c,u,g=!1;I&&1==i.nodeType&&a<nodeLen(i)&&isIgnorable(i.childNodes[a],-1)&&(g=!0);for(;;)if(a>0){if(1!=i.nodeType)break;var v=i.childNodes[a-1];if(isIgnorable(v,-1))c=i,u=--a;else{if(3!=v.nodeType)break;a=(i=v).nodeValue.length}}else{if(isBlockNode(i))break;for(var b=i.previousSibling;b&&isIgnorable(b,-1);)c=i.parentNode,u=p(b),b=b.previousSibling;if(b)a=nodeLen(i=b);else{if((i=i.parentNode)==r.dom)break;a=0}}g?setSelFocus(r,i,a):c&&setSelFocus(r,c,u)}(r):function skipIgnoredNodesAfter(r){var o=r.domSelectionRange(),i=o.focusNode,a=o.focusOffset;if(!i)return;for(var c,u,g=nodeLen(i);;)if(a<g){if(1!=i.nodeType)break;if(!isIgnorable(i.childNodes[a],1))break;c=i,u=++a}else{if(isBlockNode(i))break;for(var v=i.nextSibling;v&&isIgnorable(v,1);)c=v.parentNode,u=p(v)+1,v=v.nextSibling;if(v)a=0,g=nodeLen(i=v);else{if((i=i.parentNode)==r.dom)break;a=g=0}}c&&setSelFocus(r,c,u)}(r)}function isBlockNode(r){var o=r.pmViewDesc;return o&&o.node&&o.node.isBlock}function setSelFocus(r,o,i){var a,c;3!=o.nodeType&&((c=function textNodeAfter(r,o){for(;r&&o==r.childNodes.length&&!hasBlockDesc(r);)o=p(r)+1,r=r.parentNode;for(;r&&o<r.childNodes.length;){var i=r.childNodes[o];if(3==i.nodeType)return i;if(1==i.nodeType&&"false"==i.contentEditable)break;r=i,o=0}}(o,i))?(o=c,i=0):(a=function textNodeBefore(r,o){for(;r&&!o&&!hasBlockDesc(r);)o=p(r),r=r.parentNode;for(;r&&o;){var i=r.childNodes[o-1];if(3==i.nodeType)return i;if(1==i.nodeType&&"false"==i.contentEditable)break;o=(r=i).childNodes.length}}(o,i))&&(o=a,i=a.nodeValue.length));var u=r.domSelection();if(u){if(w(u)){var g=document.createRange();g.setEnd(o,i),g.setStart(o,i),u.removeAllRanges(),u.addRange(g)}else u.extend&&u.extend(o,i);r.domObserver.setCurSelection();var v=r.state;setTimeout(function(){r.state==v&&selectionToDOM(r)},50)}}function findDirection(r,o){var i=r.state.doc.resolve(o);if(!z&&!H&&i.parent.inlineContent){var a=r.coordsAtPos(o);if(o>i.start()){var c=r.coordsAtPos(o-1),u=(c.top+c.bottom)/2;if(u>a.top&&u<a.bottom&&Math.abs(c.left-a.left)>1)return c.left<a.left?"ltr":"rtl"}if(o<i.end()){var p=r.coordsAtPos(o+1),g=(p.top+p.bottom)/2;if(g>a.top&&g<a.bottom&&Math.abs(p.left-a.left)>1)return p.left>a.left?"ltr":"rtl"}}return"rtl"==getComputedStyle(r.dom).direction?"rtl":"ltr"}function selectVertically(r,o,i){var c=r.state.selection;if(c instanceof a.TextSelection&&!c.empty||i.indexOf("s")>-1)return!1;if(U&&i.indexOf("m")>-1)return!1;var u=c.$from,p=c.$to;if(!u.parent.inlineContent||r.endOfTextblock(o<0?"up":"down")){var g=moveSelectionBlock(r.state,o);if(g&&g instanceof a.NodeSelection)return apply(r,g)}if(!u.parent.inlineContent){var v=o<0?u:p,b=c instanceof a.AllSelection?a.Selection.near(v,o):a.Selection.findFrom(v,o);return!!b&&apply(r,b)}return!1}function stopNativeHorizontalDelete(r,o){if(!(r.state.selection instanceof a.TextSelection))return!0;var i=r.state.selection,c=i.$head,u=i.$anchor,p=i.empty;if(!c.sameParent(u))return!0;if(!p)return!1;if(r.endOfTextblock(o>0?"forward":"backward"))return!0;var g=!c.textOffset&&(o<0?c.nodeBefore:c.nodeAfter);if(g&&!g.isText){var v=r.state.tr;return o<0?v.delete(c.pos-g.nodeSize,c.pos):v.delete(c.pos,c.pos+g.nodeSize),r.dispatch(v),!0}return!1}function switchEditable(r,o,i){r.domObserver.stop(),o.contentEditable=i,r.domObserver.start()}function captureKeyDown(r,o){var i=o.keyCode,a=function getMods(r){var o="";return r.ctrlKey&&(o+="c"),r.metaKey&&(o+="m"),r.altKey&&(o+="a"),r.shiftKey&&(o+="s"),o}(o);if(8==i||U&&72==i&&"c"==a)return stopNativeHorizontalDelete(r,-1)||skipIgnoredNodes(r,-1);if(46==i&&!o.shiftKey||U&&68==i&&"c"==a)return stopNativeHorizontalDelete(r,1)||skipIgnoredNodes(r,1);if(13==i||27==i)return!0;if(37==i||U&&66==i&&"c"==a){var c=37==i?"ltr"==findDirection(r,r.state.selection.from)?-1:1:-1;return selectHorizontally(r,c,a)||skipIgnoredNodes(r,c)}if(39==i||U&&70==i&&"c"==a){var u=39==i?"ltr"==findDirection(r,r.state.selection.from)?1:-1:1;return selectHorizontally(r,u,a)||skipIgnoredNodes(r,u)}return 38==i||U&&80==i&&"c"==a?selectVertically(r,-1,a)||skipIgnoredNodes(r,-1):40==i||U&&78==i&&"c"==a?function safariDownArrowBug(r){if(!B||r.state.selection.$head.parentOffset>0)return!1;var o=r.domSelectionRange(),i=o.focusNode,a=o.focusOffset;if(i&&1==i.nodeType&&0==a&&i.firstChild&&"false"==i.firstChild.contentEditable){var c=i.firstChild;switchEditable(r,c,"true"),setTimeout(function(){return switchEditable(r,c,"false")},20)}return!1}(r)||selectVertically(r,1,a)||skipIgnoredNodes(r,1):a==(U?"m":"c")&&(66==i||73==i||89==i||90==i)}function _serializeForClipboard(r,o){r.someProp("transformCopied",function(i){o=i(o,r)});for(var i=[],a=o,u=a.content,p=a.openStart,g=a.openEnd;p>1&&g>1&&1==u.childCount&&1==u.firstChild.childCount;){p--,g--;var v=u.firstChild;i.push(v.type.name,v.attrs!=v.type.defaultAttrs?v.attrs:null),u=v.content}var b=r.someProp("clipboardSerializer")||c.DOMSerializer.fromSchema(r.state.schema),k=detachedDoc(),E=k.createElement("div");E.appendChild(b.serializeFragment(u,{document:k}));for(var w,x=E.firstChild,C=0;x&&1==x.nodeType&&(w=he[x.nodeName.toLowerCase()]);){for(var _=w.length-1;_>=0;_--){for(var T=k.createElement(w[_]);E.firstChild;)T.appendChild(E.firstChild);E.appendChild(T),C++}x=E.firstChild}return x&&1==x.nodeType&&x.setAttribute("data-pm-slice","".concat(p," ").concat(g).concat(C?" -".concat(C):""," ").concat(JSON.stringify(i))),{dom:E,text:r.someProp("clipboardTextSerializer",function(i){return i(o,r)})||o.content.textBetween(0,o.content.size,"\n\n"),slice:o}}function parseFromClipboard(r,o,i,a,u){var p,g,v=u.parent.type.spec.code;if(!i&&!o)return null;var b=!!o&&(a||v||!i);if(b){if(r.someProp("transformPastedText",function(i){o=i(o,v||a,r)}),v)return g=new c.Slice(c.Fragment.from(r.state.schema.text(o.replace(/\r\n?/g,"\n"))),0,0),r.someProp("transformPasted",function(o){g=o(g,r,!0)}),g;var k=r.someProp("clipboardTextParser",function(i){return i(o,u,a,r)});if(k)g=k;else{var E=u.marks(),w=r.state.schema,x=c.DOMSerializer.fromSchema(w);p=document.createElement("div"),o.split(/(?:\r\n?|\n)+/).forEach(function(r){var o=p.appendChild(document.createElement("p"));r&&o.appendChild(x.serializeNode(w.text(r,E)))})}}else r.someProp("transformPastedHTML",function(o){i=o(i,r)}),p=function readHTML(r){var o=/^(\s*<meta [^>]*>)*/.exec(r);o&&(r=r.slice(o[0].length));var i,a=detachedDoc().createElement("div"),c=/<([a-z][^>\s]+)/i.exec(r);(i=c&&he[c[1].toLowerCase()])&&(r=i.map(function(r){return"<"+r+">"}).join("")+r+i.map(function(r){return"</"+r+">"}).reverse().join(""));if(a.innerHTML=function maybeWrapTrusted(r){var o=window.trustedTypes;if(!o)return r;ge||(ge=o.defaultPolicy||o.createPolicy("ProseMirrorClipboard",{createHTML:function createHTML(r){return r}}));return ge.createHTML(r)}(r),i)for(var u=0;u<i.length;u++)a=a.querySelector(i[u])||a;return a}(i),K&&function restoreReplacedSpaces(r){for(var o=r.querySelectorAll(z?"span:not([class]):not([style])":"span.Apple-converted-space"),i=0;i<o.length;i++){var a=o[i];1==a.childNodes.length&&" "==a.textContent&&a.parentNode&&a.parentNode.replaceChild(r.ownerDocument.createTextNode(" "),a)}}(p);var C=p&&p.querySelector("[data-pm-slice]"),_=C&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(C.getAttribute("data-pm-slice")||"");if(_&&_[3])for(var T=+_[3];T>0;T--){for(var P=p.firstChild;P&&1!=P.nodeType;)P=P.nextSibling;if(!P)break;p=P}if(!g){var A=r.someProp("clipboardParser")||r.someProp("domParser")||c.DOMParser.fromSchema(r.state.schema);g=A.parseSlice(p,{preserveWhitespace:!(!b&&!_),context:u,ruleFromNode:function ruleFromNode(r){return"BR"!=r.nodeName||r.nextSibling||!r.parentNode||fe.test(r.parentNode.nodeName)?null:{ignore:!0}}})}if(_)g=function addContext(r,o){if(!r.size)return r;var i,a=r.content.firstChild.type.schema;try{i=JSON.parse(o)}catch(o){return r}for(var u=r.content,p=r.openStart,g=r.openEnd,v=i.length-2;v>=0;v-=2){var b=a.nodes[i[v]];if(!b||b.hasRequiredAttrs())break;u=c.Fragment.from(b.create(i[v+1],u)),p++,g++}return new c.Slice(u,p,g)}(closeSlice(g,+_[1],+_[2]),_[4]);else if(g=c.Slice.maxOpen(function normalizeSiblings(r,o){if(r.childCount<2)return r;for(var i,a=function _loop(){var i,a=o.node(u).contentMatchAt(o.index(u)),p=[];if(r.forEach(function(r){if(p){var o,c=a.findWrapping(r.type);if(!c)return p=null;if(o=p.length&&i.length&&addToSibling(c,i,r,p[p.length-1],0))p[p.length-1]=o;else{p.length&&(p[p.length-1]=closeRight(p[p.length-1],i.length));var u=withWrappers(r,c);p.push(u),a=a.matchType(u.type),i=c}}}),p)return{v:c.Fragment.from(p)}},u=o.depth;u>=0;u--)if(i=a())return i.v;return r}(g.content,u),!0),g.openStart||g.openEnd){for(var N=0,R=0,I=g.content.firstChild;N<g.openStart&&!I.type.spec.isolating;N++,I=I.firstChild);for(var L=g.content.lastChild;R<g.openEnd&&!L.type.spec.isolating;R++,L=L.lastChild);g=closeSlice(g,N,R)}return r.someProp("transformPasted",function(o){g=o(g,r,b)}),g}var fe=/^(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 withWrappers(r,o){for(var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=o.length-1;a>=i;a--)r=o[a].create(null,c.Fragment.from(r));return r}function addToSibling(r,o,i,a,u){if(u<r.length&&u<o.length&&r[u]==o[u]){var p=addToSibling(r,o,i,a.lastChild,u+1);if(p)return a.copy(a.content.replaceChild(a.childCount-1,p));if(a.contentMatchAt(a.childCount).matchType(u==r.length-1?i.type:r[u+1]))return a.copy(a.content.append(c.Fragment.from(withWrappers(i,r,u+1))))}}function closeRight(r,o){if(0==o)return r;var i=r.content.replaceChild(r.childCount-1,closeRight(r.lastChild,o-1)),a=r.contentMatchAt(r.childCount).fillBefore(c.Fragment.empty,!0);return r.copy(i.append(a))}function closeRange(r,o,i,a,u,p){var g=o<0?r.firstChild:r.lastChild,v=g.content;return r.childCount>1&&(p=0),u<a-1&&(v=closeRange(v,o,i,a,u+1,p)),u>=i&&(v=o<0?g.contentMatchAt(0).fillBefore(v,p<=u).append(v):v.append(g.contentMatchAt(g.childCount).fillBefore(c.Fragment.empty,!0))),r.replaceChild(o<0?0:r.childCount-1,g.copy(v))}function closeSlice(r,o,i){return o<r.openStart&&(r=new c.Slice(closeRange(r.content,-1,o,r.openStart,0,r.openEnd),o,r.openEnd)),i<r.openEnd&&(r=new c.Slice(closeRange(r.content,1,i,r.openEnd,0,0),r.openStart,i)),r}var he={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]},me=null;function detachedDoc(){return me||(me=document.implementation.createHTMLDocument("title"))}var ge=null;var ve={},ye={},be={touchstart:!0,touchmove:!0},ke=_createClass(function InputState(){_classCallCheck(this,InputState),this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.badSafariComposition=!1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null});function setSelectionOrigin(r,o){r.input.lastSelectionOrigin=o,r.input.lastSelectionTime=Date.now()}function ensureListeners(r){r.someProp("handleDOMEvents",function(o){for(var i in o)r.input.eventHandlers[i]||r.dom.addEventListener(i,r.input.eventHandlers[i]=function(o){return runCustomHandler(r,o)})})}function runCustomHandler(r,o){return r.someProp("handleDOMEvents",function(i){var a=i[o.type];return!!a&&(a(r,o)||o.defaultPrevented)})}function eventCoords(r){return{left:r.clientX,top:r.clientY}}function runHandlerOnContext(r,o,i,a,c){if(-1==a)return!1;for(var u,p=r.state.doc.resolve(a),g=function _loop3(a){if(r.someProp(o,function(o){return a>p.depth?o(r,i,p.nodeAfter,p.before(a),c,!0):o(r,i,p.node(a),p.before(a),c,!1)}))return{v:!0}},v=p.depth+1;v>0;v--)if(u=g(v))return u.v;return!1}function updateSelection(r,o,i){if(r.focused||r.focus(),!r.state.selection.eq(o)){var a=r.state.tr.setSelection(o);"pointer"==i&&a.setMeta("pointer",!0),r.dispatch(a)}}function handleSingleClick(r,o,i,c,u){return runHandlerOnContext(r,"handleClickOn",o,i,c)||r.someProp("handleClick",function(i){return i(r,o,c)})||(u?function selectClickedNode(r,o){if(-1==o)return!1;var i,c,u=r.state.selection;u instanceof a.NodeSelection&&(i=u.node);for(var p=r.state.doc.resolve(o),g=p.depth+1;g>0;g--){var v=g>p.depth?p.nodeAfter:p.node(g);if(a.NodeSelection.isSelectable(v)){c=i&&u.$from.depth>0&&g>=u.$from.depth&&p.before(u.$from.depth+1)==u.$from.pos?p.before(u.$from.depth):p.before(g);break}}return null!=c&&(updateSelection(r,a.NodeSelection.create(r.state.doc,c),"pointer"),!0)}(r,i):function selectClickedLeaf(r,o){if(-1==o)return!1;var i=r.state.doc.resolve(o),c=i.nodeAfter;return!!(c&&c.isAtom&&a.NodeSelection.isSelectable(c))&&(updateSelection(r,new a.NodeSelection(i),"pointer"),!0)}(r,i))}function handleDoubleClick(r,o,i,a){return runHandlerOnContext(r,"handleDoubleClickOn",o,i,a)||r.someProp("handleDoubleClick",function(i){return i(r,o,a)})}function handleTripleClick(r,o,i,c){return runHandlerOnContext(r,"handleTripleClickOn",o,i,c)||r.someProp("handleTripleClick",function(i){return i(r,o,c)})||function defaultTripleClick(r,o,i){if(0!=i.button)return!1;var c=r.state.doc;if(-1==o)return!!c.inlineContent&&(updateSelection(r,a.TextSelection.create(c,0,c.content.size),"pointer"),!0);for(var u=c.resolve(o),p=u.depth+1;p>0;p--){var g=p>u.depth?u.nodeAfter:u.node(p),v=u.before(p);if(g.inlineContent)updateSelection(r,a.TextSelection.create(c,v+1,v+1+g.content.size),"pointer");else{if(!a.NodeSelection.isSelectable(g))continue;updateSelection(r,a.NodeSelection.create(c,v),"pointer")}return!0}}(r,i,c)}function forceDOMFlush(r){return endComposition(r)}ye.keydown=function(r,o){var i=o;if(r.input.shiftKey=16==i.keyCode||i.shiftKey,!inOrNearComposition(r,i)&&(r.input.lastKeyCode=i.keyCode,r.input.lastKeyCodeTime=Date.now(),!W||!z||13!=i.keyCode))if(229!=i.keyCode&&r.domObserver.forceFlush(),!V||13!=i.keyCode||i.ctrlKey||i.altKey||i.metaKey)r.someProp("handleKeyDown",function(o){return o(r,i)})||captureKeyDown(r,i)?i.preventDefault():setSelectionOrigin(r,"key");else{var a=Date.now();r.input.lastIOSEnter=a,r.input.lastIOSEnterFallbackTimeout=setTimeout(function(){r.input.lastIOSEnter==a&&(r.someProp("handleKeyDown",function(o){return o(r,keyEvent(13,"Enter"))}),r.input.lastIOSEnter=0)},200)}},ye.keyup=function(r,o){16==o.keyCode&&(r.input.shiftKey=!1)},ye.keypress=function(r,o){var i=o;if(!(inOrNearComposition(r,i)||!i.charCode||i.ctrlKey&&!i.altKey||U&&i.metaKey))if(r.someProp("handleKeyPress",function(o){return o(r,i)}))i.preventDefault();else{var c=r.state.selection;if(!(c instanceof a.TextSelection&&c.$from.sameParent(c.$to))){var u=String.fromCharCode(i.charCode),p=function deflt(){return r.state.tr.insertText(u).scrollIntoView()};/[\r\n]/.test(u)||r.someProp("handleTextInput",function(o){return o(r,c.$from.pos,c.$to.pos,u,p)})||r.dispatch(p()),i.preventDefault()}}};var Ee=U?"metaKey":"ctrlKey";ve.mousedown=function(r,o){var i=o;r.input.shiftKey=i.shiftKey;var a=forceDOMFlush(r),c=Date.now(),u="singleClick";c-r.input.lastClick.time<500&&function isNear(r,o){var i=o.x-r.clientX,a=o.y-r.clientY;return i*i+a*a<100}(i,r.input.lastClick)&&!i[Ee]&&r.input.lastClick.button==i.button&&("singleClick"==r.input.lastClick.type?u="doubleClick":"doubleClick"==r.input.lastClick.type&&(u="tripleClick")),r.input.lastClick={time:c,x:i.clientX,y:i.clientY,type:u,button:i.button};var p=r.posAtCoords(eventCoords(i));p&&("singleClick"==u?(r.input.mouseDown&&r.input.mouseDown.done(),r.input.mouseDown=new Se(r,p,i,!!a)):("doubleClick"==u?handleDoubleClick:handleTripleClick)(r,p.pos,p.inside,i)?i.preventDefault():setSelectionOrigin(r,"pointer"))};var Se=function(){function MouseDown(r,o,i,c){var u,p,g=this;if(_classCallCheck(this,MouseDown),this.view=r,this.pos=o,this.event=i,this.flushed=c,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=r.state.doc,this.selectNode=!!i[Ee],this.allowDefault=i.shiftKey,o.inside>-1)u=r.state.doc.nodeAt(o.inside),p=o.inside;else{var v=r.state.doc.resolve(o.pos);u=v.parent,p=v.depth?v.before():0}var b=c?null:i.target,k=b?r.docView.nearestDesc(b,!0):null;this.target=k&&1==k.nodeDOM.nodeType?k.nodeDOM:null;var E=r.state.selection;(0==i.button&&u.type.spec.draggable&&!1!==u.type.spec.selectable||E instanceof a.NodeSelection&&E.from<=p&&E.to>p)&&(this.mightDrag={node:u,pos:p,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!I||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(function(){g.view.input.mouseDown==g&&g.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),r.root.addEventListener("mouseup",this.up=this.up.bind(this)),r.root.addEventListener("mousemove",this.move=this.move.bind(this)),setSelectionOrigin(r,"pointer")}return _createClass(MouseDown,[{key:"done",value:function done(){var r=this;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(function(){return selectionToDOM(r.view)}),this.view.input.mouseDown=null}},{key:"up",value:function up(r){if(this.done(),this.view.dom.contains(r.target)){var o=this.pos;this.view.state.doc!=this.startDoc&&(o=this.view.posAtCoords(eventCoords(r))),this.updateAllowDefault(r),this.allowDefault||!o?setSelectionOrigin(this.view,"pointer"):handleSingleClick(this.view,o.pos,o.inside,r,this.selectNode)?r.preventDefault():0==r.button&&(this.flushed||B&&this.mightDrag&&!this.mightDrag.node.isAtom||z&&!this.view.state.selection.visible&&Math.min(Math.abs(o.pos-this.view.state.selection.from),Math.abs(o.pos-this.view.state.selection.to))<=2)?(updateSelection(this.view,a.Selection.near(this.view.state.doc.resolve(o.pos)),"pointer"),r.preventDefault()):setSelectionOrigin(this.view,"pointer")}}},{key:"move",value:function move(r){this.updateAllowDefault(r),setSelectionOrigin(this.view,"pointer"),0==r.buttons&&this.done()}},{key:"updateAllowDefault",value:function updateAllowDefault(r){!this.allowDefault&&(Math.abs(this.event.x-r.clientX)>4||Math.abs(this.event.y-r.clientY)>4)&&(this.allowDefault=!0)}}]),MouseDown}();function inOrNearComposition(r,o){return!!r.composing||!!(B&&Math.abs(o.timeStamp-r.input.compositionEndedAt)<500)&&(r.input.compositionEndedAt=-2e8,!0)}ve.touchstart=function(r){r.input.lastTouch=Date.now(),forceDOMFlush(r),setSelectionOrigin(r,"pointer")},ve.touchmove=function(r){r.input.lastTouch=Date.now(),setSelectionOrigin(r,"pointer")},ve.contextmenu=function(r){return forceDOMFlush(r)};var we=W?5e3:-1;function scheduleComposeEnd(r,o){clearTimeout(r.input.composingTimeout),o>-1&&(r.input.composingTimeout=setTimeout(function(){return endComposition(r)},o))}function clearComposition(r){for(r.composing&&(r.input.composing=!1,r.input.compositionEndedAt=function timestampFromCustomEvent(){var r=document.createEvent("Event");return r.initEvent("event",!0,!0),r.timeStamp}());r.input.compositionNodes.length>0;)r.input.compositionNodes.pop().markParentsDirty()}function findCompositionNode(r){var o=r.domSelectionRange();if(!o.focusNode)return null;var i=function textNodeBefore$1(r,o){for(;;){if(3==r.nodeType&&o)return r;if(1==r.nodeType&&o>0){if("false"==r.contentEditable)return null;o=nodeSize(r=r.childNodes[o-1])}else{if(!r.parentNode||hasBlockDesc(r))return null;o=p(r),r=r.parentNode}}}(o.focusNode,o.focusOffset),a=function textNodeAfter$1(r,o){for(;;){if(3==r.nodeType&&o<r.nodeValue.length)return r;if(1==r.nodeType&&o<r.childNodes.length){if("false"==r.contentEditable)return null;r=r.childNodes[o],o=0}else{if(!r.parentNode||hasBlockDesc(r))return null;o=p(r)+1,r=r.parentNode}}}(o.focusNode,o.focusOffset);if(i&&a&&i!=a){var c=a.pmViewDesc,u=r.domObserver.lastChangedTextNode;if(i==u||a==u)return u;if(!c||!c.isText(a.nodeValue))return a;if(r.input.compositionNode==a){var g=i.pmViewDesc;if(g&&g.isText(i.nodeValue))return a}}return i||a}function endComposition(r){var o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!(W&&r.domObserver.flushingSoon>=0)){if(r.domObserver.forceFlush(),clearComposition(r),o||r.docView&&r.docView.dirty){var i=selectionFromDOM(r),a=r.state.selection;return i&&!i.eq(a)?r.dispatch(r.state.tr.setSelection(i)):!r.markCursor&&!o||a.$from.node(a.$from.sharedDepth(a.to)).inlineContent?r.updateState(r.state):r.dispatch(r.state.tr.deleteSelection()),!0}return!1}}ye.compositionstart=ye.compositionupdate=function(r){if(!r.composing){r.domObserver.flush();var o=r.state,i=o.selection.$to;if(o.selection instanceof a.TextSelection&&(o.storedMarks||!i.textOffset&&i.parentOffset&&i.nodeBefore.marks.some(function(r){return!1===r.type.spec.inclusive})||z&&H&&function selectionBeforeUneditable(r){var o=r.domSelectionRange(),i=o.focusNode,a=o.focusOffset;if(!i||1!=i.nodeType||a>=i.childNodes.length)return!1;var c=i.childNodes[a];return 1==c.nodeType&&"false"==c.contentEditable}(r)))r.markCursor=r.state.storedMarks||i.marks(),endComposition(r,!0),r.markCursor=null;else if(endComposition(r,!o.selection.empty),I&&o.selection.empty&&i.parentOffset&&!i.textOffset&&i.nodeBefore.marks.length)for(var c=r.domSelectionRange(),u=c.focusNode,p=c.focusOffset;u&&1==u.nodeType&&0!=p;){var g=p<0?u.lastChild:u.childNodes[p-1];if(!g)break;if(3==g.nodeType){var v=r.domSelection();v&&v.collapse(g,g.nodeValue.length);break}u=g,p=-1}r.input.composing=!0}scheduleComposeEnd(r,we)},ye.compositionend=function(r,o){r.composing&&(r.input.composing=!1,r.input.compositionEndedAt=o.timeStamp,r.input.compositionPendingChanges=r.domObserver.pendingRecords().length?r.input.compositionID:0,r.input.compositionNode=null,r.input.badSafariComposition?r.domObserver.forceFlush():r.input.compositionPendingChanges&&Promise.resolve().then(function(){return r.domObserver.flush()}),r.input.compositionID++,scheduleComposeEnd(r,20))};var xe=N&&R<15||V&&G<604;function doPaste(r,o,i,a,u){var p=parseFromClipboard(r,o,i,a,r.state.selection.$from);if(r.someProp("handlePaste",function(o){return o(r,u,p||c.Slice.empty)}))return!0;if(!p)return!1;var g=function sliceSingleNode(r){return 0==r.openStart&&0==r.openEnd&&1==r.content.childCount?r.content.firstChild:null}(p),v=g?r.state.tr.replaceSelectionWith(g,a):r.state.tr.replaceSelection(p);return r.dispatch(v.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function getText(r){var o=r.getData("text/plain")||r.getData("Text");if(o)return o;var i=r.getData("text/uri-list");return i?i.replace(/\r?\n/g," "):""}ve.copy=ye.cut=function(r,o){var i=o,a=r.state.selection,c="cut"==i.type;if(!a.empty){var u=xe?null:i.clipboardData,p=_serializeForClipboard(r,a.content()),g=p.dom,v=p.text;u?(i.preventDefault(),u.clearData(),u.setData("text/html",g.innerHTML),u.setData("text/plain",v)):function captureCopy(r,o){if(r.dom.parentNode){var i=r.dom.parentNode.appendChild(document.createElement("div"));i.appendChild(o),i.style.cssText="position: fixed; left: -10000px; top: 10px";var a=getSelection(),c=document.createRange();c.selectNodeContents(o),r.dom.blur(),a.removeAllRanges(),a.addRange(c),setTimeout(function(){i.parentNode&&i.parentNode.removeChild(i),r.focus()},50)}}(r,g),c&&r.dispatch(r.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))}},ye.paste=function(r,o){var i=o;if(!r.composing||W){var a=xe?null:i.clipboardData,c=r.input.shiftKey&&45!=r.input.lastKeyCode;a&&doPaste(r,getText(a),a.getData("text/html"),c,i)?i.preventDefault():function capturePaste(r,o){if(r.dom.parentNode){var i=r.input.shiftKey||r.state.selection.$from.parent.type.spec.code,a=r.dom.parentNode.appendChild(document.createElement(i?"textarea":"div"));i||(a.contentEditable="true"),a.style.cssText="position: fixed; left: -10000px; top: 10px",a.focus();var c=r.input.shiftKey&&45!=r.input.lastKeyCode;setTimeout(function(){r.focus(),a.parentNode&&a.parentNode.removeChild(a),i?doPaste(r,a.value,null,c,o):doPaste(r,a.textContent,a.innerHTML,c,o)},50)}}(r,i)}};var Ce=_createClass(function Dragging(r,o,i){_classCallCheck(this,Dragging),this.slice=r,this.move=o,this.node=i}),_e=U?"altKey":"ctrlKey";function dragMoves(r,o){var i=r.someProp("dragCopies",function(r){return!r(o)});return null!=i?i:!o[_e]}for(var Te in ve.dragstart=function(r,o){var i=o,c=r.input.mouseDown;if(c&&c.done(),i.dataTransfer){var u,p=r.state.selection,g=p.empty?null:r.posAtCoords(eventCoords(i));if(g&&g.pos>=p.from&&g.pos<=(p instanceof a.NodeSelection?p.to-1:p.to));else if(c&&c.mightDrag)u=a.NodeSelection.create(r.state.doc,c.mightDrag.pos);else if(i.target&&1==i.target.nodeType){var v=r.docView.nearestDesc(i.target,!0);v&&v.node.type.spec.draggable&&v!=r.docView&&(u=a.NodeSelection.create(r.state.doc,v.posBefore))}var b=_serializeForClipboard(r,(u||r.state.selection).content()),k=b.dom,E=b.text,w=b.slice;(!i.dataTransfer.files.length||!z||j>120)&&i.dataTransfer.clearData(),i.dataTransfer.setData(xe?"Text":"text/html",k.innerHTML),i.dataTransfer.effectAllowed="copyMove",xe||i.dataTransfer.setData("text/plain",E),r.dragging=new Ce(w,dragMoves(r,i),u)}},ve.dragend=function(r){var o=r.dragging;window.setTimeout(function(){r.dragging==o&&(r.dragging=null)},50)},ye.dragover=ye.dragenter=function(r,o){return o.preventDefault()},ye.drop=function(r,o){try{!function handleDrop(r,o,i){if(!o.dataTransfer)return;var p=r.posAtCoords(eventCoords(o));if(!p)return;var g=r.state.doc.resolve(p.pos),v=i&&i.slice;v?r.someProp("transformPasted",function(o){v=o(v,r,!1)}):v=parseFromClipboard(r,getText(o.dataTransfer),xe?null:o.dataTransfer.getData("text/html"),!1,g);var b=!(!i||!dragMoves(r,o));if(r.someProp("handleDrop",function(i){return i(r,o,v||c.Slice.empty,b)}))return void o.preventDefault();if(!v)return;o.preventDefault();var k=v?u.dropPoint(r.state.doc,g.pos,v):g.pos;null==k&&(k=g.pos);var E=r.state.tr;if(b){var w=i.node;w?w.replace(E):E.deleteSelection()}var x=E.mapping.map(k),C=0==v.openStart&&0==v.openEnd&&1==v.content.childCount,_=E.doc;C?E.replaceRangeWith(x,x,v.content.firstChild):E.replaceRange(x,x,v);if(E.doc.eq(_))return;var T=E.doc.resolve(x);if(C&&a.NodeSelection.isSelectable(v.content.firstChild)&&T.nodeAfter&&T.nodeAfter.sameMarkup(v.content.firstChild))E.setSelection(new a.NodeSelection(T));else{var P=E.mapping.map(k);E.mapping.maps[E.mapping.maps.length-1].forEach(function(r,o,i,a){return P=a}),E.setSelection(selectionBetween(r,T,E.doc.resolve(P)))}r.focus(),r.dispatch(E.setMeta("uiEvent","drop"))}(r,o,r.dragging)}finally{r.dragging=null}},ve.focus=function(r){r.input.lastFocus=Date.now(),r.focused||(r.domObserver.stop(),r.dom.classList.add("ProseMirror-focused"),r.domObserver.start(),r.focused=!0,setTimeout(function(){r.docView&&r.hasFocus()&&!r.domObserver.currentSelection.eq(r.domSelectionRange())&&selectionToDOM(r)},20))},ve.blur=function(r,o){var i=o;r.focused&&(r.domObserver.stop(),r.dom.classList.remove("ProseMirror-focused"),r.domObserver.start(),i.relatedTarget&&r.dom.contains(i.relatedTarget)&&r.domObserver.currentSelection.clear(),r.focused=!1)},ve.beforeinput=function(r,o){if(z&&W&&"deleteContentBackward"==o.inputType){r.domObserver.flushSoon();var i=r.input.domChangeCount;setTimeout(function(){if(r.input.domChangeCount==i&&(r.dom.blur(),r.focus(),!r.someProp("handleKeyDown",function(o){return o(r,keyEvent(8,"Backspace"))}))){var o=r.state.selection.$cursor;o&&o.pos>0&&r.dispatch(r.state.tr.delete(o.pos-1,o.pos).scrollIntoView())}},50)}},ye)ve[Te]=ye[Te];function compareObjs(r,o){if(r==o)return!0;for(var i in r)if(r[i]!==o[i])return!1;for(var a in o)if(!(a in r))return!1;return!0}var Oe=function(){function WidgetType(r,o){_classCallCheck(this,WidgetType),this.toDOM=r,this.spec=o||Re,this.side=this.spec.side||0}return _createClass(WidgetType,[{key:"map",value:function map(r,o,i,a){var c=r.mapResult(o.from+a,this.side<0?-1:1),u=c.pos;return c.deleted?null:new Me(u-i,u-i,this)}},{key:"valid",value:function valid(){return!0}},{key:"eq",value:function eq(r){return this==r||r instanceof WidgetType&&(this.spec.key&&this.spec.key==r.spec.key||this.toDOM==r.toDOM&&compareObjs(this.spec,r.spec))}},{key:"destroy",value:function destroy(r){this.spec.destroy&&this.spec.destroy(r)}}]),WidgetType}(),Pe=function(){function InlineType(r,o){_classCallCheck(this,InlineType),this.attrs=r,this.spec=o||Re}return _createClass(InlineType,[{key:"map",value:function map(r,o,i,a){var c=r.map(o.from+a,this.spec.inclusiveStart?-1:1)-i,u=r.map(o.to+a,this.spec.inclusiveEnd?1:-1)-i;return c>=u?null:new Me(c,u,this)}},{key:"valid",value:function valid(r,o){return o.from<o.to}},{key:"eq",value:function eq(r){return this==r||r instanceof InlineType&&compareObjs(this.attrs,r.attrs)&&compareObjs(this.spec,r.spec)}},{key:"destroy",value:function destroy(){}}],[{key:"is",value:function is(r){return r.type instanceof InlineType}}]),InlineType}(),Ae=function(){function NodeType(r,o){_classCallCheck(this,NodeType),this.attrs=r,this.spec=o||Re}return _createClass(NodeType,[{key:"map",value:function map(r,o,i,a){var c=r.mapResult(o.from+a,1);if(c.deleted)return null;var u=r.mapResult(o.to+a,-1);return u.deleted||u.pos<=c.pos?null:new Me(c.pos-i,u.pos-i,this)}},{key:"valid",value:function valid(r,o){var i,a=r.content.findIndex(o.from),c=a.index,u=a.offset;return u==o.from&&!(i=r.child(c)).isText&&u+i.nodeSize==o.to}},{key:"eq",value:function eq(r){return this==r||r instanceof NodeType&&compareObjs(this.attrs,r.attrs)&&compareObjs(this.spec,r.spec)}},{key:"destroy",value:function destroy(){}}]),NodeType}(),Me=function(){function Decoration(r,o,i){_classCallCheck(this,Decoration),this.from=r,this.to=o,this.type=i}return _createClass(Decoration,[{key:"copy",value:function copy(r,o){return new Decoration(r,o,this.type)}},{key:"eq",value:function eq(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.type.eq(r.type)&&this.from+o==r.from&&this.to+o==r.to}},{key:"map",value:function map(r,o,i){return this.type.map(r,this,o,i)}},{key:"spec",get:function get(){return this.type.spec}},{key:"inline",get:function get(){return this.type instanceof Pe}},{key:"widget",get:function get(){return this.type instanceof Oe}}],[{key:"widget",value:function widget(r,o,i){return new Decoration(r,r,new Oe(o,i))}},{key:"inline",value:function inline(r,o,i,a){return new Decoration(r,o,new Pe(i,a))}},{key:"node",value:function node(r,o,i,a){return new Decoration(r,o,new Ae(i,a))}}]),Decoration}(),Ne=[],Re={},Ie=function(){function DecorationSet(r,o){_classCallCheck(this,DecorationSet),this.local=r.length?r:Ne,this.children=o.length?o:Ne}return _createClass(DecorationSet,[{key:"find",value:function find(r,o,i){var a=[];return this.findInner(null==r?0:r,null==o?1e9:o,a,0,i),a}},{key:"findInner",value:function findInner(r,o,i,a,c){for(var u=0;u<this.local.length;u++){var p=this.local[u];p.from<=o&&p.to>=r&&(!c||c(p.spec))&&i.push(p.copy(p.from+a,p.to+a))}for(var g=0;g<this.children.length;g+=3)if(this.children[g]<o&&this.children[g+1]>r){var v=this.children[g]+1;this.children[g+2].findInner(r-v,o-v,i,a+v,c)}}},{key:"map",value:function map(r,o,i){return this==De||0==r.maps.length?this:this.mapInner(r,o,0,0,i||Re)}},{key:"mapInner",value:function mapInner(r,o,i,a,c){for(var u,p=0;p<this.local.length;p++){var g=this.local[p].map(r,i,a);g&&g.type.valid(o,g)?(u||(u=[])).push(g):c.onRemove&&c.onRemove(this.local[p].spec)}return this.children.length?mapChildren(this.children,u||[],r,o,i,a,c):u?new DecorationSet(u.sort(byPos),Ne):De}},{key:"add",value:function add(r,o){return o.length?this==De?DecorationSet.create(r,o):this.addInner(r,o,0):this}},{key:"addInner",value:function addInner(r,o,i){var a,c=this,u=0;r.forEach(function(r,p){var g,v=p+i;if(g=takeSpansForNode(o,r,v)){for(a||(a=c.children.slice());u<a.length&&a[u]<p;)u+=3;a[u]==p?a[u+2]=a[u+2].addInner(r,g,v+1):a.splice(u,0,p,p+r.nodeSize,buildTree(g,r,v+1,Re)),u+=3}});for(var p=moveSpans(u?withoutNulls(o):o,-i),g=0;g<p.length;g++)p[g].type.valid(r,p[g])||p.splice(g--,1);return new DecorationSet(p.length?this.local.concat(p).sort(byPos):this.local,a||this.children)}},{key:"remove",value:function remove(r){return 0==r.length||this==De?this:this.removeInner(r,0)}},{key:"removeInner",value:function removeInner(r,o){for(var i=this.children,a=this.local,c=0;c<i.length;c+=3){for(var u,p=void 0,g=i[c]+o,v=i[c+1]+o,b=0;b<r.length;b++)(u=r[b])&&u.from>g&&u.to<v&&(r[b]=null,(p||(p=[])).push(u));if(p){i==this.children&&(i=this.children.slice());var k=i[c+2].removeInner(p,g+1);k!=De?i[c+2]=k:(i.splice(c,3),c-=3)}}if(a.length)for(var E,w=0;w<r.length;w++)if(E=r[w])for(var x=0;x<a.length;x++)a[x].eq(E,o)&&(a==this.local&&(a=this.local.slice()),a.splice(x--,1));return i==this.children&&a==this.local?this:a.length||i.length?new DecorationSet(a,i):De}},{key:"forChild",value:function forChild(r,o){if(this==De)return this;if(o.isLeaf)return DecorationSet.empty;for(var i,a,c=0;c<this.children.length;c+=3)if(this.children[c]>=r){this.children[c]==r&&(i=this.children[c+2]);break}for(var u=r+1,p=u+o.content.size,g=0;g<this.local.length;g++){var v=this.local[g];if(v.from<p&&v.to>u&&v.type instanceof Pe){var b=Math.max(u,v.from)-u,k=Math.min(p,v.to)-u;b<k&&(a||(a=[])).push(v.copy(b,k))}}if(a){var E=new DecorationSet(a.sort(byPos),Ne);return i?new Le([E,i]):E}return i||De}},{key:"eq",value:function eq(r){if(this==r)return!0;if(!(r instanceof DecorationSet)||this.local.length!=r.local.length||this.children.length!=r.children.length)return!1;for(var o=0;o<this.local.length;o++)if(!this.local[o].eq(r.local[o]))return!1;for(var i=0;i<this.children.length;i+=3)if(this.children[i]!=r.children[i]||this.children[i+1]!=r.children[i+1]||!this.children[i+2].eq(r.children[i+2]))return!1;return!0}},{key:"locals",value:function locals(r){return removeOverlap(this.localsInner(r))}},{key:"localsInner",value:function localsInner(r){if(this==De)return Ne;if(r.inlineContent||!this.local.some(Pe.is))return this.local;for(var o=[],i=0;i<this.local.length;i++)this.local[i].type instanceof Pe||o.push(this.local[i]);return o}},{key:"forEachSet",value:function forEachSet(r){r(this)}}],[{key:"create",value:function create(r,o){return o.length?buildTree(o,r,0,Re):De}}]),DecorationSet}();Ie.empty=new Ie([],[]),Ie.removeOverlap=removeOverlap;var De=Ie.empty,Le=function(){function DecorationGroup(r){_classCallCheck(this,DecorationGroup),this.members=r}return _createClass(DecorationGroup,[{key:"map",value:function map(r,o){var i=this.members.map(function(i){return i.map(r,o,Re)});return DecorationGroup.from(i)}},{key:"forChild",value:function forChild(r,o){if(o.isLeaf)return Ie.empty;for(var i=[],a=0;a<this.members.length;a++){var c=this.members[a].forChild(r,o);c!=De&&(c instanceof DecorationGroup?i=i.concat(c.members):i.push(c))}return DecorationGroup.from(i)}},{key:"eq",value:function eq(r){if(!(r instanceof DecorationGroup)||r.members.length!=this.members.length)return!1;for(var o=0;o<this.members.length;o++)if(!this.members[o].eq(r.members[o]))return!1;return!0}},{key:"locals",value:function locals(r){for(var o,i=!0,a=0;a<this.members.length;a++){var locals=this.members[a].localsInner(r);if(locals.length)if(o){i&&(o=o.slice(),i=!1);for(var c=0;c<locals.length;c++)o.push(locals[c])}else o=locals}return o?removeOverlap(i?o:o.sort(byPos)):Ne}},{key:"forEachSet",value:function forEachSet(r){for(var o=0;o<this.members.length;o++)this.members[o].forEachSet(r)}}],[{key:"from",value:function from(r){switch(r.length){case 0:return De;case 1:return r[0];default:return new DecorationGroup(r.every(function(r){return r instanceof Ie})?r:r.reduce(function(r,o){return r.concat(o instanceof Ie?o:o.members)},[]))}}}]),DecorationGroup}();function mapChildren(r,o,i,a,c,u,p){for(var g=r.slice(),v=function _loop4(r){var o=0;i.maps[b].forEach(function(i,a,c,u){for(var p=u-c-(a-i),v=0;v<g.length;v+=3){var b=g[v+1];if(!(b<0||i>b+r-o)){var k=g[v]+r-o;a>=k?g[v+1]=i<=k?-2:-1:i>=r&&p&&(g[v]+=p,g[v+1]+=p)}}o+=p}),r=i.maps[b].map(r,-1),k=r},b=0,k=u;b<i.maps.length;b++)v(k);for(var E=!1,w=0;w<g.length;w+=3)if(g[w+1]<0){if(-2==g[w+1]){E=!0,g[w+1]=-1;continue}var x=i.map(r[w]+u),C=x-c;if(C<0||C>=a.content.size){E=!0;continue}var _=i.map(r[w+1]+u,-1)-c,T=a.content.findIndex(C),P=T.index,A=T.offset,N=a.maybeChild(P);if(N&&A==C&&A+N.nodeSize==_){var R=g[w+2].mapInner(i,N,x+1,r[w]+u+1,p);R!=De?(g[w]=C,g[w+1]=_,g[w+2]=R):(g[w+1]=-2,E=!0)}else E=!0}if(E){var I=function mapAndGatherRemainingDecorations(r,o,i,a,c,u,p){function gather(r,o){for(var u=0;u<r.local.length;u++){var g=r.local[u].map(a,c,o);g?i.push(g):p.onRemove&&p.onRemove(r.local[u].spec)}for(var v=0;v<r.children.length;v+=3)gather(r.children[v+2],r.children[v]+o+1)}for(var g=0;g<r.length;g+=3)-1==r[g+1]&&gather(r[g+2],o[g]+u+1);return i}(g,r,o,i,c,u,p),L=buildTree(I,a,0,p);o=L.local;for(var z=0;z<g.length;z+=3)g[z+1]<0&&(g.splice(z,3),z-=3);for(var j=0,B=0;j<L.children.length;j+=3){for(var V=L.children[j];B<g.length&&g[B]<V;)B+=3;g.splice(B,0,L.children[j],L.children[j+1],L.children[j+2])}}return new Ie(o.sort(byPos),g)}function moveSpans(r,o){if(!o||!r.length)return r;for(var i=[],a=0;a<r.length;a++){var c=r[a];i.push(new Me(c.from+o,c.to+o,c.type))}return i}function takeSpansForNode(r,o,i){if(o.isLeaf)return null;for(var a,c=i+o.nodeSize,u=null,p=0;p<r.length;p++)(a=r[p])&&a.from>i&&a.to<c&&((u||(u=[])).push(a),r[p]=null);return u}function withoutNulls(r){for(var o=[],i=0;i<r.length;i++)null!=r[i]&&o.push(r[i]);return o}function buildTree(r,o,i,a){var c=[],u=!1;o.forEach(function(o,p){var g=takeSpansForNode(r,o,p+i);if(g){u=!0;var v=buildTree(g,o,i+p+1,a);v!=De&&c.push(p,p+o.nodeSize,v)}});for(var p=moveSpans(u?withoutNulls(r):r,-i).sort(byPos),g=0;g<p.length;g++)p[g].type.valid(o,p[g])||(a.onRemove&&a.onRemove(p[g].spec),p.splice(g--,1));return p.length||c.length?new Ie(p,c):De}function byPos(r,o){return r.from-o.from||r.to-o.to}function removeOverlap(r){for(var o=r,i=0;i<o.length-1;i++){var a=o[i];if(a.from!=a.to)for(var c=i+1;c<o.length;c++){var u=o[c];if(u.from!=a.from){u.from<a.to&&(o==r&&(o=r.slice()),o[i]=a.copy(a.from,u.from),insertAhead(o,c,a.copy(u.from,a.to)));break}u.to!=a.to&&(o==r&&(o=r.slice()),o[c]=u.copy(u.from,a.to),insertAhead(o,c+1,u.copy(a.to,u.to)))}}return o}function insertAhead(r,o,i){for(;o<r.length&&byPos(i,r[o])>0;)o++;r.splice(o,0,i)}function viewDecorations(r){var o=[];return r.someProp("decorations",function(i){var a=i(r.state);a&&a!=De&&o.push(a)}),r.cursorWrapper&&o.push(Ie.create(r.state.doc,[r.cursorWrapper.deco])),Le.from(o)}var Fe={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},ze=N&&R<=11,je=function(){function SelectionState(){_classCallCheck(this,SelectionState),this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}return _createClass(SelectionState,[{key:"set",value:function set(r){this.anchorNode=r.anchorNode,this.anchorOffset=r.anchorOffset,this.focusNode=r.focusNode,this.focusOffset=r.focusOffset}},{key:"clear",value:function clear(){this.anchorNode=this.focusNode=null}},{key:"eq",value:function eq(r){return r.anchorNode==this.anchorNode&&r.anchorOffset==this.anchorOffset&&r.focusNode==this.focusNode&&r.focusOffset==this.focusOffset}}]),SelectionState}(),Be=function(){function DOMObserver(r,o){var i=this;_classCallCheck(this,DOMObserver),this.view=r,this.handleDOMChange=o,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new je,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(function(o){for(var a=0;a<o.length;a++)i.queue.push(o[a]);N&&R<=11&&o.some(function(r){return"childList"==r.type&&r.removedNodes.length||"characterData"==r.type&&r.oldValue.length>r.target.nodeValue.length})?i.flushSoon():B&&r.composing&&o.some(function(r){return"childList"==r.type&&"TR"==r.target.nodeName})?(r.input.badSafariComposition=!0,i.flushSoon()):i.flush()}),ze&&(this.onCharData=function(r){i.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),i.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}return _createClass(DOMObserver,[{key:"flushSoon",value:function flushSoon(){var r=this;this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(function(){r.flushingSoon=-1,r.flush()},20))}},{key:"forceFlush",value:function forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}},{key:"start",value:function start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,Fe)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}},{key:"stop",value:function stop(){var r=this;if(this.observer){var o=this.observer.takeRecords();if(o.length){for(var i=0;i<o.length;i++)this.queue.push(o[i]);window.setTimeout(function(){return r.flush()},20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}},{key:"connectSelection",value:function connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}},{key:"disconnectSelection",value:function disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}},{key:"suppressSelectionUpdates",value:function suppressSelectionUpdates(){var r=this;this.suppressingSelectionUpdates=!0,setTimeout(function(){return r.suppressingSelectionUpdates=!1},50)}},{key:"onSelectionChange",value:function onSelectionChange(){if(hasFocusAndSelection(this.view)){if(this.suppressingSelectionUpdates)return selectionToDOM(this.view);if(N&&R<=11&&!this.view.state.selection.empty){var r=this.view.domSelectionRange();if(r.focusNode&&k(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset))return this.flushSoon()}this.flush()}}},{key:"setCurSelection",value:function setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}},{key:"ignoreSelectionChange",value:function ignoreSelectionChange(r){if(!r.focusNode)return!0;for(var o,i=new Set,a=r.focusNode;a;a=g(a))i.add(a);for(var c=r.anchorNode;c;c=g(c))if(i.has(c)){o=c;break}var u=o&&this.view.docView.nearestDesc(o);return u&&u.ignoreMutation({type:"selection",target:3==o.nodeType?o.parentNode:o})?(this.setCurSelection(),!0):void 0}},{key:"pendingRecords",value:function pendingRecords(){if(this.observer){var r,o=_createForOfIteratorHelper(this.observer.takeRecords());try{for(o.s();!(r=o.n()).done;){var i=r.value;this.queue.push(i)}}catch(r){o.e(r)}finally{o.f()}}return this.queue}},{key:"flush",value:function flush(){var r=this.view;if(r.docView&&!(this.flushingSoon>-1)){var o=this.pendingRecords();o.length&&(this.queue=[]);var i=r.domSelectionRange(),c=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(i)&&hasFocusAndSelection(r)&&!this.ignoreSelectionChange(i),u=-1,p=-1,g=!1,v=[];if(r.editable)for(var b=0;b<o.length;b++){var k=this.registerMutation(o[b],v);k&&(u=u<0?k.from:Math.min(k.from,u),p=p<0?k.to:Math.max(k.to,p),k.typeOver&&(g=!0))}if(!v.some(function(r){return"BR"==r.nodeName})||8!=r.input.lastKeyCode&&46!=r.input.lastKeyCode){if(I&&v.length){var E=v.filter(function(r){return"BR"==r.nodeName});if(2==E.length){var x=_slicedToArray(E,2),C=x[0],_=x[1];C.parentNode&&C.parentNode.parentNode==_.parentNode?_.remove():C.remove()}else{var T,P=this.currentSelection.focusNode,A=_createForOfIteratorHelper(E);try{for(A.s();!(T=A.n()).done;){var N=T.value,R=N.parentNode;!R||"LI"!=R.nodeName||P&&blockParent(r,P)==R||N.remove()}}catch(r){A.e(r)}finally{A.f()}}}}else{var L,z=_createForOfIteratorHelper(v);try{for(z.s();!(L=z.n()).done;){var j=L.value;if("BR"==j.nodeName&&j.parentNode){var B=j.nextSibling;B&&1==B.nodeType&&"false"==B.contentEditable&&j.parentNode.removeChild(j)}}}catch(r){z.e(r)}finally{z.f()}}var V=null;u<0&&c&&r.input.lastFocus>Date.now()-200&&Math.max(r.input.lastTouch,r.input.lastClick.time)<Date.now()-300&&w(i)&&(V=selectionFromDOM(r))&&V.eq(a.Selection.near(r.state.doc.resolve(0),1))?(r.input.lastFocus=0,selectionToDOM(r),this.currentSelection.set(i),r.scrollToSelection()):(u>-1||c)&&(u>-1&&(r.docView.markDirty(u,p),function checkCSS(r){if(Ve.has(r))return;if(Ve.set(r,null),-1!==["normal","nowrap","pre-line"].indexOf(getComputedStyle(r.dom).whiteSpace)){if(r.requiresGeckoHackNode=I,$e)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),$e=!0}}(r)),r.input.badSafariComposition&&(r.input.badSafariComposition=!1,function fixUpBadSafariComposition(r,o){var i,a,c=r.domSelectionRange(),u=c.focusNode,p=c.focusOffset,g=_createForOfIteratorHelper(o);try{for(g.s();!(a=g.n()).done;){var v=a.value;if("TR"==(null===(i=v.parentNode)||void 0===i?void 0:i.nodeName)){for(var b=v.nextSibling;b&&"TD"!=b.nodeName&&"TH"!=b.nodeName;)b=b.nextSibling;if(b){for(var k=b;;){var E=k.firstChild;if(!E||1!=E.nodeType||"false"==E.contentEditable||/^(BR|IMG)$/.test(E.nodeName))break;k=E}k.insertBefore(v,k.firstChild),u==v&&r.domSelection().collapse(v,p)}else v.parentNode.removeChild(v)}}}catch(r){g.e(r)}finally{g.f()}}(r,v)),this.handleDOMChange(u,p,g,v),r.docView&&r.docView.dirty?r.updateState(r.state):this.currentSelection.eq(i)||selectionToDOM(r),this.currentSelection.set(i))}}},{key:"registerMutation",value:function registerMutation(r,o){if(o.indexOf(r.target)>-1)return null;var i=this.view.docView.nearestDesc(r.target);if("attributes"==r.type&&(i==this.view.docView||"contenteditable"==r.attributeName||"style"==r.attributeName&&!r.oldValue&&!r.target.getAttribute("style")))return null;if(!i||i.ignoreMutation(r))return null;if("childList"==r.type){for(var a=0;a<r.addedNodes.length;a++){var c=r.addedNodes[a];o.push(c),3==c.nodeType&&(this.lastChangedTextNode=c)}if(i.contentDOM&&i.contentDOM!=i.dom&&!i.contentDOM.contains(r.target))return{from:i.posBefore,to:i.posAfter};var u=r.previousSibling,g=r.nextSibling;if(N&&R<=11&&r.addedNodes.length)for(var v=0;v<r.addedNodes.length;v++){var b=r.addedNodes[v],k=b.previousSibling,E=b.nextSibling;(!k||Array.prototype.indexOf.call(r.addedNodes,k)<0)&&(u=k),(!E||Array.prototype.indexOf.call(r.addedNodes,E)<0)&&(g=E)}var w=u&&u.parentNode==r.target?p(u)+1:0,x=i.localPosFromDOM(r.target,w,-1),C=g&&g.parentNode==r.target?p(g):r.target.childNodes.length;return{from:x,to:i.localPosFromDOM(r.target,C,1)}}return"attributes"==r.type?{from:i.posAtStart-i.border,to:i.posAtEnd+i.border}:(this.lastChangedTextNode=r.target,{from:i.posAtStart,to:i.posAtEnd,typeOver:r.target.nodeValue==r.oldValue})}}]),DOMObserver}(),Ve=new WeakMap,$e=!1;function rangeToSelectionRange(r,o){var i=o.startContainer,a=o.startOffset,c=o.endContainer,u=o.endOffset,p=r.domAtPos(r.state.selection.anchor);if(k(p.node,p.offset,c,u)){var g=[c,u,i,a];i=g[0],a=g[1],c=g[2],u=g[3]}return{anchorNode:i,anchorOffset:a,focusNode:c,focusOffset:u}}function blockParent(r,o){for(var i=o.parentNode;i&&i!=r.dom;i=i.parentNode){var a=r.docView.nearestDesc(i,!0);if(a&&a.node.isBlock)return i}return null}function ruleFromNode(r){var o=r.pmViewDesc;if(o)return o.parseRule();if("BR"==r.nodeName&&r.parentNode){if(B&&/^(ul|ol)$/i.test(r.parentNode.nodeName)){var i=document.createElement("div");return i.appendChild(document.createElement("li")),{skip:i}}if(r.parentNode.lastChild==r||B&&/^(tr|table)$/i.test(r.parentNode.nodeName))return{ignore:!0}}else if("IMG"==r.nodeName&&r.getAttribute("mark-placeholder"))return{ignore:!0};return null}var Ue=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function readDOMChange(r,o,i,u,p){var g=r.input.compositionPendingChanges||(r.composing?r.input.compositionID:0);if(r.input.compositionPendingChanges=0,o<0){var v=r.input.lastSelectionTime>Date.now()-50?r.input.lastSelectionOrigin:null,b=selectionFromDOM(r,v);if(b&&!r.state.selection.eq(b)){if(z&&W&&13===r.input.lastKeyCode&&Date.now()-100<r.input.lastKeyCodeTime&&r.someProp("handleKeyDown",function(o){return o(r,keyEvent(13,"Enter"))}))return;var k=r.state.tr.setSelection(b);"pointer"==v?k.setMeta("pointer",!0):"key"==v&&k.scrollIntoView(),g&&k.setMeta("composition",g),r.dispatch(k)}}else{var E=r.state.doc.resolve(o),x=E.sharedDepth(i);o=E.before(x+1),i=r.state.doc.resolve(i).after(x+1);var C,_,T=r.state.selection,P=function parseBetween(r,o,i){var a,u=r.docView.parseRange(o,i),p=u.node,g=u.fromOffset,v=u.toOffset,b=u.from,k=u.to,E=r.domSelectionRange(),x=E.anchorNode;if(x&&r.dom.contains(1==x.nodeType?x:x.parentNode)&&(a=[{node:x,offset:E.anchorOffset}],w(E)||a.push({node:E.focusNode,offset:E.focusOffset})),z&&8===r.input.lastKeyCode)for(var C=v;C>g;C--){var _=p.childNodes[C-1],T=_.pmViewDesc;if("BR"==_.nodeName&&!T){v=C;break}if(!T||T.size)break}var P=r.state.doc,A=r.someProp("domParser")||c.DOMParser.fromSchema(r.state.schema),N=P.resolve(b),R=null,I=A.parse(p,{topNode:N.parent,topMatch:N.parent.contentMatchAt(N.index()),topOpen:!0,from:g,to:v,preserveWhitespace:"pre"!=N.parent.type.whitespace||"full",findPositions:a,ruleFromNode:ruleFromNode,context:N});if(a&&null!=a[0].pos){var L=a[0].pos,j=a[1]&&a[1].pos;null==j&&(j=L),R={anchor:L+b,head:j+b}}return{doc:I,sel:R,from:b,to:k}}(r,o,i),A=r.state.doc,I=A.slice(P.from,P.to);8===r.input.lastKeyCode&&Date.now()-100<r.input.lastKeyCodeTime?(C=r.state.selection.to,_="end"):(C=r.state.selection.from,_="start"),r.input.lastKeyCode=null;var L=function findDiff(r,o,i,a,c){var u=r.findDiffStart(o,i);if(null==u)return null;var p=r.findDiffEnd(o,i+r.size,i+o.size),g=p.a,v=p.b;if("end"==c){a-=g+Math.max(0,u-Math.min(g,v))-u}if(g<u&&r.size<o.size){var b=a<=u&&a>=g?u-a:0;(u-=b)&&u<o.size&&isSurrogatePair(o.textBetween(u-1,u+1))&&(u+=b?1:-1),v=u+(v-g),g=u}else if(v<u){var k=a<=u&&a>=v?u-a:0;(u-=k)&&u<r.size&&isSurrogatePair(r.textBetween(u-1,u+1))&&(u+=k?1:-1),g=u+(g-v),v=u}return{start:u,endA:g,endB:v}}(I.content,P.doc.content,P.from,C,_);if(L&&r.input.domChangeCount++,(V&&r.input.lastIOSEnter>Date.now()-225||W)&&p.some(function(r){return 1==r.nodeType&&!Ue.test(r.nodeName)})&&(!L||L.endA>=L.endB)&&r.someProp("handleKeyDown",function(o){return o(r,keyEvent(13,"Enter"))}))r.input.lastIOSEnter=0;else{if(!L){if(!(u&&T instanceof a.TextSelection&&!T.empty&&T.$head.sameParent(T.$anchor))||r.composing||P.sel&&P.sel.anchor!=P.sel.head){if(P.sel){var j=resolveSelection(r,r.state.doc,P.sel);if(j&&!j.eq(r.state.selection)){var B=r.state.tr.setSelection(j);g&&B.setMeta("composition",g),r.dispatch(B)}}return}L={start:T.from,endA:T.to,endB:T.to}}r.state.selection.from<r.state.selection.to&&L.start==L.endB&&r.state.selection instanceof a.TextSelection&&(L.start>r.state.selection.from&&L.start<=r.state.selection.from+2&&r.state.selection.from>=P.from?L.start=r.state.selection.from:L.endA<r.state.selection.to&&L.endA>=r.state.selection.to-2&&r.state.selection.to<=P.to&&(L.endB+=r.state.selection.to-L.endA,L.endA=r.state.selection.to)),N&&R<=11&&L.endB==L.start+1&&L.endA==L.start&&L.start>P.from&&" "==P.doc.textBetween(L.start-P.from-1,L.start-P.from+1)&&(L.start--,L.endA--,L.endB--);var U=P.doc.resolveNoCache(L.start-P.from),H=P.doc.resolveNoCache(L.endB-P.from),K=A.resolve(L.start),G=U.sameParent(H)&&U.parent.inlineContent&&K.end()>=L.endA;if((V&&r.input.lastIOSEnter>Date.now()-225&&(!G||p.some(function(r){return"DIV"==r.nodeName||"P"==r.nodeName}))||!G&&U.pos<P.doc.content.size&&(!U.sameParent(H)||!U.parent.inlineContent)&&U.pos<H.pos&&!/\S/.test(P.doc.textBetween(U.pos,H.pos,"","")))&&r.someProp("handleKeyDown",function(o){return o(r,keyEvent(13,"Enter"))}))r.input.lastIOSEnter=0;else if(r.state.selection.anchor>L.start&&function looksLikeBackspace(r,o,i,a,c){if(i-o<=c.pos-a.pos||skipClosingAndOpening(a,!0,!1)<c.pos)return!1;var u=r.resolve(o);if(!a.parent.isTextblock){var p=u.nodeAfter;return null!=p&&i==o+p.nodeSize}if(u.parentOffset<u.parent.content.size||!u.parent.isTextblock)return!1;var g=r.resolve(skipClosingAndOpening(u,!0,!0));return!(!g.parent.isTextblock||g.pos>i||skipClosingAndOpening(g,!0,!1)<i)&&a.parent.content.cut(a.parentOffset).eq(g.parent.content)}(A,L.start,L.endA,U,H)&&r.someProp("handleKeyDown",function(o){return o(r,keyEvent(8,"Backspace"))}))W&&z&&r.domObserver.suppressSelectionUpdates();else{z&&L.endB==L.start&&(r.input.lastChromeDelete=Date.now()),W&&!G&&U.start()!=H.start()&&0==H.parentOffset&&U.depth==H.depth&&P.sel&&P.sel.anchor==P.sel.head&&P.sel.head==L.endA&&(L.endB-=2,H=P.doc.resolveNoCache(L.endB-P.from),setTimeout(function(){r.someProp("handleKeyDown",function(o){return o(r,keyEvent(13,"Enter"))})},20));var J,Y=L.start,X=L.endA,Q=function mkTr(o){var i=o||r.state.tr.replace(Y,X,P.doc.slice(L.start-P.from,L.endB-P.from));if(P.sel){var a=resolveSelection(r,i.doc,P.sel);a&&!(z&&r.composing&&a.empty&&(L.start!=L.endB||r.input.lastChromeDelete<Date.now()-100)&&(a.head==Y||a.head==i.mapping.map(X)-1)||N&&a.empty&&a.head==Y)&&i.setSelection(a)}return g&&i.setMeta("composition",g),i.scrollIntoView()};if(G)if(U.pos==H.pos){N&&R<=11&&0==U.parentOffset&&(r.domObserver.suppressSelectionUpdates(),setTimeout(function(){return selectionToDOM(r)},20));var Z=Q(r.state.tr.delete(Y,X)),ee=A.resolve(L.start).marksAcross(A.resolve(L.endA));ee&&Z.ensureMarks(ee),r.dispatch(Z)}else if(L.endA==L.endB&&(J=function isMarkChange(r,o){for(var i,a,u,p=r.firstChild.marks,g=o.firstChild.marks,v=p,b=g,k=0;k<g.length;k++)v=g[k].removeFromSet(v);for(var E=0;E<p.length;E++)b=p[E].removeFromSet(b);if(1==v.length&&0==b.length)a=v[0],i="add",u=function update(r){return r.mark(a.addToSet(r.marks))};else{if(0!=v.length||1!=b.length)return null;a=b[0],i="remove",u=function update(r){return r.mark(a.removeFromSet(r.marks))}}for(var w=[],x=0;x<o.childCount;x++)w.push(u(o.child(x)));if(c.Fragment.from(w).eq(r))return{mark:a,type:i}}(U.parent.content.cut(U.parentOffset,H.parentOffset),K.parent.content.cut(K.parentOffset,L.endA-K.start())))){var te=Q(r.state.tr);"add"==J.type?te.addMark(Y,X,J.mark):te.removeMark(Y,X,J.mark),r.dispatch(te)}else if(U.parent.child(U.index()).isText&&U.index()==H.index()-(H.textOffset?0:1)){var ne=U.parent.textBetween(U.parentOffset,H.parentOffset),re=function deflt(){return Q(r.state.tr.insertText(ne,Y,X))};r.someProp("handleTextInput",function(o){return o(r,Y,X,ne,re)})||r.dispatch(re())}else r.dispatch(Q());else r.dispatch(Q())}}}}function resolveSelection(r,o,i){return Math.max(i.anchor,i.head)>o.content.size?null:selectionBetween(r,o.resolve(i.anchor),o.resolve(i.head))}function skipClosingAndOpening(r,o,i){for(var a=r.depth,c=o?r.end():r.pos;a>0&&(o||r.indexAfter(a)==r.node(a).childCount);)a--,c++,o=!1;if(i)for(var u=r.node(a).maybeChild(r.indexAfter(a));u&&!u.isLeaf;)u=u.firstChild,c++;return c}function isSurrogatePair(r){if(2!=r.length)return!1;var o=r.charCodeAt(0),i=r.charCodeAt(1);return o>=56320&&o<=57343&&i>=55296&&i<=56319}var He=parseFromClipboard,We=endComposition,qe=function(){function EditorView(r,o){var i=this;_classCallCheck(this,EditorView),this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new ke,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=o,this.state=o.state,this.directPlugins=o.plugins||[],this.directPlugins.forEach(checkStateComponent),this.dispatch=this.dispatch.bind(this),this.dom=r&&r.mount||document.createElement("div"),r&&(r.appendChild?r.appendChild(this.dom):"function"==typeof r?r(this.dom):r.mount&&(this.mounted=!0)),this.editable=getEditable(this),updateCursorWrapper(this),this.nodeViews=buildNodeViews(this),this.docView=docViewDesc(this.state.doc,computeDocDeco(this),viewDecorations(this),this.dom,this),this.domObserver=new Be(this,function(r,o,a,c){return readDOMChange(i,r,o,a,c)}),this.domObserver.start(),function initInput(r){var o=function _loop2(){var o=ve[i];r.dom.addEventListener(i,r.input.eventHandlers[i]=function(i){!function eventBelongsToView(r,o){if(!o.bubbles)return!0;if(o.defaultPrevented)return!1;for(var i=o.target;i!=r.dom;i=i.parentNode)if(!i||11==i.nodeType||i.pmViewDesc&&i.pmViewDesc.stopEvent(o))return!1;return!0}(r,i)||runCustomHandler(r,i)||!r.editable&&i.type in ye||o(r,i)},be[i]?{passive:!0}:void 0)};for(var i in ve)o();B&&r.dom.addEventListener("input",function(){return null}),ensureListeners(r)}(this),this.updatePluginViews()}return _createClass(EditorView,[{key:"composing",get:function get(){return this.input.composing}},{key:"props",get:function get(){if(this._props.state!=this.state){var r=this._props;for(var o in this._props={},r)this._props[o]=r[o];this._props.state=this.state}return this._props}},{key:"update",value:function update(r){r.handleDOMEvents!=this._props.handleDOMEvents&&ensureListeners(this);var o=this._props;this._props=r,r.plugins&&(r.plugins.forEach(checkStateComponent),this.directPlugins=r.plugins),this.updateStateInner(r.state,o)}},{key:"setProps",value:function setProps(r){var o={};for(var i in this._props)o[i]=this._props[i];for(var a in o.state=this.state,r)o[a]=r[a];this.update(o)}},{key:"updateState",value:function updateState(r){this.updateStateInner(r,this._props)}},{key:"updateStateInner",value:function updateStateInner(r,o){var i,a=this.state,c=!1,u=!1;r.storedMarks&&this.composing&&(clearComposition(this),u=!0),this.state=r;var p=a.plugins!=r.plugins||this._props.plugins!=o.plugins;if(p||this._props.plugins!=o.plugins||this._props.nodeViews!=o.nodeViews){var g=buildNodeViews(this);(function changedNodeViews(r,o){var i=0,a=0;for(var c in r){if(r[c]!=o[c])return!0;i++}for(var u in o)a++;return i!=a})(g,this.nodeViews)&&(this.nodeViews=g,c=!0)}(p||o.handleDOMEvents!=this._props.handleDOMEvents)&&ensureListeners(this),this.editable=getEditable(this),updateCursorWrapper(this);var v=viewDecorations(this),b=computeDocDeco(this),E=a.plugins==r.plugins||a.doc.eq(r.doc)?r.scrollToSelection>a.scrollToSelection?"to selection":"preserve":"reset",w=c||!this.docView.matchesNode(r.doc,b,v);!w&&r.selection.eq(a.selection)||(u=!0);var x="preserve"==E&&u&&null==this.dom.style.overflowAnchor&&function storeScrollPos(r){for(var o,i,a=r.dom.getBoundingClientRect(),c=Math.max(0,a.top),u=(a.left+a.right)/2,p=c+1;p<Math.min(innerHeight,a.bottom);p+=5){var g=r.root.elementFromPoint(u,p);if(g&&g!=r.dom&&r.dom.contains(g)){var v=g.getBoundingClientRect();if(v.top>=c-20){o=g,i=v.top;break}}}return{refDOM:o,refTop:i,stack:scrollStack(r.dom)}}(this);if(u){this.domObserver.stop();var C=w&&(N||z)&&!this.composing&&!a.selection.empty&&!r.selection.empty&&function selectionContextChanged(r,o){var i=Math.min(r.$anchor.sharedDepth(r.head),o.$anchor.sharedDepth(o.head));return r.$anchor.start(i)!=o.$anchor.start(i)}(a.selection,r.selection);if(w){var _=z?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=findCompositionNode(this)),!c&&this.docView.update(r.doc,b,v,this)||(this.docView.updateOuterDeco(b),this.docView.destroy(),this.docView=docViewDesc(r.doc,b,v,this.dom,this)),!_||this.trackWrites&&this.dom.contains(this.trackWrites)||(C=!0)}C||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&function anchorInRightPlace(r){var o=r.docView.domFromPos(r.state.selection.anchor,0),i=r.domSelectionRange();return k(o.node,o.offset,i.anchorNode,i.anchorOffset)}(this))?selectionToDOM(this,C):(syncNodeSelection(this,r.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(a),(null===(i=this.dragging)||void 0===i?void 0:i.node)&&!a.doc.eq(r.doc)&&this.updateDraggedNode(this.dragging,a),"reset"==E?this.dom.scrollTop=0:"to selection"==E?this.scrollToSelection():x&&function resetScrollPos(r){var o=r.refDOM,i=r.refTop,a=r.stack,c=o?o.getBoundingClientRect().top:0;restoreScrollStack(a,0==c?0:c-i)}(x)}},{key:"scrollToSelection",value:function scrollToSelection(){var r=this,o=this.domSelectionRange().focusNode;if(o&&this.dom.contains(1==o.nodeType?o:o.parentNode))if(this.someProp("handleScrollToSelection",function(o){return o(r)}));else if(this.state.selection instanceof a.NodeSelection){var i=this.docView.domAfterPos(this.state.selection.from);1==i.nodeType&&scrollRectIntoView(this,i.getBoundingClientRect(),o)}else scrollRectIntoView(this,this.coordsAtPos(this.state.selection.head,1),o);else;}},{key:"destroyPluginViews",value:function destroyPluginViews(){for(var r;r=this.pluginViews.pop();)r.destroy&&r.destroy()}},{key:"updatePluginViews",value:function updatePluginViews(r){if(r&&r.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(var o=0;o<this.pluginViews.length;o++){var i=this.pluginViews[o];i.update&&i.update(this,r)}else{this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(var a=0;a<this.directPlugins.length;a++){var c=this.directPlugins[a];c.spec.view&&this.pluginViews.push(c.spec.view(this))}for(var u=0;u<this.state.plugins.length;u++){var p=this.state.plugins[u];p.spec.view&&this.pluginViews.push(p.spec.view(this))}}}},{key:"updateDraggedNode",value:function updateDraggedNode(r,o){var i=r.node,c=-1;if(this.state.doc.nodeAt(i.from)==i.node)c=i.from;else{var u=i.from+(this.state.doc.content.size-o.doc.content.size);(u>0&&this.state.doc.nodeAt(u))==i.node&&(c=u)}this.dragging=new Ce(r.slice,r.move,c<0?void 0:a.NodeSelection.create(this.state.doc,c))}},{key:"someProp",value:function someProp(r,o){var i,a=this._props&&this._props[r];if(null!=a&&(i=o?o(a):a))return i;for(var c=0;c<this.directPlugins.length;c++){var u=this.directPlugins[c].props[r];if(null!=u&&(i=o?o(u):u))return i}var p=this.state.plugins;if(p)for(var g=0;g<p.length;g++){var v=p[g].props[r];if(null!=v&&(i=o?o(v):v))return i}}},{key:"hasFocus",value:function hasFocus(){if(N){var r=this.root.activeElement;if(r==this.dom)return!0;if(!r||!this.dom.contains(r))return!1;for(;r&&this.dom!=r&&this.dom.contains(r);){if("false"==r.contentEditable)return!1;r=r.parentElement}return!0}return this.root.activeElement==this.dom}},{key:"focus",value:function focus(){this.domObserver.stop(),this.editable&&function focusPreventScroll(r){if(r.setActive)return r.setActive();if(J)return r.focus(J);var o=scrollStack(r);r.focus(null==J?{get preventScroll(){return J={preventScroll:!0},!0}}:void 0),J||(J=!1,restoreScrollStack(o,0))}(this.dom),selectionToDOM(this),this.domObserver.start()}},{key:"root",get:function get(){var r=this,o=this._root;if(null==o)for(var i,a=function _loop5(o){if(9==o.nodeType||11==o.nodeType&&o.host)return o.getSelection||(Object.getPrototypeOf(o).getSelection=function(){return o.ownerDocument.getSelection()}),{v:r._root=o}},c=this.dom.parentNode;c;c=c.parentNode)if(i=a(c))return i.v;return o||document}},{key:"updateRoot",value:function updateRoot(){this._root=null}},{key:"posAtCoords",value:function posAtCoords(r){return _posAtCoords(this,r)}},{key:"coordsAtPos",value:function coordsAtPos(r){return _coordsAtPos(this,r,arguments.length>1&&void 0!==arguments[1]?arguments[1]:1)}},{key:"domAtPos",value:function domAtPos(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.docView.domFromPos(r,o)}},{key:"nodeDOM",value:function nodeDOM(r){var o=this.docView.descAt(r);return o?o.nodeDOM:null}},{key:"posAtDOM",value:function posAtDOM(r,o){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,a=this.docView.posFromDOM(r,o,i);if(null==a)throw new RangeError("DOM position not inside the editor");return a}},{key:"endOfTextblock",value:function endOfTextblock(r,o){return _endOfTextblock(this,o||this.state,r)}},{key:"pasteHTML",value:function pasteHTML(r,o){return doPaste(this,"",r,!1,o||new ClipboardEvent("paste"))}},{key:"pasteText",value:function pasteText(r,o){return doPaste(this,r,null,!0,o||new ClipboardEvent("paste"))}},{key:"serializeForClipboard",value:function serializeForClipboard(r){return _serializeForClipboard(this,r)}},{key:"destroy",value:function destroy(){this.docView&&(function destroyInput(r){for(var o in r.domObserver.stop(),r.input.eventHandlers)r.dom.removeEventListener(o,r.input.eventHandlers[o]);clearTimeout(r.input.composingTimeout),clearTimeout(r.input.lastIOSEnterFallbackTimeout)}(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],viewDecorations(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,function clearReusedRange(){v=null}())}},{key:"isDestroyed",get:function get(){return null==this.docView}},{key:"dispatchEvent",value:function dispatchEvent(r){return function _dispatchEvent(r,o){runCustomHandler(r,o)||!ve[o.type]||!r.editable&&o.type in ye||ve[o.type](r,o)}(this,r)}},{key:"domSelectionRange",value:function domSelectionRange(){var r=this.domSelection();return r?B&&11===this.root.nodeType&&function deepActiveElement(r){for(var o=r.activeElement;o&&o.shadowRoot;)o=o.shadowRoot.activeElement;return o}(this.dom.ownerDocument)==this.dom&&function safariShadowSelectionRange(r,o){if(o.getComposedRanges){var i=o.getComposedRanges(r.root)[0];if(i)return rangeToSelectionRange(r,i)}var a;function read(r){r.preventDefault(),r.stopImmediatePropagation(),a=r.getTargetRanges()[0]}return r.dom.addEventListener("beforeinput",read,!0),document.execCommand("indent"),r.dom.removeEventListener("beforeinput",read,!0),a?rangeToSelectionRange(r,a):null}(this,r)||r:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}},{key:"domSelection",value:function domSelection(){return this.root.getSelection()}}]),EditorView}();function computeDocDeco(r){var o=Object.create(null);return o.class="ProseMirror",o.contenteditable=String(r.editable),r.someProp("attributes",function(i){if("function"==typeof i&&(i=i(r.state)),i)for(var a in i)"class"==a?o.class+=" "+i[a]:"style"==a?o.style=(o.style?o.style+";":"")+i[a]:o[a]||"contenteditable"==a||"nodeName"==a||(o[a]=String(i[a]))}),o.translate||(o.translate="no"),[Me.node(0,r.state.doc.content.size,o)]}function updateCursorWrapper(r){if(r.markCursor){var o=document.createElement("img");o.className="ProseMirror-separator",o.setAttribute("mark-placeholder","true"),o.setAttribute("alt",""),r.cursorWrapper={dom:o,deco:Me.widget(r.state.selection.from,o,{raw:!0,marks:r.markCursor})}}else r.cursorWrapper=null}function getEditable(r){return!r.someProp("editable",function(o){return!1===o(r.state)})}function buildNodeViews(r){var o=Object.create(null);function add(r){for(var i in r)Object.prototype.hasOwnProperty.call(o,i)||(o[i]=r[i])}return r.someProp("nodeViews",add),r.someProp("markViews",add),o}function checkStateComponent(r){if(r.spec.state||r.spec.filterTransaction||r.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}qe.prototype.dispatch=function(r){var o=this._props.dispatchTransaction;o?o.call(this,r):this.updateState(this.state.apply(r))},o.Decoration=Me,o.DecorationSet=Ie,o.EditorView=qe,o.__endComposition=We,o.__parseFromClipboard=He},50976:function(r,o,i){"use strict";var a,c=Object.defineProperty,u=Object.getOwnPropertyDescriptor,p=Object.getOwnPropertyNames,g=Object.prototype.hasOwnProperty,v={};((r,o)=>{for(var i in o)c(r,i,{get:o[i],enumerable:!0})})(v,{Text:()=>b,default:()=>k}),r.exports=(a=v,((r,o,i,a)=>{if(o&&"object"==typeof o||"function"==typeof o)for(let v of p(o))g.call(r,v)||v===i||c(r,v,{get:()=>o[v],enumerable:!(a=u(o,v))||a.enumerable});return r})(c({},"__esModule",{value:!0}),a));var b=i(99248).Node.create({name:"text",group:"inline",parseMarkdown:r=>({type:"text",text:r.text||""}),renderMarkdown:r=>r.text||""}),k=b},54631:function(r,o,i){"use strict";i.r(o),i.d(o,{MultiToken:function(){return MultiToken},Options:function(){return Options},State:function(){return State},createTokenClass:function(){return createTokenClass},find:function(){return find},init:function(){return init},multi:function(){return Ze},options:function(){return Ge},regexp:function(){return je},registerCustomProtocol:function(){return registerCustomProtocol},registerPlugin:function(){return registerPlugin},registerTokenPlugin:function(){return registerTokenPlugin},reset:function(){return reset},stringToArray:function(){return stringToArray},test:function(){return test},text:function(){return Ze},tokenize:function(){return tokenize}});const a="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",c="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",u="numeric",p="ascii",g="alpha",v="asciinumeric",b="alphanumeric",k="domain",E="emoji",w="scheme",x="slashscheme",C="whitespace";function registerGroup(r,o){return r in o||(o[r]=[]),o[r]}function addToGroups(r,o,i){o[u]&&(o[v]=!0,o[b]=!0),o[p]&&(o[v]=!0,o[g]=!0),o[v]&&(o[b]=!0),o[g]&&(o[b]=!0),o[b]&&(o[k]=!0),o[E]&&(o[k]=!0);for(const a in o){const o=registerGroup(a,i);o.indexOf(r)<0&&o.push(r)}}function State(r=null){this.j={},this.jr=[],this.jd=null,this.t=r}State.groups={},State.prototype={accepts(){return!!this.t},go(r){const o=this,i=o.j[r];if(i)return i;for(let i=0;i<o.jr.length;i++){const a=o.jr[i][0],c=o.jr[i][1];if(c&&a.test(r))return c}return o.jd},has(r,o=!1){return o?r in this.j:!!this.go(r)},ta(r,o,i,a){for(let c=0;c<r.length;c++)this.tt(r[c],o,i,a)},tr(r,o,i,a){let c;return a=a||State.groups,o&&o.j?c=o:(c=new State(o),i&&a&&addToGroups(o,i,a)),this.jr.push([r,c]),c},ts(r,o,i,a){let c=this;const u=r.length;if(!u)return c;for(let o=0;o<u-1;o++)c=c.tt(r[o]);return c.tt(r[u-1],o,i,a)},tt(r,o,i,a){a=a||State.groups;const c=this;if(o&&o.j)return c.j[r]=o,o;const u=o;let p,g=c.go(r);if(g?(p=new State,Object.assign(p.j,g.j),p.jr.push.apply(p.jr,g.jr),p.jd=g.jd,p.t=g.t):p=new State,u){if(a)if(p.t&&"string"==typeof p.t){const r=Object.assign(function flagsForToken(r,o){const i={};for(const a in o)o[a].indexOf(r)>=0&&(i[a]=!0);return i}(p.t,a),i);addToGroups(u,r,a)}else i&&addToGroups(u,i,a);p.t=u}return c.j[r]=p,p}};const ta=(r,o,i,a,c)=>r.ta(o,i,a,c),tr=(r,o,i,a,c)=>r.tr(o,i,a,c),ts=(r,o,i,a,c)=>r.ts(o,i,a,c),tt=(r,o,i,a,c)=>r.tt(o,i,a,c),_="WORD",T="UWORD",P="ASCIINUMERICAL",A="ALPHANUMERICAL",N="LOCALHOST",R="TLD",I="UTLD",L="SCHEME",z="SLASH_SCHEME",j="NUM",B="WS",V="NL",U="OPENBRACE",H="CLOSEBRACE",W="OPENBRACKET",K="CLOSEBRACKET",G="OPENPAREN",J="CLOSEPAREN",Y="OPENANGLEBRACKET",X="CLOSEANGLEBRACKET",Q="FULLWIDTHLEFTPAREN",Z="FULLWIDTHRIGHTPAREN",ee="LEFTCORNERBRACKET",te="RIGHTCORNERBRACKET",ne="LEFTWHITECORNERBRACKET",re="RIGHTWHITECORNERBRACKET",oe="FULLWIDTHLESSTHAN",ie="FULLWIDTHGREATERTHAN",ae="AMPERSAND",se="APOSTROPHE",le="ASTERISK",ce="AT",ue="BACKSLASH",pe="BACKTICK",de="CARET",fe="COLON",he="COMMA",me="DOLLAR",ge="DOT",ve="EQUALS",ye="EXCLAMATION",be="HYPHEN",ke="PERCENT",Ee="PIPE",Se="PLUS",we="POUND",xe="QUERY",Ce="QUOTE",_e="FULLWIDTHMIDDLEDOT",Te="SEMI",Oe="SLASH",Pe="TILDE",Ae="UNDERSCORE",Me="EMOJI",Ne="SYM";var Re=Object.freeze({__proto__:null,ALPHANUMERICAL:A,AMPERSAND:ae,APOSTROPHE:se,ASCIINUMERICAL:P,ASTERISK:le,AT:ce,BACKSLASH:ue,BACKTICK:pe,CARET:de,CLOSEANGLEBRACKET:X,CLOSEBRACE:H,CLOSEBRACKET:K,CLOSEPAREN:J,COLON:fe,COMMA:he,DOLLAR:me,DOT:ge,EMOJI:Me,EQUALS:ve,EXCLAMATION:ye,FULLWIDTHGREATERTHAN:ie,FULLWIDTHLEFTPAREN:Q,FULLWIDTHLESSTHAN:oe,FULLWIDTHMIDDLEDOT:_e,FULLWIDTHRIGHTPAREN:Z,HYPHEN:be,LEFTCORNERBRACKET:ee,LEFTWHITECORNERBRACKET:ne,LOCALHOST:N,NL:V,NUM:j,OPENANGLEBRACKET:Y,OPENBRACE:U,OPENBRACKET:W,OPENPAREN:G,PERCENT:ke,PIPE:Ee,PLUS:Se,POUND:we,QUERY:xe,QUOTE:Ce,RIGHTCORNERBRACKET:te,RIGHTWHITECORNERBRACKET:re,SCHEME:L,SEMI:Te,SLASH:Oe,SLASH_SCHEME:z,SYM:Ne,TILDE:Pe,TLD:R,UNDERSCORE:Ae,UTLD:I,UWORD:T,WORD:_,WS:B});const Ie=/[a-z]/,De=/\p{L}/u,Le=/\p{Emoji}/u,Fe=/\d/,ze=/\s/;var je=Object.freeze({__proto__:null,ASCII_LETTER:Ie,DIGIT:Fe,EMOJI:Le,EMOJI_VARIATION:/\ufe0f/,LETTER:De,SPACE:ze});const Be="\r",Ve="\n",$e="️",Ue="",He="";let We=null,qe=null;function run$1(r,o){const i=stringToArray(o.replace(/[A-Z]/g,r=>r.toLowerCase())),a=i.length,c=[];let u=0,p=0;for(;p<a;){let g=r,v=null,b=0,k=null,E=-1,w=-1;for(;p<a&&(v=g.go(i[p]));)g=v,g.accepts()?(E=0,w=0,k=g):E>=0&&(E+=i[p].length,w++),b+=i[p].length,u+=i[p].length,p++;u-=E,p-=w,b-=E,c.push({t:k.t,v:o.slice(u-b,u),s:u-b,e:u})}return c}function stringToArray(r){const o=[],i=r.length;let a=0;for(;a<i;){let c,u=r.charCodeAt(a),p=u<55296||u>56319||a+1===i||(c=r.charCodeAt(a+1))<56320||c>57343?r[a]:r.slice(a,a+2);o.push(p),a+=p.length}return o}function fastts(r,o,i,a,c){let u;const p=o.length;for(let i=0;i<p-1;i++){const p=o[i];r.j[p]?u=r.j[p]:(u=new State(a),u.jr=c.slice(),r.j[p]=u),r=u}return u=new State(i),u.jr=c.slice(),r.j[o[p-1]]=u,u}function decodeTlds(r){const o=[],i=[];let a=0;for(;a<r.length;){let c=0;for(;"0123456789".indexOf(r[a+c])>=0;)c++;if(c>0){o.push(i.join(""));for(let o=parseInt(r.substring(a,a+c),10);o>0;o--)i.pop();a+=c}else i.push(r[a]),a++}return o}const Ke={defaultProtocol:"http",events:null,format:noop,formatHref:noop,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function Options(r,o=null){let i=Object.assign({},Ke);r&&(i=Object.assign(i,r instanceof Options?r.o:r));const a=i.ignoreTags,c=[];for(let r=0;r<a.length;r++)c.push(a[r].toUpperCase());this.o=i,o&&(this.defaultRender=o),this.ignoreTags=c}function noop(r){return r}Options.prototype={o:Ke,ignoreTags:[],defaultRender(r){return r},check(r){return this.get("validate",r.toString(),r)},get(r,o,i){const a=null!=o;let c=this.o[r];return c?("object"==typeof c?(c=i.t in c?c[i.t]:Ke[r],"function"==typeof c&&a&&(c=c(o,i))):"function"==typeof c&&a&&(c=c(o,i.t,i)),c):c},getObj(r,o,i){let a=this.o[r];return"function"==typeof a&&null!=o&&(a=a(o,i.t,i)),a},render(r){const o=r.render(this);return(this.get("render",null,r)||this.defaultRender)(o,r.t,r)}};var Ge=Object.freeze({__proto__:null,Options:Options,defaults:Ke});function MultiToken(r,o){this.t="token",this.v=r,this.tk=o}function createTokenClass(r,o){class Token extends MultiToken{constructor(o,i){super(o,i),this.t=r}}for(const r in o)Token.prototype[r]=o[r];return Token.t=r,Token}MultiToken.prototype={isLink:!1,toString(){return this.v},toHref(r){return this.toString()},toFormattedString(r){const o=this.toString(),i=r.get("truncate",o,this),a=r.get("format",o,this);return i&&a.length>i?a.substring(0,i)+"…":a},toFormattedHref(r){return r.get("formatHref",this.toHref(r.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(r=Ke.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(r),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(r){return{type:this.t,value:this.toFormattedString(r),isLink:this.isLink,href:this.toFormattedHref(r),start:this.startIndex(),end:this.endIndex()}},validate(r){return r.get("validate",this.toString(),this)},render(r){const o=this,i=this.toHref(r.get("defaultProtocol")),a=r.get("formatHref",i,this),c=r.get("tagName",i,o),u=this.toFormattedString(r),p={},g=r.get("className",i,o),v=r.get("target",i,o),b=r.get("rel",i,o),k=r.getObj("attributes",i,o),E=r.getObj("events",i,o);return p.href=a,g&&(p.class=g),v&&(p.target=v),b&&(p.rel=b),k&&Object.assign(p,k),{tagName:c,attributes:p,content:u,eventListeners:E}}};const Je=createTokenClass("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),Ye=createTokenClass("text"),Xe=createTokenClass("nl"),Qe=createTokenClass("url",{isLink:!0,toHref(r=Ke.defaultProtocol){return this.hasProtocol()?this.v:`${r}://${this.v}`},hasProtocol(){const r=this.tk;return r.length>=2&&r[0].t!==N&&r[1].t===fe}});var Ze=Object.freeze({__proto__:null,Base:MultiToken,Email:Je,MultiToken:MultiToken,Nl:Xe,Text:Ye,Url:Qe,createTokenClass:createTokenClass});const makeState=r=>new State(r);function initMultiToken(r,o,i){const a=i[0].s,c=i[i.length-1].e;return new r(o.slice(a,c),i)}const et="undefined"!=typeof console&&console&&console.warn||(()=>{}),nt="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",rt={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function reset(){return State.groups={},rt.scanner=null,rt.parser=null,rt.tokenQueue=[],rt.pluginQueue=[],rt.customSchemes=[],rt.initialized=!1,rt}function registerTokenPlugin(r,o){if("function"!=typeof o)throw new Error(`linkifyjs: Invalid token plugin ${o} (expects function)`);for(let i=0;i<rt.tokenQueue.length;i++)if(r===rt.tokenQueue[i][0])return et(`linkifyjs: token plugin "${r}" already registered - will be overwritten`),void(rt.tokenQueue[i]=[r,o]);rt.tokenQueue.push([r,o]),rt.initialized&&et(`linkifyjs: already initialized - will not register token plugin "${r}" ${nt}`)}function registerPlugin(r,o){if("function"!=typeof o)throw new Error(`linkifyjs: Invalid plugin ${o} (expects function)`);for(let i=0;i<rt.pluginQueue.length;i++)if(r===rt.pluginQueue[i][0])return et(`linkifyjs: plugin "${r}" already registered - will be overwritten`),void(rt.pluginQueue[i]=[r,o]);rt.pluginQueue.push([r,o]),rt.initialized&&et(`linkifyjs: already initialized - will not register plugin "${r}" ${nt}`)}function registerCustomProtocol(r,o=!1){if(rt.initialized&&et(`linkifyjs: already initialized - will not register custom scheme "${r}" ${nt}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(r))throw new Error('linkifyjs: incorrect scheme format.\n1. Must only contain digits, lowercase ASCII letters or "-"\n2. Cannot start or end with "-"\n3. "-" cannot repeat');rt.customSchemes.push([r,o])}function init(){rt.scanner=function init$2(r=[]){const o={};State.groups=o;const i=new State;null==We&&(We=decodeTlds(a)),null==qe&&(qe=decodeTlds(c)),tt(i,"'",se),tt(i,"{",U),tt(i,"}",H),tt(i,"[",W),tt(i,"]",K),tt(i,"(",G),tt(i,")",J),tt(i,"<",Y),tt(i,">",X),tt(i,"(",Q),tt(i,")",Z),tt(i,"「",ee),tt(i,"」",te),tt(i,"『",ne),tt(i,"』",re),tt(i,"<",oe),tt(i,">",ie),tt(i,"&",ae),tt(i,"*",le),tt(i,"@",ce),tt(i,"`",pe),tt(i,"^",de),tt(i,":",fe),tt(i,",",he),tt(i,"$",me),tt(i,".",ge),tt(i,"=",ve),tt(i,"!",ye),tt(i,"-",be),tt(i,"%",ke),tt(i,"|",Ee),tt(i,"+",Se),tt(i,"#",we),tt(i,"?",xe),tt(i,'"',Ce),tt(i,"/",Oe),tt(i,";",Te),tt(i,"~",Pe),tt(i,"_",Ae),tt(i,"\\",ue),tt(i,"・",_e);const je=tr(i,Fe,j,{[u]:!0});tr(je,Fe,je);const Ke=tr(je,Ie,P,{[v]:!0}),Ge=tr(je,De,A,{[b]:!0}),Je=tr(i,Ie,_,{[p]:!0});tr(Je,Fe,Ke),tr(Je,Ie,Je),tr(Ke,Fe,Ke),tr(Ke,Ie,Ke);const Ye=tr(i,De,T,{[g]:!0});tr(Ye,Ie),tr(Ye,Fe,Ge),tr(Ye,De,Ye),tr(Ge,Fe,Ge),tr(Ge,Ie),tr(Ge,De,Ge);const Xe=tt(i,Ve,V,{[C]:!0}),Qe=tt(i,Be,B,{[C]:!0}),Ze=tr(i,ze,B,{[C]:!0});tt(i,He,Ze),tt(Qe,Ve,Xe),tt(Qe,He,Ze),tr(Qe,ze,Ze),tt(Ze,Be),tt(Ze,Ve),tr(Ze,ze,Ze),tt(Ze,He,Ze);const et=tr(i,Le,Me,{[E]:!0});tt(et,"#"),tr(et,Le,et),tt(et,$e,et);const nt=tt(et,Ue);tt(nt,"#"),tr(nt,Le,et);const rt=[[Ie,Je],[Fe,Ke]],ot=[[Ie,null],[De,Ye],[Fe,Ge]];for(let r=0;r<We.length;r++)fastts(i,We[r],R,_,rt);for(let r=0;r<qe.length;r++)fastts(i,qe[r],I,T,ot);addToGroups(R,{tld:!0,ascii:!0},o),addToGroups(I,{utld:!0,alpha:!0},o),fastts(i,"file",L,_,rt),fastts(i,"mailto",L,_,rt),fastts(i,"http",z,_,rt),fastts(i,"https",z,_,rt),fastts(i,"ftp",z,_,rt),fastts(i,"ftps",z,_,rt),addToGroups(L,{scheme:!0,ascii:!0},o),addToGroups(z,{slashscheme:!0,ascii:!0},o),r=r.sort((r,o)=>r[0]>o[0]?1:-1);for(let o=0;o<r.length;o++){const a=r[o][0],c=r[o][1]?{[w]:!0}:{[x]:!0};a.indexOf("-")>=0?c[k]=!0:Ie.test(a)?Fe.test(a)?c[v]=!0:c[p]=!0:c[u]=!0,ts(i,a,a,c)}return ts(i,"localhost",N,{ascii:!0}),i.jd=new State(Ne),{start:i,tokens:Object.assign({groups:o},Re)}}(rt.customSchemes);for(let r=0;r<rt.tokenQueue.length;r++)rt.tokenQueue[r][1]({scanner:rt.scanner});rt.parser=function init$1({groups:r}){const o=r.domain.concat([ae,le,ce,ue,pe,de,me,ve,be,j,ke,Ee,Se,we,Oe,Ne,Pe,Ae]),i=[se,fe,he,ge,ye,ke,xe,Ce,Te,Y,X,U,H,K,W,G,J,Q,Z,ee,te,ne,re,oe,ie],a=[ae,se,le,ue,pe,de,me,ve,be,U,H,ke,Ee,Se,we,xe,Oe,Ne,Pe,Ae],c=makeState(),u=tt(c,Pe);ta(u,a,u),ta(u,r.domain,u);const p=makeState(),g=makeState(),v=makeState();ta(c,r.domain,p),ta(c,r.scheme,g),ta(c,r.slashscheme,v),ta(p,a,u),ta(p,r.domain,p);const b=tt(p,ce);tt(u,ce,b),tt(g,ce,b),tt(v,ce,b);const k=tt(u,ge);ta(k,a,u),ta(k,r.domain,u);const E=makeState();ta(b,r.domain,E),ta(E,r.domain,E);const w=tt(E,ge);ta(w,r.domain,E);const x=makeState(Je);ta(w,r.tld,x),ta(w,r.utld,x),tt(b,N,x);const C=tt(E,be);tt(C,be,C),ta(C,r.domain,E),ta(x,r.domain,E),tt(x,ge,w),tt(x,be,C);const _=tt(x,fe);ta(_,r.numeric,Je);const T=tt(p,be),P=tt(p,ge);tt(T,be,T),ta(T,r.domain,p),ta(P,a,u),ta(P,r.domain,p);const A=makeState(Qe);ta(P,r.tld,A),ta(P,r.utld,A),ta(A,r.domain,p),ta(A,a,u),tt(A,ge,P),tt(A,be,T),tt(A,ce,b);const R=tt(A,fe),I=makeState(Qe);ta(R,r.numeric,I);const L=makeState(Qe),z=makeState();ta(L,o,L),ta(L,i,z),ta(z,o,L),ta(z,i,z),tt(A,Oe,L),tt(I,Oe,L);const B=tt(g,fe),_e=tt(v,fe),Me=tt(_e,Oe),Ie=tt(Me,Oe);ta(g,r.domain,p),tt(g,ge,P),tt(g,be,T),ta(v,r.domain,p),tt(v,ge,P),tt(v,be,T),ta(B,r.domain,L),tt(B,Oe,L),tt(B,xe,L),ta(Ie,r.domain,L),ta(Ie,o,L),tt(Ie,Oe,L);const De=[[U,H],[W,K],[G,J],[Y,X],[Q,Z],[ee,te],[ne,re],[oe,ie]];for(let r=0;r<De.length;r++){const[a,c]=De[r],u=tt(L,a);tt(z,a,u),tt(u,c,L);const p=makeState(Qe);ta(u,o,p);const g=makeState();ta(u,i),ta(p,o,p),ta(p,i,g),ta(g,o,p),ta(g,i,g),tt(p,c,L),tt(g,c,L)}return tt(c,N,A),tt(c,V,Xe),{start:c,tokens:Re}}(rt.scanner.tokens);for(let r=0;r<rt.pluginQueue.length;r++)rt.pluginQueue[r][1]({scanner:rt.scanner,parser:rt.parser});return rt.initialized=!0,rt}function tokenize(r){return rt.initialized||init(),function run(r,o,i){let a=i.length,c=0,u=[],p=[];for(;c<a;){let g=r,v=null,b=null,k=0,E=null,w=-1;for(;c<a&&!(v=g.go(i[c].t));)p.push(i[c++]);for(;c<a&&(b=v||g.go(i[c].t));)v=null,g=b,g.accepts()?(w=0,E=g):w>=0&&w++,c++,k++;if(w<0)c-=k,c<a&&(p.push(i[c]),c++);else{p.length>0&&(u.push(initMultiToken(Ye,o,p)),p=[]),c-=w,k-=w;const r=E.t,a=i.slice(c-k,c);u.push(initMultiToken(r,o,a))}}return p.length>0&&u.push(initMultiToken(Ye,o,p)),u}(rt.parser.start,r,run$1(rt.scanner.start,r))}function find(r,o=null,i=null){if(o&&"object"==typeof o){if(i)throw Error(`linkifyjs: Invalid link type ${o}; must be a string`);i=o,o=null}const a=new Options(i),c=tokenize(r),u=[];for(let r=0;r<c.length;r++){const i=c[r];!i.isLink||o&&i.t!==o||!a.check(i)||u.push(i.toFormattedObject(a))}return u}function test(r,o=null){const i=tokenize(r);return 1===i.length&&i[0].isLink&&(!o||i[0].t===o)}tokenize.scan=run$1},57449:function(r,o,i){"use strict";var a=i(36553),c=i(77712),u=i(37820),p=function deleteSelection(r,o){return!r.selection.empty&&(o&&o(r.tr.deleteSelection().scrollIntoView()),!0)};function atBlockStart(r,o){var i=r.selection.$cursor;return!i||(o?!o.endOfTextblock("backward",r):i.parentOffset>0)?null:i}var g=function joinBackward(r,o,i){var p=atBlockStart(r,i);if(!p)return!1;var g=findCutBefore(p);if(!g){var v=p.blockRange(),b=v&&a.liftTarget(v);return null!=b&&(o&&o(r.tr.lift(v,b).scrollIntoView()),!0)}var k=g.nodeBefore;if(deleteBarrier(r,g,o,-1))return!0;if(0==p.parent.content.size&&(textblockAt(k,"end")||u.NodeSelection.isSelectable(k)))for(var E=p.depth;;E--){var w=a.replaceStep(r.doc,p.before(E),p.after(E),c.Slice.empty);if(w&&w.slice.size<w.to-w.from){if(o){var x=r.tr.step(w);x.setSelection(textblockAt(k,"end")?u.Selection.findFrom(x.doc.resolve(x.mapping.map(g.pos,-1)),-1):u.NodeSelection.create(x.doc,g.pos-k.nodeSize)),o(x.scrollIntoView())}return!0}if(1==E||p.node(E-1).childCount>1)break}return!(!k.isAtom||g.depth!=p.depth-1)&&(o&&o(r.tr.delete(g.pos-k.nodeSize,g.pos).scrollIntoView()),!0)};function joinTextblocksAround(r,o,i){for(var p=o.nodeBefore,g=o.pos-1;!p.isTextblock;g--){if(p.type.spec.isolating)return!1;var v=p.lastChild;if(!v)return!1;p=v}for(var b=o.nodeAfter,k=o.pos+1;!b.isTextblock;k++){if(b.type.spec.isolating)return!1;var E=b.firstChild;if(!E)return!1;b=E}var w=a.replaceStep(r.doc,g,k,c.Slice.empty);if(!w||w.from!=g||w instanceof a.ReplaceStep&&w.slice.size>=k-g)return!1;if(i){var x=r.tr.step(w);x.setSelection(u.TextSelection.create(x.doc,g)),i(x.scrollIntoView())}return!0}function textblockAt(r,o){for(var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=r;a;a="start"==o?a.firstChild:a.lastChild){if(a.isTextblock)return!0;if(i&&1!=a.childCount)return!1}return!1}var v=function selectNodeBackward(r,o,i){var a=r.selection,c=a.$head,p=c;if(!a.empty)return!1;if(c.parent.isTextblock){if(i?!i.endOfTextblock("backward",r):c.parentOffset>0)return!1;p=findCutBefore(c)}var g=p&&p.nodeBefore;return!(!g||!u.NodeSelection.isSelectable(g))&&(o&&o(r.tr.setSelection(u.NodeSelection.create(r.doc,p.pos-g.nodeSize)).scrollIntoView()),!0)};function findCutBefore(r){if(!r.parent.type.spec.isolating)for(var o=r.depth-1;o>=0;o--){if(r.index(o)>0)return r.doc.resolve(r.before(o+1));if(r.node(o).type.spec.isolating)break}return null}function atBlockEnd(r,o){var i=r.selection.$cursor;return!i||(o?!o.endOfTextblock("forward",r):i.parentOffset<i.parent.content.size)?null:i}var b=function joinForward(r,o,i){var p=atBlockEnd(r,i);if(!p)return!1;var g=findCutAfter(p);if(!g)return!1;var v=g.nodeAfter;if(deleteBarrier(r,g,o,1))return!0;if(0==p.parent.content.size&&(textblockAt(v,"start")||u.NodeSelection.isSelectable(v))){var b=a.replaceStep(r.doc,p.before(),p.after(),c.Slice.empty);if(b&&b.slice.size<b.to-b.from){if(o){var k=r.tr.step(b);k.setSelection(textblockAt(v,"start")?u.Selection.findFrom(k.doc.resolve(k.mapping.map(g.pos)),1):u.NodeSelection.create(k.doc,k.mapping.map(g.pos))),o(k.scrollIntoView())}return!0}}return!(!v.isAtom||g.depth!=p.depth-1)&&(o&&o(r.tr.delete(g.pos,g.pos+v.nodeSize).scrollIntoView()),!0)},k=function selectNodeForward(r,o,i){var a=r.selection,c=a.$head,p=c;if(!a.empty)return!1;if(c.parent.isTextblock){if(i?!i.endOfTextblock("forward",r):c.parentOffset<c.parent.content.size)return!1;p=findCutAfter(c)}var g=p&&p.nodeAfter;return!(!g||!u.NodeSelection.isSelectable(g))&&(o&&o(r.tr.setSelection(u.NodeSelection.create(r.doc,p.pos)).scrollIntoView()),!0)};function findCutAfter(r){if(!r.parent.type.spec.isolating)for(var o=r.depth-1;o>=0;o--){var i=r.node(o);if(r.index(o)+1<i.childCount)return r.doc.resolve(r.after(o+1));if(i.type.spec.isolating)break}return null}var E=function newlineInCode(r,o){var i=r.selection,a=i.$head,c=i.$anchor;return!(!a.parent.type.spec.code||!a.sameParent(c))&&(o&&o(r.tr.insertText("\n").scrollIntoView()),!0)};function defaultBlockAt(r){for(var o=0;o<r.edgeCount;o++){var i=r.edge(o).type;if(i.isTextblock&&!i.hasRequiredAttrs())return i}return null}var w=function exitCode(r,o){var i=r.selection,a=i.$head,c=i.$anchor;if(!a.parent.type.spec.code||!a.sameParent(c))return!1;var p=a.node(-1),g=a.indexAfter(-1),v=defaultBlockAt(p.contentMatchAt(g));if(!v||!p.canReplaceWith(g,g,v))return!1;if(o){var b=a.after(),k=r.tr.replaceWith(b,b,v.createAndFill());k.setSelection(u.Selection.near(k.doc.resolve(b),1)),o(k.scrollIntoView())}return!0},x=function createParagraphNear(r,o){var i=r.selection,a=i.$from,c=i.$to;if(i instanceof u.AllSelection||a.parent.inlineContent||c.parent.inlineContent)return!1;var p=defaultBlockAt(c.parent.contentMatchAt(c.indexAfter()));if(!p||!p.isTextblock)return!1;if(o){var g=(!a.parentOffset&&c.index()<c.parent.childCount?a:c).pos,v=r.tr.insert(g,p.createAndFill());v.setSelection(u.TextSelection.create(v.doc,g+1)),o(v.scrollIntoView())}return!0},C=function liftEmptyBlock(r,o){var i=r.selection.$cursor;if(!i||i.parent.content.size)return!1;if(i.depth>1&&i.after()!=i.end(-1)){var c=i.before();if(a.canSplit(r.doc,c))return o&&o(r.tr.split(c).scrollIntoView()),!0}var u=i.blockRange(),p=u&&a.liftTarget(u);return null!=p&&(o&&o(r.tr.lift(u,p).scrollIntoView()),!0)};function splitBlockAs(r){return function(o,i){var c=o.selection,p=c.$from,g=c.$to;if(o.selection instanceof u.NodeSelection&&o.selection.node.isBlock)return!(!p.parentOffset||!a.canSplit(o.doc,p.pos))&&(i&&i(o.tr.split(p.pos).scrollIntoView()),!0);if(!p.depth)return!1;for(var v,b,k=[],E=!1,w=!1,x=p.depth;;x--){if(p.node(x).isBlock){E=p.end(x)==p.pos+(p.depth-x),w=p.start(x)==p.pos-(p.depth-x),b=defaultBlockAt(p.node(x-1).contentMatchAt(p.indexAfter(x-1)));var C=r&&r(g.parent,E,p);k.unshift(C||(E&&b?{type:b}:null)),v=x;break}if(1==x)return!1;k.unshift(null)}var _=o.tr;(o.selection instanceof u.TextSelection||o.selection instanceof u.AllSelection)&&_.deleteSelection();var T=_.mapping.map(p.pos),P=a.canSplit(_.doc,T,k.length,k);if(P||(k[0]=b?{type:b}:null,P=a.canSplit(_.doc,T,k.length,k)),!P)return!1;if(_.split(T,k.length,k),!E&&w&&p.node(v).type!=b){var A=_.mapping.map(p.before(v)),N=_.doc.resolve(A);b&&p.node(v-1).canReplaceWith(N.index(),N.index()+1,b)&&_.setNodeMarkup(_.mapping.map(p.before(v)),b)}return i&&i(_.scrollIntoView()),!0}}var _=splitBlockAs(),T=function selectAll(r,o){return o&&o(r.tr.setSelection(new u.AllSelection(r.doc))),!0};function deleteBarrier(r,o,i,p){var g,v,b=o.nodeBefore,k=o.nodeAfter,E=b.type.spec.isolating||k.type.spec.isolating;if(!E&&function joinMaybeClear(r,o,i){var c=o.nodeBefore,u=o.nodeAfter,p=o.index();return!(!(c&&u&&c.type.compatibleContent(u.type))||(!c.content.size&&o.parent.canReplace(p-1,p)?(i&&i(r.tr.delete(o.pos-c.nodeSize,o.pos).scrollIntoView()),0):!o.parent.canReplace(p,p+1)||!u.isTextblock&&!a.canJoin(r.doc,o.pos)||(i&&i(r.tr.join(o.pos).scrollIntoView()),0)))}(r,o,i))return!0;var w=!E&&o.parent.canReplace(o.index(),o.index()+1);if(w&&(g=(v=b.contentMatchAt(b.childCount)).findWrapping(k.type))&&v.matchType(g[0]||k.type).validEnd){if(i){for(var x=o.pos+k.nodeSize,C=c.Fragment.empty,_=g.length-1;_>=0;_--)C=c.Fragment.from(g[_].create(null,C));C=c.Fragment.from(b.copy(C));var T=r.tr.step(new a.ReplaceAroundStep(o.pos-1,x,o.pos,x,new c.Slice(C,1,0),g.length,!0)),P=T.doc.resolve(x+2*g.length);P.nodeAfter&&P.nodeAfter.type==b.type&&a.canJoin(T.doc,P.pos)&&T.join(P.pos),i(T.scrollIntoView())}return!0}var A=k.type.spec.isolating||p>0&&E?null:u.Selection.findFrom(o,1),N=A&&A.$from.blockRange(A.$to),R=N&&a.liftTarget(N);if(null!=R&&R>=o.depth)return i&&i(r.tr.lift(N,R).scrollIntoView()),!0;if(w&&textblockAt(k,"start",!0)&&textblockAt(b,"end")){for(var I=b,L=[];L.push(I),!I.isTextblock;)I=I.lastChild;for(var z=k,j=1;!z.isTextblock;z=z.firstChild)j++;if(I.canReplace(I.childCount,I.childCount,z.content)){if(i){for(var B=c.Fragment.empty,V=L.length-1;V>=0;V--)B=c.Fragment.from(L[V].copy(B));i(r.tr.step(new a.ReplaceAroundStep(o.pos-L.length,o.pos+k.nodeSize,o.pos+j,o.pos+k.nodeSize-j,new c.Slice(B,L.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function selectTextblockSide(r){return function(o,i){for(var a=o.selection,c=r<0?a.$from:a.$to,p=c.depth;c.node(p).isInline;){if(!p)return!1;p--}return!!c.node(p).isTextblock&&(i&&i(o.tr.setSelection(u.TextSelection.create(o.doc,r<0?c.start(p):c.end(p)))),!0)}}var P=selectTextblockSide(-1),A=selectTextblockSide(1);function chainCommands(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return function(r,i,a){for(var c=0;c<o.length;c++)if(o[c](r,i,a))return!0;return!1}}var N=chainCommands(p,g,v),R=chainCommands(p,b,k),I={Enter:chainCommands(E,x,C,_),"Mod-Enter":w,Backspace:N,"Mod-Backspace":N,"Shift-Backspace":N,Delete:R,"Mod-Delete":R,"Mod-a":T},L={"Ctrl-h":I.Backspace,"Alt-Backspace":I["Mod-Backspace"],"Ctrl-d":I.Delete,"Ctrl-Alt-Backspace":I["Mod-Delete"],"Alt-Delete":I["Mod-Delete"],"Alt-d":I["Mod-Delete"],"Ctrl-a":P,"Ctrl-e":A};for(var z in I)L[z]=I[z];var j=("undefined"!=typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!("undefined"==typeof os||!os.platform)&&"darwin"==os.platform())?L:I;o.autoJoin=function autoJoin(r,o){var i=Array.isArray(o)?function(r){return o.indexOf(r.type.name)>-1}:o;return function(o,c,u){return r(o,c&&function wrapDispatchForJoin(r,o){return function(i){if(!i.isGeneric)return r(i);for(var c=[],u=0;u<i.mapping.maps.length;u++){for(var p=i.mapping.maps[u],g=0;g<c.length;g++)c[g]=p.map(c[g]);p.forEach(function(r,o,i,a){return c.push(i,a)})}for(var v=[],b=0;b<c.length;b+=2)for(var k=c[b],E=c[b+1],w=i.doc.resolve(k),x=w.sharedDepth(E),C=w.node(x),_=w.indexAfter(x),T=w.after(x+1);T<=E;++_){var P=C.maybeChild(_);if(!P)break;if(_&&-1==v.indexOf(T)){var A=C.child(_-1);A.type==P.type&&o(A,P)&&v.push(T)}T+=P.nodeSize}v.sort(function(r,o){return r-o});for(var N=v.length-1;N>=0;N--)a.canJoin(i.doc,v[N])&&i.join(v[N]);r(i)}}(c,i),u)}},o.baseKeymap=j,o.chainCommands=chainCommands,o.createParagraphNear=x,o.deleteSelection=p,o.exitCode=w,o.joinBackward=g,o.joinDown=function joinDown(r,o){var i,c=r.selection;if(c instanceof u.NodeSelection){if(c.node.isTextblock||!a.canJoin(r.doc,c.to))return!1;i=c.to}else if(null==(i=a.joinPoint(r.doc,c.to,1)))return!1;return o&&o(r.tr.join(i).scrollIntoView()),!0},o.joinForward=b,o.joinTextblockBackward=function joinTextblockBackward(r,o,i){var a=atBlockStart(r,i);if(!a)return!1;var c=findCutBefore(a);return!!c&&joinTextblocksAround(r,c,o)},o.joinTextblockForward=function joinTextblockForward(r,o,i){var a=atBlockEnd(r,i);if(!a)return!1;var c=findCutAfter(a);return!!c&&joinTextblocksAround(r,c,o)},o.joinUp=function joinUp(r,o){var i,c=r.selection,p=c instanceof u.NodeSelection;if(p){if(c.node.isTextblock||!a.canJoin(r.doc,c.from))return!1;i=c.from}else if(null==(i=a.joinPoint(r.doc,c.from,-1)))return!1;if(o){var g=r.tr.join(i);p&&g.setSelection(u.NodeSelection.create(g.doc,i-r.doc.resolve(i).nodeBefore.nodeSize)),o(g.scrollIntoView())}return!0},o.lift=function lift(r,o){var i=r.selection,c=i.$from,u=i.$to,p=c.blockRange(u),g=p&&a.liftTarget(p);return null!=g&&(o&&o(r.tr.lift(p,g).scrollIntoView()),!0)},o.liftEmptyBlock=C,o.macBaseKeymap=L,o.newlineInCode=E,o.pcBaseKeymap=I,o.selectAll=T,o.selectNodeBackward=v,o.selectNodeForward=k,o.selectParentNode=function selectParentNode(r,o){var i,a=r.selection,c=a.$from,p=a.to,g=c.sharedDepth(p);return 0!=g&&(i=c.before(g),o&&o(r.tr.setSelection(u.NodeSelection.create(r.doc,i))),!0)},o.selectTextblockEnd=A,o.selectTextblockStart=P,o.setBlockType=function setBlockType(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return function(i,a){for(var c=!1,u=0;u<i.selection.ranges.length&&!c;u++){var p=i.selection.ranges[u],g=p.$from.pos,v=p.$to.pos;i.doc.nodesBetween(g,v,function(a,u){if(c)return!1;if(a.isTextblock&&!a.hasMarkup(r,o))if(a.type==r)c=!0;else{var p=i.doc.resolve(u),g=p.index();c=p.parent.canReplaceWith(g,g+1,r)}})}if(!c)return!1;if(a){for(var b=i.tr,k=0;k<i.selection.ranges.length;k++){var E=i.selection.ranges[k],w=E.$from.pos,x=E.$to.pos;b.setBlockType(w,x,r,o)}a(b.scrollIntoView())}return!0}},o.splitBlock=_,o.splitBlockAs=splitBlockAs,o.splitBlockKeepMarks=function splitBlockKeepMarks(r,o){return _(r,o&&function(i){var a=r.storedMarks||r.selection.$to.parentOffset&&r.selection.$from.marks();a&&i.ensureMarks(a),o(i)})},o.toggleMark=function toggleMark(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2?arguments[2]:void 0,a=!1!==(i&&i.removeWhenPresent),c=!1!==(i&&i.enterInlineAtoms),p=!(i&&i.includeWhitespace);return function(i,g){var v=i.selection,b=v.empty,k=v.$cursor,E=v.ranges;if(b&&!k||!function markApplies(r,o,i,a){for(var c,u=function _loop(){var c=o[p],u=c.$from,g=c.$to,v=0==u.depth&&r.inlineContent&&r.type.allowsMarkType(i);if(r.nodesBetween(u.pos,g.pos,function(r,o){if(v||!a&&r.isAtom&&r.isInline&&o>=u.pos&&o+r.nodeSize<=g.pos)return!1;v=r.inlineContent&&r.type.allowsMarkType(i)}),v)return{v:!0}},p=0;p<o.length;p++)if(c=u())return c.v;return!1}(i.doc,E,r,c))return!1;if(g)if(k)r.isInSet(i.storedMarks||k.marks())?g(i.tr.removeStoredMark(r)):g(i.tr.addStoredMark(r.create(o)));else{var w,x=i.tr;c||(E=function removeInlineAtoms(r){for(var o=[],i=function _loop2(){var i=r[a],c=i.$from,p=i.$to;c.doc.nodesBetween(c.pos,p.pos,function(r,i){if(r.isAtom&&r.content.size&&r.isInline&&i>=c.pos&&i+r.nodeSize<=p.pos)return i+1>c.pos&&o.push(new u.SelectionRange(c,c.doc.resolve(i+1))),c=c.doc.resolve(i+1+r.content.size),!1}),c.pos<p.pos&&o.push(new u.SelectionRange(c,p))},a=0;a<r.length;a++)i();return o}(E)),w=a?!E.some(function(o){return i.doc.rangeHasMark(o.$from.pos,o.$to.pos,r)}):!E.every(function(o){var i=!1;return x.doc.nodesBetween(o.$from.pos,o.$to.pos,function(a,c,u){if(i)return!1;i=!r.isInSet(a.marks)&&!!u&&u.type.allowsMarkType(r)&&!(a.isText&&/^\s*$/.test(a.textBetween(Math.max(0,o.$from.pos-c),Math.min(a.nodeSize,o.$to.pos-c))))}),!i});for(var C=0;C<E.length;C++){var _=E[C],T=_.$from,P=_.$to;if(w){var A=T.pos,N=P.pos,R=T.nodeAfter,I=P.nodeBefore,L=p&&R&&R.isText?/^\s*/.exec(R.text)[0].length:0,z=p&&I&&I.isText?/\s*$/.exec(I.text)[0].length:0;A+L<N&&(A+=L,N-=z),x.addMark(A,N,r.create(o))}else x.removeMark(T.pos,P.pos,r)}g(x.scrollIntoView())}return!0}},o.wrapIn=function wrapIn(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return function(i,c){var u=i.selection,p=u.$from,g=u.$to,v=p.blockRange(g),b=v&&a.findWrapping(v,r,o);return!!b&&(c&&c(i.tr.wrap(v,b).scrollIntoView()),!0)}}},58493:function(r,o,i){"use strict";var a=i(97557);var c="function"==typeof Object.is?Object.is:function is(r,o){return r===o&&(0!==r||1/r==1/o)||r!=r&&o!=o},u=a.useState,p=a.useEffect,g=a.useLayoutEffect,v=a.useDebugValue;function checkIfSnapshotChanged(r){var o=r.getSnapshot;r=r.value;try{var i=o();return!c(r,i)}catch(r){return!0}}var b="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function useSyncExternalStore$1(r,o){return o()}:function useSyncExternalStore$2(r,o){var i=o(),a=u({inst:{value:i,getSnapshot:o}}),c=a[0].inst,b=a[1];return g(function(){c.value=i,c.getSnapshot=o,checkIfSnapshotChanged(c)&&b({inst:c})},[r,i,o]),p(function(){return checkIfSnapshotChanged(c)&&b({inst:c}),r(function(){checkIfSnapshotChanged(c)&&b({inst:c})})},[r]),v(i),i};o.useSyncExternalStore=void 0!==a.useSyncExternalStore?a.useSyncExternalStore:b},59618:function(r){"use strict";r.exports=window.elementorV2.schema},62430:function(r,o,i){"use strict";var a,c=Object.defineProperty,u=Object.getOwnPropertyDescriptor,p=Object.getOwnPropertyNames,g=Object.prototype.hasOwnProperty,v={};((r,o)=>{for(var i in o)c(r,i,{get:o[i],enumerable:!0})})(v,{Document:()=>b,default:()=>k}),r.exports=(a=v,((r,o,i,a)=>{if(o&&"object"==typeof o||"function"==typeof o)for(let v of p(o))g.call(r,v)||v===i||c(r,v,{get:()=>o[v],enumerable:!(a=u(o,v))||a.enumerable});return r})(c({},"__esModule",{value:!0}),a));var b=i(99248).Node.create({name:"doc",topNode:!0,content:"block+",renderMarkdown:(r,o)=>r.content?o.renderChildren(r.content,"\n\n"):""}),k=b},63717:function(r){"use strict";function OrderedMap(r){this.content=r}OrderedMap.prototype={constructor:OrderedMap,find:function(r){for(var o=0;o<this.content.length;o+=2)if(this.content[o]===r)return o;return-1},get:function(r){var o=this.find(r);return-1==o?void 0:this.content[o+1]},update:function(r,o,i){var a=i&&i!=r?this.remove(i):this,c=a.find(r),u=a.content.slice();return-1==c?u.push(i||r,o):(u[c+1]=o,i&&(u[c]=i)),new OrderedMap(u)},remove:function(r){var o=this.find(r);if(-1==o)return this;var i=this.content.slice();return i.splice(o,2),new OrderedMap(i)},addToStart:function(r,o){return new OrderedMap([r,o].concat(this.remove(r).content))},addToEnd:function(r,o){var i=this.remove(r).content.slice();return i.push(r,o),new OrderedMap(i)},addBefore:function(r,o,i){var a=this.remove(o),c=a.content.slice(),u=a.find(r);return c.splice(-1==u?c.length:u,0,o,i),new OrderedMap(c)},forEach:function(r){for(var o=0;o<this.content.length;o+=2)r(this.content[o],this.content[o+1])},prepend:function(r){return(r=OrderedMap.from(r)).size?new OrderedMap(r.content.concat(this.subtract(r).content)):this},append:function(r){return(r=OrderedMap.from(r)).size?new OrderedMap(this.subtract(r).content.concat(r.content)):this},subtract:function(r){var o=this;r=OrderedMap.from(r);for(var i=0;i<r.content.length;i+=2)o=o.remove(r.content[i]);return o},toObject:function(){var r={};return this.forEach(function(o,i){r[o]=i}),r},get size(){return this.content.length>>1}},OrderedMap.from=function(r){if(r instanceof OrderedMap)return r;var o=[];if(r)for(var i in r)o.push(i,r[i]);return new OrderedMap(o)},r.exports=OrderedMap},69242:function(r,o,i){"use strict";r.exports=i(22162)},70374:function(r){"use strict";r.exports=window.elementorV2.editorUi},70975:function(r){"use strict";r.exports=window.elementorV2.editorElements},74353:function(r){r.exports=function(){"use strict";var r=1e3,o=6e4,i=36e5,a="millisecond",c="second",u="minute",p="hour",g="day",v="week",b="month",k="quarter",E="year",w="date",x="Invalid Date",C=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,_=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,T={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(r){var o=["th","st","nd","rd"],i=r%100;return"["+r+(o[(i-20)%10]||o[i]||o[0])+"]"}},m=function(r,o,i){var a=String(r);return!a||a.length>=o?r:""+Array(o+1-a.length).join(i)+r},P={s:m,z:function(r){var o=-r.utcOffset(),i=Math.abs(o),a=Math.floor(i/60),c=i%60;return(o<=0?"+":"-")+m(a,2,"0")+":"+m(c,2,"0")},m:function t(r,o){if(r.date()<o.date())return-t(o,r);var i=12*(o.year()-r.year())+(o.month()-r.month()),a=r.clone().add(i,b),c=o-a<0,u=r.clone().add(i+(c?-1:1),b);return+(-(i+(o-a)/(c?a-u:u-a))||0)},a:function(r){return r<0?Math.ceil(r)||0:Math.floor(r)},p:function(r){return{M:b,y:E,w:v,d:g,D:w,h:p,m:u,s:c,ms:a,Q:k}[r]||String(r||"").toLowerCase().replace(/s$/,"")},u:function(r){return void 0===r}},A="en",N={};N[A]=T;var R="$isDayjsObject",S=function(r){return r instanceof z||!(!r||!r[R])},I=function t(r,o,i){var a;if(!r)return A;if("string"==typeof r){var c=r.toLowerCase();N[c]&&(a=c),o&&(N[c]=o,a=c);var u=r.split("-");if(!a&&u.length>1)return t(u[0])}else{var p=r.name;N[p]=r,a=p}return!i&&a&&(A=a),a||!i&&A},O=function(r,o){if(S(r))return r.clone();var i="object"==typeof o?o:{};return i.date=r,i.args=arguments,new z(i)},L=P;L.l=I,L.i=S,L.w=function(r,o){return O(r,{locale:o.$L,utc:o.$u,x:o.$x,$offset:o.$offset})};var z=function(){function M(r){this.$L=I(r.locale,null,!0),this.parse(r),this.$x=this.$x||r.x||{},this[R]=!0}var T=M.prototype;return T.parse=function(r){this.$d=function(r){var o=r.date,i=r.utc;if(null===o)return new Date(NaN);if(L.u(o))return new Date;if(o instanceof Date)return new Date(o);if("string"==typeof o&&!/Z$/i.test(o)){var a=o.match(C);if(a){var c=a[2]-1||0,u=(a[7]||"0").substring(0,3);return i?new Date(Date.UTC(a[1],c,a[3]||1,a[4]||0,a[5]||0,a[6]||0,u)):new Date(a[1],c,a[3]||1,a[4]||0,a[5]||0,a[6]||0,u)}}return new Date(o)}(r),this.init()},T.init=function(){var r=this.$d;this.$y=r.getFullYear(),this.$M=r.getMonth(),this.$D=r.getDate(),this.$W=r.getDay(),this.$H=r.getHours(),this.$m=r.getMinutes(),this.$s=r.getSeconds(),this.$ms=r.getMilliseconds()},T.$utils=function(){return L},T.isValid=function(){return!(this.$d.toString()===x)},T.isSame=function(r,o){var i=O(r);return this.startOf(o)<=i&&i<=this.endOf(o)},T.isAfter=function(r,o){return O(r)<this.startOf(o)},T.isBefore=function(r,o){return this.endOf(o)<O(r)},T.$g=function(r,o,i){return L.u(r)?this[o]:this.set(i,r)},T.unix=function(){return Math.floor(this.valueOf()/1e3)},T.valueOf=function(){return this.$d.getTime()},T.startOf=function(r,o){var i=this,a=!!L.u(o)||o,k=L.p(r),l=function(r,o){var c=L.w(i.$u?Date.UTC(i.$y,o,r):new Date(i.$y,o,r),i);return a?c:c.endOf(g)},$=function(r,o){return L.w(i.toDate()[r].apply(i.toDate("s"),(a?[0,0,0,0]:[23,59,59,999]).slice(o)),i)},x=this.$W,C=this.$M,_=this.$D,T="set"+(this.$u?"UTC":"");switch(k){case E:return a?l(1,0):l(31,11);case b:return a?l(1,C):l(0,C+1);case v:var P=this.$locale().weekStart||0,A=(x<P?x+7:x)-P;return l(a?_-A:_+(6-A),C);case g:case w:return $(T+"Hours",0);case p:return $(T+"Minutes",1);case u:return $(T+"Seconds",2);case c:return $(T+"Milliseconds",3);default:return this.clone()}},T.endOf=function(r){return this.startOf(r,!1)},T.$set=function(r,o){var i,v=L.p(r),k="set"+(this.$u?"UTC":""),x=(i={},i[g]=k+"Date",i[w]=k+"Date",i[b]=k+"Month",i[E]=k+"FullYear",i[p]=k+"Hours",i[u]=k+"Minutes",i[c]=k+"Seconds",i[a]=k+"Milliseconds",i)[v],C=v===g?this.$D+(o-this.$W):o;if(v===b||v===E){var _=this.clone().set(w,1);_.$d[x](C),_.init(),this.$d=_.set(w,Math.min(this.$D,_.daysInMonth())).$d}else x&&this.$d[x](C);return this.init(),this},T.set=function(r,o){return this.clone().$set(r,o)},T.get=function(r){return this[L.p(r)]()},T.add=function(a,k){var w,x=this;a=Number(a);var C=L.p(k),y=function(r){var o=O(x);return L.w(o.date(o.date()+Math.round(r*a)),x)};if(C===b)return this.set(b,this.$M+a);if(C===E)return this.set(E,this.$y+a);if(C===g)return y(1);if(C===v)return y(7);var _=(w={},w[u]=o,w[p]=i,w[c]=r,w)[C]||1,T=this.$d.getTime()+a*_;return L.w(T,this)},T.subtract=function(r,o){return this.add(-1*r,o)},T.format=function(r){var o=this,i=this.$locale();if(!this.isValid())return i.invalidDate||x;var a=r||"YYYY-MM-DDTHH:mm:ssZ",c=L.z(this),u=this.$H,p=this.$m,g=this.$M,v=i.weekdays,b=i.months,k=i.meridiem,h=function(r,i,c,u){return r&&(r[i]||r(o,a))||c[i].slice(0,u)},d=function(r){return L.s(u%12||12,r,"0")},E=k||function(r,o,i){var a=r<12?"AM":"PM";return i?a.toLowerCase():a};return a.replace(_,function(r,a){return a||function(r){switch(r){case"YY":return String(o.$y).slice(-2);case"YYYY":return L.s(o.$y,4,"0");case"M":return g+1;case"MM":return L.s(g+1,2,"0");case"MMM":return h(i.monthsShort,g,b,3);case"MMMM":return h(b,g);case"D":return o.$D;case"DD":return L.s(o.$D,2,"0");case"d":return String(o.$W);case"dd":return h(i.weekdaysMin,o.$W,v,2);case"ddd":return h(i.weekdaysShort,o.$W,v,3);case"dddd":return v[o.$W];case"H":return String(u);case"HH":return L.s(u,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return E(u,p,!0);case"A":return E(u,p,!1);case"m":return String(p);case"mm":return L.s(p,2,"0");case"s":return String(o.$s);case"ss":return L.s(o.$s,2,"0");case"SSS":return L.s(o.$ms,3,"0");case"Z":return c}return null}(r)||c.replace(":","")})},T.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},T.diff=function(a,w,x){var C,_=this,T=L.p(w),P=O(a),A=(P.utcOffset()-this.utcOffset())*o,N=this-P,D=function(){return L.m(_,P)};switch(T){case E:C=D()/12;break;case b:C=D();break;case k:C=D()/3;break;case v:C=(N-A)/6048e5;break;case g:C=(N-A)/864e5;break;case p:C=N/i;break;case u:C=N/o;break;case c:C=N/r;break;default:C=N}return x?C:L.a(C)},T.daysInMonth=function(){return this.endOf(b).$D},T.$locale=function(){return N[this.$L]},T.locale=function(r,o){if(!r)return this.$L;var i=this.clone(),a=I(r,o,!0);return a&&(i.$L=a),i},T.clone=function(){return L.w(this.$d,this)},T.toDate=function(){return new Date(this.valueOf())},T.toJSON=function(){return this.isValid()?this.toISOString():null},T.toISOString=function(){return this.$d.toISOString()},T.toString=function(){return this.$d.toUTCString()},M}(),j=z.prototype;return O.prototype=j,[["$ms",a],["$s",c],["$m",u],["$H",p],["$W",g],["$M",b],["$y",E],["$D",w]].forEach(function(r){j[r[1]]=function(o){return this.$g(o,r[0],r[1])}}),O.extend=function(r,o){return r.$i||(r(o,z,O),r.$i=!0),O},O.locale=I,O.isDayjs=S,O.unix=function(r){return O(1e3*r)},O.en=N[A],O.Ls=N,O.p={},O}()},74518:function(r){"use strict";r.exports=window.elementorV2.editorResponsive},74848:function(r,o,i){"use strict";r.exports=i(21020)},74951:function(r,o,i){"use strict";var a,c=Object.defineProperty,u=Object.getOwnPropertyDescriptor,p=Object.getOwnPropertyNames,g=Object.prototype.hasOwnProperty,v={};((r,o)=>{for(var i in o)c(r,i,{get:o[i],enumerable:!0})})(v,{Heading:()=>k,default:()=>E}),r.exports=(a=v,((r,o,i,a)=>{if(o&&"object"==typeof o||"function"==typeof o)for(let v of p(o))g.call(r,v)||v===i||c(r,v,{get:()=>o[v],enumerable:!(a=u(o,v))||a.enumerable});return r})(c({},"__esModule",{value:!0}),a));var b=i(99248),k=b.Node.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(r=>({tag:`h${r}`,attrs:{level:r}}))},renderHTML({node:r,HTMLAttributes:o}){return[`h${this.options.levels.includes(r.attrs.level)?r.attrs.level:this.options.levels[0]}`,(0,b.mergeAttributes)(this.options.HTMLAttributes,o),0]},parseMarkdown:(r,o)=>o.createNode("heading",{level:r.depth||1},o.parseInline(r.tokens||[])),renderMarkdown:(r,o)=>{var i;const a=(null==(i=r.attrs)?void 0:i.level)?parseInt(r.attrs.level,10):1,c="#".repeat(a);return r.content?`${c} ${o.renderChildren(r.content)}`:""},addCommands(){return{setHeading:r=>({commands:o})=>!!this.options.levels.includes(r.level)&&o.setNode(this.name,r),toggleHeading:r=>({commands:o})=>!!this.options.levels.includes(r.level)&&o.toggleNode(this.name,"paragraph",r)}},addKeyboardShortcuts(){return this.options.levels.reduce((r,o)=>({...r,[`Mod-Alt-${o}`]:()=>this.editor.commands.toggleHeading({level:o})}),{})},addInputRules(){return this.options.levels.map(r=>(0,b.textblockTypeInputRule)({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${r}})\\s$`),type:this.type,getAttributes:{level:r}}))}}),E=k},76237:function(r,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0});for(var i={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},a={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},c="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),u="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),p=0;p<10;p++)i[48+p]=i[96+p]=String(p);for(p=1;p<=24;p++)i[p+111]="F"+p;for(p=65;p<=90;p++)i[p]=String.fromCharCode(p+32),a[p]=String.fromCharCode(p);for(var g in i)a.hasOwnProperty(g)||(a[g]=i[g]);o.base=i,o.keyName=function keyName(r){var o=!(c&&r.metaKey&&r.shiftKey&&!r.ctrlKey&&!r.altKey||u&&r.shiftKey&&r.key&&1==r.key.length||"Unidentified"==r.key)&&r.key||(r.shiftKey?a:i)[r.keyCode]||r.key||"Unidentified";return"Esc"==o&&(o="Escape"),"Del"==o&&(o="Delete"),"Left"==o&&(o="ArrowLeft"),"Up"==o&&(o="ArrowUp"),"Right"==o&&(o="ArrowRight"),"Down"==o&&(o="ArrowDown"),o},o.shift=a},77048:function(r,o,i){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),function _createStarExport(r){Object.keys(r).filter(r=>"default"!==r&&"__esModule"!==r).forEach(i=>{o.hasOwnProperty(i)||Object.defineProperty(o,i,{enumerable:!0,configurable:!0,get:()=>r[i]})})}(i(88136))},77712:function(r,o,i){"use strict";function _createForOfIteratorHelper(r,o){var i="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(!i){if(Array.isArray(r)||(i=function _unsupportedIterableToArray(r,o){if(!r)return;if("string"==typeof r)return _arrayLikeToArray(r,o);var i=Object.prototype.toString.call(r).slice(8,-1);"Object"===i&&r.constructor&&(i=r.constructor.name);if("Map"===i||"Set"===i)return Array.from(r);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(r,o)}(r))||o&&r&&"number"==typeof r.length){i&&(r=i);var a=0,c=function F(){};return{s:c,n:function n(){return a>=r.length?{done:!0}:{done:!1,value:r[a++]}},e:function e(r){throw r},f:c}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u,p=!0,g=!1;return{s:function s(){i=i.call(r)},n:function n(){var r=i.next();return p=r.done,r},e:function e(r){g=!0,u=r},f:function f(){try{p||null==i.return||i.return()}finally{if(g)throw u}}}}function _arrayLikeToArray(r,o){(null==o||o>r.length)&&(o=r.length);for(var i=0,a=new Array(o);i<o;i++)a[i]=r[i];return a}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function _get(r,o,i){var a=function _superPropBase(r,o){for(;!Object.prototype.hasOwnProperty.call(r,o)&&null!==(r=_getPrototypeOf(r)););return r}(r,o);if(a){var c=Object.getOwnPropertyDescriptor(a,o);return c.get?c.get.call(arguments.length<3?r:i):c.value}},_get.apply(this,arguments)}function _inherits(r,o){if("function"!=typeof o&&null!==o)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(o&&o.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),o&&_setPrototypeOf(r,o)}function _createSuper(r){var o=_isNativeReflectConstruct();return function _createSuperInternal(){var i,a=_getPrototypeOf(r);if(o){var c=_getPrototypeOf(this).constructor;i=Reflect.construct(a,arguments,c)}else i=a.apply(this,arguments);return function _possibleConstructorReturn(r,o){if(o&&("object"===_typeof(o)||"function"==typeof o))return o;if(void 0!==o)throw new TypeError("Derived constructors may only return object or undefined");return function _assertThisInitialized(r){if(void 0===r)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(r)}(this,i)}}function _wrapNativeSuper(r){var o="function"==typeof Map?new Map:void 0;return _wrapNativeSuper=function _wrapNativeSuper(r){if(null===r||!function _isNativeFunction(r){try{return-1!==Function.toString.call(r).indexOf("[native code]")}catch(o){return"function"==typeof r}}(r))return r;if("function"!=typeof r)throw new TypeError("Super expression must either be null or a function");if(void 0!==o){if(o.has(r))return o.get(r);o.set(r,Wrapper)}function Wrapper(){return _construct(r,arguments,_getPrototypeOf(this).constructor)}return Wrapper.prototype=Object.create(r.prototype,{constructor:{value:Wrapper,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf(Wrapper,r)},_wrapNativeSuper(r)}function _construct(r,o,i){return _construct=_isNativeReflectConstruct()?Reflect.construct.bind():function _construct(r,o,i){var a=[null];a.push.apply(a,o);var c=new(Function.bind.apply(r,a));return i&&_setPrototypeOf(c,i.prototype),c},_construct.apply(null,arguments)}function _isNativeReflectConstruct(){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(r){return!1}}function _setPrototypeOf(r,o){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(r,o){return r.__proto__=o,r},_setPrototypeOf(r,o)}function _getPrototypeOf(r){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(r){return r.__proto__||Object.getPrototypeOf(r)},_getPrototypeOf(r)}function _typeof(r){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},_typeof(r)}function _classCallCheck(r,o){if(!(r instanceof o))throw new TypeError("Cannot call a class as a function")}function _defineProperties(r,o){for(var i=0;i<o.length;i++){var a=o[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(r,_toPropertyKey(a.key),a)}}function _createClass(r,o,i){return o&&_defineProperties(r.prototype,o),i&&_defineProperties(r,i),Object.defineProperty(r,"prototype",{writable:!1}),r}function _toPropertyKey(r){var o=function _toPrimitive(r,o){if("object"!==_typeof(r)||null===r)return r;var i=r[Symbol.toPrimitive];if(void 0!==i){var a=i.call(r,o||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===o?String:Number)(r)}(r,"string");return"symbol"===_typeof(o)?o:String(o)}var a=i(63717);function _findDiffStart(r,o,i){for(var a=0;;a++){if(a==r.childCount||a==o.childCount)return r.childCount==o.childCount?null:i;var c=r.child(a),u=o.child(a);if(c!=u){if(!c.sameMarkup(u))return i;if(c.isText&&c.text!=u.text){for(var p=0;c.text[p]==u.text[p];p++)i++;return i}if(c.content.size||u.content.size){var g=_findDiffStart(c.content,u.content,i+1);if(null!=g)return g}i+=c.nodeSize}else i+=c.nodeSize}}function _findDiffEnd(r,o,i,a){for(var c=r.childCount,u=o.childCount;;){if(0==c||0==u)return c==u?null:{a:i,b:a};var p=r.child(--c),g=o.child(--u),v=p.nodeSize;if(p!=g){if(!p.sameMarkup(g))return{a:i,b:a};if(p.isText&&p.text!=g.text){for(var b=0,k=Math.min(p.text.length,g.text.length);b<k&&p.text[p.text.length-b-1]==g.text[g.text.length-b-1];)b++,i--,a--;return{a:i,b:a}}if(p.content.size||g.content.size){var E=_findDiffEnd(p.content,g.content,i-1,a-1);if(E)return E}i-=v,a-=v}else i-=v,a-=v}}var c=function(){function Fragment(r,o){if(_classCallCheck(this,Fragment),this.content=r,this.size=o||0,null==o)for(var i=0;i<r.length;i++)this.size+=r[i].nodeSize}return _createClass(Fragment,[{key:"nodesBetween",value:function nodesBetween(r,o,i){for(var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,c=arguments.length>4?arguments[4]:void 0,u=0,p=0;p<o;u++){var g=this.content[u],v=p+g.nodeSize;if(v>r&&!1!==i(g,a+p,c||null,u)&&g.content.size){var b=p+1;g.nodesBetween(Math.max(0,r-b),Math.min(g.content.size,o-b),i,a+b)}p=v}}},{key:"descendants",value:function descendants(r){this.nodesBetween(0,this.size,r)}},{key:"textBetween",value:function textBetween(r,o,i,a){var c="",u=!0;return this.nodesBetween(r,o,function(p,g){var v=p.isText?p.text.slice(Math.max(r,g)-g,o-g):p.isLeaf?a?"function"==typeof a?a(p):a:p.type.spec.leafText?p.type.spec.leafText(p):"":"";p.isBlock&&(p.isLeaf&&v||p.isTextblock)&&i&&(u?u=!1:c+=i),c+=v},0),c}},{key:"append",value:function append(r){if(!r.size)return this;if(!this.size)return r;var o=this.lastChild,i=r.firstChild,a=this.content.slice(),c=0;for(o.isText&&o.sameMarkup(i)&&(a[a.length-1]=o.withText(o.text+i.text),c=1);c<r.content.length;c++)a.push(r.content[c]);return new Fragment(a,this.size+r.size)}},{key:"cut",value:function cut(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.size;if(0==r&&o==this.size)return this;var i=[],a=0;if(o>r)for(var c=0,u=0;u<o;c++){var p=this.content[c],g=u+p.nodeSize;g>r&&((u<r||g>o)&&(p=p.isText?p.cut(Math.max(0,r-u),Math.min(p.text.length,o-u)):p.cut(Math.max(0,r-u-1),Math.min(p.content.size,o-u-1))),i.push(p),a+=p.nodeSize),u=g}return new Fragment(i,a)}},{key:"cutByIndex",value:function cutByIndex(r,o){return r==o?Fragment.empty:0==r&&o==this.content.length?this:new Fragment(this.content.slice(r,o))}},{key:"replaceChild",value:function replaceChild(r,o){var i=this.content[r];if(i==o)return this;var a=this.content.slice(),c=this.size+o.nodeSize-i.nodeSize;return a[r]=o,new Fragment(a,c)}},{key:"addToStart",value:function addToStart(r){return new Fragment([r].concat(this.content),this.size+r.nodeSize)}},{key:"addToEnd",value:function addToEnd(r){return new Fragment(this.content.concat(r),this.size+r.nodeSize)}},{key:"eq",value:function eq(r){if(this.content.length!=r.content.length)return!1;for(var o=0;o<this.content.length;o++)if(!this.content[o].eq(r.content[o]))return!1;return!0}},{key:"firstChild",get:function get(){return this.content.length?this.content[0]:null}},{key:"lastChild",get:function get(){return this.content.length?this.content[this.content.length-1]:null}},{key:"childCount",get:function get(){return this.content.length}},{key:"child",value:function child(r){var o=this.content[r];if(!o)throw new RangeError("Index "+r+" out of range for "+this);return o}},{key:"maybeChild",value:function maybeChild(r){return this.content[r]||null}},{key:"forEach",value:function forEach(r){for(var o=0,i=0;o<this.content.length;o++){var a=this.content[o];r(a,i,o),i+=a.nodeSize}}},{key:"findDiffStart",value:function findDiffStart(r){return _findDiffStart(this,r,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)}},{key:"findDiffEnd",value:function findDiffEnd(r){return _findDiffEnd(this,r,arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.size,arguments.length>2&&void 0!==arguments[2]?arguments[2]:r.size)}},{key:"findIndex",value:function findIndex(r){if(0==r)return retIndex(0,r);if(r==this.size)return retIndex(this.content.length,r);if(r>this.size||r<0)throw new RangeError("Position ".concat(r," outside of fragment (").concat(this,")"));for(var o=0,i=0;;o++){var a=i+this.child(o).nodeSize;if(a>=r)return a==r?retIndex(o+1,a):retIndex(o,i);i=a}}},{key:"toString",value:function toString(){return"<"+this.toStringInner()+">"}},{key:"toStringInner",value:function toStringInner(){return this.content.join(", ")}},{key:"toJSON",value:function toJSON(){return this.content.length?this.content.map(function(r){return r.toJSON()}):null}}],[{key:"fromJSON",value:function fromJSON(r,o){if(!o)return Fragment.empty;if(!Array.isArray(o))throw new RangeError("Invalid input for Fragment.fromJSON");return new Fragment(o.map(r.nodeFromJSON))}},{key:"fromArray",value:function fromArray(r){if(!r.length)return Fragment.empty;for(var o,i=0,a=0;a<r.length;a++){var c=r[a];i+=c.nodeSize,a&&c.isText&&r[a-1].sameMarkup(c)?(o||(o=r.slice(0,a)),o[o.length-1]=c.withText(o[o.length-1].text+c.text)):o&&o.push(c)}return new Fragment(o||r,i)}},{key:"from",value:function from(r){if(!r)return Fragment.empty;if(r instanceof Fragment)return r;if(Array.isArray(r))return this.fromArray(r);if(r.attrs)return new Fragment([r],r.nodeSize);throw new RangeError("Can not convert "+r+" to a Fragment"+(r.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}]),Fragment}();c.empty=new c([],0);var u={index:0,offset:0};function retIndex(r,o){return u.index=r,u.offset=o,u}function compareDeep(r,o){if(r===o)return!0;if(!r||"object"!=_typeof(r)||!o||"object"!=_typeof(o))return!1;var i=Array.isArray(r);if(Array.isArray(o)!=i)return!1;if(i){if(r.length!=o.length)return!1;for(var a=0;a<r.length;a++)if(!compareDeep(r[a],o[a]))return!1}else{for(var c in r)if(!(c in o)||!compareDeep(r[c],o[c]))return!1;for(var u in o)if(!(u in r))return!1}return!0}var p=function(){function Mark(r,o){_classCallCheck(this,Mark),this.type=r,this.attrs=o}return _createClass(Mark,[{key:"addToSet",value:function addToSet(r){for(var o,i=!1,a=0;a<r.length;a++){var c=r[a];if(this.eq(c))return r;if(this.type.excludes(c.type))o||(o=r.slice(0,a));else{if(c.type.excludes(this.type))return r;!i&&c.type.rank>this.type.rank&&(o||(o=r.slice(0,a)),o.push(this),i=!0),o&&o.push(c)}}return o||(o=r.slice()),i||o.push(this),o}},{key:"removeFromSet",value:function removeFromSet(r){for(var o=0;o<r.length;o++)if(this.eq(r[o]))return r.slice(0,o).concat(r.slice(o+1));return r}},{key:"isInSet",value:function isInSet(r){for(var o=0;o<r.length;o++)if(this.eq(r[o]))return!0;return!1}},{key:"eq",value:function eq(r){return this==r||this.type==r.type&&compareDeep(this.attrs,r.attrs)}},{key:"toJSON",value:function toJSON(){var r={type:this.type.name};for(var o in this.attrs){r.attrs=this.attrs;break}return r}}],[{key:"fromJSON",value:function fromJSON(r,o){if(!o)throw new RangeError("Invalid input for Mark.fromJSON");var i=r.marks[o.type];if(!i)throw new RangeError("There is no mark type ".concat(o.type," in this schema"));var a=i.create(o.attrs);return i.checkAttrs(a.attrs),a}},{key:"sameSet",value:function sameSet(r,o){if(r==o)return!0;if(r.length!=o.length)return!1;for(var i=0;i<r.length;i++)if(!r[i].eq(o[i]))return!1;return!0}},{key:"setFrom",value:function setFrom(r){if(!r||Array.isArray(r)&&0==r.length)return Mark.none;if(r instanceof Mark)return[r];var o=r.slice();return o.sort(function(r,o){return r.type.rank-o.type.rank}),o}}]),Mark}();p.none=[];var g=function(r){_inherits(ReplaceError,r);var o=_createSuper(ReplaceError);function ReplaceError(){return _classCallCheck(this,ReplaceError),o.apply(this,arguments)}return _createClass(ReplaceError)}(_wrapNativeSuper(Error)),v=function(){function Slice(r,o,i){_classCallCheck(this,Slice),this.content=r,this.openStart=o,this.openEnd=i}return _createClass(Slice,[{key:"size",get:function get(){return this.content.size-this.openStart-this.openEnd}},{key:"insertAt",value:function insertAt(r,o){var i=insertInto(this.content,r+this.openStart,o);return i&&new Slice(i,this.openStart,this.openEnd)}},{key:"removeBetween",value:function removeBetween(r,o){return new Slice(removeRange(this.content,r+this.openStart,o+this.openStart),this.openStart,this.openEnd)}},{key:"eq",value:function eq(r){return this.content.eq(r.content)&&this.openStart==r.openStart&&this.openEnd==r.openEnd}},{key:"toString",value:function toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}},{key:"toJSON",value:function toJSON(){if(!this.content.size)return null;var r={content:this.content.toJSON()};return this.openStart>0&&(r.openStart=this.openStart),this.openEnd>0&&(r.openEnd=this.openEnd),r}}],[{key:"fromJSON",value:function fromJSON(r,o){if(!o)return Slice.empty;var i=o.openStart||0,a=o.openEnd||0;if("number"!=typeof i||"number"!=typeof a)throw new RangeError("Invalid input for Slice.fromJSON");return new Slice(c.fromJSON(r,o.content),i,a)}},{key:"maxOpen",value:function maxOpen(r){for(var o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=0,a=0,c=r.firstChild;c&&!c.isLeaf&&(o||!c.type.spec.isolating);c=c.firstChild)i++;for(var u=r.lastChild;u&&!u.isLeaf&&(o||!u.type.spec.isolating);u=u.lastChild)a++;return new Slice(r,i,a)}}]),Slice}();function removeRange(r,o,i){var a=r.findIndex(o),c=a.index,u=a.offset,p=r.maybeChild(c),g=r.findIndex(i),v=g.index,b=g.offset;if(u==o||p.isText){if(b!=i&&!r.child(v).isText)throw new RangeError("Removing non-flat range");return r.cut(0,o).append(r.cut(i))}if(c!=v)throw new RangeError("Removing non-flat range");return r.replaceChild(c,p.copy(removeRange(p.content,o-u-1,i-u-1)))}function insertInto(r,o,i,a){var c=r.findIndex(o),u=c.index,p=c.offset,g=r.maybeChild(u);if(p==o||g.isText)return a&&!a.canReplace(u,u,i)?null:r.cut(0,o).append(i).append(r.cut(o));var v=insertInto(g.content,o-p-1,i,g);return v&&r.replaceChild(u,g.copy(v))}function _replace(r,o,i){if(i.openStart>r.depth)throw new g("Inserted content deeper than insertion position");if(r.depth-i.openStart!=o.depth-i.openEnd)throw new g("Inconsistent open depths");return replaceOuter(r,o,i,0)}function replaceOuter(r,o,i,a){var u=r.index(a),p=r.node(a);if(u==o.index(a)&&a<r.depth-i.openStart){var g=replaceOuter(r,o,i,a+1);return p.copy(p.content.replaceChild(u,g))}if(i.content.size){if(i.openStart||i.openEnd||r.depth!=a||o.depth!=a){var v=function prepareSliceForReplace(r,o){for(var i=o.depth-r.openStart,a=o.node(i).copy(r.content),u=i-1;u>=0;u--)a=o.node(u).copy(c.from(a));return{start:a.resolveNoCache(r.openStart+i),end:a.resolveNoCache(a.content.size-r.openEnd-i)}}(i,r);return close(p,replaceThreeWay(r,v.start,v.end,o,a))}var b=r.parent,k=b.content;return close(b,k.cut(0,r.parentOffset).append(i.content).append(k.cut(o.parentOffset)))}return close(p,replaceTwoWay(r,o,a))}function checkJoin(r,o){if(!o.type.compatibleContent(r.type))throw new g("Cannot join "+o.type.name+" onto "+r.type.name)}function joinable(r,o,i){var a=r.node(i);return checkJoin(a,o.node(i)),a}function addNode(r,o){var i=o.length-1;i>=0&&r.isText&&r.sameMarkup(o[i])?o[i]=r.withText(o[i].text+r.text):o.push(r)}function addRange(r,o,i,a){var c=(o||r).node(i),u=0,p=o?o.index(i):c.childCount;r&&(u=r.index(i),r.depth>i?u++:r.textOffset&&(addNode(r.nodeAfter,a),u++));for(var g=u;g<p;g++)addNode(c.child(g),a);o&&o.depth==i&&o.textOffset&&addNode(o.nodeBefore,a)}function close(r,o){return r.type.checkContent(o),r.copy(o)}function replaceThreeWay(r,o,i,a,u){var p=r.depth>u&&joinable(r,o,u+1),g=a.depth>u&&joinable(i,a,u+1),v=[];return addRange(null,r,u,v),p&&g&&o.index(u)==i.index(u)?(checkJoin(p,g),addNode(close(p,replaceThreeWay(r,o,i,a,u+1)),v)):(p&&addNode(close(p,replaceTwoWay(r,o,u+1)),v),addRange(o,i,u,v),g&&addNode(close(g,replaceTwoWay(i,a,u+1)),v)),addRange(a,null,u,v),new c(v)}function replaceTwoWay(r,o,i){var a=[];(addRange(null,r,i,a),r.depth>i)&&addNode(close(joinable(r,o,i+1),replaceTwoWay(r,o,i+1)),a);return addRange(o,null,i,a),new c(a)}v.empty=new v(c.empty,0,0);var b=function(){function ResolvedPos(r,o,i){_classCallCheck(this,ResolvedPos),this.pos=r,this.path=o,this.parentOffset=i,this.depth=o.length/3-1}return _createClass(ResolvedPos,[{key:"resolveDepth",value:function resolveDepth(r){return null==r?this.depth:r<0?this.depth+r:r}},{key:"parent",get:function get(){return this.node(this.depth)}},{key:"doc",get:function get(){return this.node(0)}},{key:"node",value:function node(r){return this.path[3*this.resolveDepth(r)]}},{key:"index",value:function index(r){return this.path[3*this.resolveDepth(r)+1]}},{key:"indexAfter",value:function indexAfter(r){return r=this.resolveDepth(r),this.index(r)+(r!=this.depth||this.textOffset?1:0)}},{key:"start",value:function start(r){return 0==(r=this.resolveDepth(r))?0:this.path[3*r-1]+1}},{key:"end",value:function end(r){return r=this.resolveDepth(r),this.start(r)+this.node(r).content.size}},{key:"before",value:function before(r){if(!(r=this.resolveDepth(r)))throw new RangeError("There is no position before the top-level node");return r==this.depth+1?this.pos:this.path[3*r-1]}},{key:"after",value:function after(r){if(!(r=this.resolveDepth(r)))throw new RangeError("There is no position after the top-level node");return r==this.depth+1?this.pos:this.path[3*r-1]+this.path[3*r].nodeSize}},{key:"textOffset",get:function get(){return this.pos-this.path[this.path.length-1]}},{key:"nodeAfter",get:function get(){var r=this.parent,o=this.index(this.depth);if(o==r.childCount)return null;var i=this.pos-this.path[this.path.length-1],a=r.child(o);return i?r.child(o).cut(i):a}},{key:"nodeBefore",get:function get(){var r=this.index(this.depth),o=this.pos-this.path[this.path.length-1];return o?this.parent.child(r).cut(0,o):0==r?null:this.parent.child(r-1)}},{key:"posAtIndex",value:function posAtIndex(r,o){o=this.resolveDepth(o);for(var i=this.path[3*o],a=0==o?0:this.path[3*o-1]+1,c=0;c<r;c++)a+=i.child(c).nodeSize;return a}},{key:"marks",value:function marks(){var r=this.parent,o=this.index();if(0==r.content.size)return p.none;if(this.textOffset)return r.child(o).marks;var i=r.maybeChild(o-1),a=r.maybeChild(o);if(!i){var c=i;i=a,a=c}for(var marks=i.marks,u=0;u<marks.length;u++)!1!==marks[u].type.spec.inclusive||a&&marks[u].isInSet(a.marks)||(marks=marks[u--].removeFromSet(marks));return marks}},{key:"marksAcross",value:function marksAcross(r){var o=this.parent.maybeChild(this.index());if(!o||!o.isInline)return null;for(var i=o.marks,a=r.parent.maybeChild(r.index()),c=0;c<i.length;c++)!1!==i[c].type.spec.inclusive||a&&i[c].isInSet(a.marks)||(i=i[c--].removeFromSet(i));return i}},{key:"sharedDepth",value:function sharedDepth(r){for(var o=this.depth;o>0;o--)if(this.start(o)<=r&&this.end(o)>=r)return o;return 0}},{key:"blockRange",value:function blockRange(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this,o=arguments.length>1?arguments[1]:void 0;if(r.pos<this.pos)return r.blockRange(this);for(var i=this.depth-(this.parent.inlineContent||this.pos==r.pos?1:0);i>=0;i--)if(r.pos<=this.end(i)&&(!o||o(this.node(i))))return new x(this,r,i);return null}},{key:"sameParent",value:function sameParent(r){return this.pos-this.parentOffset==r.pos-r.parentOffset}},{key:"max",value:function max(r){return r.pos>this.pos?r:this}},{key:"min",value:function min(r){return r.pos<this.pos?r:this}},{key:"toString",value:function toString(){for(var r="",o=1;o<=this.depth;o++)r+=(r?"/":"")+this.node(o).type.name+"_"+this.index(o-1);return r+":"+this.parentOffset}}],[{key:"resolve",value:function resolve(r,o){if(!(o>=0&&o<=r.content.size))throw new RangeError("Position "+o+" out of range");for(var i=[],a=0,c=o,u=r;;){var p=u.content.findIndex(c),g=p.index,v=p.offset,b=c-v;if(i.push(u,g,a+v),!b)break;if((u=u.child(g)).isText)break;c=b-1,a+=v+1}return new ResolvedPos(o,i,c)}},{key:"resolveCached",value:function resolveCached(r,o){var i=w.get(r);if(i)for(var a=0;a<i.elts.length;a++){var c=i.elts[a];if(c.pos==o)return c}else w.set(r,i=new k);var u=i.elts[i.i]=ResolvedPos.resolve(r,o);return i.i=(i.i+1)%E,u}}]),ResolvedPos}(),k=_createClass(function ResolveCache(){_classCallCheck(this,ResolveCache),this.elts=[],this.i=0}),E=12,w=new WeakMap,x=function(){function NodeRange(r,o,i){_classCallCheck(this,NodeRange),this.$from=r,this.$to=o,this.depth=i}return _createClass(NodeRange,[{key:"start",get:function get(){return this.$from.before(this.depth+1)}},{key:"end",get:function get(){return this.$to.after(this.depth+1)}},{key:"parent",get:function get(){return this.$from.node(this.depth)}},{key:"startIndex",get:function get(){return this.$from.index(this.depth)}},{key:"endIndex",get:function get(){return this.$to.indexAfter(this.depth)}}]),NodeRange}(),C=Object.create(null),_=function(){function Node(r,o,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:p.none;_classCallCheck(this,Node),this.type=r,this.attrs=o,this.marks=a,this.content=i||c.empty}return _createClass(Node,[{key:"children",get:function get(){return this.content.content}},{key:"nodeSize",get:function get(){return this.isLeaf?1:2+this.content.size}},{key:"childCount",get:function get(){return this.content.childCount}},{key:"child",value:function child(r){return this.content.child(r)}},{key:"maybeChild",value:function maybeChild(r){return this.content.maybeChild(r)}},{key:"forEach",value:function forEach(r){this.content.forEach(r)}},{key:"nodesBetween",value:function nodesBetween(r,o,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;this.content.nodesBetween(r,o,i,a,this)}},{key:"descendants",value:function descendants(r){this.nodesBetween(0,this.content.size,r)}},{key:"textContent",get:function get(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}},{key:"textBetween",value:function textBetween(r,o,i,a){return this.content.textBetween(r,o,i,a)}},{key:"firstChild",get:function get(){return this.content.firstChild}},{key:"lastChild",get:function get(){return this.content.lastChild}},{key:"eq",value:function eq(r){return this==r||this.sameMarkup(r)&&this.content.eq(r.content)}},{key:"sameMarkup",value:function sameMarkup(r){return this.hasMarkup(r.type,r.attrs,r.marks)}},{key:"hasMarkup",value:function hasMarkup(r,o,i){return this.type==r&&compareDeep(this.attrs,o||r.defaultAttrs||C)&&p.sameSet(this.marks,i||p.none)}},{key:"copy",value:function copy(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return r==this.content?this:new Node(this.type,this.attrs,r,this.marks)}},{key:"mark",value:function mark(r){return r==this.marks?this:new Node(this.type,this.attrs,this.content,r)}},{key:"cut",value:function cut(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.content.size;return 0==r&&o==this.content.size?this:this.copy(this.content.cut(r,o))}},{key:"slice",value:function slice(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.content.size,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(r==o)return v.empty;var a=this.resolve(r),c=this.resolve(o),u=i?0:a.sharedDepth(o),p=a.start(u),g=a.node(u).content.cut(a.pos-p,c.pos-p);return new v(g,a.depth-u,c.depth-u)}},{key:"replace",value:function replace(r,o,i){return _replace(this.resolve(r),this.resolve(o),i)}},{key:"nodeAt",value:function nodeAt(r){for(var o=this;;){var i=o.content.findIndex(r),a=i.index,c=i.offset;if(!(o=o.maybeChild(a)))return null;if(c==r||o.isText)return o;r-=c+1}}},{key:"childAfter",value:function childAfter(r){var o=this.content.findIndex(r),i=o.index,a=o.offset;return{node:this.content.maybeChild(i),index:i,offset:a}}},{key:"childBefore",value:function childBefore(r){if(0==r)return{node:null,index:0,offset:0};var o=this.content.findIndex(r),i=o.index,a=o.offset;if(a<r)return{node:this.content.child(i),index:i,offset:a};var c=this.content.child(i-1);return{node:c,index:i-1,offset:a-c.nodeSize}}},{key:"resolve",value:function resolve(r){return b.resolveCached(this,r)}},{key:"resolveNoCache",value:function resolveNoCache(r){return b.resolve(this,r)}},{key:"rangeHasMark",value:function rangeHasMark(r,o,i){var a=!1;return o>r&&this.nodesBetween(r,o,function(r){return i.isInSet(r.marks)&&(a=!0),!a}),a}},{key:"isBlock",get:function get(){return this.type.isBlock}},{key:"isTextblock",get:function get(){return this.type.isTextblock}},{key:"inlineContent",get:function get(){return this.type.inlineContent}},{key:"isInline",get:function get(){return this.type.isInline}},{key:"isText",get:function get(){return this.type.isText}},{key:"isLeaf",get:function get(){return this.type.isLeaf}},{key:"isAtom",get:function get(){return this.type.isAtom}},{key:"toString",value:function toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);var r=this.type.name;return this.content.size&&(r+="("+this.content.toStringInner()+")"),wrapMarks(this.marks,r)}},{key:"contentMatchAt",value:function contentMatchAt(r){var o=this.type.contentMatch.matchFragment(this.content,0,r);if(!o)throw new Error("Called contentMatchAt on a node with invalid content");return o}},{key:"canReplace",value:function canReplace(r,o){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:c.empty,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,u=arguments.length>4&&void 0!==arguments[4]?arguments[4]:i.childCount,p=this.contentMatchAt(r).matchFragment(i,a,u),g=p&&p.matchFragment(this.content,o);if(!g||!g.validEnd)return!1;for(var v=a;v<u;v++)if(!this.type.allowsMarks(i.child(v).marks))return!1;return!0}},{key:"canReplaceWith",value:function canReplaceWith(r,o,i,a){if(a&&!this.type.allowsMarks(a))return!1;var c=this.contentMatchAt(r).matchType(i),u=c&&c.matchFragment(this.content,o);return!!u&&u.validEnd}},{key:"canAppend",value:function canAppend(r){return r.content.size?this.canReplace(this.childCount,this.childCount,r.content):this.type.compatibleContent(r.type)}},{key:"check",value:function check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);for(var r=p.none,o=0;o<this.marks.length;o++){var i=this.marks[o];i.type.checkAttrs(i.attrs),r=i.addToSet(r)}if(!p.sameSet(r,this.marks))throw new RangeError("Invalid collection of marks for node ".concat(this.type.name,": ").concat(this.marks.map(function(r){return r.type.name})));this.content.forEach(function(r){return r.check()})}},{key:"toJSON",value:function toJSON(){var r={type:this.type.name};for(var o in this.attrs){r.attrs=this.attrs;break}return this.content.size&&(r.content=this.content.toJSON()),this.marks.length&&(r.marks=this.marks.map(function(r){return r.toJSON()})),r}}],[{key:"fromJSON",value:function fromJSON(r,o){if(!o)throw new RangeError("Invalid input for Node.fromJSON");var i=void 0;if(o.marks){if(!Array.isArray(o.marks))throw new RangeError("Invalid mark data for Node.fromJSON");i=o.marks.map(r.markFromJSON)}if("text"==o.type){if("string"!=typeof o.text)throw new RangeError("Invalid text node in JSON");return r.text(o.text,i)}var a=c.fromJSON(r,o.content),u=r.nodeType(o.type).create(o.attrs,a,i);return u.type.checkAttrs(u.attrs),u}}]),Node}();_.prototype.text=void 0;var T=function(r){_inherits(TextNode,r);var o=_createSuper(TextNode);function TextNode(r,i,a,c){var u;if(_classCallCheck(this,TextNode),u=o.call(this,r,i,null,c),!a)throw new RangeError("Empty text nodes are not allowed");return u.text=a,u}return _createClass(TextNode,[{key:"toString",value:function toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):wrapMarks(this.marks,JSON.stringify(this.text))}},{key:"textContent",get:function get(){return this.text}},{key:"textBetween",value:function textBetween(r,o){return this.text.slice(r,o)}},{key:"nodeSize",get:function get(){return this.text.length}},{key:"mark",value:function mark(r){return r==this.marks?this:new TextNode(this.type,this.attrs,this.text,r)}},{key:"withText",value:function withText(r){return r==this.text?this:new TextNode(this.type,this.attrs,r,this.marks)}},{key:"cut",value:function cut(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.text.length;return 0==r&&o==this.text.length?this:this.withText(this.text.slice(r,o))}},{key:"eq",value:function eq(r){return this.sameMarkup(r)&&this.text==r.text}},{key:"toJSON",value:function toJSON(){var r=_get(_getPrototypeOf(TextNode.prototype),"toJSON",this).call(this);return r.text=this.text,r}}]),TextNode}(_);function wrapMarks(r,o){for(var i=r.length-1;i>=0;i--)o=r[i].type.name+"("+o+")";return o}var P=function(){function ContentMatch(r){_classCallCheck(this,ContentMatch),this.validEnd=r,this.next=[],this.wrapCache=[]}return _createClass(ContentMatch,[{key:"matchType",value:function matchType(r){for(var o=0;o<this.next.length;o++)if(this.next[o].type==r)return this.next[o].next;return null}},{key:"matchFragment",value:function matchFragment(r){for(var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:r.childCount,a=this,c=o;a&&c<i;c++)a=a.matchType(r.child(c).type);return a}},{key:"inlineContent",get:function get(){return 0!=this.next.length&&this.next[0].type.isInline}},{key:"defaultType",get:function get(){for(var r=0;r<this.next.length;r++){var o=this.next[r].type;if(!o.isText&&!o.hasRequiredAttrs())return o}return null}},{key:"compatible",value:function compatible(r){for(var o=0;o<this.next.length;o++)for(var i=0;i<r.next.length;i++)if(this.next[o].type==r.next[i].type)return!0;return!1}},{key:"fillBefore",value:function fillBefore(r){var o=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=[this];return function search(u,p){var g=u.matchFragment(r,i);if(g&&(!o||g.validEnd))return c.from(p.map(function(r){return r.createAndFill()}));for(var v=0;v<u.next.length;v++){var b=u.next[v],k=b.type,E=b.next;if(!k.isText&&!k.hasRequiredAttrs()&&-1==a.indexOf(E)){a.push(E);var w=search(E,p.concat(k));if(w)return w}}return null}(this,[])}},{key:"findWrapping",value:function findWrapping(r){for(var o=0;o<this.wrapCache.length;o+=2)if(this.wrapCache[o]==r)return this.wrapCache[o+1];var i=this.computeWrapping(r);return this.wrapCache.push(r,i),i}},{key:"computeWrapping",value:function computeWrapping(r){for(var o=Object.create(null),i=[{match:this,type:null,via:null}];i.length;){var a=i.shift(),c=a.match;if(c.matchType(r)){for(var u=[],p=a;p.type;p=p.via)u.push(p.type);return u.reverse()}for(var g=0;g<c.next.length;g++){var v=c.next[g],b=v.type,k=v.next;b.isLeaf||b.hasRequiredAttrs()||b.name in o||a.type&&!k.validEnd||(i.push({match:b.contentMatch,type:b,via:a}),o[b.name]=!0)}}return null}},{key:"edgeCount",get:function get(){return this.next.length}},{key:"edge",value:function edge(r){if(r>=this.next.length)throw new RangeError("There's no ".concat(r,"th edge in this content match"));return this.next[r]}},{key:"toString",value:function toString(){var r=[];return function scan(o){r.push(o);for(var i=0;i<o.next.length;i++)-1==r.indexOf(o.next[i].next)&&scan(o.next[i].next)}(this),r.map(function(o,i){for(var a=i+(o.validEnd?"*":" ")+" ",c=0;c<o.next.length;c++)a+=(c?", ":"")+o.next[c].type.name+"->"+r.indexOf(o.next[c].next);return a}).join("\n")}}],[{key:"parse",value:function parse(r,o){var i=new A(r,o);if(null==i.next)return ContentMatch.empty;var a=parseExpr(i);i.next&&i.err("Unexpected trailing text");var c=dfa(function nfa(r){var o=[[]];return connect(compile(r,0),node()),o;function node(){return o.push([])-1}function edge(r,i,a){var c={term:a,to:i};return o[r].push(c),c}function connect(r,o){r.forEach(function(r){return r.to=o})}function compile(r,o){if("choice"==r.type)return r.exprs.reduce(function(r,i){return r.concat(compile(i,o))},[]);if("seq"!=r.type){if("star"==r.type){var i=node();return edge(o,i),connect(compile(r.expr,i),i),[edge(i)]}if("plus"==r.type){var a=node();return connect(compile(r.expr,o),a),connect(compile(r.expr,a),a),[edge(a)]}if("opt"==r.type)return[edge(o)].concat(compile(r.expr,o));if("range"==r.type){for(var c=o,u=0;u<r.min;u++){var p=node();connect(compile(r.expr,c),p),c=p}if(-1==r.max)connect(compile(r.expr,c),c);else for(var g=r.min;g<r.max;g++){var v=node();edge(c,v),connect(compile(r.expr,c),v),c=v}return[edge(c)]}if("name"==r.type)return[edge(o,void 0,r.value)];throw new Error("Unknown expr type")}for(var b=0;;b++){var k=compile(r.exprs[b],o);if(b==r.exprs.length-1)return k;connect(k,o=node())}}}(a));return function checkForDeadEnds(r,o){for(var i=0,a=[r];i<a.length;i++){for(var c=a[i],u=!c.validEnd,p=[],g=0;g<c.next.length;g++){var v=c.next[g],b=v.type,k=v.next;p.push(b.name),!u||b.isText||b.hasRequiredAttrs()||(u=!1),-1==a.indexOf(k)&&a.push(k)}u&&o.err("Only non-generatable nodes ("+p.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(c,i),c}}]),ContentMatch}();P.empty=new P(!0);var A=function(){function TokenStream(r,o){_classCallCheck(this,TokenStream),this.string=r,this.nodeTypes=o,this.inline=null,this.pos=0,this.tokens=r.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()}return _createClass(TokenStream,[{key:"next",get:function get(){return this.tokens[this.pos]}},{key:"eat",value:function eat(r){return this.next==r&&(this.pos++||!0)}},{key:"err",value:function err(r){throw new SyntaxError(r+" (in content expression '"+this.string+"')")}}]),TokenStream}();function parseExpr(r){var o=[];do{o.push(parseExprSeq(r))}while(r.eat("|"));return 1==o.length?o[0]:{type:"choice",exprs:o}}function parseExprSeq(r){var o=[];do{o.push(parseExprSubscript(r))}while(r.next&&")"!=r.next&&"|"!=r.next);return 1==o.length?o[0]:{type:"seq",exprs:o}}function parseExprSubscript(r){for(var o=function parseExprAtom(r){if(r.eat("(")){var o=parseExpr(r);return r.eat(")")||r.err("Missing closing paren"),o}if(!/\W/.test(r.next)){var i=function resolveName(r,o){var i=r.nodeTypes,a=i[o];if(a)return[a];var c=[];for(var u in i){var p=i[u];p.isInGroup(o)&&c.push(p)}0==c.length&&r.err("No node type or group '"+o+"' found");return c}(r,r.next).map(function(o){return null==r.inline?r.inline=o.isInline:r.inline!=o.isInline&&r.err("Mixing inline and block content"),{type:"name",value:o}});return r.pos++,1==i.length?i[0]:{type:"choice",exprs:i}}r.err("Unexpected token '"+r.next+"'")}(r);;)if(r.eat("+"))o={type:"plus",expr:o};else if(r.eat("*"))o={type:"star",expr:o};else if(r.eat("?"))o={type:"opt",expr:o};else{if(!r.eat("{"))break;o=parseExprRange(r,o)}return o}function parseNum(r){/\D/.test(r.next)&&r.err("Expected number, got '"+r.next+"'");var o=Number(r.next);return r.pos++,o}function parseExprRange(r,o){var i=parseNum(r),a=i;return r.eat(",")&&(a="}"!=r.next?parseNum(r):-1),r.eat("}")||r.err("Unclosed braced range"),{type:"range",min:i,max:a,expr:o}}function cmp(r,o){return o-r}function nullFrom(r,o){var i=[];return function scan(o){var a=r[o];if(1==a.length&&!a[0].term)return scan(a[0].to);i.push(o);for(var c=0;c<a.length;c++){var u=a[c],p=u.term,g=u.to;p||-1!=i.indexOf(g)||scan(g)}}(o),i.sort(cmp)}function dfa(r){var o=Object.create(null);return function explore(i){var a=[];i.forEach(function(o){r[o].forEach(function(o){var i=o.term,c=o.to;if(i){for(var u,p=0;p<a.length;p++)a[p][0]==i&&(u=a[p][1]);nullFrom(r,c).forEach(function(r){u||a.push([i,u=[]]),-1==u.indexOf(r)&&u.push(r)})}})});for(var c=o[i.join(",")]=new P(i.indexOf(r.length-1)>-1),u=0;u<a.length;u++){var p=a[u][1].sort(cmp);c.next.push({type:a[u][0],next:o[p.join(",")]||explore(p)})}return c}(nullFrom(r,0))}function defaultAttrs(r){var o=Object.create(null);for(var i in r){var a=r[i];if(!a.hasDefault)return null;o[i]=a.default}return o}function _computeAttrs(r,o){var i=Object.create(null);for(var a in r){var c=o&&o[a];if(void 0===c){var u=r[a];if(!u.hasDefault)throw new RangeError("No value supplied for attribute "+a);c=u.default}i[a]=c}return i}function _checkAttrs(r,o,i,a){for(var c in o)if(!(c in r))throw new RangeError("Unsupported attribute ".concat(c," for ").concat(i," of type ").concat(c));for(var u in r){var p=r[u];p.validate&&p.validate(o[u])}}function initAttrs(r,o){var i=Object.create(null);if(o)for(var a in o)i[a]=new R(r,a,o[a]);return i}var N=function(){function NodeType(r,o,i){_classCallCheck(this,NodeType),this.name=r,this.schema=o,this.spec=i,this.markSet=null,this.groups=i.group?i.group.split(" "):[],this.attrs=initAttrs(r,i.attrs),this.defaultAttrs=defaultAttrs(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(i.inline||"text"==r),this.isText="text"==r}return _createClass(NodeType,[{key:"isInline",get:function get(){return!this.isBlock}},{key:"isTextblock",get:function get(){return this.isBlock&&this.inlineContent}},{key:"isLeaf",get:function get(){return this.contentMatch==P.empty}},{key:"isAtom",get:function get(){return this.isLeaf||!!this.spec.atom}},{key:"isInGroup",value:function isInGroup(r){return this.groups.indexOf(r)>-1}},{key:"whitespace",get:function get(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}},{key:"hasRequiredAttrs",value:function hasRequiredAttrs(){for(var r in this.attrs)if(this.attrs[r].isRequired)return!0;return!1}},{key:"compatibleContent",value:function compatibleContent(r){return this==r||this.contentMatch.compatible(r.contentMatch)}},{key:"computeAttrs",value:function computeAttrs(r){return!r&&this.defaultAttrs?this.defaultAttrs:_computeAttrs(this.attrs,r)}},{key:"create",value:function create(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,o=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0;if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new _(this,this.computeAttrs(r),c.from(o),p.setFrom(i))}},{key:"createChecked",value:function createChecked(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,o=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0;return o=c.from(o),this.checkContent(o),new _(this,this.computeAttrs(r),o,p.setFrom(i))}},{key:"createAndFill",value:function createAndFill(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,o=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0;if(r=this.computeAttrs(r),(o=c.from(o)).size){var a=this.contentMatch.fillBefore(o);if(!a)return null;o=a.append(o)}var u=this.contentMatch.matchFragment(o),g=u&&u.fillBefore(c.empty,!0);return g?new _(this,r,o.append(g),p.setFrom(i)):null}},{key:"validContent",value:function validContent(r){var o=this.contentMatch.matchFragment(r);if(!o||!o.validEnd)return!1;for(var i=0;i<r.childCount;i++)if(!this.allowsMarks(r.child(i).marks))return!1;return!0}},{key:"checkContent",value:function checkContent(r){if(!this.validContent(r))throw new RangeError("Invalid content for node ".concat(this.name,": ").concat(r.toString().slice(0,50)))}},{key:"checkAttrs",value:function checkAttrs(r){_checkAttrs(this.attrs,r,"node",this.name)}},{key:"allowsMarkType",value:function allowsMarkType(r){return null==this.markSet||this.markSet.indexOf(r)>-1}},{key:"allowsMarks",value:function allowsMarks(r){if(null==this.markSet)return!0;for(var o=0;o<r.length;o++)if(!this.allowsMarkType(r[o].type))return!1;return!0}},{key:"allowedMarks",value:function allowedMarks(r){if(null==this.markSet)return r;for(var o,i=0;i<r.length;i++)this.allowsMarkType(r[i].type)?o&&o.push(r[i]):o||(o=r.slice(0,i));return o?o.length?o:p.none:r}}],[{key:"compile",value:function compile(r,o){var i=Object.create(null);r.forEach(function(r,a){return i[r]=new NodeType(r,o,a)});var a=o.spec.topNode||"doc";if(!i[a])throw new RangeError("Schema is missing its top node type ('"+a+"')");if(!i.text)throw new RangeError("Every schema needs a 'text' type");for(var c in i.text.attrs)throw new RangeError("The text node type should not have attributes");return i}}]),NodeType}();var R=function(){function Attribute(r,o,i){_classCallCheck(this,Attribute),this.hasDefault=Object.prototype.hasOwnProperty.call(i,"default"),this.default=i.default,this.validate="string"==typeof i.validate?function validateType(r,o,i){var a=i.split("|");return function(i){var c=null===i?"null":_typeof(i);if(a.indexOf(c)<0)throw new RangeError("Expected value of type ".concat(a," for attribute ").concat(o," on type ").concat(r,", got ").concat(c))}}(r,o,i.validate):i.validate}return _createClass(Attribute,[{key:"isRequired",get:function get(){return!this.hasDefault}}]),Attribute}(),I=function(){function MarkType(r,o,i,a){_classCallCheck(this,MarkType),this.name=r,this.rank=o,this.schema=i,this.spec=a,this.attrs=initAttrs(r,a.attrs),this.excluded=null;var c=defaultAttrs(this.attrs);this.instance=c?new p(this,c):null}return _createClass(MarkType,[{key:"create",value:function create(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return!r&&this.instance?this.instance:new p(this,_computeAttrs(this.attrs,r))}},{key:"removeFromSet",value:function removeFromSet(r){for(var o=0;o<r.length;o++)r[o].type==this&&(r=r.slice(0,o).concat(r.slice(o+1)),o--);return r}},{key:"isInSet",value:function isInSet(r){for(var o=0;o<r.length;o++)if(r[o].type==this)return r[o]}},{key:"checkAttrs",value:function checkAttrs(r){_checkAttrs(this.attrs,r,"mark",this.name)}},{key:"excludes",value:function excludes(r){return this.excluded.indexOf(r)>-1}}],[{key:"compile",value:function compile(r,o){var i=Object.create(null),a=0;return r.forEach(function(r,c){return i[r]=new MarkType(r,a++,o,c)}),i}}]),MarkType}(),L=function(){function Schema(r){var o=this;_classCallCheck(this,Schema),this.linebreakReplacement=null,this.cached=Object.create(null);var i=this.spec={};for(var c in r)i[c]=r[c];i.nodes=a.from(r.nodes),i.marks=a.from(r.marks||{}),this.nodes=N.compile(this.spec.nodes,this),this.marks=I.compile(this.spec.marks,this);var u=Object.create(null);for(var g in this.nodes){if(g in this.marks)throw new RangeError(g+" can not be both a node and a mark");var v=this.nodes[g],b=v.spec.content||"",k=v.spec.marks;if(v.contentMatch=u[b]||(u[b]=P.parse(b,this.nodes)),v.inlineContent=v.contentMatch.inlineContent,v.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!v.isInline||!v.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=v}v.markSet="_"==k?null:k?gatherMarks(this,k.split(" ")):""!=k&&v.inlineContent?null:[]}for(var E in this.marks){var w=this.marks[E],x=w.spec.excludes;w.excluded=null==x?[w]:""==x?[]:gatherMarks(this,x.split(" "))}this.nodeFromJSON=function(r){return _.fromJSON(o,r)},this.markFromJSON=function(r){return p.fromJSON(o,r)},this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}return _createClass(Schema,[{key:"node",value:function node(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0;if("string"==typeof r)r=this.nodeType(r);else{if(!(r instanceof N))throw new RangeError("Invalid node type: "+r);if(r.schema!=this)throw new RangeError("Node type from different schema used ("+r.name+")")}return r.createChecked(o,i,a)}},{key:"text",value:function text(r,o){var i=this.nodes.text;return new T(i,i.defaultAttrs,r,p.setFrom(o))}},{key:"mark",value:function mark(r,o){return"string"==typeof r&&(r=this.marks[r]),r.create(o)}},{key:"nodeType",value:function nodeType(r){var o=this.nodes[r];if(!o)throw new RangeError("Unknown node type: "+r);return o}}]),Schema}();function gatherMarks(r,o){for(var i=[],a=0;a<o.length;a++){var c=o[a],u=r.marks[c],p=u;if(u)i.push(u);else for(var g in r.marks){var v=r.marks[g];("_"==c||v.spec.group&&v.spec.group.split(" ").indexOf(c)>-1)&&i.push(p=v)}if(!p)throw new SyntaxError("Unknown mark type: '"+o[a]+"'")}return i}var z=function(){function DOMParser(r,o){var i=this;_classCallCheck(this,DOMParser),this.schema=r,this.rules=o,this.tags=[],this.styles=[];var a=this.matchedStyles=[];o.forEach(function(r){if(function isTagRule(r){return null!=r.tag}(r))i.tags.push(r);else if(function isStyleRule(r){return null!=r.style}(r)){var o=/[^=]*/.exec(r.style)[0];a.indexOf(o)<0&&a.push(o),i.styles.push(r)}}),this.normalizeLists=!this.tags.some(function(o){if(!/^(ul|ol)\b/.test(o.tag)||!o.node)return!1;var i=r.nodes[o.node];return i.contentMatch.matchType(i)})}return _createClass(DOMParser,[{key:"parse",value:function parse(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=new H(this,o,!1);return i.addAll(r,p.none,o.from,o.to),i.finish()}},{key:"parseSlice",value:function parseSlice(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=new H(this,o,!0);return i.addAll(r,p.none,o.from,o.to),v.maxOpen(i.finish())}},{key:"matchTag",value:function matchTag(r,o,i){for(var a=i?this.tags.indexOf(i)+1:0;a<this.tags.length;a++){var c=this.tags[a];if(matches(r,c.tag)&&(void 0===c.namespace||r.namespaceURI==c.namespace)&&(!c.context||o.matchesContext(c.context))){if(c.getAttrs){var u=c.getAttrs(r);if(!1===u)continue;c.attrs=u||void 0}return c}}}},{key:"matchStyle",value:function matchStyle(r,o,i,a){for(var c=a?this.styles.indexOf(a)+1:0;c<this.styles.length;c++){var u=this.styles[c],p=u.style;if(!(0!=p.indexOf(r)||u.context&&!i.matchesContext(u.context)||p.length>r.length&&(61!=p.charCodeAt(r.length)||p.slice(r.length+1)!=o))){if(u.getAttrs){var g=u.getAttrs(o);if(!1===g)continue;u.attrs=g||void 0}return u}}}}],[{key:"schemaRules",value:function schemaRules(r){var o=[];function insert(r){for(var i=null==r.priority?50:r.priority,a=0;a<o.length;a++){var c=o[a];if((null==c.priority?50:c.priority)<i)break}o.splice(a,0,r)}var i=function _loop2(o){var i=r.marks[o].spec.parseDOM;i&&i.forEach(function(r){insert(r=copy(r)),r.mark||r.ignore||r.clearMark||(r.mark=o)})};for(var a in r.marks)i(a);var c=function _loop3(o){var i=r.nodes[o].spec.parseDOM;i&&i.forEach(function(r){insert(r=copy(r)),r.node||r.ignore||r.mark||(r.node=o)})};for(var u in r.nodes)c(u);return o}},{key:"fromSchema",value:function fromSchema(r){return r.cached.domParser||(r.cached.domParser=new DOMParser(r,DOMParser.schemaRules(r)))}}]),DOMParser}(),j={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},B={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},V={ol:!0,ul:!0};function wsOptionsFor(r,o,i){return null!=o?(o?1:0)|("full"===o?2:0):r&&"pre"==r.whitespace?3:-5&i}var U=function(){function NodeContext(r,o,i,a,c,u){_classCallCheck(this,NodeContext),this.type=r,this.attrs=o,this.marks=i,this.solid=a,this.options=u,this.content=[],this.activeMarks=p.none,this.match=c||(4&u?null:r.contentMatch)}return _createClass(NodeContext,[{key:"findWrapping",value:function findWrapping(r){if(!this.match){if(!this.type)return[];var o=this.type.contentMatch.fillBefore(c.from(r));if(!o){var i,a=this.type.contentMatch;return(i=a.findWrapping(r.type))?(this.match=a,i):null}this.match=this.type.contentMatch.matchFragment(o)}return this.match.findWrapping(r.type)}},{key:"finish",value:function finish(r){if(!(1&this.options)){var o,i=this.content[this.content.length-1];if(i&&i.isText&&(o=/[ \t\r\n\u000c]+$/.exec(i.text))){var a=i;i.text.length==o[0].length?this.content.pop():this.content[this.content.length-1]=a.withText(a.text.slice(0,a.text.length-o[0].length))}}var u=c.from(this.content);return!r&&this.match&&(u=u.append(this.match.fillBefore(c.empty,!0))),this.type?this.type.create(this.attrs,u,this.marks):u}},{key:"inlineContext",value:function inlineContext(r){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:r.parentNode&&!j.hasOwnProperty(r.parentNode.nodeName.toLowerCase())}}]),NodeContext}(),H=function(){function ParseContext(r,o,i){_classCallCheck(this,ParseContext),this.parser=r,this.options=o,this.isOpen=i,this.open=0,this.localPreserveWS=!1;var a,c=o.topNode,u=wsOptionsFor(null,o.preserveWhitespace,0)|(i?4:0);a=c?new U(c.type,c.attrs,p.none,!0,o.topMatch||c.type.contentMatch,u):new U(i?null:r.schema.topNodeType,null,p.none,!0,null,u),this.nodes=[a],this.find=o.findPositions,this.needsBlock=!1}return _createClass(ParseContext,[{key:"top",get:function get(){return this.nodes[this.open]}},{key:"addDOM",value:function addDOM(r,o){3==r.nodeType?this.addTextNode(r,o):1==r.nodeType&&this.addElement(r,o)}},{key:"addTextNode",value:function addTextNode(r,o){var i=r.nodeValue,a=this.top,c=2&a.options?"full":this.localPreserveWS||(1&a.options)>0,u=this.parser.schema;if("full"===c||a.inlineContext(r)||/[^ \t\r\n\u000c]/.test(i)){if(c)if("full"===c)i=i.replace(/\r\n?/g,"\n");else if(u.linebreakReplacement&&/[\r\n]/.test(i)&&this.top.findWrapping(u.linebreakReplacement.create())){for(var p=i.split(/\r?\n|\r/),g=0;g<p.length;g++)g&&this.insertNode(u.linebreakReplacement.create(),o,!0),p[g]&&this.insertNode(u.text(p[g]),o,!/\S/.test(p[g]));i=""}else i=i.replace(/\r?\n|\r/g," ");else if(i=i.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(i)&&this.open==this.nodes.length-1){var v=a.content[a.content.length-1],b=r.previousSibling;(!v||b&&"BR"==b.nodeName||v.isText&&/[ \t\r\n\u000c]$/.test(v.text))&&(i=i.slice(1))}i&&this.insertNode(u.text(i),o,!/\S/.test(i)),this.findInText(r)}else this.findInside(r)}},{key:"addElement",value:function addElement(r,o,i){var a=this.localPreserveWS,c=this.top;("PRE"==r.tagName||/pre/.test(r.style&&r.style.whiteSpace))&&(this.localPreserveWS=!0);var u,p=r.nodeName.toLowerCase();V.hasOwnProperty(p)&&this.parser.normalizeLists&&function normalizeList(r){for(var o=r.firstChild,i=null;o;o=o.nextSibling){var a=1==o.nodeType?o.nodeName.toLowerCase():null;a&&V.hasOwnProperty(a)&&i?(i.appendChild(o),o=i):"li"==a?i=o:a&&(i=null)}}(r);var g=this.options.ruleFromNode&&this.options.ruleFromNode(r)||(u=this.parser.matchTag(r,this,i));e:if(g?g.ignore:B.hasOwnProperty(p))this.findInside(r),this.ignoreFallback(r,o);else if(!g||g.skip||g.closeParent){g&&g.closeParent?this.open=Math.max(0,this.open-1):g&&g.skip.nodeType&&(r=g.skip);var v,b=this.needsBlock;if(j.hasOwnProperty(p))c.content.length&&c.content[0].isInline&&this.open&&(this.open--,c=this.top),v=!0,c.type||(this.needsBlock=!0);else if(!r.firstChild){this.leafFallback(r,o);break e}var k=g&&g.skip?o:this.readStyles(r,o);k&&this.addAll(r,k),v&&this.sync(c),this.needsBlock=b}else{var E=this.readStyles(r,o);E&&this.addElementByRule(r,g,E,!1===g.consuming?u:void 0)}this.localPreserveWS=a}},{key:"leafFallback",value:function leafFallback(r,o){"BR"==r.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(r.ownerDocument.createTextNode("\n"),o)}},{key:"ignoreFallback",value:function ignoreFallback(r,o){"BR"!=r.nodeName||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"),o,!0)}},{key:"readStyles",value:function readStyles(r,o){var i=this,a=r.style;if(a&&a.length)for(var c=0;c<this.parser.matchedStyles.length;c++){var u=this.parser.matchedStyles[c],p=a.getPropertyValue(u);if(p)for(var g,v=function _loop4(r){var a=i.parser.matchStyle(u,p,i,r);return a?a.ignore?{v:null}:(o=a.clearMark?o.filter(function(r){return!a.clearMark(r)}):o.concat(i.parser.schema.marks[a.mark].create(a.attrs)),!1!==a.consuming?(b=r,0):void(b=r=a)):(b=r,0)},b=void 0;0!==(g=v(b));)if(g)return g.v}return o}},{key:"addElementByRule",value:function addElementByRule(r,o,i,a){var c,u,p=this;if(o.node)if((u=this.parser.schema.nodes[o.node]).isLeaf)this.insertNode(u.create(o.attrs),i,"BR"==r.nodeName)||this.leafFallback(r,i);else{var g=this.enter(u,o.attrs||null,i,o.preserveWhitespace);g&&(c=!0,i=g)}else{var v=this.parser.schema.marks[o.mark];i=i.concat(v.create(o.attrs))}var b=this.top;if(u&&u.isLeaf)this.findInside(r);else if(a)this.addElement(r,i,a);else if(o.getContent)this.findInside(r),o.getContent(r,this.parser.schema).forEach(function(r){return p.insertNode(r,i,!1)});else{var k=r;"string"==typeof o.contentElement?k=r.querySelector(o.contentElement):"function"==typeof o.contentElement?k=o.contentElement(r):o.contentElement&&(k=o.contentElement),this.findAround(r,k,!0),this.addAll(k,i),this.findAround(r,k,!1)}c&&this.sync(b)&&this.open--}},{key:"addAll",value:function addAll(r,o,i,a){for(var c=i||0,u=i?r.childNodes[i]:r.firstChild,p=null==a?null:r.childNodes[a];u!=p;u=u.nextSibling,++c)this.findAtPoint(r,c),this.addDOM(u,o);this.findAtPoint(r,c)}},{key:"findPlace",value:function findPlace(r,o,i){for(var a,c,u=this.open,p=0;u>=0;u--){var g=this.nodes[u],v=g.findWrapping(r);if(v&&(!a||a.length>v.length+p)&&(a=v,c=g,!v.length))break;if(g.solid){if(i)break;p+=2}}if(!a)return null;this.sync(c);for(var b=0;b<a.length;b++)o=this.enterInner(a[b],null,o,!1);return o}},{key:"insertNode",value:function insertNode(r,o,i){if(r.isInline&&this.needsBlock&&!this.top.type){var a=this.textblockFromContext();a&&(o=this.enterInner(a,null,o))}var c=this.findPlace(r,o,i);if(c){this.closeExtra();var u=this.top;u.match&&(u.match=u.match.matchType(r.type));var g,v=p.none,b=_createForOfIteratorHelper(c.concat(r.marks));try{for(b.s();!(g=b.n()).done;){var k=g.value;(u.type?u.type.allowsMarkType(k.type):markMayApply(k.type,r.type))&&(v=k.addToSet(v))}}catch(r){b.e(r)}finally{b.f()}return u.content.push(r.mark(v)),!0}return!1}},{key:"enter",value:function enter(r,o,i,a){var c=this.findPlace(r.create(o),i,!1);return c&&(c=this.enterInner(r,o,i,!0,a)),c}},{key:"enterInner",value:function enterInner(r,o,i){var a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],c=arguments.length>4?arguments[4]:void 0;this.closeExtra();var u=this.top;u.match=u.match&&u.match.matchType(r);var g=wsOptionsFor(r,c,u.options);4&u.options&&0==u.content.length&&(g|=4);var v=p.none;return i=i.filter(function(o){return!(u.type?u.type.allowsMarkType(o.type):markMayApply(o.type,r))||(v=o.addToSet(v),!1)}),this.nodes.push(new U(r,o,v,a,null,g)),this.open++,i}},{key:"closeExtra",value:function closeExtra(){var r=arguments.length>0&&void 0!==arguments[0]&&arguments[0],o=this.nodes.length-1;if(o>this.open){for(;o>this.open;o--)this.nodes[o-1].content.push(this.nodes[o].finish(r));this.nodes.length=this.open+1}}},{key:"finish",value:function finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!(!this.isOpen&&!this.options.topOpen))}},{key:"sync",value:function sync(r){for(var o=this.open;o>=0;o--){if(this.nodes[o]==r)return this.open=o,!0;this.localPreserveWS&&(this.nodes[o].options|=1)}return!1}},{key:"currentPos",get:function get(){this.closeExtra();for(var r=0,o=this.open;o>=0;o--){for(var i=this.nodes[o].content,a=i.length-1;a>=0;a--)r+=i[a].nodeSize;o&&r++}return r}},{key:"findAtPoint",value:function findAtPoint(r,o){if(this.find)for(var i=0;i<this.find.length;i++)this.find[i].node==r&&this.find[i].offset==o&&(this.find[i].pos=this.currentPos)}},{key:"findInside",value:function findInside(r){if(this.find)for(var o=0;o<this.find.length;o++)null==this.find[o].pos&&1==r.nodeType&&r.contains(this.find[o].node)&&(this.find[o].pos=this.currentPos)}},{key:"findAround",value:function findAround(r,o,i){if(r!=o&&this.find)for(var a=0;a<this.find.length;a++){if(null==this.find[a].pos&&1==r.nodeType&&r.contains(this.find[a].node))o.compareDocumentPosition(this.find[a].node)&(i?2:4)&&(this.find[a].pos=this.currentPos)}}},{key:"findInText",value:function findInText(r){if(this.find)for(var o=0;o<this.find.length;o++)this.find[o].node==r&&(this.find[o].pos=this.currentPos-(r.nodeValue.length-this.find[o].offset))}},{key:"matchesContext",value:function matchesContext(r){var o=this;if(r.indexOf("|")>-1)return r.split(/\s*\|\s*/).some(this.matchesContext,this);var i=r.split("/"),a=this.options.context,c=!(this.isOpen||a&&a.parent.type!=this.nodes[0].type),u=-(a?a.depth+1:0)+(c?0:1);return function match(r,p){for(;r>=0;r--){var g=i[r];if(""==g){if(r==i.length-1||0==r)continue;for(;p>=u;p--)if(match(r-1,p))return!0;return!1}var v=p>0||0==p&&c?o.nodes[p].type:a&&p>=u?a.node(p-u).type:null;if(!v||v.name!=g&&!v.isInGroup(g))return!1;p--}return!0}(i.length-1,this.open)}},{key:"textblockFromContext",value:function textblockFromContext(){var r=this.options.context;if(r)for(var o=r.depth;o>=0;o--){var i=r.node(o).contentMatchAt(r.indexAfter(o)).defaultType;if(i&&i.isTextblock&&i.defaultAttrs)return i}for(var a in this.parser.schema.nodes){var c=this.parser.schema.nodes[a];if(c.isTextblock&&c.defaultAttrs)return c}}}]),ParseContext}();function matches(r,o){return(r.matches||r.msMatchesSelector||r.webkitMatchesSelector||r.mozMatchesSelector).call(r,o)}function copy(r){var o={};for(var i in r)o[i]=r[i];return o}function markMayApply(r,o){var i,a=o.schema.nodes,c=function _loop5(){var i=a[u];if(!i.allowsMarkType(r))return 0;var c=[];return function scan(r){c.push(r);for(var i=0;i<r.edgeCount;i++){var a=r.edge(i),u=a.type,p=a.next;if(u==o)return!0;if(c.indexOf(p)<0&&scan(p))return!0}}(i.contentMatch)?{v:!0}:void 0};for(var u in a)if(0!==(i=c())&&i)return i.v}var W=function(){function DOMSerializer(r,o){_classCallCheck(this,DOMSerializer),this.nodes=r,this.marks=o}return _createClass(DOMSerializer,[{key:"serializeFragment",value:function serializeFragment(r){var o=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2?arguments[2]:void 0;a||(a=doc(i).createDocumentFragment());var c=a,u=[];return r.forEach(function(r){if(u.length||r.marks.length){for(var a=0,p=0;a<u.length&&p<r.marks.length;){var g=r.marks[p];if(o.marks[g.type.name]){if(!g.eq(u[a][0])||!1===g.type.spec.spanning)break;a++,p++}else p++}for(;a<u.length;)c=u.pop()[1];for(;p<r.marks.length;){var v=r.marks[p++],b=o.serializeMark(v,r.isInline,i);b&&(u.push([v,c]),c.appendChild(b.dom),c=b.contentDOM||b.dom)}}c.appendChild(o.serializeNodeInner(r,i))}),a}},{key:"serializeNodeInner",value:function serializeNodeInner(r,o){var i=_renderSpec(doc(o),this.nodes[r.type.name](r),null,r.attrs),a=i.dom,c=i.contentDOM;if(c){if(r.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(r.content,o,c)}return a}},{key:"serializeNode",value:function serializeNode(r){for(var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=this.serializeNodeInner(r,o),a=r.marks.length-1;a>=0;a--){var c=this.serializeMark(r.marks[a],r.isInline,o);c&&((c.contentDOM||c.dom).appendChild(i),i=c.dom)}return i}},{key:"serializeMark",value:function serializeMark(r,o){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=this.marks[r.type.name];return a&&_renderSpec(doc(i),a(r,o),null,r.attrs)}}],[{key:"renderSpec",value:function renderSpec(r,o){return _renderSpec(r,o,arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,arguments.length>3?arguments[3]:void 0)}},{key:"fromSchema",value:function fromSchema(r){return r.cached.domSerializer||(r.cached.domSerializer=new DOMSerializer(this.nodesFromSchema(r),this.marksFromSchema(r)))}},{key:"nodesFromSchema",value:function nodesFromSchema(r){var o=gatherToDOM(r.nodes);return o.text||(o.text=function(r){return r.text}),o}},{key:"marksFromSchema",value:function marksFromSchema(r){return gatherToDOM(r.marks)}}]),DOMSerializer}();function gatherToDOM(r){var o={};for(var i in r){var a=r[i].spec.toDOM;a&&(o[i]=a)}return o}function doc(r){return r.document||window.document}var K=new WeakMap;function suspiciousAttributes(r){var o=K.get(r);return void 0===o&&K.set(r,o=function suspiciousAttributesInner(r){var o=null;function scan(r){if(r&&"object"==_typeof(r))if(Array.isArray(r))if("string"==typeof r[0])o||(o=[]),o.push(r);else for(var i=0;i<r.length;i++)scan(r[i]);else for(var a in r)scan(r[a])}return scan(r),o}(r)),o}function _renderSpec(r,o,i,a){if("string"==typeof o)return{dom:r.createTextNode(o)};if(null!=o.nodeType)return{dom:o};if(o.dom&&null!=o.dom.nodeType)return o;var c,u=o[0];if("string"!=typeof u)throw new RangeError("Invalid array passed to renderSpec");if(a&&(c=suspiciousAttributes(a))&&c.indexOf(o)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");var p,g=u.indexOf(" ");g>0&&(i=u.slice(0,g),u=u.slice(g+1));var v=i?r.createElementNS(i,u):r.createElement(u),b=o[1],k=1;if(b&&"object"==_typeof(b)&&null==b.nodeType&&!Array.isArray(b))for(var E in k=2,b)if(null!=b[E]){var w=E.indexOf(" ");w>0?v.setAttributeNS(E.slice(0,w),E.slice(w+1),b[E]):"style"==E&&v.style?v.style.cssText=b[E]:v.setAttribute(E,b[E])}for(var x=k;x<o.length;x++){var C=o[x];if(0===C){if(x<o.length-1||x>k)throw new RangeError("Content hole must be the only child of its parent node");return{dom:v,contentDOM:v}}var _=_renderSpec(r,C,i,a),T=_.dom,P=_.contentDOM;if(v.appendChild(T),P){if(p)throw new RangeError("Multiple content holes");p=P}}return{dom:v,contentDOM:p}}o.ContentMatch=P,o.DOMParser=z,o.DOMSerializer=W,o.Fragment=c,o.Mark=p,o.MarkType=I,o.Node=_,o.NodeRange=x,o.NodeType=N,o.ReplaceError=g,o.ResolvedPos=b,o.Schema=L,o.Slice=v},78187:function(r){"use strict";r.exports=window.elementorV2.session},78806:function(r){"use strict";r.exports=window.elementorV2.env},79513:function(r){"use strict";r.exports=window.elementorV2.ui},81531:function(r,o,i){"use strict";var a,c=Object.defineProperty,u=Object.getOwnPropertyDescriptor,p=Object.getOwnPropertyNames,g=Object.prototype.hasOwnProperty,v={};((r,o)=>{for(var i in o)c(r,i,{get:o[i],enumerable:!0})})(v,{Link:()=>z,default:()=>j,isAllowedUri:()=>isAllowedUri,pasteRegex:()=>L}),r.exports=(a=v,((r,o,i,a)=>{if(o&&"object"==typeof o||"function"==typeof o)for(let v of p(o))g.call(r,v)||v===i||c(r,v,{get:()=>o[v],enumerable:!(a=u(o,v))||a.enumerable});return r})(c({},"__esModule",{value:!0}),a));var b=i(99248),k=i(54631),E=i(99248),w=i(49162),x=i(54631),C="[\0- -\u2029 ]",_=new RegExp(C),T=new RegExp(`${C}$`),P=new RegExp(C,"g");var A=i(99248),N=i(49162);var R=i(49162),I=i(54631);var L=/https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z]{2,}\b(?:[-a-zA-Z0-9@:%._+~#=?!&/]*)(?:[-a-zA-Z0-9@:%._+~#=?!&/]*)/gi;function isAllowedUri(r,o){const i=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return o&&o.forEach(r=>{const o="string"==typeof r?r:r.scheme;o&&i.push(o)}),!r||r.replace(P,"").match(new RegExp(`^(?:(?:${i.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}var z=b.Mark.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(r=>{"string"!=typeof r?(0,k.registerCustomProtocol)(r.scheme,r.optionalSlashes):(0,k.registerCustomProtocol)(r)})},onDestroy(){(0,k.reset)()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(r,o)=>!!isAllowedUri(r,o.protocols),validate:r=>!!r,shouldAutoLink:r=>{const o=/^[a-z][a-z0-9+.-]*:\/\//i.test(r),i=/^[a-z][a-z0-9+.-]*:/i.test(r);if(o||i&&!r.includes("@"))return!0;const a=(r.includes("@")?r.split("@").pop():r).split(/[/?#:]/)[0];return!/^\d{1,3}(\.\d{1,3}){3}$/.test(a)&&!!/\./.test(a)}}},addAttributes(){return{href:{default:null,parseHTML(r){return r.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class},title:{default:null}}},parseHTML(){return[{tag:"a[href]",getAttrs:r=>{const o=r.getAttribute("href");return!(!o||!this.options.isAllowedUri(o,{defaultValidate:r=>!!isAllowedUri(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol}))&&null}}]},renderHTML({HTMLAttributes:r}){return this.options.isAllowedUri(r.href,{defaultValidate:r=>!!isAllowedUri(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",(0,b.mergeAttributes)(this.options.HTMLAttributes,r),0]:["a",(0,b.mergeAttributes)(this.options.HTMLAttributes,{...r,href:""}),0]},markdownTokenName:"link",parseMarkdown:(r,o)=>o.applyMark("link",o.parseInline(r.tokens||[]),{href:r.href,title:r.title||null}),renderMarkdown:(r,o)=>{var i,a,c,u;const p=null!=(a=null==(i=r.attrs)?void 0:i.href)?a:"",g=null!=(u=null==(c=r.attrs)?void 0:c.title)?u:"",v=o.renderChildren(r);return g?`[${v}](${p} "${g}")`:`[${v}](${p})`},addCommands(){return{setLink:r=>({chain:o})=>{const{href:i}=r;return!!this.options.isAllowedUri(i,{defaultValidate:r=>!!isAllowedUri(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})&&o().setMark(this.name,r).setMeta("preventAutolink",!0).run()},toggleLink:r=>({chain:o})=>{const{href:i}=r||{};return!(i&&!this.options.isAllowedUri(i,{defaultValidate:r=>!!isAllowedUri(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol}))&&o().toggleMark(this.name,r,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:r})=>r().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[(0,b.markPasteRule)({find:r=>{const o=[];if(r){const{protocols:i,defaultProtocol:a}=this.options,c=(0,k.find)(r).filter(r=>r.isLink&&this.options.isAllowedUri(r.value,{defaultValidate:r=>!!isAllowedUri(r,i),protocols:i,defaultProtocol:a}));c.length&&c.forEach(r=>{this.options.shouldAutoLink(r.value)&&o.push({text:r.value,data:{href:r.href},index:r.start})})}return o},type:this.type,getAttributes:r=>{var o;return{href:null==(o=r.data)?void 0:o.href}}})]},addProseMirrorPlugins(){const r=[],{protocols:o,defaultProtocol:i}=this.options;return this.options.autolink&&r.push(function autolink(r){return new w.Plugin({key:new w.PluginKey("autolink"),appendTransaction:(o,i,a)=>{const c=o.some(r=>r.docChanged)&&!i.doc.eq(a.doc),u=o.some(r=>r.getMeta("preventAutolink"));if(!c||u)return;const{tr:p}=a,g=(0,E.combineTransactionSteps)(i.doc,[...o]);return(0,E.getChangedRanges)(g).forEach(({newRange:o})=>{const i=(0,E.findChildrenInRange)(a.doc,o,r=>r.isTextblock);let c,u;if(i.length>1)c=i[0],u=a.doc.textBetween(c.pos,c.pos+c.node.nodeSize,void 0," ");else if(i.length){const r=a.doc.textBetween(o.from,o.to," "," ");if(!T.test(r))return;c=i[0],u=a.doc.textBetween(c.pos,o.to,void 0," ")}if(c&&u){const o=u.split(_).filter(Boolean);if(o.length<=0)return!1;const i=o[o.length-1],g=c.pos+u.lastIndexOf(i);if(!i)return!1;const v=(0,x.tokenize)(i).map(o=>o.toObject(r.defaultProtocol));if(!function isValidLinkStructure(r){return 1===r.length?r[0].isLink:!(3!==r.length||!r[1].isLink)&&["()","[]"].includes(r[0].value+r[2].value)}(v))return!1;v.filter(r=>r.isLink).map(r=>({...r,from:g+r.start+1,to:g+r.end+1})).filter(r=>!a.schema.marks.code||!a.doc.rangeHasMark(r.from,r.to,a.schema.marks.code)).filter(o=>r.validate(o.value)).filter(o=>r.shouldAutoLink(o.value)).forEach(o=>{(0,E.getMarksBetween)(o.from,o.to,a.doc).some(o=>o.mark.type===r.type)||p.addMark(o.from,o.to,r.type.create({href:o.href}))})}}),p.steps.length?p:void 0}})}({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:r=>!!isAllowedUri(r,o),protocols:o,defaultProtocol:i}),shouldAutoLink:this.options.shouldAutoLink})),r.push(function clickHandler(r){return new N.Plugin({key:new N.PluginKey("handleClickLink"),props:{handleClick:(o,i,a)=>{var c,u;if(0!==a.button)return!1;if(!o.editable)return!1;let p=null;if(a.target instanceof HTMLAnchorElement)p=a.target;else{const o=a.target;if(!o)return!1;const i=r.editor.view.dom;p=o.closest("a"),p&&!i.contains(p)&&(p=null)}if(!p)return!1;let g=!1;if(r.enableClickSelection&&(g=r.editor.commands.extendMarkRange(r.type.name)),r.openOnClick){const i=(0,A.getAttributes)(o.state,r.type.name),a=null!=(c=p.href)?c:i.href,v=null!=(u=p.target)?u:i.target;a&&(window.open(a,v),g=!0)}return g}}})}({type:this.type,editor:this.editor,openOnClick:"whenNotEditable"===this.options.openOnClick||this.options.openOnClick,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste&&r.push(function pasteHandler(r){return new R.Plugin({key:new R.PluginKey("handlePasteLink"),props:{handlePaste:(o,i,a)=>{const{shouldAutoLink:c}=r,{state:u}=o,{selection:p}=u,{empty:g}=p;if(g)return!1;let v="";a.content.forEach(r=>{v+=r.textContent});const b=(0,I.find)(v,{defaultProtocol:r.defaultProtocol}).find(r=>r.isLink&&r.value===v);return!(!v||!b||void 0!==c&&!c(b.value))&&r.editor.commands.setMark(r.type,{href:b.href})}}})}({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink})),r}}),j=z},83574:function(r,o,i){"use strict";var a,c=Object.create,u=Object.defineProperty,p=Object.getOwnPropertyDescriptor,g=Object.getOwnPropertyNames,v=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty,__copyProps=(r,o,i,a)=>{if(o&&"object"==typeof o||"function"==typeof o)for(let c of g(o))b.call(r,c)||c===i||u(r,c,{get:()=>o[c],enumerable:!(a=p(o,c))||a.enumerable});return r},__toESM=(r,o,i)=>(i=null!=r?c(v(r)):{},__copyProps(!o&&r&&r.__esModule?i:u(i,"default",{value:r,enumerable:!0}),r)),k={};((r,o)=>{for(var i in o)u(r,i,{get:o[i],enumerable:!0})})(k,{EditorConsumer:()=>J,EditorContent:()=>A,EditorContext:()=>G,EditorProvider:()=>EditorProvider,MarkViewContent:()=>MarkViewContent,NodeViewContent:()=>NodeViewContent,NodeViewWrapper:()=>te,PureEditorContent:()=>T,ReactMarkView:()=>ue,ReactMarkViewContext:()=>ce,ReactMarkViewRenderer:()=>ReactMarkViewRenderer,ReactNodeView:()=>he,ReactNodeViewContentProvider:()=>ReactNodeViewContentProvider,ReactNodeViewContext:()=>X,ReactNodeViewRenderer:()=>ReactNodeViewRenderer,ReactRenderer:()=>se,Tiptap:()=>ye,TiptapContent:()=>TiptapContent,TiptapContext:()=>ve,TiptapWrapper:()=>TiptapWrapper,useCurrentEditor:()=>useCurrentEditor,useEditor:()=>useEditor,useEditorState:()=>useEditorState,useReactNodeView:()=>useReactNodeView,useTiptap:()=>useTiptap,useTiptapState:()=>useTiptapState}),r.exports=(a=k,__copyProps(u({},"__esModule",{value:!0}),a));var E=i(97557),w=__toESM(i(97557),1),x=__toESM(i(43617),1),C=i(19888),_=i(74848),mergeRefs=(...r)=>o=>{r.forEach(r=>{"function"==typeof r?r(o):r&&(r.current=o)})},Portals=({contentComponent:r})=>{const o=(0,C.useSyncExternalStore)(r.subscribe,r.getSnapshot,r.getServerSnapshot);return(0,_.jsx)(_.Fragment,{children:Object.values(o)})};var T=class extends w.default.Component{constructor(r){var o;super(r),this.editorContentRef=w.default.createRef(),this.initialized=!1,this.state={hasContentComponentInitialized:Boolean(null==(o=r.editor)?void 0:o.contentComponent)}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){var r;const o=this.props.editor;if(o&&!o.isDestroyed&&(null==(r=o.view.dom)?void 0:r.parentNode)){if(o.contentComponent)return;const r=this.editorContentRef.current;r.append(...o.view.dom.parentNode.childNodes),o.setOptions({element:r}),o.contentComponent=function getInstance(){const r=new Set;let o={};return{subscribe(o){return r.add(o),()=>{r.delete(o)}},getSnapshot(){return o},getServerSnapshot(){return o},setRenderer(i,a){o={...o,[i]:x.default.createPortal(a.reactElement,a.element,i)},r.forEach(r=>r())},removeRenderer(i){const a={...o};delete a[i],o=a,r.forEach(r=>r())}}}(),this.state.hasContentComponentInitialized||(this.unsubscribeToContentComponent=o.contentComponent.subscribe(()=>{this.setState(r=>r.hasContentComponentInitialized?r:{hasContentComponentInitialized:!0}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent()})),o.createNodeViews(),this.initialized=!0}}componentWillUnmount(){var r;const o=this.props.editor;if(o){this.initialized=!1,o.isDestroyed||o.view.setProps({nodeViews:{}}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent(),o.contentComponent=null;try{if(!(null==(r=o.view.dom)?void 0:r.parentNode))return;const i=document.createElement("div");i.append(...o.view.dom.parentNode.childNodes),o.setOptions({element:i})}catch{}}}render(){const{editor:r,innerRef:o,...i}=this.props;return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)("div",{ref:mergeRefs(o,this.editorContentRef),...i}),(null==r?void 0:r.contentComponent)&&(0,_.jsx)(Portals,{contentComponent:r.contentComponent})]})}},P=(0,w.forwardRef)((r,o)=>{const i=w.default.useMemo(()=>Math.floor(4294967295*Math.random()).toString(),[r.editor]);return w.default.createElement(T,{key:i,innerRef:o,...r})}),A=w.default.memo(P),N=i(99248),R=i(97557),I=i(19888),L=i(40331),z=i(97557),j=i(69242),B="undefined"!=typeof window?z.useLayoutEffect:z.useEffect,V=class{constructor(r){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=r,this.lastSnapshot={editor:r,transactionNumber:0},this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber||(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber}),this.lastSnapshot}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(r){return this.subscribers.add(r),()=>{this.subscribers.delete(r)}}watch(r){if(this.editor=r,this.editor){const fn=()=>{this.transactionNumber+=1,this.subscribers.forEach(r=>r())},r=this.editor;return r.on("transaction",fn),()=>{r.off("transaction",fn)}}}};function useEditorState(r){var o;const[i]=(0,z.useState)(()=>new V(r.editor)),a=(0,j.useSyncExternalStoreWithSelector)(i.subscribe,i.getSnapshot,i.getServerSnapshot,r.selector,null!=(o=r.equalityFn)?o:L.deepEqual);return B(()=>i.watch(r.editor),[r.editor,i]),(0,z.useDebugValue)(a),a}var U="undefined"==typeof window,H=U||Boolean("undefined"!=typeof window&&window.next),W=class _EditorInstanceManager{constructor(r){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=r,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(r){this.editor=r,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(r=>r())}getInitialEditor(){return void 0===this.options.current.immediatelyRender?U||H?null:this.createEditor():(this.options.current.immediatelyRender,this.options.current.immediatelyRender?this.createEditor():null)}createEditor(){const r={...this.options.current,onBeforeCreate:(...r)=>{var o,i;return null==(i=(o=this.options.current).onBeforeCreate)?void 0:i.call(o,...r)},onBlur:(...r)=>{var o,i;return null==(i=(o=this.options.current).onBlur)?void 0:i.call(o,...r)},onCreate:(...r)=>{var o,i;return null==(i=(o=this.options.current).onCreate)?void 0:i.call(o,...r)},onDestroy:(...r)=>{var o,i;return null==(i=(o=this.options.current).onDestroy)?void 0:i.call(o,...r)},onFocus:(...r)=>{var o,i;return null==(i=(o=this.options.current).onFocus)?void 0:i.call(o,...r)},onSelectionUpdate:(...r)=>{var o,i;return null==(i=(o=this.options.current).onSelectionUpdate)?void 0:i.call(o,...r)},onTransaction:(...r)=>{var o,i;return null==(i=(o=this.options.current).onTransaction)?void 0:i.call(o,...r)},onUpdate:(...r)=>{var o,i;return null==(i=(o=this.options.current).onUpdate)?void 0:i.call(o,...r)},onContentError:(...r)=>{var o,i;return null==(i=(o=this.options.current).onContentError)?void 0:i.call(o,...r)},onDrop:(...r)=>{var o,i;return null==(i=(o=this.options.current).onDrop)?void 0:i.call(o,...r)},onPaste:(...r)=>{var o,i;return null==(i=(o=this.options.current).onPaste)?void 0:i.call(o,...r)},onDelete:(...r)=>{var o,i;return null==(i=(o=this.options.current).onDelete)?void 0:i.call(o,...r)}};return new N.Editor(r)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(r){return this.subscriptions.add(r),()=>{this.subscriptions.delete(r)}}static compareOptions(r,o){return Object.keys(r).every(i=>!!["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(i)||("extensions"===i&&r.extensions&&o.extensions?r.extensions.length===o.extensions.length&&r.extensions.every((r,i)=>{var a;return r===(null==(a=o.extensions)?void 0:a[i])}):r[i]===o[i]))}onRender(r){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&0===r.length?_EditorInstanceManager.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(r),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(r){if(this.editor&&!this.editor.isDestroyed){if(null===this.previousDeps)return void(this.previousDeps=r);if(this.previousDeps.length===r.length&&this.previousDeps.every((o,i)=>o===r[i]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=r}scheduleDestroy(){const r=this.instanceId,o=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{this.isComponentMounted&&this.instanceId===r?o&&o.setOptions(this.options.current):o&&!o.isDestroyed&&(o.destroy(),this.instanceId===r&&this.setEditor(null))},1)}};function useEditor(r={},o=[]){const i=(0,R.useRef)(r);i.current=r;const[a]=(0,R.useState)(()=>new W(i)),c=(0,I.useSyncExternalStore)(a.subscribe,a.getEditor,a.getServerSnapshot);return(0,R.useDebugValue)(c),(0,R.useEffect)(a.onRender(o)),useEditorState({editor:c,selector:({transactionNumber:o})=>!1===r.shouldRerenderOnTransaction||void 0===r.shouldRerenderOnTransaction?null:r.immediatelyRender&&0===o?0:o+1}),c}var K=i(74848),G=(0,E.createContext)({editor:null}),J=G.Consumer,useCurrentEditor=()=>(0,E.useContext)(G);function EditorProvider({children:r,slotAfter:o,slotBefore:i,editorContainerProps:a={},...c}){const u=useEditor(c),p=(0,E.useMemo)(()=>({editor:u}),[u]);return u?(0,K.jsxs)(G.Provider,{value:p,children:[i,(0,K.jsx)(J,{children:({editor:r})=>(0,K.jsx)(A,{editor:r,...a})}),r,o]}):null}var Y=i(97557),X=(0,Y.createContext)({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}}),ReactNodeViewContentProvider=({children:r,content:o})=>(0,Y.createElement)(X.Provider,{value:{nodeViewContentChildren:o}},r),useReactNodeView=()=>(0,Y.useContext)(X),Q=i(74848);function NodeViewContent({as:r="div",...o}){const{nodeViewContentRef:i,nodeViewContentChildren:a}=useReactNodeView();return(0,Q.jsx)(r,{...o,ref:i,"data-node-view-content":"",style:{whiteSpace:"pre-wrap",...o.style},children:a})}var Z=__toESM(i(97557),1),ee=i(74848),te=Z.default.forwardRef((r,o)=>{const{onDragStart:i}=useReactNodeView(),a=r.as||"div";return(0,ee.jsx)(a,{...r,ref:o,"data-node-view-wrapper":"",onDragStart:i,style:{whiteSpace:"normal",...r.style}})}),ne=i(99248),re=__toESM(i(97557),1),oe=i(97557),ie=i(43617),ae=i(74848);function isClassComponent(r){return!("function"!=typeof r||!r.prototype||!r.prototype.isReactComponent)}function isForwardRefComponent(r){return!("object"!=typeof r||!r.$$typeof||"Symbol(react.forward_ref)"!==r.$$typeof.toString()&&"react.forward_ref"!==r.$$typeof.description)}var se=class{constructor(r,{editor:o,props:i={},as:a="div",className:c=""}){this.ref=null,this.destroyed=!1,this.id=Math.floor(4294967295*Math.random()).toString(),this.component=r,this.editor=o,this.props=i,this.element=document.createElement(a),this.element.classList.add("react-renderer"),c&&this.element.classList.add(...c.split(" ")),this.editor.isInitialized?(0,ie.flushSync)(()=>{this.render()}):queueMicrotask(()=>{this.destroyed||this.render()})}render(){var r;if(this.destroyed)return;const o=this.component,i=this.props,a=this.editor,c=function isReact19Plus(){try{if(oe.version)return parseInt(oe.version.split(".")[0],10)>=19}catch{}return!1}(),u=function canReceiveRef(r){if(isClassComponent(r))return!0;if(isForwardRefComponent(r))return!0;if(function isMemoComponent(r){return!("object"!=typeof r||!r.$$typeof||"Symbol(react.memo)"!==r.$$typeof.toString()&&"react.memo"!==r.$$typeof.description)}(r)){const o=r.type;if(o)return isClassComponent(o)||isForwardRefComponent(o)}return!1}(o),p={...i};!p.ref||c||u||delete p.ref,p.ref||!c&&!u||(p.ref=r=>{this.ref=r}),this.reactElement=(0,ae.jsx)(o,{...p}),null==(r=null==a?void 0:a.contentComponent)||r.setRenderer(this.id,this)}updateProps(r={}){this.destroyed||(this.props={...this.props,...r},this.render())}destroy(){var r;this.destroyed=!0;const o=this.editor;null==(r=null==o?void 0:o.contentComponent)||r.removeRenderer(this.id);try{this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)}catch{}}updateAttributes(r){Object.keys(r).forEach(o=>{this.element.setAttribute(o,r[o])})}},le=i(74848),ce=re.default.createContext({markViewContentRef:()=>{}}),MarkViewContent=r=>{const{as:o="span",...i}=r,{markViewContentRef:a}=re.default.useContext(ce);return(0,le.jsx)(o,{...i,ref:a,"data-mark-view-content":""})},ue=class extends ne.MarkView{constructor(r,o,i){super(r,o,i);const{as:a="span",attrs:c,className:u=""}=i||{},p={...o,updateAttributes:this.updateAttributes.bind(this)};this.contentDOMElement=document.createElement("span");const g={markViewContentRef:r=>{r&&!r.contains(this.contentDOMElement)&&r.appendChild(this.contentDOMElement)}},v=re.default.memo(o=>(0,le.jsx)(ce.Provider,{value:g,children:re.default.createElement(r,o)}));v.displayName="ReactMarkView",this.renderer=new se(v,{editor:o.editor,props:p,as:a,className:`mark-${o.mark.type.name} ${u}`.trim()}),c&&this.renderer.updateAttributes(c)}get dom(){return this.renderer.element}get contentDOM(){return this.contentDOMElement}};function ReactMarkViewRenderer(r,o={}){return i=>new ue(r,i,o)}var pe=i(99248),de=i(97557),fe=i(74848),he=class extends pe.NodeView{constructor(r,o,i){if(super(r,o,i),this.selectionRafId=null,this.cachedExtensionWithSyncedStorage=null,!this.node.isLeaf){this.options.contentDOMElementTag?this.contentDOMElement=document.createElement(this.options.contentDOMElementTag):this.contentDOMElement=document.createElement(this.node.isInline?"span":"div"),this.contentDOMElement.dataset.nodeViewContentReact="",this.contentDOMElement.dataset.nodeViewWrapper="",this.contentDOMElement.style.whiteSpace="inherit";const r=this.dom.querySelector("[data-node-view-content]");if(!r)return;r.appendChild(this.contentDOMElement)}}get extensionWithSyncedStorage(){if(!this.cachedExtensionWithSyncedStorage){const r=this.editor,o=this.extension;this.cachedExtensionWithSyncedStorage=new Proxy(o,{get(i,a,c){var u;return"storage"===a?null!=(u=r.storage[o.name])?u:{}:Reflect.get(i,a,c)}})}return this.cachedExtensionWithSyncedStorage}mount(){const r={editor:this.editor,node:this.node,decorations:this.decorations,innerDecorations:this.innerDecorations,view:this.view,selected:!1,extension:this.extensionWithSyncedStorage,HTMLAttributes:this.HTMLAttributes,getPos:()=>this.getPos(),updateAttributes:(r={})=>this.updateAttributes(r),deleteNode:()=>this.deleteNode(),ref:(0,de.createRef)()};if(!this.component.displayName){const capitalizeFirstChar=r=>r.charAt(0).toUpperCase()+r.substring(1);this.component.displayName=capitalizeFirstChar(this.extension.name)}const o={onDragStart:this.onDragStart.bind(this),nodeViewContentRef:r=>{r&&this.contentDOMElement&&r.firstChild!==this.contentDOMElement&&(r.hasAttribute("data-node-view-wrapper")&&r.removeAttribute("data-node-view-wrapper"),r.appendChild(this.contentDOMElement))}},i=this.component,a=(0,de.memo)(r=>(0,fe.jsx)(X.Provider,{value:o,children:(0,de.createElement)(i,r)}));a.displayName="ReactNodeView";let c=this.node.isInline?"span":"div";this.options.as&&(c=this.options.as);const{className:u=""}=this.options;this.handleSelectionUpdate=this.handleSelectionUpdate.bind(this),this.renderer=new se(a,{editor:this.editor,props:r,as:c,className:`node-${this.node.type.name} ${u}`.trim()}),this.editor.on("selectionUpdate",this.handleSelectionUpdate),this.updateElementAttributes()}get dom(){var r;if(this.renderer.element.firstElementChild&&!(null==(r=this.renderer.element.firstElementChild)?void 0:r.hasAttribute("data-node-view-wrapper")))throw Error("Please use the NodeViewWrapper component for your node view.");return this.renderer.element}get contentDOM(){return this.node.isLeaf?null:this.contentDOMElement}handleSelectionUpdate(){this.selectionRafId&&(cancelAnimationFrame(this.selectionRafId),this.selectionRafId=null),this.selectionRafId=requestAnimationFrame(()=>{this.selectionRafId=null;const{from:r,to:o}=this.editor.state.selection,i=this.getPos();if("number"==typeof i)if(r<=i&&o>=i+this.node.nodeSize){if(this.renderer.props.selected)return;this.selectNode()}else{if(!this.renderer.props.selected)return;this.deselectNode()}})}update(r,o,i){const rerenderComponent=r=>{this.renderer.updateProps(r),"function"==typeof this.options.attrs&&this.updateElementAttributes()};if(r.type!==this.node.type)return!1;if("function"==typeof this.options.update){const a=this.node,c=this.decorations,u=this.innerDecorations;return this.node=r,this.decorations=o,this.innerDecorations=i,this.options.update({oldNode:a,oldDecorations:c,newNode:r,newDecorations:o,oldInnerDecorations:u,innerDecorations:i,updateProps:()=>rerenderComponent({node:r,decorations:o,innerDecorations:i,extension:this.extensionWithSyncedStorage})})}return r===this.node&&this.decorations===o&&this.innerDecorations===i||(this.node=r,this.decorations=o,this.innerDecorations=i,rerenderComponent({node:r,decorations:o,innerDecorations:i,extension:this.extensionWithSyncedStorage})),!0}selectNode(){this.renderer.updateProps({selected:!0}),this.renderer.element.classList.add("ProseMirror-selectednode")}deselectNode(){this.renderer.updateProps({selected:!1}),this.renderer.element.classList.remove("ProseMirror-selectednode")}destroy(){this.renderer.destroy(),this.editor.off("selectionUpdate",this.handleSelectionUpdate),this.contentDOMElement=null,this.selectionRafId&&(cancelAnimationFrame(this.selectionRafId),this.selectionRafId=null)}updateElementAttributes(){if(this.options.attrs){let r={};if("function"==typeof this.options.attrs){const o=this.editor.extensionManager.attributes,i=(0,pe.getRenderedAttributes)(this.node,o);r=this.options.attrs({node:this.node,HTMLAttributes:i})}else r=this.options.attrs;this.renderer.updateAttributes(r)}}};function ReactNodeViewRenderer(r,o){return i=>i.editor.contentComponent?new he(r,i,o):{}}var me=i(97557),ge=i(74848),ve=(0,me.createContext)({get editor(){throw new Error("useTiptap must be used within a <Tiptap> provider")}});ve.displayName="TiptapContext";var useTiptap=()=>(0,me.useContext)(ve);function useTiptapState(r,o){const{editor:i}=useTiptap();return useEditorState({editor:i,selector:r,equalityFn:o})}function TiptapWrapper({editor:r,instance:o,children:i}){const a=null!=r?r:o;if(!a)throw new Error("Tiptap: An editor instance is required. Pass a non-null `editor` prop.");const c=(0,me.useMemo)(()=>({editor:a}),[a]),u=(0,me.useMemo)(()=>({editor:a}),[a]);return(0,ge.jsx)(G.Provider,{value:u,children:(0,ge.jsx)(ve.Provider,{value:c,children:i})})}function TiptapContent({...r}){const{editor:o}=useTiptap();return(0,ge.jsx)(A,{editor:o,...r})}TiptapWrapper.displayName="Tiptap",TiptapContent.displayName="Tiptap.Content";var ye=Object.assign(TiptapWrapper,{Content:TiptapContent});((r,o,i)=>{__copyProps(r,o,"default"),i&&__copyProps(i,o,"default")})(k,i(99248),r.exports)},84792:function(r){"use strict";r.exports=window.elementorV2.wpMedia},87627:function(r){"use strict";r.exports=window.elementorV2.locations},88136:function(r,o,i){"use strict";var a=i(76237),c=i(37820),u="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),p="undefined"!=typeof navigator&&/Win/.test(navigator.platform);function normalizeKeyName(r){var o,i,a,c,p=r.split(/-(?!$)/),g=p[p.length-1];"Space"==g&&(g=" ");for(var v=0;v<p.length-1;v++){var b=p[v];if(/^(cmd|meta|m)$/i.test(b))c=!0;else if(/^a(lt)?$/i.test(b))o=!0;else if(/^(c|ctrl|control)$/i.test(b))i=!0;else if(/^s(hift)?$/i.test(b))a=!0;else{if(!/^mod$/i.test(b))throw new Error("Unrecognized modifier name: "+b);u?c=!0:i=!0}}return o&&(g="Alt-"+g),i&&(g="Ctrl-"+g),c&&(g="Meta-"+g),a&&(g="Shift-"+g),g}function modifiers(r,o){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return o.altKey&&(r="Alt-"+r),o.ctrlKey&&(r="Ctrl-"+r),o.metaKey&&(r="Meta-"+r),i&&o.shiftKey&&(r="Shift-"+r),r}function keydownHandler(r){var o=function normalize(r){var o=Object.create(null);for(var i in r)o[normalizeKeyName(i)]=r[i];return o}(r);return function(r,i){var c,u=a.keyName(i),g=o[modifiers(u,i)];if(g&&g(r.state,r.dispatch,r))return!0;if(1==u.length&&" "!=u){if(i.shiftKey){var v=o[modifiers(u,i,!1)];if(v&&v(r.state,r.dispatch,r))return!0}if((i.altKey||i.metaKey||i.ctrlKey)&&!(p&&i.ctrlKey&&i.altKey)&&(c=a.base[i.keyCode])&&c!=u){var b=o[modifiers(c,i)];if(b&&b(r.state,r.dispatch,r))return!0}}return!1}}o.keydownHandler=keydownHandler,o.keymap=function keymap(r){return new c.Plugin({props:{handleKeyDown:keydownHandler(r)}})}},90990:function(r,o,i){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),function _createStarExport(r){Object.keys(r).filter(r=>"default"!==r&&"__esModule"!==r).forEach(i=>{o.hasOwnProperty(i)||Object.defineProperty(o,i,{enumerable:!0,configurable:!0,get:()=>r[i]})})}(i(49454))},97557:function(r){"use strict";r.exports=window.React},99248:function(r,o,i){"use strict";var a,c=Object.defineProperty,u=Object.getOwnPropertyDescriptor,p=Object.getOwnPropertyNames,g=Object.prototype.hasOwnProperty,__export=(r,o)=>{for(var i in o)c(r,i,{get:o[i],enumerable:!0})},v={};function createChainableState(r){const{state:o,transaction:i}=r;let{selection:a}=i,{doc:c}=i,{storedMarks:u}=i;return{...o,apply:o.apply.bind(o),applyTransaction:o.applyTransaction.bind(o),plugins:o.plugins,schema:o.schema,reconfigure:o.reconfigure.bind(o),toJSON:o.toJSON.bind(o),get storedMarks(){return u},get selection(){return a},get doc(){return c},get tr(){return a=i.selection,c=i.doc,u=i.storedMarks,i}}}__export(v,{CommandManager:()=>b,Editor:()=>it,Extendable:()=>Oe,Extension:()=>Fe,Fragment:()=>Fragment6,InputRule:()=>Te,MappablePosition:()=>le,Mark:()=>Pe,MarkView:()=>pt,Node:()=>dt,NodePos:()=>ot,NodeView:()=>ht,PasteRule:()=>Ne,ResizableNodeView:()=>st,ResizableNodeview:()=>lt,Tracker:()=>mt,callOrReturn:()=>callOrReturn,canInsertNode:()=>canInsertNode,combineTransactionSteps:()=>combineTransactionSteps,commands:()=>k,createAtomBlockMarkdownSpec:()=>createAtomBlockMarkdownSpec,createBlockMarkdownSpec:()=>createBlockMarkdownSpec,createChainableState:()=>createChainableState,createDocument:()=>createDocument,createElement:()=>h,createInlineMarkdownSpec:()=>createInlineMarkdownSpec,createMappablePosition:()=>createMappablePosition,createNodeFromContent:()=>createNodeFromContent,createStyleTag:()=>createStyleTag,defaultBlockAt:()=>defaultBlockAt,deleteProps:()=>deleteProps,elementFromString:()=>elementFromString,escapeForRegEx:()=>escapeForRegEx,extensions:()=>De,findChildren:()=>findChildren,findChildrenInRange:()=>findChildrenInRange,findDuplicates:()=>findDuplicates,findParentNode:()=>findParentNode,findParentNodeClosestToPos:()=>findParentNodeClosestToPos,flattenExtensions:()=>flattenExtensions,fromString:()=>fromString,generateHTML:()=>generateHTML,generateJSON:()=>generateJSON,generateText:()=>generateText,getAttributes:()=>getAttributes,getAttributesFromExtensions:()=>getAttributesFromExtensions,getChangedRanges:()=>getChangedRanges,getDebugJSON:()=>getDebugJSON,getExtensionField:()=>getExtensionField,getHTMLFromFragment:()=>getHTMLFromFragment,getMarkAttributes:()=>getMarkAttributes,getMarkRange:()=>getMarkRange,getMarkType:()=>getMarkType,getMarksBetween:()=>getMarksBetween,getNodeAtPosition:()=>getNodeAtPosition,getNodeAttributes:()=>getNodeAttributes,getNodeType:()=>getNodeType,getRenderedAttributes:()=>getRenderedAttributes,getSchema:()=>getSchema,getSchemaByResolvedExtensions:()=>getSchemaByResolvedExtensions,getSchemaTypeByName:()=>getSchemaTypeByName,getSchemaTypeNameByName:()=>getSchemaTypeNameByName,getSplittedAttributes:()=>getSplittedAttributes,getText:()=>getText,getTextBetween:()=>getTextBetween,getTextContentFromNodes:()=>getTextContentFromNodes,getTextSerializersFromSchema:()=>getTextSerializersFromSchema,getUpdatedPosition:()=>getUpdatedPosition,h:()=>h,injectExtensionAttributesToParseRule:()=>injectExtensionAttributesToParseRule,inputRulesPlugin:()=>inputRulesPlugin,isActive:()=>isActive,isAndroid:()=>isAndroid,isAtEndOfNode:()=>isAtEndOfNode,isAtStartOfNode:()=>isAtStartOfNode,isEmptyObject:()=>isEmptyObject,isExtensionRulesEnabled:()=>isExtensionRulesEnabled,isFirefox:()=>isFirefox,isFunction:()=>isFunction,isList:()=>isList,isMacOS:()=>isMacOS,isMarkActive:()=>isMarkActive,isNodeActive:()=>isNodeActive,isNodeEmpty:()=>isNodeEmpty,isNodeSelection:()=>isNodeSelection,isNumber:()=>isNumber,isPlainObject:()=>isPlainObject,isRegExp:()=>isRegExp,isSafari:()=>isSafari,isString:()=>isString,isTextSelection:()=>isTextSelection,isiOS:()=>isiOS,markInputRule:()=>markInputRule,markPasteRule:()=>markPasteRule,markdown:()=>ut,mergeAttributes:()=>mergeAttributes,mergeDeep:()=>mergeDeep,minMax:()=>minMax,nodeInputRule:()=>nodeInputRule,nodePasteRule:()=>nodePasteRule,objectIncludes:()=>objectIncludes,parseAttributes:()=>parseAttributes,parseIndentedBlocks:()=>parseIndentedBlocks,pasteRulesPlugin:()=>pasteRulesPlugin,posToDOMRect:()=>posToDOMRect,removeDuplicates:()=>removeDuplicates,renderNestedMarkdownContent:()=>renderNestedMarkdownContent,resolveExtensions:()=>resolveExtensions,resolveFocusPosition:()=>resolveFocusPosition,rewriteUnknownContent:()=>rewriteUnknownContent,selectionToInsertionEnd:()=>selectionToInsertionEnd,serializeAttributes:()=>serializeAttributes,sortExtensions:()=>sortExtensions,splitExtensions:()=>splitExtensions,textInputRule:()=>textInputRule,textPasteRule:()=>textPasteRule,textblockTypeInputRule:()=>textblockTypeInputRule,updateMarkViewAttributes:()=>updateMarkViewAttributes,wrappingInputRule:()=>wrappingInputRule}),r.exports=(a=v,((r,o,i,a)=>{if(o&&"object"==typeof o||"function"==typeof o)for(let v of p(o))g.call(r,v)||v===i||c(r,v,{get:()=>o[v],enumerable:!(a=u(o,v))||a.enumerable});return r})(c({},"__esModule",{value:!0}),a));var b=class{constructor(r){this.editor=r.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=r.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:r,editor:o,state:i}=this,{view:a}=o,{tr:c}=i,u=this.buildProps(c);return Object.fromEntries(Object.entries(r).map(([r,o])=>[r,(...r)=>{const i=o(...r)(u);return c.getMeta("preventDispatch")||this.hasCustomState||a.dispatch(c),i}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(r,o=!0){const{rawCommands:i,editor:a,state:c}=this,{view:u}=a,p=[],g=!!r,v=r||c.tr,b={...Object.fromEntries(Object.entries(i).map(([r,i])=>[r,(...r)=>{const a=this.buildProps(v,o),c=i(...r)(a);return p.push(c),b}])),run:()=>(g||!o||v.getMeta("preventDispatch")||this.hasCustomState||u.dispatch(v),p.every(r=>!0===r))};return b}createCan(r){const{rawCommands:o,state:i}=this,a=!1,c=r||i.tr,u=this.buildProps(c,a);return{...Object.fromEntries(Object.entries(o).map(([r,o])=>[r,(...r)=>o(...r)({...u,dispatch:void 0})])),chain:()=>this.createChain(c,a)}}buildProps(r,o=!0){const{rawCommands:i,editor:a,state:c}=this,{view:u}=a,p={tr:r,editor:a,view:u,state:createChainableState({state:c,transaction:r}),dispatch:o?()=>{}:void 0,chain:()=>this.createChain(r,o),can:()=>this.createCan(r),get commands(){return Object.fromEntries(Object.entries(i).map(([r,o])=>[r,(...r)=>o(...r)(p)]))}};return p}},k={};__export(k,{blur:()=>blur,clearContent:()=>clearContent,clearNodes:()=>clearNodes,command:()=>command,createParagraphNear:()=>createParagraphNear,cut:()=>cut,deleteCurrentNode:()=>deleteCurrentNode,deleteNode:()=>deleteNode,deleteRange:()=>deleteRange,deleteSelection:()=>deleteSelection,enter:()=>enter,exitCode:()=>exitCode,extendMarkRange:()=>extendMarkRange,first:()=>first,focus:()=>focus,forEach:()=>forEach,insertContent:()=>insertContent,insertContentAt:()=>insertContentAt,joinBackward:()=>joinBackward,joinDown:()=>joinDown,joinForward:()=>joinForward,joinItemBackward:()=>joinItemBackward,joinItemForward:()=>joinItemForward,joinTextblockBackward:()=>joinTextblockBackward,joinTextblockForward:()=>joinTextblockForward,joinUp:()=>joinUp,keyboardShortcut:()=>keyboardShortcut,lift:()=>lift,liftEmptyBlock:()=>liftEmptyBlock,liftListItem:()=>liftListItem,newlineInCode:()=>newlineInCode,resetAttributes:()=>resetAttributes,scrollIntoView:()=>scrollIntoView,selectAll:()=>selectAll,selectNodeBackward:()=>selectNodeBackward,selectNodeForward:()=>selectNodeForward,selectParentNode:()=>selectParentNode,selectTextblockEnd:()=>selectTextblockEnd,selectTextblockStart:()=>selectTextblockStart,setContent:()=>setContent,setMark:()=>setMark,setMeta:()=>setMeta,setNode:()=>setNode,setNodeSelection:()=>setNodeSelection,setTextDirection:()=>setTextDirection,setTextSelection:()=>setTextSelection,sinkListItem:()=>sinkListItem,splitBlock:()=>splitBlock,splitListItem:()=>splitListItem,toggleList:()=>toggleList,toggleMark:()=>toggleMark,toggleNode:()=>toggleNode,toggleWrap:()=>toggleWrap,undoInputRule:()=>undoInputRule,unsetAllMarks:()=>unsetAllMarks,unsetMark:()=>unsetMark,unsetTextDirection:()=>unsetTextDirection,updateAttributes:()=>updateAttributes,wrapIn:()=>wrapIn,wrapInList:()=>wrapInList});var blur=()=>({editor:r,view:o})=>(requestAnimationFrame(()=>{var i;r.isDestroyed||(o.dom.blur(),null==(i=null==window?void 0:window.getSelection())||i.removeAllRanges())}),!0),clearContent=(r=!0)=>({commands:o})=>o.setContent("",{emitUpdate:r}),E=i(26401),clearNodes=()=>({state:r,tr:o,dispatch:i})=>{const{selection:a}=o,{ranges:c}=a;return!i||(c.forEach(({$from:i,$to:a})=>{r.doc.nodesBetween(i.pos,a.pos,(r,i)=>{if(r.type.isText)return;const{doc:a,mapping:c}=o,u=a.resolve(c.map(i)),p=a.resolve(c.map(i+r.nodeSize)),g=u.blockRange(p);if(!g)return;const v=(0,E.liftTarget)(g);if(r.type.isTextblock){const{defaultType:r}=u.parent.contentMatchAt(u.index());o.setNodeMarkup(g.start,r)}(v||0===v)&&o.lift(g,v)})}),!0)},command=r=>o=>r(o),w=i(24007),createParagraphNear=()=>({state:r,dispatch:o})=>(0,w.createParagraphNear)(r,o),x=i(49162),cut=(r,o)=>({editor:i,tr:a})=>{const{state:c}=i,u=c.doc.slice(r.from,r.to);a.deleteRange(r.from,r.to);const p=a.mapping.map(o);return a.insert(p,u.content),a.setSelection(new x.TextSelection(a.doc.resolve(Math.max(p-1,0)))),!0},deleteCurrentNode=()=>({tr:r,dispatch:o})=>{const{selection:i}=r,a=i.$anchor.node();if(a.content.size>0)return!1;const c=r.selection.$anchor;for(let i=c.depth;i>0;i-=1){if(c.node(i).type===a.type){if(o){const o=c.before(i),a=c.after(i);r.delete(o,a).scrollIntoView()}return!0}}return!1};function getNodeType(r,o){if("string"==typeof r){if(!o.nodes[r])throw Error(`There is no node type named '${r}'. Maybe you forgot to add the extension?`);return o.nodes[r]}return r}var deleteNode=r=>({tr:o,state:i,dispatch:a})=>{const c=getNodeType(r,i.schema),u=o.selection.$anchor;for(let r=u.depth;r>0;r-=1){if(u.node(r).type===c){if(a){const i=u.before(r),a=u.after(r);o.delete(i,a).scrollIntoView()}return!0}}return!1},deleteRange=r=>({tr:o,dispatch:i})=>{const{from:a,to:c}=r;return i&&o.delete(a,c),!0},C=i(24007),deleteSelection=()=>({state:r,dispatch:o})=>(0,C.deleteSelection)(r,o),enter=()=>({commands:r})=>r.keyboardShortcut("Enter"),_=i(24007),exitCode=()=>({state:r,dispatch:o})=>(0,_.exitCode)(r,o),T=i(49162);function isRegExp(r){return"[object RegExp]"===Object.prototype.toString.call(r)}function objectIncludes(r,o,i={strict:!0}){const a=Object.keys(o);return!a.length||a.every(a=>i.strict?o[a]===r[a]:isRegExp(o[a])?o[a].test(r[a]):o[a]===r[a])}function findMarkInSet(r,o,i={}){return r.find(r=>r.type===o&&objectIncludes(Object.fromEntries(Object.keys(i).map(o=>[o,r.attrs[o]])),i))}function isMarkInSet(r,o,i={}){return!!findMarkInSet(r,o,i)}function getMarkRange(r,o,i){var a;if(!r||!o)return;let c=r.parent.childAfter(r.parentOffset);if(c.node&&c.node.marks.some(r=>r.type===o)||(c=r.parent.childBefore(r.parentOffset)),!c.node||!c.node.marks.some(r=>r.type===o))return;i=i||(null==(a=c.node.marks[0])?void 0:a.attrs);if(!findMarkInSet([...c.node.marks],o,i))return;let u=c.index,p=r.start()+c.offset,g=u+1,v=p+c.node.nodeSize;for(;u>0&&isMarkInSet([...r.parent.child(u-1).marks],o,i);)u-=1,p-=r.parent.child(u).nodeSize;for(;g<r.parent.childCount&&isMarkInSet([...r.parent.child(g).marks],o,i);)v+=r.parent.child(g).nodeSize,g+=1;return{from:p,to:v}}function getMarkType(r,o){if("string"==typeof r){if(!o.marks[r])throw Error(`There is no mark type named '${r}'. Maybe you forgot to add the extension?`);return o.marks[r]}return r}var extendMarkRange=(r,o={})=>({tr:i,state:a,dispatch:c})=>{const u=getMarkType(r,a.schema),{doc:p,selection:g}=i,{$from:v,from:b,to:k}=g;if(c){const r=getMarkRange(v,u,o);if(r&&r.from<=b&&r.to>=k){const o=T.TextSelection.create(p,r.from,r.to);i.setSelection(o)}}return!0},first=r=>o=>{const i="function"==typeof r?r(o):r;for(let r=0;r<i.length;r+=1)if(i[r](o))return!0;return!1},P=i(49162);function isTextSelection(r){return r instanceof P.TextSelection}var A=i(49162);function minMax(r=0,o=0,i=0){return Math.min(Math.max(r,o),i)}function resolveFocusPosition(r,o=null){if(!o)return null;const i=A.Selection.atStart(r),a=A.Selection.atEnd(r);if("start"===o||!0===o)return i;if("end"===o)return a;const c=i.from,u=a.to;return"all"===o?A.TextSelection.create(r,minMax(0,c,u),minMax(r.content.size,c,u)):A.TextSelection.create(r,minMax(o,c,u),minMax(o,c,u))}function isAndroid(){return"Android"===navigator.platform||/android/i.test(navigator.userAgent)}function isiOS(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}function isSafari(){return"undefined"!=typeof navigator&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}var focus=(r=null,o={})=>({editor:i,view:a,tr:c,dispatch:u})=>{o={scrollIntoView:!0,...o};const delayedFocus=()=>{(isiOS()||isAndroid())&&a.dom.focus(),!isSafari()||isiOS()||isAndroid()||a.dom.focus({preventScroll:!0}),requestAnimationFrame(()=>{i.isDestroyed||(a.focus(),(null==o?void 0:o.scrollIntoView)&&i.commands.scrollIntoView())})};try{if(a.hasFocus()&&null===r||!1===r)return!0}catch{return!1}if(u&&null===r&&!isTextSelection(i.state.selection))return delayedFocus(),!0;const p=resolveFocusPosition(c.doc,r)||i.state.selection,g=i.state.selection.eq(p);return u&&(g||c.setSelection(p),g&&c.storedMarks&&c.setStoredMarks(c.storedMarks),delayedFocus()),!0},forEach=(r,o)=>i=>r.every((r,a)=>o(r,{...i,index:a})),insertContent=(r,o)=>({tr:i,commands:a})=>a.insertContentAt({from:i.selection.from,to:i.selection.to},r,o),N=i(32386),R=i(32386),removeWhitespaces=r=>{const o=r.childNodes;for(let i=o.length-1;i>=0;i-=1){const a=o[i];3===a.nodeType&&a.nodeValue&&/^(\n\s\s|\n)$/.test(a.nodeValue)?r.removeChild(a):1===a.nodeType&&removeWhitespaces(a)}return r};function elementFromString(r){if("undefined"==typeof window)throw new Error("[tiptap error]: there is no window object available, so this function cannot be used");const o=`<body>${r}</body>`,i=(new window.DOMParser).parseFromString(o,"text/html").body;return removeWhitespaces(i)}function createNodeFromContent(r,o,i){if(r instanceof R.Node||r instanceof R.Fragment)return r;i={slice:!0,parseOptions:{},...i};const a="string"==typeof r;if("object"==typeof r&&null!==r)try{if(Array.isArray(r)&&r.length>0)return R.Fragment.fromArray(r.map(r=>o.nodeFromJSON(r)));const a=o.nodeFromJSON(r);return i.errorOnInvalidContent&&a.check(),a}catch(a){if(i.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:a});return console.warn("[tiptap warn]: Invalid content.","Passed value:",r,"Error:",a),createNodeFromContent("",o,i)}if(a){if(i.errorOnInvalidContent){let a=!1,c="";const u=new R.Schema({topNode:o.spec.topNode,marks:o.spec.marks,nodes:o.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:r=>(a=!0,c="string"==typeof r?r:r.outerHTML,null)}]}})});if(i.slice?R.DOMParser.fromSchema(u).parseSlice(elementFromString(r),i.parseOptions):R.DOMParser.fromSchema(u).parse(elementFromString(r),i.parseOptions),i.errorOnInvalidContent&&a)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${c}`)})}const a=R.DOMParser.fromSchema(o);return i.slice?a.parseSlice(elementFromString(r),i.parseOptions).content:a.parse(elementFromString(r),i.parseOptions)}return createNodeFromContent("",o,i)}var I=i(49162),L=i(26401);function selectionToInsertionEnd(r,o,i){const a=r.steps.length-1;if(a<o)return;const c=r.steps[a];if(!(c instanceof L.ReplaceStep||c instanceof L.ReplaceAroundStep))return;const u=r.mapping.maps[a];let p=0;u.forEach((r,o,i,a)=>{0===p&&(p=a)}),r.setSelection(I.Selection.near(r.doc.resolve(p),i))}var insertContentAt=(r,o,i)=>({tr:a,dispatch:c,editor:u})=>{var p;if(c){let c;const emitContentError=r=>{u.emit("contentError",{editor:u,error:r,disableCollaboration:()=>{"collaboration"in u.storage&&"object"==typeof u.storage.collaboration&&u.storage.collaboration&&(u.storage.collaboration.isDisabled=!0)}})},g={preserveWhitespace:"full",...(i={parseOptions:u.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...i}).parseOptions};if(!i.errorOnInvalidContent&&!u.options.enableContentCheck&&u.options.emitContentError)try{createNodeFromContent(o,u.schema,{parseOptions:g,errorOnInvalidContent:!0})}catch(r){emitContentError(r)}try{c=createNodeFromContent(o,u.schema,{parseOptions:g,errorOnInvalidContent:null!=(p=i.errorOnInvalidContent)?p:u.options.enableContentCheck})}catch(r){return emitContentError(r),!1}let{from:v,to:b}="number"==typeof r?{from:r,to:r}:{from:r.from,to:r.to},k=!0,E=!0;if(("type"in c?[c]:c).forEach(r=>{r.check(),k=!!k&&(r.isText&&0===r.marks.length),E=!!E&&r.isBlock}),v===b&&E){const{parent:r}=a.doc.resolve(v);r.isTextblock&&!r.type.spec.code&&!r.childCount&&(v-=1,b+=1)}let w;if(k){if(Array.isArray(o))w=o.map(r=>r.text||"").join("");else if(o instanceof N.Fragment){let r="";o.forEach(o=>{o.text&&(r+=o.text)}),w=r}else w="object"==typeof o&&o&&o.text?o.text:o;a.insertText(w,v,b)}else{w=c;const r=a.doc.resolve(v),o=r.node(),i=0===r.parentOffset,u=o.isText||o.isTextblock,p=o.content.size>0;i&&u&&p&&(v=Math.max(0,v-1)),a.replaceWith(v,b,w)}i.updateSelection&&selectionToInsertionEnd(a,a.steps.length-1,-1),i.applyInputRules&&a.setMeta("applyInputRules",{from:v,text:w}),i.applyPasteRules&&a.setMeta("applyPasteRules",{from:v,text:w})}return!0},z=i(24007),joinUp=()=>({state:r,dispatch:o})=>(0,z.joinUp)(r,o),joinDown=()=>({state:r,dispatch:o})=>(0,z.joinDown)(r,o),joinBackward=()=>({state:r,dispatch:o})=>(0,z.joinBackward)(r,o),joinForward=()=>({state:r,dispatch:o})=>(0,z.joinForward)(r,o),j=i(26401),joinItemBackward=()=>({state:r,dispatch:o,tr:i})=>{try{const a=(0,j.joinPoint)(r.doc,r.selection.$from.pos,-1);return null!=a&&(i.join(a,2),o&&o(i),!0)}catch{return!1}},B=i(26401),joinItemForward=()=>({state:r,dispatch:o,tr:i})=>{try{const a=(0,B.joinPoint)(r.doc,r.selection.$from.pos,1);return null!=a&&(i.join(a,2),o&&o(i),!0)}catch{return!1}},V=i(24007),joinTextblockBackward=()=>({state:r,dispatch:o})=>(0,V.joinTextblockBackward)(r,o),U=i(24007),joinTextblockForward=()=>({state:r,dispatch:o})=>(0,U.joinTextblockForward)(r,o);function isMacOS(){return"undefined"!=typeof navigator&&/Mac/.test(navigator.platform)}var keyboardShortcut=r=>({editor:o,view:i,tr:a,dispatch:c})=>{const u=function normalizeKeyName(r){const o=r.split(/-(?!$)/);let i,a,c,u,p=o[o.length-1];"Space"===p&&(p=" ");for(let r=0;r<o.length-1;r+=1){const p=o[r];if(/^(cmd|meta|m)$/i.test(p))u=!0;else if(/^a(lt)?$/i.test(p))i=!0;else if(/^(c|ctrl|control)$/i.test(p))a=!0;else if(/^s(hift)?$/i.test(p))c=!0;else{if(!/^mod$/i.test(p))throw new Error(`Unrecognized modifier name: ${p}`);isiOS()||isMacOS()?u=!0:a=!0}}return i&&(p=`Alt-${p}`),a&&(p=`Ctrl-${p}`),u&&(p=`Meta-${p}`),c&&(p=`Shift-${p}`),p}(r).split(/-(?!$)/),p=u.find(r=>!["Alt","Ctrl","Meta","Shift"].includes(r)),g=new KeyboardEvent("keydown",{key:"Space"===p?" ":p,altKey:u.includes("Alt"),ctrlKey:u.includes("Ctrl"),metaKey:u.includes("Meta"),shiftKey:u.includes("Shift"),bubbles:!0,cancelable:!0}),v=o.captureTransaction(()=>{i.someProp("handleKeyDown",r=>r(i,g))});return null==v||v.steps.forEach(r=>{const o=r.map(a.mapping);o&&c&&a.maybeStep(o)}),!0},H=i(24007);function isNodeActive(r,o,i={}){const{from:a,to:c,empty:u}=r.selection,p=o?getNodeType(o,r.schema):null,g=[];r.doc.nodesBetween(a,c,(r,o)=>{if(r.isText)return;const i=Math.max(a,o),u=Math.min(c,o+r.nodeSize);g.push({node:r,from:i,to:u})});const v=c-a,b=g.filter(r=>!p||p.name===r.node.type.name).filter(r=>objectIncludes(r.node.attrs,i,{strict:!1}));if(u)return!!b.length;return b.reduce((r,o)=>r+o.to-o.from,0)>=v}var lift=(r,o={})=>({state:i,dispatch:a})=>!!isNodeActive(i,getNodeType(r,i.schema),o)&&(0,H.lift)(i,a),W=i(24007),liftEmptyBlock=()=>({state:r,dispatch:o})=>(0,W.liftEmptyBlock)(r,o),K=i(35423),liftListItem=r=>({state:o,dispatch:i})=>{const a=getNodeType(r,o.schema);return(0,K.liftListItem)(a)(o,i)},G=i(24007),newlineInCode=()=>({state:r,dispatch:o})=>(0,G.newlineInCode)(r,o);function getSchemaTypeNameByName(r,o){return o.nodes[r]?"node":o.marks[r]?"mark":null}function deleteProps(r,o){const i="string"==typeof o?[o]:o;return Object.keys(r).reduce((o,a)=>(i.includes(a)||(o[a]=r[a]),o),{})}var resetAttributes=(r,o)=>({tr:i,state:a,dispatch:c})=>{let u=null,p=null;const g=getSchemaTypeNameByName("string"==typeof r?r:r.name,a.schema);if(!g)return!1;"node"===g&&(u=getNodeType(r,a.schema)),"mark"===g&&(p=getMarkType(r,a.schema));let v=!1;return i.selection.ranges.forEach(r=>{a.doc.nodesBetween(r.$from.pos,r.$to.pos,(r,a)=>{u&&u===r.type&&(v=!0,c&&i.setNodeMarkup(a,void 0,deleteProps(r.attrs,o))),p&&r.marks.length&&r.marks.forEach(u=>{p===u.type&&(v=!0,c&&i.addMark(a,a+r.nodeSize,p.create(deleteProps(u.attrs,o))))})})}),v},scrollIntoView=()=>({tr:r,dispatch:o})=>(o&&r.scrollIntoView(),!0),J=i(49162),selectAll=()=>({tr:r,dispatch:o})=>{if(o){const o=new J.AllSelection(r.doc);r.setSelection(o)}return!0},Y=i(24007),selectNodeBackward=()=>({state:r,dispatch:o})=>(0,Y.selectNodeBackward)(r,o),X=i(24007),selectNodeForward=()=>({state:r,dispatch:o})=>(0,X.selectNodeForward)(r,o),Q=i(24007),selectParentNode=()=>({state:r,dispatch:o})=>(0,Q.selectParentNode)(r,o),Z=i(24007),selectTextblockEnd=()=>({state:r,dispatch:o})=>(0,Z.selectTextblockEnd)(r,o),ee=i(24007),selectTextblockStart=()=>({state:r,dispatch:o})=>(0,ee.selectTextblockStart)(r,o);function createDocument(r,o,i={},a={}){return createNodeFromContent(r,o,{slice:!1,parseOptions:i,errorOnInvalidContent:a.errorOnInvalidContent})}var setContent=(r,{errorOnInvalidContent:o,emitUpdate:i=!0,parseOptions:a={}}={})=>({editor:c,tr:u,dispatch:p,commands:g})=>{const{doc:v}=u;if("full"!==a.preserveWhitespace){const g=createDocument(r,c.schema,a,{errorOnInvalidContent:null!=o?o:c.options.enableContentCheck});return p&&u.replaceWith(0,v.content.size,g).setMeta("preventUpdate",!i),!0}return p&&u.setMeta("preventUpdate",!i),g.insertContentAt({from:0,to:v.content.size},r,{parseOptions:a,errorOnInvalidContent:null!=o?o:c.options.enableContentCheck})};function getMarkAttributes(r,o){const i=getMarkType(o,r.schema),{from:a,to:c,empty:u}=r.selection,p=[];u?(r.storedMarks&&p.push(...r.storedMarks),p.push(...r.selection.$head.marks())):r.doc.nodesBetween(a,c,r=>{p.push(...r.marks)});const g=p.find(r=>r.type.name===i.name);return g?{...g.attrs}:{}}var te=i(26401);function combineTransactionSteps(r,o){const i=new te.Transform(r);return o.forEach(r=>{r.steps.forEach(r=>{i.step(r)})}),i}function defaultBlockAt(r){for(let o=0;o<r.edgeCount;o+=1){const{type:i}=r.edge(o);if(i.isTextblock&&!i.hasRequiredAttrs())return i}return null}function findChildren(r,o){const i=[];return r.descendants((r,a)=>{o(r)&&i.push({node:r,pos:a})}),i}function findChildrenInRange(r,o,i){const a=[];return r.nodesBetween(o.from,o.to,(r,o)=>{i(r)&&a.push({node:r,pos:o})}),a}function findParentNodeClosestToPos(r,o){for(let i=r.depth;i>0;i-=1){const a=r.node(i);if(o(a))return{pos:i>0?r.before(i):0,start:r.start(i),depth:i,node:a}}}function findParentNode(r){return o=>findParentNodeClosestToPos(o.$from,r)}function getExtensionField(r,o,i){if(void 0===r.config[o]&&r.parent)return getExtensionField(r.parent,o,i);if("function"==typeof r.config[o]){return r.config[o].bind({...i,parent:r.parent?getExtensionField(r.parent,o,i):null})}return r.config[o]}function flattenExtensions(r){return r.map(r=>{const o=getExtensionField(r,"addExtensions",{name:r.name,options:r.options,storage:r.storage});return o?[r,...flattenExtensions(o())]:r}).flat(10)}var ne=i(32386),re=i(32386);function getHTMLFromFragment(r,o){const i=re.DOMSerializer.fromSchema(o).serializeFragment(r),a=document.implementation.createHTMLDocument().createElement("div");return a.appendChild(i),a.innerHTML}var oe=i(32386);function isFunction(r){return"function"==typeof r}function callOrReturn(r,o=void 0,...i){return isFunction(r)?o?r.bind(o)(...i):r(...i):r}function isEmptyObject(r={}){return 0===Object.keys(r).length&&r.constructor===Object}function splitExtensions(r){return{baseExtensions:r.filter(r=>"extension"===r.type),nodeExtensions:r.filter(r=>"node"===r.type),markExtensions:r.filter(r=>"mark"===r.type)}}function getAttributesFromExtensions(r){const o=[],{nodeExtensions:i,markExtensions:a}=splitExtensions(r),c=[...i,...a],u={default:null,validate:void 0,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1},p=i.filter(r=>"text"!==r.name).map(r=>r.name),g=a.map(r=>r.name),v=[...p,...g];return r.forEach(r=>{const i=getExtensionField(r,"addGlobalAttributes",{name:r.name,options:r.options,storage:r.storage,extensions:c});if(!i)return;i().forEach(r=>{let i;i=Array.isArray(r.types)?r.types:"*"===r.types?v:"nodes"===r.types?p:"marks"===r.types?g:[],i.forEach(i=>{Object.entries(r.attributes).forEach(([r,a])=>{o.push({type:i,name:r,attribute:{...u,...a}})})})})}),c.forEach(r=>{const i={name:r.name,options:r.options,storage:r.storage},a=getExtensionField(r,"addAttributes",i);if(!a)return;const c=a();Object.entries(c).forEach(([i,a])=>{const c={...u,...a};"function"==typeof(null==c?void 0:c.default)&&(c.default=c.default()),(null==c?void 0:c.isRequired)&&void 0===(null==c?void 0:c.default)&&delete c.default,o.push({type:r.name,name:i,attribute:c})})}),o}function mergeAttributes(...r){return r.filter(r=>!!r).reduce((r,o)=>{const i={...r};return Object.entries(o).forEach(([r,o])=>{if(i[r])if("class"===r){const a=o?String(o).split(" "):[],c=i[r]?i[r].split(" "):[],u=a.filter(r=>!c.includes(r));i[r]=[...c,...u].join(" ")}else if("style"===r){const a=o?o.split(";").map(r=>r.trim()).filter(Boolean):[],c=i[r]?i[r].split(";").map(r=>r.trim()).filter(Boolean):[],u=new Map;c.forEach(r=>{const[o,i]=r.split(":").map(r=>r.trim());u.set(o,i)}),a.forEach(r=>{const[o,i]=r.split(":").map(r=>r.trim());u.set(o,i)}),i[r]=Array.from(u.entries()).map(([r,o])=>`${r}: ${o}`).join("; ")}else i[r]=o;else i[r]=o}),i},{})}function getRenderedAttributes(r,o){return o.filter(o=>o.type===r.type.name).filter(r=>r.attribute.rendered).map(o=>o.attribute.renderHTML?o.attribute.renderHTML(r.attrs)||{}:{[o.name]:r.attrs[o.name]}).reduce((r,o)=>mergeAttributes(r,o),{})}function fromString(r){return"string"!=typeof r?r:r.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(r):"true"===r||"false"!==r&&r}function injectExtensionAttributesToParseRule(r,o){return"style"in r?r:{...r,getAttrs:i=>{const a=r.getAttrs?r.getAttrs(i):r.attrs;if(!1===a)return!1;const c=o.reduce((r,o)=>{const a=o.attribute.parseHTML?o.attribute.parseHTML(i):fromString(i.getAttribute(o.name));return null==a?r:{...r,[o.name]:a}},{});return{...a,...c}}}}function cleanUpSchemaItem(r){return Object.fromEntries(Object.entries(r).filter(([r,o])=>("attrs"!==r||!isEmptyObject(o))&&null!=o))}function buildAttributeSpec(r){var o,i;const a={};return!(null==(o=null==r?void 0:r.attribute)?void 0:o.isRequired)&&"default"in((null==r?void 0:r.attribute)||{})&&(a.default=r.attribute.default),void 0!==(null==(i=null==r?void 0:r.attribute)?void 0:i.validate)&&(a.validate=r.attribute.validate),[r.name,a]}function getSchemaByResolvedExtensions(r,o){var i;const a=getAttributesFromExtensions(r),{nodeExtensions:c,markExtensions:u}=splitExtensions(r),p=null==(i=c.find(r=>getExtensionField(r,"topNode")))?void 0:i.name,g=Object.fromEntries(c.map(i=>{const c=a.filter(r=>r.type===i.name),u={name:i.name,options:i.options,storage:i.storage,editor:o},p=cleanUpSchemaItem({...r.reduce((r,o)=>{const a=getExtensionField(o,"extendNodeSchema",u);return{...r,...a?a(i):{}}},{}),content:callOrReturn(getExtensionField(i,"content",u)),marks:callOrReturn(getExtensionField(i,"marks",u)),group:callOrReturn(getExtensionField(i,"group",u)),inline:callOrReturn(getExtensionField(i,"inline",u)),atom:callOrReturn(getExtensionField(i,"atom",u)),selectable:callOrReturn(getExtensionField(i,"selectable",u)),draggable:callOrReturn(getExtensionField(i,"draggable",u)),code:callOrReturn(getExtensionField(i,"code",u)),whitespace:callOrReturn(getExtensionField(i,"whitespace",u)),linebreakReplacement:callOrReturn(getExtensionField(i,"linebreakReplacement",u)),defining:callOrReturn(getExtensionField(i,"defining",u)),isolating:callOrReturn(getExtensionField(i,"isolating",u)),attrs:Object.fromEntries(c.map(buildAttributeSpec))}),g=callOrReturn(getExtensionField(i,"parseHTML",u));g&&(p.parseDOM=g.map(r=>injectExtensionAttributesToParseRule(r,c)));const v=getExtensionField(i,"renderHTML",u);v&&(p.toDOM=r=>v({node:r,HTMLAttributes:getRenderedAttributes(r,c)}));const b=getExtensionField(i,"renderText",u);return b&&(p.toText=b),[i.name,p]})),v=Object.fromEntries(u.map(i=>{const c=a.filter(r=>r.type===i.name),u={name:i.name,options:i.options,storage:i.storage,editor:o},p=cleanUpSchemaItem({...r.reduce((r,o)=>{const a=getExtensionField(o,"extendMarkSchema",u);return{...r,...a?a(i):{}}},{}),inclusive:callOrReturn(getExtensionField(i,"inclusive",u)),excludes:callOrReturn(getExtensionField(i,"excludes",u)),group:callOrReturn(getExtensionField(i,"group",u)),spanning:callOrReturn(getExtensionField(i,"spanning",u)),code:callOrReturn(getExtensionField(i,"code",u)),attrs:Object.fromEntries(c.map(buildAttributeSpec))}),g=callOrReturn(getExtensionField(i,"parseHTML",u));g&&(p.parseDOM=g.map(r=>injectExtensionAttributesToParseRule(r,c)));const v=getExtensionField(i,"renderHTML",u);return v&&(p.toDOM=r=>v({mark:r,HTMLAttributes:getRenderedAttributes(r,c)})),[i.name,p]}));return new oe.Schema({topNode:p,nodes:g,marks:v})}function findDuplicates(r){const o=r.filter((o,i)=>r.indexOf(o)!==i);return Array.from(new Set(o))}function sortExtensions(r){return r.sort((r,o)=>{const i=getExtensionField(r,"priority")||100,a=getExtensionField(o,"priority")||100;return i>a?-1:i<a?1:0})}function resolveExtensions(r){const o=sortExtensions(flattenExtensions(r)),i=findDuplicates(o.map(r=>r.name));return i.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${i.map(r=>`'${r}'`).join(", ")}]. This can lead to issues.`),o}function getSchema(r,o){return getSchemaByResolvedExtensions(resolveExtensions(r),o)}function generateHTML(r,o){const i=getSchema(o);return getHTMLFromFragment(ne.Node.fromJSON(i,r).content,i)}var ie=i(32386);function generateJSON(r,o){const i=getSchema(o),a=elementFromString(r);return ie.DOMParser.fromSchema(i).parse(a).toJSON()}var ae=i(32386);function getTextBetween(r,o,i){const{from:a,to:c}=o,{blockSeparator:u="\n\n",textSerializers:p={}}=i||{};let g="";return r.nodesBetween(a,c,(r,i,v,b)=>{var k;r.isBlock&&i>a&&(g+=u);const E=null==p?void 0:p[r.type.name];if(E)return v&&(g+=E({node:r,pos:i,parent:v,index:b,range:o})),!1;r.isText&&(g+=null==(k=null==r?void 0:r.text)?void 0:k.slice(Math.max(a,i)-i,c-i))}),g}function getText(r,o){return getTextBetween(r,{from:0,to:r.content.size},o)}function getTextSerializersFromSchema(r){return Object.fromEntries(Object.entries(r.nodes).filter(([,r])=>r.spec.toText).map(([r,o])=>[r,o.spec.toText]))}function generateText(r,o,i){const{blockSeparator:a="\n\n",textSerializers:c={}}=i||{},u=getSchema(o);return getText(ae.Node.fromJSON(u,r),{blockSeparator:a,textSerializers:{...getTextSerializersFromSchema(u),...c}})}function getNodeAttributes(r,o){const i=getNodeType(o,r.schema),{from:a,to:c}=r.selection,u=[];r.doc.nodesBetween(a,c,r=>{u.push(r)});const p=u.reverse().find(r=>r.type.name===i.name);return p?{...p.attrs}:{}}function getAttributes(r,o){const i=getSchemaTypeNameByName("string"==typeof o?o:o.name,r.schema);return"node"===i?getNodeAttributes(r,o):"mark"===i?getMarkAttributes(r,o):{}}function removeDuplicates(r,o=JSON.stringify){const i={};return r.filter(r=>{const a=o(r);return!Object.prototype.hasOwnProperty.call(i,a)&&(i[a]=!0)})}function getChangedRanges(r){const{mapping:o,steps:i}=r,a=[];return o.maps.forEach((r,c)=>{const u=[];if(r.ranges.length)r.forEach((r,o)=>{u.push({from:r,to:o})});else{const{from:r,to:o}=i[c];if(void 0===r||void 0===o)return;u.push({from:r,to:o})}u.forEach(({from:r,to:i})=>{const u=o.slice(c).map(r,-1),p=o.slice(c).map(i),g=o.invert().map(u,-1),v=o.invert().map(p);a.push({oldRange:{from:g,to:v},newRange:{from:u,to:p}})})}),function simplifyChangedRanges(r){const o=removeDuplicates(r);return 1===o.length?o:o.filter((r,i)=>!o.filter((r,o)=>o!==i).some(o=>r.oldRange.from>=o.oldRange.from&&r.oldRange.to<=o.oldRange.to&&r.newRange.from>=o.newRange.from&&r.newRange.to<=o.newRange.to))}(a)}function getDebugJSON(r,o=0){const i=r.type===r.type.schema.topNodeType?0:1,a=o,c=a+r.nodeSize,u=r.marks.map(r=>{const o={type:r.type.name};return Object.keys(r.attrs).length&&(o.attrs={...r.attrs}),o}),p={...r.attrs},g={type:r.type.name,from:a,to:c};return Object.keys(p).length&&(g.attrs=p),u.length&&(g.marks=u),r.content.childCount&&(g.content=[],r.forEach((r,a)=>{var c;null==(c=g.content)||c.push(getDebugJSON(r,o+a+i))})),r.text&&(g.text=r.text),g}function getMarksBetween(r,o,i){const a=[];return r===o?i.resolve(r).marks().forEach(o=>{const c=getMarkRange(i.resolve(r),o.type);c&&a.push({mark:o,...c})}):i.nodesBetween(r,o,(r,o)=>{r&&void 0!==(null==r?void 0:r.nodeSize)&&a.push(...r.marks.map(i=>({from:o,to:o+r.nodeSize,mark:i})))}),a}var getNodeAtPosition=(r,o,i,a=20)=>{const c=r.doc.resolve(i);let u=a,p=null;for(;u>0&&null===p;){const r=c.node(u);(null==r?void 0:r.type.name)===o?p=r:u-=1}return[p,u]};function getSchemaTypeByName(r,o){return o.nodes[r]||o.marks[r]||null}function getSplittedAttributes(r,o,i){return Object.fromEntries(Object.entries(i).filter(([i])=>{const a=r.find(r=>r.type===o&&r.name===i);return!!a&&a.attribute.keepOnSplit}))}var getTextContentFromNodes=(r,o=500)=>{let i="";const a=r.parentOffset;return r.parent.nodesBetween(Math.max(0,a-o),a,(r,o,c,u)=>{var p,g;const v=(null==(g=(p=r.type.spec).toText)?void 0:g.call(p,{node:r,pos:o,parent:c,index:u}))||r.textContent||"%leaf%";i+=r.isAtom&&!r.isText?v:v.slice(0,Math.max(0,a-o))}),i};function isMarkActive(r,o,i={}){const{empty:a,ranges:c}=r.selection,u=o?getMarkType(o,r.schema):null;if(a)return!!(r.storedMarks||r.selection.$from.marks()).filter(r=>!u||u.name===r.type.name).find(r=>objectIncludes(r.attrs,i,{strict:!1}));let p=0;const g=[];if(c.forEach(({$from:o,$to:i})=>{const a=o.pos,c=i.pos;r.doc.nodesBetween(a,c,(r,o)=>{if(u&&r.inlineContent&&!r.type.allowsMarkType(u))return!1;if(!r.isText&&!r.marks.length)return;const i=Math.max(a,o),v=Math.min(c,o+r.nodeSize);p+=v-i,g.push(...r.marks.map(r=>({mark:r,from:i,to:v})))})}),0===p)return!1;const v=g.filter(r=>!u||u.name===r.mark.type.name).filter(r=>objectIncludes(r.mark.attrs,i,{strict:!1})).reduce((r,o)=>r+o.to-o.from,0),b=g.filter(r=>!u||r.mark.type!==u&&r.mark.type.excludes(u)).reduce((r,o)=>r+o.to-o.from,0);return(v>0?v+b:v)>=p}function isActive(r,o,i={}){if(!o)return isNodeActive(r,null,i)||isMarkActive(r,null,i);const a=getSchemaTypeNameByName(o,r.schema);return"node"===a?isNodeActive(r,o,i):"mark"===a&&isMarkActive(r,o,i)}var isAtEndOfNode=(r,o)=>{const{$from:i,$to:a,$anchor:c}=r.selection;if(o){const i=findParentNode(r=>r.type.name===o)(r.selection);if(!i)return!1;const a=r.doc.resolve(i.pos+1);return c.pos+1===a.end()}return!(a.parentOffset<a.parent.nodeSize-2||i.pos!==a.pos)},isAtStartOfNode=r=>{const{$from:o,$to:i}=r.selection;return!(o.parentOffset>0||o.pos!==i.pos)};function isExtensionRulesEnabled(r,o){return Array.isArray(o)?o.some(o=>("string"==typeof o?o:o.name)===r.name):o}function isList(r,o){const{nodeExtensions:i}=splitExtensions(o),a=i.find(o=>o.name===r);if(!a)return!1;const c=callOrReturn(getExtensionField(a,"group",{name:a.name,options:a.options,storage:a.storage}));return"string"==typeof c&&c.split(" ").includes("list")}function isNodeEmpty(r,{checkChildren:o=!0,ignoreWhitespace:i=!1}={}){var a;if(i){if("hardBreak"===r.type.name)return!0;if(r.isText)return/^\s*$/m.test(null!=(a=r.text)?a:"")}if(r.isText)return!r.text;if(r.isAtom||r.isLeaf)return!1;if(0===r.content.childCount)return!0;if(o){let a=!0;return r.content.forEach(r=>{!1!==a&&(isNodeEmpty(r,{ignoreWhitespace:i,checkChildren:o})||(a=!1))}),a}return!1}var se=i(49162);function isNodeSelection(r){return r instanceof se.NodeSelection}var le=class _MappablePosition{constructor(r){this.position=r}static fromJSON(r){return new _MappablePosition(r.position)}toJSON(){return{position:this.position}}};function getUpdatedPosition(r,o){const i=o.mapping.mapResult(r.position);return{position:new le(i.pos),mapResult:i}}function createMappablePosition(r){return new le(r)}function posToDOMRect(r,o,i){const a=r.state.doc.content.size,c=minMax(o,0,a),u=minMax(i,0,a),p=r.coordsAtPos(c),g=r.coordsAtPos(u,-1),v=Math.min(p.top,g.top),b=Math.max(p.bottom,g.bottom),k=Math.min(p.left,g.left),E=Math.max(p.right,g.right),w={top:v,bottom:b,left:k,right:E,width:E-k,height:b-v,x:k,y:v};return{...w,toJSON:()=>w}}function rewriteUnknownContentInner({json:r,validMarks:o,validNodes:i,options:a,rewrittenContent:c=[]}){return r.marks&&Array.isArray(r.marks)&&(r.marks=r.marks.filter(r=>{const i="string"==typeof r?r:r.type;return!!o.has(i)||(c.push({original:JSON.parse(JSON.stringify(r)),unsupported:i}),!1)})),r.content&&Array.isArray(r.content)&&(r.content=r.content.map(r=>rewriteUnknownContentInner({json:r,validMarks:o,validNodes:i,options:a,rewrittenContent:c}).json).filter(r=>null!=r)),r.type&&!i.has(r.type)?(c.push({original:JSON.parse(JSON.stringify(r)),unsupported:r.type}),r.content&&Array.isArray(r.content)&&!1!==(null==a?void 0:a.fallbackToParagraph)?(r.type="paragraph",{json:r,rewrittenContent:c}):{json:null,rewrittenContent:c}):{json:r,rewrittenContent:c}}function rewriteUnknownContent(r,o,i){return rewriteUnknownContentInner({json:r,validNodes:new Set(Object.keys(o.nodes)),validMarks:new Set(Object.keys(o.marks)),options:i})}var setMark=(r,o={})=>({tr:i,state:a,dispatch:c})=>{const{selection:u}=i,{empty:p,ranges:g}=u,v=getMarkType(r,a.schema);if(c)if(p){const r=getMarkAttributes(a,v);i.addStoredMark(v.create({...r,...o}))}else g.forEach(r=>{const c=r.$from.pos,u=r.$to.pos;a.doc.nodesBetween(c,u,(r,a)=>{const p=Math.max(a,c),g=Math.min(a+r.nodeSize,u);r.marks.find(r=>r.type===v)?r.marks.forEach(r=>{v===r.type&&i.addMark(p,g,v.create({...r.attrs,...o}))}):i.addMark(p,g,v.create(o))})});return function canSetMark(r,o,i){var a;const{selection:c}=o;let u=null;if(isTextSelection(c)&&(u=c.$cursor),u){const o=null!=(a=r.storedMarks)?a:u.marks();return u.parent.type.allowsMarkType(i)&&(!!i.isInSet(o)||!o.some(r=>r.type.excludes(i)))}const{ranges:p}=c;return p.some(({$from:o,$to:a})=>{let c=0===o.depth&&r.doc.inlineContent&&r.doc.type.allowsMarkType(i);return r.doc.nodesBetween(o.pos,a.pos,(r,o,a)=>{if(c)return!1;if(r.isInline){const o=!a||a.type.allowsMarkType(i),u=!!i.isInSet(r.marks)||!r.marks.some(r=>r.type.excludes(i));c=o&&u}return!c}),c})}(a,i,v)},setMeta=(r,o)=>({tr:i})=>(i.setMeta(r,o),!0),ce=i(24007),setNode=(r,o={})=>({state:i,dispatch:a,chain:c})=>{const u=getNodeType(r,i.schema);let p;return i.selection.$anchor.sameParent(i.selection.$head)&&(p=i.selection.$anchor.parent.attrs),u.isTextblock?c().command(({commands:r})=>!!(0,ce.setBlockType)(u,{...p,...o})(i)||r.clearNodes()).command(({state:r})=>(0,ce.setBlockType)(u,{...p,...o})(r,a)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},ue=i(49162),setNodeSelection=r=>({tr:o,dispatch:i})=>{if(i){const{doc:i}=o,a=minMax(r,0,i.content.size),c=ue.NodeSelection.create(i,a);o.setSelection(c)}return!0},setTextDirection=(r,o)=>({tr:i,state:a,dispatch:c})=>{const{selection:u}=a;let p,g;return"number"==typeof o?(p=o,g=o):o&&"from"in o&&"to"in o?(p=o.from,g=o.to):(p=u.from,g=u.to),c&&i.doc.nodesBetween(p,g,(o,a)=>{o.isText||i.setNodeMarkup(a,void 0,{...o.attrs,dir:r})}),!0},pe=i(49162),setTextSelection=r=>({tr:o,dispatch:i})=>{if(i){const{doc:i}=o,{from:a,to:c}="number"==typeof r?{from:r,to:r}:r,u=pe.TextSelection.atStart(i).from,p=pe.TextSelection.atEnd(i).to,g=minMax(a,u,p),v=minMax(c,u,p),b=pe.TextSelection.create(i,g,v);o.setSelection(b)}return!0},de=i(35423),sinkListItem=r=>({state:o,dispatch:i})=>{const a=getNodeType(r,o.schema);return(0,de.sinkListItem)(a)(o,i)},fe=i(49162),he=i(26401);function ensureMarks(r,o){const i=r.storedMarks||r.selection.$to.parentOffset&&r.selection.$from.marks();if(i){const a=i.filter(r=>null==o?void 0:o.includes(r.type.name));r.tr.ensureMarks(a)}}var splitBlock=({keepMarks:r=!0}={})=>({tr:o,state:i,dispatch:a,editor:c})=>{const{selection:u,doc:p}=o,{$from:g,$to:v}=u,b=getSplittedAttributes(c.extensionManager.attributes,g.node().type.name,g.node().attrs);if(u instanceof fe.NodeSelection&&u.node.isBlock)return!(!g.parentOffset||!(0,he.canSplit)(p,g.pos))&&(a&&(r&&ensureMarks(i,c.extensionManager.splittableMarks),o.split(g.pos).scrollIntoView()),!0);if(!g.parent.isBlock)return!1;const k=v.parentOffset===v.parent.content.size,E=0===g.depth?void 0:defaultBlockAt(g.node(-1).contentMatchAt(g.indexAfter(-1)));let w=k&&E?[{type:E,attrs:b}]:void 0,x=(0,he.canSplit)(o.doc,o.mapping.map(g.pos),1,w);if(w||x||!(0,he.canSplit)(o.doc,o.mapping.map(g.pos),1,E?[{type:E}]:void 0)||(x=!0,w=E?[{type:E,attrs:b}]:void 0),a){if(x&&(u instanceof fe.TextSelection&&o.deleteSelection(),o.split(o.mapping.map(g.pos),1,w),E&&!k&&!g.parentOffset&&g.parent.type!==E)){const r=o.mapping.map(g.before()),i=o.doc.resolve(r);g.node(-1).canReplaceWith(i.index(),i.index()+1,E)&&o.setNodeMarkup(o.mapping.map(g.before()),E)}r&&ensureMarks(i,c.extensionManager.splittableMarks),o.scrollIntoView()}return x},me=i(32386),ge=i(49162),ve=i(26401),splitListItem=(r,o={})=>({tr:i,state:a,dispatch:c,editor:u})=>{var p;const g=getNodeType(r,a.schema),{$from:v,$to:b}=a.selection,k=a.selection.node;if(k&&k.isBlock||v.depth<2||!v.sameParent(b))return!1;const E=v.node(-1);if(E.type!==g)return!1;const w=u.extensionManager.attributes;if(0===v.parent.content.size&&v.node(-1).childCount===v.indexAfter(-1)){if(2===v.depth||v.node(-3).type!==g||v.index(-2)!==v.node(-2).childCount-1)return!1;if(c){let r=me.Fragment.empty;const a=v.index(-1)?1:v.index(-2)?2:3;for(let o=v.depth-a;o>=v.depth-3;o-=1)r=me.Fragment.from(v.node(o).copy(r));const c=v.indexAfter(-1)<v.node(-2).childCount?1:v.indexAfter(-2)<v.node(-3).childCount?2:3,u={...getSplittedAttributes(w,v.node().type.name,v.node().attrs),...o},b=(null==(p=g.contentMatch.defaultType)?void 0:p.createAndFill(u))||void 0;r=r.append(me.Fragment.from(g.createAndFill(null,b)||void 0));const k=v.before(v.depth-(a-1));i.replace(k,v.after(-c),new me.Slice(r,4-a,0));let E=-1;i.doc.nodesBetween(k,i.doc.content.size,(r,o)=>{if(E>-1)return!1;r.isTextblock&&0===r.content.size&&(E=o+1)}),E>-1&&i.setSelection(ge.TextSelection.near(i.doc.resolve(E))),i.scrollIntoView()}return!0}const x=b.pos===v.end()?E.contentMatchAt(0).defaultType:null,C={...getSplittedAttributes(w,E.type.name,E.attrs),...o},_={...getSplittedAttributes(w,v.node().type.name,v.node().attrs),...o};i.delete(v.pos,b.pos);const T=x?[{type:g,attrs:C},{type:x,attrs:_}]:[{type:g,attrs:C}];if(!(0,ve.canSplit)(i.doc,v.pos,2))return!1;if(c){const{selection:r,storedMarks:o}=a,{splittableMarks:p}=u.extensionManager,g=o||r.$to.parentOffset&&r.$from.marks();if(i.split(v.pos,2,T).scrollIntoView(),!g||!c)return!0;const b=g.filter(r=>p.includes(r.type.name));i.ensureMarks(b)}return!0},ye=i(26401),joinListBackwards=(r,o)=>{const i=findParentNode(r=>r.type===o)(r.selection);if(!i)return!0;const a=r.doc.resolve(Math.max(0,i.pos-1)).before(i.depth);if(void 0===a)return!0;const c=r.doc.nodeAt(a);return i.node.type!==(null==c?void 0:c.type)||!(0,ye.canJoin)(r.doc,i.pos)||(r.join(i.pos),!0)},joinListForwards=(r,o)=>{const i=findParentNode(r=>r.type===o)(r.selection);if(!i)return!0;const a=r.doc.resolve(i.start).after(i.depth);if(void 0===a)return!0;const c=r.doc.nodeAt(a);return i.node.type!==(null==c?void 0:c.type)||!(0,ye.canJoin)(r.doc,a)||(r.join(a),!0)},toggleList=(r,o,i,a={})=>({editor:c,tr:u,state:p,dispatch:g,chain:v,commands:b,can:k})=>{const{extensions:E,splittableMarks:w}=c.extensionManager,x=getNodeType(r,p.schema),C=getNodeType(o,p.schema),{selection:_,storedMarks:T}=p,{$from:P,$to:A}=_,N=P.blockRange(A),R=T||_.$to.parentOffset&&_.$from.marks();if(!N)return!1;const I=findParentNode(r=>isList(r.type.name,E))(_);if(N.depth>=1&&I&&N.depth-I.depth<=1){if(I.node.type===x)return b.liftListItem(C);if(isList(I.node.type.name,E)&&x.validContent(I.node.content)&&g)return v().command(()=>(u.setNodeMarkup(I.pos,x),!0)).command(()=>joinListBackwards(u,x)).command(()=>joinListForwards(u,x)).run()}return i&&R&&g?v().command(()=>{const r=k().wrapInList(x,a),o=R.filter(r=>w.includes(r.type.name));return u.ensureMarks(o),!!r||b.clearNodes()}).wrapInList(x,a).command(()=>joinListBackwards(u,x)).command(()=>joinListForwards(u,x)).run():v().command(()=>!!k().wrapInList(x,a)||b.clearNodes()).wrapInList(x,a).command(()=>joinListBackwards(u,x)).command(()=>joinListForwards(u,x)).run()},toggleMark=(r,o={},i={})=>({state:a,commands:c})=>{const{extendEmptyMarkRange:u=!1}=i,p=getMarkType(r,a.schema);return isMarkActive(a,p,o)?c.unsetMark(p,{extendEmptyMarkRange:u}):c.setMark(p,o)},toggleNode=(r,o,i={})=>({state:a,commands:c})=>{const u=getNodeType(r,a.schema),p=getNodeType(o,a.schema),g=isNodeActive(a,u,i);let v;return a.selection.$anchor.sameParent(a.selection.$head)&&(v=a.selection.$anchor.parent.attrs),g?c.setNode(p,v):c.setNode(u,{...v,...i})},toggleWrap=(r,o={})=>({state:i,commands:a})=>{const c=getNodeType(r,i.schema);return isNodeActive(i,c,o)?a.lift(c):a.wrapIn(c,o)},undoInputRule=()=>({state:r,dispatch:o})=>{const i=r.plugins;for(let a=0;a<i.length;a+=1){const c=i[a];let u;if(c.spec.isInputRules&&(u=c.getState(r))){if(o){const o=r.tr,i=u.transform;for(let r=i.steps.length-1;r>=0;r-=1)o.step(i.steps[r].invert(i.docs[r]));if(u.text){const i=o.doc.resolve(u.from).marks();o.replaceWith(u.from,u.to,r.schema.text(u.text,i))}else o.delete(u.from,u.to)}return!0}}return!1},unsetAllMarks=()=>({tr:r,dispatch:o})=>{const{selection:i}=r,{empty:a,ranges:c}=i;return a||o&&c.forEach(o=>{r.removeMark(o.$from.pos,o.$to.pos)}),!0},unsetMark=(r,o={})=>({tr:i,state:a,dispatch:c})=>{var u;const{extendEmptyMarkRange:p=!1}=o,{selection:g}=i,v=getMarkType(r,a.schema),{$from:b,empty:k,ranges:E}=g;if(!c)return!0;if(k&&p){let{from:r,to:o}=g;const a=null==(u=b.marks().find(r=>r.type===v))?void 0:u.attrs,c=getMarkRange(b,v,a);c&&(r=c.from,o=c.to),i.removeMark(r,o,v)}else E.forEach(r=>{i.removeMark(r.$from.pos,r.$to.pos,v)});return i.removeStoredMark(v),!0},unsetTextDirection=r=>({tr:o,state:i,dispatch:a})=>{const{selection:c}=i;let u,p;return"number"==typeof r?(u=r,p=r):r&&"from"in r&&"to"in r?(u=r.from,p=r.to):(u=c.from,p=c.to),a&&o.doc.nodesBetween(u,p,(r,i)=>{if(r.isText)return;const a={...r.attrs};delete a.dir,o.setNodeMarkup(i,void 0,a)}),!0},updateAttributes=(r,o={})=>({tr:i,state:a,dispatch:c})=>{let u=null,p=null;const g=getSchemaTypeNameByName("string"==typeof r?r:r.name,a.schema);if(!g)return!1;"node"===g&&(u=getNodeType(r,a.schema)),"mark"===g&&(p=getMarkType(r,a.schema));let v=!1;return i.selection.ranges.forEach(r=>{const g=r.$from.pos,b=r.$to.pos;let k,E,w,x;i.selection.empty?a.doc.nodesBetween(g,b,(r,o)=>{u&&u===r.type&&(v=!0,w=Math.max(o,g),x=Math.min(o+r.nodeSize,b),k=o,E=r)}):a.doc.nodesBetween(g,b,(r,a)=>{a<g&&u&&u===r.type&&(v=!0,w=Math.max(a,g),x=Math.min(a+r.nodeSize,b),k=a,E=r),a>=g&&a<=b&&(u&&u===r.type&&(v=!0,c&&i.setNodeMarkup(a,void 0,{...r.attrs,...o})),p&&r.marks.length&&r.marks.forEach(u=>{if(p===u.type&&(v=!0,c)){const c=Math.max(a,g),v=Math.min(a+r.nodeSize,b);i.addMark(c,v,p.create({...u.attrs,...o}))}}))}),E&&(void 0!==k&&c&&i.setNodeMarkup(k,void 0,{...E.attrs,...o}),p&&E.marks.length&&E.marks.forEach(r=>{p===r.type&&c&&i.addMark(w,x,p.create({...r.attrs,...o}))}))}),v},be=i(24007),wrapIn=(r,o={})=>({state:i,dispatch:a})=>{const c=getNodeType(r,i.schema);return(0,be.wrapIn)(c,o)(i,a)},ke=i(35423),wrapInList=(r,o={})=>({state:i,dispatch:a})=>{const c=getNodeType(r,i.schema);return(0,ke.wrapInList)(c,o)(i,a)},Ee=i(49162),Se=i(90990),we=class{constructor(){this.callbacks={}}on(r,o){return this.callbacks[r]||(this.callbacks[r]=[]),this.callbacks[r].push(o),this}emit(r,...o){const i=this.callbacks[r];return i&&i.forEach(r=>r.apply(this,o)),this}off(r,o){const i=this.callbacks[r];return i&&(o?this.callbacks[r]=i.filter(r=>r!==o):delete this.callbacks[r]),this}once(r,o){const onceFn=(...i)=>{this.off(r,onceFn),o.apply(this,i)};return this.on(r,onceFn)}removeAllListeners(){this.callbacks={}}},xe=i(77048),Ce=i(32386),_e=i(49162),Te=class{constructor(r){var o;this.find=r.find,this.handler=r.handler,this.undoable=null==(o=r.undoable)||o}},inputRuleMatcherHandler=(r,o)=>{if(isRegExp(o))return o.exec(r);const i=o(r);if(!i)return null;const a=[i.text];return a.index=i.index,a.input=r,a.data=i.data,i.replaceWith&&(i.text.includes(i.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),a.push(i.replaceWith)),a};function run(r){var o;const{editor:i,from:a,to:c,text:u,rules:p,plugin:g}=r,{view:v}=i;if(v.composing)return!1;const k=v.state.doc.resolve(a);if(k.parent.type.spec.code||(null==(o=k.nodeBefore||k.nodeAfter)?void 0:o.marks.find(r=>r.type.spec.code)))return!1;let E=!1;const w=getTextContentFromNodes(k)+u;return p.forEach(r=>{if(E)return;const o=inputRuleMatcherHandler(w,r.find);if(!o)return;const p=v.state.tr,k=createChainableState({state:v.state,transaction:p}),x={from:a-(o[0].length-u.length),to:c},{commands:C,chain:_,can:T}=new b({editor:i,state:k});null!==r.handler({state:k,range:x,match:o,commands:C,chain:_,can:T})&&p.steps.length&&(r.undoable&&p.setMeta(g,{transform:p,from:a,to:c,text:u}),v.dispatch(p),E=!0)}),E}function inputRulesPlugin(r){const{editor:o,rules:i}=r,a=new _e.Plugin({state:{init(){return null},apply(r,c,u){const p=r.getMeta(a);if(p)return p;const g=r.getMeta("applyInputRules");return!!g&&setTimeout(()=>{let{text:r}=g;"string"==typeof r||(r=getHTMLFromFragment(Ce.Fragment.from(r),u.schema));const{from:c}=g,p=c+r.length;run({editor:o,from:c,to:p,text:r,rules:i,plugin:a})}),r.selectionSet||r.docChanged?null:c}},props:{handleTextInput(r,c,u,p){return run({editor:o,from:c,to:u,text:p,rules:i,plugin:a})},handleDOMEvents:{compositionend:r=>(setTimeout(()=>{const{$cursor:c}=r.state.selection;c&&run({editor:o,from:c.pos,to:c.pos,text:"",rules:i,plugin:a})}),!1)},handleKeyDown(r,c){if("Enter"!==c.key)return!1;const{$cursor:u}=r.state.selection;return!!u&&run({editor:o,from:u.pos,to:u.pos,text:"\n",rules:i,plugin:a})}},isInputRules:!0});return a}function isPlainObject(r){return"Object"===function getType(r){return Object.prototype.toString.call(r).slice(8,-1)}(r)&&(r.constructor===Object&&Object.getPrototypeOf(r)===Object.prototype)}function mergeDeep(r,o){const i={...r};return isPlainObject(r)&&isPlainObject(o)&&Object.keys(o).forEach(a=>{isPlainObject(o[a])&&isPlainObject(r[a])?i[a]=mergeDeep(r[a],o[a]):i[a]=o[a]}),i}var Oe=class{constructor(r={}){this.type="extendable",this.parent=null,this.child=null,this.name="",this.config={name:this.name},this.config={...this.config,...r},this.name=this.config.name}get options(){return{...callOrReturn(getExtensionField(this,"addOptions",{name:this.name}))||{}}}get storage(){return{...callOrReturn(getExtensionField(this,"addStorage",{name:this.name,options:this.options}))||{}}}configure(r={}){const o=this.extend({...this.config,addOptions:()=>mergeDeep(this.options,r)});return o.name=this.name,o.parent=this.parent,o}extend(r={}){const o=new this.constructor({...this.config,...r});return o.parent=this,this.child=o,o.name="name"in r?r.name:o.parent.name,o}},Pe=class _Mark extends Oe{constructor(){super(...arguments),this.type="mark"}static create(r={}){const o="function"==typeof r?r():r;return new _Mark(o)}static handleExit({editor:r,mark:o}){const{tr:i}=r.state,a=r.state.selection.$from;if(a.pos===a.end()){const c=a.marks();if(!!!c.find(r=>(null==r?void 0:r.type.name)===o.name))return!1;const u=c.find(r=>(null==r?void 0:r.type.name)===o.name);return u&&i.removeStoredMark(u),i.insertText(" ",a.pos),r.view.dispatch(i),!0}return!1}configure(r){return super.configure(r)}extend(r){const o="function"==typeof r?r():r;return super.extend(o)}},Ae=i(32386),Me=i(49162);function isNumber(r){return"number"==typeof r}var Ne=class{constructor(r){this.find=r.find,this.handler=r.handler}},pasteRuleMatcherHandler=(r,o,i)=>{if(isRegExp(o))return[...r.matchAll(o)];const a=o(r,i);return a?a.map(o=>{const i=[o.text];return i.index=o.index,i.input=r,i.data=o.data,o.replaceWith&&(o.text.includes(o.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),i.push(o.replaceWith)),i}):[]};var Re=null,createClipboardPasteEvent=r=>{var o;const i=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return null==(o=i.clipboardData)||o.setData("text/html",r),i};function pasteRulesPlugin(r){const{editor:o,rules:i}=r;let a,c=null,u=!1,p=!1,g="undefined"!=typeof ClipboardEvent?new ClipboardEvent("paste"):null;try{a="undefined"!=typeof DragEvent?new DragEvent("drop"):null}catch{a=null}const processEvent=({state:r,from:i,to:c,rule:u,pasteEvt:p})=>{const v=r.tr,k=createChainableState({state:r,transaction:v}),E=function run2(r){const{editor:o,state:i,from:a,to:c,rule:u,pasteEvent:p,dropEvent:g}=r,{commands:v,chain:k,can:E}=new b({editor:o,state:i}),w=[];return i.doc.nodesBetween(a,c,(r,o)=>{var b,x,C,_,T;if((null==(x=null==(b=r.type)?void 0:b.spec)?void 0:x.code)||!(r.isText||r.isTextblock||r.isInline))return;const P=null!=(T=null!=(_=null==(C=r.content)?void 0:C.size)?_:r.nodeSize)?T:0,A=Math.max(a,o),N=Math.min(c,o+P);if(A>=N)return;const R=r.isText?r.text||"":r.textBetween(A-o,N-o,void 0,"");pasteRuleMatcherHandler(R,u.find,p).forEach(r=>{if(void 0===r.index)return;const o=A+r.index+1,a=o+r[0].length,c={from:i.tr.mapping.map(o),to:i.tr.mapping.map(a)},b=u.handler({state:i,range:c,match:r,commands:v,chain:k,can:E,pasteEvent:p,dropEvent:g});w.push(b)})}),w.every(r=>null!==r)}({editor:o,state:k,from:Math.max(i-1,0),to:c.b-1,rule:u,pasteEvent:p,dropEvent:a});if(E&&v.steps.length){try{a="undefined"!=typeof DragEvent?new DragEvent("drop"):null}catch{a=null}return g="undefined"!=typeof ClipboardEvent?new ClipboardEvent("paste"):null,v}};return i.map(r=>new Me.Plugin({view(r){const handleDragstart=i=>{var a;c=(null==(a=r.dom.parentElement)?void 0:a.contains(i.target))?r.dom.parentElement:null,c&&(Re=o)},handleDragend=()=>{Re&&(Re=null)};return window.addEventListener("dragstart",handleDragstart),window.addEventListener("dragend",handleDragend),{destroy(){window.removeEventListener("dragstart",handleDragstart),window.removeEventListener("dragend",handleDragend)}}},props:{handleDOMEvents:{drop:(r,o)=>{if(p=c===r.dom.parentElement,a=o,!p){const r=Re;(null==r?void 0:r.isEditable)&&setTimeout(()=>{const o=r.state.selection;o&&r.commands.deleteRange({from:o.from,to:o.to})},10)}return!1},paste:(r,o)=>{var i;const a=null==(i=o.clipboardData)?void 0:i.getData("text/html");return g=o,u=!!(null==a?void 0:a.includes("data-pm-slice")),!1}}},appendTransaction:(o,i,a)=>{const c=o[0],v="paste"===c.getMeta("uiEvent")&&!u,b="drop"===c.getMeta("uiEvent")&&!p,k=c.getMeta("applyPasteRules"),E=!!k;if(!v&&!b&&!E)return;if(E){let{text:o}=k;"string"==typeof o||(o=getHTMLFromFragment(Ae.Fragment.from(o),a.schema));const{from:i}=k,c=i+o.length,u=createClipboardPasteEvent(o);return processEvent({rule:r,state:a,from:i,to:{b:c},pasteEvt:u})}const w=i.doc.content.findDiffStart(a.doc.content),x=i.doc.content.findDiffEnd(a.doc.content);return isNumber(w)&&x&&w!==x.b?processEvent({rule:r,state:a,from:w,to:x,pasteEvt:g}):void 0}}))}var Ie=class{constructor(r,o){this.splittableMarks=[],this.editor=o,this.baseExtensions=r,this.extensions=resolveExtensions(r),this.schema=getSchemaByResolvedExtensions(this.extensions,o),this.setupExtensions()}get commands(){return this.extensions.reduce((r,o)=>{const i=getExtensionField(o,"addCommands",{name:o.name,options:o.options,storage:this.editor.extensionStorage[o.name],editor:this.editor,type:getSchemaTypeByName(o.name,this.schema)});return i?{...r,...i()}:r},{})}get plugins(){const{editor:r}=this;return sortExtensions([...this.extensions].reverse()).flatMap(o=>{const i={name:o.name,options:o.options,storage:this.editor.extensionStorage[o.name],editor:r,type:getSchemaTypeByName(o.name,this.schema)},a=[],c=getExtensionField(o,"addKeyboardShortcuts",i);let u={};if("mark"===o.type&&getExtensionField(o,"exitable",i)&&(u.ArrowRight=()=>Pe.handleExit({editor:r,mark:o})),c){const o=Object.fromEntries(Object.entries(c()).map(([o,i])=>[o,()=>i({editor:r})]));u={...u,...o}}const p=(0,xe.keymap)(u);a.push(p);const g=getExtensionField(o,"addInputRules",i);if(isExtensionRulesEnabled(o,r.options.enableInputRules)&&g){const o=g();if(o&&o.length){const i=inputRulesPlugin({editor:r,rules:o}),c=Array.isArray(i)?i:[i];a.push(...c)}}const v=getExtensionField(o,"addPasteRules",i);if(isExtensionRulesEnabled(o,r.options.enablePasteRules)&&v){const o=v();if(o&&o.length){const i=pasteRulesPlugin({editor:r,rules:o});a.push(...i)}}const b=getExtensionField(o,"addProseMirrorPlugins",i);if(b){const r=b();a.push(...r)}return a})}get attributes(){return getAttributesFromExtensions(this.extensions)}get nodeViews(){const{editor:r}=this,{nodeExtensions:o}=splitExtensions(this.extensions);return Object.fromEntries(o.filter(r=>!!getExtensionField(r,"addNodeView")).map(o=>{const i=this.attributes.filter(r=>r.type===o.name),a={name:o.name,options:o.options,storage:this.editor.extensionStorage[o.name],editor:r,type:getNodeType(o.name,this.schema)},c=getExtensionField(o,"addNodeView",a);if(!c)return[];const u=c();if(!u)return[];return[o.name,(a,c,p,g,v)=>{const b=getRenderedAttributes(a,i);return u({node:a,view:c,getPos:p,decorations:g,innerDecorations:v,editor:r,extension:o,HTMLAttributes:b})}]}))}dispatchTransaction(r){const{editor:o}=this;return sortExtensions([...this.extensions].reverse()).reduceRight((r,i)=>{const a={name:i.name,options:i.options,storage:this.editor.extensionStorage[i.name],editor:o,type:getSchemaTypeByName(i.name,this.schema)},c=getExtensionField(i,"dispatchTransaction",a);return c?o=>{c.call(a,{transaction:o,next:r})}:r},r)}transformPastedHTML(r){const{editor:o}=this;return sortExtensions([...this.extensions]).reduce((r,i)=>{const a={name:i.name,options:i.options,storage:this.editor.extensionStorage[i.name],editor:o,type:getSchemaTypeByName(i.name,this.schema)},c=getExtensionField(i,"transformPastedHTML",a);return c?(o,i)=>{const u=r(o,i);return c.call(a,u)}:r},r||(r=>r))}get markViews(){const{editor:r}=this,{markExtensions:o}=splitExtensions(this.extensions);return Object.fromEntries(o.filter(r=>!!getExtensionField(r,"addMarkView")).map(o=>{const i=this.attributes.filter(r=>r.type===o.name),a={name:o.name,options:o.options,storage:this.editor.extensionStorage[o.name],editor:r,type:getMarkType(o.name,this.schema)},c=getExtensionField(o,"addMarkView",a);if(!c)return[];return[o.name,(a,u,p)=>{const g=getRenderedAttributes(a,i);return c()({mark:a,view:u,inline:p,editor:r,extension:o,HTMLAttributes:g,updateAttributes:o=>{updateMarkViewAttributes(a,r,o)}})}]}))}setupExtensions(){const r=this.extensions;this.editor.extensionStorage=Object.fromEntries(r.map(r=>[r.name,r.storage])),r.forEach(r=>{var o;const i={name:r.name,options:r.options,storage:this.editor.extensionStorage[r.name],editor:this.editor,type:getSchemaTypeByName(r.name,this.schema)};if("mark"===r.type){(null==(o=callOrReturn(getExtensionField(r,"keepOnSplit",i)))||o)&&this.splittableMarks.push(r.name)}const a=getExtensionField(r,"onBeforeCreate",i),c=getExtensionField(r,"onCreate",i),u=getExtensionField(r,"onUpdate",i),p=getExtensionField(r,"onSelectionUpdate",i),g=getExtensionField(r,"onTransaction",i),v=getExtensionField(r,"onFocus",i),b=getExtensionField(r,"onBlur",i),k=getExtensionField(r,"onDestroy",i);a&&this.editor.on("beforeCreate",a),c&&this.editor.on("create",c),u&&this.editor.on("update",u),p&&this.editor.on("selectionUpdate",p),g&&this.editor.on("transaction",g),v&&this.editor.on("focus",v),b&&this.editor.on("blur",b),k&&this.editor.on("destroy",k)})}};Ie.resolve=resolveExtensions,Ie.sort=sortExtensions,Ie.flatten=flattenExtensions;var De={};__export(De,{ClipboardTextSerializer:()=>ze,Commands:()=>je,Delete:()=>Ve,Drop:()=>Ue,Editable:()=>We,FocusEvents:()=>Ge,Keymap:()=>Ye,Paste:()=>Qe,Tabindex:()=>et,TextDirection:()=>rt,focusEventsPluginKey:()=>Ke});var Le=i(49162),Fe=class _Extension extends Oe{constructor(){super(...arguments),this.type="extension"}static create(r={}){const o="function"==typeof r?r():r;return new _Extension(o)}configure(r){return super.configure(r)}extend(r){const o="function"==typeof r?r():r;return super.extend(o)}},ze=Fe.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new Le.Plugin({key:new Le.PluginKey("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:r}=this,{state:o,schema:i}=r,{doc:a,selection:c}=o,{ranges:u}=c,p=Math.min(...u.map(r=>r.$from.pos)),g=Math.max(...u.map(r=>r.$to.pos)),v=getTextSerializersFromSchema(i);return getTextBetween(a,{from:p,to:g},{...void 0!==this.options.blockSeparator?{blockSeparator:this.options.blockSeparator}:{},textSerializers:v})}}})]}}),je=Fe.create({name:"commands",addCommands(){return{...k}}}),Be=i(26401),Ve=Fe.create({name:"delete",onUpdate({transaction:r,appendedTransactions:o}){var i,a,c;const callback=()=>{var i,a,c,u;if(null!=(u=null==(c=null==(a=null==(i=this.editor.options.coreExtensionOptions)?void 0:i.delete)?void 0:a.filterTransaction)?void 0:c.call(a,r))?u:r.getMeta("y-sync$"))return;const p=combineTransactionSteps(r.before,[r,...o]);getChangedRanges(p).forEach(o=>{p.mapping.mapResult(o.oldRange.from).deletedAfter&&p.mapping.mapResult(o.oldRange.to).deletedBefore&&p.before.nodesBetween(o.oldRange.from,o.oldRange.to,(i,a)=>{const c=a+i.nodeSize-2,u=o.oldRange.from<=a&&c<=o.oldRange.to;this.editor.emit("delete",{type:"node",node:i,from:a,to:c,newFrom:p.mapping.map(a),newTo:p.mapping.map(c),deletedRange:o.oldRange,newRange:o.newRange,partial:!u,editor:this.editor,transaction:r,combinedTransform:p})})});const g=p.mapping;p.steps.forEach((o,i)=>{var a,c;if(o instanceof Be.RemoveMarkStep){const u=g.slice(i).map(o.from,-1),v=g.slice(i).map(o.to),b=g.invert().map(u,-1),k=g.invert().map(v),E=null==(a=p.doc.nodeAt(u-1))?void 0:a.marks.some(r=>r.eq(o.mark)),w=null==(c=p.doc.nodeAt(v))?void 0:c.marks.some(r=>r.eq(o.mark));this.editor.emit("delete",{type:"mark",mark:o.mark,from:o.from,to:o.to,deletedRange:{from:b,to:k},newRange:{from:u,to:v},partial:Boolean(w||E),editor:this.editor,transaction:r,combinedTransform:p})}})};null==(c=null==(a=null==(i=this.editor.options.coreExtensionOptions)?void 0:i.delete)?void 0:a.async)||c?setTimeout(callback,0):callback()}}),$e=i(49162),Ue=Fe.create({name:"drop",addProseMirrorPlugins(){return[new $e.Plugin({key:new $e.PluginKey("tiptapDrop"),props:{handleDrop:(r,o,i,a)=>{this.editor.emit("drop",{editor:this.editor,event:o,slice:i,moved:a})}}})]}}),He=i(49162),We=Fe.create({name:"editable",addProseMirrorPlugins(){return[new He.Plugin({key:new He.PluginKey("editable"),props:{editable:()=>this.editor.options.editable}})]}}),qe=i(49162),Ke=new qe.PluginKey("focusEvents"),Ge=Fe.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:r}=this;return[new qe.Plugin({key:Ke,props:{handleDOMEvents:{focus:(o,i)=>{r.isFocused=!0;const a=r.state.tr.setMeta("focus",{event:i}).setMeta("addToHistory",!1);return o.dispatch(a),!1},blur:(o,i)=>{r.isFocused=!1;const a=r.state.tr.setMeta("blur",{event:i}).setMeta("addToHistory",!1);return o.dispatch(a),!1}}}})]}}),Je=i(49162),Ye=Fe.create({name:"keymap",addKeyboardShortcuts(){const handleBackspace=()=>this.editor.commands.first(({commands:r})=>[()=>r.undoInputRule(),()=>r.command(({tr:o})=>{const{selection:i,doc:a}=o,{empty:c,$anchor:u}=i,{pos:p,parent:g}=u,v=u.parent.isTextblock&&p>0?o.doc.resolve(p-1):u,b=v.parent.type.spec.isolating,k=u.pos-u.parentOffset,E=b&&1===v.parent.childCount?k===u.pos:Je.Selection.atStart(a).from===p;return!(!c||!g.type.isTextblock||g.textContent.length||!E||E&&"paragraph"===u.parent.type.name)&&r.clearNodes()}),()=>r.deleteSelection(),()=>r.joinBackward(),()=>r.selectNodeBackward()]),handleDelete=()=>this.editor.commands.first(({commands:r})=>[()=>r.deleteSelection(),()=>r.deleteCurrentNode(),()=>r.joinForward(),()=>r.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:r})=>[()=>r.newlineInCode(),()=>r.createParagraphNear(),()=>r.liftEmptyBlock(),()=>r.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:handleBackspace,"Mod-Backspace":handleBackspace,"Shift-Backspace":handleBackspace,Delete:handleDelete,"Mod-Delete":handleDelete,"Mod-a":()=>this.editor.commands.selectAll()},o={...r},i={...r,"Ctrl-h":handleBackspace,"Alt-Backspace":handleBackspace,"Ctrl-d":handleDelete,"Ctrl-Alt-Backspace":handleDelete,"Alt-Delete":handleDelete,"Alt-d":handleDelete,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return isiOS()||isMacOS()?i:o},addProseMirrorPlugins(){return[new Je.Plugin({key:new Je.PluginKey("clearDocument"),appendTransaction:(r,o,i)=>{if(r.some(r=>r.getMeta("composition")))return;const a=r.some(r=>r.docChanged)&&!o.doc.eq(i.doc),c=r.some(r=>r.getMeta("preventClearDocument"));if(!a||c)return;const{empty:u,from:p,to:g}=o.selection,v=Je.Selection.atStart(o.doc).from,k=Je.Selection.atEnd(o.doc).to;if(u||!(p===v&&g===k))return;if(!isNodeEmpty(i.doc))return;const E=i.tr,w=createChainableState({state:i,transaction:E}),{commands:x}=new b({editor:this.editor,state:w});return x.clearNodes(),E.steps.length?E:void 0}})]}}),Xe=i(49162),Qe=Fe.create({name:"paste",addProseMirrorPlugins(){return[new Xe.Plugin({key:new Xe.PluginKey("tiptapPaste"),props:{handlePaste:(r,o,i)=>{this.editor.emit("paste",{editor:this.editor,event:o,slice:i})}}})]}}),Ze=i(49162),et=Fe.create({name:"tabindex",addProseMirrorPlugins(){return[new Ze.Plugin({key:new Ze.PluginKey("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}}),nt=i(49162),rt=Fe.create({name:"textDirection",addOptions(){return{direction:void 0}},addGlobalAttributes(){if(!this.options.direction)return[];const{nodeExtensions:r}=splitExtensions(this.extensions);return[{types:r.filter(r=>"text"!==r.name).map(r=>r.name),attributes:{dir:{default:this.options.direction,parseHTML:r=>{const o=r.getAttribute("dir");return!o||"ltr"!==o&&"rtl"!==o&&"auto"!==o?this.options.direction:o},renderHTML:r=>r.dir?{dir:r.dir}:{}}}}]},addProseMirrorPlugins(){return[new nt.Plugin({key:new nt.PluginKey("textDirection"),props:{attributes:()=>{const r=this.options.direction;return r?{dir:r}:{}}}})]}}),ot=class _NodePos{constructor(r,o,i=!1,a=null){this.currentNode=null,this.actualDepth=null,this.isBlock=i,this.resolvedPos=r,this.editor=o,this.currentNode=a}get name(){return this.node.type.name}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var r;return null!=(r=this.actualDepth)?r:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(r){let o=this.from,i=this.to;if(this.isBlock){if(0===this.content.size)return void console.error(`You can’t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);o=this.from+1,i=this.to-1}this.editor.commands.insertContentAt({from:o,to:i},r)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(0===this.depth)return null;const r=this.resolvedPos.start(this.resolvedPos.depth-1),o=this.resolvedPos.doc.resolve(r);return new _NodePos(o,this.editor)}get before(){let r=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return r.depth!==this.depth&&(r=this.resolvedPos.doc.resolve(this.from-3)),new _NodePos(r,this.editor)}get after(){let r=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return r.depth!==this.depth&&(r=this.resolvedPos.doc.resolve(this.to+3)),new _NodePos(r,this.editor)}get children(){const r=[];return this.node.content.forEach((o,i)=>{const a=o.isBlock&&!o.isTextblock,c=o.isAtom&&!o.isText,u=o.isInline,p=this.pos+i+(c?0:1);if(p<0||p>this.resolvedPos.doc.nodeSize-2)return;const g=this.resolvedPos.doc.resolve(p);if(!a&&!u&&g.depth<=this.depth)return;const v=new _NodePos(g,this.editor,a,a||u?o:null);a&&(v.actualDepth=this.depth+1),r.push(v)}),r}get firstChild(){return this.children[0]||null}get lastChild(){const r=this.children;return r[r.length-1]||null}closest(r,o={}){let i=null,a=this.parent;for(;a&&!i;){if(a.node.type.name===r)if(Object.keys(o).length>0){const r=a.node.attrs,i=Object.keys(o);for(let a=0;a<i.length;a+=1){const c=i[a];if(r[c]!==o[c])break}}else i=a;a=a.parent}return i}querySelector(r,o={}){return this.querySelectorAll(r,o,!0)[0]||null}querySelectorAll(r,o={},i=!1){let a=[];if(!this.children||0===this.children.length)return a;const c=Object.keys(o);return this.children.forEach(u=>{if(!(i&&a.length>0)){if(u.node.type.name===r){c.every(r=>o[r]===u.node.attrs[r])&&a.push(u)}i&&a.length>0||(a=a.concat(u.querySelectorAll(r,o,i)))}}),a}setAttribute(r){const{tr:o}=this.editor.state;o.setNodeMarkup(this.from,void 0,{...this.node.attrs,...r}),this.editor.view.dispatch(o)}};function createStyleTag(r,o,i){const a=document.querySelector(`style[data-tiptap-style${i?`-${i}`:""}]`);if(null!==a)return a;const c=document.createElement("style");return o&&c.setAttribute("nonce",o),c.setAttribute("data-tiptap-style"+(i?`-${i}`:""),""),c.innerHTML=r,document.getElementsByTagName("head")[0].appendChild(c),c}var it=class extends we{constructor(r={}){super(),this.css=null,this.className="tiptap",this.editorView=null,this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.instanceId=Math.random().toString(36).slice(2,9),this.options={element:"undefined"!=typeof document?document.createElement("div"):null,content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,textDirection:void 0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onMount:()=>null,onUnmount:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:r})=>{throw r},onPaste:()=>null,onDrop:()=>null,onDelete:()=>null,enableExtensionDispatchTransaction:!0},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.utils={getUpdatedPosition:getUpdatedPosition,createMappablePosition:createMappablePosition},this.setOptions(r),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("mount",this.options.onMount),this.on("unmount",this.options.onUnmount),this.on("contentError",this.options.onContentError),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:r,slice:o,moved:i})=>this.options.onDrop(r,o,i)),this.on("paste",({event:r,slice:o})=>this.options.onPaste(r,o)),this.on("delete",this.options.onDelete);const o=this.createDoc(),i=resolveFocusPosition(o,this.options.autofocus);this.editorState=Ee.EditorState.create({doc:o,schema:this.schema,selection:i||void 0}),this.options.element&&this.mount(this.options.element)}mount(r){if("undefined"==typeof document)throw new Error("[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.");this.createView(r),this.emit("mount",{editor:this}),this.css&&!document.head.contains(this.css)&&document.head.appendChild(this.css),window.setTimeout(()=>{this.isDestroyed||(!1!==this.options.autofocus&&null!==this.options.autofocus&&this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}unmount(){if(this.editorView){const r=this.editorView.dom;(null==r?void 0:r.editor)&&delete r.editor,this.editorView.destroy()}if(this.editorView=null,this.isInitialized=!1,this.css&&!document.querySelectorAll(`.${this.className}`).length)try{"function"==typeof this.css.remove?this.css.remove():this.css.parentNode&&this.css.parentNode.removeChild(this.css)}catch(r){console.warn("Failed to remove CSS element:",r)}this.css=null,this.emit("unmount",{editor:this})}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&"undefined"!=typeof document&&(this.css=createStyleTag('.ProseMirror {\n position: relative;\n}\n\n.ProseMirror {\n word-wrap: break-word;\n white-space: pre-wrap;\n white-space: break-spaces;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n font-feature-settings: "liga" 0; /* the above doesn\'t seem to work in Edge */\n}\n\n.ProseMirror [contenteditable="false"] {\n white-space: normal;\n}\n\n.ProseMirror [contenteditable="false"] [contenteditable="true"] {\n white-space: pre-wrap;\n}\n\n.ProseMirror pre {\n white-space: pre-wrap;\n}\n\nimg.ProseMirror-separator {\n display: inline !important;\n border: none !important;\n margin: 0 !important;\n width: 0 !important;\n height: 0 !important;\n}\n\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n margin: 0;\n}\n\n.ProseMirror-gapcursor:after {\n content: "";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n\n.ProseMirror-hideselection *::selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection * {\n caret-color: transparent;\n}\n\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}',this.options.injectNonce))}setOptions(r={}){this.options={...this.options,...r},this.editorView&&this.state&&!this.isDestroyed&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(r,o=!0){this.setOptions({editable:r}),o&&this.emit("update",{editor:this,transaction:this.state.tr,appendedTransactions:[]})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get view(){return this.editorView?this.editorView:new Proxy({state:this.editorState,updateState:r=>{this.editorState=r},dispatch:r=>{this.dispatchTransaction(r)},composing:!1,dragging:null,editable:!0,isDestroyed:!1},{get:(r,o)=>{if(this.editorView)return this.editorView[o];if("state"===o)return this.editorState;if(o in r)return Reflect.get(r,o);throw new Error(`[tiptap error]: The editor view is not available. Cannot access view['${o}']. The editor may not be mounted yet.`)}})}get state(){return this.editorView&&(this.editorState=this.view.state),this.editorState}registerPlugin(r,o){const i=isFunction(o)?o(r,[...this.state.plugins]):[...this.state.plugins,r],a=this.state.reconfigure({plugins:i});return this.view.updateState(a),a}unregisterPlugin(r){if(this.isDestroyed)return;const o=this.state.plugins;let i=o;if([].concat(r).forEach(r=>{const o="string"==typeof r?`${r}$`:r.key;i=i.filter(r=>!r.key.startsWith(o))}),o.length===i.length)return;const a=this.state.reconfigure({plugins:i});return this.view.updateState(a),a}createExtensionManager(){var r,o;const i=[...this.options.enableCoreExtensions?[We,ze.configure({blockSeparator:null==(o=null==(r=this.options.coreExtensionOptions)?void 0:r.clipboardTextSerializer)?void 0:o.blockSeparator}),je,Ge,Ye,et,Ue,Qe,Ve,rt.configure({direction:this.options.textDirection})].filter(r=>"object"!=typeof this.options.enableCoreExtensions||!1!==this.options.enableCoreExtensions[r.name]):[],...this.options.extensions].filter(r=>["extension","node","mark"].includes(null==r?void 0:r.type));this.extensionManager=new Ie(i,this)}createCommandManager(){this.commandManager=new b({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createDoc(){let r;try{r=createDocument(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(o){if(!(o instanceof Error&&["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(o.message)))throw o;this.emit("contentError",{editor:this,error:o,disableCollaboration:()=>{"collaboration"in this.storage&&"object"==typeof this.storage.collaboration&&this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(r=>"collaboration"!==r.name),this.createExtensionManager()}}),r=createDocument(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}return r}createView(r){const{editorProps:o,enableExtensionDispatchTransaction:i}=this.options,a=o.dispatchTransaction||this.dispatchTransaction.bind(this),c=i?this.extensionManager.dispatchTransaction(a):a,u=o.transformPastedHTML,p=this.extensionManager.transformPastedHTML(u);this.editorView=new Se.EditorView(r,{...o,attributes:{role:"textbox",...null==o?void 0:o.attributes},dispatchTransaction:c,transformPastedHTML:p,state:this.editorState,markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews});const g=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(g),this.prependClass(),this.injectCSS();this.view.dom.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`${this.className} ${this.view.dom.className}`}captureTransaction(r){this.isCapturingTransaction=!0,r(),this.isCapturingTransaction=!1;const o=this.capturedTransaction;return this.capturedTransaction=null,o}dispatchTransaction(r){if(this.view.isDestroyed)return;if(this.isCapturingTransaction)return this.capturedTransaction?void r.steps.forEach(r=>{var o;return null==(o=this.capturedTransaction)?void 0:o.step(r)}):void(this.capturedTransaction=r);const{state:o,transactions:i}=this.state.applyTransaction(r),a=!this.state.selection.eq(o.selection),c=i.includes(r),u=this.state;if(this.emit("beforeTransaction",{editor:this,transaction:r,nextState:o}),!c)return;this.view.updateState(o),this.emit("transaction",{editor:this,transaction:r,appendedTransactions:i.slice(1)}),a&&this.emit("selectionUpdate",{editor:this,transaction:r});const p=i.findLast(r=>r.getMeta("focus")||r.getMeta("blur")),g=null==p?void 0:p.getMeta("focus"),v=null==p?void 0:p.getMeta("blur");g&&this.emit("focus",{editor:this,event:g.event,transaction:p}),v&&this.emit("blur",{editor:this,event:v.event,transaction:p}),r.getMeta("preventUpdate")||!i.some(r=>r.docChanged)||u.doc.eq(o.doc)||this.emit("update",{editor:this,transaction:r,appendedTransactions:i.slice(1)})}getAttributes(r){return getAttributes(this.state,r)}isActive(r,o){const i="string"==typeof r?r:null,a="string"==typeof r?o:r;return isActive(this.state,i,a)}getJSON(){return this.state.doc.toJSON()}getHTML(){return getHTMLFromFragment(this.state.doc.content,this.schema)}getText(r){const{blockSeparator:o="\n\n",textSerializers:i={}}=r||{};return getText(this.state.doc,{blockSeparator:o,textSerializers:{...getTextSerializersFromSchema(this.schema),...i}})}get isEmpty(){return isNodeEmpty(this.state.doc)}destroy(){this.emit("destroy"),this.unmount(),this.removeAllListeners()}get isDestroyed(){var r,o;return null==(o=null==(r=this.editorView)?void 0:r.isDestroyed)||o}$node(r,o){var i;return(null==(i=this.$doc)?void 0:i.querySelector(r,o))||null}$nodes(r,o){var i;return(null==(i=this.$doc)?void 0:i.querySelectorAll(r,o))||null}$pos(r){const o=this.state.doc.resolve(r);return new ot(o,this)}get $doc(){return this.$pos(0)}};function markInputRule(r){return new Te({find:r.find,handler:({state:o,range:i,match:a})=>{const c=callOrReturn(r.getAttributes,void 0,a);if(!1===c||null===c)return null;const{tr:u}=o,p=a[a.length-1],g=a[0];if(p){const a=g.search(/\S/),v=i.from+g.indexOf(p),b=v+p.length;if(getMarksBetween(i.from,i.to,o.doc).filter(o=>o.mark.type.excluded.find(i=>i===r.type&&i!==o.mark.type)).filter(r=>r.to>v).length)return null;b<i.to&&u.delete(b,i.to),v>i.from&&u.delete(i.from+a,v);const k=i.from+a+p.length;u.addMark(i.from+a,k,r.type.create(c||{})),u.removeStoredMark(r.type)}},undoable:r.undoable})}function nodeInputRule(r){return new Te({find:r.find,handler:({state:o,range:i,match:a})=>{const c=callOrReturn(r.getAttributes,void 0,a)||{},{tr:u}=o,p=i.from;let g=i.to;const v=r.type.create(c);if(a[1]){let r=p+a[0].lastIndexOf(a[1]);r>g?r=g:g=r+a[1].length;const o=a[0][a[0].length-1];u.insertText(o,p+a[0].length-1),u.replaceWith(r,g,v)}else if(a[0]){const o=r.type.isInline?p:p-1;u.insert(o,r.type.create(c)).delete(u.mapping.map(p),u.mapping.map(g))}u.scrollIntoView()},undoable:r.undoable})}function textblockTypeInputRule(r){return new Te({find:r.find,handler:({state:o,range:i,match:a})=>{const c=o.doc.resolve(i.from),u=callOrReturn(r.getAttributes,void 0,a)||{};if(!c.node(-1).canReplaceWith(c.index(-1),c.indexAfter(-1),r.type))return null;o.tr.delete(i.from,i.to).setBlockType(i.from,i.from,r.type,u)},undoable:r.undoable})}function textInputRule(r){return new Te({find:r.find,handler:({state:o,range:i,match:a})=>{let c=r.replace,u=i.from;const p=i.to;if(a[1]){const r=a[0].lastIndexOf(a[1]);c+=a[0].slice(r+a[1].length),u+=r;const o=u-p;o>0&&(c=a[0].slice(r-o,r)+c,u=p)}o.tr.insertText(c,u,p)},undoable:r.undoable})}var at=i(26401);function wrappingInputRule(r){return new Te({find:r.find,handler:({state:o,range:i,match:a,chain:c})=>{const u=callOrReturn(r.getAttributes,void 0,a)||{},p=o.tr.delete(i.from,i.to),g=p.doc.resolve(i.from).blockRange(),v=g&&(0,at.findWrapping)(g,r.type,u);if(!v)return null;if(p.wrap(g,v),r.keepMarks&&r.editor){const{selection:i,storedMarks:a}=o,{splittableMarks:c}=r.editor.extensionManager,u=a||i.$to.parentOffset&&i.$from.marks();if(u){const r=u.filter(r=>c.includes(r.type.name));p.ensureMarks(r)}}if(r.keepAttributes){const o="bulletList"===r.type.name||"orderedList"===r.type.name?"listItem":"taskList";c().updateAttributes(o,u).run()}const b=p.doc.resolve(i.from-1).nodeBefore;b&&b.type===r.type&&(0,at.canJoin)(p.doc,i.from-1)&&(!r.joinPredicate||r.joinPredicate(a,b))&&p.join(i.from-1)},undoable:r.undoable})}function Fragment6(r){return r.children}var h=(r,o)=>{if("slot"===r)return 0;if(r instanceof Function)return r(o);const{children:i,...a}=null!=o?o:{};if("svg"===r)throw new Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");return[r,a,i]},st=class{constructor(r){var o,i,a,c,u,p;this.directions=["bottom-left","bottom-right","top-left","top-right"],this.minSize={height:8,width:8},this.preserveAspectRatio=!1,this.classNames={container:"",wrapper:"",handle:"",resizing:""},this.initialWidth=0,this.initialHeight=0,this.aspectRatio=1,this.isResizing=!1,this.activeHandle=null,this.startX=0,this.startY=0,this.startWidth=0,this.startHeight=0,this.isShiftKeyPressed=!1,this.lastEditableState=void 0,this.handleMap=new Map,this.handleMouseMove=r=>{if(!this.isResizing||!this.activeHandle)return;const o=r.clientX-this.startX,i=r.clientY-this.startY;this.handleResize(o,i)},this.handleTouchMove=r=>{if(!this.isResizing||!this.activeHandle)return;const o=r.touches[0];if(!o)return;const i=o.clientX-this.startX,a=o.clientY-this.startY;this.handleResize(i,a)},this.handleMouseUp=()=>{if(!this.isResizing)return;const r=this.element.offsetWidth,o=this.element.offsetHeight;this.onCommit(r,o),this.isResizing=!1,this.activeHandle=null,this.container.dataset.resizeState="false",this.classNames.resizing&&this.container.classList.remove(this.classNames.resizing),document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)},this.handleKeyDown=r=>{"Shift"===r.key&&(this.isShiftKeyPressed=!0)},this.handleKeyUp=r=>{"Shift"===r.key&&(this.isShiftKeyPressed=!1)},this.node=r.node,this.editor=r.editor,this.element=r.element,this.contentElement=r.contentElement,this.getPos=r.getPos,this.onResize=r.onResize,this.onCommit=r.onCommit,this.onUpdate=r.onUpdate,(null==(o=r.options)?void 0:o.min)&&(this.minSize={...this.minSize,...r.options.min}),(null==(i=r.options)?void 0:i.max)&&(this.maxSize=r.options.max),(null==(a=null==r?void 0:r.options)?void 0:a.directions)&&(this.directions=r.options.directions),(null==(c=r.options)?void 0:c.preserveAspectRatio)&&(this.preserveAspectRatio=r.options.preserveAspectRatio),(null==(u=r.options)?void 0:u.className)&&(this.classNames={container:r.options.className.container||"",wrapper:r.options.className.wrapper||"",handle:r.options.className.handle||"",resizing:r.options.className.resizing||""}),(null==(p=r.options)?void 0:p.createCustomHandle)&&(this.createCustomHandle=r.options.createCustomHandle),this.wrapper=this.createWrapper(),this.container=this.createContainer(),this.applyInitialSize(),this.attachHandles(),this.editor.on("update",this.handleEditorUpdate.bind(this))}get dom(){return this.container}get contentDOM(){var r;return null!=(r=this.contentElement)?r:null}handleEditorUpdate(){const r=this.editor.isEditable;r!==this.lastEditableState&&(this.lastEditableState=r,r?r&&0===this.handleMap.size&&this.attachHandles():this.removeHandles())}update(r,o,i){return r.type===this.node.type&&(this.node=r,!this.onUpdate||this.onUpdate(r,o,i))}destroy(){this.isResizing&&(this.container.dataset.resizeState="false",this.classNames.resizing&&this.container.classList.remove(this.classNames.resizing),document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp),this.isResizing=!1,this.activeHandle=null),this.editor.off("update",this.handleEditorUpdate.bind(this)),this.container.remove()}createContainer(){const r=document.createElement("div");return r.dataset.resizeContainer="",r.dataset.node=this.node.type.name,r.style.display="flex",this.classNames.container&&(r.className=this.classNames.container),r.appendChild(this.wrapper),r}createWrapper(){const r=document.createElement("div");return r.style.position="relative",r.style.display="block",r.dataset.resizeWrapper="",this.classNames.wrapper&&(r.className=this.classNames.wrapper),r.appendChild(this.element),r}createHandle(r){const o=document.createElement("div");return o.dataset.resizeHandle=r,o.style.position="absolute",this.classNames.handle&&(o.className=this.classNames.handle),o}positionHandle(r,o){const i=o.includes("top"),a=o.includes("bottom"),c=o.includes("left"),u=o.includes("right");i&&(r.style.top="0"),a&&(r.style.bottom="0"),c&&(r.style.left="0"),u&&(r.style.right="0"),"top"!==o&&"bottom"!==o||(r.style.left="0",r.style.right="0"),"left"!==o&&"right"!==o||(r.style.top="0",r.style.bottom="0")}attachHandles(){this.directions.forEach(r=>{let o;o=this.createCustomHandle?this.createCustomHandle(r):this.createHandle(r),o instanceof HTMLElement||(console.warn(`[ResizableNodeView] createCustomHandle("${r}") did not return an HTMLElement. Falling back to default handle.`),o=this.createHandle(r)),this.createCustomHandle||this.positionHandle(o,r),o.addEventListener("mousedown",o=>this.handleResizeStart(o,r)),o.addEventListener("touchstart",o=>this.handleResizeStart(o,r)),this.handleMap.set(r,o),this.wrapper.appendChild(o)})}removeHandles(){this.handleMap.forEach(r=>r.remove()),this.handleMap.clear()}applyInitialSize(){const r=this.node.attrs.width,o=this.node.attrs.height;r?(this.element.style.width=`${r}px`,this.initialWidth=r):this.initialWidth=this.element.offsetWidth,o?(this.element.style.height=`${o}px`,this.initialHeight=o):this.initialHeight=this.element.offsetHeight,this.initialWidth>0&&this.initialHeight>0&&(this.aspectRatio=this.initialWidth/this.initialHeight)}handleResizeStart(r,o){r.preventDefault(),r.stopPropagation(),this.isResizing=!0,this.activeHandle=o,"touches"in r?(this.startX=r.touches[0].clientX,this.startY=r.touches[0].clientY):(this.startX=r.clientX,this.startY=r.clientY),this.startWidth=this.element.offsetWidth,this.startHeight=this.element.offsetHeight,this.startWidth>0&&this.startHeight>0&&(this.aspectRatio=this.startWidth/this.startHeight);this.getPos();this.container.dataset.resizeState="true",this.classNames.resizing&&this.container.classList.add(this.classNames.resizing),document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("touchmove",this.handleTouchMove),document.addEventListener("mouseup",this.handleMouseUp),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}handleResize(r,o){if(!this.activeHandle)return;const i=this.preserveAspectRatio||this.isShiftKeyPressed,{width:a,height:c}=this.calculateNewDimensions(this.activeHandle,r,o),u=this.applyConstraints(a,c,i);this.element.style.width=`${u.width}px`,this.element.style.height=`${u.height}px`,this.onResize&&this.onResize(u.width,u.height)}calculateNewDimensions(r,o,i){let a=this.startWidth,c=this.startHeight;const u=r.includes("right"),p=r.includes("left"),g=r.includes("bottom"),v=r.includes("top");u?a=this.startWidth+o:p&&(a=this.startWidth-o),g?c=this.startHeight+i:v&&(c=this.startHeight-i),"right"!==r&&"left"!==r||(a=this.startWidth+(u?o:-o)),"top"!==r&&"bottom"!==r||(c=this.startHeight+(g?i:-i));return this.preserveAspectRatio||this.isShiftKeyPressed?this.applyAspectRatio(a,c,r):{width:a,height:c}}applyConstraints(r,o,i){var a,c,u,p;if(!i){let i=Math.max(this.minSize.width,r),u=Math.max(this.minSize.height,o);return(null==(a=this.maxSize)?void 0:a.width)&&(i=Math.min(this.maxSize.width,i)),(null==(c=this.maxSize)?void 0:c.height)&&(u=Math.min(this.maxSize.height,u)),{width:i,height:u}}let g=r,v=o;return g<this.minSize.width&&(g=this.minSize.width,v=g/this.aspectRatio),v<this.minSize.height&&(v=this.minSize.height,g=v*this.aspectRatio),(null==(u=this.maxSize)?void 0:u.width)&&g>this.maxSize.width&&(g=this.maxSize.width,v=g/this.aspectRatio),(null==(p=this.maxSize)?void 0:p.height)&&v>this.maxSize.height&&(v=this.maxSize.height,g=v*this.aspectRatio),{width:g,height:v}}applyAspectRatio(r,o,i){const a="top"===i||"bottom"===i;return"left"===i||"right"===i?{width:r,height:r/this.aspectRatio}:a?{width:o*this.aspectRatio,height:o}:{width:r,height:r/this.aspectRatio}}},lt=st,ct=i(49162);function canInsertNode(r,o){const{selection:i}=r,{$from:a}=i;if(i instanceof ct.NodeSelection){const r=a.index();return a.parent.canReplaceWith(r,r+1,o)}let c=a.depth;for(;c>=0;){const r=a.index(c);if(a.node(c).contentMatchAt(r).matchType(o))return!0;c-=1}return!1}function escapeForRegEx(r){return r.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function isFirefox(){return"undefined"!=typeof navigator&&/Firefox/.test(navigator.userAgent)}function isString(r){return"string"==typeof r}var ut={};function parseAttributes(r){if(!(null==r?void 0:r.trim()))return{};const o={},i=[],a=r.replace(/["']([^"']*)["']/g,r=>(i.push(r),`__QUOTED_${i.length-1}__`)),c=a.match(/(?:^|\s)\.([a-zA-Z][\w-]*)/g);if(c){const r=c.map(r=>r.trim().slice(1));o.class=r.join(" ")}const u=a.match(/(?:^|\s)#([a-zA-Z][\w-]*)/);u&&(o.id=u[1]);Array.from(a.matchAll(/([a-zA-Z][\w-]*)\s*=\s*(__QUOTED_\d+__)/g)).forEach(([,r,a])=>{var c;const u=parseInt((null==(c=a.match(/__QUOTED_(\d+)__/))?void 0:c[1])||"0",10),p=i[u];p&&(o[r]=p.slice(1,-1))});const p=a.replace(/(?:^|\s)\.([a-zA-Z][\w-]*)/g,"").replace(/(?:^|\s)#([a-zA-Z][\w-]*)/g,"").replace(/([a-zA-Z][\w-]*)\s*=\s*__QUOTED_\d+__/g,"").trim();if(p){p.split(/\s+/).filter(Boolean).forEach(r=>{r.match(/^[a-zA-Z][\w-]*$/)&&(o[r]=!0)})}return o}function serializeAttributes(r){if(!r||0===Object.keys(r).length)return"";const o=[];if(r.class){String(r.class).split(/\s+/).filter(Boolean).forEach(r=>o.push(`.${r}`))}return r.id&&o.push(`#${r.id}`),Object.entries(r).forEach(([r,i])=>{"class"!==r&&"id"!==r&&(!0===i?o.push(r):!1!==i&&null!=i&&o.push(`${r}="${String(i)}"`))}),o.join(" ")}function createAtomBlockMarkdownSpec(r){const{nodeName:o,name:i,parseAttributes:a=parseAttributes,serializeAttributes:c=serializeAttributes,defaultAttributes:u={},requiredAttributes:p=[],allowedAttributes:g}=r,v=i||o;return{parseMarkdown:(r,i)=>{const a={...u,...r.attributes};return i.createNode(o,a,[])},markdownTokenizer:{name:o,level:"block",start(r){var o;const i=new RegExp(`^:::${v}(?:\\s|$)`,"m"),a=null==(o=r.match(i))?void 0:o.index;return void 0!==a?a:-1},tokenize(r,i,c){const u=new RegExp(`^:::${v}(?:\\s+\\{([^}]*)\\})?\\s*:::(?:\\n|$)`),g=r.match(u);if(!g)return;const b=g[1]||"",k=a(b);return p.find(r=>!(r in k))?void 0:{type:o,raw:g[0],attributes:k}}},renderMarkdown:r=>{const o=(r=>{if(!g)return r;const o={};return g.forEach(i=>{i in r&&(o[i]=r[i])}),o})(r.attrs||{}),i=c(o);return`:::${v}${i?` {${i}}`:""} :::`}}}function createBlockMarkdownSpec(r){const{nodeName:o,name:i,getContent:a,parseAttributes:c=parseAttributes,serializeAttributes:u=serializeAttributes,defaultAttributes:p={},content:g="block",allowedAttributes:v}=r,b=i||o;return{parseMarkdown:(r,i)=>{let c;if(a){const o=a(r);c="string"==typeof o?[{type:"text",text:o}]:o}else c="block"===g?i.parseChildren(r.tokens||[]):i.parseInline(r.tokens||[]);const u={...p,...r.attributes};return i.createNode(o,u,c)},markdownTokenizer:{name:o,level:"block",start(r){var o;const i=new RegExp(`^:::${b}`,"m"),a=null==(o=r.match(i))?void 0:o.index;return void 0!==a?a:-1},tokenize(r,i,a){var u;const p=new RegExp(`^:::${b}(?:\\s+\\{([^}]*)\\})?\\s*\\n`),v=r.match(p);if(!v)return;const[k,E=""]=v,w=c(E);let x=1;const C=k.length;let _="";const T=/^:::([\w-]*)(\s.*)?/gm,P=r.slice(C);for(T.lastIndex=0;;){const i=T.exec(P);if(null===i)break;const c=i.index,p=i[1];if(!(null==(u=i[2])?void 0:u.endsWith(":::")))if(p)x+=1;else if(x-=1,0===x){const u=P.slice(0,c);_=u.trim();const p=r.slice(0,C+c+i[0].length);let v=[];if(_)if("block"===g)for(v=a.blockTokens(u),v.forEach(r=>{!r.text||r.tokens&&0!==r.tokens.length||(r.tokens=a.inlineTokens(r.text))});v.length>0;){const r=v[v.length-1];if("paragraph"!==r.type||r.text&&""!==r.text.trim())break;v.pop()}else v=a.inlineTokens(_);return{type:o,raw:p,attributes:w,content:_,tokens:v}}}}},renderMarkdown:(r,o)=>{const i=(r=>{if(!v)return r;const o={};return v.forEach(i=>{i in r&&(o[i]=r[i])}),o})(r.attrs||{}),a=u(i),c=a?` {${a}}`:"",p=o.renderChildren(r.content||[],"\n\n");return`:::${b}${c}\n\n${p}\n\n:::`}}}function parseShortcodeAttributes(r){if(!r.trim())return{};const o={},i=/(\w+)=(?:"([^"]*)"|'([^']*)')/g;let a=i.exec(r);for(;null!==a;){const[,c,u,p]=a;o[c]=u||p,a=i.exec(r)}return o}function serializeShortcodeAttributes(r){return Object.entries(r).filter(([,r])=>null!=r).map(([r,o])=>`${r}="${o}"`).join(" ")}function createInlineMarkdownSpec(r){const{nodeName:o,name:i,getContent:a,parseAttributes:c=parseShortcodeAttributes,serializeAttributes:u=serializeShortcodeAttributes,defaultAttributes:p={},selfClosing:g=!1,allowedAttributes:v}=r,b=i||o,k=b.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return{parseMarkdown:(r,i)=>{const c={...p,...r.attributes};if(g)return i.createNode(o,c);const u=a?a(r):r.content||"";return u?i.createNode(o,c,[i.createTextNode(u)]):i.createNode(o,c,[])},markdownTokenizer:{name:o,level:"inline",start(r){const o=g?new RegExp(`\\[${k}\\s*[^\\]]*\\]`):new RegExp(`\\[${k}\\s*[^\\]]*\\][\\s\\S]*?\\[\\/${k}\\]`),i=r.match(o),a=null==i?void 0:i.index;return void 0!==a?a:-1},tokenize(r,i,a){const u=g?new RegExp(`^\\[${k}\\s*([^\\]]*)\\]`):new RegExp(`^\\[${k}\\s*([^\\]]*)\\]([\\s\\S]*?)\\[\\/${k}\\]`),p=r.match(u);if(!p)return;let v="",b="";if(g){const[,r]=p;b=r}else{const[,r,o]=p;b=r,v=o||""}const E=c(b.trim());return{type:o,raw:p[0],content:v.trim(),attributes:E}}},renderMarkdown:r=>{let o="";a?o=a(r):r.content&&r.content.length>0&&(o=r.content.filter(r=>"text"===r.type).map(r=>r.text).join(""));const i=(r=>{if(!v)return r;const o={};return v.forEach(i=>{const a="string"==typeof i?i:i.name,c="string"==typeof i?void 0:i.skipIfDefault;if(a in r){const i=r[a];if(void 0!==c&&i===c)return;o[a]=i}}),o})(r.attrs||{}),c=u(i),p=c?` ${c}`:"";return g?`[${b}${p}]`:`[${b}${p}]${o}[/${b}]`}}}function parseIndentedBlocks(r,o,i){var a,c,u,p;const g=r.split("\n"),v=[];let b="",k=0;const E=o.baseIndentSize||2;for(;k<g.length;){const r=g[k],w=r.match(o.itemPattern);if(!w){if(v.length>0)break;if(""===r.trim()){k+=1,b=`${b}${r}\n`;continue}return}const x=o.extractItemData(w),{indentLevel:C,mainContent:_}=x;b=`${b}${r}\n`;const T=[_];for(k+=1;k<g.length;){const r=g[k];if(""===r.trim()){const o=g.slice(k+1).findIndex(r=>""!==r.trim());if(-1===o)break;if(((null==(c=null==(a=g[k+1+o].match(/^(\s*)/))?void 0:a[1])?void 0:c.length)||0)>C){T.push(r),b=`${b}${r}\n`,k+=1;continue}break}if(!(((null==(p=null==(u=r.match(/^(\s*)/))?void 0:u[1])?void 0:p.length)||0)>C))break;T.push(r),b=`${b}${r}\n`,k+=1}let P;const A=T.slice(1);if(A.length>0){const r=A.map(r=>r.slice(C+E)).join("\n");r.trim()&&(P=o.customNestedParser?o.customNestedParser(r):i.blockTokens(r))}const N=o.createToken(x,P);v.push(N)}if(0!==v.length)return{items:v,raw:b}}function renderNestedMarkdownContent(r,o,i,a){if(!r||!Array.isArray(r.content))return"";const c="function"==typeof i?i(a):i,[u,...p]=r.content,g=[`${c}${o.renderChildren([u])}`];return p&&p.length>0&&p.forEach(r=>{const i=o.renderChildren([r]);if(i){const r=i.split("\n").map(r=>r?o.indent(r):"").join("\n");g.push(r)}}),g.join("\n")}function updateMarkViewAttributes(r,o,i={}){const{state:a}=o,{doc:c,tr:u}=a,p=r;c.descendants((o,a)=>{const c=u.mapping.map(a),g=u.mapping.map(a)+o.nodeSize;let v=null;if(o.marks.forEach(r=>{if(r!==p)return!1;v=r}),!v)return;let b=!1;if(Object.keys(i).forEach(r=>{i[r]!==v.attrs[r]&&(b=!0)}),b){const o=r.type.create({...r.attrs,...i});u.removeMark(c,g,r.type),u.addMark(c,g,o)}}),u.docChanged&&o.view.dispatch(u)}__export(ut,{createAtomBlockMarkdownSpec:()=>createAtomBlockMarkdownSpec,createBlockMarkdownSpec:()=>createBlockMarkdownSpec,createInlineMarkdownSpec:()=>createInlineMarkdownSpec,parseAttributes:()=>parseAttributes,parseIndentedBlocks:()=>parseIndentedBlocks,renderNestedMarkdownContent:()=>renderNestedMarkdownContent,serializeAttributes:()=>serializeAttributes});var pt=class{constructor(r,o,i){this.component=r,this.editor=o.editor,this.options={...i},this.mark=o.mark,this.HTMLAttributes=o.HTMLAttributes}get dom(){return this.editor.view.dom}get contentDOM(){return null}updateAttributes(r,o){updateMarkViewAttributes(o||this.mark,this.editor,r)}ignoreMutation(r){if(!this.dom||!this.contentDOM)return!0;if("function"==typeof this.options.ignoreMutation)return this.options.ignoreMutation({mutation:r});if("selection"===r.type)return!1;if(this.dom.contains(r.target)&&"childList"===r.type&&(isiOS()||isAndroid())&&this.editor.isFocused){if([...Array.from(r.addedNodes),...Array.from(r.removedNodes)].every(r=>r.isContentEditable))return!1}return this.contentDOM===r.target&&"attributes"===r.type||!this.contentDOM.contains(r.target)}},dt=class _Node extends Oe{constructor(){super(...arguments),this.type="node"}static create(r={}){const o="function"==typeof r?r():r;return new _Node(o)}configure(r){return super.configure(r)}extend(r){const o="function"==typeof r?r():r;return super.extend(o)}},ft=i(49162),ht=class{constructor(r,o,i){this.isDragging=!1,this.component=r,this.editor=o.editor,this.options={stopEvent:null,ignoreMutation:null,...i},this.extension=o.extension,this.node=o.node,this.decorations=o.decorations,this.innerDecorations=o.innerDecorations,this.view=o.view,this.HTMLAttributes=o.HTMLAttributes,this.getPos=o.getPos,this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(r){var o,i,a,c,u,p,g;const{view:v}=this.editor,b=r.target,k=3===b.nodeType?null==(o=b.parentElement)?void 0:o.closest("[data-drag-handle]"):b.closest("[data-drag-handle]");if(!this.dom||(null==(i=this.contentDOM)?void 0:i.contains(b))||!k)return;let E=0,w=0;if(this.dom!==k){const o=this.dom.getBoundingClientRect(),i=k.getBoundingClientRect(),g=null!=(c=r.offsetX)?c:null==(a=r.nativeEvent)?void 0:a.offsetX,v=null!=(p=r.offsetY)?p:null==(u=r.nativeEvent)?void 0:u.offsetY;E=i.x-o.x+g,w=i.y-o.y+v}const x=this.dom.cloneNode(!0);try{const r=this.dom.getBoundingClientRect();x.style.width=`${Math.round(r.width)}px`,x.style.height=`${Math.round(r.height)}px`,x.style.boxSizing="border-box",x.style.pointerEvents="none"}catch{}let C=null;try{C=document.createElement("div"),C.style.position="absolute",C.style.top="-9999px",C.style.left="-9999px",C.style.pointerEvents="none",C.appendChild(x),document.body.appendChild(C),null==(g=r.dataTransfer)||g.setDragImage(x,E,w)}finally{C&&setTimeout(()=>{try{null==C||C.remove()}catch{}},0)}const _=this.getPos();if("number"!=typeof _)return;const T=ft.NodeSelection.create(v.state.doc,_),P=v.state.tr.setSelection(T);v.dispatch(P)}stopEvent(r){var o;if(!this.dom)return!1;if("function"==typeof this.options.stopEvent)return this.options.stopEvent({event:r});const i=r.target;if(!(this.dom.contains(i)&&!(null==(o=this.contentDOM)?void 0:o.contains(i))))return!1;const a=r.type.startsWith("drag"),c="drop"===r.type;if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(i.tagName)||i.isContentEditable)&&!c&&!a)return!0;const{isEditable:u}=this.editor,{isDragging:p}=this,g=!!this.node.type.spec.draggable,v=ft.NodeSelection.isSelectable(this.node),b="copy"===r.type,k="paste"===r.type,E="cut"===r.type,w="mousedown"===r.type;if(!g&&v&&a&&r.target===this.dom&&r.preventDefault(),g&&a&&!p&&r.target===this.dom)return r.preventDefault(),!1;if(g&&u&&!p&&w){const r=i.closest("[data-drag-handle]");r&&(this.dom===r||this.dom.contains(r))&&(this.isDragging=!0,document.addEventListener("dragend",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("drop",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("mouseup",()=>{this.isDragging=!1},{once:!0}))}return!(p||c||b||k||E||w&&v)}ignoreMutation(r){if(!this.dom||!this.contentDOM)return!0;if("function"==typeof this.options.ignoreMutation)return this.options.ignoreMutation({mutation:r});if(this.node.isLeaf||this.node.isAtom)return!0;if("selection"===r.type)return!1;if(this.dom.contains(r.target)&&"childList"===r.type&&(isiOS()||isAndroid())&&this.editor.isFocused){if([...Array.from(r.addedNodes),...Array.from(r.removedNodes)].every(r=>r.isContentEditable))return!1}return this.contentDOM===r.target&&"attributes"===r.type||!this.contentDOM.contains(r.target)}updateAttributes(r){this.editor.commands.command(({tr:o})=>{const i=this.getPos();return"number"==typeof i&&(o.setNodeMarkup(i,void 0,{...this.node.attrs,...r}),!0)})}deleteNode(){const r=this.getPos();if("number"!=typeof r)return;const o=r+this.node.nodeSize;this.editor.commands.deleteRange({from:r,to:o})}};function markPasteRule(r){return new Ne({find:r.find,handler:({state:o,range:i,match:a,pasteEvent:c})=>{const u=callOrReturn(r.getAttributes,void 0,a,c);if(!1===u||null===u)return null;const{tr:p}=o,g=a[a.length-1],v=a[0];let b=i.to;if(g){const a=v.search(/\S/),c=i.from+v.indexOf(g),k=c+g.length;if(getMarksBetween(i.from,i.to,o.doc).filter(o=>o.mark.type.excluded.find(i=>i===r.type&&i!==o.mark.type)).filter(r=>r.to>c).length)return null;k<i.to&&p.delete(k,i.to),c>i.from&&p.delete(i.from+a,c),b=i.from+a+g.length,p.addMark(i.from+a,b,r.type.create(u||{})),p.removeStoredMark(r.type)}}})}function nodePasteRule(r){return new Ne({find:r.find,handler({match:o,chain:i,range:a,pasteEvent:c}){const u=callOrReturn(r.getAttributes,void 0,o,c),p=callOrReturn(r.getContent,void 0,u);if(!1===u||null===u)return null;const g={type:r.type.name,attrs:u};p&&(g.content=p),o.input&&i().deleteRange(a).insertContentAt(a.from,g)}})}function textPasteRule(r){return new Ne({find:r.find,handler:({state:o,range:i,match:a})=>{let c=r.replace,u=i.from;const p=i.to;if(a[1]){const r=a[0].lastIndexOf(a[1]);c+=a[0].slice(r+a[1].length),u+=r;const o=u-p;o>0&&(c=a[0].slice(r-o,r)+c,u=p)}o.tr.insertText(c,u,p)}})}var mt=class{constructor(r){this.transaction=r,this.currentStep=this.transaction.steps.length}map(r){let o=!1;return{position:this.transaction.steps.slice(this.currentStep).reduce((r,i)=>{const a=i.getMap().mapResult(r);return a.deleted&&(o=!0),a.pos},r),deleted:o}}}}},o={};function __webpack_require__(i){var a=o[i];if(void 0!==a)return a.exports;var c=o[i]={exports:{}};return r[i].call(c.exports,c,c.exports,__webpack_require__),c.exports}__webpack_require__.n=function(r){var o=r&&r.__esModule?function(){return r.default}:function(){return r};return __webpack_require__.d(o,{a:o}),o},__webpack_require__.d=function(r,o){for(var i in o)__webpack_require__.o(o,i)&&!__webpack_require__.o(r,i)&&Object.defineProperty(r,i,{enumerable:!0,get:o[i]})},__webpack_require__.o=function(r,o){return Object.prototype.hasOwnProperty.call(r,o)},__webpack_require__.r=function(r){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})};var i=__webpack_require__(40002);(window.elementorV2=window.elementorV2||{}).editorControls=i}(),window.elementorV2.editorControls?.init?.();
dvadf
dvadf
| ver. 1.4 |
Github
|
.
| PHP 7.3.33 | Generation time: 0.19 |
proxy
|
phpinfo
|
Settings