hfs 3.3.0-rc8 → 3.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -7
- package/admin/assets/{AccountsPage-DQRe_C6C.js → AccountsPage-Cvi9DSc1.js} +1 -1
- package/admin/assets/{ArrayField-vuFXnbl0.js → ArrayField-ChS9pNra.js} +1 -1
- package/admin/assets/{ConfigFilePage-C8Ptafyz.js → ConfigFilePage-6jCYVkbr.js} +1 -1
- package/admin/assets/{CustomHtmlPage-ixjEFOSj.js → CustomHtmlPage-DaEXsEcQ.js} +1 -1
- package/admin/assets/{DataTable-CIY80zu-.js → DataTable-Cf5S5yWr.js} +1 -1
- package/admin/assets/{DateTimeField-DS0GD_Km.js → DateTimeField--mTsSB1l.js} +1 -1
- package/admin/assets/{EventManager-CgaKYrmd.js → EventManager-BJWba-fL.js} +1 -1
- package/admin/assets/{FileField-BM5hiNL9.js → FileField-B0WhrAuk.js} +3 -3
- package/admin/assets/{InternetPage-B2zIzmNu.js → InternetPage-BICQDG_K.js} +1 -1
- package/admin/assets/{LangPage-CX9ANWrl.js → LangPage-D42UPSxC.js} +1 -1
- package/admin/assets/{LogsPage-CGXaChDs.js → LogsPage-DQTrf5GE.js} +1 -1
- package/admin/assets/{MenuButton-713XH2Rb.js → MenuButton-DDfB3119.js} +1 -1
- package/admin/assets/{MonitorPage-DbwLo7in.js → MonitorPage-CH06c8aW.js} +1 -1
- package/admin/assets/{OptionsPage-BTAS5Bs4.js → OptionsPage-BvXLA_R0.js} +1 -1
- package/admin/assets/{PluginsPage-CmAmw0TY.js → PluginsPage-CyaVJZkM.js} +1 -1
- package/admin/assets/{Tabs-C_HqOZ81.js → Tabs-CGfV3BK0.js} +1 -1
- package/admin/assets/{TextEditor-Cwc9np9p.js → TextEditor-Df9LSzm6.js} +1 -1
- package/admin/assets/{VfsPathField-BF2KjLLq.js → VfsPathField-6Kyy5vuQ.js} +1 -1
- package/admin/assets/{agentIcons-NVIBNyll.js → agentIcons-DwT9U-lh.js} +1 -1
- package/admin/assets/{baseUrl-CcZGsszU.js → baseUrl-D7S0KsqZ.js} +1 -1
- package/admin/assets/{icons-Bs1_FA3W.js → icons-DWkdo8hc.js} +1 -1
- package/admin/assets/{index-BTUyewGO.js → index-BDdPG215.js} +2 -2
- package/admin/assets/{routing-yGZRCrnR.js → routing-CxxvyWME.js} +1 -1
- package/admin/index.html +1 -1
- package/npm-shrinkwrap.json +2 -2
- package/package.json +3 -3
- package/src/config.js +1 -1
- package/src/perm.js +7 -2
- package/src/webdav.js +1 -1
package/README.md
CHANGED
|
@@ -79,13 +79,16 @@ The minimum Windows version required is 10 or Server 2019.
|
|
|
79
79
|
3. The browser should automatically open at `localhost`, so you can configure the rest in the Admin-panel.
|
|
80
80
|
|
|
81
81
|
Troubleshooting
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
82
|
+
- If a browser cannot be opened on the computer where HFS runs, enter `create-admin <PASSWORD>`
|
|
83
|
+
in the **running HFS console** (this is not an OS shell command), then log in as `admin` with that password.
|
|
84
|
+
- If you cannot access the HFS console (for example, when running as a service),
|
|
85
|
+
you can [edit the config file to add your admin account](config.md#accounts)
|
|
86
|
+
- If you don't want to use an editor, you can create the file with this command:
|
|
87
|
+
`echo "create-admin: PASSWORD" > config.yaml`
|
|
88
|
+
- For a new Docker installation, set `HFS_INITIAL_ADMIN_PASSWORD` to **only the password**, and log in as `admin`.
|
|
89
|
+
It is used only when creating `config.yaml`; afterwards, manage the password in HFS and keep the config volume persistent.
|
|
90
|
+
The older `HFS_CREATE_ADMIN` takes precedence when non-empty and, by default, reapplies its password at every container start.
|
|
91
|
+
See [Docker setup](https://github.com/rejetto/hfs/wiki/Docker).
|
|
89
92
|
|
|
90
93
|
By default, HFS does not require a login when you access the *Admin-panel* from localhost.
|
|
91
94
|
If you don't like this behavior, disable it in the Admin-panel or enter this console command `config localhost_admin false`.
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-CacB07dV.js";import{t}from"./DateTimeField
|
|
1
|
+
import{i as e}from"./rolldown-runtime-CacB07dV.js";import{t}from"./DateTimeField--mTsSB1l.js";import{n,r,t as i}from"./MenuButton-DDfB3119.js";import{n as a,t as o}from"./VfsPathField-6Kyy5vuQ.js";import{Bn as s,C as c,Ct as l,Da as u,E as d,Ea as f,Et as p,F as m,Ft as h,H as g,Ir as _,Lt as v,M as y,Ma as b,N as x,O as S,Oa as C,Pa as w,R as T,S as E,St as D,Ta as O,U as k,Ut as A,W as j,Wr as M,Yt as N,_ as ee,_i as P,_r as te,ai as F,en as I,fr as L,ft as R,gt as ne,ht as re,it as ie,j as ae,jr as oe,ka as se,lr as z,lt as ce,mt as B,ni as le,nr as ue,q as de,ri as fe,st as pe,tr as me,tt as V,vi as H,w as he,y as U,zt as ge}from"./index-BDdPG215.js";import{$ as _e,J as ve,Q as ye,X as be,Y as xe,Z as Se,et as W,it as Ce,nt as we,rt as G,tt as Te}from"./icons-DWkdo8hc.js";var K=e(w());u();var Ee=[`password`,`password2`,`adminActualAccess`,`hasPassword`,`invalidated`,`canLogin`,`members`];function De({account:e,done:n,groups:r,addToBar:i,reload:a}){var u,m;let{username:h}=ie(),[_,v]=(0,K.useState)(e),[x,S]=(0,K.useState)([]),C=I();(0,K.useEffect)(()=>{var t;v(e),S(r.filter(t=>t!==e.username)),C||(t=k.current)==null||(t=t.querySelector(`input`))==null||t.focus()},[JSON.stringify(e)]);let w=!e.username,{isGroup:T}=_,k=(0,K.useRef)(),{members:A}=e,j=(u=e.plugin)==null?void 0:u.auth;return(0,K.createElement)(ce,{key:e.username,formRef:k,values:_,set(e,t){v(n=>f(f({},n),{},{[t]:e}))},barSx:f({gap:2,width:`100%`},de()),stickyBar:!0,addToBar:[!w&&(0,K.createElement)(c,f(f({icon:G,title:`Delete`,confirm:`Delete ${e.username}?`},h===e.username&&{disabled:!0,title:`Cannot delete current account`}),{},{onClick:()=>z(`del_account`,{username:e.username}).then(a)})),(0,K.createElement)(c,{icon:xe,title:`Invalidate past sessions${s(`
|
|
2
2
|
(already invalidated sessions before `,D(e.invalidated||0),`)`)}`,confirm:`Invalidate all sessions up to now for "${e.username}"?`,doneMessage:!0,onClick:()=>z(`invalidate_sessions`,{username:e.username}).then(a)}),...me(i)],fields:[{k:`username`,label:T?`Group name`:void 0,autoComplete:`off`,required:!0,md:T&&!j?12:4,getError:t=>t!==e.username&&z(`get_account`,{username:t}).then(t=>(t==null?void 0:t.username)===e.username?`usernames are case-insensitive`:`already used`,()=>!1)},j&&{k:``,md:8,comp:(0,K.createElement)(H,{severity:`info`},` Authentication handled by a plugin`)},!T&&!j&&{k:`password`,xs:6,md:4,type:`password`,autoComplete:`new-password`,required:w,label:w?`Password`:`Change password`},!T&&!j&&{k:`password2`,xs:6,md:4,type:`password`,autoComplete:`new-password`,label:`Repeat password`,getError:(e,{values:t})=>(e||``)!==(t.password||``)&&`Enter same password`},{k:`disabled`,comp:R,fromField:e=>!e,toField:e=>!e,label:`Enabled`,xs:12,sm:6,lg:4,helperText:_.disabled||_.canLogin!==!1?`Login is prevented if account is disabled, or all its groups are disabled`:(0,K.createElement)(F,{sx:{color:`warning.main`},component:`span`},new Date(e.expire)<new Date?`Login is prevented because account is expired`:`Login is prevented because all of its groups are disabled`)},{k:`ignore_limits`,comp:R,xs:12,sm:6,lg:4,helperText:_.ignore_limits?`Speed limits don't apply to this account`:`Speed limits apply to this account`},f({k:`admin`,comp:R,fromField:e=>e||null,label:`Admin-panel access`,xs:12,sm:6,lg:4,helperText:`To access THIS interface you are using right now`},!e.admin&&e.adminActualAccess&&{value:!0,disabled:!0,helperText:`This permission is inherited. To disable it, act on the groups.`}),!T&&{k:`require_password_change`,comp:R,xs:12,sm:6,lg:4,helperText:`At next login, but can be dismissed`},{k:`disable_password_change`,label:`Password change`,comp:ne,xs:12,sm:6,lg:4,defaultValue:null,options:{[`Default (${_.canChangePassword?`Allowed`:`Disabled`})`]:null,Allowed:!1,Disabled:!0}},A?T&&!A.length?(0,K.createElement)(F,{},`No members`):A.length>0&&(0,K.createElement)(E,{gap:0,flexWrap:`wrap`},`${A.length} members: `,N(`,\xA0`,(m=e.members)==null?void 0:m.map(e=>(0,K.createElement)(r.includes(e)?`i`:`span`,{},e))),(0,K.createElement)(U,{icon:G,confirm:`Delete ${e.members.length} accounts?`,onClick:()=>z(`del_account`,{username:e.members}).then(a),sx:{verticalAlign:`text-top`}})):null,T&&(0,K.createElement)(H,{severity:`info`},`To add users to this group, select the user and then click "Inherit"`),{k:`belongs`,comp:re,label:`Inherit from groups`,options:x,sm:6,lg:4,helperText:`Specify groups to inherit permissions from`+(T?`. A group can inherit from another group`:``)+(x.length?``:`. Now disabled because there are no groups to select, create one first.`)},{k:`allow_net`,comp:d,label:`Allowed network address`,sm:6,lg:4,placeholder:`any address`},!T&&{k:`auto_login_net`,comp:d,label:`Auto-login by IP address`,sm:6,lg:4,placeholder:`none`},{k:`redirect`,comp:o,placeholder:`no`,sm:6,lg:4,helperText:`If you want this account to be redirected to a specific folder/address (or even file) at login time`},{k:`expire`,label:`Expiration`,sm:6,lg:4,comp:t,toField:e=>e&&new Date(e),helperText:`When expired, login won't be allowed`},f(f({k:`days_to_live`,sm:6,lg:4,comp:B,step:`any`,min:1/1e3},_.expire&&{xs:12,disabled:!0,sx:{opacity:.2}}),{},{helperText:`Used to set expiration on first login`}),{k:`notes`,multiline:!0,sm:6,lg:4}],onError:g,save:f(f({},y(l(_,e))),{},{onClick(){return b(function*(){var t;let{password:r=``,password2:i,adminActualAccess:a,hasPassword:o,invalidated:s,canLogin:c,members:l}=_,u=O(_,Ee),d=((t=k.current)==null?void 0:t.querySelector(`button.saveBtn`))||void 0;if(w){let e=yield z(`add_account`,u);if(r)try{yield p(_.username,r)}catch(e){throw z(`del_account`,{username:_.username}),e}n(e==null?void 0:e.username,d);return}let m=yield z(`set_account`,{username:e.username,changes:u});r&&(yield p(_.username,r),v(e=>f(f({},e),{},{password:``,password2:``}))),e.username===h&&(V.username=m.username),n(m==null?void 0:m.username,d)})()}})})}var q=e(L());se(),u();var J={fieldSeparator:`,`,lineSeparator:`
|
|
3
3
|
`,quote:`"`},Y={field:0,fieldOffset:0,line:0,lineOffset:0,quoted:!1,appendCell:!1,appendField:!1,appendRow:!1},X=class extends Error{constructor(e,t){super(`Invalid CSV at ${e}:${t}`)}},Oe=class{constructor(e=J){C(this,`_rows`,[]),C(this,`_row`,[]),C(this,`_cell`,``),C(this,`_options`,J),C(this,`_state`,f({},Y)),C(this,`_index`,0),C(this,`_current`,``),C(this,`_previous`,``),C(this,`_quoteState`,f({},Y)),this._options=Object.assign({},J,e)}parse(e){for(this.reset(),this._index=0;this._index<e.length;this._index++)this._state.appendCell=!0,this._previous=this._current,this._current=e[this._index],this.handleNext();if(this._row.length>0&&(this.addField(this.fieldValue(this._cell),this._row,this._state),this.addRow(this._row,this._rows,this._state)),this._state.quoted)throw new X(this._quoteState.line,this._quoteState.lineOffset);return this.makeImmutable(),this._rows}get rows(){return this._rows}get json(){if(this.rows.length>0){let e=this.rows[0].filter(e=>typeof e==`string`);return Object.freeze(this.rows.filter((e,t)=>e&&t>0).map(t=>{let n={};return e.forEach((e,r)=>{n[e]=t[r]}),Object.freeze(n)}))}return Object.freeze([])}handleNext(){this.handleQuote()||this.handleFieldSeparator()||this.handleLineSeparator(),this.processState()}handleQuote(){return this._current===this._options.quote?(this._quoteState=f({},this._state),this._previous===`\\`?this.handleQuoteEscaped():this.handleQuoteNotEscaped(),!0):!1}handleQuoteEscaped(){this._cell=this._cell.slice(0,Math.max(0,this._cell.length-1))}handleQuoteNotEscaped(){if(this._cell.length===0||this._state.quoted)this._state.quoted=!this._state.quoted;else throw new X(this._state.line,this._state.lineOffset);this._state.appendCell=!1}handleFieldSeparator(){return this._current===this._options.fieldSeparator?(this._state.quoted||(this._state.appendCell=!1,this._state.appendField=!0),!0):!1}handleLineSeparator(){return this._current===this._options.lineSeparator?(this._state.quoted||(this._state.appendCell=!1,this._state.appendField=!0,this._state.appendRow=!0),!0):!1}processState(){this._state.appendCell&&(this._cell+=this._current),this._state.appendField&&(this.addField(this.fieldValue(this._cell),this._row,this._state),this._cell=``),this._state.appendRow&&(this.addRow(this._row,this._rows,this._state),this._row=[]),this._state.lineOffset++,this._state.fieldOffset++}fieldValue(e){return e}addField(e,t,n){t.push(e),n.field++,n.fieldOffset=-1,n.appendField=!1}addRow(e,t,n){t.push(e),n.field=0,n.line++,n.lineOffset=-1,n.appendRow=!1}makeImmutable(){this.rows.forEach(e=>{e.forEach(e=>Object.freeze(e)),Object.freeze(e)}),Object.freeze(this._rows)}reset(){this._rows=[],this._row=[],this._cell=``,this._state=f({},Y),this._index=0,this._current=``,this._previous=``,this._quoteState=f({},Y)}};u();function ke(e){return Z.apply(this,arguments)}function Z(){return Z=b(function*(e){v(function(){var t=b(function*(t){let n=t==null?void 0:t[0];if(!n)return;let r=yield h(n);if(!r)return;let i=new Oe().parse(r.trim()),a={comp:B,min:1,max:9,xs:6,typing:!0},o={skipFirstLines:0,usernameColumn:1,passwordColumn:2,groupColumn:3,redirectColumn:4,overwriteExistingAccounts:!1},c=yield j({title:`Import accounts from CSV`,dialogProps:{maxWidth:`sm`},values:o,form:e=>{let t=i[e.skipFirstLines||0]||[],n=u(t,f(f({},o),e));return{save:{startIcon:(0,K.createElement)(ve),children:`Go`},fields:[(0,K.createElement)(F,{sx:{p:1}},`Total lines:`,i.length),{k:`skipFirstLines`,comp:B,max:i.length-1,typing:!0,md:6,getError:e=>e!=null&&!Number.isInteger(e)&&`Enter an integer`,helperText:(0,K.createElement)(K.Fragment,{},`First line: `,(0,K.createElement)(`code`,{},t.join(`, `)))},{k:`overwriteExistingAccounts`,comp:R,md:6},f(f({k:`usernameColumn`},a),{},{helperText:(0,K.createElement)(K.Fragment,{},`First username: `,n.u)}),f(f({k:`passwordColumn`},a),{},{helperText:(0,K.createElement)(K.Fragment,{},`First password: `,n.p)}),f(f({k:`groupColumn`},a),{},{helperText:(0,K.createElement)(K.Fragment,{},`First group: `,n.g)}),f(f({k:`redirectColumn`},a),{},{helperText:(0,K.createElement)(K.Fragment,{},`First redirect: `,n.r)})]}}});if(!c)return;let{close:l}=A({title:`Importing...`,Content(){let[t,n]=(0,K.useState)(0),[r,a]=(0,K.useState)();return(0,K.useEffect)(()=>{let t=!1;return setTimeout(b(function*(){if(t)return;let r=0,o=0,d=c.skipFirstLines,f=i.length-d,m=0;try{for(let e of i){var h;if(t)return;if(d){d--;continue}let i=u(e,c);a(i),n(m++/f),yield z(`add_account`,{username:i.u,belongs:(h=i.g)==null?void 0:h.split(`,`),redirect:i.r,overwrite:c.overwriteExistingAccounts}).then(()=>{if(i.p)return p(i.u,i.p)}).catch(e=>{if(e.code===409)return o++;r++})}}finally{l();let t=m-r-o;g(`Results: `+[s(``,r,` failed`),s(``,t,` succeeded`),s(``,o,` skipped because already present`)].filter(Boolean).join(`, `),!t&&r?`error`:r||o?`warning`:`success`),e==null||e()}})),()=>{t=!0}},[]),(0,K.createElement)(F,{sx:{display:`flex`,gap:2,alignItems:`center`}},(0,K.createElement)(he,{icon:W,progress:t}),r==null?void 0:r.u)}});function u(e,t){return{u:e[t.usernameColumn-1],p:e[t.passwordColumn-1],g:e[t.groupColumn-1],r:e[t.redirectColumn-1]}}});return function(e){return t.apply(this,arguments)}}(),{multiple:!1,accept:`.csv`})}),Z.apply(this,arguments)}u();var Ae=` `,Q=e=>e==null?void 0:e.split(Ae).at(-1);function je(){let{username:e,accountsAsTree:t}=ie(),{data:o,reload:s,element:l}=ee(`get_accounts`),[u,d]=(0,K.useState)([]),p=Array.isArray(u);(0,K.useEffect)(()=>{Array.isArray(o==null?void 0:o.list)&&p&&d(u.filter(e=>o.list.find(t=>(t==null?void 0:t.username)===Q(e))))},[o]);let h=(0,K.useMemo)(()=>o&&q.default.sortBy(o.list,[e=>!e.isGroup,e=>!e.adminActualAccess,`username`]),[o]),v=p&&q.default.find(h,{username:Q(u[0])}),y=m(`md`),C=!(u.length>0)||!h?null:p&&u.length>1?(0,K.createElement)(K.Fragment,{},(0,K.createElement)(E,{},(0,K.createElement)(P,{variant:`h6`},u.length+` selected`),(0,K.createElement)(U,{onClick:I,icon:G},`Remove`)),(0,K.createElement)(_,{},q.default.uniq(u.map(Q)).map(e=>(0,K.createElement)(a,{key:e},(0,K.createElement)(oe,{},e))))):ue(v||j(),e=>(0,K.createElement)(De,{account:e,groups:h.filter(e=>e.isGroup).map(e=>e.username),addToBar:y&&[(0,K.createElement)(F,{sx:{flex:1}}),$(e,{fontSize:`large`,sx:{p:1}}),(0,K.createElement)(c,{icon:pe,title:`Close`,onClick:N})],reload:s,done(e,t){d(y?[e]:[]),s(),S(``,t)}}));(0,K.useEffect)(()=>{if(y||!C||!u.length)return;let{close:e}=A({title:q.default.isString(u)?q.default.startCase(u):u.length>1?`Multiple selection`:v?(v.isGroup?`Group: `:`User: `)+v.username:`?`,Content:()=>C,onClose(e){e||N()}});return()=>void e(!0)},[y,u,v]);let w={height:`100%`,display:`flex`,flexDirection:`column`,overflow:`auto`},[D,O]=T(`Show tree`,`Show list`,()=>({icon:te}),t);return V.accountsAsTree=D,l||(0,K.createElement)(M,{container:!0,sx:{rowSpacing:1,columnSpacing:2,top:0,flex:`1 1 auto`,height:0}},(0,K.createElement)(M,{size:{xs:12,md:5,lg:4,xl:5},sx:w},(0,K.createElement)(F,{sx:{display:`flex`,flexWrap:`wrap`,gap:2,mb:2,boxShadow:e=>`0px -8px 4px 10px ${e.palette.background.paper}`,position:`sticky`,top:0,zIndex:2,backgroundColor:`background.paper`,width:`fit-content`}},(0,K.createElement)(i,{variant:`contained`,startIcon:(0,K.createElement)(Se),items:[{children:`user`,onClick:()=>d(`new-user`)},{children:`group`,onClick:()=>d(`new-group`)},{children:`from CSV`,onClick:()=>ke(s)}]},`Add`),x(s),O,(h==null?void 0:h.length)>0&&(0,K.createElement)(P,{sx:{p:1}},`${h.length} account(s)`)),!(h!=null&&h.length)&&(0,K.createElement)(H,{severity:`info`},ge`To access administration <u>remotely</u> you will need to create a user account with admin permission`),(0,K.createElement)(r,{multiSelect:!0,sx:{pr:4,pb:2,minWidth:`15em`},selectedItems:p?u:[],slots:{collapseIcon:Te,expandIcon:Ce},onSelectedItemsChange(e,t){var n,r;!(e==null||(n=e.target)==null||(r=n.closest)==null)&&r.call(n,`.MuiTreeItem-iconContainer`)||d(t)}},h&&(function e(t,r=``){return t.map(t=>{var i,a;return(0,K.createElement)(n,{key:t.username,itemId:r+t.username,label:(0,K.createElement)(F,{sx:{display:`flex`,flexWrap:`wrap`,padding:`.2em 0`,columnGap:`.5em`,alignItems:`center`}},$(t),(t.disabled||t.canLogin===!1)&&ae(we,t.disabled?`Disabled`:`Disabled by its groups`,t.disabled?void 0:{color:`text.secondary`}),(t.expire||t.days_to_live)&&(0,K.createElement)(be),t.adminActualAccess&&ae(_e,`Can login into Admin`),t.username,!!((i=t.belongs)!=null&&i.length)&&(0,K.createElement)(F,{sx:{color:`text.secondary`,fontSize:`small`}},`(`,(a=t.belongs)==null?void 0:a.join(`, `),`)`))},D&&e(h.filter(e=>{var n;return(n=t.directMembers)==null?void 0:n.includes(e.username)}),r+t.username+Ae))})})(D?h.filter(e=>!h.some(t=>{var n;return(n=t.members)==null?void 0:n.includes(e.username)})):h))),y&&C&&(0,K.createElement)(M,{size:`grow`,sx:f(f({},w),{},{maxWidth:`100%`})},(0,K.createElement)(fe,{sx:{overflow:`initial`}},(0,K.createElement)(le,{},C))));function j(){return{username:``,hasPassword:u===`new-user`,adminActualAccess:!1,invalidated:void 0,canLogin:!0,canChangePassword:!0,isGroup:u===`new-group`,members:[],directMembers:[]}}function N(){d([])}function I(){return L.apply(this,arguments)}function L(){return L=b(function*(){if(typeof u==`string`||u.some(t=>Q(t)===e)&&!(yield k(`You cannot ask to delete the account you are using. Continue with the rest?`)))return;let t=q.default.without(q.default.uniq(u.map(Q)),e);if(!t.length)return g(`Nothing to delete`,`info`);if(!(yield k(`Delete ${t.length} item(s)?`)))return;let n=[];for(let e of t)(yield z(`del_account`,{username:e}).then(()=>1,()=>0))||n.push(e);if(s(),n.length)return g(`The following items couldn't be deleted: `+n.join(`, `),`error`)}),L.apply(this,arguments)}}function $(e,t={}){return(0,K.createElement)(e.isGroup?W:ye,t)}export{je as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-CacB07dV.js";import{n as t,t as n}from"./DataTable-
|
|
1
|
+
import{i as e}from"./rolldown-runtime-CacB07dV.js";import{n as t,t as n}from"./DataTable-Cf5S5yWr.js";import{t as r}from"./DateTimeField--mTsSB1l.js";import{Aa as i,C as a,Da as o,Ea as s,F as c,Gr as l,I as u,Kr as d,Ma as f,Pa as p,S as m,St as h,Ta as g,W as _,Wn as v,Yn as y,ai as b,b as ee,ct as x,dt as S,fr as C,ft as w,ii as T,ja as E,un as D,ut as O,wn as te}from"./index-BDdPG215.js";import{F as ne,I as re,L as ie,P as ae,q as oe,rt as se}from"./icons-DWkdo8hc.js";var k=e(p()),A=e(C());o(),i();var j=[`label`,`helperText`,`fields`,`value`,`onChange`,`onError`,`setApi`,`reorder`,`prepend`,`noRows`,`valuesForAdd`,`autoRowHeight`,`dialog`,`form`,`details`,`objectK`,`saveOn`,`applyButton`,`height`,`error`,`sx`],M=[`$width`,`$column`,`$type`,`$hideUnder`,`showIf`,`$render`,`$mergeRender`];function N(e){let{label:r,helperText:i,fields:o,value:u,onChange:p,onError:h,setApi:x,reorder:C,prepend:w,noRows:T,valuesForAdd:N,autoRowHeight:I,dialog:L,form:R,details:z,objectK:B,saveOn:V,applyButton:H,height:U,error:W,sx:G}=e,ce=g(e,j),K=Array.isArray(u)?u:!B||!u?[]:Object.entries(u).map(([e,t])=>s({[B]:e},t)),q=(0,k.useMemo)(()=>K.map((e,t)=>v(s({},e),e.hasOwnProperty(`id`)?{$idx:t}:{id:t})),[JSON.stringify(K)]),J=!!W||void 0,Y=e=>t=>s(s({fields:D(o,t).map(e=>{var n;let{$width:r,$column:i,$type:a,$hideUnder:o,showIf:s,$render:c,$mergeRender:l}=e,u=g(e,M);return(!s||s(t))&&A.default.defaults(u,(n=F[a])==null?void 0:n.field)})},R),e);x==null||x({isEqual:te});let[X,le]=(0,k.useState)();return(0,k.createElement)(k.Fragment,{},(0,k.createElement)(m,{rowGap:0,flexWrap:`wrap`,ml:`2px`},r&&(0,k.createElement)(l,{error:J,sx:{color:J?void 0:`text.primary`}},r),i&&(0,k.createElement)(d,{error:J},i)),(0,k.createElement)(b,s(s({},ce),{},{sx:S({height:U},G)}),(0,k.createElement)(n,s(s(s({rows:q,details:z},I&&{getRowHeight:()=>`auto`}),!c(`sm`)&&{compact:!0}),{},{sx:s({".MuiDataGrid-virtualScroller":{minHeight:`3em`}},I&&{".MuiDataGrid-cell":{minHeight:`52px !important`}}),hideFooterSelectedRowCount:!0,hideFooter:!0,slots:{noRowsOverlay:()=>(0,k.createElement)(ee,{},T||`No entries`)},slotProps:{pagination:{showFirstButton:!0,showLastButton:!0}},onCellDoubleClick({field:e,row:t},n){var r;let i=D(o,!1).find(t=>!(0,k.isValidElement)(t)&&t.k===e&&t.$type===`boolean`);if(!i)return;let a=(r=t.$idx)==null?t.id:r,c=t[e],l=!(i.toField||A.default.identity)(c);Z(a,s(s({},K[a]),{},{[e]:(i.fromField||A.default.identity)(l,{originalValue:c})}),n)},columns:[...D(o,!1).map(e=>{var t,n;if((0,k.isValidElement)(e))return;let r=(t=F[e.$type])==null?void 0:t.column;return A.default.defaults(s(s({field:e.k,headerName:(n=e.headerName)==null?typeof e.label==`string`?e.label:O(e.k):n,disableColumnMenu:!0,valueGetter:t=>(e.toField||A.default.identity)(t)},e.$width?{[e.$width>=8?`width`:`flex`]:e.$width}:!(r!=null&&r.width)&&!(r!=null&&r.flex)&&{flex:1}),{},{renderCell:e.$render,mergeRender:e.$mergeRender,hideUnder:e.$hideUnder},e.$column),r)}).filter(Boolean),{field:``,type:`actions`,width:90,headerAlign:`center`,renderHeader(){return(0,k.createElement)(k.Fragment,{},(0,k.createElement)(a,{icon:ie,title:`Add`,size:`small`,onClick(e){return f(function*(){let t=yield _({form:Y({}),title:`Add`,values:N,dialogProps:L});if(!t)return;let n=K.slice()||[];w?n.unshift(t):n.push(t),Q(n,e)})()}}),X!==void 0&&(0,k.createElement)(a,{icon:ae,title:`Undo`,size:`small`,onClick:e=>Q(X,e)}))},getActions({row:e}){let{$idx:n=e.id}=e,i=`Modify`;return[(0,k.createElement)(t,{key:`edit`,icon:(0,k.createElement)(oe),label:i,title:i,onClick(t){return f(function*(){t.stopPropagation();let a=yield _({values:e,form:(e,{submit:t})=>Y(V===`change`&&{save:!1,onChange(e){Z(n,e,`change`)}}||H&&{addToBar:(0,k.createElement)(P,s(s({children:`Apply`,sx:s({ml:2},H.sx)},H),{},{onClick(){t(function(){var e=f(function*(e){let t=Z(n,s(s({},K[n]),e),`save`);yield H.onClick(t)});return function(t){return e.apply(this,arguments)}}())}}))}||V&&{save:!1})(e),title:(0,k.createElement)(k.Fragment,{},i,r&&` - `,r),dialogProps:L});a&&Z(n,a,t)})()}}),(0,k.createElement)(t,{key:`delete`,icon:(0,k.createElement)(se),label:`Delete`,showInMenu:C,onClick(e){e.stopPropagation(),Q(K.filter((e,t)=>t!==n),e)}}),C&&n&&(0,k.createElement)(t,{key:`up`,icon:(0,k.createElement)(re),label:`Move up`,showInMenu:!0,onClick(e){e.stopPropagation(),Q(y(K.slice(),n,n-1),e)}}),C&&n<q.length-1&&(0,k.createElement)(t,{key:`down`,icon:(0,k.createElement)(ne),label:`Move down`,showInMenu:!0,onClick(e){e.stopPropagation(),Q(y(K.slice(),n,n+1),e)}})].filter(Boolean)}}]}))));function Z(e,t,n){return Q(K.map((n,r)=>r===e?t:n),n)}function Q(e,t){let n=$(e);return p(n,{was:u,event:t}),V!==`change`&&le(K),n}function $(e){return B?Object.fromEntries(e.map(e=>{let{[B]:t}=e;return[t,g(e,[B].map(E))]})):e}}function P(e){return(0,k.createElement)(T,s({ref:u([`s`]).ref,title:`Apply
|
|
2
2
|
(ctrl+s)`},e))}var F={boolean:{field:{comp:w},column:{renderCell:({value:e})=>e&&(0,k.createElement)(x)}},dateTime:{field:{comp:r},column:{minWidth:96,flex:.5,renderCell:({value:e})=>h(e)}}};export{N as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-CacB07dV.js";import{Bn as t,C as n,Jt as r,N as i,Nt as a,Pa as o,S as s,_ as c,ai as l,jt as u,lr as d,pt as f,qt as p,tt as m,vi as h,vt as g,y as _}from"./index-
|
|
1
|
+
import{i as e}from"./rolldown-runtime-CacB07dV.js";import{Bn as t,C as n,Jt as r,N as i,Nt as a,Pa as o,S as s,_ as c,ai as l,jt as u,lr as d,pt as f,qt as p,tt as m,vi as h,vt as g,y as _}from"./index-BDdPG215.js";import{K as v,q as y}from"./icons-DWkdo8hc.js";import{t as b}from"./TextEditor-Df9LSzm6.js";var x=e(o());function S(){m.title=`Config file`;let{data:e,reload:o,element:S}=c(`get_config_text`,{}),[C,w]=(0,x.useState)(),[T,E]=(0,x.useState)(),[D,O]=(0,x.useState)(!1);return(0,x.useEffect)(()=>{E(e==null?void 0:e.text),w(e==null?void 0:e.text)},[e]),S||(0,x.createElement)(x.Fragment,{},(0,x.createElement)(s,{flexWrap:`wrap`,justifyContent:`space-between`},(0,x.createElement)(_,{icon:v,onClick:A,disabled:!e},`Export without passwords`),D?(0,x.createElement)(x.Fragment,{},i(o),(0,x.createElement)(n,{icon:g,title:`Save
|
|
2
2
|
(ctrl+enter)`,modified:C!==T,onClick:k}),(0,x.createElement)(h,{severity:`warning`,sx:{minWidth:`10em`}},`Be careful, you can easily break things here`)):(0,x.createElement)(_,{icon:y,variant:`outlined`,onClick(){O(!0),setTimeout(()=>a(`main textarea`),500)}},`Edit`),(0,x.createElement)(l,{sx:{flex:1,minWidth:`fit-content`}},(0,x.createElement)(f,{label:`File path`,value:e==null?void 0:e.fullPath,size:`small`}))),S||C!==void 0&&(0,x.createElement)(l,{sx:{"& pre,& textarea":{wordBreak:`break-all !important`}}},(0,x.createElement)(p,{margin:10},(0,x.createElement)(b,{value:C,disabled:!D,style:{background:`#8881`},onValueChange:w,onKeyDown(e){[`s`,`Enter`].includes(r(e))&&(k(),e.preventDefault())}}))));function k(){return d(`set_config_text`,{text:C}).then(()=>E(C))}function A(){var n;let r=(C||``).replace(/^(\s*(\w*password|_\w*|token|srp|dynamic_dns_url):\s*).+(?:\r?\n|$)/gm,`$1removed
|
|
3
3
|
`).replace(/(:\/\/)[^/@\s]+@/g,`$1removed@`)+t(`custom_html: | # this is currently ignored by hfs, just here for reference
|
|
4
4
|
`,(n=e.customHtml)==null?void 0:n.replace(/^/gm,` `));r&&u(`config_no_passwords.yaml`,r)}}export{S as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-CacB07dV.js";import{A as t,Bn as n,C as r,Cn as i,Da as a,Ea as o,H as s,I as c,Ma as l,N as u,Pa as d,_ as f,ai as p,fr as m,gt as h,ir as g,it as _,lr as v,na as y,or as b,tt as x,vi as S,vt as C,xr as w,z as T,zt as E}from"./index-
|
|
1
|
+
import{i as e}from"./rolldown-runtime-CacB07dV.js";import{A as t,Bn as n,C as r,Cn as i,Da as a,Ea as o,H as s,I as c,Ma as l,N as u,Pa as d,_ as f,ai as p,fr as m,gt as h,ir as g,it as _,lr as v,na as y,or as b,tt as x,vi as S,vt as C,xr as w,z as T,zt as E}from"./index-BDdPG215.js";import{t as D}from"./TextEditor-Df9LSzm6.js";var O=e(m()),k=e(d());a();function A(e,t,n){return(0,k.createElement)(j,o({checked:e||!1,onChange(e,n){t(n)},disabled:e===void 0},n))}var j=y(w)(({theme:e,size:t})=>{let n=t&&t===`small`;return{height:n?36:48,width:n?18:26,padding:5,"& .MuiSwitch-switchBase":{margin:1,padding:0,transform:`translateY(${n?16:22}px)`,"&.Mui-checked":{color:e.palette.primary.contrastText,transform:`translateY(2px)`,"& .MuiSwitch-thumb:before":{backgroundImage:`url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" height="${n?14:20}" width="20" viewBox="0 0 20 20"><path fill="${encodeURIComponent(e.palette.primary.contrastText)}" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"/></svg>')`},"& + .MuiSwitch-track":{backgroundColor:e.palette.grey[500]}}},"& .Mui-checked .MuiSwitch-thumb":{backgroundColor:e.palette.primary.main,boxShadow:`0px 2px 1px 1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12)`},"& .MuiSwitch-thumb":{width:n?16:24,height:n?16:24,backgroundColor:e.palette.grey[700],"&::before":{content:`''`,position:`absolute`,width:`85%`,height:`85%`,left:0,top:0,backgroundRepeat:`no-repeat`,backgroundPosition:`center`,backgroundImage:`url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" height="${n?14:20}" width="20" viewBox="0 0 20 20"><path fill="${encodeURIComponent(e.palette.primary.contrastText)}" d="M19,13H5V11H19V13Z"/></svg>')`}},"& .MuiSwitch-track":{backgroundColor:e.palette.grey[500],borderRadius:20/2}}});a();var M={top:`Top of HTML Body`,bottom:`Bottom of HTML Body`};function N({setTitleSide:e}){let{data:a,reload:d,element:m}=f(`get_custom_html`),{customHtmlSection:y}=_(),[w,j]=(0,k.useState)({}),[N,P]=(0,k.useState)({});(0,k.useEffect)(()=>{a&&(P(a.sections),j(a.sections),R(a.enabled))},[a]);let F=(0,k.useMemo)(()=>{let e=O.default.sortBy(Object.keys(w),i);return e.length&&!e.includes(y)&&(x.customHtmlSection=O.default.findKey(w,Boolean)||(e==null?void 0:e[0])||``),e.map(e=>{var t;return{value:e,label:(M[e]||n(`HTTP `,b[e])||O.default.startCase(e))+((t=w[e])!=null&&t.trim()?` *`:``)}})},[w]),I=(0,k.useMemo)(()=>!O.default.isEqualWith(N,w,(e,t)=>!e&&!t||void 0),[N,w]),[L,R]=(0,k.useState)();e((0,k.useMemo)(()=>(0,k.createElement)(p,{sx:{display:{xs:`none`,md:`block`}}},(0,k.createElement)(S,{severity:`info`},E("Add HTML code to some parts of the Front-end. It's saved to file `custom.html`, that you can edit directly with your editor of choice. "),T(`customization`,`More help`)),(0,k.createElement)(S,{severity:`info`},`To customize icons `,T(`customization#icons`,`read documentation`))),[]));let z=c([`s`,`Enter`]);return m||(0,k.createElement)(k.Fragment,{},(0,k.createElement)(p,{sx:{display:`flex`,alignItems:`center`,gap:1,mb:1}},(0,k.createElement)(h,{label:`Section`,value:y,options:F,onChange:e=>x.customHtmlSection=e}),u(d),(0,k.createElement)(r,{ref:z.ref,icon:C,title:`Save
|
|
2
2
|
(ctrl+s)`,modified:I,doneAnimation:!0,onClick:B}),t(`Enable all sections`,void 0,A(L,function(){var e=l(function*(e){try{yield v(`set_config`,{values:{[g.disable_custom_html]:!e}}),R(e)}catch(e){s(e)}});return function(t){return e.apply(this,arguments)}}()))),(0,k.createElement)(D,{lang:y===`style`?`css`:y===`script`?`js`:`html`,value:(w==null?void 0:w[y])||``,style:{background:`#8881`},onValueChange(e){j(t=>o(o({},t),{},{[y]:e}))}}));function B(){return v(`set_custom_html`,{sections:w}).then(()=>P(w))}}export{N as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as e,t}from"./rolldown-runtime-CacB07dV.js";import{a as n,i as r,o as i,r as a,t as o}from"./Tabs-
|
|
1
|
+
import{i as e,t}from"./rolldown-runtime-CacB07dV.js";import{a as n,i as r,o as i,r as a,t as o}from"./Tabs-CGfV3BK0.js";import{$i as s,$t as c,Ai as l,Bi as u,Br as d,C as f,Ci as p,Cr as m,Da as h,Ea as g,Er as _,G as v,Hi as y,Hr as b,In as x,Ji as S,Jr as C,Ln as w,Ma as T,Mi as E,Mr as D,Na as O,Nr as k,Oa as A,Pa as j,Qi as M,Ri as N,S as P,Sa as F,Si as ee,Sr as I,Ta as L,Ti as R,Ur as te,Ut as ne,Vr as re,Wi as ie,Yr as ae,Zi as oe,_a as se,ai as ce,b as le,ba as ue,bi as de,br as fe,ca as pe,ci as me,da as he,di as ge,dt as _e,ea as ve,ei as ye,fa as be,fi as xe,fr as Se,ga as z,gi as Ce,ha as we,i as B,ia as Te,ii as Ee,ji as De,jr as Oe,ka as ke,la as Ae,li as je,ma as Me,mi as Ne,na as V,nn as Pe,oa as H,pa as Fe,pi as Ie,qr as Le,rt as Re,sa as ze,si as Be,st as Ve,ta as He,ti as Ue,tt as We,ua as Ge,un as Ke,va as qe,vi as Je,vt as Ye,wi as Xe,wr as Ze,xa as Qe,xi as $e,xr as et,ya as tt,yi as nt,yr as rt,zr as it}from"./index-BDdPG215.js";import{N as at,R as ot,rt as st}from"./icons-DWkdo8hc.js";import{a as ct,i as lt,n as ut,o as dt,r as ft,s as pt,t as mt}from"./EventManager-BJWba-fL.js";function ht(e){return String(e).match(/[\d.\-+]*\s*(.*)/)[1]||``}function gt(e){return parseFloat(e)}var U=e(j(),1);function _t(e){let{badgeContent:t,invisible:n=!1,max:r=99,showZero:i=!1}=e,a=Ce({badgeContent:t,max:r}),o=n;n===!1&&t===0&&!i&&(o=!0);let{badgeContent:s,max:c=r}=o?a:e,l=s&&Number(s)>c?`${c}+`:s;return{badgeContent:s,invisible:o,max:c,displayValue:l}}function vt(e){return we(`MuiBadge`,e)}var yt=Me(`MuiBadge`,[`root`,`badge`,`dot`,`standard`,`anchorOriginTopRight`,`anchorOriginBottomRight`,`anchorOriginTopLeft`,`anchorOriginBottomLeft`,`invisible`,`colorError`,`colorInfo`,`colorPrimary`,`colorSecondary`,`colorSuccess`,`colorWarning`,`overlapRectangular`,`overlapCircular`,`anchorOriginTopLeftCircular`,`anchorOriginTopLeftRectangular`,`anchorOriginTopRightCircular`,`anchorOriginTopRightRectangular`,`anchorOriginBottomLeftCircular`,`anchorOriginBottomLeftRectangular`,`anchorOriginBottomRightCircular`,`anchorOriginBottomRightRectangular`]),W=qe();h();var bt=[`anchorOrigin`,`className`,`classes`,`component`,`children`,`overlap`,`color`,`invisible`,`max`,`badgeContent`,`slots`,`slotProps`,`showZero`,`variant`],xt=10,St=4,Ct=e=>{let{color:t,anchorOrigin:n,invisible:r,overlap:i,variant:a,classes:o={}}=e;return H({root:[`root`],badge:[`badge`,a,r&&`invisible`,`anchorOrigin${He(n.vertical)}${He(n.horizontal)}`,`anchorOrigin${He(n.vertical)}${He(n.horizontal)}${He(i)}`,`overlap${He(i)}`,t!=="default"&&`color${He(t)}`]},vt,o)},wt=V(`span`,{name:`MuiBadge`,slot:`Root`})({position:`relative`,display:`inline-flex`,verticalAlign:`middle`,flexShrink:0}),Tt=V(`span`,{name:`MuiBadge`,slot:`Badge`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.badge,t[n.variant],t[`anchorOrigin${He(n.anchorOrigin.vertical)}${He(n.anchorOrigin.horizontal)}${He(n.overlap)}`],n.color!=="default"&&t[`color${He(n.color)}`],n.invisible&&t.invisible]}})(ve(({theme:e})=>({display:`flex`,flexDirection:`row`,flexWrap:`wrap`,justifyContent:`center`,alignContent:`center`,alignItems:`center`,position:`absolute`,boxSizing:`border-box`,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(12),minWidth:xt*2,lineHeight:1,padding:`0 6px`,height:xt*2,borderRadius:xt,zIndex:1,transition:e.transitions.create(`transform`,{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.enteringScreen}),variants:[...Object.entries(e.palette).filter(ee([`contrastText`])).map(([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main,color:(e.vars||e).palette[t].contrastText}})),{props:{variant:`dot`},style:{borderRadius:St,height:St*2,minWidth:St*2,padding:0}},{props:{invisible:!0},style:{transition:e.transitions.create(`transform`,{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.leavingScreen})}},{style:({ownerState:e})=>{let{vertical:t,horizontal:n}=e.anchorOrigin,r=e.overlap===`circular`?`14%`:0;return{"--Badge-translateX":n===`right`?`50%`:`-50%`,"--Badge-translateY":t===`top`?`-50%`:`50%`,top:t===`top`?r:`initial`,bottom:t===`bottom`?r:`initial`,right:n===`right`?r:`initial`,left:n===`left`?r:`initial`,transform:`scale(1) translate(var(--Badge-translateX), var(--Badge-translateY))`,transformOrigin:`${n===`right`?`100%`:`0%`} ${t===`top`?`0%`:`100%`}`,[`&.${yt.invisible}`]:{transform:`scale(0) translate(var(--Badge-translateX), var(--Badge-translateY))`}}}}]})));function Et(e){var t,n;return{vertical:(t=e==null?void 0:e.vertical)==null?`top`:t,horizontal:(n=e==null?void 0:e.horizontal)==null?`right`:n}}var Dt=U.forwardRef(function(e,t){let n=s({props:e,name:`MuiBadge`}),{anchorOrigin:r,className:i,classes:a,component:o,children:c,overlap:l=`rectangular`,color:u=`default`,invisible:d=!1,max:f=99,badgeContent:p,slots:m,slotProps:h,showZero:_=!1,variant:v=`standard`}=n,y=L(n,bt),{badgeContent:b,invisible:x,max:S,displayValue:C}=_t({max:f,invisible:d,badgeContent:p,showZero:_}),w=Ce({anchorOrigin:Et(r),color:u,overlap:l,variant:v,badgeContent:p}),T=x||b==null&&v!==`dot`,{color:E=u,overlap:D=l,anchorOrigin:O,variant:k=v}=T?w:n,A=Et(O),j=k===`dot`?void 0:C,M=g(g({},n),{},{badgeContent:b,invisible:T,max:S,displayValue:j,showZero:_,anchorOrigin:A,color:E,overlap:D,variant:k}),N=Ct(M),P={slots:m,slotProps:h},[F,ee]=R(`root`,{elementType:wt,externalForwardedProps:g(g({},P),y),ownerState:M,className:z(N.root,i),ref:t,additionalProps:{as:o}}),[I,te]=R(`badge`,{elementType:Tt,externalForwardedProps:P,ownerState:M,className:N.badge});return(0,W.jsxs)(F,g(g({},ee),{},{children:[c,(0,W.jsx)(I,g(g({},te),{},{children:j}))]}))});function Ot(e){return e.substring(2).toLowerCase()}function kt(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}function At(e){let{children:t,disableReactTree:n=!1,mouseEvent:r=`onClick`,onClickAway:i,touchEvent:a=`onTouchEnd`}=e,o=U.useRef(!1),s=U.useRef(null),c=U.useRef(!1),l=U.useRef(!1);U.useEffect(()=>(setTimeout(()=>{c.current=!0},0),()=>{c.current=!1}),[]);let d=u(Ne(t),s),f=y(e=>{let t=l.current;l.current=!1;let r=S(s.current);if(!c.current||!s.current||`clientX`in e&&kt(e,r))return;if(o.current){o.current=!1;return}let a;a=e.composedPath?e.composedPath().includes(s.current):!r.documentElement.contains(e.target)||s.current.contains(e.target),!a&&(n||!t)&&i(e)}),p=e=>n=>{l.current=!0;let r=t.props[e];r&&r(n)},m={ref:d};return a!==!1&&(m[a]=p(a)),U.useEffect(()=>{if(a!==!1){let e=Ot(a),t=S(s.current),n=()=>{o.current=!0};return t.addEventListener(e,f),t.addEventListener(`touchmove`,n),()=>{t.removeEventListener(e,f),t.removeEventListener(`touchmove`,n)}}},[f,a]),r!==!1&&(m[r]=p(r)),U.useEffect(()=>{if(r!==!1){let e=Ot(r),t=S(s.current);return t.addEventListener(e,f),()=>{t.removeEventListener(e,f)}}},[f,r]),U.cloneElement(t,m)}ke();var jt=M((0,W.jsx)(`path`,{d:`M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z`}),`FirstPage`),Mt=M((0,W.jsx)(`path`,{d:`M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z`}),`LastPage`);function Nt(e){return we(`MuiSkeleton`,e)}Me(`MuiSkeleton`,[`root`,`text`,`rectangular`,`rounded`,`circular`,`pulse`,`wave`,`withChildren`,`fitContent`,`heightAuto`]),h();var Pt=[`animation`,`className`,`component`,`height`,`style`,`variant`,`width`],Ft=e=>{let{classes:t,variant:n,animation:r,hasChildren:i,width:a,height:o}=e;return H({root:[`root`,n,r,i&&`withChildren`,i&&!a&&`fitContent`,i&&!o&&`heightAuto`]},Nt,t)},It=Qe`
|
|
2
2
|
0% {
|
|
3
3
|
opacity: 1;
|
|
4
4
|
}
|