@zipify/wysiwyg 4.2.1 → 4.2.2-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/config/build/lib.config.ts +1 -1
- package/dist/cli.js +1 -1
- package/dist/wysiwyg.mjs +250 -1337
- package/package.json +8 -4
package/dist/cli.js
CHANGED
|
@@ -21,4 +21,4 @@
|
|
|
21
21
|
* Released under MIT license <https://lodash.com/license>
|
|
22
22
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
23
23
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
24
|
-
*/Kh=Gh,Jh=Gh.exports,function(){var t,e="Expected a function",n="__lodash_hash_undefined__",r="__lodash_placeholder__",o=16,i=32,a=64,l=128,c=256,u=1/0,h=9007199254740991,p=NaN,d=4294967295,f=[["ary",l],["bind",1],["bindKey",2],["curry",8],["curryRight",o],["flip",512],["partial",i],["partialRight",a],["rearg",c]],m="[object Arguments]",g="[object Array]",y="[object Boolean]",v="[object Date]",b="[object Error]",_="[object Function]",w="[object GeneratorFunction]",k="[object Map]",x="[object Number]",S="[object Object]",E="[object Promise]",O="[object RegExp]",C="[object Set]",A="[object String]",M="[object Symbol]",T="[object WeakMap]",N="[object ArrayBuffer]",I="[object DataView]",R="[object Float32Array]",L="[object Float64Array]",D="[object Int8Array]",$="[object Int16Array]",P="[object Int32Array]",z="[object Uint8Array]",j="[object Uint8ClampedArray]",F="[object Uint16Array]",H="[object Uint32Array]",B=/\b__p \+= '';/g,V=/\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=/,? & /,lt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ct=/[()=,{}\[\]\/\s]/,ut=/\\(\\)?/g,ht=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pt=/\w*$/,dt=/^[-+]0x[0-9a-f]+$/i,ft=/^0b[01]+$/i,mt=/^\[object .+?Constructor\]$/,gt=/^0o[0-7]+$/i,yt=/^(?:0|[1-9]\d*)$/,vt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,bt=/($^)/,_t=/['\n\r\u2028\u2029\\]/g,wt="\\ud800-\\udfff",kt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",xt="\\u2700-\\u27bf",St="a-z\\xdf-\\xf6\\xf8-\\xff",Et="A-Z\\xc0-\\xd6\\xd8-\\xde",Ot="\\ufe0e\\ufe0f",Ct="\\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",At="['’]",Mt="["+wt+"]",Tt="["+Ct+"]",Nt="["+kt+"]",It="\\d+",Rt="["+xt+"]",Lt="["+St+"]",Dt="[^"+wt+Ct+It+xt+St+Et+"]",$t="\\ud83c[\\udffb-\\udfff]",Pt="[^"+wt+"]",zt="(?:\\ud83c[\\udde6-\\uddff]){2}",jt="[\\ud800-\\udbff][\\udc00-\\udfff]",Ft="["+Et+"]",Ht="\\u200d",Bt="(?:"+Lt+"|"+Dt+")",Vt="(?:"+Ft+"|"+Dt+")",Wt="(?:['’](?:d|ll|m|re|s|t|ve))?",qt="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ut="(?:"+Nt+"|"+$t+")?",Kt="["+Ot+"]?",Jt=Kt+Ut+"(?:"+Ht+"(?:"+[Pt,zt,jt].join("|")+")"+Kt+Ut+")*",Gt="(?:"+[Rt,zt,jt].join("|")+")"+Jt,Yt="(?:"+[Pt+Nt+"?",Nt,zt,jt,Mt].join("|")+")",Xt=RegExp(At,"g"),Zt=RegExp(Nt,"g"),Qt=RegExp($t+"(?="+$t+")|"+Yt+Jt,"g"),te=RegExp([Ft+"?"+Lt+"+"+Wt+"(?="+[Tt,Ft,"$"].join("|")+")",Vt+"+"+qt+"(?="+[Tt,Ft+Bt,"$"].join("|")+")",Ft+"?"+Bt+"+"+Wt,Ft+"+"+qt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",It,Gt].join("|"),"g"),ee=RegExp("["+Ht+wt+kt+Ot+"]"),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[R]=ie[L]=ie[D]=ie[$]=ie[P]=ie[z]=ie[j]=ie[F]=ie[H]=!0,ie[m]=ie[g]=ie[N]=ie[y]=ie[I]=ie[v]=ie[b]=ie[_]=ie[k]=ie[x]=ie[S]=ie[O]=ie[C]=ie[A]=ie[T]=!1;var se={};se[m]=se[g]=se[N]=se[I]=se[y]=se[v]=se[R]=se[L]=se[D]=se[$]=se[P]=se[k]=se[x]=se[S]=se[O]=se[C]=se[A]=se[M]=se[z]=se[j]=se[F]=se[H]=!0,se[b]=se[_]=se[T]=!1;var ae={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},le=parseFloat,ce=parseInt,ue="object"==typeof s&&s&&s.Object===Object&&s,he="object"==typeof self&&self&&self.Object===Object&&self,pe=ue||he||Function("return this")(),de=Jh&&!Jh.nodeType&&Jh,fe=de&&Kh&&!Kh.nodeType&&Kh,me=fe&&fe.exports===de,ge=me&&ue.process,ye=function(){try{var t=fe&&fe.require&&fe.require("util").types;return t||ge&&ge.binding&&ge.binding("util")}catch(t){}}(),ve=ye&&ye.isArrayBuffer,be=ye&&ye.isDate,_e=ye&&ye.isMap,we=ye&&ye.isRegExp,ke=ye&&ye.isSet,xe=ye&&ye.isTypedArray;function Se(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 Ee(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 Oe(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function Ce(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function Ae(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 Me(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 Te(t,e){return!(null==t||!t.length)&&Fe(t,e,0)>-1}function Ne(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 Ie(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 Re(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}function Le(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 De(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 $e(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 Pe=We("length");function ze(t,e,n){var r;return n(t,(function(t,n,o){if(e(t,n,o))return r=n,!1})),r}function je(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 Fe(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):je(t,Be,n)}function He(t,e,n,r){for(var o=n-1,i=t.length;++o<i;)if(r(t[o],e))return o;return-1}function Be(t){return t!=t}function Ve(t,e){var n=null==t?0:t.length;return n?Ke(t,e)/n:p}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,dn(t)+1).replace(rt,""):t}function Ye(t){return function(e){return t(e)}}function Xe(t,e){return Ie(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&&Fe(e,t[n],0)>-1;);return n}function tn(t,e){for(var n=t.length;n--&&Fe(e,t[n],0)>-1;);return n}var en=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"}),nn=qe({"&":"&","<":"<",">":">",'"':""","'":"'"});function rn(t){return"\\"+ae[t]}function on(t){return ee.test(t)}function sn(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function an(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 un(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}function hn(t){return on(t)?function(t){for(var e=Qt.lastIndex=0;Qt.test(t);)++e;return e}(t):Pe(t)}function pn(t){return on(t)?function(t){return t.match(Qt)||[]}(t):function(t){return t.split("")}(t)}function dn(t){for(var e=t.length;e--&&ot.test(t.charAt(e)););return e}var fn=qe({"&":"&","<":"<",">":">",""":'"',"'":"'"}),mn=function s(ot){var wt,kt=(ot=null==ot?pe:mn.defaults(pe.Object(),ot,mn.pick(pe,re))).Array,xt=ot.Date,St=ot.Error,Et=ot.Function,Ot=ot.Math,Ct=ot.Object,At=ot.RegExp,Mt=ot.String,Tt=ot.TypeError,Nt=kt.prototype,It=Et.prototype,Rt=Ct.prototype,Lt=ot["__core-js_shared__"],Dt=It.toString,$t=Rt.hasOwnProperty,Pt=0,zt=(wt=/[^.]+$/.exec(Lt&&Lt.keys&&Lt.keys.IE_PROTO||""))?"Symbol(src)_1."+wt:"",jt=Rt.toString,Ft=Dt.call(Ct),Ht=pe._,Bt=At("^"+Dt.call($t).replace(et,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Vt=me?ot.Buffer:t,Wt=ot.Symbol,qt=ot.Uint8Array,Ut=Vt?Vt.allocUnsafe:t,Kt=an(Ct.getPrototypeOf,Ct),Jt=Ct.create,Gt=Rt.propertyIsEnumerable,Yt=Nt.splice,Qt=Wt?Wt.isConcatSpreadable:t,ee=Wt?Wt.iterator:t,ae=Wt?Wt.toStringTag:t,ue=function(){try{var t=di(Ct,"defineProperty");return t({},"",{}),t}catch(t){}}(),he=ot.clearTimeout!==pe.clearTimeout&&ot.clearTimeout,de=xt&&xt.now!==pe.Date.now&&xt.now,fe=ot.setTimeout!==pe.setTimeout&&ot.setTimeout,ge=Ot.ceil,ye=Ot.floor,Pe=Ct.getOwnPropertySymbols,qe=Vt?Vt.isBuffer:t,gn=ot.isFinite,yn=Nt.join,vn=an(Ct.keys,Ct),bn=Ot.max,_n=Ot.min,wn=xt.now,kn=ot.parseInt,xn=Ot.random,Sn=Nt.reverse,En=di(ot,"DataView"),On=di(ot,"Map"),Cn=di(ot,"Promise"),An=di(ot,"Set"),Mn=di(ot,"WeakMap"),Tn=di(Ct,"create"),Nn=Mn&&new Mn,In={},Rn=ji(En),Ln=ji(On),Dn=ji(Cn),$n=ji(An),Pn=ji(Mn),zn=Wt?Wt.prototype:t,jn=zn?zn.valueOf:t,Fn=zn?zn.toString:t;function Hn(t){if(na(t)&&!qs(t)&&!(t instanceof qn)){if(t instanceof Wn)return t;if($t.call(t,"__wrapped__"))return Fi(t)}return new Wn(t)}var Bn=function(){function e(){}return function(n){if(!ea(n))return{};if(Jt)return Jt(n);e.prototype=n;var r=new e;return e.prototype=t,r}}();function Vn(){}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__=d,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=qs(t),r=!n&&Ws(t),o=!n&&!r&&Gs(t),i=!n&&!r&&!o&&ua(t),s=n||r||o||i,a=s?Je(t.length,Mt):[],l=a.length;for(var c in t)!e&&!$t.call(t,c)||s&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||_i(c,l))||a.push(c);return a}function Zn(e){var n=e.length;return n?e[Gr(0,n-1)]:t}function Qn(t,e){return $i(No(t),lr(e,0,t.length))}function tr(t){return $i(No(t))}function er(e,n,r){(r!==t&&!Hs(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)&&Hs(o,r)&&(r!==t||n in e)||sr(e,n,r)}function rr(t,e){for(var n=t.length;n--;)if(Hs(t[n][0],e))return n;return-1}function or(t,e,n,r){return dr(t,(function(t,o,i){e(r,t,n(t),i)})),r}function ir(t,e){return t&&Io(e,Ia(e),t)}function sr(t,e,n){"__proto__"==e&&ue?ue(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=kt(o),s=null==e;++r<o;)i[r]=s?t:Ca(e,n[r]);return i}function lr(e,n,r){return e==e&&(r!==t&&(e=e<=r?e:r),n!==t&&(e=e>=n?e:n)),e}function cr(e,n,r,o,i,s){var a,l=1&n,c=2&n,u=4&n;if(r&&(a=i?r(e,o,i,s):r(e)),a!==t)return a;if(!ea(e))return e;var h=qs(e);if(h){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),!l)return No(e,a)}else{var p=gi(e),d=p==_||p==w;if(Gs(e))return Eo(e,l);if(p==S||p==m||d&&!i){if(a=c||d?{}:vi(e),!l)return c?function(t,e){return Io(t,mi(t),e)}(e,function(t,e){return t&&Io(e,Ra(e),t)}(a,e)):function(t,e){return Io(t,fi(t),e)}(e,ir(a,e))}else{if(!se[p])return i?e:{};a=function(t,e,n){var r,o=t.constructor;switch(e){case N:return Oo(t);case y:case v:return new o(+t);case I:return function(t,e){var n=e?Oo(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case R:case L:case D:case $:case P:case z:case j:case F:case H:return Co(t,n);case k:return new o;case x:case A:return new o(t);case O:return function(t){var e=new t.constructor(t.source,pt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case C:return new o;case M:return r=t,jn?Ct(jn.call(r)):{}}}(e,p,l)}}s||(s=new Yn);var f=s.get(e);if(f)return f;s.set(e,a),aa(e)?e.forEach((function(t){a.add(cr(t,n,r,t,e,s))})):ra(e)&&e.forEach((function(t,o){a.set(o,cr(t,n,r,o,e,s))}));var g=h?t:(u?c?si:ii:c?Ra:Ia)(e);return Oe(g||e,(function(t,o){g&&(t=e[o=t]),nr(a,o,cr(t,n,r,o,e,s))})),a}function ur(e,n,r){var o=r.length;if(null==e)return!o;for(e=Ct(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 hr(n,r,o){if("function"!=typeof n)throw new Tt(e);return Ii((function(){n.apply(t,o)}),r)}function pr(t,e,n,r){var o=-1,i=Te,s=!0,a=t.length,l=[],c=e.length;if(!a)return l;n&&(e=Ie(e,Ye(n))),r?(i=Ne,s=!1):e.length>=200&&(i=Ze,s=!1,e=new Gn(e));t:for(;++o<a;){var u=t[o],h=null==n?u:n(u);if(u=r||0!==u?u:0,s&&h==h){for(var p=c;p--;)if(e[p]===h)continue t;l.push(u)}else i(e,h,r)||l.push(u)}return l}Hn.templateSettings={escape:G,evaluate:Y,interpolate:X,variable:"",imports:{_:Hn}},Hn.prototype=Vn.prototype,Hn.prototype.constructor=Hn,Wn.prototype=Bn(Vn.prototype),Wn.prototype.constructor=Wn,qn.prototype=Bn(Vn.prototype),qn.prototype.constructor=qn,Un.prototype.clear=function(){this.__data__=Tn?Tn(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(Tn){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 Tn?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]=Tn&&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():Yt.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(On||Kn),string:new Un}},Jn.prototype.delete=function(t){var e=hi(this,t).delete(t);return this.size-=e?1:0,e},Jn.prototype.get=function(t){return hi(this,t).get(t)},Jn.prototype.has=function(t){return hi(this,t).has(t)},Jn.prototype.set=function(t,e){var n=hi(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(!On||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 dr=Do(wr),fr=Do(kr,!0);function mr(t,e){var n=!0;return dr(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&&(l===t?a==a&&!ca(a):r(a,l)))var l=a,c=s}return c}function yr(t,e){var n=[];return dr(t,(function(t,r,o){e(t,r,o)&&n.push(t)})),n}function vr(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?vr(a,e-1,n,r,o):Re(o,a):r||(o[o.length]=a)}return o}var br=$o(),_r=$o(!0);function wr(t,e){return t&&br(t,e,Ia)}function kr(t,e){return t&&_r(t,e,Ia)}function xr(t,e){return Me(e,(function(e){return Zs(t[e])}))}function Sr(e,n){for(var r=0,o=(n=wo(n,e)).length;null!=e&&r<o;)e=e[zi(n[r++])];return r&&r==o?e:t}function Er(t,e,n){var r=e(t);return qs(t)?r:Re(r,n(t))}function Or(e){return null==e?e===t?"[object Undefined]":"[object Null]":ae&&ae in Ct(e)?function(e){var n=$t.call(e,ae),r=e[ae];try{e[ae]=t;var o=!0}catch(t){}var i=jt.call(e);return o&&(n?e[ae]=r:delete e[ae]),i}(e):function(t){return jt.call(t)}(e)}function Cr(t,e){return t>e}function Ar(t,e){return null!=t&&$t.call(t,e)}function Mr(t,e){return null!=t&&e in Ct(t)}function Tr(e,n,r){for(var o=r?Ne:Te,i=e[0].length,s=e.length,a=s,l=kt(s),c=1/0,u=[];a--;){var h=e[a];a&&n&&(h=Ie(h,Ye(n))),c=_n(h.length,c),l[a]=!r&&(n||i>=120&&h.length>=120)?new Gn(a&&h):t}h=e[0];var p=-1,d=l[0];t:for(;++p<i&&u.length<c;){var f=h[p],m=n?n(f):f;if(f=r||0!==f?f:0,!(d?Ze(d,m):o(u,m,r))){for(a=s;--a;){var g=l[a];if(!(g?Ze(g,m):o(e[a],m,r)))continue t}d&&d.push(m),u.push(f)}}return u}function Nr(e,n,r){var o=null==(e=Mi(e,n=wo(n,e)))?e:e[zi(Xi(n))];return null==o?t:Se(o,e,r)}function Ir(t){return na(t)&&Or(t)==m}function Rr(e,n,r,o,i){return e===n||(null==e||null==n||!na(e)&&!na(n)?e!=e&&n!=n:function(e,n,r,o,i,s){var a=qs(e),l=qs(n),c=a?g:gi(e),u=l?g:gi(n),h=(c=c==m?S:c)==S,p=(u=u==m?S:u)==S,d=c==u;if(d&&Gs(e)){if(!Gs(n))return!1;a=!0,h=!1}if(d&&!h)return s||(s=new Yn),a||ua(e)?ri(e,n,r,o,i,s):function(t,e,n,r,o,i,s){switch(n){case I:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case N:return!(t.byteLength!=e.byteLength||!i(new qt(t),new qt(e)));case y:case v:case x:return Hs(+t,+e);case b:return t.name==e.name&&t.message==e.message;case O:case A:return t==e+"";case k:var a=sn;case C:var l=1&r;if(a||(a=cn),t.size!=e.size&&!l)return!1;var c=s.get(t);if(c)return c==e;r|=2,s.set(t,e);var u=ri(a(t),a(e),r,o,i,s);return s.delete(t),u;case M:if(jn)return jn.call(t)==jn.call(e)}return!1}(e,n,c,r,o,i,s);if(!(1&r)){var f=h&&$t.call(e,"__wrapped__"),_=p&&$t.call(n,"__wrapped__");if(f||_){var w=f?e.value():e,E=_?n.value():n;return s||(s=new Yn),i(w,E,r,o,s)}}return!!d&&(s||(s=new Yn),function(e,n,r,o,i,s){var a=1&r,l=ii(e),c=l.length,u=ii(n),h=u.length;if(c!=h&&!a)return!1;for(var p=c;p--;){var d=l[p];if(!(a?d in n:$t.call(n,d)))return!1}var f=s.get(e),m=s.get(n);if(f&&m)return f==n&&m==e;var g=!0;s.set(e,n),s.set(n,e);for(var y=a;++p<c;){var v=e[d=l[p]],b=n[d];if(o)var _=a?o(b,v,d,n,e,s):o(v,b,d,e,n,s);if(!(_===t?v===b||i(v,b,r,o,s):_)){g=!1;break}y||(y="constructor"==d)}if(g&&!y){var w=e.constructor,k=n.constructor;w==k||!("constructor"in e)||!("constructor"in n)||"function"==typeof w&&w instanceof w&&"function"==typeof k&&k instanceof k||(g=!1)}return s.delete(e),s.delete(n),g}(e,n,r,o,i,s))}(e,n,r,o,Rr,i))}function Lr(e,n,r,o){var i=r.length,s=i,a=!o;if(null==e)return!s;for(e=Ct(e);i--;){var l=r[i];if(a&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++i<s;){var c=(l=r[i])[0],u=e[c],h=l[1];if(a&&l[2]){if(u===t&&!(c in e))return!1}else{var p=new Yn;if(o)var d=o(u,h,c,e,n,p);if(!(d===t?Rr(h,u,3,o,p):d))return!1}}return!0}function Dr(t){return!(!ea(t)||(e=t,zt&&zt in e))&&(Zs(t)?Bt:mt).test(ji(t));var e}function $r(t){return"function"==typeof t?t:null==t?ol:"object"==typeof t?qs(t)?Br(t[0],t[1]):Hr(t):dl(t)}function Pr(t){if(!Ei(t))return vn(t);var e=[];for(var n in Ct(t))$t.call(t,n)&&"constructor"!=n&&e.push(n);return e}function zr(t){if(!ea(t))return function(t){var e=[];if(null!=t)for(var n in Ct(t))e.push(n);return e}(t);var e=Ei(t),n=[];for(var r in t)("constructor"!=r||!e&&$t.call(t,r))&&n.push(r);return n}function jr(t,e){return t<e}function Fr(t,e){var n=-1,r=Ks(t)?kt(t.length):[];return dr(t,(function(t,o,i){r[++n]=e(t,o,i)})),r}function Hr(t){var e=pi(t);return 1==e.length&&e[0][2]?Ci(e[0][0],e[0][1]):function(n){return n===t||Lr(n,t,e)}}function Br(e,n){return ki(e)&&Oi(n)?Ci(zi(e),n):function(r){var o=Ca(r,e);return o===t&&o===n?Aa(r,e):Rr(n,o,3)}}function Vr(e,n,r,o,i){e!==n&&br(n,(function(s,a){if(i||(i=new Yn),ea(s))!function(e,n,r,o,i,s,a){var l=Ti(e,r),c=Ti(n,r),u=a.get(c);if(u)er(e,r,u);else{var h=s?s(l,c,r+"",e,n,a):t,p=h===t;if(p){var d=qs(c),f=!d&&Gs(c),m=!d&&!f&&ua(c);h=c,d||f||m?qs(l)?h=l:Js(l)?h=No(l):f?(p=!1,h=Eo(c,!0)):m?(p=!1,h=Co(c,!0)):h=[]:ia(c)||Ws(c)?(h=l,Ws(l)?h=va(l):ea(l)&&!Zs(l)||(h=vi(c))):p=!1}p&&(a.set(c,h),i(h,c,o,s,a),a.delete(c)),er(e,r,h)}}(e,n,a,r,Vr,o,i);else{var l=o?o(Ti(e,a),s,a+"",e,n,i):t;l===t&&(l=s),er(e,a,l)}}),Ra)}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?Ie(e,(function(t){return qs(t)?function(e){return Sr(e,1===t.length?t[0]:t)}:t})):[ol];var r=-1;e=Ie(e,Ye(ui()));var o=Fr(t,(function(t,n,o){var i=Ie(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 l=Ao(o[r],i[r]);if(l)return r>=a?l:l*("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=Sr(t,s);n(a,s)&&to(i,wo(s,t),a)}return i}function Kr(t,e,n,r){var o=r?He:Fe,i=-1,s=e.length,a=t;for(t===e&&(e=No(e)),n&&(a=Ie(t,Ye(n)));++i<s;)for(var l=0,c=e[i],u=n?n(c):c;(l=o(a,u,l,r))>-1;)a!==t&&Yt.call(a,l,1),Yt.call(t,l,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)?Yt.call(t,o,1):po(t,o)}}return t}function Gr(t,e){return t+ye(xn()*(e-t+1))}function Yr(t,e){var n="";if(!t||e<1||e>h)return n;do{e%2&&(n+=t),(e=ye(e/2))&&(t+=t)}while(e);return n}function Xr(t,e){return Ri(Ai(t,e,ol),t+"")}function Zr(t){return Zn(Ha(t))}function Qr(t,e){var n=Ha(t);return $i(n,lr(e,0,n.length))}function to(e,n,r,o){if(!ea(e))return e;for(var i=-1,s=(n=wo(n,e)).length,a=s-1,l=e;null!=l&&++i<s;){var c=zi(n[i]),u=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(i!=a){var h=l[c];(u=o?o(h,c,l):t)===t&&(u=ea(h)?h:_i(n[i+1])?[]:{})}nr(l,c,u),l=l[c]}return e}var eo=Nn?function(t,e){return Nn.set(t,e),t}:ol,no=ue?function(t,e){return ue(t,"toString",{configurable:!0,enumerable:!1,value:el(e),writable:!0})}:ol;function ro(t){return $i(Ha(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=kt(o);++r<o;)i[r]=t[r+e];return i}function io(t,e){var n;return dr(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,ol,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,l=null===n,c=ca(n),u=n===t;i<s;){var h=ye((i+s)/2),p=r(e[h]),d=p!==t,f=null===p,m=p==p,g=ca(p);if(a)var y=o||m;else y=u?m&&(o||d):l?m&&d&&(o||!f):c?m&&d&&!f&&(o||!g):!f&&!g&&(o?p<=n:p<n);y?i=h+1:s=h}return _n(s,4294967294)}function lo(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||!Hs(a,l)){var l=a;i[o++]=0===s?0:s}}return i}function co(t){return"number"==typeof t?t:ca(t)?p:+t}function uo(t){if("string"==typeof t)return t;if(qs(t))return Ie(t,uo)+"";if(ca(t))return Fn?Fn.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function ho(t,e,n){var r=-1,o=Te,i=t.length,s=!0,a=[],l=a;if(n)s=!1,o=Ne;else if(i>=200){var c=e?null:Xo(t);if(c)return cn(c);s=!1,o=Ze,l=new Gn}else l=e?[]:a;t:for(;++r<i;){var u=t[r],h=e?e(u):u;if(u=n||0!==u?u:0,s&&h==h){for(var p=l.length;p--;)if(l[p]===h)continue t;e&&l.push(h),a.push(u)}else o(l,h,n)||(l!==a&&l.push(h),a.push(u))}return a}function po(t,e){return null==(t=Mi(t,e=wo(e,t)))||delete t[zi(Xi(e))]}function fo(t,e,n,r){return to(t,e,n(Sr(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()),Le(e,(function(t,e){return e.func.apply(e.thisArg,Re([t],e.args))}),n)}function yo(t,e,n){var r=t.length;if(r<2)return r?ho(t[0]):[];for(var o=-1,i=kt(r);++o<r;)for(var s=t[o],a=-1;++a<r;)a!=o&&(i[o]=pr(i[o]||s,t[a],e,n));return ho(vr(i,1),e,n)}function vo(e,n,r){for(var o=-1,i=e.length,s=n.length,a={};++o<i;){var l=o<s?n[o]:t;r(a,e[o],l)}return a}function bo(t){return Js(t)?t:[]}function _o(t){return"function"==typeof t?t:ol}function wo(t,e){return qs(t)?t:ki(t,e)?[t]:Pi(ba(t))}var ko=Xr;function xo(e,n,r){var o=e.length;return r=r===t?o:r,!n&&r>=o?e:oo(e,n,r)}var So=he||function(t){return pe.clearTimeout(t)};function Eo(t,e){if(e)return t.slice();var n=t.length,r=Ut?Ut(n):new t.constructor(n);return t.copy(r),r}function Oo(t){var e=new t.constructor(t.byteLength);return new qt(e).set(new qt(t)),e}function Co(t,e){var n=e?Oo(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Ao(e,n){if(e!==n){var r=e!==t,o=null===e,i=e==e,s=ca(e),a=n!==t,l=null===n,c=n==n,u=ca(n);if(!l&&!u&&!s&&e>n||s&&a&&c&&!l&&!u||o&&a&&c||!r&&c||!i)return 1;if(!o&&!s&&!u&&e<n||u&&r&&i&&!o&&!s||l&&r&&i||!a&&i||!c)return-1}return 0}function Mo(t,e,n,r){for(var o=-1,i=t.length,s=n.length,a=-1,l=e.length,c=bn(i-s,0),u=kt(l+c),h=!r;++a<l;)u[a]=e[a];for(;++o<s;)(h||o<i)&&(u[n[o]]=t[o]);for(;c--;)u[a++]=t[o++];return u}function To(t,e,n,r){for(var o=-1,i=t.length,s=-1,a=n.length,l=-1,c=e.length,u=bn(i-a,0),h=kt(u+c),p=!r;++o<u;)h[o]=t[o];for(var d=o;++l<c;)h[d+l]=e[l];for(;++s<a;)(p||o<i)&&(h[d+n[s]]=t[o++]);return h}function No(t,e){var n=-1,r=t.length;for(e||(e=kt(r));++n<r;)e[n]=t[n];return e}function Io(e,n,r,o){var i=!r;r||(r={});for(var s=-1,a=n.length;++s<a;){var l=n[s],c=o?o(r[l],e[l],l,r,e):t;c===t&&(c=e[l]),i?sr(r,l,c):nr(r,l,c)}return r}function Ro(t,e){return function(n,r){var o=qs(n)?Ee:or,i=e?e():{};return o(n,t,ui(r,2),i)}}function Lo(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&&wi(r[0],r[1],a)&&(s=i<3?t:s,i=1),n=Ct(n);++o<i;){var l=r[o];l&&e(n,l,o,s)}return n}))}function Do(t,e){return function(n,r){if(null==n)return n;if(!Ks(n))return t(n,r);for(var o=n.length,i=e?o:-1,s=Ct(n);(e?i--:++i<o)&&!1!==r(s[i],i,s););return n}}function $o(t){return function(e,n,r){for(var o=-1,i=Ct(e),s=r(e),a=s.length;a--;){var l=s[t?a:++o];if(!1===n(i[l],l,i))break}return e}}function Po(e){return function(n){var r=on(n=ba(n))?pn(n):t,o=r?r[0]:n.charAt(0),i=r?xo(r,1).join(""):n.slice(1);return o[e]()+i}}function zo(t){return function(e){return Le(Za(Wa(e).replace(Xt,"")),t,"")}}function jo(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=Bn(t.prototype),r=t.apply(n,e);return ea(r)?r:n}}function Fo(e){return function(n,r,o){var i=Ct(n);if(!Ks(n)){var s=ui(r,3);n=Ia(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 Ho(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 Tt(e);if(s&&!l&&"wrapper"==li(a))var l=new Wn([],!0)}for(i=l?i:o;++i<o;){var c=li(a=r[i]),u="wrapper"==c?ai(a):t;l=u&&xi(u[0])&&424==u[1]&&!u[4].length&&1==u[9]?l[li(u[0])].apply(l,u[3]):1==a.length&&xi(a)?l[c]():l.thru(a)}return function(){var t=arguments,e=t[0];if(l&&1==t.length&&qs(e))return l.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 Bo(e,n,r,o,i,s,a,c,u,h){var p=n&l,d=1&n,f=2&n,m=24&n,g=512&n,y=f?t:jo(e);return function l(){for(var v=arguments.length,b=kt(v),_=v;_--;)b[_]=arguments[_];if(m)var w=ci(l),k=function(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}(b,w);if(o&&(b=Mo(b,o,i,m)),s&&(b=To(b,s,a,m)),v-=k,m&&v<h){var x=ln(b,w);return Go(e,n,Bo,l.placeholder,r,b,x,c,u,h-v)}var S=d?r:this,E=f?S[e]:e;return v=b.length,c?b=function(e,n){for(var r=e.length,o=_n(n.length,r),i=No(e);o--;){var s=n[o];e[o]=_i(s,r)?i[s]:t}return e}(b,c):g&&v>1&&b.reverse(),p&&u<v&&(b.length=u),this&&this!==pe&&this instanceof l&&(E=y||jo(E)),E.apply(S,b)}}function Vo(t,e){return function(n,r){return function(t,e,n,r){return wr(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=uo(r),o=uo(o)):(r=co(r),o=co(o)),i=e(r,o)}return i}}function qo(t){return oi((function(e){return e=Ie(e,Ye(ui())),Xr((function(n){var r=this;return t(e,(function(t){return Se(t,r,n)}))}))}))}function Uo(e,n){var r=(n=n===t?" ":uo(n)).length;if(r<2)return r?Yr(n,e):n;var o=Yr(n,ge(e/hn(n)));return on(n)?xo(pn(o),0,e).join(""):o.slice(0,e)}function Ko(e){return function(n,r,o){return o&&"number"!=typeof o&&wi(n,r,o)&&(r=o=t),n=fa(n),r===t?(r=n,n=0):r=fa(r),function(t,e,n,r){for(var o=-1,i=bn(ge((e-t)/(n||1)),0),s=kt(i);i--;)s[r?i:++o]=t,t+=n;return s}(n,r,o=o===t?n<r?1:-1:fa(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,l,c,u,h,p){var d=8&n;n|=d?i:a,4&(n&=~(d?a:i))||(n&=-4);var f=[e,n,s,d?l:t,d?c:t,d?t:l,d?t:c,u,h,p],m=r.apply(t,f);return xi(e)&&Ni(m,f),m.placeholder=o,Li(m,e,n)}function Yo(t){var e=Ot[t];return function(t,n){if(t=ya(t),(n=null==n?0:_n(ma(n),292))&&gn(t)){var r=(ba(t)+"e").split("e");return+((r=(ba(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var Xo=An&&1/cn(new An([,-0]))[1]==u?function(t){return new An(t)}:cl;function Zo(t){return function(e){var n=gi(e);return n==k?sn(e):n==C?un(e):function(t,e){return Ie(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function Qo(n,s,u,h,p,d,f,m){var g=2&s;if(!g&&"function"!=typeof n)throw new Tt(e);var y=h?h.length:0;if(y||(s&=-97,h=p=t),f=f===t?f:bn(ma(f),0),m=m===t?m:ma(m),y-=p?p.length:0,s&a){var v=h,b=p;h=p=t}var _=g?t:ai(n),w=[n,s,u,h,p,v,b,d,f,m];if(_&&function(t,e){var n=t[1],o=e[1],i=n|o,s=i<131,a=o==l&&8==n||o==l&&n==c&&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 u=e[3];if(u){var h=t[3];t[3]=h?Mo(h,u,e[4]):u,t[4]=h?ln(t[3],r):e[4]}(u=e[5])&&(h=t[5],t[5]=h?To(h,u,e[6]):u,t[6]=h?ln(t[5],r):e[6]),(u=e[7])&&(t[7]=u),o&l&&(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}(w,_),n=w[0],s=w[1],u=w[2],h=w[3],p=w[4],!(m=w[9]=w[9]===t?g?0:n.length:bn(w[9]-y,0))&&24&s&&(s&=-25),s&&1!=s)k=8==s||s==o?function(e,n,r){var o=jo(e);return function i(){for(var s=arguments.length,a=kt(s),l=s,c=ci(i);l--;)a[l]=arguments[l];var u=s<3&&a[0]!==c&&a[s-1]!==c?[]:ln(a,c);return(s-=u.length)<r?Go(e,n,Bo,i.placeholder,t,a,u,t,t,r-s):Se(this&&this!==pe&&this instanceof i?o:e,this,a)}}(n,s,m):s!=i&&33!=s||p.length?Bo.apply(t,w):function(t,e,n,r){var o=1&e,i=jo(t);return function e(){for(var s=-1,a=arguments.length,l=-1,c=r.length,u=kt(c+a),h=this&&this!==pe&&this instanceof e?i:t;++l<c;)u[l]=r[l];for(;a--;)u[l++]=arguments[++s];return Se(h,o?n:this,u)}}(n,s,u,h);else var k=function(t,e,n){var r=1&e,o=jo(t);return function e(){return(this&&this!==pe&&this instanceof e?o:t).apply(r?n:this,arguments)}}(n,s,u);return Li((_?eo:Ni)(k,w),n,s)}function ti(e,n,r,o){return e===t||Hs(e,Rt[r])&&!$t.call(o,r)?n:e}function ei(e,n,r,o,i,s){return ea(e)&&ea(n)&&(s.set(n,e),Vr(e,n,t,ei,s),s.delete(n)),e}function ni(e){return ia(e)?t:e}function ri(e,n,r,o,i,s){var a=1&r,l=e.length,c=n.length;if(l!=c&&!(a&&c>l))return!1;var u=s.get(e),h=s.get(n);if(u&&h)return u==n&&h==e;var p=-1,d=!0,f=2&r?new Gn:t;for(s.set(e,n),s.set(n,e);++p<l;){var m=e[p],g=n[p];if(o)var y=a?o(g,m,p,n,e,s):o(m,g,p,e,n,s);if(y!==t){if(y)continue;d=!1;break}if(f){if(!$e(n,(function(t,e){if(!Ze(f,e)&&(m===t||i(m,t,r,o,s)))return f.push(e)}))){d=!1;break}}else if(m!==g&&!i(m,g,r,o,s)){d=!1;break}}return s.delete(e),s.delete(n),d}function oi(e){return Ri(Ai(e,t,Ui),e+"")}function ii(t){return Er(t,Ia,fi)}function si(t){return Er(t,Ra,mi)}var ai=Nn?function(t){return Nn.get(t)}:cl;function li(t){for(var e=t.name+"",n=In[e],r=$t.call(In,e)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==t)return o.name}return e}function ci(t){return($t.call(Hn,"placeholder")?Hn:t).placeholder}function ui(){var t=Hn.iteratee||il;return t=t===il?$r:t,arguments.length?t(arguments[0],arguments[1]):t}function hi(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 pi(t){for(var e=Ia(t),n=e.length;n--;){var r=e[n],o=t[r];e[n]=[r,o,Oi(o)]}return e}function di(e,n){var r=function(e,n){return null==e?t:e[n]}(e,n);return Dr(r)?r:t}var fi=Pe?function(t){return null==t?[]:(t=Ct(t),Me(Pe(t),(function(e){return Gt.call(t,e)})))}:gl,mi=Pe?function(t){for(var e=[];t;)Re(e,fi(t)),t=Kt(t);return e}:gl,gi=Or;function yi(t,e,n){for(var r=-1,o=(e=wo(e,t)).length,i=!1;++r<o;){var s=zi(e[r]);if(!(i=null!=t&&n(t,s)))break;t=t[s]}return i||++r!=o?i:!!(o=null==t?0:t.length)&&ta(o)&&_i(s,o)&&(qs(t)||Ws(t))}function vi(t){return"function"!=typeof t.constructor||Ei(t)?{}:Bn(Kt(t))}function bi(t){return qs(t)||Ws(t)||!!(Qt&&t&&t[Qt])}function _i(t,e){var n=typeof t;return!!(e=null==e?h:e)&&("number"==n||"symbol"!=n&&yt.test(t))&&t>-1&&t%1==0&&t<e}function wi(t,e,n){if(!ea(n))return!1;var r=typeof e;return!!("number"==r?Ks(n)&&_i(e,n.length):"string"==r&&e in n)&&Hs(n[e],t)}function ki(t,e){if(qs(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 Ct(e)}function xi(t){var e=li(t),n=Hn[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]}(En&&gi(new En(new ArrayBuffer(1)))!=I||On&&gi(new On)!=k||Cn&&gi(Cn.resolve())!=E||An&&gi(new An)!=C||Mn&&gi(new Mn)!=T)&&(gi=function(e){var n=Or(e),r=n==S?e.constructor:t,o=r?ji(r):"";if(o)switch(o){case Rn:return I;case Ln:return k;case Dn:return E;case $n:return C;case Pn:return T}return n});var Si=Lt?Zs:yl;function Ei(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Rt)}function Oi(t){return t==t&&!ea(t)}function Ci(e,n){return function(r){return null!=r&&r[e]===n&&(n!==t||e in Ct(r))}}function Ai(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=kt(i);++o<i;)s[o]=t[n+o];o=-1;for(var a=kt(n+1);++o<n;)a[o]=t[o];return a[n]=r(s),Se(e,this,a)}}function Mi(t,e){return e.length<2?t:Sr(t,oo(e,0,-1))}function Ti(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var Ni=Di(eo),Ii=fe||function(t,e){return pe.setTimeout(t,e)},Ri=Di(no);function Li(t,e,n){var r=e+"";return Ri(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 Oe(f,(function(n){var r="_."+n[0];e&n[1]&&!Te(t,r)&&t.push(r)})),t.sort()}(function(t){var e=t.match(st);return e?e[1].split(at):[]}(r),n)))}function Di(e){var n=0,r=0;return function(){var o=wn(),i=16-(o-r);if(r=o,i>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(t,arguments)}}function $i(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 Pi=function(t){var e=Ds(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(ut,"$1"):n||t)})),e}));function zi(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 Dt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Fi(t){if(t instanceof qn)return t.clone();var e=new Wn(t.__wrapped__,t.__chain__);return e.__actions__=No(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Hi=Xr((function(t,e){return Js(t)?pr(t,vr(e,1,Js,!0)):[]})),Bi=Xr((function(e,n){var r=Xi(n);return Js(r)&&(r=t),Js(e)?pr(e,vr(n,1,Js,!0),ui(r,2)):[]})),Vi=Xr((function(e,n){var r=Xi(n);return Js(r)&&(r=t),Js(e)?pr(e,vr(n,1,Js,!0),t,r):[]}));function Wi(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=null==n?0:ma(n);return o<0&&(o=bn(r+o,0)),je(t,ui(e,3),o)}function qi(e,n,r){var o=null==e?0:e.length;if(!o)return-1;var i=o-1;return r!==t&&(i=ma(r),i=r<0?bn(o+i,0):_n(i,o-1)),je(e,ui(n,3),i,!0)}function Ui(t){return null!=t&&t.length?vr(t,1):[]}function Ki(e){return e&&e.length?e[0]:t}var Ji=Xr((function(t){var e=Ie(t,bo);return e.length&&e[0]===t[0]?Tr(e):[]})),Gi=Xr((function(e){var n=Xi(e),r=Ie(e,bo);return n===Xi(r)?n=t:r.pop(),r.length&&r[0]===e[0]?Tr(r,ui(n,2)):[]})),Yi=Xr((function(e){var n=Xi(e),r=Ie(e,bo);return(n="function"==typeof n?n:t)&&r.pop(),r.length&&r[0]===e[0]?Tr(r,t,n):[]}));function Xi(e){var n=null==e?0:e.length;return n?e[n-1]:t}var Zi=Xr(Qi);function Qi(t,e){return t&&t.length&&e&&e.length?Kr(t,e):t}var ts=oi((function(t,e){var n=null==t?0:t.length,r=ar(t,e);return Jr(t,Ie(e,(function(t){return _i(t,n)?+t:t})).sort(Ao)),r}));function es(t){return null==t?t:Sn.call(t)}var ns=Xr((function(t){return ho(vr(t,1,Js,!0))})),rs=Xr((function(e){var n=Xi(e);return Js(n)&&(n=t),ho(vr(e,1,Js,!0),ui(n,2))})),os=Xr((function(e){var n=Xi(e);return n="function"==typeof n?n:t,ho(vr(e,1,Js,!0),t,n)}));function is(t){if(!t||!t.length)return[];var e=0;return t=Me(t,(function(t){if(Js(t))return e=bn(t.length,e),!0})),Je(e,(function(e){return Ie(t,We(e))}))}function ss(e,n){if(!e||!e.length)return[];var r=is(e);return null==n?r:Ie(r,(function(e){return Se(n,t,e)}))}var as=Xr((function(t,e){return Js(t)?pr(t,e):[]})),ls=Xr((function(t){return yo(Me(t,Js))})),cs=Xr((function(e){var n=Xi(e);return Js(n)&&(n=t),yo(Me(e,Js),ui(n,2))})),us=Xr((function(e){var n=Xi(e);return n="function"==typeof n?n:t,yo(Me(e,Js),t,n)})),hs=Xr(is),ps=Xr((function(e){var n=e.length,r=n>1?e[n-1]:t;return r="function"==typeof r?(e.pop(),r):t,ss(e,r)}));function ds(t){var e=Hn(t);return e.__chain__=!0,e}function fs(t,e){return e(t)}var ms=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:fs,args:[i],thisArg:t}),new Wn(o,this.__chain__).thru((function(e){return n&&!e.length&&e.push(t),e}))):this.thru(i)})),gs=Ro((function(t,e,n){$t.call(t,n)?++t[n]:sr(t,n,1)})),ys=Fo(Wi),vs=Fo(qi);function bs(t,e){return(qs(t)?Oe:dr)(t,ui(e,3))}function _s(t,e){return(qs(t)?Ce:fr)(t,ui(e,3))}var ws=Ro((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=Ks(t)?kt(t.length):[];return dr(t,(function(t){i[++r]=o?Se(e,t,n):Nr(t,e,n)})),i})),xs=Ro((function(t,e,n){sr(t,n,e)}));function Ss(t,e){return(qs(t)?Ie:Fr)(t,ui(e,3))}var Es=Ro((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]})),Os=Xr((function(t,e){if(null==t)return[];var n=e.length;return n>1&&wi(t,e[0],e[1])?e=[]:n>2&&wi(e[0],e[1],e[2])&&(e=[e[0]]),qr(t,vr(e,1),[])})),Cs=de||function(){return pe.Date.now()};function As(e,n,r){return n=r?t:n,n=e&&null==n?e.length:n,Qo(e,l,t,t,t,t,n)}function Ms(n,r){var o;if("function"!=typeof r)throw new Tt(e);return n=ma(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,ci(Ts));r|=i}return Qo(t,r,e,n,o)})),Ns=Xr((function(t,e,n){var r=3;if(n.length){var o=ln(n,ci(Ns));r|=i}return Qo(e,r,t,n,o)}));function Is(n,r,o){var i,s,a,l,c,u,h=0,p=!1,d=!1,f=!0;if("function"!=typeof n)throw new Tt(e);function m(e){var r=i,o=s;return i=s=t,h=e,l=n.apply(o,r)}function g(e){var n=e-u;return u===t||n>=r||n<0||d&&e-h>=a}function y(){var t=Cs();if(g(t))return v(t);c=Ii(y,function(t){var e=r-(t-u);return d?_n(e,a-(t-h)):e}(t))}function v(e){return c=t,f&&i?m(e):(i=s=t,l)}function b(){var e=Cs(),n=g(e);if(i=arguments,s=this,u=e,n){if(c===t)return function(t){return h=t,c=Ii(y,r),p?m(t):l}(u);if(d)return So(c),c=Ii(y,r),m(u)}return c===t&&(c=Ii(y,r)),l}return r=ya(r)||0,ea(o)&&(p=!!o.leading,a=(d="maxWait"in o)?bn(ya(o.maxWait)||0,r):a,f="trailing"in o?!!o.trailing:f),b.cancel=function(){c!==t&&So(c),h=0,i=u=s=c=t},b.flush=function(){return c===t?l:v(Cs())},b}var Rs=Xr((function(t,e){return hr(t,1,e)})),Ls=Xr((function(t,e,n){return hr(t,ya(e)||0,n)}));function Ds(t,n){if("function"!=typeof t||null!=n&&"function"!=typeof n)throw new Tt(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(Ds.Cache||Jn),r}function $s(t){if("function"!=typeof t)throw new Tt(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)}}Ds.Cache=Jn;var Ps=ko((function(t,e){var n=(e=1==e.length&&qs(e[0])?Ie(e[0],Ye(ui())):Ie(vr(e,1),Ye(ui()))).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 Se(t,this,r)}))})),zs=Xr((function(e,n){var r=ln(n,ci(zs));return Qo(e,i,t,n,r)})),js=Xr((function(e,n){var r=ln(n,ci(js));return Qo(e,a,t,n,r)})),Fs=oi((function(e,n){return Qo(e,c,t,t,t,n)}));function Hs(t,e){return t===e||t!=t&&e!=e}var Bs=Jo(Cr),Vs=Jo((function(t,e){return t>=e})),Ws=Ir(function(){return arguments}())?Ir:function(t){return na(t)&&$t.call(t,"callee")&&!Gt.call(t,"callee")},qs=kt.isArray,Us=ve?Ye(ve):function(t){return na(t)&&Or(t)==N};function Ks(t){return null!=t&&ta(t.length)&&!Zs(t)}function Js(t){return na(t)&&Ks(t)}var Gs=qe||yl,Ys=be?Ye(be):function(t){return na(t)&&Or(t)==v};function Xs(t){if(!na(t))return!1;var e=Or(t);return e==b||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!ia(t)}function Zs(t){if(!ea(t))return!1;var e=Or(t);return e==_||e==w||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Qs(t){return"number"==typeof t&&t==ma(t)}function ta(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=h}function ea(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function na(t){return null!=t&&"object"==typeof t}var ra=_e?Ye(_e):function(t){return na(t)&&gi(t)==k};function oa(t){return"number"==typeof t||na(t)&&Or(t)==x}function ia(t){if(!na(t)||Or(t)!=S)return!1;var e=Kt(t);if(null===e)return!0;var n=$t.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Dt.call(n)==Ft}var sa=we?Ye(we):function(t){return na(t)&&Or(t)==O},aa=ke?Ye(ke):function(t){return na(t)&&gi(t)==C};function la(t){return"string"==typeof t||!qs(t)&&na(t)&&Or(t)==A}function ca(t){return"symbol"==typeof t||na(t)&&Or(t)==M}var ua=xe?Ye(xe):function(t){return na(t)&&ta(t.length)&&!!ie[Or(t)]},ha=Jo(jr),pa=Jo((function(t,e){return t<=e}));function da(t){if(!t)return[];if(Ks(t))return la(t)?pn(t):No(t);if(ee&&t[ee])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[ee]());var e=gi(t);return(e==k?sn:e==C?cn:Ha)(t)}function fa(t){return t?(t=ya(t))===u||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function ma(t){var e=fa(t),n=e%1;return e==e?n?e-n:e:0}function ga(t){return t?lr(ma(t),0,d):0}function ya(t){if("number"==typeof t)return t;if(ca(t))return p;if(ea(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=ea(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Ge(t);var n=ft.test(t);return n||gt.test(t)?ce(t.slice(2),n?2:8):dt.test(t)?p:+t}function va(t){return Io(t,Ra(t))}function ba(t){return null==t?"":uo(t)}var _a=Lo((function(t,e){if(Ei(e)||Ks(e))Io(e,Ia(e),t);else for(var n in e)$t.call(e,n)&&nr(t,n,e[n])})),wa=Lo((function(t,e){Io(e,Ra(e),t)})),ka=Lo((function(t,e,n,r){Io(e,Ra(e),t,r)})),xa=Lo((function(t,e,n,r){Io(e,Ia(e),t,r)})),Sa=oi(ar),Ea=Xr((function(e,n){e=Ct(e);var r=-1,o=n.length,i=o>2?n[2]:t;for(i&&wi(n[0],n[1],i)&&(o=1);++r<o;)for(var s=n[r],a=Ra(s),l=-1,c=a.length;++l<c;){var u=a[l],h=e[u];(h===t||Hs(h,Rt[u])&&!$t.call(e,u))&&(e[u]=s[u])}return e})),Oa=Xr((function(e){return e.push(t,ei),Se(Da,t,e)}));function Ca(e,n,r){var o=null==e?t:Sr(e,n);return o===t?r:o}function Aa(t,e){return null!=t&&yi(t,e,Mr)}var Ma=Vo((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=jt.call(e)),t[e]=n}),el(ol)),Ta=Vo((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=jt.call(e)),$t.call(t,e)?t[e].push(n):t[e]=[n]}),ui),Na=Xr(Nr);function Ia(t){return Ks(t)?Xn(t):Pr(t)}function Ra(t){return Ks(t)?Xn(t,!0):zr(t)}var La=Lo((function(t,e,n){Vr(t,e,n)})),Da=Lo((function(t,e,n,r){Vr(t,e,n,r)})),$a=oi((function(t,e){var n={};if(null==t)return n;var r=!1;e=Ie(e,(function(e){return e=wo(e,t),r||(r=e.length>1),e})),Io(t,si(t),n),r&&(n=cr(n,7,ni));for(var o=e.length;o--;)po(n,e[o]);return n})),Pa=oi((function(t,e){return null==t?{}:function(t,e){return Ur(t,e,(function(e,n){return Aa(t,n)}))}(t,e)}));function za(t,e){if(null==t)return{};var n=Ie(si(t),(function(t){return[t]}));return e=ui(e),Ur(t,n,(function(t,n){return e(t,n[0])}))}var ja=Zo(Ia),Fa=Zo(Ra);function Ha(t){return null==t?[]:Xe(t,Ia(t))}var Ba=zo((function(t,e,n){return e=e.toLowerCase(),t+(n?Va(e):e)}));function Va(t){return Xa(ba(t).toLowerCase())}function Wa(t){return(t=ba(t))&&t.replace(vt,en).replace(Zt,"")}var qa=zo((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),Ua=zo((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),Ka=Po("toLowerCase"),Ja=zo((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()})),Ga=zo((function(t,e,n){return t+(n?" ":"")+Xa(e)})),Ya=zo((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),Xa=Po("toUpperCase");function Za(e,n,r){return e=ba(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(lt)||[]}(e):e.match(n)||[]}var Qa=Xr((function(e,n){try{return Se(e,t,n)}catch(t){return Xs(t)?t:new St(t)}})),tl=oi((function(t,e){return Oe(e,(function(e){e=zi(e),sr(t,e,Ts(t[e],t))})),t}));function el(t){return function(){return t}}var nl=Ho(),rl=Ho(!0);function ol(t){return t}function il(t){return $r("function"==typeof t?t:cr(t,1))}var sl=Xr((function(t,e){return function(n){return Nr(n,t,e)}})),al=Xr((function(t,e){return function(n){return Nr(t,n,e)}}));function ll(t,e,n){var r=Ia(e),o=xr(e,r);null!=n||ea(e)&&(o.length||!r.length)||(n=e,e=t,t=this,o=xr(e,Ia(e)));var i=!(ea(n)&&"chain"in n&&!n.chain),s=Zs(t);return Oe(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__);return(n.__actions__=No(this.__actions__)).push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,Re([this.value()],arguments))})})),t}function cl(){}var ul=qo(Ie),hl=qo(Ae),pl=qo($e);function dl(t){return ki(t)?We(zi(t)):function(t){return function(e){return Sr(e,t)}}(t)}var fl=Ko(),ml=Ko(!0);function gl(){return[]}function yl(){return!1}var vl,bl=Wo((function(t,e){return t+e}),0),_l=Yo("ceil"),wl=Wo((function(t,e){return t/e}),1),kl=Yo("floor"),xl=Wo((function(t,e){return t*e}),1),Sl=Yo("round"),El=Wo((function(t,e){return t-e}),0);return Hn.after=function(t,n){if("function"!=typeof n)throw new Tt(e);return t=ma(t),function(){if(--t<1)return n.apply(this,arguments)}},Hn.ary=As,Hn.assign=_a,Hn.assignIn=wa,Hn.assignInWith=ka,Hn.assignWith=xa,Hn.at=Sa,Hn.before=Ms,Hn.bind=Ts,Hn.bindAll=tl,Hn.bindKey=Ns,Hn.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return qs(t)?t:[t]},Hn.chain=ds,Hn.chunk=function(e,n,r){n=(r?wi(e,n,r):n===t)?1:bn(ma(n),0);var o=null==e?0:e.length;if(!o||n<1)return[];for(var i=0,s=0,a=kt(ge(o/n));i<o;)a[s++]=oo(e,i,i+=n);return a},Hn.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},Hn.concat=function(){var t=arguments.length;if(!t)return[];for(var e=kt(t-1),n=arguments[0],r=t;r--;)e[r-1]=arguments[r];return Re(qs(n)?No(n):[n],vr(e,1))},Hn.cond=function(t){var n=null==t?0:t.length,r=ui();return t=n?Ie(t,(function(t){if("function"!=typeof t[1])throw new Tt(e);return[r(t[0]),t[1]]})):[],Xr((function(e){for(var r=-1;++r<n;){var o=t[r];if(Se(o[0],this,e))return Se(o[1],this,e)}}))},Hn.conforms=function(t){return function(t){var e=Ia(t);return function(n){return ur(n,t,e)}}(cr(t,1))},Hn.constant=el,Hn.countBy=gs,Hn.create=function(t,e){var n=Bn(t);return null==e?n:ir(n,e)},Hn.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},Hn.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},Hn.debounce=Is,Hn.defaults=Ea,Hn.defaultsDeep=Oa,Hn.defer=Rs,Hn.delay=Ls,Hn.difference=Hi,Hn.differenceBy=Bi,Hn.differenceWith=Vi,Hn.drop=function(e,n,r){var o=null==e?0:e.length;return o?oo(e,(n=r||n===t?1:ma(n))<0?0:n,o):[]},Hn.dropRight=function(e,n,r){var o=null==e?0:e.length;return o?oo(e,0,(n=o-(n=r||n===t?1:ma(n)))<0?0:n):[]},Hn.dropRightWhile=function(t,e){return t&&t.length?mo(t,ui(e,3),!0,!0):[]},Hn.dropWhile=function(t,e){return t&&t.length?mo(t,ui(e,3),!0):[]},Hn.fill=function(e,n,r,o){var i=null==e?0:e.length;return i?(r&&"number"!=typeof r&&wi(e,n,r)&&(r=0,o=i),function(e,n,r,o){var i=e.length;for((r=ma(r))<0&&(r=-r>i?0:i+r),(o=o===t||o>i?i:ma(o))<0&&(o+=i),o=r>o?0:ga(o);r<o;)e[r++]=n;return e}(e,n,r,o)):[]},Hn.filter=function(t,e){return(qs(t)?Me:yr)(t,ui(e,3))},Hn.flatMap=function(t,e){return vr(Ss(t,e),1)},Hn.flatMapDeep=function(t,e){return vr(Ss(t,e),u)},Hn.flatMapDepth=function(e,n,r){return r=r===t?1:ma(r),vr(Ss(e,n),r)},Hn.flatten=Ui,Hn.flattenDeep=function(t){return null!=t&&t.length?vr(t,u):[]},Hn.flattenDepth=function(e,n){return null!=e&&e.length?vr(e,n=n===t?1:ma(n)):[]},Hn.flip=function(t){return Qo(t,512)},Hn.flow=nl,Hn.flowRight=rl,Hn.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},Hn.functions=function(t){return null==t?[]:xr(t,Ia(t))},Hn.functionsIn=function(t){return null==t?[]:xr(t,Ra(t))},Hn.groupBy=ws,Hn.initial=function(t){return null!=t&&t.length?oo(t,0,-1):[]},Hn.intersection=Ji,Hn.intersectionBy=Gi,Hn.intersectionWith=Yi,Hn.invert=Ma,Hn.invertBy=Ta,Hn.invokeMap=ks,Hn.iteratee=il,Hn.keyBy=xs,Hn.keys=Ia,Hn.keysIn=Ra,Hn.map=Ss,Hn.mapKeys=function(t,e){var n={};return e=ui(e,3),wr(t,(function(t,r,o){sr(n,e(t,r,o),t)})),n},Hn.mapValues=function(t,e){var n={};return e=ui(e,3),wr(t,(function(t,r,o){sr(n,r,e(t,r,o))})),n},Hn.matches=function(t){return Hr(cr(t,1))},Hn.matchesProperty=function(t,e){return Br(t,cr(e,1))},Hn.memoize=Ds,Hn.merge=La,Hn.mergeWith=Da,Hn.method=sl,Hn.methodOf=al,Hn.mixin=ll,Hn.negate=$s,Hn.nthArg=function(t){return t=ma(t),Xr((function(e){return Wr(e,t)}))},Hn.omit=$a,Hn.omitBy=function(t,e){return za(t,$s(ui(e)))},Hn.once=function(t){return Ms(2,t)},Hn.orderBy=function(e,n,r,o){return null==e?[]:(qs(n)||(n=null==n?[]:[n]),qs(r=o?t:r)||(r=null==r?[]:[r]),qr(e,n,r))},Hn.over=ul,Hn.overArgs=Ps,Hn.overEvery=hl,Hn.overSome=pl,Hn.partial=zs,Hn.partialRight=js,Hn.partition=Es,Hn.pick=Pa,Hn.pickBy=za,Hn.property=dl,Hn.propertyOf=function(e){return function(n){return null==e?t:Sr(e,n)}},Hn.pull=Zi,Hn.pullAll=Qi,Hn.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?Kr(t,e,ui(n,2)):t},Hn.pullAllWith=function(e,n,r){return e&&e.length&&n&&n.length?Kr(e,n,t,r):e},Hn.pullAt=ts,Hn.range=fl,Hn.rangeRight=ml,Hn.rearg=Fs,Hn.reject=function(t,e){return(qs(t)?Me:yr)(t,$s(ui(e,3)))},Hn.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,o=[],i=t.length;for(e=ui(e,3);++r<i;){var s=t[r];e(s,r,t)&&(n.push(s),o.push(r))}return Jr(t,o),n},Hn.rest=function(n,r){if("function"!=typeof n)throw new Tt(e);return Xr(n,r=r===t?r:ma(r))},Hn.reverse=es,Hn.sampleSize=function(e,n,r){return n=(r?wi(e,n,r):n===t)?1:ma(n),(qs(e)?Qn:Qr)(e,n)},Hn.set=function(t,e,n){return null==t?t:to(t,e,n)},Hn.setWith=function(e,n,r,o){return o="function"==typeof o?o:t,null==e?e:to(e,n,r,o)},Hn.shuffle=function(t){return(qs(t)?tr:ro)(t)},Hn.slice=function(e,n,r){var o=null==e?0:e.length;return o?(r&&"number"!=typeof r&&wi(e,n,r)?(n=0,r=o):(n=null==n?0:ma(n),r=r===t?o:ma(r)),oo(e,n,r)):[]},Hn.sortBy=Os,Hn.sortedUniq=function(t){return t&&t.length?lo(t):[]},Hn.sortedUniqBy=function(t,e){return t&&t.length?lo(t,ui(e,2)):[]},Hn.split=function(e,n,r){return r&&"number"!=typeof r&&wi(e,n,r)&&(n=r=t),(r=r===t?d:r>>>0)?(e=ba(e))&&("string"==typeof n||null!=n&&!sa(n))&&!(n=uo(n))&&on(e)?xo(pn(e),0,r):e.split(n,r):[]},Hn.spread=function(t,n){if("function"!=typeof t)throw new Tt(e);return n=null==n?0:bn(ma(n),0),Xr((function(e){var r=e[n],o=xo(e,0,n);return r&&Re(o,r),Se(t,this,o)}))},Hn.tail=function(t){var e=null==t?0:t.length;return e?oo(t,1,e):[]},Hn.take=function(e,n,r){return e&&e.length?oo(e,0,(n=r||n===t?1:ma(n))<0?0:n):[]},Hn.takeRight=function(e,n,r){var o=null==e?0:e.length;return o?oo(e,(n=o-(n=r||n===t?1:ma(n)))<0?0:n,o):[]},Hn.takeRightWhile=function(t,e){return t&&t.length?mo(t,ui(e,3),!1,!0):[]},Hn.takeWhile=function(t,e){return t&&t.length?mo(t,ui(e,3)):[]},Hn.tap=function(t,e){return e(t),t},Hn.throttle=function(t,n,r){var o=!0,i=!0;if("function"!=typeof t)throw new Tt(e);return ea(r)&&(o="leading"in r?!!r.leading:o,i="trailing"in r?!!r.trailing:i),Is(t,n,{leading:o,maxWait:n,trailing:i})},Hn.thru=fs,Hn.toArray=da,Hn.toPairs=ja,Hn.toPairsIn=Fa,Hn.toPath=function(t){return qs(t)?Ie(t,zi):ca(t)?[t]:No(Pi(ba(t)))},Hn.toPlainObject=va,Hn.transform=function(t,e,n){var r=qs(t),o=r||Gs(t)||ua(t);if(e=ui(e,4),null==n){var i=t&&t.constructor;n=o?r?new i:[]:ea(t)&&Zs(i)?Bn(Kt(t)):{}}return(o?Oe:wr)(t,(function(t,r,o){return e(n,t,r,o)})),n},Hn.unary=function(t){return As(t,1)},Hn.union=ns,Hn.unionBy=rs,Hn.unionWith=os,Hn.uniq=function(t){return t&&t.length?ho(t):[]},Hn.uniqBy=function(t,e){return t&&t.length?ho(t,ui(e,2)):[]},Hn.uniqWith=function(e,n){return n="function"==typeof n?n:t,e&&e.length?ho(e,t,n):[]},Hn.unset=function(t,e){return null==t||po(t,e)},Hn.unzip=is,Hn.unzipWith=ss,Hn.update=function(t,e,n){return null==t?t:fo(t,e,_o(n))},Hn.updateWith=function(e,n,r,o){return o="function"==typeof o?o:t,null==e?e:fo(e,n,_o(r),o)},Hn.values=Ha,Hn.valuesIn=function(t){return null==t?[]:Xe(t,Ra(t))},Hn.without=as,Hn.words=Za,Hn.wrap=function(t,e){return zs(_o(e),t)},Hn.xor=ls,Hn.xorBy=cs,Hn.xorWith=us,Hn.zip=hs,Hn.zipObject=function(t,e){return vo(t||[],e||[],nr)},Hn.zipObjectDeep=function(t,e){return vo(t||[],e||[],to)},Hn.zipWith=ps,Hn.entries=ja,Hn.entriesIn=Fa,Hn.extend=wa,Hn.extendWith=ka,ll(Hn,Hn),Hn.add=bl,Hn.attempt=Qa,Hn.camelCase=Ba,Hn.capitalize=Va,Hn.ceil=_l,Hn.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),lr(ya(e),n,r)},Hn.clone=function(t){return cr(t,4)},Hn.cloneDeep=function(t){return cr(t,5)},Hn.cloneDeepWith=function(e,n){return cr(e,5,n="function"==typeof n?n:t)},Hn.cloneWith=function(e,n){return cr(e,4,n="function"==typeof n?n:t)},Hn.conformsTo=function(t,e){return null==e||ur(t,e,Ia(e))},Hn.deburr=Wa,Hn.defaultTo=function(t,e){return null==t||t!=t?e:t},Hn.divide=wl,Hn.endsWith=function(e,n,r){e=ba(e),n=uo(n);var o=e.length,i=r=r===t?o:lr(ma(r),0,o);return(r-=n.length)>=0&&e.slice(r,i)==n},Hn.eq=Hs,Hn.escape=function(t){return(t=ba(t))&&J.test(t)?t.replace(U,nn):t},Hn.escapeRegExp=function(t){return(t=ba(t))&&nt.test(t)?t.replace(et,"\\$&"):t},Hn.every=function(e,n,r){var o=qs(e)?Ae:mr;return r&&wi(e,n,r)&&(n=t),o(e,ui(n,3))},Hn.find=ys,Hn.findIndex=Wi,Hn.findKey=function(t,e){return ze(t,ui(e,3),wr)},Hn.findLast=vs,Hn.findLastIndex=qi,Hn.findLastKey=function(t,e){return ze(t,ui(e,3),kr)},Hn.floor=kl,Hn.forEach=bs,Hn.forEachRight=_s,Hn.forIn=function(t,e){return null==t?t:br(t,ui(e,3),Ra)},Hn.forInRight=function(t,e){return null==t?t:_r(t,ui(e,3),Ra)},Hn.forOwn=function(t,e){return t&&wr(t,ui(e,3))},Hn.forOwnRight=function(t,e){return t&&kr(t,ui(e,3))},Hn.get=Ca,Hn.gt=Bs,Hn.gte=Vs,Hn.has=function(t,e){return null!=t&&yi(t,e,Ar)},Hn.hasIn=Aa,Hn.head=Ki,Hn.identity=ol,Hn.includes=function(t,e,n,r){t=Ks(t)?t:Ha(t),n=n&&!r?ma(n):0;var o=t.length;return n<0&&(n=bn(o+n,0)),la(t)?n<=o&&t.indexOf(e,n)>-1:!!o&&Fe(t,e,n)>-1},Hn.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=null==n?0:ma(n);return o<0&&(o=bn(r+o,0)),Fe(t,e,o)},Hn.inRange=function(e,n,r){return n=fa(n),r===t?(r=n,n=0):r=fa(r),function(t,e,n){return t>=_n(e,n)&&t<bn(e,n)}(e=ya(e),n,r)},Hn.invoke=Na,Hn.isArguments=Ws,Hn.isArray=qs,Hn.isArrayBuffer=Us,Hn.isArrayLike=Ks,Hn.isArrayLikeObject=Js,Hn.isBoolean=function(t){return!0===t||!1===t||na(t)&&Or(t)==y},Hn.isBuffer=Gs,Hn.isDate=Ys,Hn.isElement=function(t){return na(t)&&1===t.nodeType&&!ia(t)},Hn.isEmpty=function(t){if(null==t)return!0;if(Ks(t)&&(qs(t)||"string"==typeof t||"function"==typeof t.splice||Gs(t)||ua(t)||Ws(t)))return!t.length;var e=gi(t);if(e==k||e==C)return!t.size;if(Ei(t))return!Pr(t).length;for(var n in t)if($t.call(t,n))return!1;return!0},Hn.isEqual=function(t,e){return Rr(t,e)},Hn.isEqualWith=function(e,n,r){var o=(r="function"==typeof r?r:t)?r(e,n):t;return o===t?Rr(e,n,t,r):!!o},Hn.isError=Xs,Hn.isFinite=function(t){return"number"==typeof t&&gn(t)},Hn.isFunction=Zs,Hn.isInteger=Qs,Hn.isLength=ta,Hn.isMap=ra,Hn.isMatch=function(t,e){return t===e||Lr(t,e,pi(e))},Hn.isMatchWith=function(e,n,r){return r="function"==typeof r?r:t,Lr(e,n,pi(n),r)},Hn.isNaN=function(t){return oa(t)&&t!=+t},Hn.isNative=function(t){if(Si(t))throw new St("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Dr(t)},Hn.isNil=function(t){return null==t},Hn.isNull=function(t){return null===t},Hn.isNumber=oa,Hn.isObject=ea,Hn.isObjectLike=na,Hn.isPlainObject=ia,Hn.isRegExp=sa,Hn.isSafeInteger=function(t){return Qs(t)&&t>=-9007199254740991&&t<=h},Hn.isSet=aa,Hn.isString=la,Hn.isSymbol=ca,Hn.isTypedArray=ua,Hn.isUndefined=function(e){return e===t},Hn.isWeakMap=function(t){return na(t)&&gi(t)==T},Hn.isWeakSet=function(t){return na(t)&&"[object WeakSet]"==Or(t)},Hn.join=function(t,e){return null==t?"":yn.call(t,e)},Hn.kebabCase=qa,Hn.last=Xi,Hn.lastIndexOf=function(e,n,r){var o=null==e?0:e.length;if(!o)return-1;var i=o;return r!==t&&(i=(i=ma(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):je(e,Be,i,!0)},Hn.lowerCase=Ua,Hn.lowerFirst=Ka,Hn.lt=ha,Hn.lte=pa,Hn.max=function(e){return e&&e.length?gr(e,ol,Cr):t},Hn.maxBy=function(e,n){return e&&e.length?gr(e,ui(n,2),Cr):t},Hn.mean=function(t){return Ve(t,ol)},Hn.meanBy=function(t,e){return Ve(t,ui(e,2))},Hn.min=function(e){return e&&e.length?gr(e,ol,jr):t},Hn.minBy=function(e,n){return e&&e.length?gr(e,ui(n,2),jr):t},Hn.stubArray=gl,Hn.stubFalse=yl,Hn.stubObject=function(){return{}},Hn.stubString=function(){return""},Hn.stubTrue=function(){return!0},Hn.multiply=xl,Hn.nth=function(e,n){return e&&e.length?Wr(e,ma(n)):t},Hn.noConflict=function(){return pe._===this&&(pe._=Ht),this},Hn.noop=cl,Hn.now=Cs,Hn.pad=function(t,e,n){t=ba(t);var r=(e=ma(e))?hn(t):0;if(!e||r>=e)return t;var o=(e-r)/2;return Uo(ye(o),n)+t+Uo(ge(o),n)},Hn.padEnd=function(t,e,n){t=ba(t);var r=(e=ma(e))?hn(t):0;return e&&r<e?t+Uo(e-r,n):t},Hn.padStart=function(t,e,n){t=ba(t);var r=(e=ma(e))?hn(t):0;return e&&r<e?Uo(e-r,n)+t:t},Hn.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),kn(ba(t).replace(rt,""),e||0)},Hn.random=function(e,n,r){if(r&&"boolean"!=typeof r&&wi(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=fa(e),n===t?(n=e,e=0):n=fa(n)),e>n){var o=e;e=n,n=o}if(r||e%1||n%1){var i=xn();return _n(e+i*(n-e+le("1e-"+((i+"").length-1))),n)}return Gr(e,n)},Hn.reduce=function(t,e,n){var r=qs(t)?Le:Ue,o=arguments.length<3;return r(t,ui(e,4),n,o,dr)},Hn.reduceRight=function(t,e,n){var r=qs(t)?De:Ue,o=arguments.length<3;return r(t,ui(e,4),n,o,fr)},Hn.repeat=function(e,n,r){return n=(r?wi(e,n,r):n===t)?1:ma(n),Yr(ba(e),n)},Hn.replace=function(){var t=arguments,e=ba(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Hn.result=function(e,n,r){var o=-1,i=(n=wo(n,e)).length;for(i||(i=1,e=t);++o<i;){var s=null==e?t:e[zi(n[o])];s===t&&(o=i,s=r),e=Zs(s)?s.call(e):s}return e},Hn.round=Sl,Hn.runInContext=s,Hn.sample=function(t){return(qs(t)?Zn:Zr)(t)},Hn.size=function(t){if(null==t)return 0;if(Ks(t))return la(t)?hn(t):t.length;var e=gi(t);return e==k||e==C?t.size:Pr(t).length},Hn.snakeCase=Ja,Hn.some=function(e,n,r){var o=qs(e)?$e:io;return r&&wi(e,n,r)&&(n=t),o(e,ui(n,3))},Hn.sortedIndex=function(t,e){return so(t,e)},Hn.sortedIndexBy=function(t,e,n){return ao(t,e,ui(n,2))},Hn.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=so(t,e);if(r<n&&Hs(t[r],e))return r}return-1},Hn.sortedLastIndex=function(t,e){return so(t,e,!0)},Hn.sortedLastIndexBy=function(t,e,n){return ao(t,e,ui(n,2),!0)},Hn.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var n=so(t,e,!0)-1;if(Hs(t[n],e))return n}return-1},Hn.startCase=Ga,Hn.startsWith=function(t,e,n){return t=ba(t),n=null==n?0:lr(ma(n),0,t.length),e=uo(e),t.slice(n,n+e.length)==e},Hn.subtract=El,Hn.sum=function(t){return t&&t.length?Ke(t,ol):0},Hn.sumBy=function(t,e){return t&&t.length?Ke(t,ui(e,2)):0},Hn.template=function(e,n,r){var o=Hn.templateSettings;r&&wi(e,n,r)&&(n=t),e=ba(e),n=ka({},n,o,ti);var i,s,a=ka({},n.imports,o.imports,ti),l=Ia(a),c=Xe(a,l),u=0,h=n.interpolate||bt,p="__p += '",d=At((n.escape||bt).source+"|"+h.source+"|"+(h===X?ht:bt).source+"|"+(n.evaluate||bt).source+"|$","g"),f="//# sourceURL="+($t.call(n,"sourceURL")?(n.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++oe+"]")+"\n";e.replace(d,(function(t,n,r,o,a,l){return r||(r=o),p+=e.slice(u,l).replace(_t,rn),n&&(i=!0,p+="' +\n__e("+n+") +\n'"),a&&(s=!0,p+="';\n"+a+";\n__p += '"),r&&(p+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),u=l+t.length,t})),p+="';\n";var m=$t.call(n,"variable")&&n.variable;if(m){if(ct.test(m))throw new St("Invalid `variable` option passed into `_.template`")}else p="with (obj) {\n"+p+"\n}\n";p=(s?p.replace(B,""):p).replace(V,"$1").replace(W,"$1;"),p="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")+p+"return __p\n}";var g=Qa((function(){return Et(l,f+"return "+p).apply(t,c)}));if(g.source=p,Xs(g))throw g;return g},Hn.times=function(t,e){if((t=ma(t))<1||t>h)return[];var n=d,r=_n(t,d);e=ui(e),t-=d;for(var o=Je(r,e);++n<t;)e(n);return o},Hn.toFinite=fa,Hn.toInteger=ma,Hn.toLength=ga,Hn.toLower=function(t){return ba(t).toLowerCase()},Hn.toNumber=ya,Hn.toSafeInteger=function(t){return t?lr(ma(t),-9007199254740991,h):0===t?t:0},Hn.toString=ba,Hn.toUpper=function(t){return ba(t).toUpperCase()},Hn.trim=function(e,n,r){if((e=ba(e))&&(r||n===t))return Ge(e);if(!e||!(n=uo(n)))return e;var o=pn(e),i=pn(n);return xo(o,Qe(o,i),tn(o,i)+1).join("")},Hn.trimEnd=function(e,n,r){if((e=ba(e))&&(r||n===t))return e.slice(0,dn(e)+1);if(!e||!(n=uo(n)))return e;var o=pn(e);return xo(o,0,tn(o,pn(n))+1).join("")},Hn.trimStart=function(e,n,r){if((e=ba(e))&&(r||n===t))return e.replace(rt,"");if(!e||!(n=uo(n)))return e;var o=pn(e);return xo(o,Qe(o,pn(n))).join("")},Hn.truncate=function(e,n){var r=30,o="...";if(ea(n)){var i="separator"in n?n.separator:i;r="length"in n?ma(n.length):r,o="omission"in n?uo(n.omission):o}var s=(e=ba(e)).length;if(on(e)){var a=pn(e);s=a.length}if(r>=s)return e;var l=r-hn(o);if(l<1)return o;var c=a?xo(a,0,l).join(""):e.slice(0,l);if(i===t)return c+o;if(a&&(l+=c.length-l),sa(i)){if(e.slice(l).search(i)){var u,h=c;for(i.global||(i=At(i.source,ba(pt.exec(i))+"g")),i.lastIndex=0;u=i.exec(h);)var p=u.index;c=c.slice(0,p===t?l:p)}}else if(e.indexOf(uo(i),l)!=l){var d=c.lastIndexOf(i);d>-1&&(c=c.slice(0,d))}return c+o},Hn.unescape=function(t){return(t=ba(t))&&K.test(t)?t.replace(q,fn):t},Hn.uniqueId=function(t){var e=++Pt;return ba(t)+e},Hn.upperCase=Ya,Hn.upperFirst=Xa,Hn.each=bs,Hn.eachRight=_s,Hn.first=Ki,ll(Hn,(vl={},wr(Hn,(function(t,e){$t.call(Hn.prototype,e)||(vl[e]=t)})),vl),{chain:!1}),Hn.VERSION="4.17.21",Oe(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Hn[t].placeholder=Hn})),Oe(["drop","take"],(function(e,n){qn.prototype[e]=function(r){r=r===t?1:bn(ma(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,d),type:e+(o.__dir__<0?"Right":"")}),o},qn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Oe(["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:ui(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),Oe(["head","last"],(function(t,e){var n="take"+(e?"Right":"");qn.prototype[t]=function(){return this[n](1).value()[0]}})),Oe(["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(ol)},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 Nr(n,t,e)}))})),qn.prototype.reject=function(t){return this.filter($s(ui(t)))},qn.prototype.slice=function(e,n){e=ma(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=ma(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(d)},wr(qn.prototype,(function(e,n){var r=/^(?:filter|find|map|reject)|While$/.test(n),o=/^(?:head|last)$/.test(n),i=Hn[o?"take"+("last"==n?"Right":""):n],s=o||/^find/.test(n);i&&(Hn.prototype[n]=function(){var n=this.__wrapped__,a=o?[1]:arguments,l=n instanceof qn,c=a[0],u=l||qs(n),h=function(t){var e=i.apply(Hn,Re([t],a));return o&&p?e[0]:e};u&&r&&"function"==typeof c&&1!=c.length&&(l=u=!1);var p=this.__chain__,d=!!this.__actions__.length,f=s&&!p,m=l&&!d;if(!s&&u){n=m?n:new qn(this);var g=e.apply(n,a);return g.__actions__.push({func:fs,args:[h],thisArg:t}),new Wn(g,p)}return f&&m?e.apply(this,a):(g=this.thru(h),f?o?g.value()[0]:g.value():g)})})),Oe(["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);Hn.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var o=this.value();return e.apply(qs(o)?o:[],t)}return this[n]((function(n){return e.apply(qs(n)?n:[],t)}))}})),wr(qn.prototype,(function(t,e){var n=Hn[e];if(n){var r=n.name+"";$t.call(In,r)||(In[r]=[]),In[r].push({name:e,func:n})}})),In[Bo(t,2).name]=[{name:"wrapper",func:t}],qn.prototype.clone=function(){var t=new qn(this.__wrapped__);return t.__actions__=No(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=No(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=No(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=qs(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,l=a-s,c=r?a:s-1,u=this.__iteratees__,h=u.length,p=0,d=_n(l,this.__takeCount__);if(!n||!r&&o==l&&d==l)return go(t,this.__actions__);var f=[];t:for(;l--&&p<d;){for(var m=-1,g=t[c+=e];++m<h;){var y=u[m],v=y.iteratee,b=y.type,_=v(g);if(2==b)g=_;else if(!_){if(1==b)continue t;break t}}f[p++]=g}return f},Hn.prototype.at=ms,Hn.prototype.chain=function(){return ds(this)},Hn.prototype.commit=function(){return new Wn(this.value(),this.__chain__)},Hn.prototype.next=function(){this.__values__===t&&(this.__values__=da(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?t:this.__values__[this.__index__++]}},Hn.prototype.plant=function(e){for(var n,r=this;r instanceof Vn;){var o=Fi(r);o.__index__=0,o.__values__=t,n?i.__wrapped__=o:n=o;var i=o;r=r.__wrapped__}return i.__wrapped__=e,n},Hn.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:fs,args:[es],thisArg:t}),new Wn(n,this.__chain__)}return this.thru(es)},Hn.prototype.toJSON=Hn.prototype.valueOf=Hn.prototype.value=function(){return go(this.__wrapped__,this.__actions__)},Hn.prototype.first=Hn.prototype.head,ee&&(Hn.prototype[ee]=function(){return this}),Hn}();fe?((fe.exports=mn)._=mn,de._=mn):pe._=mn}.call(s);var Yh=Gh.exports;function Xh(t){return t.type.create(Yh.cloneDeep(t.attrs))}const Zh=wl.create({name:"node_processor",addCommands:()=>({setBlockAttributes:gh((({commands:t,state:e},n,r,o={})=>{const i=Ge(t.getBlockAttributes(n))??{},{doc:s,tr:a}=e,{from:l,to:c}=a.selection;s.nodesBetween(l,c,((t,e)=>{_c.blocks.includes(t.type.name)&&a.setNodeAttribute(e,n,{...o,...i,...r})}))})),getBlockAttributes:gh((({editor:t},e,n)=>Sr((()=>{let r=Object.assign({},n||{});for(const n of _c.blocks)Object.assign(r,t.getAttributes(n)?.[e]||{});return Object.keys(r).length?r:null})))),removeBlockAttributes:gh((({commands:t},e)=>{for(const n of _c.blocks)t.resetAttributes(n,e)})),applyMark:gh((({state:t,commands:e},n,r,o={})=>{const{tr:i,doc:s,schema:a}=t,{$from:l,$to:c}=i.selection,u=Ol(kc.LINK,a),h=Ol(n,a);if(!(h.spec.group||"").includes(xc.SETTINGS))return e.setMark(n,r);if(l.pos===c.pos)return;s.nodesBetween(l.pos,c.pos,((t,s)=>{if(t.type.name===_c.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),p=h.create({...a?.attrs||{},...r}),d=Wh(l,c,t,s),f=!u.isInSet(t.marks)&&function(t,e,n,r=Uh){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,p,o.isAppliedToParent);if(f)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:p});t.isText?i.addMark(d.from,d.to,p):function(t,e,n,r){const o=qh(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,p)}))})),getMarks:gh((({editor:t},e)=>{const n=Qe(t,"state");return Sr((()=>{const{selection:t,doc:r}=Ge(n),{from:o,to:i}=Ge(t),s=[];return r.nodesBetween(o,i,(t=>{for(const n of t.marks)n.type.name===e&&s.unshift(n.attrs)})),s}))})),getMark:gh((({commands:t},e)=>{const n=t.getMarks(e);return Sr((()=>Ge(n)[0]??null))})),hasMark:gh((({commands:t},e)=>{const n=t.getMark(e);return Sr((()=>!!Ge(n)))})),getCommonSettingMark:gh((({commands:t},e,n)=>{const r=t.getMark(e);return Sr((()=>Ge(r)?.value??Ge(n)))})),getDeviceSettingMark:gh((({commands:t},e,n)=>{const r=t.getMarks(e),o=t.getDevice();return Sr((()=>{for(const t of Ge(r)){const e=t[Ge(o)];if(e)return e}return Ge(n)}))})),removeAllMarks:gh((({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:gh((({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:gh(((t,{tr:e,node:n,position:r,mark:o})=>n.isText?e.removeMark(r,r+n.nodeSize,o):e.removeNodeMark(r,o)))})}),Qh=wl.create({name:"text_processor",addCommands:()=>({getSelectedText:gh((({state:t})=>{const{from:e,to:n}=t.selection;return t.doc.textBetween(e,n," ")})),transformText:gh((({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=Wh(n,r,o,i),a=Math.max(0,n.pos-i),l=Math.max(0,r.pos-i),c=e({text:o.textContent.substring(a,l)}),u=t.schema.text(c,o.marks);t.tr.replaceWith(s.from,s.to,u)}))}))})}),tp=wl.create({name:"selection_processor",addStorage:()=>({selection:null}),addCommands(){return{storeSelection:gh((({state:t})=>{this.storage.selection=t.selection})),restoreSelection:gh((({commands:t})=>{this.storage.selection&&t.setTextSelection(this.storage.selection)})),expandSelection:gh((({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:qh(t.doc,i);r=Math.min(r,i+n),o=Math.max(o,i+e.nodeSize-n)}})),e.setTextSelection({from:r,to:o})})),expandSelectionToBlock:gh((({commands:t})=>{t.expandSelection((({parent:t})=>t.type.name===_c.DOCUMENT))}))}}}),ep=Jl.create({name:"doc",topNode:!0,content:"block+"});class np extends zo{constructor(t,e,n,r="SetDocAttr"){super(),this.key=t,this.value=e,this.schema=n,this.stepType=r}apply(t){this.prevValue=t.attrs.meta[this.key];const e=Zr.fromJSON(this.schema,t.toJSON());return e.attrs.meta[this.key]=this.value,jo.ok(e)}invert(){return new np(this.key,this.prevValue,this.schema,"revertSetDocAttr")}map(){return null}toJSON(){return{stepType:this.stepType,key:this.key,value:this.value}}static fromJSON(t){return new np(t.key,t.value,t.stepType)}}zo.jsonID("setDocAttr",np);const rp=ep.extend({marks:xc.SETTINGS,addAttributes:()=>({meta:{default:{}}}),onCreate(){this.editor.view.dom.addEventListener("click",(t=>{t.target.closest("a")&&t.preventDefault()}))},addCommands:()=>({setDocMetaAttributes:gh((({state:t},e,n)=>{t.tr.step(new np(e,n,t.schema))}))})}),op=Jl.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:t}){return["p",el(this.options.HTMLAttributes,t),0]},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),ip=op.extend({marks:xc.ALL,addOptions:()=>({HTMLAttributes:{class:"zw-style"}})}),sp=Jl.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]}`,el(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=>{return e={find:new RegExp(`^(#{1,${t}})\\s$`),type:this.type,getAttributes:{level:t}},new hl({find:e.find,handler:({state:t,range:n,match:r})=>{const o=t.doc.resolve(n.from),i=rl(e.getAttributes,void 0,r)||{};if(!o.node(-1).canReplaceWith(o.index(-1),o.indexAfter(-1),e.type))return null;t.tr.delete(n.from,n.to).setBlockType(n.from,n.from,e.type,i)}});var e}))}}),ap=sp.extend({marks:xc.ALL,addOptions:()=>({levels:[1,2,3,4],HTMLAttributes:{class:"zw-style"}})}),lp=wl.create({name:"prose_mirror_plugins",addProseMirrorPlugins(){return[Cc.create(this.editor),Ac.create(this.editor)]}}),cp=Kl.create({name:kc.FONT_FAMILY,group:xc.SETTINGS,addOptions:()=>({fonts:[]}),addAttributes:()=>({value:{required:!0}}),addCommands(){return{applyFontFamily:gh((({commands:t},e)=>{t.applyMark(this.name,{value:e});const n=t.findFontByName(e);let r=Ge(t.getFontWeight());n.isWeightSupported(r)||(r=n.findClosestWeight(r),t.applyFontWeight(r));const o=t.isSettingCustomized(kc.FONT_STYLE).value;!n.isItalicSupported(r)&&o&&t.removeItalic()})),getFont:gh((({commands:t})=>{const e=Ge(this.options.defaultPreset),n=t.findFontByName(e.common.font_family),r=t.getFontFamily();return Sr((()=>t.findFontByName(Ge(r))||n))})),findFontByName:gh(((t,e)=>Ge(this.options.fonts).find((t=>t.name===e)))),getFontFamily:gh((({commands:t})=>t.getCommonSettingMark(this.name,t.getDefaultFontFamily()))),getDefaultFontFamily:gh((({commands:t})=>{const e=t.getPreset();return Sr((()=>Ge(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})=>vh({font_family:t.value?`"${t.value}"`:null})}),up=wl.create({name:kc.STYLE_PRESET,addGlobalAttributes(){return[{types:[_c.PARAGRAPH,_c.HEADING],attributes:{preset:{isRequired:!1,default:{id:Ge(this.options.defaultId)},parseHTML:t=>{const e=Ge(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=Ge(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:Ge(this.options.defaultId)}:null},renderHTML:t=>t.preset?{class:Ge(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:gh((()=>Sr((()=>Ge(this.options.presets).filter((t=>!t.hidden)))))),getPreset:gh((({commands:n})=>{const r=n.getBlockAttributes("preset",{id:Ge(this.options.defaultId)}),o=n.getPresetList(),i=n.isLink(),s=n.getLinkPreset();return Sr((()=>{const n=t(Ge(o),Ge(r).id);if(!Ge(i))return n;const a=Ge(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:gh((({commands:e,chain:n},r)=>{const o=t(Ge(e.getPresetList()),r),i=o.node?.type??_c.PARAGRAPH,s={preset:{id:r}};o.node&&(s.level=o.node.level);for(const t of kc.attributes)s[t]=Ge(e.getBlockAttributes(t));n().removeList().setNode(i,s).run()})),applyDefaultPreset:gh((({commands:t})=>{t.applyPreset(Ge(this.options.defaultId))})),removePreset:gh((({commands:t})=>{t.setNode(_c.PARAGRAPH,{preset:null})})),getPresetCustomization:gh((({editor:t,commands:e})=>{const n=Qe(t,"state");return Sr((()=>{const{selection:t,doc:r}=Ge(n),{from:o,to:i}=t;return e._getSettingCustomization(r,o,i)}))})),isSettingCustomized:gh((({commands:t},e)=>{const n=t.getPresetCustomization(),r=kc.presetAttributes.includes(e)?"attributes":"marks";return Sr((()=>Ge(n)[r]?.includes(e)??!1))})),getContentCustomization:gh((({editor:t,commands:e})=>{const n=Qe(t,"state");return Sr((()=>{const{doc:t}=Ge(n);return e._getSettingCustomization(t,0,t.content.size)}))})),_getSettingCustomization:gh(((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)){kc.presetAttributes.includes(e)&&n&&i.add(e)}for(const{type:e}of t.marks)kc.marks.includes(e.name)&&o.add(e.name)})),{attributes:Array.from(i),marks:Array.from(o)}})),removePresetCustomization:gh((({chain:t})=>{t().storeSelection().expandSelectionToBlock().removeMarks(kc.marks).resetAttributes(_c.PARAGRAPH,kc.presetAttributes).resetAttributes(_c.HEADING,kc.presetAttributes).restoreSelection().run()})),removeFormat:gh((({chain:t})=>{t().storeSelection().expandSelectionToBlock().removeAllMarks().applyDefaultPreset().restoreSelection().run()}))}},onCreate(){this.options.styleRenderer.inject($p.head,Ge(this.options.presets))}}),hp=Kl.create({name:kc.FONT_WEIGHT,group:xc.SETTINGS,addAttributes:()=>({value:{required:!0}}),addCommands(){return{applyFontWeight:gh((({commands:t},e)=>{t.applyMark(this.name,{value:e});Ge(t.getFont()).isItalicSupported(e)||t.removeItalic()})),toggleBold:gh((({commands:t})=>{const e=Ge(t.getFontWeight()),n=Ge(t.getFont()),r=Number(e)>=600?"400":"700",o=n.findClosestWeight(r);t.applyFontWeight(o)})),getFontWeight:gh((({commands:t})=>{const e=t.getCommonSettingMark(this.name,t.getDefaultFontWeight()),n=t.getFont();return Sr((()=>{const t=Ge(e),r=Ge(n);return r.isWeightSupported(t)?t:r.findClosestWeight(t)}))})),getDefaultFontWeight:gh((({commands:t})=>{const e=t.getPreset();return Sr((()=>Ge(e).common.font_weight))}))}},addKeyboardShortcuts:()=>({"Mod-b":bh("toggleBold"),"Mod-B":bh("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})=>vh({font_weight:t.value})}),pp=Kl.create({name:kc.FONT_SIZE,group:xc.SETTINGS,addOptions:()=>({minSize:1,maxSize:100}),addAttributes:()=>({mobile:{default:null},tablet:{default:null},desktop:{default:null}}),addCommands(){return{getFontSize:gh((({commands:t})=>t.getDeviceSettingMark(this.name,t.getDefaultFontSize()))),getDefaultFontSize:gh((({commands:t})=>{const e=t.getDevice(),n=t.getPreset();return Sr((()=>Ge(n)[Ge(e)].font_size.replace("px","")))})),applyFontSize:gh((({commands:t},e)=>{const n=Ge(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};if(!Object.values(i).some((t=>!!t)))return!1;const s=o.type.create(i);e.isText?t.addMark(r,r+e.nodeSize,s):t.addNodeMark(r,s)}})})),increaseFontSize:gh((({commands:t})=>{const e=Number(Ge(t.getFontSize())),n=Math.min(e+1,Ge(this.options.maxSize));t.applyFontSize(String(n))})),decreaseFontSize:gh((({commands:t})=>{const e=Number(Ge(t.getFontSize())),n=Math.max(e-1,Ge(this.options.minSize));t.applyFontSize(String(n))}))}},addKeyboardShortcuts:()=>({"Mod-Shift-=":bh("increaseFontSize"),"Mod-Shift--":bh("decreaseFontSize")}),parseHTML(){const t=t=>{if(!t)return null;const e=Hh(t,Ge(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 vh({font_size_mobile:e(t.mobile),font_size_tablet:e(t.tablet),font_size_desktop:e(t.desktop)})}}),dp=Kl.create({name:kc.FONT_COLOR,group:xc.SETTINGS,addAttributes:()=>({value:{required:!0}}),addCommands(){return{getFontColor:gh((({commands:t})=>t.getCommonSettingMark(this.name,t.getDefaultFontColor()))),getDefaultFontColor:gh((({commands:t})=>{const e=t.getPreset();return Sr((()=>Ge(e).common.color))})),applyFontColor:gh((({commands:t},e)=>{t.applyMark(this.name,{value:e})}))}},parseHTML(){const t=t=>({value:Fh(t)});return[{style:"--zw-font-color",getAttrs:t},{style:"color",getAttrs:t}]},renderHTML:({HTMLAttributes:t})=>vh({font_color:t.value})}),fp=Kl.create({name:kc.BACKGROUND_COLOR,addAttributes:()=>({value:{required:!0}}),addCommands(){return{getBackgroundColor:gh((({commands:t})=>t.getCommonSettingMark(this.name,"rgba(255, 255, 255, 0%)"))),applyBackgroundColor:gh((({commands:t},e)=>{t.applyMark(this.name,{value:e})}))}},parseHTML(){const t=t=>({value:Fh(t)});return[{style:"--zw-background-color",getAttrs:t},{style:"background-color",getAttrs:t}]},renderHTML:({HTMLAttributes:t})=>vh({background_color:t.value})}),mp=wl.create({name:"device_manager",addCommands(){return{getDevice:gh((()=>Qe(this.options,"device")))}}}),gp=Kl.create({name:kc.FONT_STYLE,group:xc.SETTINGS,addAttributes:()=>({italic:{required:!0}}),addCommands(){return{isItalic:gh((({commands:t})=>{const e=t.getMark(this.name),n=t.getDefaultFontStyle();return Sr((()=>Ge(e)?.italic??Ge(n).italic))})),isItalicAvailable:gh((({commands:t})=>{const e=t.getFont(),n=t.getFontWeight();return Sr((()=>{const t=Ge(e),r=Ge(n);return t.isItalicSupported(r)&&!t.isWeightItalicOnly(r)}))})),getDefaultFontStyle:gh((({commands:t})=>{const e=t.getPreset();return Sr((()=>({italic:"italic"===Ge(e).common.font_style})))})),toggleItalic:gh((({commands:t})=>{Ge(t.isItalicAvailable())&&(Ge(t.isItalic())?t.removeItalic():t.applyItalic())})),applyItalic:gh((({commands:t})=>{t.applyMark(this.name,{italic:!0})})),removeItalic:gh((({commands:t})=>{t.applyMark(this.name,{italic:!1})}))}},addKeyboardShortcuts:()=>({"Mod-i":bh("toggleItalic"),"Mod-I":bh("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})=>vh({font_style:t.italic?"italic":"normal"})}),yp=Kl.create({name:kc.TEXT_DECORATION,priority:1e3,addAttributes:()=>({underline:{default:!1},strike_through:{default:!1}}),addCommands(){return{isUnderline:gh((({commands:t})=>{const e=t.getTextDecoration();return Sr((()=>Ge(e).underline))})),isStrikeThrough:gh((({commands:t})=>{const e=t.getTextDecoration();return Sr((()=>Ge(e).strike_through))})),getTextDecoration:gh((({commands:t})=>{const e=t.getMark(this.name),n=t.getDefaultTextDecoration();return Sr((()=>{const t=Ge(e)??{},r=Ge(n);return{underline:t.underline||r.underline,strike_through:t.strike_through||r.strike_through}}))})),isUnderlineCustomized:gh((({commands:t})=>{const e=t.isUnderline(),n=t.getDefaultTextDecoration();return Sr((()=>Ge(e)!==Ge(n).underline))})),getDefaultTextDecoration:gh((({commands:t})=>{const e=t.getPreset();return Sr((()=>{const{text_decoration:t}=Ge(e).common;return{underline:t.includes("underline"),strike_through:t.includes("line-through")}}))})),toggleUnderline:gh((({commands:t})=>{t.toggleTextDecoration("underline")})),toggleStrikeThrough:gh((({commands:t})=>{t.toggleTextDecoration("strike_through")})),toggleTextDecoration:gh((({commands:t},e,n=null)=>{const r=Ge(t.getTextDecoration()),o=n??!r[e];t.applyMark(this.name,{[e]:o})})),applyTextDecoration:gh((({commands:t},e)=>{t.toggleTextDecoration(e,!0)})),removeTextDecoration:gh((({commands:t},e)=>{t.toggleTextDecoration(e,!1)}))}},addKeyboardShortcuts:()=>({"Mod-u":bh("toggleUnderline"),"Mod-U":bh("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"),vh({text_decoration:e.join(" ")})}}),vp=wl.create({name:"case_style",addCommands:()=>({applyCaseStyle:gh((({commands:t},e)=>{switch(e){case vc.CAPITALIZE:return t.applyCapitalize();case vc.LOWERCASE:return t.applyLowerCase();case vc.UPPERCASE:return t.applyUpperCase()}})),applyCapitalize:gh((({commands:t})=>{t.transformText((({text:t})=>function(t){return t.toLowerCase().replace(/(?:^|\s)\S/g,(t=>t.toUpperCase()))}(t)))})),applyLowerCase:gh((({commands:t})=>{t.transformText((({text:t})=>t.toLowerCase()))})),applyUpperCase:gh((({commands:t})=>{t.transformText((({text:t})=>t.toUpperCase()))}))})}),bp={mobile:null,tablet:null,desktop:null},_p=wl.create({name:kc.ALIGNMENT,addGlobalAttributes:()=>[{types:[_c.PARAGRAPH,_c.HEADING],attributes:{[kc.ALIGNMENT]:{isRequired:!1,parseHTML({style:t}){const e=function(t){const e=Vh[t]||t;return bc.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?yh({alignment_mobile:t.alignment.mobile,alignment_tablet:t.alignment.tablet,alignment_desktop:t.alignment.desktop}):null}}}],addCommands(){return{applyAlignment:gh((({commands:t},e)=>{const n=Ge(t.getDevice());t.setBlockAttributes(this.name,{[n]:e},bp)})),removeAlignment:gh((({commands:t})=>t.removeBlockAttributes(this.name))),getAlignment:gh((({commands:t})=>{const e=t.getBlockAttributes(this.name,bp),n=t.getDevice(),r=t.getDefaultAlignment();return Sr((()=>Ge(e)?.[Ge(n)]??Ge(r)))})),getDefaultAlignment:gh((({commands:t})=>{const e=t.getDevice(),n=t.getPreset();return Sr((()=>Ge(n)[Ge(e)].alignment??bc.LEFT))}))}},addKeyboardShortcuts:()=>({"Mod-Shift-l":bh("applyAlignment",bc.LEFT),"Mod-Shift-e":bh("applyAlignment",bc.CENTER),"Mod-Shift-r":bh("applyAlignment",bc.RIGHT),"Mod-Shift-j":bh("applyAlignment",bc.JUSTIFY)})}),wp={mobile:null,tablet:null,desktop:null},kp=wl.create({name:kc.LINE_HEIGHT,addGlobalAttributes(){return[{types:[_c.PARAGRAPH,_c.HEADING],attributes:{[kc.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=Bh(e,t,Ge(this.options.wrapperRef));return n?{desktop:n,tablet:n,mobile:null}:null},renderHTML:t=>t.line_height?yh({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:gh((({commands:t})=>{const e=t.getBlockAttributes(this.name,wp),n=t.getDevice(),r=t.getDefaultLineHeight();return Sr((()=>Ge(e)?.[Ge(n)]??Ge(r)))})),getDefaultLineHeight:gh((({commands:t})=>{const e=t.getDevice(),n=t.getPreset();return Sr((()=>Ge(n)[Ge(e)].line_height))})),applyLineHeight:gh((({commands:t},e)=>{const n=Ge(t.getDevice());t.setBlockAttributes(this.name,{[n]:e},wp)}))}}}),xp=Jl.create({name:"listItem",addOptions:()=>({HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:t}){return["li",el(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:_c.LIST_ITEM,marks:xc.SETTINGS,addCommands(){const t=({selection:t})=>t.$cursor.before(t.$cursor.depth-1);return{listItemNewline:gh((({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,Xh(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===_c.LIST));if(r)return n.listItemNewline()}})}),Sp=Jl.create({name:_c.LIST,content:`${_c.LIST_ITEM}+`,group:"block list",marks:xc.SETTINGS,addExtensions:()=>[xp],addOptions:()=>({baseClass:"",presetClass:""}),addAttributes:()=>({bullet:{default:{type:wc.DISC}}}),parseHTML(){const t={a:wc.ROMAN,i:wc.LATIN,1:wc.DECIMAL},e=e=>{for(const n of wc.values){const r=`.${Ge(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)||wc.DECIMAL}})},{tag:"ul",getAttrs:t=>({bullet:{type:e(t)||wc.DISC}})}]},renderHTML({HTMLAttributes:t}){const e=[Ge(this.options.baseClass)+t.bullet.type,Ge(this.options.presetClass)];return[wc.ordered.includes(t.bullet.type)?"ol":"ul",{class:e.join(" ")},0]},addCommands:()=>({getListType:gh((({commands:t})=>{const e=t.getBlockAttributes("bullet",{type:null});return Sr((()=>Ge(e).type??null))})),applyList:gh((({commands:t,chain:e},n)=>{if(Ge(t.getListType())!==n)return e().applyDefaultPreset().toggleList(_c.LIST,_c.LIST_ITEM).setBlockAttributes("bullet",{type:n}).command((({commands:t,tr:e})=>t._bubbleListItemMarks(e))).run();t.removeList()})),_bubbleListItemMarks:gh(((t,e)=>{const{doc:n,selection:r}=e,o=r.$from.start(),i=r.$to.end();function s(t,e){if(kc.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===_c.LIST)return;if(t.type.name!==_c.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,Xh(i)),r.push(i))})),!1}))})),removeList:gh((({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([_c.LIST,_c.LIST_ITEM].includes(t.type.name))return;if(r.type.name!==_c.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,Xh(t));return!1})),t.liftListItem(_c.LIST_ITEM)}))}),addInputRules(){const t=(t,e)=>{return n={find:e,type:this.type,getAttributes:{bullet:{type:t}},joinPredicate:(e,{attrs:n})=>n.bullet.type===t},new hl({find:n.find,handler:({state:t,range:e,match:r,chain:o})=>{const i=rl(n.getAttributes,void 0,r)||{},s=t.tr.delete(e.from,e.to),a=s.doc.resolve(e.from).blockRange(),l=a&&Yo(a,n.type,i);if(!l)return null;if(s.wrap(a,l),n.keepMarks&&n.editor){const{selection:e,storedMarks:r}=t,{splittableMarks:o}=n.editor.extensionManager,i=r||e.$to.parentOffset&&e.$from.marks();if(i){const t=i.filter((t=>o.includes(t.type.name)));s.ensureMarks(t)}}if(n.keepAttributes){const t="bulletList"===n.type.name||"orderedList"===n.type.name?"listItem":"taskList";o().updateAttributes(t,i).run()}const c=s.doc.resolve(e.from-1).nodeBefore;c&&c.type===n.type&&Qo(s.doc,e.from-1)&&(!n.joinPredicate||n.joinPredicate(r,c))&&s.join(e.from-1)}});var n};return[t(wc.DISC,/^\s*([-+*])\s$/),t(wc.DECIMAL,/^(\d+)\.\s$/),t(wc.LATIN,/^([ivx]{1,3})\.\s$/i),t(wc.ROMAN,/^([a-z])\.\s$/i)]}});function Ep(t){return new Ii({key:new Di("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 mi(t);return e.forEach((t=>{t.steps.forEach((t=>{n.step(t)}))})),n}(n.doc,[...e]),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),l=e.invert().map(s);r.push({oldRange:{from:a,to:l},newRange:{from:i,to:s}})}))})),jl(r)}(a);return l.forEach((({newRange:e})=>{const n=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,e,(t=>t.isTextblock));let o,i;if(n.length>1?(o=n[0],i=r.doc.textBetween(o.pos,o.pos+o.node.nodeSize,void 0," ")):n.length&&r.doc.textBetween(e.from,e.to," "," ").endsWith(" ")&&(o=n[0],i=r.doc.textBetween(o.pos,e.to,void 0," ")),o&&i){const e=i.split(" ").filter((t=>""!==t));if(e.length<=0)return!1;const n=e[e.length-1],a=o.pos+i.lastIndexOf(n);if(!n)return!1;fh(n).filter((t=>t.isLink)).map((t=>({...t,from:a+t.start+1,to:a+t.end+1}))).filter((t=>!r.schema.marks.code||!r.doc.rangeHasMark(t.from,t.to,r.schema.marks.code))).filter((e=>!t.validate||t.validate(e.value))).forEach((e=>{Fl(e.from,e.to,r.doc).some((e=>e.mark.type===t.type))||s.addMark(e.from,e.to,t.type.create({href:e.href}))}))}})),s.steps.length?s:void 0}})}const Op=Kl.create({name:"link",priority:1e3,keepOnSplit:!1,onCreate(){this.options.protocols.forEach((t=>{"string"!=typeof t?hh(t.scheme,t.optionalSlashes):hh(t)}))},onDestroy(){Wc.groups={},uh.scanner=null,uh.parser=null,uh.tokenQueue=[],uh.pluginQueue=[],uh.customSchemes=[],uh.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},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML:()=>[{tag:'a[href]:not([href *= "javascript:" i])'}],renderHTML({HTMLAttributes:t}){var e;return(null===(e=t.href)||void 0===e?void 0:e.startsWith("javascript:"))?["a",el(this.options.HTMLAttributes,{...t,href:""}),0]:["a",el(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[(t={find:t=>fh(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,e)=>{var n,r;const o=null===(n=null==e?void 0:e.clipboardData)||void 0===n?void 0:n.getData("text/html"),i=null==o?void 0:o.match(/href="([^"]*)"/);return i?{href:i[1]}:{href:null===(r=t.data)||void 0===r?void 0:r.href}}},new ml({find:t.find,handler:({state:e,range:n,match:r,pasteEvent:o})=>{const i=rl(t.getAttributes,void 0,r,o);if(!1===i||null===i)return null;const{tr:s}=e,a=r[r.length-1],l=r[0];let c=n.to;if(a){const r=l.search(/\S/),o=n.from+l.indexOf(a),u=o+a.length;if(Fl(n.from,n.to,e.doc).filter((e=>e.mark.type.excluded.find((n=>n===t.type&&n!==e.mark.type)))).filter((t=>t.to>o)).length)return null;u<n.to&&s.delete(u,n.to),o>n.from&&s.delete(n.from+r,o),c=n.from+r+a.length,s.addMark(n.from+r,c,t.type.create(i||{})),s.removeStoredMark(t.type)}}}))];var t},addProseMirrorPlugins(){const t=[];var e;return this.options.autolink&&t.push(Ep({type:this.type,validate:this.options.validate})),this.options.openOnClick&&t.push((e={type:this.type},new Ii({key:new Di("handleClickLink"),props:{handleClick:(t,n,r)=>{var o,i;if(0!==r.button)return!1;if("A"!==r.target.nodeName)return!1;const s=zl(t.state,e.type.name),a=r.target,l=null!==(o=null==a?void 0:a.href)&&void 0!==o?o:s.href,c=null!==(i=null==a?void 0:a.target)&&void 0!==i?i:s.target;return!(!a||!l||(t.editable&&window.open(l,c),0))}}}))),this.options.linkOnPaste&&t.push(function(t){return new Ii({key:new Di("handlePasteLink"),props:{handlePaste:(e,n,r)=>{var o;const{state:i}=e,{selection:s}=i,{empty:a}=s;if(a)return!1;let l="";r.content.forEach((t=>{l+=t.textContent}));const c=fh(l).find((t=>t.isLink&&t.value===l));if(!l||!c)return!1;const u=null===(o=n.clipboardData)||void 0===o?void 0:o.getData("text/html"),h=null==u?void 0:u.match(/href="([^"]*)"/),p=h?h[1]:c.href;return t.editor.commands.setMark(t.type,{href:p}),!0}}})}({editor:this.editor,type:this.type})),t}}),Cp=Op.extend({name:kc.LINK,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:Sc.SELF,parseHTML:t=>t.getAttribute("target")||Sc.SELF},destination:{default:Ec.URL,parseHTML:t=>{const e=t.getAttribute("href");if(!e.startsWith("#"))return Ec.URL;const n=e.replace("#","");return Ge(this.options.pageBlocks).find((t=>t.id===parseInt(n)))?Ec.BLOCK:Ec.URL}}}},addCommands(){const{unsetLink:t}=this.parent();return{removeLink:t,applyLink:gh((({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(zp.text(n.text,[zp.mark(kc.LINK,n)]))))),expandSelectionToLink:gh((({commands:t})=>{t.expandSelection((({node:t})=>this.type.isInSet(t.marks)))})),isLink:gh((({commands:t})=>t.hasMark(this.name))),getLinkPreset:gh((()=>Sr((()=>Ge(this.options.preset)))))}},addProseMirrorPlugins(){return[...this.parent(),mh.create(this.editor)]},renderHTML({HTMLAttributes:t}){const e=t.destination===Ec.BLOCK?`#${t.href}`:t.href,n=Ge(this.options.basePresetClass)+Ge(this.options.preset).id;return["a",{href:e,target:t.target,class:`${n} zw-style`},0]}}),Ap=Kl.create({name:kc.SUPERSCRIPT,addCommands(){return{applySuperscript:gh((({commands:t})=>{t.setMark(this.name)})),removeSuperscript:gh((({commands:t})=>{t.unsetMark(this.name)})),toggleSuperscript:gh((({commands:t})=>{Ge(t.isSuperscript())?t.removeSuperscript():t.applySuperscript()})),isSuperscript:gh((({commands:t})=>{const e=t.getMark(this.name);return Sr((()=>!!Ge(e)))}))}},parseHTML:()=>[{tag:"sup"},{style:"vertical-align",getAttrs:t=>"super"===t&&null}],renderHTML:()=>["sup",{class:"zw-superscript"},0]}),Mp=wl.create({name:kc.MARGIN,addGlobalAttributes:()=>[{types:[_c.PARAGRAPH,_c.HEADING],attributes:{[kc.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?yh({margin:t.margin.value}):null}}}]});function Tp(t){const e=e=>t.presetsRef.value.find((t=>t.id===e)),n=Ie({default:null,link:null});return function(t,e,n){"production"===process.env.NODE_ENV||it(e)||en("`watch(fn, options?)` signature has been moved to a separate API. Use `watchEffect(fn, options?)` instead. `watch` now only supports `watch(source, cb, options?) signature."),zn(t,e,n)}(t.presetsRef,(()=>{n.default=e(t.defaultPresetId),n.link=e(t.linkPresetId)}),{immediate:!0,deep:!0}),[rp,ip,ap,Gl,gc,Zh,Qh,tp,lp].concat([up.configure({presets:t.presetsRef,defaultId:t.defaultPresetId,styleRenderer:new jp({baseClass:t.basePresetClass,makeVariable:t.makePresetVariable,linkPresetId:t.linkPresetId})}),Sp.configure({baseClass:t.baseListClass,presetClass:t.basePresetClass+t.defaultPresetId}),mp.configure({device:t.deviceRef}),pp.configure({minSize:t.minFontSize,maxSize:t.maxFontSize,wrapperRef:t.wrapperRef}),cp.configure({fonts:t.fonts,defaultPreset:Qe(n,"default")}),hp,dp,fp,gp,yp,vp,Ap,_p,kp.configure({wrapperRef:t.wrapperRef}),Cp.configure({preset:Qe(n,"link"),basePresetClass:t.basePresetClass,pageBlocks:t.pageBlocksRef}),Mp])}class Np{_domParser=new DOMParser;types=window;parse(t){return this._domParser.parseFromString(t,"text/html")}}class Ip{content;constructor({content:t}){this.content=t}normalize(){throw new Error("Implement abstract method")}}class Rp extends Ip{static BLOCK_NODE_NAMES=["P","H1","H2","H3","H4"];static ROOT_NODE_NAMES=Rp.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,Rp.BLOCK_STYLES),e.append(n)};this._assignElementProperties(t,t.parentElement,Rp.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,Rp.BLOCK_STYLES),this._removeStyleProperties(t.parentElement,Rp.BLOCK_STYLES),this._assignElementProperties(t,t.parentElement),t.parentElement.lastElementChild===t&&this._removeStyleProperties(t.parentElement)}_isBlockNode(t){return Rp.BLOCK_NODE_NAMES.includes(t.tagName)}_isRootNode(t){return Rp.ROOT_NODE_NAMES.includes(t.tagName)}_assignElementProperties(t,e,n=Array.from(e.style)){for(const r of n){const n=e.style.getPropertyValue(r);n&&!t.style.getPropertyValue(r)&&t.style.setProperty(r,n)}}_removeStyleProperties(t,e=Array.from(t.style)){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,Rp.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 Lp extends Ip{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!==_c.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(kc.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!==_c.LIST_ITEM){if(!n.marks)return!1;if(!this._includesMark(n,e))return!1}return!0}_includesMark(t,e){return t.marks?.some((t=>Yh.isEqual(t,e)))??!1}_includesMarkType(t,e){return t.marks?.some((t=>t.type===e))??!1}_isLink(t){return t.type===_c.TEXT&&this._includesMarkType(t,kc.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 Dp{static build(t,e={}){return"string"==typeof t?this._buildHtml(t,e):this._buildJson(t)}static _buildHtml(t,e){return new Rp({content:t,parser:e.parser||new Np})}static _buildJson(t){return new Lp({content:t})}static normalize(t,e={}){return Dp.build(t,e).normalize()}}class $p{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 Pp{static build({config:t,nodeDomParser:e}){const n=function(t,e){return sl(vl.resolve(t),e)}(Tp({fonts:t.fonts,minFontSize:0,maxFontSize:0,presetsRef:Ke(t.presets),defaultPresetId:t.defaultPresetId,linkPresetId:t.linkPresetId,makePresetVariable:()=>"",basePresetClass:t.basePresetClass,baseListClass:t.baseListClass,deviceRef:Ke(yc.DESKTOP),pageBlocksRef:Ke([]),wrapperRef:$p.document.createElement("p")}));return new Pp({schema:n,domParser:bo.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=Dp.build(t,{parser:this._nodeDomParser});return e.normalizeHTML(),this._domParser.parse(e.dom.body).toJSON()}}class zp{static doc(t){return{type:_c.DOCUMENT,content:t}}static list(t,e){return{type:_c.LIST,attrs:{bullet:{type:t}},content:e.map((t=>t.type===_c.LIST_ITEM?t:this.listItem([].concat(t))))}}static listItem(...t){const{attrs:e,content:n,marks:r}=this._normalizeTextBlockArgs(t);return{type:_c.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:_c.HEADING,...n}}static paragraph(...t){return{type:_c.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:_c.TEXT,...e?{marks:e}:{},text:t}}static link(t,e,n=[]){return this.text(t,[this.mark(kc.LINK,e),...n])}static mark(t,e){return{type:t,attrs:e}}static populateAllDevices(t){return{mobile:t,tablet:t,desktop:t}}}class jp{_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=$p.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 yc.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&&!kc.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===yc.COMMON?"":`-${e}`}`}makePresetHtmlClass(t){return this._baseClass+t.id}makePresetCssClass(t){return this.makePresetHtmlClass(t).split(" ").map((t=>`.${t}`)).join("")}}class Fp{static _instance;static get instance(){return this._instance??=new Fp,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 Hp{static createWindow(){return(new i.JSDOM).window}types;parse(t){const{window:e}=new i.JSDOM(t);return this.types=e,e.document}}class Bp{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 Vp=new q,Wp=[class extends Bp{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}){$p.use(Hp.createWindow());const o=n.resolve(process.cwd(),e),i=Pp.build({config:require(o).editor,nodeDomParser:new Hp}),s=t.map((t=>i.toJSON(this._formatInputHtml(t)))),a=1===s.length?s[0]:s,l=this._stringifyContent(a);this.output("rb"===r?this._formatOutputRb(l):l)}_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 Bp{name="version";description="display cli version";doCommand(){this.output("4.2.1")}}];for(const t of Wp)(new t).install(Vp);Vp.parse();
|
|
24
|
+
*/Kh=Gh,Jh=Gh.exports,function(){var t,e="Expected a function",n="__lodash_hash_undefined__",r="__lodash_placeholder__",o=16,i=32,a=64,l=128,c=256,u=1/0,h=9007199254740991,p=NaN,d=4294967295,f=[["ary",l],["bind",1],["bindKey",2],["curry",8],["curryRight",o],["flip",512],["partial",i],["partialRight",a],["rearg",c]],m="[object Arguments]",g="[object Array]",y="[object Boolean]",v="[object Date]",b="[object Error]",_="[object Function]",w="[object GeneratorFunction]",k="[object Map]",x="[object Number]",S="[object Object]",E="[object Promise]",O="[object RegExp]",C="[object Set]",A="[object String]",M="[object Symbol]",T="[object WeakMap]",N="[object ArrayBuffer]",I="[object DataView]",R="[object Float32Array]",L="[object Float64Array]",D="[object Int8Array]",$="[object Int16Array]",P="[object Int32Array]",z="[object Uint8Array]",j="[object Uint8ClampedArray]",F="[object Uint16Array]",H="[object Uint32Array]",B=/\b__p \+= '';/g,V=/\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=/,? & /,lt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ct=/[()=,{}\[\]\/\s]/,ut=/\\(\\)?/g,ht=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pt=/\w*$/,dt=/^[-+]0x[0-9a-f]+$/i,ft=/^0b[01]+$/i,mt=/^\[object .+?Constructor\]$/,gt=/^0o[0-7]+$/i,yt=/^(?:0|[1-9]\d*)$/,vt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,bt=/($^)/,_t=/['\n\r\u2028\u2029\\]/g,wt="\\ud800-\\udfff",kt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",xt="\\u2700-\\u27bf",St="a-z\\xdf-\\xf6\\xf8-\\xff",Et="A-Z\\xc0-\\xd6\\xd8-\\xde",Ot="\\ufe0e\\ufe0f",Ct="\\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",At="['’]",Mt="["+wt+"]",Tt="["+Ct+"]",Nt="["+kt+"]",It="\\d+",Rt="["+xt+"]",Lt="["+St+"]",Dt="[^"+wt+Ct+It+xt+St+Et+"]",$t="\\ud83c[\\udffb-\\udfff]",Pt="[^"+wt+"]",zt="(?:\\ud83c[\\udde6-\\uddff]){2}",jt="[\\ud800-\\udbff][\\udc00-\\udfff]",Ft="["+Et+"]",Ht="\\u200d",Bt="(?:"+Lt+"|"+Dt+")",Vt="(?:"+Ft+"|"+Dt+")",Wt="(?:['’](?:d|ll|m|re|s|t|ve))?",qt="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ut="(?:"+Nt+"|"+$t+")?",Kt="["+Ot+"]?",Jt=Kt+Ut+"(?:"+Ht+"(?:"+[Pt,zt,jt].join("|")+")"+Kt+Ut+")*",Gt="(?:"+[Rt,zt,jt].join("|")+")"+Jt,Yt="(?:"+[Pt+Nt+"?",Nt,zt,jt,Mt].join("|")+")",Xt=RegExp(At,"g"),Zt=RegExp(Nt,"g"),Qt=RegExp($t+"(?="+$t+")|"+Yt+Jt,"g"),te=RegExp([Ft+"?"+Lt+"+"+Wt+"(?="+[Tt,Ft,"$"].join("|")+")",Vt+"+"+qt+"(?="+[Tt,Ft+Bt,"$"].join("|")+")",Ft+"?"+Bt+"+"+Wt,Ft+"+"+qt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",It,Gt].join("|"),"g"),ee=RegExp("["+Ht+wt+kt+Ot+"]"),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[R]=ie[L]=ie[D]=ie[$]=ie[P]=ie[z]=ie[j]=ie[F]=ie[H]=!0,ie[m]=ie[g]=ie[N]=ie[y]=ie[I]=ie[v]=ie[b]=ie[_]=ie[k]=ie[x]=ie[S]=ie[O]=ie[C]=ie[A]=ie[T]=!1;var se={};se[m]=se[g]=se[N]=se[I]=se[y]=se[v]=se[R]=se[L]=se[D]=se[$]=se[P]=se[k]=se[x]=se[S]=se[O]=se[C]=se[A]=se[M]=se[z]=se[j]=se[F]=se[H]=!0,se[b]=se[_]=se[T]=!1;var ae={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},le=parseFloat,ce=parseInt,ue="object"==typeof s&&s&&s.Object===Object&&s,he="object"==typeof self&&self&&self.Object===Object&&self,pe=ue||he||Function("return this")(),de=Jh&&!Jh.nodeType&&Jh,fe=de&&Kh&&!Kh.nodeType&&Kh,me=fe&&fe.exports===de,ge=me&&ue.process,ye=function(){try{var t=fe&&fe.require&&fe.require("util").types;return t||ge&&ge.binding&&ge.binding("util")}catch(t){}}(),ve=ye&&ye.isArrayBuffer,be=ye&&ye.isDate,_e=ye&&ye.isMap,we=ye&&ye.isRegExp,ke=ye&&ye.isSet,xe=ye&&ye.isTypedArray;function Se(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 Ee(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 Oe(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function Ce(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function Ae(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 Me(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 Te(t,e){return!(null==t||!t.length)&&Fe(t,e,0)>-1}function Ne(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 Ie(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 Re(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}function Le(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 De(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 $e(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 Pe=We("length");function ze(t,e,n){var r;return n(t,(function(t,n,o){if(e(t,n,o))return r=n,!1})),r}function je(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 Fe(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):je(t,Be,n)}function He(t,e,n,r){for(var o=n-1,i=t.length;++o<i;)if(r(t[o],e))return o;return-1}function Be(t){return t!=t}function Ve(t,e){var n=null==t?0:t.length;return n?Ke(t,e)/n:p}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,dn(t)+1).replace(rt,""):t}function Ye(t){return function(e){return t(e)}}function Xe(t,e){return Ie(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&&Fe(e,t[n],0)>-1;);return n}function tn(t,e){for(var n=t.length;n--&&Fe(e,t[n],0)>-1;);return n}var en=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"}),nn=qe({"&":"&","<":"<",">":">",'"':""","'":"'"});function rn(t){return"\\"+ae[t]}function on(t){return ee.test(t)}function sn(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function an(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 un(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}function hn(t){return on(t)?function(t){for(var e=Qt.lastIndex=0;Qt.test(t);)++e;return e}(t):Pe(t)}function pn(t){return on(t)?function(t){return t.match(Qt)||[]}(t):function(t){return t.split("")}(t)}function dn(t){for(var e=t.length;e--&&ot.test(t.charAt(e)););return e}var fn=qe({"&":"&","<":"<",">":">",""":'"',"'":"'"}),mn=function s(ot){var wt,kt=(ot=null==ot?pe:mn.defaults(pe.Object(),ot,mn.pick(pe,re))).Array,xt=ot.Date,St=ot.Error,Et=ot.Function,Ot=ot.Math,Ct=ot.Object,At=ot.RegExp,Mt=ot.String,Tt=ot.TypeError,Nt=kt.prototype,It=Et.prototype,Rt=Ct.prototype,Lt=ot["__core-js_shared__"],Dt=It.toString,$t=Rt.hasOwnProperty,Pt=0,zt=(wt=/[^.]+$/.exec(Lt&&Lt.keys&&Lt.keys.IE_PROTO||""))?"Symbol(src)_1."+wt:"",jt=Rt.toString,Ft=Dt.call(Ct),Ht=pe._,Bt=At("^"+Dt.call($t).replace(et,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Vt=me?ot.Buffer:t,Wt=ot.Symbol,qt=ot.Uint8Array,Ut=Vt?Vt.allocUnsafe:t,Kt=an(Ct.getPrototypeOf,Ct),Jt=Ct.create,Gt=Rt.propertyIsEnumerable,Yt=Nt.splice,Qt=Wt?Wt.isConcatSpreadable:t,ee=Wt?Wt.iterator:t,ae=Wt?Wt.toStringTag:t,ue=function(){try{var t=di(Ct,"defineProperty");return t({},"",{}),t}catch(t){}}(),he=ot.clearTimeout!==pe.clearTimeout&&ot.clearTimeout,de=xt&&xt.now!==pe.Date.now&&xt.now,fe=ot.setTimeout!==pe.setTimeout&&ot.setTimeout,ge=Ot.ceil,ye=Ot.floor,Pe=Ct.getOwnPropertySymbols,qe=Vt?Vt.isBuffer:t,gn=ot.isFinite,yn=Nt.join,vn=an(Ct.keys,Ct),bn=Ot.max,_n=Ot.min,wn=xt.now,kn=ot.parseInt,xn=Ot.random,Sn=Nt.reverse,En=di(ot,"DataView"),On=di(ot,"Map"),Cn=di(ot,"Promise"),An=di(ot,"Set"),Mn=di(ot,"WeakMap"),Tn=di(Ct,"create"),Nn=Mn&&new Mn,In={},Rn=ji(En),Ln=ji(On),Dn=ji(Cn),$n=ji(An),Pn=ji(Mn),zn=Wt?Wt.prototype:t,jn=zn?zn.valueOf:t,Fn=zn?zn.toString:t;function Hn(t){if(na(t)&&!qs(t)&&!(t instanceof qn)){if(t instanceof Wn)return t;if($t.call(t,"__wrapped__"))return Fi(t)}return new Wn(t)}var Bn=function(){function e(){}return function(n){if(!ea(n))return{};if(Jt)return Jt(n);e.prototype=n;var r=new e;return e.prototype=t,r}}();function Vn(){}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__=d,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=qs(t),r=!n&&Ws(t),o=!n&&!r&&Gs(t),i=!n&&!r&&!o&&ua(t),s=n||r||o||i,a=s?Je(t.length,Mt):[],l=a.length;for(var c in t)!e&&!$t.call(t,c)||s&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||_i(c,l))||a.push(c);return a}function Zn(e){var n=e.length;return n?e[Gr(0,n-1)]:t}function Qn(t,e){return $i(No(t),lr(e,0,t.length))}function tr(t){return $i(No(t))}function er(e,n,r){(r!==t&&!Hs(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)&&Hs(o,r)&&(r!==t||n in e)||sr(e,n,r)}function rr(t,e){for(var n=t.length;n--;)if(Hs(t[n][0],e))return n;return-1}function or(t,e,n,r){return dr(t,(function(t,o,i){e(r,t,n(t),i)})),r}function ir(t,e){return t&&Io(e,Ia(e),t)}function sr(t,e,n){"__proto__"==e&&ue?ue(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=kt(o),s=null==e;++r<o;)i[r]=s?t:Ca(e,n[r]);return i}function lr(e,n,r){return e==e&&(r!==t&&(e=e<=r?e:r),n!==t&&(e=e>=n?e:n)),e}function cr(e,n,r,o,i,s){var a,l=1&n,c=2&n,u=4&n;if(r&&(a=i?r(e,o,i,s):r(e)),a!==t)return a;if(!ea(e))return e;var h=qs(e);if(h){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),!l)return No(e,a)}else{var p=gi(e),d=p==_||p==w;if(Gs(e))return Eo(e,l);if(p==S||p==m||d&&!i){if(a=c||d?{}:vi(e),!l)return c?function(t,e){return Io(t,mi(t),e)}(e,function(t,e){return t&&Io(e,Ra(e),t)}(a,e)):function(t,e){return Io(t,fi(t),e)}(e,ir(a,e))}else{if(!se[p])return i?e:{};a=function(t,e,n){var r,o=t.constructor;switch(e){case N:return Oo(t);case y:case v:return new o(+t);case I:return function(t,e){var n=e?Oo(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case R:case L:case D:case $:case P:case z:case j:case F:case H:return Co(t,n);case k:return new o;case x:case A:return new o(t);case O:return function(t){var e=new t.constructor(t.source,pt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case C:return new o;case M:return r=t,jn?Ct(jn.call(r)):{}}}(e,p,l)}}s||(s=new Yn);var f=s.get(e);if(f)return f;s.set(e,a),aa(e)?e.forEach((function(t){a.add(cr(t,n,r,t,e,s))})):ra(e)&&e.forEach((function(t,o){a.set(o,cr(t,n,r,o,e,s))}));var g=h?t:(u?c?si:ii:c?Ra:Ia)(e);return Oe(g||e,(function(t,o){g&&(t=e[o=t]),nr(a,o,cr(t,n,r,o,e,s))})),a}function ur(e,n,r){var o=r.length;if(null==e)return!o;for(e=Ct(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 hr(n,r,o){if("function"!=typeof n)throw new Tt(e);return Ii((function(){n.apply(t,o)}),r)}function pr(t,e,n,r){var o=-1,i=Te,s=!0,a=t.length,l=[],c=e.length;if(!a)return l;n&&(e=Ie(e,Ye(n))),r?(i=Ne,s=!1):e.length>=200&&(i=Ze,s=!1,e=new Gn(e));t:for(;++o<a;){var u=t[o],h=null==n?u:n(u);if(u=r||0!==u?u:0,s&&h==h){for(var p=c;p--;)if(e[p]===h)continue t;l.push(u)}else i(e,h,r)||l.push(u)}return l}Hn.templateSettings={escape:G,evaluate:Y,interpolate:X,variable:"",imports:{_:Hn}},Hn.prototype=Vn.prototype,Hn.prototype.constructor=Hn,Wn.prototype=Bn(Vn.prototype),Wn.prototype.constructor=Wn,qn.prototype=Bn(Vn.prototype),qn.prototype.constructor=qn,Un.prototype.clear=function(){this.__data__=Tn?Tn(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(Tn){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 Tn?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]=Tn&&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():Yt.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(On||Kn),string:new Un}},Jn.prototype.delete=function(t){var e=hi(this,t).delete(t);return this.size-=e?1:0,e},Jn.prototype.get=function(t){return hi(this,t).get(t)},Jn.prototype.has=function(t){return hi(this,t).has(t)},Jn.prototype.set=function(t,e){var n=hi(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(!On||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 dr=Do(wr),fr=Do(kr,!0);function mr(t,e){var n=!0;return dr(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&&(l===t?a==a&&!ca(a):r(a,l)))var l=a,c=s}return c}function yr(t,e){var n=[];return dr(t,(function(t,r,o){e(t,r,o)&&n.push(t)})),n}function vr(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?vr(a,e-1,n,r,o):Re(o,a):r||(o[o.length]=a)}return o}var br=$o(),_r=$o(!0);function wr(t,e){return t&&br(t,e,Ia)}function kr(t,e){return t&&_r(t,e,Ia)}function xr(t,e){return Me(e,(function(e){return Zs(t[e])}))}function Sr(e,n){for(var r=0,o=(n=wo(n,e)).length;null!=e&&r<o;)e=e[zi(n[r++])];return r&&r==o?e:t}function Er(t,e,n){var r=e(t);return qs(t)?r:Re(r,n(t))}function Or(e){return null==e?e===t?"[object Undefined]":"[object Null]":ae&&ae in Ct(e)?function(e){var n=$t.call(e,ae),r=e[ae];try{e[ae]=t;var o=!0}catch(t){}var i=jt.call(e);return o&&(n?e[ae]=r:delete e[ae]),i}(e):function(t){return jt.call(t)}(e)}function Cr(t,e){return t>e}function Ar(t,e){return null!=t&&$t.call(t,e)}function Mr(t,e){return null!=t&&e in Ct(t)}function Tr(e,n,r){for(var o=r?Ne:Te,i=e[0].length,s=e.length,a=s,l=kt(s),c=1/0,u=[];a--;){var h=e[a];a&&n&&(h=Ie(h,Ye(n))),c=_n(h.length,c),l[a]=!r&&(n||i>=120&&h.length>=120)?new Gn(a&&h):t}h=e[0];var p=-1,d=l[0];t:for(;++p<i&&u.length<c;){var f=h[p],m=n?n(f):f;if(f=r||0!==f?f:0,!(d?Ze(d,m):o(u,m,r))){for(a=s;--a;){var g=l[a];if(!(g?Ze(g,m):o(e[a],m,r)))continue t}d&&d.push(m),u.push(f)}}return u}function Nr(e,n,r){var o=null==(e=Mi(e,n=wo(n,e)))?e:e[zi(Xi(n))];return null==o?t:Se(o,e,r)}function Ir(t){return na(t)&&Or(t)==m}function Rr(e,n,r,o,i){return e===n||(null==e||null==n||!na(e)&&!na(n)?e!=e&&n!=n:function(e,n,r,o,i,s){var a=qs(e),l=qs(n),c=a?g:gi(e),u=l?g:gi(n),h=(c=c==m?S:c)==S,p=(u=u==m?S:u)==S,d=c==u;if(d&&Gs(e)){if(!Gs(n))return!1;a=!0,h=!1}if(d&&!h)return s||(s=new Yn),a||ua(e)?ri(e,n,r,o,i,s):function(t,e,n,r,o,i,s){switch(n){case I:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case N:return!(t.byteLength!=e.byteLength||!i(new qt(t),new qt(e)));case y:case v:case x:return Hs(+t,+e);case b:return t.name==e.name&&t.message==e.message;case O:case A:return t==e+"";case k:var a=sn;case C:var l=1&r;if(a||(a=cn),t.size!=e.size&&!l)return!1;var c=s.get(t);if(c)return c==e;r|=2,s.set(t,e);var u=ri(a(t),a(e),r,o,i,s);return s.delete(t),u;case M:if(jn)return jn.call(t)==jn.call(e)}return!1}(e,n,c,r,o,i,s);if(!(1&r)){var f=h&&$t.call(e,"__wrapped__"),_=p&&$t.call(n,"__wrapped__");if(f||_){var w=f?e.value():e,E=_?n.value():n;return s||(s=new Yn),i(w,E,r,o,s)}}return!!d&&(s||(s=new Yn),function(e,n,r,o,i,s){var a=1&r,l=ii(e),c=l.length,u=ii(n),h=u.length;if(c!=h&&!a)return!1;for(var p=c;p--;){var d=l[p];if(!(a?d in n:$t.call(n,d)))return!1}var f=s.get(e),m=s.get(n);if(f&&m)return f==n&&m==e;var g=!0;s.set(e,n),s.set(n,e);for(var y=a;++p<c;){var v=e[d=l[p]],b=n[d];if(o)var _=a?o(b,v,d,n,e,s):o(v,b,d,e,n,s);if(!(_===t?v===b||i(v,b,r,o,s):_)){g=!1;break}y||(y="constructor"==d)}if(g&&!y){var w=e.constructor,k=n.constructor;w==k||!("constructor"in e)||!("constructor"in n)||"function"==typeof w&&w instanceof w&&"function"==typeof k&&k instanceof k||(g=!1)}return s.delete(e),s.delete(n),g}(e,n,r,o,i,s))}(e,n,r,o,Rr,i))}function Lr(e,n,r,o){var i=r.length,s=i,a=!o;if(null==e)return!s;for(e=Ct(e);i--;){var l=r[i];if(a&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++i<s;){var c=(l=r[i])[0],u=e[c],h=l[1];if(a&&l[2]){if(u===t&&!(c in e))return!1}else{var p=new Yn;if(o)var d=o(u,h,c,e,n,p);if(!(d===t?Rr(h,u,3,o,p):d))return!1}}return!0}function Dr(t){return!(!ea(t)||(e=t,zt&&zt in e))&&(Zs(t)?Bt:mt).test(ji(t));var e}function $r(t){return"function"==typeof t?t:null==t?ol:"object"==typeof t?qs(t)?Br(t[0],t[1]):Hr(t):dl(t)}function Pr(t){if(!Ei(t))return vn(t);var e=[];for(var n in Ct(t))$t.call(t,n)&&"constructor"!=n&&e.push(n);return e}function zr(t){if(!ea(t))return function(t){var e=[];if(null!=t)for(var n in Ct(t))e.push(n);return e}(t);var e=Ei(t),n=[];for(var r in t)("constructor"!=r||!e&&$t.call(t,r))&&n.push(r);return n}function jr(t,e){return t<e}function Fr(t,e){var n=-1,r=Ks(t)?kt(t.length):[];return dr(t,(function(t,o,i){r[++n]=e(t,o,i)})),r}function Hr(t){var e=pi(t);return 1==e.length&&e[0][2]?Ci(e[0][0],e[0][1]):function(n){return n===t||Lr(n,t,e)}}function Br(e,n){return ki(e)&&Oi(n)?Ci(zi(e),n):function(r){var o=Ca(r,e);return o===t&&o===n?Aa(r,e):Rr(n,o,3)}}function Vr(e,n,r,o,i){e!==n&&br(n,(function(s,a){if(i||(i=new Yn),ea(s))!function(e,n,r,o,i,s,a){var l=Ti(e,r),c=Ti(n,r),u=a.get(c);if(u)er(e,r,u);else{var h=s?s(l,c,r+"",e,n,a):t,p=h===t;if(p){var d=qs(c),f=!d&&Gs(c),m=!d&&!f&&ua(c);h=c,d||f||m?qs(l)?h=l:Js(l)?h=No(l):f?(p=!1,h=Eo(c,!0)):m?(p=!1,h=Co(c,!0)):h=[]:ia(c)||Ws(c)?(h=l,Ws(l)?h=va(l):ea(l)&&!Zs(l)||(h=vi(c))):p=!1}p&&(a.set(c,h),i(h,c,o,s,a),a.delete(c)),er(e,r,h)}}(e,n,a,r,Vr,o,i);else{var l=o?o(Ti(e,a),s,a+"",e,n,i):t;l===t&&(l=s),er(e,a,l)}}),Ra)}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?Ie(e,(function(t){return qs(t)?function(e){return Sr(e,1===t.length?t[0]:t)}:t})):[ol];var r=-1;e=Ie(e,Ye(ui()));var o=Fr(t,(function(t,n,o){var i=Ie(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 l=Ao(o[r],i[r]);if(l)return r>=a?l:l*("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=Sr(t,s);n(a,s)&&to(i,wo(s,t),a)}return i}function Kr(t,e,n,r){var o=r?He:Fe,i=-1,s=e.length,a=t;for(t===e&&(e=No(e)),n&&(a=Ie(t,Ye(n)));++i<s;)for(var l=0,c=e[i],u=n?n(c):c;(l=o(a,u,l,r))>-1;)a!==t&&Yt.call(a,l,1),Yt.call(t,l,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)?Yt.call(t,o,1):po(t,o)}}return t}function Gr(t,e){return t+ye(xn()*(e-t+1))}function Yr(t,e){var n="";if(!t||e<1||e>h)return n;do{e%2&&(n+=t),(e=ye(e/2))&&(t+=t)}while(e);return n}function Xr(t,e){return Ri(Ai(t,e,ol),t+"")}function Zr(t){return Zn(Ha(t))}function Qr(t,e){var n=Ha(t);return $i(n,lr(e,0,n.length))}function to(e,n,r,o){if(!ea(e))return e;for(var i=-1,s=(n=wo(n,e)).length,a=s-1,l=e;null!=l&&++i<s;){var c=zi(n[i]),u=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(i!=a){var h=l[c];(u=o?o(h,c,l):t)===t&&(u=ea(h)?h:_i(n[i+1])?[]:{})}nr(l,c,u),l=l[c]}return e}var eo=Nn?function(t,e){return Nn.set(t,e),t}:ol,no=ue?function(t,e){return ue(t,"toString",{configurable:!0,enumerable:!1,value:el(e),writable:!0})}:ol;function ro(t){return $i(Ha(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=kt(o);++r<o;)i[r]=t[r+e];return i}function io(t,e){var n;return dr(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,ol,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,l=null===n,c=ca(n),u=n===t;i<s;){var h=ye((i+s)/2),p=r(e[h]),d=p!==t,f=null===p,m=p==p,g=ca(p);if(a)var y=o||m;else y=u?m&&(o||d):l?m&&d&&(o||!f):c?m&&d&&!f&&(o||!g):!f&&!g&&(o?p<=n:p<n);y?i=h+1:s=h}return _n(s,4294967294)}function lo(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||!Hs(a,l)){var l=a;i[o++]=0===s?0:s}}return i}function co(t){return"number"==typeof t?t:ca(t)?p:+t}function uo(t){if("string"==typeof t)return t;if(qs(t))return Ie(t,uo)+"";if(ca(t))return Fn?Fn.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function ho(t,e,n){var r=-1,o=Te,i=t.length,s=!0,a=[],l=a;if(n)s=!1,o=Ne;else if(i>=200){var c=e?null:Xo(t);if(c)return cn(c);s=!1,o=Ze,l=new Gn}else l=e?[]:a;t:for(;++r<i;){var u=t[r],h=e?e(u):u;if(u=n||0!==u?u:0,s&&h==h){for(var p=l.length;p--;)if(l[p]===h)continue t;e&&l.push(h),a.push(u)}else o(l,h,n)||(l!==a&&l.push(h),a.push(u))}return a}function po(t,e){return null==(t=Mi(t,e=wo(e,t)))||delete t[zi(Xi(e))]}function fo(t,e,n,r){return to(t,e,n(Sr(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()),Le(e,(function(t,e){return e.func.apply(e.thisArg,Re([t],e.args))}),n)}function yo(t,e,n){var r=t.length;if(r<2)return r?ho(t[0]):[];for(var o=-1,i=kt(r);++o<r;)for(var s=t[o],a=-1;++a<r;)a!=o&&(i[o]=pr(i[o]||s,t[a],e,n));return ho(vr(i,1),e,n)}function vo(e,n,r){for(var o=-1,i=e.length,s=n.length,a={};++o<i;){var l=o<s?n[o]:t;r(a,e[o],l)}return a}function bo(t){return Js(t)?t:[]}function _o(t){return"function"==typeof t?t:ol}function wo(t,e){return qs(t)?t:ki(t,e)?[t]:Pi(ba(t))}var ko=Xr;function xo(e,n,r){var o=e.length;return r=r===t?o:r,!n&&r>=o?e:oo(e,n,r)}var So=he||function(t){return pe.clearTimeout(t)};function Eo(t,e){if(e)return t.slice();var n=t.length,r=Ut?Ut(n):new t.constructor(n);return t.copy(r),r}function Oo(t){var e=new t.constructor(t.byteLength);return new qt(e).set(new qt(t)),e}function Co(t,e){var n=e?Oo(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Ao(e,n){if(e!==n){var r=e!==t,o=null===e,i=e==e,s=ca(e),a=n!==t,l=null===n,c=n==n,u=ca(n);if(!l&&!u&&!s&&e>n||s&&a&&c&&!l&&!u||o&&a&&c||!r&&c||!i)return 1;if(!o&&!s&&!u&&e<n||u&&r&&i&&!o&&!s||l&&r&&i||!a&&i||!c)return-1}return 0}function Mo(t,e,n,r){for(var o=-1,i=t.length,s=n.length,a=-1,l=e.length,c=bn(i-s,0),u=kt(l+c),h=!r;++a<l;)u[a]=e[a];for(;++o<s;)(h||o<i)&&(u[n[o]]=t[o]);for(;c--;)u[a++]=t[o++];return u}function To(t,e,n,r){for(var o=-1,i=t.length,s=-1,a=n.length,l=-1,c=e.length,u=bn(i-a,0),h=kt(u+c),p=!r;++o<u;)h[o]=t[o];for(var d=o;++l<c;)h[d+l]=e[l];for(;++s<a;)(p||o<i)&&(h[d+n[s]]=t[o++]);return h}function No(t,e){var n=-1,r=t.length;for(e||(e=kt(r));++n<r;)e[n]=t[n];return e}function Io(e,n,r,o){var i=!r;r||(r={});for(var s=-1,a=n.length;++s<a;){var l=n[s],c=o?o(r[l],e[l],l,r,e):t;c===t&&(c=e[l]),i?sr(r,l,c):nr(r,l,c)}return r}function Ro(t,e){return function(n,r){var o=qs(n)?Ee:or,i=e?e():{};return o(n,t,ui(r,2),i)}}function Lo(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&&wi(r[0],r[1],a)&&(s=i<3?t:s,i=1),n=Ct(n);++o<i;){var l=r[o];l&&e(n,l,o,s)}return n}))}function Do(t,e){return function(n,r){if(null==n)return n;if(!Ks(n))return t(n,r);for(var o=n.length,i=e?o:-1,s=Ct(n);(e?i--:++i<o)&&!1!==r(s[i],i,s););return n}}function $o(t){return function(e,n,r){for(var o=-1,i=Ct(e),s=r(e),a=s.length;a--;){var l=s[t?a:++o];if(!1===n(i[l],l,i))break}return e}}function Po(e){return function(n){var r=on(n=ba(n))?pn(n):t,o=r?r[0]:n.charAt(0),i=r?xo(r,1).join(""):n.slice(1);return o[e]()+i}}function zo(t){return function(e){return Le(Za(Wa(e).replace(Xt,"")),t,"")}}function jo(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=Bn(t.prototype),r=t.apply(n,e);return ea(r)?r:n}}function Fo(e){return function(n,r,o){var i=Ct(n);if(!Ks(n)){var s=ui(r,3);n=Ia(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 Ho(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 Tt(e);if(s&&!l&&"wrapper"==li(a))var l=new Wn([],!0)}for(i=l?i:o;++i<o;){var c=li(a=r[i]),u="wrapper"==c?ai(a):t;l=u&&xi(u[0])&&424==u[1]&&!u[4].length&&1==u[9]?l[li(u[0])].apply(l,u[3]):1==a.length&&xi(a)?l[c]():l.thru(a)}return function(){var t=arguments,e=t[0];if(l&&1==t.length&&qs(e))return l.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 Bo(e,n,r,o,i,s,a,c,u,h){var p=n&l,d=1&n,f=2&n,m=24&n,g=512&n,y=f?t:jo(e);return function l(){for(var v=arguments.length,b=kt(v),_=v;_--;)b[_]=arguments[_];if(m)var w=ci(l),k=function(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}(b,w);if(o&&(b=Mo(b,o,i,m)),s&&(b=To(b,s,a,m)),v-=k,m&&v<h){var x=ln(b,w);return Go(e,n,Bo,l.placeholder,r,b,x,c,u,h-v)}var S=d?r:this,E=f?S[e]:e;return v=b.length,c?b=function(e,n){for(var r=e.length,o=_n(n.length,r),i=No(e);o--;){var s=n[o];e[o]=_i(s,r)?i[s]:t}return e}(b,c):g&&v>1&&b.reverse(),p&&u<v&&(b.length=u),this&&this!==pe&&this instanceof l&&(E=y||jo(E)),E.apply(S,b)}}function Vo(t,e){return function(n,r){return function(t,e,n,r){return wr(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=uo(r),o=uo(o)):(r=co(r),o=co(o)),i=e(r,o)}return i}}function qo(t){return oi((function(e){return e=Ie(e,Ye(ui())),Xr((function(n){var r=this;return t(e,(function(t){return Se(t,r,n)}))}))}))}function Uo(e,n){var r=(n=n===t?" ":uo(n)).length;if(r<2)return r?Yr(n,e):n;var o=Yr(n,ge(e/hn(n)));return on(n)?xo(pn(o),0,e).join(""):o.slice(0,e)}function Ko(e){return function(n,r,o){return o&&"number"!=typeof o&&wi(n,r,o)&&(r=o=t),n=fa(n),r===t?(r=n,n=0):r=fa(r),function(t,e,n,r){for(var o=-1,i=bn(ge((e-t)/(n||1)),0),s=kt(i);i--;)s[r?i:++o]=t,t+=n;return s}(n,r,o=o===t?n<r?1:-1:fa(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,l,c,u,h,p){var d=8&n;n|=d?i:a,4&(n&=~(d?a:i))||(n&=-4);var f=[e,n,s,d?l:t,d?c:t,d?t:l,d?t:c,u,h,p],m=r.apply(t,f);return xi(e)&&Ni(m,f),m.placeholder=o,Li(m,e,n)}function Yo(t){var e=Ot[t];return function(t,n){if(t=ya(t),(n=null==n?0:_n(ma(n),292))&&gn(t)){var r=(ba(t)+"e").split("e");return+((r=(ba(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var Xo=An&&1/cn(new An([,-0]))[1]==u?function(t){return new An(t)}:cl;function Zo(t){return function(e){var n=gi(e);return n==k?sn(e):n==C?un(e):function(t,e){return Ie(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function Qo(n,s,u,h,p,d,f,m){var g=2&s;if(!g&&"function"!=typeof n)throw new Tt(e);var y=h?h.length:0;if(y||(s&=-97,h=p=t),f=f===t?f:bn(ma(f),0),m=m===t?m:ma(m),y-=p?p.length:0,s&a){var v=h,b=p;h=p=t}var _=g?t:ai(n),w=[n,s,u,h,p,v,b,d,f,m];if(_&&function(t,e){var n=t[1],o=e[1],i=n|o,s=i<131,a=o==l&&8==n||o==l&&n==c&&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 u=e[3];if(u){var h=t[3];t[3]=h?Mo(h,u,e[4]):u,t[4]=h?ln(t[3],r):e[4]}(u=e[5])&&(h=t[5],t[5]=h?To(h,u,e[6]):u,t[6]=h?ln(t[5],r):e[6]),(u=e[7])&&(t[7]=u),o&l&&(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}(w,_),n=w[0],s=w[1],u=w[2],h=w[3],p=w[4],!(m=w[9]=w[9]===t?g?0:n.length:bn(w[9]-y,0))&&24&s&&(s&=-25),s&&1!=s)k=8==s||s==o?function(e,n,r){var o=jo(e);return function i(){for(var s=arguments.length,a=kt(s),l=s,c=ci(i);l--;)a[l]=arguments[l];var u=s<3&&a[0]!==c&&a[s-1]!==c?[]:ln(a,c);return(s-=u.length)<r?Go(e,n,Bo,i.placeholder,t,a,u,t,t,r-s):Se(this&&this!==pe&&this instanceof i?o:e,this,a)}}(n,s,m):s!=i&&33!=s||p.length?Bo.apply(t,w):function(t,e,n,r){var o=1&e,i=jo(t);return function e(){for(var s=-1,a=arguments.length,l=-1,c=r.length,u=kt(c+a),h=this&&this!==pe&&this instanceof e?i:t;++l<c;)u[l]=r[l];for(;a--;)u[l++]=arguments[++s];return Se(h,o?n:this,u)}}(n,s,u,h);else var k=function(t,e,n){var r=1&e,o=jo(t);return function e(){return(this&&this!==pe&&this instanceof e?o:t).apply(r?n:this,arguments)}}(n,s,u);return Li((_?eo:Ni)(k,w),n,s)}function ti(e,n,r,o){return e===t||Hs(e,Rt[r])&&!$t.call(o,r)?n:e}function ei(e,n,r,o,i,s){return ea(e)&&ea(n)&&(s.set(n,e),Vr(e,n,t,ei,s),s.delete(n)),e}function ni(e){return ia(e)?t:e}function ri(e,n,r,o,i,s){var a=1&r,l=e.length,c=n.length;if(l!=c&&!(a&&c>l))return!1;var u=s.get(e),h=s.get(n);if(u&&h)return u==n&&h==e;var p=-1,d=!0,f=2&r?new Gn:t;for(s.set(e,n),s.set(n,e);++p<l;){var m=e[p],g=n[p];if(o)var y=a?o(g,m,p,n,e,s):o(m,g,p,e,n,s);if(y!==t){if(y)continue;d=!1;break}if(f){if(!$e(n,(function(t,e){if(!Ze(f,e)&&(m===t||i(m,t,r,o,s)))return f.push(e)}))){d=!1;break}}else if(m!==g&&!i(m,g,r,o,s)){d=!1;break}}return s.delete(e),s.delete(n),d}function oi(e){return Ri(Ai(e,t,Ui),e+"")}function ii(t){return Er(t,Ia,fi)}function si(t){return Er(t,Ra,mi)}var ai=Nn?function(t){return Nn.get(t)}:cl;function li(t){for(var e=t.name+"",n=In[e],r=$t.call(In,e)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==t)return o.name}return e}function ci(t){return($t.call(Hn,"placeholder")?Hn:t).placeholder}function ui(){var t=Hn.iteratee||il;return t=t===il?$r:t,arguments.length?t(arguments[0],arguments[1]):t}function hi(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 pi(t){for(var e=Ia(t),n=e.length;n--;){var r=e[n],o=t[r];e[n]=[r,o,Oi(o)]}return e}function di(e,n){var r=function(e,n){return null==e?t:e[n]}(e,n);return Dr(r)?r:t}var fi=Pe?function(t){return null==t?[]:(t=Ct(t),Me(Pe(t),(function(e){return Gt.call(t,e)})))}:gl,mi=Pe?function(t){for(var e=[];t;)Re(e,fi(t)),t=Kt(t);return e}:gl,gi=Or;function yi(t,e,n){for(var r=-1,o=(e=wo(e,t)).length,i=!1;++r<o;){var s=zi(e[r]);if(!(i=null!=t&&n(t,s)))break;t=t[s]}return i||++r!=o?i:!!(o=null==t?0:t.length)&&ta(o)&&_i(s,o)&&(qs(t)||Ws(t))}function vi(t){return"function"!=typeof t.constructor||Ei(t)?{}:Bn(Kt(t))}function bi(t){return qs(t)||Ws(t)||!!(Qt&&t&&t[Qt])}function _i(t,e){var n=typeof t;return!!(e=null==e?h:e)&&("number"==n||"symbol"!=n&&yt.test(t))&&t>-1&&t%1==0&&t<e}function wi(t,e,n){if(!ea(n))return!1;var r=typeof e;return!!("number"==r?Ks(n)&&_i(e,n.length):"string"==r&&e in n)&&Hs(n[e],t)}function ki(t,e){if(qs(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 Ct(e)}function xi(t){var e=li(t),n=Hn[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]}(En&&gi(new En(new ArrayBuffer(1)))!=I||On&&gi(new On)!=k||Cn&&gi(Cn.resolve())!=E||An&&gi(new An)!=C||Mn&&gi(new Mn)!=T)&&(gi=function(e){var n=Or(e),r=n==S?e.constructor:t,o=r?ji(r):"";if(o)switch(o){case Rn:return I;case Ln:return k;case Dn:return E;case $n:return C;case Pn:return T}return n});var Si=Lt?Zs:yl;function Ei(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Rt)}function Oi(t){return t==t&&!ea(t)}function Ci(e,n){return function(r){return null!=r&&r[e]===n&&(n!==t||e in Ct(r))}}function Ai(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=kt(i);++o<i;)s[o]=t[n+o];o=-1;for(var a=kt(n+1);++o<n;)a[o]=t[o];return a[n]=r(s),Se(e,this,a)}}function Mi(t,e){return e.length<2?t:Sr(t,oo(e,0,-1))}function Ti(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var Ni=Di(eo),Ii=fe||function(t,e){return pe.setTimeout(t,e)},Ri=Di(no);function Li(t,e,n){var r=e+"";return Ri(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 Oe(f,(function(n){var r="_."+n[0];e&n[1]&&!Te(t,r)&&t.push(r)})),t.sort()}(function(t){var e=t.match(st);return e?e[1].split(at):[]}(r),n)))}function Di(e){var n=0,r=0;return function(){var o=wn(),i=16-(o-r);if(r=o,i>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(t,arguments)}}function $i(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 Pi=function(t){var e=Ds(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(ut,"$1"):n||t)})),e}));function zi(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 Dt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Fi(t){if(t instanceof qn)return t.clone();var e=new Wn(t.__wrapped__,t.__chain__);return e.__actions__=No(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Hi=Xr((function(t,e){return Js(t)?pr(t,vr(e,1,Js,!0)):[]})),Bi=Xr((function(e,n){var r=Xi(n);return Js(r)&&(r=t),Js(e)?pr(e,vr(n,1,Js,!0),ui(r,2)):[]})),Vi=Xr((function(e,n){var r=Xi(n);return Js(r)&&(r=t),Js(e)?pr(e,vr(n,1,Js,!0),t,r):[]}));function Wi(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=null==n?0:ma(n);return o<0&&(o=bn(r+o,0)),je(t,ui(e,3),o)}function qi(e,n,r){var o=null==e?0:e.length;if(!o)return-1;var i=o-1;return r!==t&&(i=ma(r),i=r<0?bn(o+i,0):_n(i,o-1)),je(e,ui(n,3),i,!0)}function Ui(t){return null!=t&&t.length?vr(t,1):[]}function Ki(e){return e&&e.length?e[0]:t}var Ji=Xr((function(t){var e=Ie(t,bo);return e.length&&e[0]===t[0]?Tr(e):[]})),Gi=Xr((function(e){var n=Xi(e),r=Ie(e,bo);return n===Xi(r)?n=t:r.pop(),r.length&&r[0]===e[0]?Tr(r,ui(n,2)):[]})),Yi=Xr((function(e){var n=Xi(e),r=Ie(e,bo);return(n="function"==typeof n?n:t)&&r.pop(),r.length&&r[0]===e[0]?Tr(r,t,n):[]}));function Xi(e){var n=null==e?0:e.length;return n?e[n-1]:t}var Zi=Xr(Qi);function Qi(t,e){return t&&t.length&&e&&e.length?Kr(t,e):t}var ts=oi((function(t,e){var n=null==t?0:t.length,r=ar(t,e);return Jr(t,Ie(e,(function(t){return _i(t,n)?+t:t})).sort(Ao)),r}));function es(t){return null==t?t:Sn.call(t)}var ns=Xr((function(t){return ho(vr(t,1,Js,!0))})),rs=Xr((function(e){var n=Xi(e);return Js(n)&&(n=t),ho(vr(e,1,Js,!0),ui(n,2))})),os=Xr((function(e){var n=Xi(e);return n="function"==typeof n?n:t,ho(vr(e,1,Js,!0),t,n)}));function is(t){if(!t||!t.length)return[];var e=0;return t=Me(t,(function(t){if(Js(t))return e=bn(t.length,e),!0})),Je(e,(function(e){return Ie(t,We(e))}))}function ss(e,n){if(!e||!e.length)return[];var r=is(e);return null==n?r:Ie(r,(function(e){return Se(n,t,e)}))}var as=Xr((function(t,e){return Js(t)?pr(t,e):[]})),ls=Xr((function(t){return yo(Me(t,Js))})),cs=Xr((function(e){var n=Xi(e);return Js(n)&&(n=t),yo(Me(e,Js),ui(n,2))})),us=Xr((function(e){var n=Xi(e);return n="function"==typeof n?n:t,yo(Me(e,Js),t,n)})),hs=Xr(is),ps=Xr((function(e){var n=e.length,r=n>1?e[n-1]:t;return r="function"==typeof r?(e.pop(),r):t,ss(e,r)}));function ds(t){var e=Hn(t);return e.__chain__=!0,e}function fs(t,e){return e(t)}var ms=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:fs,args:[i],thisArg:t}),new Wn(o,this.__chain__).thru((function(e){return n&&!e.length&&e.push(t),e}))):this.thru(i)})),gs=Ro((function(t,e,n){$t.call(t,n)?++t[n]:sr(t,n,1)})),ys=Fo(Wi),vs=Fo(qi);function bs(t,e){return(qs(t)?Oe:dr)(t,ui(e,3))}function _s(t,e){return(qs(t)?Ce:fr)(t,ui(e,3))}var ws=Ro((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=Ks(t)?kt(t.length):[];return dr(t,(function(t){i[++r]=o?Se(e,t,n):Nr(t,e,n)})),i})),xs=Ro((function(t,e,n){sr(t,n,e)}));function Ss(t,e){return(qs(t)?Ie:Fr)(t,ui(e,3))}var Es=Ro((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]})),Os=Xr((function(t,e){if(null==t)return[];var n=e.length;return n>1&&wi(t,e[0],e[1])?e=[]:n>2&&wi(e[0],e[1],e[2])&&(e=[e[0]]),qr(t,vr(e,1),[])})),Cs=de||function(){return pe.Date.now()};function As(e,n,r){return n=r?t:n,n=e&&null==n?e.length:n,Qo(e,l,t,t,t,t,n)}function Ms(n,r){var o;if("function"!=typeof r)throw new Tt(e);return n=ma(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,ci(Ts));r|=i}return Qo(t,r,e,n,o)})),Ns=Xr((function(t,e,n){var r=3;if(n.length){var o=ln(n,ci(Ns));r|=i}return Qo(e,r,t,n,o)}));function Is(n,r,o){var i,s,a,l,c,u,h=0,p=!1,d=!1,f=!0;if("function"!=typeof n)throw new Tt(e);function m(e){var r=i,o=s;return i=s=t,h=e,l=n.apply(o,r)}function g(e){var n=e-u;return u===t||n>=r||n<0||d&&e-h>=a}function y(){var t=Cs();if(g(t))return v(t);c=Ii(y,function(t){var e=r-(t-u);return d?_n(e,a-(t-h)):e}(t))}function v(e){return c=t,f&&i?m(e):(i=s=t,l)}function b(){var e=Cs(),n=g(e);if(i=arguments,s=this,u=e,n){if(c===t)return function(t){return h=t,c=Ii(y,r),p?m(t):l}(u);if(d)return So(c),c=Ii(y,r),m(u)}return c===t&&(c=Ii(y,r)),l}return r=ya(r)||0,ea(o)&&(p=!!o.leading,a=(d="maxWait"in o)?bn(ya(o.maxWait)||0,r):a,f="trailing"in o?!!o.trailing:f),b.cancel=function(){c!==t&&So(c),h=0,i=u=s=c=t},b.flush=function(){return c===t?l:v(Cs())},b}var Rs=Xr((function(t,e){return hr(t,1,e)})),Ls=Xr((function(t,e,n){return hr(t,ya(e)||0,n)}));function Ds(t,n){if("function"!=typeof t||null!=n&&"function"!=typeof n)throw new Tt(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(Ds.Cache||Jn),r}function $s(t){if("function"!=typeof t)throw new Tt(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)}}Ds.Cache=Jn;var Ps=ko((function(t,e){var n=(e=1==e.length&&qs(e[0])?Ie(e[0],Ye(ui())):Ie(vr(e,1),Ye(ui()))).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 Se(t,this,r)}))})),zs=Xr((function(e,n){var r=ln(n,ci(zs));return Qo(e,i,t,n,r)})),js=Xr((function(e,n){var r=ln(n,ci(js));return Qo(e,a,t,n,r)})),Fs=oi((function(e,n){return Qo(e,c,t,t,t,n)}));function Hs(t,e){return t===e||t!=t&&e!=e}var Bs=Jo(Cr),Vs=Jo((function(t,e){return t>=e})),Ws=Ir(function(){return arguments}())?Ir:function(t){return na(t)&&$t.call(t,"callee")&&!Gt.call(t,"callee")},qs=kt.isArray,Us=ve?Ye(ve):function(t){return na(t)&&Or(t)==N};function Ks(t){return null!=t&&ta(t.length)&&!Zs(t)}function Js(t){return na(t)&&Ks(t)}var Gs=qe||yl,Ys=be?Ye(be):function(t){return na(t)&&Or(t)==v};function Xs(t){if(!na(t))return!1;var e=Or(t);return e==b||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!ia(t)}function Zs(t){if(!ea(t))return!1;var e=Or(t);return e==_||e==w||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Qs(t){return"number"==typeof t&&t==ma(t)}function ta(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=h}function ea(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function na(t){return null!=t&&"object"==typeof t}var ra=_e?Ye(_e):function(t){return na(t)&&gi(t)==k};function oa(t){return"number"==typeof t||na(t)&&Or(t)==x}function ia(t){if(!na(t)||Or(t)!=S)return!1;var e=Kt(t);if(null===e)return!0;var n=$t.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Dt.call(n)==Ft}var sa=we?Ye(we):function(t){return na(t)&&Or(t)==O},aa=ke?Ye(ke):function(t){return na(t)&&gi(t)==C};function la(t){return"string"==typeof t||!qs(t)&&na(t)&&Or(t)==A}function ca(t){return"symbol"==typeof t||na(t)&&Or(t)==M}var ua=xe?Ye(xe):function(t){return na(t)&&ta(t.length)&&!!ie[Or(t)]},ha=Jo(jr),pa=Jo((function(t,e){return t<=e}));function da(t){if(!t)return[];if(Ks(t))return la(t)?pn(t):No(t);if(ee&&t[ee])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[ee]());var e=gi(t);return(e==k?sn:e==C?cn:Ha)(t)}function fa(t){return t?(t=ya(t))===u||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function ma(t){var e=fa(t),n=e%1;return e==e?n?e-n:e:0}function ga(t){return t?lr(ma(t),0,d):0}function ya(t){if("number"==typeof t)return t;if(ca(t))return p;if(ea(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=ea(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Ge(t);var n=ft.test(t);return n||gt.test(t)?ce(t.slice(2),n?2:8):dt.test(t)?p:+t}function va(t){return Io(t,Ra(t))}function ba(t){return null==t?"":uo(t)}var _a=Lo((function(t,e){if(Ei(e)||Ks(e))Io(e,Ia(e),t);else for(var n in e)$t.call(e,n)&&nr(t,n,e[n])})),wa=Lo((function(t,e){Io(e,Ra(e),t)})),ka=Lo((function(t,e,n,r){Io(e,Ra(e),t,r)})),xa=Lo((function(t,e,n,r){Io(e,Ia(e),t,r)})),Sa=oi(ar),Ea=Xr((function(e,n){e=Ct(e);var r=-1,o=n.length,i=o>2?n[2]:t;for(i&&wi(n[0],n[1],i)&&(o=1);++r<o;)for(var s=n[r],a=Ra(s),l=-1,c=a.length;++l<c;){var u=a[l],h=e[u];(h===t||Hs(h,Rt[u])&&!$t.call(e,u))&&(e[u]=s[u])}return e})),Oa=Xr((function(e){return e.push(t,ei),Se(Da,t,e)}));function Ca(e,n,r){var o=null==e?t:Sr(e,n);return o===t?r:o}function Aa(t,e){return null!=t&&yi(t,e,Mr)}var Ma=Vo((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=jt.call(e)),t[e]=n}),el(ol)),Ta=Vo((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=jt.call(e)),$t.call(t,e)?t[e].push(n):t[e]=[n]}),ui),Na=Xr(Nr);function Ia(t){return Ks(t)?Xn(t):Pr(t)}function Ra(t){return Ks(t)?Xn(t,!0):zr(t)}var La=Lo((function(t,e,n){Vr(t,e,n)})),Da=Lo((function(t,e,n,r){Vr(t,e,n,r)})),$a=oi((function(t,e){var n={};if(null==t)return n;var r=!1;e=Ie(e,(function(e){return e=wo(e,t),r||(r=e.length>1),e})),Io(t,si(t),n),r&&(n=cr(n,7,ni));for(var o=e.length;o--;)po(n,e[o]);return n})),Pa=oi((function(t,e){return null==t?{}:function(t,e){return Ur(t,e,(function(e,n){return Aa(t,n)}))}(t,e)}));function za(t,e){if(null==t)return{};var n=Ie(si(t),(function(t){return[t]}));return e=ui(e),Ur(t,n,(function(t,n){return e(t,n[0])}))}var ja=Zo(Ia),Fa=Zo(Ra);function Ha(t){return null==t?[]:Xe(t,Ia(t))}var Ba=zo((function(t,e,n){return e=e.toLowerCase(),t+(n?Va(e):e)}));function Va(t){return Xa(ba(t).toLowerCase())}function Wa(t){return(t=ba(t))&&t.replace(vt,en).replace(Zt,"")}var qa=zo((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),Ua=zo((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),Ka=Po("toLowerCase"),Ja=zo((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()})),Ga=zo((function(t,e,n){return t+(n?" ":"")+Xa(e)})),Ya=zo((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),Xa=Po("toUpperCase");function Za(e,n,r){return e=ba(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(lt)||[]}(e):e.match(n)||[]}var Qa=Xr((function(e,n){try{return Se(e,t,n)}catch(t){return Xs(t)?t:new St(t)}})),tl=oi((function(t,e){return Oe(e,(function(e){e=zi(e),sr(t,e,Ts(t[e],t))})),t}));function el(t){return function(){return t}}var nl=Ho(),rl=Ho(!0);function ol(t){return t}function il(t){return $r("function"==typeof t?t:cr(t,1))}var sl=Xr((function(t,e){return function(n){return Nr(n,t,e)}})),al=Xr((function(t,e){return function(n){return Nr(t,n,e)}}));function ll(t,e,n){var r=Ia(e),o=xr(e,r);null!=n||ea(e)&&(o.length||!r.length)||(n=e,e=t,t=this,o=xr(e,Ia(e)));var i=!(ea(n)&&"chain"in n&&!n.chain),s=Zs(t);return Oe(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__);return(n.__actions__=No(this.__actions__)).push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,Re([this.value()],arguments))})})),t}function cl(){}var ul=qo(Ie),hl=qo(Ae),pl=qo($e);function dl(t){return ki(t)?We(zi(t)):function(t){return function(e){return Sr(e,t)}}(t)}var fl=Ko(),ml=Ko(!0);function gl(){return[]}function yl(){return!1}var vl,bl=Wo((function(t,e){return t+e}),0),_l=Yo("ceil"),wl=Wo((function(t,e){return t/e}),1),kl=Yo("floor"),xl=Wo((function(t,e){return t*e}),1),Sl=Yo("round"),El=Wo((function(t,e){return t-e}),0);return Hn.after=function(t,n){if("function"!=typeof n)throw new Tt(e);return t=ma(t),function(){if(--t<1)return n.apply(this,arguments)}},Hn.ary=As,Hn.assign=_a,Hn.assignIn=wa,Hn.assignInWith=ka,Hn.assignWith=xa,Hn.at=Sa,Hn.before=Ms,Hn.bind=Ts,Hn.bindAll=tl,Hn.bindKey=Ns,Hn.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return qs(t)?t:[t]},Hn.chain=ds,Hn.chunk=function(e,n,r){n=(r?wi(e,n,r):n===t)?1:bn(ma(n),0);var o=null==e?0:e.length;if(!o||n<1)return[];for(var i=0,s=0,a=kt(ge(o/n));i<o;)a[s++]=oo(e,i,i+=n);return a},Hn.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},Hn.concat=function(){var t=arguments.length;if(!t)return[];for(var e=kt(t-1),n=arguments[0],r=t;r--;)e[r-1]=arguments[r];return Re(qs(n)?No(n):[n],vr(e,1))},Hn.cond=function(t){var n=null==t?0:t.length,r=ui();return t=n?Ie(t,(function(t){if("function"!=typeof t[1])throw new Tt(e);return[r(t[0]),t[1]]})):[],Xr((function(e){for(var r=-1;++r<n;){var o=t[r];if(Se(o[0],this,e))return Se(o[1],this,e)}}))},Hn.conforms=function(t){return function(t){var e=Ia(t);return function(n){return ur(n,t,e)}}(cr(t,1))},Hn.constant=el,Hn.countBy=gs,Hn.create=function(t,e){var n=Bn(t);return null==e?n:ir(n,e)},Hn.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},Hn.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},Hn.debounce=Is,Hn.defaults=Ea,Hn.defaultsDeep=Oa,Hn.defer=Rs,Hn.delay=Ls,Hn.difference=Hi,Hn.differenceBy=Bi,Hn.differenceWith=Vi,Hn.drop=function(e,n,r){var o=null==e?0:e.length;return o?oo(e,(n=r||n===t?1:ma(n))<0?0:n,o):[]},Hn.dropRight=function(e,n,r){var o=null==e?0:e.length;return o?oo(e,0,(n=o-(n=r||n===t?1:ma(n)))<0?0:n):[]},Hn.dropRightWhile=function(t,e){return t&&t.length?mo(t,ui(e,3),!0,!0):[]},Hn.dropWhile=function(t,e){return t&&t.length?mo(t,ui(e,3),!0):[]},Hn.fill=function(e,n,r,o){var i=null==e?0:e.length;return i?(r&&"number"!=typeof r&&wi(e,n,r)&&(r=0,o=i),function(e,n,r,o){var i=e.length;for((r=ma(r))<0&&(r=-r>i?0:i+r),(o=o===t||o>i?i:ma(o))<0&&(o+=i),o=r>o?0:ga(o);r<o;)e[r++]=n;return e}(e,n,r,o)):[]},Hn.filter=function(t,e){return(qs(t)?Me:yr)(t,ui(e,3))},Hn.flatMap=function(t,e){return vr(Ss(t,e),1)},Hn.flatMapDeep=function(t,e){return vr(Ss(t,e),u)},Hn.flatMapDepth=function(e,n,r){return r=r===t?1:ma(r),vr(Ss(e,n),r)},Hn.flatten=Ui,Hn.flattenDeep=function(t){return null!=t&&t.length?vr(t,u):[]},Hn.flattenDepth=function(e,n){return null!=e&&e.length?vr(e,n=n===t?1:ma(n)):[]},Hn.flip=function(t){return Qo(t,512)},Hn.flow=nl,Hn.flowRight=rl,Hn.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},Hn.functions=function(t){return null==t?[]:xr(t,Ia(t))},Hn.functionsIn=function(t){return null==t?[]:xr(t,Ra(t))},Hn.groupBy=ws,Hn.initial=function(t){return null!=t&&t.length?oo(t,0,-1):[]},Hn.intersection=Ji,Hn.intersectionBy=Gi,Hn.intersectionWith=Yi,Hn.invert=Ma,Hn.invertBy=Ta,Hn.invokeMap=ks,Hn.iteratee=il,Hn.keyBy=xs,Hn.keys=Ia,Hn.keysIn=Ra,Hn.map=Ss,Hn.mapKeys=function(t,e){var n={};return e=ui(e,3),wr(t,(function(t,r,o){sr(n,e(t,r,o),t)})),n},Hn.mapValues=function(t,e){var n={};return e=ui(e,3),wr(t,(function(t,r,o){sr(n,r,e(t,r,o))})),n},Hn.matches=function(t){return Hr(cr(t,1))},Hn.matchesProperty=function(t,e){return Br(t,cr(e,1))},Hn.memoize=Ds,Hn.merge=La,Hn.mergeWith=Da,Hn.method=sl,Hn.methodOf=al,Hn.mixin=ll,Hn.negate=$s,Hn.nthArg=function(t){return t=ma(t),Xr((function(e){return Wr(e,t)}))},Hn.omit=$a,Hn.omitBy=function(t,e){return za(t,$s(ui(e)))},Hn.once=function(t){return Ms(2,t)},Hn.orderBy=function(e,n,r,o){return null==e?[]:(qs(n)||(n=null==n?[]:[n]),qs(r=o?t:r)||(r=null==r?[]:[r]),qr(e,n,r))},Hn.over=ul,Hn.overArgs=Ps,Hn.overEvery=hl,Hn.overSome=pl,Hn.partial=zs,Hn.partialRight=js,Hn.partition=Es,Hn.pick=Pa,Hn.pickBy=za,Hn.property=dl,Hn.propertyOf=function(e){return function(n){return null==e?t:Sr(e,n)}},Hn.pull=Zi,Hn.pullAll=Qi,Hn.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?Kr(t,e,ui(n,2)):t},Hn.pullAllWith=function(e,n,r){return e&&e.length&&n&&n.length?Kr(e,n,t,r):e},Hn.pullAt=ts,Hn.range=fl,Hn.rangeRight=ml,Hn.rearg=Fs,Hn.reject=function(t,e){return(qs(t)?Me:yr)(t,$s(ui(e,3)))},Hn.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,o=[],i=t.length;for(e=ui(e,3);++r<i;){var s=t[r];e(s,r,t)&&(n.push(s),o.push(r))}return Jr(t,o),n},Hn.rest=function(n,r){if("function"!=typeof n)throw new Tt(e);return Xr(n,r=r===t?r:ma(r))},Hn.reverse=es,Hn.sampleSize=function(e,n,r){return n=(r?wi(e,n,r):n===t)?1:ma(n),(qs(e)?Qn:Qr)(e,n)},Hn.set=function(t,e,n){return null==t?t:to(t,e,n)},Hn.setWith=function(e,n,r,o){return o="function"==typeof o?o:t,null==e?e:to(e,n,r,o)},Hn.shuffle=function(t){return(qs(t)?tr:ro)(t)},Hn.slice=function(e,n,r){var o=null==e?0:e.length;return o?(r&&"number"!=typeof r&&wi(e,n,r)?(n=0,r=o):(n=null==n?0:ma(n),r=r===t?o:ma(r)),oo(e,n,r)):[]},Hn.sortBy=Os,Hn.sortedUniq=function(t){return t&&t.length?lo(t):[]},Hn.sortedUniqBy=function(t,e){return t&&t.length?lo(t,ui(e,2)):[]},Hn.split=function(e,n,r){return r&&"number"!=typeof r&&wi(e,n,r)&&(n=r=t),(r=r===t?d:r>>>0)?(e=ba(e))&&("string"==typeof n||null!=n&&!sa(n))&&!(n=uo(n))&&on(e)?xo(pn(e),0,r):e.split(n,r):[]},Hn.spread=function(t,n){if("function"!=typeof t)throw new Tt(e);return n=null==n?0:bn(ma(n),0),Xr((function(e){var r=e[n],o=xo(e,0,n);return r&&Re(o,r),Se(t,this,o)}))},Hn.tail=function(t){var e=null==t?0:t.length;return e?oo(t,1,e):[]},Hn.take=function(e,n,r){return e&&e.length?oo(e,0,(n=r||n===t?1:ma(n))<0?0:n):[]},Hn.takeRight=function(e,n,r){var o=null==e?0:e.length;return o?oo(e,(n=o-(n=r||n===t?1:ma(n)))<0?0:n,o):[]},Hn.takeRightWhile=function(t,e){return t&&t.length?mo(t,ui(e,3),!1,!0):[]},Hn.takeWhile=function(t,e){return t&&t.length?mo(t,ui(e,3)):[]},Hn.tap=function(t,e){return e(t),t},Hn.throttle=function(t,n,r){var o=!0,i=!0;if("function"!=typeof t)throw new Tt(e);return ea(r)&&(o="leading"in r?!!r.leading:o,i="trailing"in r?!!r.trailing:i),Is(t,n,{leading:o,maxWait:n,trailing:i})},Hn.thru=fs,Hn.toArray=da,Hn.toPairs=ja,Hn.toPairsIn=Fa,Hn.toPath=function(t){return qs(t)?Ie(t,zi):ca(t)?[t]:No(Pi(ba(t)))},Hn.toPlainObject=va,Hn.transform=function(t,e,n){var r=qs(t),o=r||Gs(t)||ua(t);if(e=ui(e,4),null==n){var i=t&&t.constructor;n=o?r?new i:[]:ea(t)&&Zs(i)?Bn(Kt(t)):{}}return(o?Oe:wr)(t,(function(t,r,o){return e(n,t,r,o)})),n},Hn.unary=function(t){return As(t,1)},Hn.union=ns,Hn.unionBy=rs,Hn.unionWith=os,Hn.uniq=function(t){return t&&t.length?ho(t):[]},Hn.uniqBy=function(t,e){return t&&t.length?ho(t,ui(e,2)):[]},Hn.uniqWith=function(e,n){return n="function"==typeof n?n:t,e&&e.length?ho(e,t,n):[]},Hn.unset=function(t,e){return null==t||po(t,e)},Hn.unzip=is,Hn.unzipWith=ss,Hn.update=function(t,e,n){return null==t?t:fo(t,e,_o(n))},Hn.updateWith=function(e,n,r,o){return o="function"==typeof o?o:t,null==e?e:fo(e,n,_o(r),o)},Hn.values=Ha,Hn.valuesIn=function(t){return null==t?[]:Xe(t,Ra(t))},Hn.without=as,Hn.words=Za,Hn.wrap=function(t,e){return zs(_o(e),t)},Hn.xor=ls,Hn.xorBy=cs,Hn.xorWith=us,Hn.zip=hs,Hn.zipObject=function(t,e){return vo(t||[],e||[],nr)},Hn.zipObjectDeep=function(t,e){return vo(t||[],e||[],to)},Hn.zipWith=ps,Hn.entries=ja,Hn.entriesIn=Fa,Hn.extend=wa,Hn.extendWith=ka,ll(Hn,Hn),Hn.add=bl,Hn.attempt=Qa,Hn.camelCase=Ba,Hn.capitalize=Va,Hn.ceil=_l,Hn.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),lr(ya(e),n,r)},Hn.clone=function(t){return cr(t,4)},Hn.cloneDeep=function(t){return cr(t,5)},Hn.cloneDeepWith=function(e,n){return cr(e,5,n="function"==typeof n?n:t)},Hn.cloneWith=function(e,n){return cr(e,4,n="function"==typeof n?n:t)},Hn.conformsTo=function(t,e){return null==e||ur(t,e,Ia(e))},Hn.deburr=Wa,Hn.defaultTo=function(t,e){return null==t||t!=t?e:t},Hn.divide=wl,Hn.endsWith=function(e,n,r){e=ba(e),n=uo(n);var o=e.length,i=r=r===t?o:lr(ma(r),0,o);return(r-=n.length)>=0&&e.slice(r,i)==n},Hn.eq=Hs,Hn.escape=function(t){return(t=ba(t))&&J.test(t)?t.replace(U,nn):t},Hn.escapeRegExp=function(t){return(t=ba(t))&&nt.test(t)?t.replace(et,"\\$&"):t},Hn.every=function(e,n,r){var o=qs(e)?Ae:mr;return r&&wi(e,n,r)&&(n=t),o(e,ui(n,3))},Hn.find=ys,Hn.findIndex=Wi,Hn.findKey=function(t,e){return ze(t,ui(e,3),wr)},Hn.findLast=vs,Hn.findLastIndex=qi,Hn.findLastKey=function(t,e){return ze(t,ui(e,3),kr)},Hn.floor=kl,Hn.forEach=bs,Hn.forEachRight=_s,Hn.forIn=function(t,e){return null==t?t:br(t,ui(e,3),Ra)},Hn.forInRight=function(t,e){return null==t?t:_r(t,ui(e,3),Ra)},Hn.forOwn=function(t,e){return t&&wr(t,ui(e,3))},Hn.forOwnRight=function(t,e){return t&&kr(t,ui(e,3))},Hn.get=Ca,Hn.gt=Bs,Hn.gte=Vs,Hn.has=function(t,e){return null!=t&&yi(t,e,Ar)},Hn.hasIn=Aa,Hn.head=Ki,Hn.identity=ol,Hn.includes=function(t,e,n,r){t=Ks(t)?t:Ha(t),n=n&&!r?ma(n):0;var o=t.length;return n<0&&(n=bn(o+n,0)),la(t)?n<=o&&t.indexOf(e,n)>-1:!!o&&Fe(t,e,n)>-1},Hn.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=null==n?0:ma(n);return o<0&&(o=bn(r+o,0)),Fe(t,e,o)},Hn.inRange=function(e,n,r){return n=fa(n),r===t?(r=n,n=0):r=fa(r),function(t,e,n){return t>=_n(e,n)&&t<bn(e,n)}(e=ya(e),n,r)},Hn.invoke=Na,Hn.isArguments=Ws,Hn.isArray=qs,Hn.isArrayBuffer=Us,Hn.isArrayLike=Ks,Hn.isArrayLikeObject=Js,Hn.isBoolean=function(t){return!0===t||!1===t||na(t)&&Or(t)==y},Hn.isBuffer=Gs,Hn.isDate=Ys,Hn.isElement=function(t){return na(t)&&1===t.nodeType&&!ia(t)},Hn.isEmpty=function(t){if(null==t)return!0;if(Ks(t)&&(qs(t)||"string"==typeof t||"function"==typeof t.splice||Gs(t)||ua(t)||Ws(t)))return!t.length;var e=gi(t);if(e==k||e==C)return!t.size;if(Ei(t))return!Pr(t).length;for(var n in t)if($t.call(t,n))return!1;return!0},Hn.isEqual=function(t,e){return Rr(t,e)},Hn.isEqualWith=function(e,n,r){var o=(r="function"==typeof r?r:t)?r(e,n):t;return o===t?Rr(e,n,t,r):!!o},Hn.isError=Xs,Hn.isFinite=function(t){return"number"==typeof t&&gn(t)},Hn.isFunction=Zs,Hn.isInteger=Qs,Hn.isLength=ta,Hn.isMap=ra,Hn.isMatch=function(t,e){return t===e||Lr(t,e,pi(e))},Hn.isMatchWith=function(e,n,r){return r="function"==typeof r?r:t,Lr(e,n,pi(n),r)},Hn.isNaN=function(t){return oa(t)&&t!=+t},Hn.isNative=function(t){if(Si(t))throw new St("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Dr(t)},Hn.isNil=function(t){return null==t},Hn.isNull=function(t){return null===t},Hn.isNumber=oa,Hn.isObject=ea,Hn.isObjectLike=na,Hn.isPlainObject=ia,Hn.isRegExp=sa,Hn.isSafeInteger=function(t){return Qs(t)&&t>=-9007199254740991&&t<=h},Hn.isSet=aa,Hn.isString=la,Hn.isSymbol=ca,Hn.isTypedArray=ua,Hn.isUndefined=function(e){return e===t},Hn.isWeakMap=function(t){return na(t)&&gi(t)==T},Hn.isWeakSet=function(t){return na(t)&&"[object WeakSet]"==Or(t)},Hn.join=function(t,e){return null==t?"":yn.call(t,e)},Hn.kebabCase=qa,Hn.last=Xi,Hn.lastIndexOf=function(e,n,r){var o=null==e?0:e.length;if(!o)return-1;var i=o;return r!==t&&(i=(i=ma(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):je(e,Be,i,!0)},Hn.lowerCase=Ua,Hn.lowerFirst=Ka,Hn.lt=ha,Hn.lte=pa,Hn.max=function(e){return e&&e.length?gr(e,ol,Cr):t},Hn.maxBy=function(e,n){return e&&e.length?gr(e,ui(n,2),Cr):t},Hn.mean=function(t){return Ve(t,ol)},Hn.meanBy=function(t,e){return Ve(t,ui(e,2))},Hn.min=function(e){return e&&e.length?gr(e,ol,jr):t},Hn.minBy=function(e,n){return e&&e.length?gr(e,ui(n,2),jr):t},Hn.stubArray=gl,Hn.stubFalse=yl,Hn.stubObject=function(){return{}},Hn.stubString=function(){return""},Hn.stubTrue=function(){return!0},Hn.multiply=xl,Hn.nth=function(e,n){return e&&e.length?Wr(e,ma(n)):t},Hn.noConflict=function(){return pe._===this&&(pe._=Ht),this},Hn.noop=cl,Hn.now=Cs,Hn.pad=function(t,e,n){t=ba(t);var r=(e=ma(e))?hn(t):0;if(!e||r>=e)return t;var o=(e-r)/2;return Uo(ye(o),n)+t+Uo(ge(o),n)},Hn.padEnd=function(t,e,n){t=ba(t);var r=(e=ma(e))?hn(t):0;return e&&r<e?t+Uo(e-r,n):t},Hn.padStart=function(t,e,n){t=ba(t);var r=(e=ma(e))?hn(t):0;return e&&r<e?Uo(e-r,n)+t:t},Hn.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),kn(ba(t).replace(rt,""),e||0)},Hn.random=function(e,n,r){if(r&&"boolean"!=typeof r&&wi(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=fa(e),n===t?(n=e,e=0):n=fa(n)),e>n){var o=e;e=n,n=o}if(r||e%1||n%1){var i=xn();return _n(e+i*(n-e+le("1e-"+((i+"").length-1))),n)}return Gr(e,n)},Hn.reduce=function(t,e,n){var r=qs(t)?Le:Ue,o=arguments.length<3;return r(t,ui(e,4),n,o,dr)},Hn.reduceRight=function(t,e,n){var r=qs(t)?De:Ue,o=arguments.length<3;return r(t,ui(e,4),n,o,fr)},Hn.repeat=function(e,n,r){return n=(r?wi(e,n,r):n===t)?1:ma(n),Yr(ba(e),n)},Hn.replace=function(){var t=arguments,e=ba(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Hn.result=function(e,n,r){var o=-1,i=(n=wo(n,e)).length;for(i||(i=1,e=t);++o<i;){var s=null==e?t:e[zi(n[o])];s===t&&(o=i,s=r),e=Zs(s)?s.call(e):s}return e},Hn.round=Sl,Hn.runInContext=s,Hn.sample=function(t){return(qs(t)?Zn:Zr)(t)},Hn.size=function(t){if(null==t)return 0;if(Ks(t))return la(t)?hn(t):t.length;var e=gi(t);return e==k||e==C?t.size:Pr(t).length},Hn.snakeCase=Ja,Hn.some=function(e,n,r){var o=qs(e)?$e:io;return r&&wi(e,n,r)&&(n=t),o(e,ui(n,3))},Hn.sortedIndex=function(t,e){return so(t,e)},Hn.sortedIndexBy=function(t,e,n){return ao(t,e,ui(n,2))},Hn.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=so(t,e);if(r<n&&Hs(t[r],e))return r}return-1},Hn.sortedLastIndex=function(t,e){return so(t,e,!0)},Hn.sortedLastIndexBy=function(t,e,n){return ao(t,e,ui(n,2),!0)},Hn.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var n=so(t,e,!0)-1;if(Hs(t[n],e))return n}return-1},Hn.startCase=Ga,Hn.startsWith=function(t,e,n){return t=ba(t),n=null==n?0:lr(ma(n),0,t.length),e=uo(e),t.slice(n,n+e.length)==e},Hn.subtract=El,Hn.sum=function(t){return t&&t.length?Ke(t,ol):0},Hn.sumBy=function(t,e){return t&&t.length?Ke(t,ui(e,2)):0},Hn.template=function(e,n,r){var o=Hn.templateSettings;r&&wi(e,n,r)&&(n=t),e=ba(e),n=ka({},n,o,ti);var i,s,a=ka({},n.imports,o.imports,ti),l=Ia(a),c=Xe(a,l),u=0,h=n.interpolate||bt,p="__p += '",d=At((n.escape||bt).source+"|"+h.source+"|"+(h===X?ht:bt).source+"|"+(n.evaluate||bt).source+"|$","g"),f="//# sourceURL="+($t.call(n,"sourceURL")?(n.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++oe+"]")+"\n";e.replace(d,(function(t,n,r,o,a,l){return r||(r=o),p+=e.slice(u,l).replace(_t,rn),n&&(i=!0,p+="' +\n__e("+n+") +\n'"),a&&(s=!0,p+="';\n"+a+";\n__p += '"),r&&(p+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),u=l+t.length,t})),p+="';\n";var m=$t.call(n,"variable")&&n.variable;if(m){if(ct.test(m))throw new St("Invalid `variable` option passed into `_.template`")}else p="with (obj) {\n"+p+"\n}\n";p=(s?p.replace(B,""):p).replace(V,"$1").replace(W,"$1;"),p="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")+p+"return __p\n}";var g=Qa((function(){return Et(l,f+"return "+p).apply(t,c)}));if(g.source=p,Xs(g))throw g;return g},Hn.times=function(t,e){if((t=ma(t))<1||t>h)return[];var n=d,r=_n(t,d);e=ui(e),t-=d;for(var o=Je(r,e);++n<t;)e(n);return o},Hn.toFinite=fa,Hn.toInteger=ma,Hn.toLength=ga,Hn.toLower=function(t){return ba(t).toLowerCase()},Hn.toNumber=ya,Hn.toSafeInteger=function(t){return t?lr(ma(t),-9007199254740991,h):0===t?t:0},Hn.toString=ba,Hn.toUpper=function(t){return ba(t).toUpperCase()},Hn.trim=function(e,n,r){if((e=ba(e))&&(r||n===t))return Ge(e);if(!e||!(n=uo(n)))return e;var o=pn(e),i=pn(n);return xo(o,Qe(o,i),tn(o,i)+1).join("")},Hn.trimEnd=function(e,n,r){if((e=ba(e))&&(r||n===t))return e.slice(0,dn(e)+1);if(!e||!(n=uo(n)))return e;var o=pn(e);return xo(o,0,tn(o,pn(n))+1).join("")},Hn.trimStart=function(e,n,r){if((e=ba(e))&&(r||n===t))return e.replace(rt,"");if(!e||!(n=uo(n)))return e;var o=pn(e);return xo(o,Qe(o,pn(n))).join("")},Hn.truncate=function(e,n){var r=30,o="...";if(ea(n)){var i="separator"in n?n.separator:i;r="length"in n?ma(n.length):r,o="omission"in n?uo(n.omission):o}var s=(e=ba(e)).length;if(on(e)){var a=pn(e);s=a.length}if(r>=s)return e;var l=r-hn(o);if(l<1)return o;var c=a?xo(a,0,l).join(""):e.slice(0,l);if(i===t)return c+o;if(a&&(l+=c.length-l),sa(i)){if(e.slice(l).search(i)){var u,h=c;for(i.global||(i=At(i.source,ba(pt.exec(i))+"g")),i.lastIndex=0;u=i.exec(h);)var p=u.index;c=c.slice(0,p===t?l:p)}}else if(e.indexOf(uo(i),l)!=l){var d=c.lastIndexOf(i);d>-1&&(c=c.slice(0,d))}return c+o},Hn.unescape=function(t){return(t=ba(t))&&K.test(t)?t.replace(q,fn):t},Hn.uniqueId=function(t){var e=++Pt;return ba(t)+e},Hn.upperCase=Ya,Hn.upperFirst=Xa,Hn.each=bs,Hn.eachRight=_s,Hn.first=Ki,ll(Hn,(vl={},wr(Hn,(function(t,e){$t.call(Hn.prototype,e)||(vl[e]=t)})),vl),{chain:!1}),Hn.VERSION="4.17.21",Oe(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Hn[t].placeholder=Hn})),Oe(["drop","take"],(function(e,n){qn.prototype[e]=function(r){r=r===t?1:bn(ma(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,d),type:e+(o.__dir__<0?"Right":"")}),o},qn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Oe(["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:ui(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),Oe(["head","last"],(function(t,e){var n="take"+(e?"Right":"");qn.prototype[t]=function(){return this[n](1).value()[0]}})),Oe(["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(ol)},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 Nr(n,t,e)}))})),qn.prototype.reject=function(t){return this.filter($s(ui(t)))},qn.prototype.slice=function(e,n){e=ma(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=ma(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(d)},wr(qn.prototype,(function(e,n){var r=/^(?:filter|find|map|reject)|While$/.test(n),o=/^(?:head|last)$/.test(n),i=Hn[o?"take"+("last"==n?"Right":""):n],s=o||/^find/.test(n);i&&(Hn.prototype[n]=function(){var n=this.__wrapped__,a=o?[1]:arguments,l=n instanceof qn,c=a[0],u=l||qs(n),h=function(t){var e=i.apply(Hn,Re([t],a));return o&&p?e[0]:e};u&&r&&"function"==typeof c&&1!=c.length&&(l=u=!1);var p=this.__chain__,d=!!this.__actions__.length,f=s&&!p,m=l&&!d;if(!s&&u){n=m?n:new qn(this);var g=e.apply(n,a);return g.__actions__.push({func:fs,args:[h],thisArg:t}),new Wn(g,p)}return f&&m?e.apply(this,a):(g=this.thru(h),f?o?g.value()[0]:g.value():g)})})),Oe(["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);Hn.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var o=this.value();return e.apply(qs(o)?o:[],t)}return this[n]((function(n){return e.apply(qs(n)?n:[],t)}))}})),wr(qn.prototype,(function(t,e){var n=Hn[e];if(n){var r=n.name+"";$t.call(In,r)||(In[r]=[]),In[r].push({name:e,func:n})}})),In[Bo(t,2).name]=[{name:"wrapper",func:t}],qn.prototype.clone=function(){var t=new qn(this.__wrapped__);return t.__actions__=No(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=No(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=No(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=qs(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,l=a-s,c=r?a:s-1,u=this.__iteratees__,h=u.length,p=0,d=_n(l,this.__takeCount__);if(!n||!r&&o==l&&d==l)return go(t,this.__actions__);var f=[];t:for(;l--&&p<d;){for(var m=-1,g=t[c+=e];++m<h;){var y=u[m],v=y.iteratee,b=y.type,_=v(g);if(2==b)g=_;else if(!_){if(1==b)continue t;break t}}f[p++]=g}return f},Hn.prototype.at=ms,Hn.prototype.chain=function(){return ds(this)},Hn.prototype.commit=function(){return new Wn(this.value(),this.__chain__)},Hn.prototype.next=function(){this.__values__===t&&(this.__values__=da(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?t:this.__values__[this.__index__++]}},Hn.prototype.plant=function(e){for(var n,r=this;r instanceof Vn;){var o=Fi(r);o.__index__=0,o.__values__=t,n?i.__wrapped__=o:n=o;var i=o;r=r.__wrapped__}return i.__wrapped__=e,n},Hn.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:fs,args:[es],thisArg:t}),new Wn(n,this.__chain__)}return this.thru(es)},Hn.prototype.toJSON=Hn.prototype.valueOf=Hn.prototype.value=function(){return go(this.__wrapped__,this.__actions__)},Hn.prototype.first=Hn.prototype.head,ee&&(Hn.prototype[ee]=function(){return this}),Hn}();fe?((fe.exports=mn)._=mn,de._=mn):pe._=mn}.call(s);var Yh=Gh.exports;function Xh(t){return t.type.create(Yh.cloneDeep(t.attrs))}const Zh=wl.create({name:"node_processor",addCommands:()=>({setBlockAttributes:gh((({commands:t,state:e},n,r,o={})=>{const i=Ge(t.getBlockAttributes(n))??{},{doc:s,tr:a}=e,{from:l,to:c}=a.selection;s.nodesBetween(l,c,((t,e)=>{_c.blocks.includes(t.type.name)&&a.setNodeAttribute(e,n,{...o,...i,...r})}))})),getBlockAttributes:gh((({editor:t},e,n)=>Sr((()=>{let r=Object.assign({},n||{});for(const n of _c.blocks)Object.assign(r,t.getAttributes(n)?.[e]||{});return Object.keys(r).length?r:null})))),removeBlockAttributes:gh((({commands:t},e)=>{for(const n of _c.blocks)t.resetAttributes(n,e)})),applyMark:gh((({state:t,commands:e},n,r,o={})=>{const{tr:i,doc:s,schema:a}=t,{$from:l,$to:c}=i.selection,u=Ol(kc.LINK,a),h=Ol(n,a);if(!(h.spec.group||"").includes(xc.SETTINGS))return e.setMark(n,r);if(l.pos===c.pos)return;s.nodesBetween(l.pos,c.pos,((t,s)=>{if(t.type.name===_c.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),p=h.create({...a?.attrs||{},...r}),d=Wh(l,c,t,s),f=!u.isInSet(t.marks)&&function(t,e,n,r=Uh){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,p,o.isAppliedToParent);if(f)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:p});t.isText?i.addMark(d.from,d.to,p):function(t,e,n,r){const o=qh(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,p)}))})),getMarks:gh((({editor:t},e)=>{const n=Qe(t,"state");return Sr((()=>{const{selection:t,doc:r}=Ge(n),{from:o,to:i}=Ge(t),s=[];return r.nodesBetween(o,i,(t=>{for(const n of t.marks)n.type.name===e&&s.unshift(n.attrs)})),s}))})),getMark:gh((({commands:t},e)=>{const n=t.getMarks(e);return Sr((()=>Ge(n)[0]??null))})),hasMark:gh((({commands:t},e)=>{const n=t.getMark(e);return Sr((()=>!!Ge(n)))})),getCommonSettingMark:gh((({commands:t},e,n)=>{const r=t.getMark(e);return Sr((()=>Ge(r)?.value??Ge(n)))})),getDeviceSettingMark:gh((({commands:t},e,n)=>{const r=t.getMarks(e),o=t.getDevice();return Sr((()=>{for(const t of Ge(r)){const e=t[Ge(o)];if(e)return e}return Ge(n)}))})),removeAllMarks:gh((({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:gh((({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:gh(((t,{tr:e,node:n,position:r,mark:o})=>n.isText?e.removeMark(r,r+n.nodeSize,o):e.removeNodeMark(r,o)))})}),Qh=wl.create({name:"text_processor",addCommands:()=>({getSelectedText:gh((({state:t})=>{const{from:e,to:n}=t.selection;return t.doc.textBetween(e,n," ")})),transformText:gh((({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=Wh(n,r,o,i),a=Math.max(0,n.pos-i),l=Math.max(0,r.pos-i),c=e({text:o.textContent.substring(a,l)}),u=t.schema.text(c,o.marks);t.tr.replaceWith(s.from,s.to,u)}))}))})}),tp=wl.create({name:"selection_processor",addStorage:()=>({selection:null}),addCommands(){return{storeSelection:gh((({state:t})=>{this.storage.selection=t.selection})),restoreSelection:gh((({commands:t})=>{this.storage.selection&&t.setTextSelection(this.storage.selection)})),expandSelection:gh((({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:qh(t.doc,i);r=Math.min(r,i+n),o=Math.max(o,i+e.nodeSize-n)}})),e.setTextSelection({from:r,to:o})})),expandSelectionToBlock:gh((({commands:t})=>{t.expandSelection((({parent:t})=>t.type.name===_c.DOCUMENT))}))}}}),ep=Jl.create({name:"doc",topNode:!0,content:"block+"});class np extends zo{constructor(t,e,n,r="SetDocAttr"){super(),this.key=t,this.value=e,this.schema=n,this.stepType=r}apply(t){this.prevValue=t.attrs.meta[this.key];const e=Zr.fromJSON(this.schema,t.toJSON());return e.attrs.meta[this.key]=this.value,jo.ok(e)}invert(){return new np(this.key,this.prevValue,this.schema,"revertSetDocAttr")}map(){return null}toJSON(){return{stepType:this.stepType,key:this.key,value:this.value}}static fromJSON(t){return new np(t.key,t.value,t.stepType)}}zo.jsonID("setDocAttr",np);const rp=ep.extend({marks:xc.SETTINGS,addAttributes:()=>({meta:{default:{}}}),onCreate(){this.editor.view.dom.addEventListener("click",(t=>{t.target.closest("a")&&t.preventDefault()}))},addCommands:()=>({setDocMetaAttributes:gh((({state:t},e,n)=>{t.tr.step(new np(e,n,t.schema))}))})}),op=Jl.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:t}){return["p",el(this.options.HTMLAttributes,t),0]},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),ip=op.extend({marks:xc.ALL,addOptions:()=>({HTMLAttributes:{class:"zw-style"}})}),sp=Jl.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]}`,el(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=>{return e={find:new RegExp(`^(#{1,${t}})\\s$`),type:this.type,getAttributes:{level:t}},new hl({find:e.find,handler:({state:t,range:n,match:r})=>{const o=t.doc.resolve(n.from),i=rl(e.getAttributes,void 0,r)||{};if(!o.node(-1).canReplaceWith(o.index(-1),o.indexAfter(-1),e.type))return null;t.tr.delete(n.from,n.to).setBlockType(n.from,n.from,e.type,i)}});var e}))}}),ap=sp.extend({marks:xc.ALL,addOptions:()=>({levels:[1,2,3,4],HTMLAttributes:{class:"zw-style"}})}),lp=wl.create({name:"prose_mirror_plugins",addProseMirrorPlugins(){return[Cc.create(this.editor),Ac.create(this.editor)]}}),cp=Kl.create({name:kc.FONT_FAMILY,group:xc.SETTINGS,addOptions:()=>({fonts:[]}),addAttributes:()=>({value:{required:!0}}),addCommands(){return{applyFontFamily:gh((({commands:t},e)=>{t.applyMark(this.name,{value:e});const n=t.findFontByName(e);let r=Ge(t.getFontWeight());n.isWeightSupported(r)||(r=n.findClosestWeight(r),t.applyFontWeight(r));const o=t.isSettingCustomized(kc.FONT_STYLE).value;!n.isItalicSupported(r)&&o&&t.removeItalic()})),getFont:gh((({commands:t})=>{const e=Ge(this.options.defaultPreset),n=t.findFontByName(e.common.font_family),r=t.getFontFamily();return Sr((()=>t.findFontByName(Ge(r))||n))})),findFontByName:gh(((t,e)=>Ge(this.options.fonts).find((t=>t.name===e)))),getFontFamily:gh((({commands:t})=>t.getCommonSettingMark(this.name,t.getDefaultFontFamily()))),getDefaultFontFamily:gh((({commands:t})=>{const e=t.getPreset();return Sr((()=>Ge(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})=>vh({font_family:t.value?`"${t.value}"`:null})}),up=wl.create({name:kc.STYLE_PRESET,addGlobalAttributes(){return[{types:[_c.PARAGRAPH,_c.HEADING],attributes:{preset:{isRequired:!1,default:{id:Ge(this.options.defaultId)},parseHTML:t=>{const e=Ge(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=Ge(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:Ge(this.options.defaultId)}:null},renderHTML:t=>t.preset?{class:Ge(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:gh((()=>Sr((()=>Ge(this.options.presets).filter((t=>!t.hidden)))))),getPreset:gh((({commands:n})=>{const r=n.getBlockAttributes("preset",{id:Ge(this.options.defaultId)}),o=n.getPresetList(),i=n.isLink(),s=n.getLinkPreset();return Sr((()=>{const n=t(Ge(o),Ge(r).id);if(!Ge(i))return n;const a=Ge(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:gh((({commands:e,chain:n},r)=>{const o=t(Ge(e.getPresetList()),r),i=o.node?.type??_c.PARAGRAPH,s={preset:{id:r}};o.node&&(s.level=o.node.level);for(const t of kc.attributes)s[t]=Ge(e.getBlockAttributes(t));n().removeList().setNode(i,s).run()})),applyDefaultPreset:gh((({commands:t})=>{t.applyPreset(Ge(this.options.defaultId))})),removePreset:gh((({commands:t})=>{t.setNode(_c.PARAGRAPH,{preset:null})})),getPresetCustomization:gh((({editor:t,commands:e})=>{const n=Qe(t,"state");return Sr((()=>{const{selection:t,doc:r}=Ge(n),{from:o,to:i}=t;return e._getSettingCustomization(r,o,i)}))})),isSettingCustomized:gh((({commands:t},e)=>{const n=t.getPresetCustomization(),r=kc.presetAttributes.includes(e)?"attributes":"marks";return Sr((()=>Ge(n)[r]?.includes(e)??!1))})),getContentCustomization:gh((({editor:t,commands:e})=>{const n=Qe(t,"state");return Sr((()=>{const{doc:t}=Ge(n);return e._getSettingCustomization(t,0,t.content.size)}))})),_getSettingCustomization:gh(((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)){kc.presetAttributes.includes(e)&&n&&i.add(e)}for(const{type:e}of t.marks)kc.marks.includes(e.name)&&o.add(e.name)})),{attributes:Array.from(i),marks:Array.from(o)}})),removePresetCustomization:gh((({chain:t})=>{t().storeSelection().expandSelectionToBlock().removeMarks(kc.marks).resetAttributes(_c.PARAGRAPH,kc.presetAttributes).resetAttributes(_c.HEADING,kc.presetAttributes).restoreSelection().run()})),removeFormat:gh((({chain:t})=>{t().storeSelection().expandSelectionToBlock().removeAllMarks().applyDefaultPreset().restoreSelection().run()}))}},onCreate(){this.options.styleRenderer.inject($p.head,Ge(this.options.presets))}}),hp=Kl.create({name:kc.FONT_WEIGHT,group:xc.SETTINGS,addAttributes:()=>({value:{required:!0}}),addCommands(){return{applyFontWeight:gh((({commands:t},e)=>{t.applyMark(this.name,{value:e});Ge(t.getFont()).isItalicSupported(e)||t.removeItalic()})),toggleBold:gh((({commands:t})=>{const e=Ge(t.getFontWeight()),n=Ge(t.getFont()),r=Number(e)>=600?"400":"700",o=n.findClosestWeight(r);t.applyFontWeight(o)})),getFontWeight:gh((({commands:t})=>{const e=t.getCommonSettingMark(this.name,t.getDefaultFontWeight()),n=t.getFont();return Sr((()=>{const t=Ge(e),r=Ge(n);return r.isWeightSupported(t)?t:r.findClosestWeight(t)}))})),getDefaultFontWeight:gh((({commands:t})=>{const e=t.getPreset();return Sr((()=>Ge(e).common.font_weight))}))}},addKeyboardShortcuts:()=>({"Mod-b":bh("toggleBold"),"Mod-B":bh("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})=>vh({font_weight:t.value})}),pp=Kl.create({name:kc.FONT_SIZE,group:xc.SETTINGS,addOptions:()=>({minSize:1,maxSize:100}),addAttributes:()=>({mobile:{default:null},tablet:{default:null},desktop:{default:null}}),addCommands(){return{getFontSize:gh((({commands:t})=>t.getDeviceSettingMark(this.name,t.getDefaultFontSize()))),getDefaultFontSize:gh((({commands:t})=>{const e=t.getDevice(),n=t.getPreset();return Sr((()=>Ge(n)[Ge(e)].font_size.replace("px","")))})),applyFontSize:gh((({commands:t},e)=>{const n=Ge(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};if(!Object.values(i).some((t=>!!t)))return!1;const s=o.type.create(i);e.isText?t.addMark(r,r+e.nodeSize,s):t.addNodeMark(r,s)}})})),increaseFontSize:gh((({commands:t})=>{const e=Number(Ge(t.getFontSize())),n=Math.min(e+1,Ge(this.options.maxSize));t.applyFontSize(String(n))})),decreaseFontSize:gh((({commands:t})=>{const e=Number(Ge(t.getFontSize())),n=Math.max(e-1,Ge(this.options.minSize));t.applyFontSize(String(n))}))}},addKeyboardShortcuts:()=>({"Mod-Shift-=":bh("increaseFontSize"),"Mod-Shift--":bh("decreaseFontSize")}),parseHTML(){const t=t=>{if(!t)return null;const e=Hh(t,Ge(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 vh({font_size_mobile:e(t.mobile),font_size_tablet:e(t.tablet),font_size_desktop:e(t.desktop)})}}),dp=Kl.create({name:kc.FONT_COLOR,group:xc.SETTINGS,addAttributes:()=>({value:{required:!0}}),addCommands(){return{getFontColor:gh((({commands:t})=>t.getCommonSettingMark(this.name,t.getDefaultFontColor()))),getDefaultFontColor:gh((({commands:t})=>{const e=t.getPreset();return Sr((()=>Ge(e).common.color))})),applyFontColor:gh((({commands:t},e)=>{t.applyMark(this.name,{value:e})}))}},parseHTML(){const t=t=>({value:Fh(t)});return[{style:"--zw-font-color",getAttrs:t},{style:"color",getAttrs:t}]},renderHTML:({HTMLAttributes:t})=>vh({font_color:t.value})}),fp=Kl.create({name:kc.BACKGROUND_COLOR,addAttributes:()=>({value:{required:!0}}),addCommands(){return{getBackgroundColor:gh((({commands:t})=>t.getCommonSettingMark(this.name,"rgba(255, 255, 255, 0%)"))),applyBackgroundColor:gh((({commands:t},e)=>{t.applyMark(this.name,{value:e})}))}},parseHTML(){const t=t=>({value:Fh(t)});return[{style:"--zw-background-color",getAttrs:t},{style:"background-color",getAttrs:t}]},renderHTML:({HTMLAttributes:t})=>vh({background_color:t.value})}),mp=wl.create({name:"device_manager",addCommands(){return{getDevice:gh((()=>Qe(this.options,"device")))}}}),gp=Kl.create({name:kc.FONT_STYLE,group:xc.SETTINGS,addAttributes:()=>({italic:{required:!0}}),addCommands(){return{isItalic:gh((({commands:t})=>{const e=t.getMark(this.name),n=t.getDefaultFontStyle();return Sr((()=>Ge(e)?.italic??Ge(n).italic))})),isItalicAvailable:gh((({commands:t})=>{const e=t.getFont(),n=t.getFontWeight();return Sr((()=>{const t=Ge(e),r=Ge(n);return t.isItalicSupported(r)&&!t.isWeightItalicOnly(r)}))})),getDefaultFontStyle:gh((({commands:t})=>{const e=t.getPreset();return Sr((()=>({italic:"italic"===Ge(e).common.font_style})))})),toggleItalic:gh((({commands:t})=>{Ge(t.isItalicAvailable())&&(Ge(t.isItalic())?t.removeItalic():t.applyItalic())})),applyItalic:gh((({commands:t})=>{t.applyMark(this.name,{italic:!0})})),removeItalic:gh((({commands:t})=>{t.applyMark(this.name,{italic:!1})}))}},addKeyboardShortcuts:()=>({"Mod-i":bh("toggleItalic"),"Mod-I":bh("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})=>vh({font_style:t.italic?"italic":"normal"})}),yp=Kl.create({name:kc.TEXT_DECORATION,priority:1e3,addAttributes:()=>({underline:{default:!1},strike_through:{default:!1}}),addCommands(){return{isUnderline:gh((({commands:t})=>{const e=t.getTextDecoration();return Sr((()=>Ge(e).underline))})),isStrikeThrough:gh((({commands:t})=>{const e=t.getTextDecoration();return Sr((()=>Ge(e).strike_through))})),getTextDecoration:gh((({commands:t})=>{const e=t.getMark(this.name),n=t.getDefaultTextDecoration();return Sr((()=>{const t=Ge(e)??{},r=Ge(n);return{underline:t.underline||r.underline,strike_through:t.strike_through||r.strike_through}}))})),isUnderlineCustomized:gh((({commands:t})=>{const e=t.isUnderline(),n=t.getDefaultTextDecoration();return Sr((()=>Ge(e)!==Ge(n).underline))})),getDefaultTextDecoration:gh((({commands:t})=>{const e=t.getPreset();return Sr((()=>{const{text_decoration:t}=Ge(e).common;return{underline:t.includes("underline"),strike_through:t.includes("line-through")}}))})),toggleUnderline:gh((({commands:t})=>{t.toggleTextDecoration("underline")})),toggleStrikeThrough:gh((({commands:t})=>{t.toggleTextDecoration("strike_through")})),toggleTextDecoration:gh((({commands:t},e,n=null)=>{const r=Ge(t.getTextDecoration()),o=n??!r[e];t.applyMark(this.name,{[e]:o})})),applyTextDecoration:gh((({commands:t},e)=>{t.toggleTextDecoration(e,!0)})),removeTextDecoration:gh((({commands:t},e)=>{t.toggleTextDecoration(e,!1)}))}},addKeyboardShortcuts:()=>({"Mod-u":bh("toggleUnderline"),"Mod-U":bh("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"),vh({text_decoration:e.join(" ")})}}),vp=wl.create({name:"case_style",addCommands:()=>({applyCaseStyle:gh((({commands:t},e)=>{switch(e){case vc.CAPITALIZE:return t.applyCapitalize();case vc.LOWERCASE:return t.applyLowerCase();case vc.UPPERCASE:return t.applyUpperCase()}})),applyCapitalize:gh((({commands:t})=>{t.transformText((({text:t})=>function(t){return t.toLowerCase().replace(/(?:^|\s)\S/g,(t=>t.toUpperCase()))}(t)))})),applyLowerCase:gh((({commands:t})=>{t.transformText((({text:t})=>t.toLowerCase()))})),applyUpperCase:gh((({commands:t})=>{t.transformText((({text:t})=>t.toUpperCase()))}))})}),bp={mobile:null,tablet:null,desktop:null},_p=wl.create({name:kc.ALIGNMENT,addGlobalAttributes:()=>[{types:[_c.PARAGRAPH,_c.HEADING],attributes:{[kc.ALIGNMENT]:{isRequired:!1,parseHTML({style:t}){const e=function(t){const e=Vh[t]||t;return bc.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?yh({alignment_mobile:t.alignment.mobile,alignment_tablet:t.alignment.tablet,alignment_desktop:t.alignment.desktop}):null}}}],addCommands(){return{applyAlignment:gh((({commands:t},e)=>{const n=Ge(t.getDevice());t.setBlockAttributes(this.name,{[n]:e},bp)})),removeAlignment:gh((({commands:t})=>t.removeBlockAttributes(this.name))),getAlignment:gh((({commands:t})=>{const e=t.getBlockAttributes(this.name,bp),n=t.getDevice(),r=t.getDefaultAlignment();return Sr((()=>Ge(e)?.[Ge(n)]??Ge(r)))})),getDefaultAlignment:gh((({commands:t})=>{const e=t.getDevice(),n=t.getPreset();return Sr((()=>Ge(n)[Ge(e)].alignment??bc.LEFT))}))}},addKeyboardShortcuts:()=>({"Mod-Shift-l":bh("applyAlignment",bc.LEFT),"Mod-Shift-e":bh("applyAlignment",bc.CENTER),"Mod-Shift-r":bh("applyAlignment",bc.RIGHT),"Mod-Shift-j":bh("applyAlignment",bc.JUSTIFY)})}),wp={mobile:null,tablet:null,desktop:null},kp=wl.create({name:kc.LINE_HEIGHT,addGlobalAttributes(){return[{types:[_c.PARAGRAPH,_c.HEADING],attributes:{[kc.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=Bh(e,t,Ge(this.options.wrapperRef));return n?{desktop:n,tablet:n,mobile:null}:null},renderHTML:t=>t.line_height?yh({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:gh((({commands:t})=>{const e=t.getBlockAttributes(this.name,wp),n=t.getDevice(),r=t.getDefaultLineHeight();return Sr((()=>Ge(e)?.[Ge(n)]??Ge(r)))})),getDefaultLineHeight:gh((({commands:t})=>{const e=t.getDevice(),n=t.getPreset();return Sr((()=>Ge(n)[Ge(e)].line_height))})),applyLineHeight:gh((({commands:t},e)=>{const n=Ge(t.getDevice());t.setBlockAttributes(this.name,{[n]:e},wp)}))}}}),xp=Jl.create({name:"listItem",addOptions:()=>({HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:t}){return["li",el(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:_c.LIST_ITEM,marks:xc.SETTINGS,addCommands(){const t=({selection:t})=>t.$cursor.before(t.$cursor.depth-1);return{listItemNewline:gh((({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,Xh(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===_c.LIST));if(r)return n.listItemNewline()}})}),Sp=Jl.create({name:_c.LIST,content:`${_c.LIST_ITEM}+`,group:"block list",marks:xc.SETTINGS,addExtensions:()=>[xp],addOptions:()=>({baseClass:"",presetClass:""}),addAttributes:()=>({bullet:{default:{type:wc.DISC}}}),parseHTML(){const t={a:wc.ROMAN,i:wc.LATIN,1:wc.DECIMAL},e=e=>{for(const n of wc.values){const r=`.${Ge(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)||wc.DECIMAL}})},{tag:"ul",getAttrs:t=>({bullet:{type:e(t)||wc.DISC}})}]},renderHTML({HTMLAttributes:t}){const e=[Ge(this.options.baseClass)+t.bullet.type,Ge(this.options.presetClass)];return[wc.ordered.includes(t.bullet.type)?"ol":"ul",{class:e.join(" ")},0]},addCommands:()=>({getListType:gh((({commands:t})=>{const e=t.getBlockAttributes("bullet",{type:null});return Sr((()=>Ge(e).type??null))})),applyList:gh((({commands:t,chain:e},n)=>{if(Ge(t.getListType())!==n)return e().applyDefaultPreset().toggleList(_c.LIST,_c.LIST_ITEM).setBlockAttributes("bullet",{type:n}).command((({commands:t,tr:e})=>t._bubbleListItemMarks(e))).run();t.removeList()})),_bubbleListItemMarks:gh(((t,e)=>{const{doc:n,selection:r}=e,o=r.$from.start(),i=r.$to.end();function s(t,e){if(kc.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===_c.LIST)return;if(t.type.name!==_c.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,Xh(i)),r.push(i))})),!1}))})),removeList:gh((({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([_c.LIST,_c.LIST_ITEM].includes(t.type.name))return;if(r.type.name!==_c.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,Xh(t));return!1})),t.liftListItem(_c.LIST_ITEM)}))}),addInputRules(){const t=(t,e)=>{return n={find:e,type:this.type,getAttributes:{bullet:{type:t}},joinPredicate:(e,{attrs:n})=>n.bullet.type===t},new hl({find:n.find,handler:({state:t,range:e,match:r,chain:o})=>{const i=rl(n.getAttributes,void 0,r)||{},s=t.tr.delete(e.from,e.to),a=s.doc.resolve(e.from).blockRange(),l=a&&Yo(a,n.type,i);if(!l)return null;if(s.wrap(a,l),n.keepMarks&&n.editor){const{selection:e,storedMarks:r}=t,{splittableMarks:o}=n.editor.extensionManager,i=r||e.$to.parentOffset&&e.$from.marks();if(i){const t=i.filter((t=>o.includes(t.type.name)));s.ensureMarks(t)}}if(n.keepAttributes){const t="bulletList"===n.type.name||"orderedList"===n.type.name?"listItem":"taskList";o().updateAttributes(t,i).run()}const c=s.doc.resolve(e.from-1).nodeBefore;c&&c.type===n.type&&Qo(s.doc,e.from-1)&&(!n.joinPredicate||n.joinPredicate(r,c))&&s.join(e.from-1)}});var n};return[t(wc.DISC,/^\s*([-+*])\s$/),t(wc.DECIMAL,/^(\d+)\.\s$/),t(wc.LATIN,/^([ivx]{1,3})\.\s$/i),t(wc.ROMAN,/^([a-z])\.\s$/i)]}});function Ep(t){return new Ii({key:new Di("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 mi(t);return e.forEach((t=>{t.steps.forEach((t=>{n.step(t)}))})),n}(n.doc,[...e]),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),l=e.invert().map(s);r.push({oldRange:{from:a,to:l},newRange:{from:i,to:s}})}))})),jl(r)}(a);return l.forEach((({newRange:e})=>{const n=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,e,(t=>t.isTextblock));let o,i;if(n.length>1?(o=n[0],i=r.doc.textBetween(o.pos,o.pos+o.node.nodeSize,void 0," ")):n.length&&r.doc.textBetween(e.from,e.to," "," ").endsWith(" ")&&(o=n[0],i=r.doc.textBetween(o.pos,e.to,void 0," ")),o&&i){const e=i.split(" ").filter((t=>""!==t));if(e.length<=0)return!1;const n=e[e.length-1],a=o.pos+i.lastIndexOf(n);if(!n)return!1;fh(n).filter((t=>t.isLink)).map((t=>({...t,from:a+t.start+1,to:a+t.end+1}))).filter((t=>!r.schema.marks.code||!r.doc.rangeHasMark(t.from,t.to,r.schema.marks.code))).filter((e=>!t.validate||t.validate(e.value))).forEach((e=>{Fl(e.from,e.to,r.doc).some((e=>e.mark.type===t.type))||s.addMark(e.from,e.to,t.type.create({href:e.href}))}))}})),s.steps.length?s:void 0}})}const Op=Kl.create({name:"link",priority:1e3,keepOnSplit:!1,onCreate(){this.options.protocols.forEach((t=>{"string"!=typeof t?hh(t.scheme,t.optionalSlashes):hh(t)}))},onDestroy(){Wc.groups={},uh.scanner=null,uh.parser=null,uh.tokenQueue=[],uh.pluginQueue=[],uh.customSchemes=[],uh.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},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML:()=>[{tag:'a[href]:not([href *= "javascript:" i])'}],renderHTML({HTMLAttributes:t}){var e;return(null===(e=t.href)||void 0===e?void 0:e.startsWith("javascript:"))?["a",el(this.options.HTMLAttributes,{...t,href:""}),0]:["a",el(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[(t={find:t=>fh(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,e)=>{var n,r;const o=null===(n=null==e?void 0:e.clipboardData)||void 0===n?void 0:n.getData("text/html"),i=null==o?void 0:o.match(/href="([^"]*)"/);return i?{href:i[1]}:{href:null===(r=t.data)||void 0===r?void 0:r.href}}},new ml({find:t.find,handler:({state:e,range:n,match:r,pasteEvent:o})=>{const i=rl(t.getAttributes,void 0,r,o);if(!1===i||null===i)return null;const{tr:s}=e,a=r[r.length-1],l=r[0];let c=n.to;if(a){const r=l.search(/\S/),o=n.from+l.indexOf(a),u=o+a.length;if(Fl(n.from,n.to,e.doc).filter((e=>e.mark.type.excluded.find((n=>n===t.type&&n!==e.mark.type)))).filter((t=>t.to>o)).length)return null;u<n.to&&s.delete(u,n.to),o>n.from&&s.delete(n.from+r,o),c=n.from+r+a.length,s.addMark(n.from+r,c,t.type.create(i||{})),s.removeStoredMark(t.type)}}}))];var t},addProseMirrorPlugins(){const t=[];var e;return this.options.autolink&&t.push(Ep({type:this.type,validate:this.options.validate})),this.options.openOnClick&&t.push((e={type:this.type},new Ii({key:new Di("handleClickLink"),props:{handleClick:(t,n,r)=>{var o,i;if(0!==r.button)return!1;if("A"!==r.target.nodeName)return!1;const s=zl(t.state,e.type.name),a=r.target,l=null!==(o=null==a?void 0:a.href)&&void 0!==o?o:s.href,c=null!==(i=null==a?void 0:a.target)&&void 0!==i?i:s.target;return!(!a||!l||(t.editable&&window.open(l,c),0))}}}))),this.options.linkOnPaste&&t.push(function(t){return new Ii({key:new Di("handlePasteLink"),props:{handlePaste:(e,n,r)=>{var o;const{state:i}=e,{selection:s}=i,{empty:a}=s;if(a)return!1;let l="";r.content.forEach((t=>{l+=t.textContent}));const c=fh(l).find((t=>t.isLink&&t.value===l));if(!l||!c)return!1;const u=null===(o=n.clipboardData)||void 0===o?void 0:o.getData("text/html"),h=null==u?void 0:u.match(/href="([^"]*)"/),p=h?h[1]:c.href;return t.editor.commands.setMark(t.type,{href:p}),!0}}})}({editor:this.editor,type:this.type})),t}}),Cp=Op.extend({name:kc.LINK,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:Sc.SELF,parseHTML:t=>t.getAttribute("target")||Sc.SELF},destination:{default:Ec.URL,parseHTML:t=>{const e=t.getAttribute("href");if(!e.startsWith("#"))return Ec.URL;const n=e.replace("#","");return Ge(this.options.pageBlocks).find((t=>t.id===parseInt(n)))?Ec.BLOCK:Ec.URL}}}},addCommands(){const{unsetLink:t}=this.parent();return{removeLink:t,applyLink:gh((({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(zp.text(n.text,[zp.mark(kc.LINK,n)]))))),expandSelectionToLink:gh((({commands:t})=>{t.expandSelection((({node:t})=>this.type.isInSet(t.marks)))})),isLink:gh((({commands:t})=>t.hasMark(this.name))),getLinkPreset:gh((()=>Sr((()=>Ge(this.options.preset)))))}},addProseMirrorPlugins(){return[...this.parent(),mh.create(this.editor)]},renderHTML({HTMLAttributes:t}){const e=t.destination===Ec.BLOCK?`#${t.href}`:t.href,n=Ge(this.options.basePresetClass)+Ge(this.options.preset).id;return["a",{href:e,target:t.target,class:`${n} zw-style`},0]}}),Ap=Kl.create({name:kc.SUPERSCRIPT,addCommands(){return{applySuperscript:gh((({commands:t})=>{t.setMark(this.name)})),removeSuperscript:gh((({commands:t})=>{t.unsetMark(this.name)})),toggleSuperscript:gh((({commands:t})=>{Ge(t.isSuperscript())?t.removeSuperscript():t.applySuperscript()})),isSuperscript:gh((({commands:t})=>{const e=t.getMark(this.name);return Sr((()=>!!Ge(e)))}))}},parseHTML:()=>[{tag:"sup"},{style:"vertical-align",getAttrs:t=>"super"===t&&null}],renderHTML:()=>["sup",{class:"zw-superscript"},0]}),Mp=wl.create({name:kc.MARGIN,addGlobalAttributes:()=>[{types:[_c.PARAGRAPH,_c.HEADING],attributes:{[kc.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?yh({margin:t.margin.value}):null}}}]});function Tp(t){const e=e=>t.presetsRef.value.find((t=>t.id===e)),n=Ie({default:null,link:null});return function(t,e,n){"production"===process.env.NODE_ENV||it(e)||en("`watch(fn, options?)` signature has been moved to a separate API. Use `watchEffect(fn, options?)` instead. `watch` now only supports `watch(source, cb, options?) signature."),zn(t,e,n)}(t.presetsRef,(()=>{n.default=e(t.defaultPresetId),n.link=e(t.linkPresetId)}),{immediate:!0,deep:!0}),[rp,ip,ap,Gl,gc,Zh,Qh,tp,lp].concat([up.configure({presets:t.presetsRef,defaultId:t.defaultPresetId,styleRenderer:new jp({baseClass:t.basePresetClass,makeVariable:t.makePresetVariable,linkPresetId:t.linkPresetId})}),Sp.configure({baseClass:t.baseListClass,presetClass:t.basePresetClass+t.defaultPresetId}),mp.configure({device:t.deviceRef}),pp.configure({minSize:t.minFontSize,maxSize:t.maxFontSize,wrapperRef:t.wrapperRef}),cp.configure({fonts:t.fonts,defaultPreset:Qe(n,"default")}),hp,dp,fp,gp,yp,vp,Ap,_p,kp.configure({wrapperRef:t.wrapperRef}),Cp.configure({preset:Qe(n,"link"),basePresetClass:t.basePresetClass,pageBlocks:t.pageBlocksRef}),Mp])}class Np{_domParser=new DOMParser;types=window;parse(t){return this._domParser.parseFromString(t,"text/html")}}class Ip{content;constructor({content:t}){this.content=t}normalize(){throw new Error("Implement abstract method")}}class Rp extends Ip{static BLOCK_NODE_NAMES=["P","H1","H2","H3","H4"];static ROOT_NODE_NAMES=Rp.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,Rp.BLOCK_STYLES),e.append(n)};this._assignElementProperties(t,t.parentElement,Rp.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,Rp.BLOCK_STYLES),this._removeStyleProperties(t.parentElement,Rp.BLOCK_STYLES),this._assignElementProperties(t,t.parentElement),t.parentElement.lastElementChild===t&&this._removeStyleProperties(t.parentElement)}_isBlockNode(t){return Rp.BLOCK_NODE_NAMES.includes(t.tagName)}_isRootNode(t){return Rp.ROOT_NODE_NAMES.includes(t.tagName)}_assignElementProperties(t,e,n=Array.from(e.style)){for(const r of n){const n=e.style.getPropertyValue(r);n&&!t.style.getPropertyValue(r)&&t.style.setProperty(r,n)}}_removeStyleProperties(t,e=Array.from(t.style)){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,Rp.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 Lp extends Ip{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!==_c.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(kc.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!==_c.LIST_ITEM){if(!n.marks)return!1;if(!this._includesMark(n,e))return!1}return!0}_includesMark(t,e){return t.marks?.some((t=>Yh.isEqual(t,e)))??!1}_includesMarkType(t,e){return t.marks?.some((t=>t.type===e))??!1}_isLink(t){return t.type===_c.TEXT&&this._includesMarkType(t,kc.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 Dp{static build(t,e={}){return"string"==typeof t?this._buildHtml(t,e):this._buildJson(t)}static _buildHtml(t,e){return new Rp({content:t,parser:e.parser||new Np})}static _buildJson(t){return new Lp({content:t})}static normalize(t,e={}){return Dp.build(t,e).normalize()}}class $p{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 Pp{static build({config:t,nodeDomParser:e}){const n=function(t,e){return sl(vl.resolve(t),e)}(Tp({fonts:t.fonts,minFontSize:0,maxFontSize:0,presetsRef:Ke(t.presets),defaultPresetId:t.defaultPresetId,linkPresetId:t.linkPresetId,makePresetVariable:()=>"",basePresetClass:t.basePresetClass,baseListClass:t.baseListClass,deviceRef:Ke(yc.DESKTOP),pageBlocksRef:Ke([]),wrapperRef:$p.document.createElement("p")}));return new Pp({schema:n,domParser:bo.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=Dp.build(t,{parser:this._nodeDomParser});return e.normalizeHTML(),this._domParser.parse(e.dom.body).toJSON()}}class zp{static doc(t){return{type:_c.DOCUMENT,content:t}}static list(t,e){return{type:_c.LIST,attrs:{bullet:{type:t}},content:e.map((t=>t.type===_c.LIST_ITEM?t:this.listItem([].concat(t))))}}static listItem(...t){const{attrs:e,content:n,marks:r}=this._normalizeTextBlockArgs(t);return{type:_c.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:_c.HEADING,...n}}static paragraph(...t){return{type:_c.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:_c.TEXT,...e?{marks:e}:{},text:t}}static link(t,e,n=[]){return this.text(t,[this.mark(kc.LINK,e),...n])}static mark(t,e){return{type:t,attrs:e}}static populateAllDevices(t){return{mobile:t,tablet:t,desktop:t}}}class jp{_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=$p.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 yc.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&&!kc.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===yc.COMMON?"":`-${e}`}`}makePresetHtmlClass(t){return this._baseClass+t.id}makePresetCssClass(t){return this.makePresetHtmlClass(t).split(" ").map((t=>`.${t}`)).join("")}}class Fp{static _instance;static get instance(){return this._instance??=new Fp,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 Hp{static createWindow(){return(new i.JSDOM).window}types;parse(t){const{window:e}=new i.JSDOM(t);return this.types=e,e.document}}class Bp{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 Vp=new q,Wp=[class extends Bp{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}){$p.use(Hp.createWindow());const o=n.resolve(process.cwd(),e),i=Pp.build({config:require(o).editor,nodeDomParser:new Hp}),s=t.map((t=>i.toJSON(this._formatInputHtml(t)))),a=1===s.length?s[0]:s,l=this._stringifyContent(a);this.output("rb"===r?this._formatOutputRb(l):l)}_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 Bp{name="version";description="display cli version";doCommand(){this.output("4.2.2-1")}}];for(const t of Wp)(new t).install(Vp);Vp.parse();
|