officialblock 3.3.4 → 3.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index-BDffRzko.js +52 -0
- package/dist/index-CJhRbOWX.js +533 -0
- package/dist/{index-DrhgRSuK.mjs → index-CtMZFnwU.mjs} +3846 -3654
- package/dist/{index-Blb9iWCl.mjs → index-D7YTIkxy.mjs} +13041 -13042
- package/dist/official-block.cjs.js +1 -1
- package/dist/official-block.es.js +7 -7
- package/dist/official-block.umd.js +108 -112
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/index-BV9rjUEM.js +0 -52
- package/dist/index-D3106Kcf.js +0 -537
package/dist/index-BV9rjUEM.js
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";var k0=Object.defineProperty;var T0=(e,t,r)=>t in e?k0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var ur=(e,t,r)=>T0(e,typeof t!="symbol"?t+"":t,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const pe=require("vue"),Ac=require("@wangeditor/editor-for-vue"),Ze=require("@wangeditor/editor"),fe=require("./index-D3106Kcf.js");function Bc(e){return e!==null&&typeof e=="object"&&"constructor"in e&&e.constructor===Object}function rl(e,t){e===void 0&&(e={}),t===void 0&&(t={}),Object.keys(t).forEach(function(r){typeof e[r]>"u"?e[r]=t[r]:Bc(t[r])&&Bc(e[r])&&Object.keys(t[r]).length>0&&rl(e[r],t[r])})}var Gh={body:{},addEventListener:function(){},removeEventListener:function(){},activeElement:{blur:function(){},nodeName:""},querySelector:function(){return null},querySelectorAll:function(){return[]},getElementById:function(){return null},createEvent:function(){return{initEvent:function(){}}},createElement:function(){return{children:[],childNodes:[],style:{},setAttribute:function(){},getElementsByTagName:function(){return[]}}},createElementNS:function(){return{}},importNode:function(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function ha(){var e=typeof document<"u"?document:{};return rl(e,Gh),e}var j0={document:Gh,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState:function(){},pushState:function(){},go:function(){},back:function(){}},CustomEvent:function(){return this},addEventListener:function(){},removeEventListener:function(){},getComputedStyle:function(){return{getPropertyValue:function(){return""}}},Image:function(){},Date:function(){},screen:{},setTimeout:function(){},clearTimeout:function(){},matchMedia:function(){return{}},requestAnimationFrame:function(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame:function(e){typeof setTimeout>"u"||clearTimeout(e)}};function Mr(){var e=typeof window<"u"?window:{};return rl(e,j0),e}function R0(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function ns(e){return ns=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},ns(e)}function _o(e,t){return _o=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},_o(e,t)}function N0(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function Eo(e,t,r){return N0()?Eo=Reflect.construct:Eo=function(i,o,a){var u=[null];u.push.apply(u,o);var s=Function.bind.apply(i,u),l=new s;return a&&_o(l,a.prototype),l},Eo.apply(null,arguments)}function $0(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function is(e){var t=typeof Map=="function"?new Map:void 0;return is=function(n){if(n===null||!$0(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(n))return t.get(n);t.set(n,i)}function i(){return Eo(n,arguments,ns(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),_o(i,n)},is(e)}function L0(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function M0(e){var t=e.__proto__;Object.defineProperty(e,"__proto__",{get:function(){return t},set:function(n){t.__proto__=n}})}var Br=function(e){R0(t,e);function t(r){var n;return n=e.call.apply(e,[this].concat(r))||this,M0(L0(n)),n}return t}(is(Array));function pa(e){e===void 0&&(e=[]);var t=[];return e.forEach(function(r){Array.isArray(r)?t.push.apply(t,pa(r)):t.push(r)}),t}function I0(e,t){return Array.prototype.filter.call(e,t)}function U0(e){for(var t=[],r=0;r<e.length;r+=1)t.indexOf(e[r])===-1&&t.push(e[r]);return t}function H0(e){return e.toLowerCase().replace(/-(.)/g,function(t,r){return r.toUpperCase()})}function z0(e,t){if(typeof e!="string")return[e];for(var r=[],n=t.querySelectorAll(e),i=0;i<n.length;i+=1)r.push(n[i]);return r}function j(e,t){var r=Mr(),n=ha(),i=[];if(!t&&e instanceof Br)return e;if(!e)return new Br(i);if(typeof e=="string"){var o=e.trim();if(o.indexOf("<")>=0&&o.indexOf(">")>=0){var a="div";o.indexOf("<li")===0&&(a="ul"),o.indexOf("<tr")===0&&(a="tbody"),(o.indexOf("<td")===0||o.indexOf("<th")===0)&&(a="tr"),o.indexOf("<tbody")===0&&(a="table"),o.indexOf("<option")===0&&(a="select");var u=n.createElement(a);u.innerHTML=o;for(var s=0;s<u.childNodes.length;s+=1)i.push(u.childNodes[s])}else i=z0(e.trim(),t||n)}else if(e.nodeType||e===r||e===n)i.push(e);else if(Array.isArray(e)){if(e instanceof Br)return e;i=e}return new Br(U0(i))}j.fn=Br.prototype;function Po(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=pa(t.map(function(i){return i.split(" ")}));return this.forEach(function(i){var o;(o=i.classList).add.apply(o,n)}),this}function ko(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=pa(t.map(function(i){return i.split(" ")}));return this.forEach(function(i){var o;(o=i.classList).remove.apply(o,n)}),this}function Fc(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=pa(t.map(function(i){return i.split(" ")}));return I0(this,function(i){return n.filter(function(o){return i.classList.contains(o)}).length>0}).length>0}function To(e,t){if(arguments.length===1&&typeof e=="string")return this[0]?this[0].getAttribute(e):void 0;for(var r=0;r<this.length;r+=1)if(arguments.length===2)this[r].setAttribute(e,t);else for(var n in e)this[r][n]=e[n],this[r].setAttribute(n,e[n]);return this}function xc(e){for(var t=0;t<this.length;t+=1)this[t].removeAttribute(e);return this}function jo(){var e=this[0];if(e){var t={};if(e.dataset)for(var r in e.dataset)t[r]=e.dataset[r];else for(var n=0;n<e.attributes.length;n+=1){var i=e.attributes[n];i.name.indexOf("data-")>=0&&(t[H0(i.name.split("data-")[1])]=i.value)}for(var o in t)t[o]==="false"?t[o]=!1:t[o]==="true"?t[o]=!0:parseFloat(t[o])===t[o]*1&&(t[o]*=1);return t}}function Ro(e){if(typeof e>"u"){var t=this[0];if(!t)return;if(t.multiple&&t.nodeName.toLowerCase()==="select"){for(var r=[],n=0;n<t.selectedOptions.length;n+=1)r.push(t.selectedOptions[n].value);return r}return t.value}for(var i=0;i<this.length;i+=1){var o=this[i];if(Array.isArray(e)&&o.multiple&&o.nodeName.toLowerCase()==="select")for(var a=0;a<o.options.length;a+=1)o.options[a].selected=e.indexOf(o.options[a].value)>=0;else o.value=e}return this}function No(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=t[0],i=t[1],o=t[2],a=t[3];typeof t[1]=="function"&&(n=t[0],o=t[1],a=t[2],i=void 0),a||(a=!1);function u(g){var v=g.target;if(v){var D=g.target.dom7EventData||[];if(D.indexOf(g)<0&&D.unshift(g),j(v).is(i))o.apply(v,D);else for(var C=j(v).parents(),b=0;b<C.length;b+=1)j(C[b]).is(i)&&o.apply(C[b],D)}}function s(g){var v=g&&g.target?g.target.dom7EventData||[]:[];v.indexOf(g)<0&&v.unshift(g),o.apply(this,v)}for(var l=n.split(" "),f,c=0;c<this.length;c+=1){var d=this[c];if(i)for(f=0;f<l.length;f+=1){var h=l[f];d.dom7LiveListeners||(d.dom7LiveListeners={}),d.dom7LiveListeners[h]||(d.dom7LiveListeners[h]=[]),d.dom7LiveListeners[h].push({listener:o,proxyListener:u}),d.addEventListener(h,u,a)}else for(f=0;f<l.length;f+=1){var p=l[f];d.dom7Listeners||(d.dom7Listeners={}),d.dom7Listeners[p]||(d.dom7Listeners[p]=[]),d.dom7Listeners[p].push({listener:o,proxyListener:s}),d.addEventListener(p,s,a)}}return this}function Oc(){var e=Mr();return this[0]===e?e.innerWidth:this.length>0?parseFloat(this.css("width")):null}function Sc(){var e=Mr();return this[0]===e?e.innerHeight:this.length>0?parseFloat(this.css("height")):null}function _c(){if(this.length>0){var e=Mr(),t=ha(),r=this[0],n=r.getBoundingClientRect(),i=t.body,o=r.clientTop||i.clientTop||0,a=r.clientLeft||i.clientLeft||0,u=r===e?e.scrollY:r.scrollTop,s=r===e?e.scrollX:r.scrollLeft;return{top:n.top+u-o,left:n.left+s-a}}return null}function Pc(){for(var e=0;e<this.length;e+=1)this[e].style.display="none";return this}function kc(){for(var e=Mr(),t=0;t<this.length;t+=1){var r=this[t];r.style.display==="none"&&(r.style.display=""),e.getComputedStyle(r,null).getPropertyValue("display")==="none"&&(r.style.display="block")}return this}function Tc(e,t){var r=Mr(),n;if(arguments.length===1)if(typeof e=="string"){if(this[0])return r.getComputedStyle(this[0],null).getPropertyValue(e)}else{for(n=0;n<this.length;n+=1)for(var i in e)this[n].style[i]=e[i];return this}if(arguments.length===2&&typeof e=="string"){for(n=0;n<this.length;n+=1)this[n].style[e]=t;return this}return this}function $o(e){return e?(this.forEach(function(t,r){e.apply(t,[t,r])}),this):this}function Lo(e){if(typeof e>"u")return this[0]?this[0].innerHTML:null;for(var t=0;t<this.length;t+=1)this[t].innerHTML=e;return this}function jc(e){if(typeof e>"u")return this[0]?this[0].textContent.trim():null;for(var t=0;t<this.length;t+=1)this[t].textContent=e;return this}function Rc(e){var t=Mr(),r=ha(),n=this[0],i,o;if(!n||typeof e>"u")return!1;if(typeof e=="string"){if(n.matches)return n.matches(e);if(n.webkitMatchesSelector)return n.webkitMatchesSelector(e);if(n.msMatchesSelector)return n.msMatchesSelector(e);for(i=j(e),o=0;o<i.length;o+=1)if(i[o]===n)return!0;return!1}if(e===r)return n===r;if(e===t)return n===t;if(e.nodeType||e instanceof Br){for(i=e.nodeType?[e]:e,o=0;o<i.length;o+=1)if(i[o]===n)return!0;return!1}return!1}function Mo(){for(var e,t=ha(),r=0;r<arguments.length;r+=1){e=r<0||arguments.length<=r?void 0:arguments[r];for(var n=0;n<this.length;n+=1)if(typeof e=="string"){var i=t.createElement("div");for(i.innerHTML=e;i.firstChild;)this[n].appendChild(i.firstChild)}else if(e instanceof Br)for(var o=0;o<e.length;o+=1)this[n].appendChild(e[o]);else this[n].appendChild(e)}return this}function Nc(e){for(var t=[],r=0;r<this.length;r+=1)this[r].parentNode!==null&&(e?j(this[r].parentNode).is(e)&&t.push(this[r].parentNode):t.push(this[r].parentNode));return j(t)}function $c(e){for(var t=[],r=0;r<this.length;r+=1)for(var n=this[r].parentNode;n;)e?j(n).is(e)&&t.push(n):t.push(n),n=n.parentNode;return j(t)}function Io(e){for(var t=[],r=0;r<this.length;r+=1)for(var n=this[r].querySelectorAll(e),i=0;i<n.length;i+=1)t.push(n[i]);return j(t)}function Uo(e){for(var t=[],r=0;r<this.length;r+=1)for(var n=this[r].children,i=0;i<n.length;i+=1)(!e||j(n[i]).is(e))&&t.push(n[i]);return j(t)}function Lc(){for(var e=0;e<this.length;e+=1)this[e].parentNode&&this[e].parentNode.removeChild(this[e]);return this}function Mc(){for(var e=0;e<this.length;e+=1){var t=this[e];if(t.nodeType===1){for(var r=0;r<t.childNodes.length;r+=1)t.childNodes[r].parentNode&&t.childNodes[r].parentNode.removeChild(t.childNodes[r]);t.textContent=""}}return this}var W0="resize scroll".split(" ");function q0(e){function t(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];if(typeof n[0]>"u"){for(var o=0;o<this.length;o+=1)W0.indexOf(e)<0&&(e in this[o]?this[o][e]():j(this[o]).trigger(e));return this}return this.on.apply(this,[e].concat(n))}return t}var Ho=q0("focus");Mo&&(j.fn.append=Mo);No&&(j.fn.on=No);Ho&&(j.fn.focus=Ho);To&&(j.fn.attr=To);Ro&&(j.fn.val=Ro);Lo&&(j.fn.html=Lo);jo&&(j.fn.dataset=jo);Po&&(j.fn.addClass=Po);ko&&(j.fn.removeClass=ko);Uo&&(j.fn.children=Uo);$o&&(j.fn.each=$o);Io&&(j.fn.find=Io);function Jh(e){return e.length?e[0].tagName.toLowerCase():""}function Xh(e,t){let r="";const i=(e.attr("style")||"").split(";"),o=i.length;for(let a=0;a<o;a++){const u=i[a];if(u){const s=u.split(":");s[0].trim()===t&&(r=s[1].trim())}}return r}const V0=new Set(["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","DIV","DL","FIELDSET","FIGURE","FOOTER","H1","H2","H3","H4","H5","H6","HEADER","LI","MAIN","OL","P","PRE","SECTION","UL"]);function Ic(e,t){var n;let r=(e==null?void 0:e[t])||null;for(;r;){if(r.nodeType===Node.ELEMENT_NODE||r.nodeType===Node.TEXT_NODE&&((n=r.textContent)!=null&&n.trim()))return!0;r=r[t]}return!1}function Uc(e){return e instanceof HTMLElement&&e.tagName==="BR"}function K0(e){Array.from(e.children).filter(r=>V0.has(r.tagName)).forEach(r=>{const n=r.nextSibling,i=Ic(r,"previousSibling"),o=Ic(r,"nextSibling");for(i&&!Uc(r.previousSibling)&&e.insertBefore(document.createElement("br"),r);r.firstChild;)e.insertBefore(r.firstChild,r);r.remove();const a=(n==null?void 0:n.previousSibling)||e.lastChild;o&&!Uc(a)&&e.insertBefore(document.createElement("br"),n)})}function G0(e){const t=j(e);if(Jh(t)!=="table")return e;const n=t[0];return Array.from(n.children).forEach(i=>{["THEAD","TBODY","TFOOT"].includes(i.tagName)&&(Array.from(i.children).forEach(o=>{o.tagName==="TR"&&n.insertBefore(o,i)}),i.remove())}),n.querySelectorAll("td, th").forEach(i=>K0(i)),n}const J0={selector:"table",preParseHtml:G0};/*!
|
|
2
|
-
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
|
3
|
-
*
|
|
4
|
-
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
5
|
-
* Released under the MIT License.
|
|
6
|
-
*/function Hc(e){return Object.prototype.toString.call(e)==="[object Object]"}function Te(e){var t,r;return Hc(e)===!1?!1:(t=e.constructor,t===void 0?!0:(r=t.prototype,!(Hc(r)===!1||r.hasOwnProperty("isPrototypeOf")===!1)))}function Pe(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];if(process.env.NODE_ENV!=="production"){var i=nm[e],o=i?typeof i=="function"?i.apply(null,r):i:"unknown error nr: "+e;throw Error("[Immer] "+o)}throw Error("[Immer] minified error nr: "+e+(r.length?" "+r.map(function(a){return"'"+a+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function kr(e){return!!e&&!!e[Je]}function Tr(e){var t;return!!e&&(function(r){if(!r||typeof r!="object")return!1;var n=Object.getPrototypeOf(r);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===im}(e)||Array.isArray(e)||!!e[Xc]||!!(!((t=e.constructor)===null||t===void 0)&&t[Xc])||nl(e)||il(e))}function Bi(e,t,r){r===void 0&&(r=!1),Fn(e)===0?(r?Object.keys:ll)(e).forEach(function(n){r&&typeof n=="symbol"||t(n,e[n],e)}):e.forEach(function(n,i){return t(i,n,e)})}function Fn(e){var t=e[Je];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:nl(e)?2:il(e)?3:0}function os(e,t){return Fn(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function X0(e,t){return Fn(e)===2?e.get(t):e[t]}function Yh(e,t,r){var n=Fn(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function Y0(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function nl(e){return tm&&e instanceof Map}function il(e){return rm&&e instanceof Set}function yr(e){return e.o||e.t}function ol(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=om(e);delete t[Je];for(var r=ll(t),n=0;n<r.length;n++){var i=r[n],o=t[i];o.writable===!1&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(t[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[i]})}return Object.create(Object.getPrototypeOf(e),t)}function al(e,t){return t===void 0&&(t=!1),ul(e)||kr(e)||!Tr(e)||(Fn(e)>1&&(e.set=e.add=e.clear=e.delete=Z0),Object.freeze(e),t&&Bi(e,function(r,n){return al(n,!0)},!0)),e}function Z0(){Pe(2)}function ul(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function pt(e){var t=am[e];return t||Pe(18,e),t}function zc(){return process.env.NODE_ENV==="production"||gn||Pe(0),gn}function Ya(e,t){t&&(pt("Patches"),e.u=[],e.s=[],e.v=t)}function zo(e){as(e),e.p.forEach(Q0),e.p=null}function as(e){e===gn&&(gn=e.l)}function Wc(e){return gn={p:[],l:gn,h:e,m:!0,_:0}}function Q0(e){var t=e[Je];t.i===0||t.i===1?t.j():t.g=!0}function Za(e,t){t._=t.p.length;var r=t.p[0],n=e!==void 0&&e!==r;return t.h.O||pt("ES5").S(t,e,n),n?(r[Je].P&&(zo(t),Pe(4)),Tr(e)&&(e=Wo(t,e),t.l||qo(t,e)),t.u&&pt("Patches").M(r[Je].t,e,t.u,t.s)):e=Wo(t,r,[]),zo(t),t.u&&t.v(t.u,t.s),e!==Zh?e:void 0}function Wo(e,t,r){if(ul(t))return t;var n=t[Je];if(!n)return Bi(t,function(u,s){return qc(e,n,t,u,s,r)},!0),t;if(n.A!==e)return t;if(!n.P)return qo(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=ol(n.k):n.o,o=i,a=!1;n.i===3&&(o=new Set(i),i.clear(),a=!0),Bi(o,function(u,s){return qc(e,n,i,u,s,r,a)}),qo(e,i,!1),r&&e.u&&pt("Patches").N(n,r,e.u,e.s)}return n.o}function qc(e,t,r,n,i,o,a){if(process.env.NODE_ENV!=="production"&&i===r&&Pe(5),kr(i)){var u=Wo(e,i,o&&t&&t.i!==3&&!os(t.R,n)?o.concat(n):void 0);if(Yh(r,n,u),!kr(u))return;e.m=!1}else a&&r.add(i);if(Tr(i)&&!ul(i)){if(!e.h.D&&e._<1)return;Wo(e,i),t&&t.A.l||qo(e,i)}}function qo(e,t,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&al(t,r)}function Qa(e,t){var r=e[Je];return(r?yr(r):e)[t]}function Vc(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Object.getPrototypeOf(r)}}function us(e){e.P||(e.P=!0,e.l&&us(e.l))}function eu(e){e.o||(e.o=ol(e.t))}function ss(e,t,r){var n=nl(t)?pt("MapSet").F(t,r):il(t)?pt("MapSet").T(t,r):e.O?function(i,o){var a=Array.isArray(i),u={i:a?1:0,A:o?o.A:zc(),P:!1,I:!1,R:{},l:o,t:i,k:null,o:null,j:null,C:!1},s=u,l=ls;a&&(s=[u],l=di);var f=Proxy.revocable(s,l),c=f.revoke,d=f.proxy;return u.k=d,u.j=c,d}(t,r):pt("ES5").J(t,r);return(r?r.A:zc()).p.push(n),n}function em(e){return kr(e)||Pe(22,e),function t(r){if(!Tr(r))return r;var n,i=r[Je],o=Fn(r);if(i){if(!i.P&&(i.i<4||!pt("ES5").K(i)))return i.t;i.I=!0,n=Kc(r,o),i.I=!1}else n=Kc(r,o);return Bi(n,function(a,u){i&&X0(i.t,a)===u||Yh(n,a,t(u))}),o===3?new Set(n):n}(e)}function Kc(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return ol(e)}var Gc,gn,sl=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",tm=typeof Map<"u",rm=typeof Set<"u",Jc=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Zh=sl?Symbol.for("immer-nothing"):((Gc={})["immer-nothing"]=!0,Gc),Xc=sl?Symbol.for("immer-draftable"):"__$immer_draftable",Je=sl?Symbol.for("immer-state"):"__$immer_state",nm={0:"Illegal state",1:"Immer drafts cannot have computed properties",2:"This object has been frozen and should not be mutated",3:function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},4:"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.",5:"Immer forbids circular references",6:"The first or second argument to `produce` must be a function",7:"The third argument to `produce` must be a function or undefined",8:"First argument to `createDraft` must be a plain object, an array, or an immerable object",9:"First argument to `finishDraft` must be a draft returned by `createDraft`",10:"The given draft is already finalized",11:"Object.defineProperty() cannot be used on an Immer draft",12:"Object.setPrototypeOf() cannot be used on an Immer draft",13:"Immer only supports deleting array indices",14:"Immer only supports setting array indices and the 'length' property",15:function(e){return"Cannot apply patch, path doesn't resolve: "+e},16:'Sets cannot have "replace" patches.',17:function(e){return"Unsupported patch operation: "+e},18:function(e){return"The plugin for '"+e+"' has not been loaded into Immer. To enable the plugin, import and call `enable"+e+"()` when initializing your application."},20:"Cannot use proxies if Proxy, Proxy.revocable or Reflect are not available",21:function(e){return"produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '"+e+"'"},22:function(e){return"'current' expects a draft, got: "+e},23:function(e){return"'original' expects a draft, got: "+e},24:"Patching reserved attributes like __proto__, prototype and constructor is not allowed"},im=""+Object.prototype.constructor,ll=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,om=Object.getOwnPropertyDescriptors||function(e){var t={};return ll(e).forEach(function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)}),t},am={},ls={get:function(e,t){if(t===Je)return e;var r=yr(e);if(!os(r,t))return function(i,o,a){var u,s=Vc(o,a);return s?"value"in s?s.value:(u=s.get)===null||u===void 0?void 0:u.call(i.k):void 0}(e,r,t);var n=r[t];return e.I||!Tr(n)?n:n===Qa(e.t,t)?(eu(e),e.o[t]=ss(e.A.h,n,e)):n},has:function(e,t){return t in yr(e)},ownKeys:function(e){return Reflect.ownKeys(yr(e))},set:function(e,t,r){var n=Vc(yr(e),t);if(n!=null&&n.set)return n.set.call(e.k,r),!0;if(!e.P){var i=Qa(yr(e),t),o=i==null?void 0:i[Je];if(o&&o.t===r)return e.o[t]=r,e.R[t]=!1,!0;if(Y0(r,i)&&(r!==void 0||os(e.t,t)))return!0;eu(e),us(e)}return e.o[t]===r&&(r!==void 0||t in e.o)||Number.isNaN(r)&&Number.isNaN(e.o[t])||(e.o[t]=r,e.R[t]=!0),!0},deleteProperty:function(e,t){return Qa(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,eu(e),us(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=yr(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty:function(){Pe(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Pe(12)}},di={};Bi(ls,function(e,t){di[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),di.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&Pe(13),di.set.call(this,e,t,void 0)},di.set=function(e,t,r){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&Pe(14),ls.set.call(this,e[0],t,r,e[0])};var um=function(){function e(r){var n=this;this.O=Jc,this.D=!0,this.produce=function(i,o,a){if(typeof i=="function"&&typeof o!="function"){var u=o;o=i;var s=n;return function(g){var v=this;g===void 0&&(g=u);for(var D=arguments.length,C=Array(D>1?D-1:0),b=1;b<D;b++)C[b-1]=arguments[b];return s.produce(g,function(B){var E;return(E=o).call.apply(E,[v,B].concat(C))})}}var l;if(typeof o!="function"&&Pe(6),a!==void 0&&typeof a!="function"&&Pe(7),Tr(i)){var f=Wc(n),c=ss(n,i,void 0),d=!0;try{l=o(c),d=!1}finally{d?zo(f):as(f)}return typeof Promise<"u"&&l instanceof Promise?l.then(function(g){return Ya(f,a),Za(g,f)},function(g){throw zo(f),g}):(Ya(f,a),Za(l,f))}if(!i||typeof i!="object"){if((l=o(i))===void 0&&(l=i),l===Zh&&(l=void 0),n.D&&al(l,!0),a){var p=[],h=[];pt("Patches").M(i,l,p,h),a(p,h)}return l}Pe(21,i)},this.produceWithPatches=function(i,o){if(typeof i=="function")return function(l){for(var f=arguments.length,c=Array(f>1?f-1:0),d=1;d<f;d++)c[d-1]=arguments[d];return n.produceWithPatches(l,function(p){return i.apply(void 0,[p].concat(c))})};var a,u,s=n.produce(i,o,function(l,f){a=l,u=f});return typeof Promise<"u"&&s instanceof Promise?s.then(function(l){return[l,a,u]}):[s,a,u]},typeof(r==null?void 0:r.useProxies)=="boolean"&&this.setUseProxies(r.useProxies),typeof(r==null?void 0:r.autoFreeze)=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var t=e.prototype;return t.createDraft=function(r){Tr(r)||Pe(8),kr(r)&&(r=em(r));var n=Wc(this),i=ss(this,r,void 0);return i[Je].C=!0,as(n),i},t.finishDraft=function(r,n){var i=r&&r[Je];process.env.NODE_ENV!=="production"&&(i&&i.C||Pe(9),i.I&&Pe(10));var o=i.A;return Ya(o,n),Za(void 0,o)},t.setAutoFreeze=function(r){this.D=r},t.setUseProxies=function(r){r&&!Jc&&Pe(20),this.O=r},t.applyPatches=function(r,n){var i;for(i=n.length-1;i>=0;i--){var o=n[i];if(o.path.length===0&&o.op==="replace"){r=o.value;break}}i>-1&&(n=n.slice(i+1));var a=pt("Patches").$;return kr(r)?a(r,n):this.produce(r,function(u){return a(u,n)})},e}(),Xe=new um,ga=Xe.produce;Xe.produceWithPatches.bind(Xe);Xe.setAutoFreeze.bind(Xe);Xe.setUseProxies.bind(Xe);Xe.applyPatches.bind(Xe);var Yc=Xe.createDraft.bind(Xe),Zc=Xe.finishDraft.bind(Xe);function Rt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Qc=new WeakMap,ef=new WeakMap,tf=new WeakMap,rf=new WeakMap,nf=new WeakMap,of=new WeakMap;function sm(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,o;for(o=0;o<n.length;o++)i=n[o],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function jt(e,t){if(e==null)return{};var r=sm(e,t),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var cl=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=!r,i=r?pm(t):t,o=K.None,a=K.None,u=0,s=null,l=null;for(var f of i){var c=f.codePointAt(0);if(!c)break;var d=Fm(f,c);if([o,a]=n?[a,d]:[d,o],sn(o,K.ZWJ)&&sn(a,K.ExtPict)&&(n?s=af(t.substring(0,u)):s=af(t.substring(0,t.length-u)),!s)||sn(o,K.RI)&&sn(a,K.RI)&&(l!==null?l=!l:n?l=!0:l=Pm(t.substring(0,t.length-u)),!l)||o!==K.None&&a!==K.None&&Om(o,a))break;u+=f.length}return u||1},lm=/\s/,cm=/[\u0021-\u0023\u0025-\u002A\u002C-\u002F\u003A\u003B\u003F\u0040\u005B-\u005D\u005F\u007B\u007D\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E3B\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,fm=/['\u2018\u2019]/,dm=function(t){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=0,i=!1;t.length>0;){var o=cl(t,r),[a,u]=fl(t,o,r);if(hm(a,u,r))i=!0,n+=o;else if(!i)n+=o;else break;t=u}return n},fl=(e,t,r)=>{if(r){var n=e.length-t;return[e.slice(n,e.length),e.slice(0,n)]}return[e.slice(0,t),e.slice(t)]},hm=function e(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(lm.test(t))return!1;if(fm.test(t)){var i=cl(r,n),[o,a]=fl(r,i,n);if(e(o,a,n))return!0}return!cm.test(t)},pm=function*(t){for(var r=t.length-1,n=0;n<t.length;n++){var i=t.charAt(r-n);if(vm(i.charCodeAt(0))){var o=t.charAt(r-n-1);if(gm(o.charCodeAt(0))){yield o+i,n++;continue}}yield i}},gm=e=>e>=55296&&e<=56319,vm=e=>e>=56320&&e<=57343,K;(function(e){e[e.None=0]="None",e[e.Extend=1]="Extend",e[e.ZWJ=2]="ZWJ",e[e.RI=4]="RI",e[e.Prepend=8]="Prepend",e[e.SpacingMark=16]="SpacingMark",e[e.L=32]="L",e[e.V=64]="V",e[e.T=128]="T",e[e.LV=256]="LV",e[e.LVT=512]="LVT",e[e.ExtPict=1024]="ExtPict",e[e.Any=2048]="Any"})(K||(K={}));var mm=/^(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1AC0\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDF46-\uDF50]|\uD804[\uDC01\uDC38-\uDC46\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD30-\uDD36\uDEEC-\uDEEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])$/,ym=/^(?:[\u0600-\u0605\u06DD\u070F\u0890\u0891\u08E2\u0D4E]|\uD804[\uDCBD\uDCCD\uDDC2\uDDC3]|\uD806[\uDD3F\uDD41\uDE3A\uDE84-\uDE89]|\uD807\uDD46)$/,Dm=/^(?:[\u0903\u093B\u093E-\u0940\u0949-\u094C\u094E\u094F\u0982\u0983\u09BF\u09C0\u09C7\u09C8\u09CB\u09CC\u0A03\u0A3E-\u0A40\u0A83\u0ABE-\u0AC0\u0AC9\u0ACB\u0ACC\u0B02\u0B03\u0B40\u0B47\u0B48\u0B4B\u0B4C\u0BBF\u0BC1\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0C01-\u0C03\u0C41-\u0C44\u0C82\u0C83\u0CBE\u0CC0\u0CC1\u0CC3\u0CC4\u0CC7\u0CC8\u0CCA\u0CCB\u0D02\u0D03\u0D3F\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D82\u0D83\u0DD0\u0DD1\u0DD8-\u0DDE\u0DF2\u0DF3\u0E33\u0EB3\u0F3E\u0F3F\u0F7F\u1031\u103B\u103C\u1056\u1057\u1084\u1715\u1734\u17B6\u17BE-\u17C5\u17C7\u17C8\u1923-\u1926\u1929-\u192B\u1930\u1931\u1933-\u1938\u1A19\u1A1A\u1A55\u1A57\u1A6D-\u1A72\u1B04\u1B3B\u1B3D-\u1B41\u1B43\u1B44\u1B82\u1BA1\u1BA6\u1BA7\u1BAA\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2\u1BF3\u1C24-\u1C2B\u1C34\u1C35\u1CE1\u1CF7\uA823\uA824\uA827\uA880\uA881\uA8B4-\uA8C3\uA952\uA953\uA983\uA9B4\uA9B5\uA9BA\uA9BB\uA9BE-\uA9C0\uAA2F\uAA30\uAA33\uAA34\uAA4D\uAAEB\uAAEE\uAAEF\uAAF5\uABE3\uABE4\uABE6\uABE7\uABE9\uABEA\uABEC]|\uD804[\uDC00\uDC02\uDC82\uDCB0-\uDCB2\uDCB7\uDCB8\uDD2C\uDD45\uDD46\uDD82\uDDB3-\uDDB5\uDDBF\uDDC0\uDDCE\uDE2C-\uDE2E\uDE32\uDE33\uDE35\uDEE0-\uDEE2\uDF02\uDF03\uDF3F\uDF41-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF62\uDF63]|\uD805[\uDC35-\uDC37\uDC40\uDC41\uDC45\uDCB1\uDCB2\uDCB9\uDCBB\uDCBC\uDCBE\uDCC1\uDDB0\uDDB1\uDDB8-\uDDBB\uDDBE\uDE30-\uDE32\uDE3B\uDE3C\uDE3E\uDEAC\uDEAE\uDEAF\uDEB6\uDF26]|\uD806[\uDC2C-\uDC2E\uDC38\uDD31-\uDD35\uDD37\uDD38\uDD3D\uDD40\uDD42\uDDD1-\uDDD3\uDDDC-\uDDDF\uDDE4\uDE39\uDE57\uDE58\uDE97]|\uD807[\uDC2F\uDC3E\uDCA9\uDCB1\uDCB4\uDD8A-\uDD8E\uDD93\uDD94\uDD96\uDEF5\uDEF6]|\uD81B[\uDF51-\uDF87\uDFF0\uDFF1]|\uD834[\uDD66\uDD6D])$/,Cm=/^[\u1100-\u115F\uA960-\uA97C]$/,bm=/^[\u1160-\u11A7\uD7B0-\uD7C6]$/,wm=/^[\u11A8-\u11FF\uD7CB-\uD7FB]$/,Em=/^[\uAC00\uAC1C\uAC38\uAC54\uAC70\uAC8C\uACA8\uACC4\uACE0\uACFC\uAD18\uAD34\uAD50\uAD6C\uAD88\uADA4\uADC0\uADDC\uADF8\uAE14\uAE30\uAE4C\uAE68\uAE84\uAEA0\uAEBC\uAED8\uAEF4\uAF10\uAF2C\uAF48\uAF64\uAF80\uAF9C\uAFB8\uAFD4\uAFF0\uB00C\uB028\uB044\uB060\uB07C\uB098\uB0B4\uB0D0\uB0EC\uB108\uB124\uB140\uB15C\uB178\uB194\uB1B0\uB1CC\uB1E8\uB204\uB220\uB23C\uB258\uB274\uB290\uB2AC\uB2C8\uB2E4\uB300\uB31C\uB338\uB354\uB370\uB38C\uB3A8\uB3C4\uB3E0\uB3FC\uB418\uB434\uB450\uB46C\uB488\uB4A4\uB4C0\uB4DC\uB4F8\uB514\uB530\uB54C\uB568\uB584\uB5A0\uB5BC\uB5D8\uB5F4\uB610\uB62C\uB648\uB664\uB680\uB69C\uB6B8\uB6D4\uB6F0\uB70C\uB728\uB744\uB760\uB77C\uB798\uB7B4\uB7D0\uB7EC\uB808\uB824\uB840\uB85C\uB878\uB894\uB8B0\uB8CC\uB8E8\uB904\uB920\uB93C\uB958\uB974\uB990\uB9AC\uB9C8\uB9E4\uBA00\uBA1C\uBA38\uBA54\uBA70\uBA8C\uBAA8\uBAC4\uBAE0\uBAFC\uBB18\uBB34\uBB50\uBB6C\uBB88\uBBA4\uBBC0\uBBDC\uBBF8\uBC14\uBC30\uBC4C\uBC68\uBC84\uBCA0\uBCBC\uBCD8\uBCF4\uBD10\uBD2C\uBD48\uBD64\uBD80\uBD9C\uBDB8\uBDD4\uBDF0\uBE0C\uBE28\uBE44\uBE60\uBE7C\uBE98\uBEB4\uBED0\uBEEC\uBF08\uBF24\uBF40\uBF5C\uBF78\uBF94\uBFB0\uBFCC\uBFE8\uC004\uC020\uC03C\uC058\uC074\uC090\uC0AC\uC0C8\uC0E4\uC100\uC11C\uC138\uC154\uC170\uC18C\uC1A8\uC1C4\uC1E0\uC1FC\uC218\uC234\uC250\uC26C\uC288\uC2A4\uC2C0\uC2DC\uC2F8\uC314\uC330\uC34C\uC368\uC384\uC3A0\uC3BC\uC3D8\uC3F4\uC410\uC42C\uC448\uC464\uC480\uC49C\uC4B8\uC4D4\uC4F0\uC50C\uC528\uC544\uC560\uC57C\uC598\uC5B4\uC5D0\uC5EC\uC608\uC624\uC640\uC65C\uC678\uC694\uC6B0\uC6CC\uC6E8\uC704\uC720\uC73C\uC758\uC774\uC790\uC7AC\uC7C8\uC7E4\uC800\uC81C\uC838\uC854\uC870\uC88C\uC8A8\uC8C4\uC8E0\uC8FC\uC918\uC934\uC950\uC96C\uC988\uC9A4\uC9C0\uC9DC\uC9F8\uCA14\uCA30\uCA4C\uCA68\uCA84\uCAA0\uCABC\uCAD8\uCAF4\uCB10\uCB2C\uCB48\uCB64\uCB80\uCB9C\uCBB8\uCBD4\uCBF0\uCC0C\uCC28\uCC44\uCC60\uCC7C\uCC98\uCCB4\uCCD0\uCCEC\uCD08\uCD24\uCD40\uCD5C\uCD78\uCD94\uCDB0\uCDCC\uCDE8\uCE04\uCE20\uCE3C\uCE58\uCE74\uCE90\uCEAC\uCEC8\uCEE4\uCF00\uCF1C\uCF38\uCF54\uCF70\uCF8C\uCFA8\uCFC4\uCFE0\uCFFC\uD018\uD034\uD050\uD06C\uD088\uD0A4\uD0C0\uD0DC\uD0F8\uD114\uD130\uD14C\uD168\uD184\uD1A0\uD1BC\uD1D8\uD1F4\uD210\uD22C\uD248\uD264\uD280\uD29C\uD2B8\uD2D4\uD2F0\uD30C\uD328\uD344\uD360\uD37C\uD398\uD3B4\uD3D0\uD3EC\uD408\uD424\uD440\uD45C\uD478\uD494\uD4B0\uD4CC\uD4E8\uD504\uD520\uD53C\uD558\uD574\uD590\uD5AC\uD5C8\uD5E4\uD600\uD61C\uD638\uD654\uD670\uD68C\uD6A8\uD6C4\uD6E0\uD6FC\uD718\uD734\uD750\uD76C\uD788]$/,Am=/^[\uAC01-\uAC1B\uAC1D-\uAC37\uAC39-\uAC53\uAC55-\uAC6F\uAC71-\uAC8B\uAC8D-\uACA7\uACA9-\uACC3\uACC5-\uACDF\uACE1-\uACFB\uACFD-\uAD17\uAD19-\uAD33\uAD35-\uAD4F\uAD51-\uAD6B\uAD6D-\uAD87\uAD89-\uADA3\uADA5-\uADBF\uADC1-\uADDB\uADDD-\uADF7\uADF9-\uAE13\uAE15-\uAE2F\uAE31-\uAE4B\uAE4D-\uAE67\uAE69-\uAE83\uAE85-\uAE9F\uAEA1-\uAEBB\uAEBD-\uAED7\uAED9-\uAEF3\uAEF5-\uAF0F\uAF11-\uAF2B\uAF2D-\uAF47\uAF49-\uAF63\uAF65-\uAF7F\uAF81-\uAF9B\uAF9D-\uAFB7\uAFB9-\uAFD3\uAFD5-\uAFEF\uAFF1-\uB00B\uB00D-\uB027\uB029-\uB043\uB045-\uB05F\uB061-\uB07B\uB07D-\uB097\uB099-\uB0B3\uB0B5-\uB0CF\uB0D1-\uB0EB\uB0ED-\uB107\uB109-\uB123\uB125-\uB13F\uB141-\uB15B\uB15D-\uB177\uB179-\uB193\uB195-\uB1AF\uB1B1-\uB1CB\uB1CD-\uB1E7\uB1E9-\uB203\uB205-\uB21F\uB221-\uB23B\uB23D-\uB257\uB259-\uB273\uB275-\uB28F\uB291-\uB2AB\uB2AD-\uB2C7\uB2C9-\uB2E3\uB2E5-\uB2FF\uB301-\uB31B\uB31D-\uB337\uB339-\uB353\uB355-\uB36F\uB371-\uB38B\uB38D-\uB3A7\uB3A9-\uB3C3\uB3C5-\uB3DF\uB3E1-\uB3FB\uB3FD-\uB417\uB419-\uB433\uB435-\uB44F\uB451-\uB46B\uB46D-\uB487\uB489-\uB4A3\uB4A5-\uB4BF\uB4C1-\uB4DB\uB4DD-\uB4F7\uB4F9-\uB513\uB515-\uB52F\uB531-\uB54B\uB54D-\uB567\uB569-\uB583\uB585-\uB59F\uB5A1-\uB5BB\uB5BD-\uB5D7\uB5D9-\uB5F3\uB5F5-\uB60F\uB611-\uB62B\uB62D-\uB647\uB649-\uB663\uB665-\uB67F\uB681-\uB69B\uB69D-\uB6B7\uB6B9-\uB6D3\uB6D5-\uB6EF\uB6F1-\uB70B\uB70D-\uB727\uB729-\uB743\uB745-\uB75F\uB761-\uB77B\uB77D-\uB797\uB799-\uB7B3\uB7B5-\uB7CF\uB7D1-\uB7EB\uB7ED-\uB807\uB809-\uB823\uB825-\uB83F\uB841-\uB85B\uB85D-\uB877\uB879-\uB893\uB895-\uB8AF\uB8B1-\uB8CB\uB8CD-\uB8E7\uB8E9-\uB903\uB905-\uB91F\uB921-\uB93B\uB93D-\uB957\uB959-\uB973\uB975-\uB98F\uB991-\uB9AB\uB9AD-\uB9C7\uB9C9-\uB9E3\uB9E5-\uB9FF\uBA01-\uBA1B\uBA1D-\uBA37\uBA39-\uBA53\uBA55-\uBA6F\uBA71-\uBA8B\uBA8D-\uBAA7\uBAA9-\uBAC3\uBAC5-\uBADF\uBAE1-\uBAFB\uBAFD-\uBB17\uBB19-\uBB33\uBB35-\uBB4F\uBB51-\uBB6B\uBB6D-\uBB87\uBB89-\uBBA3\uBBA5-\uBBBF\uBBC1-\uBBDB\uBBDD-\uBBF7\uBBF9-\uBC13\uBC15-\uBC2F\uBC31-\uBC4B\uBC4D-\uBC67\uBC69-\uBC83\uBC85-\uBC9F\uBCA1-\uBCBB\uBCBD-\uBCD7\uBCD9-\uBCF3\uBCF5-\uBD0F\uBD11-\uBD2B\uBD2D-\uBD47\uBD49-\uBD63\uBD65-\uBD7F\uBD81-\uBD9B\uBD9D-\uBDB7\uBDB9-\uBDD3\uBDD5-\uBDEF\uBDF1-\uBE0B\uBE0D-\uBE27\uBE29-\uBE43\uBE45-\uBE5F\uBE61-\uBE7B\uBE7D-\uBE97\uBE99-\uBEB3\uBEB5-\uBECF\uBED1-\uBEEB\uBEED-\uBF07\uBF09-\uBF23\uBF25-\uBF3F\uBF41-\uBF5B\uBF5D-\uBF77\uBF79-\uBF93\uBF95-\uBFAF\uBFB1-\uBFCB\uBFCD-\uBFE7\uBFE9-\uC003\uC005-\uC01F\uC021-\uC03B\uC03D-\uC057\uC059-\uC073\uC075-\uC08F\uC091-\uC0AB\uC0AD-\uC0C7\uC0C9-\uC0E3\uC0E5-\uC0FF\uC101-\uC11B\uC11D-\uC137\uC139-\uC153\uC155-\uC16F\uC171-\uC18B\uC18D-\uC1A7\uC1A9-\uC1C3\uC1C5-\uC1DF\uC1E1-\uC1FB\uC1FD-\uC217\uC219-\uC233\uC235-\uC24F\uC251-\uC26B\uC26D-\uC287\uC289-\uC2A3\uC2A5-\uC2BF\uC2C1-\uC2DB\uC2DD-\uC2F7\uC2F9-\uC313\uC315-\uC32F\uC331-\uC34B\uC34D-\uC367\uC369-\uC383\uC385-\uC39F\uC3A1-\uC3BB\uC3BD-\uC3D7\uC3D9-\uC3F3\uC3F5-\uC40F\uC411-\uC42B\uC42D-\uC447\uC449-\uC463\uC465-\uC47F\uC481-\uC49B\uC49D-\uC4B7\uC4B9-\uC4D3\uC4D5-\uC4EF\uC4F1-\uC50B\uC50D-\uC527\uC529-\uC543\uC545-\uC55F\uC561-\uC57B\uC57D-\uC597\uC599-\uC5B3\uC5B5-\uC5CF\uC5D1-\uC5EB\uC5ED-\uC607\uC609-\uC623\uC625-\uC63F\uC641-\uC65B\uC65D-\uC677\uC679-\uC693\uC695-\uC6AF\uC6B1-\uC6CB\uC6CD-\uC6E7\uC6E9-\uC703\uC705-\uC71F\uC721-\uC73B\uC73D-\uC757\uC759-\uC773\uC775-\uC78F\uC791-\uC7AB\uC7AD-\uC7C7\uC7C9-\uC7E3\uC7E5-\uC7FF\uC801-\uC81B\uC81D-\uC837\uC839-\uC853\uC855-\uC86F\uC871-\uC88B\uC88D-\uC8A7\uC8A9-\uC8C3\uC8C5-\uC8DF\uC8E1-\uC8FB\uC8FD-\uC917\uC919-\uC933\uC935-\uC94F\uC951-\uC96B\uC96D-\uC987\uC989-\uC9A3\uC9A5-\uC9BF\uC9C1-\uC9DB\uC9DD-\uC9F7\uC9F9-\uCA13\uCA15-\uCA2F\uCA31-\uCA4B\uCA4D-\uCA67\uCA69-\uCA83\uCA85-\uCA9F\uCAA1-\uCABB\uCABD-\uCAD7\uCAD9-\uCAF3\uCAF5-\uCB0F\uCB11-\uCB2B\uCB2D-\uCB47\uCB49-\uCB63\uCB65-\uCB7F\uCB81-\uCB9B\uCB9D-\uCBB7\uCBB9-\uCBD3\uCBD5-\uCBEF\uCBF1-\uCC0B\uCC0D-\uCC27\uCC29-\uCC43\uCC45-\uCC5F\uCC61-\uCC7B\uCC7D-\uCC97\uCC99-\uCCB3\uCCB5-\uCCCF\uCCD1-\uCCEB\uCCED-\uCD07\uCD09-\uCD23\uCD25-\uCD3F\uCD41-\uCD5B\uCD5D-\uCD77\uCD79-\uCD93\uCD95-\uCDAF\uCDB1-\uCDCB\uCDCD-\uCDE7\uCDE9-\uCE03\uCE05-\uCE1F\uCE21-\uCE3B\uCE3D-\uCE57\uCE59-\uCE73\uCE75-\uCE8F\uCE91-\uCEAB\uCEAD-\uCEC7\uCEC9-\uCEE3\uCEE5-\uCEFF\uCF01-\uCF1B\uCF1D-\uCF37\uCF39-\uCF53\uCF55-\uCF6F\uCF71-\uCF8B\uCF8D-\uCFA7\uCFA9-\uCFC3\uCFC5-\uCFDF\uCFE1-\uCFFB\uCFFD-\uD017\uD019-\uD033\uD035-\uD04F\uD051-\uD06B\uD06D-\uD087\uD089-\uD0A3\uD0A5-\uD0BF\uD0C1-\uD0DB\uD0DD-\uD0F7\uD0F9-\uD113\uD115-\uD12F\uD131-\uD14B\uD14D-\uD167\uD169-\uD183\uD185-\uD19F\uD1A1-\uD1BB\uD1BD-\uD1D7\uD1D9-\uD1F3\uD1F5-\uD20F\uD211-\uD22B\uD22D-\uD247\uD249-\uD263\uD265-\uD27F\uD281-\uD29B\uD29D-\uD2B7\uD2B9-\uD2D3\uD2D5-\uD2EF\uD2F1-\uD30B\uD30D-\uD327\uD329-\uD343\uD345-\uD35F\uD361-\uD37B\uD37D-\uD397\uD399-\uD3B3\uD3B5-\uD3CF\uD3D1-\uD3EB\uD3ED-\uD407\uD409-\uD423\uD425-\uD43F\uD441-\uD45B\uD45D-\uD477\uD479-\uD493\uD495-\uD4AF\uD4B1-\uD4CB\uD4CD-\uD4E7\uD4E9-\uD503\uD505-\uD51F\uD521-\uD53B\uD53D-\uD557\uD559-\uD573\uD575-\uD58F\uD591-\uD5AB\uD5AD-\uD5C7\uD5C9-\uD5E3\uD5E5-\uD5FF\uD601-\uD61B\uD61D-\uD637\uD639-\uD653\uD655-\uD66F\uD671-\uD68B\uD68D-\uD6A7\uD6A9-\uD6C3\uD6C5-\uD6DF\uD6E1-\uD6FB\uD6FD-\uD717\uD719-\uD733\uD735-\uD74F\uD751-\uD76B\uD76D-\uD787\uD789-\uD7A3]$/,Bm=/^(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])$/,Fm=(e,t)=>{var r=K.Any;return e.search(mm)!==-1&&(r|=K.Extend),t===8205&&(r|=K.ZWJ),t>=127462&&t<=127487&&(r|=K.RI),e.search(ym)!==-1&&(r|=K.Prepend),e.search(Dm)!==-1&&(r|=K.SpacingMark),e.search(Cm)!==-1&&(r|=K.L),e.search(bm)!==-1&&(r|=K.V),e.search(wm)!==-1&&(r|=K.T),e.search(Em)!==-1&&(r|=K.LV),e.search(Am)!==-1&&(r|=K.LVT),e.search(Bm)!==-1&&(r|=K.ExtPict),r};function sn(e,t){return(e&t)!==0}var xm=[[K.L,K.L|K.V|K.LV|K.LVT],[K.LV|K.V,K.V|K.T],[K.LVT|K.T,K.T],[K.Any,K.Extend|K.ZWJ],[K.Any,K.SpacingMark],[K.Prepend,K.Any],[K.ZWJ,K.ExtPict],[K.RI,K.RI]];function Om(e,t){return xm.findIndex(r=>sn(e,r[0])&&sn(t,r[1]))===-1}var Sm=/(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1AC0\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDF46-\uDF50]|\uD804[\uDC01\uDC38-\uDC46\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD30-\uDD36\uDEEC-\uDEEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])*\u200D$/,af=e=>e.search(Sm)!==-1,_m=/(?:\uD83C[\uDDE6-\uDDFF])+$/g,Pm=e=>{var t=e.match(_m);if(t===null)return!1;var r=t[0].length/2;return r%2===1},uf=e=>Te(e)&&N.isNodeList(e.children)&&!m.isEditor(e),Q={isAncestor(e){return Te(e)&&N.isNodeList(e.children)},isElement:uf,isElementList(e){return Array.isArray(e)&&e.every(t=>Q.isElement(t))},isElementProps(e){return e.children!==void 0},isElementType:function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"type";return uf(t)&&t[n]===r},matches(e,t){for(var r in t)if(r!=="children"&&e[r]!==t[r])return!1;return!0}},km=["text"],Tm=["text"];function sf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Jr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?sf(Object(r),!0).forEach(function(n){Rt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var lf=new WeakMap,m={above(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{voids:r=!1,mode:n="lowest",at:i=e.selection,match:o}=t;if(i){var a=m.path(e,i),u=n==="lowest";for(var[s,l]of m.levels(e,{at:a,voids:r,match:o,reverse:u}))if(!W.isText(s)&&!w.equals(a,l))return[s,l]}},addMark(e,t,r){e.addMark(t,r)},after(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=m.point(e,t,{edge:"end"}),i=m.end(e,[]),o={anchor:n,focus:i},{distance:a=1}=r,u=0,s;for(var l of m.positions(e,Jr(Jr({},r),{},{at:o}))){if(u>a)break;u!==0&&(s=l),u++}return s},before(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=m.start(e,[]),i=m.point(e,t,{edge:"start"}),o={anchor:n,focus:i},{distance:a=1}=r,u=0,s;for(var l of m.positions(e,Jr(Jr({},r),{},{at:o,reverse:!0}))){if(u>a)break;u!==0&&(s=l),u++}return s},deleteBackward(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:r="character"}=t;e.deleteBackward(r)},deleteForward(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:r="character"}=t;e.deleteForward(r)},deleteFragment(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{direction:r="forward"}=t;e.deleteFragment(r)},edges(e,t){return[m.start(e,t),m.end(e,t)]},end(e,t){return m.point(e,t,{edge:"end"})},first(e,t){var r=m.path(e,t,{edge:"start"});return m.node(e,r)},fragment(e,t){var r=m.range(e,t),n=N.fragment(e,r);return n},hasBlocks(e,t){return t.children.some(r=>m.isBlock(e,r))},hasInlines(e,t){return t.children.some(r=>W.isText(r)||m.isInline(e,r))},hasTexts(e,t){return t.children.every(r=>W.isText(r))},insertBreak(e){e.insertBreak()},insertFragment(e,t){e.insertFragment(t)},insertNode(e,t){e.insertNode(t)},insertText(e,t){e.insertText(t)},isBlock(e,t){return Q.isElement(t)&&!e.isInline(t)},isEditor(e){if(!Te(e))return!1;var t=lf.get(e);if(t!==void 0)return t;var r=typeof e.addMark=="function"&&typeof e.apply=="function"&&typeof e.deleteBackward=="function"&&typeof e.deleteForward=="function"&&typeof e.deleteFragment=="function"&&typeof e.insertBreak=="function"&&typeof e.insertFragment=="function"&&typeof e.insertNode=="function"&&typeof e.insertText=="function"&&typeof e.isInline=="function"&&typeof e.isVoid=="function"&&typeof e.normalizeNode=="function"&&typeof e.onChange=="function"&&typeof e.removeMark=="function"&&(e.marks===null||Te(e.marks))&&(e.selection===null||O.isRange(e.selection))&&N.isNodeList(e.children)&&hi.isOperationList(e.operations);return lf.set(e,r),r},isEnd(e,t,r){var n=m.end(e,r);return Z.equals(t,n)},isEdge(e,t,r){return m.isStart(e,t,r)||m.isEnd(e,t,r)},isEmpty(e,t){var{children:r}=t,[n]=r;return r.length===0||r.length===1&&W.isText(n)&&n.text===""&&!e.isVoid(t)},isInline(e,t){return Q.isElement(t)&&e.isInline(t)},isNormalizing(e){var t=tf.get(e);return t===void 0?!0:t},isStart(e,t,r){if(t.offset!==0)return!1;var n=m.start(e,r);return Z.equals(t,n)},isVoid(e,t){return Q.isElement(t)&&e.isVoid(t)},last(e,t){var r=m.path(e,t,{edge:"end"});return m.node(e,r)},leaf(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=m.path(e,t,r),i=N.leaf(e,n);return[i,n]},*levels(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{at:r=e.selection,reverse:n=!1,voids:i=!1}=t,{match:o}=t;if(o==null&&(o=()=>!0),!!r){var a=[],u=m.path(e,r);for(var[s,l]of N.levels(e,u))if(o(s,l)&&(a.push([s,l]),!i&&m.isVoid(e,s)))break;n&&a.reverse(),yield*a}},marks(e){var{marks:t,selection:r}=e;if(!r)return null;if(t)return t;if(O.isExpanded(r)){var[n]=m.nodes(e,{match:W.isText});if(n){var[i]=n,o=jt(i,km);return o}else return{}}var{anchor:a}=r,{path:u}=a,[s]=m.leaf(e,u);if(a.offset===0){var l=m.previous(e,{at:u,match:W.isText}),f=m.above(e,{match:g=>m.isBlock(e,g)});if(l&&f){var[c,d]=l,[,p]=f;w.isAncestor(p,d)&&(s=c)}}var h=jt(s,Tm);return h},next(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:r="lowest",voids:n=!1}=t,{match:i,at:o=e.selection}=t;if(o){var a=m.after(e,o,{voids:n});if(a){var[,u]=m.last(e,[]),s=[a.path,u];if(w.isPath(o)&&o.length===0)throw new Error("Cannot get the next node from the root node!");if(i==null)if(w.isPath(o)){var[l]=m.parent(e,o);i=c=>l.children.includes(c)}else i=()=>!0;var[f]=m.nodes(e,{at:s,match:i,mode:r,voids:n});return f}}},node(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=m.path(e,t,r),i=N.get(e,n);return[i,n]},*nodes(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{at:r=e.selection,mode:n="all",universal:i=!1,reverse:o=!1,voids:a=!1}=t,{match:u}=t;if(u||(u=()=>!0),!!r){var s,l;if(jm.isSpan(r))s=r[0],l=r[1];else{var f=m.path(e,r,{edge:"start"}),c=m.path(e,r,{edge:"end"});s=o?c:f,l=o?f:c}var d=N.nodes(e,{reverse:o,from:s,to:l,pass:b=>{var[B]=b;return a?!1:m.isVoid(e,B)}}),p=[],h;for(var[g,v]of d){var D=h&&w.compare(v,h[1])===0;if(!(n==="highest"&&D)){if(!u(g,v)){if(i&&!D&&W.isText(g))return;continue}if(n==="lowest"&&D){h=[g,v];continue}var C=n==="lowest"?h:[g,v];C&&(i?p.push(C):yield C),h=[g,v]}}n==="lowest"&&h&&(i?p.push(h):yield h),i&&(yield*p)}},normalize(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{force:r=!1}=t,n=s=>Qc.get(s)||[],i=s=>ef.get(s)||new Set,o=s=>{var l=n(s).pop(),f=l.join(",");return i(s).delete(f),l};if(m.isNormalizing(e)){if(r){var a=Array.from(N.nodes(e),s=>{var[,l]=s;return l}),u=new Set(a.map(s=>s.join(",")));Qc.set(e,a),ef.set(e,u)}n(e).length!==0&&m.withoutNormalizing(e,()=>{for(var s of n(e))if(N.has(e,s)){var l=m.node(e,s),[f,c]=l;Q.isElement(f)&&f.children.length===0&&e.normalizeNode(l)}for(var d=n(e).length*42,p=0;n(e).length!==0;){if(p>d)throw new Error(`
|
|
7
|
-
Could not completely normalize the editor after `.concat(d,` iterations! This is usually due to incorrect normalization logic that leaves a node in an invalid state.
|
|
8
|
-
`));var h=o(e);if(N.has(e,h)){var g=m.node(e,h);e.normalizeNode(g)}p++}})}},parent(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=m.path(e,t,r),i=w.parent(n),o=m.node(e,i);return o},path(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{depth:n,edge:i}=r;if(w.isPath(t)){if(i==="start"){var[,o]=N.first(e,t);t=o}else if(i==="end"){var[,a]=N.last(e,t);t=a}}return O.isRange(t)&&(i==="start"?t=O.start(t):i==="end"?t=O.end(t):t=w.common(t.anchor.path,t.focus.path)),Z.isPoint(t)&&(t=t.path),n!=null&&(t=t.slice(0,n)),t},hasPath(e,t){return N.has(e,t)},pathRef(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:n="forward"}=r,i={current:t,affinity:n,unref(){var{current:a}=i,u=m.pathRefs(e);return u.delete(i),i.current=null,a}},o=m.pathRefs(e);return o.add(i),i},pathRefs(e){var t=rf.get(e);return t||(t=new Set,rf.set(e,t)),t},point(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{edge:n="start"}=r;if(w.isPath(t)){var i;if(n==="end"){var[,o]=N.last(e,t);i=o}else{var[,a]=N.first(e,t);i=a}var u=N.get(e,i);if(!W.isText(u))throw new Error("Cannot get the ".concat(n," point in the node at path [").concat(t,"] because it has no ").concat(n," text node."));return{path:i,offset:n==="end"?u.text.length:0}}if(O.isRange(t)){var[s,l]=O.edges(t);return n==="start"?s:l}return t},pointRef(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:n="forward"}=r,i={current:t,affinity:n,unref(){var{current:a}=i,u=m.pointRefs(e);return u.delete(i),i.current=null,a}},o=m.pointRefs(e);return o.add(i),i},pointRefs(e){var t=nf.get(e);return t||(t=new Set,nf.set(e,t)),t},*positions(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{at:r=e.selection,unit:n="offset",reverse:i=!1,voids:o=!1}=t;if(!r)return;var a=m.range(e,r),[u,s]=O.edges(a),l=i?s:u,f=!1,c="",d=0,p=0,h=0;for(var[g,v]of m.nodes(e,{at:r,reverse:i,voids:o})){if(Q.isElement(g)){if(!o&&e.isVoid(g)){yield m.start(e,v);continue}if(e.isInline(g))continue;if(m.hasInlines(e,g)){var D=w.isAncestor(v,s.path)?s:m.end(e,v),C=w.isAncestor(v,u.path)?u:m.start(e,v);c=m.string(e,{anchor:C,focus:D},{voids:o}),f=!0}}if(W.isText(g)){var b=w.equals(v,l.path);for(b?(p=i?l.offset:g.text.length-l.offset,h=l.offset):(p=g.text.length,h=i?p:0),(b||f||n==="offset")&&(yield{path:v,offset:h},f=!1);;){if(d===0){if(c==="")break;d=B(c,n,i),c=fl(c,d,i)[1]}if(h=i?h-d:h+d,p=p-d,p<0){d=-p;break}d=0,yield{path:v,offset:h}}}}function B(E,x,_){return x==="character"?cl(E,_):x==="word"?dm(E,_):x==="line"||x==="block"?E.length:1}},previous(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:r="lowest",voids:n=!1}=t,{match:i,at:o=e.selection}=t;if(o){var a=m.before(e,o,{voids:n});if(a){var[,u]=m.first(e,[]),s=[a.path,u];if(w.isPath(o)&&o.length===0)throw new Error("Cannot get the previous node from the root node!");if(i==null)if(w.isPath(o)){var[l]=m.parent(e,o);i=c=>l.children.includes(c)}else i=()=>!0;var[f]=m.nodes(e,{reverse:!0,at:s,match:i,mode:r,voids:n});return f}}},range(e,t,r){if(O.isRange(t)&&!r)return t;var n=m.start(e,t),i=m.end(e,r||t);return{anchor:n,focus:i}},rangeRef(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:n="forward"}=r,i={current:t,affinity:n,unref(){var{current:a}=i,u=m.rangeRefs(e);return u.delete(i),i.current=null,a}},o=m.rangeRefs(e);return o.add(i),i},rangeRefs(e){var t=of.get(e);return t||(t=new Set,of.set(e,t)),t},removeMark(e,t){e.removeMark(t)},setNormalizing(e,t){tf.set(e,t)},start(e,t){return m.point(e,t,{edge:"start"})},string(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:n=!1}=r,i=m.range(e,t),[o,a]=O.edges(i),u="";for(var[s,l]of m.nodes(e,{at:i,match:W.isText,voids:n})){var f=s.text;w.equals(l,a.path)&&(f=f.slice(0,a.offset)),w.equals(l,o.path)&&(f=f.slice(o.offset)),u+=f}return u},unhangRange(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:n=!1}=r,[i,o]=O.edges(t);if(i.offset!==0||o.offset!==0||O.isCollapsed(t))return t;var a=m.above(e,{at:o,match:p=>m.isBlock(e,p)}),u=a?a[1]:[],s=m.start(e,i),l={anchor:s,focus:o},f=!0;for(var[c,d]of m.nodes(e,{at:l,match:W.isText,reverse:!0,voids:n})){if(f){f=!1;continue}if(c.text!==""||w.isBefore(d,u)){o={path:d,offset:c.text.length};break}}return{anchor:i,focus:o}},void(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return m.above(e,Jr(Jr({},t),{},{match:r=>m.isVoid(e,r)}))},withoutNormalizing(e,t){var r=m.isNormalizing(e);m.setNormalizing(e,!1);try{t()}finally{m.setNormalizing(e,r)}m.normalize(e)}},jm={isSpan(e){return Array.isArray(e)&&e.length===2&&e.every(w.isPath)}},Rm=["children"],Nm=["text"],cf=new WeakMap,N={ancestor(e,t){var r=N.get(e,t);if(W.isText(r))throw new Error("Cannot get the ancestor node at path [".concat(t,"] because it refers to a text node instead: ").concat(r));return r},*ancestors(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};for(var n of w.ancestors(t,r)){var i=N.ancestor(e,n),o=[i,n];yield o}},child(e,t){if(W.isText(e))throw new Error("Cannot get the child of a text node: ".concat(JSON.stringify(e)));var r=e.children[t];if(r==null)throw new Error("Cannot get child at index `".concat(t,"` in node: ").concat(JSON.stringify(e)));return r},*children(e,t){for(var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{reverse:n=!1}=r,i=N.ancestor(e,t),{children:o}=i,a=n?o.length-1:0;n?a>=0:a<o.length;){var u=N.child(i,a),s=t.concat(a);yield[u,s],a=n?a-1:a+1}},common(e,t,r){var n=w.common(t,r),i=N.get(e,n);return[i,n]},descendant(e,t){var r=N.get(e,t);if(m.isEditor(r))throw new Error("Cannot get the descendant node at path [".concat(t,"] because it refers to the root editor node instead: ").concat(r));return r},*descendants(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};for(var[r,n]of N.nodes(e,t))n.length!==0&&(yield[r,n])},*elements(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};for(var[r,n]of N.nodes(e,t))Q.isElement(r)&&(yield[r,n])},extractProps(e){if(Q.isAncestor(e)){var t=jt(e,Rm);return t}else{var t=jt(e,Nm);return t}},first(e,t){for(var r=t.slice(),n=N.get(e,r);n&&!(W.isText(n)||n.children.length===0);)n=n.children[0],r.push(0);return[n,r]},fragment(e,t){if(W.isText(e))throw new Error("Cannot get a fragment starting from a root text node: ".concat(JSON.stringify(e)));var r=ga({children:e.children},n=>{var[i,o]=O.edges(t),a=N.nodes(n,{reverse:!0,pass:d=>{var[,p]=d;return!O.includes(t,p)}});for(var[,u]of a){if(!O.includes(t,u)){var s=N.parent(n,u),l=u[u.length-1];s.children.splice(l,1)}if(w.equals(u,o.path)){var f=N.leaf(n,u);f.text=f.text.slice(0,o.offset)}if(w.equals(u,i.path)){var c=N.leaf(n,u);c.text=c.text.slice(i.offset)}}m.isEditor(n)&&(n.selection=null)});return r.children},get(e,t){for(var r=e,n=0;n<t.length;n++){var i=t[n];if(W.isText(r)||!r.children[i])throw new Error("Cannot find a descendant at path [".concat(t,"] in node: ").concat(JSON.stringify(e)));r=r.children[i]}return r},has(e,t){for(var r=e,n=0;n<t.length;n++){var i=t[n];if(W.isText(r)||!r.children[i])return!1;r=r.children[i]}return!0},isNode(e){return W.isText(e)||Q.isElement(e)||m.isEditor(e)},isNodeList(e){if(!Array.isArray(e))return!1;var t=cf.get(e);if(t!==void 0)return t;var r=e.every(n=>N.isNode(n));return cf.set(e,r),r},last(e,t){for(var r=t.slice(),n=N.get(e,r);n&&!(W.isText(n)||n.children.length===0);){var i=n.children.length-1;n=n.children[i],r.push(i)}return[n,r]},leaf(e,t){var r=N.get(e,t);if(!W.isText(r))throw new Error("Cannot get the leaf node at path [".concat(t,"] because it refers to a non-leaf node: ").concat(r));return r},*levels(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};for(var n of w.levels(t,r)){var i=N.get(e,n);yield[i,n]}},matches(e,t){return Q.isElement(e)&&Q.isElementProps(t)&&Q.matches(e,t)||W.isText(e)&&W.isTextProps(t)&&W.matches(e,t)},*nodes(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{pass:r,reverse:n=!1}=t,{from:i=[],to:o}=t,a=new Set,u=[],s=e;!(o&&(n?w.isBefore(u,o):w.isAfter(u,o)));){if(a.has(s)||(yield[s,u]),!a.has(s)&&!W.isText(s)&&s.children.length!==0&&(r==null||r([s,u])===!1)){a.add(s);var l=n?s.children.length-1:0;w.isAncestor(u,i)&&(l=i[u.length]),u=u.concat(l),s=N.get(e,u);continue}if(u.length===0)break;if(!n){var f=w.next(u);if(N.has(e,f)){u=f,s=N.get(e,u);continue}}if(n&&u[u.length-1]!==0){var c=w.previous(u);u=c,s=N.get(e,u);continue}u=w.parent(u),s=N.get(e,u),a.add(s)}},parent(e,t){var r=w.parent(t),n=N.get(e,r);if(W.isText(n))throw new Error("Cannot get the parent of path [".concat(t,"] because it does not exist in the root."));return n},string(e){return W.isText(e)?e.text:e.children.map(N.string).join("")},*texts(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};for(var[r,n]of N.nodes(e,t))W.isText(r)&&(yield[r,n])}};function ff(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ge(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ff(Object(r),!0).forEach(function(n){Rt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ff(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var hi={isNodeOperation(e){return hi.isOperation(e)&&e.type.endsWith("_node")},isOperation(e){if(!Te(e))return!1;switch(e.type){case"insert_node":return w.isPath(e.path)&&N.isNode(e.node);case"insert_text":return typeof e.offset=="number"&&typeof e.text=="string"&&w.isPath(e.path);case"merge_node":return typeof e.position=="number"&&w.isPath(e.path)&&Te(e.properties);case"move_node":return w.isPath(e.path)&&w.isPath(e.newPath);case"remove_node":return w.isPath(e.path)&&N.isNode(e.node);case"remove_text":return typeof e.offset=="number"&&typeof e.text=="string"&&w.isPath(e.path);case"set_node":return w.isPath(e.path)&&Te(e.properties)&&Te(e.newProperties);case"set_selection":return e.properties===null&&O.isRange(e.newProperties)||e.newProperties===null&&O.isRange(e.properties)||Te(e.properties)&&Te(e.newProperties);case"split_node":return w.isPath(e.path)&&typeof e.position=="number"&&Te(e.properties);default:return!1}},isOperationList(e){return Array.isArray(e)&&e.every(t=>hi.isOperation(t))},isSelectionOperation(e){return hi.isOperation(e)&&e.type.endsWith("_selection")},isTextOperation(e){return hi.isOperation(e)&&e.type.endsWith("_text")},inverse(e){switch(e.type){case"insert_node":return ge(ge({},e),{},{type:"remove_node"});case"insert_text":return ge(ge({},e),{},{type:"remove_text"});case"merge_node":return ge(ge({},e),{},{type:"split_node",path:w.previous(e.path)});case"move_node":{var{newPath:t,path:r}=e;if(w.equals(t,r))return e;if(w.isSibling(r,t))return ge(ge({},e),{},{path:t,newPath:r});var n=w.transform(r,e),i=w.transform(w.next(r),e);return ge(ge({},e),{},{path:n,newPath:i})}case"remove_node":return ge(ge({},e),{},{type:"insert_node"});case"remove_text":return ge(ge({},e),{},{type:"insert_text"});case"set_node":{var{properties:o,newProperties:a}=e;return ge(ge({},e),{},{properties:a,newProperties:o})}case"set_selection":{var{properties:u,newProperties:s}=e;return u==null?ge(ge({},e),{},{properties:s,newProperties:null}):s==null?ge(ge({},e),{},{properties:null,newProperties:u}):ge(ge({},e),{},{properties:s,newProperties:u})}case"split_node":return ge(ge({},e),{},{type:"merge_node",path:w.next(e.path)})}}},w={ancestors(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=t,n=w.levels(e,t);return r?n=n.slice(1):n=n.slice(0,-1),n},common(e,t){for(var r=[],n=0;n<e.length&&n<t.length;n++){var i=e[n],o=t[n];if(i!==o)break;r.push(i)}return r},compare(e,t){for(var r=Math.min(e.length,t.length),n=0;n<r;n++){if(e[n]<t[n])return-1;if(e[n]>t[n])return 1}return 0},endsAfter(e,t){var r=e.length-1,n=e.slice(0,r),i=t.slice(0,r),o=e[r],a=t[r];return w.equals(n,i)&&o>a},endsAt(e,t){var r=e.length,n=e.slice(0,r),i=t.slice(0,r);return w.equals(n,i)},endsBefore(e,t){var r=e.length-1,n=e.slice(0,r),i=t.slice(0,r),o=e[r],a=t[r];return w.equals(n,i)&&o<a},equals(e,t){return e.length===t.length&&e.every((r,n)=>r===t[n])},hasPrevious(e){return e[e.length-1]>0},isAfter(e,t){return w.compare(e,t)===1},isAncestor(e,t){return e.length<t.length&&w.compare(e,t)===0},isBefore(e,t){return w.compare(e,t)===-1},isChild(e,t){return e.length===t.length+1&&w.compare(e,t)===0},isCommon(e,t){return e.length<=t.length&&w.compare(e,t)===0},isDescendant(e,t){return e.length>t.length&&w.compare(e,t)===0},isParent(e,t){return e.length+1===t.length&&w.compare(e,t)===0},isPath(e){return Array.isArray(e)&&(e.length===0||typeof e[0]=="number")},isSibling(e,t){if(e.length!==t.length)return!1;var r=e.slice(0,-1),n=t.slice(0,-1),i=e[e.length-1],o=t[t.length-1];return i!==o&&w.equals(r,n)},levels(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=t,n=[],i=0;i<=e.length;i++)n.push(e.slice(0,i));return r&&n.reverse(),n},next(e){if(e.length===0)throw new Error("Cannot get the next path of a root path [".concat(e,"], because it has no next index."));var t=e[e.length-1];return e.slice(0,-1).concat(t+1)},operationCanTransformPath(e){switch(e.type){case"insert_node":case"remove_node":case"merge_node":case"split_node":case"move_node":return!0;default:return!1}},parent(e){if(e.length===0)throw new Error("Cannot get the parent path of the root path [".concat(e,"]."));return e.slice(0,-1)},previous(e){if(e.length===0)throw new Error("Cannot get the previous path of a root path [".concat(e,"], because it has no previous index."));var t=e[e.length-1];if(t<=0)throw new Error("Cannot get the previous path of a first child path [".concat(e,"] because it would result in a negative index."));return e.slice(0,-1).concat(t-1)},relative(e,t){if(!w.isAncestor(t,e)&&!w.equals(e,t))throw new Error("Cannot get the relative path of [".concat(e,"] inside ancestor [").concat(t,"], because it is not above or equal to the path."));return e.slice(t.length)},transform(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return ga(e,n=>{var{affinity:i="forward"}=r;if(!(!e||(e==null?void 0:e.length)===0)){if(n===null)return null;switch(t.type){case"insert_node":{var{path:o}=t;(w.equals(o,n)||w.endsBefore(o,n)||w.isAncestor(o,n))&&(n[o.length-1]+=1);break}case"remove_node":{var{path:a}=t;if(w.equals(a,n)||w.isAncestor(a,n))return null;w.endsBefore(a,n)&&(n[a.length-1]-=1);break}case"merge_node":{var{path:u,position:s}=t;w.equals(u,n)||w.endsBefore(u,n)?n[u.length-1]-=1:w.isAncestor(u,n)&&(n[u.length-1]-=1,n[u.length]+=s);break}case"split_node":{var{path:l,position:f}=t;if(w.equals(l,n)){if(i==="forward")n[n.length-1]+=1;else if(i!=="backward")return null}else w.endsBefore(l,n)?n[l.length-1]+=1:w.isAncestor(l,n)&&e[l.length]>=f&&(n[l.length-1]+=1,n[l.length]-=f);break}case"move_node":{var{path:c,newPath:d}=t;if(w.equals(c,d))return;if(w.isAncestor(c,n)||w.equals(c,n)){var p=d.slice();return w.endsBefore(c,d)&&c.length<d.length&&(p[c.length-1]-=1),p.concat(n.slice(c.length))}else w.isSibling(c,d)&&(w.isAncestor(d,n)||w.equals(d,n))?w.endsBefore(c,n)?n[c.length-1]-=1:n[c.length-1]+=1:w.endsBefore(d,n)||w.equals(d,n)||w.isAncestor(d,n)?(w.endsBefore(c,n)&&(n[c.length-1]-=1),n[d.length-1]+=1):w.endsBefore(c,n)&&(w.equals(d,n)&&(n[d.length-1]+=1),n[c.length-1]-=1);break}}}})}};function df(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function hf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?df(Object(r),!0).forEach(function(n){Rt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):df(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Z={compare(e,t){var r=w.compare(e.path,t.path);return r===0?e.offset<t.offset?-1:e.offset>t.offset?1:0:r},isAfter(e,t){return Z.compare(e,t)===1},isBefore(e,t){return Z.compare(e,t)===-1},equals(e,t){return e.offset===t.offset&&w.equals(e.path,t.path)},isPoint(e){return Te(e)&&typeof e.offset=="number"&&w.isPath(e.path)},transform(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return ga(e,n=>{if(n===null)return null;var{affinity:i="forward"}=r,{path:o,offset:a}=n;switch(t.type){case"insert_node":case"move_node":{n.path=w.transform(o,t,r);break}case"insert_text":{w.equals(t.path,o)&&t.offset<=a&&(n.offset+=t.text.length);break}case"merge_node":{w.equals(t.path,o)&&(n.offset+=t.position),n.path=w.transform(o,t,r);break}case"remove_text":{w.equals(t.path,o)&&t.offset<=a&&(n.offset-=Math.min(a-t.offset,t.text.length));break}case"remove_node":{if(w.equals(t.path,o)||w.isAncestor(t.path,o))return null;n.path=w.transform(o,t,r);break}case"split_node":{if(w.equals(t.path,o)){if(t.position===a&&i==null)return null;(t.position<a||t.position===a&&i==="forward")&&(n.offset-=t.position,n.path=w.transform(o,t,hf(hf({},r),{},{affinity:"forward"})))}else n.path=w.transform(o,t,r);break}}})}},$m=["anchor","focus"];function pf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Lm(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?pf(Object(r),!0).forEach(function(n){Rt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var O={edges(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=t,{anchor:n,focus:i}=e;return O.isBackward(e)===r?[n,i]:[i,n]},end(e){var[,t]=O.edges(e);return t},equals(e,t){return Z.equals(e.anchor,t.anchor)&&Z.equals(e.focus,t.focus)},includes(e,t){if(O.isRange(t)){if(O.includes(e,t.anchor)||O.includes(e,t.focus))return!0;var[r,n]=O.edges(e),[i,o]=O.edges(t);return Z.isBefore(r,i)&&Z.isAfter(n,o)}var[a,u]=O.edges(e),s=!1,l=!1;return Z.isPoint(t)?(s=Z.compare(t,a)>=0,l=Z.compare(t,u)<=0):(s=w.compare(t,a.path)>=0,l=w.compare(t,u.path)<=0),s&&l},intersection(e,t){var r=jt(e,$m),[n,i]=O.edges(e),[o,a]=O.edges(t),u=Z.isBefore(n,o)?o:n,s=Z.isBefore(i,a)?i:a;return Z.isBefore(s,u)?null:Lm({anchor:u,focus:s},r)},isBackward(e){var{anchor:t,focus:r}=e;return Z.isAfter(t,r)},isCollapsed(e){var{anchor:t,focus:r}=e;return Z.equals(t,r)},isExpanded(e){return!O.isCollapsed(e)},isForward(e){return!O.isBackward(e)},isRange(e){return Te(e)&&Z.isPoint(e.anchor)&&Z.isPoint(e.focus)},*points(e){yield[e.anchor,"anchor"],yield[e.focus,"focus"]},start(e){var[t]=O.edges(e);return t},transform(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return ga(e,n=>{if(n===null)return null;var{affinity:i="inward"}=r,o,a;if(i==="inward"){var u=O.isCollapsed(n);O.isForward(n)?(o="forward",a=u?o:"backward"):(o="backward",a=u?o:"forward")}else i==="outward"?O.isForward(n)?(o="backward",a="forward"):(o="forward",a="backward"):(o=i,a=i);var s=Z.transform(n.anchor,t,{affinity:o}),l=Z.transform(n.focus,t,{affinity:a});if(!s||!l)return null;n.anchor=s,n.focus=l})}},Qh=(e,t)=>{for(var r in e){var n=e[r],i=t[r];if(Te(n)&&Te(i)){if(!Qh(n,i))return!1}else if(Array.isArray(n)&&Array.isArray(i)){if(n.length!==i.length)return!1;for(var o=0;o<n.length;o++)if(n[o]!==i[o])return!1}else if(n!==i)return!1}for(var a in t)if(e[a]===void 0&&t[a]!==void 0)return!1;return!0},Mm=["text"],Im=["anchor","focus"];function gf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ct(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?gf(Object(r),!0).forEach(function(n){Rt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var W={equals(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{loose:n=!1}=r;function i(o){var a=jt(o,Mm);return a}return Qh(n?i(e):e,n?i(t):t)},isText(e){return Te(e)&&typeof e.text=="string"},isTextList(e){return Array.isArray(e)&&e.every(t=>W.isText(t))},isTextProps(e){return e.text!==void 0},matches(e,t){for(var r in t)if(r!=="text"&&(!e.hasOwnProperty(r)||e[r]!==t[r]))return!1;return!0},decorations(e,t){var r=[Ct({},e)];for(var n of t){var i=jt(n,Im),[o,a]=O.edges(n),u=[],s=0;for(var l of r){var{length:f}=l.text,c=s;if(s+=f,o.offset<=c&&a.offset>=s){Object.assign(l,i),u.push(l);continue}if(o.offset!==a.offset&&(o.offset===s||a.offset===c)||o.offset>s||a.offset<c||a.offset===c&&c!==0){u.push(l);continue}var d=l,p=void 0,h=void 0;if(a.offset<s){var g=a.offset-c;h=Ct(Ct({},d),{},{text:d.text.slice(g)}),d=Ct(Ct({},d),{},{text:d.text.slice(0,g)})}if(o.offset>c){var v=o.offset-c;p=Ct(Ct({},d),{},{text:d.text.slice(0,v)}),d=Ct(Ct({},d),{},{text:d.text.slice(v)})}Object.assign(d,i),p&&u.push(p),u.push(d),h&&u.push(h)}r=u}return r}};function vf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function In(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vf(Object(r),!0).forEach(function(n){Rt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Um=(e,t,r)=>{switch(r.type){case"insert_node":{var{path:n,node:i}=r,o=N.parent(e,n),a=n[n.length-1];if(a>o.children.length)throw new Error('Cannot apply an "insert_node" operation at path ['.concat(n,"] because the destination is past the end of the node."));if(o.children.splice(a,0,i),t)for(var[u,s]of O.points(t))t[s]=Z.transform(u,r);break}case"insert_text":{var{path:l,offset:f,text:c}=r;if(c.length===0)break;var d=N.leaf(e,l),p=d.text.slice(0,f),h=d.text.slice(f);if(d.text=p+c+h,t)for(var[g,v]of O.points(t))t[v]=Z.transform(g,r);break}case"merge_node":{var{path:D}=r,C=N.get(e,D),b=w.previous(D),B=N.get(e,b),E=N.parent(e,D),x=D[D.length-1];if(W.isText(C)&&W.isText(B))B.text+=C.text;else if(!W.isText(C)&&!W.isText(B))B.children.push(...C.children);else throw new Error('Cannot apply a "merge_node" operation at path ['.concat(D,"] to nodes of different interfaces: ").concat(C," ").concat(B));if(E.children.splice(x,1),t)for(var[_,T]of O.points(t))t[T]=Z.transform(_,r);break}case"move_node":{var{path:k,newPath:L}=r;if(w.isAncestor(k,L))throw new Error("Cannot move a path [".concat(k,"] to new path [").concat(L,"] because the destination is inside itself."));var R=N.get(e,k),S=N.parent(e,k),z=k[k.length-1];S.children.splice(z,1);var G=w.transform(k,r),X=N.get(e,w.parent(G)),te=G[G.length-1];if(X.children.splice(te,0,R),t)for(var[re,ke]of O.points(t))t[ke]=Z.transform(re,r);break}case"remove_node":{var{path:he}=r,V=he[he.length-1],Oe=N.parent(e,he);if(Oe.children.splice(V,1),t)for(var[le,ue]of O.points(t)){var J=Z.transform(le,r);if(t!=null&&J!=null)t[ue]=J;else{var ne=void 0,oe=void 0;for(var[De,Me]of N.texts(e))if(w.compare(Me,he)===-1)ne=[De,Me];else{oe=[De,Me];break}var Ie=!1;ne&&oe&&(w.equals(oe[1],he)?Ie=!w.hasPrevious(oe[1]):Ie=w.common(ne[1],he).length<w.common(oe[1],he).length),ne&&!Ie?(le.path=ne[1],le.offset=ne[0].text.length):oe?(le.path=oe[1],le.offset=0):t=null}}break}case"remove_text":{var{path:er,offset:Pn,text:Ji}=r;if(Ji.length===0)break;var kn=N.leaf(e,er),Xi=kn.text.slice(0,Pn),Yi=kn.text.slice(Pn+Ji.length);if(kn.text=Xi+Yi,t)for(var[Tn,Zi]of O.points(t))t[Zi]=Z.transform(Tn,r);break}case"set_node":{var{path:Qi,properties:Ia,newProperties:Mt}=r;if(Qi.length===0)throw new Error("Cannot set properties on the root node!");var tr=N.get(e,Qi);for(var gt in Mt){if(gt==="children"||gt==="text")throw new Error('Cannot set the "'.concat(gt,'" property of nodes!'));var jn=Mt[gt];jn==null?delete tr[gt]:tr[gt]=jn}for(var rt in Ia)Mt.hasOwnProperty(rt)||delete tr[rt];break}case"set_selection":{var{newProperties:Ye}=r;if(Ye==null)t=Ye;else{if(t==null){if(!O.isRange(Ye))throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(JSON.stringify(Ye)," when there is no current selection."));t=In({},Ye)}for(var It in Ye){var Rn=Ye[It];if(Rn==null){if(It==="anchor"||It==="focus")throw new Error('Cannot remove the "'.concat(It,'" selection property'));delete t[It]}else t[It]=Rn}}break}case"split_node":{var{path:vt,position:rr,properties:eo}=r;if(vt.length===0)throw new Error('Cannot apply a "split_node" operation at path ['.concat(vt,"] because the root node cannot be split."));var mt=N.get(e,vt),Ua=N.parent(e,vt),Ha=vt[vt.length-1],Wr;if(W.isText(mt)){var za=mt.text.slice(0,rr),Wa=mt.text.slice(rr);mt.text=za,Wr=In(In({},eo),{},{text:Wa})}else{var Nn=mt.children.slice(0,rr),nr=mt.children.slice(rr);mt.children=Nn,Wr=In(In({},eo),{},{children:nr})}if(Ua.children.splice(Ha+1,0,Wr),t)for(var[$n,Ln]of O.points(t))t[Ln]=Z.transform($n,r);break}}return t},Hm={transform(e,t){e.children=Yc(e.children);var r=e.selection&&Yc(e.selection);try{r=Um(e,r,t)}finally{e.children=Zc(e.children),r?e.selection=kr(r)?Zc(r):r:e.selection=null}}},zm=["text"],Wm=["children"];function mf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function yf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?mf(Object(r),!0).forEach(function(n){Rt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var qm={insertNodes(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m.withoutNormalizing(e,()=>{var{hanging:n=!1,voids:i=!1,mode:o="lowest"}=r,{at:a,match:u,select:s}=r;if(N.isNode(t)&&(t=[t]),t.length!==0){var[l]=t;if(a||(e.selection?a=e.selection:e.children.length>0?a=m.end(e,[]):a=[0],s=!0),s==null&&(s=!1),O.isRange(a))if(n||(a=m.unhangRange(e,a)),O.isCollapsed(a))a=a.anchor;else{var[,f]=O.edges(a),c=m.pointRef(e,f);$.delete(e,{at:a}),a=c.unref()}if(Z.isPoint(a)){u==null&&(W.isText(l)?u=x=>W.isText(x):e.isInline(l)?u=x=>W.isText(x)||m.isInline(e,x):u=x=>m.isBlock(e,x));var[d]=m.nodes(e,{at:a.path,match:u,mode:o,voids:i});if(d){var[,p]=d,h=m.pathRef(e,p),g=m.isEnd(e,a,p);$.splitNodes(e,{at:a,match:u,mode:o,voids:i});var v=h.unref();a=g?w.next(v):v}else return}var D=w.parent(a),C=a[a.length-1];if(!(!i&&m.void(e,{at:D}))){for(var b of t){var B=D.concat(C);C++,e.apply({type:"insert_node",path:B,node:b}),a=w.next(a)}if(a=w.previous(a),s){var E=m.end(e,a);E&&$.select(e,E)}}}})},liftNodes(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var{at:r=e.selection,mode:n="lowest",voids:i=!1}=t,{match:o}=t;if(o==null&&(o=w.isPath(r)?Xr(e,r):b=>m.isBlock(e,b)),!!r){var a=m.nodes(e,{at:r,match:o,mode:n,voids:i}),u=Array.from(a,b=>{var[,B]=b;return m.pathRef(e,B)});for(var s of u){var l=s.unref();if(l.length<2)throw new Error("Cannot lift node at a path [".concat(l,"] because it has a depth of less than `2`."));var f=m.node(e,w.parent(l)),[c,d]=f,p=l[l.length-1],{length:h}=c.children;if(h===1){var g=w.next(d);$.moveNodes(e,{at:l,to:g,voids:i}),$.removeNodes(e,{at:d,voids:i})}else if(p===0)$.moveNodes(e,{at:l,to:d,voids:i});else if(p===h-1){var v=w.next(d);$.moveNodes(e,{at:l,to:v,voids:i})}else{var D=w.next(l),C=w.next(d);$.splitNodes(e,{at:D,voids:i}),$.moveNodes(e,{at:l,to:C,voids:i})}}}})},mergeNodes(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var{match:r,at:n=e.selection}=t,{hanging:i=!1,voids:o=!1,mode:a="lowest"}=t;if(n){if(r==null)if(w.isPath(n)){var[u]=m.parent(e,n);r=k=>u.children.includes(k)}else r=k=>m.isBlock(e,k);if(!i&&O.isRange(n)&&(n=m.unhangRange(e,n)),O.isRange(n))if(O.isCollapsed(n))n=n.anchor;else{var[,s]=O.edges(n),l=m.pointRef(e,s);$.delete(e,{at:n}),n=l.unref(),t.at==null&&$.select(e,n)}var[f]=m.nodes(e,{at:n,match:r,voids:o,mode:a}),c=m.previous(e,{at:n,match:r,voids:o,mode:a});if(!(!f||!c)){var[d,p]=f,[h,g]=c;if(!(p.length===0||g.length===0)){var v=w.next(g),D=w.common(p,g),C=w.isSibling(p,g),b=Array.from(m.levels(e,{at:p}),k=>{var[L]=k;return L}).slice(D.length).slice(0,-1),B=m.above(e,{at:p,mode:"highest",match:k=>b.includes(k)&&ep(e,k)}),E=B&&m.pathRef(e,B[1]),x,_;if(W.isText(d)&&W.isText(h)){var T=jt(d,zm);_=h.text.length,x=T}else if(Q.isElement(d)&&Q.isElement(h)){var T=jt(d,Wm);_=h.children.length,x=T}else throw new Error("Cannot merge the node at path [".concat(p,"] with the previous sibling because it is not the same kind: ").concat(JSON.stringify(d)," ").concat(JSON.stringify(h)));C||$.moveNodes(e,{at:p,to:v,voids:o}),E&&$.removeNodes(e,{at:E.current,voids:o}),Q.isElement(h)&&m.isEmpty(e,h)||W.isText(h)&&h.text===""&&g[g.length-1]!==0?$.removeNodes(e,{at:g,voids:o}):e.apply({type:"merge_node",path:v,position:_,properties:x}),E&&E.unref()}}}})},moveNodes(e,t){m.withoutNormalizing(e,()=>{var{to:r,at:n=e.selection,mode:i="lowest",voids:o=!1}=t,{match:a}=t;if(n){a==null&&(a=w.isPath(n)?Xr(e,n):p=>m.isBlock(e,p));var u=m.pathRef(e,r),s=m.nodes(e,{at:n,match:a,mode:i,voids:o}),l=Array.from(s,p=>{var[,h]=p;return m.pathRef(e,h)});for(var f of l){var c=f.unref(),d=u.current;c.length!==0&&e.apply({type:"move_node",path:c,newPath:d}),u.current&&w.isSibling(d,c)&&w.isAfter(d,c)&&(u.current=w.next(u.current))}u.unref()}})},removeNodes(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var{hanging:r=!1,voids:n=!1,mode:i="lowest"}=t,{at:o=e.selection,match:a}=t;if(o){a==null&&(a=w.isPath(o)?Xr(e,o):d=>m.isBlock(e,d)),!r&&O.isRange(o)&&(o=m.unhangRange(e,o));var u=m.nodes(e,{at:o,match:a,mode:i,voids:n}),s=Array.from(u,d=>{var[,p]=d;return m.pathRef(e,p)});for(var l of s){var f=l.unref();if(f){var[c]=m.node(e,f);e.apply({type:"remove_node",path:f,node:c})}}}})},setNodes(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m.withoutNormalizing(e,()=>{var{match:n,at:i=e.selection}=r,{hanging:o=!1,mode:a="lowest",split:u=!1,voids:s=!1}=r;if(i){if(n==null&&(n=w.isPath(i)?Xr(e,i):E=>m.isBlock(e,E)),!o&&O.isRange(i)&&(i=m.unhangRange(e,i)),u&&O.isRange(i)){if(O.isCollapsed(i)&&m.leaf(e,i.anchor)[0].text.length>0)return;var l=m.rangeRef(e,i,{affinity:"inward"}),[f,c]=O.edges(i),d=a==="lowest"?"lowest":"highest",p=m.isEnd(e,c,c.path);$.splitNodes(e,{at:c,match:n,mode:d,voids:s,always:!p});var h=m.isStart(e,f,f.path);$.splitNodes(e,{at:f,match:n,mode:d,voids:s,always:!h}),i=l.unref(),r.at==null&&$.select(e,i)}for(var[g,v]of m.nodes(e,{at:i,match:n,mode:a,voids:s})){var D={},C={};if(v.length!==0){var b=!1;for(var B in t)B==="children"||B==="text"||t[B]!==g[B]&&(b=!0,g.hasOwnProperty(B)&&(D[B]=g[B]),t[B]!=null&&(C[B]=t[B]));b&&e.apply({type:"set_node",path:v,properties:D,newProperties:C})}}}})},splitNodes(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var{mode:r="lowest",voids:n=!1}=t,{match:i,at:o=e.selection,height:a=0,always:u=!1}=t;if(i==null&&(i=re=>m.isBlock(e,re)),O.isRange(o)&&(o=Vm(e,o)),w.isPath(o)){var s=o,l=m.point(e,s),[f]=m.parent(e,s);i=re=>re===f,a=l.path.length-s.length+1,o=l,u=!0}if(o){var c=m.pointRef(e,o,{affinity:"backward"}),[d]=m.nodes(e,{at:o,match:i,mode:r,voids:n});if(d){var p=m.void(e,{at:o,mode:"highest"}),h=0;if(!n&&p){var[g,v]=p;if(Q.isElement(g)&&e.isInline(g)){var D=m.after(e,v);if(!D){var C={text:""},b=w.next(v);$.insertNodes(e,C,{at:b,voids:n}),D=m.point(e,b)}o=D,u=!0}var B=o.path.length-v.length;a=B+1,u=!0}var E=m.pointRef(e,o),x=o.path.length-a,[,_]=d,T=o.path.slice(0,x),k=a===0?o.offset:o.path[x]+h;for(var[L,R]of m.levels(e,{at:T,reverse:!0,voids:n})){var S=!1;if(R.length<_.length||R.length===0||!n&&m.isVoid(e,L))break;var z=c.current,G=m.isEnd(e,z,R);if(u||!c||!m.isEdge(e,z,R)){S=!0;var X=N.extractProps(L);e.apply({type:"split_node",path:R,position:k,properties:X})}k=R[R.length-1]+(S||G?1:0)}if(t.at==null){var te=E.current||m.end(e,[]);$.select(e,te)}c.unref(),E.unref()}}})},unsetNodes(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Array.isArray(t)||(t=[t]);var n={};for(var i of t)n[i]=null;$.setNodes(e,n,r)},unwrapNodes(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var{mode:r="lowest",split:n=!1,voids:i=!1}=t,{at:o=e.selection,match:a}=t;if(o){a==null&&(a=w.isPath(o)?Xr(e,o):d=>m.isBlock(e,d)),w.isPath(o)&&(o=m.range(e,o));var u=O.isRange(o)?m.rangeRef(e,o):null,s=m.nodes(e,{at:o,match:a,mode:r,voids:i}),l=Array.from(s,d=>{var[,p]=d;return m.pathRef(e,p)}).reverse(),f=function(p){var h=p.unref(),[g]=m.node(e,h),v=m.range(e,h);n&&u&&(v=O.intersection(u.current,v)),$.liftNodes(e,{at:v,match:D=>Q.isAncestor(g)&&g.children.includes(D),voids:i})};for(var c of l)f(c);u&&u.unref()}})},wrapNodes(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m.withoutNormalizing(e,()=>{var{mode:n="lowest",split:i=!1,voids:o=!1}=r,{match:a,at:u=e.selection}=r;if(u){if(a==null&&(w.isPath(u)?a=Xr(e,u):e.isInline(t)?a=v=>m.isInline(e,v)||W.isText(v):a=v=>m.isBlock(e,v)),i&&O.isRange(u)){var[s,l]=O.edges(u),f=m.rangeRef(e,u,{affinity:"inward"});$.splitNodes(e,{at:l,match:a,voids:o}),$.splitNodes(e,{at:s,match:a,voids:o}),u=f.unref(),r.at==null&&$.select(e,u)}var c=Array.from(m.nodes(e,{at:u,match:e.isInline(t)?v=>m.isBlock(e,v):v=>m.isEditor(v),mode:"lowest",voids:o}));for(var[,d]of c){var p=O.isRange(u)?O.intersection(u,m.range(e,d)):u;if(p){var h=Array.from(m.nodes(e,{at:p,match:a,mode:n,voids:o}));if(h.length>0){var g=function(){var[v]=h,D=h[h.length-1],[,C]=v,[,b]=D;if(C.length===0&&b.length===0)return"continue";var B=w.equals(C,b)?w.parent(C):w.common(C,b),E=m.range(e,C,b),x=m.node(e,B),[_]=x,T=B.length+1,k=w.next(b.slice(0,T)),L=yf(yf({},t),{},{children:[]});$.insertNodes(e,L,{at:k,voids:o}),$.moveNodes(e,{at:E,match:R=>Q.isAncestor(_)&&_.children.includes(R),to:k.concat(0),voids:o})}();if(g==="continue")continue}}}}})}},ep=(e,t)=>{if(Q.isElement(t)){var r=t;return m.isVoid(e,t)?!0:r.children.length===1?ep(e,r.children[0]):!1}else return!m.isEditor(t)},Vm=(e,t)=>{if(O.isCollapsed(t))return t.anchor;var[,r]=O.edges(t),n=m.pointRef(e,r);return $.delete(e,{at:t}),n.unref()},Xr=(e,t)=>{var[r]=m.node(e,t);return n=>n===r};function Df(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Cf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Df(Object(r),!0).forEach(function(n){Rt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Df(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Km={collapse(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{edge:r="anchor"}=t,{selection:n}=e;if(n){if(r==="anchor")$.select(e,n.anchor);else if(r==="focus")$.select(e,n.focus);else if(r==="start"){var[i]=O.edges(n);$.select(e,i)}else if(r==="end"){var[,o]=O.edges(n);$.select(e,o)}}else return},deselect(e){var{selection:t}=e;t&&e.apply({type:"set_selection",properties:t,newProperties:null})},move(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:r}=e,{distance:n=1,unit:i="character",reverse:o=!1}=t,{edge:a=null}=t;if(r){a==="start"&&(a=O.isBackward(r)?"focus":"anchor"),a==="end"&&(a=O.isBackward(r)?"anchor":"focus");var{anchor:u,focus:s}=r,l={distance:n,unit:i},f={};if(a==null||a==="anchor"){var c=o?m.before(e,u,l):m.after(e,u,l);c&&(f.anchor=c)}if(a==null||a==="focus"){var d=o?m.before(e,s,l):m.after(e,s,l);d&&(f.focus=d)}$.setSelection(e,f)}},select(e,t){var{selection:r}=e;if(t=m.range(e,t),r){$.setSelection(e,t);return}if(!O.isRange(t))throw new Error("When setting the selection and the current selection is `null` you must provide at least an `anchor` and `focus`, but you passed: ".concat(JSON.stringify(t)));e.apply({type:"set_selection",properties:r,newProperties:t})},setPoint(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{selection:n}=e,{edge:i="both"}=r;if(n){i==="start"&&(i=O.isBackward(n)?"focus":"anchor"),i==="end"&&(i=O.isBackward(n)?"anchor":"focus");var{anchor:o,focus:a}=n,u=i==="anchor"?o:a;$.setSelection(e,{[i==="anchor"?"anchor":"focus"]:Cf(Cf({},u),t)})}},setSelection(e,t){var{selection:r}=e,n={},i={};if(r){for(var o in t)(o==="anchor"&&t.anchor!=null&&!Z.equals(t.anchor,r.anchor)||o==="focus"&&t.focus!=null&&!Z.equals(t.focus,r.focus)||o!=="anchor"&&o!=="focus"&&t[o]!==r[o])&&(n[o]=r[o],i[o]=t[o]);Object.keys(n).length>0&&e.apply({type:"set_selection",properties:n,newProperties:i})}}},Gm={delete(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var{reverse:r=!1,unit:n="character",distance:i=1,voids:o=!1}=t,{at:a=e.selection,hanging:u=!1}=t;if(a){if(O.isRange(a)&&O.isCollapsed(a)&&(a=a.anchor),Z.isPoint(a)){var s=m.void(e,{at:a,mode:"highest"});if(!o&&s){var[,l]=s;a=l}else{var f={unit:n,distance:i},c=r?m.before(e,a,f)||m.start(e,[]):m.after(e,a,f)||m.end(e,[]);a={anchor:a,focus:c},u=!0}}if(w.isPath(a)){$.removeNodes(e,{at:a,voids:o});return}if(!O.isCollapsed(a)){if(!u){var[,d]=O.edges(a),p=m.end(e,[]);Z.equals(d,p)||(a=m.unhangRange(e,a,{voids:o}))}var[h,g]=O.edges(a),v=m.above(e,{match:Ie=>m.isBlock(e,Ie),at:h,voids:o}),D=m.above(e,{match:Ie=>m.isBlock(e,Ie),at:g,voids:o}),C=v&&D&&!w.equals(v[1],D[1]),b=w.equals(h.path,g.path),B=o?null:m.void(e,{at:h,mode:"highest"}),E=o?null:m.void(e,{at:g,mode:"highest"});if(B){var x=m.before(e,h);x&&v&&w.isAncestor(v[1],x.path)&&(h=x)}if(E){var _=m.after(e,g);_&&D&&w.isAncestor(D[1],_.path)&&(g=_)}var T=[],k;for(var L of m.nodes(e,{at:a,voids:o})){var[R,S]=L;k&&w.compare(S,k)===0||(!o&&m.isVoid(e,R)||!w.isCommon(S,h.path)&&!w.isCommon(S,g.path))&&(T.push(L),k=S)}var z=Array.from(T,Ie=>{var[,er]=Ie;return m.pathRef(e,er)}),G=m.pointRef(e,h),X=m.pointRef(e,g);if(!b&&!B){var te=G.current,[re]=m.leaf(e,te),{path:ke}=te,{offset:he}=h,V=re.text.slice(he);V.length>0&&e.apply({type:"remove_text",path:ke,offset:he,text:V})}for(var Oe of z){var le=Oe.unref();$.removeNodes(e,{at:le,voids:o})}if(!E){var ue=X.current,[J]=m.leaf(e,ue),{path:ne}=ue,oe=b?h.offset:0,De=J.text.slice(oe,g.offset);De.length>0&&e.apply({type:"remove_text",path:ne,offset:oe,text:De})}!b&&C&&X.current&&G.current&&$.mergeNodes(e,{at:X.current,hanging:!0,voids:o});var Me=r?G.unref()||X.unref():X.unref()||G.unref();t.at==null&&Me&&$.select(e,Me)}}})},insertFragment(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m.withoutNormalizing(e,()=>{var{hanging:n=!1,voids:i=!1}=r,{at:o=e.selection}=r;if(t.length){if(o)if(O.isRange(o))if(n||(o=m.unhangRange(e,o)),O.isCollapsed(o))o=o.anchor;else{var[,a]=O.edges(o);if(!i&&m.void(e,{at:a}))return;var u=m.pointRef(e,a);$.delete(e,{at:o}),o=u.unref()}else w.isPath(o)&&(o=m.start(e,o));else return;if(!(!i&&m.void(e,{at:o}))){var s=m.above(e,{at:o,match:J=>m.isInline(e,J),mode:"highest",voids:i});if(s){var[,l]=s;if(m.isEnd(e,o,l)){var f=m.after(e,l);o=f}else if(m.isStart(e,o,l)){var c=m.before(e,l);o=c}}var d=m.above(e,{match:J=>m.isBlock(e,J),at:o,voids:i}),[,p]=d,h=m.isStart(e,o,p),g=m.isEnd(e,o,p),v=h&&g,D=!h||h&&g,C=!g,[,b]=N.first({children:t},[]),[,B]=N.last({children:t},[]),E=[],x=J=>{var[ne,oe]=J,De=oe.length===0;return De?!1:v?!0:!(D&&w.isAncestor(oe,b)&&Q.isElement(ne)&&!e.isVoid(ne)&&!e.isInline(ne)||C&&w.isAncestor(oe,B)&&Q.isElement(ne)&&!e.isVoid(ne)&&!e.isInline(ne))};for(var _ of N.nodes({children:t},{pass:x}))x(_)&&E.push(_);var T=[],k=[],L=[],R=!0,S=!1;for(var[z]of E)Q.isElement(z)&&!e.isInline(z)?(R=!1,S=!0,k.push(z)):R?T.push(z):L.push(z);var[G]=m.nodes(e,{at:o,match:J=>W.isText(J)||m.isInline(e,J),mode:"highest",voids:i}),[,X]=G,te=m.isStart(e,o,X),re=m.isEnd(e,o,X),ke=m.pathRef(e,g?w.next(p):p),he=m.pathRef(e,re?w.next(X):X),V=m.pathRef(e,p);$.splitNodes(e,{at:o,match:J=>S?m.isBlock(e,J):W.isText(J)||m.isInline(e,J),mode:S?"lowest":"highest",voids:i});var Oe=m.pathRef(e,!te||te&&re?w.next(X):X);if($.insertNodes(e,T,{at:Oe.current,match:J=>W.isText(J)||m.isInline(e,J),mode:"highest",voids:i}),v&&k.length&&$.delete(e,{at:V.unref(),voids:i}),$.insertNodes(e,k,{at:ke.current,match:J=>m.isBlock(e,J),mode:"lowest",voids:i}),$.insertNodes(e,L,{at:he.current,match:J=>W.isText(J)||m.isInline(e,J),mode:"highest",voids:i}),!r.at){var le;L.length>0?le=w.previous(he.current):k.length>0?le=w.previous(ke.current):le=w.previous(Oe.current);var ue=m.end(e,le);$.select(e,ue)}Oe.unref(),ke.unref(),he.unref()}}})},insertText(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m.withoutNormalizing(e,()=>{var{voids:n=!1}=r,{at:i=e.selection}=r;if(i){if(w.isPath(i)&&(i=m.range(e,i)),O.isRange(i))if(O.isCollapsed(i))i=i.anchor;else{var o=O.end(i);if(!n&&m.void(e,{at:o}))return;var a=O.start(i),u=m.pointRef(e,a);$.delete(e,{at:i,voids:n}),i=u.unref(),$.setSelection(e,{anchor:i,focus:i})}if(!(!n&&m.void(e,{at:i}))){var{path:s,offset:l}=i;t.length>0&&e.apply({type:"insert_text",path:s,offset:l,text:t})}}})}};function bf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function oo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?bf(Object(r),!0).forEach(function(n){Rt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var $=oo(oo(oo(oo({},Hm),qm),Km),Gm),tp=9007199254740991,Jm="[object Arguments]",Xm="[object Function]",Ym="[object GeneratorFunction]",cs="[object Map]",Zm="[object Object]",wf="[object Promise]",fs="[object Set]",Qm="[object String]",Ef="[object WeakMap]",Af="[object DataView]",e1=/[\\^$.*+?()[\]{}|]/g,t1=/^\[object .+?Constructor\]$/,r1=/^(?:0|[1-9]\d*)$/,dl="\\ud800-\\udfff",rp="\\u0300-\\u036f\\ufe20-\\ufe23",np="\\u20d0-\\u20f0",ip="\\ufe0e\\ufe0f",n1="["+dl+"]",ds="["+rp+np+"]",hs="\\ud83c[\\udffb-\\udfff]",i1="(?:"+ds+"|"+hs+")",op="[^"+dl+"]",ap="(?:\\ud83c[\\udde6-\\uddff]){2}",up="[\\ud800-\\udbff][\\udc00-\\udfff]",sp="\\u200d",lp=i1+"?",cp="["+ip+"]?",o1="(?:"+sp+"(?:"+[op,ap,up].join("|")+")"+cp+lp+")*",a1=cp+lp+o1,u1="(?:"+[op+ds+"?",ds,ap,up,n1].join("|")+")",s1=RegExp(hs+"(?="+hs+")|"+u1+a1,"g"),l1=RegExp("["+sp+dl+rp+np+ip+"]"),c1=typeof fe.c=="object"&&fe.c&&fe.c.Object===Object&&fe.c,f1=typeof self=="object"&&self&&self.Object===Object&&self,Ir=c1||f1||Function("return this")();function d1(e,t){for(var r=-1,n=e?e.length:0,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}function h1(e){return e.split("")}function p1(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function g1(e,t){return d1(t,function(r){return e[r]})}function v1(e,t){return e==null?void 0:e[t]}function m1(e){return l1.test(e)}function y1(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}function D1(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}function C1(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}function b1(e,t){return function(r){return e(t(r))}}function w1(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}function E1(e){return m1(e)?A1(e):h1(e)}function A1(e){return e.match(s1)||[]}var B1=Function.prototype,va=Object.prototype,tu=Ir["__core-js_shared__"],Bf=function(){var e=/[^.]+$/.exec(tu&&tu.keys&&tu.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),fp=B1.toString,ma=va.hasOwnProperty,Li=va.toString,F1=RegExp("^"+fp.call(ma).replace(e1,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ff=Ir.Symbol,ru=Ff?Ff.iterator:void 0,x1=va.propertyIsEnumerable,O1=b1(Object.keys,Object),ps=Mi(Ir,"DataView"),gs=Mi(Ir,"Map"),vs=Mi(Ir,"Promise"),ms=Mi(Ir,"Set"),ys=Mi(Ir,"WeakMap"),S1=Ur(ps),_1=Ur(gs),P1=Ur(vs),k1=Ur(ms),T1=Ur(ys);function j1(e,t){var r=dp(e)||H1(e)?p1(e.length,String):[],n=r.length,i=!!n;for(var o in e)ma.call(e,o)&&!(i&&(o=="length"||M1(o,n)))&&r.push(o);return r}function R1(e){return Li.call(e)}function N1(e){if(!pp(e)||I1(e))return!1;var t=hp(e)||y1(e)?F1:t1;return t.test(Ur(e))}function $1(e){if(!U1(e))return O1(e);var t=[];for(var r in Object(e))ma.call(e,r)&&r!="constructor"&&t.push(r);return t}function L1(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}function Mi(e,t){var r=v1(e,t);return N1(r)?r:void 0}var Dr=R1;(ps&&Dr(new ps(new ArrayBuffer(1)))!=Af||gs&&Dr(new gs)!=cs||vs&&Dr(vs.resolve())!=wf||ms&&Dr(new ms)!=fs||ys&&Dr(new ys)!=Ef)&&(Dr=function(e){var t=Li.call(e),r=t==Zm?e.constructor:void 0,n=r?Ur(r):void 0;if(n)switch(n){case S1:return Af;case _1:return cs;case P1:return wf;case k1:return fs;case T1:return Ef}return t});function M1(e,t){return t=t??tp,!!t&&(typeof e=="number"||r1.test(e))&&e>-1&&e%1==0&&e<t}function I1(e){return!!Bf&&Bf in e}function U1(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||va;return e===r}function Ur(e){if(e!=null){try{return fp.call(e)}catch{}try{return e+""}catch{}}return""}function H1(e){return z1(e)&&ma.call(e,"callee")&&(!x1.call(e,"callee")||Li.call(e)==Jm)}var dp=Array.isArray;function hl(e){return e!=null&&W1(e.length)&&!hp(e)}function z1(e){return gp(e)&&hl(e)}function hp(e){var t=pp(e)?Li.call(e):"";return t==Xm||t==Ym}function W1(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=tp}function pp(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function gp(e){return!!e&&typeof e=="object"}function q1(e){return typeof e=="string"||!dp(e)&&gp(e)&&Li.call(e)==Qm}function V1(e){if(!e)return[];if(hl(e))return q1(e)?E1(e):L1(e);if(ru&&e[ru])return D1(e[ru]());var t=Dr(e),r=t==cs?C1:t==fs?w1:G1;return r(e)}function K1(e){return hl(e)?j1(e):$1(e)}function G1(e){return e?g1(e,K1(e)):[]}var J1=V1;const xf=fe.g(J1);var vp=9007199254740991,X1="[object Arguments]",Y1="[object Function]",Z1="[object GeneratorFunction]",Q1=/^(?:0|[1-9]\d*)$/;function ey(e,t){for(var r=-1,n=e?e.length:0;++r<n&&t(e[r],r,e)!==!1;);return e}function ty(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function ry(e,t){return function(r){return e(t(r))}}var ya=Object.prototype,pl=ya.hasOwnProperty,mp=ya.toString,ny=ya.propertyIsEnumerable,iy=ry(Object.keys,Object);function oy(e,t){var r=yp(e)||gy(e)?ty(e.length,String):[],n=r.length,i=!!n;for(var o in e)pl.call(e,o)&&!(i&&(o=="length"||dy(o,n)))&&r.push(o);return r}var ay=cy(sy),uy=fy();function sy(e,t){return e&&uy(e,t,by)}function ly(e){if(!hy(e))return iy(e);var t=[];for(var r in Object(e))pl.call(e,r)&&r!="constructor"&&t.push(r);return t}function cy(e,t){return function(r,n){if(r==null)return r;if(!gl(r))return e(r,n);for(var i=r.length,o=-1,a=Object(r);++o<i&&n(a[o],o,a)!==!1;);return r}}function fy(e){return function(t,r,n){for(var i=-1,o=Object(t),a=n(t),u=a.length;u--;){var s=a[++i];if(r(o[s],s,o)===!1)break}return t}}function dy(e,t){return t=t??vp,!!t&&(typeof e=="number"||Q1.test(e))&&e>-1&&e%1==0&&e<t}function hy(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||ya;return e===r}function py(e,t){var r=yp(e)?ey:ay;return r(e,typeof t=="function"?t:wy)}function gy(e){return vy(e)&&pl.call(e,"callee")&&(!ny.call(e,"callee")||mp.call(e)==X1)}var yp=Array.isArray;function gl(e){return e!=null&&yy(e.length)&&!my(e)}function vy(e){return Cy(e)&&gl(e)}function my(e){var t=Dy(e)?mp.call(e):"";return t==Y1||t==Z1}function yy(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=vp}function Dy(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function Cy(e){return!!e&&typeof e=="object"}function by(e){return gl(e)?oy(e):ly(e)}function wy(e){return e}var Ey=py;const Ay=fe.g(Ey);function By(e,t){return document.createElement(e,t)}function Fy(e,t,r){return document.createElementNS(e,t,r)}function xy(){return Or(document.createDocumentFragment())}function Oy(e){return document.createTextNode(e)}function Sy(e){return document.createComment(e)}function _y(e,t,r){if(Pt(e)){let n=e;for(;n&&Pt(n);)n=Or(n).parent;e=n??e}Pt(t)&&(t=Or(t,e)),r&&Pt(r)&&(r=Or(r).firstChildNode),e.insertBefore(t,r)}function Py(e,t){e.removeChild(t)}function ky(e,t){Pt(t)&&(t=Or(t,e)),e.appendChild(t)}function Dp(e){if(Pt(e)){for(;e&&Pt(e);)e=Or(e).parent;return e??null}return e.parentNode}function Ty(e){var t;if(Pt(e)){const r=Or(e),n=Dp(r);if(n&&r.lastChildNode){const i=Array.from(n.childNodes),o=i.indexOf(r.lastChildNode);return(t=i[o+1])!==null&&t!==void 0?t:null}return null}return e.nextSibling}function jy(e){return e.tagName}function Ry(e,t){e.textContent=t}function Ny(e){return e.textContent}function $y(e){return e.nodeType===1}function Ly(e){return e.nodeType===3}function My(e){return e.nodeType===8}function Pt(e){return e.nodeType===11}function Or(e,t){var r,n,i;const o=e;return(r=o.parent)!==null&&r!==void 0||(o.parent=t??null),(n=o.firstChildNode)!==null&&n!==void 0||(o.firstChildNode=e.firstChild),(i=o.lastChildNode)!==null&&i!==void 0||(o.lastChildNode=e.lastChild),o}const Iy={createElement:By,createElementNS:Fy,createTextNode:Oy,createDocumentFragment:xy,createComment:Sy,insertBefore:_y,removeChild:Py,appendChild:ky,parentNode:Dp,nextSibling:Ty,tagName:jy,setTextContent:Ry,getTextContent:Ny,isElement:$y,isText:Ly,isComment:My,isDocumentFragment:Pt};function vn(e,t,r,n,i){const o=t===void 0?void 0:t.key;return{sel:e,data:t,children:r,text:n,elm:i,key:o}}const Vo=Array.isArray;function Ao(e){return typeof e=="string"||typeof e=="number"||e instanceof String||e instanceof Number}const nu=vn("",{},[],void 0,void 0);function Un(e,t){var r,n;const i=e.key===t.key,o=((r=e.data)===null||r===void 0?void 0:r.is)===((n=t.data)===null||n===void 0?void 0:n.is),a=e.sel===t.sel,u=!e.sel&&e.sel===t.sel?typeof e.text==typeof t.text:!0;return a&&i&&o&&u}function Uy(){throw new Error("The document fragment is not supported on this platform.")}function Hy(e,t){return e.isElement(t)}function zy(e,t){return e.isDocumentFragment(t)}function Wy(e,t,r){var n;const i={};for(let o=t;o<=r;++o){const a=(n=e[o])===null||n===void 0?void 0:n.key;a!==void 0&&(i[a]=o)}return i}const qy=["create","update","remove","destroy","pre","post"];function Vy(e,t,r){const n={create:[],update:[],remove:[],destroy:[],pre:[],post:[]},i=Iy;for(const h of qy)for(const g of e){const v=g[h];v!==void 0&&n[h].push(v)}function o(h){const g=h.id?"#"+h.id:"",v=h.getAttribute("class"),D=v?"."+v.split(" ").join("."):"";return vn(i.tagName(h).toLowerCase()+g+D,{},[],void 0,h)}function a(h){return vn(void 0,{},[],void 0,h)}function u(h,g){return function(){if(--g===0){const D=i.parentNode(h);D!==null&&i.removeChild(D,h)}}}function s(h,g){var v,D,C,b,B;let E;const x=h.data,_=x==null?void 0:x.hook;(v=_==null?void 0:_.init)===null||v===void 0||v.call(_,h);const T=h.children,k=h.sel;if(k==="!")(D=h.text)!==null&&D!==void 0||(h.text=""),h.elm=i.createComment(h.text);else if(k==="")h.elm=i.createTextNode(h.text);else if(k!==void 0){const L=k.indexOf("#"),R=k.indexOf(".",L),S=L>0?L:k.length,z=R>0?R:k.length,G=L!==-1||R!==-1?k.slice(0,Math.min(S,z)):k,X=x==null?void 0:x.ns,te=X===void 0?i.createElement(G,x):i.createElementNS(X,G,x);for(h.elm=te,S<z&&te.setAttribute("id",k.slice(S+1,z)),R>0&&te.setAttribute("class",k.slice(z+1).replace(/\./g," ")),E=0;E<n.create.length;++E)n.create[E](nu,h);if(Ao(h.text)&&(!Vo(T)||T.length===0)&&i.appendChild(te,i.createTextNode(h.text)),Vo(T))for(E=0;E<T.length;++E){const re=T[E];re!=null&&i.appendChild(te,s(re,g))}_!==void 0&&((C=_.create)===null||C===void 0||C.call(_,nu,h),_.insert!==void 0&&g.push(h))}else if(!((b=void 0)===null||b===void 0)&&b.fragments&&h.children){for(h.elm=((B=i.createDocumentFragment)!==null&&B!==void 0?B:Uy)(),E=0;E<n.create.length;++E)n.create[E](nu,h);for(E=0;E<h.children.length;++E){const L=h.children[E];L!=null&&i.appendChild(h.elm,s(L,g))}}else h.elm=i.createTextNode(h.text);return h.elm}function l(h,g,v,D,C,b){for(;D<=C;++D){const B=v[D];B!=null&&i.insertBefore(h,s(B,b),g)}}function f(h){var g,v;const D=h.data;if(D!==void 0){(v=(g=D==null?void 0:D.hook)===null||g===void 0?void 0:g.destroy)===null||v===void 0||v.call(g,h);for(let C=0;C<n.destroy.length;++C)n.destroy[C](h);if(h.children!==void 0)for(let C=0;C<h.children.length;++C){const b=h.children[C];b!=null&&typeof b!="string"&&f(b)}}}function c(h,g,v,D){for(var C,b;v<=D;++v){let B;const E=g[v];if(E!=null)if(E.sel!==void 0){f(E),B=n.remove.length+1;const x=u(E.elm,B);for(let T=0;T<n.remove.length;++T)n.remove[T](E,x);const _=(b=(C=E==null?void 0:E.data)===null||C===void 0?void 0:C.hook)===null||b===void 0?void 0:b.remove;_!==void 0?_(E,x):x()}else E.children?(f(E),c(h,E.children,0,E.children.length-1)):i.removeChild(h,E.elm)}}function d(h,g,v,D){let C=0,b=0,B=g.length-1,E=g[0],x=g[B],_=v.length-1,T=v[0],k=v[_],L,R,S,z;for(;C<=B&&b<=_;)E==null?E=g[++C]:x==null?x=g[--B]:T==null?T=v[++b]:k==null?k=v[--_]:Un(E,T)?(p(E,T,D),E=g[++C],T=v[++b]):Un(x,k)?(p(x,k,D),x=g[--B],k=v[--_]):Un(E,k)?(p(E,k,D),i.insertBefore(h,E.elm,i.nextSibling(x.elm)),E=g[++C],k=v[--_]):Un(x,T)?(p(x,T,D),i.insertBefore(h,x.elm,E.elm),x=g[--B],T=v[++b]):(L===void 0&&(L=Wy(g,C,B)),R=L[T.key],R===void 0?(i.insertBefore(h,s(T,D),E.elm),T=v[++b]):L[k.key]===void 0?(i.insertBefore(h,s(k,D),i.nextSibling(x.elm)),k=v[--_]):(S=g[R],S.sel!==T.sel?i.insertBefore(h,s(T,D),E.elm):(p(S,T,D),g[R]=void 0,i.insertBefore(h,S.elm,E.elm)),T=v[++b]));b<=_&&(z=v[_+1]==null?null:v[_+1].elm,l(h,z,v,b,_,D)),C<=B&&c(h,g,C,B)}function p(h,g,v){var D,C,b,B,E,x,_,T;const k=(D=g.data)===null||D===void 0?void 0:D.hook;(C=k==null?void 0:k.prepatch)===null||C===void 0||C.call(k,h,g);const L=g.elm=h.elm;if(h===g)return;if(g.data!==void 0||g.text!==void 0&&g.text!==h.text){(b=g.data)!==null&&b!==void 0||(g.data={}),(B=h.data)!==null&&B!==void 0||(h.data={});for(let z=0;z<n.update.length;++z)n.update[z](h,g);(_=(x=(E=g.data)===null||E===void 0?void 0:E.hook)===null||x===void 0?void 0:x.update)===null||_===void 0||_.call(x,h,g)}const R=h.children,S=g.children;g.text===void 0?R!==void 0&&S!==void 0?R!==S&&d(L,R,S,v):S!==void 0?(h.text!==void 0&&i.setTextContent(L,""),l(L,null,S,0,S.length-1,v)):R!==void 0?c(L,R,0,R.length-1):h.text!==void 0&&i.setTextContent(L,""):h.text!==g.text&&(R!==void 0&&c(L,R,0,R.length-1),i.setTextContent(L,g.text)),(T=k==null?void 0:k.postpatch)===null||T===void 0||T.call(k,h,g)}return function(g,v){let D,C,b;const B=[];for(D=0;D<n.pre.length;++D)n.pre[D]();for(Hy(i,g)?g=o(g):zy(i,g)&&(g=a(g)),Un(g,v)?p(g,v,B):(C=g.elm,b=i.parentNode(C),s(v,B),b!==null&&(i.insertBefore(b,v.elm,i.nextSibling(C)),c(b,[g],0,0))),D=0;D<B.length;++D)B[D].data.hook.insert(B[D]);for(D=0;D<n.post.length;++D)n.post[D]();return v}}function Cp(e,t,r){if(e.ns="http://www.w3.org/2000/svg",r!=="foreignObject"&&t!==void 0)for(let n=0;n<t.length;++n){const i=t[n];if(typeof i=="string")continue;const o=i.data;o!==void 0&&Cp(o,i.children,i.sel)}}function Ko(e,t,r){let n={},i,o,a;if(r!==void 0?(t!==null&&(n=t),Vo(r)?i=r:Ao(r)?o=r.toString():r&&r.sel&&(i=[r])):t!=null&&(Vo(t)?i=t:Ao(t)?o=t.toString():t&&t.sel?i=[t]:n=t),i!==void 0)for(a=0;a<i.length;++a)Ao(i[a])&&(i[a]=vn(void 0,void 0,void 0,i[a],void 0));return e.startsWith("svg")&&(e.length===3||e[3]==="."||e[3]==="#")&&Cp(n,i,e),vn(e,n,i,o,void 0)}const Ky="http://www.w3.org/1999/xlink",Gy="http://www.w3.org/2000/xmlns/",Jy="http://www.w3.org/XML/1998/namespace",Of=58,Xy=120,Yy=109;function Sf(e,t){let r;const n=t.elm;let i=e.data.attrs,o=t.data.attrs;if(!(!i&&!o)&&i!==o){i=i||{},o=o||{};for(r in o){const a=o[r];i[r]!==a&&(a===!0?n.setAttribute(r,""):a===!1?n.removeAttribute(r):r.charCodeAt(0)!==Xy?n.setAttribute(r,a):r.charCodeAt(3)===Of?n.setAttributeNS(Jy,r,a):r.charCodeAt(5)===Of?r.charCodeAt(1)===Yy?n.setAttributeNS(Gy,r,a):n.setAttributeNS(Ky,r,a):n.setAttribute(r,a))}for(r in i)r in o||n.removeAttribute(r)}}const Zy={create:Sf,update:Sf};function _f(e,t){let r,n;const i=t.elm;let o=e.data.class,a=t.data.class;if(!(!o&&!a)&&o!==a){o=o||{},a=a||{};for(n in o)o[n]&&!Object.prototype.hasOwnProperty.call(a,n)&&i.classList.remove(n);for(n in a)r=a[n],r!==o[n]&&i.classList[r?"add":"remove"](n)}}const Qy={create:_f,update:_f},Pf=/[A-Z]/g;function kf(e,t){const r=t.elm;let n=e.data.dataset,i=t.data.dataset,o;if(!n&&!i||n===i)return;n=n||{},i=i||{};const a=r.dataset;for(o in n)o in i||(a?o in a&&delete a[o]:r.removeAttribute("data-"+o.replace(Pf,"-$&").toLowerCase()));for(o in i)n[o]!==i[o]&&(a?a[o]=i[o]:r.setAttribute("data-"+o.replace(Pf,"-$&").toLowerCase(),i[o]))}const eD={create:kf,update:kf};function bp(e,t,r){if(typeof e=="function")e.call(t,r,t);else if(typeof e=="object")for(let n=0;n<e.length;n++)bp(e[n],t,r)}function tD(e,t){const r=e.type,n=t.data.on;n&&n[r]&&bp(n[r],t,e)}function rD(){return function e(t){tD(t,e.vnode)}}function iu(e,t){const r=e.data.on,n=e.listener,i=e.elm,o=t&&t.data.on,a=t&&t.elm;let u;if(r!==o){if(r&&n)if(o)for(u in r)o[u]||i.removeEventListener(u,n,!1);else for(u in r)i.removeEventListener(u,n,!1);if(o){const s=t.listener=e.listener||rD();if(s.vnode=t,r)for(u in o)r[u]||a.addEventListener(u,s,!1);else for(u in o)a.addEventListener(u,s,!1)}}}const nD={create:iu,update:iu,destroy:iu};function Tf(e,t){let r,n,i;const o=t.elm;let a=e.data.props,u=t.data.props;if(!(!a&&!u)&&a!==u){a=a||{},u=u||{};for(r in u)n=u[r],i=a[r],i!==n&&(r!=="value"||o[r]!==n)&&(o[r]=n)}}const iD={create:Tf,update:Tf},jf=typeof(window==null?void 0:window.requestAnimationFrame)=="function"?window.requestAnimationFrame.bind(window):setTimeout,oD=e=>{jf(()=>{jf(e)})};let Ds=!1;function aD(e,t,r){oD(()=>{e[t]=r})}function Rf(e,t){let r,n;const i=t.elm;let o=e.data.style,a=t.data.style;if(!o&&!a||o===a)return;o=o||{},a=a||{};const u="delayed"in o;for(n in o)n in a||(n[0]==="-"&&n[1]==="-"?i.style.removeProperty(n):i.style[n]="");for(n in a)if(r=a[n],n==="delayed"&&a.delayed)for(const s in a.delayed)r=a.delayed[s],(!u||r!==o.delayed[s])&&aD(i.style,s,r);else n!=="remove"&&r!==o[n]&&(n[0]==="-"&&n[1]==="-"?i.style.setProperty(n,r):i.style[n]=r)}function uD(e){let t,r;const n=e.elm,i=e.data.style;if(!(!i||!(t=i.destroy)))for(r in t)n.style[r]=t[r]}function sD(e,t){const r=e.data.style;if(!r||!r.remove){t();return}Ds||(e.elm.offsetLeft,Ds=!0);let n;const i=e.elm;let o=0;const a=r.remove;let u=0;const s=[];for(n in a)s.push(n),i.style[n]=a[n];const f=getComputedStyle(i)["transition-property"].split(", ");for(;o<f.length;++o)s.indexOf(f[o])!==-1&&u++;i.addEventListener("transitionend",c=>{c.target===i&&--u,u===0&&t()})}function lD(){Ds=!1}const cD={pre:lD,create:Rf,update:Rf,destroy:uD,remove:sD};function wp(e,t){for(const r of e)r!=null&&r!==!1&&r!==""&&(Array.isArray(r)?wp(r,t):typeof r=="string"||typeof r=="number"||typeof r=="boolean"?t.push(vn(void 0,void 0,void 0,String(r),void 0)):t.push(r));return t}function Jt(e,t,...r){const n=wp(r,[]);return typeof e=="function"?e(t,n):n.length===1&&!n[0].sel&&n[0].text?Ko(e,t,n[0].text):Ko(e,t,n)}var fD="[object Symbol]",dD=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,hD=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Da="\\ud800-\\udfff",Ep="\\u0300-\\u036f\\ufe20-\\ufe23",Ap="\\u20d0-\\u20f0",Bp="\\u2700-\\u27bf",Fp="a-z\\xdf-\\xf6\\xf8-\\xff",pD="\\xac\\xb1\\xd7\\xf7",gD="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",vD="\\u2000-\\u206f",mD=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",xp="A-Z\\xc0-\\xd6\\xd8-\\xde",Op="\\ufe0e\\ufe0f",Sp=pD+gD+vD+mD,vl="['’]",yD="["+Da+"]",Nf="["+Sp+"]",Go="["+Ep+Ap+"]",_p="\\d+",DD="["+Bp+"]",Pp="["+Fp+"]",kp="[^"+Da+Sp+_p+Bp+Fp+xp+"]",Cs="\\ud83c[\\udffb-\\udfff]",CD="(?:"+Go+"|"+Cs+")",Tp="[^"+Da+"]",ml="(?:\\ud83c[\\udde6-\\uddff]){2}",yl="[\\ud800-\\udbff][\\udc00-\\udfff]",nn="["+xp+"]",jp="\\u200d",$f="(?:"+Pp+"|"+kp+")",bD="(?:"+nn+"|"+kp+")",Lf="(?:"+vl+"(?:d|ll|m|re|s|t|ve))?",Mf="(?:"+vl+"(?:D|LL|M|RE|S|T|VE))?",Rp=CD+"?",Np="["+Op+"]?",wD="(?:"+jp+"(?:"+[Tp,ml,yl].join("|")+")"+Np+Rp+")*",$p=Np+Rp+wD,ED="(?:"+[DD,ml,yl].join("|")+")"+$p,AD="(?:"+[Tp+Go+"?",Go,ml,yl,yD].join("|")+")",BD=RegExp(vl,"g"),FD=RegExp(Go,"g"),xD=RegExp(Cs+"(?="+Cs+")|"+AD+$p,"g"),OD=RegExp([nn+"?"+Pp+"+"+Lf+"(?="+[Nf,nn,"$"].join("|")+")",bD+"+"+Mf+"(?="+[Nf,nn+$f,"$"].join("|")+")",nn+"?"+$f+"+"+Lf,nn+"+"+Mf,_p,ED].join("|"),"g"),SD=RegExp("["+jp+Da+Ep+Ap+Op+"]"),_D=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,PD={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"ss"},kD=typeof fe.c=="object"&&fe.c&&fe.c.Object===Object&&fe.c,TD=typeof self=="object"&&self&&self.Object===Object&&self,jD=kD||TD||Function("return this")();function RD(e,t,r,n){for(var i=-1,o=e?e.length:0;++i<o;)r=t(r,e[i],i,e);return r}function ND(e){return e.split("")}function $D(e){return e.match(dD)||[]}function LD(e){return function(t){return e==null?void 0:e[t]}}var MD=LD(PD);function Lp(e){return SD.test(e)}function ID(e){return _D.test(e)}function UD(e){return Lp(e)?HD(e):ND(e)}function HD(e){return e.match(xD)||[]}function zD(e){return e.match(OD)||[]}var WD=Object.prototype,qD=WD.toString,If=jD.Symbol,Uf=If?If.prototype:void 0,Hf=Uf?Uf.toString:void 0;function VD(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var o=Array(i);++n<i;)o[n]=e[n+t];return o}function KD(e){if(typeof e=="string")return e;if(ZD(e))return Hf?Hf.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function GD(e,t,r){var n=e.length;return r=r===void 0?n:r,!t&&r>=n?e:VD(e,t,r)}function JD(e){return function(t){t=Ca(t);var r=Lp(t)?UD(t):void 0,n=r?r[0]:t.charAt(0),i=r?GD(r,1).join(""):t.slice(1);return n[e]()+i}}function XD(e){return function(t){return RD(nC(tC(t).replace(BD,"")),e,"")}}function YD(e){return!!e&&typeof e=="object"}function ZD(e){return typeof e=="symbol"||YD(e)&&qD.call(e)==fD}function Ca(e){return e==null?"":KD(e)}var QD=XD(function(e,t,r){return t=t.toLowerCase(),e+(r?eC(t):t)});function eC(e){return rC(Ca(e).toLowerCase())}function tC(e){return e=Ca(e),e&&e.replace(hD,MD).replace(FD,"")}var rC=JD("toUpperCase");function nC(e,t,r){return e=Ca(e),t=t,t===void 0?ID(e)?zD(e):$D(e):e.match(t)||[]}var iC=QD;const oC=fe.g(iC);var Nt={};Object.defineProperty(Nt,"__esModule",{value:!0});var aC=typeof window<"u"&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),ou={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},Mp={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:aC?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},Dl={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,escape:27," ":32,pageup:33,pagedown:34,end:35,home:36,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,insert:45,delete:46,meta:91,numlock:144,scrolllock:145,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222};for(var ao=1;ao<20;ao++)Dl["f"+ao]=111+ao;function ba(e,t,r){t&&!("byKey"in t)&&(r=t,t=null),Array.isArray(e)||(e=[e]);var n=e.map(function(a){return Ip(a,t)}),i=function(u){return n.some(function(s){return Up(s,u)})},o=r==null?i:i(r);return o}function uC(e,t){return ba(e,t)}function sC(e,t){return ba(e,{byKey:!0},t)}function Ip(e,t){var r=t&&t.byKey,n={};e=e.replace("++","+add");var i=e.split("+"),o=i.length;for(var a in ou)n[ou[a]]=!1;var u=!0,s=!1,l=void 0;try{for(var f=i[Symbol.iterator](),c;!(u=(c=f.next()).done);u=!0){var d=c.value,p=d.endsWith("?")&&d.length>1;p&&(d=d.slice(0,-1));var h=Cl(d),g=ou[h];if(d.length>1&&!g&&!Mp[d]&&!Dl[h])throw new TypeError('Unknown modifier: "'+d+'"');(o===1||!g)&&(r?n.key=h:n.which=Hp(d)),g&&(n[g]=p?null:!0)}}catch(v){s=!0,l=v}finally{try{!u&&f.return&&f.return()}finally{if(s)throw l}}return n}function Up(e,t){for(var r in e){var n=e[r],i=void 0;if(n!=null&&(r==="key"&&t.key!=null?i=t.key.toLowerCase():r==="which"?i=n===91&&t.which===93?91:t.which:i=t[r],!(i==null&&n===!1)&&i!==n))return!1}return!0}function Hp(e){e=Cl(e);var t=Dl[e]||e.toUpperCase().charCodeAt(0);return t}function Cl(e){return e=e.toLowerCase(),e=Mp[e]||e,e}Nt.default=ba;var lC=Nt.isHotkey=ba;Nt.isCodeHotkey=uC;var au=Nt.isKeyHotkey=sC;Nt.parseHotkey=Ip;Nt.compareHotkey=Up;Nt.toKeyCode=Hp;Nt.toKeyName=Cl;var cC=typeof fe.c=="object"&&fe.c&&fe.c.Object===Object&&fe.c,fC=typeof self=="object"&&self&&self.Object===Object&&self;cC||fC||Function("return this")();var Jo={exports:{}};Jo.exports;(function(e,t){var r=200,n="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",a="[object Array]",u="[object Boolean]",s="[object Date]",l="[object Error]",f="[object Function]",c="[object GeneratorFunction]",d="[object Map]",p="[object Number]",h="[object Object]",g="[object Promise]",v="[object RegExp]",D="[object Set]",C="[object String]",b="[object Symbol]",B="[object WeakMap]",E="[object ArrayBuffer]",x="[object DataView]",_="[object Float32Array]",T="[object Float64Array]",k="[object Int8Array]",L="[object Int16Array]",R="[object Int32Array]",S="[object Uint8Array]",z="[object Uint8ClampedArray]",G="[object Uint16Array]",X="[object Uint32Array]",te=/[\\^$.*+?()[\]{}|]/g,re=/\w*$/,ke=/^\[object .+?Constructor\]$/,he=/^(?:0|[1-9]\d*)$/,V={};V[o]=V[a]=V[E]=V[x]=V[u]=V[s]=V[_]=V[T]=V[k]=V[L]=V[R]=V[d]=V[p]=V[h]=V[v]=V[D]=V[C]=V[b]=V[S]=V[z]=V[G]=V[X]=!0,V[l]=V[f]=V[B]=!1;var Oe=typeof fe.c=="object"&&fe.c&&fe.c.Object===Object&&fe.c,le=typeof self=="object"&&self&&self.Object===Object&&self,ue=Oe||le||Function("return this")(),J=t&&!t.nodeType&&t,ne=J&&!0&&e&&!e.nodeType&&e,oe=ne&&ne.exports===J;function De(y,A){return y.set(A[0],A[1]),y}function Me(y,A){return y.add(A),y}function Ie(y,A){for(var F=-1,H=y?y.length:0;++F<H&&A(y[F],F,y)!==!1;);return y}function er(y,A){for(var F=-1,H=A.length,Se=y.length;++F<H;)y[Se+F]=A[F];return y}function Pn(y,A,F,H){for(var Se=-1,Ue=y?y.length:0;++Se<Ue;)F=A(F,y[Se],Se,y);return F}function Ji(y,A){for(var F=-1,H=Array(y);++F<y;)H[F]=A(F);return H}function kn(y,A){return y==null?void 0:y[A]}function Xi(y){var A=!1;if(y!=null&&typeof y.toString!="function")try{A=!!(y+"")}catch{}return A}function Yi(y){var A=-1,F=Array(y.size);return y.forEach(function(H,Se){F[++A]=[Se,H]}),F}function Tn(y,A){return function(F){return y(A(F))}}function Zi(y){var A=-1,F=Array(y.size);return y.forEach(function(H){F[++A]=H}),F}var Qi=Array.prototype,Ia=Function.prototype,Mt=Object.prototype,tr=ue["__core-js_shared__"],gt=function(){var y=/[^.]+$/.exec(tr&&tr.keys&&tr.keys.IE_PROTO||"");return y?"Symbol(src)_1."+y:""}(),jn=Ia.toString,rt=Mt.hasOwnProperty,Ye=Mt.toString,It=RegExp("^"+jn.call(rt).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Rn=oe?ue.Buffer:void 0,vt=ue.Symbol,rr=ue.Uint8Array,eo=Tn(Object.getPrototypeOf,Object),mt=Object.create,Ua=Mt.propertyIsEnumerable,Ha=Qi.splice,Wr=Object.getOwnPropertySymbols,za=Rn?Rn.isBuffer:void 0,Wa=Tn(Object.keys,Object),Nn=Kr(ue,"DataView"),nr=Kr(ue,"Map"),$n=Kr(ue,"Promise"),Ln=Kr(ue,"Set"),qa=Kr(ue,"WeakMap"),Mn=Kr(Object,"create"),_v=ar(Nn),Pv=ar(nr),kv=ar($n),Tv=ar(Ln),jv=ar(qa),fc=vt?vt.prototype:void 0,dc=fc?fc.valueOf:void 0;function ir(y){var A=-1,F=y?y.length:0;for(this.clear();++A<F;){var H=y[A];this.set(H[0],H[1])}}function Rv(){this.__data__=Mn?Mn(null):{}}function Nv(y){return this.has(y)&&delete this.__data__[y]}function $v(y){var A=this.__data__;if(Mn){var F=A[y];return F===n?void 0:F}return rt.call(A,y)?A[y]:void 0}function Lv(y){var A=this.__data__;return Mn?A[y]!==void 0:rt.call(A,y)}function Mv(y,A){var F=this.__data__;return F[y]=Mn&&A===void 0?n:A,this}ir.prototype.clear=Rv,ir.prototype.delete=Nv,ir.prototype.get=$v,ir.prototype.has=Lv,ir.prototype.set=Mv;function yt(y){var A=-1,F=y?y.length:0;for(this.clear();++A<F;){var H=y[A];this.set(H[0],H[1])}}function Iv(){this.__data__=[]}function Uv(y){var A=this.__data__,F=to(A,y);if(F<0)return!1;var H=A.length-1;return F==H?A.pop():Ha.call(A,F,1),!0}function Hv(y){var A=this.__data__,F=to(A,y);return F<0?void 0:A[F][1]}function zv(y){return to(this.__data__,y)>-1}function Wv(y,A){var F=this.__data__,H=to(F,y);return H<0?F.push([y,A]):F[H][1]=A,this}yt.prototype.clear=Iv,yt.prototype.delete=Uv,yt.prototype.get=Hv,yt.prototype.has=zv,yt.prototype.set=Wv;function qr(y){var A=-1,F=y?y.length:0;for(this.clear();++A<F;){var H=y[A];this.set(H[0],H[1])}}function qv(){this.__data__={hash:new ir,map:new(nr||yt),string:new ir}}function Vv(y){return ro(this,y).delete(y)}function Kv(y){return ro(this,y).get(y)}function Gv(y){return ro(this,y).has(y)}function Jv(y,A){return ro(this,y).set(y,A),this}qr.prototype.clear=qv,qr.prototype.delete=Vv,qr.prototype.get=Kv,qr.prototype.has=Gv,qr.prototype.set=Jv;function Vr(y){this.__data__=new yt(y)}function Xv(){this.__data__=new yt}function Yv(y){return this.__data__.delete(y)}function Zv(y){return this.__data__.get(y)}function Qv(y){return this.__data__.has(y)}function e0(y,A){var F=this.__data__;if(F instanceof yt){var H=F.__data__;if(!nr||H.length<r-1)return H.push([y,A]),this;F=this.__data__=new qr(H)}return F.set(y,A),this}Vr.prototype.clear=Xv,Vr.prototype.delete=Yv,Vr.prototype.get=Zv,Vr.prototype.has=Qv,Vr.prototype.set=e0;function t0(y,A){var F=Ga(y)||B0(y)?Ji(y.length,String):[],H=F.length,Se=!!H;for(var Ue in y)rt.call(y,Ue)&&!(Se&&(Ue=="length"||b0(Ue,H)))&&F.push(Ue);return F}function hc(y,A,F){var H=y[A];(!(rt.call(y,A)&&mc(H,F))||F===void 0&&!(A in y))&&(y[A]=F)}function to(y,A){for(var F=y.length;F--;)if(mc(y[F][0],A))return F;return-1}function r0(y,A){return y&&pc(A,Ja(A),y)}function Va(y,A,F,H,Se,Ue,Dt){var He;if(H&&(He=Ue?H(y,Se,Ue,Dt):H(y)),He!==void 0)return He;if(!no(y))return y;var Cc=Ga(y);if(Cc){if(He=y0(y),!A)return g0(y,He)}else{var Gr=or(y),bc=Gr==f||Gr==c;if(x0(y))return s0(y,A);if(Gr==h||Gr==o||bc&&!Ue){if(Xi(y))return Ue?y:{};if(He=D0(bc?{}:y),!A)return v0(y,r0(He,y))}else{if(!V[Gr])return Ue?y:{};He=C0(y,Gr,Va,A)}}Dt||(Dt=new Vr);var wc=Dt.get(y);if(wc)return wc;if(Dt.set(y,He),!Cc)var Ec=F?m0(y):Ja(y);return Ie(Ec||y,function(Xa,io){Ec&&(io=Xa,Xa=y[io]),hc(He,io,Va(Xa,A,F,H,io,y,Dt))}),He}function n0(y){return no(y)?mt(y):{}}function i0(y,A,F){var H=A(y);return Ga(y)?H:er(H,F(y))}function o0(y){return Ye.call(y)}function a0(y){if(!no(y)||E0(y))return!1;var A=Dc(y)||Xi(y)?It:ke;return A.test(ar(y))}function u0(y){if(!vc(y))return Wa(y);var A=[];for(var F in Object(y))rt.call(y,F)&&F!="constructor"&&A.push(F);return A}function s0(y,A){if(A)return y.slice();var F=new y.constructor(y.length);return y.copy(F),F}function Ka(y){var A=new y.constructor(y.byteLength);return new rr(A).set(new rr(y)),A}function l0(y,A){var F=A?Ka(y.buffer):y.buffer;return new y.constructor(F,y.byteOffset,y.byteLength)}function c0(y,A,F){var H=A?F(Yi(y),!0):Yi(y);return Pn(H,De,new y.constructor)}function f0(y){var A=new y.constructor(y.source,re.exec(y));return A.lastIndex=y.lastIndex,A}function d0(y,A,F){var H=A?F(Zi(y),!0):Zi(y);return Pn(H,Me,new y.constructor)}function h0(y){return dc?Object(dc.call(y)):{}}function p0(y,A){var F=A?Ka(y.buffer):y.buffer;return new y.constructor(F,y.byteOffset,y.length)}function g0(y,A){var F=-1,H=y.length;for(A||(A=Array(H));++F<H;)A[F]=y[F];return A}function pc(y,A,F,H){F||(F={});for(var Se=-1,Ue=A.length;++Se<Ue;){var Dt=A[Se],He=void 0;hc(F,Dt,He===void 0?y[Dt]:He)}return F}function v0(y,A){return pc(y,gc(y),A)}function m0(y){return i0(y,Ja,gc)}function ro(y,A){var F=y.__data__;return w0(A)?F[typeof A=="string"?"string":"hash"]:F.map}function Kr(y,A){var F=kn(y,A);return a0(F)?F:void 0}var gc=Wr?Tn(Wr,Object):_0,or=o0;(Nn&&or(new Nn(new ArrayBuffer(1)))!=x||nr&&or(new nr)!=d||$n&&or($n.resolve())!=g||Ln&&or(new Ln)!=D||qa&&or(new qa)!=B)&&(or=function(y){var A=Ye.call(y),F=A==h?y.constructor:void 0,H=F?ar(F):void 0;if(H)switch(H){case _v:return x;case Pv:return d;case kv:return g;case Tv:return D;case jv:return B}return A});function y0(y){var A=y.length,F=y.constructor(A);return A&&typeof y[0]=="string"&&rt.call(y,"index")&&(F.index=y.index,F.input=y.input),F}function D0(y){return typeof y.constructor=="function"&&!vc(y)?n0(eo(y)):{}}function C0(y,A,F,H){var Se=y.constructor;switch(A){case E:return Ka(y);case u:case s:return new Se(+y);case x:return l0(y,H);case _:case T:case k:case L:case R:case S:case z:case G:case X:return p0(y,H);case d:return c0(y,H,F);case p:case C:return new Se(y);case v:return f0(y);case D:return d0(y,H,F);case b:return h0(y)}}function b0(y,A){return A=A??i,!!A&&(typeof y=="number"||he.test(y))&&y>-1&&y%1==0&&y<A}function w0(y){var A=typeof y;return A=="string"||A=="number"||A=="symbol"||A=="boolean"?y!=="__proto__":y===null}function E0(y){return!!gt&> in y}function vc(y){var A=y&&y.constructor,F=typeof A=="function"&&A.prototype||Mt;return y===F}function ar(y){if(y!=null){try{return jn.call(y)}catch{}try{return y+""}catch{}}return""}function A0(y){return Va(y,!0,!0)}function mc(y,A){return y===A||y!==y&&A!==A}function B0(y){return F0(y)&&rt.call(y,"callee")&&(!Ua.call(y,"callee")||Ye.call(y)==o)}var Ga=Array.isArray;function yc(y){return y!=null&&O0(y.length)&&!Dc(y)}function F0(y){return S0(y)&&yc(y)}var x0=za||P0;function Dc(y){var A=no(y)?Ye.call(y):"";return A==f||A==c}function O0(y){return typeof y=="number"&&y>-1&&y%1==0&&y<=i}function no(y){var A=typeof y;return!!y&&(A=="object"||A=="function")}function S0(y){return!!y&&typeof y=="object"}function Ja(y){return yc(y)?t0(y):u0(y)}function _0(){return[]}function P0(){return!1}e.exports=A0})(Jo,Jo.exports);Jo.exports;var zf={exports:{}},jr={};function uu(e){return e<10?`0${e}`:e.toString()}function dC(){const e=new Date,t=uu(e.getHours()),r=uu(e.getMinutes()),n=uu(e.getSeconds());return`${t}:${r}:${n}`}var hC=dC;Object.defineProperty(jr,"__esModule",{value:!0});jr.justErrorsLogger=jr.debugLogger=void 0;const Bo=hC,pC={debug:()=>{},warn:()=>{},error:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return console.error(`[Uppy] [${Bo()}]`,...t)}};jr.justErrorsLogger=pC;const gC={debug:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return console.debug(`[Uppy] [${Bo()}]`,...t)},warn:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return console.warn(`[Uppy] [${Bo()}]`,...t)},error:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return console.error(`[Uppy] [${Bo()}]`,...t)}};jr.debugLogger=gC;let vC="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",mC=(e=21)=>{let t="",r=e|0;for(;r--;)t+=vC[Math.random()*64|0];return t};var zp={nanoid:mC},qt={},yC=function(t){if(typeof t!="number"||isNaN(t))throw new TypeError("Expected a number, got "+typeof t);var r=t<0,n=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];if(r&&(t=-t),t<1)return(r?"-":"")+t+" B";var i=Math.min(Math.floor(Math.log(t)/Math.log(1024)),n.length-1);t=Number(t/Math.pow(1024,i));var o=n[i];return t>=10||t%1===0?(r?"-":"")+t.toFixed(0)+" "+o:(r?"-":"")+t.toFixed(1)+" "+o};function Wp(e,t){this.text=e=e||"",this.hasWild=~e.indexOf("*"),this.separator=t,this.parts=e.split(t)}Wp.prototype.match=function(e){var t=!0,r=this.parts,n,i=r.length,o;if(typeof e=="string"||e instanceof String)if(!this.hasWild&&this.text!=e)t=!1;else{for(o=(e||"").split(this.separator),n=0;t&&n<i;n++)r[n]!=="*"&&(n<o.length?t=r[n]===o[n]:t=!1);t=t&&o}else if(typeof e.splice=="function")for(t=[],n=e.length;n--;)this.match(e[n])&&(t[t.length]=e[n]);else if(typeof e=="object"){t={};for(var a in e)this.match(a)&&(t[a]=e[a])}return t};var DC=function(e,t,r){var n=new Wp(e,r||/[\/\.]/);return typeof t<"u"?n.match(t):n},CC=DC,bC=/[\/\+\.]/,wC=function(e,t){function r(n){var i=CC(n,e,bC);return i&&i.length>=2}return t?r(t.split(";")[0]):r};Object.defineProperty(qt,"__esModule",{value:!0});qt.defaultOptions=qt.RestrictionError=qt.Restricter=void 0;const su=yC,EC=wC,AC={maxFileSize:null,minFileSize:null,maxTotalFileSize:null,maxNumberOfFiles:null,minNumberOfFiles:null,allowedFileTypes:null,requiredMetaFields:[]};qt.defaultOptions=AC;class zt extends Error{constructor(){super(...arguments),this.isRestriction=!0}}qt.RestrictionError=zt;typeof AggregateError>"u"&&(globalThis.AggregateError=class extends Error{constructor(t,r){super(r),this.errors=t}});class BC{constructor(t,r){this.i18n=r,this.getOpts=()=>{const n=t();if(n.restrictions.allowedFileTypes!=null&&!Array.isArray(n.restrictions.allowedFileTypes))throw new TypeError("`restrictions.allowedFileTypes` must be an array");return n}}validate(t,r){const{maxFileSize:n,minFileSize:i,maxTotalFileSize:o,maxNumberOfFiles:a,allowedFileTypes:u}=this.getOpts().restrictions;if(a&&r.filter(l=>!l.isGhost).length+1>a)throw new zt(`${this.i18n("youCanOnlyUploadX",{smart_count:a})}`);if(u&&!u.some(l=>l.includes("/")?t.type?EC(t.type.replace(/;.*?$/,""),l):!1:l[0]==="."&&t.extension?t.extension.toLowerCase()===l.slice(1).toLowerCase():!1)){const l=u.join(", ");throw new zt(this.i18n("youCanOnlyUploadFileTypes",{types:l}))}if(o&&t.size!=null&&r.reduce((l,f)=>l+f.size,t.size)>o)throw new zt(this.i18n("exceedsSize",{size:su(o),file:t.name}));if(n&&t.size!=null&&t.size>n)throw new zt(this.i18n("exceedsSize",{size:su(n),file:t.name}));if(i&&t.size!=null&&t.size<i)throw new zt(this.i18n("inferiorSize",{size:su(i)}))}validateMinNumberOfFiles(t){const{minNumberOfFiles:r}=this.getOpts().restrictions;if(Object.keys(t).length<r)throw new zt(this.i18n("youHaveToAtLeastSelectX",{smart_count:r}))}getMissingRequiredMetaFields(t){const r=new zt(this.i18n("missingRequiredMetaFieldOnFile",{fileName:t.name})),{requiredMetaFields:n}=this.getOpts().restrictions,i=Object.prototype.hasOwnProperty,o=[];for(const a of n)(!i.call(t.meta,a)||t.meta[a]==="")&&o.push(a);return{missingFields:o,error:r}}}qt.Restricter=BC;function FC(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var qp=FC;function Wf(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var xC=0;function OC(e){return"__private_"+xC+++"_"+e}const SC=qp;function _C(e,t,r){const n=[];return e.forEach(i=>typeof i!="string"?n.push(i):t[Symbol.split](i).forEach((o,a,u)=>{o!==""&&n.push(o),a<u.length-1&&n.push(r)})),n}/**
|
|
9
|
-
* Takes a string with placeholder variables like `%{smart_count} file selected`
|
|
10
|
-
* and replaces it with values from options `{smart_count: 5}`
|
|
11
|
-
*
|
|
12
|
-
* @license https://github.com/airbnb/polyglot.js/blob/master/LICENSE
|
|
13
|
-
* taken from https://github.com/airbnb/polyglot.js/blob/master/lib/polyglot.js#L299
|
|
14
|
-
*
|
|
15
|
-
* @param {string} phrase that needs interpolation, with placeholders
|
|
16
|
-
* @param {object} options with values that will be used to replace placeholders
|
|
17
|
-
* @returns {any[]} interpolated
|
|
18
|
-
*/function qf(e,t){const r=/\$/g,n="$$$$";let i=[e];if(t==null)return i;for(const o of Object.keys(t))if(o!=="_"){let a=t[o];typeof a=="string"&&(a=r[Symbol.replace](a,n)),i=_C(i,new RegExp(`%\\{${o}\\}`,"g"),a)}return i}var Hn=OC("apply");let PC=class{constructor(t){Object.defineProperty(this,Hn,{value:kC}),this.locale={strings:{},pluralize(r){return r===1?0:1}},Array.isArray(t)?t.forEach(Wf(this,Hn)[Hn],this):Wf(this,Hn)[Hn](t)}translate(t,r){return this.translateArray(t,r).join("")}translateArray(t,r){if(!SC(this.locale.strings,t))throw new Error(`missing string: ${t}`);const n=this.locale.strings[t];if(typeof n=="object"){if(r&&typeof r.smart_count<"u"){const o=this.locale.pluralize(r.smart_count);return qf(n[o],r)}throw new Error("Attempted to use a string with plural forms, but no value was given for %{smart_count}")}return qf(n,r)}};function kC(e){if(!(e!=null&&e.strings))return;const t=this.locale;this.locale={...t,strings:{...t.strings,...e.strings}},this.locale.pluralize=e.pluralize||t.pluralize}var Vp=PC,Kp=function(){var t={},r=t._fns={};t.emit=function(a,u,s,l,f,c,d){var p=n(a);p.length&&i(a,p,[u,s,l,f,c,d])},t.on=function(a,u){r[a]||(r[a]=[]),r[a].push(u)},t.once=function(a,u){function s(){u.apply(this,arguments),t.off(a,s)}this.on(a,s)},t.off=function(a,u){var s=[];if(a&&u){var l=this._fns[a],f=0,c=l?l.length:0;for(f;f<c;f++)l[f]!==u&&s.push(l[f])}s.length?this._fns[a]=s:delete this._fns[a]};function n(o){var a=r[o]?r[o]:[],u=o.indexOf(":"),s=u===-1?[o]:[o.substring(0,u),o.substring(u+1)],l=Object.keys(r),f=0,c=l.length;for(f;f<c;f++){var d=l[f];if(d==="*"&&(a=a.concat(r[d])),s.length===2&&s[0]===d){a=a.concat(r[d]);break}}return a}function i(o,a,u){var s=0,l=a.length;for(s;s<l&&a[s];s++)a[s].event=o,a[s].apply(a[s],u)}return t};function TC(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var jC=0;function RC(e){return"__private_"+jC+++"_"+e}const NC={version:"2.1.1"};var lu=RC("publish");let Gp=class{constructor(){Object.defineProperty(this,lu,{value:$C}),this.state={},this.callbacks=[]}getState(){return this.state}setState(t){const r={...this.state},n={...this.state,...t};this.state=n,TC(this,lu)[lu](r,n,t)}subscribe(t){return this.callbacks.push(t),()=>{this.callbacks.splice(this.callbacks.indexOf(t),1)}}};function $C(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];this.callbacks.forEach(n=>{n(...t)})}Gp.VERSION=NC.version;function LC(){return new Gp}var MC=LC;function IC(e){const t=e.lastIndexOf(".");return t===-1||t===e.length-1?{name:e,extension:void 0}:{name:e.slice(0,t),extension:e.slice(t+1)}}var Jp=IC,UC={md:"text/markdown",markdown:"text/markdown",mp4:"video/mp4",mp3:"audio/mp3",svg:"image/svg+xml",jpg:"image/jpeg",png:"image/png",gif:"image/gif",heic:"image/heic",heif:"image/heif",yaml:"text/yaml",yml:"text/yaml",csv:"text/csv",tsv:"text/tab-separated-values",tab:"text/tab-separated-values",avi:"video/x-msvideo",mks:"video/x-matroska",mkv:"video/x-matroska",mov:"video/quicktime",dicom:"application/dicom",doc:"application/msword",docm:"application/vnd.ms-word.document.macroenabled.12",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",dot:"application/msword",dotm:"application/vnd.ms-word.template.macroenabled.12",dotx:"application/vnd.openxmlformats-officedocument.wordprocessingml.template",xla:"application/vnd.ms-excel",xlam:"application/vnd.ms-excel.addin.macroenabled.12",xlc:"application/vnd.ms-excel",xlf:"application/x-xliff+xml",xlm:"application/vnd.ms-excel",xls:"application/vnd.ms-excel",xlsb:"application/vnd.ms-excel.sheet.binary.macroenabled.12",xlsm:"application/vnd.ms-excel.sheet.macroenabled.12",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",xlt:"application/vnd.ms-excel",xltm:"application/vnd.ms-excel.template.macroenabled.12",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template",xlw:"application/vnd.ms-excel",txt:"text/plain",text:"text/plain",conf:"text/plain",log:"text/plain",pdf:"application/pdf",zip:"application/zip","7z":"application/x-7z-compressed",rar:"application/x-rar-compressed",tar:"application/x-tar",gz:"application/gzip",dmg:"application/x-apple-diskimage"};const HC=Jp,Vf=UC;function zC(e){var t;if(e.type)return e.type;const r=e.name?(t=HC(e.name).extension)==null?void 0:t.toLowerCase():null;return r&&r in Vf?Vf[r]:"application/octet-stream"}var WC=zC;function qC(e){return e.charCodeAt(0).toString(32)}function Kf(e){let t="";return e.replace(/[^A-Z0-9]/ig,r=>(t+=`-${qC(r)}`,"/"))+t}function VC(e){let t="uppy";return typeof e.name=="string"&&(t+=`-${Kf(e.name.toLowerCase())}`),e.type!==void 0&&(t+=`-${e.type}`),e.meta&&typeof e.meta.relativePath=="string"&&(t+=`-${Kf(e.meta.relativePath.toLowerCase())}`),e.data.size!==void 0&&(t+=`-${e.data.size}`),e.data.lastModified!==void 0&&(t+=`-${e.data.lastModified}`),t}var KC=VC;function GC(e){if(e==null&&typeof navigator<"u"&&(e=navigator.userAgent),!e)return!0;const t=/Edge\/(\d+\.\d+)/.exec(e);if(!t)return!0;const r=t[1];let[n,i]=r.split(".");return n=parseInt(n,10),i=parseInt(i,10),n<15||n===15&&i<15063||n>18||n===18&&i>=18218}var JC=GC;function XC(e,t){return t.name?t.name:e.split("/")[0]==="image"?`${e.split("/")[0]}.${e.split("/")[1]}`:"noname"}var YC=XC,ZC={strings:{addBulkFilesFailed:{0:"Failed to add %{smart_count} file due to an internal error",1:"Failed to add %{smart_count} files due to internal errors"},youCanOnlyUploadX:{0:"You can only upload %{smart_count} file",1:"You can only upload %{smart_count} files"},youHaveToAtLeastSelectX:{0:"You have to select at least %{smart_count} file",1:"You have to select at least %{smart_count} files"},exceedsSize:"%{file} exceeds maximum allowed size of %{size}",missingRequiredMetaField:"Missing required meta fields",missingRequiredMetaFieldOnFile:"Missing required meta fields in %{fileName}",inferiorSize:"This file is smaller than the allowed size of %{size}",youCanOnlyUploadFileTypes:"You can only upload: %{types}",noMoreFilesAllowed:"Cannot add more files",noDuplicates:"Cannot add the duplicate file '%{fileName}', it already exists",companionError:"Connection with Companion failed",authAborted:"Authentication aborted",companionUnauthorizeHint:"To unauthorize to your %{provider} account, please go to %{url}",failedToUpload:"Failed to upload %{file}",noInternetConnection:"No Internet connection",connectedToInternet:"Connected to the Internet",noFilesFound:"You have no files or folders here",selectX:{0:"Select %{smart_count}",1:"Select %{smart_count}"},allFilesFromFolderNamed:"All files from folder %{name}",openFolderNamed:"Open folder %{name}",cancel:"Cancel",logOut:"Log out",filter:"Filter",resetFilter:"Reset filter",loading:"Loading...",authenticateWithTitle:"Please authenticate with %{pluginName} to select files",authenticateWith:"Connect to %{pluginName}",signInWithGoogle:"Sign in with Google",searchImages:"Search for images",enterTextToSearch:"Enter text to search for images",search:"Search",emptyFolderAdded:"No files were added from empty folder",folderAlreadyAdded:'The folder "%{folder}" was already added',folderAdded:{0:"Added %{smart_count} file from %{folder}",1:"Added %{smart_count} files from %{folder}"}}},QC=zp,Gf=jr,cn=qt;let Xp,Yp;function M(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var eb=0;function Fe(e){return"__private_"+eb+++"_"+e}const tb=Vp,rb=Kp,nb=fe.l,ib=MC,ob=WC,ab=Jp,ub=KC,sb=JC,lb=YC,cb={version:"2.3.4"},fb=ZC;var _e=Fe("plugins"),it=Fe("restricter"),zn=Fe("storeUnsubscribe"),bt=Fe("emitter"),br=Fe("preProcessors"),wr=Fe("uploaders"),St=Fe("postProcessors"),Ge=Fe("informAndEmit"),Fi=Fe("checkRequiredMetaFieldsOnFile"),cu=Fe("checkRequiredMetaFields"),Wn=Fe("assertNewUploadAllowed"),qn=Fe("checkAndCreateFileStateObject"),Vn=Fe("startIfAutoProceed"),fu=Fe("addListeners"),ot=Fe("updateOnlineStatus"),wt=Fe("createUpload"),du=Fe("getUpload"),Fr=Fe("removeUpload"),Et=Fe("runUpload");Xp=Symbol.for("uppy test: getPlugins");Yp=Symbol.for("uppy test: createUpload");class Zp{constructor(t){Object.defineProperty(this,Et,{value:wb}),Object.defineProperty(this,Fr,{value:bb}),Object.defineProperty(this,du,{value:Cb}),Object.defineProperty(this,wt,{value:Db}),Object.defineProperty(this,fu,{value:yb}),Object.defineProperty(this,Vn,{value:mb}),Object.defineProperty(this,qn,{value:vb}),Object.defineProperty(this,Wn,{value:gb}),Object.defineProperty(this,cu,{value:pb}),Object.defineProperty(this,Fi,{value:hb}),Object.defineProperty(this,Ge,{value:db}),Object.defineProperty(this,_e,{writable:!0,value:Object.create(null)}),Object.defineProperty(this,it,{writable:!0,value:void 0}),Object.defineProperty(this,zn,{writable:!0,value:void 0}),Object.defineProperty(this,bt,{writable:!0,value:rb()}),Object.defineProperty(this,br,{writable:!0,value:new Set}),Object.defineProperty(this,wr,{writable:!0,value:new Set}),Object.defineProperty(this,St,{writable:!0,value:new Set}),Object.defineProperty(this,ot,{writable:!0,value:this.updateOnlineStatus.bind(this)}),this.defaultLocale=fb;const r={id:"uppy",autoProceed:!1,allowMultipleUploads:!0,allowMultipleUploadBatches:!0,debug:!1,restrictions:cn.defaultOptions,meta:{},onBeforeFileAdded:n=>n,onBeforeUpload:n=>n,store:ib(),logger:Gf.justErrorsLogger,infoTimeout:5e3};this.opts={...r,...t,restrictions:{...r.restrictions,...t&&t.restrictions}},t&&t.logger&&t.debug?this.log("You are using a custom `logger`, but also set `debug: true`, which uses built-in logger to output logs to console. Ignoring `debug: true` and using your custom `logger`.","warning"):t&&t.debug&&(this.opts.logger=Gf.debugLogger),this.log(`Using Core v${this.constructor.VERSION}`),this.i18nInit(),this.calculateProgress=nb(this.calculateProgress.bind(this),500,{leading:!0,trailing:!0}),this.store=this.opts.store,this.setState({plugins:{},files:{},currentUploads:{},allowNewUpload:!0,capabilities:{uploadProgress:sb(),individualCancellation:!0,resumableUploads:!1},totalProgress:0,meta:{...this.opts.meta},info:[],recoveredState:null}),M(this,it)[it]=new cn.Restricter(()=>this.opts,this.i18n),M(this,zn)[zn]=this.store.subscribe((n,i,o)=>{this.emit("state-update",n,i,o),this.updateAll(i)}),this.opts.debug&&typeof window<"u"&&(window[this.opts.id]=this),M(this,fu)[fu]()}emit(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];M(this,bt)[bt].emit(t,...n)}on(t,r){return M(this,bt)[bt].on(t,r),this}once(t,r){return M(this,bt)[bt].once(t,r),this}off(t,r){return M(this,bt)[bt].off(t,r),this}updateAll(t){this.iteratePlugins(r=>{r.update(t)})}setState(t){this.store.setState(t)}getState(){return this.store.getState()}get state(){return this.getState()}setFileState(t,r){if(!this.getState().files[t])throw new Error(`Can’t set state for ${t} (the file could have been removed)`);this.setState({files:{...this.getState().files,[t]:{...this.getState().files[t],...r}}})}i18nInit(){const t=new tb([this.defaultLocale,this.opts.locale]);this.i18n=t.translate.bind(t),this.i18nArray=t.translateArray.bind(t),this.locale=t.locale}setOptions(t){this.opts={...this.opts,...t,restrictions:{...this.opts.restrictions,...t&&t.restrictions}},t.meta&&this.setMeta(t.meta),this.i18nInit(),t.locale&&this.iteratePlugins(r=>{r.setOptions()}),this.setState()}resetProgress(){const t={percentage:0,bytesUploaded:0,uploadComplete:!1,uploadStarted:null},r={...this.getState().files},n={};Object.keys(r).forEach(i=>{const o={...r[i]};o.progress={...o.progress,...t},n[i]=o}),this.setState({files:n,totalProgress:0}),this.emit("reset-progress")}addPreProcessor(t){M(this,br)[br].add(t)}removePreProcessor(t){return M(this,br)[br].delete(t)}addPostProcessor(t){M(this,St)[St].add(t)}removePostProcessor(t){return M(this,St)[St].delete(t)}addUploader(t){M(this,wr)[wr].add(t)}removeUploader(t){return M(this,wr)[wr].delete(t)}setMeta(t){const r={...this.getState().meta,...t},n={...this.getState().files};Object.keys(n).forEach(i=>{n[i]={...n[i],meta:{...n[i].meta,...t}}}),this.log("Adding metadata:"),this.log(t),this.setState({meta:r,files:n})}setFileMeta(t,r){const n={...this.getState().files};if(!n[t]){this.log("Was trying to set metadata for a file that has been removed: ",t);return}const i={...n[t].meta,...r};n[t]={...n[t],meta:i},this.setState({files:n})}getFile(t){return this.getState().files[t]}getFiles(){const{files:t}=this.getState();return Object.values(t)}getObjectOfFilesPerState(){const{files:t,totalProgress:r,error:n}=this.getState(),i=Object.values(t),o=i.filter(h=>{let{progress:g}=h;return!g.uploadComplete&&g.uploadStarted}),a=i.filter(h=>!h.progress.uploadStarted),u=i.filter(h=>h.progress.uploadStarted||h.progress.preprocess||h.progress.postprocess),s=i.filter(h=>h.progress.uploadStarted),l=i.filter(h=>h.isPaused),f=i.filter(h=>h.progress.uploadComplete),c=i.filter(h=>h.error),d=o.filter(h=>!h.isPaused),p=i.filter(h=>h.progress.preprocess||h.progress.postprocess);return{newFiles:a,startedFiles:u,uploadStartedFiles:s,pausedFiles:l,completeFiles:f,erroredFiles:c,inProgressFiles:o,inProgressNotPausedFiles:d,processingFiles:p,isUploadStarted:s.length>0,isAllComplete:r===100&&f.length===i.length&&p.length===0,isAllErrored:!!n&&c.length===i.length,isAllPaused:o.length!==0&&l.length===o.length,isUploadInProgress:o.length>0,isSomeGhost:i.some(h=>h.isGhost)}}validateRestrictions(t,r){r===void 0&&(r=this.getFiles());try{return M(this,it)[it].validate(t,r),{result:!0}}catch(n){return{result:!1,reason:n.message}}}checkIfFileAlreadyExists(t){const{files:r}=this.getState();return!!(r[t]&&!r[t].isGhost)}addFile(t){M(this,Wn)[Wn](t);const{files:r}=this.getState();let n=M(this,qn)[qn](r,t);return r[n.id]&&r[n.id].isGhost&&(n={...r[n.id],data:t.data,isGhost:!1},this.log(`Replaced the blob in the restored ghost file: ${n.name}, ${n.id}`)),this.setState({files:{...r,[n.id]:n}}),this.emit("file-added",n),this.emit("files-added",[n]),this.log(`Added file: ${n.name}, ${n.id}, mime type: ${n.type}`),M(this,Vn)[Vn](),n.id}addFiles(t){M(this,Wn)[Wn]();const r={...this.getState().files},n=[],i=[];for(let o=0;o<t.length;o++)try{let a=M(this,qn)[qn](r,t[o]);r[a.id]&&r[a.id].isGhost&&(a={...r[a.id],data:t[o].data,isGhost:!1},this.log(`Replaced blob in a ghost file: ${a.name}, ${a.id}`)),r[a.id]=a,n.push(a)}catch(a){a.isRestriction||i.push(a)}if(this.setState({files:r}),n.forEach(o=>{this.emit("file-added",o)}),this.emit("files-added",n),n.length>5?this.log(`Added batch of ${n.length} files`):Object.keys(n).forEach(o=>{this.log(`Added file: ${n[o].name}
|
|
19
|
-
id: ${n[o].id}
|
|
20
|
-
type: ${n[o].type}`)}),n.length>0&&M(this,Vn)[Vn](),i.length>0){let o=`Multiple errors occurred while adding files:
|
|
21
|
-
`;if(i.forEach(a=>{o+=`
|
|
22
|
-
* ${a.message}`}),this.info({message:this.i18n("addBulkFilesFailed",{smart_count:i.length}),details:o},"error",this.opts.infoTimeout),typeof AggregateError=="function")throw new AggregateError(i,o);{const a=new Error(o);throw a.errors=i,a}}}removeFiles(t,r){const{files:n,currentUploads:i}=this.getState(),o={...n},a={...i},u=Object.create(null);t.forEach(c=>{n[c]&&(u[c]=n[c],delete o[c])});function s(c){return u[c]===void 0}Object.keys(a).forEach(c=>{const d=i[c].fileIDs.filter(s);if(d.length===0){delete a[c];return}const{capabilities:p}=this.getState();if(d.length!==i[c].fileIDs.length&&!p.individualCancellation)throw new Error("individualCancellation is disabled");a[c]={...i[c],fileIDs:d}});const l={currentUploads:a,files:o};Object.keys(o).length===0&&(l.allowNewUpload=!0,l.error=null,l.recoveredState=null),this.setState(l),this.calculateTotalProgress();const f=Object.keys(u);f.forEach(c=>{this.emit("file-removed",u[c],r)}),f.length>5?this.log(`Removed ${f.length} files`):this.log(`Removed files: ${f.join(", ")}`)}removeFile(t,r){r===void 0&&(r=null),this.removeFiles([t],r)}pauseResume(t){if(!this.getState().capabilities.resumableUploads||this.getFile(t).uploadComplete)return;const n=!(this.getFile(t).isPaused||!1);return this.setFileState(t,{isPaused:n}),this.emit("upload-pause",t,n),n}pauseAll(){const t={...this.getState().files};Object.keys(t).filter(n=>!t[n].progress.uploadComplete&&t[n].progress.uploadStarted).forEach(n=>{const i={...t[n],isPaused:!0};t[n]=i}),this.setState({files:t}),this.emit("pause-all")}resumeAll(){const t={...this.getState().files};Object.keys(t).filter(n=>!t[n].progress.uploadComplete&&t[n].progress.uploadStarted).forEach(n=>{const i={...t[n],isPaused:!1,error:null};t[n]=i}),this.setState({files:t}),this.emit("resume-all")}retryAll(){const t={...this.getState().files},r=Object.keys(t).filter(i=>t[i].error);if(r.forEach(i=>{const o={...t[i],isPaused:!1,error:null};t[i]=o}),this.setState({files:t,error:null}),this.emit("retry-all",r),r.length===0)return Promise.resolve({successful:[],failed:[]});const n=M(this,wt)[wt](r,{forceAllowNewUpload:!0});return M(this,Et)[Et](n)}cancelAll(t){let{reason:r="user"}=t===void 0?{}:t;if(this.emit("cancel-all",{reason:r}),r==="user"){const{files:n}=this.getState(),i=Object.keys(n);i.length&&this.removeFiles(i,"cancel-all"),this.setState({totalProgress:0,error:null,recoveredState:null})}}retryUpload(t){this.setFileState(t,{error:null,isPaused:!1}),this.emit("upload-retry",t);const r=M(this,wt)[wt]([t],{forceAllowNewUpload:!0});return M(this,Et)[Et](r)}reset(){this.cancelAll(...arguments)}logout(){this.iteratePlugins(t=>{t.provider&&t.provider.logout&&t.provider.logout()})}calculateProgress(t,r){if(t==null||!this.getFile(t.id)){this.log(`Not setting progress for a file that has been removed: ${t==null?void 0:t.id}`);return}const n=Number.isFinite(r.bytesTotal)&&r.bytesTotal>0;this.setFileState(t.id,{progress:{...this.getFile(t.id).progress,bytesUploaded:r.bytesUploaded,bytesTotal:r.bytesTotal,percentage:n?Math.round(r.bytesUploaded/r.bytesTotal*100):0}}),this.calculateTotalProgress()}calculateTotalProgress(){const r=this.getFiles().filter(l=>l.progress.uploadStarted||l.progress.preprocess||l.progress.postprocess);if(r.length===0){this.emit("progress",0),this.setState({totalProgress:0});return}const n=r.filter(l=>l.progress.bytesTotal!=null),i=r.filter(l=>l.progress.bytesTotal==null);if(n.length===0){const l=r.length*100,f=i.reduce((d,p)=>d+p.progress.percentage,0),c=Math.round(f/l*100);this.setState({totalProgress:c});return}let o=n.reduce((l,f)=>l+f.progress.bytesTotal,0);const a=o/n.length;o+=a*i.length;let u=0;n.forEach(l=>{u+=l.progress.bytesUploaded}),i.forEach(l=>{u+=a*(l.progress.percentage||0)/100});let s=o===0?0:Math.round(u/o*100);s>100&&(s=100),this.setState({totalProgress:s}),this.emit("progress",s)}updateOnlineStatus(){(typeof window.navigator.onLine<"u"?window.navigator.onLine:!0)?(this.emit("is-online"),this.wasOffline&&(this.emit("back-online"),this.info(this.i18n("connectedToInternet"),"success",3e3),this.wasOffline=!1)):(this.emit("is-offline"),this.info(this.i18n("noInternetConnection"),"error",0),this.wasOffline=!0)}getID(){return this.opts.id}use(t,r){if(typeof t!="function"){const a=`Expected a plugin class, but got ${t===null?"null":typeof t}. Please verify that the plugin was imported and spelled correctly.`;throw new TypeError(a)}const n=new t(this,r),i=n.id;if(!i)throw new Error("Your plugin must have an id");if(!n.type)throw new Error("Your plugin must have a type");const o=this.getPlugin(i);if(o){const a=`Already found a plugin named '${o.id}'. Tried to use: '${i}'.
|
|
23
|
-
Uppy plugins must have unique \`id\` options. See https://uppy.io/docs/plugins/#id.`;throw new Error(a)}return t.VERSION&&this.log(`Using ${i} v${t.VERSION}`),n.type in M(this,_e)[_e]?M(this,_e)[_e][n.type].push(n):M(this,_e)[_e][n.type]=[n],n.install(),this}getPlugin(t){for(const r of Object.values(M(this,_e)[_e])){const n=r.find(i=>i.id===t);if(n!=null)return n}}[Xp](t){return M(this,_e)[_e][t]}iteratePlugins(t){Object.values(M(this,_e)[_e]).flat(1).forEach(t)}removePlugin(t){this.log(`Removing plugin ${t.id}`),this.emit("plugin-remove",t),t.uninstall&&t.uninstall();const r=M(this,_e)[_e][t.type],n=r.findIndex(a=>a.id===t.id);n!==-1&&r.splice(n,1);const o={plugins:{...this.getState().plugins,[t.id]:void 0}};this.setState(o)}close(t){let{reason:r}=t===void 0?{}:t;this.log(`Closing Uppy instance ${this.opts.id}: removing all files and uninstalling plugins`),this.cancelAll({reason:r}),M(this,zn)[zn](),this.iteratePlugins(n=>{this.removePlugin(n)}),typeof window<"u"&&window.removeEventListener&&(window.removeEventListener("online",M(this,ot)[ot]),window.removeEventListener("offline",M(this,ot)[ot]))}hideInfo(){const{info:t}=this.getState();this.setState({info:t.slice(1)}),this.emit("info-hidden")}info(t,r,n){r===void 0&&(r="info"),n===void 0&&(n=3e3);const i=typeof t=="object";this.setState({info:[...this.getState().info,{type:r,message:i?t.message:t,details:i?t.details:null}]}),setTimeout(()=>this.hideInfo(),n),this.emit("info-visible")}log(t,r){const{logger:n}=this.opts;switch(r){case"error":n.error(t);break;case"warning":n.warn(t);break;default:n.debug(t);break}}restore(t){return this.log(`Core: attempting to restore upload "${t}"`),this.getState().currentUploads[t]?M(this,Et)[Et](t):(M(this,Fr)[Fr](t),Promise.reject(new Error("Nonexistent upload")))}[Yp](){return M(this,wt)[wt](...arguments)}addResultData(t,r){if(!M(this,du)[du](t)){this.log(`Not setting result for an upload that has been removed: ${t}`);return}const{currentUploads:n}=this.getState(),i={...n[t],result:{...n[t].result,...r}};this.setState({currentUploads:{...n,[t]:i}})}upload(){var t;(t=M(this,_e)[_e].uploader)!=null&&t.length||this.log("No uploader type plugins are used","warning");let{files:r}=this.getState();const n=this.opts.onBeforeUpload(r);return n===!1?Promise.reject(new Error("Not starting the upload because onBeforeUpload returned false")):(n&&typeof n=="object"&&(r=n,this.setState({files:r})),Promise.resolve().then(()=>M(this,it)[it].validateMinNumberOfFiles(r)).catch(i=>{throw M(this,Ge)[Ge](i),i}).then(()=>{if(!M(this,cu)[cu](r))throw new cn.RestrictionError(this.i18n("missingRequiredMetaField"))}).catch(i=>{throw i}).then(()=>{const{currentUploads:i}=this.getState(),o=Object.values(i).flatMap(s=>s.fileIDs),a=[];Object.keys(r).forEach(s=>{const l=this.getFile(s);!l.progress.uploadStarted&&o.indexOf(s)===-1&&a.push(l.id)});const u=M(this,wt)[wt](a);return M(this,Et)[Et](u)}).catch(i=>{throw this.emit("error",i),this.log(i,"error"),i}))}}function db(e,t){const{message:r,details:n=""}=e;e.isRestriction?this.emit("restriction-failed",t,e):this.emit("error",e),this.info({message:r,details:n},"error",this.opts.infoTimeout),this.log(`${r} ${n}`.trim(),"error")}function hb(e){const{missingFields:t,error:r}=M(this,it)[it].getMissingRequiredMetaFields(e);return t.length>0?(this.setFileState(e.id,{missingRequiredMetaFields:t}),this.log(r.message),this.emit("restriction-failed",e,r),!1):!0}function pb(e){let t=!0;for(const r of Object.values(e))M(this,Fi)[Fi](r)||(t=!1);return t}function gb(e){const{allowNewUpload:t}=this.getState();if(t===!1){const r=new cn.RestrictionError(this.i18n("noMoreFilesAllowed"));throw M(this,Ge)[Ge](r,e),r}}function vb(e,t){const r=ob(t),n=lb(r,t),i=ab(n).extension,o=!!t.isRemote,a=ub({...t,type:r});if(this.checkIfFileAlreadyExists(a)){const c=new cn.RestrictionError(this.i18n("noDuplicates",{fileName:n}));throw M(this,Ge)[Ge](c,t),c}const u=t.meta||{};u.name=n,u.type=r;const s=Number.isFinite(t.data.size)?t.data.size:null;let l={source:t.source||"",id:a,name:n,extension:i||"",meta:{...this.getState().meta,...u},type:r,data:t.data,progress:{percentage:0,bytesUploaded:0,bytesTotal:s,uploadComplete:!1,uploadStarted:null},size:s,isRemote:o,remote:t.remote||"",preview:t.preview};const f=this.opts.onBeforeFileAdded(l,e);if(f===!1){const c=new cn.RestrictionError("Cannot add the file because onBeforeFileAdded returned false.");throw this.emit("restriction-failed",t,c),c}else typeof f=="object"&&f!==null&&(l=f);try{const c=Object.keys(e).map(d=>e[d]);M(this,it)[it].validate(l,c)}catch(c){throw M(this,Ge)[Ge](c,l),c}return l}function mb(){this.opts.autoProceed&&!this.scheduledAutoProceed&&(this.scheduledAutoProceed=setTimeout(()=>{this.scheduledAutoProceed=null,this.upload().catch(e=>{e.isRestriction||this.log(e.stack||e.message||e)})},4))}function yb(){const e=(t,r,n)=>{let i=t.message||"Unknown error";t.details&&(i+=` ${t.details}`),this.setState({error:i}),r!=null&&r.id in this.getState().files&&this.setFileState(r.id,{error:i,response:n})};this.on("error",e),this.on("upload-error",(t,r,n)=>{if(e(r,t,n),typeof r=="object"&&r.message){const i=new Error(r.message);i.details=r.message,r.details&&(i.details+=` ${r.details}`),i.message=this.i18n("failedToUpload",{file:t==null?void 0:t.name}),M(this,Ge)[Ge](i)}else M(this,Ge)[Ge](r)}),this.on("upload",()=>{this.setState({error:null})}),this.on("upload-started",t=>{if(t==null||!this.getFile(t.id)){this.log(`Not setting progress for a file that has been removed: ${t==null?void 0:t.id}`);return}this.setFileState(t.id,{progress:{uploadStarted:Date.now(),uploadComplete:!1,percentage:0,bytesUploaded:0,bytesTotal:t.size}})}),this.on("upload-progress",this.calculateProgress),this.on("upload-success",(t,r)=>{if(t==null||!this.getFile(t.id)){this.log(`Not setting progress for a file that has been removed: ${t==null?void 0:t.id}`);return}const n=this.getFile(t.id).progress;this.setFileState(t.id,{progress:{...n,postprocess:M(this,St)[St].size>0?{mode:"indeterminate"}:null,uploadComplete:!0,percentage:100,bytesUploaded:n.bytesTotal},response:r,uploadURL:r.uploadURL,isPaused:!1}),t.size==null&&this.setFileState(t.id,{size:r.bytesUploaded||n.bytesTotal}),this.calculateTotalProgress()}),this.on("preprocess-progress",(t,r)=>{if(t==null||!this.getFile(t.id)){this.log(`Not setting progress for a file that has been removed: ${t==null?void 0:t.id}`);return}this.setFileState(t.id,{progress:{...this.getFile(t.id).progress,preprocess:r}})}),this.on("preprocess-complete",t=>{if(t==null||!this.getFile(t.id)){this.log(`Not setting progress for a file that has been removed: ${t==null?void 0:t.id}`);return}const r={...this.getState().files};r[t.id]={...r[t.id],progress:{...r[t.id].progress}},delete r[t.id].progress.preprocess,this.setState({files:r})}),this.on("postprocess-progress",(t,r)=>{if(t==null||!this.getFile(t.id)){this.log(`Not setting progress for a file that has been removed: ${t==null?void 0:t.id}`);return}this.setFileState(t.id,{progress:{...this.getState().files[t.id].progress,postprocess:r}})}),this.on("postprocess-complete",t=>{if(t==null||!this.getFile(t.id)){this.log(`Not setting progress for a file that has been removed: ${t==null?void 0:t.id}`);return}const r={...this.getState().files};r[t.id]={...r[t.id],progress:{...r[t.id].progress}},delete r[t.id].progress.postprocess,this.setState({files:r})}),this.on("restored",()=>{this.calculateTotalProgress()}),this.on("dashboard:file-edit-complete",t=>{t&&M(this,Fi)[Fi](t)}),typeof window<"u"&&window.addEventListener&&(window.addEventListener("online",M(this,ot)[ot]),window.addEventListener("offline",M(this,ot)[ot]),setTimeout(M(this,ot)[ot],3e3))}function Db(e,t){t===void 0&&(t={});const{forceAllowNewUpload:r=!1}=t,{allowNewUpload:n,currentUploads:i}=this.getState();if(!n&&!r)throw new Error("Cannot create a new upload: already uploading.");const o=(0,QC.nanoid)();return this.emit("upload",{id:o,fileIDs:e}),this.setState({allowNewUpload:this.opts.allowMultipleUploadBatches!==!1&&this.opts.allowMultipleUploads!==!1,currentUploads:{...i,[o]:{fileIDs:e,step:0,result:{}}}}),o}function Cb(e){const{currentUploads:t}=this.getState();return t[e]}function bb(e){const t={...this.getState().currentUploads};delete t[e],this.setState({currentUploads:t})}async function wb(e){let{currentUploads:t}=this.getState(),r=t[e];const n=r.step||0,i=[...M(this,br)[br],...M(this,wr)[wr],...M(this,St)[St]];try{for(let a=n;a<i.length&&r;a++){const u=i[a],s={...r,step:a};this.setState({currentUploads:{...t,[e]:s}}),await u(s.fileIDs,e),t=this.getState().currentUploads,r=t[e]}}catch(a){throw M(this,Fr)[Fr](e),a}if(r){r.fileIDs.forEach(l=>{const f=this.getFile(l);f&&f.progress.postprocess&&this.emit("postprocess-complete",f)});const a=r.fileIDs.map(l=>this.getFile(l)),u=a.filter(l=>!l.error),s=a.filter(l=>l.error);await this.addResultData(e,{successful:u,failed:s,uploadID:e}),t=this.getState().currentUploads,r=t[e]}let o;return r&&(o=r.result,this.emit("complete",o),M(this,Fr)[Fr](e)),o==null&&this.log(`Not setting result for an upload that has been removed: ${e}`),o}Zp.VERSION=cb.version;var Jf=Zp,Ii,de,Qp,eg,Er,Xf,tg,rg,ng,bl,bs,ws,ig,xi={},og=[],Eb=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Ui=Array.isArray;function ft(e,t){for(var r in t)e[r]=t[r];return e}function wl(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Es(e,t,r){var n,i,o,a={};for(o in t)o=="key"?n=t[o]:o=="ref"?i=t[o]:a[o]=t[o];if(arguments.length>2&&(a.children=arguments.length>3?Ii.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)a[o]===void 0&&(a[o]=e.defaultProps[o]);return vi(e,a,n,i,null)}function vi(e,t,r,n,i){var o={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++Qp,__i:-1,__u:0};return i==null&&de.vnode!=null&&de.vnode(o),o}function Ab(){return{current:null}}function Hi(e){return e.children}function mi(e,t){this.props=e,this.context=t}function mn(e,t){if(t==null)return e.__?mn(e.__,e.__i+1):null;for(var r;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null)return r.__e;return typeof e.type=="function"?mn(e):null}function ag(e){var t,r;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null){e.__e=e.__c.base=r.__e;break}return ag(e)}}function As(e){(!e.__d&&(e.__d=!0)&&Er.push(e)&&!Xo.__r++||Xf!=de.debounceRendering)&&((Xf=de.debounceRendering)||tg)(Xo)}function Xo(){for(var e,t,r,n,i,o,a,u=1;Er.length;)Er.length>u&&Er.sort(rg),e=Er.shift(),u=Er.length,e.__d&&(r=void 0,n=void 0,i=(n=(t=e).__v).__e,o=[],a=[],t.__P&&((r=ft({},n)).__v=n.__v+1,de.vnode&&de.vnode(r),El(t.__P,r,n,t.__n,t.__P.namespaceURI,32&n.__u?[i]:null,o,i??mn(n),!!(32&n.__u),a),r.__v=n.__v,r.__.__k[r.__i]=r,cg(o,r,a),n.__e=n.__=null,r.__e!=i&&ag(r)));Xo.__r=0}function ug(e,t,r,n,i,o,a,u,s,l,f){var c,d,p,h,g,v,D,C=n&&n.__k||og,b=t.length;for(s=Bb(r,t,C,s,b),c=0;c<b;c++)(p=r.__k[c])!=null&&(d=p.__i==-1?xi:C[p.__i]||xi,p.__i=c,v=El(e,p,d,i,o,a,u,s,l,f),h=p.__e,p.ref&&d.ref!=p.ref&&(d.ref&&Al(d.ref,null,p),f.push(p.ref,p.__c||h,p)),g==null&&h!=null&&(g=h),(D=!!(4&p.__u))||d.__k===p.__k?s=sg(p,s,e,D):typeof p.type=="function"&&v!==void 0?s=v:h&&(s=h.nextSibling),p.__u&=-7);return r.__e=g,s}function Bb(e,t,r,n,i){var o,a,u,s,l,f=r.length,c=f,d=0;for(e.__k=new Array(i),o=0;o<i;o++)(a=t[o])!=null&&typeof a!="boolean"&&typeof a!="function"?(s=o+d,(a=e.__k[o]=typeof a=="string"||typeof a=="number"||typeof a=="bigint"||a.constructor==String?vi(null,a,null,null,null):Ui(a)?vi(Hi,{children:a},null,null,null):a.constructor==null&&a.__b>0?vi(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):a).__=e,a.__b=e.__b+1,u=null,(l=a.__i=Fb(a,r,s,c))!=-1&&(c--,(u=r[l])&&(u.__u|=2)),u==null||u.__v==null?(l==-1&&(i>f?d--:i<f&&d++),typeof a.type!="function"&&(a.__u|=4)):l!=s&&(l==s-1?d--:l==s+1?d++:(l>s?d--:d++,a.__u|=4))):e.__k[o]=null;if(c)for(o=0;o<f;o++)(u=r[o])!=null&&!(2&u.__u)&&(u.__e==n&&(n=mn(u)),dg(u,u));return n}function sg(e,t,r,n){var i,o;if(typeof e.type=="function"){for(i=e.__k,o=0;i&&o<i.length;o++)i[o]&&(i[o].__=e,t=sg(i[o],t,r,n));return t}e.__e!=t&&(n&&(t&&e.type&&!t.parentNode&&(t=mn(e)),r.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function lg(e,t){return t=t||[],e==null||typeof e=="boolean"||(Ui(e)?e.some(function(r){lg(r,t)}):t.push(e)),t}function Fb(e,t,r,n){var i,o,a,u=e.key,s=e.type,l=t[r],f=l!=null&&(2&l.__u)==0;if(l===null&&e.key==null||f&&u==l.key&&s==l.type)return r;if(n>(f?1:0)){for(i=r-1,o=r+1;i>=0||o<t.length;)if((l=t[a=i>=0?i--:o++])!=null&&!(2&l.__u)&&u==l.key&&s==l.type)return a}return-1}function Yf(e,t,r){t[0]=="-"?e.setProperty(t,r??""):e[t]=r==null?"":typeof r!="number"||Eb.test(t)?r:r+"px"}function uo(e,t,r,n,i){var o,a;e:if(t=="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof n=="string"&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||Yf(e.style,t,"");if(r)for(t in r)n&&r[t]==n[t]||Yf(e.style,t,r[t])}else if(t[0]=="o"&&t[1]=="n")o=t!=(t=t.replace(ng,"$1")),a=t.toLowerCase(),t=a in e||t=="onFocusOut"||t=="onFocusIn"?a.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=r,r?n?r.u=n.u:(r.u=bl,e.addEventListener(t,o?ws:bs,o)):e.removeEventListener(t,o?ws:bs,o);else{if(i=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&r==1?"":r))}}function Zf(e){return function(t){if(this.l){var r=this.l[t.type+e];if(t.t==null)t.t=bl++;else if(t.t<r.u)return;return r(de.event?de.event(t):t)}}}function El(e,t,r,n,i,o,a,u,s,l){var f,c,d,p,h,g,v,D,C,b,B,E,x,_,T,k,L,R=t.type;if(t.constructor!=null)return null;128&r.__u&&(s=!!(32&r.__u),o=[u=t.__e=r.__e]),(f=de.__b)&&f(t);e:if(typeof R=="function")try{if(D=t.props,C="prototype"in R&&R.prototype.render,b=(f=R.contextType)&&n[f.__c],B=f?b?b.props.value:f.__:n,r.__c?v=(c=t.__c=r.__c).__=c.__E:(C?t.__c=c=new R(D,B):(t.__c=c=new mi(D,B),c.constructor=R,c.render=Ob),b&&b.sub(c),c.props=D,c.state||(c.state={}),c.context=B,c.__n=n,d=c.__d=!0,c.__h=[],c._sb=[]),C&&c.__s==null&&(c.__s=c.state),C&&R.getDerivedStateFromProps!=null&&(c.__s==c.state&&(c.__s=ft({},c.__s)),ft(c.__s,R.getDerivedStateFromProps(D,c.__s))),p=c.props,h=c.state,c.__v=t,d)C&&R.getDerivedStateFromProps==null&&c.componentWillMount!=null&&c.componentWillMount(),C&&c.componentDidMount!=null&&c.__h.push(c.componentDidMount);else{if(C&&R.getDerivedStateFromProps==null&&D!==p&&c.componentWillReceiveProps!=null&&c.componentWillReceiveProps(D,B),!c.__e&&c.shouldComponentUpdate!=null&&c.shouldComponentUpdate(D,c.__s,B)===!1||t.__v==r.__v){for(t.__v!=r.__v&&(c.props=D,c.state=c.__s,c.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.some(function(S){S&&(S.__=t)}),E=0;E<c._sb.length;E++)c.__h.push(c._sb[E]);c._sb=[],c.__h.length&&a.push(c);break e}c.componentWillUpdate!=null&&c.componentWillUpdate(D,c.__s,B),C&&c.componentDidUpdate!=null&&c.__h.push(function(){c.componentDidUpdate(p,h,g)})}if(c.context=B,c.props=D,c.__P=e,c.__e=!1,x=de.__r,_=0,C){for(c.state=c.__s,c.__d=!1,x&&x(t),f=c.render(c.props,c.state,c.context),T=0;T<c._sb.length;T++)c.__h.push(c._sb[T]);c._sb=[]}else do c.__d=!1,x&&x(t),f=c.render(c.props,c.state,c.context),c.state=c.__s;while(c.__d&&++_<25);c.state=c.__s,c.getChildContext!=null&&(n=ft(ft({},n),c.getChildContext())),C&&!d&&c.getSnapshotBeforeUpdate!=null&&(g=c.getSnapshotBeforeUpdate(p,h)),k=f,f!=null&&f.type===Hi&&f.key==null&&(k=fg(f.props.children)),u=ug(e,Ui(k)?k:[k],t,r,n,i,o,a,u,s,l),c.base=t.__e,t.__u&=-161,c.__h.length&&a.push(c),v&&(c.__E=c.__=null)}catch(S){if(t.__v=null,s||o!=null)if(S.then){for(t.__u|=s?160:128;u&&u.nodeType==8&&u.nextSibling;)u=u.nextSibling;o[o.indexOf(u)]=null,t.__e=u}else{for(L=o.length;L--;)wl(o[L]);Bs(t)}else t.__e=r.__e,t.__k=r.__k,S.then||Bs(t);de.__e(S,t,r)}else o==null&&t.__v==r.__v?(t.__k=r.__k,t.__e=r.__e):u=t.__e=xb(r.__e,t,r,n,i,o,a,s,l);return(f=de.diffed)&&f(t),128&t.__u?void 0:u}function Bs(e){e&&e.__c&&(e.__c.__e=!0),e&&e.__k&&e.__k.forEach(Bs)}function cg(e,t,r){for(var n=0;n<r.length;n++)Al(r[n],r[++n],r[++n]);de.__c&&de.__c(t,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(o){o.call(i)})}catch(o){de.__e(o,i.__v)}})}function fg(e){return typeof e!="object"||e==null||e.__b&&e.__b>0?e:Ui(e)?e.map(fg):ft({},e)}function xb(e,t,r,n,i,o,a,u,s){var l,f,c,d,p,h,g,v=r.props,D=t.props,C=t.type;if(C=="svg"?i="http://www.w3.org/2000/svg":C=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),o!=null){for(l=0;l<o.length;l++)if((p=o[l])&&"setAttribute"in p==!!C&&(C?p.localName==C:p.nodeType==3)){e=p,o[l]=null;break}}if(e==null){if(C==null)return document.createTextNode(D);e=document.createElementNS(i,C,D.is&&D),u&&(de.__m&&de.__m(t,o),u=!1),o=null}if(C==null)v===D||u&&e.data==D||(e.data=D);else{if(o=o&&Ii.call(e.childNodes),v=r.props||xi,!u&&o!=null)for(v={},l=0;l<e.attributes.length;l++)v[(p=e.attributes[l]).name]=p.value;for(l in v)if(p=v[l],l!="children"){if(l=="dangerouslySetInnerHTML")c=p;else if(!(l in D)){if(l=="value"&&"defaultValue"in D||l=="checked"&&"defaultChecked"in D)continue;uo(e,l,null,p,i)}}for(l in D)p=D[l],l=="children"?d=p:l=="dangerouslySetInnerHTML"?f=p:l=="value"?h=p:l=="checked"?g=p:u&&typeof p!="function"||v[l]===p||uo(e,l,p,v[l],i);if(f)u||c&&(f.__html==c.__html||f.__html==e.innerHTML)||(e.innerHTML=f.__html),t.__k=[];else if(c&&(e.innerHTML=""),ug(t.type=="template"?e.content:e,Ui(d)?d:[d],t,r,n,C=="foreignObject"?"http://www.w3.org/1999/xhtml":i,o,a,o?o[0]:r.__k&&mn(r,0),u,s),o!=null)for(l=o.length;l--;)wl(o[l]);u||(l="value",C=="progress"&&h==null?e.removeAttribute("value"):h!=null&&(h!==e[l]||C=="progress"&&!h||C=="option"&&h!=v[l])&&uo(e,l,h,v[l],i),l="checked",g!=null&&g!=e[l]&&uo(e,l,g,v[l],i))}return e}function Al(e,t,r){try{if(typeof e=="function"){var n=typeof e.__u=="function";n&&e.__u(),n&&t==null||(e.__u=e(t))}else e.current=t}catch(i){de.__e(i,r)}}function dg(e,t,r){var n,i;if(de.unmount&&de.unmount(e),(n=e.ref)&&(n.current&&n.current!=e.__e||Al(n,null,t)),(n=e.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(o){de.__e(o,t)}n.base=n.__P=null}if(n=e.__k)for(i=0;i<n.length;i++)n[i]&&dg(n[i],t,r||typeof e.type!="function");r||wl(e.__e),e.__c=e.__=e.__e=void 0}function Ob(e,t,r){return this.constructor(e,r)}function hg(e,t,r){var n,i,o,a;t==document&&(t=document.documentElement),de.__&&de.__(e,t),i=(n=typeof r=="function")?null:r&&r.__k||t.__k,o=[],a=[],El(t,e=(!n&&r||t).__k=Es(Hi,null,[e]),i||xi,xi,t.namespaceURI,!n&&r?[r]:i?null:t.firstChild?Ii.call(t.childNodes):null,o,!n&&r?r:i?i.__e:t.firstChild,n,a),cg(o,e,a)}function pg(e,t){hg(e,t,pg)}function Sb(e,t,r){var n,i,o,a,u=ft({},e.props);for(o in e.type&&e.type.defaultProps&&(a=e.type.defaultProps),t)o=="key"?n=t[o]:o=="ref"?i=t[o]:u[o]=t[o]===void 0&&a!=null?a[o]:t[o];return arguments.length>2&&(u.children=arguments.length>3?Ii.call(arguments,2):r),vi(e.type,u,n||e.key,i||e.ref,null)}function _b(e){function t(r){var n,i;return this.getChildContext||(n=new Set,(i={})[t.__c]=this,this.getChildContext=function(){return i},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(o){this.props.value!=o.value&&n.forEach(function(a){a.__e=!0,As(a)})},this.sub=function(o){n.add(o);var a=o.componentWillUnmount;o.componentWillUnmount=function(){n&&n.delete(o),a&&a.call(o)}}),r.children}return t.__c="__cC"+ig++,t.__=e,t.Provider=t.__l=(t.Consumer=function(r,n){return r.children(n)}).contextType=t,t}Ii=og.slice,de={__e:function(e,t,r,n){for(var i,o,a;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(e)),a=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,n||{}),a=i.__d),a)return i.__E=i}catch(u){e=u}throw e}},Qp=0,eg=function(e){return e!=null&&e.constructor==null},mi.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=ft({},this.state),typeof e=="function"&&(e=e(ft({},r),this.props)),e&&ft(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),As(this))},mi.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),As(this))},mi.prototype.render=Hi,Er=[],tg=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,rg=function(e,t){return e.__v.__b-t.__v.__b},Xo.__r=0,ng=/(PointerCapture)$|Capture$/i,bl=0,bs=Zf(!1),ws=Zf(!0),ig=0;const Pb=Object.freeze(Object.defineProperty({__proto__:null,Component:mi,Fragment:Hi,cloneElement:Sb,createContext:_b,createElement:Es,createRef:Ab,h:Es,hydrate:pg,get isValidElement(){return eg},get options(){return de},render:hg,toChildArray:lg},Symbol.toStringTag,{value:"Module"})),kb=fe.a(Pb);function Tb(e){return(e==null?void 0:e.nodeType)===Node.ELEMENT_NODE}var jb=Tb;const Rb=jb;function Nb(e,t){return t===void 0&&(t=document),typeof e=="string"?t.querySelector(e):Rb(e)?e:null}var $b=Nb;function Lb(e){for(var t;e&&!e.dir;)e=e.parentNode;return(t=e)==null?void 0:t.dir}var Mb=Lb;const Ib=Vp;let Ub=class{constructor(t,r){r===void 0&&(r={}),this.uppy=t,this.opts=r}getPluginState(){const{plugins:t}=this.uppy.getState();return t[this.id]||{}}setPluginState(t){const{plugins:r}=this.uppy.getState();this.uppy.setState({plugins:{...r,[this.id]:{...r[this.id],...t}}})}setOptions(t){this.opts={...this.opts,...t},this.setPluginState(),this.i18nInit()}i18nInit(){const t=new Ib([this.defaultLocale,this.uppy.locale,this.opts.locale]);this.i18n=t.translate.bind(t),this.i18nArray=t.translateArray.bind(t),this.setPluginState()}addTarget(){throw new Error("Extend the addTarget method to add your plugin to another plugin's target")}install(){}uninstall(){}render(){throw new Error("Extend the render method to add your plugin to a DOM element")}update(){}afterUpdate(){}};var Yo=Ub,Qf=kb;function ed(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var Hb=0;function zb(e){return"__private_"+Hb+++"_"+e}const Wb=$b,qb=Mb,Vb=Yo;function Kb(e){let t=null,r=null;return function(){for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return r=i,t||(t=Promise.resolve().then(()=>(t=null,e(...r)))),t}}var Kn=zb("updateUI");class Bl extends Vb{constructor(){super(...arguments),Object.defineProperty(this,Kn,{writable:!0,value:void 0})}mount(t,r){const n=r.id,i=Wb(t);if(i){this.isTargetDOMEl=!0;const u=document.createElement("div");return u.classList.add("uppy-Root"),ed(this,Kn)[Kn]=Kb(s=>{this.uppy.getPlugin(this.id)&&((0,Qf.render)(this.render(s),u),this.afterUpdate())}),this.uppy.log(`Installing ${n} to a DOM element '${t}'`),this.opts.replaceTargetContent&&(i.innerHTML=""),(0,Qf.render)(this.render(this.uppy.getState()),u),this.el=u,i.appendChild(u),u.dir=this.opts.direction||qb(u)||"ltr",this.onMount(),this.el}let o;if(typeof t=="object"&&t instanceof Bl)o=t;else if(typeof t=="function"){const u=t;this.uppy.iteratePlugins(s=>{s instanceof u&&(o=s)})}if(o)return this.uppy.log(`Installing ${n} to ${o.id}`),this.parent=o,this.el=o.addTarget(r),this.onMount(),this.el;this.uppy.log(`Not installing ${n}`);let a=`Invalid target option given to ${n}.`;throw typeof t=="function"?a+=" The given target is not a Plugin class. Please check that you're not specifying a React Component instead of a plugin. If you are using @uppy/* packages directly, make sure you have only 1 version of @uppy/core installed: run `npm ls @uppy/core` on the command line and verify that all the versions match and are deduped correctly.":a+="If you meant to target an HTML element, please make sure that the element exists. Check that the <script> tag initializing Uppy is right before the closing </body> tag at the end of the page. (see https://github.com/transloadit/uppy/issues/1042)\n\nIf you meant to target a plugin, please confirm that your `import` statements or `require` calls are correct.",new Error(a)}update(t){if(this.el!=null){var r,n;(r=(n=ed(this,Kn))[Kn])==null||r.call(n,t)}}unmount(){if(this.isTargetDOMEl){var t;(t=this.el)==null||t.remove()}this.onUnmount()}onMount(){}onUnmount(){}}var td=Bl;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Uppy=t.UIPlugin=t.BasePlugin=void 0,Object.defineProperty(t,"debugLogger",{enumerable:!0,get:function(){return r.debugLogger}});var r=jr;e.exports=Jf;const n=td;t.UIPlugin=n;const i=Yo;t.BasePlugin=i;const o=Jf;t.Uppy=o;const a=td,u=Yo;o.Uppy=o,o.UIPlugin=a,o.BasePlugin=u,o.debugLogger=r.debugLogger})(zf,zf.exports);var dt={};let Gb=class extends Error{constructor(t,r){r===void 0&&(r=null),super("This looks like a network error, the endpoint might be blocked by an internet provider or a firewall."),this.cause=t,this.isNetworkError=!0,this.request=r}};var gg=Gb;const Jb=gg;function Xb(){return fetch(...arguments).catch(e=>{throw e.name==="AbortError"?e:new Jb(e)})}var Yb=Xb;const Zb=qp;let Qb=class extends Error{constructor(t,r){r===void 0&&(r={}),super(t),this.cause=r.cause,this.cause&&Zb(this.cause,"isNetworkError")&&(this.isNetworkError=this.cause.isNetworkError)}};var ew=Qb;let tw=class extends Error{constructor(){super("Authorization required"),this.name="AuthError",this.isAuthError=!0}};var rw=tw;let vg;function ze(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var nw=0;function wa(e){return"__private_"+nw+++"_"+e}const hu=Yb,iw=ew,ow=rw,aw={version:"2.2.2"};function uw(e){return e.replace(/\/$/,"")}async function pu(e){if(e.status===401)throw new ow;const t=e.json();if(e.status<200||e.status>300){let r=`Failed request with status: ${e.status}. ${e.statusText}`;try{const n=await t;r=n.message?`${r} message: ${n.message}`:r,r=n.requestId?`${r} request-Id: ${n.requestId}`:r}finally{throw new Error(r)}}return t}var At=wa("companionHeaders"),sr=wa("getPostResponseFunc"),Ot=wa("getUrl"),lr=wa("errorHandler");vg=Symbol.for("uppy test: getCompanionHeaders");let Zo=class mg{constructor(t,r){Object.defineProperty(this,lr,{value:lw}),Object.defineProperty(this,Ot,{value:sw}),Object.defineProperty(this,At,{writable:!0,value:void 0}),Object.defineProperty(this,sr,{writable:!0,value:n=>i=>n?i:this.onReceiveResponse(i)}),this.uppy=t,this.opts=r,this.onReceiveResponse=this.onReceiveResponse.bind(this),this.allowedHeaders=["accept","content-type","uppy-auth-token"],this.preflightDone=!1,ze(this,At)[At]=r==null?void 0:r.companionHeaders}setCompanionHeaders(t){ze(this,At)[At]=t}[vg](){return ze(this,At)[At]}get hostname(){const{companion:t}=this.uppy.getState(),r=this.opts.companionUrl;return uw(t&&t[r]?t[r]:r)}headers(){return Promise.resolve({...mg.defaultHeaders,...ze(this,At)[At]})}onReceiveResponse(t){const n=this.uppy.getState().companion||{},i=this.opts.companionUrl,{headers:o}=t;return o.has("i-am")&&o.get("i-am")!==n[i]&&this.uppy.setState({companion:{...n,[i]:o.get("i-am")}}),t}preflight(t){return this.preflightDone?Promise.resolve(this.allowedHeaders.slice()):fetch(ze(this,Ot)[Ot](t),{method:"OPTIONS"}).then(r=>(r.headers.has("access-control-allow-headers")&&(this.allowedHeaders=r.headers.get("access-control-allow-headers").split(",").map(n=>n.trim().toLowerCase())),this.preflightDone=!0,this.allowedHeaders.slice())).catch(r=>(this.uppy.log(`[CompanionClient] unable to make preflight request ${r}`,"warning"),this.preflightDone=!0,this.allowedHeaders.slice()))}preflightAndHeaders(t){return Promise.all([this.preflight(t),this.headers()]).then(r=>{let[n,i]=r;return Object.keys(i).forEach(o=>{n.includes(o.toLowerCase())||(this.uppy.log(`[CompanionClient] excluding disallowed header ${o}`),delete i[o])}),i})}get(t,r){const n="get";return this.preflightAndHeaders(t).then(i=>hu(ze(this,Ot)[Ot](t),{method:n,headers:i,credentials:this.opts.companionCookiesRule||"same-origin"})).then(ze(this,sr)[sr](r)).then(pu).catch(ze(this,lr)[lr](n,t))}post(t,r,n){const i="post";return this.preflightAndHeaders(t).then(o=>hu(ze(this,Ot)[Ot](t),{method:i,headers:o,credentials:this.opts.companionCookiesRule||"same-origin",body:JSON.stringify(r)})).then(ze(this,sr)[sr](n)).then(pu).catch(ze(this,lr)[lr](i,t))}delete(t,r,n){const i="delete";return this.preflightAndHeaders(t).then(o=>hu(`${this.hostname}/${t}`,{method:i,headers:o,credentials:this.opts.companionCookiesRule||"same-origin",body:r?JSON.stringify(r):null})).then(ze(this,sr)[sr](n)).then(pu).catch(ze(this,lr)[lr](i,t))}};function sw(e){return/^(https?:|)\/\//.test(e)?e:`${this.hostname}/${e}`}function lw(e,t){return r=>{var n;return(n=r)!=null&&n.isAuthError||(r=new iw(`Could not ${e} ${ze(this,Ot)[Ot](t)}`,{cause:r})),Promise.reject(r)}}Zo.VERSION=aw.version;Zo.defaultHeaders={Accept:"application/json","Content-Type":"application/json","Uppy-Versions":`@uppy/companion-client=${Zo.VERSION}`};var Fl=Zo,zi={};Object.defineProperty(zi,"__esModule",{value:!0});zi.getItem=fw;zi.removeItem=dw;zi.setItem=cw;function cw(e,t){return new Promise(r=>{localStorage.setItem(e,t),r()})}function fw(e){return Promise.resolve(localStorage.getItem(e))}function dw(e){return new Promise(t=>{localStorage.removeItem(e),t()})}var hw=zi;const pw=Fl,gw=e=>e.split("-").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ");class vw extends pw{constructor(t,r){super(t,r),this.provider=r.provider,this.id=this.provider,this.name=this.opts.name||gw(this.id),this.pluginId=this.opts.pluginId,this.tokenKey=`companion-${this.pluginId}-auth-token`,this.companionKeysParams=this.opts.companionKeysParams,this.preAuthToken=null}headers(){return Promise.all([super.headers(),this.getAuthToken()]).then(t=>{let[r,n]=t;const i={};return n&&(i["uppy-auth-token"]=n),this.companionKeysParams&&(i["uppy-credentials-params"]=btoa(JSON.stringify({params:this.companionKeysParams}))),{...r,...i}})}onReceiveResponse(t){t=super.onReceiveResponse(t);const r=this.uppy.getPlugin(this.pluginId),i=r.getPluginState().authenticated?t.status!==401:t.status<400;return r.setPluginState({authenticated:i}),t}setAuthToken(t){return this.uppy.getPlugin(this.pluginId).storage.setItem(this.tokenKey,t)}getAuthToken(){return this.uppy.getPlugin(this.pluginId).storage.getItem(this.tokenKey)}async ensurePreAuth(){if(this.companionKeysParams&&!this.preAuthToken&&(await this.fetchPreAuthToken(),!this.preAuthToken))throw new Error("Could not load authentication data required for third-party login. Please try again later.")}authUrl(t){t===void 0&&(t={});const r=new URLSearchParams(t);return this.preAuthToken&&r.set("uppyPreAuthToken",this.preAuthToken),`${this.hostname}/${this.id}/connect?${r}`}fileUrl(t){return`${this.hostname}/${this.id}/get/${t}`}async fetchPreAuthToken(){if(this.companionKeysParams)try{const t=await this.post(`${this.id}/preauth/`,{params:this.companionKeysParams});this.preAuthToken=t.token}catch(t){this.uppy.log(`[CompanionClient] unable to fetch preAuthToken ${t}`,"warning")}}list(t){return this.get(`${this.id}/list/${t||""}`)}logout(){return this.get(`${this.id}/logout`).then(t=>Promise.all([t,this.uppy.getPlugin(this.pluginId).storage.removeItem(this.tokenKey)])).then(t=>{let[r]=t;return r})}static initPlugin(t,r,n){if(t.type="acquirer",t.files=[],n&&(t.opts={...n,...r}),r.serverUrl||r.serverPattern)throw new Error("`serverUrl` and `serverPattern` have been renamed to `companionUrl` and `companionAllowedHosts` respectively in the 0.30.5 release. Please consult the docs (for example, https://uppy.io/docs/instagram/ for the Instagram plugin) and use the updated options.`");if(r.companionAllowedHosts){const i=r.companionAllowedHosts;if(typeof i!="string"&&!Array.isArray(i)&&!(i instanceof RegExp))throw new TypeError(`${t.id}: the option "companionAllowedHosts" must be one of string, Array, RegExp`);t.opts.companionAllowedHosts=i}else/^(?!https?:\/\/).*$/i.test(r.companionUrl)?t.opts.companionAllowedHosts=`https://${r.companionUrl.replace(/^\/\//,"")}`:t.opts.companionAllowedHosts=new URL(r.companionUrl).origin;t.storage=t.opts.storage||hw}}var mw=vw;const yw=Fl,Dw=e=>e.split("-").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ");class Cw extends yw{constructor(t,r){super(t,r),this.provider=r.provider,this.id=this.provider,this.name=this.opts.name||Dw(this.id),this.pluginId=this.opts.pluginId}fileUrl(t){return`${this.hostname}/search/${this.id}/get/${t}`}search(t,r){return this.get(`search/${this.id}/list?q=${encodeURIComponent(t)}${r?`&${r}`:""}`)}}var bw=Cw;let yg,Dg;function we(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var ww=0;function Wi(e){return"__private_"+ww+++"_"+e}const Ew=Kp;var Bt=Wi("queued"),cr=Wi("emitter"),nt=Wi("isOpen"),Re=Wi("socket"),gu=Wi("handleMessage");yg=Symbol.for("uppy test: getSocket");Dg=Symbol.for("uppy test: getQueued");class Aw{constructor(t){Object.defineProperty(this,Bt,{writable:!0,value:[]}),Object.defineProperty(this,cr,{writable:!0,value:Ew()}),Object.defineProperty(this,nt,{writable:!0,value:!1}),Object.defineProperty(this,Re,{writable:!0,value:void 0}),Object.defineProperty(this,gu,{writable:!0,value:r=>{try{const n=JSON.parse(r.data);this.emit(n.action,n.payload)}catch(n){console.log(n)}}}),this.opts=t,(!t||t.autoOpen!==!1)&&this.open()}get isOpen(){return we(this,nt)[nt]}[yg](){return we(this,Re)[Re]}[Dg](){return we(this,Bt)[Bt]}open(){we(this,Re)[Re]=new WebSocket(this.opts.target),we(this,Re)[Re].onopen=()=>{for(we(this,nt)[nt]=!0;we(this,Bt)[Bt].length>0&&we(this,nt)[nt];){const t=we(this,Bt)[Bt].shift();this.send(t.action,t.payload)}},we(this,Re)[Re].onclose=()=>{we(this,nt)[nt]=!1},we(this,Re)[Re].onmessage=we(this,gu)[gu]}close(){var t;(t=we(this,Re)[Re])==null||t.close()}send(t,r){if(!we(this,nt)[nt]){we(this,Bt)[Bt].push({action:t,payload:r});return}we(this,Re)[Re].send(JSON.stringify({action:t,payload:r}))}on(t,r){we(this,cr)[cr].on(t,r)}emit(t,r){we(this,cr)[cr].emit(t,r)}once(t,r){we(this,cr)[cr].once(t,r)}}var Bw=Aw;Object.defineProperty(dt,"__esModule",{value:!0});dt.Socket=dt.SearchProvider=dt.RequestClient=dt.Provider=void 0;const Fw=Fl;dt.RequestClient=Fw;const xw=mw;dt.Provider=xw;const Ow=bw;dt.SearchProvider=Ow;const Sw=Bw;dt.Socket=Sw;var yn={};Object.defineProperty(yn,"__esModule",{value:!0});yn.internalRateLimitedQueue=yn.RateLimitedQueue=void 0;function q(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var _w=0;function qe(e){return"__private_"+_w+++"_"+e}function Pw(){return new Error("Cancelled")}var Ke=qe("activeRequests"),$e=qe("queuedHandlers"),Ve=qe("paused"),fr=qe("pauseTimer"),Ne=qe("downLimit"),dr=qe("upperLimit"),Ft=qe("rateLimitingTimer"),yi=qe("call"),_t=qe("queueNext"),Fs=qe("next"),vu=qe("queue"),xs=qe("dequeue"),mu=qe("resume"),hr=qe("increaseLimit");class kw{constructor(t){Object.defineProperty(this,xs,{value:$w}),Object.defineProperty(this,vu,{value:Nw}),Object.defineProperty(this,Fs,{value:Rw}),Object.defineProperty(this,_t,{value:jw}),Object.defineProperty(this,yi,{value:Tw}),Object.defineProperty(this,Ke,{writable:!0,value:0}),Object.defineProperty(this,$e,{writable:!0,value:[]}),Object.defineProperty(this,Ve,{writable:!0,value:!1}),Object.defineProperty(this,fr,{writable:!0,value:void 0}),Object.defineProperty(this,Ne,{writable:!0,value:1}),Object.defineProperty(this,dr,{writable:!0,value:void 0}),Object.defineProperty(this,Ft,{writable:!0,value:void 0}),Object.defineProperty(this,mu,{writable:!0,value:()=>this.resume()}),Object.defineProperty(this,hr,{writable:!0,value:()=>{if(q(this,Ve)[Ve]){q(this,Ft)[Ft]=setTimeout(q(this,hr)[hr],0);return}q(this,Ne)[Ne]=this.limit,this.limit=Math.ceil((q(this,dr)[dr]+q(this,Ne)[Ne])/2);for(let r=q(this,Ne)[Ne];r<=this.limit;r++)q(this,_t)[_t]();q(this,dr)[dr]-q(this,Ne)[Ne]>3?q(this,Ft)[Ft]=setTimeout(q(this,hr)[hr],2e3):q(this,Ne)[Ne]=Math.floor(q(this,Ne)[Ne]/2)}}),typeof t!="number"||t===0?this.limit=1/0:this.limit=t}run(t,r){return!q(this,Ve)[Ve]&&q(this,Ke)[Ke]<this.limit?q(this,yi)[yi](t):q(this,vu)[vu](t,r)}wrapPromiseFunction(t,r){var n=this;return function(){for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];let u;const s=new Promise((l,f)=>{u=n.run(()=>{let c,d;try{d=Promise.resolve(t(...o))}catch(p){d=Promise.reject(p)}return d.then(p=>{c?f(c):(u.done(),l(p))},p=>{c?f(c):(u.done(),f(p))}),()=>{c=Pw()}},r)});return s.abort=()=>{u.abort()},s}}resume(){q(this,Ve)[Ve]=!1,clearTimeout(q(this,fr)[fr]);for(let t=0;t<this.limit;t++)q(this,_t)[_t]()}pause(t){t===void 0&&(t=null),q(this,Ve)[Ve]=!0,clearTimeout(q(this,fr)[fr]),t!=null&&(q(this,fr)[fr]=setTimeout(q(this,mu)[mu],t))}rateLimit(t){clearTimeout(q(this,Ft)[Ft]),this.pause(t),this.limit>1&&Number.isFinite(this.limit)&&(q(this,dr)[dr]=this.limit-1,this.limit=q(this,Ne)[Ne],q(this,Ft)[Ft]=setTimeout(q(this,hr)[hr],t))}get isPaused(){return q(this,Ve)[Ve]}}yn.RateLimitedQueue=kw;function Tw(e){q(this,Ke)[Ke]+=1;let t=!1,r;try{r=e()}catch(n){throw q(this,Ke)[Ke]-=1,n}return{abort:()=>{t||(t=!0,q(this,Ke)[Ke]-=1,r(),q(this,_t)[_t]())},done:()=>{t||(t=!0,q(this,Ke)[Ke]-=1,q(this,_t)[_t]())}}}function jw(){queueMicrotask(()=>q(this,Fs)[Fs]())}function Rw(){if(q(this,Ve)[Ve]||q(this,Ke)[Ke]>=this.limit||q(this,$e)[$e].length===0)return;const e=q(this,$e)[$e].shift(),t=q(this,yi)[yi](e.fn);e.abort=t.abort,e.done=t.done}function Nw(e,t){t===void 0&&(t={});const r={fn:e,priority:t.priority||0,abort:()=>{q(this,xs)[xs](r)},done:()=>{throw new Error("Cannot mark a queued request as done: this indicates a bug")}},n=q(this,$e)[$e].findIndex(i=>r.priority>i.priority);return n===-1?q(this,$e)[$e].push(r):q(this,$e)[$e].splice(n,0,r),r}function $w(e){const t=q(this,$e)[$e].indexOf(e);t!==-1&&q(this,$e)[$e].splice(t,1)}const Lw=Symbol("__queue");yn.internalRateLimitedQueue=Lw;const Mw=fe.l;function Iw(e,t,r){const{progress:n,bytesUploaded:i,bytesTotal:o}=t;n&&(e.uppy.log(`Upload progress: ${n}`),e.uppy.emit("upload-progress",r,{uploader:e,bytesUploaded:i,bytesTotal:o}))}var Uw=Mw(Iw,300,{leading:!0,trailing:!0});function Hw(e){const r=/^(?:https?:\/\/|\/\/)?(?:[^@\n]+@)?(?:www\.)?([^\n]+)/i.exec(e)[1];return`${/^http:\/\//i.test(e)?"ws":"wss"}://${r}`}var zw=Hw;function Ww(e){const t=[],r=[];function n(a){t.push(a)}function i(a){r.push(a)}return Promise.all(e.map(a=>a.then(n,i))).then(()=>({successful:t,failed:r}))}var qw=Ww;function Gn(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var Vw=0;function Cg(e){return"__private_"+Vw+++"_"+e}var pr=Cg("emitter"),Jn=Cg("events");let Kw=class{constructor(t){Object.defineProperty(this,pr,{writable:!0,value:void 0}),Object.defineProperty(this,Jn,{writable:!0,value:[]}),Gn(this,pr)[pr]=t}on(t,r){return Gn(this,Jn)[Jn].push([t,r]),Gn(this,pr)[pr].on(t,r)}remove(){for(const[t,r]of Gn(this,Jn)[Jn].splice(0))Gn(this,pr)[pr].off(t,r)}};var Gw=Kw;function Qe(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var Jw=0;function Ea(e){return"__private_"+Jw+++"_"+e}var xt=Ea("aliveTimer"),gr=Ea("isDone"),Xn=Ea("onTimedOut"),vr=Ea("timeout");let Xw=class{constructor(t,r){Object.defineProperty(this,xt,{writable:!0,value:void 0}),Object.defineProperty(this,gr,{writable:!0,value:!1}),Object.defineProperty(this,Xn,{writable:!0,value:void 0}),Object.defineProperty(this,vr,{writable:!0,value:void 0}),Qe(this,vr)[vr]=t,Qe(this,Xn)[Xn]=r}progress(){Qe(this,gr)[gr]||Qe(this,vr)[vr]>0&&(clearTimeout(Qe(this,xt)[xt]),Qe(this,xt)[xt]=setTimeout(Qe(this,Xn)[Xn],Qe(this,vr)[vr]))}done(){Qe(this,gr)[gr]||(clearTimeout(Qe(this,xt)[xt]),Qe(this,xt)[xt]=null,Qe(this,gr)[gr]=!0)}};var Yw=Xw;function Zw(e){return e?e.readyState!==0&&e.readyState!==4||e.status===0:!1}var Qw=Zw,eE={strings:{timedOut:"Upload stalled for %{seconds} seconds, aborting."}},tE=zp,yu=dt,so=yn;const rE=Yo,nE=Uw,iE=zw,oE=qw,rd=Gw,nd=Yw,bg=gg,wg=Qw,aE={version:"2.1.3"},uE=eE;function id(e,t){let r=t;return r||(r=new Error("Upload error")),typeof r=="string"&&(r=new Error(r)),r instanceof Error||(r=Object.assign(new Error("Upload error"),{data:r})),wg(e)?(r=new bg(r,e),r):(r.request=e,r)}function od(e){return e.data.slice(0,e.data.size,e.meta.type)}class sE extends rE{constructor(t,r){super(t,r),this.type="uploader",this.id=this.opts.id||"XHRUpload",this.title="XHRUpload",this.defaultLocale=uE;const n={formData:!0,fieldName:r.bundle?"files[]":"file",method:"post",metaFields:null,responseUrlFieldName:"url",bundle:!1,headers:{},timeout:30*1e3,limit:5,withCredentials:!1,responseType:"",getResponseData(i){let o={};try{o=JSON.parse(i)}catch(a){t.log(a)}return o},getResponseError(i,o){let a=new Error("Upload error");return wg(o)&&(a=new bg(a,o)),a},validateStatus(i){return i>=200&&i<300}};if(this.opts={...n,...r},this.i18nInit(),this.handleUpload=this.handleUpload.bind(this),so.internalRateLimitedQueue in this.opts?this.requests=this.opts[so.internalRateLimitedQueue]:this.requests=new so.RateLimitedQueue(this.opts.limit),this.opts.bundle&&!this.opts.formData)throw new Error("`opts.formData` must be true when `opts.bundle` is enabled.");this.uploaderEvents=Object.create(null)}getOptions(t){const r=this.uppy.getState().xhrUpload,{headers:n}=this.opts,i={...this.opts,...r||{},...t.xhrUpload||{},headers:{}};return typeof n=="function"?i.headers=n(t):Object.assign(i.headers,this.opts.headers),r&&Object.assign(i.headers,r.headers),t.xhrUpload&&Object.assign(i.headers,t.xhrUpload.headers),i}addMetadata(t,r,n){(Array.isArray(n.metaFields)?n.metaFields:Object.keys(r)).forEach(o=>{t.append(o,r[o])})}createFormDataUpload(t,r){const n=new FormData;this.addMetadata(n,t.meta,r);const i=od(t);return t.name?n.append(r.fieldName,i,t.meta.name):n.append(r.fieldName,i),n}createBundledUpload(t,r){const n=new FormData,{meta:i}=this.uppy.getState();return this.addMetadata(n,i,r),t.forEach(o=>{const a=this.getOptions(o),u=od(o);o.name?n.append(a.fieldName,u,o.name):n.append(a.fieldName,u)}),n}upload(t,r,n){const i=this.getOptions(t);return this.uppy.log(`uploading ${r} of ${n}`),new Promise((o,a)=>{this.uppy.emit("upload-started",t);const u=i.formData?this.createFormDataUpload(t,i):t.data,s=new XMLHttpRequest;this.uploaderEvents[t.id]=new rd(this.uppy);let l;const f=new nd(i.timeout,()=>{s.abort(),l.done();const d=new Error(this.i18n("timedOut",{seconds:Math.ceil(i.timeout/1e3)}));this.uppy.emit("upload-error",t,d),a(d)}),c=(0,tE.nanoid)();s.upload.addEventListener("loadstart",()=>{this.uppy.log(`[XHRUpload] ${c} started`)}),s.upload.addEventListener("progress",d=>{this.uppy.log(`[XHRUpload] ${c} progress: ${d.loaded} / ${d.total}`),f.progress(),d.lengthComputable&&this.uppy.emit("upload-progress",t,{uploader:this,bytesUploaded:d.loaded,bytesTotal:d.total})}),s.addEventListener("load",()=>{if(this.uppy.log(`[XHRUpload] ${c} finished`),f.done(),l.done(),this.uploaderEvents[t.id]&&(this.uploaderEvents[t.id].remove(),this.uploaderEvents[t.id]=null),i.validateStatus(s.status,s.responseText,s)){const g=i.getResponseData(s.responseText,s),v=g[i.responseUrlFieldName],D={status:s.status,body:g,uploadURL:v};return this.uppy.emit("upload-success",t,D),v&&this.uppy.log(`Download ${t.name} from ${v}`),o(t)}const d=i.getResponseData(s.responseText,s),p=id(s,i.getResponseError(s.responseText,s)),h={status:s.status,body:d};return this.uppy.emit("upload-error",t,p,h),a(p)}),s.addEventListener("error",()=>{this.uppy.log(`[XHRUpload] ${c} errored`),f.done(),l.done(),this.uploaderEvents[t.id]&&(this.uploaderEvents[t.id].remove(),this.uploaderEvents[t.id]=null);const d=id(s,i.getResponseError(s.responseText,s));return this.uppy.emit("upload-error",t,d),a(d)}),s.open(i.method.toUpperCase(),i.endpoint,!0),s.withCredentials=i.withCredentials,i.responseType!==""&&(s.responseType=i.responseType),l=this.requests.run(()=>{this.uppy.emit("upload-started",t);const d=this.getOptions(t);return Object.keys(d.headers).forEach(p=>{s.setRequestHeader(p,d.headers[p])}),s.send(u),()=>{f.done(),s.abort()}}),this.onFileRemove(t.id,()=>{l.abort(),a(new Error("File removed"))}),this.onCancelAll(t.id,d=>{let{reason:p}=d;p==="user"&&l.abort(),a(new Error("Upload cancelled"))})})}uploadRemote(t){const r=this.getOptions(t);return new Promise((n,i)=>{this.uppy.emit("upload-started",t);const o={};(Array.isArray(r.metaFields)?r.metaFields:Object.keys(t.meta)).forEach(l=>{o[l]=t.meta[l]});const u=t.remote.providerOptions.provider?yu.Provider:yu.RequestClient;new u(this.uppy,t.remote.providerOptions).post(t.remote.url,{...t.remote.body,endpoint:r.endpoint,size:t.data.size,fieldname:r.fieldName,metadata:o,httpMethod:r.method,useFormData:r.formData,headers:r.headers}).then(l=>{const{token:f}=l,c=iE(t.remote.companionUrl),d=new yu.Socket({target:`${c}/api/${f}`,autoOpen:!1});this.uploaderEvents[t.id]=new rd(this.uppy);let p;this.onFileRemove(t.id,()=>{d.send("cancel",{}),p.abort(),n(`upload ${t.id} was removed`)}),this.onCancelAll(t.id,function(h){let{reason:g}=h===void 0?{}:h;g==="user"&&(d.send("cancel",{}),p.abort()),n(`upload ${t.id} was canceled`)}),this.onRetry(t.id,()=>{d.send("pause",{}),d.send("resume",{})}),this.onRetryAll(t.id,()=>{d.send("pause",{}),d.send("resume",{})}),d.on("progress",h=>nE(this,h,t)),d.on("success",h=>{const g=r.getResponseData(h.response.responseText,h.response),v=g[r.responseUrlFieldName],D={status:h.response.status,body:g,uploadURL:v};return this.uppy.emit("upload-success",t,D),p.done(),this.uploaderEvents[t.id]&&(this.uploaderEvents[t.id].remove(),this.uploaderEvents[t.id]=null),n()}),d.on("error",h=>{const g=h.response,v=g?r.getResponseError(g.responseText,g):Object.assign(new Error(h.error.message),{cause:h.error});this.uppy.emit("upload-error",t,v),p.done(),this.uploaderEvents[t.id]&&(this.uploaderEvents[t.id].remove(),this.uploaderEvents[t.id]=null),i(v)}),p=this.requests.run(()=>(d.open(),t.isPaused&&d.send("pause",{}),()=>d.close()))}).catch(l=>{this.uppy.emit("upload-error",t,l),i(l)})})}uploadBundle(t){return new Promise((r,n)=>{const{endpoint:i}=this.opts,{method:o}=this.opts,a=this.uppy.getState().xhrUpload,u=this.createBundledUpload(t,{...this.opts,...a||{}}),s=new XMLHttpRequest,l=c=>{t.forEach(d=>{this.uppy.emit("upload-error",d,c)})},f=new nd(this.opts.timeout,()=>{s.abort();const c=new Error(this.i18n("timedOut",{seconds:Math.ceil(this.opts.timeout/1e3)}));l(c),n(c)});s.upload.addEventListener("loadstart",()=>{this.uppy.log("[XHRUpload] started uploading bundle"),f.progress()}),s.upload.addEventListener("progress",c=>{f.progress(),c.lengthComputable&&t.forEach(d=>{this.uppy.emit("upload-progress",d,{uploader:this,bytesUploaded:c.loaded/c.total*d.size,bytesTotal:d.size})})}),s.addEventListener("load",c=>{if(f.done(),this.opts.validateStatus(c.target.status,s.responseText,s)){const p=this.opts.getResponseData(s.responseText,s),h={status:c.target.status,body:p};return t.forEach(g=>{this.uppy.emit("upload-success",g,h)}),r()}const d=this.opts.getResponseError(s.responseText,s)||new Error("Upload error");return d.request=s,l(d),n(d)}),s.addEventListener("error",()=>{f.done();const c=this.opts.getResponseError(s.responseText,s)||new Error("Upload error");return l(c),n(c)}),this.uppy.on("cancel-all",function(c){let{reason:d}=c===void 0?{}:c;d==="user"&&(f.done(),s.abort())}),s.open(o.toUpperCase(),i,!0),s.withCredentials=this.opts.withCredentials,this.opts.responseType!==""&&(s.responseType=this.opts.responseType),Object.keys(this.opts.headers).forEach(c=>{s.setRequestHeader(c,this.opts.headers[c])}),s.send(u),t.forEach(c=>{this.uppy.emit("upload-started",c)})})}uploadFiles(t){const r=t.map((n,i)=>{const o=parseInt(i,10)+1,a=t.length;return n.error?Promise.reject(new Error(n.error)):n.isRemote?this.uploadRemote(n,o,a):this.upload(n,o,a)});return oE(r)}onFileRemove(t,r){this.uploaderEvents[t].on("file-removed",n=>{t===n.id&&r(n.id)})}onRetry(t,r){this.uploaderEvents[t].on("upload-retry",n=>{t===n&&r()})}onRetryAll(t,r){this.uploaderEvents[t].on("retry-all",()=>{this.uppy.getFile(t)&&r()})}onCancelAll(t,r){var n=this;this.uploaderEvents[t].on("cancel-all",function(){n.uppy.getFile(t)&&r(...arguments)})}handleUpload(t){if(t.length===0)return this.uppy.log("[XHRUpload] No files to upload!"),Promise.resolve();this.opts.limit===0&&!this.opts[so.internalRateLimitedQueue]&&this.uppy.log("[XHRUpload] When uploading multiple files at once, consider setting the `limit` option (to `10` for example), to limit the number of concurrent uploads, which helps prevent memory and network issues: https://uppy.io/docs/xhr-upload/#limit-0","warning"),this.uppy.log("[XHRUpload] Uploading...");const r=t.map(n=>this.uppy.getFile(n));if(this.opts.bundle){if(r.some(i=>i.isRemote))throw new Error("Can’t upload remote files when the `bundle: true` option is set");if(typeof this.opts.headers=="function")throw new TypeError("`headers` may not be a function when the `bundle: true` option is set");return this.uploadBundle(r)}return this.uploadFiles(r).then(()=>null)}install(){if(this.opts.bundle){const{capabilities:t}=this.uppy.getState();this.uppy.setState({capabilities:{...t,individualCancellation:!1}})}this.uppy.addUploader(this.handleUpload)}uninstall(){if(this.opts.bundle){const{capabilities:t}=this.uppy.getState();this.uppy.setState({capabilities:{...t,individualCancellation:!0}})}this.uppy.removeUploader(this.handleUpload)}}sE.VERSION=aE.version;var ad=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function qi(e){var t={exports:{}};return e(t,t.exports),t.exports}var Ut,Fo,lo=function(e){return e&&e.Math==Math&&e},P=lo(typeof globalThis=="object"&&globalThis)||lo(typeof window=="object"&&window)||lo(typeof self=="object"&&self)||lo(typeof ad=="object"&&ad)||function(){return this}()||Function("return this")(),lE=Object.defineProperty,xl=function(e,t){try{lE(P,e,{value:t,configurable:!0,writable:!0})}catch{P[e]=t}return t},Vt=P["__core-js_shared__"]||xl("__core-js_shared__",{}),Ol=qi(function(e){(e.exports=function(t,r){return Vt[t]||(Vt[t]=r!==void 0?r:{})})("versions",[]).push({version:"3.19.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})}),Eg=Function.prototype,Os=Eg.bind,Ss=Eg.call,cE=Os&&Os.bind(Ss),U=Os?function(e){return e&&cE(Ss,e)}:function(e){return e&&function(){return Ss.apply(e,arguments)}},fE=P.TypeError,tt=function(e){if(e==null)throw fE("Can't call method on "+e);return e},dE=P.Object,Zt=function(e){return dE(tt(e))},hE=U({}.hasOwnProperty),Ce=Object.hasOwn||function(e,t){return hE(Zt(e),t)},pE=0,gE=Math.random(),vE=U(1 .toString),Sl=function(e){return"Symbol("+(e===void 0?"":e)+")_"+vE(++pE+gE,36)},ie=function(e){return typeof e=="function"},mE=function(e){return ie(e)?e:void 0},Hr=function(e,t){return arguments.length<2?mE(P[e]):P[e]&&P[e][t]},fn=Hr("navigator","userAgent")||"",ud=P.process,sd=P.Deno,ld=ud&&ud.versions||sd&&sd.version,cd=ld&&ld.v8;cd&&(Fo=(Ut=cd.split("."))[0]>0&&Ut[0]<4?1:+(Ut[0]+Ut[1])),!Fo&&fn&&(!(Ut=fn.match(/Edge\/(\d+)/))||Ut[1]>=74)&&(Ut=fn.match(/Chrome\/(\d+)/))&&(Fo=+Ut[1]);var Oi=Fo,ee=function(e){try{return!!e()}catch{return!0}},_s=!!Object.getOwnPropertySymbols&&!ee(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Oi&&Oi<41}),_l=_s&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Yn=Ol("wks"),Sr=P.Symbol,fd=Sr&&Sr.for,yE=_l?Sr:Sr&&Sr.withoutSetter||Sl,ye=function(e){if(!Ce(Yn,e)||!_s&&typeof Yn[e]!="string"){var t="Symbol."+e;_s&&Ce(Sr,e)?Yn[e]=Sr[e]:Yn[e]=_l&&fd?fd(t):yE(t)}return Yn[e]},Ag={};Ag[ye("toStringTag")]="z";var Pl=String(Ag)==="[object z]",xe=!ee(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),se=function(e){return typeof e=="object"?e!==null:ie(e)},Ps=P.document,DE=se(Ps)&&se(Ps.createElement),Si=function(e){return DE?Ps.createElement(e):{}},Bg=!xe&&!ee(function(){return Object.defineProperty(Si("div"),"a",{get:function(){return 7}}).a!=7}),CE=P.String,bE=P.TypeError,be=function(e){if(se(e))return e;throw bE(CE(e)+" is not an object")},Zn=Function.prototype.call,Y=Zn.bind?Zn.bind(Zn):function(){return Zn.apply(Zn,arguments)},Rr=U({}.isPrototypeOf),wE=P.Object,ks=_l?function(e){return typeof e=="symbol"}:function(e){var t=Hr("Symbol");return ie(t)&&Rr(t.prototype,wE(e))},EE=P.String,Aa=function(e){try{return EE(e)}catch{return"Object"}},AE=P.TypeError,Xt=function(e){if(ie(e))return e;throw AE(Aa(e)+" is not a function")},Nr=function(e,t){var r=e[t];return r==null?void 0:Xt(r)},BE=P.TypeError,FE=P.TypeError,xE=ye("toPrimitive"),OE=function(e,t){if(!se(e)||ks(e))return e;var r,n=Nr(e,xE);if(n){if(r=Y(n,e,t),!se(r)||ks(r))return r;throw FE("Can't convert object to primitive value")}return function(i,o){var a,u;if(ie(a=i.toString)&&!se(u=Y(a,i))||ie(a=i.valueOf)&&!se(u=Y(a,i)))return u;throw BE("Can't convert object to primitive value")}(e)},kl=function(e){var t=OE(e,"string");return ks(t)?t:t+""},SE=P.TypeError,dd=Object.defineProperty,st={f:xe?dd:function(e,t,r){if(be(e),t=kl(t),be(r),Bg)try{return dd(e,t,r)}catch{}if("get"in r||"set"in r)throw SE("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},Ba=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},at=xe?function(e,t,r){return st.f(e,t,Ba(1,r))}:function(e,t,r){return e[t]=r,e},_E=U(Function.toString);ie(Vt.inspectSource)||(Vt.inspectSource=function(e){return _E(e)});var Qo,Di,ea,Fa=Vt.inspectSource,hd=P.WeakMap,Fg=ie(hd)&&/native code/.test(Fa(hd)),pd=Ol("keys"),Tl=function(e){return pd[e]||(pd[e]=Sl(e))},xa={},Ts=P.TypeError,PE=P.WeakMap;if(Fg||Vt.state){var mr=Vt.state||(Vt.state=new PE),kE=U(mr.get),gd=U(mr.has),TE=U(mr.set);Qo=function(e,t){if(gd(mr,e))throw new Ts("Object already initialized");return t.facade=e,TE(mr,e,t),t},Di=function(e){return kE(mr,e)||{}},ea=function(e){return gd(mr,e)}}else{var Yr=Tl("state");xa[Yr]=!0,Qo=function(e,t){if(Ce(e,Yr))throw new Ts("Object already initialized");return t.facade=e,at(e,Yr,t),t},Di=function(e){return Ce(e,Yr)?e[Yr]:{}},ea=function(e){return Ce(e,Yr)}}var je={set:Qo,get:Di,has:ea,enforce:function(e){return ea(e)?Di(e):Qo(e,{})},getterFor:function(e){return function(t){var r;if(!se(t)||(r=Di(t)).type!==e)throw Ts("Incompatible receiver, "+e+" required");return r}}},xg=Function.prototype,jE=xe&&Object.getOwnPropertyDescriptor,Du=Ce(xg,"name"),xn={EXISTS:Du,PROPER:Du&&(function(){}).name==="something",CONFIGURABLE:Du&&(!xe||xe&&jE(xg,"name").configurable)},We=qi(function(e){var t=xn.CONFIGURABLE,r=je.get,n=je.enforce,i=String(String).split("String");(e.exports=function(o,a,u,s){var l,f=!!s&&!!s.unsafe,c=!!s&&!!s.enumerable,d=!!s&&!!s.noTargetGet,p=s&&s.name!==void 0?s.name:a;ie(u)&&(String(p).slice(0,7)==="Symbol("&&(p="["+String(p).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!Ce(u,"name")||t&&u.name!==p)&&at(u,"name",p),(l=n(u)).source||(l.source=i.join(typeof p=="string"?p:""))),o!==P?(f?!d&&o[a]&&(c=!0):delete o[a],c?o[a]=u:at(o,a,u)):c?o[a]=u:xl(a,u)})(Function.prototype,"toString",function(){return ie(this)&&r(this).source||Fa(this)})}),RE=U({}.toString),NE=U("".slice),ut=function(e){return NE(RE(e),8,-1)},$E=ye("toStringTag"),LE=P.Object,ME=ut(function(){return arguments}())=="Arguments",Oa=Pl?ut:function(e){var t,r,n;return e===void 0?"Undefined":e===null?"Null":typeof(r=function(i,o){try{return i[o]}catch{}}(t=LE(e),$E))=="string"?r:ME?ut(t):(n=ut(t))=="Object"&&ie(t.callee)?"Arguments":n},IE=Pl?{}.toString:function(){return"[object "+Oa(this)+"]"};Pl||We(Object.prototype,"toString",IE,{unsafe:!0});var ta={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Cu=Si("span").classList,vd=Cu&&Cu.constructor&&Cu.constructor.prototype,Og=vd===Object.prototype?void 0:vd,md=U(U.bind),$r=function(e,t){return Xt(e),t===void 0?e:md?md(e,t):function(){return e.apply(t,arguments)}},bu=P.Object,UE=U("".split),Sa=ee(function(){return!bu("z").propertyIsEnumerable(0)})?function(e){return ut(e)=="String"?UE(e,""):bu(e)}:bu,HE=Math.ceil,zE=Math.floor,Vi=function(e){var t=+e;return t!=t||t===0?0:(t>0?zE:HE)(t)},WE=Math.min,On=function(e){return e>0?WE(Vi(e),9007199254740991):0},zr=function(e){return On(e.length)},ra=Array.isArray||function(e){return ut(e)=="Array"},Sg=function(){},qE=[],_g=Hr("Reflect","construct"),jl=/^\s*(?:class|function)\b/,VE=U(jl.exec),KE=!jl.exec(Sg),Qn=function(e){if(!ie(e))return!1;try{return _g(Sg,qE,e),!0}catch{return!1}},_a=!_g||ee(function(){var e;return Qn(Qn.call)||!Qn(Object)||!Qn(function(){e=!0})||e})?function(e){if(!ie(e))return!1;switch(Oa(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return KE||!!VE(jl,Fa(e))}:Qn,GE=ye("species"),yd=P.Array,Pg=function(e,t){return new(function(r){var n;return ra(r)&&(n=r.constructor,(_a(n)&&(n===yd||ra(n.prototype))||se(n)&&(n=n[GE])===null)&&(n=void 0)),n===void 0?yd:n}(e))(t===0?0:t)},Dd=U([].push),ei=function(e){var t=e==1,r=e==2,n=e==3,i=e==4,o=e==6,a=e==7,u=e==5||o;return function(s,l,f,c){for(var d,p,h=Zt(s),g=Sa(h),v=$r(l,f),D=zr(g),C=0,b=c||Pg,B=t?b(s,D):r||a?b(s,0):void 0;D>C;C++)if((u||C in g)&&(p=v(d=g[C],C,h),e))if(t)B[C]=p;else if(p)switch(e){case 3:return!0;case 5:return d;case 6:return C;case 2:Dd(B,d)}else switch(e){case 4:return!1;case 7:Dd(B,d)}return o?-1:n||i?i:B}},Sn={forEach:ei(0),map:ei(1),filter:ei(2),find:ei(5),findIndex:ei(6)},kg=function(e,t){var r=[][e];return!!r&&ee(function(){r.call(null,t||function(){throw 1},1)})},JE=Sn.forEach,wu=kg("forEach")?[].forEach:function(e){return JE(this,e,arguments.length>1?arguments[1]:void 0)},Tg=function(e){if(e&&e.forEach!==wu)try{at(e,"forEach",wu)}catch{e.forEach=wu}};for(var Eu in ta)ta[Eu]&&Tg(P[Eu]&&P[Eu].prototype);Tg(Og);var Cd={}.propertyIsEnumerable,bd=Object.getOwnPropertyDescriptor,XE=bd&&!Cd.call({1:2},1)?function(e){var t=bd(this,e);return!!t&&t.enumerable}:Cd,jg={f:XE},Qt=function(e){return Sa(tt(e))},wd=Object.getOwnPropertyDescriptor,Ki={f:xe?wd:function(e,t){if(e=Qt(e),t=kl(t),Bg)try{return wd(e,t)}catch{}if(Ce(e,t))return Ba(!Y(jg.f,e,t),e[t])}},YE=Math.max,ZE=Math.min,Dn=function(e,t){var r=Vi(e);return r<0?YE(r+t,0):ZE(r,t)},Ed=function(e){return function(t,r,n){var i,o=Qt(t),a=zr(o),u=Dn(n,a);if(e&&r!=r){for(;a>u;)if((i=o[u++])!=i)return!0}else for(;a>u;u++)if((e||u in o)&&o[u]===r)return e||u||0;return!e&&-1}},Rg={includes:Ed(!0),indexOf:Ed(!1)},QE=Rg.indexOf,Ad=U([].push),Ng=function(e,t){var r,n=Qt(e),i=0,o=[];for(r in n)!Ce(xa,r)&&Ce(n,r)&&Ad(o,r);for(;t.length>i;)Ce(n,r=t[i++])&&(~QE(o,r)||Ad(o,r));return o},na=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],eA=na.concat("length","prototype"),_i={f:Object.getOwnPropertyNames||function(e){return Ng(e,eA)}},$g={f:Object.getOwnPropertySymbols},tA=U([].concat),rA=Hr("Reflect","ownKeys")||function(e){var t=_i.f(be(e)),r=$g.f;return r?tA(t,r(e)):t},nA=function(e,t){for(var r=rA(t),n=st.f,i=Ki.f,o=0;o<r.length;o++){var a=r[o];Ce(e,a)||n(e,a,i(t,a))}},iA=/#|\.prototype\./,Gi=function(e,t){var r=aA[oA(e)];return r==sA||r!=uA&&(ie(t)?ee(t):!!t)},oA=Gi.normalize=function(e){return String(e).replace(iA,".").toLowerCase()},aA=Gi.data={},uA=Gi.NATIVE="N",sA=Gi.POLYFILL="P",Pi=Gi,lA=Ki.f,me=function(e,t){var r,n,i,o,a,u=e.target,s=e.global,l=e.stat;if(r=s?P:l?P[u]||xl(u,{}):(P[u]||{}).prototype)for(n in t){if(o=t[n],i=e.noTargetGet?(a=lA(r,n))&&a.value:r[n],!Pi(s?n:u+(l?".":"#")+n,e.forced)&&i!==void 0){if(typeof o==typeof i)continue;nA(o,i)}(e.sham||i&&i.sham)&&at(o,"sham",!0),We(r,n,o,e)}},dn=Object.keys||function(e){return Ng(e,na)},cA=ee(function(){dn(1)});me({target:"Object",stat:!0,forced:cA},{keys:function(e){return dn(Zt(e))}});var fA=P.String,ae=function(e){if(Oa(e)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return fA(e)},Rl=function(){var e=be(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},dA=xn.PROPER,js=RegExp.prototype,Lg=js.toString,hA=U(Rl),pA=ee(function(){return Lg.call({source:"a",flags:"b"})!="/a/b"}),gA=dA&&Lg.name!="toString";(pA||gA)&&We(RegExp.prototype,"toString",function(){var e=be(this),t=ae(e.source),r=e.flags;return"/"+t+"/"+ae(r===void 0&&Rr(js,e)&&!("flags"in js)?hA(e):r)},{unsafe:!0});var co,vA=xe?Object.defineProperties:function(e,t){be(e);for(var r,n=Qt(t),i=dn(t),o=i.length,a=0;o>a;)st.f(e,r=i[a++],n[r]);return e},Rs=Hr("document","documentElement"),Mg=Tl("IE_PROTO"),Au=function(){},Ig=function(e){return"<script>"+e+"<\/script>"},Bd=function(e){e.write(Ig("")),e.close();var t=e.parentWindow.Object;return e=null,t},xo=function(){try{co=new ActiveXObject("htmlfile")}catch{}var e,t;xo=typeof document<"u"?document.domain&&co?Bd(co):((t=Si("iframe")).style.display="none",Rs.appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write(Ig("document.F=Object")),e.close(),e.F):Bd(co);for(var r=na.length;r--;)delete xo.prototype[na[r]];return xo()};xa[Mg]=!0;var Pa=Object.create||function(e,t){var r;return e!==null?(Au.prototype=be(e),r=new Au,Au.prototype=null,r[Mg]=e):r=xo(),t===void 0?r:vA(r,t)},Ns=ye("unscopables"),$s=Array.prototype;$s[Ns]==null&&st.f($s,Ns,{configurable:!0,value:Pa(null)});var Ci=function(e){$s[Ns][e]=!0},mA=Rg.includes;me({target:"Array",proto:!0},{includes:function(e){return mA(this,e,arguments.length>1?arguments[1]:void 0)}}),Ci("includes");var yA=ye("match"),Nl=function(e){var t;return se(e)&&((t=e[yA])!==void 0?!!t:ut(e)=="RegExp")},DA=P.TypeError,$l=function(e){if(Nl(e))throw DA("The method doesn't accept regular expressions");return e},CA=ye("match"),Ll=function(e){var t=/./;try{"/./"[e](t)}catch{try{return t[CA]=!1,"/./"[e](t)}catch{}}return!1},bA=U("".indexOf);me({target:"String",proto:!0,forced:!Ll("includes")},{includes:function(e){return!!~bA(ae(tt(this)),ae($l(e)),arguments.length>1?arguments[1]:void 0)}});var Fd,wA=/"/g,EA=U("".replace);me({target:"String",proto:!0,forced:(Fd="anchor",ee(function(){var e=""[Fd]('"');return e!==e.toLowerCase()||e.split('"').length>3}))},{anchor:function(e){return t="a",r="name",n=e,i=ae(tt(this)),o="<"+t,r!==""&&(o+=" "+r+'="'+EA(ae(n),wA,""")+'"'),o+">"+i+"</"+t+">";var t,r,n,i,o}});var Ls=function(e,t,r){var n,i;be(e);try{if(!(n=Nr(e,"return"))){if(t==="throw")throw r;return r}n=Y(n,e)}catch(o){i=!0,n=o}if(t==="throw")throw r;if(i)throw n;return be(n),r},AA=function(e,t,r,n){try{return n?t(be(r)[0],r[1]):t(r)}catch(i){Ls(e,"throw",i)}},Cn={},BA=ye("iterator"),FA=Array.prototype,Ug=function(e){return e!==void 0&&(Cn.Array===e||FA[BA]===e)},ki=function(e,t,r){var n=kl(t);n in e?st.f(e,n,Ba(0,r)):e[n]=r},xA=ye("iterator"),Ml=function(e){if(e!=null)return Nr(e,xA)||Nr(e,"@@iterator")||Cn[Oa(e)]},OA=P.TypeError,Hg=function(e,t){var r=arguments.length<2?Ml(e):t;if(Xt(r))return be(Y(r,e));throw OA(Aa(e)+" is not iterable")},xd=P.Array,zg=ye("iterator"),Wg=!1;try{var SA=0,Od={next:function(){return{done:!!SA++}},return:function(){Wg=!0}};Od[zg]=function(){return this},Array.from(Od,function(){throw 2})}catch{}var Il=function(e,t){if(!Wg)return!1;var r=!1;try{var n={};n[zg]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch{}return r},_A=!Il(function(e){Array.from(e)});me({target:"Array",stat:!0,forced:_A},{from:function(e){var t=Zt(e),r=_a(this),n=arguments.length,i=n>1?arguments[1]:void 0,o=i!==void 0;o&&(i=$r(i,n>2?arguments[2]:void 0));var a,u,s,l,f,c,d=Ml(t),p=0;if(!d||this==xd&&Ug(d))for(a=zr(t),u=r?new this(a):xd(a);a>p;p++)c=o?i(t[p],p):t[p],ki(u,p,c);else for(f=(l=Hg(t,d)).next,u=r?new this:[];!(s=Y(f,l)).done;p++)c=o?AA(l,i,[s.value,p],!0):s.value,ki(u,p,c);return u.length=p,u}});var _r,Sd,_d,PA=U("".charAt),Pd=U("".charCodeAt),kA=U("".slice),TA=function(e){return function(t,r){var n,i,o=ae(tt(t)),a=Vi(r),u=o.length;return a<0||a>=u?e?"":void 0:(n=Pd(o,a))<55296||n>56319||a+1===u||(i=Pd(o,a+1))<56320||i>57343?e?PA(o,a):n:e?kA(o,a,a+2):i-56320+(n-55296<<10)+65536}},qg={charAt:TA(!0)},jA=!ee(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),kd=Tl("IE_PROTO"),Ms=P.Object,RA=Ms.prototype,ia=jA?Ms.getPrototypeOf:function(e){var t=Zt(e);if(Ce(t,kd))return t[kd];var r=t.constructor;return ie(r)&&t instanceof r?r.prototype:t instanceof Ms?RA:null},Is=ye("iterator"),Vg=!1;[].keys&&("next"in(_d=[].keys())?(Sd=ia(ia(_d)))!==Object.prototype&&(_r=Sd):Vg=!0);var NA=_r==null||ee(function(){var e={};return _r[Is].call(e)!==e});NA&&(_r={}),ie(_r[Is])||We(_r,Is,function(){return this});var Ul={IteratorPrototype:_r,BUGGY_SAFARI_ITERATORS:Vg},$A=st.f,Td=ye("toStringTag"),oa=function(e,t,r){e&&!Ce(e=r?e:e.prototype,Td)&&$A(e,Td,{configurable:!0,value:t})},LA=Ul.IteratorPrototype,MA=function(){return this},IA=P.String,UA=P.TypeError,bn=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=U(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),t=r instanceof Array}catch{}return function(n,i){return be(n),function(o){if(typeof o=="object"||ie(o))return o;throw UA("Can't set "+IA(o)+" as a prototype")}(i),t?e(n,i):n.__proto__=i,n}}():void 0),HA=xn.PROPER,zA=xn.CONFIGURABLE,jd=Ul.IteratorPrototype,fo=Ul.BUGGY_SAFARI_ITERATORS,ti=ye("iterator"),WA=function(){return this},Hl=function(e,t,r,n,i,o,a){(function(D,C,b,B){var E=C+" Iterator";D.prototype=Pa(LA,{next:Ba(1,b)}),oa(D,E,!1),Cn[E]=MA})(r,t,n);var u,s,l,f=function(D){if(D===i&&g)return g;if(!fo&&D in p)return p[D];switch(D){case"keys":case"values":case"entries":return function(){return new r(this,D)}}return function(){return new r(this)}},c=t+" Iterator",d=!1,p=e.prototype,h=p[ti]||p["@@iterator"]||i&&p[i],g=!fo&&h||f(i),v=t=="Array"&&p.entries||h;if(v&&(u=ia(v.call(new e)))!==Object.prototype&&u.next&&(ia(u)!==jd&&(bn?bn(u,jd):ie(u[ti])||We(u,ti,WA)),oa(u,c,!0)),HA&&i=="values"&&h&&h.name!=="values"&&(zA?at(p,"name","values"):(d=!0,g=function(){return Y(h,this)})),i)if(s={values:f("values"),keys:o?g:f("keys"),entries:f("entries")},a)for(l in s)(fo||d||!(l in p))&&We(p,l,s[l]);else me({target:t,proto:!0,forced:fo||d},s);return p[ti]!==g&&We(p,ti,g,{name:i}),Cn[t]=g,s},qA=qg.charAt,VA=je.set,KA=je.getterFor("String Iterator");Hl(String,"String",function(e){VA(this,{type:"String Iterator",string:ae(e),index:0})},function(){var e,t=KA(this),r=t.string,n=t.index;return n>=r.length?{value:void 0,done:!0}:(e=qA(r,n),t.index+=e.length,{value:e,done:!1})});var Bu,GA=Ki.f,Rd=U("".endsWith),JA=U("".slice),XA=Math.min,Kg=Ll("endsWith"),YA=!(Kg||(Bu=GA(String.prototype,"endsWith"),!Bu||Bu.writable));me({target:"String",proto:!0,forced:!YA&&!Kg},{endsWith:function(e){var t=ae(tt(this));$l(e);var r=arguments.length>1?arguments[1]:void 0,n=t.length,i=r===void 0?n:XA(On(r),n),o=ae(e);return Rd?Rd(t,o,i):JA(t,i-o.length,i)===o}});var ZA=U([].join),QA=Sa!=Object,eB=kg("join",",");me({target:"Array",proto:!0,forced:QA||!eB},{join:function(e){return ZA(Qt(this),e===void 0?",":e)}});var tB=ye("species"),ka=function(e){return Oi>=51||!ee(function(){var t=[];return(t.constructor={})[tB]=function(){return{foo:1}},t[e](Boolean).foo!==1})},rB=Sn.map,nB=ka("map");me({target:"Array",proto:!0,forced:!nB},{map:function(e){return rB(this,e,arguments.length>1?arguments[1]:void 0)}});var zl=P.RegExp,Us=ee(function(){var e=zl("a","y");return e.lastIndex=2,e.exec("abcd")!=null}),iB=Us||ee(function(){return!zl("a","y").sticky}),Ta={BROKEN_CARET:Us||ee(function(){var e=zl("^r","gy");return e.lastIndex=2,e.exec("str")!=null}),MISSED_STICKY:iB,UNSUPPORTED_Y:Us},oB=P.RegExp,Wl=ee(function(){var e=oB(".","s");return!(e.dotAll&&e.exec(`
|
|
24
|
-
`)&&e.flags==="s")}),aB=P.RegExp,ql=ee(function(){var e=aB("(?<a>b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$<a>c")!=="bc"}),uB=je.get,sB=Ol("native-string-replace",String.prototype.replace),aa=RegExp.prototype.exec,Hs=aa,lB=U("".charAt),cB=U("".indexOf),fB=U("".replace),Fu=U("".slice),xu=function(){var e=/a/,t=/b*/g;return Y(aa,e,"a"),Y(aa,t,"a"),e.lastIndex!==0||t.lastIndex!==0}(),Nd=Ta.BROKEN_CARET,Ou=/()??/.exec("")[1]!==void 0;(xu||Ou||Nd||Wl||ql)&&(Hs=function(e){var t,r,n,i,o,a,u,s=this,l=uB(s),f=ae(e),c=l.raw;if(c)return c.lastIndex=s.lastIndex,t=Y(Hs,c,f),s.lastIndex=c.lastIndex,t;var d=l.groups,p=Nd&&s.sticky,h=Y(Rl,s),g=s.source,v=0,D=f;if(p&&(h=fB(h,"y",""),cB(h,"g")===-1&&(h+="g"),D=Fu(f,s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&lB(f,s.lastIndex-1)!==`
|
|
25
|
-
`)&&(g="(?: "+g+")",D=" "+D,v++),r=new RegExp("^(?:"+g+")",h)),Ou&&(r=new RegExp("^"+g+"$(?!\\s)",h)),xu&&(n=s.lastIndex),i=Y(aa,p?r:s,D),p?i?(i.input=Fu(i.input,v),i[0]=Fu(i[0],v),i.index=s.lastIndex,s.lastIndex+=i[0].length):s.lastIndex=0:xu&&i&&(s.lastIndex=s.global?i.index+i[0].length:n),Ou&&i&&i.length>1&&Y(sB,i[0],r,function(){for(o=1;o<arguments.length-2;o++)arguments[o]===void 0&&(i[o]=void 0)}),i&&d)for(i.groups=a=Pa(null),o=0;o<d.length;o++)a[(u=d[o])[0]]=i[u[1]];return i});var Ti=Hs;me({target:"RegExp",proto:!0,forced:/./.exec!==Ti},{exec:Ti});var Vl=Function.prototype,$d=Vl.apply,dB=Vl.bind,Ld=Vl.call,Kl=typeof Reflect=="object"&&Reflect.apply||(dB?Ld.bind($d):function(){return Ld.apply($d,arguments)}),hB=ye("species"),Su=RegExp.prototype,Gl=function(e,t,r,n){var i=ye(e),o=!ee(function(){var l={};return l[i]=function(){return 7},""[e](l)!=7}),a=o&&!ee(function(){var l=!1,f=/a/;return e==="split"&&((f={}).constructor={},f.constructor[hB]=function(){return f},f.flags="",f[i]=/./[i]),f.exec=function(){return l=!0,null},f[i](""),!l});if(!o||!a||r){var u=U(/./[i]),s=t(i,""[e],function(l,f,c,d,p){var h=U(l),g=f.exec;return g===Ti||g===Su.exec?o&&!p?{done:!0,value:u(f,c,d)}:{done:!0,value:h(c,f,d)}:{done:!1}});We(String.prototype,e,s[0]),We(Su,i,s[1])}n&&at(Su[i],"sham",!0)},pB=qg.charAt,Jl=function(e,t,r){return t+(r?pB(e,t).length:1)},gB=Math.floor,_u=U("".charAt),vB=U("".replace),Pu=U("".slice),mB=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,yB=/\$([$&'`]|\d{1,2})/g,DB=function(e,t,r,n,i,o){var a=r+e.length,u=n.length,s=yB;return i!==void 0&&(i=Zt(i),s=mB),vB(o,s,function(l,f){var c;switch(_u(f,0)){case"$":return"$";case"&":return e;case"`":return Pu(t,0,r);case"'":return Pu(t,a);case"<":c=i[Pu(f,1,-1)];break;default:var d=+f;if(d===0)return l;if(d>u){var p=gB(d/10);return p===0?l:p<=u?n[p-1]===void 0?_u(f,1):n[p-1]+_u(f,1):l}c=n[d-1]}return c===void 0?"":c})},CB=P.TypeError,ji=function(e,t){var r=e.exec;if(ie(r)){var n=Y(r,e,t);return n!==null&&be(n),n}if(ut(e)==="RegExp")return Y(Ti,e,t);throw CB("RegExp#exec called on incompatible receiver")},zs=ye("replace"),bB=Math.max,wB=Math.min,EB=U([].concat),ku=U([].push),Md=U("".indexOf),Id=U("".slice),AB="a".replace(/./,"$0")==="$0",Ud=!!/./[zs]&&/./[zs]("a","$0")==="";Gl("replace",function(e,t,r){var n=Ud?"$":"$0";return[function(i,o){var a=tt(this),u=i==null?void 0:Nr(i,zs);return u?Y(u,i,a,o):Y(t,ae(a),i,o)},function(i,o){var a=be(this),u=ae(i);if(typeof o=="string"&&Md(o,n)===-1&&Md(o,"$<")===-1){var s=r(t,a,u,o);if(s.done)return s.value}var l=ie(o);l||(o=ae(o));var f=a.global;if(f){var c=a.unicode;a.lastIndex=0}for(var d=[];;){var p=ji(a,u);if(p===null||(ku(d,p),!f))break;ae(p[0])===""&&(a.lastIndex=Jl(u,On(a.lastIndex),c))}for(var h,g="",v=0,D=0;D<d.length;D++){for(var C=ae((p=d[D])[0]),b=bB(wB(Vi(p.index),u.length),0),B=[],E=1;E<p.length;E++)ku(B,(h=p[E])===void 0?h:String(h));var x=p.groups;if(l){var _=EB([C],B,b,u);x!==void 0&&ku(_,x);var T=ae(Kl(o,void 0,_))}else T=DB(C,u,b,B,x,o);b>=v&&(g+=Id(u,v,b)+T,v=b+C.length)}return g+Id(u,v)}]},!!ee(function(){var e=/./;return e.exec=function(){var t=[];return t.groups={a:"7"},t},"".replace(e,"$<a>")!=="7"})||!AB||Ud);/*! *****************************************************************************
|
|
26
|
-
Copyright (c) Microsoft Corporation.
|
|
27
|
-
|
|
28
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
29
|
-
purpose with or without fee is hereby granted.
|
|
30
|
-
|
|
31
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
32
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
33
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
34
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
35
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
36
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
37
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
38
|
-
***************************************************************************** */var Ws=function(e,t){return Ws=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Ws(e,t)};function _n(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Ws(e,t),e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var ua=function(){return ua=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},ua.apply(this,arguments)};function ri(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ae(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(t===void 0||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(u){i={error:u}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}function Hd(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e}var BB=0,zd=function(){this.id=""+BB++},FB=je.set,xB=je.getterFor("Array Iterator"),pi=Hl(Array,"Array",function(e,t){FB(this,{type:"Array Iterator",target:Qt(e),index:0,kind:t})},function(){var e=xB(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,{value:void 0,done:!0}):r=="keys"?{value:n,done:!1}:r=="values"?{value:t[n],done:!1}:{value:[n,t[n]],done:!1}},"values");Cn.Arguments=Cn.Array,Ci("keys"),Ci("values"),Ci("entries");var wn=function(e,t,r){for(var n in t)We(e,n,t[n],r);return e},OB=P.Array,SB=Math.max,qs=function(e,t,r){for(var n=zr(e),i=Dn(t,n),o=Dn(r===void 0?n:r,n),a=OB(SB(o-i,0)),u=0;i<o;i++,u++)ki(a,u,e[i]);return a.length=u,a},Wd=_i.f,qd=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],_B={f:function(e){return qd&&ut(e)=="Window"?function(t){try{return Wd(t)}catch{return qs(qd)}}(e):Wd(Qt(e))}},Vd=ee(function(){if(typeof ArrayBuffer=="function"){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}),ho=Object.isExtensible,xr=ee(function(){ho(1)})||Vd?function(e){return!!se(e)&&(!Vd||ut(e)!="ArrayBuffer")&&(!ho||ho(e))}:ho,PB=!ee(function(){return Object.isExtensible(Object.preventExtensions({}))}),ja=qi(function(e){var t=st.f,r=!1,n=Sl("meta"),i=0,o=function(u){t(u,n,{value:{objectID:"O"+i++,weakData:{}}})},a=e.exports={enable:function(){a.enable=function(){},r=!0;var u=_i.f,s=U([].splice),l={};l[n]=1,u(l).length&&(_i.f=function(f){for(var c=u(f),d=0,p=c.length;d<p;d++)if(c[d]===n){s(c,d,1);break}return c},me({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:_B.f}))},fastKey:function(u,s){if(!se(u))return typeof u=="symbol"?u:(typeof u=="string"?"S":"P")+u;if(!Ce(u,n)){if(!xr(u))return"F";if(!s)return"E";o(u)}return u[n].objectID},getWeakData:function(u,s){if(!Ce(u,n)){if(!xr(u))return!0;if(!s)return!1;o(u)}return u[n].weakData},onFreeze:function(u){return PB&&r&&xr(u)&&!Ce(u,n)&&o(u),u}};xa[n]=!0}),kB=P.TypeError,Oo=function(e,t){this.stopped=e,this.result=t},Kd=Oo.prototype,Ri=function(e,t,r){var n,i,o,a,u,s,l,f=r&&r.that,c=!(!r||!r.AS_ENTRIES),d=!(!r||!r.IS_ITERATOR),p=!(!r||!r.INTERRUPTED),h=$r(t,f),g=function(D){return n&&Ls(n,"normal",D),new Oo(!0,D)},v=function(D){return c?(be(D),p?h(D[0],D[1],g):h(D[0],D[1])):p?h(D,g):h(D)};if(d)n=e;else{if(!(i=Ml(e)))throw kB(Aa(e)+" is not iterable");if(Ug(i)){for(o=0,a=zr(e);a>o;o++)if((u=v(e[o]))&&Rr(Kd,u))return u;return new Oo(!1)}n=Hg(e,i)}for(s=n.next;!(l=Y(s,n)).done;){try{u=v(l.value)}catch(D){Ls(n,"throw",D)}if(typeof u=="object"&&u&&Rr(Kd,u))return u}return new Oo(!1)},TB=P.TypeError,Ra=function(e,t){if(Rr(t,e))return e;throw TB("Incorrect invocation")},Gg=function(e,t,r){var n,i;return bn&&ie(n=t.constructor)&&n!==r&&se(i=n.prototype)&&i!==r.prototype&&bn(e,i),e},Jg=function(e,t,r){var n=e.indexOf("Map")!==-1,i=e.indexOf("Weak")!==-1,o=n?"set":"add",a=P[e],u=a&&a.prototype,s=a,l={},f=function(v){var D=U(u[v]);We(u,v,v=="add"?function(C){return D(this,C===0?0:C),this}:v=="delete"?function(C){return!(i&&!se(C))&&D(this,C===0?0:C)}:v=="get"?function(C){return i&&!se(C)?void 0:D(this,C===0?0:C)}:v=="has"?function(C){return!(i&&!se(C))&&D(this,C===0?0:C)}:function(C,b){return D(this,C===0?0:C,b),this})};if(Pi(e,!ie(a)||!(i||u.forEach&&!ee(function(){new a().entries().next()}))))s=r.getConstructor(t,e,n,o),ja.enable();else if(Pi(e,!0)){var c=new s,d=c[o](i?{}:-0,1)!=c,p=ee(function(){c.has(1)}),h=Il(function(v){new a(v)}),g=!i&&ee(function(){for(var v=new a,D=5;D--;)v[o](D,D);return!v.has(-0)});h||((s=t(function(v,D){Ra(v,u);var C=Gg(new a,v,s);return D!=null&&Ri(D,C[o],{that:C,AS_ENTRIES:n}),C})).prototype=u,u.constructor=s),(p||g)&&(f("delete"),f("has"),n&&f("get")),(g||d)&&f(o),i&&u.clear&&delete u.clear}return l[e]=s,me({global:!0,forced:s!=a},l),oa(s,e),i||r.setStrong(s,e,n),s},po=ja.getWeakData,jB=je.set,RB=je.getterFor,NB=Sn.find,$B=Sn.findIndex,LB=U([].splice),MB=0,go=function(e){return e.frozen||(e.frozen=new Xg)},Xg=function(){this.entries=[]},Tu=function(e,t){return NB(e.entries,function(r){return r[0]===t})};Xg.prototype={get:function(e){var t=Tu(this,e);if(t)return t[1]},has:function(e){return!!Tu(this,e)},set:function(e,t){var r=Tu(this,e);r?r[1]=t:this.entries.push([e,t])},delete:function(e){var t=$B(this.entries,function(r){return r[0]===e});return~t&&LB(this.entries,t,1),!!~t}};var ni,Yg={getConstructor:function(e,t,r,n){var i=e(function(s,l){Ra(s,o),jB(s,{type:t,id:MB++,frozen:void 0}),l!=null&&Ri(l,s[n],{that:s,AS_ENTRIES:r})}),o=i.prototype,a=RB(t),u=function(s,l,f){var c=a(s),d=po(be(l),!0);return d===!0?go(c).set(l,f):d[c.id]=f,s};return wn(o,{delete:function(s){var l=a(this);if(!se(s))return!1;var f=po(s);return f===!0?go(l).delete(s):f&&Ce(f,l.id)&&delete f[l.id]},has:function(s){var l=a(this);if(!se(s))return!1;var f=po(s);return f===!0?go(l).has(s):f&&Ce(f,l.id)}}),wn(o,r?{get:function(s){var l=a(this);if(se(s)){var f=po(s);return f===!0?go(l).get(s):f?f[l.id]:void 0}},set:function(s,l){return u(this,s,l)}}:{add:function(s){return u(this,s,!0)}}),i}},vo=je.enforce,IB=!P.ActiveXObject&&"ActiveXObject"in P,Zg=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},UB=Jg("WeakMap",Zg,Yg);if(Fg&&IB){ni=Yg.getConstructor(Zg,"WeakMap",!0),ja.enable();var ii=UB.prototype,Gd=U(ii.delete),mo=U(ii.has),Jd=U(ii.get),Xd=U(ii.set);wn(ii,{delete:function(e){if(se(e)&&!xr(e)){var t=vo(this);return t.frozen||(t.frozen=new ni),Gd(this,e)||t.frozen.delete(e)}return Gd(this,e)},has:function(e){if(se(e)&&!xr(e)){var t=vo(this);return t.frozen||(t.frozen=new ni),mo(this,e)||t.frozen.has(e)}return mo(this,e)},get:function(e){if(se(e)&&!xr(e)){var t=vo(this);return t.frozen||(t.frozen=new ni),mo(this,e)?Jd(this,e):t.frozen.get(e)}return Jd(this,e)},set:function(e,t){if(se(e)&&!xr(e)){var r=vo(this);r.frozen||(r.frozen=new ni),mo(this,e)?Xd(this,e,t):r.frozen.set(e,t)}else Xd(this,e,t);return this}})}var ju=ye("iterator"),Yd=ye("toStringTag"),Ru=pi.values,Qg=function(e,t){if(e){if(e[ju]!==Ru)try{at(e,ju,Ru)}catch{e[ju]=Ru}if(e[Yd]||at(e,Yd,t),ta[t]){for(var r in pi)if(e[r]!==pi[r])try{at(e,r,pi[r])}catch{e[r]=pi[r]}}}};for(var Nu in ta)Qg(P[Nu]&&P[Nu].prototype,Nu);Qg(Og,"DOMTokenList");var HB=new WeakMap,zB=new WeakMap,ev=new WeakMap,tv=new WeakMap,WB=new WeakMap,Zd=new WeakMap,So=new WeakMap,Qd=new WeakMap,eh=new WeakMap,th=new WeakMap,Xl=new WeakMap,sa=new WeakMap,Yl=new WeakMap,Na=new WeakMap,Zl=new WeakMap,$a=new WeakMap,$u=new WeakMap,rv=new WeakMap,la=new WeakMap,Lu=new WeakMap,qB=Sn.find,rh=!0;"find"in[]&&Array(1).find(function(){rh=!1}),me({target:"Array",proto:!0,forced:rh},{find:function(e){return qB(this,e,arguments.length>1?arguments[1]:void 0)}}),Ci("find"),me({global:!0},{globalThis:P});const VB=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","isindex","keygen","link","menuitem","meta","nextid","param","source","track","wbr"];Tc&&(j.fn.css=Tc),Mo&&(j.fn.append=Mo),Po&&(j.fn.addClass=Po),ko&&(j.fn.removeClass=ko),Fc&&(j.fn.hasClass=Fc),No&&(j.fn.on=No),Ho&&(j.fn.focus=Ho),To&&(j.fn.attr=To),xc&&(j.fn.removeAttr=xc),Pc&&(j.fn.hide=Pc),kc&&(j.fn.show=kc),_c&&(j.fn.offset=_c),Oc&&(j.fn.width=Oc),Sc&&(j.fn.height=Sc),Nc&&(j.fn.parent=Nc),$c&&(j.fn.parents=$c),Rc&&(j.fn.is=Rc),jo&&(j.fn.dataset=jo),Ro&&(j.fn.val=Ro),jc&&(j.fn.text=jc),Lo&&(j.fn.html=Lo),Uo&&(j.fn.children=Uo),Lc&&(j.fn.remove=Lc),Io&&(j.fn.find=Io),$o&&(j.fn.each=$o),Mc&&(j.fn.empty=Mc);var nh,Ql=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||null},lt=function(e){return En(e)&&e.nodeType===1},En=function(e){var t=Ql(e);return!!t&&e instanceof t.Node},ih=function(e){var t=e&&e.anchorNode&&Ql(e.anchorNode);return!!t&&e instanceof t.Selection},ec=function(e){var t,r,n;return(t=window.document.getElementById(e))!==null&&t!==void 0?t:((n=(r=window.document.activeElement)===null||r===void 0?void 0:r.shadowRoot)===null||n===void 0?void 0:n.getElementById(e))||null},nv=function(e,t,r){for(var n,i=e.childNodes,o=i[t],a=t,u=!1,s=!1;(En(n=o)&&n.nodeType===8||lt(o)&&o.childNodes.length===0||lt(o)&&o.getAttribute("contenteditable")==="false")&&(!u||!s);)a>=i.length?(u=!0,a=t-1,r="backward"):a<0?(s=!0,a=t+1,r="forward"):(o=i[a],t=a,a+=r==="forward"?1:-1);return[o,t]},KB=function(e,t,r){return Ae(nv(e,t,r),1)[0]};function iv(e,t){if(!(e instanceof HTMLElement&&e.dataset.slateVoid==="true"))for(var r=e.childNodes,n=r.length;n--;){var i=r[n],o=i.nodeType;o==3?t(i,e):o!=1&&o!=9&&o!=11||iv(i,t)}}(function(e){e[e.ELEMENT_NODE=1]="ELEMENT_NODE",e[e.TEXT_NODE=3]="TEXT_NODE",e[e.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",e[e.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",e[e.COMMENT_NODE=8]="COMMENT_NODE",e[e.DOCUMENT_NODE=9]="DOCUMENT_NODE",e[e.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",e[e.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE"})(nh||(nh={}));var Vs=typeof navigator<"u"&&/Mac OS X/.test(navigator.userAgent),bi=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),oi=typeof navigator<"u"&&/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),GB=typeof navigator<"u"&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),JB=typeof navigator<"u"&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),Ks=typeof navigator<"u"&&/Chrome/i.test(navigator.userAgent),ai=!JB&&!GB&&typeof globalThis<"u"&&globalThis.InputEvent&&typeof globalThis.InputEvent.prototype.getTargetRanges=="function",I={getWindow:function(e){var t=rv.get(e);if(!t)throw new Error("Unable to find a host window element for this editor");return t},findKey:function(e,t){var r=$u.get(t);return r||(r=new zd,$u.set(t,r)),r},setNewKey:function(e){var t=new zd;$u.set(e,t)},findPath:function(e,t){for(var r=[],n=t;;){var i=sa.get(n);if(i==null){if(m.isEditor(n))return r;break}var o=Xl.get(n);if(o==null)break;r.unshift(o),n=i}throw new Error("Unable to find the path for Slate node: "+JSON.stringify(t))},findDocumentOrShadowRoot:function(e){if(e.isDestroyed)return window.document;var t=I.toDOMNode(e,e),r=t.getRootNode();return(r instanceof Document||r instanceof ShadowRoot)&&r.getSelection!=null?r:t.ownerDocument},getParentNode:function(e,t){return sa.get(t)||null},getParentsNodes:function(e,t){for(var r=[],n=t;n!==e&&n!=null;){var i=I.getParentNode(e,n);if(i==null)break;r.push(i),n=i}return r},getTopNode:function(e,t){var r=[I.findPath(e,t)[0]];return N.get(e,r)},toDOMNode:function(e,t){var r;if(m.isEditor(t))r=Yl.get(e);else{var n=I.findKey(e,t);r=Zl.get(n)}if(!r)throw new Error("Cannot resolve a DOM node from Slate node: "+JSON.stringify(t));return r},hasDOMNode:function(e,t,r){r===void 0&&(r={});var n,i=r.editable,o=i!==void 0&&i,a=I.toDOMNode(e,e);try{n=lt(t)?t:t.parentElement}catch(u){if(!u.message.includes('Permission denied to access property "nodeType"'))throw u}return!!n&&n.closest("[data-slate-editor]")===a&&(!o||n.isContentEditable||!!n.getAttribute("data-slate-zero-width"))},toDOMRange:function(e,t){var r=t.anchor,n=t.focus,i=O.isBackward(t),o=I.toDOMPoint(e,r),a=O.isCollapsed(t)?o:I.toDOMPoint(e,n),u=I.getWindow(e).document.createRange(),s=Ae(i?a:o,2),l=s[0],f=s[1],c=Ae(i?o:a,2),d=c[0],p=c[1],h=!!(lt(l)?l:l.parentElement).getAttribute("data-slate-zero-width"),g=!!(lt(d)?d:d.parentElement).getAttribute("data-slate-zero-width");return u.setStart(l,h?1:f),u.setEnd(d,g?1:p),u},toDOMPoint:function(e,t){var r,n,i,o=Ae(m.node(e,t.path),1)[0],a=I.toDOMNode(e,o);m.void(e,{at:t})&&(t={path:t.path,offset:0});var u=Array.from(a.querySelectorAll("[data-slate-string], [data-slate-zero-width]")),s=0;try{for(var l=ri(u),f=l.next();!f.done;f=l.next()){var c=f.value,d=c.childNodes[0];if(d!=null&&d.textContent!=null){var p=d.textContent.length,h=c.getAttribute("data-slate-length"),g=s+(h==null?p:parseInt(h,10));if(t.offset<=g){i=[d,Math.min(p,Math.max(0,t.offset-s))];break}s=g}}}catch(v){r={error:v}}finally{try{f&&!f.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.error}}if(!i)throw new Error("Cannot resolve a DOM point from Slate point: "+JSON.stringify(t));return i},toSlateNode:function(e,t){var r=lt(t)?t:t.parentElement;r&&!r.hasAttribute("data-slate-node")&&(r=r.closest("[data-slate-node]"));var n=r?Na.get(r):null;if(!n)throw new Error("Cannot resolve a Slate node from DOM node: "+r);return n},findEventRange:function(e,t){"nativeEvent"in t&&(t=t.nativeEvent);var r=t.clientX,n=t.clientY,i=t.target;if(r==null||n==null)throw new Error("Cannot resolve a Slate range from a DOM event: "+t);var o,a=I.toSlateNode(e,t.target),u=I.findPath(e,a);if(m.isVoid(e,a)){var s=i.getBoundingClientRect(),l=e.isInline(a)?r-s.left<s.left+s.width-r:n-s.top<s.top+s.height-n,f=m.point(e,u,{edge:l?"start":"end"}),c=l?m.before(e,f):m.after(e,f);if(c)return m.range(e,c)}var d=this.getWindow(e).document;if(d.caretRangeFromPoint)o=d.caretRangeFromPoint(r,n);else{var p=d.caretPositionFromPoint(r,n);p&&((o=d.createRange()).setStart(p.offsetNode,p.offset),o.setEnd(p.offsetNode,p.offset))}if(!o)throw new Error("Cannot resolve a Slate range from a DOM event: "+t);return I.toSlateRange(e,o,{exactMatch:!1,suppressThrow:!1})},toSlateRange:function(e,t,r){var n,i,o,a,u,s=r.exactMatch,l=r.suppressThrow;if((ih(t)?t.anchorNode:t.startContainer)&&(ih(t)?(n=t.anchorNode,i=t.anchorOffset,o=t.focusNode,a=t.focusOffset,u=Ks&&window.document.activeElement&&window.document.activeElement.shadowRoot?t.anchorNode===t.focusNode&&t.anchorOffset===t.focusOffset:t.isCollapsed):(n=t.startContainer,i=t.startOffset,o=t.endContainer,a=t.endOffset,u=t.collapsed)),n==null||o==null||i==null||a==null)throw new Error("Cannot resolve a Slate range from DOM range: "+t);var f=I.toSlatePoint(e,[n,i],{exactMatch:s,suppressThrow:l});if(!f)return null;var c=u?f:I.toSlatePoint(e,[o,a],{exactMatch:s,suppressThrow:l});if(!c)return null;var d={anchor:f,focus:c};return O.isExpanded(d)&&O.isForward(d)&<(o)&&m.void(e,{at:d.focus,mode:"highest"})&&(d=m.unhangRange(e,d,{voids:!0})),d},toSlatePoint:function(e,t,r){var n,i=r.exactMatch,o=r.suppressThrow,a=Ae(i?t:function(C){var b,B=Ae(C,2),E=B[0],x=B[1];if(lt(E)&&E.childNodes.length){var _=x===E.childNodes.length,T=_?x-1:x;for(E=(b=Ae(nv(E,T,_?"backward":"forward"),2))[0],_=(T=b[1])<x;lt(E)&&E.childNodes.length;){var k=_?E.childNodes.length-1:0;E=KB(E,k,_?"backward":"forward")}x=_&&E.textContent!=null?E.textContent.length:0}return[E,x]}(t),2),u=a[0],s=a[1],l=u.parentNode,f=null,c=0;if(l){var d=l.closest('[data-slate-void="true"]'),p=l.closest("[data-slate-leaf]"),h=null;if(p){f=p.closest('[data-slate-node="text"]');var g=I.getWindow(e).document.createRange();g.setStart(f,0),g.setEnd(u,s);var v=g.cloneContents();Hd(Hd([],Ae(xf(v.querySelectorAll("[data-slate-zero-width]")))),Ae(xf(v.querySelectorAll("[contenteditable=false]")))).forEach(function(C){C.parentNode.removeChild(C)}),c=v.textContent.length,h=f}else d&&((p=d.querySelector("[data-slate-leaf]"))?(f=p.closest('[data-slate-node="text"]'),c=(h=p).textContent.length,h.querySelectorAll("[data-slate-zero-width]").forEach(function(C){c-=C.textContent.length})):c=1);h&&c===h.textContent.length&&(l.hasAttribute("data-slate-zero-width")||bi&&(!((n=h.textContent)===null||n===void 0)&&n.endsWith(`
|
|
39
|
-
`)))&&c--}if(!f){if(o)return null;throw new Error("Cannot resolve a Slate point from DOM point: "+t)}var D=I.toSlateNode(e,f);return{path:I.findPath(e,D),offset:c}},hasRange:function(e,t){var r=t.anchor,n=t.focus;return m.hasPath(e,r.path)&&m.hasPath(e,n.path)},getNodeType:function(e){return Q.isElement(e)?e.type:""},checkNodeType:function(e,t){return this.getNodeType(e)===t},getNodesStr:function(e){return e.map(function(t){return N.string(t)}).join("")},getSelectedElems:function(e){var t,r,n=[],i=m.nodes(e,{universal:!0});try{for(var o=ri(i),a=o.next();!a.done;a=o.next()){var u=Ae(a.value,1)[0];Q.isElement(u)&&n.push(u)}}catch(s){t={error:s}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return n},getSelectedNodeByType:function(e,t){var r=this,n=Ae(m.nodes(e,{match:function(o){return r.checkNodeType(o,t)},universal:!0}),1),i=n[0];return i==null?null:i[0]},getSelectedTextNode:function(e){var t=Ae(m.nodes(e,{match:function(n){return W.isText(n)},universal:!0}),1),r=t[0];return r==null?null:r[0]},isNodeSelected:function(e,t){var r=Ae(m.nodes(e,{match:function(i){return i===t},universal:!0}),1),n=r[0];return n!=null&&Ae(n,1)[0]===t},isSelectionAtLineEnd:function(e,t){var r=e.selection;return!!r&&(m.isEnd(e,r.anchor,t)||m.isEnd(e,r.focus,t))},getTextarea:function(e){var t=HB.get(e);if(t==null)throw new Error("Cannot find textarea instance by editor");return t},getToolbar:function(e){return ev.get(e)||null},getHoverbar:function(e){return tv.get(e)||null},normalizeContent:function(e){e.children.forEach(function(t,r){e.normalizeNode([t,[r]])})},getLeftLengthOfMaxLength:function(e){var t=e.getConfig(),r=t.maxLength,n=t.onMaxLength;if(typeof r!="number"||r<=0)return 1/0;var i=r-e.getText().replace(/\r|\n|(\r\n)/g,"").length;return i<=0&&n&&n(e),i},cleanExposedTexNodeInSelectionBlock:function(e){var t,r,n,i,o=I.getTextarea(e).$textArea,a=o==null?void 0:o[0].childNodes;if(a)try{for(var u=ri(Array.from(a)),s=u.next();!s.done;s=u.next()){var l=s.value;if(l.nodeType!==3)break;l.remove()}}catch(g){t={error:g}}finally{try{s&&!s.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}var f=m.nodes(e,{match:function(g){return!(!Q.isElement(g)||e.isInline(g))},universal:!0});try{for(var c=ri(f),d=c.next();!d.done;d=c.next()){var p=d.value;if(p!=null){var h=p[0];iv(I.toDOMNode(e,h),function(g,v){var D=j(v);D.attr("data-slate-string")||D.attr("data-slate-zero-width")||D.attr("data-w-e-reserve")||v.removeChild(g)})}}}catch(g){n={error:g}}finally{try{d&&!d.done&&(i=c.return)&&i.call(c)}finally{if(n)throw n.error}}},isLastNode:function(e,t){var r=e.children||[];return r[r.length-1]===t},genEmptyParagraph:function(){return{type:"paragraph",children:[{text:""}]}},isSelectedVoidNode:function(e){var t,r,n=m.nodes(e,{match:function(u){return e.isVoid(u)}}),i=0;try{for(var o=ri(n),a=o.next();!a.done;a=o.next())a.value,i++}catch(u){t={error:u}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return i>0},isSelectedEmptyParagraph:function(e){var t=e.selection;if(t==null||O.isExpanded(t))return!1;var r=I.getSelectedNodeByType(e,"paragraph");if(r===null)return!1;var n=r.children;return n.length===1&&(n[0].text===""||void 0)},isEmptyPath:function(e,t){var r=m.node(e,t);if(r==null)return!1;var n=Ae(r,1)[0].children;return n.length===1&&n[0].text===""}},XB=Sn.filter,YB=ka("filter");me({target:"Array",proto:!0,forced:!YB},{filter:function(e){return XB(this,e,arguments.length>1?arguments[1]:void 0)}});var Gs=`
|
|
40
|
-
\v\f\r \u2028\u2029\uFEFF`,oh=U("".replace),ca="["+Gs+"]",ZB=RegExp("^"+ca+ca+"*"),QB=RegExp(ca+ca+"*$"),eF=function(e){return function(t){var r=ae(tt(t));return 1&e&&(r=oh(r,ZB,"")),2&e&&(r=oh(r,QB,"")),r}},tF={trim:eF(3)},rF=xn.PROPER,nF=tF.trim;me({target:"String",proto:!0,forced:function(e){return ee(function(){return!!Gs[e]()||"
"[e]()!=="
"||rF&&Gs[e].name!==e})}("trim")},{trim:function(){return nF(this)}});var Ni,Zr,ah,Mu,fa=P.Promise,uh=ye("species"),tc=function(e){var t=Hr(e),r=st.f;xe&&t&&!t[uh]&&r(t,uh,{configurable:!0,get:function(){return this}})},iF=P.TypeError,oF=ye("species"),ov=function(e,t){var r,n=be(e).constructor;return n===void 0||(r=be(n)[oF])==null?t:function(i){if(_a(i))return i;throw iF(Aa(i)+" is not a constructor")}(r)},av=U([].slice),uv=/(?:ipad|iphone|ipod).*applewebkit/i.test(fn),Kt=ut(P.process)=="process",Js=P.setImmediate,sh=P.clearImmediate,aF=P.process,Iu=P.Dispatch,uF=P.Function,lh=P.MessageChannel,sF=P.String,Uu=0,wi={};try{Ni=P.location}catch{}var rc=function(e){if(Ce(wi,e)){var t=wi[e];delete wi[e],t()}},Hu=function(e){return function(){rc(e)}},ch=function(e){rc(e.data)},fh=function(e){P.postMessage(sF(e),Ni.protocol+"//"+Ni.host)};Js&&sh||(Js=function(e){var t=av(arguments,1);return wi[++Uu]=function(){Kl(ie(e)?e:uF(e),void 0,t)},Zr(Uu),Uu},sh=function(e){delete wi[e]},Kt?Zr=function(e){aF.nextTick(Hu(e))}:Iu&&Iu.now?Zr=function(e){Iu.now(Hu(e))}:lh&&!uv?(Mu=(ah=new lh).port2,ah.port1.onmessage=ch,Zr=$r(Mu.postMessage,Mu)):P.addEventListener&&ie(P.postMessage)&&!P.importScripts&&Ni&&Ni.protocol!=="file:"&&!ee(fh)?(Zr=fh,P.addEventListener("message",ch,!1)):Zr="onreadystatechange"in Si("script")?function(e){Rs.appendChild(Si("script")).onreadystatechange=function(){Rs.removeChild(this),rc(e)}}:function(e){setTimeout(Hu(e),0)});var ui,Ar,Ei,on,zu,Wu,qu,dh,sv={set:Js},lF=/ipad|iphone|ipod/i.test(fn)&&P.Pebble!==void 0,cF=/web0s(?!.*chrome)/i.test(fn),fF=Ki.f,Vu=sv.set,hh=P.MutationObserver||P.WebKitMutationObserver,ph=P.document,gh=P.process,yo=P.Promise,vh=fF(P,"queueMicrotask"),lv=vh&&vh.value;lv||(ui=function(){var e,t;for(Kt&&(e=gh.domain)&&e.exit();Ar;){t=Ar.fn,Ar=Ar.next;try{t()}catch(r){throw Ar?on():Ei=void 0,r}}Ei=void 0,e&&e.enter()},uv||Kt||cF||!hh||!ph?!lF&&yo&&yo.resolve?((qu=yo.resolve(void 0)).constructor=yo,dh=$r(qu.then,qu),on=function(){dh(ui)}):Kt?on=function(){gh.nextTick(ui)}:(Vu=$r(Vu,P),on=function(){Vu(ui)}):(zu=!0,Wu=ph.createTextNode(""),new hh(ui).observe(Wu,{characterData:!0}),on=function(){Wu.data=zu=!zu}));var Ku,mh,cv,yh,fv=lv||function(e){var t={fn:e,next:void 0};Ei&&(Ei.next=t),Ar||(Ar=t,on()),Ei=t},dF=function(e){var t,r;this.promise=new e(function(n,i){if(t!==void 0||r!==void 0)throw TypeError("Bad Promise constructor");t=n,r=i}),this.resolve=Xt(t),this.reject=Xt(r)},nc={f:function(e){return new dF(e)}},Xs=function(e){try{return{error:!1,value:e()}}catch(t){return{error:!0,value:t}}},hF=typeof window=="object",dv=sv.set,pF=ye("species"),ct="Promise",Dh=je.getterFor(ct),gF=je.set,vF=je.getterFor(ct),Cr=fa&&fa.prototype,ht=fa,si=Cr,hv=P.TypeError,Ys=P.document,ic=P.process,hn=nc.f,mF=hn,yF=!!(Ys&&Ys.createEvent&&P.dispatchEvent),pv=ie(P.PromiseRejectionEvent),gv=!1,Ai=Pi(ct,function(){var e=Fa(ht),t=e!==String(ht);if(!t&&Oi===66)return!0;if(Oi>=51&&/native code/.test(e))return!1;var r=new ht(function(i){i(1)}),n=function(i){i(function(){},function(){})};return(r.constructor={})[pF]=n,!(gv=r.then(function(){})instanceof n)||!t&&hF&&!pv}),DF=Ai||!Il(function(e){ht.all(e).catch(function(){})}),vv=function(e){var t;return!(!se(e)||!ie(t=e.then))&&t},oc=function(e,t){if(!e.notified){e.notified=!0;var r=e.reactions;fv(function(){for(var n=e.value,i=e.state==1,o=0;r.length>o;){var a,u,s,l=r[o++],f=i?l.ok:l.fail,c=l.resolve,d=l.reject,p=l.domain;try{f?(i||(e.rejection===2&&bF(e),e.rejection=1),f===!0?a=n:(p&&p.enter(),a=f(n),p&&(p.exit(),s=!0)),a===l.promise?d(hv("Promise-chain cycle")):(u=vv(a))?Y(u,a,c,d):c(a)):d(n)}catch(h){p&&!s&&p.exit(),d(h)}}e.reactions=[],e.notified=!1,t&&!e.rejection&&CF(e)})}},mv=function(e,t,r){var n,i;yF?((n=Ys.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),P.dispatchEvent(n)):n={promise:t,reason:r},!pv&&(i=P["on"+e])?i(n):e==="unhandledrejection"&&function(o,a){var u=P.console;u&&u.error&&(arguments.length==1?u.error(o):u.error(o,a))}("Unhandled promise rejection",r)},CF=function(e){Y(dv,P,function(){var t,r=e.facade,n=e.value;if(Ch(e)&&(t=Xs(function(){Kt?ic.emit("unhandledRejection",n,r):mv("unhandledrejection",r,n)}),e.rejection=Kt||Ch(e)?2:1,t.error))throw t.value})},Ch=function(e){return e.rejection!==1&&!e.parent},bF=function(e){Y(dv,P,function(){var t=e.facade;Kt?ic.emit("rejectionHandled",t):mv("rejectionhandled",t,e.value)})},ln=function(e,t,r){return function(n){e(t,n,r)}},pn=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,oc(e,!0))},Zs=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw hv("Promise can't be resolved itself");var n=vv(t);n?fv(function(){var i={done:!1};try{Y(n,t,ln(Zs,i,e),ln(pn,i,e))}catch(o){pn(i,o,e)}}):(e.value=t,e.state=1,oc(e,!1))}catch(i){pn({done:!1},i,e)}}};if(Ai&&(si=(ht=function(e){Ra(this,si),Xt(e),Y(Ku,this);var t=Dh(this);try{e(ln(Zs,t),ln(pn,t))}catch(r){pn(t,r)}}).prototype,(Ku=function(e){gF(this,{type:ct,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=wn(si,{then:function(e,t){var r=vF(this),n=r.reactions,i=hn(ov(this,ht));return i.ok=!ie(e)||e,i.fail=ie(t)&&t,i.domain=Kt?ic.domain:void 0,r.parent=!0,n[n.length]=i,r.state!=0&&oc(r,!1),i.promise},catch:function(e){return this.then(void 0,e)}}),mh=function(){var e=new Ku,t=Dh(e);this.promise=e,this.resolve=ln(Zs,t),this.reject=ln(pn,t)},nc.f=hn=function(e){return e===ht||e===cv?new mh(e):mF(e)},ie(fa)&&Cr!==Object.prototype)){yh=Cr.then,gv||(We(Cr,"then",function(e,t){var r=this;return new ht(function(n,i){Y(yh,r,n,i)}).then(e,t)},{unsafe:!0}),We(Cr,"catch",si.catch,{unsafe:!0}));try{delete Cr.constructor}catch{}bn&&bn(Cr,si)}me({global:!0,wrap:!0,forced:Ai},{Promise:ht}),oa(ht,ct,!1),tc(ct),cv=Hr(ct),me({target:ct,stat:!0,forced:Ai},{reject:function(e){var t=hn(this);return Y(t.reject,void 0,e),t.promise}}),me({target:ct,stat:!0,forced:Ai},{resolve:function(e){return function(t,r){if(be(t),se(r)&&r.constructor===t)return r;var n=nc.f(t);return(0,n.resolve)(r),n.promise}(this,e)}}),me({target:ct,stat:!0,forced:DF},{all:function(e){var t=this,r=hn(t),n=r.resolve,i=r.reject,o=Xs(function(){var a=Xt(t.resolve),u=[],s=0,l=1;Ri(e,function(f){var c=s++,d=!1;l++,Y(a,t,f).then(function(p){d||(d=!0,u[c]=p,--l||n(u))},i)}),--l||n(u)});return o.error&&i(o.value),r.promise},race:function(e){var t=this,r=hn(t),n=r.reject,i=Xs(function(){var o=Xt(t.resolve);Ri(e,function(a){Y(o,t,a).then(r.resolve,n)})});return i.error&&n(i.value),r.promise}});var Qr=Ta.UNSUPPORTED_Y,wF=Math.min,yv=[].push,EF=U(/./.exec),en=U(yv),li=U("".slice);function An(e){Promise.resolve().then(e)}function AF(e){return"w-e-element-"+e}Gl("split",function(e,t,r){var n;return n="abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?function(i,o){var a=ae(tt(this)),u=o===void 0?4294967295:o>>>0;if(u===0)return[];if(i===void 0)return[a];if(!Nl(i))return Y(t,a,i,u);for(var s,l,f,c=[],d=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")+(i.sticky?"y":""),p=0,h=new RegExp(i.source,d+"g");(s=Y(Ti,h,a))&&!((l=h.lastIndex)>p&&(en(c,li(a,p,s.index)),s.length>1&&s.index<a.length&&Kl(yv,c,qs(s,1)),f=s[0].length,p=l,c.length>=u));)h.lastIndex===s.index&&h.lastIndex++;return p===a.length?!f&&EF(h,"")||en(c,""):en(c,li(a,p)),c.length>u?qs(c,0,u):c}:"0".split(void 0,0).length?function(i,o){return i===void 0&&o===0?[]:Y(t,this,i,o)}:t,[function(i,o){var a=tt(this),u=i==null?void 0:Nr(i,e);return u?Y(u,i,a,o):Y(n,ae(a),i,o)},function(i,o){var a=be(this),u=ae(i),s=r(n,a,u,o,n!==t);if(s.done)return s.value;var l=ov(a,RegExp),f=a.unicode,c=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(Qr?"g":"y"),d=new l(Qr?"^(?:"+a.source+")":a,c),p=o===void 0?4294967295:o>>>0;if(p===0)return[];if(u.length===0)return ji(d,u)===null?[u]:[];for(var h=0,g=0,v=[];g<u.length;){d.lastIndex=Qr?0:g;var D,C=ji(d,Qr?li(u,g):u);if(C===null||(D=wF(On(d.lastIndex+(Qr?g:0)),u.length))===h)g=Jl(u,g,f);else{if(en(v,li(u,h,g)),v.length===p)return v;for(var b=1;b<=C.length-1;b++)if(en(v,C[b]),v.length===p)return v;g=h=D}}return en(v,li(u,h)),v}]},!!ee(function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var r="ab".split(e);return r.length!==2||r[0]!=="a"||r[1]!=="b"}),Qr);var BF=st.f,FF=_i.f,xF=je.enforce,OF=ye("match"),kt=P.RegExp,an=kt.prototype,SF=P.SyntaxError,_F=U(Rl),PF=U(an.exec),Do=U("".charAt),bh=U("".replace),wh=U("".indexOf),kF=U("".slice),TF=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,Pr=/a/g,Gu=/a/g,jF=new kt(Pr)!==Pr,Dv=Ta.MISSED_STICKY,RF=Ta.UNSUPPORTED_Y,NF=xe&&(!jF||Dv||Wl||ql||ee(function(){return Gu[OF]=!1,kt(Pr)!=Pr||kt(Gu)==Gu||kt(Pr,"i")!="/a/i"}));if(Pi("RegExp",NF)){for(var Ht=function(e,t){var r,n,i,o,a,u,s=Rr(an,this),l=Nl(e),f=t===void 0,c=[],d=e;if(!s&&l&&f&&e.constructor===Ht)return e;if((l||Rr(an,e))&&(e=e.source,f&&(t="flags"in d?d.flags:_F(d))),e=e===void 0?"":ae(e),t=t===void 0?"":ae(t),d=e,Wl&&"dotAll"in Pr&&(n=!!t&&wh(t,"s")>-1)&&(t=bh(t,/s/g,"")),r=t,Dv&&"sticky"in Pr&&(i=!!t&&wh(t,"y")>-1)&&RF&&(t=bh(t,/y/g,"")),ql&&(o=function(p){for(var h,g=p.length,v=0,D="",C=[],b={},B=!1,E=!1,x=0,_="";v<=g;v++){if((h=Do(p,v))==="\\")h+=Do(p,++v);else if(h==="]")B=!1;else if(!B)switch(!0){case h==="[":B=!0;break;case h==="(":PF(TF,kF(p,v+1))&&(v+=2,E=!0),D+=h,x++;continue;case(h===">"&&E):if(_===""||Ce(b,_))throw new SF("Invalid capture group name");b[_]=!0,C[C.length]=[_,x],E=!1,_="";continue}E?_+=h:D+=h}return[D,C]}(e),e=o[0],c=o[1]),a=Gg(kt(e,t),s?this:an,Ht),(n||i||c.length)&&(u=xF(a),n&&(u.dotAll=!0,u.raw=Ht(function(p){for(var h,g=p.length,v=0,D="",C=!1;v<=g;v++)(h=Do(p,v))!=="\\"?C||h!=="."?(h==="["?C=!0:h==="]"&&(C=!1),D+=h):D+="[\\s\\S]":D+=h+Do(p,++v);return D}(e),r)),i&&(u.sticky=!0),c.length&&(u.groups=c)),e!==d)try{at(a,"source",d===""?"(?:)":d)}catch{}return a},$F=function(e){e in Ht||BF(Ht,e,{configurable:!0,get:function(){return kt[e]},set:function(t){kt[e]=t}})},Eh=FF(kt),Ah=0;Eh.length>Ah;)$F(Eh[Ah++]);an.constructor=Ht,Ht.prototype=an,We(P,"RegExp",Ht)}tc("RegExp");var LF=st.f,Bh=ja.fastKey,Fh=je.set,Ju=je.getterFor,MF={getConstructor:function(e,t,r,n){var i=e(function(l,f){Ra(l,o),Fh(l,{type:t,index:Pa(null),first:void 0,last:void 0,size:0}),xe||(l.size=0),f!=null&&Ri(f,l[n],{that:l,AS_ENTRIES:r})}),o=i.prototype,a=Ju(t),u=function(l,f,c){var d,p,h=a(l),g=s(l,f);return g?g.value=c:(h.last=g={index:p=Bh(f,!0),key:f,value:c,previous:d=h.last,next:void 0,removed:!1},h.first||(h.first=g),d&&(d.next=g),xe?h.size++:l.size++,p!=="F"&&(h.index[p]=g)),l},s=function(l,f){var c,d=a(l),p=Bh(f);if(p!=="F")return d.index[p];for(c=d.first;c;c=c.next)if(c.key==f)return c};return wn(o,{clear:function(){for(var l=a(this),f=l.index,c=l.first;c;)c.removed=!0,c.previous&&(c.previous=c.previous.next=void 0),delete f[c.index],c=c.next;l.first=l.last=void 0,xe?l.size=0:this.size=0},delete:function(l){var f=this,c=a(f),d=s(f,l);if(d){var p=d.next,h=d.previous;delete c.index[d.index],d.removed=!0,h&&(h.next=p),p&&(p.previous=h),c.first==d&&(c.first=p),c.last==d&&(c.last=h),xe?c.size--:f.size--}return!!d},forEach:function(l){for(var f,c=a(this),d=$r(l,arguments.length>1?arguments[1]:void 0);f=f?f.next:c.first;)for(d(f.value,f.key,this);f&&f.removed;)f=f.previous},has:function(l){return!!s(this,l)}}),wn(o,r?{get:function(l){var f=s(this,l);return f&&f.value},set:function(l,f){return u(this,l===0?0:l,f)}}:{add:function(l){return u(this,l=l===0?0:l,l)}}),xe&&LF(o,"size",{get:function(){return a(this).size}}),i},setStrong:function(e,t,r){var n=t+" Iterator",i=Ju(t),o=Ju(n);Hl(e,t,function(a,u){Fh(this,{type:n,target:a,state:i(a),kind:u,last:void 0})},function(){for(var a=o(this),u=a.kind,s=a.last;s&&s.removed;)s=s.previous;return a.target&&(a.last=s=s?s.next:a.state.first)?u=="keys"?{value:s.key,done:!1}:u=="values"?{value:s.value,done:!1}:{value:[s.key,s.value],done:!1}:(a.target=void 0,{value:void 0,done:!0})},r?"entries":"values",!r,!0),tc(t)}};Jg("Set",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},MF);var gi=function(e){return e!=null},IF={object:!0,function:!0,undefined:!0},UF=function(e){if(!function(t){return!!gi(t)&&hasOwnProperty.call(IF,typeof t)}(e))return!1;try{return!!e.constructor&&e.constructor.prototype===e}catch{return!1}},HF=/^\s*class[\s{/}]/,zF=Function.prototype.toString,xh=function(e){return!!function(t){if(typeof t!="function"||!hasOwnProperty.call(t,"length"))return!1;try{if(typeof t.length!="number"||typeof t.call!="function"||typeof t.apply!="function")return!1}catch{return!1}return!UF(t)}(e)&&!HF.test(zF.call(e))},ac=function(e){return e!=null},WF=Object.keys,qF=function(){try{return Object.keys("primitive"),!0}catch{return!1}}()?Object.keys:function(e){return WF(ac(e)?Object(e):e)},VF=function(e){if(!ac(e))throw new TypeError("Cannot use null or undefined");return e},KF=Math.max,Oh=function(){var e,t=Object.assign;return typeof t=="function"&&(t(e={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}()?Object.assign:function(e,t){var r,n,i,o=KF(arguments.length,2);for(e=Object(VF(e)),i=function(a){try{e[a]=t[a]}catch(u){r||(r=u)}},n=1;n<o;++n)qF(t=arguments[n]).forEach(i);if(r!==void 0)throw r;return e},GF=Array.prototype.forEach,JF=Object.create,XF=function(e,t){var r;for(r in e)t[r]=e[r]},Sh=function(e){var t=JF(null);return GF.call(arguments,function(r){ac(r)&&XF(Object(r),t)}),t},Xu="razdwatrzy",YF=String.prototype.indexOf,ci=typeof Xu.contains=="function"&&Xu.contains("dwa")===!0&&Xu.contains("foo")===!1?String.prototype.contains:function(e){return YF.call(this,e,arguments[1])>-1},Co=qi(function(e){var t=e.exports=function(r,n){var i,o,a,u,s;return arguments.length<2||typeof r!="string"?(u=n,n=r,r=null):u=arguments[2],gi(r)?(i=ci.call(r,"c"),o=ci.call(r,"e"),a=ci.call(r,"w")):(i=a=!0,o=!1),s={value:n,configurable:i,enumerable:o,writable:a},u?Oh(Sh(u),s):s};t.gs=function(r,n,i){var o,a,u,s;return typeof r!="string"?(u=i,i=n,n=r,r=null):u=arguments[3],gi(n)?xh(n)?gi(i)?xh(i)||(u=i,i=void 0):i=void 0:(u=n,n=i=void 0):n=void 0,gi(r)?(o=ci.call(r,"c"),a=ci.call(r,"e")):(o=!0,a=!1),s={get:n,set:i,configurable:o,enumerable:a},u?Oh(Sh(u),s):s}}),Yu=function(e){if(typeof e!="function")throw new TypeError(e+" is not a function");return e};qi(function(e,t){var r,n,i,o,a,u,s,l=Function.prototype.apply,f=Function.prototype.call,c=Object.create,d=Object.defineProperty,p=Object.defineProperties,h=Object.prototype.hasOwnProperty,g={configurable:!0,enumerable:!1,writable:!0};r=function(v,D){var C;return Yu(D),h.call(this,"__ee__")?C=this.__ee__:(C=g.value=c(null),d(this,"__ee__",g),g.value=null),C[v]?typeof C[v]=="object"?C[v].push(D):C[v]=[C[v],D]:C[v]=D,this},n=function(v,D){var C,b;return Yu(D),b=this,r.call(this,v,C=function(){i.call(b,v,C),l.call(D,this,arguments)}),C.__eeOnceListener__=D,this},i=function(v,D){var C,b,B,E;if(Yu(D),!h.call(this,"__ee__"))return this;if(!(C=this.__ee__)[v])return this;if(typeof(b=C[v])=="object")for(E=0;B=b[E];++E)B!==D&&B.__eeOnceListener__!==D||(b.length===2?C[v]=b[E?0:1]:b.splice(E,1));else b!==D&&b.__eeOnceListener__!==D||delete C[v];return this},o=function(v){var D,C,b,B,E;if(h.call(this,"__ee__")&&(B=this.__ee__[v]))if(typeof B=="object"){for(C=arguments.length,E=new Array(C-1),D=1;D<C;++D)E[D-1]=arguments[D];for(B=B.slice(),D=0;b=B[D];++D)l.call(b,this,E)}else switch(arguments.length){case 1:f.call(B,this);break;case 2:f.call(B,this,arguments[1]);break;case 3:f.call(B,this,arguments[1],arguments[2]);break;default:for(C=arguments.length,E=new Array(C-1),D=1;D<C;++D)E[D-1]=arguments[D];l.call(B,this,E)}},a={on:r,once:n,off:i,emit:o},u={on:Co(r),once:Co(n),off:Co(i),emit:Co(o)},s=p({},u),e.exports=t=function(v){return v==null?c(s):p(Object(v),u)},t.methods=a});function uc(e){var t=I.getTextarea(e).$textAreaContainer,r=t.width(),n=t.height(),i=t.offset();return{top:i.top,left:i.left,width:r,height:n}}function ZF(e){var t={top:"0",left:"0"},r=e.selection;if(r==null)return t;var n=uc(e);if(n==null)return t;var i=n.top,o=n.left,a=n.width,u=n.height,s=I.toDOMRange(e,r).getClientRects()[0];if(s==null)return t;s.width;var l=s.height,f={},c=s.top-i,d=s.left-o;if(d>a/2){var p=a-d;f.right=p+5+"px"}else f.left=d+5+"px";if(c>u/2){var h=u-c;f.bottom=h+5+"px"}else{var g=c+l;g<0&&(g=0),f.top=g+5+"px"}return f}function QF(e,t,r){var n={top:"0",left:"0"};if(e.selection==null)return n;var i=Q.isElement(t)&&e.isVoid(t),o=Q.isElement(t)&&e.isInline(t),a=$a.get(t);if(a==null)return n;var u=a.getBoundingClientRect(),s=u.top,l=u.left,f=u.height,c=u.width;if(i){var d=function(_){var T=[];T.push(_);for(var k=0;T.length>0;){var L=T.pop();if(L==null||++k>1e4)break;var R=L.nodeName;if(L.nodeType===1){var S=R.toLowerCase();if(VB.includes(S)||S==="iframe"||S==="video")return L;var z=L.children||[],G=z.length;if(G)for(var X=G-1;X>=0;X--)T.push(z[X])}}return null}(a);if(d!=null){var p=d.getBoundingClientRect();s=p.top,f=p.height}}var h=uc(e);if(h==null)return n;var g=h.top,v=h.left,D=h.width,C=h.height,b={},B=s-g,E=l-v;{var x;return i?o?E>(D-c)/2?b.right=D-E+5+"px":b.left=E+c+5+"px":b.left="20px":b.left=E+"px",i?((x=B)<0&&(x=0),b.top=x+"px"):B>(C-f)/2?b.bottom=C-B+5+"px":((x=B+f)<0&&(x=0),b.top=x+5+"px"),b}}function e2(e,t){An(function(){var r=uc(e);if(r!=null){var n,i=r.top,o=r.left,a=r.width,u=r.height,s=t.offset(),l=s.top,f=s.left,c=t.width(),d=t.height(),p=l-i,h=f-o,g=t.attr("style");if(g.indexOf("top")>=0&&(n=p+d-u)>0){var v=t.css("top"),D=parseInt(v.toString())-n;D<0&&(D=0),t.css("top",D+"px")}if(g.indexOf("bottom")>=0&&l<0){var C=t.css("bottom"),b=parseInt(C.toString())-Math.abs(l);t.css("bottom",b+"px")}if(g.indexOf("left")>=0&&(n=h+c-a)>0){var B=t.css("left"),E=parseInt(B.toString())-n;E<0&&(E=0),t.css("left",E+"px")}if(g.indexOf("right")>=0&&f<0){var x=t.css("right"),_=parseInt(x.toString())-Math.abs(f);t.css("right",_+"px")}}})}var t2=ka("slice"),r2=ye("species"),Zu=P.Array,n2=Math.max;me({target:"Array",proto:!0,forced:!t2},{slice:function(e,t){var r,n,i,o=Qt(this),a=zr(o),u=Dn(e,a),s=Dn(t===void 0?a:t,a);if(ra(o)&&(r=o.constructor,(_a(r)&&(r===Zu||ra(r.prototype))||se(r)&&(r=r[r2])===null)&&(r=void 0),r===Zu||r===void 0))return av(o,u,s);for(n=new(r===void 0?Zu:r)(n2(s-u,0)),i=0;u<s;u++,i++)u in o&&ki(n,i,o[u]);return n.length=i,n}});var i2=Ki.f,_h=U("".startsWith),o2=U("".slice),a2=Math.min,Cv=Ll("startsWith"),u2=!Cv&&!!function(){var e=i2(String.prototype,"startsWith");return e&&!e.writable}();me({target:"String",proto:!0,forced:!u2&&!Cv},{startsWith:function(e){var t=ae(tt(this));$l(e);var r=On(a2(arguments.length>1?arguments[1]:void 0,t.length)),n=ae(e);return _h?_h(t,n,r):o2(t,r,r+n.length)===n}});var tn=Object.assign,Ph=Object.defineProperty,s2=U([].concat),kh=!tn||ee(function(){if(xe&&tn({b:1},tn(Ph({},"a",{enumerable:!0,get:function(){Ph(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var e={},t={},r=Symbol(),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach(function(i){t[i]=i}),tn({},e)[r]!=7||dn(tn({},t)).join("")!=n})?function(e,t){for(var r=Zt(e),n=arguments.length,i=1,o=$g.f,a=jg.f;n>i;)for(var u,s=Sa(arguments[i++]),l=o?s2(dn(s),o(s)):dn(s),f=l.length,c=0;f>c;)u=l[c++],xe&&!Y(a,s,u)||(r[u]=s[u]);return r}:tn;me({target:"Object",stat:!0,forced:Object.assign!==kh},{assign:kh});var l2=["props","attrs","style","dataset","on","hook"];function bv(e){var t=e.data,r=t===void 0?{}:t,n=e.children,i=n===void 0?[]:n;Object.keys(r).forEach(function(o){var a,u,s=r[o];if(o!=="key"){if(!l2.includes(o)){if(o.startsWith("data-")){var l=o.slice(5);return l=oC(l),function(f,c){f.data==null&&(f.data={});var d=f.data;d.dataset==null&&(d.dataset={}),Object.assign(d.dataset,c)}(e,((a={})[l]=s,a)),void delete r[o]}(function(f,c){f.data==null&&(f.data={});var d=f.data;d.props==null&&(d.props={}),Object.assign(d.props,c)})(e,(u={},u[o]=s,u)),delete r[o]}}else e.key=s}),i.length>0&&i.forEach(function(o){typeof o!="string"&&bv(o)})}var wv=[],c2={};function f2(e,t,r){var n=r.isInline(e)?"span":"div";return Jt(n,null,t)}function d2(e,t){var r,n=I.findKey(t,e),i=t.isInline(e),o=m.isVoid(t,e),a=AF(n.id),u={id:a,key:n.id,"data-slate-node":"element","data-slate-inline":i},s=e.type,l=e.children,f=l===void 0?[]:l,c=function(C){return c2[C]||f2}(s);r=o?null:f.map(function(C,b){return Qs(C,b,e,t)});var d=c(e,r,t);if(o){u["data-slate-void"]=!0;var p=i?"span":"div",h=Ae(N.texts(e),1),g=Ae(h[0],1)[0],v=Qs(g,0,e,t),D=Jt(p,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},v);d=Jt(p,{style:{position:"relative"}},d,D),Xl.set(g,0),sa.set(g,e)}return d.data==null&&(d.data={}),Object.assign(d.data,u),o||i||(d=function(C,b){var B=b;return wv.forEach(function(E){B=E(C,b)}),B}(e,d)),An(function(){var C=ec(a);C!=null&&(Zl.set(n,C),$a.set(e,C),Na.set(C,e))}),d}function Th(e,t){return t===void 0&&(t=!1),Jt("span",{"data-slate-string":!0},t?e+`
|
|
41
|
-
`:e)}function Qu(e,t){return e===void 0&&(e=0),t===void 0&&(t=!1),Jt("span",{"data-slate-zero-width":t?"n":"z","data-slate-length":e},"\uFEFF",t?Jt("br",null):null)}function h2(e,t,r){if(e.text==null)throw new Error("Current node is not slate Text "+JSON.stringify(e));var n=I.findKey(r,e),i=r.getConfig().decorate;if(i==null)throw new Error("Can not get config.decorate");var o=I.findPath(r,e),a=i([e,o]),u=W.decorations(e,a),s=u.map(function(c,d){var p=function(h,g,v,D,C){g===void 0&&(g=!1);var b=h.text,B=I.findPath(C,v),E=w.parent(B);if(m.isEditor(D))throw new Error("Text node "+JSON.stringify(v)+" parent is Editor");return C.isVoid(D)?Qu(N.string(D).length):b!==""||D.children[D.children.length-1]!==v||C.isInline(D)||m.string(C,E)!==""?b===""?Qu():g&&b.slice(-1)===`
|
|
42
|
-
`?Th(b,!0):Th(b):Qu(0,!0)}(c,d===u.length-1,e,t,r);return p=function(h,g){var v=g;return wv.forEach(function(D){v=D(h,v)}),v}(c,p),Jt("span",{"data-slate-leaf":!0},p)}),l=function(c){return"w-e-text-"+c}(n.id),f=Jt("span",{"data-slate-node":"text",id:l,key:n.id},s);return An(function(){var c=ec(l);c!=null&&(Zl.set(n,c),$a.set(e,c),Na.set(c,e))}),f}function Qs(e,t,r,n){return Xl.set(e,t),sa.set(e,r),Q.isElement(e)?d2(e,n):h2(e,r,n)}function p2(e,t){var r,n=e.$scroll,i=function(g){return"w-e-textarea-"+g}(e.id),o=t.getConfig(),a=o.readOnly,u=o.autoFocus,s=function(g,v){return v===void 0&&(v=!1),Ko("div#"+g,{props:{contentEditable:!v}})}(i,a),l=t.children||[];s.children=l.map(function(g,v){var D=Qs(g,v,t,t);return bv(D),D});var f=Qd.get(e);if(f==null&&(f=!0),f){var c=function(g,v){return j(`<div
|
|
43
|
-
id="`+g+`"
|
|
44
|
-
data-slate-editor
|
|
45
|
-
data-slate-node="value"
|
|
46
|
-
suppressContentEditableWarning
|
|
47
|
-
role="textarea"
|
|
48
|
-
spellCheck="true"
|
|
49
|
-
autoCorrect="true"
|
|
50
|
-
autoCapitalize="true"
|
|
51
|
-
></div>`)}(i);n.append(c),e.$textArea=c,r=c[0],(p=Vy([Qy,iD,cD,eD,nD,Zy]))(r,s),Qd.set(e,!1),eh.set(e,p)}else{var d=th.get(e),p=eh.get(e);if(d==null||p==null)return;r=d.elm,p(d,s)}if(r!=null||(r=ec(i))!=null){if((f?u:t.isFocused())&&r.focus({preventScroll:!0}),f){var h=Ql(r);h&&rv.set(t,h)}Yl.set(t,r),$a.set(t,r),Na.set(r,t),th.set(e,s)}}function jh(e){return typeof e=="object"&&e!=null&&e.nodeType===1}function Rh(e,t){return(!t||e!=="hidden")&&e!=="visible"&&e!=="clip"}function es(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var r=getComputedStyle(e,null);return Rh(r.overflowY,t)||Rh(r.overflowX,t)||function(n){var i=function(o){if(!o.ownerDocument||!o.ownerDocument.defaultView)return null;try{return o.ownerDocument.defaultView.frameElement}catch{return null}}(n);return!!i&&(i.clientHeight<n.scrollHeight||i.clientWidth<n.scrollWidth)}(e)}return!1}function bo(e,t,r,n,i,o,a,u){return o<e&&a>t||o>e&&a<t?0:o<=e&&u<=r||a>=t&&u>=r?o-e-n:a>t&&u<r||o<e&&u>r?a-t+i:0}function Nh(e,t){var r=window,n=t.scrollMode,i=t.block,o=t.inline,a=t.boundary,u=t.skipOverflowHiddenElements,s=typeof a=="function"?a:function(er){return er!==a};if(!jh(e))throw new TypeError("Invalid target");for(var l=document.scrollingElement||document.documentElement,f=[],c=e;jh(c)&&s(c);){if((c=c.parentElement)===l){f.push(c);break}c!=null&&c===document.body&&es(c)&&!es(document.documentElement)||c!=null&&es(c,u)&&f.push(c)}for(var d=r.visualViewport?r.visualViewport.width:innerWidth,p=r.visualViewport?r.visualViewport.height:innerHeight,h=window.scrollX||pageXOffset,g=window.scrollY||pageYOffset,v=e.getBoundingClientRect(),D=v.height,C=v.width,b=v.top,B=v.right,E=v.bottom,x=v.left,_=i==="start"||i==="nearest"?b:i==="end"?E:b+D/2,T=o==="center"?x+C/2:o==="end"?B:x,k=[],L=0;L<f.length;L++){var R=f[L],S=R.getBoundingClientRect(),z=S.height,G=S.width,X=S.top,te=S.right,re=S.bottom,ke=S.left;if(n==="if-needed"&&b>=0&&x>=0&&E<=p&&B<=d&&b>=X&&E<=re&&x>=ke&&B<=te)return k;var he=getComputedStyle(R),V=parseInt(he.borderLeftWidth,10),Oe=parseInt(he.borderTopWidth,10),le=parseInt(he.borderRightWidth,10),ue=parseInt(he.borderBottomWidth,10),J=0,ne=0,oe="offsetWidth"in R?R.offsetWidth-R.clientWidth-V-le:0,De="offsetHeight"in R?R.offsetHeight-R.clientHeight-Oe-ue:0;if(l===R)J=i==="start"?_:i==="end"?_-p:i==="nearest"?bo(g,g+p,p,Oe,ue,g+_,g+_+D,D):_-p/2,ne=o==="start"?T:o==="center"?T-d/2:o==="end"?T-d:bo(h,h+d,d,V,le,h+T,h+T+C,C),J=Math.max(0,J+g),ne=Math.max(0,ne+h);else{J=i==="start"?_-X-Oe:i==="end"?_-re+ue+De:i==="nearest"?bo(X,re,z,Oe,ue+De,_,_+D,D):_-(X+z/2)+De/2,ne=o==="start"?T-ke-V:o==="center"?T-(ke+G/2)+oe/2:o==="end"?T-te+le+oe:bo(ke,te,G,V,le+oe,T,T+C,C);var Me=R.scrollLeft,Ie=R.scrollTop;_+=Ie-(J=Math.max(0,Math.min(Ie+J,R.scrollHeight-z+De))),T+=Me-(ne=Math.max(0,Math.min(Me+ne,R.scrollWidth-G+oe)))}k.push({el:R,top:J,left:ne})}return k}function $h(e){return e===Object(e)&&Object.keys(e).length!==0}function g2(e,t){var r=!e.ownerDocument.documentElement.contains(e);if($h(t)&&typeof t.behavior=="function")return t.behavior(r?[]:Nh(e,t));if(!r){var n=function(i){return i===!1?{block:"end",inline:"nearest"}:$h(i)?i:{block:"start",inline:"nearest"}}(t);return function(i,o){o===void 0&&(o="auto");var a="scrollBehavior"in document.body.style;i.forEach(function(u){var s=u.el,l=u.top,f=u.left;s.scroll&&a?s.scroll({top:l,left:f,behavior:o}):(s.scrollTop=l,s.scrollLeft=f)})}(Nh(e,n),n.behavior)}}function et(e,t){return En(t)&&I.hasDOMNode(e,t,{editable:!0})}function Lh(e,t){if(e.getConfig().readOnly)return!1;var r=un(e,t)&&I.toSlateNode(e,t);return m.isVoid(e,r)}function un(e,t){return En(t)&&I.hasDOMNode(e,t)}function Ev(e,t,r){r===void 0&&(r=!1);var n=t.selection,i=t.getConfig(),o=I.findDocumentOrShadowRoot(t).getSelection();if(o&&(!e.isComposing||r)&&t.isFocused()){var a=o.type!=="None";if(n||a){var u=Yl.get(t),s=!1;if(u.contains(o.anchorNode)&&u.contains(o.focusNode)&&(s=!0),a&&s&&n){var l=I.toSlateRange(t,o,{exactMatch:!0,suppressThrow:!0});if(l&&O.equals(l,n)){var f=!0;if(O.isCollapsed(n)){var c=o.anchorNode,d=o.anchorOffset;if(c===u){var p=u.childNodes,h=void 0;(h=p[d])&&h.matches("table")&&(f=!1),(h=p[d-1])&&h.matches("table")&&(f=!1)}}if(f)return}}if(!n||I.hasRange(t,n)){e.isUpdatingSelection=!0;var g=n&&I.toDOMRange(t,n);if(g){O.isBackward(n)?o.setBaseAndExtent(g.endContainer,g.endOffset,g.startContainer,g.startOffset):o.setBaseAndExtent(g.startContainer,g.startOffset,g.endContainer,g.endOffset);var v=g.startContainer.parentElement;if(!v.closest("[data-slate-spacer]")){v.getBoundingClientRect=g.getBoundingClientRect.bind(g);var D=document.body;g2(v,{scrollMode:"if-needed",boundary:i.scroll?u.parentElement:D,block:"end",behavior:"smooth"}),delete v.getBoundingClientRect}}else o.removeAllRanges();setTimeout(function(){g&&bi&&u.focus(),e.isUpdatingSelection=!1})}else t.selection=I.toSlateRange(t,o,{exactMatch:!1,suppressThrow:!1})}}}var ts=new WeakMap,Mh=new WeakMap,v2={bold:"mod+b",compose:["down","left","right","up","backspace","enter"],moveBackward:"left",moveForward:"right",moveWordBackward:"ctrl+left",moveWordForward:"ctrl+right",deleteBackward:"shift?+backspace",deleteForward:"shift?+delete",extendBackward:"shift+left",extendForward:"shift+right",italic:"mod+i",splitBlock:"shift?+enter",undo:"mod+z",tab:"tab",selectAll:"mod+a"},m2={moveLineBackward:"opt+up",moveLineForward:"opt+down",moveWordBackward:"opt+left",moveWordForward:"opt+right",deleteBackward:["ctrl+backspace","ctrl+h"],deleteForward:["ctrl+delete","ctrl+d"],deleteLineBackward:"cmd+shift?+backspace",deleteLineForward:["cmd+shift?+delete","ctrl+k"],deleteWordBackward:"opt+shift?+backspace",deleteWordForward:"opt+shift?+delete",extendLineBackward:"opt+shift+up",extendLineForward:"opt+shift+down",redo:"cmd+shift+z",transposeCharacter:"ctrl+t"},y2={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},ce=function(e){var t=v2[e],r=m2[e],n=y2[e],i=t&&au(t),o=r&&au(r),a=n&&au(n);return function(u){return!(!i||!i(u))||!!(Vs&&o&&o(u))||!(Vs||!a||!a(u))}},ve={isBold:ce("bold"),isCompose:ce("compose"),isMoveBackward:ce("moveBackward"),isMoveForward:ce("moveForward"),isDeleteBackward:ce("deleteBackward"),isDeleteForward:ce("deleteForward"),isDeleteLineBackward:ce("deleteLineBackward"),isDeleteLineForward:ce("deleteLineForward"),isDeleteWordBackward:ce("deleteWordBackward"),isDeleteWordForward:ce("deleteWordForward"),isExtendBackward:ce("extendBackward"),isExtendForward:ce("extendForward"),isExtendLineBackward:ce("extendLineBackward"),isExtendLineForward:ce("extendLineForward"),isItalic:ce("italic"),isMoveLineBackward:ce("moveLineBackward"),isMoveLineForward:ce("moveLineForward"),isMoveWordBackward:ce("moveWordBackward"),isMoveWordForward:ce("moveWordForward"),isRedo:ce("redo"),isSplitBlock:ce("splitBlock"),isTransposeCharacter:ce("transposeCharacter"),isUndo:ce("undo"),isTab:ce("tab"),isSelectAll:ce("selectAll")};function Ee(e){e.preventDefault()}var D2={beforeinput:function(e,t,r){var n=e,i=r.getConfig().readOnly;if(ai&&!i&&et(r,n.target)){var o=r.selection,a=n.inputType,u=n.dataTransfer||n.data||void 0;if(a!=="insertCompositionText"&&a!=="deleteCompositionText"){if(n.preventDefault(),!a.startsWith("delete")||a.startsWith("deleteBy")){var s=Ae(n.getTargetRanges(),1)[0];if(s){var l=I.toSlateRange(r,s,{exactMatch:!1,suppressThrow:!1});o&&O.equals(o,l)||$.select(r,l)}}if(o&&O.isExpanded(o)&&a.startsWith("delete")){var f=a.endsWith("Backward")?"backward":"forward";m.deleteFragment(r,{direction:f})}else switch(a){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":m.deleteFragment(r);break;case"deleteContent":case"deleteContentForward":m.deleteForward(r);break;case"deleteContentBackward":m.deleteBackward(r);break;case"deleteEntireSoftLine":m.deleteBackward(r,{unit:"line"}),m.deleteForward(r,{unit:"line"});break;case"deleteHardLineBackward":m.deleteBackward(r,{unit:"block"});break;case"deleteSoftLineBackward":m.deleteBackward(r,{unit:"line"});break;case"deleteHardLineForward":m.deleteForward(r,{unit:"block"});break;case"deleteSoftLineForward":m.deleteForward(r,{unit:"line"});break;case"deleteWordBackward":m.deleteBackward(r,{unit:"word"});break;case"deleteWordForward":m.deleteForward(r,{unit:"word"});break;case"insertLineBreak":case"insertParagraph":m.insertBreak(r);break;case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":if(a==="insertFromPaste"&&!Lu.get(r))break;u instanceof DataTransfer?r.insertData(u):typeof u=="string"&&m.insertText(r,u)}}}},blur:function(e,t,r){var n=e,i=t.isUpdatingSelection,o=t.latestElement;if(!r.getConfig().readOnly&&!i&&et(r,n.target)){var a=I.findDocumentOrShadowRoot(r);if(o!==a.activeElement){var u=n.relatedTarget;if(!(u===I.toDOMNode(r,r)||lt(u)&&u.hasAttribute("data-slate-spacer"))){if(u!=null&&En(u)&&I.hasDOMNode(r,u)){var s=I.toSlateNode(r,u);if(Q.isElement(s)&&!r.isVoid(s))return}if(oi){var l=a.getSelection();l==null||l.removeAllRanges()}la.delete(r)}}}},focus:function(e,t,r){var n=I.toDOMNode(r,r),i=I.findDocumentOrShadowRoot(r);t.latestElement=i.activeElement,bi&&e.target!==n?n.focus():la.set(r,!0)},click:function(e,t,r){if(!r.getConfig().readOnly&&un(r,e.target)&&En(e.target)){var n=I.toSlateNode(r,e.target),i=I.findPath(r,n);if(m.hasPath(r,i)&&N.get(r,i)===n){var o=m.start(r,i),a=m.end(r,i),u=m.void(r,{at:o}),s=m.void(r,{at:a});if(u&&s&&w.equals(u[1],s[1])){var l=m.range(r,o);$.select(r,l)}}}},compositionstart:function(e,t,r){if(et(r,e.target)){var n=r.selection;if(n&&O.isExpanded(n)&&(m.deleteFragment(r),Promise.resolve().then(function(){Ev(t,r,!0)})),n&&O.isCollapsed(n)){var i=I.toDOMRange(r,n).startContainer,o=i.textContent||"";ts.set(r,o),Mh.set(r,i)}t.isComposing=!0,function(a,u){var s;u.getConfig().placeholder&&u.isEmpty()&&a.showPlaceholder&&((s=a.$placeholder)===null||s===void 0||s.hide(),a.showPlaceholder=!1)}(t,r)}},compositionend:function(e,t,r){var n=e;if(et(r,n.target)){t.isComposing=!1;var i=r.selection;if(i!=null){(Ks||bi)&&I.cleanExposedTexNodeInSelectionBlock(r);for(var o=O.isBackward(i)?i.focus:i.anchor,a=Ae(m.node(r,[o.path[0]]),1)[0],u=0;u<o.path.length;u++){var s=Ae(m.node(r,o.path.slice(0,u+1)),1)[0];if(Q.isElement(s)&&((oi||bi)&&s.type==="link"||s.type==="code")){I.setNewKey(a);break}}var l=n.data;if(l){if(r.getConfig().maxLength){var f=I.getLeftLengthOfMaxLength(r);f<l.length?(I.toDOMRange(r,i).startContainer.textContent=ts.get(r)||"",f>0&&m.insertText(r,l.slice(0,f)),t.changeViewState()):m.insertText(r,l)}else m.insertText(r,l);oi||setTimeout(function(){var c=r.selection;if(c!=null){var d=Mh.get(r);d!=null&&I.toDOMRange(r,c).startContainer!==d&&(d.textContent=ts.get(r)||"")}})}}}},compositionupdate:function(e,t,r){et(r,e.target)&&(t.isComposing=!0)},keydown:function(e,t,r){var n=e,i=r.selection;if(!r.getConfig().readOnly&&!t.isComposing&&et(r,n.target)){if(function(a,u){var s=ev.get(a),l=s&&s.getMenus(),f=tv.get(a),c=f&&f.getMenus(),d=ua(ua({},l),c);for(var p in d){var h=d[p],g=h.hotkey;if(g&&lC(g,u)&&!h.isDisabled(a)){var v=h.getValue(a);h.exec(a,v)}}}(r,n),ve.isTab(n))return Ee(n),void r.handleTab();if(ve.isRedo(n))return Ee(n),void(typeof r.redo=="function"&&r.redo());if(ve.isUndo(n))return Ee(n),void(typeof r.undo=="function"&&r.undo());if(ve.isMoveLineBackward(n))return Ee(n),void $.move(r,{unit:"line",reverse:!0});if(ve.isMoveLineForward(n))return Ee(n),void $.move(r,{unit:"line"});if(ve.isExtendLineBackward(n))return Ee(n),void $.move(r,{unit:"line",edge:"focus",reverse:!0});if(ve.isExtendLineForward(n))return Ee(n),void $.move(r,{unit:"line",edge:"focus"});if(ve.isMoveBackward(n))return Ee(n),void(i&&O.isCollapsed(i)?$.move(r,{reverse:!0}):$.collapse(r,{edge:"start"}));if(ve.isMoveForward(n))return Ee(n),void(i&&O.isCollapsed(i)?$.move(r):$.collapse(r,{edge:"end"}));if(ve.isMoveWordBackward(n))return Ee(n),i&&O.isExpanded(i)&&$.collapse(r,{edge:"focus"}),void $.move(r,{unit:"word",reverse:!0});if(ve.isMoveWordForward(n))return Ee(n),i&&O.isExpanded(i)&&$.collapse(r,{edge:"focus"}),void $.move(r,{unit:"word"});if(ve.isSelectAll(n))return Ee(n),void r.selectAll();if(ai){if((Ks||oi)&&i&&(ve.isDeleteBackward(n)||ve.isDeleteForward(n))&&O.isCollapsed(i)){var o=N.parent(r,i.anchor.path);if(Q.isElement(o)&&m.isVoid(r,o)&&m.isInline(r,o))return n.preventDefault(),void $.delete(r,{unit:"block"})}}else{if(ve.isBold(n)||ve.isItalic(n)||ve.isTransposeCharacter(n))return void Ee(n);if(ve.isSplitBlock(n))return Ee(n),void m.insertBreak(r);if(ve.isDeleteBackward(n))return Ee(n),void(i&&O.isExpanded(i)?m.deleteFragment(r,{direction:"backward"}):m.deleteBackward(r));if(ve.isDeleteForward(n))return Ee(n),void(i&&O.isExpanded(i)?m.deleteFragment(r,{direction:"forward"}):m.deleteForward(r));if(ve.isDeleteLineBackward(n))return Ee(n),void(i&&O.isExpanded(i)?m.deleteFragment(r,{direction:"backward"}):m.deleteBackward(r,{unit:"line"}));if(ve.isDeleteLineForward(n))return Ee(n),void(i&&O.isExpanded(i)?m.deleteFragment(r,{direction:"forward"}):m.deleteForward(r,{unit:"line"}));if(ve.isDeleteWordBackward(n))return Ee(n),void(i&&O.isExpanded(i)?m.deleteFragment(r,{direction:"backward"}):m.deleteBackward(r,{unit:"word"}));if(ve.isDeleteWordForward(n))return Ee(n),void(i&&O.isExpanded(i)?m.deleteFragment(r,{direction:"forward"}):m.deleteForward(r,{unit:"word"}))}}},keypress:function(e,t,r){if(!ai&&!r.getConfig().readOnly&&et(r,e.target)){e.preventDefault();var n=e.key;m.insertText(r,n)}},copy:function(e,t,r){var n=e;if(et(r,n.target)){n.preventDefault();var i=n.clipboardData;i!=null&&r.setFragmentData(i)}},cut:function(e,t,r){var n=e,i=r.selection;if(!r.getConfig().readOnly&&et(r,n.target)){n.preventDefault();var o=n.clipboardData;if(o!=null&&(r.setFragmentData(o),i))if(O.isExpanded(i))m.deleteFragment(r);else{var a=N.parent(r,i.anchor.path);m.isVoid(r,a)&&$.delete(r)}}},paste:function(e,t,r){Lu.set(r,!0);var n=e;if(!r.getConfig().readOnly&&et(r,n.target)){var i=r.getConfig().customPaste;if(i&&i(r,n)===!1)return void Lu.set(r,!1);if(!ai||function(a){return a.clipboardData&&a.clipboardData.getData("text/plain")!==""&&a.clipboardData.types.length===1}(n)){n.preventDefault();var o=n.clipboardData;o!=null&&r.insertData(o)}}},dragover:function(e,t,r){if(un(r,e.target)){var n=I.toSlateNode(r,e.target);m.isVoid(r,n)&&e.preventDefault()}},dragstart:function(e,t,r){var n=e;if(un(r,n.target)&&!r.getConfig().readOnly){var i=I.toSlateNode(r,n.target),o=I.findPath(r,i);if(m.isVoid(r,i)||m.void(r,{at:o,voids:!0})){var a=m.range(r,o);$.select(r,a)}var u=n.dataTransfer;u!=null&&(t.isDraggingInternally=!0,r.setFragmentData(u))}},dragend:function(e,t,r){var n=e;r.getConfig().readOnly||t.isDraggingInternally&&un(r,n.target)&&(t.isDraggingInternally=!1)},drop:function(e,t,r){var n=e,i=n.dataTransfer;if(!r.getConfig().readOnly&&un(r,n.target)&&i!=null&&!(ai&&oi&&i.files.length>0)){n.preventDefault();var o=r.selection,a=I.findEventRange(r,n);$.select(r,a),t.isDraggingInternally&&(o&&$.delete(r,{at:o}),t.isDraggingInternally=!1),r.insertData(i),r.isFocused()||r.focus()}}},C2=1;(function(){function e(t){var r=this;this.id=C2++,this.$textArea=null,this.$progressBar=j('<div class="w-e-progress-bar"></div>'),this.$maxLengthInfo=j('<div class="w-e-max-length-info"></div>'),this.isComposing=!1,this.isUpdatingSelection=!1,this.isDraggingInternally=!1,this.latestElement=null,this.showPlaceholder=!1,this.$placeholder=null,this.latestEditorSelection=null,this.onDOMSelectionChange=fe.B(function(){var a=r.editorInstance;(function(u,s){var l=u.isComposing,f=u.isUpdatingSelection,c=u.isDraggingInternally;if(!(s.getConfig().readOnly||l||f||c)){var d=I.findDocumentOrShadowRoot(s),p=d.activeElement,h=I.toDOMNode(s,s),g=d.getSelection();if(p===h?(u.latestElement=p,la.set(s,!0)):la.delete(s),!g)return $.deselect(s);var v=g.anchorNode,D=g.focusNode,C=et(s,v)||Lh(s,v),b=et(s,D)||Lh(s,D);if(C&&b){var B=I.toSlateRange(s,g,{exactMatch:!1,suppressThrow:!1});$.select(s,B)}else $.deselect(s)}})(r,a)},100);var n=j(t);if(n.length===0)throw new Error("Cannot find textarea DOM by selector '"+t+"'");this.$box=n;var i=j('<div class="w-e-text-container"></div>');i.append(this.$progressBar),i.append(this.$maxLengthInfo),n.append(i);var o=j('<div class="w-e-scroll"></div>');i.append(o),this.$scroll=o,this.$textAreaContainer=i,An(function(){var a=r.editorInstance,u=I.getWindow(a);u.document.addEventListener("selectionchange",r.onDOMSelectionChange),a.on("destroyed",function(){u.document.removeEventListener("selectionchange",r.onDOMSelectionChange)}),i.on("click",function(){return a.hidePanelOrModal()}),a.on("change",r.changeViewState.bind(r));var s=a.getConfig().onChange;s&&a.on("change",function(){return s(a)}),r.onFocusAndOnBlur(),a.on("change",r.changeMaxLengthInfo.bind(r)),r.bindEvent()})}return Object.defineProperty(e.prototype,"editorInstance",{get:function(){var t=zB.get(this);if(t==null)throw new Error("Can not get editor instance");return t},enumerable:!1,configurable:!0}),e.prototype.bindEvent=function(){var t=this,r=this.$textArea,n=this.$scroll,i=this.editorInstance;r!=null&&(Ay(D2,function(o,a){r.on(a,function(u){o(u,t,i)})}),i.getConfig().scroll&&(n.css("overflow-y","auto"),n.on("scroll",fe.B(function(){i.emit("scroll")},100))))},e.prototype.onFocusAndOnBlur=function(){var t=this,r=this.editorInstance,n=r.getConfig(),i=n.onBlur,o=n.onFocus;this.latestEditorSelection=r.selection,r.on("change",function(){t.latestEditorSelection==null&&r.selection!=null?setTimeout(function(){return o&&o(r)}):t.latestEditorSelection!=null&&r.selection==null&&setTimeout(function(){return i&&i(r)}),t.latestEditorSelection=r.selection})},e.prototype.changeMaxLengthInfo=function(){var t=this.editorInstance,r=t.getConfig().maxLength;if(r){var n=r-I.getLeftLengthOfMaxLength(t);this.$maxLengthInfo[0].innerHTML=n+"/"+r}},e.prototype.changeProgress=function(t){var r=this.$progressBar;r.css("width",t+"%"),t>=100&&setTimeout(function(){r.hide(),r.css("width","0"),r.show()},1e3)},e.prototype.changeViewState=function(){var t=this,r=this.editorInstance;p2(this,r),function(n,i){var o,a=i.getConfig().placeholder;if(a){var u=i.isEmpty();if(u&&!n.showPlaceholder&&!n.isComposing){if(n.$placeholder==null){var s=j('<div class="w-e-text-placeholder">'+a+"</div>");n.$textAreaContainer.append(s),n.$placeholder=s}return n.$placeholder.show(),void(n.showPlaceholder=!0)}!u&&n.showPlaceholder&&((o=n.$placeholder)===null||o===void 0||o.hide(),n.showPlaceholder=!1)}}(this,r),An(function(){Ev(t,r)})},e.prototype.destroy=function(){this.$textAreaContainer.remove()},e})();Gl("match",function(e,t,r){return[function(n){var i=tt(this),o=n==null?void 0:Nr(n,e);return o?Y(o,n,i):new RegExp(n)[e](ae(i))},function(n){var i=be(this),o=ae(n),a=r(t,i,o);if(a.done)return a.value;if(!i.global)return ji(i,o);var u=i.unicode;i.lastIndex=0;for(var s,l=[],f=0;(s=ji(i,o))!==null;){var c=ae(s[0]);l[f]=c,c===""&&(i.lastIndex=Jl(o,On(i.lastIndex),u)),f++}return f===0?null:l}]});function Av(e){e.removeAttr("width"),e.removeAttr("height"),e.removeAttr("fill"),e.removeAttr("class"),e.removeAttr("t"),e.removeAttr("p-id");var t=e.children();t.length&&Av(t)}function b2(){return j('<svg viewBox="0 0 1024 1024"><path d="M498.7 655.8l-197.6-268c-8.1-10.9-0.3-26.4 13.3-26.4h395.2c13.6 0 21.4 15.4 13.3 26.4l-197.6 268c-6.6 9-20 9-26.6 0z"></path></svg>')}function w2(e,t,r,n,i){if(i===void 0&&(i=!1),t){if(n){var o=Vs?"cmd":"ctrl";n=n.replace("mod",o)}if(i)n&&(e.attr("data-tooltip",n),e.addClass("w-e-menu-tooltip-v5"),e.addClass("tooltip-right"));else{var a=n?r+`
|
|
52
|
-
`+n:r;e.attr("data-tooltip",a),e.addClass("w-e-menu-tooltip-v5")}}}var sc=function(){function e(t,r,n){var i=this;n===void 0&&(n=!1),this.$elem=j('<div class="w-e-bar-item"></div>'),this.$button=j('<button type="button"></button>'),this.disabled=!1,this.menu=r;var o=r.tag,a=r.width;if(o!=="button")throw new Error("Invalid tag '"+o+"', expected 'button'");var u=r.title,s=r.hotkey,l=s===void 0?"":s,f=r.iconSvg,c=f===void 0?"":f,d=this.$button;if(c){var p=j(c);Av(p),d.append(p)}else d.text(u);w2(d,c,u,l,n),n&&c&&d.append(j('<span class="title">'+u+"</span>")),a&&d.css("width",a+"px"),d.attr("data-menu-key",t),this.$elem.append(d),An(function(){return i.init()})}return e.prototype.init=function(){var t=this;this.setActive(),this.setDisabled(),this.$button.on("click",function(r){r.preventDefault(),Wt(t).hidePanelOrModal(),t.disabled||(t.exec(),t.onButtonClick())})},e.prototype.exec=function(){var t=Wt(this),r=this.menu,n=r.getValue(t);r.exec(t,n)},e.prototype.setActive=function(){var t=Wt(this),r=this.$button,n="active";this.menu.isActive(t)?r.addClass(n):r.removeClass(n)},e.prototype.setDisabled=function(){var t=Wt(this),r=this.$button,n=this.menu.isDisabled(t);(t.selection==null||t.isDisabled())&&(n=!0),this.menu.alwaysEnable&&(n=!1);var i="disabled";n?r.addClass(i):r.removeClass(i),this.disabled=n},e.prototype.changeMenuState=function(){this.setActive(),this.setDisabled()},e}();(function(e){function t(r,n,i){return i===void 0&&(i=!1),e.call(this,r,n,i)||this}return _n(t,e),t.prototype.onButtonClick=function(){},t})(sc);var lc=function(){function e(t){this.isShow=!1,this.showTime=0,this.record(t)}return e.prototype.record=function(t){var r=Zd.get(t);r==null&&(r=new Set,Zd.set(t,r)),r.add(this),So.set(this,t)},e.prototype.renderContent=function(t){var r=this.$elem;r.empty(),r.append(t);var n=this.genSelfElem();n&&r.append(n)},e.prototype.appendTo=function(t){var r=this.$elem;t.append(r)},e.prototype.show=function(){if(!this.isShow){this.showTime=Date.now(),this.$elem.show(),this.isShow=!0;var t=So.get(this);t&&t.emit("modalOrPanelShow",this)}},e.prototype.hide=function(){if(this.isShow&&!(Date.now()-this.showTime<200)){this.$elem.hide(),this.isShow=!1;var t=So.get(this);t&&t.emit("modalOrPanelHide")}},e}(),E2=function(e){function t(r){var n=e.call(this,r)||this;return n.type="dropPanel",n.$elem=j('<div class="w-e-drop-panel"></div>'),n}return _n(t,e),t.prototype.genSelfElem=function(){return null},t}(lc);(function(e){function t(r,n,i){i===void 0&&(i=!1);var o=e.call(this,r,n,i)||this;if(o.dropPanel=null,o.menu=n,n.showDropPanel){var a=b2();o.$button.append(a)}return o}return _n(t,e),t.prototype.onButtonClick=function(){this.menu.showDropPanel&&this.handleDropPanel()},t.prototype.handleDropPanel=function(){var r=this.menu;if(r.getPanelContentElem!=null){var n=Wt(this);if(this.dropPanel==null){var i=new E2(n),o=r.getPanelContentElem(n);i.renderContent(o),i.appendTo(this.$elem),i.show(),this.dropPanel=i}else{var a=this.dropPanel;a.isShow?a.hide():(o=r.getPanelContentElem(n),a.renderContent(o),a.show())}var u=this.dropPanel;if(u.isShow){var s=this.$elem,l=s.offset().left,f=s.parents(".w-e-bar");l-f.offset().left>=f.width()/2?u.$elem.css({left:"none",right:"0"}):u.$elem.css({left:"0",right:"none"})}}},t})(sc);var A2=function(e){function t(r,n){n===void 0&&(n=0);var i=e.call(this,r)||this;i.type="modal",i.$elem=j('<div class="w-e-modal"></div>'),i.width=0,n&&(i.width=n);var o=i.$elem;return o.on("click",function(a){return a.stopPropagation()}),o.on("keyup",function(a){a.code==="Escape"&&(i.hide(),r.restoreSelection())}),i}return _n(t,e),t.prototype.genSelfElem=function(){var r=this,n=j('<span class="btn-close"><svg viewBox="0 0 1024 1024"><path d="M1024 896.1024l-128 128L512 640 128 1024 0 896 384 512 0 128 128 0 512 384 896.1024 0l128 128L640 512z"></path></svg></span>'),i=So.get(this);return n.on("click",function(){r.hide(),i==null||i.restoreSelection()}),n},t.prototype.setStyle=function(r){var n=this.width,i=this.$elem;i.attr("style",""),n&&i.css("width",n+"px"),i.css(r)},t}(lc);(function(e){function t(r,n,i){i===void 0&&(i=!1);var o=e.call(this,r,n,i)||this;return o.$body=j("body"),o.modal=null,o.menu=n,o}return _n(t,e),t.prototype.onButtonClick=function(){this.menu.showModal&&this.handleModal()},t.prototype.getPosition=function(){var r=Wt(this),n=this.menu.getModalPositionNode(r);return Q.isElement(n)?QF(r,n):ZF(r)},t.prototype.handleModal=function(){var r=Wt(this),n=this.menu;if(this.modal==null){var i=new A2(r,n.modalWidth);this.renderAndShowModal(i,!0),this.modal=i}else(i=this.modal).isShow?i.hide():this.renderAndShowModal(i,!1)},t.prototype.renderAndShowModal=function(r,n){n===void 0&&(n=!1);var i=Wt(this),o=this.menu;if(o.getModalContentElem!=null){var a=I.getTextarea(i),u=I.getToolbar(i),s=((u==null?void 0:u.getConfig())||{}).modalAppendToBody,l=o.getModalContentElem(i);if(r.renderContent(l),s)r.setStyle({left:"0",right:"0"});else{var f=this.getPosition();r.setStyle(f)}n&&(s?r.appendTo(this.$body):r.appendTo(a.$textAreaContainer)),r.show(),s||e2(i,r.$elem),setTimeout(function(){i.blur()})}},t})(sc);(function(e){function t(r,n){var i=e.call(this,r)||this;return i.type="selectList",i.$elem=j('<div class="w-e-select-list"></div>'),n&&i.$elem.css("width",n+"px"),i.$elem.on("click",function(o){o.stopPropagation()}),i}return _n(t,e),t.prototype.renderList=function(r){var n=this.$elem;n.empty();var i=j("<ul></ul>");r.forEach(function(o){var a=o.value,u=o.text,s=o.selected,l=o.styleForRenderMenuList,f=j('<li data-value="'+a+'"></li>');if(l&&f.css(l),s){var c=j('<svg viewBox="0 0 1446 1024"><path d="M574.116299 786.736392 1238.811249 48.517862C1272.390222 11.224635 1329.414799 7.827718 1366.75664 41.450462 1403.840015 74.840484 1406.731043 132.084741 1373.10189 169.433699L655.118888 966.834607C653.072421 969.716875 650.835807 972.514337 648.407938 975.210759 615.017957 1012.29409 558.292155 1015.652019 521.195664 982.250188L72.778218 578.493306C35.910826 545.297758 32.859041 488.584019 66.481825 451.242134 99.871807 414.158803 156.597563 410.800834 193.694055 444.202665L574.116299 786.736392Z"></path></svg>');f.append(c),f.addClass("selected")}f.append(j('<span data-value="'+a+'">'+u+"</span>")),f.attr("title",u),i.append(f)}),n.append(i)},t.prototype.genSelfElem=function(){return null},t})(lc);function Wt(e){var t=WB.get(e);if(t==null)throw new Error("Can not get editor instance");return t}var B2=ka("splice"),F2=P.TypeError,x2=Math.max,O2=Math.min;me({target:"Array",proto:!0,forced:!B2},{splice:function(e,t){var r,n,i,o,a,u,s=Zt(this),l=zr(s),f=Dn(e,l),c=arguments.length;if(c===0?r=n=0:c===1?(r=0,n=l-f):(r=c-2,n=O2(x2(Vi(t),0),l-f)),l+r-n>9007199254740991)throw F2("Maximum allowed length exceeded");for(i=Pg(s,n),o=0;o<n;o++)(a=f+o)in s&&ki(i,o,s[a]);if(i.length=n,r<n){for(o=f;o<l-n;o++)u=o+r,(a=o+n)in s?s[u]=s[a]:delete s[u];for(o=l;o>l-n+r;o--)delete s[o-1]}else if(r>n)for(o=l-n;o>f;o--)u=o+r-1,(a=o+n-1)in s?s[u]=s[a]:delete s[u];for(o=0;o<r;o++)s[o+f]=arguments[o+2];return s.length=l-n+r,i}});var S2=xn.EXISTS,_2=st.f,Bv=Function.prototype,P2=U(Bv.toString),Fv=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,k2=U(Fv.exec);function Gt(e){return Gt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gt(e)}function T2(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Be(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&n.push.apply(n,Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),n.forEach(function(i){T2(e,i,r[i])})}return e}function $t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ih(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Lt(e,t,r){return t&&Ih(e.prototype,t),r&&Ih(e,r),e}function Lr(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $i(e,t){if(t&&(Gt(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Lr(e)}function Bn(e){return Bn=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Bn(e)}function el(e,t){return el=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r},el(e,t)}function La(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&el(e,t)}xe&&!S2&&_2(Bv,"name",{configurable:!0,get:function(){try{return k2(Fv,P2(this))[1]}catch{return""}}});var j2={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},Tt=new(function(){function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};$t(this,e),this.init(t,r)}return Lt(e,[{key:"init",value:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=t||j2,this.options=r,this.debug=r.debug}},{key:"setDebug",value:function(t){this.debug=t}},{key:"log",value:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return this.forward(r,"log","",!0)}},{key:"warn",value:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return this.forward(r,"warn","",!0)}},{key:"error",value:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return this.forward(r,"error","")}},{key:"deprecate",value:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return this.forward(r,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(t,r,n,i){return i&&!this.debug?null:(typeof t[0]=="string"&&(t[0]="".concat(n).concat(this.prefix," ").concat(t[0])),this.logger[r](t))}},{key:"create",value:function(t){return new e(this.logger,Be({},{prefix:"".concat(this.prefix,":").concat(t,":")},this.options))}}]),e}()),Yt=function(){function e(){$t(this,e),this.observers={}}return Lt(e,[{key:"on",value:function(t,r){var n=this;return t.split(" ").forEach(function(i){n.observers[i]=n.observers[i]||[],n.observers[i].push(r)}),this}},{key:"off",value:function(t,r){this.observers[t]&&(r?this.observers[t]=this.observers[t].filter(function(n){return n!==r}):delete this.observers[t])}},{key:"emit",value:function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];if(this.observers[t]){var o=[].concat(this.observers[t]);o.forEach(function(u){u.apply(void 0,n)})}if(this.observers["*"]){var a=[].concat(this.observers["*"]);a.forEach(function(u){u.apply(u,[t].concat(n))})}}}]),e}();function fi(){var e,t,r=new Promise(function(n,i){e=n,t=i});return r.resolve=e,r.reject=t,r}function Uh(e){return e==null?"":""+e}function R2(e,t,r){e.forEach(function(n){t[n]&&(r[n]=t[n])})}function cc(e,t,r){function n(u){return u&&u.indexOf("###")>-1?u.replace(/###/g,"."):u}function i(){return!e||typeof e=="string"}for(var o=typeof t!="string"?[].concat(t):t.split(".");o.length>1;){if(i())return{};var a=n(o.shift());!e[a]&&r&&(e[a]=new r),e=Object.prototype.hasOwnProperty.call(e,a)?e[a]:{}}return i()?{}:{obj:e,k:n(o.shift())}}function Hh(e,t,r){var n=cc(e,t,Object);n.obj[n.k]=r}function da(e,t){var r=cc(e,t),n=r.obj,i=r.k;if(n)return n[i]}function zh(e,t,r){var n=da(e,r);return n!==void 0?n:da(t,r)}function xv(e,t,r){for(var n in t)n!=="__proto__"&&n!=="constructor"&&(n in e?typeof e[n]=="string"||e[n]instanceof String||typeof t[n]=="string"||t[n]instanceof String?r&&(e[n]=t[n]):xv(e[n],t[n],r):e[n]=t[n]);return e}function rn(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var N2={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function $2(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,function(t){return N2[t]}):e}var Ma=typeof window<"u"&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1;function Ov(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(e){if(e[t])return e[t];for(var n=t.split(r),i=e,o=0;o<n.length;++o){if(!i||typeof i[n[o]]=="string"&&o+1<n.length)return;if(i[n[o]]===void 0){for(var a=2,u=n.slice(o,o+a).join(r),s=i[u];s===void 0&&n.length>o+a;)a++,s=i[u=n.slice(o,o+a).join(r)];if(s===void 0)return;if(typeof s=="string")return s;if(u&&typeof s[u]=="string")return s[u];var l=n.slice(o+a).join(r);return l?Ov(s,l,r):void 0}i=i[n[o]]}return i}}var L2=function(e){function t(r){var n,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return $t(this,t),n=$i(this,Bn(t).call(this)),Ma&&Yt.call(Lr(n)),n.data=r||{},n.options=i,n.options.keySeparator===void 0&&(n.options.keySeparator="."),n.options.ignoreJSONStructure===void 0&&(n.options.ignoreJSONStructure=!0),n}return La(t,Yt),Lt(t,[{key:"addNamespaces",value:function(r){this.options.ns.indexOf(r)<0&&this.options.ns.push(r)}},{key:"removeNamespaces",value:function(r){var n=this.options.ns.indexOf(r);n>-1&&this.options.ns.splice(n,1)}},{key:"getResource",value:function(r,n,i){var o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},a=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,u=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure,s=[r,n];i&&typeof i!="string"&&(s=s.concat(i)),i&&typeof i=="string"&&(s=s.concat(a?i.split(a):i)),r.indexOf(".")>-1&&(s=r.split("."));var l=da(this.data,s);return l||!u||typeof i!="string"?l:Ov(this.data&&this.data[r]&&this.data[r][n],i,a)}},{key:"addResource",value:function(r,n,i,o){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},u=this.options.keySeparator;u===void 0&&(u=".");var s=[r,n];i&&(s=s.concat(u?i.split(u):i)),r.indexOf(".")>-1&&(o=n,n=(s=r.split("."))[1]),this.addNamespaces(n),Hh(this.data,s,o),a.silent||this.emit("added",r,n,i,o)}},{key:"addResources",value:function(r,n,i){var o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var a in i)typeof i[a]!="string"&&Object.prototype.toString.apply(i[a])!=="[object Array]"||this.addResource(r,n,a,i[a],{silent:!0});o.silent||this.emit("added",r,n,i)}},{key:"addResourceBundle",value:function(r,n,i,o,a){var u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},s=[r,n];r.indexOf(".")>-1&&(o=i,i=n,n=(s=r.split("."))[1]),this.addNamespaces(n);var l=da(this.data,s)||{};o?xv(l,i,a):l=Be({},l,i),Hh(this.data,s,l),u.silent||this.emit("added",r,n,i)}},{key:"removeResourceBundle",value:function(r,n){this.hasResourceBundle(r,n)&&delete this.data[r][n],this.removeNamespaces(n),this.emit("removed",r,n)}},{key:"hasResourceBundle",value:function(r,n){return this.getResource(r,n)!==void 0}},{key:"getResourceBundle",value:function(r,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?Be({},{},this.getResource(r,n)):this.getResource(r,n)}},{key:"getDataByLanguage",value:function(r){return this.data[r]}},{key:"toJSON",value:function(){return this.data}}]),t}(),Sv={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,r,n,i){var o=this;return e.forEach(function(a){o.processors[a]&&(t=o.processors[a].process(t,r,n,i))}),t}},Wh={},qh=function(e){function t(r){var n,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return $t(this,t),n=$i(this,Bn(t).call(this)),Ma&&Yt.call(Lr(n)),R2(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],r,Lr(n)),n.options=i,n.options.keySeparator===void 0&&(n.options.keySeparator="."),n.logger=Tt.create("translator"),n}return La(t,Yt),Lt(t,[{key:"changeLanguage",value:function(r){r&&(this.language=r)}},{key:"exists",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(r==null)return!1;var i=this.resolve(r,n);return i&&i.res!==void 0}},{key:"extractFromKey",value:function(r,n){var i=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;i===void 0&&(i=":");var o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,a=n.ns||this.options.defaultNS;if(i&&r.indexOf(i)>-1){var u=r.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:r,namespaces:a};var s=r.split(i);(i!==o||i===o&&this.options.ns.indexOf(s[0])>-1)&&(a=s.shift()),r=s.join(o)}return typeof a=="string"&&(a=[a]),{key:r,namespaces:a}}},{key:"translate",value:function(r,n,i){var o=this;if(Gt(n)!=="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),n||(n={}),r==null)return"";Array.isArray(r)||(r=[String(r)]);var a=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,u=this.extractFromKey(r[r.length-1],n),s=u.key,l=u.namespaces,f=l[l.length-1],c=n.lng||this.language,d=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&c.toLowerCase()==="cimode"){if(d){var p=n.nsSeparator||this.options.nsSeparator;return f+p+s}return s}var h=this.resolve(r,n),g=h&&h.res,v=h&&h.usedKey||s,D=h&&h.exactUsedKey||s,C=Object.prototype.toString.apply(g),b=["[object Number]","[object Function]","[object RegExp]"],B=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,E=!this.i18nFormat||this.i18nFormat.handleAsObject,x=typeof g!="string"&&typeof g!="boolean"&&typeof g!="number";if(E&&g&&x&&b.indexOf(C)<0&&(typeof B!="string"||C!=="[object Array]")){if(!n.returnObjects&&!this.options.returnObjects)return this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,g,Be({},n,{ns:l})):"key '".concat(s," (").concat(this.language,")' returned an object instead of string.");if(a){var _=C==="[object Array]",T=_?[]:{},k=_?D:v;for(var L in g)if(Object.prototype.hasOwnProperty.call(g,L)){var R="".concat(k).concat(a).concat(L);T[L]=this.translate(R,Be({},n,{joinArrays:!1,ns:l})),T[L]===R&&(T[L]=g[L])}g=T}}else if(E&&typeof B=="string"&&C==="[object Array]")(g=g.join(B))&&(g=this.extendTranslation(g,r,n,i));else{var S=!1,z=!1,G=n.count!==void 0&&typeof n.count!="string",X=t.hasDefaultValue(n),te=G?this.pluralResolver.getSuffix(c,n.count):"",re=n["defaultValue".concat(te)]||n.defaultValue;!this.isValidLookup(g)&&X&&(S=!0,g=re),this.isValidLookup(g)||(z=!0,g=s);var ke=n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,he=ke&&z?void 0:g,V=X&&re!==g&&this.options.updateMissing;if(z||S||V){if(this.logger.log(V?"updateKey":"missingKey",c,f,s,V?re:g),a){var Oe=this.resolve(s,Be({},n,{keySeparator:!1}));Oe&&Oe.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var le=[],ue=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&ue&&ue[0])for(var J=0;J<ue.length;J++)le.push(ue[J]);else this.options.saveMissingTo==="all"?le=this.languageUtils.toResolveHierarchy(n.lng||this.language):le.push(n.lng||this.language);var ne=function(oe,De,Me){o.options.missingKeyHandler?o.options.missingKeyHandler(oe,f,De,V?Me:he,V,n):o.backendConnector&&o.backendConnector.saveMissing&&o.backendConnector.saveMissing(oe,f,De,V?Me:he,V,n),o.emit("missingKey",oe,f,De,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&G?le.forEach(function(oe){o.pluralResolver.getSuffixes(oe).forEach(function(De){ne([oe],s+De,n["defaultValue".concat(De)]||re)})}):ne(le,s,re))}g=this.extendTranslation(g,r,n,h,i),z&&g===s&&this.options.appendNamespaceToMissingKey&&(g="".concat(f,":").concat(s)),(z||S)&&this.options.parseMissingKeyHandler&&(g=this.options.parseMissingKeyHandler(g))}return g}},{key:"extendTranslation",value:function(r,n,i,o,a){var u=this;if(this.i18nFormat&&this.i18nFormat.parse)r=this.i18nFormat.parse(r,i,o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init(Be({},i,{interpolation:Be({},this.options.interpolation,i.interpolation)}));var s,l=i.interpolation&&i.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;if(l){var f=r.match(this.interpolator.nestingRegexp);s=f&&f.length}var c=i.replace&&typeof i.replace!="string"?i.replace:i;if(this.options.interpolation.defaultVariables&&(c=Be({},this.options.interpolation.defaultVariables,c)),r=this.interpolator.interpolate(r,c,i.lng||this.language,i),l){var d=r.match(this.interpolator.nestingRegexp);s<(d&&d.length)&&(i.nest=!1)}i.nest!==!1&&(r=this.interpolator.nest(r,function(){for(var g=arguments.length,v=new Array(g),D=0;D<g;D++)v[D]=arguments[D];return a&&a[0]===v[0]&&!i.context?(u.logger.warn("It seems you are nesting recursively key: ".concat(v[0]," in key: ").concat(n[0])),null):u.translate.apply(u,v.concat([n]))},i)),i.interpolation&&this.interpolator.reset()}var p=i.postProcess||this.options.postProcess,h=typeof p=="string"?[p]:p;return r!=null&&h&&h.length&&i.applyPostProcessor!==!1&&(r=Sv.handle(h,r,n,this.options&&this.options.postProcessPassResolved?Be({i18nResolved:o},i):i,this)),r}},{key:"resolve",value:function(r){var n,i,o,a,u,s=this,l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return typeof r=="string"&&(r=[r]),r.forEach(function(f){if(!s.isValidLookup(n)){var c=s.extractFromKey(f,l),d=c.key;i=d;var p=c.namespaces;s.options.fallbackNS&&(p=p.concat(s.options.fallbackNS));var h=l.count!==void 0&&typeof l.count!="string",g=l.context!==void 0&&(typeof l.context=="string"||typeof l.context=="number")&&l.context!=="",v=l.lngs?l.lngs:s.languageUtils.toResolveHierarchy(l.lng||s.language,l.fallbackLng);p.forEach(function(D){s.isValidLookup(n)||(u=D,!Wh["".concat(v[0],"-").concat(D)]&&s.utils&&s.utils.hasLoadedNamespace&&!s.utils.hasLoadedNamespace(u)&&(Wh["".concat(v[0],"-").concat(D)]=!0,s.logger.warn('key "'.concat(i,'" for languages "').concat(v.join(", "),`" won't get resolved as namespace "`).concat(u,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),v.forEach(function(C){if(!s.isValidLookup(n)){a=C;var b,B,E=d,x=[E];for(s.i18nFormat&&s.i18nFormat.addLookupKeys?s.i18nFormat.addLookupKeys(x,d,C,D,l):(h&&(b=s.pluralResolver.getSuffix(C,l.count)),h&&g&&x.push(E+b),g&&x.push(E+="".concat(s.options.contextSeparator).concat(l.context)),h&&x.push(E+=b));B=x.pop();)s.isValidLookup(n)||(o=B,n=s.getResource(C,D,B,l))}}))})}}),{res:n,usedKey:i,exactUsedKey:o,usedLng:a,usedNS:u}}},{key:"isValidLookup",value:function(r){return!(r===void 0||!this.options.returnNull&&r===null||!this.options.returnEmptyString&&r==="")}},{key:"getResource",value:function(r,n,i){var o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(r,n,i,o):this.resourceStore.getResource(r,n,i,o)}}],[{key:"hasDefaultValue",value:function(r){var n="defaultValue";for(var i in r)if(Object.prototype.hasOwnProperty.call(r,i)&&n===i.substring(0,n.length)&&r[i]!==void 0)return!0;return!1}}]),t}();function rs(e){return e.charAt(0).toUpperCase()+e.slice(1)}var M2=function(){function e(t){$t(this,e),this.options=t,this.whitelist=this.options.supportedLngs||!1,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Tt.create("languageUtils")}return Lt(e,[{key:"getScriptPartFromCode",value:function(t){if(!t||t.indexOf("-")<0)return null;var r=t.split("-");return r.length===2?null:(r.pop(),r[r.length-1].toLowerCase()==="x"?null:this.formatLanguageCode(r.join("-")))}},{key:"getLanguagePartFromCode",value:function(t){if(!t||t.indexOf("-")<0)return t;var r=t.split("-");return this.formatLanguageCode(r[0])}},{key:"formatLanguageCode",value:function(t){if(typeof t=="string"&&t.indexOf("-")>-1){var r=["hans","hant","latn","cyrl","cans","mong","arab"],n=t.split("-");return this.options.lowerCaseLng?n=n.map(function(i){return i.toLowerCase()}):n.length===2?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),r.indexOf(n[1].toLowerCase())>-1&&(n[1]=rs(n[1].toLowerCase()))):n.length===3&&(n[0]=n[0].toLowerCase(),n[1].length===2&&(n[1]=n[1].toUpperCase()),n[0]!=="sgn"&&n[2].length===2&&(n[2]=n[2].toUpperCase()),r.indexOf(n[1].toLowerCase())>-1&&(n[1]=rs(n[1].toLowerCase())),r.indexOf(n[2].toLowerCase())>-1&&(n[2]=rs(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}},{key:"isWhitelisted",value:function(t){return this.logger.deprecate("languageUtils.isWhitelisted",`function "isWhitelisted" will be renamed to "isSupportedCode" in the next major - please make sure to rename it's usage asap.`),this.isSupportedCode(t)}},{key:"isSupportedCode",value:function(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}},{key:"getBestMatchFromCodes",value:function(t){var r,n=this;return t?(t.forEach(function(i){if(!r){var o=n.formatLanguageCode(i);n.options.supportedLngs&&!n.isSupportedCode(o)||(r=o)}}),!r&&this.options.supportedLngs&&t.forEach(function(i){if(!r){var o=n.getLanguagePartFromCode(i);if(n.isSupportedCode(o))return r=o;r=n.options.supportedLngs.find(function(a){if(a.indexOf(o)===0)return a})}}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r):null}},{key:"getFallbackCodes",value:function(t,r){if(!t)return[];if(typeof t=="function"&&(t=t(r)),typeof t=="string"&&(t=[t]),Object.prototype.toString.apply(t)==="[object Array]")return t;if(!r)return t.default||[];var n=t[r];return n||(n=t[this.getScriptPartFromCode(r)]),n||(n=t[this.formatLanguageCode(r)]),n||(n=t[this.getLanguagePartFromCode(r)]),n||(n=t.default),n||[]}},{key:"toResolveHierarchy",value:function(t,r){var n=this,i=this.getFallbackCodes(r||this.options.fallbackLng||[],t),o=[],a=function(u){u&&(n.isSupportedCode(u)?o.push(u):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(u)))};return typeof t=="string"&&t.indexOf("-")>-1?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(t))):typeof t=="string"&&a(this.formatLanguageCode(t)),i.forEach(function(u){o.indexOf(u)<0&&a(n.formatLanguageCode(u))}),o}}]),e}(),I2=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],U2={1:function(e){return+(e>1)},2:function(e){return+(e!=1)},3:function(e){return 0},4:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},5:function(e){return e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},6:function(e){return e==1?0:e>=2&&e<=4?1:2},7:function(e){return e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},8:function(e){return e==1?0:e==2?1:e!=8&&e!=11?2:3},9:function(e){return+(e>=2)},10:function(e){return e==1?0:e==2?1:e<7?2:e<11?3:4},11:function(e){return e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3},12:function(e){return+(e%10!=1||e%100==11)},13:function(e){return+(e!==0)},14:function(e){return e==1?0:e==2?1:e==3?2:3},15:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2},16:function(e){return e%10==1&&e%100!=11?0:e!==0?1:2},17:function(e){return e==1||e%10==1&&e%100!=11?0:1},18:function(e){return e==0?0:e==1?1:2},19:function(e){return e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3},20:function(e){return e==1?0:e==0||e%100>0&&e%100<20?1:2},21:function(e){return e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0},22:function(e){return e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3}};function H2(){var e={};return I2.forEach(function(t){t.lngs.forEach(function(r){e[r]={numbers:t.nr,plurals:U2[t.fc]}})}),e}var z2=function(){function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};$t(this,e),this.languageUtils=t,this.options=r,this.logger=Tt.create("pluralResolver"),this.rules=H2()}return Lt(e,[{key:"addRule",value:function(t,r){this.rules[t]=r}},{key:"getRule",value:function(t){return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}},{key:"needsPlural",value:function(t){var r=this.getRule(t);return r&&r.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(t,r){return this.getSuffixes(t).map(function(n){return r+n})}},{key:"getSuffixes",value:function(t){var r=this,n=this.getRule(t);return n?n.numbers.map(function(i){return r.getSuffix(t,i)}):[]}},{key:"getSuffix",value:function(t,r){var n=this,i=this.getRule(t);if(i){var o=i.noAbs?i.plurals(r):i.plurals(Math.abs(r)),a=i.numbers[o];this.options.simplifyPluralSuffix&&i.numbers.length===2&&i.numbers[0]===1&&(a===2?a="plural":a===1&&(a=""));var u=function(){return n.options.prepend&&a.toString()?n.options.prepend+a.toString():a.toString()};return this.options.compatibilityJSON==="v1"?a===1?"":typeof a=="number"?"_plural_".concat(a.toString()):u():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&i.numbers.length===2&&i.numbers[0]===1?u():this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString()}return this.logger.warn("no plural rule found for: ".concat(t)),""}}]),e}(),W2=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};$t(this,e),this.logger=Tt.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(r){return r},this.init(t)}return Lt(e,[{key:"init",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});var r=t.interpolation;this.escape=r.escape!==void 0?r.escape:$2,this.escapeValue=r.escapeValue===void 0||r.escapeValue,this.useRawValueToEscape=r.useRawValueToEscape!==void 0&&r.useRawValueToEscape,this.prefix=r.prefix?rn(r.prefix):r.prefixEscaped||"{{",this.suffix=r.suffix?rn(r.suffix):r.suffixEscaped||"}}",this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||",",this.unescapePrefix=r.unescapeSuffix?"":r.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":r.unescapeSuffix||"",this.nestingPrefix=r.nestingPrefix?rn(r.nestingPrefix):r.nestingPrefixEscaped||rn("$t("),this.nestingSuffix=r.nestingSuffix?rn(r.nestingSuffix):r.nestingSuffixEscaped||rn(")"),this.nestingOptionsSeparator=r.nestingOptionsSeparator?r.nestingOptionsSeparator:r.nestingOptionsSeparator||",",this.maxReplaces=r.maxReplaces?r.maxReplaces:1e3,this.alwaysFormat=r.alwaysFormat!==void 0&&r.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var t="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(t,"g");var r="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(r,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function(t,r,n,i){var o,a,u,s=this,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function f(g){return g.replace(/\$/g,"$$$$")}var c=function(g){if(g.indexOf(s.formatSeparator)<0){var v=zh(r,l,g);return s.alwaysFormat?s.format(v,void 0,n,Be({},i,r,{interpolationkey:g})):v}var D=g.split(s.formatSeparator),C=D.shift().trim(),b=D.join(s.formatSeparator).trim();return s.format(zh(r,l,C),b,n,Be({},i,r,{interpolationkey:C}))};this.resetRegExp();var d=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,p=i&&i.interpolation&&i.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables,h=[{regex:this.regexpUnescape,safeValue:function(g){return f(g)}},{regex:this.regexp,safeValue:function(g){return s.escapeValue?f(s.escape(g)):f(g)}}];return h.forEach(function(g){for(u=0;o=g.regex.exec(t);){if((a=c(o[1].trim()))===void 0)if(typeof d=="function"){var v=d(t,o,i);a=typeof v=="string"?v:""}else{if(p){a=o[0];continue}s.logger.warn("missed to pass in variable ".concat(o[1]," for interpolating ").concat(t)),a=""}else typeof a=="string"||s.useRawValueToEscape||(a=Uh(a));var D=g.safeValue(a);if(t=t.replace(o[0],D),p?(g.regex.lastIndex+=D.length,g.regex.lastIndex-=o[0].length):g.regex.lastIndex=0,++u>=s.maxReplaces)break}}),t}},{key:"nest",value:function(t,r){var n,i,o=this,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},u=Be({},a);function s(d,p){var h=this.nestingOptionsSeparator;if(d.indexOf(h)<0)return d;var g=d.split(new RegExp("".concat(h,"[ ]*{"))),v="{".concat(g[1]);d=g[0],v=(v=this.interpolate(v,u)).replace(/'/g,'"');try{u=JSON.parse(v),p&&(u=Be({},p,u))}catch(D){return this.logger.warn("failed parsing options string in nesting for key ".concat(d),D),"".concat(d).concat(h).concat(v)}return delete u.defaultValue,d}for(u.applyPostProcessor=!1,delete u.defaultValue;n=this.nestingRegexp.exec(t);){var l=[],f=!1;if(n[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(n[1])){var c=n[1].split(this.formatSeparator).map(function(d){return d.trim()});n[1]=c.shift(),l=c,f=!0}if((i=r(s.call(this,n[1].trim(),u),u))&&n[0]===t&&typeof i!="string")return i;typeof i!="string"&&(i=Uh(i)),i||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(t)),i=""),f&&(i=l.reduce(function(d,p){return o.format(d,p,a.lng,Be({},a,{interpolationkey:n[1].trim()}))},i.trim())),t=t.replace(n[0],i),this.regexp.lastIndex=0}return t}}]),e}(),q2=function(e){function t(r,n,i){var o,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return $t(this,t),o=$i(this,Bn(t).call(this)),Ma&&Yt.call(Lr(o)),o.backend=r,o.store=n,o.services=i,o.languageUtils=i.languageUtils,o.options=a,o.logger=Tt.create("backendConnector"),o.state={},o.queue=[],o.backend&&o.backend.init&&o.backend.init(i,a.backend,a),o}return La(t,Yt),Lt(t,[{key:"queueLoad",value:function(r,n,i,o){var a=this,u=[],s=[],l=[],f=[];return r.forEach(function(c){var d=!0;n.forEach(function(p){var h="".concat(c,"|").concat(p);!i.reload&&a.store.hasResourceBundle(c,p)?a.state[h]=2:a.state[h]<0||(a.state[h]===1?s.indexOf(h)<0&&s.push(h):(a.state[h]=1,d=!1,s.indexOf(h)<0&&s.push(h),u.indexOf(h)<0&&u.push(h),f.indexOf(p)<0&&f.push(p)))}),d||l.push(c)}),(u.length||s.length)&&this.queue.push({pending:s,loaded:{},errors:[],callback:o}),{toLoad:u,pending:s,toLoadLanguages:l,toLoadNamespaces:f}}},{key:"loaded",value:function(r,n,i){var o=r.split("|"),a=o[0],u=o[1];n&&this.emit("failedLoading",a,u,n),i&&this.store.addResourceBundle(a,u,i),this.state[r]=n?-1:2;var s={};this.queue.forEach(function(l){(function(f,c,d,p){var h=cc(f,c,Object),g=h.obj,v=h.k;g[v]=g[v]||[],g[v].push(d)})(l.loaded,[a],u),function(f,c){for(var d=f.indexOf(c);d!==-1;)f.splice(d,1),d=f.indexOf(c)}(l.pending,r),n&&l.errors.push(n),l.pending.length!==0||l.done||(Object.keys(l.loaded).forEach(function(f){s[f]||(s[f]=[]),l.loaded[f].length&&l.loaded[f].forEach(function(c){s[f].indexOf(c)<0&&s[f].push(c)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(function(l){return!l.done})}},{key:"read",value:function(r,n,i){var o=this,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,u=arguments.length>4&&arguments[4]!==void 0?arguments[4]:350,s=arguments.length>5?arguments[5]:void 0;return r.length?this.backend[i](r,n,function(l,f){l&&f&&a<5?setTimeout(function(){o.read.call(o,r,n,i,a+1,2*u,s)},u):s(l,f)}):s(null,{})}},{key:"prepareLoading",value:function(r,n){var i=this,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),a&&a();typeof r=="string"&&(r=this.languageUtils.toResolveHierarchy(r)),typeof n=="string"&&(n=[n]);var u=this.queueLoad(r,n,o,a);if(!u.toLoad.length)return u.pending.length||a(),null;u.toLoad.forEach(function(s){i.loadOne(s)})}},{key:"load",value:function(r,n,i){this.prepareLoading(r,n,{},i)}},{key:"reload",value:function(r,n,i){this.prepareLoading(r,n,{reload:!0},i)}},{key:"loadOne",value:function(r){var n=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",o=r.split("|"),a=o[0],u=o[1];this.read(a,u,"read",void 0,void 0,function(s,l){s&&n.logger.warn("".concat(i,"loading namespace ").concat(u," for language ").concat(a," failed"),s),!s&&l&&n.logger.log("".concat(i,"loaded namespace ").concat(u," for language ").concat(a),l),n.loaded(r,s,l)})}},{key:"saveMissing",value:function(r,n,i,o,a){var u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)?this.logger.warn('did not save key "'.concat(i,'" as the namespace "').concat(n,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):i!=null&&i!==""&&(this.backend&&this.backend.create&&this.backend.create(r,n,i,o,null,Be({},u,{isUpdate:a})),r&&r[0]&&this.store.addResource(r[0],n,i,o))}}]),t}();function V2(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if(Gt(e[1])==="object"&&(t=e[1]),typeof e[1]=="string"&&(t.defaultValue=e[1]),typeof e[2]=="string"&&(t.tDescription=e[2]),Gt(e[2])==="object"||Gt(e[3])==="object"){var r=e[3]||e[2];Object.keys(r).forEach(function(n){t[n]=r[n]})}return t},interpolation:{escapeValue:!0,format:function(e,t,r,n){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!1}}}function Vh(e){return typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&(e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e.supportedLngs=e.whitelist),e.nonExplicitWhitelist&&(e.nonExplicitSupportedLngs=e.nonExplicitWhitelist),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function wo(){}var K2=function(e){function t(){var r,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;if($t(this,t),r=$i(this,Bn(t).call(this)),Ma&&Yt.call(Lr(r)),r.options=Vh(n),r.services={},r.logger=Tt,r.modules={external:[]},i&&!r.isInitialized&&!n.isClone){if(!r.options.initImmediate)return r.init(n,i),$i(r,Lr(r));setTimeout(function(){r.init(n,i)},0)}return r}return La(t,Yt),Lt(t,[{key:"init",value:function(){var r=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;function o(p){return p?typeof p=="function"?new p:p:null}if(typeof n=="function"&&(i=n,n={}),n.whitelist&&!n.supportedLngs&&this.logger.deprecate("whitelist",'option "whitelist" will be renamed to "supportedLngs" in the next major - please make sure to rename this option asap.'),n.nonExplicitWhitelist&&!n.nonExplicitSupportedLngs&&this.logger.deprecate("whitelist",'options "nonExplicitWhitelist" will be renamed to "nonExplicitSupportedLngs" in the next major - please make sure to rename this option asap.'),this.options=Be({},V2(),this.options,Vh(n)),this.format=this.options.interpolation.format,i||(i=wo),!this.options.isClone){this.modules.logger?Tt.init(o(this.modules.logger),this.options):Tt.init(null,this.options);var a=new M2(this.options);this.store=new L2(this.options.resources,this.options);var u=this.services;u.logger=Tt,u.resourceStore=this.store,u.languageUtils=a,u.pluralResolver=new z2(a,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),u.interpolator=new W2(this.options),u.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},u.backendConnector=new q2(o(this.modules.backend),u.resourceStore,u,this.options),u.backendConnector.on("*",function(p){for(var h=arguments.length,g=new Array(h>1?h-1:0),v=1;v<h;v++)g[v-1]=arguments[v];r.emit.apply(r,[p].concat(g))}),this.modules.languageDetector&&(u.languageDetector=o(this.modules.languageDetector),u.languageDetector.init(u,this.options.detection,this.options)),this.modules.i18nFormat&&(u.i18nFormat=o(this.modules.i18nFormat),u.i18nFormat.init&&u.i18nFormat.init(this)),this.translator=new qh(this.services,this.options),this.translator.on("*",function(p){for(var h=arguments.length,g=new Array(h>1?h-1:0),v=1;v<h;v++)g[v-1]=arguments[v];r.emit.apply(r,[p].concat(g))}),this.modules.external.forEach(function(p){p.init&&p.init(r)})}if(this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var s=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);s.length>0&&s[0]!=="dev"&&(this.options.lng=s[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");var l=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];l.forEach(function(p){r[p]=function(){var h;return(h=r.store)[p].apply(h,arguments)}});var f=["addResource","addResources","addResourceBundle","removeResourceBundle"];f.forEach(function(p){r[p]=function(){var h;return(h=r.store)[p].apply(h,arguments),r}});var c=fi(),d=function(){var p=function(h,g){r.isInitialized&&!r.initializedStoreOnce&&r.logger.warn("init: i18next is already initialized. You should call init just once!"),r.isInitialized=!0,r.options.isClone||r.logger.log("initialized",r.options),r.emit("initialized",r.options),c.resolve(g),i(h,g)};if(r.languages&&r.options.compatibilityAPI!=="v1"&&!r.isInitialized)return p(null,r.t.bind(r));r.changeLanguage(r.options.lng,p)};return this.options.resources||!this.options.initImmediate?d():setTimeout(d,0),c}},{key:"loadResources",value:function(r){var n=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:wo,o=i,a=typeof r=="string"?r:this.language;if(typeof r=="function"&&(o=r),!this.options.resources||this.options.partialBundledLanguages){if(a&&a.toLowerCase()==="cimode")return o();var u=[],s=function(f){f&&n.services.languageUtils.toResolveHierarchy(f).forEach(function(c){u.indexOf(c)<0&&u.push(c)})};if(a)s(a);else{var l=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);l.forEach(function(f){return s(f)})}this.options.preload&&this.options.preload.forEach(function(f){return s(f)}),this.services.backendConnector.load(u,this.options.ns,o)}else o(null)}},{key:"reloadResources",value:function(r,n,i){var o=fi();return r||(r=this.languages),n||(n=this.options.ns),i||(i=wo),this.services.backendConnector.reload(r,n,function(a){o.resolve(),i(a)}),o}},{key:"use",value:function(r){if(!r)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!r.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return r.type==="backend"&&(this.modules.backend=r),(r.type==="logger"||r.log&&r.warn&&r.error)&&(this.modules.logger=r),r.type==="languageDetector"&&(this.modules.languageDetector=r),r.type==="i18nFormat"&&(this.modules.i18nFormat=r),r.type==="postProcessor"&&Sv.addPostProcessor(r),r.type==="3rdParty"&&this.modules.external.push(r),this}},{key:"changeLanguage",value:function(r,n){var i=this;this.isLanguageChangingTo=r;var o=fi();this.emit("languageChanging",r);var a=function(u){r||u||!i.services.languageDetector||(u=[]);var s=typeof u=="string"?u:i.services.languageUtils.getBestMatchFromCodes(u);s&&(i.language||(i.language=s,i.languages=i.services.languageUtils.toResolveHierarchy(s)),i.translator.language||i.translator.changeLanguage(s),i.services.languageDetector&&i.services.languageDetector.cacheUserLanguage(s)),i.loadResources(s,function(l){(function(f,c){c?(i.language=c,i.languages=i.services.languageUtils.toResolveHierarchy(c),i.translator.changeLanguage(c),i.isLanguageChangingTo=void 0,i.emit("languageChanged",c),i.logger.log("languageChanged",c)):i.isLanguageChangingTo=void 0,o.resolve(function(){return i.t.apply(i,arguments)}),n&&n(f,function(){return i.t.apply(i,arguments)})})(l,s)})};return r||!this.services.languageDetector||this.services.languageDetector.async?!r&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(a):a(r):a(this.services.languageDetector.detect()),o}},{key:"getFixedT",value:function(r,n,i){var o=this,a=function u(s,l){var f;if(Gt(l)!=="object"){for(var c=arguments.length,d=new Array(c>2?c-2:0),p=2;p<c;p++)d[p-2]=arguments[p];f=o.options.overloadTranslationOptionHandler([s,l].concat(d))}else f=Be({},l);f.lng=f.lng||u.lng,f.lngs=f.lngs||u.lngs,f.ns=f.ns||u.ns;var h=o.options.keySeparator||".",g=i?"".concat(i).concat(h).concat(s):s;return o.t(g,f)};return typeof r=="string"?a.lng=r:a.lngs=r,a.ns=n,a.keyPrefix=i,a}},{key:"t",value:function(){var r;return this.translator&&(r=this.translator).translate.apply(r,arguments)}},{key:"exists",value:function(){var r;return this.translator&&(r=this.translator).exists.apply(r,arguments)}},{key:"setDefaultNamespace",value:function(r){this.options.defaultNS=r}},{key:"hasLoadedNamespace",value:function(r){var n=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var o=this.languages[0],a=!!this.options&&this.options.fallbackLng,u=this.languages[this.languages.length-1];if(o.toLowerCase()==="cimode")return!0;var s=function(f,c){var d=n.services.backendConnector.state["".concat(f,"|").concat(c)];return d===-1||d===2};if(i.precheck){var l=i.precheck(this,s);if(l!==void 0)return l}return!!this.hasResourceBundle(o,r)||!this.services.backendConnector.backend||!(!s(o,r)||a&&!s(u,r))}},{key:"loadNamespaces",value:function(r,n){var i=this,o=fi();return this.options.ns?(typeof r=="string"&&(r=[r]),r.forEach(function(a){i.options.ns.indexOf(a)<0&&i.options.ns.push(a)}),this.loadResources(function(a){o.resolve(),n&&n(a)}),o):(n&&n(),Promise.resolve())}},{key:"loadLanguages",value:function(r,n){var i=fi();typeof r=="string"&&(r=[r]);var o=this.options.preload||[],a=r.filter(function(u){return o.indexOf(u)<0});return a.length?(this.options.preload=o.concat(a),this.loadResources(function(u){i.resolve(),n&&n(u)}),i):(n&&n(),Promise.resolve())}},{key:"dir",value:function(r){return r||(r=this.languages&&this.languages.length>0?this.languages[0]:this.language),r?["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(r))>=0?"rtl":"ltr":"rtl"}},{key:"createInstance",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new t(r,n)}},{key:"cloneInstance",value:function(){var r=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:wo,o=Be({},this.options,n,{isClone:!0}),a=new t(o),u=["store","services","language"];return u.forEach(function(s){a[s]=r[s]}),a.services=Be({},this.services),a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a.translator=new qh(a.services,a.options),a.translator.on("*",function(s){for(var l=arguments.length,f=new Array(l>1?l-1:0),c=1;c<l;c++)f[c-1]=arguments[c];a.emit.apply(a,[s].concat(f))}),a.init(o,i),a.translator.options=a.options,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages}}}]),t}(),tl=new K2;tl.init({lng:"zh-CN",resources:{}});tl.t.bind(tl);function G2(e,t,r){const n=j(e);t=t.filter(u=>!!(W.isText(u)||r.isInline(u))),t.length===0&&(t=[{text:n.text().replace(/\s+/gm," ")}]);const i=parseInt(n.attr("colSpan")||"1"),o=parseInt(n.attr("rowSpan")||"1"),a=n.attr("width")||Xh(n,"width")||"auto";return{type:"table-cell",isHeader:Jh(n)==="th",colSpan:i,rowSpan:o,width:a,attrs:{style:e.getAttribute("style")||"",class:e.getAttribute("class")||"",align:e.getAttribute("align")||"",valign:e.getAttribute("valign")||""},children:t}}const J2={selector:"td:not([data-w-e-type]),th:not([data-w-e-type])",parseElemHtml:G2};function X2(e,t,r){return{type:"table-row",attrs:{style:e.getAttribute("style")||"",class:e.getAttribute("class")||"",align:e.getAttribute("align")||"",valign:e.getAttribute("valign")||""},children:t.filter(n=>I.getNodeType(n)==="table-cell")}}const Y2={selector:"tr:not([data-w-e-type])",parseElemHtml:X2};function Z2(e,t,r){const n=j(e);let i="auto";return Xh(n,"width")==="100%"&&(i="100%"),n.attr("width")==="100%"&&(i="100%"),{type:"table",width:i,attrs:{style:e.getAttribute("style")||"",class:e.getAttribute("class")||"",cellSpacing:e.getAttribute("cellspacing")||"",cellPadding:e.getAttribute("cellpadding")||"",border:e.getAttribute("border")||"",align:e.getAttribute("align")||""},children:t.filter(o=>I.getNodeType(o)==="table-row")}}const Q2={selector:"table:not([data-w-e-type])",parseElemHtml:Z2};function ex(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<")}function Le(e,t){return t?` ${e}="${ex(t)}"`:""}function tx(e,t){const{width:r="auto",attrs:n={}}=e,i=n.style||(r!=="auto"?`width: ${r};`:"");return`<table${Le("style",i)}${Le("class",n.class)}${Le("cellspacing",n.cellSpacing)}${Le("cellpadding",n.cellPadding)}${Le("border",n.border)}${Le("align",n.align)}><tbody>${t}</tbody></table>`}function rx(e,t){const{attrs:r={}}=e;return`<tr${Le("style",r.style)}${Le("class",r.class)}${Le("align",r.align)}${Le("valign",r.valign)}>${t}</tr>`}function nx(e,t){const{colSpan:r=1,rowSpan:n=1,isHeader:i=!1,width:o="auto",attrs:a={}}=e,u=i?"th":"td",s=o!=="auto"?Le("width",o):"";return`<${u} colspan="${r}" rowspan="${n}"${s}${Le("style",a.style)}${Le("class",a.class)}${Le("align",a.align)}${Le("valign",a.valign)}>${t}</${u}>`}const ix={type:"table",elemToHtml:tx},ox={type:"table-row",elemToHtml:rx},ax={type:"table-cell",elemToHtml:nx};function ux(e){return e.tagName==="SPAN"&&!!e.closest("table")}function sx(e,t){if(!W.isText(t)||!ux(e))return t;const r=e.getAttribute("class")||"",n=e.getAttribute("style")||"";return!r&&!n?t:{...t,...r?{tableInlineClass:r}:{},...n?{tableInlineStyle:n}:{}}}function lx(e,t){if(!W.isText(e))return t;const{tableInlineClass:r="",tableInlineStyle:n=""}=e;if(!r&&!n)return t;const i=r.replace(/&/g,"&").replace(/"/g,"""),o=n.replace(/&/g,"&").replace(/"/g,"""),a=i?` class="${i}"`:"",u=o?` style="${o}"`:"";return`<span${a}${u}>${t}</span>`}function cx(e,t){if(!W.isText(e))return t;const{tableInlineClass:r="",tableInlineStyle:n=""}=e;return!r&&!n?t:Ko("span",{attrs:{class:r,style:n}},[t])}const Kh="__officialBlockTableExtensionsRegistered__",fx=pe.defineComponent({__name:"index",props:{name:{default:""},modelValue:{default:""},placeholder:{default:"Please input content..."},height:{default:"400px"},mode:{default:"default"},disabled:{type:Boolean,default:!1},maxLength:{default:1e4},excludeKeys:{default:()=>[]},includeKeys:{default:()=>[]}},emits:["update:modelValue","change","focus","blur","created","upload-image","upload-video"],setup(e,{expose:t,emit:r}){const n=globalThis;n[Kh]||(Ze.Boot.registerPreParseHtml(J0),Ze.Boot.registerParseElemHtml(J2),Ze.Boot.registerParseElemHtml(Y2),Ze.Boot.registerParseElemHtml(Q2),Ze.Boot.registerElemToHtml(ax),Ze.Boot.registerElemToHtml(ox),Ze.Boot.registerElemToHtml(ix),Ze.Boot.registerParseStyleHtml(sx),Ze.Boot.registerRenderStyle(cx),Ze.Boot.registerStyleToHtml(lx),n[Kh]=!0);const i=e,o=r,a=pe.shallowRef(),u=pe.ref(""),s=pe.computed(()=>typeof i.height=="number"?`${i.height}px`:i.height),l=pe.inject("handleUpload",()=>{}),f=pe.inject("fileUrl",null),c=pe.inject("chooseName",null),d=pe.ref(""),p=pe.ref(null),h=S=>{if(!l){console.warn("Upload: handleUpload function not provided by ancestor");return}if(d.value=S,a.value)try{const G=a.value.selection;G&&(p.value={anchor:{path:[...G.anchor.path],offset:G.anchor.offset},focus:{path:[...G.focus.path],offset:G.focus.offset}})}catch(G){console.warn("保存光标位置失败:",G)}const z=i.name+"_"+S;l(!0,z)};pe.watch(()=>i.name,()=>{f.value=null},{deep:!0,immediate:!0}),pe.watch(()=>[f==null?void 0:f.value],([S])=>{const z=i.name+"_"+d.value;!S||!c.value||c.value!==z||a.value&&pe.nextTick(()=>{var G,X;if(a.value){try{if(a.value.focus(),p.value)try{a.value.select(p.value)}catch(te){console.warn("恢复光标位置失败,使用默认位置:",te)}}catch(te){console.warn("聚焦编辑器失败:",te)}if(d.value==="img"){const re=`<img src="${S}" alt="图片" style="max-width: 100%;">`;(G=a.value)==null||G.dangerouslyInsertHtml(re)}else{const re=`<video src="${S}" controls style="max-width: 100%;"></video>`;(X=a.value)==null||X.dangerouslyInsertHtml(re)}p.value=null,d.value=""}})},{immediate:!1});function g(S){return class{constructor(){ur(this,"title");ur(this,"tag");ur(this,"iconSvg");this.title="上传图片",this.tag="button",this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M959.877 128l0.123 0.123v767.775l-0.123 0.122H64.102l-0.122-0.122V128.123l0.122-0.123h895.775zM960 64H64C28.795 64 0 92.795 0 128v768c0 35.205 28.795 64 64 64h896c35.205 0 64-28.795 64-64V128c0-35.205-28.795-64-64-64zM832 288.01c0 53.023-42.988 96.01-96.01 96.01s-96.01-42.987-96.01-96.01S682.967 192 735.99 192 832 234.988 832 288.01zM896 832H128V704l224.01-384 256 320h64l224.01-192z"></path></svg>'}isActive(){return!1}getValue(){return""}isDisabled(){return!1}exec(){pe.nextTick(()=>{console.log("点击了自定义上传图片菜单"),S("img")})}}}function v(S){return class{constructor(){ur(this,"title");ur(this,"tag");ur(this,"iconSvg");this.title="上传视频",this.tag="button",this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M981.184 160.096C837.568 139.456 678.848 128 512 128S186.432 139.456 42.816 160.096C15.296 267.808 0 386.848 0 512s15.264 244.16 42.816 351.904C186.464 884.544 345.152 896 512 896s325.568-11.456 469.184-32.096C1008.704 756.192 1024 637.152 1024 512s-15.264-244.16-42.816-351.904zM384 704V320l320 192-320 192z"></path></svg>'}getValue(){return""}isActive(){return!1}isDisabled(){return!1}exec(){pe.nextTick(()=>{console.log("点击了自定义上传视频菜单"),S("video")})}}}const D={toolbarKeys:["headerSelect","bold","italic","through","underline","color","fontSize","lineHeight","delIndent","indent","divider","insertTable","justifyCenter","justifyJustify","justifyLeft","justifyRight","bulletedList","numberedList","undo","redo","clearStyle","codeBlock"]},C=["#0032A0","#FF0044","#FF8200","#001E60","#E3E3E6","#000000","#262626","#595959","#8C8C8C","#BFBFBF","#D9D9D9","#E8E8E8","#F5F5F5","#FFFFFF","#F5222D","#FA541C","#FA8C16","#FADB14","#52C41A","#13C2C2","#1890FF","#2F54EB","#722ED1","#EB2F96","#FFE8E6","#FFECE0","#FFEFD1","#FCFCCA","#E4F7D2","#D3F5F0","#D4EEFC","#DEE8FC","#EFE1FA","#FAE1EB","#FFA39E","#FFBB96","#FFD591","#FFFB8F","#B7EB8F","#87E8DE","#91D5FF","#ADC6FF","#D3ADF7","#FFADD2","#FF4D4F","#FF7A45","#FFA940","#FFEC3D","#73D13D","#36CFC9","#40A9FF","#597EF7","#9254DE","#F759AB","#CF1322","#D4380D","#D46B08","#D4B106","#389E0D","#08979C","#096DD9","#1D39C4","#531DAB","#C41D7F","#820014","#871400","#873800","#614700","#135200","#00474F","#003A8C","#061178","#22075E","#780650"],b={placeholder:i.placeholder,readOnly:i.disabled,maxLength:i.maxLength,MENU_CONF:{color:{colors:C},bgColor:{colors:C}},hoverbarKeys:{text:{menuKeys:["headerSelect","insertLink","bold","italic","underline","through","clearStyle"]}}},B=Math.random().toString(36).substring(2,9),E=`CustomImageMenu_${B}`,x=`CustomVideoMenu_${B}`,_=S=>{a.value=S;try{const z=g(h),G=v(h),X={key:E,factory(){return new z}},te={key:x,factory(){return new G}};Ze.Boot.registerMenu(X),Ze.Boot.registerMenu(te)}catch(z){console.warn("菜单注册失败:",z)}D.insertKeys={index:0,keys:[E,x]},o("created",S)};pe.onBeforeUnmount(()=>{const S=a.value;S!=null&&S.destroy()}),pe.watch(()=>i.modelValue,S=>{S!==u.value&&(u.value=S||"")},{immediate:!0});const T=S=>{o("update:modelValue",u.value),o("change",S)},k=()=>{a.value=void 0},L=S=>{o("focus",S)},R=S=>{o("blur",S)};return t({editor:a,getHtml:()=>u.value,getText:()=>{var S;return((S=a.value)==null?void 0:S.getText())||""},isEmpty:()=>{var S;return((S=a.value)==null?void 0:S.isEmpty())||!0},clear:()=>{var S;return(S=a.value)==null?void 0:S.clear()},focus:()=>{var S;return(S=a.value)==null?void 0:S.focus()},blur:()=>{var S;return(S=a.value)==null?void 0:S.blur()},disable:()=>{var S;return(S=a.value)==null?void 0:S.disable()},enable:()=>{var S;return(S=a.value)==null?void 0:S.enable()}}),(S,z)=>(pe.openBlock(),pe.createElementBlock("div",{class:pe.normalizeClass(["rich-text-editor",S.class])},[pe.createVNode(pe.unref(Ac.Toolbar),{class:"editor-toolbar",editor:a.value,defaultConfig:D,mode:e.mode},null,8,["editor","mode"]),pe.createVNode(pe.unref(Ac.Editor),{class:"editor-content",style:pe.normalizeStyle({height:s.value}),modelValue:u.value,"onUpdate:modelValue":z[0]||(z[0]=G=>u.value=G),defaultConfig:b,mode:e.mode,onOnCreated:_,onOnChange:T,onOnDestroyed:k,onOnFocus:L,onOnBlur:R},null,8,["style","modelValue","mode"])],2))}}),dx=fe._(fx,[["__scopeId","data-v-d9fa87db"]]);exports.default=dx;
|