xiaowang/kirby/panel/dist/js/vendor.js
2022-03-22 15:39:39 +01:00

19 lines
387 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*!
* Vue.js v2.6.14
* (c) 2014-2021 Evan You
* Released under the MIT License.
*/
var t=Object.freeze({});function e(t){return null==t}function n(t){return null!=t}function r(t){return!0===t}function o(t){return"string"==typeof t||"number"==typeof t||"symbol"==typeof t||"boolean"==typeof t}function i(t){return null!==t&&"object"==typeof t}var a=Object.prototype.toString;function s(t){return"[object Object]"===a.call(t)}function c(t){var e=parseFloat(String(t));return e>=0&&Math.floor(e)===e&&isFinite(t)}function l(t){return n(t)&&"function"==typeof t.then&&"function"==typeof t.catch}function u(t){return null==t?"":Array.isArray(t)||s(t)&&t.toString===a?JSON.stringify(t,null,2):String(t)}function f(t){var e=parseFloat(t);return isNaN(e)?t:e}function p(t,e){for(var n=Object.create(null),r=t.split(","),o=0;o<r.length;o++)n[r[o]]=!0;return e?function(t){return n[t.toLowerCase()]}:function(t){return n[t]}}var d=p("slot,component",!0),h=p("key,ref,slot,slot-scope,is");function v(t,e){if(t.length){var n=t.indexOf(e);if(n>-1)return t.splice(n,1)}}var m=Object.prototype.hasOwnProperty;function g(t,e){return m.call(t,e)}function y(t){var e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}var b=/-(\w)/g,w=y((function(t){return t.replace(b,(function(t,e){return e?e.toUpperCase():""}))})),x=y((function(t){return t.charAt(0).toUpperCase()+t.slice(1)})),S=/\B([A-Z])/g,k=y((function(t){return t.replace(S,"-$1").toLowerCase()}));var _=Function.prototype.bind?function(t,e){return t.bind(e)}:function(t,e){function n(n){var r=arguments.length;return r?r>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n};function O(t,e){e=e||0;for(var n=t.length-e,r=new Array(n);n--;)r[n]=t[n+e];return r}function C(t,e){for(var n in e)t[n]=e[n];return t}function M(t){for(var e={},n=0;n<t.length;n++)t[n]&&C(e,t[n]);return e}function D(t,e,n){}var T=function(t,e,n){return!1},$=function(t){return t};function A(t,e){if(t===e)return!0;var n=i(t),r=i(e);if(!n||!r)return!n&&!r&&String(t)===String(e);try{var o=Array.isArray(t),a=Array.isArray(e);if(o&&a)return t.length===e.length&&t.every((function(t,n){return A(t,e[n])}));if(t instanceof Date&&e instanceof Date)return t.getTime()===e.getTime();if(o||a)return!1;var s=Object.keys(t),c=Object.keys(e);return s.length===c.length&&s.every((function(n){return A(t[n],e[n])}))}catch(l){return!1}}function E(t,e){for(var n=0;n<t.length;n++)if(A(t[n],e))return n;return-1}function N(t){var e=!1;return function(){e||(e=!0,t.apply(this,arguments))}}var P=["component","directive","filter"],I=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated","errorCaptured","serverPrefetch"],j={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!1,devtools:!1,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:T,isReservedAttr:T,isUnknownElement:T,getTagNamespace:D,parsePlatformTagName:$,mustUseProp:T,async:!0,_lifecycleHooks:I},R=/a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/;function z(t){var e=(t+"").charCodeAt(0);return 36===e||95===e}function F(t,e,n,r){Object.defineProperty(t,e,{value:n,enumerable:!!r,writable:!0,configurable:!0})}var L=new RegExp("[^"+R.source+".$_\\d]");var B="__proto__"in{},V="undefined"!=typeof window,W="undefined"!=typeof WXEnvironment&&!!WXEnvironment.platform,q=W&&WXEnvironment.platform.toLowerCase(),H=V&&window.navigator.userAgent.toLowerCase(),J=H&&/msie|trident/.test(H),K=H&&H.indexOf("msie 9.0")>0,Y=H&&H.indexOf("edge/")>0;H&&H.indexOf("android");var U=H&&/iphone|ipad|ipod|ios/.test(H)||"ios"===q;H&&/chrome\/\d+/.test(H),H&&/phantomjs/.test(H);var X,G=H&&H.match(/firefox\/(\d+)/),Z={}.watch,Q=!1;if(V)try{var tt={};Object.defineProperty(tt,"passive",{get:function(){Q=!0}}),window.addEventListener("test-passive",null,tt)}catch(My){}var et=function(){return void 0===X&&(X=!V&&!W&&"undefined"!=typeof global&&(global.process&&"server"===global.process.env.VUE_ENV)),X},nt=V&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function rt(t){return"function"==typeof t&&/native code/.test(t.toString())}var ot,it="undefined"!=typeof Symbol&&rt(Symbol)&&"undefined"!=typeof Reflect&&rt(Reflect.ownKeys);ot="undefined"!=typeof Set&&rt(Set)?Set:function(){function t(){this.set=Object.create(null)}return t.prototype.has=function(t){return!0===this.set[t]},t.prototype.add=function(t){this.set[t]=!0},t.prototype.clear=function(){this.set=Object.create(null)},t}();var at=D,st=0,ct=function(){this.id=st++,this.subs=[]};ct.prototype.addSub=function(t){this.subs.push(t)},ct.prototype.removeSub=function(t){v(this.subs,t)},ct.prototype.depend=function(){ct.target&&ct.target.addDep(this)},ct.prototype.notify=function(){for(var t=this.subs.slice(),e=0,n=t.length;e<n;e++)t[e].update()},ct.target=null;var lt=[];function ut(t){lt.push(t),ct.target=t}function ft(){lt.pop(),ct.target=lt[lt.length-1]}var pt=function(t,e,n,r,o,i,a,s){this.tag=t,this.data=e,this.children=n,this.text=r,this.elm=o,this.ns=void 0,this.context=i,this.fnContext=void 0,this.fnOptions=void 0,this.fnScopeId=void 0,this.key=e&&e.key,this.componentOptions=a,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1,this.asyncFactory=s,this.asyncMeta=void 0,this.isAsyncPlaceholder=!1},dt={child:{configurable:!0}};dt.child.get=function(){return this.componentInstance},Object.defineProperties(pt.prototype,dt);var ht=function(t){void 0===t&&(t="");var e=new pt;return e.text=t,e.isComment=!0,e};function vt(t){return new pt(void 0,void 0,void 0,String(t))}function mt(t){var e=new pt(t.tag,t.data,t.children&&t.children.slice(),t.text,t.elm,t.context,t.componentOptions,t.asyncFactory);return e.ns=t.ns,e.isStatic=t.isStatic,e.key=t.key,e.isComment=t.isComment,e.fnContext=t.fnContext,e.fnOptions=t.fnOptions,e.fnScopeId=t.fnScopeId,e.asyncMeta=t.asyncMeta,e.isCloned=!0,e}var gt=Array.prototype,yt=Object.create(gt);["push","pop","shift","unshift","splice","sort","reverse"].forEach((function(t){var e=gt[t];F(yt,t,(function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];var o,i=e.apply(this,n),a=this.__ob__;switch(t){case"push":case"unshift":o=n;break;case"splice":o=n.slice(2)}return o&&a.observeArray(o),a.dep.notify(),i}))}));var bt=Object.getOwnPropertyNames(yt),wt=!0;function xt(t){wt=t}var St=function(t){var e;this.value=t,this.dep=new ct,this.vmCount=0,F(t,"__ob__",this),Array.isArray(t)?(B?(e=yt,t.__proto__=e):function(t,e,n){for(var r=0,o=n.length;r<o;r++){var i=n[r];F(t,i,e[i])}}(t,yt,bt),this.observeArray(t)):this.walk(t)};function kt(t,e){var n;if(i(t)&&!(t instanceof pt))return g(t,"__ob__")&&t.__ob__ instanceof St?n=t.__ob__:wt&&!et()&&(Array.isArray(t)||s(t))&&Object.isExtensible(t)&&!t._isVue&&(n=new St(t)),e&&n&&n.vmCount++,n}function _t(t,e,n,r,o){var i=new ct,a=Object.getOwnPropertyDescriptor(t,e);if(!a||!1!==a.configurable){var s=a&&a.get,c=a&&a.set;s&&!c||2!==arguments.length||(n=t[e]);var l=!o&&kt(n);Object.defineProperty(t,e,{enumerable:!0,configurable:!0,get:function(){var e=s?s.call(t):n;return ct.target&&(i.depend(),l&&(l.dep.depend(),Array.isArray(e)&&Mt(e))),e},set:function(e){var r=s?s.call(t):n;e===r||e!=e&&r!=r||s&&!c||(c?c.call(t,e):n=e,l=!o&&kt(e),i.notify())}})}}function Ot(t,e,n){if(Array.isArray(t)&&c(e))return t.length=Math.max(t.length,e),t.splice(e,1,n),n;if(e in t&&!(e in Object.prototype))return t[e]=n,n;var r=t.__ob__;return t._isVue||r&&r.vmCount?n:r?(_t(r.value,e,n),r.dep.notify(),n):(t[e]=n,n)}function Ct(t,e){if(Array.isArray(t)&&c(e))t.splice(e,1);else{var n=t.__ob__;t._isVue||n&&n.vmCount||g(t,e)&&(delete t[e],n&&n.dep.notify())}}function Mt(t){for(var e=void 0,n=0,r=t.length;n<r;n++)(e=t[n])&&e.__ob__&&e.__ob__.dep.depend(),Array.isArray(e)&&Mt(e)}St.prototype.walk=function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)_t(t,e[n])},St.prototype.observeArray=function(t){for(var e=0,n=t.length;e<n;e++)kt(t[e])};var Dt=j.optionMergeStrategies;function Tt(t,e){if(!e)return t;for(var n,r,o,i=it?Reflect.ownKeys(e):Object.keys(e),a=0;a<i.length;a++)"__ob__"!==(n=i[a])&&(r=t[n],o=e[n],g(t,n)?r!==o&&s(r)&&s(o)&&Tt(r,o):Ot(t,n,o));return t}function $t(t,e,n){return n?function(){var r="function"==typeof e?e.call(n,n):e,o="function"==typeof t?t.call(n,n):t;return r?Tt(r,o):o}:e?t?function(){return Tt("function"==typeof e?e.call(this,this):e,"function"==typeof t?t.call(this,this):t)}:e:t}function At(t,e){var n=e?t?t.concat(e):Array.isArray(e)?e:[e]:t;return n?function(t){for(var e=[],n=0;n<t.length;n++)-1===e.indexOf(t[n])&&e.push(t[n]);return e}(n):n}function Et(t,e,n,r){var o=Object.create(t||null);return e?C(o,e):o}Dt.data=function(t,e,n){return n?$t(t,e,n):e&&"function"!=typeof e?t:$t(t,e)},I.forEach((function(t){Dt[t]=At})),P.forEach((function(t){Dt[t+"s"]=Et})),Dt.watch=function(t,e,n,r){if(t===Z&&(t=void 0),e===Z&&(e=void 0),!e)return Object.create(t||null);if(!t)return e;var o={};for(var i in C(o,t),e){var a=o[i],s=e[i];a&&!Array.isArray(a)&&(a=[a]),o[i]=a?a.concat(s):Array.isArray(s)?s:[s]}return o},Dt.props=Dt.methods=Dt.inject=Dt.computed=function(t,e,n,r){if(!t)return e;var o=Object.create(null);return C(o,t),e&&C(o,e),o},Dt.provide=$t;var Nt=function(t,e){return void 0===e?t:e};function Pt(t,e,n){if("function"==typeof e&&(e=e.options),function(t,e){var n=t.props;if(n){var r,o,i={};if(Array.isArray(n))for(r=n.length;r--;)"string"==typeof(o=n[r])&&(i[w(o)]={type:null});else if(s(n))for(var a in n)o=n[a],i[w(a)]=s(o)?o:{type:o};t.props=i}}(e),function(t,e){var n=t.inject;if(n){var r=t.inject={};if(Array.isArray(n))for(var o=0;o<n.length;o++)r[n[o]]={from:n[o]};else if(s(n))for(var i in n){var a=n[i];r[i]=s(a)?C({from:i},a):{from:a}}}}(e),function(t){var e=t.directives;if(e)for(var n in e){var r=e[n];"function"==typeof r&&(e[n]={bind:r,update:r})}}(e),!e._base&&(e.extends&&(t=Pt(t,e.extends,n)),e.mixins))for(var r=0,o=e.mixins.length;r<o;r++)t=Pt(t,e.mixins[r],n);var i,a={};for(i in t)c(i);for(i in e)g(t,i)||c(i);function c(r){var o=Dt[r]||Nt;a[r]=o(t[r],e[r],n,r)}return a}function It(t,e,n,r){if("string"==typeof n){var o=t[e];if(g(o,n))return o[n];var i=w(n);if(g(o,i))return o[i];var a=x(i);return g(o,a)?o[a]:o[n]||o[i]||o[a]}}function jt(t,e,n,r){var o=e[t],i=!g(n,t),a=n[t],s=Lt(Boolean,o.type);if(s>-1)if(i&&!g(o,"default"))a=!1;else if(""===a||a===k(t)){var c=Lt(String,o.type);(c<0||s<c)&&(a=!0)}if(void 0===a){a=function(t,e,n){if(!g(e,"default"))return;var r=e.default;if(t&&t.$options.propsData&&void 0===t.$options.propsData[n]&&void 0!==t._props[n])return t._props[n];return"function"==typeof r&&"Function"!==zt(e.type)?r.call(t):r}(r,o,t);var l=wt;xt(!0),kt(a),xt(l)}return a}var Rt=/^\s*function (\w+)/;function zt(t){var e=t&&t.toString().match(Rt);return e?e[1]:""}function Ft(t,e){return zt(t)===zt(e)}function Lt(t,e){if(!Array.isArray(e))return Ft(e,t)?0:-1;for(var n=0,r=e.length;n<r;n++)if(Ft(e[n],t))return n;return-1}function Bt(t,e,n){ut();try{if(e)for(var r=e;r=r.$parent;){var o=r.$options.errorCaptured;if(o)for(var i=0;i<o.length;i++)try{if(!1===o[i].call(r,t,e,n))return}catch(My){Wt(My,r,"errorCaptured hook")}}Wt(t,e,n)}finally{ft()}}function Vt(t,e,n,r,o){var i;try{(i=n?t.apply(e,n):t.call(e))&&!i._isVue&&l(i)&&!i._handled&&(i.catch((function(t){return Bt(t,r,o+" (Promise/async)")})),i._handled=!0)}catch(My){Bt(My,r,o)}return i}function Wt(t,e,n){if(j.errorHandler)try{return j.errorHandler.call(null,t,e,n)}catch(My){My!==t&&qt(My)}qt(t)}function qt(t,e,n){if(!V&&!W||"undefined"==typeof console)throw t;console.error(t)}var Ht,Jt=!1,Kt=[],Yt=!1;function Ut(){Yt=!1;var t=Kt.slice(0);Kt.length=0;for(var e=0;e<t.length;e++)t[e]()}if("undefined"!=typeof Promise&&rt(Promise)){var Xt=Promise.resolve();Ht=function(){Xt.then(Ut),U&&setTimeout(D)},Jt=!0}else if(J||"undefined"==typeof MutationObserver||!rt(MutationObserver)&&"[object MutationObserverConstructor]"!==MutationObserver.toString())Ht="undefined"!=typeof setImmediate&&rt(setImmediate)?function(){setImmediate(Ut)}:function(){setTimeout(Ut,0)};else{var Gt=1,Zt=new MutationObserver(Ut),Qt=document.createTextNode(String(Gt));Zt.observe(Qt,{characterData:!0}),Ht=function(){Gt=(Gt+1)%2,Qt.data=String(Gt)},Jt=!0}function te(t,e){var n;if(Kt.push((function(){if(t)try{t.call(e)}catch(My){Bt(My,e,"nextTick")}else n&&n(e)})),Yt||(Yt=!0,Ht()),!t&&"undefined"!=typeof Promise)return new Promise((function(t){n=t}))}var ee=new ot;function ne(t){re(t,ee),ee.clear()}function re(t,e){var n,r,o=Array.isArray(t);if(!(!o&&!i(t)||Object.isFrozen(t)||t instanceof pt)){if(t.__ob__){var a=t.__ob__.dep.id;if(e.has(a))return;e.add(a)}if(o)for(n=t.length;n--;)re(t[n],e);else for(n=(r=Object.keys(t)).length;n--;)re(t[r[n]],e)}}var oe=y((function(t){var e="&"===t.charAt(0),n="~"===(t=e?t.slice(1):t).charAt(0),r="!"===(t=n?t.slice(1):t).charAt(0);return{name:t=r?t.slice(1):t,once:n,capture:r,passive:e}}));function ie(t,e){function n(){var t=arguments,r=n.fns;if(!Array.isArray(r))return Vt(r,null,arguments,e,"v-on handler");for(var o=r.slice(),i=0;i<o.length;i++)Vt(o[i],null,t,e,"v-on handler")}return n.fns=t,n}function ae(t,n,o,i,a,s){var c,l,u,f;for(c in t)l=t[c],u=n[c],f=oe(c),e(l)||(e(u)?(e(l.fns)&&(l=t[c]=ie(l,s)),r(f.once)&&(l=t[c]=a(f.name,l,f.capture)),o(f.name,l,f.capture,f.passive,f.params)):l!==u&&(u.fns=l,t[c]=u));for(c in n)e(t[c])&&i((f=oe(c)).name,n[c],f.capture)}function se(t,o,i){var a;t instanceof pt&&(t=t.data.hook||(t.data.hook={}));var s=t[o];function c(){i.apply(this,arguments),v(a.fns,c)}e(s)?a=ie([c]):n(s.fns)&&r(s.merged)?(a=s).fns.push(c):a=ie([s,c]),a.merged=!0,t[o]=a}function ce(t,e,r,o,i){if(n(e)){if(g(e,r))return t[r]=e[r],i||delete e[r],!0;if(g(e,o))return t[r]=e[o],i||delete e[o],!0}return!1}function le(t){return o(t)?[vt(t)]:Array.isArray(t)?fe(t):void 0}function ue(t){return n(t)&&n(t.text)&&!1===t.isComment}function fe(t,i){var a,s,c,l,u=[];for(a=0;a<t.length;a++)e(s=t[a])||"boolean"==typeof s||(l=u[c=u.length-1],Array.isArray(s)?s.length>0&&(ue((s=fe(s,(i||"")+"_"+a))[0])&&ue(l)&&(u[c]=vt(l.text+s[0].text),s.shift()),u.push.apply(u,s)):o(s)?ue(l)?u[c]=vt(l.text+s):""!==s&&u.push(vt(s)):ue(s)&&ue(l)?u[c]=vt(l.text+s.text):(r(t._isVList)&&n(s.tag)&&e(s.key)&&n(i)&&(s.key="__vlist"+i+"_"+a+"__"),u.push(s)));return u}function pe(t,e){if(t){for(var n=Object.create(null),r=it?Reflect.ownKeys(t):Object.keys(t),o=0;o<r.length;o++){var i=r[o];if("__ob__"!==i){for(var a=t[i].from,s=e;s;){if(s._provided&&g(s._provided,a)){n[i]=s._provided[a];break}s=s.$parent}if(!s&&"default"in t[i]){var c=t[i].default;n[i]="function"==typeof c?c.call(e):c}}}return n}}function de(t,e){if(!t||!t.length)return{};for(var n={},r=0,o=t.length;r<o;r++){var i=t[r],a=i.data;if(a&&a.attrs&&a.attrs.slot&&delete a.attrs.slot,i.context!==e&&i.fnContext!==e||!a||null==a.slot)(n.default||(n.default=[])).push(i);else{var s=a.slot,c=n[s]||(n[s]=[]);"template"===i.tag?c.push.apply(c,i.children||[]):c.push(i)}}for(var l in n)n[l].every(he)&&delete n[l];return n}function he(t){return t.isComment&&!t.asyncFactory||" "===t.text}function ve(t){return t.isComment&&t.asyncFactory}function me(e,n,r){var o,i=Object.keys(n).length>0,a=e?!!e.$stable:!i,s=e&&e.$key;if(e){if(e._normalized)return e._normalized;if(a&&r&&r!==t&&s===r.$key&&!i&&!r.$hasNormal)return r;for(var c in o={},e)e[c]&&"$"!==c[0]&&(o[c]=ge(n,c,e[c]))}else o={};for(var l in n)l in o||(o[l]=ye(n,l));return e&&Object.isExtensible(e)&&(e._normalized=o),F(o,"$stable",a),F(o,"$key",s),F(o,"$hasNormal",i),o}function ge(t,e,n){var r=function(){var t=arguments.length?n.apply(null,arguments):n({}),e=(t=t&&"object"==typeof t&&!Array.isArray(t)?[t]:le(t))&&t[0];return t&&(!e||1===t.length&&e.isComment&&!ve(e))?void 0:t};return n.proxy&&Object.defineProperty(t,e,{get:r,enumerable:!0,configurable:!0}),r}function ye(t,e){return function(){return t[e]}}function be(t,e){var r,o,a,s,c;if(Array.isArray(t)||"string"==typeof t)for(r=new Array(t.length),o=0,a=t.length;o<a;o++)r[o]=e(t[o],o);else if("number"==typeof t)for(r=new Array(t),o=0;o<t;o++)r[o]=e(o+1,o);else if(i(t))if(it&&t[Symbol.iterator]){r=[];for(var l=t[Symbol.iterator](),u=l.next();!u.done;)r.push(e(u.value,r.length)),u=l.next()}else for(s=Object.keys(t),r=new Array(s.length),o=0,a=s.length;o<a;o++)c=s[o],r[o]=e(t[c],c,o);return n(r)||(r=[]),r._isVList=!0,r}function we(t,e,n,r){var o,i=this.$scopedSlots[t];i?(n=n||{},r&&(n=C(C({},r),n)),o=i(n)||("function"==typeof e?e():e)):o=this.$slots[t]||("function"==typeof e?e():e);var a=n&&n.slot;return a?this.$createElement("template",{slot:a},o):o}function xe(t){return It(this.$options,"filters",t)||$}function Se(t,e){return Array.isArray(t)?-1===t.indexOf(e):t!==e}function ke(t,e,n,r,o){var i=j.keyCodes[e]||n;return o&&r&&!j.keyCodes[e]?Se(o,r):i?Se(i,t):r?k(r)!==e:void 0===t}function _e(t,e,n,r,o){if(n)if(i(n)){var a;Array.isArray(n)&&(n=M(n));var s=function(i){if("class"===i||"style"===i||h(i))a=t;else{var s=t.attrs&&t.attrs.type;a=r||j.mustUseProp(e,s,i)?t.domProps||(t.domProps={}):t.attrs||(t.attrs={})}var c=w(i),l=k(i);c in a||l in a||(a[i]=n[i],o&&((t.on||(t.on={}))["update:"+i]=function(t){n[i]=t}))};for(var c in n)s(c)}else;return t}function Oe(t,e){var n=this._staticTrees||(this._staticTrees=[]),r=n[t];return r&&!e||Me(r=n[t]=this.$options.staticRenderFns[t].call(this._renderProxy,null,this),"__static__"+t,!1),r}function Ce(t,e,n){return Me(t,"__once__"+e+(n?"_"+n:""),!0),t}function Me(t,e,n){if(Array.isArray(t))for(var r=0;r<t.length;r++)t[r]&&"string"!=typeof t[r]&&De(t[r],e+"_"+r,n);else De(t,e,n)}function De(t,e,n){t.isStatic=!0,t.key=e,t.isOnce=n}function Te(t,e){if(e)if(s(e)){var n=t.on=t.on?C({},t.on):{};for(var r in e){var o=n[r],i=e[r];n[r]=o?[].concat(o,i):i}}else;return t}function $e(t,e,n,r){e=e||{$stable:!n};for(var o=0;o<t.length;o++){var i=t[o];Array.isArray(i)?$e(i,e,n):i&&(i.proxy&&(i.fn.proxy=!0),e[i.key]=i.fn)}return r&&(e.$key=r),e}function Ae(t,e){for(var n=0;n<e.length;n+=2){var r=e[n];"string"==typeof r&&r&&(t[e[n]]=e[n+1])}return t}function Ee(t,e){return"string"==typeof t?e+t:t}function Ne(t){t._o=Ce,t._n=f,t._s=u,t._l=be,t._t=we,t._q=A,t._i=E,t._m=Oe,t._f=xe,t._k=ke,t._b=_e,t._v=vt,t._e=ht,t._u=$e,t._g=Te,t._d=Ae,t._p=Ee}function Pe(e,n,o,i,a){var s,c=this,l=a.options;g(i,"_uid")?(s=Object.create(i))._original=i:(s=i,i=i._original);var u=r(l._compiled),f=!u;this.data=e,this.props=n,this.children=o,this.parent=i,this.listeners=e.on||t,this.injections=pe(l.inject,i),this.slots=function(){return c.$slots||me(e.scopedSlots,c.$slots=de(o,i)),c.$slots},Object.defineProperty(this,"scopedSlots",{enumerable:!0,get:function(){return me(e.scopedSlots,this.slots())}}),u&&(this.$options=l,this.$slots=this.slots(),this.$scopedSlots=me(e.scopedSlots,this.$slots)),l._scopeId?this._c=function(t,e,n,r){var o=Be(s,t,e,n,r,f);return o&&!Array.isArray(o)&&(o.fnScopeId=l._scopeId,o.fnContext=i),o}:this._c=function(t,e,n,r){return Be(s,t,e,n,r,f)}}function Ie(t,e,n,r,o){var i=mt(t);return i.fnContext=n,i.fnOptions=r,e.slot&&((i.data||(i.data={})).slot=e.slot),i}function je(t,e){for(var n in e)t[w(n)]=e[n]}Ne(Pe.prototype);var Re={init:function(t,e){if(t.componentInstance&&!t.componentInstance._isDestroyed&&t.data.keepAlive){var r=t;Re.prepatch(r,r)}else{(t.componentInstance=function(t,e){var r={_isComponent:!0,_parentVnode:t,parent:e},o=t.data.inlineTemplate;n(o)&&(r.render=o.render,r.staticRenderFns=o.staticRenderFns);return new t.componentOptions.Ctor(r)}(t,Ge)).$mount(e?t.elm:void 0,e)}},prepatch:function(e,n){var r=n.componentOptions;!function(e,n,r,o,i){var a=o.data.scopedSlots,s=e.$scopedSlots,c=!!(a&&!a.$stable||s!==t&&!s.$stable||a&&e.$scopedSlots.$key!==a.$key||!a&&e.$scopedSlots.$key),l=!!(i||e.$options._renderChildren||c);e.$options._parentVnode=o,e.$vnode=o,e._vnode&&(e._vnode.parent=o);if(e.$options._renderChildren=i,e.$attrs=o.data.attrs||t,e.$listeners=r||t,n&&e.$options.props){xt(!1);for(var u=e._props,f=e.$options._propKeys||[],p=0;p<f.length;p++){var d=f[p],h=e.$options.props;u[d]=jt(d,h,n,e)}xt(!0),e.$options.propsData=n}r=r||t;var v=e.$options._parentListeners;e.$options._parentListeners=r,Xe(e,r,v),l&&(e.$slots=de(i,o.context),e.$forceUpdate())}(n.componentInstance=e.componentInstance,r.propsData,r.listeners,n,r.children)},insert:function(t){var e,n=t.context,r=t.componentInstance;r._isMounted||(r._isMounted=!0,nn(r,"mounted")),t.data.keepAlive&&(n._isMounted?((e=r)._inactive=!1,on.push(e)):tn(r,!0))},destroy:function(t){var e=t.componentInstance;e._isDestroyed||(t.data.keepAlive?en(e,!0):e.$destroy())}},ze=Object.keys(Re);function Fe(o,a,s,c,u){if(!e(o)){var f=s.$options._base;if(i(o)&&(o=f.extend(o)),"function"==typeof o){var p;if(e(o.cid)&&(o=function(t,o){if(r(t.error)&&n(t.errorComp))return t.errorComp;if(n(t.resolved))return t.resolved;var a=qe;a&&n(t.owners)&&-1===t.owners.indexOf(a)&&t.owners.push(a);if(r(t.loading)&&n(t.loadingComp))return t.loadingComp;if(a&&!n(t.owners)){var s=t.owners=[a],c=!0,u=null,f=null;a.$on("hook:destroyed",(function(){return v(s,a)}));var p=function(t){for(var e=0,n=s.length;e<n;e++)s[e].$forceUpdate();t&&(s.length=0,null!==u&&(clearTimeout(u),u=null),null!==f&&(clearTimeout(f),f=null))},d=N((function(e){t.resolved=He(e,o),c?s.length=0:p(!0)})),h=N((function(e){n(t.errorComp)&&(t.error=!0,p(!0))})),m=t(d,h);return i(m)&&(l(m)?e(t.resolved)&&m.then(d,h):l(m.component)&&(m.component.then(d,h),n(m.error)&&(t.errorComp=He(m.error,o)),n(m.loading)&&(t.loadingComp=He(m.loading,o),0===m.delay?t.loading=!0:u=setTimeout((function(){u=null,e(t.resolved)&&e(t.error)&&(t.loading=!0,p(!1))}),m.delay||200)),n(m.timeout)&&(f=setTimeout((function(){f=null,e(t.resolved)&&h(null)}),m.timeout)))),c=!1,t.loading?t.loadingComp:t.resolved}}(p=o,f),void 0===o))return function(t,e,n,r,o){var i=ht();return i.asyncFactory=t,i.asyncMeta={data:e,context:n,children:r,tag:o},i}(p,a,s,c,u);a=a||{},On(o),n(a.model)&&function(t,e){var r=t.model&&t.model.prop||"value",o=t.model&&t.model.event||"input";(e.attrs||(e.attrs={}))[r]=e.model.value;var i=e.on||(e.on={}),a=i[o],s=e.model.callback;n(a)?(Array.isArray(a)?-1===a.indexOf(s):a!==s)&&(i[o]=[s].concat(a)):i[o]=s}(o.options,a);var d=function(t,r,o){var i=r.options.props;if(!e(i)){var a={},s=t.attrs,c=t.props;if(n(s)||n(c))for(var l in i){var u=k(l);ce(a,c,l,u,!0)||ce(a,s,l,u,!1)}return a}}(a,o);if(r(o.options.functional))return function(e,r,o,i,a){var s=e.options,c={},l=s.props;if(n(l))for(var u in l)c[u]=jt(u,l,r||t);else n(o.attrs)&&je(c,o.attrs),n(o.props)&&je(c,o.props);var f=new Pe(o,c,a,i,e),p=s.render.call(null,f._c,f);if(p instanceof pt)return Ie(p,o,f.parent,s);if(Array.isArray(p)){for(var d=le(p)||[],h=new Array(d.length),v=0;v<d.length;v++)h[v]=Ie(d[v],o,f.parent,s);return h}}(o,d,a,s,c);var h=a.on;if(a.on=a.nativeOn,r(o.options.abstract)){var m=a.slot;a={},m&&(a.slot=m)}!function(t){for(var e=t.hook||(t.hook={}),n=0;n<ze.length;n++){var r=ze[n],o=e[r],i=Re[r];o===i||o&&o._merged||(e[r]=o?Le(i,o):i)}}(a);var g=o.options.name||u;return new pt("vue-component-"+o.cid+(g?"-"+g:""),a,void 0,void 0,void 0,s,{Ctor:o,propsData:d,listeners:h,tag:u,children:c},p)}}}function Le(t,e){var n=function(n,r){t(n,r),e(n,r)};return n._merged=!0,n}function Be(t,e,a,s,c,l){return(Array.isArray(a)||o(a))&&(c=s,s=a,a=void 0),r(l)&&(c=2),function(t,e,r,o,a){if(n(r)&&n(r.__ob__))return ht();n(r)&&n(r.is)&&(e=r.is);if(!e)return ht();Array.isArray(o)&&"function"==typeof o[0]&&((r=r||{}).scopedSlots={default:o[0]},o.length=0);2===a?o=le(o):1===a&&(o=function(t){for(var e=0;e<t.length;e++)if(Array.isArray(t[e]))return Array.prototype.concat.apply([],t);return t}(o));var s,c;if("string"==typeof e){var l;c=t.$vnode&&t.$vnode.ns||j.getTagNamespace(e),s=j.isReservedTag(e)?new pt(j.parsePlatformTagName(e),r,o,void 0,void 0,t):r&&r.pre||!n(l=It(t.$options,"components",e))?new pt(e,r,o,void 0,void 0,t):Fe(l,r,t,o,e)}else s=Fe(e,r,t,o);return Array.isArray(s)?s:n(s)?(n(c)&&Ve(s,c),n(r)&&function(t){i(t.style)&&ne(t.style);i(t.class)&&ne(t.class)}(r),s):ht()}(t,e,a,s,c)}function Ve(t,o,i){if(t.ns=o,"foreignObject"===t.tag&&(o=void 0,i=!0),n(t.children))for(var a=0,s=t.children.length;a<s;a++){var c=t.children[a];n(c.tag)&&(e(c.ns)||r(i)&&"svg"!==c.tag)&&Ve(c,o,i)}}var We,qe=null;function He(t,e){return(t.__esModule||it&&"Module"===t[Symbol.toStringTag])&&(t=t.default),i(t)?e.extend(t):t}function Je(t){if(Array.isArray(t))for(var e=0;e<t.length;e++){var r=t[e];if(n(r)&&(n(r.componentOptions)||ve(r)))return r}}function Ke(t,e){We.$on(t,e)}function Ye(t,e){We.$off(t,e)}function Ue(t,e){var n=We;return function r(){var o=e.apply(null,arguments);null!==o&&n.$off(t,r)}}function Xe(t,e,n){We=t,ae(e,n||{},Ke,Ye,Ue,t),We=void 0}var Ge=null;function Ze(t){var e=Ge;return Ge=t,function(){Ge=e}}function Qe(t){for(;t&&(t=t.$parent);)if(t._inactive)return!0;return!1}function tn(t,e){if(e){if(t._directInactive=!1,Qe(t))return}else if(t._directInactive)return;if(t._inactive||null===t._inactive){t._inactive=!1;for(var n=0;n<t.$children.length;n++)tn(t.$children[n]);nn(t,"activated")}}function en(t,e){if(!(e&&(t._directInactive=!0,Qe(t))||t._inactive)){t._inactive=!0;for(var n=0;n<t.$children.length;n++)en(t.$children[n]);nn(t,"deactivated")}}function nn(t,e){ut();var n=t.$options[e],r=e+" hook";if(n)for(var o=0,i=n.length;o<i;o++)Vt(n[o],t,null,t,r);t._hasHookEvent&&t.$emit("hook:"+e),ft()}var rn=[],on=[],an={},sn=!1,cn=!1,ln=0;var un=0,fn=Date.now;if(V&&!J){var pn=window.performance;pn&&"function"==typeof pn.now&&fn()>document.createEvent("Event").timeStamp&&(fn=function(){return pn.now()})}function dn(){var t,e;for(un=fn(),cn=!0,rn.sort((function(t,e){return t.id-e.id})),ln=0;ln<rn.length;ln++)(t=rn[ln]).before&&t.before(),e=t.id,an[e]=null,t.run();var n=on.slice(),r=rn.slice();ln=rn.length=on.length=0,an={},sn=cn=!1,function(t){for(var e=0;e<t.length;e++)t[e]._inactive=!0,tn(t[e],!0)}(n),function(t){var e=t.length;for(;e--;){var n=t[e],r=n.vm;r._watcher===n&&r._isMounted&&!r._isDestroyed&&nn(r,"updated")}}(r),nt&&j.devtools&&nt.emit("flush")}var hn=0,vn=function(t,e,n,r,o){this.vm=t,o&&(t._watcher=this),t._watchers.push(this),r?(this.deep=!!r.deep,this.user=!!r.user,this.lazy=!!r.lazy,this.sync=!!r.sync,this.before=r.before):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++hn,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new ot,this.newDepIds=new ot,this.expression="","function"==typeof e?this.getter=e:(this.getter=function(t){if(!L.test(t)){var e=t.split(".");return function(t){for(var n=0;n<e.length;n++){if(!t)return;t=t[e[n]]}return t}}}(e),this.getter||(this.getter=D)),this.value=this.lazy?void 0:this.get()};vn.prototype.get=function(){var t;ut(this);var e=this.vm;try{t=this.getter.call(e,e)}catch(My){if(!this.user)throw My;Bt(My,e,'getter for watcher "'+this.expression+'"')}finally{this.deep&&ne(t),ft(),this.cleanupDeps()}return t},vn.prototype.addDep=function(t){var e=t.id;this.newDepIds.has(e)||(this.newDepIds.add(e),this.newDeps.push(t),this.depIds.has(e)||t.addSub(this))},vn.prototype.cleanupDeps=function(){for(var t=this.deps.length;t--;){var e=this.deps[t];this.newDepIds.has(e.id)||e.removeSub(this)}var n=this.depIds;this.depIds=this.newDepIds,this.newDepIds=n,this.newDepIds.clear(),n=this.deps,this.deps=this.newDeps,this.newDeps=n,this.newDeps.length=0},vn.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():function(t){var e=t.id;if(null==an[e]){if(an[e]=!0,cn){for(var n=rn.length-1;n>ln&&rn[n].id>t.id;)n--;rn.splice(n+1,0,t)}else rn.push(t);sn||(sn=!0,te(dn))}}(this)},vn.prototype.run=function(){if(this.active){var t=this.get();if(t!==this.value||i(t)||this.deep){var e=this.value;if(this.value=t,this.user){var n='callback for watcher "'+this.expression+'"';Vt(this.cb,this.vm,[t,e],this.vm,n)}else this.cb.call(this.vm,t,e)}}},vn.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},vn.prototype.depend=function(){for(var t=this.deps.length;t--;)this.deps[t].depend()},vn.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||v(this.vm._watchers,this);for(var t=this.deps.length;t--;)this.deps[t].removeSub(this);this.active=!1}};var mn={enumerable:!0,configurable:!0,get:D,set:D};function gn(t,e,n){mn.get=function(){return this[e][n]},mn.set=function(t){this[e][n]=t},Object.defineProperty(t,n,mn)}function yn(t){t._watchers=[];var e=t.$options;e.props&&function(t,e){var n=t.$options.propsData||{},r=t._props={},o=t.$options._propKeys=[];t.$parent&&xt(!1);var i=function(i){o.push(i);var a=jt(i,e,n,t);_t(r,i,a),i in t||gn(t,"_props",i)};for(var a in e)i(a);xt(!0)}(t,e.props),e.methods&&function(t,e){for(var n in t.$options.props,e)t[n]="function"!=typeof e[n]?D:_(e[n],t)}(t,e.methods),e.data?function(t){var e=t.$options.data;s(e=t._data="function"==typeof e?function(t,e){ut();try{return t.call(e,e)}catch(My){return Bt(My,e,"data()"),{}}finally{ft()}}(e,t):e||{})||(e={});var n=Object.keys(e),r=t.$options.props;t.$options.methods;var o=n.length;for(;o--;){var i=n[o];r&&g(r,i)||z(i)||gn(t,"_data",i)}kt(e,!0)}(t):kt(t._data={},!0),e.computed&&function(t,e){var n=t._computedWatchers=Object.create(null),r=et();for(var o in e){var i=e[o],a="function"==typeof i?i:i.get;r||(n[o]=new vn(t,a||D,D,bn)),o in t||wn(t,o,i)}}(t,e.computed),e.watch&&e.watch!==Z&&function(t,e){for(var n in e){var r=e[n];if(Array.isArray(r))for(var o=0;o<r.length;o++)kn(t,n,r[o]);else kn(t,n,r)}}(t,e.watch)}var bn={lazy:!0};function wn(t,e,n){var r=!et();"function"==typeof n?(mn.get=r?xn(e):Sn(n),mn.set=D):(mn.get=n.get?r&&!1!==n.cache?xn(e):Sn(n.get):D,mn.set=n.set||D),Object.defineProperty(t,e,mn)}function xn(t){return function(){var e=this._computedWatchers&&this._computedWatchers[t];if(e)return e.dirty&&e.evaluate(),ct.target&&e.depend(),e.value}}function Sn(t){return function(){return t.call(this,this)}}function kn(t,e,n,r){return s(n)&&(r=n,n=n.handler),"string"==typeof n&&(n=t[n]),t.$watch(e,n,r)}var _n=0;function On(t){var e=t.options;if(t.super){var n=On(t.super);if(n!==t.superOptions){t.superOptions=n;var r=function(t){var e,n=t.options,r=t.sealedOptions;for(var o in n)n[o]!==r[o]&&(e||(e={}),e[o]=n[o]);return e}(t);r&&C(t.extendOptions,r),(e=t.options=Pt(n,t.extendOptions)).name&&(e.components[e.name]=t)}}return e}function Cn(t){this._init(t)}function Mn(t){t.cid=0;var e=1;t.extend=function(t){t=t||{};var n=this,r=n.cid,o=t._Ctor||(t._Ctor={});if(o[r])return o[r];var i=t.name||n.options.name,a=function(t){this._init(t)};return(a.prototype=Object.create(n.prototype)).constructor=a,a.cid=e++,a.options=Pt(n.options,t),a.super=n,a.options.props&&function(t){var e=t.options.props;for(var n in e)gn(t.prototype,"_props",n)}(a),a.options.computed&&function(t){var e=t.options.computed;for(var n in e)wn(t.prototype,n,e[n])}(a),a.extend=n.extend,a.mixin=n.mixin,a.use=n.use,P.forEach((function(t){a[t]=n[t]})),i&&(a.options.components[i]=a),a.superOptions=n.options,a.extendOptions=t,a.sealedOptions=C({},a.options),o[r]=a,a}}function Dn(t){return t&&(t.Ctor.options.name||t.tag)}function Tn(t,e){return Array.isArray(t)?t.indexOf(e)>-1:"string"==typeof t?t.split(",").indexOf(e)>-1:(n=t,"[object RegExp]"===a.call(n)&&t.test(e));var n}function $n(t,e){var n=t.cache,r=t.keys,o=t._vnode;for(var i in n){var a=n[i];if(a){var s=a.name;s&&!e(s)&&An(n,i,r,o)}}}function An(t,e,n,r){var o=t[e];!o||r&&o.tag===r.tag||o.componentInstance.$destroy(),t[e]=null,v(n,e)}Cn.prototype._init=function(e){var n=this;n._uid=_n++,n._isVue=!0,e&&e._isComponent?function(t,e){var n=t.$options=Object.create(t.constructor.options),r=e._parentVnode;n.parent=e.parent,n._parentVnode=r;var o=r.componentOptions;n.propsData=o.propsData,n._parentListeners=o.listeners,n._renderChildren=o.children,n._componentTag=o.tag,e.render&&(n.render=e.render,n.staticRenderFns=e.staticRenderFns)}(n,e):n.$options=Pt(On(n.constructor),e||{},n),n._renderProxy=n,n._self=n,function(t){var e=t.$options,n=e.parent;if(n&&!e.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(t)}t.$parent=n,t.$root=n?n.$root:t,t.$children=[],t.$refs={},t._watcher=null,t._inactive=null,t._directInactive=!1,t._isMounted=!1,t._isDestroyed=!1,t._isBeingDestroyed=!1}(n),function(t){t._events=Object.create(null),t._hasHookEvent=!1;var e=t.$options._parentListeners;e&&Xe(t,e)}(n),function(e){e._vnode=null,e._staticTrees=null;var n=e.$options,r=e.$vnode=n._parentVnode,o=r&&r.context;e.$slots=de(n._renderChildren,o),e.$scopedSlots=t,e._c=function(t,n,r,o){return Be(e,t,n,r,o,!1)},e.$createElement=function(t,n,r,o){return Be(e,t,n,r,o,!0)};var i=r&&r.data;_t(e,"$attrs",i&&i.attrs||t,null,!0),_t(e,"$listeners",n._parentListeners||t,null,!0)}(n),nn(n,"beforeCreate"),function(t){var e=pe(t.$options.inject,t);e&&(xt(!1),Object.keys(e).forEach((function(n){_t(t,n,e[n])})),xt(!0))}(n),yn(n),function(t){var e=t.$options.provide;e&&(t._provided="function"==typeof e?e.call(t):e)}(n),nn(n,"created"),n.$options.el&&n.$mount(n.$options.el)},function(t){var e={get:function(){return this._data}},n={get:function(){return this._props}};Object.defineProperty(t.prototype,"$data",e),Object.defineProperty(t.prototype,"$props",n),t.prototype.$set=Ot,t.prototype.$delete=Ct,t.prototype.$watch=function(t,e,n){var r=this;if(s(e))return kn(r,t,e,n);(n=n||{}).user=!0;var o=new vn(r,t,e,n);if(n.immediate){var i='callback for immediate watcher "'+o.expression+'"';ut(),Vt(e,r,[o.value],r,i),ft()}return function(){o.teardown()}}}(Cn),function(t){var e=/^hook:/;t.prototype.$on=function(t,n){var r=this;if(Array.isArray(t))for(var o=0,i=t.length;o<i;o++)r.$on(t[o],n);else(r._events[t]||(r._events[t]=[])).push(n),e.test(t)&&(r._hasHookEvent=!0);return r},t.prototype.$once=function(t,e){var n=this;function r(){n.$off(t,r),e.apply(n,arguments)}return r.fn=e,n.$on(t,r),n},t.prototype.$off=function(t,e){var n=this;if(!arguments.length)return n._events=Object.create(null),n;if(Array.isArray(t)){for(var r=0,o=t.length;r<o;r++)n.$off(t[r],e);return n}var i,a=n._events[t];if(!a)return n;if(!e)return n._events[t]=null,n;for(var s=a.length;s--;)if((i=a[s])===e||i.fn===e){a.splice(s,1);break}return n},t.prototype.$emit=function(t){var e=this,n=e._events[t];if(n){n=n.length>1?O(n):n;for(var r=O(arguments,1),o='event handler for "'+t+'"',i=0,a=n.length;i<a;i++)Vt(n[i],e,r,e,o)}return e}}(Cn),function(t){t.prototype._update=function(t,e){var n=this,r=n.$el,o=n._vnode,i=Ze(n);n._vnode=t,n.$el=o?n.__patch__(o,t):n.__patch__(n.$el,t,e,!1),i(),r&&(r.__vue__=null),n.$el&&(n.$el.__vue__=n),n.$vnode&&n.$parent&&n.$vnode===n.$parent._vnode&&(n.$parent.$el=n.$el)},t.prototype.$forceUpdate=function(){this._watcher&&this._watcher.update()},t.prototype.$destroy=function(){var t=this;if(!t._isBeingDestroyed){nn(t,"beforeDestroy"),t._isBeingDestroyed=!0;var e=t.$parent;!e||e._isBeingDestroyed||t.$options.abstract||v(e.$children,t),t._watcher&&t._watcher.teardown();for(var n=t._watchers.length;n--;)t._watchers[n].teardown();t._data.__ob__&&t._data.__ob__.vmCount--,t._isDestroyed=!0,t.__patch__(t._vnode,null),nn(t,"destroyed"),t.$off(),t.$el&&(t.$el.__vue__=null),t.$vnode&&(t.$vnode.parent=null)}}}(Cn),function(t){Ne(t.prototype),t.prototype.$nextTick=function(t){return te(t,this)},t.prototype._render=function(){var t,e=this,n=e.$options,r=n.render,o=n._parentVnode;o&&(e.$scopedSlots=me(o.data.scopedSlots,e.$slots,e.$scopedSlots)),e.$vnode=o;try{qe=e,t=r.call(e._renderProxy,e.$createElement)}catch(My){Bt(My,e,"render"),t=e._vnode}finally{qe=null}return Array.isArray(t)&&1===t.length&&(t=t[0]),t instanceof pt||(t=ht()),t.parent=o,t}}(Cn);var En=[String,RegExp,Array],Nn={name:"keep-alive",abstract:!0,props:{include:En,exclude:En,max:[String,Number]},methods:{cacheVNode:function(){var t=this,e=t.cache,n=t.keys,r=t.vnodeToCache,o=t.keyToCache;if(r){var i=r.tag,a=r.componentInstance,s=r.componentOptions;e[o]={name:Dn(s),tag:i,componentInstance:a},n.push(o),this.max&&n.length>parseInt(this.max)&&An(e,n[0],n,this._vnode),this.vnodeToCache=null}}},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var t in this.cache)An(this.cache,t,this.keys)},mounted:function(){var t=this;this.cacheVNode(),this.$watch("include",(function(e){$n(t,(function(t){return Tn(e,t)}))})),this.$watch("exclude",(function(e){$n(t,(function(t){return!Tn(e,t)}))}))},updated:function(){this.cacheVNode()},render:function(){var t=this.$slots.default,e=Je(t),n=e&&e.componentOptions;if(n){var r=Dn(n),o=this.include,i=this.exclude;if(o&&(!r||!Tn(o,r))||i&&r&&Tn(i,r))return e;var a=this.cache,s=this.keys,c=null==e.key?n.Ctor.cid+(n.tag?"::"+n.tag:""):e.key;a[c]?(e.componentInstance=a[c].componentInstance,v(s,c),s.push(c)):(this.vnodeToCache=e,this.keyToCache=c),e.data.keepAlive=!0}return e||t&&t[0]}},Pn={KeepAlive:Nn};!function(t){var e={get:function(){return j}};Object.defineProperty(t,"config",e),t.util={warn:at,extend:C,mergeOptions:Pt,defineReactive:_t},t.set=Ot,t.delete=Ct,t.nextTick=te,t.observable=function(t){return kt(t),t},t.options=Object.create(null),P.forEach((function(e){t.options[e+"s"]=Object.create(null)})),t.options._base=t,C(t.options.components,Pn),function(t){t.use=function(t){var e=this._installedPlugins||(this._installedPlugins=[]);if(e.indexOf(t)>-1)return this;var n=O(arguments,1);return n.unshift(this),"function"==typeof t.install?t.install.apply(t,n):"function"==typeof t&&t.apply(null,n),e.push(t),this}}(t),function(t){t.mixin=function(t){return this.options=Pt(this.options,t),this}}(t),Mn(t),function(t){P.forEach((function(e){t[e]=function(t,n){return n?("component"===e&&s(n)&&(n.name=n.name||t,n=this.options._base.extend(n)),"directive"===e&&"function"==typeof n&&(n={bind:n,update:n}),this.options[e+"s"][t]=n,n):this.options[e+"s"][t]}}))}(t)}(Cn),Object.defineProperty(Cn.prototype,"$isServer",{get:et}),Object.defineProperty(Cn.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(Cn,"FunctionalRenderContext",{value:Pe}),Cn.version="2.6.14";var In=p("style,class"),jn=p("input,textarea,option,select,progress"),Rn=function(t,e,n){return"value"===n&&jn(t)&&"button"!==e||"selected"===n&&"option"===t||"checked"===n&&"input"===t||"muted"===n&&"video"===t},zn=p("contenteditable,draggable,spellcheck"),Fn=p("events,caret,typing,plaintext-only"),Ln=p("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,truespeed,typemustmatch,visible"),Bn="http://www.w3.org/1999/xlink",Vn=function(t){return":"===t.charAt(5)&&"xlink"===t.slice(0,5)},Wn=function(t){return Vn(t)?t.slice(6,t.length):""},qn=function(t){return null==t||!1===t};function Hn(t){for(var e=t.data,r=t,o=t;n(o.componentInstance);)(o=o.componentInstance._vnode)&&o.data&&(e=Jn(o.data,e));for(;n(r=r.parent);)r&&r.data&&(e=Jn(e,r.data));return function(t,e){if(n(t)||n(e))return Kn(t,Yn(e));return""}(e.staticClass,e.class)}function Jn(t,e){return{staticClass:Kn(t.staticClass,e.staticClass),class:n(t.class)?[t.class,e.class]:e.class}}function Kn(t,e){return t?e?t+" "+e:t:e||""}function Yn(t){return Array.isArray(t)?function(t){for(var e,r="",o=0,i=t.length;o<i;o++)n(e=Yn(t[o]))&&""!==e&&(r&&(r+=" "),r+=e);return r}(t):i(t)?function(t){var e="";for(var n in t)t[n]&&(e&&(e+=" "),e+=n);return e}(t):"string"==typeof t?t:""}var Un={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"},Xn=p("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template,blockquote,iframe,tfoot"),Gn=p("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,foreignobject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view",!0),Zn=function(t){return Xn(t)||Gn(t)};function Qn(t){return Gn(t)?"svg":"math"===t?"math":void 0}var tr=Object.create(null);var er=p("text,number,password,search,email,tel,url");function nr(t){if("string"==typeof t){var e=document.querySelector(t);return e||document.createElement("div")}return t}var rr=Object.freeze({createElement:function(t,e){var n=document.createElement(t);return"select"!==t||e.data&&e.data.attrs&&void 0!==e.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n},createElementNS:function(t,e){return document.createElementNS(Un[t],e)},createTextNode:function(t){return document.createTextNode(t)},createComment:function(t){return document.createComment(t)},insertBefore:function(t,e,n){t.insertBefore(e,n)},removeChild:function(t,e){t.removeChild(e)},appendChild:function(t,e){t.appendChild(e)},parentNode:function(t){return t.parentNode},nextSibling:function(t){return t.nextSibling},tagName:function(t){return t.tagName},setTextContent:function(t,e){t.textContent=e},setStyleScope:function(t,e){t.setAttribute(e,"")}}),or={create:function(t,e){ir(e)},update:function(t,e){t.data.ref!==e.data.ref&&(ir(t,!0),ir(e))},destroy:function(t){ir(t,!0)}};function ir(t,e){var r=t.data.ref;if(n(r)){var o=t.context,i=t.componentInstance||t.elm,a=o.$refs;e?Array.isArray(a[r])?v(a[r],i):a[r]===i&&(a[r]=void 0):t.data.refInFor?Array.isArray(a[r])?a[r].indexOf(i)<0&&a[r].push(i):a[r]=[i]:a[r]=i}}var ar=new pt("",{},[]),sr=["create","activate","update","remove","destroy"];function cr(t,o){return t.key===o.key&&t.asyncFactory===o.asyncFactory&&(t.tag===o.tag&&t.isComment===o.isComment&&n(t.data)===n(o.data)&&function(t,e){if("input"!==t.tag)return!0;var r,o=n(r=t.data)&&n(r=r.attrs)&&r.type,i=n(r=e.data)&&n(r=r.attrs)&&r.type;return o===i||er(o)&&er(i)}(t,o)||r(t.isAsyncPlaceholder)&&e(o.asyncFactory.error))}function lr(t,e,r){var o,i,a={};for(o=e;o<=r;++o)n(i=t[o].key)&&(a[i]=o);return a}var ur={create:fr,update:fr,destroy:function(t){fr(t,ar)}};function fr(t,e){(t.data.directives||e.data.directives)&&function(t,e){var n,r,o,i=t===ar,a=e===ar,s=dr(t.data.directives,t.context),c=dr(e.data.directives,e.context),l=[],u=[];for(n in c)r=s[n],o=c[n],r?(o.oldValue=r.value,o.oldArg=r.arg,vr(o,"update",e,t),o.def&&o.def.componentUpdated&&u.push(o)):(vr(o,"bind",e,t),o.def&&o.def.inserted&&l.push(o));if(l.length){var f=function(){for(var n=0;n<l.length;n++)vr(l[n],"inserted",e,t)};i?se(e,"insert",f):f()}u.length&&se(e,"postpatch",(function(){for(var n=0;n<u.length;n++)vr(u[n],"componentUpdated",e,t)}));if(!i)for(n in s)c[n]||vr(s[n],"unbind",t,t,a)}(t,e)}var pr=Object.create(null);function dr(t,e){var n,r,o=Object.create(null);if(!t)return o;for(n=0;n<t.length;n++)(r=t[n]).modifiers||(r.modifiers=pr),o[hr(r)]=r,r.def=It(e.$options,"directives",r.name);return o}function hr(t){return t.rawName||t.name+"."+Object.keys(t.modifiers||{}).join(".")}function vr(t,e,n,r,o){var i=t.def&&t.def[e];if(i)try{i(n.elm,t,n,r,o)}catch(My){Bt(My,n.context,"directive "+t.name+" "+e+" hook")}}var mr=[or,ur];function gr(t,r){var o=r.componentOptions;if(!(n(o)&&!1===o.Ctor.options.inheritAttrs||e(t.data.attrs)&&e(r.data.attrs))){var i,a,s=r.elm,c=t.data.attrs||{},l=r.data.attrs||{};for(i in n(l.__ob__)&&(l=r.data.attrs=C({},l)),l)a=l[i],c[i]!==a&&yr(s,i,a,r.data.pre);for(i in(J||Y)&&l.value!==c.value&&yr(s,"value",l.value),c)e(l[i])&&(Vn(i)?s.removeAttributeNS(Bn,Wn(i)):zn(i)||s.removeAttribute(i))}}function yr(t,e,n,r){r||t.tagName.indexOf("-")>-1?br(t,e,n):Ln(e)?qn(n)?t.removeAttribute(e):(n="allowfullscreen"===e&&"EMBED"===t.tagName?"true":e,t.setAttribute(e,n)):zn(e)?t.setAttribute(e,function(t,e){return qn(e)||"false"===e?"false":"contenteditable"===t&&Fn(e)?e:"true"}(e,n)):Vn(e)?qn(n)?t.removeAttributeNS(Bn,Wn(e)):t.setAttributeNS(Bn,e,n):br(t,e,n)}function br(t,e,n){if(qn(n))t.removeAttribute(e);else{if(J&&!K&&"TEXTAREA"===t.tagName&&"placeholder"===e&&""!==n&&!t.__ieph){var r=function(e){e.stopImmediatePropagation(),t.removeEventListener("input",r)};t.addEventListener("input",r),t.__ieph=!0}t.setAttribute(e,n)}}var wr={create:gr,update:gr};function xr(t,r){var o=r.elm,i=r.data,a=t.data;if(!(e(i.staticClass)&&e(i.class)&&(e(a)||e(a.staticClass)&&e(a.class)))){var s=Hn(r),c=o._transitionClasses;n(c)&&(s=Kn(s,Yn(c))),s!==o._prevClass&&(o.setAttribute("class",s),o._prevClass=s)}}var Sr,kr,_r,Or,Cr,Mr,Dr={create:xr,update:xr},Tr=/[\w).+\-_$\]]/;function $r(t){var e,n,r,o,i,a=!1,s=!1,c=!1,l=!1,u=0,f=0,p=0,d=0;for(r=0;r<t.length;r++)if(n=e,e=t.charCodeAt(r),a)39===e&&92!==n&&(a=!1);else if(s)34===e&&92!==n&&(s=!1);else if(c)96===e&&92!==n&&(c=!1);else if(l)47===e&&92!==n&&(l=!1);else if(124!==e||124===t.charCodeAt(r+1)||124===t.charCodeAt(r-1)||u||f||p){switch(e){case 34:s=!0;break;case 39:a=!0;break;case 96:c=!0;break;case 40:p++;break;case 41:p--;break;case 91:f++;break;case 93:f--;break;case 123:u++;break;case 125:u--}if(47===e){for(var h=r-1,v=void 0;h>=0&&" "===(v=t.charAt(h));h--);v&&Tr.test(v)||(l=!0)}}else void 0===o?(d=r+1,o=t.slice(0,r).trim()):m();function m(){(i||(i=[])).push(t.slice(d,r).trim()),d=r+1}if(void 0===o?o=t.slice(0,r).trim():0!==d&&m(),i)for(r=0;r<i.length;r++)o=Ar(o,i[r]);return o}function Ar(t,e){var n=e.indexOf("(");if(n<0)return'_f("'+e+'")('+t+")";var r=e.slice(0,n),o=e.slice(n+1);return'_f("'+r+'")('+t+(")"!==o?","+o:o)}function Er(t,e){console.error("[Vue compiler]: "+t)}function Nr(t,e){return t?t.map((function(t){return t[e]})).filter((function(t){return t})):[]}function Pr(t,e,n,r,o){(t.props||(t.props=[])).push(Wr({name:e,value:n,dynamic:o},r)),t.plain=!1}function Ir(t,e,n,r,o){(o?t.dynamicAttrs||(t.dynamicAttrs=[]):t.attrs||(t.attrs=[])).push(Wr({name:e,value:n,dynamic:o},r)),t.plain=!1}function jr(t,e,n,r){t.attrsMap[e]=n,t.attrsList.push(Wr({name:e,value:n},r))}function Rr(t,e,n,r,o,i,a,s){(t.directives||(t.directives=[])).push(Wr({name:e,rawName:n,value:r,arg:o,isDynamicArg:i,modifiers:a},s)),t.plain=!1}function zr(t,e,n){return n?"_p("+e+',"'+t+'")':t+e}function Fr(e,n,r,o,i,a,s,c){var l;(o=o||t).right?c?n="("+n+")==='click'?'contextmenu':("+n+")":"click"===n&&(n="contextmenu",delete o.right):o.middle&&(c?n="("+n+")==='click'?'mouseup':("+n+")":"click"===n&&(n="mouseup")),o.capture&&(delete o.capture,n=zr("!",n,c)),o.once&&(delete o.once,n=zr("~",n,c)),o.passive&&(delete o.passive,n=zr("&",n,c)),o.native?(delete o.native,l=e.nativeEvents||(e.nativeEvents={})):l=e.events||(e.events={});var u=Wr({value:r.trim(),dynamic:c},s);o!==t&&(u.modifiers=o);var f=l[n];Array.isArray(f)?i?f.unshift(u):f.push(u):l[n]=f?i?[u,f]:[f,u]:u,e.plain=!1}function Lr(t,e,n){var r=Br(t,":"+e)||Br(t,"v-bind:"+e);if(null!=r)return $r(r);if(!1!==n){var o=Br(t,e);if(null!=o)return JSON.stringify(o)}}function Br(t,e,n){var r;if(null!=(r=t.attrsMap[e]))for(var o=t.attrsList,i=0,a=o.length;i<a;i++)if(o[i].name===e){o.splice(i,1);break}return n&&delete t.attrsMap[e],r}function Vr(t,e){for(var n=t.attrsList,r=0,o=n.length;r<o;r++){var i=n[r];if(e.test(i.name))return n.splice(r,1),i}}function Wr(t,e){return e&&(null!=e.start&&(t.start=e.start),null!=e.end&&(t.end=e.end)),t}function qr(t,e,n){var r=n||{},o=r.number,i="$$v",a=i;r.trim&&(a="(typeof $$v === 'string'? $$v.trim(): $$v)"),o&&(a="_n("+a+")");var s=Hr(e,a);t.model={value:"("+e+")",expression:JSON.stringify(e),callback:"function ($$v) {"+s+"}"}}function Hr(t,e){var n=function(t){if(t=t.trim(),Sr=t.length,t.indexOf("[")<0||t.lastIndexOf("]")<Sr-1)return(Or=t.lastIndexOf("."))>-1?{exp:t.slice(0,Or),key:'"'+t.slice(Or+1)+'"'}:{exp:t,key:null};kr=t,Or=Cr=Mr=0;for(;!Kr();)Yr(_r=Jr())?Xr(_r):91===_r&&Ur(_r);return{exp:t.slice(0,Cr),key:t.slice(Cr+1,Mr)}}(t);return null===n.key?t+"="+e:"$set("+n.exp+", "+n.key+", "+e+")"}function Jr(){return kr.charCodeAt(++Or)}function Kr(){return Or>=Sr}function Yr(t){return 34===t||39===t}function Ur(t){var e=1;for(Cr=Or;!Kr();)if(Yr(t=Jr()))Xr(t);else if(91===t&&e++,93===t&&e--,0===e){Mr=Or;break}}function Xr(t){for(var e=t;!Kr()&&(t=Jr())!==e;);}var Gr;function Zr(t,e,n){var r=Gr;return function o(){var i=e.apply(null,arguments);null!==i&&eo(t,o,n,r)}}var Qr=Jt&&!(G&&Number(G[1])<=53);function to(t,e,n,r){if(Qr){var o=un,i=e;e=i._wrapper=function(t){if(t.target===t.currentTarget||t.timeStamp>=o||t.timeStamp<=0||t.target.ownerDocument!==document)return i.apply(this,arguments)}}Gr.addEventListener(t,e,Q?{capture:n,passive:r}:n)}function eo(t,e,n,r){(r||Gr).removeEventListener(t,e._wrapper||e,n)}function no(t,r){if(!e(t.data.on)||!e(r.data.on)){var o=r.data.on||{},i=t.data.on||{};Gr=r.elm,function(t){if(n(t.__r)){var e=J?"change":"input";t[e]=[].concat(t.__r,t[e]||[]),delete t.__r}n(t.__c)&&(t.change=[].concat(t.__c,t.change||[]),delete t.__c)}(o),ae(o,i,to,eo,Zr,r.context),Gr=void 0}}var ro,oo={create:no,update:no};function io(t,r){if(!e(t.data.domProps)||!e(r.data.domProps)){var o,i,a=r.elm,s=t.data.domProps||{},c=r.data.domProps||{};for(o in n(c.__ob__)&&(c=r.data.domProps=C({},c)),s)o in c||(a[o]="");for(o in c){if(i=c[o],"textContent"===o||"innerHTML"===o){if(r.children&&(r.children.length=0),i===s[o])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===o&&"PROGRESS"!==a.tagName){a._value=i;var l=e(i)?"":String(i);ao(a,l)&&(a.value=l)}else if("innerHTML"===o&&Gn(a.tagName)&&e(a.innerHTML)){(ro=ro||document.createElement("div")).innerHTML="<svg>"+i+"</svg>";for(var u=ro.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;u.firstChild;)a.appendChild(u.firstChild)}else if(i!==s[o])try{a[o]=i}catch(My){}}}}function ao(t,e){return!t.composing&&("OPTION"===t.tagName||function(t,e){var n=!0;try{n=document.activeElement!==t}catch(My){}return n&&t.value!==e}(t,e)||function(t,e){var r=t.value,o=t._vModifiers;if(n(o)){if(o.number)return f(r)!==f(e);if(o.trim)return r.trim()!==e.trim()}return r!==e}(t,e))}var so={create:io,update:io},co=y((function(t){var e={},n=/:(.+)/;return t.split(/;(?![^(]*\))/g).forEach((function(t){if(t){var r=t.split(n);r.length>1&&(e[r[0].trim()]=r[1].trim())}})),e}));function lo(t){var e=uo(t.style);return t.staticStyle?C(t.staticStyle,e):e}function uo(t){return Array.isArray(t)?M(t):"string"==typeof t?co(t):t}var fo,po=/^--/,ho=/\s*!important$/,vo=function(t,e,n){if(po.test(e))t.style.setProperty(e,n);else if(ho.test(n))t.style.setProperty(k(e),n.replace(ho,""),"important");else{var r=go(e);if(Array.isArray(n))for(var o=0,i=n.length;o<i;o++)t.style[r]=n[o];else t.style[r]=n}},mo=["Webkit","Moz","ms"],go=y((function(t){if(fo=fo||document.createElement("div").style,"filter"!==(t=w(t))&&t in fo)return t;for(var e=t.charAt(0).toUpperCase()+t.slice(1),n=0;n<mo.length;n++){var r=mo[n]+e;if(r in fo)return r}}));function yo(t,r){var o=r.data,i=t.data;if(!(e(o.staticStyle)&&e(o.style)&&e(i.staticStyle)&&e(i.style))){var a,s,c=r.elm,l=i.staticStyle,u=i.normalizedStyle||i.style||{},f=l||u,p=uo(r.data.style)||{};r.data.normalizedStyle=n(p.__ob__)?C({},p):p;var d=function(t,e){var n,r={};if(e)for(var o=t;o.componentInstance;)(o=o.componentInstance._vnode)&&o.data&&(n=lo(o.data))&&C(r,n);(n=lo(t.data))&&C(r,n);for(var i=t;i=i.parent;)i.data&&(n=lo(i.data))&&C(r,n);return r}(r,!0);for(s in f)e(d[s])&&vo(c,s,"");for(s in d)(a=d[s])!==f[s]&&vo(c,s,null==a?"":a)}}var bo={create:yo,update:yo},wo=/\s+/;function xo(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(wo).forEach((function(e){return t.classList.add(e)})):t.classList.add(e);else{var n=" "+(t.getAttribute("class")||"")+" ";n.indexOf(" "+e+" ")<0&&t.setAttribute("class",(n+e).trim())}}function So(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(wo).forEach((function(e){return t.classList.remove(e)})):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{for(var n=" "+(t.getAttribute("class")||"")+" ",r=" "+e+" ";n.indexOf(r)>=0;)n=n.replace(r," ");(n=n.trim())?t.setAttribute("class",n):t.removeAttribute("class")}}function ko(t){if(t){if("object"==typeof t){var e={};return!1!==t.css&&C(e,_o(t.name||"v")),C(e,t),e}return"string"==typeof t?_o(t):void 0}}var _o=y((function(t){return{enterClass:t+"-enter",enterToClass:t+"-enter-to",enterActiveClass:t+"-enter-active",leaveClass:t+"-leave",leaveToClass:t+"-leave-to",leaveActiveClass:t+"-leave-active"}})),Oo=V&&!K,Co="transition",Mo="transitionend",Do="animation",To="animationend";Oo&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(Co="WebkitTransition",Mo="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(Do="WebkitAnimation",To="webkitAnimationEnd"));var $o=V?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(t){return t()};function Ao(t){$o((function(){$o(t)}))}function Eo(t,e){var n=t._transitionClasses||(t._transitionClasses=[]);n.indexOf(e)<0&&(n.push(e),xo(t,e))}function No(t,e){t._transitionClasses&&v(t._transitionClasses,e),So(t,e)}function Po(t,e,n){var r=jo(t,e),o=r.type,i=r.timeout,a=r.propCount;if(!o)return n();var s="transition"===o?Mo:To,c=0,l=function(){t.removeEventListener(s,u),n()},u=function(e){e.target===t&&++c>=a&&l()};setTimeout((function(){c<a&&l()}),i+1),t.addEventListener(s,u)}var Io=/\b(transform|all)(,|$)/;function jo(t,e){var n,r=window.getComputedStyle(t),o=(r[Co+"Delay"]||"").split(", "),i=(r[Co+"Duration"]||"").split(", "),a=Ro(o,i),s=(r[Do+"Delay"]||"").split(", "),c=(r[Do+"Duration"]||"").split(", "),l=Ro(s,c),u=0,f=0;return"transition"===e?a>0&&(n="transition",u=a,f=i.length):"animation"===e?l>0&&(n="animation",u=l,f=c.length):f=(n=(u=Math.max(a,l))>0?a>l?"transition":"animation":null)?"transition"===n?i.length:c.length:0,{type:n,timeout:u,propCount:f,hasTransform:"transition"===n&&Io.test(r[Co+"Property"])}}function Ro(t,e){for(;t.length<e.length;)t=t.concat(t);return Math.max.apply(null,e.map((function(e,n){return zo(e)+zo(t[n])})))}function zo(t){return 1e3*Number(t.slice(0,-1).replace(",","."))}function Fo(t,r){var o=t.elm;n(o._leaveCb)&&(o._leaveCb.cancelled=!0,o._leaveCb());var a=ko(t.data.transition);if(!e(a)&&!n(o._enterCb)&&1===o.nodeType){for(var s=a.css,c=a.type,l=a.enterClass,u=a.enterToClass,p=a.enterActiveClass,d=a.appearClass,h=a.appearToClass,v=a.appearActiveClass,m=a.beforeEnter,g=a.enter,y=a.afterEnter,b=a.enterCancelled,w=a.beforeAppear,x=a.appear,S=a.afterAppear,k=a.appearCancelled,_=a.duration,O=Ge,C=Ge.$vnode;C&&C.parent;)O=C.context,C=C.parent;var M=!O._isMounted||!t.isRootInsert;if(!M||x||""===x){var D=M&&d?d:l,T=M&&v?v:p,$=M&&h?h:u,A=M&&w||m,E=M&&"function"==typeof x?x:g,P=M&&S||y,I=M&&k||b,j=f(i(_)?_.enter:_),R=!1!==s&&!K,z=Vo(E),F=o._enterCb=N((function(){R&&(No(o,$),No(o,T)),F.cancelled?(R&&No(o,D),I&&I(o)):P&&P(o),o._enterCb=null}));t.data.show||se(t,"insert",(function(){var e=o.parentNode,n=e&&e._pending&&e._pending[t.key];n&&n.tag===t.tag&&n.elm._leaveCb&&n.elm._leaveCb(),E&&E(o,F)})),A&&A(o),R&&(Eo(o,D),Eo(o,T),Ao((function(){No(o,D),F.cancelled||(Eo(o,$),z||(Bo(j)?setTimeout(F,j):Po(o,c,F)))}))),t.data.show&&(r&&r(),E&&E(o,F)),R||z||F()}}}function Lo(t,r){var o=t.elm;n(o._enterCb)&&(o._enterCb.cancelled=!0,o._enterCb());var a=ko(t.data.transition);if(e(a)||1!==o.nodeType)return r();if(!n(o._leaveCb)){var s=a.css,c=a.type,l=a.leaveClass,u=a.leaveToClass,p=a.leaveActiveClass,d=a.beforeLeave,h=a.leave,v=a.afterLeave,m=a.leaveCancelled,g=a.delayLeave,y=a.duration,b=!1!==s&&!K,w=Vo(h),x=f(i(y)?y.leave:y),S=o._leaveCb=N((function(){o.parentNode&&o.parentNode._pending&&(o.parentNode._pending[t.key]=null),b&&(No(o,u),No(o,p)),S.cancelled?(b&&No(o,l),m&&m(o)):(r(),v&&v(o)),o._leaveCb=null}));g?g(k):k()}function k(){S.cancelled||(!t.data.show&&o.parentNode&&((o.parentNode._pending||(o.parentNode._pending={}))[t.key]=t),d&&d(o),b&&(Eo(o,l),Eo(o,p),Ao((function(){No(o,l),S.cancelled||(Eo(o,u),w||(Bo(x)?setTimeout(S,x):Po(o,c,S)))}))),h&&h(o,S),b||w||S())}}function Bo(t){return"number"==typeof t&&!isNaN(t)}function Vo(t){if(e(t))return!1;var r=t.fns;return n(r)?Vo(Array.isArray(r)?r[0]:r):(t._length||t.length)>1}function Wo(t,e){!0!==e.data.show&&Fo(e)}var qo=function(t){var i,a,s={},c=t.modules,l=t.nodeOps;for(i=0;i<sr.length;++i)for(s[sr[i]]=[],a=0;a<c.length;++a)n(c[a][sr[i]])&&s[sr[i]].push(c[a][sr[i]]);function u(t){var e=l.parentNode(t);n(e)&&l.removeChild(e,t)}function f(t,e,o,i,a,c,u){if(n(t.elm)&&n(c)&&(t=c[u]=mt(t)),t.isRootInsert=!a,!function(t,e,o,i){var a=t.data;if(n(a)){var c=n(t.componentInstance)&&a.keepAlive;if(n(a=a.hook)&&n(a=a.init)&&a(t,!1),n(t.componentInstance))return d(t,e),h(o,t.elm,i),r(c)&&function(t,e,r,o){var i,a=t;for(;a.componentInstance;)if(n(i=(a=a.componentInstance._vnode).data)&&n(i=i.transition)){for(i=0;i<s.activate.length;++i)s.activate[i](ar,a);e.push(a);break}h(r,t.elm,o)}(t,e,o,i),!0}}(t,e,o,i)){var f=t.data,p=t.children,m=t.tag;n(m)?(t.elm=t.ns?l.createElementNS(t.ns,m):l.createElement(m,t),y(t),v(t,p,e),n(f)&&g(t,e),h(o,t.elm,i)):r(t.isComment)?(t.elm=l.createComment(t.text),h(o,t.elm,i)):(t.elm=l.createTextNode(t.text),h(o,t.elm,i))}}function d(t,e){n(t.data.pendingInsert)&&(e.push.apply(e,t.data.pendingInsert),t.data.pendingInsert=null),t.elm=t.componentInstance.$el,m(t)?(g(t,e),y(t)):(ir(t),e.push(t))}function h(t,e,r){n(t)&&(n(r)?l.parentNode(r)===t&&l.insertBefore(t,e,r):l.appendChild(t,e))}function v(t,e,n){if(Array.isArray(e))for(var r=0;r<e.length;++r)f(e[r],n,t.elm,null,!0,e,r);else o(t.text)&&l.appendChild(t.elm,l.createTextNode(String(t.text)))}function m(t){for(;t.componentInstance;)t=t.componentInstance._vnode;return n(t.tag)}function g(t,e){for(var r=0;r<s.create.length;++r)s.create[r](ar,t);n(i=t.data.hook)&&(n(i.create)&&i.create(ar,t),n(i.insert)&&e.push(t))}function y(t){var e;if(n(e=t.fnScopeId))l.setStyleScope(t.elm,e);else for(var r=t;r;)n(e=r.context)&&n(e=e.$options._scopeId)&&l.setStyleScope(t.elm,e),r=r.parent;n(e=Ge)&&e!==t.context&&e!==t.fnContext&&n(e=e.$options._scopeId)&&l.setStyleScope(t.elm,e)}function b(t,e,n,r,o,i){for(;r<=o;++r)f(n[r],i,t,e,!1,n,r)}function w(t){var e,r,o=t.data;if(n(o))for(n(e=o.hook)&&n(e=e.destroy)&&e(t),e=0;e<s.destroy.length;++e)s.destroy[e](t);if(n(e=t.children))for(r=0;r<t.children.length;++r)w(t.children[r])}function x(t,e,r){for(;e<=r;++e){var o=t[e];n(o)&&(n(o.tag)?(S(o),w(o)):u(o.elm))}}function S(t,e){if(n(e)||n(t.data)){var r,o=s.remove.length+1;for(n(e)?e.listeners+=o:e=function(t,e){function n(){0==--n.listeners&&u(t)}return n.listeners=e,n}(t.elm,o),n(r=t.componentInstance)&&n(r=r._vnode)&&n(r.data)&&S(r,e),r=0;r<s.remove.length;++r)s.remove[r](t,e);n(r=t.data.hook)&&n(r=r.remove)?r(t,e):e()}else u(t.elm)}function k(t,e,r,o){for(var i=r;i<o;i++){var a=e[i];if(n(a)&&cr(t,a))return i}}function _(t,o,i,a,c,u){if(t!==o){n(o.elm)&&n(a)&&(o=a[c]=mt(o));var p=o.elm=t.elm;if(r(t.isAsyncPlaceholder))n(o.asyncFactory.resolved)?M(t.elm,o,i):o.isAsyncPlaceholder=!0;else if(r(o.isStatic)&&r(t.isStatic)&&o.key===t.key&&(r(o.isCloned)||r(o.isOnce)))o.componentInstance=t.componentInstance;else{var d,h=o.data;n(h)&&n(d=h.hook)&&n(d=d.prepatch)&&d(t,o);var v=t.children,g=o.children;if(n(h)&&m(o)){for(d=0;d<s.update.length;++d)s.update[d](t,o);n(d=h.hook)&&n(d=d.update)&&d(t,o)}e(o.text)?n(v)&&n(g)?v!==g&&function(t,r,o,i,a){for(var s,c,u,p=0,d=0,h=r.length-1,v=r[0],m=r[h],g=o.length-1,y=o[0],w=o[g],S=!a;p<=h&&d<=g;)e(v)?v=r[++p]:e(m)?m=r[--h]:cr(v,y)?(_(v,y,i,o,d),v=r[++p],y=o[++d]):cr(m,w)?(_(m,w,i,o,g),m=r[--h],w=o[--g]):cr(v,w)?(_(v,w,i,o,g),S&&l.insertBefore(t,v.elm,l.nextSibling(m.elm)),v=r[++p],w=o[--g]):cr(m,y)?(_(m,y,i,o,d),S&&l.insertBefore(t,m.elm,v.elm),m=r[--h],y=o[++d]):(e(s)&&(s=lr(r,p,h)),e(c=n(y.key)?s[y.key]:k(y,r,p,h))?f(y,i,t,v.elm,!1,o,d):cr(u=r[c],y)?(_(u,y,i,o,d),r[c]=void 0,S&&l.insertBefore(t,u.elm,v.elm)):f(y,i,t,v.elm,!1,o,d),y=o[++d]);p>h?b(t,e(o[g+1])?null:o[g+1].elm,o,d,g,i):d>g&&x(r,p,h)}(p,v,g,i,u):n(g)?(n(t.text)&&l.setTextContent(p,""),b(p,null,g,0,g.length-1,i)):n(v)?x(v,0,v.length-1):n(t.text)&&l.setTextContent(p,""):t.text!==o.text&&l.setTextContent(p,o.text),n(h)&&n(d=h.hook)&&n(d=d.postpatch)&&d(t,o)}}}function O(t,e,o){if(r(o)&&n(t.parent))t.parent.data.pendingInsert=e;else for(var i=0;i<e.length;++i)e[i].data.hook.insert(e[i])}var C=p("attrs,class,staticClass,staticStyle,key");function M(t,e,o,i){var a,s=e.tag,c=e.data,l=e.children;if(i=i||c&&c.pre,e.elm=t,r(e.isComment)&&n(e.asyncFactory))return e.isAsyncPlaceholder=!0,!0;if(n(c)&&(n(a=c.hook)&&n(a=a.init)&&a(e,!0),n(a=e.componentInstance)))return d(e,o),!0;if(n(s)){if(n(l))if(t.hasChildNodes())if(n(a=c)&&n(a=a.domProps)&&n(a=a.innerHTML)){if(a!==t.innerHTML)return!1}else{for(var u=!0,f=t.firstChild,p=0;p<l.length;p++){if(!f||!M(f,l[p],o,i)){u=!1;break}f=f.nextSibling}if(!u||f)return!1}else v(e,l,o);if(n(c)){var h=!1;for(var m in c)if(!C(m)){h=!0,g(e,o);break}!h&&c.class&&ne(c.class)}}else t.data!==e.text&&(t.data=e.text);return!0}return function(t,o,i,a){if(!e(o)){var c,u=!1,p=[];if(e(t))u=!0,f(o,p);else{var d=n(t.nodeType);if(!d&&cr(t,o))_(t,o,p,null,null,a);else{if(d){if(1===t.nodeType&&t.hasAttribute("data-server-rendered")&&(t.removeAttribute("data-server-rendered"),i=!0),r(i)&&M(t,o,p))return O(o,p,!0),t;c=t,t=new pt(l.tagName(c).toLowerCase(),{},[],void 0,c)}var h=t.elm,v=l.parentNode(h);if(f(o,p,h._leaveCb?null:v,l.nextSibling(h)),n(o.parent))for(var g=o.parent,y=m(o);g;){for(var b=0;b<s.destroy.length;++b)s.destroy[b](g);if(g.elm=o.elm,y){for(var S=0;S<s.create.length;++S)s.create[S](ar,g);var k=g.data.hook.insert;if(k.merged)for(var C=1;C<k.fns.length;C++)k.fns[C]()}else ir(g);g=g.parent}n(v)?x([t],0,0):n(t.tag)&&w(t)}}return O(o,p,u),o.elm}n(t)&&w(t)}}({nodeOps:rr,modules:[wr,Dr,oo,so,bo,V?{create:Wo,activate:Wo,remove:function(t,e){!0!==t.data.show?Lo(t,e):e()}}:{}].concat(mr)});K&&document.addEventListener("selectionchange",(function(){var t=document.activeElement;t&&t.vmodel&&Zo(t,"input")}));var Ho={inserted:function(t,e,n,r){"select"===n.tag?(r.elm&&!r.elm._vOptions?se(n,"postpatch",(function(){Ho.componentUpdated(t,e,n)})):Jo(t,e,n.context),t._vOptions=[].map.call(t.options,Uo)):("textarea"===n.tag||er(t.type))&&(t._vModifiers=e.modifiers,e.modifiers.lazy||(t.addEventListener("compositionstart",Xo),t.addEventListener("compositionend",Go),t.addEventListener("change",Go),K&&(t.vmodel=!0)))},componentUpdated:function(t,e,n){if("select"===n.tag){Jo(t,e,n.context);var r=t._vOptions,o=t._vOptions=[].map.call(t.options,Uo);if(o.some((function(t,e){return!A(t,r[e])})))(t.multiple?e.value.some((function(t){return Yo(t,o)})):e.value!==e.oldValue&&Yo(e.value,o))&&Zo(t,"change")}}};function Jo(t,e,n){Ko(t,e),(J||Y)&&setTimeout((function(){Ko(t,e)}),0)}function Ko(t,e,n){var r=e.value,o=t.multiple;if(!o||Array.isArray(r)){for(var i,a,s=0,c=t.options.length;s<c;s++)if(a=t.options[s],o)i=E(r,Uo(a))>-1,a.selected!==i&&(a.selected=i);else if(A(Uo(a),r))return void(t.selectedIndex!==s&&(t.selectedIndex=s));o||(t.selectedIndex=-1)}}function Yo(t,e){return e.every((function(e){return!A(e,t)}))}function Uo(t){return"_value"in t?t._value:t.value}function Xo(t){t.target.composing=!0}function Go(t){t.target.composing&&(t.target.composing=!1,Zo(t.target,"input"))}function Zo(t,e){var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!0),t.dispatchEvent(n)}function Qo(t){return!t.componentInstance||t.data&&t.data.transition?t:Qo(t.componentInstance._vnode)}var ti={model:Ho,show:{bind:function(t,e,n){var r=e.value,o=(n=Qo(n)).data&&n.data.transition,i=t.__vOriginalDisplay="none"===t.style.display?"":t.style.display;r&&o?(n.data.show=!0,Fo(n,(function(){t.style.display=i}))):t.style.display=r?i:"none"},update:function(t,e,n){var r=e.value;!r!=!e.oldValue&&((n=Qo(n)).data&&n.data.transition?(n.data.show=!0,r?Fo(n,(function(){t.style.display=t.__vOriginalDisplay})):Lo(n,(function(){t.style.display="none"}))):t.style.display=r?t.__vOriginalDisplay:"none")},unbind:function(t,e,n,r,o){o||(t.style.display=t.__vOriginalDisplay)}}},ei={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function ni(t){var e=t&&t.componentOptions;return e&&e.Ctor.options.abstract?ni(Je(e.children)):t}function ri(t){var e={},n=t.$options;for(var r in n.propsData)e[r]=t[r];var o=n._parentListeners;for(var i in o)e[w(i)]=o[i];return e}function oi(t,e){if(/\d-keep-alive$/.test(e.tag))return t("keep-alive",{props:e.componentOptions.propsData})}var ii=function(t){return t.tag||ve(t)},ai=function(t){return"show"===t.name},si={name:"transition",props:ei,abstract:!0,render:function(t){var e=this,n=this.$slots.default;if(n&&(n=n.filter(ii)).length){var r=this.mode,i=n[0];if(function(t){for(;t=t.parent;)if(t.data.transition)return!0}(this.$vnode))return i;var a=ni(i);if(!a)return i;if(this._leaving)return oi(t,i);var s="__transition-"+this._uid+"-";a.key=null==a.key?a.isComment?s+"comment":s+a.tag:o(a.key)?0===String(a.key).indexOf(s)?a.key:s+a.key:a.key;var c=(a.data||(a.data={})).transition=ri(this),l=this._vnode,u=ni(l);if(a.data.directives&&a.data.directives.some(ai)&&(a.data.show=!0),u&&u.data&&!function(t,e){return e.key===t.key&&e.tag===t.tag}(a,u)&&!ve(u)&&(!u.componentInstance||!u.componentInstance._vnode.isComment)){var f=u.data.transition=C({},c);if("out-in"===r)return this._leaving=!0,se(f,"afterLeave",(function(){e._leaving=!1,e.$forceUpdate()})),oi(t,i);if("in-out"===r){if(ve(a))return l;var p,d=function(){p()};se(c,"afterEnter",d),se(c,"enterCancelled",d),se(f,"delayLeave",(function(t){p=t}))}}return i}}},ci=C({tag:String,moveClass:String},ei);delete ci.mode;var li={props:ci,beforeMount:function(){var t=this,e=this._update;this._update=function(n,r){var o=Ze(t);t.__patch__(t._vnode,t.kept,!1,!0),t._vnode=t.kept,o(),e.call(t,n,r)}},render:function(t){for(var e=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,o=this.$slots.default||[],i=this.children=[],a=ri(this),s=0;s<o.length;s++){var c=o[s];c.tag&&null!=c.key&&0!==String(c.key).indexOf("__vlist")&&(i.push(c),n[c.key]=c,(c.data||(c.data={})).transition=a)}if(r){for(var l=[],u=[],f=0;f<r.length;f++){var p=r[f];p.data.transition=a,p.data.pos=p.elm.getBoundingClientRect(),n[p.key]?l.push(p):u.push(p)}this.kept=t(e,null,l),this.removed=u}return t(e,null,i)},updated:function(){var t=this.prevChildren,e=this.moveClass||(this.name||"v")+"-move";t.length&&this.hasMove(t[0].elm,e)&&(t.forEach(ui),t.forEach(fi),t.forEach(pi),this._reflow=document.body.offsetHeight,t.forEach((function(t){if(t.data.moved){var n=t.elm,r=n.style;Eo(n,e),r.transform=r.WebkitTransform=r.transitionDuration="",n.addEventListener(Mo,n._moveCb=function t(r){r&&r.target!==n||r&&!/transform$/.test(r.propertyName)||(n.removeEventListener(Mo,t),n._moveCb=null,No(n,e))})}})))},methods:{hasMove:function(t,e){if(!Oo)return!1;if(this._hasMove)return this._hasMove;var n=t.cloneNode();t._transitionClasses&&t._transitionClasses.forEach((function(t){So(n,t)})),xo(n,e),n.style.display="none",this.$el.appendChild(n);var r=jo(n);return this.$el.removeChild(n),this._hasMove=r.hasTransform}}};function ui(t){t.elm._moveCb&&t.elm._moveCb(),t.elm._enterCb&&t.elm._enterCb()}function fi(t){t.data.newPos=t.elm.getBoundingClientRect()}function pi(t){var e=t.data.pos,n=t.data.newPos,r=e.left-n.left,o=e.top-n.top;if(r||o){t.data.moved=!0;var i=t.elm.style;i.transform=i.WebkitTransform="translate("+r+"px,"+o+"px)",i.transitionDuration="0s"}}var di={Transition:si,TransitionGroup:li};Cn.config.mustUseProp=Rn,Cn.config.isReservedTag=Zn,Cn.config.isReservedAttr=In,Cn.config.getTagNamespace=Qn,Cn.config.isUnknownElement=function(t){if(!V)return!0;if(Zn(t))return!1;if(t=t.toLowerCase(),null!=tr[t])return tr[t];var e=document.createElement(t);return t.indexOf("-")>-1?tr[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:tr[t]=/HTMLUnknownElement/.test(e.toString())},C(Cn.options.directives,ti),C(Cn.options.components,di),Cn.prototype.__patch__=V?qo:D,Cn.prototype.$mount=function(t,e){return function(t,e,n){var r;return t.$el=e,t.$options.render||(t.$options.render=ht),nn(t,"beforeMount"),r=function(){t._update(t._render(),n)},new vn(t,r,D,{before:function(){t._isMounted&&!t._isDestroyed&&nn(t,"beforeUpdate")}},!0),n=!1,null==t.$vnode&&(t._isMounted=!0,nn(t,"mounted")),t}(this,t=t&&V?nr(t):void 0,e)},V&&setTimeout((function(){j.devtools&&nt&&nt.emit("init",Cn)}),0);var hi=/\{\{((?:.|\r?\n)+?)\}\}/g,vi=/[-.*+?^${}()|[\]\/\\]/g,mi=y((function(t){var e=t[0].replace(vi,"\\$&"),n=t[1].replace(vi,"\\$&");return new RegExp(e+"((?:.|\\n)+?)"+n,"g")}));var gi={staticKeys:["staticClass"],transformNode:function(t,e){e.warn;var n=Br(t,"class");n&&(t.staticClass=JSON.stringify(n));var r=Lr(t,"class",!1);r&&(t.classBinding=r)},genData:function(t){var e="";return t.staticClass&&(e+="staticClass:"+t.staticClass+","),t.classBinding&&(e+="class:"+t.classBinding+","),e}};var yi,bi={staticKeys:["staticStyle"],transformNode:function(t,e){e.warn;var n=Br(t,"style");n&&(t.staticStyle=JSON.stringify(co(n)));var r=Lr(t,"style",!1);r&&(t.styleBinding=r)},genData:function(t){var e="";return t.staticStyle&&(e+="staticStyle:"+t.staticStyle+","),t.styleBinding&&(e+="style:("+t.styleBinding+"),"),e}},wi=function(t){return(yi=yi||document.createElement("div")).innerHTML=t,yi.textContent},xi=p("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"),Si=p("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),ki=p("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"),_i=/^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,Oi=/^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+?\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,Ci="[a-zA-Z_][\\-\\.0-9_a-zA-Z"+R.source+"]*",Mi="((?:"+Ci+"\\:)?"+Ci+")",Di=new RegExp("^<"+Mi),Ti=/^\s*(\/?)>/,$i=new RegExp("^<\\/"+Mi+"[^>]*>"),Ai=/^<!DOCTYPE [^>]+>/i,Ei=/^<!\--/,Ni=/^<!\[/,Pi=p("script,style,textarea",!0),Ii={},ji={"&lt;":"<","&gt;":">","&quot;":'"',"&amp;":"&","&#10;":"\n","&#9;":"\t","&#39;":"'"},Ri=/&(?:lt|gt|quot|amp|#39);/g,zi=/&(?:lt|gt|quot|amp|#39|#10|#9);/g,Fi=p("pre,textarea",!0),Li=function(t,e){return t&&Fi(t)&&"\n"===e[0]};function Bi(t,e){var n=e?zi:Ri;return t.replace(n,(function(t){return ji[t]}))}var Vi,Wi,qi,Hi,Ji,Ki,Yi,Ui,Xi=/^@|^v-on:/,Gi=/^v-|^@|^:|^#/,Zi=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,Qi=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,ta=/^\(|\)$/g,ea=/^\[.*\]$/,na=/:(.*)$/,ra=/^:|^\.|^v-bind:/,oa=/\.[^.\]]+(?=[^\]]*$)/g,ia=/^v-slot(:|$)|^#/,aa=/[\r\n]/,sa=/[ \f\t\r\n]+/g,ca=y(wi);function la(t,e,n){return{type:1,tag:t,attrsList:e,attrsMap:ma(e),rawAttrsMap:{},parent:n,children:[]}}function ua(t,e){Vi=e.warn||Er,Ki=e.isPreTag||T,Yi=e.mustUseProp||T,Ui=e.getTagNamespace||T,e.isReservedTag,qi=Nr(e.modules,"transformNode"),Hi=Nr(e.modules,"preTransformNode"),Ji=Nr(e.modules,"postTransformNode"),Wi=e.delimiters;var n,r,o=[],i=!1!==e.preserveWhitespace,a=e.whitespace,s=!1,c=!1;function l(t){if(u(t),s||t.processed||(t=fa(t,e)),o.length||t===n||n.if&&(t.elseif||t.else)&&da(n,{exp:t.elseif,block:t}),r&&!t.forbidden)if(t.elseif||t.else)a=t,l=function(t){for(var e=t.length;e--;){if(1===t[e].type)return t[e];t.pop()}}(r.children),l&&l.if&&da(l,{exp:a.elseif,block:a});else{if(t.slotScope){var i=t.slotTarget||'"default"';(r.scopedSlots||(r.scopedSlots={}))[i]=t}r.children.push(t),t.parent=r}var a,l;t.children=t.children.filter((function(t){return!t.slotScope})),u(t),t.pre&&(s=!1),Ki(t.tag)&&(c=!1);for(var f=0;f<Ji.length;f++)Ji[f](t,e)}function u(t){if(!c)for(var e;(e=t.children[t.children.length-1])&&3===e.type&&" "===e.text;)t.children.pop()}return function(t,e){for(var n,r,o=[],i=e.expectHTML,a=e.isUnaryTag||T,s=e.canBeLeftOpenTag||T,c=0;t;){if(n=t,r&&Pi(r)){var l=0,u=r.toLowerCase(),f=Ii[u]||(Ii[u]=new RegExp("([\\s\\S]*?)(</"+u+"[^>]*>)","i")),p=t.replace(f,(function(t,n,r){return l=r.length,Pi(u)||"noscript"===u||(n=n.replace(/<!\--([\s\S]*?)-->/g,"$1").replace(/<!\[CDATA\[([\s\S]*?)]]>/g,"$1")),Li(u,n)&&(n=n.slice(1)),e.chars&&e.chars(n),""}));c+=t.length-p.length,t=p,C(u,c-l,c)}else{var d=t.indexOf("<");if(0===d){if(Ei.test(t)){var h=t.indexOf("--\x3e");if(h>=0){e.shouldKeepComment&&e.comment(t.substring(4,h),c,c+h+3),k(h+3);continue}}if(Ni.test(t)){var v=t.indexOf("]>");if(v>=0){k(v+2);continue}}var m=t.match(Ai);if(m){k(m[0].length);continue}var g=t.match($i);if(g){var y=c;k(g[0].length),C(g[1],y,c);continue}var b=_();if(b){O(b),Li(b.tagName,t)&&k(1);continue}}var w=void 0,x=void 0,S=void 0;if(d>=0){for(x=t.slice(d);!($i.test(x)||Di.test(x)||Ei.test(x)||Ni.test(x)||(S=x.indexOf("<",1))<0);)d+=S,x=t.slice(d);w=t.substring(0,d)}d<0&&(w=t),w&&k(w.length),e.chars&&w&&e.chars(w,c-w.length,c)}if(t===n){e.chars&&e.chars(t);break}}function k(e){c+=e,t=t.substring(e)}function _(){var e=t.match(Di);if(e){var n,r,o={tagName:e[1],attrs:[],start:c};for(k(e[0].length);!(n=t.match(Ti))&&(r=t.match(Oi)||t.match(_i));)r.start=c,k(r[0].length),r.end=c,o.attrs.push(r);if(n)return o.unarySlash=n[1],k(n[0].length),o.end=c,o}}function O(t){var n=t.tagName,c=t.unarySlash;i&&("p"===r&&ki(n)&&C(r),s(n)&&r===n&&C(n));for(var l=a(n)||!!c,u=t.attrs.length,f=new Array(u),p=0;p<u;p++){var d=t.attrs[p],h=d[3]||d[4]||d[5]||"",v="a"===n&&"href"===d[1]?e.shouldDecodeNewlinesForHref:e.shouldDecodeNewlines;f[p]={name:d[1],value:Bi(h,v)}}l||(o.push({tag:n,lowerCasedTag:n.toLowerCase(),attrs:f,start:t.start,end:t.end}),r=n),e.start&&e.start(n,f,l,t.start,t.end)}function C(t,n,i){var a,s;if(null==n&&(n=c),null==i&&(i=c),t)for(s=t.toLowerCase(),a=o.length-1;a>=0&&o[a].lowerCasedTag!==s;a--);else a=0;if(a>=0){for(var l=o.length-1;l>=a;l--)e.end&&e.end(o[l].tag,n,i);o.length=a,r=a&&o[a-1].tag}else"br"===s?e.start&&e.start(t,[],!0,n,i):"p"===s&&(e.start&&e.start(t,[],!1,n,i),e.end&&e.end(t,n,i))}C()}(t,{warn:Vi,expectHTML:e.expectHTML,isUnaryTag:e.isUnaryTag,canBeLeftOpenTag:e.canBeLeftOpenTag,shouldDecodeNewlines:e.shouldDecodeNewlines,shouldDecodeNewlinesForHref:e.shouldDecodeNewlinesForHref,shouldKeepComment:e.comments,outputSourceRange:e.outputSourceRange,start:function(t,i,a,u,f){var p=r&&r.ns||Ui(t);J&&"svg"===p&&(i=function(t){for(var e=[],n=0;n<t.length;n++){var r=t[n];ga.test(r.name)||(r.name=r.name.replace(ya,""),e.push(r))}return e}(i));var d,h=la(t,i,r);p&&(h.ns=p),"style"!==(d=h).tag&&("script"!==d.tag||d.attrsMap.type&&"text/javascript"!==d.attrsMap.type)||et()||(h.forbidden=!0);for(var v=0;v<Hi.length;v++)h=Hi[v](h,e)||h;s||(!function(t){null!=Br(t,"v-pre")&&(t.pre=!0)}(h),h.pre&&(s=!0)),Ki(h.tag)&&(c=!0),s?function(t){var e=t.attrsList,n=e.length;if(n)for(var r=t.attrs=new Array(n),o=0;o<n;o++)r[o]={name:e[o].name,value:JSON.stringify(e[o].value)},null!=e[o].start&&(r[o].start=e[o].start,r[o].end=e[o].end);else t.pre||(t.plain=!0)}(h):h.processed||(pa(h),function(t){var e=Br(t,"v-if");if(e)t.if=e,da(t,{exp:e,block:t});else{null!=Br(t,"v-else")&&(t.else=!0);var n=Br(t,"v-else-if");n&&(t.elseif=n)}}(h),function(t){null!=Br(t,"v-once")&&(t.once=!0)}(h)),n||(n=h),a?l(h):(r=h,o.push(h))},end:function(t,e,n){var i=o[o.length-1];o.length-=1,r=o[o.length-1],l(i)},chars:function(t,e,n){if(r&&(!J||"textarea"!==r.tag||r.attrsMap.placeholder!==t)){var o,l,u,f=r.children;if(t=c||t.trim()?"script"===(o=r).tag||"style"===o.tag?t:ca(t):f.length?a?"condense"===a&&aa.test(t)?"":" ":i?" ":"":"")c||"condense"!==a||(t=t.replace(sa," ")),!s&&" "!==t&&(l=function(t,e){var n=e?mi(e):hi;if(n.test(t)){for(var r,o,i,a=[],s=[],c=n.lastIndex=0;r=n.exec(t);){(o=r.index)>c&&(s.push(i=t.slice(c,o)),a.push(JSON.stringify(i)));var l=$r(r[1].trim());a.push("_s("+l+")"),s.push({"@binding":l}),c=o+r[0].length}return c<t.length&&(s.push(i=t.slice(c)),a.push(JSON.stringify(i))),{expression:a.join("+"),tokens:s}}}(t,Wi))?u={type:2,expression:l.expression,tokens:l.tokens,text:t}:" "===t&&f.length&&" "===f[f.length-1].text||(u={type:3,text:t}),u&&f.push(u)}},comment:function(t,e,n){if(r){var o={type:3,text:t,isComment:!0};r.children.push(o)}}}),n}function fa(t,e){var n,r;(r=Lr(n=t,"key"))&&(n.key=r),t.plain=!t.key&&!t.scopedSlots&&!t.attrsList.length,function(t){var e=Lr(t,"ref");e&&(t.ref=e,t.refInFor=function(t){var e=t;for(;e;){if(void 0!==e.for)return!0;e=e.parent}return!1}(t))}(t),function(t){var e;"template"===t.tag?(e=Br(t,"scope"),t.slotScope=e||Br(t,"slot-scope")):(e=Br(t,"slot-scope"))&&(t.slotScope=e);var n=Lr(t,"slot");n&&(t.slotTarget='""'===n?'"default"':n,t.slotTargetDynamic=!(!t.attrsMap[":slot"]&&!t.attrsMap["v-bind:slot"]),"template"===t.tag||t.slotScope||Ir(t,"slot",n,function(t,e){return t.rawAttrsMap[":"+e]||t.rawAttrsMap["v-bind:"+e]||t.rawAttrsMap[e]}(t,"slot")));if("template"===t.tag){var r=Vr(t,ia);if(r){var o=ha(r),i=o.name,a=o.dynamic;t.slotTarget=i,t.slotTargetDynamic=a,t.slotScope=r.value||"_empty_"}}else{var s=Vr(t,ia);if(s){var c=t.scopedSlots||(t.scopedSlots={}),l=ha(s),u=l.name,f=l.dynamic,p=c[u]=la("template",[],t);p.slotTarget=u,p.slotTargetDynamic=f,p.children=t.children.filter((function(t){if(!t.slotScope)return t.parent=p,!0})),p.slotScope=s.value||"_empty_",t.children=[],t.plain=!1}}}(t),function(t){"slot"===t.tag&&(t.slotName=Lr(t,"name"))}(t),function(t){var e;(e=Lr(t,"is"))&&(t.component=e);null!=Br(t,"inline-template")&&(t.inlineTemplate=!0)}(t);for(var o=0;o<qi.length;o++)t=qi[o](t,e)||t;return function(t){var e,n,r,o,i,a,s,c,l=t.attrsList;for(e=0,n=l.length;e<n;e++)if(r=o=l[e].name,i=l[e].value,Gi.test(r))if(t.hasBindings=!0,(a=va(r.replace(Gi,"")))&&(r=r.replace(oa,"")),ra.test(r))r=r.replace(ra,""),i=$r(i),(c=ea.test(r))&&(r=r.slice(1,-1)),a&&(a.prop&&!c&&"innerHtml"===(r=w(r))&&(r="innerHTML"),a.camel&&!c&&(r=w(r)),a.sync&&(s=Hr(i,"$event"),c?Fr(t,'"update:"+('+r+")",s,null,!1,0,l[e],!0):(Fr(t,"update:"+w(r),s,null,!1,0,l[e]),k(r)!==w(r)&&Fr(t,"update:"+k(r),s,null,!1,0,l[e])))),a&&a.prop||!t.component&&Yi(t.tag,t.attrsMap.type,r)?Pr(t,r,i,l[e],c):Ir(t,r,i,l[e],c);else if(Xi.test(r))r=r.replace(Xi,""),(c=ea.test(r))&&(r=r.slice(1,-1)),Fr(t,r,i,a,!1,0,l[e],c);else{var u=(r=r.replace(Gi,"")).match(na),f=u&&u[1];c=!1,f&&(r=r.slice(0,-(f.length+1)),ea.test(f)&&(f=f.slice(1,-1),c=!0)),Rr(t,r,o,i,f,c,a,l[e])}else Ir(t,r,JSON.stringify(i),l[e]),!t.component&&"muted"===r&&Yi(t.tag,t.attrsMap.type,r)&&Pr(t,r,"true",l[e])}(t),t}function pa(t){var e;if(e=Br(t,"v-for")){var n=function(t){var e=t.match(Zi);if(!e)return;var n={};n.for=e[2].trim();var r=e[1].trim().replace(ta,""),o=r.match(Qi);o?(n.alias=r.replace(Qi,"").trim(),n.iterator1=o[1].trim(),o[2]&&(n.iterator2=o[2].trim())):n.alias=r;return n}(e);n&&C(t,n)}}function da(t,e){t.ifConditions||(t.ifConditions=[]),t.ifConditions.push(e)}function ha(t){var e=t.name.replace(ia,"");return e||"#"!==t.name[0]&&(e="default"),ea.test(e)?{name:e.slice(1,-1),dynamic:!0}:{name:'"'+e+'"',dynamic:!1}}function va(t){var e=t.match(oa);if(e){var n={};return e.forEach((function(t){n[t.slice(1)]=!0})),n}}function ma(t){for(var e={},n=0,r=t.length;n<r;n++)e[t[n].name]=t[n].value;return e}var ga=/^xmlns:NS\d+/,ya=/^NS\d+:/;function ba(t){return la(t.tag,t.attrsList.slice(),t.parent)}var wa=[gi,bi,{preTransformNode:function(t,e){if("input"===t.tag){var n,r=t.attrsMap;if(!r["v-model"])return;if((r[":type"]||r["v-bind:type"])&&(n=Lr(t,"type")),r.type||n||!r["v-bind"]||(n="("+r["v-bind"]+").type"),n){var o=Br(t,"v-if",!0),i=o?"&&("+o+")":"",a=null!=Br(t,"v-else",!0),s=Br(t,"v-else-if",!0),c=ba(t);pa(c),jr(c,"type","checkbox"),fa(c,e),c.processed=!0,c.if="("+n+")==='checkbox'"+i,da(c,{exp:c.if,block:c});var l=ba(t);Br(l,"v-for",!0),jr(l,"type","radio"),fa(l,e),da(c,{exp:"("+n+")==='radio'"+i,block:l});var u=ba(t);return Br(u,"v-for",!0),jr(u,":type",n),fa(u,e),da(c,{exp:o,block:u}),a?c.else=!0:s&&(c.elseif=s),c}}}}];var xa,Sa,ka,_a={model:function(t,e,n){var r=e.value,o=e.modifiers,i=t.tag,a=t.attrsMap.type;if(t.component)return qr(t,r,o),!1;if("select"===i)!function(t,e,n){var r='var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;return '+(n&&n.number?"_n(val)":"val")+"});";r=r+" "+Hr(e,"$event.target.multiple ? $$selectedVal : $$selectedVal[0]"),Fr(t,"change",r,null,!0)}(t,r,o);else if("input"===i&&"checkbox"===a)!function(t,e,n){var r=n&&n.number,o=Lr(t,"value")||"null",i=Lr(t,"true-value")||"true",a=Lr(t,"false-value")||"false";Pr(t,"checked","Array.isArray("+e+")?_i("+e+","+o+")>-1"+("true"===i?":("+e+")":":_q("+e+","+i+")")),Fr(t,"change","var $$a="+e+",$$el=$event.target,$$c=$$el.checked?("+i+"):("+a+");if(Array.isArray($$a)){var $$v="+(r?"_n("+o+")":o)+",$$i=_i($$a,$$v);if($$el.checked){$$i<0&&("+Hr(e,"$$a.concat([$$v])")+")}else{$$i>-1&&("+Hr(e,"$$a.slice(0,$$i).concat($$a.slice($$i+1))")+")}}else{"+Hr(e,"$$c")+"}",null,!0)}(t,r,o);else if("input"===i&&"radio"===a)!function(t,e,n){var r=n&&n.number,o=Lr(t,"value")||"null";Pr(t,"checked","_q("+e+","+(o=r?"_n("+o+")":o)+")"),Fr(t,"change",Hr(e,o),null,!0)}(t,r,o);else if("input"===i||"textarea"===i)!function(t,e,n){var r=t.attrsMap.type,o=n||{},i=o.lazy,a=o.number,s=o.trim,c=!i&&"range"!==r,l=i?"change":"range"===r?"__r":"input",u="$event.target.value";s&&(u="$event.target.value.trim()");a&&(u="_n("+u+")");var f=Hr(e,u);c&&(f="if($event.target.composing)return;"+f);Pr(t,"value","("+e+")"),Fr(t,l,f,null,!0),(s||a)&&Fr(t,"blur","$forceUpdate()")}(t,r,o);else if(!j.isReservedTag(i))return qr(t,r,o),!1;return!0},text:function(t,e){e.value&&Pr(t,"textContent","_s("+e.value+")",e)},html:function(t,e){e.value&&Pr(t,"innerHTML","_s("+e.value+")",e)}},Oa={expectHTML:!0,modules:wa,directives:_a,isPreTag:function(t){return"pre"===t},isUnaryTag:xi,mustUseProp:Rn,canBeLeftOpenTag:Si,isReservedTag:Zn,getTagNamespace:Qn,staticKeys:(xa=wa,xa.reduce((function(t,e){return t.concat(e.staticKeys||[])}),[]).join(","))},Ca=y((function(t){return p("type,tag,attrsList,attrsMap,plain,parent,children,attrs,start,end,rawAttrsMap"+(t?","+t:""))}));function Ma(t,e){t&&(Sa=Ca(e.staticKeys||""),ka=e.isReservedTag||T,Da(t),Ta(t,!1))}function Da(t){if(t.static=function(t){if(2===t.type)return!1;if(3===t.type)return!0;return!(!t.pre&&(t.hasBindings||t.if||t.for||d(t.tag)||!ka(t.tag)||function(t){for(;t.parent;){if("template"!==(t=t.parent).tag)return!1;if(t.for)return!0}return!1}(t)||!Object.keys(t).every(Sa)))}(t),1===t.type){if(!ka(t.tag)&&"slot"!==t.tag&&null==t.attrsMap["inline-template"])return;for(var e=0,n=t.children.length;e<n;e++){var r=t.children[e];Da(r),r.static||(t.static=!1)}if(t.ifConditions)for(var o=1,i=t.ifConditions.length;o<i;o++){var a=t.ifConditions[o].block;Da(a),a.static||(t.static=!1)}}}function Ta(t,e){if(1===t.type){if((t.static||t.once)&&(t.staticInFor=e),t.static&&t.children.length&&(1!==t.children.length||3!==t.children[0].type))return void(t.staticRoot=!0);if(t.staticRoot=!1,t.children)for(var n=0,r=t.children.length;n<r;n++)Ta(t.children[n],e||!!t.for);if(t.ifConditions)for(var o=1,i=t.ifConditions.length;o<i;o++)Ta(t.ifConditions[o].block,e)}}var $a=/^([\w$_]+|\([^)]*?\))\s*=>|^function(?:\s+[\w$]+)?\s*\(/,Aa=/\([^)]*?\);*$/,Ea=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,Na={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},Pa={esc:["Esc","Escape"],tab:"Tab",enter:"Enter",space:[" ","Spacebar"],up:["Up","ArrowUp"],left:["Left","ArrowLeft"],right:["Right","ArrowRight"],down:["Down","ArrowDown"],delete:["Backspace","Delete","Del"]},Ia=function(t){return"if("+t+")return null;"},ja={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:Ia("$event.target !== $event.currentTarget"),ctrl:Ia("!$event.ctrlKey"),shift:Ia("!$event.shiftKey"),alt:Ia("!$event.altKey"),meta:Ia("!$event.metaKey"),left:Ia("'button' in $event && $event.button !== 0"),middle:Ia("'button' in $event && $event.button !== 1"),right:Ia("'button' in $event && $event.button !== 2")};function Ra(t,e){var n=e?"nativeOn:":"on:",r="",o="";for(var i in t){var a=za(t[i]);t[i]&&t[i].dynamic?o+=i+","+a+",":r+='"'+i+'":'+a+","}return r="{"+r.slice(0,-1)+"}",o?n+"_d("+r+",["+o.slice(0,-1)+"])":n+r}function za(t){if(!t)return"function(){}";if(Array.isArray(t))return"["+t.map((function(t){return za(t)})).join(",")+"]";var e=Ea.test(t.value),n=$a.test(t.value),r=Ea.test(t.value.replace(Aa,""));if(t.modifiers){var o="",i="",a=[];for(var s in t.modifiers)if(ja[s])i+=ja[s],Na[s]&&a.push(s);else if("exact"===s){var c=t.modifiers;i+=Ia(["ctrl","shift","alt","meta"].filter((function(t){return!c[t]})).map((function(t){return"$event."+t+"Key"})).join("||"))}else a.push(s);return a.length&&(o+=function(t){return"if(!$event.type.indexOf('key')&&"+t.map(Fa).join("&&")+")return null;"}(a)),i&&(o+=i),"function($event){"+o+(e?"return "+t.value+".apply(null, arguments)":n?"return ("+t.value+").apply(null, arguments)":r?"return "+t.value:t.value)+"}"}return e||n?t.value:"function($event){"+(r?"return "+t.value:t.value)+"}"}function Fa(t){var e=parseInt(t,10);if(e)return"$event.keyCode!=="+e;var n=Na[t],r=Pa[t];return"_k($event.keyCode,"+JSON.stringify(t)+","+JSON.stringify(n)+",$event.key,"+JSON.stringify(r)+")"}var La={on:function(t,e){t.wrapListeners=function(t){return"_g("+t+","+e.value+")"}},bind:function(t,e){t.wrapData=function(n){return"_b("+n+",'"+t.tag+"',"+e.value+","+(e.modifiers&&e.modifiers.prop?"true":"false")+(e.modifiers&&e.modifiers.sync?",true":"")+")"}},cloak:D},Ba=function(t){this.options=t,this.warn=t.warn||Er,this.transforms=Nr(t.modules,"transformCode"),this.dataGenFns=Nr(t.modules,"genData"),this.directives=C(C({},La),t.directives);var e=t.isReservedTag||T;this.maybeComponent=function(t){return!!t.component||!e(t.tag)},this.onceId=0,this.staticRenderFns=[],this.pre=!1};function Va(t,e){var n=new Ba(e);return{render:"with(this){return "+(t?"script"===t.tag?"null":Wa(t,n):'_c("div")')+"}",staticRenderFns:n.staticRenderFns}}function Wa(t,e){if(t.parent&&(t.pre=t.pre||t.parent.pre),t.staticRoot&&!t.staticProcessed)return qa(t,e);if(t.once&&!t.onceProcessed)return Ha(t,e);if(t.for&&!t.forProcessed)return Ya(t,e);if(t.if&&!t.ifProcessed)return Ja(t,e);if("template"!==t.tag||t.slotTarget||e.pre){if("slot"===t.tag)return function(t,e){var n=t.slotName||'"default"',r=Za(t,e),o="_t("+n+(r?",function(){return "+r+"}":""),i=t.attrs||t.dynamicAttrs?es((t.attrs||[]).concat(t.dynamicAttrs||[]).map((function(t){return{name:w(t.name),value:t.value,dynamic:t.dynamic}}))):null,a=t.attrsMap["v-bind"];!i&&!a||r||(o+=",null");i&&(o+=","+i);a&&(o+=(i?"":",null")+","+a);return o+")"}(t,e);var n;if(t.component)n=function(t,e,n){var r=e.inlineTemplate?null:Za(e,n,!0);return"_c("+t+","+Ua(e,n)+(r?","+r:"")+")"}(t.component,t,e);else{var r;(!t.plain||t.pre&&e.maybeComponent(t))&&(r=Ua(t,e));var o=t.inlineTemplate?null:Za(t,e,!0);n="_c('"+t.tag+"'"+(r?","+r:"")+(o?","+o:"")+")"}for(var i=0;i<e.transforms.length;i++)n=e.transforms[i](t,n);return n}return Za(t,e)||"void 0"}function qa(t,e){t.staticProcessed=!0;var n=e.pre;return t.pre&&(e.pre=t.pre),e.staticRenderFns.push("with(this){return "+Wa(t,e)+"}"),e.pre=n,"_m("+(e.staticRenderFns.length-1)+(t.staticInFor?",true":"")+")"}function Ha(t,e){if(t.onceProcessed=!0,t.if&&!t.ifProcessed)return Ja(t,e);if(t.staticInFor){for(var n="",r=t.parent;r;){if(r.for){n=r.key;break}r=r.parent}return n?"_o("+Wa(t,e)+","+e.onceId+++","+n+")":Wa(t,e)}return qa(t,e)}function Ja(t,e,n,r){return t.ifProcessed=!0,Ka(t.ifConditions.slice(),e,n,r)}function Ka(t,e,n,r){if(!t.length)return r||"_e()";var o=t.shift();return o.exp?"("+o.exp+")?"+i(o.block)+":"+Ka(t,e,n,r):""+i(o.block);function i(t){return n?n(t,e):t.once?Ha(t,e):Wa(t,e)}}function Ya(t,e,n,r){var o=t.for,i=t.alias,a=t.iterator1?","+t.iterator1:"",s=t.iterator2?","+t.iterator2:"";return t.forProcessed=!0,(r||"_l")+"(("+o+"),function("+i+a+s+"){return "+(n||Wa)(t,e)+"})"}function Ua(t,e){var n="{",r=function(t,e){var n=t.directives;if(!n)return;var r,o,i,a,s="directives:[",c=!1;for(r=0,o=n.length;r<o;r++){i=n[r],a=!0;var l=e.directives[i.name];l&&(a=!!l(t,i,e.warn)),a&&(c=!0,s+='{name:"'+i.name+'",rawName:"'+i.rawName+'"'+(i.value?",value:("+i.value+"),expression:"+JSON.stringify(i.value):"")+(i.arg?",arg:"+(i.isDynamicArg?i.arg:'"'+i.arg+'"'):"")+(i.modifiers?",modifiers:"+JSON.stringify(i.modifiers):"")+"},")}if(c)return s.slice(0,-1)+"]"}(t,e);r&&(n+=r+","),t.key&&(n+="key:"+t.key+","),t.ref&&(n+="ref:"+t.ref+","),t.refInFor&&(n+="refInFor:true,"),t.pre&&(n+="pre:true,"),t.component&&(n+='tag:"'+t.tag+'",');for(var o=0;o<e.dataGenFns.length;o++)n+=e.dataGenFns[o](t);if(t.attrs&&(n+="attrs:"+es(t.attrs)+","),t.props&&(n+="domProps:"+es(t.props)+","),t.events&&(n+=Ra(t.events,!1)+","),t.nativeEvents&&(n+=Ra(t.nativeEvents,!0)+","),t.slotTarget&&!t.slotScope&&(n+="slot:"+t.slotTarget+","),t.scopedSlots&&(n+=function(t,e,n){var r=t.for||Object.keys(e).some((function(t){var n=e[t];return n.slotTargetDynamic||n.if||n.for||Xa(n)})),o=!!t.if;if(!r)for(var i=t.parent;i;){if(i.slotScope&&"_empty_"!==i.slotScope||i.for){r=!0;break}i.if&&(o=!0),i=i.parent}var a=Object.keys(e).map((function(t){return Ga(e[t],n)})).join(",");return"scopedSlots:_u(["+a+"]"+(r?",null,true":"")+(!r&&o?",null,false,"+function(t){var e=5381,n=t.length;for(;n;)e=33*e^t.charCodeAt(--n);return e>>>0}(a):"")+")"}(t,t.scopedSlots,e)+","),t.model&&(n+="model:{value:"+t.model.value+",callback:"+t.model.callback+",expression:"+t.model.expression+"},"),t.inlineTemplate){var i=function(t,e){var n=t.children[0];if(n&&1===n.type){var r=Va(n,e.options);return"inlineTemplate:{render:function(){"+r.render+"},staticRenderFns:["+r.staticRenderFns.map((function(t){return"function(){"+t+"}"})).join(",")+"]}"}}(t,e);i&&(n+=i+",")}return n=n.replace(/,$/,"")+"}",t.dynamicAttrs&&(n="_b("+n+',"'+t.tag+'",'+es(t.dynamicAttrs)+")"),t.wrapData&&(n=t.wrapData(n)),t.wrapListeners&&(n=t.wrapListeners(n)),n}function Xa(t){return 1===t.type&&("slot"===t.tag||t.children.some(Xa))}function Ga(t,e){var n=t.attrsMap["slot-scope"];if(t.if&&!t.ifProcessed&&!n)return Ja(t,e,Ga,"null");if(t.for&&!t.forProcessed)return Ya(t,e,Ga);var r="_empty_"===t.slotScope?"":String(t.slotScope),o="function("+r+"){return "+("template"===t.tag?t.if&&n?"("+t.if+")?"+(Za(t,e)||"undefined")+":undefined":Za(t,e)||"undefined":Wa(t,e))+"}",i=r?"":",proxy:true";return"{key:"+(t.slotTarget||'"default"')+",fn:"+o+i+"}"}function Za(t,e,n,r,o){var i=t.children;if(i.length){var a=i[0];if(1===i.length&&a.for&&"template"!==a.tag&&"slot"!==a.tag){var s=n?e.maybeComponent(a)?",1":",0":"";return""+(r||Wa)(a,e)+s}var c=n?function(t,e){for(var n=0,r=0;r<t.length;r++){var o=t[r];if(1===o.type){if(Qa(o)||o.ifConditions&&o.ifConditions.some((function(t){return Qa(t.block)}))){n=2;break}(e(o)||o.ifConditions&&o.ifConditions.some((function(t){return e(t.block)})))&&(n=1)}}return n}(i,e.maybeComponent):0,l=o||ts;return"["+i.map((function(t){return l(t,e)})).join(",")+"]"+(c?","+c:"")}}function Qa(t){return void 0!==t.for||"template"===t.tag||"slot"===t.tag}function ts(t,e){return 1===t.type?Wa(t,e):3===t.type&&t.isComment?(r=t,"_e("+JSON.stringify(r.text)+")"):"_v("+(2===(n=t).type?n.expression:ns(JSON.stringify(n.text)))+")";var n,r}function es(t){for(var e="",n="",r=0;r<t.length;r++){var o=t[r],i=ns(o.value);o.dynamic?n+=o.name+","+i+",":e+='"'+o.name+'":'+i+","}return e="{"+e.slice(0,-1)+"}",n?"_d("+e+",["+n.slice(0,-1)+"])":e}function ns(t){return t.replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}function rs(t,e){try{return new Function(t)}catch(n){return e.push({err:n,code:t}),D}}function is(t){var e=Object.create(null);return function(n,r,o){(r=C({},r)).warn,delete r.warn;var i=r.delimiters?String(r.delimiters)+n:n;if(e[i])return e[i];var a=t(n,r),s={},c=[];return s.render=rs(a.render,c),s.staticRenderFns=a.staticRenderFns.map((function(t){return rs(t,c)})),e[i]=s}}new RegExp("\\b"+"do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,super,throw,while,yield,delete,export,import,return,switch,default,extends,finally,continue,debugger,function,arguments".split(",").join("\\b|\\b")+"\\b"),new RegExp("\\b"+"delete,typeof,void".split(",").join("\\s*\\([^\\)]*\\)|\\b")+"\\s*\\([^\\)]*\\)");var as,ss,cs=(as=function(t,e){var n=ua(t.trim(),e);!1!==e.optimize&&Ma(n,e);var r=Va(n,e);return{ast:n,render:r.render,staticRenderFns:r.staticRenderFns}},function(t){function e(e,n){var r=Object.create(t),o=[],i=[];if(n)for(var a in n.modules&&(r.modules=(t.modules||[]).concat(n.modules)),n.directives&&(r.directives=C(Object.create(t.directives||null),n.directives)),n)"modules"!==a&&"directives"!==a&&(r[a]=n[a]);r.warn=function(t,e,n){(n?i:o).push(t)};var s=as(e.trim(),r);return s.errors=o,s.tips=i,s}return{compile:e,compileToFunctions:is(e)}}),ls=cs(Oa).compileToFunctions;function us(t){return(ss=ss||document.createElement("div")).innerHTML=t?'<a href="\n"/>':'<div a="\n"/>',ss.innerHTML.indexOf("&#10;")>0}var fs=!!V&&us(!1),ps=!!V&&us(!0),ds=y((function(t){var e=nr(t);return e&&e.innerHTML})),hs=Cn.prototype.$mount;Cn.prototype.$mount=function(t,e){if((t=t&&nr(t))===document.body||t===document.documentElement)return this;var n=this.$options;if(!n.render){var r=n.template;if(r)if("string"==typeof r)"#"===r.charAt(0)&&(r=ds(r));else{if(!r.nodeType)return this;r=r.innerHTML}else t&&(r=function(t){if(t.outerHTML)return t.outerHTML;var e=document.createElement("div");return e.appendChild(t.cloneNode(!0)),e.innerHTML}(t));if(r){var o=ls(r,{outputSourceRange:!1,shouldDecodeNewlines:fs,shouldDecodeNewlinesForHref:ps,delimiters:n.delimiters,comments:n.comments},this),i=o.render,a=o.staticRenderFns;n.render=i,n.staticRenderFns=a}}return hs.call(this,t,e)},Cn.compile=ls;var vs=("undefined"!=typeof window?window:"undefined"!=typeof global?global:{}).__VUE_DEVTOOLS_GLOBAL_HOOK__;function ms(t,e){if(void 0===e&&(e=[]),null===t||"object"!=typeof t)return t;var n,r=(n=function(e){return e.original===t},e.filter(n)[0]);if(r)return r.copy;var o=Array.isArray(t)?[]:{};return e.push({original:t,copy:o}),Object.keys(t).forEach((function(n){o[n]=ms(t[n],e)})),o}function gs(t,e){Object.keys(t).forEach((function(n){return e(t[n],n)}))}function ys(t){return null!==t&&"object"==typeof t}var bs=function(t,e){this.runtime=e,this._children=Object.create(null),this._rawModule=t;var n=t.state;this.state=("function"==typeof n?n():n)||{}},ws={namespaced:{configurable:!0}};ws.namespaced.get=function(){return!!this._rawModule.namespaced},bs.prototype.addChild=function(t,e){this._children[t]=e},bs.prototype.removeChild=function(t){delete this._children[t]},bs.prototype.getChild=function(t){return this._children[t]},bs.prototype.hasChild=function(t){return t in this._children},bs.prototype.update=function(t){this._rawModule.namespaced=t.namespaced,t.actions&&(this._rawModule.actions=t.actions),t.mutations&&(this._rawModule.mutations=t.mutations),t.getters&&(this._rawModule.getters=t.getters)},bs.prototype.forEachChild=function(t){gs(this._children,t)},bs.prototype.forEachGetter=function(t){this._rawModule.getters&&gs(this._rawModule.getters,t)},bs.prototype.forEachAction=function(t){this._rawModule.actions&&gs(this._rawModule.actions,t)},bs.prototype.forEachMutation=function(t){this._rawModule.mutations&&gs(this._rawModule.mutations,t)},Object.defineProperties(bs.prototype,ws);var xs,Ss=function(t){this.register([],t,!1)};function ks(t,e,n){if(e.update(n),n.modules)for(var r in n.modules){if(!e.getChild(r))return;ks(t.concat(r),e.getChild(r),n.modules[r])}}Ss.prototype.get=function(t){return t.reduce((function(t,e){return t.getChild(e)}),this.root)},Ss.prototype.getNamespace=function(t){var e=this.root;return t.reduce((function(t,n){return t+((e=e.getChild(n)).namespaced?n+"/":"")}),"")},Ss.prototype.update=function(t){ks([],this.root,t)},Ss.prototype.register=function(t,e,n){var r=this;void 0===n&&(n=!0);var o=new bs(e,n);0===t.length?this.root=o:this.get(t.slice(0,-1)).addChild(t[t.length-1],o);e.modules&&gs(e.modules,(function(e,o){r.register(t.concat(o),e,n)}))},Ss.prototype.unregister=function(t){var e=this.get(t.slice(0,-1)),n=t[t.length-1],r=e.getChild(n);r&&r.runtime&&e.removeChild(n)},Ss.prototype.isRegistered=function(t){var e=this.get(t.slice(0,-1)),n=t[t.length-1];return!!e&&e.hasChild(n)};var _s=function(t){var e=this;void 0===t&&(t={}),!xs&&"undefined"!=typeof window&&window.Vue&&Es(window.Vue);var n=t.plugins;void 0===n&&(n=[]);var r=t.strict;void 0===r&&(r=!1),this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new Ss(t),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._watcherVM=new xs,this._makeLocalGettersCache=Object.create(null);var o=this,i=this.dispatch,a=this.commit;this.dispatch=function(t,e){return i.call(o,t,e)},this.commit=function(t,e,n){return a.call(o,t,e,n)},this.strict=r;var s=this._modules.root.state;Ts(this,s,[],this._modules.root),Ds(this,s),n.forEach((function(t){return t(e)})),(void 0!==t.devtools?t.devtools:xs.config.devtools)&&function(t){vs&&(t._devtoolHook=vs,vs.emit("vuex:init",t),vs.on("vuex:travel-to-state",(function(e){t.replaceState(e)})),t.subscribe((function(t,e){vs.emit("vuex:mutation",t,e)}),{prepend:!0}),t.subscribeAction((function(t,e){vs.emit("vuex:action",t,e)}),{prepend:!0}))}(this)},Os={state:{configurable:!0}};function Cs(t,e,n){return e.indexOf(t)<0&&(n&&n.prepend?e.unshift(t):e.push(t)),function(){var n=e.indexOf(t);n>-1&&e.splice(n,1)}}function Ms(t,e){t._actions=Object.create(null),t._mutations=Object.create(null),t._wrappedGetters=Object.create(null),t._modulesNamespaceMap=Object.create(null);var n=t.state;Ts(t,n,[],t._modules.root,!0),Ds(t,n,e)}function Ds(t,e,n){var r=t._vm;t.getters={},t._makeLocalGettersCache=Object.create(null);var o=t._wrappedGetters,i={};gs(o,(function(e,n){i[n]=function(t,e){return function(){return t(e)}}(e,t),Object.defineProperty(t.getters,n,{get:function(){return t._vm[n]},enumerable:!0})}));var a=xs.config.silent;xs.config.silent=!0,t._vm=new xs({data:{$$state:e},computed:i}),xs.config.silent=a,t.strict&&function(t){t._vm.$watch((function(){return this._data.$$state}),(function(){}),{deep:!0,sync:!0})}(t),r&&(n&&t._withCommit((function(){r._data.$$state=null})),xs.nextTick((function(){return r.$destroy()})))}function Ts(t,e,n,r,o){var i=!n.length,a=t._modules.getNamespace(n);if(r.namespaced&&(t._modulesNamespaceMap[a],t._modulesNamespaceMap[a]=r),!i&&!o){var s=$s(e,n.slice(0,-1)),c=n[n.length-1];t._withCommit((function(){xs.set(s,c,r.state)}))}var l=r.context=function(t,e,n){var r=""===e,o={dispatch:r?t.dispatch:function(n,r,o){var i=As(n,r,o),a=i.payload,s=i.options,c=i.type;return s&&s.root||(c=e+c),t.dispatch(c,a)},commit:r?t.commit:function(n,r,o){var i=As(n,r,o),a=i.payload,s=i.options,c=i.type;s&&s.root||(c=e+c),t.commit(c,a,s)}};return Object.defineProperties(o,{getters:{get:r?function(){return t.getters}:function(){return function(t,e){if(!t._makeLocalGettersCache[e]){var n={},r=e.length;Object.keys(t.getters).forEach((function(o){if(o.slice(0,r)===e){var i=o.slice(r);Object.defineProperty(n,i,{get:function(){return t.getters[o]},enumerable:!0})}})),t._makeLocalGettersCache[e]=n}return t._makeLocalGettersCache[e]}(t,e)}},state:{get:function(){return $s(t.state,n)}}}),o}(t,a,n);r.forEachMutation((function(e,n){!function(t,e,n,r){(t._mutations[e]||(t._mutations[e]=[])).push((function(e){n.call(t,r.state,e)}))}(t,a+n,e,l)})),r.forEachAction((function(e,n){var r=e.root?n:a+n,o=e.handler||e;!function(t,e,n,r){(t._actions[e]||(t._actions[e]=[])).push((function(e){var o,i=n.call(t,{dispatch:r.dispatch,commit:r.commit,getters:r.getters,state:r.state,rootGetters:t.getters,rootState:t.state},e);return(o=i)&&"function"==typeof o.then||(i=Promise.resolve(i)),t._devtoolHook?i.catch((function(e){throw t._devtoolHook.emit("vuex:error",e),e})):i}))}(t,r,o,l)})),r.forEachGetter((function(e,n){!function(t,e,n,r){if(t._wrappedGetters[e])return;t._wrappedGetters[e]=function(t){return n(r.state,r.getters,t.state,t.getters)}}(t,a+n,e,l)})),r.forEachChild((function(r,i){Ts(t,e,n.concat(i),r,o)}))}function $s(t,e){return e.reduce((function(t,e){return t[e]}),t)}function As(t,e,n){return ys(t)&&t.type&&(n=e,e=t,t=t.type),{type:t,payload:e,options:n}}function Es(t){xs&&t===xs||
/*!
* vuex v3.6.2
* (c) 2021 Evan You
* @license MIT
*/
function(t){if(Number(t.version.split(".")[0])>=2)t.mixin({beforeCreate:n});else{var e=t.prototype._init;t.prototype._init=function(t){void 0===t&&(t={}),t.init=t.init?[n].concat(t.init):n,e.call(this,t)}}function n(){var t=this.$options;t.store?this.$store="function"==typeof t.store?t.store():t.store:t.parent&&t.parent.$store&&(this.$store=t.parent.$store)}}(xs=t)}Os.state.get=function(){return this._vm._data.$$state},Os.state.set=function(t){},_s.prototype.commit=function(t,e,n){var r=this,o=As(t,e,n),i=o.type,a=o.payload,s={type:i,payload:a},c=this._mutations[i];c&&(this._withCommit((function(){c.forEach((function(t){t(a)}))})),this._subscribers.slice().forEach((function(t){return t(s,r.state)})))},_s.prototype.dispatch=function(t,e){var n=this,r=As(t,e),o=r.type,i=r.payload,a={type:o,payload:i},s=this._actions[o];if(s){try{this._actionSubscribers.slice().filter((function(t){return t.before})).forEach((function(t){return t.before(a,n.state)}))}catch(My){}var c=s.length>1?Promise.all(s.map((function(t){return t(i)}))):s[0](i);return new Promise((function(t,e){c.then((function(e){try{n._actionSubscribers.filter((function(t){return t.after})).forEach((function(t){return t.after(a,n.state)}))}catch(My){}t(e)}),(function(t){try{n._actionSubscribers.filter((function(t){return t.error})).forEach((function(e){return e.error(a,n.state,t)}))}catch(My){}e(t)}))}))}},_s.prototype.subscribe=function(t,e){return Cs(t,this._subscribers,e)},_s.prototype.subscribeAction=function(t,e){return Cs("function"==typeof t?{before:t}:t,this._actionSubscribers,e)},_s.prototype.watch=function(t,e,n){var r=this;return this._watcherVM.$watch((function(){return t(r.state,r.getters)}),e,n)},_s.prototype.replaceState=function(t){var e=this;this._withCommit((function(){e._vm._data.$$state=t}))},_s.prototype.registerModule=function(t,e,n){void 0===n&&(n={}),"string"==typeof t&&(t=[t]),this._modules.register(t,e),Ts(this,this.state,t,this._modules.get(t),n.preserveState),Ds(this,this.state)},_s.prototype.unregisterModule=function(t){var e=this;"string"==typeof t&&(t=[t]),this._modules.unregister(t),this._withCommit((function(){var n=$s(e.state,t.slice(0,-1));xs.delete(n,t[t.length-1])})),Ms(this)},_s.prototype.hasModule=function(t){return"string"==typeof t&&(t=[t]),this._modules.isRegistered(t)},_s.prototype.hotUpdate=function(t){this._modules.update(t),Ms(this,!0)},_s.prototype._withCommit=function(t){var e=this._committing;this._committing=!0,t(),this._committing=e},Object.defineProperties(_s.prototype,Os);var Ns=zs((function(t,e){var n={};return Rs(e).forEach((function(e){var r=e.key,o=e.val;n[r]=function(){var e=this.$store.state,n=this.$store.getters;if(t){var r=Fs(this.$store,"mapState",t);if(!r)return;e=r.context.state,n=r.context.getters}return"function"==typeof o?o.call(this,e,n):e[o]},n[r].vuex=!0})),n})),Ps=zs((function(t,e){var n={};return Rs(e).forEach((function(e){var r=e.key,o=e.val;n[r]=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];var r=this.$store.commit;if(t){var i=Fs(this.$store,"mapMutations",t);if(!i)return;r=i.context.commit}return"function"==typeof o?o.apply(this,[r].concat(e)):r.apply(this.$store,[o].concat(e))}})),n})),Is=zs((function(t,e){var n={};return Rs(e).forEach((function(e){var r=e.key,o=e.val;o=t+o,n[r]=function(){if(!t||Fs(this.$store,"mapGetters",t))return this.$store.getters[o]},n[r].vuex=!0})),n})),js=zs((function(t,e){var n={};return Rs(e).forEach((function(e){var r=e.key,o=e.val;n[r]=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];var r=this.$store.dispatch;if(t){var i=Fs(this.$store,"mapActions",t);if(!i)return;r=i.context.dispatch}return"function"==typeof o?o.apply(this,[r].concat(e)):r.apply(this.$store,[o].concat(e))}})),n}));function Rs(t){return function(t){return Array.isArray(t)||ys(t)}(t)?Array.isArray(t)?t.map((function(t){return{key:t,val:t}})):Object.keys(t).map((function(e){return{key:e,val:t[e]}})):[]}function zs(t){return function(e,n){return"string"!=typeof e?(n=e,e=""):"/"!==e.charAt(e.length-1)&&(e+="/"),t(e,n)}}function Fs(t,e,n){return t._modulesNamespaceMap[n]}function Ls(t,e,n){var r=n?t.groupCollapsed:t.group;try{r.call(t,e)}catch(My){t.log(e)}}function Bs(t){try{t.groupEnd()}catch(My){t.log("—— log end ——")}}function Vs(){var t=new Date;return" @ "+Ws(t.getHours(),2)+":"+Ws(t.getMinutes(),2)+":"+Ws(t.getSeconds(),2)+"."+Ws(t.getMilliseconds(),3)}function Ws(t,e){return n="0",r=e-t.toString().length,new Array(r+1).join(n)+t;var n,r}var qs={Store:_s,install:Es,version:"3.6.2",mapState:Ns,mapMutations:Ps,mapGetters:Is,mapActions:js,createNamespacedHelpers:function(t){return{mapState:Ns.bind(null,t),mapGetters:Is.bind(null,t),mapMutations:Ps.bind(null,t),mapActions:js.bind(null,t)}},createLogger:function(t){void 0===t&&(t={});var e=t.collapsed;void 0===e&&(e=!0);var n=t.filter;void 0===n&&(n=function(t,e,n){return!0});var r=t.transformer;void 0===r&&(r=function(t){return t});var o=t.mutationTransformer;void 0===o&&(o=function(t){return t});var i=t.actionFilter;void 0===i&&(i=function(t,e){return!0});var a=t.actionTransformer;void 0===a&&(a=function(t){return t});var s=t.logMutations;void 0===s&&(s=!0);var c=t.logActions;void 0===c&&(c=!0);var l=t.logger;return void 0===l&&(l=console),function(t){var u=ms(t.state);void 0!==l&&(s&&t.subscribe((function(t,i){var a=ms(i);if(n(t,u,a)){var s=Vs(),c=o(t),f="mutation "+t.type+s;Ls(l,f,e),l.log("%c prev state","color: #9E9E9E; font-weight: bold",r(u)),l.log("%c mutation","color: #03A9F4; font-weight: bold",c),l.log("%c next state","color: #4CAF50; font-weight: bold",r(a)),Bs(l)}u=a})),c&&t.subscribeAction((function(t,n){if(i(t,n)){var r=Vs(),o=a(t),s="action "+t.type+r;Ls(l,s,e),l.log("%c action","color: #03A9F4; font-weight: bold",o),Bs(l)}})))}}};function Hs(t){return{all:t=t||new Map,on:function(e,n){var r=t.get(e);r?r.push(n):t.set(e,[n])},off:function(e,n){var r=t.get(e);r&&(n?r.splice(r.indexOf(n)>>>0,1):t.set(e,[]))},emit:function(e,n){var r=t.get(e);r&&r.slice().map((function(t){t(n)})),(r=t.get("*"))&&r.slice().map((function(t){t(e,n)}))}}}var Js,Ks,Ys="function"==typeof Map?new Map:(Js=[],Ks=[],{has:function(t){return Js.indexOf(t)>-1},get:function(t){return Ks[Js.indexOf(t)]},set:function(t,e){-1===Js.indexOf(t)&&(Js.push(t),Ks.push(e))},delete:function(t){var e=Js.indexOf(t);e>-1&&(Js.splice(e,1),Ks.splice(e,1))}}),Us=function(t){return new Event(t,{bubbles:!0})};try{new Event("test")}catch(My){Us=function(t){var e=document.createEvent("Event");return e.initEvent(t,!0,!1),e}}function Xs(t){var e=Ys.get(t);e&&e.destroy()}function Gs(t){var e=Ys.get(t);e&&e.update()}var Zs=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((Zs=function(t){return t}).destroy=function(t){return t},Zs.update=function(t){return t}):((Zs=function(t,e){return t&&Array.prototype.forEach.call(t.length?t:[t],(function(t){return function(t){if(t&&t.nodeName&&"TEXTAREA"===t.nodeName&&!Ys.has(t)){var e,n=null,r=null,o=null,i=function(){t.clientWidth!==r&&l()},a=function(e){window.removeEventListener("resize",i,!1),t.removeEventListener("input",l,!1),t.removeEventListener("keyup",l,!1),t.removeEventListener("autosize:destroy",a,!1),t.removeEventListener("autosize:update",l,!1),Object.keys(e).forEach((function(n){t.style[n]=e[n]})),Ys.delete(t)}.bind(t,{height:t.style.height,resize:t.style.resize,overflowY:t.style.overflowY,overflowX:t.style.overflowX,wordWrap:t.style.wordWrap});t.addEventListener("autosize:destroy",a,!1),"onpropertychange"in t&&"oninput"in t&&t.addEventListener("keyup",l,!1),window.addEventListener("resize",i,!1),t.addEventListener("input",l,!1),t.addEventListener("autosize:update",l,!1),t.style.overflowX="hidden",t.style.wordWrap="break-word",Ys.set(t,{destroy:a,update:l}),"vertical"===(e=window.getComputedStyle(t,null)).resize?t.style.resize="none":"both"===e.resize&&(t.style.resize="horizontal"),n="content-box"===e.boxSizing?-(parseFloat(e.paddingTop)+parseFloat(e.paddingBottom)):parseFloat(e.borderTopWidth)+parseFloat(e.borderBottomWidth),isNaN(n)&&(n=0),l()}function s(e){var n=t.style.width;t.style.width="0px",t.style.width=n,t.style.overflowY=e}function c(){if(0!==t.scrollHeight){var e=function(t){for(var e=[];t&&t.parentNode&&t.parentNode instanceof Element;)t.parentNode.scrollTop&&e.push({node:t.parentNode,scrollTop:t.parentNode.scrollTop}),t=t.parentNode;return e}(t),o=document.documentElement&&document.documentElement.scrollTop;t.style.height="",t.style.height=t.scrollHeight+n+"px",r=t.clientWidth,e.forEach((function(t){t.node.scrollTop=t.scrollTop})),o&&(document.documentElement.scrollTop=o)}}function l(){c();var e=Math.round(parseFloat(t.style.height)),n=window.getComputedStyle(t,null),r="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):t.offsetHeight;if(r<e?"hidden"===n.overflowY&&(s("scroll"),c(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(t,null).height)):t.offsetHeight):"hidden"!==n.overflowY&&(s("hidden"),c(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(t,null).height)):t.offsetHeight),o!==r){o=r;var i=Us("autosize:resized");try{t.dispatchEvent(i)}catch(a){}}}}(t)})),t}).destroy=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],Xs),t},Zs.update=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],Gs),t});var Qs=Zs;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function tc(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ec={exports:{}},nc=ec.exports=function(){var t=1e3,e=6e4,n=36e5,r="millisecond",o="second",i="minute",a="hour",s="day",c="week",l="month",u="quarter",f="year",p="date",d="Invalid Date",h=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},g=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},y={s:g,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),o=n%60;return(e<=0?"+":"-")+g(r,2,"0")+":"+g(o,2,"0")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),o=e.clone().add(r,l),i=n-o<0,a=e.clone().add(r+(i?-1:1),l);return+(-(r+(n-o)/(i?o-a:a-o))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:l,y:f,w:c,d:s,D:p,h:a,m:i,s:o,ms:r,Q:u}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},b="en",w={};w[b]=m;var x=function(t){return t instanceof O},S=function(t,e,n){var r;if(!t)return b;if("string"==typeof t)w[t]&&(r=t),e&&(w[t]=e,r=t);else{var o=t.name;w[o]=t,r=o}return!n&&r&&(b=r),r||!n&&b},k=function(t,e){if(x(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new O(n)},_=y;_.l=S,_.i=x,_.w=function(t,e){return k(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var O=function(){function m(t){this.$L=S(t.locale,null,!0),this.parse(t)}var g=m.prototype;return g.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(_.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(h);if(r){var o=r[2]-1||0,i=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)):new Date(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)}}return new Date(e)}(t),this.$x=t.x||{},this.init()},g.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},g.$utils=function(){return _},g.isValid=function(){return!(this.$d.toString()===d)},g.isSame=function(t,e){var n=k(t);return this.startOf(e)<=n&&n<=this.endOf(e)},g.isAfter=function(t,e){return k(t)<this.startOf(e)},g.isBefore=function(t,e){return this.endOf(e)<k(t)},g.$g=function(t,e,n){return _.u(t)?this[e]:this.set(n,t)},g.unix=function(){return Math.floor(this.valueOf()/1e3)},g.valueOf=function(){return this.$d.getTime()},g.startOf=function(t,e){var n=this,r=!!_.u(e)||e,u=_.p(t),d=function(t,e){var o=_.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?o:o.endOf(s)},h=function(t,e){return _.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},v=this.$W,m=this.$M,g=this.$D,y="set"+(this.$u?"UTC":"");switch(u){case f:return r?d(1,0):d(31,11);case l:return r?d(1,m):d(0,m+1);case c:var b=this.$locale().weekStart||0,w=(v<b?v+7:v)-b;return d(r?g-w:g+(6-w),m);case s:case p:return h(y+"Hours",0);case a:return h(y+"Minutes",1);case i:return h(y+"Seconds",2);case o:return h(y+"Milliseconds",3);default:return this.clone()}},g.endOf=function(t){return this.startOf(t,!1)},g.$set=function(t,e){var n,c=_.p(t),u="set"+(this.$u?"UTC":""),d=(n={},n[s]=u+"Date",n[p]=u+"Date",n[l]=u+"Month",n[f]=u+"FullYear",n[a]=u+"Hours",n[i]=u+"Minutes",n[o]=u+"Seconds",n[r]=u+"Milliseconds",n)[c],h=c===s?this.$D+(e-this.$W):e;if(c===l||c===f){var v=this.clone().set(p,1);v.$d[d](h),v.init(),this.$d=v.set(p,Math.min(this.$D,v.daysInMonth())).$d}else d&&this.$d[d](h);return this.init(),this},g.set=function(t,e){return this.clone().$set(t,e)},g.get=function(t){return this[_.p(t)]()},g.add=function(r,u){var p,d=this;r=Number(r);var h=_.p(u),v=function(t){var e=k(d);return _.w(e.date(e.date()+Math.round(t*r)),d)};if(h===l)return this.set(l,this.$M+r);if(h===f)return this.set(f,this.$y+r);if(h===s)return v(1);if(h===c)return v(7);var m=(p={},p[i]=e,p[a]=n,p[o]=t,p)[h]||1,g=this.$d.getTime()+r*m;return _.w(g,this)},g.subtract=function(t,e){return this.add(-1*t,e)},g.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||d;var r=t||"YYYY-MM-DDTHH:mm:ssZ",o=_.z(this),i=this.$H,a=this.$m,s=this.$M,c=n.weekdays,l=n.months,u=function(t,n,o,i){return t&&(t[n]||t(e,r))||o[n].substr(0,i)},f=function(t){return _.s(i%12||12,t,"0")},p=n.meridiem||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r},h={YY:String(this.$y).slice(-2),YYYY:this.$y,M:s+1,MM:_.s(s+1,2,"0"),MMM:u(n.monthsShort,s,l,3),MMMM:u(l,s),D:this.$D,DD:_.s(this.$D,2,"0"),d:String(this.$W),dd:u(n.weekdaysMin,this.$W,c,2),ddd:u(n.weekdaysShort,this.$W,c,3),dddd:c[this.$W],H:String(i),HH:_.s(i,2,"0"),h:f(1),hh:f(2),a:p(i,a,!0),A:p(i,a,!1),m:String(a),mm:_.s(a,2,"0"),s:String(this.$s),ss:_.s(this.$s,2,"0"),SSS:_.s(this.$ms,3,"0"),Z:o};return r.replace(v,(function(t,e){return e||h[t]||o.replace(":","")}))},g.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},g.diff=function(r,p,d){var h,v=_.p(p),m=k(r),g=(m.utcOffset()-this.utcOffset())*e,y=this-m,b=_.m(this,m);return b=(h={},h[f]=b/12,h[l]=b,h[u]=b/3,h[c]=(y-g)/6048e5,h[s]=(y-g)/864e5,h[a]=y/n,h[i]=y/e,h[o]=y/t,h)[v]||y,d?b:_.a(b)},g.daysInMonth=function(){return this.endOf(l).$D},g.$locale=function(){return w[this.$L]},g.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=S(t,e,!0);return r&&(n.$L=r),n},g.clone=function(){return _.w(this.$d,this)},g.toDate=function(){return new Date(this.valueOf())},g.toJSON=function(){return this.isValid()?this.toISOString():null},g.toISOString=function(){return this.$d.toISOString()},g.toString=function(){return this.$d.toUTCString()},m}(),C=O.prototype;return k.prototype=C,[["$ms",r],["$s",o],["$m",i],["$H",a],["$W",s],["$M",l],["$y",f],["$D",p]].forEach((function(t){C[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),k.extend=function(t,e){return t.$i||(t(e,O,k),t.$i=!0),k},k.locale=S,k.isDayjs=x,k.unix=function(t){return k(1e3*t)},k.en=w[b],k.Ls=w,k.p={},k}(),rc={exports:{}},oc=rc.exports=function(){var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},e=/(\[[^[]*\])|([-:/.()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d\d/,r=/\d\d?/,o=/\d*[^\s\d-_:/()]+/,i={},a=function(t){return(t=+t)+(t>68?1900:2e3)},s=function(t){return function(e){this[t]=+e}},c=[/[+-]\d\d:?(\d\d)?|Z/,function(t){(this.zone||(this.zone={})).offset=function(t){if(!t)return 0;if("Z"===t)return 0;var e=t.match(/([+-]|\d\d)/g),n=60*e[1]+(+e[2]||0);return 0===n?0:"+"===e[0]?-n:n}(t)}],l=function(t){var e=i[t];return e&&(e.indexOf?e:e.s.concat(e.f))},u=function(t,e){var n,r=i.meridiem;if(r){for(var o=1;o<=24;o+=1)if(t.indexOf(r(o,0,e))>-1){n=o>12;break}}else n=t===(e?"pm":"PM");return n},f={A:[o,function(t){this.afternoon=u(t,!1)}],a:[o,function(t){this.afternoon=u(t,!0)}],S:[/\d/,function(t){this.milliseconds=100*+t}],SS:[n,function(t){this.milliseconds=10*+t}],SSS:[/\d{3}/,function(t){this.milliseconds=+t}],s:[r,s("seconds")],ss:[r,s("seconds")],m:[r,s("minutes")],mm:[r,s("minutes")],H:[r,s("hours")],h:[r,s("hours")],HH:[r,s("hours")],hh:[r,s("hours")],D:[r,s("day")],DD:[n,s("day")],Do:[o,function(t){var e=i.ordinal,n=t.match(/\d+/);if(this.day=n[0],e)for(var r=1;r<=31;r+=1)e(r).replace(/\[|\]/g,"")===t&&(this.day=r)}],M:[r,s("month")],MM:[n,s("month")],MMM:[o,function(t){var e=l("months"),n=(l("monthsShort")||e.map((function(t){return t.substr(0,3)}))).indexOf(t)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[o,function(t){var e=l("months").indexOf(t)+1;if(e<1)throw new Error;this.month=e%12||e}],Y:[/[+-]?\d+/,s("year")],YY:[n,function(t){this.year=a(t)}],YYYY:[/\d{4}/,s("year")],Z:c,ZZ:c};function p(n){var r,o;r=n,o=i&&i.formats;for(var a=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(e,n,r){var i=r&&r.toUpperCase();return n||o[r]||t[r]||o[i].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(t,e,n){return e||n.slice(1)}))}))).match(e),s=a.length,c=0;c<s;c+=1){var l=a[c],u=f[l],p=u&&u[0],d=u&&u[1];a[c]=d?{regex:p,parser:d}:l.replace(/^\[|\]$/g,"")}return function(t){for(var e={},n=0,r=0;n<s;n+=1){var o=a[n];if("string"==typeof o)r+=o.length;else{var i=o.regex,c=o.parser,l=t.substr(r),u=i.exec(l)[0];c.call(e,u),t=t.replace(u,"")}}return function(t){var e=t.afternoon;if(void 0!==e){var n=t.hours;e?n<12&&(t.hours+=12):12===n&&(t.hours=0),delete t.afternoon}}(e),e}}return function(t,e,n){n.p.customParseFormat=!0,t&&t.parseTwoDigitYear&&(a=t.parseTwoDigitYear);var r=e.prototype,o=r.parse;r.parse=function(t){var e=t.date,r=t.utc,a=t.args;this.$u=r;var s=a[1];if("string"==typeof s){var c=!0===a[2],l=!0===a[3],u=c||l,f=a[2];l&&(f=a[2]),i=this.$locale(),!c&&f&&(i=n.Ls[f]),this.$d=function(t,e,n){try{if(["x","X"].indexOf(e)>-1)return new Date(("X"===e?1e3:1)*t);var r=p(e)(t),o=r.year,i=r.month,a=r.day,s=r.hours,c=r.minutes,l=r.seconds,u=r.milliseconds,f=r.zone,d=new Date,h=a||(o||i?1:d.getDate()),v=o||d.getFullYear(),m=0;o&&!i||(m=i>0?i-1:d.getMonth());var g=s||0,y=c||0,b=l||0,w=u||0;return f?new Date(Date.UTC(v,m,h,g,y,b,w+60*f.offset*1e3)):n?new Date(Date.UTC(v,m,h,g,y,b,w)):new Date(v,m,h,g,y,b,w)}catch(x){return new Date("")}}(e,s,r),this.init(),f&&!0!==f&&(this.$L=this.locale(f).$L),u&&e!=this.format(s)&&(this.$d=new Date("")),i={}}else if(s instanceof Array)for(var d=s.length,h=1;h<=d;h+=1){a[1]=s[h-1];var v=n.apply(this,a);if(v.isValid()){this.$d=v.$d,this.$L=v.$L,this.init();break}h===d&&(this.$d=new Date(""))}else o.call(this,t)}}}();function ic(t){return(ic="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var ac={selector:"vue-portal-target-".concat(((t=21)=>{let e="",n=t;for(;n--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e})())},sc=function(t){return ac.selector=t},cc="undefined"!=typeof window&&void 0!==("undefined"==typeof document?"undefined":ic(document)),lc=Cn.extend({abstract:!0,name:"PortalOutlet",props:["nodes","tag"],data:function(t){return{updatedNodes:t.nodes}},render:function(t){var e=this.updatedNodes&&this.updatedNodes();return e?1!==e.length||e[0].text?t(this.tag||"DIV",e):e:t()},destroyed:function(){var t=this.$el;t&&t.parentNode.removeChild(t)}}),uc=Cn.extend({name:"VueSimplePortal",props:{disabled:{type:Boolean},prepend:{type:Boolean},selector:{type:String,default:function(){return"#".concat(ac.selector)}},tag:{type:String,default:"DIV"}},render:function(t){if(this.disabled){var e=this.$scopedSlots&&this.$scopedSlots.default();return e?e.length<2&&!e[0].text?e:t(this.tag,e):t()}return t()},created:function(){this.getTargetEl()||this.insertTargetEl()},updated:function(){var t=this;this.$nextTick((function(){t.disabled||t.slotFn===t.$scopedSlots.default||(t.container.updatedNodes=t.$scopedSlots.default),t.slotFn=t.$scopedSlots.default}))},beforeDestroy:function(){this.unmount()},watch:{disabled:{immediate:!0,handler:function(t){t?this.unmount():this.$nextTick(this.mount)}}},methods:{getTargetEl:function(){if(cc)return document.querySelector(this.selector)},insertTargetEl:function(){if(cc){var t=document.querySelector("body"),e=document.createElement(this.tag);e.id=this.selector.substring(1),t.appendChild(e)}},mount:function(){if(cc){var t=this.getTargetEl(),e=document.createElement("DIV");this.prepend&&t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e),this.container=new lc({el:e,parent:this,propsData:{tag:this.tag,nodes:this.$scopedSlots.default}})}},unmount:function(){this.container&&(this.container.$destroy(),delete this.container)}}});function fc(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.component(e.name||"portal",uc),e.defaultSelector&&sc(e.defaultSelector)}"undefined"!=typeof window&&window.Vue&&window.Vue===Cn&&Cn.use(fc);var pc={},dc={};function hc(t){return null==t}function vc(t){return null!=t}function mc(t,e){return e.tag===t.tag&&e.key===t.key}function gc(t){var e=t.tag;t.vm=new e({data:t.args})}function yc(t,e,n){var r,o,i={};for(r=e;r<=n;++r)vc(o=t[r].key)&&(i[o]=r);return i}function bc(t,e,n){for(;e<=n;++e)gc(t[e])}function wc(t,e,n){for(;e<=n;++e){var r=t[e];vc(r)&&(r.vm.$destroy(),r.vm=null)}}function xc(t,e){t!==e&&(e.vm=t.vm,function(t){for(var e=Object.keys(t.args),n=0;n<e.length;n++)e.forEach((function(e){t.vm[e]=t.args[e]}))}(e))}Object.defineProperty(dc,"__esModule",{value:!0}),dc.h=function(t,e,n){return{tag:t,key:e,args:n}},dc.patchChildren=function(t,e){vc(t)&&vc(e)?t!==e&&function(t,e){var n,r,o,i=0,a=0,s=t.length-1,c=t[0],l=t[s],u=e.length-1,f=e[0],p=e[u];for(;i<=s&&a<=u;)hc(c)?c=t[++i]:hc(l)?l=t[--s]:mc(c,f)?(xc(c,f),c=t[++i],f=e[++a]):mc(l,p)?(xc(l,p),l=t[--s],p=e[--u]):mc(c,p)?(xc(c,p),c=t[++i],p=e[--u]):mc(l,f)?(xc(l,f),l=t[--s],f=e[++a]):(hc(n)&&(n=yc(t,i,s)),hc(r=vc(f.key)?n[f.key]:null)?(gc(f),f=e[++a]):mc(o=t[r],f)?(xc(o,f),t[r]=void 0,f=e[++a]):(gc(f),f=e[++a]));i>s?bc(e,a,u):a>u&&wc(t,i,s)}(t,e):vc(e)?bc(e,0,e.length-1):vc(t)&&wc(t,0,t.length-1)};var Sc={};function kc(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function _c(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?kc(Object(n),!0).forEach((function(e){Oc(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):kc(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Oc(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Cc(t){return(Cc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(Sc,"__esModule",{value:!0}),Sc._setTarget=void 0,Sc.popParams=$c,Sc.pushParams=Tc,Sc.target=void 0,Sc.withParams=function(t,e){if("object"===Cc(t)&&void 0!==e)return n=t,r=e,Ec((function(t){return function(){t(n);for(var e=arguments.length,o=new Array(e),i=0;i<e;i++)o[i]=arguments[i];return r.apply(this,o)}}));var n,r;return Ec(t)};var Mc=[],Dc=null;Sc.target=Dc;function Tc(){null!==Dc&&Mc.push(Dc),Sc.target=Dc={}}function $c(){var t=Dc,e=Sc.target=Dc=Mc.pop()||null;return e&&(Array.isArray(e.$sub)||(e.$sub=[]),e.$sub.push(t)),t}function Ac(t){if("object"!==Cc(t)||Array.isArray(t))throw new Error("params must be an object");Sc.target=Dc=_c(_c({},Dc),t)}function Ec(t){var e=t(Ac);return function(){Tc();try{for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.apply(this,n)}finally{$c()}}}Sc._setTarget=function(t){Sc.target=Dc=t},function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Vuelidate=_,t.validationMixin=t.default=void 0,Object.defineProperty(t,"withParams",{enumerable:!0,get:function(){return n.withParams}});var e=dc,n=Sc;function r(t){return function(t){if(Array.isArray(t))return o(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return o(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function a(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){s(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function s(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function c(t){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var l=function(){return null},u=function(t,e,n){return t.reduce((function(t,r){return t[n?n(r):r]=e(r),t}),{})};function f(t){return"function"==typeof t}function p(t){return null!==t&&("object"===c(t)||f(t))}var d=function(t,e,n,r){if("function"==typeof n)return n.call(t,e,r);n=Array.isArray(n)?n:n.split(".");for(var o=0;o<n.length;o++){if(!e||"object"!==c(e))return r;e=e[n[o]]}return void 0===e?r:e};var h={$invalid:function(){var t=this,e=this.proxy;return this.nestedKeys.some((function(e){return t.refProxy(e).$invalid}))||this.ruleKeys.some((function(t){return!e[t]}))},$dirty:function(){var t=this;return!!this.dirty||0!==this.nestedKeys.length&&this.nestedKeys.every((function(e){return t.refProxy(e).$dirty}))},$anyDirty:function(){var t=this;return!!this.dirty||0!==this.nestedKeys.length&&this.nestedKeys.some((function(e){return t.refProxy(e).$anyDirty}))},$error:function(){return this.$dirty&&!this.$pending&&this.$invalid},$anyError:function(){var t=this;return!!this.$error||this.nestedKeys.some((function(e){return t.refProxy(e).$anyError}))},$pending:function(){var t=this;return this.ruleKeys.some((function(e){return t.getRef(e).$pending}))||this.nestedKeys.some((function(e){return t.refProxy(e).$pending}))},$params:function(){var t=this,e=this.validations;return a(a({},u(this.nestedKeys,(function(t){return e[t]&&e[t].$params||null}))),u(this.ruleKeys,(function(e){return t.getRef(e).$params})))}};function v(t){this.dirty=t;var e=this.proxy,n=t?"$touch":"$reset";this.nestedKeys.forEach((function(t){e[t][n]()}))}var m={$touch:function(){v.call(this,!0)},$reset:function(){v.call(this,!1)},$flattenParams:function(){var t=this.proxy,e=[];for(var n in this.$params)if(this.isNested(n)){for(var r=t[n].$flattenParams(),o=0;o<r.length;o++)r[o].path.unshift(n);e=e.concat(r)}else e.push({path:[],name:n,params:this.$params[n]});return e}},g=Object.keys(h),y=Object.keys(m),b=null,w=function(t){if(b)return b;var o=t.extend({computed:{refs:function(){var t=this._vval;this._vval=this.children,(0,e.patchChildren)(t,this._vval);var n={};return this._vval.forEach((function(t){n[t.key]=t.vm})),n}},beforeCreate:function(){this._vval=null},beforeDestroy:function(){this._vval&&((0,e.patchChildren)(this._vval),this._vval=null)},methods:{getModel:function(){return this.lazyModel?this.lazyModel(this.prop):this.model},getModelKey:function(t){var e=this.getModel();if(e)return e[t]},hasIter:function(){return!1}}}),i=o.extend({data:function(){return{rule:null,lazyModel:null,model:null,lazyParentModel:null,rootModel:null}},methods:{runRule:function(e){var r=this.getModel();(0,n.pushParams)();var o,i=this.rule.call(this.rootModel,r,e),a=p(o=i)&&f(o.then)?function(t,e){var n=new t({data:{p:!0,v:!1}});return e.then((function(t){n.p=!1,n.v=t}),(function(t){throw n.p=!1,n.v=!1,t})),n.__isVuelidateAsyncVm=!0,n}(t,i):i,s=(0,n.popParams)();return{output:a,params:s&&s.$sub?s.$sub.length>1?s:s.$sub[0]:null}}},computed:{run:function(){var t=this,e=this.lazyParentModel();if(Array.isArray(e)&&e.__ob__){var n=e.__ob__.dep;n.depend();var r=n.constructor.target;if(!this._indirectWatcher){var o=r.constructor;this._indirectWatcher=new o(this,(function(){return t.runRule(e)}),null,{lazy:!0})}var i=this.getModel();if(!this._indirectWatcher.dirty&&this._lastModel===i)return this._indirectWatcher.depend(),r.value;this._lastModel=i,this._indirectWatcher.evaluate(),this._indirectWatcher.depend()}else this._indirectWatcher&&(this._indirectWatcher.teardown(),this._indirectWatcher=null);return this._indirectWatcher?this._indirectWatcher.value:this.runRule(e)},$params:function(){return this.run.params},proxy:function(){var t=this.run.output;return t.__isVuelidateAsyncVm?!!t.v:!!t},$pending:function(){var t=this.run.output;return!!t.__isVuelidateAsyncVm&&t.p}},destroyed:function(){this._indirectWatcher&&(this._indirectWatcher.teardown(),this._indirectWatcher=null)}}),s=o.extend({data:function(){return{dirty:!1,validations:null,lazyModel:null,model:null,prop:null,lazyParentModel:null,rootModel:null}},methods:a(a({},m),{},{refProxy:function(t){return this.getRef(t).proxy},getRef:function(t){return this.refs[t]},isNested:function(t){return"function"!=typeof this.validations[t]}}),computed:a(a({},h),{},{nestedKeys:function(){return this.keys.filter(this.isNested)},ruleKeys:function(){var t=this;return this.keys.filter((function(e){return!t.isNested(e)}))},keys:function(){return Object.keys(this.validations).filter((function(t){return"$params"!==t}))},proxy:function(){var t=this,e=u(this.keys,(function(e){return{enumerable:!0,configurable:!0,get:function(){return t.refProxy(e)}}})),n=u(g,(function(e){return{enumerable:!0,configurable:!0,get:function(){return t[e]}}})),r=u(y,(function(e){return{enumerable:!1,configurable:!0,get:function(){return t[e]}}})),o=this.hasIter()?{$iter:{enumerable:!0,value:Object.defineProperties({},a({},e))}}:{};return Object.defineProperties({},a(a(a(a({},e),o),{},{$model:{enumerable:!0,get:function(){var e=t.lazyParentModel();return null!=e?e[t.prop]:null},set:function(e){var n=t.lazyParentModel();null!=n&&(n[t.prop]=e,t.$touch())}}},n),r))},children:function(){var t=this;return[].concat(r(this.nestedKeys.map((function(e){return w(t,e)}))),r(this.ruleKeys.map((function(e){return x(t,e)})))).filter(Boolean)}})}),c=s.extend({methods:{isNested:function(t){return void 0!==this.validations[t]()},getRef:function(t){var e=this;return{get proxy(){return e.validations[t]()||!1}}}}}),v=s.extend({computed:{keys:function(){var t=this.getModel();return p(t)?Object.keys(t):[]},tracker:function(){var t=this,e=this.validations.$trackBy;return e?function(n){return"".concat(d(t.rootModel,t.getModelKey(n),e))}:function(t){return"".concat(t)}},getModelLazy:function(){var t=this;return function(){return t.getModel()}},children:function(){var t=this,n=this.validations,r=this.getModel(),o=a({},n);delete o.$trackBy;var i={};return this.keys.map((function(n){var a=t.tracker(n);return i.hasOwnProperty(a)?null:(i[a]=!0,(0,e.h)(s,a,{validations:o,prop:n,lazyParentModel:t.getModelLazy,model:r[n],rootModel:t.rootModel}))})).filter(Boolean)}},methods:{isNested:function(){return!0},getRef:function(t){return this.refs[this.tracker(t)]},hasIter:function(){return!0}}}),w=function(t,n){if("$each"===n)return(0,e.h)(v,n,{validations:t.validations[n],lazyParentModel:t.lazyParentModel,prop:n,lazyModel:t.getModel,rootModel:t.rootModel});var r=t.validations[n];if(Array.isArray(r)){var o=t.rootModel,i=u(r,(function(t){return function(){return d(o,o.$v,t)}}),(function(t){return Array.isArray(t)?t.join("."):t}));return(0,e.h)(c,n,{validations:i,lazyParentModel:l,prop:n,lazyModel:l,rootModel:o})}return(0,e.h)(s,n,{validations:r,lazyParentModel:t.getModel,prop:n,lazyModel:t.getModelKey,rootModel:t.rootModel})},x=function(t,n){return(0,e.h)(i,n,{rule:t.validations[n],lazyParentModel:t.lazyParentModel,lazyModel:t.getModel,rootModel:t.rootModel})};return b={VBase:o,Validation:s}},x=null;var S=function(t,n){var r=function(t){if(x)return x;for(var e=t.constructor;e.super;)e=e.super;return x=e,e}(t),o=w(r),i=o.Validation;return new(0,o.VBase)({computed:{children:function(){var r="function"==typeof n?n.call(t):n;return[(0,e.h)(i,"$v",{validations:r,lazyParentModel:l,prop:"$v",model:t,rootModel:t})]}}})},k={data:function(){var t=this.$options.validations;return t&&(this._vuelidate=S(this,t)),{}},beforeCreate:function(){var t=this.$options;t.validations&&(t.computed||(t.computed={}),t.computed.$v||(t.computed.$v=function(){return this._vuelidate?this._vuelidate.refs.$v.proxy:null}))},beforeDestroy:function(){this._vuelidate&&(this._vuelidate.$destroy(),this._vuelidate=null)}};function _(t){t.mixin(k)}t.validationMixin=k;var O=_;t.default=O}(pc);var Nc=tc(pc);function Pc(t){this.content=t}Pc.prototype={constructor:Pc,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return-1==e?void 0:this.content[e+1]},update:function(t,e,n){var r=n&&n!=t?this.remove(n):this,o=r.find(t),i=r.content.slice();return-1==o?i.push(n||t,e):(i[o+1]=e,n&&(i[o]=n)),new Pc(i)},remove:function(t){var e=this.find(t);if(-1==e)return this;var n=this.content.slice();return n.splice(e,2),new Pc(n)},addToStart:function(t,e){return new Pc([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new Pc(n)},addBefore:function(t,e,n){var r=this.remove(e),o=r.content.slice(),i=r.find(t);return o.splice(-1==i?o.length:i,0,e,n),new Pc(o)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return(t=Pc.from(t)).size?new Pc(t.content.concat(this.subtract(t).content)):this},append:function(t){return(t=Pc.from(t)).size?new Pc(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=Pc.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},get size(){return this.content.length>>1}},Pc.from=function(t){if(t instanceof Pc)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new Pc(e)};var Ic=Pc;function jc(t,e,n){for(var r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;var o=t.child(r),i=e.child(r);if(o!=i){if(!o.sameMarkup(i))return n;if(o.isText&&o.text!=i.text){for(var a=0;o.text[a]==i.text[a];a++)n++;return n}if(o.content.size||i.content.size){var s=jc(o.content,i.content,n+1);if(null!=s)return s}n+=o.nodeSize}else n+=o.nodeSize}}function Rc(t,e,n,r){for(var o=t.childCount,i=e.childCount;;){if(0==o||0==i)return o==i?null:{a:n,b:r};var a=t.child(--o),s=e.child(--i),c=a.nodeSize;if(a!=s){if(!a.sameMarkup(s))return{a:n,b:r};if(a.isText&&a.text!=s.text){for(var l=0,u=Math.min(a.text.length,s.text.length);l<u&&a.text[a.text.length-l-1]==s.text[s.text.length-l-1];)l++,n--,r--;return{a:n,b:r}}if(a.content.size||s.content.size){var f=Rc(a.content,s.content,n-1,r-1);if(f)return f}n-=c,r-=c}else n-=c,r-=c}}var zc=function(t,e){if(this.content=t,this.size=e||0,null==e)for(var n=0;n<t.length;n++)this.size+=t[n].nodeSize},Fc={firstChild:{configurable:!0},lastChild:{configurable:!0},childCount:{configurable:!0}};zc.prototype.nodesBetween=function(t,e,n,r,o){void 0===r&&(r=0);for(var i=0,a=0;a<e;i++){var s=this.content[i],c=a+s.nodeSize;if(c>t&&!1!==n(s,r+a,o,i)&&s.content.size){var l=a+1;s.nodesBetween(Math.max(0,t-l),Math.min(s.content.size,e-l),n,r+l)}a=c}},zc.prototype.descendants=function(t){this.nodesBetween(0,this.size,t)},zc.prototype.textBetween=function(t,e,n,r){var o="",i=!0;return this.nodesBetween(t,e,(function(a,s){a.isText?(o+=a.text.slice(Math.max(t,s)-s,e-s),i=!n):a.isLeaf&&r?(o+="function"==typeof r?r(a):r,i=!n):!i&&a.isBlock&&(o+=n,i=!0)}),0),o},zc.prototype.append=function(t){if(!t.size)return this;if(!this.size)return t;var e=this.lastChild,n=t.firstChild,r=this.content.slice(),o=0;for(e.isText&&e.sameMarkup(n)&&(r[r.length-1]=e.withText(e.text+n.text),o=1);o<t.content.length;o++)r.push(t.content[o]);return new zc(r,this.size+t.size)},zc.prototype.cut=function(t,e){if(null==e&&(e=this.size),0==t&&e==this.size)return this;var n=[],r=0;if(e>t)for(var o=0,i=0;i<e;o++){var a=this.content[o],s=i+a.nodeSize;s>t&&((i<t||s>e)&&(a=a.isText?a.cut(Math.max(0,t-i),Math.min(a.text.length,e-i)):a.cut(Math.max(0,t-i-1),Math.min(a.content.size,e-i-1))),n.push(a),r+=a.nodeSize),i=s}return new zc(n,r)},zc.prototype.cutByIndex=function(t,e){return t==e?zc.empty:0==t&&e==this.content.length?this:new zc(this.content.slice(t,e))},zc.prototype.replaceChild=function(t,e){var n=this.content[t];if(n==e)return this;var r=this.content.slice(),o=this.size+e.nodeSize-n.nodeSize;return r[t]=e,new zc(r,o)},zc.prototype.addToStart=function(t){return new zc([t].concat(this.content),this.size+t.nodeSize)},zc.prototype.addToEnd=function(t){return new zc(this.content.concat(t),this.size+t.nodeSize)},zc.prototype.eq=function(t){if(this.content.length!=t.content.length)return!1;for(var e=0;e<this.content.length;e++)if(!this.content[e].eq(t.content[e]))return!1;return!0},Fc.firstChild.get=function(){return this.content.length?this.content[0]:null},Fc.lastChild.get=function(){return this.content.length?this.content[this.content.length-1]:null},Fc.childCount.get=function(){return this.content.length},zc.prototype.child=function(t){var e=this.content[t];if(!e)throw new RangeError("Index "+t+" out of range for "+this);return e},zc.prototype.maybeChild=function(t){return this.content[t]},zc.prototype.forEach=function(t){for(var e=0,n=0;e<this.content.length;e++){var r=this.content[e];t(r,n,e),n+=r.nodeSize}},zc.prototype.findDiffStart=function(t,e){return void 0===e&&(e=0),jc(this,t,e)},zc.prototype.findDiffEnd=function(t,e,n){return void 0===e&&(e=this.size),void 0===n&&(n=t.size),Rc(this,t,e,n)},zc.prototype.findIndex=function(t,e){if(void 0===e&&(e=-1),0==t)return Bc(0,t);if(t==this.size)return Bc(this.content.length,t);if(t>this.size||t<0)throw new RangeError("Position "+t+" outside of fragment ("+this+")");for(var n=0,r=0;;n++){var o=r+this.child(n).nodeSize;if(o>=t)return o==t||e>0?Bc(n+1,o):Bc(n,r);r=o}},zc.prototype.toString=function(){return"<"+this.toStringInner()+">"},zc.prototype.toStringInner=function(){return this.content.join(", ")},zc.prototype.toJSON=function(){return this.content.length?this.content.map((function(t){return t.toJSON()})):null},zc.fromJSON=function(t,e){if(!e)return zc.empty;if(!Array.isArray(e))throw new RangeError("Invalid input for Fragment.fromJSON");return new zc(e.map(t.nodeFromJSON))},zc.fromArray=function(t){if(!t.length)return zc.empty;for(var e,n=0,r=0;r<t.length;r++){var o=t[r];n+=o.nodeSize,r&&o.isText&&t[r-1].sameMarkup(o)?(e||(e=t.slice(0,r)),e[e.length-1]=o.withText(e[e.length-1].text+o.text)):e&&e.push(o)}return new zc(e||t,n)},zc.from=function(t){if(!t)return zc.empty;if(t instanceof zc)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new zc([t],t.nodeSize);throw new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))},Object.defineProperties(zc.prototype,Fc);var Lc={index:0,offset:0};function Bc(t,e){return Lc.index=t,Lc.offset=e,Lc}function Vc(t,e){if(t===e)return!0;if(!t||"object"!=typeof t||!e||"object"!=typeof e)return!1;var n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(var r=0;r<t.length;r++)if(!Vc(t[r],e[r]))return!1}else{for(var o in t)if(!(o in e)||!Vc(t[o],e[o]))return!1;for(var i in e)if(!(i in t))return!1}return!0}zc.empty=new zc([],0);var Wc=function(t,e){this.type=t,this.attrs=e};function qc(t){var e=Error.call(this,t);return e.__proto__=qc.prototype,e}Wc.prototype.addToSet=function(t){for(var e,n=!1,r=0;r<t.length;r++){var o=t[r];if(this.eq(o))return t;if(this.type.excludes(o.type))e||(e=t.slice(0,r));else{if(o.type.excludes(this.type))return t;!n&&o.type.rank>this.type.rank&&(e||(e=t.slice(0,r)),e.push(this),n=!0),e&&e.push(o)}}return e||(e=t.slice()),n||e.push(this),e},Wc.prototype.removeFromSet=function(t){for(var e=0;e<t.length;e++)if(this.eq(t[e]))return t.slice(0,e).concat(t.slice(e+1));return t},Wc.prototype.isInSet=function(t){for(var e=0;e<t.length;e++)if(this.eq(t[e]))return!0;return!1},Wc.prototype.eq=function(t){return this==t||this.type==t.type&&Vc(this.attrs,t.attrs)},Wc.prototype.toJSON=function(){var t={type:this.type.name};for(var e in this.attrs){t.attrs=this.attrs;break}return t},Wc.fromJSON=function(t,e){if(!e)throw new RangeError("Invalid input for Mark.fromJSON");var n=t.marks[e.type];if(!n)throw new RangeError("There is no mark type "+e.type+" in this schema");return n.create(e.attrs)},Wc.sameSet=function(t,e){if(t==e)return!0;if(t.length!=e.length)return!1;for(var n=0;n<t.length;n++)if(!t[n].eq(e[n]))return!1;return!0},Wc.setFrom=function(t){if(!t||0==t.length)return Wc.none;if(t instanceof Wc)return[t];var e=t.slice();return e.sort((function(t,e){return t.type.rank-e.type.rank})),e},Wc.none=[],qc.prototype=Object.create(Error.prototype),qc.prototype.constructor=qc,qc.prototype.name="ReplaceError";var Hc=function(t,e,n){this.content=t,this.openStart=e,this.openEnd=n},Jc={size:{configurable:!0}};function Kc(t,e,n){var r=t.findIndex(e),o=r.index,i=r.offset,a=t.maybeChild(o),s=t.findIndex(n),c=s.index,l=s.offset;if(i==e||a.isText){if(l!=n&&!t.child(c).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(o!=c)throw new RangeError("Removing non-flat range");return t.replaceChild(o,a.copy(Kc(a.content,e-i-1,n-i-1)))}function Yc(t,e,n,r){var o=t.findIndex(e),i=o.index,a=o.offset,s=t.maybeChild(i);if(a==e||s.isText)return r&&!r.canReplace(i,i,n)?null:t.cut(0,e).append(n).append(t.cut(e));var c=Yc(s.content,e-a-1,n);return c&&t.replaceChild(i,s.copy(c))}function Uc(t,e,n){if(n.openStart>t.depth)throw new qc("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new qc("Inconsistent open depths");return Xc(t,e,n,0)}function Xc(t,e,n,r){var o=t.index(r),i=t.node(r);if(o==e.index(r)&&r<t.depth-n.openStart){var a=Xc(t,e,n,r+1);return i.copy(i.content.replaceChild(o,a))}if(n.content.size){if(n.openStart||n.openEnd||t.depth!=r||e.depth!=r){var s=function(t,e){for(var n=e.depth-t.openStart,r=e.node(n).copy(t.content),o=n-1;o>=0;o--)r=e.node(o).copy(zc.from(r));return{start:r.resolveNoCache(t.openStart+n),end:r.resolveNoCache(r.content.size-t.openEnd-n)}}(n,t);return el(i,nl(t,s.start,s.end,e,r))}var c=t.parent,l=c.content;return el(c,l.cut(0,t.parentOffset).append(n.content).append(l.cut(e.parentOffset)))}return el(i,rl(t,e,r))}function Gc(t,e){if(!e.type.compatibleContent(t.type))throw new qc("Cannot join "+e.type.name+" onto "+t.type.name)}function Zc(t,e,n){var r=t.node(n);return Gc(r,e.node(n)),r}function Qc(t,e){var n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function tl(t,e,n,r){var o=(e||t).node(n),i=0,a=e?e.index(n):o.childCount;t&&(i=t.index(n),t.depth>n?i++:t.textOffset&&(Qc(t.nodeAfter,r),i++));for(var s=i;s<a;s++)Qc(o.child(s),r);e&&e.depth==n&&e.textOffset&&Qc(e.nodeBefore,r)}function el(t,e){if(!t.type.validContent(e))throw new qc("Invalid content for node "+t.type.name);return t.copy(e)}function nl(t,e,n,r,o){var i=t.depth>o&&Zc(t,e,o+1),a=r.depth>o&&Zc(n,r,o+1),s=[];return tl(null,t,o,s),i&&a&&e.index(o)==n.index(o)?(Gc(i,a),Qc(el(i,nl(t,e,n,r,o+1)),s)):(i&&Qc(el(i,rl(t,e,o+1)),s),tl(e,n,o,s),a&&Qc(el(a,rl(n,r,o+1)),s)),tl(r,null,o,s),new zc(s)}function rl(t,e,n){var r=[];(tl(null,t,n,r),t.depth>n)&&Qc(el(Zc(t,e,n+1),rl(t,e,n+1)),r);return tl(e,null,n,r),new zc(r)}Jc.size.get=function(){return this.content.size-this.openStart-this.openEnd},Hc.prototype.insertAt=function(t,e){var n=Yc(this.content,t+this.openStart,e,null);return n&&new Hc(n,this.openStart,this.openEnd)},Hc.prototype.removeBetween=function(t,e){return new Hc(Kc(this.content,t+this.openStart,e+this.openStart),this.openStart,this.openEnd)},Hc.prototype.eq=function(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd},Hc.prototype.toString=function(){return this.content+"("+this.openStart+","+this.openEnd+")"},Hc.prototype.toJSON=function(){if(!this.content.size)return null;var t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t},Hc.fromJSON=function(t,e){if(!e)return Hc.empty;var n=e.openStart||0,r=e.openEnd||0;if("number"!=typeof n||"number"!=typeof r)throw new RangeError("Invalid input for Slice.fromJSON");return new Hc(zc.fromJSON(t,e.content),n,r)},Hc.maxOpen=function(t,e){void 0===e&&(e=!0);for(var n=0,r=0,o=t.firstChild;o&&!o.isLeaf&&(e||!o.type.spec.isolating);o=o.firstChild)n++;for(var i=t.lastChild;i&&!i.isLeaf&&(e||!i.type.spec.isolating);i=i.lastChild)r++;return new Hc(t,n,r)},Object.defineProperties(Hc.prototype,Jc),Hc.empty=new Hc(zc.empty,0,0);var ol=function(t,e,n){this.pos=t,this.path=e,this.depth=e.length/3-1,this.parentOffset=n},il={parent:{configurable:!0},doc:{configurable:!0},textOffset:{configurable:!0},nodeAfter:{configurable:!0},nodeBefore:{configurable:!0}};ol.prototype.resolveDepth=function(t){return null==t?this.depth:t<0?this.depth+t:t},il.parent.get=function(){return this.node(this.depth)},il.doc.get=function(){return this.node(0)},ol.prototype.node=function(t){return this.path[3*this.resolveDepth(t)]},ol.prototype.index=function(t){return this.path[3*this.resolveDepth(t)+1]},ol.prototype.indexAfter=function(t){return t=this.resolveDepth(t),this.index(t)+(t!=this.depth||this.textOffset?1:0)},ol.prototype.start=function(t){return 0==(t=this.resolveDepth(t))?0:this.path[3*t-1]+1},ol.prototype.end=function(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size},ol.prototype.before=function(t){if(!(t=this.resolveDepth(t)))throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]},ol.prototype.after=function(t){if(!(t=this.resolveDepth(t)))throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]+this.path[3*t].nodeSize},il.textOffset.get=function(){return this.pos-this.path[this.path.length-1]},il.nodeAfter.get=function(){var t=this.parent,e=this.index(this.depth);if(e==t.childCount)return null;var n=this.pos-this.path[this.path.length-1],r=t.child(e);return n?t.child(e).cut(n):r},il.nodeBefore.get=function(){var t=this.index(this.depth),e=this.pos-this.path[this.path.length-1];return e?this.parent.child(t).cut(0,e):0==t?null:this.parent.child(t-1)},ol.prototype.posAtIndex=function(t,e){e=this.resolveDepth(e);for(var n=this.path[3*e],r=0==e?0:this.path[3*e-1]+1,o=0;o<t;o++)r+=n.child(o).nodeSize;return r},ol.prototype.marks=function(){var t=this.parent,e=this.index();if(0==t.content.size)return Wc.none;if(this.textOffset)return t.child(e).marks;var n=t.maybeChild(e-1),r=t.maybeChild(e);if(!n){var o=n;n=r,r=o}for(var i=n.marks,a=0;a<i.length;a++)!1!==i[a].type.spec.inclusive||r&&i[a].isInSet(r.marks)||(i=i[a--].removeFromSet(i));return i},ol.prototype.marksAcross=function(t){var e=this.parent.maybeChild(this.index());if(!e||!e.isInline)return null;for(var n=e.marks,r=t.parent.maybeChild(t.index()),o=0;o<n.length;o++)!1!==n[o].type.spec.inclusive||r&&n[o].isInSet(r.marks)||(n=n[o--].removeFromSet(n));return n},ol.prototype.sharedDepth=function(t){for(var e=this.depth;e>0;e--)if(this.start(e)<=t&&this.end(e)>=t)return e;return 0},ol.prototype.blockRange=function(t,e){if(void 0===t&&(t=this),t.pos<this.pos)return t.blockRange(this);for(var n=this.depth-(this.parent.inlineContent||this.pos==t.pos?1:0);n>=0;n--)if(t.pos<=this.end(n)&&(!e||e(this.node(n))))return new ll(this,t,n)},ol.prototype.sameParent=function(t){return this.pos-this.parentOffset==t.pos-t.parentOffset},ol.prototype.max=function(t){return t.pos>this.pos?t:this},ol.prototype.min=function(t){return t.pos<this.pos?t:this},ol.prototype.toString=function(){for(var t="",e=1;e<=this.depth;e++)t+=(t?"/":"")+this.node(e).type.name+"_"+this.index(e-1);return t+":"+this.parentOffset},ol.resolve=function(t,e){if(!(e>=0&&e<=t.content.size))throw new RangeError("Position "+e+" out of range");for(var n=[],r=0,o=e,i=t;;){var a=i.content.findIndex(o),s=a.index,c=a.offset,l=o-c;if(n.push(i,s,r+c),!l)break;if((i=i.child(s)).isText)break;o=l-1,r+=c+1}return new ol(e,n,o)},ol.resolveCached=function(t,e){for(var n=0;n<al.length;n++){var r=al[n];if(r.pos==e&&r.doc==t)return r}var o=al[sl]=ol.resolve(t,e);return sl=(sl+1)%cl,o},Object.defineProperties(ol.prototype,il);var al=[],sl=0,cl=12,ll=function(t,e,n){this.$from=t,this.$to=e,this.depth=n},ul={start:{configurable:!0},end:{configurable:!0},parent:{configurable:!0},startIndex:{configurable:!0},endIndex:{configurable:!0}};ul.start.get=function(){return this.$from.before(this.depth+1)},ul.end.get=function(){return this.$to.after(this.depth+1)},ul.parent.get=function(){return this.$from.node(this.depth)},ul.startIndex.get=function(){return this.$from.index(this.depth)},ul.endIndex.get=function(){return this.$to.indexAfter(this.depth)},Object.defineProperties(ll.prototype,ul);var fl=Object.create(null),pl=function(t,e,n,r){this.type=t,this.attrs=e,this.content=n||zc.empty,this.marks=r||Wc.none},dl={nodeSize:{configurable:!0},childCount:{configurable:!0},textContent:{configurable:!0},firstChild:{configurable:!0},lastChild:{configurable:!0},isBlock:{configurable:!0},isTextblock:{configurable:!0},inlineContent:{configurable:!0},isInline:{configurable:!0},isText:{configurable:!0},isLeaf:{configurable:!0},isAtom:{configurable:!0}};dl.nodeSize.get=function(){return this.isLeaf?1:2+this.content.size},dl.childCount.get=function(){return this.content.childCount},pl.prototype.child=function(t){return this.content.child(t)},pl.prototype.maybeChild=function(t){return this.content.maybeChild(t)},pl.prototype.forEach=function(t){this.content.forEach(t)},pl.prototype.nodesBetween=function(t,e,n,r){void 0===r&&(r=0),this.content.nodesBetween(t,e,n,r,this)},pl.prototype.descendants=function(t){this.nodesBetween(0,this.content.size,t)},dl.textContent.get=function(){return this.textBetween(0,this.content.size,"")},pl.prototype.textBetween=function(t,e,n,r){return this.content.textBetween(t,e,n,r)},dl.firstChild.get=function(){return this.content.firstChild},dl.lastChild.get=function(){return this.content.lastChild},pl.prototype.eq=function(t){return this==t||this.sameMarkup(t)&&this.content.eq(t.content)},pl.prototype.sameMarkup=function(t){return this.hasMarkup(t.type,t.attrs,t.marks)},pl.prototype.hasMarkup=function(t,e,n){return this.type==t&&Vc(this.attrs,e||t.defaultAttrs||fl)&&Wc.sameSet(this.marks,n||Wc.none)},pl.prototype.copy=function(t){return void 0===t&&(t=null),t==this.content?this:new this.constructor(this.type,this.attrs,t,this.marks)},pl.prototype.mark=function(t){return t==this.marks?this:new this.constructor(this.type,this.attrs,this.content,t)},pl.prototype.cut=function(t,e){return 0==t&&e==this.content.size?this:this.copy(this.content.cut(t,e))},pl.prototype.slice=function(t,e,n){if(void 0===e&&(e=this.content.size),void 0===n&&(n=!1),t==e)return Hc.empty;var r=this.resolve(t),o=this.resolve(e),i=n?0:r.sharedDepth(e),a=r.start(i),s=r.node(i).content.cut(r.pos-a,o.pos-a);return new Hc(s,r.depth-i,o.depth-i)},pl.prototype.replace=function(t,e,n){return Uc(this.resolve(t),this.resolve(e),n)},pl.prototype.nodeAt=function(t){for(var e=this;;){var n=e.content.findIndex(t),r=n.index,o=n.offset;if(!(e=e.maybeChild(r)))return null;if(o==t||e.isText)return e;t-=o+1}},pl.prototype.childAfter=function(t){var e=this.content.findIndex(t),n=e.index,r=e.offset;return{node:this.content.maybeChild(n),index:n,offset:r}},pl.prototype.childBefore=function(t){if(0==t)return{node:null,index:0,offset:0};var e=this.content.findIndex(t),n=e.index,r=e.offset;if(r<t)return{node:this.content.child(n),index:n,offset:r};var o=this.content.child(n-1);return{node:o,index:n-1,offset:r-o.nodeSize}},pl.prototype.resolve=function(t){return ol.resolveCached(this,t)},pl.prototype.resolveNoCache=function(t){return ol.resolve(this,t)},pl.prototype.rangeHasMark=function(t,e,n){var r=!1;return e>t&&this.nodesBetween(t,e,(function(t){return n.isInSet(t.marks)&&(r=!0),!r})),r},dl.isBlock.get=function(){return this.type.isBlock},dl.isTextblock.get=function(){return this.type.isTextblock},dl.inlineContent.get=function(){return this.type.inlineContent},dl.isInline.get=function(){return this.type.isInline},dl.isText.get=function(){return this.type.isText},dl.isLeaf.get=function(){return this.type.isLeaf},dl.isAtom.get=function(){return this.type.isAtom},pl.prototype.toString=function(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);var t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),vl(this.marks,t)},pl.prototype.contentMatchAt=function(t){var e=this.type.contentMatch.matchFragment(this.content,0,t);if(!e)throw new Error("Called contentMatchAt on a node with invalid content");return e},pl.prototype.canReplace=function(t,e,n,r,o){void 0===n&&(n=zc.empty),void 0===r&&(r=0),void 0===o&&(o=n.childCount);var i=this.contentMatchAt(t).matchFragment(n,r,o),a=i&&i.matchFragment(this.content,e);if(!a||!a.validEnd)return!1;for(var s=r;s<o;s++)if(!this.type.allowsMarks(n.child(s).marks))return!1;return!0},pl.prototype.canReplaceWith=function(t,e,n,r){if(r&&!this.type.allowsMarks(r))return!1;var o=this.contentMatchAt(t).matchType(n),i=o&&o.matchFragment(this.content,e);return!!i&&i.validEnd},pl.prototype.canAppend=function(t){return t.content.size?this.canReplace(this.childCount,this.childCount,t.content):this.type.compatibleContent(t.type)},pl.prototype.check=function(){if(!this.type.validContent(this.content))throw new RangeError("Invalid content for node "+this.type.name+": "+this.content.toString().slice(0,50));for(var t=Wc.none,e=0;e<this.marks.length;e++)t=this.marks[e].addToSet(t);if(!Wc.sameSet(t,this.marks))throw new RangeError("Invalid collection of marks for node "+this.type.name+": "+this.marks.map((function(t){return t.type.name})));this.content.forEach((function(t){return t.check()}))},pl.prototype.toJSON=function(){var t={type:this.type.name};for(var e in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map((function(t){return t.toJSON()}))),t},pl.fromJSON=function(t,e){if(!e)throw new RangeError("Invalid input for Node.fromJSON");var n=null;if(e.marks){if(!Array.isArray(e.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=e.marks.map(t.markFromJSON)}if("text"==e.type){if("string"!=typeof e.text)throw new RangeError("Invalid text node in JSON");return t.text(e.text,n)}var r=zc.fromJSON(t,e.content);return t.nodeType(e.type).create(e.attrs,r,n)},Object.defineProperties(pl.prototype,dl);var hl=function(t){function e(e,n,r,o){if(t.call(this,e,n,null,o),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={textContent:{configurable:!0},nodeSize:{configurable:!0}};return e.prototype.toString=function(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):vl(this.marks,JSON.stringify(this.text))},n.textContent.get=function(){return this.text},e.prototype.textBetween=function(t,e){return this.text.slice(t,e)},n.nodeSize.get=function(){return this.text.length},e.prototype.mark=function(t){return t==this.marks?this:new e(this.type,this.attrs,this.text,t)},e.prototype.withText=function(t){return t==this.text?this:new e(this.type,this.attrs,t,this.marks)},e.prototype.cut=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.text.length),0==t&&e==this.text.length?this:this.withText(this.text.slice(t,e))},e.prototype.eq=function(t){return this.sameMarkup(t)&&this.text==t.text},e.prototype.toJSON=function(){var e=t.prototype.toJSON.call(this);return e.text=this.text,e},Object.defineProperties(e.prototype,n),e}(pl);function vl(t,e){for(var n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}var ml=function(t){this.validEnd=t,this.next=[],this.wrapCache=[]},gl={inlineContent:{configurable:!0},defaultType:{configurable:!0},edgeCount:{configurable:!0}};ml.parse=function(t,e){var n=new yl(t,e);if(null==n.next)return ml.empty;var r=wl(n);n.next&&n.err("Unexpected trailing text");var o=function(t){var e=Object.create(null);return n(Cl(t,0));function n(r){var o=[];r.forEach((function(e){t[e].forEach((function(e){var n=e.term,r=e.to;if(n){var i=o.indexOf(n),a=i>-1&&o[i+1];Cl(t,r).forEach((function(t){a||o.push(n,a=[]),-1==a.indexOf(t)&&a.push(t)}))}}))}));for(var i=e[r.join(",")]=new ml(r.indexOf(t.length-1)>-1),a=0;a<o.length;a+=2){var s=o[a+1].sort(Ol);i.next.push(o[a],e[s.join(",")]||n(s))}return i}}(function(t){var e=[[]];return o(i(t,0),n()),e;function n(){return e.push([])-1}function r(t,n,r){var o={term:r,to:n};return e[t].push(o),o}function o(t,e){t.forEach((function(t){return t.to=e}))}function i(t,e){if("choice"==t.type)return t.exprs.reduce((function(t,n){return t.concat(i(n,e))}),[]);if("seq"==t.type)for(var a=0;;a++){var s=i(t.exprs[a],e);if(a==t.exprs.length-1)return s;o(s,e=n())}else{if("star"==t.type){var c=n();return r(e,c),o(i(t.expr,c),c),[r(c)]}if("plus"==t.type){var l=n();return o(i(t.expr,e),l),o(i(t.expr,l),l),[r(l)]}if("opt"==t.type)return[r(e)].concat(i(t.expr,e));if("range"==t.type){for(var u=e,f=0;f<t.min;f++){var p=n();o(i(t.expr,u),p),u=p}if(-1==t.max)o(i(t.expr,u),u);else for(var d=t.min;d<t.max;d++){var h=n();r(u,h),o(i(t.expr,u),h),u=h}return[r(u)]}if("name"==t.type)return[r(e,null,t.value)]}}}(r));return function(t,e){for(var n=0,r=[t];n<r.length;n++){for(var o=r[n],i=!o.validEnd,a=[],s=0;s<o.next.length;s+=2){var c=o.next[s],l=o.next[s+1];a.push(c.name),!i||c.isText||c.hasRequiredAttrs()||(i=!1),-1==r.indexOf(l)&&r.push(l)}i&&e.err("Only non-generatable nodes ("+a.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(o,n),o},ml.prototype.matchType=function(t){for(var e=0;e<this.next.length;e+=2)if(this.next[e]==t)return this.next[e+1];return null},ml.prototype.matchFragment=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=t.childCount);for(var r=this,o=e;r&&o<n;o++)r=r.matchType(t.child(o).type);return r},gl.inlineContent.get=function(){var t=this.next[0];return!!t&&t.isInline},gl.defaultType.get=function(){for(var t=0;t<this.next.length;t+=2){var e=this.next[t];if(!e.isText&&!e.hasRequiredAttrs())return e}},ml.prototype.compatible=function(t){for(var e=0;e<this.next.length;e+=2)for(var n=0;n<t.next.length;n+=2)if(this.next[e]==t.next[n])return!0;return!1},ml.prototype.fillBefore=function(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=0);var r=[this];return function o(i,a){var s=i.matchFragment(t,n);if(s&&(!e||s.validEnd))return zc.from(a.map((function(t){return t.createAndFill()})));for(var c=0;c<i.next.length;c+=2){var l=i.next[c],u=i.next[c+1];if(!l.isText&&!l.hasRequiredAttrs()&&-1==r.indexOf(u)){r.push(u);var f=o(u,a.concat(l));if(f)return f}}}(this,[])},ml.prototype.findWrapping=function(t){for(var e=0;e<this.wrapCache.length;e+=2)if(this.wrapCache[e]==t)return this.wrapCache[e+1];var n=this.computeWrapping(t);return this.wrapCache.push(t,n),n},ml.prototype.computeWrapping=function(t){for(var e=Object.create(null),n=[{match:this,type:null,via:null}];n.length;){var r=n.shift(),o=r.match;if(o.matchType(t)){for(var i=[],a=r;a.type;a=a.via)i.push(a.type);return i.reverse()}for(var s=0;s<o.next.length;s+=2){var c=o.next[s];c.isLeaf||c.hasRequiredAttrs()||c.name in e||r.type&&!o.next[s+1].validEnd||(n.push({match:c.contentMatch,type:c,via:r}),e[c.name]=!0)}}},gl.edgeCount.get=function(){return this.next.length>>1},ml.prototype.edge=function(t){var e=t<<1;if(e>=this.next.length)throw new RangeError("There's no "+t+"th edge in this content match");return{type:this.next[e],next:this.next[e+1]}},ml.prototype.toString=function(){var t=[];return function e(n){t.push(n);for(var r=1;r<n.next.length;r+=2)-1==t.indexOf(n.next[r])&&e(n.next[r])}(this),t.map((function(e,n){for(var r=n+(e.validEnd?"*":" ")+" ",o=0;o<e.next.length;o+=2)r+=(o?", ":"")+e.next[o].name+"->"+t.indexOf(e.next[o+1]);return r})).join("\n")},Object.defineProperties(ml.prototype,gl),ml.empty=new ml(!0);var yl=function(t,e){this.string=t,this.nodeTypes=e,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()},bl={next:{configurable:!0}};function wl(t){var e=[];do{e.push(xl(t))}while(t.eat("|"));return 1==e.length?e[0]:{type:"choice",exprs:e}}function xl(t){var e=[];do{e.push(Sl(t))}while(t.next&&")"!=t.next&&"|"!=t.next);return 1==e.length?e[0]:{type:"seq",exprs:e}}function Sl(t){for(var e=function(t){if(t.eat("(")){var e=wl(t);return t.eat(")")||t.err("Missing closing paren"),e}if(!/\W/.test(t.next)){var n=function(t,e){var n=t.nodeTypes,r=n[e];if(r)return[r];var o=[];for(var i in n){var a=n[i];a.groups.indexOf(e)>-1&&o.push(a)}0==o.length&&t.err("No node type or group '"+e+"' found");return o}(t,t.next).map((function(e){return null==t.inline?t.inline=e.isInline:t.inline!=e.isInline&&t.err("Mixing inline and block content"),{type:"name",value:e}}));return t.pos++,1==n.length?n[0]:{type:"choice",exprs:n}}t.err("Unexpected token '"+t.next+"'")}(t);;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else{if(!t.eat("{"))break;e=_l(t,e)}return e}function kl(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");var e=Number(t.next);return t.pos++,e}function _l(t,e){var n=kl(t),r=n;return t.eat(",")&&(r="}"!=t.next?kl(t):-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function Ol(t,e){return e-t}function Cl(t,e){var n=[];return function e(r){var o=t[r];if(1==o.length&&!o[0].term)return e(o[0].to);n.push(r);for(var i=0;i<o.length;i++){var a=o[i],s=a.term,c=a.to;s||-1!=n.indexOf(c)||e(c)}}(e),n.sort(Ol)}function Ml(t){var e=Object.create(null);for(var n in t){var r=t[n];if(!r.hasDefault)return null;e[n]=r.default}return e}function Dl(t,e){var n=Object.create(null);for(var r in t){var o=e&&e[r];if(void 0===o){var i=t[r];if(!i.hasDefault)throw new RangeError("No value supplied for attribute "+r);o=i.default}n[r]=o}return n}function Tl(t){var e=Object.create(null);if(t)for(var n in t)e[n]=new El(t[n]);return e}bl.next.get=function(){return this.tokens[this.pos]},yl.prototype.eat=function(t){return this.next==t&&(this.pos++||!0)},yl.prototype.err=function(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")},Object.defineProperties(yl.prototype,bl);var $l=function(t,e,n){this.name=t,this.schema=e,this.spec=n,this.groups=n.group?n.group.split(" "):[],this.attrs=Tl(n.attrs),this.defaultAttrs=Ml(this.attrs),this.contentMatch=null,this.markSet=null,this.inlineContent=null,this.isBlock=!(n.inline||"text"==t),this.isText="text"==t},Al={isInline:{configurable:!0},isTextblock:{configurable:!0},isLeaf:{configurable:!0},isAtom:{configurable:!0},whitespace:{configurable:!0}};Al.isInline.get=function(){return!this.isBlock},Al.isTextblock.get=function(){return this.isBlock&&this.inlineContent},Al.isLeaf.get=function(){return this.contentMatch==ml.empty},Al.isAtom.get=function(){return this.isLeaf||this.spec.atom},Al.whitespace.get=function(){return this.spec.whitespace||(this.spec.code?"pre":"normal")},$l.prototype.hasRequiredAttrs=function(){for(var t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1},$l.prototype.compatibleContent=function(t){return this==t||this.contentMatch.compatible(t.contentMatch)},$l.prototype.computeAttrs=function(t){return!t&&this.defaultAttrs?this.defaultAttrs:Dl(this.attrs,t)},$l.prototype.create=function(t,e,n){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new pl(this,this.computeAttrs(t),zc.from(e),Wc.setFrom(n))},$l.prototype.createChecked=function(t,e,n){if(e=zc.from(e),!this.validContent(e))throw new RangeError("Invalid content for node "+this.name);return new pl(this,this.computeAttrs(t),e,Wc.setFrom(n))},$l.prototype.createAndFill=function(t,e,n){if(t=this.computeAttrs(t),(e=zc.from(e)).size){var r=this.contentMatch.fillBefore(e);if(!r)return null;e=r.append(e)}var o=this.contentMatch.matchFragment(e).fillBefore(zc.empty,!0);return o?new pl(this,t,e.append(o),Wc.setFrom(n)):null},$l.prototype.validContent=function(t){var e=this.contentMatch.matchFragment(t);if(!e||!e.validEnd)return!1;for(var n=0;n<t.childCount;n++)if(!this.allowsMarks(t.child(n).marks))return!1;return!0},$l.prototype.allowsMarkType=function(t){return null==this.markSet||this.markSet.indexOf(t)>-1},$l.prototype.allowsMarks=function(t){if(null==this.markSet)return!0;for(var e=0;e<t.length;e++)if(!this.allowsMarkType(t[e].type))return!1;return!0},$l.prototype.allowedMarks=function(t){if(null==this.markSet)return t;for(var e,n=0;n<t.length;n++)this.allowsMarkType(t[n].type)?e&&e.push(t[n]):e||(e=t.slice(0,n));return e?e.length?e:Wc.empty:t},$l.compile=function(t,e){var n=Object.create(null);t.forEach((function(t,r){return n[t]=new $l(t,e,r)}));var r=e.spec.topNode||"doc";if(!n[r])throw new RangeError("Schema is missing its top node type ('"+r+"')");if(!n.text)throw new RangeError("Every schema needs a 'text' type");for(var o in n.text.attrs)throw new RangeError("The text node type should not have attributes");return n},Object.defineProperties($l.prototype,Al);var El=function(t){this.hasDefault=Object.prototype.hasOwnProperty.call(t,"default"),this.default=t.default},Nl={isRequired:{configurable:!0}};Nl.isRequired.get=function(){return!this.hasDefault},Object.defineProperties(El.prototype,Nl);var Pl=function(t,e,n,r){this.name=t,this.schema=n,this.spec=r,this.attrs=Tl(r.attrs),this.rank=e,this.excluded=null;var o=Ml(this.attrs);this.instance=o&&new Wc(this,o)};Pl.prototype.create=function(t){return!t&&this.instance?this.instance:new Wc(this,Dl(this.attrs,t))},Pl.compile=function(t,e){var n=Object.create(null),r=0;return t.forEach((function(t,o){return n[t]=new Pl(t,r++,e,o)})),n},Pl.prototype.removeFromSet=function(t){for(var e=0;e<t.length;e++)t[e].type==this&&(t=t.slice(0,e).concat(t.slice(e+1)),e--);return t},Pl.prototype.isInSet=function(t){for(var e=0;e<t.length;e++)if(t[e].type==this)return t[e]},Pl.prototype.excludes=function(t){return this.excluded.indexOf(t)>-1};var Il=function(t){for(var e in this.spec={},t)this.spec[e]=t[e];this.spec.nodes=Ic.from(t.nodes),this.spec.marks=Ic.from(t.marks),this.nodes=$l.compile(this.spec.nodes,this),this.marks=Pl.compile(this.spec.marks,this);var n=Object.create(null);for(var r in this.nodes){if(r in this.marks)throw new RangeError(r+" can not be both a node and a mark");var o=this.nodes[r],i=o.spec.content||"",a=o.spec.marks;o.contentMatch=n[i]||(n[i]=ml.parse(i,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.markSet="_"==a?null:a?jl(this,a.split(" ")):""!=a&&o.inlineContent?null:[]}for(var s in this.marks){var c=this.marks[s],l=c.spec.excludes;c.excluded=null==l?[c]:""==l?[]:jl(this,l.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached=Object.create(null),this.cached.wrappings=Object.create(null)};function jl(t,e){for(var n=[],r=0;r<e.length;r++){var o=e[r],i=t.marks[o],a=i;if(i)n.push(i);else for(var s in t.marks){var c=t.marks[s];("_"==o||c.spec.group&&c.spec.group.split(" ").indexOf(o)>-1)&&n.push(a=c)}if(!a)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}Il.prototype.node=function(t,e,n,r){if("string"==typeof t)t=this.nodeType(t);else{if(!(t instanceof $l))throw new RangeError("Invalid node type: "+t);if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}return t.createChecked(e,n,r)},Il.prototype.text=function(t,e){var n=this.nodes.text;return new hl(n,n.defaultAttrs,t,Wc.setFrom(e))},Il.prototype.mark=function(t,e){return"string"==typeof t&&(t=this.marks[t]),t.create(e)},Il.prototype.nodeFromJSON=function(t){return pl.fromJSON(this,t)},Il.prototype.markFromJSON=function(t){return Wc.fromJSON(this,t)},Il.prototype.nodeType=function(t){var e=this.nodes[t];if(!e)throw new RangeError("Unknown node type: "+t);return e};var Rl=function(t,e){var n=this;this.schema=t,this.rules=e,this.tags=[],this.styles=[],e.forEach((function(t){t.tag?n.tags.push(t):t.style&&n.styles.push(t)})),this.normalizeLists=!this.tags.some((function(e){if(!/^(ul|ol)\b/.test(e.tag)||!e.node)return!1;var n=t.nodes[e.node];return n.contentMatch.matchType(n)}))};Rl.prototype.parse=function(t,e){void 0===e&&(e={});var n=new Wl(this,e,!1);return n.addAll(t,null,e.from,e.to),n.finish()},Rl.prototype.parseSlice=function(t,e){void 0===e&&(e={});var n=new Wl(this,e,!0);return n.addAll(t,null,e.from,e.to),Hc.maxOpen(n.finish())},Rl.prototype.matchTag=function(t,e,n){for(var r=n?this.tags.indexOf(n)+1:0;r<this.tags.length;r++){var o=this.tags[r];if(Hl(t,o.tag)&&(void 0===o.namespace||t.namespaceURI==o.namespace)&&(!o.context||e.matchesContext(o.context))){if(o.getAttrs){var i=o.getAttrs(t);if(!1===i)continue;o.attrs=i}return o}}},Rl.prototype.matchStyle=function(t,e,n,r){for(var o=r?this.styles.indexOf(r)+1:0;o<this.styles.length;o++){var i=this.styles[o];if(!(0!=i.style.indexOf(t)||i.context&&!n.matchesContext(i.context)||i.style.length>t.length&&(61!=i.style.charCodeAt(t.length)||i.style.slice(t.length+1)!=e))){if(i.getAttrs){var a=i.getAttrs(e);if(!1===a)continue;i.attrs=a}return i}}},Rl.schemaRules=function(t){var e=[];function n(t){for(var n=null==t.priority?50:t.priority,r=0;r<e.length;r++){var o=e[r];if((null==o.priority?50:o.priority)<n)break}e.splice(r,0,t)}var r=function(e){var r=t.marks[e].spec.parseDOM;r&&r.forEach((function(t){n(t=Jl(t)),t.mark=e}))};for(var o in t.marks)r(o);var i;for(var a in t.nodes)i=void 0,(i=t.nodes[a].spec.parseDOM)&&i.forEach((function(t){n(t=Jl(t)),t.node=a}));return e},Rl.fromSchema=function(t){return t.cached.domParser||(t.cached.domParser=new Rl(t,Rl.schemaRules(t)))};var zl={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},Fl={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Ll={ol:!0,ul:!0};function Bl(t,e,n){return null!=e?(e?1:0)|("full"===e?2:0):t&&"pre"==t.whitespace?3:-5&n}var Vl=function(t,e,n,r,o,i,a){this.type=t,this.attrs=e,this.solid=o,this.match=i||(4&a?null:t.contentMatch),this.options=a,this.content=[],this.marks=n,this.activeMarks=Wc.none,this.pendingMarks=r,this.stashMarks=[]};Vl.prototype.findWrapping=function(t){if(!this.match){if(!this.type)return[];var e=this.type.contentMatch.fillBefore(zc.from(t));if(!e){var n,r=this.type.contentMatch;return(n=r.findWrapping(t.type))?(this.match=r,n):null}this.match=this.type.contentMatch.matchFragment(e)}return this.match.findWrapping(t.type)},Vl.prototype.finish=function(t){if(!(1&this.options)){var e,n=this.content[this.content.length-1];n&&n.isText&&(e=/[ \t\r\n\u000c]+$/.exec(n.text))&&(n.text.length==e[0].length?this.content.pop():this.content[this.content.length-1]=n.withText(n.text.slice(0,n.text.length-e[0].length)))}var r=zc.from(this.content);return!t&&this.match&&(r=r.append(this.match.fillBefore(zc.empty,!0))),this.type?this.type.create(this.attrs,r,this.marks):r},Vl.prototype.popFromStashMark=function(t){for(var e=this.stashMarks.length-1;e>=0;e--)if(t.eq(this.stashMarks[e]))return this.stashMarks.splice(e,1)[0]},Vl.prototype.applyPending=function(t){for(var e=0,n=this.pendingMarks;e<n.length;e++){var r=n[e];(this.type?this.type.allowsMarkType(r.type):Kl(r.type,t))&&!r.isInSet(this.activeMarks)&&(this.activeMarks=r.addToSet(this.activeMarks),this.pendingMarks=r.removeFromSet(this.pendingMarks))}},Vl.prototype.inlineContext=function(t){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:t.parentNode&&!zl.hasOwnProperty(t.parentNode.nodeName.toLowerCase())};var Wl=function(t,e,n){this.parser=t,this.options=e,this.isOpen=n;var r,o=e.topNode,i=Bl(null,e.preserveWhitespace,0)|(n?4:0);r=o?new Vl(o.type,o.attrs,Wc.none,Wc.none,!0,e.topMatch||o.type.contentMatch,i):new Vl(n?null:t.schema.topNodeType,null,Wc.none,Wc.none,!0,null,i),this.nodes=[r],this.open=0,this.find=e.findPositions,this.needsBlock=!1},ql={top:{configurable:!0},currentPos:{configurable:!0}};function Hl(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function Jl(t){var e={};for(var n in t)e[n]=t[n];return e}function Kl(t,e){var n=e.schema.nodes,r=function(r){var o=n[r];if(o.allowsMarkType(t)){var i=[],a=function(t){i.push(t);for(var n=0;n<t.edgeCount;n++){var r=t.edge(n),o=r.type,s=r.next;if(o==e)return!0;if(i.indexOf(s)<0&&a(s))return!0}};return a(o.contentMatch)?{v:!0}:void 0}};for(var o in n){var i=r(o);if(i)return i.v}}ql.top.get=function(){return this.nodes[this.open]},Wl.prototype.addDOM=function(t){if(3==t.nodeType)this.addTextNode(t);else if(1==t.nodeType){var e=t.getAttribute("style"),n=e?this.readStyles(function(t){var e,n=/\s*([\w-]+)\s*:\s*([^;]+)/g,r=[];for(;e=n.exec(t);)r.push(e[1],e[2].trim());return r}(e)):null,r=this.top;if(null!=n)for(var o=0;o<n.length;o++)this.addPendingMark(n[o]);if(this.addElement(t),null!=n)for(var i=0;i<n.length;i++)this.removePendingMark(n[i],r)}},Wl.prototype.addTextNode=function(t){var e=t.nodeValue,n=this.top;if(2&n.options||n.inlineContext(t)||/[^ \t\r\n\u000c]/.test(e)){if(1&n.options)e=2&n.options?e.replace(/\r\n?/g,"\n"):e.replace(/\r?\n|\r/g," ");else if(e=e.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(e)&&this.open==this.nodes.length-1){var r=n.content[n.content.length-1],o=t.previousSibling;(!r||o&&"BR"==o.nodeName||r.isText&&/[ \t\r\n\u000c]$/.test(r.text))&&(e=e.slice(1))}e&&this.insertNode(this.parser.schema.text(e)),this.findInText(t)}else this.findInside(t)},Wl.prototype.addElement=function(t,e){var n,r=t.nodeName.toLowerCase();Ll.hasOwnProperty(r)&&this.parser.normalizeLists&&function(t){for(var e=t.firstChild,n=null;e;e=e.nextSibling){var r=1==e.nodeType?e.nodeName.toLowerCase():null;r&&Ll.hasOwnProperty(r)&&n?(n.appendChild(e),e=n):"li"==r?n=e:r&&(n=null)}}(t);var o=this.options.ruleFromNode&&this.options.ruleFromNode(t)||(n=this.parser.matchTag(t,this,e));if(o?o.ignore:Fl.hasOwnProperty(r))this.findInside(t),this.ignoreFallback(t);else if(!o||o.skip||o.closeParent){o&&o.closeParent?this.open=Math.max(0,this.open-1):o&&o.skip.nodeType&&(t=o.skip);var i,a=this.top,s=this.needsBlock;if(zl.hasOwnProperty(r))i=!0,a.type||(this.needsBlock=!0);else if(!t.firstChild)return void this.leafFallback(t);this.addAll(t),i&&this.sync(a),this.needsBlock=s}else this.addElementByRule(t,o,!1===o.consuming?n:null)},Wl.prototype.leafFallback=function(t){"BR"==t.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode("\n"))},Wl.prototype.ignoreFallback=function(t){"BR"!=t.nodeName||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"))},Wl.prototype.readStyles=function(t){var e=Wc.none;t:for(var n=0;n<t.length;n+=2)for(var r=null;;){var o=this.parser.matchStyle(t[n],t[n+1],this,r);if(!o)continue t;if(o.ignore)return null;if(e=this.parser.schema.marks[o.mark].create(o.attrs).addToSet(e),!1!==o.consuming)break;r=o}return e},Wl.prototype.addElementByRule=function(t,e,n){var r,o,i,a=this;e.node?(o=this.parser.schema.nodes[e.node]).isLeaf?this.insertNode(o.create(e.attrs))||this.leafFallback(t):r=this.enter(o,e.attrs,e.preserveWhitespace):(i=this.parser.schema.marks[e.mark].create(e.attrs),this.addPendingMark(i));var s=this.top;if(o&&o.isLeaf)this.findInside(t);else if(n)this.addElement(t,n);else if(e.getContent)this.findInside(t),e.getContent(t,this.parser.schema).forEach((function(t){return a.insertNode(t)}));else{var c=e.contentElement;"string"==typeof c?c=t.querySelector(c):"function"==typeof c&&(c=c(t)),c||(c=t),this.findAround(t,c,!0),this.addAll(c,r)}r&&(this.sync(s),this.open--),i&&this.removePendingMark(i,s)},Wl.prototype.addAll=function(t,e,n,r){for(var o=n||0,i=n?t.childNodes[n]:t.firstChild,a=null==r?null:t.childNodes[r];i!=a;i=i.nextSibling,++o)this.findAtPoint(t,o),this.addDOM(i),e&&zl.hasOwnProperty(i.nodeName.toLowerCase())&&this.sync(e);this.findAtPoint(t,o)},Wl.prototype.findPlace=function(t){for(var e,n,r=this.open;r>=0;r--){var o=this.nodes[r],i=o.findWrapping(t);if(i&&(!e||e.length>i.length)&&(e=i,n=o,!i.length))break;if(o.solid)break}if(!e)return!1;this.sync(n);for(var a=0;a<e.length;a++)this.enterInner(e[a],null,!1);return!0},Wl.prototype.insertNode=function(t){if(t.isInline&&this.needsBlock&&!this.top.type){var e=this.textblockFromContext();e&&this.enterInner(e)}if(this.findPlace(t)){this.closeExtra();var n=this.top;n.applyPending(t.type),n.match&&(n.match=n.match.matchType(t.type));for(var r=n.activeMarks,o=0;o<t.marks.length;o++)n.type&&!n.type.allowsMarkType(t.marks[o].type)||(r=t.marks[o].addToSet(r));return n.content.push(t.mark(r)),!0}return!1},Wl.prototype.enter=function(t,e,n){var r=this.findPlace(t.create(e));return r&&this.enterInner(t,e,!0,n),r},Wl.prototype.enterInner=function(t,e,n,r){this.closeExtra();var o=this.top;o.applyPending(t),o.match=o.match&&o.match.matchType(t,e);var i=Bl(t,r,o.options);4&o.options&&0==o.content.length&&(i|=4),this.nodes.push(new Vl(t,e,o.activeMarks,o.pendingMarks,n,null,i)),this.open++},Wl.prototype.closeExtra=function(t){var e=this.nodes.length-1;if(e>this.open){for(;e>this.open;e--)this.nodes[e-1].content.push(this.nodes[e].finish(t));this.nodes.length=this.open+1}},Wl.prototype.finish=function(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)},Wl.prototype.sync=function(t){for(var e=this.open;e>=0;e--)if(this.nodes[e]==t)return void(this.open=e)},ql.currentPos.get=function(){this.closeExtra();for(var t=0,e=this.open;e>=0;e--){for(var n=this.nodes[e].content,r=n.length-1;r>=0;r--)t+=n[r].nodeSize;e&&t++}return t},Wl.prototype.findAtPoint=function(t,e){if(this.find)for(var n=0;n<this.find.length;n++)this.find[n].node==t&&this.find[n].offset==e&&(this.find[n].pos=this.currentPos)},Wl.prototype.findInside=function(t){if(this.find)for(var e=0;e<this.find.length;e++)null==this.find[e].pos&&1==t.nodeType&&t.contains(this.find[e].node)&&(this.find[e].pos=this.currentPos)},Wl.prototype.findAround=function(t,e,n){if(t!=e&&this.find)for(var r=0;r<this.find.length;r++){if(null==this.find[r].pos&&1==t.nodeType&&t.contains(this.find[r].node))e.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}},Wl.prototype.findInText=function(t){if(this.find)for(var e=0;e<this.find.length;e++)this.find[e].node==t&&(this.find[e].pos=this.currentPos-(t.nodeValue.length-this.find[e].offset))},Wl.prototype.matchesContext=function(t){var e=this;if(t.indexOf("|")>-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);var n=t.split("/"),r=this.options.context,o=!(this.isOpen||r&&r.parent.type!=this.nodes[0].type),i=-(r?r.depth+1:0)+(o?0:1),a=function(t,s){for(;t>=0;t--){var c=n[t];if(""==c){if(t==n.length-1||0==t)continue;for(;s>=i;s--)if(a(t-1,s))return!0;return!1}var l=s>0||0==s&&o?e.nodes[s].type:r&&s>=i?r.node(s-i).type:null;if(!l||l.name!=c&&-1==l.groups.indexOf(c))return!1;s--}return!0};return a(n.length-1,this.open)},Wl.prototype.textblockFromContext=function(){var t=this.options.context;if(t)for(var e=t.depth;e>=0;e--){var n=t.node(e).contentMatchAt(t.indexAfter(e)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(var r in this.parser.schema.nodes){var o=this.parser.schema.nodes[r];if(o.isTextblock&&o.defaultAttrs)return o}},Wl.prototype.addPendingMark=function(t){var e=function(t,e){for(var n=0;n<e.length;n++)if(t.eq(e[n]))return e[n]}(t,this.top.pendingMarks);e&&this.top.stashMarks.push(e),this.top.pendingMarks=t.addToSet(this.top.pendingMarks)},Wl.prototype.removePendingMark=function(t,e){for(var n=this.open;n>=0;n--){var r=this.nodes[n];if(r.pendingMarks.lastIndexOf(t)>-1)r.pendingMarks=t.removeFromSet(r.pendingMarks);else{r.activeMarks=t.removeFromSet(r.activeMarks);var o=r.popFromStashMark(t);o&&r.type&&r.type.allowsMarkType(o.type)&&(r.activeMarks=o.addToSet(r.activeMarks))}if(r==e)break}},Object.defineProperties(Wl.prototype,ql);var Yl=function(t,e){this.nodes=t||{},this.marks=e||{}};function Ul(t){var e={};for(var n in t){var r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function Xl(t){return t.document||window.document}Yl.prototype.serializeFragment=function(t,e,n){var r=this;void 0===e&&(e={}),n||(n=Xl(e).createDocumentFragment());var o=n,i=null;return t.forEach((function(t){if(i||t.marks.length){i||(i=[]);for(var n=0,a=0;n<i.length&&a<t.marks.length;){var s=t.marks[a];if(r.marks[s.type.name]){if(!s.eq(i[n])||!1===s.type.spec.spanning)break;n+=2,a++}else a++}for(;n<i.length;)o=i.pop(),i.pop();for(;a<t.marks.length;){var c=t.marks[a++],l=r.serializeMark(c,t.isInline,e);l&&(i.push(c,o),o.appendChild(l.dom),o=l.contentDOM||l.dom)}}o.appendChild(r.serializeNodeInner(t,e))})),n},Yl.prototype.serializeNodeInner=function(t,e){void 0===e&&(e={});var n=Yl.renderSpec(Xl(e),this.nodes[t.type.name](t)),r=n.dom,o=n.contentDOM;if(o){if(t.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");e.onContent?e.onContent(t,o,e):this.serializeFragment(t.content,e,o)}return r},Yl.prototype.serializeNode=function(t,e){void 0===e&&(e={});for(var n=this.serializeNodeInner(t,e),r=t.marks.length-1;r>=0;r--){var o=this.serializeMark(t.marks[r],t.isInline,e);o&&((o.contentDOM||o.dom).appendChild(n),n=o.dom)}return n},Yl.prototype.serializeMark=function(t,e,n){void 0===n&&(n={});var r=this.marks[t.type.name];return r&&Yl.renderSpec(Xl(n),r(t,e))},Yl.renderSpec=function(t,e,n){if(void 0===n&&(n=null),"string"==typeof e)return{dom:t.createTextNode(e)};if(null!=e.nodeType)return{dom:e};if(e.dom&&null!=e.dom.nodeType)return e;var r=e[0],o=r.indexOf(" ");o>0&&(n=r.slice(0,o),r=r.slice(o+1));var i=null,a=n?t.createElementNS(n,r):t.createElement(r),s=e[1],c=1;if(s&&"object"==typeof s&&null==s.nodeType&&!Array.isArray(s))for(var l in c=2,s)if(null!=s[l]){var u=l.indexOf(" ");u>0?a.setAttributeNS(l.slice(0,u),l.slice(u+1),s[l]):a.setAttribute(l,s[l])}for(var f=c;f<e.length;f++){var p=e[f];if(0===p){if(f<e.length-1||f>c)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}var d=Yl.renderSpec(t,p,n),h=d.dom,v=d.contentDOM;if(a.appendChild(h),v){if(i)throw new RangeError("Multiple content holes");i=v}}return{dom:a,contentDOM:i}},Yl.fromSchema=function(t){return t.cached.domSerializer||(t.cached.domSerializer=new Yl(this.nodesFromSchema(t),this.marksFromSchema(t)))},Yl.nodesFromSchema=function(t){var e=Ul(t.nodes);return e.text||(e.text=function(t){return t.text}),e},Yl.marksFromSchema=function(t){return Ul(t.marks)};var Gl=Math.pow(2,16);function Zl(t){return 65535&t}var Ql=function(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=null),this.pos=t,this.deleted=e,this.recover=n},tu=function(t,e){void 0===e&&(e=!1),this.ranges=t,this.inverted=e};tu.prototype.recover=function(t){var e=0,n=Zl(t);if(!this.inverted)for(var r=0;r<n;r++)e+=this.ranges[3*r+2]-this.ranges[3*r+1];return this.ranges[3*n]+e+function(t){return(t-(65535&t))/Gl}(t)},tu.prototype.mapResult=function(t,e){return void 0===e&&(e=1),this._map(t,e,!1)},tu.prototype.map=function(t,e){return void 0===e&&(e=1),this._map(t,e,!0)},tu.prototype._map=function(t,e,n){for(var r=0,o=this.inverted?2:1,i=this.inverted?1:2,a=0;a<this.ranges.length;a+=3){var s=this.ranges[a]-(this.inverted?r:0);if(s>t)break;var c=this.ranges[a+o],l=this.ranges[a+i],u=s+c;if(t<=u){var f=s+r+((c?t==s?-1:t==u?1:e:e)<0?0:l);if(n)return f;var p=t==(e<0?s:u)?null:a/3+(t-s)*Gl;return new Ql(f,e<0?t!=s:t!=u,p)}r+=l-c}return n?t+r:new Ql(t+r)},tu.prototype.touches=function(t,e){for(var n=0,r=Zl(e),o=this.inverted?2:1,i=this.inverted?1:2,a=0;a<this.ranges.length;a+=3){var s=this.ranges[a]-(this.inverted?n:0);if(s>t)break;var c=this.ranges[a+o];if(t<=s+c&&a==3*r)return!0;n+=this.ranges[a+i]-c}return!1},tu.prototype.forEach=function(t){for(var e=this.inverted?2:1,n=this.inverted?1:2,r=0,o=0;r<this.ranges.length;r+=3){var i=this.ranges[r],a=i-(this.inverted?o:0),s=i+(this.inverted?0:o),c=this.ranges[r+e],l=this.ranges[r+n];t(a,a+c,s,s+l),o+=l-c}},tu.prototype.invert=function(){return new tu(this.ranges,!this.inverted)},tu.prototype.toString=function(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)},tu.offset=function(t){return 0==t?tu.empty:new tu(t<0?[0,-t,0]:[0,0,t])},tu.empty=new tu([]);var eu=function(t,e,n,r){this.maps=t||[],this.from=n||0,this.to=null==r?this.maps.length:r,this.mirror=e};function nu(t){var e=Error.call(this,t);return e.__proto__=nu.prototype,e}eu.prototype.slice=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.maps.length),new eu(this.maps,this.mirror,t,e)},eu.prototype.copy=function(){return new eu(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)},eu.prototype.appendMap=function(t,e){this.to=this.maps.push(t),null!=e&&this.setMirror(this.maps.length-1,e)},eu.prototype.appendMapping=function(t){for(var e=0,n=this.maps.length;e<t.maps.length;e++){var r=t.getMirror(e);this.appendMap(t.maps[e],null!=r&&r<e?n+r:null)}},eu.prototype.getMirror=function(t){if(this.mirror)for(var e=0;e<this.mirror.length;e++)if(this.mirror[e]==t)return this.mirror[e+(e%2?-1:1)]},eu.prototype.setMirror=function(t,e){this.mirror||(this.mirror=[]),this.mirror.push(t,e)},eu.prototype.appendMappingInverted=function(t){for(var e=t.maps.length-1,n=this.maps.length+t.maps.length;e>=0;e--){var r=t.getMirror(e);this.appendMap(t.maps[e].invert(),null!=r&&r>e?n-r-1:null)}},eu.prototype.invert=function(){var t=new eu;return t.appendMappingInverted(this),t},eu.prototype.map=function(t,e){if(void 0===e&&(e=1),this.mirror)return this._map(t,e,!0);for(var n=this.from;n<this.to;n++)t=this.maps[n].map(t,e);return t},eu.prototype.mapResult=function(t,e){return void 0===e&&(e=1),this._map(t,e,!1)},eu.prototype._map=function(t,e,n){for(var r=!1,o=this.from;o<this.to;o++){var i=this.maps[o].mapResult(t,e);if(null!=i.recover){var a=this.getMirror(o);if(null!=a&&a>o&&a<this.to){o=a,t=this.maps[a].recover(i.recover);continue}}i.deleted&&(r=!0),t=i.pos}return n?t:new Ql(t,r)},nu.prototype=Object.create(Error.prototype),nu.prototype.constructor=nu,nu.prototype.name="TransformError";var ru=function(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new eu},ou={before:{configurable:!0},docChanged:{configurable:!0}};function iu(){throw new Error("Override me")}ou.before.get=function(){return this.docs.length?this.docs[0]:this.doc},ru.prototype.step=function(t){var e=this.maybeStep(t);if(e.failed)throw new nu(e.failed);return this},ru.prototype.maybeStep=function(t){var e=t.apply(this.doc);return e.failed||this.addStep(t,e.doc),e},ou.docChanged.get=function(){return this.steps.length>0},ru.prototype.addStep=function(t,e){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=e},Object.defineProperties(ru.prototype,ou);var au=Object.create(null),su=function(){};su.prototype.apply=function(t){return iu()},su.prototype.getMap=function(){return tu.empty},su.prototype.invert=function(t){return iu()},su.prototype.map=function(t){return iu()},su.prototype.merge=function(t){return null},su.prototype.toJSON=function(){return iu()},su.fromJSON=function(t,e){if(!e||!e.stepType)throw new RangeError("Invalid input for Step.fromJSON");var n=au[e.stepType];if(!n)throw new RangeError("No step type "+e.stepType+" defined");return n.fromJSON(t,e)},su.jsonID=function(t,e){if(t in au)throw new RangeError("Duplicate use of step JSON ID "+t);return au[t]=e,e.prototype.jsonID=t,e};var cu=function(t,e){this.doc=t,this.failed=e};cu.ok=function(t){return new cu(t,null)},cu.fail=function(t){return new cu(null,t)},cu.fromReplace=function(t,e,n,r){try{return cu.ok(t.replace(e,n,r))}catch(My){if(My instanceof qc)return cu.fail(My.message);throw My}};var lu=function(t){function e(e,n,r,o){t.call(this),this.from=e,this.to=n,this.slice=r,this.structure=!!o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.apply=function(t){return this.structure&&fu(t,this.from,this.to)?cu.fail("Structure replace would overwrite content"):cu.fromReplace(t,this.from,this.to,this.slice)},e.prototype.getMap=function(){return new tu([this.from,this.to-this.from,this.slice.size])},e.prototype.invert=function(t){return new e(this.from,this.from+this.slice.size,t.slice(this.from,this.to))},e.prototype.map=function(t){var n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted?null:new e(n.pos,Math.max(n.pos,r.pos),this.slice)},e.prototype.merge=function(t){if(!(t instanceof e)||t.structure||this.structure)return null;if(this.from+this.slice.size!=t.from||this.slice.openEnd||t.slice.openStart){if(t.to!=this.from||this.slice.openStart||t.slice.openEnd)return null;var n=this.slice.size+t.slice.size==0?Hc.empty:new Hc(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new e(t.from,this.to,n,this.structure)}var r=this.slice.size+t.slice.size==0?Hc.empty:new Hc(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new e(this.from,this.to+(t.to-t.from),r,this.structure)},e.prototype.toJSON=function(){var t={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t},e.fromJSON=function(t,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new e(n.from,n.to,Hc.fromJSON(t,n.slice),!!n.structure)},e}(su);su.jsonID("replace",lu);var uu=function(t){function e(e,n,r,o,i,a,s){t.call(this),this.from=e,this.to=n,this.gapFrom=r,this.gapTo=o,this.slice=i,this.insert=a,this.structure=!!s}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.apply=function(t){if(this.structure&&(fu(t,this.from,this.gapFrom)||fu(t,this.gapTo,this.to)))return cu.fail("Structure gap-replace would overwrite content");var e=t.slice(this.gapFrom,this.gapTo);if(e.openStart||e.openEnd)return cu.fail("Gap is not a flat range");var n=this.slice.insertAt(this.insert,e.content);return n?cu.fromReplace(t,this.from,this.to,n):cu.fail("Content does not fit in gap")},e.prototype.getMap=function(){return new tu([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])},e.prototype.invert=function(t){var n=this.gapTo-this.gapFrom;return new e(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)},e.prototype.map=function(t){var n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1),o=t.map(this.gapFrom,-1),i=t.map(this.gapTo,1);return n.deleted&&r.deleted||o<n.pos||i>r.pos?null:new e(n.pos,r.pos,o,i,this.slice,this.insert,this.structure)},e.prototype.toJSON=function(){var t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t},e.fromJSON=function(t,n){if("number"!=typeof n.from||"number"!=typeof n.to||"number"!=typeof n.gapFrom||"number"!=typeof n.gapTo||"number"!=typeof n.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new e(n.from,n.to,n.gapFrom,n.gapTo,Hc.fromJSON(t,n.slice),n.insert,!!n.structure)},e}(su);function fu(t,e,n){for(var r=t.resolve(e),o=n-e,i=r.depth;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0)for(var a=r.node(i).maybeChild(r.indexAfter(i));o>0;){if(!a||a.isLeaf)return!0;a=a.firstChild,o--}return!1}function pu(t,e,n){return(0==e||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function du(t){for(var e=t.parent.content.cutByIndex(t.startIndex,t.endIndex),n=t.depth;;--n){var r=t.$from.node(n),o=t.$from.index(n),i=t.$to.indexAfter(n);if(n<t.depth&&r.canReplace(o,i,e))return n;if(0==n||r.type.spec.isolating||!pu(r,o,i))break}}function hu(t,e,n,r){void 0===r&&(r=t);var o=function(t,e){var n=t.parent,r=t.startIndex,o=t.endIndex,i=n.contentMatchAt(r).findWrapping(e);if(!i)return null;var a=i.length?i[0]:e;return n.canReplaceWith(r,o,a)?i:null}(t,e),i=o&&function(t,e){var n=t.parent,r=t.startIndex,o=t.endIndex,i=n.child(r),a=e.contentMatch.findWrapping(i.type);if(!a)return null;for(var s=(a.length?a[a.length-1]:e).contentMatch,c=r;s&&c<o;c++)s=s.matchType(n.child(c).type);if(!s||!s.validEnd)return null;return a}(r,e);return i?o.map(vu).concat({type:e,attrs:n}).concat(i.map(vu)):null}function vu(t){return{type:t,attrs:null}}function mu(t,e,n,r){void 0===n&&(n=1);var o=t.resolve(e),i=o.depth-n,a=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!a.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(var s=o.depth-1,c=n-2;s>i;s--,c--){var l=o.node(s),u=o.index(s);if(l.type.spec.isolating)return!1;var f=l.content.cutByIndex(u,l.childCount),p=r&&r[c]||l;if(p!=l&&(f=f.replaceChild(0,p.type.create(p.attrs))),!l.canReplace(u+1,l.childCount)||!p.type.validContent(f))return!1}var d=o.indexAfter(i),h=r&&r[0];return o.node(i).canReplaceWith(d,d,h?h.type:o.node(i+1).type)}function gu(t,e){var n,r,o=t.resolve(e),i=o.index();return n=o.nodeBefore,r=o.nodeAfter,n&&r&&!n.isLeaf&&n.canAppend(r)&&o.parent.canReplace(i,i+1)}function yu(t,e,n){for(var r=[],o=0;o<t.childCount;o++){var i=t.child(o);i.content.size&&(i=i.copy(yu(i.content,e,i))),i.isInline&&(i=e(i,n,o)),r.push(i)}return zc.fromArray(r)}su.jsonID("replaceAround",uu),ru.prototype.lift=function(t,e){for(var n=t.$from,r=t.$to,o=t.depth,i=n.before(o+1),a=r.after(o+1),s=i,c=a,l=zc.empty,u=0,f=o,p=!1;f>e;f--)p||n.index(f)>0?(p=!0,l=zc.from(n.node(f).copy(l)),u++):s--;for(var d=zc.empty,h=0,v=o,m=!1;v>e;v--)m||r.after(v+1)<r.end(v)?(m=!0,d=zc.from(r.node(v).copy(d)),h++):c++;return this.step(new uu(s,c,i,a,new Hc(l.append(d),u,h),l.size-u,!0))},ru.prototype.wrap=function(t,e){for(var n=zc.empty,r=e.length-1;r>=0;r--)n=zc.from(e[r].type.create(e[r].attrs,n));var o=t.start,i=t.end;return this.step(new uu(o,i,o,i,new Hc(n,0,0),e.length,!0))},ru.prototype.setBlockType=function(t,e,n,r){var o=this;if(void 0===e&&(e=t),!n.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");var i=this.steps.length;return this.doc.nodesBetween(t,e,(function(t,e){if(t.isTextblock&&!t.hasMarkup(n,r)&&function(t,e,n){var r=t.resolve(e),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}(o.doc,o.mapping.slice(i).map(e),n)){o.clearIncompatible(o.mapping.slice(i).map(e,1),n);var a=o.mapping.slice(i),s=a.map(e,1),c=a.map(e+t.nodeSize,1);return o.step(new uu(s,c,s+1,c-1,new Hc(zc.from(n.create(r,null,t.marks)),0,0),1,!0)),!1}})),this},ru.prototype.setNodeMarkup=function(t,e,n,r){var o=this.doc.nodeAt(t);if(!o)throw new RangeError("No node at given position");e||(e=o.type);var i=e.create(n,null,r||o.marks);if(o.isLeaf)return this.replaceWith(t,t+o.nodeSize,i);if(!e.validContent(o.content))throw new RangeError("Invalid content for node type "+e.name);return this.step(new uu(t,t+o.nodeSize,t+1,t+o.nodeSize-1,new Hc(zc.from(i),0,0),1,!0))},ru.prototype.split=function(t,e,n){void 0===e&&(e=1);for(var r=this.doc.resolve(t),o=zc.empty,i=zc.empty,a=r.depth,s=r.depth-e,c=e-1;a>s;a--,c--){o=zc.from(r.node(a).copy(o));var l=n&&n[c];i=zc.from(l?l.type.create(l.attrs,i):r.node(a).copy(i))}return this.step(new lu(t,t,new Hc(o.append(i),e,e),!0))},ru.prototype.join=function(t,e){void 0===e&&(e=1);var n=new lu(t-e,t+e,Hc.empty,!0);return this.step(n)};var bu=function(t){function e(e,n,r){t.call(this),this.from=e,this.to=n,this.mark=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.apply=function(t){var e=this,n=t.slice(this.from,this.to),r=t.resolve(this.from),o=r.node(r.sharedDepth(this.to)),i=new Hc(yu(n.content,(function(t,n){return t.isAtom&&n.type.allowsMarkType(e.mark.type)?t.mark(e.mark.addToSet(t.marks)):t}),o),n.openStart,n.openEnd);return cu.fromReplace(t,this.from,this.to,i)},e.prototype.invert=function(){return new wu(this.from,this.to,this.mark)},e.prototype.map=function(t){var n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new e(n.pos,r.pos,this.mark)},e.prototype.merge=function(t){if(t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from)return new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark)},e.prototype.toJSON=function(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}},e.fromJSON=function(t,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new e(n.from,n.to,t.markFromJSON(n.mark))},e}(su);su.jsonID("addMark",bu);var wu=function(t){function e(e,n,r){t.call(this),this.from=e,this.to=n,this.mark=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.apply=function(t){var e=this,n=t.slice(this.from,this.to),r=new Hc(yu(n.content,(function(t){return t.mark(e.mark.removeFromSet(t.marks))})),n.openStart,n.openEnd);return cu.fromReplace(t,this.from,this.to,r)},e.prototype.invert=function(){return new bu(this.from,this.to,this.mark)},e.prototype.map=function(t){var n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new e(n.pos,r.pos,this.mark)},e.prototype.merge=function(t){if(t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from)return new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark)},e.prototype.toJSON=function(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}},e.fromJSON=function(t,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new e(n.from,n.to,t.markFromJSON(n.mark))},e}(su);function xu(t,e,n,r){if(void 0===n&&(n=e),void 0===r&&(r=Hc.empty),e==n&&!r.size)return null;var o=t.resolve(e),i=t.resolve(n);return Su(o,i,r)?new lu(e,n,r):new ku(o,i,r).fit()}function Su(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}su.jsonID("removeMark",wu),ru.prototype.addMark=function(t,e,n){var r=this,o=[],i=[],a=null,s=null;return this.doc.nodesBetween(t,e,(function(r,c,l){if(r.isInline){var u=r.marks;if(!n.isInSet(u)&&l.type.allowsMarkType(n.type)){for(var f=Math.max(c,t),p=Math.min(c+r.nodeSize,e),d=n.addToSet(u),h=0;h<u.length;h++)u[h].isInSet(d)||(a&&a.to==f&&a.mark.eq(u[h])?a.to=p:o.push(a=new wu(f,p,u[h])));s&&s.to==f?s.to=p:i.push(s=new bu(f,p,n))}}})),o.forEach((function(t){return r.step(t)})),i.forEach((function(t){return r.step(t)})),this},ru.prototype.removeMark=function(t,e,n){var r=this;void 0===n&&(n=null);var o=[],i=0;return this.doc.nodesBetween(t,e,(function(r,a){if(r.isInline){i++;var s=null;if(n instanceof Pl)for(var c,l=r.marks;c=n.isInSet(l);)(s||(s=[])).push(c),l=c.removeFromSet(l);else n?n.isInSet(r.marks)&&(s=[n]):s=r.marks;if(s&&s.length)for(var u=Math.min(a+r.nodeSize,e),f=0;f<s.length;f++){for(var p=s[f],d=void 0,h=0;h<o.length;h++){var v=o[h];v.step==i-1&&p.eq(o[h].style)&&(d=v)}d?(d.to=u,d.step=i):o.push({style:p,from:Math.max(a,t),to:u,step:i})}}})),o.forEach((function(t){return r.step(new wu(t.from,t.to,t.style))})),this},ru.prototype.clearIncompatible=function(t,e,n){void 0===n&&(n=e.contentMatch);for(var r=this.doc.nodeAt(t),o=[],i=t+1,a=0;a<r.childCount;a++){var s=r.child(a),c=i+s.nodeSize,l=n.matchType(s.type,s.attrs);if(l){n=l;for(var u=0;u<s.marks.length;u++)e.allowsMarkType(s.marks[u].type)||this.step(new wu(i,c,s.marks[u]))}else o.push(new lu(i,c,Hc.empty));i=c}if(!n.validEnd){var f=n.fillBefore(zc.empty,!0);this.replace(i,i,new Hc(f,0,0))}for(var p=o.length-1;p>=0;p--)this.step(o[p]);return this},ru.prototype.replace=function(t,e,n){void 0===e&&(e=t),void 0===n&&(n=Hc.empty);var r=xu(this.doc,t,e,n);return r&&this.step(r),this},ru.prototype.replaceWith=function(t,e,n){return this.replace(t,e,new Hc(zc.from(n),0,0))},ru.prototype.delete=function(t,e){return this.replace(t,e,Hc.empty)},ru.prototype.insert=function(t,e){return this.replaceWith(t,t,e)};var ku=function(t,e,n){this.$to=e,this.$from=t,this.unplaced=n,this.frontier=[];for(var r=0;r<=t.depth;r++){var o=t.node(r);this.frontier.push({type:o.type,match:o.contentMatchAt(t.indexAfter(r))})}this.placed=zc.empty;for(var i=t.depth;i>0;i--)this.placed=zc.from(t.node(i).copy(this.placed))},_u={depth:{configurable:!0}};function Ou(t,e,n){return 0==e?t.cutByIndex(n):t.replaceChild(0,t.firstChild.copy(Ou(t.firstChild.content,e-1,n)))}function Cu(t,e,n){return 0==e?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(Cu(t.lastChild.content,e-1,n)))}function Mu(t,e){for(var n=0;n<e;n++)t=t.firstChild.content;return t}function Du(t,e,n){if(e<=0)return t;var r=t.content;return e>1&&(r=r.replaceChild(0,Du(r.firstChild,e-1,1==r.childCount?n-1:0))),e>0&&(r=t.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(t.type.contentMatch.matchFragment(r).fillBefore(zc.empty,!0)))),t.copy(r)}function Tu(t,e,n,r,o){var i=t.node(e),a=o?t.indexAfter(e):t.index(e);if(a==i.childCount&&!n.compatibleContent(i.type))return null;var s=r.fillBefore(i.content,!0,a);return s&&!function(t,e,n){for(var r=n;r<e.childCount;r++)if(!t.allowsMarks(e.child(r).marks))return!0;return!1}(n,i.content,a)?s:null}function $u(t,e,n,r,o){if(e<n){var i=t.firstChild;t=t.replaceChild(0,i.copy($u(i.content,e+1,n,r,i)))}if(e>r){var a=o.contentMatchAt(0),s=a.fillBefore(t).append(t);t=s.append(a.matchFragment(s).fillBefore(zc.empty,!0))}return t}function Au(t,e){for(var n=[],r=Math.min(t.depth,e.depth);r>=0;r--){var o=t.start(r);if(o<t.pos-(t.depth-r)||e.end(r)>e.pos+(e.depth-r)||t.node(r).type.spec.isolating||e.node(r).type.spec.isolating)break;(o==e.start(r)||r==t.depth&&r==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&r&&e.start(r-1)==o-1)&&n.push(r)}return n}_u.depth.get=function(){return this.frontier.length-1},ku.prototype.fit=function(){for(;this.unplaced.size;){var t=this.findFittable();t?this.placeNodes(t):this.openMore()||this.dropNode()}var e=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,o=this.close(e<0?this.$to:r.doc.resolve(e));if(!o)return null;for(var i=this.placed,a=r.depth,s=o.depth;a&&s&&1==i.childCount;)i=i.firstChild.content,a--,s--;var c=new Hc(i,a,s);return e>-1?new uu(r.pos,e,this.$to.pos,this.$to.end(),c,n):c.size||r.pos!=this.$to.pos?new lu(r.pos,o.pos,c):void 0},ku.prototype.findFittable=function(){for(var t=1;t<=2;t++)for(var e=this.unplaced.openStart;e>=0;e--)for(var n=void 0,r=(e?(n=Mu(this.unplaced.content,e-1).firstChild).content:this.unplaced.content).firstChild,o=this.depth;o>=0;o--){var i=this.frontier[o],a=i.type,s=i.match,c=void 0,l=void 0;if(1==t&&(r?s.matchType(r.type)||(l=s.fillBefore(zc.from(r),!1)):a.compatibleContent(n.type)))return{sliceDepth:e,frontierDepth:o,parent:n,inject:l};if(2==t&&r&&(c=s.findWrapping(r.type)))return{sliceDepth:e,frontierDepth:o,parent:n,wrap:c};if(n&&s.matchType(n.type))break}},ku.prototype.openMore=function(){var t=this.unplaced,e=t.content,n=t.openStart,r=t.openEnd,o=Mu(e,n);return!(!o.childCount||o.firstChild.isLeaf)&&(this.unplaced=new Hc(e,n+1,Math.max(r,o.size+n>=e.size-r?n+1:0)),!0)},ku.prototype.dropNode=function(){var t=this.unplaced,e=t.content,n=t.openStart,r=t.openEnd,o=Mu(e,n);if(o.childCount<=1&&n>0){var i=e.size-n<=n+o.size;this.unplaced=new Hc(Ou(e,n-1,1),n-1,i?n-1:r)}else this.unplaced=new Hc(Ou(e,n,1),n,r)},ku.prototype.placeNodes=function(t){for(var e=t.sliceDepth,n=t.frontierDepth,r=t.parent,o=t.inject,i=t.wrap;this.depth>n;)this.closeFrontierNode();if(i)for(var a=0;a<i.length;a++)this.openFrontierNode(i[a]);var s=this.unplaced,c=r?r.content:s.content,l=s.openStart-e,u=0,f=[],p=this.frontier[n],d=p.match,h=p.type;if(o){for(var v=0;v<o.childCount;v++)f.push(o.child(v));d=d.matchFragment(o)}for(var m=c.size+e-(s.content.size-s.openEnd);u<c.childCount;){var g=c.child(u),y=d.matchType(g.type);if(!y)break;(++u>1||0==l||g.content.size)&&(d=y,f.push(Du(g.mark(h.allowedMarks(g.marks)),1==u?l:0,u==c.childCount?m:-1)))}var b=u==c.childCount;b||(m=-1),this.placed=Cu(this.placed,n,zc.from(f)),this.frontier[n].match=d,b&&m<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(var w=0,x=c;w<m;w++){var S=x.lastChild;this.frontier.push({type:S.type,match:S.contentMatchAt(S.childCount)}),x=S.content}this.unplaced=b?0==e?Hc.empty:new Hc(Ou(s.content,e-1,1),e-1,m<0?s.openEnd:e-1):new Hc(Ou(s.content,e,u),s.openStart,s.openEnd)},ku.prototype.mustMoveInline=function(){if(!this.$to.parent.isTextblock||this.$to.end()==this.$to.pos)return-1;var t,e=this.frontier[this.depth];if(!e.type.isTextblock||!Tu(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.depth==this.depth)return-1;for(var n=this.$to.depth,r=this.$to.after(n);n>1&&r==this.$to.end(--n);)++r;return r},ku.prototype.findCloseLevel=function(t){t:for(var e=Math.min(this.depth,t.depth);e>=0;e--){var n=this.frontier[e],r=n.match,o=n.type,i=e<t.depth&&t.end(e+1)==t.pos+(t.depth-(e+1)),a=Tu(t,e,o,r,i);if(a){for(var s=e-1;s>=0;s--){var c=this.frontier[s],l=c.match,u=Tu(t,s,c.type,l,!0);if(!u||u.childCount)continue t}return{depth:e,fit:a,move:i?t.doc.resolve(t.after(e+1)):t}}}},ku.prototype.close=function(t){var e=this.findCloseLevel(t);if(!e)return null;for(;this.depth>e.depth;)this.closeFrontierNode();e.fit.childCount&&(this.placed=Cu(this.placed,e.depth,e.fit)),t=e.move;for(var n=e.depth+1;n<=t.depth;n++){var r=t.node(n),o=r.type.contentMatch.fillBefore(r.content,!0,t.index(n));this.openFrontierNode(r.type,r.attrs,o)}return t},ku.prototype.openFrontierNode=function(t,e,n){var r=this.frontier[this.depth];r.match=r.match.matchType(t),this.placed=Cu(this.placed,this.depth,zc.from(t.create(e,n))),this.frontier.push({type:t,match:t.contentMatch})},ku.prototype.closeFrontierNode=function(){var t=this.frontier.pop().match.fillBefore(zc.empty,!0);t.childCount&&(this.placed=Cu(this.placed,this.frontier.length,t))},Object.defineProperties(ku.prototype,_u),ru.prototype.replaceRange=function(t,e,n){if(!n.size)return this.deleteRange(t,e);var r=this.doc.resolve(t),o=this.doc.resolve(e);if(Su(r,o,n))return this.step(new lu(t,e,n));var i=Au(r,this.doc.resolve(e));0==i[i.length-1]&&i.pop();var a=-(r.depth+1);i.unshift(a);for(var s=r.depth,c=r.pos-1;s>0;s--,c--){var l=r.node(s).type.spec;if(l.defining||l.isolating)break;i.indexOf(s)>-1?a=s:r.before(s)==c&&i.splice(1,0,-s)}for(var u=i.indexOf(a),f=[],p=n.openStart,d=n.content,h=0;;h++){var v=d.firstChild;if(f.push(v),h==n.openStart)break;d=v.content}p>0&&f[p-1].type.spec.defining&&r.node(u).type!=f[p-1].type?p-=1:p>=2&&f[p-1].isTextblock&&f[p-2].type.spec.defining&&r.node(u).type!=f[p-2].type&&(p-=2);for(var m=n.openStart;m>=0;m--){var g=(m+p+1)%(n.openStart+1),y=f[g];if(y)for(var b=0;b<i.length;b++){var w=i[(b+u)%i.length],x=!0;w<0&&(x=!1,w=-w);var S=r.node(w-1),k=r.index(w-1);if(S.canReplaceWith(k,k,y.type,y.marks))return this.replace(r.before(w),x?o.after(w):e,new Hc($u(n.content,0,n.openStart,g),g,n.openEnd))}}for(var _=this.steps.length,O=i.length-1;O>=0&&(this.replace(t,e,n),!(this.steps.length>_));O--){var C=i[O];C<0||(t=r.before(C),e=o.after(C))}return this},ru.prototype.replaceRangeWith=function(t,e,n){if(!n.isInline&&t==e&&this.doc.resolve(t).parent.content.size){var r=function(t,e,n){var r=t.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),n))return e;if(0==r.parentOffset)for(var o=r.depth-1;o>=0;o--){var i=r.index(o);if(r.node(o).canReplaceWith(i,i,n))return r.before(o+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(var a=r.depth-1;a>=0;a--){var s=r.indexAfter(a);if(r.node(a).canReplaceWith(s,s,n))return r.after(a+1);if(s<r.node(a).childCount)return null}}(this.doc,t,n.type);null!=r&&(t=e=r)}return this.replaceRange(t,e,new Hc(zc.from(n),0,0))},ru.prototype.deleteRange=function(t,e){for(var n=this.doc.resolve(t),r=this.doc.resolve(e),o=Au(n,r),i=0;i<o.length;i++){var a=o[i],s=i==o.length-1;if(s&&0==a||n.node(a).type.contentMatch.validEnd)return this.delete(n.start(a),r.end(a));if(a>0&&(s||n.node(a-1).canReplace(n.index(a-1),r.indexAfter(a-1))))return this.delete(n.before(a),r.after(a))}for(var c=1;c<=n.depth&&c<=r.depth;c++)if(t-n.start(c)==n.depth-c&&e>n.end(c)&&r.end(c)-e!=r.depth-c)return this.delete(n.before(c),e);return this.delete(t,e)};var Eu=Object.create(null),Nu=function(t,e,n){this.ranges=n||[new Iu(t.min(e),t.max(e))],this.$anchor=t,this.$head=e},Pu={anchor:{configurable:!0},head:{configurable:!0},from:{configurable:!0},to:{configurable:!0},$from:{configurable:!0},$to:{configurable:!0},empty:{configurable:!0}};Pu.anchor.get=function(){return this.$anchor.pos},Pu.head.get=function(){return this.$head.pos},Pu.from.get=function(){return this.$from.pos},Pu.to.get=function(){return this.$to.pos},Pu.$from.get=function(){return this.ranges[0].$from},Pu.$to.get=function(){return this.ranges[0].$to},Pu.empty.get=function(){for(var t=this.ranges,e=0;e<t.length;e++)if(t[e].$from.pos!=t[e].$to.pos)return!1;return!0},Nu.prototype.content=function(){return this.$from.node(0).slice(this.from,this.to,!0)},Nu.prototype.replace=function(t,e){void 0===e&&(e=Hc.empty);for(var n=e.content.lastChild,r=null,o=0;o<e.openEnd;o++)r=n,n=n.lastChild;for(var i=t.steps.length,a=this.ranges,s=0;s<a.length;s++){var c=a[s],l=c.$from,u=c.$to,f=t.mapping.slice(i);t.replaceRange(f.map(l.pos),f.map(u.pos),s?Hc.empty:e),0==s&&Wu(t,i,(n?n.isInline:r&&r.isTextblock)?-1:1)}},Nu.prototype.replaceWith=function(t,e){for(var n=t.steps.length,r=this.ranges,o=0;o<r.length;o++){var i=r[o],a=i.$from,s=i.$to,c=t.mapping.slice(n),l=c.map(a.pos),u=c.map(s.pos);o?t.deleteRange(l,u):(t.replaceRangeWith(l,u,e),Wu(t,n,e.isInline?-1:1))}},Nu.findFrom=function(t,e,n){var r=t.parent.inlineContent?new ju(t):Vu(t.node(0),t.parent,t.pos,t.index(),e,n);if(r)return r;for(var o=t.depth-1;o>=0;o--){var i=e<0?Vu(t.node(0),t.node(o),t.before(o+1),t.index(o),e,n):Vu(t.node(0),t.node(o),t.after(o+1),t.index(o)+1,e,n);if(i)return i}},Nu.near=function(t,e){return void 0===e&&(e=1),this.findFrom(t,e)||this.findFrom(t,-e)||new Lu(t.node(0))},Nu.atStart=function(t){return Vu(t,t,0,0,1)||new Lu(t)},Nu.atEnd=function(t){return Vu(t,t,t.content.size,t.childCount,-1)||new Lu(t)},Nu.fromJSON=function(t,e){if(!e||!e.type)throw new RangeError("Invalid input for Selection.fromJSON");var n=Eu[e.type];if(!n)throw new RangeError("No selection type "+e.type+" defined");return n.fromJSON(t,e)},Nu.jsonID=function(t,e){if(t in Eu)throw new RangeError("Duplicate use of selection JSON ID "+t);return Eu[t]=e,e.prototype.jsonID=t,e},Nu.prototype.getBookmark=function(){return ju.between(this.$anchor,this.$head).getBookmark()},Object.defineProperties(Nu.prototype,Pu),Nu.prototype.visible=!0;var Iu=function(t,e){this.$from=t,this.$to=e},ju=function(t){function e(e,n){void 0===n&&(n=e),t.call(this,e,n)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={$cursor:{configurable:!0}};return n.$cursor.get=function(){return this.$anchor.pos==this.$head.pos?this.$head:null},e.prototype.map=function(n,r){var o=n.resolve(r.map(this.head));if(!o.parent.inlineContent)return t.near(o);var i=n.resolve(r.map(this.anchor));return new e(i.parent.inlineContent?i:o,o)},e.prototype.replace=function(e,n){if(void 0===n&&(n=Hc.empty),t.prototype.replace.call(this,e,n),n==Hc.empty){var r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}},e.prototype.eq=function(t){return t instanceof e&&t.anchor==this.anchor&&t.head==this.head},e.prototype.getBookmark=function(){return new Ru(this.anchor,this.head)},e.prototype.toJSON=function(){return{type:"text",anchor:this.anchor,head:this.head}},e.fromJSON=function(t,n){if("number"!=typeof n.anchor||"number"!=typeof n.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new e(t.resolve(n.anchor),t.resolve(n.head))},e.create=function(t,e,n){void 0===n&&(n=e);var r=t.resolve(e);return new this(r,n==e?r:t.resolve(n))},e.between=function(n,r,o){var i=n.pos-r.pos;if(o&&!i||(o=i>=0?1:-1),!r.parent.inlineContent){var a=t.findFrom(r,o,!0)||t.findFrom(r,-o,!0);if(!a)return t.near(r,o);r=a.$head}return n.parent.inlineContent||(0==i||(n=(t.findFrom(n,-o,!0)||t.findFrom(n,o,!0)).$anchor).pos<r.pos!=i<0)&&(n=r),new e(n,r)},Object.defineProperties(e.prototype,n),e}(Nu);Nu.jsonID("text",ju);var Ru=function(t,e){this.anchor=t,this.head=e};Ru.prototype.map=function(t){return new Ru(t.map(this.anchor),t.map(this.head))},Ru.prototype.resolve=function(t){return ju.between(t.resolve(this.anchor),t.resolve(this.head))};var zu=function(t){function e(e){var n=e.nodeAfter,r=e.node(0).resolve(e.pos+n.nodeSize);t.call(this,e,r),this.node=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.map=function(n,r){var o=r.mapResult(this.anchor),i=o.deleted,a=o.pos,s=n.resolve(a);return i?t.near(s):new e(s)},e.prototype.content=function(){return new Hc(zc.from(this.node),0,0)},e.prototype.eq=function(t){return t instanceof e&&t.anchor==this.anchor},e.prototype.toJSON=function(){return{type:"node",anchor:this.anchor}},e.prototype.getBookmark=function(){return new Fu(this.anchor)},e.fromJSON=function(t,n){if("number"!=typeof n.anchor)throw new RangeError("Invalid input for NodeSelection.fromJSON");return new e(t.resolve(n.anchor))},e.create=function(t,e){return new this(t.resolve(e))},e.isSelectable=function(t){return!t.isText&&!1!==t.type.spec.selectable},e}(Nu);zu.prototype.visible=!1,Nu.jsonID("node",zu);var Fu=function(t){this.anchor=t};Fu.prototype.map=function(t){var e=t.mapResult(this.anchor),n=e.deleted,r=e.pos;return n?new Ru(r,r):new Fu(r)},Fu.prototype.resolve=function(t){var e=t.resolve(this.anchor),n=e.nodeAfter;return n&&zu.isSelectable(n)?new zu(e):Nu.near(e)};var Lu=function(t){function e(e){t.call(this,e.resolve(0),e.resolve(e.content.size))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.replace=function(e,n){if(void 0===n&&(n=Hc.empty),n==Hc.empty){e.delete(0,e.doc.content.size);var r=t.atStart(e.doc);r.eq(e.selection)||e.setSelection(r)}else t.prototype.replace.call(this,e,n)},e.prototype.toJSON=function(){return{type:"all"}},e.fromJSON=function(t){return new e(t)},e.prototype.map=function(t){return new e(t)},e.prototype.eq=function(t){return t instanceof e},e.prototype.getBookmark=function(){return Bu},e}(Nu);Nu.jsonID("all",Lu);var Bu={map:function(){return this},resolve:function(t){return new Lu(t)}};function Vu(t,e,n,r,o,i){if(e.inlineContent)return ju.create(t,n);for(var a=r-(o>0?0:1);o>0?a<e.childCount:a>=0;a+=o){var s=e.child(a);if(s.isAtom){if(!i&&zu.isSelectable(s))return zu.create(t,n-(o<0?s.nodeSize:0))}else{var c=Vu(t,s,n+o,o<0?s.childCount:0,o,i);if(c)return c}n+=s.nodeSize*o}}function Wu(t,e,n){var r=t.steps.length-1;if(!(r<e)){var o,i=t.steps[r];if(i instanceof lu||i instanceof uu)t.mapping.maps[r].forEach((function(t,e,n,r){null==o&&(o=r)})),t.setSelection(Nu.near(t.doc.resolve(o),n))}}var qu=function(t){function e(e){t.call(this,e.doc),this.time=Date.now(),this.curSelection=e.selection,this.curSelectionFor=0,this.storedMarks=e.storedMarks,this.updated=0,this.meta=Object.create(null)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={selection:{configurable:!0},selectionSet:{configurable:!0},storedMarksSet:{configurable:!0},isGeneric:{configurable:!0},scrolledIntoView:{configurable:!0}};return n.selection.get=function(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection},e.prototype.setSelection=function(t){if(t.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=t,this.curSelectionFor=this.steps.length,this.updated=-3&(1|this.updated),this.storedMarks=null,this},n.selectionSet.get=function(){return(1&this.updated)>0},e.prototype.setStoredMarks=function(t){return this.storedMarks=t,this.updated|=2,this},e.prototype.ensureMarks=function(t){return Wc.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this},e.prototype.addStoredMark=function(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))},e.prototype.removeStoredMark=function(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))},n.storedMarksSet.get=function(){return(2&this.updated)>0},e.prototype.addStep=function(e,n){t.prototype.addStep.call(this,e,n),this.updated=-3&this.updated,this.storedMarks=null},e.prototype.setTime=function(t){return this.time=t,this},e.prototype.replaceSelection=function(t){return this.selection.replace(this,t),this},e.prototype.replaceSelectionWith=function(t,e){var n=this.selection;return!1!==e&&(t=t.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||Wc.none))),n.replaceWith(this,t),this},e.prototype.deleteSelection=function(){return this.selection.replace(this),this},e.prototype.insertText=function(t,e,n){void 0===n&&(n=e);var r=this.doc.type.schema;if(null==e)return t?this.replaceSelectionWith(r.text(t),!0):this.deleteSelection();if(!t)return this.deleteRange(e,n);var o=this.storedMarks;if(!o){var i=this.doc.resolve(e);o=n==e?i.marks():i.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(e,n,r.text(t,o)),this.selection.empty||this.setSelection(Nu.near(this.selection.$to)),this},e.prototype.setMeta=function(t,e){return this.meta["string"==typeof t?t:t.key]=e,this},e.prototype.getMeta=function(t){return this.meta["string"==typeof t?t:t.key]},n.isGeneric.get=function(){for(var t in this.meta)return!1;return!0},e.prototype.scrollIntoView=function(){return this.updated|=4,this},n.scrolledIntoView.get=function(){return(4&this.updated)>0},Object.defineProperties(e.prototype,n),e}(ru);function Hu(t,e){return e&&t?t.bind(e):t}var Ju=function(t,e,n){this.name=t,this.init=Hu(e.init,n),this.apply=Hu(e.apply,n)},Ku=[new Ju("doc",{init:function(t){return t.doc||t.schema.topNodeType.createAndFill()},apply:function(t){return t.doc}}),new Ju("selection",{init:function(t,e){return t.selection||Nu.atStart(e.doc)},apply:function(t){return t.selection}}),new Ju("storedMarks",{init:function(t){return t.storedMarks||null},apply:function(t,e,n,r){return r.selection.$cursor?t.storedMarks:null}}),new Ju("scrollToSelection",{init:function(){return 0},apply:function(t,e){return t.scrolledIntoView?e+1:e}})],Yu=function(t,e){var n=this;this.schema=t,this.fields=Ku.concat(),this.plugins=[],this.pluginsByKey=Object.create(null),e&&e.forEach((function(t){if(n.pluginsByKey[t.key])throw new RangeError("Adding different instances of a keyed plugin ("+t.key+")");n.plugins.push(t),n.pluginsByKey[t.key]=t,t.spec.state&&n.fields.push(new Ju(t.key,t.spec.state,t))}))},Uu=function(t){this.config=t},Xu={schema:{configurable:!0},plugins:{configurable:!0},tr:{configurable:!0}};Xu.schema.get=function(){return this.config.schema},Xu.plugins.get=function(){return this.config.plugins},Uu.prototype.apply=function(t){return this.applyTransaction(t).state},Uu.prototype.filterTransaction=function(t,e){void 0===e&&(e=-1);for(var n=0;n<this.config.plugins.length;n++)if(n!=e){var r=this.config.plugins[n];if(r.spec.filterTransaction&&!r.spec.filterTransaction.call(r,t,this))return!1}return!0},Uu.prototype.applyTransaction=function(t){if(!this.filterTransaction(t))return{state:this,transactions:[]};for(var e=[t],n=this.applyInner(t),r=null;;){for(var o=!1,i=0;i<this.config.plugins.length;i++){var a=this.config.plugins[i];if(a.spec.appendTransaction){var s=r?r[i].n:0,c=r?r[i].state:this,l=s<e.length&&a.spec.appendTransaction.call(a,s?e.slice(s):e,c,n);if(l&&n.filterTransaction(l,i)){if(l.setMeta("appendedTransaction",t),!r){r=[];for(var u=0;u<this.config.plugins.length;u++)r.push(u<i?{state:n,n:e.length}:{state:this,n:0})}e.push(l),n=n.applyInner(l),o=!0}r&&(r[i]={state:n,n:e.length})}}if(!o)return{state:n,transactions:e}}},Uu.prototype.applyInner=function(t){if(!t.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");for(var e=new Uu(this.config),n=this.config.fields,r=0;r<n.length;r++){var o=n[r];e[o.name]=o.apply(t,this[o.name],this,e)}for(var i=0;i<Gu.length;i++)Gu[i](this,t,e);return e},Xu.tr.get=function(){return new qu(this)},Uu.create=function(t){for(var e=new Yu(t.doc?t.doc.type.schema:t.schema,t.plugins),n=new Uu(e),r=0;r<e.fields.length;r++)n[e.fields[r].name]=e.fields[r].init(t,n);return n},Uu.prototype.reconfigure=function(t){for(var e=new Yu(this.schema,t.plugins),n=e.fields,r=new Uu(e),o=0;o<n.length;o++){var i=n[o].name;r[i]=this.hasOwnProperty(i)?this[i]:n[o].init(t,r)}return r},Uu.prototype.toJSON=function(t){var e={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(e.storedMarks=this.storedMarks.map((function(t){return t.toJSON()}))),t&&"object"==typeof t)for(var n in t){if("doc"==n||"selection"==n)throw new RangeError("The JSON fields `doc` and `selection` are reserved");var r=t[n],o=r.spec.state;o&&o.toJSON&&(e[n]=o.toJSON.call(r,this[r.key]))}return e},Uu.fromJSON=function(t,e,n){if(!e)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");var r=new Yu(t.schema,t.plugins),o=new Uu(r);return r.fields.forEach((function(r){if("doc"==r.name)o.doc=pl.fromJSON(t.schema,e.doc);else if("selection"==r.name)o.selection=Nu.fromJSON(o.doc,e.selection);else if("storedMarks"==r.name)e.storedMarks&&(o.storedMarks=e.storedMarks.map(t.schema.markFromJSON));else{if(n)for(var i in n){var a=n[i],s=a.spec.state;if(a.key==r.name&&s&&s.fromJSON&&Object.prototype.hasOwnProperty.call(e,i))return void(o[r.name]=s.fromJSON.call(a,t,e[i],o))}o[r.name]=r.init(t,o)}})),o},Uu.addApplyListener=function(t){Gu.push(t)},Uu.removeApplyListener=function(t){var e=Gu.indexOf(t);e>-1&&Gu.splice(e,1)},Object.defineProperties(Uu.prototype,Xu);var Gu=[];function Zu(t,e,n){for(var r in t){var o=t[r];o instanceof Function?o=o.bind(e):"handleDOMEvents"==r&&(o=Zu(o,e,{})),n[r]=o}return n}var Qu=function(t){this.props={},t.props&&Zu(t.props,this,this.props),this.spec=t,this.key=t.key?t.key.key:ef("plugin")};Qu.prototype.getState=function(t){return t[this.key]};var tf=Object.create(null);function ef(t){return t in tf?t+"$"+ ++tf[t]:(tf[t]=0,t+"$")}var nf=function(t){void 0===t&&(t="key"),this.key=ef(t)};nf.prototype.get=function(t){return t.config.pluginsByKey[this.key]},nf.prototype.getState=function(t){return t[this.key]};var rf={};if("undefined"!=typeof navigator&&"undefined"!=typeof document){var of=/Edge\/(\d+)/.exec(navigator.userAgent),af=/MSIE \d/.test(navigator.userAgent),sf=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),cf=rf.ie=!!(af||sf||of);rf.ie_version=af?document.documentMode||6:sf?+sf[1]:of?+of[1]:null,rf.gecko=!cf&&/gecko\/(\d+)/i.test(navigator.userAgent),rf.gecko_version=rf.gecko&&+(/Firefox\/(\d+)/.exec(navigator.userAgent)||[0,0])[1];var lf=!cf&&/Chrome\/(\d+)/.exec(navigator.userAgent);rf.chrome=!!lf,rf.chrome_version=lf&&+lf[1],rf.safari=!cf&&/Apple Computer/.test(navigator.vendor),rf.ios=rf.safari&&(/Mobile\/\w+/.test(navigator.userAgent)||navigator.maxTouchPoints>2),rf.mac=rf.ios||/Mac/.test(navigator.platform),rf.android=/Android \d/.test(navigator.userAgent),rf.webkit="webkitFontSmoothing"in document.documentElement.style,rf.webkit_version=rf.webkit&&+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]}var uf=function(t){for(var e=0;;e++)if(!(t=t.previousSibling))return e},ff=function(t){var e=t.assignedSlot||t.parentNode;return e&&11==e.nodeType?e.host:e},pf=null,df=function(t,e,n){var r=pf||(pf=document.createRange());return r.setEnd(t,null==n?t.nodeValue.length:n),r.setStart(t,e||0),r},hf=function(t,e,n,r){return n&&(mf(t,e,n,r,-1)||mf(t,e,n,r,1))},vf=/^(img|br|input|textarea|hr)$/i;function mf(t,e,n,r,o){for(;;){if(t==n&&e==r)return!0;if(e==(o<0?0:gf(t))){var i=t.parentNode;if(1!=i.nodeType||yf(t)||vf.test(t.nodeName)||"false"==t.contentEditable)return!1;e=uf(t)+(o<0?0:1),t=i}else{if(1!=t.nodeType)return!1;if("false"==(t=t.childNodes[e+(o<0?-1:0)]).contentEditable)return!1;e=o<0?gf(t):0}}}function gf(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function yf(t){for(var e,n=t;n&&!(e=n.pmViewDesc);n=n.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}var bf=function(t){var e=t.isCollapsed;return e&&rf.chrome&&t.rangeCount&&!t.getRangeAt(0).collapsed&&(e=!1),e};function wf(t,e){var n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}function xf(t){return{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function Sf(t,e){return"number"==typeof t?t:t[e]}function kf(t){var e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,r=e.height/t.offsetHeight||1;return{left:e.left,right:e.left+t.clientWidth*n,top:e.top,bottom:e.top+t.clientHeight*r}}function _f(t,e,n){for(var r=t.someProp("scrollThreshold")||0,o=t.someProp("scrollMargin")||5,i=t.dom.ownerDocument,a=n||t.dom;a;a=ff(a))if(1==a.nodeType){var s=a==i.body||1!=a.nodeType,c=s?xf(i):kf(a),l=0,u=0;if(e.top<c.top+Sf(r,"top")?u=-(c.top-e.top+Sf(o,"top")):e.bottom>c.bottom-Sf(r,"bottom")&&(u=e.bottom-c.bottom+Sf(o,"bottom")),e.left<c.left+Sf(r,"left")?l=-(c.left-e.left+Sf(o,"left")):e.right>c.right-Sf(r,"right")&&(l=e.right-c.right+Sf(o,"right")),l||u)if(s)i.defaultView.scrollBy(l,u);else{var f=a.scrollLeft,p=a.scrollTop;u&&(a.scrollTop+=u),l&&(a.scrollLeft+=l);var d=a.scrollLeft-f,h=a.scrollTop-p;e={left:e.left-d,top:e.top-h,right:e.right-d,bottom:e.bottom-h}}if(s)break}}function Of(t){for(var e=[],n=t.ownerDocument;t&&(e.push({dom:t,top:t.scrollTop,left:t.scrollLeft}),t!=n);t=ff(t));return e}function Cf(t,e){for(var n=0;n<t.length;n++){var r=t[n],o=r.dom,i=r.top,a=r.left;o.scrollTop!=i+e&&(o.scrollTop=i+e),o.scrollLeft!=a&&(o.scrollLeft=a)}}var Mf=null;function Df(t,e){for(var n,r,o=2e8,i=0,a=e.top,s=e.top,c=t.firstChild,l=0;c;c=c.nextSibling,l++){var u=void 0;if(1==c.nodeType)u=c.getClientRects();else{if(3!=c.nodeType)continue;u=df(c).getClientRects()}for(var f=0;f<u.length;f++){var p=u[f];if(p.top<=a&&p.bottom>=s){a=Math.max(p.bottom,a),s=Math.min(p.top,s);var d=p.left>e.left?p.left-e.left:p.right<e.left?e.left-p.right:0;if(d<o){n=c,o=d,r=d&&3==n.nodeType?{left:p.right<e.left?p.right:p.left,top:e.top}:e,1==c.nodeType&&d&&(i=l+(e.left>=(p.left+p.right)/2?1:0));continue}}!n&&(e.left>=p.right&&e.top>=p.top||e.left>=p.left&&e.top>=p.bottom)&&(i=l+1)}}return n&&3==n.nodeType?function(t,e){for(var n=t.nodeValue.length,r=document.createRange(),o=0;o<n;o++){r.setEnd(t,o+1),r.setStart(t,o);var i=Ef(r,1);if(i.top!=i.bottom&&Tf(e,i))return{node:t,offset:o+(e.left>=(i.left+i.right)/2?1:0)}}return{node:t,offset:0}}(n,r):!n||o&&1==n.nodeType?{node:t,offset:i}:Df(n,r)}function Tf(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function $f(t,e,n){var r=t.childNodes.length;if(r&&n.top<n.bottom)for(var o=Math.max(0,Math.min(r-1,Math.floor(r*(e.top-n.top)/(n.bottom-n.top))-2)),i=o;;){var a=t.childNodes[i];if(1==a.nodeType)for(var s=a.getClientRects(),c=0;c<s.length;c++){var l=s[c];if(Tf(e,l))return $f(a,e,l)}if((i=(i+1)%r)==o)break}return t}function Af(t,e){var n,r,o,i,a=t.dom.ownerDocument;if(a.caretPositionFromPoint)try{var s=a.caretPositionFromPoint(e.left,e.top);s&&(o=(n=s).offsetNode,i=n.offset)}catch(m){}if(!o&&a.caretRangeFromPoint){var c=a.caretRangeFromPoint(e.left,e.top);c&&(o=(r=c).startContainer,i=r.startOffset)}var l,u=(t.root.elementFromPoint?t.root:a).elementFromPoint(e.left,e.top+1);if(!u||!t.dom.contains(1!=u.nodeType?u.parentNode:u)){var f=t.dom.getBoundingClientRect();if(!Tf(e,f))return null;if(!(u=$f(t.dom,e,f)))return null}if(rf.safari)for(var p=u;o&&p;p=ff(p))p.draggable&&(o=i=null);if(u=function(t,e){var n=t.parentNode;return n&&/^li$/i.test(n.nodeName)&&e.left<t.getBoundingClientRect().left?n:t}(u,e),o){if(rf.gecko&&1==o.nodeType&&(i=Math.min(i,o.childNodes.length))<o.childNodes.length){var d,h=o.childNodes[i];"IMG"==h.nodeName&&(d=h.getBoundingClientRect()).right<=e.left&&d.bottom>e.top&&i++}o==t.dom&&i==o.childNodes.length-1&&1==o.lastChild.nodeType&&e.top>o.lastChild.getBoundingClientRect().bottom?l=t.state.doc.content.size:0!=i&&1==o.nodeType&&"BR"==o.childNodes[i-1].nodeName||(l=function(t,e,n,r){for(var o=-1,i=e;i!=t.dom;){var a=t.docView.nearestDesc(i,!0);if(!a)return null;if(a.node.isBlock&&a.parent){var s=a.dom.getBoundingClientRect();if(s.left>r.left||s.top>r.top)o=a.posBefore;else{if(!(s.right<r.left||s.bottom<r.top))break;o=a.posAfter}}i=a.dom.parentNode}return o>-1?o:t.docView.posFromDOM(e,n)}(t,o,i,e))}null==l&&(l=function(t,e,n){var r=Df(e,n),o=r.node,i=r.offset,a=-1;if(1==o.nodeType&&!o.firstChild){var s=o.getBoundingClientRect();a=s.left!=s.right&&n.left>(s.left+s.right)/2?1:-1}return t.docView.posFromDOM(o,i,a)}(t,u,e));var v=t.docView.nearestDesc(u,!0);return{pos:l,inside:v?v.posAtStart-v.border:-1}}function Ef(t,e){var n=t.getClientRects();return n.length?n[e<0?0:n.length-1]:t.getBoundingClientRect()}var Nf=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function Pf(t,e,n){var r=t.docView.domFromPos(e,n<0?-1:1),o=r.node,i=r.offset,a=rf.webkit||rf.gecko;if(3==o.nodeType){if(!a||!Nf.test(o.nodeValue)&&(n<0?i:i!=o.nodeValue.length)){var s=i,c=i,l=n<0?1:-1;return n<0&&!i?(c++,l=-1):n>=0&&i==o.nodeValue.length?(s--,l=1):n<0?s--:c++,If(Ef(df(o,s,c),l),l<0)}var u=Ef(df(o,i,i),n);if(rf.gecko&&i&&/\s/.test(o.nodeValue[i-1])&&i<o.nodeValue.length){var f=Ef(df(o,i-1,i-1),-1);if(f.top==u.top){var p=Ef(df(o,i,i+1),-1);if(p.top!=u.top)return If(p,p.left<f.left)}}return u}if(!t.state.doc.resolve(e).parent.inlineContent){if(i&&(n<0||i==gf(o))){var d=o.childNodes[i-1];if(1==d.nodeType)return jf(d.getBoundingClientRect(),!1)}if(i<gf(o)){var h=o.childNodes[i];if(1==h.nodeType)return jf(h.getBoundingClientRect(),!0)}return jf(o.getBoundingClientRect(),n>=0)}if(i&&(n<0||i==gf(o))){var v=o.childNodes[i-1],m=3==v.nodeType?df(v,gf(v)-(a?0:1)):1!=v.nodeType||"BR"==v.nodeName&&v.nextSibling?null:v;if(m)return If(Ef(m,1),!1)}if(i<gf(o)){for(var g=o.childNodes[i];g.pmViewDesc&&g.pmViewDesc.ignoreForCoords;)g=g.nextSibling;var y=g?3==g.nodeType?df(g,0,a?0:1):1==g.nodeType?g:null:null;if(y)return If(Ef(y,-1),!0)}return If(Ef(3==o.nodeType?df(o):o,-n),n>=0)}function If(t,e){if(0==t.width)return t;var n=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:n,right:n}}function jf(t,e){if(0==t.height)return t;var n=e?t.top:t.bottom;return{top:n,bottom:n,left:t.left,right:t.right}}function Rf(t,e,n){var r=t.state,o=t.root.activeElement;r!=e&&t.updateState(e),o!=t.dom&&t.focus();try{return n()}finally{r!=e&&t.updateState(r),o!=t.dom&&o&&o.focus()}}var zf=/[\u0590-\u08ac]/;var Ff=null,Lf=null,Bf=!1;function Vf(t,e,n){return Ff==e&&Lf==n?Bf:(Ff=e,Lf=n,Bf="up"==n||"down"==n?function(t,e,n){var r=e.selection,o="up"==n?r.$from:r.$to;return Rf(t,e,(function(){for(var e=t.docView.domFromPos(o.pos,"up"==n?-1:1).node;;){var r=t.docView.nearestDesc(e,!0);if(!r)break;if(r.node.isBlock){e=r.dom;break}e=r.dom.parentNode}for(var i=Pf(t,o.pos,1),a=e.firstChild;a;a=a.nextSibling){var s=void 0;if(1==a.nodeType)s=a.getClientRects();else{if(3!=a.nodeType)continue;s=df(a,0,a.nodeValue.length).getClientRects()}for(var c=0;c<s.length;c++){var l=s[c];if(l.bottom>l.top+1&&("up"==n?i.top-l.top>2*(l.bottom-i.top):l.bottom-i.bottom>2*(i.bottom-l.top)))return!1}}return!0}))}(t,e,n):function(t,e,n){var r=e.selection.$head;if(!r.parent.isTextblock)return!1;var o=r.parentOffset,i=!o,a=o==r.parent.content.size,s=t.root.getSelection();return zf.test(r.parent.textContent)&&s.modify?Rf(t,e,(function(){var e=s.getRangeAt(0),o=s.focusNode,i=s.focusOffset,a=s.caretBidiLevel;s.modify("move",n,"character");var c=!(r.depth?t.docView.domAfterPos(r.before()):t.dom).contains(1==s.focusNode.nodeType?s.focusNode:s.focusNode.parentNode)||o==s.focusNode&&i==s.focusOffset;return s.removeAllRanges(),s.addRange(e),null!=a&&(s.caretBidiLevel=a),c})):"left"==n||"backward"==n?i:a}(t,e,n))}var Wf=function(t,e,n,r){this.parent=t,this.children=e,this.dom=n,n.pmViewDesc=this,this.contentDOM=r,this.dirty=0},qf={size:{configurable:!0},border:{configurable:!0},posBefore:{configurable:!0},posAtStart:{configurable:!0},posAfter:{configurable:!0},posAtEnd:{configurable:!0},contentLost:{configurable:!0},domAtom:{configurable:!0},ignoreForCoords:{configurable:!0}};Wf.prototype.matchesWidget=function(){return!1},Wf.prototype.matchesMark=function(){return!1},Wf.prototype.matchesNode=function(){return!1},Wf.prototype.matchesHack=function(t){return!1},Wf.prototype.parseRule=function(){return null},Wf.prototype.stopEvent=function(){return!1},qf.size.get=function(){for(var t=0,e=0;e<this.children.length;e++)t+=this.children[e].size;return t},qf.border.get=function(){return 0},Wf.prototype.destroy=function(){this.parent=null,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=null);for(var t=0;t<this.children.length;t++)this.children[t].destroy()},Wf.prototype.posBeforeChild=function(t){for(var e=0,n=this.posAtStart;e<this.children.length;e++){var r=this.children[e];if(r==t)return n;n+=r.size}},qf.posBefore.get=function(){return this.parent.posBeforeChild(this)},qf.posAtStart.get=function(){return this.parent?this.parent.posBeforeChild(this)+this.border:0},qf.posAfter.get=function(){return this.posBefore+this.size},qf.posAtEnd.get=function(){return this.posAtStart+this.size-2*this.border},Wf.prototype.localPosFromDOM=function(t,e,n){if(this.contentDOM&&this.contentDOM.contains(1==t.nodeType?t:t.parentNode)){if(n<0){var r,o;if(t==this.contentDOM)r=t.childNodes[e-1];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;r=t.previousSibling}for(;r&&(!(o=r.pmViewDesc)||o.parent!=this);)r=r.previousSibling;return r?this.posBeforeChild(o)+o.size:this.posAtStart}var i,a;if(t==this.contentDOM)i=t.childNodes[e];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;i=t.nextSibling}for(;i&&(!(a=i.pmViewDesc)||a.parent!=this);)i=i.nextSibling;return i?this.posBeforeChild(a):this.posAtEnd}var s;if(t==this.dom&&this.contentDOM)s=e>uf(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))s=2&t.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==e)for(var c=t;;c=c.parentNode){if(c==this.dom){s=!1;break}if(c.parentNode.firstChild!=c)break}if(null==s&&e==t.childNodes.length)for(var l=t;;l=l.parentNode){if(l==this.dom){s=!0;break}if(l.parentNode.lastChild!=l)break}}return(null==s?n>0:s)?this.posAtEnd:this.posAtStart},Wf.prototype.nearestDesc=function(t,e){for(var n=!0,r=t;r;r=r.parentNode){var o=this.getDesc(r);if(o&&(!e||o.node)){if(!n||!o.nodeDOM||(1==o.nodeDOM.nodeType?o.nodeDOM.contains(1==t.nodeType?t:t.parentNode):o.nodeDOM==t))return o;n=!1}}},Wf.prototype.getDesc=function(t){for(var e=t.pmViewDesc,n=e;n;n=n.parent)if(n==this)return e},Wf.prototype.posFromDOM=function(t,e,n){for(var r=t;r;r=r.parentNode){var o=this.getDesc(r);if(o)return o.localPosFromDOM(t,e,n)}return-1},Wf.prototype.descAt=function(t){for(var e=0,n=0;e<this.children.length;e++){var r=this.children[e],o=n+r.size;if(n==t&&o!=n){for(;!r.border&&r.children.length;)r=r.children[0];return r}if(t<o)return r.descAt(t-n-r.border);n=o}},Wf.prototype.domFromPos=function(t,e){if(!this.contentDOM)return{node:this.dom,offset:0};for(var n=0,r=0,o=0;n<this.children.length;n++){var i=this.children[n],a=o+i.size;if(a>t||i instanceof Zf){r=t-o;break}o=a}if(r)return this.children[n].domFromPos(r-this.children[n].border,e);for(var s=void 0;n&&!(s=this.children[n-1]).size&&s instanceof Jf&&s.widget.type.side>=0;n--);if(e<=0){for(var c,l=!0;(c=n?this.children[n-1]:null)&&c.dom.parentNode!=this.contentDOM;n--,l=!1);return c&&e&&l&&!c.border&&!c.domAtom?c.domFromPos(c.size,e):{node:this.contentDOM,offset:c?uf(c.dom)+1:0}}for(var u,f=!0;(u=n<this.children.length?this.children[n]:null)&&u.dom.parentNode!=this.contentDOM;n++,f=!1);return u&&f&&!u.border&&!u.domAtom?u.domFromPos(0,e):{node:this.contentDOM,offset:u?uf(u.dom):this.contentDOM.childNodes.length}},Wf.prototype.parseRange=function(t,e,n){if(void 0===n&&(n=0),0==this.children.length)return{node:this.contentDOM,from:t,to:e,fromOffset:0,toOffset:this.contentDOM.childNodes.length};for(var r=-1,o=-1,i=n,a=0;;a++){var s=this.children[a],c=i+s.size;if(-1==r&&t<=c){var l=i+s.border;if(t>=l&&e<=c-s.border&&s.node&&s.contentDOM&&this.contentDOM.contains(s.contentDOM))return s.parseRange(t,e,l);t=i;for(var u=a;u>0;u--){var f=this.children[u-1];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(1)){r=uf(f.dom)+1;break}t-=f.size}-1==r&&(r=0)}if(r>-1&&(c>e||a==this.children.length-1)){e=c;for(var p=a+1;p<this.children.length;p++){var d=this.children[p];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(-1)){o=uf(d.dom);break}e+=d.size}-1==o&&(o=this.contentDOM.childNodes.length);break}i=c}return{node:this.contentDOM,from:t,to:e,fromOffset:r,toOffset:o}},Wf.prototype.emptyChildAt=function(t){if(this.border||!this.contentDOM||!this.children.length)return!1;var e=this.children[t<0?0:this.children.length-1];return 0==e.size||e.emptyChildAt(t)},Wf.prototype.domAfterPos=function(t){var e=this.domFromPos(t,0),n=e.node,r=e.offset;if(1!=n.nodeType||r==n.childNodes.length)throw new RangeError("No node after pos "+t);return n.childNodes[r]},Wf.prototype.setSelection=function(t,e,n,r){for(var o=Math.min(t,e),i=Math.max(t,e),a=0,s=0;a<this.children.length;a++){var c=this.children[a],l=s+c.size;if(o>s&&i<l)return c.setSelection(t-s-c.border,e-s-c.border,n,r);s=l}var u=this.domFromPos(t,t?-1:1),f=e==t?u:this.domFromPos(e,e?-1:1),p=n.getSelection(),d=!1;if((rf.gecko||rf.safari)&&t==e){var h=u.node,v=u.offset;if(3==h.nodeType){if((d=v&&"\n"==h.nodeValue[v-1])&&v==h.nodeValue.length)for(var m=h,g=void 0;m;m=m.parentNode){if(g=m.nextSibling){"BR"==g.nodeName&&(u=f={node:g.parentNode,offset:uf(g)+1});break}var y=m.pmViewDesc;if(y&&y.node&&y.node.isBlock)break}}else{var b=h.childNodes[v-1];d=b&&("BR"==b.nodeName||"false"==b.contentEditable)}}if(rf.gecko&&p.focusNode&&p.focusNode!=f.node&&1==p.focusNode.nodeType){var w=p.focusNode.childNodes[p.focusOffset];w&&"false"==w.contentEditable&&(r=!0)}if(r||d&&rf.safari||!hf(u.node,u.offset,p.anchorNode,p.anchorOffset)||!hf(f.node,f.offset,p.focusNode,p.focusOffset)){var x=!1;if((p.extend||t==e)&&!d){p.collapse(u.node,u.offset);try{t!=e&&p.extend(f.node,f.offset),x=!0}catch(_){if(!(_ instanceof DOMException))throw _}}if(!x){if(t>e){var S=u;u=f,f=S}var k=document.createRange();k.setEnd(f.node,f.offset),k.setStart(u.node,u.offset),p.removeAllRanges(),p.addRange(k)}}},Wf.prototype.ignoreMutation=function(t){return!this.contentDOM&&"selection"!=t.type},qf.contentLost.get=function(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)},Wf.prototype.markDirty=function(t,e){for(var n=0,r=0;r<this.children.length;r++){var o=this.children[r],i=n+o.size;if(n==i?t<=i&&e>=n:t<i&&e>n){var a=n+o.border,s=i-o.border;if(t>=a&&e<=s)return this.dirty=t==n||e==i?2:1,void(t!=a||e!=s||!o.contentLost&&o.dom.parentNode==this.contentDOM?o.markDirty(t-a,e-a):o.dirty=3);o.dirty=o.dom!=o.contentDOM||o.dom.parentNode!=this.contentDOM||o.children.length?3:2}n=i}this.dirty=2},Wf.prototype.markParentsDirty=function(){for(var t=1,e=this.parent;e;e=e.parent,t++){var n=1==t?2:1;e.dirty<n&&(e.dirty=n)}},qf.domAtom.get=function(){return!1},qf.ignoreForCoords.get=function(){return!1},Object.defineProperties(Wf.prototype,qf);var Hf=[],Jf=function(t){function e(e,n,r,o){var i,a=n.type.toDOM;if("function"==typeof a&&(a=a(r,(function(){return i?i.parent?i.parent.posBeforeChild(i):void 0:o}))),!n.type.spec.raw){if(1!=a.nodeType){var s=document.createElement("span");s.appendChild(a),a=s}a.contentEditable=!1,a.classList.add("ProseMirror-widget")}t.call(this,e,Hf,a,null),this.widget=n,i=this}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={domAtom:{configurable:!0}};return e.prototype.matchesWidget=function(t){return 0==this.dirty&&t.type.eq(this.widget.type)},e.prototype.parseRule=function(){return{ignore:!0}},e.prototype.stopEvent=function(t){var e=this.widget.spec.stopEvent;return!!e&&e(t)},e.prototype.ignoreMutation=function(t){return"selection"!=t.type||this.widget.spec.ignoreSelection},e.prototype.destroy=function(){this.widget.type.destroy(this.dom),t.prototype.destroy.call(this)},n.domAtom.get=function(){return!0},Object.defineProperties(e.prototype,n),e}(Wf),Kf=function(t){function e(e,n,r,o){t.call(this,e,Hf,n,null),this.textDOM=r,this.text=o}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={size:{configurable:!0}};return n.size.get=function(){return this.text.length},e.prototype.localPosFromDOM=function(t,e){return t!=this.textDOM?this.posAtStart+(e?this.size:0):this.posAtStart+e},e.prototype.domFromPos=function(t){return{node:this.textDOM,offset:t}},e.prototype.ignoreMutation=function(t){return"characterData"===t.type&&t.target.nodeValue==t.oldValue},Object.defineProperties(e.prototype,n),e}(Wf),Yf=function(t){function e(e,n,r,o){t.call(this,e,[],r,o),this.mark=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.create=function(t,n,r,o){var i=o.nodeViews[n.type.name],a=i&&i(n,o,r);return a&&a.dom||(a=Yl.renderSpec(document,n.type.spec.toDOM(n,r))),new e(t,n,a.dom,a.contentDOM||a.dom)},e.prototype.parseRule=function(){return 3&this.dirty||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}},e.prototype.matchesMark=function(t){return 3!=this.dirty&&this.mark.eq(t)},e.prototype.markDirty=function(e,n){if(t.prototype.markDirty.call(this,e,n),0!=this.dirty){for(var r=this.parent;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=0}},e.prototype.slice=function(t,n,r){var o=e.create(this.parent,this.mark,!0,r),i=this.children,a=this.size;n<a&&(i=fp(i,n,a,r)),t>0&&(i=fp(i,0,t,r));for(var s=0;s<i.length;s++)i[s].parent=o;return o.children=i,o},e}(Wf),Uf=function(t){function e(e,n,r,o,i,a,s,c,l){t.call(this,e,n.isLeaf?Hf:[],i,a),this.nodeDOM=s,this.node=n,this.outerDeco=r,this.innerDeco=o,a&&this.updateChildren(c,l)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={size:{configurable:!0},border:{configurable:!0},domAtom:{configurable:!0}};return e.create=function(t,n,r,o,i,a){var s,c,l=i.nodeViews[n.type.name],u=l&&l(n,i,(function(){return c?c.parent?c.parent.posBeforeChild(c):void 0:a}),r,o),f=u&&u.dom,p=u&&u.contentDOM;if(n.isText)if(f){if(3!=f.nodeType)throw new RangeError("Text must be rendered as a DOM text node")}else f=document.createTextNode(n.text);else f||(f=(s=Yl.renderSpec(document,n.type.spec.toDOM(n))).dom,p=s.contentDOM);p||n.isText||"BR"==f.nodeName||(f.hasAttribute("contenteditable")||(f.contentEditable=!1),n.type.spec.draggable&&(f.draggable=!0));var d=f;return f=ap(f,r,n),u?c=new Qf(t,n,r,o,f,p,d,u,i,a+1):n.isText?new Gf(t,n,r,o,f,d,i):new e(t,n,r,o,f,p,d,i,a+1)},e.prototype.parseRule=function(){var t=this;if(this.node.type.spec.reparseInView)return null;var e={node:this.node.type.name,attrs:this.node.attrs};return"pre"==this.node.type.whitespace&&(e.preserveWhitespace="full"),this.contentDOM&&!this.contentLost?e.contentElement=this.contentDOM:e.getContent=function(){return t.contentDOM?zc.empty:t.node.content},e},e.prototype.matchesNode=function(t,e,n){return 0==this.dirty&&t.eq(this.node)&&sp(e,this.outerDeco)&&n.eq(this.innerDeco)},n.size.get=function(){return this.node.nodeSize},n.border.get=function(){return this.node.isLeaf?0:1},e.prototype.updateChildren=function(t,e){var n=this,r=this.node.inlineContent,o=e,i=t.composing&&this.localCompositionInfo(t,e),a=i&&i.pos>-1?i:null,s=i&&i.pos<0,c=new lp(this,a&&a.node);!function(t,e,n,r){var o=e.locals(t),i=0;if(0==o.length){for(var a=0;a<t.childCount;a++){var s=t.child(a);r(s,o,e.forChild(i,s),a),i+=s.nodeSize}return}for(var c=0,l=[],u=null,f=0;;){if(c<o.length&&o[c].to==i){for(var p=o[c++],d=void 0;c<o.length&&o[c].to==i;)(d||(d=[p])).push(o[c++]);if(d){d.sort(up);for(var h=0;h<d.length;h++)n(d[h],f,!!u)}else n(p,f,!!u)}var v=void 0,m=void 0;if(u)m=-1,v=u,u=null;else{if(!(f<t.childCount))break;m=f,v=t.child(f++)}for(var g=0;g<l.length;g++)l[g].to<=i&&l.splice(g--,1);for(;c<o.length&&o[c].from<=i&&o[c].to>i;)l.push(o[c++]);var y=i+v.nodeSize;if(v.isText){var b=y;c<o.length&&o[c].from<b&&(b=o[c].from);for(var w=0;w<l.length;w++)l[w].to<b&&(b=l[w].to);b<y&&(u=v.cut(b-i),v=v.cut(0,b-i),y=b,m=-1)}r(v,l.length?v.isInline&&!v.isLeaf?l.filter((function(t){return!t.inline})):l.slice():Hf,e.forChild(i,v),m),i=y}}(this.node,this.innerDeco,(function(e,i,a){e.spec.marks?c.syncToMarks(e.spec.marks,r,t):e.type.side>=0&&!a&&c.syncToMarks(i==n.node.childCount?Wc.none:n.node.child(i).marks,r,t),c.placeWidget(e,t,o)}),(function(e,n,a,l){var u;c.syncToMarks(e.marks,r,t),c.findNodeMatch(e,n,a,l)||s&&t.state.selection.from>o&&t.state.selection.to<o+e.nodeSize&&(u=c.findIndexWithChild(i.node))>-1&&c.updateNodeAt(e,n,a,u,t)||c.updateNextNode(e,n,a,t,l)||c.addNode(e,n,a,t,o),o+=e.nodeSize})),c.syncToMarks(Hf,r,t),this.node.isTextblock&&c.addTextblockHacks(),c.destroyRest(),(c.changed||2==this.dirty)&&(a&&this.protectLocalComposition(t,a),tp(this.contentDOM,this.children,t),rf.ios&&function(t){if("UL"==t.nodeName||"OL"==t.nodeName){var e=t.style.cssText;t.style.cssText=e+"; list-style: square !important",window.getComputedStyle(t).listStyle,t.style.cssText=e}}(this.dom))},e.prototype.localCompositionInfo=function(t,e){var n=t.state.selection,r=n.from,o=n.to;if(!(!(t.state.selection instanceof ju)||r<e||o>e+this.node.content.size)){var i=t.root.getSelection(),a=function(t,e){for(;;){if(3==t.nodeType)return t;if(1==t.nodeType&&e>0){if(t.childNodes.length>e&&3==t.childNodes[e].nodeType)return t.childNodes[e];e=gf(t=t.childNodes[e-1])}else{if(!(1==t.nodeType&&e<t.childNodes.length))return null;t=t.childNodes[e],e=0}}}(i.focusNode,i.focusOffset);if(a&&this.dom.contains(a.parentNode)){if(this.node.inlineContent){var s=a.nodeValue,c=function(t,e,n,r){for(var o=0,i=0;o<t.childCount&&i<=r;){var a=t.child(o++),s=i;if(i+=a.nodeSize,a.isText){for(var c=a.text;o<t.childCount;){var l=t.child(o++);if(i+=l.nodeSize,!l.isText)break;c+=l.text}if(i>=n&&s<r){var u=c.lastIndexOf(e,r-s-1);if(u>=0&&u+e.length+s>=n)return s+u}}}return-1}(this.node.content,s,r-e,o-e);return c<0?null:{node:a,pos:c,text:s}}return{node:a,pos:-1}}}},e.prototype.protectLocalComposition=function(t,e){var n=e.node,r=e.pos,o=e.text;if(!this.getDesc(n)){for(var i=n;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=null)}var a=new Kf(this,i,n,o);t.compositionNodes.push(a),this.children=fp(this.children,r,r+o.length,t,a)}},e.prototype.update=function(t,e,n,r){return!(3==this.dirty||!t.sameMarkup(this.node))&&(this.updateInner(t,e,n,r),!0)},e.prototype.updateInner=function(t,e,n,r){this.updateOuterDeco(e),this.node=t,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=0},e.prototype.updateOuterDeco=function(t){if(!sp(t,this.outerDeco)){var e=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=op(this.dom,this.nodeDOM,rp(this.outerDeco,this.node,e),rp(t,this.node,e)),this.dom!=n&&(n.pmViewDesc=null,this.dom.pmViewDesc=this),this.outerDeco=t}},e.prototype.selectNode=function(){this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.dom.draggable=!0)},e.prototype.deselectNode=function(){this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||this.dom.removeAttribute("draggable")},n.domAtom.get=function(){return this.node.isAtom},Object.defineProperties(e.prototype,n),e}(Wf);function Xf(t,e,n,r,o){return ap(r,e,t),new Uf(null,t,e,n,r,r,r,o,0)}var Gf=function(t){function e(e,n,r,o,i,a,s){t.call(this,e,n,r,o,i,null,a,s)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={domAtom:{configurable:!0}};return e.prototype.parseRule=function(){for(var t=this.nodeDOM.parentNode;t&&t!=this.dom&&!t.pmIsDeco;)t=t.parentNode;return{skip:t||!0}},e.prototype.update=function(t,e,n,r){return!(3==this.dirty||0!=this.dirty&&!this.inParent()||!t.sameMarkup(this.node))&&(this.updateOuterDeco(e),0==this.dirty&&t.text==this.node.text||t.text==this.nodeDOM.nodeValue||(this.nodeDOM.nodeValue=t.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=t,this.dirty=0,!0)},e.prototype.inParent=function(){for(var t=this.parent.contentDOM,e=this.nodeDOM;e;e=e.parentNode)if(e==t)return!0;return!1},e.prototype.domFromPos=function(t){return{node:this.nodeDOM,offset:t}},e.prototype.localPosFromDOM=function(e,n,r){return e==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):t.prototype.localPosFromDOM.call(this,e,n,r)},e.prototype.ignoreMutation=function(t){return"characterData"!=t.type&&"selection"!=t.type},e.prototype.slice=function(t,n,r){var o=this.node.cut(t,n),i=document.createTextNode(o.text);return new e(this.parent,o,this.outerDeco,this.innerDeco,i,i,r)},e.prototype.markDirty=function(e,n){t.prototype.markDirty.call(this,e,n),this.dom==this.nodeDOM||0!=e&&n!=this.nodeDOM.nodeValue.length||(this.dirty=3)},n.domAtom.get=function(){return!1},Object.defineProperties(e.prototype,n),e}(Uf),Zf=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={domAtom:{configurable:!0},ignoreForCoords:{configurable:!0}};return e.prototype.parseRule=function(){return{ignore:!0}},e.prototype.matchesHack=function(t){return 0==this.dirty&&this.dom.nodeName==t},n.domAtom.get=function(){return!0},n.ignoreForCoords.get=function(){return"IMG"==this.dom.nodeName},Object.defineProperties(e.prototype,n),e}(Wf),Qf=function(t){function e(e,n,r,o,i,a,s,c,l,u){t.call(this,e,n,r,o,i,a,s,l,u),this.spec=c}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.update=function(e,n,r,o){if(3==this.dirty)return!1;if(this.spec.update){var i=this.spec.update(e,n,r);return i&&this.updateInner(e,n,r,o),i}return!(!this.contentDOM&&!e.isLeaf)&&t.prototype.update.call(this,e,n,r,o)},e.prototype.selectNode=function(){this.spec.selectNode?this.spec.selectNode():t.prototype.selectNode.call(this)},e.prototype.deselectNode=function(){this.spec.deselectNode?this.spec.deselectNode():t.prototype.deselectNode.call(this)},e.prototype.setSelection=function(e,n,r,o){this.spec.setSelection?this.spec.setSelection(e,n,r):t.prototype.setSelection.call(this,e,n,r,o)},e.prototype.destroy=function(){this.spec.destroy&&this.spec.destroy(),t.prototype.destroy.call(this)},e.prototype.stopEvent=function(t){return!!this.spec.stopEvent&&this.spec.stopEvent(t)},e.prototype.ignoreMutation=function(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):t.prototype.ignoreMutation.call(this,e)},e}(Uf);function tp(t,e,n){for(var r=t.firstChild,o=!1,i=0;i<e.length;i++){var a=e[i],s=a.dom;if(s.parentNode==t){for(;s!=r;)r=cp(r),o=!0;r=r.nextSibling}else o=!0,t.insertBefore(s,r);if(a instanceof Yf){var c=r?r.previousSibling:t.lastChild;tp(a.contentDOM,a.children,n),r=c?c.nextSibling:t.firstChild}}for(;r;)r=cp(r),o=!0;o&&n.trackWrites==t&&(n.trackWrites=null)}function ep(t){t&&(this.nodeName=t)}ep.prototype=Object.create(null);var np=[new ep];function rp(t,e,n){if(0==t.length)return np;for(var r=n?np[0]:new ep,o=[r],i=0;i<t.length;i++){var a=t[i].type.attrs;if(a)for(var s in a.nodeName&&o.push(r=new ep(a.nodeName)),a){var c=a[s];null!=c&&(n&&1==o.length&&o.push(r=new ep(e.isInline?"span":"div")),"class"==s?r.class=(r.class?r.class+" ":"")+c:"style"==s?r.style=(r.style?r.style+";":"")+c:"nodeName"!=s&&(r[s]=c))}}return o}function op(t,e,n,r){if(n==np&&r==np)return e;for(var o=e,i=0;i<r.length;i++){var a=r[i],s=n[i];if(i){var c=void 0;s&&s.nodeName==a.nodeName&&o!=t&&(c=o.parentNode)&&c.tagName.toLowerCase()==a.nodeName||((c=document.createElement(a.nodeName)).pmIsDeco=!0,c.appendChild(o),s=np[0]),o=c}ip(o,s||np[0],a)}return o}function ip(t,e,n){for(var r in e)"class"==r||"style"==r||"nodeName"==r||r in n||t.removeAttribute(r);for(var o in n)"class"!=o&&"style"!=o&&"nodeName"!=o&&n[o]!=e[o]&&t.setAttribute(o,n[o]);if(e.class!=n.class){for(var i=e.class?e.class.split(" ").filter(Boolean):Hf,a=n.class?n.class.split(" ").filter(Boolean):Hf,s=0;s<i.length;s++)-1==a.indexOf(i[s])&&t.classList.remove(i[s]);for(var c=0;c<a.length;c++)-1==i.indexOf(a[c])&&t.classList.add(a[c]);0==t.classList.length&&t.removeAttribute("class")}if(e.style!=n.style){if(e.style)for(var l,u=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g;l=u.exec(e.style);)t.style.removeProperty(l[1]);n.style&&(t.style.cssText+=n.style)}}function ap(t,e,n){return op(t,t,np,rp(e,n,1!=t.nodeType))}function sp(t,e){if(t.length!=e.length)return!1;for(var n=0;n<t.length;n++)if(!t[n].type.eq(e[n].type))return!1;return!0}function cp(t){var e=t.nextSibling;return t.parentNode.removeChild(t),e}var lp=function(t,e){this.top=t,this.lock=e,this.index=0,this.stack=[],this.changed=!1,this.preMatch=function(t,e){var n=e,r=n.children.length,o=t.childCount,i=new Map,a=[];t:for(;o>0;){for(var s=void 0;;)if(r){var c=n.children[r-1];if(!(c instanceof Yf)){s=c,r--;break}n=c,r=c.children.length}else{if(n==e)break t;r=n.parent.children.indexOf(n),n=n.parent}var l=s.node;if(l){if(l!=t.child(o-1))break;--o,i.set(s,o),a.push(s)}}return{index:o,matched:i,matches:a.reverse()}}(t.node.content,t)};function up(t,e){return t.type.side-e.type.side}function fp(t,e,n,r,o){for(var i=[],a=0,s=0;a<t.length;a++){var c=t[a],l=s,u=s+=c.size;l>=n||u<=e?i.push(c):(l<e&&i.push(c.slice(0,e-l,r)),o&&(i.push(o),o=null),u>n&&i.push(c.slice(n-l,c.size,r)))}return i}function pp(t,e){var n=t.root.getSelection(),r=t.state.doc;if(!n.focusNode)return null;var o=t.docView.nearestDesc(n.focusNode),i=o&&0==o.size,a=t.docView.posFromDOM(n.focusNode,n.focusOffset);if(a<0)return null;var s,c,l=r.resolve(a);if(bf(n)){for(s=l;o&&!o.node;)o=o.parent;if(o&&o.node.isAtom&&zu.isSelectable(o.node)&&o.parent&&(!o.node.isInline||!function(t,e,n){for(var r=0==e,o=e==gf(t);r||o;){if(t==n)return!0;var i=uf(t);if(!(t=t.parentNode))return!1;r=r&&0==i,o=o&&i==gf(t)}}(n.focusNode,n.focusOffset,o.dom))){var u=o.posBefore;c=new zu(a==u?l:r.resolve(u))}}else{var f=t.docView.posFromDOM(n.anchorNode,n.anchorOffset);if(f<0)return null;s=r.resolve(f)}c||(c=xp(t,s,l,"pointer"==e||t.state.selection.head<l.pos&&!i?1:-1));return c}function dp(t){return t.editable?t.hasFocus():Sp(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function hp(t,e){var n=t.state.selection;if(bp(t,n),dp(t)){if(!e&&t.mouseDown&&t.mouseDown.allowDefault&&rf.chrome){var r=t.root.getSelection(),o=t.domObserver.currentSelection;if(r.anchorNode&&hf(r.anchorNode,r.anchorOffset,o.anchorNode,o.anchorOffset))return t.mouseDown.delayedSelectionSync=!0,void t.domObserver.setCurSelection()}if(t.domObserver.disconnectSelection(),t.cursorWrapper)!function(t){var e=t.root.getSelection(),n=document.createRange(),r=t.cursorWrapper.dom,o="IMG"==r.nodeName;o?n.setEnd(r.parentNode,uf(r)+1):n.setEnd(r,0);n.collapse(!1),e.removeAllRanges(),e.addRange(n),!o&&!t.state.selection.visible&&rf.ie&&rf.ie_version<=11&&(r.disabled=!0,r.disabled=!1)}(t);else{var i,a,s=n.anchor,c=n.head;!vp||n instanceof ju||(n.$from.parent.inlineContent||(i=mp(t,n.from)),n.empty||n.$from.parent.inlineContent||(a=mp(t,n.to))),t.docView.setSelection(s,c,t.root,e),vp&&(i&&yp(i),a&&yp(a)),n.visible?t.dom.classList.remove("ProseMirror-hideselection"):(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&function(t){var e=t.dom.ownerDocument;e.removeEventListener("selectionchange",t.hideSelectionGuard);var n=t.root.getSelection(),r=n.anchorNode,o=n.anchorOffset;e.addEventListener("selectionchange",t.hideSelectionGuard=function(){n.anchorNode==r&&n.anchorOffset==o||(e.removeEventListener("selectionchange",t.hideSelectionGuard),setTimeout((function(){dp(t)&&!t.state.selection.visible||t.dom.classList.remove("ProseMirror-hideselection")}),20))})}(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}lp.prototype.destroyBetween=function(t,e){if(t!=e){for(var n=t;n<e;n++)this.top.children[n].destroy();this.top.children.splice(t,e-t),this.changed=!0}},lp.prototype.destroyRest=function(){this.destroyBetween(this.index,this.top.children.length)},lp.prototype.syncToMarks=function(t,e,n){for(var r=0,o=this.stack.length>>1,i=Math.min(o,t.length);r<i&&(r==o-1?this.top:this.stack[r+1<<1]).matchesMark(t[r])&&!1!==t[r].type.spec.spanning;)r++;for(;r<o;)this.destroyRest(),this.top.dirty=0,this.index=this.stack.pop(),this.top=this.stack.pop(),o--;for(;o<t.length;){this.stack.push(this.top,this.index+1);for(var a=-1,s=this.index;s<Math.min(this.index+3,this.top.children.length);s++)if(this.top.children[s].matchesMark(t[o])){a=s;break}if(a>-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{var c=Yf.create(this.top,t[o],e,n);this.top.children.splice(this.index,0,c),this.top=c,this.changed=!0}this.index=0,o++}},lp.prototype.findNodeMatch=function(t,e,n,r){var o,i=-1;if(r>=this.preMatch.index&&(o=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&o.matchesNode(t,e,n))i=this.top.children.indexOf(o,this.index);else for(var a=this.index,s=Math.min(this.top.children.length,a+5);a<s;a++){var c=this.top.children[a];if(c.matchesNode(t,e,n)&&!this.preMatch.matched.has(c)){i=a;break}}return!(i<0)&&(this.destroyBetween(this.index,i),this.index++,!0)},lp.prototype.updateNodeAt=function(t,e,n,r,o){return!!this.top.children[r].update(t,e,n,o)&&(this.destroyBetween(this.index,r),this.index=r+1,!0)},lp.prototype.findIndexWithChild=function(t){for(;;){var e=t.parentNode;if(!e)return-1;if(e==this.top.contentDOM){var n=t.pmViewDesc;if(n)for(var r=this.index;r<this.top.children.length;r++)if(this.top.children[r]==n)return r;return-1}t=e}},lp.prototype.updateNextNode=function(t,e,n,r,o){for(var i=this.index;i<this.top.children.length;i++){var a=this.top.children[i];if(a instanceof Uf){var s=this.preMatch.matched.get(a);if(null!=s&&s!=o)return!1;var c=a.dom;if(!(this.lock&&(c==this.lock||1==c.nodeType&&c.contains(this.lock.parentNode))&&!(t.isText&&a.node&&a.node.isText&&a.nodeDOM.nodeValue==t.text&&3!=a.dirty&&sp(e,a.outerDeco)))&&a.update(t,e,n,r))return this.destroyBetween(this.index,i),a.dom!=c&&(this.changed=!0),this.index++,!0;break}}return!1},lp.prototype.addNode=function(t,e,n,r,o){this.top.children.splice(this.index++,0,Uf.create(this.top,t,e,n,r,o)),this.changed=!0},lp.prototype.placeWidget=function(t,e,n){var r=this.index<this.top.children.length?this.top.children[this.index]:null;if(!r||!r.matchesWidget(t)||t!=r.widget&&r.widget.type.toDOM.parentNode){var o=new Jf(this.top,t,e,n);this.top.children.splice(this.index++,0,o),this.changed=!0}else this.index++},lp.prototype.addTextblockHacks=function(){for(var t=this.top.children[this.index-1];t instanceof Yf;)t=t.children[t.children.length-1];t&&t instanceof Gf&&!/\n$/.test(t.node.text)||((rf.safari||rf.chrome)&&t&&"false"==t.dom.contentEditable&&this.addHackNode("IMG"),this.addHackNode("BR"))},lp.prototype.addHackNode=function(t){if(this.index<this.top.children.length&&this.top.children[this.index].matchesHack(t))this.index++;else{var e=document.createElement(t);"IMG"==t&&(e.className="ProseMirror-separator"),"BR"==t&&(e.className="ProseMirror-trailingBreak"),this.top.children.splice(this.index++,0,new Zf(this.top,Hf,e,null)),this.changed=!0}};var vp=rf.safari||rf.chrome&&rf.chrome_version<63;function mp(t,e){var n=t.docView.domFromPos(e,0),r=n.node,o=n.offset,i=o<r.childNodes.length?r.childNodes[o]:null,a=o?r.childNodes[o-1]:null;if(rf.safari&&i&&"false"==i.contentEditable)return gp(i);if(!(i&&"false"!=i.contentEditable||a&&"false"!=a.contentEditable)){if(i)return gp(i);if(a)return gp(a)}}function gp(t){return t.contentEditable="true",rf.safari&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function yp(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function bp(t,e){if(e instanceof zu){var n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(wp(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else wp(t)}function wp(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=null)}function xp(t,e,n,r){return t.someProp("createSelectionBetween",(function(r){return r(t,e,n)}))||ju.between(e,n,r)}function Sp(t){var e=t.root.getSelection();if(!e.anchorNode)return!1;try{return t.dom.contains(3==e.anchorNode.nodeType?e.anchorNode.parentNode:e.anchorNode)&&(t.editable||t.dom.contains(3==e.focusNode.nodeType?e.focusNode.parentNode:e.focusNode))}catch(n){return!1}}function kp(t,e){var n=t.selection,r=n.$anchor,o=n.$head,i=e>0?r.max(o):r.min(o),a=i.parent.inlineContent?i.depth?t.doc.resolve(e>0?i.after():i.before()):null:i;return a&&Nu.findFrom(a,e)}function _p(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function Op(t,e,n){var r=t.state.selection;if(!(r instanceof ju)){if(r instanceof zu&&r.node.isInline)return _p(t,new ju(e>0?r.$to:r.$from));var o=kp(t.state,e);return!!o&&_p(t,o)}if(!r.empty||n.indexOf("s")>-1)return!1;if(t.endOfTextblock(e>0?"right":"left")){var i=kp(t.state,e);return!!(i&&i instanceof zu)&&_p(t,i)}if(!(rf.mac&&n.indexOf("m")>-1)){var a,s=r.$head,c=s.textOffset?null:e<0?s.nodeBefore:s.nodeAfter;if(!c||c.isText)return!1;var l=e<0?s.pos-c.nodeSize:s.pos;return!!(c.isAtom||(a=t.docView.descAt(l))&&!a.contentDOM)&&(zu.isSelectable(c)?_p(t,new zu(e<0?t.state.doc.resolve(s.pos-c.nodeSize):s)):!!rf.webkit&&_p(t,new ju(t.state.doc.resolve(e<0?l:l+c.nodeSize))))}}function Cp(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function Mp(t){var e=t.pmViewDesc;return e&&0==e.size&&(t.nextSibling||"BR"!=t.nodeName)}function Dp(t){var e=t.root.getSelection(),n=e.focusNode,r=e.focusOffset;if(n){var o,i,a=!1;for(rf.gecko&&1==n.nodeType&&r<Cp(n)&&Mp(n.childNodes[r])&&(a=!0);;)if(r>0){if(1!=n.nodeType)break;var s=n.childNodes[r-1];if(Mp(s))o=n,i=--r;else{if(3!=s.nodeType)break;r=(n=s).nodeValue.length}}else{if($p(n))break;for(var c=n.previousSibling;c&&Mp(c);)o=n.parentNode,i=uf(c),c=c.previousSibling;if(c)r=Cp(n=c);else{if((n=n.parentNode)==t.dom)break;r=0}}a?Ap(t,e,n,r):o&&Ap(t,e,o,i)}}function Tp(t){var e=t.root.getSelection(),n=e.focusNode,r=e.focusOffset;if(n){for(var o,i,a=Cp(n);;)if(r<a){if(1!=n.nodeType)break;if(!Mp(n.childNodes[r]))break;o=n,i=++r}else{if($p(n))break;for(var s=n.nextSibling;s&&Mp(s);)o=s.parentNode,i=uf(s)+1,s=s.nextSibling;if(s)r=0,a=Cp(n=s);else{if((n=n.parentNode)==t.dom)break;r=a=0}}o&&Ap(t,e,o,i)}}function $p(t){var e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function Ap(t,e,n,r){if(bf(e)){var o=document.createRange();o.setEnd(n,r),o.setStart(n,r),e.removeAllRanges(),e.addRange(o)}else e.extend&&e.extend(n,r);t.domObserver.setCurSelection();var i=t.state;setTimeout((function(){t.state==i&&hp(t)}),50)}function Ep(t,e,n){var r=t.state.selection;if(r instanceof ju&&!r.empty||n.indexOf("s")>-1)return!1;if(rf.mac&&n.indexOf("m")>-1)return!1;var o=r.$from,i=r.$to;if(!o.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){var a=kp(t.state,e);if(a&&a instanceof zu)return _p(t,a)}if(!o.parent.inlineContent){var s=e<0?o:i,c=r instanceof Lu?Nu.near(s,e):Nu.findFrom(s,e);return!!c&&_p(t,c)}return!1}function Np(t,e){if(!(t.state.selection instanceof ju))return!0;var n=t.state.selection,r=n.$head,o=n.$anchor,i=n.empty;if(!r.sameParent(o))return!0;if(!i)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;var a=!r.textOffset&&(e<0?r.nodeBefore:r.nodeAfter);if(a&&!a.isText){var s=t.state.tr;return e<0?s.delete(r.pos-a.nodeSize,r.pos):s.delete(r.pos,r.pos+a.nodeSize),t.dispatch(s),!0}return!1}function Pp(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function Ip(t,e){var n=e.keyCode,r=function(t){var e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}(e);return 8==n||rf.mac&&72==n&&"c"==r?Np(t,-1)||Dp(t):46==n||rf.mac&&68==n&&"c"==r?Np(t,1)||Tp(t):13==n||27==n||(37==n?Op(t,-1,r)||Dp(t):39==n?Op(t,1,r)||Tp(t):38==n?Ep(t,-1,r)||Dp(t):40==n?function(t){if(rf.safari&&!(t.state.selection.$head.parentOffset>0)){var e=t.root.getSelection(),n=e.focusNode,r=e.focusOffset;if(n&&1==n.nodeType&&0==r&&n.firstChild&&"false"==n.firstChild.contentEditable){var o=n.firstChild;Pp(t,o,!0),setTimeout((function(){return Pp(t,o,!1)}),20)}}}(t)||Ep(t,1,r)||Tp(t):r==(rf.mac?"m":"c")&&(66==n||73==n||89==n||90==n))}function jp(t){var e=t.pmViewDesc;if(e)return e.parseRule();if("BR"==t.nodeName&&t.parentNode){if(rf.safari&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){var n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}if(t.parentNode.lastChild==t||rf.safari&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if("IMG"==t.nodeName&&t.getAttribute("mark-placeholder"))return{ignore:!0}}function Rp(t,e,n,r,o){if(e<0){var i=t.lastSelectionTime>Date.now()-50?t.lastSelectionOrigin:null,a=pp(t,i);if(a&&!t.state.selection.eq(a)){var s=t.state.tr.setSelection(a);"pointer"==i?s.setMeta("pointer",!0):"key"==i&&s.scrollIntoView(),t.dispatch(s)}}else{var c=t.state.doc.resolve(e),l=c.sharedDepth(n);e=c.before(l+1),n=t.state.doc.resolve(n).after(l+1);var u=t.state.selection,f=function(t,e,n){var r=t.docView.parseRange(e,n),o=r.node,i=r.fromOffset,a=r.toOffset,s=r.from,c=r.to,l=t.root.getSelection(),u=null,f=l.anchorNode;if(f&&t.dom.contains(1==f.nodeType?f:f.parentNode)&&(u=[{node:f,offset:l.anchorOffset}],bf(l)||u.push({node:l.focusNode,offset:l.focusOffset})),rf.chrome&&8===t.lastKeyCode)for(var p=a;p>i;p--){var d=o.childNodes[p-1],h=d.pmViewDesc;if("BR"==d.nodeName&&!h){a=p;break}if(!h||h.size)break}var v=t.state.doc,m=t.someProp("domParser")||Rl.fromSchema(t.state.schema),g=v.resolve(s),y=null,b=m.parse(o,{topNode:g.parent,topMatch:g.parent.contentMatchAt(g.index()),topOpen:!0,from:i,to:a,preserveWhitespace:"pre"!=g.parent.type.whitespace||"full",editableContent:!0,findPositions:u,ruleFromNode:jp,context:g});if(u&&null!=u[0].pos){var w=u[0].pos,x=u[1]&&u[1].pos;null==x&&(x=w),y={anchor:w+s,head:x+s}}return{doc:b,sel:y,from:s,to:c}}(t,e,n);if(rf.chrome&&t.cursorWrapper&&f.sel&&f.sel.anchor==t.cursorWrapper.deco.from){var p=t.cursorWrapper.deco.type.toDOM.nextSibling,d=p&&p.nodeValue?p.nodeValue.length:1;f.sel={anchor:f.sel.anchor+d,head:f.sel.anchor+d}}var h,v,m=t.state.doc,g=m.slice(f.from,f.to);8===t.lastKeyCode&&Date.now()-100<t.lastKeyCodeTime?(h=t.state.selection.to,v="end"):(h=t.state.selection.from,v="start"),t.lastKeyCode=null;var y=function(t,e,n,r,o){var i=t.findDiffStart(e,n);if(null==i)return null;var a=t.findDiffEnd(e,n+t.size,n+e.size),s=a.a,c=a.b;if("end"==o){r-=s+Math.max(0,i-Math.min(s,c))-i}if(s<i&&t.size<e.size){c=(i-=r<=i&&r>=s?i-r:0)+(c-s),s=i}else if(c<i){s=(i-=r<=i&&r>=c?i-r:0)+(s-c),c=i}return{start:i,endA:s,endB:c}}(g.content,f.doc.content,f.from,h,v);if(!y){if(!(r&&u instanceof ju&&!u.empty&&u.$head.sameParent(u.$anchor))||t.composing||f.sel&&f.sel.anchor!=f.sel.head){if((rf.ios&&t.lastIOSEnter>Date.now()-225||rf.android)&&o.some((function(t){return"DIV"==t.nodeName||"P"==t.nodeName}))&&t.someProp("handleKeyDown",(function(e){return e(t,wf(13,"Enter"))})))return void(t.lastIOSEnter=0);if(f.sel){var b=zp(t,t.state.doc,f.sel);b&&!b.eq(t.state.selection)&&t.dispatch(t.state.tr.setSelection(b))}return}y={start:u.from,endA:u.to,endB:u.to}}t.domChangeCount++,t.state.selection.from<t.state.selection.to&&y.start==y.endB&&t.state.selection instanceof ju&&(y.start>t.state.selection.from&&y.start<=t.state.selection.from+2?y.start=t.state.selection.from:y.endA<t.state.selection.to&&y.endA>=t.state.selection.to-2&&(y.endB+=t.state.selection.to-y.endA,y.endA=t.state.selection.to)),rf.ie&&rf.ie_version<=11&&y.endB==y.start+1&&y.endA==y.start&&y.start>f.from&&"  "==f.doc.textBetween(y.start-f.from-1,y.start-f.from+1)&&(y.start--,y.endA--,y.endB--);var w,x=f.doc.resolveNoCache(y.start-f.from),S=f.doc.resolveNoCache(y.endB-f.from),k=x.sameParent(S)&&x.parent.inlineContent;if((rf.ios&&t.lastIOSEnter>Date.now()-225&&(!k||o.some((function(t){return"DIV"==t.nodeName||"P"==t.nodeName})))||!k&&x.pos<f.doc.content.size&&(w=Nu.findFrom(f.doc.resolve(x.pos+1),1,!0))&&w.head==S.pos)&&t.someProp("handleKeyDown",(function(e){return e(t,wf(13,"Enter"))})))t.lastIOSEnter=0;else if(t.state.selection.anchor>y.start&&function(t,e,n,r,o){if(!r.parent.isTextblock||n-e<=o.pos-r.pos||Fp(r,!0,!1)<o.pos)return!1;var i=t.resolve(e);if(i.parentOffset<i.parent.content.size||!i.parent.isTextblock)return!1;var a=t.resolve(Fp(i,!0,!0));if(!a.parent.isTextblock||a.pos>n||Fp(a,!0,!1)<n)return!1;return r.parent.content.cut(r.parentOffset).eq(a.parent.content)}(m,y.start,y.endA,x,S)&&t.someProp("handleKeyDown",(function(e){return e(t,wf(8,"Backspace"))})))rf.android&&rf.chrome&&t.domObserver.suppressSelectionUpdates();else{rf.chrome&&rf.android&&y.toB==y.from&&(t.lastAndroidDelete=Date.now()),rf.android&&!k&&x.start()!=S.start()&&0==S.parentOffset&&x.depth==S.depth&&f.sel&&f.sel.anchor==f.sel.head&&f.sel.head==y.endA&&(y.endB-=2,S=f.doc.resolveNoCache(y.endB-f.from),setTimeout((function(){t.someProp("handleKeyDown",(function(e){return e(t,wf(13,"Enter"))}))}),20));var _,O,C,M,D=y.start,T=y.endA;if(k)if(x.pos==S.pos)rf.ie&&rf.ie_version<=11&&0==x.parentOffset&&(t.domObserver.suppressSelectionUpdates(),setTimeout((function(){return hp(t)}),20)),_=t.state.tr.delete(D,T),O=m.resolve(y.start).marksAcross(m.resolve(y.endA));else if(y.endA==y.endB&&(M=m.resolve(y.start))&&(C=function(t,e){for(var n,r,o,i=t.firstChild.marks,a=e.firstChild.marks,s=i,c=a,l=0;l<a.length;l++)s=a[l].removeFromSet(s);for(var u=0;u<i.length;u++)c=i[u].removeFromSet(c);if(1==s.length&&0==c.length)r=s[0],n="add",o=function(t){return t.mark(r.addToSet(t.marks))};else{if(0!=s.length||1!=c.length)return null;r=c[0],n="remove",o=function(t){return t.mark(r.removeFromSet(t.marks))}}for(var f=[],p=0;p<e.childCount;p++)f.push(o(e.child(p)));if(zc.from(f).eq(t))return{mark:r,type:n}}(x.parent.content.cut(x.parentOffset,S.parentOffset),M.parent.content.cut(M.parentOffset,y.endA-M.start()))))_=t.state.tr,"add"==C.type?_.addMark(D,T,C.mark):_.removeMark(D,T,C.mark);else if(x.parent.child(x.index()).isText&&x.index()==S.index()-(S.textOffset?0:1)){var $=x.parent.textBetween(x.parentOffset,S.parentOffset);if(t.someProp("handleTextInput",(function(e){return e(t,D,T,$)})))return;_=t.state.tr.insertText($,D,T)}if(_||(_=t.state.tr.replace(D,T,f.doc.slice(y.start-f.from,y.endB-f.from))),f.sel){var A=zp(t,_.doc,f.sel);A&&!(rf.chrome&&rf.android&&t.composing&&A.empty&&(y.start!=y.endB||t.lastAndroidDelete<Date.now()-100)&&(A.head==D||A.head==_.mapping.map(T)-1)||rf.ie&&A.empty&&A.head==D)&&_.setSelection(A)}O&&_.ensureMarks(O),t.dispatch(_.scrollIntoView())}}}function zp(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:xp(t,e.resolve(n.anchor),e.resolve(n.head))}function Fp(t,e,n){for(var r=t.depth,o=e?t.end():t.pos;r>0&&(e||t.indexAfter(r)==t.node(r).childCount);)r--,o++,e=!1;if(n)for(var i=t.node(r).maybeChild(t.indexAfter(r));i&&!i.isLeaf;)i=i.firstChild,o++;return o}function Lp(t,e){for(var n=[],r=e.content,o=e.openStart,i=e.openEnd;o>1&&i>1&&1==r.childCount&&1==r.firstChild.childCount;){o--,i--;var a=r.firstChild;n.push(a.type.name,a.attrs!=a.type.defaultAttrs?a.attrs:null),r=a.content}var s=t.someProp("clipboardSerializer")||Yl.fromSchema(t.state.schema),c=Xp(),l=c.createElement("div");l.appendChild(s.serializeFragment(r,{document:c}));for(var u,f=l.firstChild;f&&1==f.nodeType&&(u=Yp[f.nodeName.toLowerCase()]);){for(var p=u.length-1;p>=0;p--){for(var d=c.createElement(u[p]);l.firstChild;)d.appendChild(l.firstChild);l.appendChild(d),"tbody"!=u[p]&&(o++,i++)}f=l.firstChild}return f&&1==f.nodeType&&f.setAttribute("data-pm-slice",o+" "+i+" "+JSON.stringify(n)),{dom:l,text:t.someProp("clipboardTextSerializer",(function(t){return t(e)}))||e.content.textBetween(0,e.content.size,"\n\n")}}function Bp(t,e,n,r,o){var i,a,s=o.parent.type.spec.code;if(!n&&!e)return null;var c=e&&(r||s||!n);if(c){if(t.someProp("transformPastedText",(function(t){e=t(e,s||r)})),s)return e?new Hc(zc.from(t.state.schema.text(e.replace(/\r\n?/g,"\n"))),0,0):Hc.empty;var l=t.someProp("clipboardTextParser",(function(t){return t(e,o,r)}));if(l)a=l;else{var u=o.marks(),f=t.state.schema,p=Yl.fromSchema(f);i=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach((function(t){var e=i.appendChild(document.createElement("p"));t&&e.appendChild(p.serializeNode(f.text(t,u)))}))}}else t.someProp("transformPastedHTML",(function(t){n=t(n)})),i=function(t){var e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));var n,r=Xp().createElement("div"),o=/<([a-z][^>\s]+)/i.exec(t);(n=o&&Yp[o[1].toLowerCase()])&&(t=n.map((function(t){return"<"+t+">"})).join("")+t+n.map((function(t){return"</"+t+">"})).reverse().join(""));if(r.innerHTML=t,n)for(var i=0;i<n.length;i++)r=r.querySelector(n[i])||r;return r}(n),rf.webkit&&function(t){for(var e=t.querySelectorAll(rf.chrome?"span:not([class]):not([style])":"span.Apple-converted-space"),n=0;n<e.length;n++){var r=e[n];1==r.childNodes.length&&" "==r.textContent&&r.parentNode&&r.parentNode.replaceChild(t.ownerDocument.createTextNode(" "),r)}}(i);var d=i&&i.querySelector("[data-pm-slice]"),h=d&&/^(\d+) (\d+) (.*)/.exec(d.getAttribute("data-pm-slice"));if(!a){var v=t.someProp("clipboardParser")||t.someProp("domParser")||Rl.fromSchema(t.state.schema);a=v.parseSlice(i,{preserveWhitespace:!(!c&&!h),context:o,ruleFromNode:function(t){if("BR"==t.nodeName&&!t.nextSibling&&t.parentNode&&!Vp.test(t.parentNode.nodeName))return{ignore:!0}}})}if(h)a=function(t,e){if(!t.size)return t;var n,r=t.content.firstChild.type.schema;try{n=JSON.parse(e)}catch(My){return t}for(var o=t.content,i=t.openStart,a=t.openEnd,s=n.length-2;s>=0;s-=2){var c=r.nodes[n[s]];if(!c||c.hasRequiredAttrs())break;o=zc.from(c.create(n[s+1],o)),i++,a++}return new Hc(o,i,a)}(Kp(a,+h[1],+h[2]),h[3]);else if(a=Hc.maxOpen(function(t,e){if(t.childCount<2)return t;for(var n=function(n){var r=e.node(n).contentMatchAt(e.index(n)),o=void 0,i=[];if(t.forEach((function(t){if(i){var e,n=r.findWrapping(t.type);if(!n)return i=null;if(e=i.length&&o.length&&qp(n,o,t,i[i.length-1],0))i[i.length-1]=e;else{i.length&&(i[i.length-1]=Hp(i[i.length-1],o.length));var a=Wp(t,n);i.push(a),r=r.matchType(a.type,a.attrs),o=n}}})),i)return{v:zc.from(i)}},r=e.depth;r>=0;r--){var o=n(r);if(o)return o.v}return t}(a.content,o),!0),a.openStart||a.openEnd){for(var m=0,g=0,y=a.content.firstChild;m<a.openStart&&!y.type.spec.isolating;m++,y=y.firstChild);for(var b=a.content.lastChild;g<a.openEnd&&!b.type.spec.isolating;g++,b=b.lastChild);a=Kp(a,m,g)}return t.someProp("transformPasted",(function(t){a=t(a)})),a}var Vp=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function Wp(t,e,n){void 0===n&&(n=0);for(var r=e.length-1;r>=n;r--)t=e[r].create(null,zc.from(t));return t}function qp(t,e,n,r,o){if(o<t.length&&o<e.length&&t[o]==e[o]){var i=qp(t,e,n,r.lastChild,o+1);if(i)return r.copy(r.content.replaceChild(r.childCount-1,i));if(r.contentMatchAt(r.childCount).matchType(o==t.length-1?n.type:t[o+1]))return r.copy(r.content.append(zc.from(Wp(n,t,o+1))))}}function Hp(t,e){if(0==e)return t;var n=t.content.replaceChild(t.childCount-1,Hp(t.lastChild,e-1)),r=t.contentMatchAt(t.childCount).fillBefore(zc.empty,!0);return t.copy(n.append(r))}function Jp(t,e,n,r,o,i){var a=e<0?t.firstChild:t.lastChild,s=a.content;return o<r-1&&(s=Jp(s,e,n,r,o+1,i)),o>=n&&(s=e<0?a.contentMatchAt(0).fillBefore(s,t.childCount>1||i<=o).append(s):s.append(a.contentMatchAt(a.childCount).fillBefore(zc.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,a.copy(s))}function Kp(t,e,n){return e<t.openStart&&(t=new Hc(Jp(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new Hc(Jp(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}var Yp={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]},Up=null;function Xp(){return Up||(Up=document.implementation.createHTMLDocument("title"))}var Gp={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Zp=rf.ie&&rf.ie_version<=11,Qp=function(){this.anchorNode=this.anchorOffset=this.focusNode=this.focusOffset=null};Qp.prototype.set=function(t){this.anchorNode=t.anchorNode,this.anchorOffset=t.anchorOffset,this.focusNode=t.focusNode,this.focusOffset=t.focusOffset},Qp.prototype.eq=function(t){return t.anchorNode==this.anchorNode&&t.anchorOffset==this.anchorOffset&&t.focusNode==this.focusNode&&t.focusOffset==this.focusOffset};var td=function(t,e){var n=this;this.view=t,this.handleDOMChange=e,this.queue=[],this.flushingSoon=-1,this.observer=window.MutationObserver&&new window.MutationObserver((function(t){for(var e=0;e<t.length;e++)n.queue.push(t[e]);rf.ie&&rf.ie_version<=11&&t.some((function(t){return"childList"==t.type&&t.removedNodes.length||"characterData"==t.type&&t.oldValue.length>t.target.nodeValue.length}))?n.flushSoon():n.flush()})),this.currentSelection=new Qp,Zp&&(this.onCharData=function(t){n.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),n.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.suppressingSelectionUpdates=!1};td.prototype.flushSoon=function(){var t=this;this.flushingSoon<0&&(this.flushingSoon=window.setTimeout((function(){t.flushingSoon=-1,t.flush()}),20))},td.prototype.forceFlush=function(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())},td.prototype.start=function(){this.observer&&this.observer.observe(this.view.dom,Gp),Zp&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()},td.prototype.stop=function(){var t=this;if(this.observer){var e=this.observer.takeRecords();if(e.length){for(var n=0;n<e.length;n++)this.queue.push(e[n]);window.setTimeout((function(){return t.flush()}),20)}this.observer.disconnect()}Zp&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()},td.prototype.connectSelection=function(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)},td.prototype.disconnectSelection=function(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)},td.prototype.suppressSelectionUpdates=function(){var t=this;this.suppressingSelectionUpdates=!0,setTimeout((function(){return t.suppressingSelectionUpdates=!1}),50)},td.prototype.onSelectionChange=function(){if((!(t=this.view).editable||t.root.activeElement==t.dom)&&Sp(t)){var t;if(this.suppressingSelectionUpdates)return hp(this.view);if(rf.ie&&rf.ie_version<=11&&!this.view.state.selection.empty){var e=this.view.root.getSelection();if(e.focusNode&&hf(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}},td.prototype.setCurSelection=function(){this.currentSelection.set(this.view.root.getSelection())},td.prototype.ignoreSelectionChange=function(t){if(0==t.rangeCount)return!0;var e=t.getRangeAt(0).commonAncestorContainer,n=this.view.docView.nearestDesc(e);return n&&n.ignoreMutation({type:"selection",target:3==e.nodeType?e.parentNode:e})?(this.setCurSelection(),!0):void 0},td.prototype.flush=function(){if(this.view.docView&&!(this.flushingSoon>-1)){var t=this.observer?this.observer.takeRecords():[];this.queue.length&&(t=this.queue.concat(t),this.queue.length=0);var e=this.view.root.getSelection(),n=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(e)&&Sp(this.view)&&!this.ignoreSelectionChange(e),r=-1,o=-1,i=!1,a=[];if(this.view.editable)for(var s=0;s<t.length;s++){var c=this.registerMutation(t[s],a);c&&(r=r<0?c.from:Math.min(c.from,r),o=o<0?c.to:Math.max(c.to,o),c.typeOver&&(i=!0))}if(rf.gecko&&a.length>1){var l=a.filter((function(t){return"BR"==t.nodeName}));if(2==l.length){var u=l[0],f=l[1];u.parentNode&&u.parentNode.parentNode==f.parentNode?f.remove():u.remove()}}(r>-1||n)&&(r>-1&&(this.view.docView.markDirty(r,o),function(t){if(ed)return;ed=!0,"normal"==getComputedStyle(t.dom).whiteSpace&&console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package.")}(this.view)),this.handleDOMChange(r,o,i,a),this.view.docView.dirty?this.view.updateState(this.view.state):this.currentSelection.eq(e)||hp(this.view),this.currentSelection.set(e))}},td.prototype.registerMutation=function(t,e){if(e.indexOf(t.target)>-1)return null;var n=this.view.docView.nearestDesc(t.target);if("attributes"==t.type&&(n==this.view.docView||"contenteditable"==t.attributeName||"style"==t.attributeName&&!t.oldValue&&!t.target.getAttribute("style")))return null;if(!n||n.ignoreMutation(t))return null;if("childList"==t.type){for(var r=0;r<t.addedNodes.length;r++)e.push(t.addedNodes[r]);if(n.contentDOM&&n.contentDOM!=n.dom&&!n.contentDOM.contains(t.target))return{from:n.posBefore,to:n.posAfter};var o=t.previousSibling,i=t.nextSibling;if(rf.ie&&rf.ie_version<=11&&t.addedNodes.length)for(var a=0;a<t.addedNodes.length;a++){var s=t.addedNodes[a],c=s.previousSibling,l=s.nextSibling;(!c||Array.prototype.indexOf.call(t.addedNodes,c)<0)&&(o=c),(!l||Array.prototype.indexOf.call(t.addedNodes,l)<0)&&(i=l)}var u=o&&o.parentNode==t.target?uf(o)+1:0,f=n.localPosFromDOM(t.target,u,-1),p=i&&i.parentNode==t.target?uf(i):t.target.childNodes.length;return{from:f,to:n.localPosFromDOM(t.target,p,1)}}return"attributes"==t.type?{from:n.posAtStart-n.border,to:n.posAtEnd+n.border}:{from:n.posAtStart,to:n.posAtEnd,typeOver:t.target.nodeValue==t.oldValue}};var ed=!1;var nd={},rd={};function od(t,e){t.lastSelectionOrigin=e,t.lastSelectionTime=Date.now()}function id(t){t.someProp("handleDOMEvents",(function(e){for(var n in e)t.eventHandlers[n]||t.dom.addEventListener(n,t.eventHandlers[n]=function(e){return ad(t,e)})}))}function ad(t,e){return t.someProp("handleDOMEvents",(function(n){var r=n[e.type];return!!r&&(r(t,e)||e.defaultPrevented)}))}function sd(t){return{left:t.clientX,top:t.clientY}}function cd(t,e,n,r,o){if(-1==r)return!1;for(var i=t.state.doc.resolve(r),a=function(r){if(t.someProp(e,(function(e){return r>i.depth?e(t,n,i.nodeAfter,i.before(r),o,!0):e(t,n,i.node(r),i.before(r),o,!1)})))return{v:!0}},s=i.depth+1;s>0;s--){var c=a(s);if(c)return c.v}return!1}function ld(t,e,n){t.focused||t.focus();var r=t.state.tr.setSelection(e);"pointer"==n&&r.setMeta("pointer",!0),t.dispatch(r)}function ud(t,e,n,r,o){return cd(t,"handleClickOn",e,n,r)||t.someProp("handleClick",(function(n){return n(t,e,r)}))||(o?function(t,e){if(-1==e)return!1;var n,r,o=t.state.selection;o instanceof zu&&(n=o.node);for(var i=t.state.doc.resolve(e),a=i.depth+1;a>0;a--){var s=a>i.depth?i.nodeAfter:i.node(a);if(zu.isSelectable(s)){r=n&&o.$from.depth>0&&a>=o.$from.depth&&i.before(o.$from.depth+1)==o.$from.pos?i.before(o.$from.depth):i.before(a);break}}return null!=r&&(ld(t,zu.create(t.state.doc,r),"pointer"),!0)}(t,n):function(t,e){if(-1==e)return!1;var n=t.state.doc.resolve(e),r=n.nodeAfter;return!!(r&&r.isAtom&&zu.isSelectable(r))&&(ld(t,new zu(n),"pointer"),!0)}(t,n))}function fd(t,e,n,r){return cd(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",(function(n){return n(t,e,r)}))}function pd(t,e,n,r){return cd(t,"handleTripleClickOn",e,n,r)||t.someProp("handleTripleClick",(function(n){return n(t,e,r)}))||function(t,e,n){if(0!=n.button)return!1;var r=t.state.doc;if(-1==e)return!!r.inlineContent&&(ld(t,ju.create(r,0,r.content.size),"pointer"),!0);for(var o=r.resolve(e),i=o.depth+1;i>0;i--){var a=i>o.depth?o.nodeAfter:o.node(i),s=o.before(i);if(a.inlineContent)ld(t,ju.create(r,s+1,s+1+a.content.size),"pointer");else{if(!zu.isSelectable(a))continue;ld(t,zu.create(r,s),"pointer")}return!0}}(t,n,r)}function dd(t){return wd(t)}rd.keydown=function(t,e){if(t.shiftKey=16==e.keyCode||e.shiftKey,!md(t,e)&&(t.lastKeyCode=e.keyCode,t.lastKeyCodeTime=Date.now(),!rf.android||!rf.chrome||13!=e.keyCode))if(229!=e.keyCode&&t.domObserver.forceFlush(),!rf.ios||13!=e.keyCode||e.ctrlKey||e.altKey||e.metaKey)t.someProp("handleKeyDown",(function(n){return n(t,e)}))||Ip(t,e)?e.preventDefault():od(t,"key");else{var n=Date.now();t.lastIOSEnter=n,t.lastIOSEnterFallbackTimeout=setTimeout((function(){t.lastIOSEnter==n&&(t.someProp("handleKeyDown",(function(e){return e(t,wf(13,"Enter"))})),t.lastIOSEnter=0)}),200)}},rd.keyup=function(t,e){16==e.keyCode&&(t.shiftKey=!1)},rd.keypress=function(t,e){if(!(md(t,e)||!e.charCode||e.ctrlKey&&!e.altKey||rf.mac&&e.metaKey))if(t.someProp("handleKeyPress",(function(n){return n(t,e)})))e.preventDefault();else{var n=t.state.selection;if(!(n instanceof ju&&n.$from.sameParent(n.$to))){var r=String.fromCharCode(e.charCode);t.someProp("handleTextInput",(function(e){return e(t,n.$from.pos,n.$to.pos,r)}))||t.dispatch(t.state.tr.insertText(r).scrollIntoView()),e.preventDefault()}}};var hd=rf.mac?"metaKey":"ctrlKey";nd.mousedown=function(t,e){t.shiftKey=e.shiftKey;var n=dd(t),r=Date.now(),o="singleClick";r-t.lastClick.time<500&&function(t,e){var n=e.x-t.clientX,r=e.y-t.clientY;return n*n+r*r<100}(e,t.lastClick)&&!e[hd]&&("singleClick"==t.lastClick.type?o="doubleClick":"doubleClick"==t.lastClick.type&&(o="tripleClick")),t.lastClick={time:r,x:e.clientX,y:e.clientY,type:o};var i=t.posAtCoords(sd(e));i&&("singleClick"==o?(t.mouseDown&&t.mouseDown.done(),t.mouseDown=new vd(t,i,e,n)):("doubleClick"==o?fd:pd)(t,i.pos,i.inside,e)?e.preventDefault():od(t,"pointer"))};var vd=function(t,e,n,r){var o,i,a=this;if(this.view=t,this.startDoc=t.state.doc,this.pos=e,this.event=n,this.flushed=r,this.selectNode=n[hd],this.allowDefault=n.shiftKey,this.delayedSelectionSync=!1,e.inside>-1)o=t.state.doc.nodeAt(e.inside),i=e.inside;else{var s=t.state.doc.resolve(e.pos);o=s.parent,i=s.depth?s.before():0}this.mightDrag=null;var c=r?null:n.target,l=c?t.docView.nearestDesc(c,!0):null;this.target=l?l.dom:null;var u=t.state.selection;(0==n.button&&o.type.spec.draggable&&!1!==o.type.spec.selectable||u instanceof zu&&u.from<=i&&u.to>i)&&(this.mightDrag={node:o,pos:i,addAttr:this.target&&!this.target.draggable,setUneditable:this.target&&rf.gecko&&!this.target.hasAttribute("contentEditable")}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout((function(){a.view.mouseDown==a&&a.target.setAttribute("contentEditable","false")}),20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),od(t,"pointer")};function md(t,e){return!!t.composing||!!(rf.safari&&Math.abs(e.timeStamp-t.compositionEndedAt)<500)&&(t.compositionEndedAt=-2e8,!0)}vd.prototype.done=function(){var t=this;this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout((function(){return hp(t.view)})),this.view.mouseDown=null},vd.prototype.up=function(t){if(this.done(),this.view.dom.contains(3==t.target.nodeType?t.target.parentNode:t.target)){var e=this.pos;this.view.state.doc!=this.startDoc&&(e=this.view.posAtCoords(sd(t))),this.allowDefault||!e?od(this.view,"pointer"):ud(this.view,e.pos,e.inside,t,this.selectNode)?t.preventDefault():0==t.button&&(this.flushed||rf.safari&&this.mightDrag&&!this.mightDrag.node.isAtom||rf.chrome&&!(this.view.state.selection instanceof ju)&&Math.min(Math.abs(e.pos-this.view.state.selection.from),Math.abs(e.pos-this.view.state.selection.to))<=2)?(ld(this.view,Nu.near(this.view.state.doc.resolve(e.pos)),"pointer"),t.preventDefault()):od(this.view,"pointer")}},vd.prototype.move=function(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0),od(this.view,"pointer"),0==t.buttons&&this.done()},nd.touchdown=function(t){dd(t),od(t,"pointer")},nd.contextmenu=function(t){return dd(t)};var gd=rf.android?5e3:-1;function yd(t,e){clearTimeout(t.composingTimeout),e>-1&&(t.composingTimeout=setTimeout((function(){return wd(t)}),e))}function bd(t){var e;for(t.composing&&(t.composing=!1,t.compositionEndedAt=((e=document.createEvent("Event")).initEvent("event",!0,!0),e.timeStamp));t.compositionNodes.length>0;)t.compositionNodes.pop().markParentsDirty()}function wd(t,e){if(!(rf.android&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),bd(t),e||t.docView.dirty){var n=pp(t);return n&&!n.eq(t.state.selection)?t.dispatch(t.state.tr.setSelection(n)):t.updateState(t.state),!0}return!1}}rd.compositionstart=rd.compositionupdate=function(t){if(!t.composing){t.domObserver.flush();var e=t.state,n=e.selection.$from;if(e.selection.empty&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some((function(t){return!1===t.type.spec.inclusive}))))t.markCursor=t.state.storedMarks||n.marks(),wd(t,!0),t.markCursor=null;else if(wd(t),rf.gecko&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length)for(var r=t.root.getSelection(),o=r.focusNode,i=r.focusOffset;o&&1==o.nodeType&&0!=i;){var a=i<0?o.lastChild:o.childNodes[i-1];if(!a)break;if(3==a.nodeType){r.collapse(a,a.nodeValue.length);break}o=a,i=-1}t.composing=!0}yd(t,gd)},rd.compositionend=function(t,e){t.composing&&(t.composing=!1,t.compositionEndedAt=e.timeStamp,yd(t,20))};var xd=rf.ie&&rf.ie_version<15||rf.ios&&rf.webkit_version<604;function Sd(t,e,n,r){var o=Bp(t,e,n,t.shiftKey,t.state.selection.$from);if(t.someProp("handlePaste",(function(e){return e(t,r,o||Hc.empty)})))return!0;if(!o)return!1;var i=function(t){return 0==t.openStart&&0==t.openEnd&&1==t.content.childCount?t.content.firstChild:null}(o),a=i?t.state.tr.replaceSelectionWith(i,t.shiftKey):t.state.tr.replaceSelection(o);return t.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}nd.copy=rd.cut=function(t,e){var n=t.state.selection,r="cut"==e.type;if(!n.empty){var o=xd?null:e.clipboardData,i=Lp(t,n.content()),a=i.dom,s=i.text;o?(e.preventDefault(),o.clearData(),o.setData("text/html",a.innerHTML),o.setData("text/plain",s)):function(t,e){if(t.dom.parentNode){var n=t.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(e),n.style.cssText="position: fixed; left: -10000px; top: 10px";var r=getSelection(),o=document.createRange();o.selectNodeContents(e),t.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout((function(){n.parentNode&&n.parentNode.removeChild(n),t.focus()}),50)}}(t,a),r&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))}},rd.paste=function(t,e){if(!t.composing||rf.android){var n=xd?null:e.clipboardData;n&&Sd(t,n.getData("text/plain"),n.getData("text/html"),e)?e.preventDefault():function(t,e){if(t.dom.parentNode){var n=t.shiftKey||t.state.selection.$from.parent.type.spec.code,r=t.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus(),setTimeout((function(){t.focus(),r.parentNode&&r.parentNode.removeChild(r),n?Sd(t,r.value,null,e):Sd(t,r.textContent,r.innerHTML,e)}),50)}}(t,e)}};var kd=function(t,e){this.slice=t,this.move=e},_d=rf.mac?"altKey":"ctrlKey";for(var Od in nd.dragstart=function(t,e){var n=t.mouseDown;if(n&&n.done(),e.dataTransfer){var r=t.state.selection,o=r.empty?null:t.posAtCoords(sd(e));if(o&&o.pos>=r.from&&o.pos<=(r instanceof zu?r.to-1:r.to));else if(n&&n.mightDrag)t.dispatch(t.state.tr.setSelection(zu.create(t.state.doc,n.mightDrag.pos)));else if(e.target&&1==e.target.nodeType){var i=t.docView.nearestDesc(e.target,!0);i&&i.node.type.spec.draggable&&i!=t.docView&&t.dispatch(t.state.tr.setSelection(zu.create(t.state.doc,i.posBefore)))}var a=t.state.selection.content(),s=Lp(t,a),c=s.dom,l=s.text;e.dataTransfer.clearData(),e.dataTransfer.setData(xd?"Text":"text/html",c.innerHTML),e.dataTransfer.effectAllowed="copyMove",xd||e.dataTransfer.setData("text/plain",l),t.dragging=new kd(a,!e[_d])}},nd.dragend=function(t){var e=t.dragging;window.setTimeout((function(){t.dragging==e&&(t.dragging=null)}),50)},rd.dragover=rd.dragenter=function(t,e){return e.preventDefault()},rd.drop=function(t,e){var n=t.dragging;if(t.dragging=null,e.dataTransfer){var r=t.posAtCoords(sd(e));if(r){var o=t.state.doc.resolve(r.pos);if(o){var i=n&&n.slice;i?t.someProp("transformPasted",(function(t){i=t(i)})):i=Bp(t,e.dataTransfer.getData(xd?"Text":"text/plain"),xd?null:e.dataTransfer.getData("text/html"),!1,o);var a=n&&!e[_d];if(t.someProp("handleDrop",(function(n){return n(t,e,i||Hc.empty,a)})))e.preventDefault();else if(i){e.preventDefault();var s=i?function(t,e,n){var r=t.resolve(e);if(!n.content.size)return e;for(var o=n.content,i=0;i<n.openStart;i++)o=o.firstChild.content;for(var a=1;a<=(0==n.openStart&&n.size?2:1);a++)for(var s=r.depth;s>=0;s--){var c=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,l=r.index(s)+(c>0?1:0),u=r.node(s),f=!1;if(1==a)f=u.canReplace(l,l,o);else{var p=u.contentMatchAt(l).findWrapping(o.firstChild.type);f=p&&u.canReplaceWith(l,l,p[0])}if(f)return 0==c?r.pos:c<0?r.before(s+1):r.after(s+1)}return null}(t.state.doc,o.pos,i):o.pos;null==s&&(s=o.pos);var c=t.state.tr;a&&c.deleteSelection();var l=c.mapping.map(s),u=0==i.openStart&&0==i.openEnd&&1==i.content.childCount,f=c.doc;if(u?c.replaceRangeWith(l,l,i.content.firstChild):c.replaceRange(l,l,i),!c.doc.eq(f)){var p=c.doc.resolve(l);if(u&&zu.isSelectable(i.content.firstChild)&&p.nodeAfter&&p.nodeAfter.sameMarkup(i.content.firstChild))c.setSelection(new zu(p));else{var d=c.mapping.map(s);c.mapping.maps[c.mapping.maps.length-1].forEach((function(t,e,n,r){return d=r})),c.setSelection(xp(t,p,c.doc.resolve(d)))}t.focus(),t.dispatch(c.setMeta("uiEvent","drop"))}}}}}},nd.focus=function(t){t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout((function(){t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.root.getSelection())&&hp(t)}),20))},nd.blur=function(t,e){t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),e.relatedTarget&&t.dom.contains(e.relatedTarget)&&t.domObserver.currentSelection.set({}),t.focused=!1)},nd.beforeinput=function(t,e){if(rf.chrome&&rf.android&&"deleteContentBackward"==e.inputType){t.domObserver.flushSoon();var n=t.domChangeCount;setTimeout((function(){if(t.domChangeCount==n&&(t.dom.blur(),t.focus(),!t.someProp("handleKeyDown",(function(e){return e(t,wf(8,"Backspace"))})))){var e=t.state.selection.$cursor;e&&e.pos>0&&t.dispatch(t.state.tr.delete(e.pos-1,e.pos).scrollIntoView())}}),50)}},rd)nd[Od]=rd[Od];function Cd(t,e){if(t==e)return!0;for(var n in t)if(t[n]!==e[n])return!1;for(var r in e)if(!(r in t))return!1;return!0}var Md=function(t,e){this.spec=e||Nd,this.side=this.spec.side||0,this.toDOM=t};Md.prototype.map=function(t,e,n,r){var o=t.mapResult(e.from+r,this.side<0?-1:1),i=o.pos;return o.deleted?null:new $d(i-n,i-n,this)},Md.prototype.valid=function(){return!0},Md.prototype.eq=function(t){return this==t||t instanceof Md&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&Cd(this.spec,t.spec))},Md.prototype.destroy=function(t){this.spec.destroy&&this.spec.destroy(t)};var Dd=function(t,e){this.spec=e||Nd,this.attrs=t};Dd.prototype.map=function(t,e,n,r){var o=t.map(e.from+r,this.spec.inclusiveStart?-1:1)-n,i=t.map(e.to+r,this.spec.inclusiveEnd?1:-1)-n;return o>=i?null:new $d(o,i,this)},Dd.prototype.valid=function(t,e){return e.from<e.to},Dd.prototype.eq=function(t){return this==t||t instanceof Dd&&Cd(this.attrs,t.attrs)&&Cd(this.spec,t.spec)},Dd.is=function(t){return t.type instanceof Dd};var Td=function(t,e){this.spec=e||Nd,this.attrs=t};Td.prototype.map=function(t,e,n,r){var o=t.mapResult(e.from+r,1);if(o.deleted)return null;var i=t.mapResult(e.to+r,-1);return i.deleted||i.pos<=o.pos?null:new $d(o.pos-n,i.pos-n,this)},Td.prototype.valid=function(t,e){var n,r=t.content.findIndex(e.from),o=r.index,i=r.offset;return i==e.from&&!(n=t.child(o)).isText&&i+n.nodeSize==e.to},Td.prototype.eq=function(t){return this==t||t instanceof Td&&Cd(this.attrs,t.attrs)&&Cd(this.spec,t.spec)};var $d=function(t,e,n){this.from=t,this.to=e,this.type=n},Ad={spec:{configurable:!0},inline:{configurable:!0}};$d.prototype.copy=function(t,e){return new $d(t,e,this.type)},$d.prototype.eq=function(t,e){return void 0===e&&(e=0),this.type.eq(t.type)&&this.from+e==t.from&&this.to+e==t.to},$d.prototype.map=function(t,e,n){return this.type.map(t,this,e,n)},$d.widget=function(t,e,n){return new $d(t,t,new Md(e,n))},$d.inline=function(t,e,n,r){return new $d(t,e,new Dd(n,r))},$d.node=function(t,e,n,r){return new $d(t,e,new Td(n,r))},Ad.spec.get=function(){return this.type.spec},Ad.inline.get=function(){return this.type instanceof Dd},Object.defineProperties($d.prototype,Ad);var Ed=[],Nd={},Pd=function(t,e){this.local=t&&t.length?t:Ed,this.children=e&&e.length?e:Ed};Pd.create=function(t,e){return e.length?Ld(e,t,0,Nd):Id},Pd.prototype.find=function(t,e,n){var r=[];return this.findInner(null==t?0:t,null==e?1e9:e,r,0,n),r},Pd.prototype.findInner=function(t,e,n,r,o){for(var i=0;i<this.local.length;i++){var a=this.local[i];a.from<=e&&a.to>=t&&(!o||o(a.spec))&&n.push(a.copy(a.from+r,a.to+r))}for(var s=0;s<this.children.length;s+=3)if(this.children[s]<e&&this.children[s+1]>t){var c=this.children[s]+1;this.children[s+2].findInner(t-c,e-c,n,r+c,o)}},Pd.prototype.map=function(t,e,n){return this==Id||0==t.maps.length?this:this.mapInner(t,e,0,0,n||Nd)},Pd.prototype.mapInner=function(t,e,n,r,o){for(var i,a=0;a<this.local.length;a++){var s=this.local[a].map(t,n,r);s&&s.type.valid(e,s)?(i||(i=[])).push(s):o.onRemove&&o.onRemove(this.local[a].spec)}return this.children.length?function(t,e,n,r,o,i,a){for(var s=t.slice(),c=function(t,e,n,r){for(var a=0;a<s.length;a+=3){var c=s[a+1],l=void 0;-1==c||t>c+i||(e>=s[a]+i?s[a+1]=-1:n>=o&&(l=r-n-(e-t))&&(s[a]+=l,s[a+1]+=l))}},l=0;l<n.maps.length;l++)n.maps[l].forEach(c);for(var u=!1,f=0;f<s.length;f+=3)if(-1==s[f+1]){var p=n.map(t[f]+i),d=p-o;if(d<0||d>=r.content.size){u=!0;continue}var h=n.map(t[f+1]+i,-1)-o,v=r.content.findIndex(d),m=v.index,g=v.offset,y=r.maybeChild(m);if(y&&g==d&&g+y.nodeSize==h){var b=s[f+2].mapInner(n,y,p+1,t[f]+i+1,a);b!=Id?(s[f]=d,s[f+1]=h,s[f+2]=b):(s[f+1]=-2,u=!0)}else u=!0}if(u){var w=function(t,e,n,r,o,i,a){function s(t,e){for(var i=0;i<t.local.length;i++){var c=t.local[i].map(r,o,e);c?n.push(c):a.onRemove&&a.onRemove(t.local[i].spec)}for(var l=0;l<t.children.length;l+=3)s(t.children[l+2],t.children[l]+e+1)}for(var c=0;c<t.length;c+=3)-1==t[c+1]&&s(t[c+2],e[c]+i+1);return n}(s,t,e||[],n,o,i,a),x=Ld(w,r,0,a);e=x.local;for(var S=0;S<s.length;S+=3)s[S+1]<0&&(s.splice(S,3),S-=3);for(var k=0,_=0;k<x.children.length;k+=3){for(var O=x.children[k];_<s.length&&s[_]<O;)_+=3;s.splice(_,0,x.children[k],x.children[k+1],x.children[k+2])}}return new Pd(e&&e.sort(Bd),s)}(this.children,i,t,e,n,r,o):i?new Pd(i.sort(Bd)):Id},Pd.prototype.add=function(t,e){return e.length?this==Id?Pd.create(t,e):this.addInner(t,e,0):this},Pd.prototype.addInner=function(t,e,n){var r,o=this,i=0;t.forEach((function(t,a){var s,c=a+n;if(s=zd(e,t,c)){for(r||(r=o.children.slice());i<r.length&&r[i]<a;)i+=3;r[i]==a?r[i+2]=r[i+2].addInner(t,s,c+1):r.splice(i,0,a,a+t.nodeSize,Ld(s,t,c+1,Nd)),i+=3}}));for(var a=Rd(i?Fd(e):e,-n),s=0;s<a.length;s++)a[s].type.valid(t,a[s])||a.splice(s--,1);return new Pd(a.length?this.local.concat(a).sort(Bd):this.local,r||this.children)},Pd.prototype.remove=function(t){return 0==t.length||this==Id?this:this.removeInner(t,0)},Pd.prototype.removeInner=function(t,e){for(var n=this.children,r=this.local,o=0;o<n.length;o+=3){for(var i=void 0,a=n[o]+e,s=n[o+1]+e,c=0,l=void 0;c<t.length;c++)(l=t[c])&&l.from>a&&l.to<s&&(t[c]=null,(i||(i=[])).push(l));if(i){n==this.children&&(n=this.children.slice());var u=n[o+2].removeInner(i,a+1);u!=Id?n[o+2]=u:(n.splice(o,3),o-=3)}}if(r.length)for(var f=0,p=void 0;f<t.length;f++)if(p=t[f])for(var d=0;d<r.length;d++)r[d].eq(p,e)&&(r==this.local&&(r=this.local.slice()),r.splice(d--,1));return n==this.children&&r==this.local?this:r.length||n.length?new Pd(r,n):Id},Pd.prototype.forChild=function(t,e){if(this==Id)return this;if(e.isLeaf)return Pd.empty;for(var n,r,o=0;o<this.children.length;o+=3)if(this.children[o]>=t){this.children[o]==t&&(n=this.children[o+2]);break}for(var i=t+1,a=i+e.content.size,s=0;s<this.local.length;s++){var c=this.local[s];if(c.from<a&&c.to>i&&c.type instanceof Dd){var l=Math.max(i,c.from)-i,u=Math.min(a,c.to)-i;l<u&&(r||(r=[])).push(c.copy(l,u))}}if(r){var f=new Pd(r.sort(Bd));return n?new jd([f,n]):f}return n||Id},Pd.prototype.eq=function(t){if(this==t)return!0;if(!(t instanceof Pd)||this.local.length!=t.local.length||this.children.length!=t.children.length)return!1;for(var e=0;e<this.local.length;e++)if(!this.local[e].eq(t.local[e]))return!1;for(var n=0;n<this.children.length;n+=3)if(this.children[n]!=t.children[n]||this.children[n+1]!=t.children[n+1]||!this.children[n+2].eq(t.children[n+2]))return!1;return!0},Pd.prototype.locals=function(t){return Vd(this.localsInner(t))},Pd.prototype.localsInner=function(t){if(this==Id)return Ed;if(t.inlineContent||!this.local.some(Dd.is))return this.local;for(var e=[],n=0;n<this.local.length;n++)this.local[n].type instanceof Dd||e.push(this.local[n]);return e};var Id=new Pd;Pd.empty=Id,Pd.removeOverlap=Vd;var jd=function(t){this.members=t};function Rd(t,e){if(!e||!t.length)return t;for(var n=[],r=0;r<t.length;r++){var o=t[r];n.push(new $d(o.from+e,o.to+e,o.type))}return n}function zd(t,e,n){if(e.isLeaf)return null;for(var r=n+e.nodeSize,o=null,i=0,a=void 0;i<t.length;i++)(a=t[i])&&a.from>n&&a.to<r&&((o||(o=[])).push(a),t[i]=null);return o}function Fd(t){for(var e=[],n=0;n<t.length;n++)null!=t[n]&&e.push(t[n]);return e}function Ld(t,e,n,r){var o=[],i=!1;e.forEach((function(e,a){var s=zd(t,e,a+n);if(s){i=!0;var c=Ld(s,e,n+a+1,r);c!=Id&&o.push(a,a+e.nodeSize,c)}}));for(var a=Rd(i?Fd(t):t,-n).sort(Bd),s=0;s<a.length;s++)a[s].type.valid(e,a[s])||(r.onRemove&&r.onRemove(a[s].spec),a.splice(s--,1));return a.length||o.length?new Pd(a,o):Id}function Bd(t,e){return t.from-e.from||t.to-e.to}function Vd(t){for(var e=t,n=0;n<e.length-1;n++){var r=e[n];if(r.from!=r.to)for(var o=n+1;o<e.length;o++){var i=e[o];if(i.from!=r.from){i.from<r.to&&(e==t&&(e=t.slice()),e[n]=r.copy(r.from,i.from),Wd(e,o,r.copy(i.from,r.to)));break}i.to!=r.to&&(e==t&&(e=t.slice()),e[o]=i.copy(i.from,r.to),Wd(e,o+1,i.copy(r.to,i.to)))}}return e}function Wd(t,e,n){for(;e<t.length&&Bd(n,t[e])>0;)e++;t.splice(e,0,n)}function qd(t){var e=[];return t.someProp("decorations",(function(n){var r=n(t.state);r&&r!=Id&&e.push(r)})),t.cursorWrapper&&e.push(Pd.create(t.state.doc,[t.cursorWrapper.deco])),jd.from(e)}jd.prototype.map=function(t,e){var n=this.members.map((function(n){return n.map(t,e,Nd)}));return jd.from(n)},jd.prototype.forChild=function(t,e){if(e.isLeaf)return Pd.empty;for(var n=[],r=0;r<this.members.length;r++){var o=this.members[r].forChild(t,e);o!=Id&&(o instanceof jd?n=n.concat(o.members):n.push(o))}return jd.from(n)},jd.prototype.eq=function(t){if(!(t instanceof jd)||t.members.length!=this.members.length)return!1;for(var e=0;e<this.members.length;e++)if(!this.members[e].eq(t.members[e]))return!1;return!0},jd.prototype.locals=function(t){for(var e,n=!0,r=0;r<this.members.length;r++){var o=this.members[r].localsInner(t);if(o.length)if(e){n&&(e=e.slice(),n=!1);for(var i=0;i<o.length;i++)e.push(o[i])}else e=o}return e?Vd(n?e:e.sort(Bd)):Ed},jd.from=function(t){switch(t.length){case 0:return Id;case 1:return t[0];default:return new jd(t)}};var Hd=function(t,e){this._props=e,this.state=e.state,this.directPlugins=e.plugins||[],this.directPlugins.forEach(Gd),this.dispatch=this.dispatch.bind(this),this._root=null,this.focused=!1,this.trackWrites=null,this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):t.apply?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=Ud(this),this.markCursor=null,this.cursorWrapper=null,Yd(this),this.nodeViews=Xd(this),this.docView=Xf(this.state.doc,Kd(this),qd(this),this.dom,this),this.lastSelectedViewDesc=null,this.dragging=null,function(t){t.shiftKey=!1,t.mouseDown=null,t.lastKeyCode=null,t.lastKeyCodeTime=0,t.lastClick={time:0,x:0,y:0,type:""},t.lastSelectionOrigin=null,t.lastSelectionTime=0,t.lastIOSEnter=0,t.lastIOSEnterFallbackTimeout=null,t.lastAndroidDelete=0,t.composing=!1,t.composingTimeout=null,t.compositionNodes=[],t.compositionEndedAt=-2e8,t.domObserver=new td(t,(function(e,n,r,o){return Rp(t,e,n,r,o)})),t.domObserver.start(),t.domChangeCount=0,t.eventHandlers=Object.create(null);var e=function(e){var n=nd[e];t.dom.addEventListener(e,t.eventHandlers[e]=function(e){!function(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(var n=e.target;n!=t.dom;n=n.parentNode)if(!n||11==n.nodeType||n.pmViewDesc&&n.pmViewDesc.stopEvent(e))return!1;return!0}(t,e)||ad(t,e)||!t.editable&&e.type in rd||n(t,e)})};for(var n in nd)e(n);rf.safari&&t.dom.addEventListener("input",(function(){return null})),id(t)}(this),this.prevDirectPlugins=[],this.pluginViews=[],this.updatePluginViews()},Jd={props:{configurable:!0},root:{configurable:!0},isDestroyed:{configurable:!0}};function Kd(t){var e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),e.translate="no",t.someProp("attributes",(function(n){if("function"==typeof n&&(n=n(t.state)),n)for(var r in n)"class"==r&&(e.class+=" "+n[r]),"style"==r?e.style=(e.style?e.style+";":"")+n[r]:e[r]||"contenteditable"==r||"nodeName"==r||(e[r]=String(n[r]))})),[$d.node(0,t.state.doc.content.size,e)]}function Yd(t){if(t.markCursor){var e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),t.cursorWrapper={dom:e,deco:$d.widget(t.state.selection.head,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function Ud(t){return!t.someProp("editable",(function(e){return!1===e(t.state)}))}function Xd(t){var e={};return t.someProp("nodeViews",(function(t){for(var n in t)Object.prototype.hasOwnProperty.call(e,n)||(e[n]=t[n])})),e}function Gd(t){if(t.spec.state||t.spec.filterTransaction||t.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}Jd.props.get=function(){if(this._props.state!=this.state){var t=this._props;for(var e in this._props={},t)this._props[e]=t[e];this._props.state=this.state}return this._props},Hd.prototype.update=function(t){t.handleDOMEvents!=this._props.handleDOMEvents&&id(this),this._props=t,t.plugins&&(t.plugins.forEach(Gd),this.directPlugins=t.plugins),this.updateStateInner(t.state,!0)},Hd.prototype.setProps=function(t){var e={};for(var n in this._props)e[n]=this._props[n];for(var r in e.state=this.state,t)e[r]=t[r];this.update(e)},Hd.prototype.updateState=function(t){this.updateStateInner(t,this.state.plugins!=t.plugins)},Hd.prototype.updateStateInner=function(t,e){var n=this,r=this.state,o=!1,i=!1;if(t.storedMarks&&this.composing&&(bd(this),i=!0),this.state=t,e){var a=Xd(this);(function(t,e){var n=0,r=0;for(var o in t){if(t[o]!=e[o])return!0;n++}for(var i in e)r++;return n!=r})(a,this.nodeViews)&&(this.nodeViews=a,o=!0),id(this)}this.editable=Ud(this),Yd(this);var s=qd(this),c=Kd(this),l=e?"reset":t.scrollToSelection>r.scrollToSelection?"to selection":"preserve",u=o||!this.docView.matchesNode(t.doc,c,s);!u&&t.selection.eq(r.selection)||(i=!0);var f,p,d,h,v,m,g,y,b,w,x,S="preserve"==l&&i&&null==this.dom.style.overflowAnchor&&function(t){for(var e,n,r=t.dom.getBoundingClientRect(),o=Math.max(0,r.top),i=(r.left+r.right)/2,a=o+1;a<Math.min(innerHeight,r.bottom);a+=5){var s=t.root.elementFromPoint(i,a);if(s!=t.dom&&t.dom.contains(s)){var c=s.getBoundingClientRect();if(c.top>=o-20){e=s,n=c.top;break}}}return{refDOM:e,refTop:n,stack:Of(t.dom)}}(this);if(i){this.domObserver.stop();var k=u&&(rf.ie||rf.chrome)&&!this.composing&&!r.selection.empty&&!t.selection.empty&&(h=r.selection,v=t.selection,m=Math.min(h.$anchor.sharedDepth(h.head),v.$anchor.sharedDepth(v.head)),h.$anchor.start(m)!=v.$anchor.start(m));if(u){var _=rf.chrome?this.trackWrites=this.root.getSelection().focusNode:null;!o&&this.docView.update(t.doc,c,s,this)||(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=Xf(t.doc,c,s,this.dom,this)),_&&!this.trackWrites&&(k=!0)}k||!(this.mouseDown&&this.domObserver.currentSelection.eq(this.root.getSelection())&&(f=this,p=f.docView.domFromPos(f.state.selection.anchor,0),d=f.root.getSelection(),hf(p.node,p.offset,d.anchorNode,d.anchorOffset)))?hp(this,k):(bp(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}if(this.updatePluginViews(r),"reset"==l)this.dom.scrollTop=0;else if("to selection"==l){var O=this.root.getSelection().focusNode;this.someProp("handleScrollToSelection",(function(t){return t(n)}))||(t.selection instanceof zu?_f(this,this.docView.domAfterPos(t.selection.from).getBoundingClientRect(),O):_f(this,this.coordsAtPos(t.selection.head,1),O))}else S&&(y=(g=S).refDOM,b=g.refTop,w=g.stack,x=y?y.getBoundingClientRect().top:0,Cf(w,0==x?0:x-b))},Hd.prototype.destroyPluginViews=function(){for(var t;t=this.pluginViews.pop();)t.destroy&&t.destroy()},Hd.prototype.updatePluginViews=function(t){if(t&&t.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(var e=0;e<this.pluginViews.length;e++){var n=this.pluginViews[e];n.update&&n.update(this,t)}else{this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(var r=0;r<this.directPlugins.length;r++){var o=this.directPlugins[r];o.spec.view&&this.pluginViews.push(o.spec.view(this))}for(var i=0;i<this.state.plugins.length;i++){var a=this.state.plugins[i];a.spec.view&&this.pluginViews.push(a.spec.view(this))}}},Hd.prototype.someProp=function(t,e){var n,r=this._props&&this._props[t];if(null!=r&&(n=e?e(r):r))return n;for(var o=0;o<this.directPlugins.length;o++){var i=this.directPlugins[o].props[t];if(null!=i&&(n=e?e(i):i))return n}var a=this.state.plugins;if(a)for(var s=0;s<a.length;s++){var c=a[s].props[t];if(null!=c&&(n=e?e(c):c))return n}},Hd.prototype.hasFocus=function(){return this.root.activeElement==this.dom},Hd.prototype.focus=function(){this.domObserver.stop(),this.editable&&function(t){if(t.setActive)return t.setActive();if(Mf)return t.focus(Mf);var e=Of(t);t.focus(null==Mf?{get preventScroll(){return Mf={preventScroll:!0},!0}}:void 0),Mf||(Mf=!1,Cf(e,0))}(this.dom),hp(this),this.domObserver.start()},Jd.root.get=function(){var t=this._root;if(null==t)for(var e=this.dom.parentNode;e;e=e.parentNode)if(9==e.nodeType||11==e.nodeType&&e.host)return e.getSelection||(Object.getPrototypeOf(e).getSelection=function(){return document.getSelection()}),this._root=e;return t||document},Hd.prototype.posAtCoords=function(t){return Af(this,t)},Hd.prototype.coordsAtPos=function(t,e){return void 0===e&&(e=1),Pf(this,t,e)},Hd.prototype.domAtPos=function(t,e){return void 0===e&&(e=0),this.docView.domFromPos(t,e)},Hd.prototype.nodeDOM=function(t){var e=this.docView.descAt(t);return e?e.nodeDOM:null},Hd.prototype.posAtDOM=function(t,e,n){void 0===n&&(n=-1);var r=this.docView.posFromDOM(t,e,n);if(null==r)throw new RangeError("DOM position not inside the editor");return r},Hd.prototype.endOfTextblock=function(t,e){return Vf(this,e||this.state,t)},Hd.prototype.destroy=function(){this.docView&&(!function(t){for(var e in t.domObserver.stop(),t.eventHandlers)t.dom.removeEventListener(e,t.eventHandlers[e]);clearTimeout(t.composingTimeout),clearTimeout(t.lastIOSEnterFallbackTimeout)}(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],qd(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)},Jd.isDestroyed.get=function(){return null==this.docView},Hd.prototype.dispatchEvent=function(t){return function(t,e){ad(t,e)||!nd[e.type]||!t.editable&&e.type in rd||nd[e.type](t,e)}(this,t)},Hd.prototype.dispatch=function(t){var e=this._props.dispatchTransaction;e?e.call(this,t):this.updateState(this.state.apply(t))},Object.defineProperties(Hd.prototype,Jd);for(var Zd={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",229:"q"},Qd={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"',229:"Q"},th="undefined"!=typeof navigator&&/Chrome\/(\d+)/.exec(navigator.userAgent),eh="undefined"!=typeof navigator&&/Apple Computer/.test(navigator.vendor),nh="undefined"!=typeof navigator&&/Gecko\/\d+/.test(navigator.userAgent),rh="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),oh="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),ih=th&&(rh||+th[1]<57)||nh&&rh,ah=0;ah<10;ah++)Zd[48+ah]=Zd[96+ah]=String(ah);for(ah=1;ah<=24;ah++)Zd[ah+111]="F"+ah;for(ah=65;ah<=90;ah++)Zd[ah]=String.fromCharCode(ah+32),Qd[ah]=String.fromCharCode(ah);for(var sh in Zd)Qd.hasOwnProperty(sh)||(Qd[sh]=Zd[sh]);var ch="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function lh(t){var e,n,r,o,i=t.split(/-(?!$)/),a=i[i.length-1];"Space"==a&&(a=" ");for(var s=0;s<i.length-1;s++){var c=i[s];if(/^(cmd|meta|m)$/i.test(c))o=!0;else if(/^a(lt)?$/i.test(c))e=!0;else if(/^(c|ctrl|control)$/i.test(c))n=!0;else if(/^s(hift)?$/i.test(c))r=!0;else{if(!/^mod$/i.test(c))throw new Error("Unrecognized modifier name: "+c);ch?o=!0:n=!0}}return e&&(a="Alt-"+a),n&&(a="Ctrl-"+a),o&&(a="Meta-"+a),r&&(a="Shift-"+a),a}function uh(t,e,n){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),!1!==n&&e.shiftKey&&(t="Shift-"+t),t}function fh(t){return new Qu({props:{handleKeyDown:ph(t)}})}function ph(t){var e=function(t){var e=Object.create(null);for(var n in t)e[lh(n)]=t[n];return e}(t);return function(t,n){var r,o=function(t){var e=!(ih&&(t.ctrlKey||t.altKey||t.metaKey)||(eh||oh)&&t.shiftKey&&t.key&&1==t.key.length)&&t.key||(t.shiftKey?Qd:Zd)[t.keyCode]||t.key||"Unidentified";return"Esc"==e&&(e="Escape"),"Del"==e&&(e="Delete"),"Left"==e&&(e="ArrowLeft"),"Up"==e&&(e="ArrowUp"),"Right"==e&&(e="ArrowRight"),"Down"==e&&(e="ArrowDown"),e}(n),i=1==o.length&&" "!=o,a=e[uh(o,n,!i)];if(a&&a(t.state,t.dispatch,t))return!0;if(i&&(n.shiftKey||n.altKey||n.metaKey||o.charCodeAt(0)>127)&&(r=Zd[n.keyCode])&&r!=o){var s=e[uh(r,n,!0)];if(s&&s(t.state,t.dispatch,t))return!0}else if(i&&n.shiftKey){var c=e[uh(o,n,!0)];if(c&&c(t.state,t.dispatch,t))return!0}return!1}}function dh(t,e){return!t.selection.empty&&(e&&e(t.tr.deleteSelection().scrollIntoView()),!0)}function hh(t,e,n){for(;t;t="start"==e?t.firstChild:t.lastChild){if(t.isTextblock)return!0;if(n&&1!=t.childCount)return!1}return!1}function vh(t){if(!t.parent.type.spec.isolating)for(var e=t.depth-1;e>=0;e--){if(t.index(e)>0)return t.doc.resolve(t.before(e+1));if(t.node(e).type.spec.isolating)break}return null}function mh(t){if(!t.parent.type.spec.isolating)for(var e=t.depth-1;e>=0;e--){var n=t.node(e);if(t.index(e)+1<n.childCount)return t.doc.resolve(t.after(e+1));if(n.type.spec.isolating)break}return null}function gh(t){for(var e=0;e<t.edgeCount;e++){var n=t.edge(e).type;if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}function yh(t,e){var n=t.selection,r=n.$head,o=n.$anchor;if(!r.parent.type.spec.code||!r.sameParent(o))return!1;var i=r.node(-1),a=r.indexAfter(-1),s=gh(i.contentMatchAt(a));if(!i.canReplaceWith(a,a,s))return!1;if(e){var c=r.after(),l=t.tr.replaceWith(c,c,s.createAndFill());l.setSelection(Nu.near(l.doc.resolve(c),1)),e(l.scrollIntoView())}return!0}function bh(t,e,n){var r,o,i=e.nodeBefore,a=e.nodeAfter;if(i.type.spec.isolating||a.type.spec.isolating)return!1;if(function(t,e,n){var r=e.nodeBefore,o=e.nodeAfter,i=e.index();return!(!(r&&o&&r.type.compatibleContent(o.type))||(!r.content.size&&e.parent.canReplace(i-1,i)?(n&&n(t.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),0):!e.parent.canReplace(i,i+1)||!o.isTextblock&&!gu(t.doc,e.pos)||(n&&n(t.tr.clearIncompatible(e.pos,r.type,r.contentMatchAt(r.childCount)).join(e.pos).scrollIntoView()),0)))}(t,e,n))return!0;var s=e.parent.canReplace(e.index(),e.index()+1);if(s&&(r=(o=i.contentMatchAt(i.childCount)).findWrapping(a.type))&&o.matchType(r[0]||a.type).validEnd){if(n){for(var c=e.pos+a.nodeSize,l=zc.empty,u=r.length-1;u>=0;u--)l=zc.from(r[u].create(null,l));l=zc.from(i.copy(l));var f=t.tr.step(new uu(e.pos-1,c,e.pos,c,new Hc(l,1,0),r.length,!0)),p=c+2*r.length;gu(f.doc,p)&&f.join(p),n(f.scrollIntoView())}return!0}var d=Nu.findFrom(e,1),h=d&&d.$from.blockRange(d.$to),v=h&&du(h);if(null!=v&&v>=e.depth)return n&&n(t.tr.lift(h,v).scrollIntoView()),!0;if(s&&hh(a,"start",!0)&&hh(i,"end")){for(var m=i,g=[];g.push(m),!m.isTextblock;)m=m.lastChild;for(var y=a,b=1;!y.isTextblock;y=y.firstChild)b++;if(m.canReplace(m.childCount,m.childCount,y.content)){if(n){for(var w=zc.empty,x=g.length-1;x>=0;x--)w=zc.from(g[x].copy(w));n(t.tr.step(new uu(e.pos-g.length,e.pos+a.nodeSize,e.pos+b,e.pos+a.nodeSize-b,new Hc(w,g.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function wh(t){return function(e,n){for(var r=e.selection,o=t<0?r.$from:r.$to,i=o.depth;o.node(i).isInline;){if(!i)return!1;i--}return!!o.node(i).isTextblock&&(n&&n(e.tr.setSelection(ju.create(e.doc,t<0?o.start(i):o.end(i)))),!0)}}var xh=wh(-1),Sh=wh(1);function kh(t,e){return function(n,r){var o=n.selection,i=o.from,a=o.to,s=!1;return n.doc.nodesBetween(i,a,(function(r,o){if(s)return!1;if(r.isTextblock&&!r.hasMarkup(t,e))if(r.type==t)s=!0;else{var i=n.doc.resolve(o),a=i.index();s=i.parent.canReplaceWith(a,a+1,t)}})),!!s&&(r&&r(n.tr.setBlockType(i,a,t,e).scrollIntoView()),!0)}}function _h(t,e){return function(n,r){var o=n.selection,i=o.empty,a=o.$cursor,s=o.ranges;if(i&&!a||!function(t,e,n){for(var r=function(r){var o=e[r],i=o.$from,a=o.$to,s=0==i.depth&&t.type.allowsMarkType(n);if(t.nodesBetween(i.pos,a.pos,(function(t){if(s)return!1;s=t.inlineContent&&t.type.allowsMarkType(n)})),s)return{v:!0}},o=0;o<e.length;o++){var i=r(o);if(i)return i.v}return!1}(n.doc,s,t))return!1;if(r)if(a)t.isInSet(n.storedMarks||a.marks())?r(n.tr.removeStoredMark(t)):r(n.tr.addStoredMark(t.create(e)));else{for(var c=!1,l=n.tr,u=0;!c&&u<s.length;u++){var f=s[u],p=f.$from,d=f.$to;c=n.doc.rangeHasMark(p.pos,d.pos,t)}for(var h=0;h<s.length;h++){var v=s[h],m=v.$from,g=v.$to;if(c)l.removeMark(m.pos,g.pos,t);else{var y=m.pos,b=g.pos,w=m.nodeAfter,x=g.nodeBefore,S=w&&w.isText?/^\s*/.exec(w.text)[0].length:0,k=x&&x.isText?/\s*$/.exec(x.text)[0].length:0;y+S<b&&(y+=S,b-=k),l.addMark(y,b,t.create(e))}}r(l.scrollIntoView())}return!0}}function Oh(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return function(e,n,r){for(var o=0;o<t.length;o++)if(t[o](e,n,r))return!0;return!1}}var Ch=Oh(dh,(function(t,e,n){var r=t.selection.$cursor;if(!r||(n?!n.endOfTextblock("backward",t):r.parentOffset>0))return!1;var o=vh(r);if(!o){var i=r.blockRange(),a=i&&du(i);return null!=a&&(e&&e(t.tr.lift(i,a).scrollIntoView()),!0)}var s=o.nodeBefore;if(!s.type.spec.isolating&&bh(t,o,e))return!0;if(0==r.parent.content.size&&(hh(s,"end")||zu.isSelectable(s))){var c=xu(t.doc,r.before(),r.after(),Hc.empty);if(c.slice.size<c.to-c.from){if(e){var l=t.tr.step(c);l.setSelection(hh(s,"end")?Nu.findFrom(l.doc.resolve(l.mapping.map(o.pos,-1)),-1):zu.create(l.doc,o.pos-s.nodeSize)),e(l.scrollIntoView())}return!0}}return!(!s.isAtom||o.depth!=r.depth-1)&&(e&&e(t.tr.delete(o.pos-s.nodeSize,o.pos).scrollIntoView()),!0)}),(function(t,e,n){var r=t.selection,o=r.$head,i=o;if(!r.empty)return!1;if(o.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):o.parentOffset>0)return!1;i=vh(o)}var a=i&&i.nodeBefore;return!(!a||!zu.isSelectable(a))&&(e&&e(t.tr.setSelection(zu.create(t.doc,i.pos-a.nodeSize)).scrollIntoView()),!0)})),Mh=Oh(dh,(function(t,e,n){var r=t.selection.$cursor;if(!r||(n?!n.endOfTextblock("forward",t):r.parentOffset<r.parent.content.size))return!1;var o=mh(r);if(!o)return!1;var i=o.nodeAfter;if(bh(t,o,e))return!0;if(0==r.parent.content.size&&(hh(i,"start")||zu.isSelectable(i))){var a=xu(t.doc,r.before(),r.after(),Hc.empty);if(a.slice.size<a.to-a.from){if(e){var s=t.tr.step(a);s.setSelection(hh(i,"start")?Nu.findFrom(s.doc.resolve(s.mapping.map(o.pos)),1):zu.create(s.doc,s.mapping.map(o.pos))),e(s.scrollIntoView())}return!0}}return!(!i.isAtom||o.depth!=r.depth-1)&&(e&&e(t.tr.delete(o.pos,o.pos+i.nodeSize).scrollIntoView()),!0)}),(function(t,e,n){var r=t.selection,o=r.$head,i=o;if(!r.empty)return!1;if(o.parent.isTextblock){if(n?!n.endOfTextblock("forward",t):o.parentOffset<o.parent.content.size)return!1;i=mh(o)}var a=i&&i.nodeAfter;return!(!a||!zu.isSelectable(a))&&(e&&e(t.tr.setSelection(zu.create(t.doc,i.pos)).scrollIntoView()),!0)})),Dh={Enter:Oh((function(t,e){var n=t.selection,r=n.$head,o=n.$anchor;return!(!r.parent.type.spec.code||!r.sameParent(o))&&(e&&e(t.tr.insertText("\n").scrollIntoView()),!0)}),(function(t,e){var n=t.selection,r=n.$from,o=n.$to;if(n instanceof Lu||r.parent.inlineContent||o.parent.inlineContent)return!1;var i=gh(o.parent.contentMatchAt(o.indexAfter()));if(!i||!i.isTextblock)return!1;if(e){var a=(!r.parentOffset&&o.index()<o.parent.childCount?r:o).pos,s=t.tr.insert(a,i.createAndFill());s.setSelection(ju.create(s.doc,a+1)),e(s.scrollIntoView())}return!0}),(function(t,e){var n=t.selection.$cursor;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){var r=n.before();if(mu(t.doc,r))return e&&e(t.tr.split(r).scrollIntoView()),!0}var o=n.blockRange(),i=o&&du(o);return null!=i&&(e&&e(t.tr.lift(o,i).scrollIntoView()),!0)}),(function(t,e){var n=t.selection,r=n.$from,o=n.$to;if(t.selection instanceof zu&&t.selection.node.isBlock)return!(!r.parentOffset||!mu(t.doc,r.pos))&&(e&&e(t.tr.split(r.pos).scrollIntoView()),!0);if(!r.parent.isBlock)return!1;if(e){var i=o.parentOffset==o.parent.content.size,a=t.tr;(t.selection instanceof ju||t.selection instanceof Lu)&&a.deleteSelection();var s=0==r.depth?null:gh(r.node(-1).contentMatchAt(r.indexAfter(-1))),c=i&&s?[{type:s}]:null,l=mu(a.doc,a.mapping.map(r.pos),1,c);if(c||l||!mu(a.doc,a.mapping.map(r.pos),1,s&&[{type:s}])||(c=[{type:s}],l=!0),l&&(a.split(a.mapping.map(r.pos),1,c),!i&&!r.parentOffset&&r.parent.type!=s)){var u=a.mapping.map(r.before()),f=a.doc.resolve(u);r.node(-1).canReplaceWith(f.index(),f.index()+1,s)&&a.setNodeMarkup(a.mapping.map(r.before()),s)}e(a.scrollIntoView())}return!0})),"Mod-Enter":yh,Backspace:Ch,"Mod-Backspace":Ch,"Shift-Backspace":Ch,Delete:Mh,"Mod-Delete":Mh,"Mod-a":function(t,e){return e&&e(t.tr.setSelection(new Lu(t.doc))),!0}},Th={"Ctrl-h":Dh.Backspace,"Alt-Backspace":Dh["Mod-Backspace"],"Ctrl-d":Dh.Delete,"Ctrl-Alt-Backspace":Dh["Mod-Delete"],"Alt-Delete":Dh["Mod-Delete"],"Alt-d":Dh["Mod-Delete"],"Ctrl-a":xh,"Ctrl-e":Sh};for(var $h in Dh)Th[$h]=Dh[$h];Dh.Home=xh,Dh.End=Sh;var Ah=("undefined"!=typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):"undefined"!=typeof os&&"darwin"==os.platform())?Th:Dh,Eh=function(t,e){var n;this.match=t,this.handler="string"==typeof e?(n=e,function(t,e,r,o){var i=n;if(e[1]){var a=e[0].lastIndexOf(e[1]);i+=e[0].slice(a+e[1].length);var s=(r+=a)-o;s>0&&(i=e[0].slice(a-s,a)+i,r=o)}return t.tr.insertText(i,r,o)}):e};function Nh(t){var e=t.rules,n=new Qu({state:{init:function(){return null},apply:function(t,e){var n=t.getMeta(this);return n||(t.selectionSet||t.docChanged?null:e)}},props:{handleTextInput:function(t,r,o,i){return Ph(t,r,o,i,e,n)},handleDOMEvents:{compositionend:function(t){setTimeout((function(){var r=t.state.selection.$cursor;r&&Ph(t,r.pos,r.pos,"",e,n)}))}}},isInputRules:!0});return n}function Ph(t,e,n,r,o,i){if(t.composing)return!1;var a=t.state,s=a.doc.resolve(e);if(s.parent.type.spec.code)return!1;for(var c=s.parent.textBetween(Math.max(0,s.parentOffset-500),s.parentOffset,null,"")+r,l=0;l<o.length;l++){var u=o[l].match.exec(c),f=u&&o[l].handler(a,u,e-(u[0].length-r.length),n);if(f)return t.dispatch(f.setMeta(i,{transform:f,from:e,to:n,text:r})),!0}return!1}function Ih(t,e){for(var n=t.plugins,r=0;r<n.length;r++){var o=n[r],i=void 0;if(o.spec.isInputRules&&(i=o.getState(t))){if(e){for(var a=t.tr,s=i.transform,c=s.steps.length-1;c>=0;c--)a.step(s.steps[c].invert(s.docs[c]));if(i.text){var l=a.doc.resolve(i.from).marks();a.replaceWith(i.from,i.to,t.schema.text(i.text,l))}else a.delete(i.from,i.to);e(a)}return!0}}return!1}function jh(t,e,n,r){return new Eh(t,(function(t,o,i,a){var s=n instanceof Function?n(o):n,c=t.tr.delete(i,a),l=c.doc.resolve(i).blockRange(),u=l&&hu(l,e,s);if(!u)return null;c.wrap(l,u);var f=c.doc.resolve(i-1).nodeBefore;return f&&f.type==e&&gu(c.doc,i-1)&&(!r||r(o,f))&&c.join(i-1),c}))}function Rh(t,e,n){return new Eh(t,(function(t,r,o,i){var a=t.doc.resolve(o),s=n instanceof Function?n(r):n;return a.node(-1).canReplaceWith(a.index(-1),a.indexAfter(-1),e)?t.tr.delete(o,i).setBlockType(o,o,e,s):null}))}new Eh(/--$/,"—"),new Eh(/\.\.\.$/,"…"),new Eh(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"“"),new Eh(/"$/,"”"),new Eh(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,""),new Eh(/'$/,"");var zh=["ol",0],Fh=["ul",0],Lh=["li",0],Bh={attrs:{order:{default:1}},parseDOM:[{tag:"ol",getAttrs:function(t){return{order:t.hasAttribute("start")?+t.getAttribute("start"):1}}}],toDOM:function(t){return 1==t.attrs.order?zh:["ol",{start:t.attrs.order},0]}},Vh={parseDOM:[{tag:"ul"}],toDOM:function(){return Fh}},Wh={parseDOM:[{tag:"li"}],toDOM:function(){return Lh},defining:!0};function qh(t,e){var n={};for(var r in t)n[r]=t[r];for(var o in e)n[o]=e[o];return n}function Hh(t,e,n){return t.append({ordered_list:qh(Bh,{content:"list_item+",group:n}),bullet_list:qh(Vh,{content:"list_item+",group:n}),list_item:qh(Wh,{content:e})})}function Jh(t,e){return function(n,r){var o=n.selection,i=o.$from,a=o.$to,s=i.blockRange(a),c=!1,l=s;if(!s)return!1;if(s.depth>=2&&i.node(s.depth-1).type.compatibleContent(t)&&0==s.startIndex){if(0==i.index(s.depth-1))return!1;var u=n.doc.resolve(s.start-2);l=new ll(u,u,s.depth),s.endIndex<s.parent.childCount&&(s=new ll(i,n.doc.resolve(a.end(s.depth)),s.depth)),c=!0}var f=hu(l,t,e,s);return!!f&&(r&&r(function(t,e,n,r,o){for(var i=zc.empty,a=n.length-1;a>=0;a--)i=zc.from(n[a].type.create(n[a].attrs,i));t.step(new uu(e.start-(r?2:0),e.end,e.start,e.end,new Hc(i,0,0),n.length,!0));for(var s=0,c=0;c<n.length;c++)n[c].type==o&&(s=c+1);for(var l=n.length-s,u=e.start+n.length-(r?2:0),f=e.parent,p=e.startIndex,d=e.endIndex,h=!0;p<d;p++,h=!1)!h&&mu(t.doc,u,l)&&(t.split(u,l),u+=2*l),u+=f.child(p).nodeSize;return t}(n.tr,s,f,c,t).scrollIntoView()),!0)}}function Kh(t){return function(e,n){var r=e.selection,o=r.$from,i=r.$to,a=r.node;if(a&&a.isBlock||o.depth<2||!o.sameParent(i))return!1;var s=o.node(-1);if(s.type!=t)return!1;if(0==o.parent.content.size&&o.node(-1).childCount==o.indexAfter(-1)){if(2==o.depth||o.node(-3).type!=t||o.index(-2)!=o.node(-2).childCount-1)return!1;if(n){for(var c=zc.empty,l=o.index(-1)?1:o.index(-2)?2:3,u=o.depth-l;u>=o.depth-3;u--)c=zc.from(o.node(u).copy(c));var f=o.indexAfter(-1)<o.node(-2).childCount?1:o.indexAfter(-2)<o.node(-3).childCount?2:3;c=c.append(zc.from(t.createAndFill()));var p=o.before(o.depth-(l-1)),d=e.tr.replace(p,o.after(-f),new Hc(c,4-l,0)),h=-1;d.doc.nodesBetween(p,d.doc.content.size,(function(t,e){if(h>-1)return!1;t.isTextblock&&0==t.content.size&&(h=e+1)})),h>-1&&d.setSelection(e.selection.constructor.near(d.doc.resolve(h))),n(d.scrollIntoView())}return!0}var v=i.pos==o.end()?s.contentMatchAt(0).defaultType:null,m=e.tr.delete(o.pos,i.pos),g=v&&[null,{type:v}];return!!mu(m.doc,o.pos,2,g)&&(n&&n(m.split(o.pos,2,g).scrollIntoView()),!0)}}function Yh(t){return function(e,n){var r=e.selection,o=r.$from,i=r.$to,a=o.blockRange(i,(function(e){return e.childCount&&e.firstChild.type==t}));return!!a&&(!n||(o.node(a.depth-1).type==t?function(t,e,n,r){var o=t.tr,i=r.end,a=r.$to.end(r.depth);i<a&&(o.step(new uu(i-1,a,i,a,new Hc(zc.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new ll(o.doc.resolve(r.$from.pos),o.doc.resolve(a),r.depth));return e(o.lift(r,du(r)).scrollIntoView()),!0}(e,n,t,a):function(t,e,n){for(var r=t.tr,o=n.parent,i=n.end,a=n.endIndex-1,s=n.startIndex;a>s;a--)i-=o.child(a).nodeSize,r.delete(i-1,i+1);var c=r.doc.resolve(n.start),l=c.nodeAfter;if(r.mapping.map(n.end)!=n.start+c.nodeAfter.nodeSize)return!1;var u=0==n.startIndex,f=n.endIndex==o.childCount,p=c.node(-1),d=c.index(-1);if(!p.canReplace(d+(u?0:1),d+1,l.content.append(f?zc.empty:zc.from(o))))return!1;var h=c.pos,v=h+l.nodeSize;return r.step(new uu(h-(u?1:0),v+(f?1:0),h+1,v-1,new Hc((u?zc.empty:zc.from(o.copy(zc.empty))).append(f?zc.empty:zc.from(o.copy(zc.empty))),u?0:1,f?0:1),u?0:1)),e(r.scrollIntoView()),!0}(e,n,a)))}}function Uh(t){return function(e,n){var r=e.selection,o=r.$from,i=r.$to,a=o.blockRange(i,(function(e){return e.childCount&&e.firstChild.type==t}));if(!a)return!1;var s=a.startIndex;if(0==s)return!1;var c=a.parent,l=c.child(s-1);if(l.type!=t)return!1;if(n){var u=l.lastChild&&l.lastChild.type==c.type,f=zc.from(u?t.create():null),p=new Hc(zc.from(t.create(null,zc.from(c.type.create(null,f)))),u?3:1,0),d=a.start,h=a.end;n(e.tr.step(new uu(d-(u?3:1),h,d,h,p,1,!0)).scrollIntoView())}return!0}}var Xh=function(){};Xh.prototype.append=function(t){return t.length?(t=Xh.from(t),!this.length&&t||t.length<200&&this.leafAppend(t)||this.length<200&&t.leafPrepend(this)||this.appendInner(t)):this},Xh.prototype.prepend=function(t){return t.length?Xh.from(t).append(this):this},Xh.prototype.appendInner=function(t){return new Zh(this,t)},Xh.prototype.slice=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.length),t>=e?Xh.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,e))},Xh.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)},Xh.prototype.forEach=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=this.length),e<=n?this.forEachInner(t,e,n,0):this.forEachInvertedInner(t,e,n,0)},Xh.prototype.map=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=this.length);var r=[];return this.forEach((function(e,n){return r.push(t(e,n))}),e,n),r},Xh.from=function(t){return t instanceof Xh?t:t&&t.length?new Gh(t):Xh.empty};var Gh=function(t){function e(e){t.call(this),this.values=e}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(t,n){return 0==t&&n==this.length?this:new e(this.values.slice(t,n))},e.prototype.getInner=function(t){return this.values[t]},e.prototype.forEachInner=function(t,e,n,r){for(var o=e;o<n;o++)if(!1===t(this.values[o],r+o))return!1},e.prototype.forEachInvertedInner=function(t,e,n,r){for(var o=e-1;o>=n;o--)if(!1===t(this.values[o],r+o))return!1},e.prototype.leafAppend=function(t){if(this.length+t.length<=200)return new e(this.values.concat(t.flatten()))},e.prototype.leafPrepend=function(t){if(this.length+t.length<=200)return new e(t.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e}(Xh);Xh.empty=new Gh([]);var Zh=function(t){function e(e,n){t.call(this),this.left=e,this.right=n,this.length=e.length+n.length,this.depth=Math.max(e.depth,n.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(t){return t<this.left.length?this.left.get(t):this.right.get(t-this.left.length)},e.prototype.forEachInner=function(t,e,n,r){var o=this.left.length;return!(e<o&&!1===this.left.forEachInner(t,e,Math.min(n,o),r))&&(!(n>o&&!1===this.right.forEachInner(t,Math.max(e-o,0),Math.min(this.length,n)-o,r+o))&&void 0)},e.prototype.forEachInvertedInner=function(t,e,n,r){var o=this.left.length;return!(e>o&&!1===this.right.forEachInvertedInner(t,e-o,Math.max(n,o)-o,r+o))&&(!(n<o&&!1===this.left.forEachInvertedInner(t,Math.min(e,o),n,r))&&void 0)},e.prototype.sliceInner=function(t,e){if(0==t&&e==this.length)return this;var n=this.left.length;return e<=n?this.left.slice(t,e):t>=n?this.right.slice(t-n,e-n):this.left.slice(t,n).append(this.right.slice(0,e-n))},e.prototype.leafAppend=function(t){var n=this.right.leafAppend(t);if(n)return new e(this.left,n)},e.prototype.leafPrepend=function(t){var n=this.left.leafPrepend(t);if(n)return new e(n,this.right)},e.prototype.appendInner=function(t){return this.left.depth>=Math.max(this.right.depth,t.depth)+1?new e(this.left,new e(this.right,t)):new e(this,t)},e}(Xh),Qh=Xh,tv=function(t,e){this.items=t,this.eventCount=e};tv.prototype.popEvent=function(t,e){var n=this;if(0==this.eventCount)return null;for(var r,o,i=this.items.length;;i--){if(this.items.get(i-1).selection){--i;break}}e&&(r=this.remapping(i,this.items.length),o=r.maps.length);var a,s,c=t.tr,l=[],u=[];return this.items.forEach((function(t,e){if(!t.step)return r||(r=n.remapping(i,e+1),o=r.maps.length),o--,void u.push(t);if(r){u.push(new ev(t.map));var f,p=t.step.map(r.slice(o));p&&c.maybeStep(p).doc&&(f=c.mapping.maps[c.mapping.maps.length-1],l.push(new ev(f,null,null,l.length+u.length))),o--,f&&r.appendMap(f,o)}else c.maybeStep(t.step);return t.selection?(a=r?t.selection.map(r.slice(o)):t.selection,s=new tv(n.items.slice(0,i).append(u.reverse().concat(l)),n.eventCount-1),!1):void 0}),this.items.length,0),{remaining:s,transform:c,selection:a}},tv.prototype.addTransform=function(t,e,n,r){for(var o=[],i=this.eventCount,a=this.items,s=!r&&a.length?a.get(a.length-1):null,c=0;c<t.steps.length;c++){var l,u=t.steps[c].invert(t.docs[c]),f=new ev(t.mapping.maps[c],u,e);(l=s&&s.merge(f))&&(f=l,c?o.pop():a=a.slice(0,a.length-1)),o.push(f),e&&(i++,e=null),r||(s=f)}var p,d,h,v=i-n.depth;return v>rv&&(d=v,(p=a).forEach((function(t,e){if(t.selection&&0==d--)return h=e,!1})),a=p.slice(h),i-=v),new tv(a.append(o),i)},tv.prototype.remapping=function(t,e){var n=new eu;return this.items.forEach((function(e,r){var o=null!=e.mirrorOffset&&r-e.mirrorOffset>=t?n.maps.length-e.mirrorOffset:null;n.appendMap(e.map,o)}),t,e),n},tv.prototype.addMaps=function(t){return 0==this.eventCount?this:new tv(this.items.append(t.map((function(t){return new ev(t)}))),this.eventCount)},tv.prototype.rebased=function(t,e){if(!this.eventCount)return this;var n=[],r=Math.max(0,this.items.length-e),o=t.mapping,i=t.steps.length,a=this.eventCount;this.items.forEach((function(t){t.selection&&a--}),r);var s=e;this.items.forEach((function(e){var r=o.getMirror(--s);if(null!=r){i=Math.min(i,r);var c=o.maps[r];if(e.step){var l=t.steps[r].invert(t.docs[r]),u=e.selection&&e.selection.map(o.slice(s+1,r));u&&a++,n.push(new ev(c,l,u))}else n.push(new ev(c))}}),r);for(var c=[],l=e;l<i;l++)c.push(new ev(o.maps[l]));var u=this.items.slice(0,r).append(c).append(n),f=new tv(u,a);return f.emptyItemCount()>500&&(f=f.compress(this.items.length-n.length)),f},tv.prototype.emptyItemCount=function(){var t=0;return this.items.forEach((function(e){e.step||t++})),t},tv.prototype.compress=function(t){void 0===t&&(t=this.items.length);var e=this.remapping(0,t),n=e.maps.length,r=[],o=0;return this.items.forEach((function(i,a){if(a>=t)r.push(i),i.selection&&o++;else if(i.step){var s=i.step.map(e.slice(n)),c=s&&s.getMap();if(n--,c&&e.appendMap(c,n),s){var l=i.selection&&i.selection.map(e.slice(n));l&&o++;var u,f=new ev(c.invert(),s,l),p=r.length-1;(u=r.length&&r[p].merge(f))?r[p]=u:r.push(f)}}else i.map&&n--}),this.items.length,0),new tv(Qh.from(r.reverse()),o)},tv.empty=new tv(Qh.empty,0);var ev=function(t,e,n,r){this.map=t,this.step=e,this.selection=n,this.mirrorOffset=r};ev.prototype.merge=function(t){if(this.step&&t.step&&!t.selection){var e=t.step.merge(this.step);if(e)return new ev(e.getMap().invert(),e,this.selection)}};var nv=function(t,e,n,r){this.done=t,this.undone=e,this.prevRanges=n,this.prevTime=r},rv=20;function ov(t){var e=[];return t.forEach((function(t,n,r,o){return e.push(r,o)})),e}function iv(t,e){if(!t)return null;for(var n=[],r=0;r<t.length;r+=2){var o=e.map(t[r],1),i=e.map(t[r+1],-1);o<=i&&n.push(o,i)}return n}function av(t,e,n,r){var o=lv(e),i=uv.get(e).spec.config,a=(r?t.undone:t.done).popEvent(e,o);if(a){var s=a.selection.resolve(a.transform.doc),c=(r?t.done:t.undone).addTransform(a.transform,e.selection.getBookmark(),i,o),l=new nv(r?c:a.remaining,r?a.remaining:c,null,0);n(a.transform.setSelection(s).setMeta(uv,{redo:r,historyState:l}).scrollIntoView())}}var sv=!1,cv=null;function lv(t){var e=t.plugins;if(cv!=e){sv=!1,cv=e;for(var n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){sv=!0;break}}return sv}var uv=new nf("history"),fv=new nf("closeHistory");function pv(t){return t={depth:t&&t.depth||100,newGroupDelay:t&&t.newGroupDelay||500},new Qu({key:uv,state:{init:function(){return new nv(tv.empty,tv.empty,null,0)},apply:function(e,n,r){return function(t,e,n,r){var o,i=n.getMeta(uv);if(i)return i.historyState;n.getMeta(fv)&&(t=new nv(t.done,t.undone,null,0));var a=n.getMeta("appendedTransaction");if(0==n.steps.length)return t;if(a&&a.getMeta(uv))return a.getMeta(uv).redo?new nv(t.done.addTransform(n,null,r,lv(e)),t.undone,ov(n.mapping.maps[n.steps.length-1]),t.prevTime):new nv(t.done,t.undone.addTransform(n,null,r,lv(e)),null,t.prevTime);if(!1===n.getMeta("addToHistory")||a&&!1===a.getMeta("addToHistory"))return(o=n.getMeta("rebased"))?new nv(t.done.rebased(n,o),t.undone.rebased(n,o),iv(t.prevRanges,n.mapping),t.prevTime):new nv(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),iv(t.prevRanges,n.mapping),t.prevTime);var s=0==t.prevTime||!a&&(t.prevTime<(n.time||0)-r.newGroupDelay||!function(t,e){if(!e)return!1;if(!t.docChanged)return!0;var n=!1;return t.mapping.maps[0].forEach((function(t,r){for(var o=0;o<e.length;o+=2)t<=e[o+1]&&r>=e[o]&&(n=!0)})),n}(n,t.prevRanges)),c=a?iv(t.prevRanges,n.mapping):ov(n.mapping.maps[n.steps.length-1]);return new nv(t.done.addTransform(n,s?e.selection.getBookmark():null,r,lv(e)),tv.empty,c,n.time)}(n,r,e,t)}},config:t,props:{handleDOMEvents:{beforeinput:function(t,e){var n="historyUndo"==e.inputType?dv(t.state,t.dispatch):"historyRedo"==e.inputType&&hv(t.state,t.dispatch);return n&&e.preventDefault(),n}}}})}function dv(t,e){var n=uv.getState(t);return!(!n||0==n.done.eventCount)&&(e&&av(n,t,e,!1),!0)}function hv(t,e){var n=uv.getState(t);return!(!n||0==n.undone.eventCount)&&(e&&av(n,t,e,!0),!0)}function vv(t){var e=uv.getState(t);return e?e.done.eventCount:0}function mv(t){var e=uv.getState(t);return e?e.undone.eventCount:0}var gv={},yv={},bv={},wv={};Object.defineProperty(wv,"__esModule",{value:!0}),wv.default=void 0;var xv=Sc.withParams;wv.default=xv,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.req=t.regex=t.ref=t.len=void 0,Object.defineProperty(t,"withParams",{enumerable:!0,get:function(){return n.default}});var e,n=(e=wv)&&e.__esModule?e:{default:e};function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=function(t){if(Array.isArray(t))return!!t.length;if(null==t)return!1;if(!1===t)return!0;if(t instanceof Date)return!isNaN(t.getTime());if("object"===r(t)){for(var e in t)return!0;return!1}return!!String(t).length};t.req=o;t.len=function(t){return Array.isArray(t)?t.length:"object"===r(t)?Object.keys(t).length:String(t).length};t.ref=function(t,e,n){return"function"==typeof t?t.call(e,n):n[t]};t.regex=function(t,e){return(0,n.default)({type:t},(function(t){return!o(t)||e.test(t)}))}}(bv),Object.defineProperty(yv,"__esModule",{value:!0}),yv.default=void 0;var Sv=(0,bv.regex)("alpha",/^[a-zA-Z]*$/);yv.default=Sv;var kv={};Object.defineProperty(kv,"__esModule",{value:!0}),kv.default=void 0;var _v=(0,bv.regex)("alphaNum",/^[a-zA-Z0-9]*$/);kv.default=_v;var Ov={};Object.defineProperty(Ov,"__esModule",{value:!0}),Ov.default=void 0;var Cv=(0,bv.regex)("numeric",/^[0-9]*$/);Ov.default=Cv;var Mv={};Object.defineProperty(Mv,"__esModule",{value:!0}),Mv.default=void 0;var Dv=bv;Mv.default=function(t,e){return(0,Dv.withParams)({type:"between",min:t,max:e},(function(n){return!(0,Dv.req)(n)||(!/\s/.test(n)||n instanceof Date)&&+t<=+n&&+e>=+n}))};var Tv={};Object.defineProperty(Tv,"__esModule",{value:!0}),Tv.default=void 0;var $v=(0,bv.regex)("email",/^(?:[A-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[A-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9]{2,}(?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/i);Tv.default=$v;var Av={};Object.defineProperty(Av,"__esModule",{value:!0}),Av.default=void 0;var Ev=bv,Nv=(0,Ev.withParams)({type:"ipAddress"},(function(t){if(!(0,Ev.req)(t))return!0;if("string"!=typeof t)return!1;var e=t.split(".");return 4===e.length&&e.every(Pv)}));Av.default=Nv;var Pv=function(t){if(t.length>3||0===t.length)return!1;if("0"===t[0]&&"0"!==t)return!1;if(!t.match(/^\d+$/))return!1;var e=0|+t;return e>=0&&e<=255},Iv={};Object.defineProperty(Iv,"__esModule",{value:!0}),Iv.default=void 0;var jv=bv;Iv.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:":";return(0,jv.withParams)({type:"macAddress"},(function(e){if(!(0,jv.req)(e))return!0;if("string"!=typeof e)return!1;var n="string"==typeof t&&""!==t?e.split(t):12===e.length||16===e.length?e.match(/.{2}/g):null;return null!==n&&(6===n.length||8===n.length)&&n.every(Rv)}))};var Rv=function(t){return t.toLowerCase().match(/^[0-9a-f]{2}$/)},zv={};Object.defineProperty(zv,"__esModule",{value:!0}),zv.default=void 0;var Fv=bv;zv.default=function(t){return(0,Fv.withParams)({type:"maxLength",max:t},(function(e){return!(0,Fv.req)(e)||(0,Fv.len)(e)<=t}))};var Lv={};Object.defineProperty(Lv,"__esModule",{value:!0}),Lv.default=void 0;var Bv=bv;Lv.default=function(t){return(0,Bv.withParams)({type:"minLength",min:t},(function(e){return!(0,Bv.req)(e)||(0,Bv.len)(e)>=t}))};var Vv={};Object.defineProperty(Vv,"__esModule",{value:!0}),Vv.default=void 0;var Wv=bv,qv=(0,Wv.withParams)({type:"required"},(function(t){return(0,Wv.req)("string"==typeof t?t.trim():t)}));Vv.default=qv;var Hv={};Object.defineProperty(Hv,"__esModule",{value:!0}),Hv.default=void 0;var Jv=bv;Hv.default=function(t){return(0,Jv.withParams)({type:"requiredIf",prop:t},(function(e,n){return!(0,Jv.ref)(t,this,n)||(0,Jv.req)(e)}))};var Kv={};Object.defineProperty(Kv,"__esModule",{value:!0}),Kv.default=void 0;var Yv=bv;Kv.default=function(t){return(0,Yv.withParams)({type:"requiredUnless",prop:t},(function(e,n){return!!(0,Yv.ref)(t,this,n)||(0,Yv.req)(e)}))};var Uv={};Object.defineProperty(Uv,"__esModule",{value:!0}),Uv.default=void 0;var Xv=bv;Uv.default=function(t){return(0,Xv.withParams)({type:"sameAs",eq:t},(function(e,n){return e===(0,Xv.ref)(t,this,n)}))};var Gv={};Object.defineProperty(Gv,"__esModule",{value:!0}),Gv.default=void 0;var Zv=(0,bv.regex)("url",/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i);Gv.default=Zv;var Qv={};Object.defineProperty(Qv,"__esModule",{value:!0}),Qv.default=void 0;var tm=bv;Qv.default=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return(0,tm.withParams)({type:"or"},(function(){for(var t=this,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return e.length>0&&e.reduce((function(e,n){return e||n.apply(t,r)}),!1)}))};var em={};Object.defineProperty(em,"__esModule",{value:!0}),em.default=void 0;var nm=bv;em.default=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return(0,nm.withParams)({type:"and"},(function(){for(var t=this,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return e.length>0&&e.reduce((function(e,n){return e&&n.apply(t,r)}),!0)}))};var rm={};Object.defineProperty(rm,"__esModule",{value:!0}),rm.default=void 0;var om=bv;rm.default=function(t){return(0,om.withParams)({type:"not"},(function(e,n){return!(0,om.req)(e)||!t.call(this,e,n)}))};var im={};Object.defineProperty(im,"__esModule",{value:!0}),im.default=void 0;var am=bv;im.default=function(t){return(0,am.withParams)({type:"minValue",min:t},(function(e){return!(0,am.req)(e)||(!/\s/.test(e)||e instanceof Date)&&+e>=+t}))};var sm={};Object.defineProperty(sm,"__esModule",{value:!0}),sm.default=void 0;var cm=bv;sm.default=function(t){return(0,cm.withParams)({type:"maxValue",max:t},(function(e){return!(0,cm.req)(e)||(!/\s/.test(e)||e instanceof Date)&&+e<=+t}))};var lm={};Object.defineProperty(lm,"__esModule",{value:!0}),lm.default=void 0;var um=(0,bv.regex)("integer",/(^[0-9]*$)|(^-[0-9]+$)/);lm.default=um;var fm={};Object.defineProperty(fm,"__esModule",{value:!0}),fm.default=void 0;var pm=(0,bv.regex)("decimal",/^[-]?\d*(\.\d+)?$/);
/**!
* Sortable 1.10.2
* @author RubaXa <trash@rubaxa.org>
* @author owenm <owen23355@gmail.com>
* @license MIT
*/
function dm(t){return(dm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function hm(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function vm(){return vm=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},vm.apply(this,arguments)}function mm(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){hm(t,e,n[e])}))}return t}function gm(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}fm.default=pm,function(t){function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"alpha",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"alphaNum",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"and",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(t,"between",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"decimal",{enumerable:!0,get:function(){return S.default}}),Object.defineProperty(t,"email",{enumerable:!0,get:function(){return a.default}}),t.helpers=void 0,Object.defineProperty(t,"integer",{enumerable:!0,get:function(){return x.default}}),Object.defineProperty(t,"ipAddress",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"macAddress",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"maxLength",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"maxValue",{enumerable:!0,get:function(){return w.default}}),Object.defineProperty(t,"minLength",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"minValue",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(t,"not",{enumerable:!0,get:function(){return y.default}}),Object.defineProperty(t,"numeric",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"or",{enumerable:!0,get:function(){return m.default}}),Object.defineProperty(t,"required",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(t,"requiredIf",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(t,"requiredUnless",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"sameAs",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(t,"url",{enumerable:!0,get:function(){return v.default}});var n=O(yv),r=O(kv),o=O(Ov),i=O(Mv),a=O(Tv),s=O(Av),c=O(Iv),l=O(zv),u=O(Lv),f=O(Vv),p=O(Hv),d=O(Kv),h=O(Uv),v=O(Gv),m=O(Qv),g=O(em),y=O(rm),b=O(im),w=O(sm),x=O(lm),S=O(fm),k=function(t,n){if(!n&&t&&t.__esModule)return t;if(null===t||"object"!==e(t)&&"function"!=typeof t)return{default:t};var r=_(n);if(r&&r.has(t))return r.get(t);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&Object.prototype.hasOwnProperty.call(t,a)){var s=i?Object.getOwnPropertyDescriptor(t,a):null;s&&(s.get||s.set)?Object.defineProperty(o,a,s):o[a]=t[a]}o.default=t,r&&r.set(t,o);return o}(bv);function _(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(_=function(t){return t?n:e})(t)}function O(t){return t&&t.__esModule?t:{default:t}}t.helpers=k}(gv);function ym(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var bm=ym(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),wm=ym(/Edge/i),xm=ym(/firefox/i),Sm=ym(/safari/i)&&!ym(/chrome/i)&&!ym(/android/i),km=ym(/iP(ad|od|hone)/i),_m=ym(/chrome/i)&&ym(/android/i),Om={capture:!1,passive:!1};function Cm(t,e,n){t.addEventListener(e,n,!bm&&Om)}function Mm(t,e,n){t.removeEventListener(e,n,!bm&&Om)}function Dm(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(n){return!1}return!1}}function Tm(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function $m(t,e,n,r){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&Dm(t,e):Dm(t,e))||r&&t===n)return t;if(t===n)break}while(t=Tm(t))}return null}var Am,Em=/\s+/g;function Nm(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var r=(" "+t.className+" ").replace(Em," ").replace(" "+e+" "," ");t.className=(r+(n?" "+e:"")).replace(Em," ")}}function Pm(t,e,n){var r=t&&t.style;if(r){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in r||-1!==e.indexOf("webkit")||(e="-webkit-"+e),r[e]=n+("string"==typeof n?"":"px")}}function Im(t,e){var n="";if("string"==typeof t)n=t;else do{var r=Pm(t,"transform");r&&"none"!==r&&(n=r+" "+n)}while(!e&&(t=t.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(n)}function jm(t,e,n){if(t){var r=t.getElementsByTagName(e),o=0,i=r.length;if(n)for(;o<i;o++)n(r[o],o);return r}return[]}function Rm(){var t=document.scrollingElement;return t||document.documentElement}function zm(t,e,n,r,o){if(t.getBoundingClientRect||t===window){var i,a,s,c,l,u,f;if(t!==window&&t!==Rm()?(a=(i=t.getBoundingClientRect()).top,s=i.left,c=i.bottom,l=i.right,u=i.height,f=i.width):(a=0,s=0,c=window.innerHeight,l=window.innerWidth,u=window.innerHeight,f=window.innerWidth),(e||n)&&t!==window&&(o=o||t.parentNode,!bm))do{if(o&&o.getBoundingClientRect&&("none"!==Pm(o,"transform")||n&&"static"!==Pm(o,"position"))){var p=o.getBoundingClientRect();a-=p.top+parseInt(Pm(o,"border-top-width")),s-=p.left+parseInt(Pm(o,"border-left-width")),c=a+i.height,l=s+i.width;break}}while(o=o.parentNode);if(r&&t!==window){var d=Im(o||t),h=d&&d.a,v=d&&d.d;d&&(c=(a/=v)+(u/=v),l=(s/=h)+(f/=h))}return{top:a,left:s,bottom:c,right:l,width:f,height:u}}}function Fm(t,e,n){for(var r=qm(t,!0),o=zm(t)[e];r;){var i=zm(r)[n];if(!("top"===n||"left"===n?o>=i:o<=i))return r;if(r===Rm())break;r=qm(r,!1)}return!1}function Lm(t,e,n){for(var r=0,o=0,i=t.children;o<i.length;){if("none"!==i[o].style.display&&i[o]!==Jg.ghost&&i[o]!==Jg.dragged&&$m(i[o],n.draggable,t,!1)){if(r===e)return i[o];r++}o++}return null}function Bm(t,e){for(var n=t.lastElementChild;n&&(n===Jg.ghost||"none"===Pm(n,"display")||e&&!Dm(n,e));)n=n.previousElementSibling;return n||null}function Vm(t,e){var n=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||t===Jg.clone||e&&!Dm(t,e)||n++;return n}function Wm(t){var e=0,n=0,r=Rm();if(t)do{var o=Im(t),i=o.a,a=o.d;e+=t.scrollLeft*i,n+=t.scrollTop*a}while(t!==r&&(t=t.parentNode));return[e,n]}function qm(t,e){if(!t||!t.getBoundingClientRect)return Rm();var n=t,r=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var o=Pm(n);if(n.clientWidth<n.scrollWidth&&("auto"==o.overflowX||"scroll"==o.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==o.overflowY||"scroll"==o.overflowY)){if(!n.getBoundingClientRect||n===document.body)return Rm();if(r||e)return n;r=!0}}}while(n=n.parentNode);return Rm()}function Hm(t,e){return Math.round(t.top)===Math.round(e.top)&&Math.round(t.left)===Math.round(e.left)&&Math.round(t.height)===Math.round(e.height)&&Math.round(t.width)===Math.round(e.width)}function Jm(t,e){return function(){if(!Am){var n=arguments,r=this;1===n.length?t.call(r,n[0]):t.apply(r,n),Am=setTimeout((function(){Am=void 0}),e)}}}function Km(t,e,n){t.scrollLeft+=e,t.scrollTop+=n}function Ym(t){var e=window.Polymer,n=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):n?n(t).clone(!0)[0]:t.cloneNode(!0)}var Um="Sortable"+(new Date).getTime();function Xm(){var t,e=[];return{captureAnimationState:function(){(e=[],this.options.animation)&&[].slice.call(this.el.children).forEach((function(t){if("none"!==Pm(t,"display")&&t!==Jg.ghost){e.push({target:t,rect:zm(t)});var n=mm({},e[e.length-1].rect);if(t.thisAnimationDuration){var r=Im(t,!0);r&&(n.top-=r.f,n.left-=r.e)}t.fromRect=n}}))},addAnimationState:function(t){e.push(t)},removeAnimationState:function(t){e.splice(function(t,e){for(var n in t)if(t.hasOwnProperty(n))for(var r in e)if(e.hasOwnProperty(r)&&e[r]===t[n][r])return Number(n);return-1}(e,{target:t}),1)},animateAll:function(n){var r=this;if(!this.options.animation)return clearTimeout(t),void("function"==typeof n&&n());var o=!1,i=0;e.forEach((function(t){var e=0,n=t.target,a=n.fromRect,s=zm(n),c=n.prevFromRect,l=n.prevToRect,u=t.rect,f=Im(n,!0);f&&(s.top-=f.f,s.left-=f.e),n.toRect=s,n.thisAnimationDuration&&Hm(c,s)&&!Hm(a,s)&&(u.top-s.top)/(u.left-s.left)==(a.top-s.top)/(a.left-s.left)&&(e=function(t,e,n,r){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-n.top,2)+Math.pow(e.left-n.left,2))*r.animation}(u,c,l,r.options)),Hm(s,a)||(n.prevFromRect=a,n.prevToRect=s,e||(e=r.options.animation),r.animate(n,u,s,e)),e&&(o=!0,i=Math.max(i,e),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout((function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null}),e),n.thisAnimationDuration=e)})),clearTimeout(t),o?t=setTimeout((function(){"function"==typeof n&&n()}),i):"function"==typeof n&&n(),e=[]},animate:function(t,e,n,r){if(r){Pm(t,"transition",""),Pm(t,"transform","");var o=Im(this.el),i=o&&o.a,a=o&&o.d,s=(e.left-n.left)/(i||1),c=(e.top-n.top)/(a||1);t.animatingX=!!s,t.animatingY=!!c,Pm(t,"transform","translate3d("+s+"px,"+c+"px,0)"),function(t){t.offsetWidth}(t),Pm(t,"transition","transform "+r+"ms"+(this.options.easing?" "+this.options.easing:"")),Pm(t,"transform","translate3d(0,0,0)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){Pm(t,"transition",""),Pm(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1}),r)}}}}var Gm=[],Zm={initializeByDefault:!0},Qm={mount:function(t){for(var e in Zm)Zm.hasOwnProperty(e)&&!(e in t)&&(t[e]=Zm[e]);Gm.push(t)},pluginEvent:function(t,e,n){var r=this;this.eventCanceled=!1,n.cancel=function(){r.eventCanceled=!0};var o=t+"Global";Gm.forEach((function(r){e[r.pluginName]&&(e[r.pluginName][o]&&e[r.pluginName][o](mm({sortable:e},n)),e.options[r.pluginName]&&e[r.pluginName][t]&&e[r.pluginName][t](mm({sortable:e},n)))}))},initializePlugins:function(t,e,n,r){for(var o in Gm.forEach((function(r){var o=r.pluginName;if(t.options[o]||r.initializeByDefault){var i=new r(t,e,t.options);i.sortable=t,i.options=t.options,t[o]=i,vm(n,i.defaults)}})),t.options)if(t.options.hasOwnProperty(o)){var i=this.modifyOption(t,o,t.options[o]);void 0!==i&&(t.options[o]=i)}},getEventProperties:function(t,e){var n={};return Gm.forEach((function(r){"function"==typeof r.eventProperties&&vm(n,r.eventProperties.call(e[r.pluginName],t))})),n},modifyOption:function(t,e,n){var r;return Gm.forEach((function(o){t[o.pluginName]&&o.optionListeners&&"function"==typeof o.optionListeners[e]&&(r=o.optionListeners[e].call(t[o.pluginName],n))})),r}};var tg=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.evt,o=gm(n,["evt"]);Qm.pluginEvent.bind(Jg)(t,e,mm({dragEl:ng,parentEl:rg,ghostEl:og,rootEl:ig,nextEl:ag,lastDownEl:sg,cloneEl:cg,cloneHidden:lg,dragStarted:Sg,putSortable:vg,activeSortable:Jg.active,originalEvent:r,oldIndex:ug,oldDraggableIndex:pg,newIndex:fg,newDraggableIndex:dg,hideGhostForTarget:Vg,unhideGhostForTarget:Wg,cloneNowHidden:function(){lg=!0},cloneNowShown:function(){lg=!1},dispatchSortableEvent:function(t){eg({sortable:e,name:t,originalEvent:r})}},o))};function eg(t){!function(t){var e=t.sortable,n=t.rootEl,r=t.name,o=t.targetEl,i=t.cloneEl,a=t.toEl,s=t.fromEl,c=t.oldIndex,l=t.newIndex,u=t.oldDraggableIndex,f=t.newDraggableIndex,p=t.originalEvent,d=t.putSortable,h=t.extraEventProperties;if(e=e||n&&n[Um]){var v,m=e.options,g="on"+r.charAt(0).toUpperCase()+r.substr(1);!window.CustomEvent||bm||wm?(v=document.createEvent("Event")).initEvent(r,!0,!0):v=new CustomEvent(r,{bubbles:!0,cancelable:!0}),v.to=a||n,v.from=s||n,v.item=o||n,v.clone=i,v.oldIndex=c,v.newIndex=l,v.oldDraggableIndex=u,v.newDraggableIndex=f,v.originalEvent=p,v.pullMode=d?d.lastPutMode:void 0;var y=mm({},h,Qm.getEventProperties(r,e));for(var b in y)v[b]=y[b];n&&n.dispatchEvent(v),m[g]&&m[g].call(e,v)}}(mm({putSortable:vg,cloneEl:cg,targetEl:ng,rootEl:ig,oldIndex:ug,oldDraggableIndex:pg,newIndex:fg,newDraggableIndex:dg},t))}var ng,rg,og,ig,ag,sg,cg,lg,ug,fg,pg,dg,hg,vg,mg,gg,yg,bg,wg,xg,Sg,kg,_g,Og,Cg,Mg=!1,Dg=!1,Tg=[],$g=!1,Ag=!1,Eg=[],Ng=!1,Pg=[],Ig="undefined"!=typeof document,jg=km,Rg=wm||bm?"cssFloat":"float",zg=Ig&&!_m&&!km&&"draggable"in document.createElement("div"),Fg=function(){if(Ig){if(bm)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),Lg=function(t,e){var n=Pm(t),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),o=Lm(t,0,e),i=Lm(t,1,e),a=o&&Pm(o),s=i&&Pm(i),c=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+zm(o).width,l=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+zm(i).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&a.float&&"none"!==a.float){var u="left"===a.float?"left":"right";return!i||"both"!==s.clear&&s.clear!==u?"horizontal":"vertical"}return o&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||c>=r&&"none"===n[Rg]||i&&"none"===n[Rg]&&c+l>r)?"vertical":"horizontal"},Bg=function(t){function e(t,n){return function(r,o,i,a){var s=r.options.group.name&&o.options.group.name&&r.options.group.name===o.options.group.name;if(null==t&&(n||s))return!0;if(null==t||!1===t)return!1;if(n&&"clone"===t)return t;if("function"==typeof t)return e(t(r,o,i,a),n)(r,o,i,a);var c=(n?r:o).options.group.name;return!0===t||"string"==typeof t&&t===c||t.join&&t.indexOf(c)>-1}}var n={},r=t.group;r&&"object"==dm(r)||(r={name:r}),n.name=r.name,n.checkPull=e(r.pull,!0),n.checkPut=e(r.put),n.revertClone=r.revertClone,t.group=n},Vg=function(){!Fg&&og&&Pm(og,"display","none")},Wg=function(){!Fg&&og&&Pm(og,"display","")};Ig&&document.addEventListener("click",(function(t){if(Dg)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),Dg=!1,!1}),!0);var qg=function(t){if(ng){t=t.touches?t.touches[0]:t;var e=(o=t.clientX,i=t.clientY,Tg.some((function(t){if(!Bm(t)){var e=zm(t),n=t[Um].options.emptyInsertThreshold,r=o>=e.left-n&&o<=e.right+n,s=i>=e.top-n&&i<=e.bottom+n;return n&&r&&s?a=t:void 0}})),a);if(e){var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[Um]._onDragOver(n)}}var o,i,a},Hg=function(t){ng&&ng.parentNode[Um]._isOutsideThisEl(t.target)};function Jg(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=vm({},e),t[Um]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Lg(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Jg.supportPointer&&"PointerEvent"in window,emptyInsertThreshold:5};for(var r in Qm.initializePlugins(this,t,n),n)!(r in e)&&(e[r]=n[r]);for(var o in Bg(e),this)"_"===o.charAt(0)&&"function"==typeof this[o]&&(this[o]=this[o].bind(this));this.nativeDraggable=!e.forceFallback&&zg,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?Cm(t,"pointerdown",this._onTapStart):(Cm(t,"mousedown",this._onTapStart),Cm(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(Cm(t,"dragover",this),Cm(t,"dragenter",this)),Tg.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),vm(this,Xm())}function Kg(t,e,n,r,o,i,a,s){var c,l,u=t[Um],f=u.options.onMove;return!window.CustomEvent||bm||wm?(c=document.createEvent("Event")).initEvent("move",!0,!0):c=new CustomEvent("move",{bubbles:!0,cancelable:!0}),c.to=e,c.from=t,c.dragged=n,c.draggedRect=r,c.related=o||e,c.relatedRect=i||zm(e),c.willInsertAfter=s,c.originalEvent=a,t.dispatchEvent(c),f&&(l=f.call(u,c,a)),l}function Yg(t){t.draggable=!1}function Ug(){Ng=!1}function Xg(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,r=0;n--;)r+=e.charCodeAt(n);return r.toString(36)}function Gg(t){return setTimeout(t,0)}function Zg(t){return clearTimeout(t)}Jg.prototype={constructor:Jg,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(kg=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,ng):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,r=this.options,o=r.preventOnFilter,i=t.type,a=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,s=(a||t).target,c=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||s,l=r.filter;if(function(t){Pg.length=0;var e=t.getElementsByTagName("input"),n=e.length;for(;n--;){var r=e[n];r.checked&&Pg.push(r)}}(n),!ng&&!(/mousedown|pointerdown/.test(i)&&0!==t.button||r.disabled||c.isContentEditable||(s=$m(s,r.draggable,n,!1))&&s.animated||sg===s)){if(ug=Vm(s),pg=Vm(s,r.draggable),"function"==typeof l){if(l.call(this,t,s,this))return eg({sortable:e,rootEl:c,name:"filter",targetEl:s,toEl:n,fromEl:n}),tg("filter",e,{evt:t}),void(o&&t.cancelable&&t.preventDefault())}else if(l&&(l=l.split(",").some((function(r){if(r=$m(c,r.trim(),n,!1))return eg({sortable:e,rootEl:r,name:"filter",targetEl:s,fromEl:n,toEl:n}),tg("filter",e,{evt:t}),!0}))))return void(o&&t.cancelable&&t.preventDefault());r.handle&&!$m(c,r.handle,n,!1)||this._prepareDragStart(t,a,s)}}},_prepareDragStart:function(t,e,n){var r,o=this,i=o.el,a=o.options,s=i.ownerDocument;if(n&&!ng&&n.parentNode===i){var c=zm(n);if(ig=i,rg=(ng=n).parentNode,ag=ng.nextSibling,sg=n,hg=a.group,Jg.dragged=ng,mg={target:ng,clientX:(e||t).clientX,clientY:(e||t).clientY},wg=mg.clientX-c.left,xg=mg.clientY-c.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,ng.style["will-change"]="all",r=function(){tg("delayEnded",o,{evt:t}),Jg.eventCanceled?o._onDrop():(o._disableDelayedDragEvents(),!xm&&o.nativeDraggable&&(ng.draggable=!0),o._triggerDragStart(t,e),eg({sortable:o,name:"choose",originalEvent:t}),Nm(ng,a.chosenClass,!0))},a.ignore.split(",").forEach((function(t){jm(ng,t.trim(),Yg)})),Cm(s,"dragover",qg),Cm(s,"mousemove",qg),Cm(s,"touchmove",qg),Cm(s,"mouseup",o._onDrop),Cm(s,"touchend",o._onDrop),Cm(s,"touchcancel",o._onDrop),xm&&this.nativeDraggable&&(this.options.touchStartThreshold=4,ng.draggable=!0),tg("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!e||this.nativeDraggable&&(wm||bm))r();else{if(Jg.eventCanceled)return void this._onDrop();Cm(s,"mouseup",o._disableDelayedDrag),Cm(s,"touchend",o._disableDelayedDrag),Cm(s,"touchcancel",o._disableDelayedDrag),Cm(s,"mousemove",o._delayedDragTouchMoveHandler),Cm(s,"touchmove",o._delayedDragTouchMoveHandler),a.supportPointer&&Cm(s,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(r,a.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){ng&&Yg(ng),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;Mm(t,"mouseup",this._disableDelayedDrag),Mm(t,"touchend",this._disableDelayedDrag),Mm(t,"touchcancel",this._disableDelayedDrag),Mm(t,"mousemove",this._delayedDragTouchMoveHandler),Mm(t,"touchmove",this._delayedDragTouchMoveHandler),Mm(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?Cm(document,"pointermove",this._onTouchMove):Cm(document,e?"touchmove":"mousemove",this._onTouchMove):(Cm(ng,"dragend",this),Cm(ig,"dragstart",this._onDragStart));try{document.selection?Gg((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(n){}},_dragStarted:function(t,e){if(Mg=!1,ig&&ng){tg("dragStarted",this,{evt:e}),this.nativeDraggable&&Cm(document,"dragover",Hg);var n=this.options;!t&&Nm(ng,n.dragClass,!1),Nm(ng,n.ghostClass,!0),Jg.active=this,t&&this._appendGhost(),eg({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(gg){this._lastX=gg.clientX,this._lastY=gg.clientY,Vg();for(var t=document.elementFromPoint(gg.clientX,gg.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(gg.clientX,gg.clientY))!==e;)e=t;if(ng.parentNode[Um]._isOutsideThisEl(t),e)do{if(e[Um]){if(e[Um]._onDragOver({clientX:gg.clientX,clientY:gg.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);Wg()}},_onTouchMove:function(t){if(mg){var e=this.options,n=e.fallbackTolerance,r=e.fallbackOffset,o=t.touches?t.touches[0]:t,i=og&&Im(og,!0),a=og&&i&&i.a,s=og&&i&&i.d,c=jg&&Cg&&Wm(Cg),l=(o.clientX-mg.clientX+r.x)/(a||1)+(c?c[0]-Eg[0]:0)/(a||1),u=(o.clientY-mg.clientY+r.y)/(s||1)+(c?c[1]-Eg[1]:0)/(s||1);if(!Jg.active&&!Mg){if(n&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))<n)return;this._onDragStart(t,!0)}if(og){i?(i.e+=l-(yg||0),i.f+=u-(bg||0)):i={a:1,b:0,c:0,d:1,e:l,f:u};var f="matrix(".concat(i.a,",").concat(i.b,",").concat(i.c,",").concat(i.d,",").concat(i.e,",").concat(i.f,")");Pm(og,"webkitTransform",f),Pm(og,"mozTransform",f),Pm(og,"msTransform",f),Pm(og,"transform",f),yg=l,bg=u,gg=o}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!og){var t=this.options.fallbackOnBody?document.body:ig,e=zm(ng,!0,jg,!0,t),n=this.options;if(jg){for(Cg=t;"static"===Pm(Cg,"position")&&"none"===Pm(Cg,"transform")&&Cg!==document;)Cg=Cg.parentNode;Cg!==document.body&&Cg!==document.documentElement?(Cg===document&&(Cg=Rm()),e.top+=Cg.scrollTop,e.left+=Cg.scrollLeft):Cg=Rm(),Eg=Wm(Cg)}Nm(og=ng.cloneNode(!0),n.ghostClass,!1),Nm(og,n.fallbackClass,!0),Nm(og,n.dragClass,!0),Pm(og,"transition",""),Pm(og,"transform",""),Pm(og,"box-sizing","border-box"),Pm(og,"margin",0),Pm(og,"top",e.top),Pm(og,"left",e.left),Pm(og,"width",e.width),Pm(og,"height",e.height),Pm(og,"opacity","0.8"),Pm(og,"position",jg?"absolute":"fixed"),Pm(og,"zIndex","100000"),Pm(og,"pointerEvents","none"),Jg.ghost=og,t.appendChild(og),Pm(og,"transform-origin",wg/parseInt(og.style.width)*100+"% "+xg/parseInt(og.style.height)*100+"%")}},_onDragStart:function(t,e){var n=this,r=t.dataTransfer,o=n.options;tg("dragStart",this,{evt:t}),Jg.eventCanceled?this._onDrop():(tg("setupClone",this),Jg.eventCanceled||((cg=Ym(ng)).draggable=!1,cg.style["will-change"]="",this._hideClone(),Nm(cg,this.options.chosenClass,!1),Jg.clone=cg),n.cloneId=Gg((function(){tg("clone",n),Jg.eventCanceled||(n.options.removeCloneOnHide||ig.insertBefore(cg,ng),n._hideClone(),eg({sortable:n,name:"clone"}))})),!e&&Nm(ng,o.dragClass,!0),e?(Dg=!0,n._loopId=setInterval(n._emulateDragOver,50)):(Mm(document,"mouseup",n._onDrop),Mm(document,"touchend",n._onDrop),Mm(document,"touchcancel",n._onDrop),r&&(r.effectAllowed="move",o.setData&&o.setData.call(n,r,ng)),Cm(document,"drop",n),Pm(ng,"transform","translateZ(0)")),Mg=!0,n._dragStartId=Gg(n._dragStarted.bind(n,e,t)),Cm(document,"selectstart",n),Sg=!0,Sm&&Pm(document.body,"user-select","none"))},_onDragOver:function(t){var e,n,r,o,i=this.el,a=t.target,s=this.options,c=s.group,l=Jg.active,u=hg===c,f=s.sort,p=vg||l,d=this,h=!1;if(!Ng){if(void 0!==t.preventDefault&&t.cancelable&&t.preventDefault(),a=$m(a,s.draggable,i,!0),D("dragOver"),Jg.eventCanceled)return h;if(ng.contains(t.target)||a.animated&&a.animatingX&&a.animatingY||d._ignoreWhileAnimating===a)return $(!1);if(Dg=!1,l&&!s.disabled&&(u?f||(r=!ig.contains(ng)):vg===this||(this.lastPutMode=hg.checkPull(this,l,ng,t))&&c.checkPut(this,l,ng,t))){if(o="vertical"===this._getDirection(t,a),e=zm(ng),D("dragOverValid"),Jg.eventCanceled)return h;if(r)return rg=ig,T(),this._hideClone(),D("revert"),Jg.eventCanceled||(ag?ig.insertBefore(ng,ag):ig.appendChild(ng)),$(!0);var v=Bm(i,s.draggable);if(!v||function(t,e,n){var r=zm(Bm(n.el,n.options.draggable)),o=10;return e?t.clientX>r.right+o||t.clientX<=r.right&&t.clientY>r.bottom&&t.clientX>=r.left:t.clientX>r.right&&t.clientY>r.top||t.clientX<=r.right&&t.clientY>r.bottom+o}(t,o,this)&&!v.animated){if(v===ng)return $(!1);if(v&&i===t.target&&(a=v),a&&(n=zm(a)),!1!==Kg(ig,i,ng,e,a,n,t,!!a))return T(),i.appendChild(ng),rg=i,A(),$(!0)}else if(a.parentNode===i){n=zm(a);var m,g,y,b=ng.parentNode!==i,w=!function(t,e,n){var r=n?t.left:t.top,o=n?t.right:t.bottom,i=n?t.width:t.height,a=n?e.left:e.top,s=n?e.right:e.bottom,c=n?e.width:e.height;return r===a||o===s||r+i/2===a+c/2}(ng.animated&&ng.toRect||e,a.animated&&a.toRect||n,o),x=o?"top":"left",S=Fm(a,"top","top")||Fm(ng,"top","top"),k=S?S.scrollTop:void 0;if(kg!==a&&(g=n[x],$g=!1,Ag=!w&&s.invertSwap||b),m=function(t,e,n,r,o,i,a,s){var c=r?t.clientY:t.clientX,l=r?n.height:n.width,u=r?n.top:n.left,f=r?n.bottom:n.right,p=!1;if(!a)if(s&&Og<l*o){if(!$g&&(1===_g?c>u+l*i/2:c<f-l*i/2)&&($g=!0),$g)p=!0;else if(1===_g?c<u+Og:c>f-Og)return-_g}else if(c>u+l*(1-o)/2&&c<f-l*(1-o)/2)return function(t){return Vm(ng)<Vm(t)?1:-1}(e);if((p=p||a)&&(c<u+l*i/2||c>f-l*i/2))return c>u+l/2?1:-1;return 0}(t,a,n,o,w?1:s.swapThreshold,null==s.invertedSwapThreshold?s.swapThreshold:s.invertedSwapThreshold,Ag,kg===a),0!==m){var _=Vm(ng);do{_-=m,y=rg.children[_]}while(y&&("none"===Pm(y,"display")||y===og))}if(0===m||y===a)return $(!1);kg=a,_g=m;var O=a.nextElementSibling,C=!1,M=Kg(ig,i,ng,e,a,n,t,C=1===m);if(!1!==M)return 1!==M&&-1!==M||(C=1===M),Ng=!0,setTimeout(Ug,30),T(),C&&!O?i.appendChild(ng):a.parentNode.insertBefore(ng,C?O:a),S&&Km(S,0,k-S.scrollTop),rg=ng.parentNode,void 0===g||Ag||(Og=Math.abs(g-zm(a)[x])),A(),$(!0)}if(i.contains(ng))return $(!1)}return!1}function D(s,c){tg(s,d,mm({evt:t,isOwner:u,axis:o?"vertical":"horizontal",revert:r,dragRect:e,targetRect:n,canSort:f,fromSortable:p,target:a,completed:$,onMove:function(n,r){return Kg(ig,i,ng,e,n,zm(n),t,r)},changed:A},c))}function T(){D("dragOverAnimationCapture"),d.captureAnimationState(),d!==p&&p.captureAnimationState()}function $(e){return D("dragOverCompleted",{insertion:e}),e&&(u?l._hideClone():l._showClone(d),d!==p&&(Nm(ng,vg?vg.options.ghostClass:l.options.ghostClass,!1),Nm(ng,s.ghostClass,!0)),vg!==d&&d!==Jg.active?vg=d:d===Jg.active&&vg&&(vg=null),p===d&&(d._ignoreWhileAnimating=a),d.animateAll((function(){D("dragOverAnimationComplete"),d._ignoreWhileAnimating=null})),d!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(a===ng&&!ng.animated||a===i&&!a.animated)&&(kg=null),s.dragoverBubble||t.rootEl||a===document||(ng.parentNode[Um]._isOutsideThisEl(t.target),!e&&qg(t)),!s.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),h=!0}function A(){fg=Vm(ng),dg=Vm(ng,s.draggable),eg({sortable:d,name:"change",toEl:i,newIndex:fg,newDraggableIndex:dg,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){Mm(document,"mousemove",this._onTouchMove),Mm(document,"touchmove",this._onTouchMove),Mm(document,"pointermove",this._onTouchMove),Mm(document,"dragover",qg),Mm(document,"mousemove",qg),Mm(document,"touchmove",qg)},_offUpEvents:function(){var t=this.el.ownerDocument;Mm(t,"mouseup",this._onDrop),Mm(t,"touchend",this._onDrop),Mm(t,"pointerup",this._onDrop),Mm(t,"touchcancel",this._onDrop),Mm(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;fg=Vm(ng),dg=Vm(ng,n.draggable),tg("drop",this,{evt:t}),rg=ng&&ng.parentNode,fg=Vm(ng),dg=Vm(ng,n.draggable),Jg.eventCanceled||(Mg=!1,Ag=!1,$g=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Zg(this.cloneId),Zg(this._dragStartId),this.nativeDraggable&&(Mm(document,"drop",this),Mm(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Sm&&Pm(document.body,"user-select",""),Pm(ng,"transform",""),t&&(Sg&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),og&&og.parentNode&&og.parentNode.removeChild(og),(ig===rg||vg&&"clone"!==vg.lastPutMode)&&cg&&cg.parentNode&&cg.parentNode.removeChild(cg),ng&&(this.nativeDraggable&&Mm(ng,"dragend",this),Yg(ng),ng.style["will-change"]="",Sg&&!Mg&&Nm(ng,vg?vg.options.ghostClass:this.options.ghostClass,!1),Nm(ng,this.options.chosenClass,!1),eg({sortable:this,name:"unchoose",toEl:rg,newIndex:null,newDraggableIndex:null,originalEvent:t}),ig!==rg?(fg>=0&&(eg({rootEl:rg,name:"add",toEl:rg,fromEl:ig,originalEvent:t}),eg({sortable:this,name:"remove",toEl:rg,originalEvent:t}),eg({rootEl:rg,name:"sort",toEl:rg,fromEl:ig,originalEvent:t}),eg({sortable:this,name:"sort",toEl:rg,originalEvent:t})),vg&&vg.save()):fg!==ug&&fg>=0&&(eg({sortable:this,name:"update",toEl:rg,originalEvent:t}),eg({sortable:this,name:"sort",toEl:rg,originalEvent:t})),Jg.active&&(null!=fg&&-1!==fg||(fg=ug,dg=pg),eg({sortable:this,name:"end",toEl:rg,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){tg("nulling",this),ig=ng=rg=og=ag=cg=sg=lg=mg=gg=Sg=fg=dg=ug=pg=kg=_g=vg=hg=Jg.dragged=Jg.ghost=Jg.clone=Jg.active=null,Pg.forEach((function(t){t.checked=!0})),Pg.length=yg=bg=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":ng&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move");t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],n=this.el.children,r=0,o=n.length,i=this.options;r<o;r++)$m(t=n[r],i.draggable,this.el,!1)&&e.push(t.getAttribute(i.dataIdAttr)||Xg(t));return e},sort:function(t){var e={},n=this.el;this.toArray().forEach((function(t,r){var o=n.children[r];$m(o,this.options.draggable,n,!1)&&(e[t]=o)}),this),t.forEach((function(t){e[t]&&(n.removeChild(e[t]),n.appendChild(e[t]))}))},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return $m(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var n=this.options;if(void 0===e)return n[t];var r=Qm.modifyOption(this,t,e);n[t]=void 0!==r?r:e,"group"===t&&Bg(n)},destroy:function(){tg("destroy",this);var t=this.el;t[Um]=null,Mm(t,"mousedown",this._onTapStart),Mm(t,"touchstart",this._onTapStart),Mm(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(Mm(t,"dragover",this),Mm(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),(function(t){t.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),Tg.splice(Tg.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!lg){if(tg("hideClone",this),Jg.eventCanceled)return;Pm(cg,"display","none"),this.options.removeCloneOnHide&&cg.parentNode&&cg.parentNode.removeChild(cg),lg=!0}},_showClone:function(t){if("clone"===t.lastPutMode){if(lg){if(tg("showClone",this),Jg.eventCanceled)return;ig.contains(ng)&&!this.options.group.revertClone?ig.insertBefore(cg,ng):ag?ig.insertBefore(cg,ag):ig.appendChild(cg),this.options.group.revertClone&&this.animate(ng,cg),Pm(cg,"display",""),lg=!1}}else this._hideClone()}},Ig&&Cm(document,"touchmove",(function(t){(Jg.active||Mg)&&t.cancelable&&t.preventDefault()})),Jg.utils={on:Cm,off:Mm,css:Pm,find:jm,is:function(t,e){return!!$m(t,e,t,!1)},extend:function(t,e){if(t&&e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},throttle:Jm,closest:$m,toggleClass:Nm,clone:Ym,index:Vm,nextTick:Gg,cancelNextTick:Zg,detectDirection:Lg,getChild:Lm},Jg.get=function(t){return t[Um]},Jg.mount=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e[0].constructor===Array&&(e=e[0]),e.forEach((function(t){if(!t.prototype||!t.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(t));t.utils&&(Jg.utils=mm({},Jg.utils,t.utils)),Qm.mount(t)}))},Jg.create=function(t,e){return new Jg(t,e)},Jg.version="1.10.2";var Qg,ty,ey,ny,ry,oy,iy=[],ay=!1;function sy(){iy.forEach((function(t){clearInterval(t.pid)})),iy=[]}function cy(){clearInterval(oy)}var ly=Jm((function(t,e,n,r){if(e.scroll){var o,i=(t.touches?t.touches[0]:t).clientX,a=(t.touches?t.touches[0]:t).clientY,s=e.scrollSensitivity,c=e.scrollSpeed,l=Rm(),u=!1;ty!==n&&(ty=n,sy(),Qg=e.scroll,o=e.scrollFn,!0===Qg&&(Qg=qm(n,!0)));var f=0,p=Qg;do{var d=p,h=zm(d),v=h.top,m=h.bottom,g=h.left,y=h.right,b=h.width,w=h.height,x=void 0,S=void 0,k=d.scrollWidth,_=d.scrollHeight,O=Pm(d),C=d.scrollLeft,M=d.scrollTop;d===l?(x=b<k&&("auto"===O.overflowX||"scroll"===O.overflowX||"visible"===O.overflowX),S=w<_&&("auto"===O.overflowY||"scroll"===O.overflowY||"visible"===O.overflowY)):(x=b<k&&("auto"===O.overflowX||"scroll"===O.overflowX),S=w<_&&("auto"===O.overflowY||"scroll"===O.overflowY));var D=x&&(Math.abs(y-i)<=s&&C+b<k)-(Math.abs(g-i)<=s&&!!C),T=S&&(Math.abs(m-a)<=s&&M+w<_)-(Math.abs(v-a)<=s&&!!M);if(!iy[f])for(var $=0;$<=f;$++)iy[$]||(iy[$]={});iy[f].vx==D&&iy[f].vy==T&&iy[f].el===d||(iy[f].el=d,iy[f].vx=D,iy[f].vy=T,clearInterval(iy[f].pid),0==D&&0==T||(u=!0,iy[f].pid=setInterval(function(){r&&0===this.layer&&Jg.active._onTouchMove(ry);var e=iy[this.layer].vy?iy[this.layer].vy*c:0,n=iy[this.layer].vx?iy[this.layer].vx*c:0;"function"==typeof o&&"continue"!==o.call(Jg.dragged.parentNode[Um],n,e,t,ry,iy[this.layer].el)||Km(iy[this.layer].el,n,e)}.bind({layer:f}),24))),f++}while(e.bubbleScroll&&p!==l&&(p=qm(p,!1)));ay=u}}),30),uy=function(t){var e=t.originalEvent,n=t.putSortable,r=t.dragEl,o=t.activeSortable,i=t.dispatchSortableEvent,a=t.hideGhostForTarget,s=t.unhideGhostForTarget;if(e){var c=n||o;a();var l=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,u=document.elementFromPoint(l.clientX,l.clientY);s(),c&&!c.el.contains(u)&&(i("spill"),this.onSpill({dragEl:r,putSortable:n}))}};function fy(){}function py(){}fy.prototype={startIndex:null,dragStart:function(t){var e=t.oldDraggableIndex;this.startIndex=e},onSpill:function(t){var e=t.dragEl,n=t.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var r=Lm(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(e,r):this.sortable.el.appendChild(e),this.sortable.animateAll(),n&&n.animateAll()},drop:uy},vm(fy,{pluginName:"revertOnSpill"}),py.prototype={onSpill:function(t){var e=t.dragEl,n=t.putSortable||this.sortable;n.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),n.animateAll()},drop:uy},vm(py,{pluginName:"removeOnSpill"}),Jg.mount(new function(){function t(){for(var t in this.defaults={scroll:!0,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}return t.prototype={dragStarted:function(t){var e=t.originalEvent;this.sortable.nativeDraggable?Cm(document,"dragover",this._handleAutoScroll):this.options.supportPointer?Cm(document,"pointermove",this._handleFallbackAutoScroll):e.touches?Cm(document,"touchmove",this._handleFallbackAutoScroll):Cm(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var e=t.originalEvent;this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?Mm(document,"dragover",this._handleAutoScroll):(Mm(document,"pointermove",this._handleFallbackAutoScroll),Mm(document,"touchmove",this._handleFallbackAutoScroll),Mm(document,"mousemove",this._handleFallbackAutoScroll)),cy(),sy(),clearTimeout(Am),Am=void 0},nulling:function(){ry=ty=Qg=ay=oy=ey=ny=null,iy.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,e){var n=this,r=(t.touches?t.touches[0]:t).clientX,o=(t.touches?t.touches[0]:t).clientY,i=document.elementFromPoint(r,o);if(ry=t,e||wm||bm||Sm){ly(t,this.options,i,e);var a=qm(i,!0);!ay||oy&&r===ey&&o===ny||(oy&&cy(),oy=setInterval((function(){var i=qm(document.elementFromPoint(r,o),!0);i!==a&&(a=i,sy()),ly(t,n.options,i,e)}),10),ey=r,ny=o)}else{if(!this.options.bubbleScroll||qm(i,!0)===Rm())return void sy();ly(t,this.options,qm(i,!1),!1)}}},vm(t,{pluginName:"scroll",initializeByDefault:!0})}),Jg.mount(py,fy);const dy="undefined"!=typeof window?window.console:global.console;const hy=/-(\w)/g,vy=function(t){const e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}((t=>t.replace(hy,((t,e)=>e?e.toUpperCase():""))));function my(t){null!==t.parentElement&&t.parentElement.removeChild(t)}function gy(t,e,n){const r=0===n?t.children[0]:t.children[n-1].nextSibling;t.insertBefore(e,r)}function yy(t,e){this.$nextTick((()=>this.$emit(t.toLowerCase(),e)))}function by(t){return e=>{null!==this.realList&&this["onDrag"+t](e),yy.call(this,t,e)}}function wy(t){return["transition-group","TransitionGroup"].includes(t)}function xy(t,e,n){return t[n]||(e[n]?e[n]():void 0)}const Sy=["Start","Add","Remove","Update","End"],ky=["Choose","Unchoose","Sort","Filter","Clone"],_y=["Move",...Sy,...ky].map((t=>"on"+t));var Oy=null;const Cy={name:"draggable",inheritAttrs:!1,props:{options:Object,list:{type:Array,required:!1,default:null},value:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:t=>t},element:{type:String,default:"div"},tag:{type:String,default:null},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null}},data:()=>({transitionMode:!1,noneFunctionalComponentMode:!1}),render(t){const e=this.$slots.default;this.transitionMode=function(t){if(!t||1!==t.length)return!1;const[{componentOptions:e}]=t;return!!e&&wy(e.tag)}(e);const{children:n,headerOffset:r,footerOffset:o}=function(t,e,n){let r=0,o=0;const i=xy(e,n,"header");i&&(r=i.length,t=t?[...i,...t]:[...i]);const a=xy(e,n,"footer");return a&&(o=a.length,t=t?[...t,...a]:[...a]),{children:t,headerOffset:r,footerOffset:o}}(e,this.$slots,this.$scopedSlots);this.headerOffset=r,this.footerOffset=o;const i=function(t,e){let n=null;const r=(t,e)=>{n=function(t,e,n){return void 0===n||((t=t||{})[e]=n),t}(n,t,e)},o=Object.keys(t).filter((t=>"id"===t||t.startsWith("data-"))).reduce(((e,n)=>(e[n]=t[n],e)),{});if(r("attrs",o),!e)return n;const{on:i,props:a,attrs:s}=e;return r("on",i),r("props",a),Object.assign(n.attrs,s),n}(this.$attrs,this.componentData);return t(this.getTag(),i,n)},created(){null!==this.list&&null!==this.value&&dy.error("Value and list props are mutually exclusive! Please set one or another."),"div"!==this.element&&dy.warn("Element props is deprecated please use tag props instead. See https://github.com/SortableJS/Vue.Draggable/blob/master/documentation/migrate.md#element-props"),void 0!==this.options&&dy.warn("Options props is deprecated, add sortable options directly as vue.draggable item, or use v-bind. See https://github.com/SortableJS/Vue.Draggable/blob/master/documentation/migrate.md#options-props")},mounted(){if(this.noneFunctionalComponentMode=this.getTag().toLowerCase()!==this.$el.nodeName.toLowerCase()&&!this.getIsFunctional(),this.noneFunctionalComponentMode&&this.transitionMode)throw new Error(`Transition-group inside component is not supported. Please alter tag value or remove transition-group. Current tag value: ${this.getTag()}`);const t={};Sy.forEach((e=>{t["on"+e]=by.call(this,e)})),ky.forEach((e=>{t["on"+e]=yy.bind(this,e)}));const e=Object.keys(this.$attrs).reduce(((t,e)=>(t[vy(e)]=this.$attrs[e],t)),{}),n=Object.assign({},this.options,e,t,{onMove:(t,e)=>this.onDragMove(t,e)});!("draggable"in n)&&(n.draggable=">*"),this._sortable=new Jg(this.rootContainer,n),this.computeIndexes()},beforeDestroy(){void 0!==this._sortable&&this._sortable.destroy()},computed:{rootContainer(){return this.transitionMode?this.$el.children[0]:this.$el},realList(){return this.list?this.list:this.value}},watch:{options:{handler(t){this.updateOptions(t)},deep:!0},$attrs:{handler(t){this.updateOptions(t)},deep:!0},realList(){this.computeIndexes()}},methods:{getIsFunctional(){const{fnOptions:t}=this._vnode;return t&&t.functional},getTag(){return this.tag||this.element},updateOptions(t){for(var e in t){const n=vy(e);-1===_y.indexOf(n)&&this._sortable.option(n,t[e])}},getChildrenNodes(){if(this.noneFunctionalComponentMode)return this.$children[0].$slots.default;const t=this.$slots.default;return this.transitionMode?t[0].child.$slots.default:t},computeIndexes(){this.$nextTick((()=>{this.visibleIndexes=function(t,e,n,r){if(!t)return[];const o=t.map((t=>t.elm)),i=e.length-r,a=[...e].map(((t,e)=>e>=i?o.length:o.indexOf(t)));return n?a.filter((t=>-1!==t)):a}(this.getChildrenNodes(),this.rootContainer.children,this.transitionMode,this.footerOffset)}))},getUnderlyingVm(t){const e=function(t,e){return t.map((t=>t.elm)).indexOf(e)}(this.getChildrenNodes()||[],t);if(-1===e)return null;return{index:e,element:this.realList[e]}},getUnderlyingPotencialDraggableComponent:({__vue__:t})=>t&&t.$options&&wy(t.$options._componentTag)?t.$parent:!("realList"in t)&&1===t.$children.length&&"realList"in t.$children[0]?t.$children[0]:t,emitChanges(t){this.$nextTick((()=>{this.$emit("change",t)}))},alterList(t){if(this.list)return void t(this.list);const e=[...this.value];t(e),this.$emit("input",e)},spliceList(){this.alterList((t=>t.splice(...arguments)))},updatePosition(t,e){this.alterList((n=>n.splice(e,0,n.splice(t,1)[0])))},getRelatedContextFromMoveEvent({to:t,related:e}){const n=this.getUnderlyingPotencialDraggableComponent(t);if(!n)return{component:n};const r=n.realList,o={list:r,component:n};if(t!==e&&r&&n.getUnderlyingVm){const t=n.getUnderlyingVm(e);if(t)return Object.assign(t,o)}return o},getVmIndex(t){const e=this.visibleIndexes,n=e.length;return t>n-1?n:e[t]},getComponent(){return this.$slots.default[0].componentInstance},resetTransitionData(t){if(!this.noTransitionOnDrag||!this.transitionMode)return;this.getChildrenNodes()[t].data=null;const e=this.getComponent();e.children=[],e.kept=void 0},onDragStart(t){this.context=this.getUnderlyingVm(t.item),t.item._underlying_vm_=this.clone(this.context.element),Oy=t.item},onDragAdd(t){const e=t.item._underlying_vm_;if(void 0===e)return;my(t.item);const n=this.getVmIndex(t.newIndex);this.spliceList(n,0,e),this.computeIndexes();const r={element:e,newIndex:n};this.emitChanges({added:r})},onDragRemove(t){if(gy(this.rootContainer,t.item,t.oldIndex),"clone"===t.pullMode)return void my(t.clone);const e=this.context.index;this.spliceList(e,1);const n={element:this.context.element,oldIndex:e};this.resetTransitionData(e),this.emitChanges({removed:n})},onDragUpdate(t){my(t.item),gy(t.from,t.item,t.oldIndex);const e=this.context.index,n=this.getVmIndex(t.newIndex);this.updatePosition(e,n);const r={element:this.context.element,oldIndex:e,newIndex:n};this.emitChanges({moved:r})},updateProperty(t,e){t.hasOwnProperty(e)&&(t[e]+=this.headerOffset)},computeFutureIndex(t,e){if(!t.element)return 0;const n=[...e.to.children].filter((t=>"none"!==t.style.display)),r=n.indexOf(e.related),o=t.component.getVmIndex(r);return-1!==n.indexOf(Oy)||!e.willInsertAfter?o:o+1},onDragMove(t,e){const n=this.move;if(!n||!this.realList)return!0;const r=this.getRelatedContextFromMoveEvent(t),o=this.context,i=this.computeFutureIndex(r,t);Object.assign(o,{futureIndex:i});return n(Object.assign({},t,{relatedContext:r,draggedContext:o}),e)},onDragEnd(){this.computeIndexes(),Oy=null}}};"undefined"!=typeof window&&"Vue"in window&&window.Vue.component("draggable",Cy);export{mv as A,pv as B,gv as C,Rl as D,Uu as E,zc as F,Cy as G,fc as H,Eh as I,Nc as J,zu as N,Qu as P,Hc as S,ju as T,Cn as V,qs as a,Qs as b,oc as c,nc as d,Oh as e,yh as f,jh as g,Rh as h,Hh as i,Kh as j,Uh as k,Yh as l,Hs as m,fh as n,Il as o,Nh as p,Hd as q,Yl as r,kh as s,_h as t,Ih as u,Ah as v,Jh as w,dv as x,hv as y,vv as z};