@emailmaker/filemanager 0.10.10 → 0.10.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/file-manager.css +9 -4
- package/file-manager.esm.js +4 -4
- package/file-manager.esm.js.map +1 -1
- package/file-manager.js +1 -1
- package/package.json +1 -1
package/file-manager.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import*as r from"react";import i,{useState as o,useEffect as a,createContext as s,useContext as l,useCallback as c,useRef as u,useMemo as h,createElement as d,memo as f,forwardRef as p,useImperativeHandle as g,Children as m,isValidElement as v,Fragment as b,cloneElement as y,useId as w,useDebugValue as x,useLayoutEffect as C,useInsertionEffect as _,Component as S}from"react";import{createRoot as A}from"react-dom/client";import{theme as k,ConfigProvider as T,App as I,Form as O,message as E,Input as P,Image as M,Typography as F,Select as j,Checkbox as D,Dropdown as R,Tooltip as L,Button as z,Space as N,Segmented as B,Pagination as V,Table as U,Row as H,Col as W,Card as Y,Modal as $,Tree as G,Menu as X,Divider as K,List as q,Progress as Z,Avatar as J,Layout as Q,Spin as ee,Radio as te,Tag as ne,Carousel as re}from"antd";import ie from"antd/es/alert/ErrorBoundary";import oe,{FolderOutlined as ae,EyeOutlined as se,BarsOutlined as le,AppstoreOutlined as ce,DownOutlined as ue,RightOutlined as he,LinkOutlined as de,UploadOutlined as fe,FileOutlined as pe,FolderAddOutlined as ge,FolderOpenOutlined as me,MinusOutlined as ve,CloseOutlined as be,FileImageOutlined as ye,ExclamationCircleOutlined as we,CheckCircleOutlined as xe,LoadingOutlined as Ce,ArrowRightOutlined as _e,ArrowLeftOutlined as Se,CheckOutlined as Ae}from"@ant-design/icons";import*as ke from"react-dom";import Te,{createPortal as Ie}from"react-dom";import"antd/dist/reset.css";function Oe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ee(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Oe(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Oe(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Pe(e){return Pe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pe(e)}function Me(e){var t=function(e,t){if("object"!=Pe(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=Pe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Pe(t)?t:t+""}function Fe(e,t,n){return(t=Me(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function je(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function De(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?je(Object(n),!0).forEach(function(t){Fe(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):je(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Re={},Le=[];function ze(e,t){if("production"!==process.env.NODE_ENV&&!e&&void 0!==console){var n=Le.reduce(function(e,t){return t(null!=e?e:"","warning")},t);n&&console.error("Warning: ".concat(n))}}function Ne(e,t){if("production"!==process.env.NODE_ENV&&!e&&void 0!==console){var n=Le.reduce(function(e,t){return t(null!=e?e:"","note")},t);n&&console.warn("Note: ".concat(n))}}function Be(e,t,n){t||Re[n]||(e(!1,n),Re[n]=!0)}function Ve(e,t){Be(ze,e,t)}function Ue(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=new Set;return function e(t,i){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=r.has(t);if(Ve(!a,"Warning: There may be circular references"),a)return!1;if(t===i)return!0;if(n&&o>1)return!1;r.add(t);var s=o+1;if(Array.isArray(t)){if(!Array.isArray(i)||t.length!==i.length)return!1;for(var l=0;l<t.length;l++)if(!e(t[l],i[l],s))return!1;return!0}if(t&&i&&"object"===Pe(t)&&"object"===Pe(i)){var c=Object.keys(t);return c.length===Object.keys(i).length&&c.every(function(n){return e(t[n],i[n],s)})}return!1}(e,t)}function He(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function We(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Me(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}Ve.preMessage=function(e){Le.push(e)},Ve.resetWarned=function(){Re={}},Ve.noteOnce=function(e,t){Be(Ne,e,t)};function Ye(e){return e.join("%")}var $e=function(){function e(t){He(this,e),Fe(this,"instanceId",void 0),Fe(this,"cache",new Map),Fe(this,"extracted",new Set),this.instanceId=t}return We(e,[{key:"get",value:function(e){return this.opGet(Ye(e))}},{key:"opGet",value:function(e){return this.cache.get(e)||null}},{key:"update",value:function(e,t){return this.opUpdate(Ye(e),t)}},{key:"opUpdate",value:function(e,t){var n=t(this.cache.get(e));null===n?this.cache.delete(e):this.cache.set(e,n)}}]),e}(),Ge=["children"],Xe="data-css-hash",Ke="__cssinjs_instance__";function qe(){var e=Math.random().toString(12).slice(2);if("undefined"!=typeof document&&document.head&&document.body){var t=document.body.querySelectorAll("style[".concat(Xe,"]"))||[],n=document.head.firstChild;Array.from(t).forEach(function(t){t[Ke]=t[Ke]||e,t[Ke]===e&&document.head.insertBefore(t,n)});var r={};Array.from(document.querySelectorAll("style[".concat(Xe,"]"))).forEach(function(t){var n,i=t.getAttribute(Xe);r[i]?t[Ke]===e&&(null===(n=t.parentNode)||void 0===n||n.removeChild(t)):r[i]=!0})}return new $e(e)}var Ze=r.createContext({hashPriority:"low",cache:qe(),defaultCache:!0}),Je=function(e){var t,n,i,o,a=e.children,s=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,Ge),l=r.useContext(Ze),c=(t=function(){var e=De({},l);Object.keys(s).forEach(function(t){var n=s[t];void 0!==s[t]&&(e[t]=n)});var t=s.cache;return e.cache=e.cache||qe(),e.defaultCache=!t&&l.defaultCache,e},n=[l,s],i=function(e,t){return!Ue(e[0],t[0],!0)||!Ue(e[1],t[1],!0)},"value"in(o=r.useRef({})).current&&!i(o.current.condition,n)||(o.current.value=t(),o.current.condition=n),o.current.value);return r.createElement(Ze.Provider,{value:c},a)};var Qe=function(){function e(){He(this,e),Fe(this,"cache",void 0),Fe(this,"keys",void 0),Fe(this,"cacheCallTimes",void 0),this.cache=new Map,this.keys=[],this.cacheCallTimes=0}return We(e,[{key:"size",value:function(){return this.keys.length}},{key:"internalGet",value:function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i={map:this.cache};return e.forEach(function(e){var t;i?i=null===(t=i)||void 0===t||null===(t=t.map)||void 0===t?void 0:t.get(e):i=void 0}),null!==(t=i)&&void 0!==t&&t.value&&r&&(i.value[1]=this.cacheCallTimes++),null===(n=i)||void 0===n?void 0:n.value}},{key:"get",value:function(e){var t;return null===(t=this.internalGet(e,!0))||void 0===t?void 0:t[0]}},{key:"has",value:function(e){return!!this.internalGet(e)}},{key:"set",value:function(t,n){var r=this;if(!this.has(t)){if(this.size()+1>e.MAX_CACHE_SIZE+e.MAX_CACHE_OFFSET){var i=this.keys.reduce(function(e,t){var n=Ee(e,2)[1];return r.internalGet(t)[1]<n?[t,r.internalGet(t)[1]]:e},[this.keys[0],this.cacheCallTimes]),o=Ee(i,1)[0];this.delete(o)}this.keys.push(t)}var a=this.cache;t.forEach(function(e,i){if(i===t.length-1)a.set(e,{value:[n,r.cacheCallTimes++]});else{var o=a.get(e);o?o.map||(o.map=new Map):a.set(e,{map:new Map}),a=a.get(e).map}})}},{key:"deleteByPath",value:function(e,t){var n,r=e.get(t[0]);if(1===t.length)return r.map?e.set(t[0],{map:r.map}):e.delete(t[0]),null===(n=r.value)||void 0===n?void 0:n[0];var i=this.deleteByPath(r.map,t.slice(1));return r.map&&0!==r.map.size||r.value||e.delete(t[0]),i}},{key:"delete",value:function(e){if(this.has(e))return this.keys=this.keys.filter(function(t){return!function(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(t,e)}),this.deleteByPath(this.cache,e)}}]),e}();function et(e,t,n){if(arguments.length>4&&void 0!==arguments[4]&&arguments[4])return e;var r=De(De({},arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}),{},Fe(Fe({},"data-token-hash",t),Xe,n)),i=Object.keys(r).map(function(e){var t=r[e];return t?"".concat(e,'="').concat(t,'"'):null}).filter(function(e){return e}).join(" ");return"<style ".concat(i,">").concat(e,"</style>")}Fe(Qe,"MAX_CACHE_SIZE",20),Fe(Qe,"MAX_CACHE_OFFSET",5),new Qe,"test"!==process.env.NODE_ENV&&"undefined"!=typeof window&&window.document&&window.document.createElement?r.useLayoutEffect:r.useEffect,De({},r).useInsertionEffect,De({},r).useInsertionEffect;if(process.env.NODE_ENV,"production"!==process.env.NODE_ENV&&"undefined"!=typeof module&&module&&module.hot&&"undefined"!=typeof window){var tt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:null;if(tt&&"function"==typeof tt.webpackHotUpdate){var nt=tt.webpackHotUpdate;tt.webpackHotUpdate=function(){return setTimeout(function(){0},0),nt.apply(void 0,arguments)}}}process.env.NODE_ENV;var rt="comm",it="rule",ot="decl",at=Math.abs,st=String.fromCharCode;function lt(e){return e.trim()}function ct(e,t,n){return e.replace(t,n)}function ut(e,t,n){return e.indexOf(t,n)}function ht(e,t){return 0|e.charCodeAt(t)}function dt(e,t,n){return e.slice(t,n)}function ft(e){return e.length}function pt(e,t){return t.push(e),e}var gt=1,mt=1,vt=0,bt=0,yt=0,wt="";function xt(e,t,n,r,i,o,a,s){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:gt,column:mt,length:a,return:"",siblings:s}}function Ct(){return yt=bt>0?ht(wt,--bt):0,mt--,10===yt&&(mt=1,gt--),yt}function _t(){return yt=bt<vt?ht(wt,bt++):0,mt++,10===yt&&(mt=1,gt++),yt}function St(){return ht(wt,bt)}function At(){return bt}function kt(e,t){return dt(wt,e,t)}function Tt(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function It(e){return lt(kt(bt-1,Pt(91===e?e+2:40===e?e+1:e)))}function Ot(e){for(;(yt=St())&&yt<33;)_t();return Tt(e)>2||Tt(yt)>3?"":" "}function Et(e,t){for(;--t&&_t()&&!(yt<48||yt>102||yt>57&&yt<65||yt>70&&yt<97););return kt(e,At()+(t<6&&32==St()&&32==_t()))}function Pt(e){for(;_t();)switch(yt){case e:return bt;case 34:case 39:34!==e&&39!==e&&Pt(yt);break;case 40:41===e&&Pt(e);break;case 92:_t()}return bt}function Mt(e,t){for(;_t()&&e+yt!==57&&(e+yt!==84||47!==St()););return"/*"+kt(t,bt-1)+"*"+st(47===e?e:_t())}function Ft(e){for(;!Tt(St());)_t();return kt(e,bt)}function jt(e){return function(e){return wt="",e}(Dt("",null,null,null,[""],e=function(e){return gt=mt=1,vt=ft(wt=e),bt=0,[]}(e),0,[0],e))}function Dt(e,t,n,r,i,o,a,s,l){for(var c=0,u=0,h=a,d=0,f=0,p=0,g=1,m=1,v=1,b=0,y="",w=i,x=o,C=r,_=y;m;)switch(p=b,b=_t()){case 40:if(108!=p&&58==ht(_,h-1)){-1!=ut(_+=ct(It(b),"&","&\f"),"&\f",at(c?s[c-1]:0))&&(v=-1);break}case 34:case 39:case 91:_+=It(b);break;case 9:case 10:case 13:case 32:_+=Ot(p);break;case 92:_+=Et(At()-1,7);continue;case 47:switch(St()){case 42:case 47:pt(Lt(Mt(_t(),At()),t,n,l),l),5!=Tt(p||1)&&5!=Tt(St()||1)||!ft(_)||" "===dt(_,-1,void 0)||(_+=" ");break;default:_+="/"}break;case 123*g:s[c++]=ft(_)*v;case 125*g:case 59:case 0:switch(b){case 0:case 125:m=0;case 59+u:-1==v&&(_=ct(_,/\f/g,"")),f>0&&(ft(_)-h||0===g&&47===p)&&pt(f>32?zt(_+";",r,n,h-1,l):zt(ct(_," ","")+";",r,n,h-2,l),l);break;case 59:_+=";";default:if(pt(C=Rt(_,t,n,c,u,i,s,y,w=[],x=[],h,o),o),123===b)if(0===u)Dt(_,t,C,C,w,o,h,s,x);else{switch(d){case 99:if(110===ht(_,3))break;case 108:if(97===ht(_,2))break;default:u=0;case 100:case 109:case 115:}u?Dt(e,C,C,r&&pt(Rt(e,C,C,0,0,i,s,y,i,w=[],h,x),x),i,x,h,s,r?w:x):Dt(_,C,C,C,[""],x,0,s,x)}}c=u=f=0,g=v=1,y=_="",h=a;break;case 58:h=1+ft(_),f=p;default:if(g<1)if(123==b)--g;else if(125==b&&0==g++&&125==Ct())continue;switch(_+=st(b),b*g){case 38:v=u>0?1:(_+="\f",-1);break;case 44:s[c++]=(ft(_)-1)*v,v=1;break;case 64:45===St()&&(_+=It(_t())),d=St(),u=h=ft(y=_+=Ft(At())),b++;break;case 45:45===p&&2==ft(_)&&(g=0)}}return o}function Rt(e,t,n,r,i,o,a,s,l,c,u,h){for(var d=i-1,f=0===i?o:[""],p=function(e){return e.length}(f),g=0,m=0,v=0;g<r;++g)for(var b=0,y=dt(e,d+1,d=at(m=a[g])),w=e;b<p;++b)(w=lt(m>0?f[b]+" "+y:ct(y,/&\f/g,f[b])))&&(l[v++]=w);return xt(e,t,n,0===i?it:s,l,c,u,h)}function Lt(e,t,n,r){return xt(e,t,n,rt,st(yt),dt(e,2,-2),0,r)}function zt(e,t,n,r,i){return xt(e,t,n,ot,dt(e,0,r),dt(e,r+1,-1),r,i)}function Nt(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function Bt(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case"@namespace":case ot:return e.return=e.return||e.value;case rt:return"";case"@keyframes":return e.return=e.value+"{"+Nt(e.children,r)+"}";case it:if(!ft(e.value=e.props.join(",")))return""}return ft(n=Nt(e.children,r))?e.return=e.value+"{"+n+"}":""}function Vt(e){return e.notSplit=!0,e}Fe(Fe(Fe({},"style",function(e,t,n){var r=Ee(e,6),i=r[0],o=r[1],a=r[2],s=r[3],l=r[4],c=r[5],u=(n||{}).plain;if(l)return null;var h=i,d={"data-rc-order":"prependQueue","data-rc-priority":"".concat(c)};return h=et(i,o,a,d,u),s&&Object.keys(s).forEach(function(e){if(!t[e]){t[e]=!0;var n=function(e){return Nt(jt(e),Bt).replace(/\{%%%\:[^;];}/g,";")}(s[e]),r=et(n,o,"_effect-".concat(e),d,u);e.startsWith("@layer")?h=r+h:h+=r}}),[c,a,h]}),"token",function(e,t,n){var r=Ee(e,5),i=r[2],o=r[3],a=r[4],s=(n||{}).plain;if(!o)return null;var l=i._tokenKey;return[-999,l,et(o,a,l,{"data-rc-order":"prependQueue","data-rc-priority":"".concat(-999)},s)]}),"cssVar",function(e,t,n){var r=Ee(e,4),i=r[1],o=r[2],a=r[3],s=(n||{}).plain;if(!i)return null;return[-999,o,et(i,a,o,{"data-rc-order":"prependQueue","data-rc-priority":"".concat(-999)},s)]}),Vt(["borderTop","borderBottom"]),Vt(["borderTop"]),Vt(["borderBottom"]),Vt(["borderLeft","borderRight"]),Vt(["borderLeft"]),Vt(["borderRight"]);const Ut={defaultMerge:Symbol("deepmerge-ts: default merge"),skip:Symbol("deepmerge-ts: skip")};function Ht(e,t){return t}function Wt(e,t){return e.filter(e=>void 0!==e)}var Yt;function $t(e){return"object"!=typeof e||null===e?0:Array.isArray(e)?2:function(e){if(!Kt.includes(Object.prototype.toString.call(e)))return!1;const{constructor:t}=e;if(void 0===t)return!0;const n=t.prototype;if(null===n||"object"!=typeof n||!Kt.includes(Object.prototype.toString.call(n)))return!1;if(!n.hasOwnProperty("isPrototypeOf"))return!1;return!0}(e)?1:e instanceof Set?3:e instanceof Map?4:5}function Gt(e,t){return"object"==typeof e&&Object.prototype.propertyIsEnumerable.call(e,t)}function Xt(e){let t=0,n=e[0]?.[Symbol.iterator]();return{[Symbol.iterator]:()=>({next(){for(;;){if(void 0===n)return{done:!0,value:void 0};const r=n.next();if(!0!==r.done)return{done:!1,value:r.value};t+=1,n=e[t]?.[Symbol.iterator]()}}})}}!function(e){e[e.NOT=0]="NOT",e[e.RECORD=1]="RECORD",e[e.ARRAY=2]="ARRAY",e[e.SET=3]="SET",e[e.MAP=4]="MAP",e[e.OTHER=5]="OTHER"}(Yt||(Yt={}));const Kt=["[object Object]","[object Module]"];const qt={mergeRecords:function(e,t,n){const r={};for(const i of function(e){const t=new Set;for(const n of e)for(const e of[...Object.keys(n),...Object.getOwnPropertySymbols(n)])t.add(e);return t}(e)){const o=[];for(const t of e)Gt(t,i)&&o.push(t[i]);if(0===o.length)continue;const a=t.metaDataUpdater(n,{key:i,parents:e}),s=Jt(o,t,a);s!==Ut.skip&&("__proto__"===i?Object.defineProperty(r,i,{value:s,configurable:!0,enumerable:!0,writable:!0}):r[i]=s)}return r},mergeArrays:function(e){return e.flat()},mergeSets:function(e){return new Set(Xt(e))},mergeMaps:function(e){return new Map(Xt(e))},mergeOthers:function(e){return e.at(-1)}};function Zt(...e){return function(e,t){const n=function(e,t){return{defaultMergeFunctions:qt,mergeFunctions:{...qt,...Object.fromEntries(Object.entries(e).filter(([e,t])=>Object.hasOwn(qt,e)).map(([e,t])=>!1===t?[e,qt.mergeOthers]:[e,t]))},metaDataUpdater:e.metaDataUpdater??Ht,deepmerge:t,useImplicitDefaultMerging:e.enableImplicitDefaultMerging??!1,filterValues:!1===e.filterValues?void 0:e.filterValues??Wt,actions:Ut}}(e,r);function r(...e){return Jt(e,n,t)}return r}({})(...e)}function Jt(e,t,n){const r=t.filterValues?.(e,n)??e;if(0===r.length)return;if(1===r.length)return Qt(r,t,n);const i=$t(r[0]);if(0!==i&&5!==i)for(let e=1;e<r.length;e++)if($t(r[e])!==i)return Qt(r,t,n);switch(i){case 1:return function(e,t,n){const r=t.mergeFunctions.mergeRecords(e,t,n);if(r===Ut.defaultMerge||t.useImplicitDefaultMerging&&void 0===r&&t.mergeFunctions.mergeRecords!==t.defaultMergeFunctions.mergeRecords)return t.defaultMergeFunctions.mergeRecords(e,t,n);return r}(r,t,n);case 2:return function(e,t,n){const r=t.mergeFunctions.mergeArrays(e,t,n);if(r===Ut.defaultMerge||t.useImplicitDefaultMerging&&void 0===r&&t.mergeFunctions.mergeArrays!==t.defaultMergeFunctions.mergeArrays)return t.defaultMergeFunctions.mergeArrays(e);return r}(r,t,n);case 3:return function(e,t,n){const r=t.mergeFunctions.mergeSets(e,t,n);if(r===Ut.defaultMerge||t.useImplicitDefaultMerging&&void 0===r&&t.mergeFunctions.mergeSets!==t.defaultMergeFunctions.mergeSets)return t.defaultMergeFunctions.mergeSets(e);return r}(r,t,n);case 4:return function(e,t,n){const r=t.mergeFunctions.mergeMaps(e,t,n);if(r===Ut.defaultMerge||t.useImplicitDefaultMerging&&void 0===r&&t.mergeFunctions.mergeMaps!==t.defaultMergeFunctions.mergeMaps)return t.defaultMergeFunctions.mergeMaps(e);return r}(r,t,n);default:return Qt(r,t,n)}}function Qt(e,t,n){const r=t.mergeFunctions.mergeOthers(e,t,n);return r===Ut.defaultMerge||t.useImplicitDefaultMerging&&void 0===r&&t.mergeFunctions.mergeOthers!==t.defaultMergeFunctions.mergeOthers?t.defaultMergeFunctions.mergeOthers(e):r}const en={hashed:!1,algorithm:k.defaultAlgorithm,token:{colorLink:"#1677ff",colorInfo:"#722ed1",colorTextBase:"#000000",colorBgLayout:"#f0f2f5",borderRadiusXL:16,borderRadiusLG:12,borderRadius:8,borderRadiusSM:6,colorDarken1:"rgba(0, 0, 0, 0.08)",colorFillSecondaryDarken:"rgba(0, 0, 0, 0.1)",formControlHeight:34,borderWidth:1,borderColorHover:"#C5C5C5",formItemMarginBottomMD:20,formItemMarginBottomXS:8,colorSecondaryH:265.03,colorSecondaryS:"63.92%",colorSecondaryL:"50%",colorSecondaryBgH:273,colorSecondaryBgS:"100%",colorSecondaryBgL:"93%",appZoom:1},components:{Progress:{colorFillSecondary:"#ffffff"},Tabs:{titleFontSize:16,titleFontSizeSM:16,fontSize:16,fontSizeLG:16}}},tn={hashed:!1,algorithm:k.darkAlgorithm,token:{colorBgBase:"#1F1F1F",colorInfo:"#9254de",colorLink:"#1890ff",colorLinkHover:"#69c0ff",wireframe:!1,borderRadiusXL:16,borderRadiusLG:12,borderRadius:8,borderRadiusSM:6,borderWidth:1,colorDarken1:"rgba(0, 0, 0, 0.9)",colorFillSecondaryDarken:"rgba(255, 255, 255, 0.16)",formControlHeight:34,borderColorHover:"rgba(255, 255, 255, 0.3)",formItemMarginBottomMD:20,formItemMarginBottomXS:8,appZoom:1},components:{Tabs:{titleFontSize:16,titleFontSizeSM:16,fontSize:16,fontSizeLG:16}}},nn=({externalTheme:t,children:n,customThemeToken:r})=>{const[i]=o(t||"light"),[s,l]=o("light"===i?en:tn);return a(()=>{const e="light"===i?en:tn,t=r?Zt(e.token,r):e.token;l(Object.assign(Object.assign({},e),{token:t}))},[l,i,r]),e("div",{id:"file-manager-element-id",style:{height:"100%"},children:e(T,{theme:s,children:e(Je,{transformers:[],children:e(I,{style:{height:"100%"},children:n})})})})},rn={fileManager:{locale:"en_US",mode:"fileManager",theme:"light",enabledTabs:["editor"]},imageCenter:{locale:"en_US",mode:"imageCenter",theme:"light",enabledTabs:["stock","gif","editor"]},plugin:{locale:"en_US",mode:"plugin",theme:"light",enabledTabs:["editor","stock","gif","ai"]}},on=(e="fileManager",t)=>"imageCenter"===e&&t?t:Object.assign({},rn[e]);let an=!1;const sn=()=>{if(an)return;window.addEventListener("error",e=>!(!e.message||!e.message.includes("ResizeObserver loop completed with undelivered notifications"))&&(e.stopImmediatePropagation(),e.preventDefault(),!0),!0);const e=window.onerror;window.onerror=(t,n,r,i,o)=>!("string"!=typeof t||!t.includes("ResizeObserver loop completed with undelivered notifications"))||!!e&&e(t,n,r,i,o),window.addEventListener("unhandledrejection",e=>{var t,n;(null===(n=null===(t=e.reason)||void 0===t?void 0:t.message)||void 0===n?void 0:n.includes("ResizeObserver loop completed with undelivered notifications"))&&e.preventDefault()});const t=console.error;if(console.error=(...e)=>{var n;((null===(n=e[0])||void 0===n?void 0:n.toString())||"").includes("ResizeObserver loop completed with undelivered notifications")||t.apply(console,e)},"undefined"!=typeof window){const e=()=>{try{["webpackHotUpdate","__webpack_require__","__webpack_hash__"].forEach(e=>{if(window[e]){const e=window.__webpack_require__;e&&"object"==typeof e&&null!==e&&"cache"in e&&console.warn("✅ Webpack обнаружен, активирована дополнительная защита от ResizeObserver ошибок")}})}catch(e){console.warn("Ошибка при поиске webpack объектов:",e)}};e(),setTimeout(e,1e3)}an=!0},ln=()=>{an=!1};var cn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};const un={},hn=(e,t,n,r)=>{gn(n)&&un[n]||(gn(n)&&(un[n]=new Date),((e,t,n,r)=>{const i=[n,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(i,"warn","react-i18next::",!0);gn(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...i):console?.warn&&console.warn(...i)})(e,t,n,r))},dn=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},fn=(e,t,n)=>{e.loadNamespaces(t,dn(e,n))},pn=(e,t,n,r)=>{if(gn(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return fn(e,n,r);n.forEach(t=>{e.options.ns.indexOf(t)<0&&e.options.ns.push(t)}),e.loadLanguages(t,dn(e,r))},gn=e=>"string"==typeof e,mn=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,vn={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},bn=e=>vn[e];let yn={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e=>e.replace(mn,bn)};let wn;const xn={type:"3rdParty",init(e){((e={})=>{yn={...yn,...e}})(e.options.react),(e=>{wn=e})(e)}},Cn=s();class _n{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const Sn=(e,t,n,r)=>e.getFixedT(t,n,r),An=(e,t={})=>{const{i18n:n}=t,{i18n:r,defaultNS:i}=l(Cn)||{},s=n||r||wn;if(s&&!s.reportNamespaces&&(s.reportNamespaces=new _n),!s){hn(s,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const e=(e,t)=>{return gn(t)?t:"object"==typeof(n=t)&&null!==n&&gn(t.defaultValue)?t.defaultValue:Array.isArray(e)?e[e.length-1]:e;var n},t=[e,{},!1];return t.t=e,t.i18n={},t.ready=!1,t}s.options.react?.wait&&hn(s,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const h={...yn,...s.options.react,...t},{useSuspense:d,keyPrefix:f}=h;let p=i||s.options?.defaultNS;p=gn(p)?[p]:p||["translation"],s.reportNamespaces.addUsedNamespaces?.(p);const g=(s.isInitialized||s.initializedStoreOnce)&&p.every(e=>((e,t,n={})=>t.languages&&t.languages.length?t.hasLoadedNamespace(e,{lng:n.lng,precheck:(t,r)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}):(hn(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0))(e,s,h)),m=((e,t,n,r)=>c(Sn(e,t,n,r),[e,t,n,r]))(s,t.lng||null,"fallback"===h.nsMode?p:p[0],f),v=()=>m,b=()=>Sn(s,t.lng||null,"fallback"===h.nsMode?p:p[0],f),[y,w]=o(v);let x=p.join();t.lng&&(x=`${t.lng}${x}`);const C=((e,t)=>{const n=u();return a(()=>{n.current=e},[e,t]),n.current})(x),_=u(!0);a(()=>{const{bindI18n:e,bindI18nStore:n}=h;_.current=!0,g||d||(t.lng?pn(s,t.lng,p,()=>{_.current&&w(b)}):fn(s,p,()=>{_.current&&w(b)})),g&&C&&C!==x&&_.current&&w(b);const r=()=>{_.current&&w(b)};return e&&s?.on(e,r),n&&s?.store.on(n,r),()=>{_.current=!1,s&&e&&e?.split(" ").forEach(e=>s.off(e,r)),n&&s&&n.split(" ").forEach(e=>s.store.off(e,r))}},[s,x]),a(()=>{_.current&&g&&w(v)},[s,f,g]);const S=[y,s,g];if(S.t=y,S.i18n=s,S.ready=g,g)return S;if(!g&&!d)return S;throw new Promise(e=>{t.lng?pn(s,t.lng,p,()=>e()):fn(s,p,()=>e())})};function kn({i18n:e,defaultNS:t,children:n}){const r=h(()=>({i18n:e,defaultNS:t}),[e,t]);return d(Cn.Provider,{value:r},n)}const Tn=e=>"string"==typeof e,In=()=>{let e,t;const n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},On=e=>null==e?"":""+e,En=/###/g,Pn=e=>e&&e.indexOf("###")>-1?e.replace(En,"."):e,Mn=e=>!e||Tn(e),Fn=(e,t,n)=>{const r=Tn(t)?t.split("."):t;let i=0;for(;i<r.length-1;){if(Mn(e))return{};const t=Pn(r[i]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return Mn(e)?{}:{obj:e,k:Pn(r[i])}},jn=(e,t,n)=>{const{obj:r,k:i}=Fn(e,t,Object);if(void 0!==r||1===t.length)return void(r[i]=n);let o=t[t.length-1],a=t.slice(0,t.length-1),s=Fn(e,a,Object);for(;void 0===s.obj&&a.length;)o=`${a[a.length-1]}.${o}`,a=a.slice(0,a.length-1),s=Fn(e,a,Object),s?.obj&&void 0!==s.obj[`${s.k}.${o}`]&&(s.obj=void 0);s.obj[`${s.k}.${o}`]=n},Dn=(e,t)=>{const{obj:n,k:r}=Fn(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},Rn=(e,t,n)=>{for(const r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?Tn(e[r])||e[r]instanceof String||Tn(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Rn(e[r],t[r],n):e[r]=t[r]);return e},Ln=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var zn={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const Nn=e=>Tn(e)?e.replace(/[&<>"'\/]/g,e=>zn[e]):e;const Bn=[" ",",","?","!",";"],Vn=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}(20),Un=(e,t,n=".")=>{if(!e)return;if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}const r=t.split(n);let i=e;for(let e=0;e<r.length;){if(!i||"object"!=typeof i)return;let t,o="";for(let a=e;a<r.length;++a)if(a!==e&&(o+=n),o+=r[a],t=i[o],void 0!==t){if(["string","number","boolean"].indexOf(typeof t)>-1&&a<r.length-1)continue;e+=a-e+1;break}i=t}return i},Hn=e=>e?.replace("_","-"),Wn={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class Yn{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||Wn,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,r){return r&&!this.debug?null:(Tn(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new Yn(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new Yn(this.logger,e)}}var $n=new Yn;class Gn{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);const n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e,...t){if(this.observers[e]){Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r<n;r++)e(...t)})}if(this.observers["*"]){Array.from(this.observers["*"].entries()).forEach(([n,r])=>{for(let i=0;i<r;i++)n.apply(n,[e,...t])})}}}class Xn extends Gn{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){const i=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,o=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,t],n&&(Array.isArray(n)?a.push(...n):Tn(n)&&i?a.push(...n.split(i)):a.push(n)));const s=Dn(this.data,a);return!s&&!t&&!n&&e.indexOf(".")>-1&&(e=a[0],t=a[1],n=a.slice(2).join(".")),!s&&o&&Tn(n)?Un(this.data?.[e]?.[t],n,i):s}addResource(e,t,n,r,i={silent:!1}){const o=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator;let a=[e,t];n&&(a=a.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(a=e.split("."),r=t,t=a[1]),this.addNamespaces(t),jn(this.data,a,r),i.silent||this.emit("added",e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(const r in n)(Tn(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,r,i,o={silent:!1,skipCopy:!1}){let a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),r=n,n=t,t=a[1]),this.addNamespaces(t);let s=Dn(this.data,a)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?Rn(s,n,i):s={...s,...n},jn(this.data,a,s),o.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var Kn={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,i)??t}),t}};const qn=Symbol("i18next/PATH_KEY");function Zn(e,t){const{[qn]:n}=e(function(){const e=[],t=Object.create(null);let n;return t.get=(r,i)=>(n?.revoke?.(),i===qn?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}());return n.join(t?.keySeparator??".")}const Jn={},Qn=e=>!Tn(e)&&"boolean"!=typeof e&&"number"!=typeof e;class er extends Gn{constructor(e,t={}){super(),((e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})})(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=$n.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const n={...t};if(null==e)return!1;const r=this.resolve(e,n);return void 0!==r?.res}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let i=t.ns||this.options.defaultNS||[];const o=n&&e.indexOf(n)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,n)=>{t=t||"",n=n||"";const r=Bn.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(0===r.length)return!0;const i=Vn.getRegExp(`(${r.map(e=>"?"===e?"\\?":e).join("|")})`);let o=!i.test(e);if(!o){const t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(o=!0)}return o})(e,n,r));if(o&&!a){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:Tn(i)?[i]:i};const o=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(o[0])>-1)&&(i=o.shift()),e=o.join(r)}return{key:e,namespaces:Tn(i)?[i]:i}}translate(e,t,n){let r="object"==typeof t?{...t}:t;if("object"!=typeof r&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof r&&(r={...r}),r||(r={}),null==e)return"";"function"==typeof e&&(e=Zn(e,{...this.options,...r})),Array.isArray(e)||(e=[String(e)]);const i=void 0!==r.returnDetails?r.returnDetails:this.options.returnDetails,o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,{key:a,namespaces:s}=this.extractFromKey(e[e.length-1],r),l=s[s.length-1];let c=void 0!==r.nsSeparator?r.nsSeparator:this.options.nsSeparator;void 0===c&&(c=":");const u=r.lng||this.language,h=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===u?.toLowerCase())return h?i?{res:`${l}${c}${a}`,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:`${l}${c}${a}`:i?{res:a,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:a;const d=this.resolve(e,r);let f=d?.res;const p=d?.usedKey||a,g=d?.exactUsedKey||a,m=void 0!==r.joinArrays?r.joinArrays:this.options.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject,b=void 0!==r.count&&!Tn(r.count),y=er.hasDefaultValue(r),w=b?this.pluralResolver.getSuffix(u,r.count,r):"",x=r.ordinal&&b?this.pluralResolver.getSuffix(u,r.count,{ordinal:!1}):"",C=b&&!r.ordinal&&0===r.count,_=C&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${w}`]||r[`defaultValue${x}`]||r.defaultValue;let S=f;v&&!f&&y&&(S=_);const A=Qn(S),k=Object.prototype.toString.apply(S);if(!(v&&S&&A&&["[object Number]","[object Function]","[object RegExp]"].indexOf(k)<0)||Tn(m)&&Array.isArray(S))if(v&&Tn(m)&&Array.isArray(f))f=f.join(m),f&&(f=this.extendTranslation(f,e,r,n));else{let t=!1,i=!1;!this.isValidLookup(f)&&y&&(t=!0,f=_),this.isValidLookup(f)||(i=!0,f=a);const s=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&i?void 0:f,h=y&&_!==f&&this.options.updateMissing;if(i||t||h){if(this.logger.log(h?"updateKey":"missingKey",u,l,a,h?_:f),o){const e=this.resolve(a,{...r,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[];const t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if("fallback"===this.options.saveMissingTo&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(r.lng||this.language):e.push(r.lng||this.language);const n=(e,t,n)=>{const i=y&&n!==f?n:s;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,i,h,r):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,i,h,r),this.emit("missingKey",e,l,t,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{const t=this.pluralResolver.getSuffixes(e,r);C&&r[`defaultValue${this.options.pluralSeparator}zero`]&&t.indexOf(`${this.options.pluralSeparator}zero`)<0&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],a+t,r[`defaultValue${t}`]||_)})}):n(e,a,_))}f=this.extendTranslation(f,e,r,d,n),i&&f===a&&this.options.appendNamespaceToMissingKey&&(f=`${l}${c}${a}`),(i||t)&&this.options.parseMissingKeyHandler&&(f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${c}${a}`:a,t?f:void 0,r))}else{if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,S,{...r,ns:s}):`key '${a} (${this.language})' returned an object instead of string.`;return i?(d.res=e,d.usedParams=this.getUsedParamsDetails(r),d):e}if(o){const e=Array.isArray(S),t=e?[]:{},n=e?g:p;for(const e in S)if(Object.prototype.hasOwnProperty.call(S,e)){const i=`${n}${o}${e}`;t[e]=y&&!f?this.translate(i,{...r,defaultValue:Qn(_)?_[e]:void 0,joinArrays:!1,ns:s}):this.translate(i,{...r,joinArrays:!1,ns:s}),t[e]===i&&(t[e]=S[e])}f=t}}return i?(d.res=f,d.usedParams=this.getUsedParamsDetails(r),d):f}extendTranslation(e,t,n,r,i){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const o=Tn(e)&&(void 0!==n?.interpolation?.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let a;if(o){const t=e.match(this.interpolator.nestingRegexp);a=t&&t.length}let s=n.replace&&!Tn(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),o){const t=e.match(this.interpolator.nestingRegexp);a<(t&&t.length)&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,(...e)=>i?.[0]!==e[0]||n.context?this.translate(...e,t):(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null),n)),n.interpolation&&this.interpolator.reset()}const o=n.postProcess||this.options.postProcess,a=Tn(o)?[o]:o;return null!=e&&a?.length&&!1!==n.applyPostProcessor&&(e=Kn.handle(a,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,i,o,a;return Tn(e)&&(e=[e]),e.forEach(e=>{if(this.isValidLookup(n))return;const s=this.extractFromKey(e,t),l=s.key;r=l;let c=s.namespaces;this.options.fallbackNS&&(c=c.concat(this.options.fallbackNS));const u=void 0!==t.count&&!Tn(t.count),h=u&&!t.ordinal&&0===t.count,d=void 0!==t.context&&(Tn(t.context)||"number"==typeof t.context)&&""!==t.context,f=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);c.forEach(e=>{this.isValidLookup(n)||(a=e,Jn[`${f[0]}-${e}`]||!this.utils?.hasLoadedNamespace||this.utils?.hasLoadedNamespace(a)||(Jn[`${f[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${f.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),f.forEach(r=>{if(this.isValidLookup(n))return;o=r;const a=[l];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(a,l,r,e,t);else{let e;u&&(e=this.pluralResolver.getSuffix(r,t.count,t));const n=`${this.options.pluralSeparator}zero`,i=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(t.ordinal&&0===e.indexOf(i)&&a.push(l+e.replace(i,this.options.pluralSeparator)),a.push(l+e),h&&a.push(l+n)),d){const r=`${l}${this.options.contextSeparator||"_"}${t.context}`;a.push(r),u&&(t.ordinal&&0===e.indexOf(i)&&a.push(r+e.replace(i,this.options.pluralSeparator)),a.push(r+e),h&&a.push(r+n))}}let s;for(;s=a.pop();)this.isValidLookup(n)||(i=s,n=this.getResource(r,e,s,t))}))})}),{res:n,usedKey:r,exactUsedKey:i,usedLng:o,usedNS:a}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!Tn(e.replace);let r=n?e.replace:e;if(n&&void 0!==e.count&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(const e of t)delete r[e]}return r}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,12)&&void 0!==e[n])return!0;return!1}}class tr{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=$n.create("languageUtils")}getScriptPartFromCode(e){if(!(e=Hn(e))||e.indexOf("-")<0)return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=Hn(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(Tn(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch(e){}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;const n=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(n)||(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;const n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;const r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>e===r?e:e.indexOf("-")<0&&r.indexOf("-")<0?void 0:e.indexOf("-")>0&&r.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===r||0===e.indexOf(r)&&r.length>1?e:void 0)}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),Tn(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes((!1===t?[]:t)||this.options.fallbackLng||[],e),r=[],i=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return Tn(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(e))):Tn(e)&&i(this.formatLanguageCode(e)),n.forEach(e=>{r.indexOf(e)<0&&i(this.formatLanguageCode(e))}),r}}const nr={zero:0,one:1,two:2,few:3,many:4,other:5},rr={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class ir{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=$n.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const n=Hn("dev"===e?"en":e),r=t.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let o;try{o=new Intl.PluralRules(n,{type:r})}catch(n){if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),rr;if(!e.match(/-|_/))return rr;const r=this.languageUtils.getLanguagePartFromCode(e);o=this.getRule(r,t)}return this.pluralRulesCache[i]=o,o}needsPlural(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?n.resolvedOptions().pluralCategories.sort((e,t)=>nr[e]-nr[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):[]}getSuffix(e,t,n={}){const r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,n))}}const or=(e,t,n,r=".",i=!0)=>{let o=((e,t,n)=>{const r=Dn(e,n);return void 0!==r?r:Dn(t,n)})(e,t,n);return!o&&i&&Tn(n)&&(o=Un(e,n,r),void 0===o&&(o=Un(t,n,r))),o},ar=e=>e.replace(/\$/g,"$$$$");class sr{constructor(e={}){this.logger=$n.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:o,suffix:a,suffixEscaped:s,formatSeparator:l,unescapeSuffix:c,unescapePrefix:u,nestingPrefix:h,nestingPrefixEscaped:d,nestingSuffix:f,nestingSuffixEscaped:p,nestingOptionsSeparator:g,maxReplaces:m,alwaysFormat:v}=e.interpolation;this.escape=void 0!==t?t:Nn,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==r&&r,this.prefix=i?Ln(i):o||"{{",this.suffix=a?Ln(a):s||"}}",this.formatSeparator=l||",",this.unescapePrefix=c?"":u||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=h?Ln(h):d||Ln("$t("),this.nestingSuffix=f?Ln(f):p||Ln(")"),this.nestingOptionsSeparator=g||",",this.maxReplaces=m||1e3,this.alwaysFormat=void 0!==v&&v,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let i,o,a;const s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=e=>{if(e.indexOf(this.formatSeparator)<0){const i=or(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...r,...t,interpolationkey:e}):i}const i=e.split(this.formatSeparator),o=i.shift().trim(),a=i.join(this.formatSeparator).trim();return this.format(or(t,s,o,this.options.keySeparator,this.options.ignoreJSONStructure),a,n,{...r,...t,interpolationkey:o})};this.resetRegExp();const c=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,u=void 0!==r?.interpolation?.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>ar(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?ar(this.escape(e)):ar(e)}].forEach(t=>{for(a=0;i=t.regex.exec(e);){const n=i[1].trim();if(o=l(n),void 0===o)if("function"==typeof c){const t=c(e,i,r);o=Tn(t)?t:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))o="";else{if(u){o=i[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),o=""}else Tn(o)||this.useRawValueToEscape||(o=On(o));const s=t.safeValue(o);if(e=e.replace(i[0],s),u?(t.regex.lastIndex+=o.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,i,o;const a=(e,t)=>{const n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;const r=e.split(new RegExp(`${n}[ ]*{`));let i=`{${r[1]}`;e=r[0],i=this.interpolate(i,o);const a=i.match(/'/g),s=i.match(/"/g);((a?.length??0)%2==0&&!s||s.length%2!=0)&&(i=i.replace(/'/g,'"'));try{o=JSON.parse(i),t&&(o={...t,...o})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];o={...n},o=o.replace&&!Tn(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;const l=/{.*}/.test(r[1])?r[1].lastIndexOf("}")+1:r[1].indexOf(this.formatSeparator);if(-1!==l&&(s=r[1].slice(l).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,l)),i=t(a.call(this,r[1].trim(),o),o),i&&r[0]===e&&!Tn(i))return i;Tn(i)||(i=On(i)),i||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),i=""),s.length&&(i=s.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),i.trim())),e=e.replace(r[0],i),this.regexp.lastIndex=0}return e}}const lr=e=>{const t={};return(n,r,i)=>{let o=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(o={...o,[i.interpolationkey]:void 0});const a=r+JSON.stringify(o);let s=t[a];return s||(s=e(Hn(r),i),t[a]=s),s(n)}},cr=e=>(t,n,r)=>e(Hn(n),r)(t);class ur{constructor(e={}){this.logger=$n.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const n=t.cacheInBuiltFormats?lr:cr;this.formats={number:n((e,t)=>{const n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{const n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)}),datetime:n((e,t)=>{const n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{const n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")}),list:n((e,t)=>{const n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=lr(t)}format(e,t,n,r={}){const i=t.split(this.formatSeparator);if(i.length>1&&i[0].indexOf("(")>1&&i[0].indexOf(")")<0&&i.find(e=>e.indexOf(")")>-1)){const e=i.findIndex(e=>e.indexOf(")")>-1);i[0]=[i[0],...i.splice(1,e)].join(this.formatSeparator)}const o=i.reduce((e,t)=>{const{formatName:i,formatOptions:o}=(e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const i=r[1].substring(0,r[1].length-1);"currency"===t&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):"relativetime"===t&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach(e=>{if(e){const[t,...r]=e.split(":"),i=r.join(":").trim().replace(/^'+|'+$/g,""),o=t.trim();n[o]||(n[o]=i),"false"===i&&(n[o]=!1),"true"===i&&(n[o]=!0),isNaN(i)||(n[o]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}})(t);if(this.formats[i]){let t=e;try{const a=r?.formatParams?.[r.interpolationkey]||{},s=a.locale||a.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...o,...r,...a})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${i}`),e},e);return o}}class hr extends Gn{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=$n.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){const i={},o={},a={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{const a=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[a]=2:this.state[a]<0||(1===this.state[a]?void 0===o[a]&&(o[a]=!0):(this.state[a]=1,r=!1,void 0===o[a]&&(o[a]=!0),void 0===i[a]&&(i[a]=!0),void 0===s[t]&&(s[t]=!0)))}),r||(a[e]=!0)}),(Object.keys(i).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(o),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){const r=e.split("|"),i=r[0],o=r[1];t&&this.emit("failedLoading",i,o,t),!t&&n&&this.store.addResourceBundle(i,o,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const a={};this.queue.forEach(n=>{((e,t,n)=>{const{obj:r,k:i}=Fn(e,t,Object);r[i]=r[i]||[],r[i].push(n)})(n.loaded,[i],o),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach(e=>{a[e]||(a[e]={});const t=n.loaded[e];t.length&&t.forEach(t=>{void 0===a[e][t]&&(a[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,i=this.retryTimeout,o){if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:o});this.readingCalls++;const a=(a,s)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}a&&s&&r<this.maxRetries?setTimeout(()=>{this.read.call(this,e,t,n,r+1,2*i,o)},i):o(a,s)},s=this.backend[n].bind(this.backend);if(2!==s.length)return s(e,t,a);try{const n=s(e,t);n&&"function"==typeof n.then?n.then(e=>a(null,e)).catch(a):a(null,n)}catch(e){a(e)}}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();Tn(e)&&(e=this.languageUtils.toResolveHierarchy(e)),Tn(t)&&(t=[t]);const i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=""){const n=e.split("|"),r=n[0],i=n[1];this.read(r,i,"read",void 0,void 0,(n,o)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&o&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,o),this.loaded(e,n,o)})}saveMissing(e,t,n,r,i,o={},a=()=>{}){if(!this.services?.utils?.hasLoadedNamespace||this.services?.utils?.hasLoadedNamespace(t)){if(null!=n&&""!==n){if(this.backend?.create){const s={...o,isUpdate:i},l=this.backend.create.bind(this.backend);if(l.length<6)try{let i;i=5===l.length?l(e,t,n,r,s):l(e,t,n,r),i&&"function"==typeof i.then?i.then(e=>a(null,e)).catch(a):a(null,i)}catch(e){a(e)}else l(e,t,n,r,a,s)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}else this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")}}const dr=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),Tn(e[1])&&(t.defaultValue=e[1]),Tn(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),fr=e=>(Tn(e.ns)&&(e.ns=[e.ns]),Tn(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Tn(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),"boolean"==typeof e.initImmediate&&(e.initAsync=e.initImmediate),e),pr=()=>{};class gr extends Gn{constructor(e={},t){var n;if(super(),this.options=fr(e),this.services={},this.logger=$n,this.modules={external:[]},n=this,Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(e=>{"function"==typeof n[e]&&(n[e]=n[e].bind(n))}),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,"function"==typeof e&&(t=e,e={}),null==e.defaultNS&&e.ns&&(Tn(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const n=dr();this.options={...n,...this.options,...fr(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},void 0!==e.keySeparator&&(this.options.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(this.options.userDefinedNsSeparator=e.nsSeparator);const r=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let e;this.modules.logger?$n.init(r(this.modules.logger),this.options):$n.init(null,this.options),e=this.modules.formatter?this.modules.formatter:ur;const t=new tr(this.options);this.store=new Xn(this.options.resources,this.options);const i=this.services;i.logger=$n,i.resourceStore=this.store,i.languageUtils=t,i.pluralResolver=new ir(t,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix});this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),!e||this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format||(i.formatter=r(e),i.formatter.init&&i.formatter.init(i,this.options),this.options.interpolation.format=i.formatter.format.bind(i.formatter)),i.interpolator=new sr(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new hr(r(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(i.languageDetector=r(this.modules.languageDetector),i.languageDetector.init&&i.languageDetector.init(i,this.options.detection,this.options)),this.modules.i18nFormat&&(i.i18nFormat=r(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new er(this.services,this.options),this.translator.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||(t=pr),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(e=>{this[e]=(...t)=>this.store[e](...t)});["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});const i=In(),o=()=>{const e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),i.resolve(n),t(e,n)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?o():setTimeout(o,0),i}loadResources(e,t=pr){let n=t;const r=Tn(e)?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if("cimode"===r?.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return n();const e=[],t=t=>{if(!t)return;if("cimode"===t)return;this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)})};if(r)t(r);else{this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e))}this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){const r=In();return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=pr),this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&Kn.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1)){for(let e=0;e<this.languages.length;e++){const t=this.languages[e];if(!(["cimode","dev"].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;const n=In();this.emit("languageChanging",e);const r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(i,o)=>{o?this.isLanguageChangingTo===e&&(r(o),this.translator.changeLanguage(o),this.isLanguageChangingTo=void 0,this.emit("languageChanged",o),this.logger.log("languageChanged",o)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(i,(...e)=>this.t(...e))},o=t=>{e||t||!this.services.languageDetector||(t=[]);const n=Tn(t)?t:t&&t[0],o=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(Tn(t)?[t]:t);o&&(this.language||r(o),this.translator.language||this.translator.changeLanguage(o),this.services.languageDetector?.cacheUserLanguage?.(o)),this.loadResources(o,e=>{i(e,o)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(e):o(this.services.languageDetector.detect()),n}getFixedT(e,t,n){const r=(e,t,...i)=>{let o;o="object"!=typeof t?this.options.overloadTranslationOptionHandler([e,t].concat(i)):{...t},o.lng=o.lng||r.lng,o.lngs=o.lngs||r.lngs,o.ns=o.ns||r.ns,""!==o.keyPrefix&&(o.keyPrefix=o.keyPrefix||n||r.keyPrefix);const a=this.options.keySeparator||".";let s;return o.keyPrefix&&Array.isArray(e)?s=e.map(e=>("function"==typeof e&&(e=Zn(e,{...this.options,...t})),`${o.keyPrefix}${a}${e}`)):("function"==typeof e&&(e=Zn(e,{...this.options,...t})),s=o.keyPrefix?`${o.keyPrefix}${a}${e}`:e),this.t(s,o)};return Tn(e)?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=n,r}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;const o=(e,t)=>{const n=this.services.backendConnector.state[`${e}|${t}`];return-1===n||0===n||2===n};if(t.precheck){const e=t.precheck(this,o);if(void 0!==e)return e}return!!this.hasResourceBundle(n,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!o(n,e)||r&&!o(i,e)))}loadNamespaces(e,t){const n=In();return this.options.ns?(Tn(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=In();Tn(e)&&(e=[e]);const r=this.options.preload||[],i=e.filter(e=>r.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return i.length?(this.options.preload=r.concat(i),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";try{const t=new Intl.Locale(e);if(t&&t.getTextInfo){const e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch(e){}const t=this.services?.languageUtils||new tr(dr());return e.toLowerCase().indexOf("-latn")>1?"ltr":["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){return new gr(e,t)}cloneInstance(e={},t=pr){const n=e.forkResourceStore;n&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},i=new gr(r);void 0===e.debug&&void 0===e.prefix||(i.logger=i.logger.clone(e));if(["store","services","language"].forEach(e=>{i[e]=this[e]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},n){const e=Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{});i.store=new Xn(e,r),i.services.resourceStore=i.store}return i.translator=new er(i.services,r),i.translator.on("*",(e,...t)=>{i.emit(e,...t)}),i.init(r,t),i.translator.options=r,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const mr=gr.createInstance();mr.createInstance=gr.createInstance,mr.createInstance,mr.dir,mr.init,mr.loadResources,mr.reloadResources,mr.use,mr.changeLanguage,mr.getFixedT,mr.t,mr.exists,mr.setDefaultNamespace,mr.hasLoadedNamespace,mr.loadNamespaces,mr.loadLanguages;var vr,br,yr,wr,xr,Cr={};function _r(){if(br)return vr;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,n(i.key),i)}}function n(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function r(e,t){return function(e,t){if(t.get)return t.get.call(e);return t.value}(e,o(e,t,"get"))}function i(e,t,n){return function(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}(e,o(e,t,"set"),n),n}function o(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function a(e,t,n){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,n)}br=1;var s=function(t){if(!t)return[];Array.isArray(t)||(t=[t]);for(var n={},r=0;r<t.length;++r){var i,o=t[r];if(o&&"object"===e(o)&&(o=String(o)),"string"!=typeof o){var a="Locales should be strings, ".concat(JSON.stringify(o)," isn't.");throw new TypeError(a)}var s=o.split("-");if(!s.every(function(e){return/[a-z0-9]+/i.test(e)})){var l=JSON.stringify(o),c="The locale ".concat(l," is not a structurally valid BCP 47 language tag.");throw new RangeError(c)}var u=s[0].toLowerCase();s[0]=null!==(i={in:"id",iw:"he",ji:"yi"}[u])&&void 0!==i?i:u,n[s.join("-")]=!0}return Object.keys(n)};function l(t){switch(e(t)){case"number":return t;case"bigint":throw new TypeError("Cannot convert a BigInt value to a number");default:return Number(t)}}return vr=function(e,n,o,c){var u=function(e){do{if(n(e))return e;e=e.replace(/-?[^-]*$/,"")}while(e);return null},h=new WeakMap,d=new WeakMap,f=new WeakMap,p=new WeakMap,g=new WeakMap,m=function(){function m(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,m),a(this,h,{writable:!0,value:void 0}),a(this,d,{writable:!0,value:void 0}),a(this,f,{writable:!0,value:void 0}),a(this,p,{writable:!0,value:void 0}),a(this,g,{writable:!0,value:void 0}),i(this,h,function(t){for(var n=s(t),r=0;r<n.length;++r){var i=u(n[r]);if(i)return i}var o=(new e).resolvedOptions().locale;return u(o)}(t)),i(this,f,n(r(this,h))),i(this,d,c(r(this,h))),i(this,p,function(e){var t=Object.prototype.hasOwnProperty.call(e,"type")&&e.type;if(!t)return"cardinal";if("cardinal"===t||"ordinal"===t)return t;throw new RangeError("Not a valid plural type: "+JSON.stringify(t))}(o)),i(this,g,new e("en",o))}var v,b,y;return v=m,y=[{key:"supportedLocalesOf",value:function(e){return s(e).filter(u)}}],(b=[{key:"resolvedOptions",value:function(){var e=r(this,g).resolvedOptions(),t=e.minimumIntegerDigits,n=e.minimumFractionDigits,i=e.maximumFractionDigits,a=e.minimumSignificantDigits,s=e.maximumSignificantDigits,l=e.roundingPriority,c={locale:r(this,h),type:r(this,p),minimumIntegerDigits:t,minimumFractionDigits:n,maximumFractionDigits:i};return"number"==typeof a&&(c.minimumSignificantDigits=a,c.maximumSignificantDigits=s),c.pluralCategories=o(r(this,h),"ordinal"===r(this,p)).slice(0),c.roundingPriority=l||"auto",c}},{key:"select",value:function(e){if(!(this instanceof m))throw new TypeError("select() called on incompatible ".concat(this));if("number"!=typeof e&&(e=Number(e)),!isFinite(e))return"other";var t=r(this,g).format(Math.abs(e));return r(this,f).call(this,t,"ordinal"===r(this,p))}},{key:"selectRange",value:function(e,t){if(!(this instanceof m))throw new TypeError("selectRange() called on incompatible ".concat(this));if(void 0===e)throw new TypeError("start is undefined");if(void 0===t)throw new TypeError("end is undefined");var n=l(e),i=l(t);if(!isFinite(n))throw new RangeError("start must be finite");if(!isFinite(i))throw new RangeError("end must be finite");return r(this,d).call(this,this.select(n),this.select(i))}}])&&t(v.prototype,b),y&&t(v,y),Object.defineProperty(v,"prototype",{writable:!1}),m}();return"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(m.prototype,Symbol.toStringTag,{value:"Intl.PluralRules",writable:!1,configurable:!0}),Object.defineProperty(m,"prototype",{writable:!1}),m},vr}!function(){if(xr)return Cr;xr=1;var e=function(){if(wr)return yr;function e(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function t(e,t){return t.forEach(function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach(function(n){if("default"!==n&&!(n in e)){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}})}),Object.freeze(e)}wr=1;var n=e(_r());function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==cn||"undefined"!=typeof self&&self;var i={exports:{}};!function(e){var t=function(e,t){return t?"other":1==e?"one":"other"},n=function(e,t){return t?"other":0==e||1==e?"one":"other"},r=function(e,t){return t?"other":e>=0&&e<=1?"one":"other"},i=function(e,t){var n=!String(e).split(".")[1];return t?"other":1==e&&n?"one":"other"},o=function(e,t){return"other"},a=function(e,t){return t?"other":1==e?"one":2==e?"two":"other"};!function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),e.exports=n}(0,{af:t,ak:n,am:r,an:t,ar:function(e,t){var n=String(e).split("."),r=Number(n[0])==e&&n[0].slice(-2);return t?"other":0==e?"zero":1==e?"one":2==e?"two":r>=3&&r<=10?"few":r>=11&&r<=99?"many":"other"},ars:function(e,t){var n=String(e).split("."),r=Number(n[0])==e&&n[0].slice(-2);return t?"other":0==e?"zero":1==e?"one":2==e?"two":r>=3&&r<=10?"few":r>=11&&r<=99?"many":"other"},as:function(e,t){return t?1==e||5==e||7==e||8==e||9==e||10==e?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":e>=0&&e<=1?"one":"other"},asa:t,ast:i,az:function(e,t){var n=String(e).split(".")[0],r=n.slice(-1),i=n.slice(-2),o=n.slice(-3);return t?1==r||2==r||5==r||7==r||8==r||20==i||50==i||70==i||80==i?"one":3==r||4==r||100==o||200==o||300==o||400==o||500==o||600==o||700==o||800==o||900==o?"few":0==n||6==r||40==i||60==i||90==i?"many":"other":1==e?"one":"other"},bal:function(e,t){return 1==e?"one":"other"},be:function(e,t){var n=String(e).split("."),r=Number(n[0])==e,i=r&&n[0].slice(-1),o=r&&n[0].slice(-2);return t?2!=i&&3!=i||12==o||13==o?"other":"few":1==i&&11!=o?"one":i>=2&&i<=4&&(o<12||o>14)?"few":r&&0==i||i>=5&&i<=9||o>=11&&o<=14?"many":"other"},bem:t,bez:t,bg:t,bho:n,bm:o,bn:function(e,t){return t?1==e||5==e||7==e||8==e||9==e||10==e?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":e>=0&&e<=1?"one":"other"},bo:o,br:function(e,t){var n=String(e).split("."),r=Number(n[0])==e,i=r&&n[0].slice(-1),o=r&&n[0].slice(-2),a=r&&n[0].slice(-6);return t?"other":1==i&&11!=o&&71!=o&&91!=o?"one":2==i&&12!=o&&72!=o&&92!=o?"two":(3==i||4==i||9==i)&&(o<10||o>19)&&(o<70||o>79)&&(o<90||o>99)?"few":0!=e&&r&&0==a?"many":"other"},brx:t,bs:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-1),s=r.slice(-2),l=i.slice(-1),c=i.slice(-2);return t?"other":o&&1==a&&11!=s||1==l&&11!=c?"one":o&&a>=2&&a<=4&&(s<12||s>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"},ca:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-6);return t?1==e||3==e?"one":2==e?"two":4==e?"few":"other":1==e&&i?"one":0!=r&&0==o&&i?"many":"other"},ce:t,ceb:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-1),s=i.slice(-1);return t?"other":o&&(1==r||2==r||3==r)||o&&4!=a&&6!=a&&9!=a||!o&&4!=s&&6!=s&&9!=s?"one":"other"},cgg:t,chr:t,ckb:t,cs:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1];return t?"other":1==e&&i?"one":r>=2&&r<=4&&i?"few":i?"other":"many"},cy:function(e,t){return t?0==e||7==e||8==e||9==e?"zero":1==e?"one":2==e?"two":3==e||4==e?"few":5==e||6==e?"many":"other":0==e?"zero":1==e?"one":2==e?"two":3==e?"few":6==e?"many":"other"},da:function(e,t){var n=String(e).split("."),r=n[0],i=Number(n[0])==e;return t||1!=e&&(i||0!=r&&1!=r)?"other":"one"},de:i,doi:r,dsb:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-2),s=i.slice(-2);return t?"other":o&&1==a||1==s?"one":o&&2==a||2==s?"two":o&&(3==a||4==a)||3==s||4==s?"few":"other"},dv:t,dz:o,ee:t,el:t,en:function(e,t){var n=String(e).split("."),r=!n[1],i=Number(n[0])==e,o=i&&n[0].slice(-1),a=i&&n[0].slice(-2);return t?1==o&&11!=a?"one":2==o&&12!=a?"two":3==o&&13!=a?"few":"other":1==e&&r?"one":"other"},eo:t,es:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-6);return t?"other":1==e?"one":0!=r&&0==o&&i?"many":"other"},et:i,eu:t,fa:r,ff:function(e,t){return t?"other":e>=0&&e<2?"one":"other"},fi:i,fil:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-1),s=i.slice(-1);return t?1==e?"one":"other":o&&(1==r||2==r||3==r)||o&&4!=a&&6!=a&&9!=a||!o&&4!=s&&6!=s&&9!=s?"one":"other"},fo:t,fr:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-6);return t?1==e?"one":"other":e>=0&&e<2?"one":0!=r&&0==o&&i?"many":"other"},fur:t,fy:i,ga:function(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?1==e?"one":"other":1==e?"one":2==e?"two":r&&e>=3&&e<=6?"few":r&&e>=7&&e<=10?"many":"other"},gd:function(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?1==e||11==e?"one":2==e||12==e?"two":3==e||13==e?"few":"other":1==e||11==e?"one":2==e||12==e?"two":r&&e>=3&&e<=10||r&&e>=13&&e<=19?"few":"other"},gl:i,gsw:t,gu:function(e,t){return t?1==e?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":e>=0&&e<=1?"one":"other"},guw:n,gv:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-1),a=r.slice(-2);return t?"other":i&&1==o?"one":i&&2==o?"two":!i||0!=a&&20!=a&&40!=a&&60!=a&&80!=a?i?"other":"many":"few"},ha:t,haw:t,he:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1];return t?"other":1==r&&i||0==r&&!i?"one":2==r&&i?"two":"other"},hi:function(e,t){return t?1==e?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":e>=0&&e<=1?"one":"other"},hnj:o,hr:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-1),s=r.slice(-2),l=i.slice(-1),c=i.slice(-2);return t?"other":o&&1==a&&11!=s||1==l&&11!=c?"one":o&&a>=2&&a<=4&&(s<12||s>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"},hsb:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-2),s=i.slice(-2);return t?"other":o&&1==a||1==s?"one":o&&2==a||2==s?"two":o&&(3==a||4==a)||3==s||4==s?"few":"other"},hu:function(e,t){return t?1==e||5==e?"one":"other":1==e?"one":"other"},hy:function(e,t){return t?1==e?"one":"other":e>=0&&e<2?"one":"other"},ia:i,id:o,ig:o,ii:o,io:i,is:function(e,t){var n=String(e).split("."),r=n[0],i=(n[1]||"").replace(/0+$/,""),o=Number(n[0])==e,a=r.slice(-1),s=r.slice(-2);return t?"other":o&&1==a&&11!=s||i%10==1&&i%100!=11?"one":"other"},it:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-6);return t?11==e||8==e||80==e||800==e?"many":"other":1==e&&i?"one":0!=r&&0==o&&i?"many":"other"},iu:a,ja:o,jbo:o,jgo:t,jmc:t,jv:o,jw:o,ka:function(e,t){var n=String(e).split(".")[0],r=n.slice(-2);return t?1==n?"one":0==n||r>=2&&r<=20||40==r||60==r||80==r?"many":"other":1==e?"one":"other"},kab:function(e,t){return t?"other":e>=0&&e<2?"one":"other"},kaj:t,kcg:t,kde:o,kea:o,kk:function(e,t){var n=String(e).split("."),r=Number(n[0])==e,i=r&&n[0].slice(-1);return t?6==i||9==i||r&&0==i&&0!=e?"many":"other":1==e?"one":"other"},kkj:t,kl:t,km:o,kn:r,ko:o,ks:t,ksb:t,ksh:function(e,t){return t?"other":0==e?"zero":1==e?"one":"other"},ku:t,kw:function(e,t){var n=String(e).split("."),r=Number(n[0])==e,i=r&&n[0].slice(-2),o=r&&n[0].slice(-3),a=r&&n[0].slice(-5),s=r&&n[0].slice(-6);return t?r&&e>=1&&e<=4||i>=1&&i<=4||i>=21&&i<=24||i>=41&&i<=44||i>=61&&i<=64||i>=81&&i<=84?"one":5==e||5==i?"many":"other":0==e?"zero":1==e?"one":2==i||22==i||42==i||62==i||82==i||r&&0==o&&(a>=1e3&&a<=2e4||4e4==a||6e4==a||8e4==a)||0!=e&&1e5==s?"two":3==i||23==i||43==i||63==i||83==i?"few":1==e||1!=i&&21!=i&&41!=i&&61!=i&&81!=i?"other":"many"},ky:t,lag:function(e,t){var n=String(e).split(".")[0];return t?"other":0==e?"zero":0!=n&&1!=n||0==e?"other":"one"},lb:t,lg:t,lij:function(e,t){var n=String(e).split("."),r=!n[1],i=Number(n[0])==e;return t?11==e||8==e||i&&e>=80&&e<=89||i&&e>=800&&e<=899?"many":"other":1==e&&r?"one":"other"},lkt:o,ln:n,lo:function(e,t){return t&&1==e?"one":"other"},lt:function(e,t){var n=String(e).split("."),r=n[1]||"",i=Number(n[0])==e,o=i&&n[0].slice(-1),a=i&&n[0].slice(-2);return t?"other":1==o&&(a<11||a>19)?"one":o>=2&&o<=9&&(a<11||a>19)?"few":0!=r?"many":"other"},lv:function(e,t){var n=String(e).split("."),r=n[1]||"",i=r.length,o=Number(n[0])==e,a=o&&n[0].slice(-1),s=o&&n[0].slice(-2),l=r.slice(-2),c=r.slice(-1);return t?"other":o&&0==a||s>=11&&s<=19||2==i&&l>=11&&l<=19?"zero":1==a&&11!=s||2==i&&1==c&&11!=l||2!=i&&1==c?"one":"other"},mas:t,mg:n,mgo:t,mk:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-1),s=r.slice(-2),l=i.slice(-1),c=i.slice(-2);return t?1==a&&11!=s?"one":2==a&&12!=s?"two":7!=a&&8!=a||17==s||18==s?"other":"many":o&&1==a&&11!=s||1==l&&11!=c?"one":"other"},ml:t,mn:t,mo:function(e,t){var n=String(e).split("."),r=!n[1],i=Number(n[0])==e&&n[0].slice(-2);return t?1==e?"one":"other":1==e&&r?"one":!r||0==e||1!=e&&i>=1&&i<=19?"few":"other"},mr:function(e,t){return t?1==e?"one":2==e||3==e?"two":4==e?"few":"other":1==e?"one":"other"},ms:function(e,t){return t&&1==e?"one":"other"},mt:function(e,t){var n=String(e).split("."),r=Number(n[0])==e&&n[0].slice(-2);return t?"other":1==e?"one":2==e?"two":0==e||r>=3&&r<=10?"few":r>=11&&r<=19?"many":"other"},my:o,nah:t,naq:a,nb:t,nd:t,ne:function(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?r&&e>=1&&e<=4?"one":"other":1==e?"one":"other"},nl:i,nn:t,nnh:t,no:t,nqo:o,nr:t,nso:n,ny:t,nyn:t,om:t,or:function(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?1==e||5==e||r&&e>=7&&e<=9?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":1==e?"one":"other"},os:t,osa:o,pa:n,pap:t,pcm:r,pl:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-1),a=r.slice(-2);return t?"other":1==e&&i?"one":i&&o>=2&&o<=4&&(a<12||a>14)?"few":i&&1!=r&&(0==o||1==o)||i&&o>=5&&o<=9||i&&a>=12&&a<=14?"many":"other"},prg:function(e,t){var n=String(e).split("."),r=n[1]||"",i=r.length,o=Number(n[0])==e,a=o&&n[0].slice(-1),s=o&&n[0].slice(-2),l=r.slice(-2),c=r.slice(-1);return t?"other":o&&0==a||s>=11&&s<=19||2==i&&l>=11&&l<=19?"zero":1==a&&11!=s||2==i&&1==c&&11!=l||2!=i&&1==c?"one":"other"},ps:t,pt:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-6);return t?"other":0==r||1==r?"one":0!=r&&0==o&&i?"many":"other"},pt_PT:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-6);return t?"other":1==e&&i?"one":0!=r&&0==o&&i?"many":"other"},rm:t,ro:function(e,t){var n=String(e).split("."),r=!n[1],i=Number(n[0])==e&&n[0].slice(-2);return t?1==e?"one":"other":1==e&&r?"one":!r||0==e||1!=e&&i>=1&&i<=19?"few":"other"},rof:t,ru:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-1),a=r.slice(-2);return t?"other":i&&1==o&&11!=a?"one":i&&o>=2&&o<=4&&(a<12||a>14)?"few":i&&0==o||i&&o>=5&&o<=9||i&&a>=11&&a<=14?"many":"other"},rwk:t,sah:o,saq:t,sat:a,sc:function(e,t){var n=!String(e).split(".")[1];return t?11==e||8==e||80==e||800==e?"many":"other":1==e&&n?"one":"other"},scn:function(e,t){var n=!String(e).split(".")[1];return t?11==e||8==e||80==e||800==e?"many":"other":1==e&&n?"one":"other"},sd:t,sdh:t,se:a,seh:t,ses:o,sg:o,sh:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-1),s=r.slice(-2),l=i.slice(-1),c=i.slice(-2);return t?"other":o&&1==a&&11!=s||1==l&&11!=c?"one":o&&a>=2&&a<=4&&(s<12||s>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"},shi:function(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?"other":e>=0&&e<=1?"one":r&&e>=2&&e<=10?"few":"other"},si:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"";return t?"other":0==e||1==e||0==r&&1==i?"one":"other"},sk:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1];return t?"other":1==e&&i?"one":r>=2&&r<=4&&i?"few":i?"other":"many"},sl:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-2);return t?"other":i&&1==o?"one":i&&2==o?"two":i&&(3==o||4==o)||!i?"few":"other"},sma:a,smi:a,smj:a,smn:a,sms:a,sn:t,so:t,sq:function(e,t){var n=String(e).split("."),r=Number(n[0])==e,i=r&&n[0].slice(-1),o=r&&n[0].slice(-2);return t?1==e?"one":4==i&&14!=o?"many":"other":1==e?"one":"other"},sr:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-1),s=r.slice(-2),l=i.slice(-1),c=i.slice(-2);return t?"other":o&&1==a&&11!=s||1==l&&11!=c?"one":o&&a>=2&&a<=4&&(s<12||s>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"},ss:t,ssy:t,st:t,su:o,sv:function(e,t){var n=String(e).split("."),r=!n[1],i=Number(n[0])==e,o=i&&n[0].slice(-1),a=i&&n[0].slice(-2);return t?1!=o&&2!=o||11==a||12==a?"other":"one":1==e&&r?"one":"other"},sw:i,syr:t,ta:t,te:t,teo:t,th:o,ti:n,tig:t,tk:function(e,t){var n=String(e).split("."),r=Number(n[0])==e&&n[0].slice(-1);return t?6==r||9==r||10==e?"few":"other":1==e?"one":"other"},tl:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-1),s=i.slice(-1);return t?1==e?"one":"other":o&&(1==r||2==r||3==r)||o&&4!=a&&6!=a&&9!=a||!o&&4!=s&&6!=s&&9!=s?"one":"other"},tn:t,to:o,tpi:o,tr:t,ts:t,tzm:function(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?"other":0==e||1==e||r&&e>=11&&e<=99?"one":"other"},ug:t,uk:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=Number(n[0])==e,a=o&&n[0].slice(-1),s=o&&n[0].slice(-2),l=r.slice(-1),c=r.slice(-2);return t?3==a&&13!=s?"few":"other":i&&1==l&&11!=c?"one":i&&l>=2&&l<=4&&(c<12||c>14)?"few":i&&0==l||i&&l>=5&&l<=9||i&&c>=11&&c<=14?"many":"other"},und:o,ur:i,uz:t,ve:t,vec:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-6);return t?11==e||8==e||80==e||800==e?"many":"other":1==e&&i?"one":0!=r&&0==o&&i?"many":"other"},vi:function(e,t){return t&&1==e?"one":"other"},vo:t,vun:t,wa:n,wae:t,wo:o,xh:t,xog:t,yi:i,yo:o,yue:o,zh:o,zu:r})}(i);var o=r(i.exports),a=t({__proto__:null,default:o},[i.exports]),s={exports:{}};!function(e){var t="zero",n="one",r="two",i="few",o="many",a="other",s={cardinal:[n,a],ordinal:[a]},l={cardinal:[n,a],ordinal:[n,a]},c={cardinal:[a],ordinal:[a]},u={cardinal:[n,r,a],ordinal:[a]};!function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),e.exports=n}(0,{af:s,ak:s,am:s,an:s,ar:{cardinal:[t,n,r,i,o,a],ordinal:[a]},ars:{cardinal:[t,n,r,i,o,a],ordinal:[a]},as:{cardinal:[n,a],ordinal:[n,r,i,o,a]},asa:s,ast:s,az:{cardinal:[n,a],ordinal:[n,i,o,a]},bal:l,be:{cardinal:[n,i,o,a],ordinal:[i,a]},bem:s,bez:s,bg:s,bho:s,bm:c,bn:{cardinal:[n,a],ordinal:[n,r,i,o,a]},bo:c,br:{cardinal:[n,r,i,o,a],ordinal:[a]},brx:s,bs:{cardinal:[n,i,a],ordinal:[a]},ca:{cardinal:[n,o,a],ordinal:[n,r,i,a]},ce:s,ceb:s,cgg:s,chr:s,ckb:s,cs:{cardinal:[n,i,o,a],ordinal:[a]},cy:{cardinal:[t,n,r,i,o,a],ordinal:[t,n,r,i,o,a]},da:s,de:s,doi:s,dsb:{cardinal:[n,r,i,a],ordinal:[a]},dv:s,dz:c,ee:s,el:s,en:{cardinal:[n,a],ordinal:[n,r,i,a]},eo:s,es:{cardinal:[n,o,a],ordinal:[a]},et:s,eu:s,fa:s,ff:s,fi:s,fil:l,fo:s,fr:{cardinal:[n,o,a],ordinal:[n,a]},fur:s,fy:s,ga:{cardinal:[n,r,i,o,a],ordinal:[n,a]},gd:{cardinal:[n,r,i,a],ordinal:[n,r,i,a]},gl:s,gsw:s,gu:{cardinal:[n,a],ordinal:[n,r,i,o,a]},guw:s,gv:{cardinal:[n,r,i,o,a],ordinal:[a]},ha:s,haw:s,he:u,hi:{cardinal:[n,a],ordinal:[n,r,i,o,a]},hnj:c,hr:{cardinal:[n,i,a],ordinal:[a]},hsb:{cardinal:[n,r,i,a],ordinal:[a]},hu:l,hy:l,ia:s,id:c,ig:c,ii:c,io:s,is:s,it:{cardinal:[n,o,a],ordinal:[o,a]},iu:u,ja:c,jbo:c,jgo:s,jmc:s,jv:c,jw:c,ka:{cardinal:[n,a],ordinal:[n,o,a]},kab:s,kaj:s,kcg:s,kde:c,kea:c,kk:{cardinal:[n,a],ordinal:[o,a]},kkj:s,kl:s,km:c,kn:s,ko:c,ks:s,ksb:s,ksh:{cardinal:[t,n,a],ordinal:[a]},ku:s,kw:{cardinal:[t,n,r,i,o,a],ordinal:[n,o,a]},ky:s,lag:{cardinal:[t,n,a],ordinal:[a]},lb:s,lg:s,lij:{cardinal:[n,a],ordinal:[o,a]},lkt:c,ln:s,lo:{cardinal:[a],ordinal:[n,a]},lt:{cardinal:[n,i,o,a],ordinal:[a]},lv:{cardinal:[t,n,a],ordinal:[a]},mas:s,mg:s,mgo:s,mk:{cardinal:[n,a],ordinal:[n,r,o,a]},ml:s,mn:s,mo:{cardinal:[n,i,a],ordinal:[n,a]},mr:{cardinal:[n,a],ordinal:[n,r,i,a]},ms:{cardinal:[a],ordinal:[n,a]},mt:{cardinal:[n,r,i,o,a],ordinal:[a]},my:c,nah:s,naq:u,nb:s,nd:s,ne:l,nl:s,nn:s,nnh:s,no:s,nqo:c,nr:s,nso:s,ny:s,nyn:s,om:s,or:{cardinal:[n,a],ordinal:[n,r,i,o,a]},os:s,osa:c,pa:s,pap:s,pcm:s,pl:{cardinal:[n,i,o,a],ordinal:[a]},prg:{cardinal:[t,n,a],ordinal:[a]},ps:s,pt:{cardinal:[n,o,a],ordinal:[a]},pt_PT:{cardinal:[n,o,a],ordinal:[a]},rm:s,ro:{cardinal:[n,i,a],ordinal:[n,a]},rof:s,ru:{cardinal:[n,i,o,a],ordinal:[a]},rwk:s,sah:c,saq:s,sat:u,sc:{cardinal:[n,a],ordinal:[o,a]},scn:{cardinal:[n,a],ordinal:[o,a]},sd:s,sdh:s,se:u,seh:s,ses:c,sg:c,sh:{cardinal:[n,i,a],ordinal:[a]},shi:{cardinal:[n,i,a],ordinal:[a]},si:s,sk:{cardinal:[n,i,o,a],ordinal:[a]},sl:{cardinal:[n,r,i,a],ordinal:[a]},sma:u,smi:u,smj:u,smn:u,sms:u,sn:s,so:s,sq:{cardinal:[n,a],ordinal:[n,o,a]},sr:{cardinal:[n,i,a],ordinal:[a]},ss:s,ssy:s,st:s,su:c,sv:l,sw:s,syr:s,ta:s,te:s,teo:s,th:c,ti:s,tig:s,tk:{cardinal:[n,a],ordinal:[i,a]},tl:l,tn:s,to:c,tpi:c,tr:s,ts:s,tzm:s,ug:s,uk:{cardinal:[n,i,o,a],ordinal:[i,a]},und:c,ur:s,uz:s,ve:s,vec:{cardinal:[n,o,a],ordinal:[o,a]},vi:{cardinal:[a],ordinal:[n,a]},vo:s,vun:s,wa:s,wae:s,wo:c,xh:s,xog:s,yi:s,yo:c,yue:c,zh:c,zu:s})}(s);var l=r(s.exports),c=t({__proto__:null,default:l},[s.exports]),u={exports:{}};!function(e){var t,n=function(e,t){return"other"},r=function(e,t){return"other"===e&&"one"===t?"one":"other"},i=function(e,t){return t||"other"};t={af:n,ak:r,am:i,an:n,ar:function(e,t){return"few"===t?"few":"many"===t?"many":"zero"===e&&"one"===t||"zero"===e&&"two"===t?"zero":"other"},as:i,az:i,be:i,bg:n,bn:i,bs:i,ca:n,cs:i,cy:i,da:i,de:i,el:i,en:n,es:n,et:n,eu:n,fa:r,fi:n,fil:i,fr:i,ga:i,gl:i,gsw:i,gu:i,he:n,hi:i,hr:i,hu:i,hy:i,ia:n,id:n,io:n,is:i,it:i,ja:n,ka:function(e,t){return e||"other"},kk:i,km:n,kn:i,ko:n,ky:i,lij:i,lo:n,lt:i,lv:function(e,t){return"one"===t?"one":"other"},mk:n,ml:i,mn:i,mr:i,ms:n,my:n,nb:n,ne:i,nl:i,no:n,or:r,pa:i,pcm:n,pl:i,ps:i,pt:i,ro:function(e,t){return"few"===t||"one"===t?"few":"other"},ru:i,sc:i,scn:i,sd:r,si:function(e,t){return"one"===e&&"one"===t?"one":"other"},sk:i,sl:function(e,t){return"few"===t||"one"===t?"few":"two"===t?"two":"other"},sq:i,sr:i,sv:n,sw:i,ta:i,te:i,th:n,tk:i,tr:i,ug:i,uk:i,ur:n,uz:i,vi:n,yue:n,zh:n,zu:i},Object.defineProperty(t,"__esModule",{value:!0}),e.exports=t}(u);var h=r(u.exports),d=o||a,f=l||c,p=h||t({__proto__:null,default:h},[u.exports]),g=function(e){return"pt-PT"===e?"pt_PT":e},m=n.default(Intl.NumberFormat,function(e){return d[g(e)]},function(e,t){return f[g(e)][t?"ordinal":"cardinal"]},function(e){return p[g(e)]});return yr=m}();function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e);if("undefined"==typeof Intl)void 0!==cn?cn.Intl={PluralRules:n.default}:"undefined"!=typeof window?window.Intl={PluralRules:n.default}:Cr.Intl={PluralRules:n.default},n.default.polyfill=!0;else if(Intl.PluralRules&&Intl.PluralRules.prototype.selectRange){var r=["en","es","ru","zh"];Intl.PluralRules.supportedLocalesOf(r).length<r.length&&(Intl.PluralRules=n.default,n.default.polyfill=!0)}else Intl.PluralRules=n.default,n.default.polyfill=!0}();const Sr={en:{translation:{"File Manager":"File Manager","Selected files:":"Selected files:",Folder:"Folder",Folders:"Folders",Files:"Files",File:"File","Select the destination folder":"Select the destination folder","Filter by type":"Filter by type","All types":"All types","File name":"File name",Size:"Size",Date:"Date",Actions:"Actions",Delete:"Delete",Move:"Move",Copy:"Copy","Add folder":"Add folder","Add file":"Add file","Add file by URL":"Add file by URL","Please select an image file":"Please select an image file","File deleted":"File deleted","Error when deleting a file":"Error when deleting a file","Folder deleted":"Folder deleted","Error when deleting a folder":"Error when deleting a folder","Delete folder":"Delete folder","Are you sure you want to delete this folder? This action will also delete all files and subfolders.":"Are you sure you want to delete this folder? This action will also delete all files and subfolders.","File moved":"File moved","Error when moving a file":"Error when moving a file","has been successfully uploaded":"has been successfully uploaded","File uploaded successfully":"File uploaded successfully","Error when uploading a file":"Error when uploading a file","successfully uploaded":"successfully uploaded","Error when downloading a file by URL":"Error when downloading a file by URL","Error loading files":"Error loading files","File Manager not configured":"File Manager not configured","Type to search...":"Type to search...","Failed to create folder":"Failed to create folder",Cancel:"Cancel",Submit:"Submit",months:{january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December"},files:"files","No available folders":"No available folders","My files":"My files",GIF:"GIF","Stock images":"Stock images",AI:"AI","Search GIFs":"Search GIFs","That`s all we could find.":"That`s all we could find.","Search image":"Search image",All:"All",Landscape:"Landscape",Portrait:"Portrait",Squarish:"Squarish",Black:"Black","Black and White":"Black and White",White:"White",Orange:"Orange",Red:"Red",Purple:"Purple",Magenta:"Magenta",Green:"Green",Teal:"Teal",Blue:"Blue","Photo by":"Photo by",on:"on",selected:"selected",Deselected:"Deselected",Rename:"Rename","Rename file":"Rename file {{currentFileName}}","Selected files":"Selected files: {{count}}",Edit:"Edit","Move to":"Move to","New folder":"New folder","Image search...":"Image search...","By name":"By name","By size":"By size","By date":"By date",List:"List",Grid:"Grid",Main:"Main","total pages":"Total {{total}} items",Name:"Name",Untitled:"Untitled",Dimensions:"Dimensions",error:"error",created:"created","API-endpoint for file upload is not configured":"API-endpoint for file upload is not configured","The URL must point to an image":"The URL must point to an image","Image upload...":"Image upload...",Unknown:"Unknown","Error downloading file by URL":"Error downloading file by URL","File not found":"File not found","File renamed to":"File renamed to {{newFileName}}","Failed to rename the file":"Failed to rename the file","Folder renamed to":"Folder renamed to","Rename folder":"Rename folder","New folder name":"New folder name","Enter a new folder name":"Enter a new folder name","Please drag and drop image files only":"Please drag and drop image files only","Upload file by URL":"Upload file by URL","Upload file":"Upload file","Creating a new folder":"Creating a new folder",Create:"Create","Folder name":"Folder name","Enter the name of the folder":"Enter the name of the folder","A folder will be created inside:":"A folder will be created inside:","selected folder":"selected folder","The folder will be created in the root directory":"The folder will be created in the root directory",Download:"Download","image URL":"image URL","Enter the URL of the image":"Enter the URL of the image","Supported formats: JPG, JPEG, PNG, GIF, WEBP, SVG, BMP":"Supported formats: JPG, JPEG, PNG, GIF, WEBP, SVG, BMP","New file name":"New file name","Enter a new file name":"Enter a new file name","Copy to folder":"Copy to folder",date_of_add:"Added {{date}}",file_add_complete:"File {{fileName}} uploaded successfully",success_download_one:"Successfully uploaded {{successCount}} of {{count}} file",success_download_other:"Successfully uploaded {{successCount}} of {{count}} files",error_download_one:"Failed to upload {{failCount}} of {{count}} file",error_download_other:"Failed to upload {{failCount}} of {{count}} files","No data to display":"No data to display","Drag files to upload":"Drag files to upload","Drop files here to upload":"Drop files here to upload","Newest first":"Newest first","Oldest first":"Oldest first","Largest first":"Largest first","Smallest first":"Smallest first","A-Z":"A-Z","Z-A":"Z-A","By type":"By type","Evaluating the task":"Evaluating the task","Something went wrong, please try again":"Something went wrong, please try again","Sort by":"Sort by","preview text":"The image preview is trying to load ...","Use this variant":"Use this variant","Confirm deletion":"Confirm deletion","Are you sure you want to delete the selected items?":"Are you sure you want to delete the selected items?",item:"item",items:"items",Trash:"Trash",Choose:"Choose",Stock:"Stock","Select an image from our library":"Select an image from our library","AI generation":"AI generation","Creating an image on demand":"Creating an image on demand",Search:"Search","Select a file or drag and drop it here":"Select a file or drag and drop it here","Supported files:":"Supported files:"}},ru:{translation:{Files:"Файлы",selected:"выбрано",Deselected:"Отменить выбор",Rename:"Переименовать","Rename file":"Переименовать файл {{currentFileName}}","Select the destination folder":"Выберите папку назначения","Selected files:":"Выбрано файлов:","Selected files":"Выбрано файлов: {{count}}",Copy:"Дублировать",Edit:"Изменить","Move to":"Переместить",Delete:"Удалить","New folder":"Новая папка","Image search...":"Поиск изображений...","By name":"По имени","By size":"По размеру","By date":"По дате",List:"Список",Grid:"Плитки",Main:"Главная",Folders:"Папки","total pages":"Всего {{total}} элементов",Name:"Имя",Untitled:"Без названия",Size:"Объём",Dimensions:"Размер",Date:"Дата",error:"ошибка",Folder:"Папка",created:"создана","Failed to create folder":"Не удалось создать папку","File deleted":"Файл удален","Error when deleting a file":"Ошибка при удалении файла","Folder deleted":"Папка удалена","Error when deleting a folder":"Ошибка при удалении папки","Delete folder":"Удалить папку","Are you sure you want to delete this folder? This action will also delete all files and subfolders.":"Вы уверены, что хотите удалить эту папку? Это действие также удалит все файлы и подпапки.","API-endpoint for file upload is not configured":"API-endpoint для загрузки файлов не настроен","Please select an image file":"Пожалуйста, выберите файл изображения",File:"Файл","has been successfully uploaded":"успешно загружен","The URL must point to an image":"URL должен указывать на изображение","Image upload...":"Загрузка изображения...",Unknown:"Неизвестно","Error downloading file by URL":"Ошибка загрузки файла по URL","successfully uploaded":"успешно загружен","Error when downloading a file by URL":"Ошибка при загрузке файла по URL","File not found":"Файл не найден","File renamed to":"Файл переименован на {{newFileName}}","Failed to rename the file":"Не удалось переименовать файл","Folder renamed to":"Папка переименована на","Rename folder":"Переименовать папку","New folder name":"Новое название папки","Enter a new folder name":"Введите новое название папки","Please drag and drop image files only":"Пожалуйста, перетащите только файлы изображений","Upload file by URL":"Загрузить файл по URL","Upload file":"Загрузить файл","Creating a new folder":"Создание новой папки",Create:"Создать",Cancel:"Отмена","Folder name":"Название папки","Enter the name of the folder":"Введите название папки","A folder will be created inside:":"Папка будет создана внутри:","selected folder":"выбранной папки","The folder will be created in the root directory":"Папка будет создана в корневом каталоге",Download:"Загрузить","image URL":"URL изображения","Enter the URL of the image":"Введите URL изображения","Supported formats: JPG, JPEG, PNG, GIF, WEBP, SVG, BMP":"Поддерживаемые форматы: JPG, JPEG, PNG, GIF, WEBP, SVG, BMP","New file name":"Новое имя файла","Enter a new file name":"Введите новое имя файла","Copy to folder":"Копировать в папку",date_of_add:"Добавлено {{date}}",file_add_complete:"Файл {{fileName}} успешно загружен",success_download_one:"Успешно загружено {{successCount}} из {{count}} файла",success_download_other:"Успешно загружено {{successCount}} из {{count}} файлов",error_download_one:"Не удалось загрузить {{failCount}} из {{count}} файла",error_download_other:"Не удалось загрузить {{failCount}} из {{count}} файлов",months:{january:"января",february:"февраля",march:"марта",april:"апреля",may:"мая",june:"июня",july:"июля",august:"августа",september:"сентября",october:"октября",november:"ноября",december:"декабря"},files:"файлов","No available folders":"Нет доступных папок","My files":"Мои файлы",GIF:"GIF","Stock images":"Стоковые изображения",AI:"AI","Search GIFs":"Поиск GIF","That`s all we could find.":"Это все, что мы смогли найти.","Search image":"Поиск изображений",All:"Все",Landscape:"Горизонтальные",Portrait:"Вертикальные",Squarish:"Квадратные",Black:"Черный","Black and White":"Черно-белый",White:"Белый",Orange:"Оранжевый",Red:"Красный",Purple:"Фиолетовый",Magenta:"Пурпурный",Green:"Зеленый",Teal:"Бирюзовый",Blue:"Синий","Photo by":"Фото",on:"на","File Manager":"Файловый менеджер","File Manager not configured":"Файловый менеджер не настроен","Filter by type":"Фильтр по типу","All types":"Все типы","File name":"Имя файла",Actions:"Действия","Add file":"Добавить файл","Add folder":"Добавить папку","Add file by URL":"Добавить файл по URL","File moved":"Файл перемещён","Error when moving a file":"Ошибка при перемещении файла","File uploaded successfully":"Файл успешно загружен","Type to search...":"Введите для поиска...",Submit:"Отправить","No data to display":"Нет данных для отображения","Drag files to upload":"Перетащите файлы для загрузки","Drop files here to upload":"Отпустите файлы здесь, чтобы загрузить их","Newest first":"Вначале новые","Oldest first":"Вначале старые","Largest first":"Вначале большие","Smallest first":"Вначале маленькие","A-Z":"По алфавиту А-Я","Z-A":"По алфавиту Я-А","By type":"По типу","Evaluating the task":"Оценка задания","Something went wrong, please try again":"Что-то пошло не так, пожалуйста, попробуйте еще раз","Sort by":"Сортировать по","preview text":"Изображение загружается ...","Use this variant":"Использовать этот вариант","Confirm deletion":"Подтвердить удаление","Are you sure you want to delete the selected items?":"Вы уверены, что хотите удалить выбранные элементы?",item:"файл",items:"файлов",Trash:"Корзина",Choose:"Выбрать",Stock:"Фотосток","Select an image from our library":"Выберите изображение из нашей библиотеки","AI generation":"AI генерация","Creating an image on demand":"Создание изображения по запросу",Search:"Поиск","Select a file or drag and drop it here":"Выберите файл или перетащите его сюда","Supported files:":"Поддерживаемые файлы:"}}};mr.use(xn).init({resources:Sr,debug:!0,lng:"en",fallbackLng:"en",interpolation:{escapeValue:!1}});const Ar=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"m6 9 6 6 6-6"}));Ar.displayName="ChevronDown";const kr=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"M12 20.472a6 6 0 1 0 5.58-10.262m-11.16 0a6 6 0 1 0 7.16 3.58M18 8A6 6 0 1 1 6 8a6 6 0 0 1 12 0Z"}));kr.displayName="Colors";const Tr=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"M16 16v2.8c0 1.12 0 1.68-.218 2.108a2 2 0 0 1-.874.874C14.48 22 13.92 22 12.8 22H5.2c-1.12 0-1.68 0-2.108-.218a2 2 0 0 1-.874-.874C2 20.48 2 19.92 2 18.8v-7.6c0-1.12 0-1.68.218-2.108a2 2 0 0 1 .874-.874C3.52 8 4.08 8 5.2 8H8m3.2 8h7.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C22 14.48 22 13.92 22 12.8V5.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C20.48 2 19.92 2 18.8 2h-7.6c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C8 3.52 8 4.08 8 5.2v7.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C9.52 16 10.08 16 11.2 16Z"}));Tr.displayName="Copy04";const Ir=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"M10 6h4.8c1.12 0 1.68 0 2.108.218a2 2 0 0 1 .874.874C18 7.52 18 8.08 18 9.2V14M2 6h4m12 12v4m4-4H9.2c-1.12 0-1.68 0-2.108-.218a2 2 0 0 1-.874-.874C6 16.48 6 15.92 6 14.8V2"}));Ir.displayName="Crop02";const Or=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"M12 13a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0-7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 14a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"}));Or.displayName="DotsVertical";const Er=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"m13 7-1.116-2.231c-.32-.642-.481-.963-.72-1.198a2 2 0 0 0-.748-.462C10.1 3 9.74 3 9.022 3H5.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C2 4.52 2 5.08 2 6.2V7m0 0h15.2c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C22 9.28 22 10.12 22 11.8v4.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C19.72 21 18.88 21 17.2 21H6.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C2 18.72 2 17.88 2 16.2V7Zm7 7 3 3m0 0 3-3m-3 3v-6"}));Er.displayName="FolderDownload";const Pr=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"m13 7-1.116-2.231c-.32-.642-.481-.963-.72-1.198a2 2 0 0 0-.748-.462C10.1 3 9.74 3 9.022 3H5.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C2 4.52 2 5.08 2 6.2V7m0 0h15.2c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C22 9.28 22 10.12 22 11.8v4.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C19.72 21 18.88 21 17.2 21H6.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C2 18.72 2 17.88 2 16.2V7Zm7 7h6"}));Pr.displayName="FolderMinus";const Mr=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"m13 7-1.116-2.231c-.32-.642-.481-.963-.72-1.198a2 2 0 0 0-.748-.462C10.1 3 9.74 3 9.022 3H5.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C2 4.52 2 5.08 2 6.2V7m0 0h15.2c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C22 9.28 22 10.12 22 11.8v4.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C19.72 21 18.88 21 17.2 21H6.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C2 18.72 2 17.88 2 16.2V7Zm10 10v-6m-3 3h6"}));Mr.displayName="FolderPlus";const Fr=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"M8.4 3H4.6c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C3 3.76 3 4.04 3 4.6v3.8c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C3.76 10 4.04 10 4.6 10h3.8c.56 0 .84 0 1.054-.109a1 1 0 0 0 .437-.437C10 9.24 10 8.96 10 8.4V4.6c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C9.24 3 8.96 3 8.4 3Zm11 0h-3.8c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C14 3.76 14 4.04 14 4.6v3.8c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C14.76 10 15.04 10 15.6 10h3.8c.56 0 .84 0 1.054-.109a1 1 0 0 0 .437-.437C21 9.24 21 8.96 21 8.4V4.6c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C20.24 3 19.96 3 19.4 3Zm0 11h-3.8c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C14 14.76 14 15.04 14 15.6v3.8c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C14.76 21 15.04 21 15.6 21h3.8c.56 0 .84 0 1.054-.109a1 1 0 0 0 .437-.437C21 20.24 21 19.96 21 19.4v-3.8c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C20.24 14 19.96 14 19.4 14Zm-11 0H4.6c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C3 14.76 3 15.04 3 15.6v3.8c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C3.76 21 4.04 21 4.6 21h3.8c.56 0 .84 0 1.054-.109a1 1 0 0 0 .437-.437C10 20.24 10 19.96 10 19.4v-3.8c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C9.24 14 8.96 14 8.4 14Z"}));Fr.displayName="Grid01";const jr=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"m4.272 20.728 6.597-6.597c.396-.396.594-.594.822-.668a1 1 0 0 1 .618 0c.228.074.426.272.822.668l6.553 6.553M14 15l2.869-2.869c.396-.396.594-.594.822-.668a1 1 0 0 1 .618 0c.228.074.426.272.822.668L22 15M10 9a2 2 0 1 1-4 0 2 2 0 0 1 4 0ZM6.8 21h10.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C22 18.72 22 17.88 22 16.2V7.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C19.72 3 18.88 3 17.2 3H6.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C2 5.28 2 6.12 2 7.8v8.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C4.28 21 5.12 21 6.8 21Z"}));jr.displayName="Image03";const Dr=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"M21 12H9m12-6H9m12 12H9m-4-6a1 1 0 1 1-2 0 1 1 0 0 1 2 0Zm0-6a1 1 0 1 1-2 0 1 1 0 0 1 2 0Zm0 12a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"}));Dr.displayName="List";const Rr=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"M9.5 8.965c0-.477 0-.716.1-.849a.5.5 0 0 1 .364-.199c.166-.012.367.117.769.375l4.72 3.035c.349.224.523.336.583.478a.5.5 0 0 1 0 .39c-.06.142-.234.254-.583.478l-4.72 3.035c-.402.258-.603.387-.769.375a.5.5 0 0 1-.364-.2c-.1-.132-.1-.371-.1-.848v-6.07Z"}),r.createElement("path",{d:"M3 7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8Z"}));Rr.displayName="PlaySquare";const Lr=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"M12 8v8m-4-4h8m6 0c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z"}));Lr.displayName="PlusCircle";const zr=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"M14 22H6.8m0 0c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C2 19.72 2 18.88 2 17.2M6.8 22h.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C12 19.72 12 18.88 12 17.2v-.4c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C9.72 12 8.88 12 7.2 12h-.4c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C2 14.28 2 15.12 2 16.8v.4m0 0V10m8-8h4m8 8v4m-4 8c.93 0 1.395 0 1.776-.102a3 3 0 0 0 2.122-2.122C22 19.395 22 18.93 22 18m0-12c0-.93 0-1.395-.102-1.776a3 3 0 0 0-2.122-2.122C19.395 2 18.93 2 18 2M6 2c-.93 0-1.395 0-1.776.102a3 3 0 0 0-2.122 2.122C2 4.605 2 5.07 2 6"}));zr.displayName="Scale01";const Nr=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"m21 21-4.35-4.35M19 11a8 8 0 1 1-16 0 8 8 0 0 1 16 0Z"}));Nr.displayName="SearchMd";const Br=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"M4.5 22v-5m0-10V2M2 4.5h5m-5 15h5M13 3l-1.734 4.509c-.282.733-.423 1.1-.643 1.408a3 3 0 0 1-.706.707c-.308.219-.675.36-1.408.642L4 12l4.509 1.734c.733.282 1.1.423 1.408.643.273.194.512.433.707.706.219.308.36.675.642 1.408L13 21l1.734-4.509c.282-.733.423-1.1.643-1.408.194-.273.433-.512.706-.707.308-.219.675-.36 1.408-.642L22 12l-4.509-1.734c-.733-.282-1.1-.423-1.408-.642a3 3 0 0 1-.706-.707c-.22-.308-.36-.675-.643-1.408L13 3Z"}));Br.displayName="Stars02";const Vr=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"M13 7H5.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C2 8.52 2 9.08 2 10.2v3.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C3.52 17 4.08 17 5.2 17H13m4-10h1.8c1.12 0 1.68 0 2.108.218a2 2 0 0 1 .874.874C22 8.52 22 9.08 22 10.2v3.6c0 1.12 0 1.68-.218 2.108a2 2 0 0 1-.874.874C20.48 17 19.92 17 18.8 17H17m0 4V3m2.5 0h-5m5 18h-5"}));Vr.displayName="TextInput";const Ur=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"M9 3h6M3 6h18m-2 0-.701 10.52c-.105 1.578-.158 2.367-.499 2.965a3 3 0 0 1-1.298 1.215c-.62.3-1.41.3-2.993.3h-3.018c-1.582 0-2.373 0-2.993-.3A3 3 0 0 1 6.2 19.485c-.34-.598-.394-1.387-.499-2.966L5 6m5 4.5v5m4-5v5"}));Ur.displayName="Trash03";const Hr=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"M21 15v1.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V15m14-7-5-5m0 0L7 8m5-5v12"}));Hr.displayName="Upload01";var Wr,Yr={exports:{}},$r=Yr.exports;
|
|
1
|
+
import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import*as r from"react";import i,{useState as o,useEffect as a,createContext as s,useContext as l,useCallback as c,useRef as u,useMemo as h,createElement as d,memo as f,forwardRef as p,useImperativeHandle as g,Children as m,isValidElement as v,Fragment as b,cloneElement as y,useId as w,useDebugValue as x,useLayoutEffect as C,useInsertionEffect as _,Component as S}from"react";import{createRoot as A}from"react-dom/client";import{theme as k,ConfigProvider as T,App as I,Form as O,message as E,Input as P,Image as M,Typography as F,Select as j,Checkbox as D,Dropdown as R,Tooltip as L,Button as z,Space as N,Segmented as B,Pagination as V,Table as U,Row as H,Col as W,Card as Y,Modal as $,Tree as G,Menu as X,Divider as K,List as q,Progress as Z,Avatar as J,Layout as Q,Spin as ee,Radio as te,Tag as ne,Carousel as re}from"antd";import ie from"antd/es/alert/ErrorBoundary";import oe,{FolderOutlined as ae,EyeOutlined as se,BarsOutlined as le,AppstoreOutlined as ce,DownOutlined as ue,RightOutlined as he,LinkOutlined as de,UploadOutlined as fe,FileOutlined as pe,FolderAddOutlined as ge,FolderOpenOutlined as me,MinusOutlined as ve,CloseOutlined as be,FileImageOutlined as ye,ExclamationCircleOutlined as we,CheckCircleOutlined as xe,LoadingOutlined as Ce,ArrowRightOutlined as _e,ArrowLeftOutlined as Se,CheckOutlined as Ae}from"@ant-design/icons";import*as ke from"react-dom";import Te,{createPortal as Ie}from"react-dom";import"antd/dist/reset.css";function Oe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ee(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Oe(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Oe(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Pe(e){return Pe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pe(e)}function Me(e){var t=function(e,t){if("object"!=Pe(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=Pe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Pe(t)?t:t+""}function Fe(e,t,n){return(t=Me(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function je(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function De(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?je(Object(n),!0).forEach(function(t){Fe(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):je(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Re={},Le=[];function ze(e,t){if("production"!==process.env.NODE_ENV&&!e&&void 0!==console){var n=Le.reduce(function(e,t){return t(null!=e?e:"","warning")},t);n&&console.error("Warning: ".concat(n))}}function Ne(e,t){if("production"!==process.env.NODE_ENV&&!e&&void 0!==console){var n=Le.reduce(function(e,t){return t(null!=e?e:"","note")},t);n&&console.warn("Note: ".concat(n))}}function Be(e,t,n){t||Re[n]||(e(!1,n),Re[n]=!0)}function Ve(e,t){Be(ze,e,t)}function Ue(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=new Set;return function e(t,i){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=r.has(t);if(Ve(!a,"Warning: There may be circular references"),a)return!1;if(t===i)return!0;if(n&&o>1)return!1;r.add(t);var s=o+1;if(Array.isArray(t)){if(!Array.isArray(i)||t.length!==i.length)return!1;for(var l=0;l<t.length;l++)if(!e(t[l],i[l],s))return!1;return!0}if(t&&i&&"object"===Pe(t)&&"object"===Pe(i)){var c=Object.keys(t);return c.length===Object.keys(i).length&&c.every(function(n){return e(t[n],i[n],s)})}return!1}(e,t)}function He(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function We(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Me(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}Ve.preMessage=function(e){Le.push(e)},Ve.resetWarned=function(){Re={}},Ve.noteOnce=function(e,t){Be(Ne,e,t)};function Ye(e){return e.join("%")}var $e=function(){function e(t){He(this,e),Fe(this,"instanceId",void 0),Fe(this,"cache",new Map),Fe(this,"extracted",new Set),this.instanceId=t}return We(e,[{key:"get",value:function(e){return this.opGet(Ye(e))}},{key:"opGet",value:function(e){return this.cache.get(e)||null}},{key:"update",value:function(e,t){return this.opUpdate(Ye(e),t)}},{key:"opUpdate",value:function(e,t){var n=t(this.cache.get(e));null===n?this.cache.delete(e):this.cache.set(e,n)}}]),e}(),Ge=["children"],Xe="data-css-hash",Ke="__cssinjs_instance__";function qe(){var e=Math.random().toString(12).slice(2);if("undefined"!=typeof document&&document.head&&document.body){var t=document.body.querySelectorAll("style[".concat(Xe,"]"))||[],n=document.head.firstChild;Array.from(t).forEach(function(t){t[Ke]=t[Ke]||e,t[Ke]===e&&document.head.insertBefore(t,n)});var r={};Array.from(document.querySelectorAll("style[".concat(Xe,"]"))).forEach(function(t){var n,i=t.getAttribute(Xe);r[i]?t[Ke]===e&&(null===(n=t.parentNode)||void 0===n||n.removeChild(t)):r[i]=!0})}return new $e(e)}var Ze=r.createContext({hashPriority:"low",cache:qe(),defaultCache:!0}),Je=function(e){var t,n,i,o,a=e.children,s=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,Ge),l=r.useContext(Ze),c=(t=function(){var e=De({},l);Object.keys(s).forEach(function(t){var n=s[t];void 0!==s[t]&&(e[t]=n)});var t=s.cache;return e.cache=e.cache||qe(),e.defaultCache=!t&&l.defaultCache,e},n=[l,s],i=function(e,t){return!Ue(e[0],t[0],!0)||!Ue(e[1],t[1],!0)},"value"in(o=r.useRef({})).current&&!i(o.current.condition,n)||(o.current.value=t(),o.current.condition=n),o.current.value);return r.createElement(Ze.Provider,{value:c},a)};var Qe=function(){function e(){He(this,e),Fe(this,"cache",void 0),Fe(this,"keys",void 0),Fe(this,"cacheCallTimes",void 0),this.cache=new Map,this.keys=[],this.cacheCallTimes=0}return We(e,[{key:"size",value:function(){return this.keys.length}},{key:"internalGet",value:function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i={map:this.cache};return e.forEach(function(e){var t;i?i=null===(t=i)||void 0===t||null===(t=t.map)||void 0===t?void 0:t.get(e):i=void 0}),null!==(t=i)&&void 0!==t&&t.value&&r&&(i.value[1]=this.cacheCallTimes++),null===(n=i)||void 0===n?void 0:n.value}},{key:"get",value:function(e){var t;return null===(t=this.internalGet(e,!0))||void 0===t?void 0:t[0]}},{key:"has",value:function(e){return!!this.internalGet(e)}},{key:"set",value:function(t,n){var r=this;if(!this.has(t)){if(this.size()+1>e.MAX_CACHE_SIZE+e.MAX_CACHE_OFFSET){var i=this.keys.reduce(function(e,t){var n=Ee(e,2)[1];return r.internalGet(t)[1]<n?[t,r.internalGet(t)[1]]:e},[this.keys[0],this.cacheCallTimes]),o=Ee(i,1)[0];this.delete(o)}this.keys.push(t)}var a=this.cache;t.forEach(function(e,i){if(i===t.length-1)a.set(e,{value:[n,r.cacheCallTimes++]});else{var o=a.get(e);o?o.map||(o.map=new Map):a.set(e,{map:new Map}),a=a.get(e).map}})}},{key:"deleteByPath",value:function(e,t){var n,r=e.get(t[0]);if(1===t.length)return r.map?e.set(t[0],{map:r.map}):e.delete(t[0]),null===(n=r.value)||void 0===n?void 0:n[0];var i=this.deleteByPath(r.map,t.slice(1));return r.map&&0!==r.map.size||r.value||e.delete(t[0]),i}},{key:"delete",value:function(e){if(this.has(e))return this.keys=this.keys.filter(function(t){return!function(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(t,e)}),this.deleteByPath(this.cache,e)}}]),e}();function et(e,t,n){if(arguments.length>4&&void 0!==arguments[4]&&arguments[4])return e;var r=De(De({},arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}),{},Fe(Fe({},"data-token-hash",t),Xe,n)),i=Object.keys(r).map(function(e){var t=r[e];return t?"".concat(e,'="').concat(t,'"'):null}).filter(function(e){return e}).join(" ");return"<style ".concat(i,">").concat(e,"</style>")}Fe(Qe,"MAX_CACHE_SIZE",20),Fe(Qe,"MAX_CACHE_OFFSET",5),new Qe,"test"!==process.env.NODE_ENV&&"undefined"!=typeof window&&window.document&&window.document.createElement?r.useLayoutEffect:r.useEffect,De({},r).useInsertionEffect,De({},r).useInsertionEffect;if(process.env.NODE_ENV,"production"!==process.env.NODE_ENV&&"undefined"!=typeof module&&module&&module.hot&&"undefined"!=typeof window){var tt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:null;if(tt&&"function"==typeof tt.webpackHotUpdate){var nt=tt.webpackHotUpdate;tt.webpackHotUpdate=function(){return setTimeout(function(){0},0),nt.apply(void 0,arguments)}}}process.env.NODE_ENV;var rt="comm",it="rule",ot="decl",at=Math.abs,st=String.fromCharCode;function lt(e){return e.trim()}function ct(e,t,n){return e.replace(t,n)}function ut(e,t,n){return e.indexOf(t,n)}function ht(e,t){return 0|e.charCodeAt(t)}function dt(e,t,n){return e.slice(t,n)}function ft(e){return e.length}function pt(e,t){return t.push(e),e}var gt=1,mt=1,vt=0,bt=0,yt=0,wt="";function xt(e,t,n,r,i,o,a,s){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:gt,column:mt,length:a,return:"",siblings:s}}function Ct(){return yt=bt>0?ht(wt,--bt):0,mt--,10===yt&&(mt=1,gt--),yt}function _t(){return yt=bt<vt?ht(wt,bt++):0,mt++,10===yt&&(mt=1,gt++),yt}function St(){return ht(wt,bt)}function At(){return bt}function kt(e,t){return dt(wt,e,t)}function Tt(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function It(e){return lt(kt(bt-1,Pt(91===e?e+2:40===e?e+1:e)))}function Ot(e){for(;(yt=St())&&yt<33;)_t();return Tt(e)>2||Tt(yt)>3?"":" "}function Et(e,t){for(;--t&&_t()&&!(yt<48||yt>102||yt>57&&yt<65||yt>70&&yt<97););return kt(e,At()+(t<6&&32==St()&&32==_t()))}function Pt(e){for(;_t();)switch(yt){case e:return bt;case 34:case 39:34!==e&&39!==e&&Pt(yt);break;case 40:41===e&&Pt(e);break;case 92:_t()}return bt}function Mt(e,t){for(;_t()&&e+yt!==57&&(e+yt!==84||47!==St()););return"/*"+kt(t,bt-1)+"*"+st(47===e?e:_t())}function Ft(e){for(;!Tt(St());)_t();return kt(e,bt)}function jt(e){return function(e){return wt="",e}(Dt("",null,null,null,[""],e=function(e){return gt=mt=1,vt=ft(wt=e),bt=0,[]}(e),0,[0],e))}function Dt(e,t,n,r,i,o,a,s,l){for(var c=0,u=0,h=a,d=0,f=0,p=0,g=1,m=1,v=1,b=0,y="",w=i,x=o,C=r,_=y;m;)switch(p=b,b=_t()){case 40:if(108!=p&&58==ht(_,h-1)){-1!=ut(_+=ct(It(b),"&","&\f"),"&\f",at(c?s[c-1]:0))&&(v=-1);break}case 34:case 39:case 91:_+=It(b);break;case 9:case 10:case 13:case 32:_+=Ot(p);break;case 92:_+=Et(At()-1,7);continue;case 47:switch(St()){case 42:case 47:pt(Lt(Mt(_t(),At()),t,n,l),l),5!=Tt(p||1)&&5!=Tt(St()||1)||!ft(_)||" "===dt(_,-1,void 0)||(_+=" ");break;default:_+="/"}break;case 123*g:s[c++]=ft(_)*v;case 125*g:case 59:case 0:switch(b){case 0:case 125:m=0;case 59+u:-1==v&&(_=ct(_,/\f/g,"")),f>0&&(ft(_)-h||0===g&&47===p)&&pt(f>32?zt(_+";",r,n,h-1,l):zt(ct(_," ","")+";",r,n,h-2,l),l);break;case 59:_+=";";default:if(pt(C=Rt(_,t,n,c,u,i,s,y,w=[],x=[],h,o),o),123===b)if(0===u)Dt(_,t,C,C,w,o,h,s,x);else{switch(d){case 99:if(110===ht(_,3))break;case 108:if(97===ht(_,2))break;default:u=0;case 100:case 109:case 115:}u?Dt(e,C,C,r&&pt(Rt(e,C,C,0,0,i,s,y,i,w=[],h,x),x),i,x,h,s,r?w:x):Dt(_,C,C,C,[""],x,0,s,x)}}c=u=f=0,g=v=1,y=_="",h=a;break;case 58:h=1+ft(_),f=p;default:if(g<1)if(123==b)--g;else if(125==b&&0==g++&&125==Ct())continue;switch(_+=st(b),b*g){case 38:v=u>0?1:(_+="\f",-1);break;case 44:s[c++]=(ft(_)-1)*v,v=1;break;case 64:45===St()&&(_+=It(_t())),d=St(),u=h=ft(y=_+=Ft(At())),b++;break;case 45:45===p&&2==ft(_)&&(g=0)}}return o}function Rt(e,t,n,r,i,o,a,s,l,c,u,h){for(var d=i-1,f=0===i?o:[""],p=function(e){return e.length}(f),g=0,m=0,v=0;g<r;++g)for(var b=0,y=dt(e,d+1,d=at(m=a[g])),w=e;b<p;++b)(w=lt(m>0?f[b]+" "+y:ct(y,/&\f/g,f[b])))&&(l[v++]=w);return xt(e,t,n,0===i?it:s,l,c,u,h)}function Lt(e,t,n,r){return xt(e,t,n,rt,st(yt),dt(e,2,-2),0,r)}function zt(e,t,n,r,i){return xt(e,t,n,ot,dt(e,0,r),dt(e,r+1,-1),r,i)}function Nt(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function Bt(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case"@namespace":case ot:return e.return=e.return||e.value;case rt:return"";case"@keyframes":return e.return=e.value+"{"+Nt(e.children,r)+"}";case it:if(!ft(e.value=e.props.join(",")))return""}return ft(n=Nt(e.children,r))?e.return=e.value+"{"+n+"}":""}function Vt(e){return e.notSplit=!0,e}Fe(Fe(Fe({},"style",function(e,t,n){var r=Ee(e,6),i=r[0],o=r[1],a=r[2],s=r[3],l=r[4],c=r[5],u=(n||{}).plain;if(l)return null;var h=i,d={"data-rc-order":"prependQueue","data-rc-priority":"".concat(c)};return h=et(i,o,a,d,u),s&&Object.keys(s).forEach(function(e){if(!t[e]){t[e]=!0;var n=function(e){return Nt(jt(e),Bt).replace(/\{%%%\:[^;];}/g,";")}(s[e]),r=et(n,o,"_effect-".concat(e),d,u);e.startsWith("@layer")?h=r+h:h+=r}}),[c,a,h]}),"token",function(e,t,n){var r=Ee(e,5),i=r[2],o=r[3],a=r[4],s=(n||{}).plain;if(!o)return null;var l=i._tokenKey;return[-999,l,et(o,a,l,{"data-rc-order":"prependQueue","data-rc-priority":"".concat(-999)},s)]}),"cssVar",function(e,t,n){var r=Ee(e,4),i=r[1],o=r[2],a=r[3],s=(n||{}).plain;if(!i)return null;return[-999,o,et(i,a,o,{"data-rc-order":"prependQueue","data-rc-priority":"".concat(-999)},s)]}),Vt(["borderTop","borderBottom"]),Vt(["borderTop"]),Vt(["borderBottom"]),Vt(["borderLeft","borderRight"]),Vt(["borderLeft"]),Vt(["borderRight"]);const Ut={defaultMerge:Symbol("deepmerge-ts: default merge"),skip:Symbol("deepmerge-ts: skip")};function Ht(e,t){return t}function Wt(e,t){return e.filter(e=>void 0!==e)}var Yt;function $t(e){return"object"!=typeof e||null===e?0:Array.isArray(e)?2:function(e){if(!Kt.includes(Object.prototype.toString.call(e)))return!1;const{constructor:t}=e;if(void 0===t)return!0;const n=t.prototype;if(null===n||"object"!=typeof n||!Kt.includes(Object.prototype.toString.call(n)))return!1;if(!n.hasOwnProperty("isPrototypeOf"))return!1;return!0}(e)?1:e instanceof Set?3:e instanceof Map?4:5}function Gt(e,t){return"object"==typeof e&&Object.prototype.propertyIsEnumerable.call(e,t)}function Xt(e){let t=0,n=e[0]?.[Symbol.iterator]();return{[Symbol.iterator]:()=>({next(){for(;;){if(void 0===n)return{done:!0,value:void 0};const r=n.next();if(!0!==r.done)return{done:!1,value:r.value};t+=1,n=e[t]?.[Symbol.iterator]()}}})}}!function(e){e[e.NOT=0]="NOT",e[e.RECORD=1]="RECORD",e[e.ARRAY=2]="ARRAY",e[e.SET=3]="SET",e[e.MAP=4]="MAP",e[e.OTHER=5]="OTHER"}(Yt||(Yt={}));const Kt=["[object Object]","[object Module]"];const qt={mergeRecords:function(e,t,n){const r={};for(const i of function(e){const t=new Set;for(const n of e)for(const e of[...Object.keys(n),...Object.getOwnPropertySymbols(n)])t.add(e);return t}(e)){const o=[];for(const t of e)Gt(t,i)&&o.push(t[i]);if(0===o.length)continue;const a=t.metaDataUpdater(n,{key:i,parents:e}),s=Jt(o,t,a);s!==Ut.skip&&("__proto__"===i?Object.defineProperty(r,i,{value:s,configurable:!0,enumerable:!0,writable:!0}):r[i]=s)}return r},mergeArrays:function(e){return e.flat()},mergeSets:function(e){return new Set(Xt(e))},mergeMaps:function(e){return new Map(Xt(e))},mergeOthers:function(e){return e.at(-1)}};function Zt(...e){return function(e,t){const n=function(e,t){return{defaultMergeFunctions:qt,mergeFunctions:{...qt,...Object.fromEntries(Object.entries(e).filter(([e,t])=>Object.hasOwn(qt,e)).map(([e,t])=>!1===t?[e,qt.mergeOthers]:[e,t]))},metaDataUpdater:e.metaDataUpdater??Ht,deepmerge:t,useImplicitDefaultMerging:e.enableImplicitDefaultMerging??!1,filterValues:!1===e.filterValues?void 0:e.filterValues??Wt,actions:Ut}}(e,r);function r(...e){return Jt(e,n,t)}return r}({})(...e)}function Jt(e,t,n){const r=t.filterValues?.(e,n)??e;if(0===r.length)return;if(1===r.length)return Qt(r,t,n);const i=$t(r[0]);if(0!==i&&5!==i)for(let e=1;e<r.length;e++)if($t(r[e])!==i)return Qt(r,t,n);switch(i){case 1:return function(e,t,n){const r=t.mergeFunctions.mergeRecords(e,t,n);if(r===Ut.defaultMerge||t.useImplicitDefaultMerging&&void 0===r&&t.mergeFunctions.mergeRecords!==t.defaultMergeFunctions.mergeRecords)return t.defaultMergeFunctions.mergeRecords(e,t,n);return r}(r,t,n);case 2:return function(e,t,n){const r=t.mergeFunctions.mergeArrays(e,t,n);if(r===Ut.defaultMerge||t.useImplicitDefaultMerging&&void 0===r&&t.mergeFunctions.mergeArrays!==t.defaultMergeFunctions.mergeArrays)return t.defaultMergeFunctions.mergeArrays(e);return r}(r,t,n);case 3:return function(e,t,n){const r=t.mergeFunctions.mergeSets(e,t,n);if(r===Ut.defaultMerge||t.useImplicitDefaultMerging&&void 0===r&&t.mergeFunctions.mergeSets!==t.defaultMergeFunctions.mergeSets)return t.defaultMergeFunctions.mergeSets(e);return r}(r,t,n);case 4:return function(e,t,n){const r=t.mergeFunctions.mergeMaps(e,t,n);if(r===Ut.defaultMerge||t.useImplicitDefaultMerging&&void 0===r&&t.mergeFunctions.mergeMaps!==t.defaultMergeFunctions.mergeMaps)return t.defaultMergeFunctions.mergeMaps(e);return r}(r,t,n);default:return Qt(r,t,n)}}function Qt(e,t,n){const r=t.mergeFunctions.mergeOthers(e,t,n);return r===Ut.defaultMerge||t.useImplicitDefaultMerging&&void 0===r&&t.mergeFunctions.mergeOthers!==t.defaultMergeFunctions.mergeOthers?t.defaultMergeFunctions.mergeOthers(e):r}const en={hashed:!1,algorithm:k.defaultAlgorithm,token:{colorLink:"#1677ff",colorInfo:"#722ed1",colorTextBase:"#000000",colorBgLayout:"#f0f2f5",borderRadiusXL:16,borderRadiusLG:12,borderRadius:8,borderRadiusSM:6,colorDarken1:"rgba(0, 0, 0, 0.08)",colorFillSecondaryDarken:"rgba(0, 0, 0, 0.1)",formControlHeight:34,borderWidth:1,borderColorHover:"#C5C5C5",formItemMarginBottomMD:20,formItemMarginBottomXS:8,colorSecondaryH:265.03,colorSecondaryS:"63.92%",colorSecondaryL:"50%",colorSecondaryBgH:273,colorSecondaryBgS:"100%",colorSecondaryBgL:"93%",appZoom:1},components:{Progress:{colorFillSecondary:"#ffffff"},Tabs:{titleFontSize:16,titleFontSizeSM:16,fontSize:16,fontSizeLG:16}}},tn={hashed:!1,algorithm:k.darkAlgorithm,token:{colorBgBase:"#1F1F1F",colorInfo:"#9254de",colorLink:"#1890ff",colorLinkHover:"#69c0ff",wireframe:!1,borderRadiusXL:16,borderRadiusLG:12,borderRadius:8,borderRadiusSM:6,borderWidth:1,colorDarken1:"rgba(0, 0, 0, 0.9)",colorFillSecondaryDarken:"rgba(255, 255, 255, 0.16)",formControlHeight:34,borderColorHover:"rgba(255, 255, 255, 0.3)",formItemMarginBottomMD:20,formItemMarginBottomXS:8,appZoom:1},components:{Tabs:{titleFontSize:16,titleFontSizeSM:16,fontSize:16,fontSizeLG:16}}},nn=({externalTheme:t,children:n,customThemeToken:r})=>{const[i]=o(t||"light"),[s,l]=o("light"===i?en:tn);return a(()=>{const e="light"===i?en:tn,t=r?Zt(e.token,r):e.token;l(Object.assign(Object.assign({},e),{token:t}))},[l,i,r]),e("div",{id:"file-manager-element-id",style:{height:"100%"},children:e(T,{theme:s,children:e(Je,{transformers:[],children:e(I,{style:{height:"100%"},children:n})})})})},rn={fileManager:{locale:"en_US",mode:"fileManager",theme:"light",enabledTabs:["editor"]},imageCenter:{locale:"en_US",mode:"imageCenter",theme:"light",enabledTabs:["stock","gif","editor"]},plugin:{locale:"en_US",mode:"plugin",theme:"light",enabledTabs:["editor","stock","gif","ai"]}},on=(e="fileManager",t)=>"imageCenter"===e&&t?t:Object.assign({},rn[e]);let an=!1;const sn=()=>{if(an)return;window.addEventListener("error",e=>!(!e.message||!e.message.includes("ResizeObserver loop completed with undelivered notifications"))&&(e.stopImmediatePropagation(),e.preventDefault(),!0),!0);const e=window.onerror;window.onerror=(t,n,r,i,o)=>!("string"!=typeof t||!t.includes("ResizeObserver loop completed with undelivered notifications"))||!!e&&e(t,n,r,i,o),window.addEventListener("unhandledrejection",e=>{var t,n;(null===(n=null===(t=e.reason)||void 0===t?void 0:t.message)||void 0===n?void 0:n.includes("ResizeObserver loop completed with undelivered notifications"))&&e.preventDefault()});const t=console.error;if(console.error=(...e)=>{var n;((null===(n=e[0])||void 0===n?void 0:n.toString())||"").includes("ResizeObserver loop completed with undelivered notifications")||t.apply(console,e)},"undefined"!=typeof window){const e=()=>{try{["webpackHotUpdate","__webpack_require__","__webpack_hash__"].forEach(e=>{if(window[e]){const e=window.__webpack_require__;e&&"object"==typeof e&&null!==e&&"cache"in e&&console.warn("✅ Webpack обнаружен, активирована дополнительная защита от ResizeObserver ошибок")}})}catch(e){console.warn("Ошибка при поиске webpack объектов:",e)}};e(),setTimeout(e,1e3)}an=!0},ln=()=>{an=!1};var cn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};const un={},hn=(e,t,n,r)=>{gn(n)&&un[n]||(gn(n)&&(un[n]=new Date),((e,t,n,r)=>{const i=[n,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(i,"warn","react-i18next::",!0);gn(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...i):console?.warn&&console.warn(...i)})(e,t,n,r))},dn=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},fn=(e,t,n)=>{e.loadNamespaces(t,dn(e,n))},pn=(e,t,n,r)=>{if(gn(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return fn(e,n,r);n.forEach(t=>{e.options.ns.indexOf(t)<0&&e.options.ns.push(t)}),e.loadLanguages(t,dn(e,r))},gn=e=>"string"==typeof e,mn=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,vn={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},bn=e=>vn[e];let yn={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e=>e.replace(mn,bn)};let wn;const xn={type:"3rdParty",init(e){((e={})=>{yn={...yn,...e}})(e.options.react),(e=>{wn=e})(e)}},Cn=s();class _n{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const Sn=(e,t,n,r)=>e.getFixedT(t,n,r),An=(e,t={})=>{const{i18n:n}=t,{i18n:r,defaultNS:i}=l(Cn)||{},s=n||r||wn;if(s&&!s.reportNamespaces&&(s.reportNamespaces=new _n),!s){hn(s,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const e=(e,t)=>{return gn(t)?t:"object"==typeof(n=t)&&null!==n&&gn(t.defaultValue)?t.defaultValue:Array.isArray(e)?e[e.length-1]:e;var n},t=[e,{},!1];return t.t=e,t.i18n={},t.ready=!1,t}s.options.react?.wait&&hn(s,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const h={...yn,...s.options.react,...t},{useSuspense:d,keyPrefix:f}=h;let p=i||s.options?.defaultNS;p=gn(p)?[p]:p||["translation"],s.reportNamespaces.addUsedNamespaces?.(p);const g=(s.isInitialized||s.initializedStoreOnce)&&p.every(e=>((e,t,n={})=>t.languages&&t.languages.length?t.hasLoadedNamespace(e,{lng:n.lng,precheck:(t,r)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}):(hn(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0))(e,s,h)),m=((e,t,n,r)=>c(Sn(e,t,n,r),[e,t,n,r]))(s,t.lng||null,"fallback"===h.nsMode?p:p[0],f),v=()=>m,b=()=>Sn(s,t.lng||null,"fallback"===h.nsMode?p:p[0],f),[y,w]=o(v);let x=p.join();t.lng&&(x=`${t.lng}${x}`);const C=((e,t)=>{const n=u();return a(()=>{n.current=e},[e,t]),n.current})(x),_=u(!0);a(()=>{const{bindI18n:e,bindI18nStore:n}=h;_.current=!0,g||d||(t.lng?pn(s,t.lng,p,()=>{_.current&&w(b)}):fn(s,p,()=>{_.current&&w(b)})),g&&C&&C!==x&&_.current&&w(b);const r=()=>{_.current&&w(b)};return e&&s?.on(e,r),n&&s?.store.on(n,r),()=>{_.current=!1,s&&e&&e?.split(" ").forEach(e=>s.off(e,r)),n&&s&&n.split(" ").forEach(e=>s.store.off(e,r))}},[s,x]),a(()=>{_.current&&g&&w(v)},[s,f,g]);const S=[y,s,g];if(S.t=y,S.i18n=s,S.ready=g,g)return S;if(!g&&!d)return S;throw new Promise(e=>{t.lng?pn(s,t.lng,p,()=>e()):fn(s,p,()=>e())})};function kn({i18n:e,defaultNS:t,children:n}){const r=h(()=>({i18n:e,defaultNS:t}),[e,t]);return d(Cn.Provider,{value:r},n)}const Tn=e=>"string"==typeof e,In=()=>{let e,t;const n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},On=e=>null==e?"":""+e,En=/###/g,Pn=e=>e&&e.indexOf("###")>-1?e.replace(En,"."):e,Mn=e=>!e||Tn(e),Fn=(e,t,n)=>{const r=Tn(t)?t.split("."):t;let i=0;for(;i<r.length-1;){if(Mn(e))return{};const t=Pn(r[i]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return Mn(e)?{}:{obj:e,k:Pn(r[i])}},jn=(e,t,n)=>{const{obj:r,k:i}=Fn(e,t,Object);if(void 0!==r||1===t.length)return void(r[i]=n);let o=t[t.length-1],a=t.slice(0,t.length-1),s=Fn(e,a,Object);for(;void 0===s.obj&&a.length;)o=`${a[a.length-1]}.${o}`,a=a.slice(0,a.length-1),s=Fn(e,a,Object),s?.obj&&void 0!==s.obj[`${s.k}.${o}`]&&(s.obj=void 0);s.obj[`${s.k}.${o}`]=n},Dn=(e,t)=>{const{obj:n,k:r}=Fn(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},Rn=(e,t,n)=>{for(const r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?Tn(e[r])||e[r]instanceof String||Tn(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Rn(e[r],t[r],n):e[r]=t[r]);return e},Ln=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var zn={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const Nn=e=>Tn(e)?e.replace(/[&<>"'\/]/g,e=>zn[e]):e;const Bn=[" ",",","?","!",";"],Vn=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}(20),Un=(e,t,n=".")=>{if(!e)return;if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}const r=t.split(n);let i=e;for(let e=0;e<r.length;){if(!i||"object"!=typeof i)return;let t,o="";for(let a=e;a<r.length;++a)if(a!==e&&(o+=n),o+=r[a],t=i[o],void 0!==t){if(["string","number","boolean"].indexOf(typeof t)>-1&&a<r.length-1)continue;e+=a-e+1;break}i=t}return i},Hn=e=>e?.replace("_","-"),Wn={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class Yn{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||Wn,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,r){return r&&!this.debug?null:(Tn(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new Yn(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new Yn(this.logger,e)}}var $n=new Yn;class Gn{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);const n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e,...t){if(this.observers[e]){Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r<n;r++)e(...t)})}if(this.observers["*"]){Array.from(this.observers["*"].entries()).forEach(([n,r])=>{for(let i=0;i<r;i++)n.apply(n,[e,...t])})}}}class Xn extends Gn{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){const i=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,o=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,t],n&&(Array.isArray(n)?a.push(...n):Tn(n)&&i?a.push(...n.split(i)):a.push(n)));const s=Dn(this.data,a);return!s&&!t&&!n&&e.indexOf(".")>-1&&(e=a[0],t=a[1],n=a.slice(2).join(".")),!s&&o&&Tn(n)?Un(this.data?.[e]?.[t],n,i):s}addResource(e,t,n,r,i={silent:!1}){const o=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator;let a=[e,t];n&&(a=a.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(a=e.split("."),r=t,t=a[1]),this.addNamespaces(t),jn(this.data,a,r),i.silent||this.emit("added",e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(const r in n)(Tn(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,r,i,o={silent:!1,skipCopy:!1}){let a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),r=n,n=t,t=a[1]),this.addNamespaces(t);let s=Dn(this.data,a)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?Rn(s,n,i):s={...s,...n},jn(this.data,a,s),o.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var Kn={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,i)??t}),t}};const qn=Symbol("i18next/PATH_KEY");function Zn(e,t){const{[qn]:n}=e(function(){const e=[],t=Object.create(null);let n;return t.get=(r,i)=>(n?.revoke?.(),i===qn?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}());return n.join(t?.keySeparator??".")}const Jn={},Qn=e=>!Tn(e)&&"boolean"!=typeof e&&"number"!=typeof e;class er extends Gn{constructor(e,t={}){super(),((e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})})(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=$n.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const n={...t};if(null==e)return!1;const r=this.resolve(e,n);return void 0!==r?.res}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let i=t.ns||this.options.defaultNS||[];const o=n&&e.indexOf(n)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,n)=>{t=t||"",n=n||"";const r=Bn.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(0===r.length)return!0;const i=Vn.getRegExp(`(${r.map(e=>"?"===e?"\\?":e).join("|")})`);let o=!i.test(e);if(!o){const t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(o=!0)}return o})(e,n,r));if(o&&!a){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:Tn(i)?[i]:i};const o=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(o[0])>-1)&&(i=o.shift()),e=o.join(r)}return{key:e,namespaces:Tn(i)?[i]:i}}translate(e,t,n){let r="object"==typeof t?{...t}:t;if("object"!=typeof r&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof r&&(r={...r}),r||(r={}),null==e)return"";"function"==typeof e&&(e=Zn(e,{...this.options,...r})),Array.isArray(e)||(e=[String(e)]);const i=void 0!==r.returnDetails?r.returnDetails:this.options.returnDetails,o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,{key:a,namespaces:s}=this.extractFromKey(e[e.length-1],r),l=s[s.length-1];let c=void 0!==r.nsSeparator?r.nsSeparator:this.options.nsSeparator;void 0===c&&(c=":");const u=r.lng||this.language,h=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===u?.toLowerCase())return h?i?{res:`${l}${c}${a}`,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:`${l}${c}${a}`:i?{res:a,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:a;const d=this.resolve(e,r);let f=d?.res;const p=d?.usedKey||a,g=d?.exactUsedKey||a,m=void 0!==r.joinArrays?r.joinArrays:this.options.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject,b=void 0!==r.count&&!Tn(r.count),y=er.hasDefaultValue(r),w=b?this.pluralResolver.getSuffix(u,r.count,r):"",x=r.ordinal&&b?this.pluralResolver.getSuffix(u,r.count,{ordinal:!1}):"",C=b&&!r.ordinal&&0===r.count,_=C&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${w}`]||r[`defaultValue${x}`]||r.defaultValue;let S=f;v&&!f&&y&&(S=_);const A=Qn(S),k=Object.prototype.toString.apply(S);if(!(v&&S&&A&&["[object Number]","[object Function]","[object RegExp]"].indexOf(k)<0)||Tn(m)&&Array.isArray(S))if(v&&Tn(m)&&Array.isArray(f))f=f.join(m),f&&(f=this.extendTranslation(f,e,r,n));else{let t=!1,i=!1;!this.isValidLookup(f)&&y&&(t=!0,f=_),this.isValidLookup(f)||(i=!0,f=a);const s=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&i?void 0:f,h=y&&_!==f&&this.options.updateMissing;if(i||t||h){if(this.logger.log(h?"updateKey":"missingKey",u,l,a,h?_:f),o){const e=this.resolve(a,{...r,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[];const t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if("fallback"===this.options.saveMissingTo&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(r.lng||this.language):e.push(r.lng||this.language);const n=(e,t,n)=>{const i=y&&n!==f?n:s;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,i,h,r):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,i,h,r),this.emit("missingKey",e,l,t,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{const t=this.pluralResolver.getSuffixes(e,r);C&&r[`defaultValue${this.options.pluralSeparator}zero`]&&t.indexOf(`${this.options.pluralSeparator}zero`)<0&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],a+t,r[`defaultValue${t}`]||_)})}):n(e,a,_))}f=this.extendTranslation(f,e,r,d,n),i&&f===a&&this.options.appendNamespaceToMissingKey&&(f=`${l}${c}${a}`),(i||t)&&this.options.parseMissingKeyHandler&&(f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${c}${a}`:a,t?f:void 0,r))}else{if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,S,{...r,ns:s}):`key '${a} (${this.language})' returned an object instead of string.`;return i?(d.res=e,d.usedParams=this.getUsedParamsDetails(r),d):e}if(o){const e=Array.isArray(S),t=e?[]:{},n=e?g:p;for(const e in S)if(Object.prototype.hasOwnProperty.call(S,e)){const i=`${n}${o}${e}`;t[e]=y&&!f?this.translate(i,{...r,defaultValue:Qn(_)?_[e]:void 0,joinArrays:!1,ns:s}):this.translate(i,{...r,joinArrays:!1,ns:s}),t[e]===i&&(t[e]=S[e])}f=t}}return i?(d.res=f,d.usedParams=this.getUsedParamsDetails(r),d):f}extendTranslation(e,t,n,r,i){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const o=Tn(e)&&(void 0!==n?.interpolation?.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let a;if(o){const t=e.match(this.interpolator.nestingRegexp);a=t&&t.length}let s=n.replace&&!Tn(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),o){const t=e.match(this.interpolator.nestingRegexp);a<(t&&t.length)&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,(...e)=>i?.[0]!==e[0]||n.context?this.translate(...e,t):(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null),n)),n.interpolation&&this.interpolator.reset()}const o=n.postProcess||this.options.postProcess,a=Tn(o)?[o]:o;return null!=e&&a?.length&&!1!==n.applyPostProcessor&&(e=Kn.handle(a,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,i,o,a;return Tn(e)&&(e=[e]),e.forEach(e=>{if(this.isValidLookup(n))return;const s=this.extractFromKey(e,t),l=s.key;r=l;let c=s.namespaces;this.options.fallbackNS&&(c=c.concat(this.options.fallbackNS));const u=void 0!==t.count&&!Tn(t.count),h=u&&!t.ordinal&&0===t.count,d=void 0!==t.context&&(Tn(t.context)||"number"==typeof t.context)&&""!==t.context,f=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);c.forEach(e=>{this.isValidLookup(n)||(a=e,Jn[`${f[0]}-${e}`]||!this.utils?.hasLoadedNamespace||this.utils?.hasLoadedNamespace(a)||(Jn[`${f[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${f.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),f.forEach(r=>{if(this.isValidLookup(n))return;o=r;const a=[l];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(a,l,r,e,t);else{let e;u&&(e=this.pluralResolver.getSuffix(r,t.count,t));const n=`${this.options.pluralSeparator}zero`,i=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(t.ordinal&&0===e.indexOf(i)&&a.push(l+e.replace(i,this.options.pluralSeparator)),a.push(l+e),h&&a.push(l+n)),d){const r=`${l}${this.options.contextSeparator||"_"}${t.context}`;a.push(r),u&&(t.ordinal&&0===e.indexOf(i)&&a.push(r+e.replace(i,this.options.pluralSeparator)),a.push(r+e),h&&a.push(r+n))}}let s;for(;s=a.pop();)this.isValidLookup(n)||(i=s,n=this.getResource(r,e,s,t))}))})}),{res:n,usedKey:r,exactUsedKey:i,usedLng:o,usedNS:a}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!Tn(e.replace);let r=n?e.replace:e;if(n&&void 0!==e.count&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(const e of t)delete r[e]}return r}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,12)&&void 0!==e[n])return!0;return!1}}class tr{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=$n.create("languageUtils")}getScriptPartFromCode(e){if(!(e=Hn(e))||e.indexOf("-")<0)return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=Hn(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(Tn(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch(e){}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;const n=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(n)||(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;const n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;const r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>e===r?e:e.indexOf("-")<0&&r.indexOf("-")<0?void 0:e.indexOf("-")>0&&r.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===r||0===e.indexOf(r)&&r.length>1?e:void 0)}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),Tn(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes((!1===t?[]:t)||this.options.fallbackLng||[],e),r=[],i=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return Tn(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(e))):Tn(e)&&i(this.formatLanguageCode(e)),n.forEach(e=>{r.indexOf(e)<0&&i(this.formatLanguageCode(e))}),r}}const nr={zero:0,one:1,two:2,few:3,many:4,other:5},rr={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class ir{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=$n.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const n=Hn("dev"===e?"en":e),r=t.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let o;try{o=new Intl.PluralRules(n,{type:r})}catch(n){if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),rr;if(!e.match(/-|_/))return rr;const r=this.languageUtils.getLanguagePartFromCode(e);o=this.getRule(r,t)}return this.pluralRulesCache[i]=o,o}needsPlural(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?n.resolvedOptions().pluralCategories.sort((e,t)=>nr[e]-nr[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):[]}getSuffix(e,t,n={}){const r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,n))}}const or=(e,t,n,r=".",i=!0)=>{let o=((e,t,n)=>{const r=Dn(e,n);return void 0!==r?r:Dn(t,n)})(e,t,n);return!o&&i&&Tn(n)&&(o=Un(e,n,r),void 0===o&&(o=Un(t,n,r))),o},ar=e=>e.replace(/\$/g,"$$$$");class sr{constructor(e={}){this.logger=$n.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:o,suffix:a,suffixEscaped:s,formatSeparator:l,unescapeSuffix:c,unescapePrefix:u,nestingPrefix:h,nestingPrefixEscaped:d,nestingSuffix:f,nestingSuffixEscaped:p,nestingOptionsSeparator:g,maxReplaces:m,alwaysFormat:v}=e.interpolation;this.escape=void 0!==t?t:Nn,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==r&&r,this.prefix=i?Ln(i):o||"{{",this.suffix=a?Ln(a):s||"}}",this.formatSeparator=l||",",this.unescapePrefix=c?"":u||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=h?Ln(h):d||Ln("$t("),this.nestingSuffix=f?Ln(f):p||Ln(")"),this.nestingOptionsSeparator=g||",",this.maxReplaces=m||1e3,this.alwaysFormat=void 0!==v&&v,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let i,o,a;const s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=e=>{if(e.indexOf(this.formatSeparator)<0){const i=or(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...r,...t,interpolationkey:e}):i}const i=e.split(this.formatSeparator),o=i.shift().trim(),a=i.join(this.formatSeparator).trim();return this.format(or(t,s,o,this.options.keySeparator,this.options.ignoreJSONStructure),a,n,{...r,...t,interpolationkey:o})};this.resetRegExp();const c=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,u=void 0!==r?.interpolation?.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>ar(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?ar(this.escape(e)):ar(e)}].forEach(t=>{for(a=0;i=t.regex.exec(e);){const n=i[1].trim();if(o=l(n),void 0===o)if("function"==typeof c){const t=c(e,i,r);o=Tn(t)?t:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))o="";else{if(u){o=i[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),o=""}else Tn(o)||this.useRawValueToEscape||(o=On(o));const s=t.safeValue(o);if(e=e.replace(i[0],s),u?(t.regex.lastIndex+=o.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,i,o;const a=(e,t)=>{const n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;const r=e.split(new RegExp(`${n}[ ]*{`));let i=`{${r[1]}`;e=r[0],i=this.interpolate(i,o);const a=i.match(/'/g),s=i.match(/"/g);((a?.length??0)%2==0&&!s||s.length%2!=0)&&(i=i.replace(/'/g,'"'));try{o=JSON.parse(i),t&&(o={...t,...o})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];o={...n},o=o.replace&&!Tn(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;const l=/{.*}/.test(r[1])?r[1].lastIndexOf("}")+1:r[1].indexOf(this.formatSeparator);if(-1!==l&&(s=r[1].slice(l).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,l)),i=t(a.call(this,r[1].trim(),o),o),i&&r[0]===e&&!Tn(i))return i;Tn(i)||(i=On(i)),i||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),i=""),s.length&&(i=s.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),i.trim())),e=e.replace(r[0],i),this.regexp.lastIndex=0}return e}}const lr=e=>{const t={};return(n,r,i)=>{let o=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(o={...o,[i.interpolationkey]:void 0});const a=r+JSON.stringify(o);let s=t[a];return s||(s=e(Hn(r),i),t[a]=s),s(n)}},cr=e=>(t,n,r)=>e(Hn(n),r)(t);class ur{constructor(e={}){this.logger=$n.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const n=t.cacheInBuiltFormats?lr:cr;this.formats={number:n((e,t)=>{const n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{const n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)}),datetime:n((e,t)=>{const n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{const n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")}),list:n((e,t)=>{const n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=lr(t)}format(e,t,n,r={}){const i=t.split(this.formatSeparator);if(i.length>1&&i[0].indexOf("(")>1&&i[0].indexOf(")")<0&&i.find(e=>e.indexOf(")")>-1)){const e=i.findIndex(e=>e.indexOf(")")>-1);i[0]=[i[0],...i.splice(1,e)].join(this.formatSeparator)}const o=i.reduce((e,t)=>{const{formatName:i,formatOptions:o}=(e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const i=r[1].substring(0,r[1].length-1);"currency"===t&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):"relativetime"===t&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach(e=>{if(e){const[t,...r]=e.split(":"),i=r.join(":").trim().replace(/^'+|'+$/g,""),o=t.trim();n[o]||(n[o]=i),"false"===i&&(n[o]=!1),"true"===i&&(n[o]=!0),isNaN(i)||(n[o]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}})(t);if(this.formats[i]){let t=e;try{const a=r?.formatParams?.[r.interpolationkey]||{},s=a.locale||a.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...o,...r,...a})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${i}`),e},e);return o}}class hr extends Gn{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=$n.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){const i={},o={},a={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{const a=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[a]=2:this.state[a]<0||(1===this.state[a]?void 0===o[a]&&(o[a]=!0):(this.state[a]=1,r=!1,void 0===o[a]&&(o[a]=!0),void 0===i[a]&&(i[a]=!0),void 0===s[t]&&(s[t]=!0)))}),r||(a[e]=!0)}),(Object.keys(i).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(o),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){const r=e.split("|"),i=r[0],o=r[1];t&&this.emit("failedLoading",i,o,t),!t&&n&&this.store.addResourceBundle(i,o,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const a={};this.queue.forEach(n=>{((e,t,n)=>{const{obj:r,k:i}=Fn(e,t,Object);r[i]=r[i]||[],r[i].push(n)})(n.loaded,[i],o),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach(e=>{a[e]||(a[e]={});const t=n.loaded[e];t.length&&t.forEach(t=>{void 0===a[e][t]&&(a[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,i=this.retryTimeout,o){if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:o});this.readingCalls++;const a=(a,s)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}a&&s&&r<this.maxRetries?setTimeout(()=>{this.read.call(this,e,t,n,r+1,2*i,o)},i):o(a,s)},s=this.backend[n].bind(this.backend);if(2!==s.length)return s(e,t,a);try{const n=s(e,t);n&&"function"==typeof n.then?n.then(e=>a(null,e)).catch(a):a(null,n)}catch(e){a(e)}}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();Tn(e)&&(e=this.languageUtils.toResolveHierarchy(e)),Tn(t)&&(t=[t]);const i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=""){const n=e.split("|"),r=n[0],i=n[1];this.read(r,i,"read",void 0,void 0,(n,o)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&o&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,o),this.loaded(e,n,o)})}saveMissing(e,t,n,r,i,o={},a=()=>{}){if(!this.services?.utils?.hasLoadedNamespace||this.services?.utils?.hasLoadedNamespace(t)){if(null!=n&&""!==n){if(this.backend?.create){const s={...o,isUpdate:i},l=this.backend.create.bind(this.backend);if(l.length<6)try{let i;i=5===l.length?l(e,t,n,r,s):l(e,t,n,r),i&&"function"==typeof i.then?i.then(e=>a(null,e)).catch(a):a(null,i)}catch(e){a(e)}else l(e,t,n,r,a,s)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}else this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")}}const dr=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),Tn(e[1])&&(t.defaultValue=e[1]),Tn(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),fr=e=>(Tn(e.ns)&&(e.ns=[e.ns]),Tn(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Tn(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),"boolean"==typeof e.initImmediate&&(e.initAsync=e.initImmediate),e),pr=()=>{};class gr extends Gn{constructor(e={},t){var n;if(super(),this.options=fr(e),this.services={},this.logger=$n,this.modules={external:[]},n=this,Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(e=>{"function"==typeof n[e]&&(n[e]=n[e].bind(n))}),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,"function"==typeof e&&(t=e,e={}),null==e.defaultNS&&e.ns&&(Tn(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const n=dr();this.options={...n,...this.options,...fr(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},void 0!==e.keySeparator&&(this.options.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(this.options.userDefinedNsSeparator=e.nsSeparator);const r=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let e;this.modules.logger?$n.init(r(this.modules.logger),this.options):$n.init(null,this.options),e=this.modules.formatter?this.modules.formatter:ur;const t=new tr(this.options);this.store=new Xn(this.options.resources,this.options);const i=this.services;i.logger=$n,i.resourceStore=this.store,i.languageUtils=t,i.pluralResolver=new ir(t,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix});this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),!e||this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format||(i.formatter=r(e),i.formatter.init&&i.formatter.init(i,this.options),this.options.interpolation.format=i.formatter.format.bind(i.formatter)),i.interpolator=new sr(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new hr(r(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(i.languageDetector=r(this.modules.languageDetector),i.languageDetector.init&&i.languageDetector.init(i,this.options.detection,this.options)),this.modules.i18nFormat&&(i.i18nFormat=r(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new er(this.services,this.options),this.translator.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||(t=pr),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(e=>{this[e]=(...t)=>this.store[e](...t)});["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});const i=In(),o=()=>{const e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),i.resolve(n),t(e,n)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?o():setTimeout(o,0),i}loadResources(e,t=pr){let n=t;const r=Tn(e)?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if("cimode"===r?.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return n();const e=[],t=t=>{if(!t)return;if("cimode"===t)return;this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)})};if(r)t(r);else{this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e))}this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){const r=In();return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=pr),this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&Kn.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1)){for(let e=0;e<this.languages.length;e++){const t=this.languages[e];if(!(["cimode","dev"].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;const n=In();this.emit("languageChanging",e);const r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(i,o)=>{o?this.isLanguageChangingTo===e&&(r(o),this.translator.changeLanguage(o),this.isLanguageChangingTo=void 0,this.emit("languageChanged",o),this.logger.log("languageChanged",o)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(i,(...e)=>this.t(...e))},o=t=>{e||t||!this.services.languageDetector||(t=[]);const n=Tn(t)?t:t&&t[0],o=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(Tn(t)?[t]:t);o&&(this.language||r(o),this.translator.language||this.translator.changeLanguage(o),this.services.languageDetector?.cacheUserLanguage?.(o)),this.loadResources(o,e=>{i(e,o)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(e):o(this.services.languageDetector.detect()),n}getFixedT(e,t,n){const r=(e,t,...i)=>{let o;o="object"!=typeof t?this.options.overloadTranslationOptionHandler([e,t].concat(i)):{...t},o.lng=o.lng||r.lng,o.lngs=o.lngs||r.lngs,o.ns=o.ns||r.ns,""!==o.keyPrefix&&(o.keyPrefix=o.keyPrefix||n||r.keyPrefix);const a=this.options.keySeparator||".";let s;return o.keyPrefix&&Array.isArray(e)?s=e.map(e=>("function"==typeof e&&(e=Zn(e,{...this.options,...t})),`${o.keyPrefix}${a}${e}`)):("function"==typeof e&&(e=Zn(e,{...this.options,...t})),s=o.keyPrefix?`${o.keyPrefix}${a}${e}`:e),this.t(s,o)};return Tn(e)?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=n,r}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;const o=(e,t)=>{const n=this.services.backendConnector.state[`${e}|${t}`];return-1===n||0===n||2===n};if(t.precheck){const e=t.precheck(this,o);if(void 0!==e)return e}return!!this.hasResourceBundle(n,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!o(n,e)||r&&!o(i,e)))}loadNamespaces(e,t){const n=In();return this.options.ns?(Tn(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=In();Tn(e)&&(e=[e]);const r=this.options.preload||[],i=e.filter(e=>r.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return i.length?(this.options.preload=r.concat(i),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";try{const t=new Intl.Locale(e);if(t&&t.getTextInfo){const e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch(e){}const t=this.services?.languageUtils||new tr(dr());return e.toLowerCase().indexOf("-latn")>1?"ltr":["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){return new gr(e,t)}cloneInstance(e={},t=pr){const n=e.forkResourceStore;n&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},i=new gr(r);void 0===e.debug&&void 0===e.prefix||(i.logger=i.logger.clone(e));if(["store","services","language"].forEach(e=>{i[e]=this[e]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},n){const e=Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{});i.store=new Xn(e,r),i.services.resourceStore=i.store}return i.translator=new er(i.services,r),i.translator.on("*",(e,...t)=>{i.emit(e,...t)}),i.init(r,t),i.translator.options=r,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const mr=gr.createInstance();mr.createInstance=gr.createInstance,mr.createInstance,mr.dir,mr.init,mr.loadResources,mr.reloadResources,mr.use,mr.changeLanguage,mr.getFixedT,mr.t,mr.exists,mr.setDefaultNamespace,mr.hasLoadedNamespace,mr.loadNamespaces,mr.loadLanguages;var vr,br,yr,wr,xr,Cr={};function _r(){if(br)return vr;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,n(i.key),i)}}function n(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function r(e,t){return function(e,t){if(t.get)return t.get.call(e);return t.value}(e,o(e,t,"get"))}function i(e,t,n){return function(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}(e,o(e,t,"set"),n),n}function o(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function a(e,t,n){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,n)}br=1;var s=function(t){if(!t)return[];Array.isArray(t)||(t=[t]);for(var n={},r=0;r<t.length;++r){var i,o=t[r];if(o&&"object"===e(o)&&(o=String(o)),"string"!=typeof o){var a="Locales should be strings, ".concat(JSON.stringify(o)," isn't.");throw new TypeError(a)}var s=o.split("-");if(!s.every(function(e){return/[a-z0-9]+/i.test(e)})){var l=JSON.stringify(o),c="The locale ".concat(l," is not a structurally valid BCP 47 language tag.");throw new RangeError(c)}var u=s[0].toLowerCase();s[0]=null!==(i={in:"id",iw:"he",ji:"yi"}[u])&&void 0!==i?i:u,n[s.join("-")]=!0}return Object.keys(n)};function l(t){switch(e(t)){case"number":return t;case"bigint":throw new TypeError("Cannot convert a BigInt value to a number");default:return Number(t)}}return vr=function(e,n,o,c){var u=function(e){do{if(n(e))return e;e=e.replace(/-?[^-]*$/,"")}while(e);return null},h=new WeakMap,d=new WeakMap,f=new WeakMap,p=new WeakMap,g=new WeakMap,m=function(){function m(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,m),a(this,h,{writable:!0,value:void 0}),a(this,d,{writable:!0,value:void 0}),a(this,f,{writable:!0,value:void 0}),a(this,p,{writable:!0,value:void 0}),a(this,g,{writable:!0,value:void 0}),i(this,h,function(t){for(var n=s(t),r=0;r<n.length;++r){var i=u(n[r]);if(i)return i}var o=(new e).resolvedOptions().locale;return u(o)}(t)),i(this,f,n(r(this,h))),i(this,d,c(r(this,h))),i(this,p,function(e){var t=Object.prototype.hasOwnProperty.call(e,"type")&&e.type;if(!t)return"cardinal";if("cardinal"===t||"ordinal"===t)return t;throw new RangeError("Not a valid plural type: "+JSON.stringify(t))}(o)),i(this,g,new e("en",o))}var v,b,y;return v=m,y=[{key:"supportedLocalesOf",value:function(e){return s(e).filter(u)}}],(b=[{key:"resolvedOptions",value:function(){var e=r(this,g).resolvedOptions(),t=e.minimumIntegerDigits,n=e.minimumFractionDigits,i=e.maximumFractionDigits,a=e.minimumSignificantDigits,s=e.maximumSignificantDigits,l=e.roundingPriority,c={locale:r(this,h),type:r(this,p),minimumIntegerDigits:t,minimumFractionDigits:n,maximumFractionDigits:i};return"number"==typeof a&&(c.minimumSignificantDigits=a,c.maximumSignificantDigits=s),c.pluralCategories=o(r(this,h),"ordinal"===r(this,p)).slice(0),c.roundingPriority=l||"auto",c}},{key:"select",value:function(e){if(!(this instanceof m))throw new TypeError("select() called on incompatible ".concat(this));if("number"!=typeof e&&(e=Number(e)),!isFinite(e))return"other";var t=r(this,g).format(Math.abs(e));return r(this,f).call(this,t,"ordinal"===r(this,p))}},{key:"selectRange",value:function(e,t){if(!(this instanceof m))throw new TypeError("selectRange() called on incompatible ".concat(this));if(void 0===e)throw new TypeError("start is undefined");if(void 0===t)throw new TypeError("end is undefined");var n=l(e),i=l(t);if(!isFinite(n))throw new RangeError("start must be finite");if(!isFinite(i))throw new RangeError("end must be finite");return r(this,d).call(this,this.select(n),this.select(i))}}])&&t(v.prototype,b),y&&t(v,y),Object.defineProperty(v,"prototype",{writable:!1}),m}();return"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(m.prototype,Symbol.toStringTag,{value:"Intl.PluralRules",writable:!1,configurable:!0}),Object.defineProperty(m,"prototype",{writable:!1}),m},vr}!function(){if(xr)return Cr;xr=1;var e=function(){if(wr)return yr;function e(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function t(e,t){return t.forEach(function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach(function(n){if("default"!==n&&!(n in e)){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}})}),Object.freeze(e)}wr=1;var n=e(_r());function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==cn||"undefined"!=typeof self&&self;var i={exports:{}};!function(e){var t=function(e,t){return t?"other":1==e?"one":"other"},n=function(e,t){return t?"other":0==e||1==e?"one":"other"},r=function(e,t){return t?"other":e>=0&&e<=1?"one":"other"},i=function(e,t){var n=!String(e).split(".")[1];return t?"other":1==e&&n?"one":"other"},o=function(e,t){return"other"},a=function(e,t){return t?"other":1==e?"one":2==e?"two":"other"};!function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),e.exports=n}(0,{af:t,ak:n,am:r,an:t,ar:function(e,t){var n=String(e).split("."),r=Number(n[0])==e&&n[0].slice(-2);return t?"other":0==e?"zero":1==e?"one":2==e?"two":r>=3&&r<=10?"few":r>=11&&r<=99?"many":"other"},ars:function(e,t){var n=String(e).split("."),r=Number(n[0])==e&&n[0].slice(-2);return t?"other":0==e?"zero":1==e?"one":2==e?"two":r>=3&&r<=10?"few":r>=11&&r<=99?"many":"other"},as:function(e,t){return t?1==e||5==e||7==e||8==e||9==e||10==e?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":e>=0&&e<=1?"one":"other"},asa:t,ast:i,az:function(e,t){var n=String(e).split(".")[0],r=n.slice(-1),i=n.slice(-2),o=n.slice(-3);return t?1==r||2==r||5==r||7==r||8==r||20==i||50==i||70==i||80==i?"one":3==r||4==r||100==o||200==o||300==o||400==o||500==o||600==o||700==o||800==o||900==o?"few":0==n||6==r||40==i||60==i||90==i?"many":"other":1==e?"one":"other"},bal:function(e,t){return 1==e?"one":"other"},be:function(e,t){var n=String(e).split("."),r=Number(n[0])==e,i=r&&n[0].slice(-1),o=r&&n[0].slice(-2);return t?2!=i&&3!=i||12==o||13==o?"other":"few":1==i&&11!=o?"one":i>=2&&i<=4&&(o<12||o>14)?"few":r&&0==i||i>=5&&i<=9||o>=11&&o<=14?"many":"other"},bem:t,bez:t,bg:t,bho:n,bm:o,bn:function(e,t){return t?1==e||5==e||7==e||8==e||9==e||10==e?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":e>=0&&e<=1?"one":"other"},bo:o,br:function(e,t){var n=String(e).split("."),r=Number(n[0])==e,i=r&&n[0].slice(-1),o=r&&n[0].slice(-2),a=r&&n[0].slice(-6);return t?"other":1==i&&11!=o&&71!=o&&91!=o?"one":2==i&&12!=o&&72!=o&&92!=o?"two":(3==i||4==i||9==i)&&(o<10||o>19)&&(o<70||o>79)&&(o<90||o>99)?"few":0!=e&&r&&0==a?"many":"other"},brx:t,bs:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-1),s=r.slice(-2),l=i.slice(-1),c=i.slice(-2);return t?"other":o&&1==a&&11!=s||1==l&&11!=c?"one":o&&a>=2&&a<=4&&(s<12||s>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"},ca:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-6);return t?1==e||3==e?"one":2==e?"two":4==e?"few":"other":1==e&&i?"one":0!=r&&0==o&&i?"many":"other"},ce:t,ceb:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-1),s=i.slice(-1);return t?"other":o&&(1==r||2==r||3==r)||o&&4!=a&&6!=a&&9!=a||!o&&4!=s&&6!=s&&9!=s?"one":"other"},cgg:t,chr:t,ckb:t,cs:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1];return t?"other":1==e&&i?"one":r>=2&&r<=4&&i?"few":i?"other":"many"},cy:function(e,t){return t?0==e||7==e||8==e||9==e?"zero":1==e?"one":2==e?"two":3==e||4==e?"few":5==e||6==e?"many":"other":0==e?"zero":1==e?"one":2==e?"two":3==e?"few":6==e?"many":"other"},da:function(e,t){var n=String(e).split("."),r=n[0],i=Number(n[0])==e;return t||1!=e&&(i||0!=r&&1!=r)?"other":"one"},de:i,doi:r,dsb:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-2),s=i.slice(-2);return t?"other":o&&1==a||1==s?"one":o&&2==a||2==s?"two":o&&(3==a||4==a)||3==s||4==s?"few":"other"},dv:t,dz:o,ee:t,el:t,en:function(e,t){var n=String(e).split("."),r=!n[1],i=Number(n[0])==e,o=i&&n[0].slice(-1),a=i&&n[0].slice(-2);return t?1==o&&11!=a?"one":2==o&&12!=a?"two":3==o&&13!=a?"few":"other":1==e&&r?"one":"other"},eo:t,es:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-6);return t?"other":1==e?"one":0!=r&&0==o&&i?"many":"other"},et:i,eu:t,fa:r,ff:function(e,t){return t?"other":e>=0&&e<2?"one":"other"},fi:i,fil:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-1),s=i.slice(-1);return t?1==e?"one":"other":o&&(1==r||2==r||3==r)||o&&4!=a&&6!=a&&9!=a||!o&&4!=s&&6!=s&&9!=s?"one":"other"},fo:t,fr:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-6);return t?1==e?"one":"other":e>=0&&e<2?"one":0!=r&&0==o&&i?"many":"other"},fur:t,fy:i,ga:function(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?1==e?"one":"other":1==e?"one":2==e?"two":r&&e>=3&&e<=6?"few":r&&e>=7&&e<=10?"many":"other"},gd:function(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?1==e||11==e?"one":2==e||12==e?"two":3==e||13==e?"few":"other":1==e||11==e?"one":2==e||12==e?"two":r&&e>=3&&e<=10||r&&e>=13&&e<=19?"few":"other"},gl:i,gsw:t,gu:function(e,t){return t?1==e?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":e>=0&&e<=1?"one":"other"},guw:n,gv:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-1),a=r.slice(-2);return t?"other":i&&1==o?"one":i&&2==o?"two":!i||0!=a&&20!=a&&40!=a&&60!=a&&80!=a?i?"other":"many":"few"},ha:t,haw:t,he:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1];return t?"other":1==r&&i||0==r&&!i?"one":2==r&&i?"two":"other"},hi:function(e,t){return t?1==e?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":e>=0&&e<=1?"one":"other"},hnj:o,hr:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-1),s=r.slice(-2),l=i.slice(-1),c=i.slice(-2);return t?"other":o&&1==a&&11!=s||1==l&&11!=c?"one":o&&a>=2&&a<=4&&(s<12||s>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"},hsb:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-2),s=i.slice(-2);return t?"other":o&&1==a||1==s?"one":o&&2==a||2==s?"two":o&&(3==a||4==a)||3==s||4==s?"few":"other"},hu:function(e,t){return t?1==e||5==e?"one":"other":1==e?"one":"other"},hy:function(e,t){return t?1==e?"one":"other":e>=0&&e<2?"one":"other"},ia:i,id:o,ig:o,ii:o,io:i,is:function(e,t){var n=String(e).split("."),r=n[0],i=(n[1]||"").replace(/0+$/,""),o=Number(n[0])==e,a=r.slice(-1),s=r.slice(-2);return t?"other":o&&1==a&&11!=s||i%10==1&&i%100!=11?"one":"other"},it:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-6);return t?11==e||8==e||80==e||800==e?"many":"other":1==e&&i?"one":0!=r&&0==o&&i?"many":"other"},iu:a,ja:o,jbo:o,jgo:t,jmc:t,jv:o,jw:o,ka:function(e,t){var n=String(e).split(".")[0],r=n.slice(-2);return t?1==n?"one":0==n||r>=2&&r<=20||40==r||60==r||80==r?"many":"other":1==e?"one":"other"},kab:function(e,t){return t?"other":e>=0&&e<2?"one":"other"},kaj:t,kcg:t,kde:o,kea:o,kk:function(e,t){var n=String(e).split("."),r=Number(n[0])==e,i=r&&n[0].slice(-1);return t?6==i||9==i||r&&0==i&&0!=e?"many":"other":1==e?"one":"other"},kkj:t,kl:t,km:o,kn:r,ko:o,ks:t,ksb:t,ksh:function(e,t){return t?"other":0==e?"zero":1==e?"one":"other"},ku:t,kw:function(e,t){var n=String(e).split("."),r=Number(n[0])==e,i=r&&n[0].slice(-2),o=r&&n[0].slice(-3),a=r&&n[0].slice(-5),s=r&&n[0].slice(-6);return t?r&&e>=1&&e<=4||i>=1&&i<=4||i>=21&&i<=24||i>=41&&i<=44||i>=61&&i<=64||i>=81&&i<=84?"one":5==e||5==i?"many":"other":0==e?"zero":1==e?"one":2==i||22==i||42==i||62==i||82==i||r&&0==o&&(a>=1e3&&a<=2e4||4e4==a||6e4==a||8e4==a)||0!=e&&1e5==s?"two":3==i||23==i||43==i||63==i||83==i?"few":1==e||1!=i&&21!=i&&41!=i&&61!=i&&81!=i?"other":"many"},ky:t,lag:function(e,t){var n=String(e).split(".")[0];return t?"other":0==e?"zero":0!=n&&1!=n||0==e?"other":"one"},lb:t,lg:t,lij:function(e,t){var n=String(e).split("."),r=!n[1],i=Number(n[0])==e;return t?11==e||8==e||i&&e>=80&&e<=89||i&&e>=800&&e<=899?"many":"other":1==e&&r?"one":"other"},lkt:o,ln:n,lo:function(e,t){return t&&1==e?"one":"other"},lt:function(e,t){var n=String(e).split("."),r=n[1]||"",i=Number(n[0])==e,o=i&&n[0].slice(-1),a=i&&n[0].slice(-2);return t?"other":1==o&&(a<11||a>19)?"one":o>=2&&o<=9&&(a<11||a>19)?"few":0!=r?"many":"other"},lv:function(e,t){var n=String(e).split("."),r=n[1]||"",i=r.length,o=Number(n[0])==e,a=o&&n[0].slice(-1),s=o&&n[0].slice(-2),l=r.slice(-2),c=r.slice(-1);return t?"other":o&&0==a||s>=11&&s<=19||2==i&&l>=11&&l<=19?"zero":1==a&&11!=s||2==i&&1==c&&11!=l||2!=i&&1==c?"one":"other"},mas:t,mg:n,mgo:t,mk:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-1),s=r.slice(-2),l=i.slice(-1),c=i.slice(-2);return t?1==a&&11!=s?"one":2==a&&12!=s?"two":7!=a&&8!=a||17==s||18==s?"other":"many":o&&1==a&&11!=s||1==l&&11!=c?"one":"other"},ml:t,mn:t,mo:function(e,t){var n=String(e).split("."),r=!n[1],i=Number(n[0])==e&&n[0].slice(-2);return t?1==e?"one":"other":1==e&&r?"one":!r||0==e||1!=e&&i>=1&&i<=19?"few":"other"},mr:function(e,t){return t?1==e?"one":2==e||3==e?"two":4==e?"few":"other":1==e?"one":"other"},ms:function(e,t){return t&&1==e?"one":"other"},mt:function(e,t){var n=String(e).split("."),r=Number(n[0])==e&&n[0].slice(-2);return t?"other":1==e?"one":2==e?"two":0==e||r>=3&&r<=10?"few":r>=11&&r<=19?"many":"other"},my:o,nah:t,naq:a,nb:t,nd:t,ne:function(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?r&&e>=1&&e<=4?"one":"other":1==e?"one":"other"},nl:i,nn:t,nnh:t,no:t,nqo:o,nr:t,nso:n,ny:t,nyn:t,om:t,or:function(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?1==e||5==e||r&&e>=7&&e<=9?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":1==e?"one":"other"},os:t,osa:o,pa:n,pap:t,pcm:r,pl:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-1),a=r.slice(-2);return t?"other":1==e&&i?"one":i&&o>=2&&o<=4&&(a<12||a>14)?"few":i&&1!=r&&(0==o||1==o)||i&&o>=5&&o<=9||i&&a>=12&&a<=14?"many":"other"},prg:function(e,t){var n=String(e).split("."),r=n[1]||"",i=r.length,o=Number(n[0])==e,a=o&&n[0].slice(-1),s=o&&n[0].slice(-2),l=r.slice(-2),c=r.slice(-1);return t?"other":o&&0==a||s>=11&&s<=19||2==i&&l>=11&&l<=19?"zero":1==a&&11!=s||2==i&&1==c&&11!=l||2!=i&&1==c?"one":"other"},ps:t,pt:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-6);return t?"other":0==r||1==r?"one":0!=r&&0==o&&i?"many":"other"},pt_PT:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-6);return t?"other":1==e&&i?"one":0!=r&&0==o&&i?"many":"other"},rm:t,ro:function(e,t){var n=String(e).split("."),r=!n[1],i=Number(n[0])==e&&n[0].slice(-2);return t?1==e?"one":"other":1==e&&r?"one":!r||0==e||1!=e&&i>=1&&i<=19?"few":"other"},rof:t,ru:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-1),a=r.slice(-2);return t?"other":i&&1==o&&11!=a?"one":i&&o>=2&&o<=4&&(a<12||a>14)?"few":i&&0==o||i&&o>=5&&o<=9||i&&a>=11&&a<=14?"many":"other"},rwk:t,sah:o,saq:t,sat:a,sc:function(e,t){var n=!String(e).split(".")[1];return t?11==e||8==e||80==e||800==e?"many":"other":1==e&&n?"one":"other"},scn:function(e,t){var n=!String(e).split(".")[1];return t?11==e||8==e||80==e||800==e?"many":"other":1==e&&n?"one":"other"},sd:t,sdh:t,se:a,seh:t,ses:o,sg:o,sh:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-1),s=r.slice(-2),l=i.slice(-1),c=i.slice(-2);return t?"other":o&&1==a&&11!=s||1==l&&11!=c?"one":o&&a>=2&&a<=4&&(s<12||s>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"},shi:function(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?"other":e>=0&&e<=1?"one":r&&e>=2&&e<=10?"few":"other"},si:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"";return t?"other":0==e||1==e||0==r&&1==i?"one":"other"},sk:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1];return t?"other":1==e&&i?"one":r>=2&&r<=4&&i?"few":i?"other":"many"},sl:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-2);return t?"other":i&&1==o?"one":i&&2==o?"two":i&&(3==o||4==o)||!i?"few":"other"},sma:a,smi:a,smj:a,smn:a,sms:a,sn:t,so:t,sq:function(e,t){var n=String(e).split("."),r=Number(n[0])==e,i=r&&n[0].slice(-1),o=r&&n[0].slice(-2);return t?1==e?"one":4==i&&14!=o?"many":"other":1==e?"one":"other"},sr:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-1),s=r.slice(-2),l=i.slice(-1),c=i.slice(-2);return t?"other":o&&1==a&&11!=s||1==l&&11!=c?"one":o&&a>=2&&a<=4&&(s<12||s>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"},ss:t,ssy:t,st:t,su:o,sv:function(e,t){var n=String(e).split("."),r=!n[1],i=Number(n[0])==e,o=i&&n[0].slice(-1),a=i&&n[0].slice(-2);return t?1!=o&&2!=o||11==a||12==a?"other":"one":1==e&&r?"one":"other"},sw:i,syr:t,ta:t,te:t,teo:t,th:o,ti:n,tig:t,tk:function(e,t){var n=String(e).split("."),r=Number(n[0])==e&&n[0].slice(-1);return t?6==r||9==r||10==e?"few":"other":1==e?"one":"other"},tl:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-1),s=i.slice(-1);return t?1==e?"one":"other":o&&(1==r||2==r||3==r)||o&&4!=a&&6!=a&&9!=a||!o&&4!=s&&6!=s&&9!=s?"one":"other"},tn:t,to:o,tpi:o,tr:t,ts:t,tzm:function(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?"other":0==e||1==e||r&&e>=11&&e<=99?"one":"other"},ug:t,uk:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=Number(n[0])==e,a=o&&n[0].slice(-1),s=o&&n[0].slice(-2),l=r.slice(-1),c=r.slice(-2);return t?3==a&&13!=s?"few":"other":i&&1==l&&11!=c?"one":i&&l>=2&&l<=4&&(c<12||c>14)?"few":i&&0==l||i&&l>=5&&l<=9||i&&c>=11&&c<=14?"many":"other"},und:o,ur:i,uz:t,ve:t,vec:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-6);return t?11==e||8==e||80==e||800==e?"many":"other":1==e&&i?"one":0!=r&&0==o&&i?"many":"other"},vi:function(e,t){return t&&1==e?"one":"other"},vo:t,vun:t,wa:n,wae:t,wo:o,xh:t,xog:t,yi:i,yo:o,yue:o,zh:o,zu:r})}(i);var o=r(i.exports),a=t({__proto__:null,default:o},[i.exports]),s={exports:{}};!function(e){var t="zero",n="one",r="two",i="few",o="many",a="other",s={cardinal:[n,a],ordinal:[a]},l={cardinal:[n,a],ordinal:[n,a]},c={cardinal:[a],ordinal:[a]},u={cardinal:[n,r,a],ordinal:[a]};!function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),e.exports=n}(0,{af:s,ak:s,am:s,an:s,ar:{cardinal:[t,n,r,i,o,a],ordinal:[a]},ars:{cardinal:[t,n,r,i,o,a],ordinal:[a]},as:{cardinal:[n,a],ordinal:[n,r,i,o,a]},asa:s,ast:s,az:{cardinal:[n,a],ordinal:[n,i,o,a]},bal:l,be:{cardinal:[n,i,o,a],ordinal:[i,a]},bem:s,bez:s,bg:s,bho:s,bm:c,bn:{cardinal:[n,a],ordinal:[n,r,i,o,a]},bo:c,br:{cardinal:[n,r,i,o,a],ordinal:[a]},brx:s,bs:{cardinal:[n,i,a],ordinal:[a]},ca:{cardinal:[n,o,a],ordinal:[n,r,i,a]},ce:s,ceb:s,cgg:s,chr:s,ckb:s,cs:{cardinal:[n,i,o,a],ordinal:[a]},cy:{cardinal:[t,n,r,i,o,a],ordinal:[t,n,r,i,o,a]},da:s,de:s,doi:s,dsb:{cardinal:[n,r,i,a],ordinal:[a]},dv:s,dz:c,ee:s,el:s,en:{cardinal:[n,a],ordinal:[n,r,i,a]},eo:s,es:{cardinal:[n,o,a],ordinal:[a]},et:s,eu:s,fa:s,ff:s,fi:s,fil:l,fo:s,fr:{cardinal:[n,o,a],ordinal:[n,a]},fur:s,fy:s,ga:{cardinal:[n,r,i,o,a],ordinal:[n,a]},gd:{cardinal:[n,r,i,a],ordinal:[n,r,i,a]},gl:s,gsw:s,gu:{cardinal:[n,a],ordinal:[n,r,i,o,a]},guw:s,gv:{cardinal:[n,r,i,o,a],ordinal:[a]},ha:s,haw:s,he:u,hi:{cardinal:[n,a],ordinal:[n,r,i,o,a]},hnj:c,hr:{cardinal:[n,i,a],ordinal:[a]},hsb:{cardinal:[n,r,i,a],ordinal:[a]},hu:l,hy:l,ia:s,id:c,ig:c,ii:c,io:s,is:s,it:{cardinal:[n,o,a],ordinal:[o,a]},iu:u,ja:c,jbo:c,jgo:s,jmc:s,jv:c,jw:c,ka:{cardinal:[n,a],ordinal:[n,o,a]},kab:s,kaj:s,kcg:s,kde:c,kea:c,kk:{cardinal:[n,a],ordinal:[o,a]},kkj:s,kl:s,km:c,kn:s,ko:c,ks:s,ksb:s,ksh:{cardinal:[t,n,a],ordinal:[a]},ku:s,kw:{cardinal:[t,n,r,i,o,a],ordinal:[n,o,a]},ky:s,lag:{cardinal:[t,n,a],ordinal:[a]},lb:s,lg:s,lij:{cardinal:[n,a],ordinal:[o,a]},lkt:c,ln:s,lo:{cardinal:[a],ordinal:[n,a]},lt:{cardinal:[n,i,o,a],ordinal:[a]},lv:{cardinal:[t,n,a],ordinal:[a]},mas:s,mg:s,mgo:s,mk:{cardinal:[n,a],ordinal:[n,r,o,a]},ml:s,mn:s,mo:{cardinal:[n,i,a],ordinal:[n,a]},mr:{cardinal:[n,a],ordinal:[n,r,i,a]},ms:{cardinal:[a],ordinal:[n,a]},mt:{cardinal:[n,r,i,o,a],ordinal:[a]},my:c,nah:s,naq:u,nb:s,nd:s,ne:l,nl:s,nn:s,nnh:s,no:s,nqo:c,nr:s,nso:s,ny:s,nyn:s,om:s,or:{cardinal:[n,a],ordinal:[n,r,i,o,a]},os:s,osa:c,pa:s,pap:s,pcm:s,pl:{cardinal:[n,i,o,a],ordinal:[a]},prg:{cardinal:[t,n,a],ordinal:[a]},ps:s,pt:{cardinal:[n,o,a],ordinal:[a]},pt_PT:{cardinal:[n,o,a],ordinal:[a]},rm:s,ro:{cardinal:[n,i,a],ordinal:[n,a]},rof:s,ru:{cardinal:[n,i,o,a],ordinal:[a]},rwk:s,sah:c,saq:s,sat:u,sc:{cardinal:[n,a],ordinal:[o,a]},scn:{cardinal:[n,a],ordinal:[o,a]},sd:s,sdh:s,se:u,seh:s,ses:c,sg:c,sh:{cardinal:[n,i,a],ordinal:[a]},shi:{cardinal:[n,i,a],ordinal:[a]},si:s,sk:{cardinal:[n,i,o,a],ordinal:[a]},sl:{cardinal:[n,r,i,a],ordinal:[a]},sma:u,smi:u,smj:u,smn:u,sms:u,sn:s,so:s,sq:{cardinal:[n,a],ordinal:[n,o,a]},sr:{cardinal:[n,i,a],ordinal:[a]},ss:s,ssy:s,st:s,su:c,sv:l,sw:s,syr:s,ta:s,te:s,teo:s,th:c,ti:s,tig:s,tk:{cardinal:[n,a],ordinal:[i,a]},tl:l,tn:s,to:c,tpi:c,tr:s,ts:s,tzm:s,ug:s,uk:{cardinal:[n,i,o,a],ordinal:[i,a]},und:c,ur:s,uz:s,ve:s,vec:{cardinal:[n,o,a],ordinal:[o,a]},vi:{cardinal:[a],ordinal:[n,a]},vo:s,vun:s,wa:s,wae:s,wo:c,xh:s,xog:s,yi:s,yo:c,yue:c,zh:c,zu:s})}(s);var l=r(s.exports),c=t({__proto__:null,default:l},[s.exports]),u={exports:{}};!function(e){var t,n=function(e,t){return"other"},r=function(e,t){return"other"===e&&"one"===t?"one":"other"},i=function(e,t){return t||"other"};t={af:n,ak:r,am:i,an:n,ar:function(e,t){return"few"===t?"few":"many"===t?"many":"zero"===e&&"one"===t||"zero"===e&&"two"===t?"zero":"other"},as:i,az:i,be:i,bg:n,bn:i,bs:i,ca:n,cs:i,cy:i,da:i,de:i,el:i,en:n,es:n,et:n,eu:n,fa:r,fi:n,fil:i,fr:i,ga:i,gl:i,gsw:i,gu:i,he:n,hi:i,hr:i,hu:i,hy:i,ia:n,id:n,io:n,is:i,it:i,ja:n,ka:function(e,t){return e||"other"},kk:i,km:n,kn:i,ko:n,ky:i,lij:i,lo:n,lt:i,lv:function(e,t){return"one"===t?"one":"other"},mk:n,ml:i,mn:i,mr:i,ms:n,my:n,nb:n,ne:i,nl:i,no:n,or:r,pa:i,pcm:n,pl:i,ps:i,pt:i,ro:function(e,t){return"few"===t||"one"===t?"few":"other"},ru:i,sc:i,scn:i,sd:r,si:function(e,t){return"one"===e&&"one"===t?"one":"other"},sk:i,sl:function(e,t){return"few"===t||"one"===t?"few":"two"===t?"two":"other"},sq:i,sr:i,sv:n,sw:i,ta:i,te:i,th:n,tk:i,tr:i,ug:i,uk:i,ur:n,uz:i,vi:n,yue:n,zh:n,zu:i},Object.defineProperty(t,"__esModule",{value:!0}),e.exports=t}(u);var h=r(u.exports),d=o||a,f=l||c,p=h||t({__proto__:null,default:h},[u.exports]),g=function(e){return"pt-PT"===e?"pt_PT":e},m=n.default(Intl.NumberFormat,function(e){return d[g(e)]},function(e,t){return f[g(e)][t?"ordinal":"cardinal"]},function(e){return p[g(e)]});return yr=m}();function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e);if("undefined"==typeof Intl)void 0!==cn?cn.Intl={PluralRules:n.default}:"undefined"!=typeof window?window.Intl={PluralRules:n.default}:Cr.Intl={PluralRules:n.default},n.default.polyfill=!0;else if(Intl.PluralRules&&Intl.PluralRules.prototype.selectRange){var r=["en","es","ru","zh"];Intl.PluralRules.supportedLocalesOf(r).length<r.length&&(Intl.PluralRules=n.default,n.default.polyfill=!0)}else Intl.PluralRules=n.default,n.default.polyfill=!0}();const Sr={en:{translation:{"File Manager":"File Manager","Selected files:":"Selected files:",Folder:"Folder",Folders:"Folders",Files:"Files",File:"File","Select the destination folder":"Select the destination folder","Filter by type":"Filter by type","All types":"All types","File name":"File name",Size:"Size",Date:"Date",Actions:"Actions",Delete:"Delete",Move:"Move",Copy:"Copy","Add folder":"Add folder","Add file":"Add file","Add file by URL":"Add file by URL","Please select an image file":"Please select an image file","File deleted":"File deleted","Error when deleting a file":"Error when deleting a file","Folder deleted":"Folder deleted","Error when deleting a folder":"Error when deleting a folder","Delete folder":"Delete folder","Are you sure you want to delete this folder? This action will also delete all files and subfolders.":"Are you sure you want to delete this folder? This action will also delete all files and subfolders.","File moved":"File moved","Error when moving a file":"Error when moving a file","has been successfully uploaded":"has been successfully uploaded","File uploaded successfully":"File uploaded successfully","Error when uploading a file":"Error when uploading a file","successfully uploaded":"successfully uploaded","Error when downloading a file by URL":"Error when downloading a file by URL","Error loading files":"Error loading files","File Manager not configured":"File Manager not configured","Type to search...":"Type to search...","Failed to create folder":"Failed to create folder",Cancel:"Cancel",Submit:"Submit",months:{january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December"},files:"files","No available folders":"No available folders","My files":"My files",GIF:"GIF","Stock images":"Stock images",AI:"AI","AI image generation":"AI image generation","Search GIFs":"Search GIFs","That`s all we could find.":"That`s all we could find.","Search image":"Search image",All:"All",Landscape:"Landscape",Portrait:"Portrait",Squarish:"Squarish",Black:"Black","Black and White":"Black and White",White:"White",Orange:"Orange",Red:"Red",Purple:"Purple",Magenta:"Magenta",Green:"Green",Teal:"Teal",Blue:"Blue","Photo by":"Photo by",on:"on",selected:"selected",Deselected:"Deselected",Rename:"Rename","Rename file":"Rename file {{currentFileName}}","Selected files":"Selected files: {{count}}",Edit:"Edit","Move to":"Move to","New folder":"New folder","Image search...":"Image search...","By name":"By name","By size":"By size","By date":"By date",List:"List",Grid:"Grid",Main:"Main","total pages":"Total {{total}} items",Name:"Name",Untitled:"Untitled",Dimensions:"Dimensions",error:"error",created:"created","API-endpoint for file upload is not configured":"API-endpoint for file upload is not configured","The URL must point to an image":"The URL must point to an image","Image upload...":"Image upload...",Unknown:"Unknown","Error downloading file by URL":"Error downloading file by URL","File not found":"File not found","File renamed to":"File renamed to {{newFileName}}","Failed to rename the file":"Failed to rename the file","Folder renamed to":"Folder renamed to","Rename folder":"Rename folder","New folder name":"New folder name","Enter a new folder name":"Enter a new folder name","Please drag and drop image files only":"Please drag and drop image files only","Upload file by URL":"Upload file by URL","Upload file":"Upload file","Creating a new folder":"Creating a new folder",Create:"Create","Folder name":"Folder name","Enter the name of the folder":"Enter the name of the folder","A folder will be created inside:":"A folder will be created inside:","selected folder":"selected folder","The folder will be created in the root directory":"The folder will be created in the root directory",Download:"Download","image URL":"image URL","Enter the URL of the image":"Enter the URL of the image","Supported formats: JPG, JPEG, PNG, GIF, WEBP, SVG, BMP":"Supported formats: JPG, JPEG, PNG, GIF, WEBP, SVG, BMP","New file name":"New file name","Enter a new file name":"Enter a new file name","Copy to folder":"Copy to folder",date_of_add:"Added {{date}}",file_add_complete:"File {{fileName}} uploaded successfully",success_download_one:"Successfully uploaded {{successCount}} of {{count}} file",success_download_other:"Successfully uploaded {{successCount}} of {{count}} files",error_download_one:"Failed to upload {{failCount}} of {{count}} file",error_download_other:"Failed to upload {{failCount}} of {{count}} files","No data to display":"No data to display","Drag files to upload":"Drag files to upload","Drop files here to upload":"Drop files here to upload","Newest first":"Newest first","Oldest first":"Oldest first","Largest first":"Largest first","Smallest first":"Smallest first","A-Z":"A-Z","Z-A":"Z-A","By type":"By type","Evaluating the task":"Evaluating the task","Something went wrong, please try again":"Something went wrong, please try again","Sort by":"Sort by","preview text":"The image preview is trying to load ...","Use this variant":"Use this variant","Confirm deletion":"Confirm deletion","Are you sure you want to delete the selected items?":"Are you sure you want to delete the selected items?",item:"item",items:"items",Trash:"Trash",Choose:"Choose",Stock:"Stock","Select an image from our library":"Select an image from our library","AI generation":"AI generation","Creating an image on demand":"Creating an image on demand",Search:"Search","Select a file or drag and drop it here":"Select a file or drag and drop it here","Supported files:":"Supported files:"}},ru:{translation:{Files:"Файлы",selected:"выбрано",Deselected:"Отменить выбор",Rename:"Переименовать","Rename file":"Переименовать файл {{currentFileName}}","Select the destination folder":"Выберите папку назначения","Selected files:":"Выбрано файлов:","Selected files":"Выбрано файлов: {{count}}",Copy:"Дублировать",Edit:"Изменить","Move to":"Переместить",Delete:"Удалить","New folder":"Новая папка","Image search...":"Поиск изображений...","By name":"По имени","By size":"По размеру","By date":"По дате",List:"Список",Grid:"Плитки",Main:"Главная",Folders:"Папки","total pages":"Всего {{total}} элементов",Name:"Имя",Untitled:"Без названия",Size:"Объём",Dimensions:"Размер",Date:"Дата",error:"ошибка",Folder:"Папка",created:"создана","Failed to create folder":"Не удалось создать папку","File deleted":"Файл удален","Error when deleting a file":"Ошибка при удалении файла","Folder deleted":"Папка удалена","Error when deleting a folder":"Ошибка при удалении папки","Delete folder":"Удалить папку","Are you sure you want to delete this folder? This action will also delete all files and subfolders.":"Вы уверены, что хотите удалить эту папку? Это действие также удалит все файлы и подпапки.","API-endpoint for file upload is not configured":"API-endpoint для загрузки файлов не настроен","Please select an image file":"Пожалуйста, выберите файл изображения",File:"Файл","has been successfully uploaded":"успешно загружен","The URL must point to an image":"URL должен указывать на изображение","Image upload...":"Загрузка изображения...",Unknown:"Неизвестно","Error downloading file by URL":"Ошибка загрузки файла по URL","successfully uploaded":"успешно загружен","Error when downloading a file by URL":"Ошибка при загрузке файла по URL","File not found":"Файл не найден","File renamed to":"Файл переименован на {{newFileName}}","Failed to rename the file":"Не удалось переименовать файл","Folder renamed to":"Папка переименована на","Rename folder":"Переименовать папку","New folder name":"Новое название папки","Enter a new folder name":"Введите новое название папки","Please drag and drop image files only":"Пожалуйста, перетащите только файлы изображений","Upload file by URL":"Загрузить файл по URL","Upload file":"Загрузить файл","Creating a new folder":"Создание новой папки",Create:"Создать",Cancel:"Отмена","Folder name":"Название папки","Enter the name of the folder":"Введите название папки","A folder will be created inside:":"Папка будет создана внутри:","selected folder":"выбранной папки","The folder will be created in the root directory":"Папка будет создана в корневом каталоге",Download:"Загрузить","image URL":"URL изображения","Enter the URL of the image":"Введите URL изображения","Supported formats: JPG, JPEG, PNG, GIF, WEBP, SVG, BMP":"Поддерживаемые форматы: JPG, JPEG, PNG, GIF, WEBP, SVG, BMP","New file name":"Новое имя файла","Enter a new file name":"Введите новое имя файла","Copy to folder":"Копировать в папку",date_of_add:"Добавлено {{date}}",file_add_complete:"Файл {{fileName}} успешно загружен",success_download_one:"Успешно загружено {{successCount}} из {{count}} файла",success_download_other:"Успешно загружено {{successCount}} из {{count}} файлов",error_download_one:"Не удалось загрузить {{failCount}} из {{count}} файла",error_download_other:"Не удалось загрузить {{failCount}} из {{count}} файлов",months:{january:"января",february:"февраля",march:"марта",april:"апреля",may:"мая",june:"июня",july:"июля",august:"августа",september:"сентября",october:"октября",november:"ноября",december:"декабря"},files:"файлов","No available folders":"Нет доступных папок","My files":"Мои файлы",GIF:"GIF","Stock images":"Стоковые изображения",AI:"AI","AI image generation":"AI генерация изображений","Search GIFs":"Поиск GIF","That`s all we could find.":"Это все, что мы смогли найти.","Search image":"Поиск изображений",All:"Все",Landscape:"Горизонтальные",Portrait:"Вертикальные",Squarish:"Квадратные",Black:"Черный","Black and White":"Черно-белый",White:"Белый",Orange:"Оранжевый",Red:"Красный",Purple:"Фиолетовый",Magenta:"Пурпурный",Green:"Зеленый",Teal:"Бирюзовый",Blue:"Синий","Photo by":"Фото",on:"на","File Manager":"Файловый менеджер","File Manager not configured":"Файловый менеджер не настроен","Filter by type":"Фильтр по типу","All types":"Все типы","File name":"Имя файла",Actions:"Действия","Add file":"Добавить файл","Add folder":"Добавить папку","Add file by URL":"Добавить файл по URL","File moved":"Файл перемещён","Error when moving a file":"Ошибка при перемещении файла","File uploaded successfully":"Файл успешно загружен","Type to search...":"Введите для поиска...",Submit:"Отправить","No data to display":"Нет данных для отображения","Drag files to upload":"Перетащите файлы для загрузки","Drop files here to upload":"Отпустите файлы здесь, чтобы загрузить их","Newest first":"Вначале новые","Oldest first":"Вначале старые","Largest first":"Вначале большие","Smallest first":"Вначале маленькие","A-Z":"По алфавиту А-Я","Z-A":"По алфавиту Я-А","By type":"По типу","Evaluating the task":"Оценка задания","Something went wrong, please try again":"Что-то пошло не так, пожалуйста, попробуйте еще раз","Sort by":"Сортировать по","preview text":"Изображение загружается ...","Use this variant":"Использовать этот вариант","Confirm deletion":"Подтвердить удаление","Are you sure you want to delete the selected items?":"Вы уверены, что хотите удалить выбранные элементы?",item:"файл",items:"файлов",Trash:"Корзина",Choose:"Выбрать",Stock:"Фотосток","Select an image from our library":"Выберите изображение из нашей библиотеки","AI generation":"AI генерация","Creating an image on demand":"Создание изображения по запросу",Search:"Поиск","Select a file or drag and drop it here":"Выберите файл или перетащите его сюда","Supported files:":"Поддерживаемые файлы:"}}};mr.use(xn).init({resources:Sr,debug:!0,lng:"en",fallbackLng:"en",interpolation:{escapeValue:!1}});const Ar=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"m6 9 6 6 6-6"}));Ar.displayName="ChevronDown";const kr=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"M12 20.472a6 6 0 1 0 5.58-10.262m-11.16 0a6 6 0 1 0 7.16 3.58M18 8A6 6 0 1 1 6 8a6 6 0 0 1 12 0Z"}));kr.displayName="Colors";const Tr=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"M16 16v2.8c0 1.12 0 1.68-.218 2.108a2 2 0 0 1-.874.874C14.48 22 13.92 22 12.8 22H5.2c-1.12 0-1.68 0-2.108-.218a2 2 0 0 1-.874-.874C2 20.48 2 19.92 2 18.8v-7.6c0-1.12 0-1.68.218-2.108a2 2 0 0 1 .874-.874C3.52 8 4.08 8 5.2 8H8m3.2 8h7.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C22 14.48 22 13.92 22 12.8V5.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C20.48 2 19.92 2 18.8 2h-7.6c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C8 3.52 8 4.08 8 5.2v7.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C9.52 16 10.08 16 11.2 16Z"}));Tr.displayName="Copy04";const Ir=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"M10 6h4.8c1.12 0 1.68 0 2.108.218a2 2 0 0 1 .874.874C18 7.52 18 8.08 18 9.2V14M2 6h4m12 12v4m4-4H9.2c-1.12 0-1.68 0-2.108-.218a2 2 0 0 1-.874-.874C6 16.48 6 15.92 6 14.8V2"}));Ir.displayName="Crop02";const Or=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"M12 13a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0-7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 14a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"}));Or.displayName="DotsVertical";const Er=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"m13 7-1.116-2.231c-.32-.642-.481-.963-.72-1.198a2 2 0 0 0-.748-.462C10.1 3 9.74 3 9.022 3H5.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C2 4.52 2 5.08 2 6.2V7m0 0h15.2c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C22 9.28 22 10.12 22 11.8v4.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C19.72 21 18.88 21 17.2 21H6.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C2 18.72 2 17.88 2 16.2V7Zm7 7 3 3m0 0 3-3m-3 3v-6"}));Er.displayName="FolderDownload";const Pr=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"m13 7-1.116-2.231c-.32-.642-.481-.963-.72-1.198a2 2 0 0 0-.748-.462C10.1 3 9.74 3 9.022 3H5.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C2 4.52 2 5.08 2 6.2V7m0 0h15.2c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C22 9.28 22 10.12 22 11.8v4.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C19.72 21 18.88 21 17.2 21H6.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C2 18.72 2 17.88 2 16.2V7Zm7 7h6"}));Pr.displayName="FolderMinus";const Mr=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"m13 7-1.116-2.231c-.32-.642-.481-.963-.72-1.198a2 2 0 0 0-.748-.462C10.1 3 9.74 3 9.022 3H5.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C2 4.52 2 5.08 2 6.2V7m0 0h15.2c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C22 9.28 22 10.12 22 11.8v4.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C19.72 21 18.88 21 17.2 21H6.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C2 18.72 2 17.88 2 16.2V7Zm10 10v-6m-3 3h6"}));Mr.displayName="FolderPlus";const Fr=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"M8.4 3H4.6c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C3 3.76 3 4.04 3 4.6v3.8c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C3.76 10 4.04 10 4.6 10h3.8c.56 0 .84 0 1.054-.109a1 1 0 0 0 .437-.437C10 9.24 10 8.96 10 8.4V4.6c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C9.24 3 8.96 3 8.4 3Zm11 0h-3.8c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C14 3.76 14 4.04 14 4.6v3.8c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C14.76 10 15.04 10 15.6 10h3.8c.56 0 .84 0 1.054-.109a1 1 0 0 0 .437-.437C21 9.24 21 8.96 21 8.4V4.6c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C20.24 3 19.96 3 19.4 3Zm0 11h-3.8c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C14 14.76 14 15.04 14 15.6v3.8c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C14.76 21 15.04 21 15.6 21h3.8c.56 0 .84 0 1.054-.109a1 1 0 0 0 .437-.437C21 20.24 21 19.96 21 19.4v-3.8c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C20.24 14 19.96 14 19.4 14Zm-11 0H4.6c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C3 14.76 3 15.04 3 15.6v3.8c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C3.76 21 4.04 21 4.6 21h3.8c.56 0 .84 0 1.054-.109a1 1 0 0 0 .437-.437C10 20.24 10 19.96 10 19.4v-3.8c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C9.24 14 8.96 14 8.4 14Z"}));Fr.displayName="Grid01";const jr=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"m4.272 20.728 6.597-6.597c.396-.396.594-.594.822-.668a1 1 0 0 1 .618 0c.228.074.426.272.822.668l6.553 6.553M14 15l2.869-2.869c.396-.396.594-.594.822-.668a1 1 0 0 1 .618 0c.228.074.426.272.822.668L22 15M10 9a2 2 0 1 1-4 0 2 2 0 0 1 4 0ZM6.8 21h10.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C22 18.72 22 17.88 22 16.2V7.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C19.72 3 18.88 3 17.2 3H6.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C2 5.28 2 6.12 2 7.8v8.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C4.28 21 5.12 21 6.8 21Z"}));jr.displayName="Image03";const Dr=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"M21 12H9m12-6H9m12 12H9m-4-6a1 1 0 1 1-2 0 1 1 0 0 1 2 0Zm0-6a1 1 0 1 1-2 0 1 1 0 0 1 2 0Zm0 12a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"}));Dr.displayName="List";const Rr=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"M9.5 8.965c0-.477 0-.716.1-.849a.5.5 0 0 1 .364-.199c.166-.012.367.117.769.375l4.72 3.035c.349.224.523.336.583.478a.5.5 0 0 1 0 .39c-.06.142-.234.254-.583.478l-4.72 3.035c-.402.258-.603.387-.769.375a.5.5 0 0 1-.364-.2c-.1-.132-.1-.371-.1-.848v-6.07Z"}),r.createElement("path",{d:"M3 7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8Z"}));Rr.displayName="PlaySquare";const Lr=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"M12 8v8m-4-4h8m6 0c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z"}));Lr.displayName="PlusCircle";const zr=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"M14 22H6.8m0 0c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C2 19.72 2 18.88 2 17.2M6.8 22h.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C12 19.72 12 18.88 12 17.2v-.4c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C9.72 12 8.88 12 7.2 12h-.4c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C2 14.28 2 15.12 2 16.8v.4m0 0V10m8-8h4m8 8v4m-4 8c.93 0 1.395 0 1.776-.102a3 3 0 0 0 2.122-2.122C22 19.395 22 18.93 22 18m0-12c0-.93 0-1.395-.102-1.776a3 3 0 0 0-2.122-2.122C19.395 2 18.93 2 18 2M6 2c-.93 0-1.395 0-1.776.102a3 3 0 0 0-2.122 2.122C2 4.605 2 5.07 2 6"}));zr.displayName="Scale01";const Nr=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"m21 21-4.35-4.35M19 11a8 8 0 1 1-16 0 8 8 0 0 1 16 0Z"}));Nr.displayName="SearchMd";const Br=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"M4.5 22v-5m0-10V2M2 4.5h5m-5 15h5M13 3l-1.734 4.509c-.282.733-.423 1.1-.643 1.408a3 3 0 0 1-.706.707c-.308.219-.675.36-1.408.642L4 12l4.509 1.734c.733.282 1.1.423 1.408.643.273.194.512.433.707.706.219.308.36.675.642 1.408L13 21l1.734-4.509c.282-.733.423-1.1.643-1.408.194-.273.433-.512.706-.707.308-.219.675-.36 1.408-.642L22 12l-4.509-1.734c-.733-.282-1.1-.423-1.408-.642a3 3 0 0 1-.706-.707c-.22-.308-.36-.675-.643-1.408L13 3Z"}));Br.displayName="Stars02";const Vr=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"M13 7H5.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C2 8.52 2 9.08 2 10.2v3.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C3.52 17 4.08 17 5.2 17H13m4-10h1.8c1.12 0 1.68 0 2.108.218a2 2 0 0 1 .874.874C22 8.52 22 9.08 22 10.2v3.6c0 1.12 0 1.68-.218 2.108a2 2 0 0 1-.874.874C20.48 17 19.92 17 18.8 17H17m0 4V3m2.5 0h-5m5 18h-5"}));Vr.displayName="TextInput";const Ur=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"M9 3h6M3 6h18m-2 0-.701 10.52c-.105 1.578-.158 2.367-.499 2.965a3 3 0 0 1-1.298 1.215c-.62.3-1.41.3-2.993.3h-3.018c-1.582 0-2.373 0-2.993-.3A3 3 0 0 1 6.2 19.485c-.34-.598-.394-1.387-.499-2.966L5 6m5 4.5v5m4-5v5"}));Ur.displayName="Trash03";const Hr=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"M21 15v1.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V15m14-7-5-5m0 0L7 8m5-5v12"}));Hr.displayName="Upload01";var Wr,Yr={exports:{}},$r=Yr.exports;
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Lodash <https://lodash.com/>
|
|
@@ -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=(Wr||(Wr=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,H=/(__e\(.*?\)|\b__t\)) \+\n'';/g,W=/&(?:amp|lt|gt|quot|#39);/g,Y=/[&<>"']/g,$=RegExp(W.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+")",He="(?:['’](?:d|ll|m|re|s|t|ve))?",We="(?:['’](?: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+"+"+He+"(?="+[Oe,Ne,"$"].join("|")+")",Ue+"+"+We+"(?="+[Oe,Ne+Ve,"$"].join("|")+")",Ne+"?"+Ve+"+"+He,Ne+"+"+We,"\\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&>.binding&>.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=Ht("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 Ht(e){return function(t){return null==t?n:t[e]}}function Wt(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=Wt({"À":"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=Wt({"&":"&","<":"<",">":">",'"':""","'":"'"});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=Wt({"&":"&","<":"<",">":">",""":'"',"'":"'"}),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,He=t.Uint8Array,We=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,Wt=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)&&!Ha(e)&&!(e instanceof Hn)){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 Hn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function Wn(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=Ha(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=Ha(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,Hn.prototype=Bn(Vn.prototype),Hn.prototype.constructor=Hn,Wn.prototype.clear=function(){this.__data__=In?In(null):{},this.size=0},Wn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Wn.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},Wn.prototype.has=function(e){var t=this.__data__;return In?t[e]!==n:je.call(t,e)},Wn.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 Wn,map:new(Sn||Yn),string:new Wn}},$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 Ha(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=Ha(e),l=Ha(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 He(e),new He(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?Ha(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=Ha(c),p=!f&&Ga(c),g=!f&&!p&&ls(c);h=c,f||p||g?Ha(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 Hr(e,t,n){t=t.length?Pt(t,function(e){return Ha(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 Wr(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(Ha(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 Hn&&(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 Ha(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=We?We(n):new e.constructor(n);return e.copy(r),r}function _i(e){var t=new e.constructor(e.byteLength);return new He(t).set(new He(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=Ha(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&&Ha(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 Hi(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 Wi(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))&&Wt(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,Wo),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)&&(Ha(e)||Ua(e))}function mo(e){return"function"!=typeof e.constructor||_o(e)?{}:Bn(Ye(e))}function vo(e){return Ha(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(Ha(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 Hn.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 Hn)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 Ho(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 Wo(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,Ht(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 Hn&&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(Ho);function va(e,t){return(Ha(e)?At:hr)(e,so(t,3))}function ba(e,t){return(Ha(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(Ha(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]]),Hr(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&&Ha(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")},Ha=we.isArray,Wa=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||!Ha(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 Wr(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),Wr(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 Hs=Di(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),Ws=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)?Ht(Ro(e)):function(e){return function(t){return Cr(t,e)}}(e)}var dl=Wi(),fl=Wi(!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 Ha(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(Ha(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(Ha(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=Wo,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?[]:(Ha(t)||(t=null==t?[]:[t]),Ha(r=i?n:r)||(r=null==r?[]:[r]),Hr(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(Ha(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),(Ha(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(Ha(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 Ha(e)?Pt(e,Ro):ss(e)?[e]:Ii(Do(vs(e)))},Nn.toPlainObject=ms,Nn.transform=function(e,t,n){var r=Ha(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=Ha(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=Ho,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=Ha,Nn.isArrayBuffer=Wa,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)&&(Ha(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&&Wt(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=Hs,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=Ws,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 Hi(gt(i),n)+e+Hi(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+Hi(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?Hi(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=Ha(e)?Ft:Yt,i=arguments.length<3;return r(e,so(t,4),n,i,hr)},Nn.reduceRight=function(e,t,n){var r=Ha(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(Ha(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=Ha(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(H,"$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(W,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){Hn.prototype[e]=function(r){r=r===n?1:vn(fs(r),0);var i=this.__filtered__&&!t?new Hn(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},Hn.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;Hn.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":"");Hn.prototype[e]=function(){return this[n](1).value()[0]}}),At(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");Hn.prototype[e]=function(){return this.__filtered__?new Hn(this):this[n](1)}}),Hn.prototype.compact=function(){return this.filter(nl)},Hn.prototype.find=function(e){return this.filter(e).head()},Hn.prototype.findLast=function(e){return this.reverse().find(e)},Hn.prototype.invokeMap=Kr(function(e,t){return"function"==typeof e?new Hn(this):this.map(function(n){return Or(n,e,t)})}),Hn.prototype.reject=function(e){return this.filter(ja(so(e)))},Hn.prototype.slice=function(e,t){e=fs(e);var r=this;return r.__filtered__&&(e>0||t<0)?new Hn(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)},Hn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Hn.prototype.toArray=function(){return this.take(d)},yr(Hn.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 Hn,c=s[0],u=l||Ha(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 Hn(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(Ha(i)?i:[],e)}return this[n](function(n){return t.apply(Ha(n)?n:[],e)})}}),yr(Hn.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}],Hn.prototype.clone=function(){var e=new Hn(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},Hn.prototype.reverse=function(){if(this.__filtered__){var e=new Hn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Hn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Ha(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 Hn){var t=e;return this.__actions__.length&&(t=new Hn(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})=>{var r;const[s,l]=o([]),[u,h]=o([]),[d,f]=o(null),[p,g]=o(n.searchQuery||""),[m,v]=o(n.sortBySize||"name"),{config:b}=n,[y,w]=o("date"),[x,C]=o("desc"),[_,S]=o([{id:"folders",name:"Папки"}]),[A,k]=o(new Set),[T,I]=o("");i.useEffect(()=>{k(new Set)},[]);const E=i.useRef(null);i.useEffect(()=>{if(n.onChangeSelection&&E.current!==A){if(null!==E.current){const e=(Array.isArray(u)?u:[]).filter(e=>A.has(e.id));n.onChangeSelection(e)}E.current=A}},[u,A,n.onChangeSelection,n]);const[P,M]=o(!1),[F,j]=o(Xr);a(()=>{(null==b?void 0:b.activeLibraryItem)&&j&&j(null==b?void 0:b.activeLibraryItem)},[null==b?void 0:b.activeLibraryItem,j]);const[D,R]=o({current:1,pageSize:12,total:0}),[L]=O.useForm(),[z]=O.useForm(),[N]=O.useForm(),[B]=O.useForm(),[V]=O.useForm(),[U]=O.useForm(),[H,W]=o(!1),[Y,$]=o(!1),[G,X]=o(!1),[K,q]=o(!1),[Z,J]=o(!1),[Q,ee]=o(!1),[te,ne]=o(!1),[re,ie]=o(null),[oe,ae]=o(null),se=c(e=>{R(t=>Object.assign(Object.assign({},t),e))},[R]),le=c(e=>{k(null!=e?e:new Set)},[k]),ce={folders:s,files:u,selectedFolder:d,searchTerm:p,sortField:m,sortBy:y,sortOrder:x,pathHistory:_,selectedFiles:A,currentMenuFile:T,loading:P,pagination:D,isModalVisible:H,isUrlModalVisible:Y,isRenameModalVisible:G,isMoveModalVisible:K,isRenameFolderModalVisible:Z,isCopyModalVisible:Q,isDeleteConfirmVisible:te,form:L,urlForm:z,renameForm:N,moveForm:B,renameFolderForm:V,copyForm:U,fileToRename:re,folderToRename:oe,activeLibraryItem:F,multiSelect:null===(r=null==b?void 0:b.multiSelect)||void 0===r||r},ue={setFolders:l,setFiles:h,setSelectedFolder:f,setSearchTerm:g,setSortField:v,setSortBy:w,setSortOrder:C,setPathHistory:S,setSelectedFiles:le,setLoading:M,setPagination:se,setIsModalVisible:W,setIsUrlModalVisible:$,setIsRenameModalVisible:X,setIsMoveModalVisible:q,setIsRenameFolderModalVisible:J,setIsCopyModalVisible:ee,setIsDeleteConfirmVisible:ne,setFileToRename:ie,setFolderToRename:ae,updatePathHistoryOnFolderRename:(e,t)=>{S(n=>n.map(n=>n.id===e?Object.assign(Object.assign({},n),{name:t}):n))},setActiveLibraryItem:j,setCurrentMenuFile:I},he={state:ce,actions:ue,options:n};return e(ni.Provider,{value:he,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(()=>{var e;const t=null!==(e=null==b?void 0:b.defaultFolderName)&&void 0!==e?e:a("Новая папка");h.setFieldsValue({folderName:t}),null==m||m(!0)},[h,m,a,null==b?void 0:b.defaultFolderName]),_=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=!1!==e.multiSelect,o=c(e=>{if(!n||!r)return;const t=n,o=new Set(i?t:[]);t.has(e)?o.delete(e):o.add(e),r(o)},[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=()=>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"})}),ki=()=>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"})}),Ti=()=>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"})]}),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:"#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"})]}),Oi=t=>e(oe,Object.assign({component:bi},t)),Ei=t=>e(oe,Object.assign({component:yi},t)),Pi=t=>e(oe,Object.assign({component:wi},t)),Mi=t=>e(oe,Object.assign({component:xi},t)),Fi=t=>e(oe,Object.assign({component:Ci},t)),ji=t=>e(oe,Object.assign({component:_i},t)),Di=t=>e(oe,Object.assign({component:Si},t)),Ri=t=>e(oe,Object.assign({component:Ai},t)),Li=t=>e(oe,Object.assign({component:ki},t)),zi=t=>e(oe,Object.assign({component:Ti},t)),Ni=t=>e(oe,Object.assign({component:Ii},t)),Bi="filemanager_view_mode",Vi=()=>{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",Di,e),EmptyFolderIcon:e=>n("folderPreview",Ri,e),GridViewIcon:e=>n("gridView",ce,e),ListViewIcon:e=>n("listView",le,e),DropZoneFileIcon:e=>n("folderPreview",Li,e),BigStockIcon:e=>n("folderPreview",zi,e),BigAIIcon:e=>n("folderPreview",Ni,e),getCustomIcon:n}};var Ui={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:Hi}=F,{Option:Wi}=j,Yi=({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;const{t:M}=An(),{FolderPreviewIcon:F,DropZoneFileIcon:$,BigStockIcon:G,BigAIIcon:X}=Vi(),{options:K,actions:q}=ri(),Z=null===(I=null==K?void 0:K.config)||void 0===I?void 0:I.disablePagination,{dataProviders:J}=K,{setCurrentMenuFile:Q,setSelectedFiles:ee,setActiveLibraryItem:te}=q,{viewMode:ne,setViewMode:re}=(()=>{const[e,t]=o(()=>{try{return localStorage.getItem(Bi)||"table"}catch(e){return"table"}}),n=c(e=>{t(e);try{localStorage.setItem(Bi,e)}catch(e){console.warn("Не удалось сохранить режим отображения:",e)}},[]),r=c(()=>{n("table"===e?"grid":"table")},[e,n]);return{viewMode:e,setViewMode:n,toggleViewMode:r}})(),[ie,oe]=o(!1),[ae,se]=o({}),[le,ce]=o(null),[ue,he]=o(!1),de=u(0);a(()=>{const e=()=>{he(window.innerWidth<1200)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);const fe=b.size,pe=(null===(O=K.config)||void 0===O?void 0:O.features)||{},ge=i.useMemo(()=>Array.from(b)[0],[b]),me=i.useMemo(()=>ge?r.find(e=>e.id===ge):void 0,[ge,r]),ve=(null==me?void 0:me.isFolder)?!1!==(null==pe?void 0:pe.enableRenameFolder):!1!==(null==pe?void 0:pe.enableRenameFile),be=null===(P=K.config)||void 0===P?void 0:P.iconStrokeWidth,ye=i.useMemo(()=>{var e,t;if(1!==fe||!me||me.isFolder)return!1;let n=!1;if(me.type&&me.type.startsWith("image/"))n=!0;else if(me.extension){const e=me.extension.toLowerCase();n=ei.includes(e)}else{const t=null===(e=me.name.split(".").pop())||void 0===e?void 0:e.toLowerCase();n=!!t&&ei.includes(t)}return console.warn("isImageSelected проверка:",{fileName:me.name,fileType:me.type,fileExtension:me.extension,nameExtension:null===(t=me.name.split(".").pop())||void 0===t?void 0:t.toLowerCase(),isImage:n,IMAGE_EXTENSIONS:ei}),n},[fe,me]),we=`${h}-${d}`,xe=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]),Ce=c(async e=>{try{if(null==J?void 0:J.getChildrenCount)return await J.getChildrenCount("folders"===e?void 0:e);if(null==J?void 0:J.getFiles){const{files:t,pagination:n}=await J.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}},[J]),_e=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 Ce(e.id)});await Promise.all(n),se(t)},[r,Ce]);a(()=>{_e()},[_e]);const Se=c(e=>{e.preventDefault(),e.stopPropagation(),de.current+=1,e.dataTransfer.types&&e.dataTransfer.types.includes("Files")&&oe(!0)},[]),Ae=c(e=>{e.preventDefault(),e.stopPropagation(),de.current-=1,0===de.current&&oe(!1)},[]),ke=c(e=>{e.preventDefault(),e.stopPropagation()},[]),Te=c(e=>{if(e.preventDefault(),e.stopPropagation(),oe(!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]),Ie=c((e=()=>{})=>{if(le)return;const t=setTimeout(()=>{e(),ce(null)},300);ce(t)},[le]),Oe=c(e=>{le&&(clearTimeout(le),ce(null)),e()},[le]),Ee=c(t=>{const n=[];t.isFolder||!1===(null==pe?void 0:pe.enableEdit)||n.push({key:"edit",label:M("Edit"),icon:e(Ir,{size:16,strokeWidth:be})}),(t.isFolder?!1!==(null==pe?void 0:pe.enableMoveFolder):!1!==(null==pe?void 0:pe.enableMoveItem))&&n.push({key:"move",label:M("Move to"),icon:e(Er,{size:16,strokeWidth:be})}),(t.isFolder?!1!==(null==pe?void 0:pe.enableCopyFolder):!1!==(null==pe?void 0:pe.enableCopyItem))&&n.push({key:"copy",label:M("Copy"),icon:e(Tr,{size:16,strokeWidth:be})});return(t.isFolder?!1!==(null==pe?void 0:pe.enableRenameFolder):!1!==(null==pe?void 0:pe.enableRenameFile))&&n.push({key:"rename",label:M("Rename"),icon:e(Vr,{size:16,strokeWidth:be})}),!1!==pe.enableDelete&&n.push({key:"delete",label:M("Delete"),icon:e(Ur,{size:16,strokeWidth:be}),style:{color:"#ff4d4f"}}),n},[pe,M,be]),Pe=e=>({key:t})=>{const n=r.find(t=>t.id===e);switch(Q&&(null==n?void 0:n.id)&&Q(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:Q&&Q("")}},Me=[{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:Ui.fileManagerTableFolder,children:e("div",{className:Ui.fileManagerTableFolderInner,children:e(ji,{className:Ui.tableFolderIcon,style:{width:40,height:40}})})}):e(vi,{className:`${Ui.imagePreview} ${Ui.tableImagePreview}`,src:n.thumbnail||n.thumbnailUrl||n.url,alt:n.name,width:40,height:40,preview:!0,file:n})},{title:M("Name"),width:"calc(100% - 430px)",dataIndex:"name",key:"name",className:Ui.fileNameCol,render:(e,n)=>{const r=n.isFolder&&ae[n.id]||0,i=M(1===r?"item":"items");return t("div",{className:Ui.fileName,children:[e||M("No name"),n.isFolder&&t("div",{className:Ui.fileItemCount,children:[r," ",i]})]})}},{title:M("Dimensions"),key:"dimensions",width:100,render:(t,n)=>e("div",{className:Ui.fileSize,children:n.isFolder?M("Folder"):M("File")})},...xe?[{title:M("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:Ui.fileDate,children:M("date_of_add",{date:(o=i,`${o.getDate()} ${[M("months.january"),M("months.february"),M("months.march"),M("months.april"),M("months.may"),M("months.june"),M("months.july"),M("months.august"),M("months.september"),M("months.october"),M("months.november"),M("months.december")][o.getMonth()]} ${o.getFullYear()}`)})});var o}}]:[],{width:40,title:"",dataIndex:"",key:"x",onCell:()=>({style:{padding:0}}),render:(t,n)=>e(R,{arrow:!0,placement:"bottom",menu:{items:Ee(n),onClick:Pe(n.id)},trigger:["hover"],children:e("span",{className:`${Ui.tableMenu} tableMenuButton`,onClick:e=>{e.stopPropagation(),e.preventDefault()},children:e(Or,{size:16,strokeWidth:be})})})}],Fe="table"===ne?e(U,{dataSource:r,columns:Me,rowKey:"id",pagination:!1,loading:m,rowClassName:e=>(null==b?void 0:b.has(e.id))?Ui.selectedRow:"",tableLayout:"fixed",onRow:e=>({onClick:t=>{const n=t.target;Ie(()=>{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=>{Oe(()=>{t.stopPropagation(),t.preventDefault();const n=t.target;e.isFolder?v(e):n.closest(".ant-image")||n.closest(".ant-image-preview-wrap")||!K.onEditorOk||(console.warn("onEditorOk"),K.onEditorOk(e))})}}),showHeader:!1}):e(H,{gutter:[16,16],className:Ui.gridRow,style:{gap:20,padding:"0 24px 24px",margin:0},children:r.map(r=>e(W,{className:Ui.gridCard_col,style:{padding:0},children:t(Y,{hoverable:!0,cover:e("div",{className:r.isFolder?Ui.gridPreviewContainerFolder:Ui.gridPreviewContainer,onClick:e=>{e.stopPropagation(),r.isFolder&&Ie(()=>{y(r.id)})},onDoubleClick:e=>{e.stopPropagation(),Oe(()=>{r.isFolder&&v(r)})},children:r.isFolder?e("div",{className:Ui.gridFolderIcon,children:e(F,{className:Ui.gridFolderIconImage})}):e(vi,{src:r.thumbnail||r.thumbnailUrl||r.url,alt:r.name,className:Ui.gridImagePreview,preview:!0,file:r})}),className:`${Ui.gridCard} ${(null==b?void 0:b.has(r.id))?Ui.gridCardSelected:""}`,onClick:e=>{e.stopPropagation(),e.preventDefault();const t=e.target;t.closest(".gridFileMenuButton")||t.closest(".ant-dropdown-menu")||Ie(()=>y(r.id))},onDoubleClick:e=>{e.stopPropagation(),Oe(()=>{r.isFolder&&v(r)})},children:[t("div",{className:Ui.gridCardContent,onDoubleClick:e=>{e.stopPropagation(),e.preventDefault(),Oe(()=>{K.onEditorOk&&K.onEditorOk(r)})},onClick:e=>{e.stopPropagation(),e.preventDefault();const t=e.target;t.closest(".gridFileMenuButton")||t.closest(".ant-dropdown-menu")||Ie(()=>y(r.id))},children:[e("div",{className:Ui.gridFileName,children:r.name||M("Untitled")}),e("div",{className:Ui.gridFileInfo,children:r.isFolder?(()=>{const e=ae[r.id]||0;return`${e} ${M(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:Ui.gridFileMenu,children:e(R,{menu:{items:Ee(r),onClick:Pe(r.id)},arrow:!0,placement:"bottom",trigger:["hover"],children:e(z,{type:"default",className:`${Ui.gridFileMenuButton} gridFileMenuButton`,onClick:()=>{},children:e(Or,{size:16,strokeWidth:be})})},r.id)}),e("div",{onClick:e=>{e.stopPropagation()},className:Ui.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:e("div",{className:Ui.filesContainer,children:m||0!==(null==r?void 0:r.length)?t("div",{className:Ui.tableContainer,children:[t("div",fe?{className:`header-container ${Ui.headerContainer}`,children:[t(Hi,{type:"secondary",className:"selected-text",children:[fe," ",M("selected"),e(L,{title:ue?M("Deselected"):null,children:e(z,{className:Ui.buttonDeselected,icon:e(zr,{size:16,strokeWidth:be}),onClick:()=>ee&&ee(new Set),children:M("Deselected")})})]}),t(N,{children:[ye&&!1!==(null==pe?void 0:pe.enableEdit)&&e(L,{title:ue?M("Edit"):null,children:e(z,{icon:e(Ir,{size:16,strokeWidth:be}),onClick:()=>{A(me)},disabled:!ye,children:M("Edit")})}),Array.from(b).every(e=>{const t=r.find(t=>t.id===e);return!!t&&(t.isFolder?!1!==(null==pe?void 0:pe.enableMoveFolder):!1!==(null==pe?void 0:pe.enableMoveItem))})&&e(L,{title:ue?M("Move to"):null,children:e(z,{icon:e(Er,{size:16,strokeWidth:be}),onClick:S,children:M("Move to")})}),Array.from(b).every(e=>{const t=r.find(t=>t.id===e);return!!t&&(t.isFolder?!1!==(null==pe?void 0:pe.enableCopyFolder):!1!==(null==pe?void 0:pe.enableCopyItem))})&&e(L,{title:ue?M("Copy"):null,children:e(z,{icon:e(Tr,{size:16,strokeWidth:be}),onClick:_,children:M("Copy")})}),1===fe&&ve&&e(L,{title:ue?M("Rename"):null,children:e(z,{icon:e(Vr,{size:16,strokeWidth:be}),onClick:()=>x(),disabled:1!==fe||!ve,children:M("Rename")})}),!1!==(null==pe?void 0:pe.enableDelete)&&e(L,{title:ue?M("Delete"):null,children:e(z,{danger:!0,icon:e(Ur,{size:16,strokeWidth:be}),onClick:e=>{e.stopPropagation(),e.preventDefault(),C()},children:M("Delete")})})]})]}:{className:Ui.headerContainer,children:[e("div",{className:"search-container",children:e(fi,{placeholder:M("Search"),onSearch:s,className:Ui.searchInput})}),t("div",{className:Ui.actionsBox,children:[e("div",{className:"sort-container",children:t(j,{value:we,onChange:f,className:Ui.sortSelect,popupMatchSelectWidth:!1,suffixIcon:e(Ar,{size:16,strokeWidth:be}),children:[e(Wi,{value:"date-desc",children:M("Newest first")}),e(Wi,{value:"date-asc",children:M("Oldest first")}),e(Wi,{value:"size-desc",children:M("Largest first")}),e(Wi,{value:"size-asc",children:M("Smallest first")}),e(Wi,{value:"name-asc",children:M("A-Z")}),e(Wi,{value:"name-desc",children:M("Z-A")}),e(Wi,{value:"type-asc",children:M("By type")})]})}),e("div",{className:Ui.actionsContainer,children:e(B,{options:[{value:"grid",icon:e(Fr,{size:16,strokeWidth:be})},{value:"table",icon:e(Dr,{size:20,strokeWidth:be})}],value:ne,onChange:e=>re(e)})})]})]}),Fe,!Z&&p.total>p.pageSize&&e("div",{className:Ui.paginationContainer,children:e(V,{current:p.current,pageSize:p.pageSize,total:p.total,onChange:(e,t)=>g({current:e,pageSize:t,total:p.total}),showSizeChanger:!0,showTotal:e=>M("total pages",{total:e})})})]}):t("div",{className:Ui.uploadContainer,children:[t("div",{className:`${Ui.uploadArea} ${ie?Ui.active:""}`,onClick:T,onDragOver:ke,onDragLeave:Ae,onDragEnter:Se,onDrop:Te,children:[e("div",{className:Ui.uploadIcon,children:e($,{})}),e("div",{className:Ui.textTitle,children:M("Select a file or drag and drop it here")}),e("div",{className:Ui.textDescription,children:M("Supported files:")+" jpeg, .svg, .png"})]}),t("div",{className:Ui.buttons,children:[t("button",{className:Ui.btnPhoto,onClick:()=>{te&&te(qr)},children:[e("div",{className:Ui.icon,children:e(G,{})}),t("div",{className:Ui.blockText,children:[e("div",{className:Ui.textTitle,children:M("Stock")}),e("div",{className:Ui.textDescription,children:M("Select an image from our library")})]})]}),t("button",{className:Ui.btnAi,onClick:()=>{te&&te(Zr)},children:[e("div",{className:Ui.icon,children:e(X,{})}),t("div",{className:Ui.blockText,children:[e("div",{className:Ui.textTitle,children:M("AI generation")}),e("div",{className:Ui.textDescription,children:M("Creating an image on demand")})]})]})]})]})})})},$i=({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(),{actions:H}=ri(),{setCurrentMenuFile:W}=H,Y=O.useWatch("folderName",a),X=!Y||0===String(Y).trim().length,K=Array.isArray(b)?b:[],q=v?null===(N=K.find(e=>e.id===v))||void 0===N?void 0:N.name:"",Z=Array.isArray(l)?l:[],J=I?null===(B=Z.find(e=>e.id===I))||void 0===B?void 0:B.name:"",Q=v?K.find(e=>e.id===v):null,ee=(null==Q?void 0:Q.isFolder)||(null==v?void 0:v.startsWith("folder_")),te=()=>{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:X},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=Z.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 file 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:ee?`${U("Rename folder")} ${q}`:U("Rename file",{currentFileName:q})}),open:f,onOk:p,onCancel:g,okText:U("Rename"),cancelText:U("Cancel"),afterClose:()=>{W&&W("")},children:e(O,{form:m,layout:"vertical",children:e(O.Item,{name:"newFileName",label:e("div",{className:"form-label",children:U(ee?"New folder name":"New file name")}),rules:[{required:!0,message:U(ee?"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"),afterClose:()=>{W&&W("")},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:te(),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")," ",J]}),open:S,onOk:A,onCancel:k,okText:U("Rename"),cancelText:U("Cancel"),afterClose:()=>{W&&W("")},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"),afterClose:()=>{W&&W("")},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:te(),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},afterClose:()=>{W&&W("")},children:e("div",{children:U("Are you sure you want to delete the selected items?")})})]})},Gi=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 Xi="button",Ki="foldersTitle",qi="folderActions",Zi="fileCount",Ji="uploadButton",Qi="folderMenu",eo="folderLabelItem",to="foldersTitleItem",no="folderLabel",ro="foldersContainer",io="divider",oo="buttonWrapper",ao="uploadButtonTitle",so="emptyFolderContainer";const lo=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}=_;Gi(l);const{UploadByUrlIcon:k,ExpandArrowIcon:T,CollapseArrowIcon:I,CollapseFolderIcon:O,ExpandFolderIcon:E,EmptyFolderIcon:P}=Vi(),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]),N=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 B=c(async()=>{await d(),n?await N(n):await N("folders")},[d,n,N]),V=h(()=>({items:[{key:"upload-url",label:w("Upload file by URL"),icon:e(Hr,{size:18,strokeWidth:null==A?void 0:A.iconStrokeWidth}),onClick:()=>null==f?void 0:f(!0)}]}),[k,f,w]),U=[{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)}],H=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]),W=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&&H([e])};if(0===a.length||1===a.length&&(!a[0].children||0===a[0].children.length))return[{key:"empty",title:e("div",{className:so,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:no,children:[n.icon||a,e("span",{className:eo,children:n.label})]}),e("div",{className:Zi,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:Ki,onClick:()=>s("folders"),children:t("div",{className:to,children:[e(c?O:E,{size:20,strokeWidth:null==A?void 0:A.iconStrokeWidth}),e("span",{className:eo,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:Ki,onClick:()=>s("folders"),children:t("div",{className:to,children:[e(Ur,{size:20,strokeWidth:null==A?void 0:A.iconStrokeWidth}),e("span",{className:eo,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,H,x,P]),q=h(()=>$(),[$]);return t("div",{className:"sidebar-container",children:[e("div",{className:oo,children:t(R.Button,{type:"primary",size:"large",icon:e(Ar,{size:24,strokeWidth:null==A?void 0:A.iconStrokeWidth}),onClick:B,menu:V,className:Ji,style:{whiteSpace:"nowrap"},children:[e(Lr,{size:24,strokeWidth:null==A?void 0:A.iconStrokeWidth})," ",e("span",{className:ao,children:w("Upload file")})]})}),e(X,{className:"folder-menu",items:U,defaultSelectedKeys:[Xr],onSelect:({key:e})=>W({key:e}),selectedKeys:[m]}),e(K,{className:io}),t("div",{className:ro,children:[e(G,{className:`${Qi} folder-tree`,selectedKeys:[n],defaultSelectedKeys:[n],expandedKeys:F,defaultExpandedKeys:[],onSelect:H,onExpand:Y,treeData:q,switcherIcon:({expanded:t})=>e(t?I:T,{}),showLine:!1}),e("div",{className:qi,children:e(z,{onClick:e=>{e.stopPropagation(),p()},className:Xi,icon:e(Mr,{size:18,strokeWidth:null==A?void 0:A.iconStrokeWidth}),size:"middle"})})]})]})}));lo.displayName="FolderSidebar";var co=Object.defineProperty,uo=(e,t,n)=>(((e,t,n)=>{t in e?co(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n),ho=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function fo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function po(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 go=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===mo}(e)}(e)};var mo="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function vo(e,t){return!1!==t.clone&&t.isMergeableObject(e)?Co(function(e){return Array.isArray(e)?[]:{}}(e),e,t):e}function bo(e,t,n){return e.concat(t).map(function(e){return vo(e,n)})}function yo(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return e.propertyIsEnumerable(t)}):[]}(e))}function wo(e,t){try{return t in e}catch{return!1}}function xo(e,t,n){var r={};return n.isMergeableObject(e)&&yo(e).forEach(function(t){r[t]=vo(e[t],n)}),yo(t).forEach(function(i){(function(e,t){return wo(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,i)||(wo(e,i)&&n.isMergeableObject(t[i])?r[i]=function(e,t){if(!t.customMerge)return Co;var n=t.customMerge(e);return"function"==typeof n?n:Co}(i,n)(e[i],t[i],n):r[i]=vo(t[i],n))}),r}function Co(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||bo,n.isMergeableObject=n.isMergeableObject||go,n.cloneUnlessOtherwiseSpecified=vo;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):xo(e,t,n):vo(t,n)}Co.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return Co(e,n,t)},{})};var _o=Co;function So(e,t){return void 0===t&&(t=15),+parseFloat(Number(e).toPrecision(t))}function Ao(e){var t=e.toString().split(/[eE]/),n=(t[0].split(".")[1]||"").length-+(t[1]||0);return n>0?n:0}function ko(e){if(-1===e.toString().indexOf("e"))return Number(e.toString().replace(".",""));var t=Ao(e);return t>0?So(Number(e)*Math.pow(10,t)):Number(e)}function To(e){Po&&(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 Io(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 Oo(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(e.length>2)return Io(e,Oo);var n=e[0],r=e[1],i=ko(n),o=ko(r),a=Ao(n)+Ao(r),s=i*o;return To(s),s/Math.pow(10,a)}function Eo(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(e.length>2)return Io(e,Eo);var n=e[0],r=e[1],i=ko(n),o=ko(r);return To(i),To(o),Oo(i/o,So(Math.pow(10,Ao(r)-Ao(n))))}var Po=!0;var Mo={strip:So,plus:function e(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(t.length>2)return Io(t,e);var r=t[0],i=t[1],o=Math.pow(10,Math.max(Ao(r),Ao(i)));return(Oo(r,o)+Oo(i,o))/o},minus:function e(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(t.length>2)return Io(t,e);var r=t[0],i=t[1],o=Math.pow(10,Math.max(Ao(r),Ao(i)));return(Oo(r,o)-Oo(i,o))/o},times:Oo,divide:Eo,round:function(e,t){var n=Math.pow(10,t),r=Eo(Math.round(Math.abs(Oo(e,n))),n);return e<0&&0!==r&&(r=Oo(r,-1)),r},digitLength:Ao,float2Fixed:ko,enableBoundaryChecking:function(e){void 0===e&&(e=!0),Po=e}};function Fo(e){return e&&e.Math==Math?e:void 0}var jo="object"==typeof globalThis&&Fo(globalThis)||"object"==typeof window&&Fo(window)||"object"==typeof self&&Fo(self)||"object"==typeof global&&Fo(global)||function(){return this}()||{};function Do(){return jo}function Ro(e,t,n){var r=n||jo,i=r.__SENTRY__=r.__SENTRY__||{};return i[e]||(i[e]=t())}var Lo=Object.prototype.toString;function zo(e){switch(Lo.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return Go(e,Error)}}function No(e,t){return Lo.call(e)===`[object ${t}]`}function Bo(e){return No(e,"ErrorEvent")}function Vo(e){return No(e,"DOMError")}function Uo(e){return No(e,"String")}function Ho(e){return null===e||"object"!=typeof e&&"function"!=typeof e}function Wo(e){return No(e,"Object")}function Yo(e){return typeof Event<"u"&&Go(e,Event)}function $o(e){return Boolean(e&&e.then&&"function"==typeof e.then)}function Go(e,t){try{return e instanceof t}catch{return!1}}function Xo(e,t){try{let r=e;var n=[];let i=0,o=0;let a;for(;r&&i++<5&&(a=Ko(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 Ko(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&&Uo(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 qo 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 Zo=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Jo(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 Qo(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function ea(e){var t="string"==typeof e?function(e){var t=Zo.exec(e);if(!t)throw new qo(`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 Qo({host:o,pass:i,path:l,projectId:c,port:a,protocol:n,publicKey:r})}(e):Qo(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 qo(`Invalid Sentry Dsn: ${t} missing`)}),!n.match(/^\d+$/))throw new qo(`Invalid Sentry Dsn: Invalid projectId ${n}`);if(!function(e){return"http"===e||"https"===e}(r))throw new qo(`Invalid Sentry Dsn: Invalid protocol ${r}`);if(t&&isNaN(parseInt(t,10)))throw new qo(`Invalid Sentry Dsn: Invalid port ${t}`)}(t),t}var ta=Do(),na=["debug","info","warn","error","log","assert","trace"];function ra(e){var t=Do();if(!("console"in t))return e();var n=t.console,r={};na.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 ia(){let e=!1;var t={enable:()=>{e=!0},disable:()=>{e=!1}};return typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__?na.forEach(n=>{t[n]=(...t)=>{e&&ra(()=>{ta.console[n](`Sentry Logger [${n}]:`,...t)})}}):na.forEach(e=>{t[e]=()=>{}}),t}let oa;function aa(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:`${e.substr(0,t)}...`}function sa(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 la(e,t){return!!Uo(e)&&(function(e){return No(e,"RegExp")}(t)?t.test(e):"string"==typeof t&&-1!==e.indexOf(t))}function ca(e,t,n){if(t in e){var r=e[t],i=n(r);if("function"==typeof i)try{ha(i,r)}catch{}e[t]=i}}function ua(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}function ha(e,t){var n=t.prototype||{};e.prototype=t.prototype=n,ua(e,"__sentry_original__",t)}function da(e){return e.__sentry_original__}function fa(e){if(zo(e))return{message:e.message,name:e.name,stack:e.stack,...ga(e)};if(Yo(e)){var t={type:e.type,target:pa(e.target),currentTarget:pa(e.currentTarget),...ga(e)};return typeof CustomEvent<"u"&&Go(e,CustomEvent)&&(t.detail=e.detail),t}return e}function pa(e){try{return function(e){return typeof Element<"u"&&Go(e,Element)}(e)?Xo(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function ga(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 ma(e,t=40){var n=Object.keys(fa(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return aa(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:aa(r,t)}return""}function va(e){return ba(e,new Map)}function ba(e,t){if(Wo(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]=ba(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(ba(e,t))}),n}return e}oa=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__?Ro("logger",ia):ia();function ya(...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 wa(e){return Array.isArray(e)?ya(...e):e}var xa="<anonymous>";function Ca(e){try{return e&&"function"==typeof e&&e.name||xa}catch{return xa}}function _a(){if(!("fetch"in Do()))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function Sa(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}var Aa=Do(),ka={},Ta={};function Ia(e){if(!Ta[e])switch(Ta[e]=!0,e){case"console":"console"in Aa&&na.forEach(function(e){e in Aa.console&&ca(Aa.console,e,function(t){return function(...n){Ea("console",{args:n,level:e}),t&&t.apply(Aa.console,n)}})});break;case"dom":!function(){if("document"in Aa){var e=Ea.bind(null,"dom"),t=La(e,!0);Aa.document.addEventListener("click",t,!1),Aa.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(t=>{var n=Aa[t]&&Aa[t].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(ca(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=La(e);s.handler=l,t.call(this,n,l,i)}s.refCount+=1}catch{}return t.call(this,n,r,i)}}),ca(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 Aa){var e=XMLHttpRequest.prototype;ca(e,"open",function(e){return function(...t){var n=this,r=t[1],i=n.__sentry_xhr__={method:Uo(t[0])?t[0].toUpperCase():t[0],url:t[1]};Uo(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{}Ea("xhr",{args:t,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:n})}};return"onreadystatechange"in n&&"function"==typeof n.onreadystatechange?ca(n,"onreadystatechange",function(e){return function(...t){return o(),e.apply(n,t)}}):n.addEventListener("readystatechange",o),e.apply(n,t)}}),ca(e,"send",function(e){return function(...t){return this.__sentry_xhr__&&void 0!==t[0]&&(this.__sentry_xhr__.body=t[0]),Ea("xhr",{args:t,startTimestamp:Date.now(),xhr:this}),e.apply(this,t)}})}}();break;case"fetch":!function(){if(!_a())return!1;var e=Do();if(Sa(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=Sa(r.contentWindow.fetch)),n.head.removeChild(r)}catch(e){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&oa.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return t}()||ca(Aa,"fetch",function(e){return function(...t){var n={args:t,fetchData:{method:Pa(t),url:Ma(t)},startTimestamp:Date.now()};return Ea("fetch",{...n}),e.apply(Aa,t).then(e=>(Ea("fetch",{...n,endTimestamp:Date.now(),response:e}),e),e=>{throw Ea("fetch",{...n,endTimestamp:Date.now(),error:e}),e})}});break;case"history":!function(){if(!function(){var e=Do(),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=Aa.onpopstate;function t(e){return function(...t){var n=t.length>2?t[2]:void 0;if(n){var r=Fa,i=String(n);Fa=i,Ea("history",{from:r,to:i})}return e.apply(this,t)}}Aa.onpopstate=function(...t){var n=Aa.location.href,r=Fa;if(Fa=n,Ea("history",{from:r,to:n}),e)try{return e.apply(this,t)}catch{}},ca(Aa.history,"pushState",t),ca(Aa.history,"replaceState",t)}();break;case"error":za=Aa.onerror,Aa.onerror=function(e,t,n,r,i){return Ea("error",{column:r,error:i,line:n,msg:e,url:t}),!!za&&za.apply(this,arguments)};break;case"unhandledrejection":Na=Aa.onunhandledrejection,Aa.onunhandledrejection=function(e){return Ea("unhandledrejection",e),!Na||Na.apply(this,arguments)};break;default:return void((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&oa.warn("unknown instrumentation type:",e))}}function Oa(e,t){ka[e]=ka[e]||[],ka[e].push(t),Ia(e)}function Ea(e,t){if(e&&ka[e])for(var n of ka[e]||[])try{n(t)}catch(t){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&oa.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${Ca(n)}\nError:`,t)}}function Pa(e=[]){return"Request"in Aa&&Go(e[0],Request)&&e[0].method?String(e[0].method).toUpperCase():e[1]&&e[1].method?String(e[1].method).toUpperCase():"GET"}function Ma(e=[]){return"string"==typeof e[0]?e[0]:"Request"in Aa&&Go(e[0],Request)?e[0].url:String(e[0])}let Fa;var ja=1e3;let Da,Ra;function La(e,t=!1){return n=>{if(n&&Ra!==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===Da||function(e,t){if(!e||e.type!==t.type)return!0;try{if(e.target!==t.target)return!0}catch{}return!1}(Ra,n))&&(e({event:n,name:r,global:t}),Ra=n),clearTimeout(Da),Da=Aa.setTimeout(()=>{Da=void 0},ja)}}}let za=null;let Na=null;function Ba(){var e=Do(),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 Va(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function Ua(e){const{message:t,event_id:n}=e;if(t)return t;var r=Va(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function Ha(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 Wa(e,t){var n=Va(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 Ya(e){if(e&&e.__sentry_captured__)return!0;try{ua(e,"__sentry_captured__",!0)}catch{}return!1}function $a(e){return Array.isArray(e)?e:[e]}function Ga(){return!(typeof __SENTRY_BROWSER_BUNDLE__<"u"&&__SENTRY_BROWSER_BUNDLE__)&&"[object process]"===Object.prototype.toString.call(typeof process<"u"?process:0)}function Xa(e,t=1/0,n=1/0){try{return qa("",e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function Ka(e,t=3,n=102400){var r=Xa(e,t);return function(e){return function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(e))}(r)>n?Ka(e,t-1,n):r}function qa(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 Wo(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: ${Ca(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 qa("",l.toJSON(),n-1,r,i)}catch{}var c=Array.isArray(t)?[]:{};let u=0;var h=fa(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]=qa(d,f,n-1,r,i),u+=1}return a(t),c}var Za;function Ja(e){return new es(t=>{t(e)})}function Qa(e){return new es((t,n)=>{n(e)})}!function(e){e[e.PENDING=0]="PENDING";e[e.RESOLVED=1]="RESOLVED";e[e.REJECTED=2]="REJECTED"}(Za||(Za={}));class es{__init(){this._state=Za.PENDING}__init2(){this._handlers=[]}constructor(e){es.prototype.__init.call(this),es.prototype.__init2.call(this),es.prototype.__init3.call(this),es.prototype.__init4.call(this),es.prototype.__init5.call(this),es.prototype.__init6.call(this);try{e(this._resolve,this._reject)}catch(e){this._reject(e)}}then(e,t){return new es((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 es((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(Za.RESOLVED,e)}}__init4(){this._reject=e=>{this._setResult(Za.REJECTED,e)}}__init5(){this._setResult=(e,t)=>{if(this._state===Za.PENDING){if($o(t))return void t.then(this._resolve,this._reject);this._state=e,this._value=t,this._executeHandlers()}}}__init6(){this._executeHandlers=()=>{if(this._state!==Za.PENDING){var e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||(this._state===Za.RESOLVED&&e[1](this._value),this._state===Za.REJECTED&&e[2](this._value),e[0]=!0)})}}}}function ts(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 Qa(new qo("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 es((n,r)=>{let i=t.length;if(!i)return n(!0);var o=setTimeout(()=>{e&&e>0&&n(!1)},e);t.forEach(e=>{Ja(e).then(()=>{--i||(clearTimeout(o),n(!0))},r)})})}}}function ns(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 rs=["fatal","error","warning","log","info","debug"];function is(e){return"warn"===e?"warning":rs.includes(e)?e:"log"}var os={nowSeconds:()=>Date.now()/1e3};var as=Ga()?function(){try{var e=function(e,t){return e.require(t)}(module,"perf_hooks");return e.performance}catch{return}}():function(){const{performance:e}=Do();if(e&&e.now)return{now:()=>e.now(),timeOrigin:Date.now()-e.now()}}(),ss=void 0===as?os:{nowSeconds:()=>(as.timeOrigin+as.now())/1e3},ls=os.nowSeconds.bind(os),cs=ss.nowSeconds.bind(ss);function us(e,t=[]){return[e,t]}function hs(e,t){const[n,r]=e;return[n,[...r,t]]}function ds(e,t){e[1].forEach(e=>{var n=e[0].type;t(e,n)})}function fs(e,t){return(t||new TextEncoder).encode(e)}function ps(e,t){const[n,r]=e;let i=JSON.stringify(n);function o(e){"string"==typeof i?i="string"==typeof e?i+e:[fs(i,t),e]:i.push("string"==typeof e?fs(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 gs(e,t){var n="string"==typeof e.data?fs(e.data,t):e.data;return[va({type:"attachment",length:n.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),n]}(()=>{const{performance:e}=Do();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 ms={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default"};function vs(e){return ms[e]}function bs(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 ys(e){var t=cs(),n={sid:Ba(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(e){return va({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&&ws(n,e),n}function ws(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||cs(),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:Ba()),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 xs{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 xs;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&&ws(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 xs?t:this}return e instanceof xs?(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)):Wo(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:ls(),...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([...Cs(),...this._eventProcessors],e,t)}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}_notifyEventProcessors(e,t,n,r=0){return new es((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&&oa.log(`Event processor "${a.id}" dropped event`),$o(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?$a(e.fingerprint):[],this._fingerprint&&(e.fingerprint=e.fingerprint.concat(this._fingerprint)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}}function Cs(){return Ro("globalEventProcessors",()=>[])}function _s(e){Cs().push(e)}var Ss=100;class As{__init(){this._stack=[{}]}constructor(e,t=new xs,n=4){this._version=n,As.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=xs.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:Ba(),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:Ba(),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:Ba();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=Ss}=r.getOptions&&r.getOptions()||{};if(!(o<=0)){var a={timestamp:ls(),...e},s=i?ra(()=>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=Ts(this);try{e(this)}finally{Ts(t)}}getIntegration(e){var t=this.getClient();if(!t)return null;try{return t.getIntegration(e)}catch{return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&oa.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"}),ws(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=Do();const{userAgent:a}=o.navigator||{};var s=ys({release:r,environment:i,...t&&{user:t.getUser()},...a&&{userAgent:a},...e});if(t){var l=t.getSession&&t.getSession();l&&"ok"===l.status&&ws(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=ks().__SENTRY__;if(n&&n.extensions&&"function"==typeof n.extensions[e])return n.extensions[e].apply(this,t);(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&oa.warn(`Extension method ${e} couldn't be found, doing nothing.`)}}function ks(){var e=Do();return e.__SENTRY__=e.__SENTRY__||{extensions:{},hub:void 0},e}function Ts(e){var t=ks(),n=Es(t);return Ps(t,e),n}function Is(){var e=ks();return(!Os(e)||Es(e).isOlderThan(4))&&Ps(e,new As),Ga()?function(e){try{var t=ks().__SENTRY__,n=t&&t.extensions&&t.extensions.domain&&t.extensions.domain.active;if(!n)return Es(e);if(!Os(n)||Es(n).isOlderThan(4)){var r=Es(e).getStackTop();Ps(n,new As(r.client,xs.clone(r.scope)))}return Es(n)}catch{return Es(e)}}(e):Es(e)}function Os(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function Es(e){return Ro("hub",()=>new As,e)}function Ps(e,t){return!!e&&((e.__SENTRY__=e.__SENTRY__||{}).hub=t,!0)}function Ms(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 Fs(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)}?${Ms(e,r)}`}function js(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function Ds(e,t,n,r){var i=js(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:Jo(r)},..."transaction"===e.type&&i&&{trace:va({...i})}}}(e,i,r,t);return delete e.sdkProcessingMetadata,us(a,[[{type:o},e]])}var Rs=[];function Ls(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?$a(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 zs="Not capturing exception because it's already been captured.";class Ns{__init(){this._integrations={}}__init2(){this._integrationsInitialized=!1}__init3(){this._numProcessing=0}__init4(){this._outcomes={}}constructor(e){if(Ns.prototype.__init.call(this),Ns.prototype.__init2.call(this),Ns.prototype.__init3.call(this),Ns.prototype.__init4.call(this),this._options=e,e.dsn){this._dsn=ea(e.dsn);var t=Fs(this._dsn,e);this._transport=e.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}else(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&oa.warn("No DSN provided, client will not do anything.")}captureException(e,t,n){if(Ya(e))return void((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&oa.log(zs));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=Ho(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&&Ya(t.originalException))return void((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&oa.log(zs));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__)&&oa.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),ws(e,{init:!1})):(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&oa.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)):Ja(!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===Rs.indexOf(e.name)&&(e.setupOnce(_s,Is),Rs.push(e.name),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&oa.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__)&&oa.warn(`Cannot retrieve integration ${e.id} from the current Client`),null}}sendEvent(e,t={}){if(this._dsn){let r=Ds(e,this._dsn,this._options._metadata,this._options.tunnel);for(var n of t.attachments||[])r=hs(r,gs(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=js(n);return us({sent_at:(new Date).toISOString(),...i&&{sdk:i},...!!r&&{dsn:Jo(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__)&&oa.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)&&(ws(e,{...n&&{status:"crashed"},errors:e.errors||Number(r||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new es(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||Ba(),timestamp:e.timestamp||ls()};this._applyClientOptions(o),this._applyIntegrationsMetadata(o);let a=n;t.captureContext&&(a=xs.clone(a).update(t.captureContext));let s=Ja(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:Xa(e.data,t,n)}}))},...e.user&&{user:Xa(e.user,t,n)},...e.contexts&&{contexts:Xa(e.contexts,t,n)},...e.extra&&{extra:Xa(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=Xa(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(e=>(e.data&&(e.data=Xa(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=aa(e.message,o));var a=e.exception&&e.exception.values&&e.exception.values[0];a&&a.value&&(a.value=aa(a.value,o));var s=e.request;s&&s.url&&(s.url=aa(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?oa.log(t.message):oa.warn(t)}})}_processEvent(e,t,n){const{beforeSend:r,sampleRate:i}=this.getOptions();if(!this._isEnabled())return Qa(new qo("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"),Qa(new qo(`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 qo("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($o(e))return e.then(e=>{if(!Wo(e)&&null!==e)throw new qo(t);return e},e=>{throw new qo(`beforeSend rejected with ${e}`)});if(!Wo(e)&&null!==e)throw new qo(t);return e}(r(n,t))}).then(r=>{if(null===r)throw this.recordDroppedEvent("before_send",e.type||"error"),new qo("`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 qo?e:(this.captureException(e,{data:{__sentry__:!0},originalException:e}),new qo(`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__)&&oa.error("Error while sending event:",e)}):(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&oa.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 Bs(e,t,n=ts(e.bufferSize||30)){let r={};return{send:function(i){var o=[];if(ds(i,(t,n)=>{var i=vs(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 Ja();var a=us(i[0],o),s=t=>{ds(a,(n,r)=>{e.recordDroppedEvent(t,vs(r))})};return n.add(()=>t({body:ps(a,e.textEncoder)}).then(e=>{void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&oa.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=bs(r,e)},e=>{(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&oa.error("Failed while sending event:",e),s("network_error")})).then(e=>e,e=>{if(e instanceof qo)return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&oa.error("Skipped sending event because buffer is full."),s("queue_overflow"),Ja();throw e})},flush:e=>n.drain(e)}}var Vs="7.14.0";let Us;class Hs{constructor(){Hs.prototype.__init.call(this)}static __initStatic(){this.id="FunctionToString"}__init(){this.name=Hs.id}setupOnce(){Us=Function.prototype.toString,Function.prototype.toString=function(...e){var t=da(this)||this;return Us.apply(t,e)}}}Hs.__initStatic();var Ws=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/];class Ys{static __initStatic(){this.id="InboundFilters"}__init(){this.name=Ys.id}constructor(e={}){this._options=e,Ys.prototype.__init.call(this)}setupOnce(e,t){var n=e=>{var n=t();if(n){var r=n.getIntegration(Ys);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||[],...Ws],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__)&&oa.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${Ua(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__)&&oa.error(`Cannot extract message for event ${Ua(e)}`),[]}return[]}(e).some(e=>t.some(t=>la(e,t)))}(e,t.ignoreErrors)?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&oa.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${Ua(e)}`),!0):function(e,t){if(!t||!t.length)return!1;var n=$s(e);return!!n&&t.some(e=>la(n,e))}(e,t.denyUrls)?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&oa.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${Ua(e)}.\nUrl: ${$s(e)}`),!0):!function(e,t){if(!t||!t.length)return!0;var n=$s(e);return!n||t.some(e=>la(n,e))}(e,t.allowUrls)&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&oa.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${Ua(e)}.\nUrl: ${$s(e)}`),!0)}(e,a)?null:e}}return e};n.id=this.name,e(n)}}function $s(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__)&&oa.error(`Cannot extract url for event ${Ua(e)}`),null}}function Gs(e,t){var n=Ks(e,t),r={type:t&&t.name,value:Zs(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function Xs(e,t){return{exception:{values:[Gs(e,t)]}}}function Ks(e,t){var n=t.stacktrace||t.stack||"",r=function(e){if(e){if("number"==typeof e.framesToPop)return e.framesToPop;if(qs.test(e.message))return 1}return 0}(t);try{return e(n,r)}catch{}return[]}Ys.__initStatic();var qs=/Minified React error #\d+;/i;function Zs(e){var t=e&&e.message;return t?t.error&&"string"==typeof t.error.message?t.error.message:t:"No error message"}function Js(e,t,n,r,i){let o;if(Bo(t)&&t.error)return Xs(e,t.error);if(Vo(t)||function(e){return No(e,"DOMException")}(t)){var a=t;if("stack"in t)o=Xs(e,t);else{var s=a.name||(Vo(a)?"DOMError":"DOMException"),l=a.message?`${s}: ${a.message}`:s;o=Qs(e,l,n,r),Ha(o,l)}return"code"in a&&(o.tags={...o.tags,"DOMException.code":`${a.code}`}),o}return zo(t)?Xs(e,t):Wo(t)||Yo(t)?(o=function(e,t,n,r){var i=Is().getClient(),o=i&&i.getOptions().normalizeDepth,a={exception:{values:[{type:Yo(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:`Non-Error ${r?"promise rejection":"exception"} captured with keys: ${ma(t)}`}]},extra:{__serialized__:Ka(t,o)}};if(n){var s=Ks(e,n);s.length&&(a.exception.values[0].stacktrace={frames:s})}return a}(e,t,n,i),Wa(o,{synthetic:!0}),o):(o=Qs(e,t,n,r),Ha(o,`${t}`),Wa(o,{synthetic:!0}),o)}function Qs(e,t,n,r){var i={message:t};if(r&&n){var o=Ks(e,n);o.length&&(i.exception={values:[{value:t,stacktrace:{frames:o}}]})}return i}var el="Breadcrumbs";class tl{static __initStatic(){this.id=el}__init(){this.name=tl.id}constructor(e){tl.prototype.__init.call(this),this.options={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e}}setupOnce(){this.options.console&&Oa("console",nl),this.options.dom&&Oa("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?Xo(t.event.target,r):Xo(t.event,r)}catch{n="<unknown>"}0!==n.length&&Is().addBreadcrumb({category:`ui.${t.name}`,message:n},{event:t.event,name:t.name,global:t.global})}return t}(this.options.dom)),this.options.xhr&&Oa("xhr",rl),this.options.fetch&&Oa("fetch",il),this.options.history&&Oa("history",ol)}}function nl(e){var t={category:"console",data:{arguments:e.args,logger:"console"},level:is(e.level),message:sa(e.args," ")};if("assert"===e.level){if(!1!==e.args[0])return;t.message=`Assertion failed: ${sa(e.args.slice(1)," ")||"console.assert"}`,t.data.arguments=e.args.slice(1)}Is().addBreadcrumb(t,{input:e.args,level:e.level})}function rl(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 Is().addBreadcrumb({category:"xhr",data:{method:t,url:n,status_code:r},type:"http"},{xhr:e.xhr,input:i})}}function il(e){!e.endTimestamp||e.fetchData.url.match(/sentry_key/)&&"POST"===e.fetchData.method||(e.error?Is().addBreadcrumb({category:"fetch",data:e.fetchData,level:"error",type:"http"},{data:e.error,input:e.args}):Is().addBreadcrumb({category:"fetch",data:{...e.fetchData,status_code:e.response.status},type:"http"},{input:e.args,response:e.response}))}function ol(e){var t=Do();let n=e.from,r=e.to;var i=ns(t.location.href);let o=ns(n);var a=ns(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),Is().addBreadcrumb({category:"navigation",data:{from:n,to:r}})}tl.__initStatic();var al=Do();class sl extends Ns{constructor(e){e._metadata=e._metadata||{},e._metadata.sdk=e._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:"npm:@sentry/browser",version:Vs}],version:Vs},super(e),e.sendClientReports&&al.document&&al.document.addEventListener("visibilitychange",()=>{"hidden"===al.document.visibilityState&&this._flushOutcomes()})}eventFromException(e,t){return function(e,t,n,r){var i=Js(e,t,n&&n.syntheticException||void 0,r);return Wa(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),Ja(i)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return function(e,t,n="info",r,i){var o=Qs(e,t,r&&r.syntheticException||void 0,i);return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),Ja(o)}(this._options.stackParser,e,t,n,this._options.attachStacktrace)}sendEvent(e,t){var n=this.getIntegrationById(el);n&&n.options&&n.options.sentry&&Is().addBreadcrumb({category:"sentry."+("transaction"===e.type?"transaction":"event"),event_id:e.event_id,level:e.level,message:Ua(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__)&&oa.log("Sending outcomes:",e);var t=Fs(this._dsn,this._options),n=function(e,t){return us(t?{dsn:t}:{},[[{type:"client_report"},{timestamp:ls(),discarded_events:e}]])}(e,this._options.tunnel&&Jo(this._dsn));try{var r=Do();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,ps(n));else this._sendEnvelope(n)}catch(e){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&oa.error(e)}}else(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&oa.log("No dsn provided, will not send outcomes");else(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&oa.log("No outcomes to send")}}var ll=Do();let cl;function ul(e,t=function(){if(cl)return cl;if(Sa(ll.fetch))return cl=ll.fetch.bind(ll);var e=ll.document;let t=ll.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__)&&oa.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return cl=t.bind(ll)}()){return Bs(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 hl(e){return Bs(e,function(t){return new es((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 dl="?";function fl(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 pl=/^\s*at (?:(.*\).*?|.*?) ?\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,gl=/\((\S*)(?::(\d+))(?::(\d+))\)/,ml=[30,e=>{var t=pl.exec(e);if(t){if(t[2]&&0===t[2].indexOf("eval")){var n=gl.exec(t[2]);n&&(t[2]=n[1],t[3]=n[2],t[4]=n[3])}const[e,r]=_l(t[1]||dl,t[2]);return fl(r,e,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}}],vl=/^\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,bl=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,yl=[50,e=>{var t=vl.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){var n=bl.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]||dl;return[r,e]=_l(r,e),fl(e,r,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}],wl=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,xl=[40,e=>{var t=wl.exec(e);return t?fl(t[2],t[1]||dl,+t[3],t[4]?+t[4]:void 0):void 0}],Cl=ya(...[ml,yl,xl]),_l=(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]:dl,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};let Sl=0;function Al(){return Sl>0}function kl(e,t={},n){if("function"!=typeof e)return e;try{var r=e.__sentry_wrapped__;if(r)return r;if(da(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=>kl(e,t));return e.apply(this,i)}catch(e){throw Sl+=1,setTimeout(()=>{Sl-=1}),function(e){Is().withScope(e)}(n=>{n.addEventProcessor(e=>(t.mechanism&&(Ha(e,void 0),Wa(e,t.mechanism)),e.extra={...e.extra,arguments:r},e)),function(e,t){Is().captureException(e,{captureContext:t})}(e)}),e}};try{for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(i[o]=e[o])}catch{}ha(i,e),ua(e,"__sentry_wrapped__",i);try{Object.getOwnPropertyDescriptor(i,"name").configurable&&Object.defineProperty(i,"name",{get:()=>e.name})}catch{}return i}class Tl{static __initStatic(){this.id="GlobalHandlers"}__init(){this.name=Tl.id}__init2(){this._installFunc={onerror:Il,onunhandledrejection:Ol}}constructor(e){Tl.prototype.__init.call(this),Tl.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]&&(Pl(t),n(),this._installFunc[t]=void 0)}}}function Il(){Oa("error",e=>{const[t,n,r]=Fl();if(!t.getIntegration(Tl))return;const{msg:i,url:o,line:a,column:s,error:l}=e;if(!(Al()||l&&l.__sentry_own_request__)){var c=void 0===l&&Uo(i)?function(e,t,n,r){var i=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let o=Bo(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 El(l,t,n,r)}(i,o,a,s):El(Js(n,l||i,void 0,r,!1),o,a,s);c.level="error",Ml(t,l,c,"onerror")}})}function Ol(){Oa("unhandledrejection",e=>{const[t,n,r]=Fl();if(!t.getIntegration(Tl))return;let i=e;try{"reason"in e?i=e.reason:"detail"in e&&"reason"in e.detail&&(i=e.detail.reason)}catch{}if(Al()||i&&i.__sentry_own_request__)return!0;var o=Ho(i)?function(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}(i):Js(n,i,void 0,r,!0);o.level="error",Ml(t,i,o,"onunhandledrejection")})}function El(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=Uo(t)&&t.length>0?t:function(){var e=Do();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 Pl(e){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&oa.log(`Global Handler attached: ${e}`)}function Ml(e,t,n,r){Wa(n,{handled:!1,type:r}),e.captureEvent(n,{originalException:t})}function Fl(){var e=Is(),t=e.getClient(),n=t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[e,n.stackParser,n.attachStacktrace]}Tl.__initStatic();var jl=["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 Dl{static __initStatic(){this.id="TryCatch"}__init(){this.name=Dl.id}constructor(e){Dl.prototype.__init.call(this),this._options={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e}}setupOnce(){var e=Do();this._options.setTimeout&&ca(e,"setTimeout",Rl),this._options.setInterval&&ca(e,"setInterval",Rl),this._options.requestAnimationFrame&&ca(e,"requestAnimationFrame",Ll),this._options.XMLHttpRequest&&"XMLHttpRequest"in e&&ca(XMLHttpRequest.prototype,"send",zl);var t=this._options.eventTarget;t&&(Array.isArray(t)?t:jl).forEach(Nl)}}function Rl(e){return function(...t){var n=t[0];return t[0]=kl(n,{mechanism:{data:{function:Ca(e)},handled:!0,type:"instrument"}}),e.apply(this,t)}}function Ll(e){return function(t){return e.apply(this,[kl(t,{mechanism:{data:{function:"requestAnimationFrame",handler:Ca(e)},handled:!0,type:"instrument"}})])}}function zl(e){return function(...t){var n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(e=>{e in n&&"function"==typeof n[e]&&ca(n,e,function(t){var n={mechanism:{data:{function:e,handler:Ca(t)},handled:!0,type:"instrument"}},r=da(t);return r&&(n.mechanism.data.handler=Ca(r)),kl(t,n)})}),e.apply(this,t)}}function Nl(e){var t=Do(),n=t[e]&&t[e].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(ca(n,"addEventListener",function(t){return function(n,r,i){try{"function"==typeof r.handleEvent&&(r.handleEvent=kl(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Ca(r),target:e},handled:!0,type:"instrument"}}))}catch{}return t.apply(this,[n,kl(r,{mechanism:{data:{function:"addEventListener",handler:Ca(r),target:e},handled:!0,type:"instrument"}}),i])}}),ca(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)}}))}Dl.__initStatic();class Bl{static __initStatic(){this.id="LinkedErrors"}__init(){this.name=Bl.id}constructor(e={}){Bl.prototype.__init.call(this),this._key=e.key||"cause",this._limit=e.limit||5}setupOnce(){var e=Is().getClient();!e||_s((t,n)=>{var r=Is().getIntegration(Bl);return r?function(e,t,n,r,i){if(!(r.exception&&r.exception.values&&i&&Go(i.originalException,Error)))return r;var o=Vl(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 Vl(e,t,n,r,i=[]){if(!Go(n[r],Error)||i.length+1>=t)return i;var o=Gs(e,n[r]);return Vl(e,t,n[r],r,[o,...i])}Bl.__initStatic();var Ul=Do();class Hl{constructor(){Hl.prototype.__init.call(this)}static __initStatic(){this.id="HttpContext"}__init(){this.name=Hl.id}setupOnce(){_s(e=>{if(Is().getIntegration(Hl)){if(!Ul.navigator&&!Ul.location&&!Ul.document)return e;var t=e.request&&e.request.url||Ul.location&&Ul.location.href;const{referrer:r}=Ul.document||{},{userAgent:i}=Ul.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})}}Hl.__initStatic();class Wl{constructor(){Wl.prototype.__init.call(this)}static __initStatic(){this.id="Dedupe"}__init(){this.name=Wl.id}setupOnce(e,t){var n=e=>{var n=t().getIntegration(Wl);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||!$l(e,t)||!Yl(e,t))}(e,t)&&!function(e,t){var n=Gl(t),r=Gl(e);return!!(n&&r&&n.type===r.type&&n.value===r.value&&$l(e,t)&&Yl(e,t))}(e,t))}(e,n._previousEvent))return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&oa.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 Yl(e,t){let n=Xl(e),r=Xl(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 $l(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 Gl(e){return e.exception&&e.exception.values&&e.exception.values[0]}function Xl(e){var t=e.exception;if(t)try{return t.values[0].stacktrace.frames}catch{return}}Wl.__initStatic();var Kl=[new Ys,new Hs,new Dl,new tl,new Tl,new Bl,new Wl,new Hl];function ql(e={}){if(void 0===e.defaultIntegrations&&(e.defaultIntegrations=Kl),void 0===e.release){var t=Do();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:wa(e.stackParser||Cl),integrations:Ls(e),transport:e.transport||(_a()?ul:hl)};(function(e,t){!0===t.debug&&(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__?oa.enable():console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle."));var n=Is(),r=n.getScope();r&&r.update(t.initialScope);var i=new e(t);n.bindClient(i)})(sl,n),e.autoSessionTracking&&function(){var e=Do(),t=e.document;if(typeof t>"u")return void((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&oa.warn("Session tracking in non-browser environment with @sentry/browser is not supported."));var n=Is();!n.captureSession||(Zl(n),Oa("history",({from:e,to:t})=>{void 0===e||e===t||Zl(Is())}))}()}function Zl(e){e.startSession({ignoreDuration:!0}),e.captureSession()}var Jl={exports:{}},Ql={},ec=i,tc=Symbol.for("react.element"),nc=Symbol.for("react.fragment"),rc=Object.prototype.hasOwnProperty,ic=ec.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,oc={key:!0,ref:!0,__self:!0,__source:!0};
|
|
9
|
+
*/var Gr=(Wr||(Wr=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,H=/(__e\(.*?\)|\b__t\)) \+\n'';/g,W=/&(?:amp|lt|gt|quot|#39);/g,Y=/[&<>"']/g,$=RegExp(W.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+")",He="(?:['’](?:d|ll|m|re|s|t|ve))?",We="(?:['’](?: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+"+"+He+"(?="+[Oe,Ne,"$"].join("|")+")",Ue+"+"+We+"(?="+[Oe,Ne+Ve,"$"].join("|")+")",Ne+"?"+Ve+"+"+He,Ne+"+"+We,"\\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&>.binding&>.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=Ht("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 Ht(e){return function(t){return null==t?n:t[e]}}function Wt(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=Wt({"À":"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=Wt({"&":"&","<":"<",">":">",'"':""","'":"'"});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=Wt({"&":"&","<":"<",">":">",""":'"',"'":"'"}),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,He=t.Uint8Array,We=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,Wt=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)&&!Ha(e)&&!(e instanceof Hn)){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 Hn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function Wn(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=Ha(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=Ha(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,Hn.prototype=Bn(Vn.prototype),Hn.prototype.constructor=Hn,Wn.prototype.clear=function(){this.__data__=In?In(null):{},this.size=0},Wn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Wn.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},Wn.prototype.has=function(e){var t=this.__data__;return In?t[e]!==n:je.call(t,e)},Wn.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 Wn,map:new(Sn||Yn),string:new Wn}},$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 Ha(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=Ha(e),l=Ha(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 He(e),new He(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?Ha(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=Ha(c),p=!f&&Ga(c),g=!f&&!p&&ls(c);h=c,f||p||g?Ha(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 Hr(e,t,n){t=t.length?Pt(t,function(e){return Ha(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 Wr(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(Ha(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 Hn&&(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 Ha(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=We?We(n):new e.constructor(n);return e.copy(r),r}function _i(e){var t=new e.constructor(e.byteLength);return new He(t).set(new He(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=Ha(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&&Ha(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 Hi(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 Wi(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))&&Wt(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,Wo),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)&&(Ha(e)||Ua(e))}function mo(e){return"function"!=typeof e.constructor||_o(e)?{}:Bn(Ye(e))}function vo(e){return Ha(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(Ha(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 Hn.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 Hn)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 Ho(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 Wo(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,Ht(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 Hn&&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(Ho);function va(e,t){return(Ha(e)?At:hr)(e,so(t,3))}function ba(e,t){return(Ha(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(Ha(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]]),Hr(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&&Ha(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")},Ha=we.isArray,Wa=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||!Ha(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 Wr(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),Wr(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 Hs=Di(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),Ws=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)?Ht(Ro(e)):function(e){return function(t){return Cr(t,e)}}(e)}var dl=Wi(),fl=Wi(!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 Ha(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(Ha(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(Ha(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=Wo,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?[]:(Ha(t)||(t=null==t?[]:[t]),Ha(r=i?n:r)||(r=null==r?[]:[r]),Hr(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(Ha(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),(Ha(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(Ha(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 Ha(e)?Pt(e,Ro):ss(e)?[e]:Ii(Do(vs(e)))},Nn.toPlainObject=ms,Nn.transform=function(e,t,n){var r=Ha(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=Ha(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=Ho,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=Ha,Nn.isArrayBuffer=Wa,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)&&(Ha(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&&Wt(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=Hs,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=Ws,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 Hi(gt(i),n)+e+Hi(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+Hi(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?Hi(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=Ha(e)?Ft:Yt,i=arguments.length<3;return r(e,so(t,4),n,i,hr)},Nn.reduceRight=function(e,t,n){var r=Ha(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(Ha(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=Ha(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(H,"$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(W,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){Hn.prototype[e]=function(r){r=r===n?1:vn(fs(r),0);var i=this.__filtered__&&!t?new Hn(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},Hn.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;Hn.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":"");Hn.prototype[e]=function(){return this[n](1).value()[0]}}),At(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");Hn.prototype[e]=function(){return this.__filtered__?new Hn(this):this[n](1)}}),Hn.prototype.compact=function(){return this.filter(nl)},Hn.prototype.find=function(e){return this.filter(e).head()},Hn.prototype.findLast=function(e){return this.reverse().find(e)},Hn.prototype.invokeMap=Kr(function(e,t){return"function"==typeof e?new Hn(this):this.map(function(n){return Or(n,e,t)})}),Hn.prototype.reject=function(e){return this.filter(ja(so(e)))},Hn.prototype.slice=function(e,t){e=fs(e);var r=this;return r.__filtered__&&(e>0||t<0)?new Hn(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)},Hn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Hn.prototype.toArray=function(){return this.take(d)},yr(Hn.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 Hn,c=s[0],u=l||Ha(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 Hn(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(Ha(i)?i:[],e)}return this[n](function(n){return t.apply(Ha(n)?n:[],e)})}}),yr(Hn.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}],Hn.prototype.clone=function(){var e=new Hn(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},Hn.prototype.reverse=function(){if(this.__filtered__){var e=new Hn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Hn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Ha(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 Hn){var t=e;return this.__actions__.length&&(t=new Hn(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})=>{var r;const[s,l]=o([]),[u,h]=o([]),[d,f]=o(null),[p,g]=o(n.searchQuery||""),[m,v]=o(n.sortBySize||"name"),{config:b}=n,[y,w]=o("date"),[x,C]=o("desc"),[_,S]=o([{id:"folders",name:"Папки"}]),[A,k]=o(new Set),[T,I]=o("");i.useEffect(()=>{k(new Set)},[]);const E=i.useRef(null);i.useEffect(()=>{if(n.onChangeSelection&&E.current!==A){if(null!==E.current){const e=(Array.isArray(u)?u:[]).filter(e=>A.has(e.id));n.onChangeSelection(e)}E.current=A}},[u,A,n.onChangeSelection,n]);const[P,M]=o(!1),[F,j]=o(Xr);a(()=>{(null==b?void 0:b.activeLibraryItem)&&j&&j(null==b?void 0:b.activeLibraryItem)},[null==b?void 0:b.activeLibraryItem,j]);const[D,R]=o({current:1,pageSize:12,total:0}),[L]=O.useForm(),[z]=O.useForm(),[N]=O.useForm(),[B]=O.useForm(),[V]=O.useForm(),[U]=O.useForm(),[H,W]=o(!1),[Y,$]=o(!1),[G,X]=o(!1),[K,q]=o(!1),[Z,J]=o(!1),[Q,ee]=o(!1),[te,ne]=o(!1),[re,ie]=o(null),[oe,ae]=o(null),se=c(e=>{R(t=>Object.assign(Object.assign({},t),e))},[R]),le=c(e=>{k(null!=e?e:new Set)},[k]),ce={folders:s,files:u,selectedFolder:d,searchTerm:p,sortField:m,sortBy:y,sortOrder:x,pathHistory:_,selectedFiles:A,currentMenuFile:T,loading:P,pagination:D,isModalVisible:H,isUrlModalVisible:Y,isRenameModalVisible:G,isMoveModalVisible:K,isRenameFolderModalVisible:Z,isCopyModalVisible:Q,isDeleteConfirmVisible:te,form:L,urlForm:z,renameForm:N,moveForm:B,renameFolderForm:V,copyForm:U,fileToRename:re,folderToRename:oe,activeLibraryItem:F,multiSelect:null===(r=null==b?void 0:b.multiSelect)||void 0===r||r},ue={setFolders:l,setFiles:h,setSelectedFolder:f,setSearchTerm:g,setSortField:v,setSortBy:w,setSortOrder:C,setPathHistory:S,setSelectedFiles:le,setLoading:M,setPagination:se,setIsModalVisible:W,setIsUrlModalVisible:$,setIsRenameModalVisible:X,setIsMoveModalVisible:q,setIsRenameFolderModalVisible:J,setIsCopyModalVisible:ee,setIsDeleteConfirmVisible:ne,setFileToRename:ie,setFolderToRename:ae,updatePathHistoryOnFolderRename:(e,t)=>{S(n=>n.map(n=>n.id===e?Object.assign(Object.assign({},n),{name:t}):n))},setActiveLibraryItem:j,setCurrentMenuFile:I},he={state:ce,actions:ue,options:n};return e(ni.Provider,{value:he,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(()=>{var e;const t=null!==(e=null==b?void 0:b.defaultFolderName)&&void 0!==e?e:a("Новая папка");h.setFieldsValue({folderName:t}),null==m||m(!0)},[h,m,a,null==b?void 0:b.defaultFolderName]),_=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=!1!==e.multiSelect,o=c(e=>{if(!n||!r)return;const t=n,o=new Set(i?t:[]);t.has(e)?o.delete(e):o.add(e),r(o)},[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=()=>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"})}),ki=()=>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"})}),Ti=()=>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"})]}),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:"#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"})]}),Oi=t=>e(oe,Object.assign({component:bi},t)),Ei=t=>e(oe,Object.assign({component:yi},t)),Pi=t=>e(oe,Object.assign({component:wi},t)),Mi=t=>e(oe,Object.assign({component:xi},t)),Fi=t=>e(oe,Object.assign({component:Ci},t)),ji=t=>e(oe,Object.assign({component:_i},t)),Di=t=>e(oe,Object.assign({component:Si},t)),Ri=t=>e(oe,Object.assign({component:Ai},t)),Li=t=>e(oe,Object.assign({component:ki},t)),zi=t=>e(oe,Object.assign({component:Ti},t)),Ni=t=>e(oe,Object.assign({component:Ii},t)),Bi="filemanager_view_mode",Vi=()=>{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",Di,e),EmptyFolderIcon:e=>n("folderPreview",Ri,e),GridViewIcon:e=>n("gridView",ce,e),ListViewIcon:e=>n("listView",le,e),DropZoneFileIcon:e=>n("folderPreview",Li,e),BigStockIcon:e=>n("folderPreview",zi,e),BigAIIcon:e=>n("folderPreview",Ni,e),getCustomIcon:n}};var Ui={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:Hi}=F,{Option:Wi}=j,Yi=({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;const{t:M}=An(),{FolderPreviewIcon:F,DropZoneFileIcon:$,BigStockIcon:G,BigAIIcon:X}=Vi(),{options:K,actions:q}=ri(),Z=null===(I=null==K?void 0:K.config)||void 0===I?void 0:I.disablePagination,{dataProviders:J}=K,{setCurrentMenuFile:Q,setSelectedFiles:ee,setActiveLibraryItem:te}=q,{viewMode:ne,setViewMode:re}=(()=>{const[e,t]=o(()=>{try{return localStorage.getItem(Bi)||"table"}catch(e){return"table"}}),n=c(e=>{t(e);try{localStorage.setItem(Bi,e)}catch(e){console.warn("Не удалось сохранить режим отображения:",e)}},[]),r=c(()=>{n("table"===e?"grid":"table")},[e,n]);return{viewMode:e,setViewMode:n,toggleViewMode:r}})(),[ie,oe]=o(!1),[ae,se]=o({}),[le,ce]=o(null),[ue,he]=o(!1),de=u(0);a(()=>{const e=()=>{he(window.innerWidth<1200)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);const fe=b.size,pe=(null===(O=K.config)||void 0===O?void 0:O.features)||{},ge=i.useMemo(()=>Array.from(b)[0],[b]),me=i.useMemo(()=>ge?r.find(e=>e.id===ge):void 0,[ge,r]),ve=(null==me?void 0:me.isFolder)?!1!==(null==pe?void 0:pe.enableRenameFolder):!1!==(null==pe?void 0:pe.enableRenameFile),be=null===(P=K.config)||void 0===P?void 0:P.iconStrokeWidth,ye=i.useMemo(()=>{var e,t;if(1!==fe||!me||me.isFolder)return!1;let n=!1;if(me.type&&me.type.startsWith("image/"))n=!0;else if(me.extension){const e=me.extension.toLowerCase();n=ei.includes(e)}else{const t=null===(e=me.name.split(".").pop())||void 0===e?void 0:e.toLowerCase();n=!!t&&ei.includes(t)}return console.warn("isImageSelected проверка:",{fileName:me.name,fileType:me.type,fileExtension:me.extension,nameExtension:null===(t=me.name.split(".").pop())||void 0===t?void 0:t.toLowerCase(),isImage:n,IMAGE_EXTENSIONS:ei}),n},[fe,me]),we=`${h}-${d}`,xe=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]),Ce=c(async e=>{try{if(null==J?void 0:J.getChildrenCount)return await J.getChildrenCount("folders"===e?void 0:e);if(null==J?void 0:J.getFiles){const{files:t,pagination:n}=await J.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}},[J]),_e=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 Ce(e.id)});await Promise.all(n),se(t)},[r,Ce]);a(()=>{_e()},[_e]);const Se=c(e=>{e.preventDefault(),e.stopPropagation(),de.current+=1,e.dataTransfer.types&&e.dataTransfer.types.includes("Files")&&oe(!0)},[]),Ae=c(e=>{e.preventDefault(),e.stopPropagation(),de.current-=1,0===de.current&&oe(!1)},[]),ke=c(e=>{e.preventDefault(),e.stopPropagation()},[]),Te=c(e=>{if(e.preventDefault(),e.stopPropagation(),oe(!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]),Ie=c((e=()=>{})=>{if(le)return;const t=setTimeout(()=>{e(),ce(null)},300);ce(t)},[le]),Oe=c(e=>{le&&(clearTimeout(le),ce(null)),e()},[le]),Ee=c(t=>{const n=[];t.isFolder||!1===(null==pe?void 0:pe.enableEdit)||n.push({key:"edit",label:M("Edit"),icon:e(Ir,{size:16,strokeWidth:be})}),(t.isFolder?!1!==(null==pe?void 0:pe.enableMoveFolder):!1!==(null==pe?void 0:pe.enableMoveItem))&&n.push({key:"move",label:M("Move to"),icon:e(Er,{size:16,strokeWidth:be})}),(t.isFolder?!1!==(null==pe?void 0:pe.enableCopyFolder):!1!==(null==pe?void 0:pe.enableCopyItem))&&n.push({key:"copy",label:M("Copy"),icon:e(Tr,{size:16,strokeWidth:be})});return(t.isFolder?!1!==(null==pe?void 0:pe.enableRenameFolder):!1!==(null==pe?void 0:pe.enableRenameFile))&&n.push({key:"rename",label:M("Rename"),icon:e(Vr,{size:16,strokeWidth:be})}),!1!==pe.enableDelete&&n.push({key:"delete",label:M("Delete"),icon:e(Ur,{size:16,strokeWidth:be}),style:{color:"#ff4d4f"}}),n},[pe,M,be]),Pe=e=>({key:t})=>{const n=r.find(t=>t.id===e);switch(Q&&(null==n?void 0:n.id)&&Q(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:Q&&Q("")}},Me=[{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:Ui.fileManagerTableFolder,children:e("div",{className:Ui.fileManagerTableFolderInner,children:e(ji,{className:Ui.tableFolderIcon,style:{width:40,height:40}})})}):e(vi,{className:`${Ui.imagePreview} ${Ui.tableImagePreview}`,src:n.thumbnail||n.thumbnailUrl||n.url,alt:n.name,width:40,height:40,preview:!0,file:n})},{title:M("Name"),width:"calc(100% - 430px)",dataIndex:"name",key:"name",className:Ui.fileNameCol,render:(e,n)=>{const r=n.isFolder&&ae[n.id]||0,i=M(1===r?"item":"items");return t("div",{className:Ui.fileName,children:[e||M("No name"),n.isFolder&&t("div",{className:Ui.fileItemCount,children:[r," ",i]})]})}},{title:M("Dimensions"),key:"dimensions",width:100,render:(t,n)=>e("div",{className:Ui.fileSize,children:n.isFolder?M("Folder"):M("File")})},...xe?[{title:M("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:Ui.fileDate,children:M("date_of_add",{date:(o=i,`${o.getDate()} ${[M("months.january"),M("months.february"),M("months.march"),M("months.april"),M("months.may"),M("months.june"),M("months.july"),M("months.august"),M("months.september"),M("months.october"),M("months.november"),M("months.december")][o.getMonth()]} ${o.getFullYear()}`)})});var o}}]:[],{width:40,title:"",dataIndex:"",key:"x",onCell:()=>({style:{padding:0}}),render:(t,n)=>e(R,{arrow:!0,placement:"bottom",menu:{items:Ee(n),onClick:Pe(n.id)},trigger:["hover"],children:e("span",{className:`${Ui.tableMenu} tableMenuButton`,onClick:e=>{e.stopPropagation(),e.preventDefault()},children:e(Or,{size:16,strokeWidth:be})})})}],Fe="table"===ne?e(U,{dataSource:r,columns:Me,rowKey:"id",pagination:!1,loading:m,rowClassName:e=>(null==b?void 0:b.has(e.id))?Ui.selectedRow:"",tableLayout:"fixed",onRow:e=>({onClick:t=>{const n=t.target;Ie(()=>{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=>{Oe(()=>{t.stopPropagation(),t.preventDefault();const n=t.target;e.isFolder?v(e):n.closest(".ant-image")||n.closest(".ant-image-preview-wrap")||!K.onEditorOk||(console.warn("onEditorOk"),K.onEditorOk(e))})}}),showHeader:!1}):e(H,{gutter:[16,16],className:Ui.gridRow,style:{gap:20,padding:"0 24px 24px",margin:0},children:r.map(r=>e(W,{className:Ui.gridCard_col,style:{padding:0},children:t(Y,{hoverable:!0,cover:e("div",{className:r.isFolder?Ui.gridPreviewContainerFolder:Ui.gridPreviewContainer,onClick:e=>{e.stopPropagation(),r.isFolder&&Ie(()=>{y(r.id)})},onDoubleClick:e=>{e.stopPropagation(),Oe(()=>{r.isFolder&&v(r)})},children:r.isFolder?e("div",{className:Ui.gridFolderIcon,children:e(F,{className:Ui.gridFolderIconImage})}):e(vi,{src:r.thumbnail||r.thumbnailUrl||r.url,alt:r.name,className:Ui.gridImagePreview,preview:!0,file:r})}),className:`${Ui.gridCard} ${(null==b?void 0:b.has(r.id))?Ui.gridCardSelected:""}`,onClick:e=>{e.stopPropagation(),e.preventDefault();const t=e.target;t.closest(".gridFileMenuButton")||t.closest(".ant-dropdown-menu")||Ie(()=>y(r.id))},onDoubleClick:e=>{e.stopPropagation(),Oe(()=>{r.isFolder&&v(r)})},children:[t("div",{className:Ui.gridCardContent,onDoubleClick:e=>{e.stopPropagation(),e.preventDefault(),Oe(()=>{K.onEditorOk&&K.onEditorOk(r)})},onClick:e=>{e.stopPropagation(),e.preventDefault();const t=e.target;t.closest(".gridFileMenuButton")||t.closest(".ant-dropdown-menu")||Ie(()=>y(r.id))},children:[e("div",{className:Ui.gridFileName,children:r.name||M("Untitled")}),e("div",{className:Ui.gridFileInfo,children:r.isFolder?(()=>{const e=ae[r.id]||0;return`${e} ${M(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:Ui.gridFileMenu,children:e(R,{menu:{items:Ee(r),onClick:Pe(r.id)},arrow:!0,placement:"bottom",trigger:["hover"],children:e(z,{type:"default",className:`${Ui.gridFileMenuButton} gridFileMenuButton`,onClick:()=>{},children:e(Or,{size:16,strokeWidth:be})})},r.id)}),e("div",{onClick:e=>{e.stopPropagation()},className:Ui.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:e("div",{className:Ui.filesContainer,children:m||0!==(null==r?void 0:r.length)?t("div",{className:Ui.tableContainer,children:[t("div",fe?{className:`header-container ${Ui.headerContainer}`,children:[t(Hi,{type:"secondary",className:"selected-text",children:[t("div",{children:[fe," ",M("selected")]}),e(L,{title:ue?M("Deselected"):null,children:e(z,{className:Ui.buttonDeselected,icon:e(zr,{size:16,strokeWidth:be}),onClick:()=>ee&&ee(new Set),children:M("Deselected")})})]}),t(N,{children:[ye&&!1!==(null==pe?void 0:pe.enableEdit)&&e(L,{title:ue?M("Edit"):null,children:e(z,{icon:e(Ir,{size:16,strokeWidth:be}),onClick:()=>{A(me)},disabled:!ye,children:M("Edit")})}),Array.from(b).every(e=>{const t=r.find(t=>t.id===e);return!!t&&(t.isFolder?!1!==(null==pe?void 0:pe.enableMoveFolder):!1!==(null==pe?void 0:pe.enableMoveItem))})&&e(L,{title:ue?M("Move to"):null,children:e(z,{icon:e(Er,{size:16,strokeWidth:be}),onClick:S,children:M("Move to")})}),Array.from(b).every(e=>{const t=r.find(t=>t.id===e);return!!t&&(t.isFolder?!1!==(null==pe?void 0:pe.enableCopyFolder):!1!==(null==pe?void 0:pe.enableCopyItem))})&&e(L,{title:ue?M("Copy"):null,children:e(z,{icon:e(Tr,{size:16,strokeWidth:be}),onClick:_,children:M("Copy")})}),1===fe&&ve&&e(L,{title:ue?M("Rename"):null,children:e(z,{icon:e(Vr,{size:16,strokeWidth:be}),onClick:()=>x(),disabled:1!==fe||!ve,children:M("Rename")})}),!1!==(null==pe?void 0:pe.enableDelete)&&e(L,{title:ue?M("Delete"):null,children:e(z,{danger:!0,icon:e(Ur,{size:16,strokeWidth:be}),onClick:e=>{e.stopPropagation(),e.preventDefault(),C()},children:M("Delete")})})]})]}:{className:Ui.headerContainer,children:[e("div",{className:"search-container",children:e(fi,{placeholder:M("Search"),onSearch:s,className:Ui.searchInput})}),t("div",{className:Ui.actionsBox,children:[e("div",{className:"sort-container",children:t(j,{value:we,onChange:f,className:Ui.sortSelect,popupMatchSelectWidth:!1,suffixIcon:e(Ar,{size:16,strokeWidth:be}),children:[e(Wi,{value:"date-desc",children:M("Newest first")}),e(Wi,{value:"date-asc",children:M("Oldest first")}),e(Wi,{value:"size-desc",children:M("Largest first")}),e(Wi,{value:"size-asc",children:M("Smallest first")}),e(Wi,{value:"name-asc",children:M("A-Z")}),e(Wi,{value:"name-desc",children:M("Z-A")}),e(Wi,{value:"type-asc",children:M("By type")})]})}),e("div",{className:Ui.actionsContainer,children:e(B,{options:[{value:"grid",icon:e(Fr,{size:16,strokeWidth:be})},{value:"table",icon:e(Dr,{size:20,strokeWidth:be})}],value:ne,onChange:e=>re(e)})})]})]}),Fe,!Z&&p.total>p.pageSize&&e("div",{className:Ui.paginationContainer,children:e(V,{current:p.current,pageSize:p.pageSize,total:p.total,onChange:(e,t)=>g({current:e,pageSize:t,total:p.total}),showSizeChanger:!0,showTotal:e=>M("total pages",{total:e})})})]}):t("div",{className:Ui.uploadContainer,children:[t("div",{className:`${Ui.uploadArea} ${ie?Ui.active:""}`,onClick:T,onDragOver:ke,onDragLeave:Ae,onDragEnter:Se,onDrop:Te,children:[e("div",{className:Ui.uploadIcon,children:e($,{})}),e("div",{className:Ui.textTitle,children:M("Select a file or drag and drop it here")}),e("div",{className:Ui.textDescription,children:M("Supported files:")+" jpeg, .svg, .png"})]}),t("div",{className:Ui.buttons,children:[t("button",{className:Ui.btnPhoto,onClick:()=>{te&&te(qr)},children:[e("div",{className:Ui.icon,children:e(G,{})}),t("div",{className:Ui.blockText,children:[e("div",{className:Ui.textTitle,children:M("Stock")}),e("div",{className:Ui.textDescription,children:M("Select an image from our library")})]})]}),t("button",{className:Ui.btnAi,onClick:()=>{te&&te(Zr)},children:[e("div",{className:Ui.icon,children:e(X,{})}),t("div",{className:Ui.blockText,children:[e("div",{className:Ui.textTitle,children:M("AI generation")}),e("div",{className:Ui.textDescription,children:M("Creating an image on demand")})]})]})]})]})})})},$i=({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(),{actions:H}=ri(),{setCurrentMenuFile:W}=H,Y=O.useWatch("folderName",a),X=!Y||0===String(Y).trim().length,K=Array.isArray(b)?b:[],q=v?null===(N=K.find(e=>e.id===v))||void 0===N?void 0:N.name:"",Z=Array.isArray(l)?l:[],J=I?null===(B=Z.find(e=>e.id===I))||void 0===B?void 0:B.name:"",Q=v?K.find(e=>e.id===v):null,ee=(null==Q?void 0:Q.isFolder)||(null==v?void 0:v.startsWith("folder_")),te=()=>{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:X},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=Z.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 file 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:ee?`${U("Rename folder")} ${q}`:U("Rename file",{currentFileName:q})}),open:f,onOk:p,onCancel:g,okText:U("Rename"),cancelText:U("Cancel"),afterClose:()=>{W&&W("")},children:e(O,{form:m,layout:"vertical",children:e(O.Item,{name:"newFileName",label:e("div",{className:"form-label",children:U(ee?"New folder name":"New file name")}),rules:[{required:!0,message:U(ee?"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"),afterClose:()=>{W&&W("")},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:te(),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")," ",J]}),open:S,onOk:A,onCancel:k,okText:U("Rename"),cancelText:U("Cancel"),afterClose:()=>{W&&W("")},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"),afterClose:()=>{W&&W("")},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:te(),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},afterClose:()=>{W&&W("")},children:e("div",{children:U("Are you sure you want to delete the selected items?")})})]})},Gi=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 Xi="button",Ki="foldersTitle",qi="folderActions",Zi="fileCount",Ji="uploadButton",Qi="folderMenu",eo="folderLabelItem",to="foldersTitleItem",no="folderLabel",ro="foldersContainer",io="divider",oo="buttonWrapper",ao="uploadButtonTitle",so="emptyFolderContainer";const lo=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}=_;Gi(l);const{UploadByUrlIcon:k,ExpandArrowIcon:T,CollapseArrowIcon:I,CollapseFolderIcon:O,ExpandFolderIcon:E,EmptyFolderIcon:P}=Vi(),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]),N=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 B=c(async()=>{await d(),n?await N(n):await N("folders")},[d,n,N]),V=h(()=>({items:[{key:"upload-url",label:w("Upload file by URL"),icon:e(Hr,{size:18,strokeWidth:null==A?void 0:A.iconStrokeWidth}),onClick:()=>null==f?void 0:f(!0)}]}),[k,f,w]),U=[{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)}],H=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]),W=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&&H([e])};if(0===a.length||1===a.length&&(!a[0].children||0===a[0].children.length))return[{key:"empty",title:e("div",{className:so,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:no,children:[n.icon||a,e("span",{className:eo,children:n.label})]}),e("div",{className:Zi,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:Ki,onClick:()=>s("folders"),children:t("div",{className:to,children:[e(c?O:E,{size:20,strokeWidth:null==A?void 0:A.iconStrokeWidth}),e("span",{className:eo,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:Ki,onClick:()=>s("folders"),children:t("div",{className:to,children:[e(Ur,{size:20,strokeWidth:null==A?void 0:A.iconStrokeWidth}),e("span",{className:eo,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,H,x,P]),q=h(()=>$(),[$]);return t("div",{className:"sidebar-container",children:[e("div",{className:oo,children:t(R.Button,{type:"primary",size:"large",icon:e(Ar,{size:24,strokeWidth:null==A?void 0:A.iconStrokeWidth}),onClick:B,menu:V,className:Ji,style:{whiteSpace:"nowrap"},children:[e(Lr,{size:24,strokeWidth:null==A?void 0:A.iconStrokeWidth})," ",e("span",{className:ao,children:w("Upload file")})]})}),e(X,{className:"folder-menu",items:U,defaultSelectedKeys:[Xr],onSelect:({key:e})=>W({key:e}),selectedKeys:[m]}),e(K,{className:io}),t("div",{className:ro,children:[e(G,{className:`${Qi} folder-tree`,selectedKeys:[n],defaultSelectedKeys:[n],expandedKeys:F,defaultExpandedKeys:[],onSelect:H,onExpand:Y,treeData:q,switcherIcon:({expanded:t})=>e(t?I:T,{}),showLine:!1}),e("div",{className:qi,children:e(z,{onClick:e=>{e.stopPropagation(),p()},className:Xi,icon:e(Mr,{size:18,strokeWidth:null==A?void 0:A.iconStrokeWidth}),size:"middle"})})]})]})}));lo.displayName="FolderSidebar";var co=Object.defineProperty,uo=(e,t,n)=>(((e,t,n)=>{t in e?co(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n),ho=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function fo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function po(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 go=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===mo}(e)}(e)};var mo="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function vo(e,t){return!1!==t.clone&&t.isMergeableObject(e)?Co(function(e){return Array.isArray(e)?[]:{}}(e),e,t):e}function bo(e,t,n){return e.concat(t).map(function(e){return vo(e,n)})}function yo(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return e.propertyIsEnumerable(t)}):[]}(e))}function wo(e,t){try{return t in e}catch{return!1}}function xo(e,t,n){var r={};return n.isMergeableObject(e)&&yo(e).forEach(function(t){r[t]=vo(e[t],n)}),yo(t).forEach(function(i){(function(e,t){return wo(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,i)||(wo(e,i)&&n.isMergeableObject(t[i])?r[i]=function(e,t){if(!t.customMerge)return Co;var n=t.customMerge(e);return"function"==typeof n?n:Co}(i,n)(e[i],t[i],n):r[i]=vo(t[i],n))}),r}function Co(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||bo,n.isMergeableObject=n.isMergeableObject||go,n.cloneUnlessOtherwiseSpecified=vo;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):xo(e,t,n):vo(t,n)}Co.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return Co(e,n,t)},{})};var _o=Co;function So(e,t){return void 0===t&&(t=15),+parseFloat(Number(e).toPrecision(t))}function Ao(e){var t=e.toString().split(/[eE]/),n=(t[0].split(".")[1]||"").length-+(t[1]||0);return n>0?n:0}function ko(e){if(-1===e.toString().indexOf("e"))return Number(e.toString().replace(".",""));var t=Ao(e);return t>0?So(Number(e)*Math.pow(10,t)):Number(e)}function To(e){Po&&(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 Io(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 Oo(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(e.length>2)return Io(e,Oo);var n=e[0],r=e[1],i=ko(n),o=ko(r),a=Ao(n)+Ao(r),s=i*o;return To(s),s/Math.pow(10,a)}function Eo(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(e.length>2)return Io(e,Eo);var n=e[0],r=e[1],i=ko(n),o=ko(r);return To(i),To(o),Oo(i/o,So(Math.pow(10,Ao(r)-Ao(n))))}var Po=!0;var Mo={strip:So,plus:function e(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(t.length>2)return Io(t,e);var r=t[0],i=t[1],o=Math.pow(10,Math.max(Ao(r),Ao(i)));return(Oo(r,o)+Oo(i,o))/o},minus:function e(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(t.length>2)return Io(t,e);var r=t[0],i=t[1],o=Math.pow(10,Math.max(Ao(r),Ao(i)));return(Oo(r,o)-Oo(i,o))/o},times:Oo,divide:Eo,round:function(e,t){var n=Math.pow(10,t),r=Eo(Math.round(Math.abs(Oo(e,n))),n);return e<0&&0!==r&&(r=Oo(r,-1)),r},digitLength:Ao,float2Fixed:ko,enableBoundaryChecking:function(e){void 0===e&&(e=!0),Po=e}};function Fo(e){return e&&e.Math==Math?e:void 0}var jo="object"==typeof globalThis&&Fo(globalThis)||"object"==typeof window&&Fo(window)||"object"==typeof self&&Fo(self)||"object"==typeof global&&Fo(global)||function(){return this}()||{};function Do(){return jo}function Ro(e,t,n){var r=n||jo,i=r.__SENTRY__=r.__SENTRY__||{};return i[e]||(i[e]=t())}var Lo=Object.prototype.toString;function zo(e){switch(Lo.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return Go(e,Error)}}function No(e,t){return Lo.call(e)===`[object ${t}]`}function Bo(e){return No(e,"ErrorEvent")}function Vo(e){return No(e,"DOMError")}function Uo(e){return No(e,"String")}function Ho(e){return null===e||"object"!=typeof e&&"function"!=typeof e}function Wo(e){return No(e,"Object")}function Yo(e){return typeof Event<"u"&&Go(e,Event)}function $o(e){return Boolean(e&&e.then&&"function"==typeof e.then)}function Go(e,t){try{return e instanceof t}catch{return!1}}function Xo(e,t){try{let r=e;var n=[];let i=0,o=0;let a;for(;r&&i++<5&&(a=Ko(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 Ko(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&&Uo(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 qo 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 Zo=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Jo(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 Qo(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function ea(e){var t="string"==typeof e?function(e){var t=Zo.exec(e);if(!t)throw new qo(`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 Qo({host:o,pass:i,path:l,projectId:c,port:a,protocol:n,publicKey:r})}(e):Qo(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 qo(`Invalid Sentry Dsn: ${t} missing`)}),!n.match(/^\d+$/))throw new qo(`Invalid Sentry Dsn: Invalid projectId ${n}`);if(!function(e){return"http"===e||"https"===e}(r))throw new qo(`Invalid Sentry Dsn: Invalid protocol ${r}`);if(t&&isNaN(parseInt(t,10)))throw new qo(`Invalid Sentry Dsn: Invalid port ${t}`)}(t),t}var ta=Do(),na=["debug","info","warn","error","log","assert","trace"];function ra(e){var t=Do();if(!("console"in t))return e();var n=t.console,r={};na.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 ia(){let e=!1;var t={enable:()=>{e=!0},disable:()=>{e=!1}};return typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__?na.forEach(n=>{t[n]=(...t)=>{e&&ra(()=>{ta.console[n](`Sentry Logger [${n}]:`,...t)})}}):na.forEach(e=>{t[e]=()=>{}}),t}let oa;function aa(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:`${e.substr(0,t)}...`}function sa(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 la(e,t){return!!Uo(e)&&(function(e){return No(e,"RegExp")}(t)?t.test(e):"string"==typeof t&&-1!==e.indexOf(t))}function ca(e,t,n){if(t in e){var r=e[t],i=n(r);if("function"==typeof i)try{ha(i,r)}catch{}e[t]=i}}function ua(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}function ha(e,t){var n=t.prototype||{};e.prototype=t.prototype=n,ua(e,"__sentry_original__",t)}function da(e){return e.__sentry_original__}function fa(e){if(zo(e))return{message:e.message,name:e.name,stack:e.stack,...ga(e)};if(Yo(e)){var t={type:e.type,target:pa(e.target),currentTarget:pa(e.currentTarget),...ga(e)};return typeof CustomEvent<"u"&&Go(e,CustomEvent)&&(t.detail=e.detail),t}return e}function pa(e){try{return function(e){return typeof Element<"u"&&Go(e,Element)}(e)?Xo(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function ga(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 ma(e,t=40){var n=Object.keys(fa(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return aa(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:aa(r,t)}return""}function va(e){return ba(e,new Map)}function ba(e,t){if(Wo(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]=ba(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(ba(e,t))}),n}return e}oa=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__?Ro("logger",ia):ia();function ya(...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 wa(e){return Array.isArray(e)?ya(...e):e}var xa="<anonymous>";function Ca(e){try{return e&&"function"==typeof e&&e.name||xa}catch{return xa}}function _a(){if(!("fetch"in Do()))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function Sa(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}var Aa=Do(),ka={},Ta={};function Ia(e){if(!Ta[e])switch(Ta[e]=!0,e){case"console":"console"in Aa&&na.forEach(function(e){e in Aa.console&&ca(Aa.console,e,function(t){return function(...n){Ea("console",{args:n,level:e}),t&&t.apply(Aa.console,n)}})});break;case"dom":!function(){if("document"in Aa){var e=Ea.bind(null,"dom"),t=La(e,!0);Aa.document.addEventListener("click",t,!1),Aa.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(t=>{var n=Aa[t]&&Aa[t].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(ca(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=La(e);s.handler=l,t.call(this,n,l,i)}s.refCount+=1}catch{}return t.call(this,n,r,i)}}),ca(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 Aa){var e=XMLHttpRequest.prototype;ca(e,"open",function(e){return function(...t){var n=this,r=t[1],i=n.__sentry_xhr__={method:Uo(t[0])?t[0].toUpperCase():t[0],url:t[1]};Uo(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{}Ea("xhr",{args:t,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:n})}};return"onreadystatechange"in n&&"function"==typeof n.onreadystatechange?ca(n,"onreadystatechange",function(e){return function(...t){return o(),e.apply(n,t)}}):n.addEventListener("readystatechange",o),e.apply(n,t)}}),ca(e,"send",function(e){return function(...t){return this.__sentry_xhr__&&void 0!==t[0]&&(this.__sentry_xhr__.body=t[0]),Ea("xhr",{args:t,startTimestamp:Date.now(),xhr:this}),e.apply(this,t)}})}}();break;case"fetch":!function(){if(!_a())return!1;var e=Do();if(Sa(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=Sa(r.contentWindow.fetch)),n.head.removeChild(r)}catch(e){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&oa.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return t}()||ca(Aa,"fetch",function(e){return function(...t){var n={args:t,fetchData:{method:Pa(t),url:Ma(t)},startTimestamp:Date.now()};return Ea("fetch",{...n}),e.apply(Aa,t).then(e=>(Ea("fetch",{...n,endTimestamp:Date.now(),response:e}),e),e=>{throw Ea("fetch",{...n,endTimestamp:Date.now(),error:e}),e})}});break;case"history":!function(){if(!function(){var e=Do(),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=Aa.onpopstate;function t(e){return function(...t){var n=t.length>2?t[2]:void 0;if(n){var r=Fa,i=String(n);Fa=i,Ea("history",{from:r,to:i})}return e.apply(this,t)}}Aa.onpopstate=function(...t){var n=Aa.location.href,r=Fa;if(Fa=n,Ea("history",{from:r,to:n}),e)try{return e.apply(this,t)}catch{}},ca(Aa.history,"pushState",t),ca(Aa.history,"replaceState",t)}();break;case"error":za=Aa.onerror,Aa.onerror=function(e,t,n,r,i){return Ea("error",{column:r,error:i,line:n,msg:e,url:t}),!!za&&za.apply(this,arguments)};break;case"unhandledrejection":Na=Aa.onunhandledrejection,Aa.onunhandledrejection=function(e){return Ea("unhandledrejection",e),!Na||Na.apply(this,arguments)};break;default:return void((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&oa.warn("unknown instrumentation type:",e))}}function Oa(e,t){ka[e]=ka[e]||[],ka[e].push(t),Ia(e)}function Ea(e,t){if(e&&ka[e])for(var n of ka[e]||[])try{n(t)}catch(t){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&oa.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${Ca(n)}\nError:`,t)}}function Pa(e=[]){return"Request"in Aa&&Go(e[0],Request)&&e[0].method?String(e[0].method).toUpperCase():e[1]&&e[1].method?String(e[1].method).toUpperCase():"GET"}function Ma(e=[]){return"string"==typeof e[0]?e[0]:"Request"in Aa&&Go(e[0],Request)?e[0].url:String(e[0])}let Fa;var ja=1e3;let Da,Ra;function La(e,t=!1){return n=>{if(n&&Ra!==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===Da||function(e,t){if(!e||e.type!==t.type)return!0;try{if(e.target!==t.target)return!0}catch{}return!1}(Ra,n))&&(e({event:n,name:r,global:t}),Ra=n),clearTimeout(Da),Da=Aa.setTimeout(()=>{Da=void 0},ja)}}}let za=null;let Na=null;function Ba(){var e=Do(),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 Va(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function Ua(e){const{message:t,event_id:n}=e;if(t)return t;var r=Va(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function Ha(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 Wa(e,t){var n=Va(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 Ya(e){if(e&&e.__sentry_captured__)return!0;try{ua(e,"__sentry_captured__",!0)}catch{}return!1}function $a(e){return Array.isArray(e)?e:[e]}function Ga(){return!(typeof __SENTRY_BROWSER_BUNDLE__<"u"&&__SENTRY_BROWSER_BUNDLE__)&&"[object process]"===Object.prototype.toString.call(typeof process<"u"?process:0)}function Xa(e,t=1/0,n=1/0){try{return qa("",e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function Ka(e,t=3,n=102400){var r=Xa(e,t);return function(e){return function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(e))}(r)>n?Ka(e,t-1,n):r}function qa(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 Wo(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: ${Ca(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 qa("",l.toJSON(),n-1,r,i)}catch{}var c=Array.isArray(t)?[]:{};let u=0;var h=fa(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]=qa(d,f,n-1,r,i),u+=1}return a(t),c}var Za;function Ja(e){return new es(t=>{t(e)})}function Qa(e){return new es((t,n)=>{n(e)})}!function(e){e[e.PENDING=0]="PENDING";e[e.RESOLVED=1]="RESOLVED";e[e.REJECTED=2]="REJECTED"}(Za||(Za={}));class es{__init(){this._state=Za.PENDING}__init2(){this._handlers=[]}constructor(e){es.prototype.__init.call(this),es.prototype.__init2.call(this),es.prototype.__init3.call(this),es.prototype.__init4.call(this),es.prototype.__init5.call(this),es.prototype.__init6.call(this);try{e(this._resolve,this._reject)}catch(e){this._reject(e)}}then(e,t){return new es((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 es((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(Za.RESOLVED,e)}}__init4(){this._reject=e=>{this._setResult(Za.REJECTED,e)}}__init5(){this._setResult=(e,t)=>{if(this._state===Za.PENDING){if($o(t))return void t.then(this._resolve,this._reject);this._state=e,this._value=t,this._executeHandlers()}}}__init6(){this._executeHandlers=()=>{if(this._state!==Za.PENDING){var e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||(this._state===Za.RESOLVED&&e[1](this._value),this._state===Za.REJECTED&&e[2](this._value),e[0]=!0)})}}}}function ts(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 Qa(new qo("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 es((n,r)=>{let i=t.length;if(!i)return n(!0);var o=setTimeout(()=>{e&&e>0&&n(!1)},e);t.forEach(e=>{Ja(e).then(()=>{--i||(clearTimeout(o),n(!0))},r)})})}}}function ns(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 rs=["fatal","error","warning","log","info","debug"];function is(e){return"warn"===e?"warning":rs.includes(e)?e:"log"}var os={nowSeconds:()=>Date.now()/1e3};var as=Ga()?function(){try{var e=function(e,t){return e.require(t)}(module,"perf_hooks");return e.performance}catch{return}}():function(){const{performance:e}=Do();if(e&&e.now)return{now:()=>e.now(),timeOrigin:Date.now()-e.now()}}(),ss=void 0===as?os:{nowSeconds:()=>(as.timeOrigin+as.now())/1e3},ls=os.nowSeconds.bind(os),cs=ss.nowSeconds.bind(ss);function us(e,t=[]){return[e,t]}function hs(e,t){const[n,r]=e;return[n,[...r,t]]}function ds(e,t){e[1].forEach(e=>{var n=e[0].type;t(e,n)})}function fs(e,t){return(t||new TextEncoder).encode(e)}function ps(e,t){const[n,r]=e;let i=JSON.stringify(n);function o(e){"string"==typeof i?i="string"==typeof e?i+e:[fs(i,t),e]:i.push("string"==typeof e?fs(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 gs(e,t){var n="string"==typeof e.data?fs(e.data,t):e.data;return[va({type:"attachment",length:n.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),n]}(()=>{const{performance:e}=Do();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 ms={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default"};function vs(e){return ms[e]}function bs(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 ys(e){var t=cs(),n={sid:Ba(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(e){return va({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&&ws(n,e),n}function ws(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||cs(),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:Ba()),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 xs{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 xs;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&&ws(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 xs?t:this}return e instanceof xs?(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)):Wo(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:ls(),...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([...Cs(),...this._eventProcessors],e,t)}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}_notifyEventProcessors(e,t,n,r=0){return new es((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&&oa.log(`Event processor "${a.id}" dropped event`),$o(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?$a(e.fingerprint):[],this._fingerprint&&(e.fingerprint=e.fingerprint.concat(this._fingerprint)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}}function Cs(){return Ro("globalEventProcessors",()=>[])}function _s(e){Cs().push(e)}var Ss=100;class As{__init(){this._stack=[{}]}constructor(e,t=new xs,n=4){this._version=n,As.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=xs.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:Ba(),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:Ba(),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:Ba();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=Ss}=r.getOptions&&r.getOptions()||{};if(!(o<=0)){var a={timestamp:ls(),...e},s=i?ra(()=>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=Ts(this);try{e(this)}finally{Ts(t)}}getIntegration(e){var t=this.getClient();if(!t)return null;try{return t.getIntegration(e)}catch{return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&oa.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"}),ws(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=Do();const{userAgent:a}=o.navigator||{};var s=ys({release:r,environment:i,...t&&{user:t.getUser()},...a&&{userAgent:a},...e});if(t){var l=t.getSession&&t.getSession();l&&"ok"===l.status&&ws(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=ks().__SENTRY__;if(n&&n.extensions&&"function"==typeof n.extensions[e])return n.extensions[e].apply(this,t);(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&oa.warn(`Extension method ${e} couldn't be found, doing nothing.`)}}function ks(){var e=Do();return e.__SENTRY__=e.__SENTRY__||{extensions:{},hub:void 0},e}function Ts(e){var t=ks(),n=Es(t);return Ps(t,e),n}function Is(){var e=ks();return(!Os(e)||Es(e).isOlderThan(4))&&Ps(e,new As),Ga()?function(e){try{var t=ks().__SENTRY__,n=t&&t.extensions&&t.extensions.domain&&t.extensions.domain.active;if(!n)return Es(e);if(!Os(n)||Es(n).isOlderThan(4)){var r=Es(e).getStackTop();Ps(n,new As(r.client,xs.clone(r.scope)))}return Es(n)}catch{return Es(e)}}(e):Es(e)}function Os(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function Es(e){return Ro("hub",()=>new As,e)}function Ps(e,t){return!!e&&((e.__SENTRY__=e.__SENTRY__||{}).hub=t,!0)}function Ms(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 Fs(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)}?${Ms(e,r)}`}function js(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function Ds(e,t,n,r){var i=js(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:Jo(r)},..."transaction"===e.type&&i&&{trace:va({...i})}}}(e,i,r,t);return delete e.sdkProcessingMetadata,us(a,[[{type:o},e]])}var Rs=[];function Ls(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?$a(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 zs="Not capturing exception because it's already been captured.";class Ns{__init(){this._integrations={}}__init2(){this._integrationsInitialized=!1}__init3(){this._numProcessing=0}__init4(){this._outcomes={}}constructor(e){if(Ns.prototype.__init.call(this),Ns.prototype.__init2.call(this),Ns.prototype.__init3.call(this),Ns.prototype.__init4.call(this),this._options=e,e.dsn){this._dsn=ea(e.dsn);var t=Fs(this._dsn,e);this._transport=e.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}else(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&oa.warn("No DSN provided, client will not do anything.")}captureException(e,t,n){if(Ya(e))return void((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&oa.log(zs));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=Ho(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&&Ya(t.originalException))return void((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&oa.log(zs));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__)&&oa.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),ws(e,{init:!1})):(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&oa.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)):Ja(!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===Rs.indexOf(e.name)&&(e.setupOnce(_s,Is),Rs.push(e.name),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&oa.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__)&&oa.warn(`Cannot retrieve integration ${e.id} from the current Client`),null}}sendEvent(e,t={}){if(this._dsn){let r=Ds(e,this._dsn,this._options._metadata,this._options.tunnel);for(var n of t.attachments||[])r=hs(r,gs(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=js(n);return us({sent_at:(new Date).toISOString(),...i&&{sdk:i},...!!r&&{dsn:Jo(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__)&&oa.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)&&(ws(e,{...n&&{status:"crashed"},errors:e.errors||Number(r||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new es(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||Ba(),timestamp:e.timestamp||ls()};this._applyClientOptions(o),this._applyIntegrationsMetadata(o);let a=n;t.captureContext&&(a=xs.clone(a).update(t.captureContext));let s=Ja(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:Xa(e.data,t,n)}}))},...e.user&&{user:Xa(e.user,t,n)},...e.contexts&&{contexts:Xa(e.contexts,t,n)},...e.extra&&{extra:Xa(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=Xa(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(e=>(e.data&&(e.data=Xa(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=aa(e.message,o));var a=e.exception&&e.exception.values&&e.exception.values[0];a&&a.value&&(a.value=aa(a.value,o));var s=e.request;s&&s.url&&(s.url=aa(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?oa.log(t.message):oa.warn(t)}})}_processEvent(e,t,n){const{beforeSend:r,sampleRate:i}=this.getOptions();if(!this._isEnabled())return Qa(new qo("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"),Qa(new qo(`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 qo("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($o(e))return e.then(e=>{if(!Wo(e)&&null!==e)throw new qo(t);return e},e=>{throw new qo(`beforeSend rejected with ${e}`)});if(!Wo(e)&&null!==e)throw new qo(t);return e}(r(n,t))}).then(r=>{if(null===r)throw this.recordDroppedEvent("before_send",e.type||"error"),new qo("`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 qo?e:(this.captureException(e,{data:{__sentry__:!0},originalException:e}),new qo(`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__)&&oa.error("Error while sending event:",e)}):(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&oa.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 Bs(e,t,n=ts(e.bufferSize||30)){let r={};return{send:function(i){var o=[];if(ds(i,(t,n)=>{var i=vs(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 Ja();var a=us(i[0],o),s=t=>{ds(a,(n,r)=>{e.recordDroppedEvent(t,vs(r))})};return n.add(()=>t({body:ps(a,e.textEncoder)}).then(e=>{void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&oa.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=bs(r,e)},e=>{(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&oa.error("Failed while sending event:",e),s("network_error")})).then(e=>e,e=>{if(e instanceof qo)return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&oa.error("Skipped sending event because buffer is full."),s("queue_overflow"),Ja();throw e})},flush:e=>n.drain(e)}}var Vs="7.14.0";let Us;class Hs{constructor(){Hs.prototype.__init.call(this)}static __initStatic(){this.id="FunctionToString"}__init(){this.name=Hs.id}setupOnce(){Us=Function.prototype.toString,Function.prototype.toString=function(...e){var t=da(this)||this;return Us.apply(t,e)}}}Hs.__initStatic();var Ws=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/];class Ys{static __initStatic(){this.id="InboundFilters"}__init(){this.name=Ys.id}constructor(e={}){this._options=e,Ys.prototype.__init.call(this)}setupOnce(e,t){var n=e=>{var n=t();if(n){var r=n.getIntegration(Ys);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||[],...Ws],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__)&&oa.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${Ua(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__)&&oa.error(`Cannot extract message for event ${Ua(e)}`),[]}return[]}(e).some(e=>t.some(t=>la(e,t)))}(e,t.ignoreErrors)?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&oa.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${Ua(e)}`),!0):function(e,t){if(!t||!t.length)return!1;var n=$s(e);return!!n&&t.some(e=>la(n,e))}(e,t.denyUrls)?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&oa.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${Ua(e)}.\nUrl: ${$s(e)}`),!0):!function(e,t){if(!t||!t.length)return!0;var n=$s(e);return!n||t.some(e=>la(n,e))}(e,t.allowUrls)&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&oa.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${Ua(e)}.\nUrl: ${$s(e)}`),!0)}(e,a)?null:e}}return e};n.id=this.name,e(n)}}function $s(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__)&&oa.error(`Cannot extract url for event ${Ua(e)}`),null}}function Gs(e,t){var n=Ks(e,t),r={type:t&&t.name,value:Zs(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function Xs(e,t){return{exception:{values:[Gs(e,t)]}}}function Ks(e,t){var n=t.stacktrace||t.stack||"",r=function(e){if(e){if("number"==typeof e.framesToPop)return e.framesToPop;if(qs.test(e.message))return 1}return 0}(t);try{return e(n,r)}catch{}return[]}Ys.__initStatic();var qs=/Minified React error #\d+;/i;function Zs(e){var t=e&&e.message;return t?t.error&&"string"==typeof t.error.message?t.error.message:t:"No error message"}function Js(e,t,n,r,i){let o;if(Bo(t)&&t.error)return Xs(e,t.error);if(Vo(t)||function(e){return No(e,"DOMException")}(t)){var a=t;if("stack"in t)o=Xs(e,t);else{var s=a.name||(Vo(a)?"DOMError":"DOMException"),l=a.message?`${s}: ${a.message}`:s;o=Qs(e,l,n,r),Ha(o,l)}return"code"in a&&(o.tags={...o.tags,"DOMException.code":`${a.code}`}),o}return zo(t)?Xs(e,t):Wo(t)||Yo(t)?(o=function(e,t,n,r){var i=Is().getClient(),o=i&&i.getOptions().normalizeDepth,a={exception:{values:[{type:Yo(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:`Non-Error ${r?"promise rejection":"exception"} captured with keys: ${ma(t)}`}]},extra:{__serialized__:Ka(t,o)}};if(n){var s=Ks(e,n);s.length&&(a.exception.values[0].stacktrace={frames:s})}return a}(e,t,n,i),Wa(o,{synthetic:!0}),o):(o=Qs(e,t,n,r),Ha(o,`${t}`),Wa(o,{synthetic:!0}),o)}function Qs(e,t,n,r){var i={message:t};if(r&&n){var o=Ks(e,n);o.length&&(i.exception={values:[{value:t,stacktrace:{frames:o}}]})}return i}var el="Breadcrumbs";class tl{static __initStatic(){this.id=el}__init(){this.name=tl.id}constructor(e){tl.prototype.__init.call(this),this.options={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e}}setupOnce(){this.options.console&&Oa("console",nl),this.options.dom&&Oa("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?Xo(t.event.target,r):Xo(t.event,r)}catch{n="<unknown>"}0!==n.length&&Is().addBreadcrumb({category:`ui.${t.name}`,message:n},{event:t.event,name:t.name,global:t.global})}return t}(this.options.dom)),this.options.xhr&&Oa("xhr",rl),this.options.fetch&&Oa("fetch",il),this.options.history&&Oa("history",ol)}}function nl(e){var t={category:"console",data:{arguments:e.args,logger:"console"},level:is(e.level),message:sa(e.args," ")};if("assert"===e.level){if(!1!==e.args[0])return;t.message=`Assertion failed: ${sa(e.args.slice(1)," ")||"console.assert"}`,t.data.arguments=e.args.slice(1)}Is().addBreadcrumb(t,{input:e.args,level:e.level})}function rl(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 Is().addBreadcrumb({category:"xhr",data:{method:t,url:n,status_code:r},type:"http"},{xhr:e.xhr,input:i})}}function il(e){!e.endTimestamp||e.fetchData.url.match(/sentry_key/)&&"POST"===e.fetchData.method||(e.error?Is().addBreadcrumb({category:"fetch",data:e.fetchData,level:"error",type:"http"},{data:e.error,input:e.args}):Is().addBreadcrumb({category:"fetch",data:{...e.fetchData,status_code:e.response.status},type:"http"},{input:e.args,response:e.response}))}function ol(e){var t=Do();let n=e.from,r=e.to;var i=ns(t.location.href);let o=ns(n);var a=ns(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),Is().addBreadcrumb({category:"navigation",data:{from:n,to:r}})}tl.__initStatic();var al=Do();class sl extends Ns{constructor(e){e._metadata=e._metadata||{},e._metadata.sdk=e._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:"npm:@sentry/browser",version:Vs}],version:Vs},super(e),e.sendClientReports&&al.document&&al.document.addEventListener("visibilitychange",()=>{"hidden"===al.document.visibilityState&&this._flushOutcomes()})}eventFromException(e,t){return function(e,t,n,r){var i=Js(e,t,n&&n.syntheticException||void 0,r);return Wa(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),Ja(i)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return function(e,t,n="info",r,i){var o=Qs(e,t,r&&r.syntheticException||void 0,i);return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),Ja(o)}(this._options.stackParser,e,t,n,this._options.attachStacktrace)}sendEvent(e,t){var n=this.getIntegrationById(el);n&&n.options&&n.options.sentry&&Is().addBreadcrumb({category:"sentry."+("transaction"===e.type?"transaction":"event"),event_id:e.event_id,level:e.level,message:Ua(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__)&&oa.log("Sending outcomes:",e);var t=Fs(this._dsn,this._options),n=function(e,t){return us(t?{dsn:t}:{},[[{type:"client_report"},{timestamp:ls(),discarded_events:e}]])}(e,this._options.tunnel&&Jo(this._dsn));try{var r=Do();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,ps(n));else this._sendEnvelope(n)}catch(e){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&oa.error(e)}}else(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&oa.log("No dsn provided, will not send outcomes");else(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&oa.log("No outcomes to send")}}var ll=Do();let cl;function ul(e,t=function(){if(cl)return cl;if(Sa(ll.fetch))return cl=ll.fetch.bind(ll);var e=ll.document;let t=ll.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__)&&oa.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return cl=t.bind(ll)}()){return Bs(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 hl(e){return Bs(e,function(t){return new es((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 dl="?";function fl(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 pl=/^\s*at (?:(.*\).*?|.*?) ?\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,gl=/\((\S*)(?::(\d+))(?::(\d+))\)/,ml=[30,e=>{var t=pl.exec(e);if(t){if(t[2]&&0===t[2].indexOf("eval")){var n=gl.exec(t[2]);n&&(t[2]=n[1],t[3]=n[2],t[4]=n[3])}const[e,r]=_l(t[1]||dl,t[2]);return fl(r,e,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}}],vl=/^\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,bl=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,yl=[50,e=>{var t=vl.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){var n=bl.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]||dl;return[r,e]=_l(r,e),fl(e,r,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}],wl=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,xl=[40,e=>{var t=wl.exec(e);return t?fl(t[2],t[1]||dl,+t[3],t[4]?+t[4]:void 0):void 0}],Cl=ya(...[ml,yl,xl]),_l=(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]:dl,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};let Sl=0;function Al(){return Sl>0}function kl(e,t={},n){if("function"!=typeof e)return e;try{var r=e.__sentry_wrapped__;if(r)return r;if(da(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=>kl(e,t));return e.apply(this,i)}catch(e){throw Sl+=1,setTimeout(()=>{Sl-=1}),function(e){Is().withScope(e)}(n=>{n.addEventProcessor(e=>(t.mechanism&&(Ha(e,void 0),Wa(e,t.mechanism)),e.extra={...e.extra,arguments:r},e)),function(e,t){Is().captureException(e,{captureContext:t})}(e)}),e}};try{for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(i[o]=e[o])}catch{}ha(i,e),ua(e,"__sentry_wrapped__",i);try{Object.getOwnPropertyDescriptor(i,"name").configurable&&Object.defineProperty(i,"name",{get:()=>e.name})}catch{}return i}class Tl{static __initStatic(){this.id="GlobalHandlers"}__init(){this.name=Tl.id}__init2(){this._installFunc={onerror:Il,onunhandledrejection:Ol}}constructor(e){Tl.prototype.__init.call(this),Tl.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]&&(Pl(t),n(),this._installFunc[t]=void 0)}}}function Il(){Oa("error",e=>{const[t,n,r]=Fl();if(!t.getIntegration(Tl))return;const{msg:i,url:o,line:a,column:s,error:l}=e;if(!(Al()||l&&l.__sentry_own_request__)){var c=void 0===l&&Uo(i)?function(e,t,n,r){var i=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let o=Bo(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 El(l,t,n,r)}(i,o,a,s):El(Js(n,l||i,void 0,r,!1),o,a,s);c.level="error",Ml(t,l,c,"onerror")}})}function Ol(){Oa("unhandledrejection",e=>{const[t,n,r]=Fl();if(!t.getIntegration(Tl))return;let i=e;try{"reason"in e?i=e.reason:"detail"in e&&"reason"in e.detail&&(i=e.detail.reason)}catch{}if(Al()||i&&i.__sentry_own_request__)return!0;var o=Ho(i)?function(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}(i):Js(n,i,void 0,r,!0);o.level="error",Ml(t,i,o,"onunhandledrejection")})}function El(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=Uo(t)&&t.length>0?t:function(){var e=Do();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 Pl(e){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&oa.log(`Global Handler attached: ${e}`)}function Ml(e,t,n,r){Wa(n,{handled:!1,type:r}),e.captureEvent(n,{originalException:t})}function Fl(){var e=Is(),t=e.getClient(),n=t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[e,n.stackParser,n.attachStacktrace]}Tl.__initStatic();var jl=["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 Dl{static __initStatic(){this.id="TryCatch"}__init(){this.name=Dl.id}constructor(e){Dl.prototype.__init.call(this),this._options={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e}}setupOnce(){var e=Do();this._options.setTimeout&&ca(e,"setTimeout",Rl),this._options.setInterval&&ca(e,"setInterval",Rl),this._options.requestAnimationFrame&&ca(e,"requestAnimationFrame",Ll),this._options.XMLHttpRequest&&"XMLHttpRequest"in e&&ca(XMLHttpRequest.prototype,"send",zl);var t=this._options.eventTarget;t&&(Array.isArray(t)?t:jl).forEach(Nl)}}function Rl(e){return function(...t){var n=t[0];return t[0]=kl(n,{mechanism:{data:{function:Ca(e)},handled:!0,type:"instrument"}}),e.apply(this,t)}}function Ll(e){return function(t){return e.apply(this,[kl(t,{mechanism:{data:{function:"requestAnimationFrame",handler:Ca(e)},handled:!0,type:"instrument"}})])}}function zl(e){return function(...t){var n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(e=>{e in n&&"function"==typeof n[e]&&ca(n,e,function(t){var n={mechanism:{data:{function:e,handler:Ca(t)},handled:!0,type:"instrument"}},r=da(t);return r&&(n.mechanism.data.handler=Ca(r)),kl(t,n)})}),e.apply(this,t)}}function Nl(e){var t=Do(),n=t[e]&&t[e].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(ca(n,"addEventListener",function(t){return function(n,r,i){try{"function"==typeof r.handleEvent&&(r.handleEvent=kl(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Ca(r),target:e},handled:!0,type:"instrument"}}))}catch{}return t.apply(this,[n,kl(r,{mechanism:{data:{function:"addEventListener",handler:Ca(r),target:e},handled:!0,type:"instrument"}}),i])}}),ca(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)}}))}Dl.__initStatic();class Bl{static __initStatic(){this.id="LinkedErrors"}__init(){this.name=Bl.id}constructor(e={}){Bl.prototype.__init.call(this),this._key=e.key||"cause",this._limit=e.limit||5}setupOnce(){var e=Is().getClient();!e||_s((t,n)=>{var r=Is().getIntegration(Bl);return r?function(e,t,n,r,i){if(!(r.exception&&r.exception.values&&i&&Go(i.originalException,Error)))return r;var o=Vl(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 Vl(e,t,n,r,i=[]){if(!Go(n[r],Error)||i.length+1>=t)return i;var o=Gs(e,n[r]);return Vl(e,t,n[r],r,[o,...i])}Bl.__initStatic();var Ul=Do();class Hl{constructor(){Hl.prototype.__init.call(this)}static __initStatic(){this.id="HttpContext"}__init(){this.name=Hl.id}setupOnce(){_s(e=>{if(Is().getIntegration(Hl)){if(!Ul.navigator&&!Ul.location&&!Ul.document)return e;var t=e.request&&e.request.url||Ul.location&&Ul.location.href;const{referrer:r}=Ul.document||{},{userAgent:i}=Ul.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})}}Hl.__initStatic();class Wl{constructor(){Wl.prototype.__init.call(this)}static __initStatic(){this.id="Dedupe"}__init(){this.name=Wl.id}setupOnce(e,t){var n=e=>{var n=t().getIntegration(Wl);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||!$l(e,t)||!Yl(e,t))}(e,t)&&!function(e,t){var n=Gl(t),r=Gl(e);return!!(n&&r&&n.type===r.type&&n.value===r.value&&$l(e,t)&&Yl(e,t))}(e,t))}(e,n._previousEvent))return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&oa.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 Yl(e,t){let n=Xl(e),r=Xl(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 $l(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 Gl(e){return e.exception&&e.exception.values&&e.exception.values[0]}function Xl(e){var t=e.exception;if(t)try{return t.values[0].stacktrace.frames}catch{return}}Wl.__initStatic();var Kl=[new Ys,new Hs,new Dl,new tl,new Tl,new Bl,new Wl,new Hl];function ql(e={}){if(void 0===e.defaultIntegrations&&(e.defaultIntegrations=Kl),void 0===e.release){var t=Do();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:wa(e.stackParser||Cl),integrations:Ls(e),transport:e.transport||(_a()?ul:hl)};(function(e,t){!0===t.debug&&(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__?oa.enable():console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle."));var n=Is(),r=n.getScope();r&&r.update(t.initialScope);var i=new e(t);n.bindClient(i)})(sl,n),e.autoSessionTracking&&function(){var e=Do(),t=e.document;if(typeof t>"u")return void((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&oa.warn("Session tracking in non-browser environment with @sentry/browser is not supported."));var n=Is();!n.captureSession||(Zl(n),Oa("history",({from:e,to:t})=>{void 0===e||e===t||Zl(Is())}))}()}function Zl(e){e.startSession({ignoreDuration:!0}),e.captureSession()}var Jl={exports:{}},Ql={},ec=i,tc=Symbol.for("react.element"),nc=Symbol.for("react.fragment"),rc=Object.prototype.hasOwnProperty,ic=ec.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,oc={key:!0,ref:!0,__self:!0,__source:!0};
|
|
10
10
|
/**
|
|
11
11
|
* @license React
|
|
12
12
|
* react-jsx-runtime.production.min.js
|
|
@@ -77,7 +77,7 @@ var t=t||{version:"5.2.4"};if(e.fabric=t,typeof document<"u"&&typeof window<"u")
|
|
|
77
77
|
*
|
|
78
78
|
* @license MIT
|
|
79
79
|
*/
|
|
80
|
-
function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],!(t.indexOf(n)>=0)&&(i[n]=e[n]);return i}(e,eO),h=GI(l,{relative:r}),d=nO(l,{replace:o,state:a,target:s,preventScrollReset:c,relative:r});return lc("a",{...u,href:h,onClick:i?n:function(e){n&&n(e),e.defaultPrevented||d(e)},ref:t,target:s})});function nO(e,t){let{target:n,replace:i,state:o,preventScrollReset:a,relative:s}=void 0===t?{}:t,l=function(){XI()||zI();let{basename:e,navigator:t}=r.useContext(WI),{matches:n}=r.useContext($I),{pathname:i}=KI(),o=JSON.stringify(qI(n).map(e=>e.pathnameBase)),a=r.useRef(!1);return r.useEffect(()=>{a.current=!0}),r.useCallback(function(n,r){if(void 0===r&&(r={}),!a.current)return;if("number"==typeof n)return void t.go(n);let s=BI(n,JSON.parse(o),i,"path"===r.relative);"/"!==e&&(s.pathname="/"===s.pathname?e:VI([e,s.pathname])),(r.replace?t.replace:t.push)(s,r.state,r)},[e,t,o,i])}(),c=KI(),u=ZI(e,{relative:s});return r.useCallback(t=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(t,n)){t.preventDefault();let n=void 0!==i?i:RI(c)===RI(u);l(e,{replace:n,state:o,preventScrollReset:a,relative:s})}},[c,l,u,i,o,n,e,a,s])}const rO=Sc(lc("path",{d:"M11 15h2v2h-2v-2zm0-8h2v6h-2V7zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutlineOutlined"),iO=Sc(lc("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm4.59-12.42L10 14.17l-2.59-2.58L6 13l4 4 8-8z"}),"CheckCircleOutlined");function oO(){const e=Vd(e=>e.toasts);return lc("div",{className:"relative pointer-events-none",children:lc(yb,{initial:!1,children:e.map(e=>lc("div",{"data-toast":!0,className:xc("fixed mx-auto p-20 z-toast","bottom-center"===e.position?"left-0 right-0 bottom-0":"right-0 bottom-0"),children:cc(db.div,{initial:{opacity:0,y:50,scale:.3},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.5,transition:{duration:.2}},className:xc("flex items-center gap-10 min-w-288 max-w-500 shadow-lg w-min rounded-lg pl-16 pr-6 py-6 text-sm pointer-events-auto max-h-100 bg-paper text-main bg-paper border mx-auto"),onPointerEnter:()=>{var t;return null==(t=e.timer)?void 0:t.pause()},onPointerLeave:()=>{var t;return null==(t=e.timer)?void 0:t.resume()},role:"alert","aria-live":"danger"===e.type?"assertive":"polite",children:["danger"===e.type&&lc(rO,{className:"text-danger flex-shrink-0",size:"md"}),"positive"===e.type&&lc(iO,{className:"text-positive flex-shrink-0",size:"md"}),lc("div",{className:"overflow-hidden overflow-ellipsis w-max mr-auto",children:lc(BC,{value:e.message})}),e.action&&lc(fw,{variant:"text",color:"primary",size:"sm",className:"flex-shrink-0",onFocus:()=>{var t;return null==(t=e.timer)?void 0:t.pause()},onBlur:()=>{var t;return null==(t=e.timer)?void 0:t.resume()},onClick:()=>Ud().remove(e.id),elementType:tO,to:e.action.action,children:lc(BC,{value:e.action.label})}),lc(zC,{onFocus:()=>{var t;return null==(t=e.timer)?void 0:t.pause()},onBlur:()=>{var t;return null==(t=e.timer)?void 0:t.resume()},type:"button",className:"flex-shrink-0",onClick:()=>{Ud().remove(e.id)},size:"sm",children:lc(QC,{})})]})},e.id))})})}function aO(e){switch(e.key){case"z":(function(e){return Ub()?e.metaKey:e.ctrlKey})(e)&&(e.preventDefault(),e.stopPropagation(),e.shiftKey?Ed().history.redo():Ed().history.undo());break;case"ArrowUp":e.preventDefault(),e.stopPropagation(),Ed().objects.move("up");break;case"ArrowRight":e.preventDefault(),e.stopPropagation(),Ed().objects.move("right");break;case"ArrowDown":e.preventDefault(),e.stopPropagation(),Ed().objects.move("down");break;case"ArrowLeft":e.preventDefault(),e.stopPropagation(),Ed().objects.move("left");break;case"Delete":e.preventDefault(),e.stopPropagation(),Ed().objects.delete()}}const sO=new Map,lO=new Map,cO={};async function*uO(e){const t=e.createReader();let n;do{n=await new Promise((e,n)=>{t.readEntries(e,n)});for(const e of n)if(e.isFile){if(".DS_Store"===e.name)continue;const t=await hO(e);yield new Vy(t,e.fullPath)}else e.isDirectory&&(yield*uO(e))}while(n.length>0)}function hO(e){return new Promise((t,n)=>e.file(t,n))}function dO(e){return null!=cO.dragTargetId?sO.get(cO.dragTargetId):e.dataTransfer.types.includes("Files")?{type:"nativeFile",el:null,ref:null,getData:()=>async function(e){const t=[];for await(const n of e)t.push(n);return t}(async function*(e){for(const t of e.items)if("file"===t.kind)if("function"==typeof t.webkitGetAsEntry){const e=t.webkitGetAsEntry();if(!e)continue;if(e.isFile){if(".DS_Store"===e.name)continue;yield new Vy(t.getAsFile(),e.fullPath)}else e.isDirectory&&(yield*uO(e))}else{const e=t.getAsFile();if(!e||".DS_Store"===e.name)continue;yield new Vy(e,t.fullPath)}}(e.dataTransfer))}:void 0}function fO({children:e}){const t=Id(e=>e.bootstrapData),n=h(()=>({data:t,setBootstrapData:()=>{},mergeBootstrapData:()=>{},invalidateBootstrapData:()=>{}}),[t]);return lc(_C.Provider,{value:n,children:e})}function pO(){var e,t,n,r;const i=null==(e=Id(e=>{var t;return null==(t=e.config.ui)?void 0:t.visible}))||e,o=null!=(t=Id(e=>{var t,n;return null==(n=null==(t=e.config.ui)?void 0:t.nav)?void 0:n.position}))?t:"bottom",s=null!=(n=Id(e=>{var t,n;return null==(n=null==(t=e.config.ui)?void 0:t.menubar)?void 0:n.position}))?n:"top",l=null==(r=Id(e=>{var t;return null==(t=e.config.ui)?void 0:t.allowEditorClose}))||r,h=u(null),d=u(null),{isModal:f,isMobile:p}=e_(),g=c(async e=>{var t,n,r;if(Od().activeTool||Od().dirty||"nativeFile"!==e.type)return;const i=await e.getData();!Ed().import.fileIsValid(i[0])||(null!=(r=null==(n=null==(t=Od().config.tools)?void 0:t.import)?void 0:n.openDroppedImageAsBackground)&&r?await Ed().import.openBackgroundImage(i[0]):await Ed().import.openUploadedFile(i[0]))},[]),{droppableProps:m}=function({id:e,disabled:t,ref:n,...r}){const i=u({dragOverElements:new Set,dropActivateTimer:void 0}).current,o=u(r);o.current=r,C(()=>(lO.set(e,{...lO.get(e),disabled:t,id:e,ref:n}),()=>{lO.delete(e)}),[e,o,t,n]);const a=e=>{var t;const r=o.current;return!(!(null==e?void 0:e.type)||n.current===(null==(t=e.ref)?void 0:t.current)||!r.types.includes(e.type)||r.acceptsDrop&&!r.acceptsDrop(e))},s=e=>{var t,n;const r=dO(e);r&&(null==(n=(t=o.current).onDragLeave)||n.call(t,r))};return{droppableProps:t?{}:{onDragOver:e=>{e.preventDefault(),e.stopPropagation()},onDragEnter:e=>{var t,n;if(e.stopPropagation(),i.dragOverElements.add(e.target),i.dragOverElements.size>1)return;const r=dO(e);r&&a(r)&&(null==(n=(t=o.current).onDragEnter)||n.call(t,r),clearTimeout(i.dropActivateTimer),"function"==typeof o.current.onDropActivate&&(i.dropActivateTimer=setTimeout(()=>{var e,t;r&&(null==(t=(e=o.current).onDropActivate)||t.call(e,r))},400)))},onDragLeave:e=>{e.stopPropagation(),i.dragOverElements.delete(e.target);for(const t of i.dragOverElements)e.currentTarget.contains(t)||i.dragOverElements.delete(t);if(i.dragOverElements.size>0)return;const t=dO(e);t&&a(t)&&(s(e),clearTimeout(i.dropActivateTimer))},onDrop:async e=>{var t,n,r,l;e.preventDefault(),e.stopPropagation(),i.dragOverElements.clear(),s(e),clearTimeout(i.dropActivateTimer);const c=dO(e);c&&(null==(n=(t=o.current).onDragLeave)||n.call(t,c),a(c)&&(null==(l=(r=o.current).onDrop)||l.call(r,c)))}}}}({id:"pixie-root",ref:d,types:["nativeFile"],onDrop:g});a(()=>{var e,t;Od().fabric||(Id.setState({canvasRef:h}),rw(h.current),null!=(e=Od().config.ui)&&e.defaultTool&&Od().setActiveTool(null==(t=Od().config.ui)?void 0:t.defaultTool,null),Ed().canvas.loadInitialContent().then(()=>{var e,t;null==(t=(e=Od().config).onLoad)||t.call(e,Od().editor)}));const n=iw(d,()=>{Od().setStageSize(ow(d.current))}),r=iw(h,()=>{Od().setCanvasSize(ow(h.current))});return()=>{n(),r()}},[d]);const v=xc("pixie-root flex flex-col overflow-hidden bg-background text-main no-tap-highlight w-full h-full",{relative:!f,"fixed inset-0 w-full h-full z-20":f,"shadow-lg border rounded-md m-auto max-h-[calc(100vh-90px)] max-w-[calc(100vw-90px)]":f&&!p});return lc(wb,{features:Cb,strict:!0,children:cc(fO,{children:[f&&i&&!p&&l&&lc(zC,{className:"z-20 fixed right-2 top-2 text-white",size:"lg",onClick:()=>{Od().editor.close()},children:lc(QC,{})}),f&&i&&lc(wC,{position:"fixed",disableInitialTransition:!0}),cc(db.div,{initial:!1,variants:{visible:{opacity:1,scale:1,display:"flex"},hidden:{opacity:0,transitionEnd:{display:"none"}}},animate:i?"visible":"hidden",className:v,children:["top"===s&&lc(s_,{}),"top"===o&&lc(pI,{className:"pt-14"}),cc("main",{className:"relative flex-auto my-20 overflow-hidden outline-none",tabIndex:-1,...Mb(m,{onKeyDownCapture:aO}),ref:d,children:[lc(c_,{}),lc(BS,{ref:h})]}),lc(sT,{}),"bottom"===o&&lc(pI,{}),"bottom"===s&&lc(s_,{}),lc(MI,{}),lc(oO,{})]})]})})}Mo.enableBoundaryChecking(!1);const gO=class{constructor(e){if(uo(this,"tools",{}),uo(this,"fabric",null),e.sentryDsn&&function(e){e._metadata=e._metadata||{},e._metadata.sdk=e._metadata.sdk||{name:"sentry.javascript.react",packages:[{name:"npm:@sentry/react",version:Vs}],version:Vs},ql(e)}({dsn:e.sentryDsn}),function(e,t){void 0===t&&(t={});var n=t.insertAt;if(!(typeof document>"u")){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}('/*! tailwindcss v3.1.8 | MIT License | https://tailwindcss.com*/.pi *,.pi :after,.pi :before{border-color:rgb(var(--be-foreground-base)/var(--be-divider-opacity));border-style:solid;border-width:0;box-sizing:border-box}.pi :after,.pi :before{--tw-content:""}.pi hr{border-top-width:1px;color:inherit;height:0}.pi abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.pi h1,.pi h2,.pi h3,.pi h4,.pi h5,.pi h6{font-size:inherit;font-weight:inherit}.pi a{color:inherit;text-decoration:inherit}.pi b,.pi strong{font-weight:bolder}.pi code,.pi kbd,.pi pre,.pi samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}.pi small{font-size:80%}.pi sub,.pi sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}.pi sub{bottom:-.25em}.pi sup{top:-.5em}.pi table{border-collapse:collapse;border-color:inherit;text-indent:0}.pi button,.pi input,.pi optgroup,.pi select,.pi textarea{color:inherit;font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;margin:0;padding:0}.pi button,.pi select{text-transform:none}.pi [type=button],.pi [type=reset],.pi [type=submit],.pi button{-webkit-appearance:button;background-color:transparent;background-image:none}.pi :-moz-focusring{outline:auto}.pi :-moz-ui-invalid{box-shadow:none}.pi progress{vertical-align:baseline}.pi ::-webkit-inner-spin-button,.pi ::-webkit-outer-spin-button{height:auto}.pi [type=search]{-webkit-appearance:textfield;outline-offset:-2px}.pi ::-webkit-search-decoration{-webkit-appearance:none}.pi ::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}.pi summary{display:list-item}.pi blockquote,.pi dd,.pi dl,.pi figure,.pi h1,.pi h2,.pi h3,.pi h4,.pi h5,.pi h6,.pi hr,.pi p,.pi pre{margin:0}.pi fieldset{margin:0;padding:0}.pi legend{padding:0}.pi menu,.pi ol,.pi ul{list-style:none;margin:0;padding:0}.pi textarea{resize:vertical}.pi input::-moz-placeholder,.pi textarea::-moz-placeholder{color:#9ca3af;opacity:1}.pi input::placeholder,.pi textarea::placeholder{color:#9ca3af;opacity:1}.pi [role=button],.pi button{cursor:pointer}.pi :disabled{cursor:default}.pi audio,.pi canvas,.pi embed,.pi iframe,.pi img,.pi object,.pi svg,.pi video{display:block;vertical-align:middle}.pi img,.pi video{height:auto;max-width:100%}.pi *,.pi :after,.pi :before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(147,197,253,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.pi ::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(147,197,253,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.pi .container{width:100%}.pi .\\!container{width:100%!important}@media (min-width:640px){.pi .container{max-width:640px}.pi .\\!container{max-width:640px!important}}@media (min-width:768px){.pi .container{max-width:768px}.pi .\\!container{max-width:768px!important}}@media (min-width:1024px){.pi .container{max-width:1024px}.pi .\\!container{max-width:1024px!important}}@media (min-width:1280px){.pi .container{max-width:1280px}.pi .\\!container{max-width:1280px!important}}@media (min-width:1536px){.pi .container{max-width:1536px}.pi .\\!container{max-width:1536px!important}}.pi .sr-only{clip:rect(0,0,0,0);border-width:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.pi .pointer-events-none{pointer-events:none}.pi .pointer-events-auto{pointer-events:auto}.pi .visible{visibility:visible}.pi .\\!visible{visibility:visible!important}.pi .invisible{visibility:hidden}.pi .static{position:static}.pi .fixed{position:fixed}.pi .absolute{position:absolute}.pi .relative{position:relative}.pi .sticky{position:sticky}.pi .inset-0{bottom:0;top:0}.pi .inset-0,.pi .inset-x-0{left:0;right:0}.pi .right-2{right:2px}.pi .top-2{top:2px}.pi .top-0{top:0}.pi .left-0{left:0}.pi .left-16{left:16px}.pi .top-26{top:26px}.pi .-left-5{left:-5px}.pi .-top-5{top:-5px}.pi .bottom-0{bottom:0}.pi .-bottom-5{bottom:-5px}.pi .right-0{right:0}.pi .-right-5{right:-5px}.pi .bottom-20{bottom:20px}.pi .right-20{right:20px}.pi .top-24{top:24px}.pi .-bottom-14{bottom:-14px}.pi .left-30{left:30px}.pi .right-4{right:4px}.pi .top-1\\/2{top:50%}.pi .-bottom-20{bottom:-20px}.pi .left-1\\/2{left:50%}.pi .-bottom-10{bottom:-10px}.pi .-left-8{left:-8px}.pi .-left-80{left:-80px}.pi .-bottom-2{bottom:-2px}.pi .-right-2{right:-2px}.pi .isolate{isolation:isolate}.pi .z-20{z-index:20}.pi .z-modal{z-index:110}.pi .z-10{z-index:10}.pi .z-obj-box{z-index:20}.pi .z-navbar{z-index:40}.pi .z-tool-overlay{z-index:30}.pi .z-50,.pi .z-loading-indicator{z-index:50}.pi .z-popover{z-index:130}.pi .z-tray{z-index:120}.pi .z-toast{z-index:160}.pi .z-tooltip{z-index:150}.pi .z-cropzone{z-index:10}.pi .col-auto{grid-column:auto}.pi .m-auto{margin:auto}.pi .m-10{margin:10px}.pi .my-20{margin-bottom:20px;margin-top:20px}.pi .my-12{margin-bottom:12px;margin-top:12px}.pi .mx-auto{margin-left:auto;margin-right:auto}.pi .my-50{margin-bottom:50px;margin-top:50px}.pi .mx-14{margin-left:14px;margin-right:14px}.pi .my-30{margin-bottom:30px;margin-top:30px}.pi .my-24{margin-bottom:24px;margin-top:24px}.pi .my-80{margin-bottom:80px;margin-top:80px}.pi .my-32{margin-bottom:32px;margin-top:32px}.pi .my-40{margin-bottom:40px;margin-top:40px}.pi .my-8{margin-bottom:8px;margin-top:8px}.pi .my-10{margin-bottom:10px;margin-top:10px}.pi .my-100{margin-bottom:6.25rem;margin-top:6.25rem}.pi .mx-4{margin-left:4px;margin-right:4px}.pi .my-4{margin-bottom:4px;margin-top:4px}.pi .mx-8{margin-left:8px;margin-right:8px}.pi .mx-20{margin-left:20px;margin-right:20px}.pi .my-auto{margin-bottom:auto;margin-top:auto}.pi .mr-5{margin-right:5px}.pi .ml-auto{margin-left:auto}.pi .mr-20{margin-right:20px}.pi .mb-16{margin-bottom:16px}.pi .mr-10{margin-right:10px}.pi .mt-auto{margin-top:auto}.pi .mt-80{margin-top:80px}.pi .mt-30{margin-top:30px}.pi .mt-4{margin-top:4px}.pi .mb-30{margin-bottom:30px}.pi .mb-20{margin-bottom:20px}.pi .mr-auto{margin-right:auto}.pi .mr-24{margin-right:24px}.pi .mb-24{margin-bottom:24px}.pi .mb-14{margin-bottom:14px}.pi .mt-6{margin-top:6px}.pi .mt-12{margin-top:12px}.pi .mb-4{margin-bottom:4px}.pi .mt-14{margin-top:14px}.pi .ml-6{margin-left:6px}.pi .mr-14{margin-right:14px}.pi .mt-8{margin-top:8px}.pi .mb-10{margin-bottom:10px}.pi .mb-8{margin-bottom:8px}.pi .mt-20{margin-top:20px}.pi .mb-1{margin-bottom:1px}.pi .ml-10{margin-left:10px}.pi .mt-10{margin-top:10px}.pi .mt-2{margin-top:2px}.pi .mb-12{margin-bottom:12px}.pi .mb-40{margin-bottom:40px}.pi .mt-40{margin-top:40px}.pi .mb-32{margin-bottom:32px}.pi .mb-64{margin-bottom:64px}.pi .mt-32{margin-top:32px}.pi .mb-48{margin-bottom:48px}.pi .mt-50{margin-top:50px}.pi .mb-6{margin-bottom:6px}.pi .mt-60{margin-top:60px}.pi .-ml-1{margin-left:-1px}.pi .-ml-4{margin-left:-4px}.pi .mr-8{margin-right:8px}.pi .-mr-4{margin-right:-4px}.pi .ml-8{margin-left:8px}.pi .mt-16{margin-top:16px}.pi .mb-2{margin-bottom:2px}.pi .mt-24{margin-top:24px}.pi .-mt-2{margin-top:-2px}.pi .mt-36{margin-top:36px}.pi .mb-110{margin-bottom:110px}.pi .mt-18{margin-top:18px}.pi .mr-6{margin-right:6px}.pi .mr-16{margin-right:16px}.pi .ml-12{margin-left:12px}.pi .mr-4{margin-right:4px}.pi .mr-12{margin-right:12px}.pi .mr-2{margin-right:2px}.pi .mb-18{margin-bottom:18px}.pi .-ml-3{margin-left:-3px}.pi .-ml-12{margin-left:-12px}.pi .-ml-6{margin-left:-6px}.pi .box-content{box-sizing:content-box}.pi .block{display:block}.pi .inline-block{display:inline-block}.pi .inline{display:inline}.pi .flex{display:flex}.pi .inline-flex{display:inline-flex}.pi .table{display:table}.pi .table-cell{display:table-cell}.pi .table-row{display:table-row}.pi .grid{display:grid}.pi .\\!grid{display:grid!important}.pi .contents{display:contents}.pi .hidden{display:none}.pi .aspect-square{aspect-ratio:1/1}.pi .h-2\\/4{height:50%}.pi .h-full{height:100%}.pi .h-font{height:1em}.pi .h-1{height:1px}.pi .h-80{height:80px}.pi .h-400{height:25rem}.pi .h-50{height:50px}.pi .h-42{height:42px}.pi .h-54{height:3.375rem}.pi .h-8{height:8px}.pi .h-24{height:24px}.pi .h-36{height:36px}.pi .h-40{height:40px}.pi .h-20{height:20px}.pi .h-30{height:30px}.pi .h-84{height:84px}.pi .h-68{height:68px}.pi .h-32{height:32px}.pi .h-\\[54px\\]{height:54px}.pi .h-\\[186px\\]{height:186px}.pi .h-60{height:60px}.pi .h-18{height:18px}.pi .h-12{height:12px}.pi .h-26{height:26px}.pi .h-90{height:5.625rem}.pi .h-128{height:128px}.pi .h-6{height:6px}.pi .h-4{height:4px}.pi .h-48{height:48px}.pi .h-2{height:2px}.pi .h-16{height:16px}.pi .h-56{height:56px}.pi .h-64{height:64px}.pi .h-144{height:144px}.pi .h-100{height:6.25rem}.pi .h-max{height:-moz-max-content;height:max-content}.pi .h-px{height:1px}.pi .h-28{height:28px}.pi .h-92{height:92px}.pi .h-14{height:14px}.pi .h-38{height:2.375rem}.pi .h-22{height:22px}.pi .max-h-\\[calc\\(100vh-90px\\)\\]{max-height:calc(100vh - 90px)}.pi .max-h-\\[calc\\(100\\%-40px\\)\\]{max-height:calc(100% - 40px)}.pi .max-h-620{max-height:38.75rem}.pi .max-h-100{max-height:6.25rem}.pi .max-h-\\[36px\\]{max-height:36px}.pi .max-h-8{max-height:8px}.pi .max-h-tray{max-height:calc(var(--be-viewport-height, 100vh)*.9)}.pi .max-h-\\[calc\\(100\\%-30px\\)\\]{max-height:calc(100% - 30px)}.pi .max-h-40{max-height:40px}.pi .max-h-inherit{max-height:inherit}.pi .max-h-\\[583px\\]{max-height:583px}.pi .max-h-full{max-height:100%}.pi .max-h-26{max-height:26px}.pi .max-h-36{max-height:36px}.pi .max-h-dialog{max-height:calc(var(--be-viewport-height, 100vh)*.9)}.pi .max-h-240{max-height:240px}.pi .min-h-440{min-height:27.5rem}.pi .min-h-full{min-height:100%}.pi .min-h-\\[238px\\]{min-height:238px}.pi .min-h-86{min-height:86px}.pi .min-h-90{min-height:5.625rem}.pi .min-h-36{min-height:36px}.pi .min-h-42{min-height:42px}.pi .min-h-dialog{min-height:calc(var(--be-viewport-height, 100vh)*.9)}.pi .min-h-50{min-height:50px}.pi .min-h-\\[228px\\]{min-height:228px}.pi .min-h-30{min-height:30px}.pi .min-h-60{min-height:60px}.pi .w-max{width:-moz-max-content;width:max-content}.pi .w-full{width:100%}.pi .w-font{width:1em}.pi .w-80{width:80px}.pi .w-50{width:50px}.pi .w-8{width:8px}.pi .w-24{width:24px}.pi .w-36{width:36px}.pi .w-20{width:20px}.pi .w-30{width:30px}.pi .w-224{width:224px}.pi .w-68{width:68px}.pi .w-96{width:96px}.pi .w-144{width:144px}.pi .w-auto{width:auto}.pi .w-1{width:1px}.pi .w-240{width:240px}.pi .w-\\[168px\\]{width:168px}.pi .w-1\\/2{width:50%}.pi .w-384{width:384px}.pi .w-min{width:-moz-min-content;width:min-content}.pi .w-256{width:256px}.pi .w-18{width:18px}.pi .w-12{width:12px}.pi .w-42{width:42px}.pi .w-60{width:60px}.pi .\\!w-auto{width:auto!important}.pi .w-26{width:26px}.pi .w-32{width:32px}.pi .w-850{width:53.125rem}.pi .w-288{width:288px}.pi .w-320{width:320px}.pi .w-440{width:27.5rem}.pi .w-40{width:40px}.pi .w-64{width:64px}.pi .w-1\\/3{width:33.333333%}.pi .w-16{width:16px}.pi .w-56{width:56px}.pi .w-2{width:2px}.pi .w-110{width:110px}.pi .w-\\[4ch\\]{width:4ch}.pi .w-\\[233px\\]{width:233px}.pi .w-46{width:2.875rem}.pi .w-38{width:2.375rem}.pi .w-\\[210px\\]{width:210px}.pi .w-100{width:6.25rem}.pi .w-620{width:38.75rem}.pi .w-780{width:48.75rem}.pi .w-\\[calc\\(100\\%-40px\\)\\]{width:calc(100% - 40px)}.pi .w-px{width:1px}.pi .w-28{width:28px}.pi .w-90{width:5.625rem}.pi .w-14{width:14px}.pi .w-22{width:22px}.pi .w-280{width:17.5rem}.pi .min-w-0{min-width:0}.pi .min-w-320{min-width:320px}.pi .min-w-80{min-width:80px}.pi .min-w-224{min-width:224px}.pi .min-w-288{min-width:288px}.pi .min-w-240{min-width:240px}.pi .min-w-42{min-width:42px}.pi .min-w-90{min-width:5.625rem}.pi .min-w-180{min-width:11.25rem}.pi .min-w-128{min-width:128px}.pi .min-w-4{min-width:4px}.pi .min-w-192{min-width:192px}.pi .max-w-\\[calc\\(100vw-90px\\)\\]{max-width:calc(100vw - 90px)}.pi .max-w-max{max-width:-moz-max-content;max-width:max-content}.pi .max-w-280{max-width:17.5rem}.pi .max-w-620{max-width:38.75rem}.pi .max-w-440{max-width:27.5rem}.pi .max-w-\\[calc\\(100\\%-40px\\)\\]{max-width:calc(100% - 40px)}.pi .max-w-\\[90\\%\\]{max-width:90%}.pi .max-w-full{max-width:100%}.pi .max-w-500{max-width:31.25rem}.pi .max-w-\\[464px\\]{max-width:464px}.pi .max-w-180{max-width:11.25rem}.pi .max-w-400{max-width:25rem}.pi .max-w-780{max-width:48.75rem}.pi .max-w-375{max-width:375px}.pi .max-w-240{max-width:240px}.pi .max-w-320{max-width:320px}.pi .max-w-288{max-width:288px}.pi .max-w-112{max-width:112px}.pi .max-w-80{max-width:80px}.pi .max-w-850{max-width:53.125rem}.pi .max-w-580{max-width:36.25rem}.pi .max-w-dialog{max-width:calc(var(--be-viewport-width, 100vw)*.9)}.pi .max-w-950{max-width:59.375rem}.pi .flex-auto{flex:1 1 auto}.pi .flex-shrink-0,.pi .shrink-0{flex-shrink:0}.pi .flex-grow-0{flex-grow:0}.pi .origin-\\[100\\%\\]{transform-origin:100%}.pi .-translate-y-1\\/2{--tw-translate-y:-50%}.pi .-translate-x-1\\/2,.pi .-translate-y-1\\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.pi .-translate-x-1\\/2{--tw-translate-x:-50%}.pi .rotate-180{--tw-rotate:180deg}.pi .rotate-0,.pi .rotate-180{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.pi .rotate-0{--tw-rotate:0deg}.pi .rotate-45{--tw-rotate:45deg}.pi .rotate-45,.pi .rotate-90{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.pi .rotate-90{--tw-rotate:90deg}.pi .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.pi .cursor-pointer{cursor:pointer}.pi .cursor-nwse-resize{cursor:nwse-resize}.pi .cursor-nesw-resize{cursor:nesw-resize}.pi .cursor-se-resize{cursor:se-resize}.pi .cursor-sw-resize{cursor:sw-resize}.pi .cursor-zoom-in{cursor:zoom-in}.pi .cursor-default{cursor:default}.pi .cursor-move{cursor:move}.pi .cursor-not-allowed{cursor:not-allowed}.pi .touch-none{touch-action:none}.pi .select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.pi .resize-none{resize:none}.pi .resize{resize:both}.pi .appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.pi .break-inside-avoid{-moz-column-break-inside:avoid;break-inside:avoid}.pi .grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.pi .grid-cols-5-min-content{grid-template-columns:repeat(5,min-content)}.pi .flex-row{flex-direction:row}.pi .flex-col{flex-direction:column}.pi .flex-col-reverse{flex-direction:column-reverse}.pi .flex-wrap{flex-wrap:wrap}.pi .flex-nowrap{flex-wrap:nowrap}.pi .items-start{align-items:flex-start}.pi .items-center{align-items:center}.pi .items-stretch{align-items:stretch}.pi .justify-start{justify-content:flex-start}.pi .justify-end{justify-content:flex-end}.pi .justify-center{justify-content:center}.pi .justify-between{justify-content:space-between}.pi .gap-16{gap:16px}.pi .gap-20{gap:20px}.pi .gap-8{gap:8px}.pi .gap-14{gap:14px}.pi .gap-24{gap:24px}.pi .gap-6{gap:6px}.pi .gap-30{gap:30px}.pi .gap-10{gap:10px}.pi .gap-12{gap:12px}.pi .gap-4{gap:4px}.pi .gap-18{gap:18px}.pi .gap-32{gap:32px}.pi .gap-40{gap:40px}.pi .gap-64{gap:64px}.pi .gap-36{gap:36px}.pi .gap-x-10{-moz-column-gap:10px;column-gap:10px}.pi .space-y-10>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(10px*var(--tw-space-y-reverse));margin-top:calc(10px*(1 - var(--tw-space-y-reverse)))}.pi .self-stretch{align-self:stretch}.pi .overflow-auto{overflow:auto}.pi .overflow-hidden{overflow:hidden}.pi .overflow-visible{overflow:visible}.pi .overflow-scroll{overflow:scroll}.pi .overflow-x-auto{overflow-x:auto}.pi .overflow-y-auto{overflow-y:auto}.pi .overflow-x-hidden{overflow-x:hidden}.pi .overflow-y-hidden{overflow-y:hidden}.pi .truncate{overflow:hidden;white-space:nowrap}.pi .overflow-ellipsis,.pi .text-ellipsis,.pi .truncate{text-overflow:ellipsis}.pi .whitespace-normal{white-space:normal}.pi .whitespace-nowrap{white-space:nowrap}.pi .whitespace-pre-wrap{white-space:pre-wrap}.pi .break-words{overflow-wrap:break-word}.pi .rounded{border-radius:4px}.pi .rounded-md{border-radius:6px}.pi .rounded-full{border-radius:9999px}.pi .rounded-lg{border-radius:8px}.pi .rounded-none{border-radius:0}.pi .rounded-2xl{border-radius:16px}.pi .rounded-sm{border-radius:2px}.pi .rounded-\\[16px\\]{border-radius:16px}.pi .rounded-\\[64px\\]{border-radius:64px}.pi .rounded-\\[32px\\]{border-radius:32px}.pi .rounded-3xl{border-radius:24px}.pi .rounded-xl{border-radius:12px}.pi .rounded-t{border-top-left-radius:4px;border-top-right-radius:4px}.pi .rounded-l{border-bottom-left-radius:4px;border-top-left-radius:4px}.pi .rounded-r-md{border-bottom-right-radius:6px;border-top-right-radius:6px}.pi .rounded-l-md{border-bottom-left-radius:6px;border-top-left-radius:6px}.pi .rounded-r{border-bottom-right-radius:4px;border-top-right-radius:4px}.pi .rounded-l-none{border-bottom-left-radius:0;border-top-left-radius:0}.pi .rounded-r-none{border-bottom-right-radius:0;border-top-right-radius:0}.pi .rounded-l-full{border-bottom-left-radius:9999px;border-top-left-radius:9999px}.pi .rounded-r-full{border-bottom-right-radius:9999px;border-top-right-radius:9999px}.pi .rounded-tr-none{border-top-right-radius:0}.pi .rounded-br-none{border-bottom-right-radius:0}.pi .rounded-tl-none{border-top-left-radius:0}.pi .rounded-bl-none{border-bottom-left-radius:0}.pi .border{border-width:1px}.pi .border-2{border-width:2px}.pi .border-4{border-width:4px}.pi .border-\\[3px\\]{border-width:3px}.pi .border-y{border-bottom-width:1px;border-top-width:1px}.pi .border-r{border-right-width:1px}.pi .border-l-4{border-left-width:4px}.pi .border-b{border-bottom-width:1px}.pi .border-t-4{border-top-width:4px}.pi .border-r-4{border-right-width:4px}.pi .border-b-4{border-bottom-width:4px}.pi .border-t{border-top-width:1px}.pi .border-l{border-left-width:1px}.pi .border-dotted{border-style:dotted}.pi .border-none{border-style:none}.pi .border-divider{border-color:rgb(var(--be-foreground-base)/var(--be-divider-opacity))}.pi .border-white{--tw-border-opacity:1;border-color:rgb(255 255 255/var(--tw-border-opacity))}.pi .border-primary\\/50{border-color:rgb(var(--be-primary)/.5)}.pi .border-danger\\/50{border-color:#ef444480}.pi .border-transparent{border-color:transparent}.pi .border-primary{--tw-border-opacity:1;border-color:rgb(var(--be-primary)/var(--tw-border-opacity))}.pi .border-danger{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity))}.pi .border-chip{--tw-border-opacity:1;border-color:rgb(var(--be-background-chip)/var(--tw-border-opacity))}.pi .border-paper{--tw-border-opacity:1;border-color:rgb(var(--be-paper)/var(--tw-border-opacity))}.pi .border-background{--tw-border-opacity:1;border-color:rgb(var(--be-background)/var(--tw-border-opacity))}.pi .border-text-muted{border-color:rgb(var(--be-foreground-base)/var(--be-text-muted-opacity))}.pi .border-white\\/50{border-color:#ffffff80}.pi .border-l-primary{--tw-border-opacity:1;border-left-color:rgb(var(--be-primary)/var(--tw-border-opacity))}.pi .border-l-transparent{border-left-color:transparent}.pi .border-l-positive{--tw-border-opacity:1;border-left-color:rgb(34 197 94/var(--tw-border-opacity))}.pi .border-l-warning{--tw-border-opacity:1;border-left-color:rgb(243 164 50/var(--tw-border-opacity))}.pi .border-l-danger{--tw-border-opacity:1;border-left-color:rgb(239 68 68/var(--tw-border-opacity))}.pi .border-r-transparent{border-right-color:transparent}.pi .border-r-primary-light{--tw-border-opacity:1;border-right-color:rgb(var(--be-primary-light)/var(--tw-border-opacity))}.pi .border-b-primary{--tw-border-opacity:1;border-bottom-color:rgb(var(--be-primary)/var(--tw-border-opacity))}.pi .bg-background{--tw-bg-opacity:1;background-color:rgb(var(--be-background)/var(--tw-bg-opacity))}.pi .bg-divider{background-color:rgb(var(--be-foreground-base)/var(--be-divider-opacity))}.pi .bg-paper{--tw-bg-opacity:1;background-color:rgb(var(--be-paper)/var(--tw-bg-opacity))}.pi .bg{--tw-bg-opacity:1;background-color:rgb(var(--be-background)/var(--tw-bg-opacity))}.pi .bg-alt{--tw-bg-opacity:1;background-color:rgb(var(--be-background-alt)/var(--tw-bg-opacity))}.pi .bg-primary\\/hover{background-color:rgb(var(--be-primary)/var(--be-hover-opacity))}.pi .bg-primary{--tw-bg-opacity:1;background-color:rgb(var(--be-primary)/var(--tw-bg-opacity))}.pi .bg-positive\\/focus{background-color:rgb(34 197 94/var(--be-focus-opacity))}.pi .bg-warning\\/focus{background-color:rgb(243 164 50/var(--be-focus-opacity))}.pi .bg-danger\\/focus{background-color:rgb(239 68 68/var(--be-focus-opacity))}.pi .bg-primary\\/focus{background-color:rgb(var(--be-primary)/var(--be-focus-opacity))}.pi .bg-primary\\/5{background-color:rgb(var(--be-primary)/.05)}.pi .bg-controls{--tw-bg-opacity:1;background-color:rgb(50 50 50/var(--tw-bg-opacity))}.pi .bg-chip{--tw-bg-opacity:1;background-color:rgb(var(--be-background-chip)/var(--tw-bg-opacity))}.pi .bg-primary-light\\/20{background-color:rgb(var(--be-primary-light)/.2)}.pi .bg-primary\\/selected{background-color:rgb(var(--be-primary)/var(--be-selected-opacity))}.pi .bg-warning{--tw-bg-opacity:1;background-color:rgb(243 164 50/var(--tw-bg-opacity))}.pi .bg-transparent{background-color:transparent}.pi .bg-danger{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity))}.pi .bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.pi .bg-toast{--tw-bg-opacity:1;background-color:rgb(50 50 50/var(--tw-bg-opacity))}.pi .bg-focus{background-color:rgb(var(--be-foreground-base)/var(--be-focus-opacity))}.pi .bg-black\\/30{background-color:#0000004d}.pi .bg-primary-light{--tw-bg-opacity:1;background-color:rgb(var(--be-primary-light)/var(--tw-bg-opacity))}.pi .bg-fg-base\\/4{background-color:rgb(var(--be-foreground-base)/4%)}.pi .bg-positive{--tw-bg-opacity:1;background-color:rgb(34 197 94/var(--tw-bg-opacity))}.pi .bg-inherit{background-color:inherit}.pi .bg-background\\/70{background-color:rgb(var(--be-background)/.7)}.pi .bg-envato{--tw-bg-opacity:1;background-color:rgb(108 161 43/var(--tw-bg-opacity))}.pi .bg-disabled{background-color:rgb(var(--be-foreground-base)/var(--be-disabled-bg-opacity))}.pi .bg-disabled-fg{background-color:rgb(var(--be-foreground-base)/var(--be-disabled-fg-opacity))}.pi .bg-slider-disabled{--tw-bg-opacity:1;background-color:rgb(189 189 189/var(--tw-bg-opacity))}.pi .bg-primary-dark{--tw-bg-opacity:1;background-color:rgb(var(--be-primary-dark)/var(--tw-bg-opacity))}.pi .bg-white\\/50{background-color:#ffffff80}.pi .bg-black\\/50{background-color:#00000080}.pi .bg-primary-light\\/40{background-color:rgb(var(--be-primary-light)/.4)}.pi .bg-positive-lighter{--tw-bg-opacity:1;background-color:rgb(187 247 208/var(--tw-bg-opacity))}.pi .bg-danger-lighter{--tw-bg-opacity:1;background-color:rgb(254 202 202/var(--tw-bg-opacity))}.pi .bg-opacity-95{--tw-bg-opacity:.95}.pi .bg-no-repeat{background-repeat:no-repeat}.pi .fill-current{fill:currentColor}.pi .fill-transparent{fill:transparent}.pi .stroke-current{stroke:currentColor}.pi .object-contain{-o-object-fit:contain;object-fit:contain}.pi .object-cover{-o-object-fit:cover;object-fit:cover}.pi .p-0{padding:0}.pi .p-14{padding:14px}.pi .p-16{padding:16px}.pi .p-24{padding:24px}.pi .p-10{padding:10px}.pi .p-8{padding:8px}.pi .p-6{padding:6px}.pi .p-12{padding:12px}.pi .p-20{padding:20px}.pi .p-4{padding:4px}.pi .p-18{padding:18px}.pi .p-40{padding:40px}.pi .p-2{padding:2px}.pi .px-24{padding-left:24px;padding-right:24px}.pi .py-20{padding-bottom:20px;padding-top:20px}.pi .px-6{padding-left:6px;padding-right:6px}.pi .px-8{padding-left:8px;padding-right:8px}.pi .py-12{padding-bottom:12px;padding-top:12px}.pi .px-16{padding-left:16px;padding-right:16px}.pi .py-14{padding-bottom:14px;padding-top:14px}.pi .px-14{padding-left:14px;padding-right:14px}.pi .px-20{padding-left:20px;padding-right:20px}.pi .px-32{padding-left:32px;padding-right:32px}.pi .py-10{padding-bottom:10px;padding-top:10px}.pi .px-4{padding-left:4px;padding-right:4px}.pi .px-10{padding-left:10px;padding-right:10px}.pi .py-2{padding-bottom:2px;padding-top:2px}.pi .px-5vw{padding-left:5vw;padding-right:5vw}.pi .px-12{padding-left:12px;padding-right:12px}.pi .py-\\[9px\\]{padding-bottom:9px;padding-top:9px}.pi .px-40{padding-left:40px;padding-right:40px}.pi .py-32{padding-bottom:32px;padding-top:32px}.pi .px-28{padding-left:28px;padding-right:28px}.pi .py-56{padding-bottom:56px;padding-top:56px}.pi .py-28{padding-bottom:28px;padding-top:28px}.pi .py-90{padding-bottom:5.625rem;padding-top:5.625rem}.pi .py-4{padding-bottom:4px;padding-top:4px}.pi .px-18{padding-left:18px;padding-right:18px}.pi .px-22{padding-left:22px;padding-right:22px}.pi .px-26{padding-left:26px;padding-right:26px}.pi .py-8{padding-bottom:8px;padding-top:8px}.pi .py-96{padding-bottom:96px;padding-top:96px}.pi .py-6{padding-bottom:6px;padding-top:6px}.pi .py-3{padding-bottom:3px;padding-top:3px}.pi .py-5{padding-bottom:5px;padding-top:5px}.pi .py-40{padding-bottom:40px;padding-top:40px}.pi .pt-14{padding-top:14px}.pi .pt-24{padding-top:24px}.pi .pb-12{padding-bottom:12px}.pi .pt-26{padding-top:26px}.pi .pb-16{padding-bottom:16px}.pi .pb-24{padding-bottom:24px}.pi .pt-50{padding-top:50px}.pi .pt-20{padding-top:20px}.pi .pb-10{padding-bottom:10px}.pi .pb-4{padding-bottom:4px}.pi .pr-10{padding-right:10px}.pi .pl-10{padding-left:10px}.pi .pb-20{padding-bottom:20px}.pi .pb-30{padding-bottom:30px}.pi .pt-30{padding-top:30px}.pi .pl-8{padding-left:8px}.pi .pb-14{padding-bottom:14px}.pi .pl-14{padding-left:14px}.pi .pt-54{padding-top:3.375rem}.pi .pb-28{padding-bottom:28px}.pi .pb-48{padding-bottom:48px}.pi .pb-safe-area{padding-bottom:env(safe-area-inset-bottom)}.pi .pl-24{padding-left:24px}.pi .pr-16{padding-right:16px}.pi .pr-24{padding-right:24px}.pi .pl-16{padding-left:16px}.pi .pr-6{padding-right:6px}.pi .pb-18{padding-bottom:18px}.pi .pt-6{padding-top:6px}.pi .pt-16{padding-top:16px}.pi .pt-10{padding-top:10px}.pi .pl-12{padding-left:12px}.pi .pr-12{padding-right:12px}.pi .pb-6{padding-bottom:6px}.pi .pt-42{padding-top:42px}.pi .pb-32{padding-bottom:32px}.pi .pt-70{padding-top:70px}.pi .pt-40{padding-top:40px}.pi .pr-8{padding-right:8px}.pi .pl-46{padding-left:2.875rem}.pi .pr-46{padding-right:2.875rem}.pi .pl-6{padding-left:6px}.pi .pl-18{padding-left:18px}.pi .pr-18{padding-right:18px}.pi .text-left{text-align:left}.pi .text-center{text-align:center}.pi .text-right{text-align:right}.pi .align-top{vertical-align:top}.pi .align-middle{vertical-align:middle}.pi .text-sm{font-size:14px;line-height:20px}.pi .text-xs{font-size:12px;line-height:16px}.pi .text-xl{font-size:20px;line-height:28px}.pi .text-6xl{font-size:60px;line-height:1}.pi .text-2xl{font-size:24px;line-height:32px}.pi .text-3xl{font-size:30px;line-height:36px}.pi .text-base{font-size:16px;line-height:24px}.pi .text-lg{font-size:18px;line-height:28px}.pi .text-4xl{font-size:36px;line-height:40px}.pi .font-medium{font-weight:500}.pi .font-semibold{font-weight:600}.pi .font-light{font-weight:300}.pi .font-bold{font-weight:700}.pi .font-normal{font-weight:400}.pi .uppercase{text-transform:uppercase}.pi .capitalize{text-transform:capitalize}.pi .italic{font-style:italic}.pi .tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.pi .leading-none{line-height:1}.pi .leading-5{line-height:1.25rem}.pi .tracking-wide{letter-spacing:.025em}.pi .text,.pi .text-main{color:rgb(var(--be-foreground-base)/var(--be-text-main-opacity))}.pi .text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.pi .text-muted{color:rgb(var(--be-foreground-base)/var(--be-text-muted-opacity))}.pi .text-positive{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity))}.pi .text-danger{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity))}.pi .text-primary{--tw-text-opacity:1;color:rgb(var(--be-primary)/var(--tw-text-opacity))}.pi .\\!text{color:rgb(var(--be-foreground-base)/var(--be-text-main-opacity))!important}.pi .text-facebook{--tw-text-opacity:1;color:rgb(59 89 152/var(--tw-text-opacity))}.pi .text-twitter{--tw-text-opacity:1;color:rgb(29 161 242/var(--tw-text-opacity))}.pi .text-positive-darker{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity))}.pi .text-disabled{color:rgb(var(--be-foreground-base)/var(--be-disabled-fg-opacity))}.pi .text-on-primary{--tw-text-opacity:1;color:rgb(var(--be-on-primary)/var(--tw-text-opacity))}.pi .text-primary-light{--tw-text-opacity:1;color:rgb(var(--be-primary-light)/var(--tw-text-opacity))}.pi .text-primary\\/40{color:rgb(var(--be-primary)/.4)}.pi .text-black\\/30{color:#0000004d}.pi .text-danger-darker{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity))}.pi .underline{text-decoration-line:underline}.pi .no-underline{text-decoration-line:none}.pi .caret-transparent{caret-color:transparent}.pi .opacity-0{opacity:0}.pi .opacity-100{opacity:1}.pi .opacity-80{opacity:.8}.pi .opacity-90{opacity:.9}.pi .shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.pi .shadow,.pi .shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.pi .shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.pi .shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color)}.pi .shadow-\\[15px_0_30px_0_rgb\\(0_0_0_\\/_18\\%\\)\\],.pi .shadow-xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.pi .shadow-\\[15px_0_30px_0_rgb\\(0_0_0_\\/_18\\%\\)\\]{--tw-shadow:15px 0 30px 0 rgba(0,0,0,.18);--tw-shadow-colored:15px 0 30px 0 var(--tw-shadow-color)}.pi .shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.pi .shadow-md,.pi .shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.pi .shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.pi .shadow-2xl{--tw-shadow:0 25px 50px -12px rgba(0,0,0,.25);--tw-shadow-colored:0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.pi .outline-none{outline:2px solid transparent;outline-offset:2px}.pi .outline{outline-color:rgb(var(--be-primary-lighter)/1);outline-style:solid;outline-width:2px}.pi .ring{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.pi .ring-inset{--tw-ring-inset:inset}.pi .ring-offset-4{--tw-ring-offset-width:4px}.pi .blur{--tw-blur:blur(8px)}.pi .blur,.pi .grayscale{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.pi .grayscale{--tw-grayscale:grayscale(100%)}.pi .invert{--tw-invert:invert(100%)}.pi .invert,.pi .sepia{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.pi .sepia{--tw-sepia:sepia(100%)}.pi .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.pi .transition-transform{transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .transition-shadow{transition-duration:.15s;transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .transition-bg-color{transition-duration:.15s;transition-property:background-color;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .transition-button{transition-duration:.15s;transition-property:background-color,box-shadow,border-color,color;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .transition-width{transition-duration:.15s;transition-property:width;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .duration-200{transition-duration:.2s}.pi .duration-100{transition-duration:.1s}.pi .will-change-\\[width\\]{will-change:width}.pi .will-change-transform{will-change:transform}.pi .icon-2xs{font-size:.75rem}.pi .icon-xs{font-size:1rem}.pi .icon-sm{font-size:1.25rem}.pi .icon-md{font-size:1.5rem}.pi .icon-lg{font-size:2.1875rem}.pi .icon-xl{font-size:2.6875rem}.pi .col-w-1{flex:1 0 0px}.pi .col-w-2{flex:2 0 0px}.pi .col-w-3{flex:3 0 0px}.pi .no-tap-highlight{-webkit-tap-highlight-color:transparent}@media only screen and (min-device-width:768px){.pi .tiny-scrollbar{scrollbar-color:rgba(0,0,0,.2) transparent;scrollbar-width:thin}.pi .tiny-scrollbar::-webkit-scrollbar{background-color:transparent;height:6px;width:6px}.pi .tiny-scrollbar::-webkit-scrollbar-thumb{background-color:rgb(var(--be-foreground-base)/.2);border-radius:10px}.pi .tiny-scrollbar::-webkit-scrollbar-track-piece:start{background:transparent}.pi .tiny-scrollbar::-webkit-scrollbar-track-piece:end{background:transparent}}.pi .hide-scrollbar{scrollbar-width:none}.pi .hide-scrollbar::-webkit-scrollbar{background:transparent;height:0;width:0}.pi .svg-icon{fill:currentColor;display:inline-block;flex-shrink:0;transition-duration:.15s;transition-property:transform,fill;transition-timing-function:cubic-bezier(.4,0,.2,1);-webkit-user-select:none;-moz-user-select:none;user-select:none}.pi .cropzone:not(.moving) .cropzone-transition{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .first-letter\\:capitalize:first-letter{text-transform:capitalize}.pi .file\\:mr-10::file-selector-button{margin-right:10px}.pi .file\\:h-24::file-selector-button{height:24px}.pi .file\\:rounded::file-selector-button{border-radius:4px}.pi .file\\:border-none::file-selector-button{border-style:none}.pi .file\\:bg-primary::file-selector-button{--tw-bg-opacity:1;background-color:rgb(var(--be-primary)/var(--tw-bg-opacity))}.pi .file\\:px-10::file-selector-button{padding-left:10px;padding-right:10px}.pi .file\\:text-sm::file-selector-button{font-size:14px;line-height:20px}.pi .file\\:font-semibold::file-selector-button{font-weight:600}.pi .file\\:text-on-primary::file-selector-button{--tw-text-opacity:1;color:rgb(var(--be-on-primary)/var(--tw-text-opacity))}.pi .before\\:absolute:before{content:var(--tw-content);position:absolute}.pi .before\\:left-0:before{content:var(--tw-content);left:0}.pi .before\\:top-1\\/2:before{content:var(--tw-content);top:50%}.pi .before\\:z-10:before{content:var(--tw-content);z-index:10}.pi .before\\:block:before{content:var(--tw-content);display:block}.pi .before\\:h-1:before{content:var(--tw-content);height:1px}.pi .before\\:h-full:before{content:var(--tw-content);height:100%}.pi .before\\:h-28:before{content:var(--tw-content);height:28px}.pi .before\\:h-22:before{content:var(--tw-content);height:22px}.pi .before\\:h-18:before{content:var(--tw-content);height:18px}.pi .before\\:h-12:before{content:var(--tw-content);height:12px}.pi .before\\:h-14:before{content:var(--tw-content);height:14px}.pi .before\\:w-full:before{content:var(--tw-content);width:100%}.pi .before\\:w-28:before{content:var(--tw-content);width:28px}.pi .before\\:w-22:before{content:var(--tw-content);width:22px}.pi .before\\:w-18:before{content:var(--tw-content);width:18px}.pi .before\\:w-12:before{content:var(--tw-content);width:12px}.pi .before\\:w-14:before{content:var(--tw-content);width:14px}.pi .before\\:-translate-y-1\\/2:before{--tw-translate-y:-50%}.pi .before\\:-translate-y-1\\/2:before,.pi .before\\:translate-x-2:before{content:var(--tw-content);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.pi .before\\:translate-x-2:before{--tw-translate-x:2px}.pi .before\\:scale-10:before{--tw-scale-x:.1;--tw-scale-y:.1;content:var(--tw-content);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.pi .before\\:rounded-full:before{border-radius:9999px;content:var(--tw-content)}.pi .before\\:rounded-3xl:before{border-radius:24px;content:var(--tw-content)}.pi .before\\:border:before{border-width:1px;content:var(--tw-content)}.pi .before\\:bg-divider:before{background-color:rgb(var(--be-foreground-base)/var(--be-divider-opacity));content:var(--tw-content)}.pi .before\\:bg-primary:before{--tw-bg-opacity:1;background-color:rgb(var(--be-primary)/var(--tw-bg-opacity));content:var(--tw-content)}.pi .before\\:bg-white:before{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity));content:var(--tw-content)}.pi .before\\:opacity-0:before{content:var(--tw-content);opacity:0}.pi .before\\:transition:before{content:var(--tw-content);transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .before\\:transition-transform:before{content:var(--tw-content);transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .before\\:duration-200:before{content:var(--tw-content);transition-duration:.2s}.pi .before\\:content-\\[\\\\\\\\00a0\\]:before{--tw-content:\\\\00a0;content:var(--tw-content)}.pi .after\\:pointer-events-none:after{content:var(--tw-content);pointer-events:none}.pi .after\\:absolute:after{content:var(--tw-content);position:absolute}.pi .after\\:inset-0:after{bottom:0;content:var(--tw-content);left:0;right:0;top:0}.pi .first\\:capitalize:first-child{text-transform:capitalize}.pi .checked\\:border-primary:checked{--tw-border-opacity:1;border-color:rgb(var(--be-primary)/var(--tw-border-opacity))}.pi .checked\\:border-danger:checked{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity))}.pi .checked\\:bg-primary:checked{--tw-bg-opacity:1;background-color:rgb(var(--be-primary)/var(--tw-bg-opacity))}.pi .checked\\:bg-danger:checked{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity))}.pi .checked\\:before\\:translate-x-36:checked:before{--tw-translate-x:36px}.pi .checked\\:before\\:translate-x-30:checked:before,.pi .checked\\:before\\:translate-x-36:checked:before{content:var(--tw-content);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.pi .checked\\:before\\:translate-x-30:checked:before{--tw-translate-x:30px}.pi .checked\\:before\\:translate-x-24:checked:before{--tw-translate-x:24px}.pi .checked\\:before\\:translate-x-16:checked:before,.pi .checked\\:before\\:translate-x-24:checked:before{content:var(--tw-content);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.pi .checked\\:before\\:translate-x-16:checked:before{--tw-translate-x:16px}.pi .checked\\:before\\:translate-x-20:checked:before{--tw-translate-x:20px}.pi .checked\\:before\\:scale-\\[\\.65\\]:checked:before,.pi .checked\\:before\\:translate-x-20:checked:before{content:var(--tw-content);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.pi .checked\\:before\\:scale-\\[\\.65\\]:checked:before{--tw-scale-x:.65;--tw-scale-y:.65}.pi .checked\\:before\\:border-white:checked:before{--tw-border-opacity:1;border-color:rgb(255 255 255/var(--tw-border-opacity));content:var(--tw-content)}.pi .checked\\:before\\:opacity-100:checked:before{content:var(--tw-content);opacity:1}.pi .focus-within\\:border-primary\\/60:focus-within{border-color:rgb(var(--be-primary)/.6)}.pi .focus-within\\:ring:focus-within{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.pi .focus-within\\:ring-primary\\/focus:focus-within{--tw-ring-color:rgb(var(--be-primary)/var(--be-focus-opacity))}.pi .focus-within\\:ring-primary-light:focus-within{--tw-ring-opacity:1;--tw-ring-color:rgb(var(--be-primary-light)/var(--tw-ring-opacity))}.pi .hover\\:scale-105:hover{--tw-scale-x:1.05;--tw-scale-y:1.05}.pi .hover\\:scale-105:hover,.pi .hover\\:scale-110:hover{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.pi .hover\\:scale-110:hover{--tw-scale-x:1.1;--tw-scale-y:1.1}.pi .hover\\:cursor-move:hover{cursor:move}.pi .hover\\:border-primary:hover{--tw-border-opacity:1;border-color:rgb(var(--be-primary)/var(--tw-border-opacity))}.pi .hover\\:border-danger:hover{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity))}.pi .hover\\:border-primary-dark:hover{--tw-border-opacity:1;border-color:rgb(var(--be-primary-dark)/var(--tw-border-opacity))}.pi .hover\\:border-danger\\/90:hover{border-color:#ef4444e6}.pi .hover\\:border-chip\\/90:hover{border-color:rgb(var(--be-background-chip)/.9)}.pi .hover\\:bg-hover:hover{background-color:rgb(var(--be-foreground-base)/var(--be-hover-opacity))}.pi .hover\\:bg-primary\\/10:hover{background-color:rgb(var(--be-primary)/.1)}.pi .hover\\:bg-white\\/hover:hover{background-color:rgb(255 255 255/var(--be-hover-opacity))}.pi .hover\\:bg-primary\\/hover:hover{background-color:rgb(var(--be-primary)/var(--be-hover-opacity))}.pi .hover\\:bg-danger\\/4:hover{background-color:#ef44440a}.pi .hover\\:bg-primary\\/4:hover{background-color:rgb(var(--be-primary)/4%)}.pi .hover\\:bg-primary-dark:hover{--tw-bg-opacity:1;background-color:rgb(var(--be-primary-dark)/var(--tw-bg-opacity))}.pi .hover\\:bg-danger\\/90:hover{background-color:#ef4444e6}.pi .hover\\:bg-chip\\/90:hover{background-color:rgb(var(--be-background-chip)/.9)}.pi .hover\\:bg-paper\\/90:hover{background-color:rgb(var(--be-paper)/.9)}.pi .hover\\:bg-primary\\/focus:hover{background-color:rgb(var(--be-primary)/var(--be-focus-opacity))}.pi .hover\\:bg-fg-base\\/15:hover{background-color:rgb(var(--be-foreground-base)/15%)}.pi .hover\\:text-primary-dark:hover{--tw-text-opacity:1;color:rgb(var(--be-primary-dark)/var(--tw-text-opacity))}.pi .hover\\:text-main:hover{color:rgb(var(--be-foreground-base)/var(--be-text-main-opacity))}.pi .hover\\:text-fg-base:hover{--tw-text-opacity:1;color:rgb(var(--be-foreground-base)/var(--tw-text-opacity))}.pi .hover\\:underline:hover{text-decoration-line:underline}.pi .hover\\:opacity-100:hover{opacity:1}.pi .hover\\:shadow-md:hover{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.pi .before\\:hover\\:bg-primary-dark:hover:before{--tw-bg-opacity:1;background-color:rgb(var(--be-primary-dark)/var(--tw-bg-opacity));content:var(--tw-content)}.pi .hover\\:after\\:bg-black\\/5:hover:after{background-color:#0000000d;content:var(--tw-content)}.pi .checked\\:hover\\:border-primary-dark:hover:checked{--tw-border-opacity:1;border-color:rgb(var(--be-primary-dark)/var(--tw-border-opacity))}.pi .focus\\:border-danger\\/60:focus{border-color:#ef444499}.pi .focus\\:border-primary\\/60:focus{border-color:rgb(var(--be-primary)/.6)}.pi .focus\\:bg-primary:focus{--tw-bg-opacity:1;background-color:rgb(var(--be-primary)/var(--tw-bg-opacity))}.pi .focus\\:text-on-primary:focus{--tw-text-opacity:1;color:rgb(var(--be-on-primary)/var(--tw-text-opacity))}.pi .focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.pi .focus\\:ring:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.pi .focus\\:ring-2:focus,.pi .focus\\:ring:focus{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.pi .focus\\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.pi .focus\\:ring-danger\\/focus:focus{--tw-ring-color:rgb(239 68 68/var(--be-focus-opacity))}.pi .focus\\:ring-primary\\/focus:focus{--tw-ring-color:rgb(var(--be-primary)/var(--be-focus-opacity))}.pi .focus\\:ring-offset-2:focus{--tw-ring-offset-width:2px}.pi .focus\\:after\\:bg-black\\/10:focus:after{background-color:#0000001a;content:var(--tw-content)}.pi .focus-visible\\:bg-primary\\/focus:focus-visible{background-color:rgb(var(--be-primary)/var(--be-focus-opacity))}.pi .focus-visible\\:bg-focus:focus-visible{background-color:rgb(var(--be-foreground-base)/var(--be-focus-opacity))}.pi .focus-visible\\:outline:focus-visible{outline-style:solid;outline-width:2px}.pi .focus-visible\\:outline-offset-2:focus-visible{outline-offset:2px}.pi .focus-visible\\:outline:focus-visible{outline-color:rgb(var(--be-primary-lighter)/1)}.pi .focus-visible\\:outline-primary-light:focus-visible{outline-color:rgb(var(--be-primary-light)/1)}.pi .focus-visible\\:ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.pi .focus-visible\\:ring:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.pi .disabled\\:pointer-events-none:disabled{pointer-events:none}.pi .disabled\\:cursor-default:disabled{cursor:default}.pi .disabled\\:border-disabled-bg:disabled{border-color:rgb(var(--be-foreground-base)/var(--be-disabled-bg-opacity))}.pi .disabled\\:border-transparent:disabled{border-color:transparent}.pi .disabled\\:border-disabled-fg:disabled{border-color:rgb(var(--be-foreground-base)/var(--be-disabled-fg-opacity))}.pi .disabled\\:border-r-transparent:disabled{border-right-color:transparent}.pi .disabled\\:bg-transparent:disabled{background-color:transparent}.pi .disabled\\:bg-disabled:disabled{background-color:rgb(var(--be-foreground-base)/var(--be-disabled-bg-opacity))}.pi .disabled\\:text-disabled:disabled{color:rgb(var(--be-foreground-base)/var(--be-disabled-fg-opacity))}.pi .disabled\\:shadow-none:disabled{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.pi .disabled\\:before\\:bg-disabled-fg:disabled:before{background-color:rgb(var(--be-foreground-base)/var(--be-disabled-fg-opacity));content:var(--tw-content)}.pi .dark .dark\\:bg-alt{--tw-bg-opacity:1;background-color:rgb(var(--be-background-alt)/var(--tw-bg-opacity))}.pi .dark .dark\\:bg-none{background-image:none}.pi .dark .dark\\:text-white\\/50{color:#ffffff80}.pi .dark .dark\\:opacity-5{opacity:.05}.pi .dark .dark\\:opacity-80{opacity:.8}.pi .dark .dark\\:checked\\:border-primary-dark:checked{--tw-border-opacity:1;border-color:rgb(var(--be-primary-dark)/var(--tw-border-opacity))}.pi .dark .dark\\:checked\\:bg-primary-dark:checked{--tw-bg-opacity:1;background-color:rgb(var(--be-primary-dark)/var(--tw-bg-opacity))}@media (min-width:640px){.pi .sm\\:justify-start{justify-content:flex-start}.pi .sm\\:text-sm{font-size:14px;line-height:20px}}@media (min-width:768px){.pi .md\\:invisible{visibility:hidden}.pi .md\\:my-24{margin-bottom:24px;margin-top:24px}.pi .md\\:mx-40{margin-left:40px;margin-right:40px}.pi .md\\:my-64{margin-bottom:64px;margin-top:64px}.pi .md\\:my-100{margin-bottom:6.25rem;margin-top:6.25rem}.pi .md\\:mr-0{margin-right:0}.pi .md\\:mb-0{margin-bottom:0}.pi .md\\:mr-10{margin-right:10px}.pi .md\\:mb-40{margin-bottom:40px}.pi .md\\:mb-24{margin-bottom:24px}.pi .md\\:mt-60{margin-top:60px}.pi .md\\:mb-70{margin-bottom:70px}.pi .md\\:mt-0{margin-top:0}.pi .md\\:mr-24{margin-right:24px}.pi .md\\:mr-80{margin-right:80px}.pi .md\\:block{display:block}.pi .md\\:flex{display:flex}.pi .md\\:h-0{height:0}.pi .md\\:w-min{width:-moz-min-content;width:min-content}.pi .md\\:w-320{width:320px}.pi .md\\:w-400{width:25rem}.pi .md\\:min-w-440{min-width:27.5rem}.pi .md\\:max-w-950{max-width:59.375rem}.pi .md\\:max-w-350{max-width:21.875rem}.pi .md\\:flex-row{flex-direction:row}.pi .md\\:items-start{align-items:flex-start}.pi .md\\:gap-12{gap:12px}.pi .md\\:gap-24{gap:24px}.pi .md\\:gap-80{gap:80px}.pi .md\\:gap-112{gap:112px}.pi .md\\:overflow-hidden{overflow:hidden}.pi .md\\:p-24{padding:24px}.pi .md\\:px-24{padding-left:24px;padding-right:24px}.pi .md\\:px-30{padding-left:30px;padding-right:30px}.pi .md\\:px-0{padding-left:0;padding-right:0}.pi .md\\:px-20{padding-left:20px;padding-right:20px}.pi .md\\:py-80{padding-bottom:80px;padding-top:80px}.pi .md\\:px-176{padding-left:176px;padding-right:176px}.pi .md\\:px-10vw{padding-left:10vw;padding-right:10vw}.pi .md\\:pt-128{padding-top:128px}.pi .md\\:pl-20{padding-left:20px}.pi .md\\:pb-0{padding-bottom:0}.pi .md\\:pb-54{padding-bottom:3.375rem}.pi .md\\:text-left{text-align:left}.pi .md\\:text-3xl{font-size:30px;line-height:36px}.pi .md\\:text-4xl{font-size:36px;line-height:40px}.pi .md\\:text-lg{font-size:18px;line-height:28px}.pi .md\\:text-base{font-size:16px;line-height:24px}.pi .md\\:font-medium{font-weight:500}.pi .md\\:font-normal{font-weight:400}.pi .md\\:shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}}@media (min-width:1024px){.pi .lg\\:min-w-500{min-width:31.25rem}.pi .lg\\:flex-row{flex-direction:row}.pi .lg\\:items-center{align-items:center}.pi .lg\\:px-96{padding-left:96px;padding-right:96px}.pi .lg\\:py-96{padding-bottom:96px;padding-top:96px}.pi .lg\\:pb-0{padding-bottom:0}}@media (min-width:1280px){.pi .xl\\:w-1\\/2{width:50%}.pi .xl\\:pt-96{padding-top:96px}}.pi .\\[\\&\\>\\.tree-label\\]\\:focus-visible\\:ring:focus-visible>.tree-label{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.pi .\\[\\&\\>\\.tree-label\\]\\:focus-visible\\:ring-2:focus-visible>.tree-label{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.pi .\\[\\&\\>\\.tree-label\\]\\:focus-visible\\:ring-inset:focus-visible>.tree-label{--tw-ring-inset:inset}\n'),!e.selector)throw new Error('Pixie required "selector" option.');const t=document.querySelector(e.selector);t&&(t.classList.add("pi"),function(e){Ad=e}(t),this.setConfig(e),Id.setState({editor:this}),Wd(t).render(lc(i.StrictMode,{children:lc(pO,{})})))}get state(){return Od()}get defaultConfig(){return gO.defaultConfig}open(e={}){var t;null!=(t=Od().config.ui)&&t.visible||(this.setConfig(_o(e,{ui:{visible:!0}})),requestAnimationFrame(()=>{var e,t,n,r;Ed().zoom.fitToScreen(),Ed().history.addInitial(),zd()&&(null==(t=null==(e=Od().config.ui)?void 0:e.openImageDialog)?void 0:t.show)&&this.togglePanel("newImage",!0),null==(r=(n=Od().config).onOpen)||r.call(n)}))}close(){var e,t,n;null==(e=Od().config.ui)||!e.visible||(this.setConfig({ui:{visible:!1}}),null==(n=(t=Od().config).onClose)||n.call(t))}setConfig(e){Od().setConfig(e)}uploadAndAddImage(){return Ed().import.uploadAndAddImage()}uploadAndReplaceMainImage(){return Ed().import.uploadAndReplaceMainImage()}uploadAndOpenStateFile(){return Ed().import.uploadAndOpenStateFile()}newCanvas(e,t,n){return Ed().canvas.openNew(e,t,n)}getState(e){return JSON.stringify(Dd(e))}setState(e){return Ed().import.loadState(e)}async setStateFromUrl(e){const t=await Fd(e);return Ed().import.loadState(t)}openTool(e){Rd(e)}applyChanges(){Od().applyChanges()}cancelChanges(){Od().cancelChanges()}async resetEditor(e){await Md(e),await Ed().canvas.loadInitialContent()}togglePanel(e,t){"objects"===e&&Od().togglePanel("history",!1),"history"===e&&Od().togglePanel("objects",!1),Od().togglePanel(e,t)}on(e,t){var n;null==(n=this.fabric)||n.on(e,t)}isDirty(){return Od().dirty}get(e){return this.tools[e]}notify(e){return Hd(e)}static init(e){return new Promise(t=>{const n=e.onLoad;e.onLoad=e=>{null==n||n(e),t(e)},new this(e)})}};let mO=gO;uo(mO,"defaultConfig",Gc),uo(mO,"version",$c);const vO="fm-pixie-editor";const bO=new class{constructor(){this._container=document.createElement("div"),this._instance=null,this._container.classList.add(vO),this._container.style.width="100%",this._container.style.height="85vh",this._container.style.minHeight="400px"}get className(){return`.${vO}`}get canvas(){var e,t;return null===(t=null===(e=this._instance)||void 0===e?void 0:e.state.canvasRef)||void 0===t?void 0:t.current}get tools(){var e;return null===(e=this._instance)||void 0===e?void 0:e.tools}isLoaded(){return!!this._instance}async _setConfig(e){this._instance?await this._instance.resetEditor(e):this._instance=await mO.init(Object.assign(Object.assign({},e),{selector:this.className}))}async show(e,t,n=t.firstChild){t.insertBefore(this._container,n),await this._setConfig(e),this._instance.open()}close(){var e;null===(e=this._container.parentNode)||void 0===e||e.removeChild(this._container)}};var yO;!function(e){e.TOP="top",e.BOTTOM="bottom",e.HIDDEN=""}(yO||(yO={}));const wO=(e,t="image/png")=>fetch(`data:${t};base64,${e}`).then(e=>e.blob());const xO=({visible:t,onClose:n,file:i,onSave:o})=>{const a=r.useRef(null),{options:s,actions:l}=ri(),{config:c}=s,{setCurrentMenuFile:u}=l,[h,d]=r.useState(null),[f,p]=r.useState(""),[g,m]=r.useState(!1),[v,b]=r.useState(!1),y=ci(),w=r.useRef(!1),x=r.useRef(),C=r.useRef(void 0),[_,S]=r.useState(null);r.useEffect(()=>{i&&(async()=>{if(C.current!==i)if("object"!=typeof i)try{if(C.current=i,i.startsWith("data:"))S({thumbnail:i});else{const e=await y.handleAddFileByUrl(i,!0);if(!e)throw new Error("Не удалось загрузить файл");C.current===i&&S(e)}}finally{C.current===i&&(C.current=null)}else S(i)})()},[i,y.handleAddFileByUrl,S]),x.current=o;const A=r.useCallback(async e=>{try{if(e.thumbnail&&e.thumbnail.startsWith("data:"))return e.thumbnail;const t=await y.getFileData(e);if(!t)throw new Error("Ошибка загрузки файла");return new Promise(e=>{const n=new FileReader;n.onload=()=>e(n.result),n.readAsDataURL(t)})}catch(e){throw console.error("Ошибка получения данных изображения:",e),e}},[y.getFileData]);r.useEffect(()=>{(async()=>{try{const e=_?await A(_):null;d(e);const t=_?_.type:"";p(t||"image/png")}catch(e){console.error("🎨 Ошибка загрузки изображения:",e),E.error("Ошибка загрузки изображения"),null==n||n()}})()},[t,_,A,n]);const k=r.useCallback(async(e,t,r)=>{if(_&&x.current)try{const t=await function(e,t){if("json"===e)return new Blob([t],{type:"application/json"});if("svg"===e)return new Blob([t],{type:"image/svg+xml"});let n=`image/${e}`;if("jpg"===e&&(n="image/jpeg"),t.startsWith("data:")){const e=t.match(/^data:([^;]+)/);e&&e[1].startsWith("image/")&&(n=e[1]);const r=t.replace(/data:image\/[^;]+;base64,/,"");return wO(r,n)}return wO(t,n)}(r,e);let i=t.type||`image/${r}`;"jpg"===r&&(i="image/jpeg");const o=e.startsWith("data:")?e:`data:${i};base64,${e}`,a=Object.assign(Object.assign({},_),{thumbnail:o,size:t.size,date:(new Date).toISOString().split("T")[0],type:i,folderId:_.folderId||"",name:_.name,extension:_.extension||_.name.split(".").pop()||""});await x.current(a),null==n||n()}catch(e){console.error("Ошибка сохранения:",e),E.error("Ошибка при сохранении изображения")}},[_,n]),T=r.useCallback(async()=>{var e;if(!bO.isLoaded()||!_)return void console.error("❌ Pixie instance или file отсутствует");const t=_.name||"edited-image",n=_.extension||f.split("/")[1]||"png";try{let r;r="jpg"===n?"jpeg":["png","jpeg","json","svg"].includes(n)?n:"jpeg",await(null===(e=bO.tools)||void 0===e?void 0:e.export.save(t.replace(/\.[^/.]+$/,""),r,.8))}catch(e){console.error("🎨 Ошибка при сохранении через кнопку:",e);try{const e=bO.canvas,r=e?e.toDataURL(`image/${n}`):null;r&&await k(r,t,n)}catch(e){console.error("🎨 Альтернативный способ тоже не сработал:",e)}}},[_,f,k]),I=r.useCallback(async()=>{if(h&&t&&g&&!w.current)try{w.current=!0;const e=a.current;let t=0;for(;t<20&&(0===e.clientWidth||0===e.clientHeight);)await new Promise(e=>setTimeout(e,50)),t++;const n=(null==c?void 0:c.locale)?null==c?void 0:c.locale.replace("_","-"):"ru-RU",r={selector:"#pixie-editor",image:h,activeLanguage:n,ui:{mode:"inline",forceOverlayModeOnMobile:!1,visible:!0,menubar:{position:yO.TOP}},tools:{filter:{items:["crop","resize","draw","text","shapes","frame","export","import"]}},onSave:async function(e,t,n){try{return await k(e,t,n)}catch(e){throw console.error("🎨 PIXIE onSave ERROR:",e),e}}};try{b(!1),await bO.show(r,a.current);const e=bO.canvas;e&&e.focus(),b(!0)}catch(e){console.error("init pixie failed:",e)}}catch(e){console.error("Ошибка инициализации Pixie:",e),E.error("Ошибка инициализации редактора"),w.current=!1,null==n||n()}},[h,t,g,null==c?void 0:c.locale,k,n]);return r.useEffect(()=>{t&&h&&g&&I()},[t,h,g,null==_?void 0:_.id,I]),r.useEffect(()=>{if(!t){try{bO.close()}catch(e){console.warn("Ошибка при закрытии Pixie:",e)}d(null),p(""),w.current=!1,m(!1),b(!1)}return()=>{try{bO.close()}catch(e){console.warn("Ошибка при закрытии Pixie при размонтировании:",e)}}},[t]),e($,{title:`Редактирование: ${(null==_?void 0:_.name)||"Изображение"}`,open:t,onCancel:n,afterOpenChange:e=>m(e),forceRender:!0,width:"95vw",style:{top:20},styles:{body:{height:"85vh",padding:0}},footer:[e(z,{onClick:n,children:"Отмена"},"cancel"),e(z,{type:"primary",onClick:T,children:"Сохранить"},"save")],maskClosable:!1,destroyOnHidden:!1,afterClose:()=>{u&&u("")},children:e("div",{ref:a,style:{position:"relative",width:"100%",height:"100%"},children:t&&!v?e("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(255,255,255,0.45)",backdropFilter:"blur(1px)",pointerEvents:"all",zIndex:10},children:e("span",{style:{fontSize:14,color:"#555"},children:"Загрузка редактора…"})}):null})})};var CO="container",_O="uploadCard",SO="header",AO="headerButton",kO="fileList",TO="fileItem",IO="fileAvatar",OO="fileInfo",EO="fileName",PO="fileSize",MO="progressBar",FO="errorNote",jO="minimizedContainer",DO="minimizedButton";const{Text:RO}=F,LO=({visible:n,files:r,totalFiles:i,completedFiles:o,onClose:a,onMinimize:s,onInsert:l,minimized:c=!1})=>{if(!n)return null;const{token:u}=k.useToken(),h=t=>{switch(t){case"success":return e(xe,{style:{color:u.colorSuccess}});case"error":return e(we,{style:{color:u.colorError}});default:return e(ye,{style:{color:"#1890ff"}})}},d=e=>{if(e.includes("КБ")||e.includes("MB")||e.includes("KB"))return e;const t=parseInt(e);return isNaN(t)?e:`${(t/1024).toFixed(2)} КБ`},f=t=>"success"===t.status?[e(z,{type:"primary",size:"small",onClick:()=>l(t.id),children:"Insert"},"insert")]:"error"===t.status?[e(RO,{type:"danger",style:{fontSize:"12px"},children:t.error||"Error"},"error")]:[];return e("div",c?{className:jO,children:t(z,{type:"primary",size:"small",onClick:s,className:DO,children:["Загрузка ",o,"/",i]})}:{className:CO,children:t(Y,{className:_O,size:"small",title:t("div",{className:SO,children:[t(RO,{strong:!0,children:["Uploaded ",o,"/",i," files"]}),t(N,{children:[e(z,{type:"text",size:"small",icon:e(ve,{}),onClick:s,className:AO}),e(z,{type:"text",size:"small",icon:e(be,{}),onClick:a,className:AO})]})]}),bodyStyle:{padding:"12px"},children:[e(q,{className:kO,size:"small",dataSource:r,renderItem:n=>e(q.Item,{className:TO,actions:f(n),children:e(q.Item.Meta,{avatar:e(J,{size:"small",icon:h(n.status),className:IO}),title:t("div",{className:OO,children:[e(RO,{ellipsis:!0,className:EO,children:n.name}),e(RO,{type:"secondary",className:PO,children:d(n.size)})]}),description:"uploading"===n.status&&e(Z,{percent:n.progress,size:"small",status:"active",showInfo:!1,className:MO})})})}),r.some(e=>"error"===e.status)&&e("div",{className:FO,children:e(RO,{type:"danger",style:{fontSize:"12px"},children:"Некоторые файлы не удалось загрузить. Проверьте размер и формат файлов."})})]})})},{Header:zO}=Q,{Title:NO}=F,BO=({activeLibraryItem:t})=>{const{t:n}=An(),r={[Xr]:n("My files"),[Kr]:n("GIF"),[qr]:n("Stock images"),[Zr]:n("AI")};return e(zO,{className:"actions-header",children:e("div",{className:"header-title-container",children:e(NO,{level:5,className:"header-title",children:r[t]})})})};
|
|
80
|
+
function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],!(t.indexOf(n)>=0)&&(i[n]=e[n]);return i}(e,eO),h=GI(l,{relative:r}),d=nO(l,{replace:o,state:a,target:s,preventScrollReset:c,relative:r});return lc("a",{...u,href:h,onClick:i?n:function(e){n&&n(e),e.defaultPrevented||d(e)},ref:t,target:s})});function nO(e,t){let{target:n,replace:i,state:o,preventScrollReset:a,relative:s}=void 0===t?{}:t,l=function(){XI()||zI();let{basename:e,navigator:t}=r.useContext(WI),{matches:n}=r.useContext($I),{pathname:i}=KI(),o=JSON.stringify(qI(n).map(e=>e.pathnameBase)),a=r.useRef(!1);return r.useEffect(()=>{a.current=!0}),r.useCallback(function(n,r){if(void 0===r&&(r={}),!a.current)return;if("number"==typeof n)return void t.go(n);let s=BI(n,JSON.parse(o),i,"path"===r.relative);"/"!==e&&(s.pathname="/"===s.pathname?e:VI([e,s.pathname])),(r.replace?t.replace:t.push)(s,r.state,r)},[e,t,o,i])}(),c=KI(),u=ZI(e,{relative:s});return r.useCallback(t=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(t,n)){t.preventDefault();let n=void 0!==i?i:RI(c)===RI(u);l(e,{replace:n,state:o,preventScrollReset:a,relative:s})}},[c,l,u,i,o,n,e,a,s])}const rO=Sc(lc("path",{d:"M11 15h2v2h-2v-2zm0-8h2v6h-2V7zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutlineOutlined"),iO=Sc(lc("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm4.59-12.42L10 14.17l-2.59-2.58L6 13l4 4 8-8z"}),"CheckCircleOutlined");function oO(){const e=Vd(e=>e.toasts);return lc("div",{className:"relative pointer-events-none",children:lc(yb,{initial:!1,children:e.map(e=>lc("div",{"data-toast":!0,className:xc("fixed mx-auto p-20 z-toast","bottom-center"===e.position?"left-0 right-0 bottom-0":"right-0 bottom-0"),children:cc(db.div,{initial:{opacity:0,y:50,scale:.3},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.5,transition:{duration:.2}},className:xc("flex items-center gap-10 min-w-288 max-w-500 shadow-lg w-min rounded-lg pl-16 pr-6 py-6 text-sm pointer-events-auto max-h-100 bg-paper text-main bg-paper border mx-auto"),onPointerEnter:()=>{var t;return null==(t=e.timer)?void 0:t.pause()},onPointerLeave:()=>{var t;return null==(t=e.timer)?void 0:t.resume()},role:"alert","aria-live":"danger"===e.type?"assertive":"polite",children:["danger"===e.type&&lc(rO,{className:"text-danger flex-shrink-0",size:"md"}),"positive"===e.type&&lc(iO,{className:"text-positive flex-shrink-0",size:"md"}),lc("div",{className:"overflow-hidden overflow-ellipsis w-max mr-auto",children:lc(BC,{value:e.message})}),e.action&&lc(fw,{variant:"text",color:"primary",size:"sm",className:"flex-shrink-0",onFocus:()=>{var t;return null==(t=e.timer)?void 0:t.pause()},onBlur:()=>{var t;return null==(t=e.timer)?void 0:t.resume()},onClick:()=>Ud().remove(e.id),elementType:tO,to:e.action.action,children:lc(BC,{value:e.action.label})}),lc(zC,{onFocus:()=>{var t;return null==(t=e.timer)?void 0:t.pause()},onBlur:()=>{var t;return null==(t=e.timer)?void 0:t.resume()},type:"button",className:"flex-shrink-0",onClick:()=>{Ud().remove(e.id)},size:"sm",children:lc(QC,{})})]})},e.id))})})}function aO(e){switch(e.key){case"z":(function(e){return Ub()?e.metaKey:e.ctrlKey})(e)&&(e.preventDefault(),e.stopPropagation(),e.shiftKey?Ed().history.redo():Ed().history.undo());break;case"ArrowUp":e.preventDefault(),e.stopPropagation(),Ed().objects.move("up");break;case"ArrowRight":e.preventDefault(),e.stopPropagation(),Ed().objects.move("right");break;case"ArrowDown":e.preventDefault(),e.stopPropagation(),Ed().objects.move("down");break;case"ArrowLeft":e.preventDefault(),e.stopPropagation(),Ed().objects.move("left");break;case"Delete":e.preventDefault(),e.stopPropagation(),Ed().objects.delete()}}const sO=new Map,lO=new Map,cO={};async function*uO(e){const t=e.createReader();let n;do{n=await new Promise((e,n)=>{t.readEntries(e,n)});for(const e of n)if(e.isFile){if(".DS_Store"===e.name)continue;const t=await hO(e);yield new Vy(t,e.fullPath)}else e.isDirectory&&(yield*uO(e))}while(n.length>0)}function hO(e){return new Promise((t,n)=>e.file(t,n))}function dO(e){return null!=cO.dragTargetId?sO.get(cO.dragTargetId):e.dataTransfer.types.includes("Files")?{type:"nativeFile",el:null,ref:null,getData:()=>async function(e){const t=[];for await(const n of e)t.push(n);return t}(async function*(e){for(const t of e.items)if("file"===t.kind)if("function"==typeof t.webkitGetAsEntry){const e=t.webkitGetAsEntry();if(!e)continue;if(e.isFile){if(".DS_Store"===e.name)continue;yield new Vy(t.getAsFile(),e.fullPath)}else e.isDirectory&&(yield*uO(e))}else{const e=t.getAsFile();if(!e||".DS_Store"===e.name)continue;yield new Vy(e,t.fullPath)}}(e.dataTransfer))}:void 0}function fO({children:e}){const t=Id(e=>e.bootstrapData),n=h(()=>({data:t,setBootstrapData:()=>{},mergeBootstrapData:()=>{},invalidateBootstrapData:()=>{}}),[t]);return lc(_C.Provider,{value:n,children:e})}function pO(){var e,t,n,r;const i=null==(e=Id(e=>{var t;return null==(t=e.config.ui)?void 0:t.visible}))||e,o=null!=(t=Id(e=>{var t,n;return null==(n=null==(t=e.config.ui)?void 0:t.nav)?void 0:n.position}))?t:"bottom",s=null!=(n=Id(e=>{var t,n;return null==(n=null==(t=e.config.ui)?void 0:t.menubar)?void 0:n.position}))?n:"top",l=null==(r=Id(e=>{var t;return null==(t=e.config.ui)?void 0:t.allowEditorClose}))||r,h=u(null),d=u(null),{isModal:f,isMobile:p}=e_(),g=c(async e=>{var t,n,r;if(Od().activeTool||Od().dirty||"nativeFile"!==e.type)return;const i=await e.getData();!Ed().import.fileIsValid(i[0])||(null!=(r=null==(n=null==(t=Od().config.tools)?void 0:t.import)?void 0:n.openDroppedImageAsBackground)&&r?await Ed().import.openBackgroundImage(i[0]):await Ed().import.openUploadedFile(i[0]))},[]),{droppableProps:m}=function({id:e,disabled:t,ref:n,...r}){const i=u({dragOverElements:new Set,dropActivateTimer:void 0}).current,o=u(r);o.current=r,C(()=>(lO.set(e,{...lO.get(e),disabled:t,id:e,ref:n}),()=>{lO.delete(e)}),[e,o,t,n]);const a=e=>{var t;const r=o.current;return!(!(null==e?void 0:e.type)||n.current===(null==(t=e.ref)?void 0:t.current)||!r.types.includes(e.type)||r.acceptsDrop&&!r.acceptsDrop(e))},s=e=>{var t,n;const r=dO(e);r&&(null==(n=(t=o.current).onDragLeave)||n.call(t,r))};return{droppableProps:t?{}:{onDragOver:e=>{e.preventDefault(),e.stopPropagation()},onDragEnter:e=>{var t,n;if(e.stopPropagation(),i.dragOverElements.add(e.target),i.dragOverElements.size>1)return;const r=dO(e);r&&a(r)&&(null==(n=(t=o.current).onDragEnter)||n.call(t,r),clearTimeout(i.dropActivateTimer),"function"==typeof o.current.onDropActivate&&(i.dropActivateTimer=setTimeout(()=>{var e,t;r&&(null==(t=(e=o.current).onDropActivate)||t.call(e,r))},400)))},onDragLeave:e=>{e.stopPropagation(),i.dragOverElements.delete(e.target);for(const t of i.dragOverElements)e.currentTarget.contains(t)||i.dragOverElements.delete(t);if(i.dragOverElements.size>0)return;const t=dO(e);t&&a(t)&&(s(e),clearTimeout(i.dropActivateTimer))},onDrop:async e=>{var t,n,r,l;e.preventDefault(),e.stopPropagation(),i.dragOverElements.clear(),s(e),clearTimeout(i.dropActivateTimer);const c=dO(e);c&&(null==(n=(t=o.current).onDragLeave)||n.call(t,c),a(c)&&(null==(l=(r=o.current).onDrop)||l.call(r,c)))}}}}({id:"pixie-root",ref:d,types:["nativeFile"],onDrop:g});a(()=>{var e,t;Od().fabric||(Id.setState({canvasRef:h}),rw(h.current),null!=(e=Od().config.ui)&&e.defaultTool&&Od().setActiveTool(null==(t=Od().config.ui)?void 0:t.defaultTool,null),Ed().canvas.loadInitialContent().then(()=>{var e,t;null==(t=(e=Od().config).onLoad)||t.call(e,Od().editor)}));const n=iw(d,()=>{Od().setStageSize(ow(d.current))}),r=iw(h,()=>{Od().setCanvasSize(ow(h.current))});return()=>{n(),r()}},[d]);const v=xc("pixie-root flex flex-col overflow-hidden bg-background text-main no-tap-highlight w-full h-full",{relative:!f,"fixed inset-0 w-full h-full z-20":f,"shadow-lg border rounded-md m-auto max-h-[calc(100vh-90px)] max-w-[calc(100vw-90px)]":f&&!p});return lc(wb,{features:Cb,strict:!0,children:cc(fO,{children:[f&&i&&!p&&l&&lc(zC,{className:"z-20 fixed right-2 top-2 text-white",size:"lg",onClick:()=>{Od().editor.close()},children:lc(QC,{})}),f&&i&&lc(wC,{position:"fixed",disableInitialTransition:!0}),cc(db.div,{initial:!1,variants:{visible:{opacity:1,scale:1,display:"flex"},hidden:{opacity:0,transitionEnd:{display:"none"}}},animate:i?"visible":"hidden",className:v,children:["top"===s&&lc(s_,{}),"top"===o&&lc(pI,{className:"pt-14"}),cc("main",{className:"relative flex-auto my-20 overflow-hidden outline-none",tabIndex:-1,...Mb(m,{onKeyDownCapture:aO}),ref:d,children:[lc(c_,{}),lc(BS,{ref:h})]}),lc(sT,{}),"bottom"===o&&lc(pI,{}),"bottom"===s&&lc(s_,{}),lc(MI,{}),lc(oO,{})]})]})})}Mo.enableBoundaryChecking(!1);const gO=class{constructor(e){if(uo(this,"tools",{}),uo(this,"fabric",null),e.sentryDsn&&function(e){e._metadata=e._metadata||{},e._metadata.sdk=e._metadata.sdk||{name:"sentry.javascript.react",packages:[{name:"npm:@sentry/react",version:Vs}],version:Vs},ql(e)}({dsn:e.sentryDsn}),function(e,t){void 0===t&&(t={});var n=t.insertAt;if(!(typeof document>"u")){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}('/*! tailwindcss v3.1.8 | MIT License | https://tailwindcss.com*/.pi *,.pi :after,.pi :before{border-color:rgb(var(--be-foreground-base)/var(--be-divider-opacity));border-style:solid;border-width:0;box-sizing:border-box}.pi :after,.pi :before{--tw-content:""}.pi hr{border-top-width:1px;color:inherit;height:0}.pi abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.pi h1,.pi h2,.pi h3,.pi h4,.pi h5,.pi h6{font-size:inherit;font-weight:inherit}.pi a{color:inherit;text-decoration:inherit}.pi b,.pi strong{font-weight:bolder}.pi code,.pi kbd,.pi pre,.pi samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}.pi small{font-size:80%}.pi sub,.pi sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}.pi sub{bottom:-.25em}.pi sup{top:-.5em}.pi table{border-collapse:collapse;border-color:inherit;text-indent:0}.pi button,.pi input,.pi optgroup,.pi select,.pi textarea{color:inherit;font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;margin:0;padding:0}.pi button,.pi select{text-transform:none}.pi [type=button],.pi [type=reset],.pi [type=submit],.pi button{-webkit-appearance:button;background-color:transparent;background-image:none}.pi :-moz-focusring{outline:auto}.pi :-moz-ui-invalid{box-shadow:none}.pi progress{vertical-align:baseline}.pi ::-webkit-inner-spin-button,.pi ::-webkit-outer-spin-button{height:auto}.pi [type=search]{-webkit-appearance:textfield;outline-offset:-2px}.pi ::-webkit-search-decoration{-webkit-appearance:none}.pi ::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}.pi summary{display:list-item}.pi blockquote,.pi dd,.pi dl,.pi figure,.pi h1,.pi h2,.pi h3,.pi h4,.pi h5,.pi h6,.pi hr,.pi p,.pi pre{margin:0}.pi fieldset{margin:0;padding:0}.pi legend{padding:0}.pi menu,.pi ol,.pi ul{list-style:none;margin:0;padding:0}.pi textarea{resize:vertical}.pi input::-moz-placeholder,.pi textarea::-moz-placeholder{color:#9ca3af;opacity:1}.pi input::placeholder,.pi textarea::placeholder{color:#9ca3af;opacity:1}.pi [role=button],.pi button{cursor:pointer}.pi :disabled{cursor:default}.pi audio,.pi canvas,.pi embed,.pi iframe,.pi img,.pi object,.pi svg,.pi video{display:block;vertical-align:middle}.pi img,.pi video{height:auto;max-width:100%}.pi *,.pi :after,.pi :before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(147,197,253,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.pi ::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(147,197,253,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.pi .container{width:100%}.pi .\\!container{width:100%!important}@media (min-width:640px){.pi .container{max-width:640px}.pi .\\!container{max-width:640px!important}}@media (min-width:768px){.pi .container{max-width:768px}.pi .\\!container{max-width:768px!important}}@media (min-width:1024px){.pi .container{max-width:1024px}.pi .\\!container{max-width:1024px!important}}@media (min-width:1280px){.pi .container{max-width:1280px}.pi .\\!container{max-width:1280px!important}}@media (min-width:1536px){.pi .container{max-width:1536px}.pi .\\!container{max-width:1536px!important}}.pi .sr-only{clip:rect(0,0,0,0);border-width:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.pi .pointer-events-none{pointer-events:none}.pi .pointer-events-auto{pointer-events:auto}.pi .visible{visibility:visible}.pi .\\!visible{visibility:visible!important}.pi .invisible{visibility:hidden}.pi .static{position:static}.pi .fixed{position:fixed}.pi .absolute{position:absolute}.pi .relative{position:relative}.pi .sticky{position:sticky}.pi .inset-0{bottom:0;top:0}.pi .inset-0,.pi .inset-x-0{left:0;right:0}.pi .right-2{right:2px}.pi .top-2{top:2px}.pi .top-0{top:0}.pi .left-0{left:0}.pi .left-16{left:16px}.pi .top-26{top:26px}.pi .-left-5{left:-5px}.pi .-top-5{top:-5px}.pi .bottom-0{bottom:0}.pi .-bottom-5{bottom:-5px}.pi .right-0{right:0}.pi .-right-5{right:-5px}.pi .bottom-20{bottom:20px}.pi .right-20{right:20px}.pi .top-24{top:24px}.pi .-bottom-14{bottom:-14px}.pi .left-30{left:30px}.pi .right-4{right:4px}.pi .top-1\\/2{top:50%}.pi .-bottom-20{bottom:-20px}.pi .left-1\\/2{left:50%}.pi .-bottom-10{bottom:-10px}.pi .-left-8{left:-8px}.pi .-left-80{left:-80px}.pi .-bottom-2{bottom:-2px}.pi .-right-2{right:-2px}.pi .isolate{isolation:isolate}.pi .z-20{z-index:20}.pi .z-modal{z-index:110}.pi .z-10{z-index:10}.pi .z-obj-box{z-index:20}.pi .z-navbar{z-index:40}.pi .z-tool-overlay{z-index:30}.pi .z-50,.pi .z-loading-indicator{z-index:50}.pi .z-popover{z-index:130}.pi .z-tray{z-index:120}.pi .z-toast{z-index:160}.pi .z-tooltip{z-index:150}.pi .z-cropzone{z-index:10}.pi .col-auto{grid-column:auto}.pi .m-auto{margin:auto}.pi .m-10{margin:10px}.pi .my-20{margin-bottom:20px;margin-top:20px}.pi .my-12{margin-bottom:12px;margin-top:12px}.pi .mx-auto{margin-left:auto;margin-right:auto}.pi .my-50{margin-bottom:50px;margin-top:50px}.pi .mx-14{margin-left:14px;margin-right:14px}.pi .my-30{margin-bottom:30px;margin-top:30px}.pi .my-24{margin-bottom:24px;margin-top:24px}.pi .my-80{margin-bottom:80px;margin-top:80px}.pi .my-32{margin-bottom:32px;margin-top:32px}.pi .my-40{margin-bottom:40px;margin-top:40px}.pi .my-8{margin-bottom:8px;margin-top:8px}.pi .my-10{margin-bottom:10px;margin-top:10px}.pi .my-100{margin-bottom:6.25rem;margin-top:6.25rem}.pi .mx-4{margin-left:4px;margin-right:4px}.pi .my-4{margin-bottom:4px;margin-top:4px}.pi .mx-8{margin-left:8px;margin-right:8px}.pi .mx-20{margin-left:20px;margin-right:20px}.pi .my-auto{margin-bottom:auto;margin-top:auto}.pi .mr-5{margin-right:5px}.pi .ml-auto{margin-left:auto}.pi .mr-20{margin-right:20px}.pi .mb-16{margin-bottom:16px}.pi .mr-10{margin-right:10px}.pi .mt-auto{margin-top:auto}.pi .mt-80{margin-top:80px}.pi .mt-30{margin-top:30px}.pi .mt-4{margin-top:4px}.pi .mb-30{margin-bottom:30px}.pi .mb-20{margin-bottom:20px}.pi .mr-auto{margin-right:auto}.pi .mr-24{margin-right:24px}.pi .mb-24{margin-bottom:24px}.pi .mb-14{margin-bottom:14px}.pi .mt-6{margin-top:6px}.pi .mt-12{margin-top:12px}.pi .mb-4{margin-bottom:4px}.pi .mt-14{margin-top:14px}.pi .ml-6{margin-left:6px}.pi .mr-14{margin-right:14px}.pi .mt-8{margin-top:8px}.pi .mb-10{margin-bottom:10px}.pi .mb-8{margin-bottom:8px}.pi .mt-20{margin-top:20px}.pi .mb-1{margin-bottom:1px}.pi .ml-10{margin-left:10px}.pi .mt-10{margin-top:10px}.pi .mt-2{margin-top:2px}.pi .mb-12{margin-bottom:12px}.pi .mb-40{margin-bottom:40px}.pi .mt-40{margin-top:40px}.pi .mb-32{margin-bottom:32px}.pi .mb-64{margin-bottom:64px}.pi .mt-32{margin-top:32px}.pi .mb-48{margin-bottom:48px}.pi .mt-50{margin-top:50px}.pi .mb-6{margin-bottom:6px}.pi .mt-60{margin-top:60px}.pi .-ml-1{margin-left:-1px}.pi .-ml-4{margin-left:-4px}.pi .mr-8{margin-right:8px}.pi .-mr-4{margin-right:-4px}.pi .ml-8{margin-left:8px}.pi .mt-16{margin-top:16px}.pi .mb-2{margin-bottom:2px}.pi .mt-24{margin-top:24px}.pi .-mt-2{margin-top:-2px}.pi .mt-36{margin-top:36px}.pi .mb-110{margin-bottom:110px}.pi .mt-18{margin-top:18px}.pi .mr-6{margin-right:6px}.pi .mr-16{margin-right:16px}.pi .ml-12{margin-left:12px}.pi .mr-4{margin-right:4px}.pi .mr-12{margin-right:12px}.pi .mr-2{margin-right:2px}.pi .mb-18{margin-bottom:18px}.pi .-ml-3{margin-left:-3px}.pi .-ml-12{margin-left:-12px}.pi .-ml-6{margin-left:-6px}.pi .box-content{box-sizing:content-box}.pi .block{display:block}.pi .inline-block{display:inline-block}.pi .inline{display:inline}.pi .flex{display:flex}.pi .inline-flex{display:inline-flex}.pi .table{display:table}.pi .table-cell{display:table-cell}.pi .table-row{display:table-row}.pi .grid{display:grid}.pi .\\!grid{display:grid!important}.pi .contents{display:contents}.pi .hidden{display:none}.pi .aspect-square{aspect-ratio:1/1}.pi .h-2\\/4{height:50%}.pi .h-full{height:100%}.pi .h-font{height:1em}.pi .h-1{height:1px}.pi .h-80{height:80px}.pi .h-400{height:25rem}.pi .h-50{height:50px}.pi .h-42{height:42px}.pi .h-54{height:3.375rem}.pi .h-8{height:8px}.pi .h-24{height:24px}.pi .h-36{height:36px}.pi .h-40{height:40px}.pi .h-20{height:20px}.pi .h-30{height:30px}.pi .h-84{height:84px}.pi .h-68{height:68px}.pi .h-32{height:32px}.pi .h-\\[54px\\]{height:54px}.pi .h-\\[186px\\]{height:186px}.pi .h-60{height:60px}.pi .h-18{height:18px}.pi .h-12{height:12px}.pi .h-26{height:26px}.pi .h-90{height:5.625rem}.pi .h-128{height:128px}.pi .h-6{height:6px}.pi .h-4{height:4px}.pi .h-48{height:48px}.pi .h-2{height:2px}.pi .h-16{height:16px}.pi .h-56{height:56px}.pi .h-64{height:64px}.pi .h-144{height:144px}.pi .h-100{height:6.25rem}.pi .h-max{height:-moz-max-content;height:max-content}.pi .h-px{height:1px}.pi .h-28{height:28px}.pi .h-92{height:92px}.pi .h-14{height:14px}.pi .h-38{height:2.375rem}.pi .h-22{height:22px}.pi .max-h-\\[calc\\(100vh-90px\\)\\]{max-height:calc(100vh - 90px)}.pi .max-h-\\[calc\\(100\\%-40px\\)\\]{max-height:calc(100% - 40px)}.pi .max-h-620{max-height:38.75rem}.pi .max-h-100{max-height:6.25rem}.pi .max-h-\\[36px\\]{max-height:36px}.pi .max-h-8{max-height:8px}.pi .max-h-tray{max-height:calc(var(--be-viewport-height, 100vh)*.9)}.pi .max-h-\\[calc\\(100\\%-30px\\)\\]{max-height:calc(100% - 30px)}.pi .max-h-40{max-height:40px}.pi .max-h-inherit{max-height:inherit}.pi .max-h-\\[583px\\]{max-height:583px}.pi .max-h-full{max-height:100%}.pi .max-h-26{max-height:26px}.pi .max-h-36{max-height:36px}.pi .max-h-dialog{max-height:calc(var(--be-viewport-height, 100vh)*.9)}.pi .max-h-240{max-height:240px}.pi .min-h-440{min-height:27.5rem}.pi .min-h-full{min-height:100%}.pi .min-h-\\[238px\\]{min-height:238px}.pi .min-h-86{min-height:86px}.pi .min-h-90{min-height:5.625rem}.pi .min-h-36{min-height:36px}.pi .min-h-42{min-height:42px}.pi .min-h-dialog{min-height:calc(var(--be-viewport-height, 100vh)*.9)}.pi .min-h-50{min-height:50px}.pi .min-h-\\[228px\\]{min-height:228px}.pi .min-h-30{min-height:30px}.pi .min-h-60{min-height:60px}.pi .w-max{width:-moz-max-content;width:max-content}.pi .w-full{width:100%}.pi .w-font{width:1em}.pi .w-80{width:80px}.pi .w-50{width:50px}.pi .w-8{width:8px}.pi .w-24{width:24px}.pi .w-36{width:36px}.pi .w-20{width:20px}.pi .w-30{width:30px}.pi .w-224{width:224px}.pi .w-68{width:68px}.pi .w-96{width:96px}.pi .w-144{width:144px}.pi .w-auto{width:auto}.pi .w-1{width:1px}.pi .w-240{width:240px}.pi .w-\\[168px\\]{width:168px}.pi .w-1\\/2{width:50%}.pi .w-384{width:384px}.pi .w-min{width:-moz-min-content;width:min-content}.pi .w-256{width:256px}.pi .w-18{width:18px}.pi .w-12{width:12px}.pi .w-42{width:42px}.pi .w-60{width:60px}.pi .\\!w-auto{width:auto!important}.pi .w-26{width:26px}.pi .w-32{width:32px}.pi .w-850{width:53.125rem}.pi .w-288{width:288px}.pi .w-320{width:320px}.pi .w-440{width:27.5rem}.pi .w-40{width:40px}.pi .w-64{width:64px}.pi .w-1\\/3{width:33.333333%}.pi .w-16{width:16px}.pi .w-56{width:56px}.pi .w-2{width:2px}.pi .w-110{width:110px}.pi .w-\\[4ch\\]{width:4ch}.pi .w-\\[233px\\]{width:233px}.pi .w-46{width:2.875rem}.pi .w-38{width:2.375rem}.pi .w-\\[210px\\]{width:210px}.pi .w-100{width:6.25rem}.pi .w-620{width:38.75rem}.pi .w-780{width:48.75rem}.pi .w-\\[calc\\(100\\%-40px\\)\\]{width:calc(100% - 40px)}.pi .w-px{width:1px}.pi .w-28{width:28px}.pi .w-90{width:5.625rem}.pi .w-14{width:14px}.pi .w-22{width:22px}.pi .w-280{width:17.5rem}.pi .min-w-0{min-width:0}.pi .min-w-320{min-width:320px}.pi .min-w-80{min-width:80px}.pi .min-w-224{min-width:224px}.pi .min-w-288{min-width:288px}.pi .min-w-240{min-width:240px}.pi .min-w-42{min-width:42px}.pi .min-w-90{min-width:5.625rem}.pi .min-w-180{min-width:11.25rem}.pi .min-w-128{min-width:128px}.pi .min-w-4{min-width:4px}.pi .min-w-192{min-width:192px}.pi .max-w-\\[calc\\(100vw-90px\\)\\]{max-width:calc(100vw - 90px)}.pi .max-w-max{max-width:-moz-max-content;max-width:max-content}.pi .max-w-280{max-width:17.5rem}.pi .max-w-620{max-width:38.75rem}.pi .max-w-440{max-width:27.5rem}.pi .max-w-\\[calc\\(100\\%-40px\\)\\]{max-width:calc(100% - 40px)}.pi .max-w-\\[90\\%\\]{max-width:90%}.pi .max-w-full{max-width:100%}.pi .max-w-500{max-width:31.25rem}.pi .max-w-\\[464px\\]{max-width:464px}.pi .max-w-180{max-width:11.25rem}.pi .max-w-400{max-width:25rem}.pi .max-w-780{max-width:48.75rem}.pi .max-w-375{max-width:375px}.pi .max-w-240{max-width:240px}.pi .max-w-320{max-width:320px}.pi .max-w-288{max-width:288px}.pi .max-w-112{max-width:112px}.pi .max-w-80{max-width:80px}.pi .max-w-850{max-width:53.125rem}.pi .max-w-580{max-width:36.25rem}.pi .max-w-dialog{max-width:calc(var(--be-viewport-width, 100vw)*.9)}.pi .max-w-950{max-width:59.375rem}.pi .flex-auto{flex:1 1 auto}.pi .flex-shrink-0,.pi .shrink-0{flex-shrink:0}.pi .flex-grow-0{flex-grow:0}.pi .origin-\\[100\\%\\]{transform-origin:100%}.pi .-translate-y-1\\/2{--tw-translate-y:-50%}.pi .-translate-x-1\\/2,.pi .-translate-y-1\\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.pi .-translate-x-1\\/2{--tw-translate-x:-50%}.pi .rotate-180{--tw-rotate:180deg}.pi .rotate-0,.pi .rotate-180{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.pi .rotate-0{--tw-rotate:0deg}.pi .rotate-45{--tw-rotate:45deg}.pi .rotate-45,.pi .rotate-90{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.pi .rotate-90{--tw-rotate:90deg}.pi .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.pi .cursor-pointer{cursor:pointer}.pi .cursor-nwse-resize{cursor:nwse-resize}.pi .cursor-nesw-resize{cursor:nesw-resize}.pi .cursor-se-resize{cursor:se-resize}.pi .cursor-sw-resize{cursor:sw-resize}.pi .cursor-zoom-in{cursor:zoom-in}.pi .cursor-default{cursor:default}.pi .cursor-move{cursor:move}.pi .cursor-not-allowed{cursor:not-allowed}.pi .touch-none{touch-action:none}.pi .select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.pi .resize-none{resize:none}.pi .resize{resize:both}.pi .appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.pi .break-inside-avoid{-moz-column-break-inside:avoid;break-inside:avoid}.pi .grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.pi .grid-cols-5-min-content{grid-template-columns:repeat(5,min-content)}.pi .flex-row{flex-direction:row}.pi .flex-col{flex-direction:column}.pi .flex-col-reverse{flex-direction:column-reverse}.pi .flex-wrap{flex-wrap:wrap}.pi .flex-nowrap{flex-wrap:nowrap}.pi .items-start{align-items:flex-start}.pi .items-center{align-items:center}.pi .items-stretch{align-items:stretch}.pi .justify-start{justify-content:flex-start}.pi .justify-end{justify-content:flex-end}.pi .justify-center{justify-content:center}.pi .justify-between{justify-content:space-between}.pi .gap-16{gap:16px}.pi .gap-20{gap:20px}.pi .gap-8{gap:8px}.pi .gap-14{gap:14px}.pi .gap-24{gap:24px}.pi .gap-6{gap:6px}.pi .gap-30{gap:30px}.pi .gap-10{gap:10px}.pi .gap-12{gap:12px}.pi .gap-4{gap:4px}.pi .gap-18{gap:18px}.pi .gap-32{gap:32px}.pi .gap-40{gap:40px}.pi .gap-64{gap:64px}.pi .gap-36{gap:36px}.pi .gap-x-10{-moz-column-gap:10px;column-gap:10px}.pi .space-y-10>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(10px*var(--tw-space-y-reverse));margin-top:calc(10px*(1 - var(--tw-space-y-reverse)))}.pi .self-stretch{align-self:stretch}.pi .overflow-auto{overflow:auto}.pi .overflow-hidden{overflow:hidden}.pi .overflow-visible{overflow:visible}.pi .overflow-scroll{overflow:scroll}.pi .overflow-x-auto{overflow-x:auto}.pi .overflow-y-auto{overflow-y:auto}.pi .overflow-x-hidden{overflow-x:hidden}.pi .overflow-y-hidden{overflow-y:hidden}.pi .truncate{overflow:hidden;white-space:nowrap}.pi .overflow-ellipsis,.pi .text-ellipsis,.pi .truncate{text-overflow:ellipsis}.pi .whitespace-normal{white-space:normal}.pi .whitespace-nowrap{white-space:nowrap}.pi .whitespace-pre-wrap{white-space:pre-wrap}.pi .break-words{overflow-wrap:break-word}.pi .rounded{border-radius:4px}.pi .rounded-md{border-radius:6px}.pi .rounded-full{border-radius:9999px}.pi .rounded-lg{border-radius:8px}.pi .rounded-none{border-radius:0}.pi .rounded-2xl{border-radius:16px}.pi .rounded-sm{border-radius:2px}.pi .rounded-\\[16px\\]{border-radius:16px}.pi .rounded-\\[64px\\]{border-radius:64px}.pi .rounded-\\[32px\\]{border-radius:32px}.pi .rounded-3xl{border-radius:24px}.pi .rounded-xl{border-radius:12px}.pi .rounded-t{border-top-left-radius:4px;border-top-right-radius:4px}.pi .rounded-l{border-bottom-left-radius:4px;border-top-left-radius:4px}.pi .rounded-r-md{border-bottom-right-radius:6px;border-top-right-radius:6px}.pi .rounded-l-md{border-bottom-left-radius:6px;border-top-left-radius:6px}.pi .rounded-r{border-bottom-right-radius:4px;border-top-right-radius:4px}.pi .rounded-l-none{border-bottom-left-radius:0;border-top-left-radius:0}.pi .rounded-r-none{border-bottom-right-radius:0;border-top-right-radius:0}.pi .rounded-l-full{border-bottom-left-radius:9999px;border-top-left-radius:9999px}.pi .rounded-r-full{border-bottom-right-radius:9999px;border-top-right-radius:9999px}.pi .rounded-tr-none{border-top-right-radius:0}.pi .rounded-br-none{border-bottom-right-radius:0}.pi .rounded-tl-none{border-top-left-radius:0}.pi .rounded-bl-none{border-bottom-left-radius:0}.pi .border{border-width:1px}.pi .border-2{border-width:2px}.pi .border-4{border-width:4px}.pi .border-\\[3px\\]{border-width:3px}.pi .border-y{border-bottom-width:1px;border-top-width:1px}.pi .border-r{border-right-width:1px}.pi .border-l-4{border-left-width:4px}.pi .border-b{border-bottom-width:1px}.pi .border-t-4{border-top-width:4px}.pi .border-r-4{border-right-width:4px}.pi .border-b-4{border-bottom-width:4px}.pi .border-t{border-top-width:1px}.pi .border-l{border-left-width:1px}.pi .border-dotted{border-style:dotted}.pi .border-none{border-style:none}.pi .border-divider{border-color:rgb(var(--be-foreground-base)/var(--be-divider-opacity))}.pi .border-white{--tw-border-opacity:1;border-color:rgb(255 255 255/var(--tw-border-opacity))}.pi .border-primary\\/50{border-color:rgb(var(--be-primary)/.5)}.pi .border-danger\\/50{border-color:#ef444480}.pi .border-transparent{border-color:transparent}.pi .border-primary{--tw-border-opacity:1;border-color:rgb(var(--be-primary)/var(--tw-border-opacity))}.pi .border-danger{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity))}.pi .border-chip{--tw-border-opacity:1;border-color:rgb(var(--be-background-chip)/var(--tw-border-opacity))}.pi .border-paper{--tw-border-opacity:1;border-color:rgb(var(--be-paper)/var(--tw-border-opacity))}.pi .border-background{--tw-border-opacity:1;border-color:rgb(var(--be-background)/var(--tw-border-opacity))}.pi .border-text-muted{border-color:rgb(var(--be-foreground-base)/var(--be-text-muted-opacity))}.pi .border-white\\/50{border-color:#ffffff80}.pi .border-l-primary{--tw-border-opacity:1;border-left-color:rgb(var(--be-primary)/var(--tw-border-opacity))}.pi .border-l-transparent{border-left-color:transparent}.pi .border-l-positive{--tw-border-opacity:1;border-left-color:rgb(34 197 94/var(--tw-border-opacity))}.pi .border-l-warning{--tw-border-opacity:1;border-left-color:rgb(243 164 50/var(--tw-border-opacity))}.pi .border-l-danger{--tw-border-opacity:1;border-left-color:rgb(239 68 68/var(--tw-border-opacity))}.pi .border-r-transparent{border-right-color:transparent}.pi .border-r-primary-light{--tw-border-opacity:1;border-right-color:rgb(var(--be-primary-light)/var(--tw-border-opacity))}.pi .border-b-primary{--tw-border-opacity:1;border-bottom-color:rgb(var(--be-primary)/var(--tw-border-opacity))}.pi .bg-background{--tw-bg-opacity:1;background-color:rgb(var(--be-background)/var(--tw-bg-opacity))}.pi .bg-divider{background-color:rgb(var(--be-foreground-base)/var(--be-divider-opacity))}.pi .bg-paper{--tw-bg-opacity:1;background-color:rgb(var(--be-paper)/var(--tw-bg-opacity))}.pi .bg{--tw-bg-opacity:1;background-color:rgb(var(--be-background)/var(--tw-bg-opacity))}.pi .bg-alt{--tw-bg-opacity:1;background-color:rgb(var(--be-background-alt)/var(--tw-bg-opacity))}.pi .bg-primary\\/hover{background-color:rgb(var(--be-primary)/var(--be-hover-opacity))}.pi .bg-primary{--tw-bg-opacity:1;background-color:rgb(var(--be-primary)/var(--tw-bg-opacity))}.pi .bg-positive\\/focus{background-color:rgb(34 197 94/var(--be-focus-opacity))}.pi .bg-warning\\/focus{background-color:rgb(243 164 50/var(--be-focus-opacity))}.pi .bg-danger\\/focus{background-color:rgb(239 68 68/var(--be-focus-opacity))}.pi .bg-primary\\/focus{background-color:rgb(var(--be-primary)/var(--be-focus-opacity))}.pi .bg-primary\\/5{background-color:rgb(var(--be-primary)/.05)}.pi .bg-controls{--tw-bg-opacity:1;background-color:rgb(50 50 50/var(--tw-bg-opacity))}.pi .bg-chip{--tw-bg-opacity:1;background-color:rgb(var(--be-background-chip)/var(--tw-bg-opacity))}.pi .bg-primary-light\\/20{background-color:rgb(var(--be-primary-light)/.2)}.pi .bg-primary\\/selected{background-color:rgb(var(--be-primary)/var(--be-selected-opacity))}.pi .bg-warning{--tw-bg-opacity:1;background-color:rgb(243 164 50/var(--tw-bg-opacity))}.pi .bg-transparent{background-color:transparent}.pi .bg-danger{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity))}.pi .bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.pi .bg-toast{--tw-bg-opacity:1;background-color:rgb(50 50 50/var(--tw-bg-opacity))}.pi .bg-focus{background-color:rgb(var(--be-foreground-base)/var(--be-focus-opacity))}.pi .bg-black\\/30{background-color:#0000004d}.pi .bg-primary-light{--tw-bg-opacity:1;background-color:rgb(var(--be-primary-light)/var(--tw-bg-opacity))}.pi .bg-fg-base\\/4{background-color:rgb(var(--be-foreground-base)/4%)}.pi .bg-positive{--tw-bg-opacity:1;background-color:rgb(34 197 94/var(--tw-bg-opacity))}.pi .bg-inherit{background-color:inherit}.pi .bg-background\\/70{background-color:rgb(var(--be-background)/.7)}.pi .bg-envato{--tw-bg-opacity:1;background-color:rgb(108 161 43/var(--tw-bg-opacity))}.pi .bg-disabled{background-color:rgb(var(--be-foreground-base)/var(--be-disabled-bg-opacity))}.pi .bg-disabled-fg{background-color:rgb(var(--be-foreground-base)/var(--be-disabled-fg-opacity))}.pi .bg-slider-disabled{--tw-bg-opacity:1;background-color:rgb(189 189 189/var(--tw-bg-opacity))}.pi .bg-primary-dark{--tw-bg-opacity:1;background-color:rgb(var(--be-primary-dark)/var(--tw-bg-opacity))}.pi .bg-white\\/50{background-color:#ffffff80}.pi .bg-black\\/50{background-color:#00000080}.pi .bg-primary-light\\/40{background-color:rgb(var(--be-primary-light)/.4)}.pi .bg-positive-lighter{--tw-bg-opacity:1;background-color:rgb(187 247 208/var(--tw-bg-opacity))}.pi .bg-danger-lighter{--tw-bg-opacity:1;background-color:rgb(254 202 202/var(--tw-bg-opacity))}.pi .bg-opacity-95{--tw-bg-opacity:.95}.pi .bg-no-repeat{background-repeat:no-repeat}.pi .fill-current{fill:currentColor}.pi .fill-transparent{fill:transparent}.pi .stroke-current{stroke:currentColor}.pi .object-contain{-o-object-fit:contain;object-fit:contain}.pi .object-cover{-o-object-fit:cover;object-fit:cover}.pi .p-0{padding:0}.pi .p-14{padding:14px}.pi .p-16{padding:16px}.pi .p-24{padding:24px}.pi .p-10{padding:10px}.pi .p-8{padding:8px}.pi .p-6{padding:6px}.pi .p-12{padding:12px}.pi .p-20{padding:20px}.pi .p-4{padding:4px}.pi .p-18{padding:18px}.pi .p-40{padding:40px}.pi .p-2{padding:2px}.pi .px-24{padding-left:24px;padding-right:24px}.pi .py-20{padding-bottom:20px;padding-top:20px}.pi .px-6{padding-left:6px;padding-right:6px}.pi .px-8{padding-left:8px;padding-right:8px}.pi .py-12{padding-bottom:12px;padding-top:12px}.pi .px-16{padding-left:16px;padding-right:16px}.pi .py-14{padding-bottom:14px;padding-top:14px}.pi .px-14{padding-left:14px;padding-right:14px}.pi .px-20{padding-left:20px;padding-right:20px}.pi .px-32{padding-left:32px;padding-right:32px}.pi .py-10{padding-bottom:10px;padding-top:10px}.pi .px-4{padding-left:4px;padding-right:4px}.pi .px-10{padding-left:10px;padding-right:10px}.pi .py-2{padding-bottom:2px;padding-top:2px}.pi .px-5vw{padding-left:5vw;padding-right:5vw}.pi .px-12{padding-left:12px;padding-right:12px}.pi .py-\\[9px\\]{padding-bottom:9px;padding-top:9px}.pi .px-40{padding-left:40px;padding-right:40px}.pi .py-32{padding-bottom:32px;padding-top:32px}.pi .px-28{padding-left:28px;padding-right:28px}.pi .py-56{padding-bottom:56px;padding-top:56px}.pi .py-28{padding-bottom:28px;padding-top:28px}.pi .py-90{padding-bottom:5.625rem;padding-top:5.625rem}.pi .py-4{padding-bottom:4px;padding-top:4px}.pi .px-18{padding-left:18px;padding-right:18px}.pi .px-22{padding-left:22px;padding-right:22px}.pi .px-26{padding-left:26px;padding-right:26px}.pi .py-8{padding-bottom:8px;padding-top:8px}.pi .py-96{padding-bottom:96px;padding-top:96px}.pi .py-6{padding-bottom:6px;padding-top:6px}.pi .py-3{padding-bottom:3px;padding-top:3px}.pi .py-5{padding-bottom:5px;padding-top:5px}.pi .py-40{padding-bottom:40px;padding-top:40px}.pi .pt-14{padding-top:14px}.pi .pt-24{padding-top:24px}.pi .pb-12{padding-bottom:12px}.pi .pt-26{padding-top:26px}.pi .pb-16{padding-bottom:16px}.pi .pb-24{padding-bottom:24px}.pi .pt-50{padding-top:50px}.pi .pt-20{padding-top:20px}.pi .pb-10{padding-bottom:10px}.pi .pb-4{padding-bottom:4px}.pi .pr-10{padding-right:10px}.pi .pl-10{padding-left:10px}.pi .pb-20{padding-bottom:20px}.pi .pb-30{padding-bottom:30px}.pi .pt-30{padding-top:30px}.pi .pl-8{padding-left:8px}.pi .pb-14{padding-bottom:14px}.pi .pl-14{padding-left:14px}.pi .pt-54{padding-top:3.375rem}.pi .pb-28{padding-bottom:28px}.pi .pb-48{padding-bottom:48px}.pi .pb-safe-area{padding-bottom:env(safe-area-inset-bottom)}.pi .pl-24{padding-left:24px}.pi .pr-16{padding-right:16px}.pi .pr-24{padding-right:24px}.pi .pl-16{padding-left:16px}.pi .pr-6{padding-right:6px}.pi .pb-18{padding-bottom:18px}.pi .pt-6{padding-top:6px}.pi .pt-16{padding-top:16px}.pi .pt-10{padding-top:10px}.pi .pl-12{padding-left:12px}.pi .pr-12{padding-right:12px}.pi .pb-6{padding-bottom:6px}.pi .pt-42{padding-top:42px}.pi .pb-32{padding-bottom:32px}.pi .pt-70{padding-top:70px}.pi .pt-40{padding-top:40px}.pi .pr-8{padding-right:8px}.pi .pl-46{padding-left:2.875rem}.pi .pr-46{padding-right:2.875rem}.pi .pl-6{padding-left:6px}.pi .pl-18{padding-left:18px}.pi .pr-18{padding-right:18px}.pi .text-left{text-align:left}.pi .text-center{text-align:center}.pi .text-right{text-align:right}.pi .align-top{vertical-align:top}.pi .align-middle{vertical-align:middle}.pi .text-sm{font-size:14px;line-height:20px}.pi .text-xs{font-size:12px;line-height:16px}.pi .text-xl{font-size:20px;line-height:28px}.pi .text-6xl{font-size:60px;line-height:1}.pi .text-2xl{font-size:24px;line-height:32px}.pi .text-3xl{font-size:30px;line-height:36px}.pi .text-base{font-size:16px;line-height:24px}.pi .text-lg{font-size:18px;line-height:28px}.pi .text-4xl{font-size:36px;line-height:40px}.pi .font-medium{font-weight:500}.pi .font-semibold{font-weight:600}.pi .font-light{font-weight:300}.pi .font-bold{font-weight:700}.pi .font-normal{font-weight:400}.pi .uppercase{text-transform:uppercase}.pi .capitalize{text-transform:capitalize}.pi .italic{font-style:italic}.pi .tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.pi .leading-none{line-height:1}.pi .leading-5{line-height:1.25rem}.pi .tracking-wide{letter-spacing:.025em}.pi .text,.pi .text-main{color:rgb(var(--be-foreground-base)/var(--be-text-main-opacity))}.pi .text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.pi .text-muted{color:rgb(var(--be-foreground-base)/var(--be-text-muted-opacity))}.pi .text-positive{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity))}.pi .text-danger{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity))}.pi .text-primary{--tw-text-opacity:1;color:rgb(var(--be-primary)/var(--tw-text-opacity))}.pi .\\!text{color:rgb(var(--be-foreground-base)/var(--be-text-main-opacity))!important}.pi .text-facebook{--tw-text-opacity:1;color:rgb(59 89 152/var(--tw-text-opacity))}.pi .text-twitter{--tw-text-opacity:1;color:rgb(29 161 242/var(--tw-text-opacity))}.pi .text-positive-darker{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity))}.pi .text-disabled{color:rgb(var(--be-foreground-base)/var(--be-disabled-fg-opacity))}.pi .text-on-primary{--tw-text-opacity:1;color:rgb(var(--be-on-primary)/var(--tw-text-opacity))}.pi .text-primary-light{--tw-text-opacity:1;color:rgb(var(--be-primary-light)/var(--tw-text-opacity))}.pi .text-primary\\/40{color:rgb(var(--be-primary)/.4)}.pi .text-black\\/30{color:#0000004d}.pi .text-danger-darker{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity))}.pi .underline{text-decoration-line:underline}.pi .no-underline{text-decoration-line:none}.pi .caret-transparent{caret-color:transparent}.pi .opacity-0{opacity:0}.pi .opacity-100{opacity:1}.pi .opacity-80{opacity:.8}.pi .opacity-90{opacity:.9}.pi .shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.pi .shadow,.pi .shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.pi .shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.pi .shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color)}.pi .shadow-\\[15px_0_30px_0_rgb\\(0_0_0_\\/_18\\%\\)\\],.pi .shadow-xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.pi .shadow-\\[15px_0_30px_0_rgb\\(0_0_0_\\/_18\\%\\)\\]{--tw-shadow:15px 0 30px 0 rgba(0,0,0,.18);--tw-shadow-colored:15px 0 30px 0 var(--tw-shadow-color)}.pi .shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.pi .shadow-md,.pi .shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.pi .shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.pi .shadow-2xl{--tw-shadow:0 25px 50px -12px rgba(0,0,0,.25);--tw-shadow-colored:0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.pi .outline-none{outline:2px solid transparent;outline-offset:2px}.pi .outline{outline-color:rgb(var(--be-primary-lighter)/1);outline-style:solid;outline-width:2px}.pi .ring{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.pi .ring-inset{--tw-ring-inset:inset}.pi .ring-offset-4{--tw-ring-offset-width:4px}.pi .blur{--tw-blur:blur(8px)}.pi .blur,.pi .grayscale{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.pi .grayscale{--tw-grayscale:grayscale(100%)}.pi .invert{--tw-invert:invert(100%)}.pi .invert,.pi .sepia{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.pi .sepia{--tw-sepia:sepia(100%)}.pi .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.pi .transition-transform{transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .transition-shadow{transition-duration:.15s;transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .transition-bg-color{transition-duration:.15s;transition-property:background-color;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .transition-button{transition-duration:.15s;transition-property:background-color,box-shadow,border-color,color;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .transition-width{transition-duration:.15s;transition-property:width;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .duration-200{transition-duration:.2s}.pi .duration-100{transition-duration:.1s}.pi .will-change-\\[width\\]{will-change:width}.pi .will-change-transform{will-change:transform}.pi .icon-2xs{font-size:.75rem}.pi .icon-xs{font-size:1rem}.pi .icon-sm{font-size:1.25rem}.pi .icon-md{font-size:1.5rem}.pi .icon-lg{font-size:2.1875rem}.pi .icon-xl{font-size:2.6875rem}.pi .col-w-1{flex:1 0 0px}.pi .col-w-2{flex:2 0 0px}.pi .col-w-3{flex:3 0 0px}.pi .no-tap-highlight{-webkit-tap-highlight-color:transparent}@media only screen and (min-device-width:768px){.pi .tiny-scrollbar{scrollbar-color:rgba(0,0,0,.2) transparent;scrollbar-width:thin}.pi .tiny-scrollbar::-webkit-scrollbar{background-color:transparent;height:6px;width:6px}.pi .tiny-scrollbar::-webkit-scrollbar-thumb{background-color:rgb(var(--be-foreground-base)/.2);border-radius:10px}.pi .tiny-scrollbar::-webkit-scrollbar-track-piece:start{background:transparent}.pi .tiny-scrollbar::-webkit-scrollbar-track-piece:end{background:transparent}}.pi .hide-scrollbar{scrollbar-width:none}.pi .hide-scrollbar::-webkit-scrollbar{background:transparent;height:0;width:0}.pi .svg-icon{fill:currentColor;display:inline-block;flex-shrink:0;transition-duration:.15s;transition-property:transform,fill;transition-timing-function:cubic-bezier(.4,0,.2,1);-webkit-user-select:none;-moz-user-select:none;user-select:none}.pi .cropzone:not(.moving) .cropzone-transition{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .first-letter\\:capitalize:first-letter{text-transform:capitalize}.pi .file\\:mr-10::file-selector-button{margin-right:10px}.pi .file\\:h-24::file-selector-button{height:24px}.pi .file\\:rounded::file-selector-button{border-radius:4px}.pi .file\\:border-none::file-selector-button{border-style:none}.pi .file\\:bg-primary::file-selector-button{--tw-bg-opacity:1;background-color:rgb(var(--be-primary)/var(--tw-bg-opacity))}.pi .file\\:px-10::file-selector-button{padding-left:10px;padding-right:10px}.pi .file\\:text-sm::file-selector-button{font-size:14px;line-height:20px}.pi .file\\:font-semibold::file-selector-button{font-weight:600}.pi .file\\:text-on-primary::file-selector-button{--tw-text-opacity:1;color:rgb(var(--be-on-primary)/var(--tw-text-opacity))}.pi .before\\:absolute:before{content:var(--tw-content);position:absolute}.pi .before\\:left-0:before{content:var(--tw-content);left:0}.pi .before\\:top-1\\/2:before{content:var(--tw-content);top:50%}.pi .before\\:z-10:before{content:var(--tw-content);z-index:10}.pi .before\\:block:before{content:var(--tw-content);display:block}.pi .before\\:h-1:before{content:var(--tw-content);height:1px}.pi .before\\:h-full:before{content:var(--tw-content);height:100%}.pi .before\\:h-28:before{content:var(--tw-content);height:28px}.pi .before\\:h-22:before{content:var(--tw-content);height:22px}.pi .before\\:h-18:before{content:var(--tw-content);height:18px}.pi .before\\:h-12:before{content:var(--tw-content);height:12px}.pi .before\\:h-14:before{content:var(--tw-content);height:14px}.pi .before\\:w-full:before{content:var(--tw-content);width:100%}.pi .before\\:w-28:before{content:var(--tw-content);width:28px}.pi .before\\:w-22:before{content:var(--tw-content);width:22px}.pi .before\\:w-18:before{content:var(--tw-content);width:18px}.pi .before\\:w-12:before{content:var(--tw-content);width:12px}.pi .before\\:w-14:before{content:var(--tw-content);width:14px}.pi .before\\:-translate-y-1\\/2:before{--tw-translate-y:-50%}.pi .before\\:-translate-y-1\\/2:before,.pi .before\\:translate-x-2:before{content:var(--tw-content);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.pi .before\\:translate-x-2:before{--tw-translate-x:2px}.pi .before\\:scale-10:before{--tw-scale-x:.1;--tw-scale-y:.1;content:var(--tw-content);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.pi .before\\:rounded-full:before{border-radius:9999px;content:var(--tw-content)}.pi .before\\:rounded-3xl:before{border-radius:24px;content:var(--tw-content)}.pi .before\\:border:before{border-width:1px;content:var(--tw-content)}.pi .before\\:bg-divider:before{background-color:rgb(var(--be-foreground-base)/var(--be-divider-opacity));content:var(--tw-content)}.pi .before\\:bg-primary:before{--tw-bg-opacity:1;background-color:rgb(var(--be-primary)/var(--tw-bg-opacity));content:var(--tw-content)}.pi .before\\:bg-white:before{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity));content:var(--tw-content)}.pi .before\\:opacity-0:before{content:var(--tw-content);opacity:0}.pi .before\\:transition:before{content:var(--tw-content);transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .before\\:transition-transform:before{content:var(--tw-content);transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .before\\:duration-200:before{content:var(--tw-content);transition-duration:.2s}.pi .before\\:content-\\[\\\\\\\\00a0\\]:before{--tw-content:\\\\00a0;content:var(--tw-content)}.pi .after\\:pointer-events-none:after{content:var(--tw-content);pointer-events:none}.pi .after\\:absolute:after{content:var(--tw-content);position:absolute}.pi .after\\:inset-0:after{bottom:0;content:var(--tw-content);left:0;right:0;top:0}.pi .first\\:capitalize:first-child{text-transform:capitalize}.pi .checked\\:border-primary:checked{--tw-border-opacity:1;border-color:rgb(var(--be-primary)/var(--tw-border-opacity))}.pi .checked\\:border-danger:checked{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity))}.pi .checked\\:bg-primary:checked{--tw-bg-opacity:1;background-color:rgb(var(--be-primary)/var(--tw-bg-opacity))}.pi .checked\\:bg-danger:checked{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity))}.pi .checked\\:before\\:translate-x-36:checked:before{--tw-translate-x:36px}.pi .checked\\:before\\:translate-x-30:checked:before,.pi .checked\\:before\\:translate-x-36:checked:before{content:var(--tw-content);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.pi .checked\\:before\\:translate-x-30:checked:before{--tw-translate-x:30px}.pi .checked\\:before\\:translate-x-24:checked:before{--tw-translate-x:24px}.pi .checked\\:before\\:translate-x-16:checked:before,.pi .checked\\:before\\:translate-x-24:checked:before{content:var(--tw-content);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.pi .checked\\:before\\:translate-x-16:checked:before{--tw-translate-x:16px}.pi .checked\\:before\\:translate-x-20:checked:before{--tw-translate-x:20px}.pi .checked\\:before\\:scale-\\[\\.65\\]:checked:before,.pi .checked\\:before\\:translate-x-20:checked:before{content:var(--tw-content);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.pi .checked\\:before\\:scale-\\[\\.65\\]:checked:before{--tw-scale-x:.65;--tw-scale-y:.65}.pi .checked\\:before\\:border-white:checked:before{--tw-border-opacity:1;border-color:rgb(255 255 255/var(--tw-border-opacity));content:var(--tw-content)}.pi .checked\\:before\\:opacity-100:checked:before{content:var(--tw-content);opacity:1}.pi .focus-within\\:border-primary\\/60:focus-within{border-color:rgb(var(--be-primary)/.6)}.pi .focus-within\\:ring:focus-within{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.pi .focus-within\\:ring-primary\\/focus:focus-within{--tw-ring-color:rgb(var(--be-primary)/var(--be-focus-opacity))}.pi .focus-within\\:ring-primary-light:focus-within{--tw-ring-opacity:1;--tw-ring-color:rgb(var(--be-primary-light)/var(--tw-ring-opacity))}.pi .hover\\:scale-105:hover{--tw-scale-x:1.05;--tw-scale-y:1.05}.pi .hover\\:scale-105:hover,.pi .hover\\:scale-110:hover{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.pi .hover\\:scale-110:hover{--tw-scale-x:1.1;--tw-scale-y:1.1}.pi .hover\\:cursor-move:hover{cursor:move}.pi .hover\\:border-primary:hover{--tw-border-opacity:1;border-color:rgb(var(--be-primary)/var(--tw-border-opacity))}.pi .hover\\:border-danger:hover{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity))}.pi .hover\\:border-primary-dark:hover{--tw-border-opacity:1;border-color:rgb(var(--be-primary-dark)/var(--tw-border-opacity))}.pi .hover\\:border-danger\\/90:hover{border-color:#ef4444e6}.pi .hover\\:border-chip\\/90:hover{border-color:rgb(var(--be-background-chip)/.9)}.pi .hover\\:bg-hover:hover{background-color:rgb(var(--be-foreground-base)/var(--be-hover-opacity))}.pi .hover\\:bg-primary\\/10:hover{background-color:rgb(var(--be-primary)/.1)}.pi .hover\\:bg-white\\/hover:hover{background-color:rgb(255 255 255/var(--be-hover-opacity))}.pi .hover\\:bg-primary\\/hover:hover{background-color:rgb(var(--be-primary)/var(--be-hover-opacity))}.pi .hover\\:bg-danger\\/4:hover{background-color:#ef44440a}.pi .hover\\:bg-primary\\/4:hover{background-color:rgb(var(--be-primary)/4%)}.pi .hover\\:bg-primary-dark:hover{--tw-bg-opacity:1;background-color:rgb(var(--be-primary-dark)/var(--tw-bg-opacity))}.pi .hover\\:bg-danger\\/90:hover{background-color:#ef4444e6}.pi .hover\\:bg-chip\\/90:hover{background-color:rgb(var(--be-background-chip)/.9)}.pi .hover\\:bg-paper\\/90:hover{background-color:rgb(var(--be-paper)/.9)}.pi .hover\\:bg-primary\\/focus:hover{background-color:rgb(var(--be-primary)/var(--be-focus-opacity))}.pi .hover\\:bg-fg-base\\/15:hover{background-color:rgb(var(--be-foreground-base)/15%)}.pi .hover\\:text-primary-dark:hover{--tw-text-opacity:1;color:rgb(var(--be-primary-dark)/var(--tw-text-opacity))}.pi .hover\\:text-main:hover{color:rgb(var(--be-foreground-base)/var(--be-text-main-opacity))}.pi .hover\\:text-fg-base:hover{--tw-text-opacity:1;color:rgb(var(--be-foreground-base)/var(--tw-text-opacity))}.pi .hover\\:underline:hover{text-decoration-line:underline}.pi .hover\\:opacity-100:hover{opacity:1}.pi .hover\\:shadow-md:hover{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.pi .before\\:hover\\:bg-primary-dark:hover:before{--tw-bg-opacity:1;background-color:rgb(var(--be-primary-dark)/var(--tw-bg-opacity));content:var(--tw-content)}.pi .hover\\:after\\:bg-black\\/5:hover:after{background-color:#0000000d;content:var(--tw-content)}.pi .checked\\:hover\\:border-primary-dark:hover:checked{--tw-border-opacity:1;border-color:rgb(var(--be-primary-dark)/var(--tw-border-opacity))}.pi .focus\\:border-danger\\/60:focus{border-color:#ef444499}.pi .focus\\:border-primary\\/60:focus{border-color:rgb(var(--be-primary)/.6)}.pi .focus\\:bg-primary:focus{--tw-bg-opacity:1;background-color:rgb(var(--be-primary)/var(--tw-bg-opacity))}.pi .focus\\:text-on-primary:focus{--tw-text-opacity:1;color:rgb(var(--be-on-primary)/var(--tw-text-opacity))}.pi .focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.pi .focus\\:ring:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.pi .focus\\:ring-2:focus,.pi .focus\\:ring:focus{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.pi .focus\\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.pi .focus\\:ring-danger\\/focus:focus{--tw-ring-color:rgb(239 68 68/var(--be-focus-opacity))}.pi .focus\\:ring-primary\\/focus:focus{--tw-ring-color:rgb(var(--be-primary)/var(--be-focus-opacity))}.pi .focus\\:ring-offset-2:focus{--tw-ring-offset-width:2px}.pi .focus\\:after\\:bg-black\\/10:focus:after{background-color:#0000001a;content:var(--tw-content)}.pi .focus-visible\\:bg-primary\\/focus:focus-visible{background-color:rgb(var(--be-primary)/var(--be-focus-opacity))}.pi .focus-visible\\:bg-focus:focus-visible{background-color:rgb(var(--be-foreground-base)/var(--be-focus-opacity))}.pi .focus-visible\\:outline:focus-visible{outline-style:solid;outline-width:2px}.pi .focus-visible\\:outline-offset-2:focus-visible{outline-offset:2px}.pi .focus-visible\\:outline:focus-visible{outline-color:rgb(var(--be-primary-lighter)/1)}.pi .focus-visible\\:outline-primary-light:focus-visible{outline-color:rgb(var(--be-primary-light)/1)}.pi .focus-visible\\:ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.pi .focus-visible\\:ring:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.pi .disabled\\:pointer-events-none:disabled{pointer-events:none}.pi .disabled\\:cursor-default:disabled{cursor:default}.pi .disabled\\:border-disabled-bg:disabled{border-color:rgb(var(--be-foreground-base)/var(--be-disabled-bg-opacity))}.pi .disabled\\:border-transparent:disabled{border-color:transparent}.pi .disabled\\:border-disabled-fg:disabled{border-color:rgb(var(--be-foreground-base)/var(--be-disabled-fg-opacity))}.pi .disabled\\:border-r-transparent:disabled{border-right-color:transparent}.pi .disabled\\:bg-transparent:disabled{background-color:transparent}.pi .disabled\\:bg-disabled:disabled{background-color:rgb(var(--be-foreground-base)/var(--be-disabled-bg-opacity))}.pi .disabled\\:text-disabled:disabled{color:rgb(var(--be-foreground-base)/var(--be-disabled-fg-opacity))}.pi .disabled\\:shadow-none:disabled{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.pi .disabled\\:before\\:bg-disabled-fg:disabled:before{background-color:rgb(var(--be-foreground-base)/var(--be-disabled-fg-opacity));content:var(--tw-content)}.pi .dark .dark\\:bg-alt{--tw-bg-opacity:1;background-color:rgb(var(--be-background-alt)/var(--tw-bg-opacity))}.pi .dark .dark\\:bg-none{background-image:none}.pi .dark .dark\\:text-white\\/50{color:#ffffff80}.pi .dark .dark\\:opacity-5{opacity:.05}.pi .dark .dark\\:opacity-80{opacity:.8}.pi .dark .dark\\:checked\\:border-primary-dark:checked{--tw-border-opacity:1;border-color:rgb(var(--be-primary-dark)/var(--tw-border-opacity))}.pi .dark .dark\\:checked\\:bg-primary-dark:checked{--tw-bg-opacity:1;background-color:rgb(var(--be-primary-dark)/var(--tw-bg-opacity))}@media (min-width:640px){.pi .sm\\:justify-start{justify-content:flex-start}.pi .sm\\:text-sm{font-size:14px;line-height:20px}}@media (min-width:768px){.pi .md\\:invisible{visibility:hidden}.pi .md\\:my-24{margin-bottom:24px;margin-top:24px}.pi .md\\:mx-40{margin-left:40px;margin-right:40px}.pi .md\\:my-64{margin-bottom:64px;margin-top:64px}.pi .md\\:my-100{margin-bottom:6.25rem;margin-top:6.25rem}.pi .md\\:mr-0{margin-right:0}.pi .md\\:mb-0{margin-bottom:0}.pi .md\\:mr-10{margin-right:10px}.pi .md\\:mb-40{margin-bottom:40px}.pi .md\\:mb-24{margin-bottom:24px}.pi .md\\:mt-60{margin-top:60px}.pi .md\\:mb-70{margin-bottom:70px}.pi .md\\:mt-0{margin-top:0}.pi .md\\:mr-24{margin-right:24px}.pi .md\\:mr-80{margin-right:80px}.pi .md\\:block{display:block}.pi .md\\:flex{display:flex}.pi .md\\:h-0{height:0}.pi .md\\:w-min{width:-moz-min-content;width:min-content}.pi .md\\:w-320{width:320px}.pi .md\\:w-400{width:25rem}.pi .md\\:min-w-440{min-width:27.5rem}.pi .md\\:max-w-950{max-width:59.375rem}.pi .md\\:max-w-350{max-width:21.875rem}.pi .md\\:flex-row{flex-direction:row}.pi .md\\:items-start{align-items:flex-start}.pi .md\\:gap-12{gap:12px}.pi .md\\:gap-24{gap:24px}.pi .md\\:gap-80{gap:80px}.pi .md\\:gap-112{gap:112px}.pi .md\\:overflow-hidden{overflow:hidden}.pi .md\\:p-24{padding:24px}.pi .md\\:px-24{padding-left:24px;padding-right:24px}.pi .md\\:px-30{padding-left:30px;padding-right:30px}.pi .md\\:px-0{padding-left:0;padding-right:0}.pi .md\\:px-20{padding-left:20px;padding-right:20px}.pi .md\\:py-80{padding-bottom:80px;padding-top:80px}.pi .md\\:px-176{padding-left:176px;padding-right:176px}.pi .md\\:px-10vw{padding-left:10vw;padding-right:10vw}.pi .md\\:pt-128{padding-top:128px}.pi .md\\:pl-20{padding-left:20px}.pi .md\\:pb-0{padding-bottom:0}.pi .md\\:pb-54{padding-bottom:3.375rem}.pi .md\\:text-left{text-align:left}.pi .md\\:text-3xl{font-size:30px;line-height:36px}.pi .md\\:text-4xl{font-size:36px;line-height:40px}.pi .md\\:text-lg{font-size:18px;line-height:28px}.pi .md\\:text-base{font-size:16px;line-height:24px}.pi .md\\:font-medium{font-weight:500}.pi .md\\:font-normal{font-weight:400}.pi .md\\:shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}}@media (min-width:1024px){.pi .lg\\:min-w-500{min-width:31.25rem}.pi .lg\\:flex-row{flex-direction:row}.pi .lg\\:items-center{align-items:center}.pi .lg\\:px-96{padding-left:96px;padding-right:96px}.pi .lg\\:py-96{padding-bottom:96px;padding-top:96px}.pi .lg\\:pb-0{padding-bottom:0}}@media (min-width:1280px){.pi .xl\\:w-1\\/2{width:50%}.pi .xl\\:pt-96{padding-top:96px}}.pi .\\[\\&\\>\\.tree-label\\]\\:focus-visible\\:ring:focus-visible>.tree-label{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.pi .\\[\\&\\>\\.tree-label\\]\\:focus-visible\\:ring-2:focus-visible>.tree-label{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.pi .\\[\\&\\>\\.tree-label\\]\\:focus-visible\\:ring-inset:focus-visible>.tree-label{--tw-ring-inset:inset}\n'),!e.selector)throw new Error('Pixie required "selector" option.');const t=document.querySelector(e.selector);t&&(t.classList.add("pi"),function(e){Ad=e}(t),this.setConfig(e),Id.setState({editor:this}),Wd(t).render(lc(i.StrictMode,{children:lc(pO,{})})))}get state(){return Od()}get defaultConfig(){return gO.defaultConfig}open(e={}){var t;null!=(t=Od().config.ui)&&t.visible||(this.setConfig(_o(e,{ui:{visible:!0}})),requestAnimationFrame(()=>{var e,t,n,r;Ed().zoom.fitToScreen(),Ed().history.addInitial(),zd()&&(null==(t=null==(e=Od().config.ui)?void 0:e.openImageDialog)?void 0:t.show)&&this.togglePanel("newImage",!0),null==(r=(n=Od().config).onOpen)||r.call(n)}))}close(){var e,t,n;null==(e=Od().config.ui)||!e.visible||(this.setConfig({ui:{visible:!1}}),null==(n=(t=Od().config).onClose)||n.call(t))}setConfig(e){Od().setConfig(e)}uploadAndAddImage(){return Ed().import.uploadAndAddImage()}uploadAndReplaceMainImage(){return Ed().import.uploadAndReplaceMainImage()}uploadAndOpenStateFile(){return Ed().import.uploadAndOpenStateFile()}newCanvas(e,t,n){return Ed().canvas.openNew(e,t,n)}getState(e){return JSON.stringify(Dd(e))}setState(e){return Ed().import.loadState(e)}async setStateFromUrl(e){const t=await Fd(e);return Ed().import.loadState(t)}openTool(e){Rd(e)}applyChanges(){Od().applyChanges()}cancelChanges(){Od().cancelChanges()}async resetEditor(e){await Md(e),await Ed().canvas.loadInitialContent()}togglePanel(e,t){"objects"===e&&Od().togglePanel("history",!1),"history"===e&&Od().togglePanel("objects",!1),Od().togglePanel(e,t)}on(e,t){var n;null==(n=this.fabric)||n.on(e,t)}isDirty(){return Od().dirty}get(e){return this.tools[e]}notify(e){return Hd(e)}static init(e){return new Promise(t=>{const n=e.onLoad;e.onLoad=e=>{null==n||n(e),t(e)},new this(e)})}};let mO=gO;uo(mO,"defaultConfig",Gc),uo(mO,"version",$c);const vO="fm-pixie-editor";const bO=new class{constructor(){this._container=document.createElement("div"),this._instance=null,this._container.classList.add(vO),this._container.style.width="100%",this._container.style.height="85vh",this._container.style.minHeight="400px"}get className(){return`.${vO}`}get canvas(){var e,t;return null===(t=null===(e=this._instance)||void 0===e?void 0:e.state.canvasRef)||void 0===t?void 0:t.current}get tools(){var e;return null===(e=this._instance)||void 0===e?void 0:e.tools}isLoaded(){return!!this._instance}async _setConfig(e){this._instance?await this._instance.resetEditor(e):this._instance=await mO.init(Object.assign(Object.assign({},e),{selector:this.className}))}async show(e,t,n=t.firstChild){t.insertBefore(this._container,n),await this._setConfig(e),this._instance.open()}close(){var e;null===(e=this._container.parentNode)||void 0===e||e.removeChild(this._container)}};var yO;!function(e){e.TOP="top",e.BOTTOM="bottom",e.HIDDEN=""}(yO||(yO={}));const wO=(e,t="image/png")=>fetch(`data:${t};base64,${e}`).then(e=>e.blob());const xO=({visible:t,onClose:n,file:i,onSave:o})=>{const a=r.useRef(null),{options:s,actions:l}=ri(),{config:c}=s,{setCurrentMenuFile:u}=l,[h,d]=r.useState(null),[f,p]=r.useState(""),[g,m]=r.useState(!1),[v,b]=r.useState(!1),y=ci(),w=r.useRef(!1),x=r.useRef(),C=r.useRef(void 0),[_,S]=r.useState(null);r.useEffect(()=>{i&&(async()=>{if(C.current!==i)if("object"!=typeof i)try{if(C.current=i,i.startsWith("data:"))S({thumbnail:i});else{const e=await y.handleAddFileByUrl(i,!0);if(!e)throw new Error("Не удалось загрузить файл");C.current===i&&S(e)}}finally{C.current===i&&(C.current=null)}else S(i)})()},[i,y.handleAddFileByUrl,S]),x.current=o;const A=r.useCallback(async e=>{try{if(e.thumbnail&&e.thumbnail.startsWith("data:"))return e.thumbnail;const t=await y.getFileData(e);if(!t)throw new Error("Ошибка загрузки файла");return new Promise(e=>{const n=new FileReader;n.onload=()=>e(n.result),n.readAsDataURL(t)})}catch(e){throw console.error("Ошибка получения данных изображения:",e),e}},[y.getFileData]);r.useEffect(()=>{(async()=>{try{const e=_?await A(_):null;d(e);const t=_?_.type:"";p(t||"image/png")}catch(e){console.error("🎨 Ошибка загрузки изображения:",e),E.error("Ошибка загрузки изображения"),null==n||n()}})()},[t,_,A,n]);const k=r.useCallback(async(e,t,r)=>{if(_&&x.current)try{const t=await function(e,t){if("json"===e)return new Blob([t],{type:"application/json"});if("svg"===e)return new Blob([t],{type:"image/svg+xml"});let n=`image/${e}`;if("jpg"===e&&(n="image/jpeg"),t.startsWith("data:")){const e=t.match(/^data:([^;]+)/);e&&e[1].startsWith("image/")&&(n=e[1]);const r=t.replace(/data:image\/[^;]+;base64,/,"");return wO(r,n)}return wO(t,n)}(r,e);let i=t.type||`image/${r}`;"jpg"===r&&(i="image/jpeg");const o=e.startsWith("data:")?e:`data:${i};base64,${e}`,a=Object.assign(Object.assign({},_),{thumbnail:o,size:t.size,date:(new Date).toISOString().split("T")[0],type:i,folderId:_.folderId||"",name:_.name,extension:_.extension||_.name.split(".").pop()||""});await x.current(a),null==n||n()}catch(e){console.error("Ошибка сохранения:",e),E.error("Ошибка при сохранении изображения")}},[_,n]),T=r.useCallback(async()=>{var e;if(!bO.isLoaded()||!_)return void console.error("❌ Pixie instance или file отсутствует");const t=_.name||"edited-image",n=_.extension||f.split("/")[1]||"png";try{let r;r="jpg"===n?"jpeg":["png","jpeg","json","svg"].includes(n)?n:"jpeg",await(null===(e=bO.tools)||void 0===e?void 0:e.export.save(t.replace(/\.[^/.]+$/,""),r,.8))}catch(e){console.error("🎨 Ошибка при сохранении через кнопку:",e);try{const e=bO.canvas,r=e?e.toDataURL(`image/${n}`):null;r&&await k(r,t,n)}catch(e){console.error("🎨 Альтернативный способ тоже не сработал:",e)}}},[_,f,k]),I=r.useCallback(async()=>{if(h&&t&&g&&!w.current)try{w.current=!0;const e=a.current;let t=0;for(;t<20&&(0===e.clientWidth||0===e.clientHeight);)await new Promise(e=>setTimeout(e,50)),t++;const n=(null==c?void 0:c.locale)?null==c?void 0:c.locale.replace("_","-"):"ru-RU",r={selector:"#pixie-editor",image:h,activeLanguage:n,ui:{mode:"inline",forceOverlayModeOnMobile:!1,visible:!0,menubar:{position:yO.TOP}},tools:{filter:{items:["crop","resize","draw","text","shapes","frame","export","import"]}},onSave:async function(e,t,n){try{return await k(e,t,n)}catch(e){throw console.error("🎨 PIXIE onSave ERROR:",e),e}}};try{b(!1),await bO.show(r,a.current);const e=bO.canvas;e&&e.focus(),b(!0)}catch(e){console.error("init pixie failed:",e)}}catch(e){console.error("Ошибка инициализации Pixie:",e),E.error("Ошибка инициализации редактора"),w.current=!1,null==n||n()}},[h,t,g,null==c?void 0:c.locale,k,n]);return r.useEffect(()=>{t&&h&&g&&I()},[t,h,g,null==_?void 0:_.id,I]),r.useEffect(()=>{if(!t){try{bO.close()}catch(e){console.warn("Ошибка при закрытии Pixie:",e)}d(null),p(""),w.current=!1,m(!1),b(!1)}return()=>{try{bO.close()}catch(e){console.warn("Ошибка при закрытии Pixie при размонтировании:",e)}}},[t]),e($,{title:`Редактирование: ${(null==_?void 0:_.name)||"Изображение"}`,open:t,onCancel:n,afterOpenChange:e=>m(e),forceRender:!0,width:"95vw",style:{top:20},styles:{body:{height:"85vh",padding:0}},footer:[e(z,{onClick:n,children:"Отмена"},"cancel"),e(z,{type:"primary",onClick:T,children:"Сохранить"},"save")],maskClosable:!1,destroyOnHidden:!1,afterClose:()=>{u&&u("")},children:e("div",{ref:a,style:{position:"relative",width:"100%",height:"100%"},children:t&&!v?e("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(255,255,255,0.45)",backdropFilter:"blur(1px)",pointerEvents:"all",zIndex:10},children:e("span",{style:{fontSize:14,color:"#555"},children:"Загрузка редактора…"})}):null})})};var CO="container",_O="uploadCard",SO="header",AO="headerButton",kO="fileList",TO="fileItem",IO="fileAvatar",OO="fileInfo",EO="fileName",PO="fileSize",MO="progressBar",FO="errorNote",jO="minimizedContainer",DO="minimizedButton";const{Text:RO}=F,LO=({visible:n,files:r,totalFiles:i,completedFiles:o,onClose:a,onMinimize:s,onInsert:l,minimized:c=!1})=>{if(!n)return null;const{token:u}=k.useToken(),h=t=>{switch(t){case"success":return e(xe,{style:{color:u.colorSuccess}});case"error":return e(we,{style:{color:u.colorError}});default:return e(ye,{style:{color:"#1890ff"}})}},d=e=>{if(e.includes("КБ")||e.includes("MB")||e.includes("KB"))return e;const t=parseInt(e);return isNaN(t)?e:`${(t/1024).toFixed(2)} КБ`},f=t=>"success"===t.status?[e(z,{type:"primary",size:"small",onClick:()=>l(t.id),children:"Insert"},"insert")]:"error"===t.status?[e(RO,{type:"danger",style:{fontSize:"12px"},children:t.error||"Error"},"error")]:[];return e("div",c?{className:jO,children:t(z,{type:"primary",size:"small",onClick:s,className:DO,children:["Загрузка ",o,"/",i]})}:{className:CO,children:t(Y,{className:_O,size:"small",title:t("div",{className:SO,children:[t(RO,{strong:!0,children:["Uploaded ",o,"/",i," files"]}),t(N,{children:[e(z,{type:"text",size:"small",icon:e(ve,{}),onClick:s,className:AO}),e(z,{type:"text",size:"small",icon:e(be,{}),onClick:a,className:AO})]})]}),bodyStyle:{padding:"12px"},children:[e(q,{className:kO,size:"small",dataSource:r,renderItem:n=>e(q.Item,{className:TO,actions:f(n),children:e(q.Item.Meta,{avatar:e(J,{size:"small",icon:h(n.status),className:IO}),title:t("div",{className:OO,children:[e(RO,{ellipsis:!0,className:EO,children:n.name}),e(RO,{type:"secondary",className:PO,children:d(n.size)})]}),description:"uploading"===n.status&&e(Z,{percent:n.progress,size:"small",status:"active",showInfo:!1,className:MO})})})}),r.some(e=>"error"===e.status)&&e("div",{className:FO,children:e(RO,{type:"danger",style:{fontSize:"12px"},children:"Некоторые файлы не удалось загрузить. Проверьте размер и формат файлов."})})]})})},{Header:zO}=Q,{Title:NO}=F,BO=({activeLibraryItem:t})=>{const{t:n}=An(),r={[Xr]:n("My files"),[Kr]:n("GIF"),[qr]:n("Stock images"),[Zr]:n("AI image generation")};return e(zO,{className:"actions-header",children:e("div",{className:"header-title-container",children:e(NO,{level:5,className:"header-title",children:r[t]})})})};
|
|
81
81
|
/*! *****************************************************************************
|
|
82
82
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
83
83
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
@@ -92,5 +92,5 @@ MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
|
92
92
|
See the Apache Version 2.0 License for specific language governing permissions
|
|
93
93
|
and limitations under the License.
|
|
94
94
|
***************************************************************************** */
|
|
95
|
-
var VO=function(e,t){return VO=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},VO(e,t)};var UO=function(){return UO=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},UO.apply(this,arguments)};var HO="Pixel",WO="Percent",YO={unit:WO,value:.8};function $O(e){return"number"==typeof e?{unit:WO,value:100*e}:"string"==typeof e?e.match(/^(\d*(\.\d+)?)px$/)?{unit:HO,value:parseFloat(e)}:e.match(/^(\d*(\.\d+)?)%$/)?{unit:WO,value:parseFloat(e)}:(console.warn('scrollThreshold format is invalid. Valid formats: "120px", "50%"...'),YO):(console.warn("scrollThreshold should be string or number"),YO)}var GO=function(e){function t(t){var n=e.call(this,t)||this;return n.lastScrollTop=0,n.actionTriggered=!1,n.startY=0,n.currentY=0,n.dragging=!1,n.maxPullDownDistance=0,n.getScrollableTarget=function(){return n.props.scrollableTarget instanceof HTMLElement?n.props.scrollableTarget:"string"==typeof n.props.scrollableTarget?document.getElementById(n.props.scrollableTarget):(null===n.props.scrollableTarget&&console.warn("You are trying to pass scrollableTarget but it is null. This might\n happen because the element may not have been added to DOM yet.\n See https://github.com/ankeetmaini/react-infinite-scroll-component/issues/59 for more info.\n "),null)},n.onStart=function(e){n.lastScrollTop||(n.dragging=!0,e instanceof MouseEvent?n.startY=e.pageY:e instanceof TouchEvent&&(n.startY=e.touches[0].pageY),n.currentY=n.startY,n._infScroll&&(n._infScroll.style.willChange="transform",n._infScroll.style.transition="transform 0.2s cubic-bezier(0,0,0.31,1)"))},n.onMove=function(e){n.dragging&&(e instanceof MouseEvent?n.currentY=e.pageY:e instanceof TouchEvent&&(n.currentY=e.touches[0].pageY),n.currentY<n.startY||(n.currentY-n.startY>=Number(n.props.pullDownToRefreshThreshold)&&n.setState({pullToRefreshThresholdBreached:!0}),n.currentY-n.startY>1.5*n.maxPullDownDistance||n._infScroll&&(n._infScroll.style.overflow="visible",n._infScroll.style.transform="translate3d(0px, "+(n.currentY-n.startY)+"px, 0px)")))},n.onEnd=function(){n.startY=0,n.currentY=0,n.dragging=!1,n.state.pullToRefreshThresholdBreached&&(n.props.refreshFunction&&n.props.refreshFunction(),n.setState({pullToRefreshThresholdBreached:!1})),requestAnimationFrame(function(){n._infScroll&&(n._infScroll.style.overflow="auto",n._infScroll.style.transform="none",n._infScroll.style.willChange="unset")})},n.onScrollListener=function(e){"function"==typeof n.props.onScroll&&setTimeout(function(){return n.props.onScroll&&n.props.onScroll(e)},0);var t=n.props.height||n._scrollableNode?e.target:document.documentElement.scrollTop?document.documentElement:document.body;n.actionTriggered||((n.props.inverse?n.isElementAtTop(t,n.props.scrollThreshold):n.isElementAtBottom(t,n.props.scrollThreshold))&&n.props.hasMore&&(n.actionTriggered=!0,n.setState({showLoader:!0}),n.props.next&&n.props.next()),n.lastScrollTop=t.scrollTop)},n.state={showLoader:!1,pullToRefreshThresholdBreached:!1,prevDataLength:t.dataLength},n.throttledOnScrollListener=function(e,t,n,r){var i,o=!1,a=0;function s(){i&&clearTimeout(i)}function l(){var l=this,c=Date.now()-a,u=arguments;function h(){a=Date.now(),n.apply(l,u)}o||(r&&!i&&h(),s(),void 0===r&&c>e?h():!0!==t&&(i=setTimeout(r?function(){i=void 0}:h,void 0===r?e-c:e)))}return"boolean"!=typeof t&&(r=n,n=t,t=void 0),l.cancel=function(){s(),o=!0},l}(150,n.onScrollListener).bind(n),n.onStart=n.onStart.bind(n),n.onMove=n.onMove.bind(n),n.onEnd=n.onEnd.bind(n),n}return function(e,t){function n(){this.constructor=e}VO(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.componentDidMount=function(){if(void 0===this.props.dataLength)throw new Error('mandatory prop "dataLength" is missing. The prop is needed when loading more content. Check README.md for usage');if(this._scrollableNode=this.getScrollableTarget(),this.el=this.props.height?this._infScroll:this._scrollableNode||window,this.el&&this.el.addEventListener("scroll",this.throttledOnScrollListener),"number"==typeof this.props.initialScrollY&&this.el&&this.el instanceof HTMLElement&&this.el.scrollHeight>this.props.initialScrollY&&this.el.scrollTo(0,this.props.initialScrollY),this.props.pullDownToRefresh&&this.el&&(this.el.addEventListener("touchstart",this.onStart),this.el.addEventListener("touchmove",this.onMove),this.el.addEventListener("touchend",this.onEnd),this.el.addEventListener("mousedown",this.onStart),this.el.addEventListener("mousemove",this.onMove),this.el.addEventListener("mouseup",this.onEnd),this.maxPullDownDistance=this._pullDown&&this._pullDown.firstChild&&this._pullDown.firstChild.getBoundingClientRect().height||0,this.forceUpdate(),"function"!=typeof this.props.refreshFunction))throw new Error('Mandatory prop "refreshFunction" missing.\n Pull Down To Refresh functionality will not work\n as expected. Check README.md for usage\'')},t.prototype.componentWillUnmount=function(){this.el&&(this.el.removeEventListener("scroll",this.throttledOnScrollListener),this.props.pullDownToRefresh&&(this.el.removeEventListener("touchstart",this.onStart),this.el.removeEventListener("touchmove",this.onMove),this.el.removeEventListener("touchend",this.onEnd),this.el.removeEventListener("mousedown",this.onStart),this.el.removeEventListener("mousemove",this.onMove),this.el.removeEventListener("mouseup",this.onEnd)))},t.prototype.componentDidUpdate=function(e){this.props.dataLength!==e.dataLength&&(this.actionTriggered=!1,this.setState({showLoader:!1}))},t.getDerivedStateFromProps=function(e,t){return e.dataLength!==t.prevDataLength?UO(UO({},t),{prevDataLength:e.dataLength}):null},t.prototype.isElementAtTop=function(e,t){void 0===t&&(t=.8);var n=e===document.body||e===document.documentElement?window.screen.availHeight:e.clientHeight,r=$O(t);return r.unit===HO?e.scrollTop<=r.value+n-e.scrollHeight+1:e.scrollTop<=r.value/100+n-e.scrollHeight+1},t.prototype.isElementAtBottom=function(e,t){void 0===t&&(t=.8);var n=e===document.body||e===document.documentElement?window.screen.availHeight:e.clientHeight,r=$O(t);return r.unit===HO?e.scrollTop+n>=e.scrollHeight-r.value:e.scrollTop+n>=r.value/100*e.scrollHeight},t.prototype.render=function(){var e=this,t=UO({height:this.props.height||"auto",overflow:"auto",WebkitOverflowScrolling:"touch"},this.props.style),n=this.props.hasChildren||!!(this.props.children&&this.props.children instanceof Array&&this.props.children.length),r=this.props.pullDownToRefresh&&this.props.height?{overflow:"auto"}:{};return i.createElement("div",{style:r,className:"infinite-scroll-component__outerdiv"},i.createElement("div",{className:"infinite-scroll-component "+(this.props.className||""),ref:function(t){return e._infScroll=t},style:t},this.props.pullDownToRefresh&&i.createElement("div",{style:{position:"relative"},ref:function(t){return e._pullDown=t}},i.createElement("div",{style:{position:"absolute",left:0,right:0,top:-1*this.maxPullDownDistance}},this.state.pullToRefreshThresholdBreached?this.props.releaseToRefreshContent:this.props.pullDownToRefreshContent)),this.props.children,!this.state.showLoader&&!n&&this.props.hasMore&&this.props.loader,this.state.showLoader&&this.props.hasMore&&this.props.loader,!this.props.hasMore&&this.props.endMessage))},t}(S),XO={gifTab:"gifTab",gifSearchInput:"gifSearchInput",scrollableDiv:"scrollableDiv",listItem:"listItem",loaded:"loaded",loadedImage:"loadedImage"};const KO=e(Ce,{style:{fontSize:20},spin:!0}),qO=({setImageGifList:n,imageGifList:r=[],currentReqGif:i,setCurrentReqGif:a,inputRef:s,customRequest:l})=>{const{t:c}=An(),{options:u}=ri(),{config:h}=u,[d,f]=o(null),[p,g]=o(!1),[m,v]=o(25),b=async function({query:e,page:t}){const n=e.keywords.replace(/[^\w\sа-яёА-ЯЁ]|_/g,"").replace(/[\s_-]+/g," ");try{const e=`https://api.giphy.com/v1/gifs/search?api_key=${null==h?void 0:h.REACT_APP_GIPHY_KEY}&q=${n}&limit=25&offset=${t}&lang=en`,r=await fetch(e);return{data:await r.json()}}catch(e){console.log(e)}},y=async()=>{var e,t;const r=await b({query:i,page:0});(null===(t=null===(e=null==r?void 0:r.data)||void 0===e?void 0:e.data)||void 0===t?void 0:t.length)&&r.data.data.length>0&&n(r.data.data)};return t("div",{className:XO.gifTab,children:[t(O,{onValuesChange:y,className:r.length>0?XO.searchResults:"",children:[e(O.Item,{className:XO.gifSearchInput,children:e(P,{onKeyDown:e=>"Space"===e.code&&y(),onPressEnter:e=>y(),allowClear:!0,placeholder:c("Search GIFs"),value:null==i?void 0:i.keywords,onChange:e=>a(t=>Object.assign(Object.assign({},t),{keywords:e.target.value})),ref:s,spellCheck:"false",prefix:e(Nr,{size:16,strokeWidth:null==h?void 0:h.iconStrokeWidth,onClick:y})})}),r.length>0&&e("div",{className:"ant-divider blocks-search__divider",role:"separator"})]}),e("div",{className:"serach-output-wrapper",children:r.length>0&&e("div",{id:"scrollableDiv",className:XO.scrollableDiv,children:e(GO,{dataLength:r&&r.length,next:async()=>{p||(g(!0),b({query:i,page:m}).then(e=>{e&&e.data&&e.data.data&&n(t=>[...t,...e.data.data]),g(!1),v(e=>e+25)}).catch(()=>{g(!1)}))},hasMore:!!r,endMessage:t(K,{plain:!0,children:[c("That`s all we could find.")," 🤐"]}),scrollableTarget:"scrollableDiv",style:{overflow:"visible",display:"flex",gap:20,flexWrap:"wrap"},loader:e(ee,{indicator:KO}),children:r.map((n,r)=>t("div",{className:XO.listItem,onClick:()=>((e,t)=>{f(t),setTimeout(()=>{f(null)},2e3),l(e)})(n.images.downsized.url,n.id),children:[e("img",{className:d===n.id?XO.loadedImage:"",width:"322px",src:`${n.images.downsized.url}`,alt:n.title,onLoad:e=>{const t=e.target.parentNode;t&&t instanceof HTMLElement&&t.classList.add(XO.loaded)}}),e("a",{rel:"noreferrer",href:"https://giphy.com/",target:"_blank",onClick:e=>e.stopPropagation()}),d===n.id&&e(ee,{className:"ant-spin",indicator:e(Ce,{spin:!0})})]},n.id+r))})})})]})};var ZO="stockTab",JO="stockSearchInput",QO="searchResults",eE="blocksSearchDividerWrapper",tE="scrollableDiv",nE="listItem",rE="loaded",iE="loadedImage",oE="creatorInfo",aE="stockColorFilter",sE="allColors",lE="blackColor",cE="bwColor",uE="whiteColor",hE="orangeColor",dE="redColor",fE="purpleColor",pE="magentaColor",gE="greenColor",mE="tealColor",vE="blueColor";const bE=e(Ce,{style:{fontSize:20},spin:!0}),yE=({imageStockList:r,setImageStockList:i,currentReq:s,setCurrentReq:l,inputRef:c,customRequest:u})=>{const[h,d]=o(!1),[f,p]=o(2),{t:g}=An(),{options:m}=ri(),{config:v}=m,b=async function({query:e,page:t}){const n=e.keywords.replace(/[^\w\sа-яёА-ЯЁ]|_/g,"").replace(/[\s_-]+/g," ");try{let r=`https://api.unsplash.com/search/photos?client_id=${null==v?void 0:v.UNSPLASH_KEY}&lang=ru&per_page=18&query=${n}&page=${t}`;""!==e.color&&(r+=`&color=${e.color}`),""!==e.orientation&&(r+=`&orientation=${e.orientation}`);const i=await fetch(r);return{data:await i.json()}}catch(e){console.log(e)}};a(()=>{""!==s.keywords&&y()},[s.color,s.orientation]);const y=async()=>{var e,t;const n=await b({query:s,page:1});(null===(t=null===(e=null==n?void 0:n.data)||void 0===e?void 0:e.results)||void 0===t?void 0:t.length)&&n.data.results.length>0&&i(n.data.results)},[w,x]=o(null),C=(e,t,n)=>{!async function(e){try{const t=await fetch(`${e}&client_id=${null==v?void 0:v.UNSPLASH_KEY}`);return{data:await t.json()}}catch(e){console.log(e)}}(t.download_location),x(n),setTimeout(()=>x(null),2e3),u(`${e.raw}&w=1200&q=96`)};return t("div",{className:ZO,children:[t(O,{onValuesChange:y,className:r.length>0?QO:"",children:[t(H,{gutter:24,children:[e(W,{span:r.length>0?void 0:24,children:e(O.Item,{className:JO,children:e(P,{onKeyDown:e=>"Space"===e.code&&y(),onPressEnter:e=>y(),allowClear:!0,placeholder:g("Search image"),value:s.keywords,onChange:e=>l(t=>Object.assign(Object.assign({},t),{keywords:e.target.value})),ref:c,spellCheck:"false",prefix:e(Nr,{size:16,strokeWidth:null==v?void 0:v.iconStrokeWidth,onClick:y})})})}),r.length>0&&t(n,{children:[e(W,{children:t(te.Group,{defaultValue:"",onChange:e=>l(t=>Object.assign(Object.assign({},t),{orientation:e.target.value})),children:[e(L,{title:g("All"),placement:"top",children:e(te.Button,{value:"",children:e(Oi,{})})}),e(L,{title:g("Landscape"),placement:"top",children:e(te.Button,{value:"landscape",children:e(Ei,{})})}),e(L,{title:g("Portrait"),placement:"top",children:e(te.Button,{value:"portrait",children:e(Pi,{})})}),e(L,{title:g("Squarish"),placement:"top",children:e(te.Button,{value:"squarish",children:e(Mi,{})})})]})}),e(W,{children:t(te.Group,{defaultValue:"",className:aE,onChange:e=>l(t=>Object.assign(Object.assign({},t),{color:e.target.value})),children:[e(L,{title:g("All"),placement:"top",children:e(te.Button,{className:sE,value:"",children:"All"})}),e(L,{title:g("Black"),placement:"top",children:e(te.Button,{className:lE,value:"black",children:"B"})}),e(L,{title:g("Black and White"),placement:"top",children:e(te.Button,{className:cE,value:"black_and_white",children:"B&W"})}),e(L,{title:g("White"),placement:"top",children:e(te.Button,{className:uE,value:"white",children:"W"})}),e(L,{title:g("Orange"),placement:"top",children:e(te.Button,{className:hE,value:"orange",children:"O"})}),e(L,{title:g("Red"),placement:"top",children:e(te.Button,{className:dE,value:"red",children:"R"})}),e(L,{title:g("Purple"),placement:"top",children:e(te.Button,{className:fE,value:"purple",children:"P"})}),e(L,{title:g("Magenta"),placement:"top",children:e(te.Button,{className:pE,value:"magenta",children:"M"})}),e(L,{title:g("Green"),placement:"top",children:e(te.Button,{className:gE,value:"green",children:"G"})}),e(L,{title:g("Teal"),placement:"top",children:e(te.Button,{className:mE,value:"teal",children:"T"})}),e(L,{title:g("Blue"),placement:"top",children:e(te.Button,{className:vE,value:"blue",children:"B"})})]})})]})]}),r.length>0&&e("div",{className:eE,children:e(K,{className:"zero-divider"})})]}),e("div",{className:"serach-output-wrapper",children:r.length>0&&e("div",{id:"scrollableDiv",className:tE,children:e(GO,{dataLength:r&&r.length,next:async()=>{h||(d(!0),b({query:s,page:f}).then(e=>{e&&e.data&&e.data.results&&i(t=>[...t,...e.data.results]),d(!1),p(e=>e+1)}).catch(()=>{d(!1)}))},hasMore:!!r,endMessage:t(K,{plain:!0,children:[g("That`s all we could find.")," 🤐"]}),scrollableTarget:"scrollableDiv",style:{overflow:"visible",display:"flex",gap:20,flexWrap:"wrap"},loader:e(ee,{indicator:bE}),children:r.map((n,r)=>t("div",{className:nE,onClick:()=>C(n.urls,n.links,n.id),children:[e("img",{className:w===n.id?iE:"",width:"310px",src:`${n.urls.raw}&w=644&q=96`,alt:n.description,onLoad:e=>{const t=e.target.parentNode;t&&t instanceof HTMLElement&&t.classList.add(rE)}}),t("p",{className:oE,onClick:e=>e.stopPropagation(),children:[g("Photo by")," ",e("a",{target:"_blank",href:`${n.user.links.html}?utm_source=${null==v?void 0:v.APP_NAME_UNSPLASH}&utm_medium=referral`,rel:"noreferrer",children:n.user.name})," ",g("on")," ",e("a",{target:"_blank",href:`https://unsplash.com/?utm_source=${null==v?void 0:v.APP_NAME_UNSPLASH}&utm_medium=referral`,rel:"noreferrer",children:"Unsplash"})]}),w===n.id&&e(ee,{className:"ant-spin",indicator:e(Ce,{spin:!0})})]},n.id+r))})})})]})},wE=()=>{const{options:e}=ri(),t=e.config;return c((e,n)=>{!1!==(null==t?void 0:t.pushToGTM)&&((e,t)=>{const n=()=>{try{const t=Object.assign(Object.assign({},e),{appLabel:"blocks_app"});window.dataLayer&&"function"==typeof window.dataLayer.push?window.dataLayer.push(t):console.log("Attempting to add to the dataLayer:",e)}catch(e){console.error("Ошибка при вызове GTM:",e)}};t?setTimeout(n,t):n()})(e,n)},[null==t?void 0:t.pushToGTM])};var xE="slideshowContainer",CE="slideshowImage";const _E=({images:t,transitionDuration:n=1e3,frameHeight:r})=>{const[i,s]=o([]),l=()=>{s(e=>e.map((t,n)=>n===e.length-1?Object.assign(Object.assign({},t),{opacity:1}):t))};return a(()=>{if(t.length>0){const e=t[t.length-1];s(t=>[...t,{src:e,opacity:0}]),setTimeout(l,1e3)}else s([])},[t]),e("div",{className:xE,style:{height:r,minHeight:130},children:i.map((t,r)=>e("img",{src:`data:image/jpeg;base64, ${t.src}`,alt:`Slide ${r+1}`,className:CE,style:{opacity:t.opacity,transition:`opacity ${n}ms linear`,display:"block"}},r))})};"function"==typeof SuppressedError&&SuppressedError;const SE=t=>{var{className:n,style:r,color:i,text:o,bordered:a}=t,s=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(t,["className","style","color","text","bordered"]);const l=o||"";return e(ne,Object.assign({style:r,color:i,bordered:a,className:n},s,{children:l}))},AE=({text:n,counter:r,limits:i,wrapperStyles:o})=>{const{t:a}=An(),{options:s}=ri(),l=s.config,{token:c}=k.useToken(),u=+i>0,h=!u||r<+i,d=(null==l?void 0:l.billingPageUrl)||"/billing",f=r+" "+a("of")+" "+(u?i:"∞")+" "+(n||a("tests",{count:i}))+" "+a("was used",{count:r});return t("div",{className:"limits-couter-wrapper",style:o,children:[e(SE,{bordered:!1,text:f,className:"limit-counter",style:{color:h?c.colorText:"white"},color:h?c.colorFillSecondary:"rgb(255, 77, 79)"}),u&&e("div",{style:{fontSize:14,textDecoration:"underline",cursor:"pointer"},onClick:()=>window.location.assign(d),children:a("Need more?")})]})};var kE={imageAi:"imageAi",imageItem:"imageItem",textAreaInputHybrid:"textAreaInputHybrid",loading:"loading",carousel:"carousel",arrow:"arrow",arrowNext:"arrowNext",arrowPrev:"arrowPrev",arrowBtn:"arrowBtn",arrowBtnNext:"arrowBtnNext",arrowBtnPrev:"arrowBtnPrev",row:"row",inputAffixWrapper:"inputAffixWrapper",textarea:"textarea",inputIcon:"inputIcon"};const TE=f(({className:t,onClick:n})=>e("div",{className:`${kE.arrow} ${kE.arrowNext} ${t||""}`,onClick:n,children:e(z,{className:`${kE.arrowBtn} ${kE.arrowBtnNext}`,size:"large",icon:e(_e,{})})}));TE.displayName="SampleNextArrow";const IE=f(({className:t,onClick:n})=>e("div",{className:`${kE.arrow} ${kE.arrowPrev} ${t||""}`,onClick:n,children:e(z,{className:`${kE.arrowBtn} ${kE.arrowBtnPrev}`,size:"large",icon:e(Se,{})})}));IE.displayName="SamplePrevArrow";const OE=({customRequest:n,aiTabRef:r,inputAiRef:i,isImageUploaded:s,setIsImageUploaded:l,aiImageRequest:u,setAiImageRequest:d,imageAiList:f,setImageAiList:p,isLoadingAi:g,setIsLoadingAi:m})=>{const{t:v}=An(),[b,y]=o("auto"),{aiImageCounter:w,currentAiImgLimits:x,loadingDuringGeneration:C,requestStatus:_,handleGenerate:S,convertBase64ToFile:A,isShiftPressed:k,setIsShiftPressed:T,limitsInPlugin:I}=function({setFrameHeight:e,customRequest:t,aiTabRef:n,isImageUploaded:r,setIsImageUploaded:i,aiImageRequest:s,imageAiList:l,setImageAiList:u,isLoadingAi:d,setIsLoadingAi:f}){const{t:p}=An(),{options:g}=ri(),m=g.config,v=hi(),b=wE(),{messages:y}=g.config,[w,x]=o([]),[C,_]=o(0),[S,A]=o(null),[k,T]=o(!1),[I,O]=o(p("Evaluating the task")),[E,P]=o(!1);a(()=>{x(y)},[y]),a(()=>{l.length||S||x([])},[l,S]);const M=h(()=>(console.log("sendAIImageRequest"),m&&"function"==typeof(null==m?void 0:m.sendAIImageRequest)?null==m?void 0:m.sendAIImageRequest:()=>Promise.resolve({})),[m]),F=c(e=>{"error"!==e.status&&"Canceled"!==e.status?e.images?(O(String(e.status)),100===e.progress&&(f(!1),u(e.images),A(null),P(!1))):(u([String(e.data)]),100===e.progress&&f(!1)):(f(!1),P(!1),v.error({message:p("Something went wrong, please try again"),placement:"bottomRight",description:String(S)||void 0}))},[u,O,p,f,S,v,P]);a(()=>{w.length>1&&F(w[w.length-1])},[F,w]);const j=h(()=>{if(m&&"function"==typeof(null==m?void 0:m.sseQuery)){const e=null==m?void 0:m.sseQuery;return t=>e(t)}return e=>{}},[m]),D=h(()=>m&&"object"==typeof(null==m?void 0:m.handleLimitUsageEmitter)?null==m?void 0:m.handleLimitUsageEmitter:{fire:()=>{}},[m]),R=null==m?void 0:m.elementId,{projectId:L}=m,{limits:z}=(null==m?void 0:m.limits)?m:{limits:{ai_img_limit:0}},{ai_img_limit:N}=z,B=N>0&&C>=N,V=!(!(null==m?void 0:m.limits)||!m.counters)&&Qr,U=c(()=>{D.fire({name:"AiImgCount",count:C+1})},[D,C]),H=h(()=>!B&&!V,[B,V,C,N]),W=c(async()=>{console.log("generateImage"),O(p("Evaluating the task")),""===s||d||(f(!0),P(!0),u([]),b({event:"submit_form",action:"ai_image_generation",entity_id:R,project_id:L}),M({body:{project_id:L,request:"create-image",connection:"midjourney",message:s}}).then(e=>{var t,n,r;const{data:i,error:o}=e||{};if(o)throw o;const a=i;if(401===(null==a?void 0:a.status)||401===(null===(t=null==a?void 0:a.data)||void 0===t?void 0:t.status))throw new Error("ERROR");if(200===(null==a?void 0:a.status)||200===(null===(n=null==a?void 0:a.data)||void 0===n?void 0:n.status)){const e=(null==a?void 0:a.task)||(null===(r=null==a?void 0:a.data)||void 0===r?void 0:r.task);(null==e?void 0:e.id)&&(O(e.message),A(e.id)),(null==a?void 0:a.message)&&v.success({message:a.message,placement:"bottomRight",description:s}),j({task_id:null==e?void 0:e.id,entity_id:R})}else f(!1),P(!1),v.error({message:(null==a?void 0:a.message)||p("Something went wrong, please try again"),placement:"bottomRight",description:s})}).catch(e=>{f(!1),P(!1);const t=e;return((null==t?void 0:t.error)||(null==t?void 0:t.data))&&(null==v||v.error({message:p("Something went wrong, please try again"),placement:"bottomRight",description:s})),t}))},[s,d,f,P,u,b,R,L,M,v,j,p]),Y=c(()=>{H&&W()},[H,V,_,U,W,v,p]);a(()=>{},[m,V]);const $=c(e=>{if(!r){i(!0);const n=e.match(/^data:image\/([A-Za-z-+/]+);base64,(.+)$/);if(!n)return;const r=n[1],o=n[2],a=atob(o),s=new Array(a.length);for(let e=0;e<a.length;e++)s[e]=a.charCodeAt(e);const l=new Uint8Array(s),c=new Blob([l],{type:`image/${r}`}),u=new File([c],"image.jpeg",{type:c.type,lastModified:Date.now()});t({file:u})}},[r,i,t]);return a(()=>{(d||l.length>0)&&setTimeout(()=>{let t=350;n.current&&(t=n.current.offsetHeight-120),e(t)},0)},[n,l.length,d,e]),{aiImageCounter:C,setAiImageCounter:_,currentAiImgLimits:N,isFieldsDisabled:B,canGenerateImage:H,aiImageRequest:s,imageAiList:l,setImageAiList:u,isLoadingAi:d,setIsLoadingAi:f,loadingDuringGeneration:E,setLoadingDuringGeneration:P,requestStatus:I,setRequestStatus:O,handleGenerate:Y,handleLimitAiImgCount:U,convertBase64ToFile:$,isShiftPressed:k,setIsShiftPressed:T,currentReqId:S,setCurrentReqId:A,limitsInPlugin:V}}({setFrameHeight:y,customRequest:n,aiTabRef:r,isImageUploaded:s,setIsImageUploaded:l,aiImageRequest:u,imageAiList:f,setImageAiList:p,isLoadingAi:g,setIsLoadingAi:m}),[E,M]=o(!1),F=c(()=>M(!0),[]),j=c(()=>M(!1),[]),D=c(e=>d(e.target.value),[d]),R=c(e=>{"Shift"===e.key?T(!0):"Enter"!==e.key||k||(e.preventDefault(),S())},[k,S,T]),L=c(e=>{"Shift"===e.key&&T(!1)},[T]);return t("div",{className:kE.imageAi,children:[I&&e(AE,{text:"images",counter:w,limits:x,wrapperStyles:{marginTop:-25}}),e(H,{gutter:24,className:kE.row,children:e(W,{span:24,children:e(O.Item,{children:t("span",{className:`ant-input-affix-wrapper ant-input-affix-wrapper-lg ${kE.inputAffixWrapper}${E?" ant-input-affix-wrapper-focused":""}`,children:[e(P.TextArea,{ref:i,onKeyDown:R,onKeyUp:L,onFocus:F,onBlur:j,autoSize:!0,allowClear:!0,className:`${kE.textAreaInputHybrid} ${kE.textarea}`,placeholder:"Generate image",value:u,onChange:D,spellCheck:"false"}),e("span",{className:`ant-input-suffix ${kE.inputSuffix}`,children:g||C?e(Ce,{className:`${kE.inputIcon} input-icon`,spin:!0}):e(Fi,{className:`${kE.inputIcon} input-icon`,onClick:S})})]})})})}),(g||f.length>0)&&t(re,{dotPosition:"top",arrows:!0,nextArrow:e(TE,{}),prevArrow:e(IE,{}),className:kE.carousel,infinite:!1,children:[g&&!f.length&&e("div",{className:kE.loading,children:t("div",{className:"spin",children:[e(Ce,{style:{fontSize:48},spin:!0}),e("p",{className:"status",children:_})]})}),f.length>0&&f.map((n,r)=>t("div",{className:kE.imageItem,children:[e(_E,{images:f,frameHeight:b}),e("div",{className:"buttons",children:f.length>0&&!g&&e(z,{onClick:()=>A(`data:image/jpeg;base64, ${n}`),icon:e(Ae,{}),children:v("Use this variant")})})]},r))]})]})},EE=e=>{(null==e?void 0:e.customTheme)&&((e={})=>{const t=document.querySelector("head");if(!t)return;const n=document.createElement("style");if(n.type="text/css",n.dataset.themeVariablesFm="true",n.setAttribute("data-file-manager","true"),Object.entries(e).length){let r="";Object.entries(e).forEach(([e,t])=>{"object"!=typeof t&&(r+=`\t--${e}: ${t};\n`)}),r=`.em-filemanager {\n${r}}`,n.appendChild(document.createTextNode(r));const i=t.querySelector('[data-theme-variables-fm="true"]');i?t.replaceChild(n,i):t.insertBefore(n,t.firstChild)}})(null==e?void 0:e.customTheme)},{Sider:PE,Content:ME}=Q,FE={keywords:"",color:"",orientation:""},jE={keywords:""},DE=()=>{const s=li(),l=ui(),h=(()=>{var e,t;const{state:n,actions:r,options:i}=ri(),{selectedFolder:o,pathHistory:a,folders:s}=n,{t:l}=An(),{setSelectedFolder:u,setPathHistory:h}=r,d=c(()=>{var e;return`em_fm:lastFolder:${(null===(e=null==i?void 0:i.config)||void 0===e?void 0:e.projectId)||"default"}`},[null===(e=null==i?void 0:i.config)||void 0===e?void 0:e.projectId]),f=c((e,t=new Set)=>{if(t.has(e))return console.warn(`Обнаружен цикл в пути к папке с id=${e}`),[];const n=(Array.isArray(s)?s:[]).find(t=>t.id===e);if(!n)return[];const r=new Set(t);return r.add(e),n.parentId?n.parentId===n.id?(console.warn(`Обнаружена циклическая зависимость: папка ${n.id} является родителем самой себя`),[{id:n.id,name:n.name+" (ошибка)"}]):[...f(n.parentId,r),{id:n.id,name:n.name}]:[{id:n.id,name:n.name}]},[s]),p=c(e=>{var t;if("undefined"==typeof window)return;const n=!1!==(null===(t=null==i?void 0:i.config)||void 0===t?void 0:t.rememberLastFolder),r=d();try{if(!n)return void localStorage.removeItem(r);e?localStorage.setItem(r,e):localStorage.removeItem(r)}catch(e){console.warn("localStorage недоступен для сохранения последней папки")}},[d,null===(t=null==i?void 0:i.config)||void 0===t?void 0:t.rememberLastFolder]),g=c(e=>{if("folders"===e){const e=[{id:"folders",name:l("Folders")}];return null==h||h(e),void(i.onPathChange&&i.onPathChange([]))}if(!(Array.isArray(s)?s:[]).find(t=>t.id===e))return void console.warn("⚠️ Папка не найдена:",e);const t=f(e),n=[{id:"folders",name:l("Folders")},...t];null==h||h(n),i.onPathChange&&i.onPathChange(n.map(e=>e.name))},[s,f,h,i,l]),m=c(e=>{const t="folders"===e?null:e;t!==o&&(null==u||u(t),p(t),g(e))},[p,o,u,g]),v=c(e=>{if(-1===e)null==u||u(null),null==h||h([{id:"folders",name:l("Folders")}]),i.onPathChange&&i.onPathChange([]);else{const t=a.slice(0,e+1),n=t[t.length-1],r="folders"===n.id?void 0:n.id;null==u||u(r||null),null==h||h(t),i.onPathChange&&i.onPathChange(t.map(e=>e.name))}},[i,a,h,u,l]),b=c(e=>{if(!e.isFolder)return;null==u||u(e.id);const t={id:e.id,name:e.name};if(h){const e=[...a,t];h(e)}if(i.onPathChange){const t=[...a.map(e=>e.name),e.name];i.onPathChange(t)}},[i,a,h,u]);return{state:{selectedFolder:o,pathHistory:a},actions:{handleFolderSelect:m,handleBreadcrumbClick:v,handleItemClick:b},selectedFolder:o,pathHistory:a,handleFolderSelect:m,handleBreadcrumbClick:v,handleItemClick:b}})(),d=(()=>{const{state:e,actions:t}=ri(),{pagination:n}=e,{setPagination:r}=t,i=c((e,t)=>{const i=t||n.pageSize;null==r||r({current:e,pageSize:i,total:n.total})},[n.pageSize,n.total,r]);return{state:{pagination:n},actions:{handlePaginationChange:i}}})(),f=(()=>{const[e,t]=r.useState(()=>{const e=localStorage.getItem(di);return e?Math.max(290,parseInt(e,10)):298}),[n,i]=r.useState(!1),[o,a]=r.useState(!1),[s,l]=r.useState(0),c=r.useCallback(()=>{console.log("Double click: Resetting to default width"),t(298),localStorage.setItem(di,298..toString())},[]),u=r.useCallback(n=>{n.preventDefault(),n.stopPropagation(),i(!0),document.body.classList.add("resizing");const r=n.clientX,o=e;let s=o;const c=e=>{e.preventDefault();const n=Math.max(Math.min(o+e.clientX-r,600),290);s=n,t(n),l(e.clientX),a(!0)},u=()=>{i(!1),document.body.classList.remove("resizing"),a(!1),localStorage.setItem(di,s.toString()),document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",u)};document.addEventListener("mousemove",c),document.addEventListener("mouseup",u)},[e]);return r.useEffect(()=>()=>{document.body.classList.remove("resizing")},[]),{sidebarWidth:e,isResizing:n,showResizeGuide:o,resizeGuidePosition:s,handleResizeStart:u,handleDoubleClick:c}})(),p=(()=>{const[e,t]=o([]),[n,r]=o(!1),[i,a]=o(!1),s=u(0),l=c(()=>(s.current+=1,`upload_${s.current}_${Date.now()}`),[]),h=c(e=>`${(e.size/1024).toFixed(2)} КБ`,[]),d=c(e=>{const n=e.map(e=>({id:l(),name:e.name,size:h(e),status:"uploading",progress:0}));return t(n),r(!0),a(!1),n.map(e=>e.id)},[l,h]),f=c((e,n)=>{t(t=>t.map(t=>t.id===e?Object.assign(Object.assign({},t),{progress:Math.min(100,Math.max(0,n))}):t))},[]),p=c(e=>{t(t=>t.map(t=>t.id===e?Object.assign(Object.assign({},t),{status:"success",progress:100}):t))},[]),g=c((e,n)=>{t(t=>t.map(t=>t.id===e?Object.assign(Object.assign({},t),{status:"error",error:n}):t))},[]),m=c(()=>{r(!1),a(!1),setTimeout(()=>{t([])},300)},[]),v=c(()=>{a(e=>!e)},[]),b=c(e=>{t(t=>{const n=t.filter(t=>t.id!==e);return 0===n.length&&setTimeout(()=>{r(!1),a(!1)},100),n})},[]),y=e.length,w=e.filter(e=>"success"===e.status||"error"===e.status).length;return{uploadFiles:e,isUploadVisible:n,isUploadMinimized:i,totalFiles:y,completedFiles:w,startUpload:d,updateProgress:f,markAsSuccess:p,markAsError:g,closeUpload:m,minimizeUpload:v,insertFile:b}})(),g=ci(),{t:m}=An(),v=i.useRef(null),{folders:b,loading:y}=s.state,{fetchFolders:w,fetchChildFolders:x,handleCreateFolder:C,handleModalOk:_,handleModalCancel:S,generateMenuItems:A}=s.actions,k=Gi(w),{files:T,selectedFiles:I,loading:O,isRenamingFile:E,fileToRename:P}=l.state,{fetchFiles:M,handleDeleteFile:F,handleDeleteFolder:j,handleAddFile:D,handleAddFileByUrl:R,uploadFileWithProvider:L,toggleFileSelection:N,showRenameModal:B,handleRenameCancel:V,handleRenameOk:U,handleDroppedFiles:H,showMoveModal:W,handleMoveCancel:Y,handleMoveOk:$,showDeleteConfirm:G,handleDeleteConfirmCancel:X,handleDeleteConfirmOk:q}=l.actions,{selectedFolder:Z,pathHistory:J}=h.state,{handleFolderSelect:ee,handleBreadcrumbClick:te,handleItemClick:ne}=h.actions,{pagination:re}=d.state,ie=si(M),{searchTerm:oe,sortBy:ae,sortOrder:se}=ie.state,{handleSearch:le,handleSort:ce,handlePaginationChange:ue}=ie.actions,he=(({files:e,selectedFiles:t,fetchFiles:n,selectedFolder:i})=>{const o=hi(),{options:a,actions:s,state:l}=r.useContext(ni),{setActiveLibraryItem:c}=s,{activeLibraryItem:u}=l,[h,d]=r.useState(!1),[f,p]=r.useState(null);r.useEffect(()=>{console.log(h)},[h]);const g=r.useCallback(e=>{var t;if(e.type&&e.type.startsWith("image/"))return!0;if(e.extension){const t=e.extension.toLowerCase();return ei.includes(t)}const n=null===(t=e.name.split(".").pop())||void 0===t?void 0:t.toLowerCase();return!!n&&ei.includes(n)},[]),m=r.useCallback(async e=>{var t,n,r,i;const{dataProviders:o}=a;if(console.log("🔧 saveFileToServer: dataProviders доступны:",{hasUpdateFile:!!(null==o?void 0:o.updateFile),hasUploadFile:!!(null==o?void 0:o.uploadFile),hasThumbnail:!!e.thumbnail,fileId:e.id}),!1!==(null===(n=null===(t=a.config)||void 0===t?void 0:t.features)||void 0===n?void 0:n.enableUpdateFile)&&(null==o?void 0:o.updateFile)&&e.thumbnail)try{let t=e.type||"image/png";if(e.thumbnail.startsWith("data:")){const n=e.thumbnail.match(/^data:([^;]+)/);n&&n[1].startsWith("image/")&&(t=n[1])}const n=e.thumbnail.split(",")[1],r=atob(n),i=new Array(r.length);for(let e=0;e<r.length;e++)i[e]=r.charCodeAt(e);const a=new Uint8Array(i),s=new Blob([a],{type:t});console.log("Using updateFile method with:",{fileId:e.id,mimeType:t,blobType:s.type});const l=t.split("/")[1],c=e.name.substring(0,e.name.lastIndexOf("."))+"."+l;return await o.updateFile(e.id,{name:c,type:t,data:s,thumbnail:e.thumbnail,extension:l})}catch(e){return console.error("Ошибка при обновлении файла через updateFile:",e),null}else if((null==o?void 0:o.uploadFile)&&e.thumbnail)try{let t=e.type||"image/png";if(e.thumbnail.startsWith("data:")){const n=e.thumbnail.match(/^data:([^;]+)/);n&&n[1].startsWith("image/")&&(t=n[1])}const n=e.thumbnail.split(",")[1],r=atob(n),i=new Array(r.length);for(let e=0;e<r.length;e++)i[e]=r.charCodeAt(e);const a=new Uint8Array(i),s=new Blob([a],{type:t});console.log("Using uploadFile method as fallback with:",{mimeType:t,blobType:s.type}),await o.uploadFile(Object.assign(Object.assign({},e),{type:t,data:s,size:e.size||0}))}catch(e){return console.error("Ошибка при сохранении файла через uploadFile:",e),null}else if(!1!==(null===(i=null===(r=a.config)||void 0===r?void 0:r.features)||void 0===i?void 0:i.enableRenameFile)&&(null==o?void 0:o.renameFile))try{return await o.renameFile(e.id,e.name)}catch(e){return console.error("Ошибка при переименовании файла:",e),null}return console.warn("DataProvider для обновления файлов не настроен"),null},[a]),v=r.useCallback(n=>{let r;if(console.log("🎨 handleEdit ВЫЗВАНА!",{fileForEdit:n,selectedFilesSize:t.size}),n)console.log("fileForEdit",n),r=n;else{if(1!==t.size)return;const n=Array.from(t)[0];if(r=e.find(e=>e.id===n),!r||r.isFolder||!g(r))return}console.log("🎨 usePixieEditor: Открываем редактор для файла:",r),c&&c(Jr),console.log("🎨 usePixieEditor: Устанавливаем editingFile"),p(r),console.log("🎨 usePixieEditor: Устанавливаем isPixieEditorVisible = true"),d(!0),console.log("🎨 usePixieEditor: Редактор должен открыться")},[t,e,g,d,c]),b=r.useCallback(()=>{console.log("🎨 usePixieEditor: Закрываем редактор"),c&&u===Jr&&c(Xr),d(!1),p(null),console.log("🎨 usePixieEditor: Редактор закрыт")},[u,c]),y=r.useCallback(async e=>{console.log("Файл обновлен:",e);try{const t=await m(e);if(t)return await n({folderId:i||void 0}),o.success({message:"Успех",description:"Изображение успешно обновлено"}),b(),a.onEditorOk&&a.onEditorOk(t),await n({folderId:i||""}),b(),t}catch(e){console.error("Ошибка при сохранении файла:",e),o.error({message:"Ошибка",description:`Не удалось сохранить изменения: ${e instanceof Error?e.message:"Неизвестная ошибка"}`})}},[m,a,n,i,o,b]);return{isPixieEditorVisible:h,editingFile:f,handleEdit:v,handlePixieEditorSave:y,handlePixieEditorClose:b}})({files:T||[],selectedFiles:I||new Set,fetchFiles:M,selectedFolder:Z||null}),de=i.useCallback(async()=>{var e;await q(),await w(),await(null===(e=v.current)||void 0===e?void 0:e.refreshFileCounts())},[w,q]),fe=i.useCallback(async()=>{var e;await $(),await(null===(e=v.current)||void 0===e?void 0:e.refreshFileCounts())},[$]),pe=i.useCallback(async()=>{var e,t,n;await(null===(t=(e=l.actions).handleCopyOk)||void 0===t?void 0:t.call(e)),await(null===(n=v.current)||void 0===n?void 0:n.refreshFileCounts())},[l.actions.handleCopyOk]),ge=i.useCallback(async()=>{let e=null;await D({onStart:t=>{const n=p.startUpload([t]);e=n[0],console.warn("🚀 onStart: файл запущен",{fileName:t.name,fileId:e})},onProgress:(t,n)=>{e&&(p.updateProgress(e,n),console.warn("🔍 onProgress:",{fileName:t,fileId:e,progress:n}))},onComplete:async t=>{var n;e?(p.markAsSuccess(e),console.warn("✅ onComplete: markAsSuccess вызван",{fileName:t,fileId:e}),await(null===(n=v.current)||void 0===n?void 0:n.refreshFileCounts())):console.error("❌ currentFileId отсутствует для onComplete:",t)},onError:(t,n)=>{e&&(p.markAsError(e,n),console.warn("❌ onError: markAsError вызван",{fileName:t,fileId:e,error:n}),e=null)}})},[D,p]),me=i.useCallback(async()=>{var e;await R(),await(null===(e=v.current)||void 0===e?void 0:e.refreshFileCounts())},[R]),ve=i.useCallback(async e=>{var t;await F(e),await(null===(t=v.current)||void 0===t?void 0:t.refreshFileCounts())},[F]),be=i.useCallback(async e=>{var t;if(H){const n=p.startUpload(e);console.warn("🚀 Drag&Drop: файлы запущены",{fileCount:e.length,fileIds:n}),e.forEach(async(e,t)=>{const r=n[t];if(!r)return;let i=0;const o=setInterval(()=>{i=Math.min(i+10+Math.floor(Date.now()%10),85),p.updateProgress(r,i)},200);setTimeout(()=>{clearInterval(o)},2e3)}),await H(e),n.forEach(e=>{p.updateProgress(e,100),p.markAsSuccess(e)}),await(null===(t=v.current)||void 0===t?void 0:t.refreshFileCounts())}},[H,p]),ye=i.useCallback(async e=>{var t;await j(e),await w(),await(null===(t=v.current)||void 0===t?void 0:t.refreshFileCounts())},[j,w]),we=(({files:e,selectedFiles:t,toggleFileSelection:n,showRenameModal:i,showMoveModal:o,showCopyModal:a,handleDeleteFile:s,handleDeleteFolder:l,showDeleteConfirm:c,onEdit:u})=>{const h=r.useCallback(()=>{t&&t.size>0&&t.forEach(e=>{n(e)})},[t,n]),d=r.useCallback(e=>{if(t&&1===t.size||e){const n=e||Array.from(t)[0];i(n)}},[t,i]),f=r.useCallback(n=>{if(t&&t.size>0||(null==n?void 0:n.id)){if(c)return void c();(n?[n.id]:t).forEach(t=>{const n=e.find(e=>e.id===t);console.log("item",n),n?n.isFolder?l(t):s(t):console.warn(`Объект с ID ${t} не найден в списке файлов`)})}},[t,e,s,l,c]);return{handleClearSelection:h,handleRename:d,handleDeleteSelected:f,handleCopy:r.useCallback(()=>{a()},[a]),handleMove:r.useCallback(()=>{o()},[o]),handleEdit:r.useCallback(()=>{console.log("onEdit"),u()},[u])}})({files:T||[],selectedFiles:I||new Set,toggleFileSelection:N,showRenameModal:B,showMoveModal:W,showCopyModal:l.actions.showCopyModal||(()=>{}),handleDeleteFile:F,handleDeleteFolder:ye,showDeleteConfirm:G,onEdit:he.handleEdit}),xe=y||O,{options:Ce}=i.useContext(ni),_e=null==Ce?void 0:Ce.config;a(()=>{sn(),w()},[w]),i.useEffect(()=>{if(!ee||0===b.length)return;const e=!!(null==_e?void 0:_e.rememberLastFolder),t=`em_fm:lastFolder:${(null==_e?void 0:_e.projectId)||"default"}`;if(e&&"undefined"!=typeof window)try{const e=localStorage.getItem(t);if(e&&b.some(t=>t.id===e))return void ee(e)}catch(e){}Z||ee("folders")},[Z,ee,b,null==_e?void 0:_e.rememberLastFolder,null==_e?void 0:_e.projectId]);const{state:Se,actions:Ae,options:ke}=i.useContext(ni),{form:Te,urlForm:Ie,renameForm:Oe,moveForm:Ee,renameFolderForm:Pe,copyForm:Me,isModalVisible:Fe,isUrlModalVisible:je,isMoveModalVisible:De,isRenameFolderModalVisible:Re,isCopyModalVisible:Le,isDeleteConfirmVisible:ze,folderToRename:Ne,activeLibraryItem:Be}=Se,{setIsUrlModalVisible:Ve,setSortField:Ue,setActiveLibraryItem:He}=Ae,{config:We}=ke,{handleRenameFolderCancel:Ye,handleRenameFolderOk:$e}=k.actions,Ge=c(e=>{ue(e.current||re.current,e.pageSize||re.pageSize)},[ue,re]),Xe=i.useCallback(e=>{const{sortBy:t,sortOrder:n}=(e=>{const[t,n]=e.split("-");return{sortBy:t,sortOrder:n}})(e);ce(t,n)},[ce]),[Ke,qe]=o(jE),[Ze,Je]=o([]),Qe=u(null),[et,tt]=o(FE),[nt,rt]=o([]),it=u(null),[ot,at]=o(""),[st,lt]=o([]),ct=i.useRef(void 0),[ut,ht]=o(!1),[dt,ft]=o(!1),pt=i.useRef(null),gt=i.useRef(null),mt=c(async()=>{const e=null==We?void 0:We.fileForEdit;if(ct.current!==e){ct.current=e;try{if(!(Be===Jr&&e&&!he.editingFile))return;if("string"==typeof e){if(e.startsWith("data:"))return void(null==he||he.handleEdit({thumbnail:e}));const t=await g.handleAddFileByUrl(e,!0);if(!t)throw new Error("Не удалось загрузить файл");ct.current===e&&(null==he||he.handleEdit(t))}}finally{ct.current===e&&(ct.current=null)}}},[null==We?void 0:We.fileForEdit,Be,he,g]);a(()=>{mt()},[mt]),a(()=>{var e,t,n;Be===Xr?(console.warn("reset requests"),Je([]),qe(jE),rt([]),tt(FE),lt([]),at(""),ft(!1),ht(!1)):Be===Zr?null===(e=gt.current)||void 0===e||e.focus():Be===Kr?null===(t=Qe.current)||void 0===t||t.focus():Be===qr&&(null===(n=it.current)||void 0===n||n.focus())},[Be]);const vt=i.useCallback(async()=>{var e;await $e(),await(null===(e=v.current)||void 0===e?void 0:e.refreshFileCounts())},[$e]),bt=I.size,yt=i.useMemo(()=>{var e,t;if(1!==bt)return!1;const n=Array.from(I)[0],r=T.find(e=>e.id===n);if(!r||r.isFolder)return!1;let i=!1;if(r.type&&r.type.startsWith("image/"))i=!0;else if(r.extension){const e=r.extension.toLowerCase();i=ei.includes(e)}else{const t=null===(e=r.name.split(".").pop())||void 0===e?void 0:e.toLowerCase();i=!!t&&ei.includes(t)}return console.log("isImageSelected проверка:",{fileName:r.name,fileType:r.type,fileExtension:r.extension,nameExtension:null===(t=r.name.split(".").pop())||void 0===t?void 0:t.toLowerCase(),isImage:i,IMAGE_EXTENSIONS:ei}),i},[bt,I,T]);return t(Q,{className:"file-manager__layout",children:[f.showResizeGuide&&e("div",{className:"resize-guide",style:{left:`${f.resizeGuidePosition}px`}}),t(Q,{className:"file-manager__content",children:[t(PE,{width:320,theme:"light",className:"file-manager-sider",children:[e(lo,{ref:v,selectedFolder:Z||"folders",generateMenuItems:A,onFolderSelect:e=>null==ee?void 0:ee(e),folders:b||[],fetchFolders:w,fetchChildFolders:x,handleAddFile:ge,setIsUrlModalVisible:e=>null==Ve?void 0:Ve(e),handleDeleteFolder:ye,handleCreateFolder:C,activeLibraryItem:Be,setActiveLibraryItem:e=>null==He?void 0:He(e)}),e("div",{className:"sidebar-resizer "+(f.isResizing?"resizing":""),onMouseDown:f.handleResizeStart,onDoubleClick:f.handleDoubleClick,children:e("div",{className:"sidebar-resizer-indicator"})})]}),e(Q,{className:"file-manager__main-content",children:t(ME,{className:"main-content",ref:pt,children:[e(BO,{activeLibraryItem:Be}),e(K,{className:"zero-divider"}),Be===Xr&&e(Yi,{searchTerm:oe,sortField:Se.sortField||"name",setSortField:e=>null==Ue?void 0:Ue(e),pathHistory:J||[],handleBreadcrumbClick:e=>null==te?void 0:te(e),handleAddFile:ge,setIsUrlModalVisible:e=>null==Ve?void 0:Ve(e),files:T||[],handleSearch:le,handleSort:ce,sortBy:ae,sortOrder:se,handleSortOptionChange:Xe,pagination:re,setPagination:Ge,loading:xe,handleItemClick:e=>null==ne?void 0:ne(e),handleDeleteFile:ve,selectedFiles:I||new Set,toggleFileSelection:e=>null==N?void 0:N(e),handleDroppedFiles:be,fileUpload:p,onClearSelection:we.handleClearSelection,onRename:we.handleRename,onCopy:we.handleCopy,onMove:we.handleMove,onDelete:we.handleDeleteSelected,onEdit:he.handleEdit}),Be===Kr&&e(qO,{imageGifList:Ze,setImageGifList:Je,currentReqGif:Ke,setCurrentReqGif:qe,inputRef:Qe,customRequest:R}),Be===qr&&e(yE,{imageStockList:nt,setImageStockList:rt,currentReq:et,setCurrentReq:tt,inputRef:it,customRequest:R}),Be===Zr&&!!(null==We?void 0:We.sseQuery)&&e(OE,{imageAiList:st,setImageAiList:lt,aiImageRequest:ot,setAiImageRequest:at,inputAiRef:gt,customRequest:e=>L(e.file),isLoadingAi:ut,setIsLoadingAi:ht,isImageUploaded:dt,setIsImageUploaded:ft,aiTabRef:pt}),Be===Jr&&e(n,{}),e("div",{children:yt&&t(n,{children:[e(K,{className:"zero-divider"}),e("div",{style:{display:"flex",justifyContent:"right",padding:"17px 24px",alignItems:"center"},children:e(z,{size:"large",type:"primary",style:{height:40,fontSize:18},onClick:()=>{if(ke.onEditorOk){const e=Array.from(I)[0],t=T.find(t=>t.id===e);t&&ke.onEditorOk(t)}},children:m("Choose")})})]})})]})})]}),e($i,{isModalVisible:Fe,handleModalOk:_,handleModalCancel:S,form:Te,selectedFolder:Z||null,folders:b||[],isUrlModalVisible:je,setIsUrlModalVisible:e=>null==Ve?void 0:Ve(e),handleAddFileByUrl:me,urlForm:Ie,isRenameModalVisible:E,handleRenameOk:()=>null==U?void 0:U(),handleRenameCancel:()=>null==V?void 0:V(),renameForm:Oe,fileToRename:P,files:T||[],isMoveModalVisible:De,handleMoveOk:fe,handleMoveCancel:Y,moveForm:Ee,selectedFiles:I||new Set,isRenameFolderModalVisible:Re,handleRenameFolderOk:vt,handleRenameFolderCancel:Ye,renameFolderForm:Pe,folderToRename:Ne,isCopyModalVisible:Le,handleCopyOk:pe,handleCopyCancel:l.actions.handleCopyCancel||(()=>{}),copyForm:Me,isDeleteConfirmVisible:ze,handleDeleteConfirmOk:de,handleDeleteConfirmCancel:()=>null==X?void 0:X(),fetchChildFolders:x}),e(xO,{visible:he.isPixieEditorVisible,onClose:he.handlePixieEditorClose,file:he.editingFile,onSave:he.handlePixieEditorSave}),e(LO,{files:p.uploadFiles,visible:p.isUploadVisible,minimized:p.isUploadMinimized,totalFiles:p.totalFiles,completedFiles:p.completedFiles,onClose:p.closeUpload,onMinimize:p.minimizeUpload,onInsert:p.insertFile})]})},RE=f(({config:r={},onPathChange:o,onChangeSelection:s,onEditorOk:l,searchQuery:c="",sortBySize:h="name",apiEndpoints:d={},customIcons:f,dragDropIcon:p,dataProviders:g,notification:m})=>{const v=i.useMemo(()=>Object.assign({folderTreeLoading:"lazy",expandAllFoldersOnInit:!1,iconStrokeWidth:1.4},r),[r]);i.useEffect(()=>{v.theme&&(e=>{document.documentElement.setAttribute("data-theme",e)})(v.theme),EE(v)},[v]),a(()=>{v.locale&&v.locale!==mr.language&&(console.warn("FileManagerApp: меняем локаль с",mr.language,"на",v.locale),mr.changeLanguage(v.locale)),v.customLocale&&v.locale&&mr.addResourceBundle(v.locale,"translation",v.customLocale,!0,!0)},[v.locale,v.customLocale]);const b=u(null);return e(I,{className:"em-filemanager",children:t(n,{children:[e(T,{getPopupContainer:()=>b.current||document.body,children:e(ii,{options:{apiEndpoints:d,searchQuery:c,sortBySize:h,onPathChange:o,onChangeSelection:s,onEditorOk:l,config:v,customIcons:f,dragDropIcon:p,dataProviders:g,notification:m},children:e(DE,{})})}),e("div",{ref:b,className:"file-manager-modal-root"})]})})});RE.displayName="FileManagerApp";const LE=t=>{var n,r,i;return e(kn,{i18n:mr,children:e(nn,{externalTheme:null!==(r=null===(n=t.config)||void 0===n?void 0:n.theme)&&void 0!==r?r:"light",customThemeToken:null===(i=t.config)||void 0===i?void 0:i.customTheme,children:e(ie,{children:e(RE,Object.assign({},t))})})})},zE=new Map,NE=(t,n)=>{var r;let i;sn();let o={};const a=e=>{const t=!e||"fileManager"!==e.mode&&"imageCenter"!==e.mode&&"plugin"!==e.mode?void 0:e.mode;return"imageCenter"===t?on("imageCenter",e):on(t)};if(t instanceof HTMLElement){i=t;o={config:a(n),apiEndpoints:null==n?void 0:n.apiEndpoints}}else{i=t.element;const e=a(t.config),n=Object.assign(Object.assign({},null===(r=t.config)||void 0===r?void 0:r.apiEndpoints),t.apiEndpoints);o={config:e,currentPath:t.currentPath,onPathChange:t.onPathChange,onChangeSelection:t.onChangeSelection,searchQuery:t.searchQuery,sortBySize:t.sortBySize,apiEndpoints:n,dataProviders:t.dataProviders,customIcons:t.customIcons,dragDropIcon:t.dragDropIcon}}const s=A(i);s.render(e(LE,Object.assign({},o))),zE.set(i.id||`container_${Date.now()}`,s)},BE=e=>{const t=e.id||Object.keys(zE).find(e=>e.startsWith("container_"));if(t&&zE.has(t)){const e=zE.get(t);null==e||e.unmount(),zE.delete(t)}else{console.warn("Не удалось найти корень для размонтирования");try{A(e).unmount()}catch(e){console.error("Ошибка при размонтировании компонента:",e)}}},VE=new Map,UE=r=>{const{onClose:o,onSave:a,dataProviders:s,theme:l}=r,c=i.useMemo(()=>{if(r.file)return r.file;const e=r.name||"edited-image",t=r.extension||(r.type?r.type.split("/")[1]:"png"),n=r.type||`image/${t}`;return{thumbnail:r.imageDataUrl||"",name:e,id:void 0,type:n,extension:t}},[r.file,r.imageDataUrl,r.name,r.extension,r.type]),h=i.useCallback(async e=>{if((null==s?void 0:s.updateFile)&&e.id&&e.thumbnail)try{let t=e.type||"image/png";if(e.thumbnail.startsWith("data:")){const n=e.thumbnail.match(/^data:([^;]+)/);n&&n[1].startsWith("image/")&&(t=n[1])}const n=e.thumbnail.split(",")[1],r=atob(n),i=new Array(r.length);for(let e=0;e<r.length;e++)i[e]=r.charCodeAt(e);const o=new Uint8Array(i),a=new Blob([o],{type:t}),l=t.split("/")[1],c=e.name.substring(0,e.name.lastIndexOf("."))+"."+l;e=await s.updateFile(e.id,{name:c,type:t,data:a,thumbnail:e.thumbnail,extension:l})}catch(e){console.error("Standalone Pixie: updateFile error",e)}return a&&await a(e),e},[a,s]),d=u(null);return e(I,{className:"em-filemanager",children:t(n,{children:[e(T,{getPopupContainer:()=>d.current||document.body,children:e(kn,{i18n:mr,children:e(nn,{externalTheme:null!=l?l:"light",children:e(ie,{children:e(ii,{options:{dataProviders:s,config:{theme:null!=l?l:"light",locale:r.locale}},children:e(xO,{visible:!0,onClose:o,file:c,onSave:h})})})})})}),e("div",{ref:d,className:"file-manager-modal-root"})]})})},HE=t=>{sn();const n=t.element,r=A(n);r.render(e(UE,Object.assign({},t))),VE.set(n.id||`pixie_container_${Date.now()}`,r)},WE=e=>{const t=Array.from(VE.keys()).find(e=>e.startsWith("pixie_container_")),n=e.id||t;if(n&&VE.has(n)){const e=VE.get(n);null==e||e.unmount(),VE.delete(n)}else{console.warn("Не удалось найти корень Pixie для размонтирования");try{A(e).unmount()}catch(e){console.error("Ошибка при размонтировании Pixie:",e)}}},YE=e=>{var t,n;const{mode:r,element:i,fileManager:o,pixieEditor:a,theme:s,dataProviders:l}=e;let c,u;const h={unmount:()=>{c&&BE(c),u&&WE(u)},unmountFileManager:void 0,unmountPixieEditor:void 0};switch(r){case"fileManager":c=i,NE(i,Object.assign(Object.assign({},null==o?void 0:o.config),{theme:s||(null===(t=null==o?void 0:o.config)||void 0===t?void 0:t.theme),apiEndpoints:null==o?void 0:o.apiEndpoints})),h.unmountFileManager=()=>BE(c);break;case"pixieEditor":u=i,HE(Object.assign({element:i,theme:s||(null==a?void 0:a.theme),dataProviders:l||(null==a?void 0:a.dataProviders)},a)),h.unmountPixieEditor=()=>WE(u);break;case"both":{const e=document.createElement("div");e.id="file-manager-container",e.style.cssText="height: 50%; border-bottom: 1px solid #d9d9d9;";const t=document.createElement("div");t.id="pixie-editor-container",t.style.cssText="height: 50%;",i.appendChild(e),i.appendChild(t),c=e,u=t,NE(c,Object.assign(Object.assign({},null==o?void 0:o.config),{theme:s||(null===(n=null==o?void 0:o.config)||void 0===n?void 0:n.theme),apiEndpoints:null==o?void 0:o.apiEndpoints})),HE(Object.assign({element:u,theme:s||(null==a?void 0:a.theme),dataProviders:l||(null==a?void 0:a.dataProviders)},a)),h.unmountFileManager=()=>BE(c),h.unmountPixieEditor=()=>WE(u);break}}return h};var $E={init:NE,unmount:BE,initPixieEditor:HE,unmountPixieEditor:WE,initFileManager:YE};export{Yi as FileContent,RE as FileManagerApp,LE as FileManagerAppWithContext,$i as FileModals,lo as FolderSidebar,UE as PixieOnlyApp,$E as default,NE as init,YE as initFileManager,HE as initPixieEditor,sn as installResizeObserverErrorHandler,ln as uninstallResizeObserverErrorHandler,BE as unmount,WE as unmountPixieEditor};
|
|
95
|
+
var VO=function(e,t){return VO=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},VO(e,t)};var UO=function(){return UO=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},UO.apply(this,arguments)};var HO="Pixel",WO="Percent",YO={unit:WO,value:.8};function $O(e){return"number"==typeof e?{unit:WO,value:100*e}:"string"==typeof e?e.match(/^(\d*(\.\d+)?)px$/)?{unit:HO,value:parseFloat(e)}:e.match(/^(\d*(\.\d+)?)%$/)?{unit:WO,value:parseFloat(e)}:(console.warn('scrollThreshold format is invalid. Valid formats: "120px", "50%"...'),YO):(console.warn("scrollThreshold should be string or number"),YO)}var GO=function(e){function t(t){var n=e.call(this,t)||this;return n.lastScrollTop=0,n.actionTriggered=!1,n.startY=0,n.currentY=0,n.dragging=!1,n.maxPullDownDistance=0,n.getScrollableTarget=function(){return n.props.scrollableTarget instanceof HTMLElement?n.props.scrollableTarget:"string"==typeof n.props.scrollableTarget?document.getElementById(n.props.scrollableTarget):(null===n.props.scrollableTarget&&console.warn("You are trying to pass scrollableTarget but it is null. This might\n happen because the element may not have been added to DOM yet.\n See https://github.com/ankeetmaini/react-infinite-scroll-component/issues/59 for more info.\n "),null)},n.onStart=function(e){n.lastScrollTop||(n.dragging=!0,e instanceof MouseEvent?n.startY=e.pageY:e instanceof TouchEvent&&(n.startY=e.touches[0].pageY),n.currentY=n.startY,n._infScroll&&(n._infScroll.style.willChange="transform",n._infScroll.style.transition="transform 0.2s cubic-bezier(0,0,0.31,1)"))},n.onMove=function(e){n.dragging&&(e instanceof MouseEvent?n.currentY=e.pageY:e instanceof TouchEvent&&(n.currentY=e.touches[0].pageY),n.currentY<n.startY||(n.currentY-n.startY>=Number(n.props.pullDownToRefreshThreshold)&&n.setState({pullToRefreshThresholdBreached:!0}),n.currentY-n.startY>1.5*n.maxPullDownDistance||n._infScroll&&(n._infScroll.style.overflow="visible",n._infScroll.style.transform="translate3d(0px, "+(n.currentY-n.startY)+"px, 0px)")))},n.onEnd=function(){n.startY=0,n.currentY=0,n.dragging=!1,n.state.pullToRefreshThresholdBreached&&(n.props.refreshFunction&&n.props.refreshFunction(),n.setState({pullToRefreshThresholdBreached:!1})),requestAnimationFrame(function(){n._infScroll&&(n._infScroll.style.overflow="auto",n._infScroll.style.transform="none",n._infScroll.style.willChange="unset")})},n.onScrollListener=function(e){"function"==typeof n.props.onScroll&&setTimeout(function(){return n.props.onScroll&&n.props.onScroll(e)},0);var t=n.props.height||n._scrollableNode?e.target:document.documentElement.scrollTop?document.documentElement:document.body;n.actionTriggered||((n.props.inverse?n.isElementAtTop(t,n.props.scrollThreshold):n.isElementAtBottom(t,n.props.scrollThreshold))&&n.props.hasMore&&(n.actionTriggered=!0,n.setState({showLoader:!0}),n.props.next&&n.props.next()),n.lastScrollTop=t.scrollTop)},n.state={showLoader:!1,pullToRefreshThresholdBreached:!1,prevDataLength:t.dataLength},n.throttledOnScrollListener=function(e,t,n,r){var i,o=!1,a=0;function s(){i&&clearTimeout(i)}function l(){var l=this,c=Date.now()-a,u=arguments;function h(){a=Date.now(),n.apply(l,u)}o||(r&&!i&&h(),s(),void 0===r&&c>e?h():!0!==t&&(i=setTimeout(r?function(){i=void 0}:h,void 0===r?e-c:e)))}return"boolean"!=typeof t&&(r=n,n=t,t=void 0),l.cancel=function(){s(),o=!0},l}(150,n.onScrollListener).bind(n),n.onStart=n.onStart.bind(n),n.onMove=n.onMove.bind(n),n.onEnd=n.onEnd.bind(n),n}return function(e,t){function n(){this.constructor=e}VO(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.componentDidMount=function(){if(void 0===this.props.dataLength)throw new Error('mandatory prop "dataLength" is missing. The prop is needed when loading more content. Check README.md for usage');if(this._scrollableNode=this.getScrollableTarget(),this.el=this.props.height?this._infScroll:this._scrollableNode||window,this.el&&this.el.addEventListener("scroll",this.throttledOnScrollListener),"number"==typeof this.props.initialScrollY&&this.el&&this.el instanceof HTMLElement&&this.el.scrollHeight>this.props.initialScrollY&&this.el.scrollTo(0,this.props.initialScrollY),this.props.pullDownToRefresh&&this.el&&(this.el.addEventListener("touchstart",this.onStart),this.el.addEventListener("touchmove",this.onMove),this.el.addEventListener("touchend",this.onEnd),this.el.addEventListener("mousedown",this.onStart),this.el.addEventListener("mousemove",this.onMove),this.el.addEventListener("mouseup",this.onEnd),this.maxPullDownDistance=this._pullDown&&this._pullDown.firstChild&&this._pullDown.firstChild.getBoundingClientRect().height||0,this.forceUpdate(),"function"!=typeof this.props.refreshFunction))throw new Error('Mandatory prop "refreshFunction" missing.\n Pull Down To Refresh functionality will not work\n as expected. Check README.md for usage\'')},t.prototype.componentWillUnmount=function(){this.el&&(this.el.removeEventListener("scroll",this.throttledOnScrollListener),this.props.pullDownToRefresh&&(this.el.removeEventListener("touchstart",this.onStart),this.el.removeEventListener("touchmove",this.onMove),this.el.removeEventListener("touchend",this.onEnd),this.el.removeEventListener("mousedown",this.onStart),this.el.removeEventListener("mousemove",this.onMove),this.el.removeEventListener("mouseup",this.onEnd)))},t.prototype.componentDidUpdate=function(e){this.props.dataLength!==e.dataLength&&(this.actionTriggered=!1,this.setState({showLoader:!1}))},t.getDerivedStateFromProps=function(e,t){return e.dataLength!==t.prevDataLength?UO(UO({},t),{prevDataLength:e.dataLength}):null},t.prototype.isElementAtTop=function(e,t){void 0===t&&(t=.8);var n=e===document.body||e===document.documentElement?window.screen.availHeight:e.clientHeight,r=$O(t);return r.unit===HO?e.scrollTop<=r.value+n-e.scrollHeight+1:e.scrollTop<=r.value/100+n-e.scrollHeight+1},t.prototype.isElementAtBottom=function(e,t){void 0===t&&(t=.8);var n=e===document.body||e===document.documentElement?window.screen.availHeight:e.clientHeight,r=$O(t);return r.unit===HO?e.scrollTop+n>=e.scrollHeight-r.value:e.scrollTop+n>=r.value/100*e.scrollHeight},t.prototype.render=function(){var e=this,t=UO({height:this.props.height||"auto",overflow:"auto",WebkitOverflowScrolling:"touch"},this.props.style),n=this.props.hasChildren||!!(this.props.children&&this.props.children instanceof Array&&this.props.children.length),r=this.props.pullDownToRefresh&&this.props.height?{overflow:"auto"}:{};return i.createElement("div",{style:r,className:"infinite-scroll-component__outerdiv"},i.createElement("div",{className:"infinite-scroll-component "+(this.props.className||""),ref:function(t){return e._infScroll=t},style:t},this.props.pullDownToRefresh&&i.createElement("div",{style:{position:"relative"},ref:function(t){return e._pullDown=t}},i.createElement("div",{style:{position:"absolute",left:0,right:0,top:-1*this.maxPullDownDistance}},this.state.pullToRefreshThresholdBreached?this.props.releaseToRefreshContent:this.props.pullDownToRefreshContent)),this.props.children,!this.state.showLoader&&!n&&this.props.hasMore&&this.props.loader,this.state.showLoader&&this.props.hasMore&&this.props.loader,!this.props.hasMore&&this.props.endMessage))},t}(S),XO={gifTab:"gifTab",gifSearchInput:"gifSearchInput",scrollableDiv:"scrollableDiv",listItem:"listItem",loaded:"loaded",loadedImage:"loadedImage"};const KO=e(Ce,{style:{fontSize:20},spin:!0}),qO=({setImageGifList:n,imageGifList:r=[],currentReqGif:i,setCurrentReqGif:a,inputRef:s,customRequest:l})=>{const{t:c}=An(),{options:u}=ri(),{config:h}=u,[d,f]=o(null),[p,g]=o(!1),[m,v]=o(25),b=async function({query:e,page:t}){const n=e.keywords.replace(/[^\w\sа-яёА-ЯЁ]|_/g,"").replace(/[\s_-]+/g," ");try{const e=`https://api.giphy.com/v1/gifs/search?api_key=${null==h?void 0:h.REACT_APP_GIPHY_KEY}&q=${n}&limit=25&offset=${t}&lang=en`,r=await fetch(e);return{data:await r.json()}}catch(e){console.log(e)}},y=async()=>{var e,t;const r=await b({query:i,page:0});(null===(t=null===(e=null==r?void 0:r.data)||void 0===e?void 0:e.data)||void 0===t?void 0:t.length)&&r.data.data.length>0&&n(r.data.data)};return t("div",{className:XO.gifTab,children:[t(O,{onValuesChange:y,className:r.length>0?XO.searchResults:"",children:[e(O.Item,{className:XO.gifSearchInput,children:e(P,{onKeyDown:e=>"Space"===e.code&&y(),onPressEnter:e=>y(),allowClear:!0,placeholder:c("Search GIFs"),value:null==i?void 0:i.keywords,onChange:e=>a(t=>Object.assign(Object.assign({},t),{keywords:e.target.value})),ref:s,spellCheck:"false",prefix:e(Nr,{size:16,strokeWidth:null==h?void 0:h.iconStrokeWidth,onClick:y})})}),r.length>0&&e("div",{className:"ant-divider blocks-search__divider",role:"separator"})]}),e("div",{className:"serach-output-wrapper",children:r.length>0&&e("div",{id:"scrollableDiv",className:XO.scrollableDiv,children:e(GO,{dataLength:r&&r.length,next:async()=>{p||(g(!0),b({query:i,page:m}).then(e=>{e&&e.data&&e.data.data&&n(t=>[...t,...e.data.data]),g(!1),v(e=>e+25)}).catch(()=>{g(!1)}))},hasMore:!!r,endMessage:t(K,{plain:!0,children:[c("That`s all we could find.")," 🤐"]}),scrollableTarget:"scrollableDiv",style:{overflow:"visible",display:"flex",gap:20,flexWrap:"wrap"},loader:e(ee,{indicator:KO}),children:r.map((n,r)=>t("div",{className:XO.listItem,onClick:()=>((e,t)=>{f(t),setTimeout(()=>{f(null)},2e3),l(e)})(n.images.downsized.url,n.id),children:[e("img",{className:d===n.id?XO.loadedImage:"",width:"322px",src:`${n.images.downsized.url}`,alt:n.title,onLoad:e=>{const t=e.target.parentNode;t&&t instanceof HTMLElement&&t.classList.add(XO.loaded)}}),e("a",{rel:"noreferrer",href:"https://giphy.com/",target:"_blank",onClick:e=>e.stopPropagation()}),d===n.id&&e(ee,{className:"ant-spin",indicator:e(Ce,{spin:!0})})]},n.id+r))})})})]})};var ZO="stockTab",JO="stockSearchInput",QO="searchResults",eE="blocksSearchDividerWrapper",tE="scrollableDiv",nE="listItem",rE="loaded",iE="loadedImage",oE="creatorInfo",aE="stockColorFilter",sE="allColors",lE="blackColor",cE="bwColor",uE="whiteColor",hE="orangeColor",dE="redColor",fE="purpleColor",pE="magentaColor",gE="greenColor",mE="tealColor",vE="blueColor";const bE=e(Ce,{style:{fontSize:20},spin:!0}),yE=({imageStockList:r,setImageStockList:i,currentReq:s,setCurrentReq:l,inputRef:c,customRequest:u})=>{const[h,d]=o(!1),[f,p]=o(2),{t:g}=An(),{options:m}=ri(),{config:v}=m,b=async function({query:e,page:t}){const n=e.keywords.replace(/[^\w\sа-яёА-ЯЁ]|_/g,"").replace(/[\s_-]+/g," ");try{let r=`https://api.unsplash.com/search/photos?client_id=${null==v?void 0:v.UNSPLASH_KEY}&lang=ru&per_page=18&query=${n}&page=${t}`;""!==e.color&&(r+=`&color=${e.color}`),""!==e.orientation&&(r+=`&orientation=${e.orientation}`);const i=await fetch(r);return{data:await i.json()}}catch(e){console.log(e)}};a(()=>{""!==s.keywords&&y()},[s.color,s.orientation]);const y=async()=>{var e,t;const n=await b({query:s,page:1});(null===(t=null===(e=null==n?void 0:n.data)||void 0===e?void 0:e.results)||void 0===t?void 0:t.length)&&n.data.results.length>0&&i(n.data.results)},[w,x]=o(null),C=(e,t,n)=>{!async function(e){try{const t=await fetch(`${e}&client_id=${null==v?void 0:v.UNSPLASH_KEY}`);return{data:await t.json()}}catch(e){console.log(e)}}(t.download_location),x(n),setTimeout(()=>x(null),2e3),u(`${e.raw}&w=1200&q=96`)};return t("div",{className:ZO,children:[t(O,{onValuesChange:y,className:r.length>0?QO:"",children:[t(H,{gutter:24,children:[e(W,{span:r.length>0?void 0:24,children:e(O.Item,{className:JO,children:e(P,{onKeyDown:e=>"Space"===e.code&&y(),onPressEnter:e=>y(),allowClear:!0,placeholder:g("Search image"),value:s.keywords,onChange:e=>l(t=>Object.assign(Object.assign({},t),{keywords:e.target.value})),ref:c,spellCheck:"false",prefix:e(Nr,{size:16,strokeWidth:null==v?void 0:v.iconStrokeWidth,onClick:y})})})}),r.length>0&&t(n,{children:[e(W,{children:t(te.Group,{defaultValue:"",onChange:e=>l(t=>Object.assign(Object.assign({},t),{orientation:e.target.value})),children:[e(L,{title:g("All"),placement:"top",children:e(te.Button,{value:"",children:e(Oi,{})})}),e(L,{title:g("Landscape"),placement:"top",children:e(te.Button,{value:"landscape",children:e(Ei,{})})}),e(L,{title:g("Portrait"),placement:"top",children:e(te.Button,{value:"portrait",children:e(Pi,{})})}),e(L,{title:g("Squarish"),placement:"top",children:e(te.Button,{value:"squarish",children:e(Mi,{})})})]})}),e(W,{children:t(te.Group,{defaultValue:"",className:aE,onChange:e=>l(t=>Object.assign(Object.assign({},t),{color:e.target.value})),children:[e(L,{title:g("All"),placement:"top",children:e(te.Button,{className:sE,value:"",children:"All"})}),e(L,{title:g("Black"),placement:"top",children:e(te.Button,{className:lE,value:"black",children:"B"})}),e(L,{title:g("Black and White"),placement:"top",children:e(te.Button,{className:cE,value:"black_and_white",children:"B&W"})}),e(L,{title:g("White"),placement:"top",children:e(te.Button,{className:uE,value:"white",children:"W"})}),e(L,{title:g("Orange"),placement:"top",children:e(te.Button,{className:hE,value:"orange",children:"O"})}),e(L,{title:g("Red"),placement:"top",children:e(te.Button,{className:dE,value:"red",children:"R"})}),e(L,{title:g("Purple"),placement:"top",children:e(te.Button,{className:fE,value:"purple",children:"P"})}),e(L,{title:g("Magenta"),placement:"top",children:e(te.Button,{className:pE,value:"magenta",children:"M"})}),e(L,{title:g("Green"),placement:"top",children:e(te.Button,{className:gE,value:"green",children:"G"})}),e(L,{title:g("Teal"),placement:"top",children:e(te.Button,{className:mE,value:"teal",children:"T"})}),e(L,{title:g("Blue"),placement:"top",children:e(te.Button,{className:vE,value:"blue",children:"B"})})]})})]})]}),r.length>0&&e("div",{className:eE,children:e(K,{className:"zero-divider"})})]}),e("div",{className:"serach-output-wrapper",children:r.length>0&&e("div",{id:"scrollableDiv",className:tE,children:e(GO,{dataLength:r&&r.length,next:async()=>{h||(d(!0),b({query:s,page:f}).then(e=>{e&&e.data&&e.data.results&&i(t=>[...t,...e.data.results]),d(!1),p(e=>e+1)}).catch(()=>{d(!1)}))},hasMore:!!r,endMessage:t(K,{plain:!0,children:[g("That`s all we could find.")," 🤐"]}),scrollableTarget:"scrollableDiv",style:{overflow:"visible",display:"flex",gap:20,flexWrap:"wrap"},loader:e(ee,{indicator:bE}),children:r.map((n,r)=>t("div",{className:nE,onClick:()=>C(n.urls,n.links,n.id),children:[e("img",{className:w===n.id?iE:"",width:"310px",src:`${n.urls.raw}&w=644&q=96`,alt:n.description,onLoad:e=>{const t=e.target.parentNode;t&&t instanceof HTMLElement&&t.classList.add(rE)}}),t("p",{className:oE,onClick:e=>e.stopPropagation(),children:[g("Photo by")," ",e("a",{target:"_blank",href:`${n.user.links.html}?utm_source=${null==v?void 0:v.APP_NAME_UNSPLASH}&utm_medium=referral`,rel:"noreferrer",children:n.user.name})," ",g("on")," ",e("a",{target:"_blank",href:`https://unsplash.com/?utm_source=${null==v?void 0:v.APP_NAME_UNSPLASH}&utm_medium=referral`,rel:"noreferrer",children:"Unsplash"})]}),w===n.id&&e(ee,{className:"ant-spin",indicator:e(Ce,{spin:!0})})]},n.id+r))})})})]})},wE=()=>{const{options:e}=ri(),t=e.config;return c((e,n)=>{!1!==(null==t?void 0:t.pushToGTM)&&((e,t)=>{const n=()=>{try{const t=Object.assign(Object.assign({},e),{appLabel:"blocks_app"});window.dataLayer&&"function"==typeof window.dataLayer.push?window.dataLayer.push(t):console.log("Attempting to add to the dataLayer:",e)}catch(e){console.error("Ошибка при вызове GTM:",e)}};t?setTimeout(n,t):n()})(e,n)},[null==t?void 0:t.pushToGTM])};var xE="slideshowContainer",CE="slideshowImage";const _E=({images:t,transitionDuration:n=1e3,frameHeight:r})=>{const[i,s]=o([]),l=()=>{s(e=>e.map((t,n)=>n===e.length-1?Object.assign(Object.assign({},t),{opacity:1}):t))};return a(()=>{if(t.length>0){const e=t[t.length-1];s(t=>[...t,{src:e,opacity:0}]),setTimeout(l,1e3)}else s([])},[t]),e("div",{className:xE,style:{height:600,minHeight:130},children:i.map((t,r)=>e("img",{src:`data:image/jpeg;base64, ${t.src}`,alt:`Slide ${r+1}`,className:CE,style:{opacity:t.opacity,transition:`opacity ${n}ms linear`,display:"block"}},r))})};"function"==typeof SuppressedError&&SuppressedError;const SE=t=>{var{className:n,style:r,color:i,text:o,bordered:a}=t,s=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(t,["className","style","color","text","bordered"]);const l=o||"";return e(ne,Object.assign({style:r,color:i,bordered:a,className:n},s,{children:l}))},AE=({text:n,counter:r,limits:i,wrapperStyles:o})=>{const{t:a}=An(),{options:s}=ri(),l=s.config,{token:c}=k.useToken(),u=+i>0,h=!u||r<+i,d=(null==l?void 0:l.billingPageUrl)||"/billing",f=r+" "+a("of")+" "+(u?i:"∞")+" "+(n||a("tests",{count:i}))+" "+a("was used",{count:r});return t("div",{className:"limits-couter-wrapper",style:o,children:[e(SE,{bordered:!1,text:f,className:"limit-counter",style:{color:h?c.colorText:"white"},color:h?c.colorFillSecondary:"rgb(255, 77, 79)"}),u&&e("div",{style:{fontSize:14,textDecoration:"underline",cursor:"pointer"},onClick:()=>window.location.assign(d),children:a("Need more?")})]})};var kE={imageAi:"imageAi",imageItem:"imageItem",textAreaInputHybrid:"textAreaInputHybrid",loading:"loading",carousel:"carousel",arrow:"arrow",arrowNext:"arrowNext",arrowPrev:"arrowPrev",arrowBtn:"arrowBtn",arrowBtnNext:"arrowBtnNext",arrowBtnPrev:"arrowBtnPrev",row:"row",inputAffixWrapper:"inputAffixWrapper",textarea:"textarea",inputIcon:"inputIcon"};const TE=f(({className:t,onClick:n})=>e("div",{className:`${kE.arrow} ${kE.arrowNext} ${t||""}`,onClick:n,children:e(z,{className:`${kE.arrowBtn} ${kE.arrowBtnNext}`,size:"large",icon:e(_e,{})})}));TE.displayName="SampleNextArrow";const IE=f(({className:t,onClick:n})=>e("div",{className:`${kE.arrow} ${kE.arrowPrev} ${t||""}`,onClick:n,children:e(z,{className:`${kE.arrowBtn} ${kE.arrowBtnPrev}`,size:"large",icon:e(Se,{})})}));IE.displayName="SamplePrevArrow";const OE=({customRequest:n,aiTabRef:r,inputAiRef:i,isImageUploaded:s,setIsImageUploaded:l,aiImageRequest:u,setAiImageRequest:d,imageAiList:f,setImageAiList:p,isLoadingAi:g,setIsLoadingAi:m})=>{const{t:v}=An(),[b,y]=o("auto"),{aiImageCounter:w,currentAiImgLimits:x,loadingDuringGeneration:C,requestStatus:_,handleGenerate:S,convertBase64ToFile:A,isShiftPressed:k,setIsShiftPressed:T,limitsInPlugin:I}=function({setFrameHeight:e,customRequest:t,aiTabRef:n,isImageUploaded:r,setIsImageUploaded:i,aiImageRequest:s,imageAiList:l,setImageAiList:u,isLoadingAi:d,setIsLoadingAi:f}){const{t:p}=An(),{options:g}=ri(),m=g.config,v=hi(),b=wE(),{messages:y}=g.config,[w,x]=o([]),[C,_]=o(0),[S,A]=o(null),[k,T]=o(!1),[I,O]=o(p("Evaluating the task")),[E,P]=o(!1);a(()=>{x(y)},[y]),a(()=>{l.length||S||x([])},[l,S]);const M=h(()=>(console.log("sendAIImageRequest"),m&&"function"==typeof(null==m?void 0:m.sendAIImageRequest)?null==m?void 0:m.sendAIImageRequest:()=>Promise.resolve({})),[m]),F=c(e=>{"error"!==e.status&&"Canceled"!==e.status?e.images?(O(String(e.status)),100===e.progress&&(f(!1),u(e.images),A(null),P(!1))):(u([String(e.data)]),100===e.progress&&f(!1)):(f(!1),P(!1),v.error({message:p("Something went wrong, please try again"),placement:"bottomRight",description:String(S)||void 0}))},[u,O,p,f,S,v,P]);a(()=>{w.length>1&&F(w[w.length-1])},[F,w]);const j=h(()=>{if(m&&"function"==typeof(null==m?void 0:m.sseQuery)){const e=null==m?void 0:m.sseQuery;return t=>e(t)}return e=>{}},[m]),D=h(()=>m&&"object"==typeof(null==m?void 0:m.handleLimitUsageEmitter)?null==m?void 0:m.handleLimitUsageEmitter:{fire:()=>{}},[m]),R=null==m?void 0:m.elementId,{projectId:L}=m,{limits:z}=(null==m?void 0:m.limits)?m:{limits:{ai_img_limit:0}},{ai_img_limit:N}=z,B=N>0&&C>=N,V=!(!(null==m?void 0:m.limits)||!m.counters)&&Qr,U=c(()=>{D.fire({name:"AiImgCount",count:C+1})},[D,C]),H=h(()=>!B&&!V,[B,V,C,N]),W=c(async()=>{console.log("generateImage"),O(p("Evaluating the task")),""===s||d||(f(!0),P(!0),u([]),b({event:"submit_form",action:"ai_image_generation",entity_id:R,project_id:L}),M({body:{project_id:L,request:"create-image",connection:"midjourney",message:s}}).then(e=>{var t,n,r;const{data:i,error:o}=e||{};if(o)throw o;const a=i;if(401===(null==a?void 0:a.status)||401===(null===(t=null==a?void 0:a.data)||void 0===t?void 0:t.status))throw new Error("ERROR");if(200===(null==a?void 0:a.status)||200===(null===(n=null==a?void 0:a.data)||void 0===n?void 0:n.status)){const e=(null==a?void 0:a.task)||(null===(r=null==a?void 0:a.data)||void 0===r?void 0:r.task);(null==e?void 0:e.id)&&(O(e.message),A(e.id)),(null==a?void 0:a.message)&&v.success({message:a.message,placement:"bottomRight",description:s}),j({task_id:null==e?void 0:e.id,entity_id:R})}else f(!1),P(!1),v.error({message:(null==a?void 0:a.message)||p("Something went wrong, please try again"),placement:"bottomRight",description:s})}).catch(e=>{f(!1),P(!1);const t=e;return((null==t?void 0:t.error)||(null==t?void 0:t.data))&&(null==v||v.error({message:p("Something went wrong, please try again"),placement:"bottomRight",description:s})),t}))},[s,d,f,P,u,b,R,L,M,v,j,p]),Y=c(()=>{H&&W()},[H,V,_,U,W,v,p]);a(()=>{},[m,V]);const $=c(e=>{if(!r){i(!0);const n=e.match(/^data:image\/([A-Za-z-+/]+);base64,(.+)$/);if(!n)return;const r=n[1],o=n[2],a=atob(o),s=new Array(a.length);for(let e=0;e<a.length;e++)s[e]=a.charCodeAt(e);const l=new Uint8Array(s),c=new Blob([l],{type:`image/${r}`}),u=new File([c],"image.jpeg",{type:c.type,lastModified:Date.now()});t({file:u})}},[r,i,t]);return a(()=>{(d||l.length>0)&&setTimeout(()=>{let t=350;n.current&&(t=n.current.offsetHeight-120),e(t)},0)},[n,l.length,d,e]),{aiImageCounter:C,setAiImageCounter:_,currentAiImgLimits:N,isFieldsDisabled:B,canGenerateImage:H,aiImageRequest:s,imageAiList:l,setImageAiList:u,isLoadingAi:d,setIsLoadingAi:f,loadingDuringGeneration:E,setLoadingDuringGeneration:P,requestStatus:I,setRequestStatus:O,handleGenerate:Y,handleLimitAiImgCount:U,convertBase64ToFile:$,isShiftPressed:k,setIsShiftPressed:T,currentReqId:S,setCurrentReqId:A,limitsInPlugin:V}}({setFrameHeight:y,customRequest:n,aiTabRef:r,isImageUploaded:s,setIsImageUploaded:l,aiImageRequest:u,imageAiList:f,setImageAiList:p,isLoadingAi:g,setIsLoadingAi:m}),[E,M]=o(!1),F=c(()=>M(!0),[]),j=c(()=>M(!1),[]),D=c(e=>d(e.target.value),[d]),R=c(e=>{"Shift"===e.key?T(!0):"Enter"!==e.key||k||(e.preventDefault(),S())},[k,S,T]),L=c(e=>{"Shift"===e.key&&T(!1)},[T]);return t("div",{className:kE.imageAi,children:[I&&e(AE,{text:"images",counter:w,limits:x,wrapperStyles:{marginTop:-25}}),e(H,{gutter:24,className:kE.row,children:e(W,{span:24,children:e(O.Item,{children:t("span",{className:`ant-input-affix-wrapper ant-input-affix-wrapper-lg ${kE.inputAffixWrapper}${E?" ant-input-affix-wrapper-focused":""}`,children:[e(P.TextArea,{ref:i,onKeyDown:R,onKeyUp:L,onFocus:F,onBlur:j,autoSize:!0,allowClear:!0,className:`${kE.textAreaInputHybrid} ${kE.textarea}`,placeholder:"Generate image",value:u,onChange:D,spellCheck:"false"}),e("span",{className:`ant-input-suffix ${kE.inputSuffix}`,children:g||C?e(Ce,{className:`${kE.inputIcon} input-icon`,spin:!0}):e(Fi,{className:`${kE.inputIcon} input-icon`,onClick:S})})]})})})}),(g||f.length>0)&&t(re,{dotPosition:"top",arrows:!0,nextArrow:e(TE,{}),prevArrow:e(IE,{}),className:kE.carousel,infinite:!1,children:[g&&!f.length&&e("div",{className:kE.loading,children:t("div",{className:"spin",children:[e(Ce,{style:{fontSize:48},spin:!0}),e("p",{className:"status",children:_})]})}),f.length>0&&f.map((n,r)=>t("div",{className:kE.imageItem,children:[e(_E,{images:f,frameHeight:b}),e("div",{className:"buttons",children:f.length>0&&!g&&e(z,{onClick:()=>A(`data:image/jpeg;base64, ${n}`),icon:e(Ae,{}),children:v("Use this variant")})})]},r))]})]})},EE=e=>{(null==e?void 0:e.customTheme)&&((e={})=>{const t=document.querySelector("head");if(!t)return;const n=document.createElement("style");if(n.type="text/css",n.dataset.themeVariablesFm="true",n.setAttribute("data-file-manager","true"),Object.entries(e).length){let r="";Object.entries(e).forEach(([e,t])=>{"object"!=typeof t&&(r+=`\t--${e}: ${t};\n`)}),r=`.em-filemanager {\n${r}}`,n.appendChild(document.createTextNode(r));const i=t.querySelector('[data-theme-variables-fm="true"]');i?t.replaceChild(n,i):t.insertBefore(n,t.firstChild)}})(null==e?void 0:e.customTheme)},{Sider:PE,Content:ME}=Q,FE={keywords:"",color:"",orientation:""},jE={keywords:""},DE=()=>{const s=li(),l=ui(),h=(()=>{var e,t;const{state:n,actions:r,options:i}=ri(),{selectedFolder:o,pathHistory:a,folders:s}=n,{t:l}=An(),{setSelectedFolder:u,setPathHistory:h}=r,d=c(()=>{var e;return`em_fm:lastFolder:${(null===(e=null==i?void 0:i.config)||void 0===e?void 0:e.projectId)||"default"}`},[null===(e=null==i?void 0:i.config)||void 0===e?void 0:e.projectId]),f=c((e,t=new Set)=>{if(t.has(e))return console.warn(`Обнаружен цикл в пути к папке с id=${e}`),[];const n=(Array.isArray(s)?s:[]).find(t=>t.id===e);if(!n)return[];const r=new Set(t);return r.add(e),n.parentId?n.parentId===n.id?(console.warn(`Обнаружена циклическая зависимость: папка ${n.id} является родителем самой себя`),[{id:n.id,name:n.name+" (ошибка)"}]):[...f(n.parentId,r),{id:n.id,name:n.name}]:[{id:n.id,name:n.name}]},[s]),p=c(e=>{var t;if("undefined"==typeof window)return;const n=!1!==(null===(t=null==i?void 0:i.config)||void 0===t?void 0:t.rememberLastFolder),r=d();try{if(!n)return void localStorage.removeItem(r);e?localStorage.setItem(r,e):localStorage.removeItem(r)}catch(e){console.warn("localStorage недоступен для сохранения последней папки")}},[d,null===(t=null==i?void 0:i.config)||void 0===t?void 0:t.rememberLastFolder]),g=c(e=>{if("folders"===e){const e=[{id:"folders",name:l("Folders")}];return null==h||h(e),void(i.onPathChange&&i.onPathChange([]))}if(!(Array.isArray(s)?s:[]).find(t=>t.id===e))return void console.warn("⚠️ Папка не найдена:",e);const t=f(e),n=[{id:"folders",name:l("Folders")},...t];null==h||h(n),i.onPathChange&&i.onPathChange(n.map(e=>e.name))},[s,f,h,i,l]),m=c(e=>{const t="folders"===e?null:e;t!==o&&(null==u||u(t),p(t),g(e))},[p,o,u,g]),v=c(e=>{if(-1===e)null==u||u(null),null==h||h([{id:"folders",name:l("Folders")}]),i.onPathChange&&i.onPathChange([]);else{const t=a.slice(0,e+1),n=t[t.length-1],r="folders"===n.id?void 0:n.id;null==u||u(r||null),null==h||h(t),i.onPathChange&&i.onPathChange(t.map(e=>e.name))}},[i,a,h,u,l]),b=c(e=>{if(!e.isFolder)return;null==u||u(e.id);const t={id:e.id,name:e.name};if(h){const e=[...a,t];h(e)}if(i.onPathChange){const t=[...a.map(e=>e.name),e.name];i.onPathChange(t)}},[i,a,h,u]);return{state:{selectedFolder:o,pathHistory:a},actions:{handleFolderSelect:m,handleBreadcrumbClick:v,handleItemClick:b},selectedFolder:o,pathHistory:a,handleFolderSelect:m,handleBreadcrumbClick:v,handleItemClick:b}})(),d=(()=>{const{state:e,actions:t}=ri(),{pagination:n}=e,{setPagination:r}=t,i=c((e,t)=>{const i=t||n.pageSize;null==r||r({current:e,pageSize:i,total:n.total})},[n.pageSize,n.total,r]);return{state:{pagination:n},actions:{handlePaginationChange:i}}})(),f=(()=>{const[e,t]=r.useState(()=>{const e=localStorage.getItem(di);return e?Math.max(290,parseInt(e,10)):298}),[n,i]=r.useState(!1),[o,a]=r.useState(!1),[s,l]=r.useState(0),c=r.useCallback(()=>{console.log("Double click: Resetting to default width"),t(298),localStorage.setItem(di,298..toString())},[]),u=r.useCallback(n=>{n.preventDefault(),n.stopPropagation(),i(!0),document.body.classList.add("resizing");const r=n.clientX,o=e;let s=o;const c=e=>{e.preventDefault();const n=Math.max(Math.min(o+e.clientX-r,600),290);s=n,t(n),l(e.clientX),a(!0)},u=()=>{i(!1),document.body.classList.remove("resizing"),a(!1),localStorage.setItem(di,s.toString()),document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",u)};document.addEventListener("mousemove",c),document.addEventListener("mouseup",u)},[e]);return r.useEffect(()=>()=>{document.body.classList.remove("resizing")},[]),{sidebarWidth:e,isResizing:n,showResizeGuide:o,resizeGuidePosition:s,handleResizeStart:u,handleDoubleClick:c}})(),p=(()=>{const[e,t]=o([]),[n,r]=o(!1),[i,a]=o(!1),s=u(0),l=c(()=>(s.current+=1,`upload_${s.current}_${Date.now()}`),[]),h=c(e=>`${(e.size/1024).toFixed(2)} КБ`,[]),d=c(e=>{const n=e.map(e=>({id:l(),name:e.name,size:h(e),status:"uploading",progress:0}));return t(n),r(!0),a(!1),n.map(e=>e.id)},[l,h]),f=c((e,n)=>{t(t=>t.map(t=>t.id===e?Object.assign(Object.assign({},t),{progress:Math.min(100,Math.max(0,n))}):t))},[]),p=c(e=>{t(t=>t.map(t=>t.id===e?Object.assign(Object.assign({},t),{status:"success",progress:100}):t))},[]),g=c((e,n)=>{t(t=>t.map(t=>t.id===e?Object.assign(Object.assign({},t),{status:"error",error:n}):t))},[]),m=c(()=>{r(!1),a(!1),setTimeout(()=>{t([])},300)},[]),v=c(()=>{a(e=>!e)},[]),b=c(e=>{t(t=>{const n=t.filter(t=>t.id!==e);return 0===n.length&&setTimeout(()=>{r(!1),a(!1)},100),n})},[]),y=e.length,w=e.filter(e=>"success"===e.status||"error"===e.status).length;return{uploadFiles:e,isUploadVisible:n,isUploadMinimized:i,totalFiles:y,completedFiles:w,startUpload:d,updateProgress:f,markAsSuccess:p,markAsError:g,closeUpload:m,minimizeUpload:v,insertFile:b}})(),g=ci(),{t:m}=An(),v=i.useRef(null),{folders:b,loading:y}=s.state,{fetchFolders:w,fetchChildFolders:x,handleCreateFolder:C,handleModalOk:_,handleModalCancel:S,generateMenuItems:A}=s.actions,k=Gi(w),{files:T,selectedFiles:I,loading:O,isRenamingFile:E,fileToRename:P}=l.state,{fetchFiles:M,handleDeleteFile:F,handleDeleteFolder:j,handleAddFile:D,handleAddFileByUrl:R,uploadFileWithProvider:L,toggleFileSelection:N,showRenameModal:B,handleRenameCancel:V,handleRenameOk:U,handleDroppedFiles:H,showMoveModal:W,handleMoveCancel:Y,handleMoveOk:$,showDeleteConfirm:G,handleDeleteConfirmCancel:X,handleDeleteConfirmOk:q}=l.actions,{selectedFolder:Z,pathHistory:J}=h.state,{handleFolderSelect:ee,handleBreadcrumbClick:te,handleItemClick:ne}=h.actions,{pagination:re}=d.state,ie=si(M),{searchTerm:oe,sortBy:ae,sortOrder:se}=ie.state,{handleSearch:le,handleSort:ce,handlePaginationChange:ue}=ie.actions,he=(({files:e,selectedFiles:t,fetchFiles:n,selectedFolder:i})=>{const o=hi(),{options:a,actions:s,state:l}=r.useContext(ni),{setActiveLibraryItem:c}=s,{activeLibraryItem:u}=l,[h,d]=r.useState(!1),[f,p]=r.useState(null);r.useEffect(()=>{console.log(h)},[h]);const g=r.useCallback(e=>{var t;if(e.type&&e.type.startsWith("image/"))return!0;if(e.extension){const t=e.extension.toLowerCase();return ei.includes(t)}const n=null===(t=e.name.split(".").pop())||void 0===t?void 0:t.toLowerCase();return!!n&&ei.includes(n)},[]),m=r.useCallback(async e=>{var t,n,r,i;const{dataProviders:o}=a;if(console.log("🔧 saveFileToServer: dataProviders доступны:",{hasUpdateFile:!!(null==o?void 0:o.updateFile),hasUploadFile:!!(null==o?void 0:o.uploadFile),hasThumbnail:!!e.thumbnail,fileId:e.id}),!1!==(null===(n=null===(t=a.config)||void 0===t?void 0:t.features)||void 0===n?void 0:n.enableUpdateFile)&&(null==o?void 0:o.updateFile)&&e.thumbnail)try{let t=e.type||"image/png";if(e.thumbnail.startsWith("data:")){const n=e.thumbnail.match(/^data:([^;]+)/);n&&n[1].startsWith("image/")&&(t=n[1])}const n=e.thumbnail.split(",")[1],r=atob(n),i=new Array(r.length);for(let e=0;e<r.length;e++)i[e]=r.charCodeAt(e);const a=new Uint8Array(i),s=new Blob([a],{type:t});console.log("Using updateFile method with:",{fileId:e.id,mimeType:t,blobType:s.type});const l=t.split("/")[1],c=e.name.substring(0,e.name.lastIndexOf("."))+"."+l;return await o.updateFile(e.id,{name:c,type:t,data:s,thumbnail:e.thumbnail,extension:l})}catch(e){return console.error("Ошибка при обновлении файла через updateFile:",e),null}else if((null==o?void 0:o.uploadFile)&&e.thumbnail)try{let t=e.type||"image/png";if(e.thumbnail.startsWith("data:")){const n=e.thumbnail.match(/^data:([^;]+)/);n&&n[1].startsWith("image/")&&(t=n[1])}const n=e.thumbnail.split(",")[1],r=atob(n),i=new Array(r.length);for(let e=0;e<r.length;e++)i[e]=r.charCodeAt(e);const a=new Uint8Array(i),s=new Blob([a],{type:t});console.log("Using uploadFile method as fallback with:",{mimeType:t,blobType:s.type}),await o.uploadFile(Object.assign(Object.assign({},e),{type:t,data:s,size:e.size||0}))}catch(e){return console.error("Ошибка при сохранении файла через uploadFile:",e),null}else if(!1!==(null===(i=null===(r=a.config)||void 0===r?void 0:r.features)||void 0===i?void 0:i.enableRenameFile)&&(null==o?void 0:o.renameFile))try{return await o.renameFile(e.id,e.name)}catch(e){return console.error("Ошибка при переименовании файла:",e),null}return console.warn("DataProvider для обновления файлов не настроен"),null},[a]),v=r.useCallback(n=>{let r;if(console.log("🎨 handleEdit ВЫЗВАНА!",{fileForEdit:n,selectedFilesSize:t.size}),n)console.log("fileForEdit",n),r=n;else{if(1!==t.size)return;const n=Array.from(t)[0];if(r=e.find(e=>e.id===n),!r||r.isFolder||!g(r))return}console.log("🎨 usePixieEditor: Открываем редактор для файла:",r),c&&c(Jr),console.log("🎨 usePixieEditor: Устанавливаем editingFile"),p(r),console.log("🎨 usePixieEditor: Устанавливаем isPixieEditorVisible = true"),d(!0),console.log("🎨 usePixieEditor: Редактор должен открыться")},[t,e,g,d,c]),b=r.useCallback(()=>{console.log("🎨 usePixieEditor: Закрываем редактор"),c&&u===Jr&&c(Xr),d(!1),p(null),console.log("🎨 usePixieEditor: Редактор закрыт")},[u,c]),y=r.useCallback(async e=>{console.log("Файл обновлен:",e);try{const t=await m(e);if(t)return await n({folderId:i||void 0}),o.success({message:"Успех",description:"Изображение успешно обновлено"}),b(),a.onEditorOk&&a.onEditorOk(t),await n({folderId:i||""}),b(),t}catch(e){console.error("Ошибка при сохранении файла:",e),o.error({message:"Ошибка",description:`Не удалось сохранить изменения: ${e instanceof Error?e.message:"Неизвестная ошибка"}`})}},[m,a,n,i,o,b]);return{isPixieEditorVisible:h,editingFile:f,handleEdit:v,handlePixieEditorSave:y,handlePixieEditorClose:b}})({files:T||[],selectedFiles:I||new Set,fetchFiles:M,selectedFolder:Z||null}),de=i.useCallback(async()=>{var e;await q(),await w(),await(null===(e=v.current)||void 0===e?void 0:e.refreshFileCounts())},[w,q]),fe=i.useCallback(async()=>{var e;await $(),await(null===(e=v.current)||void 0===e?void 0:e.refreshFileCounts())},[$]),pe=i.useCallback(async()=>{var e,t,n;await(null===(t=(e=l.actions).handleCopyOk)||void 0===t?void 0:t.call(e)),await(null===(n=v.current)||void 0===n?void 0:n.refreshFileCounts())},[l.actions.handleCopyOk]),ge=i.useCallback(async()=>{let e=null;await D({onStart:t=>{const n=p.startUpload([t]);e=n[0],console.warn("🚀 onStart: файл запущен",{fileName:t.name,fileId:e})},onProgress:(t,n)=>{e&&(p.updateProgress(e,n),console.warn("🔍 onProgress:",{fileName:t,fileId:e,progress:n}))},onComplete:async t=>{var n;e?(p.markAsSuccess(e),console.warn("✅ onComplete: markAsSuccess вызван",{fileName:t,fileId:e}),await(null===(n=v.current)||void 0===n?void 0:n.refreshFileCounts())):console.error("❌ currentFileId отсутствует для onComplete:",t)},onError:(t,n)=>{e&&(p.markAsError(e,n),console.warn("❌ onError: markAsError вызван",{fileName:t,fileId:e,error:n}),e=null)}})},[D,p]),me=i.useCallback(async()=>{var e;await R(),await(null===(e=v.current)||void 0===e?void 0:e.refreshFileCounts())},[R]),ve=i.useCallback(async e=>{var t;await F(e),await(null===(t=v.current)||void 0===t?void 0:t.refreshFileCounts())},[F]),be=i.useCallback(async e=>{var t;if(H){const n=p.startUpload(e);console.warn("🚀 Drag&Drop: файлы запущены",{fileCount:e.length,fileIds:n}),e.forEach(async(e,t)=>{const r=n[t];if(!r)return;let i=0;const o=setInterval(()=>{i=Math.min(i+10+Math.floor(Date.now()%10),85),p.updateProgress(r,i)},200);setTimeout(()=>{clearInterval(o)},2e3)}),await H(e),n.forEach(e=>{p.updateProgress(e,100),p.markAsSuccess(e)}),await(null===(t=v.current)||void 0===t?void 0:t.refreshFileCounts())}},[H,p]),ye=i.useCallback(async e=>{var t;await j(e),await w(),await(null===(t=v.current)||void 0===t?void 0:t.refreshFileCounts())},[j,w]),we=(({files:e,selectedFiles:t,toggleFileSelection:n,showRenameModal:i,showMoveModal:o,showCopyModal:a,handleDeleteFile:s,handleDeleteFolder:l,showDeleteConfirm:c,onEdit:u})=>{const h=r.useCallback(()=>{t&&t.size>0&&t.forEach(e=>{n(e)})},[t,n]),d=r.useCallback(e=>{if(t&&1===t.size||e){const n=e||Array.from(t)[0];i(n)}},[t,i]),f=r.useCallback(n=>{if(t&&t.size>0||(null==n?void 0:n.id)){if(c)return void c();(n?[n.id]:t).forEach(t=>{const n=e.find(e=>e.id===t);console.log("item",n),n?n.isFolder?l(t):s(t):console.warn(`Объект с ID ${t} не найден в списке файлов`)})}},[t,e,s,l,c]);return{handleClearSelection:h,handleRename:d,handleDeleteSelected:f,handleCopy:r.useCallback(()=>{a()},[a]),handleMove:r.useCallback(()=>{o()},[o]),handleEdit:r.useCallback(()=>{console.log("onEdit"),u()},[u])}})({files:T||[],selectedFiles:I||new Set,toggleFileSelection:N,showRenameModal:B,showMoveModal:W,showCopyModal:l.actions.showCopyModal||(()=>{}),handleDeleteFile:F,handleDeleteFolder:ye,showDeleteConfirm:G,onEdit:he.handleEdit}),xe=y||O,{options:Ce}=i.useContext(ni),_e=null==Ce?void 0:Ce.config;a(()=>{sn(),w()},[w]),i.useEffect(()=>{if(!ee||0===b.length)return;const e=!!(null==_e?void 0:_e.rememberLastFolder),t=`em_fm:lastFolder:${(null==_e?void 0:_e.projectId)||"default"}`;if(e&&"undefined"!=typeof window)try{const e=localStorage.getItem(t);if(e&&b.some(t=>t.id===e))return void ee(e)}catch(e){}Z||ee("folders")},[Z,ee,b,null==_e?void 0:_e.rememberLastFolder,null==_e?void 0:_e.projectId]);const{state:Se,actions:Ae,options:ke}=i.useContext(ni),{form:Te,urlForm:Ie,renameForm:Oe,moveForm:Ee,renameFolderForm:Pe,copyForm:Me,isModalVisible:Fe,isUrlModalVisible:je,isMoveModalVisible:De,isRenameFolderModalVisible:Re,isCopyModalVisible:Le,isDeleteConfirmVisible:ze,folderToRename:Ne,activeLibraryItem:Be}=Se,{setIsUrlModalVisible:Ve,setSortField:Ue,setActiveLibraryItem:He}=Ae,{config:We}=ke,{handleRenameFolderCancel:Ye,handleRenameFolderOk:$e}=k.actions,Ge=c(e=>{ue(e.current||re.current,e.pageSize||re.pageSize)},[ue,re]),Xe=i.useCallback(e=>{const{sortBy:t,sortOrder:n}=(e=>{const[t,n]=e.split("-");return{sortBy:t,sortOrder:n}})(e);ce(t,n)},[ce]),[Ke,qe]=o(jE),[Ze,Je]=o([]),Qe=u(null),[et,tt]=o(FE),[nt,rt]=o([]),it=u(null),[ot,at]=o(""),[st,lt]=o([]),ct=i.useRef(void 0),[ut,ht]=o(!1),[dt,ft]=o(!1),pt=i.useRef(null),gt=i.useRef(null),mt=c(async()=>{const e=null==We?void 0:We.fileForEdit;if(ct.current!==e){ct.current=e;try{if(!(Be===Jr&&e&&!he.editingFile))return;if("string"==typeof e){if(e.startsWith("data:"))return void(null==he||he.handleEdit({thumbnail:e}));const t=await g.handleAddFileByUrl(e,!0);if(!t)throw new Error("Не удалось загрузить файл");ct.current===e&&(null==he||he.handleEdit(t))}}finally{ct.current===e&&(ct.current=null)}}},[null==We?void 0:We.fileForEdit,Be,he,g]);a(()=>{mt()},[mt]),a(()=>{var e,t,n;Be===Xr?(console.warn("reset requests"),Je([]),qe(jE),rt([]),tt(FE),lt([]),at(""),ft(!1),ht(!1)):Be===Zr?null===(e=gt.current)||void 0===e||e.focus():Be===Kr?null===(t=Qe.current)||void 0===t||t.focus():Be===qr&&(null===(n=it.current)||void 0===n||n.focus())},[Be]);const vt=i.useCallback(async()=>{var e;await $e(),await(null===(e=v.current)||void 0===e?void 0:e.refreshFileCounts())},[$e]),bt=I.size,yt=i.useMemo(()=>{var e,t;if(1!==bt)return!1;const n=Array.from(I)[0],r=T.find(e=>e.id===n);if(!r||r.isFolder)return!1;let i=!1;if(r.type&&r.type.startsWith("image/"))i=!0;else if(r.extension){const e=r.extension.toLowerCase();i=ei.includes(e)}else{const t=null===(e=r.name.split(".").pop())||void 0===e?void 0:e.toLowerCase();i=!!t&&ei.includes(t)}return console.log("isImageSelected проверка:",{fileName:r.name,fileType:r.type,fileExtension:r.extension,nameExtension:null===(t=r.name.split(".").pop())||void 0===t?void 0:t.toLowerCase(),isImage:i,IMAGE_EXTENSIONS:ei}),i},[bt,I,T]);return t(Q,{className:"file-manager__layout",children:[f.showResizeGuide&&e("div",{className:"resize-guide",style:{left:`${f.resizeGuidePosition}px`}}),t(Q,{className:"file-manager__content",children:[t(PE,{width:320,theme:"light",className:"file-manager-sider",children:[e(lo,{ref:v,selectedFolder:Z||"folders",generateMenuItems:A,onFolderSelect:e=>null==ee?void 0:ee(e),folders:b||[],fetchFolders:w,fetchChildFolders:x,handleAddFile:ge,setIsUrlModalVisible:e=>null==Ve?void 0:Ve(e),handleDeleteFolder:ye,handleCreateFolder:C,activeLibraryItem:Be,setActiveLibraryItem:e=>null==He?void 0:He(e)}),e("div",{className:"sidebar-resizer "+(f.isResizing?"resizing":""),onMouseDown:f.handleResizeStart,onDoubleClick:f.handleDoubleClick,children:e("div",{className:"sidebar-resizer-indicator"})})]}),e(Q,{className:"file-manager__main-content",children:t(ME,{className:"main-content",ref:pt,children:[e(BO,{activeLibraryItem:Be}),e(K,{className:"zero-divider"}),Be===Xr&&e(Yi,{searchTerm:oe,sortField:Se.sortField||"name",setSortField:e=>null==Ue?void 0:Ue(e),pathHistory:J||[],handleBreadcrumbClick:e=>null==te?void 0:te(e),handleAddFile:ge,setIsUrlModalVisible:e=>null==Ve?void 0:Ve(e),files:T||[],handleSearch:le,handleSort:ce,sortBy:ae,sortOrder:se,handleSortOptionChange:Xe,pagination:re,setPagination:Ge,loading:xe,handleItemClick:e=>null==ne?void 0:ne(e),handleDeleteFile:ve,selectedFiles:I||new Set,toggleFileSelection:e=>null==N?void 0:N(e),handleDroppedFiles:be,fileUpload:p,onClearSelection:we.handleClearSelection,onRename:we.handleRename,onCopy:we.handleCopy,onMove:we.handleMove,onDelete:we.handleDeleteSelected,onEdit:he.handleEdit}),Be===Kr&&e(qO,{imageGifList:Ze,setImageGifList:Je,currentReqGif:Ke,setCurrentReqGif:qe,inputRef:Qe,customRequest:R}),Be===qr&&e(yE,{imageStockList:nt,setImageStockList:rt,currentReq:et,setCurrentReq:tt,inputRef:it,customRequest:R}),Be===Zr&&!!(null==We?void 0:We.sseQuery)&&e(OE,{imageAiList:st,setImageAiList:lt,aiImageRequest:ot,setAiImageRequest:at,inputAiRef:gt,customRequest:e=>L(e.file),isLoadingAi:ut,setIsLoadingAi:ht,isImageUploaded:dt,setIsImageUploaded:ft,aiTabRef:pt}),Be===Jr&&e(n,{}),e("div",{children:yt&&t(n,{children:[e(K,{className:"zero-divider"}),e("div",{style:{display:"flex",justifyContent:"right",padding:"17px 24px",alignItems:"center"},children:e(z,{size:"large",type:"primary",style:{height:40,fontSize:18},onClick:()=>{if(ke.onEditorOk){const e=Array.from(I)[0],t=T.find(t=>t.id===e);t&&ke.onEditorOk(t)}},children:m("Choose")})})]})})]})})]}),e($i,{isModalVisible:Fe,handleModalOk:_,handleModalCancel:S,form:Te,selectedFolder:Z||null,folders:b||[],isUrlModalVisible:je,setIsUrlModalVisible:e=>null==Ve?void 0:Ve(e),handleAddFileByUrl:me,urlForm:Ie,isRenameModalVisible:E,handleRenameOk:()=>null==U?void 0:U(),handleRenameCancel:()=>null==V?void 0:V(),renameForm:Oe,fileToRename:P,files:T||[],isMoveModalVisible:De,handleMoveOk:fe,handleMoveCancel:Y,moveForm:Ee,selectedFiles:I||new Set,isRenameFolderModalVisible:Re,handleRenameFolderOk:vt,handleRenameFolderCancel:Ye,renameFolderForm:Pe,folderToRename:Ne,isCopyModalVisible:Le,handleCopyOk:pe,handleCopyCancel:l.actions.handleCopyCancel||(()=>{}),copyForm:Me,isDeleteConfirmVisible:ze,handleDeleteConfirmOk:de,handleDeleteConfirmCancel:()=>null==X?void 0:X(),fetchChildFolders:x}),e(xO,{visible:he.isPixieEditorVisible,onClose:he.handlePixieEditorClose,file:he.editingFile,onSave:he.handlePixieEditorSave}),e(LO,{files:p.uploadFiles,visible:p.isUploadVisible,minimized:p.isUploadMinimized,totalFiles:p.totalFiles,completedFiles:p.completedFiles,onClose:p.closeUpload,onMinimize:p.minimizeUpload,onInsert:p.insertFile})]})},RE=f(({config:r={},onPathChange:o,onChangeSelection:s,onEditorOk:l,searchQuery:c="",sortBySize:h="name",apiEndpoints:d={},customIcons:f,dragDropIcon:p,dataProviders:g,notification:m})=>{const v=i.useMemo(()=>Object.assign({folderTreeLoading:"lazy",expandAllFoldersOnInit:!1,iconStrokeWidth:1.4},r),[r]);i.useEffect(()=>{v.theme&&(e=>{document.documentElement.setAttribute("data-theme",e)})(v.theme),EE(v)},[v]),a(()=>{v.locale&&v.locale!==mr.language&&(console.warn("FileManagerApp: меняем локаль с",mr.language,"на",v.locale),mr.changeLanguage(v.locale)),v.customLocale&&v.locale&&mr.addResourceBundle(v.locale,"translation",v.customLocale,!0,!0)},[v.locale,v.customLocale]);const b=u(null);return e(I,{className:"em-filemanager",children:t(n,{children:[e(T,{getPopupContainer:()=>b.current||document.body,children:e(ii,{options:{apiEndpoints:d,searchQuery:c,sortBySize:h,onPathChange:o,onChangeSelection:s,onEditorOk:l,config:v,customIcons:f,dragDropIcon:p,dataProviders:g,notification:m},children:e(DE,{})})}),e("div",{ref:b,className:"file-manager-modal-root"})]})})});RE.displayName="FileManagerApp";const LE=t=>{var n,r,i;return e(kn,{i18n:mr,children:e(nn,{externalTheme:null!==(r=null===(n=t.config)||void 0===n?void 0:n.theme)&&void 0!==r?r:"light",customThemeToken:null===(i=t.config)||void 0===i?void 0:i.customTheme,children:e(ie,{children:e(RE,Object.assign({},t))})})})},zE=new Map,NE=(t,n)=>{var r;let i;sn();let o={};const a=e=>{const t=!e||"fileManager"!==e.mode&&"imageCenter"!==e.mode&&"plugin"!==e.mode?void 0:e.mode;return"imageCenter"===t?on("imageCenter",e):on(t)};if(t instanceof HTMLElement){i=t;o={config:a(n),apiEndpoints:null==n?void 0:n.apiEndpoints}}else{i=t.element;const e=a(t.config),n=Object.assign(Object.assign({},null===(r=t.config)||void 0===r?void 0:r.apiEndpoints),t.apiEndpoints);o={config:e,currentPath:t.currentPath,onPathChange:t.onPathChange,onChangeSelection:t.onChangeSelection,searchQuery:t.searchQuery,sortBySize:t.sortBySize,apiEndpoints:n,dataProviders:t.dataProviders,customIcons:t.customIcons,dragDropIcon:t.dragDropIcon}}const s=A(i);s.render(e(LE,Object.assign({},o))),zE.set(i.id||`container_${Date.now()}`,s)},BE=e=>{const t=e.id||Object.keys(zE).find(e=>e.startsWith("container_"));if(t&&zE.has(t)){const e=zE.get(t);null==e||e.unmount(),zE.delete(t)}else{console.warn("Не удалось найти корень для размонтирования");try{A(e).unmount()}catch(e){console.error("Ошибка при размонтировании компонента:",e)}}},VE=new Map,UE=r=>{const{onClose:o,onSave:a,dataProviders:s,theme:l}=r,c=i.useMemo(()=>{if(r.file)return r.file;const e=r.name||"edited-image",t=r.extension||(r.type?r.type.split("/")[1]:"png"),n=r.type||`image/${t}`;return{thumbnail:r.imageDataUrl||"",name:e,id:void 0,type:n,extension:t}},[r.file,r.imageDataUrl,r.name,r.extension,r.type]),h=i.useCallback(async e=>{if((null==s?void 0:s.updateFile)&&e.id&&e.thumbnail)try{let t=e.type||"image/png";if(e.thumbnail.startsWith("data:")){const n=e.thumbnail.match(/^data:([^;]+)/);n&&n[1].startsWith("image/")&&(t=n[1])}const n=e.thumbnail.split(",")[1],r=atob(n),i=new Array(r.length);for(let e=0;e<r.length;e++)i[e]=r.charCodeAt(e);const o=new Uint8Array(i),a=new Blob([o],{type:t}),l=t.split("/")[1],c=e.name.substring(0,e.name.lastIndexOf("."))+"."+l;e=await s.updateFile(e.id,{name:c,type:t,data:a,thumbnail:e.thumbnail,extension:l})}catch(e){console.error("Standalone Pixie: updateFile error",e)}return a&&await a(e),e},[a,s]),d=u(null);return e(I,{className:"em-filemanager",children:t(n,{children:[e(T,{getPopupContainer:()=>d.current||document.body,children:e(kn,{i18n:mr,children:e(nn,{externalTheme:null!=l?l:"light",children:e(ie,{children:e(ii,{options:{dataProviders:s,config:{theme:null!=l?l:"light",locale:r.locale}},children:e(xO,{visible:!0,onClose:o,file:c,onSave:h})})})})})}),e("div",{ref:d,className:"file-manager-modal-root"})]})})},HE=t=>{sn();const n=t.element,r=A(n);r.render(e(UE,Object.assign({},t))),VE.set(n.id||`pixie_container_${Date.now()}`,r)},WE=e=>{const t=Array.from(VE.keys()).find(e=>e.startsWith("pixie_container_")),n=e.id||t;if(n&&VE.has(n)){const e=VE.get(n);null==e||e.unmount(),VE.delete(n)}else{console.warn("Не удалось найти корень Pixie для размонтирования");try{A(e).unmount()}catch(e){console.error("Ошибка при размонтировании Pixie:",e)}}},YE=e=>{var t,n;const{mode:r,element:i,fileManager:o,pixieEditor:a,theme:s,dataProviders:l}=e;let c,u;const h={unmount:()=>{c&&BE(c),u&&WE(u)},unmountFileManager:void 0,unmountPixieEditor:void 0};switch(r){case"fileManager":c=i,NE(i,Object.assign(Object.assign({},null==o?void 0:o.config),{theme:s||(null===(t=null==o?void 0:o.config)||void 0===t?void 0:t.theme),apiEndpoints:null==o?void 0:o.apiEndpoints})),h.unmountFileManager=()=>BE(c);break;case"pixieEditor":u=i,HE(Object.assign({element:i,theme:s||(null==a?void 0:a.theme),dataProviders:l||(null==a?void 0:a.dataProviders)},a)),h.unmountPixieEditor=()=>WE(u);break;case"both":{const e=document.createElement("div");e.id="file-manager-container",e.style.cssText="height: 50%; border-bottom: 1px solid #d9d9d9;";const t=document.createElement("div");t.id="pixie-editor-container",t.style.cssText="height: 50%;",i.appendChild(e),i.appendChild(t),c=e,u=t,NE(c,Object.assign(Object.assign({},null==o?void 0:o.config),{theme:s||(null===(n=null==o?void 0:o.config)||void 0===n?void 0:n.theme),apiEndpoints:null==o?void 0:o.apiEndpoints})),HE(Object.assign({element:u,theme:s||(null==a?void 0:a.theme),dataProviders:l||(null==a?void 0:a.dataProviders)},a)),h.unmountFileManager=()=>BE(c),h.unmountPixieEditor=()=>WE(u);break}}return h};var $E={init:NE,unmount:BE,initPixieEditor:HE,unmountPixieEditor:WE,initFileManager:YE};export{Yi as FileContent,RE as FileManagerApp,LE as FileManagerAppWithContext,$i as FileModals,lo as FolderSidebar,UE as PixieOnlyApp,$E as default,NE as init,YE as initFileManager,HE as initPixieEditor,sn as installResizeObserverErrorHandler,ln as uninstallResizeObserverErrorHandler,BE as unmount,WE as unmountPixieEditor};
|
|
96
96
|
//# sourceMappingURL=file-manager.esm.js.map
|