@zipify/wysiwyg 3.1.3-0 → 3.1.3-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -12,4 +12,4 @@
12
12
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
13
13
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
14
14
  */
15
- Zh={get exports(){return tm},set exports(t){tm=t}},Qh=tm,function(){var t,e="Expected a function",n="__lodash_hash_undefined__",r="__lodash_placeholder__",o=16,i=32,a=64,u=128,l=256,c=1/0,p=9007199254740991,d=NaN,f=4294967295,h=[["ary",u],["bind",1],["bindKey",2],["curry",8],["curryRight",o],["flip",512],["partial",i],["partialRight",a],["rearg",l]],m="[object Arguments]",g="[object Array]",v="[object Boolean]",y="[object Date]",b="[object Error]",_="[object Function]",D="[object GeneratorFunction]",w="[object Map]",k="[object Number]",E="[object Object]",C="[object Promise]",x="[object RegExp]",A="[object Set]",S="[object String]",O="[object Symbol]",N="[object WeakMap]",T="[object ArrayBuffer]",F="[object DataView]",M="[object Float32Array]",I="[object Float64Array]",$="[object Int8Array]",B="[object Int16Array]",R="[object Int32Array]",L="[object Uint8Array]",P="[object Uint8ClampedArray]",j="[object Uint16Array]",z="[object Uint32Array]",V=/\b__p \+= '';/g,H=/\b(__p \+=) '' \+/g,W=/(__e\(.*?\)|\b__t\)) \+\n'';/g,q=/&(?:amp|lt|gt|quot|#39);/g,U=/[&<>"']/g,K=RegExp(q.source),J=RegExp(U.source),G=/<%-([\s\S]+?)%>/g,Y=/<%([\s\S]+?)%>/g,X=/<%=([\s\S]+?)%>/g,Z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Q=/^\w*$/,tt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,et=/[\\^$.*+?()[\]{}|]/g,nt=RegExp(et.source),rt=/^\s+/,ot=/\s/,it=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,st=/\{\n\/\* \[wrapped with (.+)\] \*/,at=/,? & /,ut=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,lt=/[()=,{}\[\]\/\s]/,ct=/\\(\\)?/g,pt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,dt=/\w*$/,ft=/^[-+]0x[0-9a-f]+$/i,ht=/^0b[01]+$/i,mt=/^\[object .+?Constructor\]$/,gt=/^0o[0-7]+$/i,vt=/^(?:0|[1-9]\d*)$/,yt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,bt=/($^)/,_t=/['\n\r\u2028\u2029\\]/g,Dt="\\ud800-\\udfff",wt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",kt="\\u2700-\\u27bf",Et="a-z\\xdf-\\xf6\\xf8-\\xff",Ct="A-Z\\xc0-\\xd6\\xd8-\\xde",xt="\\ufe0e\\ufe0f",At="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",St="['’]",Ot="["+Dt+"]",Nt="["+At+"]",Tt="["+wt+"]",Ft="\\d+",Mt="["+kt+"]",It="["+Et+"]",$t="[^"+Dt+At+Ft+kt+Et+Ct+"]",Bt="\\ud83c[\\udffb-\\udfff]",Rt="[^"+Dt+"]",Lt="(?:\\ud83c[\\udde6-\\uddff]){2}",Pt="[\\ud800-\\udbff][\\udc00-\\udfff]",jt="["+Ct+"]",zt="\\u200d",Vt="(?:"+It+"|"+$t+")",Ht="(?:"+jt+"|"+$t+")",Wt="(?:['’](?:d|ll|m|re|s|t|ve))?",qt="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ut="(?:"+Tt+"|"+Bt+")?",Kt="["+xt+"]?",Jt=Kt+Ut+"(?:"+zt+"(?:"+[Rt,Lt,Pt].join("|")+")"+Kt+Ut+")*",Gt="(?:"+[Mt,Lt,Pt].join("|")+")"+Jt,Yt="(?:"+[Rt+Tt+"?",Tt,Lt,Pt,Ot].join("|")+")",Xt=RegExp(St,"g"),Zt=RegExp(Tt,"g"),Qt=RegExp(Bt+"(?="+Bt+")|"+Yt+Jt,"g"),te=RegExp([jt+"?"+It+"+"+Wt+"(?="+[Nt,jt,"$"].join("|")+")",Ht+"+"+qt+"(?="+[Nt,jt+Vt,"$"].join("|")+")",jt+"?"+Vt+"+"+Wt,jt+"+"+qt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ft,Gt].join("|"),"g"),ee=RegExp("["+zt+Dt+wt+xt+"]"),ne=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,re=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],oe=-1,ie={};ie[M]=ie[I]=ie[$]=ie[B]=ie[R]=ie[L]=ie[P]=ie[j]=ie[z]=!0,ie[m]=ie[g]=ie[T]=ie[v]=ie[F]=ie[y]=ie[b]=ie[_]=ie[w]=ie[k]=ie[E]=ie[x]=ie[A]=ie[S]=ie[N]=!1;var se={};se[m]=se[g]=se[T]=se[F]=se[v]=se[y]=se[M]=se[I]=se[$]=se[B]=se[R]=se[w]=se[k]=se[E]=se[x]=se[A]=se[S]=se[O]=se[L]=se[P]=se[j]=se[z]=!0,se[b]=se[_]=se[N]=!1;var ae={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ue=parseFloat,le=parseInt,ce="object"==typeof s&&s&&s.Object===Object&&s,pe="object"==typeof self&&self&&self.Object===Object&&self,de=ce||pe||Function("return this")(),fe=Qh&&!Qh.nodeType&&Qh,he=fe&&Zh&&!Zh.nodeType&&Zh,me=he&&he.exports===fe,ge=me&&ce.process,ve=function(){try{var t=he&&he.require&&he.require("util").types;return t||ge&&ge.binding&&ge.binding("util")}catch(t){}}(),ye=ve&&ve.isArrayBuffer,be=ve&&ve.isDate,_e=ve&&ve.isMap,De=ve&&ve.isRegExp,we=ve&&ve.isSet,ke=ve&&ve.isTypedArray;function Ee(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Ce(t,e,n,r){for(var o=-1,i=null==t?0:t.length;++o<i;){var s=t[o];e(r,s,n(s),t)}return r}function xe(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function Ae(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function Se(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function Oe(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var s=t[n];e(s,n,t)&&(i[o++]=s)}return i}function Ne(t,e){return!(null==t||!t.length)&&je(t,e,0)>-1}function Te(t,e,n){for(var r=-1,o=null==t?0:t.length;++r<o;)if(n(e,t[r]))return!0;return!1}function Fe(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o}function Me(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}function Ie(t,e,n,r){var o=-1,i=null==t?0:t.length;for(r&&i&&(n=t[++o]);++o<i;)n=e(n,t[o],o,t);return n}function $e(t,e,n,r){var o=null==t?0:t.length;for(r&&o&&(n=t[--o]);o--;)n=e(n,t[o],o,t);return n}function Be(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var Re=We("length");function Le(t,e,n){var r;return n(t,(function(t,n,o){if(e(t,n,o))return r=n,!1})),r}function Pe(t,e,n,r){for(var o=t.length,i=n+(r?1:-1);r?i--:++i<o;)if(e(t[i],i,t))return i;return-1}function je(t,e,n){return e==e?function(t,e,n){for(var r=n-1,o=t.length;++r<o;)if(t[r]===e)return r;return-1}(t,e,n):Pe(t,Ve,n)}function ze(t,e,n,r){for(var o=n-1,i=t.length;++o<i;)if(r(t[o],e))return o;return-1}function Ve(t){return t!=t}function He(t,e){var n=null==t?0:t.length;return n?Ke(t,e)/n:d}function We(e){return function(n){return null==n?t:n[e]}}function qe(e){return function(n){return null==e?t:e[n]}}function Ue(t,e,n,r,o){return o(t,(function(t,o,i){n=r?(r=!1,t):e(n,t,o,i)})),n}function Ke(e,n){for(var r,o=-1,i=e.length;++o<i;){var s=n(e[o]);s!==t&&(r=r===t?s:r+s)}return r}function Je(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function Ge(t){return t?t.slice(0,hn(t)+1).replace(rt,""):t}function Ye(t){return function(e){return t(e)}}function Xe(t,e){return Fe(e,(function(e){return t[e]}))}function Ze(t,e){return t.has(e)}function Qe(t,e){for(var n=-1,r=t.length;++n<r&&je(e,t[n],0)>-1;);return n}function tn(t,e){for(var n=t.length;n--&&je(e,t[n],0)>-1;);return n}function en(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}var nn=qe({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),rn=qe({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function on(t){return"\\"+ae[t]}function sn(t){return ee.test(t)}function an(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function un(t,e){return function(n){return t(e(n))}}function ln(t,e){for(var n=-1,o=t.length,i=0,s=[];++n<o;){var a=t[n];a!==e&&a!==r||(t[n]=r,s[i++]=n)}return s}function cn(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}function pn(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}function dn(t){return sn(t)?function(t){for(var e=Qt.lastIndex=0;Qt.test(t);)++e;return e}(t):Re(t)}function fn(t){return sn(t)?function(t){return t.match(Qt)||[]}(t):function(t){return t.split("")}(t)}function hn(t){for(var e=t.length;e--&&ot.test(t.charAt(e)););return e}var mn=qe({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),gn=function s(ot){var Dt=(ot=null==ot?de:gn.defaults(de.Object(),ot,gn.pick(de,re))).Array,wt=ot.Date,kt=ot.Error,Et=ot.Function,Ct=ot.Math,xt=ot.Object,At=ot.RegExp,St=ot.String,Ot=ot.TypeError,Nt=Dt.prototype,Tt=Et.prototype,Ft=xt.prototype,Mt=ot["__core-js_shared__"],It=Tt.toString,$t=Ft.hasOwnProperty,Bt=0,Rt=function(){var t=/[^.]+$/.exec(Mt&&Mt.keys&&Mt.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Lt=Ft.toString,Pt=It.call(xt),jt=de._,zt=At("^"+It.call($t).replace(et,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Vt=me?ot.Buffer:t,Ht=ot.Symbol,Wt=ot.Uint8Array,qt=Vt?Vt.allocUnsafe:t,Ut=un(xt.getPrototypeOf,xt),Kt=xt.create,Jt=Ft.propertyIsEnumerable,Gt=Nt.splice,Yt=Ht?Ht.isConcatSpreadable:t,Qt=Ht?Ht.iterator:t,ee=Ht?Ht.toStringTag:t,ae=function(){try{var t=fi(xt,"defineProperty");return t({},"",{}),t}catch(t){}}(),ce=ot.clearTimeout!==de.clearTimeout&&ot.clearTimeout,pe=wt&&wt.now!==de.Date.now&&wt.now,fe=ot.setTimeout!==de.setTimeout&&ot.setTimeout,he=Ct.ceil,ge=Ct.floor,ve=xt.getOwnPropertySymbols,Re=Vt?Vt.isBuffer:t,qe=ot.isFinite,vn=Nt.join,yn=un(xt.keys,xt),bn=Ct.max,_n=Ct.min,Dn=wt.now,wn=ot.parseInt,kn=Ct.random,En=Nt.reverse,Cn=fi(ot,"DataView"),xn=fi(ot,"Map"),An=fi(ot,"Promise"),Sn=fi(ot,"Set"),On=fi(ot,"WeakMap"),Nn=fi(xt,"create"),Tn=On&&new On,Fn={},Mn=ji(Cn),In=ji(xn),$n=ji(An),Bn=ji(Sn),Rn=ji(On),Ln=Ht?Ht.prototype:t,Pn=Ln?Ln.valueOf:t,jn=Ln?Ln.toString:t;function zn(t){if(ra(t)&&!Us(t)&&!(t instanceof qn)){if(t instanceof Wn)return t;if($t.call(t,"__wrapped__"))return zi(t)}return new Wn(t)}var Vn=function(){function e(){}return function(n){if(!na(n))return{};if(Kt)return Kt(n);e.prototype=n;var r=new e;return e.prototype=t,r}}();function Hn(){}function Wn(e,n){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!n,this.__index__=0,this.__values__=t}function qn(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=f,this.__views__=[]}function Un(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Kn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Jn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Gn(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Jn;++e<n;)this.add(t[e])}function Yn(t){var e=this.__data__=new Kn(t);this.size=e.size}function Xn(t,e){var n=Us(t),r=!n&&qs(t),o=!n&&!r&&Ys(t),i=!n&&!r&&!o&&pa(t),s=n||r||o||i,a=s?Je(t.length,St):[],u=a.length;for(var l in t)!e&&!$t.call(t,l)||s&&("length"==l||o&&("offset"==l||"parent"==l)||i&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||_i(l,u))||a.push(l);return a}function Zn(e){var n=e.length;return n?e[Gr(0,n-1)]:t}function Qn(t,e){return Ri(To(t),ur(e,0,t.length))}function tr(t){return Ri(To(t))}function er(e,n,r){(r!==t&&!Vs(e[n],r)||r===t&&!(n in e))&&sr(e,n,r)}function nr(e,n,r){var o=e[n];$t.call(e,n)&&Vs(o,r)&&(r!==t||n in e)||sr(e,n,r)}function rr(t,e){for(var n=t.length;n--;)if(Vs(t[n][0],e))return n;return-1}function or(t,e,n,r){return fr(t,(function(t,o,i){e(r,t,n(t),i)})),r}function ir(t,e){return t&&Fo(e,Ma(e),t)}function sr(t,e,n){"__proto__"==e&&ae?ae(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function ar(e,n){for(var r=-1,o=n.length,i=Dt(o),s=null==e;++r<o;)i[r]=s?t:Sa(e,n[r]);return i}function ur(e,n,r){return e==e&&(r!==t&&(e=e<=r?e:r),n!==t&&(e=e>=n?e:n)),e}function lr(e,n,r,o,i,s){var a,u=1&n,l=2&n,c=4&n;if(r&&(a=i?r(e,o,i,s):r(e)),a!==t)return a;if(!na(e))return e;var p=Us(e);if(p){if(a=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&$t.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(e),!u)return To(e,a)}else{var d=gi(e),f=d==_||d==D;if(Ys(e))return Co(e,u);if(d==E||d==m||f&&!i){if(a=l||f?{}:yi(e),!u)return l?function(t,e){return Fo(t,mi(t),e)}(e,function(t,e){return t&&Fo(e,Ia(e),t)}(a,e)):function(t,e){return Fo(t,hi(t),e)}(e,ir(a,e))}else{if(!se[d])return i?e:{};a=function(t,e,n){var r,o=t.constructor;switch(e){case T:return xo(t);case v:case y:return new o(+t);case F:return function(t,e){var n=e?xo(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case M:case I:case $:case B:case R:case L:case P:case j:case z:return Ao(t,n);case w:return new o;case k:case S:return new o(t);case x:return function(t){var e=new t.constructor(t.source,dt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case A:return new o;case O:return r=t,Pn?xt(Pn.call(r)):{}}}(e,d,u)}}s||(s=new Yn);var h=s.get(e);if(h)return h;s.set(e,a),ua(e)?e.forEach((function(t){a.add(lr(t,n,r,t,e,s))})):oa(e)&&e.forEach((function(t,o){a.set(o,lr(t,n,r,o,e,s))}));var g=p?t:(c?l?si:ii:l?Ia:Ma)(e);return xe(g||e,(function(t,o){g&&(t=e[o=t]),nr(a,o,lr(t,n,r,o,e,s))})),a}function cr(e,n,r){var o=r.length;if(null==e)return!o;for(e=xt(e);o--;){var i=r[o],s=n[i],a=e[i];if(a===t&&!(i in e)||!s(a))return!1}return!0}function pr(n,r,o){if("function"!=typeof n)throw new Ot(e);return Mi((function(){n.apply(t,o)}),r)}function dr(t,e,n,r){var o=-1,i=Ne,s=!0,a=t.length,u=[],l=e.length;if(!a)return u;n&&(e=Fe(e,Ye(n))),r?(i=Te,s=!1):e.length>=200&&(i=Ze,s=!1,e=new Gn(e));t:for(;++o<a;){var c=t[o],p=null==n?c:n(c);if(c=r||0!==c?c:0,s&&p==p){for(var d=l;d--;)if(e[d]===p)continue t;u.push(c)}else i(e,p,r)||u.push(c)}return u}zn.templateSettings={escape:G,evaluate:Y,interpolate:X,variable:"",imports:{_:zn}},zn.prototype=Hn.prototype,zn.prototype.constructor=zn,Wn.prototype=Vn(Hn.prototype),Wn.prototype.constructor=Wn,qn.prototype=Vn(Hn.prototype),qn.prototype.constructor=qn,Un.prototype.clear=function(){this.__data__=Nn?Nn(null):{},this.size=0},Un.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Un.prototype.get=function(e){var r=this.__data__;if(Nn){var o=r[e];return o===n?t:o}return $t.call(r,e)?r[e]:t},Un.prototype.has=function(e){var n=this.__data__;return Nn?n[e]!==t:$t.call(n,e)},Un.prototype.set=function(e,r){var o=this.__data__;return this.size+=this.has(e)?0:1,o[e]=Nn&&r===t?n:r,this},Kn.prototype.clear=function(){this.__data__=[],this.size=0},Kn.prototype.delete=function(t){var e=this.__data__,n=rr(e,t);return!(n<0||(n==e.length-1?e.pop():Gt.call(e,n,1),--this.size,0))},Kn.prototype.get=function(e){var n=this.__data__,r=rr(n,e);return r<0?t:n[r][1]},Kn.prototype.has=function(t){return rr(this.__data__,t)>-1},Kn.prototype.set=function(t,e){var n=this.__data__,r=rr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},Jn.prototype.clear=function(){this.size=0,this.__data__={hash:new Un,map:new(xn||Kn),string:new Un}},Jn.prototype.delete=function(t){var e=pi(this,t).delete(t);return this.size-=e?1:0,e},Jn.prototype.get=function(t){return pi(this,t).get(t)},Jn.prototype.has=function(t){return pi(this,t).has(t)},Jn.prototype.set=function(t,e){var n=pi(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},Gn.prototype.add=Gn.prototype.push=function(t){return this.__data__.set(t,n),this},Gn.prototype.has=function(t){return this.__data__.has(t)},Yn.prototype.clear=function(){this.__data__=new Kn,this.size=0},Yn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Yn.prototype.get=function(t){return this.__data__.get(t)},Yn.prototype.has=function(t){return this.__data__.has(t)},Yn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Kn){var r=n.__data__;if(!xn||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Jn(r)}return n.set(t,e),this.size=n.size,this};var fr=$o(Dr),hr=$o(wr,!0);function mr(t,e){var n=!0;return fr(t,(function(t,r,o){return n=!!e(t,r,o)})),n}function gr(e,n,r){for(var o=-1,i=e.length;++o<i;){var s=e[o],a=n(s);if(null!=a&&(u===t?a==a&&!ca(a):r(a,u)))var u=a,l=s}return l}function vr(t,e){var n=[];return fr(t,(function(t,r,o){e(t,r,o)&&n.push(t)})),n}function yr(t,e,n,r,o){var i=-1,s=t.length;for(n||(n=bi),o||(o=[]);++i<s;){var a=t[i];e>0&&n(a)?e>1?yr(a,e-1,n,r,o):Me(o,a):r||(o[o.length]=a)}return o}var br=Bo(),_r=Bo(!0);function Dr(t,e){return t&&br(t,e,Ma)}function wr(t,e){return t&&_r(t,e,Ma)}function kr(t,e){return Oe(e,(function(e){return Qs(t[e])}))}function Er(e,n){for(var r=0,o=(n=Do(n,e)).length;null!=e&&r<o;)e=e[Pi(n[r++])];return r&&r==o?e:t}function Cr(t,e,n){var r=e(t);return Us(t)?r:Me(r,n(t))}function xr(e){return null==e?e===t?"[object Undefined]":"[object Null]":ee&&ee in xt(e)?function(e){var n=$t.call(e,ee),r=e[ee];try{e[ee]=t;var o=!0}catch(t){}var i=Lt.call(e);return o&&(n?e[ee]=r:delete e[ee]),i}(e):function(t){return Lt.call(t)}(e)}function Ar(t,e){return t>e}function Sr(t,e){return null!=t&&$t.call(t,e)}function Or(t,e){return null!=t&&e in xt(t)}function Nr(e,n,r){for(var o=r?Te:Ne,i=e[0].length,s=e.length,a=s,u=Dt(s),l=1/0,c=[];a--;){var p=e[a];a&&n&&(p=Fe(p,Ye(n))),l=_n(p.length,l),u[a]=!r&&(n||i>=120&&p.length>=120)?new Gn(a&&p):t}p=e[0];var d=-1,f=u[0];t:for(;++d<i&&c.length<l;){var h=p[d],m=n?n(h):h;if(h=r||0!==h?h:0,!(f?Ze(f,m):o(c,m,r))){for(a=s;--a;){var g=u[a];if(!(g?Ze(g,m):o(e[a],m,r)))continue t}f&&f.push(m),c.push(h)}}return c}function Tr(e,n,r){var o=null==(e=Oi(e,n=Do(n,e)))?e:e[Pi(Zi(n))];return null==o?t:Ee(o,e,r)}function Fr(t){return ra(t)&&xr(t)==m}function Mr(e,n,r,o,i){return e===n||(null==e||null==n||!ra(e)&&!ra(n)?e!=e&&n!=n:function(e,n,r,o,i,s){var a=Us(e),u=Us(n),l=a?g:gi(e),c=u?g:gi(n),p=(l=l==m?E:l)==E,d=(c=c==m?E:c)==E,f=l==c;if(f&&Ys(e)){if(!Ys(n))return!1;a=!0,p=!1}if(f&&!p)return s||(s=new Yn),a||pa(e)?ri(e,n,r,o,i,s):function(t,e,n,r,o,i,s){switch(n){case F:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case T:return!(t.byteLength!=e.byteLength||!i(new Wt(t),new Wt(e)));case v:case y:case k:return Vs(+t,+e);case b:return t.name==e.name&&t.message==e.message;case x:case S:return t==e+"";case w:var a=an;case A:var u=1&r;if(a||(a=cn),t.size!=e.size&&!u)return!1;var l=s.get(t);if(l)return l==e;r|=2,s.set(t,e);var c=ri(a(t),a(e),r,o,i,s);return s.delete(t),c;case O:if(Pn)return Pn.call(t)==Pn.call(e)}return!1}(e,n,l,r,o,i,s);if(!(1&r)){var h=p&&$t.call(e,"__wrapped__"),_=d&&$t.call(n,"__wrapped__");if(h||_){var D=h?e.value():e,C=_?n.value():n;return s||(s=new Yn),i(D,C,r,o,s)}}return!!f&&(s||(s=new Yn),function(e,n,r,o,i,s){var a=1&r,u=ii(e),l=u.length,c=ii(n),p=c.length;if(l!=p&&!a)return!1;for(var d=l;d--;){var f=u[d];if(!(a?f in n:$t.call(n,f)))return!1}var h=s.get(e),m=s.get(n);if(h&&m)return h==n&&m==e;var g=!0;s.set(e,n),s.set(n,e);for(var v=a;++d<l;){var y=e[f=u[d]],b=n[f];if(o)var _=a?o(b,y,f,n,e,s):o(y,b,f,e,n,s);if(!(_===t?y===b||i(y,b,r,o,s):_)){g=!1;break}v||(v="constructor"==f)}if(g&&!v){var D=e.constructor,w=n.constructor;D==w||!("constructor"in e)||!("constructor"in n)||"function"==typeof D&&D instanceof D&&"function"==typeof w&&w instanceof w||(g=!1)}return s.delete(e),s.delete(n),g}(e,n,r,o,i,s))}(e,n,r,o,Mr,i))}function Ir(e,n,r,o){var i=r.length,s=i,a=!o;if(null==e)return!s;for(e=xt(e);i--;){var u=r[i];if(a&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++i<s;){var l=(u=r[i])[0],c=e[l],p=u[1];if(a&&u[2]){if(c===t&&!(l in e))return!1}else{var d=new Yn;if(o)var f=o(c,p,l,e,n,d);if(!(f===t?Mr(p,c,3,o,d):f))return!1}}return!0}function $r(t){return!(!na(t)||(e=t,Rt&&Rt in e))&&(Qs(t)?zt:mt).test(ji(t));var e}function Br(t){return"function"==typeof t?t:null==t?iu:"object"==typeof t?Us(t)?Vr(t[0],t[1]):zr(t):hu(t)}function Rr(t){if(!Ci(t))return yn(t);var e=[];for(var n in xt(t))$t.call(t,n)&&"constructor"!=n&&e.push(n);return e}function Lr(t){if(!na(t))return function(t){var e=[];if(null!=t)for(var n in xt(t))e.push(n);return e}(t);var e=Ci(t),n=[];for(var r in t)("constructor"!=r||!e&&$t.call(t,r))&&n.push(r);return n}function Pr(t,e){return t<e}function jr(t,e){var n=-1,r=Js(t)?Dt(t.length):[];return fr(t,(function(t,o,i){r[++n]=e(t,o,i)})),r}function zr(t){var e=di(t);return 1==e.length&&e[0][2]?Ai(e[0][0],e[0][1]):function(n){return n===t||Ir(n,t,e)}}function Vr(e,n){return wi(e)&&xi(n)?Ai(Pi(e),n):function(r){var o=Sa(r,e);return o===t&&o===n?Oa(r,e):Mr(n,o,3)}}function Hr(e,n,r,o,i){e!==n&&br(n,(function(s,a){if(i||(i=new Yn),na(s))!function(e,n,r,o,i,s,a){var u=Ti(e,r),l=Ti(n,r),c=a.get(l);if(c)er(e,r,c);else{var p=s?s(u,l,r+"",e,n,a):t,d=p===t;if(d){var f=Us(l),h=!f&&Ys(l),m=!f&&!h&&pa(l);p=l,f||h||m?Us(u)?p=u:Gs(u)?p=To(u):h?(d=!1,p=Co(l,!0)):m?(d=!1,p=Ao(l,!0)):p=[]:sa(l)||qs(l)?(p=u,qs(u)?p=ba(u):na(u)&&!Qs(u)||(p=yi(l))):d=!1}d&&(a.set(l,p),i(p,l,o,s,a),a.delete(l)),er(e,r,p)}}(e,n,a,r,Hr,o,i);else{var u=o?o(Ti(e,a),s,a+"",e,n,i):t;u===t&&(u=s),er(e,a,u)}}),Ia)}function Wr(e,n){var r=e.length;if(r)return _i(n+=n<0?r:0,r)?e[n]:t}function qr(t,e,n){e=e.length?Fe(e,(function(t){return Us(t)?function(e){return Er(e,1===t.length?t[0]:t)}:t})):[iu];var r=-1;e=Fe(e,Ye(ci()));var o=jr(t,(function(t,n,o){var i=Fe(e,(function(e){return e(t)}));return{criteria:i,index:++r,value:t}}));return function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}(o,(function(t,e){return function(t,e,n){for(var r=-1,o=t.criteria,i=e.criteria,s=o.length,a=n.length;++r<s;){var u=So(o[r],i[r]);if(u)return r>=a?u:u*("desc"==n[r]?-1:1)}return t.index-e.index}(t,e,n)}))}function Ur(t,e,n){for(var r=-1,o=e.length,i={};++r<o;){var s=e[r],a=Er(t,s);n(a,s)&&to(i,Do(s,t),a)}return i}function Kr(t,e,n,r){var o=r?ze:je,i=-1,s=e.length,a=t;for(t===e&&(e=To(e)),n&&(a=Fe(t,Ye(n)));++i<s;)for(var u=0,l=e[i],c=n?n(l):l;(u=o(a,c,u,r))>-1;)a!==t&&Gt.call(a,u,1),Gt.call(t,u,1);return t}function Jr(t,e){for(var n=t?e.length:0,r=n-1;n--;){var o=e[n];if(n==r||o!==i){var i=o;_i(o)?Gt.call(t,o,1):fo(t,o)}}return t}function Gr(t,e){return t+ge(kn()*(e-t+1))}function Yr(t,e){var n="";if(!t||e<1||e>p)return n;do{e%2&&(n+=t),(e=ge(e/2))&&(t+=t)}while(e);return n}function Xr(t,e){return Ii(Si(t,e,iu),t+"")}function Zr(t){return Zn(Va(t))}function Qr(t,e){var n=Va(t);return Ri(n,ur(e,0,n.length))}function to(e,n,r,o){if(!na(e))return e;for(var i=-1,s=(n=Do(n,e)).length,a=s-1,u=e;null!=u&&++i<s;){var l=Pi(n[i]),c=r;if("__proto__"===l||"constructor"===l||"prototype"===l)return e;if(i!=a){var p=u[l];(c=o?o(p,l,u):t)===t&&(c=na(p)?p:_i(n[i+1])?[]:{})}nr(u,l,c),u=u[l]}return e}var eo=Tn?function(t,e){return Tn.set(t,e),t}:iu,no=ae?function(t,e){return ae(t,"toString",{configurable:!0,enumerable:!1,value:nu(e),writable:!0})}:iu;function ro(t){return Ri(Va(t))}function oo(t,e,n){var r=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var i=Dt(o);++r<o;)i[r]=t[r+e];return i}function io(t,e){var n;return fr(t,(function(t,r,o){return!(n=e(t,r,o))})),!!n}function so(t,e,n){var r=0,o=null==t?r:t.length;if("number"==typeof e&&e==e&&o<=2147483647){for(;r<o;){var i=r+o>>>1,s=t[i];null!==s&&!ca(s)&&(n?s<=e:s<e)?r=i+1:o=i}return o}return ao(t,e,iu,n)}function ao(e,n,r,o){var i=0,s=null==e?0:e.length;if(0===s)return 0;for(var a=(n=r(n))!=n,u=null===n,l=ca(n),c=n===t;i<s;){var p=ge((i+s)/2),d=r(e[p]),f=d!==t,h=null===d,m=d==d,g=ca(d);if(a)var v=o||m;else v=c?m&&(o||f):u?m&&f&&(o||!h):l?m&&f&&!h&&(o||!g):!h&&!g&&(o?d<=n:d<n);v?i=p+1:s=p}return _n(s,4294967294)}function uo(t,e){for(var n=-1,r=t.length,o=0,i=[];++n<r;){var s=t[n],a=e?e(s):s;if(!n||!Vs(a,u)){var u=a;i[o++]=0===s?0:s}}return i}function lo(t){return"number"==typeof t?t:ca(t)?d:+t}function co(t){if("string"==typeof t)return t;if(Us(t))return Fe(t,co)+"";if(ca(t))return jn?jn.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function po(t,e,n){var r=-1,o=Ne,i=t.length,s=!0,a=[],u=a;if(n)s=!1,o=Te;else if(i>=200){var l=e?null:Xo(t);if(l)return cn(l);s=!1,o=Ze,u=new Gn}else u=e?[]:a;t:for(;++r<i;){var c=t[r],p=e?e(c):c;if(c=n||0!==c?c:0,s&&p==p){for(var d=u.length;d--;)if(u[d]===p)continue t;e&&u.push(p),a.push(c)}else o(u,p,n)||(u!==a&&u.push(p),a.push(c))}return a}function fo(t,e){return null==(t=Oi(t,e=Do(e,t)))||delete t[Pi(Zi(e))]}function ho(t,e,n,r){return to(t,e,n(Er(t,e)),r)}function mo(t,e,n,r){for(var o=t.length,i=r?o:-1;(r?i--:++i<o)&&e(t[i],i,t););return n?oo(t,r?0:i,r?i+1:o):oo(t,r?i+1:0,r?o:i)}function go(t,e){var n=t;return n instanceof qn&&(n=n.value()),Ie(e,(function(t,e){return e.func.apply(e.thisArg,Me([t],e.args))}),n)}function vo(t,e,n){var r=t.length;if(r<2)return r?po(t[0]):[];for(var o=-1,i=Dt(r);++o<r;)for(var s=t[o],a=-1;++a<r;)a!=o&&(i[o]=dr(i[o]||s,t[a],e,n));return po(yr(i,1),e,n)}function yo(e,n,r){for(var o=-1,i=e.length,s=n.length,a={};++o<i;){var u=o<s?n[o]:t;r(a,e[o],u)}return a}function bo(t){return Gs(t)?t:[]}function _o(t){return"function"==typeof t?t:iu}function Do(t,e){return Us(t)?t:wi(t,e)?[t]:Li(_a(t))}var wo=Xr;function ko(e,n,r){var o=e.length;return r=r===t?o:r,!n&&r>=o?e:oo(e,n,r)}var Eo=ce||function(t){return de.clearTimeout(t)};function Co(t,e){if(e)return t.slice();var n=t.length,r=qt?qt(n):new t.constructor(n);return t.copy(r),r}function xo(t){var e=new t.constructor(t.byteLength);return new Wt(e).set(new Wt(t)),e}function Ao(t,e){var n=e?xo(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function So(e,n){if(e!==n){var r=e!==t,o=null===e,i=e==e,s=ca(e),a=n!==t,u=null===n,l=n==n,c=ca(n);if(!u&&!c&&!s&&e>n||s&&a&&l&&!u&&!c||o&&a&&l||!r&&l||!i)return 1;if(!o&&!s&&!c&&e<n||c&&r&&i&&!o&&!s||u&&r&&i||!a&&i||!l)return-1}return 0}function Oo(t,e,n,r){for(var o=-1,i=t.length,s=n.length,a=-1,u=e.length,l=bn(i-s,0),c=Dt(u+l),p=!r;++a<u;)c[a]=e[a];for(;++o<s;)(p||o<i)&&(c[n[o]]=t[o]);for(;l--;)c[a++]=t[o++];return c}function No(t,e,n,r){for(var o=-1,i=t.length,s=-1,a=n.length,u=-1,l=e.length,c=bn(i-a,0),p=Dt(c+l),d=!r;++o<c;)p[o]=t[o];for(var f=o;++u<l;)p[f+u]=e[u];for(;++s<a;)(d||o<i)&&(p[f+n[s]]=t[o++]);return p}function To(t,e){var n=-1,r=t.length;for(e||(e=Dt(r));++n<r;)e[n]=t[n];return e}function Fo(e,n,r,o){var i=!r;r||(r={});for(var s=-1,a=n.length;++s<a;){var u=n[s],l=o?o(r[u],e[u],u,r,e):t;l===t&&(l=e[u]),i?sr(r,u,l):nr(r,u,l)}return r}function Mo(t,e){return function(n,r){var o=Us(n)?Ce:or,i=e?e():{};return o(n,t,ci(r,2),i)}}function Io(e){return Xr((function(n,r){var o=-1,i=r.length,s=i>1?r[i-1]:t,a=i>2?r[2]:t;for(s=e.length>3&&"function"==typeof s?(i--,s):t,a&&Di(r[0],r[1],a)&&(s=i<3?t:s,i=1),n=xt(n);++o<i;){var u=r[o];u&&e(n,u,o,s)}return n}))}function $o(t,e){return function(n,r){if(null==n)return n;if(!Js(n))return t(n,r);for(var o=n.length,i=e?o:-1,s=xt(n);(e?i--:++i<o)&&!1!==r(s[i],i,s););return n}}function Bo(t){return function(e,n,r){for(var o=-1,i=xt(e),s=r(e),a=s.length;a--;){var u=s[t?a:++o];if(!1===n(i[u],u,i))break}return e}}function Ro(e){return function(n){var r=sn(n=_a(n))?fn(n):t,o=r?r[0]:n.charAt(0),i=r?ko(r,1).join(""):n.slice(1);return o[e]()+i}}function Lo(t){return function(e){return Ie(Qa(qa(e).replace(Xt,"")),t,"")}}function Po(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=Vn(t.prototype),r=t.apply(n,e);return na(r)?r:n}}function jo(e){return function(n,r,o){var i=xt(n);if(!Js(n)){var s=ci(r,3);n=Ma(n),r=function(t){return s(i[t],t,i)}}var a=e(n,r,o);return a>-1?i[s?n[a]:a]:t}}function zo(n){return oi((function(r){var o=r.length,i=o,s=Wn.prototype.thru;for(n&&r.reverse();i--;){var a=r[i];if("function"!=typeof a)throw new Ot(e);if(s&&!u&&"wrapper"==ui(a))var u=new Wn([],!0)}for(i=u?i:o;++i<o;){var l=ui(a=r[i]),c="wrapper"==l?ai(a):t;u=c&&ki(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?u[ui(c[0])].apply(u,c[3]):1==a.length&&ki(a)?u[l]():u.thru(a)}return function(){var t=arguments,e=t[0];if(u&&1==t.length&&Us(e))return u.plant(e).value();for(var n=0,i=o?r[n].apply(this,t):e;++n<o;)i=r[n].call(this,i);return i}}))}function Vo(e,n,r,o,i,s,a,l,c,p){var d=n&u,f=1&n,h=2&n,m=24&n,g=512&n,v=h?t:Po(e);return function t(){for(var u=arguments.length,y=Dt(u),b=u;b--;)y[b]=arguments[b];if(m)var _=li(t),D=en(y,_);if(o&&(y=Oo(y,o,i,m)),s&&(y=No(y,s,a,m)),u-=D,m&&u<p){var w=ln(y,_);return Go(e,n,Vo,t.placeholder,r,y,w,l,c,p-u)}var k=f?r:this,E=h?k[e]:e;return u=y.length,l?y=Ni(y,l):g&&u>1&&y.reverse(),d&&c<u&&(y.length=c),this&&this!==de&&this instanceof t&&(E=v||Po(E)),E.apply(k,y)}}function Ho(t,e){return function(n,r){return function(t,e,n,r){return Dr(t,(function(t,o,i){e(r,n(t),o,i)})),r}(n,t,e(r),{})}}function Wo(e,n){return function(r,o){var i;if(r===t&&o===t)return n;if(r!==t&&(i=r),o!==t){if(i===t)return o;"string"==typeof r||"string"==typeof o?(r=co(r),o=co(o)):(r=lo(r),o=lo(o)),i=e(r,o)}return i}}function qo(t){return oi((function(e){return e=Fe(e,Ye(ci())),Xr((function(n){var r=this;return t(e,(function(t){return Ee(t,r,n)}))}))}))}function Uo(e,n){var r=(n=n===t?" ":co(n)).length;if(r<2)return r?Yr(n,e):n;var o=Yr(n,he(e/dn(n)));return sn(n)?ko(fn(o),0,e).join(""):o.slice(0,e)}function Ko(e){return function(n,r,o){return o&&"number"!=typeof o&&Di(n,r,o)&&(r=o=t),n=ma(n),r===t?(r=n,n=0):r=ma(r),function(t,e,n,r){for(var o=-1,i=bn(he((e-t)/(n||1)),0),s=Dt(i);i--;)s[r?i:++o]=t,t+=n;return s}(n,r,o=o===t?n<r?1:-1:ma(o),e)}}function Jo(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=ya(e),n=ya(n)),t(e,n)}}function Go(e,n,r,o,s,u,l,c,p,d){var f=8&n;n|=f?i:a,4&(n&=~(f?a:i))||(n&=-4);var h=[e,n,s,f?u:t,f?l:t,f?t:u,f?t:l,c,p,d],m=r.apply(t,h);return ki(e)&&Fi(m,h),m.placeholder=o,$i(m,e,n)}function Yo(t){var e=Ct[t];return function(t,n){if(t=ya(t),(n=null==n?0:_n(ga(n),292))&&qe(t)){var r=(_a(t)+"e").split("e");return+((r=(_a(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var Xo=Sn&&1/cn(new Sn([,-0]))[1]==c?function(t){return new Sn(t)}:cu;function Zo(t){return function(e){var n=gi(e);return n==w?an(e):n==A?pn(e):function(t,e){return Fe(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function Qo(n,s,c,p,d,f,h,m){var g=2&s;if(!g&&"function"!=typeof n)throw new Ot(e);var v=p?p.length:0;if(v||(s&=-97,p=d=t),h=h===t?h:bn(ga(h),0),m=m===t?m:ga(m),v-=d?d.length:0,s&a){var y=p,b=d;p=d=t}var _=g?t:ai(n),D=[n,s,c,p,d,y,b,f,h,m];if(_&&function(t,e){var n=t[1],o=e[1],i=n|o,s=i<131,a=o==u&&8==n||o==u&&n==l&&t[7].length<=e[8]||384==o&&e[7].length<=e[8]&&8==n;if(!s&&!a)return t;1&o&&(t[2]=e[2],i|=1&n?0:4);var c=e[3];if(c){var p=t[3];t[3]=p?Oo(p,c,e[4]):c,t[4]=p?ln(t[3],r):e[4]}(c=e[5])&&(p=t[5],t[5]=p?No(p,c,e[6]):c,t[6]=p?ln(t[5],r):e[6]),(c=e[7])&&(t[7]=c),o&u&&(t[8]=null==t[8]?e[8]:_n(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i}(D,_),n=D[0],s=D[1],c=D[2],p=D[3],d=D[4],!(m=D[9]=D[9]===t?g?0:n.length:bn(D[9]-v,0))&&24&s&&(s&=-25),s&&1!=s)w=8==s||s==o?function(e,n,r){var o=Po(e);return function i(){for(var s=arguments.length,a=Dt(s),u=s,l=li(i);u--;)a[u]=arguments[u];var c=s<3&&a[0]!==l&&a[s-1]!==l?[]:ln(a,l);return(s-=c.length)<r?Go(e,n,Vo,i.placeholder,t,a,c,t,t,r-s):Ee(this&&this!==de&&this instanceof i?o:e,this,a)}}(n,s,m):s!=i&&33!=s||d.length?Vo.apply(t,D):function(t,e,n,r){var o=1&e,i=Po(t);return function e(){for(var s=-1,a=arguments.length,u=-1,l=r.length,c=Dt(l+a),p=this&&this!==de&&this instanceof e?i:t;++u<l;)c[u]=r[u];for(;a--;)c[u++]=arguments[++s];return Ee(p,o?n:this,c)}}(n,s,c,p);else var w=function(t,e,n){var r=1&e,o=Po(t);return function e(){return(this&&this!==de&&this instanceof e?o:t).apply(r?n:this,arguments)}}(n,s,c);return $i((_?eo:Fi)(w,D),n,s)}function ti(e,n,r,o){return e===t||Vs(e,Ft[r])&&!$t.call(o,r)?n:e}function ei(e,n,r,o,i,s){return na(e)&&na(n)&&(s.set(n,e),Hr(e,n,t,ei,s),s.delete(n)),e}function ni(e){return sa(e)?t:e}function ri(e,n,r,o,i,s){var a=1&r,u=e.length,l=n.length;if(u!=l&&!(a&&l>u))return!1;var c=s.get(e),p=s.get(n);if(c&&p)return c==n&&p==e;var d=-1,f=!0,h=2&r?new Gn:t;for(s.set(e,n),s.set(n,e);++d<u;){var m=e[d],g=n[d];if(o)var v=a?o(g,m,d,n,e,s):o(m,g,d,e,n,s);if(v!==t){if(v)continue;f=!1;break}if(h){if(!Be(n,(function(t,e){if(!Ze(h,e)&&(m===t||i(m,t,r,o,s)))return h.push(e)}))){f=!1;break}}else if(m!==g&&!i(m,g,r,o,s)){f=!1;break}}return s.delete(e),s.delete(n),f}function oi(e){return Ii(Si(e,t,Ki),e+"")}function ii(t){return Cr(t,Ma,hi)}function si(t){return Cr(t,Ia,mi)}var ai=Tn?function(t){return Tn.get(t)}:cu;function ui(t){for(var e=t.name+"",n=Fn[e],r=$t.call(Fn,e)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==t)return o.name}return e}function li(t){return($t.call(zn,"placeholder")?zn:t).placeholder}function ci(){var t=zn.iteratee||su;return t=t===su?Br:t,arguments.length?t(arguments[0],arguments[1]):t}function pi(t,e){var n,r,o=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof e?"string":"hash"]:o.map}function di(t){for(var e=Ma(t),n=e.length;n--;){var r=e[n],o=t[r];e[n]=[r,o,xi(o)]}return e}function fi(e,n){var r=function(e,n){return null==e?t:e[n]}(e,n);return $r(r)?r:t}var hi=ve?function(t){return null==t?[]:(t=xt(t),Oe(ve(t),(function(e){return Jt.call(t,e)})))}:vu,mi=ve?function(t){for(var e=[];t;)Me(e,hi(t)),t=Ut(t);return e}:vu,gi=xr;function vi(t,e,n){for(var r=-1,o=(e=Do(e,t)).length,i=!1;++r<o;){var s=Pi(e[r]);if(!(i=null!=t&&n(t,s)))break;t=t[s]}return i||++r!=o?i:!!(o=null==t?0:t.length)&&ea(o)&&_i(s,o)&&(Us(t)||qs(t))}function yi(t){return"function"!=typeof t.constructor||Ci(t)?{}:Vn(Ut(t))}function bi(t){return Us(t)||qs(t)||!!(Yt&&t&&t[Yt])}function _i(t,e){var n=typeof t;return!!(e=null==e?p:e)&&("number"==n||"symbol"!=n&&vt.test(t))&&t>-1&&t%1==0&&t<e}function Di(t,e,n){if(!na(n))return!1;var r=typeof e;return!!("number"==r?Js(n)&&_i(e,n.length):"string"==r&&e in n)&&Vs(n[e],t)}function wi(t,e){if(Us(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!ca(t))||Q.test(t)||!Z.test(t)||null!=e&&t in xt(e)}function ki(t){var e=ui(t),n=zn[e];if("function"!=typeof n||!(e in qn.prototype))return!1;if(t===n)return!0;var r=ai(n);return!!r&&t===r[0]}(Cn&&gi(new Cn(new ArrayBuffer(1)))!=F||xn&&gi(new xn)!=w||An&&gi(An.resolve())!=C||Sn&&gi(new Sn)!=A||On&&gi(new On)!=N)&&(gi=function(e){var n=xr(e),r=n==E?e.constructor:t,o=r?ji(r):"";if(o)switch(o){case Mn:return F;case In:return w;case $n:return C;case Bn:return A;case Rn:return N}return n});var Ei=Mt?Qs:yu;function Ci(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Ft)}function xi(t){return t==t&&!na(t)}function Ai(e,n){return function(r){return null!=r&&r[e]===n&&(n!==t||e in xt(r))}}function Si(e,n,r){return n=bn(n===t?e.length-1:n,0),function(){for(var t=arguments,o=-1,i=bn(t.length-n,0),s=Dt(i);++o<i;)s[o]=t[n+o];o=-1;for(var a=Dt(n+1);++o<n;)a[o]=t[o];return a[n]=r(s),Ee(e,this,a)}}function Oi(t,e){return e.length<2?t:Er(t,oo(e,0,-1))}function Ni(e,n){for(var r=e.length,o=_n(n.length,r),i=To(e);o--;){var s=n[o];e[o]=_i(s,r)?i[s]:t}return e}function Ti(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var Fi=Bi(eo),Mi=fe||function(t,e){return de.setTimeout(t,e)},Ii=Bi(no);function $i(t,e,n){var r=e+"";return Ii(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(it,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return xe(h,(function(n){var r="_."+n[0];e&n[1]&&!Ne(t,r)&&t.push(r)})),t.sort()}(function(t){var e=t.match(st);return e?e[1].split(at):[]}(r),n)))}function Bi(e){var n=0,r=0;return function(){var o=Dn(),i=16-(o-r);if(r=o,i>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(t,arguments)}}function Ri(e,n){var r=-1,o=e.length,i=o-1;for(n=n===t?o:n;++r<n;){var s=Gr(r,i),a=e[s];e[s]=e[r],e[r]=a}return e.length=n,e}var Li=function(t){var e=Bs(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(tt,(function(t,n,r,o){e.push(r?o.replace(ct,"$1"):n||t)})),e}));function Pi(t){if("string"==typeof t||ca(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function ji(t){if(null!=t){try{return It.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function zi(t){if(t instanceof qn)return t.clone();var e=new Wn(t.__wrapped__,t.__chain__);return e.__actions__=To(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Vi=Xr((function(t,e){return Gs(t)?dr(t,yr(e,1,Gs,!0)):[]})),Hi=Xr((function(e,n){var r=Zi(n);return Gs(r)&&(r=t),Gs(e)?dr(e,yr(n,1,Gs,!0),ci(r,2)):[]})),Wi=Xr((function(e,n){var r=Zi(n);return Gs(r)&&(r=t),Gs(e)?dr(e,yr(n,1,Gs,!0),t,r):[]}));function qi(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=null==n?0:ga(n);return o<0&&(o=bn(r+o,0)),Pe(t,ci(e,3),o)}function Ui(e,n,r){var o=null==e?0:e.length;if(!o)return-1;var i=o-1;return r!==t&&(i=ga(r),i=r<0?bn(o+i,0):_n(i,o-1)),Pe(e,ci(n,3),i,!0)}function Ki(t){return null!=t&&t.length?yr(t,1):[]}function Ji(e){return e&&e.length?e[0]:t}var Gi=Xr((function(t){var e=Fe(t,bo);return e.length&&e[0]===t[0]?Nr(e):[]})),Yi=Xr((function(e){var n=Zi(e),r=Fe(e,bo);return n===Zi(r)?n=t:r.pop(),r.length&&r[0]===e[0]?Nr(r,ci(n,2)):[]})),Xi=Xr((function(e){var n=Zi(e),r=Fe(e,bo);return(n="function"==typeof n?n:t)&&r.pop(),r.length&&r[0]===e[0]?Nr(r,t,n):[]}));function Zi(e){var n=null==e?0:e.length;return n?e[n-1]:t}var Qi=Xr(ts);function ts(t,e){return t&&t.length&&e&&e.length?Kr(t,e):t}var es=oi((function(t,e){var n=null==t?0:t.length,r=ar(t,e);return Jr(t,Fe(e,(function(t){return _i(t,n)?+t:t})).sort(So)),r}));function ns(t){return null==t?t:En.call(t)}var rs=Xr((function(t){return po(yr(t,1,Gs,!0))})),os=Xr((function(e){var n=Zi(e);return Gs(n)&&(n=t),po(yr(e,1,Gs,!0),ci(n,2))})),is=Xr((function(e){var n=Zi(e);return n="function"==typeof n?n:t,po(yr(e,1,Gs,!0),t,n)}));function ss(t){if(!t||!t.length)return[];var e=0;return t=Oe(t,(function(t){if(Gs(t))return e=bn(t.length,e),!0})),Je(e,(function(e){return Fe(t,We(e))}))}function as(e,n){if(!e||!e.length)return[];var r=ss(e);return null==n?r:Fe(r,(function(e){return Ee(n,t,e)}))}var us=Xr((function(t,e){return Gs(t)?dr(t,e):[]})),ls=Xr((function(t){return vo(Oe(t,Gs))})),cs=Xr((function(e){var n=Zi(e);return Gs(n)&&(n=t),vo(Oe(e,Gs),ci(n,2))})),ps=Xr((function(e){var n=Zi(e);return n="function"==typeof n?n:t,vo(Oe(e,Gs),t,n)})),ds=Xr(ss),fs=Xr((function(e){var n=e.length,r=n>1?e[n-1]:t;return r="function"==typeof r?(e.pop(),r):t,as(e,r)}));function hs(t){var e=zn(t);return e.__chain__=!0,e}function ms(t,e){return e(t)}var gs=oi((function(e){var n=e.length,r=n?e[0]:0,o=this.__wrapped__,i=function(t){return ar(t,e)};return!(n>1||this.__actions__.length)&&o instanceof qn&&_i(r)?((o=o.slice(r,+r+(n?1:0))).__actions__.push({func:ms,args:[i],thisArg:t}),new Wn(o,this.__chain__).thru((function(e){return n&&!e.length&&e.push(t),e}))):this.thru(i)})),vs=Mo((function(t,e,n){$t.call(t,n)?++t[n]:sr(t,n,1)})),ys=jo(qi),bs=jo(Ui);function _s(t,e){return(Us(t)?xe:fr)(t,ci(e,3))}function Ds(t,e){return(Us(t)?Ae:hr)(t,ci(e,3))}var ws=Mo((function(t,e,n){$t.call(t,n)?t[n].push(e):sr(t,n,[e])})),ks=Xr((function(t,e,n){var r=-1,o="function"==typeof e,i=Js(t)?Dt(t.length):[];return fr(t,(function(t){i[++r]=o?Ee(e,t,n):Tr(t,e,n)})),i})),Es=Mo((function(t,e,n){sr(t,n,e)}));function Cs(t,e){return(Us(t)?Fe:jr)(t,ci(e,3))}var xs=Mo((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]})),As=Xr((function(t,e){if(null==t)return[];var n=e.length;return n>1&&Di(t,e[0],e[1])?e=[]:n>2&&Di(e[0],e[1],e[2])&&(e=[e[0]]),qr(t,yr(e,1),[])})),Ss=pe||function(){return de.Date.now()};function Os(e,n,r){return n=r?t:n,n=e&&null==n?e.length:n,Qo(e,u,t,t,t,t,n)}function Ns(n,r){var o;if("function"!=typeof r)throw new Ot(e);return n=ga(n),function(){return--n>0&&(o=r.apply(this,arguments)),n<=1&&(r=t),o}}var Ts=Xr((function(t,e,n){var r=1;if(n.length){var o=ln(n,li(Ts));r|=i}return Qo(t,r,e,n,o)})),Fs=Xr((function(t,e,n){var r=3;if(n.length){var o=ln(n,li(Fs));r|=i}return Qo(e,r,t,n,o)}));function Ms(n,r,o){var i,s,a,u,l,c,p=0,d=!1,f=!1,h=!0;if("function"!=typeof n)throw new Ot(e);function m(e){var r=i,o=s;return i=s=t,p=e,u=n.apply(o,r)}function g(t){return p=t,l=Mi(y,r),d?m(t):u}function v(e){var n=e-c;return c===t||n>=r||n<0||f&&e-p>=a}function y(){var t=Ss();if(v(t))return b(t);l=Mi(y,function(t){var e=r-(t-c);return f?_n(e,a-(t-p)):e}(t))}function b(e){return l=t,h&&i?m(e):(i=s=t,u)}function _(){var e=Ss(),n=v(e);if(i=arguments,s=this,c=e,n){if(l===t)return g(c);if(f)return Eo(l),l=Mi(y,r),m(c)}return l===t&&(l=Mi(y,r)),u}return r=ya(r)||0,na(o)&&(d=!!o.leading,a=(f="maxWait"in o)?bn(ya(o.maxWait)||0,r):a,h="trailing"in o?!!o.trailing:h),_.cancel=function(){l!==t&&Eo(l),p=0,i=c=s=l=t},_.flush=function(){return l===t?u:b(Ss())},_}var Is=Xr((function(t,e){return pr(t,1,e)})),$s=Xr((function(t,e,n){return pr(t,ya(e)||0,n)}));function Bs(t,n){if("function"!=typeof t||null!=n&&"function"!=typeof n)throw new Ot(e);var r=function(){var e=arguments,o=n?n.apply(this,e):e[0],i=r.cache;if(i.has(o))return i.get(o);var s=t.apply(this,e);return r.cache=i.set(o,s)||i,s};return r.cache=new(Bs.Cache||Jn),r}function Rs(t){if("function"!=typeof t)throw new Ot(e);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Bs.Cache=Jn;var Ls=wo((function(t,e){var n=(e=1==e.length&&Us(e[0])?Fe(e[0],Ye(ci())):Fe(yr(e,1),Ye(ci()))).length;return Xr((function(r){for(var o=-1,i=_n(r.length,n);++o<i;)r[o]=e[o].call(this,r[o]);return Ee(t,this,r)}))})),Ps=Xr((function(e,n){var r=ln(n,li(Ps));return Qo(e,i,t,n,r)})),js=Xr((function(e,n){var r=ln(n,li(js));return Qo(e,a,t,n,r)})),zs=oi((function(e,n){return Qo(e,l,t,t,t,n)}));function Vs(t,e){return t===e||t!=t&&e!=e}var Hs=Jo(Ar),Ws=Jo((function(t,e){return t>=e})),qs=Fr(function(){return arguments}())?Fr:function(t){return ra(t)&&$t.call(t,"callee")&&!Jt.call(t,"callee")},Us=Dt.isArray,Ks=ye?Ye(ye):function(t){return ra(t)&&xr(t)==T};function Js(t){return null!=t&&ea(t.length)&&!Qs(t)}function Gs(t){return ra(t)&&Js(t)}var Ys=Re||yu,Xs=be?Ye(be):function(t){return ra(t)&&xr(t)==y};function Zs(t){if(!ra(t))return!1;var e=xr(t);return e==b||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!sa(t)}function Qs(t){if(!na(t))return!1;var e=xr(t);return e==_||e==D||"[object AsyncFunction]"==e||"[object Proxy]"==e}function ta(t){return"number"==typeof t&&t==ga(t)}function ea(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=p}function na(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function ra(t){return null!=t&&"object"==typeof t}var oa=_e?Ye(_e):function(t){return ra(t)&&gi(t)==w};function ia(t){return"number"==typeof t||ra(t)&&xr(t)==k}function sa(t){if(!ra(t)||xr(t)!=E)return!1;var e=Ut(t);if(null===e)return!0;var n=$t.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&It.call(n)==Pt}var aa=De?Ye(De):function(t){return ra(t)&&xr(t)==x},ua=we?Ye(we):function(t){return ra(t)&&gi(t)==A};function la(t){return"string"==typeof t||!Us(t)&&ra(t)&&xr(t)==S}function ca(t){return"symbol"==typeof t||ra(t)&&xr(t)==O}var pa=ke?Ye(ke):function(t){return ra(t)&&ea(t.length)&&!!ie[xr(t)]},da=Jo(Pr),fa=Jo((function(t,e){return t<=e}));function ha(t){if(!t)return[];if(Js(t))return la(t)?fn(t):To(t);if(Qt&&t[Qt])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[Qt]());var e=gi(t);return(e==w?an:e==A?cn:Va)(t)}function ma(t){return t?(t=ya(t))===c||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function ga(t){var e=ma(t),n=e%1;return e==e?n?e-n:e:0}function va(t){return t?ur(ga(t),0,f):0}function ya(t){if("number"==typeof t)return t;if(ca(t))return d;if(na(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=na(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Ge(t);var n=ht.test(t);return n||gt.test(t)?le(t.slice(2),n?2:8):ft.test(t)?d:+t}function ba(t){return Fo(t,Ia(t))}function _a(t){return null==t?"":co(t)}var Da=Io((function(t,e){if(Ci(e)||Js(e))Fo(e,Ma(e),t);else for(var n in e)$t.call(e,n)&&nr(t,n,e[n])})),wa=Io((function(t,e){Fo(e,Ia(e),t)})),ka=Io((function(t,e,n,r){Fo(e,Ia(e),t,r)})),Ea=Io((function(t,e,n,r){Fo(e,Ma(e),t,r)})),Ca=oi(ar),xa=Xr((function(e,n){e=xt(e);var r=-1,o=n.length,i=o>2?n[2]:t;for(i&&Di(n[0],n[1],i)&&(o=1);++r<o;)for(var s=n[r],a=Ia(s),u=-1,l=a.length;++u<l;){var c=a[u],p=e[c];(p===t||Vs(p,Ft[c])&&!$t.call(e,c))&&(e[c]=s[c])}return e})),Aa=Xr((function(e){return e.push(t,ei),Ee(Ba,t,e)}));function Sa(e,n,r){var o=null==e?t:Er(e,n);return o===t?r:o}function Oa(t,e){return null!=t&&vi(t,e,Or)}var Na=Ho((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Lt.call(e)),t[e]=n}),nu(iu)),Ta=Ho((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Lt.call(e)),$t.call(t,e)?t[e].push(n):t[e]=[n]}),ci),Fa=Xr(Tr);function Ma(t){return Js(t)?Xn(t):Rr(t)}function Ia(t){return Js(t)?Xn(t,!0):Lr(t)}var $a=Io((function(t,e,n){Hr(t,e,n)})),Ba=Io((function(t,e,n,r){Hr(t,e,n,r)})),Ra=oi((function(t,e){var n={};if(null==t)return n;var r=!1;e=Fe(e,(function(e){return e=Do(e,t),r||(r=e.length>1),e})),Fo(t,si(t),n),r&&(n=lr(n,7,ni));for(var o=e.length;o--;)fo(n,e[o]);return n})),La=oi((function(t,e){return null==t?{}:function(t,e){return Ur(t,e,(function(e,n){return Oa(t,n)}))}(t,e)}));function Pa(t,e){if(null==t)return{};var n=Fe(si(t),(function(t){return[t]}));return e=ci(e),Ur(t,n,(function(t,n){return e(t,n[0])}))}var ja=Zo(Ma),za=Zo(Ia);function Va(t){return null==t?[]:Xe(t,Ma(t))}var Ha=Lo((function(t,e,n){return e=e.toLowerCase(),t+(n?Wa(e):e)}));function Wa(t){return Za(_a(t).toLowerCase())}function qa(t){return(t=_a(t))&&t.replace(yt,nn).replace(Zt,"")}var Ua=Lo((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),Ka=Lo((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),Ja=Ro("toLowerCase"),Ga=Lo((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()})),Ya=Lo((function(t,e,n){return t+(n?" ":"")+Za(e)})),Xa=Lo((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),Za=Ro("toUpperCase");function Qa(e,n,r){return e=_a(e),(n=r?t:n)===t?function(t){return ne.test(t)}(e)?function(t){return t.match(te)||[]}(e):function(t){return t.match(ut)||[]}(e):e.match(n)||[]}var tu=Xr((function(e,n){try{return Ee(e,t,n)}catch(t){return Zs(t)?t:new kt(t)}})),eu=oi((function(t,e){return xe(e,(function(e){e=Pi(e),sr(t,e,Ts(t[e],t))})),t}));function nu(t){return function(){return t}}var ru=zo(),ou=zo(!0);function iu(t){return t}function su(t){return Br("function"==typeof t?t:lr(t,1))}var au=Xr((function(t,e){return function(n){return Tr(n,t,e)}})),uu=Xr((function(t,e){return function(n){return Tr(t,n,e)}}));function lu(t,e,n){var r=Ma(e),o=kr(e,r);null!=n||na(e)&&(o.length||!r.length)||(n=e,e=t,t=this,o=kr(e,Ma(e)));var i=!(na(n)&&"chain"in n&&!n.chain),s=Qs(t);return xe(o,(function(n){var r=e[n];t[n]=r,s&&(t.prototype[n]=function(){var e=this.__chain__;if(i||e){var n=t(this.__wrapped__),o=n.__actions__=To(this.__actions__);return o.push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,Me([this.value()],arguments))})})),t}function cu(){}var pu=qo(Fe),du=qo(Se),fu=qo(Be);function hu(t){return wi(t)?We(Pi(t)):function(t){return function(e){return Er(e,t)}}(t)}var mu=Ko(),gu=Ko(!0);function vu(){return[]}function yu(){return!1}var bu,_u=Wo((function(t,e){return t+e}),0),Du=Yo("ceil"),wu=Wo((function(t,e){return t/e}),1),ku=Yo("floor"),Eu=Wo((function(t,e){return t*e}),1),Cu=Yo("round"),xu=Wo((function(t,e){return t-e}),0);return zn.after=function(t,n){if("function"!=typeof n)throw new Ot(e);return t=ga(t),function(){if(--t<1)return n.apply(this,arguments)}},zn.ary=Os,zn.assign=Da,zn.assignIn=wa,zn.assignInWith=ka,zn.assignWith=Ea,zn.at=Ca,zn.before=Ns,zn.bind=Ts,zn.bindAll=eu,zn.bindKey=Fs,zn.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Us(t)?t:[t]},zn.chain=hs,zn.chunk=function(e,n,r){n=(r?Di(e,n,r):n===t)?1:bn(ga(n),0);var o=null==e?0:e.length;if(!o||n<1)return[];for(var i=0,s=0,a=Dt(he(o/n));i<o;)a[s++]=oo(e,i,i+=n);return a},zn.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,o=[];++e<n;){var i=t[e];i&&(o[r++]=i)}return o},zn.concat=function(){var t=arguments.length;if(!t)return[];for(var e=Dt(t-1),n=arguments[0],r=t;r--;)e[r-1]=arguments[r];return Me(Us(n)?To(n):[n],yr(e,1))},zn.cond=function(t){var n=null==t?0:t.length,r=ci();return t=n?Fe(t,(function(t){if("function"!=typeof t[1])throw new Ot(e);return[r(t[0]),t[1]]})):[],Xr((function(e){for(var r=-1;++r<n;){var o=t[r];if(Ee(o[0],this,e))return Ee(o[1],this,e)}}))},zn.conforms=function(t){return function(t){var e=Ma(t);return function(n){return cr(n,t,e)}}(lr(t,1))},zn.constant=nu,zn.countBy=vs,zn.create=function(t,e){var n=Vn(t);return null==e?n:ir(n,e)},zn.curry=function e(n,r,o){var i=Qo(n,8,t,t,t,t,t,r=o?t:r);return i.placeholder=e.placeholder,i},zn.curryRight=function e(n,r,i){var s=Qo(n,o,t,t,t,t,t,r=i?t:r);return s.placeholder=e.placeholder,s},zn.debounce=Ms,zn.defaults=xa,zn.defaultsDeep=Aa,zn.defer=Is,zn.delay=$s,zn.difference=Vi,zn.differenceBy=Hi,zn.differenceWith=Wi,zn.drop=function(e,n,r){var o=null==e?0:e.length;return o?oo(e,(n=r||n===t?1:ga(n))<0?0:n,o):[]},zn.dropRight=function(e,n,r){var o=null==e?0:e.length;return o?oo(e,0,(n=o-(n=r||n===t?1:ga(n)))<0?0:n):[]},zn.dropRightWhile=function(t,e){return t&&t.length?mo(t,ci(e,3),!0,!0):[]},zn.dropWhile=function(t,e){return t&&t.length?mo(t,ci(e,3),!0):[]},zn.fill=function(e,n,r,o){var i=null==e?0:e.length;return i?(r&&"number"!=typeof r&&Di(e,n,r)&&(r=0,o=i),function(e,n,r,o){var i=e.length;for((r=ga(r))<0&&(r=-r>i?0:i+r),(o=o===t||o>i?i:ga(o))<0&&(o+=i),o=r>o?0:va(o);r<o;)e[r++]=n;return e}(e,n,r,o)):[]},zn.filter=function(t,e){return(Us(t)?Oe:vr)(t,ci(e,3))},zn.flatMap=function(t,e){return yr(Cs(t,e),1)},zn.flatMapDeep=function(t,e){return yr(Cs(t,e),c)},zn.flatMapDepth=function(e,n,r){return r=r===t?1:ga(r),yr(Cs(e,n),r)},zn.flatten=Ki,zn.flattenDeep=function(t){return null!=t&&t.length?yr(t,c):[]},zn.flattenDepth=function(e,n){return null!=e&&e.length?yr(e,n=n===t?1:ga(n)):[]},zn.flip=function(t){return Qo(t,512)},zn.flow=ru,zn.flowRight=ou,zn.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var o=t[e];r[o[0]]=o[1]}return r},zn.functions=function(t){return null==t?[]:kr(t,Ma(t))},zn.functionsIn=function(t){return null==t?[]:kr(t,Ia(t))},zn.groupBy=ws,zn.initial=function(t){return null!=t&&t.length?oo(t,0,-1):[]},zn.intersection=Gi,zn.intersectionBy=Yi,zn.intersectionWith=Xi,zn.invert=Na,zn.invertBy=Ta,zn.invokeMap=ks,zn.iteratee=su,zn.keyBy=Es,zn.keys=Ma,zn.keysIn=Ia,zn.map=Cs,zn.mapKeys=function(t,e){var n={};return e=ci(e,3),Dr(t,(function(t,r,o){sr(n,e(t,r,o),t)})),n},zn.mapValues=function(t,e){var n={};return e=ci(e,3),Dr(t,(function(t,r,o){sr(n,r,e(t,r,o))})),n},zn.matches=function(t){return zr(lr(t,1))},zn.matchesProperty=function(t,e){return Vr(t,lr(e,1))},zn.memoize=Bs,zn.merge=$a,zn.mergeWith=Ba,zn.method=au,zn.methodOf=uu,zn.mixin=lu,zn.negate=Rs,zn.nthArg=function(t){return t=ga(t),Xr((function(e){return Wr(e,t)}))},zn.omit=Ra,zn.omitBy=function(t,e){return Pa(t,Rs(ci(e)))},zn.once=function(t){return Ns(2,t)},zn.orderBy=function(e,n,r,o){return null==e?[]:(Us(n)||(n=null==n?[]:[n]),Us(r=o?t:r)||(r=null==r?[]:[r]),qr(e,n,r))},zn.over=pu,zn.overArgs=Ls,zn.overEvery=du,zn.overSome=fu,zn.partial=Ps,zn.partialRight=js,zn.partition=xs,zn.pick=La,zn.pickBy=Pa,zn.property=hu,zn.propertyOf=function(e){return function(n){return null==e?t:Er(e,n)}},zn.pull=Qi,zn.pullAll=ts,zn.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?Kr(t,e,ci(n,2)):t},zn.pullAllWith=function(e,n,r){return e&&e.length&&n&&n.length?Kr(e,n,t,r):e},zn.pullAt=es,zn.range=mu,zn.rangeRight=gu,zn.rearg=zs,zn.reject=function(t,e){return(Us(t)?Oe:vr)(t,Rs(ci(e,3)))},zn.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,o=[],i=t.length;for(e=ci(e,3);++r<i;){var s=t[r];e(s,r,t)&&(n.push(s),o.push(r))}return Jr(t,o),n},zn.rest=function(n,r){if("function"!=typeof n)throw new Ot(e);return Xr(n,r=r===t?r:ga(r))},zn.reverse=ns,zn.sampleSize=function(e,n,r){return n=(r?Di(e,n,r):n===t)?1:ga(n),(Us(e)?Qn:Qr)(e,n)},zn.set=function(t,e,n){return null==t?t:to(t,e,n)},zn.setWith=function(e,n,r,o){return o="function"==typeof o?o:t,null==e?e:to(e,n,r,o)},zn.shuffle=function(t){return(Us(t)?tr:ro)(t)},zn.slice=function(e,n,r){var o=null==e?0:e.length;return o?(r&&"number"!=typeof r&&Di(e,n,r)?(n=0,r=o):(n=null==n?0:ga(n),r=r===t?o:ga(r)),oo(e,n,r)):[]},zn.sortBy=As,zn.sortedUniq=function(t){return t&&t.length?uo(t):[]},zn.sortedUniqBy=function(t,e){return t&&t.length?uo(t,ci(e,2)):[]},zn.split=function(e,n,r){return r&&"number"!=typeof r&&Di(e,n,r)&&(n=r=t),(r=r===t?f:r>>>0)?(e=_a(e))&&("string"==typeof n||null!=n&&!aa(n))&&!(n=co(n))&&sn(e)?ko(fn(e),0,r):e.split(n,r):[]},zn.spread=function(t,n){if("function"!=typeof t)throw new Ot(e);return n=null==n?0:bn(ga(n),0),Xr((function(e){var r=e[n],o=ko(e,0,n);return r&&Me(o,r),Ee(t,this,o)}))},zn.tail=function(t){var e=null==t?0:t.length;return e?oo(t,1,e):[]},zn.take=function(e,n,r){return e&&e.length?oo(e,0,(n=r||n===t?1:ga(n))<0?0:n):[]},zn.takeRight=function(e,n,r){var o=null==e?0:e.length;return o?oo(e,(n=o-(n=r||n===t?1:ga(n)))<0?0:n,o):[]},zn.takeRightWhile=function(t,e){return t&&t.length?mo(t,ci(e,3),!1,!0):[]},zn.takeWhile=function(t,e){return t&&t.length?mo(t,ci(e,3)):[]},zn.tap=function(t,e){return e(t),t},zn.throttle=function(t,n,r){var o=!0,i=!0;if("function"!=typeof t)throw new Ot(e);return na(r)&&(o="leading"in r?!!r.leading:o,i="trailing"in r?!!r.trailing:i),Ms(t,n,{leading:o,maxWait:n,trailing:i})},zn.thru=ms,zn.toArray=ha,zn.toPairs=ja,zn.toPairsIn=za,zn.toPath=function(t){return Us(t)?Fe(t,Pi):ca(t)?[t]:To(Li(_a(t)))},zn.toPlainObject=ba,zn.transform=function(t,e,n){var r=Us(t),o=r||Ys(t)||pa(t);if(e=ci(e,4),null==n){var i=t&&t.constructor;n=o?r?new i:[]:na(t)&&Qs(i)?Vn(Ut(t)):{}}return(o?xe:Dr)(t,(function(t,r,o){return e(n,t,r,o)})),n},zn.unary=function(t){return Os(t,1)},zn.union=rs,zn.unionBy=os,zn.unionWith=is,zn.uniq=function(t){return t&&t.length?po(t):[]},zn.uniqBy=function(t,e){return t&&t.length?po(t,ci(e,2)):[]},zn.uniqWith=function(e,n){return n="function"==typeof n?n:t,e&&e.length?po(e,t,n):[]},zn.unset=function(t,e){return null==t||fo(t,e)},zn.unzip=ss,zn.unzipWith=as,zn.update=function(t,e,n){return null==t?t:ho(t,e,_o(n))},zn.updateWith=function(e,n,r,o){return o="function"==typeof o?o:t,null==e?e:ho(e,n,_o(r),o)},zn.values=Va,zn.valuesIn=function(t){return null==t?[]:Xe(t,Ia(t))},zn.without=us,zn.words=Qa,zn.wrap=function(t,e){return Ps(_o(e),t)},zn.xor=ls,zn.xorBy=cs,zn.xorWith=ps,zn.zip=ds,zn.zipObject=function(t,e){return yo(t||[],e||[],nr)},zn.zipObjectDeep=function(t,e){return yo(t||[],e||[],to)},zn.zipWith=fs,zn.entries=ja,zn.entriesIn=za,zn.extend=wa,zn.extendWith=ka,lu(zn,zn),zn.add=_u,zn.attempt=tu,zn.camelCase=Ha,zn.capitalize=Wa,zn.ceil=Du,zn.clamp=function(e,n,r){return r===t&&(r=n,n=t),r!==t&&(r=(r=ya(r))==r?r:0),n!==t&&(n=(n=ya(n))==n?n:0),ur(ya(e),n,r)},zn.clone=function(t){return lr(t,4)},zn.cloneDeep=function(t){return lr(t,5)},zn.cloneDeepWith=function(e,n){return lr(e,5,n="function"==typeof n?n:t)},zn.cloneWith=function(e,n){return lr(e,4,n="function"==typeof n?n:t)},zn.conformsTo=function(t,e){return null==e||cr(t,e,Ma(e))},zn.deburr=qa,zn.defaultTo=function(t,e){return null==t||t!=t?e:t},zn.divide=wu,zn.endsWith=function(e,n,r){e=_a(e),n=co(n);var o=e.length,i=r=r===t?o:ur(ga(r),0,o);return(r-=n.length)>=0&&e.slice(r,i)==n},zn.eq=Vs,zn.escape=function(t){return(t=_a(t))&&J.test(t)?t.replace(U,rn):t},zn.escapeRegExp=function(t){return(t=_a(t))&&nt.test(t)?t.replace(et,"\\$&"):t},zn.every=function(e,n,r){var o=Us(e)?Se:mr;return r&&Di(e,n,r)&&(n=t),o(e,ci(n,3))},zn.find=ys,zn.findIndex=qi,zn.findKey=function(t,e){return Le(t,ci(e,3),Dr)},zn.findLast=bs,zn.findLastIndex=Ui,zn.findLastKey=function(t,e){return Le(t,ci(e,3),wr)},zn.floor=ku,zn.forEach=_s,zn.forEachRight=Ds,zn.forIn=function(t,e){return null==t?t:br(t,ci(e,3),Ia)},zn.forInRight=function(t,e){return null==t?t:_r(t,ci(e,3),Ia)},zn.forOwn=function(t,e){return t&&Dr(t,ci(e,3))},zn.forOwnRight=function(t,e){return t&&wr(t,ci(e,3))},zn.get=Sa,zn.gt=Hs,zn.gte=Ws,zn.has=function(t,e){return null!=t&&vi(t,e,Sr)},zn.hasIn=Oa,zn.head=Ji,zn.identity=iu,zn.includes=function(t,e,n,r){t=Js(t)?t:Va(t),n=n&&!r?ga(n):0;var o=t.length;return n<0&&(n=bn(o+n,0)),la(t)?n<=o&&t.indexOf(e,n)>-1:!!o&&je(t,e,n)>-1},zn.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=null==n?0:ga(n);return o<0&&(o=bn(r+o,0)),je(t,e,o)},zn.inRange=function(e,n,r){return n=ma(n),r===t?(r=n,n=0):r=ma(r),function(t,e,n){return t>=_n(e,n)&&t<bn(e,n)}(e=ya(e),n,r)},zn.invoke=Fa,zn.isArguments=qs,zn.isArray=Us,zn.isArrayBuffer=Ks,zn.isArrayLike=Js,zn.isArrayLikeObject=Gs,zn.isBoolean=function(t){return!0===t||!1===t||ra(t)&&xr(t)==v},zn.isBuffer=Ys,zn.isDate=Xs,zn.isElement=function(t){return ra(t)&&1===t.nodeType&&!sa(t)},zn.isEmpty=function(t){if(null==t)return!0;if(Js(t)&&(Us(t)||"string"==typeof t||"function"==typeof t.splice||Ys(t)||pa(t)||qs(t)))return!t.length;var e=gi(t);if(e==w||e==A)return!t.size;if(Ci(t))return!Rr(t).length;for(var n in t)if($t.call(t,n))return!1;return!0},zn.isEqual=function(t,e){return Mr(t,e)},zn.isEqualWith=function(e,n,r){var o=(r="function"==typeof r?r:t)?r(e,n):t;return o===t?Mr(e,n,t,r):!!o},zn.isError=Zs,zn.isFinite=function(t){return"number"==typeof t&&qe(t)},zn.isFunction=Qs,zn.isInteger=ta,zn.isLength=ea,zn.isMap=oa,zn.isMatch=function(t,e){return t===e||Ir(t,e,di(e))},zn.isMatchWith=function(e,n,r){return r="function"==typeof r?r:t,Ir(e,n,di(n),r)},zn.isNaN=function(t){return ia(t)&&t!=+t},zn.isNative=function(t){if(Ei(t))throw new kt("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return $r(t)},zn.isNil=function(t){return null==t},zn.isNull=function(t){return null===t},zn.isNumber=ia,zn.isObject=na,zn.isObjectLike=ra,zn.isPlainObject=sa,zn.isRegExp=aa,zn.isSafeInteger=function(t){return ta(t)&&t>=-9007199254740991&&t<=p},zn.isSet=ua,zn.isString=la,zn.isSymbol=ca,zn.isTypedArray=pa,zn.isUndefined=function(e){return e===t},zn.isWeakMap=function(t){return ra(t)&&gi(t)==N},zn.isWeakSet=function(t){return ra(t)&&"[object WeakSet]"==xr(t)},zn.join=function(t,e){return null==t?"":vn.call(t,e)},zn.kebabCase=Ua,zn.last=Zi,zn.lastIndexOf=function(e,n,r){var o=null==e?0:e.length;if(!o)return-1;var i=o;return r!==t&&(i=(i=ga(r))<0?bn(o+i,0):_n(i,o-1)),n==n?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(e,n,i):Pe(e,Ve,i,!0)},zn.lowerCase=Ka,zn.lowerFirst=Ja,zn.lt=da,zn.lte=fa,zn.max=function(e){return e&&e.length?gr(e,iu,Ar):t},zn.maxBy=function(e,n){return e&&e.length?gr(e,ci(n,2),Ar):t},zn.mean=function(t){return He(t,iu)},zn.meanBy=function(t,e){return He(t,ci(e,2))},zn.min=function(e){return e&&e.length?gr(e,iu,Pr):t},zn.minBy=function(e,n){return e&&e.length?gr(e,ci(n,2),Pr):t},zn.stubArray=vu,zn.stubFalse=yu,zn.stubObject=function(){return{}},zn.stubString=function(){return""},zn.stubTrue=function(){return!0},zn.multiply=Eu,zn.nth=function(e,n){return e&&e.length?Wr(e,ga(n)):t},zn.noConflict=function(){return de._===this&&(de._=jt),this},zn.noop=cu,zn.now=Ss,zn.pad=function(t,e,n){t=_a(t);var r=(e=ga(e))?dn(t):0;if(!e||r>=e)return t;var o=(e-r)/2;return Uo(ge(o),n)+t+Uo(he(o),n)},zn.padEnd=function(t,e,n){t=_a(t);var r=(e=ga(e))?dn(t):0;return e&&r<e?t+Uo(e-r,n):t},zn.padStart=function(t,e,n){t=_a(t);var r=(e=ga(e))?dn(t):0;return e&&r<e?Uo(e-r,n)+t:t},zn.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),wn(_a(t).replace(rt,""),e||0)},zn.random=function(e,n,r){if(r&&"boolean"!=typeof r&&Di(e,n,r)&&(n=r=t),r===t&&("boolean"==typeof n?(r=n,n=t):"boolean"==typeof e&&(r=e,e=t)),e===t&&n===t?(e=0,n=1):(e=ma(e),n===t?(n=e,e=0):n=ma(n)),e>n){var o=e;e=n,n=o}if(r||e%1||n%1){var i=kn();return _n(e+i*(n-e+ue("1e-"+((i+"").length-1))),n)}return Gr(e,n)},zn.reduce=function(t,e,n){var r=Us(t)?Ie:Ue,o=arguments.length<3;return r(t,ci(e,4),n,o,fr)},zn.reduceRight=function(t,e,n){var r=Us(t)?$e:Ue,o=arguments.length<3;return r(t,ci(e,4),n,o,hr)},zn.repeat=function(e,n,r){return n=(r?Di(e,n,r):n===t)?1:ga(n),Yr(_a(e),n)},zn.replace=function(){var t=arguments,e=_a(t[0]);return t.length<3?e:e.replace(t[1],t[2])},zn.result=function(e,n,r){var o=-1,i=(n=Do(n,e)).length;for(i||(i=1,e=t);++o<i;){var s=null==e?t:e[Pi(n[o])];s===t&&(o=i,s=r),e=Qs(s)?s.call(e):s}return e},zn.round=Cu,zn.runInContext=s,zn.sample=function(t){return(Us(t)?Zn:Zr)(t)},zn.size=function(t){if(null==t)return 0;if(Js(t))return la(t)?dn(t):t.length;var e=gi(t);return e==w||e==A?t.size:Rr(t).length},zn.snakeCase=Ga,zn.some=function(e,n,r){var o=Us(e)?Be:io;return r&&Di(e,n,r)&&(n=t),o(e,ci(n,3))},zn.sortedIndex=function(t,e){return so(t,e)},zn.sortedIndexBy=function(t,e,n){return ao(t,e,ci(n,2))},zn.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=so(t,e);if(r<n&&Vs(t[r],e))return r}return-1},zn.sortedLastIndex=function(t,e){return so(t,e,!0)},zn.sortedLastIndexBy=function(t,e,n){return ao(t,e,ci(n,2),!0)},zn.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var n=so(t,e,!0)-1;if(Vs(t[n],e))return n}return-1},zn.startCase=Ya,zn.startsWith=function(t,e,n){return t=_a(t),n=null==n?0:ur(ga(n),0,t.length),e=co(e),t.slice(n,n+e.length)==e},zn.subtract=xu,zn.sum=function(t){return t&&t.length?Ke(t,iu):0},zn.sumBy=function(t,e){return t&&t.length?Ke(t,ci(e,2)):0},zn.template=function(e,n,r){var o=zn.templateSettings;r&&Di(e,n,r)&&(n=t),e=_a(e),n=ka({},n,o,ti);var i,s,a=ka({},n.imports,o.imports,ti),u=Ma(a),l=Xe(a,u),c=0,p=n.interpolate||bt,d="__p += '",f=At((n.escape||bt).source+"|"+p.source+"|"+(p===X?pt:bt).source+"|"+(n.evaluate||bt).source+"|$","g"),h="//# sourceURL="+($t.call(n,"sourceURL")?(n.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++oe+"]")+"\n";e.replace(f,(function(t,n,r,o,a,u){return r||(r=o),d+=e.slice(c,u).replace(_t,on),n&&(i=!0,d+="' +\n__e("+n+") +\n'"),a&&(s=!0,d+="';\n"+a+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),c=u+t.length,t})),d+="';\n";var m=$t.call(n,"variable")&&n.variable;if(m){if(lt.test(m))throw new kt("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(s?d.replace(V,""):d).replace(H,"$1").replace(W,"$1;"),d="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var g=tu((function(){return Et(u,h+"return "+d).apply(t,l)}));if(g.source=d,Zs(g))throw g;return g},zn.times=function(t,e){if((t=ga(t))<1||t>p)return[];var n=f,r=_n(t,f);e=ci(e),t-=f;for(var o=Je(r,e);++n<t;)e(n);return o},zn.toFinite=ma,zn.toInteger=ga,zn.toLength=va,zn.toLower=function(t){return _a(t).toLowerCase()},zn.toNumber=ya,zn.toSafeInteger=function(t){return t?ur(ga(t),-9007199254740991,p):0===t?t:0},zn.toString=_a,zn.toUpper=function(t){return _a(t).toUpperCase()},zn.trim=function(e,n,r){if((e=_a(e))&&(r||n===t))return Ge(e);if(!e||!(n=co(n)))return e;var o=fn(e),i=fn(n);return ko(o,Qe(o,i),tn(o,i)+1).join("")},zn.trimEnd=function(e,n,r){if((e=_a(e))&&(r||n===t))return e.slice(0,hn(e)+1);if(!e||!(n=co(n)))return e;var o=fn(e);return ko(o,0,tn(o,fn(n))+1).join("")},zn.trimStart=function(e,n,r){if((e=_a(e))&&(r||n===t))return e.replace(rt,"");if(!e||!(n=co(n)))return e;var o=fn(e);return ko(o,Qe(o,fn(n))).join("")},zn.truncate=function(e,n){var r=30,o="...";if(na(n)){var i="separator"in n?n.separator:i;r="length"in n?ga(n.length):r,o="omission"in n?co(n.omission):o}var s=(e=_a(e)).length;if(sn(e)){var a=fn(e);s=a.length}if(r>=s)return e;var u=r-dn(o);if(u<1)return o;var l=a?ko(a,0,u).join(""):e.slice(0,u);if(i===t)return l+o;if(a&&(u+=l.length-u),aa(i)){if(e.slice(u).search(i)){var c,p=l;for(i.global||(i=At(i.source,_a(dt.exec(i))+"g")),i.lastIndex=0;c=i.exec(p);)var d=c.index;l=l.slice(0,d===t?u:d)}}else if(e.indexOf(co(i),u)!=u){var f=l.lastIndexOf(i);f>-1&&(l=l.slice(0,f))}return l+o},zn.unescape=function(t){return(t=_a(t))&&K.test(t)?t.replace(q,mn):t},zn.uniqueId=function(t){var e=++Bt;return _a(t)+e},zn.upperCase=Xa,zn.upperFirst=Za,zn.each=_s,zn.eachRight=Ds,zn.first=Ji,lu(zn,(bu={},Dr(zn,(function(t,e){$t.call(zn.prototype,e)||(bu[e]=t)})),bu),{chain:!1}),zn.VERSION="4.17.21",xe(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){zn[t].placeholder=zn})),xe(["drop","take"],(function(e,n){qn.prototype[e]=function(r){r=r===t?1:bn(ga(r),0);var o=this.__filtered__&&!n?new qn(this):this.clone();return o.__filtered__?o.__takeCount__=_n(r,o.__takeCount__):o.__views__.push({size:_n(r,f),type:e+(o.__dir__<0?"Right":"")}),o},qn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),xe(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;qn.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:ci(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),xe(["head","last"],(function(t,e){var n="take"+(e?"Right":"");qn.prototype[t]=function(){return this[n](1).value()[0]}})),xe(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");qn.prototype[t]=function(){return this.__filtered__?new qn(this):this[n](1)}})),qn.prototype.compact=function(){return this.filter(iu)},qn.prototype.find=function(t){return this.filter(t).head()},qn.prototype.findLast=function(t){return this.reverse().find(t)},qn.prototype.invokeMap=Xr((function(t,e){return"function"==typeof t?new qn(this):this.map((function(n){return Tr(n,t,e)}))})),qn.prototype.reject=function(t){return this.filter(Rs(ci(t)))},qn.prototype.slice=function(e,n){e=ga(e);var r=this;return r.__filtered__&&(e>0||n<0)?new qn(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),n!==t&&(r=(n=ga(n))<0?r.dropRight(-n):r.take(n-e)),r)},qn.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},qn.prototype.toArray=function(){return this.take(f)},Dr(qn.prototype,(function(e,n){var r=/^(?:filter|find|map|reject)|While$/.test(n),o=/^(?:head|last)$/.test(n),i=zn[o?"take"+("last"==n?"Right":""):n],s=o||/^find/.test(n);i&&(zn.prototype[n]=function(){var n=this.__wrapped__,a=o?[1]:arguments,u=n instanceof qn,l=a[0],c=u||Us(n),p=function(t){var e=i.apply(zn,Me([t],a));return o&&d?e[0]:e};c&&r&&"function"==typeof l&&1!=l.length&&(u=c=!1);var d=this.__chain__,f=!!this.__actions__.length,h=s&&!d,m=u&&!f;if(!s&&c){n=m?n:new qn(this);var g=e.apply(n,a);return g.__actions__.push({func:ms,args:[p],thisArg:t}),new Wn(g,d)}return h&&m?e.apply(this,a):(g=this.thru(p),h?o?g.value()[0]:g.value():g)})})),xe(["pop","push","shift","sort","splice","unshift"],(function(t){var e=Nt[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);zn.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var o=this.value();return e.apply(Us(o)?o:[],t)}return this[n]((function(n){return e.apply(Us(n)?n:[],t)}))}})),Dr(qn.prototype,(function(t,e){var n=zn[e];if(n){var r=n.name+"";$t.call(Fn,r)||(Fn[r]=[]),Fn[r].push({name:e,func:n})}})),Fn[Vo(t,2).name]=[{name:"wrapper",func:t}],qn.prototype.clone=function(){var t=new qn(this.__wrapped__);return t.__actions__=To(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=To(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=To(this.__views__),t},qn.prototype.reverse=function(){if(this.__filtered__){var t=new qn(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},qn.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Us(t),r=e<0,o=n?t.length:0,i=function(t,e,n){for(var r=-1,o=n.length;++r<o;){var i=n[r],s=i.size;switch(i.type){case"drop":t+=s;break;case"dropRight":e-=s;break;case"take":e=_n(e,t+s);break;case"takeRight":t=bn(t,e-s)}}return{start:t,end:e}}(0,o,this.__views__),s=i.start,a=i.end,u=a-s,l=r?a:s-1,c=this.__iteratees__,p=c.length,d=0,f=_n(u,this.__takeCount__);if(!n||!r&&o==u&&f==u)return go(t,this.__actions__);var h=[];t:for(;u--&&d<f;){for(var m=-1,g=t[l+=e];++m<p;){var v=c[m],y=v.iteratee,b=v.type,_=y(g);if(2==b)g=_;else if(!_){if(1==b)continue t;break t}}h[d++]=g}return h},zn.prototype.at=gs,zn.prototype.chain=function(){return hs(this)},zn.prototype.commit=function(){return new Wn(this.value(),this.__chain__)},zn.prototype.next=function(){this.__values__===t&&(this.__values__=ha(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?t:this.__values__[this.__index__++]}},zn.prototype.plant=function(e){for(var n,r=this;r instanceof Hn;){var o=zi(r);o.__index__=0,o.__values__=t,n?i.__wrapped__=o:n=o;var i=o;r=r.__wrapped__}return i.__wrapped__=e,n},zn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof qn){var n=e;return this.__actions__.length&&(n=new qn(this)),(n=n.reverse()).__actions__.push({func:ms,args:[ns],thisArg:t}),new Wn(n,this.__chain__)}return this.thru(ns)},zn.prototype.toJSON=zn.prototype.valueOf=zn.prototype.value=function(){return go(this.__wrapped__,this.__actions__)},zn.prototype.first=zn.prototype.head,Qt&&(zn.prototype[Qt]=function(){return this}),zn}();he?((he.exports=gn)._=gn,fe._=gn):de._=gn}.call(s);const nm=Hp.create({name:"node_processor",addCommands:()=>({setBlockAttributes:wh((({commands:t,state:e},n,r,o={})=>{const i=Pe(t.getBlockAttributes(n))??{},{doc:s,tr:a}=e,{from:u,to:l}=a.selection;s.nodesBetween(u,l,((t,e)=>{Hd.blocks.includes(t.type.name)&&a.setNodeAttribute(e,n,{...o,...i,...r})}))})),getBlockAttributes:wh((({editor:t},e,n)=>Ve((()=>{let r=Object.assign({},n||{});for(const n of Hd.blocks)Object.assign(r,t.getAttributes(n)?.[e]||{});return Object.keys(r).length?r:null})))),removeBlockAttributes:wh((({commands:t},e)=>{for(const n of Hd.blocks)t.resetAttributes(n,e)})),applyMark:wh((({state:t,commands:e},n,r,o={})=>{const{tr:i,doc:s,schema:a}=t,{$from:u,$to:l}=i.selection,c=Jp(qd.LINK,a),p=Jp(n,a);if(!(p.spec.group||"").includes(Ud.SETTINGS))return e.setMark(n,r);if(u.pos===l.pos)return;s.nodesBetween(u.pos,l.pos,((t,s)=>{if(t.type.name===Hd.LIST)return;const a=function(t,e){const n="string"==typeof e?e:e.name;return t.find((t=>t.type.name===n))}(t.marks,n),d=p.create({...a?.attrs||{},...r}),f=Gh(u,l,t,s),h=!c.isInSet(t.marks)&&function(t,e,n,r=Xh){const o=t.resolve(e).path.reverse();for(const t of o)if("number"!=typeof t)for(const e of t.marks)if(r(e,n))return!0;return!1}(i.doc,s,d,o.isAppliedToParent);if(h)return(t=>{if(!o.onAppliedToParent||!1===o.onAppliedToParent(t)){const{tr:n,node:r,position:o,mark:i}=t;e._removeNodeMark({tr:n,node:r,position:o,mark:i.type})}})({tr:i,node:t,position:s,mark:d});t.isText?i.addMark(f.from,f.to,d):function(t,e,n,r){const o=Yh(t,r),i=e.from-o<=r,s=e.to+o>=n.nodeSize+r;return i&&s}(i.doc,i.selection,t,s)&&i.addNodeMark(s,d)}))})),getMarks:wh((({editor:t},e)=>{const n=ze(t,"state");return Ve((()=>{const{selection:t,doc:r}=Pe(n),{from:o,to:i}=Pe(t),s=[];return r.nodesBetween(o,i,(t=>{for(const n of t.marks)n.type.name===e&&s.unshift(n.attrs)})),s}))})),getMark:wh((({commands:t},e)=>{const n=t.getMarks(e);return Ve((()=>Pe(n)[0]??null))})),hasMark:wh((({commands:t},e)=>{const n=t.getMark(e);return Ve((()=>!!Pe(n)))})),getCommonSettingMark:wh((({commands:t},e,n)=>{const r=t.getMark(e);return Ve((()=>Pe(r)?.value??Pe(n)))})),getDeviceSettingMark:wh((({commands:t},e,n)=>{const r=t.getMarks(e),o=t.getDevice();return Ve((()=>{for(const t of Pe(r)){const e=t[Pe(o)];if(e)return e}return Pe(n)}))})),removeAllMarks:wh((({state:t,commands:e})=>{const{tr:n,doc:r}=t,{from:o,to:i}=n.selection;r.nodesBetween(o,i,((t,r)=>{for(const o of t.marks)e._removeNodeMark({tr:n,node:t,position:r,mark:o})}))})),removeMarks:wh((({state:t,commands:e},n)=>{const{tr:r,doc:o}=t,{from:i,to:s}=r.selection;o.nodesBetween(i,s,((t,o)=>{const i=t.marks.filter((t=>n.includes(t.type.name)));for(const n of i)e._removeNodeMark({tr:r,node:t,position:o,mark:n})}))})),_removeNodeMark:wh(((t,{tr:e,node:n,position:r,mark:o})=>n.isText?e.removeMark(r,r+n.nodeSize,o):e.removeNodeMark(r,o)))})}),rm=Hp.create({name:"text_processor",addCommands:()=>({getSelectedText:wh((({state:t})=>{const{from:e,to:n}=t.selection;return t.doc.textBetween(e,n," ")})),transformText:wh((({state:t},e)=>{const{$from:n,$to:r}=t.tr.selection;n.pos!==r.pos&&t.doc.nodesBetween(n.pos,r.pos,((o,i)=>{if(!o.isText)return;const s=Gh(n,r,o,i),a=Math.max(0,n.pos-i),u=Math.max(0,r.pos-i),l=e({text:o.textContent.substring(a,u)}),c=t.schema.text(l,o.marks);t.tr.replaceWith(s.from,s.to,c)}))}))})}),om=Hp.create({name:"selection_processor",addStorage:()=>({selection:null}),addCommands(){return{storeSelection:wh((({state:t})=>{this.storage.selection=t.selection})),restoreSelection:wh((({commands:t})=>{this.storage.selection&&t.setTextSelection(this.storage.selection)})),expandSelection:wh((({tr:t,commands:e},n)=>{let r=t.selection.from,o=t.selection.to;t.doc.nodesBetween(r,o,((e,i,s)=>{if(n({node:e,parent:s})){const n=e.isText?0:Yh(t.doc,i);r=Math.min(r,i+n),o=Math.max(o,i+e.nodeSize-n)}})),e.setTextSelection({from:r,to:o})})),expandSelectionToBlock:wh((({commands:t})=>{t.expandSelection((({parent:t})=>t.type.name===Hd.DOCUMENT))}))}}}),im=gd.create({name:"doc",topNode:!0,content:"block+"}).extend({marks:Ud.SETTINGS,onCreate(){this.editor.view.dom.addEventListener("click",(t=>{t.target.closest("a")&&t.preventDefault()}))}}),sm=gd.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:t}){return["p",Cp(this.options.HTMLAttributes,t),0]},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),am=sm.extend({marks:Ud.ALL,addOptions:()=>({HTMLAttributes:{class:"zw-style"}})}),um=gd.create({name:"heading",addOptions:()=>({levels:[1,2,3,4,5,6],HTMLAttributes:{}}),content:"inline*",group:"block",defining:!0,addAttributes:()=>({level:{default:1,rendered:!1}}),parseHTML(){return this.options.levels.map((t=>({tag:`h${t}`,attrs:{level:t}})))},renderHTML({node:t,HTMLAttributes:e}){return[`h${this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0]}`,Cp(this.options.HTMLAttributes,e),0]},addCommands(){return{setHeading:t=>({commands:e})=>!!this.options.levels.includes(t.level)&&e.setNode(this.name,t),toggleHeading:t=>({commands:e})=>!!this.options.levels.includes(t.level)&&e.toggleNode(this.name,"paragraph",t)}},addKeyboardShortcuts(){return this.options.levels.reduce(((t,e)=>({...t,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})})),{})},addInputRules(){return this.options.levels.map((t=>function(t){return new Ip({find:t.find,handler:({state:e,range:n,match:r})=>{const o=e.doc.resolve(n.from),i=Ap(t.getAttributes,void 0,r)||{};if(!o.node(-1).canReplaceWith(o.index(-1),o.indexAfter(-1),t.type))return null;e.tr.delete(n.from,n.to).setBlockType(n.from,n.from,t.type,i)}})}({find:new RegExp(`^(#{1,${t}})\\s$`),type:this.type,getAttributes:{level:t}})))}}),lm=um.extend({marks:Ud.ALL,addOptions:()=>({levels:[1,2,3,4],HTMLAttributes:{class:"zw-style"}})}),cm=Hp.create({name:"prose_mirror_plugins",addProseMirrorPlugins(){return[Yd.create(this.editor),Xd.create(this.editor)]}}),pm=md.create({name:qd.FONT_FAMILY,group:Ud.SETTINGS,addOptions:()=>({fonts:[]}),addAttributes:()=>({value:{required:!0}}),addCommands(){return{applyFontFamily:wh((({commands:t},e)=>{t.applyMark(this.name,{value:e});const n=t.findFontByName(e);let r=Pe(t.getFontWeight());n.isWeightSupported(r)||(r=n.findClosestWeight(r),t.applyFontWeight(r)),n.isItalicSupported(r)||t.removeItalic()})),getFont:wh((({commands:t})=>{const e=Pe(this.options.defaultPreset),n=t.findFontByName(e.common.font_family),r=t.getFontFamily();return Ve((()=>t.findFontByName(Pe(r))||n))})),findFontByName:wh(((t,e)=>this.options.fonts.find((t=>t.name===e)))),getFontFamily:wh((({commands:t})=>t.getCommonSettingMark(this.name,t.getDefaultFontFamily()))),getDefaultFontFamily:wh((({commands:t})=>{const e=t.getPreset();return Ve((()=>Pe(e).common.font_family))}))}},parseHTML(){const t=t=>({value:t.replace(/["']/g,"")});return[{style:"--zw-font-family",getAttrs:t},{style:"font-family",getAttrs:t}]},renderHTML:({HTMLAttributes:t})=>Eh({font_family:t.value?`"${t.value}"`:null})}),dm=Hp.create({name:qd.STYLE_PRESET,addGlobalAttributes(){return[{types:[Hd.PARAGRAPH,Hd.HEADING],attributes:{preset:{isRequired:!1,default:{id:this.options.defaultId},parseHTML:t=>{const e=Pe(this.options.presets);if("LI"===t.parentElement.tagName)return null;for(const{id:n,node:r,fallbackClass:o}of e){if(o&&t.classList.contains(o))return{id:n};const e=this.options.styleRenderer.makePresetCssClass({id:n});if(t.matches(e))return{id:n};if(t.tagName===`H${r?.level}`)return{id:n}}return"P"===t.tagName?{id:this.options.defaultId}:null},renderHTML:t=>t.preset?{class:this.options.styleRenderer.makePresetHtmlClass(t.preset)}:null}}}]},addCommands(){function t(t,e){return t.find((t=>e===t.id))}function e(t,e){const n={};for(const r of Object.keys(t)){const o=t[r],i=e[r],s=!i||"inherit"===i.toLowerCase();n[r]=s?o:i}return n}return{getPresetList:wh((()=>Ve((()=>this.options.presets.filter((t=>!t.hidden)))))),getPreset:wh((({commands:n})=>{const r=n.getBlockAttributes("preset",{id:this.options.defaultId}),o=n.getPresetList(),i=n.isLink(),s=n.getLinkPreset();return Ve((()=>{const n=t(Pe(o),Pe(r).id);if(!Pe(i))return n;const a=Pe(s);return{id:n.id,common:e(n.common,a.common),mobile:e(n.mobile,a.mobile),tablet:e(n.tablet,a.tablet),desktop:e(n.desktop,a.desktop)}}))})),applyPreset:wh((({commands:e,chain:n},r)=>{const o=t(Pe(e.getPresetList()),r),i=o.node?.type??Hd.PARAGRAPH,s={preset:{id:r}};o.node&&(s.level=o.node.level);for(const t of qd.attributes)s[t]=Pe(e.getBlockAttributes(t));n().removeList().setNode(i,s).run()})),applyDefaultPreset:wh((({commands:t})=>{t.applyPreset(this.options.defaultId)})),removePreset:wh((({commands:t})=>{t.setNode(Hd.PARAGRAPH,{preset:null})})),getPresetCustomization:wh((({editor:t,commands:e})=>{const n=ze(t,"state");return Ve((()=>{const{selection:t,doc:r}=Pe(n),{from:o,to:i}=t;return e._getSettingCustomization(r,o,i)}))})),isSettingCustomized:wh((({commands:t},e)=>{const n=t.getPresetCustomization(),r=qd.attributes.includes(e)?"attributes":"marks";return Ve((()=>Pe(n)[r]?.includes(e)??!1))})),getContentCustomization:wh((({editor:t,commands:e})=>{const n=ze(t,"state");return Ve((()=>{const{doc:t}=Pe(n);return e._getSettingCustomization(t,0,t.content.size)}))})),_getSettingCustomization:wh(((t,e,n,r)=>{const o=new Set,i=new Set;return e.nodesBetween(n,r,(t=>{for(const[e,n]of Object.entries(t.attrs)){qd.attributes.includes(e)&&n&&i.add(e)}for(const{type:e}of t.marks)qd.marks.includes(e.name)&&o.add(e.name)})),{attributes:Array.from(i),marks:Array.from(o)}})),removePresetCustomization:wh((({chain:t})=>{t().storeSelection().expandSelectionToBlock().removeMarks(qd.marks).resetAttributes(Hd.PARAGRAPH,qd.attributes).resetAttributes(Hd.HEADING,qd.attributes).restoreSelection().run()})),removeFormat:wh((({chain:t})=>{t().storeSelection().expandSelectionToBlock().removeAllMarks().applyDefaultPreset().restoreSelection().run()}))}},onCreate(){this.options.styleRenderer.inject(Lm.head,this.options.presets)}}),fm=md.create({name:qd.FONT_WEIGHT,group:Ud.SETTINGS,addAttributes:()=>({value:{required:!0}}),addCommands(){return{applyFontWeight:wh((({commands:t},e)=>{t.applyMark(this.name,{value:e});Pe(t.getFont()).isItalicSupported(e)||t.removeItalic()})),toggleBold:wh((({commands:t})=>{const e=Pe(t.getFontWeight()),n=Pe(t.getFont()),r=Number(e)>=600?"400":"700",o=n.findClosestWeight(r);t.applyFontWeight(o)})),getFontWeight:wh((({commands:t})=>{const e=t.getCommonSettingMark(this.name,t.getDefaultFontWeight()),n=t.getFont();return Ve((()=>{const t=Pe(e),r=Pe(n);return r.isWeightSupported(t)?t:r.findClosestWeight(t)}))})),getDefaultFontWeight:wh((({commands:t})=>{const e=t.getPreset();return Ve((()=>Pe(e).common.font_weight))}))}},addKeyboardShortcuts:()=>({"Mod-b":Ch("toggleBold"),"Mod-B":Ch("toggleBold")}),parseHTML(){const t=t=>"bold"===t?{value:"700"}:!!Number(t)&&{value:t};return[{style:"--zw-font-weight",getAttrs:t},{style:"font-weight",getAttrs:t},{tag:"b",attrs:{value:"700"}},{tag:"strong",attrs:{value:"700"}}]},renderHTML:({HTMLAttributes:t})=>Eh({font_weight:t.value})}),hm=md.create({name:qd.FONT_SIZE,group:Ud.SETTINGS,addOptions:()=>({minSize:1,maxSize:100}),addAttributes:()=>({mobile:{default:null},tablet:{default:null},desktop:{default:null}}),addCommands(){return{getFontSize:wh((({commands:t})=>t.getDeviceSettingMark(this.name,t.getDefaultFontSize()))),getDefaultFontSize:wh((({commands:t})=>{const e=t.getDevice(),n=t.getPreset();return Ve((()=>Pe(n)[Pe(e)].font_size.replace("px","")))})),applyFontSize:wh((({commands:t},e)=>{const n=Pe(t.getDevice());t.applyMark(this.name,{[n]:e},{isAppliedToParent:(t,e)=>t.type.name===e.type.name&&t.attrs[n]===e.attrs[n],onAppliedToParent:({tr:t,node:e,position:r,mark:o})=>{const i={...o.attrs,[n]:null},s=!Object.values(i).some((t=>!!t));if(s)return!1;const a=o.type.create(i);e.isText?t.addMark(r,r+e.nodeSize,a):t.addNodeMark(r,a)}})})),increaseFontSize:wh((({commands:t})=>{const e=Number(Pe(t.getFontSize())),n=Math.min(e+1,this.options.maxSize);t.applyFontSize(String(n))})),decreaseFontSize:wh((({commands:t})=>{const e=Number(Pe(t.getFontSize())),n=Math.max(e-1,this.options.minSize);t.applyFontSize(String(n))}))}},addKeyboardShortcuts:()=>({"Mod-Shift-=":Ch("increaseFontSize"),"Mod-Shift--":Ch("decreaseFontSize")}),parseHTML(){const t=t=>{if(!t)return null;const e=Uh(t,Pe(this.options.wrapperRef));return String(e)};return[{tag:'[style*="--zw-font-size"]',getAttrs:({style:e})=>({mobile:t(e.getPropertyValue("--zw-font-size-mobile")),tablet:t(e.getPropertyValue("--zw-font-size-tablet")),desktop:t(e.getPropertyValue("--zw-font-size-desktop"))})},{style:"font-size",getAttrs:e=>{const n=t(e);return{desktop:n,tablet:n,mobile:null}}}]},renderHTML({HTMLAttributes:t}){const e=t=>t?`${t}px`:null;return Eh({font_size_mobile:e(t.mobile),font_size_tablet:e(t.tablet),font_size_desktop:e(t.desktop)})}}),mm=md.create({name:qd.FONT_COLOR,group:Ud.SETTINGS,addAttributes:()=>({value:{required:!0}}),addCommands(){return{getFontColor:wh((({commands:t})=>t.getCommonSettingMark(this.name,t.getDefaultFontColor()))),getDefaultFontColor:wh((({commands:t})=>{const e=t.getPreset();return Ve((()=>Pe(e).common.color))})),applyFontColor:wh((({commands:t},e)=>{t.applyMark(this.name,{value:e})}))}},parseHTML(){const t=t=>({value:qh(t)});return[{style:"--zw-font-color",getAttrs:t},{style:"color",getAttrs:t}]},renderHTML:({HTMLAttributes:t})=>Eh({font_color:t.value})}),gm=md.create({name:qd.BACKGROUND_COLOR,addAttributes:()=>({value:{required:!0}}),addCommands(){return{getBackgroundColor:wh((({commands:t})=>t.getCommonSettingMark(this.name,"rgba(255, 255, 255, 0%)"))),applyBackgroundColor:wh((({commands:t},e)=>{t.applyMark(this.name,{value:e})}))}},parseHTML(){const t=t=>({value:qh(t)});return[{style:"--zw-background-color",getAttrs:t},{style:"background-color",getAttrs:t}]},renderHTML:({HTMLAttributes:t})=>Eh({background_color:t.value})}),vm=Hp.create({name:"device_manager",addCommands(){return{getDevice:wh((()=>ze(this.options,"device")))}}}),ym=md.create({name:qd.FONT_STYLE,group:Ud.SETTINGS,addAttributes:()=>({italic:{required:!0}}),addCommands(){return{isItalic:wh((({commands:t})=>{const e=t.getMark(this.name),n=t.getDefaultFontStyle();return Ve((()=>Pe(e)?.italic??Pe(n).italic))})),isItalicAvailable:wh((({commands:t})=>{const e=t.getFont(),n=t.getFontWeight();return Ve((()=>{const t=Pe(e),r=Pe(n);return t.isItalicSupported(r)&&!t.isWeightItalicOnly(r)}))})),getDefaultFontStyle:wh((({commands:t})=>{const e=t.getPreset();return Ve((()=>({italic:"italic"===Pe(e).common.font_style})))})),toggleItalic:wh((({commands:t})=>{Pe(t.isItalicAvailable())&&(Pe(t.isItalic())?t.removeItalic():t.applyItalic())})),applyItalic:wh((({commands:t})=>{t.applyMark(this.name,{italic:!0})})),removeItalic:wh((({commands:t})=>{t.applyMark(this.name,{italic:!1})}))}},addKeyboardShortcuts:()=>({"Mod-i":Ch("toggleItalic"),"Mod-I":Ch("toggleItalic")}),parseHTML(){const t=t=>({italic:t.includes("italic")});return[{tag:"i",attrs:{italic:!0}},{style:"--zw-font-style",getAttrs:t},{style:"font-style",getAttrs:t}]},renderHTML:({HTMLAttributes:t})=>Eh({font_style:t.italic?"italic":"normal"})}),bm=md.create({name:qd.TEXT_DECORATION,priority:1e3,addAttributes:()=>({underline:{default:!1},strike_through:{default:!1}}),addCommands(){return{isUnderline:wh((({commands:t})=>{const e=t.getTextDecoration();return Ve((()=>Pe(e).underline))})),isStrikeThrough:wh((({commands:t})=>{const e=t.getTextDecoration();return Ve((()=>Pe(e).strike_through))})),getTextDecoration:wh((({commands:t})=>{const e=t.getMark(this.name),n=t.getDefaultTextDecoration();return Ve((()=>{const t=Pe(e)??{},r=Pe(n);return{underline:t.underline||r.underline,strike_through:t.strike_through||r.strike_through}}))})),isUnderlineCustomized:wh((({commands:t})=>{const e=t.isUnderline(),n=t.getDefaultTextDecoration();return Ve((()=>Pe(e)!==Pe(n).underline))})),getDefaultTextDecoration:wh((({commands:t})=>{const e=t.getPreset();return Ve((()=>{const{text_decoration:t}=Pe(e).common;return{underline:t.includes("underline"),strike_through:t.includes("line-through")}}))})),toggleUnderline:wh((({commands:t})=>{t.toggleTextDecoration("underline")})),toggleStrikeThrough:wh((({commands:t})=>{t.toggleTextDecoration("strike_through")})),toggleTextDecoration:wh((({commands:t},e,n=null)=>{const r=Pe(t.getTextDecoration()),o=n??!r[e];t.applyMark(this.name,{[e]:o})})),applyTextDecoration:wh((({commands:t},e)=>{t.toggleTextDecoration(e,!0)})),removeTextDecoration:wh((({commands:t},e)=>{t.toggleTextDecoration(e,!1)}))}},addKeyboardShortcuts:()=>({"Mod-u":Ch("toggleUnderline"),"Mod-U":Ch("toggleUnderline")}),parseHTML(){const t=t=>{const e=t.includes("underline"),n=t.includes("line-through");return!(!e&&!n)&&{underline:e,strike_through:n}};return[{style:"--zw-text-decoration",getAttrs:t},{style:"text-decoration-line",getAttrs:t},{style:"text-decoration",getAttrs:t},{tag:"s",attrs:{underline:!1,strike_through:!0}},{tag:"u",attrs:{underline:!0,strike_through:!1}}]},renderHTML({HTMLAttributes:t}){const e=[];return t.underline&&e.push("underline"),t.strike_through&&e.push("line-through"),e.length||e.push("none"),Eh({text_decoration:e.join(" ")})}}),_m=Hp.create({name:"case_style",addCommands:()=>({applyCaseStyle:wh((({commands:t},e)=>{switch(e){case zd.CAPITALIZE:return t.applyCapitalize();case zd.LOWERCASE:return t.applyLowerCase();case zd.UPPERCASE:return t.applyUpperCase()}})),applyCapitalize:wh((({commands:t})=>{t.transformText((({text:t})=>function(t){return t.toLowerCase().replace(/(?:^|\s)\S/g,(t=>t.toUpperCase()))}(t)))})),applyLowerCase:wh((({commands:t})=>{t.transformText((({text:t})=>t.toLowerCase()))})),applyUpperCase:wh((({commands:t})=>{t.transformText((({text:t})=>t.toUpperCase()))}))})}),Dm={mobile:null,tablet:null,desktop:null},wm=Hp.create({name:qd.ALIGNMENT,addGlobalAttributes:()=>[{types:[Hd.PARAGRAPH,Hd.HEADING],attributes:{[qd.ALIGNMENT]:{isRequired:!1,parseHTML({style:t}){const e=function(t){const e=Jh[t]||t;return Vd.values.includes(e)?e:null}(t.textAlign);if(e)return{desktop:e,tablet:e,mobile:e};const n=t.getPropertyValue("--zw-alignment-mobile")||null,r=t.getPropertyValue("--zw-alignment-tablet")||null,o=t.getPropertyValue("--zw-alignment-desktop")||null;return n||r||o?{desktop:o,tablet:r,mobile:n}:null},renderHTML:t=>t.alignment?kh({alignment_mobile:t.alignment.mobile,alignment_tablet:t.alignment.tablet,alignment_desktop:t.alignment.desktop}):null}}}],addCommands(){return{toggleAlignment:wh((({commands:t},e)=>{Pe(t.getAlignment())===e?t.removeAlignment():t.applyAlignment(e)})),applyAlignment:wh((({commands:t},e)=>{const n=Pe(t.getDevice());t.setBlockAttributes(this.name,{[n]:e},Dm)})),removeAlignment:wh((({commands:t})=>t.removeBlockAttributes(this.name))),getAlignment:wh((({commands:t})=>{const e=t.getBlockAttributes(this.name,Dm),n=t.getDevice(),r=t.getDefaultAlignment();return Ve((()=>Pe(e)?.[Pe(n)]??Pe(r)))})),getDefaultAlignment:wh((({commands:t})=>{const e=t.getDevice(),n=t.getPreset();return Ve((()=>Pe(n)[Pe(e)].alignment))}))}},addKeyboardShortcuts:()=>({"Mod-Shift-l":Ch("applyAlignment",Vd.LEFT),"Mod-Shift-e":Ch("applyAlignment",Vd.CENTER),"Mod-Shift-r":Ch("applyAlignment",Vd.RIGHT),"Mod-Shift-j":Ch("applyAlignment",Vd.JUSTIFY)})}),km={mobile:null,tablet:null,desktop:null},Em=Hp.create({name:qd.LINE_HEIGHT,addGlobalAttributes(){return[{types:[Hd.PARAGRAPH,Hd.HEADING],attributes:{[qd.LINE_HEIGHT]:{isRequired:!1,parseHTML:t=>{if(t.matches('[style*="--zw-line-height"]')){return{mobile:null,tablet:t.style.getPropertyValue("--zw-line-height-tablet")||null,desktop:t.style.getPropertyValue("--zw-line-height-desktop")||null}}const e=t.style.lineHeight;if(!e)return null;const n=Kh(e,t,Pe(this.options.wrapperRef));return n?{desktop:n,tablet:n,mobile:null}:null},renderHTML:t=>t.line_height?kh({line_height_mobile:t.line_height.mobile,line_height_tablet:t.line_height.tablet,line_height_desktop:t.line_height.desktop}):null}}}]},addCommands(){return{getLineHeight:wh((({commands:t})=>{const e=t.getBlockAttributes(this.name,km),n=t.getDevice(),r=t.getDefaultLineHeight();return Ve((()=>Pe(e)?.[Pe(n)]??Pe(r)))})),getDefaultLineHeight:wh((({commands:t})=>{const e=t.getDevice(),n=t.getPreset();return Ve((()=>Pe(n)[Pe(e)].line_height))})),applyLineHeight:wh((({commands:t},e)=>{const n=Pe(t.getDevice());t.setBlockAttributes(this.name,{[n]:e},km)}))}}}),Cm=gd.create({name:"listItem",addOptions:()=>({HTMLAttributes:{}}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:t}){return["li",Cp(this.options.HTMLAttributes,t),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}).extend({name:Hd.LIST_ITEM,marks:Ud.SETTINGS,addCommands(){const t=({selection:t})=>t.$cursor.before(t.$cursor.depth-1);return{listItemNewline:wh((({commands:e,tr:n})=>{const r=n.doc.nodeAt(t(n));if(!n.selection.$cursor.node().textContent)return!1;e.splitListItem(this.name);const o=t(n);for(const t of r.marks)n.addNodeMark(o,em(t));return!0}))}},addOptions:()=>({HTMLAttributes:{class:"zw-style"}}),addKeyboardShortcuts:()=>({Enter:t=>{const{state:e,commands:n}=t.editor,r=e.selection.$cursor?.path.some((t=>t.type?.name===Hd.LIST));if(r)return n.listItemNewline()}})}),xm=gd.create({name:Hd.LIST,content:`${Hd.LIST_ITEM}+`,group:"block list",marks:Ud.SETTINGS,addExtensions:()=>[Cm],addOptions:()=>({baseClass:"",presetClass:""}),addAttributes:()=>({bullet:{default:{type:Wd.DISC}}}),parseHTML(){const t={a:Wd.ROMAN,i:Wd.LATIN,1:Wd.DECIMAL},e=e=>{for(const n of Wd.values){const r=`.${this.options.baseClass}${n}`;if(e.matches(r))return n;if(t[e.type.toLowerCase()]===n)return n}};return[{tag:"ol",getAttrs:t=>({bullet:{type:e(t)||Wd.DECIMAL}})},{tag:"ul",getAttrs:t=>({bullet:{type:e(t)||Wd.DISC}})}]},renderHTML({HTMLAttributes:t}){const e=[this.options.baseClass+t.bullet.type,this.options.presetClass];return[Wd.ordered.includes(t.bullet.type)?"ol":"ul",{class:e.join(" ")},0]},addCommands:()=>({getListType:wh((({commands:t})=>{const e=t.getBlockAttributes("bullet",{type:null});return Ve((()=>Pe(e).type??null))})),applyList:wh((({commands:t,chain:e},n)=>{if(Pe(t.getListType())!==n)return e().applyDefaultPreset().toggleList(Hd.LIST,Hd.LIST_ITEM).setBlockAttributes("bullet",{type:n}).command((({commands:t,tr:e})=>t._bubbleListItemMarks(e))).run();t.removeList()})),_bubbleListItemMarks:wh(((t,e)=>{const{doc:n,selection:r}=e,o=r.$from.start(),i=r.$to.end();function s(t,e){if(qd.inlineMarks.includes(e.type))return!1;if(e.type.isInSet(t.marks))return!1;for(const n of t.content.content)if(n.childCount){if(!n.marks)return!1;if(!e.isInSet(n.marks))return!1}return!0}n.nodesBetween(o,i,((t,n)=>{if(t.type.name===Hd.LIST)return;if(t.type.name!==Hd.LIST_ITEM)return!1;const r=[];return t.forEach((o=>{for(const i of o.marks)i.isInSet(r)?e.removeNodeMark(n+1,i):s(t,i)&&(e.removeNodeMark(n+1,i),e.addNodeMark(n,em(i)),r.push(i))})),!1}))})),removeList:wh((({commands:t,state:e})=>{const{tr:n,doc:r,selection:o}=e,i=o.$from.start(),s=o.$to.end();r.nodesBetween(i,s,((t,e,r)=>{if([Hd.LIST,Hd.LIST_ITEM].includes(t.type.name))return;if(r.type.name!==Hd.LIST_ITEM)return!1;const o=r.marks.filter((function(e){return!e.type.isInSet(t.marks)}));for(const t of o)n.addNodeMark(e,em(t));return!1})),t.liftListItem(Hd.LIST_ITEM)}))}),addInputRules(){const t=(t,e)=>function(t){return new Ip({find:t.find,handler:({state:e,range:n,match:r})=>{const o=Ap(t.getAttributes,void 0,r)||{},i=e.tr.delete(n.from,n.to),s=i.doc.resolve(n.from).blockRange(),a=s&&bu(s,t.type,o);if(!a)return null;i.wrap(s,a);const u=i.doc.resolve(n.from-1).nodeBefore;u&&u.type===t.type&&wu(i.doc,n.from-1)&&(!t.joinPredicate||t.joinPredicate(r,u))&&i.join(n.from-1)}})}({find:e,type:this.type,getAttributes:{bullet:{type:t}},joinPredicate:(e,{attrs:n})=>n.bullet.type===t});return[t(Wd.DISC,/^\s*([-+*])\s$/),t(Wd.DECIMAL,/^(\d+)\.\s$/),t(Wd.LATIN,/^([ivx]{1,3})\.\s$/i),t(Wd.ROMAN,/^([a-z])\.\s$/i)]}});function Am(t){return new el({key:new ol("autolink"),appendTransaction:(e,n,r)=>{const o=e.some((t=>t.docChanged))&&!n.doc.eq(r.doc),i=e.some((t=>t.getMeta("preventAutolink")));if(!o||i)return;const{tr:s}=r,a=function(t,e){const n=new Lu(t);return e.forEach((t=>{t.steps.forEach((t=>{n.step(t)}))})),n}(n.doc,[...e]),{mapping:u}=a,l=function(t){const{mapping:e,steps:n}=t,r=[];return e.maps.forEach(((t,o)=>{const i=[];if(t.ranges.length)t.forEach(((t,e)=>{i.push({from:t,to:e})}));else{const{from:t,to:e}=n[o];if(void 0===t||void 0===e)return;i.push({from:t,to:e})}i.forEach((({from:t,to:n})=>{const i=e.slice(o).map(t,-1),s=e.slice(o).map(n),a=e.invert().map(i,-1),u=e.invert().map(s);r.push({oldRange:{from:a,to:u},newRange:{from:i,to:s}})}))})),ad(r)}(a);return l.forEach((({oldRange:e,newRange:o})=>{ud(e.from,e.to,n.doc).filter((e=>e.mark.type===t.type)).forEach((e=>{const o=ud(u.map(e.from),u.map(e.to),r.doc).filter((e=>e.mark.type===t.type));if(!o.length)return;const i=o[0],a=n.doc.textBetween(e.from,e.to,void 0," "),l=r.doc.textBetween(i.from,i.to,void 0," "),c=_h(a),p=_h(l);c&&!p&&s.removeMark(i.from,i.to,t.type)}));const i=function(t,e,n){const r=[];return t.nodesBetween(e.from,e.to,((t,e)=>{n(t)&&r.push({node:t,pos:e})})),r}(r.doc,o,(t=>t.isTextblock));let a,l;if(i.length>1?(a=i[0],l=r.doc.textBetween(a.pos,a.pos+a.node.nodeSize,void 0," ")):i.length&&r.doc.textBetween(o.from,o.to," "," ").endsWith(" ")&&(a=i[0],l=r.doc.textBetween(a.pos,o.to,void 0," ")),a&&l){const e=l.split(" ").filter((t=>""!==t));if(e.length<=0)return!1;const n=e[e.length-1],r=a.pos+l.lastIndexOf(n);if(!n)return!1;bh(n).filter((t=>t.isLink)).filter((e=>!t.validate||t.validate(e.value))).map((t=>({...t,from:r+t.start+1,to:r+t.end+1}))).forEach((e=>{s.addMark(e.from,e.to,t.type.create({href:e.href}))}))}})),s.steps.length?s:void 0}})}const Sm=md.create({name:"link",priority:1e3,keepOnSplit:!1,onCreate(){this.options.protocols.forEach(vh)},onDestroy(){gh.scanner=null,gh.parser=null,gh.pluginQueue=[],gh.customProtocols=[],gh.initialized=!1},inclusive(){return this.options.autolink},addOptions:()=>({openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},validate:void 0}),addAttributes(){return{href:{default:null},target:{default:this.options.HTMLAttributes.target},class:{default:this.options.HTMLAttributes.class}}},parseHTML:()=>[{tag:'a[href]:not([href *= "javascript:" i])'}],renderHTML({HTMLAttributes:t}){return["a",Cp(this.options.HTMLAttributes,t),0]},addCommands(){return{setLink:t=>({chain:e})=>e().setMark(this.name,t).setMeta("preventAutolink",!0).run(),toggleLink:t=>({chain:e})=>e().toggleMark(this.name,t,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run(),unsetLink:()=>({chain:t})=>t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[vd({find:t=>bh(t).filter((t=>!this.options.validate||this.options.validate(t.value))).filter((t=>t.isLink)).map((t=>({text:t.value,index:t.start,data:t}))),type:this.type,getAttributes:t=>{var e;return{href:null===(e=t.data)||void 0===e?void 0:e.href}}})]},addProseMirrorPlugins(){const t=[];var e;return this.options.autolink&&t.push(Am({type:this.type,validate:this.options.validate})),this.options.openOnClick&&t.push((e={type:this.type},new el({key:new ol("handleClickLink"),props:{handleClick:(t,n,r)=>{var o;const i=sd(t.state,e.type.name);return!(!(null===(o=r.target)||void 0===o?void 0:o.closest("a"))||!i.href||(window.open(i.href,i.target),0))}}}))),this.options.linkOnPaste&&t.push(function(t){return new el({key:new ol("handlePasteLink"),props:{handlePaste:(e,n,r)=>{const{state:o}=e,{selection:i}=o,{empty:s}=i;if(s)return!1;let a="";r.content.forEach((t=>{a+=t.textContent}));const u=bh(a).find((t=>t.isLink&&t.value===a));return!(!a||!u||(t.editor.commands.setMark(t.type,{href:u.href}),0))}}})}({editor:this.editor,type:this.type})),t}}),Om=Sm.extend({name:qd.LINK,addPasteRules:null,addOptions(){return{...this.parent?.(),openOnClick:!1,linkOnPaste:!1}},addAttributes(){return{href:{default:null,parseHTML:t=>{const e=t.getAttribute("href");return e.startsWith("#")?parseFloat(t.getAttribute("href").replace("#","")):e}},target:{default:Kd.SELF,parseHTML:t=>t.getAttribute("target")||Kd.SELF},destination:{default:Jd.URL,parseHTML:t=>{const e=t.getAttribute("href");if(!e.startsWith("#"))return Jd.URL;const n=e.replace("#","");return Pe(this.options.pageBlocks).find((t=>t.id===parseInt(n)))?Jd.BLOCK:Jd.URL}}}},addCommands(){return{applyLink:wh((({commands:t,chain:e},n)=>(t.setMeta("preventAutolink",!0),t.getSelectedText()?e().applyMark(this.name,n).expandSelectionToLink().command((({tr:t})=>(n.text&&t.insertText(n.text,t.selection.from,t.selection.to),!0))).run():t.insertContent(jm.text(n.text,[jm.mark(qd.LINK,n)]))))),expandSelectionToLink:wh((({commands:t})=>{t.expandSelection((({node:t})=>this.type.isInSet(t.marks)))})),isLink:wh((({commands:t})=>t.hasMark(this.name))),getLinkPreset:wh((()=>Ve((()=>this.options.preset))))}},addProseMirrorPlugins(){return[...this.parent(),Dh.create(this.editor)]},renderHTML({HTMLAttributes:t}){const e=t.destination===Jd.BLOCK?`#${t.href}`:t.href,n=Pe(this.options.basePresetClass)+Pe(this.options.preset).id;return["a",{href:e,target:t.target,class:`${n} zw-style`},0]}}),Nm=md.create({name:qd.SUPERSCRIPT,addCommands(){return{applySuperscript:wh((({commands:t})=>{t.setMark(this.name)})),removeSuperscript:wh((({commands:t})=>{t.unsetMark(this.name)})),toggleSuperscript:wh((({commands:t})=>{Pe(t.isSuperscript())?t.removeSuperscript():t.applySuperscript()})),isSuperscript:wh((({commands:t})=>{const e=t.getMark(this.name);return Ve((()=>!!Pe(e)))}))}},parseHTML:()=>[{tag:"sup"},{style:"vertical-align",getAttrs:t=>"super"===t&&null}],renderHTML:()=>["sup",{class:"zw-superscript"},0]}),Tm=Hp.create({name:qd.MARGIN,addGlobalAttributes:()=>[{types:[Hd.PARAGRAPH,Hd.HEADING],attributes:{[qd.MARGIN]:{isRequired:!1,parseHTML(t){const{margin:e,marginTop:n,marginRight:r,marginBottom:o,marginLeft:i}=t.style;if(![e,n,r,o,i].some((t=>!!t)))return null;if(e)return{value:e};return{value:[n||0,r||0,o||0,i||0].join(" ")}},renderHTML:t=>t.margin?kh({margin:t.margin.value}):null}}}]});function Fm(t){const e=e=>t.presetsRef.value.find((t=>t.id===e)),n=function(t){return Fe(t,!1),t}({default:null,link:null});return Ge(t.presetsRef,(()=>{n.default=e(t.defaultPresetId),n.link=e(t.linkPresetId)}),{immediate:!0}),[im,am,lm,yd,Pd,nm,rm,om,cm].concat([dm.configure({presets:t.presetsRef,defaultId:t.defaultPresetId,styleRenderer:new zm({baseClass:t.basePresetClass,makeVariable:t.makePresetVariable,linkPresetId:t.linkPresetId})}),xm.configure({baseClass:t.baseListClass,presetClass:t.basePresetClass+t.defaultPresetId}),vm.configure({device:t.deviceRef}),hm.configure({minSize:t.minFontSize,maxSize:t.maxFontSize,wrapperRef:t.wrapperRef}),pm.configure({fonts:t.fonts,defaultPreset:ze(n,"default")}),fm,mm,gm,ym,bm,_m,Nm,wm,Em.configure({wrapperRef:t.wrapperRef}),Om.configure({preset:ze(n,"link"),basePresetClass:t.basePresetClass,pageBlocks:t.pageBlocksRef}),Tm])}class Mm{_domParser=new DOMParser;types=window;parse(t){return this._domParser.parseFromString(t,"text/html")}}class Im{content;constructor({content:t}){this.content=t}normalize(){throw new Error("Implement abstract method")}}class $m extends Im{static BLOCK_NODE_NAMES=["P","H1","H2","H3","H4"];static ROOT_NODE_NAMES=$m.BLOCK_NODE_NAMES.concat("UL","OL");static BLOCK_STYLES=["text-align","line-height","margin","margin-top","margin-bottom","margin-left","margin-right"];_parser;constructor({content:t,parser:e}){super({content:t}),this._parser=e,this.dom=null}normalize(){return this.normalizeHTML(),this.normalizedHTML}normalizeHTML(){this.dom=this._parser.parse(this.content.replace(/(\r)?\n/g,"")),this._removeComments(),this._normalizeRootTags(),this._iterateNodes(this._normalizeBreakLines,(t=>"BR"===t.tagName)),this._iterateNodes(this._removeEmptyNodes,this._isBlockNode),this._iterateNodes(this._normalizeListItems,(t=>"LI"===t.tagName)),this._normalizeBlockTextDecoration(),this._normalizeBlockBackgroundColor()}get normalizedHTML(){return this.dom.body.innerHTML}get _NodeFilter(){return this._parser.types.NodeFilter}get _Node(){return this._parser.types.Node}_removeComments(){const t=this._createNodeIterator(this._NodeFilter.SHOW_COMMENT);this._runIterator(t,(t=>t.remove()))}_normalizeRootTags(){const t=Array.from(this.dom.body.childNodes),e=this.dom.createDocumentFragment();let n;for(const r of t)this._isRootNode(r)?(e.append(r),n=null):(n||(n=this.dom.createElement("p"),e.append(n)),n.append(r));this.dom.body.innerHTML="",this.dom.body.append(e)}_createNodeIterator(t,e){return this.dom.createNodeIterator(this.dom.body,t,e)}_iterateNodes(t,e=(()=>!0)){const n=t=>"BODY"!==t.tagName&&e.call(this,t),r=this._createNodeIterator(this._NodeFilter.SHOW_ELEMENT,{acceptNode:t=>n(t)?this._NodeFilter.FILTER_ACCEPT:this._NodeFilter.FILTER_REJECT});this._runIterator(r,t)}_runIterator(t,e){let n=t.nextNode();for(;n;)e.call(this,n),n=t.nextNode()}_removeEmptyNodes(t){t.innerHTML.trim()||t.remove()}_normalizeListItems(t){const e=this.dom.createDocumentFragment(),n=Array.from(t.childNodes);let r,o;const i=n=>{this._assignElementProperties(n,t,$m.BLOCK_STYLES),e.append(n)};this._assignElementProperties(t,t.parentElement,$m.BLOCK_STYLES);for(const t of n)if(this._isBlockNode(t))i(t),r=null,o=t;else if("BR"===t.tagName&&o&&"BR"!==o?.tagName)t.remove(),o=t;else if("BR"!==t.tagName)r||(r=this.dom.createElement("p"),i(r)),r.append(t),o=t;else{const e=this.dom.createElement("p");e.append(t),i(e),r=null,o=t}t.append(e),this._removeStyleProperties(t,$m.BLOCK_STYLES)}_isBlockNode(t){return $m.BLOCK_NODE_NAMES.includes(t.tagName)}_isRootNode(t){return $m.ROOT_NODE_NAMES.includes(t.tagName)}_assignElementProperties(t,e,n){for(const r of n){const n=e.style.getPropertyValue(r);n&&!t.style.getPropertyValue(r)&&t.style.setProperty(r,n)}}_removeStyleProperties(t,e){for(const n of e)t.style.removeProperty(n);0===t.style.length&&t.removeAttribute("style")}_normalizeBreakLines({parentElement:t}){if(!this._isBlockNode(t))return;if(!t.textContent)return;const e=this.dom.createDocumentFragment(),n=Array.from(t.childNodes),r=t.cloneNode(!0);r.innerHTML="";let o=r.cloneNode();const i=n=>{this._assignElementProperties(n,t,$m.BLOCK_STYLES),e.append(n)};for(const t of n)"BR"!==t.tagName?o.append(t):(i(o),o=r.cloneNode());e.append(o),t.replaceWith(e)}_normalizeBlockTextDecoration(){const t=this.dom.querySelectorAll('[style*="text-decoration"]:where(p, h1, h2, h3, h4, li)');for(const e of t)this._moveTextDecorationToChildren(e)}_moveTextDecorationToChildren(t){const e=this._parseTextDecoration(t);if(t.style.removeProperty("text-decoration-line"),t.style.removeProperty("text-decoration"),t.style.cssText||t.removeAttribute("style"),!e.none)for(const n of t.childNodes){const r=this._wrapTextNode(t,n),o=this._parseTextDecoration(r),i={underline:o.underline||e.underline,line_through:o.line_through||e.line_through};r.style.removeProperty("text-decoration-line"),r.style.removeProperty("text-decoration"),r.style.textDecoration=Object.entries(i).filter((([,t])=>t)).map((([t])=>t.replace("_","-"))).join(" ")}}_parseTextDecoration(t){const{textDecoration:e,textDecorationLine:n}=t.style,r=e||n||"";return{none:r.includes("none"),underline:r.includes("underline"),line_through:r.includes("line-through")}}_normalizeBlockBackgroundColor(){const t=this.dom.querySelectorAll('[style*="background-color"]:where(p, h1, h2, h3, h4, li)');for(const e of t)this._moveBackgroundColorToChildren(e)}_moveBackgroundColorToChildren(t){const e=t.style.backgroundColor;t.style.removeProperty("background-color"),t.style.cssText||t.removeAttribute("style");for(const n of t.childNodes){const r=this._wrapTextNode(t,n),o=r.style.backgroundColor||e;r.style.backgroundColor=o}}_wrapTextNode(t,e){if(e.nodeType!==this._Node.TEXT_NODE)return e;const n=this.dom.createElement("span");return n.append(e.cloneNode()),t.replaceChild(n,e),n}}class Bm extends Im{normalize(){return this._iterateNodes(this._bubbleMarks),this.content}_iterateNodes(t){this._iterateChildNodes(this.content,t)}_iterateChildNodes(t,e){for(const n of t.content)n.content&&this._iterateChildNodes(n,e),e.call(this,n)}_bubbleMarks(t){if(t.content&&t.type!==Hd.LIST)for(const e of t.content)if(!this._isLink(e)&&e.marks)for(const n of e.marks.slice())this._includesMark(t,n)?this._removeMark(e,n):this._canBubbleMark(t,n)&&(this._removeMark(e,n),this._addMark(t,n))}_canBubbleMark(t,e){if(qd.inlineMarks.includes(e.type))return!1;if(this._includesMarkType(t,e.type))return!1;for(const n of t.content)if(n.content||t.type!==Hd.LIST_ITEM){if(!n.marks)return!1;if(!this._includesMark(n,e))return!1}return!0}_includesMark(t,e){return t.marks?.some((t=>tm.isEqual(t,e)))??!1}_includesMarkType(t,e){return t.marks?.some((t=>t.type===e))??!1}_isLink(t){return t.type===Hd.TEXT&&this._includesMarkType(t,qd.LINK)}_removeMark(t,e){if(!t.marks)return;const n=this._findMarkIndexByType(t,e.type);n>=0&&t.marks.splice(n,1),t.marks.length||delete t.marks}_addMark(t,e){this._removeMark(t,e),t.marks??=[],t.marks.push(e)}_findMarkIndexByType(t,e){return t.marks?.findIndex((t=>t.type===e))??null}}class Rm{static build(t,e={}){return"string"==typeof t?this._buildHtml(t,e):this._buildJson(t)}static _buildHtml(t,e){return new $m({content:t,parser:e.parser||new Mm})}static _buildJson(t){return new Bm({content:t})}static normalize(t,e={}){return Rm.build(t,e).normalize()}}class Lm{static window=globalThis.window;static use(t){this.window=t}static get document(){return this.window.document}static get body(){return this.document.body}static get head(){return this.document.head}static getComputedStyle(t){return this.window.getComputedStyle(t)}}class Pm{static build({config:t,nodeDomParser:e}){const n=function(t){return Np(jp.resolve(t))}(Fm({fonts:t.fonts,minFontSize:0,maxFontSize:0,presetsRef:Le(t.presets),defaultPresetId:t.defaultPresetId,linkPresetId:t.linkPresetId,makePresetVariable:()=>"",basePresetClass:t.basePresetClass,baseListClass:t.baseListClass,deviceRef:Le(jd.DESKTOP),pageBlocksRef:Le([]),wrapperRef:Lm.document.createElement("p")}));return new Pm({schema:n,domParser:za.fromSchema(n),nodeDomParser:e})}_schema;_domParser;_nodeDomParser;constructor({schema:t,domParser:e,nodeDomParser:n}){this._schema=t,this._domParser=e,this._nodeDomParser=n}toJSON(t){const e=Rm.build(t,{parser:this._nodeDomParser});return e.normalizeHTML(),this._domParser.parse(e.dom.body).toJSON()}}class jm{static doc(t){return{type:Hd.DOCUMENT,content:t}}static list(t,e){return{type:Hd.LIST,attrs:{bullet:{type:t}},content:e.map((t=>t.type===Hd.LIST_ITEM?t:this.listItem([].concat(t))))}}static listItem(...t){const{attrs:e,content:n,marks:r}=this._normalizeTextBlockArgs(t);return{type:Hd.LIST_ITEM,...e?{attrs:e}:{},...r?{marks:r}:{},content:[].concat(n).map((t=>"string"==typeof t?this.paragraph(t):t))}}static heading(t,...e){const n=this._textBlock(e,this.text);return n.attrs??={},n.attrs.level=t,{type:Hd.HEADING,...n}}static paragraph(...t){return{type:Hd.PARAGRAPH,...this._textBlock(t,this.text)}}static _textBlock(t){const{attrs:e,content:n,marks:r}=this._normalizeTextBlockArgs(t);return{content:"string"==typeof n?[this.text(n)]:n,...e?{attrs:e}:{},...r?{marks:r}:{}}}static _normalizeTextBlockArgs(t){return 1===t.length?{attrs:null,marks:null,content:t[0]}:2===t.length?{attrs:t[0],marks:null,content:t[1]}:{attrs:t[0],marks:t[1],content:t[2]}}static text(t,e){return{type:Hd.TEXT,...e?{marks:e}:{},text:t}}static link(t,e,n=[]){return this.text(t,[this.mark(qd.LINK,e),...n])}static mark(t,e){return{type:t,attrs:e}}static populateAllDevices(t){return{mobile:t,tablet:t,desktop:t}}}class zm{_baseClass;_makeVariable;_linkPresetId;constructor({baseClass:t,makeVariable:e,linkPresetId:n}){this._baseClass=t,this._makeVariable=e,this._linkPresetId=n}inject(t,e){let n=t.querySelector("[data-zw-styles]");n||(n=Lm.document.createElement("style"),n.dataset.zwStyles="",n.innerHTML=this.render(e),t.append(n))}render(t){let e="";for(const n of t){const t=n.id===this._linkPresetId;e+=` ${this.makePresetCssClass(n)} {`;for(const r of jd.values)for(const o of Object.keys(n[r])){const i=this._makeVariable({device:r,preset:n,property:o}),s=this._makeInternalVariableName(o,r);if(e+=`${s}: var(${i}, inherit);`,t&&!qd.attributes.includes(o)){e+=`${s.replace("preset-","")}: var(${s});`}}e+="}"}return e}_makeInternalVariableName(t,e){return`--zw-preset-${"color"===t?"font-color":t.replace(/_/i,"-")}${e===jd.COMMON?"":`-${e}`}`}makePresetHtmlClass(t){return this._baseClass+t.id}makePresetCssClass(t){return this.makePresetHtmlClass(t).split(" ").map((t=>`.${t}`)).join("")}}class Vm{static _instance;static get instance(){return this._instance??=new Vm,this._instance}static query(t,e){return this.instance.query(t,e)}query(t,e){let n=null;return t.descendants((t=>!n&&(this.matchNode(t,e)?(n=t,!1):void 0))),n?e.getMark?this.getMark(n,e.getMark):n:null}matchNode(t,e){return(!e.typeName||e.typeName===t.type.name)&&!(e.mark&&!this.getMark(t,e.mark))}getMark(t,e){return t.marks.find((t=>this.matchMark(t,e)))||null}matchMark(t,e){return t.type.name===e.typeName}}class Hm{static createWindow(){return(new i.JSDOM).window}types;parse(t){const{window:e}=new i.JSDOM(t);return this.types=e,e.document}}class Wm{name;description;argument;options=[];doCommand(){throw new Error('Command "doCommand" is required')}install(t){if(!this.name)throw new Error('Command "name" is required');let e=t.command(this.name);if(this.description&&(e=e.description(this.description)),this.argument&&(e=e.argument(this.argument)),this.options.length)for(const t of this.options)e=e.option(t.flags,t.description,t.default);e.action(this.doCommand.bind(this))}output(t){console.log(t)}}const qm=new q,Um=[class extends Wm{name="to-json";description="migrate html to json";argument="<html...>";options=[{flags:"-c, --config <path>",description:"Generator config",default:n.resolve(__dirname,"../bin/zp.config.json")},{flags:"-f, --format <type>",description:"Set output format",default:"rb"}];doCommand(t,{config:e,format:r}){Lm.use(Hm.createWindow());const o=n.resolve(process.cwd(),e),i=Pm.build({config:require(o).editor,nodeDomParser:new Hm}),s=t.map((t=>i.toJSON(this._formatInputHtml(t)))),a=1===s.length?s[0]:s,u=this._stringifyContent(a);this.output("rb"===r?this._formatOutputRb(u):u)}_formatInputHtml(t){return t.replace(/\\(["'])/g,"$1").replace(/rgba\(\d{1,3}, ?\d{1,3}, ?\d{1,3}, (\d{1,2}%)\)/g,((t,e)=>t.replace(e,parseFloat(e)/100)))}_stringifyContent(t){return JSON.stringify(t,((t,e)=>null===e?void 0:e),2)}_formatOutputRb(t){return t.replace(/\\"/g,'"').replace(/font-family: ?'(.+)'/g,'font-family: "$1"').replace(/'/g,"\\'").replace(/^[\t ]*"[^:\n\r]+(?<!\\)":/gm,(t=>t.replace(/"/g,""))).replace(/: "(.+)"([,\n])/g,": '$1'$2")}},class extends Wm{name="version";description="display cli version";doCommand(){this.output("3.1.3-0")}}];for(const t of Um)(new t).install(qm);qm.parse();
15
+ Zh={get exports(){return tm},set exports(t){tm=t}},Qh=tm,function(){var t,e="Expected a function",n="__lodash_hash_undefined__",r="__lodash_placeholder__",o=16,i=32,a=64,u=128,l=256,c=1/0,p=9007199254740991,d=NaN,f=4294967295,h=[["ary",u],["bind",1],["bindKey",2],["curry",8],["curryRight",o],["flip",512],["partial",i],["partialRight",a],["rearg",l]],m="[object Arguments]",g="[object Array]",v="[object Boolean]",y="[object Date]",b="[object Error]",_="[object Function]",D="[object GeneratorFunction]",w="[object Map]",k="[object Number]",E="[object Object]",C="[object Promise]",x="[object RegExp]",A="[object Set]",S="[object String]",O="[object Symbol]",N="[object WeakMap]",T="[object ArrayBuffer]",F="[object DataView]",M="[object Float32Array]",I="[object Float64Array]",$="[object Int8Array]",B="[object Int16Array]",R="[object Int32Array]",L="[object Uint8Array]",P="[object Uint8ClampedArray]",j="[object Uint16Array]",z="[object Uint32Array]",V=/\b__p \+= '';/g,H=/\b(__p \+=) '' \+/g,W=/(__e\(.*?\)|\b__t\)) \+\n'';/g,q=/&(?:amp|lt|gt|quot|#39);/g,U=/[&<>"']/g,K=RegExp(q.source),J=RegExp(U.source),G=/<%-([\s\S]+?)%>/g,Y=/<%([\s\S]+?)%>/g,X=/<%=([\s\S]+?)%>/g,Z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Q=/^\w*$/,tt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,et=/[\\^$.*+?()[\]{}|]/g,nt=RegExp(et.source),rt=/^\s+/,ot=/\s/,it=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,st=/\{\n\/\* \[wrapped with (.+)\] \*/,at=/,? & /,ut=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,lt=/[()=,{}\[\]\/\s]/,ct=/\\(\\)?/g,pt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,dt=/\w*$/,ft=/^[-+]0x[0-9a-f]+$/i,ht=/^0b[01]+$/i,mt=/^\[object .+?Constructor\]$/,gt=/^0o[0-7]+$/i,vt=/^(?:0|[1-9]\d*)$/,yt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,bt=/($^)/,_t=/['\n\r\u2028\u2029\\]/g,Dt="\\ud800-\\udfff",wt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",kt="\\u2700-\\u27bf",Et="a-z\\xdf-\\xf6\\xf8-\\xff",Ct="A-Z\\xc0-\\xd6\\xd8-\\xde",xt="\\ufe0e\\ufe0f",At="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",St="['’]",Ot="["+Dt+"]",Nt="["+At+"]",Tt="["+wt+"]",Ft="\\d+",Mt="["+kt+"]",It="["+Et+"]",$t="[^"+Dt+At+Ft+kt+Et+Ct+"]",Bt="\\ud83c[\\udffb-\\udfff]",Rt="[^"+Dt+"]",Lt="(?:\\ud83c[\\udde6-\\uddff]){2}",Pt="[\\ud800-\\udbff][\\udc00-\\udfff]",jt="["+Ct+"]",zt="\\u200d",Vt="(?:"+It+"|"+$t+")",Ht="(?:"+jt+"|"+$t+")",Wt="(?:['’](?:d|ll|m|re|s|t|ve))?",qt="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ut="(?:"+Tt+"|"+Bt+")?",Kt="["+xt+"]?",Jt=Kt+Ut+"(?:"+zt+"(?:"+[Rt,Lt,Pt].join("|")+")"+Kt+Ut+")*",Gt="(?:"+[Mt,Lt,Pt].join("|")+")"+Jt,Yt="(?:"+[Rt+Tt+"?",Tt,Lt,Pt,Ot].join("|")+")",Xt=RegExp(St,"g"),Zt=RegExp(Tt,"g"),Qt=RegExp(Bt+"(?="+Bt+")|"+Yt+Jt,"g"),te=RegExp([jt+"?"+It+"+"+Wt+"(?="+[Nt,jt,"$"].join("|")+")",Ht+"+"+qt+"(?="+[Nt,jt+Vt,"$"].join("|")+")",jt+"?"+Vt+"+"+Wt,jt+"+"+qt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ft,Gt].join("|"),"g"),ee=RegExp("["+zt+Dt+wt+xt+"]"),ne=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,re=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],oe=-1,ie={};ie[M]=ie[I]=ie[$]=ie[B]=ie[R]=ie[L]=ie[P]=ie[j]=ie[z]=!0,ie[m]=ie[g]=ie[T]=ie[v]=ie[F]=ie[y]=ie[b]=ie[_]=ie[w]=ie[k]=ie[E]=ie[x]=ie[A]=ie[S]=ie[N]=!1;var se={};se[m]=se[g]=se[T]=se[F]=se[v]=se[y]=se[M]=se[I]=se[$]=se[B]=se[R]=se[w]=se[k]=se[E]=se[x]=se[A]=se[S]=se[O]=se[L]=se[P]=se[j]=se[z]=!0,se[b]=se[_]=se[N]=!1;var ae={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ue=parseFloat,le=parseInt,ce="object"==typeof s&&s&&s.Object===Object&&s,pe="object"==typeof self&&self&&self.Object===Object&&self,de=ce||pe||Function("return this")(),fe=Qh&&!Qh.nodeType&&Qh,he=fe&&Zh&&!Zh.nodeType&&Zh,me=he&&he.exports===fe,ge=me&&ce.process,ve=function(){try{var t=he&&he.require&&he.require("util").types;return t||ge&&ge.binding&&ge.binding("util")}catch(t){}}(),ye=ve&&ve.isArrayBuffer,be=ve&&ve.isDate,_e=ve&&ve.isMap,De=ve&&ve.isRegExp,we=ve&&ve.isSet,ke=ve&&ve.isTypedArray;function Ee(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Ce(t,e,n,r){for(var o=-1,i=null==t?0:t.length;++o<i;){var s=t[o];e(r,s,n(s),t)}return r}function xe(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function Ae(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function Se(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function Oe(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var s=t[n];e(s,n,t)&&(i[o++]=s)}return i}function Ne(t,e){return!(null==t||!t.length)&&je(t,e,0)>-1}function Te(t,e,n){for(var r=-1,o=null==t?0:t.length;++r<o;)if(n(e,t[r]))return!0;return!1}function Fe(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o}function Me(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}function Ie(t,e,n,r){var o=-1,i=null==t?0:t.length;for(r&&i&&(n=t[++o]);++o<i;)n=e(n,t[o],o,t);return n}function $e(t,e,n,r){var o=null==t?0:t.length;for(r&&o&&(n=t[--o]);o--;)n=e(n,t[o],o,t);return n}function Be(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var Re=We("length");function Le(t,e,n){var r;return n(t,(function(t,n,o){if(e(t,n,o))return r=n,!1})),r}function Pe(t,e,n,r){for(var o=t.length,i=n+(r?1:-1);r?i--:++i<o;)if(e(t[i],i,t))return i;return-1}function je(t,e,n){return e==e?function(t,e,n){for(var r=n-1,o=t.length;++r<o;)if(t[r]===e)return r;return-1}(t,e,n):Pe(t,Ve,n)}function ze(t,e,n,r){for(var o=n-1,i=t.length;++o<i;)if(r(t[o],e))return o;return-1}function Ve(t){return t!=t}function He(t,e){var n=null==t?0:t.length;return n?Ke(t,e)/n:d}function We(e){return function(n){return null==n?t:n[e]}}function qe(e){return function(n){return null==e?t:e[n]}}function Ue(t,e,n,r,o){return o(t,(function(t,o,i){n=r?(r=!1,t):e(n,t,o,i)})),n}function Ke(e,n){for(var r,o=-1,i=e.length;++o<i;){var s=n(e[o]);s!==t&&(r=r===t?s:r+s)}return r}function Je(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function Ge(t){return t?t.slice(0,hn(t)+1).replace(rt,""):t}function Ye(t){return function(e){return t(e)}}function Xe(t,e){return Fe(e,(function(e){return t[e]}))}function Ze(t,e){return t.has(e)}function Qe(t,e){for(var n=-1,r=t.length;++n<r&&je(e,t[n],0)>-1;);return n}function tn(t,e){for(var n=t.length;n--&&je(e,t[n],0)>-1;);return n}function en(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}var nn=qe({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),rn=qe({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function on(t){return"\\"+ae[t]}function sn(t){return ee.test(t)}function an(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function un(t,e){return function(n){return t(e(n))}}function ln(t,e){for(var n=-1,o=t.length,i=0,s=[];++n<o;){var a=t[n];a!==e&&a!==r||(t[n]=r,s[i++]=n)}return s}function cn(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}function pn(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}function dn(t){return sn(t)?function(t){for(var e=Qt.lastIndex=0;Qt.test(t);)++e;return e}(t):Re(t)}function fn(t){return sn(t)?function(t){return t.match(Qt)||[]}(t):function(t){return t.split("")}(t)}function hn(t){for(var e=t.length;e--&&ot.test(t.charAt(e)););return e}var mn=qe({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),gn=function s(ot){var Dt=(ot=null==ot?de:gn.defaults(de.Object(),ot,gn.pick(de,re))).Array,wt=ot.Date,kt=ot.Error,Et=ot.Function,Ct=ot.Math,xt=ot.Object,At=ot.RegExp,St=ot.String,Ot=ot.TypeError,Nt=Dt.prototype,Tt=Et.prototype,Ft=xt.prototype,Mt=ot["__core-js_shared__"],It=Tt.toString,$t=Ft.hasOwnProperty,Bt=0,Rt=function(){var t=/[^.]+$/.exec(Mt&&Mt.keys&&Mt.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Lt=Ft.toString,Pt=It.call(xt),jt=de._,zt=At("^"+It.call($t).replace(et,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Vt=me?ot.Buffer:t,Ht=ot.Symbol,Wt=ot.Uint8Array,qt=Vt?Vt.allocUnsafe:t,Ut=un(xt.getPrototypeOf,xt),Kt=xt.create,Jt=Ft.propertyIsEnumerable,Gt=Nt.splice,Yt=Ht?Ht.isConcatSpreadable:t,Qt=Ht?Ht.iterator:t,ee=Ht?Ht.toStringTag:t,ae=function(){try{var t=fi(xt,"defineProperty");return t({},"",{}),t}catch(t){}}(),ce=ot.clearTimeout!==de.clearTimeout&&ot.clearTimeout,pe=wt&&wt.now!==de.Date.now&&wt.now,fe=ot.setTimeout!==de.setTimeout&&ot.setTimeout,he=Ct.ceil,ge=Ct.floor,ve=xt.getOwnPropertySymbols,Re=Vt?Vt.isBuffer:t,qe=ot.isFinite,vn=Nt.join,yn=un(xt.keys,xt),bn=Ct.max,_n=Ct.min,Dn=wt.now,wn=ot.parseInt,kn=Ct.random,En=Nt.reverse,Cn=fi(ot,"DataView"),xn=fi(ot,"Map"),An=fi(ot,"Promise"),Sn=fi(ot,"Set"),On=fi(ot,"WeakMap"),Nn=fi(xt,"create"),Tn=On&&new On,Fn={},Mn=ji(Cn),In=ji(xn),$n=ji(An),Bn=ji(Sn),Rn=ji(On),Ln=Ht?Ht.prototype:t,Pn=Ln?Ln.valueOf:t,jn=Ln?Ln.toString:t;function zn(t){if(ra(t)&&!Us(t)&&!(t instanceof qn)){if(t instanceof Wn)return t;if($t.call(t,"__wrapped__"))return zi(t)}return new Wn(t)}var Vn=function(){function e(){}return function(n){if(!na(n))return{};if(Kt)return Kt(n);e.prototype=n;var r=new e;return e.prototype=t,r}}();function Hn(){}function Wn(e,n){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!n,this.__index__=0,this.__values__=t}function qn(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=f,this.__views__=[]}function Un(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Kn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Jn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Gn(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Jn;++e<n;)this.add(t[e])}function Yn(t){var e=this.__data__=new Kn(t);this.size=e.size}function Xn(t,e){var n=Us(t),r=!n&&qs(t),o=!n&&!r&&Ys(t),i=!n&&!r&&!o&&pa(t),s=n||r||o||i,a=s?Je(t.length,St):[],u=a.length;for(var l in t)!e&&!$t.call(t,l)||s&&("length"==l||o&&("offset"==l||"parent"==l)||i&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||_i(l,u))||a.push(l);return a}function Zn(e){var n=e.length;return n?e[Gr(0,n-1)]:t}function Qn(t,e){return Ri(To(t),ur(e,0,t.length))}function tr(t){return Ri(To(t))}function er(e,n,r){(r!==t&&!Vs(e[n],r)||r===t&&!(n in e))&&sr(e,n,r)}function nr(e,n,r){var o=e[n];$t.call(e,n)&&Vs(o,r)&&(r!==t||n in e)||sr(e,n,r)}function rr(t,e){for(var n=t.length;n--;)if(Vs(t[n][0],e))return n;return-1}function or(t,e,n,r){return fr(t,(function(t,o,i){e(r,t,n(t),i)})),r}function ir(t,e){return t&&Fo(e,Ma(e),t)}function sr(t,e,n){"__proto__"==e&&ae?ae(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function ar(e,n){for(var r=-1,o=n.length,i=Dt(o),s=null==e;++r<o;)i[r]=s?t:Sa(e,n[r]);return i}function ur(e,n,r){return e==e&&(r!==t&&(e=e<=r?e:r),n!==t&&(e=e>=n?e:n)),e}function lr(e,n,r,o,i,s){var a,u=1&n,l=2&n,c=4&n;if(r&&(a=i?r(e,o,i,s):r(e)),a!==t)return a;if(!na(e))return e;var p=Us(e);if(p){if(a=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&$t.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(e),!u)return To(e,a)}else{var d=gi(e),f=d==_||d==D;if(Ys(e))return Co(e,u);if(d==E||d==m||f&&!i){if(a=l||f?{}:yi(e),!u)return l?function(t,e){return Fo(t,mi(t),e)}(e,function(t,e){return t&&Fo(e,Ia(e),t)}(a,e)):function(t,e){return Fo(t,hi(t),e)}(e,ir(a,e))}else{if(!se[d])return i?e:{};a=function(t,e,n){var r,o=t.constructor;switch(e){case T:return xo(t);case v:case y:return new o(+t);case F:return function(t,e){var n=e?xo(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case M:case I:case $:case B:case R:case L:case P:case j:case z:return Ao(t,n);case w:return new o;case k:case S:return new o(t);case x:return function(t){var e=new t.constructor(t.source,dt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case A:return new o;case O:return r=t,Pn?xt(Pn.call(r)):{}}}(e,d,u)}}s||(s=new Yn);var h=s.get(e);if(h)return h;s.set(e,a),ua(e)?e.forEach((function(t){a.add(lr(t,n,r,t,e,s))})):oa(e)&&e.forEach((function(t,o){a.set(o,lr(t,n,r,o,e,s))}));var g=p?t:(c?l?si:ii:l?Ia:Ma)(e);return xe(g||e,(function(t,o){g&&(t=e[o=t]),nr(a,o,lr(t,n,r,o,e,s))})),a}function cr(e,n,r){var o=r.length;if(null==e)return!o;for(e=xt(e);o--;){var i=r[o],s=n[i],a=e[i];if(a===t&&!(i in e)||!s(a))return!1}return!0}function pr(n,r,o){if("function"!=typeof n)throw new Ot(e);return Mi((function(){n.apply(t,o)}),r)}function dr(t,e,n,r){var o=-1,i=Ne,s=!0,a=t.length,u=[],l=e.length;if(!a)return u;n&&(e=Fe(e,Ye(n))),r?(i=Te,s=!1):e.length>=200&&(i=Ze,s=!1,e=new Gn(e));t:for(;++o<a;){var c=t[o],p=null==n?c:n(c);if(c=r||0!==c?c:0,s&&p==p){for(var d=l;d--;)if(e[d]===p)continue t;u.push(c)}else i(e,p,r)||u.push(c)}return u}zn.templateSettings={escape:G,evaluate:Y,interpolate:X,variable:"",imports:{_:zn}},zn.prototype=Hn.prototype,zn.prototype.constructor=zn,Wn.prototype=Vn(Hn.prototype),Wn.prototype.constructor=Wn,qn.prototype=Vn(Hn.prototype),qn.prototype.constructor=qn,Un.prototype.clear=function(){this.__data__=Nn?Nn(null):{},this.size=0},Un.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Un.prototype.get=function(e){var r=this.__data__;if(Nn){var o=r[e];return o===n?t:o}return $t.call(r,e)?r[e]:t},Un.prototype.has=function(e){var n=this.__data__;return Nn?n[e]!==t:$t.call(n,e)},Un.prototype.set=function(e,r){var o=this.__data__;return this.size+=this.has(e)?0:1,o[e]=Nn&&r===t?n:r,this},Kn.prototype.clear=function(){this.__data__=[],this.size=0},Kn.prototype.delete=function(t){var e=this.__data__,n=rr(e,t);return!(n<0||(n==e.length-1?e.pop():Gt.call(e,n,1),--this.size,0))},Kn.prototype.get=function(e){var n=this.__data__,r=rr(n,e);return r<0?t:n[r][1]},Kn.prototype.has=function(t){return rr(this.__data__,t)>-1},Kn.prototype.set=function(t,e){var n=this.__data__,r=rr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},Jn.prototype.clear=function(){this.size=0,this.__data__={hash:new Un,map:new(xn||Kn),string:new Un}},Jn.prototype.delete=function(t){var e=pi(this,t).delete(t);return this.size-=e?1:0,e},Jn.prototype.get=function(t){return pi(this,t).get(t)},Jn.prototype.has=function(t){return pi(this,t).has(t)},Jn.prototype.set=function(t,e){var n=pi(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},Gn.prototype.add=Gn.prototype.push=function(t){return this.__data__.set(t,n),this},Gn.prototype.has=function(t){return this.__data__.has(t)},Yn.prototype.clear=function(){this.__data__=new Kn,this.size=0},Yn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Yn.prototype.get=function(t){return this.__data__.get(t)},Yn.prototype.has=function(t){return this.__data__.has(t)},Yn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Kn){var r=n.__data__;if(!xn||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Jn(r)}return n.set(t,e),this.size=n.size,this};var fr=$o(Dr),hr=$o(wr,!0);function mr(t,e){var n=!0;return fr(t,(function(t,r,o){return n=!!e(t,r,o)})),n}function gr(e,n,r){for(var o=-1,i=e.length;++o<i;){var s=e[o],a=n(s);if(null!=a&&(u===t?a==a&&!ca(a):r(a,u)))var u=a,l=s}return l}function vr(t,e){var n=[];return fr(t,(function(t,r,o){e(t,r,o)&&n.push(t)})),n}function yr(t,e,n,r,o){var i=-1,s=t.length;for(n||(n=bi),o||(o=[]);++i<s;){var a=t[i];e>0&&n(a)?e>1?yr(a,e-1,n,r,o):Me(o,a):r||(o[o.length]=a)}return o}var br=Bo(),_r=Bo(!0);function Dr(t,e){return t&&br(t,e,Ma)}function wr(t,e){return t&&_r(t,e,Ma)}function kr(t,e){return Oe(e,(function(e){return Qs(t[e])}))}function Er(e,n){for(var r=0,o=(n=Do(n,e)).length;null!=e&&r<o;)e=e[Pi(n[r++])];return r&&r==o?e:t}function Cr(t,e,n){var r=e(t);return Us(t)?r:Me(r,n(t))}function xr(e){return null==e?e===t?"[object Undefined]":"[object Null]":ee&&ee in xt(e)?function(e){var n=$t.call(e,ee),r=e[ee];try{e[ee]=t;var o=!0}catch(t){}var i=Lt.call(e);return o&&(n?e[ee]=r:delete e[ee]),i}(e):function(t){return Lt.call(t)}(e)}function Ar(t,e){return t>e}function Sr(t,e){return null!=t&&$t.call(t,e)}function Or(t,e){return null!=t&&e in xt(t)}function Nr(e,n,r){for(var o=r?Te:Ne,i=e[0].length,s=e.length,a=s,u=Dt(s),l=1/0,c=[];a--;){var p=e[a];a&&n&&(p=Fe(p,Ye(n))),l=_n(p.length,l),u[a]=!r&&(n||i>=120&&p.length>=120)?new Gn(a&&p):t}p=e[0];var d=-1,f=u[0];t:for(;++d<i&&c.length<l;){var h=p[d],m=n?n(h):h;if(h=r||0!==h?h:0,!(f?Ze(f,m):o(c,m,r))){for(a=s;--a;){var g=u[a];if(!(g?Ze(g,m):o(e[a],m,r)))continue t}f&&f.push(m),c.push(h)}}return c}function Tr(e,n,r){var o=null==(e=Oi(e,n=Do(n,e)))?e:e[Pi(Zi(n))];return null==o?t:Ee(o,e,r)}function Fr(t){return ra(t)&&xr(t)==m}function Mr(e,n,r,o,i){return e===n||(null==e||null==n||!ra(e)&&!ra(n)?e!=e&&n!=n:function(e,n,r,o,i,s){var a=Us(e),u=Us(n),l=a?g:gi(e),c=u?g:gi(n),p=(l=l==m?E:l)==E,d=(c=c==m?E:c)==E,f=l==c;if(f&&Ys(e)){if(!Ys(n))return!1;a=!0,p=!1}if(f&&!p)return s||(s=new Yn),a||pa(e)?ri(e,n,r,o,i,s):function(t,e,n,r,o,i,s){switch(n){case F:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case T:return!(t.byteLength!=e.byteLength||!i(new Wt(t),new Wt(e)));case v:case y:case k:return Vs(+t,+e);case b:return t.name==e.name&&t.message==e.message;case x:case S:return t==e+"";case w:var a=an;case A:var u=1&r;if(a||(a=cn),t.size!=e.size&&!u)return!1;var l=s.get(t);if(l)return l==e;r|=2,s.set(t,e);var c=ri(a(t),a(e),r,o,i,s);return s.delete(t),c;case O:if(Pn)return Pn.call(t)==Pn.call(e)}return!1}(e,n,l,r,o,i,s);if(!(1&r)){var h=p&&$t.call(e,"__wrapped__"),_=d&&$t.call(n,"__wrapped__");if(h||_){var D=h?e.value():e,C=_?n.value():n;return s||(s=new Yn),i(D,C,r,o,s)}}return!!f&&(s||(s=new Yn),function(e,n,r,o,i,s){var a=1&r,u=ii(e),l=u.length,c=ii(n),p=c.length;if(l!=p&&!a)return!1;for(var d=l;d--;){var f=u[d];if(!(a?f in n:$t.call(n,f)))return!1}var h=s.get(e),m=s.get(n);if(h&&m)return h==n&&m==e;var g=!0;s.set(e,n),s.set(n,e);for(var v=a;++d<l;){var y=e[f=u[d]],b=n[f];if(o)var _=a?o(b,y,f,n,e,s):o(y,b,f,e,n,s);if(!(_===t?y===b||i(y,b,r,o,s):_)){g=!1;break}v||(v="constructor"==f)}if(g&&!v){var D=e.constructor,w=n.constructor;D==w||!("constructor"in e)||!("constructor"in n)||"function"==typeof D&&D instanceof D&&"function"==typeof w&&w instanceof w||(g=!1)}return s.delete(e),s.delete(n),g}(e,n,r,o,i,s))}(e,n,r,o,Mr,i))}function Ir(e,n,r,o){var i=r.length,s=i,a=!o;if(null==e)return!s;for(e=xt(e);i--;){var u=r[i];if(a&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++i<s;){var l=(u=r[i])[0],c=e[l],p=u[1];if(a&&u[2]){if(c===t&&!(l in e))return!1}else{var d=new Yn;if(o)var f=o(c,p,l,e,n,d);if(!(f===t?Mr(p,c,3,o,d):f))return!1}}return!0}function $r(t){return!(!na(t)||(e=t,Rt&&Rt in e))&&(Qs(t)?zt:mt).test(ji(t));var e}function Br(t){return"function"==typeof t?t:null==t?iu:"object"==typeof t?Us(t)?Vr(t[0],t[1]):zr(t):hu(t)}function Rr(t){if(!Ci(t))return yn(t);var e=[];for(var n in xt(t))$t.call(t,n)&&"constructor"!=n&&e.push(n);return e}function Lr(t){if(!na(t))return function(t){var e=[];if(null!=t)for(var n in xt(t))e.push(n);return e}(t);var e=Ci(t),n=[];for(var r in t)("constructor"!=r||!e&&$t.call(t,r))&&n.push(r);return n}function Pr(t,e){return t<e}function jr(t,e){var n=-1,r=Js(t)?Dt(t.length):[];return fr(t,(function(t,o,i){r[++n]=e(t,o,i)})),r}function zr(t){var e=di(t);return 1==e.length&&e[0][2]?Ai(e[0][0],e[0][1]):function(n){return n===t||Ir(n,t,e)}}function Vr(e,n){return wi(e)&&xi(n)?Ai(Pi(e),n):function(r){var o=Sa(r,e);return o===t&&o===n?Oa(r,e):Mr(n,o,3)}}function Hr(e,n,r,o,i){e!==n&&br(n,(function(s,a){if(i||(i=new Yn),na(s))!function(e,n,r,o,i,s,a){var u=Ti(e,r),l=Ti(n,r),c=a.get(l);if(c)er(e,r,c);else{var p=s?s(u,l,r+"",e,n,a):t,d=p===t;if(d){var f=Us(l),h=!f&&Ys(l),m=!f&&!h&&pa(l);p=l,f||h||m?Us(u)?p=u:Gs(u)?p=To(u):h?(d=!1,p=Co(l,!0)):m?(d=!1,p=Ao(l,!0)):p=[]:sa(l)||qs(l)?(p=u,qs(u)?p=ba(u):na(u)&&!Qs(u)||(p=yi(l))):d=!1}d&&(a.set(l,p),i(p,l,o,s,a),a.delete(l)),er(e,r,p)}}(e,n,a,r,Hr,o,i);else{var u=o?o(Ti(e,a),s,a+"",e,n,i):t;u===t&&(u=s),er(e,a,u)}}),Ia)}function Wr(e,n){var r=e.length;if(r)return _i(n+=n<0?r:0,r)?e[n]:t}function qr(t,e,n){e=e.length?Fe(e,(function(t){return Us(t)?function(e){return Er(e,1===t.length?t[0]:t)}:t})):[iu];var r=-1;e=Fe(e,Ye(ci()));var o=jr(t,(function(t,n,o){var i=Fe(e,(function(e){return e(t)}));return{criteria:i,index:++r,value:t}}));return function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}(o,(function(t,e){return function(t,e,n){for(var r=-1,o=t.criteria,i=e.criteria,s=o.length,a=n.length;++r<s;){var u=So(o[r],i[r]);if(u)return r>=a?u:u*("desc"==n[r]?-1:1)}return t.index-e.index}(t,e,n)}))}function Ur(t,e,n){for(var r=-1,o=e.length,i={};++r<o;){var s=e[r],a=Er(t,s);n(a,s)&&to(i,Do(s,t),a)}return i}function Kr(t,e,n,r){var o=r?ze:je,i=-1,s=e.length,a=t;for(t===e&&(e=To(e)),n&&(a=Fe(t,Ye(n)));++i<s;)for(var u=0,l=e[i],c=n?n(l):l;(u=o(a,c,u,r))>-1;)a!==t&&Gt.call(a,u,1),Gt.call(t,u,1);return t}function Jr(t,e){for(var n=t?e.length:0,r=n-1;n--;){var o=e[n];if(n==r||o!==i){var i=o;_i(o)?Gt.call(t,o,1):fo(t,o)}}return t}function Gr(t,e){return t+ge(kn()*(e-t+1))}function Yr(t,e){var n="";if(!t||e<1||e>p)return n;do{e%2&&(n+=t),(e=ge(e/2))&&(t+=t)}while(e);return n}function Xr(t,e){return Ii(Si(t,e,iu),t+"")}function Zr(t){return Zn(Va(t))}function Qr(t,e){var n=Va(t);return Ri(n,ur(e,0,n.length))}function to(e,n,r,o){if(!na(e))return e;for(var i=-1,s=(n=Do(n,e)).length,a=s-1,u=e;null!=u&&++i<s;){var l=Pi(n[i]),c=r;if("__proto__"===l||"constructor"===l||"prototype"===l)return e;if(i!=a){var p=u[l];(c=o?o(p,l,u):t)===t&&(c=na(p)?p:_i(n[i+1])?[]:{})}nr(u,l,c),u=u[l]}return e}var eo=Tn?function(t,e){return Tn.set(t,e),t}:iu,no=ae?function(t,e){return ae(t,"toString",{configurable:!0,enumerable:!1,value:nu(e),writable:!0})}:iu;function ro(t){return Ri(Va(t))}function oo(t,e,n){var r=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var i=Dt(o);++r<o;)i[r]=t[r+e];return i}function io(t,e){var n;return fr(t,(function(t,r,o){return!(n=e(t,r,o))})),!!n}function so(t,e,n){var r=0,o=null==t?r:t.length;if("number"==typeof e&&e==e&&o<=2147483647){for(;r<o;){var i=r+o>>>1,s=t[i];null!==s&&!ca(s)&&(n?s<=e:s<e)?r=i+1:o=i}return o}return ao(t,e,iu,n)}function ao(e,n,r,o){var i=0,s=null==e?0:e.length;if(0===s)return 0;for(var a=(n=r(n))!=n,u=null===n,l=ca(n),c=n===t;i<s;){var p=ge((i+s)/2),d=r(e[p]),f=d!==t,h=null===d,m=d==d,g=ca(d);if(a)var v=o||m;else v=c?m&&(o||f):u?m&&f&&(o||!h):l?m&&f&&!h&&(o||!g):!h&&!g&&(o?d<=n:d<n);v?i=p+1:s=p}return _n(s,4294967294)}function uo(t,e){for(var n=-1,r=t.length,o=0,i=[];++n<r;){var s=t[n],a=e?e(s):s;if(!n||!Vs(a,u)){var u=a;i[o++]=0===s?0:s}}return i}function lo(t){return"number"==typeof t?t:ca(t)?d:+t}function co(t){if("string"==typeof t)return t;if(Us(t))return Fe(t,co)+"";if(ca(t))return jn?jn.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function po(t,e,n){var r=-1,o=Ne,i=t.length,s=!0,a=[],u=a;if(n)s=!1,o=Te;else if(i>=200){var l=e?null:Xo(t);if(l)return cn(l);s=!1,o=Ze,u=new Gn}else u=e?[]:a;t:for(;++r<i;){var c=t[r],p=e?e(c):c;if(c=n||0!==c?c:0,s&&p==p){for(var d=u.length;d--;)if(u[d]===p)continue t;e&&u.push(p),a.push(c)}else o(u,p,n)||(u!==a&&u.push(p),a.push(c))}return a}function fo(t,e){return null==(t=Oi(t,e=Do(e,t)))||delete t[Pi(Zi(e))]}function ho(t,e,n,r){return to(t,e,n(Er(t,e)),r)}function mo(t,e,n,r){for(var o=t.length,i=r?o:-1;(r?i--:++i<o)&&e(t[i],i,t););return n?oo(t,r?0:i,r?i+1:o):oo(t,r?i+1:0,r?o:i)}function go(t,e){var n=t;return n instanceof qn&&(n=n.value()),Ie(e,(function(t,e){return e.func.apply(e.thisArg,Me([t],e.args))}),n)}function vo(t,e,n){var r=t.length;if(r<2)return r?po(t[0]):[];for(var o=-1,i=Dt(r);++o<r;)for(var s=t[o],a=-1;++a<r;)a!=o&&(i[o]=dr(i[o]||s,t[a],e,n));return po(yr(i,1),e,n)}function yo(e,n,r){for(var o=-1,i=e.length,s=n.length,a={};++o<i;){var u=o<s?n[o]:t;r(a,e[o],u)}return a}function bo(t){return Gs(t)?t:[]}function _o(t){return"function"==typeof t?t:iu}function Do(t,e){return Us(t)?t:wi(t,e)?[t]:Li(_a(t))}var wo=Xr;function ko(e,n,r){var o=e.length;return r=r===t?o:r,!n&&r>=o?e:oo(e,n,r)}var Eo=ce||function(t){return de.clearTimeout(t)};function Co(t,e){if(e)return t.slice();var n=t.length,r=qt?qt(n):new t.constructor(n);return t.copy(r),r}function xo(t){var e=new t.constructor(t.byteLength);return new Wt(e).set(new Wt(t)),e}function Ao(t,e){var n=e?xo(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function So(e,n){if(e!==n){var r=e!==t,o=null===e,i=e==e,s=ca(e),a=n!==t,u=null===n,l=n==n,c=ca(n);if(!u&&!c&&!s&&e>n||s&&a&&l&&!u&&!c||o&&a&&l||!r&&l||!i)return 1;if(!o&&!s&&!c&&e<n||c&&r&&i&&!o&&!s||u&&r&&i||!a&&i||!l)return-1}return 0}function Oo(t,e,n,r){for(var o=-1,i=t.length,s=n.length,a=-1,u=e.length,l=bn(i-s,0),c=Dt(u+l),p=!r;++a<u;)c[a]=e[a];for(;++o<s;)(p||o<i)&&(c[n[o]]=t[o]);for(;l--;)c[a++]=t[o++];return c}function No(t,e,n,r){for(var o=-1,i=t.length,s=-1,a=n.length,u=-1,l=e.length,c=bn(i-a,0),p=Dt(c+l),d=!r;++o<c;)p[o]=t[o];for(var f=o;++u<l;)p[f+u]=e[u];for(;++s<a;)(d||o<i)&&(p[f+n[s]]=t[o++]);return p}function To(t,e){var n=-1,r=t.length;for(e||(e=Dt(r));++n<r;)e[n]=t[n];return e}function Fo(e,n,r,o){var i=!r;r||(r={});for(var s=-1,a=n.length;++s<a;){var u=n[s],l=o?o(r[u],e[u],u,r,e):t;l===t&&(l=e[u]),i?sr(r,u,l):nr(r,u,l)}return r}function Mo(t,e){return function(n,r){var o=Us(n)?Ce:or,i=e?e():{};return o(n,t,ci(r,2),i)}}function Io(e){return Xr((function(n,r){var o=-1,i=r.length,s=i>1?r[i-1]:t,a=i>2?r[2]:t;for(s=e.length>3&&"function"==typeof s?(i--,s):t,a&&Di(r[0],r[1],a)&&(s=i<3?t:s,i=1),n=xt(n);++o<i;){var u=r[o];u&&e(n,u,o,s)}return n}))}function $o(t,e){return function(n,r){if(null==n)return n;if(!Js(n))return t(n,r);for(var o=n.length,i=e?o:-1,s=xt(n);(e?i--:++i<o)&&!1!==r(s[i],i,s););return n}}function Bo(t){return function(e,n,r){for(var o=-1,i=xt(e),s=r(e),a=s.length;a--;){var u=s[t?a:++o];if(!1===n(i[u],u,i))break}return e}}function Ro(e){return function(n){var r=sn(n=_a(n))?fn(n):t,o=r?r[0]:n.charAt(0),i=r?ko(r,1).join(""):n.slice(1);return o[e]()+i}}function Lo(t){return function(e){return Ie(Qa(qa(e).replace(Xt,"")),t,"")}}function Po(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=Vn(t.prototype),r=t.apply(n,e);return na(r)?r:n}}function jo(e){return function(n,r,o){var i=xt(n);if(!Js(n)){var s=ci(r,3);n=Ma(n),r=function(t){return s(i[t],t,i)}}var a=e(n,r,o);return a>-1?i[s?n[a]:a]:t}}function zo(n){return oi((function(r){var o=r.length,i=o,s=Wn.prototype.thru;for(n&&r.reverse();i--;){var a=r[i];if("function"!=typeof a)throw new Ot(e);if(s&&!u&&"wrapper"==ui(a))var u=new Wn([],!0)}for(i=u?i:o;++i<o;){var l=ui(a=r[i]),c="wrapper"==l?ai(a):t;u=c&&ki(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?u[ui(c[0])].apply(u,c[3]):1==a.length&&ki(a)?u[l]():u.thru(a)}return function(){var t=arguments,e=t[0];if(u&&1==t.length&&Us(e))return u.plant(e).value();for(var n=0,i=o?r[n].apply(this,t):e;++n<o;)i=r[n].call(this,i);return i}}))}function Vo(e,n,r,o,i,s,a,l,c,p){var d=n&u,f=1&n,h=2&n,m=24&n,g=512&n,v=h?t:Po(e);return function t(){for(var u=arguments.length,y=Dt(u),b=u;b--;)y[b]=arguments[b];if(m)var _=li(t),D=en(y,_);if(o&&(y=Oo(y,o,i,m)),s&&(y=No(y,s,a,m)),u-=D,m&&u<p){var w=ln(y,_);return Go(e,n,Vo,t.placeholder,r,y,w,l,c,p-u)}var k=f?r:this,E=h?k[e]:e;return u=y.length,l?y=Ni(y,l):g&&u>1&&y.reverse(),d&&c<u&&(y.length=c),this&&this!==de&&this instanceof t&&(E=v||Po(E)),E.apply(k,y)}}function Ho(t,e){return function(n,r){return function(t,e,n,r){return Dr(t,(function(t,o,i){e(r,n(t),o,i)})),r}(n,t,e(r),{})}}function Wo(e,n){return function(r,o){var i;if(r===t&&o===t)return n;if(r!==t&&(i=r),o!==t){if(i===t)return o;"string"==typeof r||"string"==typeof o?(r=co(r),o=co(o)):(r=lo(r),o=lo(o)),i=e(r,o)}return i}}function qo(t){return oi((function(e){return e=Fe(e,Ye(ci())),Xr((function(n){var r=this;return t(e,(function(t){return Ee(t,r,n)}))}))}))}function Uo(e,n){var r=(n=n===t?" ":co(n)).length;if(r<2)return r?Yr(n,e):n;var o=Yr(n,he(e/dn(n)));return sn(n)?ko(fn(o),0,e).join(""):o.slice(0,e)}function Ko(e){return function(n,r,o){return o&&"number"!=typeof o&&Di(n,r,o)&&(r=o=t),n=ma(n),r===t?(r=n,n=0):r=ma(r),function(t,e,n,r){for(var o=-1,i=bn(he((e-t)/(n||1)),0),s=Dt(i);i--;)s[r?i:++o]=t,t+=n;return s}(n,r,o=o===t?n<r?1:-1:ma(o),e)}}function Jo(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=ya(e),n=ya(n)),t(e,n)}}function Go(e,n,r,o,s,u,l,c,p,d){var f=8&n;n|=f?i:a,4&(n&=~(f?a:i))||(n&=-4);var h=[e,n,s,f?u:t,f?l:t,f?t:u,f?t:l,c,p,d],m=r.apply(t,h);return ki(e)&&Fi(m,h),m.placeholder=o,$i(m,e,n)}function Yo(t){var e=Ct[t];return function(t,n){if(t=ya(t),(n=null==n?0:_n(ga(n),292))&&qe(t)){var r=(_a(t)+"e").split("e");return+((r=(_a(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var Xo=Sn&&1/cn(new Sn([,-0]))[1]==c?function(t){return new Sn(t)}:cu;function Zo(t){return function(e){var n=gi(e);return n==w?an(e):n==A?pn(e):function(t,e){return Fe(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function Qo(n,s,c,p,d,f,h,m){var g=2&s;if(!g&&"function"!=typeof n)throw new Ot(e);var v=p?p.length:0;if(v||(s&=-97,p=d=t),h=h===t?h:bn(ga(h),0),m=m===t?m:ga(m),v-=d?d.length:0,s&a){var y=p,b=d;p=d=t}var _=g?t:ai(n),D=[n,s,c,p,d,y,b,f,h,m];if(_&&function(t,e){var n=t[1],o=e[1],i=n|o,s=i<131,a=o==u&&8==n||o==u&&n==l&&t[7].length<=e[8]||384==o&&e[7].length<=e[8]&&8==n;if(!s&&!a)return t;1&o&&(t[2]=e[2],i|=1&n?0:4);var c=e[3];if(c){var p=t[3];t[3]=p?Oo(p,c,e[4]):c,t[4]=p?ln(t[3],r):e[4]}(c=e[5])&&(p=t[5],t[5]=p?No(p,c,e[6]):c,t[6]=p?ln(t[5],r):e[6]),(c=e[7])&&(t[7]=c),o&u&&(t[8]=null==t[8]?e[8]:_n(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i}(D,_),n=D[0],s=D[1],c=D[2],p=D[3],d=D[4],!(m=D[9]=D[9]===t?g?0:n.length:bn(D[9]-v,0))&&24&s&&(s&=-25),s&&1!=s)w=8==s||s==o?function(e,n,r){var o=Po(e);return function i(){for(var s=arguments.length,a=Dt(s),u=s,l=li(i);u--;)a[u]=arguments[u];var c=s<3&&a[0]!==l&&a[s-1]!==l?[]:ln(a,l);return(s-=c.length)<r?Go(e,n,Vo,i.placeholder,t,a,c,t,t,r-s):Ee(this&&this!==de&&this instanceof i?o:e,this,a)}}(n,s,m):s!=i&&33!=s||d.length?Vo.apply(t,D):function(t,e,n,r){var o=1&e,i=Po(t);return function e(){for(var s=-1,a=arguments.length,u=-1,l=r.length,c=Dt(l+a),p=this&&this!==de&&this instanceof e?i:t;++u<l;)c[u]=r[u];for(;a--;)c[u++]=arguments[++s];return Ee(p,o?n:this,c)}}(n,s,c,p);else var w=function(t,e,n){var r=1&e,o=Po(t);return function e(){return(this&&this!==de&&this instanceof e?o:t).apply(r?n:this,arguments)}}(n,s,c);return $i((_?eo:Fi)(w,D),n,s)}function ti(e,n,r,o){return e===t||Vs(e,Ft[r])&&!$t.call(o,r)?n:e}function ei(e,n,r,o,i,s){return na(e)&&na(n)&&(s.set(n,e),Hr(e,n,t,ei,s),s.delete(n)),e}function ni(e){return sa(e)?t:e}function ri(e,n,r,o,i,s){var a=1&r,u=e.length,l=n.length;if(u!=l&&!(a&&l>u))return!1;var c=s.get(e),p=s.get(n);if(c&&p)return c==n&&p==e;var d=-1,f=!0,h=2&r?new Gn:t;for(s.set(e,n),s.set(n,e);++d<u;){var m=e[d],g=n[d];if(o)var v=a?o(g,m,d,n,e,s):o(m,g,d,e,n,s);if(v!==t){if(v)continue;f=!1;break}if(h){if(!Be(n,(function(t,e){if(!Ze(h,e)&&(m===t||i(m,t,r,o,s)))return h.push(e)}))){f=!1;break}}else if(m!==g&&!i(m,g,r,o,s)){f=!1;break}}return s.delete(e),s.delete(n),f}function oi(e){return Ii(Si(e,t,Ki),e+"")}function ii(t){return Cr(t,Ma,hi)}function si(t){return Cr(t,Ia,mi)}var ai=Tn?function(t){return Tn.get(t)}:cu;function ui(t){for(var e=t.name+"",n=Fn[e],r=$t.call(Fn,e)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==t)return o.name}return e}function li(t){return($t.call(zn,"placeholder")?zn:t).placeholder}function ci(){var t=zn.iteratee||su;return t=t===su?Br:t,arguments.length?t(arguments[0],arguments[1]):t}function pi(t,e){var n,r,o=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof e?"string":"hash"]:o.map}function di(t){for(var e=Ma(t),n=e.length;n--;){var r=e[n],o=t[r];e[n]=[r,o,xi(o)]}return e}function fi(e,n){var r=function(e,n){return null==e?t:e[n]}(e,n);return $r(r)?r:t}var hi=ve?function(t){return null==t?[]:(t=xt(t),Oe(ve(t),(function(e){return Jt.call(t,e)})))}:vu,mi=ve?function(t){for(var e=[];t;)Me(e,hi(t)),t=Ut(t);return e}:vu,gi=xr;function vi(t,e,n){for(var r=-1,o=(e=Do(e,t)).length,i=!1;++r<o;){var s=Pi(e[r]);if(!(i=null!=t&&n(t,s)))break;t=t[s]}return i||++r!=o?i:!!(o=null==t?0:t.length)&&ea(o)&&_i(s,o)&&(Us(t)||qs(t))}function yi(t){return"function"!=typeof t.constructor||Ci(t)?{}:Vn(Ut(t))}function bi(t){return Us(t)||qs(t)||!!(Yt&&t&&t[Yt])}function _i(t,e){var n=typeof t;return!!(e=null==e?p:e)&&("number"==n||"symbol"!=n&&vt.test(t))&&t>-1&&t%1==0&&t<e}function Di(t,e,n){if(!na(n))return!1;var r=typeof e;return!!("number"==r?Js(n)&&_i(e,n.length):"string"==r&&e in n)&&Vs(n[e],t)}function wi(t,e){if(Us(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!ca(t))||Q.test(t)||!Z.test(t)||null!=e&&t in xt(e)}function ki(t){var e=ui(t),n=zn[e];if("function"!=typeof n||!(e in qn.prototype))return!1;if(t===n)return!0;var r=ai(n);return!!r&&t===r[0]}(Cn&&gi(new Cn(new ArrayBuffer(1)))!=F||xn&&gi(new xn)!=w||An&&gi(An.resolve())!=C||Sn&&gi(new Sn)!=A||On&&gi(new On)!=N)&&(gi=function(e){var n=xr(e),r=n==E?e.constructor:t,o=r?ji(r):"";if(o)switch(o){case Mn:return F;case In:return w;case $n:return C;case Bn:return A;case Rn:return N}return n});var Ei=Mt?Qs:yu;function Ci(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Ft)}function xi(t){return t==t&&!na(t)}function Ai(e,n){return function(r){return null!=r&&r[e]===n&&(n!==t||e in xt(r))}}function Si(e,n,r){return n=bn(n===t?e.length-1:n,0),function(){for(var t=arguments,o=-1,i=bn(t.length-n,0),s=Dt(i);++o<i;)s[o]=t[n+o];o=-1;for(var a=Dt(n+1);++o<n;)a[o]=t[o];return a[n]=r(s),Ee(e,this,a)}}function Oi(t,e){return e.length<2?t:Er(t,oo(e,0,-1))}function Ni(e,n){for(var r=e.length,o=_n(n.length,r),i=To(e);o--;){var s=n[o];e[o]=_i(s,r)?i[s]:t}return e}function Ti(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var Fi=Bi(eo),Mi=fe||function(t,e){return de.setTimeout(t,e)},Ii=Bi(no);function $i(t,e,n){var r=e+"";return Ii(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(it,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return xe(h,(function(n){var r="_."+n[0];e&n[1]&&!Ne(t,r)&&t.push(r)})),t.sort()}(function(t){var e=t.match(st);return e?e[1].split(at):[]}(r),n)))}function Bi(e){var n=0,r=0;return function(){var o=Dn(),i=16-(o-r);if(r=o,i>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(t,arguments)}}function Ri(e,n){var r=-1,o=e.length,i=o-1;for(n=n===t?o:n;++r<n;){var s=Gr(r,i),a=e[s];e[s]=e[r],e[r]=a}return e.length=n,e}var Li=function(t){var e=Bs(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(tt,(function(t,n,r,o){e.push(r?o.replace(ct,"$1"):n||t)})),e}));function Pi(t){if("string"==typeof t||ca(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function ji(t){if(null!=t){try{return It.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function zi(t){if(t instanceof qn)return t.clone();var e=new Wn(t.__wrapped__,t.__chain__);return e.__actions__=To(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Vi=Xr((function(t,e){return Gs(t)?dr(t,yr(e,1,Gs,!0)):[]})),Hi=Xr((function(e,n){var r=Zi(n);return Gs(r)&&(r=t),Gs(e)?dr(e,yr(n,1,Gs,!0),ci(r,2)):[]})),Wi=Xr((function(e,n){var r=Zi(n);return Gs(r)&&(r=t),Gs(e)?dr(e,yr(n,1,Gs,!0),t,r):[]}));function qi(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=null==n?0:ga(n);return o<0&&(o=bn(r+o,0)),Pe(t,ci(e,3),o)}function Ui(e,n,r){var o=null==e?0:e.length;if(!o)return-1;var i=o-1;return r!==t&&(i=ga(r),i=r<0?bn(o+i,0):_n(i,o-1)),Pe(e,ci(n,3),i,!0)}function Ki(t){return null!=t&&t.length?yr(t,1):[]}function Ji(e){return e&&e.length?e[0]:t}var Gi=Xr((function(t){var e=Fe(t,bo);return e.length&&e[0]===t[0]?Nr(e):[]})),Yi=Xr((function(e){var n=Zi(e),r=Fe(e,bo);return n===Zi(r)?n=t:r.pop(),r.length&&r[0]===e[0]?Nr(r,ci(n,2)):[]})),Xi=Xr((function(e){var n=Zi(e),r=Fe(e,bo);return(n="function"==typeof n?n:t)&&r.pop(),r.length&&r[0]===e[0]?Nr(r,t,n):[]}));function Zi(e){var n=null==e?0:e.length;return n?e[n-1]:t}var Qi=Xr(ts);function ts(t,e){return t&&t.length&&e&&e.length?Kr(t,e):t}var es=oi((function(t,e){var n=null==t?0:t.length,r=ar(t,e);return Jr(t,Fe(e,(function(t){return _i(t,n)?+t:t})).sort(So)),r}));function ns(t){return null==t?t:En.call(t)}var rs=Xr((function(t){return po(yr(t,1,Gs,!0))})),os=Xr((function(e){var n=Zi(e);return Gs(n)&&(n=t),po(yr(e,1,Gs,!0),ci(n,2))})),is=Xr((function(e){var n=Zi(e);return n="function"==typeof n?n:t,po(yr(e,1,Gs,!0),t,n)}));function ss(t){if(!t||!t.length)return[];var e=0;return t=Oe(t,(function(t){if(Gs(t))return e=bn(t.length,e),!0})),Je(e,(function(e){return Fe(t,We(e))}))}function as(e,n){if(!e||!e.length)return[];var r=ss(e);return null==n?r:Fe(r,(function(e){return Ee(n,t,e)}))}var us=Xr((function(t,e){return Gs(t)?dr(t,e):[]})),ls=Xr((function(t){return vo(Oe(t,Gs))})),cs=Xr((function(e){var n=Zi(e);return Gs(n)&&(n=t),vo(Oe(e,Gs),ci(n,2))})),ps=Xr((function(e){var n=Zi(e);return n="function"==typeof n?n:t,vo(Oe(e,Gs),t,n)})),ds=Xr(ss),fs=Xr((function(e){var n=e.length,r=n>1?e[n-1]:t;return r="function"==typeof r?(e.pop(),r):t,as(e,r)}));function hs(t){var e=zn(t);return e.__chain__=!0,e}function ms(t,e){return e(t)}var gs=oi((function(e){var n=e.length,r=n?e[0]:0,o=this.__wrapped__,i=function(t){return ar(t,e)};return!(n>1||this.__actions__.length)&&o instanceof qn&&_i(r)?((o=o.slice(r,+r+(n?1:0))).__actions__.push({func:ms,args:[i],thisArg:t}),new Wn(o,this.__chain__).thru((function(e){return n&&!e.length&&e.push(t),e}))):this.thru(i)})),vs=Mo((function(t,e,n){$t.call(t,n)?++t[n]:sr(t,n,1)})),ys=jo(qi),bs=jo(Ui);function _s(t,e){return(Us(t)?xe:fr)(t,ci(e,3))}function Ds(t,e){return(Us(t)?Ae:hr)(t,ci(e,3))}var ws=Mo((function(t,e,n){$t.call(t,n)?t[n].push(e):sr(t,n,[e])})),ks=Xr((function(t,e,n){var r=-1,o="function"==typeof e,i=Js(t)?Dt(t.length):[];return fr(t,(function(t){i[++r]=o?Ee(e,t,n):Tr(t,e,n)})),i})),Es=Mo((function(t,e,n){sr(t,n,e)}));function Cs(t,e){return(Us(t)?Fe:jr)(t,ci(e,3))}var xs=Mo((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]})),As=Xr((function(t,e){if(null==t)return[];var n=e.length;return n>1&&Di(t,e[0],e[1])?e=[]:n>2&&Di(e[0],e[1],e[2])&&(e=[e[0]]),qr(t,yr(e,1),[])})),Ss=pe||function(){return de.Date.now()};function Os(e,n,r){return n=r?t:n,n=e&&null==n?e.length:n,Qo(e,u,t,t,t,t,n)}function Ns(n,r){var o;if("function"!=typeof r)throw new Ot(e);return n=ga(n),function(){return--n>0&&(o=r.apply(this,arguments)),n<=1&&(r=t),o}}var Ts=Xr((function(t,e,n){var r=1;if(n.length){var o=ln(n,li(Ts));r|=i}return Qo(t,r,e,n,o)})),Fs=Xr((function(t,e,n){var r=3;if(n.length){var o=ln(n,li(Fs));r|=i}return Qo(e,r,t,n,o)}));function Ms(n,r,o){var i,s,a,u,l,c,p=0,d=!1,f=!1,h=!0;if("function"!=typeof n)throw new Ot(e);function m(e){var r=i,o=s;return i=s=t,p=e,u=n.apply(o,r)}function g(t){return p=t,l=Mi(y,r),d?m(t):u}function v(e){var n=e-c;return c===t||n>=r||n<0||f&&e-p>=a}function y(){var t=Ss();if(v(t))return b(t);l=Mi(y,function(t){var e=r-(t-c);return f?_n(e,a-(t-p)):e}(t))}function b(e){return l=t,h&&i?m(e):(i=s=t,u)}function _(){var e=Ss(),n=v(e);if(i=arguments,s=this,c=e,n){if(l===t)return g(c);if(f)return Eo(l),l=Mi(y,r),m(c)}return l===t&&(l=Mi(y,r)),u}return r=ya(r)||0,na(o)&&(d=!!o.leading,a=(f="maxWait"in o)?bn(ya(o.maxWait)||0,r):a,h="trailing"in o?!!o.trailing:h),_.cancel=function(){l!==t&&Eo(l),p=0,i=c=s=l=t},_.flush=function(){return l===t?u:b(Ss())},_}var Is=Xr((function(t,e){return pr(t,1,e)})),$s=Xr((function(t,e,n){return pr(t,ya(e)||0,n)}));function Bs(t,n){if("function"!=typeof t||null!=n&&"function"!=typeof n)throw new Ot(e);var r=function(){var e=arguments,o=n?n.apply(this,e):e[0],i=r.cache;if(i.has(o))return i.get(o);var s=t.apply(this,e);return r.cache=i.set(o,s)||i,s};return r.cache=new(Bs.Cache||Jn),r}function Rs(t){if("function"!=typeof t)throw new Ot(e);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Bs.Cache=Jn;var Ls=wo((function(t,e){var n=(e=1==e.length&&Us(e[0])?Fe(e[0],Ye(ci())):Fe(yr(e,1),Ye(ci()))).length;return Xr((function(r){for(var o=-1,i=_n(r.length,n);++o<i;)r[o]=e[o].call(this,r[o]);return Ee(t,this,r)}))})),Ps=Xr((function(e,n){var r=ln(n,li(Ps));return Qo(e,i,t,n,r)})),js=Xr((function(e,n){var r=ln(n,li(js));return Qo(e,a,t,n,r)})),zs=oi((function(e,n){return Qo(e,l,t,t,t,n)}));function Vs(t,e){return t===e||t!=t&&e!=e}var Hs=Jo(Ar),Ws=Jo((function(t,e){return t>=e})),qs=Fr(function(){return arguments}())?Fr:function(t){return ra(t)&&$t.call(t,"callee")&&!Jt.call(t,"callee")},Us=Dt.isArray,Ks=ye?Ye(ye):function(t){return ra(t)&&xr(t)==T};function Js(t){return null!=t&&ea(t.length)&&!Qs(t)}function Gs(t){return ra(t)&&Js(t)}var Ys=Re||yu,Xs=be?Ye(be):function(t){return ra(t)&&xr(t)==y};function Zs(t){if(!ra(t))return!1;var e=xr(t);return e==b||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!sa(t)}function Qs(t){if(!na(t))return!1;var e=xr(t);return e==_||e==D||"[object AsyncFunction]"==e||"[object Proxy]"==e}function ta(t){return"number"==typeof t&&t==ga(t)}function ea(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=p}function na(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function ra(t){return null!=t&&"object"==typeof t}var oa=_e?Ye(_e):function(t){return ra(t)&&gi(t)==w};function ia(t){return"number"==typeof t||ra(t)&&xr(t)==k}function sa(t){if(!ra(t)||xr(t)!=E)return!1;var e=Ut(t);if(null===e)return!0;var n=$t.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&It.call(n)==Pt}var aa=De?Ye(De):function(t){return ra(t)&&xr(t)==x},ua=we?Ye(we):function(t){return ra(t)&&gi(t)==A};function la(t){return"string"==typeof t||!Us(t)&&ra(t)&&xr(t)==S}function ca(t){return"symbol"==typeof t||ra(t)&&xr(t)==O}var pa=ke?Ye(ke):function(t){return ra(t)&&ea(t.length)&&!!ie[xr(t)]},da=Jo(Pr),fa=Jo((function(t,e){return t<=e}));function ha(t){if(!t)return[];if(Js(t))return la(t)?fn(t):To(t);if(Qt&&t[Qt])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[Qt]());var e=gi(t);return(e==w?an:e==A?cn:Va)(t)}function ma(t){return t?(t=ya(t))===c||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function ga(t){var e=ma(t),n=e%1;return e==e?n?e-n:e:0}function va(t){return t?ur(ga(t),0,f):0}function ya(t){if("number"==typeof t)return t;if(ca(t))return d;if(na(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=na(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Ge(t);var n=ht.test(t);return n||gt.test(t)?le(t.slice(2),n?2:8):ft.test(t)?d:+t}function ba(t){return Fo(t,Ia(t))}function _a(t){return null==t?"":co(t)}var Da=Io((function(t,e){if(Ci(e)||Js(e))Fo(e,Ma(e),t);else for(var n in e)$t.call(e,n)&&nr(t,n,e[n])})),wa=Io((function(t,e){Fo(e,Ia(e),t)})),ka=Io((function(t,e,n,r){Fo(e,Ia(e),t,r)})),Ea=Io((function(t,e,n,r){Fo(e,Ma(e),t,r)})),Ca=oi(ar),xa=Xr((function(e,n){e=xt(e);var r=-1,o=n.length,i=o>2?n[2]:t;for(i&&Di(n[0],n[1],i)&&(o=1);++r<o;)for(var s=n[r],a=Ia(s),u=-1,l=a.length;++u<l;){var c=a[u],p=e[c];(p===t||Vs(p,Ft[c])&&!$t.call(e,c))&&(e[c]=s[c])}return e})),Aa=Xr((function(e){return e.push(t,ei),Ee(Ba,t,e)}));function Sa(e,n,r){var o=null==e?t:Er(e,n);return o===t?r:o}function Oa(t,e){return null!=t&&vi(t,e,Or)}var Na=Ho((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Lt.call(e)),t[e]=n}),nu(iu)),Ta=Ho((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Lt.call(e)),$t.call(t,e)?t[e].push(n):t[e]=[n]}),ci),Fa=Xr(Tr);function Ma(t){return Js(t)?Xn(t):Rr(t)}function Ia(t){return Js(t)?Xn(t,!0):Lr(t)}var $a=Io((function(t,e,n){Hr(t,e,n)})),Ba=Io((function(t,e,n,r){Hr(t,e,n,r)})),Ra=oi((function(t,e){var n={};if(null==t)return n;var r=!1;e=Fe(e,(function(e){return e=Do(e,t),r||(r=e.length>1),e})),Fo(t,si(t),n),r&&(n=lr(n,7,ni));for(var o=e.length;o--;)fo(n,e[o]);return n})),La=oi((function(t,e){return null==t?{}:function(t,e){return Ur(t,e,(function(e,n){return Oa(t,n)}))}(t,e)}));function Pa(t,e){if(null==t)return{};var n=Fe(si(t),(function(t){return[t]}));return e=ci(e),Ur(t,n,(function(t,n){return e(t,n[0])}))}var ja=Zo(Ma),za=Zo(Ia);function Va(t){return null==t?[]:Xe(t,Ma(t))}var Ha=Lo((function(t,e,n){return e=e.toLowerCase(),t+(n?Wa(e):e)}));function Wa(t){return Za(_a(t).toLowerCase())}function qa(t){return(t=_a(t))&&t.replace(yt,nn).replace(Zt,"")}var Ua=Lo((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),Ka=Lo((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),Ja=Ro("toLowerCase"),Ga=Lo((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()})),Ya=Lo((function(t,e,n){return t+(n?" ":"")+Za(e)})),Xa=Lo((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),Za=Ro("toUpperCase");function Qa(e,n,r){return e=_a(e),(n=r?t:n)===t?function(t){return ne.test(t)}(e)?function(t){return t.match(te)||[]}(e):function(t){return t.match(ut)||[]}(e):e.match(n)||[]}var tu=Xr((function(e,n){try{return Ee(e,t,n)}catch(t){return Zs(t)?t:new kt(t)}})),eu=oi((function(t,e){return xe(e,(function(e){e=Pi(e),sr(t,e,Ts(t[e],t))})),t}));function nu(t){return function(){return t}}var ru=zo(),ou=zo(!0);function iu(t){return t}function su(t){return Br("function"==typeof t?t:lr(t,1))}var au=Xr((function(t,e){return function(n){return Tr(n,t,e)}})),uu=Xr((function(t,e){return function(n){return Tr(t,n,e)}}));function lu(t,e,n){var r=Ma(e),o=kr(e,r);null!=n||na(e)&&(o.length||!r.length)||(n=e,e=t,t=this,o=kr(e,Ma(e)));var i=!(na(n)&&"chain"in n&&!n.chain),s=Qs(t);return xe(o,(function(n){var r=e[n];t[n]=r,s&&(t.prototype[n]=function(){var e=this.__chain__;if(i||e){var n=t(this.__wrapped__),o=n.__actions__=To(this.__actions__);return o.push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,Me([this.value()],arguments))})})),t}function cu(){}var pu=qo(Fe),du=qo(Se),fu=qo(Be);function hu(t){return wi(t)?We(Pi(t)):function(t){return function(e){return Er(e,t)}}(t)}var mu=Ko(),gu=Ko(!0);function vu(){return[]}function yu(){return!1}var bu,_u=Wo((function(t,e){return t+e}),0),Du=Yo("ceil"),wu=Wo((function(t,e){return t/e}),1),ku=Yo("floor"),Eu=Wo((function(t,e){return t*e}),1),Cu=Yo("round"),xu=Wo((function(t,e){return t-e}),0);return zn.after=function(t,n){if("function"!=typeof n)throw new Ot(e);return t=ga(t),function(){if(--t<1)return n.apply(this,arguments)}},zn.ary=Os,zn.assign=Da,zn.assignIn=wa,zn.assignInWith=ka,zn.assignWith=Ea,zn.at=Ca,zn.before=Ns,zn.bind=Ts,zn.bindAll=eu,zn.bindKey=Fs,zn.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Us(t)?t:[t]},zn.chain=hs,zn.chunk=function(e,n,r){n=(r?Di(e,n,r):n===t)?1:bn(ga(n),0);var o=null==e?0:e.length;if(!o||n<1)return[];for(var i=0,s=0,a=Dt(he(o/n));i<o;)a[s++]=oo(e,i,i+=n);return a},zn.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,o=[];++e<n;){var i=t[e];i&&(o[r++]=i)}return o},zn.concat=function(){var t=arguments.length;if(!t)return[];for(var e=Dt(t-1),n=arguments[0],r=t;r--;)e[r-1]=arguments[r];return Me(Us(n)?To(n):[n],yr(e,1))},zn.cond=function(t){var n=null==t?0:t.length,r=ci();return t=n?Fe(t,(function(t){if("function"!=typeof t[1])throw new Ot(e);return[r(t[0]),t[1]]})):[],Xr((function(e){for(var r=-1;++r<n;){var o=t[r];if(Ee(o[0],this,e))return Ee(o[1],this,e)}}))},zn.conforms=function(t){return function(t){var e=Ma(t);return function(n){return cr(n,t,e)}}(lr(t,1))},zn.constant=nu,zn.countBy=vs,zn.create=function(t,e){var n=Vn(t);return null==e?n:ir(n,e)},zn.curry=function e(n,r,o){var i=Qo(n,8,t,t,t,t,t,r=o?t:r);return i.placeholder=e.placeholder,i},zn.curryRight=function e(n,r,i){var s=Qo(n,o,t,t,t,t,t,r=i?t:r);return s.placeholder=e.placeholder,s},zn.debounce=Ms,zn.defaults=xa,zn.defaultsDeep=Aa,zn.defer=Is,zn.delay=$s,zn.difference=Vi,zn.differenceBy=Hi,zn.differenceWith=Wi,zn.drop=function(e,n,r){var o=null==e?0:e.length;return o?oo(e,(n=r||n===t?1:ga(n))<0?0:n,o):[]},zn.dropRight=function(e,n,r){var o=null==e?0:e.length;return o?oo(e,0,(n=o-(n=r||n===t?1:ga(n)))<0?0:n):[]},zn.dropRightWhile=function(t,e){return t&&t.length?mo(t,ci(e,3),!0,!0):[]},zn.dropWhile=function(t,e){return t&&t.length?mo(t,ci(e,3),!0):[]},zn.fill=function(e,n,r,o){var i=null==e?0:e.length;return i?(r&&"number"!=typeof r&&Di(e,n,r)&&(r=0,o=i),function(e,n,r,o){var i=e.length;for((r=ga(r))<0&&(r=-r>i?0:i+r),(o=o===t||o>i?i:ga(o))<0&&(o+=i),o=r>o?0:va(o);r<o;)e[r++]=n;return e}(e,n,r,o)):[]},zn.filter=function(t,e){return(Us(t)?Oe:vr)(t,ci(e,3))},zn.flatMap=function(t,e){return yr(Cs(t,e),1)},zn.flatMapDeep=function(t,e){return yr(Cs(t,e),c)},zn.flatMapDepth=function(e,n,r){return r=r===t?1:ga(r),yr(Cs(e,n),r)},zn.flatten=Ki,zn.flattenDeep=function(t){return null!=t&&t.length?yr(t,c):[]},zn.flattenDepth=function(e,n){return null!=e&&e.length?yr(e,n=n===t?1:ga(n)):[]},zn.flip=function(t){return Qo(t,512)},zn.flow=ru,zn.flowRight=ou,zn.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var o=t[e];r[o[0]]=o[1]}return r},zn.functions=function(t){return null==t?[]:kr(t,Ma(t))},zn.functionsIn=function(t){return null==t?[]:kr(t,Ia(t))},zn.groupBy=ws,zn.initial=function(t){return null!=t&&t.length?oo(t,0,-1):[]},zn.intersection=Gi,zn.intersectionBy=Yi,zn.intersectionWith=Xi,zn.invert=Na,zn.invertBy=Ta,zn.invokeMap=ks,zn.iteratee=su,zn.keyBy=Es,zn.keys=Ma,zn.keysIn=Ia,zn.map=Cs,zn.mapKeys=function(t,e){var n={};return e=ci(e,3),Dr(t,(function(t,r,o){sr(n,e(t,r,o),t)})),n},zn.mapValues=function(t,e){var n={};return e=ci(e,3),Dr(t,(function(t,r,o){sr(n,r,e(t,r,o))})),n},zn.matches=function(t){return zr(lr(t,1))},zn.matchesProperty=function(t,e){return Vr(t,lr(e,1))},zn.memoize=Bs,zn.merge=$a,zn.mergeWith=Ba,zn.method=au,zn.methodOf=uu,zn.mixin=lu,zn.negate=Rs,zn.nthArg=function(t){return t=ga(t),Xr((function(e){return Wr(e,t)}))},zn.omit=Ra,zn.omitBy=function(t,e){return Pa(t,Rs(ci(e)))},zn.once=function(t){return Ns(2,t)},zn.orderBy=function(e,n,r,o){return null==e?[]:(Us(n)||(n=null==n?[]:[n]),Us(r=o?t:r)||(r=null==r?[]:[r]),qr(e,n,r))},zn.over=pu,zn.overArgs=Ls,zn.overEvery=du,zn.overSome=fu,zn.partial=Ps,zn.partialRight=js,zn.partition=xs,zn.pick=La,zn.pickBy=Pa,zn.property=hu,zn.propertyOf=function(e){return function(n){return null==e?t:Er(e,n)}},zn.pull=Qi,zn.pullAll=ts,zn.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?Kr(t,e,ci(n,2)):t},zn.pullAllWith=function(e,n,r){return e&&e.length&&n&&n.length?Kr(e,n,t,r):e},zn.pullAt=es,zn.range=mu,zn.rangeRight=gu,zn.rearg=zs,zn.reject=function(t,e){return(Us(t)?Oe:vr)(t,Rs(ci(e,3)))},zn.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,o=[],i=t.length;for(e=ci(e,3);++r<i;){var s=t[r];e(s,r,t)&&(n.push(s),o.push(r))}return Jr(t,o),n},zn.rest=function(n,r){if("function"!=typeof n)throw new Ot(e);return Xr(n,r=r===t?r:ga(r))},zn.reverse=ns,zn.sampleSize=function(e,n,r){return n=(r?Di(e,n,r):n===t)?1:ga(n),(Us(e)?Qn:Qr)(e,n)},zn.set=function(t,e,n){return null==t?t:to(t,e,n)},zn.setWith=function(e,n,r,o){return o="function"==typeof o?o:t,null==e?e:to(e,n,r,o)},zn.shuffle=function(t){return(Us(t)?tr:ro)(t)},zn.slice=function(e,n,r){var o=null==e?0:e.length;return o?(r&&"number"!=typeof r&&Di(e,n,r)?(n=0,r=o):(n=null==n?0:ga(n),r=r===t?o:ga(r)),oo(e,n,r)):[]},zn.sortBy=As,zn.sortedUniq=function(t){return t&&t.length?uo(t):[]},zn.sortedUniqBy=function(t,e){return t&&t.length?uo(t,ci(e,2)):[]},zn.split=function(e,n,r){return r&&"number"!=typeof r&&Di(e,n,r)&&(n=r=t),(r=r===t?f:r>>>0)?(e=_a(e))&&("string"==typeof n||null!=n&&!aa(n))&&!(n=co(n))&&sn(e)?ko(fn(e),0,r):e.split(n,r):[]},zn.spread=function(t,n){if("function"!=typeof t)throw new Ot(e);return n=null==n?0:bn(ga(n),0),Xr((function(e){var r=e[n],o=ko(e,0,n);return r&&Me(o,r),Ee(t,this,o)}))},zn.tail=function(t){var e=null==t?0:t.length;return e?oo(t,1,e):[]},zn.take=function(e,n,r){return e&&e.length?oo(e,0,(n=r||n===t?1:ga(n))<0?0:n):[]},zn.takeRight=function(e,n,r){var o=null==e?0:e.length;return o?oo(e,(n=o-(n=r||n===t?1:ga(n)))<0?0:n,o):[]},zn.takeRightWhile=function(t,e){return t&&t.length?mo(t,ci(e,3),!1,!0):[]},zn.takeWhile=function(t,e){return t&&t.length?mo(t,ci(e,3)):[]},zn.tap=function(t,e){return e(t),t},zn.throttle=function(t,n,r){var o=!0,i=!0;if("function"!=typeof t)throw new Ot(e);return na(r)&&(o="leading"in r?!!r.leading:o,i="trailing"in r?!!r.trailing:i),Ms(t,n,{leading:o,maxWait:n,trailing:i})},zn.thru=ms,zn.toArray=ha,zn.toPairs=ja,zn.toPairsIn=za,zn.toPath=function(t){return Us(t)?Fe(t,Pi):ca(t)?[t]:To(Li(_a(t)))},zn.toPlainObject=ba,zn.transform=function(t,e,n){var r=Us(t),o=r||Ys(t)||pa(t);if(e=ci(e,4),null==n){var i=t&&t.constructor;n=o?r?new i:[]:na(t)&&Qs(i)?Vn(Ut(t)):{}}return(o?xe:Dr)(t,(function(t,r,o){return e(n,t,r,o)})),n},zn.unary=function(t){return Os(t,1)},zn.union=rs,zn.unionBy=os,zn.unionWith=is,zn.uniq=function(t){return t&&t.length?po(t):[]},zn.uniqBy=function(t,e){return t&&t.length?po(t,ci(e,2)):[]},zn.uniqWith=function(e,n){return n="function"==typeof n?n:t,e&&e.length?po(e,t,n):[]},zn.unset=function(t,e){return null==t||fo(t,e)},zn.unzip=ss,zn.unzipWith=as,zn.update=function(t,e,n){return null==t?t:ho(t,e,_o(n))},zn.updateWith=function(e,n,r,o){return o="function"==typeof o?o:t,null==e?e:ho(e,n,_o(r),o)},zn.values=Va,zn.valuesIn=function(t){return null==t?[]:Xe(t,Ia(t))},zn.without=us,zn.words=Qa,zn.wrap=function(t,e){return Ps(_o(e),t)},zn.xor=ls,zn.xorBy=cs,zn.xorWith=ps,zn.zip=ds,zn.zipObject=function(t,e){return yo(t||[],e||[],nr)},zn.zipObjectDeep=function(t,e){return yo(t||[],e||[],to)},zn.zipWith=fs,zn.entries=ja,zn.entriesIn=za,zn.extend=wa,zn.extendWith=ka,lu(zn,zn),zn.add=_u,zn.attempt=tu,zn.camelCase=Ha,zn.capitalize=Wa,zn.ceil=Du,zn.clamp=function(e,n,r){return r===t&&(r=n,n=t),r!==t&&(r=(r=ya(r))==r?r:0),n!==t&&(n=(n=ya(n))==n?n:0),ur(ya(e),n,r)},zn.clone=function(t){return lr(t,4)},zn.cloneDeep=function(t){return lr(t,5)},zn.cloneDeepWith=function(e,n){return lr(e,5,n="function"==typeof n?n:t)},zn.cloneWith=function(e,n){return lr(e,4,n="function"==typeof n?n:t)},zn.conformsTo=function(t,e){return null==e||cr(t,e,Ma(e))},zn.deburr=qa,zn.defaultTo=function(t,e){return null==t||t!=t?e:t},zn.divide=wu,zn.endsWith=function(e,n,r){e=_a(e),n=co(n);var o=e.length,i=r=r===t?o:ur(ga(r),0,o);return(r-=n.length)>=0&&e.slice(r,i)==n},zn.eq=Vs,zn.escape=function(t){return(t=_a(t))&&J.test(t)?t.replace(U,rn):t},zn.escapeRegExp=function(t){return(t=_a(t))&&nt.test(t)?t.replace(et,"\\$&"):t},zn.every=function(e,n,r){var o=Us(e)?Se:mr;return r&&Di(e,n,r)&&(n=t),o(e,ci(n,3))},zn.find=ys,zn.findIndex=qi,zn.findKey=function(t,e){return Le(t,ci(e,3),Dr)},zn.findLast=bs,zn.findLastIndex=Ui,zn.findLastKey=function(t,e){return Le(t,ci(e,3),wr)},zn.floor=ku,zn.forEach=_s,zn.forEachRight=Ds,zn.forIn=function(t,e){return null==t?t:br(t,ci(e,3),Ia)},zn.forInRight=function(t,e){return null==t?t:_r(t,ci(e,3),Ia)},zn.forOwn=function(t,e){return t&&Dr(t,ci(e,3))},zn.forOwnRight=function(t,e){return t&&wr(t,ci(e,3))},zn.get=Sa,zn.gt=Hs,zn.gte=Ws,zn.has=function(t,e){return null!=t&&vi(t,e,Sr)},zn.hasIn=Oa,zn.head=Ji,zn.identity=iu,zn.includes=function(t,e,n,r){t=Js(t)?t:Va(t),n=n&&!r?ga(n):0;var o=t.length;return n<0&&(n=bn(o+n,0)),la(t)?n<=o&&t.indexOf(e,n)>-1:!!o&&je(t,e,n)>-1},zn.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=null==n?0:ga(n);return o<0&&(o=bn(r+o,0)),je(t,e,o)},zn.inRange=function(e,n,r){return n=ma(n),r===t?(r=n,n=0):r=ma(r),function(t,e,n){return t>=_n(e,n)&&t<bn(e,n)}(e=ya(e),n,r)},zn.invoke=Fa,zn.isArguments=qs,zn.isArray=Us,zn.isArrayBuffer=Ks,zn.isArrayLike=Js,zn.isArrayLikeObject=Gs,zn.isBoolean=function(t){return!0===t||!1===t||ra(t)&&xr(t)==v},zn.isBuffer=Ys,zn.isDate=Xs,zn.isElement=function(t){return ra(t)&&1===t.nodeType&&!sa(t)},zn.isEmpty=function(t){if(null==t)return!0;if(Js(t)&&(Us(t)||"string"==typeof t||"function"==typeof t.splice||Ys(t)||pa(t)||qs(t)))return!t.length;var e=gi(t);if(e==w||e==A)return!t.size;if(Ci(t))return!Rr(t).length;for(var n in t)if($t.call(t,n))return!1;return!0},zn.isEqual=function(t,e){return Mr(t,e)},zn.isEqualWith=function(e,n,r){var o=(r="function"==typeof r?r:t)?r(e,n):t;return o===t?Mr(e,n,t,r):!!o},zn.isError=Zs,zn.isFinite=function(t){return"number"==typeof t&&qe(t)},zn.isFunction=Qs,zn.isInteger=ta,zn.isLength=ea,zn.isMap=oa,zn.isMatch=function(t,e){return t===e||Ir(t,e,di(e))},zn.isMatchWith=function(e,n,r){return r="function"==typeof r?r:t,Ir(e,n,di(n),r)},zn.isNaN=function(t){return ia(t)&&t!=+t},zn.isNative=function(t){if(Ei(t))throw new kt("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return $r(t)},zn.isNil=function(t){return null==t},zn.isNull=function(t){return null===t},zn.isNumber=ia,zn.isObject=na,zn.isObjectLike=ra,zn.isPlainObject=sa,zn.isRegExp=aa,zn.isSafeInteger=function(t){return ta(t)&&t>=-9007199254740991&&t<=p},zn.isSet=ua,zn.isString=la,zn.isSymbol=ca,zn.isTypedArray=pa,zn.isUndefined=function(e){return e===t},zn.isWeakMap=function(t){return ra(t)&&gi(t)==N},zn.isWeakSet=function(t){return ra(t)&&"[object WeakSet]"==xr(t)},zn.join=function(t,e){return null==t?"":vn.call(t,e)},zn.kebabCase=Ua,zn.last=Zi,zn.lastIndexOf=function(e,n,r){var o=null==e?0:e.length;if(!o)return-1;var i=o;return r!==t&&(i=(i=ga(r))<0?bn(o+i,0):_n(i,o-1)),n==n?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(e,n,i):Pe(e,Ve,i,!0)},zn.lowerCase=Ka,zn.lowerFirst=Ja,zn.lt=da,zn.lte=fa,zn.max=function(e){return e&&e.length?gr(e,iu,Ar):t},zn.maxBy=function(e,n){return e&&e.length?gr(e,ci(n,2),Ar):t},zn.mean=function(t){return He(t,iu)},zn.meanBy=function(t,e){return He(t,ci(e,2))},zn.min=function(e){return e&&e.length?gr(e,iu,Pr):t},zn.minBy=function(e,n){return e&&e.length?gr(e,ci(n,2),Pr):t},zn.stubArray=vu,zn.stubFalse=yu,zn.stubObject=function(){return{}},zn.stubString=function(){return""},zn.stubTrue=function(){return!0},zn.multiply=Eu,zn.nth=function(e,n){return e&&e.length?Wr(e,ga(n)):t},zn.noConflict=function(){return de._===this&&(de._=jt),this},zn.noop=cu,zn.now=Ss,zn.pad=function(t,e,n){t=_a(t);var r=(e=ga(e))?dn(t):0;if(!e||r>=e)return t;var o=(e-r)/2;return Uo(ge(o),n)+t+Uo(he(o),n)},zn.padEnd=function(t,e,n){t=_a(t);var r=(e=ga(e))?dn(t):0;return e&&r<e?t+Uo(e-r,n):t},zn.padStart=function(t,e,n){t=_a(t);var r=(e=ga(e))?dn(t):0;return e&&r<e?Uo(e-r,n)+t:t},zn.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),wn(_a(t).replace(rt,""),e||0)},zn.random=function(e,n,r){if(r&&"boolean"!=typeof r&&Di(e,n,r)&&(n=r=t),r===t&&("boolean"==typeof n?(r=n,n=t):"boolean"==typeof e&&(r=e,e=t)),e===t&&n===t?(e=0,n=1):(e=ma(e),n===t?(n=e,e=0):n=ma(n)),e>n){var o=e;e=n,n=o}if(r||e%1||n%1){var i=kn();return _n(e+i*(n-e+ue("1e-"+((i+"").length-1))),n)}return Gr(e,n)},zn.reduce=function(t,e,n){var r=Us(t)?Ie:Ue,o=arguments.length<3;return r(t,ci(e,4),n,o,fr)},zn.reduceRight=function(t,e,n){var r=Us(t)?$e:Ue,o=arguments.length<3;return r(t,ci(e,4),n,o,hr)},zn.repeat=function(e,n,r){return n=(r?Di(e,n,r):n===t)?1:ga(n),Yr(_a(e),n)},zn.replace=function(){var t=arguments,e=_a(t[0]);return t.length<3?e:e.replace(t[1],t[2])},zn.result=function(e,n,r){var o=-1,i=(n=Do(n,e)).length;for(i||(i=1,e=t);++o<i;){var s=null==e?t:e[Pi(n[o])];s===t&&(o=i,s=r),e=Qs(s)?s.call(e):s}return e},zn.round=Cu,zn.runInContext=s,zn.sample=function(t){return(Us(t)?Zn:Zr)(t)},zn.size=function(t){if(null==t)return 0;if(Js(t))return la(t)?dn(t):t.length;var e=gi(t);return e==w||e==A?t.size:Rr(t).length},zn.snakeCase=Ga,zn.some=function(e,n,r){var o=Us(e)?Be:io;return r&&Di(e,n,r)&&(n=t),o(e,ci(n,3))},zn.sortedIndex=function(t,e){return so(t,e)},zn.sortedIndexBy=function(t,e,n){return ao(t,e,ci(n,2))},zn.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=so(t,e);if(r<n&&Vs(t[r],e))return r}return-1},zn.sortedLastIndex=function(t,e){return so(t,e,!0)},zn.sortedLastIndexBy=function(t,e,n){return ao(t,e,ci(n,2),!0)},zn.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var n=so(t,e,!0)-1;if(Vs(t[n],e))return n}return-1},zn.startCase=Ya,zn.startsWith=function(t,e,n){return t=_a(t),n=null==n?0:ur(ga(n),0,t.length),e=co(e),t.slice(n,n+e.length)==e},zn.subtract=xu,zn.sum=function(t){return t&&t.length?Ke(t,iu):0},zn.sumBy=function(t,e){return t&&t.length?Ke(t,ci(e,2)):0},zn.template=function(e,n,r){var o=zn.templateSettings;r&&Di(e,n,r)&&(n=t),e=_a(e),n=ka({},n,o,ti);var i,s,a=ka({},n.imports,o.imports,ti),u=Ma(a),l=Xe(a,u),c=0,p=n.interpolate||bt,d="__p += '",f=At((n.escape||bt).source+"|"+p.source+"|"+(p===X?pt:bt).source+"|"+(n.evaluate||bt).source+"|$","g"),h="//# sourceURL="+($t.call(n,"sourceURL")?(n.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++oe+"]")+"\n";e.replace(f,(function(t,n,r,o,a,u){return r||(r=o),d+=e.slice(c,u).replace(_t,on),n&&(i=!0,d+="' +\n__e("+n+") +\n'"),a&&(s=!0,d+="';\n"+a+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),c=u+t.length,t})),d+="';\n";var m=$t.call(n,"variable")&&n.variable;if(m){if(lt.test(m))throw new kt("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(s?d.replace(V,""):d).replace(H,"$1").replace(W,"$1;"),d="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var g=tu((function(){return Et(u,h+"return "+d).apply(t,l)}));if(g.source=d,Zs(g))throw g;return g},zn.times=function(t,e){if((t=ga(t))<1||t>p)return[];var n=f,r=_n(t,f);e=ci(e),t-=f;for(var o=Je(r,e);++n<t;)e(n);return o},zn.toFinite=ma,zn.toInteger=ga,zn.toLength=va,zn.toLower=function(t){return _a(t).toLowerCase()},zn.toNumber=ya,zn.toSafeInteger=function(t){return t?ur(ga(t),-9007199254740991,p):0===t?t:0},zn.toString=_a,zn.toUpper=function(t){return _a(t).toUpperCase()},zn.trim=function(e,n,r){if((e=_a(e))&&(r||n===t))return Ge(e);if(!e||!(n=co(n)))return e;var o=fn(e),i=fn(n);return ko(o,Qe(o,i),tn(o,i)+1).join("")},zn.trimEnd=function(e,n,r){if((e=_a(e))&&(r||n===t))return e.slice(0,hn(e)+1);if(!e||!(n=co(n)))return e;var o=fn(e);return ko(o,0,tn(o,fn(n))+1).join("")},zn.trimStart=function(e,n,r){if((e=_a(e))&&(r||n===t))return e.replace(rt,"");if(!e||!(n=co(n)))return e;var o=fn(e);return ko(o,Qe(o,fn(n))).join("")},zn.truncate=function(e,n){var r=30,o="...";if(na(n)){var i="separator"in n?n.separator:i;r="length"in n?ga(n.length):r,o="omission"in n?co(n.omission):o}var s=(e=_a(e)).length;if(sn(e)){var a=fn(e);s=a.length}if(r>=s)return e;var u=r-dn(o);if(u<1)return o;var l=a?ko(a,0,u).join(""):e.slice(0,u);if(i===t)return l+o;if(a&&(u+=l.length-u),aa(i)){if(e.slice(u).search(i)){var c,p=l;for(i.global||(i=At(i.source,_a(dt.exec(i))+"g")),i.lastIndex=0;c=i.exec(p);)var d=c.index;l=l.slice(0,d===t?u:d)}}else if(e.indexOf(co(i),u)!=u){var f=l.lastIndexOf(i);f>-1&&(l=l.slice(0,f))}return l+o},zn.unescape=function(t){return(t=_a(t))&&K.test(t)?t.replace(q,mn):t},zn.uniqueId=function(t){var e=++Bt;return _a(t)+e},zn.upperCase=Xa,zn.upperFirst=Za,zn.each=_s,zn.eachRight=Ds,zn.first=Ji,lu(zn,(bu={},Dr(zn,(function(t,e){$t.call(zn.prototype,e)||(bu[e]=t)})),bu),{chain:!1}),zn.VERSION="4.17.21",xe(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){zn[t].placeholder=zn})),xe(["drop","take"],(function(e,n){qn.prototype[e]=function(r){r=r===t?1:bn(ga(r),0);var o=this.__filtered__&&!n?new qn(this):this.clone();return o.__filtered__?o.__takeCount__=_n(r,o.__takeCount__):o.__views__.push({size:_n(r,f),type:e+(o.__dir__<0?"Right":"")}),o},qn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),xe(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;qn.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:ci(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),xe(["head","last"],(function(t,e){var n="take"+(e?"Right":"");qn.prototype[t]=function(){return this[n](1).value()[0]}})),xe(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");qn.prototype[t]=function(){return this.__filtered__?new qn(this):this[n](1)}})),qn.prototype.compact=function(){return this.filter(iu)},qn.prototype.find=function(t){return this.filter(t).head()},qn.prototype.findLast=function(t){return this.reverse().find(t)},qn.prototype.invokeMap=Xr((function(t,e){return"function"==typeof t?new qn(this):this.map((function(n){return Tr(n,t,e)}))})),qn.prototype.reject=function(t){return this.filter(Rs(ci(t)))},qn.prototype.slice=function(e,n){e=ga(e);var r=this;return r.__filtered__&&(e>0||n<0)?new qn(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),n!==t&&(r=(n=ga(n))<0?r.dropRight(-n):r.take(n-e)),r)},qn.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},qn.prototype.toArray=function(){return this.take(f)},Dr(qn.prototype,(function(e,n){var r=/^(?:filter|find|map|reject)|While$/.test(n),o=/^(?:head|last)$/.test(n),i=zn[o?"take"+("last"==n?"Right":""):n],s=o||/^find/.test(n);i&&(zn.prototype[n]=function(){var n=this.__wrapped__,a=o?[1]:arguments,u=n instanceof qn,l=a[0],c=u||Us(n),p=function(t){var e=i.apply(zn,Me([t],a));return o&&d?e[0]:e};c&&r&&"function"==typeof l&&1!=l.length&&(u=c=!1);var d=this.__chain__,f=!!this.__actions__.length,h=s&&!d,m=u&&!f;if(!s&&c){n=m?n:new qn(this);var g=e.apply(n,a);return g.__actions__.push({func:ms,args:[p],thisArg:t}),new Wn(g,d)}return h&&m?e.apply(this,a):(g=this.thru(p),h?o?g.value()[0]:g.value():g)})})),xe(["pop","push","shift","sort","splice","unshift"],(function(t){var e=Nt[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);zn.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var o=this.value();return e.apply(Us(o)?o:[],t)}return this[n]((function(n){return e.apply(Us(n)?n:[],t)}))}})),Dr(qn.prototype,(function(t,e){var n=zn[e];if(n){var r=n.name+"";$t.call(Fn,r)||(Fn[r]=[]),Fn[r].push({name:e,func:n})}})),Fn[Vo(t,2).name]=[{name:"wrapper",func:t}],qn.prototype.clone=function(){var t=new qn(this.__wrapped__);return t.__actions__=To(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=To(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=To(this.__views__),t},qn.prototype.reverse=function(){if(this.__filtered__){var t=new qn(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},qn.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Us(t),r=e<0,o=n?t.length:0,i=function(t,e,n){for(var r=-1,o=n.length;++r<o;){var i=n[r],s=i.size;switch(i.type){case"drop":t+=s;break;case"dropRight":e-=s;break;case"take":e=_n(e,t+s);break;case"takeRight":t=bn(t,e-s)}}return{start:t,end:e}}(0,o,this.__views__),s=i.start,a=i.end,u=a-s,l=r?a:s-1,c=this.__iteratees__,p=c.length,d=0,f=_n(u,this.__takeCount__);if(!n||!r&&o==u&&f==u)return go(t,this.__actions__);var h=[];t:for(;u--&&d<f;){for(var m=-1,g=t[l+=e];++m<p;){var v=c[m],y=v.iteratee,b=v.type,_=y(g);if(2==b)g=_;else if(!_){if(1==b)continue t;break t}}h[d++]=g}return h},zn.prototype.at=gs,zn.prototype.chain=function(){return hs(this)},zn.prototype.commit=function(){return new Wn(this.value(),this.__chain__)},zn.prototype.next=function(){this.__values__===t&&(this.__values__=ha(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?t:this.__values__[this.__index__++]}},zn.prototype.plant=function(e){for(var n,r=this;r instanceof Hn;){var o=zi(r);o.__index__=0,o.__values__=t,n?i.__wrapped__=o:n=o;var i=o;r=r.__wrapped__}return i.__wrapped__=e,n},zn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof qn){var n=e;return this.__actions__.length&&(n=new qn(this)),(n=n.reverse()).__actions__.push({func:ms,args:[ns],thisArg:t}),new Wn(n,this.__chain__)}return this.thru(ns)},zn.prototype.toJSON=zn.prototype.valueOf=zn.prototype.value=function(){return go(this.__wrapped__,this.__actions__)},zn.prototype.first=zn.prototype.head,Qt&&(zn.prototype[Qt]=function(){return this}),zn}();he?((he.exports=gn)._=gn,fe._=gn):de._=gn}.call(s);const nm=Hp.create({name:"node_processor",addCommands:()=>({setBlockAttributes:wh((({commands:t,state:e},n,r,o={})=>{const i=Pe(t.getBlockAttributes(n))??{},{doc:s,tr:a}=e,{from:u,to:l}=a.selection;s.nodesBetween(u,l,((t,e)=>{Hd.blocks.includes(t.type.name)&&a.setNodeAttribute(e,n,{...o,...i,...r})}))})),getBlockAttributes:wh((({editor:t},e,n)=>Ve((()=>{let r=Object.assign({},n||{});for(const n of Hd.blocks)Object.assign(r,t.getAttributes(n)?.[e]||{});return Object.keys(r).length?r:null})))),removeBlockAttributes:wh((({commands:t},e)=>{for(const n of Hd.blocks)t.resetAttributes(n,e)})),applyMark:wh((({state:t,commands:e},n,r,o={})=>{const{tr:i,doc:s,schema:a}=t,{$from:u,$to:l}=i.selection,c=Jp(qd.LINK,a),p=Jp(n,a);if(!(p.spec.group||"").includes(Ud.SETTINGS))return e.setMark(n,r);if(u.pos===l.pos)return;s.nodesBetween(u.pos,l.pos,((t,s)=>{if(t.type.name===Hd.LIST)return;const a=function(t,e){const n="string"==typeof e?e:e.name;return t.find((t=>t.type.name===n))}(t.marks,n),d=p.create({...a?.attrs||{},...r}),f=Gh(u,l,t,s),h=!c.isInSet(t.marks)&&function(t,e,n,r=Xh){const o=t.resolve(e).path.reverse();for(const t of o)if("number"!=typeof t)for(const e of t.marks)if(r(e,n))return!0;return!1}(i.doc,s,d,o.isAppliedToParent);if(h)return(t=>{if(!o.onAppliedToParent||!1===o.onAppliedToParent(t)){const{tr:n,node:r,position:o,mark:i}=t;e._removeNodeMark({tr:n,node:r,position:o,mark:i.type})}})({tr:i,node:t,position:s,mark:d});t.isText?i.addMark(f.from,f.to,d):function(t,e,n,r){const o=Yh(t,r),i=e.from-o<=r,s=e.to+o>=n.nodeSize+r;return i&&s}(i.doc,i.selection,t,s)&&i.addNodeMark(s,d)}))})),getMarks:wh((({editor:t},e)=>{const n=ze(t,"state");return Ve((()=>{const{selection:t,doc:r}=Pe(n),{from:o,to:i}=Pe(t),s=[];return r.nodesBetween(o,i,(t=>{for(const n of t.marks)n.type.name===e&&s.unshift(n.attrs)})),s}))})),getMark:wh((({commands:t},e)=>{const n=t.getMarks(e);return Ve((()=>Pe(n)[0]??null))})),hasMark:wh((({commands:t},e)=>{const n=t.getMark(e);return Ve((()=>!!Pe(n)))})),getCommonSettingMark:wh((({commands:t},e,n)=>{const r=t.getMark(e);return Ve((()=>Pe(r)?.value??Pe(n)))})),getDeviceSettingMark:wh((({commands:t},e,n)=>{const r=t.getMarks(e),o=t.getDevice();return Ve((()=>{for(const t of Pe(r)){const e=t[Pe(o)];if(e)return e}return Pe(n)}))})),removeAllMarks:wh((({state:t,commands:e})=>{const{tr:n,doc:r}=t,{from:o,to:i}=n.selection;r.nodesBetween(o,i,((t,r)=>{for(const o of t.marks)e._removeNodeMark({tr:n,node:t,position:r,mark:o})}))})),removeMarks:wh((({state:t,commands:e},n)=>{const{tr:r,doc:o}=t,{from:i,to:s}=r.selection;o.nodesBetween(i,s,((t,o)=>{const i=t.marks.filter((t=>n.includes(t.type.name)));for(const n of i)e._removeNodeMark({tr:r,node:t,position:o,mark:n})}))})),_removeNodeMark:wh(((t,{tr:e,node:n,position:r,mark:o})=>n.isText?e.removeMark(r,r+n.nodeSize,o):e.removeNodeMark(r,o)))})}),rm=Hp.create({name:"text_processor",addCommands:()=>({getSelectedText:wh((({state:t})=>{const{from:e,to:n}=t.selection;return t.doc.textBetween(e,n," ")})),transformText:wh((({state:t},e)=>{const{$from:n,$to:r}=t.tr.selection;n.pos!==r.pos&&t.doc.nodesBetween(n.pos,r.pos,((o,i)=>{if(!o.isText)return;const s=Gh(n,r,o,i),a=Math.max(0,n.pos-i),u=Math.max(0,r.pos-i),l=e({text:o.textContent.substring(a,u)}),c=t.schema.text(l,o.marks);t.tr.replaceWith(s.from,s.to,c)}))}))})}),om=Hp.create({name:"selection_processor",addStorage:()=>({selection:null}),addCommands(){return{storeSelection:wh((({state:t})=>{this.storage.selection=t.selection})),restoreSelection:wh((({commands:t})=>{this.storage.selection&&t.setTextSelection(this.storage.selection)})),expandSelection:wh((({tr:t,commands:e},n)=>{let r=t.selection.from,o=t.selection.to;t.doc.nodesBetween(r,o,((e,i,s)=>{if(n({node:e,parent:s})){const n=e.isText?0:Yh(t.doc,i);r=Math.min(r,i+n),o=Math.max(o,i+e.nodeSize-n)}})),e.setTextSelection({from:r,to:o})})),expandSelectionToBlock:wh((({commands:t})=>{t.expandSelection((({parent:t})=>t.type.name===Hd.DOCUMENT))}))}}}),im=gd.create({name:"doc",topNode:!0,content:"block+"}).extend({marks:Ud.SETTINGS,onCreate(){this.editor.view.dom.addEventListener("click",(t=>{t.target.closest("a")&&t.preventDefault()}))}}),sm=gd.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:t}){return["p",Cp(this.options.HTMLAttributes,t),0]},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),am=sm.extend({marks:Ud.ALL,addOptions:()=>({HTMLAttributes:{class:"zw-style"}})}),um=gd.create({name:"heading",addOptions:()=>({levels:[1,2,3,4,5,6],HTMLAttributes:{}}),content:"inline*",group:"block",defining:!0,addAttributes:()=>({level:{default:1,rendered:!1}}),parseHTML(){return this.options.levels.map((t=>({tag:`h${t}`,attrs:{level:t}})))},renderHTML({node:t,HTMLAttributes:e}){return[`h${this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0]}`,Cp(this.options.HTMLAttributes,e),0]},addCommands(){return{setHeading:t=>({commands:e})=>!!this.options.levels.includes(t.level)&&e.setNode(this.name,t),toggleHeading:t=>({commands:e})=>!!this.options.levels.includes(t.level)&&e.toggleNode(this.name,"paragraph",t)}},addKeyboardShortcuts(){return this.options.levels.reduce(((t,e)=>({...t,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})})),{})},addInputRules(){return this.options.levels.map((t=>function(t){return new Ip({find:t.find,handler:({state:e,range:n,match:r})=>{const o=e.doc.resolve(n.from),i=Ap(t.getAttributes,void 0,r)||{};if(!o.node(-1).canReplaceWith(o.index(-1),o.indexAfter(-1),t.type))return null;e.tr.delete(n.from,n.to).setBlockType(n.from,n.from,t.type,i)}})}({find:new RegExp(`^(#{1,${t}})\\s$`),type:this.type,getAttributes:{level:t}})))}}),lm=um.extend({marks:Ud.ALL,addOptions:()=>({levels:[1,2,3,4],HTMLAttributes:{class:"zw-style"}})}),cm=Hp.create({name:"prose_mirror_plugins",addProseMirrorPlugins(){return[Yd.create(this.editor),Xd.create(this.editor)]}}),pm=md.create({name:qd.FONT_FAMILY,group:Ud.SETTINGS,addOptions:()=>({fonts:[]}),addAttributes:()=>({value:{required:!0}}),addCommands(){return{applyFontFamily:wh((({commands:t},e)=>{t.applyMark(this.name,{value:e});const n=t.findFontByName(e);let r=Pe(t.getFontWeight());n.isWeightSupported(r)||(r=n.findClosestWeight(r),t.applyFontWeight(r)),n.isItalicSupported(r)||t.removeItalic()})),getFont:wh((({commands:t})=>{const e=Pe(this.options.defaultPreset),n=t.findFontByName(e.common.font_family),r=t.getFontFamily();return Ve((()=>t.findFontByName(Pe(r))||n))})),findFontByName:wh(((t,e)=>this.options.fonts.find((t=>t.name===e)))),getFontFamily:wh((({commands:t})=>t.getCommonSettingMark(this.name,t.getDefaultFontFamily()))),getDefaultFontFamily:wh((({commands:t})=>{const e=t.getPreset();return Ve((()=>Pe(e).common.font_family))}))}},parseHTML(){const t=t=>({value:t.replace(/["']/g,"")});return[{style:"--zw-font-family",getAttrs:t},{style:"font-family",getAttrs:t}]},renderHTML:({HTMLAttributes:t})=>Eh({font_family:t.value?`"${t.value}"`:null})}),dm=Hp.create({name:qd.STYLE_PRESET,addGlobalAttributes(){return[{types:[Hd.PARAGRAPH,Hd.HEADING],attributes:{preset:{isRequired:!1,default:{id:this.options.defaultId},parseHTML:t=>{const e=Pe(this.options.presets);if("LI"===t.parentElement.tagName)return null;for(const{id:n,node:r,fallbackClass:o}of e){if(o&&t.classList.contains(o))return{id:n};const e=this.options.styleRenderer.makePresetCssClass({id:n});if(t.matches(e))return{id:n};if(t.tagName===`H${r?.level}`)return{id:n}}return"P"===t.tagName?{id:this.options.defaultId}:null},renderHTML:t=>t.preset?{class:this.options.styleRenderer.makePresetHtmlClass(t.preset)}:null}}}]},addCommands(){function t(t,e){return t.find((t=>e===t.id))}function e(t,e){const n={};for(const r of Object.keys(t)){const o=t[r],i=e[r],s=!i||"inherit"===i.toLowerCase();n[r]=s?o:i}return n}return{getPresetList:wh((()=>Ve((()=>this.options.presets.filter((t=>!t.hidden)))))),getPreset:wh((({commands:n})=>{const r=n.getBlockAttributes("preset",{id:this.options.defaultId}),o=n.getPresetList(),i=n.isLink(),s=n.getLinkPreset();return Ve((()=>{const n=t(Pe(o),Pe(r).id);if(!Pe(i))return n;const a=Pe(s);return{id:n.id,common:e(n.common,a.common),mobile:e(n.mobile,a.mobile),tablet:e(n.tablet,a.tablet),desktop:e(n.desktop,a.desktop)}}))})),applyPreset:wh((({commands:e,chain:n},r)=>{const o=t(Pe(e.getPresetList()),r),i=o.node?.type??Hd.PARAGRAPH,s={preset:{id:r}};o.node&&(s.level=o.node.level);for(const t of qd.attributes)s[t]=Pe(e.getBlockAttributes(t));n().removeList().setNode(i,s).run()})),applyDefaultPreset:wh((({commands:t})=>{t.applyPreset(this.options.defaultId)})),removePreset:wh((({commands:t})=>{t.setNode(Hd.PARAGRAPH,{preset:null})})),getPresetCustomization:wh((({editor:t,commands:e})=>{const n=ze(t,"state");return Ve((()=>{const{selection:t,doc:r}=Pe(n),{from:o,to:i}=t;return e._getSettingCustomization(r,o,i)}))})),isSettingCustomized:wh((({commands:t},e)=>{const n=t.getPresetCustomization(),r=qd.attributes.includes(e)?"attributes":"marks";return Ve((()=>Pe(n)[r]?.includes(e)??!1))})),getContentCustomization:wh((({editor:t,commands:e})=>{const n=ze(t,"state");return Ve((()=>{const{doc:t}=Pe(n);return e._getSettingCustomization(t,0,t.content.size)}))})),_getSettingCustomization:wh(((t,e,n,r)=>{const o=new Set,i=new Set;return e.nodesBetween(n,r,(t=>{for(const[e,n]of Object.entries(t.attrs)){qd.attributes.includes(e)&&n&&i.add(e)}for(const{type:e}of t.marks)qd.marks.includes(e.name)&&o.add(e.name)})),{attributes:Array.from(i),marks:Array.from(o)}})),removePresetCustomization:wh((({chain:t})=>{t().storeSelection().expandSelectionToBlock().removeMarks(qd.marks).resetAttributes(Hd.PARAGRAPH,qd.attributes).resetAttributes(Hd.HEADING,qd.attributes).restoreSelection().run()})),removeFormat:wh((({chain:t})=>{t().storeSelection().expandSelectionToBlock().removeAllMarks().applyDefaultPreset().restoreSelection().run()}))}},onCreate(){this.options.styleRenderer.inject(Lm.head,this.options.presets)}}),fm=md.create({name:qd.FONT_WEIGHT,group:Ud.SETTINGS,addAttributes:()=>({value:{required:!0}}),addCommands(){return{applyFontWeight:wh((({commands:t},e)=>{t.applyMark(this.name,{value:e});Pe(t.getFont()).isItalicSupported(e)||t.removeItalic()})),toggleBold:wh((({commands:t})=>{const e=Pe(t.getFontWeight()),n=Pe(t.getFont()),r=Number(e)>=600?"400":"700",o=n.findClosestWeight(r);t.applyFontWeight(o)})),getFontWeight:wh((({commands:t})=>{const e=t.getCommonSettingMark(this.name,t.getDefaultFontWeight()),n=t.getFont();return Ve((()=>{const t=Pe(e),r=Pe(n);return r.isWeightSupported(t)?t:r.findClosestWeight(t)}))})),getDefaultFontWeight:wh((({commands:t})=>{const e=t.getPreset();return Ve((()=>Pe(e).common.font_weight))}))}},addKeyboardShortcuts:()=>({"Mod-b":Ch("toggleBold"),"Mod-B":Ch("toggleBold")}),parseHTML(){const t=t=>"bold"===t?{value:"700"}:!!Number(t)&&{value:t};return[{style:"--zw-font-weight",getAttrs:t},{style:"font-weight",getAttrs:t},{tag:"b",attrs:{value:"700"}},{tag:"strong",attrs:{value:"700"}}]},renderHTML:({HTMLAttributes:t})=>Eh({font_weight:t.value})}),hm=md.create({name:qd.FONT_SIZE,group:Ud.SETTINGS,addOptions:()=>({minSize:1,maxSize:100}),addAttributes:()=>({mobile:{default:null},tablet:{default:null},desktop:{default:null}}),addCommands(){return{getFontSize:wh((({commands:t})=>t.getDeviceSettingMark(this.name,t.getDefaultFontSize()))),getDefaultFontSize:wh((({commands:t})=>{const e=t.getDevice(),n=t.getPreset();return Ve((()=>Pe(n)[Pe(e)].font_size.replace("px","")))})),applyFontSize:wh((({commands:t},e)=>{const n=Pe(t.getDevice());t.applyMark(this.name,{[n]:e},{isAppliedToParent:(t,e)=>t.type.name===e.type.name&&t.attrs[n]===e.attrs[n],onAppliedToParent:({tr:t,node:e,position:r,mark:o})=>{const i={...o.attrs,[n]:null},s=!Object.values(i).some((t=>!!t));if(s)return!1;const a=o.type.create(i);e.isText?t.addMark(r,r+e.nodeSize,a):t.addNodeMark(r,a)}})})),increaseFontSize:wh((({commands:t})=>{const e=Number(Pe(t.getFontSize())),n=Math.min(e+1,this.options.maxSize);t.applyFontSize(String(n))})),decreaseFontSize:wh((({commands:t})=>{const e=Number(Pe(t.getFontSize())),n=Math.max(e-1,this.options.minSize);t.applyFontSize(String(n))}))}},addKeyboardShortcuts:()=>({"Mod-Shift-=":Ch("increaseFontSize"),"Mod-Shift--":Ch("decreaseFontSize")}),parseHTML(){const t=t=>{if(!t)return null;const e=Uh(t,Pe(this.options.wrapperRef));return String(e)};return[{tag:'[style*="--zw-font-size"]',getAttrs:({style:e})=>({mobile:t(e.getPropertyValue("--zw-font-size-mobile")),tablet:t(e.getPropertyValue("--zw-font-size-tablet")),desktop:t(e.getPropertyValue("--zw-font-size-desktop"))})},{style:"font-size",getAttrs:e=>{const n=t(e);return{desktop:n,tablet:n,mobile:null}}}]},renderHTML({HTMLAttributes:t}){const e=t=>t?`${t}px`:null;return Eh({font_size_mobile:e(t.mobile),font_size_tablet:e(t.tablet),font_size_desktop:e(t.desktop)})}}),mm=md.create({name:qd.FONT_COLOR,group:Ud.SETTINGS,addAttributes:()=>({value:{required:!0}}),addCommands(){return{getFontColor:wh((({commands:t})=>t.getCommonSettingMark(this.name,t.getDefaultFontColor()))),getDefaultFontColor:wh((({commands:t})=>{const e=t.getPreset();return Ve((()=>Pe(e).common.color))})),applyFontColor:wh((({commands:t},e)=>{t.applyMark(this.name,{value:e})}))}},parseHTML(){const t=t=>({value:qh(t)});return[{style:"--zw-font-color",getAttrs:t},{style:"color",getAttrs:t}]},renderHTML:({HTMLAttributes:t})=>Eh({font_color:t.value})}),gm=md.create({name:qd.BACKGROUND_COLOR,addAttributes:()=>({value:{required:!0}}),addCommands(){return{getBackgroundColor:wh((({commands:t})=>t.getCommonSettingMark(this.name,"rgba(255, 255, 255, 0%)"))),applyBackgroundColor:wh((({commands:t},e)=>{t.applyMark(this.name,{value:e})}))}},parseHTML(){const t=t=>({value:qh(t)});return[{style:"--zw-background-color",getAttrs:t},{style:"background-color",getAttrs:t}]},renderHTML:({HTMLAttributes:t})=>Eh({background_color:t.value})}),vm=Hp.create({name:"device_manager",addCommands(){return{getDevice:wh((()=>ze(this.options,"device")))}}}),ym=md.create({name:qd.FONT_STYLE,group:Ud.SETTINGS,addAttributes:()=>({italic:{required:!0}}),addCommands(){return{isItalic:wh((({commands:t})=>{const e=t.getMark(this.name),n=t.getDefaultFontStyle();return Ve((()=>Pe(e)?.italic??Pe(n).italic))})),isItalicAvailable:wh((({commands:t})=>{const e=t.getFont(),n=t.getFontWeight();return Ve((()=>{const t=Pe(e),r=Pe(n);return t.isItalicSupported(r)&&!t.isWeightItalicOnly(r)}))})),getDefaultFontStyle:wh((({commands:t})=>{const e=t.getPreset();return Ve((()=>({italic:"italic"===Pe(e).common.font_style})))})),toggleItalic:wh((({commands:t})=>{Pe(t.isItalicAvailable())&&(Pe(t.isItalic())?t.removeItalic():t.applyItalic())})),applyItalic:wh((({commands:t})=>{t.applyMark(this.name,{italic:!0})})),removeItalic:wh((({commands:t})=>{t.applyMark(this.name,{italic:!1})}))}},addKeyboardShortcuts:()=>({"Mod-i":Ch("toggleItalic"),"Mod-I":Ch("toggleItalic")}),parseHTML(){const t=t=>({italic:t.includes("italic")});return[{tag:"i",attrs:{italic:!0}},{style:"--zw-font-style",getAttrs:t},{style:"font-style",getAttrs:t}]},renderHTML:({HTMLAttributes:t})=>Eh({font_style:t.italic?"italic":"normal"})}),bm=md.create({name:qd.TEXT_DECORATION,priority:1e3,addAttributes:()=>({underline:{default:!1},strike_through:{default:!1}}),addCommands(){return{isUnderline:wh((({commands:t})=>{const e=t.getTextDecoration();return Ve((()=>Pe(e).underline))})),isStrikeThrough:wh((({commands:t})=>{const e=t.getTextDecoration();return Ve((()=>Pe(e).strike_through))})),getTextDecoration:wh((({commands:t})=>{const e=t.getMark(this.name),n=t.getDefaultTextDecoration();return Ve((()=>{const t=Pe(e)??{},r=Pe(n);return{underline:t.underline||r.underline,strike_through:t.strike_through||r.strike_through}}))})),isUnderlineCustomized:wh((({commands:t})=>{const e=t.isUnderline(),n=t.getDefaultTextDecoration();return Ve((()=>Pe(e)!==Pe(n).underline))})),getDefaultTextDecoration:wh((({commands:t})=>{const e=t.getPreset();return Ve((()=>{const{text_decoration:t}=Pe(e).common;return{underline:t.includes("underline"),strike_through:t.includes("line-through")}}))})),toggleUnderline:wh((({commands:t})=>{t.toggleTextDecoration("underline")})),toggleStrikeThrough:wh((({commands:t})=>{t.toggleTextDecoration("strike_through")})),toggleTextDecoration:wh((({commands:t},e,n=null)=>{const r=Pe(t.getTextDecoration()),o=n??!r[e];t.applyMark(this.name,{[e]:o})})),applyTextDecoration:wh((({commands:t},e)=>{t.toggleTextDecoration(e,!0)})),removeTextDecoration:wh((({commands:t},e)=>{t.toggleTextDecoration(e,!1)}))}},addKeyboardShortcuts:()=>({"Mod-u":Ch("toggleUnderline"),"Mod-U":Ch("toggleUnderline")}),parseHTML(){const t=t=>{const e=t.includes("underline"),n=t.includes("line-through");return!(!e&&!n)&&{underline:e,strike_through:n}};return[{style:"--zw-text-decoration",getAttrs:t},{style:"text-decoration-line",getAttrs:t},{style:"text-decoration",getAttrs:t},{tag:"s",attrs:{underline:!1,strike_through:!0}},{tag:"u",attrs:{underline:!0,strike_through:!1}}]},renderHTML({HTMLAttributes:t}){const e=[];return t.underline&&e.push("underline"),t.strike_through&&e.push("line-through"),e.length||e.push("none"),Eh({text_decoration:e.join(" ")})}}),_m=Hp.create({name:"case_style",addCommands:()=>({applyCaseStyle:wh((({commands:t},e)=>{switch(e){case zd.CAPITALIZE:return t.applyCapitalize();case zd.LOWERCASE:return t.applyLowerCase();case zd.UPPERCASE:return t.applyUpperCase()}})),applyCapitalize:wh((({commands:t})=>{t.transformText((({text:t})=>function(t){return t.toLowerCase().replace(/(?:^|\s)\S/g,(t=>t.toUpperCase()))}(t)))})),applyLowerCase:wh((({commands:t})=>{t.transformText((({text:t})=>t.toLowerCase()))})),applyUpperCase:wh((({commands:t})=>{t.transformText((({text:t})=>t.toUpperCase()))}))})}),Dm={mobile:null,tablet:null,desktop:null},wm=Hp.create({name:qd.ALIGNMENT,addGlobalAttributes:()=>[{types:[Hd.PARAGRAPH,Hd.HEADING],attributes:{[qd.ALIGNMENT]:{isRequired:!1,parseHTML({style:t}){const e=function(t){const e=Jh[t]||t;return Vd.values.includes(e)?e:null}(t.textAlign);if(e)return{desktop:e,tablet:e,mobile:e};const n=t.getPropertyValue("--zw-alignment-mobile")||null,r=t.getPropertyValue("--zw-alignment-tablet")||null,o=t.getPropertyValue("--zw-alignment-desktop")||null;return n||r||o?{desktop:o,tablet:r,mobile:n}:null},renderHTML:t=>t.alignment?kh({alignment_mobile:t.alignment.mobile,alignment_tablet:t.alignment.tablet,alignment_desktop:t.alignment.desktop}):null}}}],addCommands(){return{toggleAlignment:wh((({commands:t},e)=>{Pe(t.getAlignment())===e?t.removeAlignment():t.applyAlignment(e)})),applyAlignment:wh((({commands:t},e)=>{const n=Pe(t.getDevice());t.setBlockAttributes(this.name,{[n]:e},Dm)})),removeAlignment:wh((({commands:t})=>t.removeBlockAttributes(this.name))),getAlignment:wh((({commands:t})=>{const e=t.getBlockAttributes(this.name,Dm),n=t.getDevice(),r=t.getDefaultAlignment();return Ve((()=>Pe(e)?.[Pe(n)]??Pe(r)))})),getDefaultAlignment:wh((({commands:t})=>{const e=t.getDevice(),n=t.getPreset();return Ve((()=>Pe(n)[Pe(e)].alignment))}))}},addKeyboardShortcuts:()=>({"Mod-Shift-l":Ch("applyAlignment",Vd.LEFT),"Mod-Shift-e":Ch("applyAlignment",Vd.CENTER),"Mod-Shift-r":Ch("applyAlignment",Vd.RIGHT),"Mod-Shift-j":Ch("applyAlignment",Vd.JUSTIFY)})}),km={mobile:null,tablet:null,desktop:null},Em=Hp.create({name:qd.LINE_HEIGHT,addGlobalAttributes(){return[{types:[Hd.PARAGRAPH,Hd.HEADING],attributes:{[qd.LINE_HEIGHT]:{isRequired:!1,parseHTML:t=>{if(t.matches('[style*="--zw-line-height"]')){return{mobile:null,tablet:t.style.getPropertyValue("--zw-line-height-tablet")||null,desktop:t.style.getPropertyValue("--zw-line-height-desktop")||null}}const e=t.style.lineHeight;if(!e)return null;const n=Kh(e,t,Pe(this.options.wrapperRef));return n?{desktop:n,tablet:n,mobile:null}:null},renderHTML:t=>t.line_height?kh({line_height_mobile:t.line_height.mobile,line_height_tablet:t.line_height.tablet,line_height_desktop:t.line_height.desktop}):null}}}]},addCommands(){return{getLineHeight:wh((({commands:t})=>{const e=t.getBlockAttributes(this.name,km),n=t.getDevice(),r=t.getDefaultLineHeight();return Ve((()=>Pe(e)?.[Pe(n)]??Pe(r)))})),getDefaultLineHeight:wh((({commands:t})=>{const e=t.getDevice(),n=t.getPreset();return Ve((()=>Pe(n)[Pe(e)].line_height))})),applyLineHeight:wh((({commands:t},e)=>{const n=Pe(t.getDevice());t.setBlockAttributes(this.name,{[n]:e},km)}))}}}),Cm=gd.create({name:"listItem",addOptions:()=>({HTMLAttributes:{}}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:t}){return["li",Cp(this.options.HTMLAttributes,t),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}).extend({name:Hd.LIST_ITEM,marks:Ud.SETTINGS,addCommands(){const t=({selection:t})=>t.$cursor.before(t.$cursor.depth-1);return{listItemNewline:wh((({commands:e,tr:n})=>{const r=n.doc.nodeAt(t(n));if(!n.selection.$cursor.node().textContent)return!1;e.splitListItem(this.name);const o=t(n);for(const t of r.marks)n.addNodeMark(o,em(t));return!0}))}},addOptions:()=>({HTMLAttributes:{class:"zw-style"}}),addKeyboardShortcuts:()=>({Enter:t=>{const{state:e,commands:n}=t.editor,r=e.selection.$cursor?.path.some((t=>t.type?.name===Hd.LIST));if(r)return n.listItemNewline()}})}),xm=gd.create({name:Hd.LIST,content:`${Hd.LIST_ITEM}+`,group:"block list",marks:Ud.SETTINGS,addExtensions:()=>[Cm],addOptions:()=>({baseClass:"",presetClass:""}),addAttributes:()=>({bullet:{default:{type:Wd.DISC}}}),parseHTML(){const t={a:Wd.ROMAN,i:Wd.LATIN,1:Wd.DECIMAL},e=e=>{for(const n of Wd.values){const r=`.${this.options.baseClass}${n}`;if(e.matches(r))return n;if(t[e.type.toLowerCase()]===n)return n}};return[{tag:"ol",getAttrs:t=>({bullet:{type:e(t)||Wd.DECIMAL}})},{tag:"ul",getAttrs:t=>({bullet:{type:e(t)||Wd.DISC}})}]},renderHTML({HTMLAttributes:t}){const e=[this.options.baseClass+t.bullet.type,this.options.presetClass];return[Wd.ordered.includes(t.bullet.type)?"ol":"ul",{class:e.join(" ")},0]},addCommands:()=>({getListType:wh((({commands:t})=>{const e=t.getBlockAttributes("bullet",{type:null});return Ve((()=>Pe(e).type??null))})),applyList:wh((({commands:t,chain:e},n)=>{if(Pe(t.getListType())!==n)return e().applyDefaultPreset().toggleList(Hd.LIST,Hd.LIST_ITEM).setBlockAttributes("bullet",{type:n}).command((({commands:t,tr:e})=>t._bubbleListItemMarks(e))).run();t.removeList()})),_bubbleListItemMarks:wh(((t,e)=>{const{doc:n,selection:r}=e,o=r.$from.start(),i=r.$to.end();function s(t,e){if(qd.inlineMarks.includes(e.type))return!1;if(e.type.isInSet(t.marks))return!1;for(const n of t.content.content)if(n.childCount){if(!n.marks)return!1;if(!e.isInSet(n.marks))return!1}return!0}n.nodesBetween(o,i,((t,n)=>{if(t.type.name===Hd.LIST)return;if(t.type.name!==Hd.LIST_ITEM)return!1;const r=[];return t.forEach((o=>{for(const i of o.marks)i.isInSet(r)?e.removeNodeMark(n+1,i):s(t,i)&&(e.removeNodeMark(n+1,i),e.addNodeMark(n,em(i)),r.push(i))})),!1}))})),removeList:wh((({commands:t,state:e})=>{const{tr:n,doc:r,selection:o}=e,i=o.$from.start(),s=o.$to.end();r.nodesBetween(i,s,((t,e,r)=>{if([Hd.LIST,Hd.LIST_ITEM].includes(t.type.name))return;if(r.type.name!==Hd.LIST_ITEM)return!1;const o=r.marks.filter((function(e){return!e.type.isInSet(t.marks)}));for(const t of o)n.addNodeMark(e,em(t));return!1})),t.liftListItem(Hd.LIST_ITEM)}))}),addInputRules(){const t=(t,e)=>function(t){return new Ip({find:t.find,handler:({state:e,range:n,match:r})=>{const o=Ap(t.getAttributes,void 0,r)||{},i=e.tr.delete(n.from,n.to),s=i.doc.resolve(n.from).blockRange(),a=s&&bu(s,t.type,o);if(!a)return null;i.wrap(s,a);const u=i.doc.resolve(n.from-1).nodeBefore;u&&u.type===t.type&&wu(i.doc,n.from-1)&&(!t.joinPredicate||t.joinPredicate(r,u))&&i.join(n.from-1)}})}({find:e,type:this.type,getAttributes:{bullet:{type:t}},joinPredicate:(e,{attrs:n})=>n.bullet.type===t});return[t(Wd.DISC,/^\s*([-+*])\s$/),t(Wd.DECIMAL,/^(\d+)\.\s$/),t(Wd.LATIN,/^([ivx]{1,3})\.\s$/i),t(Wd.ROMAN,/^([a-z])\.\s$/i)]}});function Am(t){return new el({key:new ol("autolink"),appendTransaction:(e,n,r)=>{const o=e.some((t=>t.docChanged))&&!n.doc.eq(r.doc),i=e.some((t=>t.getMeta("preventAutolink")));if(!o||i)return;const{tr:s}=r,a=function(t,e){const n=new Lu(t);return e.forEach((t=>{t.steps.forEach((t=>{n.step(t)}))})),n}(n.doc,[...e]),{mapping:u}=a,l=function(t){const{mapping:e,steps:n}=t,r=[];return e.maps.forEach(((t,o)=>{const i=[];if(t.ranges.length)t.forEach(((t,e)=>{i.push({from:t,to:e})}));else{const{from:t,to:e}=n[o];if(void 0===t||void 0===e)return;i.push({from:t,to:e})}i.forEach((({from:t,to:n})=>{const i=e.slice(o).map(t,-1),s=e.slice(o).map(n),a=e.invert().map(i,-1),u=e.invert().map(s);r.push({oldRange:{from:a,to:u},newRange:{from:i,to:s}})}))})),ad(r)}(a);return l.forEach((({oldRange:e,newRange:o})=>{ud(e.from,e.to,n.doc).filter((e=>e.mark.type===t.type)).forEach((e=>{const o=ud(u.map(e.from),u.map(e.to),r.doc).filter((e=>e.mark.type===t.type));if(!o.length)return;const i=o[0],a=n.doc.textBetween(e.from,e.to,void 0," "),l=r.doc.textBetween(i.from,i.to,void 0," "),c=_h(a),p=_h(l);c&&!p&&s.removeMark(i.from,i.to,t.type)}));const i=function(t,e,n){const r=[];return t.nodesBetween(e.from,e.to,((t,e)=>{n(t)&&r.push({node:t,pos:e})})),r}(r.doc,o,(t=>t.isTextblock));let a,l;if(i.length>1?(a=i[0],l=r.doc.textBetween(a.pos,a.pos+a.node.nodeSize,void 0," ")):i.length&&r.doc.textBetween(o.from,o.to," "," ").endsWith(" ")&&(a=i[0],l=r.doc.textBetween(a.pos,o.to,void 0," ")),a&&l){const e=l.split(" ").filter((t=>""!==t));if(e.length<=0)return!1;const n=e[e.length-1],r=a.pos+l.lastIndexOf(n);if(!n)return!1;bh(n).filter((t=>t.isLink)).filter((e=>!t.validate||t.validate(e.value))).map((t=>({...t,from:r+t.start+1,to:r+t.end+1}))).forEach((e=>{s.addMark(e.from,e.to,t.type.create({href:e.href}))}))}})),s.steps.length?s:void 0}})}const Sm=md.create({name:"link",priority:1e3,keepOnSplit:!1,onCreate(){this.options.protocols.forEach(vh)},onDestroy(){gh.scanner=null,gh.parser=null,gh.pluginQueue=[],gh.customProtocols=[],gh.initialized=!1},inclusive(){return this.options.autolink},addOptions:()=>({openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},validate:void 0}),addAttributes(){return{href:{default:null},target:{default:this.options.HTMLAttributes.target},class:{default:this.options.HTMLAttributes.class}}},parseHTML:()=>[{tag:'a[href]:not([href *= "javascript:" i])'}],renderHTML({HTMLAttributes:t}){return["a",Cp(this.options.HTMLAttributes,t),0]},addCommands(){return{setLink:t=>({chain:e})=>e().setMark(this.name,t).setMeta("preventAutolink",!0).run(),toggleLink:t=>({chain:e})=>e().toggleMark(this.name,t,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run(),unsetLink:()=>({chain:t})=>t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[vd({find:t=>bh(t).filter((t=>!this.options.validate||this.options.validate(t.value))).filter((t=>t.isLink)).map((t=>({text:t.value,index:t.start,data:t}))),type:this.type,getAttributes:t=>{var e;return{href:null===(e=t.data)||void 0===e?void 0:e.href}}})]},addProseMirrorPlugins(){const t=[];var e;return this.options.autolink&&t.push(Am({type:this.type,validate:this.options.validate})),this.options.openOnClick&&t.push((e={type:this.type},new el({key:new ol("handleClickLink"),props:{handleClick:(t,n,r)=>{var o;const i=sd(t.state,e.type.name);return!(!(null===(o=r.target)||void 0===o?void 0:o.closest("a"))||!i.href||(window.open(i.href,i.target),0))}}}))),this.options.linkOnPaste&&t.push(function(t){return new el({key:new ol("handlePasteLink"),props:{handlePaste:(e,n,r)=>{const{state:o}=e,{selection:i}=o,{empty:s}=i;if(s)return!1;let a="";r.content.forEach((t=>{a+=t.textContent}));const u=bh(a).find((t=>t.isLink&&t.value===a));return!(!a||!u||(t.editor.commands.setMark(t.type,{href:u.href}),0))}}})}({editor:this.editor,type:this.type})),t}}),Om=Sm.extend({name:qd.LINK,addPasteRules:null,addOptions(){return{...this.parent?.(),openOnClick:!1,linkOnPaste:!1}},addAttributes(){return{href:{default:null,parseHTML:t=>{const e=t.getAttribute("href");return e.startsWith("#")?parseFloat(t.getAttribute("href").replace("#","")):e}},target:{default:Kd.SELF,parseHTML:t=>t.getAttribute("target")||Kd.SELF},destination:{default:Jd.URL,parseHTML:t=>{const e=t.getAttribute("href");if(!e.startsWith("#"))return Jd.URL;const n=e.replace("#","");return Pe(this.options.pageBlocks).find((t=>t.id===parseInt(n)))?Jd.BLOCK:Jd.URL}}}},addCommands(){const{unsetLink:t}=this.parent();return{removeLink:t,applyLink:wh((({commands:t,chain:e},n)=>(t.setMeta("preventAutolink",!0),t.getSelectedText()?e().applyMark(this.name,n).expandSelectionToLink().command((({tr:t})=>(n.text&&t.insertText(n.text,t.selection.from,t.selection.to),!0))).run():t.insertContent(jm.text(n.text,[jm.mark(qd.LINK,n)]))))),expandSelectionToLink:wh((({commands:t})=>{t.expandSelection((({node:t})=>this.type.isInSet(t.marks)))})),isLink:wh((({commands:t})=>t.hasMark(this.name))),getLinkPreset:wh((()=>Ve((()=>this.options.preset))))}},addProseMirrorPlugins(){return[...this.parent(),Dh.create(this.editor)]},renderHTML({HTMLAttributes:t}){const e=t.destination===Jd.BLOCK?`#${t.href}`:t.href,n=Pe(this.options.basePresetClass)+Pe(this.options.preset).id;return["a",{href:e,target:t.target,class:`${n} zw-style`},0]}}),Nm=md.create({name:qd.SUPERSCRIPT,addCommands(){return{applySuperscript:wh((({commands:t})=>{t.setMark(this.name)})),removeSuperscript:wh((({commands:t})=>{t.unsetMark(this.name)})),toggleSuperscript:wh((({commands:t})=>{Pe(t.isSuperscript())?t.removeSuperscript():t.applySuperscript()})),isSuperscript:wh((({commands:t})=>{const e=t.getMark(this.name);return Ve((()=>!!Pe(e)))}))}},parseHTML:()=>[{tag:"sup"},{style:"vertical-align",getAttrs:t=>"super"===t&&null}],renderHTML:()=>["sup",{class:"zw-superscript"},0]}),Tm=Hp.create({name:qd.MARGIN,addGlobalAttributes:()=>[{types:[Hd.PARAGRAPH,Hd.HEADING],attributes:{[qd.MARGIN]:{isRequired:!1,parseHTML(t){const{margin:e,marginTop:n,marginRight:r,marginBottom:o,marginLeft:i}=t.style;if(![e,n,r,o,i].some((t=>!!t)))return null;if(e)return{value:e};return{value:[n||0,r||0,o||0,i||0].join(" ")}},renderHTML:t=>t.margin?kh({margin:t.margin.value}):null}}}]});function Fm(t){const e=e=>t.presetsRef.value.find((t=>t.id===e)),n=function(t){return Fe(t,!1),t}({default:null,link:null});return Ge(t.presetsRef,(()=>{n.default=e(t.defaultPresetId),n.link=e(t.linkPresetId)}),{immediate:!0}),[im,am,lm,yd,Pd,nm,rm,om,cm].concat([dm.configure({presets:t.presetsRef,defaultId:t.defaultPresetId,styleRenderer:new zm({baseClass:t.basePresetClass,makeVariable:t.makePresetVariable,linkPresetId:t.linkPresetId})}),xm.configure({baseClass:t.baseListClass,presetClass:t.basePresetClass+t.defaultPresetId}),vm.configure({device:t.deviceRef}),hm.configure({minSize:t.minFontSize,maxSize:t.maxFontSize,wrapperRef:t.wrapperRef}),pm.configure({fonts:t.fonts,defaultPreset:ze(n,"default")}),fm,mm,gm,ym,bm,_m,Nm,wm,Em.configure({wrapperRef:t.wrapperRef}),Om.configure({preset:ze(n,"link"),basePresetClass:t.basePresetClass,pageBlocks:t.pageBlocksRef}),Tm])}class Mm{_domParser=new DOMParser;types=window;parse(t){return this._domParser.parseFromString(t,"text/html")}}class Im{content;constructor({content:t}){this.content=t}normalize(){throw new Error("Implement abstract method")}}class $m extends Im{static BLOCK_NODE_NAMES=["P","H1","H2","H3","H4"];static ROOT_NODE_NAMES=$m.BLOCK_NODE_NAMES.concat("UL","OL");static BLOCK_STYLES=["text-align","line-height","margin","margin-top","margin-bottom","margin-left","margin-right"];_parser;constructor({content:t,parser:e}){super({content:t}),this._parser=e,this.dom=null}normalize(){return this.normalizeHTML(),this.normalizedHTML}normalizeHTML(){this.dom=this._parser.parse(this.content.replace(/(\r)?\n/g,"")),this._removeComments(),this._normalizeRootTags(),this._iterateNodes(this._normalizeBreakLines,(t=>"BR"===t.tagName)),this._iterateNodes(this._removeEmptyNodes,this._isBlockNode),this._iterateNodes(this._normalizeListItems,(t=>"LI"===t.tagName)),this._normalizeBlockTextDecoration(),this._normalizeBlockBackgroundColor()}get normalizedHTML(){return this.dom.body.innerHTML}get _NodeFilter(){return this._parser.types.NodeFilter}get _Node(){return this._parser.types.Node}_removeComments(){const t=this._createNodeIterator(this._NodeFilter.SHOW_COMMENT);this._runIterator(t,(t=>t.remove()))}_normalizeRootTags(){const t=Array.from(this.dom.body.childNodes),e=this.dom.createDocumentFragment();let n;for(const r of t)this._isRootNode(r)?(e.append(r),n=null):(n||(n=this.dom.createElement("p"),e.append(n)),n.append(r));this.dom.body.innerHTML="",this.dom.body.append(e)}_createNodeIterator(t,e){return this.dom.createNodeIterator(this.dom.body,t,e)}_iterateNodes(t,e=(()=>!0)){const n=t=>"BODY"!==t.tagName&&e.call(this,t),r=this._createNodeIterator(this._NodeFilter.SHOW_ELEMENT,{acceptNode:t=>n(t)?this._NodeFilter.FILTER_ACCEPT:this._NodeFilter.FILTER_REJECT});this._runIterator(r,t)}_runIterator(t,e){let n=t.nextNode();for(;n;)e.call(this,n),n=t.nextNode()}_removeEmptyNodes(t){t.innerHTML.trim()||t.remove()}_normalizeListItems(t){const e=this.dom.createDocumentFragment(),n=Array.from(t.childNodes);let r,o;const i=n=>{this._assignElementProperties(n,t,$m.BLOCK_STYLES),e.append(n)};this._assignElementProperties(t,t.parentElement,$m.BLOCK_STYLES);for(const t of n)if(this._isBlockNode(t))i(t),r=null,o=t;else if("BR"===t.tagName&&o&&"BR"!==o?.tagName)t.remove(),o=t;else if("BR"!==t.tagName)r||(r=this.dom.createElement("p"),i(r)),r.append(t),o=t;else{const e=this.dom.createElement("p");e.append(t),i(e),r=null,o=t}t.append(e),this._removeStyleProperties(t,$m.BLOCK_STYLES)}_isBlockNode(t){return $m.BLOCK_NODE_NAMES.includes(t.tagName)}_isRootNode(t){return $m.ROOT_NODE_NAMES.includes(t.tagName)}_assignElementProperties(t,e,n){for(const r of n){const n=e.style.getPropertyValue(r);n&&!t.style.getPropertyValue(r)&&t.style.setProperty(r,n)}}_removeStyleProperties(t,e){for(const n of e)t.style.removeProperty(n);0===t.style.length&&t.removeAttribute("style")}_normalizeBreakLines({parentElement:t}){if(!this._isBlockNode(t))return;if(!t.textContent)return;const e=this.dom.createDocumentFragment(),n=Array.from(t.childNodes),r=t.cloneNode(!0);r.innerHTML="";let o=r.cloneNode();const i=n=>{this._assignElementProperties(n,t,$m.BLOCK_STYLES),e.append(n)};for(const t of n)"BR"!==t.tagName?o.append(t):(i(o),o=r.cloneNode());e.append(o),t.replaceWith(e)}_normalizeBlockTextDecoration(){const t=this.dom.querySelectorAll('[style*="text-decoration"]:where(p, h1, h2, h3, h4, li)');for(const e of t)this._moveTextDecorationToChildren(e)}_moveTextDecorationToChildren(t){const e=this._parseTextDecoration(t);if(t.style.removeProperty("text-decoration-line"),t.style.removeProperty("text-decoration"),t.style.cssText||t.removeAttribute("style"),!e.none)for(const n of t.childNodes){const r=this._wrapTextNode(t,n),o=this._parseTextDecoration(r),i={underline:o.underline||e.underline,line_through:o.line_through||e.line_through};r.style.removeProperty("text-decoration-line"),r.style.removeProperty("text-decoration"),r.style.textDecoration=Object.entries(i).filter((([,t])=>t)).map((([t])=>t.replace("_","-"))).join(" ")}}_parseTextDecoration(t){const{textDecoration:e,textDecorationLine:n}=t.style,r=e||n||"";return{none:r.includes("none"),underline:r.includes("underline"),line_through:r.includes("line-through")}}_normalizeBlockBackgroundColor(){const t=this.dom.querySelectorAll('[style*="background-color"]:where(p, h1, h2, h3, h4, li)');for(const e of t)this._moveBackgroundColorToChildren(e)}_moveBackgroundColorToChildren(t){const e=t.style.backgroundColor;t.style.removeProperty("background-color"),t.style.cssText||t.removeAttribute("style");for(const n of t.childNodes){const r=this._wrapTextNode(t,n),o=r.style.backgroundColor||e;r.style.backgroundColor=o}}_wrapTextNode(t,e){if(e.nodeType!==this._Node.TEXT_NODE)return e;const n=this.dom.createElement("span");return n.append(e.cloneNode()),t.replaceChild(n,e),n}}class Bm extends Im{normalize(){return this._iterateNodes(this._bubbleMarks),this.content}_iterateNodes(t){this._iterateChildNodes(this.content,t)}_iterateChildNodes(t,e){for(const n of t.content)n.content&&this._iterateChildNodes(n,e),e.call(this,n)}_bubbleMarks(t){if(t.content&&t.type!==Hd.LIST)for(const e of t.content)if(!this._isLink(e)&&e.marks)for(const n of e.marks.slice())this._includesMark(t,n)?this._removeMark(e,n):this._canBubbleMark(t,n)&&(this._removeMark(e,n),this._addMark(t,n))}_canBubbleMark(t,e){if(qd.inlineMarks.includes(e.type))return!1;if(this._includesMarkType(t,e.type))return!1;for(const n of t.content)if(n.content||t.type!==Hd.LIST_ITEM){if(!n.marks)return!1;if(!this._includesMark(n,e))return!1}return!0}_includesMark(t,e){return t.marks?.some((t=>tm.isEqual(t,e)))??!1}_includesMarkType(t,e){return t.marks?.some((t=>t.type===e))??!1}_isLink(t){return t.type===Hd.TEXT&&this._includesMarkType(t,qd.LINK)}_removeMark(t,e){if(!t.marks)return;const n=this._findMarkIndexByType(t,e.type);n>=0&&t.marks.splice(n,1),t.marks.length||delete t.marks}_addMark(t,e){this._removeMark(t,e),t.marks??=[],t.marks.push(e)}_findMarkIndexByType(t,e){return t.marks?.findIndex((t=>t.type===e))??null}}class Rm{static build(t,e={}){return"string"==typeof t?this._buildHtml(t,e):this._buildJson(t)}static _buildHtml(t,e){return new $m({content:t,parser:e.parser||new Mm})}static _buildJson(t){return new Bm({content:t})}static normalize(t,e={}){return Rm.build(t,e).normalize()}}class Lm{static window=globalThis.window;static use(t){this.window=t}static get document(){return this.window.document}static get body(){return this.document.body}static get head(){return this.document.head}static getComputedStyle(t){return this.window.getComputedStyle(t)}}class Pm{static build({config:t,nodeDomParser:e}){const n=function(t){return Np(jp.resolve(t))}(Fm({fonts:t.fonts,minFontSize:0,maxFontSize:0,presetsRef:Le(t.presets),defaultPresetId:t.defaultPresetId,linkPresetId:t.linkPresetId,makePresetVariable:()=>"",basePresetClass:t.basePresetClass,baseListClass:t.baseListClass,deviceRef:Le(jd.DESKTOP),pageBlocksRef:Le([]),wrapperRef:Lm.document.createElement("p")}));return new Pm({schema:n,domParser:za.fromSchema(n),nodeDomParser:e})}_schema;_domParser;_nodeDomParser;constructor({schema:t,domParser:e,nodeDomParser:n}){this._schema=t,this._domParser=e,this._nodeDomParser=n}toJSON(t){const e=Rm.build(t,{parser:this._nodeDomParser});return e.normalizeHTML(),this._domParser.parse(e.dom.body).toJSON()}}class jm{static doc(t){return{type:Hd.DOCUMENT,content:t}}static list(t,e){return{type:Hd.LIST,attrs:{bullet:{type:t}},content:e.map((t=>t.type===Hd.LIST_ITEM?t:this.listItem([].concat(t))))}}static listItem(...t){const{attrs:e,content:n,marks:r}=this._normalizeTextBlockArgs(t);return{type:Hd.LIST_ITEM,...e?{attrs:e}:{},...r?{marks:r}:{},content:[].concat(n).map((t=>"string"==typeof t?this.paragraph(t):t))}}static heading(t,...e){const n=this._textBlock(e,this.text);return n.attrs??={},n.attrs.level=t,{type:Hd.HEADING,...n}}static paragraph(...t){return{type:Hd.PARAGRAPH,...this._textBlock(t,this.text)}}static _textBlock(t){const{attrs:e,content:n,marks:r}=this._normalizeTextBlockArgs(t);return{content:"string"==typeof n?[this.text(n)]:n,...e?{attrs:e}:{},...r?{marks:r}:{}}}static _normalizeTextBlockArgs(t){return 1===t.length?{attrs:null,marks:null,content:t[0]}:2===t.length?{attrs:t[0],marks:null,content:t[1]}:{attrs:t[0],marks:t[1],content:t[2]}}static text(t,e){return{type:Hd.TEXT,...e?{marks:e}:{},text:t}}static link(t,e,n=[]){return this.text(t,[this.mark(qd.LINK,e),...n])}static mark(t,e){return{type:t,attrs:e}}static populateAllDevices(t){return{mobile:t,tablet:t,desktop:t}}}class zm{_baseClass;_makeVariable;_linkPresetId;constructor({baseClass:t,makeVariable:e,linkPresetId:n}){this._baseClass=t,this._makeVariable=e,this._linkPresetId=n}inject(t,e){let n=t.querySelector("[data-zw-styles]");n||(n=Lm.document.createElement("style"),n.dataset.zwStyles="",n.innerHTML=this.render(e),t.append(n))}render(t){let e="";for(const n of t){const t=n.id===this._linkPresetId;e+=` ${this.makePresetCssClass(n)} {`;for(const r of jd.values)for(const o of Object.keys(n[r])){const i=this._makeVariable({device:r,preset:n,property:o}),s=this._makeInternalVariableName(o,r);if(e+=`${s}: var(${i}, inherit);`,t&&!qd.attributes.includes(o)){e+=`${s.replace("preset-","")}: var(${s});`}}e+="}"}return e}_makeInternalVariableName(t,e){return`--zw-preset-${"color"===t?"font-color":t.replace(/_/i,"-")}${e===jd.COMMON?"":`-${e}`}`}makePresetHtmlClass(t){return this._baseClass+t.id}makePresetCssClass(t){return this.makePresetHtmlClass(t).split(" ").map((t=>`.${t}`)).join("")}}class Vm{static _instance;static get instance(){return this._instance??=new Vm,this._instance}static query(t,e){return this.instance.query(t,e)}query(t,e){let n=null;return t.descendants((t=>!n&&(this.matchNode(t,e)?(n=t,!1):void 0))),n?e.getMark?this.getMark(n,e.getMark):n:null}matchNode(t,e){return(!e.typeName||e.typeName===t.type.name)&&!(e.mark&&!this.getMark(t,e.mark))}getMark(t,e){return t.marks.find((t=>this.matchMark(t,e)))||null}matchMark(t,e){return t.type.name===e.typeName}}class Hm{static createWindow(){return(new i.JSDOM).window}types;parse(t){const{window:e}=new i.JSDOM(t);return this.types=e,e.document}}class Wm{name;description;argument;options=[];doCommand(){throw new Error('Command "doCommand" is required')}install(t){if(!this.name)throw new Error('Command "name" is required');let e=t.command(this.name);if(this.description&&(e=e.description(this.description)),this.argument&&(e=e.argument(this.argument)),this.options.length)for(const t of this.options)e=e.option(t.flags,t.description,t.default);e.action(this.doCommand.bind(this))}output(t){console.log(t)}}const qm=new q,Um=[class extends Wm{name="to-json";description="migrate html to json";argument="<html...>";options=[{flags:"-c, --config <path>",description:"Generator config",default:n.resolve(__dirname,"../bin/zp.config.json")},{flags:"-f, --format <type>",description:"Set output format",default:"rb"}];doCommand(t,{config:e,format:r}){Lm.use(Hm.createWindow());const o=n.resolve(process.cwd(),e),i=Pm.build({config:require(o).editor,nodeDomParser:new Hm}),s=t.map((t=>i.toJSON(this._formatInputHtml(t)))),a=1===s.length?s[0]:s,u=this._stringifyContent(a);this.output("rb"===r?this._formatOutputRb(u):u)}_formatInputHtml(t){return t.replace(/\\(["'])/g,"$1").replace(/rgba\(\d{1,3}, ?\d{1,3}, ?\d{1,3}, (\d{1,2}%)\)/g,((t,e)=>t.replace(e,parseFloat(e)/100)))}_stringifyContent(t){return JSON.stringify(t,((t,e)=>null===e?void 0:e),2)}_formatOutputRb(t){return t.replace(/\\"/g,'"').replace(/font-family: ?'(.+)'/g,'font-family: "$1"').replace(/'/g,"\\'").replace(/^[\t ]*"[^:\n\r]+(?<!\\)":/gm,(t=>t.replace(/"/g,""))).replace(/: "(.+)"([,\n])/g,": '$1'$2")}},class extends Wm{name="version";description="display cli version";doCommand(){this.output("3.1.3-1")}}];for(const t of Um)(new t).install(qm);qm.parse();
package/dist/wysiwyg.mjs CHANGED
@@ -17819,7 +17819,9 @@ const Link = Link$1.extend({
17819
17819
  };
17820
17820
  },
17821
17821
  addCommands() {
17822
+ const { unsetLink } = this.parent();
17822
17823
  return {
17824
+ removeLink: unsetLink,
17823
17825
  applyLink: createCommand(({ commands: commands2, chain }, attributes) => {
17824
17826
  commands2.setMeta("preventAutolink", true);
17825
17827
  if (!commands2.getSelectedText()) {
@@ -27283,7 +27285,7 @@ function useLink() {
27283
27285
  }).run();
27284
27286
  }
27285
27287
  function removeLink() {
27286
- editor.chain().focus().unsetLink().run();
27288
+ editor.chain().focus().removeLink().run();
27287
27289
  resetDestinations();
27288
27290
  updateTarget(false);
27289
27291
  }
@@ -11,7 +11,7 @@ const createEditor = (text, destination) => ({
11
11
  expandSelectionToLink: jest.fn(),
12
12
  getSelectedText: jest.fn(() => text ?? ''),
13
13
  focus: jest.fn().mockReturnThis(),
14
- unsetLink: jest.fn().mockReturnThis(),
14
+ removeLink: jest.fn().mockReturnThis(),
15
15
  applyLink: jest.fn().mockReturnThis(),
16
16
  run: jest.fn()
17
17
  },
@@ -78,7 +78,7 @@ describe('actions with link', () => {
78
78
 
79
79
  link.removeLink();
80
80
 
81
- expect(link.editor.commands.unsetLink).toHaveBeenCalled();
81
+ expect(link.editor.commands.removeLink).toHaveBeenCalled();
82
82
  });
83
83
 
84
84
  test('should apply link', () => {
@@ -62,7 +62,7 @@ export function useLink() {
62
62
  }
63
63
 
64
64
  function removeLink() {
65
- editor.chain().focus().unsetLink().run();
65
+ editor.chain().focus().removeLink().run();
66
66
  resetDestinations();
67
67
  updateTarget(false);
68
68
  }
@@ -54,7 +54,11 @@ export const Link = Base.extend({
54
54
  },
55
55
 
56
56
  addCommands() {
57
+ const { unsetLink } = this.parent();
58
+
57
59
  return {
60
+ removeLink: unsetLink,
61
+
58
62
  applyLink: createCommand(({ commands, chain }, attributes) => {
59
63
  commands.setMeta('preventAutolink', true);
60
64
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zipify/wysiwyg",
3
- "version": "3.1.3-0",
3
+ "version": "3.1.3-1",
4
4
  "description": "Zipify modification of TipTap text editor",
5
5
  "main": "dist/wysiwyg.mjs",
6
6
  "bin": {