@zipify/wysiwyg 3.6.0-3 → 3.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -12,4 +12,4 @@
12
12
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
13
13
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
14
14
  */
15
- sm={get exports(){return lm},set exports(t){lm=t}},am=lm,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,p=9007199254740991,d=NaN,f=4294967295,h=[["ary",l],["bind",1],["bindKey",2],["curry",8],["curryRight",o],["flip",512],["partial",i],["partialRight",a],["rearg",c]],m="[object Arguments]",g="[object Array]",v="[object Boolean]",y="[object Date]",_="[object Error]",b="[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]",N="[object Symbol]",T="[object WeakMap]",M="[object ArrayBuffer]",I="[object DataView]",$="[object Float32Array]",D="[object Float64Array]",L="[object Int8Array]",R="[object Int16Array]",P="[object Int32Array]",j="[object Uint8Array]",z="[object Uint8ClampedArray]",F="[object Uint16Array]",H="[object Uint32Array]",V=/\b__p \+= '';/g,B=/\b(__p \+=) '' \+/g,W=/(__e\(.*?\)|\b__t\)) \+\n'';/g,U=/&(?:amp|lt|gt|quot|#39);/g,q=/[&<>"']/g,K=RegExp(U.source),J=RegExp(q.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,pt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,dt=/\w*$/,ft=/^[-+]0x[0-9a-f]+$/i,ht=/^0b[01]+$/i,mt=/^\[object .+?Constructor\]$/,gt=/^0o[0-7]+$/i,vt=/^(?:0|[1-9]\d*)$/,yt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,_t=/($^)/,bt=/['\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="['’]",Nt="["+wt+"]",Tt="["+Ct+"]",Mt="["+kt+"]",It="\\d+",$t="["+xt+"]",Dt="["+St+"]",Lt="[^"+wt+Ct+It+xt+St+Et+"]",Rt="\\ud83c[\\udffb-\\udfff]",Pt="[^"+wt+"]",jt="(?:\\ud83c[\\udde6-\\uddff]){2}",zt="[\\ud800-\\udbff][\\udc00-\\udfff]",Ft="["+Et+"]",Ht="\\u200d",Vt="(?:"+Dt+"|"+Lt+")",Bt="(?:"+Ft+"|"+Lt+")",Wt="(?:['’](?:d|ll|m|re|s|t|ve))?",Ut="(?:['’](?:D|LL|M|RE|S|T|VE))?",qt="(?:"+Mt+"|"+Rt+")?",Kt="["+Ot+"]?",Jt=Kt+qt+"(?:"+Ht+"(?:"+[Pt,jt,zt].join("|")+")"+Kt+qt+")*",Gt="(?:"+[$t,jt,zt].join("|")+")"+Jt,Yt="(?:"+[Pt+Mt+"?",Mt,jt,zt,Nt].join("|")+")",Xt=RegExp(At,"g"),Zt=RegExp(Mt,"g"),Qt=RegExp(Rt+"(?="+Rt+")|"+Yt+Jt,"g"),te=RegExp([Ft+"?"+Dt+"+"+Wt+"(?="+[Tt,Ft,"$"].join("|")+")",Bt+"+"+Ut+"(?="+[Tt,Ft+Vt,"$"].join("|")+")",Ft+"?"+Vt+"+"+Wt,Ft+"+"+Ut,"\\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[$]=ie[D]=ie[L]=ie[R]=ie[P]=ie[j]=ie[z]=ie[F]=ie[H]=!0,ie[m]=ie[g]=ie[M]=ie[v]=ie[I]=ie[y]=ie[_]=ie[b]=ie[k]=ie[x]=ie[S]=ie[O]=ie[C]=ie[A]=ie[T]=!1;var se={};se[m]=se[g]=se[M]=se[I]=se[v]=se[y]=se[$]=se[D]=se[L]=se[R]=se[P]=se[k]=se[x]=se[S]=se[O]=se[C]=se[A]=se[N]=se[j]=se[z]=se[F]=se[H]=!0,se[_]=se[b]=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,pe="object"==typeof self&&self&&self.Object===Object&&self,de=ue||pe||Function("return this")(),fe=am&&!am.nodeType&&am,he=fe&&sm&&!sm.nodeType&&sm,me=he&&he.exports===fe,ge=me&&ue.process,ve=function(){try{var t=he&&he.require&&he.require("util").types;return t||ge&&ge.binding&&ge.binding("util")}catch(t){}}(),ye=ve&&ve.isArrayBuffer,_e=ve&&ve.isDate,be=ve&&ve.isMap,we=ve&&ve.isRegExp,ke=ve&&ve.isSet,xe=ve&&ve.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 Ne(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 Me(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 $e(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}function De(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 Le(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 Re(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 je(t,e,n){var r;return n(t,(function(t,n,o){if(e(t,n,o))return r=n,!1})),r}function ze(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):ze(t,Ve,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 Ve(t){return t!=t}function Be(t,e){var n=null==t?0:t.length;return n?Ke(t,e)/n:d}function We(e){return function(n){return null==n?t:n[e]}}function Ue(e){return function(n){return null==e?t:e[n]}}function qe(t,e,n,r,o){return o(t,(function(t,o,i){n=r?(r=!1,t):e(n,t,o,i)})),n}function Ke(e,n){for(var r,o=-1,i=e.length;++o<i;){var s=n(e[o]);s!==t&&(r=r===t?s:r+s)}return r}function Je(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function Ge(t){return t?t.slice(0,hn(t)+1).replace(rt,""):t}function Ye(t){return function(e){return t(e)}}function Xe(t,e){return 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}function en(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}var nn=Ue({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),rn=Ue({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function on(t){return"\\"+ae[t]}function sn(t){return ee.test(t)}function an(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function ln(t,e){return function(n){return t(e(n))}}function cn(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 un(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}function pn(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}function dn(t){return sn(t)?function(t){for(var e=Qt.lastIndex=0;Qt.test(t);)++e;return e}(t):Pe(t)}function fn(t){return sn(t)?function(t){return t.match(Qt)||[]}(t):function(t){return t.split("")}(t)}function hn(t){for(var e=t.length;e--&&ot.test(t.charAt(e)););return e}var mn=Ue({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),gn=function s(ot){var wt=(ot=null==ot?de:gn.defaults(de.Object(),ot,gn.pick(de,re))).Array,kt=ot.Date,xt=ot.Error,St=ot.Function,Et=ot.Math,Ot=ot.Object,Ct=ot.RegExp,At=ot.String,Nt=ot.TypeError,Tt=wt.prototype,Mt=St.prototype,It=Ot.prototype,$t=ot["__core-js_shared__"],Dt=Mt.toString,Lt=It.hasOwnProperty,Rt=0,Pt=function(){var t=/[^.]+$/.exec($t&&$t.keys&&$t.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),jt=It.toString,zt=Dt.call(Ot),Ft=de._,Ht=Ct("^"+Dt.call(Lt).replace(et,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Vt=me?ot.Buffer:t,Bt=ot.Symbol,Wt=ot.Uint8Array,Ut=Vt?Vt.allocUnsafe:t,qt=ln(Ot.getPrototypeOf,Ot),Kt=Ot.create,Jt=It.propertyIsEnumerable,Gt=Tt.splice,Yt=Bt?Bt.isConcatSpreadable:t,Qt=Bt?Bt.iterator:t,ee=Bt?Bt.toStringTag:t,ae=function(){try{var t=fi(Ot,"defineProperty");return t({},"",{}),t}catch(t){}}(),ue=ot.clearTimeout!==de.clearTimeout&&ot.clearTimeout,pe=kt&&kt.now!==de.Date.now&&kt.now,fe=ot.setTimeout!==de.setTimeout&&ot.setTimeout,he=Et.ceil,ge=Et.floor,ve=Ot.getOwnPropertySymbols,Pe=Vt?Vt.isBuffer:t,Ue=ot.isFinite,vn=Tt.join,yn=ln(Ot.keys,Ot),_n=Et.max,bn=Et.min,wn=kt.now,kn=ot.parseInt,xn=Et.random,Sn=Tt.reverse,En=fi(ot,"DataView"),On=fi(ot,"Map"),Cn=fi(ot,"Promise"),An=fi(ot,"Set"),Nn=fi(ot,"WeakMap"),Tn=fi(Ot,"create"),Mn=Nn&&new Nn,In={},$n=Fi(En),Dn=Fi(On),Ln=Fi(Cn),Rn=Fi(An),Pn=Fi(Nn),jn=Bt?Bt.prototype:t,zn=jn?jn.valueOf:t,Fn=jn?jn.toString:t;function Hn(t){if(ra(t)&&!qs(t)&&!(t instanceof Un)){if(t instanceof Wn)return t;if(Lt.call(t,"__wrapped__"))return Hi(t)}return new Wn(t)}var Vn=function(){function e(){}return function(n){if(!na(n))return{};if(Kt)return Kt(n);e.prototype=n;var r=new e;return e.prototype=t,r}}();function Bn(){}function Wn(e,n){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!n,this.__index__=0,this.__values__=t}function Un(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=f,this.__views__=[]}function qn(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&&Us(t),o=!n&&!r&&Ys(t),i=!n&&!r&&!o&&pa(t),s=n||r||o||i,a=s?Je(t.length,At):[],l=a.length;for(var c in t)!e&&!Lt.call(t,c)||s&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||bi(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 Pi(Mo(t),lr(e,0,t.length))}function tr(t){return Pi(Mo(t))}function er(e,n,r){(r!==t&&!Vs(e[n],r)||r===t&&!(n in e))&&sr(e,n,r)}function nr(e,n,r){var o=e[n];Lt.call(e,n)&&Vs(o,r)&&(r!==t||n in e)||sr(e,n,r)}function rr(t,e){for(var n=t.length;n--;)if(Vs(t[n][0],e))return n;return-1}function or(t,e,n,r){return fr(t,(function(t,o,i){e(r,t,n(t),i)})),r}function ir(t,e){return t&&Io(e,$a(e),t)}function sr(t,e,n){"__proto__"==e&&ae?ae(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function ar(e,n){for(var r=-1,o=n.length,i=wt(o),s=null==e;++r<o;)i[r]=s?t:Aa(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(!na(e))return e;var p=qs(e);if(p){if(a=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&Lt.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(e),!l)return Mo(e,a)}else{var d=gi(e),f=d==b||d==w;if(Ys(e))return Eo(e,l);if(d==S||d==m||f&&!i){if(a=c||f?{}:yi(e),!l)return c?function(t,e){return Io(t,mi(t),e)}(e,function(t,e){return t&&Io(e,Da(e),t)}(a,e)):function(t,e){return Io(t,hi(t),e)}(e,ir(a,e))}else{if(!se[d])return i?e:{};a=function(t,e,n){var r,o=t.constructor;switch(e){case M:return Oo(t);case v:case y: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 $:case D:case L:case R:case P:case j:case z: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,dt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case C:return new o;case N:return r=t,zn?Ot(zn.call(r)):{}}}(e,d,l)}}s||(s=new Yn);var h=s.get(e);if(h)return h;s.set(e,a),la(e)?e.forEach((function(t){a.add(cr(t,n,r,t,e,s))})):oa(e)&&e.forEach((function(t,o){a.set(o,cr(t,n,r,o,e,s))}));var g=p?t:(u?c?si:ii:c?Da:$a)(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=Ot(e);o--;){var i=r[o],s=n[i],a=e[i];if(a===t&&!(i in e)||!s(a))return!1}return!0}function pr(n,r,o){if("function"!=typeof n)throw new Nt(e);return $i((function(){n.apply(t,o)}),r)}function dr(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=Me,s=!1):e.length>=200&&(i=Ze,s=!1,e=new Gn(e));t:for(;++o<a;){var u=t[o],p=null==n?u:n(u);if(u=r||0!==u?u:0,s&&p==p){for(var d=c;d--;)if(e[d]===p)continue t;l.push(u)}else i(e,p,r)||l.push(u)}return l}Hn.templateSettings={escape:G,evaluate:Y,interpolate:X,variable:"",imports:{_:Hn}},Hn.prototype=Bn.prototype,Hn.prototype.constructor=Hn,Wn.prototype=Vn(Bn.prototype),Wn.prototype.constructor=Wn,Un.prototype=Vn(Bn.prototype),Un.prototype.constructor=Un,qn.prototype.clear=function(){this.__data__=Tn?Tn(null):{},this.size=0},qn.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},qn.prototype.get=function(e){var r=this.__data__;if(Tn){var o=r[e];return o===n?t:o}return Lt.call(r,e)?r[e]:t},qn.prototype.has=function(e){var n=this.__data__;return Tn?n[e]!==t:Lt.call(n,e)},qn.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():Gt.call(e,n,1),--this.size,0))},Kn.prototype.get=function(e){var n=this.__data__,r=rr(n,e);return r<0?t:n[r][1]},Kn.prototype.has=function(t){return rr(this.__data__,t)>-1},Kn.prototype.set=function(t,e){var n=this.__data__,r=rr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},Jn.prototype.clear=function(){this.size=0,this.__data__={hash:new qn,map:new(On||Kn),string:new qn}},Jn.prototype.delete=function(t){var e=pi(this,t).delete(t);return this.size-=e?1:0,e},Jn.prototype.get=function(t){return pi(this,t).get(t)},Jn.prototype.has=function(t){return pi(this,t).has(t)},Jn.prototype.set=function(t,e){var n=pi(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},Gn.prototype.add=Gn.prototype.push=function(t){return this.__data__.set(t,n),this},Gn.prototype.has=function(t){return this.__data__.has(t)},Yn.prototype.clear=function(){this.__data__=new Kn,this.size=0},Yn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Yn.prototype.get=function(t){return this.__data__.get(t)},Yn.prototype.has=function(t){return this.__data__.has(t)},Yn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Kn){var r=n.__data__;if(!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 fr=Lo(wr),hr=Lo(kr,!0);function mr(t,e){var n=!0;return fr(t,(function(t,r,o){return n=!!e(t,r,o)})),n}function gr(e,n,r){for(var o=-1,i=e.length;++o<i;){var s=e[o],a=n(s);if(null!=a&&(l===t?a==a&&!ua(a):r(a,l)))var l=a,c=s}return c}function vr(t,e){var n=[];return fr(t,(function(t,r,o){e(t,r,o)&&n.push(t)})),n}function yr(t,e,n,r,o){var i=-1,s=t.length;for(n||(n=_i),o||(o=[]);++i<s;){var a=t[i];e>0&&n(a)?e>1?yr(a,e-1,n,r,o):$e(o,a):r||(o[o.length]=a)}return o}var _r=Ro(),br=Ro(!0);function wr(t,e){return t&&_r(t,e,$a)}function kr(t,e){return t&&br(t,e,$a)}function xr(t,e){return Ne(e,(function(e){return Qs(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:$e(r,n(t))}function Or(e){return null==e?e===t?"[object Undefined]":"[object Null]":ee&&ee in Ot(e)?function(e){var n=Lt.call(e,ee),r=e[ee];try{e[ee]=t;var o=!0}catch(t){}var i=jt.call(e);return o&&(n?e[ee]=r:delete e[ee]),i}(e):function(t){return jt.call(t)}(e)}function Cr(t,e){return t>e}function Ar(t,e){return null!=t&&Lt.call(t,e)}function Nr(t,e){return null!=t&&e in Ot(t)}function Tr(e,n,r){for(var o=r?Me:Te,i=e[0].length,s=e.length,a=s,l=wt(s),c=1/0,u=[];a--;){var p=e[a];a&&n&&(p=Ie(p,Ye(n))),c=bn(p.length,c),l[a]=!r&&(n||i>=120&&p.length>=120)?new Gn(a&&p):t}p=e[0];var d=-1,f=l[0];t:for(;++d<i&&u.length<c;){var h=p[d],m=n?n(h):h;if(h=r||0!==h?h:0,!(f?Ze(f,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}f&&f.push(m),u.push(h)}}return u}function Mr(e,n,r){var o=null==(e=Ni(e,n=wo(n,e)))?e:e[zi(Zi(n))];return null==o?t:Se(o,e,r)}function Ir(t){return ra(t)&&Or(t)==m}function $r(e,n,r,o,i){return e===n||(null==e||null==n||!ra(e)&&!ra(n)?e!=e&&n!=n:function(e,n,r,o,i,s){var a=qs(e),l=qs(n),c=a?g:gi(e),u=l?g:gi(n),p=(c=c==m?S:c)==S,d=(u=u==m?S:u)==S,f=c==u;if(f&&Ys(e)){if(!Ys(n))return!1;a=!0,p=!1}if(f&&!p)return s||(s=new Yn),a||pa(e)?ri(e,n,r,o,i,s):function(t,e,n,r,o,i,s){switch(n){case I:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case M:return!(t.byteLength!=e.byteLength||!i(new Wt(t),new Wt(e)));case v:case y:case x:return Vs(+t,+e);case _:return t.name==e.name&&t.message==e.message;case O:case A:return t==e+"";case k:var a=an;case C:var l=1&r;if(a||(a=un),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 N:if(zn)return zn.call(t)==zn.call(e)}return!1}(e,n,c,r,o,i,s);if(!(1&r)){var h=p&&Lt.call(e,"__wrapped__"),b=d&&Lt.call(n,"__wrapped__");if(h||b){var w=h?e.value():e,E=b?n.value():n;return s||(s=new Yn),i(w,E,r,o,s)}}return!!f&&(s||(s=new Yn),function(e,n,r,o,i,s){var a=1&r,l=ii(e),c=l.length,u=ii(n),p=u.length;if(c!=p&&!a)return!1;for(var d=c;d--;){var f=l[d];if(!(a?f in n:Lt.call(n,f)))return!1}var h=s.get(e),m=s.get(n);if(h&&m)return h==n&&m==e;var g=!0;s.set(e,n),s.set(n,e);for(var v=a;++d<c;){var y=e[f=l[d]],_=n[f];if(o)var b=a?o(_,y,f,n,e,s):o(y,_,f,e,n,s);if(!(b===t?y===_||i(y,_,r,o,s):b)){g=!1;break}v||(v="constructor"==f)}if(g&&!v){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,$r,i))}function Dr(e,n,r,o){var i=r.length,s=i,a=!o;if(null==e)return!s;for(e=Ot(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],p=l[1];if(a&&l[2]){if(u===t&&!(c in e))return!1}else{var d=new Yn;if(o)var f=o(u,p,c,e,n,d);if(!(f===t?$r(p,u,3,o,d):f))return!1}}return!0}function Lr(t){return!(!na(t)||(e=t,Pt&&Pt in e))&&(Qs(t)?Ht:mt).test(Fi(t));var e}function Rr(t){return"function"==typeof t?t:null==t?il:"object"==typeof t?qs(t)?Vr(t[0],t[1]):Hr(t):hl(t)}function Pr(t){if(!Ei(t))return yn(t);var e=[];for(var n in Ot(t))Lt.call(t,n)&&"constructor"!=n&&e.push(n);return e}function jr(t){if(!na(t))return function(t){var e=[];if(null!=t)for(var n in Ot(t))e.push(n);return e}(t);var e=Ei(t),n=[];for(var r in t)("constructor"!=r||!e&&Lt.call(t,r))&&n.push(r);return n}function zr(t,e){return t<e}function Fr(t,e){var n=-1,r=Js(t)?wt(t.length):[];return fr(t,(function(t,o,i){r[++n]=e(t,o,i)})),r}function Hr(t){var e=di(t);return 1==e.length&&e[0][2]?Ci(e[0][0],e[0][1]):function(n){return n===t||Dr(n,t,e)}}function Vr(e,n){return ki(e)&&Oi(n)?Ci(zi(e),n):function(r){var o=Aa(r,e);return o===t&&o===n?Na(r,e):$r(n,o,3)}}function Br(e,n,r,o,i){e!==n&&_r(n,(function(s,a){if(i||(i=new Yn),na(s))!function(e,n,r,o,i,s,a){var l=Mi(e,r),c=Mi(n,r),u=a.get(c);if(u)er(e,r,u);else{var p=s?s(l,c,r+"",e,n,a):t,d=p===t;if(d){var f=qs(c),h=!f&&Ys(c),m=!f&&!h&&pa(c);p=c,f||h||m?qs(l)?p=l:Gs(l)?p=Mo(l):h?(d=!1,p=Eo(c,!0)):m?(d=!1,p=Co(c,!0)):p=[]:sa(c)||Us(c)?(p=l,Us(l)?p=_a(l):na(l)&&!Qs(l)||(p=yi(c))):d=!1}d&&(a.set(c,p),i(p,c,o,s,a),a.delete(c)),er(e,r,p)}}(e,n,a,r,Br,o,i);else{var l=o?o(Mi(e,a),s,a+"",e,n,i):t;l===t&&(l=s),er(e,a,l)}}),Da)}function Wr(e,n){var r=e.length;if(r)return bi(n+=n<0?r:0,r)?e[n]:t}function Ur(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})):[il];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 qr(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=Mo(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&&Gt.call(a,l,1),Gt.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;bi(o)?Gt.call(t,o,1):fo(t,o)}}return t}function Gr(t,e){return t+ge(xn()*(e-t+1))}function Yr(t,e){var n="";if(!t||e<1||e>p)return n;do{e%2&&(n+=t),(e=ge(e/2))&&(t+=t)}while(e);return n}function Xr(t,e){return Di(Ai(t,e,il),t+"")}function Zr(t){return Zn(Va(t))}function Qr(t,e){var n=Va(t);return Pi(n,lr(e,0,n.length))}function to(e,n,r,o){if(!na(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 p=l[c];(u=o?o(p,c,l):t)===t&&(u=na(p)?p:bi(n[i+1])?[]:{})}nr(l,c,u),l=l[c]}return e}var eo=Mn?function(t,e){return Mn.set(t,e),t}:il,no=ae?function(t,e){return ae(t,"toString",{configurable:!0,enumerable:!1,value:nl(e),writable:!0})}:il;function ro(t){return Pi(Va(t))}function oo(t,e,n){var r=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var i=wt(o);++r<o;)i[r]=t[r+e];return i}function io(t,e){var n;return fr(t,(function(t,r,o){return!(n=e(t,r,o))})),!!n}function so(t,e,n){var r=0,o=null==t?r:t.length;if("number"==typeof e&&e==e&&o<=2147483647){for(;r<o;){var i=r+o>>>1,s=t[i];null!==s&&!ua(s)&&(n?s<=e:s<e)?r=i+1:o=i}return o}return ao(t,e,il,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=ua(n),u=n===t;i<s;){var p=ge((i+s)/2),d=r(e[p]),f=d!==t,h=null===d,m=d==d,g=ua(d);if(a)var v=o||m;else v=u?m&&(o||f):l?m&&f&&(o||!h):c?m&&f&&!h&&(o||!g):!h&&!g&&(o?d<=n:d<n);v?i=p+1:s=p}return bn(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||!Vs(a,l)){var l=a;i[o++]=0===s?0:s}}return i}function co(t){return"number"==typeof t?t:ua(t)?d:+t}function uo(t){if("string"==typeof t)return t;if(qs(t))return Ie(t,uo)+"";if(ua(t))return Fn?Fn.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function po(t,e,n){var r=-1,o=Te,i=t.length,s=!0,a=[],l=a;if(n)s=!1,o=Me;else if(i>=200){var c=e?null:Xo(t);if(c)return un(c);s=!1,o=Ze,l=new Gn}else l=e?[]:a;t:for(;++r<i;){var u=t[r],p=e?e(u):u;if(u=n||0!==u?u:0,s&&p==p){for(var d=l.length;d--;)if(l[d]===p)continue t;e&&l.push(p),a.push(u)}else o(l,p,n)||(l!==a&&l.push(p),a.push(u))}return a}function fo(t,e){return null==(t=Ni(t,e=wo(e,t)))||delete t[zi(Zi(e))]}function ho(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 Un&&(n=n.value()),De(e,(function(t,e){return e.func.apply(e.thisArg,$e([t],e.args))}),n)}function vo(t,e,n){var r=t.length;if(r<2)return r?po(t[0]):[];for(var o=-1,i=wt(r);++o<r;)for(var s=t[o],a=-1;++a<r;)a!=o&&(i[o]=dr(i[o]||s,t[a],e,n));return po(yr(i,1),e,n)}function yo(e,n,r){for(var o=-1,i=e.length,s=n.length,a={};++o<i;){var l=o<s?n[o]:t;r(a,e[o],l)}return a}function _o(t){return Gs(t)?t:[]}function bo(t){return"function"==typeof t?t:il}function wo(t,e){return qs(t)?t:ki(t,e)?[t]:ji(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=ue||function(t){return de.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 Wt(e).set(new Wt(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=ua(e),a=n!==t,l=null===n,c=n==n,u=ua(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 No(t,e,n,r){for(var o=-1,i=t.length,s=n.length,a=-1,l=e.length,c=_n(i-s,0),u=wt(l+c),p=!r;++a<l;)u[a]=e[a];for(;++o<s;)(p||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=_n(i-a,0),p=wt(u+c),d=!r;++o<u;)p[o]=t[o];for(var f=o;++l<c;)p[f+l]=e[l];for(;++s<a;)(d||o<i)&&(p[f+n[s]]=t[o++]);return p}function Mo(t,e){var n=-1,r=t.length;for(e||(e=wt(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 $o(t,e){return function(n,r){var o=qs(n)?Ee:or,i=e?e():{};return o(n,t,ui(r,2),i)}}function Do(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=Ot(n);++o<i;){var l=r[o];l&&e(n,l,o,s)}return n}))}function Lo(t,e){return function(n,r){if(null==n)return n;if(!Js(n))return t(n,r);for(var o=n.length,i=e?o:-1,s=Ot(n);(e?i--:++i<o)&&!1!==r(s[i],i,s););return n}}function Ro(t){return function(e,n,r){for(var o=-1,i=Ot(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=sn(n=ba(n))?fn(n):t,o=r?r[0]:n.charAt(0),i=r?xo(r,1).join(""):n.slice(1);return o[e]()+i}}function jo(t){return function(e){return De(Qa(Ua(e).replace(Xt,"")),t,"")}}function zo(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=Vn(t.prototype),r=t.apply(n,e);return na(r)?r:n}}function Fo(e){return function(n,r,o){var i=Ot(n);if(!Js(n)){var s=ui(r,3);n=$a(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 Nt(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 Vo(e,n,r,o,i,s,a,c,u,p){var d=n&l,f=1&n,h=2&n,m=24&n,g=512&n,v=h?t:zo(e);return function t(){for(var l=arguments.length,y=wt(l),_=l;_--;)y[_]=arguments[_];if(m)var b=ci(t),w=en(y,b);if(o&&(y=No(y,o,i,m)),s&&(y=To(y,s,a,m)),l-=w,m&&l<p){var k=cn(y,b);return Go(e,n,Vo,t.placeholder,r,y,k,c,u,p-l)}var x=f?r:this,S=h?x[e]:e;return l=y.length,c?y=Ti(y,c):g&&l>1&&y.reverse(),d&&u<l&&(y.length=u),this&&this!==de&&this instanceof t&&(S=v||zo(S)),S.apply(x,y)}}function Bo(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 Uo(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 qo(e,n){var r=(n=n===t?" ":uo(n)).length;if(r<2)return r?Yr(n,e):n;var o=Yr(n,he(e/dn(n)));return sn(n)?xo(fn(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=ma(n),r===t?(r=n,n=0):r=ma(r),function(t,e,n,r){for(var o=-1,i=_n(he((e-t)/(n||1)),0),s=wt(i);i--;)s[r?i:++o]=t,t+=n;return s}(n,r,o=o===t?n<r?1:-1:ma(o),e)}}function Jo(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=ya(e),n=ya(n)),t(e,n)}}function Go(e,n,r,o,s,l,c,u,p,d){var f=8&n;n|=f?i:a,4&(n&=~(f?a:i))||(n&=-4);var h=[e,n,s,f?l:t,f?c:t,f?t:l,f?t:c,u,p,d],m=r.apply(t,h);return xi(e)&&Ii(m,h),m.placeholder=o,Li(m,e,n)}function Yo(t){var e=Et[t];return function(t,n){if(t=ya(t),(n=null==n?0:bn(ga(n),292))&&Ue(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/un(new An([,-0]))[1]==u?function(t){return new An(t)}:ul;function Zo(t){return function(e){var n=gi(e);return n==k?an(e):n==C?pn(e):function(t,e){return Ie(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function Qo(n,s,u,p,d,f,h,m){var g=2&s;if(!g&&"function"!=typeof n)throw new Nt(e);var v=p?p.length:0;if(v||(s&=-97,p=d=t),h=h===t?h:_n(ga(h),0),m=m===t?m:ga(m),v-=d?d.length:0,s&a){var y=p,_=d;p=d=t}var b=g?t:ai(n),w=[n,s,u,p,d,y,_,f,h,m];if(b&&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 p=t[3];t[3]=p?No(p,u,e[4]):u,t[4]=p?cn(t[3],r):e[4]}(u=e[5])&&(p=t[5],t[5]=p?To(p,u,e[6]):u,t[6]=p?cn(t[5],r):e[6]),(u=e[7])&&(t[7]=u),o&l&&(t[8]=null==t[8]?e[8]:bn(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i}(w,b),n=w[0],s=w[1],u=w[2],p=w[3],d=w[4],!(m=w[9]=w[9]===t?g?0:n.length:_n(w[9]-v,0))&&24&s&&(s&=-25),s&&1!=s)k=8==s||s==o?function(e,n,r){var o=zo(e);return function i(){for(var s=arguments.length,a=wt(s),l=s,c=ci(i);l--;)a[l]=arguments[l];var u=s<3&&a[0]!==c&&a[s-1]!==c?[]:cn(a,c);return(s-=u.length)<r?Go(e,n,Vo,i.placeholder,t,a,u,t,t,r-s):Se(this&&this!==de&&this instanceof i?o:e,this,a)}}(n,s,m):s!=i&&33!=s||d.length?Vo.apply(t,w):function(t,e,n,r){var o=1&e,i=zo(t);return function e(){for(var s=-1,a=arguments.length,l=-1,c=r.length,u=wt(c+a),p=this&&this!==de&&this instanceof e?i:t;++l<c;)u[l]=r[l];for(;a--;)u[l++]=arguments[++s];return Se(p,o?n:this,u)}}(n,s,u,p);else var k=function(t,e,n){var r=1&e,o=zo(t);return function e(){return(this&&this!==de&&this instanceof e?o:t).apply(r?n:this,arguments)}}(n,s,u);return Li((b?eo:Ii)(k,w),n,s)}function ti(e,n,r,o){return e===t||Vs(e,It[r])&&!Lt.call(o,r)?n:e}function ei(e,n,r,o,i,s){return na(e)&&na(n)&&(s.set(n,e),Br(e,n,t,ei,s),s.delete(n)),e}function ni(e){return sa(e)?t:e}function ri(e,n,r,o,i,s){var a=1&r,l=e.length,c=n.length;if(l!=c&&!(a&&c>l))return!1;var u=s.get(e),p=s.get(n);if(u&&p)return u==n&&p==e;var d=-1,f=!0,h=2&r?new Gn:t;for(s.set(e,n),s.set(n,e);++d<l;){var m=e[d],g=n[d];if(o)var v=a?o(g,m,d,n,e,s):o(m,g,d,e,n,s);if(v!==t){if(v)continue;f=!1;break}if(h){if(!Re(n,(function(t,e){if(!Ze(h,e)&&(m===t||i(m,t,r,o,s)))return h.push(e)}))){f=!1;break}}else if(m!==g&&!i(m,g,r,o,s)){f=!1;break}}return s.delete(e),s.delete(n),f}function oi(e){return Di(Ai(e,t,Ki),e+"")}function ii(t){return Er(t,$a,hi)}function si(t){return Er(t,Da,mi)}var ai=Mn?function(t){return Mn.get(t)}:ul;function li(t){for(var e=t.name+"",n=In[e],r=Lt.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(Lt.call(Hn,"placeholder")?Hn:t).placeholder}function ui(){var t=Hn.iteratee||sl;return t=t===sl?Rr:t,arguments.length?t(arguments[0],arguments[1]):t}function pi(t,e){var n,r,o=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof e?"string":"hash"]:o.map}function di(t){for(var e=$a(t),n=e.length;n--;){var r=e[n],o=t[r];e[n]=[r,o,Oi(o)]}return e}function fi(e,n){var r=function(e,n){return null==e?t:e[n]}(e,n);return Lr(r)?r:t}var hi=ve?function(t){return null==t?[]:(t=Ot(t),Ne(ve(t),(function(e){return Jt.call(t,e)})))}:vl,mi=ve?function(t){for(var e=[];t;)$e(e,hi(t)),t=qt(t);return e}:vl,gi=Or;function vi(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)&&ea(o)&&bi(s,o)&&(qs(t)||Us(t))}function yi(t){return"function"!=typeof t.constructor||Ei(t)?{}:Vn(qt(t))}function _i(t){return qs(t)||Us(t)||!!(Yt&&t&&t[Yt])}function bi(t,e){var n=typeof t;return!!(e=null==e?p:e)&&("number"==n||"symbol"!=n&&vt.test(t))&&t>-1&&t%1==0&&t<e}function wi(t,e,n){if(!na(n))return!1;var r=typeof e;return!!("number"==r?Js(n)&&bi(e,n.length):"string"==r&&e in n)&&Vs(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&&!ua(t))||Q.test(t)||!Z.test(t)||null!=e&&t in Ot(e)}function xi(t){var e=li(t),n=Hn[e];if("function"!=typeof n||!(e in Un.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||Nn&&gi(new Nn)!=T)&&(gi=function(e){var n=Or(e),r=n==S?e.constructor:t,o=r?Fi(r):"";if(o)switch(o){case $n:return I;case Dn:return k;case Ln:return E;case Rn:return C;case Pn:return T}return n});var Si=$t?Qs:yl;function Ei(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||It)}function Oi(t){return t==t&&!na(t)}function Ci(e,n){return function(r){return null!=r&&r[e]===n&&(n!==t||e in Ot(r))}}function Ai(e,n,r){return n=_n(n===t?e.length-1:n,0),function(){for(var t=arguments,o=-1,i=_n(t.length-n,0),s=wt(i);++o<i;)s[o]=t[n+o];o=-1;for(var a=wt(n+1);++o<n;)a[o]=t[o];return a[n]=r(s),Se(e,this,a)}}function Ni(t,e){return e.length<2?t:Sr(t,oo(e,0,-1))}function Ti(e,n){for(var r=e.length,o=bn(n.length,r),i=Mo(e);o--;){var s=n[o];e[o]=bi(s,r)?i[s]:t}return e}function Mi(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var Ii=Ri(eo),$i=fe||function(t,e){return de.setTimeout(t,e)},Di=Ri(no);function Li(t,e,n){var r=e+"";return Di(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(h,(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 Ri(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 Pi(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 ji=function(t){var e=Rs(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||ua(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Fi(t){if(null!=t){try{return Dt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Hi(t){if(t instanceof Un)return t.clone();var e=new Wn(t.__wrapped__,t.__chain__);return e.__actions__=Mo(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Vi=Xr((function(t,e){return Gs(t)?dr(t,yr(e,1,Gs,!0)):[]})),Bi=Xr((function(e,n){var r=Zi(n);return Gs(r)&&(r=t),Gs(e)?dr(e,yr(n,1,Gs,!0),ui(r,2)):[]})),Wi=Xr((function(e,n){var r=Zi(n);return Gs(r)&&(r=t),Gs(e)?dr(e,yr(n,1,Gs,!0),t,r):[]}));function Ui(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=null==n?0:ga(n);return o<0&&(o=_n(r+o,0)),ze(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=ga(r),i=r<0?_n(o+i,0):bn(i,o-1)),ze(e,ui(n,3),i,!0)}function Ki(t){return null!=t&&t.length?yr(t,1):[]}function Ji(e){return e&&e.length?e[0]:t}var Gi=Xr((function(t){var e=Ie(t,_o);return e.length&&e[0]===t[0]?Tr(e):[]})),Yi=Xr((function(e){var n=Zi(e),r=Ie(e,_o);return n===Zi(r)?n=t:r.pop(),r.length&&r[0]===e[0]?Tr(r,ui(n,2)):[]})),Xi=Xr((function(e){var n=Zi(e),r=Ie(e,_o);return(n="function"==typeof n?n:t)&&r.pop(),r.length&&r[0]===e[0]?Tr(r,t,n):[]}));function Zi(e){var n=null==e?0:e.length;return n?e[n-1]:t}var Qi=Xr(ts);function ts(t,e){return t&&t.length&&e&&e.length?Kr(t,e):t}var es=oi((function(t,e){var n=null==t?0:t.length,r=ar(t,e);return Jr(t,Ie(e,(function(t){return bi(t,n)?+t:t})).sort(Ao)),r}));function ns(t){return null==t?t:Sn.call(t)}var rs=Xr((function(t){return po(yr(t,1,Gs,!0))})),os=Xr((function(e){var n=Zi(e);return Gs(n)&&(n=t),po(yr(e,1,Gs,!0),ui(n,2))})),is=Xr((function(e){var n=Zi(e);return n="function"==typeof n?n:t,po(yr(e,1,Gs,!0),t,n)}));function ss(t){if(!t||!t.length)return[];var e=0;return t=Ne(t,(function(t){if(Gs(t))return e=_n(t.length,e),!0})),Je(e,(function(e){return Ie(t,We(e))}))}function as(e,n){if(!e||!e.length)return[];var r=ss(e);return null==n?r:Ie(r,(function(e){return Se(n,t,e)}))}var ls=Xr((function(t,e){return Gs(t)?dr(t,e):[]})),cs=Xr((function(t){return vo(Ne(t,Gs))})),us=Xr((function(e){var n=Zi(e);return Gs(n)&&(n=t),vo(Ne(e,Gs),ui(n,2))})),ps=Xr((function(e){var n=Zi(e);return n="function"==typeof n?n:t,vo(Ne(e,Gs),t,n)})),ds=Xr(ss),fs=Xr((function(e){var n=e.length,r=n>1?e[n-1]:t;return r="function"==typeof r?(e.pop(),r):t,as(e,r)}));function hs(t){var e=Hn(t);return e.__chain__=!0,e}function ms(t,e){return e(t)}var gs=oi((function(e){var n=e.length,r=n?e[0]:0,o=this.__wrapped__,i=function(t){return ar(t,e)};return!(n>1||this.__actions__.length)&&o instanceof Un&&bi(r)?((o=o.slice(r,+r+(n?1:0))).__actions__.push({func:ms,args:[i],thisArg:t}),new Wn(o,this.__chain__).thru((function(e){return n&&!e.length&&e.push(t),e}))):this.thru(i)})),vs=$o((function(t,e,n){Lt.call(t,n)?++t[n]:sr(t,n,1)})),ys=Fo(Ui),_s=Fo(qi);function bs(t,e){return(qs(t)?Oe:fr)(t,ui(e,3))}function ws(t,e){return(qs(t)?Ce:hr)(t,ui(e,3))}var ks=$o((function(t,e,n){Lt.call(t,n)?t[n].push(e):sr(t,n,[e])})),xs=Xr((function(t,e,n){var r=-1,o="function"==typeof e,i=Js(t)?wt(t.length):[];return fr(t,(function(t){i[++r]=o?Se(e,t,n):Mr(t,e,n)})),i})),Ss=$o((function(t,e,n){sr(t,n,e)}));function Es(t,e){return(qs(t)?Ie:Fr)(t,ui(e,3))}var Os=$o((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]})),Cs=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]]),Ur(t,yr(e,1),[])})),As=pe||function(){return de.Date.now()};function Ns(e,n,r){return n=r?t:n,n=e&&null==n?e.length:n,Qo(e,l,t,t,t,t,n)}function Ts(n,r){var o;if("function"!=typeof r)throw new Nt(e);return n=ga(n),function(){return--n>0&&(o=r.apply(this,arguments)),n<=1&&(r=t),o}}var Ms=Xr((function(t,e,n){var r=1;if(n.length){var o=cn(n,ci(Ms));r|=i}return Qo(t,r,e,n,o)})),Is=Xr((function(t,e,n){var r=3;if(n.length){var o=cn(n,ci(Is));r|=i}return Qo(e,r,t,n,o)}));function $s(n,r,o){var i,s,a,l,c,u,p=0,d=!1,f=!1,h=!0;if("function"!=typeof n)throw new Nt(e);function m(e){var r=i,o=s;return i=s=t,p=e,l=n.apply(o,r)}function g(t){return p=t,c=$i(y,r),d?m(t):l}function v(e){var n=e-u;return u===t||n>=r||n<0||f&&e-p>=a}function y(){var t=As();if(v(t))return _(t);c=$i(y,function(t){var e=r-(t-u);return f?bn(e,a-(t-p)):e}(t))}function _(e){return c=t,h&&i?m(e):(i=s=t,l)}function b(){var e=As(),n=v(e);if(i=arguments,s=this,u=e,n){if(c===t)return g(u);if(f)return So(c),c=$i(y,r),m(u)}return c===t&&(c=$i(y,r)),l}return r=ya(r)||0,na(o)&&(d=!!o.leading,a=(f="maxWait"in o)?_n(ya(o.maxWait)||0,r):a,h="trailing"in o?!!o.trailing:h),b.cancel=function(){c!==t&&So(c),p=0,i=u=s=c=t},b.flush=function(){return c===t?l:_(As())},b}var Ds=Xr((function(t,e){return pr(t,1,e)})),Ls=Xr((function(t,e,n){return pr(t,ya(e)||0,n)}));function Rs(t,n){if("function"!=typeof t||null!=n&&"function"!=typeof n)throw new Nt(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(Rs.Cache||Jn),r}function Ps(t){if("function"!=typeof t)throw new Nt(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)}}Rs.Cache=Jn;var js=ko((function(t,e){var n=(e=1==e.length&&qs(e[0])?Ie(e[0],Ye(ui())):Ie(yr(e,1),Ye(ui()))).length;return Xr((function(r){for(var o=-1,i=bn(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=cn(n,ci(zs));return Qo(e,i,t,n,r)})),Fs=Xr((function(e,n){var r=cn(n,ci(Fs));return Qo(e,a,t,n,r)})),Hs=oi((function(e,n){return Qo(e,c,t,t,t,n)}));function Vs(t,e){return t===e||t!=t&&e!=e}var Bs=Jo(Cr),Ws=Jo((function(t,e){return t>=e})),Us=Ir(function(){return arguments}())?Ir:function(t){return ra(t)&&Lt.call(t,"callee")&&!Jt.call(t,"callee")},qs=wt.isArray,Ks=ye?Ye(ye):function(t){return ra(t)&&Or(t)==M};function Js(t){return null!=t&&ea(t.length)&&!Qs(t)}function Gs(t){return ra(t)&&Js(t)}var Ys=Pe||yl,Xs=_e?Ye(_e):function(t){return ra(t)&&Or(t)==y};function Zs(t){if(!ra(t))return!1;var e=Or(t);return e==_||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!sa(t)}function Qs(t){if(!na(t))return!1;var e=Or(t);return e==b||e==w||"[object AsyncFunction]"==e||"[object Proxy]"==e}function ta(t){return"number"==typeof t&&t==ga(t)}function ea(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=p}function na(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function ra(t){return null!=t&&"object"==typeof t}var oa=be?Ye(be):function(t){return ra(t)&&gi(t)==k};function ia(t){return"number"==typeof t||ra(t)&&Or(t)==x}function sa(t){if(!ra(t)||Or(t)!=S)return!1;var e=qt(t);if(null===e)return!0;var n=Lt.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Dt.call(n)==zt}var aa=we?Ye(we):function(t){return ra(t)&&Or(t)==O},la=ke?Ye(ke):function(t){return ra(t)&&gi(t)==C};function ca(t){return"string"==typeof t||!qs(t)&&ra(t)&&Or(t)==A}function ua(t){return"symbol"==typeof t||ra(t)&&Or(t)==N}var pa=xe?Ye(xe):function(t){return ra(t)&&ea(t.length)&&!!ie[Or(t)]},da=Jo(zr),fa=Jo((function(t,e){return t<=e}));function ha(t){if(!t)return[];if(Js(t))return ca(t)?fn(t):Mo(t);if(Qt&&t[Qt])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[Qt]());var e=gi(t);return(e==k?an:e==C?un:Va)(t)}function ma(t){return t?(t=ya(t))===u||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function ga(t){var e=ma(t),n=e%1;return e==e?n?e-n:e:0}function va(t){return t?lr(ga(t),0,f):0}function ya(t){if("number"==typeof t)return t;if(ua(t))return d;if(na(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=na(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Ge(t);var n=ht.test(t);return n||gt.test(t)?ce(t.slice(2),n?2:8):ft.test(t)?d:+t}function _a(t){return Io(t,Da(t))}function ba(t){return null==t?"":uo(t)}var wa=Do((function(t,e){if(Ei(e)||Js(e))Io(e,$a(e),t);else for(var n in e)Lt.call(e,n)&&nr(t,n,e[n])})),ka=Do((function(t,e){Io(e,Da(e),t)})),xa=Do((function(t,e,n,r){Io(e,Da(e),t,r)})),Sa=Do((function(t,e,n,r){Io(e,$a(e),t,r)})),Ea=oi(ar),Oa=Xr((function(e,n){e=Ot(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=Da(s),l=-1,c=a.length;++l<c;){var u=a[l],p=e[u];(p===t||Vs(p,It[u])&&!Lt.call(e,u))&&(e[u]=s[u])}return e})),Ca=Xr((function(e){return e.push(t,ei),Se(Ra,t,e)}));function Aa(e,n,r){var o=null==e?t:Sr(e,n);return o===t?r:o}function Na(t,e){return null!=t&&vi(t,e,Nr)}var Ta=Bo((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=jt.call(e)),t[e]=n}),nl(il)),Ma=Bo((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=jt.call(e)),Lt.call(t,e)?t[e].push(n):t[e]=[n]}),ui),Ia=Xr(Mr);function $a(t){return Js(t)?Xn(t):Pr(t)}function Da(t){return Js(t)?Xn(t,!0):jr(t)}var La=Do((function(t,e,n){Br(t,e,n)})),Ra=Do((function(t,e,n,r){Br(t,e,n,r)})),Pa=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--;)fo(n,e[o]);return n})),ja=oi((function(t,e){return null==t?{}:function(t,e){return qr(t,e,(function(e,n){return Na(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),qr(t,n,(function(t,n){return e(t,n[0])}))}var Fa=Zo($a),Ha=Zo(Da);function Va(t){return null==t?[]:Xe(t,$a(t))}var Ba=jo((function(t,e,n){return e=e.toLowerCase(),t+(n?Wa(e):e)}));function Wa(t){return Za(ba(t).toLowerCase())}function Ua(t){return(t=ba(t))&&t.replace(yt,nn).replace(Zt,"")}var qa=jo((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),Ka=jo((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),Ja=Po("toLowerCase"),Ga=jo((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()})),Ya=jo((function(t,e,n){return t+(n?" ":"")+Za(e)})),Xa=jo((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),Za=Po("toUpperCase");function Qa(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 tl=Xr((function(e,n){try{return Se(e,t,n)}catch(t){return Zs(t)?t:new xt(t)}})),el=oi((function(t,e){return Oe(e,(function(e){e=zi(e),sr(t,e,Ms(t[e],t))})),t}));function nl(t){return function(){return t}}var rl=Ho(),ol=Ho(!0);function il(t){return t}function sl(t){return Rr("function"==typeof t?t:cr(t,1))}var al=Xr((function(t,e){return function(n){return Mr(n,t,e)}})),ll=Xr((function(t,e){return function(n){return Mr(t,n,e)}}));function cl(t,e,n){var r=$a(e),o=xr(e,r);null!=n||na(e)&&(o.length||!r.length)||(n=e,e=t,t=this,o=xr(e,$a(e)));var i=!(na(n)&&"chain"in n&&!n.chain),s=Qs(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__),o=n.__actions__=Mo(this.__actions__);return o.push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,$e([this.value()],arguments))})})),t}function ul(){}var pl=Uo(Ie),dl=Uo(Ae),fl=Uo(Re);function hl(t){return ki(t)?We(zi(t)):function(t){return function(e){return Sr(e,t)}}(t)}var ml=Ko(),gl=Ko(!0);function vl(){return[]}function yl(){return!1}var _l,bl=Wo((function(t,e){return t+e}),0),wl=Yo("ceil"),kl=Wo((function(t,e){return t/e}),1),xl=Yo("floor"),Sl=Wo((function(t,e){return t*e}),1),El=Yo("round"),Ol=Wo((function(t,e){return t-e}),0);return Hn.after=function(t,n){if("function"!=typeof n)throw new Nt(e);return t=ga(t),function(){if(--t<1)return n.apply(this,arguments)}},Hn.ary=Ns,Hn.assign=wa,Hn.assignIn=ka,Hn.assignInWith=xa,Hn.assignWith=Sa,Hn.at=Ea,Hn.before=Ts,Hn.bind=Ms,Hn.bindAll=el,Hn.bindKey=Is,Hn.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return qs(t)?t:[t]},Hn.chain=hs,Hn.chunk=function(e,n,r){n=(r?wi(e,n,r):n===t)?1:_n(ga(n),0);var o=null==e?0:e.length;if(!o||n<1)return[];for(var i=0,s=0,a=wt(he(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=wt(t-1),n=arguments[0],r=t;r--;)e[r-1]=arguments[r];return $e(qs(n)?Mo(n):[n],yr(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 Nt(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=$a(t);return function(n){return ur(n,t,e)}}(cr(t,1))},Hn.constant=nl,Hn.countBy=vs,Hn.create=function(t,e){var n=Vn(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=$s,Hn.defaults=Oa,Hn.defaultsDeep=Ca,Hn.defer=Ds,Hn.delay=Ls,Hn.difference=Vi,Hn.differenceBy=Bi,Hn.differenceWith=Wi,Hn.drop=function(e,n,r){var o=null==e?0:e.length;return o?oo(e,(n=r||n===t?1:ga(n))<0?0:n,o):[]},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:ga(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=ga(r))<0&&(r=-r>i?0:i+r),(o=o===t||o>i?i:ga(o))<0&&(o+=i),o=r>o?0:va(o);r<o;)e[r++]=n;return e}(e,n,r,o)):[]},Hn.filter=function(t,e){return(qs(t)?Ne:vr)(t,ui(e,3))},Hn.flatMap=function(t,e){return yr(Es(t,e),1)},Hn.flatMapDeep=function(t,e){return yr(Es(t,e),u)},Hn.flatMapDepth=function(e,n,r){return r=r===t?1:ga(r),yr(Es(e,n),r)},Hn.flatten=Ki,Hn.flattenDeep=function(t){return null!=t&&t.length?yr(t,u):[]},Hn.flattenDepth=function(e,n){return null!=e&&e.length?yr(e,n=n===t?1:ga(n)):[]},Hn.flip=function(t){return Qo(t,512)},Hn.flow=rl,Hn.flowRight=ol,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,$a(t))},Hn.functionsIn=function(t){return null==t?[]:xr(t,Da(t))},Hn.groupBy=ks,Hn.initial=function(t){return null!=t&&t.length?oo(t,0,-1):[]},Hn.intersection=Gi,Hn.intersectionBy=Yi,Hn.intersectionWith=Xi,Hn.invert=Ta,Hn.invertBy=Ma,Hn.invokeMap=xs,Hn.iteratee=sl,Hn.keyBy=Ss,Hn.keys=$a,Hn.keysIn=Da,Hn.map=Es,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 Vr(t,cr(e,1))},Hn.memoize=Rs,Hn.merge=La,Hn.mergeWith=Ra,Hn.method=al,Hn.methodOf=ll,Hn.mixin=cl,Hn.negate=Ps,Hn.nthArg=function(t){return t=ga(t),Xr((function(e){return Wr(e,t)}))},Hn.omit=Pa,Hn.omitBy=function(t,e){return za(t,Ps(ui(e)))},Hn.once=function(t){return Ts(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]),Ur(e,n,r))},Hn.over=pl,Hn.overArgs=js,Hn.overEvery=dl,Hn.overSome=fl,Hn.partial=zs,Hn.partialRight=Fs,Hn.partition=Os,Hn.pick=ja,Hn.pickBy=za,Hn.property=hl,Hn.propertyOf=function(e){return function(n){return null==e?t:Sr(e,n)}},Hn.pull=Qi,Hn.pullAll=ts,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=es,Hn.range=ml,Hn.rangeRight=gl,Hn.rearg=Hs,Hn.reject=function(t,e){return(qs(t)?Ne:vr)(t,Ps(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 Nt(e);return Xr(n,r=r===t?r:ga(r))},Hn.reverse=ns,Hn.sampleSize=function(e,n,r){return n=(r?wi(e,n,r):n===t)?1:ga(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:ga(n),r=r===t?o:ga(r)),oo(e,n,r)):[]},Hn.sortBy=Cs,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?f:r>>>0)?(e=ba(e))&&("string"==typeof n||null!=n&&!aa(n))&&!(n=uo(n))&&sn(e)?xo(fn(e),0,r):e.split(n,r):[]},Hn.spread=function(t,n){if("function"!=typeof t)throw new Nt(e);return n=null==n?0:_n(ga(n),0),Xr((function(e){var r=e[n],o=xo(e,0,n);return r&&$e(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:ga(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:ga(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 Nt(e);return na(r)&&(o="leading"in r?!!r.leading:o,i="trailing"in r?!!r.trailing:i),$s(t,n,{leading:o,maxWait:n,trailing:i})},Hn.thru=ms,Hn.toArray=ha,Hn.toPairs=Fa,Hn.toPairsIn=Ha,Hn.toPath=function(t){return qs(t)?Ie(t,zi):ua(t)?[t]:Mo(ji(ba(t)))},Hn.toPlainObject=_a,Hn.transform=function(t,e,n){var r=qs(t),o=r||Ys(t)||pa(t);if(e=ui(e,4),null==n){var i=t&&t.constructor;n=o?r?new i:[]:na(t)&&Qs(i)?Vn(qt(t)):{}}return(o?Oe:wr)(t,(function(t,r,o){return e(n,t,r,o)})),n},Hn.unary=function(t){return Ns(t,1)},Hn.union=rs,Hn.unionBy=os,Hn.unionWith=is,Hn.uniq=function(t){return t&&t.length?po(t):[]},Hn.uniqBy=function(t,e){return t&&t.length?po(t,ui(e,2)):[]},Hn.uniqWith=function(e,n){return n="function"==typeof n?n:t,e&&e.length?po(e,t,n):[]},Hn.unset=function(t,e){return null==t||fo(t,e)},Hn.unzip=ss,Hn.unzipWith=as,Hn.update=function(t,e,n){return null==t?t:ho(t,e,bo(n))},Hn.updateWith=function(e,n,r,o){return o="function"==typeof o?o:t,null==e?e:ho(e,n,bo(r),o)},Hn.values=Va,Hn.valuesIn=function(t){return null==t?[]:Xe(t,Da(t))},Hn.without=ls,Hn.words=Qa,Hn.wrap=function(t,e){return zs(bo(e),t)},Hn.xor=cs,Hn.xorBy=us,Hn.xorWith=ps,Hn.zip=ds,Hn.zipObject=function(t,e){return yo(t||[],e||[],nr)},Hn.zipObjectDeep=function(t,e){return yo(t||[],e||[],to)},Hn.zipWith=fs,Hn.entries=Fa,Hn.entriesIn=Ha,Hn.extend=ka,Hn.extendWith=xa,cl(Hn,Hn),Hn.add=bl,Hn.attempt=tl,Hn.camelCase=Ba,Hn.capitalize=Wa,Hn.ceil=wl,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,$a(e))},Hn.deburr=Ua,Hn.defaultTo=function(t,e){return null==t||t!=t?e:t},Hn.divide=kl,Hn.endsWith=function(e,n,r){e=ba(e),n=uo(n);var o=e.length,i=r=r===t?o:lr(ga(r),0,o);return(r-=n.length)>=0&&e.slice(r,i)==n},Hn.eq=Vs,Hn.escape=function(t){return(t=ba(t))&&J.test(t)?t.replace(q,rn):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=Ui,Hn.findKey=function(t,e){return je(t,ui(e,3),wr)},Hn.findLast=_s,Hn.findLastIndex=qi,Hn.findLastKey=function(t,e){return je(t,ui(e,3),kr)},Hn.floor=xl,Hn.forEach=bs,Hn.forEachRight=ws,Hn.forIn=function(t,e){return null==t?t:_r(t,ui(e,3),Da)},Hn.forInRight=function(t,e){return null==t?t:br(t,ui(e,3),Da)},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=Aa,Hn.gt=Bs,Hn.gte=Ws,Hn.has=function(t,e){return null!=t&&vi(t,e,Ar)},Hn.hasIn=Na,Hn.head=Ji,Hn.identity=il,Hn.includes=function(t,e,n,r){t=Js(t)?t:Va(t),n=n&&!r?ga(n):0;var o=t.length;return n<0&&(n=_n(o+n,0)),ca(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:ga(n);return o<0&&(o=_n(r+o,0)),Fe(t,e,o)},Hn.inRange=function(e,n,r){return n=ma(n),r===t?(r=n,n=0):r=ma(r),function(t,e,n){return t>=bn(e,n)&&t<_n(e,n)}(e=ya(e),n,r)},Hn.invoke=Ia,Hn.isArguments=Us,Hn.isArray=qs,Hn.isArrayBuffer=Ks,Hn.isArrayLike=Js,Hn.isArrayLikeObject=Gs,Hn.isBoolean=function(t){return!0===t||!1===t||ra(t)&&Or(t)==v},Hn.isBuffer=Ys,Hn.isDate=Xs,Hn.isElement=function(t){return ra(t)&&1===t.nodeType&&!sa(t)},Hn.isEmpty=function(t){if(null==t)return!0;if(Js(t)&&(qs(t)||"string"==typeof t||"function"==typeof t.splice||Ys(t)||pa(t)||Us(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(Lt.call(t,n))return!1;return!0},Hn.isEqual=function(t,e){return $r(t,e)},Hn.isEqualWith=function(e,n,r){var o=(r="function"==typeof r?r:t)?r(e,n):t;return o===t?$r(e,n,t,r):!!o},Hn.isError=Zs,Hn.isFinite=function(t){return"number"==typeof t&&Ue(t)},Hn.isFunction=Qs,Hn.isInteger=ta,Hn.isLength=ea,Hn.isMap=oa,Hn.isMatch=function(t,e){return t===e||Dr(t,e,di(e))},Hn.isMatchWith=function(e,n,r){return r="function"==typeof r?r:t,Dr(e,n,di(n),r)},Hn.isNaN=function(t){return ia(t)&&t!=+t},Hn.isNative=function(t){if(Si(t))throw new xt("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Lr(t)},Hn.isNil=function(t){return null==t},Hn.isNull=function(t){return null===t},Hn.isNumber=ia,Hn.isObject=na,Hn.isObjectLike=ra,Hn.isPlainObject=sa,Hn.isRegExp=aa,Hn.isSafeInteger=function(t){return ta(t)&&t>=-9007199254740991&&t<=p},Hn.isSet=la,Hn.isString=ca,Hn.isSymbol=ua,Hn.isTypedArray=pa,Hn.isUndefined=function(e){return e===t},Hn.isWeakMap=function(t){return ra(t)&&gi(t)==T},Hn.isWeakSet=function(t){return ra(t)&&"[object WeakSet]"==Or(t)},Hn.join=function(t,e){return null==t?"":vn.call(t,e)},Hn.kebabCase=qa,Hn.last=Zi,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=ga(r))<0?_n(o+i,0):bn(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):ze(e,Ve,i,!0)},Hn.lowerCase=Ka,Hn.lowerFirst=Ja,Hn.lt=da,Hn.lte=fa,Hn.max=function(e){return e&&e.length?gr(e,il,Cr):t},Hn.maxBy=function(e,n){return e&&e.length?gr(e,ui(n,2),Cr):t},Hn.mean=function(t){return Be(t,il)},Hn.meanBy=function(t,e){return Be(t,ui(e,2))},Hn.min=function(e){return e&&e.length?gr(e,il,zr):t},Hn.minBy=function(e,n){return e&&e.length?gr(e,ui(n,2),zr):t},Hn.stubArray=vl,Hn.stubFalse=yl,Hn.stubObject=function(){return{}},Hn.stubString=function(){return""},Hn.stubTrue=function(){return!0},Hn.multiply=Sl,Hn.nth=function(e,n){return e&&e.length?Wr(e,ga(n)):t},Hn.noConflict=function(){return de._===this&&(de._=Ft),this},Hn.noop=ul,Hn.now=As,Hn.pad=function(t,e,n){t=ba(t);var r=(e=ga(e))?dn(t):0;if(!e||r>=e)return t;var o=(e-r)/2;return qo(ge(o),n)+t+qo(he(o),n)},Hn.padEnd=function(t,e,n){t=ba(t);var r=(e=ga(e))?dn(t):0;return e&&r<e?t+qo(e-r,n):t},Hn.padStart=function(t,e,n){t=ba(t);var r=(e=ga(e))?dn(t):0;return e&&r<e?qo(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=ma(e),n===t?(n=e,e=0):n=ma(n)),e>n){var o=e;e=n,n=o}if(r||e%1||n%1){var i=xn();return bn(e+i*(n-e+le("1e-"+((i+"").length-1))),n)}return Gr(e,n)},Hn.reduce=function(t,e,n){var r=qs(t)?De:qe,o=arguments.length<3;return r(t,ui(e,4),n,o,fr)},Hn.reduceRight=function(t,e,n){var r=qs(t)?Le:qe,o=arguments.length<3;return r(t,ui(e,4),n,o,hr)},Hn.repeat=function(e,n,r){return n=(r?wi(e,n,r):n===t)?1:ga(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=Qs(s)?s.call(e):s}return e},Hn.round=El,Hn.runInContext=s,Hn.sample=function(t){return(qs(t)?Zn:Zr)(t)},Hn.size=function(t){if(null==t)return 0;if(Js(t))return ca(t)?dn(t):t.length;var e=gi(t);return e==k||e==C?t.size:Pr(t).length},Hn.snakeCase=Ga,Hn.some=function(e,n,r){var o=qs(e)?Re: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&&Vs(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(Vs(t[n],e))return n}return-1},Hn.startCase=Ya,Hn.startsWith=function(t,e,n){return t=ba(t),n=null==n?0:lr(ga(n),0,t.length),e=uo(e),t.slice(n,n+e.length)==e},Hn.subtract=Ol,Hn.sum=function(t){return t&&t.length?Ke(t,il):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=xa({},n,o,ti);var i,s,a=xa({},n.imports,o.imports,ti),l=$a(a),c=Xe(a,l),u=0,p=n.interpolate||_t,d="__p += '",f=Ct((n.escape||_t).source+"|"+p.source+"|"+(p===X?pt:_t).source+"|"+(n.evaluate||_t).source+"|$","g"),h="//# sourceURL="+(Lt.call(n,"sourceURL")?(n.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++oe+"]")+"\n";e.replace(f,(function(t,n,r,o,a,l){return r||(r=o),d+=e.slice(u,l).replace(bt,on),n&&(i=!0,d+="' +\n__e("+n+") +\n'"),a&&(s=!0,d+="';\n"+a+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),u=l+t.length,t})),d+="';\n";var m=Lt.call(n,"variable")&&n.variable;if(m){if(ct.test(m))throw new xt("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(s?d.replace(V,""):d).replace(B,"$1").replace(W,"$1;"),d="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var g=tl((function(){return St(l,h+"return "+d).apply(t,c)}));if(g.source=d,Zs(g))throw g;return g},Hn.times=function(t,e){if((t=ga(t))<1||t>p)return[];var n=f,r=bn(t,f);e=ui(e),t-=f;for(var o=Je(r,e);++n<t;)e(n);return o},Hn.toFinite=ma,Hn.toInteger=ga,Hn.toLength=va,Hn.toLower=function(t){return ba(t).toLowerCase()},Hn.toNumber=ya,Hn.toSafeInteger=function(t){return t?lr(ga(t),-9007199254740991,p):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=fn(e),i=fn(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,hn(e)+1);if(!e||!(n=uo(n)))return e;var o=fn(e);return xo(o,0,tn(o,fn(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=fn(e);return xo(o,Qe(o,fn(n))).join("")},Hn.truncate=function(e,n){var r=30,o="...";if(na(n)){var i="separator"in n?n.separator:i;r="length"in n?ga(n.length):r,o="omission"in n?uo(n.omission):o}var s=(e=ba(e)).length;if(sn(e)){var a=fn(e);s=a.length}if(r>=s)return e;var l=r-dn(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),aa(i)){if(e.slice(l).search(i)){var u,p=c;for(i.global||(i=Ct(i.source,ba(dt.exec(i))+"g")),i.lastIndex=0;u=i.exec(p);)var d=u.index;c=c.slice(0,d===t?l:d)}}else if(e.indexOf(uo(i),l)!=l){var f=c.lastIndexOf(i);f>-1&&(c=c.slice(0,f))}return c+o},Hn.unescape=function(t){return(t=ba(t))&&K.test(t)?t.replace(U,mn):t},Hn.uniqueId=function(t){var e=++Rt;return ba(t)+e},Hn.upperCase=Xa,Hn.upperFirst=Za,Hn.each=bs,Hn.eachRight=ws,Hn.first=Ji,cl(Hn,(_l={},wr(Hn,(function(t,e){Lt.call(Hn.prototype,e)||(_l[e]=t)})),_l),{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){Un.prototype[e]=function(r){r=r===t?1:_n(ga(r),0);var o=this.__filtered__&&!n?new Un(this):this.clone();return o.__filtered__?o.__takeCount__=bn(r,o.__takeCount__):o.__views__.push({size:bn(r,f),type:e+(o.__dir__<0?"Right":"")}),o},Un.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;Un.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":"");Un.prototype[t]=function(){return this[n](1).value()[0]}})),Oe(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");Un.prototype[t]=function(){return this.__filtered__?new Un(this):this[n](1)}})),Un.prototype.compact=function(){return this.filter(il)},Un.prototype.find=function(t){return this.filter(t).head()},Un.prototype.findLast=function(t){return this.reverse().find(t)},Un.prototype.invokeMap=Xr((function(t,e){return"function"==typeof t?new Un(this):this.map((function(n){return Mr(n,t,e)}))})),Un.prototype.reject=function(t){return this.filter(Ps(ui(t)))},Un.prototype.slice=function(e,n){e=ga(e);var r=this;return r.__filtered__&&(e>0||n<0)?new Un(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),n!==t&&(r=(n=ga(n))<0?r.dropRight(-n):r.take(n-e)),r)},Un.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Un.prototype.toArray=function(){return this.take(f)},wr(Un.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 Un,c=a[0],u=l||qs(n),p=function(t){var e=i.apply(Hn,$e([t],a));return o&&d?e[0]:e};u&&r&&"function"==typeof c&&1!=c.length&&(l=u=!1);var d=this.__chain__,f=!!this.__actions__.length,h=s&&!d,m=l&&!f;if(!s&&u){n=m?n:new Un(this);var g=e.apply(n,a);return g.__actions__.push({func:ms,args:[p],thisArg:t}),new Wn(g,d)}return h&&m?e.apply(this,a):(g=this.thru(p),h?o?g.value()[0]:g.value():g)})})),Oe(["pop","push","shift","sort","splice","unshift"],(function(t){var e=Tt[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(Un.prototype,(function(t,e){var n=Hn[e];if(n){var r=n.name+"";Lt.call(In,r)||(In[r]=[]),In[r].push({name:e,func:n})}})),In[Vo(t,2).name]=[{name:"wrapper",func:t}],Un.prototype.clone=function(){var t=new Un(this.__wrapped__);return t.__actions__=Mo(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Mo(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Mo(this.__views__),t},Un.prototype.reverse=function(){if(this.__filtered__){var t=new Un(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Un.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=bn(e,t+s);break;case"takeRight":t=_n(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__,p=u.length,d=0,f=bn(l,this.__takeCount__);if(!n||!r&&o==l&&f==l)return go(t,this.__actions__);var h=[];t:for(;l--&&d<f;){for(var m=-1,g=t[c+=e];++m<p;){var v=u[m],y=v.iteratee,_=v.type,b=y(g);if(2==_)g=b;else if(!b){if(1==_)continue t;break t}}h[d++]=g}return h},Hn.prototype.at=gs,Hn.prototype.chain=function(){return hs(this)},Hn.prototype.commit=function(){return new Wn(this.value(),this.__chain__)},Hn.prototype.next=function(){this.__values__===t&&(this.__values__=ha(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?t:this.__values__[this.__index__++]}},Hn.prototype.plant=function(e){for(var n,r=this;r instanceof Bn;){var o=Hi(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 Un){var n=e;return this.__actions__.length&&(n=new Un(this)),(n=n.reverse()).__actions__.push({func:ms,args:[ns],thisArg:t}),new Wn(n,this.__chain__)}return this.thru(ns)},Hn.prototype.toJSON=Hn.prototype.valueOf=Hn.prototype.value=function(){return go(this.__wrapped__,this.__actions__)},Hn.prototype.first=Hn.prototype.head,Qt&&(Hn.prototype[Qt]=function(){return this}),Hn}();he?((he.exports=gn)._=gn,fe._=gn):de._=gn}.call(s);const um=Fp.create({name:"node_processor",addCommands:()=>({setBlockAttributes:Th((({commands:t,state:e},n,r,o={})=>{const i=je(t.getBlockAttributes(n))??{},{doc:s,tr:a}=e,{from:l,to:c}=a.selection;s.nodesBetween(l,c,((t,e)=>{Fd.blocks.includes(t.type.name)&&a.setNodeAttribute(e,n,{...o,...i,...r})}))})),getBlockAttributes:Th((({editor:t},e,n)=>He((()=>{let r=Object.assign({},n||{});for(const n of Fd.blocks)Object.assign(r,t.getAttributes(n)?.[e]||{});return Object.keys(r).length?r:null})))),removeBlockAttributes:Th((({commands:t},e)=>{for(const n of Fd.blocks)t.resetAttributes(n,e)})),applyMark:Th((({state:t,commands:e},n,r,o={})=>{const{tr:i,doc:s,schema:a}=t,{$from:l,$to:c}=i.selection,u=Up(Vd.LINK,a),p=Up(n,a);if(!(p.spec.group||"").includes(Bd.SETTINGS))return e.setMark(n,r);if(l.pos===c.pos)return;s.nodesBetween(l.pos,c.pos,((t,s)=>{if(t.type.name===Fd.LIST)return;const a=function(t,e){const n="string"==typeof e?e:e.name;return t.find((t=>t.type.name===n))}(t.marks,n),d=p.create({...a?.attrs||{},...r}),f=rm(l,c,t,s),h=!u.isInSet(t.marks)&&function(t,e,n,r=im){const o=t.resolve(e).path.reverse();for(const t of o)if("number"!=typeof t)for(const e of t.marks)if(r(e,n))return!0;return!1}(i.doc,s,d,o.isAppliedToParent);if(h)return(t=>{if(!o.onAppliedToParent||!1===o.onAppliedToParent(t)){const{tr:n,node:r,position:o,mark:i}=t;e._removeNodeMark({tr:n,node:r,position:o,mark:i.type})}})({tr:i,node:t,position:s,mark:d});t.isText?i.addMark(f.from,f.to,d):function(t,e,n,r){const o=om(t,r),i=e.from-o<=r,s=e.to+o>=n.nodeSize+r;return i&&s}(i.doc,i.selection,t,s)&&i.addNodeMark(s,d)}))})),getMarks:Th((({editor:t},e)=>{const n=Fe(t,"state");return He((()=>{const{selection:t,doc:r}=je(n),{from:o,to:i}=je(t),s=[];return r.nodesBetween(o,i,(t=>{for(const n of t.marks)n.type.name===e&&s.unshift(n.attrs)})),s}))})),getMark:Th((({commands:t},e)=>{const n=t.getMarks(e);return He((()=>je(n)[0]??null))})),hasMark:Th((({commands:t},e)=>{const n=t.getMark(e);return He((()=>!!je(n)))})),getCommonSettingMark:Th((({commands:t},e,n)=>{const r=t.getMark(e);return He((()=>je(r)?.value??je(n)))})),getDeviceSettingMark:Th((({commands:t},e,n)=>{const r=t.getMarks(e),o=t.getDevice();return He((()=>{for(const t of je(r)){const e=t[je(o)];if(e)return e}return je(n)}))})),removeAllMarks:Th((({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:Th((({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:Th(((t,{tr:e,node:n,position:r,mark:o})=>n.isText?e.removeMark(r,r+n.nodeSize,o):e.removeNodeMark(r,o)))})}),pm=Fp.create({name:"text_processor",addCommands:()=>({getSelectedText:Th((({state:t})=>{const{from:e,to:n}=t.selection;return t.doc.textBetween(e,n," ")})),transformText:Th((({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=rm(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)}))}))})}),dm=Fp.create({name:"selection_processor",addStorage:()=>({selection:null}),addCommands(){return{storeSelection:Th((({state:t})=>{this.storage.selection=t.selection})),restoreSelection:Th((({commands:t})=>{this.storage.selection&&t.setTextSelection(this.storage.selection)})),expandSelection:Th((({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:om(t.doc,i);r=Math.min(r,i+n),o=Math.max(o,i+e.nodeSize-n)}})),e.setTextSelection({from:r,to:o})})),expandSelectionToBlock:Th((({commands:t})=>{t.expandSelection((({parent:t})=>t.type.name===Fd.DOCUMENT))}))}}}),fm=fd.create({name:"doc",topNode:!0,content:"block+"}).extend({marks:Bd.SETTINGS,onCreate(){this.editor.view.dom.addEventListener("click",(t=>{t.target.closest("a")&&t.preventDefault()}))}}),hm=fd.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:t}){return["p",kp(this.options.HTMLAttributes,t),0]},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),mm=hm.extend({marks:Bd.ALL,addOptions:()=>({HTMLAttributes:{class:"zw-style"}})}),gm=fd.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]}`,kp(this.options.HTMLAttributes,e),0]},addCommands(){return{setHeading:t=>({commands:e})=>!!this.options.levels.includes(t.level)&&e.setNode(this.name,t),toggleHeading:t=>({commands:e})=>!!this.options.levels.includes(t.level)&&e.toggleNode(this.name,"paragraph",t)}},addKeyboardShortcuts(){return this.options.levels.reduce(((t,e)=>({...t,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})})),{})},addInputRules(){return this.options.levels.map((t=>function(t){return new Mp({find:t.find,handler:({state:e,range:n,match:r})=>{const o=e.doc.resolve(n.from),i=Sp(t.getAttributes,void 0,r)||{};if(!o.node(-1).canReplaceWith(o.index(-1),o.indexAfter(-1),t.type))return null;e.tr.delete(n.from,n.to).setBlockType(n.from,n.from,t.type,i)}})}({find:new RegExp(`^(#{1,${t}})\\s$`),type:this.type,getAttributes:{level:t}})))}}),vm=gm.extend({marks:Bd.ALL,addOptions:()=>({levels:[1,2,3,4],HTMLAttributes:{class:"zw-style"}})}),ym=Fp.create({name:"prose_mirror_plugins",addProseMirrorPlugins(){return[Kd.create(this.editor),Jd.create(this.editor)]}}),_m=dd.create({name:Vd.FONT_FAMILY,group:Bd.SETTINGS,addOptions:()=>({fonts:[]}),addAttributes:()=>({value:{required:!0}}),addCommands(){return{applyFontFamily:Th((({commands:t},e)=>{t.applyMark(this.name,{value:e});const n=t.findFontByName(e);let r=je(t.getFontWeight());n.isWeightSupported(r)||(r=n.findClosestWeight(r),t.applyFontWeight(r)),n.isItalicSupported(r)||t.removeItalic()})),getFont:Th((({commands:t})=>{const e=je(this.options.defaultPreset),n=t.findFontByName(e.common.font_family),r=t.getFontFamily();return He((()=>t.findFontByName(je(r))||n))})),findFontByName:Th(((t,e)=>this.options.fonts.find((t=>t.name===e)))),getFontFamily:Th((({commands:t})=>t.getCommonSettingMark(this.name,t.getDefaultFontFamily()))),getDefaultFontFamily:Th((({commands:t})=>{const e=t.getPreset();return He((()=>je(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})=>Ih({font_family:t.value?`"${t.value}"`:null})}),bm=Fp.create({name:Vd.STYLE_PRESET,addGlobalAttributes(){return[{types:[Fd.PARAGRAPH,Fd.HEADING],attributes:{preset:{isRequired:!1,default:{id:this.options.defaultId},parseHTML:t=>{const e=je(this.options.presets);if("LI"===t.parentElement.tagName)return null;for(const{id:n,node:r,fallbackClass:o}of e){if(o&&t.classList.contains(o))return{id:n};const e=this.options.styleRenderer.makePresetCssClass({id:n});if(t.matches(e))return{id:n};if(t.tagName===`H${r?.level}`)return{id:n}}return"P"===t.tagName?{id:this.options.defaultId}:null},renderHTML:t=>t.preset?{class:this.options.styleRenderer.makePresetHtmlClass(t.preset)}:null}}}]},addCommands(){function t(t,e){return t.find((t=>e===t.id))}function e(t,e){const n={};for(const r of Object.keys(t)){const o=t[r],i=e[r],s=!i||"inherit"===i.toLowerCase();n[r]=s?o:i}return n}return{getPresetList:Th((()=>He((()=>this.options.presets.filter((t=>!t.hidden)))))),getPreset:Th((({commands:n})=>{const r=n.getBlockAttributes("preset",{id:this.options.defaultId}),o=n.getPresetList(),i=n.isLink(),s=n.getLinkPreset();return He((()=>{const n=t(je(o),je(r).id);if(!je(i))return n;const a=je(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:Th((({commands:e,chain:n},r)=>{const o=t(je(e.getPresetList()),r),i=o.node?.type??Fd.PARAGRAPH,s={preset:{id:r}};o.node&&(s.level=o.node.level);for(const t of Vd.attributes)s[t]=je(e.getBlockAttributes(t));n().removeList().setNode(i,s).run()})),applyDefaultPreset:Th((({commands:t})=>{t.applyPreset(this.options.defaultId)})),removePreset:Th((({commands:t})=>{t.setNode(Fd.PARAGRAPH,{preset:null})})),getPresetCustomization:Th((({editor:t,commands:e})=>{const n=Fe(t,"state");return He((()=>{const{selection:t,doc:r}=je(n),{from:o,to:i}=t;return e._getSettingCustomization(r,o,i)}))})),isSettingCustomized:Th((({commands:t},e)=>{const n=t.getPresetCustomization(),r=Vd.presetAttributes.includes(e)?"attributes":"marks";return He((()=>je(n)[r]?.includes(e)??!1))})),getContentCustomization:Th((({editor:t,commands:e})=>{const n=Fe(t,"state");return He((()=>{const{doc:t}=je(n);return e._getSettingCustomization(t,0,t.content.size)}))})),_getSettingCustomization:Th(((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)){Vd.presetAttributes.includes(e)&&n&&i.add(e)}for(const{type:e}of t.marks)Vd.marks.includes(e.name)&&o.add(e.name)})),{attributes:Array.from(i),marks:Array.from(o)}})),removePresetCustomization:Th((({chain:t})=>{t().storeSelection().expandSelectionToBlock().removeMarks(Vd.marks).resetAttributes(Fd.PARAGRAPH,Vd.presetAttributes).resetAttributes(Fd.HEADING,Vd.presetAttributes).restoreSelection().run()})),removeFormat:Th((({chain:t})=>{t().storeSelection().expandSelectionToBlock().removeAllMarks().applyDefaultPreset().restoreSelection().run()}))}},onCreate(){this.options.styleRenderer.inject(qm.head,this.options.presets)}}),wm=dd.create({name:Vd.FONT_WEIGHT,group:Bd.SETTINGS,addAttributes:()=>({value:{required:!0}}),addCommands(){return{applyFontWeight:Th((({commands:t},e)=>{t.applyMark(this.name,{value:e});je(t.getFont()).isItalicSupported(e)||t.removeItalic()})),toggleBold:Th((({commands:t})=>{const e=je(t.getFontWeight()),n=je(t.getFont()),r=Number(e)>=600?"400":"700",o=n.findClosestWeight(r);t.applyFontWeight(o)})),getFontWeight:Th((({commands:t})=>{const e=t.getCommonSettingMark(this.name,t.getDefaultFontWeight()),n=t.getFont();return He((()=>{const t=je(e),r=je(n);return r.isWeightSupported(t)?t:r.findClosestWeight(t)}))})),getDefaultFontWeight:Th((({commands:t})=>{const e=t.getPreset();return He((()=>je(e).common.font_weight))}))}},addKeyboardShortcuts:()=>({"Mod-b":$h("toggleBold"),"Mod-B":$h("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})=>Ih({font_weight:t.value})}),km=dd.create({name:Vd.FONT_SIZE,group:Bd.SETTINGS,addOptions:()=>({minSize:1,maxSize:100}),addAttributes:()=>({mobile:{default:null},tablet:{default:null},desktop:{default:null}}),addCommands(){return{getFontSize:Th((({commands:t})=>t.getDeviceSettingMark(this.name,t.getDefaultFontSize()))),getDefaultFontSize:Th((({commands:t})=>{const e=t.getDevice(),n=t.getPreset();return He((()=>je(n)[je(e)].font_size.replace("px","")))})),applyFontSize:Th((({commands:t},e)=>{const n=je(t.getDevice());t.applyMark(this.name,{[n]:e},{isAppliedToParent:(t,e)=>t.type.name===e.type.name&&t.attrs[n]===e.attrs[n],onAppliedToParent:({tr:t,node:e,position:r,mark:o})=>{const i={...o.attrs,[n]:null},s=!Object.values(i).some((t=>!!t));if(s)return!1;const a=o.type.create(i);e.isText?t.addMark(r,r+e.nodeSize,a):t.addNodeMark(r,a)}})})),increaseFontSize:Th((({commands:t})=>{const e=Number(je(t.getFontSize())),n=Math.min(e+1,this.options.maxSize);t.applyFontSize(String(n))})),decreaseFontSize:Th((({commands:t})=>{const e=Number(je(t.getFontSize())),n=Math.max(e-1,this.options.minSize);t.applyFontSize(String(n))}))}},addKeyboardShortcuts:()=>({"Mod-Shift-=":$h("increaseFontSize"),"Mod-Shift--":$h("decreaseFontSize")}),parseHTML(){const t=t=>{if(!t)return null;const e=tm(t,je(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 Ih({font_size_mobile:e(t.mobile),font_size_tablet:e(t.tablet),font_size_desktop:e(t.desktop)})}}),xm=dd.create({name:Vd.FONT_COLOR,group:Bd.SETTINGS,addAttributes:()=>({value:{required:!0}}),addCommands(){return{getFontColor:Th((({commands:t})=>t.getCommonSettingMark(this.name,t.getDefaultFontColor()))),getDefaultFontColor:Th((({commands:t})=>{const e=t.getPreset();return He((()=>je(e).common.color))})),applyFontColor:Th((({commands:t},e)=>{t.applyMark(this.name,{value:e})}))}},parseHTML(){const t=t=>({value:Qh(t)});return[{style:"--zw-font-color",getAttrs:t},{style:"color",getAttrs:t}]},renderHTML:({HTMLAttributes:t})=>Ih({font_color:t.value})}),Sm=dd.create({name:Vd.BACKGROUND_COLOR,addAttributes:()=>({value:{required:!0}}),addCommands(){return{getBackgroundColor:Th((({commands:t})=>t.getCommonSettingMark(this.name,"rgba(255, 255, 255, 0%)"))),applyBackgroundColor:Th((({commands:t},e)=>{t.applyMark(this.name,{value:e})}))}},parseHTML(){const t=t=>({value:Qh(t)});return[{style:"--zw-background-color",getAttrs:t},{style:"background-color",getAttrs:t}]},renderHTML:({HTMLAttributes:t})=>Ih({background_color:t.value})}),Em=Fp.create({name:"device_manager",addCommands(){return{getDevice:Th((()=>Fe(this.options,"device")))}}}),Om=dd.create({name:Vd.FONT_STYLE,group:Bd.SETTINGS,addAttributes:()=>({italic:{required:!0}}),addCommands(){return{isItalic:Th((({commands:t})=>{const e=t.getMark(this.name),n=t.getDefaultFontStyle();return He((()=>je(e)?.italic??je(n).italic))})),isItalicAvailable:Th((({commands:t})=>{const e=t.getFont(),n=t.getFontWeight();return He((()=>{const t=je(e),r=je(n);return t.isItalicSupported(r)&&!t.isWeightItalicOnly(r)}))})),getDefaultFontStyle:Th((({commands:t})=>{const e=t.getPreset();return He((()=>({italic:"italic"===je(e).common.font_style})))})),toggleItalic:Th((({commands:t})=>{je(t.isItalicAvailable())&&(je(t.isItalic())?t.removeItalic():t.applyItalic())})),applyItalic:Th((({commands:t})=>{t.applyMark(this.name,{italic:!0})})),removeItalic:Th((({commands:t})=>{t.applyMark(this.name,{italic:!1})}))}},addKeyboardShortcuts:()=>({"Mod-i":$h("toggleItalic"),"Mod-I":$h("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})=>Ih({font_style:t.italic?"italic":"normal"})}),Cm=dd.create({name:Vd.TEXT_DECORATION,priority:1e3,addAttributes:()=>({underline:{default:!1},strike_through:{default:!1}}),addCommands(){return{isUnderline:Th((({commands:t})=>{const e=t.getTextDecoration();return He((()=>je(e).underline))})),isStrikeThrough:Th((({commands:t})=>{const e=t.getTextDecoration();return He((()=>je(e).strike_through))})),getTextDecoration:Th((({commands:t})=>{const e=t.getMark(this.name),n=t.getDefaultTextDecoration();return He((()=>{const t=je(e)??{},r=je(n);return{underline:t.underline||r.underline,strike_through:t.strike_through||r.strike_through}}))})),isUnderlineCustomized:Th((({commands:t})=>{const e=t.isUnderline(),n=t.getDefaultTextDecoration();return He((()=>je(e)!==je(n).underline))})),getDefaultTextDecoration:Th((({commands:t})=>{const e=t.getPreset();return He((()=>{const{text_decoration:t}=je(e).common;return{underline:t.includes("underline"),strike_through:t.includes("line-through")}}))})),toggleUnderline:Th((({commands:t})=>{t.toggleTextDecoration("underline")})),toggleStrikeThrough:Th((({commands:t})=>{t.toggleTextDecoration("strike_through")})),toggleTextDecoration:Th((({commands:t},e,n=null)=>{const r=je(t.getTextDecoration()),o=n??!r[e];t.applyMark(this.name,{[e]:o})})),applyTextDecoration:Th((({commands:t},e)=>{t.toggleTextDecoration(e,!0)})),removeTextDecoration:Th((({commands:t},e)=>{t.toggleTextDecoration(e,!1)}))}},addKeyboardShortcuts:()=>({"Mod-u":$h("toggleUnderline"),"Mod-U":$h("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"),Ih({text_decoration:e.join(" ")})}}),Am=Fp.create({name:"case_style",addCommands:()=>({applyCaseStyle:Th((({commands:t},e)=>{switch(e){case jd.CAPITALIZE:return t.applyCapitalize();case jd.LOWERCASE:return t.applyLowerCase();case jd.UPPERCASE:return t.applyUpperCase()}})),applyCapitalize:Th((({commands:t})=>{t.transformText((({text:t})=>function(t){return t.toLowerCase().replace(/(?:^|\s)\S/g,(t=>t.toUpperCase()))}(t)))})),applyLowerCase:Th((({commands:t})=>{t.transformText((({text:t})=>t.toLowerCase()))})),applyUpperCase:Th((({commands:t})=>{t.transformText((({text:t})=>t.toUpperCase()))}))})}),Nm={mobile:null,tablet:null,desktop:null},Tm=Fp.create({name:Vd.ALIGNMENT,addGlobalAttributes:()=>[{types:[Fd.PARAGRAPH,Fd.HEADING],attributes:{[Vd.ALIGNMENT]:{isRequired:!1,parseHTML({style:t}){const e=function(t){const e=nm[t]||t;return zd.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?Mh({alignment_mobile:t.alignment.mobile,alignment_tablet:t.alignment.tablet,alignment_desktop:t.alignment.desktop}):null}}}],addCommands(){return{applyAlignment:Th((({commands:t},e)=>{const n=je(t.getDevice());t.setBlockAttributes(this.name,{[n]:e},Nm)})),removeAlignment:Th((({commands:t})=>t.removeBlockAttributes(this.name))),getAlignment:Th((({commands:t})=>{const e=t.getBlockAttributes(this.name,Nm),n=t.getDevice(),r=t.getDefaultAlignment();return He((()=>je(e)?.[je(n)]??je(r)))})),getDefaultAlignment:Th((({commands:t})=>{const e=t.getDevice(),n=t.getPreset();return He((()=>je(n)[je(e)].alignment??zd.LEFT))}))}},addKeyboardShortcuts:()=>({"Mod-Shift-l":$h("applyAlignment",zd.LEFT),"Mod-Shift-e":$h("applyAlignment",zd.CENTER),"Mod-Shift-r":$h("applyAlignment",zd.RIGHT),"Mod-Shift-j":$h("applyAlignment",zd.JUSTIFY)})}),Mm={mobile:null,tablet:null,desktop:null},Im=Fp.create({name:Vd.LINE_HEIGHT,addGlobalAttributes(){return[{types:[Fd.PARAGRAPH,Fd.HEADING],attributes:{[Vd.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=em(e,t,je(this.options.wrapperRef));return n?{desktop:n,tablet:n,mobile:null}:null},renderHTML:t=>t.line_height?Mh({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:Th((({commands:t})=>{const e=t.getBlockAttributes(this.name,Mm),n=t.getDevice(),r=t.getDefaultLineHeight();return He((()=>je(e)?.[je(n)]??je(r)))})),getDefaultLineHeight:Th((({commands:t})=>{const e=t.getDevice(),n=t.getPreset();return He((()=>je(n)[je(e)].line_height))})),applyLineHeight:Th((({commands:t},e)=>{const n=je(t.getDevice());t.setBlockAttributes(this.name,{[n]:e},Mm)}))}}}),$m=fd.create({name:"listItem",addOptions:()=>({HTMLAttributes:{}}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:t}){return["li",kp(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:Fd.LIST_ITEM,marks:Bd.SETTINGS,addCommands(){const t=({selection:t})=>t.$cursor.before(t.$cursor.depth-1);return{listItemNewline:Th((({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,cm(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===Fd.LIST));if(r)return n.listItemNewline()}})}),Dm=fd.create({name:Fd.LIST,content:`${Fd.LIST_ITEM}+`,group:"block list",marks:Bd.SETTINGS,addExtensions:()=>[$m],addOptions:()=>({baseClass:"",presetClass:""}),addAttributes:()=>({bullet:{default:{type:Hd.DISC}}}),parseHTML(){const t={a:Hd.ROMAN,i:Hd.LATIN,1:Hd.DECIMAL},e=e=>{for(const n of Hd.values){const r=`.${this.options.baseClass}${n}`;if(e.matches(r))return n;if(t[e.type.toLowerCase()]===n)return n}};return[{tag:"ol",getAttrs:t=>({bullet:{type:e(t)||Hd.DECIMAL}})},{tag:"ul",getAttrs:t=>({bullet:{type:e(t)||Hd.DISC}})}]},renderHTML({HTMLAttributes:t}){const e=[this.options.baseClass+t.bullet.type,this.options.presetClass];return[Hd.ordered.includes(t.bullet.type)?"ol":"ul",{class:e.join(" ")},0]},addCommands:()=>({getListType:Th((({commands:t})=>{const e=t.getBlockAttributes("bullet",{type:null});return He((()=>je(e).type??null))})),applyList:Th((({commands:t,chain:e},n)=>{if(je(t.getListType())!==n)return e().applyDefaultPreset().toggleList(Fd.LIST,Fd.LIST_ITEM).setBlockAttributes("bullet",{type:n}).command((({commands:t,tr:e})=>t._bubbleListItemMarks(e))).run();t.removeList()})),_bubbleListItemMarks:Th(((t,e)=>{const{doc:n,selection:r}=e,o=r.$from.start(),i=r.$to.end();function s(t,e){if(Vd.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===Fd.LIST)return;if(t.type.name!==Fd.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,cm(i)),r.push(i))})),!1}))})),removeList:Th((({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([Fd.LIST,Fd.LIST_ITEM].includes(t.type.name))return;if(r.type.name!==Fd.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,cm(t));return!1})),t.liftListItem(Fd.LIST_ITEM)}))}),addInputRules(){const t=(t,e)=>function(t){return new Mp({find:t.find,handler:({state:e,range:n,match:r,chain:o})=>{const i=Sp(t.getAttributes,void 0,r)||{},s=e.tr.delete(n.from,n.to),a=s.doc.resolve(n.from).blockRange(),l=a&&yl(a,t.type,i);if(!l)return null;if(s.wrap(a,l),t.keepMarks&&t.editor){const{selection:n,storedMarks:r}=e,{splittableMarks:o}=t.editor.extensionManager,i=r||n.$to.parentOffset&&n.$from.marks();if(i){const t=i.filter((t=>o.includes(t.type.name)));s.ensureMarks(t)}}if(t.keepAttributes){const e="bulletList"===t.type.name||"orderedList"===t.type.name?"listItem":"taskList";o().updateAttributes(e,i).run()}const c=s.doc.resolve(n.from-1).nodeBefore;c&&c.type===t.type&&wl(s.doc,n.from-1)&&(!t.joinPredicate||t.joinPredicate(r,c))&&s.join(n.from-1)}})}({find:e,type:this.type,getAttributes:{bullet:{type:t}},joinPredicate:(e,{attrs:n})=>n.bullet.type===t});return[t(Hd.DISC,/^\s*([-+*])\s$/),t(Hd.DECIMAL,/^(\d+)\.\s$/),t(Hd.LATIN,/^([ivx]{1,3})\.\s$/i),t(Hd.ROMAN,/^([a-z])\.\s$/i)]}});function Lm(t){return new tc({key:new rc("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 Pl(t);return e.forEach((t=>{t.steps.forEach((t=>{n.step(t)}))})),n}(n.doc,[...e]),{mapping:l}=a,c=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}})}))})),od(r)}(a);return c.forEach((({oldRange:e,newRange:o})=>{id(e.from,e.to,n.doc).filter((e=>e.mark.type===t.type)).forEach((e=>{const o=id(l.map(e.from),l.map(e.to),r.doc).filter((e=>e.mark.type===t.type));if(!o.length)return;const i=o[0],a=n.doc.textBetween(e.from,e.to,void 0," "),c=r.doc.textBetween(i.from,i.to,void 0," "),u=Ah(a),p=Ah(c);u&&!p&&s.removeMark(i.from,i.to,t.type)}));const i=function(t,e,n){const r=[];return t.nodesBetween(e.from,e.to,((t,e)=>{n(t)&&r.push({node:t,pos:e})})),r}(r.doc,o,(t=>t.isTextblock));let a,c;if(i.length>1?(a=i[0],c=r.doc.textBetween(a.pos,a.pos+a.node.nodeSize,void 0," ")):i.length&&r.doc.textBetween(o.from,o.to," "," ").endsWith(" ")&&(a=i[0],c=r.doc.textBetween(a.pos,o.to,void 0," ")),a&&c){const e=c.split(" ").filter((t=>""!==t));if(e.length<=0)return!1;const n=e[e.length-1],r=a.pos+c.lastIndexOf(n);if(!n)return!1;Ch(n).filter((t=>t.isLink)).filter((e=>!t.validate||t.validate(e.value))).map((t=>({...t,from:r+t.start+1,to:r+t.end+1}))).forEach((e=>{s.addMark(e.from,e.to,t.type.create({href:e.href}))}))}})),s.steps.length?s:void 0}})}const Rm=dd.create({name:"link",priority:1e3,keepOnSplit:!1,onCreate(){this.options.protocols.forEach((t=>{"string"!=typeof t?Sh(t.scheme,t.optionalSlashes):Sh(t)}))},onDestroy(){af.groups={},xh.scanner=null,xh.parser=null,xh.tokenQueue=[],xh.pluginQueue=[],xh.customSchemes=[],xh.initialized=!1},inclusive(){return this.options.autolink},addOptions:()=>({openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},validate:void 0}),addAttributes(){return{href:{default:null},target:{default:this.options.HTMLAttributes.target},class:{default:this.options.HTMLAttributes.class}}},parseHTML:()=>[{tag:'a[href]:not([href *= "javascript:" i])'}],renderHTML({HTMLAttributes:t}){return["a",kp(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[hd({find:t=>Ch(t).filter((t=>!this.options.validate||this.options.validate(t.value))).filter((t=>t.isLink)).map((t=>({text:t.value,index:t.start,data:t}))),type:this.type,getAttributes:t=>{var e;return{href:null===(e=t.data)||void 0===e?void 0:e.href}}})]},addProseMirrorPlugins(){const t=[];var e;return this.options.autolink&&t.push(Lm({type:this.type,validate:this.options.validate})),this.options.openOnClick&&t.push((e={type:this.type},new tc({key:new rc("handleClickLink"),props:{handleClick:(t,n,r)=>{var o,i,s;if(1!==r.button)return!1;const a=rd(t.state,e.type.name),l=null===(o=r.target)||void 0===o?void 0:o.closest("a"),c=null!==(i=null==l?void 0:l.href)&&void 0!==i?i:a.href,u=null!==(s=null==l?void 0:l.target)&&void 0!==s?s:a.target;return!(!l||!c||(window.open(c,u),0))}}}))),this.options.linkOnPaste&&t.push(function(t){return new tc({key:new rc("handlePasteLink"),props:{handlePaste:(e,n,r)=>{const{state:o}=e,{selection:i}=o,{empty:s}=i;if(s)return!1;let a="";r.content.forEach((t=>{a+=t.textContent}));const l=Ch(a).find((t=>t.isLink&&t.value===a));return!(!a||!l||(t.editor.commands.setMark(t.type,{href:l.href}),0))}}})}({editor:this.editor,type:this.type})),t}}),Pm=Rm.extend({name:Vd.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:Wd.SELF,parseHTML:t=>t.getAttribute("target")||Wd.SELF},destination:{default:Ud.URL,parseHTML:t=>{const e=t.getAttribute("href");if(!e.startsWith("#"))return Ud.URL;const n=e.replace("#","");return je(this.options.pageBlocks).find((t=>t.id===parseInt(n)))?Ud.BLOCK:Ud.URL}}}},addCommands(){const{unsetLink:t}=this.parent();return{removeLink:t,applyLink:Th((({commands:t,chain:e},n)=>(t.setMeta("preventAutolink",!0),t.getSelectedText()?e().applyMark(this.name,n).expandSelectionToLink().command((({tr:t})=>(n.text&&t.insertText(n.text,t.selection.from,t.selection.to),!0))).run():t.insertContent(Jm.text(n.text,[Jm.mark(Vd.LINK,n)]))))),expandSelectionToLink:Th((({commands:t})=>{t.expandSelection((({node:t})=>this.type.isInSet(t.marks)))})),isLink:Th((({commands:t})=>t.hasMark(this.name))),getLinkPreset:Th((()=>He((()=>this.options.preset))))}},addProseMirrorPlugins(){return[...this.parent(),Nh.create(this.editor)]},renderHTML({HTMLAttributes:t}){const e=t.destination===Ud.BLOCK?`#${t.href}`:t.href,n=je(this.options.basePresetClass)+je(this.options.preset).id;return["a",{href:e,target:t.target,class:`${n} zw-style`},0]}}),jm=dd.create({name:Vd.SUPERSCRIPT,addCommands(){return{applySuperscript:Th((({commands:t})=>{t.setMark(this.name)})),removeSuperscript:Th((({commands:t})=>{t.unsetMark(this.name)})),toggleSuperscript:Th((({commands:t})=>{je(t.isSuperscript())?t.removeSuperscript():t.applySuperscript()})),isSuperscript:Th((({commands:t})=>{const e=t.getMark(this.name);return He((()=>!!je(e)))}))}},parseHTML:()=>[{tag:"sup"},{style:"vertical-align",getAttrs:t=>"super"===t&&null}],renderHTML:()=>["sup",{class:"zw-superscript"},0]}),zm=Fp.create({name:Vd.MARGIN,addGlobalAttributes:()=>[{types:[Fd.PARAGRAPH,Fd.HEADING],attributes:{[Vd.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?Mh({margin:t.margin.value}):null}}}]});function Fm(t){const e=e=>t.presetsRef.value.find((t=>t.id===e)),n=function(t){return Me(t,!1),t}({default:null,link:null});return Je(t.presetsRef,(()=>{n.default=e(t.defaultPresetId),n.link=e(t.linkPresetId)}),{immediate:!0}),[fm,mm,vm,md,Rd,um,pm,dm,ym].concat([bm.configure({presets:t.presetsRef,defaultId:t.defaultPresetId,styleRenderer:new Gm({baseClass:t.basePresetClass,makeVariable:t.makePresetVariable,linkPresetId:t.linkPresetId})}),Dm.configure({baseClass:t.baseListClass,presetClass:t.basePresetClass+t.defaultPresetId}),Em.configure({device:t.deviceRef}),km.configure({minSize:t.minFontSize,maxSize:t.maxFontSize,wrapperRef:t.wrapperRef}),_m.configure({fonts:t.fonts,defaultPreset:Fe(n,"default")}),wm,xm,Sm,Om,Cm,Am,jm,Tm,Im.configure({wrapperRef:t.wrapperRef}),Pm.configure({preset:Fe(n,"link"),basePresetClass:t.basePresetClass,pageBlocks:t.pageBlocksRef}),zm])}class Hm{_domParser=new DOMParser;types=window;parse(t){return this._domParser.parseFromString(t,"text/html")}}class Vm{content;constructor({content:t}){this.content=t}normalize(){throw new Error("Implement abstract method")}}class Bm extends Vm{static BLOCK_NODE_NAMES=["P","H1","H2","H3","H4"];static ROOT_NODE_NAMES=Bm.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,Bm.BLOCK_STYLES),e.append(n)};this._assignElementProperties(t,t.parentElement,Bm.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,Bm.BLOCK_STYLES)}_isBlockNode(t){return Bm.BLOCK_NODE_NAMES.includes(t.tagName)}_isRootNode(t){return Bm.ROOT_NODE_NAMES.includes(t.tagName)}_assignElementProperties(t,e,n){for(const r of n){const n=e.style.getPropertyValue(r);n&&!t.style.getPropertyValue(r)&&t.style.setProperty(r,n)}}_removeStyleProperties(t,e){for(const n of e)t.style.removeProperty(n);0===t.style.length&&t.removeAttribute("style")}_normalizeBreakLines({parentElement:t}){if(!this._isBlockNode(t))return;if(!t.textContent)return;const e=this.dom.createDocumentFragment(),n=Array.from(t.childNodes),r=t.cloneNode(!0);r.innerHTML="";let o=r.cloneNode();const i=n=>{this._assignElementProperties(n,t,Bm.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 Wm extends Vm{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!==Fd.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(Vd.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!==Fd.LIST_ITEM){if(!n.marks)return!1;if(!this._includesMark(n,e))return!1}return!0}_includesMark(t,e){return t.marks?.some((t=>lm.isEqual(t,e)))??!1}_includesMarkType(t,e){return t.marks?.some((t=>t.type===e))??!1}_isLink(t){return t.type===Fd.TEXT&&this._includesMarkType(t,Vd.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 Um{static build(t,e={}){return"string"==typeof t?this._buildHtml(t,e):this._buildJson(t)}static _buildHtml(t,e){return new Bm({content:t,parser:e.parser||new Hm})}static _buildJson(t){return new Wm({content:t})}static normalize(t,e={}){return Um.build(t,e).normalize()}}class qm{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 Km{static build({config:t,nodeDomParser:e}){const n=function(t,e){return Cp(Pp.resolve(t),e)}(Fm({fonts:t.fonts,minFontSize:0,maxFontSize:0,presetsRef:Pe(t.presets),defaultPresetId:t.defaultPresetId,linkPresetId:t.linkPresetId,makePresetVariable:()=>"",basePresetClass:t.basePresetClass,baseListClass:t.baseListClass,deviceRef:Pe(Pd.DESKTOP),pageBlocksRef:Pe([]),wrapperRef:qm.document.createElement("p")}));return new Km({schema:n,domParser:Fa.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=Um.build(t,{parser:this._nodeDomParser});return e.normalizeHTML(),this._domParser.parse(e.dom.body).toJSON()}}class Jm{static doc(t){return{type:Fd.DOCUMENT,content:t}}static list(t,e){return{type:Fd.LIST,attrs:{bullet:{type:t}},content:e.map((t=>t.type===Fd.LIST_ITEM?t:this.listItem([].concat(t))))}}static listItem(...t){const{attrs:e,content:n,marks:r}=this._normalizeTextBlockArgs(t);return{type:Fd.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:Fd.HEADING,...n}}static paragraph(...t){return{type:Fd.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:Fd.TEXT,...e?{marks:e}:{},text:t}}static link(t,e,n=[]){return this.text(t,[this.mark(Vd.LINK,e),...n])}static mark(t,e){return{type:t,attrs:e}}static populateAllDevices(t){return{mobile:t,tablet:t,desktop:t}}}class Gm{_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=qm.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 Pd.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&&!Vd.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===Pd.COMMON?"":`-${e}`}`}makePresetHtmlClass(t){return this._baseClass+t.id}makePresetCssClass(t){return this.makePresetHtmlClass(t).split(" ").map((t=>`.${t}`)).join("")}}class Ym{static _instance;static get instance(){return this._instance??=new Ym,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 Xm{static createWindow(){return(new i.JSDOM).window}types;parse(t){const{window:e}=new i.JSDOM(t);return this.types=e,e.document}}class Zm{name;description;argument;options=[];doCommand(){throw new Error('Command "doCommand" is required')}install(t){if(!this.name)throw new Error('Command "name" is required');let e=t.command(this.name);if(this.description&&(e=e.description(this.description)),this.argument&&(e=e.argument(this.argument)),this.options.length)for(const t of this.options)e=e.option(t.flags,t.description,t.default);e.action(this.doCommand.bind(this))}output(t){console.log(t)}}const Qm=new W,tg=[class extends Zm{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}){qm.use(Xm.createWindow());const o=n.resolve(process.cwd(),e),i=Km.build({config:require(o).editor,nodeDomParser:new Xm}),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 Zm{name="version";description="display cli version";doCommand(){this.output("3.6.0-3")}}];for(const t of tg)(new t).install(Qm);Qm.parse();
15
+ sm={get exports(){return lm},set exports(t){lm=t}},am=lm,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,p=9007199254740991,d=NaN,f=4294967295,h=[["ary",l],["bind",1],["bindKey",2],["curry",8],["curryRight",o],["flip",512],["partial",i],["partialRight",a],["rearg",c]],m="[object Arguments]",g="[object Array]",v="[object Boolean]",y="[object Date]",_="[object Error]",b="[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]",N="[object Symbol]",T="[object WeakMap]",M="[object ArrayBuffer]",I="[object DataView]",$="[object Float32Array]",D="[object Float64Array]",L="[object Int8Array]",R="[object Int16Array]",P="[object Int32Array]",j="[object Uint8Array]",z="[object Uint8ClampedArray]",F="[object Uint16Array]",H="[object Uint32Array]",V=/\b__p \+= '';/g,B=/\b(__p \+=) '' \+/g,W=/(__e\(.*?\)|\b__t\)) \+\n'';/g,U=/&(?:amp|lt|gt|quot|#39);/g,q=/[&<>"']/g,K=RegExp(U.source),J=RegExp(q.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,pt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,dt=/\w*$/,ft=/^[-+]0x[0-9a-f]+$/i,ht=/^0b[01]+$/i,mt=/^\[object .+?Constructor\]$/,gt=/^0o[0-7]+$/i,vt=/^(?:0|[1-9]\d*)$/,yt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,_t=/($^)/,bt=/['\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="['’]",Nt="["+wt+"]",Tt="["+Ct+"]",Mt="["+kt+"]",It="\\d+",$t="["+xt+"]",Dt="["+St+"]",Lt="[^"+wt+Ct+It+xt+St+Et+"]",Rt="\\ud83c[\\udffb-\\udfff]",Pt="[^"+wt+"]",jt="(?:\\ud83c[\\udde6-\\uddff]){2}",zt="[\\ud800-\\udbff][\\udc00-\\udfff]",Ft="["+Et+"]",Ht="\\u200d",Vt="(?:"+Dt+"|"+Lt+")",Bt="(?:"+Ft+"|"+Lt+")",Wt="(?:['’](?:d|ll|m|re|s|t|ve))?",Ut="(?:['’](?:D|LL|M|RE|S|T|VE))?",qt="(?:"+Mt+"|"+Rt+")?",Kt="["+Ot+"]?",Jt=Kt+qt+"(?:"+Ht+"(?:"+[Pt,jt,zt].join("|")+")"+Kt+qt+")*",Gt="(?:"+[$t,jt,zt].join("|")+")"+Jt,Yt="(?:"+[Pt+Mt+"?",Mt,jt,zt,Nt].join("|")+")",Xt=RegExp(At,"g"),Zt=RegExp(Mt,"g"),Qt=RegExp(Rt+"(?="+Rt+")|"+Yt+Jt,"g"),te=RegExp([Ft+"?"+Dt+"+"+Wt+"(?="+[Tt,Ft,"$"].join("|")+")",Bt+"+"+Ut+"(?="+[Tt,Ft+Vt,"$"].join("|")+")",Ft+"?"+Vt+"+"+Wt,Ft+"+"+Ut,"\\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[$]=ie[D]=ie[L]=ie[R]=ie[P]=ie[j]=ie[z]=ie[F]=ie[H]=!0,ie[m]=ie[g]=ie[M]=ie[v]=ie[I]=ie[y]=ie[_]=ie[b]=ie[k]=ie[x]=ie[S]=ie[O]=ie[C]=ie[A]=ie[T]=!1;var se={};se[m]=se[g]=se[M]=se[I]=se[v]=se[y]=se[$]=se[D]=se[L]=se[R]=se[P]=se[k]=se[x]=se[S]=se[O]=se[C]=se[A]=se[N]=se[j]=se[z]=se[F]=se[H]=!0,se[_]=se[b]=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,pe="object"==typeof self&&self&&self.Object===Object&&self,de=ue||pe||Function("return this")(),fe=am&&!am.nodeType&&am,he=fe&&sm&&!sm.nodeType&&sm,me=he&&he.exports===fe,ge=me&&ue.process,ve=function(){try{var t=he&&he.require&&he.require("util").types;return t||ge&&ge.binding&&ge.binding("util")}catch(t){}}(),ye=ve&&ve.isArrayBuffer,_e=ve&&ve.isDate,be=ve&&ve.isMap,we=ve&&ve.isRegExp,ke=ve&&ve.isSet,xe=ve&&ve.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 Ne(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 Me(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 $e(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}function De(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 Le(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 Re(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 je(t,e,n){var r;return n(t,(function(t,n,o){if(e(t,n,o))return r=n,!1})),r}function ze(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):ze(t,Ve,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 Ve(t){return t!=t}function Be(t,e){var n=null==t?0:t.length;return n?Ke(t,e)/n:d}function We(e){return function(n){return null==n?t:n[e]}}function Ue(e){return function(n){return null==e?t:e[n]}}function qe(t,e,n,r,o){return o(t,(function(t,o,i){n=r?(r=!1,t):e(n,t,o,i)})),n}function Ke(e,n){for(var r,o=-1,i=e.length;++o<i;){var s=n(e[o]);s!==t&&(r=r===t?s:r+s)}return r}function Je(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function Ge(t){return t?t.slice(0,hn(t)+1).replace(rt,""):t}function Ye(t){return function(e){return t(e)}}function Xe(t,e){return 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}function en(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}var nn=Ue({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),rn=Ue({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function on(t){return"\\"+ae[t]}function sn(t){return ee.test(t)}function an(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function ln(t,e){return function(n){return t(e(n))}}function cn(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 un(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}function pn(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}function dn(t){return sn(t)?function(t){for(var e=Qt.lastIndex=0;Qt.test(t);)++e;return e}(t):Pe(t)}function fn(t){return sn(t)?function(t){return t.match(Qt)||[]}(t):function(t){return t.split("")}(t)}function hn(t){for(var e=t.length;e--&&ot.test(t.charAt(e)););return e}var mn=Ue({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),gn=function s(ot){var wt=(ot=null==ot?de:gn.defaults(de.Object(),ot,gn.pick(de,re))).Array,kt=ot.Date,xt=ot.Error,St=ot.Function,Et=ot.Math,Ot=ot.Object,Ct=ot.RegExp,At=ot.String,Nt=ot.TypeError,Tt=wt.prototype,Mt=St.prototype,It=Ot.prototype,$t=ot["__core-js_shared__"],Dt=Mt.toString,Lt=It.hasOwnProperty,Rt=0,Pt=function(){var t=/[^.]+$/.exec($t&&$t.keys&&$t.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),jt=It.toString,zt=Dt.call(Ot),Ft=de._,Ht=Ct("^"+Dt.call(Lt).replace(et,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Vt=me?ot.Buffer:t,Bt=ot.Symbol,Wt=ot.Uint8Array,Ut=Vt?Vt.allocUnsafe:t,qt=ln(Ot.getPrototypeOf,Ot),Kt=Ot.create,Jt=It.propertyIsEnumerable,Gt=Tt.splice,Yt=Bt?Bt.isConcatSpreadable:t,Qt=Bt?Bt.iterator:t,ee=Bt?Bt.toStringTag:t,ae=function(){try{var t=fi(Ot,"defineProperty");return t({},"",{}),t}catch(t){}}(),ue=ot.clearTimeout!==de.clearTimeout&&ot.clearTimeout,pe=kt&&kt.now!==de.Date.now&&kt.now,fe=ot.setTimeout!==de.setTimeout&&ot.setTimeout,he=Et.ceil,ge=Et.floor,ve=Ot.getOwnPropertySymbols,Pe=Vt?Vt.isBuffer:t,Ue=ot.isFinite,vn=Tt.join,yn=ln(Ot.keys,Ot),_n=Et.max,bn=Et.min,wn=kt.now,kn=ot.parseInt,xn=Et.random,Sn=Tt.reverse,En=fi(ot,"DataView"),On=fi(ot,"Map"),Cn=fi(ot,"Promise"),An=fi(ot,"Set"),Nn=fi(ot,"WeakMap"),Tn=fi(Ot,"create"),Mn=Nn&&new Nn,In={},$n=Fi(En),Dn=Fi(On),Ln=Fi(Cn),Rn=Fi(An),Pn=Fi(Nn),jn=Bt?Bt.prototype:t,zn=jn?jn.valueOf:t,Fn=jn?jn.toString:t;function Hn(t){if(ra(t)&&!qs(t)&&!(t instanceof Un)){if(t instanceof Wn)return t;if(Lt.call(t,"__wrapped__"))return Hi(t)}return new Wn(t)}var Vn=function(){function e(){}return function(n){if(!na(n))return{};if(Kt)return Kt(n);e.prototype=n;var r=new e;return e.prototype=t,r}}();function Bn(){}function Wn(e,n){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!n,this.__index__=0,this.__values__=t}function Un(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=f,this.__views__=[]}function qn(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&&Us(t),o=!n&&!r&&Ys(t),i=!n&&!r&&!o&&pa(t),s=n||r||o||i,a=s?Je(t.length,At):[],l=a.length;for(var c in t)!e&&!Lt.call(t,c)||s&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||bi(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 Pi(Mo(t),lr(e,0,t.length))}function tr(t){return Pi(Mo(t))}function er(e,n,r){(r!==t&&!Vs(e[n],r)||r===t&&!(n in e))&&sr(e,n,r)}function nr(e,n,r){var o=e[n];Lt.call(e,n)&&Vs(o,r)&&(r!==t||n in e)||sr(e,n,r)}function rr(t,e){for(var n=t.length;n--;)if(Vs(t[n][0],e))return n;return-1}function or(t,e,n,r){return fr(t,(function(t,o,i){e(r,t,n(t),i)})),r}function ir(t,e){return t&&Io(e,$a(e),t)}function sr(t,e,n){"__proto__"==e&&ae?ae(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function ar(e,n){for(var r=-1,o=n.length,i=wt(o),s=null==e;++r<o;)i[r]=s?t:Aa(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(!na(e))return e;var p=qs(e);if(p){if(a=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&Lt.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(e),!l)return Mo(e,a)}else{var d=gi(e),f=d==b||d==w;if(Ys(e))return Eo(e,l);if(d==S||d==m||f&&!i){if(a=c||f?{}:yi(e),!l)return c?function(t,e){return Io(t,mi(t),e)}(e,function(t,e){return t&&Io(e,Da(e),t)}(a,e)):function(t,e){return Io(t,hi(t),e)}(e,ir(a,e))}else{if(!se[d])return i?e:{};a=function(t,e,n){var r,o=t.constructor;switch(e){case M:return Oo(t);case v:case y: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 $:case D:case L:case R:case P:case j:case z: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,dt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case C:return new o;case N:return r=t,zn?Ot(zn.call(r)):{}}}(e,d,l)}}s||(s=new Yn);var h=s.get(e);if(h)return h;s.set(e,a),la(e)?e.forEach((function(t){a.add(cr(t,n,r,t,e,s))})):oa(e)&&e.forEach((function(t,o){a.set(o,cr(t,n,r,o,e,s))}));var g=p?t:(u?c?si:ii:c?Da:$a)(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=Ot(e);o--;){var i=r[o],s=n[i],a=e[i];if(a===t&&!(i in e)||!s(a))return!1}return!0}function pr(n,r,o){if("function"!=typeof n)throw new Nt(e);return $i((function(){n.apply(t,o)}),r)}function dr(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=Me,s=!1):e.length>=200&&(i=Ze,s=!1,e=new Gn(e));t:for(;++o<a;){var u=t[o],p=null==n?u:n(u);if(u=r||0!==u?u:0,s&&p==p){for(var d=c;d--;)if(e[d]===p)continue t;l.push(u)}else i(e,p,r)||l.push(u)}return l}Hn.templateSettings={escape:G,evaluate:Y,interpolate:X,variable:"",imports:{_:Hn}},Hn.prototype=Bn.prototype,Hn.prototype.constructor=Hn,Wn.prototype=Vn(Bn.prototype),Wn.prototype.constructor=Wn,Un.prototype=Vn(Bn.prototype),Un.prototype.constructor=Un,qn.prototype.clear=function(){this.__data__=Tn?Tn(null):{},this.size=0},qn.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},qn.prototype.get=function(e){var r=this.__data__;if(Tn){var o=r[e];return o===n?t:o}return Lt.call(r,e)?r[e]:t},qn.prototype.has=function(e){var n=this.__data__;return Tn?n[e]!==t:Lt.call(n,e)},qn.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():Gt.call(e,n,1),--this.size,0))},Kn.prototype.get=function(e){var n=this.__data__,r=rr(n,e);return r<0?t:n[r][1]},Kn.prototype.has=function(t){return rr(this.__data__,t)>-1},Kn.prototype.set=function(t,e){var n=this.__data__,r=rr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},Jn.prototype.clear=function(){this.size=0,this.__data__={hash:new qn,map:new(On||Kn),string:new qn}},Jn.prototype.delete=function(t){var e=pi(this,t).delete(t);return this.size-=e?1:0,e},Jn.prototype.get=function(t){return pi(this,t).get(t)},Jn.prototype.has=function(t){return pi(this,t).has(t)},Jn.prototype.set=function(t,e){var n=pi(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},Gn.prototype.add=Gn.prototype.push=function(t){return this.__data__.set(t,n),this},Gn.prototype.has=function(t){return this.__data__.has(t)},Yn.prototype.clear=function(){this.__data__=new Kn,this.size=0},Yn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Yn.prototype.get=function(t){return this.__data__.get(t)},Yn.prototype.has=function(t){return this.__data__.has(t)},Yn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Kn){var r=n.__data__;if(!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 fr=Lo(wr),hr=Lo(kr,!0);function mr(t,e){var n=!0;return fr(t,(function(t,r,o){return n=!!e(t,r,o)})),n}function gr(e,n,r){for(var o=-1,i=e.length;++o<i;){var s=e[o],a=n(s);if(null!=a&&(l===t?a==a&&!ua(a):r(a,l)))var l=a,c=s}return c}function vr(t,e){var n=[];return fr(t,(function(t,r,o){e(t,r,o)&&n.push(t)})),n}function yr(t,e,n,r,o){var i=-1,s=t.length;for(n||(n=_i),o||(o=[]);++i<s;){var a=t[i];e>0&&n(a)?e>1?yr(a,e-1,n,r,o):$e(o,a):r||(o[o.length]=a)}return o}var _r=Ro(),br=Ro(!0);function wr(t,e){return t&&_r(t,e,$a)}function kr(t,e){return t&&br(t,e,$a)}function xr(t,e){return Ne(e,(function(e){return Qs(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:$e(r,n(t))}function Or(e){return null==e?e===t?"[object Undefined]":"[object Null]":ee&&ee in Ot(e)?function(e){var n=Lt.call(e,ee),r=e[ee];try{e[ee]=t;var o=!0}catch(t){}var i=jt.call(e);return o&&(n?e[ee]=r:delete e[ee]),i}(e):function(t){return jt.call(t)}(e)}function Cr(t,e){return t>e}function Ar(t,e){return null!=t&&Lt.call(t,e)}function Nr(t,e){return null!=t&&e in Ot(t)}function Tr(e,n,r){for(var o=r?Me:Te,i=e[0].length,s=e.length,a=s,l=wt(s),c=1/0,u=[];a--;){var p=e[a];a&&n&&(p=Ie(p,Ye(n))),c=bn(p.length,c),l[a]=!r&&(n||i>=120&&p.length>=120)?new Gn(a&&p):t}p=e[0];var d=-1,f=l[0];t:for(;++d<i&&u.length<c;){var h=p[d],m=n?n(h):h;if(h=r||0!==h?h:0,!(f?Ze(f,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}f&&f.push(m),u.push(h)}}return u}function Mr(e,n,r){var o=null==(e=Ni(e,n=wo(n,e)))?e:e[zi(Zi(n))];return null==o?t:Se(o,e,r)}function Ir(t){return ra(t)&&Or(t)==m}function $r(e,n,r,o,i){return e===n||(null==e||null==n||!ra(e)&&!ra(n)?e!=e&&n!=n:function(e,n,r,o,i,s){var a=qs(e),l=qs(n),c=a?g:gi(e),u=l?g:gi(n),p=(c=c==m?S:c)==S,d=(u=u==m?S:u)==S,f=c==u;if(f&&Ys(e)){if(!Ys(n))return!1;a=!0,p=!1}if(f&&!p)return s||(s=new Yn),a||pa(e)?ri(e,n,r,o,i,s):function(t,e,n,r,o,i,s){switch(n){case I:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case M:return!(t.byteLength!=e.byteLength||!i(new Wt(t),new Wt(e)));case v:case y:case x:return Vs(+t,+e);case _:return t.name==e.name&&t.message==e.message;case O:case A:return t==e+"";case k:var a=an;case C:var l=1&r;if(a||(a=un),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 N:if(zn)return zn.call(t)==zn.call(e)}return!1}(e,n,c,r,o,i,s);if(!(1&r)){var h=p&&Lt.call(e,"__wrapped__"),b=d&&Lt.call(n,"__wrapped__");if(h||b){var w=h?e.value():e,E=b?n.value():n;return s||(s=new Yn),i(w,E,r,o,s)}}return!!f&&(s||(s=new Yn),function(e,n,r,o,i,s){var a=1&r,l=ii(e),c=l.length,u=ii(n),p=u.length;if(c!=p&&!a)return!1;for(var d=c;d--;){var f=l[d];if(!(a?f in n:Lt.call(n,f)))return!1}var h=s.get(e),m=s.get(n);if(h&&m)return h==n&&m==e;var g=!0;s.set(e,n),s.set(n,e);for(var v=a;++d<c;){var y=e[f=l[d]],_=n[f];if(o)var b=a?o(_,y,f,n,e,s):o(y,_,f,e,n,s);if(!(b===t?y===_||i(y,_,r,o,s):b)){g=!1;break}v||(v="constructor"==f)}if(g&&!v){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,$r,i))}function Dr(e,n,r,o){var i=r.length,s=i,a=!o;if(null==e)return!s;for(e=Ot(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],p=l[1];if(a&&l[2]){if(u===t&&!(c in e))return!1}else{var d=new Yn;if(o)var f=o(u,p,c,e,n,d);if(!(f===t?$r(p,u,3,o,d):f))return!1}}return!0}function Lr(t){return!(!na(t)||(e=t,Pt&&Pt in e))&&(Qs(t)?Ht:mt).test(Fi(t));var e}function Rr(t){return"function"==typeof t?t:null==t?il:"object"==typeof t?qs(t)?Vr(t[0],t[1]):Hr(t):hl(t)}function Pr(t){if(!Ei(t))return yn(t);var e=[];for(var n in Ot(t))Lt.call(t,n)&&"constructor"!=n&&e.push(n);return e}function jr(t){if(!na(t))return function(t){var e=[];if(null!=t)for(var n in Ot(t))e.push(n);return e}(t);var e=Ei(t),n=[];for(var r in t)("constructor"!=r||!e&&Lt.call(t,r))&&n.push(r);return n}function zr(t,e){return t<e}function Fr(t,e){var n=-1,r=Js(t)?wt(t.length):[];return fr(t,(function(t,o,i){r[++n]=e(t,o,i)})),r}function Hr(t){var e=di(t);return 1==e.length&&e[0][2]?Ci(e[0][0],e[0][1]):function(n){return n===t||Dr(n,t,e)}}function Vr(e,n){return ki(e)&&Oi(n)?Ci(zi(e),n):function(r){var o=Aa(r,e);return o===t&&o===n?Na(r,e):$r(n,o,3)}}function Br(e,n,r,o,i){e!==n&&_r(n,(function(s,a){if(i||(i=new Yn),na(s))!function(e,n,r,o,i,s,a){var l=Mi(e,r),c=Mi(n,r),u=a.get(c);if(u)er(e,r,u);else{var p=s?s(l,c,r+"",e,n,a):t,d=p===t;if(d){var f=qs(c),h=!f&&Ys(c),m=!f&&!h&&pa(c);p=c,f||h||m?qs(l)?p=l:Gs(l)?p=Mo(l):h?(d=!1,p=Eo(c,!0)):m?(d=!1,p=Co(c,!0)):p=[]:sa(c)||Us(c)?(p=l,Us(l)?p=_a(l):na(l)&&!Qs(l)||(p=yi(c))):d=!1}d&&(a.set(c,p),i(p,c,o,s,a),a.delete(c)),er(e,r,p)}}(e,n,a,r,Br,o,i);else{var l=o?o(Mi(e,a),s,a+"",e,n,i):t;l===t&&(l=s),er(e,a,l)}}),Da)}function Wr(e,n){var r=e.length;if(r)return bi(n+=n<0?r:0,r)?e[n]:t}function Ur(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})):[il];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 qr(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=Mo(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&&Gt.call(a,l,1),Gt.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;bi(o)?Gt.call(t,o,1):fo(t,o)}}return t}function Gr(t,e){return t+ge(xn()*(e-t+1))}function Yr(t,e){var n="";if(!t||e<1||e>p)return n;do{e%2&&(n+=t),(e=ge(e/2))&&(t+=t)}while(e);return n}function Xr(t,e){return Di(Ai(t,e,il),t+"")}function Zr(t){return Zn(Va(t))}function Qr(t,e){var n=Va(t);return Pi(n,lr(e,0,n.length))}function to(e,n,r,o){if(!na(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 p=l[c];(u=o?o(p,c,l):t)===t&&(u=na(p)?p:bi(n[i+1])?[]:{})}nr(l,c,u),l=l[c]}return e}var eo=Mn?function(t,e){return Mn.set(t,e),t}:il,no=ae?function(t,e){return ae(t,"toString",{configurable:!0,enumerable:!1,value:nl(e),writable:!0})}:il;function ro(t){return Pi(Va(t))}function oo(t,e,n){var r=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var i=wt(o);++r<o;)i[r]=t[r+e];return i}function io(t,e){var n;return fr(t,(function(t,r,o){return!(n=e(t,r,o))})),!!n}function so(t,e,n){var r=0,o=null==t?r:t.length;if("number"==typeof e&&e==e&&o<=2147483647){for(;r<o;){var i=r+o>>>1,s=t[i];null!==s&&!ua(s)&&(n?s<=e:s<e)?r=i+1:o=i}return o}return ao(t,e,il,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=ua(n),u=n===t;i<s;){var p=ge((i+s)/2),d=r(e[p]),f=d!==t,h=null===d,m=d==d,g=ua(d);if(a)var v=o||m;else v=u?m&&(o||f):l?m&&f&&(o||!h):c?m&&f&&!h&&(o||!g):!h&&!g&&(o?d<=n:d<n);v?i=p+1:s=p}return bn(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||!Vs(a,l)){var l=a;i[o++]=0===s?0:s}}return i}function co(t){return"number"==typeof t?t:ua(t)?d:+t}function uo(t){if("string"==typeof t)return t;if(qs(t))return Ie(t,uo)+"";if(ua(t))return Fn?Fn.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function po(t,e,n){var r=-1,o=Te,i=t.length,s=!0,a=[],l=a;if(n)s=!1,o=Me;else if(i>=200){var c=e?null:Xo(t);if(c)return un(c);s=!1,o=Ze,l=new Gn}else l=e?[]:a;t:for(;++r<i;){var u=t[r],p=e?e(u):u;if(u=n||0!==u?u:0,s&&p==p){for(var d=l.length;d--;)if(l[d]===p)continue t;e&&l.push(p),a.push(u)}else o(l,p,n)||(l!==a&&l.push(p),a.push(u))}return a}function fo(t,e){return null==(t=Ni(t,e=wo(e,t)))||delete t[zi(Zi(e))]}function ho(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 Un&&(n=n.value()),De(e,(function(t,e){return e.func.apply(e.thisArg,$e([t],e.args))}),n)}function vo(t,e,n){var r=t.length;if(r<2)return r?po(t[0]):[];for(var o=-1,i=wt(r);++o<r;)for(var s=t[o],a=-1;++a<r;)a!=o&&(i[o]=dr(i[o]||s,t[a],e,n));return po(yr(i,1),e,n)}function yo(e,n,r){for(var o=-1,i=e.length,s=n.length,a={};++o<i;){var l=o<s?n[o]:t;r(a,e[o],l)}return a}function _o(t){return Gs(t)?t:[]}function bo(t){return"function"==typeof t?t:il}function wo(t,e){return qs(t)?t:ki(t,e)?[t]:ji(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=ue||function(t){return de.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 Wt(e).set(new Wt(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=ua(e),a=n!==t,l=null===n,c=n==n,u=ua(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 No(t,e,n,r){for(var o=-1,i=t.length,s=n.length,a=-1,l=e.length,c=_n(i-s,0),u=wt(l+c),p=!r;++a<l;)u[a]=e[a];for(;++o<s;)(p||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=_n(i-a,0),p=wt(u+c),d=!r;++o<u;)p[o]=t[o];for(var f=o;++l<c;)p[f+l]=e[l];for(;++s<a;)(d||o<i)&&(p[f+n[s]]=t[o++]);return p}function Mo(t,e){var n=-1,r=t.length;for(e||(e=wt(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 $o(t,e){return function(n,r){var o=qs(n)?Ee:or,i=e?e():{};return o(n,t,ui(r,2),i)}}function Do(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=Ot(n);++o<i;){var l=r[o];l&&e(n,l,o,s)}return n}))}function Lo(t,e){return function(n,r){if(null==n)return n;if(!Js(n))return t(n,r);for(var o=n.length,i=e?o:-1,s=Ot(n);(e?i--:++i<o)&&!1!==r(s[i],i,s););return n}}function Ro(t){return function(e,n,r){for(var o=-1,i=Ot(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=sn(n=ba(n))?fn(n):t,o=r?r[0]:n.charAt(0),i=r?xo(r,1).join(""):n.slice(1);return o[e]()+i}}function jo(t){return function(e){return De(Qa(Ua(e).replace(Xt,"")),t,"")}}function zo(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=Vn(t.prototype),r=t.apply(n,e);return na(r)?r:n}}function Fo(e){return function(n,r,o){var i=Ot(n);if(!Js(n)){var s=ui(r,3);n=$a(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 Nt(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 Vo(e,n,r,o,i,s,a,c,u,p){var d=n&l,f=1&n,h=2&n,m=24&n,g=512&n,v=h?t:zo(e);return function t(){for(var l=arguments.length,y=wt(l),_=l;_--;)y[_]=arguments[_];if(m)var b=ci(t),w=en(y,b);if(o&&(y=No(y,o,i,m)),s&&(y=To(y,s,a,m)),l-=w,m&&l<p){var k=cn(y,b);return Go(e,n,Vo,t.placeholder,r,y,k,c,u,p-l)}var x=f?r:this,S=h?x[e]:e;return l=y.length,c?y=Ti(y,c):g&&l>1&&y.reverse(),d&&u<l&&(y.length=u),this&&this!==de&&this instanceof t&&(S=v||zo(S)),S.apply(x,y)}}function Bo(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 Uo(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 qo(e,n){var r=(n=n===t?" ":uo(n)).length;if(r<2)return r?Yr(n,e):n;var o=Yr(n,he(e/dn(n)));return sn(n)?xo(fn(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=ma(n),r===t?(r=n,n=0):r=ma(r),function(t,e,n,r){for(var o=-1,i=_n(he((e-t)/(n||1)),0),s=wt(i);i--;)s[r?i:++o]=t,t+=n;return s}(n,r,o=o===t?n<r?1:-1:ma(o),e)}}function Jo(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=ya(e),n=ya(n)),t(e,n)}}function Go(e,n,r,o,s,l,c,u,p,d){var f=8&n;n|=f?i:a,4&(n&=~(f?a:i))||(n&=-4);var h=[e,n,s,f?l:t,f?c:t,f?t:l,f?t:c,u,p,d],m=r.apply(t,h);return xi(e)&&Ii(m,h),m.placeholder=o,Li(m,e,n)}function Yo(t){var e=Et[t];return function(t,n){if(t=ya(t),(n=null==n?0:bn(ga(n),292))&&Ue(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/un(new An([,-0]))[1]==u?function(t){return new An(t)}:ul;function Zo(t){return function(e){var n=gi(e);return n==k?an(e):n==C?pn(e):function(t,e){return Ie(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function Qo(n,s,u,p,d,f,h,m){var g=2&s;if(!g&&"function"!=typeof n)throw new Nt(e);var v=p?p.length:0;if(v||(s&=-97,p=d=t),h=h===t?h:_n(ga(h),0),m=m===t?m:ga(m),v-=d?d.length:0,s&a){var y=p,_=d;p=d=t}var b=g?t:ai(n),w=[n,s,u,p,d,y,_,f,h,m];if(b&&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 p=t[3];t[3]=p?No(p,u,e[4]):u,t[4]=p?cn(t[3],r):e[4]}(u=e[5])&&(p=t[5],t[5]=p?To(p,u,e[6]):u,t[6]=p?cn(t[5],r):e[6]),(u=e[7])&&(t[7]=u),o&l&&(t[8]=null==t[8]?e[8]:bn(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i}(w,b),n=w[0],s=w[1],u=w[2],p=w[3],d=w[4],!(m=w[9]=w[9]===t?g?0:n.length:_n(w[9]-v,0))&&24&s&&(s&=-25),s&&1!=s)k=8==s||s==o?function(e,n,r){var o=zo(e);return function i(){for(var s=arguments.length,a=wt(s),l=s,c=ci(i);l--;)a[l]=arguments[l];var u=s<3&&a[0]!==c&&a[s-1]!==c?[]:cn(a,c);return(s-=u.length)<r?Go(e,n,Vo,i.placeholder,t,a,u,t,t,r-s):Se(this&&this!==de&&this instanceof i?o:e,this,a)}}(n,s,m):s!=i&&33!=s||d.length?Vo.apply(t,w):function(t,e,n,r){var o=1&e,i=zo(t);return function e(){for(var s=-1,a=arguments.length,l=-1,c=r.length,u=wt(c+a),p=this&&this!==de&&this instanceof e?i:t;++l<c;)u[l]=r[l];for(;a--;)u[l++]=arguments[++s];return Se(p,o?n:this,u)}}(n,s,u,p);else var k=function(t,e,n){var r=1&e,o=zo(t);return function e(){return(this&&this!==de&&this instanceof e?o:t).apply(r?n:this,arguments)}}(n,s,u);return Li((b?eo:Ii)(k,w),n,s)}function ti(e,n,r,o){return e===t||Vs(e,It[r])&&!Lt.call(o,r)?n:e}function ei(e,n,r,o,i,s){return na(e)&&na(n)&&(s.set(n,e),Br(e,n,t,ei,s),s.delete(n)),e}function ni(e){return sa(e)?t:e}function ri(e,n,r,o,i,s){var a=1&r,l=e.length,c=n.length;if(l!=c&&!(a&&c>l))return!1;var u=s.get(e),p=s.get(n);if(u&&p)return u==n&&p==e;var d=-1,f=!0,h=2&r?new Gn:t;for(s.set(e,n),s.set(n,e);++d<l;){var m=e[d],g=n[d];if(o)var v=a?o(g,m,d,n,e,s):o(m,g,d,e,n,s);if(v!==t){if(v)continue;f=!1;break}if(h){if(!Re(n,(function(t,e){if(!Ze(h,e)&&(m===t||i(m,t,r,o,s)))return h.push(e)}))){f=!1;break}}else if(m!==g&&!i(m,g,r,o,s)){f=!1;break}}return s.delete(e),s.delete(n),f}function oi(e){return Di(Ai(e,t,Ki),e+"")}function ii(t){return Er(t,$a,hi)}function si(t){return Er(t,Da,mi)}var ai=Mn?function(t){return Mn.get(t)}:ul;function li(t){for(var e=t.name+"",n=In[e],r=Lt.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(Lt.call(Hn,"placeholder")?Hn:t).placeholder}function ui(){var t=Hn.iteratee||sl;return t=t===sl?Rr:t,arguments.length?t(arguments[0],arguments[1]):t}function pi(t,e){var n,r,o=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof e?"string":"hash"]:o.map}function di(t){for(var e=$a(t),n=e.length;n--;){var r=e[n],o=t[r];e[n]=[r,o,Oi(o)]}return e}function fi(e,n){var r=function(e,n){return null==e?t:e[n]}(e,n);return Lr(r)?r:t}var hi=ve?function(t){return null==t?[]:(t=Ot(t),Ne(ve(t),(function(e){return Jt.call(t,e)})))}:vl,mi=ve?function(t){for(var e=[];t;)$e(e,hi(t)),t=qt(t);return e}:vl,gi=Or;function vi(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)&&ea(o)&&bi(s,o)&&(qs(t)||Us(t))}function yi(t){return"function"!=typeof t.constructor||Ei(t)?{}:Vn(qt(t))}function _i(t){return qs(t)||Us(t)||!!(Yt&&t&&t[Yt])}function bi(t,e){var n=typeof t;return!!(e=null==e?p:e)&&("number"==n||"symbol"!=n&&vt.test(t))&&t>-1&&t%1==0&&t<e}function wi(t,e,n){if(!na(n))return!1;var r=typeof e;return!!("number"==r?Js(n)&&bi(e,n.length):"string"==r&&e in n)&&Vs(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&&!ua(t))||Q.test(t)||!Z.test(t)||null!=e&&t in Ot(e)}function xi(t){var e=li(t),n=Hn[e];if("function"!=typeof n||!(e in Un.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||Nn&&gi(new Nn)!=T)&&(gi=function(e){var n=Or(e),r=n==S?e.constructor:t,o=r?Fi(r):"";if(o)switch(o){case $n:return I;case Dn:return k;case Ln:return E;case Rn:return C;case Pn:return T}return n});var Si=$t?Qs:yl;function Ei(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||It)}function Oi(t){return t==t&&!na(t)}function Ci(e,n){return function(r){return null!=r&&r[e]===n&&(n!==t||e in Ot(r))}}function Ai(e,n,r){return n=_n(n===t?e.length-1:n,0),function(){for(var t=arguments,o=-1,i=_n(t.length-n,0),s=wt(i);++o<i;)s[o]=t[n+o];o=-1;for(var a=wt(n+1);++o<n;)a[o]=t[o];return a[n]=r(s),Se(e,this,a)}}function Ni(t,e){return e.length<2?t:Sr(t,oo(e,0,-1))}function Ti(e,n){for(var r=e.length,o=bn(n.length,r),i=Mo(e);o--;){var s=n[o];e[o]=bi(s,r)?i[s]:t}return e}function Mi(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var Ii=Ri(eo),$i=fe||function(t,e){return de.setTimeout(t,e)},Di=Ri(no);function Li(t,e,n){var r=e+"";return Di(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(h,(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 Ri(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 Pi(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 ji=function(t){var e=Rs(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||ua(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Fi(t){if(null!=t){try{return Dt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Hi(t){if(t instanceof Un)return t.clone();var e=new Wn(t.__wrapped__,t.__chain__);return e.__actions__=Mo(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Vi=Xr((function(t,e){return Gs(t)?dr(t,yr(e,1,Gs,!0)):[]})),Bi=Xr((function(e,n){var r=Zi(n);return Gs(r)&&(r=t),Gs(e)?dr(e,yr(n,1,Gs,!0),ui(r,2)):[]})),Wi=Xr((function(e,n){var r=Zi(n);return Gs(r)&&(r=t),Gs(e)?dr(e,yr(n,1,Gs,!0),t,r):[]}));function Ui(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=null==n?0:ga(n);return o<0&&(o=_n(r+o,0)),ze(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=ga(r),i=r<0?_n(o+i,0):bn(i,o-1)),ze(e,ui(n,3),i,!0)}function Ki(t){return null!=t&&t.length?yr(t,1):[]}function Ji(e){return e&&e.length?e[0]:t}var Gi=Xr((function(t){var e=Ie(t,_o);return e.length&&e[0]===t[0]?Tr(e):[]})),Yi=Xr((function(e){var n=Zi(e),r=Ie(e,_o);return n===Zi(r)?n=t:r.pop(),r.length&&r[0]===e[0]?Tr(r,ui(n,2)):[]})),Xi=Xr((function(e){var n=Zi(e),r=Ie(e,_o);return(n="function"==typeof n?n:t)&&r.pop(),r.length&&r[0]===e[0]?Tr(r,t,n):[]}));function Zi(e){var n=null==e?0:e.length;return n?e[n-1]:t}var Qi=Xr(ts);function ts(t,e){return t&&t.length&&e&&e.length?Kr(t,e):t}var es=oi((function(t,e){var n=null==t?0:t.length,r=ar(t,e);return Jr(t,Ie(e,(function(t){return bi(t,n)?+t:t})).sort(Ao)),r}));function ns(t){return null==t?t:Sn.call(t)}var rs=Xr((function(t){return po(yr(t,1,Gs,!0))})),os=Xr((function(e){var n=Zi(e);return Gs(n)&&(n=t),po(yr(e,1,Gs,!0),ui(n,2))})),is=Xr((function(e){var n=Zi(e);return n="function"==typeof n?n:t,po(yr(e,1,Gs,!0),t,n)}));function ss(t){if(!t||!t.length)return[];var e=0;return t=Ne(t,(function(t){if(Gs(t))return e=_n(t.length,e),!0})),Je(e,(function(e){return Ie(t,We(e))}))}function as(e,n){if(!e||!e.length)return[];var r=ss(e);return null==n?r:Ie(r,(function(e){return Se(n,t,e)}))}var ls=Xr((function(t,e){return Gs(t)?dr(t,e):[]})),cs=Xr((function(t){return vo(Ne(t,Gs))})),us=Xr((function(e){var n=Zi(e);return Gs(n)&&(n=t),vo(Ne(e,Gs),ui(n,2))})),ps=Xr((function(e){var n=Zi(e);return n="function"==typeof n?n:t,vo(Ne(e,Gs),t,n)})),ds=Xr(ss),fs=Xr((function(e){var n=e.length,r=n>1?e[n-1]:t;return r="function"==typeof r?(e.pop(),r):t,as(e,r)}));function hs(t){var e=Hn(t);return e.__chain__=!0,e}function ms(t,e){return e(t)}var gs=oi((function(e){var n=e.length,r=n?e[0]:0,o=this.__wrapped__,i=function(t){return ar(t,e)};return!(n>1||this.__actions__.length)&&o instanceof Un&&bi(r)?((o=o.slice(r,+r+(n?1:0))).__actions__.push({func:ms,args:[i],thisArg:t}),new Wn(o,this.__chain__).thru((function(e){return n&&!e.length&&e.push(t),e}))):this.thru(i)})),vs=$o((function(t,e,n){Lt.call(t,n)?++t[n]:sr(t,n,1)})),ys=Fo(Ui),_s=Fo(qi);function bs(t,e){return(qs(t)?Oe:fr)(t,ui(e,3))}function ws(t,e){return(qs(t)?Ce:hr)(t,ui(e,3))}var ks=$o((function(t,e,n){Lt.call(t,n)?t[n].push(e):sr(t,n,[e])})),xs=Xr((function(t,e,n){var r=-1,o="function"==typeof e,i=Js(t)?wt(t.length):[];return fr(t,(function(t){i[++r]=o?Se(e,t,n):Mr(t,e,n)})),i})),Ss=$o((function(t,e,n){sr(t,n,e)}));function Es(t,e){return(qs(t)?Ie:Fr)(t,ui(e,3))}var Os=$o((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]})),Cs=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]]),Ur(t,yr(e,1),[])})),As=pe||function(){return de.Date.now()};function Ns(e,n,r){return n=r?t:n,n=e&&null==n?e.length:n,Qo(e,l,t,t,t,t,n)}function Ts(n,r){var o;if("function"!=typeof r)throw new Nt(e);return n=ga(n),function(){return--n>0&&(o=r.apply(this,arguments)),n<=1&&(r=t),o}}var Ms=Xr((function(t,e,n){var r=1;if(n.length){var o=cn(n,ci(Ms));r|=i}return Qo(t,r,e,n,o)})),Is=Xr((function(t,e,n){var r=3;if(n.length){var o=cn(n,ci(Is));r|=i}return Qo(e,r,t,n,o)}));function $s(n,r,o){var i,s,a,l,c,u,p=0,d=!1,f=!1,h=!0;if("function"!=typeof n)throw new Nt(e);function m(e){var r=i,o=s;return i=s=t,p=e,l=n.apply(o,r)}function g(t){return p=t,c=$i(y,r),d?m(t):l}function v(e){var n=e-u;return u===t||n>=r||n<0||f&&e-p>=a}function y(){var t=As();if(v(t))return _(t);c=$i(y,function(t){var e=r-(t-u);return f?bn(e,a-(t-p)):e}(t))}function _(e){return c=t,h&&i?m(e):(i=s=t,l)}function b(){var e=As(),n=v(e);if(i=arguments,s=this,u=e,n){if(c===t)return g(u);if(f)return So(c),c=$i(y,r),m(u)}return c===t&&(c=$i(y,r)),l}return r=ya(r)||0,na(o)&&(d=!!o.leading,a=(f="maxWait"in o)?_n(ya(o.maxWait)||0,r):a,h="trailing"in o?!!o.trailing:h),b.cancel=function(){c!==t&&So(c),p=0,i=u=s=c=t},b.flush=function(){return c===t?l:_(As())},b}var Ds=Xr((function(t,e){return pr(t,1,e)})),Ls=Xr((function(t,e,n){return pr(t,ya(e)||0,n)}));function Rs(t,n){if("function"!=typeof t||null!=n&&"function"!=typeof n)throw new Nt(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(Rs.Cache||Jn),r}function Ps(t){if("function"!=typeof t)throw new Nt(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)}}Rs.Cache=Jn;var js=ko((function(t,e){var n=(e=1==e.length&&qs(e[0])?Ie(e[0],Ye(ui())):Ie(yr(e,1),Ye(ui()))).length;return Xr((function(r){for(var o=-1,i=bn(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=cn(n,ci(zs));return Qo(e,i,t,n,r)})),Fs=Xr((function(e,n){var r=cn(n,ci(Fs));return Qo(e,a,t,n,r)})),Hs=oi((function(e,n){return Qo(e,c,t,t,t,n)}));function Vs(t,e){return t===e||t!=t&&e!=e}var Bs=Jo(Cr),Ws=Jo((function(t,e){return t>=e})),Us=Ir(function(){return arguments}())?Ir:function(t){return ra(t)&&Lt.call(t,"callee")&&!Jt.call(t,"callee")},qs=wt.isArray,Ks=ye?Ye(ye):function(t){return ra(t)&&Or(t)==M};function Js(t){return null!=t&&ea(t.length)&&!Qs(t)}function Gs(t){return ra(t)&&Js(t)}var Ys=Pe||yl,Xs=_e?Ye(_e):function(t){return ra(t)&&Or(t)==y};function Zs(t){if(!ra(t))return!1;var e=Or(t);return e==_||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!sa(t)}function Qs(t){if(!na(t))return!1;var e=Or(t);return e==b||e==w||"[object AsyncFunction]"==e||"[object Proxy]"==e}function ta(t){return"number"==typeof t&&t==ga(t)}function ea(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=p}function na(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function ra(t){return null!=t&&"object"==typeof t}var oa=be?Ye(be):function(t){return ra(t)&&gi(t)==k};function ia(t){return"number"==typeof t||ra(t)&&Or(t)==x}function sa(t){if(!ra(t)||Or(t)!=S)return!1;var e=qt(t);if(null===e)return!0;var n=Lt.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Dt.call(n)==zt}var aa=we?Ye(we):function(t){return ra(t)&&Or(t)==O},la=ke?Ye(ke):function(t){return ra(t)&&gi(t)==C};function ca(t){return"string"==typeof t||!qs(t)&&ra(t)&&Or(t)==A}function ua(t){return"symbol"==typeof t||ra(t)&&Or(t)==N}var pa=xe?Ye(xe):function(t){return ra(t)&&ea(t.length)&&!!ie[Or(t)]},da=Jo(zr),fa=Jo((function(t,e){return t<=e}));function ha(t){if(!t)return[];if(Js(t))return ca(t)?fn(t):Mo(t);if(Qt&&t[Qt])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[Qt]());var e=gi(t);return(e==k?an:e==C?un:Va)(t)}function ma(t){return t?(t=ya(t))===u||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function ga(t){var e=ma(t),n=e%1;return e==e?n?e-n:e:0}function va(t){return t?lr(ga(t),0,f):0}function ya(t){if("number"==typeof t)return t;if(ua(t))return d;if(na(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=na(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Ge(t);var n=ht.test(t);return n||gt.test(t)?ce(t.slice(2),n?2:8):ft.test(t)?d:+t}function _a(t){return Io(t,Da(t))}function ba(t){return null==t?"":uo(t)}var wa=Do((function(t,e){if(Ei(e)||Js(e))Io(e,$a(e),t);else for(var n in e)Lt.call(e,n)&&nr(t,n,e[n])})),ka=Do((function(t,e){Io(e,Da(e),t)})),xa=Do((function(t,e,n,r){Io(e,Da(e),t,r)})),Sa=Do((function(t,e,n,r){Io(e,$a(e),t,r)})),Ea=oi(ar),Oa=Xr((function(e,n){e=Ot(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=Da(s),l=-1,c=a.length;++l<c;){var u=a[l],p=e[u];(p===t||Vs(p,It[u])&&!Lt.call(e,u))&&(e[u]=s[u])}return e})),Ca=Xr((function(e){return e.push(t,ei),Se(Ra,t,e)}));function Aa(e,n,r){var o=null==e?t:Sr(e,n);return o===t?r:o}function Na(t,e){return null!=t&&vi(t,e,Nr)}var Ta=Bo((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=jt.call(e)),t[e]=n}),nl(il)),Ma=Bo((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=jt.call(e)),Lt.call(t,e)?t[e].push(n):t[e]=[n]}),ui),Ia=Xr(Mr);function $a(t){return Js(t)?Xn(t):Pr(t)}function Da(t){return Js(t)?Xn(t,!0):jr(t)}var La=Do((function(t,e,n){Br(t,e,n)})),Ra=Do((function(t,e,n,r){Br(t,e,n,r)})),Pa=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--;)fo(n,e[o]);return n})),ja=oi((function(t,e){return null==t?{}:function(t,e){return qr(t,e,(function(e,n){return Na(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),qr(t,n,(function(t,n){return e(t,n[0])}))}var Fa=Zo($a),Ha=Zo(Da);function Va(t){return null==t?[]:Xe(t,$a(t))}var Ba=jo((function(t,e,n){return e=e.toLowerCase(),t+(n?Wa(e):e)}));function Wa(t){return Za(ba(t).toLowerCase())}function Ua(t){return(t=ba(t))&&t.replace(yt,nn).replace(Zt,"")}var qa=jo((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),Ka=jo((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),Ja=Po("toLowerCase"),Ga=jo((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()})),Ya=jo((function(t,e,n){return t+(n?" ":"")+Za(e)})),Xa=jo((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),Za=Po("toUpperCase");function Qa(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 tl=Xr((function(e,n){try{return Se(e,t,n)}catch(t){return Zs(t)?t:new xt(t)}})),el=oi((function(t,e){return Oe(e,(function(e){e=zi(e),sr(t,e,Ms(t[e],t))})),t}));function nl(t){return function(){return t}}var rl=Ho(),ol=Ho(!0);function il(t){return t}function sl(t){return Rr("function"==typeof t?t:cr(t,1))}var al=Xr((function(t,e){return function(n){return Mr(n,t,e)}})),ll=Xr((function(t,e){return function(n){return Mr(t,n,e)}}));function cl(t,e,n){var r=$a(e),o=xr(e,r);null!=n||na(e)&&(o.length||!r.length)||(n=e,e=t,t=this,o=xr(e,$a(e)));var i=!(na(n)&&"chain"in n&&!n.chain),s=Qs(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__),o=n.__actions__=Mo(this.__actions__);return o.push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,$e([this.value()],arguments))})})),t}function ul(){}var pl=Uo(Ie),dl=Uo(Ae),fl=Uo(Re);function hl(t){return ki(t)?We(zi(t)):function(t){return function(e){return Sr(e,t)}}(t)}var ml=Ko(),gl=Ko(!0);function vl(){return[]}function yl(){return!1}var _l,bl=Wo((function(t,e){return t+e}),0),wl=Yo("ceil"),kl=Wo((function(t,e){return t/e}),1),xl=Yo("floor"),Sl=Wo((function(t,e){return t*e}),1),El=Yo("round"),Ol=Wo((function(t,e){return t-e}),0);return Hn.after=function(t,n){if("function"!=typeof n)throw new Nt(e);return t=ga(t),function(){if(--t<1)return n.apply(this,arguments)}},Hn.ary=Ns,Hn.assign=wa,Hn.assignIn=ka,Hn.assignInWith=xa,Hn.assignWith=Sa,Hn.at=Ea,Hn.before=Ts,Hn.bind=Ms,Hn.bindAll=el,Hn.bindKey=Is,Hn.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return qs(t)?t:[t]},Hn.chain=hs,Hn.chunk=function(e,n,r){n=(r?wi(e,n,r):n===t)?1:_n(ga(n),0);var o=null==e?0:e.length;if(!o||n<1)return[];for(var i=0,s=0,a=wt(he(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=wt(t-1),n=arguments[0],r=t;r--;)e[r-1]=arguments[r];return $e(qs(n)?Mo(n):[n],yr(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 Nt(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=$a(t);return function(n){return ur(n,t,e)}}(cr(t,1))},Hn.constant=nl,Hn.countBy=vs,Hn.create=function(t,e){var n=Vn(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=$s,Hn.defaults=Oa,Hn.defaultsDeep=Ca,Hn.defer=Ds,Hn.delay=Ls,Hn.difference=Vi,Hn.differenceBy=Bi,Hn.differenceWith=Wi,Hn.drop=function(e,n,r){var o=null==e?0:e.length;return o?oo(e,(n=r||n===t?1:ga(n))<0?0:n,o):[]},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:ga(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=ga(r))<0&&(r=-r>i?0:i+r),(o=o===t||o>i?i:ga(o))<0&&(o+=i),o=r>o?0:va(o);r<o;)e[r++]=n;return e}(e,n,r,o)):[]},Hn.filter=function(t,e){return(qs(t)?Ne:vr)(t,ui(e,3))},Hn.flatMap=function(t,e){return yr(Es(t,e),1)},Hn.flatMapDeep=function(t,e){return yr(Es(t,e),u)},Hn.flatMapDepth=function(e,n,r){return r=r===t?1:ga(r),yr(Es(e,n),r)},Hn.flatten=Ki,Hn.flattenDeep=function(t){return null!=t&&t.length?yr(t,u):[]},Hn.flattenDepth=function(e,n){return null!=e&&e.length?yr(e,n=n===t?1:ga(n)):[]},Hn.flip=function(t){return Qo(t,512)},Hn.flow=rl,Hn.flowRight=ol,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,$a(t))},Hn.functionsIn=function(t){return null==t?[]:xr(t,Da(t))},Hn.groupBy=ks,Hn.initial=function(t){return null!=t&&t.length?oo(t,0,-1):[]},Hn.intersection=Gi,Hn.intersectionBy=Yi,Hn.intersectionWith=Xi,Hn.invert=Ta,Hn.invertBy=Ma,Hn.invokeMap=xs,Hn.iteratee=sl,Hn.keyBy=Ss,Hn.keys=$a,Hn.keysIn=Da,Hn.map=Es,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 Vr(t,cr(e,1))},Hn.memoize=Rs,Hn.merge=La,Hn.mergeWith=Ra,Hn.method=al,Hn.methodOf=ll,Hn.mixin=cl,Hn.negate=Ps,Hn.nthArg=function(t){return t=ga(t),Xr((function(e){return Wr(e,t)}))},Hn.omit=Pa,Hn.omitBy=function(t,e){return za(t,Ps(ui(e)))},Hn.once=function(t){return Ts(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]),Ur(e,n,r))},Hn.over=pl,Hn.overArgs=js,Hn.overEvery=dl,Hn.overSome=fl,Hn.partial=zs,Hn.partialRight=Fs,Hn.partition=Os,Hn.pick=ja,Hn.pickBy=za,Hn.property=hl,Hn.propertyOf=function(e){return function(n){return null==e?t:Sr(e,n)}},Hn.pull=Qi,Hn.pullAll=ts,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=es,Hn.range=ml,Hn.rangeRight=gl,Hn.rearg=Hs,Hn.reject=function(t,e){return(qs(t)?Ne:vr)(t,Ps(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 Nt(e);return Xr(n,r=r===t?r:ga(r))},Hn.reverse=ns,Hn.sampleSize=function(e,n,r){return n=(r?wi(e,n,r):n===t)?1:ga(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:ga(n),r=r===t?o:ga(r)),oo(e,n,r)):[]},Hn.sortBy=Cs,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?f:r>>>0)?(e=ba(e))&&("string"==typeof n||null!=n&&!aa(n))&&!(n=uo(n))&&sn(e)?xo(fn(e),0,r):e.split(n,r):[]},Hn.spread=function(t,n){if("function"!=typeof t)throw new Nt(e);return n=null==n?0:_n(ga(n),0),Xr((function(e){var r=e[n],o=xo(e,0,n);return r&&$e(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:ga(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:ga(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 Nt(e);return na(r)&&(o="leading"in r?!!r.leading:o,i="trailing"in r?!!r.trailing:i),$s(t,n,{leading:o,maxWait:n,trailing:i})},Hn.thru=ms,Hn.toArray=ha,Hn.toPairs=Fa,Hn.toPairsIn=Ha,Hn.toPath=function(t){return qs(t)?Ie(t,zi):ua(t)?[t]:Mo(ji(ba(t)))},Hn.toPlainObject=_a,Hn.transform=function(t,e,n){var r=qs(t),o=r||Ys(t)||pa(t);if(e=ui(e,4),null==n){var i=t&&t.constructor;n=o?r?new i:[]:na(t)&&Qs(i)?Vn(qt(t)):{}}return(o?Oe:wr)(t,(function(t,r,o){return e(n,t,r,o)})),n},Hn.unary=function(t){return Ns(t,1)},Hn.union=rs,Hn.unionBy=os,Hn.unionWith=is,Hn.uniq=function(t){return t&&t.length?po(t):[]},Hn.uniqBy=function(t,e){return t&&t.length?po(t,ui(e,2)):[]},Hn.uniqWith=function(e,n){return n="function"==typeof n?n:t,e&&e.length?po(e,t,n):[]},Hn.unset=function(t,e){return null==t||fo(t,e)},Hn.unzip=ss,Hn.unzipWith=as,Hn.update=function(t,e,n){return null==t?t:ho(t,e,bo(n))},Hn.updateWith=function(e,n,r,o){return o="function"==typeof o?o:t,null==e?e:ho(e,n,bo(r),o)},Hn.values=Va,Hn.valuesIn=function(t){return null==t?[]:Xe(t,Da(t))},Hn.without=ls,Hn.words=Qa,Hn.wrap=function(t,e){return zs(bo(e),t)},Hn.xor=cs,Hn.xorBy=us,Hn.xorWith=ps,Hn.zip=ds,Hn.zipObject=function(t,e){return yo(t||[],e||[],nr)},Hn.zipObjectDeep=function(t,e){return yo(t||[],e||[],to)},Hn.zipWith=fs,Hn.entries=Fa,Hn.entriesIn=Ha,Hn.extend=ka,Hn.extendWith=xa,cl(Hn,Hn),Hn.add=bl,Hn.attempt=tl,Hn.camelCase=Ba,Hn.capitalize=Wa,Hn.ceil=wl,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,$a(e))},Hn.deburr=Ua,Hn.defaultTo=function(t,e){return null==t||t!=t?e:t},Hn.divide=kl,Hn.endsWith=function(e,n,r){e=ba(e),n=uo(n);var o=e.length,i=r=r===t?o:lr(ga(r),0,o);return(r-=n.length)>=0&&e.slice(r,i)==n},Hn.eq=Vs,Hn.escape=function(t){return(t=ba(t))&&J.test(t)?t.replace(q,rn):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=Ui,Hn.findKey=function(t,e){return je(t,ui(e,3),wr)},Hn.findLast=_s,Hn.findLastIndex=qi,Hn.findLastKey=function(t,e){return je(t,ui(e,3),kr)},Hn.floor=xl,Hn.forEach=bs,Hn.forEachRight=ws,Hn.forIn=function(t,e){return null==t?t:_r(t,ui(e,3),Da)},Hn.forInRight=function(t,e){return null==t?t:br(t,ui(e,3),Da)},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=Aa,Hn.gt=Bs,Hn.gte=Ws,Hn.has=function(t,e){return null!=t&&vi(t,e,Ar)},Hn.hasIn=Na,Hn.head=Ji,Hn.identity=il,Hn.includes=function(t,e,n,r){t=Js(t)?t:Va(t),n=n&&!r?ga(n):0;var o=t.length;return n<0&&(n=_n(o+n,0)),ca(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:ga(n);return o<0&&(o=_n(r+o,0)),Fe(t,e,o)},Hn.inRange=function(e,n,r){return n=ma(n),r===t?(r=n,n=0):r=ma(r),function(t,e,n){return t>=bn(e,n)&&t<_n(e,n)}(e=ya(e),n,r)},Hn.invoke=Ia,Hn.isArguments=Us,Hn.isArray=qs,Hn.isArrayBuffer=Ks,Hn.isArrayLike=Js,Hn.isArrayLikeObject=Gs,Hn.isBoolean=function(t){return!0===t||!1===t||ra(t)&&Or(t)==v},Hn.isBuffer=Ys,Hn.isDate=Xs,Hn.isElement=function(t){return ra(t)&&1===t.nodeType&&!sa(t)},Hn.isEmpty=function(t){if(null==t)return!0;if(Js(t)&&(qs(t)||"string"==typeof t||"function"==typeof t.splice||Ys(t)||pa(t)||Us(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(Lt.call(t,n))return!1;return!0},Hn.isEqual=function(t,e){return $r(t,e)},Hn.isEqualWith=function(e,n,r){var o=(r="function"==typeof r?r:t)?r(e,n):t;return o===t?$r(e,n,t,r):!!o},Hn.isError=Zs,Hn.isFinite=function(t){return"number"==typeof t&&Ue(t)},Hn.isFunction=Qs,Hn.isInteger=ta,Hn.isLength=ea,Hn.isMap=oa,Hn.isMatch=function(t,e){return t===e||Dr(t,e,di(e))},Hn.isMatchWith=function(e,n,r){return r="function"==typeof r?r:t,Dr(e,n,di(n),r)},Hn.isNaN=function(t){return ia(t)&&t!=+t},Hn.isNative=function(t){if(Si(t))throw new xt("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Lr(t)},Hn.isNil=function(t){return null==t},Hn.isNull=function(t){return null===t},Hn.isNumber=ia,Hn.isObject=na,Hn.isObjectLike=ra,Hn.isPlainObject=sa,Hn.isRegExp=aa,Hn.isSafeInteger=function(t){return ta(t)&&t>=-9007199254740991&&t<=p},Hn.isSet=la,Hn.isString=ca,Hn.isSymbol=ua,Hn.isTypedArray=pa,Hn.isUndefined=function(e){return e===t},Hn.isWeakMap=function(t){return ra(t)&&gi(t)==T},Hn.isWeakSet=function(t){return ra(t)&&"[object WeakSet]"==Or(t)},Hn.join=function(t,e){return null==t?"":vn.call(t,e)},Hn.kebabCase=qa,Hn.last=Zi,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=ga(r))<0?_n(o+i,0):bn(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):ze(e,Ve,i,!0)},Hn.lowerCase=Ka,Hn.lowerFirst=Ja,Hn.lt=da,Hn.lte=fa,Hn.max=function(e){return e&&e.length?gr(e,il,Cr):t},Hn.maxBy=function(e,n){return e&&e.length?gr(e,ui(n,2),Cr):t},Hn.mean=function(t){return Be(t,il)},Hn.meanBy=function(t,e){return Be(t,ui(e,2))},Hn.min=function(e){return e&&e.length?gr(e,il,zr):t},Hn.minBy=function(e,n){return e&&e.length?gr(e,ui(n,2),zr):t},Hn.stubArray=vl,Hn.stubFalse=yl,Hn.stubObject=function(){return{}},Hn.stubString=function(){return""},Hn.stubTrue=function(){return!0},Hn.multiply=Sl,Hn.nth=function(e,n){return e&&e.length?Wr(e,ga(n)):t},Hn.noConflict=function(){return de._===this&&(de._=Ft),this},Hn.noop=ul,Hn.now=As,Hn.pad=function(t,e,n){t=ba(t);var r=(e=ga(e))?dn(t):0;if(!e||r>=e)return t;var o=(e-r)/2;return qo(ge(o),n)+t+qo(he(o),n)},Hn.padEnd=function(t,e,n){t=ba(t);var r=(e=ga(e))?dn(t):0;return e&&r<e?t+qo(e-r,n):t},Hn.padStart=function(t,e,n){t=ba(t);var r=(e=ga(e))?dn(t):0;return e&&r<e?qo(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=ma(e),n===t?(n=e,e=0):n=ma(n)),e>n){var o=e;e=n,n=o}if(r||e%1||n%1){var i=xn();return bn(e+i*(n-e+le("1e-"+((i+"").length-1))),n)}return Gr(e,n)},Hn.reduce=function(t,e,n){var r=qs(t)?De:qe,o=arguments.length<3;return r(t,ui(e,4),n,o,fr)},Hn.reduceRight=function(t,e,n){var r=qs(t)?Le:qe,o=arguments.length<3;return r(t,ui(e,4),n,o,hr)},Hn.repeat=function(e,n,r){return n=(r?wi(e,n,r):n===t)?1:ga(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=Qs(s)?s.call(e):s}return e},Hn.round=El,Hn.runInContext=s,Hn.sample=function(t){return(qs(t)?Zn:Zr)(t)},Hn.size=function(t){if(null==t)return 0;if(Js(t))return ca(t)?dn(t):t.length;var e=gi(t);return e==k||e==C?t.size:Pr(t).length},Hn.snakeCase=Ga,Hn.some=function(e,n,r){var o=qs(e)?Re: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&&Vs(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(Vs(t[n],e))return n}return-1},Hn.startCase=Ya,Hn.startsWith=function(t,e,n){return t=ba(t),n=null==n?0:lr(ga(n),0,t.length),e=uo(e),t.slice(n,n+e.length)==e},Hn.subtract=Ol,Hn.sum=function(t){return t&&t.length?Ke(t,il):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=xa({},n,o,ti);var i,s,a=xa({},n.imports,o.imports,ti),l=$a(a),c=Xe(a,l),u=0,p=n.interpolate||_t,d="__p += '",f=Ct((n.escape||_t).source+"|"+p.source+"|"+(p===X?pt:_t).source+"|"+(n.evaluate||_t).source+"|$","g"),h="//# sourceURL="+(Lt.call(n,"sourceURL")?(n.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++oe+"]")+"\n";e.replace(f,(function(t,n,r,o,a,l){return r||(r=o),d+=e.slice(u,l).replace(bt,on),n&&(i=!0,d+="' +\n__e("+n+") +\n'"),a&&(s=!0,d+="';\n"+a+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),u=l+t.length,t})),d+="';\n";var m=Lt.call(n,"variable")&&n.variable;if(m){if(ct.test(m))throw new xt("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(s?d.replace(V,""):d).replace(B,"$1").replace(W,"$1;"),d="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var g=tl((function(){return St(l,h+"return "+d).apply(t,c)}));if(g.source=d,Zs(g))throw g;return g},Hn.times=function(t,e){if((t=ga(t))<1||t>p)return[];var n=f,r=bn(t,f);e=ui(e),t-=f;for(var o=Je(r,e);++n<t;)e(n);return o},Hn.toFinite=ma,Hn.toInteger=ga,Hn.toLength=va,Hn.toLower=function(t){return ba(t).toLowerCase()},Hn.toNumber=ya,Hn.toSafeInteger=function(t){return t?lr(ga(t),-9007199254740991,p):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=fn(e),i=fn(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,hn(e)+1);if(!e||!(n=uo(n)))return e;var o=fn(e);return xo(o,0,tn(o,fn(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=fn(e);return xo(o,Qe(o,fn(n))).join("")},Hn.truncate=function(e,n){var r=30,o="...";if(na(n)){var i="separator"in n?n.separator:i;r="length"in n?ga(n.length):r,o="omission"in n?uo(n.omission):o}var s=(e=ba(e)).length;if(sn(e)){var a=fn(e);s=a.length}if(r>=s)return e;var l=r-dn(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),aa(i)){if(e.slice(l).search(i)){var u,p=c;for(i.global||(i=Ct(i.source,ba(dt.exec(i))+"g")),i.lastIndex=0;u=i.exec(p);)var d=u.index;c=c.slice(0,d===t?l:d)}}else if(e.indexOf(uo(i),l)!=l){var f=c.lastIndexOf(i);f>-1&&(c=c.slice(0,f))}return c+o},Hn.unescape=function(t){return(t=ba(t))&&K.test(t)?t.replace(U,mn):t},Hn.uniqueId=function(t){var e=++Rt;return ba(t)+e},Hn.upperCase=Xa,Hn.upperFirst=Za,Hn.each=bs,Hn.eachRight=ws,Hn.first=Ji,cl(Hn,(_l={},wr(Hn,(function(t,e){Lt.call(Hn.prototype,e)||(_l[e]=t)})),_l),{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){Un.prototype[e]=function(r){r=r===t?1:_n(ga(r),0);var o=this.__filtered__&&!n?new Un(this):this.clone();return o.__filtered__?o.__takeCount__=bn(r,o.__takeCount__):o.__views__.push({size:bn(r,f),type:e+(o.__dir__<0?"Right":"")}),o},Un.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;Un.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":"");Un.prototype[t]=function(){return this[n](1).value()[0]}})),Oe(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");Un.prototype[t]=function(){return this.__filtered__?new Un(this):this[n](1)}})),Un.prototype.compact=function(){return this.filter(il)},Un.prototype.find=function(t){return this.filter(t).head()},Un.prototype.findLast=function(t){return this.reverse().find(t)},Un.prototype.invokeMap=Xr((function(t,e){return"function"==typeof t?new Un(this):this.map((function(n){return Mr(n,t,e)}))})),Un.prototype.reject=function(t){return this.filter(Ps(ui(t)))},Un.prototype.slice=function(e,n){e=ga(e);var r=this;return r.__filtered__&&(e>0||n<0)?new Un(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),n!==t&&(r=(n=ga(n))<0?r.dropRight(-n):r.take(n-e)),r)},Un.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Un.prototype.toArray=function(){return this.take(f)},wr(Un.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 Un,c=a[0],u=l||qs(n),p=function(t){var e=i.apply(Hn,$e([t],a));return o&&d?e[0]:e};u&&r&&"function"==typeof c&&1!=c.length&&(l=u=!1);var d=this.__chain__,f=!!this.__actions__.length,h=s&&!d,m=l&&!f;if(!s&&u){n=m?n:new Un(this);var g=e.apply(n,a);return g.__actions__.push({func:ms,args:[p],thisArg:t}),new Wn(g,d)}return h&&m?e.apply(this,a):(g=this.thru(p),h?o?g.value()[0]:g.value():g)})})),Oe(["pop","push","shift","sort","splice","unshift"],(function(t){var e=Tt[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(Un.prototype,(function(t,e){var n=Hn[e];if(n){var r=n.name+"";Lt.call(In,r)||(In[r]=[]),In[r].push({name:e,func:n})}})),In[Vo(t,2).name]=[{name:"wrapper",func:t}],Un.prototype.clone=function(){var t=new Un(this.__wrapped__);return t.__actions__=Mo(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Mo(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Mo(this.__views__),t},Un.prototype.reverse=function(){if(this.__filtered__){var t=new Un(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Un.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=bn(e,t+s);break;case"takeRight":t=_n(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__,p=u.length,d=0,f=bn(l,this.__takeCount__);if(!n||!r&&o==l&&f==l)return go(t,this.__actions__);var h=[];t:for(;l--&&d<f;){for(var m=-1,g=t[c+=e];++m<p;){var v=u[m],y=v.iteratee,_=v.type,b=y(g);if(2==_)g=b;else if(!b){if(1==_)continue t;break t}}h[d++]=g}return h},Hn.prototype.at=gs,Hn.prototype.chain=function(){return hs(this)},Hn.prototype.commit=function(){return new Wn(this.value(),this.__chain__)},Hn.prototype.next=function(){this.__values__===t&&(this.__values__=ha(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?t:this.__values__[this.__index__++]}},Hn.prototype.plant=function(e){for(var n,r=this;r instanceof Bn;){var o=Hi(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 Un){var n=e;return this.__actions__.length&&(n=new Un(this)),(n=n.reverse()).__actions__.push({func:ms,args:[ns],thisArg:t}),new Wn(n,this.__chain__)}return this.thru(ns)},Hn.prototype.toJSON=Hn.prototype.valueOf=Hn.prototype.value=function(){return go(this.__wrapped__,this.__actions__)},Hn.prototype.first=Hn.prototype.head,Qt&&(Hn.prototype[Qt]=function(){return this}),Hn}();he?((he.exports=gn)._=gn,fe._=gn):de._=gn}.call(s);const um=Fp.create({name:"node_processor",addCommands:()=>({setBlockAttributes:Th((({commands:t,state:e},n,r,o={})=>{const i=je(t.getBlockAttributes(n))??{},{doc:s,tr:a}=e,{from:l,to:c}=a.selection;s.nodesBetween(l,c,((t,e)=>{Fd.blocks.includes(t.type.name)&&a.setNodeAttribute(e,n,{...o,...i,...r})}))})),getBlockAttributes:Th((({editor:t},e,n)=>He((()=>{let r=Object.assign({},n||{});for(const n of Fd.blocks)Object.assign(r,t.getAttributes(n)?.[e]||{});return Object.keys(r).length?r:null})))),removeBlockAttributes:Th((({commands:t},e)=>{for(const n of Fd.blocks)t.resetAttributes(n,e)})),applyMark:Th((({state:t,commands:e},n,r,o={})=>{const{tr:i,doc:s,schema:a}=t,{$from:l,$to:c}=i.selection,u=Up(Vd.LINK,a),p=Up(n,a);if(!(p.spec.group||"").includes(Bd.SETTINGS))return e.setMark(n,r);if(l.pos===c.pos)return;s.nodesBetween(l.pos,c.pos,((t,s)=>{if(t.type.name===Fd.LIST)return;const a=function(t,e){const n="string"==typeof e?e:e.name;return t.find((t=>t.type.name===n))}(t.marks,n),d=p.create({...a?.attrs||{},...r}),f=rm(l,c,t,s),h=!u.isInSet(t.marks)&&function(t,e,n,r=im){const o=t.resolve(e).path.reverse();for(const t of o)if("number"!=typeof t)for(const e of t.marks)if(r(e,n))return!0;return!1}(i.doc,s,d,o.isAppliedToParent);if(h)return(t=>{if(!o.onAppliedToParent||!1===o.onAppliedToParent(t)){const{tr:n,node:r,position:o,mark:i}=t;e._removeNodeMark({tr:n,node:r,position:o,mark:i.type})}})({tr:i,node:t,position:s,mark:d});t.isText?i.addMark(f.from,f.to,d):function(t,e,n,r){const o=om(t,r),i=e.from-o<=r,s=e.to+o>=n.nodeSize+r;return i&&s}(i.doc,i.selection,t,s)&&i.addNodeMark(s,d)}))})),getMarks:Th((({editor:t},e)=>{const n=Fe(t,"state");return He((()=>{const{selection:t,doc:r}=je(n),{from:o,to:i}=je(t),s=[];return r.nodesBetween(o,i,(t=>{for(const n of t.marks)n.type.name===e&&s.unshift(n.attrs)})),s}))})),getMark:Th((({commands:t},e)=>{const n=t.getMarks(e);return He((()=>je(n)[0]??null))})),hasMark:Th((({commands:t},e)=>{const n=t.getMark(e);return He((()=>!!je(n)))})),getCommonSettingMark:Th((({commands:t},e,n)=>{const r=t.getMark(e);return He((()=>je(r)?.value??je(n)))})),getDeviceSettingMark:Th((({commands:t},e,n)=>{const r=t.getMarks(e),o=t.getDevice();return He((()=>{for(const t of je(r)){const e=t[je(o)];if(e)return e}return je(n)}))})),removeAllMarks:Th((({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:Th((({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:Th(((t,{tr:e,node:n,position:r,mark:o})=>n.isText?e.removeMark(r,r+n.nodeSize,o):e.removeNodeMark(r,o)))})}),pm=Fp.create({name:"text_processor",addCommands:()=>({getSelectedText:Th((({state:t})=>{const{from:e,to:n}=t.selection;return t.doc.textBetween(e,n," ")})),transformText:Th((({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=rm(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)}))}))})}),dm=Fp.create({name:"selection_processor",addStorage:()=>({selection:null}),addCommands(){return{storeSelection:Th((({state:t})=>{this.storage.selection=t.selection})),restoreSelection:Th((({commands:t})=>{this.storage.selection&&t.setTextSelection(this.storage.selection)})),expandSelection:Th((({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:om(t.doc,i);r=Math.min(r,i+n),o=Math.max(o,i+e.nodeSize-n)}})),e.setTextSelection({from:r,to:o})})),expandSelectionToBlock:Th((({commands:t})=>{t.expandSelection((({parent:t})=>t.type.name===Fd.DOCUMENT))}))}}}),fm=fd.create({name:"doc",topNode:!0,content:"block+"}).extend({marks:Bd.SETTINGS,onCreate(){this.editor.view.dom.addEventListener("click",(t=>{t.target.closest("a")&&t.preventDefault()}))}}),hm=fd.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:t}){return["p",kp(this.options.HTMLAttributes,t),0]},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),mm=hm.extend({marks:Bd.ALL,addOptions:()=>({HTMLAttributes:{class:"zw-style"}})}),gm=fd.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]}`,kp(this.options.HTMLAttributes,e),0]},addCommands(){return{setHeading:t=>({commands:e})=>!!this.options.levels.includes(t.level)&&e.setNode(this.name,t),toggleHeading:t=>({commands:e})=>!!this.options.levels.includes(t.level)&&e.toggleNode(this.name,"paragraph",t)}},addKeyboardShortcuts(){return this.options.levels.reduce(((t,e)=>({...t,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})})),{})},addInputRules(){return this.options.levels.map((t=>function(t){return new Mp({find:t.find,handler:({state:e,range:n,match:r})=>{const o=e.doc.resolve(n.from),i=Sp(t.getAttributes,void 0,r)||{};if(!o.node(-1).canReplaceWith(o.index(-1),o.indexAfter(-1),t.type))return null;e.tr.delete(n.from,n.to).setBlockType(n.from,n.from,t.type,i)}})}({find:new RegExp(`^(#{1,${t}})\\s$`),type:this.type,getAttributes:{level:t}})))}}),vm=gm.extend({marks:Bd.ALL,addOptions:()=>({levels:[1,2,3,4],HTMLAttributes:{class:"zw-style"}})}),ym=Fp.create({name:"prose_mirror_plugins",addProseMirrorPlugins(){return[Kd.create(this.editor),Jd.create(this.editor)]}}),_m=dd.create({name:Vd.FONT_FAMILY,group:Bd.SETTINGS,addOptions:()=>({fonts:[]}),addAttributes:()=>({value:{required:!0}}),addCommands(){return{applyFontFamily:Th((({commands:t},e)=>{t.applyMark(this.name,{value:e});const n=t.findFontByName(e);let r=je(t.getFontWeight());n.isWeightSupported(r)||(r=n.findClosestWeight(r),t.applyFontWeight(r));const o=t.isSettingCustomized(Vd.FONT_STYLE).value;!n.isItalicSupported(r)&&o&&t.removeItalic()})),getFont:Th((({commands:t})=>{const e=je(this.options.defaultPreset),n=t.findFontByName(e.common.font_family),r=t.getFontFamily();return He((()=>t.findFontByName(je(r))||n))})),findFontByName:Th(((t,e)=>this.options.fonts.find((t=>t.name===e)))),getFontFamily:Th((({commands:t})=>t.getCommonSettingMark(this.name,t.getDefaultFontFamily()))),getDefaultFontFamily:Th((({commands:t})=>{const e=t.getPreset();return He((()=>je(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})=>Ih({font_family:t.value?`"${t.value}"`:null})}),bm=Fp.create({name:Vd.STYLE_PRESET,addGlobalAttributes(){return[{types:[Fd.PARAGRAPH,Fd.HEADING],attributes:{preset:{isRequired:!1,default:{id:this.options.defaultId},parseHTML:t=>{const e=je(this.options.presets);if("LI"===t.parentElement.tagName)return null;for(const{id:n,node:r,fallbackClass:o}of e){if(o&&t.classList.contains(o))return{id:n};const e=this.options.styleRenderer.makePresetCssClass({id:n});if(t.matches(e))return{id:n};if(t.tagName===`H${r?.level}`)return{id:n}}return"P"===t.tagName?{id:this.options.defaultId}:null},renderHTML:t=>t.preset?{class:this.options.styleRenderer.makePresetHtmlClass(t.preset)}:null}}}]},addCommands(){function t(t,e){return t.find((t=>e===t.id))}function e(t,e){const n={};for(const r of Object.keys(t)){const o=t[r],i=e[r],s=!i||"inherit"===i.toLowerCase();n[r]=s?o:i}return n}return{getPresetList:Th((()=>He((()=>this.options.presets.filter((t=>!t.hidden)))))),getPreset:Th((({commands:n})=>{const r=n.getBlockAttributes("preset",{id:this.options.defaultId}),o=n.getPresetList(),i=n.isLink(),s=n.getLinkPreset();return He((()=>{const n=t(je(o),je(r).id);if(!je(i))return n;const a=je(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:Th((({commands:e,chain:n},r)=>{const o=t(je(e.getPresetList()),r),i=o.node?.type??Fd.PARAGRAPH,s={preset:{id:r}};o.node&&(s.level=o.node.level);for(const t of Vd.attributes)s[t]=je(e.getBlockAttributes(t));n().removeList().setNode(i,s).run()})),applyDefaultPreset:Th((({commands:t})=>{t.applyPreset(this.options.defaultId)})),removePreset:Th((({commands:t})=>{t.setNode(Fd.PARAGRAPH,{preset:null})})),getPresetCustomization:Th((({editor:t,commands:e})=>{const n=Fe(t,"state");return He((()=>{const{selection:t,doc:r}=je(n),{from:o,to:i}=t;return e._getSettingCustomization(r,o,i)}))})),isSettingCustomized:Th((({commands:t},e)=>{const n=t.getPresetCustomization(),r=Vd.presetAttributes.includes(e)?"attributes":"marks";return He((()=>je(n)[r]?.includes(e)??!1))})),getContentCustomization:Th((({editor:t,commands:e})=>{const n=Fe(t,"state");return He((()=>{const{doc:t}=je(n);return e._getSettingCustomization(t,0,t.content.size)}))})),_getSettingCustomization:Th(((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)){Vd.presetAttributes.includes(e)&&n&&i.add(e)}for(const{type:e}of t.marks)Vd.marks.includes(e.name)&&o.add(e.name)})),{attributes:Array.from(i),marks:Array.from(o)}})),removePresetCustomization:Th((({chain:t})=>{t().storeSelection().expandSelectionToBlock().removeMarks(Vd.marks).resetAttributes(Fd.PARAGRAPH,Vd.presetAttributes).resetAttributes(Fd.HEADING,Vd.presetAttributes).restoreSelection().run()})),removeFormat:Th((({chain:t})=>{t().storeSelection().expandSelectionToBlock().removeAllMarks().applyDefaultPreset().restoreSelection().run()}))}},onCreate(){this.options.styleRenderer.inject(qm.head,this.options.presets)}}),wm=dd.create({name:Vd.FONT_WEIGHT,group:Bd.SETTINGS,addAttributes:()=>({value:{required:!0}}),addCommands(){return{applyFontWeight:Th((({commands:t},e)=>{t.applyMark(this.name,{value:e});je(t.getFont()).isItalicSupported(e)||t.removeItalic()})),toggleBold:Th((({commands:t})=>{const e=je(t.getFontWeight()),n=je(t.getFont()),r=Number(e)>=600?"400":"700",o=n.findClosestWeight(r);t.applyFontWeight(o)})),getFontWeight:Th((({commands:t})=>{const e=t.getCommonSettingMark(this.name,t.getDefaultFontWeight()),n=t.getFont();return He((()=>{const t=je(e),r=je(n);return r.isWeightSupported(t)?t:r.findClosestWeight(t)}))})),getDefaultFontWeight:Th((({commands:t})=>{const e=t.getPreset();return He((()=>je(e).common.font_weight))}))}},addKeyboardShortcuts:()=>({"Mod-b":$h("toggleBold"),"Mod-B":$h("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})=>Ih({font_weight:t.value})}),km=dd.create({name:Vd.FONT_SIZE,group:Bd.SETTINGS,addOptions:()=>({minSize:1,maxSize:100}),addAttributes:()=>({mobile:{default:null},tablet:{default:null},desktop:{default:null}}),addCommands(){return{getFontSize:Th((({commands:t})=>t.getDeviceSettingMark(this.name,t.getDefaultFontSize()))),getDefaultFontSize:Th((({commands:t})=>{const e=t.getDevice(),n=t.getPreset();return He((()=>je(n)[je(e)].font_size.replace("px","")))})),applyFontSize:Th((({commands:t},e)=>{const n=je(t.getDevice());t.applyMark(this.name,{[n]:e},{isAppliedToParent:(t,e)=>t.type.name===e.type.name&&t.attrs[n]===e.attrs[n],onAppliedToParent:({tr:t,node:e,position:r,mark:o})=>{const i={...o.attrs,[n]:null},s=!Object.values(i).some((t=>!!t));if(s)return!1;const a=o.type.create(i);e.isText?t.addMark(r,r+e.nodeSize,a):t.addNodeMark(r,a)}})})),increaseFontSize:Th((({commands:t})=>{const e=Number(je(t.getFontSize())),n=Math.min(e+1,this.options.maxSize);t.applyFontSize(String(n))})),decreaseFontSize:Th((({commands:t})=>{const e=Number(je(t.getFontSize())),n=Math.max(e-1,this.options.minSize);t.applyFontSize(String(n))}))}},addKeyboardShortcuts:()=>({"Mod-Shift-=":$h("increaseFontSize"),"Mod-Shift--":$h("decreaseFontSize")}),parseHTML(){const t=t=>{if(!t)return null;const e=tm(t,je(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 Ih({font_size_mobile:e(t.mobile),font_size_tablet:e(t.tablet),font_size_desktop:e(t.desktop)})}}),xm=dd.create({name:Vd.FONT_COLOR,group:Bd.SETTINGS,addAttributes:()=>({value:{required:!0}}),addCommands(){return{getFontColor:Th((({commands:t})=>t.getCommonSettingMark(this.name,t.getDefaultFontColor()))),getDefaultFontColor:Th((({commands:t})=>{const e=t.getPreset();return He((()=>je(e).common.color))})),applyFontColor:Th((({commands:t},e)=>{t.applyMark(this.name,{value:e})}))}},parseHTML(){const t=t=>({value:Qh(t)});return[{style:"--zw-font-color",getAttrs:t},{style:"color",getAttrs:t}]},renderHTML:({HTMLAttributes:t})=>Ih({font_color:t.value})}),Sm=dd.create({name:Vd.BACKGROUND_COLOR,addAttributes:()=>({value:{required:!0}}),addCommands(){return{getBackgroundColor:Th((({commands:t})=>t.getCommonSettingMark(this.name,"rgba(255, 255, 255, 0%)"))),applyBackgroundColor:Th((({commands:t},e)=>{t.applyMark(this.name,{value:e})}))}},parseHTML(){const t=t=>({value:Qh(t)});return[{style:"--zw-background-color",getAttrs:t},{style:"background-color",getAttrs:t}]},renderHTML:({HTMLAttributes:t})=>Ih({background_color:t.value})}),Em=Fp.create({name:"device_manager",addCommands(){return{getDevice:Th((()=>Fe(this.options,"device")))}}}),Om=dd.create({name:Vd.FONT_STYLE,group:Bd.SETTINGS,addAttributes:()=>({italic:{required:!0}}),addCommands(){return{isItalic:Th((({commands:t})=>{const e=t.getMark(this.name),n=t.getDefaultFontStyle();return He((()=>je(e)?.italic??je(n).italic))})),isItalicAvailable:Th((({commands:t})=>{const e=t.getFont(),n=t.getFontWeight();return He((()=>{const t=je(e),r=je(n);return t.isItalicSupported(r)&&!t.isWeightItalicOnly(r)}))})),getDefaultFontStyle:Th((({commands:t})=>{const e=t.getPreset();return He((()=>({italic:"italic"===je(e).common.font_style})))})),toggleItalic:Th((({commands:t})=>{je(t.isItalicAvailable())&&(je(t.isItalic())?t.removeItalic():t.applyItalic())})),applyItalic:Th((({commands:t})=>{t.applyMark(this.name,{italic:!0})})),removeItalic:Th((({commands:t})=>{t.applyMark(this.name,{italic:!1})}))}},addKeyboardShortcuts:()=>({"Mod-i":$h("toggleItalic"),"Mod-I":$h("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})=>Ih({font_style:t.italic?"italic":"normal"})}),Cm=dd.create({name:Vd.TEXT_DECORATION,priority:1e3,addAttributes:()=>({underline:{default:!1},strike_through:{default:!1}}),addCommands(){return{isUnderline:Th((({commands:t})=>{const e=t.getTextDecoration();return He((()=>je(e).underline))})),isStrikeThrough:Th((({commands:t})=>{const e=t.getTextDecoration();return He((()=>je(e).strike_through))})),getTextDecoration:Th((({commands:t})=>{const e=t.getMark(this.name),n=t.getDefaultTextDecoration();return He((()=>{const t=je(e)??{},r=je(n);return{underline:t.underline||r.underline,strike_through:t.strike_through||r.strike_through}}))})),isUnderlineCustomized:Th((({commands:t})=>{const e=t.isUnderline(),n=t.getDefaultTextDecoration();return He((()=>je(e)!==je(n).underline))})),getDefaultTextDecoration:Th((({commands:t})=>{const e=t.getPreset();return He((()=>{const{text_decoration:t}=je(e).common;return{underline:t.includes("underline"),strike_through:t.includes("line-through")}}))})),toggleUnderline:Th((({commands:t})=>{t.toggleTextDecoration("underline")})),toggleStrikeThrough:Th((({commands:t})=>{t.toggleTextDecoration("strike_through")})),toggleTextDecoration:Th((({commands:t},e,n=null)=>{const r=je(t.getTextDecoration()),o=n??!r[e];t.applyMark(this.name,{[e]:o})})),applyTextDecoration:Th((({commands:t},e)=>{t.toggleTextDecoration(e,!0)})),removeTextDecoration:Th((({commands:t},e)=>{t.toggleTextDecoration(e,!1)}))}},addKeyboardShortcuts:()=>({"Mod-u":$h("toggleUnderline"),"Mod-U":$h("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"),Ih({text_decoration:e.join(" ")})}}),Am=Fp.create({name:"case_style",addCommands:()=>({applyCaseStyle:Th((({commands:t},e)=>{switch(e){case jd.CAPITALIZE:return t.applyCapitalize();case jd.LOWERCASE:return t.applyLowerCase();case jd.UPPERCASE:return t.applyUpperCase()}})),applyCapitalize:Th((({commands:t})=>{t.transformText((({text:t})=>function(t){return t.toLowerCase().replace(/(?:^|\s)\S/g,(t=>t.toUpperCase()))}(t)))})),applyLowerCase:Th((({commands:t})=>{t.transformText((({text:t})=>t.toLowerCase()))})),applyUpperCase:Th((({commands:t})=>{t.transformText((({text:t})=>t.toUpperCase()))}))})}),Nm={mobile:null,tablet:null,desktop:null},Tm=Fp.create({name:Vd.ALIGNMENT,addGlobalAttributes:()=>[{types:[Fd.PARAGRAPH,Fd.HEADING],attributes:{[Vd.ALIGNMENT]:{isRequired:!1,parseHTML({style:t}){const e=function(t){const e=nm[t]||t;return zd.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?Mh({alignment_mobile:t.alignment.mobile,alignment_tablet:t.alignment.tablet,alignment_desktop:t.alignment.desktop}):null}}}],addCommands(){return{applyAlignment:Th((({commands:t},e)=>{const n=je(t.getDevice());t.setBlockAttributes(this.name,{[n]:e},Nm)})),removeAlignment:Th((({commands:t})=>t.removeBlockAttributes(this.name))),getAlignment:Th((({commands:t})=>{const e=t.getBlockAttributes(this.name,Nm),n=t.getDevice(),r=t.getDefaultAlignment();return He((()=>je(e)?.[je(n)]??je(r)))})),getDefaultAlignment:Th((({commands:t})=>{const e=t.getDevice(),n=t.getPreset();return He((()=>je(n)[je(e)].alignment??zd.LEFT))}))}},addKeyboardShortcuts:()=>({"Mod-Shift-l":$h("applyAlignment",zd.LEFT),"Mod-Shift-e":$h("applyAlignment",zd.CENTER),"Mod-Shift-r":$h("applyAlignment",zd.RIGHT),"Mod-Shift-j":$h("applyAlignment",zd.JUSTIFY)})}),Mm={mobile:null,tablet:null,desktop:null},Im=Fp.create({name:Vd.LINE_HEIGHT,addGlobalAttributes(){return[{types:[Fd.PARAGRAPH,Fd.HEADING],attributes:{[Vd.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=em(e,t,je(this.options.wrapperRef));return n?{desktop:n,tablet:n,mobile:null}:null},renderHTML:t=>t.line_height?Mh({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:Th((({commands:t})=>{const e=t.getBlockAttributes(this.name,Mm),n=t.getDevice(),r=t.getDefaultLineHeight();return He((()=>je(e)?.[je(n)]??je(r)))})),getDefaultLineHeight:Th((({commands:t})=>{const e=t.getDevice(),n=t.getPreset();return He((()=>je(n)[je(e)].line_height))})),applyLineHeight:Th((({commands:t},e)=>{const n=je(t.getDevice());t.setBlockAttributes(this.name,{[n]:e},Mm)}))}}}),$m=fd.create({name:"listItem",addOptions:()=>({HTMLAttributes:{}}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:t}){return["li",kp(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:Fd.LIST_ITEM,marks:Bd.SETTINGS,addCommands(){const t=({selection:t})=>t.$cursor.before(t.$cursor.depth-1);return{listItemNewline:Th((({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,cm(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===Fd.LIST));if(r)return n.listItemNewline()}})}),Dm=fd.create({name:Fd.LIST,content:`${Fd.LIST_ITEM}+`,group:"block list",marks:Bd.SETTINGS,addExtensions:()=>[$m],addOptions:()=>({baseClass:"",presetClass:""}),addAttributes:()=>({bullet:{default:{type:Hd.DISC}}}),parseHTML(){const t={a:Hd.ROMAN,i:Hd.LATIN,1:Hd.DECIMAL},e=e=>{for(const n of Hd.values){const r=`.${this.options.baseClass}${n}`;if(e.matches(r))return n;if(t[e.type.toLowerCase()]===n)return n}};return[{tag:"ol",getAttrs:t=>({bullet:{type:e(t)||Hd.DECIMAL}})},{tag:"ul",getAttrs:t=>({bullet:{type:e(t)||Hd.DISC}})}]},renderHTML({HTMLAttributes:t}){const e=[this.options.baseClass+t.bullet.type,this.options.presetClass];return[Hd.ordered.includes(t.bullet.type)?"ol":"ul",{class:e.join(" ")},0]},addCommands:()=>({getListType:Th((({commands:t})=>{const e=t.getBlockAttributes("bullet",{type:null});return He((()=>je(e).type??null))})),applyList:Th((({commands:t,chain:e},n)=>{if(je(t.getListType())!==n)return e().applyDefaultPreset().toggleList(Fd.LIST,Fd.LIST_ITEM).setBlockAttributes("bullet",{type:n}).command((({commands:t,tr:e})=>t._bubbleListItemMarks(e))).run();t.removeList()})),_bubbleListItemMarks:Th(((t,e)=>{const{doc:n,selection:r}=e,o=r.$from.start(),i=r.$to.end();function s(t,e){if(Vd.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===Fd.LIST)return;if(t.type.name!==Fd.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,cm(i)),r.push(i))})),!1}))})),removeList:Th((({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([Fd.LIST,Fd.LIST_ITEM].includes(t.type.name))return;if(r.type.name!==Fd.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,cm(t));return!1})),t.liftListItem(Fd.LIST_ITEM)}))}),addInputRules(){const t=(t,e)=>function(t){return new Mp({find:t.find,handler:({state:e,range:n,match:r,chain:o})=>{const i=Sp(t.getAttributes,void 0,r)||{},s=e.tr.delete(n.from,n.to),a=s.doc.resolve(n.from).blockRange(),l=a&&yl(a,t.type,i);if(!l)return null;if(s.wrap(a,l),t.keepMarks&&t.editor){const{selection:n,storedMarks:r}=e,{splittableMarks:o}=t.editor.extensionManager,i=r||n.$to.parentOffset&&n.$from.marks();if(i){const t=i.filter((t=>o.includes(t.type.name)));s.ensureMarks(t)}}if(t.keepAttributes){const e="bulletList"===t.type.name||"orderedList"===t.type.name?"listItem":"taskList";o().updateAttributes(e,i).run()}const c=s.doc.resolve(n.from-1).nodeBefore;c&&c.type===t.type&&wl(s.doc,n.from-1)&&(!t.joinPredicate||t.joinPredicate(r,c))&&s.join(n.from-1)}})}({find:e,type:this.type,getAttributes:{bullet:{type:t}},joinPredicate:(e,{attrs:n})=>n.bullet.type===t});return[t(Hd.DISC,/^\s*([-+*])\s$/),t(Hd.DECIMAL,/^(\d+)\.\s$/),t(Hd.LATIN,/^([ivx]{1,3})\.\s$/i),t(Hd.ROMAN,/^([a-z])\.\s$/i)]}});function Lm(t){return new tc({key:new rc("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 Pl(t);return e.forEach((t=>{t.steps.forEach((t=>{n.step(t)}))})),n}(n.doc,[...e]),{mapping:l}=a,c=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}})}))})),od(r)}(a);return c.forEach((({oldRange:e,newRange:o})=>{id(e.from,e.to,n.doc).filter((e=>e.mark.type===t.type)).forEach((e=>{const o=id(l.map(e.from),l.map(e.to),r.doc).filter((e=>e.mark.type===t.type));if(!o.length)return;const i=o[0],a=n.doc.textBetween(e.from,e.to,void 0," "),c=r.doc.textBetween(i.from,i.to,void 0," "),u=Ah(a),p=Ah(c);u&&!p&&s.removeMark(i.from,i.to,t.type)}));const i=function(t,e,n){const r=[];return t.nodesBetween(e.from,e.to,((t,e)=>{n(t)&&r.push({node:t,pos:e})})),r}(r.doc,o,(t=>t.isTextblock));let a,c;if(i.length>1?(a=i[0],c=r.doc.textBetween(a.pos,a.pos+a.node.nodeSize,void 0," ")):i.length&&r.doc.textBetween(o.from,o.to," "," ").endsWith(" ")&&(a=i[0],c=r.doc.textBetween(a.pos,o.to,void 0," ")),a&&c){const e=c.split(" ").filter((t=>""!==t));if(e.length<=0)return!1;const n=e[e.length-1],r=a.pos+c.lastIndexOf(n);if(!n)return!1;Ch(n).filter((t=>t.isLink)).filter((e=>!t.validate||t.validate(e.value))).map((t=>({...t,from:r+t.start+1,to:r+t.end+1}))).forEach((e=>{s.addMark(e.from,e.to,t.type.create({href:e.href}))}))}})),s.steps.length?s:void 0}})}const Rm=dd.create({name:"link",priority:1e3,keepOnSplit:!1,onCreate(){this.options.protocols.forEach((t=>{"string"!=typeof t?Sh(t.scheme,t.optionalSlashes):Sh(t)}))},onDestroy(){af.groups={},xh.scanner=null,xh.parser=null,xh.tokenQueue=[],xh.pluginQueue=[],xh.customSchemes=[],xh.initialized=!1},inclusive(){return this.options.autolink},addOptions:()=>({openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},validate:void 0}),addAttributes(){return{href:{default:null},target:{default:this.options.HTMLAttributes.target},class:{default:this.options.HTMLAttributes.class}}},parseHTML:()=>[{tag:'a[href]:not([href *= "javascript:" i])'}],renderHTML({HTMLAttributes:t}){return["a",kp(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[hd({find:t=>Ch(t).filter((t=>!this.options.validate||this.options.validate(t.value))).filter((t=>t.isLink)).map((t=>({text:t.value,index:t.start,data:t}))),type:this.type,getAttributes:t=>{var e;return{href:null===(e=t.data)||void 0===e?void 0:e.href}}})]},addProseMirrorPlugins(){const t=[];var e;return this.options.autolink&&t.push(Lm({type:this.type,validate:this.options.validate})),this.options.openOnClick&&t.push((e={type:this.type},new tc({key:new rc("handleClickLink"),props:{handleClick:(t,n,r)=>{var o,i,s;if(1!==r.button)return!1;const a=rd(t.state,e.type.name),l=null===(o=r.target)||void 0===o?void 0:o.closest("a"),c=null!==(i=null==l?void 0:l.href)&&void 0!==i?i:a.href,u=null!==(s=null==l?void 0:l.target)&&void 0!==s?s:a.target;return!(!l||!c||(window.open(c,u),0))}}}))),this.options.linkOnPaste&&t.push(function(t){return new tc({key:new rc("handlePasteLink"),props:{handlePaste:(e,n,r)=>{const{state:o}=e,{selection:i}=o,{empty:s}=i;if(s)return!1;let a="";r.content.forEach((t=>{a+=t.textContent}));const l=Ch(a).find((t=>t.isLink&&t.value===a));return!(!a||!l||(t.editor.commands.setMark(t.type,{href:l.href}),0))}}})}({editor:this.editor,type:this.type})),t}}),Pm=Rm.extend({name:Vd.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:Wd.SELF,parseHTML:t=>t.getAttribute("target")||Wd.SELF},destination:{default:Ud.URL,parseHTML:t=>{const e=t.getAttribute("href");if(!e.startsWith("#"))return Ud.URL;const n=e.replace("#","");return je(this.options.pageBlocks).find((t=>t.id===parseInt(n)))?Ud.BLOCK:Ud.URL}}}},addCommands(){const{unsetLink:t}=this.parent();return{removeLink:t,applyLink:Th((({commands:t,chain:e},n)=>(t.setMeta("preventAutolink",!0),t.getSelectedText()?e().applyMark(this.name,n).expandSelectionToLink().command((({tr:t})=>(n.text&&t.insertText(n.text,t.selection.from,t.selection.to),!0))).run():t.insertContent(Jm.text(n.text,[Jm.mark(Vd.LINK,n)]))))),expandSelectionToLink:Th((({commands:t})=>{t.expandSelection((({node:t})=>this.type.isInSet(t.marks)))})),isLink:Th((({commands:t})=>t.hasMark(this.name))),getLinkPreset:Th((()=>He((()=>this.options.preset))))}},addProseMirrorPlugins(){return[...this.parent(),Nh.create(this.editor)]},renderHTML({HTMLAttributes:t}){const e=t.destination===Ud.BLOCK?`#${t.href}`:t.href,n=je(this.options.basePresetClass)+je(this.options.preset).id;return["a",{href:e,target:t.target,class:`${n} zw-style`},0]}}),jm=dd.create({name:Vd.SUPERSCRIPT,addCommands(){return{applySuperscript:Th((({commands:t})=>{t.setMark(this.name)})),removeSuperscript:Th((({commands:t})=>{t.unsetMark(this.name)})),toggleSuperscript:Th((({commands:t})=>{je(t.isSuperscript())?t.removeSuperscript():t.applySuperscript()})),isSuperscript:Th((({commands:t})=>{const e=t.getMark(this.name);return He((()=>!!je(e)))}))}},parseHTML:()=>[{tag:"sup"},{style:"vertical-align",getAttrs:t=>"super"===t&&null}],renderHTML:()=>["sup",{class:"zw-superscript"},0]}),zm=Fp.create({name:Vd.MARGIN,addGlobalAttributes:()=>[{types:[Fd.PARAGRAPH,Fd.HEADING],attributes:{[Vd.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?Mh({margin:t.margin.value}):null}}}]});function Fm(t){const e=e=>t.presetsRef.value.find((t=>t.id===e)),n=function(t){return Me(t,!1),t}({default:null,link:null});return Je(t.presetsRef,(()=>{n.default=e(t.defaultPresetId),n.link=e(t.linkPresetId)}),{immediate:!0}),[fm,mm,vm,md,Rd,um,pm,dm,ym].concat([bm.configure({presets:t.presetsRef,defaultId:t.defaultPresetId,styleRenderer:new Gm({baseClass:t.basePresetClass,makeVariable:t.makePresetVariable,linkPresetId:t.linkPresetId})}),Dm.configure({baseClass:t.baseListClass,presetClass:t.basePresetClass+t.defaultPresetId}),Em.configure({device:t.deviceRef}),km.configure({minSize:t.minFontSize,maxSize:t.maxFontSize,wrapperRef:t.wrapperRef}),_m.configure({fonts:t.fonts,defaultPreset:Fe(n,"default")}),wm,xm,Sm,Om,Cm,Am,jm,Tm,Im.configure({wrapperRef:t.wrapperRef}),Pm.configure({preset:Fe(n,"link"),basePresetClass:t.basePresetClass,pageBlocks:t.pageBlocksRef}),zm])}class Hm{_domParser=new DOMParser;types=window;parse(t){return this._domParser.parseFromString(t,"text/html")}}class Vm{content;constructor({content:t}){this.content=t}normalize(){throw new Error("Implement abstract method")}}class Bm extends Vm{static BLOCK_NODE_NAMES=["P","H1","H2","H3","H4"];static ROOT_NODE_NAMES=Bm.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,Bm.BLOCK_STYLES),e.append(n)};this._assignElementProperties(t,t.parentElement,Bm.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,Bm.BLOCK_STYLES)}_isBlockNode(t){return Bm.BLOCK_NODE_NAMES.includes(t.tagName)}_isRootNode(t){return Bm.ROOT_NODE_NAMES.includes(t.tagName)}_assignElementProperties(t,e,n){for(const r of n){const n=e.style.getPropertyValue(r);n&&!t.style.getPropertyValue(r)&&t.style.setProperty(r,n)}}_removeStyleProperties(t,e){for(const n of e)t.style.removeProperty(n);0===t.style.length&&t.removeAttribute("style")}_normalizeBreakLines({parentElement:t}){if(!this._isBlockNode(t))return;if(!t.textContent)return;const e=this.dom.createDocumentFragment(),n=Array.from(t.childNodes),r=t.cloneNode(!0);r.innerHTML="";let o=r.cloneNode();const i=n=>{this._assignElementProperties(n,t,Bm.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 Wm extends Vm{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!==Fd.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(Vd.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!==Fd.LIST_ITEM){if(!n.marks)return!1;if(!this._includesMark(n,e))return!1}return!0}_includesMark(t,e){return t.marks?.some((t=>lm.isEqual(t,e)))??!1}_includesMarkType(t,e){return t.marks?.some((t=>t.type===e))??!1}_isLink(t){return t.type===Fd.TEXT&&this._includesMarkType(t,Vd.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 Um{static build(t,e={}){return"string"==typeof t?this._buildHtml(t,e):this._buildJson(t)}static _buildHtml(t,e){return new Bm({content:t,parser:e.parser||new Hm})}static _buildJson(t){return new Wm({content:t})}static normalize(t,e={}){return Um.build(t,e).normalize()}}class qm{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 Km{static build({config:t,nodeDomParser:e}){const n=function(t,e){return Cp(Pp.resolve(t),e)}(Fm({fonts:t.fonts,minFontSize:0,maxFontSize:0,presetsRef:Pe(t.presets),defaultPresetId:t.defaultPresetId,linkPresetId:t.linkPresetId,makePresetVariable:()=>"",basePresetClass:t.basePresetClass,baseListClass:t.baseListClass,deviceRef:Pe(Pd.DESKTOP),pageBlocksRef:Pe([]),wrapperRef:qm.document.createElement("p")}));return new Km({schema:n,domParser:Fa.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=Um.build(t,{parser:this._nodeDomParser});return e.normalizeHTML(),this._domParser.parse(e.dom.body).toJSON()}}class Jm{static doc(t){return{type:Fd.DOCUMENT,content:t}}static list(t,e){return{type:Fd.LIST,attrs:{bullet:{type:t}},content:e.map((t=>t.type===Fd.LIST_ITEM?t:this.listItem([].concat(t))))}}static listItem(...t){const{attrs:e,content:n,marks:r}=this._normalizeTextBlockArgs(t);return{type:Fd.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:Fd.HEADING,...n}}static paragraph(...t){return{type:Fd.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:Fd.TEXT,...e?{marks:e}:{},text:t}}static link(t,e,n=[]){return this.text(t,[this.mark(Vd.LINK,e),...n])}static mark(t,e){return{type:t,attrs:e}}static populateAllDevices(t){return{mobile:t,tablet:t,desktop:t}}}class Gm{_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=qm.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 Pd.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&&!Vd.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===Pd.COMMON?"":`-${e}`}`}makePresetHtmlClass(t){return this._baseClass+t.id}makePresetCssClass(t){return this.makePresetHtmlClass(t).split(" ").map((t=>`.${t}`)).join("")}}class Ym{static _instance;static get instance(){return this._instance??=new Ym,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 Xm{static createWindow(){return(new i.JSDOM).window}types;parse(t){const{window:e}=new i.JSDOM(t);return this.types=e,e.document}}class Zm{name;description;argument;options=[];doCommand(){throw new Error('Command "doCommand" is required')}install(t){if(!this.name)throw new Error('Command "name" is required');let e=t.command(this.name);if(this.description&&(e=e.description(this.description)),this.argument&&(e=e.argument(this.argument)),this.options.length)for(const t of this.options)e=e.option(t.flags,t.description,t.default);e.action(this.doCommand.bind(this))}output(t){console.log(t)}}const Qm=new W,tg=[class extends Zm{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}){qm.use(Xm.createWindow());const o=n.resolve(process.cwd(),e),i=Km.build({config:require(o).editor,nodeDomParser:new Xm}),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 Zm{name="version";description="display cli version";doCommand(){this.output("3.6.0")}}];for(const t of tg)(new t).install(Qm);Qm.parse();
package/dist/wysiwyg.mjs CHANGED
@@ -19742,7 +19742,8 @@ const FontFamily = Mark2.create({
19742
19742
  fontWeight = font.findClosestWeight(fontWeight);
19743
19743
  commands2.applyFontWeight(fontWeight);
19744
19744
  }
19745
- if (!font.isItalicSupported(fontWeight)) {
19745
+ const isItalicCustomized = commands2.isSettingCustomized(TextSettings.FONT_STYLE).value;
19746
+ if (!font.isItalicSupported(fontWeight) && isItalicCustomized) {
19746
19747
  commands2.removeItalic();
19747
19748
  }
19748
19749
  }),
@@ -25399,7 +25400,7 @@ const __vue2_script$k = {
25399
25400
  const currentValue = editor.commands.isItalic();
25400
25401
  const isAvailable = editor.commands.isItalicAvailable();
25401
25402
  const isCustomized = computed(() => {
25402
- return editor.commands.isSettingCustomized(TextSettings.FONT_STYLE).value && isAvailable.value;
25403
+ return editor.commands.isSettingCustomized(TextSettings.FONT_STYLE).value;
25403
25404
  });
25404
25405
  const apply2 = () => editor.chain().focus().toggleItalic().run();
25405
25406
  return {
@@ -44,7 +44,7 @@ export default {
44
44
  const currentValue = editor.commands.isItalic();
45
45
  const isAvailable = editor.commands.isItalicAvailable();
46
46
  const isCustomized = computed(() => {
47
- return editor.commands.isSettingCustomized(TextSettings.FONT_STYLE).value && isAvailable.value;
47
+ return editor.commands.isSettingCustomized(TextSettings.FONT_STYLE).value;
48
48
  });
49
49
  const apply = () => editor.chain().focus().toggleItalic().run();
50
50
 
@@ -28,7 +28,9 @@ export const FontFamily = Mark.create({
28
28
  commands.applyFontWeight(fontWeight);
29
29
  }
30
30
 
31
- if (!font.isItalicSupported(fontWeight)) {
31
+ const isItalicCustomized = commands.isSettingCustomized(TextSettings.FONT_STYLE).value;
32
+
33
+ if (!font.isItalicSupported(fontWeight) && isItalicCustomized) {
32
34
  commands.removeItalic();
33
35
  }
34
36
  }),
@@ -19,7 +19,8 @@ const MockStylePreset = Extension.create({
19
19
  font_family: 'Lato',
20
20
  font_weight: '400'
21
21
  }
22
- }))
22
+ })),
23
+ isSettingCustomized: createCommand(() => ref(true))
23
24
  };
24
25
  }
25
26
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zipify/wysiwyg",
3
- "version": "3.6.0-3",
3
+ "version": "3.6.0",
4
4
  "description": "Zipify modification of TipTap text editor",
5
5
  "main": "dist/wysiwyg.mjs",
6
6
  "bin": {