@emailmaker/filemanager 0.10.5 → 0.10.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,7 +6,7 @@ import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import*as r from
6
6
  * Released under MIT license <https://lodash.com/license>
7
7
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
8
8
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
9
- */var Gr=(Hr||(Hr=1,function(e,t){(function(){var n,r="Expected a function",i="__lodash_hash_undefined__",o="__lodash_placeholder__",a=32,s=128,l=256,c=1/0,u=9007199254740991,h=NaN,d=4294967295,f=[["ary",s],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",a],["partialRight",64],["rearg",l]],p="[object Arguments]",g="[object Array]",m="[object Boolean]",v="[object Date]",b="[object Error]",y="[object Function]",w="[object GeneratorFunction]",x="[object Map]",C="[object Number]",_="[object Object]",S="[object Promise]",A="[object RegExp]",k="[object Set]",T="[object String]",I="[object Symbol]",O="[object WeakMap]",E="[object ArrayBuffer]",P="[object DataView]",M="[object Float32Array]",F="[object Float64Array]",j="[object Int8Array]",D="[object Int16Array]",R="[object Int32Array]",L="[object Uint8Array]",z="[object Uint8ClampedArray]",N="[object Uint16Array]",B="[object Uint32Array]",V=/\b__p \+= '';/g,U=/\b(__p \+=) '' \+/g,W=/(__e\(.*?\)|\b__t\)) \+\n'';/g,H=/&(?:amp|lt|gt|quot|#39);/g,Y=/[&<>"']/g,$=RegExp(H.source),G=RegExp(Y.source),X=/<%-([\s\S]+?)%>/g,K=/<%([\s\S]+?)%>/g,q=/<%=([\s\S]+?)%>/g,Z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,J=/^\w*$/,Q=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ee=/[\\^$.*+?()[\]{}|]/g,te=RegExp(ee.source),ne=/^\s+/,re=/\s/,ie=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,oe=/\{\n\/\* \[wrapped with (.+)\] \*/,ae=/,? & /,se=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,le=/[()=,{}\[\]\/\s]/,ce=/\\(\\)?/g,ue=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,he=/\w*$/,de=/^[-+]0x[0-9a-f]+$/i,fe=/^0b[01]+$/i,pe=/^\[object .+?Constructor\]$/,ge=/^0o[0-7]+$/i,me=/^(?:0|[1-9]\d*)$/,ve=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,be=/($^)/,ye=/['\n\r\u2028\u2029\\]/g,we="\\ud800-\\udfff",xe="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ce="\\u2700-\\u27bf",_e="a-z\\xdf-\\xf6\\xf8-\\xff",Se="A-Z\\xc0-\\xd6\\xd8-\\xde",Ae="\\ufe0e\\ufe0f",ke="\\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",Te="['’]",Ie="["+we+"]",Oe="["+ke+"]",Ee="["+xe+"]",Pe="\\d+",Me="["+Ce+"]",Fe="["+_e+"]",je="[^"+we+ke+Pe+Ce+_e+Se+"]",De="\\ud83c[\\udffb-\\udfff]",Re="[^"+we+"]",Le="(?:\\ud83c[\\udde6-\\uddff]){2}",ze="[\\ud800-\\udbff][\\udc00-\\udfff]",Ne="["+Se+"]",Be="\\u200d",Ve="(?:"+Fe+"|"+je+")",Ue="(?:"+Ne+"|"+je+")",We="(?:['’](?:d|ll|m|re|s|t|ve))?",He="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ye="(?:"+Ee+"|"+De+")?",$e="["+Ae+"]?",Ge=$e+Ye+"(?:"+Be+"(?:"+[Re,Le,ze].join("|")+")"+$e+Ye+")*",Xe="(?:"+[Me,Le,ze].join("|")+")"+Ge,Ke="(?:"+[Re+Ee+"?",Ee,Le,ze,Ie].join("|")+")",qe=RegExp(Te,"g"),Ze=RegExp(Ee,"g"),Je=RegExp(De+"(?="+De+")|"+Ke+Ge,"g"),Qe=RegExp([Ne+"?"+Fe+"+"+We+"(?="+[Oe,Ne,"$"].join("|")+")",Ue+"+"+He+"(?="+[Oe,Ne+Ve,"$"].join("|")+")",Ne+"?"+Ve+"+"+We,Ne+"+"+He,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Pe,Xe].join("|"),"g"),et=RegExp("["+Be+we+xe+Ae+"]"),tt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,nt=["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"],rt=-1,it={};it[M]=it[F]=it[j]=it[D]=it[R]=it[L]=it[z]=it[N]=it[B]=!0,it[p]=it[g]=it[E]=it[m]=it[P]=it[v]=it[b]=it[y]=it[x]=it[C]=it[_]=it[A]=it[k]=it[T]=it[O]=!1;var ot={};ot[p]=ot[g]=ot[E]=ot[P]=ot[m]=ot[v]=ot[M]=ot[F]=ot[j]=ot[D]=ot[R]=ot[x]=ot[C]=ot[_]=ot[A]=ot[k]=ot[T]=ot[I]=ot[L]=ot[z]=ot[N]=ot[B]=!0,ot[b]=ot[y]=ot[O]=!1;var at={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},st=parseFloat,lt=parseInt,ct="object"==typeof cn&&cn&&cn.Object===Object&&cn,ut="object"==typeof self&&self&&self.Object===Object&&self,ht=ct||ut||Function("return this")(),dt=t&&!t.nodeType&&t,ft=dt&&e&&!e.nodeType&&e,pt=ft&&ft.exports===dt,gt=pt&&ct.process,mt=function(){try{var e=ft&&ft.require&&ft.require("util").types;return e||gt&&gt.binding&&gt.binding("util")}catch(e){}}(),vt=mt&&mt.isArrayBuffer,bt=mt&&mt.isDate,yt=mt&&mt.isMap,wt=mt&&mt.isRegExp,xt=mt&&mt.isSet,Ct=mt&&mt.isTypedArray;function _t(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function St(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(r,a,n(a),e)}return r}function At(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function kt(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function Tt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function It(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}function Ot(e,t){return!(null==e||!e.length)&&Nt(e,t,0)>-1}function Et(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function Pt(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function Mt(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function Ft(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function jt(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function Dt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Rt=Wt("length");function Lt(e,t,n){var r;return n(e,function(e,n,i){if(t(e,n,i))return r=n,!1}),r}function zt(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function Nt(e,t,n){return t==t?function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):zt(e,Vt,n)}function Bt(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}function Vt(e){return e!=e}function Ut(e,t){var n=null==e?0:e.length;return n?$t(e,t)/n:h}function Wt(e){return function(t){return null==t?n:t[e]}}function Ht(e){return function(t){return null==e?n:e[t]}}function Yt(e,t,n,r,i){return i(e,function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)}),n}function $t(e,t){for(var r,i=-1,o=e.length;++i<o;){var a=t(e[i]);a!==n&&(r=r===n?a:r+a)}return r}function Gt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Xt(e){return e?e.slice(0,fn(e)+1).replace(ne,""):e}function Kt(e){return function(t){return e(t)}}function qt(e,t){return Pt(t,function(t){return e[t]})}function Zt(e,t){return e.has(t)}function Jt(e,t){for(var n=-1,r=e.length;++n<r&&Nt(t,e[n],0)>-1;);return n}function Qt(e,t){for(var n=e.length;n--&&Nt(t,e[n],0)>-1;);return n}var en=Ht({"À":"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"}),tn=Ht({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function nn(e){return"\\"+at[e]}function rn(e){return et.test(e)}function on(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function an(e,t){return function(n){return e(t(n))}}function sn(e,t){for(var n=-1,r=e.length,i=0,a=[];++n<r;){var s=e[n];s!==t&&s!==o||(e[n]=o,a[i++]=n)}return a}function ln(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}function un(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=[e,e]}),n}function hn(e){return rn(e)?function(e){for(var t=Je.lastIndex=0;Je.test(e);)++t;return t}(e):Rt(e)}function dn(e){return rn(e)?function(e){return e.match(Je)||[]}(e):function(e){return e.split("")}(e)}function fn(e){for(var t=e.length;t--&&re.test(e.charAt(t)););return t}var pn=Ht({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),gn=function e(t){var re,we=(t=null==t?ht:gn.defaults(ht.Object(),t,gn.pick(ht,nt))).Array,xe=t.Date,Ce=t.Error,_e=t.Function,Se=t.Math,Ae=t.Object,ke=t.RegExp,Te=t.String,Ie=t.TypeError,Oe=we.prototype,Ee=_e.prototype,Pe=Ae.prototype,Me=t["__core-js_shared__"],Fe=Ee.toString,je=Pe.hasOwnProperty,De=0,Re=(re=/[^.]+$/.exec(Me&&Me.keys&&Me.keys.IE_PROTO||""))?"Symbol(src)_1."+re:"",Le=Pe.toString,ze=Fe.call(Ae),Ne=ht._,Be=ke("^"+Fe.call(je).replace(ee,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ve=pt?t.Buffer:n,Ue=t.Symbol,We=t.Uint8Array,He=Ve?Ve.allocUnsafe:n,Ye=an(Ae.getPrototypeOf,Ae),$e=Ae.create,Ge=Pe.propertyIsEnumerable,Xe=Oe.splice,Ke=Ue?Ue.isConcatSpreadable:n,Je=Ue?Ue.iterator:n,et=Ue?Ue.toStringTag:n,at=function(){try{var e=uo(Ae,"defineProperty");return e({},"",{}),e}catch(e){}}(),ct=t.clearTimeout!==ht.clearTimeout&&t.clearTimeout,ut=xe&&xe.now!==ht.Date.now&&xe.now,dt=t.setTimeout!==ht.setTimeout&&t.setTimeout,ft=Se.ceil,gt=Se.floor,mt=Ae.getOwnPropertySymbols,Rt=Ve?Ve.isBuffer:n,Ht=t.isFinite,cn=Oe.join,mn=an(Ae.keys,Ae),vn=Se.max,bn=Se.min,yn=xe.now,wn=t.parseInt,xn=Se.random,Cn=Oe.reverse,_n=uo(t,"DataView"),Sn=uo(t,"Map"),An=uo(t,"Promise"),kn=uo(t,"Set"),Tn=uo(t,"WeakMap"),In=uo(Ae,"create"),On=Tn&&new Tn,En={},Pn=Lo(_n),Mn=Lo(Sn),Fn=Lo(An),jn=Lo(kn),Dn=Lo(Tn),Rn=Ue?Ue.prototype:n,Ln=Rn?Rn.valueOf:n,zn=Rn?Rn.toString:n;function Nn(e){if(es(e)&&!Wa(e)&&!(e instanceof Wn)){if(e instanceof Un)return e;if(je.call(e,"__wrapped__"))return zo(e)}return new Un(e)}var Bn=function(){function e(){}return function(t){if(!Qa(t))return{};if($e)return $e(t);e.prototype=t;var r=new e;return e.prototype=n,r}}();function Vn(){}function Un(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=n}function Wn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function Hn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Yn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function $n(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Gn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new $n;++t<n;)this.add(e[t])}function Xn(e){var t=this.__data__=new Yn(e);this.size=t.size}function Kn(e,t){var n=Wa(e),r=!n&&Ua(e),i=!n&&!r&&Ga(e),o=!n&&!r&&!i&&ls(e),a=n||r||i||o,s=a?Gt(e.length,Te):[],l=s.length;for(var c in e)!t&&!je.call(e,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||bo(c,l))||s.push(c);return s}function qn(e){var t=e.length;return t?e[Gr(0,t-1)]:n}function Zn(e,t){return jo(Ii(e),ar(t,0,e.length))}function Jn(e){return jo(Ii(e))}function Qn(e,t,r){(r!==n&&!Na(e[t],r)||r===n&&!(t in e))&&ir(e,t,r)}function er(e,t,r){var i=e[t];je.call(e,t)&&Na(i,r)&&(r!==n||t in e)||ir(e,t,r)}function tr(e,t){for(var n=e.length;n--;)if(Na(e[n][0],t))return n;return-1}function nr(e,t,n,r){return hr(e,function(e,i,o){t(r,e,n(e),o)}),r}function rr(e,t){return e&&Oi(t,Es(t),e)}function ir(e,t,n){"__proto__"==t&&at?at(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function or(e,t){for(var r=-1,i=t.length,o=we(i),a=null==e;++r<i;)o[r]=a?n:As(e,t[r]);return o}function ar(e,t,r){return e==e&&(r!==n&&(e=e<=r?e:r),t!==n&&(e=e>=t?e:t)),e}function sr(e,t,r,i,o,a){var s,l=1&t,c=2&t,u=4&t;if(r&&(s=o?r(e,i,o,a):r(e)),s!==n)return s;if(!Qa(e))return e;var h=Wa(e);if(h){if(s=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&je.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!l)return Ii(e,s)}else{var d=po(e),f=d==y||d==w;if(Ga(e))return Ci(e,l);if(d==_||d==p||f&&!o){if(s=c||f?{}:mo(e),!l)return c?function(e,t){return Oi(e,fo(e),t)}(e,function(e,t){return e&&Oi(t,Ps(t),e)}(s,e)):function(e,t){return Oi(e,ho(e),t)}(e,rr(s,e))}else{if(!ot[d])return o?e:{};s=function(e,t,n){var r,i=e.constructor;switch(t){case E:return _i(e);case m:case v:return new i(+e);case P:return function(e,t){var n=t?_i(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case M:case F:case j:case D:case R:case L:case z:case N:case B:return Si(e,n);case x:return new i;case C:case T:return new i(e);case A:return function(e){var t=new e.constructor(e.source,he.exec(e));return t.lastIndex=e.lastIndex,t}(e);case k:return new i;case I:return r=e,Ln?Ae(Ln.call(r)):{}}}(e,d,l)}}a||(a=new Xn);var g=a.get(e);if(g)return g;a.set(e,s),os(e)?e.forEach(function(n){s.add(sr(n,t,r,n,e,a))}):ts(e)&&e.forEach(function(n,i){s.set(i,sr(n,t,r,i,e,a))});var b=h?n:(u?c?ro:no:c?Ps:Es)(e);return At(b||e,function(n,i){b&&(n=e[i=n]),er(s,i,sr(n,t,r,i,e,a))}),s}function lr(e,t,r){var i=r.length;if(null==e)return!i;for(e=Ae(e);i--;){var o=r[i],a=t[o],s=e[o];if(s===n&&!(o in e)||!a(s))return!1}return!0}function cr(e,t,i){if("function"!=typeof e)throw new Ie(r);return Eo(function(){e.apply(n,i)},t)}function ur(e,t,n,r){var i=-1,o=Ot,a=!0,s=e.length,l=[],c=t.length;if(!s)return l;n&&(t=Pt(t,Kt(n))),r?(o=Et,a=!1):t.length>=200&&(o=Zt,a=!1,t=new Gn(t));e:for(;++i<s;){var u=e[i],h=null==n?u:n(u);if(u=r||0!==u?u:0,a&&h==h){for(var d=c;d--;)if(t[d]===h)continue e;l.push(u)}else o(t,h,r)||l.push(u)}return l}Nn.templateSettings={escape:X,evaluate:K,interpolate:q,variable:"",imports:{_:Nn}},Nn.prototype=Vn.prototype,Nn.prototype.constructor=Nn,Un.prototype=Bn(Vn.prototype),Un.prototype.constructor=Un,Wn.prototype=Bn(Vn.prototype),Wn.prototype.constructor=Wn,Hn.prototype.clear=function(){this.__data__=In?In(null):{},this.size=0},Hn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Hn.prototype.get=function(e){var t=this.__data__;if(In){var r=t[e];return r===i?n:r}return je.call(t,e)?t[e]:n},Hn.prototype.has=function(e){var t=this.__data__;return In?t[e]!==n:je.call(t,e)},Hn.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=In&&t===n?i:t,this},Yn.prototype.clear=function(){this.__data__=[],this.size=0},Yn.prototype.delete=function(e){var t=this.__data__,n=tr(t,e);return!(n<0||(n==t.length-1?t.pop():Xe.call(t,n,1),--this.size,0))},Yn.prototype.get=function(e){var t=this.__data__,r=tr(t,e);return r<0?n:t[r][1]},Yn.prototype.has=function(e){return tr(this.__data__,e)>-1},Yn.prototype.set=function(e,t){var n=this.__data__,r=tr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},$n.prototype.clear=function(){this.size=0,this.__data__={hash:new Hn,map:new(Sn||Yn),string:new Hn}},$n.prototype.delete=function(e){var t=lo(this,e).delete(e);return this.size-=t?1:0,t},$n.prototype.get=function(e){return lo(this,e).get(e)},$n.prototype.has=function(e){return lo(this,e).has(e)},$n.prototype.set=function(e,t){var n=lo(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Gn.prototype.add=Gn.prototype.push=function(e){return this.__data__.set(e,i),this},Gn.prototype.has=function(e){return this.__data__.has(e)},Xn.prototype.clear=function(){this.__data__=new Yn,this.size=0},Xn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Xn.prototype.get=function(e){return this.__data__.get(e)},Xn.prototype.has=function(e){return this.__data__.has(e)},Xn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Yn){var r=n.__data__;if(!Sn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new $n(r)}return n.set(e,t),this.size=n.size,this};var hr=Mi(yr),dr=Mi(wr,!0);function fr(e,t){var n=!0;return hr(e,function(e,r,i){return n=!!t(e,r,i)}),n}function pr(e,t,r){for(var i=-1,o=e.length;++i<o;){var a=e[i],s=t(a);if(null!=s&&(l===n?s==s&&!ss(s):r(s,l)))var l=s,c=a}return c}function gr(e,t){var n=[];return hr(e,function(e,r,i){t(e,r,i)&&n.push(e)}),n}function mr(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=vo),i||(i=[]);++o<a;){var s=e[o];t>0&&n(s)?t>1?mr(s,t-1,n,r,i):Mt(i,s):r||(i[i.length]=s)}return i}var vr=Fi(),br=Fi(!0);function yr(e,t){return e&&vr(e,t,Es)}function wr(e,t){return e&&br(e,t,Es)}function xr(e,t){return It(t,function(t){return qa(e[t])})}function Cr(e,t){for(var r=0,i=(t=bi(t,e)).length;null!=e&&r<i;)e=e[Ro(t[r++])];return r&&r==i?e:n}function _r(e,t,n){var r=t(e);return Wa(e)?r:Mt(r,n(e))}function Sr(e){return null==e?e===n?"[object Undefined]":"[object Null]":et&&et in Ae(e)?function(e){var t=je.call(e,et),r=e[et];try{e[et]=n;var i=!0}catch(e){}var o=Le.call(e);return i&&(t?e[et]=r:delete e[et]),o}(e):function(e){return Le.call(e)}(e)}function Ar(e,t){return e>t}function kr(e,t){return null!=e&&je.call(e,t)}function Tr(e,t){return null!=e&&t in Ae(e)}function Ir(e,t,r){for(var i=r?Et:Ot,o=e[0].length,a=e.length,s=a,l=we(a),c=1/0,u=[];s--;){var h=e[s];s&&t&&(h=Pt(h,Kt(t))),c=bn(h.length,c),l[s]=!r&&(t||o>=120&&h.length>=120)?new Gn(s&&h):n}h=e[0];var d=-1,f=l[0];e:for(;++d<o&&u.length<c;){var p=h[d],g=t?t(p):p;if(p=r||0!==p?p:0,!(f?Zt(f,g):i(u,g,r))){for(s=a;--s;){var m=l[s];if(!(m?Zt(m,g):i(e[s],g,r)))continue e}f&&f.push(g),u.push(p)}}return u}function Or(e,t,r){var i=null==(e=To(e,t=bi(t,e)))?e:e[Ro(Ko(t))];return null==i?n:_t(i,e,r)}function Er(e){return es(e)&&Sr(e)==p}function Pr(e,t,r,i,o){return e===t||(null==e||null==t||!es(e)&&!es(t)?e!=e&&t!=t:function(e,t,r,i,o,a){var s=Wa(e),l=Wa(t),c=s?g:po(e),u=l?g:po(t),h=(c=c==p?_:c)==_,d=(u=u==p?_:u)==_,f=c==u;if(f&&Ga(e)){if(!Ga(t))return!1;s=!0,h=!1}if(f&&!h)return a||(a=new Xn),s||ls(e)?eo(e,t,r,i,o,a):function(e,t,n,r,i,o,a){switch(n){case P:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case E:return!(e.byteLength!=t.byteLength||!o(new We(e),new We(t)));case m:case v:case C:return Na(+e,+t);case b:return e.name==t.name&&e.message==t.message;case A:case T:return e==t+"";case x:var s=on;case k:var l=1&r;if(s||(s=ln),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var u=eo(s(e),s(t),r,i,o,a);return a.delete(e),u;case I:if(Ln)return Ln.call(e)==Ln.call(t)}return!1}(e,t,c,r,i,o,a);if(!(1&r)){var y=h&&je.call(e,"__wrapped__"),w=d&&je.call(t,"__wrapped__");if(y||w){var S=y?e.value():e,O=w?t.value():t;return a||(a=new Xn),o(S,O,r,i,a)}}return!!f&&(a||(a=new Xn),function(e,t,r,i,o,a){var s=1&r,l=no(e),c=l.length,u=no(t),h=u.length;if(c!=h&&!s)return!1;for(var d=c;d--;){var f=l[d];if(!(s?f in t:je.call(t,f)))return!1}var p=a.get(e),g=a.get(t);if(p&&g)return p==t&&g==e;var m=!0;a.set(e,t),a.set(t,e);for(var v=s;++d<c;){var b=e[f=l[d]],y=t[f];if(i)var w=s?i(y,b,f,t,e,a):i(b,y,f,e,t,a);if(!(w===n?b===y||o(b,y,r,i,a):w)){m=!1;break}v||(v="constructor"==f)}if(m&&!v){var x=e.constructor,C=t.constructor;x==C||!("constructor"in e)||!("constructor"in t)||"function"==typeof x&&x instanceof x&&"function"==typeof C&&C instanceof C||(m=!1)}return a.delete(e),a.delete(t),m}(e,t,r,i,o,a))}(e,t,r,i,Pr,o))}function Mr(e,t,r,i){var o=r.length,a=o,s=!i;if(null==e)return!a;for(e=Ae(e);o--;){var l=r[o];if(s&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++o<a;){var c=(l=r[o])[0],u=e[c],h=l[1];if(s&&l[2]){if(u===n&&!(c in e))return!1}else{var d=new Xn;if(i)var f=i(u,h,c,e,t,d);if(!(f===n?Pr(h,u,3,i,d):f))return!1}}return!0}function Fr(e){return!(!Qa(e)||(t=e,Re&&Re in t))&&(qa(e)?Be:pe).test(Lo(e));var t}function jr(e){return"function"==typeof e?e:null==e?nl:"object"==typeof e?Wa(e)?Br(e[0],e[1]):Nr(e):hl(e)}function Dr(e){if(!_o(e))return mn(e);var t=[];for(var n in Ae(e))je.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Rr(e){if(!Qa(e))return function(e){var t=[];if(null!=e)for(var n in Ae(e))t.push(n);return t}(e);var t=_o(e),n=[];for(var r in e)("constructor"!=r||!t&&je.call(e,r))&&n.push(r);return n}function Lr(e,t){return e<t}function zr(e,t){var n=-1,r=Ya(e)?we(e.length):[];return hr(e,function(e,i,o){r[++n]=t(e,i,o)}),r}function Nr(e){var t=co(e);return 1==t.length&&t[0][2]?Ao(t[0][0],t[0][1]):function(n){return n===e||Mr(n,e,t)}}function Br(e,t){return wo(e)&&So(t)?Ao(Ro(e),t):function(r){var i=As(r,e);return i===n&&i===t?ks(r,e):Pr(t,i,3)}}function Vr(e,t,r,i,o){e!==t&&vr(t,function(a,s){if(o||(o=new Xn),Qa(a))!function(e,t,r,i,o,a,s){var l=Io(e,r),c=Io(t,r),u=s.get(c);if(u)Qn(e,r,u);else{var h=a?a(l,c,r+"",e,t,s):n,d=h===n;if(d){var f=Wa(c),p=!f&&Ga(c),g=!f&&!p&&ls(c);h=c,f||p||g?Wa(l)?h=l:$a(l)?h=Ii(l):p?(d=!1,h=Ci(c,!0)):g?(d=!1,h=Si(c,!0)):h=[]:rs(c)||Ua(c)?(h=l,Ua(l)?h=ms(l):Qa(l)&&!qa(l)||(h=mo(c))):d=!1}d&&(s.set(c,h),o(h,c,i,a,s),s.delete(c)),Qn(e,r,h)}}(e,t,s,r,Vr,i,o);else{var l=i?i(Io(e,s),a,s+"",e,t,o):n;l===n&&(l=a),Qn(e,s,l)}},Ps)}function Ur(e,t){var r=e.length;if(r)return bo(t+=t<0?r:0,r)?e[t]:n}function Wr(e,t,n){t=t.length?Pt(t,function(e){return Wa(e)?function(t){return Cr(t,1===e.length?e[0]:e)}:e}):[nl];var r=-1;t=Pt(t,Kt(so()));var i=zr(e,function(e,n,i){var o=Pt(t,function(t){return t(e)});return{criteria:o,index:++r,value:e}});return function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(i,function(e,t){return function(e,t,n){for(var r=-1,i=e.criteria,o=t.criteria,a=i.length,s=n.length;++r<a;){var l=Ai(i[r],o[r]);if(l)return r>=s?l:l*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)})}function Hr(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var a=t[r],s=Cr(e,a);n(s,a)&&Jr(o,bi(a,e),s)}return o}function Yr(e,t,n,r){var i=r?Bt:Nt,o=-1,a=t.length,s=e;for(e===t&&(t=Ii(t)),n&&(s=Pt(e,Kt(n)));++o<a;)for(var l=0,c=t[o],u=n?n(c):c;(l=i(s,u,l,r))>-1;)s!==e&&Xe.call(s,l,1),Xe.call(e,l,1);return e}function $r(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;bo(i)?Xe.call(e,i,1):ui(e,i)}}return e}function Gr(e,t){return e+gt(xn()*(t-e+1))}function Xr(e,t){var n="";if(!e||t<1||t>u)return n;do{t%2&&(n+=e),(t=gt(t/2))&&(e+=e)}while(t);return n}function Kr(e,t){return Po(ko(e,t,nl),e+"")}function qr(e){return qn(Ns(e))}function Zr(e,t){var n=Ns(e);return jo(n,ar(t,0,n.length))}function Jr(e,t,r,i){if(!Qa(e))return e;for(var o=-1,a=(t=bi(t,e)).length,s=a-1,l=e;null!=l&&++o<a;){var c=Ro(t[o]),u=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(o!=s){var h=l[c];(u=i?i(h,c,l):n)===n&&(u=Qa(h)?h:bo(t[o+1])?[]:{})}er(l,c,u),l=l[c]}return e}var Qr=On?function(e,t){return On.set(e,t),e}:nl,ei=at?function(e,t){return at(e,"toString",{configurable:!0,enumerable:!1,value:Qs(t),writable:!0})}:nl;function ti(e){return jo(Ns(e))}function ni(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=we(i);++r<i;)o[r]=e[r+t];return o}function ri(e,t){var n;return hr(e,function(e,r,i){return!(n=t(e,r,i))}),!!n}function ii(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;r<i;){var o=r+i>>>1,a=e[o];null!==a&&!ss(a)&&(n?a<=t:a<t)?r=o+1:i=o}return i}return oi(e,t,nl,n)}function oi(e,t,r,i){var o=0,a=null==e?0:e.length;if(0===a)return 0;for(var s=(t=r(t))!=t,l=null===t,c=ss(t),u=t===n;o<a;){var h=gt((o+a)/2),d=r(e[h]),f=d!==n,p=null===d,g=d==d,m=ss(d);if(s)var v=i||g;else v=u?g&&(i||f):l?g&&f&&(i||!p):c?g&&f&&!p&&(i||!m):!p&&!m&&(i?d<=t:d<t);v?o=h+1:a=h}return bn(a,4294967294)}function ai(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n],s=t?t(a):a;if(!n||!Na(s,l)){var l=s;o[i++]=0===a?0:a}}return o}function si(e){return"number"==typeof e?e:ss(e)?h:+e}function li(e){if("string"==typeof e)return e;if(Wa(e))return Pt(e,li)+"";if(ss(e))return zn?zn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ci(e,t,n){var r=-1,i=Ot,o=e.length,a=!0,s=[],l=s;if(n)a=!1,i=Et;else if(o>=200){var c=t?null:Xi(e);if(c)return ln(c);a=!1,i=Zt,l=new Gn}else l=t?[]:s;e:for(;++r<o;){var u=e[r],h=t?t(u):u;if(u=n||0!==u?u:0,a&&h==h){for(var d=l.length;d--;)if(l[d]===h)continue e;t&&l.push(h),s.push(u)}else i(l,h,n)||(l!==s&&l.push(h),s.push(u))}return s}function ui(e,t){return null==(e=To(e,t=bi(t,e)))||delete e[Ro(Ko(t))]}function hi(e,t,n,r){return Jr(e,t,n(Cr(e,t)),r)}function di(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?ni(e,r?0:o,r?o+1:i):ni(e,r?o+1:0,r?i:o)}function fi(e,t){var n=e;return n instanceof Wn&&(n=n.value()),Ft(t,function(e,t){return t.func.apply(t.thisArg,Mt([e],t.args))},n)}function pi(e,t,n){var r=e.length;if(r<2)return r?ci(e[0]):[];for(var i=-1,o=we(r);++i<r;)for(var a=e[i],s=-1;++s<r;)s!=i&&(o[i]=ur(o[i]||a,e[s],t,n));return ci(mr(o,1),t,n)}function gi(e,t,r){for(var i=-1,o=e.length,a=t.length,s={};++i<o;){var l=i<a?t[i]:n;r(s,e[i],l)}return s}function mi(e){return $a(e)?e:[]}function vi(e){return"function"==typeof e?e:nl}function bi(e,t){return Wa(e)?e:wo(e,t)?[e]:Do(vs(e))}var yi=Kr;function wi(e,t,r){var i=e.length;return r=r===n?i:r,!t&&r>=i?e:ni(e,t,r)}var xi=ct||function(e){return ht.clearTimeout(e)};function Ci(e,t){if(t)return e.slice();var n=e.length,r=He?He(n):new e.constructor(n);return e.copy(r),r}function _i(e){var t=new e.constructor(e.byteLength);return new We(t).set(new We(e)),t}function Si(e,t){var n=t?_i(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Ai(e,t){if(e!==t){var r=e!==n,i=null===e,o=e==e,a=ss(e),s=t!==n,l=null===t,c=t==t,u=ss(t);if(!l&&!u&&!a&&e>t||a&&s&&c&&!l&&!u||i&&s&&c||!r&&c||!o)return 1;if(!i&&!a&&!u&&e<t||u&&r&&o&&!i&&!a||l&&r&&o||!s&&o||!c)return-1}return 0}function ki(e,t,n,r){for(var i=-1,o=e.length,a=n.length,s=-1,l=t.length,c=vn(o-a,0),u=we(l+c),h=!r;++s<l;)u[s]=t[s];for(;++i<a;)(h||i<o)&&(u[n[i]]=e[i]);for(;c--;)u[s++]=e[i++];return u}function Ti(e,t,n,r){for(var i=-1,o=e.length,a=-1,s=n.length,l=-1,c=t.length,u=vn(o-s,0),h=we(u+c),d=!r;++i<u;)h[i]=e[i];for(var f=i;++l<c;)h[f+l]=t[l];for(;++a<s;)(d||i<o)&&(h[f+n[a]]=e[i++]);return h}function Ii(e,t){var n=-1,r=e.length;for(t||(t=we(r));++n<r;)t[n]=e[n];return t}function Oi(e,t,r,i){var o=!r;r||(r={});for(var a=-1,s=t.length;++a<s;){var l=t[a],c=i?i(r[l],e[l],l,r,e):n;c===n&&(c=e[l]),o?ir(r,l,c):er(r,l,c)}return r}function Ei(e,t){return function(n,r){var i=Wa(n)?St:nr,o=t?t():{};return i(n,e,so(r,2),o)}}function Pi(e){return Kr(function(t,r){var i=-1,o=r.length,a=o>1?r[o-1]:n,s=o>2?r[2]:n;for(a=e.length>3&&"function"==typeof a?(o--,a):n,s&&yo(r[0],r[1],s)&&(a=o<3?n:a,o=1),t=Ae(t);++i<o;){var l=r[i];l&&e(t,l,i,a)}return t})}function Mi(e,t){return function(n,r){if(null==n)return n;if(!Ya(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=Ae(n);(t?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function Fi(e){return function(t,n,r){for(var i=-1,o=Ae(t),a=r(t),s=a.length;s--;){var l=a[e?s:++i];if(!1===n(o[l],l,o))break}return t}}function ji(e){return function(t){var r=rn(t=vs(t))?dn(t):n,i=r?r[0]:t.charAt(0),o=r?wi(r,1).join(""):t.slice(1);return i[e]()+o}}function Di(e){return function(t){return Ft(qs(Us(t).replace(qe,"")),e,"")}}function Ri(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Bn(e.prototype),r=e.apply(n,t);return Qa(r)?r:n}}function Li(e){return function(t,r,i){var o=Ae(t);if(!Ya(t)){var a=so(r,3);t=Es(t),r=function(e){return a(o[e],e,o)}}var s=e(t,r,i);return s>-1?o[a?t[s]:s]:n}}function zi(e){return to(function(t){var i=t.length,o=i,a=Un.prototype.thru;for(e&&t.reverse();o--;){var s=t[o];if("function"!=typeof s)throw new Ie(r);if(a&&!l&&"wrapper"==oo(s))var l=new Un([],!0)}for(o=l?o:i;++o<i;){var c=oo(s=t[o]),u="wrapper"==c?io(s):n;l=u&&xo(u[0])&&424==u[1]&&!u[4].length&&1==u[9]?l[oo(u[0])].apply(l,u[3]):1==s.length&&xo(s)?l[c]():l.thru(s)}return function(){var e=arguments,n=e[0];if(l&&1==e.length&&Wa(n))return l.plant(n).value();for(var r=0,o=i?t[r].apply(this,e):n;++r<i;)o=t[r].call(this,o);return o}})}function Ni(e,t,r,i,o,a,l,c,u,h){var d=t&s,f=1&t,p=2&t,g=24&t,m=512&t,v=p?n:Ri(e);return function s(){for(var b=arguments.length,y=we(b),w=b;w--;)y[w]=arguments[w];if(g)var x=ao(s),C=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(y,x);if(i&&(y=ki(y,i,o,g)),a&&(y=Ti(y,a,l,g)),b-=C,g&&b<h){var _=sn(y,x);return $i(e,t,Ni,s.placeholder,r,y,_,c,u,h-b)}var S=f?r:this,A=p?S[e]:e;return b=y.length,c?y=function(e,t){for(var r=e.length,i=bn(t.length,r),o=Ii(e);i--;){var a=t[i];e[i]=bo(a,r)?o[a]:n}return e}(y,c):m&&b>1&&y.reverse(),d&&u<b&&(y.length=u),this&&this!==ht&&this instanceof s&&(A=v||Ri(A)),A.apply(S,y)}}function Bi(e,t){return function(n,r){return function(e,t,n,r){return yr(e,function(e,i,o){t(r,n(e),i,o)}),r}(n,e,t(r),{})}}function Vi(e,t){return function(r,i){var o;if(r===n&&i===n)return t;if(r!==n&&(o=r),i!==n){if(o===n)return i;"string"==typeof r||"string"==typeof i?(r=li(r),i=li(i)):(r=si(r),i=si(i)),o=e(r,i)}return o}}function Ui(e){return to(function(t){return t=Pt(t,Kt(so())),Kr(function(n){var r=this;return e(t,function(e){return _t(e,r,n)})})})}function Wi(e,t){var r=(t=t===n?" ":li(t)).length;if(r<2)return r?Xr(t,e):t;var i=Xr(t,ft(e/hn(t)));return rn(t)?wi(dn(i),0,e).join(""):i.slice(0,e)}function Hi(e){return function(t,r,i){return i&&"number"!=typeof i&&yo(t,r,i)&&(r=i=n),t=ds(t),r===n?(r=t,t=0):r=ds(r),function(e,t,n,r){for(var i=-1,o=vn(ft((t-e)/(n||1)),0),a=we(o);o--;)a[r?o:++i]=e,e+=n;return a}(t,r,i=i===n?t<r?1:-1:ds(i),e)}}function Yi(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=gs(t),n=gs(n)),e(t,n)}}function $i(e,t,r,i,o,s,l,c,u,h){var d=8&t;t|=d?a:64,4&(t&=~(d?64:a))||(t&=-4);var f=[e,t,o,d?s:n,d?l:n,d?n:s,d?n:l,c,u,h],p=r.apply(n,f);return xo(e)&&Oo(p,f),p.placeholder=i,Mo(p,e,t)}function Gi(e){var t=Se[e];return function(e,n){if(e=gs(e),(n=null==n?0:bn(fs(n),292))&&Ht(e)){var r=(vs(e)+"e").split("e");return+((r=(vs(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Xi=kn&&1/ln(new kn([,-0]))[1]==c?function(e){return new kn(e)}:sl;function Ki(e){return function(t){var n=po(t);return n==x?on(t):n==k?un(t):function(e,t){return Pt(t,function(t){return[t,e[t]]})}(t,e(t))}}function qi(e,t,i,c,u,h,d,f){var p=2&t;if(!p&&"function"!=typeof e)throw new Ie(r);var g=c?c.length:0;if(g||(t&=-97,c=u=n),d=d===n?d:vn(fs(d),0),f=f===n?f:fs(f),g-=u?u.length:0,64&t){var m=c,v=u;c=u=n}var b=p?n:io(e),y=[e,t,i,c,u,m,v,h,d,f];if(b&&function(e,t){var n=e[1],r=t[1],i=n|r,a=i<131,c=r==s&&8==n||r==s&&n==l&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!a&&!c)return e;1&r&&(e[2]=t[2],i|=1&n?0:4);var u=t[3];if(u){var h=e[3];e[3]=h?ki(h,u,t[4]):u,e[4]=h?sn(e[3],o):t[4]}(u=t[5])&&(h=e[5],e[5]=h?Ti(h,u,t[6]):u,e[6]=h?sn(e[5],o):t[6]),(u=t[7])&&(e[7]=u),r&s&&(e[8]=null==e[8]?t[8]:bn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i}(y,b),e=y[0],t=y[1],i=y[2],c=y[3],u=y[4],!(f=y[9]=y[9]===n?p?0:e.length:vn(y[9]-g,0))&&24&t&&(t&=-25),t&&1!=t)w=8==t||16==t?function(e,t,r){var i=Ri(e);return function o(){for(var a=arguments.length,s=we(a),l=a,c=ao(o);l--;)s[l]=arguments[l];var u=a<3&&s[0]!==c&&s[a-1]!==c?[]:sn(s,c);return(a-=u.length)<r?$i(e,t,Ni,o.placeholder,n,s,u,n,n,r-a):_t(this&&this!==ht&&this instanceof o?i:e,this,s)}}(e,t,f):t!=a&&33!=t||u.length?Ni.apply(n,y):function(e,t,n,r){var i=1&t,o=Ri(e);return function t(){for(var a=-1,s=arguments.length,l=-1,c=r.length,u=we(c+s),h=this&&this!==ht&&this instanceof t?o:e;++l<c;)u[l]=r[l];for(;s--;)u[l++]=arguments[++a];return _t(h,i?n:this,u)}}(e,t,i,c);else var w=function(e,t,n){var r=1&t,i=Ri(e);return function t(){return(this&&this!==ht&&this instanceof t?i:e).apply(r?n:this,arguments)}}(e,t,i);return Mo((b?Qr:Oo)(w,y),e,t)}function Zi(e,t,r,i){return e===n||Na(e,Pe[r])&&!je.call(i,r)?t:e}function Ji(e,t,r,i,o,a){return Qa(e)&&Qa(t)&&(a.set(t,e),Vr(e,t,n,Ji,a),a.delete(t)),e}function Qi(e){return rs(e)?n:e}function eo(e,t,r,i,o,a){var s=1&r,l=e.length,c=t.length;if(l!=c&&!(s&&c>l))return!1;var u=a.get(e),h=a.get(t);if(u&&h)return u==t&&h==e;var d=-1,f=!0,p=2&r?new Gn:n;for(a.set(e,t),a.set(t,e);++d<l;){var g=e[d],m=t[d];if(i)var v=s?i(m,g,d,t,e,a):i(g,m,d,e,t,a);if(v!==n){if(v)continue;f=!1;break}if(p){if(!Dt(t,function(e,t){if(!Zt(p,t)&&(g===e||o(g,e,r,i,a)))return p.push(t)})){f=!1;break}}else if(g!==m&&!o(g,m,r,i,a)){f=!1;break}}return a.delete(e),a.delete(t),f}function to(e){return Po(ko(e,n,Ho),e+"")}function no(e){return _r(e,Es,ho)}function ro(e){return _r(e,Ps,fo)}var io=On?function(e){return On.get(e)}:sl;function oo(e){for(var t=e.name+"",n=En[t],r=je.call(En,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function ao(e){return(je.call(Nn,"placeholder")?Nn:e).placeholder}function so(){var e=Nn.iteratee||rl;return e=e===rl?jr:e,arguments.length?e(arguments[0],arguments[1]):e}function lo(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function co(e){for(var t=Es(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,So(i)]}return t}function uo(e,t){var r=function(e,t){return null==e?n:e[t]}(e,t);return Fr(r)?r:n}var ho=mt?function(e){return null==e?[]:(e=Ae(e),It(mt(e),function(t){return Ge.call(e,t)}))}:pl,fo=mt?function(e){for(var t=[];e;)Mt(t,ho(e)),e=Ye(e);return t}:pl,po=Sr;function go(e,t,n){for(var r=-1,i=(t=bi(t,e)).length,o=!1;++r<i;){var a=Ro(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&Ja(i)&&bo(a,i)&&(Wa(e)||Ua(e))}function mo(e){return"function"!=typeof e.constructor||_o(e)?{}:Bn(Ye(e))}function vo(e){return Wa(e)||Ua(e)||!!(Ke&&e&&e[Ke])}function bo(e,t){var n=typeof e;return!!(t=null==t?u:t)&&("number"==n||"symbol"!=n&&me.test(e))&&e>-1&&e%1==0&&e<t}function yo(e,t,n){if(!Qa(n))return!1;var r=typeof t;return!!("number"==r?Ya(n)&&bo(t,n.length):"string"==r&&t in n)&&Na(n[t],e)}function wo(e,t){if(Wa(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!ss(e))||J.test(e)||!Z.test(e)||null!=t&&e in Ae(t)}function xo(e){var t=oo(e),n=Nn[t];if("function"!=typeof n||!(t in Wn.prototype))return!1;if(e===n)return!0;var r=io(n);return!!r&&e===r[0]}(_n&&po(new _n(new ArrayBuffer(1)))!=P||Sn&&po(new Sn)!=x||An&&po(An.resolve())!=S||kn&&po(new kn)!=k||Tn&&po(new Tn)!=O)&&(po=function(e){var t=Sr(e),r=t==_?e.constructor:n,i=r?Lo(r):"";if(i)switch(i){case Pn:return P;case Mn:return x;case Fn:return S;case jn:return k;case Dn:return O}return t});var Co=Me?qa:gl;function _o(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Pe)}function So(e){return e==e&&!Qa(e)}function Ao(e,t){return function(r){return null!=r&&r[e]===t&&(t!==n||e in Ae(r))}}function ko(e,t,r){return t=vn(t===n?e.length-1:t,0),function(){for(var n=arguments,i=-1,o=vn(n.length-t,0),a=we(o);++i<o;)a[i]=n[t+i];i=-1;for(var s=we(t+1);++i<t;)s[i]=n[i];return s[t]=r(a),_t(e,this,s)}}function To(e,t){return t.length<2?e:Cr(e,ni(t,0,-1))}function Io(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Oo=Fo(Qr),Eo=dt||function(e,t){return ht.setTimeout(e,t)},Po=Fo(ei);function Mo(e,t,n){var r=t+"";return Po(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(ie,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return At(f,function(n){var r="_."+n[0];t&n[1]&&!Ot(e,r)&&e.push(r)}),e.sort()}(function(e){var t=e.match(oe);return t?t[1].split(ae):[]}(r),n)))}function Fo(e){var t=0,r=0;return function(){var i=yn(),o=16-(i-r);if(r=i,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(n,arguments)}}function jo(e,t){var r=-1,i=e.length,o=i-1;for(t=t===n?i:t;++r<t;){var a=Gr(r,o),s=e[a];e[a]=e[r],e[r]=s}return e.length=t,e}var Do=function(e){var t=Fa(e,function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t}(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Q,function(e,n,r,i){t.push(r?i.replace(ce,"$1"):n||e)}),t});function Ro(e){if("string"==typeof e||ss(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Lo(e){if(null!=e){try{return Fe.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function zo(e){if(e instanceof Wn)return e.clone();var t=new Un(e.__wrapped__,e.__chain__);return t.__actions__=Ii(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var No=Kr(function(e,t){return $a(e)?ur(e,mr(t,1,$a,!0)):[]}),Bo=Kr(function(e,t){var r=Ko(t);return $a(r)&&(r=n),$a(e)?ur(e,mr(t,1,$a,!0),so(r,2)):[]}),Vo=Kr(function(e,t){var r=Ko(t);return $a(r)&&(r=n),$a(e)?ur(e,mr(t,1,$a,!0),n,r):[]});function Uo(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:fs(n);return i<0&&(i=vn(r+i,0)),zt(e,so(t,3),i)}function Wo(e,t,r){var i=null==e?0:e.length;if(!i)return-1;var o=i-1;return r!==n&&(o=fs(r),o=r<0?vn(i+o,0):bn(o,i-1)),zt(e,so(t,3),o,!0)}function Ho(e){return null!=e&&e.length?mr(e,1):[]}function Yo(e){return e&&e.length?e[0]:n}var $o=Kr(function(e){var t=Pt(e,mi);return t.length&&t[0]===e[0]?Ir(t):[]}),Go=Kr(function(e){var t=Ko(e),r=Pt(e,mi);return t===Ko(r)?t=n:r.pop(),r.length&&r[0]===e[0]?Ir(r,so(t,2)):[]}),Xo=Kr(function(e){var t=Ko(e),r=Pt(e,mi);return(t="function"==typeof t?t:n)&&r.pop(),r.length&&r[0]===e[0]?Ir(r,n,t):[]});function Ko(e){var t=null==e?0:e.length;return t?e[t-1]:n}var qo=Kr(Zo);function Zo(e,t){return e&&e.length&&t&&t.length?Yr(e,t):e}var Jo=to(function(e,t){var n=null==e?0:e.length,r=or(e,t);return $r(e,Pt(t,function(e){return bo(e,n)?+e:e}).sort(Ai)),r});function Qo(e){return null==e?e:Cn.call(e)}var ea=Kr(function(e){return ci(mr(e,1,$a,!0))}),ta=Kr(function(e){var t=Ko(e);return $a(t)&&(t=n),ci(mr(e,1,$a,!0),so(t,2))}),na=Kr(function(e){var t=Ko(e);return t="function"==typeof t?t:n,ci(mr(e,1,$a,!0),n,t)});function ra(e){if(!e||!e.length)return[];var t=0;return e=It(e,function(e){if($a(e))return t=vn(e.length,t),!0}),Gt(t,function(t){return Pt(e,Wt(t))})}function ia(e,t){if(!e||!e.length)return[];var r=ra(e);return null==t?r:Pt(r,function(e){return _t(t,n,e)})}var oa=Kr(function(e,t){return $a(e)?ur(e,t):[]}),aa=Kr(function(e){return pi(It(e,$a))}),sa=Kr(function(e){var t=Ko(e);return $a(t)&&(t=n),pi(It(e,$a),so(t,2))}),la=Kr(function(e){var t=Ko(e);return t="function"==typeof t?t:n,pi(It(e,$a),n,t)}),ca=Kr(ra),ua=Kr(function(e){var t=e.length,r=t>1?e[t-1]:n;return r="function"==typeof r?(e.pop(),r):n,ia(e,r)});function ha(e){var t=Nn(e);return t.__chain__=!0,t}function da(e,t){return t(e)}var fa=to(function(e){var t=e.length,r=t?e[0]:0,i=this.__wrapped__,o=function(t){return or(t,e)};return!(t>1||this.__actions__.length)&&i instanceof Wn&&bo(r)?((i=i.slice(r,+r+(t?1:0))).__actions__.push({func:da,args:[o],thisArg:n}),new Un(i,this.__chain__).thru(function(e){return t&&!e.length&&e.push(n),e})):this.thru(o)}),pa=Ei(function(e,t,n){je.call(e,n)?++e[n]:ir(e,n,1)}),ga=Li(Uo),ma=Li(Wo);function va(e,t){return(Wa(e)?At:hr)(e,so(t,3))}function ba(e,t){return(Wa(e)?kt:dr)(e,so(t,3))}var ya=Ei(function(e,t,n){je.call(e,n)?e[n].push(t):ir(e,n,[t])}),wa=Kr(function(e,t,n){var r=-1,i="function"==typeof t,o=Ya(e)?we(e.length):[];return hr(e,function(e){o[++r]=i?_t(t,e,n):Or(e,t,n)}),o}),xa=Ei(function(e,t,n){ir(e,n,t)});function Ca(e,t){return(Wa(e)?Pt:zr)(e,so(t,3))}var _a=Ei(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),Sa=Kr(function(e,t){if(null==e)return[];var n=t.length;return n>1&&yo(e,t[0],t[1])?t=[]:n>2&&yo(t[0],t[1],t[2])&&(t=[t[0]]),Wr(e,mr(t,1),[])}),Aa=ut||function(){return ht.Date.now()};function ka(e,t,r){return t=r?n:t,t=e&&null==t?e.length:t,qi(e,s,n,n,n,n,t)}function Ta(e,t){var i;if("function"!=typeof t)throw new Ie(r);return e=fs(e),function(){return--e>0&&(i=t.apply(this,arguments)),e<=1&&(t=n),i}}var Ia=Kr(function(e,t,n){var r=1;if(n.length){var i=sn(n,ao(Ia));r|=a}return qi(e,r,t,n,i)}),Oa=Kr(function(e,t,n){var r=3;if(n.length){var i=sn(n,ao(Oa));r|=a}return qi(t,r,e,n,i)});function Ea(e,t,i){var o,a,s,l,c,u,h=0,d=!1,f=!1,p=!0;if("function"!=typeof e)throw new Ie(r);function g(t){var r=o,i=a;return o=a=n,h=t,l=e.apply(i,r)}function m(e){var r=e-u;return u===n||r>=t||r<0||f&&e-h>=s}function v(){var e=Aa();if(m(e))return b(e);c=Eo(v,function(e){var n=t-(e-u);return f?bn(n,s-(e-h)):n}(e))}function b(e){return c=n,p&&o?g(e):(o=a=n,l)}function y(){var e=Aa(),r=m(e);if(o=arguments,a=this,u=e,r){if(c===n)return function(e){return h=e,c=Eo(v,t),d?g(e):l}(u);if(f)return xi(c),c=Eo(v,t),g(u)}return c===n&&(c=Eo(v,t)),l}return t=gs(t)||0,Qa(i)&&(d=!!i.leading,s=(f="maxWait"in i)?vn(gs(i.maxWait)||0,t):s,p="trailing"in i?!!i.trailing:p),y.cancel=function(){c!==n&&xi(c),h=0,o=u=a=c=n},y.flush=function(){return c===n?l:b(Aa())},y}var Pa=Kr(function(e,t){return cr(e,1,t)}),Ma=Kr(function(e,t,n){return cr(e,gs(t)||0,n)});function Fa(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ie(r);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Fa.Cache||$n),n}function ja(e){if("function"!=typeof e)throw new Ie(r);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Fa.Cache=$n;var Da=yi(function(e,t){var n=(t=1==t.length&&Wa(t[0])?Pt(t[0],Kt(so())):Pt(mr(t,1),Kt(so()))).length;return Kr(function(r){for(var i=-1,o=bn(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return _t(e,this,r)})}),Ra=Kr(function(e,t){var r=sn(t,ao(Ra));return qi(e,a,n,t,r)}),La=Kr(function(e,t){var r=sn(t,ao(La));return qi(e,64,n,t,r)}),za=to(function(e,t){return qi(e,l,n,n,n,t)});function Na(e,t){return e===t||e!=e&&t!=t}var Ba=Yi(Ar),Va=Yi(function(e,t){return e>=t}),Ua=Er(function(){return arguments}())?Er:function(e){return es(e)&&je.call(e,"callee")&&!Ge.call(e,"callee")},Wa=we.isArray,Ha=vt?Kt(vt):function(e){return es(e)&&Sr(e)==E};function Ya(e){return null!=e&&Ja(e.length)&&!qa(e)}function $a(e){return es(e)&&Ya(e)}var Ga=Rt||gl,Xa=bt?Kt(bt):function(e){return es(e)&&Sr(e)==v};function Ka(e){if(!es(e))return!1;var t=Sr(e);return t==b||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!rs(e)}function qa(e){if(!Qa(e))return!1;var t=Sr(e);return t==y||t==w||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Za(e){return"number"==typeof e&&e==fs(e)}function Ja(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=u}function Qa(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function es(e){return null!=e&&"object"==typeof e}var ts=yt?Kt(yt):function(e){return es(e)&&po(e)==x};function ns(e){return"number"==typeof e||es(e)&&Sr(e)==C}function rs(e){if(!es(e)||Sr(e)!=_)return!1;var t=Ye(e);if(null===t)return!0;var n=je.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Fe.call(n)==ze}var is=wt?Kt(wt):function(e){return es(e)&&Sr(e)==A},os=xt?Kt(xt):function(e){return es(e)&&po(e)==k};function as(e){return"string"==typeof e||!Wa(e)&&es(e)&&Sr(e)==T}function ss(e){return"symbol"==typeof e||es(e)&&Sr(e)==I}var ls=Ct?Kt(Ct):function(e){return es(e)&&Ja(e.length)&&!!it[Sr(e)]},cs=Yi(Lr),us=Yi(function(e,t){return e<=t});function hs(e){if(!e)return[];if(Ya(e))return as(e)?dn(e):Ii(e);if(Je&&e[Je])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Je]());var t=po(e);return(t==x?on:t==k?ln:Ns)(e)}function ds(e){return e?(e=gs(e))===c||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function fs(e){var t=ds(e),n=t%1;return t==t?n?t-n:t:0}function ps(e){return e?ar(fs(e),0,d):0}function gs(e){if("number"==typeof e)return e;if(ss(e))return h;if(Qa(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Qa(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Xt(e);var n=fe.test(e);return n||ge.test(e)?lt(e.slice(2),n?2:8):de.test(e)?h:+e}function ms(e){return Oi(e,Ps(e))}function vs(e){return null==e?"":li(e)}var bs=Pi(function(e,t){if(_o(t)||Ya(t))Oi(t,Es(t),e);else for(var n in t)je.call(t,n)&&er(e,n,t[n])}),ys=Pi(function(e,t){Oi(t,Ps(t),e)}),ws=Pi(function(e,t,n,r){Oi(t,Ps(t),e,r)}),xs=Pi(function(e,t,n,r){Oi(t,Es(t),e,r)}),Cs=to(or),_s=Kr(function(e,t){e=Ae(e);var r=-1,i=t.length,o=i>2?t[2]:n;for(o&&yo(t[0],t[1],o)&&(i=1);++r<i;)for(var a=t[r],s=Ps(a),l=-1,c=s.length;++l<c;){var u=s[l],h=e[u];(h===n||Na(h,Pe[u])&&!je.call(e,u))&&(e[u]=a[u])}return e}),Ss=Kr(function(e){return e.push(n,Ji),_t(Fs,n,e)});function As(e,t,r){var i=null==e?n:Cr(e,t);return i===n?r:i}function ks(e,t){return null!=e&&go(e,t,Tr)}var Ts=Bi(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Le.call(t)),e[t]=n},Qs(nl)),Is=Bi(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Le.call(t)),je.call(e,t)?e[t].push(n):e[t]=[n]},so),Os=Kr(Or);function Es(e){return Ya(e)?Kn(e):Dr(e)}function Ps(e){return Ya(e)?Kn(e,!0):Rr(e)}var Ms=Pi(function(e,t,n){Vr(e,t,n)}),Fs=Pi(function(e,t,n,r){Vr(e,t,n,r)}),js=to(function(e,t){var n={};if(null==e)return n;var r=!1;t=Pt(t,function(t){return t=bi(t,e),r||(r=t.length>1),t}),Oi(e,ro(e),n),r&&(n=sr(n,7,Qi));for(var i=t.length;i--;)ui(n,t[i]);return n}),Ds=to(function(e,t){return null==e?{}:function(e,t){return Hr(e,t,function(t,n){return ks(e,n)})}(e,t)});function Rs(e,t){if(null==e)return{};var n=Pt(ro(e),function(e){return[e]});return t=so(t),Hr(e,n,function(e,n){return t(e,n[0])})}var Ls=Ki(Es),zs=Ki(Ps);function Ns(e){return null==e?[]:qt(e,Es(e))}var Bs=Di(function(e,t,n){return t=t.toLowerCase(),e+(n?Vs(t):t)});function Vs(e){return Ks(vs(e).toLowerCase())}function Us(e){return(e=vs(e))&&e.replace(ve,en).replace(Ze,"")}var Ws=Di(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),Hs=Di(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),Ys=ji("toLowerCase"),$s=Di(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),Gs=Di(function(e,t,n){return e+(n?" ":"")+Ks(t)}),Xs=Di(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),Ks=ji("toUpperCase");function qs(e,t,r){return e=vs(e),(t=r?n:t)===n?function(e){return tt.test(e)}(e)?function(e){return e.match(Qe)||[]}(e):function(e){return e.match(se)||[]}(e):e.match(t)||[]}var Zs=Kr(function(e,t){try{return _t(e,n,t)}catch(e){return Ka(e)?e:new Ce(e)}}),Js=to(function(e,t){return At(t,function(t){t=Ro(t),ir(e,t,Ia(e[t],e))}),e});function Qs(e){return function(){return e}}var el=zi(),tl=zi(!0);function nl(e){return e}function rl(e){return jr("function"==typeof e?e:sr(e,1))}var il=Kr(function(e,t){return function(n){return Or(n,e,t)}}),ol=Kr(function(e,t){return function(n){return Or(e,n,t)}});function al(e,t,n){var r=Es(t),i=xr(t,r);null!=n||Qa(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=xr(t,Es(t)));var o=!(Qa(n)&&"chain"in n&&!n.chain),a=qa(e);return At(i,function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__);return(n.__actions__=Ii(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Mt([this.value()],arguments))})}),e}function sl(){}var ll=Ui(Pt),cl=Ui(Tt),ul=Ui(Dt);function hl(e){return wo(e)?Wt(Ro(e)):function(e){return function(t){return Cr(t,e)}}(e)}var dl=Hi(),fl=Hi(!0);function pl(){return[]}function gl(){return!1}var ml,vl=Vi(function(e,t){return e+t},0),bl=Gi("ceil"),yl=Vi(function(e,t){return e/t},1),wl=Gi("floor"),xl=Vi(function(e,t){return e*t},1),Cl=Gi("round"),_l=Vi(function(e,t){return e-t},0);return Nn.after=function(e,t){if("function"!=typeof t)throw new Ie(r);return e=fs(e),function(){if(--e<1)return t.apply(this,arguments)}},Nn.ary=ka,Nn.assign=bs,Nn.assignIn=ys,Nn.assignInWith=ws,Nn.assignWith=xs,Nn.at=Cs,Nn.before=Ta,Nn.bind=Ia,Nn.bindAll=Js,Nn.bindKey=Oa,Nn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Wa(e)?e:[e]},Nn.chain=ha,Nn.chunk=function(e,t,r){t=(r?yo(e,t,r):t===n)?1:vn(fs(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var o=0,a=0,s=we(ft(i/t));o<i;)s[a++]=ni(e,o,o+=t);return s},Nn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i},Nn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=we(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return Mt(Wa(n)?Ii(n):[n],mr(t,1))},Nn.cond=function(e){var t=null==e?0:e.length,n=so();return e=t?Pt(e,function(e){if("function"!=typeof e[1])throw new Ie(r);return[n(e[0]),e[1]]}):[],Kr(function(n){for(var r=-1;++r<t;){var i=e[r];if(_t(i[0],this,n))return _t(i[1],this,n)}})},Nn.conforms=function(e){return function(e){var t=Es(e);return function(n){return lr(n,e,t)}}(sr(e,1))},Nn.constant=Qs,Nn.countBy=pa,Nn.create=function(e,t){var n=Bn(e);return null==t?n:rr(n,t)},Nn.curry=function e(t,r,i){var o=qi(t,8,n,n,n,n,n,r=i?n:r);return o.placeholder=e.placeholder,o},Nn.curryRight=function e(t,r,i){var o=qi(t,16,n,n,n,n,n,r=i?n:r);return o.placeholder=e.placeholder,o},Nn.debounce=Ea,Nn.defaults=_s,Nn.defaultsDeep=Ss,Nn.defer=Pa,Nn.delay=Ma,Nn.difference=No,Nn.differenceBy=Bo,Nn.differenceWith=Vo,Nn.drop=function(e,t,r){var i=null==e?0:e.length;return i?ni(e,(t=r||t===n?1:fs(t))<0?0:t,i):[]},Nn.dropRight=function(e,t,r){var i=null==e?0:e.length;return i?ni(e,0,(t=i-(t=r||t===n?1:fs(t)))<0?0:t):[]},Nn.dropRightWhile=function(e,t){return e&&e.length?di(e,so(t,3),!0,!0):[]},Nn.dropWhile=function(e,t){return e&&e.length?di(e,so(t,3),!0):[]},Nn.fill=function(e,t,r,i){var o=null==e?0:e.length;return o?(r&&"number"!=typeof r&&yo(e,t,r)&&(r=0,i=o),function(e,t,r,i){var o=e.length;for((r=fs(r))<0&&(r=-r>o?0:o+r),(i=i===n||i>o?o:fs(i))<0&&(i+=o),i=r>i?0:ps(i);r<i;)e[r++]=t;return e}(e,t,r,i)):[]},Nn.filter=function(e,t){return(Wa(e)?It:gr)(e,so(t,3))},Nn.flatMap=function(e,t){return mr(Ca(e,t),1)},Nn.flatMapDeep=function(e,t){return mr(Ca(e,t),c)},Nn.flatMapDepth=function(e,t,r){return r=r===n?1:fs(r),mr(Ca(e,t),r)},Nn.flatten=Ho,Nn.flattenDeep=function(e){return null!=e&&e.length?mr(e,c):[]},Nn.flattenDepth=function(e,t){return null!=e&&e.length?mr(e,t=t===n?1:fs(t)):[]},Nn.flip=function(e){return qi(e,512)},Nn.flow=el,Nn.flowRight=tl,Nn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},Nn.functions=function(e){return null==e?[]:xr(e,Es(e))},Nn.functionsIn=function(e){return null==e?[]:xr(e,Ps(e))},Nn.groupBy=ya,Nn.initial=function(e){return null!=e&&e.length?ni(e,0,-1):[]},Nn.intersection=$o,Nn.intersectionBy=Go,Nn.intersectionWith=Xo,Nn.invert=Ts,Nn.invertBy=Is,Nn.invokeMap=wa,Nn.iteratee=rl,Nn.keyBy=xa,Nn.keys=Es,Nn.keysIn=Ps,Nn.map=Ca,Nn.mapKeys=function(e,t){var n={};return t=so(t,3),yr(e,function(e,r,i){ir(n,t(e,r,i),e)}),n},Nn.mapValues=function(e,t){var n={};return t=so(t,3),yr(e,function(e,r,i){ir(n,r,t(e,r,i))}),n},Nn.matches=function(e){return Nr(sr(e,1))},Nn.matchesProperty=function(e,t){return Br(e,sr(t,1))},Nn.memoize=Fa,Nn.merge=Ms,Nn.mergeWith=Fs,Nn.method=il,Nn.methodOf=ol,Nn.mixin=al,Nn.negate=ja,Nn.nthArg=function(e){return e=fs(e),Kr(function(t){return Ur(t,e)})},Nn.omit=js,Nn.omitBy=function(e,t){return Rs(e,ja(so(t)))},Nn.once=function(e){return Ta(2,e)},Nn.orderBy=function(e,t,r,i){return null==e?[]:(Wa(t)||(t=null==t?[]:[t]),Wa(r=i?n:r)||(r=null==r?[]:[r]),Wr(e,t,r))},Nn.over=ll,Nn.overArgs=Da,Nn.overEvery=cl,Nn.overSome=ul,Nn.partial=Ra,Nn.partialRight=La,Nn.partition=_a,Nn.pick=Ds,Nn.pickBy=Rs,Nn.property=hl,Nn.propertyOf=function(e){return function(t){return null==e?n:Cr(e,t)}},Nn.pull=qo,Nn.pullAll=Zo,Nn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Yr(e,t,so(n,2)):e},Nn.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?Yr(e,t,n,r):e},Nn.pullAt=Jo,Nn.range=dl,Nn.rangeRight=fl,Nn.rearg=za,Nn.reject=function(e,t){return(Wa(e)?It:gr)(e,ja(so(t,3)))},Nn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=so(t,3);++r<o;){var a=e[r];t(a,r,e)&&(n.push(a),i.push(r))}return $r(e,i),n},Nn.rest=function(e,t){if("function"!=typeof e)throw new Ie(r);return Kr(e,t=t===n?t:fs(t))},Nn.reverse=Qo,Nn.sampleSize=function(e,t,r){return t=(r?yo(e,t,r):t===n)?1:fs(t),(Wa(e)?Zn:Zr)(e,t)},Nn.set=function(e,t,n){return null==e?e:Jr(e,t,n)},Nn.setWith=function(e,t,r,i){return i="function"==typeof i?i:n,null==e?e:Jr(e,t,r,i)},Nn.shuffle=function(e){return(Wa(e)?Jn:ti)(e)},Nn.slice=function(e,t,r){var i=null==e?0:e.length;return i?(r&&"number"!=typeof r&&yo(e,t,r)?(t=0,r=i):(t=null==t?0:fs(t),r=r===n?i:fs(r)),ni(e,t,r)):[]},Nn.sortBy=Sa,Nn.sortedUniq=function(e){return e&&e.length?ai(e):[]},Nn.sortedUniqBy=function(e,t){return e&&e.length?ai(e,so(t,2)):[]},Nn.split=function(e,t,r){return r&&"number"!=typeof r&&yo(e,t,r)&&(t=r=n),(r=r===n?d:r>>>0)?(e=vs(e))&&("string"==typeof t||null!=t&&!is(t))&&!(t=li(t))&&rn(e)?wi(dn(e),0,r):e.split(t,r):[]},Nn.spread=function(e,t){if("function"!=typeof e)throw new Ie(r);return t=null==t?0:vn(fs(t),0),Kr(function(n){var r=n[t],i=wi(n,0,t);return r&&Mt(i,r),_t(e,this,i)})},Nn.tail=function(e){var t=null==e?0:e.length;return t?ni(e,1,t):[]},Nn.take=function(e,t,r){return e&&e.length?ni(e,0,(t=r||t===n?1:fs(t))<0?0:t):[]},Nn.takeRight=function(e,t,r){var i=null==e?0:e.length;return i?ni(e,(t=i-(t=r||t===n?1:fs(t)))<0?0:t,i):[]},Nn.takeRightWhile=function(e,t){return e&&e.length?di(e,so(t,3),!1,!0):[]},Nn.takeWhile=function(e,t){return e&&e.length?di(e,so(t,3)):[]},Nn.tap=function(e,t){return t(e),e},Nn.throttle=function(e,t,n){var i=!0,o=!0;if("function"!=typeof e)throw new Ie(r);return Qa(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),Ea(e,t,{leading:i,maxWait:t,trailing:o})},Nn.thru=da,Nn.toArray=hs,Nn.toPairs=Ls,Nn.toPairsIn=zs,Nn.toPath=function(e){return Wa(e)?Pt(e,Ro):ss(e)?[e]:Ii(Do(vs(e)))},Nn.toPlainObject=ms,Nn.transform=function(e,t,n){var r=Wa(e),i=r||Ga(e)||ls(e);if(t=so(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:Qa(e)&&qa(o)?Bn(Ye(e)):{}}return(i?At:yr)(e,function(e,r,i){return t(n,e,r,i)}),n},Nn.unary=function(e){return ka(e,1)},Nn.union=ea,Nn.unionBy=ta,Nn.unionWith=na,Nn.uniq=function(e){return e&&e.length?ci(e):[]},Nn.uniqBy=function(e,t){return e&&e.length?ci(e,so(t,2)):[]},Nn.uniqWith=function(e,t){return t="function"==typeof t?t:n,e&&e.length?ci(e,n,t):[]},Nn.unset=function(e,t){return null==e||ui(e,t)},Nn.unzip=ra,Nn.unzipWith=ia,Nn.update=function(e,t,n){return null==e?e:hi(e,t,vi(n))},Nn.updateWith=function(e,t,r,i){return i="function"==typeof i?i:n,null==e?e:hi(e,t,vi(r),i)},Nn.values=Ns,Nn.valuesIn=function(e){return null==e?[]:qt(e,Ps(e))},Nn.without=oa,Nn.words=qs,Nn.wrap=function(e,t){return Ra(vi(t),e)},Nn.xor=aa,Nn.xorBy=sa,Nn.xorWith=la,Nn.zip=ca,Nn.zipObject=function(e,t){return gi(e||[],t||[],er)},Nn.zipObjectDeep=function(e,t){return gi(e||[],t||[],Jr)},Nn.zipWith=ua,Nn.entries=Ls,Nn.entriesIn=zs,Nn.extend=ys,Nn.extendWith=ws,al(Nn,Nn),Nn.add=vl,Nn.attempt=Zs,Nn.camelCase=Bs,Nn.capitalize=Vs,Nn.ceil=bl,Nn.clamp=function(e,t,r){return r===n&&(r=t,t=n),r!==n&&(r=(r=gs(r))==r?r:0),t!==n&&(t=(t=gs(t))==t?t:0),ar(gs(e),t,r)},Nn.clone=function(e){return sr(e,4)},Nn.cloneDeep=function(e){return sr(e,5)},Nn.cloneDeepWith=function(e,t){return sr(e,5,t="function"==typeof t?t:n)},Nn.cloneWith=function(e,t){return sr(e,4,t="function"==typeof t?t:n)},Nn.conformsTo=function(e,t){return null==t||lr(e,t,Es(t))},Nn.deburr=Us,Nn.defaultTo=function(e,t){return null==e||e!=e?t:e},Nn.divide=yl,Nn.endsWith=function(e,t,r){e=vs(e),t=li(t);var i=e.length,o=r=r===n?i:ar(fs(r),0,i);return(r-=t.length)>=0&&e.slice(r,o)==t},Nn.eq=Na,Nn.escape=function(e){return(e=vs(e))&&G.test(e)?e.replace(Y,tn):e},Nn.escapeRegExp=function(e){return(e=vs(e))&&te.test(e)?e.replace(ee,"\\$&"):e},Nn.every=function(e,t,r){var i=Wa(e)?Tt:fr;return r&&yo(e,t,r)&&(t=n),i(e,so(t,3))},Nn.find=ga,Nn.findIndex=Uo,Nn.findKey=function(e,t){return Lt(e,so(t,3),yr)},Nn.findLast=ma,Nn.findLastIndex=Wo,Nn.findLastKey=function(e,t){return Lt(e,so(t,3),wr)},Nn.floor=wl,Nn.forEach=va,Nn.forEachRight=ba,Nn.forIn=function(e,t){return null==e?e:vr(e,so(t,3),Ps)},Nn.forInRight=function(e,t){return null==e?e:br(e,so(t,3),Ps)},Nn.forOwn=function(e,t){return e&&yr(e,so(t,3))},Nn.forOwnRight=function(e,t){return e&&wr(e,so(t,3))},Nn.get=As,Nn.gt=Ba,Nn.gte=Va,Nn.has=function(e,t){return null!=e&&go(e,t,kr)},Nn.hasIn=ks,Nn.head=Yo,Nn.identity=nl,Nn.includes=function(e,t,n,r){e=Ya(e)?e:Ns(e),n=n&&!r?fs(n):0;var i=e.length;return n<0&&(n=vn(i+n,0)),as(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Nt(e,t,n)>-1},Nn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:fs(n);return i<0&&(i=vn(r+i,0)),Nt(e,t,i)},Nn.inRange=function(e,t,r){return t=ds(t),r===n?(r=t,t=0):r=ds(r),function(e,t,n){return e>=bn(t,n)&&e<vn(t,n)}(e=gs(e),t,r)},Nn.invoke=Os,Nn.isArguments=Ua,Nn.isArray=Wa,Nn.isArrayBuffer=Ha,Nn.isArrayLike=Ya,Nn.isArrayLikeObject=$a,Nn.isBoolean=function(e){return!0===e||!1===e||es(e)&&Sr(e)==m},Nn.isBuffer=Ga,Nn.isDate=Xa,Nn.isElement=function(e){return es(e)&&1===e.nodeType&&!rs(e)},Nn.isEmpty=function(e){if(null==e)return!0;if(Ya(e)&&(Wa(e)||"string"==typeof e||"function"==typeof e.splice||Ga(e)||ls(e)||Ua(e)))return!e.length;var t=po(e);if(t==x||t==k)return!e.size;if(_o(e))return!Dr(e).length;for(var n in e)if(je.call(e,n))return!1;return!0},Nn.isEqual=function(e,t){return Pr(e,t)},Nn.isEqualWith=function(e,t,r){var i=(r="function"==typeof r?r:n)?r(e,t):n;return i===n?Pr(e,t,n,r):!!i},Nn.isError=Ka,Nn.isFinite=function(e){return"number"==typeof e&&Ht(e)},Nn.isFunction=qa,Nn.isInteger=Za,Nn.isLength=Ja,Nn.isMap=ts,Nn.isMatch=function(e,t){return e===t||Mr(e,t,co(t))},Nn.isMatchWith=function(e,t,r){return r="function"==typeof r?r:n,Mr(e,t,co(t),r)},Nn.isNaN=function(e){return ns(e)&&e!=+e},Nn.isNative=function(e){if(Co(e))throw new Ce("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Fr(e)},Nn.isNil=function(e){return null==e},Nn.isNull=function(e){return null===e},Nn.isNumber=ns,Nn.isObject=Qa,Nn.isObjectLike=es,Nn.isPlainObject=rs,Nn.isRegExp=is,Nn.isSafeInteger=function(e){return Za(e)&&e>=-9007199254740991&&e<=u},Nn.isSet=os,Nn.isString=as,Nn.isSymbol=ss,Nn.isTypedArray=ls,Nn.isUndefined=function(e){return e===n},Nn.isWeakMap=function(e){return es(e)&&po(e)==O},Nn.isWeakSet=function(e){return es(e)&&"[object WeakSet]"==Sr(e)},Nn.join=function(e,t){return null==e?"":cn.call(e,t)},Nn.kebabCase=Ws,Nn.last=Ko,Nn.lastIndexOf=function(e,t,r){var i=null==e?0:e.length;if(!i)return-1;var o=i;return r!==n&&(o=(o=fs(r))<0?vn(i+o,0):bn(o,i-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,o):zt(e,Vt,o,!0)},Nn.lowerCase=Hs,Nn.lowerFirst=Ys,Nn.lt=cs,Nn.lte=us,Nn.max=function(e){return e&&e.length?pr(e,nl,Ar):n},Nn.maxBy=function(e,t){return e&&e.length?pr(e,so(t,2),Ar):n},Nn.mean=function(e){return Ut(e,nl)},Nn.meanBy=function(e,t){return Ut(e,so(t,2))},Nn.min=function(e){return e&&e.length?pr(e,nl,Lr):n},Nn.minBy=function(e,t){return e&&e.length?pr(e,so(t,2),Lr):n},Nn.stubArray=pl,Nn.stubFalse=gl,Nn.stubObject=function(){return{}},Nn.stubString=function(){return""},Nn.stubTrue=function(){return!0},Nn.multiply=xl,Nn.nth=function(e,t){return e&&e.length?Ur(e,fs(t)):n},Nn.noConflict=function(){return ht._===this&&(ht._=Ne),this},Nn.noop=sl,Nn.now=Aa,Nn.pad=function(e,t,n){e=vs(e);var r=(t=fs(t))?hn(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Wi(gt(i),n)+e+Wi(ft(i),n)},Nn.padEnd=function(e,t,n){e=vs(e);var r=(t=fs(t))?hn(e):0;return t&&r<t?e+Wi(t-r,n):e},Nn.padStart=function(e,t,n){e=vs(e);var r=(t=fs(t))?hn(e):0;return t&&r<t?Wi(t-r,n)+e:e},Nn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),wn(vs(e).replace(ne,""),t||0)},Nn.random=function(e,t,r){if(r&&"boolean"!=typeof r&&yo(e,t,r)&&(t=r=n),r===n&&("boolean"==typeof t?(r=t,t=n):"boolean"==typeof e&&(r=e,e=n)),e===n&&t===n?(e=0,t=1):(e=ds(e),t===n?(t=e,e=0):t=ds(t)),e>t){var i=e;e=t,t=i}if(r||e%1||t%1){var o=xn();return bn(e+o*(t-e+st("1e-"+((o+"").length-1))),t)}return Gr(e,t)},Nn.reduce=function(e,t,n){var r=Wa(e)?Ft:Yt,i=arguments.length<3;return r(e,so(t,4),n,i,hr)},Nn.reduceRight=function(e,t,n){var r=Wa(e)?jt:Yt,i=arguments.length<3;return r(e,so(t,4),n,i,dr)},Nn.repeat=function(e,t,r){return t=(r?yo(e,t,r):t===n)?1:fs(t),Xr(vs(e),t)},Nn.replace=function(){var e=arguments,t=vs(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Nn.result=function(e,t,r){var i=-1,o=(t=bi(t,e)).length;for(o||(o=1,e=n);++i<o;){var a=null==e?n:e[Ro(t[i])];a===n&&(i=o,a=r),e=qa(a)?a.call(e):a}return e},Nn.round=Cl,Nn.runInContext=e,Nn.sample=function(e){return(Wa(e)?qn:qr)(e)},Nn.size=function(e){if(null==e)return 0;if(Ya(e))return as(e)?hn(e):e.length;var t=po(e);return t==x||t==k?e.size:Dr(e).length},Nn.snakeCase=$s,Nn.some=function(e,t,r){var i=Wa(e)?Dt:ri;return r&&yo(e,t,r)&&(t=n),i(e,so(t,3))},Nn.sortedIndex=function(e,t){return ii(e,t)},Nn.sortedIndexBy=function(e,t,n){return oi(e,t,so(n,2))},Nn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=ii(e,t);if(r<n&&Na(e[r],t))return r}return-1},Nn.sortedLastIndex=function(e,t){return ii(e,t,!0)},Nn.sortedLastIndexBy=function(e,t,n){return oi(e,t,so(n,2),!0)},Nn.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=ii(e,t,!0)-1;if(Na(e[n],t))return n}return-1},Nn.startCase=Gs,Nn.startsWith=function(e,t,n){return e=vs(e),n=null==n?0:ar(fs(n),0,e.length),t=li(t),e.slice(n,n+t.length)==t},Nn.subtract=_l,Nn.sum=function(e){return e&&e.length?$t(e,nl):0},Nn.sumBy=function(e,t){return e&&e.length?$t(e,so(t,2)):0},Nn.template=function(e,t,r){var i=Nn.templateSettings;r&&yo(e,t,r)&&(t=n),e=vs(e),t=ws({},t,i,Zi);var o,a,s=ws({},t.imports,i.imports,Zi),l=Es(s),c=qt(s,l),u=0,h=t.interpolate||be,d="__p += '",f=ke((t.escape||be).source+"|"+h.source+"|"+(h===q?ue:be).source+"|"+(t.evaluate||be).source+"|$","g"),p="//# sourceURL="+(je.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++rt+"]")+"\n";e.replace(f,function(t,n,r,i,s,l){return r||(r=i),d+=e.slice(u,l).replace(ye,nn),n&&(o=!0,d+="' +\n__e("+n+") +\n'"),s&&(a=!0,d+="';\n"+s+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),u=l+t.length,t}),d+="';\n";var g=je.call(t,"variable")&&t.variable;if(g){if(le.test(g))throw new Ce("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(a?d.replace(V,""):d).replace(U,"$1").replace(W,"$1;"),d="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var m=Zs(function(){return _e(l,p+"return "+d).apply(n,c)});if(m.source=d,Ka(m))throw m;return m},Nn.times=function(e,t){if((e=fs(e))<1||e>u)return[];var n=d,r=bn(e,d);t=so(t),e-=d;for(var i=Gt(r,t);++n<e;)t(n);return i},Nn.toFinite=ds,Nn.toInteger=fs,Nn.toLength=ps,Nn.toLower=function(e){return vs(e).toLowerCase()},Nn.toNumber=gs,Nn.toSafeInteger=function(e){return e?ar(fs(e),-9007199254740991,u):0===e?e:0},Nn.toString=vs,Nn.toUpper=function(e){return vs(e).toUpperCase()},Nn.trim=function(e,t,r){if((e=vs(e))&&(r||t===n))return Xt(e);if(!e||!(t=li(t)))return e;var i=dn(e),o=dn(t);return wi(i,Jt(i,o),Qt(i,o)+1).join("")},Nn.trimEnd=function(e,t,r){if((e=vs(e))&&(r||t===n))return e.slice(0,fn(e)+1);if(!e||!(t=li(t)))return e;var i=dn(e);return wi(i,0,Qt(i,dn(t))+1).join("")},Nn.trimStart=function(e,t,r){if((e=vs(e))&&(r||t===n))return e.replace(ne,"");if(!e||!(t=li(t)))return e;var i=dn(e);return wi(i,Jt(i,dn(t))).join("")},Nn.truncate=function(e,t){var r=30,i="...";if(Qa(t)){var o="separator"in t?t.separator:o;r="length"in t?fs(t.length):r,i="omission"in t?li(t.omission):i}var a=(e=vs(e)).length;if(rn(e)){var s=dn(e);a=s.length}if(r>=a)return e;var l=r-hn(i);if(l<1)return i;var c=s?wi(s,0,l).join(""):e.slice(0,l);if(o===n)return c+i;if(s&&(l+=c.length-l),is(o)){if(e.slice(l).search(o)){var u,h=c;for(o.global||(o=ke(o.source,vs(he.exec(o))+"g")),o.lastIndex=0;u=o.exec(h);)var d=u.index;c=c.slice(0,d===n?l:d)}}else if(e.indexOf(li(o),l)!=l){var f=c.lastIndexOf(o);f>-1&&(c=c.slice(0,f))}return c+i},Nn.unescape=function(e){return(e=vs(e))&&$.test(e)?e.replace(H,pn):e},Nn.uniqueId=function(e){var t=++De;return vs(e)+t},Nn.upperCase=Xs,Nn.upperFirst=Ks,Nn.each=va,Nn.eachRight=ba,Nn.first=Yo,al(Nn,(ml={},yr(Nn,function(e,t){je.call(Nn.prototype,t)||(ml[t]=e)}),ml),{chain:!1}),Nn.VERSION="4.17.21",At(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){Nn[e].placeholder=Nn}),At(["drop","take"],function(e,t){Wn.prototype[e]=function(r){r=r===n?1:vn(fs(r),0);var i=this.__filtered__&&!t?new Wn(this):this.clone();return i.__filtered__?i.__takeCount__=bn(r,i.__takeCount__):i.__views__.push({size:bn(r,d),type:e+(i.__dir__<0?"Right":"")}),i},Wn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),At(["filter","map","takeWhile"],function(e,t){var n=t+1,r=1==n||3==n;Wn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:so(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}}),At(["head","last"],function(e,t){var n="take"+(t?"Right":"");Wn.prototype[e]=function(){return this[n](1).value()[0]}}),At(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");Wn.prototype[e]=function(){return this.__filtered__?new Wn(this):this[n](1)}}),Wn.prototype.compact=function(){return this.filter(nl)},Wn.prototype.find=function(e){return this.filter(e).head()},Wn.prototype.findLast=function(e){return this.reverse().find(e)},Wn.prototype.invokeMap=Kr(function(e,t){return"function"==typeof e?new Wn(this):this.map(function(n){return Or(n,e,t)})}),Wn.prototype.reject=function(e){return this.filter(ja(so(e)))},Wn.prototype.slice=function(e,t){e=fs(e);var r=this;return r.__filtered__&&(e>0||t<0)?new Wn(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==n&&(r=(t=fs(t))<0?r.dropRight(-t):r.take(t-e)),r)},Wn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Wn.prototype.toArray=function(){return this.take(d)},yr(Wn.prototype,function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),o=Nn[i?"take"+("last"==t?"Right":""):t],a=i||/^find/.test(t);o&&(Nn.prototype[t]=function(){var t=this.__wrapped__,s=i?[1]:arguments,l=t instanceof Wn,c=s[0],u=l||Wa(t),h=function(e){var t=o.apply(Nn,Mt([e],s));return i&&d?t[0]:t};u&&r&&"function"==typeof c&&1!=c.length&&(l=u=!1);var d=this.__chain__,f=!!this.__actions__.length,p=a&&!d,g=l&&!f;if(!a&&u){t=g?t:new Wn(this);var m=e.apply(t,s);return m.__actions__.push({func:da,args:[h],thisArg:n}),new Un(m,d)}return p&&g?e.apply(this,s):(m=this.thru(h),p?i?m.value()[0]:m.value():m)})}),At(["pop","push","shift","sort","splice","unshift"],function(e){var t=Oe[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Nn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Wa(i)?i:[],e)}return this[n](function(n){return t.apply(Wa(n)?n:[],e)})}}),yr(Wn.prototype,function(e,t){var n=Nn[t];if(n){var r=n.name+"";je.call(En,r)||(En[r]=[]),En[r].push({name:t,func:n})}}),En[Ni(n,2).name]=[{name:"wrapper",func:n}],Wn.prototype.clone=function(){var e=new Wn(this.__wrapped__);return e.__actions__=Ii(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ii(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ii(this.__views__),e},Wn.prototype.reverse=function(){if(this.__filtered__){var e=new Wn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Wn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Wa(e),r=t<0,i=n?e.length:0,o=function(e,t,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=bn(t,e+a);break;case"takeRight":e=vn(e,t-a)}}return{start:e,end:t}}(0,i,this.__views__),a=o.start,s=o.end,l=s-a,c=r?s:a-1,u=this.__iteratees__,h=u.length,d=0,f=bn(l,this.__takeCount__);if(!n||!r&&i==l&&f==l)return fi(e,this.__actions__);var p=[];e:for(;l--&&d<f;){for(var g=-1,m=e[c+=t];++g<h;){var v=u[g],b=v.iteratee,y=v.type,w=b(m);if(2==y)m=w;else if(!w){if(1==y)continue e;break e}}p[d++]=m}return p},Nn.prototype.at=fa,Nn.prototype.chain=function(){return ha(this)},Nn.prototype.commit=function(){return new Un(this.value(),this.__chain__)},Nn.prototype.next=function(){this.__values__===n&&(this.__values__=hs(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?n:this.__values__[this.__index__++]}},Nn.prototype.plant=function(e){for(var t,r=this;r instanceof Vn;){var i=zo(r);i.__index__=0,i.__values__=n,t?o.__wrapped__=i:t=i;var o=i;r=r.__wrapped__}return o.__wrapped__=e,t},Nn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Wn){var t=e;return this.__actions__.length&&(t=new Wn(this)),(t=t.reverse()).__actions__.push({func:da,args:[Qo],thisArg:n}),new Un(t,this.__chain__)}return this.thru(Qo)},Nn.prototype.toJSON=Nn.prototype.valueOf=Nn.prototype.value=function(){return fi(this.__wrapped__,this.__actions__)},Nn.prototype.first=Nn.prototype.head,Je&&(Nn.prototype[Je]=function(){return this}),Nn}();ft?((ft.exports=gn)._=gn,dt._=gn):ht._=gn}).call($r)}(Yr,Yr.exports)),Yr.exports);const Xr="my_files",Kr="gif",qr="stock_images",Zr="ai",Jr="editor",Qr=!1,ei=["jpg","jpeg","png","gif","bmp","webp","svg","ico","tiff","tif"],ti="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQABLAEsAAD/4QCMRXhpZgAATU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAIdpAAQAAAABAAAAWgAAAAAAAAEsAAAAAQAAASwAAAABAAOgAQADAAAAAQABAACgAgAEAAAAAQAAAQOgAwAEAAAAAQAAAMoAAAAA/+EJ2Wh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8APD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNi4wLjAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1wTU06RG9jdW1lbnRJRD0iYWRvYmU6ZG9jaWQ6c3RvY2s6Mzk2MmU4NTQtNjA1NC00MGZmLWEwYzMtYjJkNjcwMzQ2OWFhIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOmE5M2NiZTgyLWI5NjEtNGUzNS1iYmQ0LWJjZWE1Zjc1YTQwZiIvPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDw/eHBhY2tldCBlbmQ9InciPz4A/+0AOFBob3Rvc2hvcCAzLjAAOEJJTQQEAAAAAAAAOEJJTQQlAAAAAAAQ1B2M2Y8AsgTpgAmY7PhCfv/AABEIAMoBAwMBIgACEQADEQD/xAAfAAABBQEBAQEBAQAAAAAAAAAAAQIDBAUGBwgJCgv/xAC1EAACAQMDAgQDBQUEBAAAAX0BAgMABBEFEiExQQYTUWEHInEUMoGRoQgjQrHBFVLR8CQzYnKCCQoWFxgZGiUmJygpKjQ1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4eLj5OXm5+jp6vHy8/T19vf4+fr/xAAfAQADAQEBAQEBAQEBAAAAAAAAAQIDBAUGBwgJCgv/xAC1EQACAQIEBAMEBwUEBAABAncAAQIDEQQFITEGEkFRB2FxEyIygQgUQpGhscEJIzNS8BVictEKFiQ04SXxFxgZGiYnKCkqNTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqCg4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2dri4+Tl5ufo6ery8/T19vf4+fr/2wBDAAUDBAQEAwUEBAQFBQUGBwwIBwcHBw8LCwkMEQ8SEhEPERETFhwXExQaFRERGCEYGh0dHx8fExciJCIeJBweHx7/3QAEABH/2gAMAwEAAhEDEQA/APsuiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAoqG7uIbWB55nCooyTS208VxCssLh0boRQBLRRRQAUUUUAFFFFAH/9D7LooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAqG7uIrWBppnCoo5Jou7iK1gaaZwqKM5NcRq2oXOsXqxQq2wnEcYPX3NABq2oXOr3qwxK3l5xHGO/ua6nw7pzadZ7ZJGaR+WBPA9hUfh7R49Pi82TDXDDkkfd9hWxQAUUUUAFFFFABRRRQB//9H7LooooAKKKKACiiuOv/EOpQX88KNDsSQqMp6H60AdjRXD/wDCTapn70P/AH7/APr0f8JPqn96H/v3/wDXoA7iiuH/AOEn1T+9D/37/wDr0f8ACT6p/eh/79//AF6AO4orh/8AhJ9U/vQ/9+//AK9H/CT6p/eh/wC/f/16AO4orh/+En1T+9D/AN+//r0f8JPqn96H/v3/APXoA7iiuH/4SfVP70P/AH7/APr0f8JPqn96H/v3/wDXoA7iiuH/AOEn1T+9D/37/wDr0f8ACT6p/eh/79//AF6AO4orh/8AhJ9U/vQ/9+//AK9H/CT6p/eh/wC/f/16AO4orh/+En1T+9D/AN+//r0f8JPqn96H/v3/APXoA7iobq4itYHmncIijJJrE0jUdQlt2v8AUJIYrNVyMJgv9Oaw9X1C51e8WGJWMecRxr39zQAatqNzq94kUasELYjjB6/Wul8P6NHp8Qlkw1ww5P8Ad9hWRmDw9bfwTajIv4Riqw8Tap6wf98f/XoA7elrh/8AhJtU/vQ/9+//AK9avhnWL3UL94bgx7BGWG1cdwPX3oA6OiiigAooooAKKKKAP//S+y6KKKACiiigArgHAbxSVYAg3mCD3+eu/rgT/wAjV/2+f+z0Adt9jtMf8esH/fsUfY7T/n1g/wC/Yqeh2CIWY4AGSaAK7WlmqktbQADkkxr/AIVUe50JJPLZ7EN6YWuX17WJr+dkRylurYVQfve5rKJoA9Ghh0+Zd0MVtIvqqKaf9jtP+fWD/v2K89sry4sphLbyFD3HY/Wu+0e9TULFLhQATww9DQBJ9jtP+fWD/v2KattZM7ILe3LL94bF4p99cx2lpJcS/dRc/X2rjdG1eSLWmuZ2Oy4bEnoPQ/hQB2P2O0/59YP+/Yo+x2n/AD6wf9+xU4IPSloAr/Y7T/n1g/79ij7Haf8APrB/37FWKKAK/wBjtP8An1g/79ij7Haf8+sH/fsVYooAr/Y7T/n1g/79ioruPTrWBppoLdUUckxj/Cp7u4itYGnmcKijJJriNX1C61i9EUKtsziOMHr7mgBNVv7jVrxYII/3YOIYl/ma6bw9o8enxCSTD3DDkn+H2FHh/R49Pi8yTDXDDkkfd9hWxQBC9rbOxZ7eJmPUlATTfsdp/wA+sH/fsVYooAztXtbVdLumW3hBELkEIOPlNc74H/5Csv8A1xP8xXUaz/yCbz/ri/8A6Ca5fwP/AMhaX/rif5igDs6KKKACiiigAooooA//0/suiiigAooooAK4E/8AI1f9vn/s9d9XAn/kav8At8/9noA72s/xI7R6HdMpwdmPzODWhUN/ALqymt26SIVoA816UlS3ML207wSrtdCQai+lAC11HgN2xdx4+XKH6Hn/AArl++K6jSv+JN4flvJhiWfBRe/Tj+ZNAEHjLUfOnFjEw2R/NJju3Yfl/Oudp0jtJIzucsxJJ96bQB2/hLUftdkLeRh50OF+q9jW3XnOkXrWF/HcDJUHDjPUV6HDIssSSIQVYAg0APooooAKhu7iK1gaeZwqKM5NF3cQ2sDTTOFRRk5riNW1C51i9WKJW8vOI4x39zQAavqF1rF6IYVbZnEcYPX3NdL4e0ePT4hLIA1w45JH3fYUeHtHj0+LzJcNcMOTj7vsK2KACiiigAooooAqaz/yCbz/AK4v/wCgmuX8D/8AIWl/64n+YrqNZ/5BN5/1xf8A9BNcv4H/AOQtL/1xP8xQB2dFFFABRRRQAUUUUAf/1PsuiiigAooooAK4E/8AI1f9vn/s9d9XAn/kav8At8/9noA72lpKWgDO1bSLXUQDKCsg6OvX/wCvWFJ4Tn3fJdxFc8FkOa66igDC0zw3a2riadzPIOeRhR+FYXinUPtl+Yoz+5h+VcdCe5/p+FdH4n1H7DYFYziaX5U9vU1wn40AFFFFABXW+DNR3xtp8x+ZPmjyeo7j/PrXJVNZzva3UdxG2HjbP/1qAPTKhu7iK2gaaZwqKOSahTULf+zFv3bZEybsmuP1XULnV70QxK3l7sRxr39zQAmrahc6xerFEreXnEcY7+5rpfD2jx6fF5suGuGHJx932FHh7R49PiEkuGuGHJ/u+wrYoAKKKKACiiigAooooAqaz/yCbz/ri/8A6Ca5fwP/AMhaX/rif5iuo1n/AJBN5/1xf/0E1y/gf/kLS/8AXE/zFAHZ0UUUAFFFFABRRRQB/9X7LooooAKKKKACuBP/ACNX/b5/7PXfVwJ/5Gr/ALfP/Z6AO9paSloAKazBVZicBRkmnVz3jHUfs9qLOJsSy/ex2XvQBzuu351DUXlDfu1+WMewqhRRQAUUUv40AFbGi6ZG8TahqB8uzTkA9ZP/AK1Gi6ZG8TajqJ2WcfIB/wCWn/1qi1W+uNWu0hhQiIHbFEv86ADU7+fVbpIIU2xZ2xRL/M103h7R00+LzZcPcMOTj7vsKyCYfD9sQNsupSr+EY/z+ddDot8uoWCTj7/Rx6N3oAvUUUUAFZ17rFta6jDZydZPvNnhPTNSaxqEWn2bTv8AM3RF9TXntxLJPK8sp3O5yx9TQB6dmlrA8Kar9qg+yzt+/jHBP8QrfoAKKKKAKms/8gm8/wCuL/8AoJrl/A//ACFpf+uJ/mK6jWf+QTef9cX/APQTXL+B/wDkLS/9cT/MUAdnRRRQAUUUUAFFFFAH/9b7LooooAKKKKACuBP/ACNX/b5/7PXfVwJ/5Gr/ALfP/Z6AO9paSloAjuZo7eB5pThEGSa851G6e9vJLl+rngeg7Ct/xpqOWXT4m6fNLj9B/X8q5mgBKKKO9AADzWzoumRvEdQ1A7LOPkA/8tP/AK1JoulxvE2oagQlnHyAf+Wn/wBaotVv59WukhhjIizthiX+dABql/catdJBDGRHnbDEv86vkweH7bHyy6jKv4Rj/P8An0UmDw/bEfLLqMq/hGP8/n/Ln5JHlkaSRi7scsx70AEkjySNLIxd2OWY961fCuo/Y78RSNiGY7T7Hsax6WgD1EGmyuscbSOwVVBJPoKy/DGofbrABzmaLCvk9fQ1k+MNU3MdPgY4X/WkevpQBla7qLajel84iTiMe3rWdS0lAEtrPJbXMdxC2HQ5HvXoWlXsd/ZpPGevDD0PevOK0/D2pHTr0FiTBJgOP60Ad/RTUYOoZSCCMg06gCprP/IJvP8Ari//AKCa5fwP/wAhaX/rif5iuo1n/kE3n/XF/wD0E1y/gf8A5C0v/XE/zFAHZ0UUUAFFFFABRRRQB//X+y6KKKACiiigArgT/wAjV/2+f+z131cCf+Rq/wC3z/2egDvarapeJY2Mlw/8I+UZ6nsKs1xni7UftN39ljb91Eecd2/z/WgDFnlknmeaRsu5JJqOigdeKAFrX0XS43iOoagQlnHyAf8Alp/9al0XTI3ibUNQISzj5Ab/AJaf/WqHVb+41a6SGGMrEDtiiX+dAC6rfT6tdJBChEWdsMS/zq+TB4ftj92XUZV/CMf5/P8AkhMPh+2x8suoyr+EY/z+f8sCSR5ZGlkYu7HLMe9ABJI8sjSSMXdjlmPemUUUAFLSUUAWtOvp7CZ5YD8zIVOenNVmJZixJJPUmkooAKKKKAClFJRQB1Pg/VOBp87Dj/VEn9K6jPFeYRs0bh0JDqQQR2Nd7oGpJqNkGJxKnEg/rQBY1n/kE3n/AFxf/wBBNcv4H/5C0v8A1xP8xXUaz/yCbz/ri/8A6Ca5fwP/AMhaX/rif5igDs6KKKACiiigAooooA//0PsuiiigAooooAK4E/8AI1f9vn/s9d8a89u5RB4hlnYEiO5LkDvhs0Adtq808Ni7W0TyTEbUCjkE964c6TqhJJspyTySVroB4stsY+xzf99Cj/hK7X/nzl/76FAHPnSdTx/x4z/981d0zRvL33eqr5NtFztbq5/wro7PVo5rF72SB7eBfutIcbvpXLatqFzq94IokYpnEca859zQAmq31xq12sEEZEQOIol/nWxBYzaPZeZBavc30oxlVyIxUVsbLw6i+epuL1wCyp/AP6VY/wCEstv+fSb/AL6FAGBLpmrSyNJJZ3DuxyzFetN/sjU/+fGf/vmug/4Su1/585f++hR/wldr/wA+cv8A30KAOf8A7I1P/nxn/wC+aP7I1P8A58Z/++a6D/hK7X/nzl/76FH/AAldr/z5y/8AfQoA5/8AsjU/+fGf/vmj+yNT/wCfGf8A75roP+Ertf8Anzl/76FH/CV2v/PnL/30KAOf/sjU/wDnxn/75o/sjU/+fGf/AL5roP8AhK7X/nzl/wC+hR/wldr/AM+cv/fQoA5/+yNT/wCfGf8A75o/sjU/+fGf/vmug/4Su1/585f++hR/wldr/wA+cv8A30KAOf8A7I1P/nxn/wC+aP7I1P8A58Z/++a6D/hK7X/nzl/76FH/AAldr/z5y/8AfQoA5/8AsjU/+fGf/vmrmkW+r6ferOllPtzh12n5hWp/wldr/wA+cv8A30KP+Ertf+fOX/voUAa+rNu0a6bBGYGOD1HymuZ8D/8AIWl/64n+YqzfeJre4spoBayqZI2UEkcZGKreB/8AkKyn/pif5igDs6KKKACiiigAooooA//R+y6KKKACiiigArHn8OadPO80nm73YscNjknNbFFAGJ/wjGmf9N/+/lRXGg6NZxG4nMnlpyQ0mQfatq7uIrWBppnCoozk1xGrajdaxeLFCh2E4jjHf3NACapfT6tdpBDGfKU4hjUfrXTeH9HTT4vNkw1yw5JH3fYUeHtHj0+LzZMNcMOSR932FbFAGNL4b0+WRpJXuHdjks0nJNN/4RjTP+m//fytuigDE/4RjTP+m/8A38o/4RjTP+m//fytuigDE/4RjTP+m/8A38o/4RjTP+m//fytuigDE/4RjTP+m/8A38o/4RjTP+m//fytuigDE/4RjTP+m/8A38o/4RjTP+m//fytuigDE/4RjTP+m/8A38o/4RjTP+m//fytuigDE/4RjTP+m/8A38o/4RjTP+m//fytuigDE/4RjTP+m/8A38o/4RjTP+m//fytuigDE/4RjTPSf/v5VrTNGs9PnM1v5m4qVO5s8ZB/pWjRQAUUUUAFFFFABRRRQB//0vsuiiigAooooAKhu7mK1t2nmYKijkmpq5fxda6jNcReXukgYgBVHQ+9AGVq2oXOsXqxRK2zdiNB39zXS+H9Hj0+ISSYa4Ycn+77Cjw/o8enxebLhrhhySPu+wrYoAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKAP/9P7LooooAKKKKACkxS0UAFFFFABRRTW6D6igB1FN7n8KQE+YRQA+iiigAopsnEZI64pR90UALRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFAH//2Q==",ni=s({state:{},actions:{},options:{}}),ri=()=>l(ni),ii=({children:t,options:n})=>{const[r,s]=o([]),[l,u]=o([]),[h,d]=o(null),[f,p]=o(n.searchQuery||""),[g,m]=o(n.sortBySize||"name"),{config:v}=n,[b,y]=o("date"),[w,x]=o("desc"),[C,_]=o([{id:"folders",name:"Папки"}]),[S,A]=o(new Set),[k,T]=o("");i.useEffect(()=>{A(new Set)},[]);const I=i.useRef(null);i.useEffect(()=>{if(n.onChangeSelection&&I.current!==S){if(null!==I.current){const e=(Array.isArray(l)?l:[]).filter(e=>S.has(e.id));n.onChangeSelection(e)}I.current=S}},[l,S,n.onChangeSelection,n]);const[E,P]=o(!1),[M,F]=o(Xr);a(()=>{(null==v?void 0:v.activeLibraryItem)&&F&&F(null==v?void 0:v.activeLibraryItem)},[null==v?void 0:v.activeLibraryItem,F]);const[j,D]=o({current:1,pageSize:12,total:0}),[R]=O.useForm(),[L]=O.useForm(),[z]=O.useForm(),[N]=O.useForm(),[B]=O.useForm(),[V]=O.useForm(),[U,W]=o(!1),[H,Y]=o(!1),[$,G]=o(!1),[X,K]=o(!1),[q,Z]=o(!1),[J,Q]=o(!1),[ee,te]=o(!1),[ne,re]=o(null),[ie,oe]=o(null),ae=c(e=>{D(t=>Object.assign(Object.assign({},t),e))},[D]),se=c(e=>{A(null!=e?e:new Set)},[A]),le={folders:r,files:l,selectedFolder:h,searchTerm:f,sortField:g,sortBy:b,sortOrder:w,pathHistory:C,selectedFiles:S,currentMenuFile:k,loading:E,pagination:j,isModalVisible:U,isUrlModalVisible:H,isRenameModalVisible:$,isMoveModalVisible:X,isRenameFolderModalVisible:q,isCopyModalVisible:J,isDeleteConfirmVisible:ee,form:R,urlForm:L,renameForm:z,moveForm:N,renameFolderForm:B,copyForm:V,fileToRename:ne,folderToRename:ie,activeLibraryItem:M,multiSelect:(null==v?void 0:v.multiSelect)||!0},ce={setFolders:s,setFiles:u,setSelectedFolder:d,setSearchTerm:p,setSortField:m,setSortBy:y,setSortOrder:x,setPathHistory:_,setSelectedFiles:se,setLoading:P,setPagination:ae,setIsModalVisible:W,setIsUrlModalVisible:Y,setIsRenameModalVisible:G,setIsMoveModalVisible:K,setIsRenameFolderModalVisible:Z,setIsCopyModalVisible:Q,setIsDeleteConfirmVisible:te,setFileToRename:re,setFolderToRename:oe,updatePathHistoryOnFolderRename:(e,t)=>{_(n=>n.map(n=>n.id===e?Object.assign(Object.assign({},n),{name:t}):n))},setActiveLibraryItem:F,setCurrentMenuFile:T},ue={state:le,actions:ce,options:n};return e(ni.Provider,{value:ue,children:t})},oi=e=>null===e.parentId||"null"===e.parentId||!e.parentId,ai=async(e,t,n)=>{var r;if(console.log("📁 addSubfoldersToFiles: params:",JSON.stringify(t,null,2)),"file"===(null==t?void 0:t.itemType))return e;let i=[];if(!n)return console.warn("🔍 getFolders не доступен!"),e;{const e=await n({parentId:t.folderId});i=Array.isArray(e)?e:[],console.log("📁 Получено папок от dataProvider:",i.length,"тип данных:",typeof e,"данные:",e)}let o=((e,t)=>{const n=Array.isArray(e)?e:[];return(r=t.folderId)&&"root"!==r&&"folders"!==r&&"null"!==r&&null!==r?n.filter(e=>e.parentId===t.folderId):n.filter(oi);var r})(i,t);if(null===(r=null==t?void 0:t.search)||void 0===r?void 0:r.trim()){const e=t.search.trim().toLowerCase();o=o.filter(t=>{var n;return null===(n=t.name)||void 0===n?void 0:n.toLowerCase().includes(e)})}if(console.log("📁 Найдено подпапок для добавления:",o.length),0===o.length)return e;const a=o.map(e=>({id:e.id,name:e.name,size:void 0,date:"-",isFolder:!0,folderId:e.parentId||"",type:"",selected:!1,extension:""}));if("folder"===(null==t?void 0:t.itemType))return a;const s=[...a,...e];return console.log("📁 РЕЗУЛЬТАТ: папок:",a.length,"файлов:",e.length,"всего:",s.length),s},si=e=>{var t,n,r,i;const{state:o,actions:s,options:l}=ri(),{searchTerm:h,sortBy:d,sortOrder:f,selectedFolder:p,pagination:g}=o,{setSearchTerm:m,setSortBy:v,setSortOrder:b,setPagination:y}=s,w=e||s.fetchFiles,x=u(null),C=u(Gr.debounce(e=>{const t=JSON.stringify(e);x.current!==t?(x.current=t,console.log("✅ Выполняется запрос:",e),null==w||w(e)):console.log("🚫 Дублированный запрос пропущен:",e)},150)).current,_=c(()=>{var e;const t=null===(e=null==l?void 0:l.config)||void 0===e?void 0:e.disablePagination;return{folderId:p||"",search:(null==h?void 0:h.trim())||void 0,page:t?void 0:g.current,limit:t?void 0:g.pageSize,sortBy:d,sortOrder:f,itemType:"all"}},[p,h,g.current,g.pageSize,d,f,null===(t=null==l?void 0:l.config)||void 0===t?void 0:t.disablePagination]),S=c(e=>{var t,n;if(console.log("🔎 useSortAndFilter: handleSearch вызван с:",e),m&&(console.log("🔎 useSortAndFilter: Обновляем searchTerm в стейте"),m(e)),y&&(console.log("🔎 useSortAndFilter: Сбрасываем пагинацию"),y({current:1,pageSize:g.pageSize,total:0})),console.log("🔎 useSortAndFilter: Проверяем fetchFiles:",!!w),w){console.log("🔎 useSortAndFilter: Вызываем fetchFiles с параметрами поиска");const r={folderId:p||"",search:(null==e?void 0:e.trim())||void 0,page:(null===(t=null==l?void 0:l.config)||void 0===t?void 0:t.disablePagination)?void 0:1,limit:(null===(n=null==l?void 0:l.config)||void 0===n?void 0:n.disablePagination)?void 0:g.pageSize,sortBy:d,sortOrder:f,itemType:"all"};console.log("🔎 useSortAndFilter: Параметры запроса:",r),w(r),console.log("🔎 useSortAndFilter: fetchFiles вызван!")}else console.error("🔎 useSortAndFilter: fetchFiles НЕ ОПРЕДЕЛЕНА!")},[m,y,g.pageSize,w,p,d,f,null===(n=null==l?void 0:l.config)||void 0===n?void 0:n.disablePagination]),A=c((e,t)=>{var n,r;null==v||v(e),null==b||b(t),w&&C({folderId:p||"",search:(null==h?void 0:h.trim())||void 0,page:(null===(n=null==l?void 0:l.config)||void 0===n?void 0:n.disablePagination)?void 0:g.current,limit:(null===(r=null==l?void 0:l.config)||void 0===r?void 0:r.disablePagination)?void 0:g.pageSize,sortBy:e,sortOrder:t,itemType:"all"})},[v,b,C,p,h,g.current,g.pageSize,null===(r=null==l?void 0:l.config)||void 0===r?void 0:r.disablePagination]),k=c((e,t)=>{var n;(null===(n=null==l?void 0:l.config)||void 0===n?void 0:n.disablePagination)||(y&&y({current:e,pageSize:t||g.pageSize,total:g.total}),w&&C({folderId:p||"",search:(null==h?void 0:h.trim())||void 0,page:e,limit:t||g.pageSize,sortBy:d,sortOrder:f,itemType:"all"}))},[y,g.pageSize,g.total,C,p,h,d,f,null===(i=null==l?void 0:l.config)||void 0===i?void 0:i.disablePagination]);return a(()=>{if(w){console.log("🔄 useSortAndFilter: изменение selectedFolder, загрузка файлов для папки:",p);const e=_();C(Object.assign(Object.assign({},e),{page:1}))}},[p]),a(()=>{w&&(console.log("🔄 useSortAndFilter: начальная загрузка файлов, selectedFolder:",p),C(_()))},[]),a(()=>()=>{var e;null===(e=C.cancel)||void 0===e||e.call(C)},[C]),{state:{searchTerm:h||"",sortBy:d||"name",sortOrder:f||"asc"},actions:{setSearchTerm:m||(()=>{}),setSortBy:v||(()=>{}),setSortOrder:b||(()=>{}),handleSearch:S,handleSort:A,handlePaginationChange:k,getCurrentQueryParams:_}}},li=()=>{var e,t;const{state:n,actions:i,options:o}=ri(),{t:a}=An(),{message:s}=I.useApp(),{folders:l,selectedFolder:u,form:h,loading:d,isModalVisible:f}=n,{setFolders:p,setLoading:g,setIsModalVisible:m}=i,{dataProviders:v,config:b}=o,y=c(e=>(Array.isArray(e)?e:[]).filter(e=>e&&e.id&&e.name).map(e=>({id:e.id,name:e.name,parentId:e.folderId?e.folderId:null})),[]),w=c(async()=>{console.log("Запрос папок (через getFiles itemType=folder)..."),null==g||g(!0);try{let e=[];const t="lazy"===(null==b?void 0:b.folderTreeLoading);if(null==v?void 0:v.getFolders){const n=!t;e=await v.getFolders({parentId:null,deep:n})}else{if(!(null==v?void 0:v.getFiles))return void console.error("DataProvider для папок не определен");{const n=async e=>{const{files:r}=await v.getFiles({itemType:"folder",folderId:e||void 0}),i=y(r);if(t)return i;const o=await Promise.all(i.map(e=>n(e.id)));return[...i,...o.flat()]},r=await n(null),i=new Map(r.map(e=>[e.id,e]));e=Array.from(i.values())}}console.log("Полученные папки:",e);const n=Array.isArray(e)?e:[];null==p||p(n);const r=n.filter(e=>e.id===e.parentId);r.length>0&&console.warn("Обнаружены папки с циклическими зависимостями:",r)}catch(e){console.error("Ошибка при загрузке папок:",e),s.error("Ошибка при загрузке папок")}finally{null==g||g(!1)}},[null==v?void 0:v.getFiles,null==v?void 0:v.getFolders,p,g,s,null==b?void 0:b.folderTreeLoading,y]),x=c(async e=>{try{if(null==v?void 0:v.getFolders){const t=await v.getFolders({parentId:e,deep:!1}),n=Array.isArray(l)?l:[],r=new Map(n.map(e=>[e.id,e]));return t.forEach(e=>r.set(e.id,e)),null==p||p(Array.from(r.values())),t}if(null==v?void 0:v.getFiles){const{files:t}=await v.getFiles({itemType:"folder",folderId:e||void 0}),n=y(t),r=Array.isArray(l)?l:[],i=new Map(r.map(e=>[e.id,e]));return n.forEach(e=>i.set(e.id,e)),null==p||p(Array.from(i.values())),n}return[]}catch(e){return console.error("Ошибка при загрузке дочерних папок:",e),[]}},[null==v?void 0:v.getFiles,null==v?void 0:v.getFolders,l,p,y]),C=c(()=>{h.setFieldsValue({folderName:"Новая папка"}),null==m||m(!0)},[h,m]),_=c(e=>{const t=[...(Array.isArray(l)?l:[]).filter(t=>t.id!==e.id),e];if(null==p||p(t),console.log("📂 Обновлен список папок, новая папка:",e),i.setSelectedFolder&&(i.setSelectedFolder(e.id),console.log("🎯 Выбрана созданная папка как активная:",e.id)),i.setPathHistory){const t=[...n.pathHistory||[],{id:e.id,name:e.name}];i.setPathHistory(t),console.log("🧭 Обновлен путь навигации:",t)}},[l,p,i,n.pathHistory]),S=c(async e=>{try{if(null==v?void 0:v.getFolders){const t=await v.getFolders(),n=(Array.isArray(t)?t:[]).some(t=>t.id===e);return console.log(n?"✅ Папка найдена:":"❌ Папка не найдена:",e),n}if(null==v?void 0:v.getFiles){const t=new Set,n=async r=>{const{files:i}=await v.getFiles({itemType:"folder",folderId:r||void 0}),o=y(i);for(const r of o){if(t.has(r.id))continue;if(t.add(r.id),r.id===e)return!0;if(await n(r.id))return!0}return!1},r=await n(null);return console.log(r?"✅ Папка найдена:":"❌ Папка не найдена:",e),r}}catch(e){console.warn("⚠️ Ошибка проверки папки:",e)}return!1},[null==v?void 0:v.getFolders,null==v?void 0:v.getFiles,y]),A=c(async()=>{try{const e=(await h.validateFields()).folderName.trim();if(!e)return void s.error("Имя папки не может быть пустым");const t=u&&"folders"!==u?u:null;let n;if(console.log("🆕 Создание новой папки:",{folderName:e,parentId:t,selectedFolder:u}),!(null==v?void 0:v.createFolder))return void s.error("DataProvider для создания папок не настроен");n=await v.createFolder({name:e,parentId:t}),(e=>{if(!e||!e.id)throw new Error("Некорректный ответ от сервера: отсутствует ID папки");if(e.id===e.parentId&&e.parentId)throw console.error("Обнаружена циклическая зависимость: папка является родителем сама для себя"),new Error("Ошибка: папка не может быть родителем самой себя")})(n),_(n),await w(),await new Promise(e=>setTimeout(e,200));await S(n.id)||console.warn("⚠️ Не удалось подтвердить создание папки на сервере, но продолжаем..."),s.success(`Папка "${e}" создана и выбрана`),null==m||m(!1)}catch(e){console.error("❌ Ошибка при создании папки:",e),s.error(e instanceof Error?e.message:a("Failed to create folder"))}},[h,u,null==v?void 0:v.createFolder,_,m,a,w,S,s]),k=c(()=>{null==m||m(!1)},[m]),T=c((e,t=new Set)=>{const n=Array.isArray(l)?l:[];return e.map(e=>{if(t.has(e.id))return console.warn(`Обнаружен цикл в структуре папок с id=${e.id}. Пропускаем обработку дочерних элементов.`),{key:e.id,label:e.name+" (ошибка)",icon:r.createElement(ae,{style:{color:"red"}})};const i=new Set(t);i.add(e.id);const o=n.filter(t=>t.parentId===e.id&&t.id!==e.id);return{key:e.id,label:e.name,children:o.length>0?T(o,i):void 0}})},[l]),O=c(()=>{const e=Array.isArray(l)?l:[],t={key:"folders",label:a("Folders"),children:[]},n=e.filter(e=>null===e.parentId||!e.parentId);return t.children=T(n),[t]},[l,a,T]),E=c(async(e,t)=>{var n,r;try{if(!t||""===t.trim())return void s.error("Имя папки не может быть пустым");if(!(!1!==(null===(n=null==b?void 0:b.features)||void 0===n?void 0:n.enableRenameFolder)))return void s.error("Переименование папок отключено конфигурацией");if(!(null===(r=o.dataProviders)||void 0===r?void 0:r.renameFolder))throw new Error("renameFolder не реализован в dataProviders");const a=await o.dataProviders.renameFolder(e,t.trim());if(!(null==a?void 0:a.id))return void s.error("Некорректный ответ при переименовании папки");await w(),e!==a.id&&i.setSelectedFolder&&i.setSelectedFolder(a.id),s.success(`Папка переименована на "${t.trim()}"`)}catch(e){console.error("Ошибка при переименовании папки:",e),s.error(e instanceof Error?e.message:"Ошибка при переименовании папки")}},[w,s,null===(e=o.dataProviders)||void 0===e?void 0:e.renameFolder,null===(t=null==b?void 0:b.features)||void 0===t?void 0:t.enableRenameFolder]);return{state:{folders:l,isCreatingFolder:f,loading:d},actions:{fetchFolders:w,fetchChildFolders:x,handleCreateFolder:C,handleModalOk:A,handleModalCancel:k,generateMenuItems:O,renameFolder:E}}},ci=()=>{var e;const{state:t,actions:n,options:r}=ri(),o=si(),{sortBy:a,sortOrder:s}=o.state,{actions:{fetchFolders:l}}=li(),{t:u}=An(),{message:h}=I.useApp(),{selectedFolder:d,urlForm:f,pagination:p,files:g}=t,m=i.useRef(null);m.current=p;const{setFiles:v,setLoading:b,setIsUrlModalVisible:y,setSelectedFiles:w,setActiveLibraryItem:x,setPagination:C}=n,{dataProviders:_}=r,S=c(async e=>{var t,n,i;if(!(null==_?void 0:_.getFiles))return[];const o=null===(t=null==r?void 0:r.config)||void 0===t?void 0:t.disablePagination,{files:a,pagination:s}=await _.getFiles({folderId:"folders"!==(null==e?void 0:e.folderId)?null==e?void 0:e.folderId:void 0,search:(null===(n=null==e?void 0:e.search)||void 0===n?void 0:n.trim())||void 0,sortBy:null==e?void 0:e.sortBy,sortOrder:null==e?void 0:e.sortOrder,page:o||null==e?void 0:e.page,limit:o||null==e?void 0:e.limit,itemType:(null==e?void 0:e.itemType)||"all"});return console.log("🔍 fetchFilesFromDataProvider результат:",a,"с параметрами сортировки:",{sortBy:null==e?void 0:e.sortBy,sortOrder:null==e?void 0:e.sortOrder}),C&&((null===(i=null==r?void 0:r.config)||void 0===i?void 0:i.disablePagination)?C({current:1,pageSize:a.length||1,total:a.length||0}):s&&C({current:s.page,pageSize:s.limit,total:s.total})),a},[_,null===(e=null==r?void 0:r.config)||void 0===e?void 0:e.disablePagination]),A=c(async e=>{try{null==b||b(!0),console.log("fetchFiles вызван с параметрами:",e);let t=[];if(!(null==_?void 0:_.getFiles))return void console.error("DataProvider для получения файлов не определен");t=await S(e),console.log("Получены файлы:",t),e&&"all"!==e.itemType&&"folder"!==e.itemType&&(t=await ai(t,e,null==_?void 0:_.getFolders)),null==v||v(t),null==w||w(new Set)}catch(e){console.error("Ошибка при загрузке файлов:",e),h.error("Не удалось загрузить файлы")}finally{null==b||b(!1)}},[_,v,b,w,S,h]),k=c(async e=>{var t;const n=m.current;try{if(null==_?void 0:_.deleteItems){const n=await _.deleteItems([e]);if(!n.success&&!(null===(t=n.detailed)||void 0===t?void 0:t.every(e=>e.success)))throw new Error("Не удалось удалить файлы");h.success(u("Files deleted"))}else{if(!(null==_?void 0:_.deleteFile))return void h.error("DataProvider для удаления файлов не настроен");if(!await _.deleteFile(e))throw new Error("Не удалось удалить файл");h.success(u("File deleted"))}await A({folderId:d||"",page:g.length>=1?n.current:n.current-1,limit:n.pageSize,sortBy:a,sortOrder:s})}catch(e){console.error("Ошибка при удалении файла:",e),h.error(u("Error when deleting a file"))}},[_,A,d,u,h,g,a,s]),T=c(async e=>{try{const t=m.current;if(!(null==_?void 0:_.deleteFolder))return void h.error("DataProvider для удаления папок не настроен");if(!await _.deleteFolder(e))throw new Error("Не удалось удалить папку");h.success(u("Folder deleted"));d===e?await A({page:t.current,limit:t.pageSize,sortBy:a,sortOrder:s}):await A({folderId:d||"",sortBy:a,sortOrder:s,page:t.current,limit:t.pageSize})}catch(e){console.error("Ошибка при удалении папки:",e),h.error(u("Error when deleting a folder"))}},[_,d,h,u,A,a,s]),O=c(async e=>{try{if(null==_?void 0:_.getFileData){const t=await _.getFileData(e);if(t)return t;throw new Error("Не удалось загрузить файл")}{const t=await fetch(`/api/files/${e.id}/content`);if(!t.ok)throw new Error("Ошибка загрузки файла");return await t.blob()}}catch(e){console.error("Ошибка при загрузке файла:",e)}},[_,h]),E=c(async e=>{if(!(null==_?void 0:_.uploadFile))return;const t=e.name.split(".").pop()||"";await _.uploadFile({name:e.name,size:e.size,type:e.type,folderId:d||"",data:e,extension:t}),x&&x(Xr)},[_,d,x]);c(async e=>{try{if(null==_?void 0:_.getFolders){const t=await _.getFolders(),n=(Array.isArray(t)?t:[]).some(t=>t.id===e);return console.log(n?"✅ Папка найдена:":"❌ Папка не найдена:",e),n}}catch(e){console.warn("⚠️ Ошибка проверки папки:",e)}return!1},[null==_?void 0:_.getFolders]);const P=c(async e=>{if(!(null==_?void 0:_.uploadFile))return void h.error("DataProvider для загрузки файлов не настроен");const t=m.current,n=document.createElement("input");n.type="file",n.accept="image/*",n.onchange=async n=>{var r;const i=null===(r=n.target.files)||void 0===r?void 0:r[0];if(i)if(i.type.startsWith("image/"))try{if(null==b||b(!0),null==e||e.onStart(i),null==e?void 0:e.onProgress){let t=0;const n=setInterval(()=>{t=Math.min(t+10+Math.floor(Date.now()%10),90),e.onProgress(i.name,t)},200);await E(i),clearInterval(n),e.onProgress(i.name,100)}else await E(i);null==e||e.onComplete(i.name),h.success(`${u("File")} ${i.name} ${u("has been successfully uploaded")}`),await l(),await A({folderId:d||"",sortBy:a,sortOrder:s,page:t.current,limit:t.pageSize})}catch(t){console.error("Ошибка при загрузке файла:",t),null==e||e.onError(i.name,"Ошибка при загрузке файла"),h.error("Ошибка при загрузке файла")}finally{null==b||b(!1)}else h.error(u("Please select an image file"))},n.click()},[null==_?void 0:_.uploadFile,d,h,u,b,A,a,s,E]),M=c(async(e,t)=>{const n=m.current;try{let r;const i=await(null==f?void 0:f.validateFields()),o=e||(null==i?void 0:i.fileUrl);return o?(null==b||b(!0),(null==_?void 0:_.uploadFileByUrl)?(r=await _.uploadFileByUrl({url:o,folderId:d||"",noFolder:t}),h.success(`${u("File")} ${(null==i?void 0:i.name)||"unnamed file"} ${u("successfully uploaded")}`),null==y||y(!1),null==f||f.resetFields(),x&&x(Xr),await A({folderId:d||"",sortBy:a,sortOrder:s,page:n.current,limit:n.pageSize}),r):void h.error("Загрузка по URL не поддерживается")):void h.error("Заполните все поля")}catch(e){console.error("Ошибка при загрузке файла по URL:",e),h.error(u("Error when downloading a file by URL"))}finally{null==b||b(!1)}},[f,b,_,h,u,y,x,A,d,a,s]),F=c(async e=>{if(e.type.startsWith("image/"))try{await E(e),h.success(`${u("File")} ${e.name} ${u("has been successfully uploaded")}`)}catch(t){console.error(`Ошибка при загрузке файла ${e.name}:`,t),h.error(`Ошибка при загрузке файла ${e.name}`)}else h.warning(`Файл ${e.name} не является изображением и будет пропущен`)},[h,u,E]),j=c(async e=>{const t=m.current;for(const t of e)await F(t);await A({folderId:d||"",sortBy:a,sortOrder:s,page:t.current,limit:t.pageSize})},[A,d,a,s,F]);return{fetchFiles:A,handleDeleteFile:k,handleDeleteFolder:T,handleAddFile:P,handleAddFileByUrl:M,handleDroppedFiles:j,getFileData:O,uploadFileWithProvider:E}},ui=()=>{const{state:e}=ri(),{files:t,loading:n,isUrlModalVisible:r}=e,i=ci(),o=(()=>{const{state:e,actions:t}=ri(),{selectedFiles:n}=e,{setSelectedFiles:r}=t,i=e.multiSelect||!0,o=c(e=>{if(!n||!r)return;const t=n,i=new Set(t);t.has(e)?i.delete(e):i.add(e),r(i)},[n,r,i]);return{state:{selectedFiles:n||new Set},actions:{toggleFileSelection:o}}})(),a=(e=>{const{state:t,actions:n,options:r}=ri(),{t:i}=An(),o=li(),{fetchFolders:a}=o.actions,{files:s,selectedFolder:l,selectedFiles:u,fileToRename:h,renameForm:d,isRenameModalVisible:f,moveForm:p,copyForm:g,pagination:m,currentMenuFile:v}=t,{setFileToRename:b,setIsRenameModalVisible:y,setIsMoveModalVisible:w,setIsCopyModalVisible:x,setSelectedFiles:C,setIsDeleteConfirmVisible:_}=n,{apiEndpoints:S,dataProviders:A,config:k}=r,T=c(e=>{var t,n;const r=null==s?void 0:s.find(t=>t.id===e);if((null==r?void 0:r.isFolder)||e.startsWith("folder_")){if(!1===(null===(t=null==k?void 0:k.features)||void 0===t?void 0:t.enableRenameFolder))return void E.error(i("Folder rename is disabled by config"));if(!(null==A?void 0:A.renameFolder))throw new Error("renameFolder не реализован в dataProviders")}else{if(!1===(null===(n=null==k?void 0:k.features)||void 0===n?void 0:n.enableRenameFile))return void E.error(i("File rename is disabled by config"));if(!(null==A?void 0:A.renameFile))throw new Error("renameFile не реализован в dataProviders")}null==b||b(e),null==y||y(!0),r&&d&&d.setFieldsValue({newFileName:r.name})},[b,y,s,d,null==k?void 0:k.features,A,i]),I=c(()=>{null==y||y(!1),null==b||b(null),null==d||d.resetFields()},[y,b,d]),O=c(async()=>{var t,r;if(h&&d)try{const o=await d.validateFields();if(!(null==o?void 0:o.newFileName))return;const c=null==s?void 0:s.find(e=>e.id===h);if((null==c?void 0:c.isFolder)||h.startsWith("folder_")){if(!1===(null===(t=null==k?void 0:k.features)||void 0===t?void 0:t.enableRenameFolder))return void E.error(i("Folder rename is disabled by config"));if(!(null==A?void 0:A.renameFolder))throw new Error("renameFolder не реализован в dataProviders");{const e=await A.renameFolder(h,o.newFileName.trim());if(!(null==e?void 0:e.id))return void E.error("Некорректный ответ при переименовании папки");E.success(`${i("Folder renamed to")} ${o.newFileName}`),await a(),h!==e.id&&n.setSelectedFolder&&n.setSelectedFolder(e.id)}}else{if(!1===(null===(r=null==k?void 0:k.features)||void 0===r?void 0:r.enableRenameFile))return void E.error(i("File rename is disabled by config"));if(!(null==A?void 0:A.renameFile))throw new Error("renameFile не реализован в dataProviders");await A.renameFile(h,o.newFileName),E.success(`${i("File renamed to")} ${o.newFileName}`)}I(),await e({folderId:l||"",page:m.current,limit:m.pageSize})}catch(e){console.error("Ошибка при переименовании:",e),E.error(e instanceof Error?e.message:"Ошибка при переименовании")}},[h,d,s,A,S,I,e,l,i,m]),P=c(()=>{null==w||w(!0)},[w]),M=c(()=>{null==w||w(!1),null==p||p.resetFields()},[w,p]),F=c(async()=>{var t;if((null==v?void 0:v.length)||u&&0!==u.size)try{const n=await p.validateFields(),r=null==n?void 0:n.targetFolder;if(!r)return void E.error("Выберите папку назначения");const i=Array.from((null==v?void 0:v.length)?[v]:u);let o=0,c=0;const h=i.map(e=>s.find(t=>t.id===e)).filter(e=>!!e),d=h.some(e=>(null==e?void 0:e.isFolder)||e.id.startsWith("folder_"));if(null==A?void 0:A.moveItems)try{const e=await A.moveItems(r,h.map(e=>e.id)),t=e.detailed;if(t){const e=t.filter(e=>e.success).length;o+=e,e!==h.length&&E.error(`При перемещении произошли ошибки: \n${t.map(e=>e.error).filter(e=>!e).join(";")}`)}else if(e.success)o+=h.length;else{const t=e.error;t?E.error(t):c+=h.length}}catch(e){console.error("Ошибка при копировании",e),c-=h.length}else for(const e of h)try{const n=(null==e?void 0:e.isFolder)||(null===(t=e.id)||void 0===t?void 0:t.startsWith("folder_"));(null==A?void 0:A.moveItem)?(await A.moveItem({itemId:e.id,targetFolderId:r,isFolder:n}),o++):(console.warn(`DataProvider для перемещения не настроен для ${n?"папки":"файла"} ${e.id}`),c++)}catch(t){console.error(`Ошибка при перемещении объекта ${e.id}:`,t),c++}o>0&&E.success(`Успешно перемещено ${o} из ${i.length} объектов`),c>0&&E.error(`Не удалось переместить ${c} из ${i.length} объектов`),M(),null==C||C(new Set),d&&await a(),await e({folderId:l||"",page:m.current,limit:m.pageSize})}catch(e){console.error("Ошибка при перемещении:",e),E.error("Ошибка при перемещении")}},[v,u,p,M,C,e,l,m,s,A,a]),j=c(()=>{null==x||x(!0)},[x]),D=c(()=>{null==x||x(!1),null==g||g.resetFields()},[x,g]),R=c(async()=>{if((null==v?void 0:v.length)||u&&0!==u.size)try{const t=await g.validateFields(),n=null==t?void 0:t.targetFolder;if(!n)return void E.error("Выберите папку назначения");const r=Array.from((null==v?void 0:v.length)?[v]:u);let i=0,o=0;const c=r.map(e=>s.find(t=>t.id===e)).filter(e=>!!e),h=c.some(e=>(null==e?void 0:e.isFolder)||e.id.startsWith("folder_"));if(null==A?void 0:A.copyItems)try{const e=await A.copyItems(n,c.map(e=>e.id)),t=e.detailed;if(t){const e=t.filter(e=>e.success).length;i+=e,e!==c.length&&E.error(`При перемещении произошли ошибки: \n${t.map(e=>e.error).filter(e=>!e).join(";")}`)}else if(e.success)i+=c.length;else{const t=e.error;t?E.error(t):o+=c.length}}catch(e){console.error("Ошибка при копировании",e),o-=c.length}else for(const e of c)try{const t=(null==e?void 0:e.isFolder)||e.id.startsWith("folder_");(null==A?void 0:A.copyItem)?(await A.copyItem({itemId:e.id,targetFolderId:n,isFolder:t}),i++):(console.warn(`DataProvider для копирования не настроен для ${t?"папки":"файла"} ${e.id}`),o++)}catch(t){console.error(`Ошибка при копировании объекта ${e.id}:`,t),o++}i>0&&E.success(`Успешно скопировано ${i} из ${r.length} объектов`),o>0&&E.error(`Не удалось скопировать ${o} из ${r.length} объектов`),D(),null==C||C(new Set),h&&await a(),await e({folderId:l||"",page:m.current,limit:m.pageSize})}catch(e){console.error("Ошибка при копировании:",e),E.error("Ошибка при копировании")}},[v,u,g,D,C,e,l,m,s,A,a]),L=c(()=>{null==_||_(!0)},[_]),z=c(()=>{null==_||_(!1)},[_]),N=c(async()=>{if((null==v?void 0:v.length)||u&&0!==u.size)try{const t=Array.from(v?[v]:u);let n=0,r=0;const i=t.map(e=>s.find(t=>t.id===e)).filter(e=>!!e);if(null==A?void 0:A.deleteItems){const e=await(null==A?void 0:A.deleteItems(i.map(e=>e.id))),t=e.detailed;if(t){const e=t.filter(e=>e.success).length;n+=e,e!==i.length&&E.error(`При удалении произошли ошибки: \n${t.map(e=>e.error).filter(e=>!e).join(";")}`)}else if(e.success)n+=i.length;else{const t=e.error;t?E.error(t):r+=i.length}}else for(const e of i)try{(null==e?void 0:e.isFolder)||e.id.startsWith("folder_")?(null==A?void 0:A.deleteFolder)?await A.deleteFolder(e.id)?n++:r++:(console.warn("DataProvider для удаления папок не настроен"),r++):(null==A?void 0:A.deleteFile)?await A.deleteFile(e.id)?n++:r++:(console.warn("DataProvider для удаления файлов не настроен"),r++)}catch(t){console.error(`Ошибка при удалении объекта ${e.id}:`,t),r++}n>0&&E.success(`Успешно удалено ${n} из ${t.length} объектов`),r>0&&E.error(`Не удалось удалить ${r} из ${t.length} объектов`),null==C||C(new Set),null==_||_(!1),await a(),await e({folderId:l||"",page:m.current,limit:m.pageSize})}catch(e){console.error("Ошибка при удалении:",e),E.error("Ошибка при удалении")}else null==_||_(!1)},[u,s,A,n,e,l,C,_,m,a]);return{state:{isRenamingFile:f||!1,fileToRename:h},actions:{showRenameModal:T,handleRenameCancel:I,handleRenameOk:O,showMoveModal:P,handleMoveCancel:M,handleMoveOk:F,showCopyModal:j,handleCopyCancel:D,handleCopyOk:R,showDeleteConfirm:L,handleDeleteConfirmCancel:z,handleDeleteConfirmOk:N}}})(i.fetchFiles);return{state:{files:t||[],selectedFiles:o.state.selectedFiles,loading:n||!1,isAddingFileByUrl:r||!1,isRenamingFile:a.state.isRenamingFile,fileToRename:a.state.fileToRename},actions:{fetchFiles:i.fetchFiles,handleDeleteFile:i.handleDeleteFile,handleDeleteFolder:i.handleDeleteFolder,handleAddFile:i.handleAddFile,handleAddFileByUrl:i.handleAddFileByUrl,handleDroppedFiles:i.handleDroppedFiles,uploadFileWithProvider:i.uploadFileWithProvider,toggleFileSelection:o.actions.toggleFileSelection,showRenameModal:a.actions.showRenameModal,handleRenameCancel:a.actions.handleRenameCancel,handleRenameOk:a.actions.handleRenameOk,showMoveModal:a.actions.showMoveModal,handleMoveCancel:a.actions.handleMoveCancel,handleMoveOk:a.actions.handleMoveOk,showCopyModal:a.actions.showCopyModal,handleCopyCancel:a.actions.handleCopyCancel,handleCopyOk:a.actions.handleCopyOk,showDeleteConfirm:a.actions.showDeleteConfirm,handleDeleteConfirmCancel:a.actions.handleDeleteConfirmCancel,handleDeleteConfirmOk:a.actions.handleDeleteConfirmOk}}},hi=()=>{const{notification:e}=I.useApp(),t=ri().options.notification;return h(()=>Object.assign(Object.assign({},e),t),[e,t])},di="filemanager_sidebar_width",fi=({onSearch:t,placeholder:n="Поиск файлов...",className:r})=>{const[i,s]=o(""),l=u(null),{options:c}=ri(),{config:h}=c;a(()=>(l.current=Gr.debounce(e=>{t(e)},500),()=>{var e;null===(e=l.current)||void 0===e||e.cancel()}),[t]);return e(P,{value:i,onChange:e=>{var t;const n=e.target.value;s(n),null===(t=l.current)||void 0===t||t.call(l,n)},placeholder:n,prefix:e(Nr,{size:16,strokeWidth:null==h?void 0:h.iconStrokeWidth}),className:r,allowClear:!0,onClear:()=>{s(""),t("")}})},pi=new Map,gi=(e,t)=>{pi.set(e,t),console.log("Изображение сохранено в кеш:",e),pi.size>350&&(Array.from(pi.keys()).slice(0,50).forEach(e=>pi.delete(e)),console.warn("Очищен кеш изображений. Удалено 50 самых старых записей."))},mi=e=>{if(e.type&&e.type.startsWith("image/"))return!0;if(e.name){const t=e.name.toLowerCase().split(".").pop();return ei.includes(t||"")}return!1},vi=({src:t,alt:n,className:r,width:i,height:s,preview:l=!1,file:u})=>{const h=ci(),[d,f]=o(!1),[p,g]=o(t),[m,v]=o(!1),b=c(e=>{g(e),f(!1),v(!1)},[]),y=c(e=>{console.warn("Не удалось загрузить изображение:",e),g(void 0),f(!0),v(!1)},[]),w=c(()=>{g(ti),f(!0)},[]),x=c(e=>{g(e),f(!1)},[]),C=c(e=>{const t=e.split(",")[1];t&&t.length>20?g(e):(console.warn("Некорректные base64 данные:",e.substring(0,50)+"..."),w())},[w]),_=c(async e=>{if(console.log("loadImageFromFile",e.id),t=e.id,pi.has(t))return console.log("Изображение найдено в кеше:",e.id),(e=>pi.get(e))(e.id);var t;if(!e||!mi(e))return console.warn("Файл не является изображением:",null==e?void 0:e.name,null==e?void 0:e.type),w(),ti;try{const t=await h.getFileData(e);if(!t)throw new Error("Ошибка загрузки файла");return new Promise((n,r)=>{const i=new FileReader;i.onload=()=>{const t=i.result;gi(e.id,t),n(t)},i.onerror=()=>r(new Error("Ошибка чтения файла")),i.readAsDataURL(t)})}catch(e){throw console.error("Ошибка загрузки изображения:",e),e}},[u,w,h]),S=c(()=>{(null==u?void 0:u.id)&&mi(u)?_(u).then(b).catch(y):u&&!mi(u)&&(console.warn("Файл не является изображением, показываем fallback:",u.name,u.type),w())},[u,_,b,y,w]),A=c(e=>{console.log("HandleBlobSrc:",{blobSrc:e,file:u?{id:u.id,name:u.name,type:u.type,extension:u.extension,folderId:u.folderId}:null}),u&&mi(u)?(console.log("Blob файл является изображением, устанавливаем src:",u.name,u.type),g(e),f(!1)):(console.warn("Blob файл не является изображением, показываем fallback:",null==u?void 0:u.name,null==u?void 0:u.type),w())},[u,w,mi]),k=c(()=>{(null==u?void 0:u.id)&&mi(u)?(v(!0),_(u).then(b).catch(y)):u&&!mi(u)?(console.warn("Файл не является изображением, показываем fallback:",u.name,u.type),w()):(console.warn("Неподдерживаемый формат изображения:",t),g(void 0))},[u,t,_,b,y,w]);a(()=>{v(!1),t?t.startsWith("data:image/")?C(t):t.startsWith("blob:")?A(t):t.startsWith("http://")||t.startsWith("https://")||t.startsWith("/")?x(t):(console.log("setImageError 1"),k()):S()},[t,S,C,A,x,k]);return e(M,{className:r,src:p,alt:n,width:i,height:s,preview:l&&!d&&{src:p,toolbarRender:()=>null,destroyOnHidden:!0,mask:e(se,{style:{fontSize:"20px"}})},onError:()=>{console.warn("Ошибка загрузки изображения:",(null==p?void 0:p.substring(0,50))+"..."),f(!0)},fallback:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODAiIGhlaWdodD0iODAiIHZpZXdCb3g9IjAgMCA4MCA4MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjgwIiBoZWlnaHQ9IjgwIiBmaWxsPSIjRjVGNUY1Ii8+CjxwYXRoIGQ9Ik0yNCAzMkw0MCA0OEw1NiAzMkw2NCA0MEw2NCA2NEgyNFYzMloiIGZpbGw9IiNEOUQ5RDkiLz4KPC9zdmc+",loading:m?"lazy":void 0})},bi=()=>e("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"mixed-view",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:e("path",{d:"M1 1h2v2H1V1zm0 4h2v2H1V5zm0 4h2v2H1V9zm4-8h2v2H5V1zm0 4h2v2H5V5zm0 4h2v2H5V9zm4-8h2v2H9V1zm0 4h2v2H9V5zm0 4h2v2H9V9z"})}),yi=()=>e("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"landscape-view",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:e("path",{d:"M1 3h10v6H1V3zm1 1v4h8V4H2z"})}),wi=()=>e("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"portrait-view",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:e("path",{d:"M3 1h6v10H3V1zm1 1v8h4V2H4z"})}),xi=()=>e("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"square-view",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:e("path",{d:"M1 1h10v10H1V1zm1 1v8h8V2H2z"})}),Ci=()=>t("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"ai-icon",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:[e("path",{d:"M2.45454 11.7273C2.45454 11.7273 2.16994 10.446 1.66154 9.88113C1.15314 9.31625 0 9 0 9C0 9 1.15314 8.68374 1.66154 8.11887C2.16994 7.554 2.45454 6.27273 2.45454 6.27273C2.45454 6.27273 2.73915 7.554 3.24755 8.11887C3.75594 8.68374 4.90909 9 4.90909 9C4.90909 9 3.75594 9.31625 3.24755 9.88113C2.73915 10.446 2.45454 11.7273 2.45454 11.7273Z"}),e("path",{d:"M7.63636 9C7.63636 9 7.1304 6.94996 6.22658 6.04614C5.32276 5.14233 3.27273 4.63636 3.27273 4.63636C3.27273 4.63636 5.32276 4.1304 6.22658 3.22657C7.1304 2.32275 7.63636 0.272728 7.63636 0.272728C7.63636 0.272728 8.14233 2.32275 9.04615 3.22657C9.94996 4.1304 12 4.63636 12 4.63636C12 4.63636 9.94996 5.14233 9.04615 6.04614C8.14233 6.94996 7.63636 9 7.63636 9Z"}),e("path",{d:"M1.63636 4.09091C1.63636 4.09091 1.44663 3.19402 1.10769 2.7986C0.768758 2.40318 0 2.18182 0 2.18182C0 2.18182 0.768758 1.96046 1.10769 1.56503C1.44663 1.16961 1.63636 0.272728 1.63636 0.272728C1.63636 0.272728 1.8261 1.16961 2.16503 1.56503C2.50397 1.96046 3.27273 2.18182 3.27273 2.18182C3.27273 2.18182 2.50397 2.40318 2.16503 2.7986C1.8261 3.19402 1.63636 4.09091 1.63636 4.09091Z"}),e("path",{d:"M10.6364 11.7273C10.6364 11.7273 10.4782 11.0866 10.1958 10.8042C9.91336 10.5218 9.27273 10.3636 9.27273 10.3636C9.27273 10.3636 9.91336 10.2055 10.1958 9.92307C10.4782 9.64064 10.6364 9 10.6364 9C10.6364 9 10.7945 9.64064 11.0769 9.92307C11.3594 10.2055 12 10.3636 12 10.3636C12 10.3636 11.3594 10.5218 11.0769 10.8042C10.7945 11.0866 10.6364 11.7273 10.6364 11.7273Z"})]}),_i=()=>t("svg",{width:"64",height:"64",viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e("path",{opacity:"0.5",d:"M6 19H49C54.5229 19 59 23.4772 59 29V46C59 51.5228 54.5228 56 49 56H14C9.58172 56 6 52.4183 6 48V19Z",fill:"#91CAsFF"}),e("path",{d:"M6 19L34.866 18.5L30.7172 11.0737C29.6569 9.17588 27.6531 8 25.4792 8H10C7.79086 8 6 9.79086 6 12V19Z",fill:"#2884FF"}),e("path",{d:"M34.6668 18.6667L31.6921 12.7171C30.8359 11.0048 30.4078 10.1486 29.7692 9.5231C29.2044 8.96995 28.5237 8.54926 27.7764 8.29149C26.9313 8 25.974 8 24.0596 8H13.8668C10.8799 8 9.38641 8 8.24555 8.5813C7.24202 9.09262 6.42612 9.90852 5.91479 10.9121C5.3335 12.0529 5.3335 13.5464 5.3335 16.5333V18.6667M5.3335 18.6667H45.8668C50.3473 18.6667 52.5875 18.6667 54.2988 19.5386C55.804 20.3056 57.0279 21.5294 57.7949 23.0347C58.6668 24.746 58.6668 26.9862 58.6668 31.4667V43.2C58.6668 47.6804 58.6668 49.9206 57.7949 51.6319C57.0279 53.1372 55.804 54.3611 54.2988 55.1281C52.5875 56 50.3473 56 45.8668 56H18.1335C13.6531 56 11.4129 56 9.70157 55.1281C8.19628 54.3611 6.97243 53.1372 6.20544 51.6319C5.3335 49.9206 5.3335 47.6804 5.3335 43.2V18.6667Z",stroke:"#2884FF",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),Si=()=>t("svg",{width:"64",height:"64",viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e("path",{opacity:"0.5",d:"M6 19H49C54.5229 19 59 23.4772 59 29V46C59 51.5228 54.5228 56 49 56H14C9.58172 56 6 52.4183 6 48V19Z",fill:"#91CAFF"}),e("path",{d:"M6 19L34.866 18.5L30.7172 11.0737C29.6569 9.17588 27.6531 8 25.4792 8H10C7.79086 8 6 9.79086 6 12V19Z",stroke:"currentColor"}),e("path",{d:"M34.6663 18.6667L31.6916 12.7171C30.8354 11.0048 30.4073 10.1486 29.7687 9.5231C29.2039 8.96995 28.5232 8.54926 27.7759 8.29149C26.9308 8 25.9736 8 24.0591 8H13.8663C10.8794 8 9.38592 8 8.24506 8.5813C7.24153 9.09262 6.42563 9.90852 5.91431 10.9121C5.33301 12.0529 5.33301 13.5464 5.33301 16.5333V18.6667M5.33301 18.6667H45.8663C50.3468 18.6667 52.587 18.6667 54.2983 19.5386C55.8036 20.3056 57.0274 21.5294 57.7944 23.0347C58.6663 24.746 58.6663 26.9862 58.6663 31.4667V43.2C58.6663 47.6804 58.6663 49.9206 57.7944 51.6319C57.0274 53.1372 55.8036 54.3611 54.2983 55.1281C52.587 56 50.3468 56 45.8663 56H18.133C13.6526 56 11.4124 56 9.70108 55.1281C8.19579 54.3611 6.97194 53.1372 6.20496 51.6319C5.33301 49.9206 5.33301 47.6804 5.33301 43.2V18.6667Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),Ai=()=>t("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e("g",{clipPath:"url(#clip0_443_4214)",children:e("path",{d:"M4.99967 7.99992L6.99967 9.99992L10.9997 5.99992M14.6663 7.99992C14.6663 11.6818 11.6816 14.6666 7.99967 14.6666C4.31778 14.6666 1.33301 11.6818 1.33301 7.99992C1.33301 4.31802 4.31778 1.33325 7.99967 1.33325C11.6816 1.33325 14.6663 4.31802 14.6663 7.99992Z",stroke:"white",strokeLinecap:"round",strokeLinejoin:"round"})}),e("defs",{children:e("clipPath",{id:"clip0_443_4214",children:e("rect",{width:"16",height:"16",fill:"white"})})})]}),ki=()=>e("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M10.8337 5.83333L9.90404 3.9741C9.6365 3.439 9.50271 3.17144 9.30313 2.97597C9.12664 2.80311 8.91393 2.67164 8.68039 2.59109C8.4163 2.5 8.11716 2.5 7.5189 2.5H4.33366C3.40024 2.5 2.93353 2.5 2.57701 2.68166C2.2634 2.84144 2.00844 3.09641 1.84865 3.41002C1.66699 3.76654 1.66699 4.23325 1.66699 5.16667V5.83333M1.66699 5.83333H14.3337C15.7338 5.83333 16.4339 5.83333 16.9686 6.10582C17.439 6.3455 17.8215 6.72795 18.0612 7.19836C18.3337 7.73314 18.3337 8.4332 18.3337 9.83333V13.5C18.3337 14.9001 18.3337 15.6002 18.0612 16.135C17.8215 16.6054 17.439 16.9878 16.9686 17.2275C16.4339 17.5 15.7338 17.5 14.3337 17.5H5.66699C4.26686 17.5 3.5668 17.5 3.03202 17.2275C2.56161 16.9878 2.17916 16.6054 1.93948 16.135C1.66699 15.6002 1.66699 14.9001 1.66699 13.5V5.83333Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})}),Ti=()=>e("svg",{width:"48",height:"49",viewBox:"0 0 48 49",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M32 24.5L24 16.5M24 16.5L16 24.5M24 16.5V34.9C24 37.6814 24 39.0721 25.101 40.6292C25.8326 41.6638 27.9388 42.9406 29.1944 43.1108C31.0842 43.3668 31.8019 42.9924 33.2371 42.2437C39.6333 38.9071 44 32.2135 44 24.5C44 13.4543 35.0457 4.5 24 4.5C12.9543 4.5 4 13.4543 4 24.5C4 31.9028 8.02199 38.3663 14 41.8244",stroke:"#2884FF",strokeWidth:"4",strokeLinecap:"round",strokeLinejoin:"round"})}),Ii=()=>t("svg",{width:"56",height:"56",viewBox:"0 0 56 56",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e("rect",{width:"56",height:"56",rx:"24",fill:"#8946FB"}),e("path",{d:"M28 36.4722C29.0615 37.4223 30.4633 38 32 38C35.3137 38 38 35.3137 38 32C38 29.2331 36.1271 26.9036 33.5798 26.2102M22.4202 26.2102C19.8729 26.9036 18 29.2331 18 32C18 35.3137 20.6863 38 24 38C27.3137 38 30 35.3137 30 32C30 31.2195 29.851 30.4738 29.5798 29.7898M34 24C34 27.3137 31.3137 30 28 30C24.6863 30 22 27.3137 22 24C22 20.6863 24.6863 18 28 18C31.3137 18 34 20.6863 34 24Z",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),Oi=()=>t("svg",{width:"56",height:"56",viewBox:"0 0 56 56",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e("rect",{width:"56",height:"56",rx:"24",fill:"#7ED846"}),e("path",{d:"M20.5 38V33M20.5 23V18M18 20.5H23M18 35.5H23M29 19L27.2658 23.5089C26.9838 24.2421 26.8428 24.6087 26.6235 24.9171C26.4292 25.1904 26.1904 25.4292 25.9171 25.6235C25.6087 25.8428 25.2421 25.9838 24.5089 26.2658L20 28L24.5089 29.7342C25.2421 30.0162 25.6087 30.1572 25.9171 30.3765C26.1904 30.5708 26.4292 30.8096 26.6235 31.0829C26.8428 31.3913 26.9838 31.7579 27.2658 32.4911L29 37L30.7342 32.4911C31.0162 31.7579 31.1572 31.3913 31.3765 31.0829C31.5708 30.8096 31.8096 30.5708 32.0829 30.3765C32.3913 30.1572 32.7579 30.0162 33.4911 29.7342L38 28L33.4911 26.2658C32.7579 25.9838 32.3913 25.8428 32.0829 25.6235C31.8096 25.4292 31.5708 25.1904 31.3765 24.9171C31.1572 24.6087 31.0162 24.2421 30.7342 23.5089L29 19Z",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),Ei=t=>e(oe,Object.assign({component:bi},t)),Pi=t=>e(oe,Object.assign({component:yi},t)),Mi=t=>e(oe,Object.assign({component:wi},t)),Fi=t=>e(oe,Object.assign({component:xi},t)),ji=t=>e(oe,Object.assign({component:Ci},t)),Di=t=>e(oe,Object.assign({component:_i},t)),Ri=t=>e(oe,Object.assign({component:Si},t)),Li=t=>e(oe,Object.assign({component:Ai},t)),zi=t=>e(oe,Object.assign({component:ki},t)),Ni=t=>e(oe,Object.assign({component:Ti},t)),Bi=t=>e(oe,Object.assign({component:Ii},t)),Vi=t=>e(oe,Object.assign({component:Oi},t)),Ui="filemanager_view_mode",Wi=()=>{const{options:e}=ri(),{customIcons:t}=e,n=(e,n,r)=>{const o=null==t?void 0:t[e];return o?i.createElement(o,r):i.createElement(n,r)};return{RootFolderIcon:e=>n("rootFolder",ae,e),FolderIcon:e=>n("folder",ae,e),FolderOpenIcon:e=>n("folderOpen",me,e),AddFolderIcon:e=>n("addFolder",ge,e),FileIcon:e=>n("file",pe,e),UploadIcon:e=>n("upload",fe,e),UploadByUrlIcon:e=>n("uploadByUrl",de,e),ExpandArrowIcon:e=>n("expandArrow",he,e),CollapseArrowIcon:e=>n("collapseArrow",ue,e),ExpandFolderIcon:e=>n("expandArrow",Mr,e),CollapseFolderIcon:e=>n("collapseArrow",Pr,e),FolderPreviewIcon:e=>n("folderPreview",Ri,e),EmptyFolderIcon:e=>n("folderPreview",zi,e),GridViewIcon:e=>n("gridView",ce,e),ListViewIcon:e=>n("listView",le,e),DropZoneFileIcon:e=>n("folderPreview",Ni,e),BigStockIcon:e=>n("folderPreview",Bi,e),BigAIIcon:e=>n("folderPreview",Vi,e),getCustomIcon:n}};var Hi={headerContainer:"headerContainer",actionsContainer:"actionsContainer",filesContainer:"filesContainer",paginationContainer:"paginationContainer",uploadIcon:"uploadIcon",tableContainer:"tableContainer",imagePreview:"imagePreview",fileManagerTableFolder:"fileManagerTableFolder",fileManagerTableFolderInner:"fileManagerTableFolderInner",sortSelect:"sortSelect",fileNameCol:"fileNameCol",fileItemCount:"fileItemCount",fileSize:"fileSize",fileDate:"fileDate",tableMenu:"tableMenu",tableImagePreview:"tableImagePreview",tableFolderIcon:"tableFolderIcon",buttonDeselected:"buttonDeselected",gridRow:"gridRow",gridCard:"gridCard",selectedRow:"selectedRow",gridCardSelected:"gridCardSelected",gridCheckbox:"gridCheckbox",gridCardContent:"gridCardContent",gridPreviewContainer:"gridPreviewContainer",gridPreviewContainerFolder:"gridPreviewContainerFolder",gridFolderIcon:"gridFolderIcon",gridFolderIconImage:"gridFolderIconImage",gridFileName:"gridFileName",gridFileInfo:"gridFileInfo",gridFileMenu:"gridFileMenu",gridFileMenuButton:"gridFileMenuButton",actionsBox:"actionsBox",uploadContainer:"uploadContainer",uploadArea:"uploadArea",active:"active",blockText:"blockText",textTitle:"textTitle",textDescription:"textDescription",buttons:"buttons",btnAi:"btnAi",btnPhoto:"btnPhoto"};const{Text:Yi}=F,{Option:$i}=j,Gi=({files:r,handleSearch:s,handleSort:l,sortBy:h,sortOrder:d,handleSortOptionChange:f,pagination:p,setPagination:g,loading:m,handleItemClick:v,selectedFiles:b,toggleFileSelection:y,handleDroppedFiles:w,onRename:x,onDelete:C,onCopy:_,onMove:S,onEdit:A,fileUpload:k,handleAddFile:T})=>{var I,O,P,M,F;const{t:$}=An(),{FolderPreviewIcon:G,DropZoneFileIcon:X,BigStockIcon:K,BigAIIcon:q}=Wi(),{options:Z,actions:J}=ri(),Q=null===(I=null==Z?void 0:Z.config)||void 0===I?void 0:I.disablePagination,{dataProviders:ee}=Z,{setCurrentMenuFile:te,setSelectedFiles:ne,setActiveLibraryItem:re}=J,{viewMode:ie,setViewMode:oe}=(()=>{const[e,t]=o(()=>{try{return localStorage.getItem(Ui)||"table"}catch(e){return"table"}}),n=c(e=>{t(e);try{localStorage.setItem(Ui,e)}catch(e){console.warn("Не удалось сохранить режим отображения:",e)}},[]),r=c(()=>{n("table"===e?"grid":"table")},[e,n]);return{viewMode:e,setViewMode:n,toggleViewMode:r}})(),[ae,se]=o(!1),[le,ce]=o({}),[ue,he]=o(null),de=u(0),[fe,pe]=o(!1);a(()=>{const e=()=>{pe(window.innerWidth<1200)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);const ge=b.size,me=!1!==(null===(P=null===(O=Z.config)||void 0===O?void 0:O.features)||void 0===P?void 0:P.enableRenameFile)||!1!==(null===(F=null===(M=Z.config)||void 0===M?void 0:M.features)||void 0===F?void 0:F.enableRenameFolder),ve=i.useMemo(()=>{var e,t;if(1!==ge)return!1;const n=Array.from(b)[0],i=r.find(e=>e.id===n);if(!i||i.isFolder)return!1;let o=!1;if(i.type&&i.type.startsWith("image/"))o=!0;else if(i.extension){const e=i.extension.toLowerCase();o=ei.includes(e)}else{const t=null===(e=i.name.split(".").pop())||void 0===e?void 0:e.toLowerCase();o=!!t&&ei.includes(t)}return console.warn("isImageSelected проверка:",{fileName:i.name,fileType:i.type,fileExtension:i.extension,nameExtension:null===(t=i.name.split(".").pop())||void 0===t?void 0:t.toLowerCase(),isImage:o,IMAGE_EXTENSIONS:ei}),o},[ge,b,r]),be=`${h}-${d}`,ye=i.useMemo(()=>Array.isArray(r)&&r.some(e=>(e=>{if(!e)return!1;const t=new Date(e);return!Number.isNaN(t.getTime())})(e.date)),[r]),we=c(async e=>{try{if(null==ee?void 0:ee.getChildrenCount)return await ee.getChildrenCount("folders"===e?void 0:e);if(null==ee?void 0:ee.getFiles){const{files:t,pagination:n}=await ee.getFiles({folderId:"folders"===e?void 0:e,itemType:"all"});return(null==n?void 0:n.total)||t.filter(e=>!e.isFolder).length}return 0}catch(t){return console.error(`Ошибка при получении количества файлов для папки ${e}:`,t),0}},[ee]),xe=c(async()=>{const e=r.filter(e=>e.isFolder);if(0===e.length)return;const t={},n=e.map(async e=>{t[e.id]=await we(e.id)});await Promise.all(n),ce(t)},[r,we]);a(()=>{xe()},[xe]);const Ce=c(e=>{e.preventDefault(),e.stopPropagation(),de.current+=1,e.dataTransfer.types&&e.dataTransfer.types.includes("Files")&&se(!0)},[]),_e=c(e=>{e.preventDefault(),e.stopPropagation(),de.current-=1,0===de.current&&se(!1)},[]),Se=c(e=>{e.preventDefault(),e.stopPropagation()},[]),Ae=c(e=>{if(e.preventDefault(),e.stopPropagation(),se(!1),de.current=0,e.dataTransfer.files&&e.dataTransfer.files.length>0){const t=Array.from(e.dataTransfer.files);w(t).catch(e=>{console.error("Ошибка при загрузке файлов:",e),E.error("Произошла ошибка при загрузке файлов")})}},[w]),ke=(e=()=>{})=>{if(ue)return;const t=setTimeout(()=>{e(),he(null)},300);he(t)},Te=e=>{ue&&(clearTimeout(ue),he(null)),e()},Ie=t=>{var n,r,i,o,a,s,l,c,u,h;const d=[],f=(null===(n=Z.config)||void 0===n?void 0:n.features)||{};t.isFolder||!1!==f.enableEdit&&d.push({key:"edit",label:$("Edit"),icon:e(Ir,{size:16,strokeWidth:null===(r=Z.config)||void 0===r?void 0:r.iconStrokeWidth})}),!1!==f.enableMove&&d.push({key:"move",label:$("Move to"),icon:e(Er,{size:16,strokeWidth:null===(i=Z.config)||void 0===i?void 0:i.iconStrokeWidth})}),!1!==f.enableCopy&&d.push({key:"copy",label:$("Copy"),icon:e(Tr,{size:16,strokeWidth:null===(o=Z.config)||void 0===o?void 0:o.iconStrokeWidth})});return(t.isFolder?!1!==(null===(s=null===(a=Z.config)||void 0===a?void 0:a.features)||void 0===s?void 0:s.enableRenameFolder):!1!==(null===(c=null===(l=Z.config)||void 0===l?void 0:l.features)||void 0===c?void 0:c.enableRenameFile))&&d.push({key:"rename",label:$("Rename"),icon:e(Vr,{size:16,strokeWidth:null===(u=Z.config)||void 0===u?void 0:u.iconStrokeWidth})}),!1!==f.enableDelete&&d.push({key:"delete",label:$("Delete"),icon:e(Ur,{size:16,strokeWidth:null===(h=Z.config)||void 0===h?void 0:h.iconStrokeWidth}),style:{color:"#ff4d4f"}}),d},Oe=e=>({key:t})=>{const n=r.find(t=>t.id===e);switch(te&&(null==n?void 0:n.id)&&te(null==n?void 0:n.id),t){case"edit":A(n);break;case"move":S();break;case"copy":_();break;case"rename":x(e);break;case"delete":C(n);break;default:te&&te("")}},Ee=[{key:"selection",width:46,render:(t,n)=>e(D,{checked:b.has(n.id),onChange:()=>y(n.id)})},{key:"preview",width:60,render:(t,n)=>n.isFolder?e("div",{className:Hi.fileManagerTableFolder,children:e("div",{className:Hi.fileManagerTableFolderInner,children:e(Di,{className:Hi.tableFolderIcon,style:{width:40,height:40}})})}):e(vi,{className:`${Hi.imagePreview} ${Hi.tableImagePreview}`,src:n.thumbnail||n.thumbnailUrl||n.url,alt:n.name,width:40,height:40,preview:!0,file:n})},{title:$("Name"),width:"calc(100% - 430px)",dataIndex:"name",key:"name",className:Hi.fileNameCol,render:(e,n)=>{const r=n.isFolder&&le[n.id]||0,i=$(1===r?"item":"items");return t("div",{className:Hi.fileName,children:[e||$("No name"),n.isFolder&&t("div",{className:Hi.fileItemCount,children:[r," ",i]})]})}},{title:$("Dimensions"),key:"dimensions",width:100,render:(t,n)=>e("div",{className:Hi.fileSize,children:n.isFolder?$("Folder"):$("File")})},...ye?[{title:$("Date"),dataIndex:"date",key:"date",width:180,render:(t,n)=>{const r=n.date;if(!r)return null;const i=new Date(r);if(isNaN(i.getTime()))return null;return e("div",{className:Hi.fileDate,children:$("date_of_add",{date:(o=i,`${o.getDate()} ${[$("months.january"),$("months.february"),$("months.march"),$("months.april"),$("months.may"),$("months.june"),$("months.july"),$("months.august"),$("months.september"),$("months.october"),$("months.november"),$("months.december")][o.getMonth()]} ${o.getFullYear()}`)})});var o}}]:[],{width:40,title:"",dataIndex:"",key:"x",onCell:()=>({style:{padding:0}}),render:(t,n)=>{var r;return e(R,{arrow:!0,placement:"bottom",menu:{items:Ie(n),onClick:Oe(n.id)},trigger:["hover"],children:e("span",{className:`${Hi.tableMenu} tableMenuButton`,onClick:e=>{e.stopPropagation(),e.preventDefault()},children:e(Or,{size:16,strokeWidth:null===(r=Z.config)||void 0===r?void 0:r.iconStrokeWidth})})})}}],Pe=()=>{var n,i,o,a,l,c,u,h,d;return t("div",ge?{className:`header-container ${Hi.headerContainer}`,children:[t(Yi,{type:"secondary",className:"selected-text",children:[ge," ",$("selected"),e(W,{title:fe?$("Deselected"):null,children:e(U,{className:Hi.buttonDeselected,icon:e(zr,{size:16,strokeWidth:null===(n=Z.config)||void 0===n?void 0:n.iconStrokeWidth}),onClick:()=>ne&&ne(new Set),children:$("Deselect")})})]}),t(H,{children:[ve&&e(W,{title:fe?$("Edit"):null,children:e(U,{icon:e(Ir,{size:16,strokeWidth:null===(i=Z.config)||void 0===i?void 0:i.iconStrokeWidth}),onClick:()=>{const e=Array.from(b)[0],t=r.find(t=>t.id===e);A(t)},disabled:!ve,children:$("Edit")})}),e(W,{title:fe?$("Move to"):null,children:e(U,{icon:e(Er,{size:16,strokeWidth:null===(o=Z.config)||void 0===o?void 0:o.iconStrokeWidth}),onClick:S,children:$("Move to")})}),e(W,{title:fe?$("Copy"):null,children:e(U,{icon:e(Tr,{size:16,strokeWidth:null===(a=Z.config)||void 0===a?void 0:a.iconStrokeWidth}),onClick:_,children:$("Copy")})}),!(1!==ge||!me)&&e(W,{title:fe?$("Rename"):null,children:e(U,{icon:e(Vr,{size:16,strokeWidth:null===(l=Z.config)||void 0===l?void 0:l.iconStrokeWidth}),onClick:()=>x(),disabled:1!==ge||!me,children:$("Rename")})}),e(W,{title:fe?$("Delete"):null,children:e(U,{danger:!0,icon:e(Ur,{size:16,strokeWidth:null===(c=Z.config)||void 0===c?void 0:c.iconStrokeWidth}),onClick:e=>{e.stopPropagation(),e.preventDefault(),C()},children:$("Delete")})})]})]}:{className:Hi.headerContainer,children:[e("div",{className:"search-container",children:e(fi,{placeholder:$("Search"),onSearch:s,className:Hi.searchInput})}),t("div",{className:Hi.actionsBox,children:[e("div",{className:"sort-container",children:t(j,{value:be,onChange:f,className:Hi.sortSelect,popupMatchSelectWidth:!1,suffixIcon:e(Ar,{size:16,strokeWidth:null===(u=Z.config)||void 0===u?void 0:u.iconStrokeWidth}),children:[e($i,{value:"date-desc",children:$("Newest first")}),e($i,{value:"date-asc",children:$("Oldest first")}),e($i,{value:"size-desc",children:$("Largest first")}),e($i,{value:"size-asc",children:$("Smallest first")}),e($i,{value:"name-asc",children:$("A-Z")}),e($i,{value:"name-desc",children:$("Z-A")}),e($i,{value:"type-asc",children:$("By type")})]})}),e("div",{className:Hi.actionsContainer,children:e(Y,{options:[{value:"grid",icon:e(Fr,{size:16,strokeWidth:null===(h=Z.config)||void 0===h?void 0:h.iconStrokeWidth})},{value:"table",icon:e(Dr,{size:20,strokeWidth:null===(d=Z.config)||void 0===d?void 0:d.iconStrokeWidth})}],value:ie,onChange:e=>oe(e)})})]})]})},Me=e("table"===ie?()=>t("div",{className:Hi.tableContainer,children:[e(Pe,{}),e(z,{dataSource:r,columns:Ee,rowKey:"id",pagination:!1,loading:m,rowClassName:e=>(null==b?void 0:b.has(e.id))?Hi.selectedRow:"",tableLayout:"fixed",onRow:e=>({onClick:t=>{const n=t.target;ke(()=>{t.stopPropagation(),t.preventDefault();const r=!!n.closest(".ant-image")||!!n.closest(".ant-image-preview-wrap"),i=!!n.closest(".tableMenuButton"),o=!!n.closest(".ant-dropdown-menu");r||i||o||y(e.id)})},onDoubleClick:t=>{Te(()=>{t.stopPropagation(),t.preventDefault();const n=t.target;e.isFolder?v(e):n.closest(".ant-image")||n.closest(".ant-image-preview-wrap")||!Z.onEditorOk||(console.warn("onEditorOk"),Z.onEditorOk(e))})}}),showHeader:!1})]}):()=>t("div",{className:Hi.tableContainer,children:[e(Pe,{}),e(N,{gutter:[16,16],className:Hi.gridRow,style:{gap:20,padding:"0 24px 24px",margin:0},children:r.map(r=>{var i;return e(B,{className:Hi.gridCard_col,style:{padding:0},children:t(V,{hoverable:!0,cover:e("div",{className:r.isFolder?Hi.gridPreviewContainerFolder:Hi.gridPreviewContainer,onClick:e=>{e.stopPropagation(),r.isFolder&&ke(()=>{y(r.id)})},onDoubleClick:e=>{e.stopPropagation(),Te(()=>{r.isFolder&&v(r)})},children:r.isFolder?e("div",{className:Hi.gridFolderIcon,children:e(G,{className:Hi.gridFolderIconImage})}):e(vi,{src:r.thumbnail||r.thumbnailUrl||r.url,alt:r.name,className:Hi.gridImagePreview,preview:!0,file:r})}),className:`${Hi.gridCard} ${(null==b?void 0:b.has(r.id))?Hi.gridCardSelected:""}`,onClick:e=>{e.stopPropagation(),e.preventDefault();const t=e.target;t.closest(".gridFileMenuButton")||t.closest(".ant-dropdown-menu")||ke(()=>y(r.id))},onDoubleClick:e=>{e.stopPropagation(),Te(()=>{r.isFolder&&v(r)})},children:[t("div",{className:Hi.gridCardContent,onDoubleClick:e=>{e.stopPropagation(),e.preventDefault(),Te(()=>{Z.onEditorOk&&Z.onEditorOk(r)})},onClick:e=>{e.stopPropagation(),e.preventDefault();const t=e.target;t.closest(".gridFileMenuButton")||t.closest(".ant-dropdown-menu")||ke(()=>y(r.id))},children:[e("div",{className:Hi.gridFileName,children:r.name||$("Untitled")}),e("div",{className:Hi.gridFileInfo,children:r.isFolder?(()=>{const e=le[r.id]||0;return`${e} ${$(1===e?"item":"items")}`})():t(n,{children:[r.dimensions&&`${r.dimensions} • `,r.size&&`${(r.size/1e6).toFixed(2)} ${$("MB")} • `,r.extension&&`${r.extension}`]})})]}),e("div",{className:Hi.gridFileMenu,children:e(R,{menu:{items:Ie(r),onClick:Oe(r.id)},arrow:!0,placement:"bottom",trigger:["hover"],children:e(U,{type:"default",className:`${Hi.gridFileMenuButton} gridFileMenuButton`,onClick:()=>{},children:e(Or,{size:16,strokeWidth:null===(i=Z.config)||void 0===i?void 0:i.iconStrokeWidth})})},r.id)}),e("div",{onClick:e=>{e.stopPropagation()},className:Hi.gridCheckbox,children:e(D,{checked:b.has(r.id),style:{height:20},onChange:e=>{e.stopPropagation(),y(r.id)}})})]})},r.id)})})]}),{});return e("div",{className:"content-layout",children:t("div",{className:Hi.filesContainer,children:[m||0!==(null==r?void 0:r.length)?Me:t("div",{className:Hi.uploadContainer,children:[t("div",{className:`${Hi.uploadArea} ${ae?Hi.active:""}`,onClick:T,onDragOver:Se,onDragLeave:_e,onDragEnter:Ce,onDrop:Ae,children:[e("div",{className:Hi.uploadIcon,children:e(X,{})}),e("div",{className:Hi.textTitle,children:$("Select a file or drag and drop it here")}),e("div",{className:Hi.textDescription,children:$("Supported files:")+" jpeg, .svg, .png"})]}),t("div",{className:Hi.buttons,children:[t("button",{className:Hi.btnPhoto,onClick:()=>{re&&re(qr)},children:[e("div",{className:Hi.icon,children:e(K,{})}),t("div",{className:Hi.blockText,children:[e("div",{className:Hi.textTitle,children:$("Stock")}),e("div",{className:Hi.textDescription,children:$("Select an image from our library")})]})]}),t("button",{className:Hi.btnAi,onClick:()=>{re&&re(Zr)},children:[e("div",{className:Hi.icon,children:e(q,{})}),t("div",{className:Hi.blockText,children:[e("div",{className:Hi.textTitle,children:$("AI generation")}),e("div",{className:Hi.textDescription,children:$("Creating an image on demand")})]})]})]})]}),!Q&&p.total>p.pageSize&&e("div",{className:Hi.paginationContainer,children:e(L,{current:p.current,pageSize:p.pageSize,total:p.total,onChange:(e,t)=>g({current:e,pageSize:t,total:p.total}),showSizeChanger:!0,showTotal:e=>$("total pages",{total:e})})})]})})},Xi=({isModalVisible:r,handleModalOk:i,handleModalCancel:o,form:a,selectedFolder:s,folders:l,isUrlModalVisible:c,setIsUrlModalVisible:u,handleAddFileByUrl:h,urlForm:d,isRenameModalVisible:f,handleRenameOk:p,handleRenameCancel:g,renameForm:m,fileToRename:v,files:b,isMoveModalVisible:y,handleMoveOk:w,handleMoveCancel:x,moveForm:C,selectedFiles:_,isRenameFolderModalVisible:S,handleRenameFolderOk:A,handleRenameFolderCancel:k,renameFolderForm:T,folderToRename:I,isCopyModalVisible:E,handleCopyOk:M,handleCopyCancel:F,copyForm:j,isDeleteConfirmVisible:D,handleDeleteConfirmOk:R,handleDeleteConfirmCancel:L,fetchChildFolders:z})=>{var N,B,V;const{t:U}=An(),W=O.useWatch("folderName",a),H=!W||0===String(W).trim().length,Y=Array.isArray(b)?b:[],X=v?null===(N=Y.find(e=>e.id===v))||void 0===N?void 0:N.name:"",K=Array.isArray(l)?l:[],q=I?null===(B=K.find(e=>e.id===I))||void 0===B?void 0:B.name:"",Z=v?Y.find(e=>e.id===v):null,J=(null==Z?void 0:Z.isFolder)||(null==v?void 0:v.startsWith("folder_")),Q=()=>{const t=(n=null,r=new Set)=>l.filter(e=>{const t=null===n&&!e.parentId,r=e.parentId===n;return t||r}).map(n=>{if(r.has(n.id))return{key:n.id,title:`${n.name} (циклическая ссылка)`,icon:e(ae,{style:{color:"red"}}),disabled:!0,isLeaf:!0};const i=Array.from(_).includes(n.id),o=new Set(r);o.add(n.id);const a=t(n.id,o);return{key:n.id,title:n.name,icon:e(ae,{}),disabled:i,children:a.length>0?a:void 0,isLeaf:0===a.length}}),n=t();return[{key:"root",title:U("Folders"),icon:e(ae,{}),children:n}]};return t(n,{children:[e($,{title:e("div",{className:"modal-title",children:U("Creating a new folder")}),open:r,onOk:i,onCancel:o,okText:U("Create"),cancelText:U("Cancel"),okButtonProps:{disabled:H},children:t(O,{form:a,layout:"vertical",children:[e(O.Item,{name:"folderName",label:e("div",{className:"form-label",children:U("Folder name")}),rules:[{required:!0,message:U("Enter the name of the folder")},{validator:(e,t)=>"string"==typeof t&&0===t.trim().length?Promise.reject(new Error(U("Enter the name of the folder"))):Promise.resolve()}],initialValue:U("New folder"),className:"form-item",children:e(P,{autoFocus:!0,className:"form-input"})}),e("div",{children:s&&"folders"!==s?t("p",{children:[U("A folder will be created inside:")," ",(null===(V=K.find(e=>e.id===s))||void 0===V?void 0:V.name)||U("selected folder")]}):e("p",{children:U("The folder will be created in the root directory")})})]})}),e($,{title:e("div",{className:"modal-title",children:U("Upload image by URL")}),open:c,onOk:()=>h(null),onCancel:()=>u(!1),okText:U("Download"),cancelText:U("Cancel"),children:t(O,{form:d,layout:"vertical",children:[e(O.Item,{name:"fileUrl",label:e("div",{className:"form-label",children:U("image URL")}),rules:[{required:!0,message:U("Enter the URL of the image")}],className:"form-item",children:e(P,{autoFocus:!0,placeholder:"https://example.com/image.jpg",className:"form-input"})}),e("p",{children:U("Supported formats: JPG, JPEG, PNG, GIF, WEBP, SVG, BMP")})]})}),e($,{title:e("div",{className:"modal-title",children:J?`${U("Rename folder")} ${X}`:U("Rename file",{currentFileName:X})}),open:f,onOk:p,onCancel:g,okText:U("Rename"),cancelText:U("Cancel"),children:e(O,{form:m,layout:"vertical",children:e(O.Item,{name:"newFileName",label:e("div",{className:"form-label",children:U(J?"New folder name":"New file name")}),rules:[{required:!0,message:U(J?"Enter a new folder name":"Enter a new file name")}],className:"form-item",children:e(P,{autoFocus:!0,className:"form-input"})})})}),e($,{title:e("div",{className:"modal-title",children:U("Move to")}),open:y,onOk:w,onCancel:x,okText:"Переместить",cancelText:U("Cancel"),children:t(O,{form:C,layout:"vertical",children:[e("div",{className:"file-name-label",children:U("Selected files:",{count:_.size})}),e(O.Item,{name:"targetFolder",label:e("div",{className:"form-label",children:U("Select the destination folder")}),rules:[{required:!0,message:U("Select the destination folder")}],className:"form-item",children:e(G,{defaultExpandAll:!0,treeData:Q(),selectable:!0,onSelect:async e=>{e.length>0&&(C.setFieldsValue({targetFolder:e[0]}),await z(e[0].toString()))}})})]})}),e($,{title:t("div",{className:"modal-title",children:[U("Rename folder")," ",q]}),open:S,onOk:A,onCancel:k,okText:U("Rename"),cancelText:U("Cancel"),children:e(O,{form:T,layout:"vertical",children:e(O.Item,{name:"newFolderName",label:e("div",{className:"form-label",children:U("New folder name")}),rules:[{required:!0,message:U("Enter a new folder name")}],className:"form-item",children:e(P,{autoFocus:!0,className:"form-input"})})})}),e($,{title:e("div",{className:"modal-title",children:U("Copy to folder")}),open:E,onOk:M,onCancel:F,okText:U("Copy"),cancelText:U("Cancel"),children:t(O,{form:j,layout:"vertical",children:[e("div",{className:"file-name-label",children:U("Selected files:",{count:_.size})}),e(O.Item,{name:"targetFolder",label:e("div",{className:"form-label",children:U("Select the destination folder")}),rules:[{required:!0,message:U("Select the destination folder")}],className:"form-item",children:e(G,{defaultExpandAll:!0,treeData:Q(),selectable:!0,onSelect:async e=>{e.length>0&&(j.setFieldsValue({targetFolder:e[0]}),await z(e[0].toString()))}})})]})}),e($,{title:e("div",{className:"modal-title",children:U("Confirm deletion")}),open:!!D,onOk:()=>R&&R(),onCancel:()=>L&&L(),okText:U("Delete"),cancelText:U("Cancel"),okButtonProps:{danger:!0},children:e("div",{children:U("Are you sure you want to delete the selected items?")})})]})},Ki=e=>{var t;const{state:n,actions:r,options:i}=ri(),{t:o}=An(),{folders:a,folderToRename:s,renameFolderForm:l,isRenameFolderModalVisible:u}=n,{setFolderToRename:h,setIsRenameFolderModalVisible:d}=r,{apiEndpoints:f,dataProviders:p,config:g}=i,m=c(e=>{null==h||h(e),null==d||d(!0);const t=null==a?void 0:a.find(t=>t.id===e);t&&l&&l.setFieldsValue({newFolderName:t.name})},[h,d,a,l]),v=c(()=>{null==d||d(!1),null==h||h(null),null==l||l.resetFields()},[d,h,l]),b=c(async()=>{var t;if(s&&l)try{const n=await l.validateFields();if(!(null==n?void 0:n.newFolderName))return;if(!(!1!==(null===(t=null==g?void 0:g.features)||void 0===t?void 0:t.enableRenameFolder)))return void E.error(o("Folder rename is disabled by config"));if(!(null==p?void 0:p.renameFolder))throw new Error("renameFolder не реализован в dataProviders");const i=await p.renameFolder(s,n.newFolderName.trim());if(!(null==i?void 0:i.id))return void E.error("Некорректный ответ при переименовании папки");E.success(`${o("Folder renamed to")} ${n.newFolderName}`),v(),await e(),s!==i.id&&r.setSelectedFolder&&r.setSelectedFolder(i.id)}catch(e){console.error("Ошибка при переименовании папки:",e),E.error("Ошибка при переименовании папки")}},[s,l,f,v,e,o,null===(t=null==g?void 0:g.features)||void 0===t?void 0:t.enableRenameFolder]);return{state:{isRenamingFolder:u||!1,folderToRename:s},actions:{showRenameFolderModal:m,handleRenameFolderCancel:v,handleRenameFolderOk:b}}};var qi="button",Zi="foldersTitle",Ji="folderActions",Qi="fileCount",eo="uploadButton",to="folderMenu",no="folderLabelItem",ro="foldersTitleItem",io="folderLabel",oo="foldersContainer",ao="divider",so="buttonWrapper",lo="uploadButtonTitle",co="emptyFolderContainer";const uo=f(p(({selectedFolder:n,generateMenuItems:r,onFolderSelect:i,folders:s,fetchFolders:l,fetchChildFolders:u,handleAddFile:d,setIsUrlModalVisible:f,handleCreateFolder:p,activeLibraryItem:m,setActiveLibraryItem:v},b)=>{const y=h(()=>Array.isArray(s)?s:[],[s]),{t:w}=An(),[x,C]=o({}),{options:_}=ri(),{dataProviders:S,config:A}=_;Ki(l);const{UploadByUrlIcon:k,ExpandArrowIcon:T,CollapseArrowIcon:I,CollapseFolderIcon:O,ExpandFolderIcon:E,EmptyFolderIcon:P}=Wi(),M=c(e=>{const t=[],n=e=>{e.forEach(e=>{t.push(e.key),e.children&&n(e.children)})};return n(e),t},[]),[F,j]=o(()=>{if(!0===(null==A?void 0:A.expandAllFoldersOnInit)&&"lazy"!==(null==A?void 0:A.folderTreeLoading)){const e=r();return M(e)}return[]});a(()=>{if(!0===(null==A?void 0:A.expandAllFoldersOnInit)&&"lazy"!==(null==A?void 0:A.folderTreeLoading)){const e=r(),t=M(e);j(t)}},[y,r,M,null==A?void 0:A.expandAllFoldersOnInit,null==A?void 0:A.folderTreeLoading]);const D=c(async e=>{try{if(null==S?void 0:S.getChildrenCount)return await S.getChildrenCount("folders"===e?void 0:e);if(null==S?void 0:S.getFiles){const{files:t,pagination:n}=await S.getFiles({folderId:"folders"===e?void 0:e,itemType:"all"});return(null==n?void 0:n.total)||t.filter(e=>!e.isFolder).length}return 0}catch(t){return console.error(`Ошибка при получении количества файлов для папки ${e}:`,t),0}},[S]),L=c(async()=>{if(0===y.length)return;const e={};e.folders=await D("folders");const t=y.map(async t=>{const n=await D(t.id);e[t.id]=n});await Promise.all(t),C(e)},[y,D]),z=c(async e=>{const t=await D(e);C(n=>Object.assign(Object.assign({},n),{[e]:t}))},[D]);g(b,()=>({refreshFileCounts:L}),[L]),a(()=>{L()},[L]);const N=c(async()=>{await d(),n?await z(n):await z("folders")},[d,n,z]),B=h(()=>({items:[{key:"upload-url",label:w("Upload image by URL"),icon:e(Wr,{size:18,strokeWidth:null==A?void 0:A.iconStrokeWidth}),onClick:()=>null==f?void 0:f(!0)}]}),[k,f,w]),V=[{key:Xr,label:w("My files"),icon:e(jr,{size:20,strokeWidth:null==A?void 0:A.iconStrokeWidth})},{key:Kr,label:w("GIF"),icon:e(Rr,{size:20,strokeWidth:null==A?void 0:A.iconStrokeWidth})},{key:qr,label:w("Stock images"),icon:e(kr,{size:20,strokeWidth:null==A?void 0:A.iconStrokeWidth})},{key:Zr,label:w("AI"),icon:e(Br,{size:20,strokeWidth:null==A?void 0:A.iconStrokeWidth}),disabled:!(null==A?void 0:A.sseQuery)}],W=c(async e=>{const t=e[0];t&&"empty"!==t&&(m!==Xr&&v(Xr),null==i||i(t),await(null==u?void 0:u(t)))},[i,m,v,u]),H=c(({key:e})=>{console.warn("key",e),v(e)},[v]),Y=c(async(e,t)=>{var n;j(e);if(!("lazy"===(null==A?void 0:A.folderTreeLoading)))return;const r=(null===(n=null==t?void 0:t.node)||void 0===n?void 0:n.key)||void 0;if(r&&"folders"!==r)try{await(null==u?void 0:u(r))}catch(e){console.warn("Не удалось подгрузить дочерние папки для",r,e)}},[null==A?void 0:A.folderTreeLoading,u]),$=c(()=>{var i,o;const a=r(),s=e=>{F.includes(e)&&n===e?j(F.filter(t=>t!==e)):F.includes(e)||j([...F,e]),n!==e&&W([e])};if(0===a.length||1===a.length&&(!a[0].children||0===a[0].children.length))return[{key:"empty",title:e("div",{className:co,children:w("No data to display")})}];const l=n=>{var r;const i=x[n.key]||0,o=F.includes(n.key),a=(()=>{var t;return(null===(t=n.children)||void 0===t?void 0:t.length)?e(o?O:E,{size:20,strokeWidth:null==A?void 0:A.iconStrokeWidth}):e(P,{size:20,strokeWidth:null==A?void 0:A.iconStrokeWidth})})(),c=t("div",{className:"folder-item-container",onClick:()=>s(n.key),children:[t("div",{className:io,children:[n.icon||a,e("span",{className:no,children:n.label})]}),e("div",{className:Qi,title:`${i} ${1===i?"файл":"файлов"}`,children:i})]});return{key:n.key,title:c,children:null===(r=n.children)||void 0===r?void 0:r.map(l)}},c=F.includes("folders"),u=e("div",{className:Zi,onClick:()=>s("folders"),children:t("div",{className:ro,children:[e(c?O:E,{size:20,strokeWidth:null==A?void 0:A.iconStrokeWidth}),e("span",{className:no,children:w("Folders")})]})});return a.length>0&&"folders"===a[0].key?(null==A?void 0:A.enableTrashFolder)?[{key:"folders",title:u,children:null===(i=a[0].children)||void 0===i?void 0:i.map(l)},{key:"Trash",title:e("div",{className:Zi,onClick:()=>s("folders"),children:t("div",{className:ro,children:[e(Ur,{size:20,strokeWidth:null==A?void 0:A.iconStrokeWidth}),e("span",{className:no,children:w("Trash")})]})})}]:[{key:"folders",title:u,children:null===(o=a[0].children)||void 0===o?void 0:o.map(l)}]:a.map(l)},[r,F,O,null==A?void 0:A.iconStrokeWidth,null==A?void 0:A.enableTrashFolder,E,w,n,W,x,P]),q=h(()=>$(),[$]);return t("div",{className:"sidebar-container",children:[e("div",{className:so,children:t(R.Button,{type:"primary",size:"large",icon:e(Ar,{size:24,strokeWidth:null==A?void 0:A.iconStrokeWidth}),onClick:N,menu:B,className:eo,children:[e(Lr,{size:24,strokeWidth:null==A?void 0:A.iconStrokeWidth})," ",e("span",{className:lo,children:w("Upload image")})]})}),e(X,{className:"folder-menu",items:V,defaultSelectedKeys:[Xr],onSelect:({key:e})=>H({key:e}),selectedKeys:[m]}),e(K,{className:ao}),t("div",{className:oo,children:[e(G,{className:`${to} folder-tree`,selectedKeys:[n],defaultSelectedKeys:[n],expandedKeys:F,defaultExpandedKeys:[],onSelect:W,onExpand:Y,treeData:q,switcherIcon:({expanded:t})=>e(t?I:T,{}),showLine:!1}),e("div",{className:Ji,children:e(U,{onClick:e=>{e.stopPropagation(),p()},className:qi,icon:e(Mr,{size:18,strokeWidth:null==A?void 0:A.iconStrokeWidth}),size:"middle"})})]})]})}));uo.displayName="FolderSidebar";var ho=Object.defineProperty,fo=(e,t,n)=>(((e,t,n)=>{t in e?ho(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n),po=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function go(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function mo(e){var t=e.default;if("function"==typeof t){var n=function(){return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}var vo=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===bo}(e)}(e)};var bo="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function yo(e,t){return!1!==t.clone&&t.isMergeableObject(e)?So(function(e){return Array.isArray(e)?[]:{}}(e),e,t):e}function wo(e,t,n){return e.concat(t).map(function(e){return yo(e,n)})}function xo(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return e.propertyIsEnumerable(t)}):[]}(e))}function Co(e,t){try{return t in e}catch{return!1}}function _o(e,t,n){var r={};return n.isMergeableObject(e)&&xo(e).forEach(function(t){r[t]=yo(e[t],n)}),xo(t).forEach(function(i){(function(e,t){return Co(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,i)||(Co(e,i)&&n.isMergeableObject(t[i])?r[i]=function(e,t){if(!t.customMerge)return So;var n=t.customMerge(e);return"function"==typeof n?n:So}(i,n)(e[i],t[i],n):r[i]=yo(t[i],n))}),r}function So(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||wo,n.isMergeableObject=n.isMergeableObject||vo,n.cloneUnlessOtherwiseSpecified=yo;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):_o(e,t,n):yo(t,n)}So.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return So(e,n,t)},{})};var Ao=So;function ko(e,t){return void 0===t&&(t=15),+parseFloat(Number(e).toPrecision(t))}function To(e){var t=e.toString().split(/[eE]/),n=(t[0].split(".")[1]||"").length-+(t[1]||0);return n>0?n:0}function Io(e){if(-1===e.toString().indexOf("e"))return Number(e.toString().replace(".",""));var t=To(e);return t>0?ko(Number(e)*Math.pow(10,t)):Number(e)}function Oo(e){Fo&&(e>Number.MAX_SAFE_INTEGER||e<Number.MIN_SAFE_INTEGER)&&console.warn(e+" is beyond boundary when transfer to integer, the results may not be accurate")}function Eo(e,t){var n=e[0],r=e[1],i=e.slice(2),o=t(n,r);return i.forEach(function(e){o=t(o,e)}),o}function Po(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(e.length>2)return Eo(e,Po);var n=e[0],r=e[1],i=Io(n),o=Io(r),a=To(n)+To(r),s=i*o;return Oo(s),s/Math.pow(10,a)}function Mo(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(e.length>2)return Eo(e,Mo);var n=e[0],r=e[1],i=Io(n),o=Io(r);return Oo(i),Oo(o),Po(i/o,ko(Math.pow(10,To(r)-To(n))))}var Fo=!0;var jo={strip:ko,plus:function e(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(t.length>2)return Eo(t,e);var r=t[0],i=t[1],o=Math.pow(10,Math.max(To(r),To(i)));return(Po(r,o)+Po(i,o))/o},minus:function e(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(t.length>2)return Eo(t,e);var r=t[0],i=t[1],o=Math.pow(10,Math.max(To(r),To(i)));return(Po(r,o)-Po(i,o))/o},times:Po,divide:Mo,round:function(e,t){var n=Math.pow(10,t),r=Mo(Math.round(Math.abs(Po(e,n))),n);return e<0&&0!==r&&(r=Po(r,-1)),r},digitLength:To,float2Fixed:Io,enableBoundaryChecking:function(e){void 0===e&&(e=!0),Fo=e}};function Do(e){return e&&e.Math==Math?e:void 0}var Ro="object"==typeof globalThis&&Do(globalThis)||"object"==typeof window&&Do(window)||"object"==typeof self&&Do(self)||"object"==typeof global&&Do(global)||function(){return this}()||{};function Lo(){return Ro}function zo(e,t,n){var r=n||Ro,i=r.__SENTRY__=r.__SENTRY__||{};return i[e]||(i[e]=t())}var No=Object.prototype.toString;function Bo(e){switch(No.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return Ko(e,Error)}}function Vo(e,t){return No.call(e)===`[object ${t}]`}function Uo(e){return Vo(e,"ErrorEvent")}function Wo(e){return Vo(e,"DOMError")}function Ho(e){return Vo(e,"String")}function Yo(e){return null===e||"object"!=typeof e&&"function"!=typeof e}function $o(e){return Vo(e,"Object")}function Go(e){return typeof Event<"u"&&Ko(e,Event)}function Xo(e){return Boolean(e&&e.then&&"function"==typeof e.then)}function Ko(e,t){try{return e instanceof t}catch{return!1}}function qo(e,t){try{let r=e;var n=[];let i=0,o=0;let a;for(;r&&i++<5&&(a=Zo(r,t),!("html"===a||i>1&&o+3*n.length+a.length>=80));)n.push(a),o+=a.length,r=r.parentNode;return n.reverse().join(" > ")}catch{return"<unknown>"}}function Zo(e,t){var n=e,r=[];let i,o,a,s,l;if(!n||!n.tagName)return"";r.push(n.tagName.toLowerCase());var c=t&&t.length?t.filter(e=>n.getAttribute(e)).map(e=>[e,n.getAttribute(e)]):null;if(c&&c.length)c.forEach(e=>{r.push(`[${e[0]}="${e[1]}"]`)});else if(n.id&&r.push(`#${n.id}`),i=n.className,i&&Ho(i))for(o=i.split(/\s+/),l=0;l<o.length;l++)r.push(`.${o[l]}`);var u=["type","name","title","alt"];for(l=0;l<u.length;l++)a=u[l],s=n.getAttribute(a),s&&r.push(`[${a}="${s}"]`);return r.join("")}class Jo extends Error{constructor(e,t="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=t}}var Qo=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/;function ea(e,t=!1){const{host:n,path:r,pass:i,port:o,projectId:a,protocol:s,publicKey:l}=e;return`${s}://${l}${t&&i?`:${i}`:""}@${n}${o?`:${o}`:""}/${r&&`${r}/`}${a}`}function ta(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function na(e){var t="string"==typeof e?function(e){var t=Qo.exec(e);if(!t)throw new Jo(`Invalid Sentry Dsn: ${e}`);const[n,r,i="",o,a="",s]=t.slice(1);let l="",c=s;var u=c.split("/");if(u.length>1&&(l=u.slice(0,-1).join("/"),c=u.pop()),c){var h=c.match(/^\d+/);h&&(c=h[0])}return ta({host:o,pass:i,path:l,projectId:c,port:a,protocol:n,publicKey:r})}(e):ta(e);return function(e){if(!(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__))return;const{port:t,projectId:n,protocol:r}=e;if(["protocol","publicKey","host","projectId"].forEach(t=>{if(!e[t])throw new Jo(`Invalid Sentry Dsn: ${t} missing`)}),!n.match(/^\d+$/))throw new Jo(`Invalid Sentry Dsn: Invalid projectId ${n}`);if(!function(e){return"http"===e||"https"===e}(r))throw new Jo(`Invalid Sentry Dsn: Invalid protocol ${r}`);if(t&&isNaN(parseInt(t,10)))throw new Jo(`Invalid Sentry Dsn: Invalid port ${t}`)}(t),t}var ra=Lo(),ia=["debug","info","warn","error","log","assert","trace"];function oa(e){var t=Lo();if(!("console"in t))return e();var n=t.console,r={};ia.forEach(e=>{var i=n[e]&&n[e].__sentry_original__;e in t.console&&i&&(r[e]=n[e],n[e]=i)});try{return e()}finally{Object.keys(r).forEach(e=>{n[e]=r[e]})}}function aa(){let e=!1;var t={enable:()=>{e=!0},disable:()=>{e=!1}};return typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__?ia.forEach(n=>{t[n]=(...t)=>{e&&oa(()=>{ra.console[n](`Sentry Logger [${n}]:`,...t)})}}):ia.forEach(e=>{t[e]=()=>{}}),t}let sa;function la(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:`${e.substr(0,t)}...`}function ca(e,t){if(!Array.isArray(e))return"";var n=[];for(let t=0;t<e.length;t++){var r=e[t];try{n.push(String(r))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function ua(e,t){return!!Ho(e)&&(function(e){return Vo(e,"RegExp")}(t)?t.test(e):"string"==typeof t&&-1!==e.indexOf(t))}function ha(e,t,n){if(t in e){var r=e[t],i=n(r);if("function"==typeof i)try{fa(i,r)}catch{}e[t]=i}}function da(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}function fa(e,t){var n=t.prototype||{};e.prototype=t.prototype=n,da(e,"__sentry_original__",t)}function pa(e){return e.__sentry_original__}function ga(e){if(Bo(e))return{message:e.message,name:e.name,stack:e.stack,...va(e)};if(Go(e)){var t={type:e.type,target:ma(e.target),currentTarget:ma(e.currentTarget),...va(e)};return typeof CustomEvent<"u"&&Ko(e,CustomEvent)&&(t.detail=e.detail),t}return e}function ma(e){try{return function(e){return typeof Element<"u"&&Ko(e,Element)}(e)?qo(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function va(e){if("object"==typeof e&&null!==e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}return{}}function ba(e,t=40){var n=Object.keys(ga(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return la(n[0],t);for(let e=n.length;e>0;e--){var r=n.slice(0,e).join(", ");if(!(r.length>t))return e===n.length?r:la(r,t)}return""}function ya(e){return wa(e,new Map)}function wa(e,t){if($o(e)){if(void 0!==(i=t.get(e)))return i;var n={};for(var r of(t.set(e,n),Object.keys(e)))typeof e[r]<"u"&&(n[r]=wa(e[r],t));return n}if(Array.isArray(e)){var i;if(void 0!==(i=t.get(e)))return i;n=[];return t.set(e,n),e.forEach(e=>{n.push(wa(e,t))}),n}return e}sa=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__?zo("logger",aa):aa();function xa(...e){var t=e.sort((e,t)=>e[0]-t[0]).map(e=>e[1]);return(e,n=0)=>{var r=[];for(var i of e.split("\n").slice(n)){var o=i.replace(/\(error: (.*)\)/,"$1");for(var a of t){var s=a(o);if(s){r.push(s);break}}}return function(e){if(!e.length)return[];let t=e;var n=t[0].function||"",r=t[t.length-1].function||"";return(-1!==n.indexOf("captureMessage")||-1!==n.indexOf("captureException"))&&(t=t.slice(1)),-1!==r.indexOf("sentryWrapped")&&(t=t.slice(0,-1)),t.slice(0,50).map(e=>({...e,filename:e.filename||t[0].filename,function:e.function||"?"})).reverse()}(r)}}function Ca(e){return Array.isArray(e)?xa(...e):e}var _a="<anonymous>";function Sa(e){try{return e&&"function"==typeof e&&e.name||_a}catch{return _a}}function Aa(){if(!("fetch"in Lo()))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function ka(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}var Ta=Lo(),Ia={},Oa={};function Ea(e){if(!Oa[e])switch(Oa[e]=!0,e){case"console":"console"in Ta&&ia.forEach(function(e){e in Ta.console&&ha(Ta.console,e,function(t){return function(...n){Ma("console",{args:n,level:e}),t&&t.apply(Ta.console,n)}})});break;case"dom":!function(){if("document"in Ta){var e=Ma.bind(null,"dom"),t=Na(e,!0);Ta.document.addEventListener("click",t,!1),Ta.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(t=>{var n=Ta[t]&&Ta[t].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(ha(n,"addEventListener",function(t){return function(n,r,i){if("click"===n||"keypress"==n)try{var o=this,a=o.__sentry_instrumentation_handlers__=o.__sentry_instrumentation_handlers__||{},s=a[n]=a[n]||{refCount:0};if(!s.handler){var l=Na(e);s.handler=l,t.call(this,n,l,i)}s.refCount+=1}catch{}return t.call(this,n,r,i)}}),ha(n,"removeEventListener",function(e){return function(t,n,r){if("click"===t||"keypress"==t)try{var i=this,o=i.__sentry_instrumentation_handlers__||{},a=o[t];a&&(a.refCount-=1,a.refCount<=0&&(e.call(this,t,a.handler,r),a.handler=void 0,delete o[t]),0===Object.keys(o).length&&delete i.__sentry_instrumentation_handlers__)}catch{}return e.call(this,t,n,r)}}))})}}();break;case"xhr":!function(){if("XMLHttpRequest"in Ta){var e=XMLHttpRequest.prototype;ha(e,"open",function(e){return function(...t){var n=this,r=t[1],i=n.__sentry_xhr__={method:Ho(t[0])?t[0].toUpperCase():t[0],url:t[1]};Ho(r)&&"POST"===i.method&&r.match(/sentry_key/)&&(n.__sentry_own_request__=!0);var o=function(){if(4===n.readyState){try{i.status_code=n.status}catch{}Ma("xhr",{args:t,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:n})}};return"onreadystatechange"in n&&"function"==typeof n.onreadystatechange?ha(n,"onreadystatechange",function(e){return function(...t){return o(),e.apply(n,t)}}):n.addEventListener("readystatechange",o),e.apply(n,t)}}),ha(e,"send",function(e){return function(...t){return this.__sentry_xhr__&&void 0!==t[0]&&(this.__sentry_xhr__.body=t[0]),Ma("xhr",{args:t,startTimestamp:Date.now(),xhr:this}),e.apply(this,t)}})}}();break;case"fetch":!function(){if(!Aa())return!1;var e=Lo();if(ka(e.fetch))return!0;let t=!1;var n=e.document;if(n&&"function"==typeof n.createElement)try{var r=n.createElement("iframe");r.hidden=!0,n.head.appendChild(r),r.contentWindow&&r.contentWindow.fetch&&(t=ka(r.contentWindow.fetch)),n.head.removeChild(r)}catch(e){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return t}()||ha(Ta,"fetch",function(e){return function(...t){var n={args:t,fetchData:{method:Fa(t),url:ja(t)},startTimestamp:Date.now()};return Ma("fetch",{...n}),e.apply(Ta,t).then(e=>(Ma("fetch",{...n,endTimestamp:Date.now(),response:e}),e),e=>{throw Ma("fetch",{...n,endTimestamp:Date.now(),error:e}),e})}});break;case"history":!function(){if(!function(){var e=Lo(),t=e.chrome,n=t&&t.app&&t.app.runtime,r="history"in e&&!!e.history.pushState&&!!e.history.replaceState;return!n&&r}())return;var e=Ta.onpopstate;function t(e){return function(...t){var n=t.length>2?t[2]:void 0;if(n){var r=Da,i=String(n);Da=i,Ma("history",{from:r,to:i})}return e.apply(this,t)}}Ta.onpopstate=function(...t){var n=Ta.location.href,r=Da;if(Da=n,Ma("history",{from:r,to:n}),e)try{return e.apply(this,t)}catch{}},ha(Ta.history,"pushState",t),ha(Ta.history,"replaceState",t)}();break;case"error":Ba=Ta.onerror,Ta.onerror=function(e,t,n,r,i){return Ma("error",{column:r,error:i,line:n,msg:e,url:t}),!!Ba&&Ba.apply(this,arguments)};break;case"unhandledrejection":Va=Ta.onunhandledrejection,Ta.onunhandledrejection=function(e){return Ma("unhandledrejection",e),!Va||Va.apply(this,arguments)};break;default:return void((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.warn("unknown instrumentation type:",e))}}function Pa(e,t){Ia[e]=Ia[e]||[],Ia[e].push(t),Ea(e)}function Ma(e,t){if(e&&Ia[e])for(var n of Ia[e]||[])try{n(t)}catch(t){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${Sa(n)}\nError:`,t)}}function Fa(e=[]){return"Request"in Ta&&Ko(e[0],Request)&&e[0].method?String(e[0].method).toUpperCase():e[1]&&e[1].method?String(e[1].method).toUpperCase():"GET"}function ja(e=[]){return"string"==typeof e[0]?e[0]:"Request"in Ta&&Ko(e[0],Request)?e[0].url:String(e[0])}let Da;var Ra=1e3;let La,za;function Na(e,t=!1){return n=>{if(n&&za!==n&&!function(e){if("keypress"!==e.type)return!1;try{var t=e.target;if(!t||!t.tagName)return!0;if("INPUT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable)return!1}catch{}return!0}(n)){var r="keypress"===n.type?"input":n.type;(void 0===La||function(e,t){if(!e||e.type!==t.type)return!0;try{if(e.target!==t.target)return!0}catch{}return!1}(za,n))&&(e({event:n,name:r,global:t}),za=n),clearTimeout(La),La=Ta.setTimeout(()=>{La=void 0},Ra)}}}let Ba=null;let Va=null;function Ua(){var e=Lo(),t=e.crypto||e.msCrypto;if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");var n=t&&t.getRandomValues?()=>t.getRandomValues(new Uint8Array(1))[0]:()=>16*Math.random();return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,e=>(e^(15&n())>>e/4).toString(16))}function Wa(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function Ha(e){const{message:t,event_id:n}=e;if(t)return t;var r=Wa(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function Ya(e,t,n){var r=e.exception=e.exception||{},i=r.values=r.values||[],o=i[0]=i[0]||{};o.value||(o.value=t||""),o.type||(o.type="Error")}function $a(e,t){var n=Wa(e);if(n){var r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...t},t&&"data"in t){var i={...r&&r.data,...t.data};n.mechanism.data=i}}}function Ga(e){if(e&&e.__sentry_captured__)return!0;try{da(e,"__sentry_captured__",!0)}catch{}return!1}function Xa(e){return Array.isArray(e)?e:[e]}function Ka(){return!(typeof __SENTRY_BROWSER_BUNDLE__<"u"&&__SENTRY_BROWSER_BUNDLE__)&&"[object process]"===Object.prototype.toString.call(typeof process<"u"?process:0)}function qa(e,t=1/0,n=1/0){try{return Ja("",e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function Za(e,t=3,n=102400){var r=qa(e,t);return function(e){return function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(e))}(r)>n?Za(e,t-1,n):r}function Ja(e,t,n=1/0,r=1/0,i=function(){var e="function"==typeof WeakSet,t=e?new WeakSet:[];return[function(n){if(e)return!!t.has(n)||(t.add(n),!1);for(let e=0;e<t.length;e++)if(t[e]===n)return!0;return t.push(n),!1},function(n){if(e)t.delete(n);else for(let e=0;e<t.length;e++)if(t[e]===n){t.splice(e,1);break}}]}()){const[o,a]=i;if(null===t||["number","boolean","string"].includes(typeof t)&&!function(e){return"number"==typeof e&&e!=e}(t))return t;var s=function(e,t){try{return"domain"===e&&t&&"object"==typeof t&&t._events?"[Domain]":"domainEmitter"===e?"[DomainEmitter]":typeof global<"u"&&t===global?"[Global]":typeof window<"u"&&t===window?"[Window]":typeof document<"u"&&t===document?"[Document]":function(e){return $o(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}(t)?"[SyntheticEvent]":"number"==typeof t&&t!=t?"[NaN]":void 0===t?"[undefined]":"function"==typeof t?`[Function: ${Sa(t)}]`:"symbol"==typeof t?`[${String(t)}]`:"bigint"==typeof t?`[BigInt: ${String(t)}]`:`[object ${Object.getPrototypeOf(t).constructor.name}]`}catch(e){return`**non-serializable** (${e})`}}(e,t);if(!s.startsWith("[object "))return s;if(t.__sentry_skip_normalization__)return t;if(0===n)return s.replace("object ","");if(o(t))return"[Circular ~]";var l=t;if(l&&"function"==typeof l.toJSON)try{return Ja("",l.toJSON(),n-1,r,i)}catch{}var c=Array.isArray(t)?[]:{};let u=0;var h=ga(t);for(var d in h)if(Object.prototype.hasOwnProperty.call(h,d)){if(u>=r){c[d]="[MaxProperties ~]";break}var f=h[d];c[d]=Ja(d,f,n-1,r,i),u+=1}return a(t),c}var Qa;function es(e){return new ns(t=>{t(e)})}function ts(e){return new ns((t,n)=>{n(e)})}!function(e){e[e.PENDING=0]="PENDING";e[e.RESOLVED=1]="RESOLVED";e[e.REJECTED=2]="REJECTED"}(Qa||(Qa={}));class ns{__init(){this._state=Qa.PENDING}__init2(){this._handlers=[]}constructor(e){ns.prototype.__init.call(this),ns.prototype.__init2.call(this),ns.prototype.__init3.call(this),ns.prototype.__init4.call(this),ns.prototype.__init5.call(this),ns.prototype.__init6.call(this);try{e(this._resolve,this._reject)}catch(e){this._reject(e)}}then(e,t){return new ns((n,r)=>{this._handlers.push([!1,t=>{if(e)try{n(e(t))}catch(e){r(e)}else n(t)},e=>{if(t)try{n(t(e))}catch(e){r(e)}else r(e)}]),this._executeHandlers()})}catch(e){return this.then(e=>e,e)}finally(e){return new ns((t,n)=>{let r,i;return this.then(t=>{i=!1,r=t,e&&e()},t=>{i=!0,r=t,e&&e()}).then(()=>{i?n(r):t(r)})})}__init3(){this._resolve=e=>{this._setResult(Qa.RESOLVED,e)}}__init4(){this._reject=e=>{this._setResult(Qa.REJECTED,e)}}__init5(){this._setResult=(e,t)=>{if(this._state===Qa.PENDING){if(Xo(t))return void t.then(this._resolve,this._reject);this._state=e,this._value=t,this._executeHandlers()}}}__init6(){this._executeHandlers=()=>{if(this._state!==Qa.PENDING){var e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||(this._state===Qa.RESOLVED&&e[1](this._value),this._state===Qa.REJECTED&&e[2](this._value),e[0]=!0)})}}}}function rs(e){var t=[];function n(e){return t.splice(t.indexOf(e),1)[0]}return{$:t,add:function(r){if(!(void 0===e||t.length<e))return ts(new Jo("Not adding Promise because buffer limit was reached."));var i=r();return-1===t.indexOf(i)&&t.push(i),i.then(()=>n(i)).then(null,()=>n(i).then(null,()=>{})),i},drain:function(e){return new ns((n,r)=>{let i=t.length;if(!i)return n(!0);var o=setTimeout(()=>{e&&e>0&&n(!1)},e);t.forEach(e=>{es(e).then(()=>{--i||(clearTimeout(o),n(!0))},r)})})}}}function is(e){if(!e)return{};var t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};var n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],relative:t[5]+n+r}}var os=["fatal","error","warning","log","info","debug"];function as(e){return"warn"===e?"warning":os.includes(e)?e:"log"}var ss={nowSeconds:()=>Date.now()/1e3};var ls=Ka()?function(){try{var e=function(e,t){return e.require(t)}(module,"perf_hooks");return e.performance}catch{return}}():function(){const{performance:e}=Lo();if(e&&e.now)return{now:()=>e.now(),timeOrigin:Date.now()-e.now()}}(),cs=void 0===ls?ss:{nowSeconds:()=>(ls.timeOrigin+ls.now())/1e3},us=ss.nowSeconds.bind(ss),hs=cs.nowSeconds.bind(cs);function ds(e,t=[]){return[e,t]}function fs(e,t){const[n,r]=e;return[n,[...r,t]]}function ps(e,t){e[1].forEach(e=>{var n=e[0].type;t(e,n)})}function gs(e,t){return(t||new TextEncoder).encode(e)}function ms(e,t){const[n,r]=e;let i=JSON.stringify(n);function o(e){"string"==typeof i?i="string"==typeof e?i+e:[gs(i,t),e]:i.push("string"==typeof e?gs(e,t):e)}for(var a of r){const[e,t]=a;o(`\n${JSON.stringify(e)}\n`),o("string"==typeof t||t instanceof Uint8Array?t:JSON.stringify(t))}return"string"==typeof i?i:function(e){var t=e.reduce((e,t)=>e+t.length,0),n=new Uint8Array(t);let r=0;for(var i of e)n.set(i,r),r+=i.length;return n}(i)}function vs(e,t){var n="string"==typeof e.data?gs(e.data,t):e.data;return[ya({type:"attachment",length:n.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),n]}(()=>{const{performance:e}=Lo();if(e&&e.now){var t=36e5,n=e.now(),r=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,o=i<t,a=e.timing&&e.timing.navigationStart,s="number"==typeof a?Math.abs(a+n-r):t;(o||s<t)&&(i<=s&&e.timeOrigin)}})();var bs={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default"};function ys(e){return bs[e]}function ws(e,{statusCode:t,headers:n},r=Date.now()){var i={...e},o=n&&n["x-sentry-rate-limits"],a=n&&n["retry-after"];if(o)for(var s of o.trim().split(",")){const[e,t]=s.split(":",2);var l=parseInt(e,10),c=1e3*(isNaN(l)?60:l);if(t)for(var u of t.split(";"))i[u]=r+c;else i.all=r+c}else a?i.all=r+function(e,t=Date.now()){var n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;var r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}(a,r):429===t&&(i.all=r+6e4);return i}function xs(e){var t=hs(),n={sid:Ua(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(e){return ya({sid:`${e.sid}`,init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"==typeof e.did||"string"==typeof e.did?`${e.did}`:void 0,duration:e.duration,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}(n)};return e&&Cs(n,e),n}function Cs(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||hs(),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:Ua()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{var n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}class _s{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={}}static clone(e){var t=new _s;return e&&(t._breadcrumbs=[...e._breadcrumbs],t._tags={...e._tags},t._extra={...e._extra},t._contexts={...e._contexts},t._user=e._user,t._level=e._level,t._span=e._span,t._session=e._session,t._transactionName=e._transactionName,t._fingerprint=e._fingerprint,t._eventProcessors=[...e._eventProcessors],t._requestSession=e._requestSession,t._attachments=[...e._attachments]),t}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{},this._session&&Cs(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts={...this._contexts,[e]:t},this._notifyScopeListeners(),this}setSpan(e){return this._span=e,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){var e=this.getSpan();return e&&e.transaction}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;if("function"==typeof e){var t=e(this);return t instanceof _s?t:this}return e instanceof _s?(this._tags={...this._tags,...e._tags},this._extra={...this._extra,...e._extra},this._contexts={...this._contexts,...e._contexts},e._user&&Object.keys(e._user).length&&(this._user=e._user),e._level&&(this._level=e._level),e._fingerprint&&(this._fingerprint=e._fingerprint),e._requestSession&&(this._requestSession=e._requestSession)):$o(e)&&(this._tags={...this._tags,...e.tags},this._extra={...this._extra,...e.extra},this._contexts={...this._contexts,...e.contexts},e.user&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint&&(this._fingerprint=e.fingerprint),e.requestSession&&(this._requestSession=e.requestSession)),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this}addBreadcrumb(e,t){var n="number"==typeof t?Math.min(t,100):100;if(n<=0)return this;var r={timestamp:us(),...e};return this._breadcrumbs=[...this._breadcrumbs,r].slice(-n),this._notifyScopeListeners(),this}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(e,t={}){if(this._extra&&Object.keys(this._extra).length&&(e.extra={...this._extra,...e.extra}),this._tags&&Object.keys(this._tags).length&&(e.tags={...this._tags,...e.tags}),this._user&&Object.keys(this._user).length&&(e.user={...this._user,...e.user}),this._contexts&&Object.keys(this._contexts).length&&(e.contexts={...this._contexts,...e.contexts}),this._level&&(e.level=this._level),this._transactionName&&(e.transaction=this._transactionName),this._span){e.contexts={trace:this._span.getTraceContext(),...e.contexts};var n=this._span.transaction&&this._span.transaction.name;n&&(e.tags={transaction:n,...e.tags})}return this._applyFingerprint(e),e.breadcrumbs=[...e.breadcrumbs||[],...this._breadcrumbs],e.breadcrumbs=e.breadcrumbs.length>0?e.breadcrumbs:void 0,e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...this._sdkProcessingMetadata},this._notifyEventProcessors([...Ss(),...this._eventProcessors],e,t)}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}_notifyEventProcessors(e,t,n,r=0){return new ns((i,o)=>{var a=e[r];if(null===t||"function"!=typeof a)i(t);else{var s=a({...t},n);(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&a.id&&null===s&&sa.log(`Event processor "${a.id}" dropped event`),Xo(s)?s.then(t=>this._notifyEventProcessors(e,t,n,r+1).then(i)).then(null,o):this._notifyEventProcessors(e,s,n,r+1).then(i).then(null,o)}})}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}_applyFingerprint(e){e.fingerprint=e.fingerprint?Xa(e.fingerprint):[],this._fingerprint&&(e.fingerprint=e.fingerprint.concat(this._fingerprint)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}}function Ss(){return zo("globalEventProcessors",()=>[])}function As(e){Ss().push(e)}var ks=100;class Ts{__init(){this._stack=[{}]}constructor(e,t=new _s,n=4){this._version=n,Ts.prototype.__init.call(this),this.getStackTop().scope=t,e&&this.bindClient(e)}isOlderThan(e){return this._version<e}bindClient(e){this.getStackTop().client=e,e&&e.setupIntegrations&&e.setupIntegrations()}pushScope(){var e=_s.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:e}),e}popScope(){return!(this.getStack().length<=1)&&!!this.getStack().pop()}withScope(e){var t=this.pushScope();try{e(t)}finally{this.popScope()}}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(e,t){var n=this._lastEventId=t&&t.event_id?t.event_id:Ua(),r=new Error("Sentry syntheticException");return this._withClient((i,o)=>{i.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},o)}),n}captureMessage(e,t,n){var r=this._lastEventId=n&&n.event_id?n.event_id:Ua(),i=new Error(e);return this._withClient((o,a)=>{o.captureMessage(e,t,{originalException:e,syntheticException:i,...n,event_id:r},a)}),r}captureEvent(e,t){var n=t&&t.event_id?t.event_id:Ua();return"transaction"!==e.type&&(this._lastEventId=n),this._withClient((r,i)=>{r.captureEvent(e,{...t,event_id:n},i)}),n}lastEventId(){return this._lastEventId}addBreadcrumb(e,t){const{scope:n,client:r}=this.getStackTop();if(!n||!r)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:o=ks}=r.getOptions&&r.getOptions()||{};if(!(o<=0)){var a={timestamp:us(),...e},s=i?oa(()=>i(a,t)):a;null!==s&&n.addBreadcrumb(s,o)}}setUser(e){var t=this.getScope();t&&t.setUser(e)}setTags(e){var t=this.getScope();t&&t.setTags(e)}setExtras(e){var t=this.getScope();t&&t.setExtras(e)}setTag(e,t){var n=this.getScope();n&&n.setTag(e,t)}setExtra(e,t){var n=this.getScope();n&&n.setExtra(e,t)}setContext(e,t){var n=this.getScope();n&&n.setContext(e,t)}configureScope(e){const{scope:t,client:n}=this.getStackTop();t&&n&&e(t)}run(e){var t=Os(this);try{e(this)}finally{Os(t)}}getIntegration(e){var t=this.getClient();if(!t)return null;try{return t.getIntegration(e)}catch{return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.warn(`Cannot retrieve integration ${e.id} from the current Hub`),null}}startTransaction(e,t){return this._callExtensionMethod("startTransaction",e,t)}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(e=!1){if(e)return this.endSession();this._sendSessionUpdate()}endSession(){var e=this.getStackTop(),t=e&&e.scope,n=t&&t.getSession();n&&function(e){let t={};"ok"===e.status&&(t={status:"exited"}),Cs(e,t)}(n),this._sendSessionUpdate(),t&&t.setSession()}startSession(e){const{scope:t,client:n}=this.getStackTop(),{release:r,environment:i}=n&&n.getOptions()||{};var o=Lo();const{userAgent:a}=o.navigator||{};var s=xs({release:r,environment:i,...t&&{user:t.getUser()},...a&&{userAgent:a},...e});if(t){var l=t.getSession&&t.getSession();l&&"ok"===l.status&&Cs(l,{status:"exited"}),this.endSession(),t.setSession(s)}return s}shouldSendDefaultPii(){var e=this.getClient(),t=e&&e.getOptions();return Boolean(t&&t.sendDefaultPii)}_sendSessionUpdate(){const{scope:e,client:t}=this.getStackTop();if(e){var n=e.getSession();n&&t&&t.captureSession&&t.captureSession(n)}}_withClient(e){const{scope:t,client:n}=this.getStackTop();n&&e(n,t)}_callExtensionMethod(e,...t){var n=Is().__SENTRY__;if(n&&n.extensions&&"function"==typeof n.extensions[e])return n.extensions[e].apply(this,t);(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.warn(`Extension method ${e} couldn't be found, doing nothing.`)}}function Is(){var e=Lo();return e.__SENTRY__=e.__SENTRY__||{extensions:{},hub:void 0},e}function Os(e){var t=Is(),n=Ms(t);return Fs(t,e),n}function Es(){var e=Is();return(!Ps(e)||Ms(e).isOlderThan(4))&&Fs(e,new Ts),Ka()?function(e){try{var t=Is().__SENTRY__,n=t&&t.extensions&&t.extensions.domain&&t.extensions.domain.active;if(!n)return Ms(e);if(!Ps(n)||Ms(n).isOlderThan(4)){var r=Ms(e).getStackTop();Fs(n,new Ts(r.client,_s.clone(r.scope)))}return Ms(n)}catch{return Ms(e)}}(e):Ms(e)}function Ps(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function Ms(e){return zo("hub",()=>new Ts,e)}function Fs(e,t){return!!e&&((e.__SENTRY__=e.__SENTRY__||{}).hub=t,!0)}function js(e,t){return function(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}({sentry_key:e.publicKey,sentry_version:"7",...t&&{sentry_client:`${t.name}/${t.version}`}})}function Ds(e,t={}){var n="string"==typeof t?t:t.tunnel,r="string"!=typeof t&&t._metadata?t._metadata.sdk:void 0;return n||`${function(e){return`${function(e){var t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}(e)}${e.projectId}/envelope/`}(e)}?${js(e,r)}`}function Rs(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function Ls(e,t,n,r){var i=Rs(n),o=e.type||"event";!function(e,t){t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]])}(e,n&&n.sdk);var a=function(e,t,n,r){var i=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&{sdk:t},...!!n&&{dsn:ea(r)},..."transaction"===e.type&&i&&{trace:ya({...i})}}}(e,i,r,t);return delete e.sdkProcessingMetadata,ds(a,[[{type:o},e]])}var zs=[];function Ns(e){var t=e.defaultIntegrations||[],n=e.integrations;let r;t.forEach(e=>{e.isDefaultInstance=!0}),r=Array.isArray(n)?[...t,...n]:"function"==typeof n?Xa(n(t)):t;var i=function(e){var t={};return e.forEach(e=>{const{name:n}=e;var r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)}),Object.values(t)}(r),o=i.findIndex(e=>"Debug"===e.name);if(-1!==o){const[e]=i.splice(o,1);i.push(e)}return i}var Bs="Not capturing exception because it's already been captured.";class Vs{__init(){this._integrations={}}__init2(){this._integrationsInitialized=!1}__init3(){this._numProcessing=0}__init4(){this._outcomes={}}constructor(e){if(Vs.prototype.__init.call(this),Vs.prototype.__init2.call(this),Vs.prototype.__init3.call(this),Vs.prototype.__init4.call(this),this._options=e,e.dsn){this._dsn=na(e.dsn);var t=Ds(this._dsn,e);this._transport=e.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}else(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.warn("No DSN provided, client will not do anything.")}captureException(e,t,n){if(Ga(e))return void((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.log(Bs));let r=t&&t.event_id;return this._process(this.eventFromException(e,t).then(e=>this._captureEvent(e,t,n)).then(e=>{r=e})),r}captureMessage(e,t,n,r){let i=n&&n.event_id;var o=Yo(e)?this.eventFromMessage(String(e),t,n):this.eventFromException(e,n);return this._process(o.then(e=>this._captureEvent(e,n,r)).then(e=>{i=e})),i}captureEvent(e,t,n){if(t&&t.originalException&&Ga(t.originalException))return void((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.log(Bs));let r=t&&t.event_id;return this._process(this._captureEvent(e,t,n).then(e=>{r=e})),r}captureSession(e){this._isEnabled()?"string"!=typeof e.release?(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),Cs(e,{init:!1})):(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.warn("SDK not enabled, will not capture session.")}getDsn(){return this._dsn}getOptions(){return this._options}getTransport(){return this._transport}flush(e){var t=this._transport;return t?this._isClientDoneProcessing(e).then(n=>t.flush(e).then(e=>n&&e)):es(!0)}close(e){return this.flush(e).then(e=>(this.getOptions().enabled=!1,e))}setupIntegrations(){this._isEnabled()&&!this._integrationsInitialized&&(this._integrations=function(e){var t={};return e.forEach(e=>{t[e.name]=e,-1===zs.indexOf(e.name)&&(e.setupOnce(As,Es),zs.push(e.name),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.log(`Integration installed: ${e.name}`))}),t}(this._options.integrations),this._integrationsInitialized=!0)}getIntegrationById(e){return this._integrations[e]}getIntegration(e){try{return this._integrations[e.id]||null}catch{return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.warn(`Cannot retrieve integration ${e.id} from the current Client`),null}}sendEvent(e,t={}){if(this._dsn){let r=Ls(e,this._dsn,this._options._metadata,this._options.tunnel);for(var n of t.attachments||[])r=fs(r,vs(n,this._options.transportOptions&&this._options.transportOptions.textEncoder));this._sendEnvelope(r)}}sendSession(e){if(this._dsn){var t=function(e,t,n,r){var i=Rs(n);return ds({sent_at:(new Date).toISOString(),...i&&{sdk:i},...!!r&&{dsn:ea(t)}},["aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e]])}(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(t)}}recordDroppedEvent(e,t){if(this._options.sendClientReports){var n=`${e}:${t}`;(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.log(`Adding outcome: "${n}"`),this._outcomes[n]=this._outcomes[n]+1||1}}_updateSessionFromEvent(e,t){let n=!1,r=!1;var i=t.exception&&t.exception.values;if(i)for(var o of(r=!0,i)){var a=o.mechanism;if(a&&!1===a.handled){n=!0;break}}var s="ok"===e.status;(s&&0===e.errors||s&&n)&&(Cs(e,{...n&&{status:"crashed"},errors:e.errors||Number(r||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new ns(t=>{let n=0;var r=setInterval(()=>{0==this._numProcessing?(clearInterval(r),t(!0)):(n+=1,e&&n>=e&&(clearInterval(r),t(!1)))},1)})}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._dsn}_prepareEvent(e,t,n){const{normalizeDepth:r=3,normalizeMaxBreadth:i=1e3}=this.getOptions();var o={...e,event_id:e.event_id||t.event_id||Ua(),timestamp:e.timestamp||us()};this._applyClientOptions(o),this._applyIntegrationsMetadata(o);let a=n;t.captureContext&&(a=_s.clone(a).update(t.captureContext));let s=es(o);if(a){var l=[...t.attachments||[],...a.getAttachments()];l.length&&(t.attachments=l),s=a.applyToEvent(o,t)}return s.then(e=>"number"==typeof r&&r>0?this._normalizeEvent(e,r,i):e)}_normalizeEvent(e,t,n){if(!e)return null;var r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:qa(e.data,t,n)}}))},...e.user&&{user:qa(e.user,t,n)},...e.contexts&&{contexts:qa(e.contexts,t,n)},...e.extra&&{extra:qa(e.extra,t,n)}};return e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=qa(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(e=>(e.data&&(e.data=qa(e.data,t,n)),e))),r}_applyClientOptions(e){var t=this.getOptions();const{environment:n,release:r,dist:i,maxValueLength:o=250}=t;"environment"in e||(e.environment="environment"in t?n:"production"),void 0===e.release&&void 0!==r&&(e.release=r),void 0===e.dist&&void 0!==i&&(e.dist=i),e.message&&(e.message=la(e.message,o));var a=e.exception&&e.exception.values&&e.exception.values[0];a&&a.value&&(a.value=la(a.value,o));var s=e.request;s&&s.url&&(s.url=la(s.url,o))}_applyIntegrationsMetadata(e){var t=Object.keys(this._integrations);t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}_captureEvent(e,t={},n){return this._processEvent(e,t,n).then(e=>e.event_id,e=>{if(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__){var t=e;"log"===t.logLevel?sa.log(t.message):sa.warn(t)}})}_processEvent(e,t,n){const{beforeSend:r,sampleRate:i}=this.getOptions();if(!this._isEnabled())return ts(new Jo("SDK not enabled, will not capture event.","log"));var o="transaction"===e.type;return!o&&"number"==typeof i&&Math.random()>i?(this.recordDroppedEvent("sample_rate","error"),ts(new Jo(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"))):this._prepareEvent(e,t,n).then(n=>{if(null===n)throw this.recordDroppedEvent("event_processor",e.type||"error"),new Jo("An event processor returned null, will not send event.","log");return t.data&&!0===t.data.__sentry__||o||!r?n:function(e){var t="`beforeSend` method has to return `null` or a valid event.";if(Xo(e))return e.then(e=>{if(!$o(e)&&null!==e)throw new Jo(t);return e},e=>{throw new Jo(`beforeSend rejected with ${e}`)});if(!$o(e)&&null!==e)throw new Jo(t);return e}(r(n,t))}).then(r=>{if(null===r)throw this.recordDroppedEvent("before_send",e.type||"error"),new Jo("`beforeSend` returned `null`, will not send event.","log");var i=n&&n.getSession();!o&&i&&this._updateSessionFromEvent(i,r);var a=r.transaction_info;if(o&&a&&r.transaction!==e.transaction){var s="custom";r.transaction_info={...a,source:s,changes:[...a.changes,{source:s,timestamp:r.timestamp,propagations:a.propagations}]}}return this.sendEvent(r,t),r}).then(null,e=>{throw e instanceof Jo?e:(this.captureException(e,{data:{__sentry__:!0},originalException:e}),new Jo(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`))})}_process(e){this._numProcessing+=1,e.then(e=>(this._numProcessing-=1,e),e=>(this._numProcessing-=1,e))}_sendEnvelope(e){this._transport&&this._dsn?this._transport.send(e).then(null,e=>{(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.error("Error while sending event:",e)}):(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.error("Transport disabled")}_clearOutcomes(){var e=this._outcomes;return this._outcomes={},Object.keys(e).map(t=>{const[n,r]=t.split(":");return{reason:n,category:r,quantity:e[t]}})}}function Us(e,t,n=rs(e.bufferSize||30)){let r={};return{send:function(i){var o=[];if(ps(i,(t,n)=>{var i=ys(n);!function(e,t,n=Date.now()){return function(e,t){return e[t]||e.all||0}(e,t)>n}(r,i)?o.push(t):e.recordDroppedEvent("ratelimit_backoff",i)}),0===o.length)return es();var a=ds(i[0],o),s=t=>{ps(a,(n,r)=>{e.recordDroppedEvent(t,ys(r))})};return n.add(()=>t({body:ms(a,e.textEncoder)}).then(e=>{void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=ws(r,e)},e=>{(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.error("Failed while sending event:",e),s("network_error")})).then(e=>e,e=>{if(e instanceof Jo)return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.error("Skipped sending event because buffer is full."),s("queue_overflow"),es();throw e})},flush:e=>n.drain(e)}}var Ws="7.14.0";let Hs;class Ys{constructor(){Ys.prototype.__init.call(this)}static __initStatic(){this.id="FunctionToString"}__init(){this.name=Ys.id}setupOnce(){Hs=Function.prototype.toString,Function.prototype.toString=function(...e){var t=pa(this)||this;return Hs.apply(t,e)}}}Ys.__initStatic();var $s=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/];class Gs{static __initStatic(){this.id="InboundFilters"}__init(){this.name=Gs.id}constructor(e={}){this._options=e,Gs.prototype.__init.call(this)}setupOnce(e,t){var n=e=>{var n=t();if(n){var r=n.getIntegration(Gs);if(r){var i=n.getClient(),o=i?i.getOptions():{},a=function(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...$s],ignoreInternal:void 0===e.ignoreInternal||e.ignoreInternal}}(r._options,o);return function(e,t){return t.ignoreInternal&&function(e){try{return"SentryError"===e.exception.values[0].type}catch{}return!1}(e)?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${Ha(e)}`),!0):function(e,t){return!(!t||!t.length)&&function(e){if(e.message)return[e.message];if(e.exception)try{const{type:t="",value:n=""}=e.exception.values&&e.exception.values[0]||{};return[`${n}`,`${t}: ${n}`]}catch{return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.error(`Cannot extract message for event ${Ha(e)}`),[]}return[]}(e).some(e=>t.some(t=>ua(e,t)))}(e,t.ignoreErrors)?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${Ha(e)}`),!0):function(e,t){if(!t||!t.length)return!1;var n=Xs(e);return!!n&&t.some(e=>ua(n,e))}(e,t.denyUrls)?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${Ha(e)}.\nUrl: ${Xs(e)}`),!0):!function(e,t){if(!t||!t.length)return!0;var n=Xs(e);return!n||t.some(e=>ua(n,e))}(e,t.allowUrls)&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${Ha(e)}.\nUrl: ${Xs(e)}`),!0)}(e,a)?null:e}}return e};n.id=this.name,e(n)}}function Xs(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?function(e=[]){for(let n=e.length-1;n>=0;n--){var t=e[n];if(t&&"<anonymous>"!==t.filename&&"[native code]"!==t.filename)return t.filename||null}return null}(t):null}catch{return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.error(`Cannot extract url for event ${Ha(e)}`),null}}function Ks(e,t){var n=Zs(e,t),r={type:t&&t.name,value:Qs(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function qs(e,t){return{exception:{values:[Ks(e,t)]}}}function Zs(e,t){var n=t.stacktrace||t.stack||"",r=function(e){if(e){if("number"==typeof e.framesToPop)return e.framesToPop;if(Js.test(e.message))return 1}return 0}(t);try{return e(n,r)}catch{}return[]}Gs.__initStatic();var Js=/Minified React error #\d+;/i;function Qs(e){var t=e&&e.message;return t?t.error&&"string"==typeof t.error.message?t.error.message:t:"No error message"}function el(e,t,n,r,i){let o;if(Uo(t)&&t.error)return qs(e,t.error);if(Wo(t)||function(e){return Vo(e,"DOMException")}(t)){var a=t;if("stack"in t)o=qs(e,t);else{var s=a.name||(Wo(a)?"DOMError":"DOMException"),l=a.message?`${s}: ${a.message}`:s;o=tl(e,l,n,r),Ya(o,l)}return"code"in a&&(o.tags={...o.tags,"DOMException.code":`${a.code}`}),o}return Bo(t)?qs(e,t):$o(t)||Go(t)?(o=function(e,t,n,r){var i=Es().getClient(),o=i&&i.getOptions().normalizeDepth,a={exception:{values:[{type:Go(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:`Non-Error ${r?"promise rejection":"exception"} captured with keys: ${ba(t)}`}]},extra:{__serialized__:Za(t,o)}};if(n){var s=Zs(e,n);s.length&&(a.exception.values[0].stacktrace={frames:s})}return a}(e,t,n,i),$a(o,{synthetic:!0}),o):(o=tl(e,t,n,r),Ya(o,`${t}`),$a(o,{synthetic:!0}),o)}function tl(e,t,n,r){var i={message:t};if(r&&n){var o=Zs(e,n);o.length&&(i.exception={values:[{value:t,stacktrace:{frames:o}}]})}return i}var nl="Breadcrumbs";class rl{static __initStatic(){this.id=nl}__init(){this.name=rl.id}constructor(e){rl.prototype.__init.call(this),this.options={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e}}setupOnce(){this.options.console&&Pa("console",il),this.options.dom&&Pa("dom",function(e){function t(t){let n,r="object"==typeof e?e.serializeAttribute:void 0;"string"==typeof r&&(r=[r]);try{n=t.event.target?qo(t.event.target,r):qo(t.event,r)}catch{n="<unknown>"}0!==n.length&&Es().addBreadcrumb({category:`ui.${t.name}`,message:n},{event:t.event,name:t.name,global:t.global})}return t}(this.options.dom)),this.options.xhr&&Pa("xhr",ol),this.options.fetch&&Pa("fetch",al),this.options.history&&Pa("history",sl)}}function il(e){var t={category:"console",data:{arguments:e.args,logger:"console"},level:as(e.level),message:ca(e.args," ")};if("assert"===e.level){if(!1!==e.args[0])return;t.message=`Assertion failed: ${ca(e.args.slice(1)," ")||"console.assert"}`,t.data.arguments=e.args.slice(1)}Es().addBreadcrumb(t,{input:e.args,level:e.level})}function ol(e){if(e.endTimestamp){if(e.xhr.__sentry_own_request__)return;const{method:t,url:n,status_code:r,body:i}=e.xhr.__sentry_xhr__||{};return void Es().addBreadcrumb({category:"xhr",data:{method:t,url:n,status_code:r},type:"http"},{xhr:e.xhr,input:i})}}function al(e){!e.endTimestamp||e.fetchData.url.match(/sentry_key/)&&"POST"===e.fetchData.method||(e.error?Es().addBreadcrumb({category:"fetch",data:e.fetchData,level:"error",type:"http"},{data:e.error,input:e.args}):Es().addBreadcrumb({category:"fetch",data:{...e.fetchData,status_code:e.response.status},type:"http"},{input:e.args,response:e.response}))}function sl(e){var t=Lo();let n=e.from,r=e.to;var i=is(t.location.href);let o=is(n);var a=is(r);o.path||(o=i),i.protocol===a.protocol&&i.host===a.host&&(r=a.relative),i.protocol===o.protocol&&i.host===o.host&&(n=o.relative),Es().addBreadcrumb({category:"navigation",data:{from:n,to:r}})}rl.__initStatic();var ll=Lo();class cl extends Vs{constructor(e){e._metadata=e._metadata||{},e._metadata.sdk=e._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:"npm:@sentry/browser",version:Ws}],version:Ws},super(e),e.sendClientReports&&ll.document&&ll.document.addEventListener("visibilitychange",()=>{"hidden"===ll.document.visibilityState&&this._flushOutcomes()})}eventFromException(e,t){return function(e,t,n,r){var i=el(e,t,n&&n.syntheticException||void 0,r);return $a(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),es(i)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return function(e,t,n="info",r,i){var o=tl(e,t,r&&r.syntheticException||void 0,i);return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),es(o)}(this._options.stackParser,e,t,n,this._options.attachStacktrace)}sendEvent(e,t){var n=this.getIntegrationById(nl);n&&n.options&&n.options.sentry&&Es().addBreadcrumb({category:"sentry."+("transaction"===e.type?"transaction":"event"),event_id:e.event_id,level:e.level,message:Ha(e)},{event:e}),super.sendEvent(e,t)}_prepareEvent(e,t,n){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n)}_flushOutcomes(){var e=this._clearOutcomes();if(0!==e.length)if(this._dsn){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.log("Sending outcomes:",e);var t=Ds(this._dsn,this._options),n=function(e,t){return ds(t?{dsn:t}:{},[[{type:"client_report"},{timestamp:us(),discarded_events:e}]])}(e,this._options.tunnel&&ea(this._dsn));try{var r=Lo();if("[object Navigator]"===Object.prototype.toString.call(r&&r.navigator)&&"function"==typeof r.navigator.sendBeacon&&!this._options.transportOptions)r.navigator.sendBeacon.bind(r.navigator)(t,ms(n));else this._sendEnvelope(n)}catch(e){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.error(e)}}else(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.log("No dsn provided, will not send outcomes");else(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.log("No outcomes to send")}}var ul=Lo();let hl;function dl(e,t=function(){if(hl)return hl;if(ka(ul.fetch))return hl=ul.fetch.bind(ul);var e=ul.document;let t=ul.fetch;if(e&&"function"==typeof e.createElement)try{var n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);var r=n.contentWindow;r&&r.fetch&&(t=r.fetch),e.head.removeChild(n)}catch(e){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return hl=t.bind(ul)}()){return Us(e,function(n){var r={body:n.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n.body.length<=65536,...e.fetchOptions};return t(e.url,r).then(e=>({statusCode:e.status,headers:{"x-sentry-rate-limits":e.headers.get("X-Sentry-Rate-Limits"),"retry-after":e.headers.get("Retry-After")}}))})}function fl(e){return Us(e,function(t){return new ns((n,r)=>{var i=new XMLHttpRequest;for(var o in i.onerror=r,i.onreadystatechange=()=>{4===i.readyState&&n({statusCode:i.status,headers:{"x-sentry-rate-limits":i.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":i.getResponseHeader("Retry-After")}})},i.open("POST",e.url),e.headers)Object.prototype.hasOwnProperty.call(e.headers,o)&&i.setRequestHeader(o,e.headers[o]);i.send(t.body)})})}var pl="?";function gl(e,t,n,r){var i={filename:e,function:t,in_app:!0};return void 0!==n&&(i.lineno=n),void 0!==r&&(i.colno=r),i}var ml=/^\s*at (?:(.*\).*?|.*?) ?\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,vl=/\((\S*)(?::(\d+))(?::(\d+))\)/,bl=[30,e=>{var t=ml.exec(e);if(t){if(t[2]&&0===t[2].indexOf("eval")){var n=vl.exec(t[2]);n&&(t[2]=n[1],t[3]=n[2],t[4]=n[3])}const[e,r]=Al(t[1]||pl,t[2]);return gl(r,e,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}}],yl=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|safari-extension|safari-web-extension|capacitor)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,wl=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,xl=[50,e=>{var t=yl.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){var n=wl.exec(t[3]);n&&(t[1]=t[1]||"eval",t[3]=n[1],t[4]=n[2],t[5]="")}let e=t[3],r=t[1]||pl;return[r,e]=Al(r,e),gl(e,r,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}],Cl=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,_l=[40,e=>{var t=Cl.exec(e);return t?gl(t[2],t[1]||pl,+t[3],t[4]?+t[4]:void 0):void 0}],Sl=xa(...[bl,xl,_l]),Al=(e,t)=>{var n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:pl,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};let kl=0;function Tl(){return kl>0}function Il(e,t={},n){if("function"!=typeof e)return e;try{var r=e.__sentry_wrapped__;if(r)return r;if(pa(e))return e}catch{return e}var i=function(){var r=Array.prototype.slice.call(arguments);try{n&&"function"==typeof n&&n.apply(this,arguments);var i=r.map(e=>Il(e,t));return e.apply(this,i)}catch(e){throw kl+=1,setTimeout(()=>{kl-=1}),function(e){Es().withScope(e)}(n=>{n.addEventProcessor(e=>(t.mechanism&&(Ya(e,void 0),$a(e,t.mechanism)),e.extra={...e.extra,arguments:r},e)),function(e,t){Es().captureException(e,{captureContext:t})}(e)}),e}};try{for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(i[o]=e[o])}catch{}fa(i,e),da(e,"__sentry_wrapped__",i);try{Object.getOwnPropertyDescriptor(i,"name").configurable&&Object.defineProperty(i,"name",{get:()=>e.name})}catch{}return i}class Ol{static __initStatic(){this.id="GlobalHandlers"}__init(){this.name=Ol.id}__init2(){this._installFunc={onerror:El,onunhandledrejection:Pl}}constructor(e){Ol.prototype.__init.call(this),Ol.prototype.__init2.call(this),this._options={onerror:!0,onunhandledrejection:!0,...e}}setupOnce(){Error.stackTraceLimit=50;var e=this._options;for(var t in e){var n=this._installFunc[t];n&&e[t]&&(Fl(t),n(),this._installFunc[t]=void 0)}}}function El(){Pa("error",e=>{const[t,n,r]=Dl();if(!t.getIntegration(Ol))return;const{msg:i,url:o,line:a,column:s,error:l}=e;if(!(Tl()||l&&l.__sentry_own_request__)){var c=void 0===l&&Ho(i)?function(e,t,n,r){var i=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let o=Uo(e)?e.message:e,a="Error";var s=o.match(i);s&&(a=s[1],o=s[2]);var l={exception:{values:[{type:a,value:o}]}};return Ml(l,t,n,r)}(i,o,a,s):Ml(el(n,l||i,void 0,r,!1),o,a,s);c.level="error",jl(t,l,c,"onerror")}})}function Pl(){Pa("unhandledrejection",e=>{const[t,n,r]=Dl();if(!t.getIntegration(Ol))return;let i=e;try{"reason"in e?i=e.reason:"detail"in e&&"reason"in e.detail&&(i=e.detail.reason)}catch{}if(Tl()||i&&i.__sentry_own_request__)return!0;var o=Yo(i)?function(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}(i):el(n,i,void 0,r,!0);o.level="error",jl(t,i,o,"onunhandledrejection")})}function Ml(e,t,n,r){var i=e.exception=e.exception||{},o=i.values=i.values||[],a=o[0]=o[0]||{},s=a.stacktrace=a.stacktrace||{},l=s.frames=s.frames||[],c=isNaN(parseInt(r,10))?void 0:r,u=isNaN(parseInt(n,10))?void 0:n,h=Ho(t)&&t.length>0?t:function(){var e=Lo();try{return e.document.location.href}catch{return""}}();return 0===l.length&&l.push({colno:c,filename:h,function:"?",in_app:!0,lineno:u}),e}function Fl(e){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.log(`Global Handler attached: ${e}`)}function jl(e,t,n,r){$a(n,{handled:!1,type:r}),e.captureEvent(n,{originalException:t})}function Dl(){var e=Es(),t=e.getClient(),n=t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[e,n.stackParser,n.attachStacktrace]}Ol.__initStatic();var Rl=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"];class Ll{static __initStatic(){this.id="TryCatch"}__init(){this.name=Ll.id}constructor(e){Ll.prototype.__init.call(this),this._options={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e}}setupOnce(){var e=Lo();this._options.setTimeout&&ha(e,"setTimeout",zl),this._options.setInterval&&ha(e,"setInterval",zl),this._options.requestAnimationFrame&&ha(e,"requestAnimationFrame",Nl),this._options.XMLHttpRequest&&"XMLHttpRequest"in e&&ha(XMLHttpRequest.prototype,"send",Bl);var t=this._options.eventTarget;t&&(Array.isArray(t)?t:Rl).forEach(Vl)}}function zl(e){return function(...t){var n=t[0];return t[0]=Il(n,{mechanism:{data:{function:Sa(e)},handled:!0,type:"instrument"}}),e.apply(this,t)}}function Nl(e){return function(t){return e.apply(this,[Il(t,{mechanism:{data:{function:"requestAnimationFrame",handler:Sa(e)},handled:!0,type:"instrument"}})])}}function Bl(e){return function(...t){var n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(e=>{e in n&&"function"==typeof n[e]&&ha(n,e,function(t){var n={mechanism:{data:{function:e,handler:Sa(t)},handled:!0,type:"instrument"}},r=pa(t);return r&&(n.mechanism.data.handler=Sa(r)),Il(t,n)})}),e.apply(this,t)}}function Vl(e){var t=Lo(),n=t[e]&&t[e].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(ha(n,"addEventListener",function(t){return function(n,r,i){try{"function"==typeof r.handleEvent&&(r.handleEvent=Il(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Sa(r),target:e},handled:!0,type:"instrument"}}))}catch{}return t.apply(this,[n,Il(r,{mechanism:{data:{function:"addEventListener",handler:Sa(r),target:e},handled:!0,type:"instrument"}}),i])}}),ha(n,"removeEventListener",function(e){return function(t,n,r){var i=n;try{var o=i&&i.__sentry_wrapped__;o&&e.call(this,t,o,r)}catch{}return e.call(this,t,i,r)}}))}Ll.__initStatic();class Ul{static __initStatic(){this.id="LinkedErrors"}__init(){this.name=Ul.id}constructor(e={}){Ul.prototype.__init.call(this),this._key=e.key||"cause",this._limit=e.limit||5}setupOnce(){var e=Es().getClient();!e||As((t,n)=>{var r=Es().getIntegration(Ul);return r?function(e,t,n,r,i){if(!(r.exception&&r.exception.values&&i&&Ko(i.originalException,Error)))return r;var o=Wl(e,n,i.originalException,t);return r.exception.values=[...o,...r.exception.values],r}(e.getOptions().stackParser,r._key,r._limit,t,n):t})}}function Wl(e,t,n,r,i=[]){if(!Ko(n[r],Error)||i.length+1>=t)return i;var o=Ks(e,n[r]);return Wl(e,t,n[r],r,[o,...i])}Ul.__initStatic();var Hl=Lo();class Yl{constructor(){Yl.prototype.__init.call(this)}static __initStatic(){this.id="HttpContext"}__init(){this.name=Yl.id}setupOnce(){As(e=>{if(Es().getIntegration(Yl)){if(!Hl.navigator&&!Hl.location&&!Hl.document)return e;var t=e.request&&e.request.url||Hl.location&&Hl.location.href;const{referrer:r}=Hl.document||{},{userAgent:i}=Hl.navigator||{};var n={...t&&{url:t},headers:{...e.request&&e.request.headers,...r&&{Referer:r},...i&&{"User-Agent":i}}};return{...e,request:n}}return e})}}Yl.__initStatic();class $l{constructor(){$l.prototype.__init.call(this)}static __initStatic(){this.id="Dedupe"}__init(){this.name=$l.id}setupOnce(e,t){var n=e=>{var n=t().getIntegration($l);if(n){try{if(function(e,t){return!!t&&!(!function(e,t){var n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!Xl(e,t)||!Gl(e,t))}(e,t)&&!function(e,t){var n=Kl(t),r=Kl(e);return!!(n&&r&&n.type===r.type&&n.value===r.value&&Xl(e,t)&&Gl(e,t))}(e,t))}(e,n._previousEvent))return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{return n._previousEvent=e}return n._previousEvent=e}return e};n.id=this.name,e(n)}}function Gl(e,t){let n=ql(e),r=ql(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||r.length!==n.length)return!1;for(let e=0;e<r.length;e++){var i=r[e],o=n[e];if(i.filename!==o.filename||i.lineno!==o.lineno||i.colno!==o.colno||i.function!==o.function)return!1}return!0}function Xl(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return n.join("")===r.join("")}catch{return!1}}function Kl(e){return e.exception&&e.exception.values&&e.exception.values[0]}function ql(e){var t=e.exception;if(t)try{return t.values[0].stacktrace.frames}catch{return}}$l.__initStatic();var Zl=[new Gs,new Ys,new Ll,new rl,new Ol,new Ul,new $l,new Yl];function Jl(e={}){if(void 0===e.defaultIntegrations&&(e.defaultIntegrations=Zl),void 0===e.release){var t=Lo();t.SENTRY_RELEASE&&t.SENTRY_RELEASE.id&&(e.release=t.SENTRY_RELEASE.id)}void 0===e.autoSessionTracking&&(e.autoSessionTracking=!0),void 0===e.sendClientReports&&(e.sendClientReports=!0);var n={...e,stackParser:Ca(e.stackParser||Sl),integrations:Ns(e),transport:e.transport||(Aa()?dl:fl)};(function(e,t){!0===t.debug&&(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__?sa.enable():console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle."));var n=Es(),r=n.getScope();r&&r.update(t.initialScope);var i=new e(t);n.bindClient(i)})(cl,n),e.autoSessionTracking&&function(){var e=Lo(),t=e.document;if(typeof t>"u")return void((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.warn("Session tracking in non-browser environment with @sentry/browser is not supported."));var n=Es();!n.captureSession||(Ql(n),Pa("history",({from:e,to:t})=>{void 0===e||e===t||Ql(Es())}))}()}function Ql(e){e.startSession({ignoreDuration:!0}),e.captureSession()}var ec={exports:{}},tc={},nc=i,rc=Symbol.for("react.element"),ic=Symbol.for("react.fragment"),oc=Object.prototype.hasOwnProperty,ac=nc.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,sc={key:!0,ref:!0,__self:!0,__source:!0};
9
+ */var Gr=(Hr||(Hr=1,function(e,t){(function(){var n,r="Expected a function",i="__lodash_hash_undefined__",o="__lodash_placeholder__",a=32,s=128,l=256,c=1/0,u=9007199254740991,h=NaN,d=4294967295,f=[["ary",s],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",a],["partialRight",64],["rearg",l]],p="[object Arguments]",g="[object Array]",m="[object Boolean]",v="[object Date]",b="[object Error]",y="[object Function]",w="[object GeneratorFunction]",x="[object Map]",C="[object Number]",_="[object Object]",S="[object Promise]",A="[object RegExp]",k="[object Set]",T="[object String]",I="[object Symbol]",O="[object WeakMap]",E="[object ArrayBuffer]",P="[object DataView]",M="[object Float32Array]",F="[object Float64Array]",j="[object Int8Array]",D="[object Int16Array]",R="[object Int32Array]",L="[object Uint8Array]",z="[object Uint8ClampedArray]",N="[object Uint16Array]",B="[object Uint32Array]",V=/\b__p \+= '';/g,U=/\b(__p \+=) '' \+/g,W=/(__e\(.*?\)|\b__t\)) \+\n'';/g,H=/&(?:amp|lt|gt|quot|#39);/g,Y=/[&<>"']/g,$=RegExp(H.source),G=RegExp(Y.source),X=/<%-([\s\S]+?)%>/g,K=/<%([\s\S]+?)%>/g,q=/<%=([\s\S]+?)%>/g,Z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,J=/^\w*$/,Q=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ee=/[\\^$.*+?()[\]{}|]/g,te=RegExp(ee.source),ne=/^\s+/,re=/\s/,ie=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,oe=/\{\n\/\* \[wrapped with (.+)\] \*/,ae=/,? & /,se=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,le=/[()=,{}\[\]\/\s]/,ce=/\\(\\)?/g,ue=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,he=/\w*$/,de=/^[-+]0x[0-9a-f]+$/i,fe=/^0b[01]+$/i,pe=/^\[object .+?Constructor\]$/,ge=/^0o[0-7]+$/i,me=/^(?:0|[1-9]\d*)$/,ve=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,be=/($^)/,ye=/['\n\r\u2028\u2029\\]/g,we="\\ud800-\\udfff",xe="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ce="\\u2700-\\u27bf",_e="a-z\\xdf-\\xf6\\xf8-\\xff",Se="A-Z\\xc0-\\xd6\\xd8-\\xde",Ae="\\ufe0e\\ufe0f",ke="\\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",Te="['’]",Ie="["+we+"]",Oe="["+ke+"]",Ee="["+xe+"]",Pe="\\d+",Me="["+Ce+"]",Fe="["+_e+"]",je="[^"+we+ke+Pe+Ce+_e+Se+"]",De="\\ud83c[\\udffb-\\udfff]",Re="[^"+we+"]",Le="(?:\\ud83c[\\udde6-\\uddff]){2}",ze="[\\ud800-\\udbff][\\udc00-\\udfff]",Ne="["+Se+"]",Be="\\u200d",Ve="(?:"+Fe+"|"+je+")",Ue="(?:"+Ne+"|"+je+")",We="(?:['’](?:d|ll|m|re|s|t|ve))?",He="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ye="(?:"+Ee+"|"+De+")?",$e="["+Ae+"]?",Ge=$e+Ye+"(?:"+Be+"(?:"+[Re,Le,ze].join("|")+")"+$e+Ye+")*",Xe="(?:"+[Me,Le,ze].join("|")+")"+Ge,Ke="(?:"+[Re+Ee+"?",Ee,Le,ze,Ie].join("|")+")",qe=RegExp(Te,"g"),Ze=RegExp(Ee,"g"),Je=RegExp(De+"(?="+De+")|"+Ke+Ge,"g"),Qe=RegExp([Ne+"?"+Fe+"+"+We+"(?="+[Oe,Ne,"$"].join("|")+")",Ue+"+"+He+"(?="+[Oe,Ne+Ve,"$"].join("|")+")",Ne+"?"+Ve+"+"+We,Ne+"+"+He,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Pe,Xe].join("|"),"g"),et=RegExp("["+Be+we+xe+Ae+"]"),tt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,nt=["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"],rt=-1,it={};it[M]=it[F]=it[j]=it[D]=it[R]=it[L]=it[z]=it[N]=it[B]=!0,it[p]=it[g]=it[E]=it[m]=it[P]=it[v]=it[b]=it[y]=it[x]=it[C]=it[_]=it[A]=it[k]=it[T]=it[O]=!1;var ot={};ot[p]=ot[g]=ot[E]=ot[P]=ot[m]=ot[v]=ot[M]=ot[F]=ot[j]=ot[D]=ot[R]=ot[x]=ot[C]=ot[_]=ot[A]=ot[k]=ot[T]=ot[I]=ot[L]=ot[z]=ot[N]=ot[B]=!0,ot[b]=ot[y]=ot[O]=!1;var at={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},st=parseFloat,lt=parseInt,ct="object"==typeof cn&&cn&&cn.Object===Object&&cn,ut="object"==typeof self&&self&&self.Object===Object&&self,ht=ct||ut||Function("return this")(),dt=t&&!t.nodeType&&t,ft=dt&&e&&!e.nodeType&&e,pt=ft&&ft.exports===dt,gt=pt&&ct.process,mt=function(){try{var e=ft&&ft.require&&ft.require("util").types;return e||gt&&gt.binding&&gt.binding("util")}catch(e){}}(),vt=mt&&mt.isArrayBuffer,bt=mt&&mt.isDate,yt=mt&&mt.isMap,wt=mt&&mt.isRegExp,xt=mt&&mt.isSet,Ct=mt&&mt.isTypedArray;function _t(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function St(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(r,a,n(a),e)}return r}function At(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function kt(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function Tt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function It(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}function Ot(e,t){return!(null==e||!e.length)&&Nt(e,t,0)>-1}function Et(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function Pt(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function Mt(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function Ft(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function jt(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function Dt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Rt=Wt("length");function Lt(e,t,n){var r;return n(e,function(e,n,i){if(t(e,n,i))return r=n,!1}),r}function zt(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function Nt(e,t,n){return t==t?function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):zt(e,Vt,n)}function Bt(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}function Vt(e){return e!=e}function Ut(e,t){var n=null==e?0:e.length;return n?$t(e,t)/n:h}function Wt(e){return function(t){return null==t?n:t[e]}}function Ht(e){return function(t){return null==e?n:e[t]}}function Yt(e,t,n,r,i){return i(e,function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)}),n}function $t(e,t){for(var r,i=-1,o=e.length;++i<o;){var a=t(e[i]);a!==n&&(r=r===n?a:r+a)}return r}function Gt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Xt(e){return e?e.slice(0,fn(e)+1).replace(ne,""):e}function Kt(e){return function(t){return e(t)}}function qt(e,t){return Pt(t,function(t){return e[t]})}function Zt(e,t){return e.has(t)}function Jt(e,t){for(var n=-1,r=e.length;++n<r&&Nt(t,e[n],0)>-1;);return n}function Qt(e,t){for(var n=e.length;n--&&Nt(t,e[n],0)>-1;);return n}var en=Ht({"À":"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"}),tn=Ht({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function nn(e){return"\\"+at[e]}function rn(e){return et.test(e)}function on(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function an(e,t){return function(n){return e(t(n))}}function sn(e,t){for(var n=-1,r=e.length,i=0,a=[];++n<r;){var s=e[n];s!==t&&s!==o||(e[n]=o,a[i++]=n)}return a}function ln(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}function un(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=[e,e]}),n}function hn(e){return rn(e)?function(e){for(var t=Je.lastIndex=0;Je.test(e);)++t;return t}(e):Rt(e)}function dn(e){return rn(e)?function(e){return e.match(Je)||[]}(e):function(e){return e.split("")}(e)}function fn(e){for(var t=e.length;t--&&re.test(e.charAt(t)););return t}var pn=Ht({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),gn=function e(t){var re,we=(t=null==t?ht:gn.defaults(ht.Object(),t,gn.pick(ht,nt))).Array,xe=t.Date,Ce=t.Error,_e=t.Function,Se=t.Math,Ae=t.Object,ke=t.RegExp,Te=t.String,Ie=t.TypeError,Oe=we.prototype,Ee=_e.prototype,Pe=Ae.prototype,Me=t["__core-js_shared__"],Fe=Ee.toString,je=Pe.hasOwnProperty,De=0,Re=(re=/[^.]+$/.exec(Me&&Me.keys&&Me.keys.IE_PROTO||""))?"Symbol(src)_1."+re:"",Le=Pe.toString,ze=Fe.call(Ae),Ne=ht._,Be=ke("^"+Fe.call(je).replace(ee,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ve=pt?t.Buffer:n,Ue=t.Symbol,We=t.Uint8Array,He=Ve?Ve.allocUnsafe:n,Ye=an(Ae.getPrototypeOf,Ae),$e=Ae.create,Ge=Pe.propertyIsEnumerable,Xe=Oe.splice,Ke=Ue?Ue.isConcatSpreadable:n,Je=Ue?Ue.iterator:n,et=Ue?Ue.toStringTag:n,at=function(){try{var e=uo(Ae,"defineProperty");return e({},"",{}),e}catch(e){}}(),ct=t.clearTimeout!==ht.clearTimeout&&t.clearTimeout,ut=xe&&xe.now!==ht.Date.now&&xe.now,dt=t.setTimeout!==ht.setTimeout&&t.setTimeout,ft=Se.ceil,gt=Se.floor,mt=Ae.getOwnPropertySymbols,Rt=Ve?Ve.isBuffer:n,Ht=t.isFinite,cn=Oe.join,mn=an(Ae.keys,Ae),vn=Se.max,bn=Se.min,yn=xe.now,wn=t.parseInt,xn=Se.random,Cn=Oe.reverse,_n=uo(t,"DataView"),Sn=uo(t,"Map"),An=uo(t,"Promise"),kn=uo(t,"Set"),Tn=uo(t,"WeakMap"),In=uo(Ae,"create"),On=Tn&&new Tn,En={},Pn=Lo(_n),Mn=Lo(Sn),Fn=Lo(An),jn=Lo(kn),Dn=Lo(Tn),Rn=Ue?Ue.prototype:n,Ln=Rn?Rn.valueOf:n,zn=Rn?Rn.toString:n;function Nn(e){if(es(e)&&!Wa(e)&&!(e instanceof Wn)){if(e instanceof Un)return e;if(je.call(e,"__wrapped__"))return zo(e)}return new Un(e)}var Bn=function(){function e(){}return function(t){if(!Qa(t))return{};if($e)return $e(t);e.prototype=t;var r=new e;return e.prototype=n,r}}();function Vn(){}function Un(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=n}function Wn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function Hn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Yn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function $n(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Gn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new $n;++t<n;)this.add(e[t])}function Xn(e){var t=this.__data__=new Yn(e);this.size=t.size}function Kn(e,t){var n=Wa(e),r=!n&&Ua(e),i=!n&&!r&&Ga(e),o=!n&&!r&&!i&&ls(e),a=n||r||i||o,s=a?Gt(e.length,Te):[],l=s.length;for(var c in e)!t&&!je.call(e,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||bo(c,l))||s.push(c);return s}function qn(e){var t=e.length;return t?e[Gr(0,t-1)]:n}function Zn(e,t){return jo(Ii(e),ar(t,0,e.length))}function Jn(e){return jo(Ii(e))}function Qn(e,t,r){(r!==n&&!Na(e[t],r)||r===n&&!(t in e))&&ir(e,t,r)}function er(e,t,r){var i=e[t];je.call(e,t)&&Na(i,r)&&(r!==n||t in e)||ir(e,t,r)}function tr(e,t){for(var n=e.length;n--;)if(Na(e[n][0],t))return n;return-1}function nr(e,t,n,r){return hr(e,function(e,i,o){t(r,e,n(e),o)}),r}function rr(e,t){return e&&Oi(t,Es(t),e)}function ir(e,t,n){"__proto__"==t&&at?at(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function or(e,t){for(var r=-1,i=t.length,o=we(i),a=null==e;++r<i;)o[r]=a?n:As(e,t[r]);return o}function ar(e,t,r){return e==e&&(r!==n&&(e=e<=r?e:r),t!==n&&(e=e>=t?e:t)),e}function sr(e,t,r,i,o,a){var s,l=1&t,c=2&t,u=4&t;if(r&&(s=o?r(e,i,o,a):r(e)),s!==n)return s;if(!Qa(e))return e;var h=Wa(e);if(h){if(s=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&je.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!l)return Ii(e,s)}else{var d=po(e),f=d==y||d==w;if(Ga(e))return Ci(e,l);if(d==_||d==p||f&&!o){if(s=c||f?{}:mo(e),!l)return c?function(e,t){return Oi(e,fo(e),t)}(e,function(e,t){return e&&Oi(t,Ps(t),e)}(s,e)):function(e,t){return Oi(e,ho(e),t)}(e,rr(s,e))}else{if(!ot[d])return o?e:{};s=function(e,t,n){var r,i=e.constructor;switch(t){case E:return _i(e);case m:case v:return new i(+e);case P:return function(e,t){var n=t?_i(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case M:case F:case j:case D:case R:case L:case z:case N:case B:return Si(e,n);case x:return new i;case C:case T:return new i(e);case A:return function(e){var t=new e.constructor(e.source,he.exec(e));return t.lastIndex=e.lastIndex,t}(e);case k:return new i;case I:return r=e,Ln?Ae(Ln.call(r)):{}}}(e,d,l)}}a||(a=new Xn);var g=a.get(e);if(g)return g;a.set(e,s),os(e)?e.forEach(function(n){s.add(sr(n,t,r,n,e,a))}):ts(e)&&e.forEach(function(n,i){s.set(i,sr(n,t,r,i,e,a))});var b=h?n:(u?c?ro:no:c?Ps:Es)(e);return At(b||e,function(n,i){b&&(n=e[i=n]),er(s,i,sr(n,t,r,i,e,a))}),s}function lr(e,t,r){var i=r.length;if(null==e)return!i;for(e=Ae(e);i--;){var o=r[i],a=t[o],s=e[o];if(s===n&&!(o in e)||!a(s))return!1}return!0}function cr(e,t,i){if("function"!=typeof e)throw new Ie(r);return Eo(function(){e.apply(n,i)},t)}function ur(e,t,n,r){var i=-1,o=Ot,a=!0,s=e.length,l=[],c=t.length;if(!s)return l;n&&(t=Pt(t,Kt(n))),r?(o=Et,a=!1):t.length>=200&&(o=Zt,a=!1,t=new Gn(t));e:for(;++i<s;){var u=e[i],h=null==n?u:n(u);if(u=r||0!==u?u:0,a&&h==h){for(var d=c;d--;)if(t[d]===h)continue e;l.push(u)}else o(t,h,r)||l.push(u)}return l}Nn.templateSettings={escape:X,evaluate:K,interpolate:q,variable:"",imports:{_:Nn}},Nn.prototype=Vn.prototype,Nn.prototype.constructor=Nn,Un.prototype=Bn(Vn.prototype),Un.prototype.constructor=Un,Wn.prototype=Bn(Vn.prototype),Wn.prototype.constructor=Wn,Hn.prototype.clear=function(){this.__data__=In?In(null):{},this.size=0},Hn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Hn.prototype.get=function(e){var t=this.__data__;if(In){var r=t[e];return r===i?n:r}return je.call(t,e)?t[e]:n},Hn.prototype.has=function(e){var t=this.__data__;return In?t[e]!==n:je.call(t,e)},Hn.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=In&&t===n?i:t,this},Yn.prototype.clear=function(){this.__data__=[],this.size=0},Yn.prototype.delete=function(e){var t=this.__data__,n=tr(t,e);return!(n<0||(n==t.length-1?t.pop():Xe.call(t,n,1),--this.size,0))},Yn.prototype.get=function(e){var t=this.__data__,r=tr(t,e);return r<0?n:t[r][1]},Yn.prototype.has=function(e){return tr(this.__data__,e)>-1},Yn.prototype.set=function(e,t){var n=this.__data__,r=tr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},$n.prototype.clear=function(){this.size=0,this.__data__={hash:new Hn,map:new(Sn||Yn),string:new Hn}},$n.prototype.delete=function(e){var t=lo(this,e).delete(e);return this.size-=t?1:0,t},$n.prototype.get=function(e){return lo(this,e).get(e)},$n.prototype.has=function(e){return lo(this,e).has(e)},$n.prototype.set=function(e,t){var n=lo(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Gn.prototype.add=Gn.prototype.push=function(e){return this.__data__.set(e,i),this},Gn.prototype.has=function(e){return this.__data__.has(e)},Xn.prototype.clear=function(){this.__data__=new Yn,this.size=0},Xn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Xn.prototype.get=function(e){return this.__data__.get(e)},Xn.prototype.has=function(e){return this.__data__.has(e)},Xn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Yn){var r=n.__data__;if(!Sn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new $n(r)}return n.set(e,t),this.size=n.size,this};var hr=Mi(yr),dr=Mi(wr,!0);function fr(e,t){var n=!0;return hr(e,function(e,r,i){return n=!!t(e,r,i)}),n}function pr(e,t,r){for(var i=-1,o=e.length;++i<o;){var a=e[i],s=t(a);if(null!=s&&(l===n?s==s&&!ss(s):r(s,l)))var l=s,c=a}return c}function gr(e,t){var n=[];return hr(e,function(e,r,i){t(e,r,i)&&n.push(e)}),n}function mr(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=vo),i||(i=[]);++o<a;){var s=e[o];t>0&&n(s)?t>1?mr(s,t-1,n,r,i):Mt(i,s):r||(i[i.length]=s)}return i}var vr=Fi(),br=Fi(!0);function yr(e,t){return e&&vr(e,t,Es)}function wr(e,t){return e&&br(e,t,Es)}function xr(e,t){return It(t,function(t){return qa(e[t])})}function Cr(e,t){for(var r=0,i=(t=bi(t,e)).length;null!=e&&r<i;)e=e[Ro(t[r++])];return r&&r==i?e:n}function _r(e,t,n){var r=t(e);return Wa(e)?r:Mt(r,n(e))}function Sr(e){return null==e?e===n?"[object Undefined]":"[object Null]":et&&et in Ae(e)?function(e){var t=je.call(e,et),r=e[et];try{e[et]=n;var i=!0}catch(e){}var o=Le.call(e);return i&&(t?e[et]=r:delete e[et]),o}(e):function(e){return Le.call(e)}(e)}function Ar(e,t){return e>t}function kr(e,t){return null!=e&&je.call(e,t)}function Tr(e,t){return null!=e&&t in Ae(e)}function Ir(e,t,r){for(var i=r?Et:Ot,o=e[0].length,a=e.length,s=a,l=we(a),c=1/0,u=[];s--;){var h=e[s];s&&t&&(h=Pt(h,Kt(t))),c=bn(h.length,c),l[s]=!r&&(t||o>=120&&h.length>=120)?new Gn(s&&h):n}h=e[0];var d=-1,f=l[0];e:for(;++d<o&&u.length<c;){var p=h[d],g=t?t(p):p;if(p=r||0!==p?p:0,!(f?Zt(f,g):i(u,g,r))){for(s=a;--s;){var m=l[s];if(!(m?Zt(m,g):i(e[s],g,r)))continue e}f&&f.push(g),u.push(p)}}return u}function Or(e,t,r){var i=null==(e=To(e,t=bi(t,e)))?e:e[Ro(Ko(t))];return null==i?n:_t(i,e,r)}function Er(e){return es(e)&&Sr(e)==p}function Pr(e,t,r,i,o){return e===t||(null==e||null==t||!es(e)&&!es(t)?e!=e&&t!=t:function(e,t,r,i,o,a){var s=Wa(e),l=Wa(t),c=s?g:po(e),u=l?g:po(t),h=(c=c==p?_:c)==_,d=(u=u==p?_:u)==_,f=c==u;if(f&&Ga(e)){if(!Ga(t))return!1;s=!0,h=!1}if(f&&!h)return a||(a=new Xn),s||ls(e)?eo(e,t,r,i,o,a):function(e,t,n,r,i,o,a){switch(n){case P:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case E:return!(e.byteLength!=t.byteLength||!o(new We(e),new We(t)));case m:case v:case C:return Na(+e,+t);case b:return e.name==t.name&&e.message==t.message;case A:case T:return e==t+"";case x:var s=on;case k:var l=1&r;if(s||(s=ln),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var u=eo(s(e),s(t),r,i,o,a);return a.delete(e),u;case I:if(Ln)return Ln.call(e)==Ln.call(t)}return!1}(e,t,c,r,i,o,a);if(!(1&r)){var y=h&&je.call(e,"__wrapped__"),w=d&&je.call(t,"__wrapped__");if(y||w){var S=y?e.value():e,O=w?t.value():t;return a||(a=new Xn),o(S,O,r,i,a)}}return!!f&&(a||(a=new Xn),function(e,t,r,i,o,a){var s=1&r,l=no(e),c=l.length,u=no(t),h=u.length;if(c!=h&&!s)return!1;for(var d=c;d--;){var f=l[d];if(!(s?f in t:je.call(t,f)))return!1}var p=a.get(e),g=a.get(t);if(p&&g)return p==t&&g==e;var m=!0;a.set(e,t),a.set(t,e);for(var v=s;++d<c;){var b=e[f=l[d]],y=t[f];if(i)var w=s?i(y,b,f,t,e,a):i(b,y,f,e,t,a);if(!(w===n?b===y||o(b,y,r,i,a):w)){m=!1;break}v||(v="constructor"==f)}if(m&&!v){var x=e.constructor,C=t.constructor;x==C||!("constructor"in e)||!("constructor"in t)||"function"==typeof x&&x instanceof x&&"function"==typeof C&&C instanceof C||(m=!1)}return a.delete(e),a.delete(t),m}(e,t,r,i,o,a))}(e,t,r,i,Pr,o))}function Mr(e,t,r,i){var o=r.length,a=o,s=!i;if(null==e)return!a;for(e=Ae(e);o--;){var l=r[o];if(s&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++o<a;){var c=(l=r[o])[0],u=e[c],h=l[1];if(s&&l[2]){if(u===n&&!(c in e))return!1}else{var d=new Xn;if(i)var f=i(u,h,c,e,t,d);if(!(f===n?Pr(h,u,3,i,d):f))return!1}}return!0}function Fr(e){return!(!Qa(e)||(t=e,Re&&Re in t))&&(qa(e)?Be:pe).test(Lo(e));var t}function jr(e){return"function"==typeof e?e:null==e?nl:"object"==typeof e?Wa(e)?Br(e[0],e[1]):Nr(e):hl(e)}function Dr(e){if(!_o(e))return mn(e);var t=[];for(var n in Ae(e))je.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Rr(e){if(!Qa(e))return function(e){var t=[];if(null!=e)for(var n in Ae(e))t.push(n);return t}(e);var t=_o(e),n=[];for(var r in e)("constructor"!=r||!t&&je.call(e,r))&&n.push(r);return n}function Lr(e,t){return e<t}function zr(e,t){var n=-1,r=Ya(e)?we(e.length):[];return hr(e,function(e,i,o){r[++n]=t(e,i,o)}),r}function Nr(e){var t=co(e);return 1==t.length&&t[0][2]?Ao(t[0][0],t[0][1]):function(n){return n===e||Mr(n,e,t)}}function Br(e,t){return wo(e)&&So(t)?Ao(Ro(e),t):function(r){var i=As(r,e);return i===n&&i===t?ks(r,e):Pr(t,i,3)}}function Vr(e,t,r,i,o){e!==t&&vr(t,function(a,s){if(o||(o=new Xn),Qa(a))!function(e,t,r,i,o,a,s){var l=Io(e,r),c=Io(t,r),u=s.get(c);if(u)Qn(e,r,u);else{var h=a?a(l,c,r+"",e,t,s):n,d=h===n;if(d){var f=Wa(c),p=!f&&Ga(c),g=!f&&!p&&ls(c);h=c,f||p||g?Wa(l)?h=l:$a(l)?h=Ii(l):p?(d=!1,h=Ci(c,!0)):g?(d=!1,h=Si(c,!0)):h=[]:rs(c)||Ua(c)?(h=l,Ua(l)?h=ms(l):Qa(l)&&!qa(l)||(h=mo(c))):d=!1}d&&(s.set(c,h),o(h,c,i,a,s),s.delete(c)),Qn(e,r,h)}}(e,t,s,r,Vr,i,o);else{var l=i?i(Io(e,s),a,s+"",e,t,o):n;l===n&&(l=a),Qn(e,s,l)}},Ps)}function Ur(e,t){var r=e.length;if(r)return bo(t+=t<0?r:0,r)?e[t]:n}function Wr(e,t,n){t=t.length?Pt(t,function(e){return Wa(e)?function(t){return Cr(t,1===e.length?e[0]:e)}:e}):[nl];var r=-1;t=Pt(t,Kt(so()));var i=zr(e,function(e,n,i){var o=Pt(t,function(t){return t(e)});return{criteria:o,index:++r,value:e}});return function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(i,function(e,t){return function(e,t,n){for(var r=-1,i=e.criteria,o=t.criteria,a=i.length,s=n.length;++r<a;){var l=Ai(i[r],o[r]);if(l)return r>=s?l:l*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)})}function Hr(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var a=t[r],s=Cr(e,a);n(s,a)&&Jr(o,bi(a,e),s)}return o}function Yr(e,t,n,r){var i=r?Bt:Nt,o=-1,a=t.length,s=e;for(e===t&&(t=Ii(t)),n&&(s=Pt(e,Kt(n)));++o<a;)for(var l=0,c=t[o],u=n?n(c):c;(l=i(s,u,l,r))>-1;)s!==e&&Xe.call(s,l,1),Xe.call(e,l,1);return e}function $r(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;bo(i)?Xe.call(e,i,1):ui(e,i)}}return e}function Gr(e,t){return e+gt(xn()*(t-e+1))}function Xr(e,t){var n="";if(!e||t<1||t>u)return n;do{t%2&&(n+=e),(t=gt(t/2))&&(e+=e)}while(t);return n}function Kr(e,t){return Po(ko(e,t,nl),e+"")}function qr(e){return qn(Ns(e))}function Zr(e,t){var n=Ns(e);return jo(n,ar(t,0,n.length))}function Jr(e,t,r,i){if(!Qa(e))return e;for(var o=-1,a=(t=bi(t,e)).length,s=a-1,l=e;null!=l&&++o<a;){var c=Ro(t[o]),u=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(o!=s){var h=l[c];(u=i?i(h,c,l):n)===n&&(u=Qa(h)?h:bo(t[o+1])?[]:{})}er(l,c,u),l=l[c]}return e}var Qr=On?function(e,t){return On.set(e,t),e}:nl,ei=at?function(e,t){return at(e,"toString",{configurable:!0,enumerable:!1,value:Qs(t),writable:!0})}:nl;function ti(e){return jo(Ns(e))}function ni(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=we(i);++r<i;)o[r]=e[r+t];return o}function ri(e,t){var n;return hr(e,function(e,r,i){return!(n=t(e,r,i))}),!!n}function ii(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;r<i;){var o=r+i>>>1,a=e[o];null!==a&&!ss(a)&&(n?a<=t:a<t)?r=o+1:i=o}return i}return oi(e,t,nl,n)}function oi(e,t,r,i){var o=0,a=null==e?0:e.length;if(0===a)return 0;for(var s=(t=r(t))!=t,l=null===t,c=ss(t),u=t===n;o<a;){var h=gt((o+a)/2),d=r(e[h]),f=d!==n,p=null===d,g=d==d,m=ss(d);if(s)var v=i||g;else v=u?g&&(i||f):l?g&&f&&(i||!p):c?g&&f&&!p&&(i||!m):!p&&!m&&(i?d<=t:d<t);v?o=h+1:a=h}return bn(a,4294967294)}function ai(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n],s=t?t(a):a;if(!n||!Na(s,l)){var l=s;o[i++]=0===a?0:a}}return o}function si(e){return"number"==typeof e?e:ss(e)?h:+e}function li(e){if("string"==typeof e)return e;if(Wa(e))return Pt(e,li)+"";if(ss(e))return zn?zn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ci(e,t,n){var r=-1,i=Ot,o=e.length,a=!0,s=[],l=s;if(n)a=!1,i=Et;else if(o>=200){var c=t?null:Xi(e);if(c)return ln(c);a=!1,i=Zt,l=new Gn}else l=t?[]:s;e:for(;++r<o;){var u=e[r],h=t?t(u):u;if(u=n||0!==u?u:0,a&&h==h){for(var d=l.length;d--;)if(l[d]===h)continue e;t&&l.push(h),s.push(u)}else i(l,h,n)||(l!==s&&l.push(h),s.push(u))}return s}function ui(e,t){return null==(e=To(e,t=bi(t,e)))||delete e[Ro(Ko(t))]}function hi(e,t,n,r){return Jr(e,t,n(Cr(e,t)),r)}function di(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?ni(e,r?0:o,r?o+1:i):ni(e,r?o+1:0,r?i:o)}function fi(e,t){var n=e;return n instanceof Wn&&(n=n.value()),Ft(t,function(e,t){return t.func.apply(t.thisArg,Mt([e],t.args))},n)}function pi(e,t,n){var r=e.length;if(r<2)return r?ci(e[0]):[];for(var i=-1,o=we(r);++i<r;)for(var a=e[i],s=-1;++s<r;)s!=i&&(o[i]=ur(o[i]||a,e[s],t,n));return ci(mr(o,1),t,n)}function gi(e,t,r){for(var i=-1,o=e.length,a=t.length,s={};++i<o;){var l=i<a?t[i]:n;r(s,e[i],l)}return s}function mi(e){return $a(e)?e:[]}function vi(e){return"function"==typeof e?e:nl}function bi(e,t){return Wa(e)?e:wo(e,t)?[e]:Do(vs(e))}var yi=Kr;function wi(e,t,r){var i=e.length;return r=r===n?i:r,!t&&r>=i?e:ni(e,t,r)}var xi=ct||function(e){return ht.clearTimeout(e)};function Ci(e,t){if(t)return e.slice();var n=e.length,r=He?He(n):new e.constructor(n);return e.copy(r),r}function _i(e){var t=new e.constructor(e.byteLength);return new We(t).set(new We(e)),t}function Si(e,t){var n=t?_i(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Ai(e,t){if(e!==t){var r=e!==n,i=null===e,o=e==e,a=ss(e),s=t!==n,l=null===t,c=t==t,u=ss(t);if(!l&&!u&&!a&&e>t||a&&s&&c&&!l&&!u||i&&s&&c||!r&&c||!o)return 1;if(!i&&!a&&!u&&e<t||u&&r&&o&&!i&&!a||l&&r&&o||!s&&o||!c)return-1}return 0}function ki(e,t,n,r){for(var i=-1,o=e.length,a=n.length,s=-1,l=t.length,c=vn(o-a,0),u=we(l+c),h=!r;++s<l;)u[s]=t[s];for(;++i<a;)(h||i<o)&&(u[n[i]]=e[i]);for(;c--;)u[s++]=e[i++];return u}function Ti(e,t,n,r){for(var i=-1,o=e.length,a=-1,s=n.length,l=-1,c=t.length,u=vn(o-s,0),h=we(u+c),d=!r;++i<u;)h[i]=e[i];for(var f=i;++l<c;)h[f+l]=t[l];for(;++a<s;)(d||i<o)&&(h[f+n[a]]=e[i++]);return h}function Ii(e,t){var n=-1,r=e.length;for(t||(t=we(r));++n<r;)t[n]=e[n];return t}function Oi(e,t,r,i){var o=!r;r||(r={});for(var a=-1,s=t.length;++a<s;){var l=t[a],c=i?i(r[l],e[l],l,r,e):n;c===n&&(c=e[l]),o?ir(r,l,c):er(r,l,c)}return r}function Ei(e,t){return function(n,r){var i=Wa(n)?St:nr,o=t?t():{};return i(n,e,so(r,2),o)}}function Pi(e){return Kr(function(t,r){var i=-1,o=r.length,a=o>1?r[o-1]:n,s=o>2?r[2]:n;for(a=e.length>3&&"function"==typeof a?(o--,a):n,s&&yo(r[0],r[1],s)&&(a=o<3?n:a,o=1),t=Ae(t);++i<o;){var l=r[i];l&&e(t,l,i,a)}return t})}function Mi(e,t){return function(n,r){if(null==n)return n;if(!Ya(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=Ae(n);(t?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function Fi(e){return function(t,n,r){for(var i=-1,o=Ae(t),a=r(t),s=a.length;s--;){var l=a[e?s:++i];if(!1===n(o[l],l,o))break}return t}}function ji(e){return function(t){var r=rn(t=vs(t))?dn(t):n,i=r?r[0]:t.charAt(0),o=r?wi(r,1).join(""):t.slice(1);return i[e]()+o}}function Di(e){return function(t){return Ft(qs(Us(t).replace(qe,"")),e,"")}}function Ri(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Bn(e.prototype),r=e.apply(n,t);return Qa(r)?r:n}}function Li(e){return function(t,r,i){var o=Ae(t);if(!Ya(t)){var a=so(r,3);t=Es(t),r=function(e){return a(o[e],e,o)}}var s=e(t,r,i);return s>-1?o[a?t[s]:s]:n}}function zi(e){return to(function(t){var i=t.length,o=i,a=Un.prototype.thru;for(e&&t.reverse();o--;){var s=t[o];if("function"!=typeof s)throw new Ie(r);if(a&&!l&&"wrapper"==oo(s))var l=new Un([],!0)}for(o=l?o:i;++o<i;){var c=oo(s=t[o]),u="wrapper"==c?io(s):n;l=u&&xo(u[0])&&424==u[1]&&!u[4].length&&1==u[9]?l[oo(u[0])].apply(l,u[3]):1==s.length&&xo(s)?l[c]():l.thru(s)}return function(){var e=arguments,n=e[0];if(l&&1==e.length&&Wa(n))return l.plant(n).value();for(var r=0,o=i?t[r].apply(this,e):n;++r<i;)o=t[r].call(this,o);return o}})}function Ni(e,t,r,i,o,a,l,c,u,h){var d=t&s,f=1&t,p=2&t,g=24&t,m=512&t,v=p?n:Ri(e);return function s(){for(var b=arguments.length,y=we(b),w=b;w--;)y[w]=arguments[w];if(g)var x=ao(s),C=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(y,x);if(i&&(y=ki(y,i,o,g)),a&&(y=Ti(y,a,l,g)),b-=C,g&&b<h){var _=sn(y,x);return $i(e,t,Ni,s.placeholder,r,y,_,c,u,h-b)}var S=f?r:this,A=p?S[e]:e;return b=y.length,c?y=function(e,t){for(var r=e.length,i=bn(t.length,r),o=Ii(e);i--;){var a=t[i];e[i]=bo(a,r)?o[a]:n}return e}(y,c):m&&b>1&&y.reverse(),d&&u<b&&(y.length=u),this&&this!==ht&&this instanceof s&&(A=v||Ri(A)),A.apply(S,y)}}function Bi(e,t){return function(n,r){return function(e,t,n,r){return yr(e,function(e,i,o){t(r,n(e),i,o)}),r}(n,e,t(r),{})}}function Vi(e,t){return function(r,i){var o;if(r===n&&i===n)return t;if(r!==n&&(o=r),i!==n){if(o===n)return i;"string"==typeof r||"string"==typeof i?(r=li(r),i=li(i)):(r=si(r),i=si(i)),o=e(r,i)}return o}}function Ui(e){return to(function(t){return t=Pt(t,Kt(so())),Kr(function(n){var r=this;return e(t,function(e){return _t(e,r,n)})})})}function Wi(e,t){var r=(t=t===n?" ":li(t)).length;if(r<2)return r?Xr(t,e):t;var i=Xr(t,ft(e/hn(t)));return rn(t)?wi(dn(i),0,e).join(""):i.slice(0,e)}function Hi(e){return function(t,r,i){return i&&"number"!=typeof i&&yo(t,r,i)&&(r=i=n),t=ds(t),r===n?(r=t,t=0):r=ds(r),function(e,t,n,r){for(var i=-1,o=vn(ft((t-e)/(n||1)),0),a=we(o);o--;)a[r?o:++i]=e,e+=n;return a}(t,r,i=i===n?t<r?1:-1:ds(i),e)}}function Yi(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=gs(t),n=gs(n)),e(t,n)}}function $i(e,t,r,i,o,s,l,c,u,h){var d=8&t;t|=d?a:64,4&(t&=~(d?64:a))||(t&=-4);var f=[e,t,o,d?s:n,d?l:n,d?n:s,d?n:l,c,u,h],p=r.apply(n,f);return xo(e)&&Oo(p,f),p.placeholder=i,Mo(p,e,t)}function Gi(e){var t=Se[e];return function(e,n){if(e=gs(e),(n=null==n?0:bn(fs(n),292))&&Ht(e)){var r=(vs(e)+"e").split("e");return+((r=(vs(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Xi=kn&&1/ln(new kn([,-0]))[1]==c?function(e){return new kn(e)}:sl;function Ki(e){return function(t){var n=po(t);return n==x?on(t):n==k?un(t):function(e,t){return Pt(t,function(t){return[t,e[t]]})}(t,e(t))}}function qi(e,t,i,c,u,h,d,f){var p=2&t;if(!p&&"function"!=typeof e)throw new Ie(r);var g=c?c.length:0;if(g||(t&=-97,c=u=n),d=d===n?d:vn(fs(d),0),f=f===n?f:fs(f),g-=u?u.length:0,64&t){var m=c,v=u;c=u=n}var b=p?n:io(e),y=[e,t,i,c,u,m,v,h,d,f];if(b&&function(e,t){var n=e[1],r=t[1],i=n|r,a=i<131,c=r==s&&8==n||r==s&&n==l&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!a&&!c)return e;1&r&&(e[2]=t[2],i|=1&n?0:4);var u=t[3];if(u){var h=e[3];e[3]=h?ki(h,u,t[4]):u,e[4]=h?sn(e[3],o):t[4]}(u=t[5])&&(h=e[5],e[5]=h?Ti(h,u,t[6]):u,e[6]=h?sn(e[5],o):t[6]),(u=t[7])&&(e[7]=u),r&s&&(e[8]=null==e[8]?t[8]:bn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i}(y,b),e=y[0],t=y[1],i=y[2],c=y[3],u=y[4],!(f=y[9]=y[9]===n?p?0:e.length:vn(y[9]-g,0))&&24&t&&(t&=-25),t&&1!=t)w=8==t||16==t?function(e,t,r){var i=Ri(e);return function o(){for(var a=arguments.length,s=we(a),l=a,c=ao(o);l--;)s[l]=arguments[l];var u=a<3&&s[0]!==c&&s[a-1]!==c?[]:sn(s,c);return(a-=u.length)<r?$i(e,t,Ni,o.placeholder,n,s,u,n,n,r-a):_t(this&&this!==ht&&this instanceof o?i:e,this,s)}}(e,t,f):t!=a&&33!=t||u.length?Ni.apply(n,y):function(e,t,n,r){var i=1&t,o=Ri(e);return function t(){for(var a=-1,s=arguments.length,l=-1,c=r.length,u=we(c+s),h=this&&this!==ht&&this instanceof t?o:e;++l<c;)u[l]=r[l];for(;s--;)u[l++]=arguments[++a];return _t(h,i?n:this,u)}}(e,t,i,c);else var w=function(e,t,n){var r=1&t,i=Ri(e);return function t(){return(this&&this!==ht&&this instanceof t?i:e).apply(r?n:this,arguments)}}(e,t,i);return Mo((b?Qr:Oo)(w,y),e,t)}function Zi(e,t,r,i){return e===n||Na(e,Pe[r])&&!je.call(i,r)?t:e}function Ji(e,t,r,i,o,a){return Qa(e)&&Qa(t)&&(a.set(t,e),Vr(e,t,n,Ji,a),a.delete(t)),e}function Qi(e){return rs(e)?n:e}function eo(e,t,r,i,o,a){var s=1&r,l=e.length,c=t.length;if(l!=c&&!(s&&c>l))return!1;var u=a.get(e),h=a.get(t);if(u&&h)return u==t&&h==e;var d=-1,f=!0,p=2&r?new Gn:n;for(a.set(e,t),a.set(t,e);++d<l;){var g=e[d],m=t[d];if(i)var v=s?i(m,g,d,t,e,a):i(g,m,d,e,t,a);if(v!==n){if(v)continue;f=!1;break}if(p){if(!Dt(t,function(e,t){if(!Zt(p,t)&&(g===e||o(g,e,r,i,a)))return p.push(t)})){f=!1;break}}else if(g!==m&&!o(g,m,r,i,a)){f=!1;break}}return a.delete(e),a.delete(t),f}function to(e){return Po(ko(e,n,Ho),e+"")}function no(e){return _r(e,Es,ho)}function ro(e){return _r(e,Ps,fo)}var io=On?function(e){return On.get(e)}:sl;function oo(e){for(var t=e.name+"",n=En[t],r=je.call(En,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function ao(e){return(je.call(Nn,"placeholder")?Nn:e).placeholder}function so(){var e=Nn.iteratee||rl;return e=e===rl?jr:e,arguments.length?e(arguments[0],arguments[1]):e}function lo(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function co(e){for(var t=Es(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,So(i)]}return t}function uo(e,t){var r=function(e,t){return null==e?n:e[t]}(e,t);return Fr(r)?r:n}var ho=mt?function(e){return null==e?[]:(e=Ae(e),It(mt(e),function(t){return Ge.call(e,t)}))}:pl,fo=mt?function(e){for(var t=[];e;)Mt(t,ho(e)),e=Ye(e);return t}:pl,po=Sr;function go(e,t,n){for(var r=-1,i=(t=bi(t,e)).length,o=!1;++r<i;){var a=Ro(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&Ja(i)&&bo(a,i)&&(Wa(e)||Ua(e))}function mo(e){return"function"!=typeof e.constructor||_o(e)?{}:Bn(Ye(e))}function vo(e){return Wa(e)||Ua(e)||!!(Ke&&e&&e[Ke])}function bo(e,t){var n=typeof e;return!!(t=null==t?u:t)&&("number"==n||"symbol"!=n&&me.test(e))&&e>-1&&e%1==0&&e<t}function yo(e,t,n){if(!Qa(n))return!1;var r=typeof t;return!!("number"==r?Ya(n)&&bo(t,n.length):"string"==r&&t in n)&&Na(n[t],e)}function wo(e,t){if(Wa(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!ss(e))||J.test(e)||!Z.test(e)||null!=t&&e in Ae(t)}function xo(e){var t=oo(e),n=Nn[t];if("function"!=typeof n||!(t in Wn.prototype))return!1;if(e===n)return!0;var r=io(n);return!!r&&e===r[0]}(_n&&po(new _n(new ArrayBuffer(1)))!=P||Sn&&po(new Sn)!=x||An&&po(An.resolve())!=S||kn&&po(new kn)!=k||Tn&&po(new Tn)!=O)&&(po=function(e){var t=Sr(e),r=t==_?e.constructor:n,i=r?Lo(r):"";if(i)switch(i){case Pn:return P;case Mn:return x;case Fn:return S;case jn:return k;case Dn:return O}return t});var Co=Me?qa:gl;function _o(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Pe)}function So(e){return e==e&&!Qa(e)}function Ao(e,t){return function(r){return null!=r&&r[e]===t&&(t!==n||e in Ae(r))}}function ko(e,t,r){return t=vn(t===n?e.length-1:t,0),function(){for(var n=arguments,i=-1,o=vn(n.length-t,0),a=we(o);++i<o;)a[i]=n[t+i];i=-1;for(var s=we(t+1);++i<t;)s[i]=n[i];return s[t]=r(a),_t(e,this,s)}}function To(e,t){return t.length<2?e:Cr(e,ni(t,0,-1))}function Io(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Oo=Fo(Qr),Eo=dt||function(e,t){return ht.setTimeout(e,t)},Po=Fo(ei);function Mo(e,t,n){var r=t+"";return Po(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(ie,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return At(f,function(n){var r="_."+n[0];t&n[1]&&!Ot(e,r)&&e.push(r)}),e.sort()}(function(e){var t=e.match(oe);return t?t[1].split(ae):[]}(r),n)))}function Fo(e){var t=0,r=0;return function(){var i=yn(),o=16-(i-r);if(r=i,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(n,arguments)}}function jo(e,t){var r=-1,i=e.length,o=i-1;for(t=t===n?i:t;++r<t;){var a=Gr(r,o),s=e[a];e[a]=e[r],e[r]=s}return e.length=t,e}var Do=function(e){var t=Fa(e,function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t}(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Q,function(e,n,r,i){t.push(r?i.replace(ce,"$1"):n||e)}),t});function Ro(e){if("string"==typeof e||ss(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Lo(e){if(null!=e){try{return Fe.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function zo(e){if(e instanceof Wn)return e.clone();var t=new Un(e.__wrapped__,e.__chain__);return t.__actions__=Ii(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var No=Kr(function(e,t){return $a(e)?ur(e,mr(t,1,$a,!0)):[]}),Bo=Kr(function(e,t){var r=Ko(t);return $a(r)&&(r=n),$a(e)?ur(e,mr(t,1,$a,!0),so(r,2)):[]}),Vo=Kr(function(e,t){var r=Ko(t);return $a(r)&&(r=n),$a(e)?ur(e,mr(t,1,$a,!0),n,r):[]});function Uo(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:fs(n);return i<0&&(i=vn(r+i,0)),zt(e,so(t,3),i)}function Wo(e,t,r){var i=null==e?0:e.length;if(!i)return-1;var o=i-1;return r!==n&&(o=fs(r),o=r<0?vn(i+o,0):bn(o,i-1)),zt(e,so(t,3),o,!0)}function Ho(e){return null!=e&&e.length?mr(e,1):[]}function Yo(e){return e&&e.length?e[0]:n}var $o=Kr(function(e){var t=Pt(e,mi);return t.length&&t[0]===e[0]?Ir(t):[]}),Go=Kr(function(e){var t=Ko(e),r=Pt(e,mi);return t===Ko(r)?t=n:r.pop(),r.length&&r[0]===e[0]?Ir(r,so(t,2)):[]}),Xo=Kr(function(e){var t=Ko(e),r=Pt(e,mi);return(t="function"==typeof t?t:n)&&r.pop(),r.length&&r[0]===e[0]?Ir(r,n,t):[]});function Ko(e){var t=null==e?0:e.length;return t?e[t-1]:n}var qo=Kr(Zo);function Zo(e,t){return e&&e.length&&t&&t.length?Yr(e,t):e}var Jo=to(function(e,t){var n=null==e?0:e.length,r=or(e,t);return $r(e,Pt(t,function(e){return bo(e,n)?+e:e}).sort(Ai)),r});function Qo(e){return null==e?e:Cn.call(e)}var ea=Kr(function(e){return ci(mr(e,1,$a,!0))}),ta=Kr(function(e){var t=Ko(e);return $a(t)&&(t=n),ci(mr(e,1,$a,!0),so(t,2))}),na=Kr(function(e){var t=Ko(e);return t="function"==typeof t?t:n,ci(mr(e,1,$a,!0),n,t)});function ra(e){if(!e||!e.length)return[];var t=0;return e=It(e,function(e){if($a(e))return t=vn(e.length,t),!0}),Gt(t,function(t){return Pt(e,Wt(t))})}function ia(e,t){if(!e||!e.length)return[];var r=ra(e);return null==t?r:Pt(r,function(e){return _t(t,n,e)})}var oa=Kr(function(e,t){return $a(e)?ur(e,t):[]}),aa=Kr(function(e){return pi(It(e,$a))}),sa=Kr(function(e){var t=Ko(e);return $a(t)&&(t=n),pi(It(e,$a),so(t,2))}),la=Kr(function(e){var t=Ko(e);return t="function"==typeof t?t:n,pi(It(e,$a),n,t)}),ca=Kr(ra),ua=Kr(function(e){var t=e.length,r=t>1?e[t-1]:n;return r="function"==typeof r?(e.pop(),r):n,ia(e,r)});function ha(e){var t=Nn(e);return t.__chain__=!0,t}function da(e,t){return t(e)}var fa=to(function(e){var t=e.length,r=t?e[0]:0,i=this.__wrapped__,o=function(t){return or(t,e)};return!(t>1||this.__actions__.length)&&i instanceof Wn&&bo(r)?((i=i.slice(r,+r+(t?1:0))).__actions__.push({func:da,args:[o],thisArg:n}),new Un(i,this.__chain__).thru(function(e){return t&&!e.length&&e.push(n),e})):this.thru(o)}),pa=Ei(function(e,t,n){je.call(e,n)?++e[n]:ir(e,n,1)}),ga=Li(Uo),ma=Li(Wo);function va(e,t){return(Wa(e)?At:hr)(e,so(t,3))}function ba(e,t){return(Wa(e)?kt:dr)(e,so(t,3))}var ya=Ei(function(e,t,n){je.call(e,n)?e[n].push(t):ir(e,n,[t])}),wa=Kr(function(e,t,n){var r=-1,i="function"==typeof t,o=Ya(e)?we(e.length):[];return hr(e,function(e){o[++r]=i?_t(t,e,n):Or(e,t,n)}),o}),xa=Ei(function(e,t,n){ir(e,n,t)});function Ca(e,t){return(Wa(e)?Pt:zr)(e,so(t,3))}var _a=Ei(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),Sa=Kr(function(e,t){if(null==e)return[];var n=t.length;return n>1&&yo(e,t[0],t[1])?t=[]:n>2&&yo(t[0],t[1],t[2])&&(t=[t[0]]),Wr(e,mr(t,1),[])}),Aa=ut||function(){return ht.Date.now()};function ka(e,t,r){return t=r?n:t,t=e&&null==t?e.length:t,qi(e,s,n,n,n,n,t)}function Ta(e,t){var i;if("function"!=typeof t)throw new Ie(r);return e=fs(e),function(){return--e>0&&(i=t.apply(this,arguments)),e<=1&&(t=n),i}}var Ia=Kr(function(e,t,n){var r=1;if(n.length){var i=sn(n,ao(Ia));r|=a}return qi(e,r,t,n,i)}),Oa=Kr(function(e,t,n){var r=3;if(n.length){var i=sn(n,ao(Oa));r|=a}return qi(t,r,e,n,i)});function Ea(e,t,i){var o,a,s,l,c,u,h=0,d=!1,f=!1,p=!0;if("function"!=typeof e)throw new Ie(r);function g(t){var r=o,i=a;return o=a=n,h=t,l=e.apply(i,r)}function m(e){var r=e-u;return u===n||r>=t||r<0||f&&e-h>=s}function v(){var e=Aa();if(m(e))return b(e);c=Eo(v,function(e){var n=t-(e-u);return f?bn(n,s-(e-h)):n}(e))}function b(e){return c=n,p&&o?g(e):(o=a=n,l)}function y(){var e=Aa(),r=m(e);if(o=arguments,a=this,u=e,r){if(c===n)return function(e){return h=e,c=Eo(v,t),d?g(e):l}(u);if(f)return xi(c),c=Eo(v,t),g(u)}return c===n&&(c=Eo(v,t)),l}return t=gs(t)||0,Qa(i)&&(d=!!i.leading,s=(f="maxWait"in i)?vn(gs(i.maxWait)||0,t):s,p="trailing"in i?!!i.trailing:p),y.cancel=function(){c!==n&&xi(c),h=0,o=u=a=c=n},y.flush=function(){return c===n?l:b(Aa())},y}var Pa=Kr(function(e,t){return cr(e,1,t)}),Ma=Kr(function(e,t,n){return cr(e,gs(t)||0,n)});function Fa(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ie(r);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Fa.Cache||$n),n}function ja(e){if("function"!=typeof e)throw new Ie(r);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Fa.Cache=$n;var Da=yi(function(e,t){var n=(t=1==t.length&&Wa(t[0])?Pt(t[0],Kt(so())):Pt(mr(t,1),Kt(so()))).length;return Kr(function(r){for(var i=-1,o=bn(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return _t(e,this,r)})}),Ra=Kr(function(e,t){var r=sn(t,ao(Ra));return qi(e,a,n,t,r)}),La=Kr(function(e,t){var r=sn(t,ao(La));return qi(e,64,n,t,r)}),za=to(function(e,t){return qi(e,l,n,n,n,t)});function Na(e,t){return e===t||e!=e&&t!=t}var Ba=Yi(Ar),Va=Yi(function(e,t){return e>=t}),Ua=Er(function(){return arguments}())?Er:function(e){return es(e)&&je.call(e,"callee")&&!Ge.call(e,"callee")},Wa=we.isArray,Ha=vt?Kt(vt):function(e){return es(e)&&Sr(e)==E};function Ya(e){return null!=e&&Ja(e.length)&&!qa(e)}function $a(e){return es(e)&&Ya(e)}var Ga=Rt||gl,Xa=bt?Kt(bt):function(e){return es(e)&&Sr(e)==v};function Ka(e){if(!es(e))return!1;var t=Sr(e);return t==b||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!rs(e)}function qa(e){if(!Qa(e))return!1;var t=Sr(e);return t==y||t==w||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Za(e){return"number"==typeof e&&e==fs(e)}function Ja(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=u}function Qa(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function es(e){return null!=e&&"object"==typeof e}var ts=yt?Kt(yt):function(e){return es(e)&&po(e)==x};function ns(e){return"number"==typeof e||es(e)&&Sr(e)==C}function rs(e){if(!es(e)||Sr(e)!=_)return!1;var t=Ye(e);if(null===t)return!0;var n=je.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Fe.call(n)==ze}var is=wt?Kt(wt):function(e){return es(e)&&Sr(e)==A},os=xt?Kt(xt):function(e){return es(e)&&po(e)==k};function as(e){return"string"==typeof e||!Wa(e)&&es(e)&&Sr(e)==T}function ss(e){return"symbol"==typeof e||es(e)&&Sr(e)==I}var ls=Ct?Kt(Ct):function(e){return es(e)&&Ja(e.length)&&!!it[Sr(e)]},cs=Yi(Lr),us=Yi(function(e,t){return e<=t});function hs(e){if(!e)return[];if(Ya(e))return as(e)?dn(e):Ii(e);if(Je&&e[Je])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Je]());var t=po(e);return(t==x?on:t==k?ln:Ns)(e)}function ds(e){return e?(e=gs(e))===c||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function fs(e){var t=ds(e),n=t%1;return t==t?n?t-n:t:0}function ps(e){return e?ar(fs(e),0,d):0}function gs(e){if("number"==typeof e)return e;if(ss(e))return h;if(Qa(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Qa(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Xt(e);var n=fe.test(e);return n||ge.test(e)?lt(e.slice(2),n?2:8):de.test(e)?h:+e}function ms(e){return Oi(e,Ps(e))}function vs(e){return null==e?"":li(e)}var bs=Pi(function(e,t){if(_o(t)||Ya(t))Oi(t,Es(t),e);else for(var n in t)je.call(t,n)&&er(e,n,t[n])}),ys=Pi(function(e,t){Oi(t,Ps(t),e)}),ws=Pi(function(e,t,n,r){Oi(t,Ps(t),e,r)}),xs=Pi(function(e,t,n,r){Oi(t,Es(t),e,r)}),Cs=to(or),_s=Kr(function(e,t){e=Ae(e);var r=-1,i=t.length,o=i>2?t[2]:n;for(o&&yo(t[0],t[1],o)&&(i=1);++r<i;)for(var a=t[r],s=Ps(a),l=-1,c=s.length;++l<c;){var u=s[l],h=e[u];(h===n||Na(h,Pe[u])&&!je.call(e,u))&&(e[u]=a[u])}return e}),Ss=Kr(function(e){return e.push(n,Ji),_t(Fs,n,e)});function As(e,t,r){var i=null==e?n:Cr(e,t);return i===n?r:i}function ks(e,t){return null!=e&&go(e,t,Tr)}var Ts=Bi(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Le.call(t)),e[t]=n},Qs(nl)),Is=Bi(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Le.call(t)),je.call(e,t)?e[t].push(n):e[t]=[n]},so),Os=Kr(Or);function Es(e){return Ya(e)?Kn(e):Dr(e)}function Ps(e){return Ya(e)?Kn(e,!0):Rr(e)}var Ms=Pi(function(e,t,n){Vr(e,t,n)}),Fs=Pi(function(e,t,n,r){Vr(e,t,n,r)}),js=to(function(e,t){var n={};if(null==e)return n;var r=!1;t=Pt(t,function(t){return t=bi(t,e),r||(r=t.length>1),t}),Oi(e,ro(e),n),r&&(n=sr(n,7,Qi));for(var i=t.length;i--;)ui(n,t[i]);return n}),Ds=to(function(e,t){return null==e?{}:function(e,t){return Hr(e,t,function(t,n){return ks(e,n)})}(e,t)});function Rs(e,t){if(null==e)return{};var n=Pt(ro(e),function(e){return[e]});return t=so(t),Hr(e,n,function(e,n){return t(e,n[0])})}var Ls=Ki(Es),zs=Ki(Ps);function Ns(e){return null==e?[]:qt(e,Es(e))}var Bs=Di(function(e,t,n){return t=t.toLowerCase(),e+(n?Vs(t):t)});function Vs(e){return Ks(vs(e).toLowerCase())}function Us(e){return(e=vs(e))&&e.replace(ve,en).replace(Ze,"")}var Ws=Di(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),Hs=Di(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),Ys=ji("toLowerCase"),$s=Di(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),Gs=Di(function(e,t,n){return e+(n?" ":"")+Ks(t)}),Xs=Di(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),Ks=ji("toUpperCase");function qs(e,t,r){return e=vs(e),(t=r?n:t)===n?function(e){return tt.test(e)}(e)?function(e){return e.match(Qe)||[]}(e):function(e){return e.match(se)||[]}(e):e.match(t)||[]}var Zs=Kr(function(e,t){try{return _t(e,n,t)}catch(e){return Ka(e)?e:new Ce(e)}}),Js=to(function(e,t){return At(t,function(t){t=Ro(t),ir(e,t,Ia(e[t],e))}),e});function Qs(e){return function(){return e}}var el=zi(),tl=zi(!0);function nl(e){return e}function rl(e){return jr("function"==typeof e?e:sr(e,1))}var il=Kr(function(e,t){return function(n){return Or(n,e,t)}}),ol=Kr(function(e,t){return function(n){return Or(e,n,t)}});function al(e,t,n){var r=Es(t),i=xr(t,r);null!=n||Qa(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=xr(t,Es(t)));var o=!(Qa(n)&&"chain"in n&&!n.chain),a=qa(e);return At(i,function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__);return(n.__actions__=Ii(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Mt([this.value()],arguments))})}),e}function sl(){}var ll=Ui(Pt),cl=Ui(Tt),ul=Ui(Dt);function hl(e){return wo(e)?Wt(Ro(e)):function(e){return function(t){return Cr(t,e)}}(e)}var dl=Hi(),fl=Hi(!0);function pl(){return[]}function gl(){return!1}var ml,vl=Vi(function(e,t){return e+t},0),bl=Gi("ceil"),yl=Vi(function(e,t){return e/t},1),wl=Gi("floor"),xl=Vi(function(e,t){return e*t},1),Cl=Gi("round"),_l=Vi(function(e,t){return e-t},0);return Nn.after=function(e,t){if("function"!=typeof t)throw new Ie(r);return e=fs(e),function(){if(--e<1)return t.apply(this,arguments)}},Nn.ary=ka,Nn.assign=bs,Nn.assignIn=ys,Nn.assignInWith=ws,Nn.assignWith=xs,Nn.at=Cs,Nn.before=Ta,Nn.bind=Ia,Nn.bindAll=Js,Nn.bindKey=Oa,Nn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Wa(e)?e:[e]},Nn.chain=ha,Nn.chunk=function(e,t,r){t=(r?yo(e,t,r):t===n)?1:vn(fs(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var o=0,a=0,s=we(ft(i/t));o<i;)s[a++]=ni(e,o,o+=t);return s},Nn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i},Nn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=we(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return Mt(Wa(n)?Ii(n):[n],mr(t,1))},Nn.cond=function(e){var t=null==e?0:e.length,n=so();return e=t?Pt(e,function(e){if("function"!=typeof e[1])throw new Ie(r);return[n(e[0]),e[1]]}):[],Kr(function(n){for(var r=-1;++r<t;){var i=e[r];if(_t(i[0],this,n))return _t(i[1],this,n)}})},Nn.conforms=function(e){return function(e){var t=Es(e);return function(n){return lr(n,e,t)}}(sr(e,1))},Nn.constant=Qs,Nn.countBy=pa,Nn.create=function(e,t){var n=Bn(e);return null==t?n:rr(n,t)},Nn.curry=function e(t,r,i){var o=qi(t,8,n,n,n,n,n,r=i?n:r);return o.placeholder=e.placeholder,o},Nn.curryRight=function e(t,r,i){var o=qi(t,16,n,n,n,n,n,r=i?n:r);return o.placeholder=e.placeholder,o},Nn.debounce=Ea,Nn.defaults=_s,Nn.defaultsDeep=Ss,Nn.defer=Pa,Nn.delay=Ma,Nn.difference=No,Nn.differenceBy=Bo,Nn.differenceWith=Vo,Nn.drop=function(e,t,r){var i=null==e?0:e.length;return i?ni(e,(t=r||t===n?1:fs(t))<0?0:t,i):[]},Nn.dropRight=function(e,t,r){var i=null==e?0:e.length;return i?ni(e,0,(t=i-(t=r||t===n?1:fs(t)))<0?0:t):[]},Nn.dropRightWhile=function(e,t){return e&&e.length?di(e,so(t,3),!0,!0):[]},Nn.dropWhile=function(e,t){return e&&e.length?di(e,so(t,3),!0):[]},Nn.fill=function(e,t,r,i){var o=null==e?0:e.length;return o?(r&&"number"!=typeof r&&yo(e,t,r)&&(r=0,i=o),function(e,t,r,i){var o=e.length;for((r=fs(r))<0&&(r=-r>o?0:o+r),(i=i===n||i>o?o:fs(i))<0&&(i+=o),i=r>i?0:ps(i);r<i;)e[r++]=t;return e}(e,t,r,i)):[]},Nn.filter=function(e,t){return(Wa(e)?It:gr)(e,so(t,3))},Nn.flatMap=function(e,t){return mr(Ca(e,t),1)},Nn.flatMapDeep=function(e,t){return mr(Ca(e,t),c)},Nn.flatMapDepth=function(e,t,r){return r=r===n?1:fs(r),mr(Ca(e,t),r)},Nn.flatten=Ho,Nn.flattenDeep=function(e){return null!=e&&e.length?mr(e,c):[]},Nn.flattenDepth=function(e,t){return null!=e&&e.length?mr(e,t=t===n?1:fs(t)):[]},Nn.flip=function(e){return qi(e,512)},Nn.flow=el,Nn.flowRight=tl,Nn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},Nn.functions=function(e){return null==e?[]:xr(e,Es(e))},Nn.functionsIn=function(e){return null==e?[]:xr(e,Ps(e))},Nn.groupBy=ya,Nn.initial=function(e){return null!=e&&e.length?ni(e,0,-1):[]},Nn.intersection=$o,Nn.intersectionBy=Go,Nn.intersectionWith=Xo,Nn.invert=Ts,Nn.invertBy=Is,Nn.invokeMap=wa,Nn.iteratee=rl,Nn.keyBy=xa,Nn.keys=Es,Nn.keysIn=Ps,Nn.map=Ca,Nn.mapKeys=function(e,t){var n={};return t=so(t,3),yr(e,function(e,r,i){ir(n,t(e,r,i),e)}),n},Nn.mapValues=function(e,t){var n={};return t=so(t,3),yr(e,function(e,r,i){ir(n,r,t(e,r,i))}),n},Nn.matches=function(e){return Nr(sr(e,1))},Nn.matchesProperty=function(e,t){return Br(e,sr(t,1))},Nn.memoize=Fa,Nn.merge=Ms,Nn.mergeWith=Fs,Nn.method=il,Nn.methodOf=ol,Nn.mixin=al,Nn.negate=ja,Nn.nthArg=function(e){return e=fs(e),Kr(function(t){return Ur(t,e)})},Nn.omit=js,Nn.omitBy=function(e,t){return Rs(e,ja(so(t)))},Nn.once=function(e){return Ta(2,e)},Nn.orderBy=function(e,t,r,i){return null==e?[]:(Wa(t)||(t=null==t?[]:[t]),Wa(r=i?n:r)||(r=null==r?[]:[r]),Wr(e,t,r))},Nn.over=ll,Nn.overArgs=Da,Nn.overEvery=cl,Nn.overSome=ul,Nn.partial=Ra,Nn.partialRight=La,Nn.partition=_a,Nn.pick=Ds,Nn.pickBy=Rs,Nn.property=hl,Nn.propertyOf=function(e){return function(t){return null==e?n:Cr(e,t)}},Nn.pull=qo,Nn.pullAll=Zo,Nn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Yr(e,t,so(n,2)):e},Nn.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?Yr(e,t,n,r):e},Nn.pullAt=Jo,Nn.range=dl,Nn.rangeRight=fl,Nn.rearg=za,Nn.reject=function(e,t){return(Wa(e)?It:gr)(e,ja(so(t,3)))},Nn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=so(t,3);++r<o;){var a=e[r];t(a,r,e)&&(n.push(a),i.push(r))}return $r(e,i),n},Nn.rest=function(e,t){if("function"!=typeof e)throw new Ie(r);return Kr(e,t=t===n?t:fs(t))},Nn.reverse=Qo,Nn.sampleSize=function(e,t,r){return t=(r?yo(e,t,r):t===n)?1:fs(t),(Wa(e)?Zn:Zr)(e,t)},Nn.set=function(e,t,n){return null==e?e:Jr(e,t,n)},Nn.setWith=function(e,t,r,i){return i="function"==typeof i?i:n,null==e?e:Jr(e,t,r,i)},Nn.shuffle=function(e){return(Wa(e)?Jn:ti)(e)},Nn.slice=function(e,t,r){var i=null==e?0:e.length;return i?(r&&"number"!=typeof r&&yo(e,t,r)?(t=0,r=i):(t=null==t?0:fs(t),r=r===n?i:fs(r)),ni(e,t,r)):[]},Nn.sortBy=Sa,Nn.sortedUniq=function(e){return e&&e.length?ai(e):[]},Nn.sortedUniqBy=function(e,t){return e&&e.length?ai(e,so(t,2)):[]},Nn.split=function(e,t,r){return r&&"number"!=typeof r&&yo(e,t,r)&&(t=r=n),(r=r===n?d:r>>>0)?(e=vs(e))&&("string"==typeof t||null!=t&&!is(t))&&!(t=li(t))&&rn(e)?wi(dn(e),0,r):e.split(t,r):[]},Nn.spread=function(e,t){if("function"!=typeof e)throw new Ie(r);return t=null==t?0:vn(fs(t),0),Kr(function(n){var r=n[t],i=wi(n,0,t);return r&&Mt(i,r),_t(e,this,i)})},Nn.tail=function(e){var t=null==e?0:e.length;return t?ni(e,1,t):[]},Nn.take=function(e,t,r){return e&&e.length?ni(e,0,(t=r||t===n?1:fs(t))<0?0:t):[]},Nn.takeRight=function(e,t,r){var i=null==e?0:e.length;return i?ni(e,(t=i-(t=r||t===n?1:fs(t)))<0?0:t,i):[]},Nn.takeRightWhile=function(e,t){return e&&e.length?di(e,so(t,3),!1,!0):[]},Nn.takeWhile=function(e,t){return e&&e.length?di(e,so(t,3)):[]},Nn.tap=function(e,t){return t(e),e},Nn.throttle=function(e,t,n){var i=!0,o=!0;if("function"!=typeof e)throw new Ie(r);return Qa(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),Ea(e,t,{leading:i,maxWait:t,trailing:o})},Nn.thru=da,Nn.toArray=hs,Nn.toPairs=Ls,Nn.toPairsIn=zs,Nn.toPath=function(e){return Wa(e)?Pt(e,Ro):ss(e)?[e]:Ii(Do(vs(e)))},Nn.toPlainObject=ms,Nn.transform=function(e,t,n){var r=Wa(e),i=r||Ga(e)||ls(e);if(t=so(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:Qa(e)&&qa(o)?Bn(Ye(e)):{}}return(i?At:yr)(e,function(e,r,i){return t(n,e,r,i)}),n},Nn.unary=function(e){return ka(e,1)},Nn.union=ea,Nn.unionBy=ta,Nn.unionWith=na,Nn.uniq=function(e){return e&&e.length?ci(e):[]},Nn.uniqBy=function(e,t){return e&&e.length?ci(e,so(t,2)):[]},Nn.uniqWith=function(e,t){return t="function"==typeof t?t:n,e&&e.length?ci(e,n,t):[]},Nn.unset=function(e,t){return null==e||ui(e,t)},Nn.unzip=ra,Nn.unzipWith=ia,Nn.update=function(e,t,n){return null==e?e:hi(e,t,vi(n))},Nn.updateWith=function(e,t,r,i){return i="function"==typeof i?i:n,null==e?e:hi(e,t,vi(r),i)},Nn.values=Ns,Nn.valuesIn=function(e){return null==e?[]:qt(e,Ps(e))},Nn.without=oa,Nn.words=qs,Nn.wrap=function(e,t){return Ra(vi(t),e)},Nn.xor=aa,Nn.xorBy=sa,Nn.xorWith=la,Nn.zip=ca,Nn.zipObject=function(e,t){return gi(e||[],t||[],er)},Nn.zipObjectDeep=function(e,t){return gi(e||[],t||[],Jr)},Nn.zipWith=ua,Nn.entries=Ls,Nn.entriesIn=zs,Nn.extend=ys,Nn.extendWith=ws,al(Nn,Nn),Nn.add=vl,Nn.attempt=Zs,Nn.camelCase=Bs,Nn.capitalize=Vs,Nn.ceil=bl,Nn.clamp=function(e,t,r){return r===n&&(r=t,t=n),r!==n&&(r=(r=gs(r))==r?r:0),t!==n&&(t=(t=gs(t))==t?t:0),ar(gs(e),t,r)},Nn.clone=function(e){return sr(e,4)},Nn.cloneDeep=function(e){return sr(e,5)},Nn.cloneDeepWith=function(e,t){return sr(e,5,t="function"==typeof t?t:n)},Nn.cloneWith=function(e,t){return sr(e,4,t="function"==typeof t?t:n)},Nn.conformsTo=function(e,t){return null==t||lr(e,t,Es(t))},Nn.deburr=Us,Nn.defaultTo=function(e,t){return null==e||e!=e?t:e},Nn.divide=yl,Nn.endsWith=function(e,t,r){e=vs(e),t=li(t);var i=e.length,o=r=r===n?i:ar(fs(r),0,i);return(r-=t.length)>=0&&e.slice(r,o)==t},Nn.eq=Na,Nn.escape=function(e){return(e=vs(e))&&G.test(e)?e.replace(Y,tn):e},Nn.escapeRegExp=function(e){return(e=vs(e))&&te.test(e)?e.replace(ee,"\\$&"):e},Nn.every=function(e,t,r){var i=Wa(e)?Tt:fr;return r&&yo(e,t,r)&&(t=n),i(e,so(t,3))},Nn.find=ga,Nn.findIndex=Uo,Nn.findKey=function(e,t){return Lt(e,so(t,3),yr)},Nn.findLast=ma,Nn.findLastIndex=Wo,Nn.findLastKey=function(e,t){return Lt(e,so(t,3),wr)},Nn.floor=wl,Nn.forEach=va,Nn.forEachRight=ba,Nn.forIn=function(e,t){return null==e?e:vr(e,so(t,3),Ps)},Nn.forInRight=function(e,t){return null==e?e:br(e,so(t,3),Ps)},Nn.forOwn=function(e,t){return e&&yr(e,so(t,3))},Nn.forOwnRight=function(e,t){return e&&wr(e,so(t,3))},Nn.get=As,Nn.gt=Ba,Nn.gte=Va,Nn.has=function(e,t){return null!=e&&go(e,t,kr)},Nn.hasIn=ks,Nn.head=Yo,Nn.identity=nl,Nn.includes=function(e,t,n,r){e=Ya(e)?e:Ns(e),n=n&&!r?fs(n):0;var i=e.length;return n<0&&(n=vn(i+n,0)),as(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Nt(e,t,n)>-1},Nn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:fs(n);return i<0&&(i=vn(r+i,0)),Nt(e,t,i)},Nn.inRange=function(e,t,r){return t=ds(t),r===n?(r=t,t=0):r=ds(r),function(e,t,n){return e>=bn(t,n)&&e<vn(t,n)}(e=gs(e),t,r)},Nn.invoke=Os,Nn.isArguments=Ua,Nn.isArray=Wa,Nn.isArrayBuffer=Ha,Nn.isArrayLike=Ya,Nn.isArrayLikeObject=$a,Nn.isBoolean=function(e){return!0===e||!1===e||es(e)&&Sr(e)==m},Nn.isBuffer=Ga,Nn.isDate=Xa,Nn.isElement=function(e){return es(e)&&1===e.nodeType&&!rs(e)},Nn.isEmpty=function(e){if(null==e)return!0;if(Ya(e)&&(Wa(e)||"string"==typeof e||"function"==typeof e.splice||Ga(e)||ls(e)||Ua(e)))return!e.length;var t=po(e);if(t==x||t==k)return!e.size;if(_o(e))return!Dr(e).length;for(var n in e)if(je.call(e,n))return!1;return!0},Nn.isEqual=function(e,t){return Pr(e,t)},Nn.isEqualWith=function(e,t,r){var i=(r="function"==typeof r?r:n)?r(e,t):n;return i===n?Pr(e,t,n,r):!!i},Nn.isError=Ka,Nn.isFinite=function(e){return"number"==typeof e&&Ht(e)},Nn.isFunction=qa,Nn.isInteger=Za,Nn.isLength=Ja,Nn.isMap=ts,Nn.isMatch=function(e,t){return e===t||Mr(e,t,co(t))},Nn.isMatchWith=function(e,t,r){return r="function"==typeof r?r:n,Mr(e,t,co(t),r)},Nn.isNaN=function(e){return ns(e)&&e!=+e},Nn.isNative=function(e){if(Co(e))throw new Ce("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Fr(e)},Nn.isNil=function(e){return null==e},Nn.isNull=function(e){return null===e},Nn.isNumber=ns,Nn.isObject=Qa,Nn.isObjectLike=es,Nn.isPlainObject=rs,Nn.isRegExp=is,Nn.isSafeInteger=function(e){return Za(e)&&e>=-9007199254740991&&e<=u},Nn.isSet=os,Nn.isString=as,Nn.isSymbol=ss,Nn.isTypedArray=ls,Nn.isUndefined=function(e){return e===n},Nn.isWeakMap=function(e){return es(e)&&po(e)==O},Nn.isWeakSet=function(e){return es(e)&&"[object WeakSet]"==Sr(e)},Nn.join=function(e,t){return null==e?"":cn.call(e,t)},Nn.kebabCase=Ws,Nn.last=Ko,Nn.lastIndexOf=function(e,t,r){var i=null==e?0:e.length;if(!i)return-1;var o=i;return r!==n&&(o=(o=fs(r))<0?vn(i+o,0):bn(o,i-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,o):zt(e,Vt,o,!0)},Nn.lowerCase=Hs,Nn.lowerFirst=Ys,Nn.lt=cs,Nn.lte=us,Nn.max=function(e){return e&&e.length?pr(e,nl,Ar):n},Nn.maxBy=function(e,t){return e&&e.length?pr(e,so(t,2),Ar):n},Nn.mean=function(e){return Ut(e,nl)},Nn.meanBy=function(e,t){return Ut(e,so(t,2))},Nn.min=function(e){return e&&e.length?pr(e,nl,Lr):n},Nn.minBy=function(e,t){return e&&e.length?pr(e,so(t,2),Lr):n},Nn.stubArray=pl,Nn.stubFalse=gl,Nn.stubObject=function(){return{}},Nn.stubString=function(){return""},Nn.stubTrue=function(){return!0},Nn.multiply=xl,Nn.nth=function(e,t){return e&&e.length?Ur(e,fs(t)):n},Nn.noConflict=function(){return ht._===this&&(ht._=Ne),this},Nn.noop=sl,Nn.now=Aa,Nn.pad=function(e,t,n){e=vs(e);var r=(t=fs(t))?hn(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Wi(gt(i),n)+e+Wi(ft(i),n)},Nn.padEnd=function(e,t,n){e=vs(e);var r=(t=fs(t))?hn(e):0;return t&&r<t?e+Wi(t-r,n):e},Nn.padStart=function(e,t,n){e=vs(e);var r=(t=fs(t))?hn(e):0;return t&&r<t?Wi(t-r,n)+e:e},Nn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),wn(vs(e).replace(ne,""),t||0)},Nn.random=function(e,t,r){if(r&&"boolean"!=typeof r&&yo(e,t,r)&&(t=r=n),r===n&&("boolean"==typeof t?(r=t,t=n):"boolean"==typeof e&&(r=e,e=n)),e===n&&t===n?(e=0,t=1):(e=ds(e),t===n?(t=e,e=0):t=ds(t)),e>t){var i=e;e=t,t=i}if(r||e%1||t%1){var o=xn();return bn(e+o*(t-e+st("1e-"+((o+"").length-1))),t)}return Gr(e,t)},Nn.reduce=function(e,t,n){var r=Wa(e)?Ft:Yt,i=arguments.length<3;return r(e,so(t,4),n,i,hr)},Nn.reduceRight=function(e,t,n){var r=Wa(e)?jt:Yt,i=arguments.length<3;return r(e,so(t,4),n,i,dr)},Nn.repeat=function(e,t,r){return t=(r?yo(e,t,r):t===n)?1:fs(t),Xr(vs(e),t)},Nn.replace=function(){var e=arguments,t=vs(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Nn.result=function(e,t,r){var i=-1,o=(t=bi(t,e)).length;for(o||(o=1,e=n);++i<o;){var a=null==e?n:e[Ro(t[i])];a===n&&(i=o,a=r),e=qa(a)?a.call(e):a}return e},Nn.round=Cl,Nn.runInContext=e,Nn.sample=function(e){return(Wa(e)?qn:qr)(e)},Nn.size=function(e){if(null==e)return 0;if(Ya(e))return as(e)?hn(e):e.length;var t=po(e);return t==x||t==k?e.size:Dr(e).length},Nn.snakeCase=$s,Nn.some=function(e,t,r){var i=Wa(e)?Dt:ri;return r&&yo(e,t,r)&&(t=n),i(e,so(t,3))},Nn.sortedIndex=function(e,t){return ii(e,t)},Nn.sortedIndexBy=function(e,t,n){return oi(e,t,so(n,2))},Nn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=ii(e,t);if(r<n&&Na(e[r],t))return r}return-1},Nn.sortedLastIndex=function(e,t){return ii(e,t,!0)},Nn.sortedLastIndexBy=function(e,t,n){return oi(e,t,so(n,2),!0)},Nn.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=ii(e,t,!0)-1;if(Na(e[n],t))return n}return-1},Nn.startCase=Gs,Nn.startsWith=function(e,t,n){return e=vs(e),n=null==n?0:ar(fs(n),0,e.length),t=li(t),e.slice(n,n+t.length)==t},Nn.subtract=_l,Nn.sum=function(e){return e&&e.length?$t(e,nl):0},Nn.sumBy=function(e,t){return e&&e.length?$t(e,so(t,2)):0},Nn.template=function(e,t,r){var i=Nn.templateSettings;r&&yo(e,t,r)&&(t=n),e=vs(e),t=ws({},t,i,Zi);var o,a,s=ws({},t.imports,i.imports,Zi),l=Es(s),c=qt(s,l),u=0,h=t.interpolate||be,d="__p += '",f=ke((t.escape||be).source+"|"+h.source+"|"+(h===q?ue:be).source+"|"+(t.evaluate||be).source+"|$","g"),p="//# sourceURL="+(je.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++rt+"]")+"\n";e.replace(f,function(t,n,r,i,s,l){return r||(r=i),d+=e.slice(u,l).replace(ye,nn),n&&(o=!0,d+="' +\n__e("+n+") +\n'"),s&&(a=!0,d+="';\n"+s+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),u=l+t.length,t}),d+="';\n";var g=je.call(t,"variable")&&t.variable;if(g){if(le.test(g))throw new Ce("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(a?d.replace(V,""):d).replace(U,"$1").replace(W,"$1;"),d="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var m=Zs(function(){return _e(l,p+"return "+d).apply(n,c)});if(m.source=d,Ka(m))throw m;return m},Nn.times=function(e,t){if((e=fs(e))<1||e>u)return[];var n=d,r=bn(e,d);t=so(t),e-=d;for(var i=Gt(r,t);++n<e;)t(n);return i},Nn.toFinite=ds,Nn.toInteger=fs,Nn.toLength=ps,Nn.toLower=function(e){return vs(e).toLowerCase()},Nn.toNumber=gs,Nn.toSafeInteger=function(e){return e?ar(fs(e),-9007199254740991,u):0===e?e:0},Nn.toString=vs,Nn.toUpper=function(e){return vs(e).toUpperCase()},Nn.trim=function(e,t,r){if((e=vs(e))&&(r||t===n))return Xt(e);if(!e||!(t=li(t)))return e;var i=dn(e),o=dn(t);return wi(i,Jt(i,o),Qt(i,o)+1).join("")},Nn.trimEnd=function(e,t,r){if((e=vs(e))&&(r||t===n))return e.slice(0,fn(e)+1);if(!e||!(t=li(t)))return e;var i=dn(e);return wi(i,0,Qt(i,dn(t))+1).join("")},Nn.trimStart=function(e,t,r){if((e=vs(e))&&(r||t===n))return e.replace(ne,"");if(!e||!(t=li(t)))return e;var i=dn(e);return wi(i,Jt(i,dn(t))).join("")},Nn.truncate=function(e,t){var r=30,i="...";if(Qa(t)){var o="separator"in t?t.separator:o;r="length"in t?fs(t.length):r,i="omission"in t?li(t.omission):i}var a=(e=vs(e)).length;if(rn(e)){var s=dn(e);a=s.length}if(r>=a)return e;var l=r-hn(i);if(l<1)return i;var c=s?wi(s,0,l).join(""):e.slice(0,l);if(o===n)return c+i;if(s&&(l+=c.length-l),is(o)){if(e.slice(l).search(o)){var u,h=c;for(o.global||(o=ke(o.source,vs(he.exec(o))+"g")),o.lastIndex=0;u=o.exec(h);)var d=u.index;c=c.slice(0,d===n?l:d)}}else if(e.indexOf(li(o),l)!=l){var f=c.lastIndexOf(o);f>-1&&(c=c.slice(0,f))}return c+i},Nn.unescape=function(e){return(e=vs(e))&&$.test(e)?e.replace(H,pn):e},Nn.uniqueId=function(e){var t=++De;return vs(e)+t},Nn.upperCase=Xs,Nn.upperFirst=Ks,Nn.each=va,Nn.eachRight=ba,Nn.first=Yo,al(Nn,(ml={},yr(Nn,function(e,t){je.call(Nn.prototype,t)||(ml[t]=e)}),ml),{chain:!1}),Nn.VERSION="4.17.21",At(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){Nn[e].placeholder=Nn}),At(["drop","take"],function(e,t){Wn.prototype[e]=function(r){r=r===n?1:vn(fs(r),0);var i=this.__filtered__&&!t?new Wn(this):this.clone();return i.__filtered__?i.__takeCount__=bn(r,i.__takeCount__):i.__views__.push({size:bn(r,d),type:e+(i.__dir__<0?"Right":"")}),i},Wn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),At(["filter","map","takeWhile"],function(e,t){var n=t+1,r=1==n||3==n;Wn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:so(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}}),At(["head","last"],function(e,t){var n="take"+(t?"Right":"");Wn.prototype[e]=function(){return this[n](1).value()[0]}}),At(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");Wn.prototype[e]=function(){return this.__filtered__?new Wn(this):this[n](1)}}),Wn.prototype.compact=function(){return this.filter(nl)},Wn.prototype.find=function(e){return this.filter(e).head()},Wn.prototype.findLast=function(e){return this.reverse().find(e)},Wn.prototype.invokeMap=Kr(function(e,t){return"function"==typeof e?new Wn(this):this.map(function(n){return Or(n,e,t)})}),Wn.prototype.reject=function(e){return this.filter(ja(so(e)))},Wn.prototype.slice=function(e,t){e=fs(e);var r=this;return r.__filtered__&&(e>0||t<0)?new Wn(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==n&&(r=(t=fs(t))<0?r.dropRight(-t):r.take(t-e)),r)},Wn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Wn.prototype.toArray=function(){return this.take(d)},yr(Wn.prototype,function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),o=Nn[i?"take"+("last"==t?"Right":""):t],a=i||/^find/.test(t);o&&(Nn.prototype[t]=function(){var t=this.__wrapped__,s=i?[1]:arguments,l=t instanceof Wn,c=s[0],u=l||Wa(t),h=function(e){var t=o.apply(Nn,Mt([e],s));return i&&d?t[0]:t};u&&r&&"function"==typeof c&&1!=c.length&&(l=u=!1);var d=this.__chain__,f=!!this.__actions__.length,p=a&&!d,g=l&&!f;if(!a&&u){t=g?t:new Wn(this);var m=e.apply(t,s);return m.__actions__.push({func:da,args:[h],thisArg:n}),new Un(m,d)}return p&&g?e.apply(this,s):(m=this.thru(h),p?i?m.value()[0]:m.value():m)})}),At(["pop","push","shift","sort","splice","unshift"],function(e){var t=Oe[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Nn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Wa(i)?i:[],e)}return this[n](function(n){return t.apply(Wa(n)?n:[],e)})}}),yr(Wn.prototype,function(e,t){var n=Nn[t];if(n){var r=n.name+"";je.call(En,r)||(En[r]=[]),En[r].push({name:t,func:n})}}),En[Ni(n,2).name]=[{name:"wrapper",func:n}],Wn.prototype.clone=function(){var e=new Wn(this.__wrapped__);return e.__actions__=Ii(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ii(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ii(this.__views__),e},Wn.prototype.reverse=function(){if(this.__filtered__){var e=new Wn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Wn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Wa(e),r=t<0,i=n?e.length:0,o=function(e,t,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=bn(t,e+a);break;case"takeRight":e=vn(e,t-a)}}return{start:e,end:t}}(0,i,this.__views__),a=o.start,s=o.end,l=s-a,c=r?s:a-1,u=this.__iteratees__,h=u.length,d=0,f=bn(l,this.__takeCount__);if(!n||!r&&i==l&&f==l)return fi(e,this.__actions__);var p=[];e:for(;l--&&d<f;){for(var g=-1,m=e[c+=t];++g<h;){var v=u[g],b=v.iteratee,y=v.type,w=b(m);if(2==y)m=w;else if(!w){if(1==y)continue e;break e}}p[d++]=m}return p},Nn.prototype.at=fa,Nn.prototype.chain=function(){return ha(this)},Nn.prototype.commit=function(){return new Un(this.value(),this.__chain__)},Nn.prototype.next=function(){this.__values__===n&&(this.__values__=hs(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?n:this.__values__[this.__index__++]}},Nn.prototype.plant=function(e){for(var t,r=this;r instanceof Vn;){var i=zo(r);i.__index__=0,i.__values__=n,t?o.__wrapped__=i:t=i;var o=i;r=r.__wrapped__}return o.__wrapped__=e,t},Nn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Wn){var t=e;return this.__actions__.length&&(t=new Wn(this)),(t=t.reverse()).__actions__.push({func:da,args:[Qo],thisArg:n}),new Un(t,this.__chain__)}return this.thru(Qo)},Nn.prototype.toJSON=Nn.prototype.valueOf=Nn.prototype.value=function(){return fi(this.__wrapped__,this.__actions__)},Nn.prototype.first=Nn.prototype.head,Je&&(Nn.prototype[Je]=function(){return this}),Nn}();ft?((ft.exports=gn)._=gn,dt._=gn):ht._=gn}).call($r)}(Yr,Yr.exports)),Yr.exports);const Xr="my_files",Kr="gif",qr="stock_images",Zr="ai",Jr="editor",Qr=!1,ei=["jpg","jpeg","png","gif","bmp","webp","svg","ico","tiff","tif"],ti="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQABLAEsAAD/4QCMRXhpZgAATU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAIdpAAQAAAABAAAAWgAAAAAAAAEsAAAAAQAAASwAAAABAAOgAQADAAAAAQABAACgAgAEAAAAAQAAAQOgAwAEAAAAAQAAAMoAAAAA/+EJ2Wh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8APD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNi4wLjAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1wTU06RG9jdW1lbnRJRD0iYWRvYmU6ZG9jaWQ6c3RvY2s6Mzk2MmU4NTQtNjA1NC00MGZmLWEwYzMtYjJkNjcwMzQ2OWFhIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOmE5M2NiZTgyLWI5NjEtNGUzNS1iYmQ0LWJjZWE1Zjc1YTQwZiIvPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDw/eHBhY2tldCBlbmQ9InciPz4A/+0AOFBob3Rvc2hvcCAzLjAAOEJJTQQEAAAAAAAAOEJJTQQlAAAAAAAQ1B2M2Y8AsgTpgAmY7PhCfv/AABEIAMoBAwMBIgACEQADEQD/xAAfAAABBQEBAQEBAQAAAAAAAAAAAQIDBAUGBwgJCgv/xAC1EAACAQMDAgQDBQUEBAAAAX0BAgMABBEFEiExQQYTUWEHInEUMoGRoQgjQrHBFVLR8CQzYnKCCQoWFxgZGiUmJygpKjQ1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4eLj5OXm5+jp6vHy8/T19vf4+fr/xAAfAQADAQEBAQEBAQEBAAAAAAAAAQIDBAUGBwgJCgv/xAC1EQACAQIEBAMEBwUEBAABAncAAQIDEQQFITEGEkFRB2FxEyIygQgUQpGhscEJIzNS8BVictEKFiQ04SXxFxgZGiYnKCkqNTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqCg4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2dri4+Tl5ufo6ery8/T19vf4+fr/2wBDAAUDBAQEAwUEBAQFBQUGBwwIBwcHBw8LCwkMEQ8SEhEPERETFhwXExQaFRERGCEYGh0dHx8fExciJCIeJBweHx7/3QAEABH/2gAMAwEAAhEDEQA/APsuiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAoqG7uIbWB55nCooyTS208VxCssLh0boRQBLRRRQAUUUUAFFFFAH/9D7LooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAqG7uIrWBppnCoo5Jou7iK1gaaZwqKM5NcRq2oXOsXqxQq2wnEcYPX3NABq2oXOr3qwxK3l5xHGO/ua6nw7pzadZ7ZJGaR+WBPA9hUfh7R49Pi82TDXDDkkfd9hWxQAUUUUAFFFFABRRRQB//9H7LooooAKKKKACiiuOv/EOpQX88KNDsSQqMp6H60AdjRXD/wDCTapn70P/AH7/APr0f8JPqn96H/v3/wDXoA7iiuH/AOEn1T+9D/37/wDr0f8ACT6p/eh/79//AF6AO4orh/8AhJ9U/vQ/9+//AK9H/CT6p/eh/wC/f/16AO4orh/+En1T+9D/AN+//r0f8JPqn96H/v3/APXoA7iiuH/4SfVP70P/AH7/APr0f8JPqn96H/v3/wDXoA7iiuH/AOEn1T+9D/37/wDr0f8ACT6p/eh/79//AF6AO4orh/8AhJ9U/vQ/9+//AK9H/CT6p/eh/wC/f/16AO4orh/+En1T+9D/AN+//r0f8JPqn96H/v3/APXoA7iobq4itYHmncIijJJrE0jUdQlt2v8AUJIYrNVyMJgv9Oaw9X1C51e8WGJWMecRxr39zQAatqNzq94kUasELYjjB6/Wul8P6NHp8Qlkw1ww5P8Ad9hWRmDw9bfwTajIv4Riqw8Tap6wf98f/XoA7elrh/8AhJtU/vQ/9+//AK9avhnWL3UL94bgx7BGWG1cdwPX3oA6OiiigAooooAKKKKAP//S+y6KKKACiiigArgHAbxSVYAg3mCD3+eu/rgT/wAjV/2+f+z0Adt9jtMf8esH/fsUfY7T/n1g/wC/Yqeh2CIWY4AGSaAK7WlmqktbQADkkxr/AIVUe50JJPLZ7EN6YWuX17WJr+dkRylurYVQfve5rKJoA9Ghh0+Zd0MVtIvqqKaf9jtP+fWD/v2K89sry4sphLbyFD3HY/Wu+0e9TULFLhQATww9DQBJ9jtP+fWD/v2KattZM7ILe3LL94bF4p99cx2lpJcS/dRc/X2rjdG1eSLWmuZ2Oy4bEnoPQ/hQB2P2O0/59YP+/Yo+x2n/AD6wf9+xU4IPSloAr/Y7T/n1g/79ij7Haf8APrB/37FWKKAK/wBjtP8An1g/79ij7Haf8+sH/fsVYooAr/Y7T/n1g/79ioruPTrWBppoLdUUckxj/Cp7u4itYGnmcKijJJriNX1C61i9EUKtsziOMHr7mgBNVv7jVrxYII/3YOIYl/ma6bw9o8enxCSTD3DDkn+H2FHh/R49Pi8yTDXDDkkfd9hWxQBC9rbOxZ7eJmPUlATTfsdp/wA+sH/fsVYooAztXtbVdLumW3hBELkEIOPlNc74H/5Csv8A1xP8xXUaz/yCbz/ri/8A6Ca5fwP/AMhaX/rif5igDs6KKKACiiigAooooA//0/suiiigAooooAK4E/8AI1f9vn/s9d9XAn/kav8At8/9noA72s/xI7R6HdMpwdmPzODWhUN/ALqymt26SIVoA816UlS3ML207wSrtdCQai+lAC11HgN2xdx4+XKH6Hn/AArl++K6jSv+JN4flvJhiWfBRe/Tj+ZNAEHjLUfOnFjEw2R/NJju3Yfl/Oudp0jtJIzucsxJJ96bQB2/hLUftdkLeRh50OF+q9jW3XnOkXrWF/HcDJUHDjPUV6HDIssSSIQVYAg0APooooAKhu7iK1gaeZwqKM5NF3cQ2sDTTOFRRk5riNW1C51i9WKJW8vOI4x39zQAavqF1rF6IYVbZnEcYPX3NdL4e0ePT4hLIA1w45JH3fYUeHtHj0+LzJcNcMOTj7vsK2KACiiigAooooAqaz/yCbz/AK4v/wCgmuX8D/8AIWl/64n+YrqNZ/5BN5/1xf8A9BNcv4H/AOQtL/1xP8xQB2dFFFABRRRQAUUUUAf/1PsuiiigAooooAK4E/8AI1f9vn/s9d9XAn/kav8At8/9noA72lpKWgDO1bSLXUQDKCsg6OvX/wCvWFJ4Tn3fJdxFc8FkOa66igDC0zw3a2riadzPIOeRhR+FYXinUPtl+Yoz+5h+VcdCe5/p+FdH4n1H7DYFYziaX5U9vU1wn40AFFFFABXW+DNR3xtp8x+ZPmjyeo7j/PrXJVNZzva3UdxG2HjbP/1qAPTKhu7iK2gaaZwqKOSahTULf+zFv3bZEybsmuP1XULnV70QxK3l7sRxr39zQAmrahc6xerFEreXnEcY7+5rpfD2jx6fF5suGuGHJx932FHh7R49PiEkuGuGHJ/u+wrYoAKKKKACiiigAooooAqaz/yCbz/ri/8A6Ca5fwP/AMhaX/rif5iuo1n/AJBN5/1xf/0E1y/gf/kLS/8AXE/zFAHZ0UUUAFFFFABRRRQB/9X7LooooAKKKKACuBP/ACNX/b5/7PXfVwJ/5Gr/ALfP/Z6AO9paSloAKazBVZicBRkmnVz3jHUfs9qLOJsSy/ex2XvQBzuu351DUXlDfu1+WMewqhRRQAUUUv40AFbGi6ZG8TahqB8uzTkA9ZP/AK1Gi6ZG8TajqJ2WcfIB/wCWn/1qi1W+uNWu0hhQiIHbFEv86ADU7+fVbpIIU2xZ2xRL/M103h7R00+LzZcPcMOTj7vsKyCYfD9sQNsupSr+EY/z+ddDot8uoWCTj7/Rx6N3oAvUUUUAFZ17rFta6jDZydZPvNnhPTNSaxqEWn2bTv8AM3RF9TXntxLJPK8sp3O5yx9TQB6dmlrA8Kar9qg+yzt+/jHBP8QrfoAKKKKAKms/8gm8/wCuL/8AoJrl/A//ACFpf+uJ/mK6jWf+QTef9cX/APQTXL+B/wDkLS/9cT/MUAdnRRRQAUUUUAFFFFAH/9b7LooooAKKKKACuBP/ACNX/b5/7PXfVwJ/5Gr/ALfP/Z6AO9paSloAjuZo7eB5pThEGSa851G6e9vJLl+rngeg7Ct/xpqOWXT4m6fNLj9B/X8q5mgBKKKO9AADzWzoumRvEdQ1A7LOPkA/8tP/AK1JoulxvE2oagQlnHyAf+Wn/wBaotVv59WukhhjIizthiX+dABql/catdJBDGRHnbDEv86vkweH7bHyy6jKv4Rj/P8An0UmDw/bEfLLqMq/hGP8/n/Ln5JHlkaSRi7scsx70AEkjySNLIxd2OWY961fCuo/Y78RSNiGY7T7Hsax6WgD1EGmyuscbSOwVVBJPoKy/DGofbrABzmaLCvk9fQ1k+MNU3MdPgY4X/WkevpQBla7qLajel84iTiMe3rWdS0lAEtrPJbXMdxC2HQ5HvXoWlXsd/ZpPGevDD0PevOK0/D2pHTr0FiTBJgOP60Ad/RTUYOoZSCCMg06gCprP/IJvP8Ari//AKCa5fwP/wAhaX/rif5iuo1n/kE3n/XF/wD0E1y/gf8A5C0v/XE/zFAHZ0UUUAFFFFABRRRQB//X+y6KKKACiiigArgT/wAjV/2+f+z131cCf+Rq/wC3z/2egDvarapeJY2Mlw/8I+UZ6nsKs1xni7UftN39ljb91Eecd2/z/WgDFnlknmeaRsu5JJqOigdeKAFrX0XS43iOoagQlnHyAf8Alp/9al0XTI3ibUNQISzj5Ab/AJaf/WqHVb+41a6SGGMrEDtiiX+dAC6rfT6tdJBChEWdsMS/zq+TB4ftj92XUZV/CMf5/P8AkhMPh+2x8suoyr+EY/z+f8sCSR5ZGlkYu7HLMe9ABJI8sjSSMXdjlmPemUUUAFLSUUAWtOvp7CZ5YD8zIVOenNVmJZixJJPUmkooAKKKKAClFJRQB1Pg/VOBp87Dj/VEn9K6jPFeYRs0bh0JDqQQR2Nd7oGpJqNkGJxKnEg/rQBY1n/kE3n/AFxf/wBBNcv4H/5C0v8A1xP8xXUaz/yCbz/ri/8A6Ca5fwP/AMhaX/rif5igDs6KKKACiiigAooooA//0PsuiiigAooooAK4E/8AI1f9vn/s9d8a89u5RB4hlnYEiO5LkDvhs0Adtq808Ni7W0TyTEbUCjkE964c6TqhJJspyTySVroB4stsY+xzf99Cj/hK7X/nzl/76FAHPnSdTx/x4z/981d0zRvL33eqr5NtFztbq5/wro7PVo5rF72SB7eBfutIcbvpXLatqFzq94IokYpnEca859zQAmq31xq12sEEZEQOIol/nWxBYzaPZeZBavc30oxlVyIxUVsbLw6i+epuL1wCyp/AP6VY/wCEstv+fSb/AL6FAGBLpmrSyNJJZ3DuxyzFetN/sjU/+fGf/vmug/4Su1/585f++hR/wldr/wA+cv8A30KAOf8A7I1P/nxn/wC+aP7I1P8A58Z/++a6D/hK7X/nzl/76FH/AAldr/z5y/8AfQoA5/8AsjU/+fGf/vmj+yNT/wCfGf8A75roP+Ertf8Anzl/76FH/CV2v/PnL/30KAOf/sjU/wDnxn/75o/sjU/+fGf/AL5roP8AhK7X/nzl/wC+hR/wldr/AM+cv/fQoA5/+yNT/wCfGf8A75o/sjU/+fGf/vmug/4Su1/585f++hR/wldr/wA+cv8A30KAOf8A7I1P/nxn/wC+aP7I1P8A58Z/++a6D/hK7X/nzl/76FH/AAldr/z5y/8AfQoA5/8AsjU/+fGf/vmrmkW+r6ferOllPtzh12n5hWp/wldr/wA+cv8A30KP+Ertf+fOX/voUAa+rNu0a6bBGYGOD1HymuZ8D/8AIWl/64n+YqzfeJre4spoBayqZI2UEkcZGKreB/8AkKyn/pif5igDs6KKKACiiigAooooA//R+y6KKKACiiigArHn8OadPO80nm73YscNjknNbFFAGJ/wjGmf9N/+/lRXGg6NZxG4nMnlpyQ0mQfatq7uIrWBppnCoozk1xGrajdaxeLFCh2E4jjHf3NACapfT6tdpBDGfKU4hjUfrXTeH9HTT4vNkw1yw5JH3fYUeHtHj0+LzZMNcMOSR932FbFAGNL4b0+WRpJXuHdjks0nJNN/4RjTP+m//fytuigDE/4RjTP+m/8A38o/4RjTP+m//fytuigDE/4RjTP+m/8A38o/4RjTP+m//fytuigDE/4RjTP+m/8A38o/4RjTP+m//fytuigDE/4RjTP+m/8A38o/4RjTP+m//fytuigDE/4RjTP+m/8A38o/4RjTP+m//fytuigDE/4RjTP+m/8A38o/4RjTP+m//fytuigDE/4RjTP+m/8A38o/4RjTP+m//fytuigDE/4RjTPSf/v5VrTNGs9PnM1v5m4qVO5s8ZB/pWjRQAUUUUAFFFFABRRRQB//0vsuiiigAooooAKhu7mK1t2nmYKijkmpq5fxda6jNcReXukgYgBVHQ+9AGVq2oXOsXqxRK2zdiNB39zXS+H9Hj0+ISSYa4Ycn+77Cjw/o8enxebLhrhhySPu+wrYoAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKAP/9P7LooooAKKKKACkxS0UAFFFFABRRTW6D6igB1FN7n8KQE+YRQA+iiigAopsnEZI64pR90UALRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFAH//2Q==",ni=s({state:{},actions:{},options:{}}),ri=()=>l(ni),ii=({children:t,options:n})=>{const[r,s]=o([]),[l,u]=o([]),[h,d]=o(null),[f,p]=o(n.searchQuery||""),[g,m]=o(n.sortBySize||"name"),{config:v}=n,[b,y]=o("date"),[w,x]=o("desc"),[C,_]=o([{id:"folders",name:"Папки"}]),[S,A]=o(new Set),[k,T]=o("");i.useEffect(()=>{A(new Set)},[]);const I=i.useRef(null);i.useEffect(()=>{if(n.onChangeSelection&&I.current!==S){if(null!==I.current){const e=(Array.isArray(l)?l:[]).filter(e=>S.has(e.id));n.onChangeSelection(e)}I.current=S}},[l,S,n.onChangeSelection,n]);const[E,P]=o(!1),[M,F]=o(Xr);a(()=>{(null==v?void 0:v.activeLibraryItem)&&F&&F(null==v?void 0:v.activeLibraryItem)},[null==v?void 0:v.activeLibraryItem,F]);const[j,D]=o({current:1,pageSize:12,total:0}),[R]=O.useForm(),[L]=O.useForm(),[z]=O.useForm(),[N]=O.useForm(),[B]=O.useForm(),[V]=O.useForm(),[U,W]=o(!1),[H,Y]=o(!1),[$,G]=o(!1),[X,K]=o(!1),[q,Z]=o(!1),[J,Q]=o(!1),[ee,te]=o(!1),[ne,re]=o(null),[ie,oe]=o(null),ae=c(e=>{D(t=>Object.assign(Object.assign({},t),e))},[D]),se=c(e=>{A(null!=e?e:new Set)},[A]),le={folders:r,files:l,selectedFolder:h,searchTerm:f,sortField:g,sortBy:b,sortOrder:w,pathHistory:C,selectedFiles:S,currentMenuFile:k,loading:E,pagination:j,isModalVisible:U,isUrlModalVisible:H,isRenameModalVisible:$,isMoveModalVisible:X,isRenameFolderModalVisible:q,isCopyModalVisible:J,isDeleteConfirmVisible:ee,form:R,urlForm:L,renameForm:z,moveForm:N,renameFolderForm:B,copyForm:V,fileToRename:ne,folderToRename:ie,activeLibraryItem:M,multiSelect:(null==v?void 0:v.multiSelect)||!0},ce={setFolders:s,setFiles:u,setSelectedFolder:d,setSearchTerm:p,setSortField:m,setSortBy:y,setSortOrder:x,setPathHistory:_,setSelectedFiles:se,setLoading:P,setPagination:ae,setIsModalVisible:W,setIsUrlModalVisible:Y,setIsRenameModalVisible:G,setIsMoveModalVisible:K,setIsRenameFolderModalVisible:Z,setIsCopyModalVisible:Q,setIsDeleteConfirmVisible:te,setFileToRename:re,setFolderToRename:oe,updatePathHistoryOnFolderRename:(e,t)=>{_(n=>n.map(n=>n.id===e?Object.assign(Object.assign({},n),{name:t}):n))},setActiveLibraryItem:F,setCurrentMenuFile:T},ue={state:le,actions:ce,options:n};return e(ni.Provider,{value:ue,children:t})},oi=e=>null===e.parentId||"null"===e.parentId||!e.parentId,ai=async(e,t,n)=>{var r;if(console.log("📁 addSubfoldersToFiles: params:",JSON.stringify(t,null,2)),"file"===(null==t?void 0:t.itemType))return e;let i=[];if(!n)return console.warn("🔍 getFolders не доступен!"),e;{const e=await n({parentId:t.folderId});i=Array.isArray(e)?e:[],console.log("📁 Получено папок от dataProvider:",i.length,"тип данных:",typeof e,"данные:",e)}let o=((e,t)=>{const n=Array.isArray(e)?e:[];return(r=t.folderId)&&"root"!==r&&"folders"!==r&&"null"!==r&&null!==r?n.filter(e=>e.parentId===t.folderId):n.filter(oi);var r})(i,t);if(null===(r=null==t?void 0:t.search)||void 0===r?void 0:r.trim()){const e=t.search.trim().toLowerCase();o=o.filter(t=>{var n;return null===(n=t.name)||void 0===n?void 0:n.toLowerCase().includes(e)})}if(console.log("📁 Найдено подпапок для добавления:",o.length),0===o.length)return e;const a=o.map(e=>({id:e.id,name:e.name,size:void 0,date:"-",isFolder:!0,folderId:e.parentId||"",type:"",selected:!1,extension:""}));if("folder"===(null==t?void 0:t.itemType))return a;const s=[...a,...e];return console.log("📁 РЕЗУЛЬТАТ: папок:",a.length,"файлов:",e.length,"всего:",s.length),s},si=e=>{var t,n,r,i;const{state:o,actions:s,options:l}=ri(),{searchTerm:h,sortBy:d,sortOrder:f,selectedFolder:p,pagination:g}=o,{setSearchTerm:m,setSortBy:v,setSortOrder:b,setPagination:y}=s,w=e||s.fetchFiles,x=u(null),C=u(Gr.debounce(e=>{const t=JSON.stringify(e);x.current!==t?(x.current=t,console.log("✅ Выполняется запрос:",e),null==w||w(e)):console.log("🚫 Дублированный запрос пропущен:",e)},150)).current,_=c(()=>{var e;const t=null===(e=null==l?void 0:l.config)||void 0===e?void 0:e.disablePagination;return{folderId:p||"",search:(null==h?void 0:h.trim())||void 0,page:t?void 0:g.current,limit:t?void 0:g.pageSize,sortBy:d,sortOrder:f,itemType:"all"}},[p,h,g.current,g.pageSize,d,f,null===(t=null==l?void 0:l.config)||void 0===t?void 0:t.disablePagination]),S=c(e=>{var t,n;if(console.log("🔎 useSortAndFilter: handleSearch вызван с:",e),m&&(console.log("🔎 useSortAndFilter: Обновляем searchTerm в стейте"),m(e)),y&&(console.log("🔎 useSortAndFilter: Сбрасываем пагинацию"),y({current:1,pageSize:g.pageSize,total:0})),console.log("🔎 useSortAndFilter: Проверяем fetchFiles:",!!w),w){console.log("🔎 useSortAndFilter: Вызываем fetchFiles с параметрами поиска");const r={folderId:p||"",search:(null==e?void 0:e.trim())||void 0,page:(null===(t=null==l?void 0:l.config)||void 0===t?void 0:t.disablePagination)?void 0:1,limit:(null===(n=null==l?void 0:l.config)||void 0===n?void 0:n.disablePagination)?void 0:g.pageSize,sortBy:d,sortOrder:f,itemType:"all"};console.log("🔎 useSortAndFilter: Параметры запроса:",r),w(r),console.log("🔎 useSortAndFilter: fetchFiles вызван!")}else console.error("🔎 useSortAndFilter: fetchFiles НЕ ОПРЕДЕЛЕНА!")},[m,y,g.pageSize,w,p,d,f,null===(n=null==l?void 0:l.config)||void 0===n?void 0:n.disablePagination]),A=c((e,t)=>{var n,r;null==v||v(e),null==b||b(t),w&&C({folderId:p||"",search:(null==h?void 0:h.trim())||void 0,page:(null===(n=null==l?void 0:l.config)||void 0===n?void 0:n.disablePagination)?void 0:g.current,limit:(null===(r=null==l?void 0:l.config)||void 0===r?void 0:r.disablePagination)?void 0:g.pageSize,sortBy:e,sortOrder:t,itemType:"all"})},[v,b,C,p,h,g.current,g.pageSize,null===(r=null==l?void 0:l.config)||void 0===r?void 0:r.disablePagination]),k=c((e,t)=>{var n;(null===(n=null==l?void 0:l.config)||void 0===n?void 0:n.disablePagination)||(y&&y({current:e,pageSize:t||g.pageSize,total:g.total}),w&&C({folderId:p||"",search:(null==h?void 0:h.trim())||void 0,page:e,limit:t||g.pageSize,sortBy:d,sortOrder:f,itemType:"all"}))},[y,g.pageSize,g.total,C,p,h,d,f,null===(i=null==l?void 0:l.config)||void 0===i?void 0:i.disablePagination]);return a(()=>{if(w){console.log("🔄 useSortAndFilter: изменение selectedFolder, загрузка файлов для папки:",p);const e=_();C(Object.assign(Object.assign({},e),{page:1}))}},[p]),a(()=>{w&&(console.log("🔄 useSortAndFilter: начальная загрузка файлов, selectedFolder:",p),C(_()))},[]),a(()=>()=>{var e;null===(e=C.cancel)||void 0===e||e.call(C)},[C]),{state:{searchTerm:h||"",sortBy:d||"name",sortOrder:f||"asc"},actions:{setSearchTerm:m||(()=>{}),setSortBy:v||(()=>{}),setSortOrder:b||(()=>{}),handleSearch:S,handleSort:A,handlePaginationChange:k,getCurrentQueryParams:_}}},li=()=>{var e,t;const{state:n,actions:i,options:o}=ri(),{t:a}=An(),{message:s}=I.useApp(),{folders:l,selectedFolder:u,form:h,loading:d,isModalVisible:f}=n,{setFolders:p,setLoading:g,setIsModalVisible:m}=i,{dataProviders:v,config:b}=o,y=c(e=>(Array.isArray(e)?e:[]).filter(e=>e&&e.id&&e.name).map(e=>({id:e.id,name:e.name,parentId:e.folderId?e.folderId:null})),[]),w=c(async()=>{console.log("Запрос папок (через getFiles itemType=folder)..."),null==g||g(!0);try{let e=[];const t="lazy"===(null==b?void 0:b.folderTreeLoading);if(null==v?void 0:v.getFolders){const n=!t;e=await v.getFolders({parentId:null,deep:n})}else{if(!(null==v?void 0:v.getFiles))return void console.error("DataProvider для папок не определен");{const n=async e=>{const{files:r}=await v.getFiles({itemType:"folder",folderId:e||void 0}),i=y(r);if(t)return i;const o=await Promise.all(i.map(e=>n(e.id)));return[...i,...o.flat()]},r=await n(null),i=new Map(r.map(e=>[e.id,e]));e=Array.from(i.values())}}console.log("Полученные папки:",e);const n=Array.isArray(e)?e:[];null==p||p(n);const r=n.filter(e=>e.id===e.parentId);r.length>0&&console.warn("Обнаружены папки с циклическими зависимостями:",r)}catch(e){console.error("Ошибка при загрузке папок:",e),s.error("Ошибка при загрузке папок")}finally{null==g||g(!1)}},[null==v?void 0:v.getFiles,null==v?void 0:v.getFolders,p,g,s,null==b?void 0:b.folderTreeLoading,y]),x=c(async e=>{try{if(null==v?void 0:v.getFolders){const t=await v.getFolders({parentId:e,deep:!1}),n=Array.isArray(l)?l:[],r=new Map(n.map(e=>[e.id,e]));return t.forEach(e=>r.set(e.id,e)),null==p||p(Array.from(r.values())),t}if(null==v?void 0:v.getFiles){const{files:t}=await v.getFiles({itemType:"folder",folderId:e||void 0}),n=y(t),r=Array.isArray(l)?l:[],i=new Map(r.map(e=>[e.id,e]));return n.forEach(e=>i.set(e.id,e)),null==p||p(Array.from(i.values())),n}return[]}catch(e){return console.error("Ошибка при загрузке дочерних папок:",e),[]}},[null==v?void 0:v.getFiles,null==v?void 0:v.getFolders,l,p,y]),C=c(()=>{h.setFieldsValue({folderName:"Новая папка"}),null==m||m(!0)},[h,m]),_=c(e=>{const t=[...(Array.isArray(l)?l:[]).filter(t=>t.id!==e.id),e];if(null==p||p(t),console.log("📂 Обновлен список папок, новая папка:",e),i.setSelectedFolder&&(i.setSelectedFolder(e.id),console.log("🎯 Выбрана созданная папка как активная:",e.id)),i.setPathHistory){const t=[...n.pathHistory||[],{id:e.id,name:e.name}];i.setPathHistory(t),console.log("🧭 Обновлен путь навигации:",t)}},[l,p,i,n.pathHistory]),S=c(async e=>{try{if(null==v?void 0:v.getFolders){const t=await v.getFolders(),n=(Array.isArray(t)?t:[]).some(t=>t.id===e);return console.log(n?"✅ Папка найдена:":"❌ Папка не найдена:",e),n}if(null==v?void 0:v.getFiles){const t=new Set,n=async r=>{const{files:i}=await v.getFiles({itemType:"folder",folderId:r||void 0}),o=y(i);for(const r of o){if(t.has(r.id))continue;if(t.add(r.id),r.id===e)return!0;if(await n(r.id))return!0}return!1},r=await n(null);return console.log(r?"✅ Папка найдена:":"❌ Папка не найдена:",e),r}}catch(e){console.warn("⚠️ Ошибка проверки папки:",e)}return!1},[null==v?void 0:v.getFolders,null==v?void 0:v.getFiles,y]),A=c(async()=>{try{const e=(await h.validateFields()).folderName.trim();if(!e)return void s.error("Имя папки не может быть пустым");const t=u&&"folders"!==u?u:null;let n;if(console.log("🆕 Создание новой папки:",{folderName:e,parentId:t,selectedFolder:u}),!(null==v?void 0:v.createFolder))return void s.error("DataProvider для создания папок не настроен");n=await v.createFolder({name:e,parentId:t}),(e=>{if(!e||!e.id)throw new Error("Некорректный ответ от сервера: отсутствует ID папки");if(e.id===e.parentId&&e.parentId)throw console.error("Обнаружена циклическая зависимость: папка является родителем сама для себя"),new Error("Ошибка: папка не может быть родителем самой себя")})(n),_(n),await w(),await new Promise(e=>setTimeout(e,200));await S(n.id)||console.warn("⚠️ Не удалось подтвердить создание папки на сервере, но продолжаем..."),s.success(`Папка "${e}" создана и выбрана`),null==m||m(!1)}catch(e){console.error("❌ Ошибка при создании папки:",e),s.error(e instanceof Error?e.message:a("Failed to create folder"))}},[h,u,null==v?void 0:v.createFolder,_,m,a,w,S,s]),k=c(()=>{null==m||m(!1)},[m]),T=c((e,t=new Set)=>{const n=Array.isArray(l)?l:[];return e.map(e=>{if(t.has(e.id))return console.warn(`Обнаружен цикл в структуре папок с id=${e.id}. Пропускаем обработку дочерних элементов.`),{key:e.id,label:e.name+" (ошибка)",icon:r.createElement(ae,{style:{color:"red"}})};const i=new Set(t);i.add(e.id);const o=n.filter(t=>t.parentId===e.id&&t.id!==e.id);return{key:e.id,label:e.name,children:o.length>0?T(o,i):void 0}})},[l]),O=c(()=>{const e=Array.isArray(l)?l:[],t={key:"folders",label:a("Folders"),children:[]},n=e.filter(e=>null===e.parentId||!e.parentId);return t.children=T(n),[t]},[l,a,T]),E=c(async(e,t)=>{var n,r;try{if(!t||""===t.trim())return void s.error("Имя папки не может быть пустым");if(!(!1!==(null===(n=null==b?void 0:b.features)||void 0===n?void 0:n.enableRenameFolder)))return void s.error("Переименование папок отключено конфигурацией");if(!(null===(r=o.dataProviders)||void 0===r?void 0:r.renameFolder))throw new Error("renameFolder не реализован в dataProviders");const a=await o.dataProviders.renameFolder(e,t.trim());if(!(null==a?void 0:a.id))return void s.error("Некорректный ответ при переименовании папки");await w(),e!==a.id&&i.setSelectedFolder&&i.setSelectedFolder(a.id),s.success(`Папка переименована на "${t.trim()}"`)}catch(e){console.error("Ошибка при переименовании папки:",e),s.error(e instanceof Error?e.message:"Ошибка при переименовании папки")}},[w,s,null===(e=o.dataProviders)||void 0===e?void 0:e.renameFolder,null===(t=null==b?void 0:b.features)||void 0===t?void 0:t.enableRenameFolder]);return{state:{folders:l,isCreatingFolder:f,loading:d},actions:{fetchFolders:w,fetchChildFolders:x,handleCreateFolder:C,handleModalOk:A,handleModalCancel:k,generateMenuItems:O,renameFolder:E}}},ci=()=>{var e;const{state:t,actions:n,options:r}=ri(),o=si(),{sortBy:a,sortOrder:s}=o.state,{actions:{fetchFolders:l}}=li(),{t:u}=An(),{message:h}=I.useApp(),{selectedFolder:d,urlForm:f,pagination:p,files:g}=t,m=i.useRef(null);m.current=p;const{setFiles:v,setLoading:b,setIsUrlModalVisible:y,setSelectedFiles:w,setActiveLibraryItem:x,setPagination:C}=n,{dataProviders:_}=r,S=c(async e=>{var t,n,i;if(!(null==_?void 0:_.getFiles))return[];const o=null===(t=null==r?void 0:r.config)||void 0===t?void 0:t.disablePagination,{files:a,pagination:s}=await _.getFiles({folderId:"folders"!==(null==e?void 0:e.folderId)?null==e?void 0:e.folderId:void 0,search:(null===(n=null==e?void 0:e.search)||void 0===n?void 0:n.trim())||void 0,sortBy:null==e?void 0:e.sortBy,sortOrder:null==e?void 0:e.sortOrder,page:o||null==e?void 0:e.page,limit:o||null==e?void 0:e.limit,itemType:(null==e?void 0:e.itemType)||"all"});return console.log("🔍 fetchFilesFromDataProvider результат:",a,"с параметрами сортировки:",{sortBy:null==e?void 0:e.sortBy,sortOrder:null==e?void 0:e.sortOrder}),C&&((null===(i=null==r?void 0:r.config)||void 0===i?void 0:i.disablePagination)?C({current:1,pageSize:a.length||1,total:a.length||0}):s&&C({current:s.page,pageSize:s.limit,total:s.total})),a},[_,null===(e=null==r?void 0:r.config)||void 0===e?void 0:e.disablePagination]),A=c(async e=>{try{null==b||b(!0),console.log("fetchFiles вызван с параметрами:",e);let t=[];if(!(null==_?void 0:_.getFiles))return void console.error("DataProvider для получения файлов не определен");t=await S(e),console.log("Получены файлы:",t),e&&"all"!==e.itemType&&"folder"!==e.itemType&&(t=await ai(t,e,null==_?void 0:_.getFolders)),null==v||v(t),null==w||w(new Set)}catch(e){console.error("Ошибка при загрузке файлов:",e),h.error("Не удалось загрузить файлы")}finally{null==b||b(!1)}},[_,v,b,w,S,h]),k=c(async e=>{var t;const n=m.current;try{if(null==_?void 0:_.deleteItems){const n=await _.deleteItems([e]);if(!n.success&&!(null===(t=n.detailed)||void 0===t?void 0:t.every(e=>e.success)))throw new Error("Не удалось удалить файлы");h.success(u("Files deleted"))}else{if(!(null==_?void 0:_.deleteFile))return void h.error("DataProvider для удаления файлов не настроен");if(!await _.deleteFile(e))throw new Error("Не удалось удалить файл");h.success(u("File deleted"))}await A({folderId:d||"",page:g.length>=1?n.current:n.current-1,limit:n.pageSize,sortBy:a,sortOrder:s})}catch(e){console.error("Ошибка при удалении файла:",e),h.error(u("Error when deleting a file"))}},[_,A,d,u,h,g,a,s]),T=c(async e=>{try{const t=m.current;if(!(null==_?void 0:_.deleteFolder))return void h.error("DataProvider для удаления папок не настроен");if(!await _.deleteFolder(e))throw new Error("Не удалось удалить папку");h.success(u("Folder deleted"));d===e?await A({page:t.current,limit:t.pageSize,sortBy:a,sortOrder:s}):await A({folderId:d||"",sortBy:a,sortOrder:s,page:t.current,limit:t.pageSize})}catch(e){console.error("Ошибка при удалении папки:",e),h.error(u("Error when deleting a folder"))}},[_,d,h,u,A,a,s]),O=c(async e=>{try{if(null==_?void 0:_.getFileData){const t=await _.getFileData(e);if(t)return t;throw new Error("Не удалось загрузить файл")}{const t=await fetch(`/api/files/${e.id}/content`);if(!t.ok)throw new Error("Ошибка загрузки файла");return await t.blob()}}catch(e){console.error("Ошибка при загрузке файла:",e)}},[_,h]),E=c(async e=>{if(!(null==_?void 0:_.uploadFile))return;const t=e.name.split(".").pop()||"";await _.uploadFile({name:e.name,size:e.size,type:e.type,folderId:d||"",data:e,extension:t}),x&&x(Xr)},[_,d,x]);c(async e=>{try{if(null==_?void 0:_.getFolders){const t=await _.getFolders(),n=(Array.isArray(t)?t:[]).some(t=>t.id===e);return console.log(n?"✅ Папка найдена:":"❌ Папка не найдена:",e),n}}catch(e){console.warn("⚠️ Ошибка проверки папки:",e)}return!1},[null==_?void 0:_.getFolders]);const P=c(async e=>{if(!(null==_?void 0:_.uploadFile))return void h.error("DataProvider для загрузки файлов не настроен");const t=m.current,n=document.createElement("input");n.type="file",n.accept="image/*",n.onchange=async n=>{var r;const i=null===(r=n.target.files)||void 0===r?void 0:r[0];if(i)if(i.type.startsWith("image/"))try{if(null==b||b(!0),null==e||e.onStart(i),null==e?void 0:e.onProgress){let t=0;const n=setInterval(()=>{t=Math.min(t+10+Math.floor(Date.now()%10),90),e.onProgress(i.name,t)},200);await E(i),clearInterval(n),e.onProgress(i.name,100)}else await E(i);null==e||e.onComplete(i.name),h.success(`${u("File")} ${i.name} ${u("has been successfully uploaded")}`),await l(),await A({folderId:d||"",sortBy:a,sortOrder:s,page:t.current,limit:t.pageSize})}catch(t){console.error("Ошибка при загрузке файла:",t),null==e||e.onError(i.name,"Ошибка при загрузке файла"),h.error("Ошибка при загрузке файла")}finally{null==b||b(!1)}else h.error(u("Please select an image file"))},n.click()},[null==_?void 0:_.uploadFile,d,h,u,b,A,a,s,E]),M=c(async(e,t)=>{const n=m.current;try{let r;const i=await(null==f?void 0:f.validateFields()),o=e||(null==i?void 0:i.fileUrl);return o?(null==b||b(!0),(null==_?void 0:_.uploadFileByUrl)?(r=await _.uploadFileByUrl({url:o,folderId:d||"",noFolder:t}),h.success(`${u("File")} ${(null==i?void 0:i.name)||"unnamed file"} ${u("successfully uploaded")}`),null==y||y(!1),null==f||f.resetFields(),x&&x(Xr),await A({folderId:d||"",sortBy:a,sortOrder:s,page:n.current,limit:n.pageSize}),r):void h.error("Загрузка по URL не поддерживается")):void h.error("Заполните все поля")}catch(e){console.error("Ошибка при загрузке файла по URL:",e),h.error(u("Error when downloading a file by URL"))}finally{null==b||b(!1)}},[f,b,_,h,u,y,x,A,d,a,s]),F=c(async e=>{if(e.type.startsWith("image/"))try{await E(e),h.success(`${u("File")} ${e.name} ${u("has been successfully uploaded")}`)}catch(t){console.error(`Ошибка при загрузке файла ${e.name}:`,t),h.error(`Ошибка при загрузке файла ${e.name}`)}else h.warning(`Файл ${e.name} не является изображением и будет пропущен`)},[h,u,E]),j=c(async e=>{const t=m.current;for(const t of e)await F(t);await A({folderId:d||"",sortBy:a,sortOrder:s,page:t.current,limit:t.pageSize})},[A,d,a,s,F]);return{fetchFiles:A,handleDeleteFile:k,handleDeleteFolder:T,handleAddFile:P,handleAddFileByUrl:M,handleDroppedFiles:j,getFileData:O,uploadFileWithProvider:E}},ui=()=>{const{state:e}=ri(),{files:t,loading:n,isUrlModalVisible:r}=e,i=ci(),o=(()=>{const{state:e,actions:t}=ri(),{selectedFiles:n}=e,{setSelectedFiles:r}=t,i=e.multiSelect||!0,o=c(e=>{if(!n||!r)return;const t=n,i=new Set(t);t.has(e)?i.delete(e):i.add(e),r(i)},[n,r,i]);return{state:{selectedFiles:n||new Set},actions:{toggleFileSelection:o}}})(),a=(e=>{const{state:t,actions:n,options:r}=ri(),{t:i}=An(),o=li(),{fetchFolders:a}=o.actions,{files:s,selectedFolder:l,selectedFiles:u,fileToRename:h,renameForm:d,isRenameModalVisible:f,moveForm:p,copyForm:g,pagination:m,currentMenuFile:v}=t,{setFileToRename:b,setIsRenameModalVisible:y,setIsMoveModalVisible:w,setIsCopyModalVisible:x,setSelectedFiles:C,setIsDeleteConfirmVisible:_}=n,{apiEndpoints:S,dataProviders:A,config:k}=r,T=c(e=>{var t,n;const r=null==s?void 0:s.find(t=>t.id===e);if((null==r?void 0:r.isFolder)||e.startsWith("folder_")){if(!1===(null===(t=null==k?void 0:k.features)||void 0===t?void 0:t.enableRenameFolder))return void E.error(i("Folder rename is disabled by config"));if(!(null==A?void 0:A.renameFolder))throw new Error("renameFolder не реализован в dataProviders")}else{if(!1===(null===(n=null==k?void 0:k.features)||void 0===n?void 0:n.enableRenameFile))return void E.error(i("File rename is disabled by config"));if(!(null==A?void 0:A.renameFile))throw new Error("renameFile не реализован в dataProviders")}null==b||b(e),null==y||y(!0),r&&d&&d.setFieldsValue({newFileName:r.name})},[b,y,s,d,null==k?void 0:k.features,A,i]),I=c(()=>{null==y||y(!1),null==b||b(null),null==d||d.resetFields()},[y,b,d]),O=c(async()=>{var t,r;if(h&&d)try{const o=await d.validateFields();if(!(null==o?void 0:o.newFileName))return;const c=null==s?void 0:s.find(e=>e.id===h);if((null==c?void 0:c.isFolder)||h.startsWith("folder_")){if(!1===(null===(t=null==k?void 0:k.features)||void 0===t?void 0:t.enableRenameFolder))return void E.error(i("Folder rename is disabled by config"));if(!(null==A?void 0:A.renameFolder))throw new Error("renameFolder не реализован в dataProviders");{const e=await A.renameFolder(h,o.newFileName.trim());if(!(null==e?void 0:e.id))return void E.error("Некорректный ответ при переименовании папки");E.success(`${i("Folder renamed to")} ${o.newFileName}`),await a(),h!==e.id&&n.setSelectedFolder&&n.setSelectedFolder(e.id)}}else{if(!1===(null===(r=null==k?void 0:k.features)||void 0===r?void 0:r.enableRenameFile))return void E.error(i("File rename is disabled by config"));if(!(null==A?void 0:A.renameFile))throw new Error("renameFile не реализован в dataProviders");await A.renameFile(h,o.newFileName),E.success(`${i("File renamed to")} ${o.newFileName}`)}I(),await e({folderId:l||"",page:m.current,limit:m.pageSize})}catch(e){console.error("Ошибка при переименовании:",e),E.error(e instanceof Error?e.message:"Ошибка при переименовании")}},[h,d,s,A,S,I,e,l,i,m]),P=c(()=>{null==w||w(!0)},[w]),M=c(()=>{null==w||w(!1),null==p||p.resetFields()},[w,p]),F=c(async()=>{var t;if((null==v?void 0:v.length)||u&&0!==u.size)try{const n=await p.validateFields(),r=null==n?void 0:n.targetFolder;if(!r)return void E.error("Выберите папку назначения");const i=Array.from((null==v?void 0:v.length)?[v]:u);let o=0,c=0;const h=i.map(e=>s.find(t=>t.id===e)).filter(e=>!!e),d=h.some(e=>(null==e?void 0:e.isFolder)||e.id.startsWith("folder_"));if(null==A?void 0:A.moveItems)try{const e=await A.moveItems(r,h.map(e=>e.id)),t=e.detailed;if(t){const e=t.filter(e=>e.success).length;o+=e,e!==h.length&&E.error(`При перемещении произошли ошибки: \n${t.map(e=>e.error).filter(e=>!e).join(";")}`)}else if(e.success)o+=h.length;else{const t=e.error;t?E.error(t):c+=h.length}}catch(e){console.error("Ошибка при копировании",e),c-=h.length}else for(const e of h)try{const n=(null==e?void 0:e.isFolder)||(null===(t=e.id)||void 0===t?void 0:t.startsWith("folder_"));(null==A?void 0:A.moveItem)?(await A.moveItem({itemId:e.id,targetFolderId:r,isFolder:n}),o++):(console.warn(`DataProvider для перемещения не настроен для ${n?"папки":"файла"} ${e.id}`),c++)}catch(t){console.error(`Ошибка при перемещении объекта ${e.id}:`,t),c++}o>0&&E.success(`Успешно перемещено ${o} из ${i.length} объектов`),c>0&&E.error(`Не удалось переместить ${c} из ${i.length} объектов`),M(),null==C||C(new Set),d&&await a(),await e({folderId:l||"",page:m.current,limit:m.pageSize})}catch(e){console.error("Ошибка при перемещении:",e),E.error("Ошибка при перемещении")}},[v,u,p,M,C,e,l,m,s,A,a]),j=c(()=>{null==x||x(!0)},[x]),D=c(()=>{null==x||x(!1),null==g||g.resetFields()},[x,g]),R=c(async()=>{if((null==v?void 0:v.length)||u&&0!==u.size)try{const t=await g.validateFields(),n=null==t?void 0:t.targetFolder;if(!n)return void E.error("Выберите папку назначения");const r=Array.from((null==v?void 0:v.length)?[v]:u);let i=0,o=0;const c=r.map(e=>s.find(t=>t.id===e)).filter(e=>!!e),h=c.some(e=>(null==e?void 0:e.isFolder)||e.id.startsWith("folder_"));if(null==A?void 0:A.copyItems)try{const e=await A.copyItems(n,c.map(e=>e.id)),t=e.detailed;if(t){const e=t.filter(e=>e.success).length;i+=e,e!==c.length&&E.error(`При перемещении произошли ошибки: \n${t.map(e=>e.error).filter(e=>!e).join(";")}`)}else if(e.success)i+=c.length;else{const t=e.error;t?E.error(t):o+=c.length}}catch(e){console.error("Ошибка при копировании",e),o-=c.length}else for(const e of c)try{const t=(null==e?void 0:e.isFolder)||e.id.startsWith("folder_");(null==A?void 0:A.copyItem)?(await A.copyItem({itemId:e.id,targetFolderId:n,isFolder:t}),i++):(console.warn(`DataProvider для копирования не настроен для ${t?"папки":"файла"} ${e.id}`),o++)}catch(t){console.error(`Ошибка при копировании объекта ${e.id}:`,t),o++}i>0&&E.success(`Успешно скопировано ${i} из ${r.length} объектов`),o>0&&E.error(`Не удалось скопировать ${o} из ${r.length} объектов`),D(),null==C||C(new Set),h&&await a(),await e({folderId:l||"",page:m.current,limit:m.pageSize})}catch(e){console.error("Ошибка при копировании:",e),E.error("Ошибка при копировании")}},[v,u,g,D,C,e,l,m,s,A,a]),L=c(()=>{null==_||_(!0)},[_]),z=c(()=>{null==_||_(!1)},[_]),N=c(async()=>{if((null==v?void 0:v.length)||u&&0!==u.size)try{const t=Array.from(v?[v]:u);let n=0,r=0;const i=t.map(e=>s.find(t=>t.id===e)).filter(e=>!!e);if(null==A?void 0:A.deleteItems){const e=await(null==A?void 0:A.deleteItems(i.map(e=>e.id))),t=e.detailed;if(t){const e=t.filter(e=>e.success).length;n+=e,e!==i.length&&E.error(`При удалении произошли ошибки: \n${t.map(e=>e.error).filter(e=>!e).join(";")}`)}else if(e.success)n+=i.length;else{const t=e.error;t?E.error(t):r+=i.length}}else for(const e of i)try{(null==e?void 0:e.isFolder)||e.id.startsWith("folder_")?(null==A?void 0:A.deleteFolder)?await A.deleteFolder(e.id)?n++:r++:(console.warn("DataProvider для удаления папок не настроен"),r++):(null==A?void 0:A.deleteFile)?await A.deleteFile(e.id)?n++:r++:(console.warn("DataProvider для удаления файлов не настроен"),r++)}catch(t){console.error(`Ошибка при удалении объекта ${e.id}:`,t),r++}n>0&&E.success(`Успешно удалено ${n} из ${t.length} объектов`),r>0&&E.error(`Не удалось удалить ${r} из ${t.length} объектов`),null==C||C(new Set),null==_||_(!1),await a(),await e({folderId:l||"",page:m.current,limit:m.pageSize})}catch(e){console.error("Ошибка при удалении:",e),E.error("Ошибка при удалении")}else null==_||_(!1)},[u,s,A,n,e,l,C,_,m,a]);return{state:{isRenamingFile:f||!1,fileToRename:h},actions:{showRenameModal:T,handleRenameCancel:I,handleRenameOk:O,showMoveModal:P,handleMoveCancel:M,handleMoveOk:F,showCopyModal:j,handleCopyCancel:D,handleCopyOk:R,showDeleteConfirm:L,handleDeleteConfirmCancel:z,handleDeleteConfirmOk:N}}})(i.fetchFiles);return{state:{files:t||[],selectedFiles:o.state.selectedFiles,loading:n||!1,isAddingFileByUrl:r||!1,isRenamingFile:a.state.isRenamingFile,fileToRename:a.state.fileToRename},actions:{fetchFiles:i.fetchFiles,handleDeleteFile:i.handleDeleteFile,handleDeleteFolder:i.handleDeleteFolder,handleAddFile:i.handleAddFile,handleAddFileByUrl:i.handleAddFileByUrl,handleDroppedFiles:i.handleDroppedFiles,uploadFileWithProvider:i.uploadFileWithProvider,toggleFileSelection:o.actions.toggleFileSelection,showRenameModal:a.actions.showRenameModal,handleRenameCancel:a.actions.handleRenameCancel,handleRenameOk:a.actions.handleRenameOk,showMoveModal:a.actions.showMoveModal,handleMoveCancel:a.actions.handleMoveCancel,handleMoveOk:a.actions.handleMoveOk,showCopyModal:a.actions.showCopyModal,handleCopyCancel:a.actions.handleCopyCancel,handleCopyOk:a.actions.handleCopyOk,showDeleteConfirm:a.actions.showDeleteConfirm,handleDeleteConfirmCancel:a.actions.handleDeleteConfirmCancel,handleDeleteConfirmOk:a.actions.handleDeleteConfirmOk}}},hi=()=>{const{notification:e}=I.useApp(),t=ri().options.notification;return h(()=>Object.assign(Object.assign({},e),t),[e,t])},di="filemanager_sidebar_width",fi=({onSearch:t,placeholder:n="Поиск файлов...",className:r})=>{const[i,s]=o(""),l=u(null),{options:c}=ri(),{config:h}=c;a(()=>(l.current=Gr.debounce(e=>{t(e)},500),()=>{var e;null===(e=l.current)||void 0===e||e.cancel()}),[t]);return e(P,{value:i,onChange:e=>{var t;const n=e.target.value;s(n),null===(t=l.current)||void 0===t||t.call(l,n)},placeholder:n,prefix:e(Nr,{size:16,strokeWidth:null==h?void 0:h.iconStrokeWidth}),className:r,allowClear:!0,onClear:()=>{s(""),t("")}})},pi=new Map,gi=(e,t)=>{pi.set(e,t),console.log("Изображение сохранено в кеш:",e),pi.size>350&&(Array.from(pi.keys()).slice(0,50).forEach(e=>pi.delete(e)),console.warn("Очищен кеш изображений. Удалено 50 самых старых записей."))},mi=e=>{if(e.type&&e.type.startsWith("image/"))return!0;if(e.name){const t=e.name.toLowerCase().split(".").pop();return ei.includes(t||"")}return!1},vi=({src:t,alt:n,className:r,width:i,height:s,preview:l=!1,file:u})=>{const h=ci(),[d,f]=o(!1),[p,g]=o(t),[m,v]=o(!1),b=c(e=>{g(e),f(!1),v(!1)},[]),y=c(e=>{console.warn("Не удалось загрузить изображение:",e),g(void 0),f(!0),v(!1)},[]),w=c(()=>{g(ti),f(!0)},[]),x=c(e=>{g(e),f(!1)},[]),C=c(e=>{const t=e.split(",")[1];t&&t.length>20?g(e):(console.warn("Некорректные base64 данные:",e.substring(0,50)+"..."),w())},[w]),_=c(async e=>{if(console.log("loadImageFromFile",e.id),t=e.id,pi.has(t))return console.log("Изображение найдено в кеше:",e.id),(e=>pi.get(e))(e.id);var t;if(!e||!mi(e))return console.warn("Файл не является изображением:",null==e?void 0:e.name,null==e?void 0:e.type),w(),ti;try{const t=await h.getFileData(e);if(!t)throw new Error("Ошибка загрузки файла");return new Promise((n,r)=>{const i=new FileReader;i.onload=()=>{const t=i.result;gi(e.id,t),n(t)},i.onerror=()=>r(new Error("Ошибка чтения файла")),i.readAsDataURL(t)})}catch(e){throw console.error("Ошибка загрузки изображения:",e),e}},[u,w,h]),S=c(()=>{(null==u?void 0:u.id)&&mi(u)?_(u).then(b).catch(y):u&&!mi(u)&&(console.warn("Файл не является изображением, показываем fallback:",u.name,u.type),w())},[u,_,b,y,w]),A=c(e=>{console.log("HandleBlobSrc:",{blobSrc:e,file:u?{id:u.id,name:u.name,type:u.type,extension:u.extension,folderId:u.folderId}:null}),u&&mi(u)?(console.log("Blob файл является изображением, устанавливаем src:",u.name,u.type),g(e),f(!1)):(console.warn("Blob файл не является изображением, показываем fallback:",null==u?void 0:u.name,null==u?void 0:u.type),w())},[u,w,mi]),k=c(()=>{(null==u?void 0:u.id)&&mi(u)?(v(!0),_(u).then(b).catch(y)):u&&!mi(u)?(console.warn("Файл не является изображением, показываем fallback:",u.name,u.type),w()):(console.warn("Неподдерживаемый формат изображения:",t),g(void 0))},[u,t,_,b,y,w]);a(()=>{v(!1),t?t.startsWith("data:image/")?C(t):t.startsWith("blob:")?A(t):t.startsWith("http://")||t.startsWith("https://")||t.startsWith("/")?x(t):(console.log("setImageError 1"),k()):S()},[t,S,C,A,x,k]);return e(M,{className:r,src:p,alt:n,width:i,height:s,preview:l&&!d&&{src:p,toolbarRender:()=>null,destroyOnHidden:!0,mask:e(se,{style:{fontSize:"20px"}})},onError:()=>{console.warn("Ошибка загрузки изображения:",(null==p?void 0:p.substring(0,50))+"..."),f(!0)},fallback:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODAiIGhlaWdodD0iODAiIHZpZXdCb3g9IjAgMCA4MCA4MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjgwIiBoZWlnaHQ9IjgwIiBmaWxsPSIjRjVGNUY1Ii8+CjxwYXRoIGQ9Ik0yNCAzMkw0MCA0OEw1NiAzMkw2NCA0MEw2NCA2NEgyNFYzMloiIGZpbGw9IiNEOUQ5RDkiLz4KPC9zdmc+",loading:m?"lazy":void 0})},bi=()=>e("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"mixed-view",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:e("path",{d:"M1 1h2v2H1V1zm0 4h2v2H1V5zm0 4h2v2H1V9zm4-8h2v2H5V1zm0 4h2v2H5V5zm0 4h2v2H5V9zm4-8h2v2H9V1zm0 4h2v2H9V5zm0 4h2v2H9V9z"})}),yi=()=>e("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"landscape-view",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:e("path",{d:"M1 3h10v6H1V3zm1 1v4h8V4H2z"})}),wi=()=>e("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"portrait-view",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:e("path",{d:"M3 1h6v10H3V1zm1 1v8h4V2H4z"})}),xi=()=>e("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"square-view",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:e("path",{d:"M1 1h10v10H1V1zm1 1v8h8V2H2z"})}),Ci=()=>t("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"ai-icon",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:[e("path",{d:"M2.45454 11.7273C2.45454 11.7273 2.16994 10.446 1.66154 9.88113C1.15314 9.31625 0 9 0 9C0 9 1.15314 8.68374 1.66154 8.11887C2.16994 7.554 2.45454 6.27273 2.45454 6.27273C2.45454 6.27273 2.73915 7.554 3.24755 8.11887C3.75594 8.68374 4.90909 9 4.90909 9C4.90909 9 3.75594 9.31625 3.24755 9.88113C2.73915 10.446 2.45454 11.7273 2.45454 11.7273Z"}),e("path",{d:"M7.63636 9C7.63636 9 7.1304 6.94996 6.22658 6.04614C5.32276 5.14233 3.27273 4.63636 3.27273 4.63636C3.27273 4.63636 5.32276 4.1304 6.22658 3.22657C7.1304 2.32275 7.63636 0.272728 7.63636 0.272728C7.63636 0.272728 8.14233 2.32275 9.04615 3.22657C9.94996 4.1304 12 4.63636 12 4.63636C12 4.63636 9.94996 5.14233 9.04615 6.04614C8.14233 6.94996 7.63636 9 7.63636 9Z"}),e("path",{d:"M1.63636 4.09091C1.63636 4.09091 1.44663 3.19402 1.10769 2.7986C0.768758 2.40318 0 2.18182 0 2.18182C0 2.18182 0.768758 1.96046 1.10769 1.56503C1.44663 1.16961 1.63636 0.272728 1.63636 0.272728C1.63636 0.272728 1.8261 1.16961 2.16503 1.56503C2.50397 1.96046 3.27273 2.18182 3.27273 2.18182C3.27273 2.18182 2.50397 2.40318 2.16503 2.7986C1.8261 3.19402 1.63636 4.09091 1.63636 4.09091Z"}),e("path",{d:"M10.6364 11.7273C10.6364 11.7273 10.4782 11.0866 10.1958 10.8042C9.91336 10.5218 9.27273 10.3636 9.27273 10.3636C9.27273 10.3636 9.91336 10.2055 10.1958 9.92307C10.4782 9.64064 10.6364 9 10.6364 9C10.6364 9 10.7945 9.64064 11.0769 9.92307C11.3594 10.2055 12 10.3636 12 10.3636C12 10.3636 11.3594 10.5218 11.0769 10.8042C10.7945 11.0866 10.6364 11.7273 10.6364 11.7273Z"})]}),_i=()=>t("svg",{width:"64",height:"64",viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e("path",{opacity:"0.5",d:"M6 19H49C54.5229 19 59 23.4772 59 29V46C59 51.5228 54.5228 56 49 56H14C9.58172 56 6 52.4183 6 48V19Z",fill:"#91CAsFF"}),e("path",{d:"M6 19L34.866 18.5L30.7172 11.0737C29.6569 9.17588 27.6531 8 25.4792 8H10C7.79086 8 6 9.79086 6 12V19Z",fill:"#2884FF"}),e("path",{d:"M34.6668 18.6667L31.6921 12.7171C30.8359 11.0048 30.4078 10.1486 29.7692 9.5231C29.2044 8.96995 28.5237 8.54926 27.7764 8.29149C26.9313 8 25.974 8 24.0596 8H13.8668C10.8799 8 9.38641 8 8.24555 8.5813C7.24202 9.09262 6.42612 9.90852 5.91479 10.9121C5.3335 12.0529 5.3335 13.5464 5.3335 16.5333V18.6667M5.3335 18.6667H45.8668C50.3473 18.6667 52.5875 18.6667 54.2988 19.5386C55.804 20.3056 57.0279 21.5294 57.7949 23.0347C58.6668 24.746 58.6668 26.9862 58.6668 31.4667V43.2C58.6668 47.6804 58.6668 49.9206 57.7949 51.6319C57.0279 53.1372 55.804 54.3611 54.2988 55.1281C52.5875 56 50.3473 56 45.8668 56H18.1335C13.6531 56 11.4129 56 9.70157 55.1281C8.19628 54.3611 6.97243 53.1372 6.20544 51.6319C5.3335 49.9206 5.3335 47.6804 5.3335 43.2V18.6667Z",stroke:"#2884FF",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),Si=()=>t("svg",{width:"64",height:"64",viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e("path",{opacity:"0.5",d:"M6 19H49C54.5229 19 59 23.4772 59 29V46C59 51.5228 54.5228 56 49 56H14C9.58172 56 6 52.4183 6 48V19Z",fill:"#91CAFF"}),e("path",{d:"M6 19L34.866 18.5L30.7172 11.0737C29.6569 9.17588 27.6531 8 25.4792 8H10C7.79086 8 6 9.79086 6 12V19Z",stroke:"currentColor"}),e("path",{d:"M34.6663 18.6667L31.6916 12.7171C30.8354 11.0048 30.4073 10.1486 29.7687 9.5231C29.2039 8.96995 28.5232 8.54926 27.7759 8.29149C26.9308 8 25.9736 8 24.0591 8H13.8663C10.8794 8 9.38592 8 8.24506 8.5813C7.24153 9.09262 6.42563 9.90852 5.91431 10.9121C5.33301 12.0529 5.33301 13.5464 5.33301 16.5333V18.6667M5.33301 18.6667H45.8663C50.3468 18.6667 52.587 18.6667 54.2983 19.5386C55.8036 20.3056 57.0274 21.5294 57.7944 23.0347C58.6663 24.746 58.6663 26.9862 58.6663 31.4667V43.2C58.6663 47.6804 58.6663 49.9206 57.7944 51.6319C57.0274 53.1372 55.8036 54.3611 54.2983 55.1281C52.587 56 50.3468 56 45.8663 56H18.133C13.6526 56 11.4124 56 9.70108 55.1281C8.19579 54.3611 6.97194 53.1372 6.20496 51.6319C5.33301 49.9206 5.33301 47.6804 5.33301 43.2V18.6667Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),Ai=()=>t("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e("g",{clipPath:"url(#clip0_443_4214)",children:e("path",{d:"M4.99967 7.99992L6.99967 9.99992L10.9997 5.99992M14.6663 7.99992C14.6663 11.6818 11.6816 14.6666 7.99967 14.6666C4.31778 14.6666 1.33301 11.6818 1.33301 7.99992C1.33301 4.31802 4.31778 1.33325 7.99967 1.33325C11.6816 1.33325 14.6663 4.31802 14.6663 7.99992Z",stroke:"white",strokeLinecap:"round",strokeLinejoin:"round"})}),e("defs",{children:e("clipPath",{id:"clip0_443_4214",children:e("rect",{width:"16",height:"16",fill:"white"})})})]}),ki=()=>e("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M10.8337 5.83333L9.90404 3.9741C9.6365 3.439 9.50271 3.17144 9.30313 2.97597C9.12664 2.80311 8.91393 2.67164 8.68039 2.59109C8.4163 2.5 8.11716 2.5 7.5189 2.5H4.33366C3.40024 2.5 2.93353 2.5 2.57701 2.68166C2.2634 2.84144 2.00844 3.09641 1.84865 3.41002C1.66699 3.76654 1.66699 4.23325 1.66699 5.16667V5.83333M1.66699 5.83333H14.3337C15.7338 5.83333 16.4339 5.83333 16.9686 6.10582C17.439 6.3455 17.8215 6.72795 18.0612 7.19836C18.3337 7.73314 18.3337 8.4332 18.3337 9.83333V13.5C18.3337 14.9001 18.3337 15.6002 18.0612 16.135C17.8215 16.6054 17.439 16.9878 16.9686 17.2275C16.4339 17.5 15.7338 17.5 14.3337 17.5H5.66699C4.26686 17.5 3.5668 17.5 3.03202 17.2275C2.56161 16.9878 2.17916 16.6054 1.93948 16.135C1.66699 15.6002 1.66699 14.9001 1.66699 13.5V5.83333Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})}),Ti=()=>e("svg",{width:"48",height:"49",viewBox:"0 0 48 49",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M32 24.5L24 16.5M24 16.5L16 24.5M24 16.5V34.9C24 37.6814 24 39.0721 25.101 40.6292C25.8326 41.6638 27.9388 42.9406 29.1944 43.1108C31.0842 43.3668 31.8019 42.9924 33.2371 42.2437C39.6333 38.9071 44 32.2135 44 24.5C44 13.4543 35.0457 4.5 24 4.5C12.9543 4.5 4 13.4543 4 24.5C4 31.9028 8.02199 38.3663 14 41.8244",stroke:"#2884FF",strokeWidth:"4",strokeLinecap:"round",strokeLinejoin:"round"})}),Ii=()=>t("svg",{width:"56",height:"56",viewBox:"0 0 56 56",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e("rect",{width:"56",height:"56",rx:"24",fill:"#8946FB"}),e("path",{d:"M28 36.4722C29.0615 37.4223 30.4633 38 32 38C35.3137 38 38 35.3137 38 32C38 29.2331 36.1271 26.9036 33.5798 26.2102M22.4202 26.2102C19.8729 26.9036 18 29.2331 18 32C18 35.3137 20.6863 38 24 38C27.3137 38 30 35.3137 30 32C30 31.2195 29.851 30.4738 29.5798 29.7898M34 24C34 27.3137 31.3137 30 28 30C24.6863 30 22 27.3137 22 24C22 20.6863 24.6863 18 28 18C31.3137 18 34 20.6863 34 24Z",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),Oi=()=>t("svg",{width:"56",height:"56",viewBox:"0 0 56 56",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e("rect",{width:"56",height:"56",rx:"24",fill:"#7ED846"}),e("path",{d:"M20.5 38V33M20.5 23V18M18 20.5H23M18 35.5H23M29 19L27.2658 23.5089C26.9838 24.2421 26.8428 24.6087 26.6235 24.9171C26.4292 25.1904 26.1904 25.4292 25.9171 25.6235C25.6087 25.8428 25.2421 25.9838 24.5089 26.2658L20 28L24.5089 29.7342C25.2421 30.0162 25.6087 30.1572 25.9171 30.3765C26.1904 30.5708 26.4292 30.8096 26.6235 31.0829C26.8428 31.3913 26.9838 31.7579 27.2658 32.4911L29 37L30.7342 32.4911C31.0162 31.7579 31.1572 31.3913 31.3765 31.0829C31.5708 30.8096 31.8096 30.5708 32.0829 30.3765C32.3913 30.1572 32.7579 30.0162 33.4911 29.7342L38 28L33.4911 26.2658C32.7579 25.9838 32.3913 25.8428 32.0829 25.6235C31.8096 25.4292 31.5708 25.1904 31.3765 24.9171C31.1572 24.6087 31.0162 24.2421 30.7342 23.5089L29 19Z",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),Ei=t=>e(oe,Object.assign({component:bi},t)),Pi=t=>e(oe,Object.assign({component:yi},t)),Mi=t=>e(oe,Object.assign({component:wi},t)),Fi=t=>e(oe,Object.assign({component:xi},t)),ji=t=>e(oe,Object.assign({component:Ci},t)),Di=t=>e(oe,Object.assign({component:_i},t)),Ri=t=>e(oe,Object.assign({component:Si},t)),Li=t=>e(oe,Object.assign({component:Ai},t)),zi=t=>e(oe,Object.assign({component:ki},t)),Ni=t=>e(oe,Object.assign({component:Ti},t)),Bi=t=>e(oe,Object.assign({component:Ii},t)),Vi=t=>e(oe,Object.assign({component:Oi},t)),Ui="filemanager_view_mode",Wi=()=>{const{options:e}=ri(),{customIcons:t}=e,n=(e,n,r)=>{const o=null==t?void 0:t[e];return o?i.createElement(o,r):i.createElement(n,r)};return{RootFolderIcon:e=>n("rootFolder",ae,e),FolderIcon:e=>n("folder",ae,e),FolderOpenIcon:e=>n("folderOpen",me,e),AddFolderIcon:e=>n("addFolder",ge,e),FileIcon:e=>n("file",pe,e),UploadIcon:e=>n("upload",fe,e),UploadByUrlIcon:e=>n("uploadByUrl",de,e),ExpandArrowIcon:e=>n("expandArrow",he,e),CollapseArrowIcon:e=>n("collapseArrow",ue,e),ExpandFolderIcon:e=>n("expandArrow",Mr,e),CollapseFolderIcon:e=>n("collapseArrow",Pr,e),FolderPreviewIcon:e=>n("folderPreview",Ri,e),EmptyFolderIcon:e=>n("folderPreview",zi,e),GridViewIcon:e=>n("gridView",ce,e),ListViewIcon:e=>n("listView",le,e),DropZoneFileIcon:e=>n("folderPreview",Ni,e),BigStockIcon:e=>n("folderPreview",Bi,e),BigAIIcon:e=>n("folderPreview",Vi,e),getCustomIcon:n}};var Hi={headerContainer:"headerContainer",actionsContainer:"actionsContainer",filesContainer:"filesContainer",paginationContainer:"paginationContainer",uploadIcon:"uploadIcon",tableContainer:"tableContainer",imagePreview:"imagePreview",fileManagerTableFolder:"fileManagerTableFolder",fileManagerTableFolderInner:"fileManagerTableFolderInner",sortSelect:"sortSelect",fileNameCol:"fileNameCol",fileItemCount:"fileItemCount",fileSize:"fileSize",fileDate:"fileDate",tableMenu:"tableMenu",tableImagePreview:"tableImagePreview",tableFolderIcon:"tableFolderIcon",buttonDeselected:"buttonDeselected",gridRow:"gridRow",gridCard:"gridCard",selectedRow:"selectedRow",gridCardSelected:"gridCardSelected",gridCheckbox:"gridCheckbox",gridCardContent:"gridCardContent",gridPreviewContainer:"gridPreviewContainer",gridPreviewContainerFolder:"gridPreviewContainerFolder",gridFolderIcon:"gridFolderIcon",gridFolderIconImage:"gridFolderIconImage",gridFileName:"gridFileName",gridFileInfo:"gridFileInfo",gridFileMenu:"gridFileMenu",gridFileMenuButton:"gridFileMenuButton",actionsBox:"actionsBox",uploadContainer:"uploadContainer",uploadArea:"uploadArea",active:"active",blockText:"blockText",textTitle:"textTitle",textDescription:"textDescription",buttons:"buttons",btnAi:"btnAi",btnPhoto:"btnPhoto"};const{Text:Yi}=F,{Option:$i}=j,Gi=({files:r,handleSearch:s,handleSort:l,sortBy:h,sortOrder:d,handleSortOptionChange:f,pagination:p,setPagination:g,loading:m,handleItemClick:v,selectedFiles:b,toggleFileSelection:y,handleDroppedFiles:w,onRename:x,onDelete:C,onCopy:_,onMove:S,onEdit:A,fileUpload:k,handleAddFile:T})=>{var I,O,P,M,F;const{t:$}=An(),{FolderPreviewIcon:G,DropZoneFileIcon:X,BigStockIcon:K,BigAIIcon:q}=Wi(),{options:Z,actions:J}=ri(),Q=null===(I=null==Z?void 0:Z.config)||void 0===I?void 0:I.disablePagination,{dataProviders:ee}=Z,{setCurrentMenuFile:te,setSelectedFiles:ne,setActiveLibraryItem:re}=J,{viewMode:ie,setViewMode:oe}=(()=>{const[e,t]=o(()=>{try{return localStorage.getItem(Ui)||"table"}catch(e){return"table"}}),n=c(e=>{t(e);try{localStorage.setItem(Ui,e)}catch(e){console.warn("Не удалось сохранить режим отображения:",e)}},[]),r=c(()=>{n("table"===e?"grid":"table")},[e,n]);return{viewMode:e,setViewMode:n,toggleViewMode:r}})(),[ae,se]=o(!1),[le,ce]=o({}),[ue,he]=o(null),de=u(0),[fe,pe]=o(!1);a(()=>{const e=()=>{pe(window.innerWidth<1200)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);const ge=b.size,me=!1!==(null===(P=null===(O=Z.config)||void 0===O?void 0:O.features)||void 0===P?void 0:P.enableRenameFile)||!1!==(null===(F=null===(M=Z.config)||void 0===M?void 0:M.features)||void 0===F?void 0:F.enableRenameFolder),ve=i.useMemo(()=>{var e,t;if(1!==ge)return!1;const n=Array.from(b)[0],i=r.find(e=>e.id===n);if(!i||i.isFolder)return!1;let o=!1;if(i.type&&i.type.startsWith("image/"))o=!0;else if(i.extension){const e=i.extension.toLowerCase();o=ei.includes(e)}else{const t=null===(e=i.name.split(".").pop())||void 0===e?void 0:e.toLowerCase();o=!!t&&ei.includes(t)}return console.warn("isImageSelected проверка:",{fileName:i.name,fileType:i.type,fileExtension:i.extension,nameExtension:null===(t=i.name.split(".").pop())||void 0===t?void 0:t.toLowerCase(),isImage:o,IMAGE_EXTENSIONS:ei}),o},[ge,b,r]),be=`${h}-${d}`,ye=i.useMemo(()=>Array.isArray(r)&&r.some(e=>(e=>{if(!e)return!1;const t=new Date(e);return!Number.isNaN(t.getTime())})(e.date)),[r]),we=c(async e=>{try{if(null==ee?void 0:ee.getChildrenCount)return await ee.getChildrenCount("folders"===e?void 0:e);if(null==ee?void 0:ee.getFiles){const{files:t,pagination:n}=await ee.getFiles({folderId:"folders"===e?void 0:e,itemType:"all"});return(null==n?void 0:n.total)||t.filter(e=>!e.isFolder).length}return 0}catch(t){return console.error(`Ошибка при получении количества файлов для папки ${e}:`,t),0}},[ee]),xe=c(async()=>{const e=r.filter(e=>e.isFolder);if(0===e.length)return;const t={},n=e.map(async e=>{t[e.id]=await we(e.id)});await Promise.all(n),ce(t)},[r,we]);a(()=>{xe()},[xe]);const Ce=c(e=>{e.preventDefault(),e.stopPropagation(),de.current+=1,e.dataTransfer.types&&e.dataTransfer.types.includes("Files")&&se(!0)},[]),_e=c(e=>{e.preventDefault(),e.stopPropagation(),de.current-=1,0===de.current&&se(!1)},[]),Se=c(e=>{e.preventDefault(),e.stopPropagation()},[]),Ae=c(e=>{if(e.preventDefault(),e.stopPropagation(),se(!1),de.current=0,e.dataTransfer.files&&e.dataTransfer.files.length>0){const t=Array.from(e.dataTransfer.files);w(t).catch(e=>{console.error("Ошибка при загрузке файлов:",e),E.error("Произошла ошибка при загрузке файлов")})}},[w]),ke=(e=()=>{})=>{if(ue)return;const t=setTimeout(()=>{e(),he(null)},300);he(t)},Te=e=>{ue&&(clearTimeout(ue),he(null)),e()},Ie=t=>{var n,r,i,o,a,s,l,c,u,h;const d=[],f=(null===(n=Z.config)||void 0===n?void 0:n.features)||{};t.isFolder||!1!==f.enableEdit&&d.push({key:"edit",label:$("Edit"),icon:e(Ir,{size:16,strokeWidth:null===(r=Z.config)||void 0===r?void 0:r.iconStrokeWidth})}),!1!==f.enableMove&&d.push({key:"move",label:$("Move to"),icon:e(Er,{size:16,strokeWidth:null===(i=Z.config)||void 0===i?void 0:i.iconStrokeWidth})}),!1!==f.enableCopy&&d.push({key:"copy",label:$("Copy"),icon:e(Tr,{size:16,strokeWidth:null===(o=Z.config)||void 0===o?void 0:o.iconStrokeWidth})});return(t.isFolder?!1!==(null===(s=null===(a=Z.config)||void 0===a?void 0:a.features)||void 0===s?void 0:s.enableRenameFolder):!1!==(null===(c=null===(l=Z.config)||void 0===l?void 0:l.features)||void 0===c?void 0:c.enableRenameFile))&&d.push({key:"rename",label:$("Rename"),icon:e(Vr,{size:16,strokeWidth:null===(u=Z.config)||void 0===u?void 0:u.iconStrokeWidth})}),!1!==f.enableDelete&&d.push({key:"delete",label:$("Delete"),icon:e(Ur,{size:16,strokeWidth:null===(h=Z.config)||void 0===h?void 0:h.iconStrokeWidth}),style:{color:"#ff4d4f"}}),d},Oe=e=>({key:t})=>{const n=r.find(t=>t.id===e);switch(te&&(null==n?void 0:n.id)&&te(null==n?void 0:n.id),t){case"edit":A(n);break;case"move":S();break;case"copy":_();break;case"rename":x(e);break;case"delete":C(n);break;default:te&&te("")}},Ee=[{key:"selection",width:46,render:(t,n)=>e(D,{checked:b.has(n.id),onChange:()=>y(n.id)})},{key:"preview",width:60,render:(t,n)=>n.isFolder?e("div",{className:Hi.fileManagerTableFolder,children:e("div",{className:Hi.fileManagerTableFolderInner,children:e(Di,{className:Hi.tableFolderIcon,style:{width:40,height:40}})})}):e(vi,{className:`${Hi.imagePreview} ${Hi.tableImagePreview}`,src:n.thumbnail||n.thumbnailUrl||n.url,alt:n.name,width:40,height:40,preview:!0,file:n})},{title:$("Name"),width:"calc(100% - 430px)",dataIndex:"name",key:"name",className:Hi.fileNameCol,render:(e,n)=>{const r=n.isFolder&&le[n.id]||0,i=$(1===r?"item":"items");return t("div",{className:Hi.fileName,children:[e||$("No name"),n.isFolder&&t("div",{className:Hi.fileItemCount,children:[r," ",i]})]})}},{title:$("Dimensions"),key:"dimensions",width:100,render:(t,n)=>e("div",{className:Hi.fileSize,children:n.isFolder?$("Folder"):$("File")})},...ye?[{title:$("Date"),dataIndex:"date",key:"date",width:180,render:(t,n)=>{const r=n.date;if(!r)return null;const i=new Date(r);if(isNaN(i.getTime()))return null;return e("div",{className:Hi.fileDate,children:$("date_of_add",{date:(o=i,`${o.getDate()} ${[$("months.january"),$("months.february"),$("months.march"),$("months.april"),$("months.may"),$("months.june"),$("months.july"),$("months.august"),$("months.september"),$("months.october"),$("months.november"),$("months.december")][o.getMonth()]} ${o.getFullYear()}`)})});var o}}]:[],{width:40,title:"",dataIndex:"",key:"x",onCell:()=>({style:{padding:0}}),render:(t,n)=>{var r;return e(R,{arrow:!0,placement:"bottom",menu:{items:Ie(n),onClick:Oe(n.id)},trigger:["hover"],children:e("span",{className:`${Hi.tableMenu} tableMenuButton`,onClick:e=>{e.stopPropagation(),e.preventDefault()},children:e(Or,{size:16,strokeWidth:null===(r=Z.config)||void 0===r?void 0:r.iconStrokeWidth})})})}}],Pe=()=>{var n,i,o,a,l,c,u,h,d;return t("div",ge?{className:`header-container ${Hi.headerContainer}`,children:[t(Yi,{type:"secondary",className:"selected-text",children:[ge," ",$("selected"),e(W,{title:fe?$("Deselected"):null,children:e(U,{className:Hi.buttonDeselected,icon:e(zr,{size:16,strokeWidth:null===(n=Z.config)||void 0===n?void 0:n.iconStrokeWidth}),onClick:()=>ne&&ne(new Set),children:$("Deselect")})})]}),t(H,{children:[ve&&e(W,{title:fe?$("Edit"):null,children:e(U,{icon:e(Ir,{size:16,strokeWidth:null===(i=Z.config)||void 0===i?void 0:i.iconStrokeWidth}),onClick:()=>{const e=Array.from(b)[0],t=r.find(t=>t.id===e);A(t)},disabled:!ve,children:$("Edit")})}),e(W,{title:fe?$("Move to"):null,children:e(U,{icon:e(Er,{size:16,strokeWidth:null===(o=Z.config)||void 0===o?void 0:o.iconStrokeWidth}),onClick:S,children:$("Move to")})}),e(W,{title:fe?$("Copy"):null,children:e(U,{icon:e(Tr,{size:16,strokeWidth:null===(a=Z.config)||void 0===a?void 0:a.iconStrokeWidth}),onClick:_,children:$("Copy")})}),!(1!==ge||!me)&&e(W,{title:fe?$("Rename"):null,children:e(U,{icon:e(Vr,{size:16,strokeWidth:null===(l=Z.config)||void 0===l?void 0:l.iconStrokeWidth}),onClick:()=>x(),disabled:1!==ge||!me,children:$("Rename")})}),e(W,{title:fe?$("Delete"):null,children:e(U,{danger:!0,icon:e(Ur,{size:16,strokeWidth:null===(c=Z.config)||void 0===c?void 0:c.iconStrokeWidth}),onClick:e=>{e.stopPropagation(),e.preventDefault(),C()},children:$("Delete")})})]})]}:{className:Hi.headerContainer,children:[e("div",{className:"search-container",children:e(fi,{placeholder:$("Search"),onSearch:s,className:Hi.searchInput})}),t("div",{className:Hi.actionsBox,children:[e("div",{className:"sort-container",children:t(j,{value:be,onChange:f,className:Hi.sortSelect,popupMatchSelectWidth:!1,suffixIcon:e(Ar,{size:16,strokeWidth:null===(u=Z.config)||void 0===u?void 0:u.iconStrokeWidth}),children:[e($i,{value:"date-desc",children:$("Newest first")}),e($i,{value:"date-asc",children:$("Oldest first")}),e($i,{value:"size-desc",children:$("Largest first")}),e($i,{value:"size-asc",children:$("Smallest first")}),e($i,{value:"name-asc",children:$("A-Z")}),e($i,{value:"name-desc",children:$("Z-A")}),e($i,{value:"type-asc",children:$("By type")})]})}),e("div",{className:Hi.actionsContainer,children:e(Y,{options:[{value:"grid",icon:e(Fr,{size:16,strokeWidth:null===(h=Z.config)||void 0===h?void 0:h.iconStrokeWidth})},{value:"table",icon:e(Dr,{size:20,strokeWidth:null===(d=Z.config)||void 0===d?void 0:d.iconStrokeWidth})}],value:ie,onChange:e=>oe(e)})})]})]})},Me=t("div","table"===ie?{className:Hi.tableContainer,children:[Pe(),e(z,{dataSource:r,columns:Ee,rowKey:"id",pagination:!1,loading:m,rowClassName:e=>(null==b?void 0:b.has(e.id))?Hi.selectedRow:"",tableLayout:"fixed",onRow:e=>({onClick:t=>{const n=t.target;ke(()=>{t.stopPropagation(),t.preventDefault();const r=!!n.closest(".ant-image")||!!n.closest(".ant-image-preview-wrap"),i=!!n.closest(".tableMenuButton"),o=!!n.closest(".ant-dropdown-menu");r||i||o||y(e.id)})},onDoubleClick:t=>{Te(()=>{t.stopPropagation(),t.preventDefault();const n=t.target;e.isFolder?v(e):n.closest(".ant-image")||n.closest(".ant-image-preview-wrap")||!Z.onEditorOk||(console.warn("onEditorOk"),Z.onEditorOk(e))})}}),showHeader:!1})]}:{className:Hi.tableContainer,children:[Pe(),e(N,{gutter:[16,16],className:Hi.gridRow,style:{gap:20,padding:"0 24px 24px",margin:0},children:r.map(r=>{var i;return e(B,{className:Hi.gridCard_col,style:{padding:0},children:t(V,{hoverable:!0,cover:e("div",{className:r.isFolder?Hi.gridPreviewContainerFolder:Hi.gridPreviewContainer,onClick:e=>{e.stopPropagation(),r.isFolder&&ke(()=>{y(r.id)})},onDoubleClick:e=>{e.stopPropagation(),Te(()=>{r.isFolder&&v(r)})},children:r.isFolder?e("div",{className:Hi.gridFolderIcon,children:e(G,{className:Hi.gridFolderIconImage})}):e(vi,{src:r.thumbnail||r.thumbnailUrl||r.url,alt:r.name,className:Hi.gridImagePreview,preview:!0,file:r})}),className:`${Hi.gridCard} ${(null==b?void 0:b.has(r.id))?Hi.gridCardSelected:""}`,onClick:e=>{e.stopPropagation(),e.preventDefault();const t=e.target;t.closest(".gridFileMenuButton")||t.closest(".ant-dropdown-menu")||ke(()=>y(r.id))},onDoubleClick:e=>{e.stopPropagation(),Te(()=>{r.isFolder&&v(r)})},children:[t("div",{className:Hi.gridCardContent,onDoubleClick:e=>{e.stopPropagation(),e.preventDefault(),Te(()=>{Z.onEditorOk&&Z.onEditorOk(r)})},onClick:e=>{e.stopPropagation(),e.preventDefault();const t=e.target;t.closest(".gridFileMenuButton")||t.closest(".ant-dropdown-menu")||ke(()=>y(r.id))},children:[e("div",{className:Hi.gridFileName,children:r.name||$("Untitled")}),e("div",{className:Hi.gridFileInfo,children:r.isFolder?(()=>{const e=le[r.id]||0;return`${e} ${$(1===e?"item":"items")}`})():t(n,{children:[r.dimensions&&`${r.dimensions} • `,r.size&&`${(r.size/1e6).toFixed(2)} ${$("MB")} • `,r.extension&&`${r.extension}`]})})]}),e("div",{className:Hi.gridFileMenu,children:e(R,{menu:{items:Ie(r),onClick:Oe(r.id)},arrow:!0,placement:"bottom",trigger:["hover"],children:e(U,{type:"default",className:`${Hi.gridFileMenuButton} gridFileMenuButton`,onClick:()=>{},children:e(Or,{size:16,strokeWidth:null===(i=Z.config)||void 0===i?void 0:i.iconStrokeWidth})})},r.id)}),e("div",{onClick:e=>{e.stopPropagation()},className:Hi.gridCheckbox,children:e(D,{checked:b.has(r.id),style:{height:20},onChange:e=>{e.stopPropagation(),y(r.id)}})})]})},r.id)})})]});return e("div",{className:"content-layout",children:t("div",{className:Hi.filesContainer,children:[m||0!==(null==r?void 0:r.length)?Me:t("div",{className:Hi.uploadContainer,children:[t("div",{className:`${Hi.uploadArea} ${ae?Hi.active:""}`,onClick:T,onDragOver:Se,onDragLeave:_e,onDragEnter:Ce,onDrop:Ae,children:[e("div",{className:Hi.uploadIcon,children:e(X,{})}),e("div",{className:Hi.textTitle,children:$("Select a file or drag and drop it here")}),e("div",{className:Hi.textDescription,children:$("Supported files:")+" jpeg, .svg, .png"})]}),t("div",{className:Hi.buttons,children:[t("button",{className:Hi.btnPhoto,onClick:()=>{re&&re(qr)},children:[e("div",{className:Hi.icon,children:e(K,{})}),t("div",{className:Hi.blockText,children:[e("div",{className:Hi.textTitle,children:$("Stock")}),e("div",{className:Hi.textDescription,children:$("Select an image from our library")})]})]}),t("button",{className:Hi.btnAi,onClick:()=>{re&&re(Zr)},children:[e("div",{className:Hi.icon,children:e(q,{})}),t("div",{className:Hi.blockText,children:[e("div",{className:Hi.textTitle,children:$("AI generation")}),e("div",{className:Hi.textDescription,children:$("Creating an image on demand")})]})]})]})]}),!Q&&p.total>p.pageSize&&e("div",{className:Hi.paginationContainer,children:e(L,{current:p.current,pageSize:p.pageSize,total:p.total,onChange:(e,t)=>g({current:e,pageSize:t,total:p.total}),showSizeChanger:!0,showTotal:e=>$("total pages",{total:e})})})]})})},Xi=({isModalVisible:r,handleModalOk:i,handleModalCancel:o,form:a,selectedFolder:s,folders:l,isUrlModalVisible:c,setIsUrlModalVisible:u,handleAddFileByUrl:h,urlForm:d,isRenameModalVisible:f,handleRenameOk:p,handleRenameCancel:g,renameForm:m,fileToRename:v,files:b,isMoveModalVisible:y,handleMoveOk:w,handleMoveCancel:x,moveForm:C,selectedFiles:_,isRenameFolderModalVisible:S,handleRenameFolderOk:A,handleRenameFolderCancel:k,renameFolderForm:T,folderToRename:I,isCopyModalVisible:E,handleCopyOk:M,handleCopyCancel:F,copyForm:j,isDeleteConfirmVisible:D,handleDeleteConfirmOk:R,handleDeleteConfirmCancel:L,fetchChildFolders:z})=>{var N,B,V;const{t:U}=An(),W=O.useWatch("folderName",a),H=!W||0===String(W).trim().length,Y=Array.isArray(b)?b:[],X=v?null===(N=Y.find(e=>e.id===v))||void 0===N?void 0:N.name:"",K=Array.isArray(l)?l:[],q=I?null===(B=K.find(e=>e.id===I))||void 0===B?void 0:B.name:"",Z=v?Y.find(e=>e.id===v):null,J=(null==Z?void 0:Z.isFolder)||(null==v?void 0:v.startsWith("folder_")),Q=()=>{const t=(n=null,r=new Set)=>l.filter(e=>{const t=null===n&&!e.parentId,r=e.parentId===n;return t||r}).map(n=>{if(r.has(n.id))return{key:n.id,title:`${n.name} (циклическая ссылка)`,icon:e(ae,{style:{color:"red"}}),disabled:!0,isLeaf:!0};const i=Array.from(_).includes(n.id),o=new Set(r);o.add(n.id);const a=t(n.id,o);return{key:n.id,title:n.name,icon:e(ae,{}),disabled:i,children:a.length>0?a:void 0,isLeaf:0===a.length}}),n=t();return[{key:"root",title:U("Folders"),icon:e(ae,{}),children:n}]};return t(n,{children:[e($,{title:e("div",{className:"modal-title",children:U("Creating a new folder")}),open:r,onOk:i,onCancel:o,okText:U("Create"),cancelText:U("Cancel"),okButtonProps:{disabled:H},children:t(O,{form:a,layout:"vertical",children:[e(O.Item,{name:"folderName",label:e("div",{className:"form-label",children:U("Folder name")}),rules:[{required:!0,message:U("Enter the name of the folder")},{validator:(e,t)=>"string"==typeof t&&0===t.trim().length?Promise.reject(new Error(U("Enter the name of the folder"))):Promise.resolve()}],initialValue:U("New folder"),className:"form-item",children:e(P,{autoFocus:!0,className:"form-input"})}),e("div",{children:s&&"folders"!==s?t("p",{children:[U("A folder will be created inside:")," ",(null===(V=K.find(e=>e.id===s))||void 0===V?void 0:V.name)||U("selected folder")]}):e("p",{children:U("The folder will be created in the root directory")})})]})}),e($,{title:e("div",{className:"modal-title",children:U("Upload image by URL")}),open:c,onOk:()=>h(null),onCancel:()=>u(!1),okText:U("Download"),cancelText:U("Cancel"),children:t(O,{form:d,layout:"vertical",children:[e(O.Item,{name:"fileUrl",label:e("div",{className:"form-label",children:U("image URL")}),rules:[{required:!0,message:U("Enter the URL of the image")}],className:"form-item",children:e(P,{autoFocus:!0,placeholder:"https://example.com/image.jpg",className:"form-input"})}),e("p",{children:U("Supported formats: JPG, JPEG, PNG, GIF, WEBP, SVG, BMP")})]})}),e($,{title:e("div",{className:"modal-title",children:J?`${U("Rename folder")} ${X}`:U("Rename file",{currentFileName:X})}),open:f,onOk:p,onCancel:g,okText:U("Rename"),cancelText:U("Cancel"),children:e(O,{form:m,layout:"vertical",children:e(O.Item,{name:"newFileName",label:e("div",{className:"form-label",children:U(J?"New folder name":"New file name")}),rules:[{required:!0,message:U(J?"Enter a new folder name":"Enter a new file name")}],className:"form-item",children:e(P,{autoFocus:!0,className:"form-input"})})})}),e($,{title:e("div",{className:"modal-title",children:U("Move to")}),open:y,onOk:w,onCancel:x,okText:"Переместить",cancelText:U("Cancel"),children:t(O,{form:C,layout:"vertical",children:[e("div",{className:"file-name-label",children:U("Selected files:",{count:_.size})}),e(O.Item,{name:"targetFolder",label:e("div",{className:"form-label",children:U("Select the destination folder")}),rules:[{required:!0,message:U("Select the destination folder")}],className:"form-item",children:e(G,{defaultExpandAll:!0,treeData:Q(),selectable:!0,onSelect:async e=>{e.length>0&&(C.setFieldsValue({targetFolder:e[0]}),await z(e[0].toString()))}})})]})}),e($,{title:t("div",{className:"modal-title",children:[U("Rename folder")," ",q]}),open:S,onOk:A,onCancel:k,okText:U("Rename"),cancelText:U("Cancel"),children:e(O,{form:T,layout:"vertical",children:e(O.Item,{name:"newFolderName",label:e("div",{className:"form-label",children:U("New folder name")}),rules:[{required:!0,message:U("Enter a new folder name")}],className:"form-item",children:e(P,{autoFocus:!0,className:"form-input"})})})}),e($,{title:e("div",{className:"modal-title",children:U("Copy to folder")}),open:E,onOk:M,onCancel:F,okText:U("Copy"),cancelText:U("Cancel"),children:t(O,{form:j,layout:"vertical",children:[e("div",{className:"file-name-label",children:U("Selected files:",{count:_.size})}),e(O.Item,{name:"targetFolder",label:e("div",{className:"form-label",children:U("Select the destination folder")}),rules:[{required:!0,message:U("Select the destination folder")}],className:"form-item",children:e(G,{defaultExpandAll:!0,treeData:Q(),selectable:!0,onSelect:async e=>{e.length>0&&(j.setFieldsValue({targetFolder:e[0]}),await z(e[0].toString()))}})})]})}),e($,{title:e("div",{className:"modal-title",children:U("Confirm deletion")}),open:!!D,onOk:()=>R&&R(),onCancel:()=>L&&L(),okText:U("Delete"),cancelText:U("Cancel"),okButtonProps:{danger:!0},children:e("div",{children:U("Are you sure you want to delete the selected items?")})})]})},Ki=e=>{var t;const{state:n,actions:r,options:i}=ri(),{t:o}=An(),{folders:a,folderToRename:s,renameFolderForm:l,isRenameFolderModalVisible:u}=n,{setFolderToRename:h,setIsRenameFolderModalVisible:d}=r,{apiEndpoints:f,dataProviders:p,config:g}=i,m=c(e=>{null==h||h(e),null==d||d(!0);const t=null==a?void 0:a.find(t=>t.id===e);t&&l&&l.setFieldsValue({newFolderName:t.name})},[h,d,a,l]),v=c(()=>{null==d||d(!1),null==h||h(null),null==l||l.resetFields()},[d,h,l]),b=c(async()=>{var t;if(s&&l)try{const n=await l.validateFields();if(!(null==n?void 0:n.newFolderName))return;if(!(!1!==(null===(t=null==g?void 0:g.features)||void 0===t?void 0:t.enableRenameFolder)))return void E.error(o("Folder rename is disabled by config"));if(!(null==p?void 0:p.renameFolder))throw new Error("renameFolder не реализован в dataProviders");const i=await p.renameFolder(s,n.newFolderName.trim());if(!(null==i?void 0:i.id))return void E.error("Некорректный ответ при переименовании папки");E.success(`${o("Folder renamed to")} ${n.newFolderName}`),v(),await e(),s!==i.id&&r.setSelectedFolder&&r.setSelectedFolder(i.id)}catch(e){console.error("Ошибка при переименовании папки:",e),E.error("Ошибка при переименовании папки")}},[s,l,f,v,e,o,null===(t=null==g?void 0:g.features)||void 0===t?void 0:t.enableRenameFolder]);return{state:{isRenamingFolder:u||!1,folderToRename:s},actions:{showRenameFolderModal:m,handleRenameFolderCancel:v,handleRenameFolderOk:b}}};var qi="button",Zi="foldersTitle",Ji="folderActions",Qi="fileCount",eo="uploadButton",to="folderMenu",no="folderLabelItem",ro="foldersTitleItem",io="folderLabel",oo="foldersContainer",ao="divider",so="buttonWrapper",lo="uploadButtonTitle",co="emptyFolderContainer";const uo=f(p(({selectedFolder:n,generateMenuItems:r,onFolderSelect:i,folders:s,fetchFolders:l,fetchChildFolders:u,handleAddFile:d,setIsUrlModalVisible:f,handleCreateFolder:p,activeLibraryItem:m,setActiveLibraryItem:v},b)=>{const y=h(()=>Array.isArray(s)?s:[],[s]),{t:w}=An(),[x,C]=o({}),{options:_}=ri(),{dataProviders:S,config:A}=_;Ki(l);const{UploadByUrlIcon:k,ExpandArrowIcon:T,CollapseArrowIcon:I,CollapseFolderIcon:O,ExpandFolderIcon:E,EmptyFolderIcon:P}=Wi(),M=c(e=>{const t=[],n=e=>{e.forEach(e=>{t.push(e.key),e.children&&n(e.children)})};return n(e),t},[]),[F,j]=o(()=>{if(!0===(null==A?void 0:A.expandAllFoldersOnInit)&&"lazy"!==(null==A?void 0:A.folderTreeLoading)){const e=r();return M(e)}return[]});a(()=>{if(!0===(null==A?void 0:A.expandAllFoldersOnInit)&&"lazy"!==(null==A?void 0:A.folderTreeLoading)){const e=r(),t=M(e);j(t)}},[y,r,M,null==A?void 0:A.expandAllFoldersOnInit,null==A?void 0:A.folderTreeLoading]);const D=c(async e=>{try{if(null==S?void 0:S.getChildrenCount)return await S.getChildrenCount("folders"===e?void 0:e);if(null==S?void 0:S.getFiles){const{files:t,pagination:n}=await S.getFiles({folderId:"folders"===e?void 0:e,itemType:"all"});return(null==n?void 0:n.total)||t.filter(e=>!e.isFolder).length}return 0}catch(t){return console.error(`Ошибка при получении количества файлов для папки ${e}:`,t),0}},[S]),L=c(async()=>{if(0===y.length)return;const e={};e.folders=await D("folders");const t=y.map(async t=>{const n=await D(t.id);e[t.id]=n});await Promise.all(t),C(e)},[y,D]),z=c(async e=>{const t=await D(e);C(n=>Object.assign(Object.assign({},n),{[e]:t}))},[D]);g(b,()=>({refreshFileCounts:L}),[L]),a(()=>{L()},[L]);const N=c(async()=>{await d(),n?await z(n):await z("folders")},[d,n,z]),B=h(()=>({items:[{key:"upload-url",label:w("Upload image by URL"),icon:e(Wr,{size:18,strokeWidth:null==A?void 0:A.iconStrokeWidth}),onClick:()=>null==f?void 0:f(!0)}]}),[k,f,w]),V=[{key:Xr,label:w("My files"),icon:e(jr,{size:20,strokeWidth:null==A?void 0:A.iconStrokeWidth})},{key:Kr,label:w("GIF"),icon:e(Rr,{size:20,strokeWidth:null==A?void 0:A.iconStrokeWidth})},{key:qr,label:w("Stock images"),icon:e(kr,{size:20,strokeWidth:null==A?void 0:A.iconStrokeWidth})},{key:Zr,label:w("AI"),icon:e(Br,{size:20,strokeWidth:null==A?void 0:A.iconStrokeWidth}),disabled:!(null==A?void 0:A.sseQuery)}],W=c(async e=>{const t=e[0];t&&"empty"!==t&&(m!==Xr&&v(Xr),null==i||i(t),await(null==u?void 0:u(t)))},[i,m,v,u]),H=c(({key:e})=>{console.warn("key",e),v(e)},[v]),Y=c(async(e,t)=>{var n;j(e);if(!("lazy"===(null==A?void 0:A.folderTreeLoading)))return;const r=(null===(n=null==t?void 0:t.node)||void 0===n?void 0:n.key)||void 0;if(r&&"folders"!==r)try{await(null==u?void 0:u(r))}catch(e){console.warn("Не удалось подгрузить дочерние папки для",r,e)}},[null==A?void 0:A.folderTreeLoading,u]),$=c(()=>{var i,o;const a=r(),s=e=>{F.includes(e)&&n===e?j(F.filter(t=>t!==e)):F.includes(e)||j([...F,e]),n!==e&&W([e])};if(0===a.length||1===a.length&&(!a[0].children||0===a[0].children.length))return[{key:"empty",title:e("div",{className:co,children:w("No data to display")})}];const l=n=>{var r;const i=x[n.key]||0,o=F.includes(n.key),a=(()=>{var t;return(null===(t=n.children)||void 0===t?void 0:t.length)?e(o?O:E,{size:20,strokeWidth:null==A?void 0:A.iconStrokeWidth}):e(P,{size:20,strokeWidth:null==A?void 0:A.iconStrokeWidth})})(),c=t("div",{className:"folder-item-container",onClick:()=>s(n.key),children:[t("div",{className:io,children:[n.icon||a,e("span",{className:no,children:n.label})]}),e("div",{className:Qi,title:`${i} ${1===i?"файл":"файлов"}`,children:i})]});return{key:n.key,title:c,children:null===(r=n.children)||void 0===r?void 0:r.map(l)}},c=F.includes("folders"),u=e("div",{className:Zi,onClick:()=>s("folders"),children:t("div",{className:ro,children:[e(c?O:E,{size:20,strokeWidth:null==A?void 0:A.iconStrokeWidth}),e("span",{className:no,children:w("Folders")})]})});return a.length>0&&"folders"===a[0].key?(null==A?void 0:A.enableTrashFolder)?[{key:"folders",title:u,children:null===(i=a[0].children)||void 0===i?void 0:i.map(l)},{key:"Trash",title:e("div",{className:Zi,onClick:()=>s("folders"),children:t("div",{className:ro,children:[e(Ur,{size:20,strokeWidth:null==A?void 0:A.iconStrokeWidth}),e("span",{className:no,children:w("Trash")})]})})}]:[{key:"folders",title:u,children:null===(o=a[0].children)||void 0===o?void 0:o.map(l)}]:a.map(l)},[r,F,O,null==A?void 0:A.iconStrokeWidth,null==A?void 0:A.enableTrashFolder,E,w,n,W,x,P]),q=h(()=>$(),[$]);return t("div",{className:"sidebar-container",children:[e("div",{className:so,children:t(R.Button,{type:"primary",size:"large",icon:e(Ar,{size:24,strokeWidth:null==A?void 0:A.iconStrokeWidth}),onClick:N,menu:B,className:eo,children:[e(Lr,{size:24,strokeWidth:null==A?void 0:A.iconStrokeWidth})," ",e("span",{className:lo,children:w("Upload image")})]})}),e(X,{className:"folder-menu",items:V,defaultSelectedKeys:[Xr],onSelect:({key:e})=>H({key:e}),selectedKeys:[m]}),e(K,{className:ao}),t("div",{className:oo,children:[e(G,{className:`${to} folder-tree`,selectedKeys:[n],defaultSelectedKeys:[n],expandedKeys:F,defaultExpandedKeys:[],onSelect:W,onExpand:Y,treeData:q,switcherIcon:({expanded:t})=>e(t?I:T,{}),showLine:!1}),e("div",{className:Ji,children:e(U,{onClick:e=>{e.stopPropagation(),p()},className:qi,icon:e(Mr,{size:18,strokeWidth:null==A?void 0:A.iconStrokeWidth}),size:"middle"})})]})]})}));uo.displayName="FolderSidebar";var ho=Object.defineProperty,fo=(e,t,n)=>(((e,t,n)=>{t in e?ho(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n),po=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function go(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function mo(e){var t=e.default;if("function"==typeof t){var n=function(){return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}var vo=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===bo}(e)}(e)};var bo="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function yo(e,t){return!1!==t.clone&&t.isMergeableObject(e)?So(function(e){return Array.isArray(e)?[]:{}}(e),e,t):e}function wo(e,t,n){return e.concat(t).map(function(e){return yo(e,n)})}function xo(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return e.propertyIsEnumerable(t)}):[]}(e))}function Co(e,t){try{return t in e}catch{return!1}}function _o(e,t,n){var r={};return n.isMergeableObject(e)&&xo(e).forEach(function(t){r[t]=yo(e[t],n)}),xo(t).forEach(function(i){(function(e,t){return Co(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,i)||(Co(e,i)&&n.isMergeableObject(t[i])?r[i]=function(e,t){if(!t.customMerge)return So;var n=t.customMerge(e);return"function"==typeof n?n:So}(i,n)(e[i],t[i],n):r[i]=yo(t[i],n))}),r}function So(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||wo,n.isMergeableObject=n.isMergeableObject||vo,n.cloneUnlessOtherwiseSpecified=yo;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):_o(e,t,n):yo(t,n)}So.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return So(e,n,t)},{})};var Ao=So;function ko(e,t){return void 0===t&&(t=15),+parseFloat(Number(e).toPrecision(t))}function To(e){var t=e.toString().split(/[eE]/),n=(t[0].split(".")[1]||"").length-+(t[1]||0);return n>0?n:0}function Io(e){if(-1===e.toString().indexOf("e"))return Number(e.toString().replace(".",""));var t=To(e);return t>0?ko(Number(e)*Math.pow(10,t)):Number(e)}function Oo(e){Fo&&(e>Number.MAX_SAFE_INTEGER||e<Number.MIN_SAFE_INTEGER)&&console.warn(e+" is beyond boundary when transfer to integer, the results may not be accurate")}function Eo(e,t){var n=e[0],r=e[1],i=e.slice(2),o=t(n,r);return i.forEach(function(e){o=t(o,e)}),o}function Po(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(e.length>2)return Eo(e,Po);var n=e[0],r=e[1],i=Io(n),o=Io(r),a=To(n)+To(r),s=i*o;return Oo(s),s/Math.pow(10,a)}function Mo(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(e.length>2)return Eo(e,Mo);var n=e[0],r=e[1],i=Io(n),o=Io(r);return Oo(i),Oo(o),Po(i/o,ko(Math.pow(10,To(r)-To(n))))}var Fo=!0;var jo={strip:ko,plus:function e(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(t.length>2)return Eo(t,e);var r=t[0],i=t[1],o=Math.pow(10,Math.max(To(r),To(i)));return(Po(r,o)+Po(i,o))/o},minus:function e(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(t.length>2)return Eo(t,e);var r=t[0],i=t[1],o=Math.pow(10,Math.max(To(r),To(i)));return(Po(r,o)-Po(i,o))/o},times:Po,divide:Mo,round:function(e,t){var n=Math.pow(10,t),r=Mo(Math.round(Math.abs(Po(e,n))),n);return e<0&&0!==r&&(r=Po(r,-1)),r},digitLength:To,float2Fixed:Io,enableBoundaryChecking:function(e){void 0===e&&(e=!0),Fo=e}};function Do(e){return e&&e.Math==Math?e:void 0}var Ro="object"==typeof globalThis&&Do(globalThis)||"object"==typeof window&&Do(window)||"object"==typeof self&&Do(self)||"object"==typeof global&&Do(global)||function(){return this}()||{};function Lo(){return Ro}function zo(e,t,n){var r=n||Ro,i=r.__SENTRY__=r.__SENTRY__||{};return i[e]||(i[e]=t())}var No=Object.prototype.toString;function Bo(e){switch(No.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return Ko(e,Error)}}function Vo(e,t){return No.call(e)===`[object ${t}]`}function Uo(e){return Vo(e,"ErrorEvent")}function Wo(e){return Vo(e,"DOMError")}function Ho(e){return Vo(e,"String")}function Yo(e){return null===e||"object"!=typeof e&&"function"!=typeof e}function $o(e){return Vo(e,"Object")}function Go(e){return typeof Event<"u"&&Ko(e,Event)}function Xo(e){return Boolean(e&&e.then&&"function"==typeof e.then)}function Ko(e,t){try{return e instanceof t}catch{return!1}}function qo(e,t){try{let r=e;var n=[];let i=0,o=0;let a;for(;r&&i++<5&&(a=Zo(r,t),!("html"===a||i>1&&o+3*n.length+a.length>=80));)n.push(a),o+=a.length,r=r.parentNode;return n.reverse().join(" > ")}catch{return"<unknown>"}}function Zo(e,t){var n=e,r=[];let i,o,a,s,l;if(!n||!n.tagName)return"";r.push(n.tagName.toLowerCase());var c=t&&t.length?t.filter(e=>n.getAttribute(e)).map(e=>[e,n.getAttribute(e)]):null;if(c&&c.length)c.forEach(e=>{r.push(`[${e[0]}="${e[1]}"]`)});else if(n.id&&r.push(`#${n.id}`),i=n.className,i&&Ho(i))for(o=i.split(/\s+/),l=0;l<o.length;l++)r.push(`.${o[l]}`);var u=["type","name","title","alt"];for(l=0;l<u.length;l++)a=u[l],s=n.getAttribute(a),s&&r.push(`[${a}="${s}"]`);return r.join("")}class Jo extends Error{constructor(e,t="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=t}}var Qo=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/;function ea(e,t=!1){const{host:n,path:r,pass:i,port:o,projectId:a,protocol:s,publicKey:l}=e;return`${s}://${l}${t&&i?`:${i}`:""}@${n}${o?`:${o}`:""}/${r&&`${r}/`}${a}`}function ta(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function na(e){var t="string"==typeof e?function(e){var t=Qo.exec(e);if(!t)throw new Jo(`Invalid Sentry Dsn: ${e}`);const[n,r,i="",o,a="",s]=t.slice(1);let l="",c=s;var u=c.split("/");if(u.length>1&&(l=u.slice(0,-1).join("/"),c=u.pop()),c){var h=c.match(/^\d+/);h&&(c=h[0])}return ta({host:o,pass:i,path:l,projectId:c,port:a,protocol:n,publicKey:r})}(e):ta(e);return function(e){if(!(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__))return;const{port:t,projectId:n,protocol:r}=e;if(["protocol","publicKey","host","projectId"].forEach(t=>{if(!e[t])throw new Jo(`Invalid Sentry Dsn: ${t} missing`)}),!n.match(/^\d+$/))throw new Jo(`Invalid Sentry Dsn: Invalid projectId ${n}`);if(!function(e){return"http"===e||"https"===e}(r))throw new Jo(`Invalid Sentry Dsn: Invalid protocol ${r}`);if(t&&isNaN(parseInt(t,10)))throw new Jo(`Invalid Sentry Dsn: Invalid port ${t}`)}(t),t}var ra=Lo(),ia=["debug","info","warn","error","log","assert","trace"];function oa(e){var t=Lo();if(!("console"in t))return e();var n=t.console,r={};ia.forEach(e=>{var i=n[e]&&n[e].__sentry_original__;e in t.console&&i&&(r[e]=n[e],n[e]=i)});try{return e()}finally{Object.keys(r).forEach(e=>{n[e]=r[e]})}}function aa(){let e=!1;var t={enable:()=>{e=!0},disable:()=>{e=!1}};return typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__?ia.forEach(n=>{t[n]=(...t)=>{e&&oa(()=>{ra.console[n](`Sentry Logger [${n}]:`,...t)})}}):ia.forEach(e=>{t[e]=()=>{}}),t}let sa;function la(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:`${e.substr(0,t)}...`}function ca(e,t){if(!Array.isArray(e))return"";var n=[];for(let t=0;t<e.length;t++){var r=e[t];try{n.push(String(r))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function ua(e,t){return!!Ho(e)&&(function(e){return Vo(e,"RegExp")}(t)?t.test(e):"string"==typeof t&&-1!==e.indexOf(t))}function ha(e,t,n){if(t in e){var r=e[t],i=n(r);if("function"==typeof i)try{fa(i,r)}catch{}e[t]=i}}function da(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}function fa(e,t){var n=t.prototype||{};e.prototype=t.prototype=n,da(e,"__sentry_original__",t)}function pa(e){return e.__sentry_original__}function ga(e){if(Bo(e))return{message:e.message,name:e.name,stack:e.stack,...va(e)};if(Go(e)){var t={type:e.type,target:ma(e.target),currentTarget:ma(e.currentTarget),...va(e)};return typeof CustomEvent<"u"&&Ko(e,CustomEvent)&&(t.detail=e.detail),t}return e}function ma(e){try{return function(e){return typeof Element<"u"&&Ko(e,Element)}(e)?qo(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function va(e){if("object"==typeof e&&null!==e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}return{}}function ba(e,t=40){var n=Object.keys(ga(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return la(n[0],t);for(let e=n.length;e>0;e--){var r=n.slice(0,e).join(", ");if(!(r.length>t))return e===n.length?r:la(r,t)}return""}function ya(e){return wa(e,new Map)}function wa(e,t){if($o(e)){if(void 0!==(i=t.get(e)))return i;var n={};for(var r of(t.set(e,n),Object.keys(e)))typeof e[r]<"u"&&(n[r]=wa(e[r],t));return n}if(Array.isArray(e)){var i;if(void 0!==(i=t.get(e)))return i;n=[];return t.set(e,n),e.forEach(e=>{n.push(wa(e,t))}),n}return e}sa=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__?zo("logger",aa):aa();function xa(...e){var t=e.sort((e,t)=>e[0]-t[0]).map(e=>e[1]);return(e,n=0)=>{var r=[];for(var i of e.split("\n").slice(n)){var o=i.replace(/\(error: (.*)\)/,"$1");for(var a of t){var s=a(o);if(s){r.push(s);break}}}return function(e){if(!e.length)return[];let t=e;var n=t[0].function||"",r=t[t.length-1].function||"";return(-1!==n.indexOf("captureMessage")||-1!==n.indexOf("captureException"))&&(t=t.slice(1)),-1!==r.indexOf("sentryWrapped")&&(t=t.slice(0,-1)),t.slice(0,50).map(e=>({...e,filename:e.filename||t[0].filename,function:e.function||"?"})).reverse()}(r)}}function Ca(e){return Array.isArray(e)?xa(...e):e}var _a="<anonymous>";function Sa(e){try{return e&&"function"==typeof e&&e.name||_a}catch{return _a}}function Aa(){if(!("fetch"in Lo()))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function ka(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}var Ta=Lo(),Ia={},Oa={};function Ea(e){if(!Oa[e])switch(Oa[e]=!0,e){case"console":"console"in Ta&&ia.forEach(function(e){e in Ta.console&&ha(Ta.console,e,function(t){return function(...n){Ma("console",{args:n,level:e}),t&&t.apply(Ta.console,n)}})});break;case"dom":!function(){if("document"in Ta){var e=Ma.bind(null,"dom"),t=Na(e,!0);Ta.document.addEventListener("click",t,!1),Ta.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(t=>{var n=Ta[t]&&Ta[t].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(ha(n,"addEventListener",function(t){return function(n,r,i){if("click"===n||"keypress"==n)try{var o=this,a=o.__sentry_instrumentation_handlers__=o.__sentry_instrumentation_handlers__||{},s=a[n]=a[n]||{refCount:0};if(!s.handler){var l=Na(e);s.handler=l,t.call(this,n,l,i)}s.refCount+=1}catch{}return t.call(this,n,r,i)}}),ha(n,"removeEventListener",function(e){return function(t,n,r){if("click"===t||"keypress"==t)try{var i=this,o=i.__sentry_instrumentation_handlers__||{},a=o[t];a&&(a.refCount-=1,a.refCount<=0&&(e.call(this,t,a.handler,r),a.handler=void 0,delete o[t]),0===Object.keys(o).length&&delete i.__sentry_instrumentation_handlers__)}catch{}return e.call(this,t,n,r)}}))})}}();break;case"xhr":!function(){if("XMLHttpRequest"in Ta){var e=XMLHttpRequest.prototype;ha(e,"open",function(e){return function(...t){var n=this,r=t[1],i=n.__sentry_xhr__={method:Ho(t[0])?t[0].toUpperCase():t[0],url:t[1]};Ho(r)&&"POST"===i.method&&r.match(/sentry_key/)&&(n.__sentry_own_request__=!0);var o=function(){if(4===n.readyState){try{i.status_code=n.status}catch{}Ma("xhr",{args:t,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:n})}};return"onreadystatechange"in n&&"function"==typeof n.onreadystatechange?ha(n,"onreadystatechange",function(e){return function(...t){return o(),e.apply(n,t)}}):n.addEventListener("readystatechange",o),e.apply(n,t)}}),ha(e,"send",function(e){return function(...t){return this.__sentry_xhr__&&void 0!==t[0]&&(this.__sentry_xhr__.body=t[0]),Ma("xhr",{args:t,startTimestamp:Date.now(),xhr:this}),e.apply(this,t)}})}}();break;case"fetch":!function(){if(!Aa())return!1;var e=Lo();if(ka(e.fetch))return!0;let t=!1;var n=e.document;if(n&&"function"==typeof n.createElement)try{var r=n.createElement("iframe");r.hidden=!0,n.head.appendChild(r),r.contentWindow&&r.contentWindow.fetch&&(t=ka(r.contentWindow.fetch)),n.head.removeChild(r)}catch(e){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return t}()||ha(Ta,"fetch",function(e){return function(...t){var n={args:t,fetchData:{method:Fa(t),url:ja(t)},startTimestamp:Date.now()};return Ma("fetch",{...n}),e.apply(Ta,t).then(e=>(Ma("fetch",{...n,endTimestamp:Date.now(),response:e}),e),e=>{throw Ma("fetch",{...n,endTimestamp:Date.now(),error:e}),e})}});break;case"history":!function(){if(!function(){var e=Lo(),t=e.chrome,n=t&&t.app&&t.app.runtime,r="history"in e&&!!e.history.pushState&&!!e.history.replaceState;return!n&&r}())return;var e=Ta.onpopstate;function t(e){return function(...t){var n=t.length>2?t[2]:void 0;if(n){var r=Da,i=String(n);Da=i,Ma("history",{from:r,to:i})}return e.apply(this,t)}}Ta.onpopstate=function(...t){var n=Ta.location.href,r=Da;if(Da=n,Ma("history",{from:r,to:n}),e)try{return e.apply(this,t)}catch{}},ha(Ta.history,"pushState",t),ha(Ta.history,"replaceState",t)}();break;case"error":Ba=Ta.onerror,Ta.onerror=function(e,t,n,r,i){return Ma("error",{column:r,error:i,line:n,msg:e,url:t}),!!Ba&&Ba.apply(this,arguments)};break;case"unhandledrejection":Va=Ta.onunhandledrejection,Ta.onunhandledrejection=function(e){return Ma("unhandledrejection",e),!Va||Va.apply(this,arguments)};break;default:return void((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.warn("unknown instrumentation type:",e))}}function Pa(e,t){Ia[e]=Ia[e]||[],Ia[e].push(t),Ea(e)}function Ma(e,t){if(e&&Ia[e])for(var n of Ia[e]||[])try{n(t)}catch(t){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${Sa(n)}\nError:`,t)}}function Fa(e=[]){return"Request"in Ta&&Ko(e[0],Request)&&e[0].method?String(e[0].method).toUpperCase():e[1]&&e[1].method?String(e[1].method).toUpperCase():"GET"}function ja(e=[]){return"string"==typeof e[0]?e[0]:"Request"in Ta&&Ko(e[0],Request)?e[0].url:String(e[0])}let Da;var Ra=1e3;let La,za;function Na(e,t=!1){return n=>{if(n&&za!==n&&!function(e){if("keypress"!==e.type)return!1;try{var t=e.target;if(!t||!t.tagName)return!0;if("INPUT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable)return!1}catch{}return!0}(n)){var r="keypress"===n.type?"input":n.type;(void 0===La||function(e,t){if(!e||e.type!==t.type)return!0;try{if(e.target!==t.target)return!0}catch{}return!1}(za,n))&&(e({event:n,name:r,global:t}),za=n),clearTimeout(La),La=Ta.setTimeout(()=>{La=void 0},Ra)}}}let Ba=null;let Va=null;function Ua(){var e=Lo(),t=e.crypto||e.msCrypto;if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");var n=t&&t.getRandomValues?()=>t.getRandomValues(new Uint8Array(1))[0]:()=>16*Math.random();return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,e=>(e^(15&n())>>e/4).toString(16))}function Wa(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function Ha(e){const{message:t,event_id:n}=e;if(t)return t;var r=Wa(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function Ya(e,t,n){var r=e.exception=e.exception||{},i=r.values=r.values||[],o=i[0]=i[0]||{};o.value||(o.value=t||""),o.type||(o.type="Error")}function $a(e,t){var n=Wa(e);if(n){var r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...t},t&&"data"in t){var i={...r&&r.data,...t.data};n.mechanism.data=i}}}function Ga(e){if(e&&e.__sentry_captured__)return!0;try{da(e,"__sentry_captured__",!0)}catch{}return!1}function Xa(e){return Array.isArray(e)?e:[e]}function Ka(){return!(typeof __SENTRY_BROWSER_BUNDLE__<"u"&&__SENTRY_BROWSER_BUNDLE__)&&"[object process]"===Object.prototype.toString.call(typeof process<"u"?process:0)}function qa(e,t=1/0,n=1/0){try{return Ja("",e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function Za(e,t=3,n=102400){var r=qa(e,t);return function(e){return function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(e))}(r)>n?Za(e,t-1,n):r}function Ja(e,t,n=1/0,r=1/0,i=function(){var e="function"==typeof WeakSet,t=e?new WeakSet:[];return[function(n){if(e)return!!t.has(n)||(t.add(n),!1);for(let e=0;e<t.length;e++)if(t[e]===n)return!0;return t.push(n),!1},function(n){if(e)t.delete(n);else for(let e=0;e<t.length;e++)if(t[e]===n){t.splice(e,1);break}}]}()){const[o,a]=i;if(null===t||["number","boolean","string"].includes(typeof t)&&!function(e){return"number"==typeof e&&e!=e}(t))return t;var s=function(e,t){try{return"domain"===e&&t&&"object"==typeof t&&t._events?"[Domain]":"domainEmitter"===e?"[DomainEmitter]":typeof global<"u"&&t===global?"[Global]":typeof window<"u"&&t===window?"[Window]":typeof document<"u"&&t===document?"[Document]":function(e){return $o(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}(t)?"[SyntheticEvent]":"number"==typeof t&&t!=t?"[NaN]":void 0===t?"[undefined]":"function"==typeof t?`[Function: ${Sa(t)}]`:"symbol"==typeof t?`[${String(t)}]`:"bigint"==typeof t?`[BigInt: ${String(t)}]`:`[object ${Object.getPrototypeOf(t).constructor.name}]`}catch(e){return`**non-serializable** (${e})`}}(e,t);if(!s.startsWith("[object "))return s;if(t.__sentry_skip_normalization__)return t;if(0===n)return s.replace("object ","");if(o(t))return"[Circular ~]";var l=t;if(l&&"function"==typeof l.toJSON)try{return Ja("",l.toJSON(),n-1,r,i)}catch{}var c=Array.isArray(t)?[]:{};let u=0;var h=ga(t);for(var d in h)if(Object.prototype.hasOwnProperty.call(h,d)){if(u>=r){c[d]="[MaxProperties ~]";break}var f=h[d];c[d]=Ja(d,f,n-1,r,i),u+=1}return a(t),c}var Qa;function es(e){return new ns(t=>{t(e)})}function ts(e){return new ns((t,n)=>{n(e)})}!function(e){e[e.PENDING=0]="PENDING";e[e.RESOLVED=1]="RESOLVED";e[e.REJECTED=2]="REJECTED"}(Qa||(Qa={}));class ns{__init(){this._state=Qa.PENDING}__init2(){this._handlers=[]}constructor(e){ns.prototype.__init.call(this),ns.prototype.__init2.call(this),ns.prototype.__init3.call(this),ns.prototype.__init4.call(this),ns.prototype.__init5.call(this),ns.prototype.__init6.call(this);try{e(this._resolve,this._reject)}catch(e){this._reject(e)}}then(e,t){return new ns((n,r)=>{this._handlers.push([!1,t=>{if(e)try{n(e(t))}catch(e){r(e)}else n(t)},e=>{if(t)try{n(t(e))}catch(e){r(e)}else r(e)}]),this._executeHandlers()})}catch(e){return this.then(e=>e,e)}finally(e){return new ns((t,n)=>{let r,i;return this.then(t=>{i=!1,r=t,e&&e()},t=>{i=!0,r=t,e&&e()}).then(()=>{i?n(r):t(r)})})}__init3(){this._resolve=e=>{this._setResult(Qa.RESOLVED,e)}}__init4(){this._reject=e=>{this._setResult(Qa.REJECTED,e)}}__init5(){this._setResult=(e,t)=>{if(this._state===Qa.PENDING){if(Xo(t))return void t.then(this._resolve,this._reject);this._state=e,this._value=t,this._executeHandlers()}}}__init6(){this._executeHandlers=()=>{if(this._state!==Qa.PENDING){var e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||(this._state===Qa.RESOLVED&&e[1](this._value),this._state===Qa.REJECTED&&e[2](this._value),e[0]=!0)})}}}}function rs(e){var t=[];function n(e){return t.splice(t.indexOf(e),1)[0]}return{$:t,add:function(r){if(!(void 0===e||t.length<e))return ts(new Jo("Not adding Promise because buffer limit was reached."));var i=r();return-1===t.indexOf(i)&&t.push(i),i.then(()=>n(i)).then(null,()=>n(i).then(null,()=>{})),i},drain:function(e){return new ns((n,r)=>{let i=t.length;if(!i)return n(!0);var o=setTimeout(()=>{e&&e>0&&n(!1)},e);t.forEach(e=>{es(e).then(()=>{--i||(clearTimeout(o),n(!0))},r)})})}}}function is(e){if(!e)return{};var t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};var n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],relative:t[5]+n+r}}var os=["fatal","error","warning","log","info","debug"];function as(e){return"warn"===e?"warning":os.includes(e)?e:"log"}var ss={nowSeconds:()=>Date.now()/1e3};var ls=Ka()?function(){try{var e=function(e,t){return e.require(t)}(module,"perf_hooks");return e.performance}catch{return}}():function(){const{performance:e}=Lo();if(e&&e.now)return{now:()=>e.now(),timeOrigin:Date.now()-e.now()}}(),cs=void 0===ls?ss:{nowSeconds:()=>(ls.timeOrigin+ls.now())/1e3},us=ss.nowSeconds.bind(ss),hs=cs.nowSeconds.bind(cs);function ds(e,t=[]){return[e,t]}function fs(e,t){const[n,r]=e;return[n,[...r,t]]}function ps(e,t){e[1].forEach(e=>{var n=e[0].type;t(e,n)})}function gs(e,t){return(t||new TextEncoder).encode(e)}function ms(e,t){const[n,r]=e;let i=JSON.stringify(n);function o(e){"string"==typeof i?i="string"==typeof e?i+e:[gs(i,t),e]:i.push("string"==typeof e?gs(e,t):e)}for(var a of r){const[e,t]=a;o(`\n${JSON.stringify(e)}\n`),o("string"==typeof t||t instanceof Uint8Array?t:JSON.stringify(t))}return"string"==typeof i?i:function(e){var t=e.reduce((e,t)=>e+t.length,0),n=new Uint8Array(t);let r=0;for(var i of e)n.set(i,r),r+=i.length;return n}(i)}function vs(e,t){var n="string"==typeof e.data?gs(e.data,t):e.data;return[ya({type:"attachment",length:n.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),n]}(()=>{const{performance:e}=Lo();if(e&&e.now){var t=36e5,n=e.now(),r=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,o=i<t,a=e.timing&&e.timing.navigationStart,s="number"==typeof a?Math.abs(a+n-r):t;(o||s<t)&&(i<=s&&e.timeOrigin)}})();var bs={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default"};function ys(e){return bs[e]}function ws(e,{statusCode:t,headers:n},r=Date.now()){var i={...e},o=n&&n["x-sentry-rate-limits"],a=n&&n["retry-after"];if(o)for(var s of o.trim().split(",")){const[e,t]=s.split(":",2);var l=parseInt(e,10),c=1e3*(isNaN(l)?60:l);if(t)for(var u of t.split(";"))i[u]=r+c;else i.all=r+c}else a?i.all=r+function(e,t=Date.now()){var n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;var r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}(a,r):429===t&&(i.all=r+6e4);return i}function xs(e){var t=hs(),n={sid:Ua(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(e){return ya({sid:`${e.sid}`,init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"==typeof e.did||"string"==typeof e.did?`${e.did}`:void 0,duration:e.duration,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}(n)};return e&&Cs(n,e),n}function Cs(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||hs(),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:Ua()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{var n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}class _s{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={}}static clone(e){var t=new _s;return e&&(t._breadcrumbs=[...e._breadcrumbs],t._tags={...e._tags},t._extra={...e._extra},t._contexts={...e._contexts},t._user=e._user,t._level=e._level,t._span=e._span,t._session=e._session,t._transactionName=e._transactionName,t._fingerprint=e._fingerprint,t._eventProcessors=[...e._eventProcessors],t._requestSession=e._requestSession,t._attachments=[...e._attachments]),t}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{},this._session&&Cs(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts={...this._contexts,[e]:t},this._notifyScopeListeners(),this}setSpan(e){return this._span=e,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){var e=this.getSpan();return e&&e.transaction}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;if("function"==typeof e){var t=e(this);return t instanceof _s?t:this}return e instanceof _s?(this._tags={...this._tags,...e._tags},this._extra={...this._extra,...e._extra},this._contexts={...this._contexts,...e._contexts},e._user&&Object.keys(e._user).length&&(this._user=e._user),e._level&&(this._level=e._level),e._fingerprint&&(this._fingerprint=e._fingerprint),e._requestSession&&(this._requestSession=e._requestSession)):$o(e)&&(this._tags={...this._tags,...e.tags},this._extra={...this._extra,...e.extra},this._contexts={...this._contexts,...e.contexts},e.user&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint&&(this._fingerprint=e.fingerprint),e.requestSession&&(this._requestSession=e.requestSession)),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this}addBreadcrumb(e,t){var n="number"==typeof t?Math.min(t,100):100;if(n<=0)return this;var r={timestamp:us(),...e};return this._breadcrumbs=[...this._breadcrumbs,r].slice(-n),this._notifyScopeListeners(),this}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(e,t={}){if(this._extra&&Object.keys(this._extra).length&&(e.extra={...this._extra,...e.extra}),this._tags&&Object.keys(this._tags).length&&(e.tags={...this._tags,...e.tags}),this._user&&Object.keys(this._user).length&&(e.user={...this._user,...e.user}),this._contexts&&Object.keys(this._contexts).length&&(e.contexts={...this._contexts,...e.contexts}),this._level&&(e.level=this._level),this._transactionName&&(e.transaction=this._transactionName),this._span){e.contexts={trace:this._span.getTraceContext(),...e.contexts};var n=this._span.transaction&&this._span.transaction.name;n&&(e.tags={transaction:n,...e.tags})}return this._applyFingerprint(e),e.breadcrumbs=[...e.breadcrumbs||[],...this._breadcrumbs],e.breadcrumbs=e.breadcrumbs.length>0?e.breadcrumbs:void 0,e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...this._sdkProcessingMetadata},this._notifyEventProcessors([...Ss(),...this._eventProcessors],e,t)}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}_notifyEventProcessors(e,t,n,r=0){return new ns((i,o)=>{var a=e[r];if(null===t||"function"!=typeof a)i(t);else{var s=a({...t},n);(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&a.id&&null===s&&sa.log(`Event processor "${a.id}" dropped event`),Xo(s)?s.then(t=>this._notifyEventProcessors(e,t,n,r+1).then(i)).then(null,o):this._notifyEventProcessors(e,s,n,r+1).then(i).then(null,o)}})}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}_applyFingerprint(e){e.fingerprint=e.fingerprint?Xa(e.fingerprint):[],this._fingerprint&&(e.fingerprint=e.fingerprint.concat(this._fingerprint)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}}function Ss(){return zo("globalEventProcessors",()=>[])}function As(e){Ss().push(e)}var ks=100;class Ts{__init(){this._stack=[{}]}constructor(e,t=new _s,n=4){this._version=n,Ts.prototype.__init.call(this),this.getStackTop().scope=t,e&&this.bindClient(e)}isOlderThan(e){return this._version<e}bindClient(e){this.getStackTop().client=e,e&&e.setupIntegrations&&e.setupIntegrations()}pushScope(){var e=_s.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:e}),e}popScope(){return!(this.getStack().length<=1)&&!!this.getStack().pop()}withScope(e){var t=this.pushScope();try{e(t)}finally{this.popScope()}}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(e,t){var n=this._lastEventId=t&&t.event_id?t.event_id:Ua(),r=new Error("Sentry syntheticException");return this._withClient((i,o)=>{i.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},o)}),n}captureMessage(e,t,n){var r=this._lastEventId=n&&n.event_id?n.event_id:Ua(),i=new Error(e);return this._withClient((o,a)=>{o.captureMessage(e,t,{originalException:e,syntheticException:i,...n,event_id:r},a)}),r}captureEvent(e,t){var n=t&&t.event_id?t.event_id:Ua();return"transaction"!==e.type&&(this._lastEventId=n),this._withClient((r,i)=>{r.captureEvent(e,{...t,event_id:n},i)}),n}lastEventId(){return this._lastEventId}addBreadcrumb(e,t){const{scope:n,client:r}=this.getStackTop();if(!n||!r)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:o=ks}=r.getOptions&&r.getOptions()||{};if(!(o<=0)){var a={timestamp:us(),...e},s=i?oa(()=>i(a,t)):a;null!==s&&n.addBreadcrumb(s,o)}}setUser(e){var t=this.getScope();t&&t.setUser(e)}setTags(e){var t=this.getScope();t&&t.setTags(e)}setExtras(e){var t=this.getScope();t&&t.setExtras(e)}setTag(e,t){var n=this.getScope();n&&n.setTag(e,t)}setExtra(e,t){var n=this.getScope();n&&n.setExtra(e,t)}setContext(e,t){var n=this.getScope();n&&n.setContext(e,t)}configureScope(e){const{scope:t,client:n}=this.getStackTop();t&&n&&e(t)}run(e){var t=Os(this);try{e(this)}finally{Os(t)}}getIntegration(e){var t=this.getClient();if(!t)return null;try{return t.getIntegration(e)}catch{return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.warn(`Cannot retrieve integration ${e.id} from the current Hub`),null}}startTransaction(e,t){return this._callExtensionMethod("startTransaction",e,t)}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(e=!1){if(e)return this.endSession();this._sendSessionUpdate()}endSession(){var e=this.getStackTop(),t=e&&e.scope,n=t&&t.getSession();n&&function(e){let t={};"ok"===e.status&&(t={status:"exited"}),Cs(e,t)}(n),this._sendSessionUpdate(),t&&t.setSession()}startSession(e){const{scope:t,client:n}=this.getStackTop(),{release:r,environment:i}=n&&n.getOptions()||{};var o=Lo();const{userAgent:a}=o.navigator||{};var s=xs({release:r,environment:i,...t&&{user:t.getUser()},...a&&{userAgent:a},...e});if(t){var l=t.getSession&&t.getSession();l&&"ok"===l.status&&Cs(l,{status:"exited"}),this.endSession(),t.setSession(s)}return s}shouldSendDefaultPii(){var e=this.getClient(),t=e&&e.getOptions();return Boolean(t&&t.sendDefaultPii)}_sendSessionUpdate(){const{scope:e,client:t}=this.getStackTop();if(e){var n=e.getSession();n&&t&&t.captureSession&&t.captureSession(n)}}_withClient(e){const{scope:t,client:n}=this.getStackTop();n&&e(n,t)}_callExtensionMethod(e,...t){var n=Is().__SENTRY__;if(n&&n.extensions&&"function"==typeof n.extensions[e])return n.extensions[e].apply(this,t);(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.warn(`Extension method ${e} couldn't be found, doing nothing.`)}}function Is(){var e=Lo();return e.__SENTRY__=e.__SENTRY__||{extensions:{},hub:void 0},e}function Os(e){var t=Is(),n=Ms(t);return Fs(t,e),n}function Es(){var e=Is();return(!Ps(e)||Ms(e).isOlderThan(4))&&Fs(e,new Ts),Ka()?function(e){try{var t=Is().__SENTRY__,n=t&&t.extensions&&t.extensions.domain&&t.extensions.domain.active;if(!n)return Ms(e);if(!Ps(n)||Ms(n).isOlderThan(4)){var r=Ms(e).getStackTop();Fs(n,new Ts(r.client,_s.clone(r.scope)))}return Ms(n)}catch{return Ms(e)}}(e):Ms(e)}function Ps(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function Ms(e){return zo("hub",()=>new Ts,e)}function Fs(e,t){return!!e&&((e.__SENTRY__=e.__SENTRY__||{}).hub=t,!0)}function js(e,t){return function(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}({sentry_key:e.publicKey,sentry_version:"7",...t&&{sentry_client:`${t.name}/${t.version}`}})}function Ds(e,t={}){var n="string"==typeof t?t:t.tunnel,r="string"!=typeof t&&t._metadata?t._metadata.sdk:void 0;return n||`${function(e){return`${function(e){var t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}(e)}${e.projectId}/envelope/`}(e)}?${js(e,r)}`}function Rs(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function Ls(e,t,n,r){var i=Rs(n),o=e.type||"event";!function(e,t){t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]])}(e,n&&n.sdk);var a=function(e,t,n,r){var i=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&{sdk:t},...!!n&&{dsn:ea(r)},..."transaction"===e.type&&i&&{trace:ya({...i})}}}(e,i,r,t);return delete e.sdkProcessingMetadata,ds(a,[[{type:o},e]])}var zs=[];function Ns(e){var t=e.defaultIntegrations||[],n=e.integrations;let r;t.forEach(e=>{e.isDefaultInstance=!0}),r=Array.isArray(n)?[...t,...n]:"function"==typeof n?Xa(n(t)):t;var i=function(e){var t={};return e.forEach(e=>{const{name:n}=e;var r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)}),Object.values(t)}(r),o=i.findIndex(e=>"Debug"===e.name);if(-1!==o){const[e]=i.splice(o,1);i.push(e)}return i}var Bs="Not capturing exception because it's already been captured.";class Vs{__init(){this._integrations={}}__init2(){this._integrationsInitialized=!1}__init3(){this._numProcessing=0}__init4(){this._outcomes={}}constructor(e){if(Vs.prototype.__init.call(this),Vs.prototype.__init2.call(this),Vs.prototype.__init3.call(this),Vs.prototype.__init4.call(this),this._options=e,e.dsn){this._dsn=na(e.dsn);var t=Ds(this._dsn,e);this._transport=e.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}else(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.warn("No DSN provided, client will not do anything.")}captureException(e,t,n){if(Ga(e))return void((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.log(Bs));let r=t&&t.event_id;return this._process(this.eventFromException(e,t).then(e=>this._captureEvent(e,t,n)).then(e=>{r=e})),r}captureMessage(e,t,n,r){let i=n&&n.event_id;var o=Yo(e)?this.eventFromMessage(String(e),t,n):this.eventFromException(e,n);return this._process(o.then(e=>this._captureEvent(e,n,r)).then(e=>{i=e})),i}captureEvent(e,t,n){if(t&&t.originalException&&Ga(t.originalException))return void((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.log(Bs));let r=t&&t.event_id;return this._process(this._captureEvent(e,t,n).then(e=>{r=e})),r}captureSession(e){this._isEnabled()?"string"!=typeof e.release?(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),Cs(e,{init:!1})):(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.warn("SDK not enabled, will not capture session.")}getDsn(){return this._dsn}getOptions(){return this._options}getTransport(){return this._transport}flush(e){var t=this._transport;return t?this._isClientDoneProcessing(e).then(n=>t.flush(e).then(e=>n&&e)):es(!0)}close(e){return this.flush(e).then(e=>(this.getOptions().enabled=!1,e))}setupIntegrations(){this._isEnabled()&&!this._integrationsInitialized&&(this._integrations=function(e){var t={};return e.forEach(e=>{t[e.name]=e,-1===zs.indexOf(e.name)&&(e.setupOnce(As,Es),zs.push(e.name),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.log(`Integration installed: ${e.name}`))}),t}(this._options.integrations),this._integrationsInitialized=!0)}getIntegrationById(e){return this._integrations[e]}getIntegration(e){try{return this._integrations[e.id]||null}catch{return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.warn(`Cannot retrieve integration ${e.id} from the current Client`),null}}sendEvent(e,t={}){if(this._dsn){let r=Ls(e,this._dsn,this._options._metadata,this._options.tunnel);for(var n of t.attachments||[])r=fs(r,vs(n,this._options.transportOptions&&this._options.transportOptions.textEncoder));this._sendEnvelope(r)}}sendSession(e){if(this._dsn){var t=function(e,t,n,r){var i=Rs(n);return ds({sent_at:(new Date).toISOString(),...i&&{sdk:i},...!!r&&{dsn:ea(t)}},["aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e]])}(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(t)}}recordDroppedEvent(e,t){if(this._options.sendClientReports){var n=`${e}:${t}`;(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.log(`Adding outcome: "${n}"`),this._outcomes[n]=this._outcomes[n]+1||1}}_updateSessionFromEvent(e,t){let n=!1,r=!1;var i=t.exception&&t.exception.values;if(i)for(var o of(r=!0,i)){var a=o.mechanism;if(a&&!1===a.handled){n=!0;break}}var s="ok"===e.status;(s&&0===e.errors||s&&n)&&(Cs(e,{...n&&{status:"crashed"},errors:e.errors||Number(r||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new ns(t=>{let n=0;var r=setInterval(()=>{0==this._numProcessing?(clearInterval(r),t(!0)):(n+=1,e&&n>=e&&(clearInterval(r),t(!1)))},1)})}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._dsn}_prepareEvent(e,t,n){const{normalizeDepth:r=3,normalizeMaxBreadth:i=1e3}=this.getOptions();var o={...e,event_id:e.event_id||t.event_id||Ua(),timestamp:e.timestamp||us()};this._applyClientOptions(o),this._applyIntegrationsMetadata(o);let a=n;t.captureContext&&(a=_s.clone(a).update(t.captureContext));let s=es(o);if(a){var l=[...t.attachments||[],...a.getAttachments()];l.length&&(t.attachments=l),s=a.applyToEvent(o,t)}return s.then(e=>"number"==typeof r&&r>0?this._normalizeEvent(e,r,i):e)}_normalizeEvent(e,t,n){if(!e)return null;var r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:qa(e.data,t,n)}}))},...e.user&&{user:qa(e.user,t,n)},...e.contexts&&{contexts:qa(e.contexts,t,n)},...e.extra&&{extra:qa(e.extra,t,n)}};return e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=qa(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(e=>(e.data&&(e.data=qa(e.data,t,n)),e))),r}_applyClientOptions(e){var t=this.getOptions();const{environment:n,release:r,dist:i,maxValueLength:o=250}=t;"environment"in e||(e.environment="environment"in t?n:"production"),void 0===e.release&&void 0!==r&&(e.release=r),void 0===e.dist&&void 0!==i&&(e.dist=i),e.message&&(e.message=la(e.message,o));var a=e.exception&&e.exception.values&&e.exception.values[0];a&&a.value&&(a.value=la(a.value,o));var s=e.request;s&&s.url&&(s.url=la(s.url,o))}_applyIntegrationsMetadata(e){var t=Object.keys(this._integrations);t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}_captureEvent(e,t={},n){return this._processEvent(e,t,n).then(e=>e.event_id,e=>{if(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__){var t=e;"log"===t.logLevel?sa.log(t.message):sa.warn(t)}})}_processEvent(e,t,n){const{beforeSend:r,sampleRate:i}=this.getOptions();if(!this._isEnabled())return ts(new Jo("SDK not enabled, will not capture event.","log"));var o="transaction"===e.type;return!o&&"number"==typeof i&&Math.random()>i?(this.recordDroppedEvent("sample_rate","error"),ts(new Jo(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"))):this._prepareEvent(e,t,n).then(n=>{if(null===n)throw this.recordDroppedEvent("event_processor",e.type||"error"),new Jo("An event processor returned null, will not send event.","log");return t.data&&!0===t.data.__sentry__||o||!r?n:function(e){var t="`beforeSend` method has to return `null` or a valid event.";if(Xo(e))return e.then(e=>{if(!$o(e)&&null!==e)throw new Jo(t);return e},e=>{throw new Jo(`beforeSend rejected with ${e}`)});if(!$o(e)&&null!==e)throw new Jo(t);return e}(r(n,t))}).then(r=>{if(null===r)throw this.recordDroppedEvent("before_send",e.type||"error"),new Jo("`beforeSend` returned `null`, will not send event.","log");var i=n&&n.getSession();!o&&i&&this._updateSessionFromEvent(i,r);var a=r.transaction_info;if(o&&a&&r.transaction!==e.transaction){var s="custom";r.transaction_info={...a,source:s,changes:[...a.changes,{source:s,timestamp:r.timestamp,propagations:a.propagations}]}}return this.sendEvent(r,t),r}).then(null,e=>{throw e instanceof Jo?e:(this.captureException(e,{data:{__sentry__:!0},originalException:e}),new Jo(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`))})}_process(e){this._numProcessing+=1,e.then(e=>(this._numProcessing-=1,e),e=>(this._numProcessing-=1,e))}_sendEnvelope(e){this._transport&&this._dsn?this._transport.send(e).then(null,e=>{(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.error("Error while sending event:",e)}):(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.error("Transport disabled")}_clearOutcomes(){var e=this._outcomes;return this._outcomes={},Object.keys(e).map(t=>{const[n,r]=t.split(":");return{reason:n,category:r,quantity:e[t]}})}}function Us(e,t,n=rs(e.bufferSize||30)){let r={};return{send:function(i){var o=[];if(ps(i,(t,n)=>{var i=ys(n);!function(e,t,n=Date.now()){return function(e,t){return e[t]||e.all||0}(e,t)>n}(r,i)?o.push(t):e.recordDroppedEvent("ratelimit_backoff",i)}),0===o.length)return es();var a=ds(i[0],o),s=t=>{ps(a,(n,r)=>{e.recordDroppedEvent(t,ys(r))})};return n.add(()=>t({body:ms(a,e.textEncoder)}).then(e=>{void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=ws(r,e)},e=>{(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.error("Failed while sending event:",e),s("network_error")})).then(e=>e,e=>{if(e instanceof Jo)return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.error("Skipped sending event because buffer is full."),s("queue_overflow"),es();throw e})},flush:e=>n.drain(e)}}var Ws="7.14.0";let Hs;class Ys{constructor(){Ys.prototype.__init.call(this)}static __initStatic(){this.id="FunctionToString"}__init(){this.name=Ys.id}setupOnce(){Hs=Function.prototype.toString,Function.prototype.toString=function(...e){var t=pa(this)||this;return Hs.apply(t,e)}}}Ys.__initStatic();var $s=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/];class Gs{static __initStatic(){this.id="InboundFilters"}__init(){this.name=Gs.id}constructor(e={}){this._options=e,Gs.prototype.__init.call(this)}setupOnce(e,t){var n=e=>{var n=t();if(n){var r=n.getIntegration(Gs);if(r){var i=n.getClient(),o=i?i.getOptions():{},a=function(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...$s],ignoreInternal:void 0===e.ignoreInternal||e.ignoreInternal}}(r._options,o);return function(e,t){return t.ignoreInternal&&function(e){try{return"SentryError"===e.exception.values[0].type}catch{}return!1}(e)?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${Ha(e)}`),!0):function(e,t){return!(!t||!t.length)&&function(e){if(e.message)return[e.message];if(e.exception)try{const{type:t="",value:n=""}=e.exception.values&&e.exception.values[0]||{};return[`${n}`,`${t}: ${n}`]}catch{return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.error(`Cannot extract message for event ${Ha(e)}`),[]}return[]}(e).some(e=>t.some(t=>ua(e,t)))}(e,t.ignoreErrors)?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${Ha(e)}`),!0):function(e,t){if(!t||!t.length)return!1;var n=Xs(e);return!!n&&t.some(e=>ua(n,e))}(e,t.denyUrls)?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${Ha(e)}.\nUrl: ${Xs(e)}`),!0):!function(e,t){if(!t||!t.length)return!0;var n=Xs(e);return!n||t.some(e=>ua(n,e))}(e,t.allowUrls)&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${Ha(e)}.\nUrl: ${Xs(e)}`),!0)}(e,a)?null:e}}return e};n.id=this.name,e(n)}}function Xs(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?function(e=[]){for(let n=e.length-1;n>=0;n--){var t=e[n];if(t&&"<anonymous>"!==t.filename&&"[native code]"!==t.filename)return t.filename||null}return null}(t):null}catch{return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.error(`Cannot extract url for event ${Ha(e)}`),null}}function Ks(e,t){var n=Zs(e,t),r={type:t&&t.name,value:Qs(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function qs(e,t){return{exception:{values:[Ks(e,t)]}}}function Zs(e,t){var n=t.stacktrace||t.stack||"",r=function(e){if(e){if("number"==typeof e.framesToPop)return e.framesToPop;if(Js.test(e.message))return 1}return 0}(t);try{return e(n,r)}catch{}return[]}Gs.__initStatic();var Js=/Minified React error #\d+;/i;function Qs(e){var t=e&&e.message;return t?t.error&&"string"==typeof t.error.message?t.error.message:t:"No error message"}function el(e,t,n,r,i){let o;if(Uo(t)&&t.error)return qs(e,t.error);if(Wo(t)||function(e){return Vo(e,"DOMException")}(t)){var a=t;if("stack"in t)o=qs(e,t);else{var s=a.name||(Wo(a)?"DOMError":"DOMException"),l=a.message?`${s}: ${a.message}`:s;o=tl(e,l,n,r),Ya(o,l)}return"code"in a&&(o.tags={...o.tags,"DOMException.code":`${a.code}`}),o}return Bo(t)?qs(e,t):$o(t)||Go(t)?(o=function(e,t,n,r){var i=Es().getClient(),o=i&&i.getOptions().normalizeDepth,a={exception:{values:[{type:Go(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:`Non-Error ${r?"promise rejection":"exception"} captured with keys: ${ba(t)}`}]},extra:{__serialized__:Za(t,o)}};if(n){var s=Zs(e,n);s.length&&(a.exception.values[0].stacktrace={frames:s})}return a}(e,t,n,i),$a(o,{synthetic:!0}),o):(o=tl(e,t,n,r),Ya(o,`${t}`),$a(o,{synthetic:!0}),o)}function tl(e,t,n,r){var i={message:t};if(r&&n){var o=Zs(e,n);o.length&&(i.exception={values:[{value:t,stacktrace:{frames:o}}]})}return i}var nl="Breadcrumbs";class rl{static __initStatic(){this.id=nl}__init(){this.name=rl.id}constructor(e){rl.prototype.__init.call(this),this.options={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e}}setupOnce(){this.options.console&&Pa("console",il),this.options.dom&&Pa("dom",function(e){function t(t){let n,r="object"==typeof e?e.serializeAttribute:void 0;"string"==typeof r&&(r=[r]);try{n=t.event.target?qo(t.event.target,r):qo(t.event,r)}catch{n="<unknown>"}0!==n.length&&Es().addBreadcrumb({category:`ui.${t.name}`,message:n},{event:t.event,name:t.name,global:t.global})}return t}(this.options.dom)),this.options.xhr&&Pa("xhr",ol),this.options.fetch&&Pa("fetch",al),this.options.history&&Pa("history",sl)}}function il(e){var t={category:"console",data:{arguments:e.args,logger:"console"},level:as(e.level),message:ca(e.args," ")};if("assert"===e.level){if(!1!==e.args[0])return;t.message=`Assertion failed: ${ca(e.args.slice(1)," ")||"console.assert"}`,t.data.arguments=e.args.slice(1)}Es().addBreadcrumb(t,{input:e.args,level:e.level})}function ol(e){if(e.endTimestamp){if(e.xhr.__sentry_own_request__)return;const{method:t,url:n,status_code:r,body:i}=e.xhr.__sentry_xhr__||{};return void Es().addBreadcrumb({category:"xhr",data:{method:t,url:n,status_code:r},type:"http"},{xhr:e.xhr,input:i})}}function al(e){!e.endTimestamp||e.fetchData.url.match(/sentry_key/)&&"POST"===e.fetchData.method||(e.error?Es().addBreadcrumb({category:"fetch",data:e.fetchData,level:"error",type:"http"},{data:e.error,input:e.args}):Es().addBreadcrumb({category:"fetch",data:{...e.fetchData,status_code:e.response.status},type:"http"},{input:e.args,response:e.response}))}function sl(e){var t=Lo();let n=e.from,r=e.to;var i=is(t.location.href);let o=is(n);var a=is(r);o.path||(o=i),i.protocol===a.protocol&&i.host===a.host&&(r=a.relative),i.protocol===o.protocol&&i.host===o.host&&(n=o.relative),Es().addBreadcrumb({category:"navigation",data:{from:n,to:r}})}rl.__initStatic();var ll=Lo();class cl extends Vs{constructor(e){e._metadata=e._metadata||{},e._metadata.sdk=e._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:"npm:@sentry/browser",version:Ws}],version:Ws},super(e),e.sendClientReports&&ll.document&&ll.document.addEventListener("visibilitychange",()=>{"hidden"===ll.document.visibilityState&&this._flushOutcomes()})}eventFromException(e,t){return function(e,t,n,r){var i=el(e,t,n&&n.syntheticException||void 0,r);return $a(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),es(i)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return function(e,t,n="info",r,i){var o=tl(e,t,r&&r.syntheticException||void 0,i);return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),es(o)}(this._options.stackParser,e,t,n,this._options.attachStacktrace)}sendEvent(e,t){var n=this.getIntegrationById(nl);n&&n.options&&n.options.sentry&&Es().addBreadcrumb({category:"sentry."+("transaction"===e.type?"transaction":"event"),event_id:e.event_id,level:e.level,message:Ha(e)},{event:e}),super.sendEvent(e,t)}_prepareEvent(e,t,n){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n)}_flushOutcomes(){var e=this._clearOutcomes();if(0!==e.length)if(this._dsn){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.log("Sending outcomes:",e);var t=Ds(this._dsn,this._options),n=function(e,t){return ds(t?{dsn:t}:{},[[{type:"client_report"},{timestamp:us(),discarded_events:e}]])}(e,this._options.tunnel&&ea(this._dsn));try{var r=Lo();if("[object Navigator]"===Object.prototype.toString.call(r&&r.navigator)&&"function"==typeof r.navigator.sendBeacon&&!this._options.transportOptions)r.navigator.sendBeacon.bind(r.navigator)(t,ms(n));else this._sendEnvelope(n)}catch(e){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.error(e)}}else(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.log("No dsn provided, will not send outcomes");else(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.log("No outcomes to send")}}var ul=Lo();let hl;function dl(e,t=function(){if(hl)return hl;if(ka(ul.fetch))return hl=ul.fetch.bind(ul);var e=ul.document;let t=ul.fetch;if(e&&"function"==typeof e.createElement)try{var n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);var r=n.contentWindow;r&&r.fetch&&(t=r.fetch),e.head.removeChild(n)}catch(e){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return hl=t.bind(ul)}()){return Us(e,function(n){var r={body:n.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n.body.length<=65536,...e.fetchOptions};return t(e.url,r).then(e=>({statusCode:e.status,headers:{"x-sentry-rate-limits":e.headers.get("X-Sentry-Rate-Limits"),"retry-after":e.headers.get("Retry-After")}}))})}function fl(e){return Us(e,function(t){return new ns((n,r)=>{var i=new XMLHttpRequest;for(var o in i.onerror=r,i.onreadystatechange=()=>{4===i.readyState&&n({statusCode:i.status,headers:{"x-sentry-rate-limits":i.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":i.getResponseHeader("Retry-After")}})},i.open("POST",e.url),e.headers)Object.prototype.hasOwnProperty.call(e.headers,o)&&i.setRequestHeader(o,e.headers[o]);i.send(t.body)})})}var pl="?";function gl(e,t,n,r){var i={filename:e,function:t,in_app:!0};return void 0!==n&&(i.lineno=n),void 0!==r&&(i.colno=r),i}var ml=/^\s*at (?:(.*\).*?|.*?) ?\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,vl=/\((\S*)(?::(\d+))(?::(\d+))\)/,bl=[30,e=>{var t=ml.exec(e);if(t){if(t[2]&&0===t[2].indexOf("eval")){var n=vl.exec(t[2]);n&&(t[2]=n[1],t[3]=n[2],t[4]=n[3])}const[e,r]=Al(t[1]||pl,t[2]);return gl(r,e,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}}],yl=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|safari-extension|safari-web-extension|capacitor)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,wl=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,xl=[50,e=>{var t=yl.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){var n=wl.exec(t[3]);n&&(t[1]=t[1]||"eval",t[3]=n[1],t[4]=n[2],t[5]="")}let e=t[3],r=t[1]||pl;return[r,e]=Al(r,e),gl(e,r,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}],Cl=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,_l=[40,e=>{var t=Cl.exec(e);return t?gl(t[2],t[1]||pl,+t[3],t[4]?+t[4]:void 0):void 0}],Sl=xa(...[bl,xl,_l]),Al=(e,t)=>{var n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:pl,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};let kl=0;function Tl(){return kl>0}function Il(e,t={},n){if("function"!=typeof e)return e;try{var r=e.__sentry_wrapped__;if(r)return r;if(pa(e))return e}catch{return e}var i=function(){var r=Array.prototype.slice.call(arguments);try{n&&"function"==typeof n&&n.apply(this,arguments);var i=r.map(e=>Il(e,t));return e.apply(this,i)}catch(e){throw kl+=1,setTimeout(()=>{kl-=1}),function(e){Es().withScope(e)}(n=>{n.addEventProcessor(e=>(t.mechanism&&(Ya(e,void 0),$a(e,t.mechanism)),e.extra={...e.extra,arguments:r},e)),function(e,t){Es().captureException(e,{captureContext:t})}(e)}),e}};try{for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(i[o]=e[o])}catch{}fa(i,e),da(e,"__sentry_wrapped__",i);try{Object.getOwnPropertyDescriptor(i,"name").configurable&&Object.defineProperty(i,"name",{get:()=>e.name})}catch{}return i}class Ol{static __initStatic(){this.id="GlobalHandlers"}__init(){this.name=Ol.id}__init2(){this._installFunc={onerror:El,onunhandledrejection:Pl}}constructor(e){Ol.prototype.__init.call(this),Ol.prototype.__init2.call(this),this._options={onerror:!0,onunhandledrejection:!0,...e}}setupOnce(){Error.stackTraceLimit=50;var e=this._options;for(var t in e){var n=this._installFunc[t];n&&e[t]&&(Fl(t),n(),this._installFunc[t]=void 0)}}}function El(){Pa("error",e=>{const[t,n,r]=Dl();if(!t.getIntegration(Ol))return;const{msg:i,url:o,line:a,column:s,error:l}=e;if(!(Tl()||l&&l.__sentry_own_request__)){var c=void 0===l&&Ho(i)?function(e,t,n,r){var i=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let o=Uo(e)?e.message:e,a="Error";var s=o.match(i);s&&(a=s[1],o=s[2]);var l={exception:{values:[{type:a,value:o}]}};return Ml(l,t,n,r)}(i,o,a,s):Ml(el(n,l||i,void 0,r,!1),o,a,s);c.level="error",jl(t,l,c,"onerror")}})}function Pl(){Pa("unhandledrejection",e=>{const[t,n,r]=Dl();if(!t.getIntegration(Ol))return;let i=e;try{"reason"in e?i=e.reason:"detail"in e&&"reason"in e.detail&&(i=e.detail.reason)}catch{}if(Tl()||i&&i.__sentry_own_request__)return!0;var o=Yo(i)?function(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}(i):el(n,i,void 0,r,!0);o.level="error",jl(t,i,o,"onunhandledrejection")})}function Ml(e,t,n,r){var i=e.exception=e.exception||{},o=i.values=i.values||[],a=o[0]=o[0]||{},s=a.stacktrace=a.stacktrace||{},l=s.frames=s.frames||[],c=isNaN(parseInt(r,10))?void 0:r,u=isNaN(parseInt(n,10))?void 0:n,h=Ho(t)&&t.length>0?t:function(){var e=Lo();try{return e.document.location.href}catch{return""}}();return 0===l.length&&l.push({colno:c,filename:h,function:"?",in_app:!0,lineno:u}),e}function Fl(e){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.log(`Global Handler attached: ${e}`)}function jl(e,t,n,r){$a(n,{handled:!1,type:r}),e.captureEvent(n,{originalException:t})}function Dl(){var e=Es(),t=e.getClient(),n=t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[e,n.stackParser,n.attachStacktrace]}Ol.__initStatic();var Rl=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"];class Ll{static __initStatic(){this.id="TryCatch"}__init(){this.name=Ll.id}constructor(e){Ll.prototype.__init.call(this),this._options={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e}}setupOnce(){var e=Lo();this._options.setTimeout&&ha(e,"setTimeout",zl),this._options.setInterval&&ha(e,"setInterval",zl),this._options.requestAnimationFrame&&ha(e,"requestAnimationFrame",Nl),this._options.XMLHttpRequest&&"XMLHttpRequest"in e&&ha(XMLHttpRequest.prototype,"send",Bl);var t=this._options.eventTarget;t&&(Array.isArray(t)?t:Rl).forEach(Vl)}}function zl(e){return function(...t){var n=t[0];return t[0]=Il(n,{mechanism:{data:{function:Sa(e)},handled:!0,type:"instrument"}}),e.apply(this,t)}}function Nl(e){return function(t){return e.apply(this,[Il(t,{mechanism:{data:{function:"requestAnimationFrame",handler:Sa(e)},handled:!0,type:"instrument"}})])}}function Bl(e){return function(...t){var n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(e=>{e in n&&"function"==typeof n[e]&&ha(n,e,function(t){var n={mechanism:{data:{function:e,handler:Sa(t)},handled:!0,type:"instrument"}},r=pa(t);return r&&(n.mechanism.data.handler=Sa(r)),Il(t,n)})}),e.apply(this,t)}}function Vl(e){var t=Lo(),n=t[e]&&t[e].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(ha(n,"addEventListener",function(t){return function(n,r,i){try{"function"==typeof r.handleEvent&&(r.handleEvent=Il(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Sa(r),target:e},handled:!0,type:"instrument"}}))}catch{}return t.apply(this,[n,Il(r,{mechanism:{data:{function:"addEventListener",handler:Sa(r),target:e},handled:!0,type:"instrument"}}),i])}}),ha(n,"removeEventListener",function(e){return function(t,n,r){var i=n;try{var o=i&&i.__sentry_wrapped__;o&&e.call(this,t,o,r)}catch{}return e.call(this,t,i,r)}}))}Ll.__initStatic();class Ul{static __initStatic(){this.id="LinkedErrors"}__init(){this.name=Ul.id}constructor(e={}){Ul.prototype.__init.call(this),this._key=e.key||"cause",this._limit=e.limit||5}setupOnce(){var e=Es().getClient();!e||As((t,n)=>{var r=Es().getIntegration(Ul);return r?function(e,t,n,r,i){if(!(r.exception&&r.exception.values&&i&&Ko(i.originalException,Error)))return r;var o=Wl(e,n,i.originalException,t);return r.exception.values=[...o,...r.exception.values],r}(e.getOptions().stackParser,r._key,r._limit,t,n):t})}}function Wl(e,t,n,r,i=[]){if(!Ko(n[r],Error)||i.length+1>=t)return i;var o=Ks(e,n[r]);return Wl(e,t,n[r],r,[o,...i])}Ul.__initStatic();var Hl=Lo();class Yl{constructor(){Yl.prototype.__init.call(this)}static __initStatic(){this.id="HttpContext"}__init(){this.name=Yl.id}setupOnce(){As(e=>{if(Es().getIntegration(Yl)){if(!Hl.navigator&&!Hl.location&&!Hl.document)return e;var t=e.request&&e.request.url||Hl.location&&Hl.location.href;const{referrer:r}=Hl.document||{},{userAgent:i}=Hl.navigator||{};var n={...t&&{url:t},headers:{...e.request&&e.request.headers,...r&&{Referer:r},...i&&{"User-Agent":i}}};return{...e,request:n}}return e})}}Yl.__initStatic();class $l{constructor(){$l.prototype.__init.call(this)}static __initStatic(){this.id="Dedupe"}__init(){this.name=$l.id}setupOnce(e,t){var n=e=>{var n=t().getIntegration($l);if(n){try{if(function(e,t){return!!t&&!(!function(e,t){var n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!Xl(e,t)||!Gl(e,t))}(e,t)&&!function(e,t){var n=Kl(t),r=Kl(e);return!!(n&&r&&n.type===r.type&&n.value===r.value&&Xl(e,t)&&Gl(e,t))}(e,t))}(e,n._previousEvent))return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{return n._previousEvent=e}return n._previousEvent=e}return e};n.id=this.name,e(n)}}function Gl(e,t){let n=ql(e),r=ql(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||r.length!==n.length)return!1;for(let e=0;e<r.length;e++){var i=r[e],o=n[e];if(i.filename!==o.filename||i.lineno!==o.lineno||i.colno!==o.colno||i.function!==o.function)return!1}return!0}function Xl(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return n.join("")===r.join("")}catch{return!1}}function Kl(e){return e.exception&&e.exception.values&&e.exception.values[0]}function ql(e){var t=e.exception;if(t)try{return t.values[0].stacktrace.frames}catch{return}}$l.__initStatic();var Zl=[new Gs,new Ys,new Ll,new rl,new Ol,new Ul,new $l,new Yl];function Jl(e={}){if(void 0===e.defaultIntegrations&&(e.defaultIntegrations=Zl),void 0===e.release){var t=Lo();t.SENTRY_RELEASE&&t.SENTRY_RELEASE.id&&(e.release=t.SENTRY_RELEASE.id)}void 0===e.autoSessionTracking&&(e.autoSessionTracking=!0),void 0===e.sendClientReports&&(e.sendClientReports=!0);var n={...e,stackParser:Ca(e.stackParser||Sl),integrations:Ns(e),transport:e.transport||(Aa()?dl:fl)};(function(e,t){!0===t.debug&&(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__?sa.enable():console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle."));var n=Es(),r=n.getScope();r&&r.update(t.initialScope);var i=new e(t);n.bindClient(i)})(cl,n),e.autoSessionTracking&&function(){var e=Lo(),t=e.document;if(typeof t>"u")return void((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&sa.warn("Session tracking in non-browser environment with @sentry/browser is not supported."));var n=Es();!n.captureSession||(Ql(n),Pa("history",({from:e,to:t})=>{void 0===e||e===t||Ql(Es())}))}()}function Ql(e){e.startSession({ignoreDuration:!0}),e.captureSession()}var ec={exports:{}},tc={},nc=i,rc=Symbol.for("react.element"),ic=Symbol.for("react.fragment"),oc=Object.prototype.hasOwnProperty,ac=nc.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,sc={key:!0,ref:!0,__self:!0,__source:!0};
10
10
  /**
11
11
  * @license React
12
12
  * react-jsx-runtime.production.min.js