tiro-notes 0.30.98-11 → 0.30.98-13

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.
@@ -0,0 +1 @@
1
+ (this["webpackJsonptiro-notes-client"]=this["webpackJsonptiro-notes-client"]||[]).push([[10],{10:function(t,n,e){"use strict";e.d(n,"a",(function(){return w}));e(312),e(313),e(314),e(315);var o=e.p+"static/media/deco-bg-map.7ca9103b.png",i=e.p+"static/media/file-solid.6415173e.svg",r=e.p+"static/media/compact-disc-solid.55b6e50c.svg",a=e.p+"static/media/file-pdf-solid.0a9d75fe.svg",c=e.p+"static/media/file-word-solid.9228e1ff.svg",l=e.p+"static/media/file-code-solid.62b467ac.svg",s=e.p+"static/media/book-solid.87f5b737.svg",u=e.p+"static/media/file-excel-solid.217d73db.svg",d=e.p+"static/media/file-video-solid.312288cf.svg",p=e.p+"static/media/file-audio-solid.a76f99f0.svg",f=e.p+"static/media/file-zipper-solid.7db57917.svg",b=e.p+"static/media/file-powerpoint-solid.4d969453.svg",g=e.p+"static/media/link-solid.7b689dbd.svg",h=e.p+"static/media/globe-africa-solid.0ad34146.svg",m=e.p+"static/media/search-solid.cc51b702.svg",v={main:"#E86666",bgPopup:"#FFF",bgPopup2:"#f9f9f9",bgPopup3:"#f5efef",bgTabs:"#D8D8D8",bgTab:"#D0D0D0",fontTab:"#797979",bgTabActive:"#EFEFEF",bgInterface:"#efefef",fontInterface:"#323232",bgInterface2:"#e1e1e1",fontInterface2:"#585757",bgEditor:"#FFFFFF",bgPreview:"#F7F7F7",fontEditor:"#323232",dev:["#C3668B","#A766A7","#CE66E8","#E4E866"],compl:["#11abf8","#3fd7a4"],pal1:["#5c1a70","#ffa67c","#ffda77"],grey1:"#797979",grey2:"red",green:"green",l1:{bg:"#e1e1e1",font:"#615f5f"},l2:{bg:"#eeecec",title:"#797979",text:"#615f5f",date:"#b3b2b2"},editor:{bg:"#ffffff",font:"#525252",interfaceGrey:"#d4d1d1",mobileToolbar:{bg:"#e1e1e1",font:"#747474"}},bg:{l1:"#e1e1e1",dark:"rgb(39, 39, 39)",grey:"rgb(221, 221, 221)",light:"#FFFFFF",black:"#000000"},font:{light:"#FFFFFF",black:"#000000"}},w={els:function(){return{button:"\n\t\tbackground: none;\n border: none;\n ",images:"\n\t\tborder-radius: 7px;\n box-shadow: 0px 0px 10px rgb(0 0 0 / 10%);\n max-width: 100%;\n ",imageInfos:"\n ",redButton:"\n\t\t\tborder: none;\n\t\t\tbackground: ".concat(v.main,";\n &:hover {\n\t\t\topacity: 0.9;\n\n }\n color: white;\n border-radius: 5px;\n cursor: pointer;\n font-weight: 700;\n text-transform: uppercase;\n letter-spacing: 1px;\n ")}},colors:v,font:{main:"'Open sans', sans-serif",editor:"Consolas, monaco, monospace"},sizes:{desktop:{l:37,l1:37,l2:63,r:63},search:{h:94,padding:10},gallery:{topH:100},block:15,scrollbar:17,l2:{fileLi:{height:77,padding:5,margin:5,img:67}},editor:{padding:45},mobile:{bottomBarHeight:50,editorBar:40,editorTopWrapper:100}},assets:{decoBgMap:o,linkIcon:g,worldIcon:h,fileIcon:i,diskIcon:r,pdfIcon:a,presIcon:b,audioIcon:p,videoIcon:d,excelIcon:u,wordIcon:c,codeIcon:l,bookIcon:s,archiveIcon:f,searchIcon:m},anim:{time:"100ms"}}},100:function(t,n,e){"use strict";e.d(n,"b",(function(){return Q})),e.d(n,"c",(function(){return tt})),e.d(n,"a",(function(){return nt}));var o=e(19),i=e(26),r=e(21),a=e(9),c=e(0),l=e.n(c),s=e(13),u=e(148),d=e(51),p=e(8),f=function(t){for(var n=!0,e=0;e<t.length;e++)32!==t[e].charCodeAt(0)&&45!==t[e].charCodeAt(0)&&91!==t[e].charCodeAt(0)&&93!==t[e].charCodeAt(0)&&(n=!1);return n},b="[TEXT MANIP ACTION]",g=function(t){var n=Object(c.useRef)(0),e=t.editorRef,o=t.editorRef,r=t.editorRef,a=function(){var i;if("codemirror"===t.editorType){var a=d.a.getCurrentLineInfos(e.current);i=a,n.current=a.currentPosition}else if("monaco-textarea"===t.editorType){var c;if("desktop"===t.deviceType)i=null===(c=o.current)||void 0===c?void 0:c.getCurrentLineInfos(),n.current=i&&i.monacoPosition?i.monacoPosition:0;else i=r.current?function(t){for(var n=t.value.split("\n"),e=t.selectionStart,o=0,i=0;o<e+1;)o+=n[i].length+1,i++;return{currentPosition:e,lines:n,activeLine:n[--i],lineIndex:i}}(r.current):null,n.current=i&&i.currentPosition?i.currentPosition:0}return i},l=function(i){var a=n.current+i;if("codemirror"===t.editorType)d.a.updateCursor(e.current,a,!0);else if(Object(s.b)("desktop")){var c;null===(c=o.current)||void 0===c||c.editor.setPosition(a)}else{var l=r.current;if(!l)return;l.focus(),setTimeout((function(){l&&(l.selectionStart=a,l.selectionEnd=a)}))}};return{getLineTextInfos:a,resetCursorPosition:l,applyTextModifAction:function(t,n){var e=a();if(!e)return null;console.log(b,"applying =>",t,n);var o=function(t,n,cb,e){var o=n.lines;if("^"===t){var r=o[n.lineIndex-1],a=o[n.lineIndex];o[n.lineIndex]=r,o[n.lineIndex-1]=a,cb(-r.length-1)}if("v"===t){var c=o[n.lineIndex+1],l=o[n.lineIndex];o[n.lineIndex]=c,o[n.lineIndex+1]=l,cb(+c.length+1)}if("X"===t){o[n.lineIndex].length;var s=Object(i.a)(o).splice(0,n.lineIndex).join("\n").length+1-n.currentPosition;o[n.lineIndex]="",cb(s)}if("C"===t){var u=o[n.lineIndex].length,d=o[n.lineIndex];o.splice(n.lineIndex,0,d),cb(u+1)}"->"===t&&(o[n.lineIndex]=" "+o[n.lineIndex],cb(2)),"<-"===t&&(n.activeLine.startsWith(" ")?(o[n.lineIndex]=o[n.lineIndex].substr(2,o[n.lineIndex].length),cb(-2)):cb(0));var f=n.activeLine.trim();if("[x]"===t&&(f.startsWith("- [ ]")||f.startsWith("- [x]")?f.startsWith("- [ ]")?(o[n.lineIndex]=o[n.lineIndex].replace("[ ]","[x]"),cb(0)):f.startsWith("- [x]")?(o[n.lineIndex]=o[n.lineIndex].replace("[x]","[ ]"),cb(0)):cb(0):(o[n.lineIndex]=o[n.lineIndex].replace(f,"- [ ] "+f.replace("-","")),cb(6))),"insertAt"===t&&e&&e.textToInsert&&(Object(p.isNumber)(e.insertPosition)||Object(p.isString)(e.insertPosition))){var b="currentPos"===e.insertPosition?n.currentPosition+1:e.insertPosition,g=o.join("\n");o=[g.slice(0,b),e.textToInsert,g.slice(b)].join("").split("\n")}return o.join("\n")}(t,e,(function(t){console.log(b,"applying a decal of cursor of :",t),l(t)}),n);return o}}},h=function(t,n){var e=g({editorType:"monaco-textarea",deviceType:"mobile",editorRef:n.mobileTextarea}),o=e.getLineTextInfos,i=e.resetCursorPosition,r=function(t){var n=Object(c.useState)(0),e=Object(a.a)(n,2),o=e[0],i=e[1];return{saveYTextarea:function(n){var e=t.current?t.current.scrollTop:0;i(n||e)},resetYTextarea:function(){t.current&&(console.log("resetYTextarea",o),t.current.scrollTop=o)}}}(n.mobileTextarea),l=r.saveYTextarea,s=r.resetYTextarea,u=Object(c.useState)(!1),d=Object(a.a)(u,2),b=d[0],h=d[1];Object(p.debounce)((function(){h(!1)}),500);return{onTextareaChange:function(e){console.log("onTextareaChange");var r=e.target.value,a=r[e.target.selectionStart-1]&&r[e.target.selectionStart-1].charCodeAt(0);if(r.length>t.length){var c=o();if(!c)return;r=function(t,n,cb){if(10===n){console.log("updateTextFromLetterInput => ENTER PRESSED");var e=t.lines[t.lineIndex-1],o=e.indexOf("- ["),i=e.indexOf("-"),r="";-1!==o&&"- [ ] "!==e?(r=e.substr(0,o+3)+" ] ",f(r)&&(t.lines[t.lineIndex]=r+t.activeLine,cb(r.length))):-1!==i&&"- "!==e&&"- [ ] "!==e&&(r=e.substr(0,i+1)+" ",f(r)&&(t.lines[t.lineIndex]=r+t.activeLine,cb(r.length)))}return t.lines.join("\n")}(c,a,(function(t){setTimeout((function(){i(t),s()}))}))}n.onMobileNoteEdition(r)},onTextareaScroll:function(t){if(!b){var n=t.target.scrollTop;l(n),console.log("onTextareaScroll")}}}},m="",v=e(77),w=e(44),O=e(17),x=e(10),j=e(45),k=e(1),y=function(t){var n=Object(c.useState)(""),e=Object(a.a)(n,2),o=e[0],i=e[1],r=function(){t.onSubmit(o)};return Object(k.d)(C,null,Object(k.d)(w.a,{title:O.a.passwordForm.explanation,onClose:function(){t.onClose()}},Object(k.d)("div",null,Object(k.d)(j.a,{value:o,label:O.a.setupForm.password,type:"password",shouldFocus:!0,onChange:function(t){i(t)},onEnterPressed:function(){r()}}),Object(k.d)("button",{className:"submit-button",onClick:function(t){r()}},O.a.passwordForm.submit))))},C=Object(v.a)("div",{target:"eozyeru0"})(".submit-button{margin-top:10px;",x.a.els().redButton,";padding:10px 20px;}"),_=e(105),E=e.n(_),T=function(t,n){var e=E.a.generateRSAKey(n,1024),o=E.a.publicKeyString(e);return E.a.encrypt(t,o)},S=function(t,n){var e=n.replace(t,"").length,o=n.length;return Math.round(e/o*100)/100},I=function(t){return t>0&&t<=.9},N=function(t){var n=!1,e={nb:S(/[^0-9]/g,t),up:S(/[^A-Z]/g,t),low:S(/[^a-z]/g,t),spe:S(/[^\/\=\?\+]/g,t)},o=I(e.nb)&&I(e.up)&&I(e.low)&&e.spe>0,i=(t.trim().endsWith("==")||t.trim().endsWith("="),/^[a-zA-Z0-9\/\=\?\+]+$/.test(t)),r=t.length>100;return i&&o&&r&&(n=!0),n},F=function(t){var n=Object(c.useState)(null),e=Object(a.a)(n,2),o=e[0],i=e[1],r=Object(c.useState)(!1),l=Object(a.a)(r,2),s=l[0],u=l[1],d=Object(c.useState)(!1),p=Object(a.a)(d,2),f=p[0],b=p[1],g=Object(c.useState)(null),h=Object(a.a)(g,2),m=h[0],v=h[1],w=function(n){var e=t.fileContent,o=T(e,n);if("failure"===o.status)v(null);else{console.log("encryption done",o),u(!1);var i=o.cipher;t.onTextEncrypted(i)}},O=function(n){var e=function(t,n){var e=E.a.generateRSAKey(n,1024);return E.a.decrypt(t,e)}(t.fileContent,n);if("failure"===e.status)v(null),alert("wrong password");else{b(!0),u(!0),console.log("decryption done",e);var o=e.plaintext;t.onTextDecrypted(o)}};return{APasswordPopup:Object(k.d)(y,{onClose:function(){i(null)},onSubmit:function(t){var n=o;i(null),v(t),"toEncrypt"===n&&w(t),"toDecrypt"===n&&O(t)}}),askForPassword:o,decryptButtonConfig:{title:"decrypt text",icon:"faUnlock",action:function(){m?O(m):i("toDecrypt")}},encryptButtonConfig:{title:"encrypt text",icon:"faLock",action:function(){m?w(m):i("toEncrypt")}},ifEncryptOnLeave:function(cb){if(s&&m){console.log("[EVENTS EDITOR] shouldEncryptOnLeave");var n=T(t.fileContent,m);n.cipher&&cb(n.cipher)}v(null),b(!1)},noHistoryBackupWhenDecrypted:f}},R=e(16),L=e(47),A=e(12),P=e(22),D=e(24),M=function(t){var n=Object(c.useState)([]),e=Object(a.a)(n,2),o=e[0],i=e[1],r=function(){R.b.emit("askFileHistory",{filepath:t.file.path,token:Object(P.b)()});var n=R.b.on("getFileHistory",(function(t){var e=Object(p.orderBy)(t.files,["created"],["desc"]);i(e),R.b.off(n)}))};Object(c.useEffect)((function(){r()}),[]);var l=Object(c.useContext)(A.a),s=Object(c.useState)(""),u=Object(a.a)(s,2),d=u[0],f=u[1],b=Object(c.useState)(null),g=Object(a.a)(b,2),h=g[0],m=g[1];return Object(k.d)(z,null,Object(k.d)("div",{className:"history-popup-wrapper"},Object(k.d)(w.a,{title:"".concat(O.a.historyPopup.title,'"').concat(t.file.realname,'"'),onClose:function(){t.onClose()}},Object(k.d)("div",{className:"count"},o.length," backups found :"),Object(k.d)("div",{className:"table-wrapper"},Object(k.d)("table",null,Object(k.d)("thead",null,Object(k.d)("tr",null,Object(k.d)("th",null,O.a.historyPopup.thead.name),Object(k.d)("th",null,O.a.historyPopup.thead.date))),Object(k.d)("tbody",null,o.map((function(t){return Object(k.d)("tr",{className:"".concat((null===h||void 0===h?void 0:h.path)===t.path?"active":""),onClick:function(){!function(t){l&&l.file.getContent(t.path,(function(n){f(n),m(t)}))}(t)}},Object(k.d)("td",null," ",t.realname," "),Object(k.d)("td",null," ",Object(L.a)(new Date(t.created||0))," "),Object(k.d)("td",null," ",Object(k.d)("div",{className:"trash",onClick:function(){!function(t){Object(A.d)((function(n){n.file.delete(t,(function(t){r(),m(null),f("")}))}))}(t)}}," ",Object(k.d)(D.a,{name:"faTrash",color:"grey"})," ")))}))))),d&&Object(k.d)("div",{className:"note-preview"},Object(k.d)("textarea",{className:"note-preview-textarea",value:d})),Object(k.d)("div",{className:"advice"},' To disable history backup for a note, add "--disable-history--"in it'))))},z=Object(v.a)("div",{target:"ew7e5uv0"})(".filemain-wrapper .history-popup-wrapper .popup-wrapper-component .popup-wrapper{width:90%;}.popup-wrapper .popupContent{max-height:70vh;padding:0px;}.table-wrapper{max-height:30vh;overflow-y:auto;padding:0px 0px 20px 0px;table{border-spacing:0px;thead{tr{th{padding:8px;}}}tbody{text-align:left;tr{cursor:pointer;background:#f1f0f0;&:nth-child(2n){background:none;}&.active{font-weight:bold;}&:hover{background:r",x.a.colors.main,";}td{padding:8px;}}}}}.note-preview{.note-preview-textarea{padding:6px;margin:10px 0px 0px 0px;width:calc(100% - 10px);height:34vh;border:none;background:gainsboro;}}.advice{color:#a4a4a4;font-size:10px;padding:3px 3px;}.trash{margin-right:15px;}"),B=e(31),U=e(135),H=e(136),W=e(116),q=e(137),V=e(146),G=e(142),K=e(145),J=e(33),Y=e(55),$=function(){return"\n@page {\nmargin: 0;\n}\n@media print {\n.hide-print {\ndisplay: none;\n\n}\n}\n\n* {\n\t-webkit-print-color-adjust: exact; \n\tprint-color-adjust: exact; \n}\n\n.file-path-wrapper {\n\tdisplay: none;\n}\n.file-infos-wrapper {\n\tbackground: #eeeeee;\n\tpadding: 10px;\n\tmargin: 10px;\n}\n\t\t.simple-css-print-wrapper {\n\t\t\tmargin: 20px;\n\t\t\twidth: 70%;\n\n\t\t}\n\t\timg {\n\t\t\t\tmax-width: 300px!important;\n\t\t\t\tmax-height: 500px!important;\n\t\t}\n\t\t.block-tag {\n\t\t\t\tdisplay: none;\n\t\t}\n\t\t"},Z=e(140),X=function(t){var n=Object(c.useState)(""),e=Object(a.a)(n,2),o=e[0],f=e[1],b=Object(c.useRef)(null),v=!0;!1===t.canEdit&&(v=!1),!1===t.isConnected&&(v=!1),Object(c.useEffect)((function(){f("")}),[t.file.path]);var w=function(t){var n=Object(c.useState)(!1),e=Object(a.a)(n,2),o=e[0],i=e[1],r=Object(c.useRef)(!1);Object(c.useEffect)((function(){r.current=t.canEdit}),[t.canEdit]),Object(c.useEffect)((function(){return i(!1),t.onEditorDidMount&&t.onEditorDidMount(),function(){t.onEditorWillUnmount&&(l(),t.onEditorWillUnmount())}}),[t.file.path]),Object(c.useEffect)((function(){l()}),[t.file.path]),Object(c.useEffect)((function(){t.onNoteContentDidLoad&&t.onNoteContentDidLoad()}),[t.fileContent,t.file.path]);var l=function(){""!==m&&t.onNoteLeaving&&t.onNoteLeaving(o,m),m=t.file.path};return{triggerNoteEdition:function(n){o?t.onNoteEdition&&t.onNoteEdition(n,!1):t.onNoteEdition&&t.onNoteEdition(n,!0),i(!0)}}}({file:t.file,fileContent:t.fileContent,canEdit:v,onEditorDidMount:function(){},onEditorWillUnmount:function(){},onNoteContentDidLoad:function(){R.a&&f(t.fileContent)},onNoteEdition:function(n,e){f(n),t.onFileEdited(t.file.path,n),e&&Object(A.d)((function(n){n.history.save(t.file.path,t.fileContent,"enter")}))},onNoteLeaving:function(t,n){}}),x=w.triggerNoteEdition,j=Object(c.useRef)(null),y=h(o,{mobileTextarea:j,onMobileNoteEdition:x}),C=(y.onTextareaChange,y.onTextareaScroll,Object(c.useRef)(null)),_="desktop"!==Object(s.a)()?j:b;"codemirror"===t.editorType&&(_=C);var E=g({editorType:t.editorType,deviceType:Object(s.a)(),editorRef:_}).applyTextModifAction,T=F({fileContent:o,onTextEncrypted:function(n){x(n),Ot(),Object(A.d)((function(e){e.history.save(t.file.path,n,"int")}))},onTextDecrypted:function(t){x(t),Ot()}}),S=T.APasswordPopup,I=T.askForPassword,P=T.decryptButtonConfig,D=T.encryptButtonConfig,z=(T.ifEncryptOnLeave,T.noHistoryBackupWhenDecrypted,Object(c.useContext)(V.a)),X=Object(c.useState)(-1),Q=Object(a.a)(X,2),tt=Q[0],nt=Q[1];Object(c.useEffect)((function(){if(z.upload.progress&&t.isActive&&nt(z.upload.progress),z.upload.file&&t.isActive){var n=Object(r.a)({},z.upload.file),e=n.name,o=n.path;z.upload.reinit(),et(e,o)}}),[z.upload]);var et=function(t,n){ot.current+="![".concat(t,"](").concat(n,")\n"),it()},ot=Object(c.useRef)(""),it=Object(J.a)((function(){var t=C.current,n=d.a.getCurrentLineInfos(t).currentPosition;!function(t,n){var e=E("insertAt",{textToInsert:t,insertPosition:n});e&&(x(e),Ot())}(ot.current,"currentPos"),ot.current="",d.a.updateCursor(t,n,!0)}),500),rt="[link|".concat(t.file.realname," ").concat(t.file.folder,"]\n"),at=function(n,e){return{title:"",class:"upload-button-wrapper",action:function(){},customHtml:Object(k.d)(W.a,{file:t.file,type:n,label:e,onProgress:function(t){return nt(t)},onSuccess:function(t){et(t.name,t.path)}})}},ct=[].concat(Object(i.a)(function(){var t=[at("all","Upload files")];return"desktop"!==Object(s.a)()&&(t.push(at("image","Upload Gallery")),t.push(at("camera","Capture")),t.push(at("microphone","Record"))),t}()),[N(o)?P:D,{title:"Export/Print",icon:"faFileDownload",action:function(){!function(t,n){var e=".window-id-".concat(t," .preview-area-wrapper"),o=document.querySelector(e),i="print-wrapper";if(o){!function(){var t=document.querySelectorAll(".".concat(i));Object(p.each)(t,(function(t){t.classList.remove(i)}))}();var r=Object(L.a)(new Date(n.modified||0)),a=Object(L.a)(new Date(n.modified||0)),c="\n<head>\n\t<title>".concat(n.name,' </title>\n\n\n</head>\n<html>\n\t<body>\n\t\t\t\t<div class="simple-css-print-wrapper">\n<div class="hide-print">\n\t<bm> Export options </bm>\n\t<button onclick="window.print()">print</button>\n\t<button onclick="window.print()">export to pdf</button>\n<button onclick="window.alert(\'CTRL+ S then select *complete webpage* if available\')">export to html</button>\n</div>\n\t\t\t\t\t<div class="file-infos-wrapper">\n\t\t\t\t\tNote Name : ').concat(n.name,"<br>\n\t\t\t\t\tNote Path : ").concat(n.path,"<br>\n\t\t\t\t\tCreated : ").concat(r,"<br>\n\t\t\t\t\tEdited : ").concat(a,"<br>\n\t\t\t\t\t</div>\n\t\t\t\t").concat(o.innerHTML,"\n\t\t\t\t</div>\n\n\t\t\t\t<style>").concat(Object(Y.c)({w:".simple-css-print-wrapper",pl:".preview-link",r:".resource-link-icon"}),"</style>\n\t\t\t\t<style>").concat($(),"</style>\n\n<script>\n<\/script>\n\n\n\n\t</body>\n</html>\n\t\t\t\t"),l=window.open("","print-popup","width=800,height=1000");null===l||void 0===l||l.document.write(c)}}(t.windowId,t.file)}},{title:O.a.editorBar.explanation.history,icon:"faHistory",action:function(){dt(!ut)}},{title:O.a.editorBar.tts,icon:"faCommentDots",action:function(){Object(A.d)((function(n){n.ui.textToSpeechPopup.open(o,{id:t.file.name})}))}},{title:"Delete note",class:"delete",icon:"faTrash",action:function(){z.file.onFileDelete(t.file)}}]),lt=Object(c.useState)(!1),st=Object(a.a)(lt,2),ut=st[0],dt=st[1],pt=Object(c.useRef)(null),ft=pt.current,bt=700;ft&&(bt=ft.clientHeight/1.3),"mobile"===Object(s.a)()&&(bt=window.innerHeight);var gt=Object(c.useRef)(null);Object(c.useEffect)((function(){Ot()}),[t.fileContent,t.file.path]);var ht=Object(c.useState)(0),mt=Object(a.a)(ht,2),vt=mt[0],wt=mt[1],Ot=function(){wt(vt+1)},xt=o.length>3e4&&"desktop"!==Object(s.a)(),jt=function(n){Object(Z.b)(t.file.path,n),t.onViewToggle(n)};return Object(k.d)("div",{className:"editor-area",ref:pt},Object(k.d)("div",{className:"infos-editor-wrapper"},Object(k.d)("div",{className:"file-path-wrapper"},t.file.path.replace("/".concat(t.file.name),"")),Object(k.d)(u.a,{title:t.file.name.replace(".md",""),onEdited:function(n,e){var o="".concat(t.file.folder).concat(n,".md"),i="".concat(t.file.folder).concat(e,".md");z.file.onTitleUpdate(o,i),Ot()}}),Object(k.d)("div",{className:"toolbar-and-dates-wrapper"},Object(k.d)("div",{className:"editor-toolbar-dropdown"},Object(k.d)(H.a,{hover:!0,dir:"right",maxHeight:bt},Object(k.d)(l.a.Fragment,null,Object(k.d)("div",{className:"view-toggler-wrapper"},"mobile"!==Object(s.a)()&&Object(k.d)(B.a,{class:"editor-view-toolbar",size:.8,buttons:[{title:"Editor",icon:"custom_icons/view-3.svg",action:function(){jt("editor")}},{title:"Editor with minimap",icon:"custom_icons/view-4.svg",action:function(){jt("editor-with-map")}},{title:"Dual view",icon:"custom_icons/view-1.svg",action:function(){jt("both")}},{title:"Render view",icon:"custom_icons/view-2.svg",action:function(){jt("preview")}}]})),Object(k.d)("div",{className:"toolbar-wrapper"},Object(k.d)(B.a,{class:"editor-main-toolbar",design:"vertical",size:.8,buttons:ct})),Object(k.d)("div",{className:"separation-bar"}),Object(k.d)("div",{className:"dates-wrapper"},Object(k.d)("div",{className:"date modified"},Object(k.d)("h4",null,"Modified"),Object(L.a)(new Date(t.file.modified||0))),Object(k.d)("div",{className:"date created"},Object(k.d)("h4",null,"Created"),Object(L.a)(new Date(t.file.created||0)))),Object(k.d)("div",{className:"path-wrapper"},Object(k.d)("div",{className:"path"},Object(k.d)("h4",null,"Path"),Object(k.d)("span",{className:"path-link",onClick:function(){Object(A.d)((function(n){n.ui.browser.goTo(t.file.folder,t.file.name)}))}}," ",t.file.folder," "))),Object(k.d)("div",{className:"note-id-wrapper"},Object(k.d)("h4",null,"Node Id"),Object(k.d)("div",{className:"note-id-form"},Object(k.d)("input",{type:"text",ref:gt,onClick:function(t){var n=t.target;n.setSelectionRange(0,n.value.length)},value:rt,readOnly:!0}),Object(k.d)(B.a,{class:"note-id-toolbar",size:1,buttons:[{title:"Copy note ID",icon:"faClipboard",action:function(){var t=gt.current;t&&Object(G.a)(t)}}]})))))))),Object(k.d)(q.a,{progress:tt}),Object(k.d)("div",{className:"main-editor-wrapper"},!xt&&"codemirror"===t.editorType&&Object(k.d)(K.a,{windowId:t.windowId,ref:C,value:o,onChange:x,posY:t.posY,jumpToLine:t.jumpToLine||0,forceRender:vt,onScroll:t.onScroll,onTitleClick:t.onTitleClick,file:t.file}),xt&&Object(k.d)("div",{className:"codemirror-mobile-fallback"},Object(k.d)("p",null," note is too long for mobile, we disabled the advanced edition system "),Object(k.d)("textarea",{defaultValue:o,onChange:function(t){x(t.target.value)}}))),"desktop"!==Object(s.a)()&&Object(k.d)(U.a,{onButtonClicked:function(t){var n=E(t);n&&(x(n),Ot())}}),I&&S,ut&&Object(k.d)(M,{file:t.file,onClose:function(){dt(!1)}}))},Q=function(){return"\n.mobile-text-manip-toolbar {\n\t\t.toolbar-button {\n\t\t\t\tpadding: 13px 20px;\n\t\t}\n}\n\n.file-path-wrapper {\n\t\tpadding-top: ".concat(Object(s.b)("desktop")?x.a.sizes.block:x.a.sizes.block/2,"px;\n\t\tfont-size: 13px;\n\t\tfont-weight: 700;\n\t\tcolor: #b6b5b5;\n\t\tcursor: pointer;\n\t\ttext-transform: capitalize;\n}\n.big-title {\n\t\tcolor: ").concat(x.a.colors.main,";\n\t\tfont-size: 30px;\n\t\tfont-weight: 800;\n\t\twidth: 100%;\n\t\ttext-transform: uppercase;\n}\n\n.separation-bar {\n\t\twidth: 86%;\n height: 1px;\n background: #e6e6e6;\n margin: 10px 6%;\n}\n\n.dates-wrapper {\n\t\tposition: relative;\n\t\tmargin: 0px 0px 5px 0px;\n\t\tdisplay: block!important;\n .modified {\n\t\t\t\tcolor: grey;\n\t\t\t\ttext-align: left;\n }\n\t\t.created {\n\t\t\t\ttext-align: right;\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: 0px;\n\t\t\t\tright: 0px;\n\t\t\t\tcolor: ").concat(x.a.colors.editor.interfaceGrey,";\n\t\t}\n}\n\n.path-wrapper {\n\t\tcolor: grey;\n text-align: left;\n\t\tpadding: 0px 0px 5px 0px;\n .path-link {\n\t\t\t\tcolor: ").concat(x.a.colors.main,";\n\t\t\t\tfont-weight: bold;\n\t\t\t\tcursor: pointer;\n }\n}\n\n.note-id-wrapper {\n\t\tcolor: grey;\n text-align: left;\n\t\t.note-id-form {\n\t\t\t\tdisplay:flex;\n\t\t\t\tinput {\n\t\t\t\t\t\tborder: none;\n\t\t\t\t\t\tpadding: 5px;\n\t\t\t\t\t\tbackground: #ebebeb;\n\t\t\t\t\t\tborder-radius: 3px;\n\t\t\t\t\t\tfont-size: 9px;\n\t\t\t\t\t\tfont-weight: 400;\n\t\t\t\t}\n\t\t}\n}\n.toolbar-and-dates-wrapper {\n\t\th4 {\n\t\t\t\tmargin: 0px;\n\n\t\t}\n}\n\n\n")},tt=function(t){return"\n\n.editor-area {\n\t\twidth: ".concat(Object(s.b)("desktop")?"50%":"editor"===t?"100vw":"0vw",";\n\t\tdisplay: block;\n\n\t\tposition: ").concat(Object(s.b)("desktop")||"editor"===t?"relative":"absolute!important",";\n\t\ttop: ").concat("editor"!==t||Object(s.b)("desktop")?"-9999px":"0px",";\n\n\n\t\t.mobile-text-manip-toolbar {\n\t\t\t\tdisplay: ").concat("editor"!==t||Object(s.b)("desktop")?"none":"flex",";\n\t\t}\n\n\t\t.infos-editor-wrapper {\n\t\t\t\t").concat(Object(s.b)("desktop")?"":"height: ".concat(x.a.sizes.mobile.editorTopWrapper,"px;"),"\n\t\t\t\t").concat(Object(s.b)("desktop")?"width: calc(200% - ".concat(3*x.a.sizes.block*2,"px);"):"","\n\t\t\t\tpadding: 0px ").concat(Object(s.b)("desktop")?3*x.a.sizes.block:2*x.a.sizes.block,"px;\n\t\t\t\tposition: relative;\n\n\t\t\t\t").concat(Q(),"\n\n\t\t\t\t.title-input-wrapper {\n\t\t\t\t\t\tposition:relative;\n\t\t\t\t\t\tmargin-top: ").concat(Object(s.b)("desktop")?6:0,"px;\n\t\t\t\t\t\t.press-to-save {\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\ttop: 39px;\n\t\t\t\t\t\t\t\tfont-size: 8px;\n\t\t\t\t\t\t\t\tcolor: ").concat(x.a.colors.main,";\n\t\t\t\t\t\t\t\tright: 0px;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinput {\n\t\t\t\t\t\t\t\tpadding: 0px;\n\t\t\t\t\t\t\t\tborder: none;\n\t\t\t\t\t\t\t\tbackground: none;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t\n\n\t\t\t\t.toolbar-and-dates-wrapper {\n\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t}\n\n\t\t\t\t.dates-wrapper {\n\t\t\t\t\t\tdisplay: ").concat(Object(s.b)("desktop")?"block":"none",";\n\t\t\t\t\t\t.date {\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t").concat(W.b,"\n }\n}\n\n\n\n\n.main-editor-wrapper {\n ").concat(Object(s.b)("desktop")?"":"padding: 0px ".concat(2*x.a.sizes.block,"px 0px ").concat(2*x.a.sizes.block,"px;"),"\n ").concat(Object(s.b)("desktop")?"":"margin: 0px 0px ".concat(x.a.sizes.mobile.bottomBarHeight,"px 0px;"),"\n .monaco-editor {\n\t\t\t\tmargin: 0px;\n }\n .textarea-editor {\n\t\t\t\tborder: none;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: calc(100vh - ").concat(x.a.sizes.mobile.editorTopWrapper+x.a.sizes.mobile.editorBar+2*x.a.sizes.mobile.bottomBarHeight,"px);\n\t\t\t\tmargin: 0px;\n\t\t\t\tpadding: 0px;\n\t\t\t\tbackground: rgba(255,255,255,0.7);\n }\n}\n")},nt=function(t){var n=Object(c.useContext)(A.a),e=(null===n||void 0===n?void 0:n.status.isConnected)||!1;return Object(c.useMemo)((function(){return Object(k.d)(X,Object(o.a)({},t,{isConnected:e}))}),[e,t.canEdit,t.editorType,t.file.path,t.file,t.fileContent,t.isActive,t.jumpToLine])}},101:function(t,n,e){"use strict";e.d(n,"d",(function(){return g})),e.d(n,"c",(function(){return w})),e.d(n,"a",(function(){return O})),e.d(n,"b",(function(){return x}));var o=e(26),i=e(9),r=e(8),a=e(0),c=e(49),l=e(18),s=e(16),u=e(67),d=e(22),p=e(65),f=e(61),b=e(12),g=function(t){var n=Object(a.useState)([]),e=Object(i.a)(n,2),s=e[0],d=e[1],g=Object(a.useState)(-1),w=Object(i.a)(g,2),O=w[0],x=w[1],j=Object(f.a)("selected-folder",""),k=Object(i.a)(j,2),y=k[0],C=k[1],_=Object(a.useState)(h),E=Object(i.a)(_,2),T=E[0],S=E[1],I=Object(a.useState)(""),N=Object(i.a)(I,2),F=N[0],R=N[1],L=Object(p.a)("folders-open",["/"]),A=Object(i.a)(L,3),P=A[0],D=A[1],M=A[2],z=Object(a.useRef)([]),B=function(t){t=Object(r.uniq)(t),D(t)};Object(a.useEffect)((function(){U(P)}),[P]);var U=function(t,n){n||(n={}),Object(r.isBoolean)(n.cache)||(n.cache=!0);var e=!!Object(r.isBoolean)(n.background)&&n.background,o=0;Object(b.d)((function(i){Object(r.each)(t,(function(r){var a="folder-scan-".concat(r),c=function(){i.folders.get([r],(function(r){var c;(!e&&W(r.pathBase,r.folders),i.cache.set(a,r,-1),++o>=t.length)&&((null===(c=n)||void 0===c?void 0:c.cb)&&n.cb())}))};n&&n.cache?i.cache.get(a,(function(i){var r;i?e||(W(i.pathBase,i.folders),++o>=t.length&&(null===(r=n)||void 0===r?void 0:r.cb)&&n.cb()):c()})):c()}))}))},H=Object(a.useRef)([]),W=function(t,n){var e=Object(r.cloneDeep)(H.current),o={current:e};Object(r.each)(n,(function(t){t&&(o.current=o.current.filter((function(n){return t.path!==n.path})))})),Object(r.each)(n,(function(t){t&&(o.current=v(t,o.current))})),e=o.current,H.current=e;var i=m("/",e);i&&S(i),R(t)};return{goTo:function(n,e,o){if(""!==n){n=Object(c.b)("".concat(n,"/"));l.a.client.log.verbose&&console.log("".concat("[BROWSER GO TO] "," ").concat(n," ").concat(e," ").concat(JSON.stringify(o))),t.searchUiApi.term.set(""),t.statusApi.searching.set(!0),C(n),t.filesApi.get(n,(function(n){t.statusApi.searching.set(!1);var i=t.userSettingsApi.get("ui_filesList_sortMode"),a=Object(u.d)(n,i),c=-1;if(e&&Object(r.each)(a,(function(t,n){t.name===e&&(c=n)})),x(c),d(a),o&&o.openIn){var l=a[c];"active"===o.openIn||"activeWindow"===o.openIn?t.tabsApi.active.get()?t.windowApi.active.setContent(l):t.tabsApi.openInNewTab(l):t.windowApi.updateWindows([o.openIn],l)}}))}},files:{active:{get:s[O],getIndex:O,set:x},set:d,get:s},folders:{refreshFromBackend:function(){M((function(t){z.current=t}))},base:F,get:function(){return T},clean:function(){S(h)},scan:U,open:{get:function(){return z.current},add:function(t){z.current=[].concat(Object(o.a)(z.current),[t]),B(z.current)},remove:function(t){Object(r.each)(t,(function(t){z.current=z.current.filter((function(n){return!n.startsWith(t)}))})),B(z.current)}},current:{get:y,set:C}}}},h={title:"",key:"",path:""},m=function t(n,e){for(var o,i=0;i<e.length;i++)if(Object(c.a)(e[i].path,n)){o=Object(r.cloneDeep)(e[i]);var a=e[i].children;if(Object(r.isArray)(a))for(var l=0;l<a.length;l++){var s=t(a[l].path,e);s&&(o.children[l]=s)}}return o},v=function(t,n){for(var e="add",o=0;o<n.length;o++)Object(c.a)(t.path,n[o].path)&&(n[o]=t,e="update");return"add"===e&&n.push(t),n},w={title:".trash",key:"/.tiro/.trash",path:"/.tiro/.trash"},O=function(t,n){console.log("[askFolderCreate]",t,n),s.b.emit("askFolderCreate",{newFolderName:t,parent:n,token:Object(d.b)()})},x=function(t){console.log("[askFolderDelete]",t),s.b.emit("askFolderDelete",{folderToDelete:t,token:Object(d.b)()})}},103:function(t,n,e){"use strict";e.d(n,"b",(function(){return b})),e.d(n,"a",(function(){return h})),e.d(n,"c",(function(){return w})),e.d(n,"d",(function(){return O}));var o=e(3),i=e(5),r=e(6),a=e(15),c=e(20),l=e(11),s=e(7),u=e(4),d=e(97),p=e(134),f=e(59),b={LatexMdEl:u.a.define()},g={resolve:"LatexMdEl"},h={defineNodes:["LatexMdEl"],parseInline:[{name:"MdCustomTagsParser",parse:function(t,n,e){return 36===n?t.addDelimiter(g,e,e+1,!0,!0):-1},after:"Emphasis"}],props:[Object(u.c)({LatexMdEl:b.LatexMdEl})]},m=function(t){Object(a.a)(e,t);var n=Object(c.a)(e);function e(t){var o;return Object(i.a)(this,e),(o=n.call(this)).str=t,o}return Object(r.a)(e,[{key:"ignoreEvent",value:function(){return!1}},{key:"toDOM",value:function(){var t=document.createElement("div");t.classList.add("cm-mdpreview-wrapper"),t.classList.add("latex-wrapper");var n=Object(d.c)(this.str);return t.innerHTML=' <div class="latex-height" >'.concat(n,"</div> "),t}}]),e}(l.g);function v(t,n){var e,i=[],r=Object(o.a)(t.visibleRanges);try{for(r.s();!(e=r.n()).done;){var a=e.value,c=a.from,u=a.to;Object(s.C)(t.state).iterate({from:c,to:u,enter:function(n){if("LatexMdEl"===n.name){var e=t.state.doc.sliceString(n.from,n.to),o=l.a.widget({widget:new m(e),side:1});i.push(o.range(n.from))}}})}}catch(d){r.e(d)}finally{r.f()}return l.a.set(i)}var w=function(t){return l.f.fromClass(function(){function n(e){Object(i.a)(this,n),this.decorations=void 0,this.decorations=v(e,t.file)}return Object(r.a)(n,[{key:"update",value:function(n){(n.docChanged||n.viewportChanged)&&(this.decorations=v(n.view,t.file))}}]),n}(),{decorations:function(t){return t.decorations},eventHandlers:{mousedown:function(n,e){var o=n.target;if(Object(f.b)(o),o.classList.contains("actionable-title")){var i=o.innerHTML.replace(/^#{1,6} /,"");t.onTitleClick(i)}}}})},O=function(){return"\n.latex-height {\n\t\theight: 20px;\n\t\toverflow: scroll;\n\t\tline-height: initial;\n\t\tbackground: rgb(247,247,247);\n\t\tpadding: 10px;\n\t\tborder-radius: 5px;\n\t\tcolor: rgba(0,0,0,0);\n\t\ttransition: all 0.2s;\n\t\t.katex, .katex span {\n\t\t\t\tcolor: black;\n\t\t}\n}\n\n.mdpreview-source {\n\t\tfont-weight: bold;\n\t\tcolor: #b4b4b4;\n\t\tfont-size: 9px;\n\t\tdisplay: block;\n}\n\n.cm-mdpreview-wrapper {\n\t\tline-height: 0px;\n\n\t\t&.latex-wrapper {\n\t\t\t\tposition: relative;\n\t\t\t\tleft: -10px;\n\t\t\t\tdisplay: inline-block;\n\t\t}\n\t\t&.image-wrapper {\n\t\t\t\t/* max-height: 160px; */\n\t\t}\n\n\t\t.cm-mdpreview-image {\n\t\t\t\tposition: relative;\n\t\t\t\tdisplay: inline-block;\n\n\t\t\t\timg {\n\t\t\t\t\t\tmargin: 5px 0px;\n\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\tbox-shadow: 0px 0px 5px rgba(0,0,0,.2);\n\t\t\t\t\t\tmax-width: calc(100% - 20px);\n\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\tmax-height: 220px;\n\t\t\t\t}\n\t\t\t\t.enlarge {\n\t\t\t\t\t\twidth: 10px;\n\t\t\t\t\t\topacity: 0;\n\t\t\t\t\t\ttransition: 0.2s all;\n\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\ttop: 8px;\n\t\t\t\t\t\tright: 23px;\n\t\t\t\t\t\tz-index: 2;\n\t\t\t\t\t\tpadding: 6px;\n\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\tbackground: rgba(0,0,0,0.6);\n\t\t\t\t\t\tborder-radius: 19px;\n\t\t\t\t}\n\t\t\t\tsvg, span {\n\t\t\t\t\t\tpointer-events: none;\n\t\t\t\t}\n\t\t\t\tsvg {\n\t\t\t\t\t\tbox-shadow: 0 0 0 rgba(0,0,0,0.4);\n\t\t\t\t}\n\n\t\t}\n\t\t&:hover .enlarge {\n\t\t\t\topacity: 0.3;\n\t\t\t\t/* pointer-events: all; */\n\t\t}\n}\n}\n\n ".concat(Object(p.a)(),"\n ")}},104:function(t,n,e){"use strict";e.d(n,"a",(function(){return s})),e.d(n,"b",(function(){return d}));var o=e(21),i=e(47),r=e(12),a=e(8),c="tiro-analytics",l=function(cb){Object(r.d)((function(t){t.cache.get(c,(function(t){var n={};t&&(n=t),cb(n)}))}))},s=function(t){var n=Object(i.c)();l((function(e){var i,l=Object(o.a)({},e);l[n[0]]||(l[n[0]]={}),l[n[0]][n[1]]||(l[n[0]][n[1]]={}),l[n[0]][n[1]][n[2]]||(l[n[0]][n[1]][n[2]]={}),Object(a.isNumber)(l[n[0]][n[1]][n[2]][t])?l[n[0]][n[1]][n[2]][t]++:l[n[0]][n[1]][n[2]][t]=1,i=l,Object(r.d)((function(t){t.cache.set(c,i,-1)}))}))},u=function(cb,t){t||(t={});t.start?t.start:Object(i.c)(Object(i.b)("lastMonth")),t.end?t.end:Object(i.c)();l((function(t){cb(t)}))},d=function(t){return{log:s,report:u}}},115:function(t,n,e){"use strict";e.d(n,"b",(function(){return a})),e.d(n,"a",(function(){return c}));var o=e(265),i=e(46),r=e(40),a=function(t,n){var e="render-react-wrapper-".concat(Object(r.a)()),o=function(){var n=c(t),o=setInterval((function(){var t=document.getElementById(e);t&&(t.innerHTML="",t.appendChild(n),clearInterval(o))}),10)};return n&&n.delay?setTimeout(o,n.delay):o(),e},c=function(t,n){return n||(n=document.createElement("div")),Object(o.createRoot)(n).render(t),n};i.renderToString},116:function(t,n,e){"use strict";e.d(n,"a",(function(){return l})),e.d(n,"b",(function(){return s}));var o=e(8),i=(e(0),e(12)),r=e(10),a=e(24),c=e(1),l=function(t){var n="faPaperclip";"image"===t.type&&(n="faImage"),"camera"===t.type&&(n="faCamera"),"microphone"===t.type&&(n="faMicrophone");var e="*";"image"===t.type&&(e="image/*"),"camera"===t.type&&(e="image/*"),"microphone"===t.type&&(e="audio/*");var r=Object(o.uniqueId)();return Object(c.d)("div",{className:"upload-button-component"},Object(c.d)("input",{className:"input-file-hidden",id:"file-".concat(r),multiple:!0,name:"file-".concat(r),type:"file",capture:"camera"===t.type||"microphone"===t.type,accept:e,onChange:function(n){var e=n.target.files;0!==e.length&&Object(o.each)(e,(function(n){Object(i.d)((function(e){e.upload.uploadFile({file:n,folderPath:t.file.folder,onProgress:t.onProgress,onSuccess:t.onSuccess})}))}))}}),Object(c.d)("label",{htmlFor:"file-".concat(r)},Object(c.d)(a.a,{name:n}),Object(c.d)("span",{className:"label-text"},t.label)))},s=function(){return"\n.upload-button-wrapper {\n\t\twidth: 100%;\n\t\tcursor: pointer;\n\t\t.inside-html-wrapper {\n\t\t\t\twidth: 100%;\n\t\t}\n\t\t&:hover {\n\t\t\t\t.label-text { color :".concat(r.a.colors.main,"; }\n\t\t}\n\t\t.upload-button-component {\n\t\t\t\tcursor: pointer;\n\t\t\t\tdisplay: flex;\n\t\t\t\tposition: relative;\n\t\t\t\twidth: 100%;\n\t\t\t\t.input-file-hidden {\n\t\t\t\t\t\twidth: 0.1px;\n\t\t\t\t\t\theight: 0.1px;\n\t\t\t\t\t\topacity: 0;\n\t\t\t\t\t\toverflow: hidden;\n\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\tz-index: -1;\n\t\t\t\t}\n\t\t\t\t.label-text {\n\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\tmargin-left: 18px;\n\t\t\t\t\t\tfont-size: 11px;\n\t\t\t\t\t\tfont-weight: 400;\n\t\t\t\t}\n\t\t}\n}\n")}},12:function(t,n,e){"use strict";e.d(n,"e",(function(){return U})),e.d(n,"d",(function(){return H})),e.d(n,"a",(function(){return W})),e.d(n,"f",(function(){return q})),e.d(n,"c",(function(){return V})),e.d(n,"b",(function(){return G}));var o=e(26),i=e(8),r=e(0),a=e.n(r),c=e(40),l=e(101),s=e(49),u=e(28),d=e(18),p=!1,f=function(t){if(!t)return null;if(t.startsWith(d.a.metas.headerStart)&&(p=!0),t.startsWith(d.a.metas.headerEnd)&&(p=!1),""===t)return null;if(!p)return null;var n=t.split(": ");if(2!==n.length)return null;var e=n.shift();if(!e)return null;var o,i=n.join(":").trim();if("created"===e||"modified"===e){o=i,i=parseInt(o).toString()===o?function(t){var n="".concat(t).substr(0,10);return parseInt(n)}(i):i;var r=new Date(i).getTime();isNaN(r)||(i=r)}return{name:e,value:i}},b=e(66),g=e(16),h=e(22),m=function(t){Object(r.useEffect)((function(){g.b.on("moveFolderAnswer",(function(n){t.eventBus.notify(n.idReq,n.idReq)}))}),[]);return{file:function(n,e,cb){var o=V("move-file-get-files");t.eventBus.subscribe(o,cb||function(){}),console.log("[MOVEFILE] ".concat(n," -> ").concat(e)),g.b.emit("moveFile",{initPath:n,endPath:e,idReq:o,token:Object(h.b)()})},folder:function(n,e,cb){var o=V("move-folder-get-files");t.eventBus.subscribe(o,cb||function(){}),console.log("[MOVEFOLDER] ".concat(n," -> ").concat(e)),g.b.emit("moveFolder",{initPath:n,endPath:e,idReq:o,token:Object(h.b)()})}}},v=function(t){var n="[FILE API] 005363 ";Object(r.useEffect)((function(){g.b.on("getFileContent",(function(n){if(n.error)t.eventBus.notify(n.idReq,{error:n.error});else{var e=function(t){var n=t.match(u.a.metas),e={};if(n&&n[0])for(var o=n[0].split("\n"),i=0;i<o.length;i++){var r=f(o[i]);r&&(e[r.name]=r.value)}var a=t,c=u.a.metas;return{metas:e,content:a=Object(b.a)(a,[[c,""]])}}(n.fileContent);t.eventBus.notify(n.idReq,{content:e.content})}}))}),[]);var e=Object(r.useRef)("");return{getContent:function(n,cb,e){var o=w(n),i=V("get-file-content");t.eventBus.subscribe(i,(function(t){t.error&&e&&e.onError?e.onError(t.error):!t.error||e&&e.onError?t.error||cb(t.content):cb(t.error)})),g.b.emit("askForFileContent",{filePath:o,token:Object(h.b)(),idReq:i})},saveContent:function(n,o,i){var r=!(!i||!i.history)&&i.history,a=(!i||!i.withMetas||i.withMetas,w(n));g.b.emit("saveFileContent",{filePath:a,newFileContent:o,token:Object(h.b)()}),r&&(n!==e.current&&U().then((function(t){var e=t.ui.browser.folders.current.get;if(e===Object(s.c)(n)){var o,i="",r=t.ui.windows.active.get();if(r)i=(null===(o=r.content.file)||void 0===o?void 0:o.name)||"";t.ui.browser.goTo(e,i)}})),t.historyApi.intervalSave(n,o),e.current=n)},delete:function(e,cb){var o=V("delete-file");console.log("".concat(n," delete file ").concat(e.path)),t.eventBus.subscribe(o,cb),g.b.emit("onFileDelete",{filepath:e.path,idReq:o,token:Object(h.b)()})},move:m({eventBus:t.eventBus}).file,create:function(e,cb){var o=V("create-file");console.log("".concat(n," create file in ").concat(e)),t.eventBus.subscribe(o,cb),g.b.emit("createNote",{folderPath:e,idReq:o,token:Object(h.b)()})}}},w=function(t){return t.replace(u.a.linklink,"$2/$1")},O=e(21),x=e(9),j=e(102),k=e(132),y=function(){var t=Object(k.a)(Object(j.a)().mark((function t(n){return Object(j.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,e){var o={},r=[];U().then((function(e){e.search.word("#",n,(function(n){var e=[],a={};console.log(n),Object(i.each)(n,(function(t,n){var r={file:t.file,titleName:""};Object(i.each)(t.results,(function(t,n){var c=[],l=t.match(u.a.titleMd);if(l&&l[0]){var s=l[0].split("#").join("").trim();r.titleName=s}var d=t.match(u.a.hashtag3);Object(i.each)(d,(function(t){t=t.substring(1),o[t]||(o[t]={id:Object.keys(o).length+1,name:t,lines:[],noteParts:[]}),o[t].noteParts.push(Object(i.cloneDeep)(r)),o[t].lines.push(n),o[t].lines=Object(i.uniq)(o[t].lines);var e=r.file.name+"-"+r.titleName;a[e]||(a[e]=[]),a[e].push(o[t].id),c.push(o[t])})),Object(i.each)(c,(function(t,n){Object(i.each)(c,(function(o,i){if(n!==i){var r=t.id,a=o.id,c="".concat(r,"-").concat(a),l="".concat(a,"-").concat(r);-1===e.indexOf(c)&&-1===e.indexOf(l)&&e.push(c)}}))}))}))})),Object(i.each)(o,(function(t){r.push(t)})),t({nodesObj:o,nodesArr:r,edges:e})}))}))})));case 1:case"end":return t.stop()}}),t)})));return function(n){return t.apply(this,arguments)}}(),C=function(t){var n="[SEARCH API] 00563 ",e=Object(r.useState)(""),o=Object(x.a)(e,2),i=o[0],a=o[1];Object(r.useEffect)((function(){g.b.on("getWordSearch",(function(n){t.eventBus.notify(n.idReq,n.result)}))}),[]);var c=function(e,cb){!function(e,cb,o){var i=V("search-".concat(o,"-"));console.log("".concat(n," searching ").concat(e," with type ").concat(o)),t.statusApi.searching.set(!0),t.eventBus.subscribe(i,(function(n){t.statusApi.searching.set(!1),cb(n)})),g.b.emit("searchFor",{term:e,token:Object(h.b)(),type:o,idReq:i})}(e,cb,"text")};return{files:{search:c},word:function(e,o,cb){var i=V("search-word-");console.log("".concat(n," searching WORD ").concat(e)),t.eventBus.subscribe(i,(function(t){cb(t)})),g.b.emit("searchWord",{word:e,folder:o,token:Object(h.b)(),idReq:i})},hashtags:function(t,cb){y(t).then((function(t){cb(t)}))},ui:{search:function(t){U().then((function(n){n.ui.browser.files.set([]),a(t),c(t,(function(t){n.ui.browser.files.set(t)}))}))},term:{set:a,get:i}}}},_=e(318),E=function(t){var n=Object(O.a)({},t).eventBus;Object(r.useEffect)((function(){g.b.on("getUploadedFile",(function(t){n.notify(t.idReq,t)}))}),[]);var e={uploadFile:function(t){var e=V("upload-file");n.subscribe(e,(function(n){delete n.idReq,t.onSuccess(n)})),function(t){var n=Object(O.a)({},t),e=n.file,o=n.path,i=n.idReq,r=n.onProgress,a=new _(g.a);a.addEventListener("start",(function(t){t.file.meta.idReq=i,t.file.meta.path=o,t.file.meta.token=Object(h.b)()})),a.addEventListener("progress",(function(t){var n=Math.round(t.bytesLoaded/t.file.size*100);r(n)})),a.submitFiles([e])}({file:t.file,path:t.folderPath,idReq:e,onProgress:function(n){t.onProgress&&t.onProgress(n)}})}};return e},T=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,S=/([^\s,]+)/g,I=e(68),N=e(273),F="/".concat(d.a.path.configFolder,"/").concat(d.a.path.cacheFolder,"/cache-api"),R="[CACHE API]",L=d.a.client.log.verbose,A=d.a.client.log.verbose,P=function(){return(new Date).getTime()},D=function(t){var n=t-P()<0;return L&&console.log(R,"isExpired? : ",n,(t-P())/6e4,"mins"),n},M=function(t){var n=function(t){return"".concat(F,"/cache-api-storage-").concat(Object(b.b)(t),".md")},e=Object(r.useRef)({}),o=function(t,n,o){var i;e.current[t]={content:n,until:(i=o,P()+60*i*1e3)}},i=5e5,a="__CHUNKED__CACHED__OBJ__SIZE:",c="[CACHE CHUNK]",l=function(t,e){var o=JSON.stringify(e),r=function(t,e){A&&console.log(c,n(t),{str:e}),H((function(o){o.file.saveContent(n(t),"".concat(e))}))};if(!(o.length>i))return r(t,o);!function(){var n,e=(n=i,o.match(new RegExp(".{1,"+n+"}","g")));A&&console.log(c,"SAVE >> TOO LARGE, split in ".concat(e.length," parts"),{cacheId:t,contentArr:e}),r(t,"".concat(a).concat(e.length));for(var l=function(n){setTimeout((function(){r("c".concat(n,"_").concat(t),e[n])}),200*n)},s=0;s<e.length;s++)l(s)}()},s=function(t,cb,e){var o=function(t,e,o){H((function(i){i.file.getContent(n(t),e,{onError:o})}))},i="___ERROR___CHUNK___LOADING___FAILURE";o(t,(function(n){try{if(n.startsWith(a)){var r=parseInt(n.replaceAll(a,""));A&&console.log(R,"GET >> remerging a ".concat(r," part"),{cacheId:t}),function(n,e,r,a){for(var l=[],s=function(){if(l.length===e){var n=l.join(""),o=n.includes(i);A&&console.log("GET >> RESULT remerging",{hasFailed:o,cacheId:t,nbChunks:e,resMerge:n}),o?a():r(n)}},u=function(n){o("c".concat(n,"_").concat(t),(function(o){l[n]=o,A&&console.log(c,"c".concat(n,"_").concat(t),{nb:l.length,nbChunks:e,r:o}),s()}),(function(t){l[n]=i,s()}))},d=0;d<e;d++)u(d)}(0,r,(function(t){cb(t)}),(function(t){e()}))}else cb(n)}catch(l){e(l)}}),(function(t){e(t)}))};return{get:function(t,cb){if(t in e.current){var n=e.current[t],i=D(n.until);i&&(n.content=void 0),L&&console.log(R,"FROM RAM",t," expired:",i),cb(n.content)}else s(t,(function(n){try{var o=JSON.parse(n);e.current[t]=Object(O.a)({},o);var i=e.current[t],r=D(i.until);r&&(i.content=void 0),L&&console.log(R,"FROM FILE",t," expired:",r),cb(i.content)}catch(a){}}),(function(n){"NO_FILE"===n&&(L&&console.log(R,"FROM FILE: NO_FILE",t),o(t,void 0,60),cb(e.current[t].content))}))},set:function(t,n,i){i||(i=60),-1===i&&(i=1e32),o(t,n,i);var r=e.current[t];L&&console.log(R,"SETTING",t," with cachedTime in min",i),l(t,r)}}},z=e(104),B=null,U=function(){return new Promise((function(t,n){if(B)return t(B);var e=setInterval((function(){if(B)return clearInterval(e),t(B)}),200)}))},H=function(cb){U().then((function(t){cb(t)}))},W=a.a.createContext(null),q=function(t){var n=Object(r.useRef)({}),e=function(t){delete n.current[t]},o={subscribe:function(t,cb,e){e||(e={}),n.current[t]||(n.current[t]=[]),n.current[t].push({cb:cb,options:e})},unsubscribe:e,notify:function(t,o){Object(i.each)(n.current,(function(n,r){r===t&&Object(i.each)(n,(function(n){try{n.cb(o)}catch(i){console.log("[CLIENT API] error with function",i)}n.options.persistent||e(t)}))}))}};Object(r.useEffect)((function(){d.a.client.log.verbose&&console.log("[CLIENT API ]INIT ")}),[]);var a=function(t){Object(r.useEffect)((function(){g.b.on("reconnect",(function(){t.eventBus.notify(n,{isConnected:!0})})),g.b.on("reconnect",(function(){t.eventBus.notify(n,{isConnected:!0})})),g.b.on("disconnect",(function(){t.eventBus.notify(n,{isConnected:!1})}))}),[]);var n="watch-api-unique-id-request";return Object(r.useEffect)((function(){g.b.on("onNoteWatchUpdate",(function(e){t.eventBus.notify(n,e)}))}),[]),{file:function(e,cb){t.eventBus.subscribe(n,(function(t){e===t.filePath&&cb(t)}),{persistent:!0})},appStatus:function(cb){t.eventBus.subscribe(n,(function(t){cb(t)}),{persistent:!0})},dev:{toggleIsConnected:function(e){t.eventBus.notify(n,{isConnected:e})}}}}({eventBus:o}),c=C({eventBus:o,statusApi:t.statusApi}),s=v({eventBus:o,historyApi:t.historyApi}),u=function(t){return Object(r.useEffect)((function(){g.b.on("getFiles",(function(n){t.eventBus.notify(n.idReq,n.files)})),g.b.on("getFilesPreview",(function(n){t.eventBus.notify(n.idReq,n.filesPreview)}))}),[]),{get:function(n,cb){d.a.client.log.socket&&console.log("[CLIENT API] get files ".concat(n));var e=V("get-files-");t.statusApi.searching.set(!0),t.eventBus.subscribe(e,(function(e){t.statusApi.searching.set(!1),cb(e,n)})),g.b.emit("askForFiles",{folderPath:n,token:Object(h.b)(),idReq:e})},getPreviews:function(n,cb){var e=V("get-files-");t.eventBus.subscribe(e,cb),g.b.emit("askFilesPreview",{filesPath:n,idReq:e,token:Object(h.b)()})},search:t.searchApi.files.search}}({eventBus:o,searchApi:c,statusApi:t.statusApi}),p=E({eventBus:o}),f=Object(N.a)({eventBus:o}),b=function(t){return Object(r.useEffect)((function(){g.b.on("getFoldersScan",(function(n){t.eventBus.notify(n.idReq,{folders:n.folders,pathBase:n.pathBase})}))}),[]),{get:function(n,cb){d.a.client.log.socket&&console.log("[FOLDERS API] get folders ");var e=V("get-folders-");t.eventBus.subscribe(e,(function(t){var e=Object(O.a)({},t);e.folderPaths=n,cb(e)})),g.b.emit("askFoldersScan",{foldersPaths:n,token:Object(h.b)(),idReq:e})},move:m({eventBus:t.eventBus}).folder}}({eventBus:o}),w=function(t){return Object(r.useEffect)((function(){g.b.on("getCommandExec",(function(n){t.eventBus.notify(n.idReq,n.resultCommand)}))}),[]),{exec:function(n,cb){var e=V("command-exec-");t.eventBus.subscribe(e,(function(t){Object(i.isString)(t)||(t=JSON.stringify(t)),cb(t)})),g.b.emit("askCommandExec",{commandString:n,token:Object(h.b)(),idReq:e})}}}({eventBus:o}),j=M(),k=Object(l.d)({searchUiApi:c.ui,statusApi:t.statusApi,filesApi:u,foldersApi:b,windowApi:t.windowsApi,tabsApi:t.tabsApi,userSettingsApi:t.userSettingsApi}),y=function(t){var n=Object(r.useState)(),e=Object(x.a)(n,2),o=e[0],i=e[1];return Object(O.a)(Object(O.a)({},I.b),{},{ui:{lineJump:{jump:i,get:o}}})}(),_=Object(z.b)({}),T={cache:j,file:s,files:u,popup:t.popupApi,upload:p,ressource:f,tabs:t.tabsApi,folders:b,userSettings:t.userSettingsApi,history:t.historyApi,status:t.statusApi,note:y,analytics:_,search:c,command:w,watch:a,ui:{browser:k,windows:t.windowsApi,lightbox:t.lightboxApi,textToSpeechPopup:t.ttsApi,search:c.ui,note:y.ui}};return B=T,T},V=function(t){return"client-api-".concat(t,"-req-").concat(Object(c.a)())},G=function(t,cb){U().then((function(n){var e=t.apiName.split("."),r=n;if(Object(i.each)(e,(function(t){r=r[t]?r[t]:null})),null===r)return cb("nok",{error:'"'.concat(t.apiName,'" does not exists in current api \n\nAvailable Api properties :\n\n').concat(J("",n))});try{var a=K(r);if(!Object(i.isNumber)(a)){var c=r.apply(void 0,Object(o.a)(t.apiArguments));return cb("ok",c)}var l=Object(i.cloneDeep)(t.apiArguments);l.splice(a,0,(function(t){cb("ok",t)})),r.apply(void 0,Object(o.a)(l))}catch(s){return cb("nok",{error:'error "'.concat(JSON.stringify(s),'" when executing "').concat(t.apiName,'" with props ').concat(t.apiArguments)})}}))},K=function(t){var n=function(t){var n=t.toString().replace(T,""),e=null;return null===(e=n.startsWith("cb =>")?["cb"]:n.slice(n.indexOf("(")+1,n.indexOf(")")).match(S))&&(e=[]),e}(t),e=n.indexOf("cb");return-1===e?null:e},J=function t(n,e){var o="";for(var r in e)if("object"===typeof e[r]&&e[r].constructor!==Array){if(r.length>1&&"get"!==r){var a=""!==n?"".concat(n,"."):"";o+=t("".concat(a).concat(r),e[r])}}else o="".concat(o).concat(n,".").concat(r,"\n");var c=o.split("\n"),l=[];return U().then((function(t){Object(i.each)(c,(function(n){var e=n.split("."),o=t;Object(i.each)(e,(function(t,n){o[t]&&(o=o[t])}));var r="var",a="";Object(i.isFunction)(o)&&(r="Function",a=o.toString()),l.push({name:n,type:r,description:a})}))})),o}},13:function(t,n,e){"use strict";e.d(n,"d",(function(){return o})),e.d(n,"e",(function(){return i})),e.d(n,"b",(function(){return r})),e.d(n,"c",(function(){return a})),e.d(n,"a",(function(){return c}));var o=function(){var t,n=!1;return t=navigator.userAgent||navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4)))&&(n=!0),n},i=function(t){return"navigator"===t||"editor"===t||"preview"===t},r=function(t){return c()===t};function a(){return!!/iPad/.test(navigator.platform)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)}var c=function(){var t=window.innerWidth,n="desktop";return l()||t<1e3&&(n="tablet"),t<500&&(n="mobile"),n},l=function(){return!s()},s=function(){var t,n=!1;return t=navigator.userAgent||navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4)))&&(n=!0),n}},133:function(t,n,e){"use strict";e.d(n,"a",(function(){return c}));var o=e(268),i=e(4),r=e(10),a=e(103),c=function(){return Object(o.a)({theme:"light",settings:{background:"#ffffff",foreground:"#4D4D4C",caret:"#AEAFAD",selection:"#D6D6D6",selectionMatch:"#D6D6D6",gutterBackground:"#FFFFFF",gutterForeground:"#4D4D4C",gutterBorder:"#ddd",lineHighlight:"#fff"},styles:[{tag:i.e.comment,color:"#787b80"},{tag:i.e.definition(i.e.typeName),color:"#194a7b"},{tag:i.e.typeName,color:"#194a7b"},{tag:i.e.tagName,color:"#008a02"},{tag:i.e.variableName,color:"#1a00db"},{tag:i.e.heading,color:r.a.colors.main},{tag:s.Image,color:"red",class:"tiro-image"},{tag:a.b.LatexMdEl,class:"cm-mdpreview-latex-code mdpreview-source"},{tag:i.e.heading1,class:"actionable-title h1"},{tag:i.e.heading2,class:"actionable-title h2"},{tag:i.e.heading3,class:"actionable-title h3"},{tag:i.e.heading4,class:"actionable-title h4"},{tag:i.e.heading5,class:"actionable-title h5"},{tag:i.e.heading6,class:"actionable-title h6"},{tag:i.e.content,fontSize:"10px"}]})},l={ImageTwo:i.a.define()},s=(Object(i.c)({ImageTwo:l.ImageTwo,"Strikethrough/...":l.ImageTwo}),{ListItem:i.a.define(),headingMark:i.a.define(),LinkReference:i.a.define(),Image:i.a.define(),LinkTitle:i.a.define(),LinkLabel:i.a.define(),Link:i.a.define(),LinkMark:i.a.define(),BulletList:i.a.define()});Object(i.c)({LinkReference:s.LinkReference,ListItem:s.ListItem,Link:s.Link,Image:s.Image,LinkTitle:s.LinkTitle,LinkLabel:s.LinkLabel,LinkMark:s.LinkMark,BulletList:s.BulletList})},134:function(t,n,e){"use strict";e.d(n,"b",(function(){return f})),e.d(n,"a",(function(){return g}));e(0);var o=e(46),i=e(28),r=e(37),a=e(56),c=e(24),l=e(22),s=e(8),u=e(12),d=e(73),p=e(1),f=function(t){return Object(a.a)({pattern:i.a.image,replacement:function(n){var e=document.createElement("div"),i=n[0],a='<div class="mdpreview-source">'.concat(i,"</div>"),s="".concat(Object(r.a)(t.folder),"/").concat(n[1]);e.classList.add("cm-mdpreview-wrapper"),e.classList.add("image-wrapper");Object(o.renderToString)(Object(p.d)(c.a,{name:"faExpand",color:"white"}));return e.innerHTML='<div class="cm-mdpreview-image" data-src='.concat(s,'> <img onerror="this.style.display=\'none\'" src="').concat(s+Object(l.c)(),'" /></div>').concat(a),b(),e}})},b=function(){setTimeout((function(){Object(d.a)(".cm-mdpreview-image",(function(t){var n;if(t){var e=null===(n=t.parentNode.querySelector("img"))||void 0===n?void 0:n.src;Object(s.isString)(e)&&e.startsWith("http")&&(e=e.replace(Object(l.c)(),""),Object(u.d)((function(t){t.ui.lightbox.open(0,[e])})))}}))}),10)},g=function(){return"\n.cm-mdpreview-wrapper.image-wrapper {\n\t\t.cm-mdpreview-image {\n\t\t\tcursor:pointer;\n\t\t}\n\t\t.mdpreview-source {\n\t\t\t\tline-height: initial;\n\t\t}\n}\n\n"}},135:function(t,n,e){"use strict";e.d(n,"a",(function(){return a})),e.d(n,"b",(function(){return c}));e(0);var o=e(10),i=e(31),r=e(1),a=function(t){return Object(r.d)("div",null,Object(r.d)(i.a,{class:"mobile-text-manip-toolbar",colors:[o.a.colors.editor.mobileToolbar.font,o.a.colors.editor.mobileToolbar.font],buttons:[{icon:"faAngleLeft",action:function(){return t.onButtonClicked("<-")}},{icon:"faAngleRight",action:function(){return t.onButtonClicked("->")}},{icon:"faCheckSquare",action:function(){return t.onButtonClicked("[x]")}},{icon:"faAngleUp",action:function(){return t.onButtonClicked("^")}},{icon:"faAngleDown",action:function(){return t.onButtonClicked("v")}},{icon:"faEraser",action:function(){return t.onButtonClicked("X")}},{icon:"faClone",action:function(){return t.onButtonClicked("C")}}]}))},c=function(){return"\n .mobile-text-manip-toolbar {\n position: fixed;\n bottom: ".concat(o.a.sizes.mobile.editorBar+10,"px;\n display: flex;\n list-style: none;\n width: 100%;\n padding: 0px;\n align-content: center;\n justify-content: center;\n align-items: center;\n height: ").concat(o.a.sizes.mobile.editorBar,"px;\n background: ").concat(o.a.colors.editor.mobileToolbar.bg,";\n li {\n flex: 1 1 auto;\n justify-content: center;\n display: flex;\n }\n }\n")}},136:function(t,n,e){"use strict";e.d(n,"a",(function(){return l})),e.d(n,"b",(function(){return s}));var o=e(9),i=e(0),r=e(10),a=e(24),c=e(1),l=function(t){var n=Object(i.useState)(!1),e=Object(o.a)(n,2),l=(e[0],e[1],t.dir?t.dir:"left"),s=t.maxHeight?t.maxHeight:50;return Object(c.d)("div",{className:"dropdown-wrapper ".concat(l," ").concat(t.hover?"hover-active":"")},Object(c.d)("span",{onMouseEnter:function(){},onClick:function(){},className:"context-menu-wrapper"},Object(c.d)("div",{className:"dropdown-icon"},Object(c.d)(a.a,{name:"faEllipsisH",color:r.a.colors.l1.font})),Object(c.d)("div",{className:"context-menu",style:{maxHeight:s}},t.children)))},s=function(){return"\n.dropdown-wrapper {\n\t\t\n\t\tposition: relative;\n\t\t&.hover-active:hover {\n\t\t\t\t.context-menu {\n\t\t\t\t\t\topacity: 1;\n\t\t\t\t\t\tpointer-events: all;\n\t\t\t\t}\n\t\t\t\t.dropdown-icon {\n\t\t\t\t\t\tsvg {\n\t\t\t\t\t\t\t\tcolor: ".concat(r.a.colors.main,";\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n\n\t\t.dropdown-icon {\n\t\t\t\tposition: absolute;\n\t\t\t\tpadding: 10px;\n\t\t\t\ttop: -10px;\n\t\t\t\tsvg {\n\t\t\t\t\t\tcolor: #d4d1d1;\n\t\t\t\t}\n\t\t}\n\n\t\t.context-menu {\n\t\t\t\toverflow-y: scroll;\n\t\t\t\tz-index: 100;\n\t\t\t\tright: 10px;\n\t\t\t\ttop: 20px;\n\t\t\t\tpointer-events: none;\n\n\n\t\t\t\ttransition: 0.2s all;\n\t\t\t\ttransition-delay: 0.2s, 0s;\n\t\t\t\tposition: absolute;\n\t\t\t\topacity: 0;\n\n\t\t\t\tmin-width: 140px;\n\t\t\t\tpadding: 10px;\n\t\t\t\tborder-radius: 5px;\n\t\t\t\tbackground: white;\n\t\t\t\tbox-shadow: 0px 0px 5px rgba(0,0,0,.2);\n\t\t}\t\n\n\t\t&.right {\n\t\t\t\t.dropdown-icon {\n\t\t\t\t\t\tright: 0px;\n\t\t\t\t}\n\t\t}\n}\n")}},137:function(t,n,e){"use strict";e.d(n,"a",(function(){return a})),e.d(n,"b",(function(){return c}));var o=e(0),i=e.n(o),r=e(1),a=function(t){var n=t.progress,e=n>=0&&n<100;return Object(r.d)(i.a.Fragment,null,e&&Object(r.d)("div",{className:"upload-progress-bar-wrapper"},Object(r.d)("div",{className:"bg-fill",style:{width:"".concat(n,"%")}}),Object(r.d)("div",{className:"label"},n,"% uploaded... ")))},c=function(){return"\n.device-mobile {\n\t\t.upload-progress-bar-wrapper {\n\t\t\t\tbottom: 176px;\n\t\t}\n}\n.upload-progress-bar-wrapper {\n\t\t.label {\n\t\t\t\tposition: relative;\n\t\t}\n\t\t.bg-fill {\n\t\t\t\ttransition: 0.1s all;\n\t\t\t\tposition:absolute;\n\t\t\t\tbackground: #077e00;\n\t\t\t\theight: 100%;\n\t\t\t\ttop: 0px;\n\t\t\t\tleft: 0px;\n\t\t}\n\t\tposition:absolute;\n\t\tbottom: 0px;\n\t\twidth: 100%;\n\t\tleft: 0px;\n\t\t/* background: green; */\n\t\tbackground: #a0a0a0;\n\t\tcolor: white;\n\t\ttext-align: center;\n\t\tz-index:3;\n\t\tfont-size: 9px;\n\t\tpadding: 5px;\n}\n"}},138:function(t,n,e){"use strict";e.d(n,"a",(function(){return i}));var o=e(269),i=function(t){return t||(t=0),Object(o.isNumber)(t)?t+1:0}},139:function(t,n,e){"use strict";e.d(n,"b",(function(){return a})),e.d(n,"a",(function(){return c}));var o=e(9),i=e(8),r=e(0),a=function(){var t=Object(r.useState)(!1),n=Object(o.a)(t,2),e=n[0],a=n[1],c=Object(r.useRef)(0);return Object(r.useEffect)((function(){var t=Object(i.debounce)((function(){c.current=c.current+1,a(!0),setTimeout((function(){a(!1)}),200)}),200);return window.addEventListener("resize",(function(){t()})),function(){window.removeEventListener("resize",(function(){t()}))}}),[]),{resizeState:e,resizeCount:c}},c=function(t){var n=Object(r.useState)(!1),e=Object(o.a)(n,2),a=e[0],c=e[1];return Object(r.useEffect)((function(){var n=Object(i.debounce)((function(){c(!0),setTimeout((function(){c(!1)}),200)}),200),e=document.querySelector(t);if(e){var o=new ResizeObserver((function(t){n()}));return o.observe(e),function(){o.disconnect()}}}),[]),{resizeState:a}}},140:function(t,n,e){"use strict";e.d(n,"a",(function(){return r})),e.d(n,"b",(function(){return a}));e(8);var o=e(12),i="notes-view-type",r=function(t){return new Promise((function(n,e){Object(o.d)((function(e){e.cache.get(i,(function(e){if(e){var o=e[t];n(o||!1)}}))}))}))},a=function(t,n){Object(o.d)((function(e){e.cache.get(i,(function(o){o||(o={}),o[t]=n,e.cache.set(i,o,1e17)}))}))}},141:function(t,n,e){"use strict";e.d(n,"a",(function(){return u})),e.d(n,"b",(function(){return d}));var o=e(3),i=e(9),r=e(0),a=e(111),c=e.n(a),l=e(48),s=e(1),u=function(t){var n=Object(r.useState)(0),e=Object(i.a)(n,2),a=e[0],u=e[1],d=Object(r.useRef)(null),p=Object(r.useRef)(null),f=function(){var t={maxY:0,y:0,percent:0},n=p.current?p.current:null,e=d.current?d.current:null;if(!e||!n)return t;var o=e.getBoundingClientRect().height,i=n.getBoundingClientRect().y;return t.maxY=n.getBoundingClientRect().height-o,t.y=e.getBoundingClientRect().y-i,t.percent=t.y/t.maxY*100,t};Object(r.useEffect)((function(){var n=p.current?p.current:null;if(n){var e=new MutationObserver((function(n,e){var i,r=Object(o.a)(n);try{for(r.s();!(i=r.n()).done;){if("data-scroll-refresh"===i.value.attributeName){var a=l.a.getScrollObj(t.windowId),c=a.dims.scroller.viewport;c<20&&(c=20),m(c);var s=(a.dims.scroller.full-a.dims.scroller.viewport)/100,d=a.posPercent*s;u(d)}}}catch(p){r.e(p)}finally{r.f()}}));return e.observe(n,{attributes:!0}),function(){e.disconnect()}}}),[]);var b=Object(r.useState)(0),g=Object(i.a)(b,2),h=g[0],m=g[1];return Object(s.d)("div",{className:"scrolling-bar-wrapper",ref:p},Object(s.d)(c.a,{onDrag:function(n){l.a.onScrollerScroll(t.windowId,f().percent)},onStop:function(){u(f().y)},position:{x:0,y:a},axis:"y",bounds:"parent"},Object(s.d)("div",{ref:d,style:{height:"".concat(h,"px")},className:"scrolling-bar"})))},d=function(){return"\n.view-editor .scrolling-bar-wrapper {\n}\n\n.scrolling-bar-wrapper {\n\t\toverflow: hidden;\n\t\tposition: absolute;\n\t\ttop: 33px;\n\t\theight: calc(100% - 53px);\n\t\tbackground: rgb(226,226,226);\n\t\twidth: 10px;\n\t\tright: 0px;\n\t\tposition: absolute;\n\n\t\t.scrolling-bar {\n\t\t\t\tcursor: ns-resize;\n\t\t\t\tbackground: #cdcccc;\n\t\t\t\theight: 20px;\n\n\t\t}\n}\n"}},142:function(t,n,e){"use strict";e.d(n,"b",(function(){return o})),e.d(n,"a",(function(){return i}));var o=function(t){var n=function(n){r(n,(function(n){n&&t.onImagePasted(n)}))};window.addEventListener("paste",n,!1);return function(){window.removeEventListener("paste",n,!1)}},i=function(t){var n=t.value;navigator&&navigator.clipboard&&navigator.clipboard.writeText(n).then((function(){console.log("Text copied to clipboard...")})).catch((function(t){console.log("Something went wrong",t)}))},r=function(t,n){0==t.clipboardData&&"function"==typeof n&&n(void 0);var e=t.clipboardData.items;void 0==e&&"function"==typeof n&&n(void 0);for(var o=0;o<e.length;o++)if(-1!=e[o].type.indexOf("image")){console.log("[PASTE] informations on files pasted : ",t,e,e.length);var i=e[o].getAsFile();"function"==typeof n&&n(i)}}},143:function(t,n,e){"use strict";e.d(n,"a",(function(){return h}));var o=e(9),i=e(8),r=e(0),a=e(40),c=e(18),l=e(16),s=e(10),u=e(22),d=e(33),p=e(65),f={ui_sidebar:!0,ui_filesList_sortMode:2,ui_layout_colors_main:"#E86666",ui_editor_markdown_preview:!0,ui_editor_links_as_button:!0,ui_editor_markdown_table_preview:!0},b="[USER SETTINGS] :",g=c.a.client.log.verbose,h=function(){var t=Object(p.a)("user-settings",{}),n=Object(o.a)(t,3),e=n[0],c=n[1],h=n[2],m=Object(r.useState)(0),v=Object(o.a)(m,2),w=v[0],O=v[1],x=Object(r.useRef)([]);Object(r.useEffect)((function(){j()}),[e]);var j=Object(d.a)((function(){g&&console.log(b,"UPDATE!",e,w),function(t,n,o){x.current[t]||(x.current[t]=n[o]);var r=e[t];Object(i.isNull)(r)||Object(i.isUndefined)(r)||(""===r&&x.current[t]&&(r=x.current[t]),n[o]=r)}("ui_layout_colors_main",s.a.colors,"main"),O(w+1)}),1e3),k=function(t,n){l.b.emit("updateSetupJson",{paramName:t,paramValue:n,token:Object(u.b)(),idReq:"updateSetupJson-".concat(Object(a.a)())})};return{userSettings:e,userSettingsApi:{updateSetupJson:k,set:function(t,n,o){o||(o={}),o.writeInSetupJson||(o.writeInSetupJson=!1),o.writeInSetupJson&&k(t,"".concat(n)),g&&console.log(b,"updateUserSettings ".concat(t," to ").concat(n));var r=Object(i.cloneDeep)(e);r[t]=n,c(r)},get:function(t){var n=f[t],o=n;return t in e&&(o=e[t]),""===o&&(o=n),o},list:function(){var t=[];return Object(i.each)(e,(function(n,e){var o=e;t.push({key:o,val:n})})),t},refresh:{css:{get:w}}},refreshUserSettingsFromBackend:h}}},144:function(t,n,e){"use strict";e.d(n,"b",(function(){return o})),e.d(n,"a",(function(){return i}));e(8),e(32),e(13);var o=function(t){var n="",e=0;for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&t[o]&&(n+="".concat(0===e?"":"&").concat(o.toLowerCase(),"=").concat(t[o]),e++);return n},i=function(t){try{var n=new XMLHttpRequest;return n.open("HEAD",t.url,!1),n.send(),404!==n.status?t.onSuccess():t.onFail()}catch(e){t.onFail(e)}}},145:function(t,n,e){"use strict";e.d(n,"a",(function(){return H})),e.d(n,"b",(function(){return W}));var o=e(0),i=e.n(o),r=e(149),a=e(272),c=e(34),l=e(11),s=e(275),u=e(10),d=e(48),p=e(13),f=e(139),b=e(51),g=e(133),h=e(8),m=e(18),v=e(12),w=e(58),O=(m.a.client.log.verbose,function(t,n,e,o,i){return{label:t,apply:n||t,info:e,detail:i,type:"tag",boost:o||0}}),x=function(t){var n=k(t);return[y,n,j]},j=function(t){var n=t.matchBefore(/\-\-/);if(!t.explicit&&!n)return null;var e="".concat(m.a.path.configFolder,"/snippets.md");return new Promise((function(o,i){Object(v.d)((function(i){i.file.getContent(e,(function(e){var i=[],r=e.split("\n");Object(h.each)(r,(function(t){var n,e=(t=t.split("\\n").join("\n")).split("|"),o=null===(n=e.shift())||void 0===n?void 0:n.trim(),r=e.join("|").trim();if(r&&o){if(o="--"+o,r.includes("${")){var a=r;try{r=new Function("return `"+a+"`")()}catch(l){console.warn("[Code Mirror]","snippets error: ",l,a)}}var c=r.length>20?"".concat(r.substring(0,20),"..."):r;i.push(O(o,r,void 0,void 0,c))}}));var a={from:n?n.from:t.pos,options:i,validFor:/.*/};o(a)}))}))}))},k=function(t){return function(n){var e=n.matchBefore(/\#/);return n.explicit||e?new Promise((function(o,i){Object(v.d)((function(i){var r=Object(w.b)(Object(w.b)(t.folder));i.search.hashtags(r,(function(t){var i=[];Object(h.each)(t.nodesArr,(function(t){i.push(O(t.name,t.name))}));var r={from:e?e.from:n.pos,options:i,validFor:/.*/};o(r)}))}))})):null}},y=function(t){var n=t.matchBefore(/\[\[/);return t.explicit||n?new Promise((function(e,o){Object(v.d)((function(o){o.files.get("/.tiro/tags",(function(t){var n=[],e=0;Object(h.each)(t,(function(r){var a=r.name.replace(".md",""),c="[[".concat(a,"]]"),l="".concat(c," ").concat(c),s="Insert installed custom tag ".concat(c),u=0;o.file.getContent(r.path,(function(o){var r=o.split("\n"),a="// --insert:",d="// --comment:",p="// --boost:";Object(h.each)(r,(function(t){(t=t.split("\\n").join("\n")).startsWith(a)&&(l=t.replace(a,"")),t.startsWith(d)&&(s=t.replace(d,"")),t.startsWith(p)&&(u=parseInt(t.replace(p,"")))})),n.push(O(c,l,s,u)),++e===t.length&&i(n)}))}))}));var i=function(o){var i={from:n?n.from:t.pos,options:o,validFor:/.*/};e(i)}}))})):null},C=e(103),_=e(143),E=e(76),T=e(99),S=e(59),I=e(134),N=e(46),F=e(28),R=e(56),L=e(1),A={val:!1},P=A,D=Object(R.a)({pattern:/\|/gim,classWrap:function(t){return"md-table-limiter"}}),M=Object(R.a)({pattern:F.a.mdTableCell,classWrap:function(t){var n=t[0];return n&&"-"===n||n&&"-|"===n?"":"md-table-cell"}}),z="[Code Mirror]",B=m.a.client.log.verbose,U=Object(o.forwardRef)((function(t,n){var e=function(){var t=n.current;return t&&t.state?t:null},i=Object(o.useRef)(null);Object(o.useEffect)((function(){!function(){var n=e();if(window.cmobj=n,!n)return!1;if(t.value===i.current)return!1;if("loading..."===t.value)return!1;if(n.view.state.doc.toString()===t.value)return!1;var o=b.a.getCurrentLineInfos(n).currentPosition;b.a.updateText(n,t.value,o),i.current=t.value}()}),[t.value,t.forceRender]);Object(o.useEffect)((function(){if(B&&console.log(z,"JUMP to line :",t.jumpToLine),-1!==t.jumpToLine){var n=e();n&&(t.posY<=-10||b.a.scrollToLine(n,t.jumpToLine))}}),[t.jumpToLine]);Object(o.useEffect)((function(){h()}),[t.value]),Object(o.useEffect)((function(){h()}),[]);var u=Object(f.a)(".window-id-".concat(t.windowId)).resizeState;Object(o.useEffect)((function(){h()}),[u]);var p,h=function(){var n=e();if(n){var o=b.a.getEditorInfos(n.view);d.a.updateEditorDims(t.windowId,{viewport:o.viewportHeight,full:o.contentHeight}),d.a.updateScrollerDims(t.windowId)}},m=Object(C.c)({file:t.file,onTitleClick:function(n){!function(n){var o=e();if(o){var i=b.a.getCurrentLineInfos(o);B&&console.log(z,"CLICK ON TITLE DETECTED",n,i),t.onTitleClick(i.lineIndex)}}(n)}}),v=[Object(c.a)({override:x(t.file)}),l.c.domEventHandlers({scroll:function(t,n){},wheel:function(n,e){var o=b.a.getEditorInfos(e);d.a.onEditorScroll(t.windowId,o.currentPercentScrolled),t.onScroll()}})],w={base:r.markdownLanguage,codeLanguages:a.a,extensions:[]},O=!t.value.includes("--no-editor-table"),j=Object(_.a)().userSettingsApi;j.get("ui_editor_links_as_button")&&(v.push(T.c),v.push(Object(S.e)(t.windowId))),j.get("ui_editor_markdown_table_preview")&&O&&(v.push(D),v.push(M),v.push(Object(R.a)({pattern:F.a.mdTableLine,classWrap:function(t){var n=t[0].trim();n.startsWith("|")&&(n=n.substring(1)),n.endsWith("|")&&(n=n.substring(0,n.length-1));var e=n.split("|").length;return P.val=!P.val,"md-table-line md-table-".concat(e," ").concat(P.val?"even":"")}}))),j.get("ui_editor_markdown_preview")&&(v.push(m),w.extensions.push(C.a),v.push(Object(I.b)(t.file)),v.push((p=t.file,Object(R.a)({pattern:F.a.ressource,replacement:function(t){var n=t[0],e='<div class="mdpreview-source">'.concat(n,"</div>"),o=document.createElement("span"),i=Object(N.renderToString)(Object(L.d)(E.a,{markdownTag:n,file:p}));return o.innerHTML="".concat(i," ").concat(e),o}})))),v.push(Object(r.markdown)(w));var k="";return j.get("ui_editor_markdown_table_preview")&&(k+="md-table-preview-enabled"),Object(L.d)("div",{className:"codemirror-editor-wrapper ".concat(k)},Object(L.d)(s.a,{value:"",ref:n,theme:Object(g.a)(),onChange:function(n,e){n!==t.value&&(i.current=n,t.onChange(n),A.val=!1,h())},basicSetup:{foldGutter:!1,dropCursor:!1,allowMultipleSelections:!1,indentOnInput:!1,closeBrackets:!1,bracketMatching:!1,lineNumbers:!1},extensions:v}))})),H=i.a.memo(U,(function(t,n){var e=!0;return t.forceRender!==n.forceRender&&(e=!1),t.jumpToLine!==n.jumpToLine&&(e=!1),e})),W=function(){return"\n.cm-selectionLayer {\n pointer-events: none;\n\tz-index:0!important;\n}\n.cm-selectionBackground {\n\tbackground: rgba(0,0,0,0.1);\n}\n\n\n.actionable-title {\n\t\tcolor: ".concat(u.a.colors.main,";\n\t\tposition: relative;\n\t\t&:before {\n\t\t\t\tcontent: \"\u279d\";\n\t\t\t\tposition: absolute;\n\t\t\t\tright: -20px;\n\t\t\t\tcolor: #c6c6c6;\n\t\t\t\tfont-size: 18px;\n\t\t\t\topacity: 0;\n\t\t\t\ttransition: 0.2s all;\n\t\t\t\tbottom: -3px;\n\t\t}\n\t\t&:hover {\n\t\t\t\t&:before {\n\t\t\t\t\t\topacity: 1\n\t\t\t\t}\n\t\t}\n\t\t&.h1 {\n\t\t\t\tfont-size: 15px;\n\t\t\t\tfont-weight: bold;\n\t\t\t\ttext-decoration: underline;\n\n\t\t}\n\t\t&.h2 {\n\t\t\t\tfont-size: 13px;\n\t\t\t\ttext-decoration: underline;\n\n\t\t}\n\t\t&.h3 {\n\t\t\t\tfont-size: 12px;\n\t\t}\n\n}\n\n\n.cm-matchingBracket {\n\t\tbackground-color: rgba(0,0,0,0)!important;\n}\n\n\n.cm-content {\n\t\t// font-family: 'Open sans', sans-serif;\n\t\tfont-family: Consolas, monaco, monospace;\n\t\tfont-size: 11px;\n}\n\n.cm-focused {\n\t\toutline: none!important;\n}\n.main-editor-wrapper {\n\t\twidth: calc(100% + 18px);\n\t\tmargin: 32px 0px 0px 0px;\n\t\tpadding: 0px;\n\t\twidth:100%;\n\t\theight: ").concat(Object(p.b)("desktop")?"calc(100% - 32px);":"calc(100% - 180px);",'; \n}\n\n.codemirror-editor-wrapper {\n\t\tmargin-right: 18px;\n\t\twidth: calc(100% - 10px);\n}\n.codemirror-editor-wrapper, \t.cm-editor, .cm-theme {\n\t\theight: calc(100% - 30px);\n}\n.codemirror-editor-wrapper, \t.cm-editor, .cm-theme {\n\t\theight: 100% ;\n\t\toverflow:hidden;\n\t\tpadding: 0px;\n}\n.cm-editor {\n\t\tword-break: break-word;\n}\n.cm-search {\n\tpadding: 6px 10px 11px;\n}\n.cm-content {\n\t\twidth: 100%;\n\t\toverflow:hidden;\n\t\twhite-space: pre-wrap;\n}\n.cm-scroller {\n\t\tleft: 15px;\n\t\tpadding-right: 25px;\n}\n.cm-line {\n}\n.cm-cursor {\n}\n\n.cm-tooltip-autocomplete {\n\t\tpadding: 10px 5px;\n\t\tbackground: white;\n\t\tborder-radius: 5px;\n\t\tborder: none;\n\t\tbox-shadow: 0px 0px 5px rgba(0,0,0,0.3);\n\t\t[aria-selected="true"]{\n\t\t\t\tbackground: ').concat(u.a.colors.main,';\n\t\t\t\tborder-radius: 2px;\n\t\t}\n\n}\n\n.codemirror-mobile-fallback {\n\t\tmargin: 10px;\n\t\ttextarea {\n\t\t\t\twidth: calc(100% - 20px);\n\t\t\t\theight: calc(100vh - 350px);\n\t\t}\n}\n\n.test-success {\n// background: orange;\ncolor: red;\ndisplay: block;\npadding-top: 50px;\n}\n.tiro-image {\n\t\tcolor: red;\n\t\tdisplay: block;\npadding: 20px;\n}\n.tiro-image-wrapper{\n\t\tposition: relative;\n\n\t\t&:before {\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: 0px;\n\t\t\t\tleft: 50%;\n\t\t\t\tcontent: "x";\n\t\t\t\twidth: 50%;\n\t\t\t\theight: 100px;\n\t\t\t\tdisplay:block;\n\t\t\t\t// background: orange;\n\n\t\t}\n}\n\n').concat(Object(C.d)(),"\n\n// FILE RESSOURCE PREVIEW\n").concat(Object(E.b)(),"\n\n// PREVIEW LINK\n").concat(Object(S.d)(),"\n\n\n").concat(function(){for(var t="",n=0;n<30;n++){var e=Math.floor(100/n);t+="\n\t\t\t\t&.md-table-".concat(n," span.md-table-cell{\n\t\t\t\t\t\twidth: calc(").concat(e,"% - 15px);\n\t\t\t\t}")}return"\n.md-table-preview-enabled {\n\t\t.md-table-line {\n\t\t\t\t&.even {\n\t\t\t\t\t\tbackground: #e3e3e3;\n\t\t\t\t}\n\t\t\t\tdisplay: inline-flex;\n\n\t\t\t\tdisplay: block;\n\t\t\t\tbackground: #f4f4f4;\n\t\t\t\tpadding: 5px;\n\t\t\t\t".concat(t,"\n\t\t\t\tspan.md-table-cell {\n\t\t\t\t\t\tpadding-right:13px;\n\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t\t\tvertical-align: top;\n\t\t\t\t}\n\t\t\t\tspan.md-table-cell span.md-table-limiter {\n\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\ttop: 0px;\n\t\t\t\t\t\tright:0px;\n\t\t\t\t\t\tcolor: #c8c3c3;\n\t\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t}\n\t\t\t\tspan.md-table-cell>span:first-child {\n\t\t\t\t\t\twidth: 100%;\n\t\t\t\t}\n\n }\n\t\t.cm-activeLine {\n\t\t\t\t.md-table-line {\n\t\t\t\t\t\tbackground: #d9d9d9;\n\t\t\t\t\t\tspan.md-table-cell span.md-table-limiter {\n\t\t\t\t\t\t\t\tcolor: black;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n\t\t.cm-line .md-table-limiter {\n\t\t\t\tdisplay: inline;\n\t\t}\n\n}\n\t\t")}(),"\n")}},146:function(t,n,e){"use strict";e.d(n,"a",(function(){return m})),e.d(n,"b",(function(){return v}));var o=e(9),i=e(21),r=e(77),a=e(8),c=e(0),l=e.n(c),s=e(12),u=e(98),d=e(142),p=e(32),f=e(17),b=e(79),g=e(1);var h={upload:{uploadCounter:0,reinit:function(){}},file:{onTitleUpdate:function(t,n){},onFileDelete:function(t){}}},m=l.a.createContext(h),v=function(t){var n=Object(i.a)({},t).tab,e=Object(c.useContext)(s.a),r=Object(c.useState)(h),l=Object(o.a)(r,2),v=l[0],O=l[1],x=function(){var t=Object(c.useContext)(s.a),n=Object(c.useState)({name:"",data:{}}),e=Object(o.a)(n,2),i=e[0],r=e[1],a=Object(c.useRef)({});return Object(c.useEffect)((function(){if(t){var cb=a.current[i.name];cb&&cb(t,i.data)}}),[i]),{onNextStateTrigger:function(t){r(t)},addNextStateAction:function(t,cb){a.current[t]=cb}}}(),j=x.onNextStateTrigger,k=x.addNextStateAction;k("refreshFolderList",(function(t,n){var e=t.ui.browser.folders.current.get;e===n.folder&&(t.ui.browser.goTo(e,n.name,{openIn:"activeWindow"}),j({name:"checkIfNoWindows"}))})),k("checkIfNoWindows",(function(t){0===n.grid.content.length&&t.tabs.close(n.id)}));var y=Object(a.cloneDeep)(v);return y.file.onFileDelete=function(t){e&&e.popup.confirm("".concat(f.a.trashNote),(function(){e.file.delete(t,(function(n){e.ui.windows.getIdsFromFile(t.path),n[n.length-1];var o=n[0];Object(a.each)(n,(function(t){t.modified&&o.modified&&t.modified>o.modified&&(o=t)})),j({name:"refreshFolderList",data:o})}))}))},y.file.onTitleUpdate=function(t,n){e&&e.file.move(t,n,(function(o){var i=null;if(Object(a.each)(o,(function(t){t.path===n&&(i=t)})),i){var r=e.ui.windows.getIdsFromFile(t);e.ui.windows.updateWindows(r,i),j({name:"refreshFolderList",data:i})}}))},y.upload.reinit=function(){var t=Object(a.cloneDeep)(v);delete t.upload.file,O(t)},Object(c.useEffect)((function(){var t=function(t){var o,i=null===(o=Object(u.b)(n))||void 0===o?void 0:o.file;i&&e&&e.upload.uploadFile({file:t,folderPath:i.folder,onSuccess:function(t){var n=Object(a.cloneDeep)(v);n.upload.uploadCounter=n.upload.uploadCounter+1,n.upload.file=t,delete n.upload.progress,O(n)},onProgress:function(t){var n=Object(a.cloneDeep)(v);delete n.upload.file,n.upload.progress=t,O(n)}})},o=function(t){var n=function(n){if(n.preventDefault(),n.dataTransfer&&n.dataTransfer.items){var e=n.dataTransfer.items;if(!e[0])return;for(var o=0;o<e.length;o++)t.onDropped(e[o].getAsFile())}},e=function(t){t.preventDefault(),o()},o=Object(a.debounce)((function(){t.onDragEnd()}),100);return p.a.log.upload&&console.log("[UPLOAD] reinit drag/drop events"),window.addEventListener("drop",n),window.addEventListener("dragover",e),function(){window.removeEventListener("drop",n),window.removeEventListener("dragover",e)}}({onDropped:t,onDragEnd:function(){console.log("003442 onDragEnd")}}),i=Object(d.b)({onImagePasted:t});return function(){i(),o()}}),[t.tab]),Object(g.d)(w,null,Object(g.d)("div",{className:"window-grid-wrapper"},Object(g.d)(m.Provider,{value:y},Object(g.d)(b.a,{refresh:n.refresh||0,grid:n.grid,onGridUpdate:t.onGridUpdate}))))},w=Object(r.a)("div",{target:"ejnwhwz0"})({name:"zk0z9r",styles:"height:100%;.window-grid-wrapper{height:100%;}"})},148:function(t,n,e){"use strict";e.d(n,"b",(function(){return p})),e.d(n,"a",(function(){return f}));var o=e(9),i=e(0),r=e.n(i),a=e(33),c=e(13),l=e(10),s=e(24),u=e(1),d=function(t){var n=Object(i.useState)(""),e=Object(o.a)(n,2),r=e[0],d=e[1],p=Object(i.useState)(!1),f=Object(o.a)(p,2),b=f[0],g=f[1];Object(i.useEffect)((function(){d(t.title),g(!1)}),[t.title]);Object(a.a)((function(n){0!==n.length&&"mobile"===Object(c.a)()&&(g(!1),t.onEdited(t.title,r))}),1e3);return Object(u.d)("div",{className:"title-input-wrapper"},Object(u.d)("input",{className:"big-title",type:"text",value:r,onChange:function(t){var n=function(t){return t.replace(/[^\w\s\_\-]/gi,"")}(t.target.value);d(n),g(!0)},onKeyDown:function(n){if("Enter"===n.key){if(r.length<3)return;t.onEdited(t.title,r),g(!1)}}}),b&&Object(u.d)("div",{className:"press-to-save"},Object(u.d)(s.a,{name:"faCircle",color:l.a.colors.main,size:.7})),b&&"mobile"===Object(c.a)()&&Object(u.d)("button",{className:"buttonSaveTitleMobile",onClick:function(){0!==r.length&&(g(!1),t.onEdited(t.title,r))}}," Save "))},p=function(){return"\n.buttonSaveTitleMobile {\n\t\tposition: relative;\n\t\tright: 20px;\n\n\n}\n"},f=r.a.memo(d,(function(t,n){var e=!1;return t.title!==n.title&&(e=!1),e}))},16:function(t,n,e){"use strict";e.d(n,"a",(function(){return o})),e.d(n,"b",(function(){return i})),e.d(n,"c",(function(){return p})),e.d(n,"d",(function(){return f}));var o,i,r=e(21),a=e(26),c=e(8),l=e(264),s=e(72),u=e(32),d=e(17),p=function(){var t=u.a.global.protocol,n=Object(s.b)("backend-port")?":".concat(Object(s.b)("backend-port")):"".concat(u.a.global.port),e="".concat(t).concat(u.a.global.url).concat(n);return Object(s.b)("backend-port").includes(".")&&(e="".concat(t).concat(Object(s.b)("backend-port"))),e},f=function(){return new Promise((function(t,n){o||(o=l(p()),u.a.log.socket&&console.log("[SOCKET] try connecting to ".concat(p(),"...")),(i=g(o)).on("connectionSuccess",(function(n){u.a.log.socket&&console.log("[SOCKET] connection successful!, socket.connected :".concat(o.connected),n),n.isRgGood||alert(d.a.rgNotWorking),t({socket:o,ipsServer:n.ipsServer,socketManager:i})})))}))},b=function(t,n){return["%c [CLIENT SOCKET 2] ".concat(t),"background: #ccc; color: red",n||null]},g=function(t){var n={};return{on:function(e,o){var i=function(t,n){return function(e){var o;u.a.log.socket&&(o=console).log.apply(o,Object(a.a)(b("<== ON ".concat(t," "),Object(r.a)({},e)))),n(e)}}(e,o),l=Object(c.random)(1,1e8);return n[l]={endpoint:e,apiFn:i},t.on(e,i),l},off:function(e){n[e]&&(t.off(n[e].endpoint,n[e].apiFn),delete n[e])},emit:function(n,e){var o;u.a.log.socket&&(o=console).log.apply(o,Object(a.a)(b("==> EMIT ".concat(n," "),Object(r.a)({},e)))),t.emit(n,e)}}}},17:function(t,n,e){"use strict";e.d(n,"a",(function(){return o}));var o=e(18).a.strings},18:function(t,n,e){"use strict";e.d(n,"a",(function(){return o}));var o={tokenRefreshInHours:96,path:{staticResources:"static",defaultDataFolder:"markdown-notes",configFolder:".tiro",backendStateFolder:".states",cacheFolder:"cache",historyFolder:".history",archiveFolder:".history_archive",uploadFolder:".resources",relativeUploadFolderName:".resources"},metas:{headerStart:"=== HEADER ===",headerEnd:"=== END HEADER ==="},strings:{folders:"Folders",files:"files",images:"images",trashNote:"Are you sure to trash that note?",clickHereDisconnected:"(click here if persist)",searchingLabel:"searching...",lastNotes:"Last Notes",newNote:"New Note",dateModified:"Modified :",dateCreated:"Created :",searchPlaceholder:"Search Note",hoursAgo:" hours ago",daysAgo:" days ago",minsAgo:" mins ago",months:["January","February","March","April","May","June","July","August","September","October","November","December"],createFolder:"Create folder",createFolderPrompt:"New Folder name to create in",renameFolder:"Rename folder",renameFolderPrompt:"Rename folder to :",deleteFolder:"Delete folder",deleteFolderPrompt:"Are you sure you want to delete the folder and all its notes (no recovery possible) : ",deleteTabPrompt:"Are you sure you want to delete that tab? : ",moveToTrash:"Move to trash",moveToTrashPrompt:"Are you sure you want move folder in .tiro/.trash : ",loadingFolder:"loading...",moveFolderPrompt:"move folder",setupForm:{title:"Login to Tiro",introText:"Welcome to Tiro, please fill these informations to get started",user:"user",password:"password",dataFolder:"folder path",userExplanation:"should have > 3 chars",passwordExplanation:"should have > 3 chars",folderExplanation:"relative from Tiro folder installation (../data for example)",successReload:"Configuration file successfully written, reloading application...",submit:"login",noFolder1:"folder path",noFolder2:"doesn't exists, please create it or choose another folder (no data will be deleted)."},appviews:{image:"Switch to Gallery View",text:"Switch to Files View"},loginForm:{wrongUserPassword:"Wrong login/password",wrongToken:"Authentication expired, please log again"},passwordForm:{explanation:"please enter your password",submit:"submit"},editorBar:{tts:"Text to speech",explanation:{history:"File history"},lightbox:"Show Images"},ttsPopup:{title:"Text to speech",voice:"Voice"},settingsPopup:{title:"Tiro Settings",backend:{title:"Server settings",explanation:"Only fill if server is on another port/protocol than the client (usually in development)",protocol:"Https",protocolExpl:"https or http",port:"Backend Port or URL",portExpl:'Port/Url used by backend (ex: "3023" or "backend.myurl.com" or "backend.url.com:3023")'}},historyPopup:{title:"Versions for ",thead:{date:"date",name:"version"}},rgNotWorking:"ERROR: Tiro requires Ripgrep to be working, it seems that ripgrep (rg command) is either not installed or not functionning correctly on you computer. To install it, follow these instructions : https://github.com/BurntSushi/ripgrep#installation",promptPopup:{defaultTitle:"User Prompt",confirmTitle:"Confirm",accept:"Ok",refuse:"Cancel"},tabs:{newTab:"New Tab"}},server:{log:{socket:!1,verbose:!1,fs:!1,ripgrep:!1}},client:{log:{verbose:!1,socket:!1,upload:!1,iframe:!1,eventManager:!1},version:"0.30.97",params:{previewArea:{scrollSpeed:1.3}}},dev:{disableLogin:!1}}},22:function(t,n,e){"use strict";e.d(n,"b",(function(){return p})),e.d(n,"c",(function(){return f})),e.d(n,"a",(function(){return g})),e.d(n,"d",(function(){return h}));var o=e(9),i=e(0),r=e.n(i),a=e(18),c=e(45),l=e(44),s=e(16),u=e(17),d=e(1),p=function(){var t=function(t){var n,e="; ".concat(document.cookie).split("; ".concat(t,"="));return 2===e.length?null===(n=e.pop())||void 0===n?void 0:n.split(";").shift():void 0}("tiro-login-token");return t||""},f=function(){return"?token=".concat(p())},b=function(t){!function(t,n,e){var o=new Date;o.setTime(o.getTime()+60*e*60*1e3);var i="expires="+o.toUTCString();document.cookie=t+"="+n+";"+i+";path=/"}("tiro-login-token",t,a.a.tokenRefreshInHours)},g=function(){b("")},h=function(t){var n=Object(i.useState)(!1),e=Object(o.a)(n,2),a=e[0],f=e[1],g=Object(i.useState)(""),h=Object(o.a)(g,2),m=h[0],v=h[1],w=Object(i.useState)(""),O=Object(o.a)(w,2),x=O[0],j=O[1],k=Object(i.useState)(),y=Object(o.a)(k,2),C=y[0],_=y[1],E=Object(i.useRef)(0);Object(i.useEffect)((function(){return E.current=s.b.on("getLoginInfos",(function(n){switch(n.code){case"SUCCESS":if(!n.token)return;b(n.token),f(!1),t.onLoginSuccess();break;case"WRONG_TOKEN":f(!0),_(["error",u.a.loginForm.wrongToken]);var e=n.loginInfos;null!==e&&void 0!==e&&e.demo_mode&&(v("viewer"),j(e.viewer_password)),t.onLoginAsked();break;case"WRONG_USER_PASSWORD":_(["error",u.a.loginForm.wrongUserPassword]),f(!0)}})),function(){s.b.off(E.current)}}),[]);var T=function(){_(void 0),s.b.emit("sendLoginInfos",{user:m,password:x,token:p()})},S=Object(i.useState)(1),I=Object(o.a)(S,2),N=I[0],F=I[1];return{displayLoginPopup:a,LoginPopupComponent:function(t){return Object(d.d)(r.a.Fragment,null,a&&Object(d.d)("div",{className:"setup-popup-component"},Object(d.d)(l.a,{title:u.a.setupForm.title,onClose:function(){}},Object(d.d)("div",null,Object(d.d)(c.a,{shouldFocus:1===N,value:m,onEnterPressed:function(){F(2)},label:u.a.setupForm.user,onChange:function(t){v(t)}}),Object(d.d)(c.a,{shouldFocus:2===N,value:x,label:u.a.setupForm.password,type:"password",onEnterPressed:function(){T()},onChange:function(t){j(t)}}),Object(d.d)("button",{value:"submit",className:"submit-button",onClick:function(t){T()}},u.a.setupForm.submit),C&&Object(d.d)("div",{className:C[0]},C[1])))))}}}},24:function(t,n,e){"use strict";e.d(n,"a",(function(){return f}));var o=e(5),i=e(6),r=e(15),a=e(20),c=e(0),l=e.n(c),s=e(266),u=e(267),d=e(1),p=function(t){Object(r.a)(e,t);var n=Object(a.a)(e);function e(){var t;Object(o.a)(this,e);for(var i=arguments.length,r=new Array(i),a=0;a<i;a++)r[a]=arguments[a];return(t=n.call.apply(n,[this].concat(r))).size=t.props.size?t.props.size:1,t.isLocal=!t.props.name.startsWith("fa"),t}return Object(i.a)(e,[{key:"render",value:function(){return Object(d.d)("span",{style:{transform:"scale(".concat(this.size,")"),display:"inline-block"}},!this.isLocal&&Object(d.d)(s.a,{icon:u[this.props.name],color:this.props.color||"black",size:"1x"}),this.isLocal&&Object(d.d)("span",{style:{transform:"scale(".concat(this.size,")"),display:"inline-block",width:"20px",height:"20px",background:"url('".concat(this.props.name,"')"),backgroundSize:"contain",backgroundRepeat:"no-repeat"}}))}}]),e}(l.a.Component),f=l.a.memo(p,(function(t,n){return JSON.stringify(t)===JSON.stringify(n)}))},273:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return useRessourceApi}));var _home_ubuntu_Desktop_Dev_tiro_client_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(21),react__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(0),react__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__),_shared_helpers_id_helper__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(40),_shared_shared_config__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(18),_managers_sockets_socket_manager__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(16),_app_loginToken_hook__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(22),_api_hook__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(12),_managers_url_manager__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(144),_shared_helpers_filename_helper__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(49),h="[RESSOURCE API] ",useRessourceApi=function useRessourceApi(p){var _p=Object(_home_ubuntu_Desktop_Dev_tiro_client_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__.a)({},p),eventBus=_p.eventBus;Object(react__WEBPACK_IMPORTED_MODULE_1__.useEffect)((function(){_managers_sockets_socket_manager__WEBPACK_IMPORTED_MODULE_4__.b.on("getRessourceApiAnswer",(function(t){eventBus.notify(t.idReq,t)}))}),[]);var deleteRessource=function(t,cb){var n=Object(_api_hook__WEBPACK_IMPORTED_MODULE_6__.c)("delete-ressource");console.log("".concat(h," delete ressource ").concat(t)),p.eventBus.subscribe(n,cb),_managers_sockets_socket_manager__WEBPACK_IMPORTED_MODULE_4__.b.emit("askRessourceDelete",{path:t,idReq:n,token:Object(_app_loginToken_hook__WEBPACK_IMPORTED_MODULE_5__.b)()})},downloadRessource=function(t,n,cb){var e=Object(_api_hook__WEBPACK_IMPORTED_MODULE_6__.c)("download-ressource");p.eventBus.subscribe(e,cb),_managers_sockets_socket_manager__WEBPACK_IMPORTED_MODULE_4__.b.emit("askRessourceDownload",{url:t,folder:n,idReq:e,token:Object(_app_loginToken_hook__WEBPACK_IMPORTED_MODULE_5__.b)()})},fetchRessource=function(t,cb,n){n||(n={}),n.disableCache||(n.disableCache=!1);var e="/.tiro/cache/fetch/",o="/".concat(_shared_shared_config__WEBPACK_IMPORTED_MODULE_3__.a.path.staticResources,"/").concat(e).concat(Object(_shared_helpers_id_helper__WEBPACK_IMPORTED_MODULE_2__.b)(t),"?token=").concat(Object(_app_loginToken_hook__WEBPACK_IMPORTED_MODULE_5__.b)());o=Object(_shared_helpers_filename_helper__WEBPACK_IMPORTED_MODULE_8__.b)("".concat(Object(_managers_sockets_socket_manager__WEBPACK_IMPORTED_MODULE_4__.c)()).concat(o)),console.log("".concat(h," FETCHING ressource url ").concat(t," "),{url:t,options:n,staticPath:o});var i=function(){fetch(o).then((function(t){return t.text()})).then((function(t){cb(t)}))},r=function(){downloadRessource(t,e,(function(t){t.message&&i()}))};!0===n.disableCache?r():Object(_managers_url_manager__WEBPACK_IMPORTED_MODULE_7__.a)({url:o,onSuccess:function(){console.log("".concat(h," FETCHING => getting CACHED file"),{url:t,options:n}),i()},onFail:function(){r()}})},fetchUrlArticle=function fetchUrlArticle(url,cb,options){var readabilityUrl="https://cdn.jsdelivr.net/npm/moz-readability@0.2.1/Readability.js";fetchRessource(readabilityUrl,(function(readabilityTxt){var r1=eval(readabilityTxt);fetchRessource(url,(function(t){var n=document.implementation.createHTMLDocument("");n.open(),n.write(t),n.close();var e=new r1(n).parse(),o=(null===e||void 0===e?void 0:e.textContent.replaceAll(" ","\n"))||"";o=(o=(o=(o=o.replaceAll(" ","\n")).replaceAll(" ","\n")).replaceAll(" ","\n")).replaceAll(" ","\n");var i=(null===e||void 0===e?void 0:e.content)||"",r=(null===e||void 0===e?void 0:e.title)||"";cb({title:r,text:o,html:i,raw:t})}))}))},ressourceApi={delete:deleteRessource,download:downloadRessource,fetch:fetchRessource,fetchUrlArticle:fetchUrlArticle};return ressourceApi}},28:function(t,n,e){"use strict";e.d(n,"a",(function(){return c}));var o=e(29),i=e.n(o),r=e(18),a={img:i()().find(".").then("jpg").or("jpeg").or("png").or("gif").or("webm").or("svg").or("webp"),imgMdConfig:i()().anythingBut("[]|").maybe("|").beginCapture().anythingBut("[]|").endCapture().maybe("|").beginCapture().anythingBut("[]|").endCapture(),customTag:/\[\[[a-zA-Z0-9-\ _\/]*\]\]/},c={strings:{charWithAccents:"[a-zA-Z\xc0-\u024f\u1e00-\u1eff]{1}",tableLine:"([a-z\xc0-\xfaA-Z0-9@:%,-*._+~#= ]+|)"},metas:i()().find(r.a.metas.headerStart).beginCapture().anythingBut("").endCapture().then(r.a.metas.headerEnd),titleHtml:/<(title)[^>]*>([^<]*)<\/\1>/gi,metasHtml:/<meta[^>]*(name|property)="([^"]*)"[^>]*content="([^"]*)"[^>]*>/gi,externalLink3:/https?:\/\/((www\.)?[a-z\xc0-\xfaA-Z0-9@:%._\+~#=]{1,256})\b(\/[a-z\xc0-\xfaA-Z0-9()\!@:%_\-\+.,~#?&=]*\/)?([-a-zA-Z\xc0-\xfa0-9()\!@:%_\-\+.,~#?&\/=]*)\/(\n| |$)/gim,externalLink3Int:/https?:\/\/((www\.)?[a-z\xc0-\xfaA-Z0-9@:%._\+~#=]{1,256})\b(\/[a-z\xc0-\xfaA-Z0-9()\!@:%_\-\+.,~#?&=]*\/)?([-a-zA-Z\xc0-\xfa0-9()\!@:%_\-\+.,~#?&\/=]*)\//gim,mdTableLine:/\|?(([^\|]+\|)+([^\|]+))\|?/gim,mdTableCell:/((([^|\n])+\|)|(([^|\n])+))/gim,matchingHtmlTags:/<([^>]*)>([^<]*)<\/\1>/,baliseHtml:i()().find("<").anythingBut("<>").then(">"),ressource:i()().find("![").beginCapture().anythingBut("[]").endCapture().then("](").beginCapture().anythingBut("()").endCapture().then(")"),ref:i()().find("[").anythingBut("[]").then("](").anythingBut("()").then(")"),extimage:i()().find("![").anythingBut("[]").then("](").beginCapture().then("http").anythingBut("()").then(a.img).anythingBut("()").endCapture().then(")"),image:i()().find("![").anythingBut("[]").then("](").beginCapture().anythingBut("()").then(a.img).anythingBut("()").endCapture().then(")"),fullImageMd:i()().beginCapture().find("![").anythingBut("[]").then("](").anythingBut("()").then(a.img).anythingBut("()").endCapture().then(")"),imageAndTitleCapture:i()().find("![").beginCapture().anythingBut("[]").endCapture().then("](").beginCapture().anythingBut("()").then(a.img).anythingBut("()").endCapture().then(")"),imageAndTitleCapture2:/\!\[([^\[\]]+)\]\(([^\(\)]+\.(jpg|jpeg|png|gif|webm|svg|webp))\)/gi,imageAndConfig:i()().find("![").then(a.imgMdConfig).then("](").beginCapture().anythingBut("()").then(a.img).anythingBut("()").endCapture().then(")"),searchlink:i()().find("[search|").beginCapture().anythingBut("[]").endCapture().then("]"),linklink:i()().find("[link|").beginCapture().anythingBut("[]").endCapture().then(" ").beginCapture().then("/").anythingBut("[]").endCapture().then("]"),latexTag:i()().find("[[latex]]").beginCapture().anythingBut("").endCapture().then("[[latex]]"),scriptTag:i()().find("[[script]]").beginCapture().anythingBut("").endCapture().then("[[script]]"),userCustomTagFull:i()().find(a.customTag).beginCapture().anythingBut("").endCapture().then(a.customTag),userCustomTagFull2:i()().beginCapture().beginCapture().find(a.customTag).endCapture().anythingBut("").beginCapture().then(a.customTag).endCapture().endCapture(),userCustomTagFull3:i()().beginCapture().find(a.customTag).endCapture(),userCustomTag3:i()().beginCapture().then(a.customTag).endCapture(),userCustomTagManual:a.customTag,externalLink:i()().find("http").maybe("s").then("://").beginCapture().anythingBut("/ ").endCapture().beginCapture().anythingBut(" ").then("/").beginCapture().anythingBut("? ").endCapture().anythingBut(" \n").then("\\n").endCapture(),url2transform:i()().find("!").beginCapture().find("http").maybe("s").then("://").beginCapture().anything().endCapture().endCapture(),searchFolder:i()().find(" /").anything().endOfLine(),searchFolderNoSpace:i()().find("/").anything().endOfLine(),firstPartImg:i()().find("![").anythingBut("[]").then("]("),hashtag3:i()().find(/[-| |\n]{1}\#([A-z\xc0-\xfa1-9_\-]+)/gi),titleMd:i()().startOfLine().find("#").oneOrMore().then(" ").beginCapture().anythingBut("").endCapture(),scriptHtml:i()().find("<script>").beginCapture().anythingBut("").endCapture().then("<\/script>")}},309:function(t,n){},31:function(t,n,e){"use strict";e.d(n,"a",(function(){return d})),e.d(n,"b",(function(){return f}));var o=e(21),i=e(0),r=e.n(i),a=e(147),c=e(10),l=e(24),s=e(1),u=function(t){var n=Object(o.a)({},t),e=n.design,r=n.colors,l=n.size;e||(e="horizontal");var u=!("popup"in t)||t.popup,d=Object(a.a)("button.toolbar-button{position:relative;&.active{svg{color:",r?r[1]:c.a.colors.main,";}}svg{transform:scale(",l||1.3,");color:",r?r[0]:c.a.colors.editor.interfaceGrey,";&:hover{color:",r?r[1]:c.a.colors.main,";}}}","");return Object(i.useMemo)((function(){return Object(s.d)("div",{className:d},Object(s.d)("ul",{className:"buttons-toolbar-component ".concat(t.class," ").concat(e," ").concat(u?"with-popup":"no-popup")},t.buttons.map((function(t,n){var e;return t.action&&Object(s.d)("li",{className:"".concat(t.class," btn-").concat(null===(e=t.title)||void 0===e?void 0:e.toLowerCase()),title:t.title,key:n},Object(s.d)(p,t))}))))}),[t.buttons])},d=r.a.memo(u,(function(t,n){return!1})),p=function(t){var n=Object(s.d)(r.a.Fragment,null);t.title&&(n=Object(s.d)(r.a.Fragment,null,t.title)),t.icon&&(n=Object(s.d)(l.a,{name:t.icon})),t.customHtml&&(n=t.customHtml);var e="toolbar-button ".concat(t.class&&t.class," ").concat(t.active&&"active");return Object(s.d)("button",{className:e,onMouseEnter:function(n){t.onHover&&t.onHover()},onClick:function(n){t.action&&t.action(n)}},Object(s.d)("div",{className:"inside-html-wrapper"},n),Object(s.d)("div",{className:"button-hover-popup "},t.title))},f=function(){return"\n ul.buttons-toolbar-component {\n list-style: none;\n padding: 0px;\n margin: 0px;\n button.toolbar-button {\n ".concat(c.a.els().button,";\n cursor: pointer;\n }\n\t\t\t\t&.vertical {\n\t\t\t\t\t\t.toolbar-button {\n\t\t\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\t\t\t&:hover {\n\t\t\t\t\t\t\t\t\t\t.inside-html-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\tsvg {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcolor:").concat(c.a.colors.main,";\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t.button-hover-popup {\n\t\t\t\t\t\t\t\t\t\t\t\tcolor:").concat(c.a.colors.main,";\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.inside-html-wrapper {\n\t\t\t\t\t\t\t\t\t\twidth: 15px;\n\t\t\t\t\t\t\t\t\t\tspan {\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.button-hover-popup {\n\t\t\t\t\t\t\t\t\t\tmargin-left: 15px;\n\t\t\t\t\t\t\t\t\t\tfont-weight: 400;\n\t\t\t\t\t\t\t\t\t\tfont-size: 11px;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t&.horizontal.with-popup {\n\t\t\t\t\t\t\t\tli button:hover .button-hover-popup {\n\t\t\t\t\t\t\t\t\t\tdisplay: block;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t&.horizontal {\n\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\tli {\n\t\t\t\t\t\tbutton {\n\t\t\t\t\t\t\t\t.button-hover-popup {\n\t\t\t\t\t\t\t\t\t\tdisplay: none;\n\t\t\t\t\t\t\t\t\t\topacity: 0.2;\n\t\t\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\t\t\tbottom: 22px;\n\t\t\t\t\t\t\t\t\t\tbackground: ").concat(c.a.colors.editor.interfaceGrey,";\n\t\t\t\t\t\t\t\t\t\tcolor: black;\n\t\t\t\t\t\t\t\t\t\tpadding: 5px;\n\t\t\t\t\t\t\t\t\t\tleft: 50%;\n\t\t\t\t\t\t\t\t\t\twidth: max-content;\n\t\t\t\t\t\t\t\t\t\tfont-size: 8px;\n\t\t\t\t\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\t\t\t\t\ttransform: translateX(-50%);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n }\n}\n")}},32:function(t,n,e){"use strict";e.d(n,"a",(function(){return r}));var o=e(21),i=e(18),r=Object(o.a)(Object(o.a)({},i.a.client),{},{global:{protocol:"".concat(window.location.protocol,"//"),url:"".concat(window.location.hostname),port:"80"===window.location.port?"":":".concat(window.location.port)}})},33:function(t,n,e){"use strict";e.d(n,"b",(function(){return a})),e.d(n,"a",(function(){return c}));var o=e(8),i=e.n(o),r=e(0);function a(cb,t){var n=Object(r.useRef)(cb);return Object(r.useEffect)((function(){n.current=cb})),Object(r.useCallback)(i.a.throttle((function(){return n.current.apply(n,arguments)}),t,{leading:!0,trailing:!1}),[t])}function c(cb,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],e={leading:!1,trailing:!0};n&&(e.leading=n);var o=Object(r.useRef)(cb),a=l();return Object(r.useEffect)((function(){o.current={cb:cb,delay:t}})),Object(r.useCallback)(i.a.debounce((function(){var n;o.current.delay===t&&a()&&(n=o.current).cb.apply(n,arguments)}),t,e),[t,i.a.debounce])}function l(){var t=Object(r.useRef)(!0);return Object(r.useEffect)((function(){return function(){t.current=!1}}),[]),function(){return t.current}}},330:function(t,n){},332:function(t,n){},343:function(t,n){},345:function(t,n){},37:function(t,n,e){"use strict";e.d(n,"g",(function(){return g})),e.d(n,"f",(function(){return h})),e.d(n,"e",(function(){return m})),e.d(n,"a",(function(){return v})),e.d(n,"d",(function(){return w})),e.d(n,"c",(function(){return O})),e.d(n,"b",(function(){return x})),e.d(n,"h",(function(){return j}));e(0);var o=e(18),i=e(28),r=e(66),a=e(16),c=e(69),l=e(22),s=e(8),u=e(76),d=e(46),p=e(59),f=e(99),b=e(1),g=function(t){return Object(c.d)(t,i.a.externalLink3,(function(t){return Object(f.a)(t).outerHTML}))},h=function(t,n){var e=Object(p.a)("$1","$2",t);return n.replace(i.a.linklink,e)},m=function(t){var n=t.replace(i.a.searchlink,'<a class="search-link preview-link" href="javascript:window.tiroCli.triggerSearch.func(\'$1$2\');">$1</a>');return n=Object(r.a)(n,[[">[__id_",">["],[">[__tags_",">["],[">[__tag_",">["],[" ]</a>","]</a>"]])},v=function(t){var n=t.replace("".concat(Object(a.c)(),"/").concat(o.a.path.staticResources,"/"),""),e="".concat(Object(a.c)(),"/").concat(o.a.path.staticResources,"/").concat(n);return t.startsWith("http")?t:e},w=function(t,n){var e=0;return Object(c.d)(n,i.a.ressource,(function(n){e++;"".concat(n,"-").concat(e);var o=Object(d.renderToString)(Object(b.d)(u.a,{markdownTag:n,file:t}));return"".concat(o," ")}))},O=function(t,n){var e=0,o=function(t,n){var e=t.match(i.a.image),o=[];return Object(s.each)(e,(function(t){var e=t.match(i.a.firstPartImg),r=e&&e[0]?e[0].replace("![","").replace("]","").replace("(",""):"",a=t.replace(i.a.firstPartImg,"").replace(")",""),c={url:v(n.folder)+"/"+a,title:r,file:n};o.push(c)})),o}(n,t);if(0===o.length)return n;var r=encodeURIComponent(JSON.stringify(o));return Object(c.d)(n,i.a.image,(function(n){var o=n.split("](")[1].slice(0,-1),i=n.match(/w_([0-9]+)/),a=n.match(/r_([0-9]+)/),c=i?"width: ".concat(i[1],"px;"):"",s=a?"transform:rotate(".concat(a[1],"deg);"):"",u="max-width: 100%; ".concat(c," ").concat(s," "),d='<div class="content-image" data-images='.concat(r,' data-index="').concat(e,'"><img class="content-image-img" style="').concat(u,'" src="').concat(v(t.folder),"/").concat(o).concat(Object(l.c)(),'" /></div>');return e++,d}))},x=function(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")},j=function(t){return t.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#039;/g,"'")}},370:function(t,n){},372:function(t,n){},373:function(t,n){},378:function(t,n){},380:function(t,n){},386:function(t,n){},388:function(t,n){},40:function(t,n,e){"use strict";e.d(n,"a",(function(){return o})),e.d(n,"b",(function(){return i}));var o=function(){var t=(new Date).getTime(),n="undefined"!==typeof performance&&performance.now&&1e3*performance.now()||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var o=16*Math.random();return t>0?(o=(t+o)%16|0,t=Math.floor(t/16)):(o=(n+o)%16|0,n=Math.floor(n/16)),("x"===e?o:3&o|8).toString(16)}))},i=function(t){var n=t.split("?")[1]||"",e=t.split("?")[0],o=e.replace(/[^\w\s]/gi,"_"),i=n.replace(/[^\w\s]/gi,"_"),r=e.split(".").pop()||"";return((r="."+r.replace(/[^\w\s]/gi,"_")).length>6||r.length<=1)&&(r=""),"".concat(o,"_").concat(i).concat(r)}},407:function(t,n){},419:function(t,n){},422:function(t,n){},44:function(t,n,e){"use strict";e.d(n,"a",(function(){return p})),e.d(n,"b",(function(){return f}));var o=e(5),i=e(6),r=e(15),a=e(20),c=e(0),l=e.n(c),s=e(10),u=e(13),d=e(1),p=function(t){Object(r.a)(e,t);var n=Object(a.a)(e);function e(){var t;Object(o.a)(this,e);for(var i=arguments.length,r=new Array(i),a=0;a<i;a++)r[a]=arguments[a];return(t=n.call.apply(n,[this].concat(r))).canBgClose=!t.props.canBgClose||t.props.canBgClose,t}return Object(i.a)(e,[{key:"render",value:function(){var t=this;return Object(d.d)("div",{className:"popup-wrapper-component"},Object(d.d)("div",{className:"overlay-click-popup",onClick:function(n){t.canBgClose&&t.props.onClose()}}),Object(d.d)("div",{className:"popup-wrapper ".concat(Object(u.c)()?"ipad":"")},Object(d.d)("div",{className:"popupTitle"}," ",this.props.title),Object(d.d)("div",{className:"popupContent"},this.props.children)))}}]),e}(l.a.Component),f=function(){return"\n.popup-wrapper-component {\n\t\t\t\tposition: absolute;\n top: 0px;\n left: 0px;\n .overlay-click-popup {\n position: fixed;\n z-index:1000;\n top: 0px;\n left: 0px;\n width: 100vw;\n height: 100vh;\n background: rgba(0,0,0,0.1);\n }\n .popup-wrapper {\n position: fixed;\n z-index:1001;\n left: 50%;\n top:50%;\n &.ipad {\n top:20%;\n }\n width : auto;\n max-width: 90%;\n transform:translate(-50%,-50%);\n\t\t\t\tbackground: ".concat(s.a.colors.bgPopup,";\n border-radius:6px;\n box-shadow: 0px 0px 5px rgba(0,0,0,.2);\n .popupTitle {\n margin: 0px 0px 20px 0px;\n text-align: left;\n background: ").concat(s.a.colors.main,";\n color: white;\n font-weight: 700;\n text-transform: uppercase;\n font-size: 14px;\n padding: 5px 0px 5px 20px;\n border-radius:6px 6px 0px 0px;\n }\n .popupContent {\n padding: 0px 20px 20px 20px;\n // min-width : 350px;\n }\n img{\n padding: 0px 5px 0px 0px;\n margin: 5px 5px 0px 0px;\n }\n }\n}\n")}},45:function(t,n,e){"use strict";e.d(n,"a",(function(){return a})),e.d(n,"b",(function(){return c}));var o=e(8),i=e(0),r=e(1),a=function(t){var n,e=Object(i.useRef)(),a=function(){t.shouldFocus&&e.current.focus()};Object(i.useEffect)((function(){a()}),[t.shouldFocus]),Object(i.useEffect)((function(){a()}),[]);var c="checkbox"===t.type&&(!0===t.value||"true"===t.value),l=t.value;return Object(o.isBoolean)(l)&&(l=""),Object(r.d)("div",{className:"input-component ".concat(t.id?t.id:""," ").concat(t.type)},t.label&&Object(r.d)("span",null,t.label," :"),Object(r.d)("div",{className:"input-wrapper"},"select"!==t.type&&Object(r.d)("input",{ref:e,type:t.type?t.type:"text",value:l,checked:c,readOnly:t.readonly,onFocus:function(){t.onFocus&&t.onFocus()},onClick:function(){!t.shouldNotSelectOnClick&&e.current.select()},onKeyPress:function(n){"Enter"==(n.code||n.key)&&t.onEnterPressed&&t.onEnterPressed()},onChange:function(n){t.onCheckedChange&&t.onCheckedChange(n.target.checked),t.onChange&&t.onChange(n.target.value)}}),"select"===t.type&&Object(r.d)("select",{value:l,onChange:function(n){t.onSelectChange&&t.onSelectChange(n.target.value)}},null===(n=t.list)||void 0===n?void 0:n.map((function(t,n){return Object(r.d)("option",{value:t.key},t.label," ")}))),t.explanation&&Object(r.d)("div",{className:"explanation"}," ",t.explanation," ")))},c=function(){return"\n .input-component {\n display: flex;\n align-items: center;\n padding-bottom: 10px;\n input, select {\n max-width: 100%;\n }\n &.select {\n span {\n width: 20%;\n }\n }\n span {\n width: 30%;\n font-weight: 700;\n text-transform: uppercase;\n }\n .input-wrapper {\n width: 70%;\n input {\n padding: 7px;\n border: none;\n background: #ececec;\n border-radius: 5px;\n }\n .explanation {\n font-size: 11px;\n color: grey;\n }\n }\n }\n"}},450:function(t,n,e){"use strict";e.r(n);var o=e(0),i=e.n(o),r=e(9),a=e(1),c=e(13),l=e(16),s=e(21),u=e(147),d=e(10),p=e(100),f=e(55),b=e(31),g=e(8),h=e(61),m={};window.tiroCli=m;var v=function(t,n){var e,c,l=Object(h.a)("showRenderId",!1),s=Object(r.a)(l,2),u=s[0],d=s[1];e="toggleRenderId",(c={description:"toggle display of renderId for each block",func:function(){console.log("[toggleRenderId]"),d(!u),setTimeout((function(){window.location.reload()}),1e3)}}).f=c.func,m[e]=c;var p=Object(g.random)(0,1e3);return Object(o.useMemo)((function(){var n=(new Date).getTime(),e=(new Error).stack,o=(null===e||void 0===e||e.split("\n")[6].replace("at ","").replace(/\(.*\)/gi,"").trim(),Object(a.d)(i.a.Fragment,null,u&&Object(a.d)("p",{style:{position:"absolute",fontSize:"10px",color:"rgba(255,0,0,0.8)"}},p),t));(new Date).getTime();return o}),n)},w=e(18),O=e(32),x=e(12),j=function(t,n){var e=Object(o.useRef)();Object(o.useEffect)((function(){e.current=t}),[t]),Object(o.useEffect)((function(){if(null!==n){var t=setInterval((function(){e.current()}),n);return function(){return clearInterval(t)}}}),[n])},k=function(){return"Tiro (".concat(O.a.version,")")},y=e(24),C=e(17),_=function(t){return Object(a.d)("button",{className:"new-file-button",onClick:function(n){t.onNewFile()}},Object(a.d)(y.a,{name:"faPlusCircle",color:"white"}),Object(a.d)("span",null,C.a.newNote))},E=i.a.memo(_,(function(t,n){return!0})),T=e(5),S=e(6),I=e(15),N=e(20),F=e(47),R=e(37),L=e(277),A=e(274),P=e(22),D={ctrl:!1,shift:!1,alt:!1,opt:!1},M={38:"up",40:"down",17:"ctrl",16:"shift",18:"alt",93:"opt",13:"enter"},z=function(t){return t=t||window.event,M[t.keyCode]?M[t.keyCode]:t.key},B={},U=e(67),H=function(t){Object(I.a)(e,t);var n=Object(N.a)(e);function e(t){var o;return Object(T.a)(this,e),(o=n.call(this,t)).oldFiles=[],o.liRefs=[],o.scrollerWrapperRef=i.a.createRef(),o.scrollerListRef=i.a.createRef(),o.canAutoScroll=!1,o.getVisibleItemsDebounced=Object(g.debounce)((function(){var t=o.scrollerWrapperRef.current;if(t){for(var n=t.getBoundingClientRect().height,e=-1,i=[],r=0;r<o.liRefs.length;r++){var a=o.liRefs[r].current;if(a){var c,l=a.getBoundingClientRect().top;if(l>-50&&l<n+100)-1===e&&(e=r),o.props.files[r]&&i.push(null===(c=o.props.files[r])||void 0===c?void 0:c.path)}}o.props.onVisibleItemsChange(i)}}),500),o.onListScroll=function(){o.canAutoScroll=!1,o.getVisibleItemsDebounced()},o.isMultiSelected=function(t){var n=!1;return o.state.selectionEdges[0]<=t&&o.state.selectionEdges[1]>=t&&(n=!0),n},o.itemToScroll=0,o.autoScrollToItem=function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];o.itemToScroll=n?t:o.itemToScroll+t,o.itemToScroll<0&&(o.itemToScroll=0),o.itemToScroll>o.props.files.length&&(o.itemToScroll=o.props.files.length),o.scrollerListRef.current.scrollToItem(o.itemToScroll)},o.getUrlLoginToken=function(){return"?token=".concat(Object(P.b)())},o.state={hoverMode:!1,selectionEdges:[-1,-1]},o}return Object(S.a)(e,[{key:"shouldComponentUpdate",value:function(t,n){if(JSON.stringify(t.files)!==JSON.stringify(this.oldFiles)){this.oldFiles=Object(g.cloneDeep)(t.files),this.liRefs=[];for(var e=0;e<t.files.length;e++)this.liRefs.push(i.a.createRef());this.getVisibleItemsDebounced(),this.setState({selectionEdges:[-1,-1]}),this.canAutoScroll=!0}return this.props.activeFileIndex>0&&this.canAutoScroll&&(this.canAutoScroll=!1,this.autoScrollToItem(this.props.activeFileIndex)),!0}},{key:"render",value:function(){var t=this,n=U.a[this.props.sortMode],e=d.a.sizes.l2.fileLi.height+2*d.a.sizes.l2.fileLi.padding+d.a.sizes.l2.fileLi.margin,o=window.innerHeight-(d.a.sizes.search.h+d.a.sizes.search.padding),r=Object(c.b)("desktop")?o:o-d.a.sizes.mobile.bottomBarHeight;return Object(a.d)(i.a.Fragment,null,Object(a.d)("div",{className:"list-wrapper-scroller",style:{height:r},onScroll:this.onListScroll,ref:this.scrollerWrapperRef},Object(a.d)(A.a,null,(function(o){o.height;var c=o.width;return Object(a.d)(L.a,{itemData:t.props.files,className:"List",ref:t.scrollerListRef,height:r,itemCount:t.props.files.length,itemSize:e,width:c,onScroll:t.onListScroll},(function(e){var o=e.index,r=e.style,l=t.props.files[o],s=t.props.filesPreview[l.path];return Object(a.d)("div",{style:r},Object(a.d)("li",{ref:t.liRefs[o],style:{width:c-2*G.l2.fileLi.padding-2*G.l2.fileLi.margin-35},className:["file-element-list","element-".concat(o),"".concat(t.isMultiSelected(o)?"active":""),"".concat(o===t.props.activeFileIndex?"active":""),"".concat(s&&s.picture?"with-image":"")].join(" "),key:o,draggable:!0,onDragStart:function(){var n=[],e=t.state.selectionEdges;n=-1!==e[0]||-1!==e[1]?t.props.files.slice(e[0],e[1]+1):[l],t.props.onFileDragStart(n)},onDragEnd:function(){t.props.onFileDragEnd()},onClick:function(n){if(D["shift"]){var e=[t.props.activeFileIndex,o];e.sort(),t.setState({selectionEdges:e})}else t.props.onFileClicked(o),t.setState({selectionEdges:[-1,-1]});t.props.onFileClicked(o)}},Object(a.d)("div",{className:"background-item"}),Object(a.d)("div",{className:"background-item-border"}),Object(a.d)("div",{className:"left"},Object(a.d)("h3",{className:"label ".concat(l.name.length<=35?"oneliner":"more"),onMouseEnter:function(n){t.props.hoverMode&&t.props.onFileClicked(o)}},l.name),Object(a.d)("div",{className:"content"},s&&s.content&&Object(a.d)(i.a.Fragment,null,s.content)),Object(a.d)("div",{className:"date ".concat(n)},Object(F.a)(new Date(("modified"===n?l.modified:l.created)||0)))),Object(a.d)("div",{className:"right"},s&&s.picture&&Object(a.d)("div",{className:"picture",style:{backgroundColor:"white",backgroundImage:"url('".concat(s.picture.startsWith("http")?s.picture+t.getUrlLoginToken():"".concat(Object(R.a)(t.props.files[0].folder),"/").concat(s.picture).concat(t.getUrlLoginToken()),"')")}}))))}))}))))}}]),e}(i.a.Component),W=i.a.memo(H,(function(t,n){return!1})),q=Object(s.a)({},d.a),V=(q.els,q.colors),G=(q.font,q.sizes),K=e(135),J=e(49),Y=function(t){return Object(a.d)("div",{className:"folder-tree-view-component"},Object(a.d)("h3",{className:"subtitle"},C.a.folders),Object(a.d)($,{openFolders:t.openFolders,folder:t.folder,current:t.current,onFolderClicked:t.onFolderClicked,onFolderMenuAction:t.onFolderMenuAction,onFolderOpen:function(n){Object(x.d)((function(e){e.ui.browser.folders.open.add(n),t.onFolderOpen(n)}))},onFolderClose:function(n){Object(x.d)((function(e){e.ui.browser.folders.open.remove([n]),t.onFolderClose(n)}))},onFolderDragStart:t.onFolderDragStart,onFolderDragEnd:t.onFolderDragEnd,onFolderDrop:t.onFolderDrop}))},$=function t(n){var e=n.openFolders.includes(n.folder.path)&&n.folder.hasFolderChildren,i=Object(o.useState)(!1),c=Object(r.a)(i,2),l=c[0],s=c[1],u=Object(o.useState)(""),p=Object(r.a)(u,2),f=p[0],b=p[1],g=Object(J.a)(n.current,n.folder.key);return Object(a.d)("li",{className:"folder-wrapper ".concat(g?"current":""," "),draggable:!0,onDrop:function(t){n.folder.key&&(n.onFolderDrop(n.folder),t.stopPropagation())},onDragStart:function(t){n.folder.key&&(n.onFolderDragStart(n.folder),t.stopPropagation())},onDragEnd:function(){n.folder.key&&n.onFolderDragEnd()},onMouseLeave:function(){l&&s(!1)}},Object(a.d)("div",{className:"folder-title ".concat(f),onDragEnter:function(t){b("drag")},onDrop:function(t){b("")},onDragLeave:function(t){b("")}},Object(a.d)("span",{className:"icon",onClick:function(t){e?n.onFolderClose(n.folder.key):n.onFolderOpen(n.folder.key)}},n.folder.hasFolderChildren&&Object(a.d)(y.a,{name:e?"faCaretDown":"faCaretRight",color:d.a.colors.main})),Object(a.d)("span",{className:"title",onClick:function(t){n.onFolderClicked(n.folder.key)}},Object(a.d)("div",{className:"title-drag-bg"}),Object(a.d)("div",{className:"title-label"}," ",n.folder.title)),Object(a.d)("span",{onClick:function(){s(!l)},className:"context-menu-wrapper"},Object(a.d)(y.a,{name:"faEllipsisH",color:d.a.colors.l1.font}),l&&Object(a.d)("div",{className:"context-menu context-menu-folders"},Object(a.d)("ul",null,Object(a.d)("li",{onClick:function(){if(""===n.folder.path)return s(!1);var t=prompt("".concat(C.a.renameFolderPrompt," "),n.folder.title);t&&""!==t&&t!==n.folder.title&&n.onFolderMenuAction("rename",n.folder,t),s(!1)}},C.a.renameFolder),Object(a.d)("li",{onClick:function(){if(""===n.folder.path)return s(!1);Object(x.e)().then((function(t){t.popup.prompt({text:"".concat(C.a.createFolderPrompt,' "').concat(n.folder.path,'"?'),userInput:!0,onAccept:function(t){t&&""!==t&&n.onFolderMenuAction("create",n.folder,t)},onRefuse:function(){}})})),s(!1)}},C.a.createFolder),-1===n.folder.path.indexOf(".tiro/.trash")&&Object(a.d)("li",{onClick:function(){if(""===n.folder.path)return s(!1);s(!1),n.onFolderMenuAction("moveToTrash",n.folder)}},C.a.moveToTrash),-1!==n.folder.path.indexOf(".tiro/.trash")&&Object(a.d)("li",{onClick:function(){if(""===n.folder.path)return s(!1);s(!1),Object(x.e)().then((function(t){t.popup.confirm("".concat(C.a.deleteFolderPrompt,' "').concat(n.folder.path,'"?'),(function(){n.onFolderMenuAction("delete",n.folder)}))}))}},C.a.deleteFolder))))),e&&Object(a.d)("ul",{className:"folder-children"},n.folder.children&&n.folder.children.map((function(e,o){return Object(a.d)(t,{openFolders:n.openFolders,key:o,folder:e,current:n.current,onFolderOpen:n.onFolderOpen,onFolderMenuAction:n.onFolderMenuAction,onFolderClose:n.onFolderClose,onFolderClicked:n.onFolderClicked,onFolderDragStart:n.onFolderDragStart,onFolderDragEnd:n.onFolderDragEnd,onFolderDrop:n.onFolderDrop})}))))},Z=function(t){var n=Object(s.a)({},t).files.slice(0,20);return Object(a.d)(i.a.Fragment,null,n.length>0&&Object(a.d)("div",{className:"last-notes-component"},Object(a.d)("h3",{className:"subtitle"},C.a.lastNotes),Object(a.d)("ul",null,n.map((function(n,e){var o=n.name.replace(".md","");return o=o.length>20?"".concat(o.substr(0,20)):o,Object(a.d)("li",{key:e,title:o,onClick:function(e){t.onClick(n)},className:"note"},Object(a.d)(y.a,{name:"faFile"}),o)})))))},X=i.a.memo(Z,(function(t,n){return t.files===n.files})),Q=e(45),tt=e(44),nt=function(t){var n=Object(o.useContext)(x.a),e=!!n&&n.status.searching.get;return Object(a.d)(i.a.Fragment,null,Object(a.d)("div",{className:"search-bar-component"},Object(a.d)("input",{type:"text",placeholder:C.a.searchPlaceholder,value:t.term,onKeyDown:function(e){if("Enter"===e.key){if(t.term.length<3)return;n&&n.ui.search.search(t.term)}},onChange:function(e){!function(e,o){if(n){var i=n.ui.browser.folders.current.get;""===t.term&&""!==i&&(e=e+" "+i,o&&setTimeout((function(){var t=(o.selectionStart||0)-i.length-1;o.selectionStart=t,o.selectionEnd=t}),10)),n.ui.search.term.set(e)}}(e.target.value,e.target)}}),Object(a.d)("div",{className:"search-status"},e&&C.a.searchingLabel)))},et=e(144),ot=function(t){var n={title:t.realname,folder:t.folder,mobileview:"editor"},e="".concat(O.a.global.protocol).concat(O.a.global.url).concat(O.a.global.port,"?").concat(Object(et.b)(n));window.open(e,"popupDetached","width=600,height=600")},it=function(t){var n=Object(o.useState)(0),e=Object(r.a)(n,2),i=e[0],c=e[1];Object(o.useEffect)((function(){c(t.startingIndex)}),[t.startingIndex]);var l=function(n){var e=i;e=-1===n&&0===i?t.images.length-1:1===n&&i===t.images.length-1?0:i+n,c(e),p(10)},s=Object(o.useState)(10),u=Object(r.a)(s,2),d=u[0],p=u[1],f=function(t){var n=t+d;n<0&&(n=0),n>20&&(n=20),p(n)},g=Object(o.useRef)(null),h=function(){var t=50*(d-10)+99;d<10&&(t=10*-(10-d)+99);var n="".concat(t,"%"),e={height:n};g.current&&(g.current.naturalWidth>g.current.naturalHeight&&(e={width:n}));return m.current,e},m=Object(o.useRef)(null),v=function(){var t="0px";if(m.current){var n=m.current.clientHeight;t="".concat(n,"px")}return t}();return Object(a.d)("div",{className:"lightbox-component"},Object(a.d)("div",{className:"lightbox-bg",onClick:function(){t.onClose()}}),Object(a.d)("div",{className:"lightbox-content images-nb-".concat(t.images.length),ref:m},t.images.map((function(n,e){return Object(a.d)("div",{key:e,className:"lightbox-image",style:{display:e===i?"flex":"none"}},Object(a.d)("div",{className:"image-zoom-wrapper",style:{lineHeight:v}},Object(a.d)("img",{ref:g,style:h(),src:Object(R.a)(n.url)+Object(P.c)()})),Object(a.d)("div",{className:"image-infos"},Object(a.d)("div",{className:"image-name",onClick:function(t){return ot(n.file)}},n.file.name," - ",n.title),Object(a.d)(b.a,{popup:!1,buttons:[{class:"left",title:"left",icon:"faChevronLeft",action:function(){l(-1)}},{class:"zoom",title:"zoom",icon:"faPlus",action:function(){f(1)}},{class:"dezoom",title:"dezoom",icon:"faMinus",action:function(){f(-1)}},{class:"close",title:"close",icon:"faTimes",action:function(){t.onClose()}},{class:"right",title:"right",icon:"faChevronRight",action:function(){l(1)}}]})))}))))},rt={onAccept:function(){},onRefuse:function(){}},at=function(t){var n=Object(o.useState)(!1),e=Object(r.a)(n,2),c=e[0],l=e[1],s=Object(o.useState)(""),u=Object(r.a)(s,2),d=u[0],p=u[1],f=Object(o.useState)(null),b=Object(r.a)(f,2),g=b[0],h=b[1],m=Object(o.useState)(C.a.promptPopup.defaultTitle),v=Object(r.a)(m,2),w=v[0],O=v[1],x=Object(o.useState)(!1),j=Object(r.a)(x,2),k=j[0],y=j[1],_=function(t){l(!0),p(t.text),t.title&&O(t.title),t.userInput&&h(""),t.onAccept&&(rt.onAccept=t.onAccept),t.onRefuse?(rt.onRefuse=t.onRefuse,y(!0)):y(!1)},E=function(){l(!1),h(null),O(""),p(""),y(!1)},T={confirm:function(t,cb,n){_({title:"",text:t,onAccept:cb,onRefuse:function(t){function n(){return t.apply(this,arguments)}return n.toString=function(){return t.toString()},n}((function(){n&&n()}))})},show:function(t,n,cb){_({title:n,text:t,onAccept:cb,onRefuse:function(){}})},prompt:_};return{popupApi:T,PromptPopupComponent:function(){return Object(a.d)(i.a.Fragment,null,c&&Object(a.d)("div",{className:"prompt-popup-component"},Object(a.d)(tt.a,{title:w,onClose:E,canBgClose:!1},Object(a.d)("div",null,Object(a.d)("div",{className:"content",dangerouslySetInnerHTML:{__html:d}}),Object(a.d)("br",null),null!==g&&Object(a.d)("div",null,Object(a.d)("input",{type:"text",value:g,onChange:function(t){h(t.target.value)}}),Object(a.d)("br",null)),Object(a.d)("button",{value:"submit",className:"accept submit-button",onClick:function(t){rt.onAccept(g),E()}},C.a.promptPopup.accept),k&&Object(a.d)("button",{value:"submit",className:"refuse submit-button",onClick:function(t){rt.onRefuse(g),E()}},C.a.promptPopup.refuse)))))}}},ct=e(141),lt=e(79),st=function(t){var n=Object(o.useContext)(x.a),e=Object(o.useState)(-1),i=Object(r.a)(e,2),c=i[0],l=i[1];return Object(a.d)("div",{className:"tab-list-scroll-wrapper"},Object(a.d)("div",{className:"tab-list-invisible-scroll"},Object(a.d)("div",{className:"tab-list-wrapper"},t.tabs.map((function(e,o){return Object(a.d)(dt,{key:o,tab:e,onDrop:function(t){l(t)},onDragEnter:function(t){l(t)},onDragEnd:function(t){n&&n.tabs.reorder(t,c),l(-1)},dragIndic:c,pos:o,onUpdate:t.onUpdate})})),(null===n||void 0===n?void 0:n.ui.browser.files.active.get)&&Object(a.d)("div",{className:"tab-wrapper tab-more",onClick:function(n){t.onUpdate("add")}},"+"))))},ut=function(t){var n=Object(s.a)({},t),e=n.tab,o=n.pos,r="Six",l=e.grid.layout.length;return 2===l&&(r="Two"),3===l&&(r="Three"),4===l&&(r="Four"),5===l&&(r="Five"),r="faDice".concat(r),Object(a.d)("div",{className:"tab-and-drag-wrapper"},t.dragIndic===o&&Object(a.d)("div",{className:"drag-indic"},"\u25bc"),Object(a.d)("div",{className:"tab-wrapper ".concat(e.active?"active":""),draggable:!0,onDragEnter:function(){t.onDragEnter(o)},onDrop:function(){t.onDrop(o)},onDragEnd:function(){t.onDragEnd(o)}},Object(a.d)("div",{className:"active-ribbon"}),Object(a.d)("div",{className:"tab-name",onClick:function(){t.onUpdate("activate",e)}},"mobile"!==Object(c.a)()&&Object(a.d)("input",{type:"text",className:"tab-input-text",value:e.name,style:{width:10*e.name.length+"px"},onChange:function(n){t.onUpdate("rename",e,n.target.value)}}),"mobile"===Object(c.a)()&&Object(a.d)(i.a.Fragment,null,e.name)),e.grid.layout.length>1&&Object(a.d)("div",{className:"tab-nb-windows",onClick:function(){t.onUpdate("activate",e)}},Object(a.d)(y.a,{name:r,color:"#b2b2b2"})),Object(a.d)("div",{className:"tab-close",onClick:function(){Object(x.d)((function(n){n.popup.confirm("".concat(C.a.deleteTabPrompt,' "').concat(e.name,'"?'),(function(){t.onUpdate("close",e)}))}))}},Object(a.d)(y.a,{name:"faPlus",color:"#b2b2b2"}))))},dt=i.a.memo(ut,(function(t,n){var e=!0,o=Object(g.cloneDeep)({n:t.tab,p:n.tab});return o.n.grid=o.p.grid={},o.n.refresh=o.p.refresh="",JSON.stringify(o.p)!==JSON.stringify(o.n)&&(e=!1),n.pos!==t.pos&&(e=!1),n.dragIndic!==t.dragIndic&&(e=!1),n.tab.active!==t.tab.active&&(e=!1),n.onUpdate!==t.onUpdate&&(e=!1),e})),pt=e(136),ft=e(116),bt=e(137),gt=e(83),ht=e(72),mt=e(145),vt=e(97),wt=e(26),Ot=e(276),xt=e(33),jt=function(t){var n=Object(o.useState)(""),e=Object(r.a)(n,2),i=e[0],c=e[1],l=Object(xt.a)((function(){Object(x.d)((function(n){n.file.getContent(t.file.path,(function(e){if(t.searchedString){var o=t.searchedString;e=e.replaceAll(o,"<span class='found-word'>".concat(t.searchedString,"</span>"))}e=n.note.render({raw:e,file:t.file,windowId:""}),setTimeout((function(){var t;null===(t=document.querySelector(".note-preview-wrapper .found-word"))||void 0===t||t.scrollIntoView()}),100);var i="<div class='file-content render-latex'>".concat(e," </div>");c(i)}))}))}),200);return Object(o.useEffect)((function(){l()}),[t.file,t.searchedString]),Object(a.d)("div",{className:"note-preview-wrapper"},Object(a.d)("div",{className:"simple-css-wrapper",dangerouslySetInnerHTML:{__html:i}}))},kt=e(104),yt="[Search Mode]",Ct="[Explorer Mode]",_t="[Plugin Mode]",Et={dict:{},config:{enabled:!0}},Tt=function(){Et.config.enabled=!1,Et.dict={}},St=function(t){var n=Object(o.useState)([]),e=Object(r.a)(n,2),i=e[0],l=e[1],u=Object(o.useRef)([]),p=function(t){Object(g.isArray)(t)&&(l(t),u.current=t)},f=Object(o.useState)([]),b=Object(r.a)(f,2),h=b[0],m=b[1],v=function(t){dt(t),m(t)},O=Object(o.useState)("No Options"),j=Object(r.a)(O,2),k=j[0],C=(j[1],{indicatorsContainer:function(t,n){return Object(s.a)(Object(s.a)({},t),{},{display:"none"})},menu:function(t,n){var e="mobile"===Object(c.a)()?"all":"none";return Object(s.a)(Object(s.a)({},t),{},{position:"relative",pointerEvents:e})},control:function(t,n){return Object(s.a)(Object(s.a)({},t),{},{outline:"none",boxShadow:"none",border:0})},multiValue:function(t,n){return n.data.editable?t:Object(s.a)(Object(s.a)({},t),{},{backgroundColor:d.a.colors.main})},multiValueRemove:function(t,n){return n.data.editable?t:Object(s.a)(Object(s.a)({},t),{},{display:"none"})}}),_=Object(o.useRef)(),E=h[0]||{label:"",value:""},T=function(n){var e=Object(J.d)(n);Object(x.d)((function(n){n.ui.browser.goTo(e.folder,e.name,{openIn:"activeWindow"}),t.onClose()}))},S=Object(o.useState)(""),I=Object(r.a)(S,2),N=I[0],F=I[1],R=Object(o.useRef)(null);Object(o.useEffect)((function(){R.current=N}),[N]);var L=Object(o.useRef)("");Object(o.useEffect)((function(){!function(){var t=u.current,n=N.trim();if(0===t.length)"/"===n&&(Object(kt.a)("suggest_explorer"),Object(x.d)((function(t){F("");var n=t.ui.browser.files.active.get.folder;H(n)}))),""===n&&G(),"?"===n&&(Object(kt.a)("suggest_search"),W()),":"===n&&K();else if(t[0].label===yt)if(t[1]){if(2===t.length)V(n,t[1].label);else if(3===t.length&&q.current===t[2].value)console.log("STEP 3-1 (optional) : filter found results",q.current);else if(3===t.length||4===t.length){console.log("STEP 3-2 : jump to page",{w:q.current,stags:t});var e=t.length-1,o=t[e].payload.file;T(o.path)}}else"?"===n&&Object(x.d)((function(t){var n=t.ui.browser.files.active.get.folder;F(n)})),z('Path to search (ex:"/path/to/folder") + ENTER'),v([{label:n,value:n}]);else if(t[0].label===Ct){var i=function(){var n=Object(wt.a)(t);n.shift();var e="";return Object(g.each)(n,(function(t){e+="/"+t.value})),e}();i.endsWith(".md")?(i=i.replace(t[0].label,""),T(i)):L.current!==i&&(L.current=i,H(i))}else t[0].label===_t&&Y(n,t)}(),$.current&&$.current()}),[i,N]);var A='"?" for search mode, "/" for explorer mode, ":" for plugin mode',P=Object(o.useState)(A),D=Object(r.a)(P,2),M=D[0],z=D[1],B=Object(o.useRef)(0),U=Object(o.useRef)(""),H=function(t){if(""!==t&&(t.endsWith("/")||(t+="/"),t!==U.current)){U.current=t,console.log("== EXPLORER",t),v([{label:"loading..."}]),tt(null),B.current++;var n=B.current;Object(x.d)((function(e){var o=[t];e.folders.get(o,(function(i){if(n===B.current&&(i.folderPaths.join("")===o.join("")&&i.folders[0])){var r=i.folders[0].children;e.files.get(t,(function(n,e){if(e===t){var o=t.split("/"),i=[];i.push({value:Ct,label:Ct}),i.push({value:"/",label:"/"}),Object(g.each)(o,(function(t){""!==t&&i.push({value:t,label:t+"/"})}));var c=[];Object(a.d)("div",{style:{backgroundImage:"url('".concat("http://localhost:3023/static//ctags//.resources/screenshot%2020230127%20at%20135701.jpg?token=KL3XFJdTJ7MWPtIu50OyUKlBhIszxRMdDwpd3EnSMJ1HGjLCAHaPDGjw9UcZ","')")},className:"barimage"});Object(g.each)(r,(function(t){var n=t.path.split("/"),e=n[n.length-1]+"/";c.push({value:e,label:e})})),Object(g.each)(n,(function(t){var n=t.path.split("/"),e=n[n.length-1],o={file:t},i=Object(a.d)("div",{className:"path-option-wrapper"},Object(a.d)("div",{className:"file"},t.name),Object(a.d)("div",{className:"folder"},t.folder));c.push({value:e,label:i,payload:o})})),p(i),v(c)}}))}}))}))}},W=function(){p([{value:yt,label:yt}])},q=Object(o.useRef)(null),V=Object(xt.a)((function(t,n){var e=n,o=t;if(o&&e&&o.length>2&&e.length>0){z('Searching "'.concat(o,'" in "').concat(e,'" ...')),v([{label:"loading..."}]);var i=o.includes("*"),r=[];v(r),q.current=o,Object(x.d)((function(t){t.search.word(o,e,(function(t){Object(g.each)(t,(function(t){Object(g.each)(t.results,(function(n){var e=i?"(".concat(o,")"):"",c="".concat(t.file.path," ").concat(e),l=n.indexOf(o),s=100,u=n,d=l>50?l-50:0,p=l+50<u.length?l+50:u.length;u.length>s&&(u=u.substring(d,p)),n=u;var f=u.replaceAll(o,"<b>".concat(o,"</b>")),b=Object(a.d)("div",{className:"path-option-wrapper"},Object(a.d)("div",{className:"search-location"},c),Object(a.d)("div",{className:"occur-wrapper",dangerouslySetInnerHTML:{__html:f}}));r.push({label:b,value:q.current+t.file+n+c,payload:{file:t.file,line:n}})}))})),0===r.length&&tt(null),r.unshift({label:"\ud83d\udd0e Filter the ".concat(r.length,' results for "').concat(q.current,'"'),value:q.current}),z("".concat(r.length-1,' results found for "').concat(o,'" in "').concat(e,'" ')),v(r)}))}))}else z("Type the word searched"),v([]),tt(null),q.current=""}),500),G=function(){z(A);var n=function(t){var n=[];return Object(g.each)(t,(function(t){var e=Object(a.d)("div",{className:"path-option-wrapper"},Object(a.d)("div",{className:"file"},t.name),Object(a.d)("div",{className:"folder"},t.folder)),o={value:t.path,label:e,payload:{file:t}};n.push(o)})),n}(t.lastNotes),e=n.shift(),o=n.shift();n.unshift(e),n.unshift(o),v(n)},K=function(){p([{value:_t,label:_t}])},Y=function(n,e){if(tt(null),1===e.length){var o="/".concat(w.a.path.configFolder,"/bar_plugins/");Object(x.d)((function(t){var e=[];t.files.get(o,(function(t){Object(g.each)(t,(function(t){e.push({label:t.name.replace(".md",""),value:t})})),e=Object(g.orderBy)(e,["label"]),v(e),":"===n&&F(""),z("".concat(t.length,' plugins found in "').concat(o,'"'))}))}))}else if(2===e.length){var i=e[1].value;Object(x.d)((function(e){var o=function(o){var i=Et.dict[o],r={input:n,setInputTxt:F,inputTxt:N,inputTxtRef:R,options:h,setOptions:v,onChange:$,onClose:t.onClose,onHide:t.onHide,selectedOptionRef:u,setSelectedOption:p,lodash:g,setNotePreview:tt,notePreview:Q,setHtmlPreview:it,htmlPreview:ot,loadBarPlugin:function(t,n,o){var i=!Et.config.enabled;e.ressource.fetch(t,(function(t){try{new Function("barApi","tiroApi",t)(n,o)}catch(i){var e="[ERROR LOADING PLUGIN BAR]: ".concat(JSON.stringify(i),'"');console.log(e)}}),{disableCache:i})},disableCache:Tt};try{new Function("barApi","tiroApi",i)(r,e)}catch(c){var a="[ERROR PLUGIN BAR]: ".concat(JSON.stringify(c),'"');console.log(a)}};Object(kt.a)("suggest_plugin_".concat(i.name)),Et.dict[i.name]?o(i.name):e.file.getContent(i.path,(function(t){Et.dict[i.name]=t,o(i.name)}))}))}},$=Object(o.useRef)(null),Z=Object(o.useState)(null),X=Object(r.a)(Z,2),Q=X[0],tt=X[1],nt=Object(o.useState)(null),et=Object(r.a)(nt,2),ot=et[0],it=et[1],rt=Object(o.useState)(void 0),at=Object(r.a)(rt,2),ct=at[0],lt=at[1],st=Object(o.useRef)([]),ut=function(t){Object(g.each)(st.current,(function(t){t.disconnect()})),st.current=[];var n=document.querySelectorAll("div[id*='-option']");Object(g.each)(n,(function(t,n){var e=new MutationObserver((function(n){var e=parseInt(t.id.split("-").pop());if("rgba(0, 0, 0, 0)"!==getComputedStyle(t)["background-color"]&&h[e]&&h[e].payload){var o=h[e].payload;!function(t,n){var e=u.current;e[0]&&e[0].label===Ct?tt(t):e[0]&&e[0].label===yt?(tt(t),lt(n),console.log("SEARCH JUMP TO",n,t.path)):e[0]?tt(null):tt(t)}(o.file,o.line||void 0)}}));e.observe(t,{childList:!0,attributes:!0,subtree:!1}),st.current.push(e)}))},dt=Object(xt.a)((function(t){ut()}),100);Object(o.useEffect)((function(){dt(h)}),[h,N]);var pt=Object(o.useState)(300),ft=Object(r.a)(pt,2),bt=ft[0],gt=ft[1],ht=Object(o.useRef)(null);return Object(xt.a)((function(){if(ht&&ht.current){var t=ht.current.clientHeight+30,n=window.innerHeight-t-50;bt!==n&&gt(n)}}),10)(),Object(a.d)("div",{className:"suggest-popup-bg ".concat(t.show?"":"hide"),onClick:function(n){t.onClose()}},Object(a.d)("div",{className:"suggest-popup-wrapper"},Object(a.d)("div",{className:"flex-wrapper",onClick:function(t){t.stopPropagation()}},Object(a.d)("div",{ref:ht},Object(a.d)("div",{className:"help"},M),Object(a.d)("div",{className:"help-right",onClick:function(n){t.onHide()}},Object(a.d)(y.a,{name:"faEyeSlash",color:"#b2b2b2"})),Object(a.d)(Ot.a,{isMulti:!0,ref:_,menuIsOpen:!0,defaultValue:E,value:i,autoFocus:!0,onChange:function(t,n){var e=t[0];if(e&&e.payload&&e.payload.file){var o=e.payload.file;T(o.path),t=[]}p(t)},openMenuOnClick:!1,inputValue:N,onInputChange:function(t,n){"input-blur"===n.action||"menu-close"===n.action||F(t)},onFocus:function(t){},options:h,styles:C,noOptionsMessage:function(){return tt(null),k}})),Object(a.d)("div",{className:"preview-wrapper ".concat(Q?"note-preview":"html-preview-wrapper"),style:{height:bt}},Q&&"mobile"!==Object(c.a)()&&Object(a.d)(jt,{file:Q,searchedString:ct,height:bt}),ot&&Object(a.d)("div",{className:"html-preview",dangerouslySetInnerHTML:{__html:ot},style:{height:bt}})))))},It=function(t){var n=Object(o.useState)(""),e=Object(r.a)(n,2),c=e[0],l=e[1];return Object(o.useEffect)((function(){Object(x.d)((function(n){n.file.getContent(t.filePath,(function(e){var o=Object(J.d)(t.filePath),i=n.note.render({raw:e,file:o});l(i)}))}))}),[t.filePath]),Object(a.d)(i.a.Fragment,null,Object(a.d)("div",{className:"rendered-note-component"},Object(a.d)("span",{className:"rendered-note-content-wrapper",dangerouslySetInnerHTML:{__html:c}})))},Nt=function(t){return Object(a.d)(i.a.Fragment,null,Object(a.d)("div",{className:"shortcut-component"},Object(a.d)("h3",{className:"subtitle"},"shortcuts"),Object(a.d)(It,{filePath:t.filePath})))},Ft=e(99),Rt=e(148),Lt=(Object(c.a)(),Object(s.a)({},d.a)),At=Lt.els,Pt=Lt.colors,Dt=(Lt.font,Lt.sizes),Mt=function(t,n){var e="//css\n\t\t.content-image {\n\t\t\t\twidth: 90%;\n\t\t}\n\t\t.full {\n\t\t\t\t.content-image {\n\t\t\t\t}\n\t\t}\n\n\t\t".concat("\n .main-wrapper.view-image {\n .mobile-view-toggler {\n display: none;\n }\n \n .left-wrapper {\n width: ".concat("desktop"===Object(c.a)()?15:40,"vw ;\n .left-wrapper-1 {\n width: 100%\n }\n .left-wrapper-2 {\n display: none;\n }\n }\n\n\n .right-wrapper.dual-viewer-view {\n display: none;\n }\n .right-wrapper {\n height: 100vh;\n }\n .right-wrapper.image-gallery-view {\n width: ").concat(100-("desktop"===Object(c.a)()?15:40),"vw;\n }\n }\n \n .main-wrapper.view-text {\n .right-wrapper.dual-viewer-view {\n \n }\n .right-wrapper.image-gallery-view {\n display: none;\n }\n }\n"),"\n\t\t").concat(Object(vt.a)(),"\n\t\t").concat("\n.lightbox-component {\n position: fixed;\n\t\tz-index: 1002;\n top: 0px;\n left: 0px;\n width: 100vw;\n height: 100vh;\n \n .lightbox-bg {\n top: 0px;\n left: 0px;\n width: 100vw;\n height: 100vh;\n position: absolute;\n\t\t\t\tbackground: rgb(0 0 0 / 82%);\n }\n\n .lightbox-content {\n\t\t\t\t&.images-nb-1 {\n\t\t\t\t\t\t.left, .right {\n\t\t\t\t\t\t\t\tdisplay: none!important;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tborder-radius: 9px;\n\t\t\t\toverflow: hidden;\n position: absolute;\n width: 95vw;\n height: 95vh;\n background: black;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%); \n\t\t\t\t.zoom, .dezoom {\n\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\tz-index: 100;\n\t\t\t\t\t\theight: 43px;\n\t\t\t\t\t\tmargin-right: 5px;\n\t\t\t\t\t\tsvg path {\n\t\t\t\t\t\t\t\tbox-shadow: 0px 0px 5px #0006;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tsvg {\n\t\t\t\t\t\tbackground: white;\n\t\t\t\t\t\tpadding: 3px;\n\t\t\t\t\t\tborder-radius: 22px;\n\t\t\t\t\t\twidth: 13px;\n\t\t\t\t\t\tbox-shadow: 0px 0px 5px #00000040;\n\n\t\t\t\t}\n\n .lightbox-image {\n position: relative;\n justify-content: space-around;\n align-items: center;\n width: 100%;\n height: 100%;\n\n &:hover {\n .image-infos {\n display: block;\n }\n }\n .image-infos {\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\ttop: 0px;\n\t\t\t\t\t\t\t\theight: 55px;\n\t\t\t\t\t\t\t\tleft: 0px;\n\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\tbackground: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0) 100%);\n\t\t\t\t\t\t\t\tul {\n\t\t\t\t\t\t\t\t\t\tmargin-top: 5px;\n\t\t\t\t\t\t\t\t\t\tjustify-content: flex-end;\n\t\t\t\t\t\t\t\t\t\theight: 95vh;\n\t\t\t\t\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\t\t\t\t\tmargin: 0px;\n\t\t\t\t\t\t\t\t\t\tli {\n\t\t\t\t\t\t\t\t\t\t\t\t&.left,\n\t\t\t\t\t\t\t\t\t\t\t\t&.right {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttop: 0px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\theight: 100%;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 20%;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tjustify-content: space-evenly;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbutton {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdisplay: none;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t&:hover {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbutton {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdisplay: block;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t&.left {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tleft: 0px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tz-index:3;\n\t\t\t\t\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t\t\t\t\t&.right {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tright: 0px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tz-index:3;\n\t\t\t\t\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t\t\t\t\t&.close {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding: 10px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tposition:relative;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tz-index:4;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n // position: relative;\n &:hover {\n .image-name {\n display: block;\n }\n }\n .image-name {\n display: none;\n cursor: pointer;\n color: grey;\n padding: 5px;\n font-size: 10px;\n position: absolute;\n top: 5px;\n left: 5px;\n }\n }\n\t\t\t\t\t\t.image-zoom-wrapper {\n\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\theight: 100%;\n\t\t\t\t\t\t\t\ttext-align: center;\n\t\t\t\t\t\t\t\toverflow: scroll;\n\t\t\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\t\t\tz-index: 2;\n\t\t\t\t\t\t\t\timg {\n\t\tvertical-align: middle;\n\t\t\t\t\t\t\t\t\t\t/* max-width: 95vw; */\n\t\t\t\t\t\t\t\t\t\tz-index:2;\n\t\t\t\t\t\t\t\t\t\t/* position: relative; */\n\t\t\t\t\t\t\t\t\t\t/* max-height: 95vh; */\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n }\n }\n\n}\n","\n\t\t").concat("\n .prompt-popup-component {\n\t\t\t\t.popup-wrapper {\n\t\t\t\t\t\tmin-width: 200px;\n\t\t\t\t\t\tmin-height: 100px;\n\t\t\t\t\t\ttext-align:center;\n\t\t\t\t}\n }\n","\n\t\t").concat("\n\t\t\t\t\t\t&.device-view-mobile {\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.suggest-popup-bg.hide {\n\t\t\t\t\t\t\t\tdisplay:none;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.suggest-popup-bg {\n\t\t\t\t\t\t\t\tbackground: rgba(0,0,0,0.5);\n\t\t\t\t\t\t\t\ttop: 0px;\n\t\t\t\t\t\t\t\tleft: 0px;\n\t\t\t\t\t\t\t\twidth: 100vw;\n\t\t\t\t\t\t\t\theight: 100vh;\n\t\t\t\t\t\t\t\tz-index: 1000;\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.suggest-popup-wrapper {\n\t\t\t\t\t\t\t\twidth: 88%;\n\t\t\t\t\t\t\t\tmargin: 0 auto;\n\t\t\t\t\t\t\t\tz-index: 100;\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\tleft: 50%;\n\t\t\t\t\t\t\t\ttransform: translate(-50%);\n\t\t\t\t\t\t\t\ttop: 22px;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.help-right {\n\t\t\t\t\t\t\t\tcursor:pointer;\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\tright: 3px;\n\t\t\t\t\t\t\t\ttop: 3px;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.help {\n\t\t\t\t\t\t\t\tcolor:white;\n\t\t\t\t\t\t\t\tmargin-bottom: 10px;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.preview-wrapper {\n\t\t\t\t\t\t\t\toverflow-y: scroll;\n\t\t\t\t\t\t\t\tbackground: white;\n\t\t\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.barimage {\n\t\t\t\t\t\t\t\theight: 60px; \n\t\t\t\t\t\t\t\twidth: 100px;\n\n\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\tdiv[class$='-menu']>div {\n\t\t\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\t\t\tflex-wrap: wrap;\n\t\t\t\t\t\t\t\tjustify-content: flex-start;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tdiv[class$='-option'] {\n\t\t\t\t\t\t\t\twidth: ".concat("mobile"===Object(c.a)()?"100":"20","%;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.path-option-wrapper {\n\n\t\t\t\t\t\t\t\tword-break: break-word;\n\t\t\t\t\t\t\t\t.search-location {\n\t\t\t\t\t\t\t\t\t\tcolor: #b3b1b1;\n\t\t\t\t\t\t\t\t\t\tfont-size: 9px;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.folder {\n\t\t\t\t\t\t\t\t\t\tcolor: grey;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.file {\n\t\t\t\t\t\t\t\t\t\tfont-weight: bold;\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.html-preview-wrapper {\n\t\t\t\t\t\t\t\toverflow: hidden;\n\t\t\t\t\t\t\t\t.html-preview {\n\t\t\t\t\t\t\t\t\t\tiframe {\n\t\t\t\t\t\t\t\t\t\t\t\t// transform: scale(0.65);\n\t\t\t\t\t\t\t\t\t\t\t\ttransform: scale(0.8);\n\t\t\t\t\t\t\t\t\t\t\t\ttransform-origin:top left;\n\t\t\t\t\t\t\t\t\t\t\t\tborder:none;\n\t\t\t\t\t\t\t\t\t\t\t\twidth: 125%;\n\t\t\t\t\t\t\t\t\t\t\t\theight: 125%;\n\t\t\t\t\t\t\t\t\t\t\t\t// width: 155%;\n\t\t\t\t\t\t\t\t\t\t\t\t// height: 155%;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t"),"\n\n\t\t").concat("\n .app-view-switcher-component {\n margin: 0px 10px 10px 10px;\n ul.buttons-toolbar-component {\n li {\n margin-left: 5px;\n margin-right: 5px;\n }\n }\n }\n","\n\t\t").concat(Object(b.b)(),"\n\n\n\t\t").concat("\n .image-gallery-component-wrapper {\n margin: 0px 17px;\n overflow-y: scroll;\n // height: calc(100vh - ".concat(d.a.sizes.search.padding+d.a.sizes.gallery.topH+("desktop"===Object(c.a)()?0:190),"px);\n height: calc(100vh - ").concat(d.a.sizes.search.padding+d.a.sizes.gallery.topH,"px);\n // height: 100%;\n width: 100%;\n\n .masonry-gallery {\n display: flex;\n list-style: none;\n flex-direction: row;\n flex-wrap: wrap;\n\n .masonry-col {\n width: ").concat("desktop"===Object(c.a)()?32:90,"%;\n margin-right: 1%;\n\n .masonry-col-item {\n position: relative;\n &:hover {\n .image-infos {\n display: block;\n }\n }\n .image-infos {\n display: none;\n ").concat(d.a.els().imageInfos,"\n }\n img {\n ").concat(d.a.els().images,"\n }\n margin-bottom: 10px;\n }\n }\n }\n }\n"),"\n\n\t\t").concat(Object(pt.b)(),"\n\n\t\t").concat("\n.search-bar-component {\n input {\n\t\t\t\tborder-radius: 5px;\n width: calc(100% - ".concat(2*d.a.sizes.block+20,"px);\n border: none;\n background: white;\n\t\t\t\tpadding: 18px 9px;\n\t\t\t\tmargin: 0px 15px 15px 15px;\n\t\t\t\tbox-shadow: 0px 0px 6px rgb(0 0 0 / 5%);\n\t\t\t\tfont-size: 11px;\n margin: 0px ").concat(d.a.sizes.block,"px ").concat(d.a.sizes.block,"px ").concat(d.a.sizes.block,"px; \n &::placeholder {\n color: #afadad;\n }\n }\n .search-status {\n text-align: center;\n font-size: 8px;\n\t\t\t\tposition: relative;\n\t\t\t\tbottom:9px;\n\t\t\t\tcolor: grey;\n }\n}\n"),"\n\n\t\t").concat("\n.mobile-view-toggler {\n position: fixed;\n bottom: 0px;\n left: 0px;\n z-index: 10;\n display:flex;\n width: 100%;\n list-style: none;\n margin: 0px;\n padding: 0px;\n background: ".concat(d.a.colors.main,";\n li {\n flex: 1 1 auto;\n button {\n ").concat(d.a.els().button,";\n padding: 8px;\n width: 100%;\n svg {\n color: white;\n transform: scale(1.1);\n background: rgba(255,255,255,0);\n padding: 10px 27px;\n border-radius: 6px;\n }\n &:hover {\n svg {\n color: white;\n }\n }\n &.active {\n svg {\n color: white;\n background: rgba(255,255,255,0.2);\n }\n }\n }\n }\n}\n"),"\n\n\t\t").concat("\n.connection-status {\n font-size: 9px;\n z-index: 11;\n a {\n margin-left: 10px;\n color: white;\n }\n .back-online, .disconnected {\n position: absolute;\n text-align:center;\n color:white;\n top: 0px;\n left: 0px;\n width: 100vw;\n padding: 1px;\n }\n .back-online{\n background: green;\n }\n .disconnected{\n background: ".concat(d.a.colors.main,";\n }\n .connected {\n display:none;\n position: absolute;\n bottom: 5px;\n right: 5px;\n color: ").concat(d.a.colors.green,";\n }\n}\n"),"\n\n\t\t").concat("\n .setup-popup-component {\n .submit-button {\n margin-top: 10px;\n ".concat(d.a.els().redButton,";\n padding: 10px 20px;\n }\n .error {\n color: ").concat(d.a.colors.main,";\n }\n .success {\n color: ").concat(d.a.colors.green,";\n }\n }\n"),"\n\n\t\t").concat(Object(Q.b)(),"\n\n\t\t").concat(Object(gt.b)(),"\n\n\t\t").concat(Object(ht.c)(),"\n\n\t\t").concat("\n.last-notes-component {\n padding: 0px ".concat(d.a.sizes.block,"px;\n \n h3 {\n\n }\n ul {\n height: ").concat(110,"px;\n overflow: hidden;\n &:hover {\n min-height: ").concat(110,"px;\n height: auto;\n }\n\n padding: 0px;\n margin: 0px;\n li {\n cursor: pointer;\n margin-bottom: 7px;\n overflow: hidden;\n height: ").concat(15,"px;\n list-style: none;\n font-size: 11px;\n font-weight: 400;\n svg {\n color: ").concat(d.a.colors.main,";\n margin-right: 10px;\n }\n }\n }\n}\n"),"\n\t\t").concat("\n.shortcut-component {\n\t\tmargin: 0px ".concat(d.a.sizes.block,"px;\n\t\tmargin-bottom: 10px;\n\t\toverflow: hidden;\n\t\t.rendered-note-component {\n\t\t\t\twidth: 800px;\n\t\t\t\t.preview-link {\n\t\t\t\t\t\tcolor: #585757!important;\n\t\t\t\t}\n\t\t\t\t.preview-link {\n\t\t\t\t\t\tfont-weight: 400!important;\n\t\t\t\t}\n\t\t\t\t\n\t\t}\n}\n"),"\n\t\t").concat("\n.rendered-note-component {\n\t\th3 {\n\n\t\t}\n\t\t.rendered-note-content-wrapper {\n\t\t\t".concat(Object(f.c)(),"\n\t\t\t\t&>p {\n\t\t\t\t\t\tmargin: 0px;\n\t\t\t\t\t\tpadding:0px;\n\t\t\t\t}\n\n\t\t}\n\n}\n"),"\n\n\t\t").concat("\n\n.note-preview-wrapper {\n\t\tpadding: 15px ;\n\t\t".concat(Object(f.c)(),"\n\t\t.simple-css-wrapper {\n\n\t\t\t\t.resource-link-content-wrapper ul {\n\t\t\t\t\t\topacity:1!important;\n\t\t\t\t\t\tpointer-events:all!important;\n\t\t\t\t}\n\t\t\t\tiframe {\n\t\t\t\t\t\theight: 400px!important;\n\t\t\t\t}\n\t\t\t\t.resource-link-iframe-wrapper {\n\t\t\t\t\t\tmargin-bottom: 5px;\n\t\t\t\t}\n\t\t}\n\n\t\t.found-word {\n\t\t\t\tfont-weight: bold;\n\t\t\t\tbackground: #fff876;\n\t\t\t\tpadding: 2px;\n\t\t}\n\n\t\t// .note-preview-wrapper .content-preview h3.note-title {\n\t\t\t\t// \t\tmargin-bottom: 10px;\n\t\t\t\t// \t\tmargin-top: 0px;\n\t\t\t\t// }\n\t\t// .note-preview-wrapper .content-preview p {\n\t\t\t\t// \t\tmargin: 0px;\n\t\t\t\t// }\n\t\t// .note-preview-wrapper .content-preview ul,\n\t\t// .note-preview-wrapper .content-preview li {\n\t\t\t\t// \t\tmargin: 0px;\n\t\t\t\t// }\n\t\t// .note-preview-wrapper .content-preview img {\n\t\t\t\t// \t\tmax-width: 300px;\n\t\t\t\t// }\n\t\t// .note-preview-wrapper .content-preview .file-content {\n\t\t\t\t// \t\tpadding: 10px 30px;\n\t\t\t\t// }\n\t\t// .note-preview-wrapper .content-preview {\n\t\t\t\t// \t\t/* max-height: 50vh; */\n\t\t\t\t// }\n\n}\n"),"\n\t\t").concat(Object(Rt.b)(),"\n\n\t\t").concat(Object(tt.b)(),"\n\t\t\t\t").concat(Object(Ft.b)(),"\n\t\t.main-wrapper {\n\t\t\t\t").concat("\n&.device-view-mobile {\n\t\t.folder-tree-view-component {\n\t\t\t\tli.folder-wrapper {\n\t\t\t\t\t\t.context-menu-wrapper {\n\t\t\t\t\t\t\t\tright: -10px;\n\t\t\t\t\t\t\t\t.context-menu {\n\t\t\t\t\t\t\t\t\t\tright: 5px;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n}\n\n.folder-tree-view-component {\n\t\tpadding: ".concat(d.a.sizes.block,"px;\n\t\tpadding-right: 0px;\n\t\tmargin: 0px 0px 100px 0px;\n\t\twidth: calc(100% - ").concat(d.a.sizes.block*(Object(c.b)("desktop")&&!Object(c.c)()?1:2),"px);\n\n\t\tul.folder-children {\n\t\t\t\tmargin: 0px 0px 0px 0px;\n\t\t\t\tpadding: 0px 0px 0px 10px;\n\t\t}\n\n\t\tli.folder-wrapper {\n\n\t\t\t\tposition: relative;\n\t\t\t\tlist-style: none;\n\t\t\t\tfont-size: 13px;\n\t\t\t\tfont-weight: 600;\n\t\t\t\tcursor: pointer;\n\n\t\t\t\t.context-menu-wrapper {\n\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\tright: 10px;\n\t\t\t\t\t\ttop: -10px;\n\t\t\t\t\t\tpadding: 10px;\n\t\t\t\t\t\tdisplay:none;\n\t\t\t\t\t\t.context-menu {\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\tright: 0px;\n\t\t\t\t\t\t\t\ttop: 15px;\n\t\t\t\t\t\t\t\tbackground: white;\n\t\t\t\t\t\t\t\tbox-shadow: 0px 0px 4px rgb(0 0 0 / 10%);\n\t\t\t\t\t\t\t\tcolor: black;\n\t\t\t\t\t\t\t\tpadding: 0px 0px;\n\t\t\t\t\t\t\t\twidth: 100px;\n\t\t\t\t\t\t\t\tz-index: 100;\n\t\t\t\t\t\t\t\tborder-radius: 4px;\n\t\t\t\t\t\t\t\tfont-size: 10px;\n\t\t\t\t\t\t\t\tul {\n\t\t\t\t\t\t\t\t\t\tlist-style: none;\n\t\t\t\t\t\t\t\t\t\tpadding: 0px;\n\t\t\t\t\t\t\t\t\t\tmargin: 0px;\n\t\t\t\t\t\t\t\t\t\tli {\n\t\t\t\t\t\t\t\t\t\t\t\tpadding: 4px 11px;\n\t\t\t\t\t\t\t\t\t\t\t\t&:hover {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbackground: ").concat(d.a.colors.main,";\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t.folder-title:hover > .context-menu-wrapper {\n\t\t\t\t\t\tcursor:pointer;\n\t\t\t\t\t\tdisplay:block;\n\t\t\t\t}\n\t\t\t\t&.current > .folder-title {\n\t\t\t\t\t\tcolor: ").concat(d.a.colors.main,";\n\t\t\t\t\t\ttext-decoration: underline;\n\t\t\t\t}\n\t\t\t\t.folder-title {\n\t\t\t\t\t\tposition: relative;\n\n\t\t\t\t\t\t.title-label {\n\t\t\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\t\t\tz-index: 0;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.title-drag-bg {\n\t\t\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\t\t\tpadding: 5px;\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\twidth: calc(100% - 8px);\n\t\t\t\t\t\t\t\theight: 100%;\n\t\t\t\t\t\t\t\ttop: -4px;\n\t\t\t\t\t\t\t\tz-index: -1;\n\t\t\t\t\t\t\t\tleft: -5px;\n\t\t\t\t\t\t\t\ttransition: 50ms;\n\t\t\t\t\t\t\t\tbackground: rgba(255,255,255,0);\n\t\t\t\t\t\t\t\tz-index:0;\n\t\t\t\t\t\t\t\tpointer-events: none;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t&.drag .title-drag-bg {\n\t\t\t\t\t\t\t\tbackground: rgba(255,255,255,0.6);\n\t\t\t\t\t\t\t\tpointer-events: all;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tpadding: 1px;\n\t\t\t\t\t\tposition:relative;\n\t\t\t\t\t\tpadding-left: 20px;\n\t\t\t\t\t\t.icon {\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\tleft: 2px;\n\t\t\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\t\t\tpadding: 1px;\n\t\t\t\t\t\t\t\ttop: 0px;\n\t\t\t\t\t\t\t\tsvg {\n\t\t\t\t\t\t\t\t\t\tcolor: ").concat(d.a.colors.main,";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t}\n\t\t}\n\t\t\n}\n"),"\n\t\t\t\tdisplay: flex;\n\t\t\t\t.no-file {\n\t\t\t\t\t\ttext-align: center;\n\t\t\t\t\t\tmargin-top: 49vh;\n\t\t\t\t}\n\n\n\n\n\n\n\n\n\t\t\t\t////////////////////////////////////////////v \n\t\t\t\t// LEFT 1\n\t\t\t\t////////////////////////////////////////////v\n\t\t\t\t\n\t\t\t\t").concat("\n .new-file-button {\n ".concat(d.a.els().redButton,"\n ").concat(d.a.font.main,";\n padding: ").concat(Object(c.b)("desktop")?"14px 5px":"13px 7px",";\n margin: 13px 15px 15px 15px;\n\t\t\t\twidth: calc(100% - 30px); \n font-size: ").concat((Object(c.b)("desktop"),11),"px;\n svg {\n margin-right: ").concat(Object(c.b)("desktop")?"10px":"5px",";\n }\n \n }\n"),"\n\n\t\t\t\t&.device-view-mobile {\n\t\t\t\t\t\t.settings-button {\n\t\t\t\t\t\t\t\tbottom: 60px;\n\t\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\t.settings-button {\n\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\tposition: fixed;\n\t\t\t\t\t\tbottom: 10px;\n\t\t\t\t\t\tleft: 10px;\n\t\t\t\t\t\tz-index: 11;\n\t\t\t\t}\n\n\n\n\t\t\t\t&.without-sidebar.device-view-desktop {\n\t\t\t\t\t\t.left-sidebar-indicator {\n\t\t\t\t\t\t\t\tdisplay: block;\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\ttop: 0%;\n\t\t\t\t\t\t\t\tz-index:100;\n\t\t\t\t\t\t\t\twidth: 18px;\n\t\t\t\t\t\t\t\theight: 100vh;\n\t\t\t\t\t\t\t\tbackground: rgb(236, 236, 236);\n\t\t\t\t\t\t\t\tbox-shadow: 0px 0px 5px rgba(0,0,0,.2);\n\t\t\t\t\t\t\t\tmargin: 0% 0px;\n\t\t\t\t\t\t\t\tborder-radius: 0px 5px;\n\t\t\t\t\t\t\t\t.left-wrapper {\n\t\t\t\t\t\t\t\t\t\tbox-shadow: 0px 0px 5px rgba(0,0,0,.2);\n\t\t\t\t\t\t\t\t\t\ttransition: 0.2s all;\n\t\t\t\t\t\t\t\t\t\ttransition-delay: ").concat(d.a.anim.time,";\n\t\t\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\t\t\tleft: -").concat(Dt.desktop.l,"vw;\n\t\t\t\t\t\t\t\t\t\ttop: 0px;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.left-sidebar-indicator:hover {\n\t\t\t\t\t\t\t\t.left-wrapper {\n\t\t\t\t\t\t\t\t\t\tleft: 0vw;\n\t\t\t\t\t\t\t\t\t\ttop: 0px;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t.invisible-scrollbars {\n\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\tpadding-right: 18px;\n\t\t\t\t\t\toverflow-y: scroll;\n\t\t\t\t\t\theight: ").concat("desktop"===Object(c.a)()?"100vh":"calc(100vh - 48px)","; \n\t\t\t\t}\n\n\t\t\t\t.left-wrapper {\n\t\t\t\t\t\tbackground: ").concat(Pt.l2.bg,"; \n\t\t\t\t\t\twidth: ").concat("desktop"===Object(c.a)()?Dt.desktop.l:"navigator"!==t?0:100,"vw;\n\n\t\t\t\t\t\tdisplay: ").concat("desktop"===Object(c.a)()?"flex":"navigator"!==t?"none":"flex",";\n\n\n\t\t\t\t\t\t.left-wrapper-1 {\n\t\t\t\t\t\t\t\toverflow: hidden;\n\t\t\t\t\t\t\t\tbackground-image: url('").concat(d.a.assets.decoBgMap,"');\n\t\t\t\t\t\t\t\tbackground-color: ").concat(d.a.colors.bgInterface2,";\n\t\t\t\t\t\t\t\tbackground-blend-mode: color-burn;\n\t\t\t\t\t\t\t\tcolor: ").concat(d.a.colors.fontInterface2,";\n\t\t\t\t\t\t\t\twidth: ").concat(Dt.desktop.l1,'%;\n\t\t\t\t\t\t\t\theight:100vh;\n\t\t\t\t\t\t\t\tposition: relative;\n\n\n\t\t\t\t\t\t\t\th3.subtitle {\n\t\t\t\t\t\t\t\t\t\tmargin: 0px 0px 15px;\n\t\t\t\t\t\t\t\t\t\tfont-family: "Open sans", sans-serif;\n\t\t\t\t\t\t\t\t\t\ttext-transform: uppercase;\n\t\t\t\t\t\t\t\t\t\tfont-size: 14px;\n\t\t\t\t\t\t\t\t\t\tfont-weight: 800;\n\t\t\t\t\t\t\t\t\t\tfont-style: italic;\n\t\t\t\t\t\t\t\t\t\tcolor: ').concat(Pt.main,";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t////////////////////////////////////////////v \n\t\t\t\t\t\t// TEXT VIEW : LEFT 2\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t////////////////////////////////////////////v2\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.left-wrapper-2 {\n\t\t\t\t\t\t\t\twidth: ").concat(Dt.desktop.l2,"%;\n\t\t\t\t\t\t\t\theight:100vh;\n\t\t\t\t\t\t\t\toverflow: hidden;\n\t\t\t\t\t\t\t\tbackground: ").concat(d.a.colors.bgInterface,";\n\n\n\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t.top-files-list-wrapper {\n\t\t\t\t\t\t\t\t\t\tpadding-top: ").concat(Dt.search.padding,"px;\n\t\t\t\t\t\t\t\t\t\theight: ").concat(Dt.search.h,"px;\n\t\t\t\t\t\t\t\t\t\t.subtitle-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\t\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\t\t\t\t\t\t\t.folder-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding: 2px 16px 10px 20px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* margin-top: 4px; */\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfont-weight: bold;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcolor: #aeadad;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t.toggle-sidebar-btn {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tright: 10px;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\th3.subtitle {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmargin: 0px ").concat(Dt.block,"px ").concat(Dt.block,"px ").concat(Dt.block,"px; \n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t.counter {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmargin: 0px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmargin-top: 2px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcolor: ").concat(Pt.l2.text,";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfont-size: 10px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfont-weight: 800;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t.files-list-component {\n\t\t\t\t\t\t\t\tposition: relative\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.list-toolbar {\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\ttop: -93px;\n\t\t\t\t\t\t\t\tright: 23px;\n\t\t\t\t\t\t\t\tcolor: ").concat(Pt.l2.text,";\n\t\t\t\t\t\t\t\tbutton {\n\t\t\t\t\t\t\t\t\t\tcolor: ").concat(Pt.l2.text,";\n\t\t\t\t\t\t\t\t\t\t").concat(At().button,"\n\t\t\t\t\t\t\t\t\t\tpadding: 0px;\n\t\t\t\t\t\t\t\t\t\tmargin-right: ").concat(Dt.block,"px; \n\t\t\t\t\t\t\t\t\t\tfont-size: 10px;\n\t\t\t\t\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\t\t\t\t\tspan {\n\t\t\t\t\t\t\t\t\t\t\t\tmargin-right: 5px;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t.items-list-count {\n\t\t\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\t\t\tcolor: grey;\n\t\t\t\t\t\t\t\t\t\tfont-size: 10px;\n\t\t\t\t\t\t\t\t\t\tright: 10px;\n\t\t\t\t\t\t\t\t\t\ttop: 5px;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t").concat("\n.list-wrapper {\n .list-wrapper-scroller{\n height: 100%;\n width: calc(100% + 20px);\n overflow-y:scroll;\n overflow: hidden;\n }\n\n .mobile-buttons-up-down {\n position: fixed;\n right: 0px;\n z-index: 10;\n top: 50%;\n div {\n background: #d6d6d6;\n padding: 10px;\n color:white;\n cursor: pointer;\n }\n }\n\n div.List {\n list-style: none;\n margin-right:20px;\n padding: 0px 0px 0px 0px;\n &.multiselect-mode {\n\t\t\t\t\t\tli .label {\n\t\t\t\t\t\t\t\tmargin-left: 4px;\n\t\t\t\t\t\t}\n }\n\n // NORMAL\n li {\n padding: ".concat(G.l2.fileLi.padding,"px ").concat(G.block-G.l2.fileLi.margin,"px;\n margin: ").concat(G.l2.fileLi.margin,"px ").concat(G.l2.fileLi.margin+5,"px ").concat(G.l2.fileLi.margin,"px ").concat(G.l2.fileLi.margin,"px ;\n display: block;\n cursor: pointer;\n position: relative;\n height: ").concat(G.l2.fileLi.height,"px;\n overflow: hidden;\n border: 2px rgba(0,0,0,0) solid;\n \n // ACTIVE\n &:hover,\n &.multiselected,\n &.active {\n }\n\n display: flex;\n justify-content: center;\n\t\t\t\t\t\t&.active .background-item-border,\n\t\t\t\t\t\t&.active .background-item {\n\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\theight: 100%;\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\ttop: 0px;\n\t\t\t\t\t\t\t\tleft: 0px;\n\t\t\t\t\t\t\t\tbackground: ").concat(d.a.colors.main,";\n\t\t\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\t\t\tz-index: -1;\n\t\t\t\t\t\t\t\topacity: 0.2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t&.active .background-item-border {\n\t\t\t\t\t\t\t\twidth: calc(100% - 4px);\n\t\t\t\t\t\t\t\theight: calc(100% - 4px);\n\t\t\t\t\t\t\t\tbackground: none;\n\t\t\t\t\t\t\t\tborder: 2px ").concat(d.a.colors.main," solid;\n\t\t\t\t\t\t\t\topacity: 0.3;\n\t\t\t\t\t\t}\n \n\t\t\t\t\t\th3 {\n\t\t\t\t\t\t\t\tfont-size: 12px;\n\t\t\t\t\t\t}\n .left {\n\t\t\t\t\t\t\t\t// width: calc(100% - ").concat(G.l2.fileLi.img,"px - 10px);\n\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\tpadding-right: 10px;\n\n\t\t\t\t\t\t\t\tdisplay:flex;\n\t\t\t\t\t\t\t\tflex-direction:column;\n\n\t\t\t\t\t\t\t\t.label {\n\t\t\t\t\t\t\t\t\t\tmargin: 0px;\n\t\t\t\t\t\t\t\t\t\tmax-height: 35px;\n\t\t\t\t\t\t\t\t\t\t//height: 46px;\n\t\t\t\t\t\t\t\t\t\t// display: flex;\n\t\t\t\t\t\t\t\t\t\t// align-items: center;\n\t\t\t\t\t\t\t\t\t\tmargin-bottom: 2px;\n\t\t\t\t\t\t\t\t\t\toverflow: hidden;\n\t\t\t\t\t\t\t\t\t\ttext-overflow: ellipsis;\n\t\t\t\t\t\t\t\t\t\tcolor: ").concat(V.l2.title,";\n\t\t\t\t\t\t\t\t\t\tline-break: anywhere;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t.content {\n\t\t\t\t\t\t\t\t\t\tcolor: grey;\n\t\t\t\t\t\t\t\t\t\tmargin-bottom: 3px;\n\t\t\t\t\t\t\t\t\t\theight: 25px;\n\t\t\t\t\t\t\t\t\t\tfont-size: 9px;\n\t\t\t\t\t\t\t\t\t\toverflow: hidden;\n\t\t\t\t\t\t\t\t\t\tline-break: anywhere;\n\t\t\t\t\t\t\t\t\t\tword-break: break-word;\n\t\t\t\t\t\t\t\t\t\t").concat(Object(c.b)("desktop")?"":"max-height: 25px;","\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t.date {\n\t\t\t\t\t\t\t\t\t\tcolor: ").concat(V.l2.date,";\n\t\t\t\t\t\t\t\t\t\tfont-size: 10px;\n\t\t\t\t\t\t\t\t\t\tfont-weight: 700;\n\t\t\t\t\t\t\t\t}\n }\n\n .right {\n\t\t\t\t\t\t\t\t.picture {\n\t\t\t\t\t\t\t\t\t\twidth: ").concat(G.l2.fileLi.img,"px;\n\t\t\t\t\t\t\t\t\t\theight: ").concat(G.l2.fileLi.img,"px;\n\t\t\t\t\t\t\t\t\t\tbackground-size: cover;\n\t\t\t\t\t\t\t\t\t\tz-index: 1;\n\t\t\t\t\t\t\t\t\t\tmargin-top: 3px;\n\t\t\t\t\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\t\t\t\t\tborder: 2px white solid;\n\t\t\t\t\t\t\t\t}\n }\n }\n }\n}\n"),"\n\n\t\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\t\n\n\n\n\n\n\n\n\n\n\t\t\t\t////////////////////////////////////////////v \n\t\t\t\t// IMAGE GALLERY VIEW\n\t\t\t\t////////////////////////////////////////////v\n\t\t\t\t.right-wrapper.image-gallery-view {\n\t\t\t\t\t\tbackground: ").concat(Pt.l2.bg,"; \n\t\t\t\t\t\t.image-gallery-header {\n\t\t\t\t\t\t\t\tpadding-top: ").concat(Dt.search.padding,"px;\n\t\t\t\t\t\t\t\theight: ").concat(Dt.gallery.topH,"px;\n\n\t\t\t\t\t\t\t\t.search-bar-component {\n\t\t\t\t\t\t\t\t\t\t// padding: 10px 0px;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.image-gallery-component-wrapper {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t}\n\n\n\n\t\t\t\t////////////////////////////////////////////v \n\t\t\t\t// TEXT VIEW : RIGHT\n\t\t\t\t\t\t\t\t\t\t\t\t\t ////////////////////////////////////////////v \n\t\t\t\t\t\t\t\t\t\t\t\t\t ").concat("\n.tab-list-scroll-wrapper {\n\t\theight: 44px;\n\t\tbackground: ".concat(d.a.colors.bgTabs,";\n border-radius: 0px 0px 0px 5px;\n\t\toverflow: hidden;\n\t\t.tab-list-invisible-scroll {\n\t\t\t\twidth: 100%;\n\t\t\t\toverflow-x: scroll;\n\t\t\t\tpadding-bottom: 18px;\n\t\t\t\t.tab-list-wrapper {\n\t\t\t\t\t\tpadding: 7px 0px 0px 13px;\n\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\tbackground: ").concat(d.a.colors.bgTabs,";\n\t\t\t\t\t\tborder-radius: 0px 0px 0px 5px;\n\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\t&>div:last-child {\n\t\t\t\t\t\t\t\tmargin-right: 30px;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.tab-and-drag-wrapper {\n\t\t\t\t\t\t\t\tposition:relative;\n\t\t\t\t\t\t\t\t.drag-indic {\n\t\t\t\t\t\t\t\t\t\tz-index: 2;\n\t\t\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\t\t\ttop: -8px;\n\t\t\t\t\t\t\t\t\t\tleft: -6px;\n\t\t\t\t\t\t\t\t\t\twidth: 20px;\n\t\t\t\t\t\t\t\t\t\theight: 20px;\n\t\t\t\t\t\t\t\t\t\tcolor: #aaaaaa;\n\t\t\t\t\t\t\t\t\t\tfont-size: 8px;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.tab-wrapper {\n\t\t\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\t\t\talign-items:center;\n\t\t\t\t\t\t\t\tdisplay:flex;\n\t\t\t\t\t\t\t\tmargin-right: 5px;\n\t\t\t\t\t\t\t\tpadding: 5px;\n\t\t\t\t\t\t\t\tbackground: ").concat(d.a.colors.bgTab,";\n\t\t\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\t\t\tcolor: ").concat(d.a.colors.fontTab,";\n\t\t\t\t\t\t\t\tfont-family: ").concat(d.a.font.editor,";\n\t\t\t\t\t\t\t\theight: 35px;\n\t\t\t\t\t\t\t\tbox-shadow:rgb(0 0 0 / 20%) 0px -1px 2px ;\n\t\t\t\t\t\t\t\tborder-radius: 5px 5px 0px 0px;\n\t\t\t\t\t\t\t\tjustify-content: space-between;\n\t\t\t\t\t\t\t\tmax-height: 27px;\n\t\t\t\t\t\t\t\toverflow: hidden;\n\t\t\t\t\t\t\t\ttext-align: center;\n\t\t\t\t\t\t\t\t.tab-nb-windows {\n\t\t\t\t\t\t\t\t\t\tmargin-left: 10px;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.active-ribbon {\n\t\t\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\t\t\ttop: 0px;\n\t\t\t\t\t\t\t\t\t\tleft: 0px;\n\t\t\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\t\t\theight: 2px;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t&.active {\n\t\t\t\t\t\t\t\t\t\t.active-ribbon {\n\t\t\t\t\t\t\t\t\t\t\t\tbackground: ").concat(d.a.colors.main,";\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tbackground: ").concat(d.a.colors.bgTabActive,";\n\t\t\t\t\t\t\t\t\t\tfont-weight: bold\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t&.tab-more {\n\t\t\t\t\t\t\t\t\t\tmin-width: 30px;\n\t\t\t\t\t\t\t\t\t\twidth: 30px;\n\t\t\t\t\t\t\t\t\t\tmax-width: 30px;\n\t\t\t\t\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\t\t\t\t\tfont-weight: bold;\n\t\t\t\t\t\t\t\t\t\tfont-family: ").concat(d.a.font.main,";\n\t\t\t\t\t\t\t\t\t\tdisplay:flex;\n\t\t\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\t\t\tfont-size:14px;\n\t\t\t\t\t\t\t\t\t\tjustify-content: center;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.tab-name {\n\t\t\t\t\t\t\t\t\t\tpadding: 10px 0px 10px 10px;\n\n\t\t\t\t\t\t\t\t\t\tinput {\n\t\t\t\t\t\t\t\t\t\t\t\tcolor:").concat(d.a.colors.fontTab," ;\n\t\t\t\t\t\t\t\t\t\t\t\tfont-size: 11px;\n\t\t\t\t\t\t\t\t\t\t\t\tbackground: none;\n\t\t\t\t\t\t\t\t\t\t\t\tborder: none;\n\t\t\t\t\t\t\t\t\t\t\t\tmin-width: 30px;\n\t\t\t\t\t\t\t\t\t\t\t\tmax-width: 100px;\n\t\t\t\t\t\t\t\t\t\t\t\tfont-weight: 400;\n\t\t\t\t\t\t\t\t\t\t\t\tfont-family: ").concat(d.a.font.editor,";\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.tab-nb-windows {\n\t\t\t\t\t\t\t\t\t\tpadding: 10px 0px 10px 0px;\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.tab-close {\n\t\t\t\t\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\t\t\t\t\tmargin-left: 5px;\n\t\t\t\t\t\t\t\t\t\ttransform: rotate(45deg);\n\t\t\t\t\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\t\t\t\t\tmargin-left: 5px;\n\t\t\t\t\t\t\t\t\t\tpadding: 5px;\n\t\t\t\t\t\t\t\t\t\tfont-weight: bold;\n\t\t\t\t\t\t\t\t\t\tfont-family: ").concat(d.a.font.main,";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n}\n"),"\n\t\t\t\t").concat(Object(lt.d)(),"\n\t\t\t\t").concat(Object(lt.b)(),"\n\n\t\t\t\t").concat(Object(K.b)(),"\n\t\t\t\t").concat(Object(ct.b)(),"\n\n\t\t\t\t&.without-sidebar.device-view-desktop {\n\t\t\t\t\t\t.right-wrapper.dual-viewer-view {\n\t\t\t\t\t\t\t\twidth: calc(100vw - 18px);\n\t\t\t\t\t\t\t\tmargin-left: 18px;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t.right-wrapper.dual-viewer-view {\n\n\t\t\t\t\t\twidth: ").concat("desktop"===Object(c.a)()?Dt.desktop.r:"navigator"!==t?100:0,"vw;\n\t\t\t\t\t\theight: 100vh;\n\t\t\t\t\t\tdisplay: ").concat("desktop"===Object(c.a)()||"navigator"!==t?"block":"none",";\n\t\t\t\t\t\tpadding-top: 0px;\n\t\t\t\t\t\t.note-wrapper {\n\t\t\t\t\t\t\t\t.dual-view-wrapper.device-tablet, \n\t\t\t\t\t\t\t\t.dual-view-wrapper.device-mobile {\n\t\t\t\t\t\t\t\t\t\t.editor-area,\n\t\t\t\t\t\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.dual-view-wrapper {\n\t\t\t\t\t\t\t\t\t\t&.view-both.device-desktop {\n\t\t\t\t\t\t\t\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 50%;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\n\n\n\t\t\t\t\t\t\t\t\t\t.__EDITOR_DESIGN HERE__ {}\n\t\t\t\t\t\t\t\t\t\t&.view-editor.device-desktop {\n\t\t\t\t\t\t\t\t\t\t\t\t.editor-area {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* display:none; */\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 10px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tleft: -9999px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttop: -9999px;\n\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t&.view-editor-with-map.device-desktop {\n\t\t\t\t\t\t\t\t\t\t\t\t.editor-area {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 80%;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t.__MINIMAP_DESIGN HERE__ {}\n\n\t\t\t\t\t\t\t\t\t\t\t\t.preview-area-wrapper:hover {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\theight: calc(100% - 30px);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttransform: scale(1);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tright: -50%;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\topacity: 1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbox-shadow: -4px 5px 10px rgba(0, 0, 0, 0.10);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.preview-area-transitions {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 50%;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding: 0px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttransition-delay: ").concat(d.a.anim.time,";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* transition-delay: 0ms; */\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* transition-property: bottom; */\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tword-break: break-word;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttransform: scale(0.2) translateZ(0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttransform-origin: 0px 0px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tright: calc(-80%);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// height: 500vh;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\theight: calc(100% * 5);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.preview-area-transitions {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* transition-delay: 0ms; */\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* transition-property: bottom; */\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* transition-delay:").concat(d.a.anim.time,"; */\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* transition-property: padding; */\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttransition-delay:").concat(d.a.anim.time,"; \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* transition-property: all; */\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* transition-delay: 0ms; */\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* transition-property: bottom; */\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 73%;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding: 80px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding-right: 140px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding-left: 40px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t&.view-preview.device-desktop {\n\t\t\t\t\t\t\t\t\t\t\t\t.editor-area {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 0%;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.main-editor-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tleft: -9999px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.preview-area {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tposition:relative;\n\t\t\t\t\t\t\t\t\t\tdisplay: ").concat("desktop"===Object(c.a)()?"flex":"block",";\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t\t").concat(Object(p.c)(t),"\n\t\t\t\t\t\t\t\t\t\t").concat(Object(mt.b)(),"\n\n\n\t\t\t\t\t\t\t\t\t\t").concat(Object(f.b)(),"\n\n\t\t\t\t\t\t\t\t\t\t").concat(Object(ft.b)(),"\n\t\t\t\t\t\t\t\t\t\t").concat(Object(bt.b)(),'\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\th3 {\n\t\t\t\t\t\t\t\tmargin-bottom: 0px;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tpre {\n\t\t\t\t\t\t\t\twhite-space: -moz-pre-wrap; /* Mozilla, supported since 1999 */\n\t\t\t\t\t\t\t\twhite-space: -pre-wrap; /* Opera */\n\t\t\t\t\t\t\t\twhite-space: -o-pre-wrap; /* Opera */\n\t\t\t\t\t\t\t\twhite-space: pre-wrap; /* CSS3 - Text module (Candidate Recommendation) http://www.w3.org/TR/css3-text/#white-space */\n\t\t\t\t\t\t\t\tword-wrap: break-word; /* IE 5.5+ */\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n}\n\n\n.preview-content {\n\t\tcounter-reset: h2counter;\n h1 {\n counter-reset: h2counter;\n }\n h2:before {\n content: counter(h2counter) ".\\0000a0\\0000a0";\n counter-increment: h2counter;\n counter-reset: h3counter;\n }\n h3:before {\n content: counter(h2counter) "." counter(h3counter) ".\\0000a0\\0000a0";\n counter-increment: h3counter;\n }\n}\n\n\n');return Object(u.a)(e,";","")},zt=e(58),Bt="\n<style>\n.popupContent p {\n\t\tbackground: #dadada;\n padding: 3px 5px;\n\t\tmargin: 0px 4px;\n\t\tdisplay: inline-block;\n}\n</style>\n",Ut=function(t,n,e,o){var i=function(t,n){console.log("[MOVEFILE] ".concat(t," -> ").concat(n)),Object(x.e)().then((function(e){e.file.move(t,n,(function(){e&&e.ui.browser.goTo(e.ui.browser.folders.current.get)}))}))};return{askForMoveFile:i,promptAndBatchMoveFiles:function(n){var e=n.files,o=n.folderToDropInto,r="Move <p>".concat(null===e||void 0===e?void 0:e.length,'</p> file(s) to <p>"').concat(o.key,'"</p>?\n<br>\n<br>\nRessources links will be automatically updated<br>\n').concat(Bt,"\n");Object(x.d)((function(n){n.popup.confirm(r,(function(){!function(){for(var n=0;n<e.length;n++){var r=e[n],a="".concat(r.path),c="".concat(o.key,"/").concat(r.name);i(a,c),t()}}()}))}))},promptAndMoveFolder:function(e){var o=Object(s.a)({},e),i=o.folder,r=o.folderToDropInto,a=o.folderBasePath,c=o.newTitle,l=o.renameOnly,u=[i.path,"".concat(l?Object(zt.a)(r):r.path,"/").concat(c||i.title)],d="".concat(a,"/").concat(u[0]),p="".concat(a,"/").concat(u[1]),f="\n".concat(C.a.moveFolderPrompt," <p>").concat(u[0],"</p> to <p>").concat(u[1],"</p>?\n").concat(Bt,"\n"),b=function(){!function(t,n,cb){console.log("[MOVEFOLDER] ".concat(t," -> ").concat(n)),Object(x.d)((function(e){e.folders.move(t,n,(function(){e&&e.ui.browser.goTo(e.ui.browser.folders.current.get),cb&&cb()}))}))}(d,p,(function(){t(),n(),e.onMoveFn&&e.onMoveFn()}))};e.disablePrompt?b():Object(x.e)().then((function(t){t.popup.confirm(f,(function(){b()}))}))}}},Ht=e(65),Wt="[LAST FILE]",qt=w.a.client.log.verbose,Vt=e(98),Gt=e(146),Kt=e(143),Jt=function(){return{nature:"file",name:"",realname:"",path:"",folder:""}},Yt=function(t){var n=Object(o.useState)({}),e=Object(r.a)(n,2),i=e[0],c=e[1];Object(o.useEffect)((function(){}),[t.files]);var l=Object(o.useReducer)((function(t){return t+1}),0),s=Object(r.a)(l,2)[1],u=Object(o.useState)(2),p=Object(r.a)(u,2),f=p[0],b=p[1];Object(o.useEffect)((function(){Object(x.d)((function(t){b(t.userSettings.get("ui_filesList_sortMode"))}))}),[]);return Object(a.d)("div",{className:"files-list-component"},Object(a.d)("div",{className:"list-toolbar"},Object(a.d)("button",{type:"button",title:"sort",onClick:function(){var n=f+1>=U.a.length?0:f+1;Object(x.d)((function(e){e.userSettings.set("ui_filesList_sortMode",n),b(n),t.onSortFiles(Object(U.d)(t.files,n))}))}},Object(a.d)("span",null,t.files.length>0&&Object(a.d)("span",{className:"list-count"},"(",t.files.length,")"),U.b[f]),Object(a.d)(y.a,{name:"faSort",color:d.a.colors.l2.text}))),Object(a.d)("div",{className:"list-wrapper"},Object(a.d)(W,{files:t.files,filesPreview:i,hoverMode:!1,activeFileIndex:t.activeFileIndex,sortMode:f,onFileClicked:function(n){t.onFileClicked(n)},onFileDragStart:t.onFileDragStart,onFileDragEnd:t.onFileDragEnd,onVisibleItemsChange:function(t){!function(t){for(var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],e=[],o=0;o<t.length;o++){var r=t[o];i[r]&&!n||e.push(r)}e.length>1&&Object(x.d)((function(t){t.files.getPreviews(e,(function(t){Object(g.each)(t,(function(t){i[t.path]=t})),c(i),s()}))}))}(t,!0)}})))},$t=e(101),Zt="[PWA]",Xt=w.a.client.log.verbose,Qt=e(150),tn=e(77),nn=e(28),en=function(){var t=[];return window.speechSynthesis.getVoices().forEach((function(n,e){var o=n.lang?" (".concat(n.lang,")"):"",i="".concat(n.name).concat(o);t.push({key:e,label:i,obj:n})})),t},on=Object(S.a)((function t(n){var e=this;Object(T.a)(this,t),this.rawText=void 0,this.voice=void 0,this.text2read=void 0,this.chunkedText=void 0,this.chunkLength=1e3,this.currChunkId=0,this.currSpeechObj=void 0,this.speed=1,this.isLoaded=!1,this.shouldStop=!1,this.chunkText=function(t){for(var n=(t=t.replace(/(\r\n\r\n|\n\n|\r\r|\n)/gm,".")).split(/[.!?]+/),o=[],i=0;i<n.length;i++){var r=n[i];if(r.length>e.chunkLength)for(var a=r.split(" "),c="",l=0;l<a.length;l++)((c+=a[l]+" ").length>e.chunkLength||l===a.length-1)&&(o.push(c),c="");else o.push(r)}return o},this.loadVoice=function(t){e.voice=t},this.updateSpeed=function(t){e.speed=t},this.play=function(){if(e.isLoaded)window.speechSynthesis.resume();else{if(e.currChunkId>e.chunkedText.length-1)return console.log("[TTS] finished played");e.isLoaded=!0,e.currSpeechObj=new SpeechSynthesisUtterance,e.currSpeechObj.text=e.chunkedText[e.currChunkId],e.currSpeechObj.rate=e.speed,e.voice&&(e.currSpeechObj.voice=e.voice),setTimeout((function(){window.speechSynthesis.speak(e.currSpeechObj)}),0),e.currSpeechObj.addEventListener("end",(function(){e.isLoaded=!1,e.shouldStop?e.shouldStop=!1:(e.currChunkId+=1,e.play())}))}},this.isPlaying=function(){var t=window.speechSynthesis.speaking;return t&&(t=!window.speechSynthesis.paused),t},this.pause=function(){e.stop()},this.stop=function(){e.shouldStop=!0,e.isLoaded=!1,e.debounceReinitStop(),window.speechSynthesis.cancel()},this.debounceReinitStop=Object(g.debounce)((function(){e.shouldStop=!1}),1e3),this.goToChunk=function(t){t<=0||t>e.chunkedText.length-1||(e.currChunkId=t,e.isPlaying()&&e.debounceRestart())},this.extractToChunkPos=function(t){var n=e.chunkText(t),o=null;if(Object(g.each)(n,(function(t){if(t.length>50)return o=t,!1})),!o)return-1;var i=-1;return Object(g.each)(e.chunkedText,(function(t,n){if(-1!==t.indexOf(o))return i=n,!1})),i},this.getCurrentChunkText=function(){return e.chunkedText[e.currChunkId]},this.debounceRestart=Object(g.debounce)((function(){e.stop(),e.play()}),500),this.goBack=function(){e.goToChunk(e.currChunkId-1)},this.goForward=function(){e.goToChunk(e.currChunkId+1)},this.rawText=n.text,this.text2read=n.text.replace(nn.a.ressource,"").replace(nn.a.ref,"").replace(nn.a.baliseHtml,""),this.chunkedText=this.chunkText(this.text2read),console.log("[TTS] init new manager ",{p:n,text:this.chunkedText,length:this.chunkedText.length})})),rn=e(102),an=e(132),cn="[SCREEN WAKE LOCK]",ln=null,sn=function(){var t=Object(an.a)(Object(rn.a)().mark((function t(){return Object(rn.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,navigator.wakeLock.request("screen");case 3:ln=t.sent,console.log(cn,"ACTIVE"),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(cn,"Error : ".concat(t.t0.name,", ").concat(t.t0.message));case 10:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(){return t.apply(this,arguments)}}();var un=function(t){var n=Object(o.useState)(!1),e=Object(r.a)(n,2),i=e[0],l=e[1],s=Object(h.a)("tts-selected-voice",0),u=Object(r.a)(s,2),d=u[0],p=u[1],f=Object(o.useState)(!1),b=Object(r.a)(f,2),g=b[0],m=b[1],v=function(t){!0===t?sn():ln&&ln.release().then((function(){ln=null,console.log(cn,"DISABLED")})),m(t)},w=Object(h.a)("tts-pos-".concat(t.id),0),O=Object(r.a)(w,2),x=O[0],k=O[1],_=Object(h.a)("tts-rate",1),E=Object(r.a)(_,2),T=E[0],S=E[1],I=Object(o.useState)(0),N=Object(r.a)(I,2),F=N[0],R=N[1],L=Object(o.useRef)();window.tts=L,Object(o.useEffect)((function(){setTimeout((function(){en()[d]&&L.current.loadVoice(en()[d].obj)})),L.current=new on({text:t.fileContent}),L.current.goToChunk(x)}),[]),Object(o.useEffect)((function(){en()[d]&&L.current.loadVoice(en()[d].obj)}),[d]),Object(o.useEffect)((function(){L.current.updateSpeed(T)}),[T]);var A=Object(o.useRef)(!1);return j((function(){l(L.current.isPlaying());var n=-1;(n=0!==L.current.currChunkId?L.current.currChunkId:L.current.currChunkId=1,t.startString&&!A.current)&&(n=L.current.extractToChunkPos(t.startString),L.current.goToChunk(n),A.current=!0);-1!==n&&k(n),R(L.current.chunkedText.length)}),500),Object(o.useEffect)((function(){var n=L.current.getCurrentChunkText();t.onUpdate({totalChunks:F,currentChunk:x,isPlaying:i,currentText:n})}),[F,x,i]),Object(a.d)(dn,null,Object(a.d)(tt.a,{title:"".concat(C.a.ttsPopup.title),onClose:function(){L.current.stop(),t.onUpdate({totalChunks:F,currentChunk:x,isPlaying:!1}),t.onClose()}},Object(a.d)(Q.a,{value:d,type:"select",list:en(),label:C.a.ttsPopup.voice,onSelectChange:function(t){p(parseInt(t))}}),Object(a.d)("span",null," SPEED : "),Object(a.d)("input",{type:"range",value:T,min:"0",max:"3",step:"0.1",onChange:function(t){var n=t.target.value;S(n)}}),Object(a.d)("br",null),Object(a.d)("br",null),Object(a.d)("input",{type:"range",value:x,min:"0",max:F,onChange:function(t){var n=parseInt(t.target.value);L.current.goToChunk(n),k(n)}}),Object(a.d)("input",{type:"number",value:x,min:"0",max:F,onChange:function(t){var n=parseInt(t.target.value);L.current.goToChunk(n),k(n)}})," / ",F,Object(a.d)("div",{className:"buttons"},Object(a.d)("button",{onClick:function(t){L.current.goBack()}},Object(a.d)(y.a,{name:"faFastBackward",color:"black"})),Object(a.d)("button",{onClick:function(t){L.current.goToChunk(x),i?L.current.pause():L.current.play()}},Object(a.d)(y.a,{name:i?"faPause":"faPlay",color:"black"})),Object(a.d)("button",{onClick:function(t){L.current.goForward()}},Object(a.d)(y.a,{name:"faFastForward",color:"black"})),"desktop"!==Object(c.a)()&&Object(a.d)("button",{onClick:function(t){v(!0)}},Object(a.d)(y.a,{name:"faLock",color:"black"})))),g&&Object(a.d)("div",{className:"bg-lock"},Object(a.d)("button",{onContextMenu:function(t){v(!1)}},Object(a.d)(y.a,{name:"faUnlock",color:"black"}))))},dn=Object(tn.a)("div",{target:"e1kwupat0"})({name:"11mbgq1",styles:".bg-lock{position:fixed;top:0px;left:0px;width:100vw;height:100vh;z-index:1005;background:rgba(0,0,0,0.3);display:flex;justify-content:center;align-items:center;button{}}.popup-wrapper .popupContent{padding:20px;.input-component span,span{display:inline-block;width:30%;font-size:12px;font-weight:bold;}}"}),pn=e(115);Object(pn.a)(Object(a.d)((function(){Object(o.useEffect)((function(){return Xt&&console.log(Zt," init"),"serviceWorker"in navigator&&navigator.serviceWorker.register("/service-worker.js"),window.addEventListener("beforeinstallprompt",(function(t){t.preventDefault(),Xt&&console.log(Zt," beforeinstallprompt WORKING=>",t),window.deferredPrompt=t})),console.log("========= [APP] MOUNTED on a ".concat(Object(c.a)())),Object(l.d)().then((function(t){K(!0),Tt&&Tt.status.ipsServer.set(t.ipsServer),Object(x.d)((function(t){t.ui.browser.folders.refreshFromBackend()}))})),window.onkeydown=function(t){var n=z(t);Object(g.isNull)(D[n])||(D[n]=!0);var e="".concat(n,"-down");B[e]&&B[e]()},window.onkeyup=function(t){var n=z(t);Object(g.isNull)(D[n])||(D[n]=!1);var e="".concat(n,"-up");B[e]&&B[e]()},function(){console.log("app will unmount")}}),[]);var t=function(){It.active.set(-1)},n=function(){Et.ui.browser.files.set([])},e=function(t){var n=Object(o.useState)(!1),e=Object(r.a)(n,2),c=e[0],s=e[1],u=Object(o.useState)(""),d=Object(r.a)(u,2),p=d[0],f=d[1],b=Object(o.useState)(""),g=Object(r.a)(b,2),h=g[0],m=g[1],v=Object(o.useState)(""),O=Object(r.a)(v,2),x=O[0],j=O[1],k=Object(o.useState)(),y=Object(r.a)(k,2),_=y[0],E=y[1],T="[SETUP CONFIG]",S=w.a.client.log.verbose,I=Object(o.useRef)(0);return Object(o.useEffect)((function(){return S&&console.log(T," init socket listener"),I.current=l.b.on("getSetupInfos",(function(n){"SUCCESS_CONFIG_CREATION"===n.code?(E(["success","".concat(C.a.setupForm.successReload)]),setTimeout((function(){window.location.reload()}),3e3)):"ASK_SETUP"===n.code?(t.cleanAllApp(),s(!0),n.defaultFolder&&j(n.defaultFolder)):E(["error","".concat(n.code,": ").concat(n.message)])})),function(){S&&console.log(T," clean socket listener"),l.b.off(I.current)}}),[]),{displayWelcomePopup:c,SetupPopupComponent:function(t){return Object(a.d)(i.a.Fragment,null,c&&Object(a.d)("div",{className:"setup-popup-component"},Object(a.d)(tt.a,{title:"Welcome to Tiro",onClose:function(){}},Object(a.d)("p",null,C.a.setupForm.introText)," ",Object(a.d)("br",null),Object(a.d)("div",null,Object(a.d)(Q.a,{value:p,label:C.a.setupForm.user,explanation:C.a.setupForm.userExplanation,onChange:function(t){f(t)},shouldNotSelectOnClick:!0}),Object(a.d)(Q.a,{value:h,label:C.a.setupForm.password,type:"password",explanation:C.a.setupForm.passwordExplanation,onChange:function(t){m(t)},shouldNotSelectOnClick:!0}),Object(a.d)(Q.a,{value:x,label:C.a.setupForm.dataFolder,explanation:C.a.setupForm.folderExplanation,onChange:function(t){j(t)},shouldNotSelectOnClick:!0}),Object(a.d)("input",{type:"button",value:"submit",className:"submit-button",onClick:function(t){E(void 0),l.b.emit("sendSetupInfos",{form:{user:p,password:h,dataFolder:x},token:Object(P.b)()})}}),_&&Object(a.d)("div",{className:_[0]},_[1])))))}}}({cleanAllApp:function(){console.log("[cleanAllApp]"),Bt(),Lt(),t(),n()}}),u=e.SetupPopupComponent,p=Object(P.d)({onLoginAsked:function(){console.log("[cleanListAndFileContent]"),t(),n()},onLoginSuccess:function(){I(),O(),tn(),Object(x.d)((function(t){t.ui.browser.folders.refreshFromBackend()})),Rt(["/"])}}),f=p.LoginPopupComponent,h=Object(Kt.a)(),m=h.userSettingsApi,O=h.refreshUserSettingsFromBackend,_=Object(Vt.c)(),T=_.tabs,S=_.updateTab,I=_.refreshTabsFromBackend,N=_.updateActiveTabGrid,F=_.refreshWindowGrid,R=_.tabsApi,L=_.windowsApi,A=R.active.get(),M=at(),H=M.PromptPopupComponent,W=M.popupApi,q=function(){Object(o.useRef)([]);var t=Object(o.useState)(!1),n=Object(r.a)(t,2),e=n[0],i=n[1],c=Object(o.useState)(!1),l=Object(r.a)(c,2),s=l[0],u=l[1],d="(DISCONNECTED)",p=Object(o.useRef)(d);j((function(){p.current=p.current===d?"(/!\\ DISCONNECTED /!\\)":d;var t=e?"".concat(k()," (Connected)"):"".concat(k()," ").concat(p.current);document.title=t}),1e3),Object(o.useEffect)((function(){Object(x.d)((function(t){t.watch.appStatus((function(t){!1===t.isConnected?f(!1):!0===t.isConnected&&(f(!0),u(!0),setTimeout((function(){u(!1)}),1e3))}))}))}),[]);var f=function(t){w.a.client.log.verbose&&console.log("[SOCKET CONNECTION TOGGLE] to ".concat(t)),i(t)};return{isConnected:e,connectionStatusComponent:function(){var t=["connected","connected"];return s&&(t=["back-online","back online"]),e||(t=["disconnected","disconnected"]),Object(a.d)("div",{className:"connection-status"},Object(a.d)("div",{className:t[0]},t[1]))},toggleSocketConnection:f}}(),V=q.isConnected,G=q.connectionStatusComponent,K=q.toggleSocketConnection;j((function(){}),1e3);var J=function(){var t=Object(o.useState)(!1),n=Object(r.a)(t,2),e=n[0],i=n[1],a=Object(o.useState)(0),c=Object(r.a)(a,2),l=c[0],s=c[1],u=Object(o.useRef)(0);return Object(o.useEffect)((function(){var t=Object(g.debounce)((function(){u.current=u.current+1,s(l+1),i(!0),setTimeout((function(){i(!1)}),200)}),200);return window.addEventListener("resize",(function(){t()})),function(){window.removeEventListener("resize",(function(){t()}))}}),[]),{forceResponsiveRender:e,frr:u,responsiveRefreshCounter:l,setResponsiveRefresh:s}}(),$=J.forceResponsiveRender,Z=J.responsiveRefreshCounter,et=J.setResponsiveRefresh,ot=Object(o.useRef)([]),rt=Object(o.useState)(!1),ct=Object(r.a)(rt,2),lt=ct[0],ut=ct[1],dt=function(){var t=Object(o.useState)([]),n=Object(r.a)(t,2),e=n[0],i=n[1],a=Object(o.useState)(0),c=Object(r.a)(a,2),l=c[0],s=c[1];return{lightboxApi:{open:function(t,n){var e=[];Object(g.each)(n,(function(t){if(Object(g.isString)(t)){var n={file:Jt(),title:"",url:t};e.push(n)}else e.push(t)})),i(e),s(t)},close:function(){i([]),s(0)}},lightboxImages:e,lightboxIndex:l}}(),pt=dt.lightboxApi,ft=dt.lightboxImages,bt=dt.lightboxIndex,gt=function(){var t=Object(o.useState)(!1),n=Object(r.a)(t,2),e=n[0],i=n[1],a=Object(o.useState)(null),c=Object(r.a)(a,2),l=c[0],s=c[1],u=Object(o.useState)(null),d=Object(r.a)(u,2),p=d[0],f=d[1],b=Object(o.useState)(""),g=Object(r.a)(b,2),h=g[0],m=g[1],v=Object(o.useRef)(null);return{ttsApi:{open:function(t,n){var e=(n=n||{}).id?n.id:null,o=n.startString?n.startString:null;console.log("[TTS API]","open",{id:e,content:t,startString:o}),s(e),o&&f(o),m(t),i(!0)},close:function(){i(!1)},getStatus:function(cb){v.current&&cb(v.current)}},ttsPopupContent:h,ttsPopupId:l,ttsPos:p,setTtsPopup:i,ttsPopup:e,syncTtsStatus:function(t){v.current=t}}}(),mt=gt.ttsApi,vt=gt.ttsPos,wt=gt.ttsPopup,Ot=gt.setTtsPopup,jt=gt.ttsPopupContent,kt=gt.ttsPopupId,yt=gt.syncTtsStatus,Ct=function(t){var n=Object(o.useState)(!1),e=Object(r.a)(n,2),i=e[0],a=e[1],c=Object(o.useState)([]),l=Object(r.a)(c,2),u=l[0],d=l[1];return{isConnected:t.isConnected,searching:{get:i,set:a},ipsServer:{get:u,set:d,getLocal:function(){var t=u[0];return Object(g.each)(u,(function(n){n.startsWith("192.168")&&(t=n)})),t}},refresh:Object(s.a)(Object(s.a)({},t.refresh),{},{increment:function(){t.refresh.set(t.refresh.get+1)}})}}({isConnected:V,refresh:{get:Z,set:et}}),_t=function(){var t="[NOTE HISTORY] ",n=w.a.client.log.verbose,e=Object(o.useRef)({}),i=function(){return(new Date).getTime()},r=function(e,o,i){n&&console.log("".concat(t," saveNoteHistory ").concat(e)),l.b.emit("createHistoryFile",{filePath:e,content:o,historyFileType:i,token:Object(P.b)()})};return{save:r,intervalSave:function(o,a){var c=e.current[o];(!c||c&&c+6e4<i())&&(n&&console.log("".concat(t," ").concat(o,", time ").concat(1," expired/inexistand, PROCEED BACKUP")),r(o,a,"int"),e.current[o]=i())}}}(),Et=Object(x.f)({popupApi:W,tabsApi:R,userSettingsApi:m,windowsApi:L,statusApi:Ct,historyApi:_t,lightboxApi:pt,ttsApi:mt}),Tt=Et,It=Tt.ui.browser.files,Ft=Tt.ui.browser.folders,Rt=Ft.scan,Lt=Ft.clean,At=Ft.base,Pt=function(t){var n=Object(Ht.a)("files-history",[]),e=Object(r.a)(n,3),i=e[0],a=e[1],c=e[2];Object(o.useEffect)((function(){qt&&console.log(Wt," activeFile changed!",t),t&&l(t)}),[t]);var l=function(t){qt&&console.log(Wt,"Add to history",t.name);for(var n=!0,e=-1,o=i,r=0;r<i.length;r++)i[r].name===t.name&&(n=!1,e=r);n||o.splice(e,1),(o=o.slice(0,200)).unshift(t),a(o)};return Object(xt.a)(l,1e3),{filesHistory:i,cleanLastFilesHistory:function(){a([])},refreshFilesHistoryFromBackend:c}}(It.active.get),Dt=Pt.filesHistory,Bt=Pt.cleanLastFilesHistory,tn=Pt.refreshFilesHistoryFromBackend,nn=Ut(t,n),en=(nn.askForMoveFile,nn.promptAndMoveFolder),on=nn.promptAndBatchMoveFiles,rn=function(){var t=Object(o.useState)("navigator"),n=Object(r.a)(t,2),e=n[0],l=n[1];return{mobileView:e,setMobileView:l,MobileToolbarComponent:function(t){return v(Object(a.d)(i.a.Fragment,null,"desktop"!==Object(c.a)()&&Object(a.d)(b.a,{class:"mobile-view-toggler",buttons:[{icon:"faStream",class:"".concat("navigator"===e?"active":""),action:function(){l("navigator")}},{icon:"faPenNib",class:"".concat("editor"===e?"active":""),action:function(){l("editor")}},{icon:"faEye",class:"".concat("preview"===e?"active":""),action:function(){l("preview")}},{icon:"faSearch",class:"",action:function(){t.onButtons[0]&&t.onButtons[0]()}}]})),[e,t.forceRerender])}}}(),an=rn.mobileView,cn=rn.MobileToolbarComponent;window.api=Tt;var ln=Object(o.useState)(!1),sn=Object(r.a)(ln,2),dn=sn[0],pn=sn[1],fn=Object(o.useState)(!1),bn=Object(r.a)(fn,2),gn=bn[0],hn=bn[1];return Object(o.useEffect)((function(){return Qt.bind("alt + spacebar",(function(){pn(!0),hn(!0)})),Qt.bind("esc",(function(){pn(!1)})),function(){Qt.releaseAllKeys()}}),[Dt]),Object(a.d)("div",{className:Mt(an,Tt.userSettings.refresh.css.get)},Object(a.d)("div",{className:" ".concat("mobile"===Object(c.a)()?"mobile-view-".concat(an):"")},Object(a.d)(x.a.Provider,{value:Et},dn&&Object(a.d)(St,{show:gn,lastNotes:Dt,onClose:function(t){pn(!1)},onHide:function(t){hn(!1)}}),Object(a.d)(a.b,{styles:Object(a.c)("*{-webkit-print-color-adjust:exact!important;color-adjust:exact!important;}*:focus{outline:none;}body{margin:0;padding:0px;background:",d.a.colors.bg.light,";font-size:11px;font-family:",d.a.font.main,";}html,body{height:100vh;overflow:hidden;background:",d.a.colors.bgInterface,";}button,input{font-family:",d.a.font.main,";font-weight:700;color:",d.a.colors.l2.title,";}","\n@page {\n margin: 0;\n padding: 0;\n}\n\n.main-wrapper,\n#root,\n.print-body {\n\t// position: absolute;\n// top: 22px;\n\t\t// height: 1000vh;\n\t\t// overflow: scroll;\n}\n\n.print-wrapper {\n\t\tz-index: 10000000000000;\n\t\tbackground-color: white;\n\t\toverflow: hidden;\n width: 100%!important;\n\t\theight: 1000vh!important;\n position: fixed;\n top: 0;\n left: 0;\n margin: 0;\n padding: 15px;\n font-size: 14px;\n line-height: 18px;\n\t\tmargin-top: 0px!important;\n\t\tdisplay: block!important;\n}\n/* .print-wrapper { */\n/* \t\tz-index: 10000000000000; */\n/* \t\ttop: 0px; */\n/* \t\tleft: 0px; */\n/* \t\tposition: fixed; */\n/* \t\twidth: 100%!important; */\n/* \t\t/* height: 100vh; */ */\n/* } */\n\n"," body{position:relative;}","")}),Object(a.d)("div",{role:"dialog",className:"\n\t\t\t\t\t\t\t\tmain-wrapper\n\t\t\t\t\t\t\t\t".concat(Tt.userSettings.get("ui_sidebar")?"with-sidebar":"without-sidebar","\n\t\t\t\t\t\t\t\tdevice-view-").concat(Object(c.a)())},H(),f({}),u({}),G(),cn({forceRerender:$,onButtons:[function(){hn(!0),pn(!0)}]}),Object(a.d)("div",{className:"left-sidebar-indicator"},Object(a.d)("div",{className:"left-wrapper"},Object(a.d)("div",{className:"left-wrapper-1"},Object(a.d)("div",{className:"invisible-scrollbars"},Object(a.d)(E,{onNewFile:function(){Object(x.d)((function(t){var n=t.ui.browser.folders.current.get;t.file.create(n,(function(e){var o=Object(U.c)(e);o&&t.ui.browser.goTo(n,o.name,{openIn:"activeWindow"})}))}))}}),Tt.userSettings.get("ui_layout_shortcuts_panel")&&Object(a.d)(Nt,{filePath:".tiro/shortcuts.md",onClick:function(){}}),Object(a.d)(X,{files:Dt,onClick:function(t){Et.ui.browser.goTo(t.folder,t.name,{openIn:"active"})}}),Object(a.d)(Y,{openFolders:Ft.open.get(),folder:Ft.get(),current:Ft.current.get,onFolderClicked:function(t){Et.ui.browser.goTo(t,null)},onFolderMenuAction:function(t,n,e){"rename"===t&&e?en({folder:n,folderToDropInto:n,folderBasePath:At,newTitle:e,renameOnly:!0,disablePrompt:!0,onMoveFn:function(){Rt([Object(zt.b)(n.path)],{cache:!1,cb:function(){Ft.open.remove([Object(zt.b)(n.path)]),Ft.open.add(Object(zt.b)(n.path))}})}}):"create"===t&&e?(Object($t.a)(e,n),setTimeout((function(){Rt([n.path],{cache:!1})}))):"moveToTrash"===t?en({folder:n,folderToDropInto:$t.c,folderBasePath:At,newTitle:e,onMoveFn:function(){Rt([Object(zt.b)(n.path)],{cache:!1,cb:function(){Ft.open.add(n.path)}})}}):"delete"===t&&(Object($t.b)(n),setTimeout((function(){Rt([n.path],{cache:!1})})))},onFolderOpen:function(t){Rt([t],{cache:!1})},onFolderClose:function(t){},onFolderDragStart:function(t){console.log("[DRAG MOVE] onFolderDragStart",t),ot.current=[{type:"folder",folder:t}]},onFolderDragEnd:function(){console.log("[DRAG MOVE] onFolderDragEnd"),ot.current=[]},onFolderDrop:function(t){!function(t){console.log("[DRAG MOVE] processDragDropAction ->",ot.current,t);var n=ot.current[0];"file"===n.type&&n.files?on({files:n.files,folderToDropInto:t}):"folder"===n.type&&n.folder&&en({folder:n.folder,folderToDropInto:t,folderBasePath:At,disablePrompt:!0,onMoveFn:function(){if(n.folder){var e=n.folder.path,o=t.path;Rt([Object(zt.b)(e),Object(zt.b)(o),o,e],{cache:!1,cb:function(){Ft.open.add(e)}})}}})}(t)}})),Object(a.d)("div",{className:"settings-button",onClick:function(){ut(!lt)}},Object(a.d)(y.a,{name:"faCog",color:"grey"})),lt&&Object(a.d)(ht.a,{onClose:function(){ut(!1)}})),Object(a.d)("div",{className:"left-wrapper-2"},Object(a.d)("div",{className:"top-files-list-wrapper"},Object(a.d)("div",{className:"subtitle-wrapper"},Object(a.d)("div",{className:"folder-wrapper"},Tt&&Tt.ui.browser.folders.current.get,!Tt.ui.browser.folders.current.get&&"/"),"mobile"!==Object(c.a)()&&Object(a.d)("div",{className:"toggle-sidebar-btn"},Object(a.d)(b.a,{popup:!1,buttons:[{icon:"faThumbtack",title:"Toggle Sidebar",action:function(t){m.set("ui_sidebar",!m.get("ui_sidebar")),F()},active:!0===Et.userSettings.get("ui_sidebar")}],colors:["#d4d1d1","#615f5f"],size:.8}))),Object(a.d)(nt,{term:Et.ui.search.term.get})),Object(a.d)("div",{className:"files-list-wrapper"},Object(a.d)(Yt,{files:It.get,activeFileIndex:It.active.getIndex,onSortFiles:function(t){Et.ui.browser.files.set(t)},onFileClicked:function(t){It.active.set(t);var n=It.get[t];Tt.tabs.active.get()?L.active.setContent(n):Tt.tabs.openInNewTab(n)},onFileDragStart:function(t){console.log("[DRAG MOVE] onFileDragStart",t),ot.current=[{type:"file",files:t}]},onFileDragEnd:function(){console.log("[DRAG MOVE] onFileDragEnd"),ot.current=[]}}))))),Object(a.d)("div",{className:"right-wrapper dual-viewer-view"},Object(a.d)(st,{tabs:T,onUpdate:S}),A&&Object(a.d)(Gt.b,{tab:A,onGridUpdate:N}))))),ft.length>0&&Object(a.d)(it,{images:ft,startingIndex:bt,onClose:Et.ui.lightbox.close}),wt&&Object(a.d)(un,{id:kt,fileContent:jt,startString:vt,onUpdate:function(t){yt(t)},onClose:function(){Ot(!1)}}))}),null),document.getElementById("root"))},47:function(t,n,e){"use strict";e.d(n,"a",(function(){return i})),e.d(n,"c",(function(){return r})),e.d(n,"b",(function(){return a}));var o=e(17),i=function(t){var n=((new Date).getTime()-t.getTime())/1e3,e=604800,i="";if(n<=3600)i="".concat(Math.ceil(n/60)," ").concat(o.a.minsAgo);else if(n>3600&&n<=86400)i="".concat(Math.ceil(n/3600)," ").concat(o.a.hoursAgo);else if(n>86400&&n<=e)i="".concat(Math.ceil(n/86400)," ").concat(o.a.daysAgo);else if(n>e){var r=("0"+t.getDate()).slice(-2),a=o.a.months[t.getMonth()],c=t.getFullYear().toString();i="".concat(r," ").concat(a," ").concat(c)}return i},r=function(t){t||(t=(new Date).getTime());var n=new Date(t);return[n.getFullYear(),n.getMonth()+1,n.getDate()]},a=function(t){var n=(new Date).getTime();return"lastMonth"===t&&(n=n-432e5),n}},48:function(t,n,e){"use strict";e.d(n,"a",(function(){return u}));var o=e(18),i={};window.dbscroll=i;o.a.client.log.verbose;var r=function(t){var n=document.querySelector(".window-id-".concat(t," .preview-area")),e=document.querySelector(".window-id-".concat(t," .cm-scroller")),o=document.querySelector(".window-id-".concat(t," .scrolling-bar-wrapper"));return i[t]||(i[t]={els:{preview:n,editor:e,scroller:o},dims:{editor:{viewport:0,full:0},preview:{viewport:0,full:0},scroller:{viewport:0,full:0}},posPercent:0,previewOffsetY:0}),i[t].els.preview=n,i[t].els.editor=e,i[t].els.scroller=o,i[t]},a=function(t,n){var e=r(t);if(e.els.editor){n||(n=e.posPercent);var o=e.els.scroller.dataset;o.scrollRefresh||(o.scrollRefresh=1),o.scrollRefresh=parseInt(o.scrollRefresh)+1}},c=function(t,n){var e=r(t);if(e.els.editor){var o=e.dims.editor;n||(n=e.posPercent);var i=(o.full-o.viewport)/100;e.els.editor.scrollTop=i*n}},l=function(t,n){var e=r(t);if(e.els.editor){var o=e.dims.preview;n||(n=e.posPercent);var i=o.full/100,a=Math.round(i*n);e.els.preview.scrollTop=a+e.previewOffsetY}},s=function(t,n){var e=r(t);if(e.els.editor){var o=e.dims.preview.full/100,i=n-Math.round(o*e.posPercent);e.previewOffsetY=i}},u={getScrollObj:r,updateEditorDims:function(t,n){var e=r(t);e.els.editor&&(e.dims.editor=n)},updatePreviewDims:function(t){var n=r(t);if(n.els.editor){var e=n.els.preview.querySelector(".simple-css-wrapper").clientHeight,o=n.els.preview.clientHeight;n.dims.preview={viewport:o,full:e}}},updateScrollerDims:function(t){var n=r(t);if(n.els.editor){var e=n.dims.editor.viewport/n.dims.editor.full||1e7,o=n.dims.preview.viewport/n.dims.preview.full||1e7,i=e<o?e:o,a=n.els.scroller.clientHeight,c=i*a,l={viewport:c=c>a?a:c,full:a};n.dims.scroller=l;var s=n.els.scroller.dataset;s.scrollRefresh||(s.scrollRefresh=1),s.scrollRefresh=parseInt(s.scrollRefresh)+1}},updatePreviewOffset:s,onEditorScroll:function(t,n){var e=r(t);e.els.editor&&(e.posPercent=n,a(t,n),l(t,n))},onScrollerScroll:function(t,n){var e=r(t);e.els.editor&&(e.posPercent=n,c(t,n),l(t,n))},onPreviewScroll:function(t){var n=r(t);if(n.els.editor){var e=n.els.preview.scrollTop;s(t,e)}},onWindowLoad:function(t){if(i[t]){var n=r(t);if(!n.els.editor)return;var e=n.posPercent;a(t,e),c(t,e),l(t,e)}},scrollEditor:c,scrollPreview:l,scrollScroller:a}},49:function(t,n,e){"use strict";e.d(n,"b",(function(){return o})),e.d(n,"d",(function(){return i})),e.d(n,"c",(function(){return r})),e.d(n,"a",(function(){return a}));var o=function(t){return t=(t=(t=(t=(t=t.split("://").join("__HTTP__SEP")).split("//").join("/")).split("\\").join("/")).split("//").join("/")).split("__HTTP__SEP").join("://")},i=function(t){var n=function(t){var n=t.split("/"),e=t.split("\\"),o=n.length>e.length?n:e,i=o[o.length-1],r=i.split("."),a=t.replace(i,""),c="";r.length>1&&(c=r[r.length-1]);var l=i.replace(".".concat(c),"");return{filename:i,extension:c,path:t,folder:a,filenameWithoutExt:l}}(t),e=n.extension?"file":"folder";return{path:t,realname:n.filename,nature:e,name:n.filename,extension:n.extension,folder:n.folder}},r=function(t){var n=t.match(/(.*)[\/\\]/),e=n?n[1]+"/":"";return o(e)},a=function(t,n){return o(t+"/")===o(n+"/")}},51:function(t,n,e){"use strict";e.d(n,"a",(function(){return u}));var o=e(18),i=e(133),r="[Code Mirror]",a=o.a.client.log.verbose,c=function(t,n){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2];a&&console.log(r," update cursor",n,t);try{e&&t.view.dispatch({selection:{anchor:n,head:n},scrollIntoView:!0})}catch(o){console.warn(r,"update Cursor error",o)}},l=0,s=function(t){if(console.log("GET SCROLLING LINE -> NOT USED, SHOULD BE UPDATED"),!t.view)return-1;for(var n=t.view.state.doc.toString(),e=t.view.elementAtHeight(t.view.scrollDOM.scrollTop).from,o=n.split("\n"),i=0,r=0,a=0;a<o.length&&(i+=o[a].length)<e;a++)r=a;l=r},u={getEditorInfos:function(t){var n=t,e=Math.round(n.viewState.pixelViewport.top),o=n.lineBlockAtHeight(e),i=n.state.doc.lineAt(o.from).number,r=n.contentHeight,a=n.viewState.editorHeight,c=(r-a)/100;return{viewportHeight:a,contentHeight:r,visibleFirstLine:i,percentPx:c,currentPercentScrolled:n.viewState.pixelViewport.top/c}},getCurrentLineInfos:function(t){var n=t.view.state.doc.lineAt(t.view.state.selection.main.head).number-1,e=function(t){return t.view.state.selection.ranges[0].from}(t),o=t.view.state.doc.toString().split("\n");return{lines:o,currentPosition:e,activeLine:o[n]||"",lineIndex:n}},getScrolledLine:function(t){return s(t),l},updateCursor:c,updateText:function(t,n,e){var o=t.view.state.doc.toString().length,i=t.view.state.selection.ranges[0].from;t.view.dispatch(t.view.state.update({changes:{from:0,to:o,insert:n}})),c(t,i,!0)},scrollTo:function(t,n){if(!t.view)return-1;c(t,n,!0)},scrollToLine:function(t,n){var e=t.view.state.doc.line(n);c(t,e.from,!0)},getCustomTheme:i.a}},55:function(t,n,e){"use strict";e.d(n,"a",(function(){return g})),e.d(n,"c",(function(){return h})),e.d(n,"b",(function(){return m}));var o=e(9),i=e(8),r=e(0),a=e(13),c=e(68),l=e(10),s=e(100),u=e(83),d=e(48),p=e(76),f=e(59),b=e(1),g=function(t){var n={wrapper:Object(r.useRef)(null),main:Object(r.useRef)(null)},e=t.file.path.split("/");e.pop();e.join("/");Object(r.useEffect)((function(){setTimeout((function(){t.onMaxYUpdate(l())}),1e3)}),[t.fileContent]);var l=function(){var t=n.main.current;return 2*((null===t||void 0===t?void 0:t.clientHeight)||3e3)},s=Object(r.useState)([]),p=Object(o.a)(s,2),f=p[0],g=p[1];Object(r.useEffect)((function(){var n=c.b.chunks.chunk(t.fileContent);g(n),setTimeout((function(){c.b.injectLogic({fileContent:t.fileContent,file:t.file})}),100),setTimeout((function(){d.a.updatePreviewDims(t.windowId),d.a.updateScrollerDims(t.windowId)}),100)}),[t.fileContent]);var h=function(){var n=0,e=document.querySelector(".window-id-".concat(t.windowId));return e&&(n=e.clientHeight),"mobile"===Object(a.a)()&&0===n&&(n=document.body.clientHeight-120),n};return Object(b.d)("div",{className:"preview-area-wrapper render-latex",onWheelCapture:function(n){d.a.onPreviewScroll(t.windowId)}},Object(b.d)("div",{className:"preview-area",ref:n.wrapper,style:{bottom:function(){var n=l(),e=t.posY+0;return Object(i.clamp)(e,0,n)}()}},Object(b.d)("div",{className:"preview-area-transitions"},Object(b.d)("div",{className:"infos-preview-wrapper"},Object(b.d)("div",{className:"file-path-wrapper"},t.file.path.replace("/".concat(t.file.name),"")),Object(b.d)("h1",{className:"title big-title"},t.file.name.replace(".md",""))),Object(b.d)("div",{className:"content-blocks-wrapper"},Object(b.d)("div",{className:"simple-css-wrapper"},f.map((function(n,e){return Object(b.d)(u.a,{key:e,index:e,block:n,windowId:t.windowId,file:t.file,windowHeight:h(),yCnt:t.yCnt,onIframeMouseWheel:t.onIframeMouseWheel})})))))))},h=function(t){return t||(t={w:".simple-css-wrapper",pl:".preview-link",r:".resource-link-icon"}),"\n\n\t\thtml, body {\n\t\t\t\tmargin: 0px;\n\t\t\t\tpadding: 0px;\n\t\t}\n\n\t\t".concat(t.w," {\n\t\t\t\tcolor: ").concat(l.a.colors.editor.font,";\n\t\t\t\tline-height: 19px;\n\t\t\t\tfont-size: 11px;\n\t\t\t\tfont-family:").concat(l.a.font.main,";\n\t\t}\n\n\t\tbutton,\n\t\tinput {\n\t\t\t\tfont-family:").concat(l.a.font.main,";\n\t\t\t\tfont-weight: 700;\n\t\t\t\tcolor: ").concat(l.a.colors.l2.title,";\n\t\t}\n\n\t\t/**********************************************************\n\n\t\t// COUNTER TITLES\n\n*********************************************************/\n\n\t\t").concat(t.w,' {\n\t\t\t\toverflow-wrap: break-word;\n\t\t\t\tcounter-reset: sh1 ;\n\t\t}\n\n\n\t\th1:before {\n\t\t\t\tcontent: ""counter(sh1)" \u2219 ";\n\t\t\t\tcounter-increment: sh1;\n\t\t}\n\t\th1 {\n\t\t\t\tcounter-reset: sh2;\n\t\t}\n\n\t\th2:before {\n\t\t\t\tcontent: ""counter(sh1)"." counter(sh2)" \u2219 ";\n\t\t\t\tcounter-increment: sh2;\n\t\t}\n\t\th2 {\n\t\t\t\tcounter-reset: sh3;\n\t\t}\n\n\t\th3:before {\n\t\t\t\tcontent: ""counter(sh1)"." counter(sh2)"."counter(sh3)" \u2219 ";\n\t\t\t\tcounter-increment: sh3;\n\t\t}\n\t\th3 {\n\t\t}\n\n\n\n\t\t/**********************************************************\n\n\t\t// BASIC STYLE\n\n**********************************************************/\n\n\t\ta {\n\t\t\t\tcolor: ').concat(l.a.colors.main,";\n\t\t}\n\n\t\t.main-color, .main-color:before, .main-color:after {\n\t\t\t\tcolor: ").concat(l.a.colors.main,";\n\t\t}\n\t\t.title {\n\t\t\t\tmargin: 0px 0px;\n\t\t}\n\n\t\th1:before, h2:before, h3:before, h4:before, h5:before, h6:before {\n\t\t\t\tcolor: ").concat(l.a.colors.main,";\n\t\t}\n\t\th1, h2, h3, h4, h5, h6 {\n\t\t\t\tposition:relative;\n\t\t\t\tcolor: ").concat(l.a.colors.main,';\n\t\t\t\tmargin-top: 0px;\n\t\t\t\tline-height: normal;\n\t\t\t\tmargin-right: 10px;\n\t\t}\n\t\th1:after,\n\t\th2:after {\n\t\t\t\tcontent: "-";\n\t\t\t\tbackground: ').concat(l.a.colors.main,";\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 2px;\n\t\t\t\tposition: absolute;\n\t\t\t\tbottom: 0px;\n\t\t\t\tleft: 0px;\n\t\t\t\tfont-size: 0px;\n\t\t\t\t/* opacity: 0.4; */\n\t\t}\n\t\th2:after {\n\t\t\t\t/* width: 70%; */\n\t\t\t\theight: 1px;\n\t\t}\n\t\th1 {\n\t\t\t\tpadding: 5px;\n\t\t\t\t/* border-bottom: 2px solid; */\n\t\t\t\tmargin-top: 30px;\n\t\t\t\tmargin-bottom: 20px;\n\t\t}\n\t\th2 {\n\t\t\t\tpadding: 5px;\n\t\t\t\t/* border-bottom: 1px solid; */\n\t\t}\n\t\th2, h3, h4, h5, h6 {\n\t\t\t\tmargin-bottom: 10px;\n\t\t\t\tmargin-top: 25px;\n\t\t}\n\n img,\n .content-image {\n\t\t\t\tcursor: pointer;\n }\n\t\t\t.content-image-img {\n\t\t\t\t\t").concat(l.a.els().images,"\n\t\t\t\t\tcursor: pointer;\n\t\t\t}\n\n p {\n\t\t\t\tdisplay: inline;\n }\n\n\n\t\t/**********************************************************\n\n\t\t// LIST\n\n**********************************************************/\n\t\t.no-css ul li {\n\t\t\t\tbackground: none!important;\n\t\t\t\tpadding: 0px;\n\t\t}\n\n\t\tul {\n\t\t\t\tpadding: 0px;\n\t\t\t\tlist-style-image: \"./custom_icons/view-1.svg\"; \n\t\t\t\tlist-style: none; \n\t\t}\n\n\t\tul li {\n\t\t\t\tpadding-left: 12px;\n\t\t}\n\t\tul li:before {\n\t\t\t\tcontent: '-';\n\t\t\t\tcolor: ").concat(l.a.colors.main,";\n\t\t\t\twidth: 10px;\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tfont-size: 15px;\n\n\t\t\t\t/* background-image: url(./custom_icons/line.svg); */\n\t\t\t\t/* background-repeat: no-repeat; */\n\t\t\t\t/* background-position: -3px 4px; */\n\t\t\t\t/* background-size: 11px; */\n\n\t\t\t\t/* background-image: url(./custom_icons/line.svg); */\n\t\t\t\t/* background-repeat: no-repeat; */\n\t\t\t\t/* background-color: ").concat(l.a.colors.main,'; */\n\t\t\t\t/* -webkit-mask-position: -3px 4px; */\n\t\t\t\t/* -webkit-mask-size: 11px; */\n\t\t\t\t/* -webkit-mask-image: url(./custom_icons/line.svg); */\n\t\t\t\t/* -webkit-mask-repeat: no-repeat; */\n\t\t}\n\t\tul li p {\n\t\t\t\tmargin: 0px;\n\t\t}\n\n\t\tul input[type=checkbox] {\n\t\t\t\tposition: relative;\n\t\t\t\twidth: 0px;\n\t\t\t\theight: 10px;\n\t\t\t\tmargin-right: 9px\n\t\t}\n\t\tul input[type=checkbox]:before {\n\t\t\t\tcontent: "";\n\t\t\t\tdisplay: block;\n\t\t\t\tposition: absolute;\n\t\t\t\twidth: 15px;\n\t\t\t\theight: 15px;\n\t\t\t\ttop: 0px;\n\t\t\t\tleft: -4px;\n\n\t\t\t\tbackground-color: ').concat(l.a.colors.main,";\n\t\t\t\t/* background-image: url(./custom_icons/check.svg); */\n\t\t\t\t/* background-repeat: no-repeat; */\n\t\t\t\t/* background-size: contain; */\n\t\t\t\tmask-position: -2px -1px;\n\t\t\t\tmask-image: url(./custom_icons/check.svg);\n\t\t\t\tmask-size: contain;\n\t\t\t\tmask-repeat: no-repeat;\n\n\t\t\t\t-webkit-mask-position: -2px -1px;\n\t\t\t\t-webkit-mask-image: url(./custom_icons/check.svg);\n\t\t\t\t-webkit-mask-size: contain;\n\t\t\t\t-webkit-mask-repeat: no-repeat;\n\t\t}\n\t\tul input[type=checkbox]:checked:before {\n\t\t\t\t/* background-color: red; */\n\t\t\t\t/* -webkit-mask-image: url(./custom_icons/uncheck.svg); */\n\t\t\t\t/* mask-image: url(./custom_icons/uncheck.svg); */\n\t\t\t\t/* background-image: url(./custom_icons/uncheck.svg); */\n\n\t\t\t\t/* background-color: red; */\n\t\t\t\t/* -webkit-mask-image: url(./custom_icons/uncheck.svg); */\n\t\t\t\t/* mask-image: url(./custom_icons/uncheck.svg); */\n\t\t\t\tmask-image: url(./custom_icons/uncheck.svg);\n\t\t\t\t-webkit-mask-image: url(./custom_icons/uncheck.svg);\n\n\t\t}\n\n\t\t/**********************************************************\n\n\t\t PREVIEW LINK\n\n**********************************************************/\n\n\n\t\t").concat(Object(f.d)(t.pl),"\n\n\t\t/**********************************************************\n\n\t\t// TABLE\n\n**********************************************************/\n\n\t\ttable {\n\t\t\t\tmargin: 10px 0px;\n\t\t\t\tpadding 15px;\n\t\t\t\tborder-spacing: 0;\n\t\t\t\tborder-collapse: collapse;\n\t\t}\n\n\n\t\tth {\n\t\t\t\ttext-align: left;\n\t\t\t\tpadding: 10px 10px;\n\t\t}\n\t\ttd {\n\t\t\t\tpadding: 5px 10px;\n\t\t}\n\t\tthead tr {\n\t\t\t\tbackground: #e4e3e3;\n\t\t}\n\t\tth, td {\n\t\t\t\tborder: 1px solid #ccc;\n\t\t}\n\t\ttbody {\n\t\t}\n\t\t// tbody tr:nth-child(even) {background: #CCC}\n\t\t// tbody tr:nth-child(odd) {background: #EEE}\n\n\t\t/**********************************************************\n\n\t\t// RESSOURCE LINK\n\n**********************************************************/\n\t\t").concat(Object(p.b)(),"\n\n\t\tpre {\n\t\t}\n\n\t\tpre code {\n\t\t\t\tdisplay: block;\n\t\t\t\tborder-radius: 8px;\n\t\t\t\tbackground: #d2d2d2;\n\t\t\t\tpadding: 11px 23px;\n\t\t}\n\t\t")},m=function(){return"\n.preview-area {\n\t\tmargin-top: 5px;\n .infos-preview-wrapper {\n\t\t\t\tborder-bottom: 1px solid rgba(0 0 0 / 5%);\n display: ".concat(Object(a.b)("desktop")?"none":"block",";\n\t\t\t\tpadding: 5px 0px 12px 0px;\n\t\t}\n}\n.preview-area {\n position: relative;\n display: block;\n\t\toverflow: scroll; \n\t\twidth: calc(100% );\n padding-right: 30px;\n\n ").concat(s.b,"\n\n .infos-preview-wrapper {\n }\n\t\t.infos-preview-wrapper h1.big-title {\n\t\t\t\twidth: calc(100% - 65px);\n\t\t\t\tfont-family: ").concat(l.a.font.editor,";\n\t\t\t\tcolor: grey;\n\t\t\t\tfont-size: 15px;\n\t\t\t\tmargin: 0px;\n\t\t\t\tpadding: 0px 14px;\n\t\t}\n}\n.content-blocks-wrapper {\n\t\t").concat(h(),"\n}\n.view-both .preview-area {\n\t\tmargin-top: 20px;\n}\n\n.preview-area-wrapper {\n\t\theight: calc(100% - 35px);\n margin-top: ").concat(Object(a.b)("desktop")?"140":"0","px;\n\n}\n\n")}},56:function(t,n,e){"use strict";e.d(n,"a",(function(){return d}));var o=e(5),i=e(6),r=e(15),a=e(20),c=e(11),l=function(t){Object(r.a)(e,t);var n=Object(a.a)(e);function e(t,i){var r;return Object(o.a)(this,e),(r=n.call(this)).match=t,r.replacement=i,r}return Object(i.a)(e,[{key:"toDOM",value:function(){return this.replacement(this.match)}}]),e}(c.g),s=function(t,n){return new c.e({regexp:t,decoration:function(t){return c.a.widget({widget:new l(t,n)})}})},u=function(t,n){return new c.e({regexp:t,decoration:function(t){return c.a.mark({class:n(t)})}})},d=function(t){return c.f.fromClass(function(){function n(e){Object(o.a)(this,n),this.decorations=void 0,t.replacement?this.decorations=s(t.pattern,t.replacement).createDeco(e):this.decorations=u(t.pattern,t.classWrap).createDeco(e)}return Object(i.a)(n,[{key:"update",value:function(n){try{t.replacement?this.decorations=s(t.pattern,t.replacement).updateDeco(n,this.decorations):this.decorations=u(t.pattern,t.classWrap).updateDeco(n,this.decorations)}catch(e){console.warn("[ERROR VIEWPLUGIN CM]",e,n)}}}]),n}(),{decorations:function(t){return t.decorations},provide:function(n){return c.c.atomicRanges.of((function(e){var o,i,r=(null===(o=e.plugin(n))||void 0===o?void 0:o.decorations)||c.a.none;return null!==(i=t.options)&&void 0!==i&&i.isAtomic||(r=c.a.none),r}))}})}},58:function(t,n,e){"use strict";e.d(n,"a",(function(){return o})),e.d(n,"b",(function(){return i}));var o=function(t){return t.path.substr(0,t.path.length-(t.title.length+1))},i=function(t){var n=t.split("/");(n=n.filter((function(t){return""!==t}))).pop();var e="/"+n.join("/")+"/";return e=e.replaceAll("//","/")}},59:function(t,n,e){"use strict";e.d(n,"e",(function(){return c})),e.d(n,"b",(function(){return l})),e.d(n,"a",(function(){return s})),e.d(n,"d",(function(){return u})),e.d(n,"c",(function(){return d}));var o=e(28),i=e(12),r=e(10),a=e(56),c=function(t){return Object(a.a)({pattern:o.a.linklink,replacement:function(n){var e=document.createElement("span");e.classList.add("note-link-mdpreview-wrapper"),e.classList.add("note-link-wrapper");var o=n[1],i=n[2],r=s(o,i,t);return e.innerHTML="".concat(r),e}})},l=function(t){t.classList.contains("title-search-link")&&d(t)},s=function(t,n,e){return'<a class="title-search-link preview-link" data-file="'.concat(t,'" data-folder="').concat(n,'" data-windowid="').concat(e,'">').concat(t,"</a>")},u=function(t){return t||(t=""),"\n\t\t\t.preview-link {\t\t\t\t\t\t\t\n\t\t\t\tfont-weight: 800;\n\t\t\t\tbackground-repeat: no-repeat;\n\t\t\t\tbackground-position: 4px 2px;\n\t\t\t\tpadding-left: 20px;\n\t\t\t\tbackground-size: 10px;\n\t\t}\n\n\t\t".concat(t,".external-link {\n\t\t\t\tbackground-image: url(").concat(r.a.assets.worldIcon,");\n\t\t}\n\t\t").concat(t,".search-link {\n\t\t\t\tcolor: ").concat(r.a.colors.main,";\n\t\t\t\tbackground-image: url(").concat(r.a.assets.searchIcon,");\n\t\t}\n\t\t").concat(t,".title-search-link {\n\t\t\t\tcolor: ").concat(r.a.colors.main,";\n\t\t\t\tbackground-image: url(").concat(r.a.assets.linkIcon,");\n\t\t\t\tcursor: pointer;\n\t\t}\n\t\t").concat(t,".resource-link {\n\t\t\t\tcolor: ").concat(r.a.colors.main,";\n\t\t} ")},d=function(t){var n=t.dataset.file,e=t.dataset.folder,o=""===t.dataset.windowid?"active":t.dataset.windowid;n&&e&&Object(i.e)().then((function(t){t.ui.browser.goTo(e,n,{openIn:o})}))}},61:function(t,n,e){"use strict";e.d(n,"a",(function(){return r}));var o=e(9),i=e(0);function r(t,n){var e=Object(i.useState)((function(){try{var e=window.localStorage.getItem(t);return e?JSON.parse(e):n}catch(o){return console.log(o),n}})),r=Object(o.a)(e,2),a=r[0],c=r[1];return[a,function(n){try{var e=n instanceof Function?n(a):n;c(e),window.localStorage.setItem(t,JSON.stringify(e))}catch(o){console.log(o)}}]}},65:function(t,n,e){"use strict";e.d(n,"a",(function(){return c}));var o=e(9),i=e(0),r=e(18),a=e(12);function c(t,n){var e=Object(i.useState)(n),c=Object(o.a)(e,2),l=c[0],s=c[1],u="/".concat(r.a.path.configFolder,"/").concat(r.a.path.backendStateFolder,"/").concat(t,".md");'[BACKEND STATE] "'.concat(t,'" clientApi not loaded! Persistance system will not work correctly');Object(i.useEffect)((function(){d()}),[]);var d=function(cb){Object(a.d)((function(t){t.file.getContent(u,(function(t){var n=JSON.parse(t);s(n),cb&&cb(n)}))}))};return[l,function(t){s(t),Object(a.d)((function(n){n.file.saveContent(u,JSON.stringify(t))}))},d]}},66:function(t,n,e){"use strict";e.d(n,"b",(function(){return o})),e.d(n,"a",(function(){return i}));var o=function(t){return(t=i(t,[["-","_"],["_","_"],[" ","_"],["/","_"]])).replace(/[^\w\s]/gi,"")},i=function(t,n){for(var e=0;e<n.length;e++){var o=n[e];t=t.split(o[0]).join(o[1])}return t}},67:function(t,n,e){"use strict";e.d(n,"b",(function(){return i})),e.d(n,"a",(function(){return r})),e.d(n,"d",(function(){return a})),e.d(n,"c",(function(){return c}));var o=e(8),i=["Az","Crea","Modif"],r=["alphabetical","created","modified"],a=function(t,n){var e;switch(r[n]){case"alphabetical":default:e=Object(o.sortBy)(t,[function(t){return t.realname.toLocaleLowerCase()}]);break;case"created":e=Object(o.sortBy)(t,["created"]).reverse();break;case"modified":e=Object(o.sortBy)(t,["modified"]).reverse()}return e},c=function(t){var n=t[0];return n?(Object(o.each)(t,(function(t){t.created&&n.created&&t.created>n.created&&(n=t)})),n):null}},68:function(t,n,e){"use strict";e.d(n,"a",(function(){return p})),e.d(n,"b",(function(){return g}));var o=e(21),i=e(8),r=e(28),a=e(12),c=e(59),l=e(97),s=e(69),u=e(37),d=function(t){var n=Object(o.a)({},t),e=n.raw,i=n.file,r=n.windowId;r||(r="");var a=Object(s.b)(Object(u.d)(i,Object(u.c)(i,Object(u.e)(Object(u.f)(r,Object(u.g)(e))))));return Object(l.b)(),a},p=function(t,cb){for(var n=document.getElementsByClassName(t),e=function(){var t=n[o];t.onclick=function(){cb(t)}},o=0;o<n.length;o++)e()},f=function(t){var n=t.split(r.a.userCustomTagManual),e=[],o=[],a=r.a.userCustomTag3,c=t.match(a)||"",l=[];Object(i.each)(c,(function(t){l.push(t)}));var s=null,u=-1,d=[],p=[],f={};if(Object(i.each)(l,(function(t){f[t]?f[t]=f[t]+1:f[t]=1})),Object(i.each)(f,(function(t,n){t>=2&&p.push(n)})),Object(i.each)(l,(function(t,e){if(p.includes(t))if(s){if(s===t){var i=[u+1,e+1];d.push.apply(d,i);for(var r=n.slice(i[0],i[1]),a=l.slice(u+1,e+1),c="",f=0;f<r.length;f++){var b=f===r.length-1?"":a[f];c+="".concat(r[f]).concat(b)}o.push({type:"tag",tagName:s.replace("[[","").replace("]]",""),content:c,start:u,end:e}),u=-1,s=null}}else s=t,u=e})),0===d.length)e.push({type:"text",content:t,start:0,end:1});else{d.unshift(0);for(var b=0;b<d.length;b+=2){var g=d[b];n[g]&&e.push({type:"text",content:n[g],start:g,end:g+1})}}for(var h=0===t.indexOf(l[0]),m=[],v=o.length>e.length?o.length:e.length,w=0;w<v;w++)h?(o[w]&&m.push(o[w]),e[w]&&m.push(e[w])):(e[w]&&m.push(e[w]),o[w]&&m.push(o[w]));return m},b=function(t){var n="";return Object(i.each)(t,(function(t){"text"===t.type?n+=t.content:"tag"===t.type&&(n+="[[".concat(t.tagName,"]]").concat(t.content,"[[").concat(t.tagName,"]]"))})),n},g={render:function(t){var n=Object(o.a)({},t),e=n.raw,r=n.file,a=n.windowId;a||(a="");var c=f(e);return Object(i.each)(c,(function(t){"text"===t.type&&(t.content=d({raw:t.content,file:r,windowId:a})),"tag"===t.type&&(t.content=Object(u.b)(t.content))})),b(c)},injectLogic:function(t){p("title-search-link",c.c),p("content-image",(function(t){Object(a.e)().then((function(n){var e=parseInt(t.dataset.index);try{var o=JSON.parse(decodeURIComponent(t.dataset.images));Object(i.isNumber)(e)||(e=0),n.ui.lightbox.open(e,o)}catch(r){console.error(r)}}))}))},chunks:{chunk:f,merge:b}}},69:function(t,n,e){"use strict";e.d(n,"b",(function(){return a})),e.d(n,"d",(function(){return c})),e.d(n,"c",(function(){return l})),e.d(n,"a",(function(){return u}));var o=e(26),i=e(8),r=e(319);r.setOptions({gfm:!0,breaks:!0,headerPrefix:"t-"});var a=function(t){var n=t;return n=r.parse(n)},c=function(t,n,e){var o=t,r=o.match(n)||"";return Object(i.each)(r,(function(t){o=o.replace(t,e(t))})),o},l=function(t,n,e){var o=t,i=n.replace("[[","").replace("]]",""),r="(?:\\[\\[".concat(i,"\\]\\])((?:[^]*))(?:\\[\\[").concat(i,"\\]\\])"),a=new RegExp(r,"gm"),c=o.match(a)||"";if(c[0]){for(var l=c[0].split(n),s=[],u=0;u<l.length;u++){var d=l[u];""!==d&&s.push(d)}for(var p=0;p<s.length;p++){s[p];if(p%2===0)try{s[p]=e(s[p])}catch(b){console.warn("[REPLACE CUSTOM MD TAGS] error: ".concat(b),s[p])}}var f=s.join("");o=o.replace(a,f)}return o},s=function t(n,e){var o=!1;if(Object(i.each)(n,(function(t){t.id===e&&(o=!0)})),o){var r=!1,a=[e[e.length-2],e[e.length-1]],c=e.slice(0,-2),l=parseInt(a[1]);return"-"!==a[0]||isNaN(l)||(r=!0),r?e="".concat(c,"-").concat(l+1):e+="-1",t(n,e)}return e},u=function(t){for(var n=[],e=t.split("\n"),i=[],r=0;r<e.length;r++){var a=e[r],c=Object(o.a)(a.matchAll(/([#]{1,9})\ (.+)/gi));if(c.length>0){var l=c[0],u=l[2].toLowerCase(),d=r,p=u.trim().split(" ").join("-").replace(/[^a-zA-Z0-9-_\xc0-\xfa]/gi,"");p=s(i,p),i.push({raw:a,matches:l,id:p,line:d,title:u,ranking:l[1].length}),n.push({id:p,title:u,line:d})}}return n}},72:function(t,n,e){"use strict";e.d(n,"b",(function(){return m})),e.d(n,"a",(function(){return v})),e.d(n,"c",(function(){return w}));var o=e(9),i=e(0),r=e(61),a=e(17),c=e(44),l=e(45),s=e(12),u=e(65),d=e(8),p=e(32),f=e(10),b=e(66),g=e(22),h=e(1),m=function(t){var n=localStorage.getItem("settings-".concat(t))||"";return Object(b.a)(n,[['"',""]])},v=function(t){var n=Object(r.a)("settings-backend-port",-1),e=Object(o.a)(n,2),f=e[0],b=e[1],m=Object(r.a)("settings-backend-protocol","same"),v=Object(o.a)(m,2),w=(v[0],v[1],Object(i.useContext)(s.a)),O=a.a.settingsPopup,x=[];if(w){var j=w.userSettings,k="".concat(window.location.protocol,"//"),y="".concat(k).concat(w.status.ipsServer.getLocal()).concat(p.a.global.port),C="https://api.qrserver.com/v1/create-qr-code/?size=400x400&margin=50&data=".concat(y);x=[{title:"Devices",fields:[{type:"text",var:y,customHtml:'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class="qrcode-wrapper">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img src="'.concat(C,'"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<br>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>'),title:"Tiro Url",readOnly:!0,expl:"Access Tiro on another device on the <b>same wifi/local network</b> either by :\n\t\t\t\t\t\t\t\t\t\t\t\t<br>\n\t\t\t\t\t\t\t\t\t\t\t\t - Entering that url in a browser\n\t\t\t\t\t\t\t\t\t\t\t\t <br>\n\t\t\t\t\t\t\t\t\t\t\t\t - Scanning that qrcode (on desktop, go to a website like <a href='https://webqr.com/'>webqr.com </a>)",modifier:function(){},onCustomHtmlClick:function(){w.ui.lightbox.open(0,[C])}},{type:"none",var:"",customHtml:"<button> Open Tiro Window </button>",title:"Open Tiro Window",readOnly:!0,expl:"Open Tiro in a separate window (Desktop only)",modifier:function(){},onCustomHtmlClick:function(){window.open(window.location.href,"popup-tiro","width=800,height=1000"),window.open("","_self").close()}}]},{title:"layout",fields:[{type:"text",title:"Main color",expl:"A color string like 'orange' or 'blue' or an Hex string like '#E86666' (tiro red) or '#729fc4'",var:j.get("ui_layout_colors_main"),modifier:function(t){j.set("ui_layout_colors_main",t)}},{type:"checkbox",title:"Sidebar Shortcut Panel",expl:"Adds a shortcuts/scratchpad space in the sidebar. To edit it, create a note in '.tiro/shortcuts.md'",var:j.get("ui_layout_shortcuts_panel"),modifier:function(t){j.set("ui_layout_shortcuts_panel",t)}}]},{title:"editor",fields:[{type:"checkbox",title:"Markdown Preview",expl:"Preview Images and Latex in the editor",var:j.get("ui_editor_markdown_preview"),modifier:function(t){R(!0),j.set("ui_editor_markdown_preview",t)}},{type:"checkbox",title:"Links button",expl:"Replace http links into buttons in the editor by adding a '/' at the end of it.",var:j.get("ui_editor_links_as_button"),modifier:function(t){R(!0),j.set("ui_editor_links_as_button",t)}},{type:"checkbox",title:"Improved Markdown Table",expl:"Improves the display of markdown table. Can be disabled inside a note if it includes '--no-editor-table'. ",var:j.get("ui_editor_markdown_table_preview"),modifier:function(t){R(!0),j.set("ui_editor_markdown_table_preview",t)}}]},{title:"Users and Rights",fields:[{type:"checkbox",title:"Enable read-only viewer",expl:'Create a "viewer" user that can read but not edit the content',var:j.get("users_viewer_user_enable"),modifier:function(t){j.set("users_viewer_user_enable",t,{writeInSetupJson:!0})}},{type:"text",title:"Viewer user password",expl:'Define the "viewer" user password',var:j.get("users_viewer_user_password"),modifier:function(t){j.set("users_viewer_user_password",t,{writeInSetupJson:!0})}},{type:"checkbox",title:"Demo Mode",expl:"Autofill the 'viewer' user and password on login popup for easier access during a demo mode",var:j.get("demo_mode_enable"),modifier:function(t){j.set("demo_mode_enable",t,{writeInSetupJson:!0})}},{type:"none",var:"",customHtml:"<button> Logout </button>",title:"Logout current User",readOnly:!0,expl:"Logout Current User",modifier:function(){},onCustomHtmlClick:function(){Object(g.a)(),t.onClose(),Object(s.d)((function(t){t.folders.get(["/"],(function(){}))}))}}]},{title:"Advanced",fields:[{type:"text",var:f,title:O.backend.port,expl:O.backend.portExpl,modifier:b}]}]}var _=Object(u.a)("config-panels-opened",[]),E=Object(o.a)(_,3),T=E[0],S=E[1],I=(E[2],Object(i.useState)(!1)),N=Object(o.a)(I,2),F=N[0],R=N[1];return Object(h.d)("div",{className:"settings-popup-wrapper"},Object(h.d)(c.a,{title:"".concat(O.title),onClose:function(){t.onClose()}},x.map((function(t,n){return Object(h.d)("div",{className:"settings-panel"},Object(h.d)("h3",{onClick:function(){!function(t){var n=Object(d.cloneDeep)(T);n[t]=!n[t],S(n)}(n)}},Object(h.d)("div",{className:"arrow"},T[n]?"\u25bc":"\u25ba"),t.title),Object(h.d)("div",{className:"fields-wrapper ".concat(T[n]?"active":"")},t.fields.map((function(t){return Object(h.d)("div",{className:"field-wrapper"},Object(h.d)("div",{className:"input-and-html-wrapper"},"none"===t.type&&Object(h.d)("span",null,t.title),"none"!==t.type&&Object(h.d)(l.a,{value:t.var,label:t.title,type:t.type,readonly:t.readOnly,onChange:function(n){"checkbox"!==t.type&&t.modifier(n)},onCheckedChange:function(n){"checkbox"===t.type&&t.modifier(n)}}),t.customHtml&&Object(h.d)("div",{className:"custom-html-wrapper",onClick:function(n){t.onCustomHtmlClick&&t.onCustomHtmlClick()},dangerouslySetInnerHTML:{__html:t.customHtml}})),Object(h.d)("div",{className:"explanation",dangerouslySetInnerHTML:{__html:t.expl||""}}))}))))})),F&&Object(h.d)("button",{onClick:function(t){window.location.reload()}},"Reload App")))},w=function(){return"\n&.device-view-mobile {\n\t\t.popup-wrapper .popupContent {\n\t\t\t\twidth: 80vw;\n\t\t\t\t.field-wrapper {\n\t\t\t\t\t\tdisplay: block;\n\t\t\t\t\t\t.explanation {\n\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\tpadding: 5px 0px;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinput {\n\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t}\n}\n\n.settings-popup-wrapper .popup-wrapper .popupContent {\n padding: 0px 20px;\n\t\twidth: 50vw;\n\t\tmin-height: 50vh;\n\t\tmax-height: 70vh;\n\t\toverflow-y: scroll;\n\n}\n\n.settings-panel {\n\n\t\th3 {\n\t\t\t\tcursor: pointer;\n\t\t\t\ttext-transform: uppercase;\n\t\t\t\t.arrow {\n\t\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t\t\tfont-size: 7px;\n\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\tbottom: 2px;\n\t\t\t\t\t\tmargin-right: 10px;\n\t\t\t\t}\n\t\t}\n\t\t.fields-wrapper {\n\t\t\t\tdisplay: none;\n\t\t\t\t&.active {\n\t\t\t\t\t\tdisplay: block;\n\t\t\t\t\t\tdisplay: block;\n\t\t\t\t\t\tpadding: 12px 12px 0px 12px;\n\t\t\t\t\t\tbackground: ".concat(f.a.colors.bgPopup2,";\n\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\tborder: 1px ").concat(f.a.colors.bgPopup3," solid;\n\t\t\t\t\t\tmargin-top: 10px;\n\t\t\t\t}\n\t\t\t\t.field-wrapper {\n\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\tpadding-bottom: 11px;\n\t\t\t\t\t\talign-items: center;\n\t\t\t\t\t\t.input-and-html-wrapper {\n\t\t\t\t\t\t\t\twidth: 50%;\n\t\t\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\t\t\t.input-component {\n\t\t\t\t\t\t\t\t\t\tflex: 1;\n\t\t\t\t\t\t\t\t\t\tpadding: 0px;\n\t\t\t\t\t\t\t\t\t\tinput {\n\t\t\t\t\t\t\t\t\t\t\t\tfont-size: 10px;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.custom-html-wrapper {\n\t\t\t\t\t\t\t\t\t\tmargin-left: 20px;\n\t\t\t\t\t\t\t\t\t\t.qrcode-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\timg {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmargin: 5px 25px 0px 0px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 50px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t&:hover {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\twidth: 150px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.explanation {\n\t\t\t\t\t\t\t\twidth: 50%;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n\n}\n\n\n\n\n.buttons {\n display: flex;\n padding: 20px 0px 0px 0px;\n button {\n width: 30%;\n padding: 10px;\n }\n}\n")}},73:function(t,n,e){"use strict";e.d(n,"a",(function(){return o})),e.d(n,"b",(function(){return i})),e.d(n,"c",(function(){return r}));var o=function(t,n){for(var e=document.querySelectorAll(t),o=function(t){var o=e[t];null===o||void 0===o||o.addEventListener("click",(function(t){n(o)}))},i=0;i<e.length;i++)o(i)},i=function(t,n){return r(t,n,{isUrl:!0})},r=function(t,n,e){var o=document.querySelector("".concat(t)),i=null===o||void 0===o?void 0:o.querySelector("iframe"),r="";if(null!==e&&void 0!==e&&e.isUrl){var c=n;r="<iframe\n\t\t\t\tsrc='".concat(c,"'\n\t\t\t\ttitle='").concat(c,'\'\n\t\t\t\tallowFullScreen\n\t\t\t\tclass="resource-link-iframe small-iframe"\n\t\t\t\t></iframe>')}else n=n.replaceAll('"',"'"),r='<iframe\n\t\t\t\tsrcdoc="'.concat(a).concat(n,'"\n\t\t\t\tallowFullScreen\n\t\t\t\tclass="resource-link-iframe small-iframe"\n\t\t\t\t></iframe>');if(o){o.innerHTML=i?"":r,i?o.classList.remove("open"):o.classList.add("open");var l=o.classList.contains("big");i?i&&!l?o.classList.add("big"):i&&l&&o.classList.remove("big"):o.innerHTML=r}},a="\n<style>\nimg {\n\t\tmax-width: 100%!important;\n\t\theight: auto!important;\n}\nbody, html {\n\t\tfont-family: sans-serif;\n}\n</style>\n"},76:function(t,n,e){"use strict";e.d(n,"a",(function(){return v})),e.d(n,"b",(function(){return O}));var o=e(9),i=e(8),r=e(0),a=e(40),c=e(12),l=e(22),s=e(13),u=e(115),d=e(10),p=e(37),f=e(31),b=e(83),g=e(1),h=400,m=200,v=function(t){var n=Object(r.useState)(!1),e=Object(o.a)(n,2),i=e[0],d=e[1],v=t.markdownTag.split("](")[1].slice(0,-1),w=t.markdownTag.split("](")[0].replace("![",""),O=v.split("."),k=O[O.length-1];"7z"===k&&(k="d7z");var y="".concat(Object(p.a)(t.file.folder),"/").concat(v).concat(Object(l.c)()),C="".concat(w,".").concat(k),_=[{title:"Download",icon:"faDownload",action:function(){console.log(y,C),x(C,y)}}],E=!1;["pdf","mp4","mp3","ogg","wav","aac","webm","flac","txt","json","css","js","html","epub"].includes(k.toLowerCase())&&(E=!0);var T=window.location.origin,S=["ppt","pptx","doc","docx","xls","xlsx"].includes(k.toLowerCase()),I=S||"pdf"===k.toLowerCase(),N=j(T,["localhost","192.168"]),F=y;!N&&S&&(F="https://docs.google.com/gview?url=".concat(y,"&embedded=true"));var R=N&&S?"[REQUIRES NON LOCAL TIRO URL] ":"";(E||S)&&(_.unshift({title:R+"Open in detached window",icon:"faExternalLinkAlt",action:function(){N&&S||window.open(F,"popup-".concat(F),"width=800,height=1000")}}),_.unshift({title:i?"Close Preview":R+"Preview",icon:i?"faEyeSlash":"faEye",action:function(){N&&S||d(!i)}}));var L="id-".concat(Object(a.a)()),A=function(t,n){var e=document.querySelector(t);null===e||void 0===e||e.addEventListener("click",(function(t){n(t)}))},P=function(){var t=document.querySelector(".".concat(L," .iframe-wrapper")),n=null===t||void 0===t?void 0:t.querySelector("iframe"),e=I?h:m,o="<iframe\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsrc='".concat(F,"'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitle='").concat(F,'\'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tallowFullScreen\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclass="resource-link-iframe"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstyle="height:').concat(e,'px"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>');t&&(t.innerHTML=n?"":o,B(n?"closed":"open"))},D=function(){N&&S||("epub"===k.toLocaleLowerCase()?Object(c.d)((function(n){n.file.getContent("/.tiro/tags/epub.md",(function(n){!function(){var n=document.querySelector(".".concat(L," .iframe-wrapper"));if(n){var e=n.querySelector("iframe"),o=Object(u.b)(Object(g.d)(b.a,{file:t.file,block:{type:"tag",tagName:"epub",content:F,start:0,end:0},windowHeight:h+75,windowId:"null",yCnt:0,onIframeMouseWheel:function(){}}),{delay:100}),i='<div id="'.concat(o,'" class="resource-link-ctag"><div class="loading-string">loading...</div></div>');n.innerHTML=e?"":i,B(e?"closed":"open")}}()}),{onError:function(t){}})})):"pdf"===k.toLocaleLowerCase()?Object(c.d)((function(n){n.file.getContent("/.tiro/tags/pdf.md",(function(n){!function(){var n=document.querySelector(".".concat(L," .iframe-wrapper"));if(n){var e=n.querySelector("iframe"),o=Object(u.b)(Object(g.d)(b.a,{file:t.file,block:{type:"tag",tagName:"pdf",content:F,start:0,end:0},windowHeight:h+75,windowId:"null",yCnt:0,onIframeMouseWheel:function(){}}),{delay:100}),i='<div id="'.concat(o,'" class="resource-link-ctag"><div class="loading-string">loading...</div></div>');n.innerHTML=e?"":i,B(e?"closed":"open")}}()}),{onError:function(t){P()}})})):P())},M="ressource-preview-status",z="".concat(t.file.path,"-").concat(v),B=function(t){Object(c.d)((function(n){n.cache.get(M,(function(e){e||(e={}),e[z]=t,n.cache.set(M,e,-1)}))}))};return setTimeout((function(){var cb;cb=function(t){"open"===t&&D()},Object(c.d)((function(t){t.cache.get(M,(function(t){if(t){var n=t[z]?t[z]:"closed";cb(n)}}))}));var t=".".concat(L," ul.buttons-toolbar-component");A("".concat(t," .btn-preview"),D),A("".concat(t," .btn-open"),(function(){N&&S||window.open(F,"popup-".concat(F),"width=800,height=1000")})),A("".concat(t," .btn-download"),(function(){x(C,y)}))}),100),Object(g.d)("div",{className:"".concat(L," resource-link-iframe-wrapper")},Object(g.d)("div",{className:" resource-link-wrapper device-".concat(Object(s.a)())},Object(g.d)("div",{className:"resource-link-icon ".concat(k)}),Object(g.d)("div",{className:"resource-link-content-wrapper"},Object(g.d)("a",{className:"resource-link preview-link",href:y,download:!0},w," (",k,")"),Object(g.d)(f.a,{popup:!1,buttons:_,size:1}))),Object(g.d)("div",{className:"iframe-wrapper"}))},w=".resource-link-icon",O=function(){return"\n.loading-string {\n text-align: center;\n padding: 50px;\n}\n.resource-link-ctag {\n\t\theight: ".concat(h-21,"px;\n\t\toverflow:hidden;\n\t\twidth: 100%;\n\t\tborder:none;\n}\n.resource-link-iframe {\n\t\tborder: none;\n\t\twidth: 100%;\n}\n\n.resource-link-wrapper,\n.resource-link-wrapper a {\n\t\tcolor: ").concat(d.a.colors.main,";\n}\n.resource-link-iframe-wrapper {\n\t\tbackground: #f7f6f6;\n\t\tborder-radius: 5px;\n\t\toverflow:hidden;\n}\n.preview-area-wrapper .resource-link-iframe-wrapper {\n\t\tmargin-top: 3px;\n\t\tbackground:#eee!important;\n}\n\n.resource-link-wrapper {\n\t\tpadding: 7px;\n\t\tborder-radius: 10px;\n\t\tposition: relative;\n\t\tmargin: 5px 0px;\n}\n\n.mdpreview-source {\n\tdisplay:none!important;\n}\n\n.resource-link-icon {\n\t\ttop: 14px;\n\t\tleft: 19px;\n\t\twidth: 12px;\n\t\theight: 27px;\n\t\tdisplay: inline-block;\n\t\tbackground-image: url(/static/media/file-solid.6415173e.svg);\n\t\topacity: 0.08;\n\t\tposition: absolute;\n\t\tbackground-repeat: no-repeat;\n\t\ttransform: scale(1.5);\n\t\tbackground-image: url(").concat(d.a.assets.fileIcon,");\n}\n\n").concat(w,".epub, ").concat(w,".cbr, ").concat(w,".cbz,").concat(w,".mobi, ").concat(w,".azw, ").concat(w,".azw3, ").concat(w,".iba {background-image: url(").concat(d.a.assets.bookIcon,"); }\n").concat(w,".pdf\n{background-image: url(").concat(d.a.assets.pdfIcon,"); }\n\n").concat(w,".xls, ").concat(w,".xlsm, ").concat(w,".xlsx, ").concat(w,".ods\n{background-image: url(").concat(d.a.assets.excelIcon,"); }\n\n").concat(w,".avi, ").concat(w,".flv, ").concat(w,".h264, ").concat(w,".m4v, ").concat(w,".mov, ").concat(w,".mp4, ").concat(w,".mpg, ").concat(w,".mpeg, ").concat(w,".rm, ").concat(w,".swf, ").concat(w,".vob, ").concat(w,".wmv, ").concat(w,".mkv\n{background-image: url(").concat(d.a.assets.videoIcon,"); }\n\n").concat(w,".d7z, ").concat(w,".arj, ").concat(w,".deb, ").concat(w,".rar, ").concat(w,".gz, ").concat(w,".zip, ").concat(w,".rpm, ").concat(w,".pkg\n{background-image: url(").concat(d.a.assets.archiveIcon,");}\n\n").concat(w,".aif, ").concat(w,".mp3, ").concat(w,".cda, ").concat(w,".mid, ").concat(w,".mpa, ").concat(w,".ogg, ").concat(w,".wav, ").concat(w,".wpl, ").concat(w,".wma, ").concat(w,".midi\n{background-image: url(").concat(d.a.assets.audioIcon,"); }\n\n").concat(w,".doc, ").concat(w,".docx, ").concat(w,".odt, ").concat(w,".txt\n{background-image: url(").concat(d.a.assets.wordIcon,"); }\n\n").concat(w,".html, ").concat(w,".css, ").concat(w,".js, ").concat(w,".json, ").concat(w,".ts, ").concat(w,".jsx, ").concat(w,".tsx\n{background-image: url(").concat(d.a.assets.codeIcon,"); }\n\n").concat(w,".bin, ").concat(w,".dmg, ").concat(w,".iso, ").concat(w,".toast, ").concat(w,".vcd\n{\n\t\ttop: 19px;\n\t\ttransform: scale(1.8);\n\t\tbackground-image: url(").concat(d.a.assets.diskIcon,");\n}\n\n").concat(w,".ppt, ").concat(w,".pptx, ").concat(w,".odp, ").concat(w,".key, ").concat(w,".pps\n{background-image: url(").concat(d.a.assets.presIcon,"); }\n\n\n.resource-link-content-wrapper {\n\t\tdisplay: flex;\n\t\tjustify-content: space-between;\n}\n\n.resource-link-content-wrapper {\n}\n\n.resource-link-content-wrapper ul {\n\t\tpadding-left: 7px;\n}\n.resource-link-content-wrapper ul li {\n\t\tpadding-left: 0px;\n}\n.resource-link-content-wrapper ul li:before {\n\t\tdisplay: none;\n}\n\n\n// HIDING IT ON DESKTOP \n.device-desktop .resource-link-wrapper:hover .resource-link-content-wrapper ul {\n\t\topacity:1;\n\t\twidth: 90px;\n\t\t// margin-top: 15px;\n\t\tpointer-events: all;\n}\n.device-desktop .resource-link-content-wrapper ul {\n\t\topacity: 0;\n\t\twidth: 0px;\n\t\ttransition: 0.2s all;\n\t\ttransition-delay: 0.2s, 0s;\n\t\tpointer-events: none;\n}\n\n\n")},x=function(t,n){var e=document.createElement("a");e.style.display="none",document.body.appendChild(e),e.href=n,e.target="_blank",e.setAttribute("download",t),e.click(),window.URL.revokeObjectURL(e.href),document.body.removeChild(e)},j=function(t,n){var e=!1;return Object(i.each)(n,(function(n){n.includes(t)&&(e=!0),t.includes(n)&&(e=!0)})),e}},79:function(t,n,e){"use strict";e.d(n,"c",(function(){return I})),e.d(n,"a",(function(){return F})),e.d(n,"b",(function(){return R})),e.d(n,"d",(function(){return L}));var o=e(9),i=e(0),r=e.n(i),a=e(8),c=e(270),l=e.n(c),s=(e(435),e(436),e(138)),u=e(98),d=e(139),p=e(21),f=e(12),b=e(33),g=e(140),h=e(19),m=e(55),v=e(100),w=e(48),O=e(13),x=e(141),j=e(69),k=e(1),y=function(t){var n=Object(i.useState)(""),e=Object(o.a)(n,2),r=e[0],c=e[1],l=Object(i.useState)(0),s=Object(o.a)(l,2),u=(s[0],s[1]),d=Object(i.useRef)(0),p=function(t){t>d.current&&(d.current=t),u(d.current)};Object(i.useEffect)((function(){u(0)}),[t.fileContent]),Object(i.useEffect)((function(){c(t.fileContent)}),[t.fileContent,t.file.path]),Object(i.useEffect)((function(){setTimeout((function(){w.a.onWindowLoad(t.windowId)}),500)}),[t.file.path]);var f=Object(i.useState)(-1),g=Object(o.a)(f,2),h=g[0],y=g[1];Object(i.useEffect)((function(){t.lineJumpEvent&&("active"!==t.lineJumpEvent.windowId||t.isActive)&&("active"!==t.lineJumpEvent.windowId&&t.lineJumpEvent.windowId!==t.windowId||(y(t.lineJumpEvent.line),setTimeout((function(){y(-1)}),100)))}),[t.lineJumpEvent]);var C={id:"",line:0,title:""},_=function(n){var e=Object(j.a)(r),o=C;if(Object(a.each)(e,(function(t){n>=t.line&&(o=t)})),""!==o.id){var i=".window-id-".concat(t.windowId," #t-").concat(o.id);try{var c,l=null===(c=document.querySelector(i))||void 0===c?void 0:c.offsetTop;Object(a.isNumber)(l)&&(w.a.updatePreviewOffset(t.windowId,l),w.a.scrollPreview(t.windowId))}catch(s){console.error(s)}}},E=Object(b.b)(_,200),T=Object(b.a)(_,500);return Object(k.d)("div",{className:"dual-view-wrapper view-".concat(t.viewType," device-").concat(Object(O.a)()," window-id-").concat(t.windowId)},Object(k.d)(v.a,{windowId:t.windowId,editorType:"codemirror",file:t.file,canEdit:t.canEdit,fileContent:t.fileContent,isActive:t.isActive,jumpToLine:h,posY:0,onTitleClick:function(t){!function(t){E(t),T(t)}(t)},onScroll:function(t){},onUpdateY:function(t){},onMaxYUpdate:p,onFileEdited:function(n,e){t.onFileEdited(n,e),c(e)},onScrollModeChange:function(t){},onViewToggle:function(n){t.onViewChange&&t.onViewChange(n)}}),Object(k.d)(m.a,{windowId:t.windowId,file:t.file,posY:0,fileContent:r,onMaxYUpdate:p,yCnt:0,onIframeMouseWheel:function(t){}}),Object(k.d)(x.a,{windowId:t.windowId}))},C=function(t){var n=Object(i.useContext)(f.a),e=null===n||void 0===n?void 0:n.ui.note.lineJump.get;return Object(k.d)(y,Object(h.a)({},t,{lineJumpEvent:e}))},_=function(t){var n=Object(p.a)({},t.content),e=n.file,c=n.view,l=n.active,s=n.i,u=Object(i.useState)(""),d=Object(o.a)(u,2),h=d[0],m=d[1],v=Object(i.useState)(),w=Object(o.a)(v,2),O=w[0],x=w[1];Object(i.useEffect)((function(){x(c),Object(g.a)(null===e||void 0===e?void 0:e.path).then((function(t){t&&x(t)}))}),[c,null===e||void 0===e?void 0:e.path]);var j=Object(i.useRef)((null===e||void 0===e?void 0:e.path)||"");Object(i.useEffect)((function(){j.current=(null===e||void 0===e?void 0:e.path)||"",T(!1),e&&Object(f.d)((function(t){t.file.getContent(e.path,(function(t){m(t),T(!0)})),t.watch.file(e.path,(function(t){if(j.current===t.filePath)return!0===F.current?N.current=t.fileContent:void m(t.fileContent)}))}))}),[null===e||void 0===e?void 0:e.path,h]);var y=Object(i.useState)(!1),_=Object(o.a)(y,2),E=_[0],T=_[1],S=Object(i.useRef)({}),I=Object(i.useRef)(0);Object(i.useEffect)((function(){var t=S.current;Object(f.d)((function(n){n.watch.appStatus((function(n){if(!1===n.isConnected)I.current=I.current+1;else if(!0===n.isConnected){I.current>=1&&n.isConnected&&Object(f.d)((function(n){var o=null===e||void 0===e?void 0:e.path;if(o&&t&&t.path&&o===t.path&&t.content){var i=t.content;console.log("3 UPDATE OFFLINE CONTENT",{filepath:o,content:i}),n.file.saveContent(o,i,{history:!0}),setTimeout((function(){n.file.saveContent(o,i,{history:!0}),setTimeout((function(){n.file.saveContent(o,i,{history:!0}),setTimeout((function(){n.file.saveContent(o,i,{history:!0})}),100)}),10)}),10)}}))}}))}))}),[null===e||void 0===e?void 0:e.path]);var N=Object(i.useRef)(!1),F=Object(i.useRef)(!1),R=Object(b.a)((function(){F.current=!1,Object(a.isBoolean)(N.current)||(N.current=!1)}),2e3);return Object(i.useEffect)((function(){e&&l&&Object(f.d)((function(t){t.ui.browser.goTo(e.folder,e.name)}))}),[l]),Object(k.d)(r.a.Fragment,null,e&&Object(k.d)("div",{className:"window-editor-wrapper"},Object(k.d)(C,{windowId:s,file:e,fileContent:h,isActive:l,canEdit:E,viewType:O,onViewChange:t.onViewChange,onFileEdited:function(t,n){!function(t,n){Object(f.d)((function(e){e.file.saveContent(t,n,{history:!0})})),F.current=!0,R(),S.current={content:n,path:null===e||void 0===e?void 0:e.path}}(t,n)}})))},E=r.a.memo(_,(function(t,n){return!1})),T=e(10),S=e(31),I={rows:2,cols:4},N={m:10,rows:I.rows,cols:I.cols,decalBottom:10},F=function(t){var n=Object(i.useState)([]),e=Object(o.a)(n,2),c=e[0],p=e[1],b=Object(i.useState)([]),g=Object(o.a)(b,2),h=g[0],m=g[1],v=Object(i.useRef)();Object(i.useEffect)((function(){t.grid&&t.grid.layout&&(m(t.grid.layout),p(t.grid.content))}),[t.refresh]),Object(i.useEffect)((function(){D(),T()}),[h]);var w=function(n,e){t.onGridUpdate({layout:n,content:e})},x=function(){var t=c[0].file;if(t){var n=function(t){for(var n=[],e=I,o=function(o){for(var i=[],r=function(n){var e=0;Object(a.each)(t,(function(t){for(var i=0;i<t.w;i++)for(var r=0;r<t.h;r++){var a=t.x+i,c=t.y+r;a===n&&c===o&&(e=1)}})),i.push(e)},c=0;c<e.cols;c++)r(c);n.push(i)},i=0;i<e.rows;i++)o(i);for(var r=[-1,-1],c=[-1,-1],l=0;l<e.rows;l++)for(var s=0;s<e.cols;s++)0===n[l][s]&&-1===r[0]&&-1===r[1]&&(r[0]=s,r[1]=l),0===n[l][s]&&(c[0]=s,c[1]=l);var u=c[0]-r[0]+1,d=c[1]-r[1]+1;return{x:r[0],y:r[1],w:u,h:d}}(h),e=Object(u.a)({file:t,w:n.w,h:n.h,x:n.x,y:n.y}),o=Object(a.cloneDeep)(h);o.push(e.layout),U(o)&&(m(o),setTimeout((function(){var t=Object(a.cloneDeep)(c);t.push(e.content);var n=M(e.content.i,t);p(n),w(o,n)})),w(o,c))}},j=Object(i.useState)(!1),y=Object(o.a)(j,2),C=y[0],_=y[1],T=function(){_(h.length>1)},F=function(t){var n=Object(a.filter)(Object(a.cloneDeep)(h),(function(n){return n.i!==t})),e=function(t){var n=I;return 1===t.length&&(t[0].x=0,t[0].y=0,t[0].h=n.rows,t[0].w=n.cols),t}(n);m(e),setTimeout((function(){var e=Object(a.filter)(Object(a.cloneDeep)(c),(function(n){return n.i!==t}));p(e),w(n,e)})),w(n,c)},R=Object(i.useState)(!1),L=Object(o.a)(R,2),A=L[0],P=L[1],D=function(){var t=0,n=N.cols*N.rows;Object(a.each)(h,(function(n){t+=n.w*n.h})),P(t!==n)},M=function(t,n){var e=Object(a.cloneDeep)(n);return Object(a.each)(e,(function(n){n.active=n.i===t})),e},z=function(t,n){var e=M(t,c);p(e),w(h,e),n&&(null===V||void 0===V||V.ui.browser.goTo(n.folder,n.name))},B=function(t){v.current=Object(a.cloneDeep)(t)},U=function(t){for(var n=!0,e=0;e<t.length;e++){var o=t[e];o.y>1&&(n=!1),o.h>1&&o.y>0&&(n=!1)}return n};Object(d.b)(),Object(i.useEffect)((function(){var t=H.current;if(t)return t.addEventListener("resize",(function(){})),function(){t.removeEventListener("resize",(function(){}))}}),[]);var H=Object(i.useRef)(null),W={width:300,height:300};H.current&&(W.width=H.current.clientWidth,W.height=H.current.clientHeight-N.decalBottom);var q=function(t,n){var e=Object(a.cloneDeep)(c);e[n].view=t,p(e),w(h,e)},V=Object(i.useContext)(f.a),G=Object(i.useState)(null),K=Object(o.a)(G,2),J=K[0],Y=K[1];Object(i.useEffect)((function(){if("mobile"===Object(O.a)()){var t=null===V||void 0===V?void 0:V.ui.windows.active.get();if(t)Y(t);else{var n={layout:h[0],content:c[0]};n.layout&&n.content&&n.layout.i===n.content.i&&(Y(n),z(n.content.i))}}}),[t.refresh]);return Object(k.d)("div",{className:"draggable-grid-wrapper"},Object(k.d)("div",{className:"draggable-grid-wrapper-in",ref:H},"mobile"!==Object(O.a)()&&Object(k.d)(l.a,{className:"draggable-grid",autoSize:!1,layout:h,onLayoutChange:function(t){var n=Object(a.cloneDeep)(t);if(U(n)){var e=function(t){var n=t,e=I;return n.length,2===n.length&&(n[0].w===e.cols/2-1&&n[1].w===e.cols/2||n[1].w===e.cols/2-1&&n[0].w===e.cols/2)&&(n[0].w=e.cols/2,n[1].w=e.cols/2),n}(n);B(e),m(e),w(e,c)}else{if(!v.current)return;var o=function(t){var n=t,e=I,o=null;console.log("0035",n),(2===n.length&&(n[0].w===e.cols-1&&n[0].h===e.rows&&n[1].w===e.cols/2&&n[1].h===e.rows||n[1].w===e.cols-1&&n[1].h===e.rows&&n[0].w===e.cols/2&&n[0].h===e.rows)||2===n.length&&(n[0].w===e.cols-1&&n[0].h===e.rows&&n[1].w===e.cols/2&&n[1].h===e.rows||n[1].w===e.cols-1&&n[1].h===e.rows&&n[0].w===e.cols/2&&n[0].h===e.rows))&&(console.log("[ALT LAYOUT] 0035 found i|iii to ii|ii"),o=Object(a.cloneDeep)(t),Object(a.each)(o,(function(t,n){t.w=e.cols/2,t.y=0,1===n&&(t.x=e.cols/2)})));return o}(t);o&&B(o);var i=o||v.current,r=Object(a.cloneDeep)(i);Object(a.each)(r,(function(t){t.refresh=Object(s.a)(t.refresh)})),m(r),w(r,c)}},cols:N.cols,compactType:"horizontal",useCSSTransforms:!1,rowHeight:W.height/N.rows-N.m*(N.rows+1),draggableHandle:".drag-handle",width:W.width,margin:[N.m,N.m]},h.map((function(n,e){return Object(k.d)("div",{key:n.i,className:" ".concat(c[e]&&c[e].active?"active":""," window-wrapper "),onClick:function(){c[e]&&!c[e].active&&z(c[e].i,c[e].file)},onMouseEnter:function(){}},function(t,n){return Object(k.d)(r.a.Fragment,null,Object(k.d)("div",{className:"note-active-ribbon"}),Object(k.d)("div",{className:"window-buttons-bar ".concat(A?"can-add":""," ").concat(C?"can-remove":"")},Object(k.d)(S.a,{design:"horizontal",popup:!1,buttons:[{icon:"faGripVertical",title:"Move Window",class:"drag-handle",action:function(){},onHover:function(){t&&!t.active&&z(t.i,t.file)}},{icon:"faPlus",title:"Add Window",class:"add-button",action:function(){x()}},{icon:"faPlus",title:"Delete Window",class:"delete-button",action:function(){F(t.i)}}],colors:["#d4d1d1","#615f5f"],size:.8})))}(n),Object(k.d)("div",{className:"note-wrapper"},Object(k.d)(E,{content:t.grid.content[e]&&t.grid.content[e],onViewChange:function(t){q(t,e)}})))}))),"mobile"===Object(O.a)()&&Object(k.d)("div",{className:"mobile-grid-view"},Object(k.d)("div",{className:" window-wrapper"},Object(k.d)("div",{className:"note-wrapper"},J&&Object(k.d)(E,{content:J.content,onViewChange:function(t){q(t,0)}}))))))},R=function(){return"\n.draggable-grid-wrapper \n.draggable-grid-wrapper-in \n.mobile-grid-view {\n\t\t.window-wrapper {\n\n\t\t\t\t.window-buttons-bar {\n\t\t\t\t\t\tdisplay: none;\n\t\t\t\t}\n\n\t\t\t\t.note-wrapper {\n\t\t\t\t\t\t.dual-view-wrapper {\n\t\t\t\t\t\t\t\t.editor-area {\n\t\t\t\t\t\t\t\t\t\tmargin-top: 47px;\n\t\t\t\t\t\t\t\t\t\t.infos-editor-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\tmargin-top: 10px;\n\t\t\t\t\t\t\t\t\t\t\t\ttop: -43px;\n\t\t\t\t\t\t\t\t\t\t\t\t.title-input-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tinput {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcolor: ".concat(T.a.colors.main,";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t.dropdown-icon {\n\t\t\t\t\t\t\t\t\t\t\t\ttop: -15px;\n\t\t\t\t\t\t\t\t\t\t\t\tright: 10px;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t.context-menu {\n\t\t\t\t\t\t\t\t\t\t\t\tright: 10px;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t.main-editor-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t.textarea-editor {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\theight: calc(100% - 300px);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding: 20px 20px 70px 20px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: calc(100% - 40px);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tresize: none;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t\t\t\t\theight: calc(100% - 165px);\n\t\t\t\t\t\t\t\t\t\t.preview-area {\n\t\t\t\t\t\t\t\t\t\t\t\ttop: 0px!important;\n\t\t\t\t\t\t\t\t\t\t\t\tbottom: 0px!important;\n\t\t\t\t\t\t\t\t\t\t\t\t.dates-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t.preview-content {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding: 0px 0px 50px 0px;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.scrolling-bar-wrapper {\n\t\t\t\t\t\t\t\t\t\tdisplay:none;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n}\n")},L=function(){return"\n\n.draggable-grid-wrapper {\n\t\t// remove transition\n\t\theight: 100%;\n\n\t\t.react-grid-item {\n\t\t\t\ttransition: all 0ms ease;\n\t\t\t\ttransition-property: left, top;\n\t\t\t\t.react-resizable-handle {\n\t\t\t\t\t\tbottom: 0px;\n\t\t\t\t\t\tright: 0px;\n\t\t\t\t\t\tcursor: se-resize;\n\t\t\t\t\t\topacity: 1;\n\t\t\t\t\t\twidth: 10px;\n\t\t\t\t\t\theight: 18px;\n\t\t\t\t\t\tbackground: rgb(247,247,247);\n\t\t\t\t}\n\t\t\t\t.react-resizable-handle:after {\n\t\t\t\t\t\ttop: 5px;\n\t\t\t\t\t\tleft: 1px;\n\t\t\t\t\t\topacity: 0.3;\n\t\t\t\t}\n\t\t}\n\n\t\t.draggable-grid-wrapper-in {\n\t\t\t\theight: 100%;\n\t\t\t\tposition: relative;\n\n\t\t\t\t.draggable-grid, .mobile-grid-view {\n\t\t\t\t\t\theight: 100%;\n\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\theight: 100%;\n\t\t\t\t\t\t.window-wrapper {\n\t\t\t\t\t\t\t\t//overflow: hidden;\n\t\t\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\t\t\tcolor: ".concat(T.a.colors.fontEditor,";\n\t\t\t\t\t\t\t\tbackground: ").concat(T.a.colors.bgEditor,";\n\t\t\t\t\t\t\t\tbox-shadow: 0px 0px 5px rgba(0,0,0,.1);\n\t\t\t\t\t\t\t\toverflow-y: hidden;\n\t\t\t\t\t\t\t\toverflow-x: hidden;\n\t\t\t\t\t\t\t\theight:100%;\n\n\t\t\t\t\t\t\t\t// height 100% everywhere\n\t\t\t\t\t\t\t\t.note-wrapper,\n\t\t\t\t\t\t\t\t.window-editor-wrapper,\n\t\t\t\t\t\t\t\t.dual-view-wrapper,\n\t\t\t\t\t\t\t\t.editor-area,\n\t\t\t\t\t\t\t\t.preview-area-wrapper,\n\t\t\t\t\t\t\t\t.preview-area,\n\t\t\t\t\t\t\t\t.main-editor-wrapper{\n\t\t\t\t\t\t\t\t\t\theight: 100%;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t.content-wrapper {\n\t\t\t\t\t\t\t\t\t\theight:100%;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.note-active-ribbon {\n\t\t\t\t\t\t\t\t\t\theight: 2px;\n\t\t\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t&.active {\n\t\t\t\t\t\t\t\t\t\t.note-active-ribbon {\n\t\t\t\t\t\t\t\t\t\t\t\t//background:").concat(T.a.colors.main,";\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t.dual-view-wrapper\n\t\t\t\t\t\t\t\t\t\t.editor-area\n\t\t\t\t\t\t\t\t\t\t.infos-editor-wrapper\n\t\t\t\t\t\t\t\t\t\t.title-input-wrapper\n\t\t\t\t\t\t\t\t\t\t.big-title {\n\t\t\t\t\t\t\t\t\t\t\t\tcolor: ").concat(T.a.colors.main,";\n\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t.note-wrapper {\n\t\t\t\t\t\t\t\t\t\t.editor-toolbar-dropdown {\n\t\t\t\t\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\t\t\t\t\ttop: 10px;\n\t\t\t\t\t\t\t\t\t\t\t\tright: 0px;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\n\n\n\n\t\t\t\t\t\t\t\t.window-buttons-bar {\n\t\t\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\t\t\tz-index:2;\n\t\t\t\t\t\t\t\t\t\tright: 30px;\n\t\t\t\t\t\t\t\t\t\ttop: 10px;\n\t\t\t\t\t\t\t\t\t\t.delete-button {display: none;}\n\t\t\t\t\t\t\t\t\t\t.add-button {display: none;}\n\t\t\t\t\t\t\t\t\t\t.drag-handle {\n\t\t\t\t\t\t\t\t\t\t\t\tcursor: grab;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t.delete-button svg {\n\t\t\t\t\t\t\t\t\t\t\t\ttransform: rotate(45deg);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t&.can-add {\n\t\t\t\t\t\t\t\t\t\t\t\t.add-button {display: block;}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t&.can-remove {\n\t\t\t\t\t\t\t\t\t\t\t\t.delete-button {display: block;}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\n\n\t\t\t\t\t\t\t\t// content css modification\n\t\t\t\t\t\t\t\t.dual-view-wrapper {\n\t\t\t\t\t\t\t\t\t\t.file-path-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\tdisplay:none;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t.editor-area {\n\t\t\t\t\t\t\t\t\t\t\t\tposition:initial;\n\t\t\t\t\t\t\t\t\t\t\t\t.infos-editor-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tz-index: 1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tposition:absolute;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttop: 0px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tleft: 0px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tborder-bottom: 1px solid rgba(0 0 0 / 5%);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//box-shadow: 0px 0px 5px rgba(0,0,0,.2);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\theight: 32px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding: 0px;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t.main-editor-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding-left: 0px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding-rigth: 10px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmargin-top: 33px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t.infos-editor-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding-left: 3px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding-rigth: 10px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: calc(100% - 10px);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.title-input-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding-left: 10px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.press-to-save {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttop: -6px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tleft: 0px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tright: initial;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\topacity: 0.5;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.big-title {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: calc(100% - 65px);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfont-family: ").concat(T.a.font.editor,";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcolor: grey;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfont-size: 15px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t// ALL\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t&.device-desktop {\n\t\t\t\t\t\t\t\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmargin-top: 33px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//padding: 5px 5px 5px 5px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbackground: ").concat(T.a.colors.bgPreview,";\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t.preview-area {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//padding: 10px 10px 10px 10px;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t// FULL PREVIEW\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t&.device-desktop.view-preview {\n\t\t\t\t\t\t\t\t\t\t\t\t.editor-area {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 0%;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t// FULL EDITOR\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t&.device-desktop.view-editor {\n\t\t\t\t\t\t\t\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t.scrolling-bar-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\ttop: 33px;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n\n\t\t.refocus-input {\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: -9999px;\n\t\t\t\tleft: -9999px;\n\t\t}\n}\n")}},83:function(t,n,e){"use strict";e.d(n,"a",(function(){return P})),e.d(n,"b",(function(){return M}));var o=e(21),i=e(19),r=e(9),a=e(0),c=e.n(a),l=e(40),s=e(68),u=function(t){var n=t.headerLog,e={},o=function(t){e[t]&&delete e[t]};return{notify:function(t){for(var i in e){var r=e[i],a=!1;if(i.endsWith("-once")&&(i=i.replace("-once",""),a=!0),i===t.subId)try{r(t.data),a&&o("".concat(i,"-once"))}catch(c){n&&console.log("".concat(n," error with function"),c)}}},subscribe:function(t,cb){e[t]=cb},subscribeOnce:function(t,cb){var n="".concat(t,"-once");e[n]=cb},unsubscribe:o}},d=e(69),p=e(37),f=e(22),b=e(16),g=e(18),h="[IFRAME PARENT] 00563",m=g.a.client.log.iframe,v=u({headerLog:h}),w=v.notify,O=v.subscribe,x=v.unsubscribe;window.addEventListener("message",(function(t){t.data.subId&&(m&&console.log(h,"parent <== iframe",t.data.data),w(t.data))}));var j={subscribe:O,unsubscribe:x,send:function(t,n){t&&t.contentWindow&&(m&&console.log(h,"parent ==> iframe",n),t.contentWindow.postMessage(n,"*"))}},k=function(t){var n,e="[IFRAME child] 00564",o={file:null,frameId:"",reloadCounter:0,windowId:"",innerTag:"",tagName:"",tagContent:"",loginToken:t.loginToken,backendUrl:t.backendUrl},i=function(t){if(""===o.frameId)return console.warn(e,"NO FRAME ID, CANNOT SEND TO PARENT");var n={subId:o.frameId,data:t};window.parent.postMessage(n,"*")},r=function(t){var n={error:"CUSTOM TAG/SCRIPT ERROR: ".concat(t)};i({action:"iframeError",data:n})},a=function(t){var n=document.getElementById("content-wrapper");if(!t){if(!n||0===n.clientHeight)return;t=n.clientHeight+20}i({action:"resize",data:{height:t}})},c=function(){var t=document.body,n=t.requestFullScreen||t.webkitRequestFullScreen||t.mozRequestFullScreen||t.msRequestFullScreen;n&&n.call(t)},l=t.createEventBus({headerLog:"[FRAME API] 00567"}),s=l.subscribeOnce,u=l.notify,d=function(t,n){var o;t.includes(".js")?(o=document.createElement("script")).src=t:t.includes(".css")&&((o=document.createElement("link")).href=t,o.rel="stylesheet",o.type="text/css"),o.onload=function(){n()};var i=document.getElementById("external-ressources-wrapper");if(!i)return console.error(e,"could not load ".concat(t," because ressource wrapper was not detected"));i.appendChild(o)},p=function(n){var e="?token=".concat(t.loginToken);return"".concat(t.backendUrl,"/static").concat("/.tiro/cache/ctag-ressources/").concat(t.getRessourceIdFromUrl(n)).concat(e)},f=function(t,cb){for(var n=0,o=function(){if(++n===t.length)try{cb&&cb()}catch(o){console.error(e,"ERROR LoadScript Callback : ".concat(o))}},i=function(){var n=t[r],i=p(n),a=!0===window.disableCache,c=function(){b("ressource.download",[n,"/.tiro/cache/ctag-ressources/"],(function(){d(i,(function(){o()}))}))};a?(console.warn(e,"CACHE DISABLED, DOWNLOADING RESSOURCES EVERYTIME!"),c()):function(t,n,e){try{var o=new XMLHttpRequest;o.open("HEAD",t,!1),o.send(),404!==o.status?n():e()}catch(i){e(i)}}(i,(function(){d(i,(function(){o()}))}),(function(){c()}))},r=0;r<t.length;r++)i()},b=function(n,e,cb){if(!e||!n||e.constructor!==Array||"string"!==typeof n)return r("Call Api : ".concat(n," => wrong arguments type / number(").concat(JSON.stringify({apiName:n,apiArguments:e,cb:cb}),")"));var o="iframe-api-call-".concat(t.generateUUID()," ");s(o,(function(t){cb&&cb(t)})),i({action:"apiCall",data:{reqId:o,apiName:n,apiArguments:e}})},g={version:1.2,call:b,utils:{getInfos:function(){return o},loadCachedRessources:f,getCachedRessourceUrl:p,getRessourceIdFromUrl:t.getRessourceIdFromUrl,loadScripts:function(t,cb){f(t,cb)},loadRessources:function(t,cb){f(t,cb)},loadScriptsNoCache:function(t,cb){for(var n=0,o=0;o<t.length;o++){var i=t[o],r=document.createElement("script");r.src=i,r.onload=function(){if(++n===t.length)try{cb&&cb()}catch(o){console.error(e,"ERROR LoadScript Callback : ".concat(o))}};var a=document.getElementById("external-ressources-wrapper");a&&a.appendChild(r)}},resizeIframe:a,fullscreenIframe:c,canScrollIframe:function(t){i({action:"canScrollIframe",data:{status:t}})},loadCustomTag:function(t,n,e){var o=g.utils.createDiv(),i=o.div,r=o.updateContent;e||(e={}),e.base_url=t.split("/").slice(0,-1).join("/");var a=!0;return!1===e.padding&&(a=e.padding),g.utils.loadScripts([t],(function(){var t=window.initCustomTag("".concat(n),e);a&&(t='<div class="with-padding" style="padding: 0px 15px;">'.concat(t,"</div>")),r(t)})),i},uuid:t.generateUUID,createDiv:function(){var n="ctag-content-wrapper-".concat(t.generateUUID()," ");return{div:'<div id="'.concat(n,'"></div>'),updateContent:function t(e){var o=document.getElementById(n);o?o.innerHTML=e:setTimeout((function(){t(e)}),100)}}}}};return window.api=g,n={init:function(n){o.frameId=n.frameId,o.innerTag=n.innerTag,o.tagContent=n.tagContent,o.tagName=n.tagName,o.file=n.file,o.reloadCounter=n.reloadCounter,o.windowId=n.windowId;var i,c=document.getElementById("content-wrapper");if(c){var l=t.unescapeHtml(c.innerHTML),s=(i=l,t.replaceCustomMdTags(i,"[[script]]",(function(t){var n="".concat(t);try{return new Function(n)()}catch(o){console.warn(e,"[SCRIPT] error: ".concat(o),n),r("".concat(o,' in Code "').concat(n,'"'))}})));c.innerHTML=s,setTimeout((function(){a()}),100),t.bindToElClass("title-search-link",(function(t){var n=t.dataset.file,e=t.dataset.folder,o=t.dataset.windowid;g.call("ui.browser.goTo",[e,n,{openIn:o}])}))}},askFullscreen:c,apiAnswer:function(t){var n={subId:t.reqId,data:t.data};u(n)}},window.onmessage=function(t){var e=t.data;if(e)for(var o in n)n&&n[o]&&o===e.action&&n[o](t.data.data)},g},y=e(12),C=e(55),_=e(33),E=e(8),T=e(66),S=e(24),I=function(t){var n=document.getElementsByClassName("refocus-input")[0];n&&n.focus()},N=e(1),F=g.a.client.log.verbose,R={},L=["latex","l"],A=function(t){var n="tag"===t.block.type&&!L.includes(t.block.tagName||""),e=Object(a.useState)(null),o=Object(r.a)(e,2),c=o[0],l=o[1],u=Object(a.useState)(null),d=Object(r.a)(u,2),p=d[0],f=d[1],b=Object(a.useState)("null"),g=Object(r.a)(b,2),h=g[0],m=g[1];Object(a.useEffect)((function(){n&&(m("loading"),"script"===t.block.tagName?(l("\n[[script]]".concat(t.block.content,"[[script]]")),setTimeout((function(){m("loaded")}),100),t.block.content=""):Object(y.e)().then((function(n){n.file.getContent("/.tiro/tags/".concat(t.block.tagName,".md"),(function(t){l(t),setTimeout((function(){m("loaded")}),100)}),{onError:function(){l(null)}})})))}),[t.windowId,t.block.content]);var v="l"===t.block.tagName||"latex"===t.block.tagName;return Object(a.useEffect)((function(){if(!n){var e=s.b.render({raw:t.block.content,file:t.file,windowId:t.windowId});v&&(e="[[l]]".concat(t.block.content,"[[l]]")),f(e)}}),[t.windowId,t.file,t.block]),Object(N.d)("span",{className:"content-block ".concat(n?"block-tag":"block-text"," ")},"loaded"===h&&n&&c&&Object(N.d)(D,Object(i.a)({},t,{noteTagContent:c})),!n&&p&&Object(N.d)("span",{className:"content-block-text",dangerouslySetInnerHTML:{__html:p}}))},P=c.a.memo(A,(function(t,n){var e=!0;return JSON.stringify(t.block)!==JSON.stringify(n.block)&&(e=!1),t.block.content!==n.block.content&&(e=!1),t.file.path!==n.file.path&&(e=!1),e})),D=function(t){var n=Object(o.a)({},t).noteTagContent,e=Object(a.useState)(""),i=Object(r.a)(e,2),c=i[0],g=i[1],h=Object(a.useRef)(null),m=Object(a.useState)(""),v=Object(r.a)(m,2),w=v[0],O=v[1],x=Object(a.useState)(!1),L=Object(r.a)(x,2),A=L[0],P=L[1],D=Object(a.useState)(0),M=Object(r.a)(D,2),z=M[0],B=M[1],U=Object(a.useState)(null),H=Object(r.a)(U,2),W=H[0],q=H[1],V=Object(a.useState)(!1),G=Object(r.a)(V,2),K=G[0],J=G[1],Y=function(){var n,e,o=function(n){K&&t.onIframeMouseWheel(n)};return null===(n=h.current)||void 0===n||null===(e=n.contentDocument)||void 0===e||e.addEventListener("mousewheel",o),function(){var t,n;return null===(t=h.current)||void 0===t||null===(n=t.contentDocument)||void 0===n?void 0:n.removeEventListener("mousewheel",o)}};Object(a.useEffect)(Y,[t.yCnt,K]);var $=Object(_.a)((function(e){Y(),O(e),q(null),j.subscribe(e,(function(n){if("resize"===n.action){var e=n.data.height;if(Object(E.isString)(e)&&e.endsWith("%")){var o=parseInt(e.replace("%",""))/100;e=(t.windowHeight||200)*o}F&&console.log("[IFRAME COMPONENT]","resizing to",e),B(e),P(!0)}if("canScrollIframe"===n.action){var i=n.data;J(i.status)}if("apiCall"===n.action){var r=n.data;Object(y.b)(r,(function(t,e){if("nok"===t)return q(e.error);var o={reqId:n.data.reqId,data:e};j.send(h.current,{action:"apiAnswer",data:o})}))}if("iframeError"===n.action){var a=n.data.error;q(a)}})),setTimeout((function(){var o={file:t.file,innerTag:t.block.content,windowId:t.windowId,frameId:e,reloadCounter:tt,tagContent:n,tagName:t.block.tagName||"",loginToken:Object(f.b)(),backendUrl:Object(b.c)()};j.send(h.current,{action:"init",data:o})}),100)}),500),Z=function(){var e=s.b.render({raw:n,windowId:t.windowId,file:t.file}),o='\n<html>\n\t\t<div id="content-wrapper">\n\t\t\t\t'.concat(e,'\n\t\t</div>\n\t\t<div id="external-ressources-wrapper"></div>\n\t\t<script>\n\t\t\t\tconst IMPORTED_backend_url = "').concat(Object(b.c)(),'"\n\t\t\t\tconst IMPORTED_login_token = "').concat(Object(f.b)(),'"\n\t\t\t\tconst IMPORTED_replaceCustomMdTags = ').concat(d.c.toString(),"\n\t\t\t\tconst IMPORTED_unescapeHtml = ").concat(p.h.toString(),"\n\t\t\t\tconst IMPORTED_createEventBus = ").concat(u.toString(),"\n\t\t\t\tconst IMPORTED_generateUUID = ").concat(l.a.toString(),"\n\t\t\t\tconst IMPORTED_getRessourceIdFromUrl = ").concat(l.b.toString(),"\n\t\t\t\tconst IMPORTED_bindToElClass = ").concat(s.a.toString(),"\n\t\t\t\tconst main = ").concat(k.toString(),";\n\t\t\t\tmain({\n\t\t\t\t\tbackendUrl: IMPORTED_backend_url,\n\t\t\t\t\tloginToken: IMPORTED_login_token,\n\t\t\t\t\treplaceCustomMdTags: IMPORTED_replaceCustomMdTags,\n\t\t\t\t\tunescapeHtml: IMPORTED_unescapeHtml,\n\t\t\t\t\tcreateEventBus: IMPORTED_createEventBus,\n\t\t\t\t\tgenerateUUID: IMPORTED_generateUUID,\n\t\t\t\t\tgetRessourceIdFromUrl: IMPORTED_getRessourceIdFromUrl,\n\t\t\t\t\tbindToElClass: IMPORTED_bindToElClass\n\t\t\t\t})\n\t\t<\/script>\n<style>\n\t\tbody::backdrop {\n\t\t\tbackground: #F7F7F7;\n\t\t}\n</style>\n</html>\n"),i='\n\t\t\t\t<div class="simple-css-wrapper">\n\t\t\t\t'.concat(o,"\n\t\t\t\t</div>\n\t\t\t\t<style>\n\t\t\t\t").concat(Object(C.c)(),"\n\t\t\t\t</style>\n\t\t\t\t");i=Object(T.a)(i,[["{{innerTag}}",t.block.content.trim()]]),g(i)},X=Object(a.useState)(0),Q=Object(r.a)(X,2),tt=Q[0],nt=Q[1],et=Object(a.useState)(!1),ot=Object(r.a)(et,2),it=ot[0],rt=ot[1];Object(a.useEffect)((function(){P(!1),Z();var t="iframe-".concat(Object(l.a)());return $(t),function(){j.unsubscribe(t)}}),[t.windowId,t.block.content,t.block.tagName,t.noteTagContent,tt]);var at=t.index||0,ct="".concat(t.windowId,"-").concat(at,"-").concat(t.block.tagName);Object(a.useEffect)((function(){R[ct]?dt(!0):R={}}),[]);var lt=Object(a.useState)(!1),st=Object(r.a)(lt,2),ut=st[0],dt=st[1];return Object(N.d)("div",{className:"iframe-view-wrapper ".concat(A?"can-show":"hide"," iframe-tag-").concat(t.block.tagName," ").concat(ut?"pinned":"")},Object(N.d)("div",{className:"ctag-menu"},Object(N.d)("div",{className:"ctag-ellipsis"},Object(N.d)(S.a,{name:"faEllipsisH",color:"#b2b2b2"})),Object(N.d)("div",{className:"ctag-menu-button ctag-reload",onClick:function(){nt(tt+1),rt(!0),setTimeout((function(){rt(!1)}),100)}},Object(N.d)(S.a,{name:"faRetweet",color:"#b2b2b2"})),Object(N.d)("div",{className:"ctag-menu-button ctag-fullscreen",onClick:function(){j.send(h.current,{action:"askFullscreen",data:{}})}},Object(N.d)(S.a,{name:"faExpand",color:"#b2b2b2"})),Object(N.d)("div",{className:"ctag-menu-button ctag-pin",onClick:function(){R[ct]=!ut,dt(!ut)}},Object(N.d)(S.a,{name:"faThumbtack",color:"#b2b2b2"}))),!it&&Object(N.d)("iframe",{onMouseLeave:I,ref:h,id:w,"data-testid":"iframe",title:w,srcDoc:c,className:"tag-iframe",style:{height:z},sandbox:"allow-scripts allow-same-origin allow-popups"}),W&&Object(N.d)("div",{className:"iframe-error"},Object(N.d)("code",null,Object(N.d)("pre",null,W))),Object(N.d)("input",{className:"refocus-input",type:"text"}))},M=function(){return"\n\n.content-blocks-wrapper {\n\t\tpadding: 0px 15px;\n}\n.simple-css-wrapper {\n}\n\n.content-blocks-wrapper,\n.simple-css-wrapper,\n.simple-css-wrapper > div,\n.content-block,\n.iframe-view-wrapper\n{\n}\n\n.iframe-view-wrapper {\n\t\t&.pinned {\n\t\t\t\tposition: fixed;\n\t\t\t\ttop: 10px;\n\t\t\t\tright: 10px;\n\t\t\t\tz-index: 1000;\n\t\t\t\toverflow:hidden;\n\t\t\t\t\tborder: 2px;\n\t\t\t\t\tbackground: white;\n\t\t\t\t\tborder-radius: 12px;\n\t\t\t\t\tbox-shadow: 0px 0px 5px #0006;\n\t\t\t\tiframe {\n\t\t\t\t\t\tmax-height: 90vh;\n\t\t\t\t\t\toverflow-y: scroll;\n\t\t\t\t}\n\t\t}\n\t\tposition: relative;\n\t\t.ctag-menu {\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: 3px;\n\t\t\t\tleft: 15px;\n\t\t\t\tcursor: pointer;\n\t\t\t\topacity: 0;\n\t\t\t\ttransition: 0.2s all; \n\t\t\t\tdisplay: flex;\n\t\t\t\tpadding: 3px;\n\t\t\t\tpadding-left: 8px;\n\n\t\t\t\tmargin-left: 8px;\n\t\t\t\tmargin-right: 8px;\n\n\t\t\t\t.ctag-ellipsis {\n\t\t\t\t\t\tmargin-right: 15px;\n\t\t\t\t}\n\t\t}\n\t\t.ctag-menu .ctag-menu-button {\n\t\t\t\tdisplay: none;\n\t\t}\n\t\t&:hover {\n\t\t\t\t.ctag-menu {\n\t\t\t\t\t\topacity:0.5;\n\t\t\t\t}\n\t\t\t\t.ctag-menu:hover {\n\t\t\t\t\t\topacity:1;\n\t\t\t\t\t\tbackground: white;\n\t\t\t\t\t\tbox-shadow: 0px 0px 3px rgba(0,0,0,.1);\n\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\t.ctag-menu-button {\n\t\t\t\t\t\t\t\tmargin-right: 15px;\n\t\t\t\t\t\t\t\tdisplay: block;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n\n\t\t&.hide iframe {\n\t\t\t\topacity: 0;\n\t\t}\n\t\tiframe::backdrop {\n\t\t\t\tbackground-color: rgba(255,255,255,1);\n\t\t}\n\n\t\tiframe {\n\t\t\t\t// transition: 0.3s all;\n\t\t\t\twidth: calc(100% );\n\t\t\t\t// border: 2px #eaeaea solid;\n\t\t\t\tborder: none;\n\t\t\t\tborder-radius: 5px;\n\t\t}\n\t\t.iframe-error {\n\t\t\t\tbackground: #ffddba;\n\t\t\t\tfont-size: 8px;\n\t\t\t\tpadding: 14px;\n\t\t\t\tborder: 2px #ffc080 solid;\n\t\t\t\tborder-radius: 5px;\n\t\t\t\tline-height: 14px;\n\t\t}\n}\n\n.content-block.block-text {\n\t\tpadding-bottom: 0px;\n}\n\n/* .content-block-text > * { */\n/* \t\tpadding: 0px 15px; */\n/* } */\n\n.content-block.block-tag {\n\t\tpadding: 0px 0px 0px 0px;\n position: relative;\n left: -15px;\n top: 0;\n width: calc(100% + 20px);\n height: calc(100% );\n display: block;\n}\n\n"}},97:function(t,n,e){"use strict";e.d(n,"c",(function(){return d})),e.d(n,"b",(function(){return p})),e.d(n,"a",(function(){return b}));var o=e(8),i=e(18),r=null,a=null,c=!1,l="[LATEX]",s=i.a.client.log.verbose,u=function(t,n){var e=document.createElement("script");e.src=t,e.crossorigin="anonymous",document.body.appendChild(e),e.onload=function(){n()}};c||(u("https://cdn.jsdelivr.net/npm/katex@0.15.2/dist/katex.min.js",(function(){u("https://cdn.jsdelivr.net/npm/katex@0.16.2/dist/contrib/auto-render.min.js",(function(){c=!0,r=window.katex,a=window.renderMathInElement}))})),function(t){var n=document.createElement("link");n.type="text/css",n.rel="stylesheet",n.href=t,document.body.appendChild(n)}("https://cdn.jsdelivr.net/npm/katex@0.15.2/dist/katex.css"));var d=function(t){var n=t=t.replaceAll("$","");if(!r)return n;try{window.ka=r,n=r.renderToString(t)}catch(e){s&&console.log("LATEX ERR:",e)}return n},p=Object(o.debounce)((function(){s&&console.log(l,"REFRESH"),f(".render-latex")}),100),f=function(t){if(a){var n=document.querySelectorAll(t);if(!n)return console.warn(l,"no el found :",t);s&&console.log(l,n),Object(o.each)(n,(function(t){a(t,{delimiters:[{left:"$$",right:"$$",display:!0},{left:"$",right:"$",display:!1},{left:"\\(",right:"\\)",display:!0},{left:"[[l]]",right:"[[l]]",display:!0},{left:"\\[",right:"\\]",display:!0}],throwOnError:!1})}))}},b=function(){return"\n.katex-display {\n\t\tdisplay: inline;\n\t\t.katex {\n\t\t\t\tdisplay: inline;\n\t\t\t\t.katex-html {\n\t\t\t\t\t\tdisplay: inline;\n\t\t\t\t}\n\t\t}\n}\n"}},98:function(t,n,e){"use strict";e.d(n,"a",(function(){return f})),e.d(n,"c",(function(){return b})),e.d(n,"b",(function(){return g}));var o=e(26),i=e(9),r=e(21),a=e(40),c=e(8),l=e(138),s=e(65),u=e(79),d=e(12),p=e(13),f=function(t){var n=Object(r.a)({},t),e=n.w,o=n.h,i=n.x,c=n.y,l=n.file;o||(o=u.c.rows),e||(e=u.c.cols),i||(i=0),c||(c=0);var s=Object(a.a)();return{layout:{i:s,x:i,y:c,w:e,h:o,minH:1,maxH:2,forceRender:0},content:{i:s,active:!1,file:l,view:"both"}}},b=function(){var t=Object(s.a)("tabs",[]),n=Object(i.a)(t,3),e=n[0],r=n[1],a=n[2],l=function(t){r(t)},u=function(t){var n=O({fullWindowFile:t});if(n){var i=[].concat(Object(o.a)(e),[n]),r=w(n.id,i);l(r)}},f=function(t){var n=[],o=Object(c.cloneDeep)(e);Object(c.each)(o,(function(e,o){e.id!==t&&n.push(e)})),l(n)},b=function(t){if(!t){var n=Object(c.cloneDeep)(e),o=v(n);if(!Object(c.isNumber)(o))return;t=n[o]}if(t.grid.layout[0]){var i,r=t.grid;return Object(c.each)(r.content,(function(t,n){t.active&&(i={layout:r.layout[n],content:r.content[n]})})),i}};return{tabs:e,updateTab:function(t,n,o){if("add"===t)Object(d.e)().then((function(t){u(t.ui.browser.files.active.get)}));else if("close"===t){if(!n)return;f(n.id)}else if("rename"===t){if(!n)return;if(o.length>15)return;var i=Object(c.cloneDeep)(e);Object(c.each)(i,(function(t){t.id===n.id&&(t.name=o,t.manualName=!0)})),l(i)}else if("activate"===t){if(!n)return;var r=w(n.id,e),a=h(r);if(l(a),"desktop"!==Object(p.a)()){var s,g=null===(s=b(n))||void 0===s?void 0:s.content.file;if(!g)return;Object(d.d)((function(t){t.ui.browser.goTo(g.folder,g.name)}))}}},refreshTabsFromBackend:a,updateActiveTabGrid:function(t){var n=Object(c.cloneDeep)(e),o=v(n);Object(c.isNumber)(o)&&(n[o].grid=t,l(n))},refreshWindowGrid:function(){var t=h(e);l(t)},tabsApi:{get:function(){return e},close:f,openInNewTab:u,reorder:function(t,n){var o=Object(c.cloneDeep)(e),i=o[t];o.splice(t,1),o.splice(n,0,i),l(o)},active:{get:function(){var t=null;return Object(c.each)(e,(function(n){n.active&&(t=n)})),t}}},windowsApi:{close:function(t){var n=Object(c.cloneDeep)(e);Object(c.each)(t,(function(t){Object(c.each)(n,(function(n,e){for(var o=0;o<n.grid.content.length;o++){var i=n.grid.content[o],r=n.grid.layout[o];i.i===t&&n.grid.content.splice(o,1),r.i===t&&n.grid.layout.splice(o,1)}}))}));var o=h(n);l(o)},active:{get:b,setContent:function(t){if(t){var n=Object(c.cloneDeep)(e),o=v(n);if(Object(c.isNumber)(o)){var i=n[o],r=i.grid.content;if(!(r.length<1)){var a=0;Object(c.each)(r,(function(t,n){!0===t.active&&(a=n)})),r[a].file=Object(c.cloneDeep)(t),i.manualName||(i.name=m(t.name));var s=h(n);l(s)}}}}},updateWindows:function(t,n){var o=Object(c.cloneDeep)(e);Object(c.each)(t,(function(t){Object(c.each)(o,(function(e,o){Object(c.each)(e.grid.content,(function(e){e.i===t&&(e.file=n)}))}))}));var i=h(o);l(i)},getIdsFromFile:function(t){var n=[];return Object(c.each)(e,(function(e){Object(c.each)(e.grid.content,(function(e){e.file&&e.file.path===t&&n.push(e.i)}))})),n}}}},g=function(t){var n=void 0;return Object(c.each)(t.grid.content,(function(t){t.active&&(n=t)})),n||(n=t.grid.content[0]),n},h=function(t){var n=Object(c.cloneDeep)(t);return Object(c.each)(n,(function(t){t.refresh=Object(l.a)(t.refresh)})),n},m=function(t){return t.length>15?"".concat(t.substring(0,13),".."):t},v=function(t){var n=void 0;return Object(c.each)(t,(function(t,e){t.active&&(n=e)})),n},w=function(t,n){var e=Object(c.cloneDeep)(n);return Object(c.each)(e,(function(n){n.refresh=Object(c.isNumber)(n.refresh)?n.refresh++:1,n.id===t?n.active=!0:n.active=!1})),e},O=function(t){if(t.copiedTab){var n=Object(c.cloneDeep)(t.copiedTab);return n.id=Object(a.a)(),n.name=x(t.copiedTab.name),n}if(t.fullWindowFile){var e=f({file:t.fullWindowFile});return{id:Object(a.a)(),name:m(t.fullWindowFile.name),active:!0,grid:{layout:[e.layout],content:[e.content]}}}},x=function(t){var n=t,e=n[n.length-1];return isNaN(parseInt(e))?n+=" 1":(n=n.slice(0,-1),n+="".concat(parseInt(e)+1)),n}},99:function(t,n,e){"use strict";e.d(n,"c",(function(){return b})),e.d(n,"a",(function(){return g})),e.d(n,"b",(function(){return m}));var o=e(26),i=e(8),r=(e(0),e(46)),a=e(28),c=e(24),l=e(12),s=e(13),u=e(73),d=e(10),p=e(56),f=e(1),b=Object(p.a)({pattern:a.a.externalLink3,replacement:function(t){return g(t)}}),g=function(t){var n=[];n=Object(i.isArray)(t)?t:Object(o.a)(t.matchAll(a.a.externalLink3))[0];var e=document.createElement("span");if(n.length<3)return e;var l=n[0].slice(0,-1),s=n[1].replace("www.",""),u=n[3],p=n[4],b="linkid".concat(Object(i.random)(0,1e7)),g=b;e.classList.add("link-mdpreview-wrapper"),e.classList.add("link-wrapper");var m=17;s.length>m&&(s=s.substring(s.length-m));var v=u;""!==v&&v||(v=p),v.length>m&&(v=v.substring(0,m)+""),v=0!==v.length?"".concat(v):"";var w="".concat(s).concat(v);w.length>m&&(w=w.substring(0,m));var O='<span class="link-deco">'.concat(Object(r.renderToString)(Object(f.d)(c.a,{name:"faLink",color:d.a.colors.main})),"</span>"),x='<span title="Open link in detached window" class="link-action link-openwindow" data-link="'.concat(l,'">').concat(Object(r.renderToString)(Object(f.d)(c.a,{name:"faExternalLinkAlt"})),"</span>"),j='<span title="Preview link" class="link-openpreview link-action" data-id="'.concat(g,'" data-link="').concat(l,'">').concat(Object(r.renderToString)(Object(f.d)(c.a,{name:"faEye"})),"</span>"),k='<span title="Display url content" class="link-fetcharticle link-action" data-id="'.concat(g,'" data-link="').concat(l,'">').concat(Object(r.renderToString)(Object(f.d)(c.a,{name:"faFont"})),"</span>"),y='<span title="Text to speech url content" class="link-audio link-action" data-id="'.concat(g,'" data-link="').concat(l,'">').concat(Object(r.renderToString)(Object(f.d)(c.a,{name:"faComment"})),"</span>"),C='<span class="link-action-more"><span class="icon-more">'.concat(Object(r.renderToString)(Object(f.d)(c.a,{name:"faEllipsisH"})),'</span><span class="link-action-wrapper">').concat(k," ").concat(y," ").concat(x," ").concat(j,"</span></span>"),_='<div class="'.concat(g,' link-iframe-wrapper"></div>'),E='<div class="'.concat(g,' link-fetch-preview-wrapper"></div>'),T='<span class="link-mdpreview-wrapper '.concat(b,'"><a href="').concat(l,'" class="link-mdpreview" title="').concat(l,'" target="_blank" rel="noreferrer">').concat(O).concat(w,"</a>").concat("").concat(C).concat(_).concat(E,"</span>");return e.innerHTML="".concat(T),h(b),e},h=function(t){var n=function(t,cb){var n=t.dataset.link,e=t.dataset.id;Object(l.d)((function(t){t.ressource.fetchUrlArticle(n,(function(t){Object(u.c)(".".concat(e,".link-iframe-wrapper"),t.html),cb(t)}))}))};setTimeout((function(){Object(u.a)(".".concat(t," .link-openwindow"),(function(t){if(t){var n=t.dataset.link;window.open(n,"popup-preview-link","width=800,height=1000")}})),Object(u.a)(".".concat(t," .link-openpreview"),(function(t){if(t){var n=t.dataset.link,e=t.dataset.id;Object(u.b)(".".concat(e,".link-iframe-wrapper"),n)}})),Object(u.a)(".".concat(t," .link-fetcharticle"),(function(t){t&&n(t,(function(){}))})),Object(u.a)(".".concat(t," .link-audio"),(function(t){t&&n(t,(function(t){console.log(t.content),t.text&&Object(l.d)((function(n){n.ui.textToSpeechPopup.open(t.text)}))}))}))}),100)},m=function(){return"\n.link-fetch-preview-wrapper {\n\tbackground: grey;\n\n}\n.link-mdpreview-wrapper {\n\t\tposition: relative;\n}\n.link-mdpreview-wrapper .link-action {\n}\n.link-fetch-preview-wrapper {\ndisplay: none;\n}\n.link-deco {\n padding-right:2px;\n}\n.link-action-more {\n\tposition: relative;\n}\n\n// having it placed differently on desktop/mobile\n.link-action-wrapper {\n display:flex;\n position: absolute;\n right: ".concat(Object(s.d)()?"20":"-30","px;\n top: -10px;\n opacity: 0;\n transition: 0.2s all;\n pointer-events: none;\n background: white;\n box-shadow: 0px 0px 5px rgba(0,0,0,0.1);\n padding: 7px;\n z-index: 10000;\n}\n.link-action-wrapper .link-action {\n\tpadding-left:4px;\n}\n\n.link-action-more {\n\tmargin-right: 6px;\n\topacity: 0.3;\n}\n.link-action-more .icon-more {\n\tposition:relative;\n\ttop:1px;\n}\n.link-action-more .icon-more svg {\n\ttransform: scale(0.7);\n}\n.link-action-more:hover {\n\topacity: 1;\n}\n.link-action-more:hover .link-action-wrapper {\n\topacity: 1;\n\tpointer-events:all;\n}\n\n.link-action \t\tsvg,\n.link-action span,\n.link-action div {\n\t\tpointer-events:none;\n}\n\n.link-action {\n\t\topacity: 0.5;\n\t\tcursor: pointer;\n}\n.link-iframe-wrapper {\n\t\tdisplay: none;\n}\n.link-iframe-wrapper.open {\n\t\tdisplay: block;\n\t\theight: 330px!important;\n}\n.link-iframe-wrapper iframe {\n\t\tborder-radius: 7px;\n\t\toverflow:hidden;\n\t\tbox-shadow: 0 0 4px rgba(0,0,0,0.3);\n\t\twidth: 150%!important;\n\t\ttransform-origin:top left;\n\t\ttransform: scale(0.65);\n\t\theight: 500px!important;\n}\n.link-iframe-wrapper.big{\n\theight: 600px!important;\n}\n.link-iframe-wrapper.big iframe{\n\t\theight: 900px!important;\n}\n\n.link-mdpreview-wrapper {\n\n}\n.link-mdpreview {\n\t\topacity: 0.6;\n\t\ttransition: 0.2s all;\n\t\t&:hover {\n\t\t\t\topacity: 1;\n\t\t}\n\t\tline-height: 20px;\n\t\ttext-decoration: none;\n\t\tcolor: ").concat(d.a.colors.main,";\n\t\t// border: solid 2px ").concat(d.a.colors.main,";\n\t\tpadding: 0px 2px 0px 0px;\n\t\tcursor: pointer;\n\t\tborder-radius: 5px;\n\t\tsvg {\n\t\t\t\tcolor: ").concat(d.a.colors.main,";\n\t\t}\n}\n")}}},[[450,11,12]]]);