@sync-in/server 1.9.0 → 1.9.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/CHANGELOG.md +2 -1
- package/package.json +1 -1
- package/server/app.constants.js +3 -3
- package/server/app.constants.js.map +1 -1
- package/server/app.functions.js +42 -0
- package/server/app.functions.js.map +1 -0
- package/static/{chunk-CCGGCHGN.js → chunk-2TB2INBF.js} +1 -1
- package/static/{chunk-KNZ3AQPR.js → chunk-3WLBVJ2S.js} +1 -1
- package/static/{chunk-24Q7OUU2.js → chunk-3YDYZLF7.js} +1 -1
- package/static/{chunk-XOTKK2NJ.js → chunk-4PZPHJ7L.js} +1 -1
- package/static/{chunk-7CFSJ4BO.js → chunk-5E3TYOL3.js} +1 -1
- package/static/{chunk-T74SMT7I.js → chunk-5S6KPQRA.js} +1 -1
- package/static/{chunk-PG54TWBO.js → chunk-6B3GGAV3.js} +1 -1
- package/static/{chunk-KHRF67SG.js → chunk-6NEBGCAZ.js} +1 -1
- package/static/{chunk-N3P6P6GW.js → chunk-BODMMLVB.js} +1 -1
- package/static/{chunk-Y2I36A4K.js → chunk-BU4ZICZR.js} +1 -1
- package/static/{chunk-RX3YQ67K.js → chunk-DQ3GEMPM.js} +1 -1
- package/static/{chunk-BYWSTP3P.js → chunk-FNOTGWRW.js} +1 -1
- package/static/{chunk-F7TXTNZC.js → chunk-GNZPP2VO.js} +1 -1
- package/static/{chunk-LJSVNPPQ.js → chunk-GRLHFXGB.js} +1 -1
- package/static/{chunk-EKEGRXCV.js → chunk-HCSWO7BO.js} +1 -1
- package/static/{chunk-FTSIPHMG.js → chunk-HMOB6XC5.js} +1 -1
- package/static/{chunk-5HNQLBSW.js → chunk-I2S3XPC5.js} +1 -1
- package/static/{chunk-S6EVLDHA.js → chunk-JWPXQOS3.js} +1 -1
- package/static/{chunk-MRF3CNLZ.js → chunk-JY2I3HGL.js} +1 -1
- package/static/{chunk-2FOWUJQF.js → chunk-K657XPXA.js} +1 -1
- package/static/{chunk-MRMSMTWD.js → chunk-MIA5YBOI.js} +1 -1
- package/static/{chunk-BQZWSZNN.js → chunk-NKGKBQBX.js} +1 -1
- package/static/{chunk-OJCAIKUK.js → chunk-PXRT4L57.js} +1 -1
- package/static/{chunk-3IISSX63.js → chunk-RDNTK4YH.js} +1 -1
- package/static/{chunk-MNNCSSHN.js → chunk-RK2ONYTL.js} +1 -1
- package/static/{chunk-QNFNXDSX.js → chunk-S2VBGI6Q.js} +1 -1
- package/static/{chunk-Y44XDRM5.js → chunk-TGLJFALR.js} +1 -1
- package/static/{chunk-LXQGVNU2.js → chunk-U4RW6XG5.js} +1 -1
- package/static/{chunk-4FJUCMEG.js → chunk-V6FA5QY4.js} +1 -1
- package/static/{chunk-XX7JXKA6.js → chunk-VK7XMFVE.js} +1 -1
- package/static/{chunk-RT3K6DZR.js → chunk-VQJYCYWI.js} +1 -1
- package/static/{chunk-MVZJSG5R.js → chunk-XQGPSNQB.js} +1 -1
- package/static/{chunk-2XPHUNYN.js → chunk-ZXXHFBGL.js} +1 -1
- package/static/index.html +1 -1
- package/static/{main-3PLRDZTO.js → main-56PZQ6TJ.js} +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e as ao,f as lo,g as co,h as uo}from"./chunk-J6YSFHLZ.js";import{A as Ws,Aa as io,Ba as no,C as ti,Ca as so,D as I,Da as vt,E as gt,Ea as Xi,F as js,Fa as oo,G as Ki,H as Gs,Ha as Xe,I as Yi,Ia as ro,J as zs,K as qs,L as Ks,M as Ys,O as Qs,Q as Je,R as bt,S as Js,T as Xs,U as Zs,V as ii,a as qi,b as Ee,c as Os,d as Vs,da as v,e as Bs,g as Ns,h as Hs,i as k,j as Le,ja as ni,k as Ke,l as Us,la as eo,m as ve,ma as c,n as pt,na as si,o as Y,oa as oi,p as ot,pa as yt,q as te,qa as Qi,r as Ye,ra as Ji,s as Qe,v as Zt,w as ei,wa as to,x as M,y as $s,z as U}from"./chunk-EDJAISWO.js";import{c as Ls}from"./chunk-JXZCNFW7.js";import{a as Rs,h as Jt,m as Xt,o as we}from"./chunk-MYM43ENO.js";import{a as Qt}from"./chunk-ZCOWBVOT.js";import{Aa as Kt,Cb as K,Da as Ss,Db as Ms,Eb as Is,Fb as Fs,Ga as ks,Ha as xs,Ia as ws,Mb as Yt,Nb as ne,Ob as Fe,Ra as Es,Ua as st,Ya as Ds,bb as Ps,cb as _s,ib as zi,lb as As,m as is,s as Gt,t as zt,tb as Ts,vb as Ie,ya as Cs,za as de}from"./chunk-5HNQLBSW.js";import{Aa as Ue,Ac as Gi,B as F,Bb as z,Bc as qe,Be as ds,C as He,Cb as Rt,Cd as jt,E as Hn,Eb as x,Ed as Te,Ef as qt,G as Un,Gb as E,Ha as jn,Hb as Ni,Ia as Pe,Ib as Hi,Ja as Gn,Jb as Kn,Jd as Me,Kd as nt,Lb as Ui,Ma as ke,Mb as $i,Nb as Ot,Oa as f,Ob as Vt,Pb as Yn,Pe as fs,Qa as he,Qb as ee,Qc as Ae,Rb as $e,Se as ms,Tb as D,Ub as X,Vb as Wi,Wb as Qn,Wc as it,Xa as be,Xb as We,Xc as es,Yb as je,Yc as ae,Zb as Ge,aa as tt,ab as R,bb as xe,be as ns,c as Rn,cb as zn,cd as Ut,da as $n,dd as ts,ea as J,ec as Bt,ee as ss,ef as ps,f as ft,fa as Se,fe as os,ge as rs,hc as Jn,ie as as,ja as C,jd as $t,je as ls,k as On,kc as V,lb as N,mb as H,mc as j,me as cs,mf as gs,nb as qn,nc as Xn,ne as us,nf as bs,oa as P,od as Wt,oe as hs,og as ye,pa as _,pb as Vi,q as Vn,qb as Bi,rb as y,rc as Nt,sa as Wn,sb as p,sc as _e,t as Bn,tb as m,tc as ji,u as De,ub as A,v as et,va as ie,vc as Zn,w as Nn,wc as Z,wf as ys,xa as mt,xb as Lt,xc as Ht,yc as ze,zf as vs}from"./chunk-IOIBQGHN.js";import{a as Ft,b as Oi,i as B}from"./chunk-KAVP6UXH.js";var w=(function(e){return e.MAKE="make",e.COPY="copy",e.MOVE="move",e.DELETE="delete",e.COMPRESS="compress",e.DECOMPRESS="decompress",e.DOWNLOAD="download",e.UPLOAD="upload",e.TOUCH="touch",e.THUMBNAIL="thumbnail",e.GET_SIZE="getSize",e.LOCK="lock",e.UNLOCK="unlock",e.UNLOCK_REQUEST="unlockRequest",e})(w||{}),le=(function(e){return e.VIEW="view",e.EDIT="edit",e})(le||{});var G={BASE:Ms.BASE,OPERATION:"operation",TASK_OPERATION:"task/operation",TASKS:"tasks",TASKS_DOWNLOAD:"download",RECENTS:"recents",SEARCH:"search",ONLY_OFFICE:"onlyoffice",ONLY_OFFICE_SETTINGS:"settings",ONLY_OFFICE_DOCUMENT:"document",ONLY_OFFICE_CALLBACK:"callback",ONLY_OFFICE_STATUS:"status"},rt=`${G.BASE}/${G.OPERATION}`,Rc=`${rt}/${w.THUMBNAIL}`,Zi=`${rt}/${w.MAKE}`,en=`${rt}/${w.UPLOAD}`,tn=`${G.BASE}/${G.TASK_OPERATION}`,ho=`${tn}/${w.DOWNLOAD}`,fo=`${tn}/${w.COMPRESS}`,mo=`${tn}/${w.DECOMPRESS}`,Ct=`${G.BASE}/${G.TASKS}`,po=`${G.BASE}/${G.TASKS}/${G.TASKS_DOWNLOAD}`,go=`${G.BASE}/${G.RECENTS}`,bo=`${G.BASE}/${G.SEARCH}`,ri=`${G.BASE}/${G.ONLY_OFFICE}`,yo=`${ri}/${G.ONLY_OFFICE_SETTINGS}`,Oc=`${ri}/${G.ONLY_OFFICE_DOCUMENT}`,Vc=`${ri}/${G.ONLY_OFFICE_CALLBACK}`,vo=`${ri}/${G.ONLY_OFFICE_STATUS}`;var Co=(()=>{let t=class t{constructor(){this.inPersonalSpace=!1,this.http=C(ae),this.layout=C(K),this.breadCrumbFilesRepo=!1,this.inShareRepo=!1,this.inRootSpace=!1}setEnvironment(i,n){this.breadCrumbFilesRepo=Fe.FILES===i,this.inPersonalSpace=n.length&&n[0].path===Fe.PERSONAL,this.inShareRepo=i===Fe.SHARES,this.inRootSpace=this.inShareRepo?n.length===0:n.length===1,this.browseApi=Ps(`${Is}/${i}`,n,!1),this.breadCrumbUrl=`/${Fe.SPACES}/${i}${_s(n)}`,this.breadCrumbIcon=this.inShareRepo?ne.SHARED_WITH_ME:this.breadCrumbFilesRepo?this.inPersonalSpace&&this.breadCrumbFilesRepo?ne.PERSONAL:ne.SPACES:ne.TRASH}loadFiles(){return this.http.get(this.browseApi).pipe(tt(()=>{this.layout.setBreadcrumbIcon(this.breadCrumbIcon),this.layout.setBreadcrumbNav(this.breadcrumbNav())}),Un(i=>Vn(()=>i)))}breadcrumbNav(){return{url:this.inPersonalSpace&&this.inRootSpace?`${this.breadCrumbUrl}/${Yt.SHORT_PERSONAL_FILES}`:this.inShareRepo&&this.inRootSpace?`${this.breadCrumbUrl}/${Yt.SHARED_WITH_ME}`:this.breadCrumbUrl,translating:this.inRootSpace&&(this.inPersonalSpace||this.inShareRepo),sameLink:this.inRootSpace&&(this.inPersonalSpace||this.inShareRepo),firstLink:this.inPersonalSpace&&this.breadCrumbFilesRepo?null:this.breadCrumbFilesRepo?Fe.SPACES:this.inShareRepo?Fe.SPACES_SHARES:Fe.TRASH,mutateLevel:this.inPersonalSpace&&!this.breadCrumbFilesRepo&&!this.inRootSpace?{0:{setTitle:Yt.PERSONAL_FILES,translateTitle:!0}}:null,splicing:this.inPersonalSpace?!this.breadCrumbFilesRepo&&!this.inRootSpace?2:3:2}}};t.\u0275fac=function(n){return new(n||t)},t.\u0275prov=J({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();function Xr(e,t){e&1&&(p(0,"span",6),D(1,"The file is locked by"),m())}function Zr(e,t){e&1&&(p(0,"span",6),D(1,"The file is edited by"),m())}function ea(e,t){e&1&&(p(0,"b",8),D(1,"me"),m())}function ta(e,t){if(e&1&&(p(0,"b"),D(1),m()),e&2){let o=E();f(),X(o.file==null||o.file.lock==null?null:o.file.lock.owner)}}function ia(e,t){e&1&&(p(0,"div",9)(1,"small",8),D(2,"As the file owner, you can unlock the file or request the current lock owner to release it."),m()())}function na(e,t){if(e&1){let o=z();p(0,"button",14),x("click",function(){P(o);let n=E(2);return _(n.onUnlock())}),D(1,"Unlock"),m()}if(e&2){let o=E(2);y("disabled",o.submitted)}}function sa(e,t){if(e&1){let o=z();p(0,"button",15),x("click",function(){P(o);let n=E(2);return _(n.onSendUnLockRequest())}),D(1,"Send an unlock request"),m()}if(e&2){let o=E(2);y("disabled",o.submitted)}}function oa(e,t){if(e&1&&(N(0,na,2,1,"button",12),N(1,sa,2,1,"button",13)),e&2){let o=E();H(o.isLockOwner||o.isFileOwner?0:-1),f(),H(o.isLockOwner?-1:1)}}var So=(()=>{let t=class t{constructor(){this.locale=C(Te),this.layout=C(K),this.icons={faLock:qt,faUnlock:rs},this.submitted=!1,this.store=C(Ie),this.userLogin=this.store.user.getValue().login,this.isFileOwner=!1,this.isLockOwner=!1,this.hasExclusiveLock=!0,this.spacesBrowserService=C(Co),this.filesService=C(at)}ngOnInit(){this.hasExclusiveLock=this.file.lock.isExclusive,this.isFileOwner=this.spacesBrowserService.inPersonalSpace||this.file.root?.owner?.login===this.userLogin,this.isLockOwner=this.file.lock.ownerLogin===this.userLogin,this.userAvatarUrl=Ts(this.file.lock.ownerLogin)}onEnter(){return B(this,null,function*(){this.isLockOwner?yield this.onUnlock():this.onSendUnLockRequest()})}onEsc(){this.layout.closeDialog()}onUnlock(){return B(this,null,function*(){try{this.submitted=!0,yield De(this.filesService.unlock(this.file,!this.isLockOwner)),delete this.file.lock,this.layout.closeDialog()}catch(i){this.submitted=!1,this.layout.sendNotification("warning",this.file.name,i.error.message)}})}onSendUnLockRequest(){this.submitted=!0,this.filesService.unlockRequest(this.file).subscribe({next:()=>this.layout.closeDialog(),error:i=>{this.submitted=!1,this.layout.sendNotification("warning",this.file.name,i.error.message)}})}};t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=R({type:t,selectors:[["app-files-lock-dialog"]],hostBindings:function(n,s){n&1&&x("keyup.enter",function(){return s.onEnter()},ke)("keyup.escape",function(){return s.onEsc()},ke)},inputs:{file:"file"},decls:19,vars:11,consts:[[1,"modal-header"],[1,"modal-title"],[1,"me-1",3,"icon"],["aria-label","Close","type","button",1,"btn-close","btn-close-white",3,"click"],[1,"modal-body"],[1,"d-flex","flex-column","align-items-center","avatar","my-2"],["l10nTranslate","",1,"mb-2"],["alt","",1,"avatar-img","mb-2",3,"src"],["l10nTranslate",""],[1,"text-align-center","mt-3","mb-1"],[1,"modal-footer"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-primary",3,"disabled"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-success",3,"disabled"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-primary",3,"click","disabled"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-success",3,"click","disabled"]],template:function(n,s){n&1&&(p(0,"div",0)(1,"h4",1),A(2,"fa-icon",2),p(3,"span"),D(4),m()(),p(5,"button",3),x("click",function(){return s.layout.closeDialog()}),m()(),p(6,"div",4)(7,"div",5),N(8,Xr,2,0,"span",6)(9,Zr,2,0,"span",6),A(10,"img",7),N(11,ea,2,0,"b",8)(12,ta,2,1,"b"),m(),N(13,ia,3,0,"div",9),m(),p(14,"div",10)(15,"button",11),x("click",function(){return s.layout.closeDialog()}),D(16),V(17,"translate"),m(),N(18,oa,2,2),m()),n&2&&(f(2),y("icon",s.hasExclusiveLock?s.icons.faLock:s.icons.faUnlock),f(2),X(s.file.name),f(4),H(s.hasExclusiveLock?8:9),f(2),y("src",s.userAvatarUrl,Pe),f(),H(s.isLockOwner?11:12),f(2),H(!s.isLockOwner&&s.isFileOwner?13:-1),f(3),Wi(" ",s.hasExclusiveLock?"Cancel":j(17,8,"Close",s.locale.language)," "),f(2),H(s.hasExclusiveLock?18:-1))},dependencies:[ye,nt,Me],encapsulation:2});let e=t;return e})();var ra=(e,t)=>({old:e,new:t});function aa(e,t){e&1&&(p(0,"span",3),D(1,"Replace Existing File"),m())}function la(e,t){e&1&&(p(0,"span",3),D(1,"Overwrite Existing File(s)"),m())}function ca(e,t){if(e&1&&(A(0,"div",6),V(1,"translate")),e&2){let o=E();y("innerHTML",Xn(1,1,"RenameFileToExisting",o.locale.language,Jn(5,ra,o.files[0].name,o.renamedTo)),jn)}}function ua(e,t){if(e&1){let o=z();p(0,"div",11)(1,"img",12),x("error",function(){let n=P(o).$implicit;return _(n.fallBackMimeUrl())}),m(),p(2,"div",13)(3,"span"),D(4),m()()()}if(e&2){let o=t.$implicit;f(),y("src",o.mimeUrl,Pe),f(3),X(o.name)}}function ha(e,t){if(e&1&&(p(0,"div",10),D(1,"Do you want to replace the existing file(s)?"),m(),Vi(2,ua,5,2,"div",11,qn)),e&2){let o=E();f(2),Bi(o.files)}}var ko=(()=>{let t=class t{constructor(){this.files=[],this.overwrite=Zn(),this.locale=C(Te),this.layout=C(K),this.icons={faFileShield:ms},this.submitted=!1}onEnter(){this.onAction(!0)}onEsc(){this.onAction(!1)}onAction(i){this.submitted=i,this.overwrite.emit(i),this.layout.closeDialog()}};t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=R({type:t,selectors:[["app-files-overwrite-dialog"]],hostBindings:function(n,s){n&1&&x("keyup.enter",function(){return s.onEnter()},ke)("keyup.escape",function(){return s.onEsc()},ke)},inputs:{files:"files",renamedTo:"renamedTo"},outputs:{overwrite:"overwrite"},decls:14,vars:4,consts:[[1,"modal-header"],["l10nTranslate","",1,"modal-title"],[1,"me-1",3,"icon"],["l10nTranslate",""],["aria-label","Close","type","button",1,"btn-close","btn-close-white",3,"click"],[1,"modal-body"],[3,"innerHTML"],[1,"modal-footer"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-danger",3,"click","disabled"],["l10nTranslate","",1,"fw-bold","mb-3"],["draggable","true",1,"d-flex","align-items-center","mb-1"],["alt","","height","24","width","24",3,"error","src"],[1,"d-flex","flex-column","text-truncate","ms-1"]],template:function(n,s){n&1&&(p(0,"div",0)(1,"h4",1),A(2,"fa-icon",2),N(3,aa,2,0,"span",3)(4,la,2,0,"span",3),m(),p(5,"button",4),x("click",function(){return s.layout.closeDialog()}),m()(),p(6,"div",5),N(7,ca,2,8,"div",6)(8,ha,4,0),m(),p(9,"div",7)(10,"button",8),x("click",function(){return s.onAction(!1)}),D(11,"Cancel"),m(),p(12,"button",9),x("click",function(){return s.onAction(!0)}),D(13,"Confirm"),m()()),n&2&&(f(2),y("icon",s.icons.faFileShield),f(),H(s.renamedTo?3:4),f(4),H(s.renamedTo?7:8),f(5),y("disabled",s.submitted))},dependencies:[ye,nt,Me],encapsulation:2});let e=t;return e})();var da=(e,t)=>B(null,null,function*(){return new Promise((o,i)=>{try{if(window.DocsAPI)return o(null);let n=document.getElementById(t);if(n){let s=setInterval(()=>{if(!n.getAttribute("loading")){if(clearInterval(s),window.DocsAPI)return o(null);let a=xo(t,e,o,i);n.remove(),document.body.appendChild(a)}},500)}else{let s=xo(t,e,o,i);document.body.appendChild(s)}}catch(n){console.error(n)}})}),xo=(e,t,o,i)=>{let n=document.createElement("script");return n.id=e,n.type="text/javascript",n.src=t,n.async=!0,n.onload=()=>{n.removeAttribute("loading"),o(null)},n.onerror=s=>{n.removeAttribute("loading"),i(s)},n.setAttribute("loading",""),n},wo=da;var Eo=(()=>{let t=class t{constructor(){this.loadError=new he,this.isFirstOnChanges=!0,this.onLoad=()=>{try{if(window.DocsAPI||this.onError(-3),window?.DocEditor?.instances[this.id]){console.log("Skip loading, instance already exists",this.id);return}window?.DocEditor?.instances||(window.DocEditor={instances:{}});let i=JSON.parse(JSON.stringify(this.config));window.DocEditor.instances[this.id]=window.DocsAPI.DocEditor(this.id,i)}catch(i){console.error(i),this.onError(-1)}}}ngOnInit(){let i=this.documentServerUrl;i.endsWith("/")||(i+="/");let n=`${i}web-apps/apps/api/documents/api.js`;wo(n,"onlyoffice-api-script").then(()=>this.onLoad()).catch(()=>{this.onError(-2)})}ngOnChanges(i){if(this.isFirstOnChanges){this.isFirstOnChanges=!1;return}if("config"in i&&window?.DocEditor?.instances[this.id]){window.DocEditor.instances[this.id].destroyEditor(),window.DocEditor.instances[this.id]=void 0,console.warn("Important props have been changed, reloading ..."),this.onLoad();return}}ngOnDestroy(){window?.DocEditor?.instances[this.id]&&(window.DocEditor.instances[this.id].destroyEditor(),window.DocEditor.instances[this.id]=void 0)}onError(i){let n;switch(i){case-2:n="Check the settings";break;case-3:n="DocsAPI is not defined";break;default:n="Unknown error !",i=-1}this.loadError.emit(n)}};t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=R({type:t,selectors:[["app-files-onlyoffice-document"]],inputs:{id:"id",documentServerUrl:"documentServerUrl",config:"config"},outputs:{loadError:"loadError"},features:[mt],decls:1,vars:1,consts:[[3,"id"]],template:function(n,s){n&1&&Lt(0,"div",0),n&2&&Rt("id",s.id)},encapsulation:2});let e=t;return e})();function fa(e,t){if(e&1){let o=z();p(0,"div")(1,"app-files-onlyoffice-document",1),x("loadError",function(n){P(o);let s=E();return _(s.loadError(n))}),m()()}if(e&2){let o=E();ee("height",o.currentHeight(),"px"),f(),y("id",o.docId)("documentServerUrl",o.documentConfig.documentServerUrl)("config",o.documentConfig.config)}}var Do=(()=>{let t=class t{constructor(){this.currentHeight=Z(),this.documentConfig=null,this.http=C(ae),this.layout=C(K),this.store=C(Ie)}ngOnInit(){this.docId=`viewer-doc-${this.file.id}`,this.http.get(`${yo}/${this.file.path}`,{params:new it().set("mode",this.mode)}).subscribe({next:i=>{if(!i){this.layout.closeDialog(),this.layout.sendNotification("error","Unable to open document","Settings are missing");return}this.mode===le.EDIT&&i.config.editorConfig.mode!==le.EDIT?i.config.editorConfig.mode=le.VIEW:i.config.editorConfig.mode=this.mode,this.mode===le.EDIT&&(this.file.lock={owner:`${Ss} - ${this.store.user.getValue().fullName} (${this.store.user.getValue().email})`,ownerLogin:this.store.user.getValue().login,isExclusive:!1}),i.config.editorConfig.lang=this.layout.getCurrentLanguage(),i.config.editorConfig.region=this.layout.getCurrentLanguage(),this.documentConfig=i},error:i=>{this.layout.closeDialog(),this.layout.sendNotification("error","Unable to open document",i.error.message)}})}ngOnDestroy(){this.file.lock=null}loadError(i){this.layout.closeDialog(),this.layout.sendNotification("error","Unable to open document",i)}};t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=R({type:t,selectors:[["app-files-viewer-document"]],inputs:{file:"file",mode:"mode",currentHeight:[1,"currentHeight"]},decls:1,vars:1,consts:[[3,"height"],[3,"loadError","id","documentServerUrl","config"]],template:function(n,s){n&1&&N(0,fa,2,5,"div",0),n&2&&H(s.documentConfig?0:-1)},dependencies:[Eo],styles:[".doc-placeholder[_ngcontent-%COMP%]{display:none!important}"]});let e=t;return e})();var ga=["image"];function ba(e,t){if(e&1){let o=z();p(0,"button",5),V(1,"translate"),x("click",function(){P(o);let n=E();return _(n.startSlideshow())}),A(2,"fa-icon",4),m()}if(e&2){let o=E();y("tooltip",j(1,2,"Start Slideshow",o.locale.language)),f(2),y("icon",o.icons.faPlay)}}function ya(e,t){if(e&1){let o=z();p(0,"button",5),V(1,"translate"),x("click",function(){P(o);let n=E();return _(n.stopSlideshow())}),A(2,"fa-icon",4),m()}if(e&2){let o=E();y("tooltip",j(1,2,"Stop slideshow",o.locale.language)),f(2),y("icon",o.icons.faStop)}}var Po=(()=>{let t=class t{constructor(){this.file=ze(),this.directoryImages=Z(),this.currentHeight=Z(),this.currentHeightWithOffset=_e(()=>this.currentHeight()-40),this.isInfoboxOpen=ie(!1),this.isSlideshowActive=ie(!1),this.imageCount=_e(()=>this.directoryImages().length),this.imageIndex=_e(()=>this.directoryImages().indexOf(this.file())),this.imageResolution=ie(""),this.icons={faAngleLeft:hs,faAngleRight:fs,faExpand:cs,faInfo:bs,faPlay:ps,faStop:us},this.locale=C(Te),this.slideDelay=5e3,this.destroyRef=C(Wn),this.imageRef=Ht.required("image")}onImageLoad(){let i=this.imageRef().nativeElement;this.imageResolution.set(`${i.naturalWidth}x${i.naturalHeight}`)}nextImage(){this.file.set(this.directoryImages()[(this.imageIndex()+1)%this.imageCount()])}previousImage(){this.file.set(this.directoryImages()[(this.imageCount()+this.imageIndex()-1)%this.imageCount()])}fullscreen(){this.imageRef().nativeElement.requestFullscreen()}startSlideshow(){this.isSlideshowActive.set(!0),this.slideshowSub=He(this.slideDelay,this.slideDelay).pipe(is(this.destroyRef)).subscribe(()=>this.nextImage())}stopSlideshow(){this.slideshowSub?.unsubscribe(),this.isSlideshowActive.set(!1)}};t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=R({type:t,selectors:[["app-files-viewer-image"]],viewQuery:function(n,s){n&1&&Ot(s.imageRef,ga,5),n&2&&Vt()},inputs:{file:[1,"file"],directoryImages:[1,"directoryImages"],currentHeight:[1,"currentHeight"]},outputs:{file:"fileChange"},decls:40,vars:47,consts:[["image",""],[1,"app-top-menu","d-flex","justify-content-between"],[1,"d-flex"],["container","body","type","button",1,"d-none","d-sm-block","btn","btn-sm","btn-custom","me-1",3,"click","tooltip","adaptivePosition"],[3,"icon"],["container","body","type","button",1,"d-none","d-sm-block","btn","btn-sm","btn-custom","me-1",3,"click","tooltip"],["container","body","type","button",1,"d-none","d-sm-block","btn","btn-sm","btn-custom","me-1",3,"tooltip"],["btnCheckbox","","container","body","type","button",1,"d-none","d-sm-block","btn","btn-sm","btn-custom","me-1",3,"ngModelChange","ngModel","tooltip"],[1,"app-viewer-image"],["alt","",3,"load","src"],[1,"info-box","p-2","m-2","d-flex","flex-column","app-small-card","rounded","opacity-75"],[1,"d-flex","mb-1"],[1,"d-flex","col-sm","fw-bold"]],template:function(n,s){if(n&1){let r=z();p(0,"div",1)(1,"div",2)(2,"button",3),V(3,"translate"),x("click",function(){return P(r),_(s.previousImage())}),A(4,"fa-icon",4),m(),p(5,"button",5),V(6,"translate"),x("click",function(){return P(r),_(s.nextImage())}),A(7,"fa-icon",4),m(),N(8,ba,3,5,"button",6)(9,ya,3,5,"button",6),p(10,"button",5),V(11,"translate"),x("click",function(){return P(r),_(s.fullscreen())}),A(12,"fa-icon",4),m()(),p(13,"div"),D(14),m(),p(15,"button",7),V(16,"translate"),Ge("ngModelChange",function(l){return P(r),je(s.isInfoboxOpen,l)||(s.isInfoboxOpen=l),_(l)}),A(17,"fa-icon",4),m()(),p(18,"div",8)(19,"img",9,0),x("load",function(){return P(r),_(s.onImageLoad())}),m(),p(21,"div",10)(22,"div",11)(23,"div",12),D(24),V(25,"translate"),m(),p(26,"div"),D(27),m()(),p(28,"div",11)(29,"div",12),D(30),V(31,"translate"),m(),p(32,"div"),D(33),m()(),p(34,"div",11)(35,"div",12),D(36),V(37,"translate"),m(),p(38,"div"),D(39),m()()()()}n&2&&(f(2),y("tooltip",j(3,26,"Previous",s.locale.language))("adaptivePosition",!0),f(2),y("icon",s.icons.faAngleLeft),f(),y("tooltip",j(6,29,"Next",s.locale.language)),f(2),y("icon",s.icons.faAngleRight),f(),H(s.isSlideshowActive()?9:8),f(2),y("tooltip",j(11,32,"Fullscreen",s.locale.language)),f(2),y("icon",s.icons.faExpand),f(2),Qn("",s.imageIndex()+1," of ",s.imageCount()),f(),We("ngModel",s.isInfoboxOpen),y("tooltip",j(16,35,"Info",s.locale.language)),f(2),y("icon",s.icons.faInfo),f(),ee("height",s.currentHeightWithOffset(),"px"),f(),ee("max-height",s.currentHeightWithOffset(),"px"),y("src",s.file().dataUrl,Pe),f(2),$e("d-none",!s.isInfoboxOpen()),f(3),X(j(25,38,"Type",s.locale.language)),f(3),X(s.file().mime),f(3),X(j(31,41,"Dimensions",s.locale.language)),f(3),X(s.imageResolution()),f(3),X(j(37,44,"Size",s.locale.language)),f(3),X(s.file().hSize))},dependencies:[jt,$t,Wt,zt,Gt,ye,Qt,Me],encapsulation:2,changeDetection:0});let e=t;return e})();var va=["*"],se=(()=>{let t=class t{};t.VG_ENDED="ended",t.VG_PAUSED="paused",t.VG_PLAYING="playing",t.VG_LOADING="waiting",t.\u0275fac=function(n){return new(n||t)},t.\u0275prov=J({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})(),kt=(()=>{let t=class t{constructor(){this.medias={},this.playerReadyEvent=new he(!0),this.isPlayerReady=!1}onPlayerReady(i){this.fsAPI=i,this.isPlayerReady=!0,this.playerReadyEvent.emit(this)}getDefaultMedia(){for(let i in this.medias)if(this.medias[i])return this.medias[i]}getMasterMedia(){let i;for(let n in this.medias)if(this.medias[n].vgMaster==="true"||this.medias[n].vgMaster===!0){i=this.medias[n];break}return i||this.getDefaultMedia()}isMasterDefined(){let i=!1;for(let n in this.medias)if(this.medias[n].vgMaster==="true"||this.medias[n].vgMaster===!0){i=!0;break}return i}getMediaById(i=null){let n=this.medias[i];return(!i||i==="*")&&(n=this),n}play(){for(let i in this.medias)this.medias[i]&&this.medias[i].play()}pause(){for(let i in this.medias)this.medias[i]&&this.medias[i].pause()}get duration(){return this.$$getAllProperties("duration")}set currentTime(i){this.$$setAllProperties("currentTime",i)}get currentTime(){return this.$$getAllProperties("currentTime")}set state(i){this.$$setAllProperties("state",i)}get state(){return this.$$getAllProperties("state")}set volume(i){this.$$setAllProperties("volume",i)}get volume(){return this.$$getAllProperties("volume")}set playbackRate(i){this.$$setAllProperties("playbackRate",i)}get playbackRate(){return this.$$getAllProperties("playbackRate")}get canPlay(){return this.$$getAllProperties("canPlay")}get canPlayThrough(){return this.$$getAllProperties("canPlayThrough")}get isMetadataLoaded(){return this.$$getAllProperties("isMetadataLoaded")}get isWaiting(){return this.$$getAllProperties("isWaiting")}get isCompleted(){return this.$$getAllProperties("isCompleted")}get isLive(){return this.$$getAllProperties("isLive")}get isMaster(){return this.$$getAllProperties("isMaster")}get time(){return this.$$getAllProperties("time")}get buffer(){return this.$$getAllProperties("buffer")}get buffered(){return this.$$getAllProperties("buffered")}get subscriptions(){return this.$$getAllProperties("subscriptions")}get textTracks(){return this.$$getAllProperties("textTracks")}seekTime(i,n=!1){for(let s in this.medias)this.medias[s]&&this.$$seek(this.medias[s],i,n)}$$seek(i,n,s=!1){let r,a=i.duration;s?(this.isMasterDefined()&&(a=this.getMasterMedia().duration),r=n*a/100):r=n,i.currentTime=r}addTextTrack(i,n,s){for(let r in this.medias)this.medias[r]&&this.$$addTextTrack(this.medias[r],i,n,s)}$$addTextTrack(i,n,s,r){i.addTextTrack(n,s,r)}$$getAllProperties(i){let n={},s;for(let a in this.medias)this.medias[a]&&(n[a]=this.medias[a]);switch(Object.keys(n).length){case 0:switch(i){case"state":s=se.VG_PAUSED;break;case"playbackRate":case"volume":s=1;break;case"time":s={current:0,total:0,left:0};break}break;case 1:let a=Object.keys(n)[0];s=n[a][i];break;default:let l=this.getMasterMedia();s=n[l.id][i]}return s}$$setAllProperties(i,n){for(let s in this.medias)this.medias[s]&&(this.medias[s][i]=n)}registerElement(i){this.videogularElement=i}registerMedia(i){this.medias[i.id]=i}unregisterMedia(i){delete this.medias[i.id]}};t.\u0275fac=function(n){return new(n||t)},t.\u0275prov=J({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})(),nn=(()=>{let t=class t{constructor(){this.isHiddenSubject=new ft,this.isHidden=this.isHiddenSubject.asObservable()}state(i){this.isHiddenSubject.next(i)}};t.\u0275fac=function(n){return new(n||t)},t.\u0275prov=J({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})(),St=(()=>{let t=class t{static getZIndex(){let i=1,n,s=document.getElementsByTagName("*");for(let r=0,a=s.length;r<a;r++)n=parseInt(window.getComputedStyle(s[r])["z-index"],10),n>i&&(i=n+1);return i}static isMobileDevice(){return typeof window.orientation<"u"||navigator.userAgent.indexOf("IEMobile")!==-1}static isiOSDevice(){return(navigator.userAgent.match(/ip(hone|ad|od)/i)||t.isIpadOS())&&!navigator.userAgent.match(/(iemobile)[\/\s]?([\w\.]*)/i)}static isIpadOS(){return navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)}static isCordova(){return document.URL.indexOf("http://")===-1&&document.URL.indexOf("https://")===-1}};t.\u0275fac=function(n){return new(n||t)},t.\u0275prov=J({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})(),sn=(()=>{let t=class t{constructor(){this.nativeFullscreen=!0,this.isFullscreen=!1,this.onChangeFullscreen=new he}init(i,n){this.videogularElement=i,this.medias=n;let s={w3:{enabled:"fullscreenEnabled",element:"fullscreenElement",request:"requestFullscreen",exit:"exitFullscreen",onchange:"fullscreenchange",onerror:"fullscreenerror"},newWebkit:{enabled:"webkitFullscreenEnabled",element:"webkitFullscreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",onchange:"webkitfullscreenchange",onerror:"webkitfullscreenerror"},oldWebkit:{enabled:"webkitIsFullScreen",element:"webkitCurrentFullScreenElement",request:"webkitRequestFullScreen",exit:"webkitCancelFullScreen",onchange:"webkitfullscreenchange",onerror:"webkitfullscreenerror"},moz:{enabled:"mozFullScreen",element:"mozFullScreenElement",request:"mozRequestFullScreen",exit:"mozCancelFullScreen",onchange:"mozfullscreenchange",onerror:"mozfullscreenerror"},ios:{enabled:"webkitFullscreenEnabled",element:"webkitFullscreenElement",request:"webkitEnterFullscreen",exit:"webkitExitFullscreen",onchange:"webkitendfullscreen",onerror:"webkitfullscreenerror"},ms:{enabled:"msFullscreenEnabled",element:"msFullscreenElement",request:"msRequestFullscreen",exit:"msExitFullscreen",onchange:"MSFullscreenChange",onerror:"MSFullscreenError"}};for(let a in s)if(s[a].enabled in document){this.polyfill=s[a];break}if(St.isiOSDevice()&&(this.polyfill=s.ios),this.isAvailable=this.polyfill!=null,this.polyfill==null)return;let r;switch(this.polyfill.onchange){case"mozfullscreenchange":r=document;break;case"webkitendfullscreen":r=this.medias.toArray()[0].elem;break;default:r=i}this.fsChangeSubscription=F(r,this.polyfill.onchange).subscribe(()=>{this.onFullscreenChange()})}onFullscreenChange(){this.isFullscreen=!!document[this.polyfill.element],this.onChangeFullscreen.emit(this.isFullscreen)}toggleFullscreen(i=null){return this.isFullscreen?this.exit():this.request(i)}request(i){return i||(i=this.videogularElement),this.isFullscreen=!0,this.onChangeFullscreen.emit(!0),this.isAvailable&&this.nativeFullscreen?St.isMobileDevice()?((!this.polyfill.enabled&&i===this.videogularElement||St.isiOSDevice())&&(i=this.medias.toArray()[0].elem),this.enterElementInFullScreen(i)):this.enterElementInFullScreen(this.videogularElement):Promise.resolve()}enterElementInFullScreen(i){return i[this.polyfill.request]()}exit(){return this.isFullscreen=!1,this.onChangeFullscreen.emit(!1),this.isAvailable&&this.nativeFullscreen?document[this.polyfill.exit]():Promise.resolve()}};t.\u0275fac=function(n){return new(n||t)},t.\u0275prov=J({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})(),L=(()=>{let t=class t{};t.VG_ABORT="abort",t.VG_CAN_PLAY="canplay",t.VG_CAN_PLAY_THROUGH="canplaythrough",t.VG_DURATION_CHANGE="durationchange",t.VG_EMPTIED="emptied",t.VG_ENCRYPTED="encrypted",t.VG_ENDED="ended",t.VG_ERROR="error",t.VG_LOADED_DATA="loadeddata",t.VG_LOADED_METADATA="loadedmetadata",t.VG_LOAD_START="loadstart",t.VG_PAUSE="pause",t.VG_PLAY="play",t.VG_PLAYING="playing",t.VG_PROGRESS="progress",t.VG_RATE_CHANGE="ratechange",t.VG_SEEK="seek",t.VG_SEEKED="seeked",t.VG_SEEKING="seeking",t.VG_STALLED="stalled",t.VG_SUSPEND="suspend",t.VG_TIME_UPDATE="timeupdate",t.VG_VOLUME_CHANGE="volumechange",t.VG_WAITING="waiting",t.VG_LOAD="load",t.VG_ENTER="enter",t.VG_EXIT="exit",t.VG_START_ADS="startads",t.VG_END_ADS="endads",t.\u0275fac=function(n){return new(n||t)},t.\u0275prov=J({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();var on=(()=>{let t=class t{constructor(i,n){this.api=i,this.ref=n,this.state=se.VG_PAUSED,this.time={current:0,total:0,left:0},this.buffer={end:0},this.canPlay=!1,this.canPlayThrough=!1,this.isMetadataLoaded=!1,this.isWaiting=!1,this.isCompleted=!1,this.isLive=!1,this.isBufferDetected=!1,this.checkInterval=200,this.currentPlayPos=0,this.lastPlayPos=0,this.playAtferSync=!1,this.bufferDetected=new ft}ngOnInit(){this.vgMedia.nodeName?this.elem=this.vgMedia:this.elem=this.vgMedia.elem,this.api.registerMedia(this),this.subscriptions={abort:F(this.elem,L.VG_ABORT),canPlay:F(this.elem,L.VG_CAN_PLAY),canPlayThrough:F(this.elem,L.VG_CAN_PLAY_THROUGH),durationChange:F(this.elem,L.VG_DURATION_CHANGE),emptied:F(this.elem,L.VG_EMPTIED),encrypted:F(this.elem,L.VG_ENCRYPTED),ended:F(this.elem,L.VG_ENDED),error:F(this.elem,L.VG_ERROR),loadedData:F(this.elem,L.VG_LOADED_DATA),loadedMetadata:F(this.elem,L.VG_LOADED_METADATA),loadStart:F(this.elem,L.VG_LOAD_START),pause:F(this.elem,L.VG_PAUSE),play:F(this.elem,L.VG_PLAY),playing:F(this.elem,L.VG_PLAYING),progress:F(this.elem,L.VG_PROGRESS),rateChange:F(this.elem,L.VG_RATE_CHANGE),seeked:F(this.elem,L.VG_SEEKED),seeking:F(this.elem,L.VG_SEEKING),stalled:F(this.elem,L.VG_STALLED),suspend:F(this.elem,L.VG_SUSPEND),timeUpdate:F(this.elem,L.VG_TIME_UPDATE),volumeChange:F(this.elem,L.VG_VOLUME_CHANGE),waiting:F(this.elem,L.VG_WAITING),startAds:F(window,L.VG_START_ADS),endAds:F(window,L.VG_END_ADS),mutation:new Rn(i=>{let n=new MutationObserver(s=>{i.next(s)});return n.observe(this.elem,{childList:!0,attributes:!0}),()=>{n.disconnect()}}),bufferDetected:this.bufferDetected},this.mutationObs=this.subscriptions.mutation.subscribe(this.onMutation.bind(this)),this.canPlayObs=this.subscriptions.canPlay.subscribe(this.onCanPlay.bind(this)),this.canPlayThroughObs=this.subscriptions.canPlayThrough.subscribe(this.onCanPlayThrough.bind(this)),this.loadedMetadataObs=this.subscriptions.loadedMetadata.subscribe(this.onLoadMetadata.bind(this)),this.waitingObs=this.subscriptions.waiting.subscribe(this.onWait.bind(this)),this.progressObs=this.subscriptions.progress.subscribe(this.onProgress.bind(this)),this.endedObs=this.subscriptions.ended.subscribe(this.onComplete.bind(this)),this.playingObs=this.subscriptions.playing.subscribe(this.onStartPlaying.bind(this)),this.playObs=this.subscriptions.play.subscribe(this.onPlay.bind(this)),this.pauseObs=this.subscriptions.pause.subscribe(this.onPause.bind(this)),this.timeUpdateObs=this.subscriptions.timeUpdate.subscribe(this.onTimeUpdate.bind(this)),this.volumeChangeObs=this.subscriptions.volumeChange.subscribe(this.onVolumeChange.bind(this)),this.errorObs=this.subscriptions.error.subscribe(this.onError.bind(this)),this.vgMaster&&this.api.playerReadyEvent.subscribe(()=>{this.prepareSync()})}prepareSync(){let i=[];for(let n in this.api.medias)this.api.medias[n]&&i.push(this.api.medias[n].subscriptions.canPlay);this.canPlayAllSubscription=Nn(i).pipe(et((...n)=>{let s=a=>a?.target?a.target.readyState===4:!1;n.some(s)&&!this.syncSubscription&&(this.startSync(),this.syncSubscription.unsubscribe())})).subscribe()}startSync(){this.syncSubscription=He(0,1e3).subscribe(()=>{for(let i in this.api.medias)if(this.api.medias[i]!==this){let n=this.api.medias[i].currentTime-this.currentTime;n<-.3||n>.3?(this.playAtferSync=this.state===se.VG_PLAYING,this.pause(),this.api.medias[i].pause(),this.api.medias[i].currentTime=this.currentTime):this.playAtferSync&&(this.play(),this.api.medias[i].play(),this.playAtferSync=!1)}})}onMutation(i){for(let n=0,s=i.length;n<s;n++){let r=i[n];if(r.type==="attributes"&&r.attributeName==="src"){if(r.target.src&&r.target.src.length>0&&r.target.src.indexOf("blob:")<0){this.loadMedia();break}}else if(r.type==="childList"&&r.removedNodes.length&&r.removedNodes[0].nodeName.toLowerCase()==="source"){this.loadMedia();break}}}loadMedia(){this.vgMedia.pause(),this.vgMedia.currentTime=0,this.stopBufferCheck(),this.isBufferDetected=!0,this.bufferDetected.next(this.isBufferDetected),setTimeout(()=>this.vgMedia.load(),10)}play(){if(!(this.playPromise||this.state!==se.VG_PAUSED&&this.state!==se.VG_ENDED))return this.playPromise=this.vgMedia.play(),this.playPromise&&this.playPromise.then&&this.playPromise.catch&&this.playPromise.then(()=>{this.playPromise=null}).catch(()=>{this.playPromise=null}),this.playPromise}pause(){this.playPromise?this.playPromise.then(()=>{this.vgMedia.pause()}):this.vgMedia.pause()}get id(){let i;return this.vgMedia&&(i=this.vgMedia.id),i}get duration(){return this.vgMedia.duration===1/0?this.specifiedDuration:this.vgMedia.duration}set currentTime(i){this.vgMedia.currentTime=i}get currentTime(){return this.vgMedia.currentTime}set volume(i){this.vgMedia.volume=i}get volume(){return this.vgMedia.volume}set playbackRate(i){this.vgMedia.playbackRate=i}get playbackRate(){return this.vgMedia.playbackRate}get buffered(){return this.vgMedia.buffered}get textTracks(){return this.vgMedia.textTracks}onCanPlay(i){this.isBufferDetected=!1,this.bufferDetected.next(this.isBufferDetected),this.canPlay=!0,this.ref.detectChanges()}onCanPlayThrough(i){this.isBufferDetected=!1,this.bufferDetected.next(this.isBufferDetected),this.canPlayThrough=!0,this.ref.detectChanges()}onLoadMetadata(i){this.isMetadataLoaded=!0,this.time={current:0,left:0,total:this.duration*1e3},this.state=se.VG_PAUSED;let n=Math.round(this.time.total);this.isLive=n===1/0,this.ref.detectChanges()}onWait(i){this.isWaiting=!0,this.ref.detectChanges()}onComplete(i){this.isCompleted=!0,this.state=se.VG_ENDED,this.ref.detectChanges()}onStartPlaying(i){this.state=se.VG_PLAYING,this.ref.detectChanges()}onPlay(i){this.state=se.VG_PLAYING,this.vgMaster&&(!this.syncSubscription||this.syncSubscription.closed)&&this.startSync(),this.startBufferCheck(),this.ref.detectChanges()}onPause(i){this.state=se.VG_PAUSED,this.vgMaster&&(this.playAtferSync||this.syncSubscription.unsubscribe()),this.stopBufferCheck(),this.ref.detectChanges()}onTimeUpdate(i){let n=this.buffered.length-1;this.time={current:this.currentTime*1e3,total:this.time.total,left:(this.duration-this.currentTime)*1e3},n>=0&&(this.buffer={end:this.buffered.end(n)*1e3}),this.ref.detectChanges()}onProgress(i){let n=this.buffered.length-1;n>=0&&(this.buffer={end:this.buffered.end(n)*1e3}),this.ref.detectChanges()}onVolumeChange(i){this.ref.detectChanges()}onError(i){this.ref.detectChanges()}bufferCheck(){let i=1/this.checkInterval;this.currentPlayPos=this.currentTime,!this.isBufferDetected&&this.currentPlayPos<this.lastPlayPos+i&&(this.isBufferDetected=!0),this.isBufferDetected&&this.currentPlayPos>this.lastPlayPos+i&&(this.isBufferDetected=!1),this.bufferDetected.closed||this.bufferDetected.next(this.isBufferDetected),this.lastPlayPos=this.currentPlayPos}startBufferCheck(){this.checkBufferSubscription=He(0,this.checkInterval).subscribe(()=>{this.bufferCheck()})}stopBufferCheck(){this.checkBufferSubscription&&this.checkBufferSubscription.unsubscribe(),this.isBufferDetected=!1,this.bufferDetected.next(this.isBufferDetected)}seekTime(i,n=!1){let s,r=this.duration;n?s=i*r/100:s=i,this.currentTime=s}addTextTrack(i,n,s,r){let a=this.vgMedia.addTextTrack(i,n,s);return r&&(a.mode=r),a}ngOnDestroy(){this.vgMedia.src="",this.mutationObs?.unsubscribe(),this.canPlayObs?.unsubscribe(),this.canPlayThroughObs?.unsubscribe(),this.loadedMetadataObs?.unsubscribe(),this.waitingObs?.unsubscribe(),this.progressObs?.unsubscribe(),this.endedObs?.unsubscribe(),this.playingObs?.unsubscribe(),this.playObs?.unsubscribe(),this.pauseObs?.unsubscribe(),this.timeUpdateObs?.unsubscribe(),this.volumeChangeObs?.unsubscribe(),this.errorObs?.unsubscribe(),this.checkBufferSubscription?.unsubscribe(),this.syncSubscription?.unsubscribe(),this.bufferDetected?.complete(),this.bufferDetected?.unsubscribe(),this.api.unregisterMedia(this)}};t.\u0275fac=function(n){return new(n||t)(be(kt),be(Gi))},t.\u0275dir=zn({type:t,selectors:[["","vgMedia",""]],inputs:{vgMedia:"vgMedia",vgMaster:"vgMaster"},standalone:!1});let e=t;return e})(),_o=(()=>{let t=class t{constructor(i,n,s,r){this.api=n,this.fsAPI=s,this.controlsHidden=r,this.isFullscreen=!1,this.isNativeFullscreen=!1,this.areControlsHidden=!1,this.onPlayerReady=new he,this.onMediaReady=new he,this.subscriptions=[],this.elem=i.nativeElement,this.api.registerElement(this.elem)}ngAfterContentInit(){this.medias.toArray().forEach(i=>{this.api.registerMedia(i)}),this.fsAPI.init(this.elem,this.medias),this.subscriptions.push(this.fsAPI.onChangeFullscreen.subscribe(this.onChangeFullscreen.bind(this))),this.subscriptions.push(this.controlsHidden.isHidden.subscribe(this.onHideControls.bind(this))),this.api.onPlayerReady(this.fsAPI),this.onPlayerReady.emit(this.api)}onChangeFullscreen(i){this.fsAPI.nativeFullscreen?this.isNativeFullscreen=i:(this.isFullscreen=i,this.zIndex=i?St.getZIndex().toString():"auto")}onHideControls(i){this.areControlsHidden=i}ngOnDestroy(){this.subscriptions.forEach(i=>i.unsubscribe())}};t.\u0275fac=function(n){return new(n||t)(be(Ue),be(kt),be(sn),be(nn))},t.\u0275cmp=R({type:t,selectors:[["vg-player"]],contentQueries:function(n,s,r){if(n&1&&Kn(r,on,5),n&2){let a;Ui(a=$i())&&(s.medias=a)}},hostVars:8,hostBindings:function(n,s){n&2&&(ee("z-index",s.zIndex),$e("fullscreen",s.isFullscreen)("native-fullscreen",s.isNativeFullscreen)("controls-hidden",s.areControlsHidden))},outputs:{onPlayerReady:"onPlayerReady",onMediaReady:"onMediaReady"},standalone:!1,features:[Bt([kt,sn,nn])],ngContentSelectors:va,decls:1,vars:0,template:function(n,s){n&1&&(Ni(),Hi(0))},styles:[`vg-player{font-family:videogular;position:relative;display:flex;width:100%;height:100%;overflow:hidden;background-color:#000}vg-player.fullscreen{position:fixed;left:0;top:0}vg-player.native-fullscreen.controls-hidden{cursor:none}
|
|
1
|
+
import{e as ao,f as lo,g as co,h as uo}from"./chunk-J6YSFHLZ.js";import{A as Ws,Aa as io,Ba as no,C as ti,Ca as so,D as I,Da as vt,E as gt,Ea as Xi,F as js,Fa as oo,G as Ki,H as Gs,Ha as Xe,I as Yi,Ia as ro,J as zs,K as qs,L as Ks,M as Ys,O as Qs,Q as Je,R as bt,S as Js,T as Xs,U as Zs,V as ii,a as qi,b as Ee,c as Os,d as Vs,da as v,e as Bs,g as Ns,h as Hs,i as k,j as Le,ja as ni,k as Ke,l as Us,la as eo,m as ve,ma as c,n as pt,na as si,o as Y,oa as oi,p as ot,pa as yt,q as te,qa as Qi,r as Ye,ra as Ji,s as Qe,v as Zt,w as ei,wa as to,x as M,y as $s,z as U}from"./chunk-EDJAISWO.js";import{c as Ls}from"./chunk-JXZCNFW7.js";import{a as Rs,h as Jt,m as Xt,o as we}from"./chunk-MYM43ENO.js";import{a as Qt}from"./chunk-ZCOWBVOT.js";import{Aa as Kt,Cb as K,Da as Ss,Db as Ms,Eb as Is,Fb as Fs,Ga as ks,Ha as xs,Ia as ws,Mb as Yt,Nb as ne,Ob as Fe,Ra as Es,Ua as st,Ya as Ds,bb as Ps,cb as _s,ib as zi,lb as As,m as is,s as Gt,t as zt,tb as Ts,vb as Ie,ya as Cs,za as de}from"./chunk-I2S3XPC5.js";import{Aa as Ue,Ac as Gi,B as F,Bb as z,Bc as qe,Be as ds,C as He,Cb as Rt,Cd as jt,E as Hn,Eb as x,Ed as Te,Ef as qt,G as Un,Gb as E,Ha as jn,Hb as Ni,Ia as Pe,Ib as Hi,Ja as Gn,Jb as Kn,Jd as Me,Kd as nt,Lb as Ui,Ma as ke,Mb as $i,Nb as Ot,Oa as f,Ob as Vt,Pb as Yn,Pe as fs,Qa as he,Qb as ee,Qc as Ae,Rb as $e,Se as ms,Tb as D,Ub as X,Vb as Wi,Wb as Qn,Wc as it,Xa as be,Xb as We,Xc as es,Yb as je,Yc as ae,Zb as Ge,aa as tt,ab as R,bb as xe,be as ns,c as Rn,cb as zn,cd as Ut,da as $n,dd as ts,ea as J,ec as Bt,ee as ss,ef as ps,f as ft,fa as Se,fe as os,ge as rs,hc as Jn,ie as as,ja as C,jd as $t,je as ls,k as On,kc as V,lb as N,mb as H,mc as j,me as cs,mf as gs,nb as qn,nc as Xn,ne as us,nf as bs,oa as P,od as Wt,oe as hs,og as ye,pa as _,pb as Vi,q as Vn,qb as Bi,rb as y,rc as Nt,sa as Wn,sb as p,sc as _e,t as Bn,tb as m,tc as ji,u as De,ub as A,v as et,va as ie,vc as Zn,w as Nn,wc as Z,wf as ys,xa as mt,xb as Lt,xc as Ht,yc as ze,zf as vs}from"./chunk-IOIBQGHN.js";import{a as Ft,b as Oi,i as B}from"./chunk-KAVP6UXH.js";var w=(function(e){return e.MAKE="make",e.COPY="copy",e.MOVE="move",e.DELETE="delete",e.COMPRESS="compress",e.DECOMPRESS="decompress",e.DOWNLOAD="download",e.UPLOAD="upload",e.TOUCH="touch",e.THUMBNAIL="thumbnail",e.GET_SIZE="getSize",e.LOCK="lock",e.UNLOCK="unlock",e.UNLOCK_REQUEST="unlockRequest",e})(w||{}),le=(function(e){return e.VIEW="view",e.EDIT="edit",e})(le||{});var G={BASE:Ms.BASE,OPERATION:"operation",TASK_OPERATION:"task/operation",TASKS:"tasks",TASKS_DOWNLOAD:"download",RECENTS:"recents",SEARCH:"search",ONLY_OFFICE:"onlyoffice",ONLY_OFFICE_SETTINGS:"settings",ONLY_OFFICE_DOCUMENT:"document",ONLY_OFFICE_CALLBACK:"callback",ONLY_OFFICE_STATUS:"status"},rt=`${G.BASE}/${G.OPERATION}`,Rc=`${rt}/${w.THUMBNAIL}`,Zi=`${rt}/${w.MAKE}`,en=`${rt}/${w.UPLOAD}`,tn=`${G.BASE}/${G.TASK_OPERATION}`,ho=`${tn}/${w.DOWNLOAD}`,fo=`${tn}/${w.COMPRESS}`,mo=`${tn}/${w.DECOMPRESS}`,Ct=`${G.BASE}/${G.TASKS}`,po=`${G.BASE}/${G.TASKS}/${G.TASKS_DOWNLOAD}`,go=`${G.BASE}/${G.RECENTS}`,bo=`${G.BASE}/${G.SEARCH}`,ri=`${G.BASE}/${G.ONLY_OFFICE}`,yo=`${ri}/${G.ONLY_OFFICE_SETTINGS}`,Oc=`${ri}/${G.ONLY_OFFICE_DOCUMENT}`,Vc=`${ri}/${G.ONLY_OFFICE_CALLBACK}`,vo=`${ri}/${G.ONLY_OFFICE_STATUS}`;var Co=(()=>{let t=class t{constructor(){this.inPersonalSpace=!1,this.http=C(ae),this.layout=C(K),this.breadCrumbFilesRepo=!1,this.inShareRepo=!1,this.inRootSpace=!1}setEnvironment(i,n){this.breadCrumbFilesRepo=Fe.FILES===i,this.inPersonalSpace=n.length&&n[0].path===Fe.PERSONAL,this.inShareRepo=i===Fe.SHARES,this.inRootSpace=this.inShareRepo?n.length===0:n.length===1,this.browseApi=Ps(`${Is}/${i}`,n,!1),this.breadCrumbUrl=`/${Fe.SPACES}/${i}${_s(n)}`,this.breadCrumbIcon=this.inShareRepo?ne.SHARED_WITH_ME:this.breadCrumbFilesRepo?this.inPersonalSpace&&this.breadCrumbFilesRepo?ne.PERSONAL:ne.SPACES:ne.TRASH}loadFiles(){return this.http.get(this.browseApi).pipe(tt(()=>{this.layout.setBreadcrumbIcon(this.breadCrumbIcon),this.layout.setBreadcrumbNav(this.breadcrumbNav())}),Un(i=>Vn(()=>i)))}breadcrumbNav(){return{url:this.inPersonalSpace&&this.inRootSpace?`${this.breadCrumbUrl}/${Yt.SHORT_PERSONAL_FILES}`:this.inShareRepo&&this.inRootSpace?`${this.breadCrumbUrl}/${Yt.SHARED_WITH_ME}`:this.breadCrumbUrl,translating:this.inRootSpace&&(this.inPersonalSpace||this.inShareRepo),sameLink:this.inRootSpace&&(this.inPersonalSpace||this.inShareRepo),firstLink:this.inPersonalSpace&&this.breadCrumbFilesRepo?null:this.breadCrumbFilesRepo?Fe.SPACES:this.inShareRepo?Fe.SPACES_SHARES:Fe.TRASH,mutateLevel:this.inPersonalSpace&&!this.breadCrumbFilesRepo&&!this.inRootSpace?{0:{setTitle:Yt.PERSONAL_FILES,translateTitle:!0}}:null,splicing:this.inPersonalSpace?!this.breadCrumbFilesRepo&&!this.inRootSpace?2:3:2}}};t.\u0275fac=function(n){return new(n||t)},t.\u0275prov=J({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();function Xr(e,t){e&1&&(p(0,"span",6),D(1,"The file is locked by"),m())}function Zr(e,t){e&1&&(p(0,"span",6),D(1,"The file is edited by"),m())}function ea(e,t){e&1&&(p(0,"b",8),D(1,"me"),m())}function ta(e,t){if(e&1&&(p(0,"b"),D(1),m()),e&2){let o=E();f(),X(o.file==null||o.file.lock==null?null:o.file.lock.owner)}}function ia(e,t){e&1&&(p(0,"div",9)(1,"small",8),D(2,"As the file owner, you can unlock the file or request the current lock owner to release it."),m()())}function na(e,t){if(e&1){let o=z();p(0,"button",14),x("click",function(){P(o);let n=E(2);return _(n.onUnlock())}),D(1,"Unlock"),m()}if(e&2){let o=E(2);y("disabled",o.submitted)}}function sa(e,t){if(e&1){let o=z();p(0,"button",15),x("click",function(){P(o);let n=E(2);return _(n.onSendUnLockRequest())}),D(1,"Send an unlock request"),m()}if(e&2){let o=E(2);y("disabled",o.submitted)}}function oa(e,t){if(e&1&&(N(0,na,2,1,"button",12),N(1,sa,2,1,"button",13)),e&2){let o=E();H(o.isLockOwner||o.isFileOwner?0:-1),f(),H(o.isLockOwner?-1:1)}}var So=(()=>{let t=class t{constructor(){this.locale=C(Te),this.layout=C(K),this.icons={faLock:qt,faUnlock:rs},this.submitted=!1,this.store=C(Ie),this.userLogin=this.store.user.getValue().login,this.isFileOwner=!1,this.isLockOwner=!1,this.hasExclusiveLock=!0,this.spacesBrowserService=C(Co),this.filesService=C(at)}ngOnInit(){this.hasExclusiveLock=this.file.lock.isExclusive,this.isFileOwner=this.spacesBrowserService.inPersonalSpace||this.file.root?.owner?.login===this.userLogin,this.isLockOwner=this.file.lock.ownerLogin===this.userLogin,this.userAvatarUrl=Ts(this.file.lock.ownerLogin)}onEnter(){return B(this,null,function*(){this.isLockOwner?yield this.onUnlock():this.onSendUnLockRequest()})}onEsc(){this.layout.closeDialog()}onUnlock(){return B(this,null,function*(){try{this.submitted=!0,yield De(this.filesService.unlock(this.file,!this.isLockOwner)),delete this.file.lock,this.layout.closeDialog()}catch(i){this.submitted=!1,this.layout.sendNotification("warning",this.file.name,i.error.message)}})}onSendUnLockRequest(){this.submitted=!0,this.filesService.unlockRequest(this.file).subscribe({next:()=>this.layout.closeDialog(),error:i=>{this.submitted=!1,this.layout.sendNotification("warning",this.file.name,i.error.message)}})}};t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=R({type:t,selectors:[["app-files-lock-dialog"]],hostBindings:function(n,s){n&1&&x("keyup.enter",function(){return s.onEnter()},ke)("keyup.escape",function(){return s.onEsc()},ke)},inputs:{file:"file"},decls:19,vars:11,consts:[[1,"modal-header"],[1,"modal-title"],[1,"me-1",3,"icon"],["aria-label","Close","type","button",1,"btn-close","btn-close-white",3,"click"],[1,"modal-body"],[1,"d-flex","flex-column","align-items-center","avatar","my-2"],["l10nTranslate","",1,"mb-2"],["alt","",1,"avatar-img","mb-2",3,"src"],["l10nTranslate",""],[1,"text-align-center","mt-3","mb-1"],[1,"modal-footer"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-primary",3,"disabled"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-success",3,"disabled"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-primary",3,"click","disabled"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-success",3,"click","disabled"]],template:function(n,s){n&1&&(p(0,"div",0)(1,"h4",1),A(2,"fa-icon",2),p(3,"span"),D(4),m()(),p(5,"button",3),x("click",function(){return s.layout.closeDialog()}),m()(),p(6,"div",4)(7,"div",5),N(8,Xr,2,0,"span",6)(9,Zr,2,0,"span",6),A(10,"img",7),N(11,ea,2,0,"b",8)(12,ta,2,1,"b"),m(),N(13,ia,3,0,"div",9),m(),p(14,"div",10)(15,"button",11),x("click",function(){return s.layout.closeDialog()}),D(16),V(17,"translate"),m(),N(18,oa,2,2),m()),n&2&&(f(2),y("icon",s.hasExclusiveLock?s.icons.faLock:s.icons.faUnlock),f(2),X(s.file.name),f(4),H(s.hasExclusiveLock?8:9),f(2),y("src",s.userAvatarUrl,Pe),f(),H(s.isLockOwner?11:12),f(2),H(!s.isLockOwner&&s.isFileOwner?13:-1),f(3),Wi(" ",s.hasExclusiveLock?"Cancel":j(17,8,"Close",s.locale.language)," "),f(2),H(s.hasExclusiveLock?18:-1))},dependencies:[ye,nt,Me],encapsulation:2});let e=t;return e})();var ra=(e,t)=>({old:e,new:t});function aa(e,t){e&1&&(p(0,"span",3),D(1,"Replace Existing File"),m())}function la(e,t){e&1&&(p(0,"span",3),D(1,"Overwrite Existing File(s)"),m())}function ca(e,t){if(e&1&&(A(0,"div",6),V(1,"translate")),e&2){let o=E();y("innerHTML",Xn(1,1,"RenameFileToExisting",o.locale.language,Jn(5,ra,o.files[0].name,o.renamedTo)),jn)}}function ua(e,t){if(e&1){let o=z();p(0,"div",11)(1,"img",12),x("error",function(){let n=P(o).$implicit;return _(n.fallBackMimeUrl())}),m(),p(2,"div",13)(3,"span"),D(4),m()()()}if(e&2){let o=t.$implicit;f(),y("src",o.mimeUrl,Pe),f(3),X(o.name)}}function ha(e,t){if(e&1&&(p(0,"div",10),D(1,"Do you want to replace the existing file(s)?"),m(),Vi(2,ua,5,2,"div",11,qn)),e&2){let o=E();f(2),Bi(o.files)}}var ko=(()=>{let t=class t{constructor(){this.files=[],this.overwrite=Zn(),this.locale=C(Te),this.layout=C(K),this.icons={faFileShield:ms},this.submitted=!1}onEnter(){this.onAction(!0)}onEsc(){this.onAction(!1)}onAction(i){this.submitted=i,this.overwrite.emit(i),this.layout.closeDialog()}};t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=R({type:t,selectors:[["app-files-overwrite-dialog"]],hostBindings:function(n,s){n&1&&x("keyup.enter",function(){return s.onEnter()},ke)("keyup.escape",function(){return s.onEsc()},ke)},inputs:{files:"files",renamedTo:"renamedTo"},outputs:{overwrite:"overwrite"},decls:14,vars:4,consts:[[1,"modal-header"],["l10nTranslate","",1,"modal-title"],[1,"me-1",3,"icon"],["l10nTranslate",""],["aria-label","Close","type","button",1,"btn-close","btn-close-white",3,"click"],[1,"modal-body"],[3,"innerHTML"],[1,"modal-footer"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-danger",3,"click","disabled"],["l10nTranslate","",1,"fw-bold","mb-3"],["draggable","true",1,"d-flex","align-items-center","mb-1"],["alt","","height","24","width","24",3,"error","src"],[1,"d-flex","flex-column","text-truncate","ms-1"]],template:function(n,s){n&1&&(p(0,"div",0)(1,"h4",1),A(2,"fa-icon",2),N(3,aa,2,0,"span",3)(4,la,2,0,"span",3),m(),p(5,"button",4),x("click",function(){return s.layout.closeDialog()}),m()(),p(6,"div",5),N(7,ca,2,8,"div",6)(8,ha,4,0),m(),p(9,"div",7)(10,"button",8),x("click",function(){return s.onAction(!1)}),D(11,"Cancel"),m(),p(12,"button",9),x("click",function(){return s.onAction(!0)}),D(13,"Confirm"),m()()),n&2&&(f(2),y("icon",s.icons.faFileShield),f(),H(s.renamedTo?3:4),f(4),H(s.renamedTo?7:8),f(5),y("disabled",s.submitted))},dependencies:[ye,nt,Me],encapsulation:2});let e=t;return e})();var da=(e,t)=>B(null,null,function*(){return new Promise((o,i)=>{try{if(window.DocsAPI)return o(null);let n=document.getElementById(t);if(n){let s=setInterval(()=>{if(!n.getAttribute("loading")){if(clearInterval(s),window.DocsAPI)return o(null);let a=xo(t,e,o,i);n.remove(),document.body.appendChild(a)}},500)}else{let s=xo(t,e,o,i);document.body.appendChild(s)}}catch(n){console.error(n)}})}),xo=(e,t,o,i)=>{let n=document.createElement("script");return n.id=e,n.type="text/javascript",n.src=t,n.async=!0,n.onload=()=>{n.removeAttribute("loading"),o(null)},n.onerror=s=>{n.removeAttribute("loading"),i(s)},n.setAttribute("loading",""),n},wo=da;var Eo=(()=>{let t=class t{constructor(){this.loadError=new he,this.isFirstOnChanges=!0,this.onLoad=()=>{try{if(window.DocsAPI||this.onError(-3),window?.DocEditor?.instances[this.id]){console.log("Skip loading, instance already exists",this.id);return}window?.DocEditor?.instances||(window.DocEditor={instances:{}});let i=JSON.parse(JSON.stringify(this.config));window.DocEditor.instances[this.id]=window.DocsAPI.DocEditor(this.id,i)}catch(i){console.error(i),this.onError(-1)}}}ngOnInit(){let i=this.documentServerUrl;i.endsWith("/")||(i+="/");let n=`${i}web-apps/apps/api/documents/api.js`;wo(n,"onlyoffice-api-script").then(()=>this.onLoad()).catch(()=>{this.onError(-2)})}ngOnChanges(i){if(this.isFirstOnChanges){this.isFirstOnChanges=!1;return}if("config"in i&&window?.DocEditor?.instances[this.id]){window.DocEditor.instances[this.id].destroyEditor(),window.DocEditor.instances[this.id]=void 0,console.warn("Important props have been changed, reloading ..."),this.onLoad();return}}ngOnDestroy(){window?.DocEditor?.instances[this.id]&&(window.DocEditor.instances[this.id].destroyEditor(),window.DocEditor.instances[this.id]=void 0)}onError(i){let n;switch(i){case-2:n="Check the settings";break;case-3:n="DocsAPI is not defined";break;default:n="Unknown error !",i=-1}this.loadError.emit(n)}};t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=R({type:t,selectors:[["app-files-onlyoffice-document"]],inputs:{id:"id",documentServerUrl:"documentServerUrl",config:"config"},outputs:{loadError:"loadError"},features:[mt],decls:1,vars:1,consts:[[3,"id"]],template:function(n,s){n&1&&Lt(0,"div",0),n&2&&Rt("id",s.id)},encapsulation:2});let e=t;return e})();function fa(e,t){if(e&1){let o=z();p(0,"div")(1,"app-files-onlyoffice-document",1),x("loadError",function(n){P(o);let s=E();return _(s.loadError(n))}),m()()}if(e&2){let o=E();ee("height",o.currentHeight(),"px"),f(),y("id",o.docId)("documentServerUrl",o.documentConfig.documentServerUrl)("config",o.documentConfig.config)}}var Do=(()=>{let t=class t{constructor(){this.currentHeight=Z(),this.documentConfig=null,this.http=C(ae),this.layout=C(K),this.store=C(Ie)}ngOnInit(){this.docId=`viewer-doc-${this.file.id}`,this.http.get(`${yo}/${this.file.path}`,{params:new it().set("mode",this.mode)}).subscribe({next:i=>{if(!i){this.layout.closeDialog(),this.layout.sendNotification("error","Unable to open document","Settings are missing");return}this.mode===le.EDIT&&i.config.editorConfig.mode!==le.EDIT?i.config.editorConfig.mode=le.VIEW:i.config.editorConfig.mode=this.mode,this.mode===le.EDIT&&(this.file.lock={owner:`${Ss} - ${this.store.user.getValue().fullName} (${this.store.user.getValue().email})`,ownerLogin:this.store.user.getValue().login,isExclusive:!1}),i.config.editorConfig.lang=this.layout.getCurrentLanguage(),i.config.editorConfig.region=this.layout.getCurrentLanguage(),this.documentConfig=i},error:i=>{this.layout.closeDialog(),this.layout.sendNotification("error","Unable to open document",i.error.message)}})}ngOnDestroy(){this.file.lock=null}loadError(i){this.layout.closeDialog(),this.layout.sendNotification("error","Unable to open document",i)}};t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=R({type:t,selectors:[["app-files-viewer-document"]],inputs:{file:"file",mode:"mode",currentHeight:[1,"currentHeight"]},decls:1,vars:1,consts:[[3,"height"],[3,"loadError","id","documentServerUrl","config"]],template:function(n,s){n&1&&N(0,fa,2,5,"div",0),n&2&&H(s.documentConfig?0:-1)},dependencies:[Eo],styles:[".doc-placeholder[_ngcontent-%COMP%]{display:none!important}"]});let e=t;return e})();var ga=["image"];function ba(e,t){if(e&1){let o=z();p(0,"button",5),V(1,"translate"),x("click",function(){P(o);let n=E();return _(n.startSlideshow())}),A(2,"fa-icon",4),m()}if(e&2){let o=E();y("tooltip",j(1,2,"Start Slideshow",o.locale.language)),f(2),y("icon",o.icons.faPlay)}}function ya(e,t){if(e&1){let o=z();p(0,"button",5),V(1,"translate"),x("click",function(){P(o);let n=E();return _(n.stopSlideshow())}),A(2,"fa-icon",4),m()}if(e&2){let o=E();y("tooltip",j(1,2,"Stop slideshow",o.locale.language)),f(2),y("icon",o.icons.faStop)}}var Po=(()=>{let t=class t{constructor(){this.file=ze(),this.directoryImages=Z(),this.currentHeight=Z(),this.currentHeightWithOffset=_e(()=>this.currentHeight()-40),this.isInfoboxOpen=ie(!1),this.isSlideshowActive=ie(!1),this.imageCount=_e(()=>this.directoryImages().length),this.imageIndex=_e(()=>this.directoryImages().indexOf(this.file())),this.imageResolution=ie(""),this.icons={faAngleLeft:hs,faAngleRight:fs,faExpand:cs,faInfo:bs,faPlay:ps,faStop:us},this.locale=C(Te),this.slideDelay=5e3,this.destroyRef=C(Wn),this.imageRef=Ht.required("image")}onImageLoad(){let i=this.imageRef().nativeElement;this.imageResolution.set(`${i.naturalWidth}x${i.naturalHeight}`)}nextImage(){this.file.set(this.directoryImages()[(this.imageIndex()+1)%this.imageCount()])}previousImage(){this.file.set(this.directoryImages()[(this.imageCount()+this.imageIndex()-1)%this.imageCount()])}fullscreen(){this.imageRef().nativeElement.requestFullscreen()}startSlideshow(){this.isSlideshowActive.set(!0),this.slideshowSub=He(this.slideDelay,this.slideDelay).pipe(is(this.destroyRef)).subscribe(()=>this.nextImage())}stopSlideshow(){this.slideshowSub?.unsubscribe(),this.isSlideshowActive.set(!1)}};t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=R({type:t,selectors:[["app-files-viewer-image"]],viewQuery:function(n,s){n&1&&Ot(s.imageRef,ga,5),n&2&&Vt()},inputs:{file:[1,"file"],directoryImages:[1,"directoryImages"],currentHeight:[1,"currentHeight"]},outputs:{file:"fileChange"},decls:40,vars:47,consts:[["image",""],[1,"app-top-menu","d-flex","justify-content-between"],[1,"d-flex"],["container","body","type","button",1,"d-none","d-sm-block","btn","btn-sm","btn-custom","me-1",3,"click","tooltip","adaptivePosition"],[3,"icon"],["container","body","type","button",1,"d-none","d-sm-block","btn","btn-sm","btn-custom","me-1",3,"click","tooltip"],["container","body","type","button",1,"d-none","d-sm-block","btn","btn-sm","btn-custom","me-1",3,"tooltip"],["btnCheckbox","","container","body","type","button",1,"d-none","d-sm-block","btn","btn-sm","btn-custom","me-1",3,"ngModelChange","ngModel","tooltip"],[1,"app-viewer-image"],["alt","",3,"load","src"],[1,"info-box","p-2","m-2","d-flex","flex-column","app-small-card","rounded","opacity-75"],[1,"d-flex","mb-1"],[1,"d-flex","col-sm","fw-bold"]],template:function(n,s){if(n&1){let r=z();p(0,"div",1)(1,"div",2)(2,"button",3),V(3,"translate"),x("click",function(){return P(r),_(s.previousImage())}),A(4,"fa-icon",4),m(),p(5,"button",5),V(6,"translate"),x("click",function(){return P(r),_(s.nextImage())}),A(7,"fa-icon",4),m(),N(8,ba,3,5,"button",6)(9,ya,3,5,"button",6),p(10,"button",5),V(11,"translate"),x("click",function(){return P(r),_(s.fullscreen())}),A(12,"fa-icon",4),m()(),p(13,"div"),D(14),m(),p(15,"button",7),V(16,"translate"),Ge("ngModelChange",function(l){return P(r),je(s.isInfoboxOpen,l)||(s.isInfoboxOpen=l),_(l)}),A(17,"fa-icon",4),m()(),p(18,"div",8)(19,"img",9,0),x("load",function(){return P(r),_(s.onImageLoad())}),m(),p(21,"div",10)(22,"div",11)(23,"div",12),D(24),V(25,"translate"),m(),p(26,"div"),D(27),m()(),p(28,"div",11)(29,"div",12),D(30),V(31,"translate"),m(),p(32,"div"),D(33),m()(),p(34,"div",11)(35,"div",12),D(36),V(37,"translate"),m(),p(38,"div"),D(39),m()()()()}n&2&&(f(2),y("tooltip",j(3,26,"Previous",s.locale.language))("adaptivePosition",!0),f(2),y("icon",s.icons.faAngleLeft),f(),y("tooltip",j(6,29,"Next",s.locale.language)),f(2),y("icon",s.icons.faAngleRight),f(),H(s.isSlideshowActive()?9:8),f(2),y("tooltip",j(11,32,"Fullscreen",s.locale.language)),f(2),y("icon",s.icons.faExpand),f(2),Qn("",s.imageIndex()+1," of ",s.imageCount()),f(),We("ngModel",s.isInfoboxOpen),y("tooltip",j(16,35,"Info",s.locale.language)),f(2),y("icon",s.icons.faInfo),f(),ee("height",s.currentHeightWithOffset(),"px"),f(),ee("max-height",s.currentHeightWithOffset(),"px"),y("src",s.file().dataUrl,Pe),f(2),$e("d-none",!s.isInfoboxOpen()),f(3),X(j(25,38,"Type",s.locale.language)),f(3),X(s.file().mime),f(3),X(j(31,41,"Dimensions",s.locale.language)),f(3),X(s.imageResolution()),f(3),X(j(37,44,"Size",s.locale.language)),f(3),X(s.file().hSize))},dependencies:[jt,$t,Wt,zt,Gt,ye,Qt,Me],encapsulation:2,changeDetection:0});let e=t;return e})();var va=["*"],se=(()=>{let t=class t{};t.VG_ENDED="ended",t.VG_PAUSED="paused",t.VG_PLAYING="playing",t.VG_LOADING="waiting",t.\u0275fac=function(n){return new(n||t)},t.\u0275prov=J({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})(),kt=(()=>{let t=class t{constructor(){this.medias={},this.playerReadyEvent=new he(!0),this.isPlayerReady=!1}onPlayerReady(i){this.fsAPI=i,this.isPlayerReady=!0,this.playerReadyEvent.emit(this)}getDefaultMedia(){for(let i in this.medias)if(this.medias[i])return this.medias[i]}getMasterMedia(){let i;for(let n in this.medias)if(this.medias[n].vgMaster==="true"||this.medias[n].vgMaster===!0){i=this.medias[n];break}return i||this.getDefaultMedia()}isMasterDefined(){let i=!1;for(let n in this.medias)if(this.medias[n].vgMaster==="true"||this.medias[n].vgMaster===!0){i=!0;break}return i}getMediaById(i=null){let n=this.medias[i];return(!i||i==="*")&&(n=this),n}play(){for(let i in this.medias)this.medias[i]&&this.medias[i].play()}pause(){for(let i in this.medias)this.medias[i]&&this.medias[i].pause()}get duration(){return this.$$getAllProperties("duration")}set currentTime(i){this.$$setAllProperties("currentTime",i)}get currentTime(){return this.$$getAllProperties("currentTime")}set state(i){this.$$setAllProperties("state",i)}get state(){return this.$$getAllProperties("state")}set volume(i){this.$$setAllProperties("volume",i)}get volume(){return this.$$getAllProperties("volume")}set playbackRate(i){this.$$setAllProperties("playbackRate",i)}get playbackRate(){return this.$$getAllProperties("playbackRate")}get canPlay(){return this.$$getAllProperties("canPlay")}get canPlayThrough(){return this.$$getAllProperties("canPlayThrough")}get isMetadataLoaded(){return this.$$getAllProperties("isMetadataLoaded")}get isWaiting(){return this.$$getAllProperties("isWaiting")}get isCompleted(){return this.$$getAllProperties("isCompleted")}get isLive(){return this.$$getAllProperties("isLive")}get isMaster(){return this.$$getAllProperties("isMaster")}get time(){return this.$$getAllProperties("time")}get buffer(){return this.$$getAllProperties("buffer")}get buffered(){return this.$$getAllProperties("buffered")}get subscriptions(){return this.$$getAllProperties("subscriptions")}get textTracks(){return this.$$getAllProperties("textTracks")}seekTime(i,n=!1){for(let s in this.medias)this.medias[s]&&this.$$seek(this.medias[s],i,n)}$$seek(i,n,s=!1){let r,a=i.duration;s?(this.isMasterDefined()&&(a=this.getMasterMedia().duration),r=n*a/100):r=n,i.currentTime=r}addTextTrack(i,n,s){for(let r in this.medias)this.medias[r]&&this.$$addTextTrack(this.medias[r],i,n,s)}$$addTextTrack(i,n,s,r){i.addTextTrack(n,s,r)}$$getAllProperties(i){let n={},s;for(let a in this.medias)this.medias[a]&&(n[a]=this.medias[a]);switch(Object.keys(n).length){case 0:switch(i){case"state":s=se.VG_PAUSED;break;case"playbackRate":case"volume":s=1;break;case"time":s={current:0,total:0,left:0};break}break;case 1:let a=Object.keys(n)[0];s=n[a][i];break;default:let l=this.getMasterMedia();s=n[l.id][i]}return s}$$setAllProperties(i,n){for(let s in this.medias)this.medias[s]&&(this.medias[s][i]=n)}registerElement(i){this.videogularElement=i}registerMedia(i){this.medias[i.id]=i}unregisterMedia(i){delete this.medias[i.id]}};t.\u0275fac=function(n){return new(n||t)},t.\u0275prov=J({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})(),nn=(()=>{let t=class t{constructor(){this.isHiddenSubject=new ft,this.isHidden=this.isHiddenSubject.asObservable()}state(i){this.isHiddenSubject.next(i)}};t.\u0275fac=function(n){return new(n||t)},t.\u0275prov=J({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})(),St=(()=>{let t=class t{static getZIndex(){let i=1,n,s=document.getElementsByTagName("*");for(let r=0,a=s.length;r<a;r++)n=parseInt(window.getComputedStyle(s[r])["z-index"],10),n>i&&(i=n+1);return i}static isMobileDevice(){return typeof window.orientation<"u"||navigator.userAgent.indexOf("IEMobile")!==-1}static isiOSDevice(){return(navigator.userAgent.match(/ip(hone|ad|od)/i)||t.isIpadOS())&&!navigator.userAgent.match(/(iemobile)[\/\s]?([\w\.]*)/i)}static isIpadOS(){return navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)}static isCordova(){return document.URL.indexOf("http://")===-1&&document.URL.indexOf("https://")===-1}};t.\u0275fac=function(n){return new(n||t)},t.\u0275prov=J({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})(),sn=(()=>{let t=class t{constructor(){this.nativeFullscreen=!0,this.isFullscreen=!1,this.onChangeFullscreen=new he}init(i,n){this.videogularElement=i,this.medias=n;let s={w3:{enabled:"fullscreenEnabled",element:"fullscreenElement",request:"requestFullscreen",exit:"exitFullscreen",onchange:"fullscreenchange",onerror:"fullscreenerror"},newWebkit:{enabled:"webkitFullscreenEnabled",element:"webkitFullscreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",onchange:"webkitfullscreenchange",onerror:"webkitfullscreenerror"},oldWebkit:{enabled:"webkitIsFullScreen",element:"webkitCurrentFullScreenElement",request:"webkitRequestFullScreen",exit:"webkitCancelFullScreen",onchange:"webkitfullscreenchange",onerror:"webkitfullscreenerror"},moz:{enabled:"mozFullScreen",element:"mozFullScreenElement",request:"mozRequestFullScreen",exit:"mozCancelFullScreen",onchange:"mozfullscreenchange",onerror:"mozfullscreenerror"},ios:{enabled:"webkitFullscreenEnabled",element:"webkitFullscreenElement",request:"webkitEnterFullscreen",exit:"webkitExitFullscreen",onchange:"webkitendfullscreen",onerror:"webkitfullscreenerror"},ms:{enabled:"msFullscreenEnabled",element:"msFullscreenElement",request:"msRequestFullscreen",exit:"msExitFullscreen",onchange:"MSFullscreenChange",onerror:"MSFullscreenError"}};for(let a in s)if(s[a].enabled in document){this.polyfill=s[a];break}if(St.isiOSDevice()&&(this.polyfill=s.ios),this.isAvailable=this.polyfill!=null,this.polyfill==null)return;let r;switch(this.polyfill.onchange){case"mozfullscreenchange":r=document;break;case"webkitendfullscreen":r=this.medias.toArray()[0].elem;break;default:r=i}this.fsChangeSubscription=F(r,this.polyfill.onchange).subscribe(()=>{this.onFullscreenChange()})}onFullscreenChange(){this.isFullscreen=!!document[this.polyfill.element],this.onChangeFullscreen.emit(this.isFullscreen)}toggleFullscreen(i=null){return this.isFullscreen?this.exit():this.request(i)}request(i){return i||(i=this.videogularElement),this.isFullscreen=!0,this.onChangeFullscreen.emit(!0),this.isAvailable&&this.nativeFullscreen?St.isMobileDevice()?((!this.polyfill.enabled&&i===this.videogularElement||St.isiOSDevice())&&(i=this.medias.toArray()[0].elem),this.enterElementInFullScreen(i)):this.enterElementInFullScreen(this.videogularElement):Promise.resolve()}enterElementInFullScreen(i){return i[this.polyfill.request]()}exit(){return this.isFullscreen=!1,this.onChangeFullscreen.emit(!1),this.isAvailable&&this.nativeFullscreen?document[this.polyfill.exit]():Promise.resolve()}};t.\u0275fac=function(n){return new(n||t)},t.\u0275prov=J({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})(),L=(()=>{let t=class t{};t.VG_ABORT="abort",t.VG_CAN_PLAY="canplay",t.VG_CAN_PLAY_THROUGH="canplaythrough",t.VG_DURATION_CHANGE="durationchange",t.VG_EMPTIED="emptied",t.VG_ENCRYPTED="encrypted",t.VG_ENDED="ended",t.VG_ERROR="error",t.VG_LOADED_DATA="loadeddata",t.VG_LOADED_METADATA="loadedmetadata",t.VG_LOAD_START="loadstart",t.VG_PAUSE="pause",t.VG_PLAY="play",t.VG_PLAYING="playing",t.VG_PROGRESS="progress",t.VG_RATE_CHANGE="ratechange",t.VG_SEEK="seek",t.VG_SEEKED="seeked",t.VG_SEEKING="seeking",t.VG_STALLED="stalled",t.VG_SUSPEND="suspend",t.VG_TIME_UPDATE="timeupdate",t.VG_VOLUME_CHANGE="volumechange",t.VG_WAITING="waiting",t.VG_LOAD="load",t.VG_ENTER="enter",t.VG_EXIT="exit",t.VG_START_ADS="startads",t.VG_END_ADS="endads",t.\u0275fac=function(n){return new(n||t)},t.\u0275prov=J({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();var on=(()=>{let t=class t{constructor(i,n){this.api=i,this.ref=n,this.state=se.VG_PAUSED,this.time={current:0,total:0,left:0},this.buffer={end:0},this.canPlay=!1,this.canPlayThrough=!1,this.isMetadataLoaded=!1,this.isWaiting=!1,this.isCompleted=!1,this.isLive=!1,this.isBufferDetected=!1,this.checkInterval=200,this.currentPlayPos=0,this.lastPlayPos=0,this.playAtferSync=!1,this.bufferDetected=new ft}ngOnInit(){this.vgMedia.nodeName?this.elem=this.vgMedia:this.elem=this.vgMedia.elem,this.api.registerMedia(this),this.subscriptions={abort:F(this.elem,L.VG_ABORT),canPlay:F(this.elem,L.VG_CAN_PLAY),canPlayThrough:F(this.elem,L.VG_CAN_PLAY_THROUGH),durationChange:F(this.elem,L.VG_DURATION_CHANGE),emptied:F(this.elem,L.VG_EMPTIED),encrypted:F(this.elem,L.VG_ENCRYPTED),ended:F(this.elem,L.VG_ENDED),error:F(this.elem,L.VG_ERROR),loadedData:F(this.elem,L.VG_LOADED_DATA),loadedMetadata:F(this.elem,L.VG_LOADED_METADATA),loadStart:F(this.elem,L.VG_LOAD_START),pause:F(this.elem,L.VG_PAUSE),play:F(this.elem,L.VG_PLAY),playing:F(this.elem,L.VG_PLAYING),progress:F(this.elem,L.VG_PROGRESS),rateChange:F(this.elem,L.VG_RATE_CHANGE),seeked:F(this.elem,L.VG_SEEKED),seeking:F(this.elem,L.VG_SEEKING),stalled:F(this.elem,L.VG_STALLED),suspend:F(this.elem,L.VG_SUSPEND),timeUpdate:F(this.elem,L.VG_TIME_UPDATE),volumeChange:F(this.elem,L.VG_VOLUME_CHANGE),waiting:F(this.elem,L.VG_WAITING),startAds:F(window,L.VG_START_ADS),endAds:F(window,L.VG_END_ADS),mutation:new Rn(i=>{let n=new MutationObserver(s=>{i.next(s)});return n.observe(this.elem,{childList:!0,attributes:!0}),()=>{n.disconnect()}}),bufferDetected:this.bufferDetected},this.mutationObs=this.subscriptions.mutation.subscribe(this.onMutation.bind(this)),this.canPlayObs=this.subscriptions.canPlay.subscribe(this.onCanPlay.bind(this)),this.canPlayThroughObs=this.subscriptions.canPlayThrough.subscribe(this.onCanPlayThrough.bind(this)),this.loadedMetadataObs=this.subscriptions.loadedMetadata.subscribe(this.onLoadMetadata.bind(this)),this.waitingObs=this.subscriptions.waiting.subscribe(this.onWait.bind(this)),this.progressObs=this.subscriptions.progress.subscribe(this.onProgress.bind(this)),this.endedObs=this.subscriptions.ended.subscribe(this.onComplete.bind(this)),this.playingObs=this.subscriptions.playing.subscribe(this.onStartPlaying.bind(this)),this.playObs=this.subscriptions.play.subscribe(this.onPlay.bind(this)),this.pauseObs=this.subscriptions.pause.subscribe(this.onPause.bind(this)),this.timeUpdateObs=this.subscriptions.timeUpdate.subscribe(this.onTimeUpdate.bind(this)),this.volumeChangeObs=this.subscriptions.volumeChange.subscribe(this.onVolumeChange.bind(this)),this.errorObs=this.subscriptions.error.subscribe(this.onError.bind(this)),this.vgMaster&&this.api.playerReadyEvent.subscribe(()=>{this.prepareSync()})}prepareSync(){let i=[];for(let n in this.api.medias)this.api.medias[n]&&i.push(this.api.medias[n].subscriptions.canPlay);this.canPlayAllSubscription=Nn(i).pipe(et((...n)=>{let s=a=>a?.target?a.target.readyState===4:!1;n.some(s)&&!this.syncSubscription&&(this.startSync(),this.syncSubscription.unsubscribe())})).subscribe()}startSync(){this.syncSubscription=He(0,1e3).subscribe(()=>{for(let i in this.api.medias)if(this.api.medias[i]!==this){let n=this.api.medias[i].currentTime-this.currentTime;n<-.3||n>.3?(this.playAtferSync=this.state===se.VG_PLAYING,this.pause(),this.api.medias[i].pause(),this.api.medias[i].currentTime=this.currentTime):this.playAtferSync&&(this.play(),this.api.medias[i].play(),this.playAtferSync=!1)}})}onMutation(i){for(let n=0,s=i.length;n<s;n++){let r=i[n];if(r.type==="attributes"&&r.attributeName==="src"){if(r.target.src&&r.target.src.length>0&&r.target.src.indexOf("blob:")<0){this.loadMedia();break}}else if(r.type==="childList"&&r.removedNodes.length&&r.removedNodes[0].nodeName.toLowerCase()==="source"){this.loadMedia();break}}}loadMedia(){this.vgMedia.pause(),this.vgMedia.currentTime=0,this.stopBufferCheck(),this.isBufferDetected=!0,this.bufferDetected.next(this.isBufferDetected),setTimeout(()=>this.vgMedia.load(),10)}play(){if(!(this.playPromise||this.state!==se.VG_PAUSED&&this.state!==se.VG_ENDED))return this.playPromise=this.vgMedia.play(),this.playPromise&&this.playPromise.then&&this.playPromise.catch&&this.playPromise.then(()=>{this.playPromise=null}).catch(()=>{this.playPromise=null}),this.playPromise}pause(){this.playPromise?this.playPromise.then(()=>{this.vgMedia.pause()}):this.vgMedia.pause()}get id(){let i;return this.vgMedia&&(i=this.vgMedia.id),i}get duration(){return this.vgMedia.duration===1/0?this.specifiedDuration:this.vgMedia.duration}set currentTime(i){this.vgMedia.currentTime=i}get currentTime(){return this.vgMedia.currentTime}set volume(i){this.vgMedia.volume=i}get volume(){return this.vgMedia.volume}set playbackRate(i){this.vgMedia.playbackRate=i}get playbackRate(){return this.vgMedia.playbackRate}get buffered(){return this.vgMedia.buffered}get textTracks(){return this.vgMedia.textTracks}onCanPlay(i){this.isBufferDetected=!1,this.bufferDetected.next(this.isBufferDetected),this.canPlay=!0,this.ref.detectChanges()}onCanPlayThrough(i){this.isBufferDetected=!1,this.bufferDetected.next(this.isBufferDetected),this.canPlayThrough=!0,this.ref.detectChanges()}onLoadMetadata(i){this.isMetadataLoaded=!0,this.time={current:0,left:0,total:this.duration*1e3},this.state=se.VG_PAUSED;let n=Math.round(this.time.total);this.isLive=n===1/0,this.ref.detectChanges()}onWait(i){this.isWaiting=!0,this.ref.detectChanges()}onComplete(i){this.isCompleted=!0,this.state=se.VG_ENDED,this.ref.detectChanges()}onStartPlaying(i){this.state=se.VG_PLAYING,this.ref.detectChanges()}onPlay(i){this.state=se.VG_PLAYING,this.vgMaster&&(!this.syncSubscription||this.syncSubscription.closed)&&this.startSync(),this.startBufferCheck(),this.ref.detectChanges()}onPause(i){this.state=se.VG_PAUSED,this.vgMaster&&(this.playAtferSync||this.syncSubscription.unsubscribe()),this.stopBufferCheck(),this.ref.detectChanges()}onTimeUpdate(i){let n=this.buffered.length-1;this.time={current:this.currentTime*1e3,total:this.time.total,left:(this.duration-this.currentTime)*1e3},n>=0&&(this.buffer={end:this.buffered.end(n)*1e3}),this.ref.detectChanges()}onProgress(i){let n=this.buffered.length-1;n>=0&&(this.buffer={end:this.buffered.end(n)*1e3}),this.ref.detectChanges()}onVolumeChange(i){this.ref.detectChanges()}onError(i){this.ref.detectChanges()}bufferCheck(){let i=1/this.checkInterval;this.currentPlayPos=this.currentTime,!this.isBufferDetected&&this.currentPlayPos<this.lastPlayPos+i&&(this.isBufferDetected=!0),this.isBufferDetected&&this.currentPlayPos>this.lastPlayPos+i&&(this.isBufferDetected=!1),this.bufferDetected.closed||this.bufferDetected.next(this.isBufferDetected),this.lastPlayPos=this.currentPlayPos}startBufferCheck(){this.checkBufferSubscription=He(0,this.checkInterval).subscribe(()=>{this.bufferCheck()})}stopBufferCheck(){this.checkBufferSubscription&&this.checkBufferSubscription.unsubscribe(),this.isBufferDetected=!1,this.bufferDetected.next(this.isBufferDetected)}seekTime(i,n=!1){let s,r=this.duration;n?s=i*r/100:s=i,this.currentTime=s}addTextTrack(i,n,s,r){let a=this.vgMedia.addTextTrack(i,n,s);return r&&(a.mode=r),a}ngOnDestroy(){this.vgMedia.src="",this.mutationObs?.unsubscribe(),this.canPlayObs?.unsubscribe(),this.canPlayThroughObs?.unsubscribe(),this.loadedMetadataObs?.unsubscribe(),this.waitingObs?.unsubscribe(),this.progressObs?.unsubscribe(),this.endedObs?.unsubscribe(),this.playingObs?.unsubscribe(),this.playObs?.unsubscribe(),this.pauseObs?.unsubscribe(),this.timeUpdateObs?.unsubscribe(),this.volumeChangeObs?.unsubscribe(),this.errorObs?.unsubscribe(),this.checkBufferSubscription?.unsubscribe(),this.syncSubscription?.unsubscribe(),this.bufferDetected?.complete(),this.bufferDetected?.unsubscribe(),this.api.unregisterMedia(this)}};t.\u0275fac=function(n){return new(n||t)(be(kt),be(Gi))},t.\u0275dir=zn({type:t,selectors:[["","vgMedia",""]],inputs:{vgMedia:"vgMedia",vgMaster:"vgMaster"},standalone:!1});let e=t;return e})(),_o=(()=>{let t=class t{constructor(i,n,s,r){this.api=n,this.fsAPI=s,this.controlsHidden=r,this.isFullscreen=!1,this.isNativeFullscreen=!1,this.areControlsHidden=!1,this.onPlayerReady=new he,this.onMediaReady=new he,this.subscriptions=[],this.elem=i.nativeElement,this.api.registerElement(this.elem)}ngAfterContentInit(){this.medias.toArray().forEach(i=>{this.api.registerMedia(i)}),this.fsAPI.init(this.elem,this.medias),this.subscriptions.push(this.fsAPI.onChangeFullscreen.subscribe(this.onChangeFullscreen.bind(this))),this.subscriptions.push(this.controlsHidden.isHidden.subscribe(this.onHideControls.bind(this))),this.api.onPlayerReady(this.fsAPI),this.onPlayerReady.emit(this.api)}onChangeFullscreen(i){this.fsAPI.nativeFullscreen?this.isNativeFullscreen=i:(this.isFullscreen=i,this.zIndex=i?St.getZIndex().toString():"auto")}onHideControls(i){this.areControlsHidden=i}ngOnDestroy(){this.subscriptions.forEach(i=>i.unsubscribe())}};t.\u0275fac=function(n){return new(n||t)(be(Ue),be(kt),be(sn),be(nn))},t.\u0275cmp=R({type:t,selectors:[["vg-player"]],contentQueries:function(n,s,r){if(n&1&&Kn(r,on,5),n&2){let a;Ui(a=$i())&&(s.medias=a)}},hostVars:8,hostBindings:function(n,s){n&2&&(ee("z-index",s.zIndex),$e("fullscreen",s.isFullscreen)("native-fullscreen",s.isNativeFullscreen)("controls-hidden",s.areControlsHidden))},outputs:{onPlayerReady:"onPlayerReady",onMediaReady:"onMediaReady"},standalone:!1,features:[Bt([kt,sn,nn])],ngContentSelectors:va,decls:1,vars:0,template:function(n,s){n&1&&(Ni(),Hi(0))},styles:[`vg-player{font-family:videogular;position:relative;display:flex;width:100%;height:100%;overflow:hidden;background-color:#000}vg-player.fullscreen{position:fixed;left:0;top:0}vg-player.native-fullscreen.controls-hidden{cursor:none}
|
|
2
2
|
`],encapsulation:2});let e=t;return e})(),Ca=[kt,nn,sn,St,L,se];var Re=(()=>{let t=class t{};t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=xe({type:t}),t.\u0275inj=Se({providers:[...Ca],imports:[Ae]});let e=t;return e})();var Ao=(()=>{let t=class t{};t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=xe({type:t}),t.\u0275inj=Se({imports:[Ae,Re]});let e=t;return e})();var To=(()=>{let t=class t{};t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=xe({type:t}),t.\u0275inj=Se({imports:[Ae,Re]});let e=t;return e})();var Mo=(()=>{let t=class t{};t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=xe({type:t}),t.\u0275inj=Se({imports:[Ae,Re]});let e=t;return e})();var Io=(()=>{let t=class t{constructor(){this.fileUrl=Z(),this.currentHeight=Z()}};t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=R({type:t,selectors:[["app-files-viewer-media"]],inputs:{fileUrl:[1,"fileUrl"],currentHeight:[1,"currentHeight"]},decls:4,vars:4,consts:[["media",""],["preload","none","controls","",3,"vgMedia"],["type","video/webm",3,"src"]],template:function(n,s){if(n&1&&(p(0,"vg-player")(1,"video",1,0),A(3,"source",2),m()()),n&2){let r=Yn(2);ee("height",s.currentHeight(),"px"),f(),y("vgMedia",r),f(2),y("src",s.fileUrl(),Pe)}},dependencies:[Re,on,_o,To,Mo,Ao],encapsulation:2,changeDetection:0});let e=t;return e})();var Fo=(()=>{let t=class t{constructor(){this.fileUrl=Z(),this.currentHeight=Z(),this.sanitizer=C(Ut),this.pdfjsUrl=`${Rs}/pdfjs/web/viewer.html?file=`,this.url=_e(()=>this.fileUrl()?this.sanitizer.bypassSecurityTrustResourceUrl(`${this.pdfjsUrl}${encodeURIComponent(this.fileUrl())}`):null)}};t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=R({type:t,selectors:[["app-files-viewer-pdf"]],inputs:{fileUrl:[1,"fileUrl"],currentHeight:[1,"currentHeight"]},decls:1,vars:3,consts:[[1,"app-viewer-iframe",3,"src"]],template:function(n,s){n&1&&Lt(0,"iframe",0),n&2&&(ee("height",s.currentHeight(),"px"),Rt("src",s.url(),Gn))},encapsulation:2,changeDetection:0});let e=t;return e})();var ka=e=>{let{state:t}=e,o=t.doc.lineAt(t.selection.main.from),i=dn(e.state,o.from);return i.line?xa(e):i.block?Ea(e):!1};function hn(e,t){return({state:o,dispatch:i})=>{if(o.readOnly)return!1;let n=e(t,o);return n?(i(o.update(n)),!0):!1}}var xa=hn(_a,0);var wa=hn($o,0);var Ea=hn((e,t)=>$o(e,t,Pa(t)),0);function dn(e,t){let o=e.languageDataAt("commentTokens",t,1);return o.length?o[0]:{}}var xt=50;function Da(e,{open:t,close:o},i,n){let s=e.sliceDoc(i-xt,i),r=e.sliceDoc(n,n+xt),a=/\s*$/.exec(s)[0].length,l=/^\s*/.exec(r)[0].length,h=s.length-a;if(s.slice(h-t.length,h)==t&&r.slice(l,l+o.length)==o)return{open:{pos:i-a,margin:a&&1},close:{pos:n+l,margin:l&&1}};let d,g;n-i<=2*xt?d=g=e.sliceDoc(i,n):(d=e.sliceDoc(i,i+xt),g=e.sliceDoc(n-xt,n));let b=/^\s*/.exec(d)[0].length,S=/\s*$/.exec(g)[0].length,T=g.length-S-o.length;return d.slice(b,b+t.length)==t&&g.slice(T,T+o.length)==o?{open:{pos:i+b+t.length,margin:/\s/.test(d.charAt(b+t.length))?1:0},close:{pos:n-S-o.length,margin:/\s/.test(g.charAt(T-1))?1:0}}:null}function Pa(e){let t=[];for(let o of e.selection.ranges){let i=e.doc.lineAt(o.from),n=o.to<=i.to?i:e.doc.lineAt(o.to);n.from>i.from&&n.from==o.to&&(n=o.to==i.to+1?i:e.doc.lineAt(o.to-1));let s=t.length-1;s>=0&&t[s].to>i.from?t[s].to=n.to:t.push({from:i.from+/^\s*/.exec(i.text)[0].length,to:n.to})}return t}function $o(e,t,o=t.selection.ranges){let i=o.map(s=>dn(t,s.from).block);if(!i.every(s=>s))return null;let n=o.map((s,r)=>Da(t,i[r],s.from,s.to));if(e!=2&&!n.every(s=>s))return{changes:t.changes(o.map((s,r)=>n[r]?[]:[{from:s.from,insert:i[r].open+" "},{from:s.to,insert:" "+i[r].close}]))};if(e!=1&&n.some(s=>s)){let s=[];for(let r=0,a;r<n.length;r++)if(a=n[r]){let l=i[r],{open:h,close:d}=a;s.push({from:h.pos-l.open.length,to:h.pos+h.margin},{from:d.pos-d.margin,to:d.pos+l.close.length})}return{changes:s}}return null}function _a(e,t,o=t.selection.ranges){let i=[],n=-1;for(let{from:s,to:r}of o){let a=i.length,l=1e9,h=dn(t,s).line;if(h){for(let d=s;d<=r;){let g=t.doc.lineAt(d);if(g.from>n&&(s==r||r>g.from)){n=g.from;let b=/^\s*/.exec(g.text)[0].length,S=b==g.length,T=g.text.slice(b,b+h.length)==h?b:-1;b<g.text.length&&b<l&&(l=b),i.push({line:g,comment:T,token:h,indent:b,empty:S,single:!1})}d=g.to+1}if(l<1e9)for(let d=a;d<i.length;d++)i[d].indent<i[d].line.text.length&&(i[d].indent=l);i.length==a+1&&(i[a].single=!0)}}if(e!=2&&i.some(s=>s.comment<0&&(!s.empty||s.single))){let s=[];for(let{line:a,token:l,indent:h,empty:d,single:g}of i)(g||!d)&&s.push({from:a.from+h,insert:l+" "});let r=t.changes(s);return{changes:r,selection:t.selection.map(r,1)}}else if(e!=1&&i.some(s=>s.comment>=0)){let s=[];for(let{line:r,comment:a,token:l}of i)if(a>=0){let h=r.from+a,d=h+l.length;r.text[d-r.from]==" "&&d++,s.push({from:h,to:d})}return{changes:s}}return null}var ln=pt.define(),Aa=pt.define(),Ta=Le.define(),Wo=Le.define({combine(e){return Qe(e,{minDepth:100,newGroupDelay:500,joinToEvent:(t,o)=>o},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(t,o)=>(i,n)=>t(i,n)||o(i,n)})}}),fn=Ke.define({create(){return an.empty},update(e,t){let o=t.state.facet(Wo),i=t.annotation(ln);if(i){let l=fe.fromTransaction(t,i.selection),h=i.side,d=h==0?e.undone:e.done;return l?d=li(d,d.length,o.minDepth,l):d=Ko(d,t.startState.selection),new an(h==0?i.rest:d,h==0?d:i.rest)}let n=t.annotation(Aa);if((n=="full"||n=="before")&&(e=e.isolate()),t.annotation(ot.addToHistory)===!1)return t.changes.empty?e:e.addMapping(t.changes.desc);let s=fe.fromTransaction(t),r=t.annotation(ot.time),a=t.annotation(ot.userEvent);return s?e=e.addChanges(s,r,a,o,t):t.selection&&(e=e.addSelection(t.startState.selection,r,a,o.newGroupDelay)),(n=="full"||n=="after")&&(e=e.isolate()),e},toJSON(e){return{done:e.done.map(t=>t.toJSON()),undone:e.undone.map(t=>t.toJSON())}},fromJSON(e){return new an(e.done.map(fe.fromJSON),e.undone.map(fe.fromJSON))}});function mn(e={}){return[fn,Wo.of(e),I.domEventHandlers({beforeinput(t,o){let i=t.inputType=="historyUndo"?ui:t.inputType=="historyRedo"?wt:null;return i?(t.preventDefault(),i(o)):!1}})]}function ci(e,t){return function({state:o,dispatch:i}){if(!t&&o.readOnly)return!1;let n=o.field(fn,!1);if(!n)return!1;let s=n.pop(e,o,t);return s?(i(s),!0):!1}}var ui=ci(0,!1),wt=ci(1,!1),Ma=ci(0,!0),Ia=ci(1,!0);function jo(e){return function(t){let o=t.field(fn,!1);if(!o)return 0;let i=e==0?o.done:o.undone;return i.length-(i.length&&!i[0].changes?1:0)}}var Go=jo(0),zo=jo(1),fe=class e{constructor(t,o,i,n,s){this.changes=t,this.effects=o,this.mapped=i,this.startSelection=n,this.selectionsAfter=s}setSelAfter(t){return new e(this.changes,this.effects,this.mapped,this.startSelection,t)}toJSON(){var t,o,i;return{changes:(t=this.changes)===null||t===void 0?void 0:t.toJSON(),mapped:(o=this.mapped)===null||o===void 0?void 0:o.toJSON(),startSelection:(i=this.startSelection)===null||i===void 0?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map(n=>n.toJSON())}}static fromJSON(t){return new e(t.changes&&Hs.fromJSON(t.changes),[],t.mapped&&Ns.fromJSON(t.mapped),t.startSelection&&k.fromJSON(t.startSelection),t.selectionsAfter.map(k.fromJSON))}static fromTransaction(t,o){let i=ce;for(let n of t.startState.facet(Ta)){let s=n(t);s.length&&(i=i.concat(s))}return!i.length&&t.changes.empty?null:new e(t.changes.invert(t.startState.doc),i,void 0,o||t.startState.selection,ce)}static selection(t){return new e(void 0,ce,void 0,void 0,t)}};function li(e,t,o,i){let n=t+1>o+20?t-o-1:0,s=e.slice(n,t);return s.push(i),s}function Fa(e,t){let o=[],i=!1;return e.iterChangedRanges((n,s)=>o.push(n,s)),t.iterChangedRanges((n,s,r,a)=>{for(let l=0;l<o.length;){let h=o[l++],d=o[l++];a>=h&&r<=d&&(i=!0)}}),i}function La(e,t){return e.ranges.length==t.ranges.length&&e.ranges.filter((o,i)=>o.empty!=t.ranges[i].empty).length===0}function qo(e,t){return e.length?t.length?e.concat(t):e:t}var ce=[],Ra=200;function Ko(e,t){if(e.length){let o=e[e.length-1],i=o.selectionsAfter.slice(Math.max(0,o.selectionsAfter.length-Ra));return i.length&&i[i.length-1].eq(t)?e:(i.push(t),li(e,e.length-1,1e9,o.setSelAfter(i)))}else return[fe.selection([t])]}function Oa(e){let t=e[e.length-1],o=e.slice();return o[e.length-1]=t.setSelAfter(t.selectionsAfter.slice(0,t.selectionsAfter.length-1)),o}function rn(e,t){if(!e.length)return e;let o=e.length,i=ce;for(;o;){let n=Va(e[o-1],t,i);if(n.changes&&!n.changes.empty||n.effects.length){let s=e.slice(0,o);return s[o-1]=n,s}else t=n.mapped,o--,i=n.selectionsAfter}return i.length?[fe.selection(i)]:ce}function Va(e,t,o){let i=qo(e.selectionsAfter.length?e.selectionsAfter.map(a=>a.map(t)):ce,o);if(!e.changes)return fe.selection(i);let n=e.changes.map(t),s=t.mapDesc(e.changes,!0),r=e.mapped?e.mapped.composeDesc(s):s;return new fe(n,Y.mapEffects(e.effects,t),r,e.startSelection.map(s),i)}var Ba=/^(input\.type|delete)($|\.)/,an=(()=>{class e{constructor(o,i,n=0,s=void 0){this.done=o,this.undone=i,this.prevTime=n,this.prevUserEvent=s}isolate(){return this.prevTime?new e(this.done,this.undone):this}addChanges(o,i,n,s,r){let a=this.done,l=a[a.length-1];return l&&l.changes&&!l.changes.empty&&o.changes&&(!n||Ba.test(n))&&(!l.selectionsAfter.length&&i-this.prevTime<s.newGroupDelay&&s.joinToEvent(r,Fa(l.changes,o.changes))||n=="input.type.compose")?a=li(a,a.length-1,s.minDepth,new fe(o.changes.compose(l.changes),qo(Y.mapEffects(o.effects,l.changes),l.effects),l.mapped,l.startSelection,ce)):a=li(a,a.length,s.minDepth,o),new e(a,ce,i,n)}addSelection(o,i,n,s){let r=this.done.length?this.done[this.done.length-1].selectionsAfter:ce;return r.length>0&&i-this.prevTime<s&&n==this.prevUserEvent&&n&&/^select($|\.)/.test(n)&&La(r[r.length-1],o)?this:new e(Ko(this.done,o),this.undone,i,n)}addMapping(o){return new e(rn(this.done,o),rn(this.undone,o),this.prevTime,this.prevUserEvent)}pop(o,i,n){let s=o==0?this.done:this.undone;if(s.length==0)return null;let r=s[s.length-1],a=r.selectionsAfter[0]||i.selection;if(n&&r.selectionsAfter.length)return i.update({selection:r.selectionsAfter[r.selectionsAfter.length-1],annotations:ln.of({side:o,rest:Oa(s),selection:a}),userEvent:o==0?"select.undo":"select.redo",scrollIntoView:!0});if(r.changes){let l=s.length==1?ce:s.slice(0,s.length-1);return r.mapped&&(l=rn(l,r.mapped)),i.update({changes:r.changes,selection:r.startSelection,effects:r.effects,annotations:ln.of({side:o,rest:l,selection:a}),filter:!1,userEvent:o==0?"undo":"redo",scrollIntoView:!0})}else return null}}return e.empty=new e(ce,ce),e})(),pn=[{key:"Mod-z",run:ui,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:wt,preventDefault:!0},{linux:"Ctrl-Shift-z",run:wt,preventDefault:!0},{key:"Mod-u",run:Ma,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:Ia,preventDefault:!0}];function lt(e,t){return k.create(e.ranges.map(t),e.mainIndex)}function me(e,t){return e.update({selection:t,scrollIntoView:!0,userEvent:"select"})}function pe({state:e,dispatch:t},o){let i=lt(e.selection,o);return i.eq(e.selection,!0)?!1:(t(me(e,i)),!0)}function hi(e,t){return k.cursor(t?e.to:e.from)}function Yo(e,t){return pe(e,o=>o.empty?e.moveByChar(o,t):hi(o,t))}function Q(e){return e.textDirectionAt(e.state.selection.main.head)==Ws.LTR}var Qo=e=>Yo(e,!Q(e)),Jo=e=>Yo(e,Q(e));function Xo(e,t){return pe(e,o=>o.empty?e.moveByGroup(o,t):hi(o,t))}var Na=e=>Xo(e,!Q(e)),Ha=e=>Xo(e,Q(e));var Uh=typeof Intl<"u"&&Intl.Segmenter?new Intl.Segmenter(void 0,{granularity:"word"}):null;function Ua(e,t,o){if(t.type.prop(o))return!0;let i=t.to-t.from;return i&&(i>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}function di(e,t,o){let i=ni(e).resolveInner(t.head),n=o?ii.closedBy:ii.openedBy;for(let l=t.head;;){let h=o?i.childAfter(l):i.childBefore(l);if(!h)break;Ua(e,h,n)?i=h:l=o?h.to:h.from}let s=i.type.prop(n),r,a;return s&&(r=o?Xe(e,i.from,1):Xe(e,i.to,-1))&&r.matched?a=o?r.end.to:r.end.from:a=o?i.to:i.from,k.cursor(a,o?-1:1)}var $a=e=>pe(e,t=>di(e.state,t,!Q(e))),Wa=e=>pe(e,t=>di(e.state,t,Q(e)));function Zo(e,t){return pe(e,o=>{if(!o.empty)return hi(o,t);let i=e.moveVertically(o,t);return i.head!=o.head?i:e.moveToLineBoundary(o,t)})}var er=e=>Zo(e,!1),tr=e=>Zo(e,!0);function ir(e){let t=e.scrollDOM.clientHeight<e.scrollDOM.scrollHeight-2,o=0,i=0,n;if(t){for(let s of e.state.facet(I.scrollMargins)){let r=s(e);r?.top&&(o=Math.max(r?.top,o)),r?.bottom&&(i=Math.max(r?.bottom,i))}n=e.scrollDOM.clientHeight-o-i}else n=(e.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:o,marginBottom:i,selfScroll:t,height:Math.max(e.defaultLineHeight,n-5)}}function nr(e,t){let o=ir(e),{state:i}=e,n=lt(i.selection,r=>r.empty?e.moveVertically(r,t,o.height):hi(r,t));if(n.eq(i.selection))return!1;let s;if(o.selfScroll){let r=e.coordsAtPos(i.selection.main.head),a=e.scrollDOM.getBoundingClientRect(),l=a.top+o.marginTop,h=a.bottom-o.marginBottom;r&&r.top>l&&r.bottom<h&&(s=I.scrollIntoView(n.main.head,{y:"start",yMargin:r.top-l}))}return e.dispatch(me(i,n),{effects:s}),!0}var Lo=e=>nr(e,!1),cn=e=>nr(e,!0);function Oe(e,t,o){let i=e.lineBlockAt(t.head),n=e.moveToLineBoundary(t,o);if(n.head==t.head&&n.head!=(o?i.to:i.from)&&(n=e.moveToLineBoundary(t,o,!1)),!o&&n.head==i.from&&i.length){let s=/^\s*/.exec(e.state.sliceDoc(i.from,Math.min(i.from+100,i.to)))[0].length;s&&t.head!=i.from+s&&(n=k.cursor(i.from+s))}return n}var ja=e=>pe(e,t=>Oe(e,t,!0)),Ga=e=>pe(e,t=>Oe(e,t,!1)),za=e=>pe(e,t=>Oe(e,t,!Q(e))),qa=e=>pe(e,t=>Oe(e,t,Q(e))),Ka=e=>pe(e,t=>k.cursor(e.lineBlockAt(t.head).from,1)),Ya=e=>pe(e,t=>k.cursor(e.lineBlockAt(t.head).to,-1));function Qa(e,t,o){let i=!1,n=lt(e.selection,s=>{let r=Xe(e,s.head,-1)||Xe(e,s.head,1)||s.head>0&&Xe(e,s.head-1,1)||s.head<e.doc.length&&Xe(e,s.head+1,-1);if(!r||!r.end)return s;i=!0;let a=r.start.from==s.head?r.end.to:r.end.from;return o?k.range(s.anchor,a):k.cursor(a)});return i?(t(me(e,n)),!0):!1}var Ja=({state:e,dispatch:t})=>Qa(e,t,!1);function ue(e,t){let o=lt(e.state.selection,i=>{let n=t(i);return k.range(i.anchor,n.head,n.goalColumn,n.bidiLevel||void 0)});return o.eq(e.state.selection)?!1:(e.dispatch(me(e.state,o)),!0)}function sr(e,t){return ue(e,o=>e.moveByChar(o,t))}var or=e=>sr(e,!Q(e)),rr=e=>sr(e,Q(e));function ar(e,t){return ue(e,o=>e.moveByGroup(o,t))}var Xa=e=>ar(e,!Q(e)),Za=e=>ar(e,Q(e));var el=e=>ue(e,t=>di(e.state,t,!Q(e))),tl=e=>ue(e,t=>di(e.state,t,Q(e)));function lr(e,t){return ue(e,o=>e.moveVertically(o,t))}var cr=e=>lr(e,!1),ur=e=>lr(e,!0);function hr(e,t){return ue(e,o=>e.moveVertically(o,t,ir(e).height))}var Ro=e=>hr(e,!1),Oo=e=>hr(e,!0),il=e=>ue(e,t=>Oe(e,t,!0)),nl=e=>ue(e,t=>Oe(e,t,!1)),sl=e=>ue(e,t=>Oe(e,t,!Q(e))),ol=e=>ue(e,t=>Oe(e,t,Q(e))),rl=e=>ue(e,t=>k.cursor(e.lineBlockAt(t.head).from)),al=e=>ue(e,t=>k.cursor(e.lineBlockAt(t.head).to)),Vo=({state:e,dispatch:t})=>(t(me(e,{anchor:0})),!0),Bo=({state:e,dispatch:t})=>(t(me(e,{anchor:e.doc.length})),!0),No=({state:e,dispatch:t})=>(t(me(e,{anchor:e.selection.main.anchor,head:0})),!0),Ho=({state:e,dispatch:t})=>(t(me(e,{anchor:e.selection.main.anchor,head:e.doc.length})),!0),ll=({state:e,dispatch:t})=>(t(e.update({selection:{anchor:0,head:e.doc.length},userEvent:"select"})),!0),cl=({state:e,dispatch:t})=>{let o=fi(e).map(({from:i,to:n})=>k.range(i,Math.min(n+1,e.doc.length)));return t(e.update({selection:k.create(o),userEvent:"select"})),!0},ul=({state:e,dispatch:t})=>{let o=lt(e.selection,i=>{let n=ni(e),s=n.resolveStack(i.from,1);if(i.empty){let r=n.resolveStack(i.from,-1);r.node.from>=s.node.from&&r.node.to<=s.node.to&&(s=r)}for(let r=s;r;r=r.next){let{node:a}=r;if((a.from<i.from&&a.to>=i.to||a.to>i.to&&a.from<=i.from)&&r.next)return k.range(a.to,a.from)}return i});return o.eq(e.selection)?!1:(t(me(e,o)),!0)};function dr(e,t){let{state:o}=e,i=o.selection,n=o.selection.ranges.slice();for(let s of o.selection.ranges){let r=o.doc.lineAt(s.head);if(t?r.to<e.state.doc.length:r.from>0)for(let a=s;;){let l=e.moveVertically(a,t);if(l.head<r.from||l.head>r.to){n.some(h=>h.head==l.head)||n.push(l);break}else{if(l.head==a.head)break;a=l}}}return n.length==i.ranges.length?!1:(e.dispatch(me(o,k.create(n,n.length-1))),!0)}var hl=e=>dr(e,!1),dl=e=>dr(e,!0),fl=({state:e,dispatch:t})=>{let o=e.selection,i=null;return o.ranges.length>1?i=k.create([o.main]):o.main.empty||(i=k.create([k.cursor(o.main.head)])),i?(t(me(e,i)),!0):!1};function Et(e,t){if(e.state.readOnly)return!1;let o="delete.selection",{state:i}=e,n=i.changeByRange(s=>{let{from:r,to:a}=s;if(r==a){let l=t(s);l<r?(o="delete.backward",l=ai(e,l,!1)):l>r&&(o="delete.forward",l=ai(e,l,!0)),r=Math.min(r,l),a=Math.max(a,l)}else r=ai(e,r,!1),a=ai(e,a,!0);return r==a?{range:s}:{changes:{from:r,to:a},range:k.cursor(r,r<s.head?-1:1)}});return n.changes.empty?!1:(e.dispatch(i.update(n,{scrollIntoView:!0,userEvent:o,effects:o=="delete.selection"?I.announce.of(i.phrase("Selection deleted")):void 0})),!0)}function ai(e,t,o){if(e instanceof I)for(let i of e.state.facet(I.atomicRanges).map(n=>n(e)))i.between(t,t,(n,s)=>{n<t&&s>t&&(t=o?s:n)});return t}var fr=(e,t,o)=>Et(e,i=>{let n=i.from,{state:s}=e,r=s.doc.lineAt(n),a,l;if(o&&!t&&n>r.from&&n<r.from+200&&!/[^ \t]/.test(a=r.text.slice(0,n-r.from))){if(a[a.length-1]==" ")return n-1;let h=ei(a,s.tabSize),d=h%oi(s)||oi(s);for(let g=0;g<d&&a[a.length-1-g]==" ";g++)n--;l=n}else l=Ee(r.text,n-r.from,t,t)+r.from,l==n&&r.number!=(t?s.doc.lines:1)?l+=t?1:-1:!t&&/[\ufe00-\ufe0f]/.test(r.text.slice(l-r.from,n-r.from))&&(l=Ee(r.text,l-r.from,!1,!1)+r.from);return l}),un=e=>fr(e,!1,!0);var mr=e=>fr(e,!0,!1),pr=(e,t)=>Et(e,o=>{let i=o.head,{state:n}=e,s=n.doc.lineAt(i),r=n.charCategorizer(i);for(let a=null;;){if(i==(t?s.to:s.from)){i==o.head&&s.number!=(t?n.doc.lines:1)&&(i+=t?1:-1);break}let l=Ee(s.text,i-s.from,t)+s.from,h=s.text.slice(Math.min(i,l)-s.from,Math.max(i,l)-s.from),d=r(h);if(a!=null&&d!=a)break;(h!=" "||i!=o.head)&&(a=d),i=l}return i}),gr=e=>pr(e,!1),ml=e=>pr(e,!0);var pl=e=>Et(e,t=>{let o=e.lineBlockAt(t.head).to;return t.head<o?o:Math.min(e.state.doc.length,t.head+1)});var gl=e=>Et(e,t=>{let o=e.moveToLineBoundary(t,!1).head;return t.head>o?o:Math.max(0,t.head-1)}),bl=e=>Et(e,t=>{let o=e.moveToLineBoundary(t,!0).head;return t.head<o?o:Math.min(e.state.doc.length,t.head+1)});var yl=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let o=e.changeByRange(i=>({changes:{from:i.from,to:i.to,insert:qi.of(["",""])},range:k.cursor(i.from)}));return t(e.update(o,{scrollIntoView:!0,userEvent:"input"})),!0},vl=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let o=e.changeByRange(i=>{if(!i.empty||i.from==0||i.from==e.doc.length)return{range:i};let n=i.from,s=e.doc.lineAt(n),r=n==s.from?n-1:Ee(s.text,n-s.from,!1)+s.from,a=n==s.to?n+1:Ee(s.text,n-s.from,!0)+s.from;return{changes:{from:r,to:a,insert:e.doc.slice(n,a).append(e.doc.slice(r,n))},range:k.cursor(a)}});return o.changes.empty?!1:(t(e.update(o,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function fi(e){let t=[],o=-1;for(let i of e.selection.ranges){let n=e.doc.lineAt(i.from),s=e.doc.lineAt(i.to);if(!i.empty&&i.to==s.from&&(s=e.doc.lineAt(i.to-1)),o>=n.number){let r=t[t.length-1];r.to=s.to,r.ranges.push(i)}else t.push({from:n.from,to:s.to,ranges:[i]});o=s.number+1}return t}function br(e,t,o){if(e.readOnly)return!1;let i=[],n=[];for(let s of fi(e)){if(o?s.to==e.doc.length:s.from==0)continue;let r=e.doc.lineAt(o?s.to+1:s.from-1),a=r.length+1;if(o){i.push({from:s.to,to:r.to},{from:s.from,insert:r.text+e.lineBreak});for(let l of s.ranges)n.push(k.range(Math.min(e.doc.length,l.anchor+a),Math.min(e.doc.length,l.head+a)))}else{i.push({from:r.from,to:s.from},{from:s.to,insert:e.lineBreak+r.text});for(let l of s.ranges)n.push(k.range(l.anchor-a,l.head-a))}}return i.length?(t(e.update({changes:i,scrollIntoView:!0,selection:k.create(n,e.selection.mainIndex),userEvent:"move.line"})),!0):!1}var Cl=({state:e,dispatch:t})=>br(e,t,!1),Sl=({state:e,dispatch:t})=>br(e,t,!0);function yr(e,t,o){if(e.readOnly)return!1;let i=[];for(let n of fi(e))o?i.push({from:n.from,insert:e.doc.slice(n.from,n.to)+e.lineBreak}):i.push({from:n.to,insert:e.lineBreak+e.doc.slice(n.from,n.to)});return t(e.update({changes:i,scrollIntoView:!0,userEvent:"input.copyline"})),!0}var kl=({state:e,dispatch:t})=>yr(e,t,!1),xl=({state:e,dispatch:t})=>yr(e,t,!0),wl=e=>{if(e.state.readOnly)return!1;let{state:t}=e,o=t.changes(fi(t).map(({from:n,to:s})=>(n>0?n--:s<t.doc.length&&s++,{from:n,to:s}))),i=lt(t.selection,n=>{let s;if(e.lineWrapping){let r=e.lineBlockAt(n.head),a=e.coordsAtPos(n.head,n.assoc||1);a&&(s=r.bottom+e.documentTop-a.bottom+e.defaultLineHeight/2)}return e.moveVertically(n,!0,s)}).map(o);return e.dispatch({changes:o,selection:i,scrollIntoView:!0,userEvent:"delete.line"}),!0};function El(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let o=ni(e).resolveInner(t),i=o.childBefore(t),n=o.childAfter(t),s;return i&&n&&i.to<=t&&n.from>=t&&(s=i.type.prop(ii.closedBy))&&s.indexOf(n.name)>-1&&e.doc.lineAt(i.to).from==e.doc.lineAt(n.from).from&&!/\S/.test(e.sliceDoc(i.to,n.from))?{from:i.to,to:n.from}:null}var Uo=vr(!1),Dl=vr(!0);function vr(e){return({state:t,dispatch:o})=>{if(t.readOnly)return!1;let i=t.changeByRange(n=>{let{from:s,to:r}=n,a=t.doc.lineAt(s),l=!e&&s==r&&El(t,s);e&&(s=r=(r<=a.to?a:t.doc.lineAt(r)).to);let h=new Ji(t,{simulateBreak:s,simulateDoubleBreak:!!l}),d=Qi(h,s);for(d==null&&(d=ei(/^\s*/.exec(t.doc.lineAt(s).text)[0],t.tabSize));r<a.to&&/\s/.test(a.text[r-a.from]);)r++;l?{from:s,to:r}=l:s>a.from&&s<a.from+100&&!/\S/.test(a.text.slice(0,s))&&(s=a.from);let g=["",yt(t,d)];return l&&g.push(yt(t,h.lineIndent(a.from,-1))),{changes:{from:s,to:r,insert:qi.of(g)},range:k.cursor(s+1+g[1].length)}});return o(t.update(i,{scrollIntoView:!0,userEvent:"input"})),!0}}function gn(e,t){let o=-1;return e.changeByRange(i=>{let n=[];for(let r=i.from;r<=i.to;){let a=e.doc.lineAt(r);a.number>o&&(i.empty||i.to>a.from)&&(t(a,n,i),o=a.number),r=a.to+1}let s=e.changes(n);return{changes:n,range:k.range(s.mapPos(i.anchor,1),s.mapPos(i.head,1))}})}var Pl=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let o=Object.create(null),i=new Ji(e,{overrideIndentation:s=>{let r=o[s];return r??-1}}),n=gn(e,(s,r,a)=>{let l=Qi(i,s.from);if(l==null)return;/\S/.test(s.text)||(l=0);let h=/^\s*/.exec(s.text)[0],d=yt(e,l);(h!=d||a.from<s.from+h.length)&&(o[s.from]=l,r.push({from:s.from,to:s.from+h.length,insert:d}))});return n.changes.empty||t(e.update(n,{userEvent:"indent"})),!0},Cr=({state:e,dispatch:t})=>e.readOnly?!1:(t(e.update(gn(e,(o,i)=>{i.push({from:o.from,insert:e.facet(si)})}),{userEvent:"input.indent"})),!0),Sr=({state:e,dispatch:t})=>e.readOnly?!1:(t(e.update(gn(e,(o,i)=>{let n=/^\s*/.exec(o.text)[0];if(!n)return;let s=ei(n,e.tabSize),r=0,a=yt(e,Math.max(0,s-oi(e)));for(;r<n.length&&r<a.length&&n.charCodeAt(r)==a.charCodeAt(r);)r++;i.push({from:o.from+r,to:o.from+n.length,insert:a.slice(r)})}),{userEvent:"delete.dedent"})),!0),_l=e=>(e.setTabFocusMode(),!0);var Al=[{key:"Ctrl-b",run:Qo,shift:or,preventDefault:!0},{key:"Ctrl-f",run:Jo,shift:rr},{key:"Ctrl-p",run:er,shift:cr},{key:"Ctrl-n",run:tr,shift:ur},{key:"Ctrl-a",run:Ka,shift:rl},{key:"Ctrl-e",run:Ya,shift:al},{key:"Ctrl-d",run:mr},{key:"Ctrl-h",run:un},{key:"Ctrl-k",run:pl},{key:"Ctrl-Alt-h",run:gr},{key:"Ctrl-o",run:yl},{key:"Ctrl-t",run:vl},{key:"Ctrl-v",run:cn}],Tl=[{key:"ArrowLeft",run:Qo,shift:or,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:Na,shift:Xa,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:za,shift:sl,preventDefault:!0},{key:"ArrowRight",run:Jo,shift:rr,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:Ha,shift:Za,preventDefault:!0},{mac:"Cmd-ArrowRight",run:qa,shift:ol,preventDefault:!0},{key:"ArrowUp",run:er,shift:cr,preventDefault:!0},{mac:"Cmd-ArrowUp",run:Vo,shift:No},{mac:"Ctrl-ArrowUp",run:Lo,shift:Ro},{key:"ArrowDown",run:tr,shift:ur,preventDefault:!0},{mac:"Cmd-ArrowDown",run:Bo,shift:Ho},{mac:"Ctrl-ArrowDown",run:cn,shift:Oo},{key:"PageUp",run:Lo,shift:Ro},{key:"PageDown",run:cn,shift:Oo},{key:"Home",run:Ga,shift:nl,preventDefault:!0},{key:"Mod-Home",run:Vo,shift:No},{key:"End",run:ja,shift:il,preventDefault:!0},{key:"Mod-End",run:Bo,shift:Ho},{key:"Enter",run:Uo,shift:Uo},{key:"Mod-a",run:ll},{key:"Backspace",run:un,shift:un,preventDefault:!0},{key:"Delete",run:mr,preventDefault:!0},{key:"Mod-Backspace",mac:"Alt-Backspace",run:gr,preventDefault:!0},{key:"Mod-Delete",mac:"Alt-Delete",run:ml,preventDefault:!0},{mac:"Mod-Backspace",run:gl,preventDefault:!0},{mac:"Mod-Delete",run:bl,preventDefault:!0}].concat(Al.map(e=>({mac:e.key,run:e.run,shift:e.shift}))),bn=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:$a,shift:el},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:Wa,shift:tl},{key:"Alt-ArrowUp",run:Cl},{key:"Shift-Alt-ArrowUp",run:kl},{key:"Alt-ArrowDown",run:Sl},{key:"Shift-Alt-ArrowDown",run:xl},{key:"Mod-Alt-ArrowUp",run:hl},{key:"Mod-Alt-ArrowDown",run:dl},{key:"Escape",run:fl},{key:"Mod-Enter",run:Dl},{key:"Alt-l",mac:"Ctrl-l",run:cl},{key:"Mod-i",run:ul,preventDefault:!0},{key:"Mod-[",run:Sr},{key:"Mod-]",run:Cr},{key:"Mod-Alt-\\",run:Pl},{key:"Shift-Mod-k",run:wl},{key:"Shift-Mod-\\",run:Ja},{key:"Mod-/",run:ka},{key:"Alt-A",run:wa},{key:"Ctrl-m",mac:"Shift-Alt-m",run:_l}].concat(Tl),kr={key:"Tab",run:Cr,shift:Sr};var Ml="#e5c07b",xr="#e06c75",Il="#56b6c2",Fl="#ffffff",mi="#abb2bf",vn="#7d8799",Ll="#61afef",Rl="#98c379",wr="#d19a66",Ol="#c678dd",Vl="#21252b",Er="#2c313a",Dr="#282c34",yn="#353a42",Bl="#3E4451",Pr="#528bff";var Nl=I.theme({"&":{color:mi,backgroundColor:Dr},".cm-content":{caretColor:Pr},".cm-cursor, .cm-dropCursor":{borderLeftColor:Pr},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:Bl},".cm-panels":{backgroundColor:Vl,color:mi},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:Dr,color:vn,border:"none"},".cm-activeLineGutter":{backgroundColor:Er},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:yn},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:yn,borderBottomColor:yn},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:Er,color:mi}}},{dark:!0}),Hl=so.define([{tag:v.keyword,color:Ol},{tag:[v.name,v.deleted,v.character,v.propertyName,v.macroName],color:xr},{tag:[v.function(v.variableName),v.labelName],color:Ll},{tag:[v.color,v.constant(v.name),v.standard(v.name)],color:wr},{tag:[v.definition(v.name),v.separator],color:mi},{tag:[v.typeName,v.className,v.number,v.changed,v.annotation,v.modifier,v.self,v.namespace],color:Ml},{tag:[v.operator,v.operatorKeyword,v.url,v.escape,v.regexp,v.link,v.special(v.string)],color:Il},{tag:[v.meta,v.comment],color:vn},{tag:v.strong,fontWeight:"bold"},{tag:v.emphasis,fontStyle:"italic"},{tag:v.strikethrough,textDecoration:"line-through"},{tag:v.link,color:vn,textDecoration:"underline"},{tag:v.heading,fontWeight:"bold",color:xr},{tag:[v.atom,v.bool,v.special(v.variableName)],color:wr},{tag:[v.processingInstruction,v.string,v.inserted],color:Rl},{tag:v.invalid,color:Fl}]),_r=[Nl,vt(Hl)];var Ar=typeof String.prototype.normalize=="function"?e=>e.normalize("NFKD"):e=>e,Be=class{constructor(t,o,i=0,n=t.length,s,r){this.test=r,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=t.iterRange(i,n),this.bufferStart=i,this.normalize=s?a=>s(Ar(a)):Ar,this.query=this.normalize(o)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return Os(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let t=this.peek();if(t<0)return this.done=!0,this;let o=Vs(t),i=this.bufferStart+this.bufferPos;this.bufferPos+=Bs(t);let n=this.normalize(o);if(n.length)for(let s=0,r=i;;s++){let a=n.charCodeAt(s),l=this.match(a,r,this.bufferPos+this.bufferStart);if(s==n.length-1){if(l)return this.value=l,this;break}r==i&&s<o.length&&o.charCodeAt(s)==a&&r++}}}match(t,o,i){let n=null;for(let s=0;s<this.matches.length;s+=2){let r=this.matches[s],a=!1;this.query.charCodeAt(r)==t&&(r==this.query.length-1?n={from:this.matches[s+1],to:i}:(this.matches[s]++,a=!0)),a||(this.matches.splice(s,2),s-=2)}return this.query.charCodeAt(0)==t&&(this.query.length==1?n={from:o,to:i}:this.matches.push(1,o)),n&&this.test&&!this.test(n.from,n.to,this.buffer,this.bufferStart)&&(n=null),n}};typeof Symbol<"u"&&(Be.prototype[Symbol.iterator]=function(){return this});var Fr={from:-1,to:-1,match:/.*/.exec("")},Dn="gm"+(/x/.unicode==null?"":"u"),bi=class{constructor(t,o,i,n=0,s=t.length){if(this.text=t,this.to=s,this.curLine="",this.done=!1,this.value=Fr,/\\[sWDnr]|\n|\r|\[\^/.test(o))return new vi(t,o,i,n,s);this.re=new RegExp(o,Dn+(i?.ignoreCase?"i":"")),this.test=i?.test,this.iter=t.iter();let r=t.lineAt(n);this.curLineStart=r.from,this.matchPos=Ci(t,n),this.getLine(this.curLineStart)}getLine(t){this.iter.next(t),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let t=this.matchPos-this.curLineStart;;){this.re.lastIndex=t;let o=this.matchPos<=this.to&&this.re.exec(this.curLine);if(o){let i=this.curLineStart+o.index,n=i+o[0].length;if(this.matchPos=Ci(this.text,n+(i==n?1:0)),i==this.curLineStart+this.curLine.length&&this.nextLine(),(i<n||i>this.value.to)&&(!this.test||this.test(i,n,o)))return this.value={from:i,to:n,match:o},this;t=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),t=0;else return this.done=!0,this}}},Cn=new WeakMap,yi=class e{constructor(t,o){this.from=t,this.text=o}get to(){return this.from+this.text.length}static get(t,o,i){let n=Cn.get(t);if(!n||n.from>=i||n.to<=o){let a=new e(o,t.sliceString(o,i));return Cn.set(t,a),a}if(n.from==o&&n.to==i)return n;let{text:s,from:r}=n;return r>o&&(s=t.sliceString(o,r)+s,r=o),n.to<i&&(s+=t.sliceString(n.to,i)),Cn.set(t,new e(r,s)),new e(o,s.slice(o-r,i-r))}},vi=class{constructor(t,o,i,n,s){this.text=t,this.to=s,this.done=!1,this.value=Fr,this.matchPos=Ci(t,n),this.re=new RegExp(o,Dn+(i?.ignoreCase?"i":"")),this.test=i?.test,this.flat=yi.get(t,n,this.chunkEnd(n+5e3))}chunkEnd(t){return t>=this.to?this.to:this.text.lineAt(t).to}next(){for(;;){let t=this.re.lastIndex=this.matchPos-this.flat.from,o=this.re.exec(this.flat.text);if(o&&!o[0]&&o.index==t&&(this.re.lastIndex=t+1,o=this.re.exec(this.flat.text)),o){let i=this.flat.from+o.index,n=i+o[0].length;if((this.flat.to>=this.to||o.index+o[0].length<=this.flat.text.length-10)&&(!this.test||this.test(i,n,o)))return this.value={from:i,to:n,match:o},this.matchPos=Ci(this.text,n+(i==n?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=yi.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}};typeof Symbol<"u"&&(bi.prototype[Symbol.iterator]=vi.prototype[Symbol.iterator]=function(){return this});function Ul(e){try{return new RegExp(e,Dn),!0}catch{return!1}}function Ci(e,t){if(t>=e.length)return t;let o=e.lineAt(t),i;for(;t<o.to&&(i=o.text.charCodeAt(t-o.from))>=56320&&i<57344;)t++;return t}function Sn(e){let t=String(e.state.doc.lineAt(e.state.selection.main.head).number),o=M("input",{class:"cm-textfield",name:"line",value:t}),i=M("form",{class:"cm-gotoLine",onkeydown:s=>{s.keyCode==27?(s.preventDefault(),e.dispatch({effects:Dt.of(!1)}),e.focus()):s.keyCode==13&&(s.preventDefault(),n())},onsubmit:s=>{s.preventDefault(),n()}},M("label",e.state.phrase("Go to line"),": ",o)," ",M("button",{class:"cm-button",type:"submit"},e.state.phrase("go")),M("button",{name:"close",onclick:()=>{e.dispatch({effects:Dt.of(!1)}),e.focus()},"aria-label":e.state.phrase("close"),type:"button"},["\xD7"]));function n(){let s=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(o.value);if(!s)return;let{state:r}=e,a=r.doc.lineAt(r.selection.main.head),[,l,h,d,g]=s,b=d?+d.slice(1):0,S=h?+h:a.number;if(h&&g){let W=S/100;l&&(W=W*(l=="-"?-1:1)+a.number/r.doc.lines),S=Math.round(r.doc.lines*W)}else h&&l&&(S=S*(l=="-"?-1:1)+a.number);let T=r.doc.line(Math.max(1,Math.min(r.doc.lines,S))),$=k.cursor(T.from+Math.max(0,Math.min(b,T.length)));e.dispatch({effects:[Dt.of(!1),I.scrollIntoView($.from,{y:"center"})],selection:$}),e.focus()}return{dom:i}}var Dt=Y.define(),Tr=Ke.define({create(){return!0},update(e,t){for(let o of t.effects)o.is(Dt)&&(e=o.value);return e},provide:e=>bt.from(e,t=>t?Sn:null)}),$l=e=>{let t=Je(e,Sn);if(!t){let o=[Dt.of(!0)];e.state.field(Tr,!1)==null&&o.push(Y.appendConfig.of([Tr,Wl])),e.dispatch({effects:o}),t=Je(e,Sn)}return t&&t.dom.querySelector("input").select(),!0},Wl=I.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px",position:"relative","& label":{fontSize:"80%"},"& [name=close]":{position:"absolute",top:"0",bottom:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:"0"}}}),jl={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},Lr=Le.define({combine(e){return Qe(e,jl,{highlightWordAroundCursor:(t,o)=>t||o,minSelectionLength:Math.min,maxMatches:Math.min})}});function Rr(e){let t=[Yl,Kl];return e&&t.push(Lr.of(e)),t}var Gl=U.mark({class:"cm-selectionMatch"}),zl=U.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function Mr(e,t,o,i){return(o==0||e(t.sliceDoc(o-1,o))!=te.Word)&&(i==t.doc.length||e(t.sliceDoc(i,i+1))!=te.Word)}function ql(e,t,o,i){return e(t.sliceDoc(o,o+1))==te.Word&&e(t.sliceDoc(i-1,i))==te.Word}var Kl=ti.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.selectionSet||e.docChanged||e.viewportChanged)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=e.state.facet(Lr),{state:o}=e,i=o.selection;if(i.ranges.length>1)return U.none;let n=i.main,s,r=null;if(n.empty){if(!t.highlightWordAroundCursor)return U.none;let l=o.wordAt(n.head);if(!l)return U.none;r=o.charCategorizer(n.head),s=o.sliceDoc(l.from,l.to)}else{let l=n.to-n.from;if(l<t.minSelectionLength||l>200)return U.none;if(t.wholeWords){if(s=o.sliceDoc(n.from,n.to),r=o.charCategorizer(n.head),!(Mr(r,o,n.from,n.to)&&ql(r,o,n.from,n.to)))return U.none}else if(s=o.sliceDoc(n.from,n.to),!s)return U.none}let a=[];for(let l of e.visibleRanges){let h=new Be(o.doc,s,l.from,l.to);for(;!h.next().done;){let{from:d,to:g}=h.value;if((!r||Mr(r,o,d,g))&&(n.empty&&d<=n.from&&g>=n.to?a.push(zl.range(d,g)):(d>=n.to||g<=n.from)&&a.push(Gl.range(d,g)),a.length>t.maxMatches))return U.none}}return U.set(a)}},{decorations:e=>e.decorations}),Yl=I.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),Ql=({state:e,dispatch:t})=>{let{selection:o}=e,i=k.create(o.ranges.map(n=>e.wordAt(n.head)||k.cursor(n.head)),o.mainIndex);return i.eq(o)?!1:(t(e.update({selection:i})),!0)};function Jl(e,t){let{main:o,ranges:i}=e.selection,n=e.wordAt(o.head),s=n&&n.from==o.from&&n.to==o.to;for(let r=!1,a=new Be(e.doc,t,i[i.length-1].to);;)if(a.next(),a.done){if(r)return null;a=new Be(e.doc,t,0,Math.max(0,i[i.length-1].from-1)),r=!0}else{if(r&&i.some(l=>l.from==a.value.from))continue;if(s){let l=e.wordAt(a.value.from);if(!l||l.from!=a.value.from||l.to!=a.value.to)continue}return a.value}}var Xl=({state:e,dispatch:t})=>{let{ranges:o}=e.selection;if(o.some(s=>s.from===s.to))return Ql({state:e,dispatch:t});let i=e.sliceDoc(o[0].from,o[0].to);if(e.selection.ranges.some(s=>e.sliceDoc(s.from,s.to)!=i))return!1;let n=Jl(e,i);return n?(t(e.update({selection:e.selection.addRange(k.range(n.from,n.to),!1),effects:I.scrollIntoView(n.to)})),!0):!1},ht=Le.define({combine(e){return Qe(e,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:t=>new En(t),scrollToMatch:t=>I.scrollIntoView(t)})}});var Si=class{constructor(t){this.search=t.search,this.caseSensitive=!!t.caseSensitive,this.literal=!!t.literal,this.regexp=!!t.regexp,this.replace=t.replace||"",this.valid=!!this.search&&(!this.regexp||Ul(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!t.wholeWord}unquote(t){return this.literal?t:t.replace(/\\([nrt\\])/g,(o,i)=>i=="n"?`
|
|
3
3
|
`:i=="r"?"\r":i=="t"?" ":"\\")}eq(t){return this.search==t.search&&this.replace==t.replace&&this.caseSensitive==t.caseSensitive&&this.regexp==t.regexp&&this.wholeWord==t.wholeWord}create(){return this.regexp?new xn(this):new kn(this)}getCursor(t,o=0,i){let n=t.doc?t:Ye.create({doc:t});return i==null&&(i=n.doc.length),this.regexp?ut(this,n,o,i):ct(this,n,o,i)}},ki=class{constructor(t){this.spec=t}};function ct(e,t,o,i){return new Be(t.doc,e.unquoted,o,i,e.caseSensitive?void 0:n=>n.toLowerCase(),e.wholeWord?Zl(t.doc,t.charCategorizer(t.selection.main.head)):void 0)}function Zl(e,t){return(o,i,n,s)=>((s>o||s+n.length<i)&&(s=Math.max(0,o-2),n=e.sliceString(s,Math.min(e.length,i+2))),(t(xi(n,o-s))!=te.Word||t(wi(n,o-s))!=te.Word)&&(t(wi(n,i-s))!=te.Word||t(xi(n,i-s))!=te.Word))}var kn=class extends ki{constructor(t){super(t)}nextMatch(t,o,i){let n=ct(this.spec,t,i,t.doc.length).nextOverlapping();if(n.done){let s=Math.min(t.doc.length,o+this.spec.unquoted.length);n=ct(this.spec,t,0,s).nextOverlapping()}return n.done||n.value.from==o&&n.value.to==i?null:n.value}prevMatchInRange(t,o,i){for(let n=i;;){let s=Math.max(o,n-1e4-this.spec.unquoted.length),r=ct(this.spec,t,s,n),a=null;for(;!r.nextOverlapping().done;)a=r.value;if(a)return a;if(s==o)return null;n-=1e4}}prevMatch(t,o,i){let n=this.prevMatchInRange(t,0,o);return n||(n=this.prevMatchInRange(t,Math.max(0,i-this.spec.unquoted.length),t.doc.length)),n&&(n.from!=o||n.to!=i)?n:null}getReplacement(t){return this.spec.unquote(this.spec.replace)}matchAll(t,o){let i=ct(this.spec,t,0,t.doc.length),n=[];for(;!i.next().done;){if(n.length>=o)return null;n.push(i.value)}return n}highlight(t,o,i,n){let s=ct(this.spec,t,Math.max(0,o-this.spec.unquoted.length),Math.min(i+this.spec.unquoted.length,t.doc.length));for(;!s.next().done;)n(s.value.from,s.value.to)}};function ut(e,t,o,i){return new bi(t.doc,e.search,{ignoreCase:!e.caseSensitive,test:e.wholeWord?ec(t.charCategorizer(t.selection.main.head)):void 0},o,i)}function xi(e,t){return e.slice(Ee(e,t,!1),t)}function wi(e,t){return e.slice(t,Ee(e,t))}function ec(e){return(t,o,i)=>!i[0].length||(e(xi(i.input,i.index))!=te.Word||e(wi(i.input,i.index))!=te.Word)&&(e(wi(i.input,i.index+i[0].length))!=te.Word||e(xi(i.input,i.index+i[0].length))!=te.Word)}var xn=class extends ki{nextMatch(t,o,i){let n=ut(this.spec,t,i,t.doc.length).next();return n.done&&(n=ut(this.spec,t,0,o).next()),n.done?null:n.value}prevMatchInRange(t,o,i){for(let n=1;;n++){let s=Math.max(o,i-n*1e4),r=ut(this.spec,t,s,i),a=null;for(;!r.next().done;)a=r.value;if(a&&(s==o||a.from>s+10))return a;if(s==o)return null}}prevMatch(t,o,i){return this.prevMatchInRange(t,0,o)||this.prevMatchInRange(t,i,t.doc.length)}getReplacement(t){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(o,i)=>{if(i=="&")return t.match[0];if(i=="$")return"$";for(let n=i.length;n>0;n--){let s=+i.slice(0,n);if(s>0&&s<t.match.length)return t.match[s]+i.slice(n)}return o})}matchAll(t,o){let i=ut(this.spec,t,0,t.doc.length),n=[];for(;!i.next().done;){if(n.length>=o)return null;n.push(i.value)}return n}highlight(t,o,i,n){let s=ut(this.spec,t,Math.max(0,o-250),Math.min(i+250,t.doc.length));for(;!s.next().done;)n(s.value.from,s.value.to)}},_t=Y.define(),Pn=Y.define(),Ve=Ke.define({create(e){return new Pt(wn(e).create(),null)},update(e,t){for(let o of t.effects)o.is(_t)?e=new Pt(o.value.create(),e.panel):o.is(Pn)&&(e=new Pt(e.query,o.value?_n:null));return e},provide:e=>bt.from(e,t=>t.panel)});var Pt=class{constructor(t,o){this.query=t,this.panel=o}},tc=U.mark({class:"cm-searchMatch"}),ic=U.mark({class:"cm-searchMatch cm-searchMatch-selected"}),nc=ti.fromClass(class{constructor(e){this.view=e,this.decorations=this.highlight(e.state.field(Ve))}update(e){let t=e.state.field(Ve);(t!=e.startState.field(Ve)||e.docChanged||e.selectionSet||e.viewportChanged)&&(this.decorations=this.highlight(t))}highlight({query:e,panel:t}){if(!t||!e.spec.valid)return U.none;let{view:o}=this,i=new Zt;for(let n=0,s=o.visibleRanges,r=s.length;n<r;n++){let{from:a,to:l}=s[n];for(;n<r-1&&l>s[n+1].from-500;)l=s[++n].to;e.highlight(o.state,a,l,(h,d)=>{let g=o.state.selection.ranges.some(b=>b.from==h&&b.to==d);i.add(h,d,g?ic:tc)})}return i.finish()}},{decorations:e=>e.decorations});function At(e){return t=>{let o=t.state.field(Ve,!1);return o&&o.query.spec.valid?e(t,o):Pi(t)}}var Ei=At((e,{query:t})=>{let{to:o}=e.state.selection.main,i=t.nextMatch(e.state,o,o);if(!i)return!1;let n=k.single(i.from,i.to),s=e.state.facet(ht);return e.dispatch({selection:n,effects:[An(e,i),s.scrollToMatch(n.main,e)],userEvent:"select.search"}),Vr(e),!0}),Di=At((e,{query:t})=>{let{state:o}=e,{from:i}=o.selection.main,n=t.prevMatch(o,i,i);if(!n)return!1;let s=k.single(n.from,n.to),r=e.state.facet(ht);return e.dispatch({selection:s,effects:[An(e,n),r.scrollToMatch(s.main,e)],userEvent:"select.search"}),Vr(e),!0}),sc=At((e,{query:t})=>{let o=t.matchAll(e.state,1e3);return!o||!o.length?!1:(e.dispatch({selection:k.create(o.map(i=>k.range(i.from,i.to))),userEvent:"select.search.matches"}),!0)}),oc=({state:e,dispatch:t})=>{let o=e.selection;if(o.ranges.length>1||o.main.empty)return!1;let{from:i,to:n}=o.main,s=[],r=0;for(let a=new Be(e.doc,e.sliceDoc(i,n));!a.next().done;){if(s.length>1e3)return!1;a.value.from==i&&(r=s.length),s.push(k.range(a.value.from,a.value.to))}return t(e.update({selection:k.create(s,r),userEvent:"select.search.matches"})),!0},Ir=At((e,{query:t})=>{let{state:o}=e,{from:i,to:n}=o.selection.main;if(o.readOnly)return!1;let s=t.nextMatch(o,i,i);if(!s)return!1;let r=s,a=[],l,h,d=[];r.from==i&&r.to==n&&(h=o.toText(t.getReplacement(r)),a.push({from:r.from,to:r.to,insert:h}),r=t.nextMatch(o,r.from,r.to),d.push(I.announce.of(o.phrase("replaced match on line $",o.doc.lineAt(i).number)+".")));let g=e.state.changes(a);return r&&(l=k.single(r.from,r.to).map(g),d.push(An(e,r)),d.push(o.facet(ht).scrollToMatch(l.main,e))),e.dispatch({changes:g,selection:l,effects:d,userEvent:"input.replace"}),!0}),rc=At((e,{query:t})=>{if(e.state.readOnly)return!1;let o=t.matchAll(e.state,1e9).map(n=>{let{from:s,to:r}=n;return{from:s,to:r,insert:t.getReplacement(n)}});if(!o.length)return!1;let i=e.state.phrase("replaced $ matches",o.length)+".";return e.dispatch({changes:o,effects:I.announce.of(i),userEvent:"input.replace.all"}),!0});function _n(e){return e.state.facet(ht).createPanel(e)}function wn(e,t){var o,i,n,s,r;let a=e.selection.main,l=a.empty||a.to>a.from+100?"":e.sliceDoc(a.from,a.to);if(t&&!l)return t;let h=e.facet(ht);return new Si({search:((o=t?.literal)!==null&&o!==void 0?o:h.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:(i=t?.caseSensitive)!==null&&i!==void 0?i:h.caseSensitive,literal:(n=t?.literal)!==null&&n!==void 0?n:h.literal,regexp:(s=t?.regexp)!==null&&s!==void 0?s:h.regexp,wholeWord:(r=t?.wholeWord)!==null&&r!==void 0?r:h.wholeWord})}function Or(e){let t=Je(e,_n);return t&&t.dom.querySelector("[main-field]")}function Vr(e){let t=Or(e);t&&t==e.root.activeElement&&t.select()}var Pi=e=>{let t=e.state.field(Ve,!1);if(t&&t.panel){let o=Or(e);if(o&&o!=e.root.activeElement){let i=wn(e.state,t.query.spec);i.valid&&e.dispatch({effects:_t.of(i)}),o.focus(),o.select()}}else e.dispatch({effects:[Pn.of(!0),t?_t.of(wn(e.state,t.query.spec)):Y.appendConfig.of(lc)]});return!0},_i=e=>{let t=e.state.field(Ve,!1);if(!t||!t.panel)return!1;let o=Je(e,_n);return o&&o.dom.contains(e.root.activeElement)&&e.focus(),e.dispatch({effects:Pn.of(!1)}),!0},Br=[{key:"Mod-f",run:Pi,scope:"editor search-panel"},{key:"F3",run:Ei,shift:Di,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:Ei,shift:Di,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:_i,scope:"editor search-panel"},{key:"Mod-Shift-l",run:oc},{key:"Mod-Alt-g",run:$l},{key:"Mod-d",run:Xl,preventDefault:!0}],En=class{constructor(t){this.view=t;let o=this.query=t.state.field(Ve).query.spec;this.commit=this.commit.bind(this),this.searchField=M("input",{value:o.search,placeholder:oe(t,"Find"),"aria-label":oe(t,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=M("input",{value:o.replace,placeholder:oe(t,"Replace"),"aria-label":oe(t,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=M("input",{type:"checkbox",name:"case",form:"",checked:o.caseSensitive,onchange:this.commit}),this.reField=M("input",{type:"checkbox",name:"re",form:"",checked:o.regexp,onchange:this.commit}),this.wordField=M("input",{type:"checkbox",name:"word",form:"",checked:o.wholeWord,onchange:this.commit});function i(n,s,r){return M("button",{class:"cm-button",name:n,onclick:s,type:"button"},r)}this.dom=M("div",{onkeydown:n=>this.keydown(n),class:"cm-search"},[this.searchField,i("next",()=>Ei(t),[oe(t,"next")]),i("prev",()=>Di(t),[oe(t,"previous")]),i("select",()=>sc(t),[oe(t,"all")]),M("label",null,[this.caseField,oe(t,"match case")]),M("label",null,[this.reField,oe(t,"regexp")]),M("label",null,[this.wordField,oe(t,"by word")]),...t.state.readOnly?[]:[M("br"),this.replaceField,i("replace",()=>Ir(t),[oe(t,"replace")]),i("replaceAll",()=>rc(t),[oe(t,"replace all")])],M("button",{name:"close",onclick:()=>_i(t),"aria-label":oe(t,"close"),type:"button"},["\xD7"])])}commit(){let t=new Si({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});t.eq(this.query)||(this.query=t,this.view.dispatch({effects:_t.of(t)}))}keydown(t){js(this.view,t,"search-panel")?t.preventDefault():t.keyCode==13&&t.target==this.searchField?(t.preventDefault(),(t.shiftKey?Di:Ei)(this.view)):t.keyCode==13&&t.target==this.replaceField&&(t.preventDefault(),Ir(this.view))}update(t){for(let o of t.transactions)for(let i of o.effects)i.is(_t)&&!i.value.eq(this.query)&&this.setQuery(i.value)}setQuery(t){this.query=t,this.searchField.value=t.search,this.replaceField.value=t.replace,this.caseField.checked=t.caseSensitive,this.reField.checked=t.regexp,this.wordField.checked=t.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(ht).top}};function oe(e,t){return e.state.phrase(t)}var pi=30,gi=/[\s\.,:;?!]/;function An(e,{from:t,to:o}){let i=e.state.doc.lineAt(t),n=e.state.doc.lineAt(o).to,s=Math.max(i.from,t-pi),r=Math.min(n,o+pi),a=e.state.sliceDoc(s,r);if(s!=i.from){for(let l=0;l<pi;l++)if(!gi.test(a[l+1])&&gi.test(a[l])){a=a.slice(l);break}}if(r!=n){for(let l=a.length-1;l>a.length-pi;l--)if(!gi.test(a[l-1])&&gi.test(a[l])){a=a.slice(0,l);break}}return I.announce.of(`${e.state.phrase("current match")}. ${a} ${e.state.phrase("on line")} ${i.number}.`)}var ac=I.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),lc=[Ve,Us.low(nc),ac];var Ti=class{constructor(t,o,i){this.from=t,this.to=o,this.diagnostic=i}},Ze=class e{constructor(t,o,i){this.diagnostics=t,this.panel=o,this.selected=i}static init(t,o,i){let n=i.facet(Tt).markerFilter;n&&(t=n(t,i));let s=t.slice().sort((S,T)=>S.from-T.from||S.to-T.to),r=new Zt,a=[],l=0,h=i.doc.iter(),d=0,g=i.doc.length;for(let S=0;;){let T=S==s.length?null:s[S];if(!T&&!a.length)break;let $,W;if(a.length)$=l,W=a.reduce((O,ge)=>Math.min(O,ge.to),T&&T.from>$?T.from:1e8);else{if($=T.from,$>g)break;W=T.to,a.push(T),S++}for(;S<s.length;){let O=s[S];if(O.from==$&&(O.to>O.from||O.to==$))a.push(O),S++,W=Math.min(O.to,W);else{W=Math.min(O.from,W);break}}W=Math.min(W,g);let It=!1;if(a.some(O=>O.from==$&&(O.to==W||W==g))&&(It=$==W,!It&&W-$<10)){let O=$-(d+h.value.length);O>0&&(h.next(O),d=$);for(let ge=$;;){if(ge>=W){It=!0;break}if(!h.lineBreak&&d+h.value.length>ge)break;ge=d+h.value.length,d+=h.value.length,h.next()}}let Fn=vc(a);if(It)r.add($,$,U.widget({widget:new Tn(Fn),diagnostics:a.slice()}));else{let O=a.reduce((ge,Ln)=>Ln.markClass?ge+" "+Ln.markClass:ge,"");r.add($,W,U.mark({class:"cm-lintRange cm-lintRange-"+Fn+O,diagnostics:a.slice(),inclusiveEnd:a.some(ge=>ge.to>W)}))}if(l=W,l==g)break;for(let O=0;O<a.length;O++)a[O].to<=l&&a.splice(O--,1)}let b=r.finish();return new e(b,o,dt(b))}};function dt(e,t=null,o=0){let i=null;return e.between(o,1e9,(n,s,{spec:r})=>{if(!(t&&r.diagnostics.indexOf(t)<0))if(!i)i=new Ti(n,s,t||r.diagnostics[0]);else{if(r.diagnostics.indexOf(i.diagnostic)<0)return!1;i=new Ti(i.from,s,i.diagnostic)}}),i}function cc(e,t){let o=t.pos,i=t.end||o,n=e.state.facet(Tt).hideOn(e,o,i);if(n!=null)return n;let s=e.startState.doc.lineAt(t.pos);return!!(e.effects.some(r=>r.is(Ur))||e.changes.touchesRange(s.from,Math.max(s.to,i)))}function uc(e,t){return e.field(re,!1)?t:t.concat(Y.appendConfig.of(Cc))}var Ur=Y.define(),Mn=Y.define(),$r=Y.define(),re=Ke.define({create(){return new Ze(U.none,null,null)},update(e,t){if(t.docChanged&&e.diagnostics.size){let o=e.diagnostics.map(t.changes),i=null,n=e.panel;if(e.selected){let s=t.changes.mapPos(e.selected.from,1);i=dt(o,e.selected.diagnostic,s)||dt(o,null,s)}!o.size&&n&&t.state.facet(Tt).autoPanel&&(n=null),e=new Ze(o,n,i)}for(let o of t.effects)if(o.is(Ur)){let i=t.state.facet(Tt).autoPanel?o.value.length?Mt.open:null:e.panel;e=Ze.init(o.value,i,t.state)}else o.is(Mn)?e=new Ze(e.diagnostics,o.value?Mt.open:null,e.selected):o.is($r)&&(e=new Ze(e.diagnostics,e.panel,o.value));return e},provide:e=>[bt.from(e,t=>t.panel),I.decorations.from(e,t=>t.diagnostics)]});var hc=U.mark({class:"cm-lintRange cm-lintRange-active"});function dc(e,t,o){let{diagnostics:i}=e.state.field(re),n,s=-1,r=-1;i.between(t-(o<0?1:0),t+(o>0?1:0),(l,h,{spec:d})=>{if(t>=l&&t<=h&&(l==h||(t>l||o>0)&&(t<h||o<0)))return n=d.diagnostics,s=l,r=h,!1});let a=e.state.facet(Tt).tooltipFilter;return n&&a&&(n=a(n,e.state)),n?{pos:s,end:r,above:e.state.doc.lineAt(s).to<r,create(){return{dom:fc(e,n)}}}:null}function fc(e,t){return M("ul",{class:"cm-tooltip-lint"},t.map(o=>Gr(e,o,!1)))}var mc=e=>{let t=e.state.field(re,!1);(!t||!t.panel)&&e.dispatch({effects:uc(e.state,[Mn.of(!0)])});let o=Je(e,Mt.open);return o&&o.dom.querySelector(".cm-panel-lint ul").focus(),!0},Nr=e=>{let t=e.state.field(re,!1);return!t||!t.panel?!1:(e.dispatch({effects:Mn.of(!1)}),!0)},pc=e=>{let t=e.state.field(re,!1);if(!t)return!1;let o=e.state.selection.main,i=t.diagnostics.iter(o.to+1);return!i.value&&(i=t.diagnostics.iter(0),!i.value||i.from==o.from&&i.to==o.to)?!1:(e.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0}),!0)};var Wr=[{key:"Mod-Shift-m",run:mc,preventDefault:!0},{key:"F8",run:pc}];var Tt=Le.define({combine(e){return Ft({sources:e.map(t=>t.source).filter(t=>t!=null)},Qe(e.map(t=>t.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{delay:Math.max,markerFilter:Hr,tooltipFilter:Hr,needsRefresh:(t,o)=>t?o?i=>t(i)||o(i):t:o,hideOn:(t,o)=>t?o?(i,n,s)=>t(i,n,s)||o(i,n,s):t:o,autoPanel:(t,o)=>t||o}))}});function Hr(e,t){return e?t?(o,i)=>t(e(o,i),i):e:t}function jr(e){let t=[];if(e)e:for(let{name:o}of e){for(let i=0;i<o.length;i++){let n=o[i];if(/[a-zA-Z]/.test(n)&&!t.some(s=>s.toLowerCase()==n.toLowerCase())){t.push(n);continue e}}t.push("")}return t}function Gr(e,t,o){var i;let n=o?jr(t.actions):[];return M("li",{class:"cm-diagnostic cm-diagnostic-"+t.severity},M("span",{class:"cm-diagnosticText"},t.renderMessage?t.renderMessage(e):t.message),(i=t.actions)===null||i===void 0?void 0:i.map((s,r)=>{let a=!1,l=S=>{if(S.preventDefault(),a)return;a=!0;let T=dt(e.state.field(re).diagnostics,t);T&&s.apply(e,T.from,T.to)},{name:h}=s,d=n[r]?h.indexOf(n[r]):-1,g=d<0?h:[h.slice(0,d),M("u",h.slice(d,d+1)),h.slice(d+1)],b=s.markClass?" "+s.markClass:"";return M("button",{type:"button",class:"cm-diagnosticAction"+b,onclick:l,onmousedown:l,"aria-label":` Action: ${h}${d<0?"":` (access key "${n[r]})"`}.`},g)}),t.source&&M("div",{class:"cm-diagnosticSource"},t.source))}var Tn=class extends $s{constructor(t){super(),this.sev=t}eq(t){return t.sev==this.sev}toDOM(){return M("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}},Mi=class{constructor(t,o){this.diagnostic=o,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=Gr(t,o,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}},Mt=class e{constructor(t){this.view=t,this.items=[];let o=n=>{if(n.keyCode==27)Nr(this.view),this.view.focus();else if(n.keyCode==38||n.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(n.keyCode==40||n.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(n.keyCode==36)this.moveSelection(0);else if(n.keyCode==35)this.moveSelection(this.items.length-1);else if(n.keyCode==13)this.view.focus();else if(n.keyCode>=65&&n.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:s}=this.items[this.selectedIndex],r=jr(s.actions);for(let a=0;a<r.length;a++)if(r[a].toUpperCase().charCodeAt(0)==n.keyCode){let l=dt(this.view.state.field(re).diagnostics,s);l&&s.actions[a].apply(t,l.from,l.to)}}else return;n.preventDefault()},i=n=>{for(let s=0;s<this.items.length;s++)this.items[s].dom.contains(n.target)&&this.moveSelection(s)};this.list=M("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:o,onclick:i}),this.dom=M("div",{class:"cm-panel-lint"},this.list,M("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>Nr(this.view)},"\xD7")),this.update()}get selectedIndex(){let t=this.view.state.field(re).selected;if(!t)return-1;for(let o=0;o<this.items.length;o++)if(this.items[o].diagnostic==t.diagnostic)return o;return-1}update(){let{diagnostics:t,selected:o}=this.view.state.field(re),i=0,n=!1,s=null,r=new Set;for(t.between(0,this.view.state.doc.length,(a,l,{spec:h})=>{for(let d of h.diagnostics){if(r.has(d))continue;r.add(d);let g=-1,b;for(let S=i;S<this.items.length;S++)if(this.items[S].diagnostic==d){g=S;break}g<0?(b=new Mi(this.view,d),this.items.splice(i,0,b),n=!0):(b=this.items[g],g>i&&(this.items.splice(i,g-i),n=!0)),o&&b.diagnostic==o.diagnostic?b.dom.hasAttribute("aria-selected")||(b.dom.setAttribute("aria-selected","true"),s=b):b.dom.hasAttribute("aria-selected")&&b.dom.removeAttribute("aria-selected"),i++}});i<this.items.length&&!(this.items.length==1&&this.items[0].diagnostic.from<0);)n=!0,this.items.pop();this.items.length==0&&(this.items.push(new Mi(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),n=!0),s?(this.list.setAttribute("aria-activedescendant",s.id),this.view.requestMeasure({key:this,read:()=>({sel:s.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:a,panel:l})=>{let h=l.height/this.list.offsetHeight;a.top<l.top?this.list.scrollTop-=(l.top-a.top)/h:a.bottom>l.bottom&&(this.list.scrollTop+=(a.bottom-l.bottom)/h)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),n&&this.sync()}sync(){let t=this.list.firstChild;function o(){let i=t;t=i.nextSibling,i.remove()}for(let i of this.items)if(i.dom.parentNode==this.list){for(;t!=i.dom;)o();t=i.dom.nextSibling}else this.list.insertBefore(i.dom,t);for(;t;)o()}moveSelection(t){if(this.selectedIndex<0)return;let o=this.view.state.field(re),i=dt(o.diagnostics,this.items[t].diagnostic);i&&this.view.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0,effects:$r.of(i)})}static open(t){return new e(t)}};function gc(e,t='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${t}>${encodeURIComponent(e)}</svg>')`}function Ai(e){return gc(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${e}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}var bc=I.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:Ai("#d11")},".cm-lintRange-warning":{backgroundImage:Ai("orange")},".cm-lintRange-info":{backgroundImage:Ai("#999")},".cm-lintRange-hint":{backgroundImage:Ai("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});function yc(e){return e=="error"?4:e=="warning"?3:e=="info"?2:1}function vc(e){let t="hint",o=1;for(let i of e){let n=yc(i.severity);n>o&&(o=n,t=i.severity)}return t}var Cc=[re,I.decorations.compute([re],e=>{let{selected:t,panel:o}=e.field(re);return!t||!o||t.from==t.to?U.none:U.set([hc.range(t.from,t.to)])}),Qs(dc,{hideOn:cc}),bc];var zr=[Js(),Xs(),Yi(),mn(),no(),Ki(),Gs(),Ye.allowMultipleSelections.of(!0),to(),vt(Xi,{fallback:!0}),oo(),ao(),co(),Ks(),Ys(),zs(),Rr(),gt.of([...lo,...bn,...Br,...pn,...io,...uo,...Wr])],qr=[Yi(),mn(),Ki(),vt(Xi,{fallback:!0}),gt.of([...bn,...pn])];var Sc=pt.define(),Kr=(()=>{let t=class t{constructor(){this._elementRef=C(Ue),this.autoFocus=!1,this.value="",this.disabled=!1,this.readonly=!1,this.theme="light",this.placeholder="",this.indentWithTab=!1,this.indentUnit="",this.lineWrapping=!1,this.highlightWhitespace=!1,this.languages=[],this.language="",this.setup="basic",this.extensions=[],this.change=new he,this.focus=new he,this.blur=new he,this._onChange=()=>{},this._onTouched=()=>{},this._updateListener=I.updateListener.of(i=>{if(i.docChanged&&!i.transactions.some(n=>n.annotation(Sc))){let n=i.state.doc.toString();this._onChange(n),this.change.emit(n)}}),this._editableConf=new ve,this._readonlyConf=new ve,this._themeConf=new ve,this._placeholderConf=new ve,this._indentWithTabConf=new ve,this._indentUnitConf=new ve,this._lineWrappingConf=new ve,this._highlightWhitespaceConf=new ve,this._languageConf=new ve}_getAllExtensions(){return[this._updateListener,this._editableConf.of([]),this._readonlyConf.of([]),this._themeConf.of([]),this._placeholderConf.of([]),this._indentWithTabConf.of([]),this._indentUnitConf.of([]),this._lineWrappingConf.of([]),this._highlightWhitespaceConf.of([]),this._languageConf.of([]),this.setup==="basic"?zr:this.setup==="minimal"?qr:[],...this.extensions]}ngOnChanges(i){this.view&&(i.value&&this.setValue(this.value),i.disabled&&this.setEditable(!this.disabled),i.readonly&&this.setReadonly(this.readonly),i.theme&&this.setTheme(this.theme),i.placeholder&&this.setPlaceholder(this.placeholder),i.indentWithTab&&this.setIndentWithTab(this.indentWithTab),i.indentUnit&&this.setIndentUnit(this.indentUnit),i.lineWrapping&&this.setLineWrapping(this.lineWrapping),i.highlightWhitespace&&this.setHighlightWhitespace(this.highlightWhitespace),i.language&&this.setLanguage(this.language),(i.setup||i.extensions)&&this.setExtensions(this._getAllExtensions()))}ngOnInit(){this.state=Ye.create({doc:this.value,extensions:this._getAllExtensions()}),this.view=new I({root:this.root,parent:this._elementRef.nativeElement,state:this.state}),this.autoFocus&&this.view.focus(),this.view.contentDOM.addEventListener("focus",()=>{this._onTouched(),this.focus.emit()}),this.view.contentDOM.addEventListener("blur",()=>{this._onTouched(),this.blur.emit()}),this.setEditable(!this.disabled),this.setReadonly(this.readonly),this.setTheme(this.theme),this.setPlaceholder(this.placeholder),this.setIndentWithTab(this.indentWithTab),this.setIndentUnit(this.indentUnit),this.setLineWrapping(this.lineWrapping),this.setHighlightWhitespace(this.highlightWhitespace),this.setLanguage(this.language)}ngOnDestroy(){this.view.destroy()}writeValue(i){this.view&&this.setValue(i)}registerOnChange(i){this._onChange=i}registerOnTouched(i){this._onTouched=i}setDisabledState(i){this.disabled=i,this.setEditable(!i)}setValue(i){this.view.dispatch({changes:{from:0,to:this.view.state.doc.length,insert:i},annotations:ot.addToHistory.of(!1)})}_dispatchEffects(i){return this.view.dispatch({effects:i})}setExtensions(i){this._dispatchEffects(Y.reconfigure.of(i))}setEditable(i){this._dispatchEffects(this._editableConf.reconfigure(I.editable.of(i)))}setReadonly(i){this._dispatchEffects(this._readonlyConf.reconfigure(Ye.readOnly.of(i)))}setTheme(i){this._dispatchEffects(this._themeConf.reconfigure(i==="light"?[]:i==="dark"?_r:i))}setPlaceholder(i){this._dispatchEffects(this._placeholderConf.reconfigure(i?qs(i):[]))}setIndentWithTab(i){this._dispatchEffects(this._indentWithTabConf.reconfigure(i?gt.of([kr]):[]))}setIndentUnit(i){this._dispatchEffects(this._indentUnitConf.reconfigure(i?si.of(i):[]))}setLineWrapping(i){this._dispatchEffects(this._lineWrappingConf.reconfigure(i?I.lineWrapping:[]))}setHighlightWhitespace(i){this._dispatchEffects(this._highlightWhitespaceConf.reconfigure(i?Zs():[]))}setLanguage(i){if(!i||i=="plaintext"){this._dispatchEffects(this._languageConf.reconfigure([]));return}if(this.languages.length===0){this.view&&console.error("No supported languages. Please set the `languages` prop at first.");return}this._findLanguage(i)?.load().then(s=>{this._dispatchEffects(this._languageConf.reconfigure([s]))})}_findLanguage(i){for(let n of this.languages)for(let s of[n.name,...n.alias])if(i.toLowerCase()===s.toLowerCase())return n;return console.error("Language not found:",i),console.info("Supported language names:",this.languages.map(n=>n.name).join(", ")),null}};t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=R({type:t,selectors:[["code-editor"]],hostAttrs:[1,"code-editor"],inputs:{root:"root",autoFocus:[2,"autoFocus","autoFocus",qe],value:"value",disabled:[2,"disabled","disabled",qe],readonly:[2,"readonly","readonly",qe],theme:"theme",placeholder:"placeholder",indentWithTab:[2,"indentWithTab","indentWithTab",qe],indentUnit:"indentUnit",lineWrapping:[2,"lineWrapping","lineWrapping",qe],highlightWhitespace:[2,"highlightWhitespace","highlightWhitespace",qe],languages:"languages",language:"language",setup:"setup",extensions:"extensions"},outputs:{change:"change",focus:"focus",blur:"blur"},features:[Bt([{provide:ts,useExisting:$n(()=>t),multi:!0}]),mt],decls:0,vars:0,template:function(n,s){},styles:[`.code-editor{display:block}.code-editor .cm-editor{height:100%}
|
|
4
4
|
`],encapsulation:2,changeDetection:0});let e=t;return e})();function u(e){return new eo(ro.define(e))}function Ne(e){return import("./chunk-DJDRX53V.js").then(t=>t.sql({dialect:t[e]}))}var In=[c.of({name:"C",extensions:["c","h","ino"],load(){return import("./chunk-YCTCESL4.js").then(e=>e.cpp())}}),c.of({name:"C++",alias:["cpp"],extensions:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],load(){return import("./chunk-YCTCESL4.js").then(e=>e.cpp())}}),c.of({name:"CQL",alias:["cassandra"],extensions:["cql"],load(){return Ne("Cassandra")}}),c.of({name:"CSS",extensions:["css"],load(){return import("./chunk-QVFPHTOH.js").then(e=>e.css())}}),c.of({name:"Go",extensions:["go"],load(){return import("./chunk-HHWXIK2M.js").then(e=>e.go())}}),c.of({name:"HTML",alias:["xhtml"],extensions:["html","htm","handlebars","hbs"],load(){return import("./chunk-HC7F57NA.js").then(e=>e.html())}}),c.of({name:"Java",extensions:["java"],load(){return import("./chunk-EIYRBM4J.js").then(e=>e.java())}}),c.of({name:"JavaScript",alias:["ecmascript","js","node"],extensions:["js","mjs","cjs"],load(){return import("./chunk-JMYAD7E2.js").then(e=>e.javascript())}}),c.of({name:"Jinja",extensions:["j2","jinja","jinja2"],load(){return import("./chunk-Q556XB3S.js").then(e=>e.jinja())}}),c.of({name:"JSON",alias:["json5"],extensions:["json","map"],load(){return import("./chunk-23UUFZSR.js").then(e=>e.json())}}),c.of({name:"JSX",extensions:["jsx"],load(){return import("./chunk-JMYAD7E2.js").then(e=>e.javascript({jsx:!0}))}}),c.of({name:"LESS",extensions:["less"],load(){return import("./chunk-NOPACN4F.js").then(e=>e.less())}}),c.of({name:"Liquid",extensions:["liquid"],load(){return import("./chunk-5XUIPWOH.js").then(e=>e.liquid())}}),c.of({name:"MariaDB SQL",load(){return Ne("MariaSQL")}}),c.of({name:"Markdown",extensions:["md","markdown","mkd"],load(){return import("./chunk-M4XL3JN5.js").then(e=>e.markdown())}}),c.of({name:"MS SQL",load(){return Ne("MSSQL")}}),c.of({name:"MySQL",load(){return Ne("MySQL")}}),c.of({name:"PHP",extensions:["php","php3","php4","php5","php7","phtml"],load(){return import("./chunk-AADK5D2H.js").then(e=>e.php())}}),c.of({name:"PLSQL",extensions:["pls"],load(){return Ne("PLSQL")}}),c.of({name:"PostgreSQL",load(){return Ne("PostgreSQL")}}),c.of({name:"Python",extensions:["BUILD","bzl","py","pyw"],filename:/^(BUCK|BUILD)$/,load(){return import("./chunk-HKRGIRKB.js").then(e=>e.python())}}),c.of({name:"Rust",extensions:["rs"],load(){return import("./chunk-7CKHC72R.js").then(e=>e.rust())}}),c.of({name:"Sass",extensions:["sass"],load(){return import("./chunk-C3AAEQKW.js").then(e=>e.sass({indented:!0}))}}),c.of({name:"SCSS",extensions:["scss"],load(){return import("./chunk-C3AAEQKW.js").then(e=>e.sass())}}),c.of({name:"SQL",extensions:["sql"],load(){return Ne("StandardSQL")}}),c.of({name:"SQLite",load(){return Ne("SQLite")}}),c.of({name:"TSX",extensions:["tsx"],load(){return import("./chunk-JMYAD7E2.js").then(e=>e.javascript({jsx:!0,typescript:!0}))}}),c.of({name:"TypeScript",alias:["ts"],extensions:["ts","mts","cts"],load(){return import("./chunk-JMYAD7E2.js").then(e=>e.javascript({typescript:!0}))}}),c.of({name:"WebAssembly",extensions:["wat","wast"],load(){return import("./chunk-EL6QL4TP.js").then(e=>e.wast())}}),c.of({name:"XML",alias:["rss","wsdl","xsd"],extensions:["xml","xsl","xsd","svg"],load(){return import("./chunk-ACUF7IKP.js").then(e=>e.xml())}}),c.of({name:"YAML",alias:["yml"],extensions:["yaml","yml"],load(){return import("./chunk-XOF4UW3S.js").then(e=>e.yaml())}}),c.of({name:"APL",extensions:["dyalog","apl"],load(){return import("./chunk-4ORP3SBY.js").then(e=>u(e.apl))}}),c.of({name:"PGP",alias:["asciiarmor"],extensions:["asc","pgp","sig"],load(){return import("./chunk-UPGVU5LG.js").then(e=>u(e.asciiArmor))}}),c.of({name:"ASN.1",extensions:["asn","asn1"],load(){return import("./chunk-AGREZPV4.js").then(e=>u(e.asn1({})))}}),c.of({name:"Asterisk",filename:/^extensions\.conf$/i,load(){return import("./chunk-YTDE6SXT.js").then(e=>u(e.asterisk))}}),c.of({name:"Brainfuck",extensions:["b","bf"],load(){return import("./chunk-NYJPOP4L.js").then(e=>u(e.brainfuck))}}),c.of({name:"Cobol",extensions:["cob","cpy"],load(){return import("./chunk-2FC5EKS5.js").then(e=>u(e.cobol))}}),c.of({name:"C#",alias:["csharp","cs"],extensions:["cs"],load(){return import("./chunk-WR3MA3L3.js").then(e=>u(e.csharp))}}),c.of({name:"Clojure",extensions:["clj","cljc","cljx"],load(){return import("./chunk-JAEJ6IMV.js").then(e=>u(e.clojure))}}),c.of({name:"ClojureScript",extensions:["cljs"],load(){return import("./chunk-JAEJ6IMV.js").then(e=>u(e.clojure))}}),c.of({name:"Closure Stylesheets (GSS)",extensions:["gss"],load(){return import("./chunk-OQRWXCLY.js").then(e=>u(e.gss))}}),c.of({name:"CMake",extensions:["cmake","cmake.in"],filename:/^CMakeLists\.txt$/,load(){return import("./chunk-556I6YIW.js").then(e=>u(e.cmake))}}),c.of({name:"CoffeeScript",alias:["coffee","coffee-script"],extensions:["coffee"],load(){return import("./chunk-PZGLDZZM.js").then(e=>u(e.coffeeScript))}}),c.of({name:"Common Lisp",alias:["lisp"],extensions:["cl","lisp","el"],load(){return import("./chunk-VWIRXLNE.js").then(e=>u(e.commonLisp))}}),c.of({name:"Cypher",extensions:["cyp","cypher"],load(){return import("./chunk-BBHYIURC.js").then(e=>u(e.cypher))}}),c.of({name:"Cython",extensions:["pyx","pxd","pxi"],load(){return import("./chunk-MKUUWY6Y.js").then(e=>u(e.cython))}}),c.of({name:"Crystal",extensions:["cr"],load(){return import("./chunk-VZMVGIVW.js").then(e=>u(e.crystal))}}),c.of({name:"D",extensions:["d"],load(){return import("./chunk-JF6WIV6M.js").then(e=>u(e.d))}}),c.of({name:"Dart",extensions:["dart"],load(){return import("./chunk-WR3MA3L3.js").then(e=>u(e.dart))}}),c.of({name:"diff",extensions:["diff","patch"],load(){return import("./chunk-7DUTYOJG.js").then(e=>u(e.diff))}}),c.of({name:"Dockerfile",filename:/^Dockerfile$/,load(){return import("./chunk-7NZJZATZ.js").then(e=>u(e.dockerFile))}}),c.of({name:"DTD",extensions:["dtd"],load(){return import("./chunk-PTLYIUFW.js").then(e=>u(e.dtd))}}),c.of({name:"Dylan",extensions:["dylan","dyl","intr"],load(){return import("./chunk-5KJXGMKR.js").then(e=>u(e.dylan))}}),c.of({name:"EBNF",load(){return import("./chunk-5SPGSHKL.js").then(e=>u(e.ebnf))}}),c.of({name:"ECL",extensions:["ecl"],load(){return import("./chunk-TJZKTNNS.js").then(e=>u(e.ecl))}}),c.of({name:"edn",extensions:["edn"],load(){return import("./chunk-JAEJ6IMV.js").then(e=>u(e.clojure))}}),c.of({name:"Eiffel",extensions:["e"],load(){return import("./chunk-QM6CQMEX.js").then(e=>u(e.eiffel))}}),c.of({name:"Elm",extensions:["elm"],load(){return import("./chunk-6I5BGQHT.js").then(e=>u(e.elm))}}),c.of({name:"Erlang",extensions:["erl"],load(){return import("./chunk-F6V37MKG.js").then(e=>u(e.erlang))}}),c.of({name:"Esper",load(){return import("./chunk-S7S5M3AZ.js").then(e=>u(e.esper))}}),c.of({name:"Factor",extensions:["factor"],load(){return import("./chunk-GAGHHYLF.js").then(e=>u(e.factor))}}),c.of({name:"FCL",load(){return import("./chunk-F2XG7EWI.js").then(e=>u(e.fcl))}}),c.of({name:"Forth",extensions:["forth","fth","4th"],load(){return import("./chunk-5DPIGJU4.js").then(e=>u(e.forth))}}),c.of({name:"Fortran",extensions:["f","for","f77","f90","f95"],load(){return import("./chunk-L6SYG23T.js").then(e=>u(e.fortran))}}),c.of({name:"F#",alias:["fsharp"],extensions:["fs"],load(){return import("./chunk-DKGXUMLT.js").then(e=>u(e.fSharp))}}),c.of({name:"Gas",extensions:["s"],load(){return import("./chunk-3OHSTP3R.js").then(e=>u(e.gas))}}),c.of({name:"Gherkin",extensions:["feature"],load(){return import("./chunk-Y63UUJGJ.js").then(e=>u(e.gherkin))}}),c.of({name:"Groovy",extensions:["groovy","gradle"],filename:/^Jenkinsfile$/,load(){return import("./chunk-JSE63Q5X.js").then(e=>u(e.groovy))}}),c.of({name:"Haskell",extensions:["hs"],load(){return import("./chunk-R7PNKQU2.js").then(e=>u(e.haskell))}}),c.of({name:"Haxe",extensions:["hx"],load(){return import("./chunk-RCAORRB7.js").then(e=>u(e.haxe))}}),c.of({name:"HXML",extensions:["hxml"],load(){return import("./chunk-RCAORRB7.js").then(e=>u(e.hxml))}}),c.of({name:"HTTP",load(){return import("./chunk-4GCCF6PF.js").then(e=>u(e.http))}}),c.of({name:"IDL",extensions:["pro"],load(){return import("./chunk-7AXEPO3G.js").then(e=>u(e.idl))}}),c.of({name:"JSON-LD",alias:["jsonld"],extensions:["jsonld"],load(){return import("./chunk-MR3U7TKQ.js").then(e=>u(e.jsonld))}}),c.of({name:"Julia",extensions:["jl"],load(){return import("./chunk-KT3TWCST.js").then(e=>u(e.julia))}}),c.of({name:"Kotlin",extensions:["kt","kts"],load(){return import("./chunk-WR3MA3L3.js").then(e=>u(e.kotlin))}}),c.of({name:"LiveScript",alias:["ls"],extensions:["ls"],load(){return import("./chunk-SBLNYV74.js").then(e=>u(e.liveScript))}}),c.of({name:"Lua",extensions:["lua"],load(){return import("./chunk-4YT6K5KY.js").then(e=>u(e.lua))}}),c.of({name:"mIRC",extensions:["mrc"],load(){return import("./chunk-JGXVTKLG.js").then(e=>u(e.mirc))}}),c.of({name:"Mathematica",extensions:["m","nb","wl","wls"],load(){return import("./chunk-ZHRYYMYE.js").then(e=>u(e.mathematica))}}),c.of({name:"Modelica",extensions:["mo"],load(){return import("./chunk-ATXLZN2B.js").then(e=>u(e.modelica))}}),c.of({name:"MUMPS",extensions:["mps"],load(){return import("./chunk-DFOOSIIA.js").then(e=>u(e.mumps))}}),c.of({name:"Mbox",extensions:["mbox"],load(){return import("./chunk-RO7SAOLK.js").then(e=>u(e.mbox))}}),c.of({name:"Nginx",filename:/nginx.*\.conf$/i,load(){return import("./chunk-5IL7C45D.js").then(e=>u(e.nginx))}}),c.of({name:"NSIS",extensions:["nsh","nsi"],load(){return import("./chunk-RUN556VW.js").then(e=>u(e.nsis))}}),c.of({name:"NTriples",extensions:["nt","nq"],load(){return import("./chunk-2E7IJZLL.js").then(e=>u(e.ntriples))}}),c.of({name:"Objective-C",alias:["objective-c","objc"],extensions:["m"],load(){return import("./chunk-WR3MA3L3.js").then(e=>u(e.objectiveC))}}),c.of({name:"Objective-C++",alias:["objective-c++","objc++"],extensions:["mm"],load(){return import("./chunk-WR3MA3L3.js").then(e=>u(e.objectiveCpp))}}),c.of({name:"OCaml",extensions:["ml","mli","mll","mly"],load(){return import("./chunk-DKGXUMLT.js").then(e=>u(e.oCaml))}}),c.of({name:"Octave",extensions:["m"],load(){return import("./chunk-RQUUINHV.js").then(e=>u(e.octave))}}),c.of({name:"Oz",extensions:["oz"],load(){return import("./chunk-7HKFYRPF.js").then(e=>u(e.oz))}}),c.of({name:"Pascal",extensions:["p","pas"],load(){return import("./chunk-CFTKW432.js").then(e=>u(e.pascal))}}),c.of({name:"Perl",extensions:["pl","pm"],load(){return import("./chunk-6NOS45DG.js").then(e=>u(e.perl))}}),c.of({name:"Pig",extensions:["pig"],load(){return import("./chunk-XEGHEUP5.js").then(e=>u(e.pig))}}),c.of({name:"PowerShell",extensions:["ps1","psd1","psm1"],load(){return import("./chunk-HS4S6BV3.js").then(e=>u(e.powerShell))}}),c.of({name:"Properties files",alias:["ini","properties"],extensions:["properties","ini","in"],load(){return import("./chunk-UQ6O3I6W.js").then(e=>u(e.properties))}}),c.of({name:"ProtoBuf",extensions:["proto"],load(){return import("./chunk-Q7U2VPIS.js").then(e=>u(e.protobuf))}}),c.of({name:"Pug",alias:["jade"],extensions:["pug","jade"],load(){return import("./chunk-22DWHRCL.js").then(e=>u(e.pug))}}),c.of({name:"Puppet",extensions:["pp"],load(){return import("./chunk-Q4VNZGFI.js").then(e=>u(e.puppet))}}),c.of({name:"Q",extensions:["q"],load(){return import("./chunk-ATBJWFA3.js").then(e=>u(e.q))}}),c.of({name:"R",alias:["rscript"],extensions:["r","R"],load(){return import("./chunk-6OKLPRCD.js").then(e=>u(e.r))}}),c.of({name:"RPM Changes",load(){return import("./chunk-PJF5XUTO.js").then(e=>u(e.rpmChanges))}}),c.of({name:"RPM Spec",extensions:["spec"],load(){return import("./chunk-PJF5XUTO.js").then(e=>u(e.rpmSpec))}}),c.of({name:"Ruby",alias:["jruby","macruby","rake","rb","rbx"],extensions:["rb"],filename:/^(Gemfile|Rakefile)$/,load(){return import("./chunk-4BPSQMI2.js").then(e=>u(e.ruby))}}),c.of({name:"SAS",extensions:["sas"],load(){return import("./chunk-JGB4LLUT.js").then(e=>u(e.sas))}}),c.of({name:"Scala",extensions:["scala"],load(){return import("./chunk-WR3MA3L3.js").then(e=>u(e.scala))}}),c.of({name:"Scheme",extensions:["scm","ss"],load(){return import("./chunk-F672FY5I.js").then(e=>u(e.scheme))}}),c.of({name:"Shell",alias:["bash","sh","zsh"],extensions:["sh","ksh","bash"],filename:/^PKGBUILD$/,load(){return import("./chunk-EVQKKVUZ.js").then(e=>u(e.shell))}}),c.of({name:"Sieve",extensions:["siv","sieve"],load(){return import("./chunk-KMF3ZRAO.js").then(e=>u(e.sieve))}}),c.of({name:"Smalltalk",extensions:["st"],load(){return import("./chunk-62WT7PI3.js").then(e=>u(e.smalltalk))}}),c.of({name:"Solr",load(){return import("./chunk-DWYP6ZGG.js").then(e=>u(e.solr))}}),c.of({name:"SML",extensions:["sml","sig","fun","smackspec"],load(){return import("./chunk-DKGXUMLT.js").then(e=>u(e.sml))}}),c.of({name:"SPARQL",alias:["sparul"],extensions:["rq","sparql"],load(){return import("./chunk-6VEJCG43.js").then(e=>u(e.sparql))}}),c.of({name:"Spreadsheet",alias:["excel","formula"],load(){return import("./chunk-32L7RG2G.js").then(e=>u(e.spreadsheet))}}),c.of({name:"Squirrel",extensions:["nut"],load(){return import("./chunk-WR3MA3L3.js").then(e=>u(e.squirrel))}}),c.of({name:"Stylus",extensions:["styl"],load(){return import("./chunk-FQHOSSCO.js").then(e=>u(e.stylus))}}),c.of({name:"Swift",extensions:["swift"],load(){return import("./chunk-25QTY2GI.js").then(e=>u(e.swift))}}),c.of({name:"sTeX",load(){return import("./chunk-JVV3ZL6L.js").then(e=>u(e.stex))}}),c.of({name:"LaTeX",alias:["tex"],extensions:["text","ltx","tex"],load(){return import("./chunk-JVV3ZL6L.js").then(e=>u(e.stex))}}),c.of({name:"SystemVerilog",extensions:["v","sv","svh"],load(){return import("./chunk-R4MI25E2.js").then(e=>u(e.verilog))}}),c.of({name:"Tcl",extensions:["tcl"],load(){return import("./chunk-YZPIUJB3.js").then(e=>u(e.tcl))}}),c.of({name:"Textile",extensions:["textile"],load(){return import("./chunk-JB5R6V33.js").then(e=>u(e.textile))}}),c.of({name:"TiddlyWiki",load(){return import("./chunk-KLOUBIO4.js").then(e=>u(e.tiddlyWiki))}}),c.of({name:"Tiki wiki",load(){return import("./chunk-LRQSPCYZ.js").then(e=>u(e.tiki))}}),c.of({name:"TOML",extensions:["toml"],load(){return import("./chunk-SIZCHHUA.js").then(e=>u(e.toml))}}),c.of({name:"Troff",extensions:["1","2","3","4","5","6","7","8","9"],load(){return import("./chunk-T3YI3BSS.js").then(e=>u(e.troff))}}),c.of({name:"TTCN",extensions:["ttcn","ttcn3","ttcnpp"],load(){return import("./chunk-RK7XRDNB.js").then(e=>u(e.ttcn))}}),c.of({name:"TTCN_CFG",extensions:["cfg"],load(){return import("./chunk-4AGQL5GV.js").then(e=>u(e.ttcnCfg))}}),c.of({name:"Turtle",extensions:["ttl"],load(){return import("./chunk-YBNAC7QM.js").then(e=>u(e.turtle))}}),c.of({name:"Web IDL",extensions:["webidl"],load(){return import("./chunk-4FDRWZWT.js").then(e=>u(e.webIDL))}}),c.of({name:"VB.NET",extensions:["vb"],load(){return import("./chunk-CNOVT6KU.js").then(e=>u(e.vb))}}),c.of({name:"VBScript",extensions:["vbs"],load(){return import("./chunk-TAL3RTTQ.js").then(e=>u(e.vbScript))}}),c.of({name:"Velocity",extensions:["vtl"],load(){return import("./chunk-D56H3XE2.js").then(e=>u(e.velocity))}}),c.of({name:"Verilog",extensions:["v"],load(){return import("./chunk-R4MI25E2.js").then(e=>u(e.verilog))}}),c.of({name:"VHDL",extensions:["vhd","vhdl"],load(){return import("./chunk-UJTFWZEC.js").then(e=>u(e.vhdl))}}),c.of({name:"XQuery",extensions:["xy","xquery","xq","xqm","xqy"],load(){return import("./chunk-6F6OMQ5H.js").then(e=>u(e.xQuery))}}),c.of({name:"Yacas",extensions:["ys"],load(){return import("./chunk-4QBOHIC3.js").then(e=>u(e.yacas))}}),c.of({name:"Z80",extensions:["z80"],load(){return import("./chunk-NBBDVVUF.js").then(e=>u(e.z80))}}),c.of({name:"MscGen",extensions:["mscgen","mscin","msc"],load(){return import("./chunk-IJ7K7ATQ.js").then(e=>u(e.mscgen))}}),c.of({name:"X\xF9",extensions:["xu"],load(){return import("./chunk-IJ7K7ATQ.js").then(e=>u(e.xu))}}),c.of({name:"MsGenny",extensions:["msgenny"],load(){return import("./chunk-IJ7K7ATQ.js").then(e=>u(e.msgenny))}}),c.of({name:"Vue",extensions:["vue"],load(){return import("./chunk-AZ5TF5Y3.js").then(e=>e.vue())}}),c.of({name:"Angular Template",load(){return import("./chunk-HNMGPG72.js").then(e=>e.angular())}})];var Ce=(function(e){return e[e.PENDING=0]="PENDING",e[e.SUCCESS=1]="SUCCESS",e[e.ERROR=2]="ERROR",e})(Ce||{}),Ii=class{constructor(t,o,i,n){this.props={},this.id=t,this.type=o,this.path=i,this.name=n,(o===w.COPY||o===w.MOVE||o===w.DOWNLOAD)&&(this.props={progress:1},o!==w.DOWNLOAD&&(this.props.src={name:n,path:i}))}};var Fi=(()=>{let t=class t{constructor(){this.http=C(ae),this.layout=C(K),this.store=C(Ie),this.onDone={[w.DELETE]:{fileEvent:{delete:!0},msg:{success:"Deletion done",failed:"Deletion failed"}},[w.MOVE]:{fileEvent:{delete:!0,reloadFocusOnDst:!0},msg:{success:"Move done",failed:"Move failed"}},[w.COPY]:{msg:{success:"Copy done",failed:"Copy failed"},fileEvent:{reload:!0,focus:!0}},[w.DOWNLOAD]:{fileEvent:{reload:!0,focus:!0},msg:{success:"Download done",failed:"Download failed"}},[w.UPLOAD]:{fileEvent:{reload:!0,focus:!0},msg:{success:"Upload done",failed:"Upload failed"}},[w.COMPRESS]:{fileEvent:{reload:!0,focus:!0},msg:{success:"Compression done",failed:"Compression failed"}},[w.DECOMPRESS]:{fileEvent:{reload:!0,focus:!0},msg:{success:"Decompression done",failed:"Decompression failed"}}},this.watcher=null,this.watch=He(1e3,1e3).pipe(tt(()=>this.doWatch())),this.loadAll()}addTask(i){i.status===Ce.PENDING?(this.store.filesActiveTasks.next([i,...this.store.filesActiveTasks.getValue()]),this.startWatch()):this.store.filesEndedTasks.next([i,...this.store.filesEndedTasks.getValue()])}createUploadTask(i,n,s){let r=new Ii(Ds(),w.UPLOAD,i,n);return r.status=Ce.PENDING,r.startedAt=ws(null,!0),r.props={progress:1,size:0,totalSize:s},this.store.filesActiveTasks.next([r,...this.store.filesActiveTasks.getValue()]),this.layout.showRSideBarTab(st.TASKS,!0),r}removeAll(){this.http.delete(Ct).subscribe({next:()=>this.clearEndedTasks(),error:i=>console.error(i)})}remove(i){this.http.delete(`${Ct}/${i.id}`).subscribe({next:()=>this.deleteTask(i.id,!1),error:n=>console.error(n)})}updateTask(i){if(i.status===Ce.PENDING){let n=this.findTask(i.id,!0);Object.assign(n,i)}else this.deleteTask(i.id,!0),this.addTask(i),this.taskDone(i)}loadAll(){this.http.get(Ct).subscribe({next:i=>i.forEach(n=>this.addTask(n)),error:i=>console.error(i)})}doWatch(){this.store.filesActiveTasks.getValue().length?this.fetchActiveTasks():this.stopWatch()}startWatch(){(!this.watcher||this.watcher.closed)&&(this.layout.showRSideBarTab(st.TASKS,!0),this.watcher=this.watch.subscribe())}stopWatch(){(this.watcher||!this.watcher.closed)&&(setTimeout(()=>this.layout.hideRSideBarTab(st.TASKS),3e3),this.watcher.unsubscribe())}fetchActiveTasks(){for(let i of this.store.filesActiveTasks.getValue().filter(n=>n.type!==w.UPLOAD))this.http.get(`${Ct}/${i.id}`).subscribe({next:n=>this.updateTask(n),error:n=>{n.status===404&&(i.result=n.error.message,i.status=Ce.ERROR,this.updateTask(i)),console.warn(n)}})}findTask(i,n){return n?this.store.filesActiveTasks.getValue().find(s=>s.id===i):this.store.filesEndedTasks.getValue().find(s=>s.id===i)}deleteTask(i,n){n?this.store.filesActiveTasks.next(this.store.filesActiveTasks.getValue().filter(s=>s.id!==i)):this.store.filesEndedTasks.next(this.store.filesEndedTasks.getValue().filter(s=>s.id!==i))}taskDone(i){if(i.type in this.onDone){if(this.onDone[i.type].fileEvent){let n=Oi(Ft({},this.onDone[i.type].fileEvent),{status:i.status});i.type===w.COPY||i.type===w.MOVE?(n.filePath=i.props.src.path,n.fileName=i.props.src.name,n.fileDstPath=i.path):(n.filePath=i.path,n.fileName=i.name,i.type===w.COMPRESS&&(n.archiveId=i.props.compressInDirectory===!1?i.id:null)),this.store.filesOnEvent.next(n)}i.status===Ce.SUCCESS?i.type===w.DELETE?this.removeDeletedChildTasks(i):this.layout.sendNotification("info",this.onDone[i.type].msg.success,i.name):this.layout.sendNotification("error",this.onDone[i.type].msg.failed,i.name,{error:{message:i.result}})}}removeDeletedChildTasks(i){if(i.path.startsWith(de.SHARES))this.remove(i);else if(i.path.startsWith(de.TRASH)){for(let n of this.store.filesEndedTasks.getValue().filter(s=>s.id!==i.id&&s.type===w.DELETE&&s.path.startsWith(de.FILES))){let s=i.path.replace(de.TRASH,de.FILES);new RegExp(`^${Ls(`${s}/${i.name}`)}(/|$)`).test(`${n.path}/${n.name}`)&&this.remove(n)}this.remove(i)}}clearEndedTasks(){this.store.filesEndedTasks.next([])}};t.\u0275fac=function(n){return new(n||t)},t.\u0275prov=J({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();var Yr=(()=>{let t=class t{constructor(){this.supportUploadDirectory=As(),this.http=C(ae),this.filesService=C(at),this.filesTasksService=C(Fi)}addFiles(i,n){return B(this,null,function*(){let s=`${en}/${this.filesService.currentRoute}`,r=[];for(let[a,l]of Object.entries(this.sortFiles(i))){let h=`${this.filesService.currentRoute}/${a}`.split("/").slice(0,-1).join("/"),d=`${this.filesService.currentRoute}/${a}`.split("/").slice(-1)[0],g=this.filesTasksService.createUploadTask(h,d,l.size);r.unshift([g,this.uploadFiles(`${s}/${a}`,l.form,n).pipe(Hn(b=>b.type===es.UploadProgress),tt(b=>this.updateProgress(g,b)))])}for(let[a,l]of r)try{yield Bn(l),a.props.progress=100,a.status=Ce.SUCCESS}catch(h){a.status=Ce.ERROR,h.status===0?a.result=h.statusText:a.result=h.error.message}finally{this.filesTasksService.updateTask(a)}})}onDropFiles(i,n){i.dataTransfer.items&&i.dataTransfer.items[0]?.webkitGetAsEntry?this.webkitReadDataTransfer(i,n):this.addFiles(i.dataTransfer.files,n).catch(console.error)}uploadOneFile(i,n,s=!1,r=!1){let a=`${en}/${i.path}`,l=(i?.root?.alias||i.name).normalize(),h=new File([new Blob([n])],l,{type:i.mime.replace("-","/")}),d=new FormData;return d.append("file",h),this.http.request(s?"patch":r?"put":"post",a,{body:d})}uploadFiles(i,n,s){return this.http.request(s?"put":"post",i,{body:n,reportProgress:!0,observe:"events"})}updateProgress(i,n){i.props.size=n.loaded,i.props.progress=Math.round(100*n.loaded/n.total)}sortFiles(i){let n={};for(let s of i){let r=s.relativePath||s.webkitRelativePath,a=(r?r.split("/")[0]:s.name).normalize();a in n||(n[a]={nb:0,size:0,form:new FormData}),n[a].form.append("file",s,(r||s.name).normalize()),n[a].nb++,n[a].size+=s.size}return n}webkitReadDataTransfer(i,n){let s=i.dataTransfer.items.length,r=[],a=b=>{b.readEntries(function(S){if(S.length){s+=S.length;for(let T of S)T.isFile?T.file($=>{l(T,$)},h):T.isDirectory&&a(T.createReader());a(b)}else d()},h)},l=(b,S)=>{g(b,S),r.push(S),d()},h=b=>{throw d(),b},d=()=>{--s==0&&this.addFiles(r,n).catch(console.error)},g=(b,S)=>{b.fullPath&&b.fullPath!==`/${S.name}`&&(S.relativePath=b.fullPath.startsWith("/")?b.fullPath.slice(1):b.fullPath)};for(let b of i.dataTransfer.items){let S=b.webkitGetAsEntry();if(!S){d();return}S.isFile?l(S,b.getAsFile()):a(S.createReader())}}};t.\u0275fac=function(n){return new(n||t)},t.\u0275prov=J({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();var kc=["editor"];function xc(e,t){if(e&1&&A(0,"fa-icon",5),e&2){let o=E();y("icon",o.icons.faSpinner)}}function wc(e,t){if(e&1&&A(0,"fa-icon",3),e&2){let o=E();y("icon",o.icons.faFloppyDisk)}}function Ec(e,t){if(e&1){let o=z();p(0,"button",10),x("click",function(){P(o);let n=E();return _(n.save(!0))}),D(1,"Save And Exit "),m(),p(2,"button",11),x("click",function(){P(o);let n=E();return _(n.onClose())}),D(3,"Close Without Saving "),m(),p(4,"button",12),x("click",function(){P(o);let n=E();return _(n.warnOnUnsavedChanges.set(!1))}),D(5,"Cancel "),m()}}var Qr=(()=>{let t=class t{constructor(){this.editor=Ht("editor"),this.currentHeight=Z.required(),this.file=ze.required(),this.isWriteable=Z.required(),this.isReadonly=ze.required(),this.modalClosing=Z.required(),this.isSupported=ie(!1),this.isModified=ie(!1),this.isSaving=ie(!1),this.lineWrapping=ie(!1),this.warnOnUnsavedChanges=ie(!1),this.content=!1,this.currentLanguage=void 0,this.languages=In,this.currentTheme="light",this.icons={faFloppyDisk:os,faLock:qt,faLockOpen:ys,faMagnifyingGlass:ns,faSpinner:gs,faArrowsLeftRightToLine:ls,faReply:ss,faShare:ds},this.isSearchPanelOpen=ie(!1),this.layout=C(K),this.locale=C(Te),this.isContentReady=!1,this.http=C(ae),this.filesServices=C(at),this.filesUpload=C(Yr),this.subscription=this.layout.switchTheme.subscribe(i=>this.currentTheme=i===Es?"dark":"light"),this.maxSize=5242880,ji(()=>{if(!this.modalClosing())return;let i=Nt(()=>this.file().id);Nt(()=>this.isModified())?(this.warnOnUnsavedChanges.set(!0),this.layout.windows.getValue().find(s=>s.id===i)&&this.layout.restoreDialog(i)):this.onClose().catch(console.error)}),ji(()=>{this.isReadonly(),Nt(()=>this.isSearchPanelOpen())&&setTimeout(()=>{this.toggleSearch(),this.toggleSearch()},100)})}onKeyDown(i){if(i.key==="Escape"||i.key==="Esc"){i.preventDefault(),this.isSearchPanelOpen()?(i.stopPropagation(),this.toggleSearch()):this.warnOnUnsavedChanges()?(i.stopPropagation(),this.warnOnUnsavedChanges.set(!1)):this.isModified()?(i.stopPropagation(),this.warnOnUnsavedChanges.set(!0)):(i.stopPropagation(),this.onClose().catch(console.error));return}if(i.ctrlKey||i.metaKey)switch(i.key.toLowerCase()){case"s":i.preventDefault(),this.save();return;case"f":i.preventDefault(),i.stopPropagation(),this.toggleSearch();return}}ngOnInit(){return B(this,null,function*(){let i=c.matchFilename(In,this.file().name);i?.name||this.file().size<=this.maxSize?(this.currentLanguage=i?.name,this.isSupported.set(!0),this.loadContent().catch(console.error)):(this.isReadonly.set(!0),this.isSupported.set(!1),this.content=this.layout.translateString("This file contains binary data that can not be read"))})}toggleReadonly(){return B(this,null,function*(){this.isReadonly()?yield this.lockFile():yield this.unlockFile(),this.isReadonly.update(i=>!i)})}save(i=!1){this.isSaving.set(!0),this.filesUpload.uploadOneFile(this.file(),this.content,!0).subscribe({next:()=>{this.isModified.set(!1),this.isSaving.set(!1),this.warnOnUnsavedChanges.set(!1),i&&this.onClose().catch(console.error)},error:n=>{this.isSaving.set(!1),this.layout.sendNotification("error","Unable to save document",n.error.message)}})}toggleSearch(){this.isSearchPanelOpen.update(i=>!i),this.isSearchPanelOpen()?Pi(this.editor().view):_i(this.editor().view)}contentChange(){this.isContentReady?this.isModified.set(!0):this.isContentReady=!0}onUndo(){ui({state:this.editor().view.state,dispatch:this.editor().view.dispatch})}onRedo(){wt({state:this.editor().view.state,dispatch:this.editor().view.dispatch})}canUndo(){return this.editor()?.view?Go(this.editor().view.state)>0:!1}canRedo(){return this.editor()?.view?zo(this.editor().view.state)>0:!1}onClose(){return B(this,null,function*(){this.isReadonly()||(yield this.unlockFile()),this.layout.closeDialog(null,this.file().id)})}ngOnDestroy(){this.subscription.unsubscribe()}loadContent(){return B(this,null,function*(){this.isReadonly()||(yield this.lockFile()),this.http.get(this.file().dataUrl,{responseType:"text"}).subscribe({next:i=>this.content=i,error:i=>this.layout.sendNotification("error","Unable to open document",this.file().name,i)})})}lockFile(){return B(this,null,function*(){if(!(!this.isSupported||!this.isWriteable()))try{let i=yield De(this.filesServices.lock(this.file()));this.file.update(n=>(n.lock=i,n))}catch(i){this.lockError(i)}})}unlockFile(){return B(this,null,function*(){if(!(!this.isSupported||!this.isWriteable()))try{yield De(this.filesServices.unlock(this.file())),this.file.update(i=>(delete i.lock,i))}catch(i){this.lockError(i)}})}lockError(i){if(this.isReadonly.set(!0),this.isSupported.set(!1),i.error?.owner){let n=i.error;this.file.update(s=>(s.lock=n,s)),this.layout.sendNotification("info","The file is locked",n.owner)}else this.layout.sendNotification("warning",this.file().name,i.error.message)}};t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=R({type:t,selectors:[["app-files-viewer-text"]],viewQuery:function(n,s){n&1&&Ot(s.editor,kc,5),n&2&&Vt()},hostBindings:function(n,s){n&1&&x("keydown",function(a){return s.onKeyDown(a)},ke)},inputs:{currentHeight:[1,"currentHeight"],file:[1,"file"],isWriteable:[1,"isWriteable"],isReadonly:[1,"isReadonly"],modalClosing:[1,"modalClosing"]},outputs:{file:"fileChange",isReadonly:"isReadonlyChange"},decls:24,vars:49,consts:[["editor",""],[1,"app-top-menu"],["type","button",1,"d-none","d-sm-block","btn","btn-sm","btn-secondary","me-1",3,"click","tooltip","adaptivePosition","disabled"],[3,"icon"],["type","button",1,"d-none","d-sm-block","btn","btn-sm","btn-secondary","me-1",3,"click","tooltip","isDisabled","disabled"],["animation","spin",3,"icon"],["type","button",1,"d-none","d-sm-block","btn","btn-sm","btn-custom","me-1",3,"click","disabled","tooltip"],["btnCheckbox","","type","button",1,"d-none","d-sm-block","btn","btn-sm","btn-custom","me-1",3,"ngModelChange","ngModel","tooltip"],["btnCheckbox","","type","button",1,"d-none","d-sm-block","btn","btn-sm","btn-custom",3,"ngModelChange","ngModel","tooltip"],[3,"ngModelChange","change","autoFocus","languages","language","ngModel","theme","readonly","disabled","lineWrapping"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-primary","me-2","ms-auto",3,"click"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-danger","me-2",3,"click"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary",3,"click"]],template:function(n,s){if(n&1){let r=z();p(0,"div")(1,"div",1)(2,"button",2),V(3,"translate"),x("click",function(){return P(r),_(s.toggleReadonly())}),A(4,"fa-icon",3),m(),p(5,"button",4),V(6,"translate"),x("click",function(){return P(r),_(s.save())}),N(7,xc,1,1,"fa-icon",5)(8,wc,1,1,"fa-icon",3),m(),p(9,"button",6),V(10,"translate"),x("click",function(){return P(r),_(s.onUndo())}),A(11,"fa-icon",3),m(),p(12,"button",6),V(13,"translate"),x("click",function(){return P(r),_(s.onRedo())}),A(14,"fa-icon",3),m(),p(15,"button",7),V(16,"translate"),x("ngModelChange",function(l){return P(r),_(s.lineWrapping.set(l))}),A(17,"fa-icon",3),m(),p(18,"button",8),V(19,"translate"),x("ngModelChange",function(){return P(r),_(s.toggleSearch())}),A(20,"fa-icon",3),m(),N(21,Ec,6,0),m(),p(22,"code-editor",9,0),Ge("ngModelChange",function(l){return P(r),je(s.content,l)||(s.content=l),_(l)}),x("change",function(){return P(r),_(s.contentChange())}),m()()}n&2&&(ee("height",s.currentHeight(),"px"),f(2),y("tooltip",j(3,31,s.isReadonly()||!s.isWriteable()?"Read-only":"Read-write",s.locale.language))("adaptivePosition",!0)("disabled",!s.isSupported()||!s.isWriteable()),f(2),y("icon",s.isReadonly()?s.icons.faLock:s.icons.faLockOpen),f(),y("tooltip",j(6,34,s.isReadonly()||!s.isWriteable()||!s.isModified()?void 0:"Save",s.locale.language))("isDisabled",s.isReadonly()||!s.isWriteable()||!s.isModified())("disabled",s.isReadonly()||!s.isWriteable()||!s.isModified()),f(2),H(s.isSaving()?7:8),f(2),y("disabled",!s.canUndo())("tooltip",j(10,37,"Undo",s.locale.language)),f(2),y("icon",s.icons.faReply),f(),y("disabled",!s.canRedo())("tooltip",j(13,40,"Redo",s.locale.language)),f(2),y("icon",s.icons.faShare),f(),y("ngModel",s.lineWrapping())("tooltip",j(16,43,"Line Wrap",s.locale.language)),f(2),y("icon",s.icons.faArrowsLeftRightToLine),f(),y("ngModel",s.isSearchPanelOpen())("tooltip",j(19,46,"Search",s.locale.language)),f(2),y("icon",s.icons.faMagnifyingGlass),f(),H(s.warnOnUnsavedChanges()?21:-1),f(),y("autoFocus",!0)("languages",s.languages)("language",s.currentLanguage),We("ngModel",s.content),y("theme",s.currentTheme)("readonly",s.isReadonly())("disabled",s.isReadonly())("lineWrapping",s.lineWrapping()))},dependencies:[Kr,zt,Gt,jt,$t,Wt,ye,Qt,nt,Me],styles:[`.code-editor{height:calc(100% - 40px)}.cm-focused{outline:none!important}.cm-panel.cm-search{display:flex;align-items:center;text-wrap:nowrap}.cm-panel.cm-search label{display:flex;align-items:center}.cm-panel.cm-search button[aria-label=close]{display:none}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as _,t as C}from"./chunk-
|
|
1
|
+
import{s as _,t as C}from"./chunk-I2S3XPC5.js";import{Ce as U,Ed as g,Gb as n,Ia as p,Jd as x,Me as v,Qb as m,ab as u,dc as s,ja as d,kc as h,lb as c,mb as l,mc as f,og as y,rb as o,ub as a,ze as w}from"./chunk-IOIBQGHN.js";function P(i,e){if(i&1&&a(0,"img",0),i&2){let t=n(2);o("tooltip",s("",t.user.name," (",t.user.description,")"))("height",t.height)("width",t.width)("src",t.user.avatarUrl,p)("placement",t.tooltipPlacement)("container",t.container)}}function T(i,e){if(i&1&&(a(0,"fa-icon",2),h(1,"translate")),i&2){let t=n(2);m("min-width",t.width,"px")("min-height",t.height,"px")("font-size",t.fontSize,"px"),o("tooltip",s("",t.user.name," (",f(1,12,t.user.type,t.locale.language),")"))("icon",t.icons.faUsers)("placement",t.tooltipPlacement)("container",t.container)}}function b(i,e){if(i&1&&c(0,P,1,8,"img",0)(1,T,2,15,"fa-icon",1),i&2){let t=n();l(t.user.isUser?0:1)}}function I(i,e){if(i&1&&a(0,"img",0),i&2){let t=n(2);o("tooltip",s("",t.user.fullName," (",t.user.email,")"))("height",t.height)("width",t.width)("src",t.user.avatarUrl,p)("placement",t.tooltipPlacement)("container",t.container)}}function S(i,e){if(i&1&&(a(0,"fa-icon",4),h(1,"translate")),i&2){let t=n(2);m("min-width",t.width,"px")("min-height",t.height,"px")("font-size",t.fontSize,"px"),o("icon",t.unknownUserAsInfo?t.icons.faLightbulb:t.icons.faUserShield)("tooltip",f(1,10,t.unknownUserAsInfo?"Info":"Administrator",t.locale.language))("placement",t.tooltipPlacement)("container",t.container)}}function M(i,e){if(i&1&&c(0,I,1,8,"img",0)(1,S,2,13,"fa-icon",3),i&2){let t=n();l(t.user.login?0:1)}}var G=(()=>{let e=class e{constructor(){this.isMember=!1,this.unknownUserAsInfo=!1,this.height=30,this.width=30,this.fontSize=16,this.tooltipPlacement="auto",this.container=null,this.locale=d(g),this.icons={faUsers:w,faUserShield:U,faLightbulb:v}}ngOnInit(){this.height<28&&(this.fontSize=13)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=u({type:e,selectors:[["app-user-avatar"]],inputs:{user:"user",isMember:"isMember",unknownUserAsInfo:"unknownUserAsInfo",height:"height",width:"width",fontSize:"fontSize",tooltipPlacement:"tooltipPlacement",container:"container"},decls:2,vars:1,consts:[["alt","",1,"avatar-base-img","cursor-pointer","me-1",3,"height","width","src","tooltip","placement","container"],[1,"circle-primary-icon","cursor-pointer","me-1",3,"icon","tooltip","placement","container","min-width","min-height","font-size"],[1,"circle-primary-icon","cursor-pointer","me-1",3,"icon","tooltip","placement","container"],[1,"circle-gray-icon","cursor-pointer","me-1",3,"icon","tooltip","placement","container","min-width","min-height","font-size"],[1,"circle-gray-icon","cursor-pointer","me-1",3,"icon","tooltip","placement","container"]],template:function(r,z){r&1&&c(0,b,2,1)(1,M,2,1),r&2&&l(z.isMember?0:1)},dependencies:[C,_,y,x],encapsulation:2,changeDetection:0});let i=e;return i})();export{G as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as M,b as R}from"./chunk-
|
|
1
|
+
import{a as M,b as R}from"./chunk-GRLHFXGB.js";import"./chunk-YMAN4LIU.js";import{f as I,h as W}from"./chunk-ZXXHFBGL.js";import"./chunk-MYM43ENO.js";import{Cb as O,pb as N,qb as y,rb as d,s as b,xb as u,zb as A}from"./chunk-I2S3XPC5.js";import{d as w}from"./chunk-Y5RLD72B.js";import{Eb as x,Gb as m,Ia as C,Kd as z,Oa as o,Sb as T,Tb as a,Ub as p,ab as E,cc as g,ja as v,lb as S,mb as h,og as D,rb as s,sb as i,tb as n,ub as l}from"./chunk-IOIBQGHN.js";import"./chunk-DM4NXKEP.js";import"./chunk-ZIJQRARU.js";import{i as P}from"./chunk-KAVP6UXH.js";function L(e,r){if(e&1&&l(0,"fa-icon",24),e&2){let t=m();T(g("circle-",t.syncService.wizard.remotePath.iconClass,"-icon")),s("icon",t.syncService.wizard.remotePath.icon)}}function Y(e,r){if(e&1&&l(0,"img",7),e&2){let t=m();s("src",t.syncService.wizard.remotePath.mimeUrl,C)}}function k(e,r){if(e&1&&(i(0,"div",18),a(1),n()),e&2){let t=m();o(),p(t.error)}}function B(e,r){e&1&&(i(0,"span",26),a(1,"and from"),n())}function F(e,r){e&1&&(i(0,"span",28),a(1,"to"),n())}function Z(e,r){e&1&&(i(0,"span",26),a(1,"(Two-Way)"),n())}function U(e,r){e&1&&(i(0,"span",26),a(1,"(One-Way)"),n())}function V(e,r){e&1&&(i(0,"span",28),a(1,"the most recent files will be kept"),n())}function $(e,r){if(e&1&&(i(0,"span",26),a(1,"the files in"),n(),i(2,"span",29),a(3),n(),i(4,"span",26),a(5,"will be preferred"),n()),e&2){let t=m(3);o(3),p(t.syncPath.settings.conflictMode===t.SYNC_PATH_CONFLICT_MODE.LOCAL?t.syncService.wizard.localPath.name:t.syncService.wizard.remotePath.name)}}function j(e,r){if(e&1&&(i(0,"div")(1,"span",26),a(2,"In case of conflict,"),n(),i(3,"span"),a(4,"\xA0"),n(),S(5,V,2,0,"span",28)(6,$,6,1),n()),e&2){let t=m(2);o(5),h(t.syncPath.settings.conflictMode===t.SYNC_PATH_CONFLICT_MODE.RECENT?5:6)}}function G(e,r){if(e&1&&(i(0,"div")(1,"span",26),a(2,"All files created or modified in"),n(),i(3,"span",30),a(4),n(),i(5,"span",26),a(6,"will be ignored and deleted"),n()()),e&2){let t=m(2);o(4),p(t.syncPath.settings.mode===t.SYNC_PATH_MODE.DOWNLOAD?t.syncService.wizard.localPath.name:t.syncService.wizard.remotePath.name)}}function q(e,r){if(e&1&&(i(0,"div",25)(1,"span",26),a(2,"The data will be synchronized from"),n(),i(3,"span",27),a(4),n(),S(5,B,2,0,"span",26)(6,F,2,0,"span",28),i(7,"span",27),a(8),n(),S(9,Z,2,0,"span",26)(10,U,2,0,"span",26),n(),l(11,"br"),i(12,"div",25),S(13,j,7,1,"div")(14,G,7,1,"div"),n()),e&2){let t=m();o(4),p(t.syncPath.settings.mode===t.SYNC_PATH_MODE.DOWNLOAD?"the server folder":"the client folder"),o(),h(t.syncPath.settings.mode===t.SYNC_PATH_MODE.BOTH?5:6),o(3),p(t.syncPath.settings.mode===t.SYNC_PATH_MODE.DOWNLOAD?"the client folder":"the server folder"),o(),h(t.syncPath.settings.mode===t.SYNC_PATH_MODE.BOTH?9:10),o(4),h(t.syncPath.settings.mode===t.SYNC_PATH_MODE.BOTH?13:14)}}var de=(()=>{let r=class r{constructor(){this.syncService=v(W),this.SYNC_PATH_CONFLICT_MODE=A,this.SYNC_PATH_MODE=u,this.icons={CLIENT:y.CLIENT,SERVER:y.SERVER},this.translatedRemotePath=this.syncService.translateServerPath(this.syncService.wizard.remotePath.serverPath),this.error=null,this.router=v(w),this.layout=v(O),this.syncPath=new I({settings:{name:this.syncService.wizard.localPath.name,localPath:this.syncService.wizard.localPath.path,remotePath:this.syncService.wizard.remotePath.serverPath,enabled:this.syncService.wizard.settings.enabled,mode:this.syncService.wizard.remotePath.isWriteable?this.syncService.wizard.settings.mode:u.DOWNLOAD,conflictMode:this.syncService.wizard.settings.conflictMode,diffMode:this.syncService.wizard.settings.diffMode,scheduler:this.syncService.wizard.settings.scheduler,permissions:this.syncService.wizard.remotePath.permissions}}),this.layout.setBreadcrumbIcon(y.WIZARD),this.layout.setBreadcrumbNav({url:`/${d.BASE}/${d.WIZARD}/${d.WIZARD_SETTINGS}/${N.WIZARD_SETTINGS}`,splicing:3,translating:!0,sameLink:!0})}onPrevious(){this.router.navigate([d.BASE,d.WIZARD,d.WIZARD_SERVER]).catch(console.error)}onSubmit(){return P(this,null,function*(){let _=yield this.syncService.addPath(this.syncPath.settings);typeof _=="string"?this.error=_:(yield this.syncService.refreshPaths(),this.router.navigate([d.BASE,d.PATHS],{state:{id:_.id,withSettings:!1}}).catch(console.error),this.syncService.resetWizard())})}};r.\u0275fac=function(f){return new(f||r)},r.\u0275cmp=E({type:r,selectors:[["app-sync-wizard-settings"]],decls:38,vars:12,consts:[[1,"wizard","fs-sm"],[1,"d-flex","flex-row","justify-content-center","mb-3"],[1,"d-flex","flex-column","align-items-end"],[1,"fw-bold","mb-1","me-1"],[3,"icon"],["l10nTranslate","",1,"ms-2"],["placement","left",1,"cursor-pointer",3,"tooltip"],["alt","","height","35",3,"src"],[1,"position-absolute","text-truncate","pe-2",2,"top","110px"],[1,"d-flex","align-items-end","mb-2","mx-5"],[3,"syncPath"],[1,"d-flex","flex-column","align-items-start"],[1,"fw-bold","mb-1","ms-1"],["placement","right",1,"cursor-pointer",3,"tooltip"],[2,"width","32px","height","32px","font-size","16px",3,"icon","class"],[1,"position-absolute","text-truncate","ps-2",2,"top","110px"],[1,"mt-auto"],[1,"mb-auto"],["l10nTranslate","",1,"text-center","text-warning"],[1,"d-flex","align-items-start"],["translate","","type","button",1,"btn","btn-sm","btn-secondary","me-auto",3,"click"],[1,"fas","fa-arrow-circle-left","fa-fw"],["translate","","type","button",1,"btn","btn-sm","btn-secondary","ms-auto",3,"click","disabled"],[1,"fas","fa-check-circle","fa-fw"],[2,"width","32px","height","32px","font-size","16px",3,"icon"],[1,"text-center"],["l10nTranslate",""],["l10nTranslate","",1,"mx-1"],["l10nTranslate","",1,"fw-bold"],[1,"fw-bold","mx-1"],["l10nTranslate","",1,"fw-bold","mx-1"]],template:function(f,c){f&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",2)(4,"div",3),l(5,"fa-icon",4),i(6,"span",5),a(7,"Client"),n()(),i(8,"div",6),l(9,"img",7),n(),i(10,"div",8),a(11),n()()(),i(12,"div",9),l(13,"app-sync-path-direction-icon",10),n(),i(14,"div",11)(15,"div",11)(16,"div",12),l(17,"fa-icon",4),i(18,"span",5),a(19,"Server"),n()(),i(20,"div",13),S(21,L,1,4,"fa-icon",14)(22,Y,1,1,"img",7),n(),i(23,"div",15),a(24),n()()()(),l(25,"hr",16)(26,"app-sync-path-settings",10)(27,"hr",17),S(28,k,2,1,"div",18)(29,q,15,5),i(30,"div",16)(31,"div",19)(32,"button",20),x("click",function(){return c.onPrevious()}),l(33,"i",21),a(34," Previous "),n(),i(35,"button",22),x("click",function(){return c.onSubmit()}),l(36,"i",23),a(37," Done "),n()()()()),f&2&&(o(5),s("icon",c.icons.CLIENT),o(3),s("tooltip",c.syncService.wizard.localPath.path),o(),s("src",c.syncService.wizard.localPath.mimeUrl,C),o(2),p(c.syncService.wizard.localPath.name),o(2),s("syncPath",c.syncPath),o(4),s("icon",c.icons.SERVER),o(3),s("tooltip",c.translatedRemotePath),o(),h(c.syncService.wizard.remotePath.icon?21:22),o(3),p(c.syncService.wizard.remotePath.name),o(2),s("syncPath",c.syncPath),o(2),h(c.error?28:29),o(7),s("disabled",!c.syncPath.settings.name))},dependencies:[z,D,b,M,R],encapsulation:2});let e=r;return e})();export{de as SyncWizardSettingsComponent};
|